mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] usb: dwc3: add glue driver for Hi3798MV200
@ 2024-02-23 17:17 Yang Xiwen via B4 Relay
  2024-02-23 17:17 ` [PATCH 1/2] dt-bindings: usb: add hisilicon,hi3798mv200-dwc3 Yang Xiwen via B4 Relay
  2024-02-23 17:17 ` [PATCH 2/2] usb: dwc3: of-simple: Add compatible for hi3798mv200 DWC3 controller Yang Xiwen via B4 Relay
  0 siblings, 2 replies; 4+ messages in thread
From: Yang Xiwen via B4 Relay @ 2024-02-23 17:17 UTC (permalink / raw)
  To: Thinh Nguyen, Greg Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Yang Xiwen
  Cc: linux-usb, linux-kernel, devicetree, Yang Xiwen

Hi3798MV200 uses DWC3 with a few more clocks and a dedicated reset.

Note xhci-histb.c can also be used. But since it's DWC3 in fact, trying
to support it with the help of DWC3 framework seems a better solution.

Hi3798CV200 can also try to migrate to this driver too. Thus we can
remove xhci-histb.c in the future.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
---
Yang Xiwen (2):
      dt-bindings: usb: add hisilicon,hi3798mv200-dwc3
      usb: dwc3: of-simple: Add compatible for hi3798mv200 DWC3 controller

 .../bindings/usb/hisilicon,hi3798mv200-dwc3.yaml   | 100 +++++++++++++++++++++
 drivers/usb/dwc3/dwc3-of-simple.c                  |   1 +
 2 files changed, 101 insertions(+)
---
base-commit: 8d3dea210042f54b952b481838c1e7dfc4ec751d
change-id: 20240217-dwc3-697828b480aa

Best regards,
-- 
Yang Xiwen <forbidden405@outlook.com>


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

* [PATCH 1/2] dt-bindings: usb: add hisilicon,hi3798mv200-dwc3
  2024-02-23 17:17 [PATCH 0/2] usb: dwc3: add glue driver for Hi3798MV200 Yang Xiwen via B4 Relay
@ 2024-02-23 17:17 ` Yang Xiwen via B4 Relay
  2024-02-23 21:30   ` Rob Herring
  2024-02-23 17:17 ` [PATCH 2/2] usb: dwc3: of-simple: Add compatible for hi3798mv200 DWC3 controller Yang Xiwen via B4 Relay
  1 sibling, 1 reply; 4+ messages in thread
From: Yang Xiwen via B4 Relay @ 2024-02-23 17:17 UTC (permalink / raw)
  To: Thinh Nguyen, Greg Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Yang Xiwen
  Cc: linux-usb, linux-kernel, devicetree, Yang Xiwen

From: Yang Xiwen <forbidden405@outlook.com>

Document the DWC3 controller used by Hi3798MV200.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
---
 .../bindings/usb/hisilicon,hi3798mv200-dwc3.yaml   | 100 +++++++++++++++++++++
 1 file changed, 100 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/hisilicon,hi3798mv200-dwc3.yaml b/Documentation/devicetree/bindings/usb/hisilicon,hi3798mv200-dwc3.yaml
new file mode 100644
index 000000000000..0884d1ba6723
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/hisilicon,hi3798mv200-dwc3.yaml
@@ -0,0 +1,100 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/hisilicon,hi3798mv200-dwc3.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HiSilicon Hi3798MV200 DWC3 USB SoC controller
+
+maintainers:
+  - Yang Xiwen <forbidden405@foxmail.com>
+
+properties:
+  compatible:
+    const: hisilicon,hi3798mv200-dwc3
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 1
+
+  ranges: true
+
+  clocks:
+    items:
+      - description: Controller bus clock
+      - description: Controller suspend clock
+      - description: Controller reference clock
+      - description: Controller gm clock
+      - description: Controller gs clock
+      - description: Controller utmi clock
+      - description: Controller pipe clock
+
+  clock-names:
+    items:
+      - const: bus
+      - const: suspend
+      - const: ref
+      - const: gm
+      - const: gs
+      - const: utmi
+      - const: pipe
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    const: soft
+
+patternProperties:
+  '^usb@[0-9a-z]+$':
+    $ref: snps,dwc3.yaml#
+
+additionalProperties: false
+
+required:
+  - compatible
+  - '#address-cells'
+  - '#size-cells'
+  - ranges
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+
+examples:
+  - |
+    #include <dt-bindings/clock/histb-clock.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    usb@98a0000 {
+            compatible = "hisilicon,hi3798mv200-dwc3";
+            #address-cells = <1>;
+            #size-cells = <1>;
+            ranges;
+            clocks = <&crg HISTB_USB3_BUS_CLK>,
+                     <&crg HISTB_USB3_SUSPEND_CLK>,
+                     <&crg HISTB_USB3_REF_CLK>,
+                     <&crg HISTB_USB3_GM_CLK>,
+                     <&crg HISTB_USB3_GS_CLK>,
+                     <&crg HISTB_USB3_UTMI_CLK>,
+                     <&crg HISTB_USB3_PIPE_CLK>;
+            clock-names = "bus", "suspend", "ref", "gm", "gs", "utmi", "pipe";
+            resets = <&crg 0xb0 12>;
+            reset-names = "soft";
+
+            usb@98a0000 {
+                    compatible = "snps,dwc3";
+                    reg = <0x98a0000 0x10000>;
+                    interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+                    clocks = <&crg HISTB_USB3_BUS_CLK>,
+                             <&crg HISTB_USB3_SUSPEND_CLK>,
+                             <&crg HISTB_USB3_REF_CLK>;
+                    clock-names = "bus_early", "suspend", "ref";
+                    phys = <&usb2_phy1_port2>, <&combphy0 0>;
+                    phy-names = "usb2-phy", "usb3-phy";
+                    maximum-speed = "super-speed";
+                    dr_mode = "host";
+            };
+    };

-- 
2.43.0


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

* [PATCH 2/2] usb: dwc3: of-simple: Add compatible for hi3798mv200 DWC3 controller
  2024-02-23 17:17 [PATCH 0/2] usb: dwc3: add glue driver for Hi3798MV200 Yang Xiwen via B4 Relay
  2024-02-23 17:17 ` [PATCH 1/2] dt-bindings: usb: add hisilicon,hi3798mv200-dwc3 Yang Xiwen via B4 Relay
