|
| 1 | +/* |
| 2 | + * vc4-kms-dsi-yousee-yx070amsha01-overlay.dts |
| 3 | + * |
| 4 | + * Yousee YX070AMSHA01 touchscreen display panel |
| 5 | + */ |
| 6 | + |
| 7 | +/dts-v1/; |
| 8 | +/plugin/; |
| 9 | + |
| 10 | +#include <dt-bindings/gpio/gpio.h> |
| 11 | + |
| 12 | +/* |
| 13 | + * Note: the ft3519 driver can also take a reset-gpio (active low, i.e. |
| 14 | + * it sets the value to zero to bring the value high). So we could likely |
| 15 | + * do away with touch_reg. |
| 16 | + */ |
| 17 | + |
| 18 | +/ { |
| 19 | + compatible = "brcm,bcm2835"; |
| 20 | + |
| 21 | + i2c_frag: fragment@0 { |
| 22 | + target = <&i2c_csi_dsi>; |
| 23 | + __overlay__ { |
| 24 | + #address-cells = <1>; |
| 25 | + #size-cells = <0>; |
| 26 | + status = "okay"; |
| 27 | + |
| 28 | + display_mcu: display_mcu@45 { |
| 29 | + compatible = "padl,xebra-touchscreen-panel-regulator"; |
| 30 | + reg = <0x45>; |
| 31 | + gpio-controller; |
| 32 | + #gpio-cells = <2>; |
| 33 | + }; |
| 34 | + |
| 35 | + ft3519: ft3519@38 { |
| 36 | + compatible = "focaltech,ft3519"; |
| 37 | + reg = <0x38>; |
| 38 | + touchscreen-size-x = <1080>; |
| 39 | + touchscreen-size-y = <1920>; |
| 40 | + touchscreen-x-mm = <87>; |
| 41 | + touchscreen-y-mm = <155>; |
| 42 | + }; |
| 43 | + }; |
| 44 | + }; |
| 45 | + |
| 46 | + dsi_frag: fragment@1 { |
| 47 | + target = <&dsi1>; |
| 48 | + __overlay__ { |
| 49 | + #address-cells = <1>; |
| 50 | + #size-cells = <0>; |
| 51 | + status = "okay"; |
| 52 | + |
| 53 | + port { |
| 54 | + dsi_out: endpoint { |
| 55 | + remote-endpoint = <&panel_in>; |
| 56 | + }; |
| 57 | + }; |
| 58 | + |
| 59 | + dsi_panel: dsi_panel@0 { |
| 60 | + reg = <0>; |
| 61 | + compatible = "yousee,yx070amsha01"; |
| 62 | + reset-gpios = <&display_mcu 1 GPIO_ACTIVE_LOW>; /* LCD_RST */ |
| 63 | + vcc-lcd-supply = <&lcd_reg>; |
| 64 | + |
| 65 | + port { |
| 66 | + panel_in: endpoint { |
| 67 | + remote-endpoint = <&dsi_out>; |
| 68 | + }; |
| 69 | + }; |
| 70 | + }; |
| 71 | + }; |
| 72 | + }; |
| 73 | + |
| 74 | + fragment@2 { |
| 75 | + target = <&i2c0if>; |
| 76 | + __overlay__ { |
| 77 | + status = "okay"; |
| 78 | + }; |
| 79 | + }; |
| 80 | + |
| 81 | + fragment@3 { |
| 82 | + target = <&i2c0mux>; |
| 83 | + __overlay__ { |
| 84 | + status = "okay"; |
| 85 | + }; |
| 86 | + }; |
| 87 | + |
| 88 | + fragment@4 { |
| 89 | + target-path = "/"; |
| 90 | + __overlay__ { |
| 91 | + lcd_reg: lcd_reg@0 { |
| 92 | + reg = <0>; |
| 93 | + compatible = "regulator-fixed"; |
| 94 | + regulator-name = "lcd_reg"; |
| 95 | + gpio = <&display_mcu 0 GPIO_ACTIVE_HIGH>; |
| 96 | + enable-active-high; |
| 97 | + }; |
| 98 | + |
| 99 | + touch_reg: touch_reg@1 { |
| 100 | + reg = <1>; |
| 101 | + compatible = "regulator-fixed"; |
| 102 | + regulator-name = "touch_reg_1"; |
| 103 | + gpio = <&display_mcu 4 GPIO_ACTIVE_HIGH>; |
| 104 | + startup-delay-us = <50000>; |
| 105 | + enable-active-high; |
| 106 | + }; |
| 107 | + }; |
| 108 | + }; |
| 109 | + |
| 110 | + fragment@10 { |
| 111 | + target = <&ft3519>; |
| 112 | + __dormant__ { |
| 113 | + touchscreen-inverted-x; |
| 114 | + }; |
| 115 | + }; |
| 116 | + |
| 117 | + fragment@11 { |
| 118 | + target = <&ft3519>; |
| 119 | + __dormant__ { |
| 120 | + touchscreen-inverted-y; |
| 121 | + }; |
| 122 | + }; |
| 123 | + |
| 124 | + __overrides__ { |
| 125 | + dsi0 = <&dsi_frag>, "target:0=",<&dsi0>, |
| 126 | + <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>, |
| 127 | + <&touch_reg>, "reg:0=0", |
| 128 | + <&touch_reg>, "regulator-name=touch_reg_0"; |
| 129 | + invx = <0>, "-10"; |
| 130 | + invy = <0>, "-11"; |
| 131 | + sizex = <&ft3519>,"touchscreen-size-x:0"; |
| 132 | + sizey = <&ft3519>,"touchscreen-size-y:0"; |
| 133 | + swapxy = <&ft3519>,"touchscreen-swapped-x-y?"; |
| 134 | + disable_touch = <&ft3519>, "status=disabled"; |
| 135 | + }; |
| 136 | +}; |
0 commit comments