Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control of certain GPIO pins fails to work as expected #217

Open
OOHehir opened this issue Mar 2, 2022 · 0 comments
Open

Control of certain GPIO pins fails to work as expected #217

OOHehir opened this issue Mar 2, 2022 · 0 comments

Comments

@OOHehir
Copy link
Contributor

OOHehir commented Mar 2, 2022

Summary: Control of certain GPIO pins fails to work as expected using gpioset

Hello,

I’m using a (unmodified) SAMA5D4 Xplained board & I’ve found that some GPIO pins can’t be controlled as would be expected by the gpiod method. I’m unsure of the exact reason but its possible to illustrate the issue in the following way:

Using the (unmodified) demo image from here

Once booted gpioinfo reports

gpiochip4 - 32 lines:
        line   0:      "pioE0"       unused   input  active-high
        line   1:      "pioE1"  "interrupt"   input  active-high [used]
        line   2:      "pioE2"       unused   input  active-high
        line   3:      "pioE3" "mmc_detect"   input  active-high [used]
        line   4:      "pioE4" "fixedregulator_mmc1" output active-low [used]
        line   5:      "pioE5"       unused   input  active-high
        line   6:      "pioE6"       unused  output  active-high
        line   7:      "pioE7"       unused   input  active-high
        line   8:      "pioE8"   "pb_user1"   input  active-high [used]
        line   9:      "pioE9"       unused   input  active-high
        line  10:     "pioE10"       unused   input  active-high
        line  11:     "pioE11" "atmel,vbus"  output  active-high [used]
        line  12:     "pioE12"       unused  output  active-high
        line  13:     "pioE13"       unused  output  active-high
        line  14:     "pioE14" "atmel,vbus"  output  active-high [used]
        line  15:     "pioE15"        "d10"  output   active-low [used]
        line  16:     "pioE16"       unused   input  active-high
        line  17:     "pioE17"       unused   input  active-high
        line  18:     "pioE18"       unused   input  active-high
….

The following commands fail to have any effect on the pin output at this point:

gpioset gpiochip4 12=1
gpioset gpiochip4 13=1

From my study of the device tree it appears that these pins should be available in this way.

However if one interrupts Uboot & issues the following commands to set the PIOE12 & PIOE13 as GPIO pins:

mw.l FC06D000 3000 1

& then boots the board the same commands as above work as expected.

Is the issue some gap in the device tree or something else? Its been reported to me (but not verified personally) that the issue is not present on other distros (namely Ubuntu).

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant