Fw: [PATCH] aspeed-bmc-opp-palmetto: Add GPIO hogs to devicetree
Joel Stanley
joel at jms.id.au
Mon Nov 21 17:05:54 AEDT 2016
On Mon, Nov 21, 2016 at 4:17 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.
Yeah no way.
It did motivate me to take a look at the gpio-management daemon that I
think we need to solve this problem.
Cheers,
Joel
>> 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.
>
> 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