/dts-v1/;
/plugin/;
/ {
compatible = "xunlong,orangepi-3-lts,allwinner,sun50i-h6";
fragment@0 {
target = <&spi1>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
display@0{
compatible = "sitronix,st7789v_240x240";
reg = <0>;
spi-max-frequency = <20000000>;
dc-gpios = <&pio 3 16 0>;
reset-gpios = <&pio 3 18 0>;
rotation = <0>;
};
};
};
};
dtc demo.dts -o demo.dtbo
cp demo.dtbo /boot/dtb/allwinner/overlay/sun50i-h6-demo.dtbo
vim /boot/orangepiEnv.txt
overlays=demo
目前不知道怎么实现, 但可提高驱动开发效率,不需要重新编译内核。
- 已经明确是 u-boot 先读取 /boot/orangepiEnv.txt 获取要加载的 orangepiEnv 子片段,最后拼接成设备树后再启动内核。
example , 添加根路径下设备target-path = "/";
网友评论