From 4c74f722fec13a6843ba0320a8340ee1ea18f2d3 Mon Sep 17 00:00:00 2001 From: Huang zhibao Date: Sat, 5 Mar 2022 15:58:23 +0800 Subject: [PATCH] arm64: dts: rockchip: rk3588-nvr: add dts for nvr demo1 v21 board Signed-off-by: Huang zhibao Change-Id: I81a0ca8eb1a118a8a1425a978983f8cf41e9730a --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../dts/rockchip/rk3588-nvr-demo1-v21.dts | 15 ++ .../dts/rockchip/rk3588-nvr-demo1-v21.dtsi | 204 ++++++++++++++++++ 3 files changed, 220 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-nvr-demo1-v21.dts create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-nvr-demo1-v21.dtsi diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 019049ee0ba5..a078f58283ae 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -109,6 +109,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb6-lp4-v10-linux.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-nvr-demo-v10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-nvr-demo-v10-android.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-nvr-demo-v10-spi-nand.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-nvr-demo1-v21.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-toybrick-x0-android.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-toybrick-x0-linux.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-evb1-lp4x-v10.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nvr-demo1-v21.dts b/arch/arm64/boot/dts/rockchip/rk3588-nvr-demo1-v21.dts new file mode 100644 index 000000000000..76826eba2892 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3588-nvr-demo1-v21.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2021 Rockchip Electronics Co., Ltd. + * + */ + +/dts-v1/; + +#include "rk3588-nvr-demo1-v21.dtsi" +#include "rk3588-linux.dtsi" + +/ { + model = "Rockchip RK3588 NVR DEMO1 LP4 V21 Board"; + compatible = "rockchip,rk3588-nvr-demo1-v21", "rockchip,rk3588"; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nvr-demo1-v21.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nvr-demo1-v21.dtsi new file mode 100644 index 000000000000..4df6a5269ef8 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3588-nvr-demo1-v21.dtsi @@ -0,0 +1,204 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2021 Rockchip Electronics Co., Ltd. + * + */ +#include "dt-bindings/usb/pd.h" +#include "rk3588-nvr-demo.dtsi" + + +/ { + ite_pwr_en: ite-pwr-en { + compatible = "regulator-fixed"; + regulator-name = "ITE-PWR_EN"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-boot-on; + regulator-always-on; + enable-active-high; + gpio = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>; + }; +}; + +&dp0 { + /delete-property/ pinctrl-0; + /delete-property/ pinctrl-names; + status = "okay"; +}; + +&dp1 { + pinctrl-0 = <&dp1m2_pins &dp1_hdmi_reset>; + pinctrl-names = "default"; + status = "okay"; +}; + +&dsi1 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + dsi1_out_panel: endpoint { + remote-endpoint = <&panel_in_dsi1>; + }; + }; + }; +}; + +&dsi1_in_vp2 { + status = "okay"; +}; + +&dsi1_in_vp3 { + status = "okay"; +}; + +&i2c6 { + status = "okay"; + + it6161: it6161@6c { + status = "okay"; + compatible = "ite,it6161"; + #sound-dai-cells = <0>; + reg = <0x6c>; + it6161-addr-hdmi-tx = <0x4C>; + it6161-addr-cec = <0x4E>; + interrupt-parent = <&gpio0>; + interrupts = ; + enable-gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + panel_in_dsi1: endpoint { + remote-endpoint = <&dsi1_out_panel>; + }; + }; + }; + }; + + usbc0: fusb302@22 { + compatible = "fcs,fusb302"; + reg = <0x22>; + interrupt-parent = <&gpio1>; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&usbc0_int>; + vbus-supply = <&vcc5v0_otg>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usbc0_role_sw: endpoint@0 { + remote-endpoint = <&dwc3_0_role_switch>; + }; + }; + }; + + usb_con: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + data-role = "dual"; + power-role = "dual"; + try-power-role = "sink"; + op-sink-microwatt = <1000000>; + sink-pdos = + ; + source-pdos = + ; + + altmodes { + #address-cells = <1>; + #size-cells = <0>; + + altmode@0 { + reg = <0>; + svid = <0xff01>; + vdo = <0xffffffff>; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usbc0_orien_sw: endpoint { + remote-endpoint = <&usbdp_phy0_orientation_switch>; + }; + }; + + port@1 { + reg = <1>; + dp_altmode_mux: endpoint { + remote-endpoint = <&usbdp_phy0_dp_altmode_mux>; + }; + }; + }; + }; + }; +}; + +&mipi_dcphy1 { + status = "okay"; +}; + +&usbdp_phy0 { + status = "okay"; + rockchip,dp-lane-mux = < 0 1 2 3 >; + orientation-switch; + svid = <0xff01>; + sbu1-dc-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; + sbu2-dc-gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>; + + port { + #address-cells = <1>; + #size-cells = <0>; + usbdp_phy0_orientation_switch: endpoint@0 { + reg = <0>; + remote-endpoint = <&usbc0_orien_sw>; + }; + + usbdp_phy0_dp_altmode_mux: endpoint@1 { + reg = <1>; + remote-endpoint = <&dp_altmode_mux>; + }; + }; +}; + +&usbdrd_dwc3_0 { + dr_mode = "otg"; + usb-role-switch; + port { + #address-cells = <1>; + #size-cells = <0>; + dwc3_0_role_switch: endpoint@0 { + reg = <0>; + remote-endpoint = <&usbc0_role_sw>; + }; + }; +}; + +&pinctrl { + dp { + dp1_hdmi_reset: dp-hdmi-reset { + rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + usb-typec { + usbc0_int: usbc0-int { + rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +};