On Wed 05 Sep 2018 21:06:28 NZST +1200, Alexander Graf wrote:
rpi:~ # grep 'pin 4 ' /sys/kernel/debug/pinctrl/3f200000.gpio/pins pin 4 (gpio4) function gpio_in in hi; irq 83 (none) rpi:~ # echo $(( 458 + 4 )) > /sys/class/gpio/export rpi:~ # echo out > /sys/class/gpio/gpio462/direction rpi:~ # grep 'pin 4 ' /sys/kernel/debug/pinctrl/3f200000.gpio/pins pin 4 (gpio4) function gpio_out in lo; irq 83 (none) rpi:~ # echo 1 > /sys/class/gpio/gpio462/value rpi:~ # grep 'pin 4 ' /sys/kernel/debug/pinctrl/3f200000.gpio/pins pin 4 (gpio4) function gpio_out in hi; irq 83 (none)
Ah, getting closer. This one starts with "in lo", and stays "in lo" aver after writing 1 to value: # grep 'pin 4 ' /sys/kernel/debug/pinctrl/3f200000.gpio/pins pin 4 (gpio4) function gpio_in in lo; irq 83 (none) # echo 462 > /sys/class/gpio/export # echo out > /sys/class/gpio/gpio462/direction # grep 'pin 4 ' /sys/kernel/debug/pinctrl/3f200000.gpio/pins pin 4 (gpio4) function gpio_out in lo; irq 83 (none) # echo 1 > /sys/class/gpio/gpio462/value # grep 'pin 4 ' /sys/kernel/debug/pinctrl/3f200000.gpio/pins pin 4 (gpio4) function gpio_out in lo; irq 83 (none) # echo 0 > /sys/class/gpio/gpio462/value # grep 'pin 4 ' /sys/kernel/debug/pinctrl/3f200000.gpio/pins pin 4 (gpio4) function gpio_out in lo; irq 83 (none) # echo 1 > /sys/class/gpio/gpio462/value # grep 'pin 4 ' /sys/kernel/debug/pinctrl/3f200000.gpio/pins pin 4 (gpio4) function gpio_out in lo; irq 83 (none) This is the one that needed enable_uart=0 in extraconfig.txt or it would stop on boot probably thinking there was serial line input... So probably dodgy hardware. The pin is always supplying enough power for a base of an NPN (emitter to ground) to make that NPN conductive at least slightly. There was another person on the Internet whos pins wouldn't switch until after he got his RPi replaced. I'll have a word with Element14. Trying the same in a different RPi fails currently - when I swap the two microSD cards between the 2 RPis neither of them boots any more. Hmm. Volker -- Volker Kuhlmann http://volker.top.geek.nz/ Please do not CC list postings to me. -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org