Skip to contentSkip to conversation

dts: imx8qxp add cdns usb3 port

PATCH Superseded Frank Li 2 participants 15 messages Mar 21, 2023 – Mar 23, 2023

Subsystems (3)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Frank Li

author maintainer
#0 lore raw

v3 cover dts: imx8qxp add cdns usb3 port

cdns driver code already upstreamed. but missed dts part.

Change from v2 to v3:
1. drop fixed frequency clock binding

Change from v1 to v2:
1. Add binding docoument.
2. Fixed all shawn's comments

Frank Li (3):
dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings
arm64: dts: imx8qxp: add cadence usb3 support
arm64: dts: freescale: imx8qxp-mek: enable cadence usb3

 .../bindings/usb/fsl,imx8qm-cdns3.yaml        | 122 ++++++++++++++++++
 .../boot/dts/freescale/imx8-ss-conn.dtsi      |  72 +++++++++++
 arch/arm64/boot/dts/freescale/imx8qxp-mek.dts |  85 ++++++++++++
 3 files changed, 279 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH v3 1/3 dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

NXP imx8qm integrates 1 cdns3 IP. This is glue layer device bindings.

---
Change from v2 to v3
- Drop two fixed frequency clocks, it is system reset value, no need set now. If need, futher work/discuss on driver or dts change. It will not block this basic enablement work.
- Drop lable
- Drop some descriptions
- Reg as second property.

Change from v1 to v2.
- new add binding doc

 .../bindings/usb/fsl,imx8qm-cdns3.yaml        | 114 ++++++++++++++++++
 1 file changed, 114 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +112 -0
new file mode 100644
index 000000000000..d876e3dab608
@@ -0,0 +1,112 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2020 NXP
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/fsl,imx8qm-cdns3.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP iMX8QM Soc USB Controller
+
+maintainers:
+  - Frank Li <[email protected]>
+
+properties:
+  compatible:
+    const: fsl,imx8qm-usb3
+
+  reg:
+    items:
+      - description: Register set for iMX USB3 Platform Control
+
+  "#address-cells":
+    enum: [ 1, 2 ]
+
+  "#size-cells":
+    enum: [ 1, 2 ]
+
+  ranges: true
+
+  clocks:
+    items:
+      - description: Standby clock. Used during ultra low power states.
+      - description: USB bus clock for usb3 controller.
+      - description: AXI clock for AXI interface.
+      - description: ipg clock for register access.
+      - description: Core clock for usb3 controller.
+
+  clock-names:
+    items:
+      - const: usb3_lpm_clk
+      - const: usb3_bus_clk
+      - const: usb3_aclk
+      - const: usb3_ipg_clk
+      - const: usb3_core_pclk
+
+  assigned-clocks:
+    items:
+      - description: Phandle and clock specifoer of IMX_SC_PM_CLK_MST_BUS.
+
+  assigned-clock-rates:
+    items:
+      - description: Should be in Range 100 - 600 Mhz.
+
+  power-domains:
+    maxItems: 1
+
+# Required child node:
+
+patternProperties:
+  "^usb@[0-9a-f]+$":
+    $ref: cdns,usb3.yaml#
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+  - ranges
+  - clocks
+  - clock-names
+  - power-domains
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/imx8-lpcg.h>
+    #include <dt-bindings/firmware/imx/rsrc.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    usb@5b110000 {
+      compatible = "fsl,imx8qm-usb3";
+      reg = <0x5b110000 0x10000>;
+      ranges;
+      clocks = <&usb3_lpcg IMX_LPCG_CLK_1>,
+               <&usb3_lpcg IMX_LPCG_CLK_0>,
+               <&usb3_lpcg IMX_LPCG_CLK_7>,
+               <&usb3_lpcg IMX_LPCG_CLK_4>,
+               <&usb3_lpcg IMX_LPCG_CLK_5>;
+      clock-names = "usb3_lpm_clk", "usb3_bus_clk", "usb3_aclk",
+                    "usb3_ipg_clk", "usb3_core_pclk";
+      assigned-clocks = <&clk IMX_SC_R_USB_2 IMX_SC_PM_CLK_MST_BUS>;
+      assigned-clock-rates = <250000000>;
+      power-domains = <&pd IMX_SC_R_USB_2>;
+      #address-cells = <1>;
+      #size-cells = <1>;
+
+      usb@5b120000 {
+        compatible = "cdns,usb3";
+        reg = <0x5b120000 0x10000>,   /* memory area for OTG/DRD registers */
+              <0x5b130000 0x10000>,   /* memory area for HOST registers */
+              <0x5b140000 0x10000>;   /* memory area for DEVICE registers */
+        reg-names = "otg", "xhci", "dev";
+        interrupt-parent = <&gic>;
+        interrupts = <GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>;
+        interrupt-names = "host", "peripheral", "otg", "wakeup";
+        phys = <&usb3_phy>;
+        phy-names = "cdns3,usb3-phy";
+      };
+    };
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Quoted 3 lines · Frank Li

