2022-07-25 02:55:20

by Vincent Shih

[permalink] [raw]
Subject: [PATCH v5 0/2] Add USB2.0 phy driver for Sunplus SP7021

This is a patch series for USB2.0 phy driver for Sunplus SP7021 SoC.

Sunplus SP7021 is an ARM Coretex A7 (4 cores) based SoC. It integrates
many peripherals (ex: UART, I2C, SPI, SDIO, eMMC, USB, SD Card and
etc.) into a single chip. It is designed for industrial control.

Refer to:
https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
https://tibbo.com/store/plus1.html

Vincent Shih (2):
phy: usb: Add USB2.0 phy driver for Sunplus SP7021
dt-bindings: phy: Add bindings doc for Sunplus USB2

.../bindings/phy/sunplus,sp7021-usb2-phy.yaml | 73 +++++
MAINTAINERS | 9 +
drivers/phy/Kconfig | 1 +
drivers/phy/Makefile | 1 +
drivers/phy/sunplus/Kconfig | 12 +
drivers/phy/sunplus/Makefile | 2 +
drivers/phy/sunplus/phy-sunplus-usb2.c | 297 +++++++++++++++++++++
7 files changed, 395 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/sunplus,sp7021-usb2-phy.yaml
create mode 100644 drivers/phy/sunplus/Kconfig
create mode 100644 drivers/phy/sunplus/Makefile
create mode 100644 drivers/phy/sunplus/phy-sunplus-usb2.c

--
2.7.4


2022-07-25 02:57:41

by Vincent Shih

[permalink] [raw]
Subject: [PATCH v5 2/2] dt-bindings: phy: Add bindings doc for Sunplus USB2 PHY driver

Add bindings doc for Sunplus USB2 PHY driver

Reviewed-by: Rob Herring <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Vincent Shih <[email protected]>
---
Changes in v5
- No change

.../bindings/phy/sunplus,sp7021-usb2-phy.yaml | 73 ++++++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 74 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/sunplus,sp7021-usb2-phy.yaml

diff --git a/Documentation/devicetree/bindings/phy/sunplus,sp7021-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/sunplus,sp7021-usb2-phy.yaml
new file mode 100644
index 0000000..069d422
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/sunplus,sp7021-usb2-phy.yaml
@@ -0,0 +1,73 @@
+# 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/phy/sunplus,sp7021-usb2-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Sunplus SP7021 USB 2.0 PHY Controller
+
+maintainers:
+ - Vincent Shih <[email protected]>
+
+properties:
+ compatible:
+ const: sunplus,sp7021-usb2-phy
+
+ reg:
+ items:
+ - description: UPHY register region
+ - description: MOON4 register region
+
+ reg-names:
+ items:
+ - const: phy
+ - const: moon4
+
+ clocks:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ "#phy-cells":
+ const: 0
+
+ nvmem-cell-names:
+ description: names corresponding to the nvmem cells of disconnect voltage
+ const: disc_vol
+
+ nvmem-cells:
+ description: nvmem cell address of disconnect voltage
+ maxItems: 1
+
+ sunplus,disc-vol-addr-off:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: the otp address offset of disconnect voltage
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - clocks
+ - resets
+ - "#phy-cells"
+ - nvmem-cell-names
+ - nvmem-cells
+ - sunplus,disc-vol-addr-off
+
+additionalProperties: false
+
+examples:
+ - |
+ sp_uphy0: usb-phy@9c004a80 {
+ compatible = "sunplus,sp7021-usb2-phy";
+ reg = <0x9c004a80 0x80>, <0x9c000248 0x10>;
+ reg-names = "phy", "moon4";
+ clocks = <&clkc 0x3d>;
+ resets = <&rstc 0x2d>;
+ #phy-cells = <0>;
+ nvmem-cell-names = "disc_vol";
+ nvmem-cells = <&disc_vol>;
+ sunplus,disc-vol-addr-off = <0>;
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 31d2ba0..989e5ba 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19227,6 +19227,7 @@ SUNPLUS USB2 PHY DRIVER
M: Vincent Shih <[email protected]>
L: [email protected]
S: Maintained
+F: Documentation/devicetree/bindings/phy/sunplus,sp7021-usb2-phy.yaml
F: drivers/phy/sunplus/Kconfig
F: drivers/phy/sunplus/Makefile
F: drivers/phy/sunplus/phy-sunplus-usb2.c
--
2.7.4

2022-09-02 15:56:24

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v5 0/2] Add USB2.0 phy driver for Sunplus SP7021

On 25-07-22, 10:44, Vincent Shih wrote:
> This is a patch series for USB2.0 phy driver for Sunplus SP7021 SoC.
>
> Sunplus SP7021 is an ARM Coretex A7 (4 cores) based SoC. It integrates
> many peripherals (ex: UART, I2C, SPI, SDIO, eMMC, USB, SD Card and
> etc.) into a single chip. It is designed for industrial control.

Applied, thanks

--
~Vinod