diff --git a/arch/arm64/boot/dts/rockchip/overlay/Makefile b/arch/arm64/boot/dts/rockchip/overlay/Makefile index 0a00b4b0f3075..d4b3f58d7e704 100644 --- a/arch/arm64/boot/dts/rockchip/overlay/Makefile +++ b/arch/arm64/boot/dts/rockchip/overlay/Makefile @@ -124,7 +124,9 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \ youyeetoo-r1-display-dsi1.dtbo \ youyeetoo-yy3588-camera0-gc8034.dtbo \ youyeetoo-yy3588-camera1-gc8034.dtbo \ + youyeetoo-yy3588-display-dsi0.dtbo \ youyeetoo-yy3588-display-dsi1.dtbo \ + youyeetoo-yy3588-display-edp.dtbo \ khadas-edge2-display-dsi0.dtbo \ khadas-edge2-display-dsi1.dtbo \ khadas-edge2-cam1.dtbo \ diff --git a/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-r1-display-dsi0.dts b/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-r1-display-dsi0.dts index 56d2a063584b3..a9aa974c416c0 100644 --- a/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-r1-display-dsi0.dts +++ b/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-r1-display-dsi0.dts @@ -52,7 +52,7 @@ 248 249 250 251 252 253 254 255 >; default-brightness-level = <200>; - pwms = <&pwm12 0 25000 0>; + pwms = <&pwm12 0 25000 1>; status = "okay"; power-supply = <&vcc5v0_sys>; }; @@ -204,7 +204,7 @@ reset-gpio = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>; max-x = <1024>; max-y = <600>; - tp-size = <911>; + tp-size = <2059>; pinctrl-names = "default"; pinctrl-0 = <&touch_gpio>; status = "okay"; diff --git a/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-r1-display-dsi1.dts b/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-r1-display-dsi1.dts index 0a8b0019ab606..c3f7fd24d692a 100644 --- a/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-r1-display-dsi1.dts +++ b/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-r1-display-dsi1.dts @@ -52,7 +52,7 @@ 248 249 250 251 252 253 254 255 >; default-brightness-level = <200>; - pwms = <&pwm11 0 25000 0>; + pwms = <&pwm11 0 25000 1>; status = "okay"; power-supply = <&vcc5v0_sys>; }; @@ -203,7 +203,7 @@ reset-gpio = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>; max-x = <1024>; max-y = <600>; - tp-size = <911>; + tp-size = <2059>; pinctrl-names = "default"; pinctrl-0 = <&touch_gpio>; status = "okay"; diff --git a/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-yy3588-display-dsi0.dts b/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-yy3588-display-dsi0.dts new file mode 100644 index 0000000000000..ecf6e330bbbfd --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-yy3588-display-dsi0.dts @@ -0,0 +1,254 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include + +/* + * Youyeetoo YY3588 - RK3588 + * 7" 1024x600 LCD on DSI0 (TPC2059 panel, GT911 touch) + */ + +/ { + metadata { + title = "Enable DSI0 Display on Youyeetoo YY3588"; + compatible = "youyeetoo,yy3588"; + category = "display"; + description = "Enable 7 inch 1024x600 MIPI DSI0 display with GT911 touchscreen"; + }; + + fragment@0 { + target-path = "/"; + + __overlay__ { + backlight_dsi0: backlight-dsi0 { + compatible = "pwm-backlight"; + brightness-levels = < + 0 20 20 21 21 22 22 23 + 23 24 24 25 25 26 26 27 + 27 28 28 29 29 30 30 31 + 31 32 32 33 33 34 34 35 + 35 36 36 37 37 38 38 39 + 40 41 42 43 44 45 46 47 + 48 49 50 51 52 53 54 55 + 56 57 58 59 60 61 62 63 + 64 65 66 67 68 69 70 71 + 72 73 74 75 76 77 78 79 + 80 81 82 83 84 85 86 87 + 88 89 90 91 92 93 94 95 + 96 97 98 99 100 101 102 103 + 104 105 106 107 108 109 110 111 + 112 113 114 115 116 117 118 119 + 120 121 122 123 124 125 126 127 + 128 129 130 131 132 133 134 135 + 136 137 138 139 140 141 142 143 + 144 145 146 147 148 149 150 151 + 152 153 154 155 156 157 158 159 + 160 161 162 163 164 165 166 167 + 168 169 170 171 172 173 174 175 + 176 177 178 179 180 181 182 183 + 184 185 186 187 188 189 190 191 + 192 193 194 195 196 197 198 199 + 200 201 202 203 204 205 206 207 + 208 209 210 211 212 213 214 215 + 216 217 218 219 220 221 222 223 + 224 225 226 227 228 229 230 231 + 232 233 234 235 236 237 238 239 + 240 241 242 243 244 245 246 247 + 248 249 250 251 252 253 254 255 + >; + default-brightness-level = <200>; + pwms = <&pwm1 0 25000 1>; + power-supply = <&vcc5v0_sys>; + status = "okay"; + }; + + vcc3v3_lcd_n: vcc3v3-lcd0-n { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_lcd0_n"; + regulator-boot-on; + enable-active-high; + gpio = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>; + vin-supply = <&vcc_3v3_s0>; + }; + }; + }; + + fragment@1 { + target = <&pwm1>; + + __overlay__ { + status = "okay"; + pinctrl-names = "active"; + pinctrl-0 = <&pwm1m0_pins>; + }; + }; + + fragment@2 { + target = <&dsi0>; + + __overlay__ { + status = "okay"; + rockchip,lane-rate = <1000>; + + dsi0_panel: panel@0 { + status = "okay"; + compatible = "simple-panel-dsi"; + reg = <0>; + backlight = <&backlight_dsi0>; + power-supply = <&vcc3v3_lcd_n>; + reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>; + enable-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; + reset-delay-ms = <60>; + enable-delay-ms = <60>; + prepare-delay-ms = <60>; + unprepare-delay-ms = <60>; + disable-delay-ms = <60>; + dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET)>; + dsi,format = ; + dsi,lanes = <4>; + pinctrl-names = "default"; + pinctrl-0 = <&lcd_dsi0_rst_gpio>; + + panel-init-sequence = [ + 15 00 02 80 ac + 15 00 02 81 b8 + 15 00 02 82 09 + 15 00 02 83 78 + 15 00 02 84 7f + 15 00 02 85 bb + 15 00 02 86 70 + ]; + + panel-exit-sequence = [ + 05 00 01 28 + 05 00 01 10 + ]; + + disp_timings0: display-timings { + native-mode = <&dsi0_timing0>; + dsi0_timing0: timing0 { + clock-frequency = <51668640>; + hactive = <1024>; + vactive = <600>; + hfront-porch = <160>; + hback-porch = <160>; + hsync-len = <10>; + vfront-porch = <12>; + vsync-len = <10>; + vback-porch = <23>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <1>; + pixelclk-active = <0>; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + panel_in_dsi: endpoint { + remote-endpoint = <&dsi_out_panel>; + }; + }; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + dsi_out_panel: endpoint { + remote-endpoint = <&panel_in_dsi>; + }; + }; + }; + }; + }; + + fragment@3 { + target = <&route_dsi0>; + + __overlay__ { + status = "okay"; + connect = <&vp3_out_dsi0>; + }; + }; + + fragment@4 { + target = <&dsi0_in_vp2>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@5 { + target = <&dsi0_in_vp3>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@6 { + target = <&mipi_dcphy0>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@7 { + target = <&i2c5>; + + __overlay__ { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c5m0_xfer>; + #address-cells = <1>; + #size-cells = <0>; + + gt9xx_dsi0: gt9xx@5d { + compatible = "goodix,gt9xx"; + reg = <0x5d>; + touch-gpio = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; + reset-gpio = <&gpio2 RK_PB0 GPIO_ACTIVE_HIGH>; + max-x = <1024>; + max-y = <600>; + tp-size = <2059>; + tp-supply = <&vcc_3v3_s0>; + pinctrl-names = "default"; + pinctrl-0 = <&touch_dsi0_gpio>; + status = "okay"; + }; + }; + }; + + fragment@8 { + target = <&pinctrl>; + + __overlay__ { + lcd { + lcd_dsi0_rst_gpio: lcd-dsi0-rst-gpio { + rockchip,pins = + <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>, + <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + touch_dsi0_gpio: touch-dsi0-gpio { + rockchip,pins = + <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>, + <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-yy3588-display-dsi1.dts b/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-yy3588-display-dsi1.dts index 9c00eb5dfaa3e..f0bc07f205467 100644 --- a/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-yy3588-display-dsi1.dts +++ b/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-yy3588-display-dsi1.dts @@ -2,38 +2,42 @@ /plugin/; #include -#include #include +#include + +/* + * Youyeetoo YY3588 - RK3588 + * 7" 1024x600 LCD on DSI1 (TPC2059 panel, GT911 touch) + */ / { metadata { title = "Enable DSI1 Display on Youyeetoo YY3588"; compatible = "youyeetoo,yy3588"; category = "display"; - description = "Enable MIPI DSI1 display with Goodix GT9271 touchscreen"; + description = "Enable 7 inch 1024x600 MIPI DSI1 display with GT911 touchscreen"; }; fragment@0 { target-path = "/"; __overlay__ { - backlight: backlight { + backlight_dsi1: backlight-dsi1 { compatible = "pwm-backlight"; - pwms = <&pwm2 0 25000 0>; brightness-levels = < - 0 20 20 21 21 22 22 23 - 23 24 24 25 25 26 26 27 - 27 28 28 29 29 30 30 31 - 31 32 32 33 33 34 34 35 - 35 36 36 37 37 38 38 39 - 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 - 56 57 58 59 60 61 62 63 - 64 65 66 67 68 69 70 71 - 72 73 74 75 76 77 78 79 - 80 81 82 83 84 85 86 87 - 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 + 0 20 20 21 21 22 22 23 + 23 24 24 25 25 26 26 27 + 27 28 28 29 29 30 30 31 + 31 32 32 33 33 34 34 35 + 35 36 36 37 37 38 38 39 + 40 41 42 43 44 45 46 47 + 48 49 50 51 52 53 54 55 + 56 57 58 59 60 61 62 63 + 64 65 66 67 68 69 70 71 + 72 73 74 75 76 77 78 79 + 80 81 82 83 84 85 86 87 + 88 89 90 91 92 93 94 95 + 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 @@ -55,16 +59,29 @@ 248 249 250 251 252 253 254 255 >; default-brightness-level = <200>; + pwms = <&pwm0 0 25000 1>; + power-supply = <&vcc5v0_sys>; status = "okay"; }; + + vcc3v3_lcd_n: vcc3v3-lcd0-n { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_lcd0_n"; + regulator-boot-on; + enable-active-high; + gpio = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>; + vin-supply = <&vcc_3v3_s0>; + }; }; }; fragment@1 { - target = <&mipi_dcphy1>; + target = <&pwm0>; __overlay__ { status = "okay"; + pinctrl-names = "active"; + pinctrl-0 = <&pwm0m0_pins>; }; }; @@ -73,18 +90,61 @@ __overlay__ { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&mipi_te1>; + rockchip,lane-rate = <1000>; dsi1_panel: panel@0 { status = "okay"; - compatible = "innolux,afj101-ba2131"; + compatible = "simple-panel-dsi"; reg = <0>; - backlight = <&backlight>; - reset-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_LOW>; - enable-gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; + backlight = <&backlight_dsi1>; + power-supply = <&vcc3v3_lcd_n>; + reset-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_LOW>; + enable-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; + reset-delay-ms = <60>; + enable-delay-ms = <60>; + prepare-delay-ms = <60>; + unprepare-delay-ms = <60>; + disable-delay-ms = <60>; + dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET)>; + dsi,format = ; + dsi,lanes = <4>; pinctrl-names = "default"; - pinctrl-0 = <&lcd_rst_gpio>; + pinctrl-0 = <&lcd_dsi1_rst_gpio>; + + panel-init-sequence = [ + 15 00 02 80 ac + 15 00 02 81 b8 + 15 00 02 82 09 + 15 00 02 83 78 + 15 00 02 84 7f + 15 00 02 85 bb + 15 00 02 86 70 + ]; + + panel-exit-sequence = [ + 05 00 01 28 + 05 00 01 10 + ]; + + disp_timings1: display-timings { + native-mode = <&dsi1_timing0>; + dsi1_timing0: timing0 { + clock-frequency = <51668640>; + hactive = <1024>; + vactive = <600>; + hfront-porch = <160>; + hback-porch = <160>; + hsync-len = <10>; + vfront-porch = <12>; + vsync-len = <10>; + vback-porch = <23>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <1>; + pixelclk-active = <0>; + }; + }; ports { #address-cells = <1>; @@ -114,57 +174,77 @@ }; fragment@3 { - target = <&dsi1_in_vp2>; + target = <&route_dsi1>; __overlay__ { - status = "disabled"; + status = "okay"; + connect = <&vp3_out_dsi1>; }; }; fragment@4 { - target = <&dsi1_in_vp3>; + target = <&dsi1_in_vp2>; __overlay__ { - status = "okay"; + status = "disabled"; }; }; fragment@5 { - target = <&route_dsi1>; + target = <&dsi1_in_vp3>; __overlay__ { status = "okay"; - connect = <&vp3_out_dsi1>; }; }; fragment@6 { - target = <&i2c7>; + target = <&mipi_dcphy1>; __overlay__ { status = "okay"; + }; + }; + + fragment@7 { + target = <&i2c6>; - gt9xx_0: touchscreen@14 { - compatible = "goodix,gt9271"; - reg = <0x14>; - interrupt-parent = <&gpio2>; - interrupts = ; - irq-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>; - reset-gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>; - touchscreen-size-x = <1080>; - touchscreen-size-y = <1920>; + __overlay__ { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + gt9xx_dsi1: gt9xx@5d { + compatible = "goodix,gt9xx"; + reg = <0x5d>; + touch-gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; + reset-gpio = <&gpio2 RK_PB3 GPIO_ACTIVE_HIGH>; + max-x = <1024>; + max-y = <600>; + tp-size = <2059>; + tp-supply = <&vcc_3v3_s0>; + pinctrl-names = "default"; + pinctrl-0 = <&touch_dsi1_gpio>; status = "okay"; }; }; }; - fragment@7 { + fragment@8 { target = <&pinctrl>; __overlay__ { lcd { - lcd_rst_gpio: lcd-rst-gpio { - rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; + lcd_dsi1_rst_gpio: lcd-dsi1-rst-gpio { + rockchip,pins = + <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>, + <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + touch_dsi1_gpio: touch-dsi1-gpio { + rockchip,pins = + <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>, + <2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; }; }; }; diff --git a/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-yy3588-display-edp.dts b/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-yy3588-display-edp.dts new file mode 100644 index 0000000000000..f0d0b1efdea53 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/youyeetoo-yy3588-display-edp.dts @@ -0,0 +1,224 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/* + * Youyeetoo YY3588 - RK3588 + * 11.6" 1920x1080 LCD on eDP1 (GT928 touch) + */ + +/ { + metadata { + title = "Enable eDP Display on Youyeetoo YY3588"; + compatible = "youyeetoo,yy3588"; + category = "display"; + description = "Enable 11.6 inch 1920x1080 eDP display with GT928 touchscreen"; + }; + + fragment@0 { + target-path = "/"; + + __overlay__ { + backlight_edp: backlight-edp { + compatible = "pwm-backlight"; + brightness-levels = < + 0 20 20 21 21 22 22 23 + 23 24 24 25 25 26 26 27 + 27 28 28 29 29 30 30 31 + 31 32 32 33 33 34 34 35 + 35 36 36 37 37 38 38 39 + 40 41 42 43 44 45 46 47 + 48 49 50 51 52 53 54 55 + 56 57 58 59 60 61 62 63 + 64 65 66 67 68 69 70 71 + 72 73 74 75 76 77 78 79 + 80 81 82 83 84 85 86 87 + 88 89 90 91 92 93 94 95 + 96 97 98 99 100 101 102 103 + 104 105 106 107 108 109 110 111 + 112 113 114 115 116 117 118 119 + 120 121 122 123 124 125 126 127 + 128 129 130 131 132 133 134 135 + 136 137 138 139 140 141 142 143 + 144 145 146 147 148 149 150 151 + 152 153 154 155 156 157 158 159 + 160 161 162 163 164 165 166 167 + 168 169 170 171 172 173 174 175 + 176 177 178 179 180 181 182 183 + 184 185 186 187 188 189 190 191 + 192 193 194 195 196 197 198 199 + 200 201 202 203 204 205 206 207 + 208 209 210 211 212 213 214 215 + 216 217 218 219 220 221 222 223 + 224 225 226 227 228 229 230 231 + 232 233 234 235 236 237 238 239 + 240 241 242 243 244 245 246 247 + 248 249 250 251 252 253 254 255 + >; + default-brightness-level = <200>; + pwms = <&pwm15 0 25000 0>; + power-supply = <&vcc5v0_sys>; + status = "okay"; + }; + + vcc3v3_lcd: vcc3v3-lcd { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_lcd"; + vin-supply = <&vcc_3v3_s0>; + }; + + panel_edp1: panel-edp1 { + compatible = "simple-panel"; + backlight = <&backlight_edp>; + power-supply = <&vcc3v3_lcd>; + /* Panel enable pad GPIO0_C4 is already held high by the + * always-on wifi_disable regulator in the board DTS. + */ + prepare-delay-ms = <120>; + enable-delay-ms = <120>; + unprepare-delay-ms = <120>; + disable-delay-ms = <120>; + width-mm = <256>; + height-mm = <144>; + status = "okay"; + + panel-timing { + clock-frequency = <141500000>; + hactive = <1920>; + vactive = <1080>; + hfront-porch = <100>; + hsync-len = <22>; + hback-porch = <100>; + vfront-porch = <8>; + vsync-len = <4>; + vback-porch = <8>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + }; + + port { + panel_in_edp1: endpoint { + remote-endpoint = <&edp1_out_panel>; + }; + }; + }; + }; + }; + + fragment@1 { + target = <&pwm15>; + + __overlay__ { + status = "okay"; + pinctrl-names = "active"; + pinctrl-0 = <&pwm15m2_pins>; + }; + }; + + fragment@2 { + target = <&edp1>; + + __overlay__ { + status = "okay"; + force-hpd; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + edp1_out_panel: endpoint { + remote-endpoint = <&panel_in_edp1>; + }; + }; + }; + }; + }; + + fragment@3 { + target = <&hdptxphy1>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@4 { + target = <&edp1_in_vp0>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@5 { + target = <&edp1_in_vp1>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@6 { + target = <&edp1_in_vp2>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@7 { + target = <&route_edp1>; + + __overlay__ { + status = "okay"; + connect = <&vp1_out_edp1>; + }; + }; + + fragment@8 { + target = <&i2c3>; + + __overlay__ { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c3m0_xfer>; + #address-cells = <1>; + #size-cells = <0>; + + gt9xx_edp: gt9xx@5d { + compatible = "goodix,gt9xx"; + reg = <0x5d>; + touch-gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; + reset-gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>; + max-x = <1920>; + max-y = <1080>; + tp-size = <928>; + tp-supply = <&vcc_3v3_s0>; + pinctrl-names = "default"; + pinctrl-0 = <&touch_edp_gpio>; + status = "okay"; + }; + }; + }; + + fragment@9 { + target = <&pinctrl>; + + __overlay__ { + lcd { + touch_edp_gpio: touch-edp-gpio { + rockchip,pins = + <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>, + <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3588-youyeetoo-yy3588.dts b/arch/arm64/boot/dts/rockchip/rk3588-youyeetoo-yy3588.dts index 8baca5dceb975..4338f6f3f948b 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-youyeetoo-yy3588.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-youyeetoo-yy3588.dts @@ -442,7 +442,7 @@ /* Should work with at least 256MB cma reserved above. */ &hdmirx_ctrler { #sound-dai-cells = <1>; - hdmirx-det-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>; + hdmirx-det-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>; hpd-trigger-level = <1>; pinctrl-names = "default"; pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_det>; @@ -745,7 +745,7 @@ &pinctrl { hdmi { hdmirx_det: hdmirx-det { - rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; + rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; }; }; diff --git a/drivers/input/touchscreen/gt9xx/2059-V1-1024X600.cfg b/drivers/input/touchscreen/gt9xx/2059-V1-1024X600.cfg new file mode 100755 index 0000000000000..9a326dad6b76f --- /dev/null +++ b/drivers/input/touchscreen/gt9xx/2059-V1-1024X600.cfg @@ -0,0 +1 @@ +0x50,0x00,0x04,0x58,0x02,0x05,0x0D,0x00,0x01,0x0A,0x28,0x0F,0x50,0x32,0x03,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x17,0x19,0x1C,0x14,0x8C,0x2D,0x0E,0x4E,0x50,0xEB,0x04,0x00,0x00,0x00,0x00,0x02,0x10,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x64,0x94,0xC5,0x02,0x07,0x00,0x00,0x04,0x9E,0x48,0x00,0x8D,0x4D,0x00,0x7F,0x53,0x00,0x73,0x59,0x00,0x67,0x60,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,0x18,0x1A,0x1C,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x02,0x04,0x06,0x08,0x0A,0x0C,0x0F,0x10,0x12,0x13,0x14,0x18,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x24,0x26,0x28,0x29,0x2A,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x20,0x01 \ No newline at end of file diff --git a/drivers/input/touchscreen/gt9xx/GT928_Config_20190318_111541.cfg b/drivers/input/touchscreen/gt9xx/GT928_Config_20190318_111541.cfg new file mode 100755 index 0000000000000..6ca7b76802101 --- /dev/null +++ b/drivers/input/touchscreen/gt9xx/GT928_Config_20190318_111541.cfg @@ -0,0 +1 @@ +0x45,0x80,0x07,0x38,0x04,0x0A,0x35,0x00,0x01,0x08,0x28,0x0F,0x5A,0x46,0x03,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1A,0x1C,0x1E,0x14,0x90,0x30,0xCC,0x1F,0x21,0x7C,0x06,0x00,0x00,0x02,0x21,0x03,0x2D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x32,0x94,0xC5,0x02,0x07,0x00,0x00,0x04,0xA9,0x16,0x00,0x93,0x1A,0x00,0x7F,0x1F,0x00,0x6D,0x26,0x00,0x61,0x2D,0x00,0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1D,0x1C,0x1B,0x1A,0x19,0x18,0x17,0x16,0x15,0x14,0x11,0x10,0x0F,0x0E,0x0D,0x0C,0x09,0x08,0x07,0x06,0x05,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2A,0x29,0x28,0x27,0x26,0x25,0x24,0x23,0x22,0x21,0x20,0x1F,0x1E,0x1C,0x1B,0x19,0x14,0x13,0x12,0x11,0x10,0x0F,0x0E,0x0D,0x0C,0x0A,0x08,0x07,0x06,0x04,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x01 \ No newline at end of file diff --git a/drivers/input/touchscreen/gt9xx/TPC2059-7.0-Config_20241122_143209.cfg b/drivers/input/touchscreen/gt9xx/TPC2059-7.0-Config_20241122_143209.cfg new file mode 100755 index 0000000000000..2f3cf51816cc2 --- /dev/null +++ b/drivers/input/touchscreen/gt9xx/TPC2059-7.0-Config_20241122_143209.cfg @@ -0,0 +1 @@ +0x50,0x00,0x04,0x58,0x02,0x05,0x0D,0x00,0x01,0x0A,0x28,0x0F,0x50,0x32,0x03,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x17,0x19,0x1C,0x14,0x87,0x29,0x0A,0x4E,0x50,0xEB,0x04,0x00,0x00,0x00,0x00,0x02,0x11,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x64,0x94,0xC5,0x02,0x07,0x00,0x00,0x04,0x9E,0x48,0x00,0x8D,0x4D,0x00,0x7F,0x53,0x00,0x73,0x59,0x00,0x67,0x60,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x06,0x08,0x0A,0x0C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x24,0x26,0x28,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5C,0x01 \ No newline at end of file diff --git a/drivers/input/touchscreen/gt9xx/gt9xx.c b/drivers/input/touchscreen/gt9xx/gt9xx.c index b1a49235b102f..71c0d8bbdd0ac 100644 --- a/drivers/input/touchscreen/gt9xx/gt9xx.c +++ b/drivers/input/touchscreen/gt9xx/gt9xx.c @@ -63,6 +63,8 @@ static u8 bgt9110 = FALSE; static u8 bgt9111 = FALSE; static u8 bgt970 = FALSE; static u8 bgt910 = FALSE; +static u8 bgt2059 = FALSE; +static u8 bgt928 = FALSE; static u8 gtp_change_x2y = TRUE; static u8 gtp_x_reverse = FALSE; static u8 gtp_y_reverse = TRUE; @@ -1478,6 +1480,16 @@ static s32 gtp_init_panel(struct goodix_ts_data *ts) cfg_info_len[0] = CFG_GROUP_LEN(gtp_dat_7); } + if (bgt2059) { + send_cfg_buf[0] = gtp_dat_tpc2059; + cfg_info_len[0] = CFG_GROUP_LEN(gtp_dat_tpc2059); + } + + if (bgt928) { + send_cfg_buf[0] = gtp_dat_gt928; + cfg_info_len[0] = CFG_GROUP_LEN(gtp_dat_gt928); + } + GTP_DEBUG_FUNC(); GTP_DEBUG("Config Groups\' Lengths: %d, %d, %d, %d, %d, %d", cfg_info_len[0], cfg_info_len[1], cfg_info_len[2], cfg_info_len[3], @@ -2696,6 +2708,24 @@ static int goodix_ts_probe(struct i2c_client *client, const struct i2c_device_id gtp_change_x2y = TRUE; gtp_x_reverse = FALSE; gtp_y_reverse = FALSE; + } else if (val == 2059) { + /* TPC2059 7" 1024x600 panel (Youyeetoo R1 / YY3588 DSI kits): + * vendor cfg blob reports raw coordinates 1:1 with the panel. + */ + m89or101 = FALSE; + bgt2059 = TRUE; + gtp_change_x2y = FALSE; + gtp_x_reverse = FALSE; + gtp_y_reverse = FALSE; + } else if (val == 928) { + /* GT928 11.6" 1920x1080 eDP kit (Youyeetoo YY3588): sensor is + * portrait-wired, swap axes and reverse X per vendor tuning. + */ + m89or101 = FALSE; + bgt928 = TRUE; + gtp_change_x2y = TRUE; + gtp_x_reverse = TRUE; + gtp_y_reverse = FALSE; } else if (val == 970) { m89or101 = FALSE; bgt911 = FALSE; diff --git a/drivers/input/touchscreen/gt9xx/gt9xx_cfg.h b/drivers/input/touchscreen/gt9xx/gt9xx_cfg.h index 715911554c021..78f273c5e0efc 100644 --- a/drivers/input/touchscreen/gt9xx/gt9xx_cfg.h +++ b/drivers/input/touchscreen/gt9xx/gt9xx_cfg.h @@ -67,4 +67,14 @@ static u8 gtp_dat_7[] = { #include "WGJ10187_GT910_Config_20140623_104014_0X41.cfg" }; +static u8 gtp_dat_tpc2059[] = { + /* <1024, 600> TPC2059 7.0 (Youyeetoo R1 / YY3588 DSI kit) */ + #include "TPC2059-7.0-Config_20241122_143209.cfg" +}; + +static u8 gtp_dat_gt928[] = { + /* <1920, 1080> 11.6 eDP (Youyeetoo YY3588 eDP kit) */ + #include "GT928_Config_20190318_111541.cfg" +}; + #endif /* _GOODIX_GT9XX_CFG_H_ */