NXP imx8qm integrates 1 cdns3 IP. This is glue layer device bindings.

Subject is still not fixed.

Quoted 59 lines

---
Change from v2 to v3
- Drop two fixed frequency clocks, it is system reset value, no need set now. If need, futher work/discuss on driver or dts change. It will not block this basic enablement work.
- Drop lable
- Drop some descriptions
- Reg as second property.

Change from v1 to v2.
- new add binding doc

 .../bindings/usb/fsl,imx8qm-cdns3.yaml        | 114 ++++++++++++++++++
 1 file changed, 114 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +37 -0
new file mode 100644
index 000000000000..d876e3dab608
@@ -0,0 +1,112 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2020 NXP
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/fsl,imx8qm-cdns3.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP iMX8QM Soc USB Controller
+
+maintainers:
+  - Frank Li <[email protected]>
+
+properties:
+  compatible:
+    const: fsl,imx8qm-usb3
+
+  reg:
+    items:
+      - description: Register set for iMX USB3 Platform Control
+
+  "#address-cells":
+    enum: [ 1, 2 ]
+
+  "#size-cells":
+    enum: [ 1, 2 ]
+
+  ranges: true
+
+  clocks:
+    items:
+      - description: Standby clock. Used during ultra low power states.
+      - description: USB bus clock for usb3 controller.
+      - description: AXI clock for AXI interface.
+      - description: ipg clock for register access.
+      - description: Core clock for usb3 controller.
+
+  clock-names:

Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml line 47

Quoted 10 lines
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +10 -0
+    items:
+      - const: usb3_lpm_clk
+      - const: usb3_bus_clk
+      - const: usb3_aclk
+      - const: usb3_ipg_clk
+      - const: usb3_core_pclk
+
+  assigned-clocks:
+    items:
+      - description: Phandle and clock specifoer of IMX_SC_PM_CLK_MST_BUS.

Drop useless pieces so "Phandle and clock specifoer of " and name the hardware, not the syntax.

Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml line 51

Quoted 4 lines
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +4 -0
+
+  assigned-clock-rates:
+    items:
+      - description: Should be in Range 100 - 600 Mhz.

That's better but I still do not understand why do you need it in the bindings. You never actually answered this question.

Best regards,
Krzysztof

author maintainer
#3 lore raw

RE: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Quoted 18 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 2:32 AM
To: Frank Li <frank.li@nxp.

Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml

Quoted 7 lines
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +7 -0
+      - const: usb3_aclk
+      - const: usb3_ipg_clk
+      - const: usb3_core_pclk
+
+  assigned-clocks:
+    items:
+      - description: Phandle and clock specifoer of

IMX_SC_PM_CLK_MST_BUS.

Drop useless pieces so "Phandle and clock specifoer of " and name the hardware, not the syntax.

Quoted 7 lines

Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml line 51

Quoted 4 lines
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +4 -0
+
+  assigned-clock-rates:
+    items:
+      - description: Should be in Range 100 - 600 Mhz.

That's better but I still do not understand why do you need it in the bindings. You never actually answered this question.

I am not sure 100% sure the reason.
I think difference system target's axi bus frequency is difference, And just one time work, needn't software to manage it. Following other driver's code style may be another reason.

Quoted 3 lines

Best regards,
Krzysztof

#4 lore raw

Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Quoted 23 lines · Frank Li
Quoted 23 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 2:32 AM
To: Frank Li <frank.li@nxp.

Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml

Quoted 7 lines
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +7 -0
+      - const: usb3_aclk
+      - const: usb3_ipg_clk
+      - const: usb3_core_pclk
+
+  assigned-clocks:
+    items:
+      - description: Phandle and clock specifoer of

IMX_SC_PM_CLK_MST_BUS.

Drop useless pieces so "Phandle and clock specifoer of " and name the hardware, not the syntax.

Quoted 4 lines
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +4 -0
+
+  assigned-clock-rates:
+    items:
+      - description: Should be in Range 100 - 600 Mhz.
Quoted 7 lines
Quoted 2 lines

That's better but I still do not understand why do you need it in the bindings. You never actually answered this question.

I am not sure 100% sure the reason.
I think difference system target's axi bus frequency is difference, And just one time work, needn't software to manage it. Following other driver's code style may be another reason.

That's the reason of heaving it in DTS. But I am asking about bindings. You do understand you define here interface?

Best regards,
Krzysztof

author maintainer
#5 lore raw

RE: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Quoted 43 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:32 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 26 lines · Frank Li
Quoted 25 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 2:32 AM
To: Frank Li <frank.li@nxp.

Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml

