diff --git a/Documentation/devicetree/bindings/mfd/khadas,mcu.yaml b/Documentation/devicetree/bindings/mfd/khadas,mcu.yaml index 084960fd5a1fd..cf46b690010f2 100644 --- a/Documentation/devicetree/bindings/mfd/khadas,mcu.yaml +++ b/Documentation/devicetree/bindings/mfd/khadas,mcu.yaml @@ -11,7 +11,7 @@ maintainers: description: | Khadas embeds a microcontroller on their VIM and Edge boards adding some - system feature as PWM Fan control (for VIM2 rev14 or VIM3), User memory + system feature as PWM Fan control (for VIM2 rev14, VIM3, Edge2), User memory storage, IR/Key resume control, system power LED control and more. properties: @@ -22,6 +22,11 @@ properties: "#cooling-cells": # Only needed for boards having FAN control feature const: 2 + cooling-levels: + description: Max speed of PWM fan. This property is necessary for Khadas Edge 2. + items: + maximum: 100 + reg: maxItems: 1 diff --git a/arch/arm64/boot/dts/rockchip/overlay/Makefile b/arch/arm64/boot/dts/rockchip/overlay/Makefile index 98cef6977074a..1d41690a889d1 100644 --- a/arch/arm64/boot/dts/rockchip/overlay/Makefile +++ b/arch/arm64/boot/dts/rockchip/overlay/Makefile @@ -57,6 +57,11 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \ yy3568-display-dsi1.dtbo \ yy3568-display-edp.dtbo \ yy3568-sata2.dtbo \ + khadas-edge2-display-dsi0.dtbo \ + khadas-edge2-display-dsi1.dtbo \ + khadas-edge2-cam1.dtbo \ + khadas-edge2-cam2.dtbo \ + khadas-edge2-cam3.dtbo \ rockchip-rk3588-opp-oc-24ghz.dtbo \ rk3588-can0-m0.dtbo \ rk3588-can1-m0.dtbo \ diff --git a/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-cam1.dts b/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-cam1.dts new file mode 100644 index 0000000000000..9ccd832226f74 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-cam1.dts @@ -0,0 +1,233 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + fragment@0 { + target = <&mipi_dcphy1>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@1 { + target = <&csi2_dcphy1>; + + __overlay__ { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi_in_dcphy1: endpoint@1 { + reg = <1>; + remote-endpoint = <&imx415f_out1>; + data-lanes = <1 2 3 4>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidcphy1_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi1_csi2_input>; + }; + }; + }; + }; + }; + + fragment@2 { + target = <&mipi1_csi2>; + + __overlay__ { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi1_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidcphy1_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi1_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi_in1>; + }; + }; + }; + }; + }; + + fragment@3 { + target = <&rkcif_mipi_lvds1>; + + __overlay__ { + status = "okay"; + + port { + cif_mipi_in1: endpoint { + remote-endpoint = <&mipi1_csi2_output>; + }; + }; + }; + }; + + fragment@4 { + target = <&rkcif_mipi_lvds1_sditf>; + + __overlay__ { + status = "okay"; + + port { + mipi1_lvds_sditf: endpoint { + remote-endpoint = <&isp0_vir1>; + }; + }; + }; + }; + + fragment@5 { + target = <&rkisp0_vir1>; + + __overlay__ { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi1_lvds_sditf>; + }; + }; + }; + }; + + fragment@6 { + target = <&i2c3>; + + __overlay__ { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c3m0_xfer>; + + dw9714f: dw9714f@c { + compatible = "dongwoon,dw9714"; + status = "okay"; + reg = <0x0c>; + pinctrl-names = "focusf_gpios"; + pinctrl-0 = <&focusf_gpio>; + focus-gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>; + rockchip,vcm-start-current = <20>; + rockchip,vcm-rated-current = <76>; + rockchip,vcm-step-mode = <0>; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "front"; + }; + + imx415f: imx415f@1a { + compatible = "sony,imx415"; + status = "okay"; + reg = <0x1a>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M2>; + clock-names = "xvclk"; + power-domains = <&power RK3588_PD_VI>; + pinctrl-names = "default", "camf_gpios"; + pinctrl-0 = <&mipim1_camera2_clk>, <&camf_gpio>; + rockchip,grf = <&sys_grf>; + reset-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>; + pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "front"; + rockchip,camera-module-name = "CMK-OT2022-PX1"; + rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20"; + lens-focus = <&dw9714f>; + port { + imx415f_out1: endpoint { + remote-endpoint = <&mipi_in_dcphy1>; + data-lanes = <1 2 3 4>; + }; + }; + }; + }; + }; + + fragment@7 { + target = <&pinctrl>; + + __overlay__ { + cam1 { + camf_gpio: camf-gpio { + rockchip,pins = + <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>, + <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + focusf_gpio: focusf-gpio { + rockchip,pins = + <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + }; + }; + + fragment@8 { + target = <&rkcif>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@9 { + target = <&rkcif_mmu>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@10 { + target = <&rkisp0>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@11 { + target = <&isp0_mmu>; + + __overlay__ { + status = "okay"; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-cam2.dts b/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-cam2.dts new file mode 100644 index 0000000000000..d0f191d9898fe --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-cam2.dts @@ -0,0 +1,234 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + fragment@0 { + target = <&mipi_dcphy0>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@1 { + target = <&csi2_dcphy0>; + + __overlay__ { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi_in_dcphy0: endpoint@1 { + reg = <1>; + remote-endpoint = <&imx415b_out0>; + data-lanes = <1 2 3 4>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidcphy0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi0_csi2_input>; + }; + }; + }; + }; + }; + + fragment@2 { + target = <&mipi0_csi2>; + + __overlay__ { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi0_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidcphy0_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi0_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi_in0>; + }; + }; + }; + }; + }; + + fragment@3 { + target = <&rkcif_mipi_lvds>; + + __overlay__ { + status = "okay"; + + port { + cif_mipi_in0: endpoint { + remote-endpoint = <&mipi0_csi2_output>; + }; + }; + }; + }; + + fragment@4 { + target = <&rkcif_mipi_lvds_sditf>; + + __overlay__ { + status = "okay"; + + port { + mipi_lvds_sditf: endpoint { + remote-endpoint = <&isp0_vir0>; + }; + }; + }; + }; + + fragment@5 { + target = <&rkisp0_vir0>; + + __overlay__ { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds_sditf>; + }; + }; + }; + }; + + fragment@6 { + target = <&i2c4>; + + __overlay__ { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c4m3_xfer>; + + dw9714b: dw9714b@c { + compatible = "dongwoon,dw9714"; + status = "okay"; + reg = <0x0c>; + pinctrl-names = "focusb_gpios"; + pinctrl-0 = <&focusb_gpio>; + focus-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>; + rockchip,vcm-start-current = <20>; + rockchip,vcm-rated-current = <76>; + rockchip,vcm-step-mode = <0>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + }; + + imx415b: imx415b@1a { + compatible = "sony,imx415"; + status = "okay"; + reg = <0x1a>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M1>; + clock-names = "xvclk"; + power-domains = <&power RK3588_PD_VI>; + pinctrl-names = "default", "camb_gpios"; + pinctrl-0 = <&mipim1_camera1_clk>, <&camb_gpio>; + rockchip,grf = <&sys_grf>; + reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>; + pwdn-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "CMK-OT2022-PX1"; + rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20"; + lens-focus = <&dw9714b>; + port { + imx415b_out0: endpoint { + remote-endpoint = <&mipi_in_dcphy0>; + data-lanes = <1 2 3 4>; + }; + }; + }; + }; + }; + + fragment@7 { + target = <&pinctrl>; + + __overlay__ { + cam2 { + camb_gpio: camb-gpio { + rockchip,pins = + <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>, + <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + focusb_gpio: focusb-gpio { + rockchip,pins = + <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + }; + }; + + fragment@8 { + target = <&rkcif>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@9 { + target = <&rkcif_mmu>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@10 { + target = <&rkisp0>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@11 { + target = <&isp0_mmu>; + + __overlay__ { + status = "okay"; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-cam3.dts b/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-cam3.dts new file mode 100644 index 0000000000000..e1c2c506be4fe --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-cam3.dts @@ -0,0 +1,232 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + fragment@0 { + target = <&csi2_dphy0_hw>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@1 { + target = <&csi2_dphy0>; + + __overlay__ { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy0_in_ucam0: endpoint@1 { + reg = <1>; + remote-endpoint = <&imx415c_out0>; + data-lanes = <1 2 3 4>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi2_csi2_input>; + }; + }; + }; + }; + }; + + fragment@2 { + target = <&mipi2_csi2>; + + __overlay__ { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi2_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy0_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi2_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi2_in0>; + }; + }; + }; + }; + }; + + fragment@3 { + target = <&rkcif_mipi_lvds2>; + + __overlay__ { + status = "okay"; + + port { + cif_mipi2_in0: endpoint { + remote-endpoint = <&mipi2_csi2_output>; + }; + }; + }; + }; + + fragment@4 { + target = <&rkcif_mipi_lvds2_sditf>; + + __overlay__ { + status = "okay"; + + port { + mipi_lvds2_sditf: endpoint { + remote-endpoint = <&isp1_vir0>; + }; + }; + }; + }; + + fragment@5 { + target = <&rkisp1_vir0>; + + __overlay__ { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; + }; + }; + + fragment@6 { + target = <&i2c8>; + + __overlay__ { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c8m2_xfer>; + + dw9714c: dw9714c@c { + compatible = "dongwoon,dw9714"; + status = "okay"; + reg = <0x0c>; + pinctrl-names = "focusc_gpios"; + pinctrl-0 = <&focusc_gpio>; + focus-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>; + rockchip,vcm-start-current = <20>; + rockchip,vcm-rated-current = <76>; + rockchip,vcm-step-mode = <0>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + }; + + imx415: imx415@1a { + compatible = "sony,imx415"; + reg = <0x1a>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M3>; + clock-names = "xvclk"; + pinctrl-names = "default", "camc_gpios"; + pinctrl-0 = <&mipim1_camera3_clk>, <&camc_gpio>; + power-domains = <&power RK3588_PD_VI>; + reset-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; + pwdn-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "CMK-OT2022-PX1"; + rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20"; + lens-focus = <&dw9714c>; + port { + imx415c_out0: endpoint { + remote-endpoint = <&mipidphy0_in_ucam0>; + data-lanes = <1 2 3 4>; + }; + }; + }; + }; + }; + + fragment@7 { + target = <&pinctrl>; + + __overlay__ { + cam3 { + camc_gpio: camc-gpio { + rockchip,pins = + <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>, + <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + focusc_gpio: focusc-gpio { + rockchip,pins = + <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + }; + }; + + fragment@8 { + target = <&rkcif>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@9 { + target = <&rkcif_mmu>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@10 { + target = <&rkisp1>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@11 { + target = <&isp1_mmu>; + + __overlay__ { + status = "okay"; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-display-dsi0.dts b/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-display-dsi0.dts new file mode 100644 index 0000000000000..a655dbf0100cb --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-display-dsi0.dts @@ -0,0 +1,810 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + fragment@0 { + target-path = "/"; + + __overlay__ { + backlight_mipi0: backlight-mipi0 { + 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 = <&pwm12 0 25000 0>; + power-supply = <&vcc3v3_lcd1_en>; + status = "okay"; + }; + + vcc3v3_lcd1_en: vcc3v3-lcd1-en { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_lcd1_en"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + status = "okay"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; + + fragment@1 { + target = <&pwm12>; + + __overlay__ { + status = "okay"; + pinctrl-0 = <&pwm12m1_pins>; + }; + }; + + fragment@2 { + target = <&mipi_dcphy0>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@3 { + target = <&dsi0_in_vp2>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@4 { + target = <&dsi0_in_vp3>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@5 { + target = <&route_dsi0>; + + __overlay__ { + connect = <&vp3_out_dsi0>; + status = "okay"; + }; + }; + + fragment@6 { + target = <&dsi0>; + + __overlay__ { + status = "okay"; + reset-delay-ms = <20>; + reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&lcd1_rst_gpio>; + + dsi0_panel: panel@0 { + status = "okay"; + compatible = "simple-panel-dsi"; + reg = <0>; + backlight = <&backlight_mipi0>; + power-supply = <&vcc3v3_lcd1_en>; + 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_EOT_PACKET)>; + dsi,format = ; + dsi,lanes = <4>; + panel-init-sequence = [ + 15 00 02 FF 05 + 15 00 02 FB 01 + 15 64 02 C5 01 + 15 00 02 FF EE + 15 00 02 FB 01 + 15 00 02 1F 45 + 15 00 02 24 4F + 15 00 02 38 C8 + 15 00 02 39 27 + 15 00 02 1E 77 + 15 00 02 1D 0F + 15 00 02 7E 71 + 15 00 02 7C 03 + 15 00 02 FF 00 + 15 00 02 FB 01 + 15 00 02 35 01 + 15 00 02 FF 01 + 15 00 02 FB 01 + 15 00 02 00 01 + 15 00 02 01 55 + 15 00 02 02 40 + 15 00 02 05 40 + 15 00 02 06 4A + 15 00 02 07 24 + 15 00 02 08 0C + 15 00 02 0B 7D + 15 00 02 0C 7D + 15 00 02 0E B0 + 15 00 02 0F AE + 15 00 02 11 10 + 15 00 02 12 10 + 15 00 02 13 03 + 15 00 02 14 4A + 15 00 02 15 12 + 15 00 02 16 12 + 15 00 02 18 00 + 15 00 02 19 77 + 15 00 02 1A 55 + 15 00 02 1B 13 + 15 00 02 1C 00 + 15 00 02 1D 00 + 15 00 02 1E 13 + 15 00 02 1F 00 + 15 00 02 23 00 + 15 00 02 24 00 + 15 00 02 25 00 + 15 00 02 26 00 + 15 00 02 27 00 + 15 00 02 28 00 + 15 00 02 35 00 + 15 00 02 66 00 + 15 00 02 58 82 + 15 00 02 59 02 + 15 00 02 5A 02 + 15 00 02 5B 02 + 15 00 02 5C 82 + 15 00 02 5D 82 + 15 00 02 5E 02 + 15 00 02 5F 02 + 15 00 02 72 31 + 15 00 02 FF 05 + 15 00 02 FB 01 + 15 00 02 00 01 + 15 00 02 01 0B + 15 00 02 02 0C + 15 00 02 03 09 + 15 00 02 04 0A + 15 00 02 05 00 + 15 00 02 06 0F + 15 00 02 07 10 + 15 00 02 08 00 + 15 00 02 09 00 + 15 00 02 0A 00 + 15 00 02 0B 00 + 15 00 02 0C 00 + 15 00 02 0D 13 + 15 00 02 0E 15 + 15 00 02 0F 17 + 15 00 02 10 01 + 15 00 02 11 0B + 15 00 02 12 0C + 15 00 02 13 09 + 15 00 02 14 0A + 15 00 02 15 00 + 15 00 02 16 0F + 15 00 02 17 10 + 15 00 02 18 00 + 15 00 02 19 00 + 15 00 02 1A 00 + 15 00 02 1B 00 + 15 00 02 1C 00 + 15 00 02 1D 13 + 15 00 02 1E 15 + 15 00 02 1F 17 + 15 00 02 20 00 + 15 00 02 21 03 + 15 00 02 22 01 + 15 00 02 23 40 + 15 00 02 24 40 + 15 00 02 25 ED + 15 00 02 29 58 + 15 00 02 2A 12 + 15 00 02 2B 01 + 15 00 02 4B 06 + 15 00 02 4C 11 + 15 00 02 4D 20 + 15 00 02 4E 02 + 15 00 02 4F 02 + 15 00 02 50 20 + 15 00 02 51 61 + 15 00 02 52 01 + 15 00 02 53 63 + 15 00 02 54 77 + 15 00 02 55 ED + 15 00 02 5B 00 + 15 00 02 5C 00 + 15 00 02 5D 00 + 15 00 02 5E 00 + 15 00 02 5F 15 + 15 00 02 60 75 + 15 00 02 61 00 + 15 00 02 62 00 + 15 00 02 63 00 + 15 00 02 64 00 + 15 00 02 65 00 + 15 00 02 66 00 + 15 00 02 67 00 + 15 00 02 68 04 + 15 00 02 69 00 + 15 00 02 6A 00 + 15 00 02 6C 40 + 15 00 02 75 01 + 15 00 02 76 01 + 15 00 02 7A 80 + 15 00 02 7B A3 + 15 00 02 7C D8 + 15 00 02 7D 60 + 15 00 02 7F 15 + 15 00 02 80 81 + 15 00 02 83 05 + 15 00 02 93 08 + 15 00 02 94 10 + 15 00 02 8A 00 + 15 00 02 9B 0F + 15 00 02 EA FF + 15 00 02 EC 00 + 15 00 02 FF 01 + 15 00 02 FB 01 + 15 00 02 75 00 + 15 00 02 76 DF + 15 00 02 77 00 + 15 00 02 78 E4 + 15 00 02 79 00 + 15 00 02 7A ED + 15 00 02 7B 00 + 15 00 02 7C F6 + 15 00 02 7D 00 + 15 00 02 7E FF + 15 00 02 7F 01 + 15 00 02 80 07 + 15 00 02 81 01 + 15 00 02 82 10 + 15 00 02 83 01 + 15 00 02 84 18 + 15 00 02 85 01 + 15 00 02 86 20 + 15 00 02 87 01 + 15 00 02 88 3D + 15 00 02 89 01 + 15 00 02 8A 56 + 15 00 02 8B 01 + 15 00 02 8C 84 + 15 00 02 8D 01 + 15 00 02 8E AB + 15 00 02 8F 01 + 15 00 02 90 EC + 15 00 02 91 02 + 15 00 02 92 22 + 15 00 02 93 02 + 15 00 02 94 23 + 15 00 02 95 02 + 15 00 02 96 55 + 15 00 02 97 02 + 15 00 02 98 8B + 15 00 02 99 02 + 15 00 02 9A AF + 15 00 02 9B 02 + 15 00 02 9C DF + 15 00 02 9D 03 + 15 00 02 9E 01 + 15 00 02 9F 03 + 15 00 02 A0 2C + 15 00 02 A2 03 + 15 00 02 A3 39 + 15 00 02 A4 03 + 15 00 02 A5 47 + 15 00 02 A6 03 + 15 00 02 A7 56 + 15 00 02 A9 03 + 15 00 02 AA 66 + 15 00 02 AB 03 + 15 00 02 AC 76 + 15 00 02 AD 03 + 15 00 02 AE 85 + 15 00 02 AF 03 + 15 00 02 B0 90 + 15 00 02 B1 03 + 15 00 02 B2 CB + 15 00 02 B3 00 + 15 00 02 B4 DF + 15 00 02 B5 00 + 15 00 02 B6 E4 + 15 00 02 B7 00 + 15 00 02 B8 ED + 15 00 02 B9 00 + 15 00 02 BA F6 + 15 00 02 BB 00 + 15 00 02 BC FF + 15 00 02 BD 01 + 15 00 02 BE 07 + 15 00 02 BF 01 + 15 00 02 C0 10 + 15 00 02 C1 01 + 15 00 02 C2 18 + 15 00 02 C3 01 + 15 00 02 C4 20 + 15 00 02 C5 01 + 15 00 02 C6 3D + 15 00 02 C7 01 + 15 00 02 C8 56 + 15 00 02 C9 01 + 15 00 02 CA 84 + 15 00 02 CB 01 + 15 00 02 CC AB + 15 00 02 CD 01 + 15 00 02 CE EC + 15 00 02 CF 02 + 15 00 02 D0 22 + 15 00 02 D1 02 + 15 00 02 D2 23 + 15 00 02 D3 02 + 15 00 02 D4 55 + 15 00 02 D5 02 + 15 00 02 D6 8B + 15 00 02 D7 02 + 15 00 02 D8 AF + 15 00 02 D9 02 + 15 00 02 DA DF + 15 00 02 DB 03 + 15 00 02 DC 01 + 15 00 02 DD 03 + 15 00 02 DE 2C + 15 00 02 DF 03 + 15 00 02 E0 39 + 15 00 02 E1 03 + 15 00 02 E2 47 + 15 00 02 E3 03 + 15 00 02 E4 56 + 15 00 02 E5 03 + 15 00 02 E6 66 + 15 00 02 E7 03 + 15 00 02 E8 76 + 15 00 02 E9 03 + 15 00 02 EA 85 + 15 00 02 EB 03 + 15 00 02 EC 90 + 15 00 02 ED 03 + 15 00 02 EE CB + 15 00 02 EF 00 + 15 00 02 F0 BB + 15 00 02 F1 00 + 15 00 02 F2 C0 + 15 00 02 F3 00 + 15 00 02 F4 CC + 15 00 02 F5 00 + 15 00 02 F6 D6 + 15 00 02 F7 00 + 15 00 02 F8 E1 + 15 00 02 F9 00 + 15 00 02 FA EA + 15 00 02 FF 02 + 15 00 02 FB 01 + 15 00 02 00 00 + 15 00 02 01 F4 + 15 00 02 02 00 + 15 00 02 03 EF + 15 00 02 04 01 + 15 00 02 05 07 + 15 00 02 06 01 + 15 00 02 07 28 + 15 00 02 08 01 + 15 00 02 09 44 + 15 00 02 0A 01 + 15 00 02 0B 76 + 15 00 02 0C 01 + 15 00 02 0D A0 + 15 00 02 0E 01 + 15 00 02 0F E7 + 15 00 02 10 02 + 15 00 02 11 1F + 15 00 02 12 02 + 15 00 02 13 22 + 15 00 02 14 02 + 15 00 02 15 54 + 15 00 02 16 02 + 15 00 02 17 8B + 15 00 02 18 02 + 15 00 02 19 AF + 15 00 02 1A 02 + 15 00 02 1B E0 + 15 00 02 1C 03 + 15 00 02 1D 01 + 15 00 02 1E 03 + 15 00 02 1F 2D + 15 00 02 20 03 + 15 00 02 21 39 + 15 00 02 22 03 + 15 00 02 23 47 + 15 00 02 24 03 + 15 00 02 25 57 + 15 00 02 26 03 + 15 00 02 27 65 + 15 00 02 28 03 + 15 00 02 29 77 + 15 00 02 2A 03 + 15 00 02 2B 85 + 15 00 02 2D 03 + 15 00 02 2F 8F + 15 00 02 30 03 + 15 00 02 31 CB + 15 00 02 32 00 + 15 00 02 33 BB + 15 00 02 34 00 + 15 00 02 35 C0 + 15 00 02 36 00 + 15 00 02 37 CC + 15 00 02 38 00 + 15 00 02 39 D6 + 15 00 02 3A 00 + 15 00 02 3B E1 + 15 00 02 3D 00 + 15 00 02 3F EA + 15 00 02 40 00 + 15 00 02 41 F4 + 15 00 02 42 00 + 15 00 02 43 FE + 15 00 02 44 01 + 15 00 02 45 07 + 15 00 02 46 01 + 15 00 02 47 28 + 15 00 02 48 01 + 15 00 02 49 44 + 15 00 02 4A 01 + 15 00 02 4B 76 + 15 00 02 4C 01 + 15 00 02 4D A0 + 15 00 02 4E 01 + 15 00 02 4F E7 + 15 00 02 50 02 + 15 00 02 51 1F + 15 00 02 52 02 + 15 00 02 53 22 + 15 00 02 54 02 + 15 00 02 55 54 + 15 00 02 56 02 + 15 00 02 58 8B + 15 00 02 59 02 + 15 00 02 5A AF + 15 00 02 5B 02 + 15 00 02 5C E0 + 15 00 02 5D 03 + 15 00 02 5E 01 + 15 00 02 5F 03 + 15 00 02 60 2D + 15 00 02 61 03 + 15 00 02 62 39 + 15 00 02 63 03 + 15 00 02 64 47 + 15 00 02 65 03 + 15 00 02 66 57 + 15 00 02 67 03 + 15 00 02 68 65 + 15 00 02 69 03 + 15 00 02 6A 77 + 15 00 02 6B 03 + 15 00 02 6C 85 + 15 00 02 6D 03 + 15 00 02 6E 8F + 15 00 02 6F 03 + 15 00 02 70 CB + 15 00 02 71 00 + 15 00 02 72 00 + 15 00 02 73 00 + 15 00 02 74 21 + 15 00 02 75 00 + 15 00 02 76 4C + 15 00 02 77 00 + 15 00 02 78 6B + 15 00 02 79 00 + 15 00 02 7A 85 + 15 00 02 7B 00 + 15 00 02 7C 9A + 15 00 02 7D 00 + 15 00 02 7E AD + 15 00 02 7F 00 + 15 00 02 80 BE + 15 00 02 81 00 + 15 00 02 82 CD + 15 00 02 83 01 + 15 00 02 84 01 + 15 00 02 85 01 + 15 00 02 86 29 + 15 00 02 87 01 + 15 00 02 88 68 + 15 00 02 89 01 + 15 00 02 8A 98 + 15 00 02 8B 01 + 15 00 02 8C E5 + 15 00 02 8D 02 + 15 00 02 8E 1E + 15 00 02 8F 02 + 15 00 02 90 30 + 15 00 02 91 02 + 15 00 02 92 52 + 15 00 02 93 02 + 15 00 02 94 88 + 15 00 02 95 02 + 15 00 02 96 AA + 15 00 02 97 02 + 15 00 02 98 D7 + 15 00 02 99 02 + 15 00 02 9A F7 + 15 00 02 9B 03 + 15 00 02 9C 21 + 15 00 02 9D 03 + 15 00 02 9E 2E + 15 00 02 9F 03 + 15 00 02 A0 3D + 15 00 02 A2 03 + 15 00 02 A3 4C + 15 00 02 A4 03 + 15 00 02 A5 5E + 15 00 02 A6 03 + 15 00 02 A7 71 + 15 00 02 A9 03 + 15 00 02 AA 86 + 15 00 02 AB 03 + 15 00 02 AC 94 + 15 00 02 AD 03 + 15 00 02 AE FA + 15 00 02 AF 00 + 15 00 02 B0 00 + 15 00 02 B1 00 + 15 00 02 B2 21 + 15 00 02 B3 00 + 15 00 02 B4 4C + 15 00 02 B5 00 + 15 00 02 B6 6B + 15 00 02 B7 00 + 15 00 02 B8 85 + 15 00 02 B9 00 + 15 00 02 BA 9A + 15 00 02 BB 00 + 15 00 02 BC AD + 15 00 02 BD 00 + 15 00 02 BE BE + 15 00 02 BF 00 + 15 00 02 C0 CD + 15 00 02 C1 01 + 15 00 02 C2 01 + 15 00 02 C3 01 + 15 00 02 C4 29 + 15 00 02 C5 01 + 15 00 02 C6 68 + 15 00 02 C7 01 + 15 00 02 C8 98 + 15 00 02 C9 01 + 15 00 02 CA E5 + 15 00 02 CB 02 + 15 00 02 CC 1E + 15 00 02 CD 02 + 15 00 02 CE 20 + 15 00 02 CF 02 + 15 00 02 D0 52 + 15 00 02 D1 02 + 15 00 02 D2 88 + 15 00 02 D3 02 + 15 00 02 D4 AA + 15 00 02 D5 02 + 15 00 02 D6 D7 + 15 00 02 D7 02 + 15 00 02 D8 F7 + 15 00 02 D9 03 + 15 00 02 DA 21 + 15 00 02 DB 03 + 15 00 02 DC 2E + 15 00 02 DD 03 + 15 00 02 DE 3D + 15 00 02 DF 03 + 15 00 02 E0 4C + 15 00 02 E1 03 + 15 00 02 E2 5E + 15 00 02 E3 03 + 15 00 02 E4 71 + 15 00 02 E5 03 + 15 00 02 E6 86 + 15 00 02 E7 03 + 15 00 02 E8 94 + 15 00 02 E9 03 + 15 00 02 EA FA + 15 00 02 FF 01 + 15 00 02 FB 01 + 15 00 02 FF 02 + 15 00 02 FB 01 + 15 00 02 FF 04 + 15 00 02 FB 01 + 15 00 02 FF 00 + 15 00 02 D3 05 + 15 00 02 D4 04 + 05 78 01 11 + 15 00 02 FF 00 + 15 00 02 35 00 + 05 0A 01 29 + ]; + + panel-init-sequence2 = [ + 39 00 04 B9 FF 83 99 + 39 00 05 BA 63 23 68 CF + 15 00 02 D2 55 + 39 00 10 B1 02 04 70 90 01 32 33 11 11 4D 57 56 73 02 02 + 39 00 0c B2 00 80 80 AE 0A 0E 75 11 00 00 00 + 39 00 2f B4 00 FF 04 A4 02 A0 00 00 10 00 00 02 00 24 02 04 0A 21 03 00 00 08 A6 88 04 A4 02 A0 00 00 10 00 00 02 00 24 02 04 0A 00 00 08 A6 00 08 11 + 39 00 22 D3 00 00 00 00 00 00 18 18 32 10 09 00 09 32 10 00 00 00 00 00 00 00 00 11 00 02 02 03 00 00 00 0A 40 + 39 00 21 D5 18 18 18 18 21 20 18 18 19 19 19 19 18 18 18 18 03 02 01 00 2F 2F 30 30 31 31 18 18 18 18 18 18 + 39 00 21 D6 18 18 18 18 20 21 19 19 18 18 19 19 18 18 18 18 00 01 02 03 2F 2F 30 30 31 31 18 18 18 18 18 18 + 39 00 09 D8 0A BE FA A0 0A BE FA A0 + 15 00 02 BD 01 + 39 00 09 D8 0F FF FF E0 0F FF FF E0 + 15 00 02 BD 02 + 39 00 09 D8 0F FF FF E0 0F FF FF E0 + 15 00 02 BD 00 + 39 00 37 E0 01 35 41 3B 79 81 8C 85 8E 95 9B A0 A4 AB B1 B3 B7 C5 BD C5 B6 C2 C2 62 5D 66 73 01 35 41 3B 79 81 8C 85 8E 95 9B A0 A4 AB B1 B3 B7 B5 BD C5 B6 C2 C2 62 5D 66 73 + 39 00 03 B6 97 97 + 15 00 02 CC C8 + 39 00 05 BF 40 41 50 19 + 39 00 03 C6 FF F9 + 39 00 03 C0 25 5A + 05 78 01 11 + 05 14 01 29 + ]; + + panel-exit-sequence = [ + 05 05 01 28 + 05 78 01 10 + ]; + + disp_timings0: display-timings { + native-mode = <&dsi0_timing0>; + dsi0_timing0: timing0 { + clock-frequency = <152200000>; + hactive = <1080>; + vactive = <1920>; + hfront-porch = <104>; + hsync-len = <4>; + hback-porch = <127>; + vfront-porch = <4>; + vsync-len = <2>; + vback-porch = <3>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + }; + }; + + disp_timings01: display-timings1 { + native-mode = <&dsi0_timing01>; + dsi0_timing01: timing01 { + clock-frequency = <152350000>; + hactive = <1920>; + vactive = <1200>; + hfront-porch = <110>; + hsync-len = <4>; + hback-porch = <32>; + vfront-porch = <11>; + vsync-len = <4>; + vback-porch = <14>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + 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@7 { + target = <&i2c6>; + + __overlay__ { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c6m0_xfer>; + + ft5336: ft5336@38 { + compatible = "edt,edt-ft5336", "ft5x06"; + reg = <0x38>; + interrupt-parent = <&gpio0>; + interrupts = ; + reset-gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&tp_rst_gpio>; + status = "okay"; + }; + + gt9xx: gt9xx@14 { + compatible = "goodix,gt9xx"; + reg = <0x14>; + touch-gpio = <&gpio0 RK_PC6 IRQ_TYPE_LEVEL_LOW>; + reset-gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; + max-x = <1920>; + max-y = <1200>; + tp-size = <89>; + status = "okay"; + }; + }; + }; + + fragment@8 { + target = <&pinctrl>; + + __overlay__ { + ft5336 { + tp_rst_gpio: tp-rst-gpio { + rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + dsi0-lcd { + lcd1_rst_gpio: lcd1-rst-gpio { + rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-display-dsi1.dts b/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-display-dsi1.dts new file mode 100644 index 0000000000000..f964e8d3abc1c --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/khadas-edge2-display-dsi1.dts @@ -0,0 +1,753 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + fragment@0 { + target-path = "/"; + + __overlay__ { + backlight_mipi1: backlight-mipi1 { + 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 = <&pwm13 0 25000 0>; + power-supply = <&vcc3v3_lcd2_en>; + status = "okay"; + }; + + vcc3v3_lcd2_en: vcc3v3-lcd2-en { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_lcd2_en"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + status = "okay"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; + + fragment@1 { + target = <&pwm13>; + + __overlay__ { + status = "okay"; + pinctrl-0 = <&pwm13m1_pins>; + }; + }; + + fragment@2 { + target = <&mipi_dcphy1>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@3 { + target = <&dsi1_in_vp2>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@4 { + target = <&dsi1_in_vp3>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@5 { + target = <&route_dsi1>; + + __overlay__ { + connect = <&vp3_out_dsi1>; + status = "okay"; + }; + }; + + fragment@6 { + target = <&dsi1>; + + __overlay__ { + reset-delay-ms = <20>; + reset-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&lcd2_rst_gpio1>; + status = "okay"; + + dsi1_panel: panel@0 { + status = "okay"; + compatible = "simple-panel-dsi"; + reg = <0>; + backlight = <&backlight_mipi1>; + power-supply = <&vcc3v3_lcd2_en>; + 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_EOT_PACKET)>; + dsi,format = ; + dsi,lanes = <4>; + panel-init-sequence = [ + 15 00 02 FF 05 + 15 00 02 FB 01 + 15 64 02 C5 01 + 15 00 02 FF EE + 15 00 02 FB 01 + 15 00 02 1F 45 + 15 00 02 24 4F + 15 00 02 38 C8 + 15 00 02 39 27 + 15 00 02 1E 77 + 15 00 02 1D 0F + 15 00 02 7E 71 + 15 00 02 7C 03 + 15 00 02 FF 00 + 15 00 02 FB 01 + 15 00 02 35 01 + 15 00 02 FF 01 + 15 00 02 FB 01 + 15 00 02 00 01 + 15 00 02 01 55 + 15 00 02 02 40 + 15 00 02 05 40 + 15 00 02 06 4A + 15 00 02 07 24 + 15 00 02 08 0C + 15 00 02 0B 7D + 15 00 02 0C 7D + 15 00 02 0E B0 + 15 00 02 0F AE + 15 00 02 11 10 + 15 00 02 12 10 + 15 00 02 13 03 + 15 00 02 14 4A + 15 00 02 15 12 + 15 00 02 16 12 + 15 00 02 18 00 + 15 00 02 19 77 + 15 00 02 1A 55 + 15 00 02 1B 13 + 15 00 02 1C 00 + 15 00 02 1D 00 + 15 00 02 1E 13 + 15 00 02 1F 00 + 15 00 02 23 00 + 15 00 02 24 00 + 15 00 02 25 00 + 15 00 02 26 00 + 15 00 02 27 00 + 15 00 02 28 00 + 15 00 02 35 00 + 15 00 02 66 00 + 15 00 02 58 82 + 15 00 02 59 02 + 15 00 02 5A 02 + 15 00 02 5B 02 + 15 00 02 5C 82 + 15 00 02 5D 82 + 15 00 02 5E 02 + 15 00 02 5F 02 + 15 00 02 72 31 + 15 00 02 FF 05 + 15 00 02 FB 01 + 15 00 02 00 01 + 15 00 02 01 0B + 15 00 02 02 0C + 15 00 02 03 09 + 15 00 02 04 0A + 15 00 02 05 00 + 15 00 02 06 0F + 15 00 02 07 10 + 15 00 02 08 00 + 15 00 02 09 00 + 15 00 02 0A 00 + 15 00 02 0B 00 + 15 00 02 0C 00 + 15 00 02 0D 13 + 15 00 02 0E 15 + 15 00 02 0F 17 + 15 00 02 10 01 + 15 00 02 11 0B + 15 00 02 12 0C + 15 00 02 13 09 + 15 00 02 14 0A + 15 00 02 15 00 + 15 00 02 16 0F + 15 00 02 17 10 + 15 00 02 18 00 + 15 00 02 19 00 + 15 00 02 1A 00 + 15 00 02 1B 00 + 15 00 02 1C 00 + 15 00 02 1D 13 + 15 00 02 1E 15 + 15 00 02 1F 17 + 15 00 02 20 00 + 15 00 02 21 03 + 15 00 02 22 01 + 15 00 02 23 40 + 15 00 02 24 40 + 15 00 02 25 ED + 15 00 02 29 58 + 15 00 02 2A 12 + 15 00 02 2B 01 + 15 00 02 4B 06 + 15 00 02 4C 11 + 15 00 02 4D 20 + 15 00 02 4E 02 + 15 00 02 4F 02 + 15 00 02 50 20 + 15 00 02 51 61 + 15 00 02 52 01 + 15 00 02 53 63 + 15 00 02 54 77 + 15 00 02 55 ED + 15 00 02 5B 00 + 15 00 02 5C 00 + 15 00 02 5D 00 + 15 00 02 5E 00 + 15 00 02 5F 15 + 15 00 02 60 75 + 15 00 02 61 00 + 15 00 02 62 00 + 15 00 02 63 00 + 15 00 02 64 00 + 15 00 02 65 00 + 15 00 02 66 00 + 15 00 02 67 00 + 15 00 02 68 04 + 15 00 02 69 00 + 15 00 02 6A 00 + 15 00 02 6C 40 + 15 00 02 75 01 + 15 00 02 76 01 + 15 00 02 7A 80 + 15 00 02 7B A3 + 15 00 02 7C D8 + 15 00 02 7D 60 + 15 00 02 7F 15 + 15 00 02 80 81 + 15 00 02 83 05 + 15 00 02 93 08 + 15 00 02 94 10 + 15 00 02 8A 00 + 15 00 02 9B 0F + 15 00 02 EA FF + 15 00 02 EC 00 + 15 00 02 FF 01 + 15 00 02 FB 01 + 15 00 02 75 00 + 15 00 02 76 DF + 15 00 02 77 00 + 15 00 02 78 E4 + 15 00 02 79 00 + 15 00 02 7A ED + 15 00 02 7B 00 + 15 00 02 7C F6 + 15 00 02 7D 00 + 15 00 02 7E FF + 15 00 02 7F 01 + 15 00 02 80 07 + 15 00 02 81 01 + 15 00 02 82 10 + 15 00 02 83 01 + 15 00 02 84 18 + 15 00 02 85 01 + 15 00 02 86 20 + 15 00 02 87 01 + 15 00 02 88 3D + 15 00 02 89 01 + 15 00 02 8A 56 + 15 00 02 8B 01 + 15 00 02 8C 84 + 15 00 02 8D 01 + 15 00 02 8E AB + 15 00 02 8F 01 + 15 00 02 90 EC + 15 00 02 91 02 + 15 00 02 92 22 + 15 00 02 93 02 + 15 00 02 94 23 + 15 00 02 95 02 + 15 00 02 96 55 + 15 00 02 97 02 + 15 00 02 98 8B + 15 00 02 99 02 + 15 00 02 9A AF + 15 00 02 9B 02 + 15 00 02 9C DF + 15 00 02 9D 03 + 15 00 02 9E 01 + 15 00 02 9F 03 + 15 00 02 A0 2C + 15 00 02 A2 03 + 15 00 02 A3 39 + 15 00 02 A4 03 + 15 00 02 A5 47 + 15 00 02 A6 03 + 15 00 02 A7 56 + 15 00 02 A9 03 + 15 00 02 AA 66 + 15 00 02 AB 03 + 15 00 02 AC 76 + 15 00 02 AD 03 + 15 00 02 AE 85 + 15 00 02 AF 03 + 15 00 02 B0 90 + 15 00 02 B1 03 + 15 00 02 B2 CB + 15 00 02 B3 00 + 15 00 02 B4 DF + 15 00 02 B5 00 + 15 00 02 B6 E4 + 15 00 02 B7 00 + 15 00 02 B8 ED + 15 00 02 B9 00 + 15 00 02 BA F6 + 15 00 02 BB 00 + 15 00 02 BC FF + 15 00 02 BD 01 + 15 00 02 BE 07 + 15 00 02 BF 01 + 15 00 02 C0 10 + 15 00 02 C1 01 + 15 00 02 C2 18 + 15 00 02 C3 01 + 15 00 02 C4 20 + 15 00 02 C5 01 + 15 00 02 C6 3D + 15 00 02 C7 01 + 15 00 02 C8 56 + 15 00 02 C9 01 + 15 00 02 CA 84 + 15 00 02 CB 01 + 15 00 02 CC AB + 15 00 02 CD 01 + 15 00 02 CE EC + 15 00 02 CF 02 + 15 00 02 D0 22 + 15 00 02 D1 02 + 15 00 02 D2 23 + 15 00 02 D3 02 + 15 00 02 D4 55 + 15 00 02 D5 02 + 15 00 02 D6 8B + 15 00 02 D7 02 + 15 00 02 D8 AF + 15 00 02 D9 02 + 15 00 02 DA DF + 15 00 02 DB 03 + 15 00 02 DC 01 + 15 00 02 DD 03 + 15 00 02 DE 2C + 15 00 02 DF 03 + 15 00 02 E0 39 + 15 00 02 E1 03 + 15 00 02 E2 47 + 15 00 02 E3 03 + 15 00 02 E4 56 + 15 00 02 E5 03 + 15 00 02 E6 66 + 15 00 02 E7 03 + 15 00 02 E8 76 + 15 00 02 E9 03 + 15 00 02 EA 85 + 15 00 02 EB 03 + 15 00 02 EC 90 + 15 00 02 ED 03 + 15 00 02 EE CB + 15 00 02 EF 00 + 15 00 02 F0 BB + 15 00 02 F1 00 + 15 00 02 F2 C0 + 15 00 02 F3 00 + 15 00 02 F4 CC + 15 00 02 F5 00 + 15 00 02 F6 D6 + 15 00 02 F7 00 + 15 00 02 F8 E1 + 15 00 02 F9 00 + 15 00 02 FA EA + 15 00 02 FF 02 + 15 00 02 FB 01 + 15 00 02 00 00 + 15 00 02 01 F4 + 15 00 02 02 00 + 15 00 02 03 EF + 15 00 02 04 01 + 15 00 02 05 07 + 15 00 02 06 01 + 15 00 02 07 28 + 15 00 02 08 01 + 15 00 02 09 44 + 15 00 02 0A 01 + 15 00 02 0B 76 + 15 00 02 0C 01 + 15 00 02 0D A0 + 15 00 02 0E 01 + 15 00 02 0F E7 + 15 00 02 10 02 + 15 00 02 11 1F + 15 00 02 12 02 + 15 00 02 13 22 + 15 00 02 14 02 + 15 00 02 15 54 + 15 00 02 16 02 + 15 00 02 17 8B + 15 00 02 18 02 + 15 00 02 19 AF + 15 00 02 1A 02 + 15 00 02 1B E0 + 15 00 02 1C 03 + 15 00 02 1D 01 + 15 00 02 1E 03 + 15 00 02 1F 2D + 15 00 02 20 03 + 15 00 02 21 39 + 15 00 02 22 03 + 15 00 02 23 47 + 15 00 02 24 03 + 15 00 02 25 57 + 15 00 02 26 03 + 15 00 02 27 65 + 15 00 02 28 03 + 15 00 02 29 77 + 15 00 02 2A 03 + 15 00 02 2B 85 + 15 00 02 2D 03 + 15 00 02 2F 8F + 15 00 02 30 03 + 15 00 02 31 CB + 15 00 02 32 00 + 15 00 02 33 BB + 15 00 02 34 00 + 15 00 02 35 C0 + 15 00 02 36 00 + 15 00 02 37 CC + 15 00 02 38 00 + 15 00 02 39 D6 + 15 00 02 3A 00 + 15 00 02 3B E1 + 15 00 02 3D 00 + 15 00 02 3F EA + 15 00 02 40 00 + 15 00 02 41 F4 + 15 00 02 42 00 + 15 00 02 43 FE + 15 00 02 44 01 + 15 00 02 45 07 + 15 00 02 46 01 + 15 00 02 47 28 + 15 00 02 48 01 + 15 00 02 49 44 + 15 00 02 4A 01 + 15 00 02 4B 76 + 15 00 02 4C 01 + 15 00 02 4D A0 + 15 00 02 4E 01 + 15 00 02 4F E7 + 15 00 02 50 02 + 15 00 02 51 1F + 15 00 02 52 02 + 15 00 02 53 22 + 15 00 02 54 02 + 15 00 02 55 54 + 15 00 02 56 02 + 15 00 02 58 8B + 15 00 02 59 02 + 15 00 02 5A AF + 15 00 02 5B 02 + 15 00 02 5C E0 + 15 00 02 5D 03 + 15 00 02 5E 01 + 15 00 02 5F 03 + 15 00 02 60 2D + 15 00 02 61 03 + 15 00 02 62 39 + 15 00 02 63 03 + 15 00 02 64 47 + 15 00 02 65 03 + 15 00 02 66 57 + 15 00 02 67 03 + 15 00 02 68 65 + 15 00 02 69 03 + 15 00 02 6A 77 + 15 00 02 6B 03 + 15 00 02 6C 85 + 15 00 02 6D 03 + 15 00 02 6E 8F + 15 00 02 6F 03 + 15 00 02 70 CB + 15 00 02 71 00 + 15 00 02 72 00 + 15 00 02 73 00 + 15 00 02 74 21 + 15 00 02 75 00 + 15 00 02 76 4C + 15 00 02 77 00 + 15 00 02 78 6B + 15 00 02 79 00 + 15 00 02 7A 85 + 15 00 02 7B 00 + 15 00 02 7C 9A + 15 00 02 7D 00 + 15 00 02 7E AD + 15 00 02 7F 00 + 15 00 02 80 BE + 15 00 02 81 00 + 15 00 02 82 CD + 15 00 02 83 01 + 15 00 02 84 01 + 15 00 02 85 01 + 15 00 02 86 29 + 15 00 02 87 01 + 15 00 02 88 68 + 15 00 02 89 01 + 15 00 02 8A 98 + 15 00 02 8B 01 + 15 00 02 8C E5 + 15 00 02 8D 02 + 15 00 02 8E 1E + 15 00 02 8F 02 + 15 00 02 90 30 + 15 00 02 91 02 + 15 00 02 92 52 + 15 00 02 93 02 + 15 00 02 94 88 + 15 00 02 95 02 + 15 00 02 96 AA + 15 00 02 97 02 + 15 00 02 98 D7 + 15 00 02 99 02 + 15 00 02 9A F7 + 15 00 02 9B 03 + 15 00 02 9C 21 + 15 00 02 9D 03 + 15 00 02 9E 2E + 15 00 02 9F 03 + 15 00 02 A0 3D + 15 00 02 A2 03 + 15 00 02 A3 4C + 15 00 02 A4 03 + 15 00 02 A5 5E + 15 00 02 A6 03 + 15 00 02 A7 71 + 15 00 02 A9 03 + 15 00 02 AA 86 + 15 00 02 AB 03 + 15 00 02 AC 94 + 15 00 02 AD 03 + 15 00 02 AE FA + 15 00 02 AF 00 + 15 00 02 B0 00 + 15 00 02 B1 00 + 15 00 02 B2 21 + 15 00 02 B3 00 + 15 00 02 B4 4C + 15 00 02 B5 00 + 15 00 02 B6 6B + 15 00 02 B7 00 + 15 00 02 B8 85 + 15 00 02 B9 00 + 15 00 02 BA 9A + 15 00 02 BB 00 + 15 00 02 BC AD + 15 00 02 BD 00 + 15 00 02 BE BE + 15 00 02 BF 00 + 15 00 02 C0 CD + 15 00 02 C1 01 + 15 00 02 C2 01 + 15 00 02 C3 01 + 15 00 02 C4 29 + 15 00 02 C5 01 + 15 00 02 C6 68 + 15 00 02 C7 01 + 15 00 02 C8 98 + 15 00 02 C9 01 + 15 00 02 CA E5 + 15 00 02 CB 02 + 15 00 02 CC 1E + 15 00 02 CD 02 + 15 00 02 CE 20 + 15 00 02 CF 02 + 15 00 02 D0 52 + 15 00 02 D1 02 + 15 00 02 D2 88 + 15 00 02 D3 02 + 15 00 02 D4 AA + 15 00 02 D5 02 + 15 00 02 D6 D7 + 15 00 02 D7 02 + 15 00 02 D8 F7 + 15 00 02 D9 03 + 15 00 02 DA 21 + 15 00 02 DB 03 + 15 00 02 DC 2E + 15 00 02 DD 03 + 15 00 02 DE 3D + 15 00 02 DF 03 + 15 00 02 E0 4C + 15 00 02 E1 03 + 15 00 02 E2 5E + 15 00 02 E3 03 + 15 00 02 E4 71 + 15 00 02 E5 03 + 15 00 02 E6 86 + 15 00 02 E7 03 + 15 00 02 E8 94 + 15 00 02 E9 03 + 15 00 02 EA FA + 15 00 02 FF 01 + 15 00 02 FB 01 + 15 00 02 FF 02 + 15 00 02 FB 01 + 15 00 02 FF 04 + 15 00 02 FB 01 + 15 00 02 FF 00 + 15 00 02 D3 05 + 15 00 02 D4 04 + 05 78 01 11 + 15 00 02 FF 00 + 15 00 02 35 00 + 05 0A 01 29 + ]; + + panel-init-sequence2 = [ + 39 00 04 B9 FF 83 99 + 39 00 05 BA 63 23 68 CF + 15 00 02 D2 55 + 39 00 10 B1 02 04 70 90 01 32 33 11 11 4D 57 56 73 02 02 + 39 00 0c B2 00 80 80 AE 0A 0E 75 11 00 00 00 + 39 00 2f B4 00 FF 04 A4 02 A0 00 00 10 00 00 02 00 24 02 04 0A 21 03 00 00 08 A6 88 04 A4 02 A0 00 00 10 00 00 02 00 24 02 04 0A 00 00 08 A6 00 08 11 + 39 00 22 D3 00 00 00 00 00 00 18 18 32 10 09 00 09 32 10 00 00 00 00 00 00 00 00 11 00 02 02 03 00 00 00 0A 40 + 39 00 21 D5 18 18 18 18 21 20 18 18 19 19 19 19 18 18 18 18 03 02 01 00 2F 2F 30 30 31 31 18 18 18 18 18 18 + 39 00 21 D6 18 18 18 18 20 21 19 19 18 18 19 19 18 18 18 18 00 01 02 03 2F 2F 30 30 31 31 18 18 18 18 18 18 + 39 00 09 D8 0A BE FA A0 0A BE FA A0 + 15 00 02 BD 01 + 39 00 09 D8 0F FF FF E0 0F FF FF E0 + 15 00 02 BD 02 + 39 00 09 D8 0F FF FF E0 0F FF FF E0 + 15 00 02 BD 00 + 39 00 37 E0 01 35 41 3B 79 81 8C 85 8E 95 9B A0 A4 AB B1 B3 B7 C5 BD C5 B6 C2 C2 62 5D 66 73 01 35 41 3B 79 81 8C 85 8E 95 9B A0 A4 AB B1 B3 B7 B5 BD C5 B6 C2 C2 62 5D 66 73 + 39 00 03 B6 97 97 + 15 00 02 CC C8 + 39 00 05 BF 40 41 50 19 + 39 00 03 C6 FF F9 + 39 00 03 C0 25 5A + 05 78 01 11 + 05 14 01 29 + ]; + + panel-exit-sequence = [ + 05 05 01 28 + 05 78 01 10 + ]; + + disp_timings1: display-timings { + native-mode = <&dsi1_timing0>; + dsi1_timing0: timing0 { + clock-frequency = <152198100>; + hactive = <1080>; + vactive = <1920>; + hfront-porch = <104>; + hsync-len = <4>; + hback-porch = <127>; + vfront-porch = <4>; + vsync-len = <2>; + vback-porch = <3>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + panel_in_dsi1: endpoint { + remote-endpoint = <&dsi1_out_panel>; + }; + }; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + dsi1_out_panel: endpoint { + remote-endpoint = <&panel_in_dsi1>; + }; + }; + }; + }; + }; + + fragment@7 { + target = <&pinctrl>; + + __overlay__ { + dsi1-lcd { + lcd2_rst_gpio1: lcd2-rst-gpio1 { + rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2-camera.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2-camera.dtsi deleted file mode 100644 index 5cb2350c3e42e..0000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2-camera.dtsi +++ /dev/null @@ -1,492 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2023 Wesion Technology Co., Ltd. - * - */ - -&csi2_dcphy0 { - status = "okay"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - #address-cells = <1>; - #size-cells = <0>; - - mipi_in_dcphy0: endpoint@1 { - reg = <1>; - remote-endpoint = <&imx415b_out0>; - data-lanes = <1 2 3 4>; - }; - }; - port@1 { - reg = <1>; - #address-cells = <1>; - #size-cells = <0>; - - csidcphy0_out: endpoint@0 { - reg = <0>; - remote-endpoint = <&mipi0_csi2_input>; - }; - }; - }; -}; - -&mipi_dcphy0 { - status = "okay"; -}; - -&csi2_dcphy1 { - status = "okay"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - #address-cells = <1>; - #size-cells = <0>; - - mipi_in_dcphy1: endpoint@1 { - reg = <1>; - remote-endpoint = <&imx415f_out1>; - data-lanes = <1 2 3 4>; - }; - }; - port@1 { - reg = <1>; - #address-cells = <1>; - #size-cells = <0>; - - csidcphy1_out: endpoint@0 { - reg = <0>; - remote-endpoint = <&mipi1_csi2_input>; - }; - }; - }; -}; - -&mipi_dcphy1 { - status = "okay"; -}; - -&csi2_dphy0 { - status = "okay"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - #address-cells = <1>; - #size-cells = <0>; - - mipidphy0_in_ucam0: endpoint@1 { - reg = <1>; - remote-endpoint = <&imx415c_out0>; - data-lanes = <1 2 3 4>; - }; - }; - port@1 { - reg = <1>; - #address-cells = <1>; - #size-cells = <0>; - - csidphy0_out: endpoint@0 { - reg = <0>; - remote-endpoint = <&mipi2_csi2_input>; - }; - }; - }; -}; - -&csi2_dphy0_hw { - status = "okay"; -}; - -&i2c4 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&i2c4m3_xfer>; - - dw9714b: dw9714b@c { - compatible = "dongwoon,dw9714"; - status = "okay"; - reg = <0x0c>; - pinctrl-names = "focusb_gpios"; - pinctrl-0 = <&focusb_gpio>; - focus-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>; - rockchip,vcm-start-current = <20>; - rockchip,vcm-rated-current = <76>; - rockchip,vcm-step-mode = <0>; - rockchip,camera-module-index = <0>; - rockchip,camera-module-facing = "back"; - }; - - imx415b: imx415b@1a { - compatible = "sony,imx415"; - status = "okay"; - reg = <0x1a>; - clocks = <&cru CLK_MIPI_CAMARAOUT_M1>; - clock-names = "xvclk"; - power-domains = <&power RK3588_PD_VI>; - pinctrl-names = "default", "camb_gpios"; - pinctrl-0 = <&mipim1_camera1_clk>, <&camb_gpio>; - rockchip,grf = <&sys_grf>; - reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>; - pwdn-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>; - rockchip,camera-module-index = <0>; - rockchip,camera-module-facing = "back"; - rockchip,camera-module-name = "CMK-OT2022-PX1"; - rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20"; - lens-focus = <&dw9714b>; - port { - imx415b_out0: endpoint { - remote-endpoint = <&mipi_in_dcphy0>; - data-lanes = <1 2 3 4>; - }; - }; - }; -}; - -&i2c3 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&i2c3m0_xfer>; - - dw9714f: dw9714f@c { - compatible = "dongwoon,dw9714"; - status = "okay"; - reg = <0x0c>; - pinctrl-names = "focusf_gpios"; - pinctrl-0 = <&focusf_gpio>; - focus-gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>; - rockchip,vcm-start-current = <20>; - rockchip,vcm-rated-current = <76>; - rockchip,vcm-step-mode = <0>; - rockchip,camera-module-index = <1>; - rockchip,camera-module-facing = "front"; - }; - - imx415f: imx415f@1a { - compatible = "sony,imx415"; - status = "okay"; - reg = <0x1a>; - clocks = <&cru CLK_MIPI_CAMARAOUT_M2>; - clock-names = "xvclk"; - power-domains = <&power RK3588_PD_VI>; - pinctrl-names = "default", "camf_gpios"; - pinctrl-0 = <&mipim1_camera2_clk>, <&camf_gpio>; - rockchip,grf = <&sys_grf>; - reset-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>; - pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>; - rockchip,camera-module-index = <1>; - rockchip,camera-module-facing = "front"; - rockchip,camera-module-name = "CMK-OT2022-PX1"; - rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20"; - lens-focus = <&dw9714f>; - port { - imx415f_out1: endpoint { - remote-endpoint = <&mipi_in_dcphy1>; - data-lanes = <1 2 3 4>; - }; - }; - }; -}; - -&i2c8 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&i2c8m2_xfer>; - - dw9714c: dw9714c@c { - compatible = "dongwoon,dw9714"; - status = "okay"; - reg = <0x0c>; - pinctrl-names = "focusc_gpios"; - pinctrl-0 = <&focusc_gpio>; - focus-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>; - rockchip,vcm-start-current = <20>; - rockchip,vcm-rated-current = <76>; - rockchip,vcm-step-mode = <0>; - rockchip,camera-module-index = <0>; - rockchip,camera-module-facing = "back"; - }; - - imx415: imx415@1a { - compatible = "sony,imx415"; - reg = <0x1a>; - clocks = <&cru CLK_MIPI_CAMARAOUT_M3>; - clock-names = "xvclk"; - pinctrl-names = "default", "camc_gpios"; - pinctrl-0 = <&mipim1_camera3_clk>, <&camc_gpio>; - power-domains = <&power RK3588_PD_VI>; - reset-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; - pwdn-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; - rockchip,camera-module-index = <0>; - rockchip,camera-module-facing = "back"; - rockchip,camera-module-name = "CMK-OT2022-PX1"; - rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20"; - lens-focus = <&dw9714c>; - port { - imx415c_out0: endpoint { - remote-endpoint = <&mipidphy0_in_ucam0>; - data-lanes = <1 2 3 4>; - }; - }; - }; -}; - -&pinctrl { - cam { - camf_gpio: camf-gpio { - rockchip,pins = - <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>, - <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - camb_gpio: camb-gpio { - rockchip,pins = - <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>, - <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; - }; - camc_gpio: camc-gpio { - rockchip,pins = - <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>, - <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; - }; - focusb_gpio: focusb-gpio { - rockchip,pins = - <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; - }; - focusf_gpio: focusf-gpio { - rockchip,pins = - <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; - }; - focusc_gpio: focusc-gpio { - rockchip,pins = - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; - -&mipi0_csi2 { - status = "okay"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - #address-cells = <1>; - #size-cells = <0>; - - mipi0_csi2_input: endpoint@1 { - reg = <1>; - remote-endpoint = <&csidcphy0_out>; - }; - }; - - port@1 { - reg = <1>; - #address-cells = <1>; - #size-cells = <0>; - - mipi0_csi2_output: endpoint@0 { - reg = <0>; - remote-endpoint = <&cif_mipi_in0>; - }; - }; - }; -}; - -&mipi1_csi2 { - status = "okay"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - #address-cells = <1>; - #size-cells = <0>; - - mipi1_csi2_input: endpoint@1 { - reg = <1>; - remote-endpoint = <&csidcphy1_out>; - }; - }; - - port@1 { - reg = <1>; - #address-cells = <1>; - #size-cells = <0>; - - mipi1_csi2_output: endpoint@0 { - reg = <0>; - remote-endpoint = <&cif_mipi_in1>; - }; - }; - }; -}; - -&mipi2_csi2 { - status = "okay"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - #address-cells = <1>; - #size-cells = <0>; - - mipi2_csi2_input: endpoint@1 { - reg = <1>; - remote-endpoint = <&csidphy0_out>; - }; - }; - - port@1 { - reg = <1>; - #address-cells = <1>; - #size-cells = <0>; - - mipi2_csi2_output: endpoint@0 { - reg = <0>; - remote-endpoint = <&cif_mipi2_in0>; - }; - }; - }; -}; - -&rkcif { - status = "okay"; -}; - -&rkcif_mipi_lvds { - status = "okay"; - - port { - cif_mipi_in0: endpoint { - remote-endpoint = <&mipi0_csi2_output>; - }; - }; -}; - -&rkcif_mipi_lvds_sditf { - status = "okay"; - - port { - mipi_lvds_sditf: endpoint { - remote-endpoint = <&isp0_vir0>; - }; - }; -}; - -&rkcif_mipi_lvds1 { - status = "okay"; - - port { - cif_mipi_in1: endpoint { - remote-endpoint = <&mipi1_csi2_output>; - }; - }; -}; - -&rkcif_mipi_lvds1_sditf { - status = "okay"; - - port { - mipi1_lvds_sditf: endpoint { - remote-endpoint = <&isp0_vir1>; - }; - }; -}; - -&rkcif_mipi_lvds2 { - status = "okay"; - - port { - cif_mipi2_in0: endpoint { - remote-endpoint = <&mipi2_csi2_output>; - }; - }; -}; - -&rkcif_mipi_lvds2_sditf { - status = "okay"; - - port { - mipi_lvds2_sditf: endpoint { - remote-endpoint = <&isp1_vir0>; - }; - }; -}; - -&rkcif_mmu { - status = "okay"; -}; - -&rkisp0 { - status = "okay"; - -}; - -&isp0_mmu { - status = "okay"; -}; - -&rkisp0_vir0 { - status = "okay"; - - port { - #address-cells = <1>; - #size-cells = <0>; - - isp0_vir0: endpoint@0 { - reg = <0>; - remote-endpoint = <&mipi_lvds_sditf>; - }; - }; -}; - -&rkisp0_vir1 { - status = "okay"; - - port { - #address-cells = <1>; - #size-cells = <0>; - - isp0_vir1: endpoint@0 { - reg = <0>; - remote-endpoint = <&mipi1_lvds_sditf>; - }; - }; -}; - -&rkisp1 { - status = "okay"; -}; - -&isp1_mmu { - status = "okay"; -}; - -&rkisp1_vir0 { - status = "okay"; - - port { - #address-cells = <1>; - #size-cells = <0>; - - isp1_vir0: endpoint@0 { - reg = <0>; - remote-endpoint = <&mipi_lvds2_sditf>; - }; - }; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts index 142bc5aa9e93f..8e34123996b7d 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts @@ -6,36 +6,34 @@ /dts-v1/; +#include +#include +#include +#include +#include +#include #include "dt-bindings/usb/pd.h" #include "rk3588s.dtsi" -#include "rk3588s-khadas-edge2.dtsi" #include "rk3588-rk806-single-khadas.dtsi" #include "rk3588-linux.dtsi" -#include "rk3588s-khadas-edge2-camera.dtsi" / { model = "Khadas Edge2"; compatible = "khadas,edge2", "rockchip,rk3588"; /delete-node/ chosen; - combophy_avdd0v85: combophy-avdd0v85 { - compatible = "regulator-fixed"; - regulator-name = "combophy_avdd0v85"; - regulator-boot-on; - regulator-always-on; - regulator-min-microvolt = <850000>; - regulator-max-microvolt = <850000>; - vin-supply = <&vdd_0v85_s0>; - }; - - combophy_avdd1v8: combophy-avdd1v8 { - compatible = "regulator-fixed"; - regulator-name = "combophy_avdd1v8"; - regulator-boot-on; - regulator-always-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - vin-supply = <&avcc_1v8_s0>; + adc_keys: adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 1>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1800000>; + poll-interval = <100>; + + home-key { + label = "home"; + linux,code = ; + press-threshold-microvolt = <17000>; + }; }; sound_micarray: sound-micarray { @@ -111,6 +109,55 @@ hw-gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; }; + vcc12v_dcin: vcc12v-dcin { + compatible = "regulator-fixed"; + regulator-name = "vcc12v_dcin"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + }; + + vcc5v0_sys: vcc5v0-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc12v_dcin>; + }; + + vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 { + compatible = "regulator-fixed"; + regulator-name = "vcc_1v1_nldo_s3"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + vin-supply = <&vcc5v0_sys>; + }; + + vcc5v0_usbdcin: vcc5v0-usbdcin { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_usbdcin"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc12v_dcin>; + }; + + vcc5v0_usb: vcc5v0-usb { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_usb"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc5v0_usbdcin>; + }; + vbus5v0_typec: vbus5v0-typec { compatible = "regulator-fixed"; regulator-name = "vbus5v0_typec"; @@ -165,6 +212,49 @@ }; }; + dp0_sound: dp0-sound { + status = "okay"; + compatible = "rockchip,hdmi"; + rockchip,card-name = "rockchip-dp0"; + rockchip,mclk-fs = <512>; + rockchip,cpu = <&spdif_tx2>; + rockchip,codec = <&dp0 1>; + rockchip,jack-det; + }; + + hdmi0_sound: hdmi0-sound { + status = "okay"; + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <128>; + simple-audio-card,name = "rockchip-hdmi0"; + + simple-audio-card,cpu { + sound-dai = <&i2s5_8ch>; + }; + simple-audio-card,codec { + sound-dai = <&hdmi0>; + }; + }; + + spdif_tx1_dc: spdif-tx1-dc { + status = "disabled"; + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + }; + + spdif_tx1_sound: spdif-tx1-sound { + status = "disabled"; + compatible = "simple-audio-card"; + simple-audio-card,name = "rockchip,spdif-tx1"; + simple-audio-card,cpu { + sound-dai = <&spdif_tx1>; + }; + simple-audio-card,codec { + sound-dai = <&spdif_tx1_dc>; + }; + }; + wireless_bluetooth: wireless-bluetooth { compatible = "bluetooth-platdata"; clocks = <&pt7c4363>; @@ -208,166 +298,75 @@ // WIFI,poweren_gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; status = "okay"; }; - - vcc3v3_lcd1_en: vcc3v3-lcd1-en { - compatible = "regulator-fixed"; - regulator-name = "vcc3v3_lcd1_en"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - gpio = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>; - enable-active-high; - regulator-boot-on; - regulator-state-mem { - regulator-off-in-suspend; - }; - - }; - - vcc3v3_lcd2_en: vcc3v3-lcd2-en { - compatible = "regulator-fixed"; - regulator-name = "vcc3v3_lcd2_en"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>; - enable-active-high; - regulator-boot-on; - regulator-state-mem { - regulator-off-in-suspend; - }; - - }; - }; -&backlight_mipi0 { - pwms = <&pwm12 0 25000 0>; - power-supply = <&vcc3v3_lcd1_en>; +&av1d_mmu { status = "okay"; }; -&backlight_mipi1 { - pwms = <&pwm13 0 25000 0>; - power-supply = <&vcc3v3_lcd2_en>; - status = "disabled"; -}; - - &combphy0_ps { status = "okay"; }; -&dp0 { +&combphy2_psu { status = "okay"; }; -&dp0_in_vp2 { - status = "okay"; +&cpu_l0 { + cpu-supply = <&vdd_cpu_lit_s0>; + mem-supply = <&vdd_cpu_lit_mem_s0>; }; -&dp0_sound{ - status = "okay"; +&cpu_b0 { + cpu-supply = <&vdd_cpu_big0_s0>; + mem-supply = <&vdd_cpu_big0_mem_s0>; }; -&dsi0 { - status = "disabled"; - reset-delay-ms = <20>; - reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&lcd1_rst_gpio>; - +&cpu_b2 { + cpu-supply = <&vdd_cpu_big1_s0>; + mem-supply = <&vdd_cpu_big1_mem_s0>; }; -&dsi0_panel { +&gpu { + mali-supply = <&vdd_gpu_s0>; + mem-supply = <&vdd_gpu_mem_s0>; status = "okay"; - power-supply = <&vcc3v3_lcd1_en>; -}; - -&dsi0_in_vp2 { - status = "disabled"; }; -&dsi0_in_vp3 { +&dp0 { status = "okay"; }; -&hdmi0_sound { +&dp0_in_vp2 { status = "okay"; }; -&route_dsi0 { +&hdmi0 { + enable-gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>; status = "okay"; - connect = <&vp3_out_dsi0>; }; -&mipi_dcphy0 { +&hdmi0_in_vp0 { status = "okay"; }; -&dsi1 { - reset-delay-ms = <20>; - reset-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&lcd2_rst_gpio1>; - status = "disabled"; -}; - -&dsi1_panel { - status = "disabled"; - power-supply = <&vcc3v3_lcd2_en>; -}; - -&mipi_dcphy1 { +&hdptxphy_hdmi0 { status = "okay"; }; -&dsi1_in_vp2 { - status = "disabled"; -}; - -&dsi1_in_vp3 { - status = "disabled"; -}; - -&route_dsi1 { - status = "disabled"; - connect = <&vp3_out_dsi1>; -}; - -//&hdptxphy0 { - /* Single Vdiff Training Table for power reduction (optional) */ -// training-table = /bits/ 8 < - /* voltage swing 0, pre-emphasis 0->3 */ -// 0x0d 0x00 0x00 0x00 0x00 0x00 -// 0x0d 0x00 0x00 0x00 0x00 0x00 -// 0x0d 0x00 0x00 0x00 0x00 0x00 -// 0x0d 0x00 0x00 0x00 0x00 0x00 - /* voltage swing 1, pre-emphasis 0->2 */ -// 0x0d 0x00 0x00 0x00 0x00 0x00 -// 0x0d 0x00 0x00 0x00 0x00 0x00 -// 0x0d 0x00 0x00 0x00 0x00 0x00 - /* voltage swing 2, pre-emphasis 0->1 */ -// 0x0d 0x00 0x00 0x00 0x00 0x00 -// 0x0d 0x00 0x00 0x00 0x00 0x00 - /* voltage swing 3, pre-emphasis 0 */ -// 0x0d 0x00 0x00 0x00 0x00 0x00 -// >; -// status = "okay"; -//}; - -&hdmi0 { - enable-gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>; +&i2s0_8ch { status = "okay"; + pinctrl-0 = <&i2s0_lrck + &i2s0_sclk + &i2s0_sdi0 + &i2s0_sdo0>; }; -&hdmi0_in_vp0 { - status = "okay"; - }; - -&hdptxphy_hdmi0 { +&i2s2_2ch { status = "okay"; - }; +}; -&i2s2_2ch { +&i2s5_8ch { status = "okay"; }; @@ -411,12 +410,7 @@ }; }; -&i2s5_8ch { - status = "okay"; -}; - &i2c2 { - status = "okay"; vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 { @@ -514,17 +508,12 @@ wakeup-source; }; - mcu: khadas-mcu@18 { - compatible = "khadas-mcu"; - status = "okay"; - reg = <0x18>; - fan,trig_temp_level0 = <50>; - fan,trig_temp_level1 = <60>; - fan,trig_temp_level2 = <70>; - fan,trig_temp_level3 = <80>; - hwver = "EDGE2.V11"; - - }; + khadas_mcu: system-controller@18 { + compatible = "khadas,mcu"; + reg = <0x18>; + cooling-levels = <0 50 72 100>; + #cooling-cells = <2>; + }; }; &reboot_mode { @@ -568,92 +557,7 @@ status = "okay"; }; -&i2c5 { - status = "disabled"; - - ls_stk3332: light@47 { - compatible = "ls_stk3332"; - status = "disabled"; - reg = <0x47>; - type = ; - irq_enable = <0>; - als_threshold_high = <100>; - als_threshold_low = <10>; - als_ctrl_gain = <2>; /* 0:x1 1:x4 2:x16 3:x64 */ - poll_delay_ms = <100>; - }; - - ps_stk3332: proximity@47 { - compatible = "ps_stk3332"; - status = "disabled"; - reg = <0x47>; - type = ; - //pinctrl-names = "default"; - //pinctrl-0 = <&gpio3_c6>; - //irq-gpio = <&gpio3 RK_PC6 IRQ_TYPE_LEVEL_LOW>; - //irq_enable = <1>; - ps_threshold_high = <0x200>; - ps_threshold_low = <0x100>; - ps_ctrl_gain = <3>; /* 0:x1 1:x2 2:x5 3:x8 */ - ps_led_current = <4>; /* 0:3.125mA 1:6.25mA 2:12.5mA 3:25mA 4:50mA 5:100mA*/ - poll_delay_ms = <100>; - }; - - mpu6500_acc: mpu_acc@68 { - compatible = "mpu6500_acc"; - reg = <0x68>; - irq-gpio = <&gpio3 RK_PB4 IRQ_TYPE_EDGE_RISING>; - irq_enable = <0>; - poll_delay_ms = <30>; - type = ; - layout = <5>; - }; - - mpu6500_gyro: mpu_gyro@68 { - compatible = "mpu6500_gyro"; - reg = <0x68>; - poll_delay_ms = <30>; - type = ; - layout = <5>; - }; -}; - -&i2c6 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&i2c6m0_xfer>; - - ft5336@38 { - compatible = "edt,edt-ft5336", "ft5x06"; - reg = <0x38>; - interrupt-parent = <&gpio0>; - interrupts = ; - reset-gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&tp_rst_gpio>; - status = "okay"; - }; - - gt9xx: gt9xx@14 { - compatible = "goodix,gt9xx"; - reg = <0x14>; - touch-gpio = <&gpio0 RK_PC6 IRQ_TYPE_LEVEL_LOW>; - reset-gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; - max-x = <1920>; - max-y = <1200>; - tp-size = <89>; - }; - -}; - -&pcie2x1l1 { -// reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>; - vpcie3v3-supply = <&vcc3v3_pcie20>; - status = "disabled"; -}; - &pcie2x1l2 { -// reset-gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>; vpcie3v3-supply = <&vcc3v3_pcie20>; rockchip,skip-scan-in-resume; @@ -663,10 +567,10 @@ &pdm0 { pinctrl-names = "default"; pinctrl-0 = <&pdm0m0_clk - &pdm0m0_clk1 - &pdm0m0_sdi0 - &pdm0m0_sdi1 - &pdm0m0_sdi2>; + &pdm0m0_clk1 + &pdm0m0_sdi0 + &pdm0m0_sdi1 + &pdm0m0_sdi2>; rockchip,path-map = <0 1 2 3>; status = "okay"; }; @@ -681,15 +585,6 @@ }; }; - lcd { - lcd1_rst_gpio: lcd1-rst-gpio { - rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; - }; - lcd2_rst_gpio1: lcd2-rst-gpio1 { - rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - leds { red_led_gpio: red-led-gpio { rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; @@ -726,12 +621,6 @@ }; }; - ft5336 { - tp_rst_gpio: tp-rst-gpio { - rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - wireless-bluetooth { uart9_gpios: uart9-gpios { rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; @@ -784,24 +673,7 @@ }; }; -&pwm7 { - pinctrl-0 = <&pwm7m0_pins>; - status = "disabled"; -}; - -&pwm12 { - pinctrl-0 = <&pwm12m1_pins>; - status = "okay"; -}; - -&pwm13 { - pinctrl-0 = <&pwm13m1_pins>; - status = "okay"; -}; - - &rockchip_suspend { - rockchip,sleep-mode-config = < (0 | RKPM_SLP_ARMOFF_DDRPD @@ -811,6 +683,7 @@ | RKPM_SLP_PMU_DBG ) >; + status = "okay"; }; &route_hdmi0 { @@ -820,9 +693,35 @@ /delete-node/ force_timing; }; -&sdmmc { +&saradc { status = "okay"; + vref-supply = <&vcc_1v8_s0>; +}; + +&sdmmc { + max-frequency = <150000000>; card-detect-delay = <1200>; + no-sdio; + no-mmc; + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + sd-uhs-sdr104; + vmmc-supply = <&vcc_sd>; + vqmmc-supply = <&vccio_sd_s0>; + status = "okay"; +}; + +&sdhci { + bus-width = <8>; + no-sdio; + no-sd; + non-removable; + max-frequency = <200000000>; + mmc-hs400-1_8v; + mmc-hs400-enhanced-strobe; + status = "okay"; }; &sfc { @@ -855,26 +754,294 @@ pinctrl-0 = <&spi1m1_cs0 &spi1m1_pins>; }; +&soc_thermal { + polling-delay = <1000>; + polling-delay-passive = <2000>; + + trips { + trip0: trip-point@0 { + temperature = <45000>; + hysteresis = <5000>; + type = "active"; + }; + + trip1: trip-point@1 { + temperature = <55000>; + hysteresis = <5000>; + type = "active"; + }; + + trip2: trip-point@2 { + temperature = <60000>; + hysteresis = <5000>; + type = "active"; + }; + + trip3: trip-point@3 { + temperature = <70000>; + hysteresis = <5000>; + type = "active"; + }; + }; + + cooling-maps { + map0 { + trip = <&trip0>; + cooling-device = <&khadas_mcu 0 1>; + contribution = <1024>; + }; + + map1 { + trip = <&trip1>; + cooling-device = <&khadas_mcu 1 2>; + contribution = <1024>; + }; + + map2 { + trip = <&trip2>; + cooling-device = <&khadas_mcu 2 3>; + contribution = <1024>; + }; + + map3 { + trip = <&trip3>; + cooling-device = <&khadas_mcu 3 THERMAL_NO_LIMIT>; + contribution = <1024>; + }; + }; +}; + +&iep { + status = "okay"; +}; + +&iep_mmu { + status = "okay"; +}; + +&jpegd { + status = "okay"; +}; + +&jpegd_mmu { + status = "okay"; +}; + +&jpege_ccu { + status = "okay"; +}; + +&jpege0 { + status = "okay"; +}; + +&jpege0_mmu { + status = "okay"; +}; + +&jpege1 { + status = "okay"; +}; + +&jpege1_mmu { + status = "okay"; +}; + +&jpege2 { + status = "okay"; +}; + +&jpege2_mmu { + status = "okay"; +}; + +&jpege3 { + status = "okay"; +}; + +&jpege3_mmu { + status = "okay"; +}; + +&mpp_srv { + status = "okay"; +}; + +&rga3_core0 { + status = "okay"; +}; + +&rga3_0_mmu { + status = "okay"; +}; + +&rga3_core1 { + status = "okay"; +}; + +&rga3_1_mmu { + status = "okay"; +}; + +&rga2 { + status = "okay"; +}; + +&rknpu { + rknpu-supply = <&vdd_npu_s0>; + mem-supply = <&vdd_npu_mem_s0>; + status = "okay"; +}; + +&rknpu_mmu { + status = "okay"; +}; + +&rkvdec_ccu { + status = "okay"; +}; + +&rkvdec0 { + status = "okay"; +}; + +&rkvdec0_mmu { + status = "okay"; +}; + +&rkvdec1 { + status = "okay"; +}; + +&rkvdec1_mmu { + status = "okay"; +}; + +&rkvenc_ccu { + status = "okay"; +}; + +&rkvenc0 { + status = "okay"; +}; + +&rkvenc0_mmu { + status = "okay"; +}; + +&rkvenc1 { + status = "okay"; +}; + +&rkvenc1_mmu { + status = "okay"; +}; + +&vdpu { + status = "okay"; +}; + +&vdpu_mmu { + status = "okay"; +}; + +&vepu { + status = "okay"; +}; + +&vop { + status = "okay"; +}; + +&vop_mmu { + status = "okay"; +}; + +/* vp0 & vp1 splice for 8K output */ +&vp0 { + rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0)>; + rockchip,primary-plane = ; + cursor-win-id = ; +}; + +&vp1 { + rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1)>; + rockchip,primary-plane = ; + cursor-win-id = ; +}; + +&vp2 { + rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER2 | 1 << ROCKCHIP_VOP2_ESMART2)>; + rockchip,primary-plane = ; + cursor-win-id = ; +}; + +&vp3 { + rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER3 | 1 << ROCKCHIP_VOP2_ESMART3)>; + rockchip,primary-plane = ; + cursor-win-id = ; +}; + +&display_subsystem { + clocks = <&hdptxphy_hdmi_clk0>; + clock-names = "hdmi0_phy_pll"; +}; + +&hdptxphy_hdmi_clk0 { + status = "okay"; +}; + &tsadc { status = "okay"; }; +&uart9 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&uart9m2_xfer &uart9m2_ctsn>; +}; + +&u2phy0 { + status = "okay"; +}; + +&u2phy2 { + status = "okay"; +}; + +&u2phy3 { + status = "okay"; +}; + &u2phy0_otg { rockchip,typec-vbus-det; + status = "okay"; }; &u2phy2_host { phy-supply = <&vcc5v0_host>; + status = "okay"; }; &u2phy3_host { phy-supply = <&vcc5v0_host>; + status = "okay"; }; -&uart9 { +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&uart9m2_xfer &uart9m2_ctsn>; }; &usbdp_phy0 { @@ -882,6 +1049,7 @@ svid = <0xff01>; sbu1-dc-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>; sbu2-dc-gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>; + status = "okay"; port { #address-cells = <1>; @@ -898,7 +1066,22 @@ }; }; +&usbdp_phy0_dp { + status = "okay"; +}; + +&usbdp_phy0_u3 { + status = "okay"; +}; + +&usbdrd3_0 { + status = "okay"; +}; + &usbdrd_dwc3_0 { + dr_mode = "otg"; + status = "okay"; + usb-role-switch; port { #address-cells = <1>; diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dtsi deleted file mode 100644 index 673d8bc7ba95b..0000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dtsi +++ /dev/null @@ -1,1780 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2023 Wesion Technology Co., Ltd. - * - */ - -#include -#include -#include -#include -#include -#include -#include - -/ { - adc_keys: adc-keys { - compatible = "adc-keys"; - io-channels = <&saradc 1>; - io-channel-names = "buttons"; - keyup-threshold-microvolt = <1800000>; - poll-interval = <100>; - - home-key { - label = "home"; - linux,code = ; - press-threshold-microvolt = <17000>; - }; - }; - - backlight_mipi0: backlight-mipi0 { - 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>; - }; - - dp0_sound: dp0-sound { - status = "disabled"; - compatible = "rockchip,hdmi"; - rockchip,card-name = "rockchip-dp0"; - rockchip,mclk-fs = <512>; - rockchip,cpu = <&spdif_tx2>; - rockchip,codec = <&dp0 1>; - rockchip,jack-det; - }; - - backlight_mipi1: backlight-mipi1 { - 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>; - }; - - - - hdmi0_sound: hdmi0-sound { - status = "disabled"; - compatible = "simple-audio-card"; - simple-audio-card,format = "i2s"; - simple-audio-card,mclk-fs = <128>; - simple-audio-card,name = "rockchip-hdmi0"; - - simple-audio-card,cpu { - sound-dai = <&i2s5_8ch>; - }; - simple-audio-card,codec { - sound-dai = <&hdmi0>; - }; - }; - - spdif_tx1_dc: spdif-tx1-dc { - status = "disabled"; - compatible = "linux,spdif-dit"; - #sound-dai-cells = <0>; - }; - - spdif_tx1_sound: spdif-tx1-sound { - status = "disabled"; - compatible = "simple-audio-card"; - simple-audio-card,name = "rockchip,spdif-tx1"; - simple-audio-card,cpu { - sound-dai = <&spdif_tx1>; - }; - simple-audio-card,codec { - sound-dai = <&spdif_tx1_dc>; - }; - }; - - test-power { - status = "okay"; - }; - - vcc12v_dcin: vcc12v-dcin { - compatible = "regulator-fixed"; - regulator-name = "vcc12v_dcin"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <12000000>; - regulator-max-microvolt = <12000000>; - }; - - vcc5v0_sys: vcc5v0-sys { - compatible = "regulator-fixed"; - regulator-name = "vcc5v0_sys"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - vin-supply = <&vcc12v_dcin>; - }; - - vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 { - compatible = "regulator-fixed"; - regulator-name = "vcc_1v1_nldo_s3"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1100000>; - regulator-max-microvolt = <1100000>; - vin-supply = <&vcc5v0_sys>; - }; - - vcc5v0_usbdcin: vcc5v0-usbdcin { - compatible = "regulator-fixed"; - regulator-name = "vcc5v0_usbdcin"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - vin-supply = <&vcc12v_dcin>; - }; - - vcc5v0_usb: vcc5v0-usb { - compatible = "regulator-fixed"; - regulator-name = "vcc5v0_usb"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - vin-supply = <&vcc5v0_usbdcin>; - }; -}; - -&av1d_mmu { - status = "okay"; -}; - -&combphy0_ps { - status = "okay"; -}; - -&combphy2_psu { - status = "okay"; -}; - -&cpu_l0 { - cpu-supply = <&vdd_cpu_lit_s0>; - mem-supply = <&vdd_cpu_lit_mem_s0>; -}; - -&cpu_b0 { - cpu-supply = <&vdd_cpu_big0_s0>; - mem-supply = <&vdd_cpu_big0_mem_s0>; -}; - -&cpu_b2 { - cpu-supply = <&vdd_cpu_big1_s0>; - mem-supply = <&vdd_cpu_big1_mem_s0>; -}; - -&dsi0 { - status = "disabled"; - //rockchip,lane-rate = <1000>; - dsi0_panel: panel@0 { - status = "okay"; - compatible = "simple-panel-dsi"; - reg = <0>; - backlight = <&backlight_mipi0>; - // 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_EOT_PACKET)>; - dsi,format = ; - dsi,lanes = <4>; - panel-init-sequence = [ - 15 00 02 FF 05 - 15 00 02 FB 01 - 15 64 02 C5 01 - 15 00 02 FF EE - 15 00 02 FB 01 - 15 00 02 1F 45 - 15 00 02 24 4F - 15 00 02 38 C8 - 15 00 02 39 27 - 15 00 02 1E 77 - 15 00 02 1D 0F - 15 00 02 7E 71 - 15 00 02 7C 03 - 15 00 02 FF 00 - 15 00 02 FB 01 - 15 00 02 35 01 - 15 00 02 FF 01 - 15 00 02 FB 01 - 15 00 02 00 01 - 15 00 02 01 55 - 15 00 02 02 40 - 15 00 02 05 40 - 15 00 02 06 4A - 15 00 02 07 24 - 15 00 02 08 0C - 15 00 02 0B 7D - 15 00 02 0C 7D - 15 00 02 0E B0 - 15 00 02 0F AE - 15 00 02 11 10 - 15 00 02 12 10 - 15 00 02 13 03 - 15 00 02 14 4A - 15 00 02 15 12 - 15 00 02 16 12 - 15 00 02 18 00 - 15 00 02 19 77 - 15 00 02 1A 55 - 15 00 02 1B 13 - 15 00 02 1C 00 - 15 00 02 1D 00 - 15 00 02 1E 13 - 15 00 02 1F 00 - 15 00 02 23 00 - 15 00 02 24 00 - 15 00 02 25 00 - 15 00 02 26 00 - 15 00 02 27 00 - 15 00 02 28 00 - 15 00 02 35 00 - 15 00 02 66 00 - 15 00 02 58 82 - 15 00 02 59 02 - 15 00 02 5A 02 - 15 00 02 5B 02 - 15 00 02 5C 82 - 15 00 02 5D 82 - 15 00 02 5E 02 - 15 00 02 5F 02 - 15 00 02 72 31 - 15 00 02 FF 05 - 15 00 02 FB 01 - 15 00 02 00 01 - 15 00 02 01 0B - 15 00 02 02 0C - 15 00 02 03 09 - 15 00 02 04 0A - 15 00 02 05 00 - 15 00 02 06 0F - 15 00 02 07 10 - 15 00 02 08 00 - 15 00 02 09 00 - 15 00 02 0A 00 - 15 00 02 0B 00 - 15 00 02 0C 00 - 15 00 02 0D 13 - 15 00 02 0E 15 - 15 00 02 0F 17 - 15 00 02 10 01 - 15 00 02 11 0B - 15 00 02 12 0C - 15 00 02 13 09 - 15 00 02 14 0A - 15 00 02 15 00 - 15 00 02 16 0F - 15 00 02 17 10 - 15 00 02 18 00 - 15 00 02 19 00 - 15 00 02 1A 00 - 15 00 02 1B 00 - 15 00 02 1C 00 - 15 00 02 1D 13 - 15 00 02 1E 15 - 15 00 02 1F 17 - 15 00 02 20 00 - 15 00 02 21 03 - 15 00 02 22 01 - 15 00 02 23 40 - 15 00 02 24 40 - 15 00 02 25 ED - 15 00 02 29 58 - 15 00 02 2A 12 - 15 00 02 2B 01 - 15 00 02 4B 06 - 15 00 02 4C 11 - 15 00 02 4D 20 - 15 00 02 4E 02 - 15 00 02 4F 02 - 15 00 02 50 20 - 15 00 02 51 61 - 15 00 02 52 01 - 15 00 02 53 63 - 15 00 02 54 77 - 15 00 02 55 ED - 15 00 02 5B 00 - 15 00 02 5C 00 - 15 00 02 5D 00 - 15 00 02 5E 00 - 15 00 02 5F 15 - 15 00 02 60 75 - 15 00 02 61 00 - 15 00 02 62 00 - 15 00 02 63 00 - 15 00 02 64 00 - 15 00 02 65 00 - 15 00 02 66 00 - 15 00 02 67 00 - 15 00 02 68 04 - 15 00 02 69 00 - 15 00 02 6A 00 - 15 00 02 6C 40 - 15 00 02 75 01 - 15 00 02 76 01 - 15 00 02 7A 80 - 15 00 02 7B A3 - 15 00 02 7C D8 - 15 00 02 7D 60 - 15 00 02 7F 15 - 15 00 02 80 81 - 15 00 02 83 05 - 15 00 02 93 08 - 15 00 02 94 10 - 15 00 02 8A 00 - 15 00 02 9B 0F - 15 00 02 EA FF - 15 00 02 EC 00 - 15 00 02 FF 01 - 15 00 02 FB 01 - 15 00 02 75 00 - 15 00 02 76 DF - 15 00 02 77 00 - 15 00 02 78 E4 - 15 00 02 79 00 - 15 00 02 7A ED - 15 00 02 7B 00 - 15 00 02 7C F6 - 15 00 02 7D 00 - 15 00 02 7E FF - 15 00 02 7F 01 - 15 00 02 80 07 - 15 00 02 81 01 - 15 00 02 82 10 - 15 00 02 83 01 - 15 00 02 84 18 - 15 00 02 85 01 - 15 00 02 86 20 - 15 00 02 87 01 - 15 00 02 88 3D - 15 00 02 89 01 - 15 00 02 8A 56 - 15 00 02 8B 01 - 15 00 02 8C 84 - 15 00 02 8D 01 - 15 00 02 8E AB - 15 00 02 8F 01 - 15 00 02 90 EC - 15 00 02 91 02 - 15 00 02 92 22 - 15 00 02 93 02 - 15 00 02 94 23 - 15 00 02 95 02 - 15 00 02 96 55 - 15 00 02 97 02 - 15 00 02 98 8B - 15 00 02 99 02 - 15 00 02 9A AF - 15 00 02 9B 02 - 15 00 02 9C DF - 15 00 02 9D 03 - 15 00 02 9E 01 - 15 00 02 9F 03 - 15 00 02 A0 2C - 15 00 02 A2 03 - 15 00 02 A3 39 - 15 00 02 A4 03 - 15 00 02 A5 47 - 15 00 02 A6 03 - 15 00 02 A7 56 - 15 00 02 A9 03 - 15 00 02 AA 66 - 15 00 02 AB 03 - 15 00 02 AC 76 - 15 00 02 AD 03 - 15 00 02 AE 85 - 15 00 02 AF 03 - 15 00 02 B0 90 - 15 00 02 B1 03 - 15 00 02 B2 CB - 15 00 02 B3 00 - 15 00 02 B4 DF - 15 00 02 B5 00 - 15 00 02 B6 E4 - 15 00 02 B7 00 - 15 00 02 B8 ED - 15 00 02 B9 00 - 15 00 02 BA F6 - 15 00 02 BB 00 - 15 00 02 BC FF - 15 00 02 BD 01 - 15 00 02 BE 07 - 15 00 02 BF 01 - 15 00 02 C0 10 - 15 00 02 C1 01 - 15 00 02 C2 18 - 15 00 02 C3 01 - 15 00 02 C4 20 - 15 00 02 C5 01 - 15 00 02 C6 3D - 15 00 02 C7 01 - 15 00 02 C8 56 - 15 00 02 C9 01 - 15 00 02 CA 84 - 15 00 02 CB 01 - 15 00 02 CC AB - 15 00 02 CD 01 - 15 00 02 CE EC - 15 00 02 CF 02 - 15 00 02 D0 22 - 15 00 02 D1 02 - 15 00 02 D2 23 - 15 00 02 D3 02 - 15 00 02 D4 55 - 15 00 02 D5 02 - 15 00 02 D6 8B - 15 00 02 D7 02 - 15 00 02 D8 AF - 15 00 02 D9 02 - 15 00 02 DA DF - 15 00 02 DB 03 - 15 00 02 DC 01 - 15 00 02 DD 03 - 15 00 02 DE 2C - 15 00 02 DF 03 - 15 00 02 E0 39 - 15 00 02 E1 03 - 15 00 02 E2 47 - 15 00 02 E3 03 - 15 00 02 E4 56 - 15 00 02 E5 03 - 15 00 02 E6 66 - 15 00 02 E7 03 - 15 00 02 E8 76 - 15 00 02 E9 03 - 15 00 02 EA 85 - 15 00 02 EB 03 - 15 00 02 EC 90 - 15 00 02 ED 03 - 15 00 02 EE CB - 15 00 02 EF 00 - 15 00 02 F0 BB - 15 00 02 F1 00 - 15 00 02 F2 C0 - 15 00 02 F3 00 - 15 00 02 F4 CC - 15 00 02 F5 00 - 15 00 02 F6 D6 - 15 00 02 F7 00 - 15 00 02 F8 E1 - 15 00 02 F9 00 - 15 00 02 FA EA - 15 00 02 FF 02 - 15 00 02 FB 01 - 15 00 02 00 00 - 15 00 02 01 F4 - 15 00 02 02 00 - 15 00 02 03 EF - 15 00 02 04 01 - 15 00 02 05 07 - 15 00 02 06 01 - 15 00 02 07 28 - 15 00 02 08 01 - 15 00 02 09 44 - 15 00 02 0A 01 - 15 00 02 0B 76 - 15 00 02 0C 01 - 15 00 02 0D A0 - 15 00 02 0E 01 - 15 00 02 0F E7 - 15 00 02 10 02 - 15 00 02 11 1F - 15 00 02 12 02 - 15 00 02 13 22 - 15 00 02 14 02 - 15 00 02 15 54 - 15 00 02 16 02 - 15 00 02 17 8B - 15 00 02 18 02 - 15 00 02 19 AF - 15 00 02 1A 02 - 15 00 02 1B E0 - 15 00 02 1C 03 - 15 00 02 1D 01 - 15 00 02 1E 03 - 15 00 02 1F 2D - 15 00 02 20 03 - 15 00 02 21 39 - 15 00 02 22 03 - 15 00 02 23 47 - 15 00 02 24 03 - 15 00 02 25 57 - 15 00 02 26 03 - 15 00 02 27 65 - 15 00 02 28 03 - 15 00 02 29 77 - 15 00 02 2A 03 - 15 00 02 2B 85 - 15 00 02 2D 03 - 15 00 02 2F 8F - 15 00 02 30 03 - 15 00 02 31 CB - 15 00 02 32 00 - 15 00 02 33 BB - 15 00 02 34 00 - 15 00 02 35 C0 - 15 00 02 36 00 - 15 00 02 37 CC - 15 00 02 38 00 - 15 00 02 39 D6 - 15 00 02 3A 00 - 15 00 02 3B E1 - 15 00 02 3D 00 - 15 00 02 3F EA - 15 00 02 40 00 - 15 00 02 41 F4 - 15 00 02 42 00 - 15 00 02 43 FE - 15 00 02 44 01 - 15 00 02 45 07 - 15 00 02 46 01 - 15 00 02 47 28 - 15 00 02 48 01 - 15 00 02 49 44 - 15 00 02 4A 01 - 15 00 02 4B 76 - 15 00 02 4C 01 - 15 00 02 4D A0 - 15 00 02 4E 01 - 15 00 02 4F E7 - 15 00 02 50 02 - 15 00 02 51 1F - 15 00 02 52 02 - 15 00 02 53 22 - 15 00 02 54 02 - 15 00 02 55 54 - 15 00 02 56 02 - 15 00 02 58 8B - 15 00 02 59 02 - 15 00 02 5A AF - 15 00 02 5B 02 - 15 00 02 5C E0 - 15 00 02 5D 03 - 15 00 02 5E 01 - 15 00 02 5F 03 - 15 00 02 60 2D - 15 00 02 61 03 - 15 00 02 62 39 - 15 00 02 63 03 - 15 00 02 64 47 - 15 00 02 65 03 - 15 00 02 66 57 - 15 00 02 67 03 - 15 00 02 68 65 - 15 00 02 69 03 - 15 00 02 6A 77 - 15 00 02 6B 03 - 15 00 02 6C 85 - 15 00 02 6D 03 - 15 00 02 6E 8F - 15 00 02 6F 03 - 15 00 02 70 CB - 15 00 02 71 00 - 15 00 02 72 00 - 15 00 02 73 00 - 15 00 02 74 21 - 15 00 02 75 00 - 15 00 02 76 4C - 15 00 02 77 00 - 15 00 02 78 6B - 15 00 02 79 00 - 15 00 02 7A 85 - 15 00 02 7B 00 - 15 00 02 7C 9A - 15 00 02 7D 00 - 15 00 02 7E AD - 15 00 02 7F 00 - 15 00 02 80 BE - 15 00 02 81 00 - 15 00 02 82 CD - 15 00 02 83 01 - 15 00 02 84 01 - 15 00 02 85 01 - 15 00 02 86 29 - 15 00 02 87 01 - 15 00 02 88 68 - 15 00 02 89 01 - 15 00 02 8A 98 - 15 00 02 8B 01 - 15 00 02 8C E5 - 15 00 02 8D 02 - 15 00 02 8E 1E - 15 00 02 8F 02 - 15 00 02 90 30 - 15 00 02 91 02 - 15 00 02 92 52 - 15 00 02 93 02 - 15 00 02 94 88 - 15 00 02 95 02 - 15 00 02 96 AA - 15 00 02 97 02 - 15 00 02 98 D7 - 15 00 02 99 02 - 15 00 02 9A F7 - 15 00 02 9B 03 - 15 00 02 9C 21 - 15 00 02 9D 03 - 15 00 02 9E 2E - 15 00 02 9F 03 - 15 00 02 A0 3D - 15 00 02 A2 03 - 15 00 02 A3 4C - 15 00 02 A4 03 - 15 00 02 A5 5E - 15 00 02 A6 03 - 15 00 02 A7 71 - 15 00 02 A9 03 - 15 00 02 AA 86 - 15 00 02 AB 03 - 15 00 02 AC 94 - 15 00 02 AD 03 - 15 00 02 AE FA - 15 00 02 AF 00 - 15 00 02 B0 00 - 15 00 02 B1 00 - 15 00 02 B2 21 - 15 00 02 B3 00 - 15 00 02 B4 4C - 15 00 02 B5 00 - 15 00 02 B6 6B - 15 00 02 B7 00 - 15 00 02 B8 85 - 15 00 02 B9 00 - 15 00 02 BA 9A - 15 00 02 BB 00 - 15 00 02 BC AD - 15 00 02 BD 00 - 15 00 02 BE BE - 15 00 02 BF 00 - 15 00 02 C0 CD - 15 00 02 C1 01 - 15 00 02 C2 01 - 15 00 02 C3 01 - 15 00 02 C4 29 - 15 00 02 C5 01 - 15 00 02 C6 68 - 15 00 02 C7 01 - 15 00 02 C8 98 - 15 00 02 C9 01 - 15 00 02 CA E5 - 15 00 02 CB 02 - 15 00 02 CC 1E - 15 00 02 CD 02 - 15 00 02 CE 20 - 15 00 02 CF 02 - 15 00 02 D0 52 - 15 00 02 D1 02 - 15 00 02 D2 88 - 15 00 02 D3 02 - 15 00 02 D4 AA - 15 00 02 D5 02 - 15 00 02 D6 D7 - 15 00 02 D7 02 - 15 00 02 D8 F7 - 15 00 02 D9 03 - 15 00 02 DA 21 - 15 00 02 DB 03 - 15 00 02 DC 2E - 15 00 02 DD 03 - 15 00 02 DE 3D - 15 00 02 DF 03 - 15 00 02 E0 4C - 15 00 02 E1 03 - 15 00 02 E2 5E - 15 00 02 E3 03 - 15 00 02 E4 71 - 15 00 02 E5 03 - 15 00 02 E6 86 - 15 00 02 E7 03 - 15 00 02 E8 94 - 15 00 02 E9 03 - 15 00 02 EA FA - 15 00 02 FF 01 - 15 00 02 FB 01 - 15 00 02 FF 02 - 15 00 02 FB 01 - 15 00 02 FF 04 - 15 00 02 FB 01 - 15 00 02 FF 00 - 15 00 02 D3 05 - 15 00 02 D4 04 - 05 78 01 11 - 15 00 02 FF 00 - 15 00 02 35 00 - 05 0A 01 29 - ]; - - panel-init-sequence2 = [ - 39 00 04 B9 FF 83 99 - 39 00 05 BA 63 23 68 CF - 15 00 02 D2 55 - 39 00 10 B1 02 04 70 90 01 32 33 11 11 4D 57 56 73 02 02 - 39 00 0c B2 00 80 80 AE 0A 0E 75 11 00 00 00 - 39 00 2f B4 00 FF 04 A4 02 A0 00 00 10 00 00 02 00 24 02 04 0A 21 03 00 00 08 A6 88 04 A4 02 A0 00 00 10 00 00 02 00 24 02 04 0A 00 00 08 A6 00 08 11 - 39 00 22 D3 00 00 00 00 00 00 18 18 32 10 09 00 09 32 10 00 00 00 00 00 00 00 00 11 00 02 02 03 00 00 00 0A 40 - 39 00 21 D5 18 18 18 18 21 20 18 18 19 19 19 19 18 18 18 18 03 02 01 00 2F 2F 30 30 31 31 18 18 18 18 18 18 - 39 00 21 D6 18 18 18 18 20 21 19 19 18 18 19 19 18 18 18 18 00 01 02 03 2F 2F 30 30 31 31 18 18 18 18 18 18 - 39 00 09 D8 0A BE FA A0 0A BE FA A0 - 15 00 02 BD 01 - 39 00 09 D8 0F FF FF E0 0F FF FF E0 - 15 00 02 BD 02 - 39 00 09 D8 0F FF FF E0 0F FF FF E0 - 15 00 02 BD 00 - 39 00 37 E0 01 35 41 3B 79 81 8C 85 8E 95 9B A0 A4 AB B1 B3 B7 C5 BD C5 B6 C2 C2 62 5D 66 73 01 35 41 3B 79 81 8C 85 8E 95 9B A0 A4 AB B1 B3 B7 B5 BD C5 B6 C2 C2 62 5D 66 73 - 39 00 03 B6 97 97 - 15 00 02 CC C8 - 39 00 05 BF 40 41 50 19 - 39 00 03 C6 FF F9 - 39 00 03 C0 25 5A - 05 78 01 11 - 05 14 01 29 - ]; - - panel-exit-sequence = [ - 05 05 01 28 - 05 78 01 10 - ]; - - disp_timings0: display-timings { - native-mode = <&dsi0_timing0>; - dsi0_timing0: timing0 { - clock-frequency = <152200000>; - hactive = <1080>; - vactive = <1920>; - hfront-porch = <104>; - hsync-len = <4>; - hback-porch = <127>; - vfront-porch = <4>; - vsync-len = <2>; - vback-porch = <3>; - hsync-active = <0>; - vsync-active = <0>; - de-active = <0>; - pixelclk-active = <0>; - }; - }; - - disp_timings01: display-timings1 { - native-mode = <&dsi0_timing01>; - dsi0_timing01: timing01 { - clock-frequency = <152350000>; - hactive = <1920>; - vactive = <1200>; - hfront-porch = <110>; - hsync-len = <4>; - hback-porch = <32>; - vfront-porch = <11>; - vsync-len = <4>; - vback-porch = <14>; - hsync-active = <0>; - vsync-active = <0>; - de-active = <0>; - 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>; - }; - }; - }; - -}; - -&dsi1 { - status = "disabled"; - //rockchip,lane-rate = <1000>; - dsi1_panel: panel@0 { - status = "disabled"; - compatible = "simple-panel-dsi"; - reg = <0>; - backlight = <&backlight_mipi1>; -// 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_EOT_PACKET)>; - dsi,format = ; - dsi,lanes = <4>; - panel-init-sequence = [ - 15 00 02 FF 05 - 15 00 02 FB 01 - 15 64 02 C5 01 - 15 00 02 FF EE - 15 00 02 FB 01 - 15 00 02 1F 45 - 15 00 02 24 4F - 15 00 02 38 C8 - 15 00 02 39 27 - 15 00 02 1E 77 - 15 00 02 1D 0F - 15 00 02 7E 71 - 15 00 02 7C 03 - 15 00 02 FF 00 - 15 00 02 FB 01 - 15 00 02 35 01 - 15 00 02 FF 01 - 15 00 02 FB 01 - 15 00 02 00 01 - 15 00 02 01 55 - 15 00 02 02 40 - 15 00 02 05 40 - 15 00 02 06 4A - 15 00 02 07 24 - 15 00 02 08 0C - 15 00 02 0B 7D - 15 00 02 0C 7D - 15 00 02 0E B0 - 15 00 02 0F AE - 15 00 02 11 10 - 15 00 02 12 10 - 15 00 02 13 03 - 15 00 02 14 4A - 15 00 02 15 12 - 15 00 02 16 12 - 15 00 02 18 00 - 15 00 02 19 77 - 15 00 02 1A 55 - 15 00 02 1B 13 - 15 00 02 1C 00 - 15 00 02 1D 00 - 15 00 02 1E 13 - 15 00 02 1F 00 - 15 00 02 23 00 - 15 00 02 24 00 - 15 00 02 25 00 - 15 00 02 26 00 - 15 00 02 27 00 - 15 00 02 28 00 - 15 00 02 35 00 - 15 00 02 66 00 - 15 00 02 58 82 - 15 00 02 59 02 - 15 00 02 5A 02 - 15 00 02 5B 02 - 15 00 02 5C 82 - 15 00 02 5D 82 - 15 00 02 5E 02 - 15 00 02 5F 02 - 15 00 02 72 31 - 15 00 02 FF 05 - 15 00 02 FB 01 - 15 00 02 00 01 - 15 00 02 01 0B - 15 00 02 02 0C - 15 00 02 03 09 - 15 00 02 04 0A - 15 00 02 05 00 - 15 00 02 06 0F - 15 00 02 07 10 - 15 00 02 08 00 - 15 00 02 09 00 - 15 00 02 0A 00 - 15 00 02 0B 00 - 15 00 02 0C 00 - 15 00 02 0D 13 - 15 00 02 0E 15 - 15 00 02 0F 17 - 15 00 02 10 01 - 15 00 02 11 0B - 15 00 02 12 0C - 15 00 02 13 09 - 15 00 02 14 0A - 15 00 02 15 00 - 15 00 02 16 0F - 15 00 02 17 10 - 15 00 02 18 00 - 15 00 02 19 00 - 15 00 02 1A 00 - 15 00 02 1B 00 - 15 00 02 1C 00 - 15 00 02 1D 13 - 15 00 02 1E 15 - 15 00 02 1F 17 - 15 00 02 20 00 - 15 00 02 21 03 - 15 00 02 22 01 - 15 00 02 23 40 - 15 00 02 24 40 - 15 00 02 25 ED - 15 00 02 29 58 - 15 00 02 2A 12 - 15 00 02 2B 01 - 15 00 02 4B 06 - 15 00 02 4C 11 - 15 00 02 4D 20 - 15 00 02 4E 02 - 15 00 02 4F 02 - 15 00 02 50 20 - 15 00 02 51 61 - 15 00 02 52 01 - 15 00 02 53 63 - 15 00 02 54 77 - 15 00 02 55 ED - 15 00 02 5B 00 - 15 00 02 5C 00 - 15 00 02 5D 00 - 15 00 02 5E 00 - 15 00 02 5F 15 - 15 00 02 60 75 - 15 00 02 61 00 - 15 00 02 62 00 - 15 00 02 63 00 - 15 00 02 64 00 - 15 00 02 65 00 - 15 00 02 66 00 - 15 00 02 67 00 - 15 00 02 68 04 - 15 00 02 69 00 - 15 00 02 6A 00 - 15 00 02 6C 40 - 15 00 02 75 01 - 15 00 02 76 01 - 15 00 02 7A 80 - 15 00 02 7B A3 - 15 00 02 7C D8 - 15 00 02 7D 60 - 15 00 02 7F 15 - 15 00 02 80 81 - 15 00 02 83 05 - 15 00 02 93 08 - 15 00 02 94 10 - 15 00 02 8A 00 - 15 00 02 9B 0F - 15 00 02 EA FF - 15 00 02 EC 00 - 15 00 02 FF 01 - 15 00 02 FB 01 - 15 00 02 75 00 - 15 00 02 76 DF - 15 00 02 77 00 - 15 00 02 78 E4 - 15 00 02 79 00 - 15 00 02 7A ED - 15 00 02 7B 00 - 15 00 02 7C F6 - 15 00 02 7D 00 - 15 00 02 7E FF - 15 00 02 7F 01 - 15 00 02 80 07 - 15 00 02 81 01 - 15 00 02 82 10 - 15 00 02 83 01 - 15 00 02 84 18 - 15 00 02 85 01 - 15 00 02 86 20 - 15 00 02 87 01 - 15 00 02 88 3D - 15 00 02 89 01 - 15 00 02 8A 56 - 15 00 02 8B 01 - 15 00 02 8C 84 - 15 00 02 8D 01 - 15 00 02 8E AB - 15 00 02 8F 01 - 15 00 02 90 EC - 15 00 02 91 02 - 15 00 02 92 22 - 15 00 02 93 02 - 15 00 02 94 23 - 15 00 02 95 02 - 15 00 02 96 55 - 15 00 02 97 02 - 15 00 02 98 8B - 15 00 02 99 02 - 15 00 02 9A AF - 15 00 02 9B 02 - 15 00 02 9C DF - 15 00 02 9D 03 - 15 00 02 9E 01 - 15 00 02 9F 03 - 15 00 02 A0 2C - 15 00 02 A2 03 - 15 00 02 A3 39 - 15 00 02 A4 03 - 15 00 02 A5 47 - 15 00 02 A6 03 - 15 00 02 A7 56 - 15 00 02 A9 03 - 15 00 02 AA 66 - 15 00 02 AB 03 - 15 00 02 AC 76 - 15 00 02 AD 03 - 15 00 02 AE 85 - 15 00 02 AF 03 - 15 00 02 B0 90 - 15 00 02 B1 03 - 15 00 02 B2 CB - 15 00 02 B3 00 - 15 00 02 B4 DF - 15 00 02 B5 00 - 15 00 02 B6 E4 - 15 00 02 B7 00 - 15 00 02 B8 ED - 15 00 02 B9 00 - 15 00 02 BA F6 - 15 00 02 BB 00 - 15 00 02 BC FF - 15 00 02 BD 01 - 15 00 02 BE 07 - 15 00 02 BF 01 - 15 00 02 C0 10 - 15 00 02 C1 01 - 15 00 02 C2 18 - 15 00 02 C3 01 - 15 00 02 C4 20 - 15 00 02 C5 01 - 15 00 02 C6 3D - 15 00 02 C7 01 - 15 00 02 C8 56 - 15 00 02 C9 01 - 15 00 02 CA 84 - 15 00 02 CB 01 - 15 00 02 CC AB - 15 00 02 CD 01 - 15 00 02 CE EC - 15 00 02 CF 02 - 15 00 02 D0 22 - 15 00 02 D1 02 - 15 00 02 D2 23 - 15 00 02 D3 02 - 15 00 02 D4 55 - 15 00 02 D5 02 - 15 00 02 D6 8B - 15 00 02 D7 02 - 15 00 02 D8 AF - 15 00 02 D9 02 - 15 00 02 DA DF - 15 00 02 DB 03 - 15 00 02 DC 01 - 15 00 02 DD 03 - 15 00 02 DE 2C - 15 00 02 DF 03 - 15 00 02 E0 39 - 15 00 02 E1 03 - 15 00 02 E2 47 - 15 00 02 E3 03 - 15 00 02 E4 56 - 15 00 02 E5 03 - 15 00 02 E6 66 - 15 00 02 E7 03 - 15 00 02 E8 76 - 15 00 02 E9 03 - 15 00 02 EA 85 - 15 00 02 EB 03 - 15 00 02 EC 90 - 15 00 02 ED 03 - 15 00 02 EE CB - 15 00 02 EF 00 - 15 00 02 F0 BB - 15 00 02 F1 00 - 15 00 02 F2 C0 - 15 00 02 F3 00 - 15 00 02 F4 CC - 15 00 02 F5 00 - 15 00 02 F6 D6 - 15 00 02 F7 00 - 15 00 02 F8 E1 - 15 00 02 F9 00 - 15 00 02 FA EA - 15 00 02 FF 02 - 15 00 02 FB 01 - 15 00 02 00 00 - 15 00 02 01 F4 - 15 00 02 02 00 - 15 00 02 03 EF - 15 00 02 04 01 - 15 00 02 05 07 - 15 00 02 06 01 - 15 00 02 07 28 - 15 00 02 08 01 - 15 00 02 09 44 - 15 00 02 0A 01 - 15 00 02 0B 76 - 15 00 02 0C 01 - 15 00 02 0D A0 - 15 00 02 0E 01 - 15 00 02 0F E7 - 15 00 02 10 02 - 15 00 02 11 1F - 15 00 02 12 02 - 15 00 02 13 22 - 15 00 02 14 02 - 15 00 02 15 54 - 15 00 02 16 02 - 15 00 02 17 8B - 15 00 02 18 02 - 15 00 02 19 AF - 15 00 02 1A 02 - 15 00 02 1B E0 - 15 00 02 1C 03 - 15 00 02 1D 01 - 15 00 02 1E 03 - 15 00 02 1F 2D - 15 00 02 20 03 - 15 00 02 21 39 - 15 00 02 22 03 - 15 00 02 23 47 - 15 00 02 24 03 - 15 00 02 25 57 - 15 00 02 26 03 - 15 00 02 27 65 - 15 00 02 28 03 - 15 00 02 29 77 - 15 00 02 2A 03 - 15 00 02 2B 85 - 15 00 02 2D 03 - 15 00 02 2F 8F - 15 00 02 30 03 - 15 00 02 31 CB - 15 00 02 32 00 - 15 00 02 33 BB - 15 00 02 34 00 - 15 00 02 35 C0 - 15 00 02 36 00 - 15 00 02 37 CC - 15 00 02 38 00 - 15 00 02 39 D6 - 15 00 02 3A 00 - 15 00 02 3B E1 - 15 00 02 3D 00 - 15 00 02 3F EA - 15 00 02 40 00 - 15 00 02 41 F4 - 15 00 02 42 00 - 15 00 02 43 FE - 15 00 02 44 01 - 15 00 02 45 07 - 15 00 02 46 01 - 15 00 02 47 28 - 15 00 02 48 01 - 15 00 02 49 44 - 15 00 02 4A 01 - 15 00 02 4B 76 - 15 00 02 4C 01 - 15 00 02 4D A0 - 15 00 02 4E 01 - 15 00 02 4F E7 - 15 00 02 50 02 - 15 00 02 51 1F - 15 00 02 52 02 - 15 00 02 53 22 - 15 00 02 54 02 - 15 00 02 55 54 - 15 00 02 56 02 - 15 00 02 58 8B - 15 00 02 59 02 - 15 00 02 5A AF - 15 00 02 5B 02 - 15 00 02 5C E0 - 15 00 02 5D 03 - 15 00 02 5E 01 - 15 00 02 5F 03 - 15 00 02 60 2D - 15 00 02 61 03 - 15 00 02 62 39 - 15 00 02 63 03 - 15 00 02 64 47 - 15 00 02 65 03 - 15 00 02 66 57 - 15 00 02 67 03 - 15 00 02 68 65 - 15 00 02 69 03 - 15 00 02 6A 77 - 15 00 02 6B 03 - 15 00 02 6C 85 - 15 00 02 6D 03 - 15 00 02 6E 8F - 15 00 02 6F 03 - 15 00 02 70 CB - 15 00 02 71 00 - 15 00 02 72 00 - 15 00 02 73 00 - 15 00 02 74 21 - 15 00 02 75 00 - 15 00 02 76 4C - 15 00 02 77 00 - 15 00 02 78 6B - 15 00 02 79 00 - 15 00 02 7A 85 - 15 00 02 7B 00 - 15 00 02 7C 9A - 15 00 02 7D 00 - 15 00 02 7E AD - 15 00 02 7F 00 - 15 00 02 80 BE - 15 00 02 81 00 - 15 00 02 82 CD - 15 00 02 83 01 - 15 00 02 84 01 - 15 00 02 85 01 - 15 00 02 86 29 - 15 00 02 87 01 - 15 00 02 88 68 - 15 00 02 89 01 - 15 00 02 8A 98 - 15 00 02 8B 01 - 15 00 02 8C E5 - 15 00 02 8D 02 - 15 00 02 8E 1E - 15 00 02 8F 02 - 15 00 02 90 30 - 15 00 02 91 02 - 15 00 02 92 52 - 15 00 02 93 02 - 15 00 02 94 88 - 15 00 02 95 02 - 15 00 02 96 AA - 15 00 02 97 02 - 15 00 02 98 D7 - 15 00 02 99 02 - 15 00 02 9A F7 - 15 00 02 9B 03 - 15 00 02 9C 21 - 15 00 02 9D 03 - 15 00 02 9E 2E - 15 00 02 9F 03 - 15 00 02 A0 3D - 15 00 02 A2 03 - 15 00 02 A3 4C - 15 00 02 A4 03 - 15 00 02 A5 5E - 15 00 02 A6 03 - 15 00 02 A7 71 - 15 00 02 A9 03 - 15 00 02 AA 86 - 15 00 02 AB 03 - 15 00 02 AC 94 - 15 00 02 AD 03 - 15 00 02 AE FA - 15 00 02 AF 00 - 15 00 02 B0 00 - 15 00 02 B1 00 - 15 00 02 B2 21 - 15 00 02 B3 00 - 15 00 02 B4 4C - 15 00 02 B5 00 - 15 00 02 B6 6B - 15 00 02 B7 00 - 15 00 02 B8 85 - 15 00 02 B9 00 - 15 00 02 BA 9A - 15 00 02 BB 00 - 15 00 02 BC AD - 15 00 02 BD 00 - 15 00 02 BE BE - 15 00 02 BF 00 - 15 00 02 C0 CD - 15 00 02 C1 01 - 15 00 02 C2 01 - 15 00 02 C3 01 - 15 00 02 C4 29 - 15 00 02 C5 01 - 15 00 02 C6 68 - 15 00 02 C7 01 - 15 00 02 C8 98 - 15 00 02 C9 01 - 15 00 02 CA E5 - 15 00 02 CB 02 - 15 00 02 CC 1E - 15 00 02 CD 02 - 15 00 02 CE 20 - 15 00 02 CF 02 - 15 00 02 D0 52 - 15 00 02 D1 02 - 15 00 02 D2 88 - 15 00 02 D3 02 - 15 00 02 D4 AA - 15 00 02 D5 02 - 15 00 02 D6 D7 - 15 00 02 D7 02 - 15 00 02 D8 F7 - 15 00 02 D9 03 - 15 00 02 DA 21 - 15 00 02 DB 03 - 15 00 02 DC 2E - 15 00 02 DD 03 - 15 00 02 DE 3D - 15 00 02 DF 03 - 15 00 02 E0 4C - 15 00 02 E1 03 - 15 00 02 E2 5E - 15 00 02 E3 03 - 15 00 02 E4 71 - 15 00 02 E5 03 - 15 00 02 E6 86 - 15 00 02 E7 03 - 15 00 02 E8 94 - 15 00 02 E9 03 - 15 00 02 EA FA - 15 00 02 FF 01 - 15 00 02 FB 01 - 15 00 02 FF 02 - 15 00 02 FB 01 - 15 00 02 FF 04 - 15 00 02 FB 01 - 15 00 02 FF 00 - 15 00 02 D3 05 - 15 00 02 D4 04 - 05 78 01 11 - 15 00 02 FF 00 - 15 00 02 35 00 - 05 0A 01 29 - ]; - - panel-init-sequence2 = [ - 39 00 04 B9 FF 83 99 - 39 00 05 BA 63 23 68 CF - 15 00 02 D2 55 - 39 00 10 B1 02 04 70 90 01 32 33 11 11 4D 57 56 73 02 02 - 39 00 0c B2 00 80 80 AE 0A 0E 75 11 00 00 00 - 39 00 2f B4 00 FF 04 A4 02 A0 00 00 10 00 00 02 00 24 02 04 0A 21 03 00 00 08 A6 88 04 A4 02 A0 00 00 10 00 00 02 00 24 02 04 0A 00 00 08 A6 00 08 11 - 39 00 22 D3 00 00 00 00 00 00 18 18 32 10 09 00 09 32 10 00 00 00 00 00 00 00 00 11 00 02 02 03 00 00 00 0A 40 - 39 00 21 D5 18 18 18 18 21 20 18 18 19 19 19 19 18 18 18 18 03 02 01 00 2F 2F 30 30 31 31 18 18 18 18 18 18 - 39 00 21 D6 18 18 18 18 20 21 19 19 18 18 19 19 18 18 18 18 00 01 02 03 2F 2F 30 30 31 31 18 18 18 18 18 18 - 39 00 09 D8 0A BE FA A0 0A BE FA A0 - 15 00 02 BD 01 - 39 00 09 D8 0F FF FF E0 0F FF FF E0 - 15 00 02 BD 02 - 39 00 09 D8 0F FF FF E0 0F FF FF E0 - 15 00 02 BD 00 - 39 00 37 E0 01 35 41 3B 79 81 8C 85 8E 95 9B A0 A4 AB B1 B3 B7 C5 BD C5 B6 C2 C2 62 5D 66 73 01 35 41 3B 79 81 8C 85 8E 95 9B A0 A4 AB B1 B3 B7 B5 BD C5 B6 C2 C2 62 5D 66 73 - 39 00 03 B6 97 97 - 15 00 02 CC C8 - 39 00 05 BF 40 41 50 19 - 39 00 03 C6 FF F9 - 39 00 03 C0 25 5A - 05 78 01 11 - 05 14 01 29 - ]; - - panel-exit-sequence = [ - 05 05 01 28 - 05 78 01 10 - ]; - - disp_timings1: display-timings { - native-mode = <&dsi1_timing0>; - dsi1_timing0: timing0 { - clock-frequency = <152198100>; - hactive = <1080>; - vactive = <1920>; - hfront-porch = <104>; - hsync-len = <4>; - hback-porch = <127>; - vfront-porch = <4>; - vsync-len = <2>; - vback-porch = <3>; - hsync-active = <0>; - vsync-active = <0>; - de-active = <0>; - pixelclk-active = <0>; - }; - }; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - panel_in_dsi1: endpoint { - remote-endpoint = <&dsi1_out_panel>; - }; - }; - }; - }; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@1 { - reg = <1>; - dsi1_out_panel: endpoint { - remote-endpoint = <&panel_in_dsi1>; - }; - }; - }; - -}; - -&gpu { - mali-supply = <&vdd_gpu_s0>; - mem-supply = <&vdd_gpu_mem_s0>; - status = "okay"; -}; - -&i2s0_8ch { - status = "okay"; - pinctrl-0 = <&i2s0_lrck - &i2s0_sclk - &i2s0_sdi0 - &i2s0_sdo0>; -}; - -&iep { - status = "okay"; -}; - -&iep_mmu { - status = "okay"; -}; - -&jpegd { - status = "okay"; -}; - -&jpegd_mmu { - status = "okay"; -}; - -&jpege_ccu { - status = "okay"; -}; - -&jpege0 { - status = "okay"; -}; - -&jpege0_mmu { - status = "okay"; -}; - -&jpege1 { - status = "okay"; -}; - -&jpege1_mmu { - status = "okay"; -}; - -&jpege2 { - status = "okay"; -}; - -&jpege2_mmu { - status = "okay"; -}; - -&jpege3 { - status = "okay"; -}; - -&jpege3_mmu { - status = "okay"; -}; - -&mpp_srv { - status = "okay"; -}; - -&rga3_core0 { - status = "okay"; -}; - -&rga3_0_mmu { - status = "okay"; -}; - -&rga3_core1 { - status = "okay"; -}; - -&rga3_1_mmu { - status = "okay"; -}; - -&rga2 { - status = "okay"; -}; - -&rknpu { - rknpu-supply = <&vdd_npu_s0>; - mem-supply = <&vdd_npu_mem_s0>; - status = "okay"; -}; - -&rknpu_mmu { - status = "okay"; -}; - -&rkvdec_ccu { - status = "okay"; -}; - -&rkvdec0 { - status = "okay"; -}; - -&rkvdec0_mmu { - status = "okay"; -}; - -&rkvdec1 { - status = "okay"; -}; - -&rkvdec1_mmu { - status = "okay"; -}; - -&rkvenc_ccu { - status = "okay"; -}; - -&rkvenc0 { - status = "okay"; -}; - -&rkvenc0_mmu { - status = "okay"; -}; - -&rkvenc1 { - status = "okay"; -}; - -&rkvenc1_mmu { - status = "okay"; -}; - -&rockchip_suspend { - status = "okay"; - rockchip,sleep-debug-en = <1>; -}; - -&saradc { - status = "okay"; - vref-supply = <&vcc_1v8_s0>; -}; - -&sdhci { - bus-width = <8>; - no-sdio; - no-sd; - non-removable; - max-frequency = <200000000>; - mmc-hs400-1_8v; - mmc-hs400-enhanced-strobe; - status = "okay"; -}; - -&sdmmc { - max-frequency = <150000000>; - no-sdio; - no-mmc; - bus-width = <4>; - cap-mmc-highspeed; - cap-sd-highspeed; - disable-wp; - sd-uhs-sdr104; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd_s0>; - status = "disabled"; -}; - -&tsadc { - status = "okay"; -}; - -&u2phy0 { - status = "okay"; -}; - -&u2phy2 { - status = "okay"; -}; - -&u2phy3 { - status = "okay"; -}; - -&u2phy0_otg { - status = "okay"; -}; - -&u2phy2_host { - status = "okay"; -}; - -&u2phy3_host { - status = "okay"; -}; - -&usb_host0_ehci { - status = "okay"; -}; - -&usb_host0_ohci { - status = "okay"; -}; - -&usb_host1_ehci { - status = "okay"; -}; - -&usb_host1_ohci { - status = "okay"; -}; - -&usbdp_phy0 { - status = "okay"; -}; - -&usbdp_phy0_dp { - status = "okay"; -}; - -&usbdp_phy0_u3 { - status = "okay"; -}; - -&usbdrd3_0 { - status = "okay"; -}; - -&usbdrd_dwc3_0 { - dr_mode = "otg"; - status = "okay"; -}; - -&usbhost3_0 { - status = "okay"; -}; - -&usbhost_dwc3_0 { - status = "okay"; -}; - -&vdpu { - status = "okay"; -}; - -&vdpu_mmu { - status = "okay"; -}; - -&vepu { - status = "okay"; -}; - -&vop { - status = "okay"; -}; - -&vop_mmu { - status = "okay"; -}; - -/* vp0 & vp1 splice for 8K output */ -&vp0 { - rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0)>; - rockchip,primary-plane = ; -}; - -&vp1 { - rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1)>; - rockchip,primary-plane = ; -}; - -&vp2 { - rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER2 | 1 << ROCKCHIP_VOP2_ESMART2)>; - rockchip,primary-plane = ; -}; - -&vp3 { - rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER3 | 1 << ROCKCHIP_VOP2_ESMART3)>; - rockchip,primary-plane = ; -}; diff --git a/drivers/mfd/khadas-mcu.c b/drivers/mfd/khadas-mcu.c index f3d418810693c..ff606e65285f1 100644 --- a/drivers/mfd/khadas-mcu.c +++ b/drivers/mfd/khadas-mcu.c @@ -26,6 +26,10 @@ static bool khadas_mcu_reg_volatile(struct device *dev, unsigned int reg) case KHADAS_MCU_CHECK_USER_PASSWD_REG: case KHADAS_MCU_WOL_INIT_START_REG: case KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG: + case KHADAS_MCU_LED_ON_RAM_REG: + case KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG_V2: + case KHADAS_MCU_WDT_EN_REG: + case KHADAS_MCU_SYS_RST_REG: return true; default: return false; @@ -69,23 +73,18 @@ static const struct regmap_config khadas_mcu_regmap_config = { .reg_bits = 8, .reg_stride = 1, .val_bits = 8, - .max_register = KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG, + .max_register = KHADAS_MCU_SYS_RST_REG, .volatile_reg = khadas_mcu_reg_volatile, .writeable_reg = khadas_mcu_reg_writeable, .cache_type = REGCACHE_RBTREE, }; static struct mfd_cell khadas_mcu_fan_cells[] = { - /* VIM1/2 Rev13+ and VIM3 only */ + /* VIM1/2 Rev13+, VIM3 and Edge2 only */ { .name = "khadas-mcu-fan-ctrl", }, }; -static struct mfd_cell khadas_mcu_cells[] = { - { .name = "khadas-mcu-user-mem", }, -}; - -static int khadas_mcu_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int khadas_mcu_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; struct khadas_mcu *ddata; @@ -106,13 +105,6 @@ static int khadas_mcu_probe(struct i2c_client *client, return ret; } - ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, - khadas_mcu_cells, - ARRAY_SIZE(khadas_mcu_cells), - NULL, 0, NULL); - if (ret) - return ret; - if (of_find_property(dev->of_node, "#cooling-cells", NULL)) return devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, khadas_mcu_fan_cells, diff --git a/drivers/thermal/khadas_mcu_fan.c b/drivers/thermal/khadas_mcu_fan.c index d35e5313bea41..a020ef3c86c7d 100644 --- a/drivers/thermal/khadas_mcu_fan.c +++ b/drivers/thermal/khadas_mcu_fan.c @@ -15,10 +15,16 @@ #include #define MAX_LEVEL 3 +#define MAX_SPEED 0x64 struct khadas_mcu_fan_ctx { struct khadas_mcu *mcu; unsigned int level; + + unsigned int fan_max_level; + unsigned int fan_register; + unsigned int *fan_cooling_levels; + struct thermal_cooling_device *cdev; }; @@ -26,9 +32,21 @@ static int khadas_mcu_fan_set_level(struct khadas_mcu_fan_ctx *ctx, unsigned int level) { int ret; + unsigned int write_level = level; + + if (level > ctx->fan_max_level) + return -EINVAL; + + if (ctx->fan_cooling_levels != NULL) { + write_level = ctx->fan_cooling_levels[level]; + + if (write_level > MAX_SPEED) + return -EINVAL; + } + + ret = regmap_write(ctx->mcu->regmap, ctx->fan_register, + write_level); - ret = regmap_write(ctx->mcu->regmap, KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG, - level); if (ret) return ret; @@ -40,7 +58,9 @@ static int khadas_mcu_fan_set_level(struct khadas_mcu_fan_ctx *ctx, static int khadas_mcu_fan_get_max_state(struct thermal_cooling_device *cdev, unsigned long *state) { - *state = MAX_LEVEL; + struct khadas_mcu_fan_ctx *ctx = cdev->devdata; + + *state = ctx->fan_max_level; return 0; } @@ -61,7 +81,7 @@ khadas_mcu_fan_set_cur_state(struct thermal_cooling_device *cdev, { struct khadas_mcu_fan_ctx *ctx = cdev->devdata; - if (state > MAX_LEVEL) + if (state > ctx->fan_max_level) return -EINVAL; if (state == ctx->level) @@ -76,6 +96,48 @@ static const struct thermal_cooling_device_ops khadas_mcu_fan_cooling_ops = { .set_cur_state = khadas_mcu_fan_set_cur_state, }; +// Khadas Edge 2 sets fan level by passing fan speed(0-100). So we need different logic here like pwm-fan cooling-levels. +// This is optional and just necessary for Edge 2. +static int khadas_mcu_fan_get_cooling_data_edge2(struct khadas_mcu_fan_ctx *ctx, struct device *dev) { + struct device_node *np = ctx->mcu->dev->of_node; + int num, i, ret; + + if (!of_find_property(np, "cooling-levels", NULL)) + return 0; + + ret = of_property_count_u32_elems(np, "cooling-levels"); + if (ret <= 0) { + dev_err(dev, "Wrong data!\n"); + return ret ? : -EINVAL; + } + + num = ret; + ctx->fan_cooling_levels = devm_kcalloc(dev, num, sizeof(u32), + GFP_KERNEL); + if (!ctx->fan_cooling_levels) + return -ENOMEM; + + ret = of_property_read_u32_array(np, "cooling-levels", + ctx->fan_cooling_levels, num); + if (ret) { + dev_err(dev, "Property 'cooling-levels' cannot be read!\n"); + return ret; + } + + for (i = 0; i < num; i++) { + if (ctx->fan_cooling_levels[i] > MAX_SPEED) { + dev_err(dev, "PWM fan state[%d]:%d > %d\n", i, + ctx->fan_cooling_levels[i], MAX_SPEED); + return -EINVAL; + } + } + + ctx->fan_max_level = num - 1; + ctx->fan_register = KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG_V2; + + return 0; +} + static int khadas_mcu_fan_probe(struct platform_device *pdev) { struct khadas_mcu *mcu = dev_get_drvdata(pdev->dev.parent); @@ -90,6 +152,13 @@ static int khadas_mcu_fan_probe(struct platform_device *pdev) ctx->mcu = mcu; platform_set_drvdata(pdev, ctx); + ctx->fan_max_level = MAX_LEVEL; + ctx->fan_register = KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG; + + ret = khadas_mcu_fan_get_cooling_data_edge2(ctx, dev); + if (ret) + return ret; + cdev = devm_thermal_of_cooling_device_register(dev->parent, dev->parent->of_node, "khadas-mcu-fan", ctx, &khadas_mcu_fan_cooling_ops); diff --git a/include/linux/mfd/khadas-mcu.h b/include/linux/mfd/khadas-mcu.h index a99ba2ed0e4e0..63bc9bf76661d 100644 --- a/include/linux/mfd/khadas-mcu.h +++ b/include/linux/mfd/khadas-mcu.h @@ -35,26 +35,45 @@ #define KHADAS_MCU_FACTORY_TEST_REG 0x16 /* R */ #define KHADAS_MCU_BOOT_MODE_REG 0x20 /* RW */ #define KHADAS_MCU_BOOT_EN_WOL_REG 0x21 /* RW */ +#define KHADAS_MCU_BOOT_EN_DCIN_REG_V2 0x21 /* RW */ #define KHADAS_MCU_BOOT_EN_RTC_REG 0x22 /* RW */ #define KHADAS_MCU_BOOT_EN_EXP_REG 0x23 /* RW */ +#define KHADAS_MCU_LED_MODE_ON_REG_V2 0x23 /* RW */ +#define KHADAS_MCU_LED_MODE_OFF_REG_V2 0x24 /* RW */ #define KHADAS_MCU_BOOT_EN_IR_REG 0x24 /* RW */ #define KHADAS_MCU_BOOT_EN_DCIN_REG 0x25 /* RW */ +#define KHADAS_MCU_RGB_ON_R_REG 0x25 /* RW */ +#define KHADAS_MCU_RGB_ON_G_REG 0x26 /* RW */ #define KHADAS_MCU_BOOT_EN_KEY_REG 0x26 /* RW */ +#define KHADAS_MCU_RGB_ON_B_REG 0x27 /* RW */ #define KHADAS_MCU_KEY_MODE_REG 0x27 /* RW */ +#define KHADAS_MCU_RGB_OFF_R_REG 0x28 /* RW */ #define KHADAS_MCU_LED_MODE_ON_REG 0x28 /* RW */ +#define KHADAS_MCU_RGB_OFF_G_REG 0x29 /* RW */ #define KHADAS_MCU_LED_MODE_OFF_REG 0x29 /* RW */ +#define KHADAS_MCU_RGB_OFF_B_REG 0x2a /* RW */ #define KHADAS_MCU_SHUTDOWN_NORMAL_REG 0x2c /* RW */ #define KHADAS_MCU_MAC_SWITCH_REG 0x2d /* RW */ +#define KHADAS_MCU_REST_CONF_REG 0x2e /* RW */ #define KHADAS_MCU_MCU_SLEEP_MODE_REG 0x2e /* RW */ +#define KHADAS_MCU_BOOT_EN_IR_REG_V2 0x2f /* RW */ #define KHADAS_MCU_IR_CODE1_0_REG 0x2f /* RW */ #define KHADAS_MCU_IR_CODE1_1_REG 0x30 /* RW */ +#define KHADAS_MCU_IR1_CUST1_REG 0x30 /* RW */ #define KHADAS_MCU_IR_CODE1_2_REG 0x31 /* RW */ +#define KHADAS_MCU_IR1_CUST2_REG 0x31 /* RW */ #define KHADAS_MCU_IR_CODE1_3_REG 0x32 /* RW */ +#define KHADAS_MCU_IR1_ORDER1_REG 0x32 /* RW */ #define KHADAS_MCU_USB_PCIE_SWITCH_REG 0x33 /* RW */ +#define KHADAS_MCU_IR1_ORDER2_REG 0x33 /* RW */ +#define KHADAS_MCU_IR2_CUST1_REG 0x34 /* RW */ #define KHADAS_MCU_IR_CODE2_0_REG 0x34 /* RW */ #define KHADAS_MCU_IR_CODE2_1_REG 0x35 /* RW */ +#define KHADAS_MCU_IR2_CUST2_REG 0x35 /* RW */ #define KHADAS_MCU_IR_CODE2_2_REG 0x36 /* RW */ +#define KHADAS_MCU_IR2_ORDER1_REG 0x36 /* RW */ #define KHADAS_MCU_IR_CODE2_3_REG 0x37 /* RW */ +#define KHADAS_MCU_IR2_ORDER2_REG 0x36 /* RW */ #define KHADAS_MCU_PASSWD_USER_0_REG 0x40 /* RW */ #define KHADAS_MCU_PASSWD_USER_1_REG 0x41 /* RW */ #define KHADAS_MCU_PASSWD_USER_2_REG 0x42 /* RW */ @@ -69,6 +88,10 @@ #define KHADAS_MCU_SHUTDOWN_NORMAL_STATUS_REG 0x86 /* RO */ #define KHADAS_MCU_WOL_INIT_START_REG 0x87 /* WO */ #define KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG 0x88 /* WO */ +#define KHADAS_MCU_LED_ON_RAM_REG 0x89 /* WO */ +#define KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG_V2 0x8A /* WO */ +#define KHADAS_MCU_WDT_EN_REG 0x8B /* WO */ +#define KHADAS_MCU_SYS_RST_REG 0x91 /* WO */ enum { KHADAS_BOARD_VIM1 = 0x1, @@ -76,6 +99,7 @@ enum { KHADAS_BOARD_VIM3, KHADAS_BOARD_EDGE = 0x11, KHADAS_BOARD_EDGE_V, + KHADAS_BOARD_EDGE2, }; /**