WIP: clockworkpi: add uConsole CM4 support#1734
Conversation
Add hardware support for the ClockworkPi uConsole with CM4 module: - Display panel driver (CWU50 5" DSI 720x1280) - AXP228 power management IC - OCP8178 backlight controller - Optional 4G modem support with GPIO control Kernel patches are applied to enable the custom hardware drivers and device tree overlays required for the uConsole.
|
Hey thanks for opening this PR! Credits to @robertjakub for laying out most of the work 😎 |
the patches were build upon the vendor kernel package(s) and still WIP. Need to be confirmed if they can be applied to the mainstream kernel. also the required overlays should be loaded to enable the hardware. For default upstream nixos requires overlays to be merged with the base dtb. I suggest to work on merging the @nvmd nixos-raspberry ((-; (just my 2 agorots...) -j. |
|
@robertjakub I'm building the changes as we speak to figure out if everything works. Do you think there is a better way of sourcing these patches instead of putting them here?
Can you expand on how to do this? I'm not sure I fully understand.
Do you mean merging nixos-raspberry into this repository or moving this PR to the nixos-raspberry repo? Also thanks for the work on this! I would like to find the best way to have this platform supported in a central place all nixos users can find it and use it easily along their other machine configurations. |
uConsole need to load an clockworkpi-uconsole device-tree overlay to enable specific hardware (i.e. display). on Raspberry, adding a line (dtoverlay=....) to /boot/config.txt allows to tell the firmware to load the overlay, dynamically configuring pins, buses, and other settings for that specific hardware. unfortunately mainstream nixos do not expose the custom DTOs to /boot or we need to specifically add it to hardware.deviceTree.overlays.
Both ways ((-; let's say - uConsole is just a great machine build on Raspberry PI Compute Module (3/4/5). Unfortunately support for RPi in nixos-hardware is weak. Nixos-Raspberry is a flake build to specifically support RPi (including Raspberry Pi 4 and 5) with all the possibilities RPi offer. it will be great to incorporate nixos-raspebery into this repo... but maybe it is a good idea to move this PR to the nixos-rPI repo...
-j. |
|
For future reference, I'm using this now on my own uConsole here and here. Getting LUKS full disk encryption to work was a bit tricky, but how the screen comes on soon enough in the boot process to be able to type the LUKS passphrase. I'm currently waiting for the NVME extension board and will continue testing when it arrives. |
Summary
Add hardware support for the ClockworkPi uConsole with CM4 module:
Hardware
The uConsole is a portable handheld device based on Raspberry Pi CM4 with custom hardware requiring kernel patches for display, power management, and audio routing.
Patches
Patches are extracted from ClockworkPi-linux, the official ClockworkPi kernel fork.
Usage
Credits go to @zyriab for figuring most of this stuff out.