Quoted 7 lines
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +7 -0
+      - const: usb3_aclk
+      - const: usb3_ipg_clk
+      - const: usb3_core_pclk
+
+  assigned-clocks:
+    items:
+      - description: Phandle and clock specifoer of

IMX_SC_PM_CLK_MST_BUS.

Drop useless pieces so "Phandle and clock specifoer of " and name the hardware, not the syntax.

Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml line 51

Quoted 4 lines
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +4 -0
+
+  assigned-clock-rates:
+    items:
+      - description: Should be in Range 100 - 600 Mhz.

That's better but I still do not understand why do you need it in the bindings. You never actually answered this question.

Quoted 7 lines
Quoted 4 lines

I am not sure 100% sure the reason.
I think difference system target's axi bus frequency is difference, And just one time work, needn't software to manage it. Following other driver's code style may be another reason.

That's the reason of heaving it in DTS. But I am asking about bindings. You do understand you define here interface?

I defined here is descript AXI frequency for usb controller. Supposed difference Platform will have difference working frequency.

Quoted 3 lines

Best regards,
Krzysztof

#6 lore raw

Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Quoted 48 lines · Frank Li
Quoted 48 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:32 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 30 lines · Frank Li
Quoted 18 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 2:32 AM
To: Frank Li <frank.li@nxp.

Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml

Quoted 7 lines
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +7 -0
+      - const: usb3_aclk
+      - const: usb3_ipg_clk
+      - const: usb3_core_pclk
+
+  assigned-clocks:
+    items:
+      - description: Phandle and clock specifoer of

IMX_SC_PM_CLK_MST_BUS.

Drop useless pieces so "Phandle and clock specifoer of " and name the hardware, not the syntax.

Quoted 7 lines

Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml line 51

Quoted 4 lines
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +4 -0
+
+  assigned-clock-rates:
+    items:
+      - description: Should be in Range 100 - 600 Mhz.

That's better but I still do not understand why do you need it in the bindings. You never actually answered this question.

I am not sure 100% sure the reason.
I think difference system target's axi bus frequency is difference, And just one time work, needn't software to manage it. Following other driver's code style may be another reason.

Quoted 5 lines
Quoted 2 lines

That's the reason of heaving it in DTS. But I am asking about bindings. You do understand you define here interface?

I defined here is descript AXI frequency for usb controller. Supposed difference Platform will have difference working frequency.

I don't understand how does this answer my concerns of having it in DT bindings. If you do not add it, you "will have difference working frequency", so what's the point?

Best regards,
Krzysztof

author maintainer
#7 lore raw

RE: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Quoted 69 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:38 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 7 lines · Frank Li
Quoted 7 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:32 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected];

[email protected];

Quoted 44 lines
Quoted 43 lines

[email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 23 lines · Frank Li
Quoted 23 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 2:32 AM
To: Frank Li <frank.li@nxp.

Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml

Quoted 7 lines
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +7 -0
+      - const: usb3_aclk
+      - const: usb3_ipg_clk
+      - const: usb3_core_pclk
+
+  assigned-clocks:
+    items:
+      - description: Phandle and clock specifoer of

IMX_SC_PM_CLK_MST_BUS.

Drop useless pieces so "Phandle and clock specifoer of " and name the hardware, not the syntax.

Quoted 4 lines
Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml new file +4 -0
+
+  assigned-clock-rates:
+    items:
+      - description: Should be in Range 100 - 600 Mhz.
Quoted 7 lines
Quoted 2 lines

That's better but I still do not understand why do you need it in the bindings. You never actually answered this question.

I am not sure 100% sure the reason.
I think difference system target's axi bus frequency is difference, And just one time work, needn't software to manage it. Following other driver's code style may be another reason.

That's the reason of heaving it in DTS. But I am asking about bindings. You do understand you define here interface?

Quoted 7 lines
Quoted 1 line

I defined here is descript AXI frequency for usb controller. Supposed

difference

Quoted 1 line

Platform will have difference working frequency.

I don't understand how does this answer my concerns of having it in DT bindings. If you do not add it, you "will have difference working frequency", so what's the point?

For example: imx8qxp, it need set to 250Mhz, i.MX8QM need set to 200Mhz. Maybe future chip can set to 400Mhz.

Quoted 3 lines

Best regards,
Krzysztof

#8 lore raw

Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Quoted 71 lines · Frank Li
Quoted 71 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:38 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 7 lines · Frank Li
Quoted 7 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:32 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected];

[email protected];

Quoted 41 lines
Quoted 41 lines

