[PATCH linux dev-4.10] ARM: dts: aspeed: Add gpio keys for power supply presence, ucd alert

Andrew Jeffery andrew at aj.id.au
Thu Jul 20 12:01:49 AEST 2017


On Wed, 2017-07-19 at 19:11 +0930, Joel Stanley wrote:
> On Fri, Jul 14, 2017 at 5:06 AM, Christopher Bostic
> > <cbostic at linux.vnet.ibm.com> wrote:
> > Add GPIO keys for power supply 0 and 1 presence as well as ucd alert
> > to the device tree.
> > 
> > > > Signed-off-by: Christopher Bostic <cbostic at linux.vnet.ibm.com>
> > ---
> >  arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> > index 76a5b28..34c5dfc 100644
> > --- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> > +++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> > @@ -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)>;
> > +               };
> 
> Chris, these two look fine. I applied these two and fixed the commit
> message to not mention the UCD.
> 
> > +
> > +               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?

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

> 
> Cheers,
> 
> Joel
> 
> >         };
> > 
> >         leds {
> > --
> > 1.8.2.2
> > 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20170720/14ff472b/attachment.sig>


More information about the openbmc mailing list