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

GPIO Pins In Strange Modes #43

Open
KarlEaves opened this issue Jan 25, 2019 · 0 comments
Open

GPIO Pins In Strange Modes #43

KarlEaves opened this issue Jan 25, 2019 · 0 comments

Comments

@KarlEaves
Copy link

Hey guys, I copied this issue from meta-updater in case it anyone here can help. My problem is that whenever I include this layer, whether it be because I'm changing my boot to use u-boot or something else, my GPIO pins are getting seriously screwed up. The pins alternate between modes ALT1 and ALT5 as well as alternating values high and low. I'm using gpio allreadall to view this. The default for the pins is IN, and that is what all the pins read as before I add in the meta-updater/meta-updater-raspberrypi and switch to u-boot.

Overall I'm trying to set up a custom-dts for my raspberry pi. I was able to get i2c working by creating a patch that writes to a custom dtb and adding that to my KERNEL_DEVICETREE_raspberrypi3_sota.

Now I am trying to get UART working, which usually requires dtoverlay=pi3-disable-bt. I added the changes for this to my custom-dts as well.

However, using gpio allreadall, I see that the pins are all alternating in states ALT1 Value High and ALT5 Value Low. This is appearing whether I include or take out my dtb, and I'm wondering if there is anything you guys know that could be causing this?

I am compiling on Ubuntu 16 for Raspberry Pi 3B+ and including the meta-updater as well as meta-updater-raspberrypi.

My local.conf:
`LICENSE_FLAGS_WHITELIST = "commercial"
DISTRO_FEATURES = "ext2 usbhost ${DISTRO_FEATURES_LIBC} systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "pulseaudio"
PREFERRED_PROVIDER_jpeg = "libjpeg-turbo"

PREFERRED_PROVIDER_jpeg-native = "libjpeg-turbo-native"
PREFERRED_PROVIDER_udev = "eudev"
VIRTUAL-RUNTIME_init_manager = "systemd"
MACHINE_FEATURES_remove = "apm"

PACKAGE_CLASSES = "package_ipk"
DISTRO = "poky-sota"
MACHINE = "raspberrypi3"
RPI_USE_U_BOOT = "1"
KERNEL_IMAGETYPE = "uImage"
KERNEL_MODULE_AUTOLOAD += "
i2c-dev
i2c-2708
rtc-pcf8523
"
KERNEL_DEVICETREE_raspberrypi3_sota = "
bcm2710-rpi-3-b-plus-wispr.dtb
"

DISABLE_OVERSCAN = "1"
ENABLE_UART = "1"
ENABLE_RPI3_SERIAL_CONSOLE = "1"
ENABLE_I2C = "1"
SERIAL_CONSOLE = "57600 ttyAMA0"
VIDEO_CAMERA = "1"

INHERIT += "extrausers"
EXTRA_USERS_PARAMS = "usermod -P wisprsystems root; "
USER_CLASSES = "image-mklibs image-prelink"
PATCHRESOLVE = "noop"
INHERIT += "rm_work"
CONF_VERSION = "1"`

I understand that this is likely caused by something with U-boot, but seeing as I just added this layer and set RPI_USE_U_BOOT = "1" iin my local.conf, I was hoping this would be able to work without too much complication.

I've also read the the device-tree-overlays are the last thing to affect the kernel. So I tried setting all the pins to IN in the config.txt, which would normally work. However, even without my overlay, something is still setting these pins to ALT1 and ALT5.

An example of my output from gpio allreadall:

|--------|-----------|----------|

Pin Mode Value
---0--- -ALT1--- --HIGH-
---1--- -ALT5--- --LOW-
---2--- -ALT1--- --HIGH-
---3--- -ALT5--- --Low-

This pattern continues throughout except for pin 19 which is set to IN and pin 43 which is set to ALT2. Normally all of these pins would be IN.

Thanks,
Karl Eaves

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

No branches or pull requests

1 participant