[email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 30 lines · Frank Li
Quoted 18 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 2:32 AM
To: Frank Li <frank.li@nxp.

Review

Quoted 7 lines
(quoted diff) +7 -0
+      - const: usb3_aclk
+      - const: usb3_ipg_clk
+      - const: usb3_core_pclk
+
+  assigned-clocks:
+    items:
+      - description: Phandle and clock specifoer of

IMX_SC_PM_CLK_MST_BUS.

Drop useless pieces so "Phandle and clock specifoer of " and name the hardware, not the syntax.

Quoted 7 lines

Review

Quoted 4 lines
(quoted diff) +4 -0
+
+  assigned-clock-rates:
+    items:
+      - description: Should be in Range 100 - 600 Mhz.

That's better but I still do not understand why do you need it in the bindings. You never actually answered this question.

I am not sure 100% sure the reason.
I think difference system target's axi bus frequency is difference, And just one time work, needn't software to manage it. Following other driver's code style may be another reason.

Quoted 4 lines
Quoted 2 lines

That's the reason of heaving it in DTS. But I am asking about bindings. You do understand you define here interface?

I defined here is descript AXI frequency for usb controller. Supposed

difference

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Platform will have difference working frequency.

I don't understand how does this answer my concerns of having it in DT bindings. If you do not add it, you "will have difference working frequency", so what's the point?

For example: imx8qxp, it need set to 250Mhz, i.MX8QM need set to 200Mhz. Maybe future chip can set to 400Mhz.

And? So as you can see you will still have different frequencies, so what's the point? What is the benefit? Dunno, maybe we do not understand each other, because I don't think you are answering my questions at all.

Best regards,
Krzysztof

author maintainer
#9 lore raw

RE: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Quoted 98 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:43 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 7 lines · Frank Li
Quoted 7 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:38 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected];

[email protected];

Quoted 17 lines
Quoted 17 lines

[email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 7 lines · Frank Li
Quoted 7 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:32 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected];

Quoted 4 lines
Quoted 4 lines

[email protected];

Quoted 3 lines
Quoted 3 lines

[email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected];

[email protected];

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

[email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm:

add

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines

imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 13 lines · Frank Li
Quoted 13 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 2:32 AM
To: Frank Li <frank.li@nxp.

Quoted 7 lines
(quoted diff) +7 -0
+      - const: usb3_aclk
+      - const: usb3_ipg_clk
+      - const: usb3_core_pclk
+
+  assigned-clocks:
+    items:
+      - description: Phandle and clock specifoer of
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

IMX_SC_PM_CLK_MST_BUS.

Drop useless pieces so "Phandle and clock specifoer of " and name

the

Quoted 26 lines
Quoted 25 lines
Quoted 15 lines
Quoted 15 lines
Quoted 14 lines
Quoted 9 lines

hardware, not the syntax.

Review

Quoted 4 lines
(quoted diff) +4 -0
+
+  assigned-clock-rates:
+    items:
+      - description: Should be in Range 100 - 600 Mhz.

That's better but I still do not understand why do you need it in the bindings. You never actually answered this question.

I am not sure 100% sure the reason.
I think difference system target's axi bus frequency is difference, And just one time work, needn't software to manage it. Following other driver's code style may be another reason.

Quoted 4 lines
Quoted 2 lines

That's the reason of heaving it in DTS. But I am asking about bindings. You do understand you define here interface?

I defined here is descript AXI frequency for usb controller. Supposed

difference

Quoted 1 line

Platform will have difference working frequency.

I don't understand how does this answer my concerns of having it in DT bindings. If you do not add it, you "will have difference working frequency", so what's the point?

Quoted 7 lines
Quoted 1 line

For example: imx8qxp, it need set to 250Mhz, i.MX8QM need set to

200Mhz.

Quoted 1 line

Maybe future chip can set to 400Mhz.

And? So as you can see you will still have different frequencies, so what's the point? What is the benefit? Dunno, maybe we do not understand each other, because I don't think you are answering my questions at all.

Benefit: New chip just need change dts file for the same IP, like change base Reg address and irq number.

Your question is: "why need this assigned-clock-rates IMX_SC_PM_CLK_MST_BUS property?"

My answer: it is one of hardware property, like reg base address and irq number.

If can't match your expectation, can you change another words or provide me an example?

Quoted 3 lines

Best regards,
Krzysztof

#10 lore raw

Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Quoted 100 lines · Frank Li
Quoted 100 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:43 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 7 lines · Frank Li
Quoted 7 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:38 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected];

[email protected];

Quoted 17 lines
Quoted 17 lines

[email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 7 lines · Frank Li
Quoted 7 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:32 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected];

Quoted 4 lines
Quoted 4 lines

[email protected];

Quoted 3 lines
Quoted 3 lines

[email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected];

[email protected];

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

