[U-Boot] [PATCH v3 4/4] x86: minnowmax: initialize the pin-muxing from device tree

Andy Pont andy.pont at sdcsystems.com
Tue May 26 10:01:44 CEST 2015


Hi Gabriel,

> 
>          soc_gpio_s5_0 at 0 {
>              gpio-offset = <0x80 0>;
>              pad-offset = <0x1d0>;
>              mode-gpio;
>              output-value = <0>;
>              direction = <PIN_OUTPUT>;
>          };
> 
>          soc_gpio_s5_1 at 0 {
>              gpio-offset = <0x80 1>;
>              pad-offset = <0x210>;
>              mode-gpio;
>              output-value = <0>;
>              direction = <PIN_OUTPUT>;
>          };
> 
>          soc_gpio_s5_2 at 0 {
>              gpio-offset = <0x80 2>;
>              pad-offset = <0x1e0>;
>              mode-gpio;
>              output-value = <0>;
>              direction = <PIN_OUTPUT>;
>          };
> 
> And after, you can use the GPIO commands:
> 
> => gpio set E0
> gpio: pin E0 (gpio 128) value is 1
> => gpio clear E0
> gpio: pin E0 (gpio 128) value is 0
> => gpio set E2
> gpio: pin E2 (gpio 130) value is 1
> => gpio clear E2
> gpio: pin E2 (gpio 130) value is 0
> 
> E0 E1 and E2 correspond to the GPIO0 1 and 2.

Is there, or can someone add, some documentation somewhere as to how to
convert between the device tree definition and the value used for "pin" in
the gpio commands as it doesn't seem intuitive or obvious to me that what
you have defined translates to E0, E1 and E2.

Thanks,

Andy.



More information about the U-Boot mailing list