ARM: dts: aspeed: witherspoon: Add gpio line names
Subsystems (3)
PATCH v3 1/1 ARM: dts: aspeed: witherspoon: Add gpio line names
From: Andrew Geissler <[email protected]>
Name the GPIOs to help userspace work with them. The names describe the functionality the lines provide, not the net or ball name. This makes it easier to share userspace code across different systems and makes the use of the lines more obvious.
---
v3: added more detail to commit message
removed linux dev-5.4 from PATCH header
removed redundant status from gpio
removed blank line
v2: added upstream to patch
prepended fsi- on fsi related gpios
prepended led- on led related gpios
prepended presence on presence related gpios
dropped pin_gpio_a1 definition
--- .../boot/dts/aspeed-bmc-opp-witherspoon.dts | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +34 -0
@@ -193,6 +193,40 @@ }; +&gpio { + gpio-line-names = + /*A0-A7*/ "","cfam-reset","","","","","fsi-mux","", + /*B0-B7*/ "","","","","","air-water","","", + /*C0-C7*/ "","","","","","","","", + /*D0-D7*/ "fsi-enable","","","","","","","", + /*E0-E7*/ "fsi-data","","","","","","","", + /*F0-F7*/ "","","","","","","","", + /*G0-G7*/ "","","","","","","","", + /*H0-H7*/ "","","","","","","","", + /*I0-I7*/ "","","","","","","","", + /*J0-J7*/ "","","checkstop","","","","","", + /*K0-K7*/ "","","","","","","","", + /*L0-L7*/ "","","","","","","","", + /*M0-M7*/ "","","","","","","","", + /*N0-N7*/ "presence-ps1","","led-rear-fault","led-rear-power", + "led-rear-id","","","", + /*O0-O7*/ "","","","","","","","", + /*P0-P7*/ "","","","","","","","presence-ps0", + /*Q0-Q7*/ "","","","","","","","", + /*R0-R7*/ "","","fsi-trans","","","power-button","","", + /*S0-S7*/ "","","","","","","","", + /*T0-T7*/ "","","","","","","","", + /*U0-U7*/ "","","","","","","","", + /*V0-V7*/ "","","","","","","","", + /*W0-W7*/ "","","","","","","","", + /*X0-X7*/ "","","","","","","","", + /*Y0-Y7*/ "","","","","","","","", + /*Z0-Z7*/ "","","","","","","","", + /*AA0-AA7*/ "fsi-clock","","","","","","","", + /*AB0-AB7*/ "","","","","","","","", + /*AC0-AC7*/ "","","","","","","",""; +}; + &fmc { status = "okay";
Signature · 1 line
2.21.0 (Apple Git-122)
Quoted 9 lines · Andrew Geissler
From: Andrew Geissler <[email protected]>
Name the GPIOs to help userspace work with them. The names describe the functionality the lines provide, not the net or ball name. This makes it easier to share userspace code across different systems and makes the use of the lines more obvious.
Signed-off-by Andrew Geissler <[email protected]>
I will wait for Andrew before merging, but this looks good to me.
Quoted 62 lines
---
v3: added more detail to commit message
removed linux dev-5.4 from PATCH header
removed redundant status from gpio
removed blank line
v2: added upstream to patch
prepended fsi- on fsi related gpios
prepended led- on led related gpios
prepended presence on presence related gpios
droppedpin_gpio_a1definition--- .../boot/dts/aspeed-bmc-opp-witherspoon.dts | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+)arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +34
-1@@ -193,6 +193,40 @@ }; +&gpio { + gpio-line-names = + /*A0-A7*/ "","cfam-reset","","","","","fsi-mux","", + /*B0-B7*/ "","","","","","air-water","","", + /*C0-C7*/ "","","","","","","","", + /*D0-D7*/ "fsi-enable","","","","","","","", + /*E0-E7*/ "fsi-data","","","","","","","", + /*F0-F7*/ "","","","","","","","", + /*G0-G7*/ "","","","","","","","", + /*H0-H7*/ "","","","","","","","", + /*I0-I7*/ "","","","","","","","", + /*J0-J7*/ "","","checkstop","","","","","", + /*K0-K7*/ "","","","","","","","", + /*L0-L7*/ "","","","","","","","", + /*M0-M7*/ "","","","","","","","", + /*N0-N7*/ "presence-ps1","","led-rear-fault","led-rear-power", + "led-rear-id","","","", + /*O0-O7*/ "","","","","","","","", + /*P0-P7*/ "","","","","","","","presence-ps0", + /*Q0-Q7*/ "","","","","","","","", + /*R0-R7*/ "","","fsi-trans","","","power-button","","", + /*S0-S7*/ "","","","","","","","", + /*T0-T7*/ "","","","","","","","", + /*U0-U7*/ "","","","","","","","", + /*V0-V7*/ "","","","","","","","", + /*W0-W7*/ "","","","","","","","", + /*X0-X7*/ "","","","","","","","", + /*Y0-Y7*/ "","","","","","","","", + /*Z0-Z7*/ "","","","","","","","", + /*AA0-AA7*/ "fsi-clock","","","","","","","", + /*AB0-AB7*/ "","","","","","","","", + /*AC0-AC7*/ "","","","","","","",""; +}; + &fmc { status = "okay"; --2.21.0 (Apple Git-122)
Andrew Jeffery
Acked-byQuoted 9 lines · Joel Stanley
Quoted 8 lines · Andrew Geissler
From: Andrew Geissler <[email protected]>
Name the GPIOs to help userspace work with them. The names describe the functionality the lines provide, not the net or ball name. This makes it easier to share userspace code across different systems and makes the use of the lines more obvious.
Quoted 5 lines
Quoted 1 line
Signed-off-by Andrew Geissler <[email protected]>Reviewed-by Joel Stanley <[email protected]>I will wait for Andrew before merging, but this looks good to me.
To the best of my knowledge this is the only supported approach.
I haven't checked the mapping of gpio lines to functions, but for the concept:
Andrew