02-14-2023, 12:15 PM
(This post was last modified: 02-14-2023, 12:34 PM by CounterPillow.)
A good resource is https://elinux.org/Device_Tree_Usage
The device trees live in the Linux kernel tree in arch/arm64/boot/dts. The SOQuartz specific stuff is in arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi. This file is included by arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts which is the CM4 I/O board device tree for the SOQuartz.
You can build the device trees inside the Linux kernel tree with make dtbs (if you have a suitable .config, on Plebian you can grab a suitable config from /boot/config-*). This will produce a arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dtb (device tree blob). You'll need device-tree-compiler installed for this.
To then use it, at least on Plebian, you can drop a file in /etc/u-boot-menu/conf.d/ titled something like 99-customdtb.conf with the contents
replacing the path with yours of course. Then run u-boot-update as root to regenerate the /boot/extlinux/extlinux.conf file.
On other distributions, you can likely edit the /boot/extlinux/extlinux.conf file directly (the FDT line specifically) to set a device tree, just make sure it's in a location that's accessible to u-boot (somewhere in /boot is usually a good idea if it's a separate partition)
Upstream kernel development for rockchip devices is done through the linux-rockchip mailing list. Commits need to be signed off (git commit -s), should be formatted with git format-patch and should be submitted with git send-email. A good way to know the prefix to use in a commit message is to run git log -- file you're changing here. There's plenty of documentation out there on how to submit patches, so I don't want to make this post too long explaining a process most people probably won't go through.
The device trees live in the Linux kernel tree in arch/arm64/boot/dts. The SOQuartz specific stuff is in arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi. This file is included by arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts which is the CM4 I/O board device tree for the SOQuartz.
You can build the device trees inside the Linux kernel tree with make dtbs (if you have a suitable .config, on Plebian you can grab a suitable config from /boot/config-*). This will produce a arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dtb (device tree blob). You'll need device-tree-compiler installed for this.
To then use it, at least on Plebian, you can drop a file in /etc/u-boot-menu/conf.d/ titled something like 99-customdtb.conf with the contents
Code:
U_BOOT_FDT="/path/to/your/dtb/file/here.dtb"
On other distributions, you can likely edit the /boot/extlinux/extlinux.conf file directly (the FDT line specifically) to set a device tree, just make sure it's in a location that's accessible to u-boot (somewhere in /boot is usually a good idea if it's a separate partition)
Upstream kernel development for rockchip devices is done through the linux-rockchip mailing list. Commits need to be signed off (git commit -s), should be formatted with git format-patch and should be submitted with git send-email. A good way to know the prefix to use in a commit message is to run git log -- file you're changing here. There's plenty of documentation out there on how to submit patches, so I don't want to make this post too long explaining a process most people probably won't go through.
Occasional Linux Kernel Contributor, Avid Wiki Updater, Ask Me About Quartz64
Open Hardware Quartz64 Model A TOSLink Adapter
Pi-bus GPIO Extender For ROCKPro64 And Quartz64 Model A
Plebian GNU/Linux