这个是内核设备树,uboot拿的是内核设备树来使用
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/display/media-bus-format.h>
#include <dt-bindings/clock/rv1106-cru.h>
/ {
backlight: backlight {
status = "okay";
compatible = "gpio-backlight";
gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>;
default-on;
power-supply = <&vcc_3v3>;
};
panel: panel {
compatible = "lh,lh24030c50", "simple-panel";
reset-gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>; //内核不用,uboot用到
spi-scl-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;//内核不用,uboot用到
spi-sdi-gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>;//内核不用,uboot用到
spi-cs-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;//内核不用,uboot用到
bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
bpc = <6>;
backlight = <&backlight>;
power-supply = <&vcc_3v3>;
status = "okay";
display-timings {
native-mode = <&timing0>;
timing0: panel-timing {
clock-frequency = <7000000>;
hactive = <240>;
vactive = <320>;
hfront-porch = <38>;
hback-porch = <10>;
hsync-len = <10>;
vfront-porch = <8>;
vback-porch = <4>;
vsync-len = <4>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <0>;
};
};
port {
panel_in_rgb: endpoint {
remote-endpoint = <&rgb_out_panel>;
};
};
};
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
drm_logo: drm-logo@00000000 {
compatible = "rockchip,drm-logo";
reg = <0x0 0x0>;
};
};
};
&display_subsystem {
status = "okay";
logo-memory-region = <&drm_logo>;
/* U-Boot route node: 内核忽略此节点,仅 U-Boot 使用 */
route {
route_rgb: route-rgb {
status = "okay";
connect = <&vop_out_rgb>;
logo,uboot = "logo.bmp";
logo,kernel = "logo.bmp";
logo,mode = "center";
charge_logo,mode = "center";
};
};
};
&rgb {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&lcd_pins>;
ports {
rgb_out: port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
rgb_out_panel: endpoint@0 {
reg = <0>;
remote-endpoint = <&panel_in_rgb>;
};
};
};
};
&rgb_in_vop {
status = "okay";
};
&route_rgb {
status = "okay";
};
&vop {
assigned-clocks = <&cru PLL_CPLL>;
assigned-clock-rates = <216000000>;
status = "okay";
};