devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Introduce DWC3 support for Exynos7870
@ 2025-02-18 18:54 Kaustabh Chakraborty
  2025-02-18 18:54 ` [PATCH v2 1/2] dt-bindings: usb: samsung,exynos-dwc3: add exynos7870 support Kaustabh Chakraborty
  2025-02-18 18:54 ` [PATCH v2 2/2] usb: dwc3: exynos: add support for exynos7870 Kaustabh Chakraborty
  0 siblings, 2 replies; 5+ messages in thread
From: Kaustabh Chakraborty @ 2025-02-18 18:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alim Akhtar, Thinh Nguyen
  Cc: Krzysztof Kozlowski, linux-usb, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, Kaustabh Chakraborty

This patch series is a part of Exynos7870 upstreaming.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
Changes in v2:
- Change compatible string (s/dwusb2/dwusb3).
- Rename clocks to "bus_early", "ctrl", and "ref".
- Set 3.0V regulator as mandatory.
- Link to v1: https://lore.kernel.org/r/20250204-exynos7870-usb-v1-0-a7753f8183a4@disroot.org

---
Kaustabh Chakraborty (2):
      dt-bindings: usb: samsung,exynos-dwc3: add exynos7870 support
      usb: dwc3: exynos: add support for exynos7870

 .../bindings/usb/samsung,exynos-dwc3.yaml          | 28 +++++++++++++++++++++-
 drivers/usb/dwc3/dwc3-exynos.c                     |  9 +++++++
 2 files changed, 36 insertions(+), 1 deletion(-)
---
base-commit: e5d3fd687aac5eceb1721fa92b9f49afcf4c3717
change-id: 20250203-exynos7870-usb-9f3a5ed7ee95

Best regards,
-- 
Kaustabh Chakraborty <kauschluss@disroot.org>


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

* [PATCH v2 1/2] dt-bindings: usb: samsung,exynos-dwc3: add exynos7870 support
  2025-02-18 18:54 [PATCH v2 0/2] Introduce DWC3 support for Exynos7870 Kaustabh Chakraborty
@ 2025-02-18 18:54 ` Kaustabh Chakraborty
  2025-02-20  8:29   ` Krzysztof Kozlowski
  2025-02-18 18:54 ` [PATCH v2 2/2] usb: dwc3: exynos: add support for exynos7870 Kaustabh Chakraborty
  1 sibling, 1 reply; 5+ messages in thread
From: Kaustabh Chakraborty @ 2025-02-18 18:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alim Akhtar, Thinh Nguyen
  Cc: Krzysztof Kozlowski, linux-usb, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, Kaustabh Chakraborty

Document compatible string for Exynos7870 DWC3-compatible USB 2.0
driver. The devicetree node requires three clocks, named "bus_early",
"ctrl", and "ref".

Unlike other variants, Exynos7870's USB controller requires a single
3.0V regulator. Assert that the other 1.0V regulator requirement is
enforced on variants individually other than Exynos7870's.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
 .../bindings/usb/samsung,exynos-dwc3.yaml          | 28 +++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/usb/samsung,exynos-dwc3.yaml b/Documentation/devicetree/bindings/usb/samsung,exynos-dwc3.yaml
index 2b3430cebe99106f3b6201ab31d4d9e3fcc55627..b034b5f553491d2ea253c5f7bba18739219c6f61 100644
--- a/Documentation/devicetree/bindings/usb/samsung,exynos-dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/samsung,exynos-dwc3.yaml
@@ -16,6 +16,7 @@ properties:
       - samsung,exynos5250-dwusb3
       - samsung,exynos5433-dwusb3
       - samsung,exynos7-dwusb3
+      - samsung,exynos7870-dwusb3
       - samsung,exynos850-dwusb3
 
   '#address-cells':
@@ -52,7 +53,6 @@ required:
   - clock-names
   - ranges
   - '#size-cells'
-  - vdd10-supply
   - vdd33-supply
 
 allOf:
@@ -72,6 +72,8 @@ allOf:
             - const: susp_clk
             - const: link_aclk
             - const: link_pclk
+      required:
+        - vdd10-supply
 
   - if:
       properties:
@@ -86,6 +88,8 @@ allOf:
         clock-names:
           items:
             - const: usbdrd30
+      required:
+        - vdd10-supply
 
   - if:
       properties:
@@ -103,6 +107,8 @@ allOf:
             - const: susp_clk
             - const: phyclk
             - const: pipe_pclk
+      required:
+        - vdd10-supply
 
   - if:
       properties:
@@ -119,6 +125,24 @@ allOf:
             - const: usbdrd30
             - const: usbdrd30_susp_clk
             - const: usbdrd30_axius_clk
+      required:
+        - vdd10-supply
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos7870-dwusb3
+    then:
+      properties:
+        clocks:
+          minItems: 3
+          maxItems: 3
+        clock-names:
+          items:
+            - const: bus_early
+            - const: ctrl
+            - const: ref
 
   - if:
       properties:
@@ -134,6 +158,8 @@ allOf:
           items:
             - const: bus_early
             - const: ref
+      required:
+        - vdd10-supply
 
 additionalProperties: false
 

-- 
2.48.1


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

* [PATCH v2 2/2] usb: dwc3: exynos: add support for exynos7870
  2025-02-18 18:54 [PATCH v2 0/2] Introduce DWC3 support for Exynos7870 Kaustabh Chakraborty
  2025-02-18 18:54 ` [PATCH v2 1/2] dt-bindings: usb: samsung,exynos-dwc3: add exynos7870 support Kaustabh Chakraborty
