379 lines
		
	
	
		
			7.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			379 lines
		
	
	
		
			7.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 | |
| /*
 | |
|  * Copyright (c) 2024 Rockchip Electronics Co., Ltd.
 | |
|  *
 | |
|  */
 | |
| 
 | |
| #include <dt-bindings/usb/pd.h>
 | |
| #include "rk3576-evb.dtsi"
 | |
| #include "rk3576-rk806.dtsi"
 | |
| 
 | |
| / {
 | |
| 	vcc_1v8_s0: vcc-1v8-s0 {
 | |
| 		compatible = "regulator-fixed";
 | |
| 		regulator-name = "vcc_1v8_s0";
 | |
| 		regulator-boot-on;
 | |
| 		regulator-always-on;
 | |
| 		regulator-min-microvolt = <1800000>;
 | |
| 		regulator-max-microvolt = <1800000>;
 | |
| 		vin-supply = <&vcc_1v8_s3>;
 | |
| 	};
 | |
| 
 | |
| 	vcc_3v3_s0: vcc-3v3-s0 {
 | |
| 		compatible = "regulator-fixed";
 | |
| 		regulator-name = "vcc_3v3_s0";
 | |
| 		regulator-boot-on;
 | |
| 		regulator-always-on;
 | |
| 		regulator-min-microvolt = <3300000>;
 | |
| 		regulator-max-microvolt = <3300000>;
 | |
| 		vin-supply = <&vcc_3v3_s3>;
 | |
| 	};
 | |
| 
 | |
| 	vcc_ufs_s0: vcc-ufs-s0 {
 | |
| 		compatible = "regulator-fixed";
 | |
| 		regulator-name = "vcc_ufs_s0";
 | |
| 		regulator-boot-on;
 | |
| 		regulator-always-on;
 | |
| 		regulator-min-microvolt = <3300000>;
 | |
| 		regulator-max-microvolt = <3300000>;
 | |
| 		vin-supply = <&vcc_sys>;
 | |
| 	};
 | |
| 
 | |
| 	vcc1v8_ufs_vccq2_s0: vcc1v8-ufs-vccq2-s0 {
 | |
| 		compatible = "regulator-fixed";
 | |
| 		regulator-name = "vcc1v8_ufs_vccq2_s0";
 | |
| 		regulator-boot-on;
 | |
| 		regulator-always-on;
 | |
| 		regulator-min-microvolt = <1800000>;
 | |
| 		regulator-max-microvolt = <1800000>;
 | |
| 		vin-supply = <&vcc_1v8_s3>;
 | |
| 	};
 | |
| 
 | |
| 	vcc1v2_ufs_vccq_s0: vcc1v2-ufs-vccq-s0 {
 | |
| 		compatible = "regulator-fixed";
 | |
| 		regulator-name = "vcc1v2_ufs_vccq_s0";
 | |
| 		regulator-boot-on;
 | |
| 		regulator-always-on;
 | |
| 		regulator-min-microvolt = <1200000>;
 | |
| 		regulator-max-microvolt = <1200000>;
 | |
| 		vin-supply = <&vcc_sys>;
 | |
| 	};
 | |
| 
 | |
| 	vcc3v3_lcd_n: vcc3v3-lcd0-n {
 | |
| 		compatible = "regulator-fixed";
 | |
| 		regulator-name = "vcc3v3_lcd0_n";
 | |
| 		regulator-boot-on;
 | |
| 		enable-active-high;
 | |
| 		gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
 | |
| 		vin-supply = <&vcc_3v3_s0>;
 | |
| 	};
 | |
| 
 | |
| 	vcc5v0_host: vcc5v0-host {
 | |
| 		compatible = "regulator-fixed";
 | |
| 		regulator-name = "vcc5v0_host";
 | |
| 		regulator-boot-on;
 | |
| 		regulator-always-on;
 | |
| 		regulator-min-microvolt = <5000000>;
 | |
| 		regulator-max-microvolt = <5000000>;
 | |
| 		enable-active-high;
 | |
| 		gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
 | |
| 		vin-supply = <&vcc5v0_device>;
 | |
| 		pinctrl-names = "default";
 | |
| 		pinctrl-0 = <&usb_host_pwren>;
 | |
| 	};
 | |
| 
 | |
| 	vbus5v0_typec: vbus5v0-typec {
 | |
| 		compatible = "regulator-fixed";
 | |
| 		regulator-name = "vbus5v0_typec";
 | |
| 		regulator-min-microvolt = <5000000>;
 | |
| 		regulator-max-microvolt = <5000000>;
 | |
| 		enable-active-high;
 | |
| 		gpio = <&gpio0 RK_PD1 GPIO_ACTIVE_HIGH>;
 | |
| 		vin-supply = <&vcc5v0_device>;
 | |
| 		pinctrl-names = "default";
 | |
| 		pinctrl-0 = <&usb_otg0_pwren>;
 | |
| 	};
 | |
| 
 | |
| 	vcc_mipicsi0: vcc-mipicsi0-regulator {
 | |
| 		compatible = "regulator-fixed";
 | |
| 		gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
 | |
| 		pinctrl-names = "default";
 | |
| 		pinctrl-0 = <&mipicsi0_pwr>;
 | |
| 		regulator-name = "vcc_mipicsi0";
 | |
| 		enable-active-high;
 | |
| 	};
 | |
| 
 | |
| 	vcc_mipicsi1: vcc-mipicsi1-regulator {
 | |
| 		compatible = "regulator-fixed";
 | |
| 		gpio = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
 | |
| 		pinctrl-names = "default";
 | |
| 		pinctrl-0 = <&mipicsi1_pwr>;
 | |
| 		regulator-name = "vcc_mipicsi1";
 | |
| 		enable-active-high;
 | |
| 	};
 | |
| 
 | |
| 	vcc_mipidcphy0: vcc-mipidcphy0-regulator {
 | |
| 		compatible = "regulator-fixed";
 | |
| 		gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
 | |
| 		pinctrl-names = "default";
 | |
| 		pinctrl-0 = <&mipidcphy0_pwr>;
 | |
| 		regulator-name = "vcc_mipidcphy0";
 | |
| 		enable-active-high;
 | |
| 	};
 | |
| };
 | |
