devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] usb: cdns3: imx: simplify clock name usage
@ 2023-05-17 15:25 Frank Li
  2023-05-17 15:25 ` [PATCH 2/2] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue layer Frank Li
  2023-06-04 23:23 ` [PATCH 1/2] usb: cdns3: imx: simplify clock name usage Peter Chen
  0 siblings, 2 replies; 3+ messages in thread
From: Frank Li @ 2023-05-17 15:25 UTC (permalink / raw)
  To: gregkh, robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo,
	s.hauer
  Cc: kernel, festevam, linux-imx, peter.chen, pawell, rogerq,
	a-govindraju, linux-usb, devicetree, linux-arm-kernel,
	linux-kernel, imx

Simplifies the clock names in imx_cdns3_core_clks[]. Such as, renaming
"usb3_lpm_clk" to "lpm". The "usb3" prefix and "clk" suffix were
redundant.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---

This patch was missed at
https://lore.kernel.org/imx/20230327145523.3121810-1-Frank.Li@nxp.com/

 drivers/usb/cdns3/cdns3-imx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/cdns3/cdns3-imx.c b/drivers/usb/cdns3/cdns3-imx.c
index 59860d1753fd..5d9ca3c3c71d 100644
--- a/drivers/usb/cdns3/cdns3-imx.c
+++ b/drivers/usb/cdns3/cdns3-imx.c
@@ -105,11 +105,11 @@ static inline void cdns_imx_writel(struct cdns_imx *data, u32 offset, u32 value)
 }
 
 static const struct clk_bulk_data imx_cdns3_core_clks[] = {
-	{ .id = "usb3_lpm_clk" },
-	{ .id = "usb3_bus_clk" },
-	{ .id = "usb3_aclk" },
-	{ .id = "usb3_ipg_clk" },
-	{ .id = "usb3_core_pclk" },
+	{ .id = "lpm" },
+	{ .id = "bus" },
+	{ .id = "aclk" },
+	{ .id = "ipg" },
+	{ .id = "core" },
 };
 
 static int cdns_imx_noncore_init(struct cdns_imx *data)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue layer
  2023-05-17 15:25 [PATCH 1/2] usb: cdns3: imx: simplify clock name usage Frank Li
@ 2023-05-17 15:25 ` Frank Li
  2023-06-04 23:23 ` [PATCH 1/2] usb: cdns3: imx: simplify clock name usage Peter Chen
  1 sibling, 0 replies; 3+ messages in thread
From: Frank Li @ 2023-05-17 15:25 UTC (permalink / raw)
  To: gregkh, robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo,
	s.hauer
  Cc: kernel, festevam, linux-imx, peter.chen, pawell, rogerq,
	a-govindraju, linux-usb, devicetree, linux-arm-kernel,
	linux-kernel, imx

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

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Preview discussion: 
https://lore.kernel.org/imx/20230327145523.3121810-1-Frank.Li@nxp.com/

 .../bindings/usb/fsl,imx8qm-cdns3.yaml        | 103 ++++++++++++++++++
 1 file changed, 103 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml

diff --git a/Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml b/Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml
new file mode 100644
index 000000000000..ceb76394af60
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/fsl,imx8qm-cdns3.yaml
@@ -0,0 +1,103 @@
+# 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 <Frank.Li@nxp.com>
+
+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: lpm
+      - const: bus
+      - const: aclk
+      - const: ipg
+      - const: core
+
+  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 = "lpm", "bus", "aclk", "ipg", "core";
+      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";
+      };
+    };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] usb: cdns3: imx: simplify clock name usage
  2023-05-17 15:25 [PATCH 1/2] usb: cdns3: imx: simplify clock name usage Frank Li
  2023-05-17 15:25 ` [PATCH 2/2] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue layer Frank Li
@ 2023-06-04 23:23 ` Peter Chen
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Chen @ 2023-06-04 23:23 UTC (permalink / raw)
  To: Frank Li
  Cc: gregkh, robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo,
	s.hauer, kernel, festevam, linux-imx, pawell, rogerq,
	a-govindraju, linux-usb, devicetree, linux-arm-kernel,
	linux-kernel, imx

On 23-05-17 11:25:44, Frank Li wrote:
> Simplifies the clock names in imx_cdns3_core_clks[]. Such as, renaming
> "usb3_lpm_clk" to "lpm". The "usb3" prefix and "clk" suffix were
> redundant.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>

Acked-by: Peter Chen <peter.chen@kernel.org>
> ---
> 
> This patch was missed at
> https://lore.kernel.org/imx/20230327145523.3121810-1-Frank.Li@nxp.com/
> 
>  drivers/usb/cdns3/cdns3-imx.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/cdns3/cdns3-imx.c b/drivers/usb/cdns3/cdns3-imx.c
> index 59860d1753fd..5d9ca3c3c71d 100644
> --- a/drivers/usb/cdns3/cdns3-imx.c
> +++ b/drivers/usb/cdns3/cdns3-imx.c
> @@ -105,11 +105,11 @@ static inline void cdns_imx_writel(struct cdns_imx *data, u32 offset, u32 value)
>  }
>  
>  static const struct clk_bulk_data imx_cdns3_core_clks[] = {
> -	{ .id = "usb3_lpm_clk" },
> -	{ .id = "usb3_bus_clk" },
> -	{ .id = "usb3_aclk" },
> -	{ .id = "usb3_ipg_clk" },
> -	{ .id = "usb3_core_pclk" },
> +	{ .id = "lpm" },
> +	{ .id = "bus" },
> +	{ .id = "aclk" },
> +	{ .id = "ipg" },
> +	{ .id = "core" },
>  };
>  
>  static int cdns_imx_noncore_init(struct cdns_imx *data)
> -- 
> 2.34.1
> 

-- 

Thanks,
Peter Chen

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-04 23:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-17 15:25 [PATCH 1/2] usb: cdns3: imx: simplify clock name usage Frank Li
2023-05-17 15:25 ` [PATCH 2/2] dt-bindings: usb: cdns-imx8qm: add imx8qm cdns3 glue layer Frank Li
2023-06-04 23:23 ` [PATCH 1/2] usb: cdns3: imx: simplify clock name usage Peter Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).