diff --git a/.version b/.version index d00491fd7e5b..b8626c4cff28 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -1 +4 diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 04b5bc24791e..384b784d8c6d 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -142,10 +142,9 @@ dtb-$(CONFIG_CPU_RK3568) += \ rk3566-lubancat-1.dtb \ rk3566-lubancat-1n.dtb \ rk3568-lubancat-2.dtb \ + rk3568-lubancat-2-v1.dtb \ rk3568-lubancat-2n.dtb \ - rk3568-lubancat-2io.dtb \ - rk3568-lubancat-2io-mipi.dtb \ - rk3568-lubancat-2io-edp.dtb + rk3568-lubancat-2io.dtb endif diff --git a/arch/arm64/boot/dts/rockchip/overlay/Makefile b/arch/arm64/boot/dts/rockchip/overlay/Makefile index 4a7e8f2984bb..35097a4dada8 100644 --- a/arch/arm64/boot/dts/rockchip/overlay/Makefile +++ b/arch/arm64/boot/dts/rockchip/overlay/Makefile @@ -8,6 +8,7 @@ dtbo-$(CONFIG_CPU_RK3568) += \ rk356x-lubancat-i2c5-m0-overlay.dtbo \ rk356x-lubancat-pcie2x1-disabled-overlay.dtbo \ rk356x-lubancat-pwm3-ir-overlay.dtbo \ + rk356x-lubancat-pwm7-ir-overlay.dtbo \ rk356x-lubancat-pwm8-m0-overlay.dtbo \ rk356x-lubancat-pwm9-m0-overlay.dtbo \ rk356x-lubancat-pwm10-m0-overlay.dtbo \ @@ -28,10 +29,15 @@ dtbo-$(CONFIG_CPU_RK3568) += \ rk356x-lubancat-uart8-m0-overlay.dtbo \ rk356x-lubancat-uart8-m1-overlay.dtbo \ rk356x-lubancat-uart9-m1-overlay.dtbo \ + rk3566-lubancat-0-spi3-m1-gpio-cs-overlay.dtbo \ rk3566-lubancat-dsi0-720p-overlay.dtbo \ rk3566-lubancat-dsi0-1080p-overlay.dtbo \ rk3566-lubancat-dsi0-rpi-overlay.dtbo \ - rk3566-lubancat-0-spi3-m1-gpio-cs-overlay.dtbo \ + rk3568-lubancat-2io-dsi0-in-vp0-1080p-overlay.dtbo \ + rk3568-lubancat-2io-dsi0-in-vp0-rpi-overlay.dtbo \ + rk3568-lubancat-2io-dsi1-in-vp1-1080p-overlay.dtbo \ + rk3568-lubancat-2io-dsi1-in-vp1-rpi-overlay.dtbo \ + rk3568-lubancat-2io-edp-in-vp1-overlay.dtbo \ rk3568-lubancat-can1-m0-overlay.dtbo \ rk3568-lubancat-can1-m1-overlay.dtbo \ rk3568-lubancat-can2-m0-overlay.dtbo \ diff --git a/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-dsi0-in-vp0-1080p-overlay.dts b/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-dsi0-in-vp0-1080p-overlay.dts new file mode 100644 index 000000000000..ed2bd5f8e861 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-dsi0-in-vp0-1080p-overlay.dts @@ -0,0 +1,198 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + + fragment@0 { + target = <&route_dsi0>; + + __overlay__ { + status = "okay"; + connect = <&vp0_out_dsi0>; + }; + }; + + fragment@1 { + target = <&video_phy0>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@2 { + target = <&dsi0_in_vp0>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@3 { + target = <&dsi0_in_vp1>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@4 { + target = <&dsi0>; + + __overlay__ { + status = "okay"; + power-supply = <&mipi_dsi0_power>; + #address-cells = <1>; + #size-cells = <0>; + + dsi0_panel: panel@0 { + compatible = "simple-panel-dsi"; + reg = <0>; + backlight = <&backlight0>; + reset-gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_LOW>; + + enable-delay-ms = <35>; + prepare-delay-ms = <6>; + reset-delay-ms = <0>; + init-delay-ms = <20>; + unprepare-delay-ms = <0>; + disable-delay-ms = <20>; + + size,width = <74>; + size,height = <133>; + + 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 = [ + 39 00 04 B9 FF 83 99 + 15 00 02 D2 77 + 39 00 10 B1 02 04 74 94 01 32 33 11 11 AB 4D 56 73 02 02 + 39 00 10 B2 00 80 80 AE 05 07 5A 11 00 00 10 1E 70 03 D4 + 15 00 02 36 02 + 39 00 2D B4 00 FF 02 C0 02 C0 00 00 08 00 04 06 00 32 04 0A 08 21 03 01 00 0F B8 8B 02 C0 02 C0 00 00 08 00 04 06 00 32 04 0A 08 01 00 0F B8 01 + 39 05 22 D3 00 00 00 00 00 00 06 00 00 10 04 00 04 00 00 00 00 00 00 00 00 00 00 01 00 05 05 07 00 00 00 05 40 + 39 05 21 D5 18 18 19 19 18 18 21 20 01 00 07 06 05 04 03 02 18 18 18 18 18 18 2F 2F 30 30 31 31 18 18 18 18 + 39 05 21 D6 18 18 19 19 40 40 20 21 06 07 00 01 02 03 04 05 40 40 40 40 40 40 2F 2F 30 30 31 31 40 40 40 40 + 39 00 11 D8 A2 AA 02 A0 A2 A8 02 A0 B0 00 00 00 B0 00 00 00 + 15 00 02 BD 01 + 39 00 11 D8 B0 00 00 00 B0 00 00 00 E2 AA 03 F0 E2 AA 03 F0 + 15 00 02 BD 02 + 39 00 09 D8 E2 AA 03 F0 E2 AA 03 F0 + 15 00 02 BD 00 + 39 00 03 B6 8D 8D + 39 05 37 E0 00 0E 19 13 2E 39 48 44 4D 57 5F 66 6C 76 7F 85 8A 95 9A A4 9B AB B0 5C 58 64 77 00 0E 19 13 2E 39 48 44 4D 57 5F 66 6C 76 7F 85 8A 95 9A A4 9B AB B0 5C 58 64 77 + 05 C8 01 11 + 05 C8 01 29 + ]; + + panel-exit-sequence = [ + 05 78 01 28 + 05 00 01 10 + ]; + + disp_timing: display-timings { + native-mode = <&dsi0_timing>; + dsi0_timing: dsi0_timing { + clock-frequency = <131376000>; + hactive = <1080>; + vactive = <1920>; + hsync-len = <10>; + hback-porch = <20>; + hfront-porch = <10>; + vsync-len = <5>; + vback-porch = <20>; + vfront-porch = <10>; + 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_dsi0: endpoint { + remote-endpoint = <&dsi0_out_panel>; + }; + }; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + dsi0_out_panel: endpoint { + remote-endpoint = <&panel_in_dsi0>; + }; + }; + }; + }; + }; + + fragment@5 { + target = <&i2c1>; + + __overlay__ { + status = "okay"; + clock-frequency = <100000>; + #address-cells = <1>; + #size-cells = <0>; + + gt911: gt911@5d { + status = "okay"; + compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&gpio0>; + interrupts = ; + reset-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; + irq-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; + touchscreen-inverted-x = <1>; + touchscreen-inverted-y = <1>; + }; + }; + }; + + fragment@6 { + target = <&route_hdmi>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@7 { + target = <&hdmi_in_vp0>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@8 { + target = <&hdmi_in_vp1>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@9 { + target = <&hdmi>; + + __overlay__ { + status = "disabled"; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-dsi0-in-vp0-rpi-overlay.dts b/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-dsi0-in-vp0-rpi-overlay.dts new file mode 100644 index 000000000000..e15e2f847218 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-dsi0-in-vp0-rpi-overlay.dts @@ -0,0 +1,138 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + + fragment@0 { + target = <&route_dsi0>; + + __overlay__ { + status = "okay"; + connect = <&vp0_out_dsi0>; + }; + }; + + fragment@1 { + target = <&video_phy0>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@2 { + target = <&dsi0_in_vp0>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@3 { + target = <&dsi0_in_vp1>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@4 { + target = <&dsi0>; + + __overlay__ { + status = "okay"; + power-supply = <&mipi_dsi0_power>; + #address-cells = <1>; + #size-cells = <0>; + + dsi0_panel: panel@0 { + compatible = "rockpi,tc358762"; + reg = <0x0>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + panel_in_dsi0: endpoint { + remote-endpoint = <&dsi0_out_panel>; + }; + }; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + dsi0_out_panel: endpoint { + remote-endpoint = <&panel_in_dsi0>; + }; + }; + }; + }; + }; + + fragment@5 { + target = <&i2c1>; + + __overlay__ { + status = "okay"; + clock-frequency = <100000>; + #address-cells = <1>; + #size-cells = <0>; + + rockpi_mcu_0: rockpi-mcu@45 { + compatible = "rockpi_mcu"; + reg = <0x45>; + status = "okay"; + }; + + rockpi_ft5406_0: rockpi_ft5406@38 { + compatible = "rockpi_ft5406"; + reg = <0x38>; + status = "okay"; + }; + }; + }; + + fragment@6 { + target = <&route_hdmi>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@7 { + target = <&hdmi_in_vp0>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@8 { + target = <&hdmi_in_vp1>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@9 { + target = <&hdmi>; + + __overlay__ { + status = "disabled"; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-dsi1-in-vp1-1080p-overlay.dts b/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-dsi1-in-vp1-1080p-overlay.dts new file mode 100644 index 000000000000..a69e13179afa --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-dsi1-in-vp1-1080p-overlay.dts @@ -0,0 +1,168 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + + fragment@0 { + target = <&route_dsi1>; + + __overlay__ { + status = "okay"; + connect = <&vp1_out_dsi1>; + }; + }; + + fragment@1 { + target = <&video_phy1>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@2 { + target = <&dsi1_in_vp0>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@3 { + target = <&dsi1_in_vp1>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@4 { + target = <&dsi1>; + + __overlay__ { + status = "okay"; + power-supply = <&mipi_dsi1_power>; + #address-cells = <1>; + #size-cells = <0>; + + dsi1_panel: panel@0 { + status = "okay"; + compatible = "simple-panel-dsi"; + reg = <0>; + backlight = <&backlight1>; + reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; + + enable-delay-ms = <35>; + prepare-delay-ms = <6>; + reset-delay-ms = <0>; + init-delay-ms = <20>; + unprepare-delay-ms = <0>; + disable-delay-ms = <20>; + + size,width = <74>; + size,height = <133>; + + 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 = [ + 39 00 04 B9 FF 83 99 + 15 00 02 D2 77 + 39 00 10 B1 02 04 74 94 01 32 33 11 11 AB 4D 56 73 02 02 + 39 00 10 B2 00 80 80 AE 05 07 5A 11 00 00 10 1E 70 03 D4 + 15 00 02 36 02 + 39 00 2D B4 00 FF 02 C0 02 C0 00 00 08 00 04 06 00 32 04 0A 08 21 03 01 00 0F B8 8B 02 C0 02 C0 00 00 08 00 04 06 00 32 04 0A 08 01 00 0F B8 01 + 39 05 22 D3 00 00 00 00 00 00 06 00 00 10 04 00 04 00 00 00 00 00 00 00 00 00 00 01 00 05 05 07 00 00 00 05 40 + 39 05 21 D5 18 18 19 19 18 18 21 20 01 00 07 06 05 04 03 02 18 18 18 18 18 18 2F 2F 30 30 31 31 18 18 18 18 + 39 05 21 D6 18 18 19 19 40 40 20 21 06 07 00 01 02 03 04 05 40 40 40 40 40 40 2F 2F 30 30 31 31 40 40 40 40 + 39 00 11 D8 A2 AA 02 A0 A2 A8 02 A0 B0 00 00 00 B0 00 00 00 + 15 00 02 BD 01 + 39 00 11 D8 B0 00 00 00 B0 00 00 00 E2 AA 03 F0 E2 AA 03 F0 + 15 00 02 BD 02 + 39 00 09 D8 E2 AA 03 F0 E2 AA 03 F0 + 15 00 02 BD 00 + 39 00 03 B6 8D 8D + 39 05 37 E0 00 0E 19 13 2E 39 48 44 4D 57 5F 66 6C 76 7F 85 8A 95 9A A4 9B AB B0 5C 58 64 77 00 0E 19 13 2E 39 48 44 4D 57 5F 66 6C 76 7F 85 8A 95 9A A4 9B AB B0 5C 58 64 77 + 05 C8 01 11 + 05 C8 01 29 + ]; + + panel-exit-sequence = [ + 05 78 01 28 + 05 00 01 10 + ]; + + disp_timings: display-timings { + native-mode = <&dsi1_timing>; + dsi1_timing: timing { + clock-frequency = <131376000>; + hactive = <1080>; + vactive = <1920>; + hsync-len = <10>; + hback-porch = <20>; + hfront-porch = <10>; + vsync-len = <5>; + vback-porch = <20>; + vfront-porch = <10>; + 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@5 { + target = <&i2c5>; + + __overlay__ { + status = "okay"; + clock-frequency = <100000>; + #address-cells = <1>; + #size-cells = <0>; + + gt911: gt911@5d { + status = "okay"; + compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&gpio3>; + interrupts = ; + reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; + irq-gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>; + touchscreen-inverted-x = <1>; + touchscreen-inverted-y = <1>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-dsi1-in-vp1-rpi-overlay.dts b/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-dsi1-in-vp1-rpi-overlay.dts new file mode 100644 index 000000000000..fc9fe6b30c8e --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-dsi1-in-vp1-rpi-overlay.dts @@ -0,0 +1,106 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + + fragment@0 { + target = <&route_dsi1>; + + __overlay__ { + status = "okay"; + connect = <&vp1_out_dsi1>; + }; + }; + + fragment@1 { + target = <&video_phy1>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@2 { + target = <&dsi1_in_vp0>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@3 { + target = <&dsi1_in_vp1>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@4 { + target = <&dsi1>; + + __overlay__ { + status = "okay"; + power-supply = <&mipi_dsi1_power>; + #address-cells = <1>; + #size-cells = <0>; + + dsi1_panel: panel@0 { + compatible = "rockpi,tc358762"; + reg = <0x0>; + status = "okay"; + + 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@5 { + target = <&i2c5>; + + __overlay__ { + status = "okay"; + clock-frequency = <100000>; + #address-cells = <1>; + #size-cells = <0>; + + rockpi_mcu_1: rockpi-mcu@45 { + compatible = "rockpi_mcu"; + reg = <0x45>; + status = "okay"; + }; + + rockpi_ft5406_1: rockpi_ft5406@38 { + compatible = "rockpi_ft5406"; + reg = <0x38>; + status = "okay"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-edp-in-vp1-overlay.dts b/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-edp-in-vp1-overlay.dts new file mode 100644 index 000000000000..eb0ab5ba4137 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-2io-edp-in-vp1-overlay.dts @@ -0,0 +1,108 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + + fragment@0 { + target = <&route_edp>; + + __overlay__ { + status = "okay"; + connect = <&vp1_out_edp>; + }; + }; + + fragment@1 { + target = <&edp_phy>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@2 { + target = <&edp_in_vp0>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@3 { + target = <&edp_in_vp1>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@4 { + target = <&edp>; + + __overlay__ { + status = "okay"; + // hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>; //热插拔信号检测 + force-hpd; //强制hpd,忽略物理hdp信号 + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + edp_out_panel: endpoint@0 { + remote-endpoint = <&panel_in_edp>; + }; + }; + }; + }; + }; + + fragment@5 { + target-path = "/"; + + __overlay__ { + edp_panel: edp-panel { + compatible = "simple-panel"; + backlight = <&backlight2>; + status = "okay"; + power-supply = <&vdd_3v3_edp_lcd>; + enable-gpios = <&gpio2 RK_PD7 GPIO_ACTIVE_HIGH>; + //bus-format = ; + prepare-delay-ms = <100>; //AUX通信前延时 + enable-delay-ms = <100>; + + display-timings { + native-mode = <&timing0>; + + timing0: timing0 { + clock-frequency = <140000000>; + hactive = <1920>; + vactive = <1080>; + hfront-porch = <40>; + hsync-len = <40>; + hback-porch = <80>; + vfront-porch = <16>; + vsync-len = <8>; + vback-porch = <16>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + }; + }; + + ports { + panel_in_edp: endpoint { + remote-endpoint = <&edp_out_panel>; + }; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-hdmi-disabled-overlay.dts b/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-hdmi-disabled-overlay.dts index 0d7042759376..d32e6b1f9adf 100644 --- a/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-hdmi-disabled-overlay.dts +++ b/arch/arm64/boot/dts/rockchip/overlay/rk3568-lubancat-hdmi-disabled-overlay.dts @@ -35,4 +35,20 @@ status = "disabled"; }; }; + + fragment@4 { + target = <&hdmi_sound>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@5 { + target = <&i2s0_8ch>; + + __overlay__ { + status = "disabled"; + }; + }; }; \ No newline at end of file diff --git a/arch/arm64/boot/dts/rockchip/overlay/rk356x-lubancat-pwm7-ir-overlay.dts b/arch/arm64/boot/dts/rockchip/overlay/rk356x-lubancat-pwm7-ir-overlay.dts new file mode 100644 index 000000000000..9bff37fe8e53 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rk356x-lubancat-pwm7-ir-overlay.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "rockchip,rk3568"; + + fragment@0 { + target = <&pwm7>; + + __overlay__ { + status = "okay"; + }; + }; +}; + diff --git a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-0.dts b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-0.dts index 6995aec8253d..6a3d8b800205 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-0.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-0.dts @@ -284,36 +284,6 @@ status = "okay"; }; -&dmc_opp_table { - opp-324000000 { - opp-hz = /bits/ 64 <324000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <528000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <780000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-1056000000 { - opp-hz = /bits/ 64 <1056000000>; - opp-microvolt = <900000>; - opp-microvolt-L0 = <900000>; - opp-microvolt-L1 = <850000>; - }; -}; - &gpu { mali-supply = <&vdd_gpu>; status = "okay"; diff --git a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts index 9661676e8e20..35291b20a58a 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts @@ -364,7 +364,7 @@ &dmc { system-status-freq = < /*system status freq(KHz)*/ - SYS_STATUS_NORMAL 780000 + SYS_STATUS_NORMAL 1056000 SYS_STATUS_REBOOT 1056000 SYS_STATUS_SUSPEND 324000 SYS_STATUS_VIDEO_1080P 528000 @@ -376,40 +376,6 @@ status = "okay"; }; -&dmc_opp_table { - opp-324000000 { - opp-hz = /bits/ 64 <324000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <528000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <780000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-1056000000 { - opp-hz = /bits/ 64 <1056000000>; - opp-microvolt = <900000>; - opp-microvolt-L0 = <900000>; - opp-microvolt-L1 = <850000>; - }; - - test-power { - status = "okay"; - }; -}; - &gpu { mali-supply = <&vdd_gpu>; status = "okay"; diff --git a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1n.dts b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1n.dts index a4a09d10e96f..d471f1caf21b 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1n.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1n.dts @@ -368,36 +368,6 @@ status = "okay"; }; -&dmc_opp_table { - opp-324000000 { - opp-hz = /bits/ 64 <324000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <528000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <780000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-1056000000 { - opp-hz = /bits/ 64 <1056000000>; - opp-microvolt = <900000>; - opp-microvolt-L0 = <900000>; - opp-microvolt-L1 = <850000>; - }; -}; - &gpu { mali-supply = <&vdd_gpu>; status = "okay"; diff --git a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-hdmi.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-hdmi.dtsi index b61bdc765228..e511456e64bd 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-hdmi.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-hdmi.dtsi @@ -4,6 +4,29 @@ * */ +/{ + hdmi_sound: hdmi-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <128>; + simple-audio-card,name = "rockchip,hdmi"; + status = "okay"; + + simple-audio-card,cpu { + sound-dai = <&i2s0_8ch>; + }; + + simple-audio-card,codec { + sound-dai = <&hdmi>; + }; + }; +}; + +&i2s0_8ch { + status = "okay"; +}; + + &route_hdmi { status = "okay"; connect = <&vp0_out_hdmi>; @@ -19,4 +42,4 @@ &hdmi { status = "okay"; -}; +}; \ No newline at end of file diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2-v1.dts b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2-v1.dts new file mode 100644 index 000000000000..782790ef9536 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2-v1.dts @@ -0,0 +1,134 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2020 Rockchip Electronics Co., Ltd. + * + */ + +#include "rk3568-lubancat-2.dts" + +/ { + model = "EmbedFire LubanCat-2"; + compatible = "embedfire,lubancat-2-v1", "rockchip,rk3568"; +}; + +&pwm3 { + status = "okay"; + + compatible = "rockchip,remotectl-pwm"; + interrupts = ; + remote_pwm_id = <3>; + handle_cpu_id = <1>; + remote_support_psci = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pwm3_pins>; + + ir_key_lubancat{ + rockchip,usercode = <0x909>; + rockchip,key_table = + <0xf4 KEY_POWER>, + <0xe6 KEY_SLEEP>, + <0xe4 KEY_WAKEUP>, + <0xed KEY_VOLUMEUP>, + <0xec KEY_VOLUMEDOWN>, + <0xef KEY_UP>, + <0xee KEY_DOWN>; + }; + + ir_key1 { + rockchip,usercode = <0x4040>; + rockchip,key_table = + <0xf2 KEY_REPLY>, + <0xba KEY_BACK>, + <0xf4 KEY_UP>, + <0xf1 KEY_DOWN>, + <0xef KEY_LEFT>, + <0xee KEY_RIGHT>, + <0xbd KEY_HOME>, + <0xea KEY_VOLUMEUP>, + <0xe3 KEY_VOLUMEDOWN>, + <0xe2 KEY_SEARCH>, + <0xb2 KEY_POWER>, + <0xbc KEY_MUTE>, + <0xec KEY_MENU>, + <0xbf 0x190>, + <0xe0 0x191>, + <0xe1 0x192>, + <0xe9 183>, + <0xe6 248>, + <0xe8 185>, + <0xe7 186>, + <0xf0 388>, + <0xbe 0x175>; + }; + + ir_key2 { + rockchip,usercode = <0xff00>; + rockchip,key_table = + <0xf9 KEY_HOME>, + <0xbf KEY_BACK>, + <0xfb KEY_MENU>, + <0xaa KEY_REPLY>, + <0xb9 KEY_UP>, + <0xe9 KEY_DOWN>, + <0xb8 KEY_LEFT>, + <0xea KEY_RIGHT>, + <0xeb KEY_VOLUMEDOWN>, + <0xef KEY_VOLUMEUP>, + <0xf7 KEY_MUTE>, + <0xe7 KEY_POWER>, + <0xfc KEY_POWER>, + <0xa9 KEY_VOLUMEDOWN>, + <0xa8 KEY_VOLUMEDOWN>, + <0xe0 KEY_VOLUMEDOWN>, + <0xa5 KEY_VOLUMEDOWN>, + <0xab 183>, + <0xb7 388>, + <0xe8 388>, + <0xf8 184>, + <0xaf 185>, + <0xed KEY_VOLUMEDOWN>, + <0xee 186>, + <0xb3 KEY_VOLUMEDOWN>, + <0xf1 KEY_VOLUMEDOWN>, + <0xf2 KEY_VOLUMEDOWN>, + <0xf3 KEY_SEARCH>, + <0xb4 KEY_VOLUMEDOWN>, + <0xbe KEY_SEARCH>; + }; + + ir_key3 { + rockchip,usercode = <0x1dcc>; + rockchip,key_table = + <0xee KEY_REPLY>, + <0xf0 KEY_BACK>, + <0xf8 KEY_UP>, + <0xbb KEY_DOWN>, + <0xef KEY_LEFT>, + <0xed KEY_RIGHT>, + <0xfc KEY_HOME>, + <0xf1 KEY_VOLUMEUP>, + <0xfd KEY_VOLUMEDOWN>, + <0xb7 KEY_SEARCH>, + <0xff KEY_POWER>, + <0xf3 KEY_MUTE>, + <0xbf KEY_MENU>, + <0xf9 0x191>, + <0xf5 0x192>, + <0xb3 388>, + <0xbe KEY_1>, + <0xba KEY_2>, + <0xb2 KEY_3>, + <0xbd KEY_4>, + <0xf9 KEY_5>, + <0xb1 KEY_6>, + <0xfc KEY_7>, + <0xf8 KEY_8>, + <0xb0 KEY_9>, + <0xb6 KEY_0>, + <0xb5 KEY_BACKSPACE>; + }; +}; + +&rockchip_suspend { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dts b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dts index 629d8d9622b9..d83c7c78d783 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dts @@ -4,352 +4,11 @@ * */ - /dts-v1/; - -#include -#include -#include -#include -#include -#include -#include -#include "rk3568.dtsi" - -//MIPI摄像头配置 -#include "rk3568-lubancat-csi2.dtsi" - -// MIPI屏幕设置,通用镜像使用设备树插件 -//专用镜像如果要开启MIPI屏幕支持,按屏幕型号开启1-3 -//以下3个配置互斥,不可同时开启 -// #include "rk3568-lubancat-dsi0-ebf410125_720p.dtsi" //野火5.5寸 720P -// #include "rk3568-lubancat-dsi0-ebf410125_1080p.dtsi" //野火5.5寸 1080P -// #include "rk3568-lubancat-dsi0-rpi.dtsi" //树莓派 5寸 800x480 - +#include "rk3568-lubancat-2.dtsi" / { model = "EmbedFire LubanCat-2"; compatible = "embedfire,lubancat-2", "rockchip,rk3568"; - - chosen: chosen { - bootargs = "earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0 root=PARTUUID=614e0000-0000 rw rootwait"; - }; - - fiq-debugger { - compatible = "rockchip,fiq-debugger"; - rockchip,serial-id = <2>; - rockchip,wake-irq = <0>; - /* If enable uart uses irq instead of fiq */ - rockchip,irq-mode-enable = <1>; - rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */ - interrupts = ; - pinctrl-names = "default"; - pinctrl-0 = <&uart2m0_xfer>; - status = "okay"; - }; - - debug: debug@fd904000 { - compatible = "rockchip,debug"; - reg = <0x0 0xfd904000 0x0 0x1000>, - <0x0 0xfd905000 0x0 0x1000>, - <0x0 0xfd906000 0x0 0x1000>, - <0x0 0xfd907000 0x0 0x1000>; - }; - - cspmu: cspmu@fd90c000 { - compatible = "rockchip,cspmu"; - reg = <0x0 0xfd90c000 0x0 0x1000>, - <0x0 0xfd90d000 0x0 0x1000>, - <0x0 0xfd90e000 0x0 0x1000>, - <0x0 0xfd90f000 0x0 0x1000>; - }; - - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - ramoops: ramoops@110000 { - compatible = "ramoops"; - reg = <0x0 0x110000 0x0 0xf0000>; - record-size = <0x20000>; - console-size = <0x80000>; - ftrace-size = <0x00000>; - pmsg-size = <0x50000>; - }; - - abc: abc@80900000{ - reg = <0x0 0x80900000 0x0 0x100000>; - }; - }; - - adc_keys: adc-keys { - compatible = "adc-keys"; - io-channels = <&saradc 0>; - io-channel-names = "buttons"; - keyup-threshold-microvolt = <1800000>; - poll-interval = <100>; - - restart-key { - label = "restart"; - linux,code = ; - press-threshold-microvolt = <9>; - }; - }; - - dc_5v: dc-5v { - compatible = "regulator-fixed"; - regulator-name = "dc_5v"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - }; - - 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 = <&dc_5v>; - }; - - vcc3v3_sys: vcc3v3-sys { - compatible = "regulator-fixed"; - regulator-name = "vcc3v3_sys"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - vin-supply = <&vcc5v0_sys>; - }; - - vcc5v0_usb20_host: vcc5v0-usb20-host-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vcc5v0_usb20_host_en>; - regulator-name = "vcc5v0_usb20_host"; - regulator-always-on; - }; - - vcc5v0_usb30_host: vcc5v0-usb30-host-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vcc5v0_usb30_host_en>; - regulator-name = "vcc5v0_usb30_host"; - regulator-always-on; - }; - - vcc5v0_otg_vbus: vcc5v0-otg-vbus-regulator { - compatible = "regulator-fixed"; - enable-active-high; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - gpio = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vcc5v0_otg_vbus_en>; - regulator-name = "vcc5v0_otg_vbus"; - }; - - mini_pcie_3v3: mini-pcie-3v3-regulator { - compatible = "regulator-fixed"; - regulator-name = "minipcie_3v3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - enable-active-high; - regulator-always-on; - gpio = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>; - startup-delay-us = <5000>; - vin-supply = <&vcc5v0_sys>; - }; - - pcie30_3v3: gpio-regulator { - compatible = "regulator-gpio"; - regulator-name = "pcie30_3v3"; - regulator-min-microvolt = <100000>; - regulator-max-microvolt = <3300000>; - gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; - gpios-states = <0x1>; - states = <100000 0x0 - 3300000 0x1>; - }; - - mipi_dsi0_power: mipi-dsi0-power-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&mipi_dsi0_pwr_en>; - regulator-name = "mipi_dsi0_power"; - regulator-always-on; - }; - - vdd_cam_5v: vdd-cam-5v-regulator { - compatible = "regulator-fixed"; - regulator-name = "vdd_cam_5v"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - gpio = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&cam_pwr_en>; - enable-active-high; - regulator-always-on; - }; - - cam_dovdd: cam-dovdd { - compatible = "regulator-fixed"; - regulator-name = "cam_dovdd"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - vin-supply = <&vdd_cam_5v>; - }; - - cam_avdd: cam-avdd { - compatible = "regulator-fixed"; - regulator-name = "cam_avdd"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - vin-supply = <&vdd_cam_5v>; - }; - - cam_dvdd: cam-dvdd { - compatible = "regulator-fixed"; - regulator-name = "cam_dvdd"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - vin-supply = <&vdd_cam_5v>; - }; - - leds: leds { - status = "okay"; - compatible = "gpio-leds"; - - sys_status_led: sys-status-led { - label = "sys_status_led"; - linux,default-trigger = "heartbeat"; - default-state = "on"; - gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&sys_status_led_pin>; - }; - }; - - rk809_sound: rk809-sound { - status = "okay"; - compatible = "simple-audio-card"; - simple-audio-card,format = "i2s"; - simple-audio-card,name = "rockchip,rk809-codec"; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Microphone", "Mic Jack", - "Headphone", "Headphone Jack"; - simple-audio-card,routing = - "Mic Jack", "MICBIAS1", - "IN1P", "Mic Jack", - "Headphone Jack", "HPOL", - "Headphone Jack", "HPOR"; - simple-audio-card,cpu { - sound-dai = <&i2s1_8ch>; - }; - simple-audio-card,codec { - sound-dai = <&rk809_codec>; - }; - }; - - rk_headset: rk-headset { - status = "okay"; - compatible = "rockchip_headset"; - headset_gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&hp_det>; - io-channels = <&saradc 1>; - }; - - ext_cam_clk: external-camera-clock { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <24000000>; - clock-output-names = "CLK_CAMERA1_24MHZ"; - }; - - backlight: backlight { - status = "okay"; - compatible = "pwm-backlight"; - pwms = <&pwm4 0 50000 0>; - brightness-levels = < - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 - 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 - 120 121 122 123 124 125 126 127 - 128 129 130 131 132 133 134 135 - 136 137 138 139 140 141 142 143 - 144 145 146 147 148 149 150 151 - 152 153 154 155 156 157 158 159 - 160 161 162 163 164 165 166 167 - 168 169 170 171 172 173 174 175 - 176 177 178 179 180 181 182 183 - 184 185 186 187 188 189 190 191 - 192 193 194 195 196 197 198 199 - 200 201 202 203 204 205 206 207 - 208 209 210 211 212 213 214 215 - 216 217 218 219 220 221 222 223 - 224 225 226 227 228 229 230 231 - 232 233 234 235 236 237 238 239 - 240 241 242 243 244 245 246 247 - 248 249 250 251 252 253 254 255 - >; - default-brightness-level = <200>; - }; - - test-power { - status = "okay"; - }; -}; - -&saradc { - vref-supply = <&vcca_1v8>; - status = "okay"; -}; - -&tsadc { - status = "okay"; -}; - -&i2s1_8ch { - status = "okay"; - rockchip,clk-trcm = <1>; - /delete-property/ rockchip,playback-only; - pinctrl-names = "default"; - pinctrl-0 = <&i2s1m0_sclktx - &i2s1m0_lrcktx - &i2s1m0_sdi0 - &i2s1m0_sdo0>; -}; - -&pwm4 { - status = "okay"; }; &pwm7 { @@ -468,780 +127,4 @@ <0xb6 KEY_0>, <0xb5 KEY_BACKSPACE>; }; -}; - -&cpu0 { - cpu-supply = <&vdd_cpu>; -}; - -&dfi { - status = "okay"; -}; - -&dmc { - system-status-freq = < - /*system status freq(KHz)*/ - SYS_STATUS_NORMAL 780000 - SYS_STATUS_REBOOT 1560000 - SYS_STATUS_SUSPEND 324000 - SYS_STATUS_VIDEO_1080P 528000 - SYS_STATUS_BOOST 1560000 - SYS_STATUS_ISP 1560000 - SYS_STATUS_PERFORMANCE 1560000 - >; - center-supply = <&vdd_logic>; - status = "okay"; -}; - -&dmc_opp_table { - opp-324000000 { - opp-hz = /bits/ 64 <324000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <528000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <780000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-1560000000 { - opp-hz = /bits/ 64 <1560000000>; - opp-microvolt = <900000>; - opp-microvolt-L0 = <900000>; - opp-microvolt-L1 = <850000>; - }; -}; - -&gpu { - mali-supply = <&vdd_gpu>; - status = "okay"; -}; - -&xin32k { - status = "disabled"; -}; - -&i2c0 { - status = "okay"; - - vdd_cpu: tcs4525@1c { - compatible = "tcs,tcs452x"; - reg = <0x1c>; - vin-supply = <&vcc5v0_sys>; - regulator-compatible = "fan53555-reg"; - regulator-name = "vdd_cpu"; - regulator-min-microvolt = <712500>; - regulator-max-microvolt = <1390000>; - regulator-ramp-delay = <2300>; - fcs,suspend-voltage-selector = <1>; - regulator-boot-on; - regulator-always-on; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; -/* - vdd_cpu: syr827@40 { - compatible = "silergy,syr827"; - reg = <0x40>; - fcs,suspend-voltage-selector = <1>; - regulator-name = "vdd_cpu"; - regulator-min-microvolt = <712500>; - regulator-max-microvolt = <1390000>; - regulator-ramp-delay = <2300>; - regulator-always-on; - regulator-boot-on; - vin-supply = <&vcc5v0_sys>; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; -*/ - rk809: pmic@20 { - compatible = "rockchip,rk809"; - reg = <0x20>; - interrupt-parent = <&gpio0>; - interrupts = <3 IRQ_TYPE_LEVEL_LOW>; - - pinctrl-names = "default", "pmic-sleep", - "pmic-power-off", "pmic-reset"; - pinctrl-0 = <&pmic_int>; - pinctrl-1 = <&soc_slppin_slp>, <&rk817_slppin_slp>; - pinctrl-2 = <&soc_slppin_gpio>, <&rk817_slppin_pwrdn>; - pinctrl-3 = <&soc_slppin_gpio>, <&rk817_slppin_rst>; - - rockchip,system-power-controller; - wakeup-source; - #clock-cells = <1>; - clock-output-names = "rk808-clkout1", "rk808-clkout2"; - //fb-inner-reg-idxs = <2>; - /* 1: rst regs (default in codes), 0: rst the pmic */ - pmic-reset-func = <0>; - /* not save the PMIC_POWER_EN register in uboot */ - not-save-power-en = <1>; - - vcc1-supply = <&vcc3v3_sys>; - vcc2-supply = <&vcc3v3_sys>; - vcc3-supply = <&vcc3v3_sys>; - vcc4-supply = <&vcc3v3_sys>; - vcc5-supply = <&vcc3v3_sys>; - vcc6-supply = <&vcc3v3_sys>; - vcc7-supply = <&vcc3v3_sys>; - vcc8-supply = <&vcc3v3_sys>; - vcc9-supply = <&vcc3v3_sys>; - - pwrkey { - status = "okay"; - }; - - pinctrl_rk8xx: pinctrl_rk8xx { - gpio-controller; - #gpio-cells = <2>; - - rk817_slppin_null: rk817_slppin_null { - pins = "gpio_slp"; - function = "pin_fun0"; - }; - - rk817_slppin_slp: rk817_slppin_slp { - pins = "gpio_slp"; - function = "pin_fun1"; - }; - - rk817_slppin_pwrdn: rk817_slppin_pwrdn { - pins = "gpio_slp"; - function = "pin_fun2"; - }; - - rk817_slppin_rst: rk817_slppin_rst { - pins = "gpio_slp"; - function = "pin_fun3"; - }; - }; - - regulators { - vdd_logic: DCDC_REG1 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1350000>; - regulator-init-microvolt = <900000>; - regulator-ramp-delay = <6001>; - regulator-initial-mode = <0x2>; - regulator-name = "vdd_logic"; - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - - vdd_gpu: DCDC_REG2 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1350000>; - regulator-init-microvolt = <900000>; - regulator-ramp-delay = <6001>; - regulator-initial-mode = <0x2>; - regulator-name = "vdd_gpu"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc_ddr: DCDC_REG3 { - regulator-always-on; - regulator-boot-on; - regulator-initial-mode = <0x2>; - regulator-name = "vcc_ddr"; - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - - vdd_npu: DCDC_REG4 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1350000>; - regulator-init-microvolt = <900000>; - regulator-ramp-delay = <6001>; - regulator-initial-mode = <0x2>; - regulator-name = "vdd_npu"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdda0v9_image: LDO_REG1 { - regulator-boot-on; - regulator-always-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <900000>; - regulator-name = "vdda0v9_image"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdda_0v9: LDO_REG2 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <900000>; - regulator-name = "vdda_0v9"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdda0v9_pmu: LDO_REG3 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <900000>; - regulator-name = "vdda0v9_pmu"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <900000>; - }; - }; - - vccio_acodec: LDO_REG4 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vccio_acodec"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vccio_sd: LDO_REG5 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vccio_sd"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc3v3_pmu: LDO_REG6 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc3v3_pmu"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcca_1v8: LDO_REG7 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "vcca_1v8"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcca1v8_pmu: LDO_REG8 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "vcca1v8_pmu"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcca1v8_image: LDO_REG9 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "vcca1v8_image"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc_1v8: DCDC_REG5 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "vcc_1v8"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc_3v3: SWITCH_REG1 { - regulator-always-on; - regulator-boot-on; - regulator-name = "vcc_3v3"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc3v3_sd: SWITCH_REG2 { - regulator-always-on; - regulator-boot-on; - regulator-name = "vcc3v3_sd"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - }; - - rk809_codec: codec { - #sound-dai-cells = <0>; - compatible = "rockchip,rk809-codec", "rockchip,rk817-codec"; - clocks = <&cru I2S1_MCLKOUT_TX>; - clock-names = "mclk"; - assigned-clocks = <&cru I2S1_MCLKOUT_TX>, <&cru I2S1_MCLK_TX_IOE>; - assigned-clock-rates = <12288000>; - assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>, <&cru I2S1_MCLKOUT_TX>; - pinctrl-names = "default"; - pinctrl-0 = <&i2s1m0_mclk>; - hp-volume = <20>; - spk-volume = <3>; - //mic-in-differential; - status = "okay"; - }; - }; -}; - -&i2c1 { - status = "okay"; - clock-frequency = <100000>; - - rockpi_ft5406: rockpi_ft5406@38 { - compatible = "rockpi_ft5406"; - reg = <0x38>; - status = "okay"; - }; -}; - -&iep { - status = "okay"; -}; - -&iep_mmu { - status = "okay"; -}; - -&jpegd { - status = "okay"; -}; - -&jpegd_mmu { - status = "okay"; -}; - -&mpp_srv { - status = "okay"; -}; - -&pmu_io_domains { - status = "okay"; - pmuio1-supply = <&vcc3v3_pmu>; - pmuio2-supply = <&vcc3v3_pmu>; - vccio1-supply = <&vccio_acodec>; - vccio3-supply = <&vccio_sd>; - vccio4-supply = <&vcc_1v8>; - vccio5-supply = <&vcc_3v3>; - vccio6-supply = <&vcc_1v8>; - vccio7-supply = <&vcc_3v3>; -}; - -&rk_rga { - status = "okay"; -}; - -&rkvdec { - status = "okay"; -}; - -&rkvdec_mmu { - status = "okay"; -}; - -&rkvenc { - venc-supply = <&vdd_logic>; - status = "okay"; -}; - -&rkvenc_mmu { - status = "okay"; -}; - -&rknpu { - rknpu-supply = <&vdd_npu>; - status = "okay"; -}; - -&rknpu_mmu { - status = "okay"; -}; - -&bus_npu { - bus-supply = <&vdd_logic>; - pvtm-supply = <&vdd_cpu>; - status = "okay"; -}; - -&sdhci { - bus-width = <8>; - supports-emmc; - non-removable; - max-frequency = <200000000>; - status = "okay"; -}; - -&sdmmc0 { - max-frequency = <150000000>; - supports-sd; - bus-width = <4>; - cap-mmc-highspeed; - cap-sd-highspeed; - disable-wp; - sd-uhs-sdr104; - vmmc-supply = <&vcc3v3_sd>; - vqmmc-supply = <&vccio_sd>; - pinctrl-names = "default"; - pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; - status = "okay"; -}; - -&vdpu { - status = "okay"; -}; - -&vdpu_mmu { - status = "okay"; -}; - -&vepu { - status = "okay"; -}; - -&vepu_mmu { - status = "okay"; -}; - -&vop { - status = "okay"; - assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>; - assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>; -}; - -&vop_mmu { - status = "okay"; -}; - -&vp0 { - rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0 | 1 << ROCKCHIP_VOP2_SMART0)>; - rockchip,primary-plane = ; - cursor-win-id = ; -}; - -&vp1 { - rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1 | 1 << ROCKCHIP_VOP2_SMART1)>; - rockchip,primary-plane = ; - cursor-win-id = ; -}; - -&rng { - status = "okay"; -}; - -/* USB OTG/USB Host_1 USB 2.0 Comb */ -&usb2phy0 { - status = "okay"; -}; - -&u2phy0_host { - phy-supply = <&vcc5v0_usb30_host>; - status = "okay"; -}; - -&u2phy0_otg { - vbus-supply = <&vcc5v0_otg_vbus>; - status = "okay"; -}; - -&usb_host0_ehci { - status = "okay"; -}; - -&usb_host0_ohci { - status = "okay"; -}; - -/* USB Host_2/USB Host_3 USB 2.0 Comb */ -&usb2phy1 { - status = "okay"; -}; - -&u2phy1_otg { - phy-supply = <&vcc5v0_usb20_host>; - status = "okay"; -}; - -&u2phy1_host { - status = "okay"; -}; - -&usb_host1_ehci { - status = "okay"; -}; - -&usb_host1_ohci { - status = "okay"; -}; - -/* MULTI_PHY0 For SATA0, USB3.0 OTG Only USB2.0 */ -&combphy0_us { - status = "okay"; -}; - -&usbdrd30 { - status = "okay"; -}; - -&usbdrd_dwc3 { - phys = <&u2phy0_otg>; - phy-names = "usb2-phy"; - extcon = <&usb2phy0>; - maximum-speed = "high-speed"; - snps,dis_u2_susphy_quirk; - status = "okay"; -}; - -&sata0 { - status = "okay"; -}; - -/* USB3.0 Host */ -&combphy1_usq { - status = "okay"; -}; - -&usbhost30 { - status = "okay"; -}; - -&usbhost_dwc3 { - status = "okay"; -}; - -&gmac0 { - phy-mode = "rgmii"; - clock_in_out = "output"; - - snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>; - snps,reset-active-low; - /* Reset time is 75ms, 100ms */ - snps,reset-delays-us = <0 75000 100000>; - - assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>; - assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>; - assigned-clock-rates = <0>, <125000000>; - - pinctrl-names = "default"; - pinctrl-0 = <&gmac0_miim - &gmac0_tx_bus2 - &gmac0_rx_bus2 - &gmac0_rgmii_clk - &gmac0_rgmii_bus>; - - tx_delay = <0x22>; - rx_delay = <0x0e>; - - phy-handle = <&rgmii_phy0>; - status = "okay"; -}; - -&mdio0 { - rgmii_phy0: phy@0 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <0x0>; - }; -}; - -&gmac1 { - phy-mode = "rgmii"; - clock_in_out = "output"; - - snps,reset-gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>; - snps,reset-active-low; - /* Reset time is 75ms, 100ms */ - snps,reset-delays-us = <0 75000 100000>; - - assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>; - assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>; - assigned-clock-rates = <0>, <125000000>; - - pinctrl-names = "default"; - pinctrl-0 = <&gmac1m1_miim - &gmac1m1_tx_bus2 - &gmac1m1_rx_bus2 - &gmac1m1_rgmii_clk - &gmac1m1_rgmii_bus>; - - /* RTL8211F */ - // tx_delay = <0x1c>; - // rx_delay = <0x0c>; - - /* JL2101 */ - tx_delay = <0x22>; - rx_delay = <0x07>; - - phy-handle = <&rgmii_phy1>; - status = "okay"; -}; - -&mdio1 { - rgmii_phy1: phy@0 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <0x0>; - }; -}; - -&pcie30phy { - status = "okay"; -}; - -&pcie3x2 { - reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; - vpcie3v3-supply = <&pcie30_3v3>; - status = "okay"; -}; - -/* mini pcie */ -&pcie2x1 { - reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>; - disable-gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>; - vpcie3v3-supply = <&mini_pcie_3v3>; - status = "okay"; -}; - -&combphy2_psq { - status = "okay"; -}; - -&route_hdmi { - status = "okay"; - connect = <&vp0_out_hdmi>; -}; - -&hdmi_in_vp0 { - status = "okay"; -}; - -&hdmi_in_vp1 { - status = "disabled"; -}; - -&hdmi { - status = "okay"; -}; - -&pinctrl { - pmic { - pmic_int: pmic_int { - rockchip,pins = - <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - soc_slppin_gpio: soc_slppin_gpio { - rockchip,pins = - <0 RK_PA2 RK_FUNC_GPIO &pcfg_output_low_pull_down>; - }; - - soc_slppin_slp: soc_slppin_slp { - rockchip,pins = - <0 RK_PA2 RK_FUNC_1 &pcfg_pull_up>; - }; - - soc_slppin_rst: soc_slppin_rst { - rockchip,pins = - <0 RK_PA2 RK_FUNC_2 &pcfg_pull_none>; - }; - - spk_ctl_gpio: spk_ctl_gpio { - rockchip,pins = <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - headphone { - hp_det: hp-det { - rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - usb { - vcc5v0_usb20_host_en: vcc5v0-usb20-host-en { - rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - vcc5v0_usb30_host_en: vcc5v0-usb30-host-en { - rockchip,pins = <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - vcc5v0_otg_vbus_en: vcc5v0-otg-vbus-en { - rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - spi { - spi3_cs0: spi3-cs0 { - rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up_drv_level_1>; - }; - - spi3_cs1: spi3-cs1 { - rockchip,pins = <4 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up_drv_level_1>; - }; - }; - - lcd { - mipi_dsi0_pwr_en: mipi-dsi0-pwr-en { - rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - cam { - cam_pwr_en: cam-pwr-en { - rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - leds { - sys_status_led_pin: sys-status-led-pin { - rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; +}; \ No newline at end of file diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dtsi new file mode 100644 index 000000000000..03549ff87bec --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dtsi @@ -0,0 +1,1121 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2020 Rockchip Electronics Co., Ltd. + * + */ + + /dts-v1/; + +#include +#include +#include +#include +#include +#include +#include +#include "rk3568.dtsi" + +//MIPI摄像头配置 +#include "rk3568-lubancat-csi2.dtsi" + +// MIPI屏幕设置,通用镜像使用设备树插件 +//专用镜像如果要开启MIPI屏幕支持,按屏幕型号开启1-3 +//以下3个配置互斥,不可同时开启 +// #include "rk3568-lubancat-dsi0-ebf410125_720p.dtsi" //野火5.5寸 720P +// #include "rk3568-lubancat-dsi0-ebf410125_1080p.dtsi" //野火5.5寸 1080P +// #include "rk3568-lubancat-dsi0-rpi.dtsi" //树莓派 5寸 800x480 + + +/ { + model = "EmbedFire LubanCat-2"; + compatible = "embedfire,lubancat-2", "rockchip,rk3568"; + + chosen: chosen { + bootargs = "earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0 root=PARTUUID=614e0000-0000 rw rootwait"; + }; + + fiq-debugger { + compatible = "rockchip,fiq-debugger"; + rockchip,serial-id = <2>; + rockchip,wake-irq = <0>; + /* If enable uart uses irq instead of fiq */ + rockchip,irq-mode-enable = <1>; + rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */ + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&uart2m0_xfer>; + status = "okay"; + }; + + debug: debug@fd904000 { + compatible = "rockchip,debug"; + reg = <0x0 0xfd904000 0x0 0x1000>, + <0x0 0xfd905000 0x0 0x1000>, + <0x0 0xfd906000 0x0 0x1000>, + <0x0 0xfd907000 0x0 0x1000>; + }; + + cspmu: cspmu@fd90c000 { + compatible = "rockchip,cspmu"; + reg = <0x0 0xfd90c000 0x0 0x1000>, + <0x0 0xfd90d000 0x0 0x1000>, + <0x0 0xfd90e000 0x0 0x1000>, + <0x0 0xfd90f000 0x0 0x1000>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + ramoops: ramoops@110000 { + compatible = "ramoops"; + reg = <0x0 0x110000 0x0 0xf0000>; + record-size = <0x20000>; + console-size = <0x80000>; + ftrace-size = <0x00000>; + pmsg-size = <0x50000>; + }; + + abc: abc@80900000{ + reg = <0x0 0x80900000 0x0 0x100000>; + }; + }; + + adc_keys: adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1800000>; + poll-interval = <100>; + + restart-key { + label = "restart"; + linux,code = ; + press-threshold-microvolt = <9>; + }; + }; + + dc_5v: dc-5v { + compatible = "regulator-fixed"; + regulator-name = "dc_5v"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + 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 = <&dc_5v>; + }; + + vcc3v3_sys: vcc3v3-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc5v0_sys>; + }; + + vcc5v0_usb20_host: vcc5v0-usb20-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_usb20_host_en>; + regulator-name = "vcc5v0_usb20_host"; + regulator-always-on; + }; + + vcc5v0_usb30_host: vcc5v0-usb30-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_usb30_host_en>; + regulator-name = "vcc5v0_usb30_host"; + regulator-always-on; + }; + + vcc5v0_otg_vbus: vcc5v0-otg-vbus-regulator { + compatible = "regulator-fixed"; + enable-active-high; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_otg_vbus_en>; + regulator-name = "vcc5v0_otg_vbus"; + }; + + mini_pcie_3v3: mini-pcie-3v3-regulator { + compatible = "regulator-fixed"; + regulator-name = "minipcie_3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-active-high; + regulator-always-on; + gpio = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>; + startup-delay-us = <5000>; + vin-supply = <&vcc5v0_sys>; + }; + + pcie30_3v3: gpio-regulator { + compatible = "regulator-gpio"; + regulator-name = "pcie30_3v3"; + regulator-min-microvolt = <100000>; + regulator-max-microvolt = <3300000>; + gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; + gpios-states = <0x1>; + states = <100000 0x0 + 3300000 0x1>; + }; + + mipi_dsi0_power: mipi-dsi0-power-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&mipi_dsi0_pwr_en>; + regulator-name = "mipi_dsi0_power"; + regulator-always-on; + }; + + vdd_cam_5v: vdd-cam-5v-regulator { + compatible = "regulator-fixed"; + regulator-name = "vdd_cam_5v"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&cam_pwr_en>; + enable-active-high; + regulator-always-on; + }; + + cam_dovdd: cam-dovdd { + compatible = "regulator-fixed"; + regulator-name = "cam_dovdd"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vdd_cam_5v>; + }; + + cam_avdd: cam-avdd { + compatible = "regulator-fixed"; + regulator-name = "cam_avdd"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <&vdd_cam_5v>; + }; + + cam_dvdd: cam-dvdd { + compatible = "regulator-fixed"; + regulator-name = "cam_dvdd"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + vin-supply = <&vdd_cam_5v>; + }; + + leds: leds { + status = "okay"; + compatible = "gpio-leds"; + + sys_status_led: sys-status-led { + label = "sys_status_led"; + linux,default-trigger = "heartbeat"; + default-state = "on"; + gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sys_status_led_pin>; + }; + }; + + rk809_sound: rk809-sound { + status = "okay"; + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "rockchip,rk809-codec"; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,widgets = + "Microphone", "Mic Jack", + "Headphone", "Headphone Jack"; + simple-audio-card,routing = + "Mic Jack", "MICBIAS1", + "IN1P", "Mic Jack", + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR"; + simple-audio-card,cpu { + sound-dai = <&i2s1_8ch>; + }; + simple-audio-card,codec { + sound-dai = <&rk809_codec>; + }; + }; + + rk_headset: rk-headset { + status = "okay"; + compatible = "rockchip_headset"; + headset_gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&hp_det>; + io-channels = <&saradc 1>; + }; + + ext_cam_clk: external-camera-clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + clock-output-names = "CLK_CAMERA1_24MHZ"; + }; + + backlight: backlight { + status = "okay"; + compatible = "pwm-backlight"; + pwms = <&pwm4 0 50000 0>; + brightness-levels = < + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 88 89 90 91 92 93 94 95 + 96 97 98 99 100 101 102 103 + 104 105 106 107 108 109 110 111 + 112 113 114 115 116 117 118 119 + 120 121 122 123 124 125 126 127 + 128 129 130 131 132 133 134 135 + 136 137 138 139 140 141 142 143 + 144 145 146 147 148 149 150 151 + 152 153 154 155 156 157 158 159 + 160 161 162 163 164 165 166 167 + 168 169 170 171 172 173 174 175 + 176 177 178 179 180 181 182 183 + 184 185 186 187 188 189 190 191 + 192 193 194 195 196 197 198 199 + 200 201 202 203 204 205 206 207 + 208 209 210 211 212 213 214 215 + 216 217 218 219 220 221 222 223 + 224 225 226 227 228 229 230 231 + 232 233 234 235 236 237 238 239 + 240 241 242 243 244 245 246 247 + 248 249 250 251 252 253 254 255 + >; + default-brightness-level = <200>; + }; + + test-power { + status = "okay"; + }; +}; + +&saradc { + vref-supply = <&vcca_1v8>; + status = "okay"; +}; + +&tsadc { + status = "okay"; +}; + +&i2s1_8ch { + status = "okay"; + rockchip,clk-trcm = <1>; + /delete-property/ rockchip,playback-only; + pinctrl-names = "default"; + pinctrl-0 = <&i2s1m0_sclktx + &i2s1m0_lrcktx + &i2s1m0_sdi0 + &i2s1m0_sdo0>; +}; + +&pwm4 { + status = "okay"; +}; + +&cpu0 { + cpu-supply = <&vdd_cpu>; +}; + +&dfi { + status = "okay"; +}; + +&dmc { + system-status-freq = < + /*system status freq(KHz)*/ + SYS_STATUS_NORMAL 780000 + SYS_STATUS_REBOOT 1560000 + SYS_STATUS_SUSPEND 324000 + SYS_STATUS_VIDEO_1080P 528000 + SYS_STATUS_BOOST 1560000 + SYS_STATUS_ISP 1560000 + SYS_STATUS_PERFORMANCE 1560000 + >; + center-supply = <&vdd_logic>; + status = "okay"; +}; + +&gpu { + mali-supply = <&vdd_gpu>; + status = "okay"; +}; + +&xin32k { + status = "disabled"; +}; + +&i2c0 { + status = "okay"; + + vdd_cpu: tcs4525@1c { + compatible = "tcs,tcs452x"; + reg = <0x1c>; + vin-supply = <&vcc5v0_sys>; + regulator-compatible = "fan53555-reg"; + regulator-name = "vdd_cpu"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1390000>; + regulator-ramp-delay = <2300>; + fcs,suspend-voltage-selector = <1>; + regulator-boot-on; + regulator-always-on; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; +/* + vdd_cpu: syr827@40 { + compatible = "silergy,syr827"; + reg = <0x40>; + fcs,suspend-voltage-selector = <1>; + regulator-name = "vdd_cpu"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1390000>; + regulator-ramp-delay = <2300>; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc5v0_sys>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; +*/ + rk809: pmic@20 { + compatible = "rockchip,rk809"; + reg = <0x20>; + interrupt-parent = <&gpio0>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; + + pinctrl-names = "default", "pmic-sleep", + "pmic-power-off", "pmic-reset"; + pinctrl-0 = <&pmic_int>; + pinctrl-1 = <&soc_slppin_slp>, <&rk817_slppin_slp>; + pinctrl-2 = <&soc_slppin_gpio>, <&rk817_slppin_pwrdn>; + pinctrl-3 = <&soc_slppin_gpio>, <&rk817_slppin_rst>; + + rockchip,system-power-controller; + wakeup-source; + #clock-cells = <1>; + clock-output-names = "rk808-clkout1", "rk808-clkout2"; + //fb-inner-reg-idxs = <2>; + /* 1: rst regs (default in codes), 0: rst the pmic */ + pmic-reset-func = <0>; + /* not save the PMIC_POWER_EN register in uboot */ + not-save-power-en = <1>; + + vcc1-supply = <&vcc3v3_sys>; + vcc2-supply = <&vcc3v3_sys>; + vcc3-supply = <&vcc3v3_sys>; + vcc4-supply = <&vcc3v3_sys>; + vcc5-supply = <&vcc3v3_sys>; + vcc6-supply = <&vcc3v3_sys>; + vcc7-supply = <&vcc3v3_sys>; + vcc8-supply = <&vcc3v3_sys>; + vcc9-supply = <&vcc3v3_sys>; + + pwrkey { + status = "okay"; + }; + + pinctrl_rk8xx: pinctrl_rk8xx { + gpio-controller; + #gpio-cells = <2>; + + rk817_slppin_null: rk817_slppin_null { + pins = "gpio_slp"; + function = "pin_fun0"; + }; + + rk817_slppin_slp: rk817_slppin_slp { + pins = "gpio_slp"; + function = "pin_fun1"; + }; + + rk817_slppin_pwrdn: rk817_slppin_pwrdn { + pins = "gpio_slp"; + function = "pin_fun2"; + }; + + rk817_slppin_rst: rk817_slppin_rst { + pins = "gpio_slp"; + function = "pin_fun3"; + }; + }; + + regulators { + vdd_logic: DCDC_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-init-microvolt = <900000>; + regulator-ramp-delay = <6001>; + regulator-initial-mode = <0x2>; + regulator-name = "vdd_logic"; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vdd_gpu: DCDC_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-init-microvolt = <900000>; + regulator-ramp-delay = <6001>; + regulator-initial-mode = <0x2>; + regulator-name = "vdd_gpu"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x2>; + regulator-name = "vcc_ddr"; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vdd_npu: DCDC_REG4 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-init-microvolt = <900000>; + regulator-ramp-delay = <6001>; + regulator-initial-mode = <0x2>; + regulator-name = "vdd_npu"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda0v9_image: LDO_REG1 { + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-name = "vdda0v9_image"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda_0v9: LDO_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-name = "vdda_0v9"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda0v9_pmu: LDO_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-name = "vdda0v9_pmu"; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <900000>; + }; + }; + + vccio_acodec: LDO_REG4 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vccio_acodec"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vccio_sd: LDO_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vccio_sd"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3_pmu: LDO_REG6 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3_pmu"; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcca_1v8: LDO_REG7 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca_1v8"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcca1v8_pmu: LDO_REG8 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca1v8_pmu"; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcca1v8_image: LDO_REG9 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca1v8_image"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_1v8: DCDC_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc_1v8"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_3v3: SWITCH_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-name = "vcc_3v3"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3_sd: SWITCH_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-name = "vcc3v3_sd"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + + rk809_codec: codec { + #sound-dai-cells = <0>; + compatible = "rockchip,rk809-codec", "rockchip,rk817-codec"; + clocks = <&cru I2S1_MCLKOUT_TX>; + clock-names = "mclk"; + assigned-clocks = <&cru I2S1_MCLKOUT_TX>, <&cru I2S1_MCLK_TX_IOE>; + assigned-clock-rates = <12288000>; + assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>, <&cru I2S1_MCLKOUT_TX>; + pinctrl-names = "default"; + pinctrl-0 = <&i2s1m0_mclk>; + hp-volume = <20>; + spk-volume = <3>; + //mic-in-differential; + status = "okay"; + }; + }; + + hdmi_sound: hdmi-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <128>; + simple-audio-card,name = "rockchip,hdmi"; + status = "okay"; + + simple-audio-card,cpu { + sound-dai = <&i2s0_8ch>; + }; + simple-audio-card,codec { + sound-dai = <&hdmi>; + }; + }; +}; + +&i2s0_8ch { + status = "okay"; +}; + +&i2c1 { + status = "okay"; + clock-frequency = <100000>; + + rockpi_ft5406: rockpi_ft5406@38 { + compatible = "rockpi_ft5406"; + reg = <0x38>; + status = "okay"; + }; +}; + +&iep { + status = "okay"; +}; + +&iep_mmu { + status = "okay"; +}; + +&jpegd { + status = "okay"; +}; + +&jpegd_mmu { + status = "okay"; +}; + +&mpp_srv { + status = "okay"; +}; + +&pmu_io_domains { + status = "okay"; + pmuio1-supply = <&vcc3v3_pmu>; + pmuio2-supply = <&vcc3v3_pmu>; + vccio1-supply = <&vccio_acodec>; + vccio3-supply = <&vccio_sd>; + vccio4-supply = <&vcc_1v8>; + vccio5-supply = <&vcc_3v3>; + vccio6-supply = <&vcc_1v8>; + vccio7-supply = <&vcc_3v3>; +}; + +&rk_rga { + status = "okay"; +}; + +&rkvdec { + status = "okay"; +}; + +&rkvdec_mmu { + status = "okay"; +}; + +&rkvenc { + venc-supply = <&vdd_logic>; + status = "okay"; +}; + +&rkvenc_mmu { + status = "okay"; +}; + +&rknpu { + rknpu-supply = <&vdd_npu>; + status = "okay"; +}; + +&rknpu_mmu { + status = "okay"; +}; + +&bus_npu { + bus-supply = <&vdd_logic>; + pvtm-supply = <&vdd_cpu>; + status = "okay"; +}; + +&sdhci { + bus-width = <8>; + supports-emmc; + non-removable; + max-frequency = <200000000>; + status = "okay"; +}; + +&sdmmc0 { + max-frequency = <150000000>; + supports-sd; + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + sd-uhs-sdr104; + vmmc-supply = <&vcc3v3_sd>; + vqmmc-supply = <&vccio_sd>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; + status = "okay"; +}; + +&vdpu { + status = "okay"; +}; + +&vdpu_mmu { + status = "okay"; +}; + +&vepu { + status = "okay"; +}; + +&vepu_mmu { + status = "okay"; +}; + +&vop { + status = "okay"; + assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>; + assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>; +}; + +&vop_mmu { + status = "okay"; +}; + +&vp0 { + rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0 | 1 << ROCKCHIP_VOP2_SMART0)>; + rockchip,primary-plane = ; + // cursor-win-id = ; +}; + +&vp1 { + rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1 | 1 << ROCKCHIP_VOP2_SMART1)>; + rockchip,primary-plane = ; + // cursor-win-id = ; +}; + +&rng { + status = "okay"; +}; + +/* USB OTG/USB Host_1 USB 2.0 Comb */ +&usb2phy0 { + status = "okay"; +}; + +&u2phy0_host { + phy-supply = <&vcc5v0_usb30_host>; + status = "okay"; +}; + +&u2phy0_otg { + vbus-supply = <&vcc5v0_otg_vbus>; + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +/* USB Host_2/USB Host_3 USB 2.0 Comb */ +&usb2phy1 { + status = "okay"; +}; + +&u2phy1_otg { + phy-supply = <&vcc5v0_usb20_host>; + status = "okay"; +}; + +&u2phy1_host { + status = "okay"; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { + status = "okay"; +}; + +/* MULTI_PHY0 For SATA0, USB3.0 OTG Only USB2.0 */ +&combphy0_us { + status = "okay"; +}; + +&usbdrd30 { + status = "okay"; +}; + +&usbdrd_dwc3 { + phys = <&u2phy0_otg>; + phy-names = "usb2-phy"; + extcon = <&usb2phy0>; + maximum-speed = "high-speed"; + snps,dis_u2_susphy_quirk; + status = "okay"; +}; + +&sata0 { + status = "okay"; +}; + +/* USB3.0 Host */ +&combphy1_usq { + status = "okay"; +}; + +&usbhost30 { + status = "okay"; +}; + +&usbhost_dwc3 { + status = "okay"; +}; + +&gmac0 { + phy-mode = "rgmii"; + clock_in_out = "output"; + + snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + /* Reset time is 75ms, 100ms */ + snps,reset-delays-us = <0 75000 100000>; + + assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>; + assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>; + assigned-clock-rates = <0>, <125000000>; + + pinctrl-names = "default"; + pinctrl-0 = <&gmac0_miim + &gmac0_tx_bus2 + &gmac0_rx_bus2 + &gmac0_rgmii_clk + &gmac0_rgmii_bus>; + + tx_delay = <0x22>; + rx_delay = <0x0e>; + + phy-handle = <&rgmii_phy0>; + status = "okay"; +}; + +&mdio0 { + rgmii_phy0: phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x0>; + }; +}; + +&gmac1 { + phy-mode = "rgmii"; + clock_in_out = "output"; + + snps,reset-gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + /* Reset time is 75ms, 100ms */ + snps,reset-delays-us = <0 75000 100000>; + + assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>; + assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>; + assigned-clock-rates = <0>, <125000000>; + + pinctrl-names = "default"; + pinctrl-0 = <&gmac1m1_miim + &gmac1m1_tx_bus2 + &gmac1m1_rx_bus2 + &gmac1m1_rgmii_clk + &gmac1m1_rgmii_bus>; + + /* RTL8211F */ + // tx_delay = <0x1c>; + // rx_delay = <0x0c>; + + /* JL2101 */ + tx_delay = <0x22>; + rx_delay = <0x07>; + + phy-handle = <&rgmii_phy1>; + status = "okay"; +}; + +&mdio1 { + rgmii_phy1: phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x0>; + }; +}; + +&pcie30phy { + status = "okay"; +}; + +&pcie3x2 { + reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&pcie30_3v3>; + status = "okay"; +}; + +/* mini pcie */ +&pcie2x1 { + reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>; + disable-gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&mini_pcie_3v3>; + status = "okay"; +}; + +&combphy2_psq { + status = "okay"; +}; + + + + +&route_hdmi { + status = "okay"; + connect = <&vp0_out_hdmi>; +}; + +&hdmi_in_vp0 { + status = "okay"; +}; + +&hdmi_in_vp1 { + status = "disabled"; +}; + +&hdmi { + status = "okay"; +}; + +&pinctrl { + pmic { + pmic_int: pmic_int { + rockchip,pins = + <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + soc_slppin_gpio: soc_slppin_gpio { + rockchip,pins = + <0 RK_PA2 RK_FUNC_GPIO &pcfg_output_low_pull_down>; + }; + + soc_slppin_slp: soc_slppin_slp { + rockchip,pins = + <0 RK_PA2 RK_FUNC_1 &pcfg_pull_up>; + }; + + soc_slppin_rst: soc_slppin_rst { + rockchip,pins = + <0 RK_PA2 RK_FUNC_2 &pcfg_pull_none>; + }; + + spk_ctl_gpio: spk_ctl_gpio { + rockchip,pins = <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + headphone { + hp_det: hp-det { + rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + usb { + vcc5v0_usb20_host_en: vcc5v0-usb20-host-en { + rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + vcc5v0_usb30_host_en: vcc5v0-usb30-host-en { + rockchip,pins = <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + vcc5v0_otg_vbus_en: vcc5v0-otg-vbus-en { + rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + spi { + spi3_cs0: spi3-cs0 { + rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up_drv_level_1>; + }; + + spi3_cs1: spi3-cs1 { + rockchip,pins = <4 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up_drv_level_1>; + }; + }; + + lcd { + mipi_dsi0_pwr_en: mipi-dsi0-pwr-en { + rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + cam { + cam_pwr_en: cam-pwr-en { + rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + leds { + sys_status_led_pin: sys-status-led-pin { + rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-dsi-1080p.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-dsi-1080p.dtsi new file mode 100644 index 000000000000..e013e7f7409d --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-dsi-1080p.dtsi @@ -0,0 +1,261 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2020 Rockchip Electronics Co., Ltd. + * + */ +&route_dsi0 { + status = "okay"; + connect = <&vp0_out_dsi0>; +}; + +&video_phy0 { + status = "okay"; +}; + +&dsi0_in_vp0 { + status = "okay"; +}; + +&dsi0_in_vp1 { + status = "disabled"; +}; + +&dsi0 { + status = "okay"; + power-supply = <&mipi_dsi0_power>; + dsi0_panel:panel@0 { + compatible = "simple-panel-dsi"; + reg = <0>; + backlight = <&backlight0>; + reset-gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_LOW>; + + enable-delay-ms = <35>; + prepare-delay-ms = <6>; + reset-delay-ms = <0>; + init-delay-ms = <20>; + unprepare-delay-ms = <0>; + disable-delay-ms = <20>; + + size,width = <74>; + size,height = <133>; + + 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 = [ + 39 00 04 B9 FF 83 99 + 15 00 02 D2 77 + 39 00 10 B1 02 04 74 94 01 32 33 11 11 AB 4D 56 73 02 02 + 39 00 10 B2 00 80 80 AE 05 07 5A 11 00 00 10 1E 70 03 D4 + 15 00 02 36 02 + 39 00 2D B4 00 FF 02 C0 02 C0 00 00 08 00 04 06 00 32 04 0A 08 21 03 01 00 0F B8 8B 02 C0 02 C0 00 00 08 00 04 06 00 32 04 0A 08 01 00 0F B8 01 + 39 05 22 D3 00 00 00 00 00 00 06 00 00 10 04 00 04 00 00 00 00 00 00 00 00 00 00 01 00 05 05 07 00 00 00 05 40 + 39 05 21 D5 18 18 19 19 18 18 21 20 01 00 07 06 05 04 03 02 18 18 18 18 18 18 2F 2F 30 30 31 31 18 18 18 18 + 39 05 21 D6 18 18 19 19 40 40 20 21 06 07 00 01 02 03 04 05 40 40 40 40 40 40 2F 2F 30 30 31 31 40 40 40 40 + 39 00 11 D8 A2 AA 02 A0 A2 A8 02 A0 B0 00 00 00 B0 00 00 00 + 15 00 02 BD 01 + 39 00 11 D8 B0 00 00 00 B0 00 00 00 E2 AA 03 F0 E2 AA 03 F0 + 15 00 02 BD 02 + 39 00 09 D8 E2 AA 03 F0 E2 AA 03 F0 + 15 00 02 BD 00 + 39 00 03 B6 8D 8D + 39 05 37 E0 00 0E 19 13 2E 39 48 44 4D 57 5F 66 6C 76 7F 85 8A 95 9A A4 9B AB B0 5C 58 64 77 00 0E 19 13 2E 39 48 44 4D 57 5F 66 6C 76 7F 85 8A 95 9A A4 9B AB B0 5C 58 64 77 + 05 C8 01 11 + 05 C8 01 29 + ]; + + panel-exit-sequence = [ + 05 78 01 28 + 05 00 01 10 + ]; + + disp_timing: display-timings { + native-mode = <&dsi0_timing>; + dsi0_timing: dsi0_timing { + clock-frequency = <131376000>; + hactive = <1080>; + vactive = <1920>; + hsync-len = <10>; + hback-porch = <20>; + hfront-porch = <10>; + vsync-len = <5>; + vback-porch = <20>; + vfront-porch = <10>; + 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_dsi0: endpoint { + remote-endpoint = <&dsi0_out_panel>; + }; + }; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + dsi0_out_panel: endpoint { + remote-endpoint = <&panel_in_dsi0>; + }; + }; + }; +}; + +&i2c1 { + status = "okay"; + clock-frequency = <100000>; + + gt911_1: gt911_1@5d { + status = "okay"; + compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&gpio0>; + interrupts = ; + reset-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; + irq-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; + touchscreen-inverted-x = <1>; + touchscreen-inverted-y = <1>; + }; +}; + + +&route_dsi1 { + status = "okay"; + connect = <&vp1_out_dsi1>; +}; + +&video_phy1 { + status = "okay"; +}; + +&dsi1_in_vp0 { + status = "disabled"; +}; + +&dsi1_in_vp1 { + status = "okay"; +}; + +&dsi1 { + status = "okay"; + power-supply = <&mipi_dsi1_power>; + dsi1_panel:panel@0 { + status = "okay"; + compatible = "simple-panel-dsi"; + reg = <0>; + backlight = <&backlight1>; + reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; + + enable-delay-ms = <35>; + prepare-delay-ms = <6>; + reset-delay-ms = <0>; + init-delay-ms = <20>; + unprepare-delay-ms = <0>; + disable-delay-ms = <20>; + + size,width = <74>; + size,height = <133>; + + 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 = [ + 39 00 04 B9 FF 83 99 + 15 00 02 D2 77 + 39 00 10 B1 02 04 74 94 01 32 33 11 11 AB 4D 56 73 02 02 + 39 00 10 B2 00 80 80 AE 05 07 5A 11 00 00 10 1E 70 03 D4 + 15 00 02 36 02 + 39 00 2D B4 00 FF 02 C0 02 C0 00 00 08 00 04 06 00 32 04 0A 08 21 03 01 00 0F B8 8B 02 C0 02 C0 00 00 08 00 04 06 00 32 04 0A 08 01 00 0F B8 01 + 39 05 22 D3 00 00 00 00 00 00 06 00 00 10 04 00 04 00 00 00 00 00 00 00 00 00 00 01 00 05 05 07 00 00 00 05 40 + 39 05 21 D5 18 18 19 19 18 18 21 20 01 00 07 06 05 04 03 02 18 18 18 18 18 18 2F 2F 30 30 31 31 18 18 18 18 + 39 05 21 D6 18 18 19 19 40 40 20 21 06 07 00 01 02 03 04 05 40 40 40 40 40 40 2F 2F 30 30 31 31 40 40 40 40 + 39 00 11 D8 A2 AA 02 A0 A2 A8 02 A0 B0 00 00 00 B0 00 00 00 + 15 00 02 BD 01 + 39 00 11 D8 B0 00 00 00 B0 00 00 00 E2 AA 03 F0 E2 AA 03 F0 + 15 00 02 BD 02 + 39 00 09 D8 E2 AA 03 F0 E2 AA 03 F0 + 15 00 02 BD 00 + 39 00 03 B6 8D 8D + 39 05 37 E0 00 0E 19 13 2E 39 48 44 4D 57 5F 66 6C 76 7F 85 8A 95 9A A4 9B AB B0 5C 58 64 77 00 0E 19 13 2E 39 48 44 4D 57 5F 66 6C 76 7F 85 8A 95 9A A4 9B AB B0 5C 58 64 77 + 05 C8 01 11 + 05 C8 01 29 + ]; + + panel-exit-sequence = [ + 05 78 01 28 + 05 00 01 10 + ]; + + disp_timings: display-timings { + native-mode = <&dsi1_timing>; + dsi1_timing: timing { + clock-frequency = <131376000>; + hactive = <1080>; + vactive = <1920>; + hsync-len = <10>; + hback-porch = <20>; + hfront-porch = <10>; + vsync-len = <5>; + vback-porch = <20>; + vfront-porch = <10>; + 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>; + }; + }; + }; +}; + +&i2c5 { + status = "okay"; + clock-frequency = <100000>; + + gt911_2: gt911_2@5d { + status = "okay"; + compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&gpio3>; + interrupts = ; + reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; + irq-gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>; + touchscreen-inverted-x = <1>; + touchscreen-inverted-y = <1>; + }; +}; \ No newline at end of file diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-dsi-rpi.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-dsi-rpi.dtsi new file mode 100644 index 000000000000..0d6e08c71c86 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-dsi-rpi.dtsi @@ -0,0 +1,141 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2020 Rockchip Electronics Co., Ltd. + * + */ + +&route_dsi0 { + status = "okay"; + connect = <&vp0_out_dsi0>; +}; + +&video_phy0 { + status = "okay"; +}; + +&dsi0_in_vp0 { + status = "okay"; +}; + +&dsi0_in_vp1 { + status = "disabled"; +}; + +&dsi0 { + status = "okay"; + power-supply = <&mipi_dsi0_power>; + + dsi0_panel:panel@0 { + compatible = "rockpi,tc358762"; + reg = <0x0>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + panel_in_dsi0: endpoint { + remote-endpoint = <&dsi0_out_panel>; + }; + }; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + dsi0_out_panel: endpoint { + remote-endpoint = <&panel_in_dsi0>; + }; + }; + }; +}; + +&i2c1 { + status = "okay"; + clock-frequency = <100000>; + + rockpi_mcu_0: rockpi-mcu@45 { + compatible = "rockpi_mcu"; + reg = <0x45>; + status = "okay"; + }; + + rockpi_ft5406_0: rockpi_ft5406@38 { + compatible = "rockpi_ft5406"; + reg = <0x38>; + status = "okay"; + }; +}; + + +&route_dsi1 { + status = "okay"; + connect = <&vp1_out_dsi0>; +}; + +&video_phy1 { + status = "okay"; +}; + +&dsi1_in_vp0 { + status = "disabled"; +}; + +&dsi1_in_vp1 { + status = "okay"; +}; + +&dsi1 { + status = "okay"; + power-supply = <&mipi_dsi1_power>; + dsi1_panel:panel@0 { + compatible = "rockpi,tc358762"; + reg = <0x0>; + status = "okay"; + + 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>; + }; + }; + }; +}; + +&i2c5 { + status = "okay"; + clock-frequency = <100000>; + + rockpi_mcu_1: rockpi-mcu@45 { + compatible = "rockpi_mcu"; + reg = <0x45>; + status = "okay"; + }; + + rockpi_ft5406_1: rockpi_ft5406@38 { + compatible = "rockpi_ft5406"; + reg = <0x38>; + status = "okay"; + }; +}; \ No newline at end of file diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-edp.dts b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-edp.dts deleted file mode 100644 index 34a592d8e9b5..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-edp.dts +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2020 Rockchip Electronics Co., Ltd. - * - * - */ - - /dts-v1/; - -#include "rk3568-lubancat-2io.dtsi" - -/ { - model = "LubanCat-2IO HDMI+EDP"; - compatible = "rockchip,rk3568-lubancat-2io-edp", "rockchip,rk3568"; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-edp.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-edp.dtsi new file mode 100644 index 000000000000..3eefb3bca19c --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-edp.dtsi @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2020 Rockchip Electronics Co., Ltd. + * + */ + +/ { + + edp_panel: edp-panel { + compatible = "simple-panel"; + backlight = <&backlight2>; + status = "okay"; + power-supply = <&vdd_3v3_edp_lcd>; + enable-gpios = <&gpio2 RK_PD7 GPIO_ACTIVE_HIGH>; + //bus-format = ; + prepare-delay-ms = <100>; //AUX通信前延时 + enable-delay-ms = <100>; + + display-timings { + native-mode = <&timing0>; + + timing0: timing0 { + clock-frequency = <140000000>; + hactive = <1920>; + vactive = <1080>; + hfront-porch = <40>; + hsync-len = <40>; + hback-porch = <80>; + vfront-porch = <16>; + vsync-len = <8>; + vback-porch = <16>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + }; + }; + + ports { + panel_in_edp: endpoint { + remote-endpoint = <&edp_out_panel>; + }; + }; + }; +}; + + +&edp { + status = "okay"; + // hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>; //热插拔信号检测 + force-hpd; //强制hpd,忽略物理hdp信号 + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + edp_out_panel: endpoint@0 { + remote-endpoint = <&panel_in_edp>; + }; + }; + }; +}; + +&route_edp { + status = "okay"; + connect = <&vp1_out_edp>; +}; + +&edp_phy { + status = "okay"; +}; + +&edp_in_vp0 { + status = "disabled"; +}; + +&edp_in_vp1 { + status = "okay"; +}; \ No newline at end of file diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-mipi.dts b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-mipi.dts deleted file mode 100644 index b9aa89c523e1..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-mipi.dts +++ /dev/null @@ -1,89 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2020 Rockchip Electronics Co., Ltd. - * - */ - -/dts-v1/; - -#include "rk3568-lubancat-2io.dtsi" - -/ { - model = "LubanCat-2IO DOUBLE display"; - compatible = "rockchip,rk3568-lubancat-2io", "rockchip,rk3568"; -}; - -// &hdmi { -// status = "okay"; -// }; - -// &hdmi_in_vp0 { -// status = "okay"; -// }; - -// &hdmi_in_vp1 { -// status = "disable"; -// }; - - - - -&video_phy0 { - status = "okay"; -}; - -&dsi0_in_vp0 { - status = "okay"; -}; - -&dsi0_in_vp1 { - status = "disable"; -}; - -&dsi0 { - status = "okay"; -}; - -// &rockpi_mcu { -// status = "okay"; -// }; - -// &rockpi_ft5406 { -// status = "okay"; -// }; - -&video_phy1 { - status = "okay"; -}; - -&dsi1_in_vp0 { - status = "okay"; -}; - -&dsi1_in_vp1 { - status = "disable"; -}; - -&dsi1 { - status = "okay"; -}; - -// &edp_phy { -// status = "okay"; -// }; - -// &edp_in_vp0 { -// status = "okay"; -// }; - -// &edp_in_vp1 { -// status = "disabled"; -// }; - -// &edp { -// status = "okay"; -// }; - -// &edp_panel { -// status = "okay"; -// }; \ No newline at end of file diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-mipi_lcd.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-mipi_lcd.dtsi deleted file mode 100644 index 441d3cc21cfb..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io-mipi_lcd.dtsi +++ /dev/null @@ -1,310 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2020 Rockchip Electronics Co., Ltd. - * - */ - - -#include "rk3568-lubancat-2io.dtsi" - -/ { - model = "LubanCat-2IO MIPI"; - compatible = "rockchip,rk3568-lubancat-2io", "rockchip,rk3568"; - - backlight: backlight { - status = "okay"; - compatible = "pwm-backlight"; - pwms = <&pwm4 0 50000 0>; - brightness-levels = < - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 - 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 - 120 121 122 123 124 125 126 127 - 128 129 130 131 132 133 134 135 - 136 137 138 139 140 141 142 143 - 144 145 146 147 148 149 150 151 - 152 153 154 155 156 157 158 159 - 160 161 162 163 164 165 166 167 - 168 169 170 171 172 173 174 175 - 176 177 178 179 180 181 182 183 - 184 185 186 187 188 189 190 191 - 192 193 194 195 196 197 198 199 - 200 201 202 203 204 205 206 207 - 208 209 210 211 212 213 214 215 - 216 217 218 219 220 221 222 223 - 224 225 226 227 228 229 230 231 - 232 233 234 235 236 237 238 239 - 240 241 242 243 244 245 246 247 - 248 249 250 251 252 253 254 255 - >; - default-brightness-level = <200>; - }; -}; - -&route_dsi0 { - status = "okay"; - connect = <&vp0_out_dsi0>; -}; - -&video_phy0 { - status = "okay"; -}; - -&dsi0_in_vp0 { - status = "okay"; -}; - -&dsi0_in_vp1 { - status = "disabled"; -}; - - -/* - * video_phy0 needs to be enabled - * when dsi0 is enabled - */ -&dsi0 { - status = "okay"; - - dsi0_panel: panel@0 { - status = "okay"; - compatible = "simple-panel-dsi"; - reg = <0>; - backlight = <&backlight>; - reset-gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_LOW>; - reset-delay-ms = <20>; - - size,width = <68>; - size,height = <121>; - 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 04 FF 98 81 03 - 15 00 02 01 00 - 15 00 02 02 00 - 15 00 02 03 72 - 15 00 02 04 00 - 15 00 02 05 00 - 15 00 02 06 09 - 15 00 02 07 00 - 15 00 02 08 00 - 15 00 02 09 01 - 15 00 02 0A 00 - 15 00 02 0B 00 - 15 00 02 0C 01 - 15 00 02 0D 00 - 15 00 02 0E 00 - 15 00 02 0F 00 - 15 00 02 10 00 - 15 00 02 11 00 - 15 00 02 12 00 - 15 00 02 13 00 - 15 00 02 14 00 - 15 00 02 15 00 - 15 00 02 16 00 - 15 00 02 17 00 - 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 00 - 15 00 02 1e 40 - 15 00 02 1f 80 - 15 00 02 20 05 - 15 00 02 21 02 - 15 00 02 22 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 33 - 15 00 02 29 02 - 15 00 02 2a 00 - 15 00 02 2b 00 - 15 00 02 2c 00 - 15 00 02 2d 00 - 15 00 02 2e 00 - 15 00 02 2f 00 - 15 00 02 30 00 - 15 00 02 31 00 - 15 00 02 32 00 - 15 00 02 33 00 - 15 00 02 34 00 - 15 00 02 35 00 - 15 00 02 36 00 - 15 00 02 37 00 - 15 00 02 38 3C - 15 00 02 39 00 - 15 00 02 3a 40 - 15 00 02 3b 40 - 15 00 02 3c 00 - 15 00 02 3d 00 - 15 00 02 3e 00 - 15 00 02 3f 00 - 15 00 02 40 00 - 15 00 02 41 00 - 15 00 02 42 00 - 15 00 02 43 00 - 15 00 02 44 00 - 15 00 02 50 00 - 15 00 02 51 23 - 15 00 02 52 45 - 15 00 02 53 67 - 15 00 02 54 89 - 15 00 02 55 ab - 15 00 02 56 01 - 15 00 02 57 23 - 15 00 02 58 45 - 15 00 02 59 67 - 15 00 02 5a 89 - 15 00 02 5b ab - 15 00 02 5c cd - 15 00 02 5d ef - 15 00 02 5e 11 - 15 00 02 5f 01 - 15 00 02 60 00 - 15 00 02 61 15 - 15 00 02 62 14 - 15 00 02 63 0e - 15 00 02 64 0f - 15 00 02 65 0c - 15 00 02 66 0d - 15 00 02 67 06 - 15 00 02 68 02 - 15 00 02 69 02 - 15 00 02 6a 02 - 15 00 02 6b 02 - 15 00 02 6c 02 - 15 00 02 6d 02 - 15 00 02 6e 07 - 15 00 02 6f 02 - 15 00 02 70 02 - 15 00 02 71 02 - 15 00 02 72 02 - 15 00 02 73 02 - 15 00 02 74 02 - 15 00 02 75 01 - 15 00 02 76 00 - 15 00 02 77 14 - 15 00 02 78 15 - 15 00 02 79 0e - 15 00 02 7a 0f - 15 00 02 7b 0c - 15 00 02 7c 0d - 15 00 02 7d 06 - 15 00 02 7e 02 - 15 00 02 7f 07 - 15 00 02 80 02 - 15 00 02 81 02 - 15 00 02 82 02 - 15 00 02 83 02 - 15 00 02 84 07 - 15 00 02 85 02 - 15 00 02 86 02 - 15 00 02 87 02 - 15 00 02 88 02 - 15 00 02 89 02 - 15 00 02 8a 02 - - 15 00 04 ff 98 81 04 - 15 00 02 6c 15 - 15 00 02 6e 2a - 15 00 02 6f 33 - 15 00 02 3a 94 - 15 00 02 8d 1a - 15 00 02 87 ba - 15 00 02 26 76 - 15 00 02 b2 d1 - 15 00 02 b5 06 - - 15 00 04 ff 98 81 01 - 15 00 02 22 0a - 15 00 02 31 00 - 15 00 02 53 8a - 15 00 02 55 8a - 15 00 02 50 ae - 15 00 02 51 ae - 15 00 02 60 28 - 15 00 02 61 00 - 15 00 02 62 19 - 15 00 02 63 10 - 15 00 02 a0 0f - 15 00 02 a1 1b - 15 00 02 a2 28 - 15 00 02 a3 12 - 15 00 02 a4 15 - 15 00 02 a5 28 - 15 00 02 a6 1b - 15 00 02 a7 1e - 15 00 02 a8 79 - 15 00 02 a9 1b - 15 00 02 aa 27 - 15 00 02 ab 69 - 15 00 02 ac 19 - 15 00 02 ad 18 - 15 00 02 ae 4c - 15 00 02 af 21 - 15 00 02 b0 28 - 15 00 02 b1 52 - 15 00 02 b2 65 - 15 00 02 b3 3f - 15 00 02 c0 04 - 15 00 02 c1 1b - 15 00 02 c0 27 - 15 00 02 c3 13 - 15 00 02 c4 15 - 15 00 02 c5 28 - 15 00 02 c6 1c - 15 00 02 c7 1e - 15 00 02 c8 79 - 15 00 02 c9 1a - 15 00 02 ca 27 - 15 00 02 cb 69 - 15 00 02 cc 1a - 15 00 02 cd 18 - 15 00 02 ce 4c - 15 00 02 cf 21 - 15 00 02 d0 27 - 15 00 02 d1 52 - 15 00 02 d2 65 - 15 00 02 d3 3f - - 15 00 04 ff 98 81 00 - 15 00 02 35 00 - 15 00 02 3a 70 - 15 78 01 11 - 15 19 01 29 - ]; - }; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@1 { - reg = <1>; - dsi_out_panel: endpoint { - remote-endpoint = <&panel_in_dsi>; - }; - }; - }; -}; - -&hdmi { - status = "disabled"; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io.dts b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io.dts old mode 100755 new mode 100644 index 0343e90be0a4..f6ce7a932e02 --- a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io.dts @@ -1,17 +1,683 @@ // SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Copyright (c) 2020 Rockchip Electronics Co., Ltd. + * Copyright (c) 2023 EmbedFire Electronic Technology Co., Ltd. * + * LubanCat-2IO development board devicestree */ -/dts-v1/; +#include "rk3568-lubancat-2m-port.dtsi" -#include "rk3568-lubancat-2io.dtsi" +//MIPI摄像头配置 #include "rk3568-lubancat-2io-cam.dtsi" +// 屏幕设置,通用镜像使用设备树插件 +// 以下屏幕配置同时只能使用一个 +//开启dsi屏幕时要将本文件中hdmi相关节点全部disabled +// #include "rk3568-lubancat-2io-dsi-1080p.dtsi" //野火5.5寸 1080P +// #include "rk3568-lubancat-2io-dsi-rpi.dtsi" //树莓派 5寸 800x480 +// #include "rk3568-lubancat-2io-edp.dtsi" // edp接口屏幕 + / { model = "LubanCat-2IO"; compatible = "rockchip,rk3568-lubancat-2io", "rockchip,rk3568"; + + dc_12v: dc-12v { + compatible = "regulator-fixed"; + regulator-name = "dc_12v"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + }; + + vdd_5v: vdd-5v { + compatible = "regulator-fixed"; + regulator-name = "vdd_5v"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&dc_12v>; + }; + + 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 = <&dc_12v>; + }; + + vdd_3v3: vdd-3v3 { + compatible = "regulator-fixed"; + regulator-name = "vdd_3v3"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&dc_12v>; + }; + + 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 = <&dc_12v>; + }; + + mipi_dsi0_power: mipi-dsi0-power-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&mipi_dsi0_pwr_en>; + regulator-name = "mipi_dsi0_power"; + regulator-always-on; + }; + + mipi_dsi1_power: mipi-dsi1-power-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&mipi_dsi1_pwr_en>; + regulator-name = "mipi_dsi1_power"; + regulator-always-on; + }; + + vcc5v0_usb20_hub: vcc5v0-usb20-hub-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb20_hub_pwr_en>; + regulator-name = "vcc5v0_usb20_hub"; + regulator-always-on; + vin-supply = <&vcc5v0_usb>; + }; + + vcc5v0_usb30_host: vcc5v0-usb30-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb30_host1_pwr_en>; + regulator-name = "vcc5v0_usb30_host"; + regulator-always-on; + vin-supply = <&vcc5v0_usb>; + }; + + vcc5v0_usb20_host2: vcc5v0-usb20-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb20_host2_pwr_en>; + regulator-name = "vcc5v0_usb20_host2"; + regulator-always-on; + vin-supply = <&vcc5v0_usb>; + }; + + usb_otg_vbus: usb-otg-vbus-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_otg_vbus_en>; + regulator-name = "vcc5v0_otg"; + vin-supply = <&vcc5v0_usb>; + }; + + vdd_3v3_edp_lcd: vdd-3v3-edp-lcd-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&edp_lcd_pwr_en>; + regulator-name = "vdd_3v3_edp_lcd"; + regulator-always-on; + }; + + vdd_3v3_edp_tp: vdd-3v3-edp-tp-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&edp_tp_pwr_en>; + regulator-name = "vdd_3v3_edp_tp"; + regulator-always-on; + }; + + sata_power: sata-power-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + pinctrl-names = "default"; + pinctrl-0 = <&sata_pwr_en>; + regulator-name = "sata_power"; + }; + + m2pcie_3v3: m2pcie-3v3-regulator { + compatible = "regulator-fixed"; + regulator-name = "minipcie_3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-active-high; + regulator-always-on; + gpio = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>; + startup-delay-us = <5000>; + vin-supply = <&vcc5v0_sys>; + }; + + minipcie_3v3: minipcie-3v3-regulator { + compatible = "regulator-fixed"; + regulator-name = "minipcie_3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-active-high; + regulator-always-on; + gpio = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>; + startup-delay-us = <5000>; + vin-supply = <&vcc5v0_sys>; + }; + + leds: leds { + status = "okay"; + compatible = "gpio-leds"; + + led0: led0 { + label = "heartbeat"; + linux,default-trigger = "heartbeat"; + default-state = "on"; + gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&led0_pin>; + }; + }; + + adc_keys: adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1800000>; + poll-interval = <100>; + + restart-key { + label = "restart"; + linux,code = ; + press-threshold-microvolt = <9>; + }; + }; + + rk_headset: rk-headset { + status = "okay"; + compatible = "rockchip_headset"; + headset_gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&hp_det>; + }; + + fan: pwm-fan { + compatible = "pwm-fan"; + #cooling-cells = <2>; + pwms = <&pwm0 0 500000 0>; + cooling-levels = <0 100 150 200 255>; + rockchip,temp-trips = < + 50000 1 + 55000 2 + 60000 3 + 65000 4 + >; + }; + + backlight0: backlight0 { + status = "okay"; + compatible = "pwm-backlight"; + pwms = <&pwm4 0 50000 0>; + brightness-levels = < + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 88 89 90 91 92 93 94 95 + 96 97 98 99 100 101 102 103 + 104 105 106 107 108 109 110 111 + 112 113 114 115 116 117 118 119 + 120 121 122 123 124 125 126 127 + 128 129 130 131 132 133 134 135 + 136 137 138 139 140 141 142 143 + 144 145 146 147 148 149 150 151 + 152 153 154 155 156 157 158 159 + 160 161 162 163 164 165 166 167 + 168 169 170 171 172 173 174 175 + 176 177 178 179 180 181 182 183 + 184 185 186 187 188 189 190 191 + 192 193 194 195 196 197 198 199 + 200 201 202 203 204 205 206 207 + 208 209 210 211 212 213 214 215 + 216 217 218 219 220 221 222 223 + 224 225 226 227 228 229 230 231 + 232 233 234 235 236 237 238 239 + 240 241 242 243 244 245 246 247 + 248 249 250 251 252 253 254 255 + >; + default-brightness-level = <200>; + }; + + backlight1: backlight1 { + status = "okay"; + compatible = "pwm-backlight"; + pwms = <&pwm5 0 50000 0>; + brightness-levels = < + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 95 95 95 95 95 95 95 95 + 88 89 90 91 92 93 94 95 + 96 97 98 99 100 101 102 103 + 104 105 106 107 108 109 110 111 + 112 113 114 115 116 117 118 119 + 120 121 122 123 124 125 126 127 + 128 129 130 131 132 133 134 135 + 136 137 138 139 140 141 142 143 + 144 145 146 147 148 149 150 151 + 152 153 154 155 156 157 158 159 + 160 161 162 163 164 165 166 167 + 168 169 170 171 172 173 174 175 + 176 177 178 179 180 181 182 183 + 184 185 186 187 188 189 190 191 + 192 193 194 195 196 197 198 199 + 200 201 202 203 204 205 206 207 + 208 209 210 211 212 213 214 215 + 216 217 218 219 220 221 222 223 + 224 225 226 227 228 229 230 231 + 232 233 234 235 236 237 238 239 + 240 241 242 243 244 245 246 247 + 248 249 250 251 252 253 254 255 + >; + default-brightness-level = <200>; + }; + + backlight2: backlight2 { + status = "okay"; + compatible = "pwm-backlight"; + pwms = <&pwm2 0 500000 0>; //2khz + brightness-levels = < + 0 1 2 3 4 5 6 7 + 8 9 10 11 12 13 14 15 + 16 17 18 19 20 21 22 23 + 24 25 26 27 28 29 30 31 + 32 33 34 35 36 37 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>; + }; + + hdmi_sound: hdmi-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <128>; + simple-audio-card,name = "rockchip,hdmi"; + status = "okay"; + + simple-audio-card,cpu { + sound-dai = <&i2s0_8ch>; + }; + simple-audio-card,codec { + sound-dai = <&hdmi>; + }; + }; +}; + +&i2s0_8ch { + status = "okay"; +}; + +&sfc{ + status = "okay"; +}; + +&pwm3 { + status = "okay"; + + compatible = "rockchip,remotectl-pwm"; + interrupts = ; + remote_pwm_id = <3>; + handle_cpu_id = <1>; + remote_support_psci = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pwm3_pins>; + + ir_key_lubancat{ + rockchip,usercode = <0x909>; + rockchip,key_table = + <0xf4 KEY_POWER>, + <0xe6 KEY_SLEEP>, + <0xe4 KEY_WAKEUP>, + <0xed KEY_VOLUMEUP>, + <0xec KEY_VOLUMEDOWN>, + <0xef KEY_UP>, + <0xee KEY_DOWN>; + }; + + ir_key1 { + rockchip,usercode = <0x4040>; + rockchip,key_table = + <0xf2 KEY_REPLY>, + <0xba KEY_BACK>, + <0xf4 KEY_UP>, + <0xf1 KEY_DOWN>, + <0xef KEY_LEFT>, + <0xee KEY_RIGHT>, + <0xbd KEY_HOME>, + <0xea KEY_VOLUMEUP>, + <0xe3 KEY_VOLUMEDOWN>, + <0xe2 KEY_SEARCH>, + <0xb2 KEY_POWER>, + <0xbc KEY_MUTE>, + <0xec KEY_MENU>, + <0xbf 0x190>, + <0xe0 0x191>, + <0xe1 0x192>, + <0xe9 183>, + <0xe6 248>, + <0xe8 185>, + <0xe7 186>, + <0xf0 388>, + <0xbe 0x175>; + }; + + ir_key2 { + rockchip,usercode = <0xff00>; + rockchip,key_table = + <0xf9 KEY_HOME>, + <0xbf KEY_BACK>, + <0xfb KEY_MENU>, + <0xaa KEY_REPLY>, + <0xb9 KEY_UP>, + <0xe9 KEY_DOWN>, + <0xb8 KEY_LEFT>, + <0xea KEY_RIGHT>, + <0xeb KEY_VOLUMEDOWN>, + <0xef KEY_VOLUMEUP>, + <0xf7 KEY_MUTE>, + <0xe7 KEY_POWER>, + <0xfc KEY_POWER>, + <0xa9 KEY_VOLUMEDOWN>, + <0xa8 KEY_VOLUMEDOWN>, + <0xe0 KEY_VOLUMEDOWN>, + <0xa5 KEY_VOLUMEDOWN>, + <0xab 183>, + <0xb7 388>, + <0xe8 388>, + <0xf8 184>, + <0xaf 185>, + <0xed KEY_VOLUMEDOWN>, + <0xee 186>, + <0xb3 KEY_VOLUMEDOWN>, + <0xf1 KEY_VOLUMEDOWN>, + <0xf2 KEY_VOLUMEDOWN>, + <0xf3 KEY_SEARCH>, + <0xb4 KEY_VOLUMEDOWN>, + <0xbe KEY_SEARCH>; + }; + + ir_key3 { + rockchip,usercode = <0x1dcc>; + rockchip,key_table = + <0xee KEY_REPLY>, + <0xf0 KEY_BACK>, + <0xf8 KEY_UP>, + <0xbb KEY_DOWN>, + <0xef KEY_LEFT>, + <0xed KEY_RIGHT>, + <0xfc KEY_HOME>, + <0xf1 KEY_VOLUMEUP>, + <0xfd KEY_VOLUMEDOWN>, + <0xb7 KEY_SEARCH>, + <0xff KEY_POWER>, + <0xf3 KEY_MUTE>, + <0xbf KEY_MENU>, + <0xf9 0x191>, + <0xf5 0x192>, + <0xb3 388>, + <0xbe KEY_1>, + <0xba KEY_2>, + <0xb2 KEY_3>, + <0xbd KEY_4>, + <0xf9 KEY_5>, + <0xb1 KEY_6>, + <0xfc KEY_7>, + <0xf8 KEY_8>, + <0xb0 KEY_9>, + <0xb6 KEY_0>, + <0xb5 KEY_BACKSPACE>; + }; +}; + +&sdmmc0 { + max-frequency = <150000000>; + supports-sd; + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + sd-uhs-sdr104; + vmmc-supply = <&vcc3v3_sd>; + status = "okay"; +}; + +&xin32k { + status = "disabled"; //use for RX8010_nIRQ1 +}; + +&rk809 { + rtc { + status = "disabled"; //use rx8010 + }; +}; + +&i2c0 { + rx8010: rx8010@32 { + compatible = "epson,rx8010"; + reg = <0x32>; + pinctrl-0 = <&rx8010_irq>; + interrupt-parent = <&gpio0>; + interrupts = <8 IRQ_TYPE_LEVEL_LOW>; + status = "okay"; + }; +}; + +&can1 { + status = "disabled"; //Default to use DTBO +}; + +&uart3 { + status = "disabled"; //Default to use DTBO +}; + +&uart4 { + status = "disabled"; //Default to use DTBO +}; + +&uart7 { + status = "disabled"; //Default to use DTBO +}; + +&uart9 { + status = "disabled"; //Default to use DTBO +}; + +&pwm0 { + status = "okay"; +}; + +&rk809_codec { + hp-ctl-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; +}; + +&gmac0 { + snps,reset-gpio = <&gpio1 RK_PA1 GPIO_ACTIVE_LOW>; + tx_delay = <0x1c>; + rx_delay = <0x0d>; + status = "okay"; +}; + +&gmac1 { + snps,reset-gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_LOW>; + tx_delay = <0x20>; + rx_delay = <0x00>; + status = "okay"; +}; + +/* USB OTG/USB Host_1 USB 2.0 Comb */ +&usb2phy0 { + status = "okay"; +}; + +&u2phy0_host { + status = "okay"; + phy-supply = <&vcc5v0_usb30_host>; +}; + +&u2phy0_otg { + status = "okay"; + vbus-supply = <&usb_otg_vbus>; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +/* USB Host_2/USB Host_3 USB 2.0 Comb */ +&usb2phy1 { + status = "okay"; +}; + +&u2phy1_otg { + status = "okay"; + phy-supply = <&vcc5v0_usb20_host2>; +}; + +&u2phy1_host { + status = "okay"; + phy-supply = <&vcc5v0_usb20_host2>; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { + status = "okay"; +}; + +/* MULTI_PHY0 For SATA0, USB3.0 OTG0 Only USB2.0 */ +&combphy0_us { + status = "okay"; +}; + +&usbdrd30 { + status = "okay"; +}; + +&usbdrd_dwc3 { + dr_mode = "otg"; + extcon = <&usb2phy0>; + status = "okay"; +}; + +&sata0 { + target-supply = <&sata_power>; + status = "okay"; +}; + +/* MULTI_PHY1 For USB3.0 HOST1 */ +&combphy1_usq { + status = "okay"; +}; + +&usbhost30 { + status = "okay"; +}; + +&usbhost_dwc3 { + status = "okay"; +}; + +/* MULTI_PHY2 For PCIe2.0 */ +&combphy2_psq { + status = "okay"; +}; + +/* Mini PCIe */ +&pcie2x1 { + reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>; + disable-gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&minipcie_3v3>; + status = "okay"; +}; + +/* PCIe3.0x2 Comb */ +&pcie30phy { + status = "okay"; +}; + +/* M.2 M-key PCIe */ +&pcie3x2 { + reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&m2pcie_3v3>; + status = "okay"; }; &route_hdmi { @@ -31,3 +697,76 @@ status = "disabled"; }; +&pwm4 { + status = "okay"; +}; + +&pwm5 { + status = "okay"; +}; + +&pwm2 { + status = "okay"; +}; + +&pinctrl { + headphone { + hp_det: hp-det { + rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>; + }; + }; + + leds { + led0_pin: led0-pin { + rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + lcd { + edp_lcd_pwr_en: edp-lcd-pwr-en { + rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + edp_tp_pwr_en: edp-tp-pwr-en { + rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + mipi_dsi0_pwr_en: mipi-dsi0-pwr-en { + rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + mipi_dsi1_pwr_en: mipi-dsi1-pwr-en { + rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + rx8010 { + rx8010_irq: rx8010-irq { + rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + sata { + sata_pwr_en: sata-pwr-en { + rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + usb { + usb20_hub_pwr_en: usb20-hub-pwr-en { + rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + usb30_host1_pwr_en: usb30-host1-pwr-en { + rockchip,pins = <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + usb20_host2_pwr_en: usb20-host2-pwr-en { + rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + usb_otg_vbus_en: usb-otg-vbus-en { + rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io.dtsi deleted file mode 100644 index 996ea2aa10db..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2io.dtsi +++ /dev/null @@ -1,868 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2020 Rockchip Electronics Co., Ltd. - * - */ - -#include "rk3568-lubancat-2m-port.dtsi" -#include "rk3568-lubancat-2io-cam.dtsi" - -/ { - - backlight0: backlight0 { - status = "okay"; - compatible = "pwm-backlight"; - pwms = <&pwm4 0 50000 0>; - brightness-levels = < - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 - 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 - 120 121 122 123 124 125 126 127 - 128 129 130 131 132 133 134 135 - 136 137 138 139 140 141 142 143 - 144 145 146 147 148 149 150 151 - 152 153 154 155 156 157 158 159 - 160 161 162 163 164 165 166 167 - 168 169 170 171 172 173 174 175 - 176 177 178 179 180 181 182 183 - 184 185 186 187 188 189 190 191 - 192 193 194 195 196 197 198 199 - 200 201 202 203 204 205 206 207 - 208 209 210 211 212 213 214 215 - 216 217 218 219 220 221 222 223 - 224 225 226 227 228 229 230 231 - 232 233 234 235 236 237 238 239 - 240 241 242 243 244 245 246 247 - 248 249 250 251 252 253 254 255 - >; - default-brightness-level = <200>; - }; - - backlight1: backlight1 { - status = "okay"; - compatible = "pwm-backlight"; - pwms = <&pwm5 0 50000 0>; - brightness-levels = < - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 95 95 95 95 95 95 95 95 - 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 - 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 - 120 121 122 123 124 125 126 127 - 128 129 130 131 132 133 134 135 - 136 137 138 139 140 141 142 143 - 144 145 146 147 148 149 150 151 - 152 153 154 155 156 157 158 159 - 160 161 162 163 164 165 166 167 - 168 169 170 171 172 173 174 175 - 176 177 178 179 180 181 182 183 - 184 185 186 187 188 189 190 191 - 192 193 194 195 196 197 198 199 - 200 201 202 203 204 205 206 207 - 208 209 210 211 212 213 214 215 - 216 217 218 219 220 221 222 223 - 224 225 226 227 228 229 230 231 - 232 233 234 235 236 237 238 239 - 240 241 242 243 244 245 246 247 - 248 249 250 251 252 253 254 255 - >; - default-brightness-level = <200>; - }; - - backlight2: backlight2 { - status = "okay"; - compatible = "pwm-backlight"; - pwms = <&pwm2 0 500000 0>; //2khz - brightness-levels = < - 0 1 2 3 4 5 6 7 - 8 9 10 11 12 13 14 15 - 16 17 18 19 20 21 22 23 - 24 25 26 27 28 29 30 31 - 32 33 34 35 36 37 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>; - }; - - edp_panel: edp-panel { - compatible = "simple-panel"; - backlight = <&backlight2>; - status = "disabled"; - power-supply = <&vcc3v3_lcd_edp>; - enable-gpios = <&gpio2 RK_PD7 GPIO_ACTIVE_HIGH>; - //bus-format = ; - prepare-delay-ms = <100>; //AUX通信前延时 - enable-delay-ms = <100>; - - display-timings { - native-mode = <&timing0>; - - timing0: timing0 { - clock-frequency = <140000000>; - hactive = <1920>; - vactive = <1080>; - hfront-porch = <40>; - hsync-len = <40>; - hback-porch = <80>; - vfront-porch = <16>; - vsync-len = <8>; - vback-porch = <16>; - hsync-active = <0>; - vsync-active = <0>; - de-active = <0>; - pixelclk-active = <0>; - }; - }; - - ports { - panel_in_edp: endpoint { - remote-endpoint = <&edp_out_panel>; - }; - }; - }; - - vcc3v3_lcd_edp: vcc3v3-lcd-edp { - compatible = "regulator-fixed"; - gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; - enable-active-high; - regulator-name = "vcc3v3_lcd_edp"; - regulator-boot-on; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - mipi_dsi0_power: mipi-dsi0-power-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&mipi_dsi0_pwr_en>; - regulator-name = "mipi_dsi0_power"; - regulator-always-on; - }; - - - mipi_dsi1_power: mipi-dsi1-power-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&mipi_dsi1_pwr_en>; - regulator-name = "mipi_dsi1_power"; - regulator-always-on; - }; - - vcc_hub_power: vcc-hub-power-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vcc_hub_power_en>; - regulator-name = "vcc_hub_power_en"; - regulator-always-on; - }; - - edp_power: edp-power-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&edp_pwr_en>; - regulator-name = "edp_power"; - regulator-always-on; - }; - - sata_power: sata-power-regulator { - compatible = "regulator-fixed"; - regulator-name = "sata_power"; - regulator-min-microvolt = <12000000>; - regulator-max-microvolt = <12000000>; - gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; - enable-active-high; - regulator-boot-on; - pinctrl-names = "default"; - pinctrl-0 = <&sata_pwr_en>; - }; - - mini_pcie_3v3: mini-pcie-3v3-regulator { - compatible = "regulator-fixed"; - regulator-name = "minipcie_3v3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - enable-active-high; - regulator-always-on; - gpio = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>; - startup-delay-us = <5000>; - vin-supply = <&vcc5v0_sys>; - }; - - leds: leds { - status = "okay"; - compatible = "gpio-leds"; - - led0: led0 { - label = "heartbeat"; - linux,default-trigger = "heartbeat"; - default-state = "on"; - gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&led0_pin>; - }; - }; - -}; - -&pwm4 { - status = "okay"; -}; - -&pwm5 { - status = "okay"; -}; - -&pwm0 { - status = "okay"; -}; - -&edp { - status = "disabled"; - // hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>; //热插拔信号检测 - force-hpd; //强制hpd,忽略物理hdp信号 - - ports { - edp_out: port@1 { - reg = <1>; - #address-cells = <1>; - #size-cells = <0>; - - edp_out_panel: endpoint@0 { - reg = <0>; - remote-endpoint = <&panel_in_edp>; - }; - }; - }; -}; - -&i2c1 { - status = "okay"; - clock-frequency = <100000>; - - gt911_1: gt911_1@5d { - status = "okay"; - compatible = "goodix,gt911"; - reg = <0x5d>; - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_touch>; - interrupt-parent = <&gpio0>; - interrupts = ; - reset-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; - irq-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; - touchscreen-inverted-x = <1>; - touchscreen-inverted-y = <1>; - }; -}; - - -&i2c5 { - status = "okay"; - clock-frequency = <100000>; - - gt911_2: gt911_2@5d { - status = "okay"; - compatible = "goodix,gt911"; - reg = <0x5d>; - interrupt-parent = <&gpio3>; - interrupts = ; - reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; - irq-gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>; - touchscreen-inverted-x = <1>; - touchscreen-inverted-y = <1>; - }; - - gt911_3: gt911_3@5d { - status = "disable"; - compatible = "goodix,gt911"; - reg = <0x5d>; - interrupt-parent = <&gpio3>; - interrupts = ; - reset-gpios = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>; - irq-gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; - touchscreen-inverted-x = <1>; - touchscreen-inverted-y = <1>; - }; -}; - -&xin32k { - status = "disabled"; -}; - -&pwm2 { - status = "okay"; -}; - -&pwm3 { - status = "okay"; - - compatible = "rockchip,remotectl-pwm"; - interrupts = ; - remote_pwm_id = <3>; - handle_cpu_id = <1>; - remote_support_psci = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&pwm3_pins>; - - ir_key_lubancat{ - rockchip,usercode = <0x909>; - rockchip,key_table = - <0xf4 KEY_POWER>, - <0xe6 KEY_SLEEP>, - <0xe4 KEY_WAKEUP>, - <0xed KEY_VOLUMEUP>, - <0xec KEY_VOLUMEDOWN>, - <0xef KEY_UP>, - <0xee KEY_DOWN>; - }; - - ir_key1 { - rockchip,usercode = <0x4040>; - rockchip,key_table = - <0xf2 KEY_REPLY>, - <0xba KEY_BACK>, - <0xf4 KEY_UP>, - <0xf1 KEY_DOWN>, - <0xef KEY_LEFT>, - <0xee KEY_RIGHT>, - <0xbd KEY_HOME>, - <0xea KEY_VOLUMEUP>, - <0xe3 KEY_VOLUMEDOWN>, - <0xe2 KEY_SEARCH>, - <0xb2 KEY_POWER>, - <0xbc KEY_MUTE>, - <0xec KEY_MENU>, - <0xbf 0x190>, - <0xe0 0x191>, - <0xe1 0x192>, - <0xe9 183>, - <0xe6 248>, - <0xe8 185>, - <0xe7 186>, - <0xf0 388>, - <0xbe 0x175>; - }; - - ir_key2 { - rockchip,usercode = <0xff00>; - rockchip,key_table = - <0xf9 KEY_HOME>, - <0xbf KEY_BACK>, - <0xfb KEY_MENU>, - <0xaa KEY_REPLY>, - <0xb9 KEY_UP>, - <0xe9 KEY_DOWN>, - <0xb8 KEY_LEFT>, - <0xea KEY_RIGHT>, - <0xeb KEY_VOLUMEDOWN>, - <0xef KEY_VOLUMEUP>, - <0xf7 KEY_MUTE>, - <0xe7 KEY_POWER>, - <0xfc KEY_POWER>, - <0xa9 KEY_VOLUMEDOWN>, - <0xa8 KEY_VOLUMEDOWN>, - <0xe0 KEY_VOLUMEDOWN>, - <0xa5 KEY_VOLUMEDOWN>, - <0xab 183>, - <0xb7 388>, - <0xe8 388>, - <0xf8 184>, - <0xaf 185>, - <0xed KEY_VOLUMEDOWN>, - <0xee 186>, - <0xb3 KEY_VOLUMEDOWN>, - <0xf1 KEY_VOLUMEDOWN>, - <0xf2 KEY_VOLUMEDOWN>, - <0xf3 KEY_SEARCH>, - <0xb4 KEY_VOLUMEDOWN>, - <0xbe KEY_SEARCH>; - }; - - ir_key3 { - rockchip,usercode = <0x1dcc>; - rockchip,key_table = - <0xee KEY_REPLY>, - <0xf0 KEY_BACK>, - <0xf8 KEY_UP>, - <0xbb KEY_DOWN>, - <0xef KEY_LEFT>, - <0xed KEY_RIGHT>, - <0xfc KEY_HOME>, - <0xf1 KEY_VOLUMEUP>, - <0xfd KEY_VOLUMEDOWN>, - <0xb7 KEY_SEARCH>, - <0xff KEY_POWER>, - <0xf3 KEY_MUTE>, - <0xbf KEY_MENU>, - <0xf9 0x191>, - <0xf5 0x192>, - <0xb3 388>, - <0xbe KEY_1>, - <0xba KEY_2>, - <0xb2 KEY_3>, - <0xbd KEY_4>, - <0xf9 KEY_5>, - <0xb1 KEY_6>, - <0xfc KEY_7>, - <0xf8 KEY_8>, - <0xb0 KEY_9>, - <0xb6 KEY_0>, - <0xb5 KEY_BACKSPACE>; - }; -}; - -&i2c0 { - rx8010: rx8010@32 { - compatible = "epson,rx8010"; - reg = <0x32>; - pinctrl-0 = <&rx8010_irq>; - interrupt-parent = <&gpio0>; - interrupts = <8 IRQ_TYPE_LEVEL_LOW>; - status = "okay"; - }; -}; - -&spi1 { - status = "disabled"; -}; - -&spi_wk2xxx { - status = "okay"; -}; - -&pcie30phy { - status = "okay"; -}; - -&pcie3x2 { - reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; - vpcie3v3-supply = <&pcie30_3v3>; - - status = "okay"; -}; - -/* mini pcie */ -&pcie2x1 { - reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>; - disable-gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>; - vpcie3v3-supply = <&mini_pcie_3v3>; - status = "okay"; -}; - -&its { - status = "okay"; -}; - -&gmac0 { - status = "okay"; -}; - -&gmac1 { - status = "okay"; -}; - -&rgmii_phy0 { - led_status_value = <0x6940>; -}; - -&rgmii_phy1 { - led_status_value = <0x6940>; -}; - - -&sdmmc2 { - status = "okay"; - max-frequency = <100000000>; -}; - - -&spdif_8ch{ - status = "disabled"; -}; - -&rk809_codec { - hp-ctl-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; -}; - -&rk809 { - rtc { - status = "disabled"; - }; -}; - -&pwm11 { - status = "okay"; - pinctrl-0 = <&pwm11m1_pins>; -}; - -&sata0 { - target-supply = <&sata_power>; - status = "okay"; -}; - - -&dsi1 { - status = "disable"; - power-supply = <&mipi_dsi1_power>; - panel@0 { - status = "okay"; - compatible = "simple-panel-dsi"; - reg = <0>; - backlight = <&backlight1>; - reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; - - enable-delay-ms = <35>; - prepare-delay-ms = <6>; - reset-delay-ms = <0>; - init-delay-ms = <20>; - unprepare-delay-ms = <0>; - disable-delay-ms = <20>; - - size,width = <74>; - size,height = <133>; - - 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 = [ - 39 00 04 B9 FF 83 99 - 15 00 02 D2 77 - 39 00 10 B1 02 04 74 94 01 32 33 11 11 AB 4D 56 73 02 02 - 39 00 10 B2 00 80 80 AE 05 07 5A 11 00 00 10 1E 70 03 D4 - 15 00 02 36 02 - 39 00 2D B4 00 FF 02 C0 02 C0 00 00 08 00 04 06 00 32 04 0A 08 21 03 01 00 0F B8 8B 02 C0 02 C0 00 00 08 00 04 06 00 32 04 0A 08 01 00 0F B8 01 - 39 05 22 D3 00 00 00 00 00 00 06 00 00 10 04 00 04 00 00 00 00 00 00 00 00 00 00 01 00 05 05 07 00 00 00 05 40 - 39 05 21 D5 18 18 19 19 18 18 21 20 01 00 07 06 05 04 03 02 18 18 18 18 18 18 2F 2F 30 30 31 31 18 18 18 18 - 39 05 21 D6 18 18 19 19 40 40 20 21 06 07 00 01 02 03 04 05 40 40 40 40 40 40 2F 2F 30 30 31 31 40 40 40 40 - 39 00 11 D8 A2 AA 02 A0 A2 A8 02 A0 B0 00 00 00 B0 00 00 00 - 15 00 02 BD 01 - 39 00 11 D8 B0 00 00 00 B0 00 00 00 E2 AA 03 F0 E2 AA 03 F0 - 15 00 02 BD 02 - 39 00 09 D8 E2 AA 03 F0 E2 AA 03 F0 - 15 00 02 BD 00 - 39 00 03 B6 8D 8D - 39 05 37 E0 00 0E 19 13 2E 39 48 44 4D 57 5F 66 6C 76 7F 85 8A 95 9A A4 9B AB B0 5C 58 64 77 00 0E 19 13 2E 39 48 44 4D 57 5F 66 6C 76 7F 85 8A 95 9A A4 9B AB B0 5C 58 64 77 - 05 C8 01 11 - 05 C8 01 29 - ]; - - panel-exit-sequence = [ - 05 78 01 28 - 05 00 01 10 - ]; - - disp_timings: display-timings { - native-mode = <&dsi1_timing>; - dsi1_timing: timing { - clock-frequency = <131376000>; - hactive = <1080>; - vactive = <1920>; - hsync-len = <10>; - hback-porch = <20>; - hfront-porch = <10>; - vsync-len = <5>; - vback-porch = <20>; - vfront-porch = <10>; - 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>; - }; - }; - }; -}; - - -// &dsi0 { -// status = "disable"; -// power-supply = <&mipi_dsi0_power>; - -// dsi0_panel: panel@0 { -// compatible = "rockpi,tc358762"; -// reg = <0x0>; -// status = "okay"; - -// display-timings { -// native-mode = <&dsi3_timing>; -// dsi3_timing: dsi3_timing { -// clock-frequency = <26700000>; -// hactive = <800>; -// vactive = <480>; -// hsync-len = <4>; -// hback-porch = <16>; -// hfront-porch = <26>; -// vsync-len = <2>; -// vback-porch = <7>; -// vfront-porch = <21>; -// 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>; -// }; -// }; -// }; -// }; - -&i2c1 { - status = "okay"; - clock-frequency = <100000>; - - rockpi_mcu: rockpi-mcu@45 { - compatible = "rockpi_mcu"; - reg = <0x45>; - status = "disable"; - }; - - rockpi_ft5406: rockpi_ft5406@38 { - compatible = "rockpi_ft5406"; - reg = <0x38>; - status = "disable"; - }; -}; - -&dsi0 { - status = "disable"; - power-supply = <&mipi_dsi0_power>; - dsi0_panel:panel@0 { - compatible = "simple-panel-dsi"; - reg = <0>; - backlight = <&backlight0>; - reset-gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_LOW>; - - enable-delay-ms = <35>; - prepare-delay-ms = <6>; - reset-delay-ms = <0>; - init-delay-ms = <20>; - unprepare-delay-ms = <0>; - disable-delay-ms = <20>; - - size,width = <74>; - size,height = <133>; - - 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 = [ - 39 00 04 B9 FF 83 99 - 15 00 02 D2 77 - 39 00 10 B1 02 04 74 94 01 32 33 11 11 AB 4D 56 73 02 02 - 39 00 10 B2 00 80 80 AE 05 07 5A 11 00 00 10 1E 70 03 D4 - 15 00 02 36 02 - 39 00 2D B4 00 FF 02 C0 02 C0 00 00 08 00 04 06 00 32 04 0A 08 21 03 01 00 0F B8 8B 02 C0 02 C0 00 00 08 00 04 06 00 32 04 0A 08 01 00 0F B8 01 - 39 05 22 D3 00 00 00 00 00 00 06 00 00 10 04 00 04 00 00 00 00 00 00 00 00 00 00 01 00 05 05 07 00 00 00 05 40 - 39 05 21 D5 18 18 19 19 18 18 21 20 01 00 07 06 05 04 03 02 18 18 18 18 18 18 2F 2F 30 30 31 31 18 18 18 18 - 39 05 21 D6 18 18 19 19 40 40 20 21 06 07 00 01 02 03 04 05 40 40 40 40 40 40 2F 2F 30 30 31 31 40 40 40 40 - 39 00 11 D8 A2 AA 02 A0 A2 A8 02 A0 B0 00 00 00 B0 00 00 00 - 15 00 02 BD 01 - 39 00 11 D8 B0 00 00 00 B0 00 00 00 E2 AA 03 F0 E2 AA 03 F0 - 15 00 02 BD 02 - 39 00 09 D8 E2 AA 03 F0 E2 AA 03 F0 - 15 00 02 BD 00 - 39 00 03 B6 8D 8D - 39 05 37 E0 00 0E 19 13 2E 39 48 44 4D 57 5F 66 6C 76 7F 85 8A 95 9A A4 9B AB B0 5C 58 64 77 00 0E 19 13 2E 39 48 44 4D 57 5F 66 6C 76 7F 85 8A 95 9A A4 9B AB B0 5C 58 64 77 - 05 C8 01 11 - 05 C8 01 29 - ]; - - panel-exit-sequence = [ - 05 78 01 28 - 05 00 01 10 - ]; - - disp_timing: display-timings { - native-mode = <&dsi0_timing>; - dsi0_timing: dsi0_timing { - clock-frequency = <131376000>; - hactive = <1080>; - vactive = <1920>; - hsync-len = <10>; - hback-porch = <20>; - hfront-porch = <10>; - vsync-len = <5>; - vback-porch = <20>; - vfront-porch = <10>; - 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>; - }; - }; - }; -}; - - - -&pinctrl { - - usb { - vcc_hub_power_en: vcc-hub-power-en { - rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - rx8010 { - rx8010_irq: rx8010-irq { - rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - sata { - sata_pwr_en: sata-pwr-en { - rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - edp { - edp_pwr_en: edp-pwr-en { - rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - leds { - led0_pin: led0-pin { - rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; - - -&pinctrl { - lcd { - mipi_dsi0_pwr_en: mipi-dsi0-pwr-en { - rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - mipi_dsi1_pwr_en: mipi-dsi1-pwr-en { - rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - i2c1_touch:i2c1_touch { - rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2m-port.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2m-port.dtsi index baf14ce318db..451a24e4b686 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2m-port.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2m-port.dtsi @@ -1,7 +1,9 @@ // SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Copyright (c) 2020 Rockchip Electronics Co., Ltd. + * Copyright (c) 2023 EmbedFire Electronic Technology Co., Ltd. * + * LubanCat-2M MXM connector port devicestree */ /dts-v1/; @@ -12,69 +14,120 @@ / { compatible = "rockchip,lubancat-2m-port", "rockchip,rk3568"; - - vcc2v5_sys: vcc2v5-ddr { - compatible = "regulator-fixed"; - regulator-name = "vcc2v5-sys"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <2500000>; - regulator-max-microvolt = <2500000>; - vin-supply = <&vcc3v3_sys>; - }; - - vcc3v3_vga: vcc3v3-vga { - compatible = "regulator-fixed"; - regulator-name = "vcc3v3_vga"; - regulator-always-on; - regulator-boot-on; - gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>; - enable-active-high; - vin-supply = <&vcc3v3_sys>; - }; - - pcie30_avdd0v9: pcie30-avdd0v9 { - compatible = "regulator-fixed"; - regulator-name = "pcie30_avdd0v9"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <900000>; - vin-supply = <&vcc3v3_sys>; - }; - - pcie30_avdd1v8: pcie30-avdd1v8 { - compatible = "regulator-fixed"; - regulator-name = "pcie30_avdd1v8"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - vin-supply = <&vcc3v3_sys>; - }; - - pcie30_3v3: gpio-regulator { - compatible = "regulator-gpio"; - regulator-name = "pcie30_3v3"; - regulator-min-microvolt = <100000>; - regulator-max-microvolt = <3300000>; - gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>; - gpios-states = <0x1>; - states = <100000 0x0 - 3300000 0x1>; - }; }; +&sfc{ + pinctrl-names = "default"; + pinctrl-0 = <&fspi_pins>; + assigned-clock-rates = <50000000>; + status = "disabled"; +}; + +&sdmmc0 { + bus-width = <4>; + vqmmc-supply = <&vccio_sd>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; + status = "disabled"; +}; + +/* USB OTG/USB Host_1 USB 2.0 Comb */ +&usb2phy0 { + status = "disabled"; +}; + +&u2phy0_host { + status = "disabled"; +}; + +&u2phy0_otg { + status = "disabled"; +}; + +&usb_host0_ehci { + status = "disabled"; +}; + +&usb_host0_ohci { + status = "disabled"; +}; + +/* USB Host_2/USB Host_3 USB 2.0 Comb */ +&usb2phy1 { + status = "disabled"; +}; + +&u2phy1_otg { + status = "disabled"; +}; + +&u2phy1_host { + status = "disabled"; +}; + +&usb_host1_ehci { + status = "disabled"; +}; + +&usb_host1_ohci { + status = "disabled"; +}; + +/* MULTI_PHY0 For SATA0, USB3.0 OTG0 */ &combphy0_us { - status = "okay"; + status = "disabled"; }; +&usbdrd30 { + status = "disabled"; +}; + +#if 0 //MULTI_PHY0 +/* MULTI_PHY0 For USB3.0 OTG0 */ +&usbdrd_dwc3 { + status = "disabled"; +}; +else +/* MULTI_PHY0 For SATA0, USB3.0 OTG0 Only USB2.0 */ +&usbdrd_dwc3 { + phys = <&u2phy0_otg>; + phy-names = "usb2-phy"; + extcon = <&usb2phy0>; + maximum-speed = "high-speed"; + snps,dis_u2_susphy_quirk; + status = "disabled"; +}; + +&sata0 { + status = "disabled"; +}; +#endif //MULTI_PHY0 + +/* MULTI_PHY1 For SATA1, USB3.0 HOST1, QSGMII_M0 */ &combphy1_usq { - status = "okay"; + status = "disabled"; }; +&usbhost30 { + status = "disabled"; +}; + +&usbhost_dwc3 { + status = "disabled"; +}; + +/* MULTI_PHY2 For SATA2, PCIe2.0, QSGMII_M1 */ &combphy2_psq { - status = "okay"; + status = "disabled"; +}; + +&sata2 { + status = "disabled"; +}; + +/* PCIe3.0x2 Comb */ +&pcie30phy { + status = "disabled"; }; &gmac0 { @@ -104,6 +157,51 @@ status = "disabled"; }; +&mdio0 { + rgmii_phy0: phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x0>; + // led_status_value = <0x6940>; + }; +}; + +&uart8 { + status = "disabled"; +}; + +&saradc { + status = "okay"; + vref-supply = <&vcca_1v8>; +}; + +#if 0 //CAN1 +&can1 { + status = "disabled"; //Default to use DTBO + compatible = "rockchip,can-1.0"; + pinctrl-names = "default"; + pinctrl-0 = <&can1m1_pins>; +}; +else +&can1 { + status = "disabled"; //Default to use DTBO + compatible = "rockchip,canfd-1.0"; + pinctrl-names = "default"; + assigned-clocks = <&cru CLK_CAN1>; + assigned-clock-rates = <150000000>; + pinctrl-0 = <&can1m1_pins>; +}; +#endif //CAN1 + +&uart9 { + status = "disabled"; //Default to use DTBO + pinctrl-names = "default"; + pinctrl-0 = <&uart9m1_xfer>; +}; + +&sdmmc2 { + status = "disabled"; +}; + &gmac1 { phy-mode = "rgmii"; clock_in_out = "input"; @@ -131,92 +229,62 @@ status = "disabled"; }; -&mdio0 { - rgmii_phy0: phy@0 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <0x0>; - }; -}; - &mdio1 { rgmii_phy1: phy@0 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x0>; + // led_status_value = <0x6940>; }; }; -&pcie30phy { +&i2c4 { status = "disabled"; }; -&pcie3x2 { - reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; - vpcie3v3-supply = <&pcie30_3v3>; +#if 0 //CAN2 +&can2 { + status = "disabled"; //Default to use DTBO + compatible = "rockchip,can-1.0"; + pinctrl-names = "default"; + pinctrl-0 = <&can2m0_pins>; +}; +else +&can2 { + status = "disabled"; //Default to use DTBO + compatible = "rockchip,canfd-1.0"; + pinctrl-names = "default"; + assigned-clocks = <&cru CLK_CAN1>; + assigned-clock-rates = <150000000>; + pinctrl-0 = <&can2m0_pins>; +}; +#endif //CAN2 + +&i2s3_2ch { status = "disabled"; }; -&sata2 { - status = "disabled"; -}; - - -&spdif_8ch { +&uart4 { status = "disabled"; pinctrl-names = "default"; - pinctrl-0 = <&spdifm1_tx>; + pinctrl-0 = <&uart4m1_xfer>; }; - - - -&uart8 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>; -}; - -&spi1 { +&i2c5 { status = "disabled"; - max-freq = <48000000>; - dev-port = <0>; - pinctrl-0 = <&spi1m1_pins>; - pinctrl-1 = <&spi1m1_pins_hs>; - - spi_wk2xxx: spi_wk2xxx@00{ - status = "disabled"; - compatible = "lubancat,spi-wk2xxx"; - reg = <0x00>; - spi-max-frequency = <10000000>; - // power-gpio = <&pca9555 PCA_IO1_7 GPIO_ACTIVE_HIGH>; - // reset-gpio = <&pca9555 PCA_IO1_1 GPIO_ACTIVE_HIGH>; - irq-gpio = <&gpio0 RK_PA6 IRQ_TYPE_EDGE_FALLING>; - cs-gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>; - /* rk3399 driver support SPI_CPOL | SPI_CPHA | SPI_CS_HIGH */ - //spi-cpha; /* SPI mode: CPHA=1 */ - //spi-cpol; /* SPI mode: CPOL=1 */ - //spi-cs-high; - }; }; -&pinctrl { - headphone { - hp_det: hp-det { - rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>; - }; - }; - - touch { - touch_gpio: touch-gpio { - rockchip,pins = - <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; - -&sfc{ +&uart3 { + status = "disabled"; pinctrl-names = "default"; - pinctrl-0 = <&fspi_pins>; - assigned-clock-rates = <50000000>; - status = "okay"; + pinctrl-0 = <&uart3m1_xfer>; +}; + +&uart7 { + status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&uart7m1_xfer>; +}; + +&i2c3 { + status = "disabled"; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2m.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2m.dtsi index bd19ffa0ac5b..1feaaa088441 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2m.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2m.dtsi @@ -1,7 +1,9 @@ // SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Copyright (c) 2020 Rockchip Electronics Co., Ltd. + * Copyright (c) 2023 EmbedFire Electronic Technology Co., Ltd. * + * LubanCat-2M core board devicestree */ /dts-v1/; @@ -11,6 +13,7 @@ #include #include #include +#include #include #include "rk3568.dtsi" @@ -18,72 +21,65 @@ / { compatible = "rockchip,lubancat-2m", "rockchip,rk3568"; - chosen: chosen { - bootargs = "earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0 root=PARTUUID=614e0000-0000 rw rootwait"; - }; - - fiq-debugger { - compatible = "rockchip,fiq-debugger"; - rockchip,serial-id = <2>; - rockchip,wake-irq = <0>; - /* If enable uart uses irq instead of fiq */ - rockchip,irq-mode-enable = <1>; - rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */ - interrupts = ; - pinctrl-names = "default"; - pinctrl-0 = <&uart2m0_xfer>; - status = "okay"; - }; - - debug: debug@fd904000 { - compatible = "rockchip,debug"; - reg = <0x0 0xfd904000 0x0 0x1000>, - <0x0 0xfd905000 0x0 0x1000>, - <0x0 0xfd906000 0x0 0x1000>, - <0x0 0xfd907000 0x0 0x1000>; - }; - - cspmu: cspmu@fd90c000 { - compatible = "rockchip,cspmu"; - reg = <0x0 0xfd90c000 0x0 0x1000>, - <0x0 0xfd90d000 0x0 0x1000>, - <0x0 0xfd90e000 0x0 0x1000>, - <0x0 0xfd90f000 0x0 0x1000>; - }; - - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - ramoops: ramoops@110000 { - compatible = "ramoops"; - reg = <0x0 0x110000 0x0 0xf0000>; - record-size = <0x20000>; - console-size = <0x80000>; - ftrace-size = <0x00000>; - pmsg-size = <0x50000>; - }; - - abc: abc@80900000{ - reg = <0x0 0x80900000 0x0 0x100000>; - }; - }; - - dc_12v: dc-12v { - compatible = "regulator-fixed"; - regulator-name = "dc_12v"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <12000000>; - regulator-max-microvolt = <12000000>; + chosen: chosen { + bootargs = "earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0 root=PARTUUID=614e0000-0000 rw rootwait"; }; - rk_headset: rk-headset { - status = "okay"; - compatible = "rockchip_headset"; - headset_gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>; + fiq-debugger { + compatible = "rockchip,fiq-debugger"; + rockchip,serial-id = <2>; + rockchip,wake-irq = <0>; + /* If enable uart uses irq instead of fiq */ + rockchip,irq-mode-enable = <1>; + rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */ + interrupts = ; pinctrl-names = "default"; - pinctrl-0 = <&hp_det>; + pinctrl-0 = <&uart2m0_xfer>; + status = "okay"; + }; + + debug: debug@fd904000 { + compatible = "rockchip,debug"; + reg = <0x0 0xfd904000 0x0 0x1000>, + <0x0 0xfd905000 0x0 0x1000>, + <0x0 0xfd906000 0x0 0x1000>, + <0x0 0xfd907000 0x0 0x1000>; + }; + + cspmu: cspmu@fd90c000 { + compatible = "rockchip,cspmu"; + reg = <0x0 0xfd90c000 0x0 0x1000>, + <0x0 0xfd90d000 0x0 0x1000>, + <0x0 0xfd90e000 0x0 0x1000>, + <0x0 0xfd90f000 0x0 0x1000>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + ramoops: ramoops@110000 { + compatible = "ramoops"; + reg = <0x0 0x110000 0x0 0xf0000>; + record-size = <0x20000>; + console-size = <0x80000>; + ftrace-size = <0x00000>; + pmsg-size = <0x50000>; + }; + + abc: abc@80900000{ + reg = <0x0 0x80900000 0x0 0x100000>; + }; + }; + + vcc3v3_sys: vcc3v3-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc5v0_sys>; }; rk809_sound: rk809-sound { @@ -108,73 +104,6 @@ }; }; - vcc3v3_sys: vcc3v3-sys { - compatible = "regulator-fixed"; - regulator-name = "vcc3v3_sys"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - vin-supply = <&dc_12v>; - }; - - 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 = <&dc_12v>; - }; - - vcc5v0_host: vcc5v0-host-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vcc5v0_host_en>; - regulator-name = "vcc5v0_host"; - regulator-always-on; - }; - - vcc5v0_usb20_host: vcc5v0-usb20-host-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vcc5v0_usb20_host_en>; - regulator-name = "vcc5v0_usb20_host"; - regulator-always-on; - }; - - vcc5v0_otg: vcc5v0-otg-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vcc5v0_otg_en>; - regulator-name = "vcc5v0_otg"; - }; - - vcc3v3_lcd0_n: vcc3v3-lcd0-n { - compatible = "regulator-fixed"; - regulator-name = "vcc3v3_lcd0_n"; - regulator-boot-on; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc3v3_lcd1_n: vcc3v3-lcd1-n { - compatible = "regulator-fixed"; - regulator-name = "vcc3v3_lcd1_n"; - regulator-boot-on; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - test-power { status = "okay"; }; @@ -203,36 +132,6 @@ status = "okay"; }; -&dmc_opp_table { - opp-324000000 { - opp-hz = /bits/ 64 <324000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <528000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <780000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-1560000000 { - opp-hz = /bits/ 64 <1560000000>; - opp-microvolt = <900000>; - opp-microvolt-L0 = <900000>; - opp-microvolt-L1 = <850000>; - }; -}; - &gpu { mali-supply = <&vdd_gpu>; status = "okay"; @@ -524,10 +423,6 @@ }; }; -&i2s0_8ch { - status = "okay"; -}; - &i2s1_8ch { status = "okay"; rockchip,clk-trcm = <1>; @@ -538,6 +433,10 @@ &i2s1m0_sdo0>; }; +&its { + status = "okay"; +}; + &iep { status = "okay"; }; @@ -558,23 +457,8 @@ status = "okay"; }; -&nandc0 { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - nand@0 { - reg = <0>; - nand-bus-width = <8>; - nand-ecc-mode = "hw"; - nand-ecc-strength = <16>; - nand-ecc-step-size = <1024>; - }; -}; - &pmu_io_domains { status = "okay"; - pmuio1-supply = <&vcc3v3_pmu>; pmuio2-supply = <&vcc3v3_pmu>; vccio1-supply = <&vccio_acodec>; vccio3-supply = <&vccio_sd>; @@ -614,23 +498,12 @@ status = "okay"; }; -&reserved_memory { - abc: abc@80900000{ - reg = <0x0 0x80900000 0x0 0x100000>; - }; -}; - &bus_npu { bus-supply = <&vdd_logic>; pvtm-supply = <&vdd_cpu>; status = "okay"; }; -&saradc { - status = "okay"; - vref-supply = <&vcca_1v8>; -}; - &sdhci { bus-width = <8>; supports-emmc; @@ -643,91 +516,10 @@ status = "okay"; }; -&sdmmc0 { - max-frequency = <150000000>; - supports-sd; - bus-width = <4>; - cap-mmc-highspeed; - cap-sd-highspeed; - disable-wp; - sd-uhs-sdr104; - vmmc-supply = <&vcc3v3_sd>; - vqmmc-supply = <&vccio_sd>; - pinctrl-names = "default"; - pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; - status = "okay"; -}; - -&spdif_8ch { - status = "okay"; -}; - &tsadc { status = "okay"; }; -&u2phy0_host { - phy-supply = <&vcc5v0_host>; - status = "okay"; -}; - -&u2phy0_otg { - vbus-supply = <&vcc5v0_otg>; - status = "okay"; -}; - -&u2phy1_host { - phy-supply = <&vcc5v0_usb20_host>; - status = "okay"; -}; - -&u2phy1_otg { - phy-supply = <&vcc5v0_usb20_host>; - status = "okay"; -}; - -&usb2phy0 { - status = "okay"; -}; - -&usb2phy1 { - status = "okay"; -}; - -&usb_host0_ehci { - status = "okay"; -}; - -&usb_host0_ohci { - status = "okay"; -}; - -&usb_host1_ehci { - status = "okay"; -}; - -&usb_host1_ohci { - status = "okay"; -}; - -&usbdrd_dwc3 { - dr_mode = "otg"; - extcon = <&usb2phy0>; - status = "okay"; -}; - -&usbdrd30 { - status = "okay"; -}; - -&usbhost_dwc3 { - status = "okay"; -}; - -&usbhost30 { - status = "okay"; -}; - &vad { rockchip,audio-src = <&i2s1_8ch>; rockchip,buffer-time-ms = <128>; @@ -761,8 +553,17 @@ status = "okay"; }; -&pinctrl { +&vp0 { + rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0 | 1 << ROCKCHIP_VOP2_SMART0)>; + rockchip,primary-plane = ; +}; +&vp1 { + rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1 | 1 << ROCKCHIP_VOP2_SMART1)>; + rockchip,primary-plane = ; +}; + +&pinctrl { pmic { pmic_int: pmic_int { rockchip,pins = @@ -784,18 +585,4 @@ <0 RK_PA2 RK_FUNC_2 &pcfg_pull_none>; }; }; - - usb { - vcc5v0_host_en: vcc5v0-host-en { - rockchip,pins = <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - vcc5v0_usb20_host_en: vcc5v0-usb20-host-en { - rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - vcc5v0_otg_en: vcc5v0-otg-en { - rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2n.dts b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2n.dts index 907b544c61b8..1fcd0473cc45 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2n.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2n.dts @@ -344,6 +344,25 @@ test-power { status = "okay"; }; + + hdmi_sound: hdmi-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <128>; + simple-audio-card,name = "rockchip,hdmi"; + status = "okay"; + + simple-audio-card,cpu { + sound-dai = <&i2s0_8ch>; + }; + simple-audio-card,codec { + sound-dai = <&hdmi>; + }; + }; +}; + +&i2s0_8ch { + status = "okay"; }; &saradc { @@ -421,36 +440,6 @@ status = "okay"; }; -&dmc_opp_table { - opp-324000000 { - opp-hz = /bits/ 64 <324000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <528000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <780000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-1560000000 { - opp-hz = /bits/ 64 <1560000000>; - opp-microvolt = <900000>; - opp-microvolt-L0 = <900000>; - opp-microvolt-L1 = <850000>; - }; -}; - &gpu { mali-supply = <&vdd_gpu>; status = "okay"; @@ -893,13 +882,13 @@ &vp0 { rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0 | 1 << ROCKCHIP_VOP2_SMART0)>; rockchip,primary-plane = ; - cursor-win-id = ; + // cursor-win-id = ; }; &vp1 { rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1 | 1 << ROCKCHIP_VOP2_SMART1)>; rockchip,primary-plane = ; - cursor-win-id = ; + // cursor-win-id = ; }; &rng { diff --git a/arch/arm64/boot/dts/rockchip/rk356x-lubancat-backup.dts b/arch/arm64/boot/dts/rockchip/rk356x-lubancat-backup.dts index dbf0ab53c914..ac7fb5f87784 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x-lubancat-backup.dts +++ b/arch/arm64/boot/dts/rockchip/rk356x-lubancat-backup.dts @@ -236,36 +236,6 @@ status = "okay"; }; -&dmc_opp_table { - opp-324000000 { - opp-hz = /bits/ 64 <324000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <528000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-528000000 { - opp-hz = /bits/ 64 <780000000>; - opp-microvolt = <875000>; - opp-microvolt-L0 = <875000>; - opp-microvolt-L1 = <850000>; - }; - - opp-1056000000 { - opp-hz = /bits/ 64 <1056000000>; - opp-microvolt = <900000>; - opp-microvolt-L0 = <900000>; - opp-microvolt-L1 = <850000>; - }; -}; - &gpu { mali-supply = <&vdd_gpu>; status = "okay"; diff --git a/arch/arm64/boot/dts/rockchip/uEnv/uEnvLubanCat2-V1.txt b/arch/arm64/boot/dts/rockchip/uEnv/uEnvLubanCat2-V1.txt new file mode 100644 index 000000000000..3688dab5df0b --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/uEnv/uEnvLubanCat2-V1.txt @@ -0,0 +1,46 @@ +uname_r=4.19.232 +size=0x1000000 +bootargs=console=ttyFIQ0 console=tty1 +#dtb=rk3568-lubancat2.dtb + +enable_uboot_overlays=1 +#overlay_start + +#40pin +#dtoverlay=/dtb/overlay/rk356x-lubancat-i2c3-m0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-i2c3-m1-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-i2c5-m0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm7-ir-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm8-m0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm9-m0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm10-m0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm11-ir-m0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm12-m0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm12-m1-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm13-m0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm13-m1-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm14-m0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm14-m1-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm15-ir-m0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-pwm15-ir-m1-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-spi3-m1-gpio-cs-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-spi3-m1-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-uart3-m0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-uart3-m1-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-uart4-m1-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-uart7-m1-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-uart8-m1-overlay.dtbo +#dtoverlay=/dtb/overlay/rk356x-lubancat-uart9-m1-overlay.dtbo +#dtoverlay=/dtb/overlay/rk3568-lubancat-can1-m0-overlay.dtbo +#dtoverlay=/dtb/overlay/rk3568-lubancat-can1-m1-overlay.dtbo +#mini-pcie 5G modules +#dtoverlay=/dtb/overlay/rk356x-lubancat-pcie2x1-disabled-overlay.dtbo +#display +#dtoverlay=/dtb/overlay/rk3568-lubancat-hdmi-disabled-overlay.dtbo +#dtoverlay=/dtb/overlay/rk3568-lubancat-dsi0-720p-overlay.dtbo +#dtoverlay=/dtb/overlay/rk3568-lubancat-dsi0-1080p-overlay.dtbo +#dtoverlay=/dtb/overlay/rk3568-lubancat-dsi0-rpi-overlay.dtbo + + +#overlay_end + diff --git a/arch/arm64/boot/dts/rockchip/uEnv/uEnvLubanCat2IO.txt b/arch/arm64/boot/dts/rockchip/uEnv/uEnvLubanCat2IO.txt index 95f12091d0ea..3be27f0c8a7a 100644 --- a/arch/arm64/boot/dts/rockchip/uEnv/uEnvLubanCat2IO.txt +++ b/arch/arm64/boot/dts/rockchip/uEnv/uEnvLubanCat2IO.txt @@ -14,6 +14,13 @@ enable_uboot_overlays=1 #dtoverlay=/dtb/overlay/rk356x-lubancat-uart4-m1-overlay.dtbo #dtoverlay=/dtb/overlay/rk356x-lubancat-uart7-m1-overlay.dtbo #dtoverlay=/dtb/overlay/rk356x-lubancat-uart9-m1-overlay.dtbo +#display +#dtoverlay=/dtb/overlay/rk3568-lubancat-hdmi-disabled-overlay.dtbo +#dtoverlay=/dtb/overlay/rk3568-lubancat-2io-dsi0-in-vp0-1080p-overlay.dtbo +#dtoverlay=/dtb/overlay/rk3568-lubancat-2io-dsi0-in-vp0-rpi-overlay.dtbo +#dtoverlay=/dtb/overlay/rk3568-lubancat-2io-dsi1-in-vp1-1080p-overlay.dtbo +#dtoverlay=/dtb/overlay/rk3568-lubancat-2io-dsi1-in-vp1-rpi-overlay.dtbo +#dtoverlay=/dtb/overlay/rk3568-lubancat-2io-edp-in-vp1-overlay.dtbo diff --git a/arch/arm64/configs/lubancat2_android11_defconfig b/arch/arm64/configs/lubancat2_android11_defconfig index 1d5b9a4d7583..9b0ba03345e1 100644 --- a/arch/arm64/configs/lubancat2_android11_defconfig +++ b/arch/arm64/configs/lubancat2_android11_defconfig @@ -352,8 +352,7 @@ CONFIG_VETH=y # CONFIG_NET_VENDOR_QLOGIC is not set # CONFIG_NET_VENDOR_QUALCOMM is not set # CONFIG_NET_VENDOR_RDC is not set -CONFIG_R8168=y -CONFIG_R8125=y +CONFIG_R8169=y # CONFIG_NET_VENDOR_RENESAS is not set # CONFIG_NET_VENDOR_ROCKER is not set # CONFIG_NET_VENDOR_SAMSUNG is not set diff --git a/arch/arm64/configs/lubancat2_defconfig b/arch/arm64/configs/lubancat2_defconfig index 6f5e93acbbdc..cb68ad181719 100644 --- a/arch/arm64/configs/lubancat2_defconfig +++ b/arch/arm64/configs/lubancat2_defconfig @@ -705,6 +705,7 @@ CONFIG_ROCKCHIP_RKNPU=y CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y +CONFIG_EXT4_ENCRYPTION=y CONFIG_XFS_FS=y # CONFIG_DNOTIFY is not set CONFIG_FUSE_FS=y