zephyr.js icon indicating copy to clipboard operation
zephyr.js copied to clipboard

The GPIO “pullup”/”pulldown” feature doesn’t work on IO2, IO4, IO7-IO8 pins

Open yhe39 opened this issue 8 years ago • 7 comments

The 'pull' for pullup/pulldown resistors is implemented but the feature doesn't work on IO2, IO4, IO7-IO8 pins. The other pins are not sure whether the pull feature are workable.

yhe39 avatar Aug 04 '16 03:08 yhe39

I've tried again and no it doesn't seem to work for me either. I only tried IO3/4 so far.

grgustaf avatar Aug 09 '16 19:08 grgustaf

Later I found that the Zephyr QMSI (and older DW) GPIO drivers never even use the GPIO_PUD_PULL_UP flag, while some other drivers like K64F do. So it can't possibly work currently - I'm not sure if that's because the hardware doesn't support it or just the driver. There is some reference to pullup for A101 within the pinmux driver though, so there might be an alternate way to enable it. (No reference to pulldown there though.)

grgustaf avatar Aug 10 '16 01:08 grgustaf

So basically, unless we get so serious about this particular issue that we attempt to go add the support to Zephyr ourselves (and figure out whether it's actually supported in the A101 hardware), it's just not going to work until they get around to it.

We're starting to run into this in other places: for example, it appears there is no I2C driver for K64F. So we're probably going to need to get used to missing Zephyr support and figure out what we're going to do about it. Unless we run out of work that's clearly "ours", I don't think writing Zephyr drivers is the answer. So we need to either clearly document where support is missing, or report it in the code with errors, or both.

I'm in the process of adding API documentation so I guess adding a section to each page on hardware support caveats would make sense.

grgustaf avatar Aug 17 '16 16:08 grgustaf

I guess another parallel path is that we open Zephyr bugs.

grgustaf avatar Aug 17 '16 16:08 grgustaf

Hmm I still haven't opened a Zephyr bug but talked to ktseng on IRC and that's what he told me to do. I should check first on a recent Zephyr commit.

grgustaf avatar Nov 08 '16 22:11 grgustaf

I found that zephyrproject-rtos/zephyr#2288 may shed some light on this issue; it appears that for A101 at least, it is pinmux driver where pullups are controlled.

grgustaf avatar Nov 03 '17 21:11 grgustaf

Lowering priority because this is A101-specific and pullup has been observed to work on other boards.

grgustaf avatar Jan 10 '18 19:01 grgustaf