How to add custom dts entries
Bernd Walter
ticso at cicely7.cicely.de
Sat Nov 3 20:07:15 UTC 2018
For a raspberry (1B modell) I have the following patches:
[92]cicely7> cat rpi.ds18b20.dts.patch
Index: boot/fdt/dts/arm/rpi.dts
===================================================================
--- boot/fdt/dts/arm/rpi.dts (revision 303469)
+++ boot/fdt/dts/arm/rpi.dts (working copy)
@@ -340,6 +348,11 @@
};
};
+ onewire {
+ compatible = "w1-gpio";
+ gpios = <&gpio 4 1>;
+ };
+
power: regulator {
compatible = "broadcom,bcm2835-power-mgr",
"broadcom,bcm2708-power-mgr",
[93]cicely7> cat rpi.apa102.dts.patch
Index: boot/fdt/dts/arm/rpi.dts
===================================================================
--- boot/fdt/dts/arm/rpi.dts (revision 303469)
+++ boot/fdt/dts/arm/rpi.dts (working copy)
@@ -292,6 +292,14 @@
broadcom,function = "ALT3";
};
};
+
+ spi0 {
+ apa102led0 {
+ compatible = "led,apa102";
+ spi-chipselect = <0>;
+ };
+ };
+
usb {
hub {
compatible = "usb,hub", "usb,device";
And to install
cd /usr/src/sys/modules/dtb/rpi
make all install
Obviously a few things have changed since then.
We don't have overlay support yet, don't we?
System is:
# uname -a
FreeBSD rpi-b 12.0-BETA3 FreeBSD 12.0-BETA3 r340039 RPI-B arm
/usr/src is populated and my kernel driver itself build fine:
# ls -la /boot/modules/
total 20
drwxr-xr-x 2 root wheel 512 Nov 3 20:54 .
drwxr-xr-x 10 root wheel 1024 Nov 3 20:54 ..
-r-xr-xr-x 1 root wheel 7080 Nov 3 20:54 apa102.ko
-rw-r--r-- 1 root wheel 36 Nov 3 20:54 linker.hints
--
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
More information about the freebsd-arm
mailing list