From feac11a4505a3cec7e1d6a8f1e758d0fc8963abb Mon Sep 17 00:00:00 2001 From: hejiawencc Date: Tue, 25 Jul 2023 10:42:57 +0800 Subject: [PATCH] =?UTF-8?q?dts=20LubanCat-1H=E9=80=82=E9=85=8DEDP=E5=B1=8F?= =?UTF-8?q?=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arch/arm64/boot/dts/rockchip/overlay/Makefile | 2 + .../rk3566-lubancat-1h-edp-in-vp0-overlay.dts | 139 ++++++++++++++++++ ...566-lubancat-1h-lvds-edp-touch-overlay.dts | 32 ++++ .../boot/dts/rockchip/rk3566-lubancat-1h.dts | 86 +++++------ .../boot/dts/rockchip/uEnv/uEnvLubanCat1H.txt | 4 +- 5 files changed, 220 insertions(+), 43 deletions(-) create mode 100644 arch/arm64/boot/dts/rockchip/overlay/rk3566-lubancat-1h-edp-in-vp0-overlay.dts create mode 100644 arch/arm64/boot/dts/rockchip/overlay/rk3566-lubancat-1h-lvds-edp-touch-overlay.dts diff --git a/arch/arm64/boot/dts/rockchip/overlay/Makefile b/arch/arm64/boot/dts/rockchip/overlay/Makefile index 525f99cde6a1..413220f537a1 100644 --- a/arch/arm64/boot/dts/rockchip/overlay/Makefile +++ b/arch/arm64/boot/dts/rockchip/overlay/Makefile @@ -38,6 +38,8 @@ dtbo-$(CONFIG_CPU_RK3568) += \ rk356x-lubancat-uart8-m1-overlay.dtbo \ rk356x-lubancat-uart9-m1-overlay.dtbo \ rk3566-lubancat-0-spi3-m1-gpio-cs-overlay.dtbo \ + rk3566-lubancat-1h-edp-in-vp0-overlay.dtbo \ + rk3566-lubancat-1h-lvds-edp-touch-overlay.dtbo \ rk3566-lubancat-1io-dsi0-in-vp0-7.0-1024x600-overlay.dtbo \ rk3566-lubancat-1io-dsi0-in-vp0-10.1-800x1280-overlay.dtbo \ rk3566-lubancat-1io-dsi0-in-vp0-1080p-overlay.dtbo \ diff --git a/arch/arm64/boot/dts/rockchip/overlay/rk3566-lubancat-1h-edp-in-vp0-overlay.dts b/arch/arm64/boot/dts/rockchip/overlay/rk3566-lubancat-1h-edp-in-vp0-overlay.dts new file mode 100644 index 000000000000..2f92f264af1d --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rk3566-lubancat-1h-edp-in-vp0-overlay.dts @@ -0,0 +1,139 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + + fragment@0 { + target = <&route_edp>; + + __overlay__ { + status = "okay"; + connect = <&vp0_out_edp>; + }; + }; + + fragment@1 { + target = <&edp_phy>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@2 { + target = <&edp_in_vp0>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@3 { + target = <&edp_in_vp1>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@4 { + target = <&edp>; + + __overlay__ { + status = "okay"; + // hpd-gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_HIGH>; //热插拔信号检测 + force-hpd; //强制hpd,忽略物理hdp信号 + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + edp_out_panel: endpoint@0 { + remote-endpoint = <&panel_in_edp>; + }; + }; + }; + }; + }; + + fragment@5 { + target-path = "/"; + + __overlay__ { + edp_panel: edp-panel { + compatible = "simple-panel"; + backlight = <&backlight_lvds_edp>; + status = "okay"; + enable-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_HIGH>; + //bus-format = ; + prepare-delay-ms = <100>; //AUX通信前延时 + enable-delay-ms = <100>; + + display-timings { + native-mode = <&timing0>; + + timing0: timing0 { + clock-frequency = <140000000>; + hactive = <1920>; + vactive = <1080>; + hfront-porch = <40>; + hsync-len = <40>; + hback-porch = <80>; + vfront-porch = <16>; + vsync-len = <8>; + vback-porch = <16>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + }; + }; + + ports { + panel_in_edp: endpoint { + remote-endpoint = <&edp_out_panel>; + }; + }; + }; + }; + }; + + fragment@6 { + target = <&route_hdmi>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@7 { + target = <&hdmi_in_vp0>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@8 { + target = <&hdmi_in_vp1>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@9 { + target = <&hdmi>; + + __overlay__ { + status = "disabled"; + }; + }; +}; \ No newline at end of file diff --git a/arch/arm64/boot/dts/rockchip/overlay/rk3566-lubancat-1h-lvds-edp-touch-overlay.dts b/arch/arm64/boot/dts/rockchip/overlay/rk3566-lubancat-1h-lvds-edp-touch-overlay.dts new file mode 100644 index 000000000000..fdec8775be49 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rk3566-lubancat-1h-lvds-edp-touch-overlay.dts @@ -0,0 +1,32 @@ +/dts-v1/; +/plugin/; +#include +#include +#include +#include + + +/ { + fragment@0 { + target = <&i2c5>; + + __overlay__ { + status = "okay"; + clock-frequency = <100000>; + #address-cells = <1>; + #size-cells = <0>; + + lvds_edp_gt911: lvds-edp-gt911@5d { + status = "okay"; + compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&gpio3>; + interrupts = ; + reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>; + irq-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>; + touchscreen-inverted-x = <1>; + touchscreen-inverted-y = <1>; + }; + }; + }; +}; \ No newline at end of file diff --git a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1h.dts b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1h.dts index 0b7fc94442d5..3c76708ea4c5 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1h.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1h.dts @@ -163,7 +163,7 @@ mini_pcie_3v3: mini-pcie-3v3-regulator { compatible = "regulator-fixed"; - regulator-name = "minipcie_3v3"; + regulator-name = "mini_pcie_3v3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; enable-active-high; @@ -368,46 +368,46 @@ default-brightness-level = <200>; }; - backlight1: backlight1 { - status = "disable"; - compatible = "pwm-backlight"; - pwms = <&pwm5 0 50000 0>; - brightness-levels = < - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 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>; - }; + backlight_lvds_edp: backlight-lvds-edp { + status = "okay"; + compatible = "pwm-backlight"; + pwms = <&pwm10 0 50000 0>; + brightness-levels = < + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 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>; + }; test-power { status = "okay"; @@ -481,6 +481,10 @@ &i2s1m0_sdo0>; }; +&pwm10 { + status = "okay"; +}; + &pwm11 { status = "okay"; pinctrl-names = "active"; diff --git a/arch/arm64/boot/dts/rockchip/uEnv/uEnvLubanCat1H.txt b/arch/arm64/boot/dts/rockchip/uEnv/uEnvLubanCat1H.txt index b232f4f91132..9fd84dc44153 100644 --- a/arch/arm64/boot/dts/rockchip/uEnv/uEnvLubanCat1H.txt +++ b/arch/arm64/boot/dts/rockchip/uEnv/uEnvLubanCat1H.txt @@ -13,8 +13,8 @@ enable_uboot_overlays=1 #dtoverlay=/dtb/overlay/rk3566-lubancat-1io-dsi1-in-vp0-1080p-overlay.dtbo #dtoverlay=/dtb/overlay/rk3566-lubancat-1io-dsi1-in-vp0-rpi-overlay.dtbo #edp-in-vp0 -#dtoverlay=/dtb/overlay/rk3566-lubancat-1io-edp-in-vp0-overlay.dtbo -#dtoverlay=/dtb/overlay/rk3566-lubancat-1io-edp-touch-overlay.dtbo +#dtoverlay=/dtb/overlay/rk3566-lubancat-1h-edp-in-vp0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk3566-lubancat-1h-lvds-edp-touch-overlay.dtbo #cam0(mipi-csi0) #dtoverlay=/dtb/overlay/rk356x-lubancat-csi0-sc132gs-overlay.dtbo #dtoverlay=/dtb/overlay/rk356x-lubancat-csi0-ov5647-overlay.dtbo