ARM: dts: aspeed: Add gpio keys for power supply presence, ucd alert
Subsystems (2)
PATCH 1/1 ARM: dts: aspeed: Add gpio keys for power supply presence, ucd alert
Add GPIO keys for power supply 0 and 1 presence as well as ucd alert to the device tree.
--- arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +18 -0
@@ -42,6 +42,24 @@ gpios = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>; linux,code = <ASPEED_GPIO(J, 2)>; }; + + ps0-presence { + label = "ps0-presence"; + gpios = <&gpio ASPEED_GPIO(P, 7) GPIO_ACTIVE_LOW>; + linux,code = <ASPEED_GPIO(P, 7)>; + }; + + ps1-presence { + label = "ps1-presence"; + gpios = <&gpio ASPEED_GPIO(N, 0) GPIO_ACTIVE_LOW>; + linux,code = <ASPEED_GPIO(N, 0)>; + }; + + ucd-alert { + label = "ucd-alert"; + gpios = <&gpio ASPEED_GPIO(I, 2) GPIO_ACTIVE_LOW>; + linux,code = <ASPEED_GPIO(I, 2)>; + }; }; leds {
Signature · 1 line
1.8.2.2
Joel Stanley
maintainerQuoted 18 lines · Christopher Bostic
Add GPIO keys for power supply 0 and 1 presence as well as ucd alert to the device tree.
Signed-off-by Christopher Bostic <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +2
-0@@ -42,6 +42,24 @@ gpios = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>; linux,code = <ASPEED_GPIO(J, 2)>; }; + + ps0-presence {
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 56
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +10
-0+ label = "ps0-presence"; + gpios = <&gpio ASPEED_GPIO(P, 7) GPIO_ACTIVE_LOW>; + linux,code = <ASPEED_GPIO(P, 7)>; + }; + + ps1-presence { + label = "ps1-presence"; + gpios = <&gpio ASPEED_GPIO(N, 0) GPIO_ACTIVE_LOW>; + linux,code = <ASPEED_GPIO(N, 0)>; + };
Chris, these two look fine. I applied these two and fixed the commit message to not mention the UCD.
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 62
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +6
-0+ + ucd-alert { + label = "ucd-alert"; + gpios = <&gpio ASPEED_GPIO(I, 2) GPIO_ACTIVE_LOW>; + linux,code = <ASPEED_GPIO(I, 2)>; + };
Andrew, are we sure this should be exposed to userspace? Is it something that should be hooked up to the SMBus driver instead?
Cheers,
Joel
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +0
-1}; leds { --1.8.2.2
Quoted 41 lines · Joel Stanley
On Fri, Jul 14, 2017 at 5:06 AM, Christopher Bostic
Quoted 19 lines
<[email protected]> wrote:
Add GPIO keys for power supply 0 and 1 presence as well as ucd alert to the device tree.Quoted 1 line
Quoted 1 line
Signed-off-by Christopher Bostic <[email protected]>---
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 18 ++++++++++++++++++1 file changed, 18 insertions(+)arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +2
-0@@ -42,6 +42,24 @@ gpios = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>; linux,code = <ASPEED_GPIO(J, 2)>; }; + + ps0-presence {arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 56
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +10
-0+ label = "ps0-presence"; + gpios = <&gpio ASPEED_GPIO(P, 7) GPIO_ACTIVE_LOW>; + linux,code = <ASPEED_GPIO(P, 7)>; + }; + + ps1-presence { + label = "ps1-presence"; + gpios = <&gpio ASPEED_GPIO(N, 0) GPIO_ACTIVE_LOW>; + linux,code = <ASPEED_GPIO(N, 0)>; + };Chris, these two look fine. I applied these two and fixed the commit message to not mention the UCD.
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 62
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +6
-0+ + ucd-alert { + label = "ucd-alert"; + gpios = <&gpio ASPEED_GPIO(I, 2) GPIO_ACTIVE_LOW>; + linux,code = <ASPEED_GPIO(I, 2)>; + };
Quoted 2 lines
Andrew, are we sure this should be exposed to userspace? Is it something that should be hooked up to the SMBus driver instead?
I've looked at the relevant schematics and datasheets, and the GPIO of interest (I2) appears to be correct for the UCD alert. However, GPIOI2 is *not* capable of being muxed as an SMBus Alert (SALT) line and therefore the alert will not be propagated to the I2C master. It appears we must handle it in userspace. Configuring it as GPIO key will give us an interrupt.
Hope that helps.
Andrew
Quoted 11 lines
Cheers,
Joel
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +0
-1}; leds { --1.8.2.2
Joel Stanley
maintainerQuoted 10 lines · Andrew Jeffery
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 62
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +6
-0+ + ucd-alert { + label = "ucd-alert"; + gpios = <&gpio ASPEED_GPIO(I, 2) GPIO_ACTIVE_LOW>; + linux,code = <ASPEED_GPIO(I, 2)>; + };Andrew, are we sure this should be exposed to userspace? Is it something that should be hooked up to the SMBus driver instead?
Quoted 6 lines
I've looked at the relevant schematics and datasheets, and the GPIO of interest (I2) appears to be correct for the UCD alert. However, GPIOI2 is *not* capable of being muxed as an SMBus Alert (SALT) line and therefore the alert will not be propagated to the I2C master. It appears we must handle it in userspace. Configuring it as GPIO key will give us an interrupt.
We discussed this today, and decided that we would look in to hooking the GPIO up to the ucd driver. From there it will initiate the reading of the fault registers, and allow the implementation of a poll() response on the fault files in sysfs.
Cheers,
Joel
Quoted 15 lines · Joel Stanley
Quoted 6 lines · Andrew Jeffery
Quoted 6 lines
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +6
-0+ + ucd-alert { + label = "ucd-alert"; + gpios = <&gpio ASPEED_GPIO(I, 2) GPIO_ACTIVE_LOW>; + linux,code = <ASPEED_GPIO(I, 2)>; + };Quoted 8 lines
Quoted 2 lines
Andrew, are we sure this should be exposed to userspace? Is it something that should be hooked up to the SMBus driver instead?
I've looked at the relevant schematics and datasheets, and the GPIO of interest (I2) appears to be correct for the UCD alert. However, GPIOI2 is *not* capable of being muxed as an SMBus Alert (SALT) line and therefore the alert will not be propagated to the I2C master. It appears we must handle it in userspace. Configuring it as GPIO key will give us an interrupt.
Quoted 4 lines
We discussed this today, and decided that we would look in to hooking the GPIO up to the ucd driver. From there it will initiate the reading of the fault registers, and allow the implementation of a
poll()response on the fault files in sysfs.
How does this affect the userspace side of things? I am planning on giving up support of doing UCD fault analysis based on interrupts because there are 6 GPUs wired to a single STATUS_WORD bit, so after one faults we'd just keep getting called back again since there's no way to mask at the GPU level, assuming we can even get the interrupt to retrigger again at all.
Quoted 4 lines
Cheers,
Joel
Joel Stanley
maintainerQuoted 23 lines · Matt Spinler
Quoted 21 lines · Joel Stanley
Quoted 18 lines · Andrew Jeffery
Quoted 11 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 62
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +4
-0+ + ucd-alert { + label = "ucd-alert"; + gpios = <&gpio ASPEED_GPIO(I, 2)
GPIO_ACTIVE_LOW>;arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +2
-0+ linux,code = <ASPEED_GPIO(I, 2)>; + };Andrew, are we sure this should be exposed to userspace? Is it something that should be hooked up to the SMBus driver instead?
I've looked at the relevant schematics and datasheets, and the GPIO of interest (I2) appears to be correct for the UCD alert. However, GPIOI2 is *not* capable of being muxed as an SMBus Alert (SALT) line and therefore the alert will not be propagated to the I2C master. It appears we must handle it in userspace. Configuring it as GPIO key will give us an interrupt.
Quoted 6 lines
Quoted 4 lines
We discussed this today, and decided that we would look in to hooking the GPIO up to the ucd driver. From there it will initiate the reading of the fault registers, and allow the implementation of a
poll()response on the fault files in sysfs.How does this affect the userspace side of things?
This relates to the pmbus spec's status and error handling. I don't think it would affect the way you interpret the status data in userspace, however I haven't seen the design for what you propose so you would be in a better position to answer that question than me.
Cheers,
Joel
Quoted 15 lines
I am planning on giving
up support of
doing UCD fault analysis based on interrupts because there are 6 GPUs wired to a singleSTATUS_WORD
bit, so after one faults we'd just keep getting called back again since there's no way to mask at the GPU level,
assuming we can even get the interrupt to retrigger again at all.Quoted 4 lines
Cheers,
Joel