[email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm:

add

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines

imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 13 lines · Frank Li
Quoted 13 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 2:32 AM
To: Frank Li <frank.li@nxp.

Quoted 7 lines
(quoted diff) +7 -0
+      - const: usb3_aclk
+      - const: usb3_ipg_clk
+      - const: usb3_core_pclk
+
+  assigned-clocks:
+    items:
+      - description: Phandle and clock specifoer of
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

IMX_SC_PM_CLK_MST_BUS.

Drop useless pieces so "Phandle and clock specifoer of " and name

the

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines

hardware, not the syntax.

Review

Quoted 4 lines
(quoted diff) +4 -0
+
+  assigned-clock-rates:
+    items:
+      - description: Should be in Range 100 - 600 Mhz.

That's better but I still do not understand why do you need it in the bindings. You never actually answered this question.

Quoted 7 lines
Quoted 4 lines

I am not sure 100% sure the reason.
I think difference system target's axi bus frequency is difference, And just one time work, needn't software to manage it. Following other driver's code style may be another reason.

That's the reason of heaving it in DTS. But I am asking about bindings. You do understand you define here interface?

I defined here is descript AXI frequency for usb controller. Supposed

Quoted 8 lines
Quoted 6 lines

difference

Quoted 1 line

Platform will have difference working frequency.

I don't understand how does this answer my concerns of having it in DT bindings. If you do not add it, you "will have difference working frequency", so what's the point?

For example: imx8qxp, it need set to 250Mhz, i.MX8QM need set to

200Mhz.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Maybe future chip can set to 400Mhz.

And? So as you can see you will still have different frequencies, so what's the point? What is the benefit? Dunno, maybe we do not understand each other, because I don't think you are answering my questions at all.

Benefit: New chip just need change dts file for the same IP, like change base Reg address and irq number.

To remind - the question was:
"That's better but I still do not understand why do you need it in the bindings."
If you drop it from the bindings the benefit is still there, so what do you want to prove?

Quoted 2 lines

Your question is: "why need this assigned-clock-rates IMX_SC_PM_CLK_MST_BUS property?"

This was the previous thread. Now, related but slightly different, why do you still need it in the bindings?

Quoted 1 line

My answer: it is one of hardware property, like reg base address and irq number.

Sure, it is, I know, and bindings already allow it. Just look at many DTS and their bindings. Do you see the bindings defining this property? No. So why do you think it is needed here? I am asking this since like 6 emails and your answers are not related to bindings at all.

Quoted 2 lines

If can't match your expectation, can you change another words or provide me an example?

Yeah, just open several DTS and look for assigned-clock, then open their bindings and answer - why do you need to add it to the binding but all other bindings did not have to? If you have the answer, sure, bring these parts of bindings.

Best regards,
Krzysztof

author maintainer
#11 lore raw

RE: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Quoted 158 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 5:09 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 7 lines · Frank Li
Quoted 7 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:43 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected];

[email protected];

Quoted 17 lines
Quoted 17 lines

[email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 7 lines · Frank Li
Quoted 7 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:38 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected];

Quoted 4 lines
Quoted 4 lines

[email protected];

Quoted 3 lines
Quoted 3 lines

[email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected];

[email protected];

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

[email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm:

add

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 2 lines · Frank Li
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:32 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected];

[email protected];

Quoted 1 line
Quoted 1 line

[email protected]; [email protected]; linux-

arm-

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

[email protected]; dl-linux-imx <[email protected]>;

linux-

Quoted 23 lines
Quoted 23 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

[email protected]; [email protected];

[email protected];

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

