uConsole now supports RPi CM3+ <(=^_^)y

I’m happy to announce that uConsole supports CM3+, for sure. Preliminary support for CM4 is added.

I’ve created a patch set to support CM3(plus) in a uConsole. The kernel is based on Raspberry Pi’s downstream fork(v6.1.y), with minimal modifications. I built an ArchLinux environment and tested the main functions.

What I’ve tested:

  • video output, both HDMI and built-in panel
    • there’s a workaround for DSI initialization bug
  • speaker output
  • amplifier switch(a new kernel driver is written for this)
    • or call it audio routing(it’s a gpio switch). Speaker will be turned off if 3.5mm jack plugged in.
  • WiFi & BT
  • power button
  • USB
  • hardware video decode on CM3(plus) with mpv and sway(Wayland)
    • You’ll need players supporting v4l2m2m(no copy) decoding on RPi.
    • It consumes about 10% of CPU on CM3(plus).

The patches can be found in my repo uconsole-cm3 under PKGBUILDs/linux-uconsole-cm3-rpi64.

It should be easy to migrate to downstream v6.5.y kernel. But I’ll wait RPi’s shift first.

There’s no available OS image yet _(:з」∠)_ You can create your own system image, or wait until my motivation comes back. Or, you can test the scripts with prebuilt kernel packages. CM3 and CM4 use the same kernel image and config.txt handles some platform specific configurations.

You’ll need to modify the hardware to ensure 5V bus shut down properly if you plan to put a CM3 in uConsole.

Ask if you have questions and I’ll answer.

18 Likes

great!11111111111111

Got this working on my uConsole finally. Initially thought I had it working and then once I installed xfce I started getting a bunch of strange library issues. Wound up just setting up the arch image again and reinstalling the kernel and it worked fine the second time around. I can’t seem to get the builtin wifi working though. USB works fine though. lsusb doesn’t mention the wifi controller at all but I know its there and working because on the risc-v board the wifi was there. Any ideas of what to try? Thanks for putting the PKGBUILD together.

EDIT: Ignore the wifi stuff, I completely overlooked the original readme on github apparently. This is surprisingly usable with the CM3. I have a CM4 ready to go just need the adapter to make it work. The waveshare one did not function. Wish I could get ahold of a A-04 or A-06. Thought about buying one of the other CM3 compatible boards out there but I know I won’t be able to figure out the drivers.

1 Like

It might not your fault that missed the WiFi driver since I may have written those materials in a non optimal structure :joy:

As to other CM3 compatible boards, I only found CM3S by Radxa available, BUT it’s not fully compatible with uConsole. You’ll not have speaker/3.5mm jack audio output if you use Radxa’s CM3S. Other things should work though.

As to CM4S by RPi, it should work with a little modification to the device tree. I don’t have the motivation to support it because it has almost no advantage over CM3 in my use case, and it’s expensive.

CM4 with third party adapters should work, but I haven’t get my hands on it, with the same reason above.

I’m glad I could help :slight_smile:

PS. WiFi uses SDIO to communicate, so of course you cannot find it with lsusb. BT uses serial so it won’t show up as a USB device ether.

I have the CM4S in my uConsole, it mostly works, missing WiFi and Bluetooth. I just used an external WiFi module and it is fine. I also have a CM4 with eMMC coming in one of these days. Already have the adapter for it.

I would like you to clarify that which kernel you are using. Official OS image for CM4 uses CM4’s WiFi instead of the one on the main board, so no WiFi or BT on CM4S is expected. And if you are using CM4S with official OS image, you might want to add dtoverlay=devterm-wifi and dtoverlay=devterm-bt to enable WiFi and BT on the main board, respectively.

I have no access to CM4S, so I have no idea how my kernel patches go with CM4S.

Thanks, but…

dtoverlay=devterm-wifi
dtoverlay=devterm-bt

They are both in the /boot/config.txt, that didn’t help.

It has been awhile ago that I have looked at this, I already do have a maxed out CM4 on order and the adapter already arrived.

Time is sort of limited to play with it at this point and will be till the semester is over.

I do have a CM3 and a R-01 modules, hope to get back to those some day. The CM3 is in my DevTerm and at the moment the CM4S is in the uConsole with a WiFi USB dongle on it.

Thanks for the feedback. After inspecting the original patch, I think the original code doesn’t enable the power source for WiFi and BT. You might want to copy-paste some regulator nodes on PMU node from my device tree patch for CM3 to your devterm-pmu-overlay.dts and recompile the blob with make DTC_FLAGS="-@" dtbs.

When I get a chance, I will need to figure that stuff out. I really haven’t had much time to look at how most of the device tree stuff works. I will go back and see if I can make it go. My background is in embedded systems and I have worked with Linux for a gazillion years, just not the low level stuff. I do ok with the electronics side as I just happen to teach EE. Thanks for the pointers, will let you know what works.

I guess I found the reasons why CPi didn’t emphasize CM3 in their uConsole product page. One is the performance, CM3 is slow. The other is hardware compatibility. I just found that USB 5V bus power won’t be turned off when using CM3 with uConsole motherboard. Note that this is the internal power line rather than the actual output at the USB ports, which is controlled by other power switches. You may be able to hear the noise produced by the boost circuit after opening the case.

The problem probably because CM3(CM3L+ in my case) feeds power back to SYS_3V3, which causes It having a voltage of approximately 0.9V to 1.6V, depending on the situation. Neither CM3 nor motherboard will consume the energy fast enough. TPS61178 needs voltage low than 0.4V on EN to turn itself off, while 0.9V on SYS_3V3 will produce 0.9V / (10K + 68K) * 68K ~= 0.78V, which is not sufficiently low.

By shorting SYS_3V3 to GND, the capacitors drained, and SYS_5V goes to 0V. Popping out the CM3 module also reset the circuit.

Extending the active time after powering off the PMU doesn’t resolve this issue.

Due to the hardware compatibility issue just found, I decide to cease development for CM3 in uConsole, until a proper solution comes out. It’s still usable though.

BTW: the IPSOUT will always on and that’s by design of AXP228.

Hi there. How is the battery life with a CM3? Does it last longer? And does it heat up less? Thanks

I only have R01 and CM3. Battery life should be shorter on CM3 compared to R01, but system is more responsive. Using original thermal pad can keep CM3’s core temp under 50℃(never passes it, room temp 24℃). It can last several hours listening to music with 2 3500mAh 18650 Li-ion batteries, but I cannot recall the exact value. It lasts longer than one hour when playing games with PPSSPP, I think.

My uConsole is just hanging on my shelf now :joy: , more of a decoration.

How do you cool it? Where did you buy it?

I had the same problem in the DevTerm. The USB 5V didn’t shut down. I changed the value of one resistor to force it to shut down and haven’t had a problem after that. Haven’t looked at the newer main board, but suspect it is the same. I would still like to use the CM3 in the uConsole as it takes way less power than the CM4.

1 Like

Changing R106 from 10K to 120K solves the problem for me ٩( ᐛ )و. I thought 110K would be suitable after doing some calculations, but the experiment tells me it has to be 120K. In theory, changing R106 to 120K is a little bit off spec for TPS61178. Anyway it works. The resistors are located at the back of the main board, so you need to take apart your device to apply the mod.

1 Like