UPDATE: Solved.
uart2 is the Devil. Long live uart3. Enabled ias overlay on /dev/ttyS3 and Pi2 Bus Pins 37 and 36 (which differ between models)
I'm trying to adapt an Elelab Zigbee Shield( https://elelabs.com/products/elelabs-zigbee-shield.html) for use on a H64b but I'm finding it very difficult given the "Pi2" GPIO block is not actually compatible with pi shields. The device works on simple (and universal) serial connection@115200 baud. It should be trivial to get working and I can't figure out why .
So where I'm at with the h64b:
uname -a:
According to schematics, there 5 system UART. One of which is the console (uart0)
Only uart2 and uart3 are suitable for my use case. I've used device tree overlays to enable uart1 and uart3, but there is no README for the H6 in the /boot/dtb/allwinner/overlays/ folder like there is for the A64 and H5 chips so I'm flying a little blind.
Originally, while still targeting uart2, I decompiled the dtb and tore it apart in a couple different ways (removing all other uarts, rearranging serial@, pnctrl, etc) but I was never able to enable by overlay uart2 without hanging the system.
enabling uart3 works according to dmesg | grep serial:
Ok, I'm targeting my final option, uart3. I've got the shield hooked to the 3v, Tx->RX(Pin 38), rx->TX(Pin 37), GND->GND(Pin 39). But nothing!
Just before I threw up my hands in defeat last night, I came across the post for the similar issues with a z-wave shield on the A64+ (https://forum.pine64.org/showthread.php?...3#pid20643). Their diagram: http://i0.wp.com/blog.etiennebretteville...otique.jpg indicates 100k resistors. Do those pull the the pins high, serving UART instead of it's primary function?
Can someone explain how I can get this device to talk to uart3 or, preferably, how to do the same on uart2 without the system hanging?
Cheers,
R.
uart2 is the Devil. Long live uart3. Enabled ias overlay on /dev/ttyS3 and Pi2 Bus Pins 37 and 36 (which differ between models)
I'm trying to adapt an Elelab Zigbee Shield( https://elelabs.com/products/elelabs-zigbee-shield.html) for use on a H64b but I'm finding it very difficult given the "Pi2" GPIO block is not actually compatible with pi shields. The device works on simple (and universal) serial connection@115200 baud. It should be trivial to get working and I can't figure out why .
So where I'm at with the h64b:
uname -a:
Code:
Linux ServerName 5.8.16-sunxi64 #20.08.16 SMP Sat Oct 24 23:52:46 CEST 2020 aarch64 GNU/Linux
According to schematics, there 5 system UART. One of which is the console (uart0)
- uart0 is the bitch of uboot and then getty.
- uart1 is attached to pins on the wifi
- uart2 is attached to the GPIO as the second function of pins 8 and 10
- uart3 is, maybe, attached to GPIO mysteriously at pins 38 and 37
- uart4 is a mysterious unicorn that is no longer enabled in many linux flavours.
Only uart2 and uart3 are suitable for my use case. I've used device tree overlays to enable uart1 and uart3, but there is no README for the H6 in the /boot/dtb/allwinner/overlays/ folder like there is for the A64 and H5 chips so I'm flying a little blind.
Originally, while still targeting uart2, I decompiled the dtb and tore it apart in a couple different ways (removing all other uarts, rearranging serial@, pnctrl, etc) but I was never able to enable by overlay uart2 without hanging the system.
enabling uart3 works according to dmesg | grep serial:
Code:
[ 2.243978] sun50i-h6-pinctrl 300b000.pinctrl: pin-198 (5000400.serial) status -517
[ 2.244013] dw-apb-uart 5000400.serial: Error applying setting, reverse things back
[ 2.244292] sun50i-h6-pinctrl 300b000.pinctrl: pin-119 (5000c00.serial) status -517
[ 2.244328] dw-apb-uart 5000c00.serial: Error applying setting, reverse things back
[ 2.246801] sun50i-h6-pinctrl 300b000.pinctrl: pin-198 (5000400.serial) status -517
[ 2.246837] dw-apb-uart 5000400.serial: Error applying setting, reverse things back
[ 2.247109] sun50i-h6-pinctrl 300b000.pinctrl: pin-119 (5000c00.serial) status -517
[ 2.247145] dw-apb-uart 5000c00.serial: Error applying setting, reverse things back
[ 2.647327] sun50i-h6-pinctrl 300b000.pinctrl: pin-198 (5000400.serial) status -517
[ 2.647364] dw-apb-uart 5000400.serial: Error applying setting, reverse things back
[ 2.647856] sun50i-h6-pinctrl 300b000.pinctrl: pin-119 (5000c00.serial) status -517
[ 2.647893] dw-apb-uart 5000c00.serial: Error applying setting, reverse things back
[ 2.704724] 5000400.serial: ttyS1 at MMIO 0x5000400 (irq = 26, base_baud = 1500000) is a 16550A
[ 2.706044] 5000c00.serial: ttyS3 at MMIO 0x5000c00 (irq = 27, base_baud = 1500000) is a 16550A
Ok, I'm targeting my final option, uart3. I've got the shield hooked to the 3v, Tx->RX(Pin 38), rx->TX(Pin 37), GND->GND(Pin 39). But nothing!
Just before I threw up my hands in defeat last night, I came across the post for the similar issues with a z-wave shield on the A64+ (https://forum.pine64.org/showthread.php?...3#pid20643). Their diagram: http://i0.wp.com/blog.etiennebretteville...otique.jpg indicates 100k resistors. Do those pull the the pins high, serving UART instead of it's primary function?
Can someone explain how I can get this device to talk to uart3 or, preferably, how to do the same on uart2 without the system hanging?
Cheers,
R.