[email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm:

add

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines

imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 13 lines · Frank Li
Quoted 13 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 2:32 AM
To: Frank Li <frank.li@nxp.

Quoted 7 lines
(quoted diff) +7 -0
+      - const: usb3_aclk
+      - const: usb3_ipg_clk
+      - const: usb3_core_pclk
+
+  assigned-clocks:
+    items:
+      - description: Phandle and clock specifoer of
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

IMX_SC_PM_CLK_MST_BUS.

Drop useless pieces so "Phandle and clock specifoer of " and

name

Quoted 9 lines
Quoted 9 lines

the

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

hardware, not the syntax.

Review

Quoted 4 lines
(quoted diff) +4 -0
+
+  assigned-clock-rates:
+    items:
+      - description: Should be in Range 100 - 600 Mhz.

That's better but I still do not understand why do you need it in

the

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 17 lines
Quoted 11 lines
Quoted 9 lines
Quoted 6 lines
Quoted 1 line

bindings. You never actually answered this question.

I am not sure 100% sure the reason.
I think difference system target's axi bus frequency is difference, And just one time work, needn't software to manage it. Following other driver's code style may be another reason.

That's the reason of heaving it in DTS. But I am asking about bindings. You do understand you define here interface?

I defined here is descript AXI frequency for usb controller. Supposed

difference

Quoted 1 line

Platform will have difference working frequency.

I don't understand how does this answer my concerns of having it in DT bindings. If you do not add it, you "will have difference working frequency", so what's the point?

Quoted 6 lines
Quoted 6 lines
Quoted 1 line

For example: imx8qxp, it need set to 250Mhz, i.MX8QM need set to

200Mhz.

Quoted 1 line

Maybe future chip can set to 400Mhz.

And? So as you can see you will still have different frequencies, so what's the point? What is the benefit? Dunno, maybe we do not

understand

Quoted 3 lines
Quoted 1 line

each other, because I don't think you are answering my questions at all.

Benefit: New chip just need change dts file for the same IP, like change

base

Quoted 1 line

Reg address and irq number.

To remind - the question was:
"That's better but I still do not understand why do you need it in the bindings."
If you drop it from the bindings the benefit is still there, so what do you want to prove?

Quoted 2 lines

Your question is: "why need this assigned-clock-rates

IMX_SC_PM_CLK_MST_BUS property?"

This was the previous thread. Now, related but slightly different, why do you still need it in the bindings?

Quoted 1 line

My answer: it is one of hardware property, like reg base address and irq

number.

Sure, it is, I know, and bindings already allow it. Just look at many DTS and their bindings. Do you see the bindings defining this property? No. So why do you think it is needed here? I am asking this since like 6 emails and your answers are not related to bindings at all.

Quoted 1 line
Quoted 7 lines
Quoted 1 line

If can't match your expectation, can you change another words or provide

me an example?

Yeah, just open several DTS and look for assigned-clock, then open their bindings and answer - why do you need to add it to the binding but all other bindings did not have to? If you have the answer, sure, bring these parts of bindings.

Do you means, Needn't add assigned-clock in binding *document* yaml file? And dts file still can use assigned-clock property.

Quoted 3 lines

Best regards,
Krzysztof

#12 lore raw

Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Quoted 161 lines · Frank Li
Quoted 161 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 5:09 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 7 lines · Frank Li
Quoted 7 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:43 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected];

[email protected];

Quoted 17 lines
Quoted 17 lines

[email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 7 lines · Frank Li
Quoted 7 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:38 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected];

Quoted 4 lines
Quoted 4 lines

[email protected];

Quoted 3 lines
Quoted 3 lines

[email protected]; [email protected]; linux-arm- [email protected]; dl-linux-imx <[email protected]>; linux- [email protected]; [email protected];

[email protected];

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

