ARM: dts: aspeed: witherspoon: Add gpio line names
Subsystems (2)
PATCH 1/1 ARM: dts: aspeed: witherspoon: Add gpio line names
From: Andrew Geissler <[email protected]>
Name the gpios so libgiod will work with them
--- .../boot/dts/aspeed-bmc-opp-witherspoon.dts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +41 -0
@@ -193,6 +193,47 @@ }; +&gpio { + status = "okay"; + gpio-line-names = + /*A0-A7*/ "","cfam-reset","","","","","mux","", + /*B0-B7*/ "","","","","","air-water","","", + /*C0-C7*/ "","","","","","","","", + /*D0-D7*/ "enable","","","","","","","", + /*E0-E7*/ "data","","","","","","","", + /*F0-F7*/ "","","","","","","","", + /*G0-G7*/ "","","","","","","","", + /*H0-H7*/ "","","","","","","","", + /*I0-I7*/ "","","","","","","","", + /*J0-J7*/ "","","checkstop","","","","","", + /*K0-K7*/ "","","","","","","","", + /*L0-L7*/ "","","","","","","","", + /*M0-M7*/ "","","","","","","","", + /*N0-N7*/ "ps1-presence","","rear-fault","rear-power","rear-id","","","", + /*O0-O7*/ "","","","","","","","", + /*P0-P7*/ "","","","","","","","ps0-presence", + /*Q0-Q7*/ "","","","","","","","", + /*R0-R7*/ "","","trans","","","power-button","","", + /*S0-S7*/ "","","","","","","","", + /*T0-T7*/ "","","","","","","","", + /*U0-U7*/ "","","","","","","","", + /*V0-V7*/ "","","","","","","","", + /*W0-W7*/ "","","","","","","","", + /*X0-X7*/ "","","","","","","","", + /*Y0-Y7*/ "","","","","","","","", + /*Z0-Z7*/ "","","","","","","","", + /*AA0-AA7*/ "clock","","","","","","","", + /*AB0-AB7*/ "","","","","","","","", + /*AC0-AC7*/ "","","","","","","",""; + + pin_gpio_a1 { + gpios = <ASPEED_GPIO(A, 1) GPIO_ACTIVE_HIGH>; + output-high; + line-name = "cfam-reset"; + }; + +}; + &fmc { status = "okay";
Signature · 1 line
2.21.0 (Apple Git-122)
Quoted 5 lines · Andrew Geissler
From: Andrew Geissler <[email protected]>
Name the gpios so libgiod will work with them
Signed-off-by Andrew Geissler <[email protected]>
Great! I love that you used logical names here rather than schematic names too, so that the userspace functionality is more likely to be common across machines. It'd be great if we could start to document a list of "commonly used logical GPIO names" (ex. power-button) to facilitate this sharing.
Quoted 4 lines
--- .../boot/dts/aspeed-bmc-opp-witherspoon.dts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+)
Signature · 1 line
Patrick Williams
Joel Stanley
maintainerQuoted 6 lines · Andrew Geissler
From: Andrew Geissler <[email protected]>
Name the gpios so libgiod will work with them
Signed-off-by Andrew Geissler <[email protected]>
Please send to the upstream lists for review. CC the GPIO maintainers too, so we can get their feedback.
Quoted 9 lines
--- .../boot/dts/aspeed-bmc-opp-witherspoon.dts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+)arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +0
-0
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 199
Quoted 7 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +4
-0@@ -193,6 +193,47 @@ }; +&gpio { + status = "okay"; + gpio-line-names = + /*A0-A7*/ "","cfam-reset","","","","","mux","",
fsi-mux
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 203
Quoted 4 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +4
-0+ /*B0-B7*/ "","","","","","air-water","","", + /*C0-C7*/ "","","","","","","","", + /*D0-D7*/ "enable","","","","","","","", + /*E0-E7*/ "data","","","","","","","",
fsi-enable, fsi-data.
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 212
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +9
-0+ /*F0-F7*/ "","","","","","","","", + /*G0-G7*/ "","","","","","","","", + /*H0-H7*/ "","","","","","","","", + /*I0-I7*/ "","","","","","","","", + /*J0-J7*/ "","","checkstop","","","","","", + /*K0-K7*/ "","","","","","","","", + /*L0-L7*/ "","","","","","","","", + /*M0-M7*/ "","","","","","","","", + /*N0-N7*/ "ps1-presence","","rear-fault","rear-power","rear-id","","","",
These last three are LEDs? perhaps we could adopt a convention where we call them led-<name>.
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 216
Quoted 4 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +4
-0+ /*O0-O7*/ "","","","","","","","", + /*P0-P7*/ "","","","","","","","ps0-presence", + /*Q0-Q7*/ "","","","","","","","", + /*R0-R7*/ "","","trans","","","power-button","","",
fsi-trans
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 225
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +9
-0+ /*S0-S7*/ "","","","","","","","", + /*T0-T7*/ "","","","","","","","", + /*U0-U7*/ "","","","","","","","", + /*V0-V7*/ "","","","","","","","", + /*W0-W7*/ "","","","","","","","", + /*X0-X7*/ "","","","","","","","", + /*Y0-Y7*/ "","","","","","","","", + /*Z0-Z7*/ "","","","","","","","", + /*AA0-AA7*/ "clock","","","","","","","",
fsi-clock
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 233
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +8
-0+ /*AB0-AB7*/ "","","","","","","","", + /*AC0-AC7*/ "","","","","","","",""; + + pin_gpio_a1 { + gpios = <ASPEED_GPIO(A, 1) GPIO_ACTIVE_HIGH>; + output-high; + line-name = "cfam-reset"; + };
It think you want to drop this part.
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +3
-1+ +}; + &fmc { status = "okay"; --2.21.0 (Apple Git-122)
You're building kernels on your mac? :D
Quoted 9 lines · Patrick Williams
Quoted 4 lines · Andrew Geissler
From: Andrew Geissler <[email protected]>
Name the gpios so libgiod will work with them
Quoted 7 lines
Quoted 1 line
Signed-off-by Andrew Geissler <[email protected]>Great! I love that you used logical names here rather than schematic names too, so that the userspace functionality is more likely to be common across machines. It'd be great if we could start to document a list of "commonly used logical GPIO names" (ex. power-button) to facilitate this sharing.
Yeah, I hadn’t really thought of that aspect but it’s a good point. Joel seemed to have some thoughts on improving conventions with naming in his review comments. I’ll address those and send upstream. If upstream seems ok with this direction then I can create a docs repo commit that documents the conventions.
Quoted 8 lines
Quoted 5 lines
---
.../boot/dts/aspeed-bmc-opp-witherspoon.dts| 41 +++++++++++++++++++1 file changed, 41 insertions(+)Signature · 1 line
Patrick Williams
Quoted 14 lines · Joel Stanley
Quoted 6 lines · On Tue, 4 Feb 2020 at 21:30, Andrew Geissler <[email protected]…
From: Andrew Geissler <[email protected] <mailto:[email protected]>>
Name the gpios so libgiod will work with them
Signed-off-by Andrew Geissler <[email protected] <mailto:[email protected]>>Please send to the upstream lists for review. CC the GPIO maintainers too, so we can get their feedback.
ack
Quoted 11 lines
Quoted 11 lines
---
.../boot/dts/aspeed-bmc-opp-witherspoon.dts| 41 +++++++++++++++++++1 file changed, 41 insertions(+)arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +0
-0@@ -193,6 +193,47 @@
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 199
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +4
-0}; +&gpio { + status = "okay"; + gpio-line-names = + /*A0-A7*/ "","cfam-reset","","","","","mux","",fsi-mux
ack
I’m wondering if I should also change the labels to match the names? For example gpioinfo will show this now:
line 6: "fsi-mux" "mux" output active-high [used]
Quoted 7 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 203
Quoted 5 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +4
-0+ /*B0-B7*/ "","","","","","air-water","","", + /*C0-C7*/ "","","","","","","","", + /*D0-D7*/ "enable","","","","","","","", + /*E0-E7*/ "data","","","","","","","",fsi-enable, fsi-data.
ack
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 212
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +9
-0+ /*F0-F7*/ "","","","","","","","", + /*G0-G7*/ "","","","","","","","", + /*H0-H7*/ "","","","","","","","", + /*I0-I7*/ "","","","","","","","", + /*J0-J7*/ "","","checkstop","","","","","", + /*K0-K7*/ "","","","","","","","", + /*L0-L7*/ "","","","","","","","", + /*M0-M7*/ "","","","","","","","", + /*N0-N7*/ "ps1-presence","","rear-fault","rear-power","rear-id","","","",
Quoted 2 lines
These last three are LEDs? perhaps we could adopt a convention where we call them led-<name>.
makes sense to me
along those same lines, I’m going to put “presence” first for those gpios
Quoted 7 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 216
Quoted 5 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +4
-0+ /*O0-O7*/ "","","","","","","","", + /*P0-P7*/ "","","","","","","","ps0-presence", + /*Q0-Q7*/ "","","","","","","","", + /*R0-R7*/ "","","trans","","","power-button","","",fsi-trans
ack
Quoted 11 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 225
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +9
-0+ /*S0-S7*/ "","","","","","","","", + /*T0-T7*/ "","","","","","","","", + /*U0-U7*/ "","","","","","","","", + /*V0-V7*/ "","","","","","","","", + /*W0-W7*/ "","","","","","","","", + /*X0-X7*/ "","","","","","","","", + /*Y0-Y7*/ "","","","","","","","", + /*Z0-Z7*/ "","","","","","","","", + /*AA0-AA7*/ "clock","","","","","","","",
Quoted 1 line
fsi-clock
ack
Quoted 11 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 233
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +8
-0+ /*AB0-AB7*/ "","","","","","","","", + /*AC0-AC7*/ "","","","","","","",""; + + pin_gpio_a1 { + gpios = <ASPEED_GPIO(A, 1) GPIO_ACTIVE_HIGH>; + output-high; + line-name = "cfam-reset"; + };It think you want to drop this part.
ok, my lack of understanding of what config is required for gpio’s in dts def shows here.
Quoted 11 lines
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +3
-1+ +}; + &fmc { status = "okay"; --2.21.0 (Apple Git-122)
You're building kernels on your mac? :D
Hah, yeah, writing the code on it at least