Hi Łukasz!

Am Montag, 12. Dezember 2016 13:07:31 UTC+1 schrieb Łukasz Taras:
>
> Hi all,
> I have an issue (my fault probably) where i would like to define default 
> states of GPIO ports. I have created my own cape based on univ-all where i 
> define two port's as follows:
>                         P8_03_default_pin: pinmux_P8_03_default_pin {
>                                 pinctrl-single,pins = <0x018  0x27>; };
>                         P8_03_gpio_pin: pinmux_P8_03_gpio_pin {
>                                 pinctrl-single,pins = <0x018  0x27>; };
>
>                         P8_04_default_pin: pinmux_P8_04_default_pin {
>                                 pinctrl-single,pins = <0x01c  0x17>; };
>                         P8_04_gpio_pin: pinmux_P8_04_gpio_pin {
>                                 pinctrl-single,pins = <0x01c  0x17>; };
>

This looks like a device tree (overlay) fragment. You can set the pin 
muxing by loading an device tree (overlay), but you cannot set the state of 
an output pin that way. Therefor you have to export the pin and set its 
state accordingly.

BTW: The configurations are equal (for P8_03 as well as for P8_04). Why do 
you declare them twice?
 

>
> 0x27 should read as: mode 7, input, pulldown
> 0x17 should read as: mode 7, output, pullup.
>
> My goal is to have port P8_03 loaded as input with LOW state (0V) by 
> default (so cat gpio38/value would show 0), and port P9_04 as output with 
> HIGH state (3,3V) by default (so cat gpio39/value would show 1).
>

As you stated, P8_03 is configured as an input pin. You cannot load an 
input at any state. Its value depends on the connected hardware. If voltage 
at this pin is above 1V6 you'll see high state. Voltages below 0V8 result 
in low state, inbetween it's undefined.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/a6f29c68-3f2e-4279-ba65-9e1fb07c2256%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to