|
| 1 | +/dts-v1/; |
| 2 | +/plugin/; |
| 3 | + |
| 4 | +#include <dt-bindings/gpio/gpio.h> |
| 5 | +#include <dt-bindings/pinctrl/rockchip.h> |
| 6 | +#include <dt-bindings/pwm/pwm.h> |
| 7 | + |
| 8 | +/ { |
| 9 | + metadata { |
| 10 | + title = "Enable BOE MV185WHB-N20 LVDS Display"; |
| 11 | + compatible = "unknown"; |
| 12 | + category = "display"; |
| 13 | + exclusive = "lvds", "pwm6"; |
| 14 | + description = "Enable BOE MV185WHB-N20 LVDS Display."; |
| 15 | + }; |
| 16 | +}; |
| 17 | + |
| 18 | +&{/} { |
| 19 | + backlight_lvds: backlight-lvds { |
| 20 | + status = "okay"; |
| 21 | + compatible = "pwm-backlight"; |
| 22 | + pwms = <&pwm6 0 25000 PWM_POLARITY_INVERTED>; |
| 23 | + brightness-levels = < |
| 24 | + 0 20 20 21 21 22 22 23 |
| 25 | + 23 24 24 25 25 26 26 27 |
| 26 | + 27 28 28 29 29 30 30 31 |
| 27 | + 31 32 32 33 33 34 34 35 |
| 28 | + 35 36 36 37 37 38 38 39 |
| 29 | + 40 41 42 43 44 45 46 47 |
| 30 | + 48 49 50 51 52 53 54 55 |
| 31 | + 56 57 58 59 60 61 62 63 |
| 32 | + 64 65 66 67 68 69 70 71 |
| 33 | + 72 73 74 75 76 77 78 79 |
| 34 | + 80 81 82 83 84 85 86 87 |
| 35 | + 88 89 90 91 92 93 94 95 |
| 36 | + 96 97 98 99 100 101 102 103 |
| 37 | + 104 105 106 107 108 109 110 111 |
| 38 | + 112 113 114 115 116 117 118 119 |
| 39 | + 120 121 122 123 124 125 126 127 |
| 40 | + 128 129 130 131 132 133 134 135 |
| 41 | + 136 137 138 139 140 141 142 143 |
| 42 | + 144 145 146 147 148 149 150 151 |
| 43 | + 152 153 154 155 156 157 158 159 |
| 44 | + 160 161 162 163 164 165 166 167 |
| 45 | + 168 169 170 171 172 173 174 175 |
| 46 | + 176 177 178 179 180 181 182 183 |
| 47 | + 184 185 186 187 188 189 190 191 |
| 48 | + 192 193 194 195 196 197 198 199 |
| 49 | + 200 201 202 203 204 205 206 207 |
| 50 | + 208 209 210 211 212 213 214 215 |
| 51 | + 216 217 218 219 220 221 222 223 |
| 52 | + 224 225 226 227 228 229 230 231 |
| 53 | + 232 233 234 235 236 237 238 239 |
| 54 | + 240 241 242 243 244 245 246 247 |
| 55 | + 248 249 250 251 252 253 254 255 |
| 56 | + >; |
| 57 | + default-brightness-level = <50>; |
| 58 | + enable-gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; |
| 59 | + }; |
| 60 | + |
| 61 | + vcc3v3_lcd_lvds: vcc3v3-lcd-lvds { |
| 62 | + status = "okay"; |
| 63 | + compatible = "regulator-fixed"; |
| 64 | + gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; |
| 65 | + enable-active-high; |
| 66 | + regulator-name = "vcc3v3_lcd_lvds"; |
| 67 | + regulator-boot-on; |
| 68 | + regulator-state-mem { |
| 69 | + regulator-off-in-suspend; |
| 70 | + }; |
| 71 | + }; |
| 72 | + |
| 73 | + lvds_panel: lvds-panel { |
| 74 | + status = "okay"; |
| 75 | + compatible = "simple-panel"; |
| 76 | + backlight = <&backlight_lvds>; |
| 77 | + power-supply = <&vcc3v3_lcd_lvds>; |
| 78 | + pinctrl-names = "default"; |
| 79 | + rockchip,data-mapping = "vesa"; // LVDS Data Format |
| 80 | + prepare-delay-ms = <100>; |
| 81 | + enable-delay-ms = <10>; |
| 82 | + display-timings { |
| 83 | + native-mode = <&timing1>; |
| 84 | + timing1: timing1 { |
| 85 | + clock-frequency = <65000000>; |
| 86 | + hactive = <1366>; |
| 87 | + vactive = <768>; |
| 88 | + hfront-porch = <200>; |
| 89 | + hsync-len = <52>; |
| 90 | + hback-porch = <200>; |
| 91 | + vfront-porch = <25>; |
| 92 | + vsync-len = <4>; |
| 93 | + vback-porch = <25>; |
| 94 | + hsync-active = <0>; |
| 95 | + vsync-active = <0>; |
| 96 | + de-active = <1>; |
| 97 | + pixelclk-active = <0>; |
| 98 | + }; |
| 99 | + }; |
| 100 | + |
| 101 | + ports { |
| 102 | + panel_in_lvds: endpoint { |
| 103 | + remote-endpoint = <&lvds_out_panel>; |
| 104 | + }; |
| 105 | + }; |
| 106 | + }; |
| 107 | +}; |
| 108 | + |
| 109 | +&pwm6 { |
| 110 | + status = "okay"; |
| 111 | +}; |
| 112 | + |
| 113 | +&video_phy0 { |
| 114 | + status = "okay"; |
| 115 | +}; |
| 116 | + |
| 117 | +&lvds { |
| 118 | + status = "okay"; |
| 119 | + |
| 120 | + ports { |
| 121 | + port@1 { |
| 122 | + reg = <1>; |
| 123 | + |
| 124 | + lvds_out_panel: endpoint { |
| 125 | + remote-endpoint = <&panel_in_lvds>; |
| 126 | + }; |
| 127 | + }; |
| 128 | + }; |
| 129 | +}; |
| 130 | + |
| 131 | + |
| 132 | +&lvds_in_vp1 { |
| 133 | + status = "okay"; |
| 134 | +}; |
| 135 | + |
| 136 | +&lvds_in_vp2 { |
| 137 | + status = "disabled"; |
| 138 | +}; |
| 139 | + |
| 140 | +&route_lvds { |
| 141 | + status = "okay"; |
| 142 | + connect = <&vp1_out_lvds>; |
| 143 | +}; |
| 144 | + |
| 145 | +&pinctrl { |
| 146 | + lvds-lcd { |
| 147 | + vcc3v3_lcd_lvds_en: vcc3v3-lcd-lvds-en { |
| 148 | + rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; |
| 149 | + }; |
| 150 | + |
| 151 | + cabc_en_en: cabc-en-en { |
| 152 | + rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; |
| 153 | + }; |
| 154 | + }; |
| 155 | +}; |
0 commit comments