Skip to content

Commit

Permalink
fix dg -dn-3568 usb2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wxzmz committed Dec 26, 2024
1 parent e59b2b9 commit 2cb0bfe
Show file tree
Hide file tree
Showing 2 changed files with 652 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,326 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Doe <[email protected]>
Date: Thu, 26 Dec 2024 11:47:07 +0800
Subject: Patching kernel rk35xx files
arch/arm64/boot/dts/rockchip/rk3568-dg-tn3568.dts

Signed-off-by: John Doe <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3568-dg-tn3568.dts | 86 +++++-----
1 file changed, 43 insertions(+), 43 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-dg-tn3568.dts b/arch/arm64/boot/dts/rockchip/rk3568-dg-tn3568.dts
index 182ece87f5ba..a02cf095a8f4 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-dg-tn3568.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-dg-tn3568.dts
@@ -25,11 +25,10 @@ / {

chosen: chosen {
bootargs = "earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0";
};

-
dc_12v: dc-12v {
compatible = "regulator-fixed";
regulator-name = "dc_12v";
regulator-always-on;
regulator-boot-on;
@@ -68,19 +67,10 @@ vcc5v0_host: vcc5v0-host-regulator {

vin-supply = <&vcc5v0_sys>;

};

- vbus: vbus-regulator {
- compatible = "regulator-fixed";
- regulator-name = "vbus";
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- };
-
test-power {
status = "okay";
};

leds {
@@ -225,18 +215,28 @@ regulator-state-mem {

rk809: pmic@20 {
compatible = "rockchip,rk809";
reg = <0x20>;
interrupt-parent = <&gpio0>;
- interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
- #clock-cells = <1>;
- #sound-dai-cells = <0>;
- clock-output-names = "rk808-clkout1", "rk808-clkout2";
- pinctrl-names = "default";
- pinctrl-0 = <&pmic_int_l>;
+ 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>;
@@ -297,11 +297,11 @@ vdd_gpu: DCDC_REG2 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
regulator-init-microvolt = <900000>;
regulator-ramp-delay = <6001>;
regulator-initial-mode = <0x2>;
- regulator-state-mem {
+ regulator-state-mem {
regulator-off-in-suspend;
};
};

vcc_ddr: DCDC_REG3 {
@@ -318,10 +318,11 @@ 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;
};
@@ -376,11 +377,10 @@ vccio_sd: LDO_REG5 {
regulator-name = "vccio_sd";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
-
regulator-state-mem {
regulator-off-in-suspend;
};
};

@@ -388,11 +388,10 @@ vcc3v3_pmu: LDO_REG6 {
regulator-name = "vcc3v3_pmu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
-
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <3300000>;
};
};
@@ -401,11 +400,10 @@ vcca_1v8: LDO_REG7 {
regulator-name = "vcca_1v8";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
-
regulator-state-mem {
regulator-off-in-suspend;
};
};

@@ -413,22 +411,22 @@ vcca1v8_pmu: LDO_REG8 {
regulator-name = "vcca1v8_pmu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
-
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};

vcca1v8_image: LDO_REG9 {
regulator-name = "vcca1v8_image";
+ regulator-always-on;
+ regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
-
regulator-state-mem {
regulator-off-in-suspend;
};
};

@@ -445,21 +443,19 @@ regulator-state-mem {

vcc_3v3: SWITCH_REG1 {
regulator-name = "vcc_3v3";
regulator-always-on;
regulator-boot-on;
-
regulator-state-mem {
regulator-off-in-suspend;
};
};

vcc3v3_sd: SWITCH_REG2 {
regulator-name = "vcc3v3_sd";
regulator-always-on;
regulator-boot-on;
-
regulator-state-mem {
regulator-off-in-suspend;
};
};
};
@@ -539,24 +535,19 @@ &gmac0_rgmii_clk
rx_delay = <0x2a>;

phy-handle = <&rgmii_phy0>;
phy-supply = <&vcc_3v3>;
status = "okay";
-};
+};

/*
// 对应lede usb2phy0_otg
&u2phy0_otg {
vbus-supply = <&vcc5v0_host>;
status = "disabled";
};

-// lede usb2phy1_otg
-&u2phy1_otg {
- status = "okay";
-};
-
&usb_host0_ehci {
status = "okay";
};

&usb_host0_ohci {
@@ -568,10 +559,11 @@ &usb_host1_ehci {
};

&usb_host1_ohci {
status = "okay";
};
+*/

//USB3.0 OTG PHY 对应主线combphy0
&combphy0_us {
status = "okay";
phy-supply = <&vcc5v0_host>;
@@ -584,11 +576,10 @@ &usbdrd30 {

//主线无
&usbhost30 {
status = "okay";
};
-*/

/*USB3.0 controller 对应主线 usb_host0_xhci */
&usbdrd_dwc3 {
dr_mode = "host";
status = "okay";
@@ -603,12 +594,12 @@ &u2phy0_host {
phy-supply = <&vcc5v0_host>;
status = "okay";
};

/*USB 3.0 HOST 与 SATA1 复用 对应主线 usb_host1_xhci */
-&usbhost_dwc3 {
- status = "okay";
+&usbhost_dwc3 {
+ status = "okay";
};

&usb2phy1 {
vbus-supply = <&vcc5v0_host>;
status = "okay";
@@ -620,25 +611,33 @@ &u2phy1_host {
status = "okay";
};

/* 对应主线 usb2phy1_host */
&u2phy1_otg {
- //dg-r phy-supply = <&vcc5v0_host>;
status = "okay";
};

-/* USB 3.0 HOST 与 SATA1 复用 对应主线 usb_host1_xhci */
-&usbhost_dwc3 {
- 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>;
+ };

- pmic {
- pmic_int_l: pmic-int-l {
- rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+ soc_slppin_slp: soc_slppin_slp {
+ rockchip,pins =
+ <0 RK_PA2 1 &pcfg_pull_none>;
+ };
+
+ soc_slppin_rst: soc_slppin_rst {
+ rockchip,pins =
+ <0 RK_PA2 2 &pcfg_pull_none>;
};
};

leds {
led_eth_y_h: led_eth_y_h {
@@ -655,10 +654,11 @@ led_sys_h: led_sys_h {

led_on_board_h: led_on_board_h {
rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
+
};

&pmu_io_domains {
pmuio1-supply = <&vcc3v3_pmu>;
pmuio2-supply = <&vcc3v3_pmu>;
@@ -667,11 +667,11 @@ &pmu_io_domains {
vccio3-supply = <&vccio_sd>;
vccio4-supply = <&vcc_1v8>;
vccio5-supply = <&vcc_3v3>;
vccio6-supply = <&vcc_1v8>;
vccio7-supply = <&vcc_3v3>;
- status = "okay";
+ status = "okay";
};

&rk_rga {
status = "okay";
};
--
Created with Armbian build tools https://github.com/armbian/build

Loading

0 comments on commit 2cb0bfe

Please sign in to comment.