@ 2024-02-23 17:17 ` Yang Xiwen via B4 Relay
  1 sibling, 0 replies; 4+ messages in thread
From: Yang Xiwen via B4 Relay @ 2024-02-23 17:17 UTC (permalink / raw)
  To: Thinh Nguyen, Greg Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Yang Xiwen
  Cc: linux-usb, linux-kernel, devicetree, Yang Xiwen

From: Yang Xiwen <forbidden405@outlook.com>

Hi3798MV200 uses dwc3 controller with a few more clocks and a dedicated
resets. Use of_simple driver for it.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
---
 drivers/usb/dwc3/dwc3-of-simple.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
index d1539fc9eabd..158acae08af5 100644
--- a/drivers/usb/dwc3/dwc3-of-simple.c
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
@@ -173,6 +173,7 @@ static const struct of_device_id of_dwc3_simple_match[] = {
 	{ .compatible = "sprd,sc9860-dwc3" },
 	{ .compatible = "allwinner,sun50i-h6-dwc3" },
 	{ .compatible = "hisilicon,hi3670-dwc3" },
+	{ .compatible = "hisilicon,hi3798mv200-dwc3" },
 	{ .compatible = "intel,keembay-dwc3" },
 	{ /* Sentinel */ }
 };

-- 
2.43.0


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

* Re: [PATCH 1/2] dt-bindings: usb: add hisilicon,hi3798mv200-dwc3
  2024-02-23 17:17 ` [PATCH 1/2] dt-bindings: usb: add hisilicon,hi3798mv200-dwc3 Yang Xiwen via B4 Relay
@ 2024-02-23 21:30   ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2024-02-23 21:30 UTC (permalink / raw)
  To: Yang Xiwen
  Cc: Thinh Nguyen, devicetree, linux-kernel, Yang Xiwen, Conor Dooley,
	Rob Herring, Krzysztof Kozlowski, Greg Kroah-Hartman, linux-usb


On Sat, 24 Feb 2024 01:17:49 +0800, Yang Xiwen wrote:
> Document the DWC3 controller used by Hi3798MV200.
> 
> Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
> ---
>  .../bindings/usb/hisilicon,hi3798mv200-dwc3.yaml   | 100 +++++++++++++++++++++
>  1 file changed, 100 insertions(+)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/usb/hisilicon,hi3798mv200-dwc3.example.dts:34.32-33 syntax error
FATAL ERROR: Unable to parse input tree
make[2]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/usb/hisilicon,hi3798mv200-dwc3.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1428: dt_binding_check] Error 2
make: *** [Makefile:240: __sub-make] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240224-dwc3-v1-1-7ffb2e2baa73@outlook.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

end of thread, other threads:[~2024-02-23 21:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23 17:17 [PATCH 0/2] usb: dwc3: add glue driver for Hi3798MV200 Yang Xiwen via B4 Relay
2024-02-23 17:17 ` [PATCH 1/2] dt-bindings: usb: add hisilicon,hi3798mv200-dwc3 Yang Xiwen via B4 Relay
2024-02-23 21:30   ` Rob Herring
2024-02-23 17:17 ` [PATCH 2/2] usb: dwc3: of-simple: Add compatible for hi3798mv200 DWC3 controller Yang Xiwen via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®