|
20 | 20 | zephyr,sram = &sram0;
|
21 | 21 | zephyr,flash = &flash0;
|
22 | 22 | zephyr,ccm = &ccm0;
|
| 23 | + zephyr,display = <dc; |
| 24 | + zephyr,touch = &ft5336; |
23 | 25 | };
|
24 | 26 |
|
25 | 27 | sdram1: sdram@c0000000 {
|
|
53 | 55 | };
|
54 | 56 | };
|
55 | 57 |
|
| 58 | + lvgl_pointer { |
| 59 | + compatible = "zephyr,lvgl-pointer-input"; |
| 60 | + input = <&ft5336>; |
| 61 | + invert-y; |
| 62 | + }; |
| 63 | + |
56 | 64 | gpio_keys {
|
57 | 65 | compatible = "gpio-keys";
|
58 | 66 |
|
|
63 | 71 | };
|
64 | 72 | };
|
65 | 73 |
|
| 74 | + dsi_lcd_qsh_030: connector_dsi_lcd { |
| 75 | + compatible = "st,dsi-lcd-qsh-030"; |
| 76 | + #gpio-cells = <2>; |
| 77 | + gpio-map-mask = <0xffffffff 0xffffffc0>; |
| 78 | + gpio-map-pass-thru = <0 0x3f>; |
| 79 | + gpio-map = <4 0 &gpioj 5 0>, /* TOUCH_INT */ |
| 80 | + <40 0 &gpiob 9 0>, /* I2C1_SDA */ |
| 81 | + <44 0 &gpiob 8 0>, /* I2C1_SCL */ |
| 82 | + <49 0 &gpioj 2 0>, /* DSI_TE */ |
| 83 | + <53 0 &gpioa 3 0>, /* LCD_BL_CTRL */ |
| 84 | + <57 0 &gpioh 7 0>; /* DSI_RESET */ |
| 85 | + }; |
| 86 | + |
66 | 87 | aliases {
|
67 | 88 | led0 = &green_led_1;
|
68 | 89 | led1 = &orange_led_2;
|
|
86 | 107 | mul-n = <336>;
|
87 | 108 | div-p = <2>;
|
88 | 109 | div-q = <7>;
|
| 110 | + div-r = <6>; |
| 111 | + clocks = <&clk_hse>; |
| 112 | + status = "okay"; |
| 113 | +}; |
| 114 | + |
| 115 | +&pllsai { |
| 116 | + div-m = <8>; |
| 117 | + mul-n = <266>; |
| 118 | + div-p = <2>; |
| 119 | + div-r = <5>; |
| 120 | + div-divr = <2>; |
89 | 121 | clocks = <&clk_hse>;
|
90 | 122 | status = "okay";
|
91 | 123 | };
|
|
116 | 148 | pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
|
117 | 149 | pinctrl-names = "default";
|
118 | 150 | status = "okay";
|
| 151 | + |
| 152 | + ft5336: ft5336@2a { |
| 153 | + compatible = "focaltech,ft5336"; |
| 154 | + reg = <0x2a>; |
| 155 | + int-gpios = <&gpioj 5 0>; |
| 156 | + status = "okay"; |
| 157 | + }; |
119 | 158 | };
|
120 | 159 |
|
121 | 160 | &spi2 {
|
@@ -198,3 +237,64 @@ zephyr_udc0: &usbotg_fs {
|
198 | 237 | };
|
199 | 238 | };
|
200 | 239 | };
|
| 240 | + |
| 241 | +&mipi_dsi { |
| 242 | + |
| 243 | + status = "okay"; |
| 244 | + otm8009a: otm8009a@0 { |
| 245 | + status = "okay"; |
| 246 | + compatible = "orisetech,otm8009a"; |
| 247 | + reg = <0x0>; |
| 248 | + height = <800>; |
| 249 | + width = <480>; |
| 250 | + reset-gpios = <&gpioh 7 0>; |
| 251 | + bl-gpios = <&gpioa 3 0>; |
| 252 | + data-lanes = <2>; |
| 253 | + pixel-format = <MIPI_DSI_PIXFMT_RGB888>; |
| 254 | + rotation = <90>; |
| 255 | + }; |
| 256 | + |
| 257 | + /* DSI HOST dedicated PLL |
| 258 | + * F_VCO = CLK_IN / pll-idf * 2 * pll-ndiv |
| 259 | + * PHI = F_VCO / 2 / (1 << pll-odf) = lane_byte_clk |
| 260 | + * = 8 MHz / 2 * 2 * 125 / 2 / (1<<0) / 8 = 62.5 MHz |
| 261 | + */ |
| 262 | + pll-ndiv = <125>; // 125 |
| 263 | + pll-idf = <2>; // 2 |
| 264 | + pll-odf = <0>; // 1 |
| 265 | + |
| 266 | + // test-pattern = <0>; //for testing purpose |
| 267 | + |
| 268 | + vs-active-high; |
| 269 | + hs-active-high; |
| 270 | + de-active-high; |
| 271 | + |
| 272 | +}; |
| 273 | + |
| 274 | +/* alias used by LCD display shields */ |
| 275 | +<dc { |
| 276 | + status = "okay"; |
| 277 | + width = <800>; |
| 278 | + height = <480>; |
| 279 | + pixel-format = <PANEL_PIXEL_FORMAT_RGB_888>; |
| 280 | + ext-sdram = <&sdram1>; |
| 281 | + /* orisetech, otm8009a */ |
| 282 | + display-timings { |
| 283 | + compatible = "zephyr,panel-timing"; |
| 284 | + hsync-active = <0>; |
| 285 | + vsync-active = <0>; |
| 286 | + de-active = <0>; |
| 287 | + pixelclk-active = <0>; |
| 288 | + hsync-len = <2>; |
| 289 | + vsync-len = <1>; |
| 290 | + hback-porch = <34>; |
| 291 | + vback-porch = <15>; |
| 292 | + hfront-porch = <34>; |
| 293 | + vfront-porch = <16>; |
| 294 | + }; |
| 295 | + |
| 296 | + def-back-color-red = <0>; |
| 297 | + def-back-color-green = <0>; |
| 298 | + def-back-color-blue = <0>; |
| 299 | + |
| 300 | +}; |
0 commit comments