4c5107ab35fbfb1b5e7201f25f9c10e42fca6d2a
[openwrt/openwrt.git] /
1 From f7c742cbe664ebdedc075945e75443683d1175f7 Mon Sep 17 00:00:00 2001
2 From: Trevor Woerner <twoerner@gmail.com>
3 Date: Wed, 19 Jun 2024 21:32:49 -0400
4 Subject: [PATCH] arm64: dts: rockchip: add gpio-line-names to radxa-zero-3
5
6 Add names to the pins of the general-purpose expansion header as given
7 in the Radxa documentation[1] following the conventions in the kernel[2]
8 to make it easier for users to correlate pins with functions when using
9 utilities such as 'gpioinfo'.
10
11 [1] https://docs.radxa.com/en/zero/zero3/hardware-design/hardware-interface
12 [2] https://www.kernel.org/doc/Documentation/devicetree/bindings/gpio/gpio.txt
13
14 Signed-off-by: Trevor Woerner <twoerner@gmail.com>
15 Link: https://lore.kernel.org/r/20240620013301.33653-1-twoerner@gmail.com
16 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
17 ---
18 .../dts/rockchip/rk3566-radxa-zero-3.dtsi | 72 +++++++++++++++++++
19 1 file changed, 72 insertions(+)
20
21 --- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi
22 +++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi
23 @@ -105,6 +105,78 @@
24 cpu-supply = <&vdd_cpu>;
25 };
26
27 +&gpio0 {
28 + gpio-line-names =
29 + /* GPIO0_A0 - A7 */
30 + "", "", "", "", "", "", "", "",
31 + /* GPIO0_B0 - B7 */
32 + "", "", "", "", "", "", "", "",
33 + /* GPIO0_C0 - C7 */
34 + "", "", "", "", "", "", "", "",
35 + /* GPIO0_D0 - D7 */
36 + "pin-10 [GPIO0_D0]", "pin-08 [GPIO0_D1]", "",
37 + "", "", "", "", "";
38 +};
39 +
40 +&gpio1 {
41 + gpio-line-names =
42 + /* GPIO1_A0 - A7 */
43 + "pin-03 [GPIO1_A0]", "pin-05 [GPIO1_A1]", "",
44 + "", "pin-37 [GPIO1_A4]", "",
45 + "", "",
46 + /* GPIO1_B0 - B7 */
47 + "", "", "", "", "", "", "", "",
48 + /* GPIO1_C0 - C7 */
49 + "", "", "", "", "", "", "", "",
50 + /* GPIO1_D0 - D7 */
51 + "", "", "", "", "", "", "", "";
52 +};
53 +
54 +&gpio2 {
55 + gpio-line-names =
56 + /* GPIO2_A0 - A7 */
57 + "", "", "", "", "", "", "", "",
58 + /* GPIO2_B0 - B7 */
59 + "", "", "", "", "", "", "", "",
60 + /* GPIO2_C0 - C7 */
61 + "", "", "", "", "", "", "", "",
62 + /* GPIO2_D0 - D7 */
63 + "", "", "", "", "", "", "", "";
64 +};
65 +
66 +&gpio3 {
67 + gpio-line-names =
68 + /* GPIO3_A0 - A7 */
69 + "", "pin-11 [GPIO3_A1]", "pin-13 [GPIO3_A2]",
70 + "pin-12 [GPIO3_A3]", "pin-35 [GPIO3_A4]", "pin-40 [GPIO3_A5]",
71 + "pin-38 [GPIO3_A6]", "pin-36 [GPIO3_A7]",
72 + /* GPIO3_B0 - B7 */
73 + "pin-15 [GPIO3_B0]", "pin-16 [GPIO3_B1]", "pin-18 [GPIO3_B2]",
74 + "pin-29 [GPIO3_B3]", "pin-31 [GPIO3_B4]", "",
75 + "", "",
76 + /* GPIO3_C0 - C7 */
77 + "", "pin-22 [GPIO3_C1]", "pin-32 [GPIO3_C2]",
78 + "pin-33 [GPIO3_C3]", "pin-07 [GPIO3_C4]", "",
79 + "", "",
80 + /* GPIO3_D0 - D7 */
81 + "", "", "", "", "", "", "", "";
82 +};
83 +
84 +&gpio4 {
85 + gpio-line-names =
86 + /* GPIO4_A0 - A7 */
87 + "", "", "", "", "", "", "", "",
88 + /* GPIO4_B0 - B7 */
89 + "", "", "pin-27 [GPIO4_B2]",
90 + "pin-28 [GPIO4_B3]", "", "", "", "",
91 + /* GPIO4_C0 - C7 */
92 + "", "", "pin-23 [GPIO4_C2]",
93 + "pin-19 [GPIO4_C3]", "", "pin-21 [GPIO4_C5]",
94 + "pin-24 [GPIO4_C6]", "",
95 + /* GPIO4_D0 - D7 */
96 + "", "", "", "", "", "", "", "";
97 +};
98 +
99 &gpu {
100 mali-supply = <&vdd_gpu_npu>;
101 status = "okay";