Skip to content

Commit

Permalink
add Radxa Zero GPIO names to support libgpiod (armbian#7563)
Browse files Browse the repository at this point in the history
  • Loading branch information
way5 authored Dec 11, 2024
1 parent fd02619 commit fb63c78
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
index c779a5da7d1e..cb1a167c117c 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
@@ -262,6 +262,32 @@ &frddr_c {
status = "okay";
};

+/*
+pin-8, pin-36 are mapped referring to: /include/dt-bindings/gpio/meson-g12a-gpio.h
+left as is for future tests
+*/
+/*CHIP0*/
+&gpio {
+ gpio-line-names =
+ /*00*/ "", "", "", "", "", "", "", "", "", "",
+ /*10*/ "", "", "", "", "", "", "", "", "", "",
+ /*20*/ "19 [GPIOH_4]", "21 [GPIOH_5]", "24 [GPIOH_6]", "23 [GPIOH_7]", "36 [GPIOH_8]", "", "", "", "", "",
+ /*30*/ "", "", "", "", "", "", "", "", "", "",
+ /*40*/ "", "", "", "", "", "", "", "", "22 [GPIOC_7]", "",
+ /*50*/ "", "", "", "", "", "", "", "", "", "",
+ /*60*/ "", "", "", "3 [GPIOA_14]", "", "", "", "", "", "",
+ /*70*/ "", "", "", "18 [GPIOX_8]", "12 [GPIOX_9]", "16 [GPIOX_10]", "13 [GPIOX_11]", "", "", "",
+ /*80*/ "", "", "", "", "";
+};
+
+/*CHIP1*/
+&gpio_ao {
+ gpio-line-names =
+ /*00*/ "8 [GPIOAO_0]", "10 [GPIOAO_1]", "11,28 [GPIOAO_2]", "7,27 [GPIOAO_3]", "32 [GPIOAO_4]",
+ /*05*/ "5 [GPIOA_15]", "", "", "35 [GPIOAO_8]", "37 [GPIOAO_9]",
+ /*10*/ "", "40 [GPIOAO_11]", "", "", "";
+};
+
&hdmi_tx {
status = "okay";
pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
index c779a5da7d1e..cb1a167c117c 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
@@ -262,6 +262,32 @@ &frddr_c {
status = "okay";
};

+/*
+pin-8, pin-36 are mapped referring to: /include/dt-bindings/gpio/meson-g12a-gpio.h
+left as is for future tests
+*/
+/*CHIP0*/
+&gpio {
+ gpio-line-names =
+ /*00*/ "", "", "", "", "", "", "", "", "", "",
+ /*10*/ "", "", "", "", "", "", "", "", "", "",
+ /*20*/ "19 [GPIOH_4]", "21 [GPIOH_5]", "24 [GPIOH_6]", "23 [GPIOH_7]", "36 [GPIOH_8]", "", "", "", "", "",
+ /*30*/ "", "", "", "", "", "", "", "", "", "",
+ /*40*/ "", "", "", "", "", "", "", "", "22 [GPIOC_7]", "",
+ /*50*/ "", "", "", "", "", "", "", "", "", "",
+ /*60*/ "", "", "", "3 [GPIOA_14]", "", "", "", "", "", "",
+ /*70*/ "", "", "", "18 [GPIOX_8]", "12 [GPIOX_9]", "16 [GPIOX_10]", "13 [GPIOX_11]", "", "", "",
+ /*80*/ "", "", "", "", "";
+};
+
+/*CHIP1*/
+&gpio_ao {
+ gpio-line-names =
+ /*00*/ "8 [GPIOAO_0]", "10 [GPIOAO_1]", "11,28 [GPIOAO_2]", "7,27 [GPIOAO_3]", "32 [GPIOAO_4]",
+ /*05*/ "5 [GPIOA_15]", "", "", "35 [GPIOAO_8]", "37 [GPIOAO_9]",
+ /*10*/ "", "40 [GPIOAO_11]", "", "", "";
+};
+
&hdmi_tx {
status = "okay";
pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;

0 comments on commit fb63c78

Please sign in to comment.