From e3e12f52b214121840b44c91de5b3e5af5d3eb84 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 06 Nov 2023 03:04:41 +0000
Subject: [PATCH] rk3568 rt init

---
 kernel/arch/arm64/boot/dts/rockchip/rk3566-evb1-ddr4-v10.dtsi |   76 ++++++++++++++++++++++++++-----------
 1 files changed, 53 insertions(+), 23 deletions(-)

diff --git a/kernel/arch/arm64/boot/dts/rockchip/rk3566-evb1-ddr4-v10.dtsi b/kernel/arch/arm64/boot/dts/rockchip/rk3566-evb1-ddr4-v10.dtsi
index 92ea490..037cb76 100644
--- a/kernel/arch/arm64/boot/dts/rockchip/rk3566-evb1-ddr4-v10.dtsi
+++ b/kernel/arch/arm64/boot/dts/rockchip/rk3566-evb1-ddr4-v10.dtsi
@@ -25,13 +25,6 @@
 		vin-supply = <&dc_12v>;
 	};
 
-	rk_headset: rk-headset {
-		compatible = "rockchip_headset";
-		headset_gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&hp_det>;
-	};
-
 	vcc3v3_vga: vcc3v3-vga {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc3v3_vga";
@@ -54,6 +47,13 @@
 	};
 };
 
+&bt_sound {
+	status = "disabled";
+	simple-audio-card,cpu {
+		sound-dai = <&i2s2_2ch>;
+	};
+};
+
 &audiopwmout_diff {
 	status = "disabled";
 };
@@ -67,11 +67,11 @@
 };
 
 &csi2_dphy_hw {
-	status = "okay";
+	status = "disabled";
 };
 
 &csi2_dphy1 {
-	status = "okay";
+	status = "disabled";
 
 	/*
 	 * dphy1 only used for split mode,
@@ -108,7 +108,7 @@
 };
 
 &csi2_dphy2 {
-	status = "okay";
+	status = "disabled";
 
 	/*
 	 * dphy2 only used for split mode,
@@ -160,7 +160,7 @@
  * when dsi0 is enabled
  */
 &dsi0 {
-	status = "okay";
+	status = "disabled";
 };
 
 &dsi0_in_vp0 {
@@ -168,7 +168,7 @@
 };
 
 &dsi0_in_vp1 {
-	status = "okay";
+	status = "disabled";
 };
 
 &dsi0_panel {
@@ -216,6 +216,33 @@
 
 &edp_in_vp1 {
 	status = "disabled";
+};
+
+&gmac1 {
+	phy-mode = "rgmii";
+	clock_in_out = "output";
+
+	snps,reset-gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
+	snps,reset-active-low;
+	/* Reset time is 20ms, 100ms for rtl8211f */
+	snps,reset-delays-us = <0 20000 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>;
+
+	tx_delay = <0x4f>;
+	rx_delay = <0x26>;
+
+	phy-handle = <&rgmii_phy1>;
+	status = "okay";
 };
 
 /*
@@ -280,6 +307,12 @@
 	};
 };
 
+&i2s2_2ch {
+	pinctrl-0 = <&i2s2m1_sclktx &i2s2m1_lrcktx &i2s2m1_sdi &i2s2m1_sdo>;
+	rockchip,bclk-fs = <32>;
+	status = "disabled";
+};
+
 &i2s3_2ch {
 	status = "disabled";
 };
@@ -318,7 +351,7 @@
 };
 
 &video_phy0 {
-	status = "okay";
+	status = "disabled";
 };
 
 &video_phy1 {
@@ -368,15 +401,15 @@
 };
 
 &rkisp {
-	status = "okay";
+	status = "disabled";
 };
 
 &rkisp_mmu {
-	status = "okay";
+	status = "disabled";
 };
 
 &rkisp_vir0 {
-	status = "okay";
+	status = "disabled";
 
 	port {
 		#address-cells = <1>;
@@ -390,7 +423,7 @@
 };
 
 &route_dsi0 {
-	status = "okay";
+	status = "disabled";
 	connect = <&vp1_out_dsi0>;
 };
 
@@ -443,6 +476,9 @@
 	WIFI,host_wake_irq = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
 };
 
+&work_led {
+	gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
+};
 
 &pinctrl {
 	cam {
@@ -450,12 +486,6 @@
 			rockchip,pins =
 				/* camera power en */
 				<0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-
-	headphone {
-		hp_det: hp-det {
-			rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_down>;
 		};
 	};
 

--
Gitblit v1.6.2