[email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm:

add

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 2 lines · Frank Li
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 4:32 PM
To: Frank Li <[email protected]>
Cc: [email protected]; [email protected];

[email protected];

Quoted 1 line
Quoted 1 line

[email protected]; [email protected]; linux-

arm-

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

[email protected]; dl-linux-imx <[email protected]>;

linux-

Quoted 23 lines
Quoted 23 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

[email protected]; [email protected];

[email protected];

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

[email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: usb: cdns-imx8qm:

add

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines

imx8qm cdns3 glue bindings

Caution: EXT Email

Quoted 13 lines · Frank Li
Quoted 13 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, March 22, 2023 2:32 AM
To: Frank Li <frank.li@nxp.

Quoted 7 lines
(quoted diff) +7 -0
+      - const: usb3_aclk
+      - const: usb3_ipg_clk
+      - const: usb3_core_pclk
+
+  assigned-clocks:
+    items:
+      - description: Phandle and clock specifoer of
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

IMX_SC_PM_CLK_MST_BUS.

Drop useless pieces so "Phandle and clock specifoer of " and

name

Quoted 9 lines
Quoted 9 lines

the

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

hardware, not the syntax.

Review

Quoted 4 lines
(quoted diff) +4 -0
+
+  assigned-clock-rates:
+    items:
+      - description: Should be in Range 100 - 600 Mhz.

That's better but I still do not understand why do you need it in

the

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 17 lines
Quoted 11 lines
Quoted 9 lines
Quoted 6 lines
Quoted 1 line

bindings. You never actually answered this question.

I am not sure 100% sure the reason.
I think difference system target's axi bus frequency is difference, And just one time work, needn't software to manage it. Following other driver's code style may be another reason.

That's the reason of heaving it in DTS. But I am asking about bindings. You do understand you define here interface?

I defined here is descript AXI frequency for usb controller. Supposed

difference

Quoted 1 line

Platform will have difference working frequency.

I don't understand how does this answer my concerns of having it in DT bindings. If you do not add it, you "will have difference working frequency", so what's the point?

Quoted 6 lines
Quoted 6 lines
Quoted 1 line

For example: imx8qxp, it need set to 250Mhz, i.MX8QM need set to

200Mhz.

Quoted 1 line

Maybe future chip can set to 400Mhz.

And? So as you can see you will still have different frequencies, so what's the point? What is the benefit? Dunno, maybe we do not

understand

Quoted 3 lines
Quoted 1 line

each other, because I don't think you are answering my questions at all.

Benefit: New chip just need change dts file for the same IP, like change

base

Quoted 1 line

Reg address and irq number.

To remind - the question was:
"That's better but I still do not understand why do you need it in the bindings."
If you drop it from the bindings the benefit is still there, so what do you want to prove?

Quoted 2 lines

Your question is: "why need this assigned-clock-rates

IMX_SC_PM_CLK_MST_BUS property?"

This was the previous thread. Now, related but slightly different, why do you still need it in the bindings?

Quoted 1 line

My answer: it is one of hardware property, like reg base address and irq

number.

Sure, it is, I know, and bindings already allow it. Just look at many DTS and their bindings. Do you see the bindings defining this property? No. So why do you think it is needed here? I am asking this since like 6 emails and your answers are not related to bindings at all.

Quoted 2 lines

If can't match your expectation, can you change another words or provide

me an example?

Quoted 7 lines
Quoted 4 lines

Yeah, just open several DTS and look for assigned-clock, then open their bindings and answer - why do you need to add it to the binding but all other bindings did not have to? If you have the answer, sure, bring these parts of bindings.

Do you means, Needn't add assigned-clock in binding *document* yaml file? And dts file still can use assigned-clock property.

Yes, I said it many times already...

Best regards,
Krzysztof

author maintainer
#13 lore raw

PATCH v3 2/3 arm64: dts: imx8qxp: add cadence usb3 support

In reply to Frank Li

There are cadence usb3.0 controller in 8qxp and 8qm. Add usb3 node at common connect subsystem.

---
Change from v2 to v3:
- Drop fixed frequency clock. See binding doc patch.
- move req as second property
Change from v1 to v2
- fix shawn's comments

 .../boot/dts/freescale/imx8-ss-conn.dtsi      | 70 +++++++++++++++++++
 1 file changed, 70 insertions(+)
arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi +70 -0
index 4852760adeee..a08608312f16 100644
@@ -138,6 +138,54 @@ fec2: ethernet@5b050000 {
 		status = "disabled";
 	};
 
+	usbotg3: usb@5b110000 {
+		compatible = "fsl,imx8qm-usb3";
+		reg = <0x5b110000 0x10000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		clocks = <&usb3_lpcg IMX_LPCG_CLK_1>,
+			 <&usb3_lpcg IMX_LPCG_CLK_0>,
+			 <&usb3_lpcg IMX_LPCG_CLK_7>,
+			 <&usb3_lpcg IMX_LPCG_CLK_4>,
+			 <&usb3_lpcg IMX_LPCG_CLK_5>;
+		clock-names = "usb3_lpm_clk", "usb3_bus_clk", "usb3_aclk",
+			      "usb3_ipg_clk", "usb3_core_pclk";
+		assigned-clocks = <&clk IMX_SC_R_USB_2 IMX_SC_PM_CLK_MST_BUS>;
+		assigned-clock-rates = <250000000>;
+		power-domains = <&pd IMX_SC_R_USB_2>;
+		status = "disabled";
+
+		usbotg3_cdns3: usb@5b120000 {
+			compatible = "cdns,usb3";
+			reg = <0x5b130000 0x10000>,     /* memory area for HOST registers */
+			      <0x5b140000 0x10000>,   /* memory area for DEVICE registers */
+			      <0x5b120000 0x10000>;   /* memory area for OTG/DRD registers */
+			reg-names = "xhci", "dev", "otg";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			interrupt-parent = <&gic>;
+			interrupts = <GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "host", "peripheral", "otg", "wakeup";
+			phys = <&usb3_phy>;
+			phy-names = "cdns3,usb3-phy";
+			status = "disabled";
+		};
+	};
+
+	usb3_phy: usb-phy@5b160000 {
+		compatible = "nxp,salvo-phy";
+		reg = <0x5b160000 0x40000>;
+		clocks = <&usb3_lpcg IMX_LPCG_CLK_6>;
+		clock-names = "salvo_phy_clk";
+		power-domains = <&pd IMX_SC_R_USB_2_PHY>;
+		#phy-cells = <0>;
+		status = "disabled";
+	};
+
 	/* LPCG clocks */
 	sdhc0_lpcg: clock-controller@5b200000 {
 		compatible = "fsl,imx8qxp-lpcg";
@@ -234,4 +282,26 @@ usb2_lpcg: clock-controller@5b270000 {
 		clock-output-names = "usboh3_ahb_clk", "usboh3_phy_ipg_clk";
 		power-domains = <&pd IMX_SC_R_USB_0_PHY>;
 	};
+
+	usb3_lpcg: clock-controller@5b280000 {
+		compatible = "fsl,imx8qxp-lpcg";
+		reg = <0x5b280000 0x10000>;
+		#clock-cells = <1>;
+		clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_1>,
+				<IMX_LPCG_CLK_4>, <IMX_LPCG_CLK_5>,
+				<IMX_LPCG_CLK_6>, <IMX_LPCG_CLK_7>;
+		clocks = <&clk IMX_SC_R_USB_2 IMX_SC_PM_CLK_PER>,
+			 <&clk IMX_SC_R_USB_2 IMX_SC_PM_CLK_MISC>,
+			 <&conn_ipg_clk>,
+			 <&conn_ipg_clk>,
+			 <&conn_ipg_clk>,
+			 <&clk IMX_SC_R_USB_2 IMX_SC_PM_CLK_MST_BUS>;
+		clock-output-names = "usb3_app_clk",
+				     "usb3_lpm_clk",
+				     "usb3_ipg_clk",
+				     "usb3_core_pclk",
+				     "usb3_phy_clk",
+				     "usb3_aclk";
+		power-domains = <&pd IMX_SC_R_USB_2_PHY>;
+	};
 };
Signature · 1 line
2.34.1
author maintainer
#14 lore raw

PATCH v3 3/3 arm64: dts: freescale: imx8qxp-mek: enable cadence usb3

In reply to Frank Li

Enable USB3 controller, phy and typec related nodes.

---

Change from v2 to v3
-none
Change from v1 to v2
-fix shawn's comments.

 arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 85 +++++++++++++++++++
 1 file changed, 85 insertions(+)
arch/arm64/boot/dts/freescale/imx8qxp-mek.dts +85 -0
index afa883389456..9ba4c72f0006 100644
@@ -6,6 +6,7 @@
 /dts-v1/;
 
 #include "imx8qxp.dtsi"
+#include <dt-bindings/usb/pd.h>
 
 / {
 	model = "Freescale i.MX8QXP MEK";
@@ -28,6 +29,21 @@ reg_usdhc2_vmmc: usdhc2-vmmc {
 		gpio = <&lsio_gpio4 19 GPIO_ACTIVE_HIGH>;
 		enable-active-high;
 	};
+
+	gpio-sbu-mux {
+		compatible = "gpio-sbu-mux";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_typec_mux>;
+		select-gpios = <&lsio_gpio5 9 GPIO_ACTIVE_HIGH>;
+		enable-gpios = <&pca9557_a 7 GPIO_ACTIVE_LOW>;
+		orientation-switch;
+
+		port {
+			usb3_data_ss: endpoint {
+				remote-endpoint = <&typec_con_ss>;
+			};
+		};
+	};
 };
 
 &dsp {
@@ -127,6 +143,42 @@ light-sensor@44 {
 			};
 		};
 	};
+
+	ptn5110: tcpc@50 {
+		compatible = "nxp,ptn5110";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_typec>;
+		reg = <0x50>;
+		interrupt-parent = <&lsio_gpio1>;
+		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+
+		port {
+			typec_dr_sw: endpoint {
+				remote-endpoint = <&usb3_drd_sw>;
+			};
+		};
+
+		usb_con1: connector {
+			compatible = "usb-c-connector";
+			label = "USB-C";
+			power-role = "source";
+			data-role = "dual";
+			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@1 {
+					reg = <1>;
+					typec_con_ss: endpoint {
+						remote-endpoint = <&usb3_data_ss>;
+					};
+				};
+			};
+		};
+	};
+
 };
 
 &lpuart0 {
@@ -204,6 +256,27 @@ &usdhc2 {
 	status = "okay";
 };
 
+&usb3_phy {
+	status = "okay";
+};
+
+&usbotg3 {
+	status = "okay";
+};
+
+&usbotg3_cdns3 {
+	dr_mode = "otg";
+	usb-role-switch;
+	status = "okay";
+
+	port {
+		usb3_drd_sw: endpoint {
+			remote-endpoint = <&typec_dr_sw>;
+		};
+	};
+};
+
+
 &vpu {
 	compatible = "nxp,imx8qxp-vpu";
 	status = "okay";
@@ -267,6 +340,18 @@ IMX8QXP_UART0_TX_ADMA_UART0_TX				0x06000020
 		>;
 	};
 
+	pinctrl_typec: typecgrp {
+		fsl,pins = <
+			IMX8QXP_SPI2_SCK_LSIO_GPIO1_IO03                        0x06000021
+		>;
+	};
+
+	pinctrl_typec_mux: typecmuxgrp {
+		fsl,pins = <
+			IMX8QXP_ENET0_REFCLK_125M_25M_LSIO_GPIO5_IO09           0x60
+		>;
+	};
+
 	pinctrl_usdhc1: usdhc1grp {
 		fsl,pins = <
 			IMX8QXP_EMMC0_CLK_CONN_EMMC0_CLK			0x06000041
Signature · 1 line
2.34.1