Dmitry P Posted June 12 Share Posted June 12 (edited) Hi everyone! Trying to bring up just another MCP2515 chip with Zero 2W. This time with Waveshare CAN RS485 HAT. MCP2515 is on SPI1, CS is CS0, INT pin is GPIO25, which is PI6 on Zero2W. Overlay file is compiled and enabled OK, yet chip init fails (see below). pi@orangepizero2w:~$ dmesg | grep spi1 [ 7.612242] mcp251x spi1.0: MCP251x didn't enter in conf mode after reset [ 7.612393] mcp251x spi1.0: Probe failed, err=110 [ 7.612408] mcp251x: probe of spi1.0 failed with error -110 pi@orangepizero2w:~$ dmesg | grep mcp [ 7.612242] mcp251x spi1.0: MCP251x didn't enter in conf mode after reset [ 7.612393] mcp251x spi1.0: Probe failed, err=110 [ 7.612408] mcp251x: probe of spi1.0 failed with error -110 DTS is the following: /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h6"; fragment@0 { target-path = "/aliases"; __overlay__ { spi1 = "/soc/spi@5011000"; }; }; fragment@1 { target-path = "/"; __overlay__ { can0_osc_fixed: can0_osc_fixed { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <12000000>; /* checked with HAT: 12 MHz crystal */ }; }; }; fragment@2 { target = <&pio>; __overlay__ { can0_pin_irq: can0_pin_irq { pins = "PI6"; /* GPIO 25 is PI6 on Zero 2W */ function = "irq"; bias-pull-up; }; }; }; fragment@3 { target = <&spi1>; __overlay__ { status = "okay"; #address-cells = <1>; #size-cells = <0>; can0:mcp2515@0 { reg = <0>; compatible = "microchip,mcp2515"; pinctrl-names = "default"; pinctrl-0 = <&can0_pin_irq>; spi-max-frequency = <10000000>; interrupt-parent = <&pio>; interrupts = <8 6 8>; /* Port I = 8 (???), Pin = 6, Type = PI6 IRQ_TYPE_LEVEL_LOW */ clocks = <&can0_osc_fixed>; status = "okay"; }; }; }; }; Also, SPI1 CS0 seem to always be LOW level, though CS is always active low. Enabling SPI1 separately via "armbianEnv.txt" in form of overlays=spi-spidev param_spidev_spi_bus=1 param_spidev_spi_cs=0 param_spidev_max_freq=1000000 as in SPI1, CS0, didn't help much. Did anyone managed to use MCP2515 with Zero 2W? Thanks in advance Edited June 12 by Dmitry P 0 Quote Link to comment Share on other sites More sharing options...
ME_ Posted July 5 Share Posted July 5 Hi regarding the WIFI/WLAN - I am issues the following dmesg for the OrangePiZero2W entries after installing bleeding edge Kernel 6.7.12: sprdwl:wlan_delba_event: NOT FOUND sta_lut_index: 6, tid: 7 It happens also with the Zero3 Image. Any hints on how to solve this? regards ME_ 0 Quote Link to comment Share on other sites More sharing options...
Robolightning Posted August 7 Share Posted August 7 Hello, I'm new there. Is any way to use TV-out on this board with the Armbian/Ubuntu builds (not Android)? Is any plans to add TV-out support for this board into Armbian? 0 Quote Link to comment Share on other sites More sharing options...
mcyzyk Posted August 9 Share Posted August 9 Armbian fully updated, OrangePi Zero 2W Yeah, my Wifi chip keeps losing its connection and will not reconnect. I reboot, it joins the network fine, it's good for a while, but I come back the next day and it's gone. I have disabled Power Management on the Wifi chip. Not sure what else to do. 0 Quote Link to comment Share on other sites More sharing options...
Dean Smith Posted August 9 Share Posted August 9 I am getting terrible stability problems, kernel panics within half an hour normally, not all the same source.I have tried multiple SD cards and so many power sources, so I'm confident it's not storage or power related. I'm starting to just think I have a lemon 2w from Ali Express.Is everyone else free of panics?ThanksSent from my iPad using Tapatalk 0 Quote Link to comment Share on other sites More sharing options...
Michael Robinson Posted August 9 Share Posted August 9 Are you using the correct power supply and using heatsinks and or fan? 0 Quote Link to comment Share on other sites More sharing options...
Dean Smith Posted August 9 Share Posted August 9 Are you using the correct power supply and using heatsinks and or fan? Heat sink yes, and happens whether hot or cold. Power supplies lots of different ones all good with everything else. Pretty sure not heat power or SD card. 0 Quote Link to comment Share on other sites More sharing options...
Dean Smith Posted August 10 Share Posted August 10 Heat sink yes, and happens whether hot or cold. Power supplies lots of different ones all good with everything else. Pretty sure not heat power or SD card. You got me thinking though. I've been using good quality PSUs all rated at 2A/5V - but, perhaps....I've plugged this into an up to 60W port that claims 3A at 5V and, fingers crossed, it hasn't had a panic in the last 24 hours. So perhaps the listed 2A at 5V is a little optimistic.ThanksSent from my iPad using Tapatalk 0 Quote Link to comment Share on other sites More sharing options...
Werner Posted August 10 Share Posted August 10 Those ratings don't necessary have to mean anything. A proper 2A supply can be better than a crappy 4A one. A good PSU keeps the voltage constant up to its rating and then shuts off due to over-current protection. The voltage of a poor PSU will start to break down under load, often long before its max current rating is reached. The result is having weird issues with your board. At customer grade sector its a matter of luck to get something proper. The only way to be certain, if you cannot do measurements by yourself to verify, is picking up something industrial grade. Also most SBCs like being fed with slight overvoltage. About ~5.2 volts at the source. Last but not least to compensate for losses across wiring and connectors. Some PSUs already do that. Even when labeled 5 volts measurements usually show something between 5.1 and 5.4 volts. Depending on quality like described above this breaks down under load or is kept constant. 0 Quote Link to comment Share on other sites More sharing options...
Dean Smith Posted August 10 Share Posted August 10 Those ratings don't necessary have to mean anything. A proper 2A supply can be better than a crappy 4A one. A good PSU keeps the voltage constant up to its rating and then shuts off due to over-current protection. The voltage of a poor PSU will start to break down under load, often long before its max current rating is reached. The result is having weird issues with your board. At customer grade sector its a matter of luck to get something proper. The only way to be certain, if you cannot do measurements by yourself to verify, is picking up something industrial grade. Also most SBCs like being fed with slight overvoltage. About ~5.2 volts at the source. Last but not least to compensate for losses across wiring and connectors. Some PSUs already do that. Even when labeled 5 volts measurements usually show something between 5.1 and 5.4 volts. Depending on quality like described above this breaks down under load or is kept constant.Of course I spoke too soon. With either an Apple 20W iPad (3A 5V) or a Belkin Boost Charge Pro this happens. I take the point on not being sure with consumer grade, but honestly, nothing else has this issue. And it could just be a dud, the fact no one else has piped up with similar stories is leading me in that direction.Only other thing I can think is when I soldered on the GPIO header I shorted a trace, but I don't have a soldering iron with me at the moment so reflowing will have to wait. thanks 0 Quote Link to comment Share on other sites More sharing options...
Dmitry Loki Posted September 22 Share Posted September 22 (edited) On 8/6/2024 at 5:38 PM, Robolightning said: Is any plans to add TV-out support for this board into Armbian? if someone can add tv out support (update the patch from H2/H3 for H61x) I'm still willing to pay $$ for that job Edited September 22 by Dmitry Loki 0 Quote Link to comment Share on other sites More sharing options...
ambrosa Posted September 23 Share Posted September 23 Hi Guys. I'm a newbie about this little board and Armbian, so please be patient with me 🙂 Zero 2W has 2 USB-C port. I read from original manual (about OrangePi image https://drive.google.com/drive/folders/1KIZMMDBlqf1rKmOEhGH7_7A-COAgYoGZ ) page 116 USB0 and USB1, both of these interfaces can be used to power the development board, and they can also be used as USB2.0 HOST interfaces. The difference between USB0 and USB1 is that in addition to being set to HOST mode, USB0 can also be set to Device mode, while USB1 only has HOST mode and at page 275 there are detailed instructions about enable USB0 as HOST: this require the DTB overlay sun50i-h616-usb0-host.dtbo that is missing in Armbian (I cannot find it into /boot/dtb/allwinner/overlay ) I need to enable USB0 (or USB1) as host mode: using USB port I will try to connect an ESP32 board and, using Zero 2W, control it with ESPTOOL.PY. At time of writing, I cannot find any /dev/ttyUSB* device in my fresh Armbian installation. Have you any idea how to enable USB and to set as HOST ? Thank you. 0 Quote Link to comment Share on other sites More sharing options...
robertoj Posted September 23 Share Posted September 23 Does the esp32 show up as a ttyUSB or ttyACM when plugged to your Linux PC? is there something new in the result of lsusb? can you plug something else in that USB port? can you send a photo of your connections? 0 Quote Link to comment Share on other sites More sharing options...
ambrosa Posted September 24 Share Posted September 24 Hi @robertoj For a real comparison I've installed just now a Debian 12 Bookworm in my PC (I've created a guest virtual machine using Virtualbox) so I can compare what happens into PC world and into OrangePi Zero 2W world. Into my Debian 12 bookworm : 1) modprobe cp210x (USB-serial driver needed to connect ESP device), lsmod show that module is correctly loaded (cp210x and usbserial) 2) I connect with an USB cable the ESP device to my PC 3) board take power supply from USB and automatically power on 4) magically a /dev/ttyUSB0 device is showed up 5) esptool.py works fine Into OrangePi Debian 12 bookworm "minimal": 1) the same 2) the same 3) the same 4) NOPE: no /dev/ttyUSB0 and no messages into dmesg as device was not connected at all I suppose, as written in my previous post, that Orange Pi Zero 2W has USBC ports not configured as HOST. So my problem is: How can I configure/enable one USBC port as USB HOST ?? Probably it's required to add some DTB overlay, but I don't know how... 🙂 0 Quote Link to comment Share on other sites More sharing options...
robertoj Posted September 24 Share Posted September 24 I missed the part where you ask for overlay help change directory to /boot/dtb/sun..../overlays/ There are several readme files, find the ones that apply to your H618 chip. Find an overlay that refers to USB host. Do you use a cable to convert USB-C to USB-A-female? If it works, then the next step after reboot is the lsusb test. Also, look at any error messages printed by both linux ko's dmesg|grep cp210x dmesg|grep usbserial execute "sudo armbianmonitor -u" and show your /boot/armbianEnv.txt 0 Quote Link to comment Share on other sites More sharing options...
ambrosa Posted September 25 Share Posted September 25 (edited) Hi @robertoj Well, as I said before in my first post, reading the official OrangePi documentation about Zero 2W (page 275), it seems that in OrangePiOS there is a /boot/dtb/allwinner/overlay/sun50i-h616-usb0-host.dtbo that should be used exactly for this purpose: enable USB HOST mode in Zero 2W But this file IS MISSING in Armbian and this sounds strange for me. Do I need to install OrangePiOS and 'extract' sun50i-h616-usb0-host.dtbo and copy into my Armbian installation ? This can be a solution ? Edited September 25 by ambrosa 0 Quote Link to comment Share on other sites More sharing options...
ambrosa Posted September 25 Share Posted September 25 SOLVED ! I've downloaded OrangePi OS for Zero 2W and I've extracted sun50i-h616-usb0-host.dtbo file (I attach it to this post for your convenience). Its content is (after decompiling with dtc): /dts-v1/; / { fragment@0 { target = <0xffffffff>; __overlay__ { dr_mode = "host"; status = "okay"; }; }; fragment@1 { target = <0xffffffff>; __overlay__ { status = "okay"; }; }; fragment@2 { target = <0xffffffff>; __overlay__ { status = "okay"; }; }; fragment@3 { target = <0xffffffff>; __overlay__ { status = "okay"; }; }; __fixups__ { usbotg = "/fragment@0:target:0"; usbphy = "/fragment@1:target:0"; ehci0 = "/fragment@2:target:0"; ohci0 = "/fragment@3:target:0"; }; }; dr_mode for USB0 now is changed to "host" (previous was "peripheral", readed from sun50i-h618-orangepi-zero2w.dtb file) I've copied sun50i-h616-usb0-host.dtbo in my Zero 2W /boot/dtb/allwinner/overlay and changed my armbianEnv.txt file adding overlays=usb0-host : verbosity=1 bootlogo=false console=both disp_mode=1920x1080p60 overlay_prefix=sun50i-h616 overlays=usb0-host rootdev=UUID=126910c7-be5b-485f-93bb-92826884bb66 rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u reboot and I connect my ESP32 board to USB0 (with a USBC <-> USBC cable : ESP32 board has an USBC connector). It works ! After connected the board, a /dev/ttyUSB0 device appears and esptool works fine: (esptoolenv) root@orangepizero2w:/boot# esptool.py chip_id esptool.py v4.8.0 Found 1 serial ports Serial port /dev/ttyUSB0 Connecting.... Detecting chip type... ESP32-S3 Chip is ESP32-S3 (QFN56) (revision v0.2) Features: WiFi, BLE, Embedded Flash 8MB (GD) Crystal is 40MHz MAC: 48:ca:43:56:13:68 Uploading stub... Running stub... Stub running... Warning: ESP32-S3 has no Chip ID. Reading MAC instead. MAC: 48:ca:43:56:13:68 Hard resetting via RTS pin... Question: is it possible to add sun50i-h616-usb0-host.dtbo file to Armbian distro ? For all people who need it..... Thanks sun50i-h616-usb0-host.zip 0 Quote Link to comment Share on other sites More sharing options...
robertoj Posted September 25 Share Posted September 25 50 minutes ago, ambrosa said: Question: is it possible to add sun50i-h616-usb0-host.dtbo file to Armbian distro ? For all people who need it..... If it works all the time, nothing else gets disabled, no new dmesg warnings appear due to this, it would be a good indicator but a dtbo (compiled from a dts) sometimes need to be changed when Linux is upgraded (like some changes with spi and tft changes)… and the orange pi official OS images are very old. so in general, a dtbo copied from an old os to a new os, might not work all the time. Needs to be tested. do you see a dts file with the same name as the dtbo? 0 Quote Link to comment Share on other sites More sharing options...
ambrosa Posted September 26 Share Posted September 26 (edited) 17 hours ago, robertoj said: do you see a dts file with the same name as the dtbo? No, in OrangePiOS there is not a sun50i-h616-usb0-host.dts. I've created myself the file sun50i-h616-usb0-host.dts decompiling the .dtbo with dtc ( dtc -I dtb -O dts -o sun50i-h616-usb0-host.dts sun50i-h616-usb0-host.dtbo ) and the content is very simple (see my previous post). Really, the dtbo content is very simple and the dtbo itself works fine in Armbian. I don't see any error or problem. If you wish the .dts, it's simple decompiling the .dtbo as I do. So IMHO I don't see any reason for NOT including this file in Armbian distro for Zero 2W... Edited September 26 by ambrosa 0 Quote Link to comment Share on other sites More sharing options...
ambrosa Posted October 2 Share Posted October 2 (edited) My zero 2W is up and running since 24 hours connected to my home AP: Well, with dmsg I see this strange warning (full dmesg is available here https://pastebin.com/k8UKtcn7 (...omissis...) [ 13.027050] Bluetooth: BNEP socket layer initialized [ 13.031947] Bluetooth: MGMT ver 1.22 [ 13.053665] NET: Registered PF_ALG protocol family [ 32.661337] systemd[1036]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set [20576.474383] sprdwl:sprdwl_fc_add_share_credit, 536, mode:1 closed, index:0, share it [25584.837527] systemd-journald[462]: Received client request to flush runtime journal. [25585.155087] systemd-journald[462]: Received client request to relinquish /var/log/journal/9ea513b1f16a4a4ca76c6c07f2c9668e access. [79314.887653] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) [79314.927176] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) root@orangepizero2w:/var/log# Any idea ? Edited October 2 by ambrosa 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.