| 
 | |
| &combphy0_ps {
 | |
| 	status = "okay";
 | |
| };
 | |
| 
 | |
| &combphy1_psu {
 | |
| 	status = "okay";
 | |
| };
 | |
| 
 | |
| &dp {
 | |
| 	status = "okay";
 | |
| };
 | |
| 
 | |
| &dp0 {
 | |
| 	status = "okay";
 | |
| };
 | |
| 
 | |
| &dp0_in_vp2 {
 | |
| 	status = "okay";
 | |
| };
 | |
| 
 | |
| &dp0_sound {
 | |
| 	status = "okay";
 | |
| };
 | |
| 
 | |
| /*
 | |
|  * mipidcphy0 needs to be enabled
 | |
|  * when dsi is enabled
 | |
|  */
 | |
| &dsi {
 | |
| 	status = "okay";
 | |
| };
 | |
| 
 | |
| &dsi_panel {
 | |
| 	power-supply = <&vcc3v3_lcd_n>;
 | |
| };
 | |
| 
 | |
| >1x {
 | |
| 	status = "okay";
 | |
| 	power-supply = <&vcc3v3_lcd_n>;
 | |
| };
 | |
| 
 | |
| &i2c2 {
 | |
| 	status = "okay";
 | |
| 
 | |
| 	usbc0: husb311@4e {
 | |
| 		compatible = "hynetek,husb311";
 | |
| 		reg = <0x4e>;
 | |
| 		interrupt-parent = <&gpio0>;
 | |
| 		interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
 | |
| 		pinctrl-names = "default";
 | |
| 		pinctrl-0 = <&usbc0_int>;
 | |
| 		vbus-supply = <&vbus5v0_typec>;
 | |
| 		status = "okay";
 | |
| 
 | |
| 		port {
 | |
| 			usbc0_role_sw: endpoint {
 | |
| 				remote-endpoint = <&usb_drd0_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 =
 | |
| 				<PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
 | |
| 			source-pdos =
 | |
| 				<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
 | |
| 
 | |
| 			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_phy_orientation_switch>;
 | |
| 					};
 | |
| 				};
 | |
| 
 | |
| 				port@1 {
 | |
| 					reg = <1>;
 | |
| 					dp_altmode_mux: endpoint {
 | |
| 						remote-endpoint = <&usbdp_phy_dp_altmode_mux>;
 | |
| 					};
 | |
| 				};
 | |
| 			};
 | |
| 		};
 | |
| 	};
 | |
| };
 | |
| 
 | |
| &i2c7 {
 | |
| 	status = "okay";
 | |
| 	pinctrl-names = "default";
 | |
| 	pinctrl-0 = <&i2c7m1_xfer>;
 | |
| 
 | |
| 
 | |
| 	icm42607_acc: icm_acc@68 {
 | |
| 		status = "okay";
 | |
| 		compatible = "icm42607_acc";
 | |
| 		reg = <0x68>;
 | |
| 		irq-gpio = <&gpio1 RK_PD5 IRQ_TYPE_EDGE_RISING>;
 | |
| 		irq_enable = <0>;
 | |
| 		poll_delay_ms = <30>;
 | |
| 		type = <SENSOR_TYPE_ACCEL>;
 | |
| 		layout = <4>;
 | |
| 	};
 | |
| 
 | |
| 	icm42607_gyro: icm_gyro@68 {
 | |
| 		status = "okay";
 | |
| 		compatible = "icm42607_gyro";
 | |
| 		reg = <0x68>;
 | |
| 		poll_delay_ms = <30>;
 | |
| 		type = <SENSOR_TYPE_GYROSCOPE>;
 | |
| 		layout = <4>;
 | |
| 	};
 | |
| };
 | |
