RK3288 适配LVDS屛 记录 :
在设备树增加LVDS相关节点: 源码/kernel/arch/arm/boot/das/rk3288.dts
1、添加背光节点
backlight: backlight {
status = "okay";
compatible = "pwm-backlight";
brightness-levels = <
255 254 253 252 251 250 249 248
247 246 245 244 243 242 241 240
239 238 237 236 235 234 233 232
231 230 229 228 227 226 225 224
223 222 221 220 219 218 217 216
215 214 213 212 211 210 209 208
207 206 205 204 203 202 201 200
199 198 197 196 195 194 193 192
191 190 189 188 187 186 185 184
183 182 181 180 179 178 177 176
175 174 173 172 171 170 169 168
167 166 165 164 163 162 161 160
159 158 157 156 155 154 153 152
151 150 149 148 147 146 145 144
143 142 141 140 139 138 137 136
135 134 133 132 131 130 129 128
127 126 125 124 123 122 121 120
119 118 117 116 115 114 113 112
111 110 109 108 107 106 105 104
103 102 101 100 99 98 97 96
95 94 93 92 91 90 89 88
87 86 85 84 83 82 81 80
79 78 77 76 75 74 73 72
71 70 69 68 67 66 65 64
63 62 61 60 59 58 57 56
55 54 53 52 51 50 49 48
47 46 45 44 43 42 41 40
39 38 37 36 35 34 33 32
31 30 29 28 27 26 25 24
23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0>;
default-brightness-level = <200>;
pinctrl-names = "default";
pinctrl-0 = <&bl_en>;
enable-gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
};
&pwm0 {
status = "okay";
};
2、添加LVDS节点
RK3288 有2个视觉输出处理器 yopb vopl
vopb 支持4K高清输出
vopl 支持2K视频输出
route {
route_lvds: route-lvds {
status = "okay"; // 使能LVDS
logo,uboot = "logo.bmp"; // 显示启动LOGO
logo,kernel = "logo_kernel.bmp"; // 显示内核LOGO
logo,mode = "center"; // 居中显示
charge_logo,mode = "center"; // 居中显示
connect = <&vopl_out_lvds>; // 连接视频控制器vopl
};
lvds_panel: lvds-panel {
status = "okay";
;
pinctrl-0 = <&lcd_rst>;
power-supply = <&vcc_lcd>;
backlight = <&backlight>;
enable-gpios = <&gpio7 RK_PA4 GPIO_ACTIVE_HIGH>;
enable-delay-ms = <10>;
bus-format = ; // LVDS总线格式 单通道
rockchip,data-mapping = "vesa"; // 数据格式
rockchip,data-width = <24>; // 颜色位数
rockchip,output = "lvds";
display-timings {
native-mode = <&timing1>; // LVDS屛时序参数,参照具体数据手册
timing1: timing1 {
clock-frequency = <60000000>;
hactive = <800>;
vactive = <1280>;
hback-porch = <24>;
hfront-porch = <72>;
hsync-len = <24>;
vback-porch = <10>;
vfront-porch = <12>;
vsync-len = <2>;
pixelclk-active = <0>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
};
};
&lvds {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&lcdc_ctl>;
ports {
lvds_out: port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
lvds_out_panel: endpoint@0 {
reg = <0>;
remote-endpoint = <&panel_in_lvds>;
};
};
};
};
&lvds_in_vopb {
status = "disabled"; // LVDS使用vopl, 关闭vopb
};
3、在 源码/device/rockchip/rk3288/device.mk 增加输出屏幕选项
#SCREEN DSI EDP HDMI-A LVDS
PRODUCT_PROPERTY_OVERRIDES +=
sys.hwc.device.primary=LVDS // 主屏
sys.hwc.device.extend=HDMI-A // 副屛
ro.sys.rotation.sensor=false
RK3288 适配LVDS屛 记录 :
在设备树增加LVDS相关节点: 源码/kernel/arch/arm/boot/das/rk3288.dts
1、添加背光节点
backlight: backlight {
status = "okay";
compatible = "pwm-backlight";
brightness-levels = <
255 254 253 252 251 250 249 248
247 246 245 244 243 242 241 240
239 238 237 236 235 234 233 232
231 230 229 228 227 226 225 224
223 222 221 220 219 218 217 216
215 214 213 212 211 210 209 208
207 206 205 204 203 202 201 200
199 198 197 196 195 194 193 192
191 190 189 188 187 186 185 184
183 182 181 180 179 178 177 176
175 174 173 172 171 170 169 168
167 166 165 164 163 162 161 160
159 158 157 156 155 154 153 152
151 150 149 148 147 146 145 144
143 142 141 140 139 138 137 136
135 134 133 132 131 130 129 128
127 126 125 124 123 122 121 120
119 118 117 116 115 114 113 112
111 110 109 108 107 106 105 104
103 102 101 100 99 98 97 96
95 94 93 92 91 90 89 88
87 86 85 84 83 82 81 80
79 78 77 76 75 74 73 72
71 70 69 68 67 66 65 64
63 62 61 60 59 58 57 56
55 54 53 52 51 50 49 48
47 46 45 44 43 42 41 40
39 38 37 36 35 34 33 32
31 30 29 28 27 26 25 24
23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0>;
default-brightness-level = <200>;
pinctrl-names = "default";
pinctrl-0 = <&bl_en>;
enable-gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
};
&pwm0 {
status = "okay";
};
2、添加LVDS节点
RK3288 有2个视觉输出处理器 yopb vopl
vopb 支持4K高清输出
vopl 支持2K视频输出
route {
route_lvds: route-lvds {
status = "okay"; // 使能LVDS
logo,uboot = "logo.bmp"; // 显示启动LOGO
logo,kernel = "logo_kernel.bmp"; // 显示内核LOGO
logo,mode = "center"; // 居中显示
charge_logo,mode = "center"; // 居中显示
connect = <&vopl_out_lvds>; // 连接视频控制器vopl
};
lvds_panel: lvds-panel {
status = "okay";
;
pinctrl-0 = <&lcd_rst>;
power-supply = <&vcc_lcd>;
backlight = <&backlight>;
enable-gpios = <&gpio7 RK_PA4 GPIO_ACTIVE_HIGH>;
enable-delay-ms = <10>;
bus-format = ; // LVDS总线格式 单通道
rockchip,data-mapping = "vesa"; // 数据格式
rockchip,data-width = <24>; // 颜色位数
rockchip,output = "lvds";
display-timings {
native-mode = <&timing1>; // LVDS屛时序参数,参照具体数据手册
timing1: timing1 {
clock-frequency = <60000000>;
hactive = <800>;
vactive = <1280>;
hback-porch = <24>;
hfront-porch = <72>;
hsync-len = <24>;
vback-porch = <10>;
vfront-porch = <12>;
vsync-len = <2>;
pixelclk-active = <0>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
};
};
&lvds {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&lcdc_ctl>;
ports {
lvds_out: port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
lvds_out_panel: endpoint@0 {
reg = <0>;
remote-endpoint = <&panel_in_lvds>;
};
};
};
};
&lvds_in_vopb {
status = "disabled"; // LVDS使用vopl, 关闭vopb
};
3、在 源码/device/rockchip/rk3288/device.mk 增加输出屏幕选项
#SCREEN DSI EDP HDMI-A LVDS
PRODUCT_PROPERTY_OVERRIDES +=
sys.hwc.device.primary=LVDS // 主屏
sys.hwc.device.extend=HDMI-A // 副屛
ro.sys.rotation.sensor=false
举报