@ 2025-02-18 18:54 ` Kaustabh Chakraborty
  2025-02-19 22:35   ` Thinh Nguyen
  1 sibling, 1 reply; 5+ messages in thread
From: Kaustabh Chakraborty @ 2025-02-18 18:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alim Akhtar, Thinh Nguyen
  Cc: Krzysztof Kozlowski, linux-usb, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, Kaustabh Chakraborty

Exynos7870 devices have a DWC3 compatible USB 2.0 controller.
Add support in the driver by:
 - Adding its own compatible string, "samsung,exynos7870-dwusb3".
 - Adding three USBDRD clocks named "bus_early", "ctrl", and "ref", to
   be controlled by the driver.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
 drivers/usb/dwc3/dwc3-exynos.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
index f5d963fae9e069e1bd145ff5bd1b704da89fb74c..ca8d2955303c589ea03a261944aadb6582c9cb9f 100644
--- a/drivers/usb/dwc3/dwc3-exynos.c
+++ b/drivers/usb/dwc3/dwc3-exynos.c
@@ -163,6 +163,12 @@ static const struct dwc3_exynos_driverdata exynos7_drvdata = {
 	.suspend_clk_idx = 1,
 };
 
+static const struct dwc3_exynos_driverdata exynos7870_drvdata = {
+	.clk_names = { "bus_early", "ctrl", "ref" },
+	.num_clks = 3,
+	.suspend_clk_idx = -1,
+};
+
 static const struct dwc3_exynos_driverdata exynos850_drvdata = {
 	.clk_names = { "bus_early", "ref" },
 	.num_clks = 2,
@@ -185,6 +191,9 @@ static const struct of_device_id exynos_dwc3_match[] = {
 	}, {
 		.compatible = "samsung,exynos7-dwusb3",
 		.data = &exynos7_drvdata,
+	}, {
+		.compatible = "samsung,exynos7870-dwusb3",
+		.data = &exynos7870_drvdata,
 	}, {
 		.compatible = "samsung,exynos850-dwusb3",
 		.data = &exynos850_drvdata,

-- 
2.48.1


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

* Re: [PATCH v2 2/2] usb: dwc3: exynos: add support for exynos7870
  2025-02-18 18:54 ` [PATCH v2 2/2] usb: dwc3: exynos: add support for exynos7870 Kaustabh Chakraborty
@ 2025-02-19 22:35   ` Thinh Nguyen
  0 siblings, 0 replies; 5+ messages in thread
From: Thinh Nguyen @ 2025-02-19 22:35 UTC (permalink / raw)
  To: Kaustabh Chakraborty
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alim Akhtar, Thinh Nguyen, Krzysztof Kozlowski,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org

On Wed, Feb 19, 2025, Kaustabh Chakraborty wrote:
> Exynos7870 devices have a DWC3 compatible USB 2.0 controller.
> Add support in the driver by:
>  - Adding its own compatible string, "samsung,exynos7870-dwusb3".
>  - Adding three USBDRD clocks named "bus_early", "ctrl", and "ref", to
>    be controlled by the driver.
> 
> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
> ---
>  drivers/usb/dwc3/dwc3-exynos.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
> index f5d963fae9e069e1bd145ff5bd1b704da89fb74c..ca8d2955303c589ea03a261944aadb6582c9cb9f 100644
> --- a/drivers/usb/dwc3/dwc3-exynos.c
> +++ b/drivers/usb/dwc3/dwc3-exynos.c
> @@ -163,6 +163,12 @@ static const struct dwc3_exynos_driverdata exynos7_drvdata = {
>  	.suspend_clk_idx = 1,
>  };
>  
> +static const struct dwc3_exynos_driverdata exynos7870_drvdata = {
> +	.clk_names = { "bus_early", "ctrl", "ref" },
> +	.num_clks = 3,
> +	.suspend_clk_idx = -1,
> +};
> +
>  static const struct dwc3_exynos_driverdata exynos850_drvdata = {
>  	.clk_names = { "bus_early", "ref" },
>  	.num_clks = 2,
> @@ -185,6 +191,9 @@ static const struct of_device_id exynos_dwc3_match[] = {
>  	}, {
>  		.compatible = "samsung,exynos7-dwusb3",
>  		.data = &exynos7_drvdata,
> +	}, {
> +		.compatible = "samsung,exynos7870-dwusb3",
> +		.data = &exynos7870_drvdata,
>  	}, {
>  		.compatible = "samsung,exynos850-dwusb3",
>  		.data = &exynos850_drvdata,
> 
> -- 
> 2.48.1
> 

Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>

Thanks,
Thinh

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

* Re: [PATCH v2 1/2] dt-bindings: usb: samsung,exynos-dwc3: add exynos7870 support
  2025-02-18 18:54 ` [PATCH v2 1/2] dt-bindings: usb: samsung,exynos-dwc3: add exynos7870 support Kaustabh Chakraborty
@ 2025-02-20  8:29   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-20  8:29 UTC (permalink / raw)
  To: Kaustabh Chakraborty, Greg Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Alim Akhtar, Thinh Nguyen
  Cc: linux-usb, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

On 18/02/2025 19:54, Kaustabh Chakraborty wrote:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: samsung,exynos7870-dwusb3
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 3
> +          maxItems: 3
> +        clock-names:
> +          items:
> +            - const: bus_early
> +            - const: ctrl
> +            - const: ref

Other device has order bus_early + ref, so use the same here, thus
bus_early + ref + ctrl.

Rest looks fine.

> 


Best regards,
Krzysztof

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

end of thread, other threads:[~2025-02-20  8:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-18 18:54 [PATCH v2 0/2] Introduce DWC3 support for Exynos7870 Kaustabh Chakraborty
2025-02-18 18:54 ` [PATCH v2 1/2] dt-bindings: usb: samsung,exynos-dwc3: add exynos7870 support Kaustabh Chakraborty
2025-02-20  8:29   ` Krzysztof Kozlowski
2025-02-18 18:54 ` [PATCH v2 2/2] usb: dwc3: exynos: add support for exynos7870 Kaustabh Chakraborty
2025-02-19 22:35   ` Thinh Nguyen

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).