Fw: [PATCH] aspeed-bmc-opp-palmetto: Add GPIO hogs to devicetree

Christopher Bostic christopher.lee.bostic at gmail.com
Tue Nov 22 05:55:37 AEDT 2016


On Sun, Nov 20, 2016 at 11:47 PM, Andrew Jeffery <andrew at aj.id.au> wrote:
> Hi Chris,
>
>>
>> Hi Andrew,
>>
>> I notice Pin H6 is in your list assigned as a gpio-hog.   This is a
>> pin I use for the voltage direction control via the translator for
>> openFSI.  Not familiar with the history here but is that pin being
>> used for other purposes or is required to be flagged as a gpio-hog?
>
> Ultimately none of these should be hogged. This was just a brain-dead
> way to get the GPIOs in a state that can boot a Palmetto host. There
> was a time where several issues including wrong GPIO state prevented
> OpenBMC from booting a Palmetto host for a month or so, hence this
> patch.
>
> Happy to drop the H6 hog if we still boot okay. I'm still waiting for
> Joel to weigh in on whether he wants to take it.
>
>
>> Currently I'm attempting to grab a descriptor for this without that
>> requirement.
>
> Have you been testing on a Palmetto using an OpenBMC build? If so the
> request should still fail as the patch is applied in the OpenBMC kernel
> build. All I'm proposing here is we move it from OpenBMC into the
> Aspeed kernel tree.

Hi Andrew,

Yes I have been testing on Palmetto using OpenBMC builds.  The H6
pin reports as busy when I request it so for now I have a workaround
to bypass the gpio interface.  All the other pins I grab via the normal
dts gpio devm_gpio_get interfaces.   Once the H6 hog can be removed,
assuming no other code needs it, I can remove my workaround in
the OpenFSI code.

Thanks,
Chris

>
> Andrew
>
>>
>> Thanks,
>> Chris
>>
>>
>> > diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
>> > b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
>> > index 21619fd8cd8d..5c689613e5bd 100644
>> > --- a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
>> > +++ b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
>> > @@ -167,6 +167,133 @@
>> > output-low;
>> > line-name = "func_mode2";
>> > };
>> > +
>> > + pin_gpio_a0 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(A, 0) GPIO_ACTIVE_HIGH>;
>> > + input;
>> > + line-name = "A0";
>> > + };
>> > +
>> > + pin_gpio_a1 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(A, 1) GPIO_ACTIVE_HIGH>;
>> > + output-high;
>> > + line-name = "A1";
>> > + };
>> > +
>> > + pin_gpio_b1 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(B, 1) GPIO_ACTIVE_HIGH>;
>> > + output-high;
>> > + line-name = "B1";
>> > + };
>> > +
>> > + pin_gpio_b2 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(B, 2) GPIO_ACTIVE_HIGH>;
>> > + output-high;
>> > + line-name = "B2";
>> > + };
>> > +
>> > + pin_gpio_b7 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(B, 7) GPIO_ACTIVE_HIGH>;
>> > + output-high;
>> > + line-name = "B7";
>> > + };
>> > +
>> > + pin_gpio_d1 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(D, 1) GPIO_ACTIVE_HIGH>;
>> > + output-high;
>> > + line-name = "D1";
>> > + };
>> > +
>> > + pin_gpio_f1 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(F, 1) GPIO_ACTIVE_HIGH>;
>> > + input;
>> > + line-name = "F1";
>> > + };
>> > +
>> > + pin_gpio_f4 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(F, 4) GPIO_ACTIVE_HIGH>;
>> > + input;
>> > + line-name = "F4";
>> > + };
>> > +
>> > + pin_gpio_f5 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(F, 5) GPIO_ACTIVE_HIGH>;
>> > + input;
>> > + line-name = "F5";
>> > + };
>> > +
>> > + pin_gpio_f7 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(F, 7) GPIO_ACTIVE_HIGH>;
>> > + output-high;
>> > + line-name = "F7";
>> > + };
>> > +
>> > + pin_gpio_g3 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(G, 3) GPIO_ACTIVE_HIGH>;
>> > + output-high;
>> > + line-name = "G3";
>> > + };
>> > +
>> > + pin_gpio_g4 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(G, 4) GPIO_ACTIVE_HIGH>;
>> > + input;
>> > + line-name = "G4";
>> > + };
>> > +
>> > + pin_gpio_g5 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(G, 5) GPIO_ACTIVE_HIGH>;
>> > + input;
>> > + line-name = "G5";
>> > + };
>> > +
>> > + pin_gpio_h0 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(H, 0) GPIO_ACTIVE_HIGH>;
>> > + input;
>> > + line-name = "H0";
>> > + };
>> > +
>> > + pin_gpio_h1 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(H, 1) GPIO_ACTIVE_HIGH>;
>> > + input;
>> > + line-name = "H1";
>> > + };
>> > +
>> > + pin_gpio_h2 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
>> > + output-high;
>> > + line-name = "H2";
>> > + };
>> > +
>> > + pin_gpio_h6 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(H, 6) GPIO_ACTIVE_HIGH>;
>> > + output-high;
>> > + line-name = "H6";
>> > + };
>> > +
>> > + pin_gpio_h7 {
>> > + gpio-hog;
>> > + gpios = <ASPEED_GPIO(H, 7) GPIO_ACTIVE_HIGH>;
>> > + output-high;
>> > + line-name = "H7";
>> > + };
>> > +
>> > };
>> >
>> > &vuart {
>> > --
>> > 2.7.4
>> >
>> > _______________________________________________
>> > openbmc mailing list
>> > openbmc at lists.ozlabs.org
>> > https://lists.ozlabs.org/listinfo/openbmc
>> >
>> >
>>
>> _______________________________________________
>> openbmc mailing list
>> openbmc at lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/openbmc


More information about the openbmc mailing list