From afcb78f1035da7ca93b2afc9305aab18e930c43d Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Thu, 5 Dec 2019 02:10:26 +0100 Subject: [PATCH] ipq806x: use new usb3 implementation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- .../arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 20 +----- .../arch/arm/boot/dts/qcom-ipq8064-ap161.dts | 20 +----- .../arch/arm/boot/dts/qcom-ipq8064-c2600.dts | 20 +----- .../arch/arm/boot/dts/qcom-ipq8064-d7800.dts | 20 +----- .../arch/arm/boot/dts/qcom-ipq8064-db149.dts | 20 +----- .../arch/arm/boot/dts/qcom-ipq8064-ea8500.dts | 20 +----- .../arch/arm/boot/dts/qcom-ipq8064-r7500.dts | 24 +------ .../arm/boot/dts/qcom-ipq8064-r7500v2.dts | 20 +----- .../arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi | 24 +++---- .../arm/boot/dts/qcom-ipq8064-vr2600v.dts | 20 +----- .../arm/boot/dts/qcom-ipq8064-wg2600hp.dts | 16 ----- .../arch/arm/boot/dts/qcom-ipq8064-wpq864.dts | 8 --- .../arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts | 16 ----- .../arch/arm/boot/dts/qcom-ipq8064.dtsi | 66 +++++++++---------- .../arm/boot/dts/qcom-ipq8065-nbg6817.dts | 20 +----- .../arch/arm/boot/dts/qcom-ipq8065-r7800.dts | 20 +----- 16 files changed, 64 insertions(+), 290 deletions(-) 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 381fcee5ea54..987731b04fbb 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 1dad12cfd639..edfa18d73a31 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 de80a11bdfe5..865e27ff7357 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 fc7aea0dca5d..9e5ff273a464 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 a873bf94f50c..5da523a72818 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 7fe45a87983c..8d6c981d1d38 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 975556756041..6c51d9507260 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 471e02c5f10e..7445d92f6138 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 8c522a897d42..dd272c7fc78d 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 2510ca1081bf..485a4b90e32d 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 e2a481723b18..f0c377aa305c 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 14258d594e72..e2c87f33e113 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 2f511e498ec0..12cfa3b0fc78 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 8387460d2714..54869de44fe8 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 954d3fe85322..6576d7415401 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 304f948296e7..82a4f348eddb 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>; -- 2.30.2