| 
 | |
| &mipidcphy0 {
 | |
| 	status = "okay";
 | |
| };
 | |
| 
 | |
| &pdm1 {
 | |
| 	status = "disabled";
 | |
| 	pinctrl-names = "default", "idle", "clk";
 | |
| 	pinctrl-0 = <&pdm1m1_sdi0
 | |
| 		     &pdm1m1_sdi1
 | |
| 		     &pdm1m1_sdi2
 | |
| 		     &pdm1m1_sdi3>;
 | |
| 	pinctrl-1 = <&pdm1m1_clk0_idle
 | |
| 		     &pdm1m1_clk1_idle>;
 | |
| 	pinctrl-2 = <&pdm1m1_clk0
 | |
| 		     &pdm1m1_clk1>;
 | |
| };
 | |
| 
 | |
| &pinctrl {
 | |
| 	cam {
 | |
| 		mipicsi0_pwr: mipicsi0-pwr {
 | |
| 			rockchip,pins =
 | |
| 				/* camera power en */
 | |
| 				<3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
 | |
| 		};
 | |
| 
 | |
| 		mipicsi1_pwr: mipicsi1-pwr {
 | |
| 			rockchip,pins =
 | |
| 				/* camera power en */
 | |
| 				<3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
 | |
| 		};
 | |
| 
 | |
| 		mipidcphy0_pwr: mipidcphy0-pwr {
 | |
| 			rockchip,pins =
 | |
| 				/* camera power en */
 | |
| 				<3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
 | |
| 		};
 | |
| 	};
 | |
| 
 | |
| 	usb {
 | |
| 		usb_host_pwren: usb-host-pwren {
 | |
| 			rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
 | |
| 		};
 | |
| 
 | |
| 		usb_otg0_pwren: usb-otg0-pwren {
 | |
| 			rockchip,pins = <0 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
 | |
| 		};
 | |
| 
 | |
| 		usbc0_int: usbc0-int {
 | |
| 			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
 | |
| 		};
 | |
| 	};
 | |
| };
 | |
| 
 | |
| &sai1 {
 | |
| 	status = "okay";
 | |
| 	pinctrl-names = "default";
 | |
| 	pinctrl-0 = <&sai1m0_lrck
 | |
| 		     &sai1m0_sclk
 | |
| 		     &sai1m0_sdi0
 | |
| 		     &sai1m0_sdo0>;
 | |
| };
 | |
| 
 | |
| &ufs {
 | |
| 	status = "okay";
 | |
| };
 | |
| 
 | |
| &u2phy0_otg {
 | |
| 	rockchip,typec-vbus-det;
 | |
| };
 | |
| 
 | |
| &u2phy1_otg {
 | |
| 	phy-supply = <&vcc5v0_host>;
 | |
| };
 | |
| 
 | |
| &usbdp_phy {
 | |
| 	orientation-switch;
 | |
| 	svid = <0xff01>;
 | |
| 	sbu1-dc-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
 | |
| 	sbu2-dc-gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_HIGH>;
 | |
| 
 | |
| 	port {
 | |
| 		#address-cells = <1>;
 | |
| 		#size-cells = <0>;
 | |
| 
 | |
| 		usbdp_phy_orientation_switch: endpoint@0 {
 | |
| 			reg = <0>;
 | |
| 			remote-endpoint = <&usbc0_orien_sw>;
 | |
| 		};
 | |
| 
 | |
| 		usbdp_phy_dp_altmode_mux: endpoint@1 {
 | |
| 			reg = <1>;
 | |
| 			remote-endpoint = <&dp_altmode_mux>;
 | |
| 		};
 | |
| 	};
 | |
| };
 | |
| 
 | |
| &usb_drd0_dwc3 {
 | |
| 	dr_mode = "otg";
 | |
| 	usb-role-switch;
 | |
| 	port {
 | |
| 		usb_drd0_role_switch: endpoint {
 | |
| 			remote-endpoint = <&usbc0_role_sw>;
 | |
| 		};
 | |
| 	};
 | |
| };
 | |
| 
 | |
| &usb_drd1_dwc3 {
 | |
| 	dr_mode = "host";
 | |
| 	status = "okay";
 | |
| };
 | |
| 
 | |
| &vp0 {
 | |
| 	status = "okay";
 | |
| };
 | |
| 
 | |
| &wireless_bluetooth {
 | |
| 	status = "disabled";
 | |
| };
 | |
| 
 | |
| &wireless_wlan {
 | |
| 	status = "disabled";
 | |
| };
 |