[Letux-kernel] LX16: new device tree structure
H. Nikolaus Schaller
hns at goldelico.com
Mon Mar 31 21:22:35 CEST 2025
Hi,
after still failing with the dtb checks (can't get python3, pip and dtschema work together),
I have switched to a different topic: the DTS structure to make it more maintainable and expandable.
The new idea is as follows:
1. there is a lx16-v0.1.dtsi and more revisions to cover all hardware changes and differences between these and future versions
2. there are lx16-wireless-qcom.dtsi and lx16-wire.ess-esp32.dtsi to describe the different WLAN options
3. there is room for more lx16+something.dtsi for applications like the SPI/Touch display or the EPD or others
4. there is a simple lx16.dts which #includes either ones depending on either commenting out something or using the older #if LX16_REV == 3 scheme
5. as soon as we can control u-boot to load a different DTB file we can replace the lx16-v0.*.dtsi by lx16-v0.*.dts and have multiple .dtb on the µSD
Why do I think this is easier to maintain?
- v0.3 is based on v0.2 with small diffs
- v0.2 is based on v0.1 with small diffs
- adding yet another type of WLAN module falls into a scheme
- the lx16.dts can mix any board revision with any WLAN module (although hardware can't) and any application connected
Why not use overlays?
- well, overlays can achieve the same but are not very common in kernel code
- and my main criterion is that I have no experience with overlays
- and u-boot must be configured to load overlays (AFAIK)
Where is the code?
- will come rebased to letux-6.15-rc1 next Monday
- here is a preview of the SPI display branch:
https://git.goldelico.com/?p=letux-kernel.git;a=shortlog;h=refs/heads/project-wlan@lx16%2Cpyra%2Craspi%2Btinydrm-spi-display@raspi%2Clx16%2Cci20%2B1w@raspi%2Clc8%2Cgta15-v18
Is it tested?
- yes, I have made a script build the DTBs in all combinations of the board revision and wlan
- for both, the letux-6.14.0 code and the upcoming letux-6.15-rc1
- and compared after running dtc -s in disassembly mode
- the only remaining difference is that the new DTS includes the version number in the model property
BR,
Nikolaus
More information about the Letux-kernel
mailing list