Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
From 36d9b3ae708e865cdab95692db5a24c5d975383d Mon Sep 17 00:00:00 2001
|
||||
From: Dragan Simic <dsimic@manjaro.org>
|
||||
Date: Tue, 12 Dec 2023 09:01:39 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add ethernet0 alias to the dts for
|
||||
RK3566 boards
|
||||
|
||||
Add ethernet0 alias to the board dts files for a few supported RK3566 boards
|
||||
that had it missing. Also, remove the ethernet0 alias from one RK3566 SoM
|
||||
dtsi file, which doesn't enable the GMAC, and add the ethernet0 alias back to
|
||||
the dependent board dts files, which actually enable the GMAC.
|
||||
|
||||
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/d2a272e0ae0fff0adfab8bb0238243b11d348799.1702368023.git.dsimic@manjaro.org
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
|
||||
@@ -14,6 +14,7 @@
|
||||
compatible = "radxa,cm3-io", "radxa,cm3", "rockchip,rk3566";
|
||||
|
||||
aliases {
|
||||
+ ethernet0 = &gmac1;
|
||||
mmc1 = &sdmmc0;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 437644753208092f642b7669c69da606aa07dfb4 Mon Sep 17 00:00:00 2001
|
||||
From: Tim Lunn <tim@feathertop.org>
|
||||
Date: Wed, 14 Feb 2024 15:07:30 +1100
|
||||
Subject: [PATCH] arm64: dts: rockchip: adjust vendor on Banana Pi R2 Pro board
|
||||
|
||||
Adjust compatible string to match the board vendor of Sinovoip
|
||||
|
||||
Signed-off-by: Tim Lunn <tim@feathertop.org>
|
||||
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
|
||||
Acked-by: Conor Dooley <conor.dooley@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20240214040731.3069111-4-tim@feathertop.org
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/ {
|
||||
model = "Bananapi-R2 Pro (RK3568) DDR4 Board";
|
||||
- compatible = "rockchip,rk3568-bpi-r2pro", "rockchip,rk3568";
|
||||
+ compatible = "sinovoip,rk3568-bpi-r2pro", "rockchip,rk3568";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac0;
|
||||
@@ -0,0 +1,127 @@
|
||||
From 8612169a05c5e979af033868b7a9b177e0f9fcdf Mon Sep 17 00:00:00 2001
|
||||
From: Dragan Simic <dsimic@manjaro.org>
|
||||
Date: Sat, 9 Mar 2024 05:25:06 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add cache information to the SoC dtsi
|
||||
for RK356x
|
||||
|
||||
Add missing cache information to the Rockchip RK356x SoC dtsi, to allow
|
||||
the userspace, which includes lscpu(1) that uses the virtual files provided
|
||||
by the kernel under the /sys/devices/system/cpu directory, to display the
|
||||
proper RK3566 and RK3568 cache information.
|
||||
|
||||
Adding the cache information to the RK356x SoC dtsi also makes the following
|
||||
warning message in the kernel log go away:
|
||||
|
||||
cacheinfo: Unable to detect cache hierarchy for CPU 0
|
||||
|
||||
The cache parameters for the RK356x dtsi were obtained and partially derived
|
||||
by hand from the cache size and layout specifications found in the following
|
||||
datasheets and technical reference manuals:
|
||||
|
||||
- Rockchip RK3566 datasheet, version 1.1
|
||||
- Rockchip RK3568 datasheet, version 1.3
|
||||
- ARM Cortex-A55 revision r1p0 TRM, version 0100-00
|
||||
- ARM DynamIQ Shared Unit revision r4p0 TRM, version 0400-02
|
||||
|
||||
For future reference, here's a rather detailed summary of the documentation,
|
||||
which applies to both Rockchip RK3566 and RK3568 SoCs:
|
||||
|
||||
- All caches employ the 64-byte cache line length
|
||||
- Each Cortex-A55 core has 32 KB of L1 4-way, set-associative instruction
|
||||
cache and 32 KB of L1 4-way, set-associative data cache
|
||||
- There are no L2 caches, which are per-core and private in Cortex-A55,
|
||||
because it belongs to the ARM DynamIQ IP core lineup
|
||||
- The entire SoC has 512 KB of unified L3 16-way, set-associative cache,
|
||||
which is shared among all four Cortex-A55 CPU cores
|
||||
- Cortex-A55 cores can be configured without private per-core L2 caches,
|
||||
in which case the shared L3 cache appears to them as an L2 cache; this
|
||||
is the case for the RK356x SoCs, so let's use "cache-level = <2>" to
|
||||
prevent the "huh, no L2 caches, but an L3 cache?" confusion among the
|
||||
users viewing the data presented to the userspace; another option could
|
||||
be to have additional 0 KB L2 caches defined, which may be technically
|
||||
correct, but would probably be even more confusing
|
||||
|
||||
Helped-by: Anand Moon <linux.amoon@gmail.com>
|
||||
Tested-By: Diederik de Haas <didi.debian@cknow.org>
|
||||
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
|
||||
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/2dee6dad8460b0c5f3b5da53cf55f735840efef1.1709957777.git.dsimic@manjaro.org
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 41 ++++++++++++++++++++++++
|
||||
1 file changed, 41 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
@@ -57,6 +57,13 @@
|
||||
#cooling-cells = <2>;
|
||||
enable-method = "psci";
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
+ i-cache-size = <0x8000>;
|
||||
+ i-cache-line-size = <64>;
|
||||
+ i-cache-sets = <128>;
|
||||
+ d-cache-size = <0x8000>;
|
||||
+ d-cache-line-size = <64>;
|
||||
+ d-cache-sets = <128>;
|
||||
+ next-level-cache = <&l3_cache>;
|
||||
};
|
||||
|
||||
cpu1: cpu@100 {
|
||||
@@ -66,6 +73,13 @@
|
||||
#cooling-cells = <2>;
|
||||
enable-method = "psci";
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
+ i-cache-size = <0x8000>;
|
||||
+ i-cache-line-size = <64>;
|
||||
+ i-cache-sets = <128>;
|
||||
+ d-cache-size = <0x8000>;
|
||||
+ d-cache-line-size = <64>;
|
||||
+ d-cache-sets = <128>;
|
||||
+ next-level-cache = <&l3_cache>;
|
||||
};
|
||||
|
||||
cpu2: cpu@200 {
|
||||
@@ -75,6 +89,13 @@
|
||||
#cooling-cells = <2>;
|
||||
enable-method = "psci";
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
+ i-cache-size = <0x8000>;
|
||||
+ i-cache-line-size = <64>;
|
||||
+ i-cache-sets = <128>;
|
||||
+ d-cache-size = <0x8000>;
|
||||
+ d-cache-line-size = <64>;
|
||||
+ d-cache-sets = <128>;
|
||||
+ next-level-cache = <&l3_cache>;
|
||||
};
|
||||
|
||||
cpu3: cpu@300 {
|
||||
@@ -84,9 +105,29 @@
|
||||
#cooling-cells = <2>;
|
||||
enable-method = "psci";
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
+ i-cache-size = <0x8000>;
|
||||
+ i-cache-line-size = <64>;
|
||||
+ i-cache-sets = <128>;
|
||||
+ d-cache-size = <0x8000>;
|
||||
+ d-cache-line-size = <64>;
|
||||
+ d-cache-sets = <128>;
|
||||
+ next-level-cache = <&l3_cache>;
|
||||
};
|
||||
};
|
||||
|
||||
+ /*
|
||||
+ * There are no private per-core L2 caches, but only the
|
||||
+ * L3 cache that appears to the CPU cores as L2 caches
|
||||
+ */
|
||||
+ l3_cache: l3-cache {
|
||||
+ compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
+ cache-unified;
|
||||
+ cache-size = <0x80000>;
|
||||
+ cache-line-size = <64>;
|
||||
+ cache-sets = <512>;
|
||||
+ };
|
||||
+
|
||||
cpu0_opp_table: opp-table-0 {
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
@@ -0,0 +1,84 @@
|
||||
From c45de75d7a9ab44a15dedc7a121d6371d6891301 Mon Sep 17 00:00:00 2001
|
||||
From: Trevor Woerner <twoerner@gmail.com>
|
||||
Date: Mon, 20 Nov 2023 11:22:32 -0500
|
||||
Subject: [PATCH] arm64: dts: rockchip: add gpio-line-names to rk3308-rock-pi-s
|
||||
|
||||
Add names to the pins of the general-purpose expansion header as given in the
|
||||
Radxa GPIO page[1] following the conventions in the kernel documentation[2] to
|
||||
make it easier for users to correlate the pins with functions when using
|
||||
utilities such as gpioinfo.
|
||||
|
||||
[1] https://wiki.radxa.com/RockpiS/hardware/gpio
|
||||
[2] Documentation/devicetree/bindings/gpio/gpio.txt
|
||||
|
||||
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20231120162232.27653-1-twoerner@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3308-rock-pi-s.dts | 58 +++++++++++++++++++
|
||||
1 file changed, 58 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
|
||||
@@ -258,3 +258,61 @@
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&gpio0 {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIO0_A0 - A7 */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIO0_B0 - B7 */
|
||||
+ "", "", "", "header1-pin3 [GPIO0_B3]", "header1-pin5 [GPIO0_B4]",
|
||||
+ "", "", "header1-pin11 [GPIO0_B7]",
|
||||
+ /* GPIO0_C0 - C7 */
|
||||
+ "header1-pin13 [GPIO0_C0]", "header1-pin15 [GPIO0_C1]", "", "", "",
|
||||
+ "", "", "",
|
||||
+ /* GPIO0_D0 - D8 */
|
||||
+ "", "", "", "", "", "", "", "";
|
||||
+};
|
||||
+
|
||||
+&gpio1 {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIO1_A0 - A7 */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIO1_B0 - B7 */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIO1_C0 - C7 */
|
||||
+ "", "", "", "", "", "", "header1-pin21 [GPIO1_C6]",
|
||||
+ "header1-pin19 [GPIO1_C7]",
|
||||
+ /* GPIO1_D0 - D8 */
|
||||
+ "header1-pin23 [GPIO1_D0]", "header1-pin24 [GPIO1_D1]", "", "", "",
|
||||
+ "", "", "";
|
||||
+};
|
||||
+
|
||||
+&gpio2 {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIO2_A0 - A7 */
|
||||
+ "header1-pin10 [GPIO2_A0]", "header1-pin8 [GPIO2_A1]", "", "",
|
||||
+ "header1-pin7 [GPIO2_A4]", "header1-pin12 [GPIO2_A5]",
|
||||
+ "header2-pin46 [GPIO2_A6]", "header1-pin22 [GPIO1_A7]",
|
||||
+ /* GPIO2_B0 - B7 */
|
||||
+ "header2-pin45 [GPIO2_B0]", "header1-pin18 [GPIO2_B1]",
|
||||
+ "header1-pin16 [GPIO2_B2]", "header2-pin44 [GPIO2_B3]",
|
||||
+ "header2-pin43 [GPIO2_B4]", "header2-pin28 [GPIO2_B5]",
|
||||
+ "header2-pin30 [GPIO2_B6]", "header2-pin32 [GPIO2_B7]",
|
||||
+ /* GPIO2_C0 - C7 */
|
||||
+ "header2-pin34 [GPIO2_C0]", "", "", "", "", "", "", "",
|
||||
+ /* GPIO2_D0 - D8 */
|
||||
+ "", "", "", "", "", "", "", "";
|
||||
+};
|
||||
+
|
||||
+&gpio3 {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIO3_A0 - A7 */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIO3_B0 - B7 */
|
||||
+ "", "", "header2-pin42 [GPIO3_B2]", "header2-pin41 [GPIO3_B3]",
|
||||
+ "header2-pin40 [GPIO3_B4]", "header2-pin39 [GPIO3_B5]", "", "",
|
||||
+ /* GPIO3_C0 - C7 */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIO3_D0 - D8 */
|
||||
+ "", "", "", "", "", "", "", "";
|
||||
+};
|
||||
@@ -0,0 +1,152 @@
|
||||
From 085021cc825ed90a6ddc4406f608fb8a85745f81 Mon Sep 17 00:00:00 2001
|
||||
From: Trevor Woerner <twoerner@gmail.com>
|
||||
Date: Tue, 19 Dec 2023 12:38:13 -0500
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3308-rock-pi-s gpio-line-names
|
||||
cleanup
|
||||
|
||||
Perform the following cleanups on a previous patch:
|
||||
- indent lines after "gpio-line-names"
|
||||
- fix D0-D8 -> D0-D7
|
||||
- sort phandle references
|
||||
|
||||
Fixes: c45de75d7a9a ("arm64: dts: rockchip: add gpio-line-names to rk3308-rock-pi-s")
|
||||
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20231219173814.1569-1-twoerner@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3308-rock-pi-s.dts | 120 +++++++++---------
|
||||
1 file changed, 62 insertions(+), 58 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
|
||||
@@ -151,6 +151,68 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&gpio0 {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIO0_A0 - A7 */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIO0_B0 - B7 */
|
||||
+ "", "", "", "header1-pin3 [GPIO0_B3]",
|
||||
+ "header1-pin5 [GPIO0_B4]", "", "",
|
||||
+ "header1-pin11 [GPIO0_B7]",
|
||||
+ /* GPIO0_C0 - C7 */
|
||||
+ "header1-pin13 [GPIO0_C0]",
|
||||
+ "header1-pin15 [GPIO0_C1]", "", "", "",
|
||||
+ "", "", "",
|
||||
+ /* GPIO0_D0 - D7 */
|
||||
+ "", "", "", "", "", "", "", "";
|
||||
+};
|
||||
+
|
||||
+&gpio1 {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIO1_A0 - A7 */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIO1_B0 - B7 */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIO1_C0 - C7 */
|
||||
+ "", "", "", "", "", "", "header1-pin21 [GPIO1_C6]",
|
||||
+ "header1-pin19 [GPIO1_C7]",
|
||||
+ /* GPIO1_D0 - D7 */
|
||||
+ "header1-pin23 [GPIO1_D0]", "header1-pin24 [GPIO1_D1]",
|
||||
+ "", "", "", "", "", "";
|
||||
+};
|
||||
+
|
||||
+&gpio2 {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIO2_A0 - A7 */
|
||||
+ "header1-pin10 [GPIO2_A0]", "header1-pin8 [GPIO2_A1]",
|
||||
+ "", "",
|
||||
+ "header1-pin7 [GPIO2_A4]", "header1-pin12 [GPIO2_A5]",
|
||||
+ "header2-pin46 [GPIO2_A6]", "header1-pin22 [GPIO1_A7]",
|
||||
+ /* GPIO2_B0 - B7 */
|
||||
+ "header2-pin45 [GPIO2_B0]", "header1-pin18 [GPIO2_B1]",
|
||||
+ "header1-pin16 [GPIO2_B2]", "header2-pin44 [GPIO2_B3]",
|
||||
+ "header2-pin43 [GPIO2_B4]", "header2-pin28 [GPIO2_B5]",
|
||||
+ "header2-pin30 [GPIO2_B6]", "header2-pin32 [GPIO2_B7]",
|
||||
+ /* GPIO2_C0 - C7 */
|
||||
+ "header2-pin34 [GPIO2_C0]", "", "", "", "", "", "", "",
|
||||
+ /* GPIO2_D0 - D7 */
|
||||
+ "", "", "", "", "", "", "", "";
|
||||
+};
|
||||
+
|
||||
+&gpio3 {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIO3_A0 - A7 */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIO3_B0 - B7 */
|
||||
+ "", "", "header2-pin42 [GPIO3_B2]",
|
||||
+ "header2-pin41 [GPIO3_B3]", "header2-pin40 [GPIO3_B4]",
|
||||
+ "header2-pin39 [GPIO3_B5]", "", "",
|
||||
+ /* GPIO3_C0 - C7 */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIO3_D0 - D7 */
|
||||
+ "", "", "", "", "", "", "", "";
|
||||
+};
|
||||
+
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -258,61 +320,3 @@
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
-
|
||||
-&gpio0 {
|
||||
- gpio-line-names =
|
||||
- /* GPIO0_A0 - A7 */
|
||||
- "", "", "", "", "", "", "", "",
|
||||
- /* GPIO0_B0 - B7 */
|
||||
- "", "", "", "header1-pin3 [GPIO0_B3]", "header1-pin5 [GPIO0_B4]",
|
||||
- "", "", "header1-pin11 [GPIO0_B7]",
|
||||
- /* GPIO0_C0 - C7 */
|
||||
- "header1-pin13 [GPIO0_C0]", "header1-pin15 [GPIO0_C1]", "", "", "",
|
||||
- "", "", "",
|
||||
- /* GPIO0_D0 - D8 */
|
||||
- "", "", "", "", "", "", "", "";
|
||||
-};
|
||||
-
|
||||
-&gpio1 {
|
||||
- gpio-line-names =
|
||||
- /* GPIO1_A0 - A7 */
|
||||
- "", "", "", "", "", "", "", "",
|
||||
- /* GPIO1_B0 - B7 */
|
||||
- "", "", "", "", "", "", "", "",
|
||||
- /* GPIO1_C0 - C7 */
|
||||
- "", "", "", "", "", "", "header1-pin21 [GPIO1_C6]",
|
||||
- "header1-pin19 [GPIO1_C7]",
|
||||
- /* GPIO1_D0 - D8 */
|
||||
- "header1-pin23 [GPIO1_D0]", "header1-pin24 [GPIO1_D1]", "", "", "",
|
||||
- "", "", "";
|
||||
-};
|
||||
-
|
||||
-&gpio2 {
|
||||
- gpio-line-names =
|
||||
- /* GPIO2_A0 - A7 */
|
||||
- "header1-pin10 [GPIO2_A0]", "header1-pin8 [GPIO2_A1]", "", "",
|
||||
- "header1-pin7 [GPIO2_A4]", "header1-pin12 [GPIO2_A5]",
|
||||
- "header2-pin46 [GPIO2_A6]", "header1-pin22 [GPIO1_A7]",
|
||||
- /* GPIO2_B0 - B7 */
|
||||
- "header2-pin45 [GPIO2_B0]", "header1-pin18 [GPIO2_B1]",
|
||||
- "header1-pin16 [GPIO2_B2]", "header2-pin44 [GPIO2_B3]",
|
||||
- "header2-pin43 [GPIO2_B4]", "header2-pin28 [GPIO2_B5]",
|
||||
- "header2-pin30 [GPIO2_B6]", "header2-pin32 [GPIO2_B7]",
|
||||
- /* GPIO2_C0 - C7 */
|
||||
- "header2-pin34 [GPIO2_C0]", "", "", "", "", "", "", "",
|
||||
- /* GPIO2_D0 - D8 */
|
||||
- "", "", "", "", "", "", "", "";
|
||||
-};
|
||||
-
|
||||
-&gpio3 {
|
||||
- gpio-line-names =
|
||||
- /* GPIO3_A0 - A7 */
|
||||
- "", "", "", "", "", "", "", "",
|
||||
- /* GPIO3_B0 - B7 */
|
||||
- "", "", "header2-pin42 [GPIO3_B2]", "header2-pin41 [GPIO3_B3]",
|
||||
- "header2-pin40 [GPIO3_B4]", "header2-pin39 [GPIO3_B5]", "", "",
|
||||
- /* GPIO3_C0 - C7 */
|
||||
- "", "", "", "", "", "", "", "",
|
||||
- /* GPIO3_D0 - D8 */
|
||||
- "", "", "", "", "", "", "", "";
|
||||
-};
|
||||
@@ -0,0 +1,32 @@
|
||||
From fc0daeccc384233eadfa9d5ddbd00159653c6bdc Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Tue, 21 May 2024 21:10:07 +0000
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add sdmmc related properties on
|
||||
rk3308-rock-pi-s
|
||||
|
||||
Add cap-mmc-highspeed to allow use of high speed MMC mode using an eMMC
|
||||
to uSD board. Use disable-wp to signal that no physical write-protect
|
||||
line is present. Also add vcc_io used for card and IO line power as
|
||||
vmmc-supply.
|
||||
|
||||
Fixes: 2e04c25b1320 ("arm64: dts: rockchip: add ROCK Pi S DTS support")
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Link: https://lore.kernel.org/r/20240521211029.1236094-5-jonas@kwiboo.se
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
|
||||
@@ -272,7 +272,10 @@
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
+ cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
+ disable-wp;
|
||||
+ vmmc-supply = <&vcc_io>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 7affb86ef62581e3475ce3e0a7640da1f2ee29f8 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Tue, 21 May 2024 21:10:08 +0000
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add pinctrl for UART0 to
|
||||
rk3308-rock-pi-s
|
||||
|
||||
UAR0 CTS/RTS is not wired to any pin and is not used for the default
|
||||
serial console use of UART0 on ROCK Pi S.
|
||||
|
||||
Override the SoC defined pinctrl props to limit configuration of the
|
||||
two xfer pins wired to one of the GPIO pin headers.
|
||||
|
||||
Fixes: 2e04c25b1320 ("arm64: dts: rockchip: add ROCK Pi S DTS support")
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Link: https://lore.kernel.org/r/20240521211029.1236094-6-jonas@kwiboo.se
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
|
||||
@@ -294,6 +294,8 @@
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
From 4b64ed510ed946a4e4ca6d51d6512bf5361f6a04 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Tue, 21 May 2024 21:10:10 +0000
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add mdio and ethernet-phy nodes to
|
||||
rk3308-rock-pi-s
|
||||
|
||||
Be explicit about the Ethernet port and define mdio and ethernet-phy
|
||||
nodes in the device tree for ROCK Pi S.
|
||||
|
||||
Fixes: bc3753aed81f ("arm64: dts: rockchip: rock-pi-s add more peripherals")
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Link: https://lore.kernel.org/r/20240521211029.1236094-8-jonas@kwiboo.se
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3308-rock-pi-s.dts | 26 ++++++++++++++++---
|
||||
1 file changed, 23 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
|
||||
@@ -144,11 +144,25 @@
|
||||
|
||||
&gmac {
|
||||
clock_in_out = "output";
|
||||
+ phy-handle = <&rtl8201f>;
|
||||
phy-supply = <&vcc_io>;
|
||||
- snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
|
||||
- snps,reset-active-low;
|
||||
- snps,reset-delays-us = <0 50000 50000>;
|
||||
status = "okay";
|
||||
+
|
||||
+ mdio {
|
||||
+ compatible = "snps,dwmac-mdio";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ rtl8201f: ethernet-phy@1 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mac_rst>;
|
||||
+ reset-assert-us = <20000>;
|
||||
+ reset-deassert-us = <50000>;
|
||||
+ reset-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
@@ -221,6 +235,12 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rtc_32k>;
|
||||
|
||||
+ gmac {
|
||||
+ mac_rst: mac-rst {
|
||||
+ rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
green_led: green-led {
|
||||
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
@@ -0,0 +1,77 @@
|
||||
From 6731d2c9039fbe1ecf21915eab3acee0a999508a Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Fri, 10 Jul 2020 21:38:20 +0200
|
||||
Subject: [PATCH] rockchip: use system LED for OpenWrt
|
||||
|
||||
Use the SYS LED on the casing for showing system status.
|
||||
|
||||
This patch is kept separate from the NanoPi R2S support patch, as i plan
|
||||
on submitting the device support upstream.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -6,6 +6,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include "rk3328.dtsi"
|
||||
|
||||
@@ -16,6 +17,11 @@
|
||||
aliases {
|
||||
ethernet1 = &rtl8153;
|
||||
mmc0 = &sdmmc;
|
||||
+
|
||||
+ led-boot = &sys_led;
|
||||
+ led-failsafe = &sys_led;
|
||||
+ led-running = &sys_led;
|
||||
+ led-upgrade = &sys_led;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -48,19 +54,22 @@
|
||||
pinctrl-names = "default";
|
||||
|
||||
lan_led: led-0 {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ function = LED_FUNCTION_LAN;
|
||||
gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
- label = "nanopi-r2s:green:lan";
|
||||
};
|
||||
|
||||
sys_led: led-1 {
|
||||
+ color = <LED_COLOR_ID_RED>;
|
||||
+ function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
- label = "nanopi-r2s:red:sys";
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
wan_led: led-2 {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ function = LED_FUNCTION_WAN;
|
||||
gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
- label = "nanopi-r2s:green:wan";
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
@@ -13,6 +13,11 @@
|
||||
aliases {
|
||||
mmc0 = &sdmmc;
|
||||
mmc1 = &emmc;
|
||||
+
|
||||
+ led-boot = &power_led;
|
||||
+ led-failsafe = &power_led;
|
||||
+ led-running = &power_led;
|
||||
+ led-upgrade = &power_led;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -0,0 +1,24 @@
|
||||
From 2795c8b31a686bdb8338f9404d18ef7a154f0d75 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Sun, 26 Jul 2020 13:32:59 +0200
|
||||
Subject: [PATCH] arm64: rockchip: add OF node for USB eth on NanoPi R2S
|
||||
|
||||
This adds the OF node for the USB3 ethernet adapter on the FriendlyARM
|
||||
NanoPi R2S. Add the correct value for the RTL8153 LED configuration
|
||||
register to match the blink behavior of the other port on the device.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 7 +++++++
|
||||
1 file changed, 1 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -406,6 +406,7 @@
|
||||
rtl8153: device@2 {
|
||||
compatible = "usbbda,8153";
|
||||
reg = <2>;
|
||||
+ realtek,led-data = <0x87>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Subject: arm64: dts: rockchip: disable UHS modes for NanoPi R4S
|
||||
|
||||
The NanoPi R4S leaves the SD card in 1.8V signalling when rebooting
|
||||
while U-Boot requires the card to be in 3.3V mode.
|
||||
|
||||
Remove UHS support from the SD controller so the card remains in 3.3V
|
||||
mode. This reduces transfer speeds but ensures a reboot whether from
|
||||
userspace or following a kernel panic is always working.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
@@ -335,7 +335,6 @@
|
||||
sd-uhs-sdr12;
|
||||
sd-uhs-sdr25;
|
||||
sd-uhs-sdr50;
|
||||
- sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_sd>;
|
||||
vqmmc-supply = <&vcc_sdio>;
|
||||
status = "okay";
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
@@ -112,6 +112,11 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+&sdmmc {
|
||||
+ /delete-property/ sd-uhs-sdr104;
|
||||
+ cap-sd-highspeed;
|
||||
+};
|
||||
+
|
||||
&u2phy0_host {
|
||||
phy-supply = <&vdd_5v>;
|
||||
};
|
||||
16
target/linux/rockchip/patches-6.6/106-r4s-openwrt-leds.patch
Normal file
16
target/linux/rockchip/patches-6.6/106-r4s-openwrt-leds.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
@@ -19,6 +19,13 @@
|
||||
model = "FriendlyElec NanoPi R4S";
|
||||
compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399";
|
||||
|
||||
+ aliases {
|
||||
+ led-boot = &sys_led;
|
||||
+ led-failsafe = &sys_led;
|
||||
+ led-running = &sys_led;
|
||||
+ led-upgrade = &sys_led;
|
||||
+ };
|
||||
+
|
||||
/delete-node/ display-subsystem;
|
||||
|
||||
gpio-leds {
|
||||
@@ -0,0 +1,40 @@
|
||||
From d2166e3b3680bd2b206aebf1e1ce4c0d346f3c50 Mon Sep 17 00:00:00 2001
|
||||
From: Tianling Shen <cnsztl@gmail.com>
|
||||
Date: Fri, 19 May 2023 12:10:52 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: Update LED properties for Orange Pi R1
|
||||
Plus
|
||||
|
||||
Add OpenWrt's LED aliases for showing system status.
|
||||
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
---
|
||||
.../dts/rockchip/rk3328-orangepi-r1-plus.dts | 17 +++++++++--------
|
||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
|
||||
@@ -17,6 +17,11 @@
|
||||
aliases {
|
||||
ethernet1 = &rtl8153;
|
||||
mmc0 = &sdmmc;
|
||||
+
|
||||
+ led-boot = &status_led;
|
||||
+ led-failsafe = &status_led;
|
||||
+ led-running = &status_led;
|
||||
+ led-upgrade = &status_led;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -41,11 +46,10 @@
|
||||
gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
- led-1 {
|
||||
+ status_led: led-1 {
|
||||
function = LED_FUNCTION_STATUS;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
- linux,default-trigger = "heartbeat";
|
||||
};
|
||||
|
||||
led-2 {
|
||||
@@ -0,0 +1,24 @@
|
||||
From b46a530d12ada422b9d5b2b97059e0d3ed950b40 Mon Sep 17 00:00:00 2001
|
||||
From: Tianling Shen <cnsztl@gmail.com>
|
||||
Date: Fri, 19 May 2023 12:38:04 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: add LED configuration to Orange Pi R1
|
||||
Plus
|
||||
|
||||
Add the correct value for the RTL8153 LED configuration register to
|
||||
match the blink behavior of the other port on the device.
|
||||
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
|
||||
@@ -365,6 +365,7 @@
|
||||
rtl8153: device@2 {
|
||||
compatible = "usbbda,8153";
|
||||
reg = <2>;
|
||||
+ realtek,led-data = <0x87>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
|
||||
@@ -15,6 +15,13 @@
|
||||
model = "FriendlyElec NanoPC-T4";
|
||||
compatible = "friendlyarm,nanopc-t4", "rockchip,rk3399";
|
||||
|
||||
+ aliases {
|
||||
+ led-boot = &status_led;
|
||||
+ led-failsafe = &status_led;
|
||||
+ led-running = &status_led;
|
||||
+ led-upgrade = &status_led;
|
||||
+ };
|
||||
+
|
||||
vcc12v0_sys: vcc12v0-sys {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-always-on;
|
||||
@@ -0,0 +1,45 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tianling Shen <cnsztl@gmail.com>
|
||||
Date: Tue Jun 20 16:45:27 2023 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: Update LED properties for NanoPi R5
|
||||
series
|
||||
|
||||
Add OpenWrt's LED aliases for showing system status.
|
||||
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
---
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
|
||||
@@ -40,7 +40,6 @@
|
||||
power_led: led-power {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
- linux,default-trigger = "heartbeat";
|
||||
gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
|
||||
@@ -39,7 +39,6 @@
|
||||
power_led: led-power {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
- linux,default-trigger = "heartbeat";
|
||||
gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
|
||||
@@ -18,6 +18,11 @@
|
||||
aliases {
|
||||
mmc0 = &sdmmc0;
|
||||
mmc1 = &sdhci;
|
||||
+
|
||||
+ led-boot = &power_led;
|
||||
+ led-failsafe = &power_led;
|
||||
+ led-running = &power_led;
|
||||
+ led-upgrade = &power_led;
|
||||
};
|
||||
|
||||
chosen: chosen {
|
||||
@@ -0,0 +1,36 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Marius Durbaca <mariusd84@gmail.com>
|
||||
Date: Tue Feb 20 15:05:27 2024 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Update LED properties for Radxa
|
||||
CM3 IO board
|
||||
|
||||
Add OpenWrt's LED aliases for showing system status.
|
||||
|
||||
Suggested-by: Tianling Shen <cnsztl@immortalwrt.org>
|
||||
Signed-off-by: Marius Durbaca <mariusd84@gmail.com>
|
||||
---
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
|
||||
@@ -16,6 +16,10 @@
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
mmc1 = &sdmmc0;
|
||||
+ led-boot = &status_led;
|
||||
+ led-failsafe = &status_led;
|
||||
+ led-running = &status_led;
|
||||
+ led-upgrade = &status_led;
|
||||
};
|
||||
|
||||
chosen: chosen {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
|
||||
@@ -17,7 +17,7 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
- led-0 {
|
||||
+ status_led: led-0 {
|
||||
gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
@@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Marius Durbaca <mariusd84@gmail.com>
|
||||
Date: Tue Feb 27 16:25:27 2024 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Update LED properties for Radxa
|
||||
E25
|
||||
|
||||
Add OpenWrt's LED aliases for showing system status.
|
||||
|
||||
Signed-off-by: Marius Durbaca <mariusd84@gmail.com>
|
||||
---
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
|
||||
@@ -9,6 +9,10 @@
|
||||
|
||||
aliases {
|
||||
mmc1 = &sdmmc0;
|
||||
+ led-boot = &led_user;
|
||||
+ led-failsafe = &led_user;
|
||||
+ led-running = &led_user;
|
||||
+ led-upgrade = &led_user;
|
||||
};
|
||||
|
||||
pwm-leds {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi
|
||||
@@ -23,7 +23,7 @@
|
||||
gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_HEARTBEAT;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
- linux,default-trigger = "heartbeat";
|
||||
+ default-state = "on";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_user_en>;
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
|
||||
@@ -17,6 +17,10 @@
|
||||
ethernet0 = &gmac;
|
||||
mmc0 = &emmc;
|
||||
mmc1 = &sdmmc;
|
||||
+ led-boot = &blue_led;
|
||||
+ led-failsafe = &blue_led;
|
||||
+ led-running = &blue_led;
|
||||
+ led-upgrade = &blue_led;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -28,22 +32,19 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&green_led>, <&heartbeat_led>;
|
||||
|
||||
- green-led {
|
||||
+ led-0 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
default-state = "on";
|
||||
function = LED_FUNCTION_POWER;
|
||||
gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
- label = "rockpis:green:power";
|
||||
linux,default-trigger = "default-on";
|
||||
};
|
||||
|
||||
- blue-led {
|
||||
+ blue_led: led-1 {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
default-state = "on";
|
||||
function = LED_FUNCTION_HEARTBEAT;
|
||||
gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
- label = "rockpis:blue:user";
|
||||
- linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
|
||||
@@ -15,6 +15,10 @@
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc0;
|
||||
+ led-boot = &led_blue;
|
||||
+ led-failsafe = &led_blue;
|
||||
+ led-running = &led_blue;
|
||||
+ led-upgrade = &led_blue;
|
||||
};
|
||||
|
||||
chosen: chosen {
|
||||
@@ -42,11 +46,11 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
- led_user: led-0 {
|
||||
- gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
- function = LED_FUNCTION_HEARTBEAT;
|
||||
+ led_blue: led-0 {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
- linux,default-trigger = "heartbeat";
|
||||
+ default-state = "on";
|
||||
+ function = LED_FUNCTION_HEARTBEAT;
|
||||
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_user_en>;
|
||||
};
|
||||
@@ -0,0 +1,340 @@
|
||||
From patchwork Sat Nov 12 14:10:58 2022
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Aurelien Jarno <aurelien@aurel32.net>
|
||||
X-Patchwork-Id: 13041222
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org>
|
||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
To: Olivia Mackall <olivia@selenic.com>,
|
||||
Herbert Xu <herbert@gondor.apana.org.au>,
|
||||
Rob Herring <robh+dt@kernel.org>,
|
||||
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
|
||||
Heiko Stuebner <heiko@sntech.de>,
|
||||
Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
Lin Jinhan <troy.lin@rock-chips.com>
|
||||
Cc: linux-crypto@vger.kernel.org (open list:HARDWARE RANDOM NUMBER GENERATOR
|
||||
CORE),
|
||||
devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE
|
||||
BINDINGS),
|
||||
linux-arm-kernel@lists.infradead.org (moderated list:ARM/Rockchip SoC
|
||||
support),
|
||||
linux-rockchip@lists.infradead.org (open list:ARM/Rockchip SoC support),
|
||||
linux-kernel@vger.kernel.org (open list),
|
||||
Aurelien Jarno <aurelien@aurel32.net>
|
||||
Subject: [PATCH v1 2/3] hwrng: add Rockchip SoC hwrng driver
|
||||
Date: Sat, 12 Nov 2022 15:10:58 +0100
|
||||
Message-Id: <20221112141059.3802506-3-aurelien@aurel32.net>
|
||||
In-Reply-To: <20221112141059.3802506-1-aurelien@aurel32.net>
|
||||
References: <20221112141059.3802506-1-aurelien@aurel32.net>
|
||||
MIME-Version: 1.0
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
|
||||
Rockchip SoCs used to have a random number generator as part of their
|
||||
crypto device, and support for it has to be added to the corresponding
|
||||
driver. However newer Rockchip SoCs like the RK356x have an independent
|
||||
True Random Number Generator device. This patch adds a driver for it,
|
||||
greatly inspired from the downstream driver.
|
||||
|
||||
The TRNG device does not seem to have a signal conditionner and the FIPS
|
||||
140-2 test returns a lot of failures. They can be reduced by increasing
|
||||
RK_RNG_SAMPLE_CNT, in a tradeoff between quality and speed. This value
|
||||
has been adjusted to get ~90% of successes and the quality value has
|
||||
been set accordingly.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
---
|
||||
drivers/char/hw_random/Kconfig | 14 ++
|
||||
drivers/char/hw_random/Makefile | 1 +
|
||||
drivers/char/hw_random/rockchip-rng.c | 251 ++++++++++++++++++++++++++
|
||||
3 files changed, 266 insertions(+)
|
||||
create mode 100644 drivers/char/hw_random/rockchip-rng.c
|
||||
|
||||
--- a/drivers/char/hw_random/Kconfig
|
||||
+++ b/drivers/char/hw_random/Kconfig
|
||||
@@ -573,6 +573,20 @@ config HW_RANDOM_JH7110
|
||||
To compile this driver as a module, choose M here.
|
||||
The module will be called jh7110-trng.
|
||||
|
||||
+config HW_RANDOM_ROCKCHIP
|
||||
+ tristate "Rockchip True Random Number Generator"
|
||||
+ depends on HW_RANDOM && (ARCH_ROCKCHIP || COMPILE_TEST)
|
||||
+ depends on HAS_IOMEM
|
||||
+ default HW_RANDOM
|
||||
+ help
|
||||
+ This driver provides kernel-side support for the True Random Number
|
||||
+ Generator hardware found on some Rockchip SoC like RK3566 or RK3568.
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the
|
||||
+ module will be called rockchip-rng.
|
||||
+
|
||||
+ If unsure, say Y.
|
||||
+
|
||||
endif # HW_RANDOM
|
||||
|
||||
config UML_RANDOM
|
||||
--- a/drivers/char/hw_random/Makefile
|
||||
+++ b/drivers/char/hw_random/Makefile
|
||||
@@ -48,4 +48,5 @@ obj-$(CONFIG_HW_RANDOM_XIPHERA) += xiphe
|
||||
obj-$(CONFIG_HW_RANDOM_ARM_SMCCC_TRNG) += arm_smccc_trng.o
|
||||
obj-$(CONFIG_HW_RANDOM_CN10K) += cn10k-rng.o
|
||||
obj-$(CONFIG_HW_RANDOM_POLARFIRE_SOC) += mpfs-rng.o
|
||||
+obj-$(CONFIG_HW_RANDOM_ROCKCHIP) += rockchip-rng.o
|
||||
obj-$(CONFIG_HW_RANDOM_JH7110) += jh7110-trng.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/hw_random/rockchip-rng.c
|
||||
@@ -0,0 +1,251 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * rockchip-rng.c True Random Number Generator driver for Rockchip SoCs
|
||||
+ *
|
||||
+ * Copyright (c) 2018, Fuzhou Rockchip Electronics Co., Ltd.
|
||||
+ * Copyright (c) 2022, Aurelien Jarno
|
||||
+ * Authors:
|
||||
+ * Lin Jinhan <troy.lin@rock-chips.com>
|
||||
+ * Aurelien Jarno <aurelien@aurel32.net>
|
||||
+ */
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/hw_random.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/iopoll.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of_platform.h>
|
||||
+#include <linux/pm_runtime.h>
|
||||
+#include <linux/reset.h>
|
||||
+#include <linux/slab.h>
|
||||
+
|
||||
+#define RK_RNG_AUTOSUSPEND_DELAY 100
|
||||
+#define RK_RNG_MAX_BYTE 32
|
||||
+#define RK_RNG_POLL_PERIOD_US 100
|
||||
+#define RK_RNG_POLL_TIMEOUT_US 10000
|
||||
+
|
||||
+/*
|
||||
+ * TRNG collects osc ring output bit every RK_RNG_SAMPLE_CNT time. The value is
|
||||
+ * a tradeoff between speed and quality and has been adjusted to get a quality
|
||||
+ * of ~900 (~90% of FIPS 140-2 successes).
|
||||
+ */
|
||||
+#define RK_RNG_SAMPLE_CNT 1000
|
||||
+
|
||||
+/* TRNG registers from RK3568 TRM-Part2, section 5.4.1 */
|
||||
+#define TRNG_RST_CTL 0x0004
|
||||
+#define TRNG_RNG_CTL 0x0400
|
||||
+#define TRNG_RNG_CTL_LEN_64_BIT (0x00 << 4)
|
||||
+#define TRNG_RNG_CTL_LEN_128_BIT (0x01 << 4)
|
||||
+#define TRNG_RNG_CTL_LEN_192_BIT (0x02 << 4)
|
||||
+#define TRNG_RNG_CTL_LEN_256_BIT (0x03 << 4)
|
||||
+#define TRNG_RNG_CTL_OSC_RING_SPEED_0 (0x00 << 2)
|
||||
+#define TRNG_RNG_CTL_OSC_RING_SPEED_1 (0x01 << 2)
|
||||
+#define TRNG_RNG_CTL_OSC_RING_SPEED_2 (0x02 << 2)
|
||||
+#define TRNG_RNG_CTL_OSC_RING_SPEED_3 (0x03 << 2)
|
||||
+#define TRNG_RNG_CTL_ENABLE BIT(1)
|
||||
+#define TRNG_RNG_CTL_START BIT(0)
|
||||
+#define TRNG_RNG_SAMPLE_CNT 0x0404
|
||||
+#define TRNG_RNG_DOUT_0 0x0410
|
||||
+#define TRNG_RNG_DOUT_1 0x0414
|
||||
+#define TRNG_RNG_DOUT_2 0x0418
|
||||
+#define TRNG_RNG_DOUT_3 0x041c
|
||||
+#define TRNG_RNG_DOUT_4 0x0420
|
||||
+#define TRNG_RNG_DOUT_5 0x0424
|
||||
+#define TRNG_RNG_DOUT_6 0x0428
|
||||
+#define TRNG_RNG_DOUT_7 0x042c
|
||||
+
|
||||
+struct rk_rng {
|
||||
+ struct hwrng rng;
|
||||
+ void __iomem *base;
|
||||
+ struct reset_control *rst;
|
||||
+ int clk_num;
|
||||
+ struct clk_bulk_data *clk_bulks;
|
||||
+};
|
||||
+
|
||||
+/* The mask determine the bits that are updated */
|
||||
+static void rk_rng_write_ctl(struct rk_rng *rng, u32 val, u32 mask)
|
||||
+{
|
||||
+ writel_relaxed((mask << 16) | val, rng->base + TRNG_RNG_CTL);
|
||||
+}
|
||||
+
|
||||
+static int rk_rng_init(struct hwrng *rng)
|
||||
+{
|
||||
+ struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng);
|
||||
+ u32 reg;
|
||||
+ int ret;
|
||||
+
|
||||
+ /* start clocks */
|
||||
+ ret = clk_bulk_prepare_enable(rk_rng->clk_num, rk_rng->clk_bulks);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err((struct device *) rk_rng->rng.priv,
|
||||
+ "Failed to enable clks %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* set the sample period */
|
||||
+ writel(RK_RNG_SAMPLE_CNT, rk_rng->base + TRNG_RNG_SAMPLE_CNT);
|
||||
+
|
||||
+ /* set osc ring speed and enable it */
|
||||
+ reg = TRNG_RNG_CTL_LEN_256_BIT |
|
||||
+ TRNG_RNG_CTL_OSC_RING_SPEED_0 |
|
||||
+ TRNG_RNG_CTL_ENABLE;
|
||||
+ rk_rng_write_ctl(rk_rng, reg, 0xffff);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void rk_rng_cleanup(struct hwrng *rng)
|
||||
+{
|
||||
+ struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng);
|
||||
+ u32 reg;
|
||||
+
|
||||
+ /* stop TRNG */
|
||||
+ reg = 0;
|
||||
+ rk_rng_write_ctl(rk_rng, reg, 0xffff);
|
||||
+
|
||||
+ /* stop clocks */
|
||||
+ clk_bulk_disable_unprepare(rk_rng->clk_num, rk_rng->clk_bulks);
|
||||
+}
|
||||
+
|
||||
+static int rk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
|
||||
+{
|
||||
+ struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng);
|
||||
+ u32 reg;
|
||||
+ int ret = 0;
|
||||
+ int i;
|
||||
+
|
||||
+ pm_runtime_get_sync((struct device *) rk_rng->rng.priv);
|
||||
+
|
||||
+ /* Start collecting random data */
|
||||
+ reg = TRNG_RNG_CTL_START;
|
||||
+ rk_rng_write_ctl(rk_rng, reg, reg);
|
||||
+
|
||||
+ ret = readl_poll_timeout(rk_rng->base + TRNG_RNG_CTL, reg,
|
||||
+ !(reg & TRNG_RNG_CTL_START),
|
||||
+ RK_RNG_POLL_PERIOD_US,
|
||||
+ RK_RNG_POLL_TIMEOUT_US);
|
||||
+ if (ret < 0)
|
||||
+ goto out;
|
||||
+
|
||||
+ /* Read random data stored in big endian in the registers */
|
||||
+ ret = min_t(size_t, max, RK_RNG_MAX_BYTE);
|
||||
+ for (i = 0; i < ret; i += 4) {
|
||||
+ reg = readl_relaxed(rk_rng->base + TRNG_RNG_DOUT_0 + i);
|
||||
+ *(u32 *)(buf + i) = be32_to_cpu(reg);
|
||||
+ }
|
||||
+
|
||||
+out:
|
||||
+ pm_runtime_mark_last_busy((struct device *) rk_rng->rng.priv);
|
||||
+ pm_runtime_put_sync_autosuspend((struct device *) rk_rng->rng.priv);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int rk_rng_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct rk_rng *rk_rng;
|
||||
+ int ret;
|
||||
+
|
||||
+ rk_rng = devm_kzalloc(dev, sizeof(struct rk_rng), GFP_KERNEL);
|
||||
+ if (!rk_rng)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ rk_rng->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
+ if (IS_ERR(rk_rng->base))
|
||||
+ return PTR_ERR(rk_rng->base);
|
||||
+
|
||||
+ rk_rng->clk_num = devm_clk_bulk_get_all(dev, &rk_rng->clk_bulks);
|
||||
+ if (rk_rng->clk_num < 0)
|
||||
+ return dev_err_probe(dev, rk_rng->clk_num,
|
||||
+ "Failed to get clks property\n");
|
||||
+
|
||||
+ rk_rng->rst = devm_reset_control_array_get(&pdev->dev, false, false);
|
||||
+ if (IS_ERR(rk_rng->rst))
|
||||
+ return dev_err_probe(dev, PTR_ERR(rk_rng->rst),
|
||||
+ "Failed to get reset property\n");
|
||||
+
|
||||
+ reset_control_assert(rk_rng->rst);
|
||||
+ udelay(2);
|
||||
+ reset_control_deassert(rk_rng->rst);
|
||||
+
|
||||
+ platform_set_drvdata(pdev, rk_rng);
|
||||
+
|
||||
+ rk_rng->rng.name = dev_driver_string(dev);
|
||||
+#ifndef CONFIG_PM
|
||||
+ rk_rng->rng.init = rk_rng_init;
|
||||
+ rk_rng->rng.cleanup = rk_rng_cleanup;
|
||||
+#endif
|
||||
+ rk_rng->rng.read = rk_rng_read;
|
||||
+ rk_rng->rng.priv = (unsigned long) dev;
|
||||
+ rk_rng->rng.quality = 900;
|
||||
+
|
||||
+ pm_runtime_set_autosuspend_delay(dev, RK_RNG_AUTOSUSPEND_DELAY);
|
||||
+ pm_runtime_use_autosuspend(dev);
|
||||
+ pm_runtime_enable(dev);
|
||||
+
|
||||
+ ret = devm_hwrng_register(dev, &rk_rng->rng);
|
||||
+ if (ret)
|
||||
+ return dev_err_probe(&pdev->dev, ret, "Failed to register Rockchip hwrng\n");
|
||||
+
|
||||
+ dev_info(&pdev->dev, "Registered Rockchip hwrng\n");
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int rk_rng_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ pm_runtime_disable(&pdev->dev);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_PM
|
||||
+static int rk_rng_runtime_suspend(struct device *dev)
|
||||
+{
|
||||
+ struct rk_rng *rk_rng = dev_get_drvdata(dev);
|
||||
+
|
||||
+ rk_rng_cleanup(&rk_rng->rng);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int rk_rng_runtime_resume(struct device *dev)
|
||||
+{
|
||||
+ struct rk_rng *rk_rng = dev_get_drvdata(dev);
|
||||
+
|
||||
+ return rk_rng_init(&rk_rng->rng);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+static const struct dev_pm_ops rk_rng_pm_ops = {
|
||||
+ SET_RUNTIME_PM_OPS(rk_rng_runtime_suspend,
|
||||
+ rk_rng_runtime_resume, NULL)
|
||||
+ SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
+ pm_runtime_force_resume)
|
||||
+};
|
||||
+
|
||||
+static const struct of_device_id rk_rng_dt_match[] = {
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk3568-rng",
|
||||
+ },
|
||||
+ {},
|
||||
+};
|
||||
+
|
||||
+MODULE_DEVICE_TABLE(of, rk_rng_dt_match);
|
||||
+
|
||||
+static struct platform_driver rk_rng_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "rockchip-rng",
|
||||
+ .pm = &rk_rng_pm_ops,
|
||||
+ .of_match_table = rk_rng_dt_match,
|
||||
+ },
|
||||
+ .probe = rk_rng_probe,
|
||||
+ .remove = rk_rng_remove,
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(rk_rng_driver);
|
||||
+
|
||||
+MODULE_DESCRIPTION("Rockchip True Random Number Generator driver");
|
||||
+MODULE_AUTHOR("Lin Jinhan <troy.lin@rock-chips.com>, Aurelien Jarno <aurelien@aurel32.net>");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
@@ -0,0 +1,56 @@
|
||||
From patchwork Sat Nov 12 14:10:59 2022
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Aurelien Jarno <aurelien@aurel32.net>
|
||||
X-Patchwork-Id: 13041221
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
To: Olivia Mackall <olivia@selenic.com>,
|
||||
Herbert Xu <herbert@gondor.apana.org.au>,
|
||||
Rob Herring <robh+dt@kernel.org>,
|
||||
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
|
||||
Heiko Stuebner <heiko@sntech.de>,
|
||||
Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
Lin Jinhan <troy.lin@rock-chips.com>
|
||||
Cc: linux-crypto@vger.kernel.org (open list:HARDWARE RANDOM NUMBER GENERATOR
|
||||
CORE),
|
||||
devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE
|
||||
BINDINGS),
|
||||
linux-arm-kernel@lists.infradead.org (moderated list:ARM/Rockchip SoC
|
||||
support),
|
||||
linux-rockchip@lists.infradead.org (open list:ARM/Rockchip SoC support),
|
||||
linux-kernel@vger.kernel.org (open list),
|
||||
Aurelien Jarno <aurelien@aurel32.net>
|
||||
Subject: [PATCH v1 3/3] arm64: dts: rockchip: add DT entry for RNG to RK356x
|
||||
Date: Sat, 12 Nov 2022 15:10:59 +0100
|
||||
Message-Id: <20221112141059.3802506-4-aurelien@aurel32.net>
|
||||
In-Reply-To: <20221112141059.3802506-1-aurelien@aurel32.net>
|
||||
References: <20221112141059.3802506-1-aurelien@aurel32.net>
|
||||
MIME-Version: 1.0
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
|
||||
Enable the just added Rockchip RNG driver for RK356x SoCs.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
@@ -1848,6 +1848,15 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ rng: rng@fe388000 {
|
||||
+ compatible = "rockchip,rk3568-rng";
|
||||
+ reg = <0x0 0xfe388000 0x0 0x4000>;
|
||||
+ clocks = <&cru CLK_TRNG_NS>, <&cru HCLK_TRNG_NS>;
|
||||
+ clock-names = "trng_clk", "trng_hclk";
|
||||
+ resets = <&cru SRST_TRNG_NS>;
|
||||
+ reset-names = "reset";
|
||||
+ };
|
||||
+
|
||||
pinctrl: pinctrl {
|
||||
compatible = "rockchip,rk3568-pinctrl";
|
||||
rockchip,grf = <&grf>;
|
||||
Reference in New Issue
Block a user