From: Christian Lamparter Date: Thu, 5 Dec 2019 01:10:26 +0000 (+0100) Subject: ipq806x: use new usb3 implementation X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=afcb78f1035da7ca93b2afc9305aab18e930c43d;p=openwrt%2Fstaging%2Fluka.git ipq806x: use new usb3 implementation Use new usb3 implementation and refresh dts to the new dwc3 structure Signed-off-by: Christian Lamparter Signed-off-by: Ansuel Smith [proper authorship of the patch] Signed-off-by: Petr Štetiar --- diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap148.dts index 381fcee5ea..987731b04f 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap148.dts @@ -137,27 +137,11 @@ status = "okay"; }; - phy@100f8800 { /* USB3 port 1 HS phy */ + usb3_0: usb3@110f8800 { status = "okay"; }; - phy@100f8830 { /* USB3 port 1 SS phy */ - status = "okay"; - }; - - phy@110f8800 { /* USB3 port 0 HS phy */ - status = "okay"; - }; - - phy@110f8830 { /* USB3 port 0 SS phy */ - status = "okay"; - }; - - usb30@0 { - status = "okay"; - }; - - usb30@1 { + usb3_1: usb3@100f8800 { status = "okay"; }; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap161.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap161.dts index 1dad12cfd6..edfa18d73a 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap161.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap161.dts @@ -140,27 +140,11 @@ status = "okay"; }; - phy@100f8800 { /* USB3 port 1 HS phy */ + usb3_0: usb3@110f8800 { status = "okay"; }; - phy@100f8830 { /* USB3 port 1 SS phy */ - status = "okay"; - }; - - phy@110f8800 { /* USB3 port 0 HS phy */ - status = "okay"; - }; - - phy@110f8830 { /* USB3 port 0 SS phy */ - status = "okay"; - }; - - usb30@0 { - status = "okay"; - }; - - usb30@1 { + usb3_1: usb3@100f8800 { status = "okay"; }; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-c2600.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-c2600.dts index de80a11bdf..865e27ff73 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-c2600.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-c2600.dts @@ -315,30 +315,14 @@ }; }; - phy@100f8800 { /* USB3 port 1 HS phy */ - status = "okay"; - }; - - phy@100f8830 { /* USB3 port 1 SS phy */ - status = "okay"; - }; - - phy@110f8800 { /* USB3 port 0 HS phy */ - status = "okay"; - }; - - phy@110f8830 { /* USB3 port 0 SS phy */ - status = "okay"; - }; - - usb30@0 { + usb3_0: usb3@110f8800 { status = "okay"; pinctrl-0 = <&usb0_pwr_en_pin>; pinctrl-names = "default"; }; - usb30@1 { + usb3_1: usb3@100f8800 { status = "okay"; pinctrl-0 = <&usb1_pwr_en_pin>; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-d7800.dts index fc7aea0dca..9e5ff273a4 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-d7800.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-d7800.dts @@ -152,30 +152,14 @@ status = "okay"; }; - phy@100f8800 { /* USB3 port 1 HS phy */ - status = "okay"; - }; - - phy@100f8830 { /* USB3 port 1 SS phy */ - status = "okay"; - }; - - phy@110f8800 { /* USB3 port 0 HS phy */ - status = "okay"; - }; - - phy@110f8830 { /* USB3 port 0 SS phy */ - status = "okay"; - }; - - usb30@0 { + usb3_0: usb3@110f8800 { status = "okay"; pinctrl-0 = <&usb0_pwr_en_pins>; pinctrl-names = "default"; }; - usb30@1 { + usb3_1: usb3@100f8800 { status = "okay"; pinctrl-0 = <&usb1_pwr_en_pins>; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts index a873bf94f5..5da523a728 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts @@ -123,27 +123,11 @@ status = "okay"; }; - phy@100f8800 { /* USB3 port 1 HS phy */ + usb3_0: usb3@110f8800 { status = "okay"; }; - phy@100f8830 { /* USB3 port 1 SS phy */ - status = "okay"; - }; - - phy@110f8800 { /* USB3 port 0 HS phy */ - status = "okay"; - }; - - phy@110f8830 { /* USB3 port 0 SS phy */ - status = "okay"; - }; - - usb30@0 { - status = "okay"; - }; - - usb30@1 { + usb3_1: usb3@100f8800 { status = "okay"; }; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts index 7fe45a8798..8d6c981d1d 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts @@ -131,27 +131,11 @@ status = "okay"; }; - phy@100f8800 { /* USB3 port 1 HS phy */ + usb3_0: usb3@110f8800 { status = "okay"; }; - phy@100f8830 { /* USB3 port 1 SS phy */ - status = "okay"; - }; - - phy@110f8800 { /* USB3 port 0 HS phy */ - status = "okay"; - }; - - phy@110f8830 { /* USB3 port 0 SS phy */ - status = "okay"; - }; - - usb30@0 { - status = "okay"; - }; - - usb30@1 { + usb3_1: usb3@100f8800 { status = "okay"; }; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500.dts index 9755567560..6c51d95072 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500.dts @@ -132,32 +132,12 @@ status = "okay"; }; - phy@100f8800 { /* USB3 port 1 HS phy */ - clocks = <&gcc USB30_0_UTMI_CLK>; - status = "okay"; - }; - - phy@100f8830 { /* USB3 port 1 SS phy */ - clocks = <&gcc USB30_0_MASTER_CLK>; - status = "okay"; - }; - - phy@110f8800 { /* USB3 port 0 HS phy */ - clocks = <&gcc USB30_1_UTMI_CLK>; - status = "okay"; - }; - - phy@110f8830 { /* USB3 port 0 SS phy */ - clocks = <&gcc USB30_1_MASTER_CLK>; - status = "okay"; - }; - - usb30@0 { + usb3_0: usb3@110f8800 { clocks = <&gcc USB30_1_MASTER_CLK>; status = "okay"; }; - usb30@1 { + usb3_1: usb3@100f8800 { clocks = <&gcc USB30_0_MASTER_CLK>; status = "okay"; }; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts index 471e02c5f1..7445d92f61 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts @@ -156,30 +156,14 @@ status = "okay"; }; - phy@100f8800 { /* USB3 port 1 HS phy */ - status = "okay"; - }; - - phy@100f8830 { /* USB3 port 1 SS phy */ - status = "okay"; - }; - - phy@110f8800 { /* USB3 port 0 HS phy */ - status = "okay"; - }; - - phy@110f8830 { /* USB3 port 0 SS phy */ - status = "okay"; - }; - - usb30@0 { + usb3_0: usb3@110f8800 { status = "okay"; pinctrl-0 = <&usb0_pwr_en_pins>; pinctrl-names = "default"; }; - usb30@1 { + usb3_1: usb3@100f8800 { status = "okay"; pinctrl-0 = <&usb1_pwr_en_pins>; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi index 8c522a897d..dd272c7fc7 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi @@ -3,18 +3,6 @@ / { soc: soc { - ss_phy_0: phy@110f8830 { - rx_eq = <2>; - tx_deamp_3_5db = <32>; - mpll = <0xa0>; - }; - - ss_phy_1: phy@100f8830 { - rx_eq = <2>; - tx_deamp_3_5db = <32>; - mpll = <0xa0>; - }; - pcie0: pci@1b500000 { phy-tx0-term-offset = <0>; }; @@ -28,3 +16,15 @@ }; }; }; + +&ss_phy_0 { + rx_eq = <2>; + tx_deamp_3_5db = <32>; + mpll = <0xa0>; +}; + +&ss_phy_1 { + rx_eq = <2>; + tx_deamp_3_5db = <32>; + mpll = <0xa0>; +}; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts index 2510ca1081..485a4b90e3 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts @@ -233,27 +233,11 @@ }; }; - phy@100f8800 { /* USB3 port 1 HS phy */ + usb3_0: usb3@110f8800 { status = "okay"; }; - phy@100f8830 { /* USB3 port 1 SS phy */ - status = "okay"; - }; - - phy@110f8800 { /* USB3 port 0 HS phy */ - status = "okay"; - }; - - phy@110f8830 { /* USB3 port 0 SS phy */ - status = "okay"; - }; - - usb30@0 { - status = "okay"; - }; - - usb30@1 { + usb3_1: usb3@100f8800 { status = "okay"; }; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts index e2a481723b..f0c377aa30 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts @@ -321,22 +321,6 @@ }; }; -&hs_phy_0 { /* USB3 port 0 HS phy */ - status = "okay"; -}; - -&ss_phy_0 { /* USB3 port 0 SS phy */ - status = "okay"; -}; - -&hs_phy_1 { /* USB3 port 1 HS phy */ - status = "okay"; -}; - -&ss_phy_1 { /* USB3 port 1 SS phy */ - status = "okay"; -}; - &usb3_0 { status = "okay"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts index 14258d594e..e2c87f33e1 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts @@ -383,14 +383,6 @@ }; }; -&hs_phy_0 { /* USB3 port 0 HS phy */ - status = "okay"; -}; - -&hs_phy_1 { /* USB3 port 1 HS phy */ - status = "okay"; -}; - &ss_phy_0 { /* USB3 port 0 SS phy */ status = "okay"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts index 2f511e498e..12cfa3b0fc 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts @@ -369,22 +369,6 @@ }; }; -&hs_phy_0 { /* USB3 port 0 HS phy */ - status = "okay"; -}; - -&ss_phy_0 { /* USB3 port 0 SS phy */ - status = "okay"; -}; - -&hs_phy_1 { /* USB3 port 1 HS phy */ - status = "okay"; -}; - -&ss_phy_1 { /* USB3 port 1 SS phy */ - status = "okay"; -}; - &usb3_0 { status = "okay"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi index 8387460d27..54869de44f 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -920,64 +920,41 @@ reg = <0x01200600 0x100>; }; - hs_phy_1: phy@100f8800 { + hs_phy_0: hs_phy_0 { compatible = "qcom,dwc3-hs-usb-phy"; - reg = <0x100f8800 0x30>; - clocks = <&gcc USB30_1_UTMI_CLK>; - clock-names = "ref"; - #phy-cells = <0>; - - status = "disabled"; - }; - - ss_phy_1: phy@100f8830 { - compatible = "qcom,dwc3-ss-usb-phy"; - reg = <0x100f8830 0x30>; - clocks = <&gcc USB30_1_MASTER_CLK>; - clock-names = "ref"; - #phy-cells = <0>; - - status = "disabled"; - }; - - hs_phy_0: phy@110f8800 { - compatible = "qcom,dwc3-hs-usb-phy"; - reg = <0x110f8800 0x30>; + regmap = <&usb3_0>; clocks = <&gcc USB30_0_UTMI_CLK>; clock-names = "ref"; #phy-cells = <0>; - - status = "disabled"; }; - ss_phy_0: phy@110f8830 { + ss_phy_0: ss_phy_0 { compatible = "qcom,dwc3-ss-usb-phy"; - reg = <0x110f8830 0x30>; + regmap = <&usb3_0>; clocks = <&gcc USB30_0_MASTER_CLK>; clock-names = "ref"; #phy-cells = <0>; - - status = "disabled"; }; - usb3_0: usb30@0 { - compatible = "qcom,dwc3"; + usb3_0: usb3@110f8800 { + compatible = "qcom,dwc3", "syscon"; #address-cells = <1>; #size-cells = <1>; + reg = <0x110f8800 0x8000>; clocks = <&gcc USB30_0_MASTER_CLK>; clock-names = "core"; ranges; resets = <&gcc USB30_0_MASTER_RESET>; - reset-names = "usb30_0_mstr_rst"; + reset-names = "master"; status = "disabled"; dwc3_0: dwc3@11000000 { compatible = "snps,dwc3"; reg = <0x11000000 0xcd00>; - interrupts = <0 110 0x4>; + interrupts = ; phys = <&hs_phy_0>, <&ss_phy_0>; phy-names = "usb2-phy", "usb3-phy"; dr_mode = "host"; @@ -985,24 +962,41 @@ }; }; - usb3_1: usb30@1 { - compatible = "qcom,dwc3"; + hs_phy_1: hs_phy_1 { + compatible = "qcom,dwc3-hs-usb-phy"; + regmap = <&usb3_1>; + clocks = <&gcc USB30_1_UTMI_CLK>; + clock-names = "ref"; + #phy-cells = <0>; + }; + + ss_phy_1: ss_phy_1 { + compatible = "qcom,dwc3-ss-usb-phy"; + regmap = <&usb3_1>; + clocks = <&gcc USB30_1_MASTER_CLK>; + clock-names = "ref"; + #phy-cells = <0>; + }; + + usb3_1: usb3@100f8800 { + compatible = "qcom,dwc3", "syscon"; #address-cells = <1>; #size-cells = <1>; + reg = <0x100f8800 0x8000>; clocks = <&gcc USB30_1_MASTER_CLK>; clock-names = "core"; ranges; resets = <&gcc USB30_1_MASTER_RESET>; - reset-names = "usb30_1_mstr_rst"; + reset-names = "master"; status = "disabled"; dwc3_1: dwc3@10000000 { compatible = "snps,dwc3"; reg = <0x10000000 0xcd00>; - interrupts = <0 205 0x4>; + interrupts = ; phys = <&hs_phy_1>, <&ss_phy_1>; phy-names = "usb2-phy", "usb3-phy"; dr_mode = "host"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts index 954d3fe853..6576d74154 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts @@ -189,30 +189,14 @@ }; }; - phy@100f8800 { /* USB3 port 1 HS phy */ - status = "okay"; - }; - - phy@100f8830 { /* USB3 port 1 SS phy */ - status = "okay"; - }; - - phy@110f8800 { /* USB3 port 0 HS phy */ - status = "okay"; - }; - - phy@110f8830 { /* USB3 port 0 SS phy */ - status = "okay"; - }; - - usb30@0 { + usb3_0: usb3@110f8800 { status = "okay"; pinctrl-0 = <&usb0_pwr_en_pins>; pinctrl-names = "default"; }; - usb30@1 { + usb3_1: usb3@100f8800 { status = "okay"; pinctrl-0 = <&usb1_pwr_en_pins>; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-r7800.dts index 304f948296..82a4f348ed 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-r7800.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-r7800.dts @@ -225,30 +225,14 @@ status = "okay"; }; - phy@100f8800 { /* USB3 port 1 HS phy */ - status = "okay"; - }; - - phy@100f8830 { /* USB3 port 1 SS phy */ - status = "okay"; - }; - - phy@110f8800 { /* USB3 port 0 HS phy */ - status = "okay"; - }; - - phy@110f8830 { /* USB3 port 0 SS phy */ - status = "okay"; - }; - - usb30@0 { + usb3_0: usb3@110f8800 { status = "okay"; pinctrl-0 = <&usb0_pwr_en_pins>; pinctrl-names = "default"; }; - usb30@1 { + usb3_1: usb3@100f8800 { status = "okay"; pinctrl-0 = <&usb1_pwr_en_pins>;