2022-03-14 09:29:17

by Vincent Shih

[permalink] [raw]
Subject: [PATCH v1 2/2] dt-bindings: usb: Add bindings doc for Sunplus USB HOST OHCI driver

Add bindings doc for Sunplus USB HOST OHCI driver

Signed-off-by: Vincent Shih <[email protected]>
---
.../bindings/usb/sunplus,sp7021-usb-ohci.yaml | 69 ++++++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 70 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml

diff --git a/Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml b/Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml
new file mode 100644
index 0000000..7583b68
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) Sunplus Co., Ltd. 2021
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/sunplus,sp7021-usb-ohci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sunplus SP7021 OHCI Controller Device Tree Bindings
+
+allOf:
+ - $ref: usb-hcd.yaml#
+
+maintainers:
+ - Vincent Shih <[email protected]>
+
+description:
+ Sunplus SP7021 USB HOST IP is a USB2.0 Host Controller. It supports both
+ Enhanced Host Controller Interface (EHCI) and Open Host Controller Interface
+ (OHCI).
+
+ It supports 32-bits address bus and 64bit data bus interface, compliant
+ to AMBA AXI interface for data transfer.
+
+ It supports 32-bits address and data bus interface, compliant to AMBA
+ AHB interface for register configurations.
+
+ It supports 32-bits address and data bus interface, compliant to AMBA
+ AXI interface for register alternative configurations.
+
+ The UTM Interface block generates PHY control signals, compliant to
+ USB2.0 Transceiver Macrocell Interface Specification Revision 1.0.
+
+properties:
+ compatible:
+ const: sunplus,sp7021-usb-ohci
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - resets
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ sp_ohci0: usb@9c102080 {
+ compatible = "sunplus,sp7021-usb-ohci";
+ reg = <0x9c102080 0x68>;
+ clocks = <&clkc 0x3a>;
+ resets = <&rstc 0x2a>;
+ interrupt-parent = <&intc>;
+ interrupts = <15 IRQ_TYPE_LEVEL_HIGH>;
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index f7a9ed7..4c80c39 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17949,6 +17949,7 @@ SUNPLUS USB OHCI DRIVER
M: Vincent Shih <[email protected]>
L: [email protected]
S: Maintained
+F: Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml
F: drivers/usb/host/ohci-sunplus.c

SUPERH
--
2.7.4


2022-03-16 03:21:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v1 2/2] dt-bindings: usb: Add bindings doc for Sunplus USB HOST OHCI driver

On 14/03/2022 06:32, Vincent Shih wrote:
> Add bindings doc for Sunplus USB HOST OHCI driver
>
> Signed-off-by: Vincent Shih <[email protected]>
> ---
> .../bindings/usb/sunplus,sp7021-usb-ohci.yaml | 69 ++++++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 70 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml
>
> diff --git a/Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml b/Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml
> new file mode 100644
> index 0000000..7583b68
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml
> @@ -0,0 +1,69 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright (C) Sunplus Co., Ltd. 2021
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/sunplus,sp7021-usb-ohci.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +

Looks good. Few minor nitpicks:

> +title: Sunplus SP7021 OHCI Controller Device Tree Bindings

Remove "Device Tree Bindings" words here. Title is about hardware.

> +
> +allOf:
> + - $ref: usb-hcd.yaml#

Put entire "allOf:" just before "properties:".

> +
> +maintainers:
> + - Vincent Shih <[email protected]>
> +
> +description:
> + Sunplus SP7021 USB HOST IP is a USB2.0 Host Controller. It supports both
> + Enhanced Host Controller Interface (EHCI) and Open Host Controller Interface
> + (OHCI).
> +
> + It supports 32-bits address bus and 64bit data bus interface, compliant
> + to AMBA AXI interface for data transfer.
> +
> + It supports 32-bits address and data bus interface, compliant to AMBA
> + AHB interface for register configurations.
> +
> + It supports 32-bits address and data bus interface, compliant to AMBA
> + AXI interface for register alternative configurations.
> +
> + The UTM Interface block generates PHY control signals, compliant to
> + USB2.0 Transceiver Macrocell Interface Specification Revision 1.0.
> +
> +properties:
> + compatible:
> + const: sunplus,sp7021-usb-ohci
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1

You might need here phys. Are you sure you do not need to configure the
phy for OHCI? You should not assume it would be configured by other driver.

Best regards,
Krzysztof

2022-03-17 10:47:06

by Vincent Shih

[permalink] [raw]
Subject: Re: [PATCH v1 2/2] dt-bindings: usb: Add bindings doc for Sunplus USB HOST OHCI driver

Hi, Krzysztof

Krzysztof Kozlowski <[email protected]> 於 2022年3月15日
週二 上午12:42寫道:
>
> On 14/03/2022 06:32, Vincent Shih wrote:
> > Add bindings doc for Sunplus USB HOST OHCI driver
> >
> > Signed-off-by: Vincent Shih <[email protected]>
> > ---
> > .../bindings/usb/sunplus,sp7021-usb-ohci.yaml | 69 ++++++++++++++++++++++
> > MAINTAINERS | 1 +
> > 2 files changed, 70 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml b/Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml
> > new file mode 100644
> > index 0000000..7583b68
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/usb/sunplus,sp7021-usb-ohci.yaml
> > @@ -0,0 +1,69 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +# Copyright (C) Sunplus Co., Ltd. 2021
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/usb/sunplus,sp7021-usb-ohci.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
>
> Looks good. Few minor nitpicks:
>
> > +title: Sunplus SP7021 OHCI Controller Device Tree Bindings
>
> Remove "Device Tree Bindings" words here. Title is about hardware.
>

Yes, I will remove it.

> > +
> > +allOf:
> > + - $ref: usb-hcd.yaml#
>
> Put entire "allOf:" just before "properties:".

Yes, I will modify it.

>
> > +
> > +maintainers:
> > + - Vincent Shih <[email protected]>
> > +
> > +description:
> > + Sunplus SP7021 USB HOST IP is a USB2.0 Host Controller. It supports both
> > + Enhanced Host Controller Interface (EHCI) and Open Host Controller Interface
> > + (OHCI).
> > +
> > + It supports 32-bits address bus and 64bit data bus interface, compliant
> > + to AMBA AXI interface for data transfer.
> > +
> > + It supports 32-bits address and data bus interface, compliant to AMBA
> > + AHB interface for register configurations.
> > +
> > + It supports 32-bits address and data bus interface, compliant to AMBA
> > + AXI interface for register alternative configurations.
> > +
> > + The UTM Interface block generates PHY control signals, compliant to
> > + USB2.0 Transceiver Macrocell Interface Specification Revision 1.0.
> > +
> > +properties:
> > + compatible:
> > + const: sunplus,sp7021-usb-ohci
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + clocks:
> > + maxItems: 1
> > +
> > + resets:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
>
> You might need here phys. Are you sure you do not need to configure the
> phy for OHCI? You should not assume it would be configured by other driver.
>

Yes, OHCI driver does not need to configure phy according to the
suggestion of our RD.
The default status of phy after power-on is good enough for OHCI.

> Best regards,
> Krzysztof

Thanks for your review.