Skip to contentSkip to conversation

phy: cadence: salvo: add salvo phy driver

PATCH Superseded Peter Chen 4 participants 7 messages Mar 24, 2020 – Apr 7, 2020

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
author
#1 lore raw

PATCH v3 2/2 doc: dt-binding: cdns-salvo-phy: add binding doc

In reply to Peter Chen

Add Cadence SALVO PHY binding doc, this PHY is a legacy module, and is only used for USB3 and USB2.

---
Changes for v3:
- Fix more schema errors

 .../bindings/phy/cdns,salvo-phy.yaml          | 53 +++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml
Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml new file +53 -0
new file mode 100644
index 000000000000..a36e21e1808c
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright (c) 2020 NXP
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/cdns,salvo-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Cadence SALVO PHY
+
+maintainers:
+  - Peter Chen <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - nxp,salvo-phy
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: salvo_phy_clk
+
+  power-domains:
+    maxItems: 1
+    description: phandle to the associated power domain
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/firmware/imx/rsrc.h>
+
+    usb3phy: usb3-phy@5B160000 {
+        compatible = "nxp,salvo-phy";
+        reg = <0x5B160000 0x40000>;
+        clocks = <&usb3_lpcg 4>;
+        clock-names = "salvo_phy_clk";
+        power-domains = <&pd IMX_SC_R_USB_2_PHY>;
+        #phy-cells = <0>;
+    };
Signature · 1 line
2.17.1

Peter Chen

author
#0 lore raw

PATCH v3 1/2 phy: cadence: salvo: add salvo phy driver

Cadence SALVO PHY is a 28nm product, and is only used for USB3 & USB2. According to the Cadence, this PHY is a legacy Module, and Sierra and Torrent are later evolutions from it, and their sequence overlap is minimal, meaning we cannot reuse either (Sierra & Torrent) of the PHY drivers.

---
- No changes for v2 and v3

 drivers/phy/cadence/Kconfig             |   9 +
 drivers/phy/cadence/Makefile            |   1 +
 drivers/phy/cadence/phy-cadence-salvo.c | 316 ++++++++++++++++++++++++
 3 files changed, 326 insertions(+)
 create mode 100644 drivers/phy/cadence/phy-cadence-salvo.c
drivers/phy/cadence/Kconfig +9 -0
index b2db916db64b..eca272b227b7 100644
@@ -27,3 +27,12 @@ config PHY_CADENCE_SIERRA
 	select GENERIC_PHY
 	help
 	  Enable this to support the Cadence Sierra PHY driver
+
+config PHY_CADENCE_SALVO
+	tristate "Cadence Salvo PHY Driver"
+	depends on OF && HAS_IOMEM
+	select GENERIC_PHY
+	help
+	  Enable this to support the Cadence SALVO PHY driver,
+	  this PHY is a legacy PHY, and only are used for USB3
+	  and USB2.
drivers/phy/cadence/Makefile +1 -0
index 8f89560f1711..7c7d13c0c647 100644
@@ -2,3 +2,4 @@
 obj-$(CONFIG_PHY_CADENCE_DP)	+= phy-cadence-dp.o
 obj-$(CONFIG_PHY_CADENCE_DPHY)	+= cdns-dphy.o
 obj-$(CONFIG_PHY_CADENCE_SIERRA)	+= phy-cadence-sierra.o
+obj-$(CONFIG_PHY_CADENCE_SALVO)	+= phy-cadence-salvo.o
drivers/phy/cadence/phy-cadence-salvo.c new file +316 -0

316 lines not on this page · raw message

Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH v3 2/2] doc: dt-binding: cdns-salvo-phy: add binding doc

In reply to Peter Chen
Quoted 73 lines

Add Cadence SALVO PHY binding doc, this PHY is a legacy module, and is only used for USB3 and USB2.

---
Changes for v3:
- Fix more schema errors

 .../bindings/phy/cdns,salvo-phy.yaml          | 53 +++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml
Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml new file +53 -1
new file mode 100644
index 000000000000..a36e21e1808c
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright (c) 2020 NXP
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/cdns,salvo-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Cadence SALVO PHY
+
+maintainers:
+  - Peter Chen <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - nxp,salvo-phy
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: salvo_phy_clk
+
+  power-domains:
+    maxItems: 1
+    description: phandle to the associated power domain
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/firmware/imx/rsrc.h>
+
+    usb3phy: usb3-phy@5B160000 {
+        compatible = "nxp,salvo-phy";
+        reg = <0x5B160000 0x40000>;
+        clocks = <&usb3_lpcg 4>;
+        clock-names = "salvo_phy_clk";
+        power-domains = <&pd IMX_SC_R_USB_2_PHY>;
+        #phy-cells = <0>;
+    };
--
Quoted 2 lines

2.17.1

A gental ping :)

Peter

maintainer
#3 lore raw

Re: [PATCH v3 2/2] doc: dt-binding: cdns-salvo-phy: add binding doc

In reply to Peter Chen
Quoted 38 lines · Peter Chen

Add Cadence SALVO PHY binding doc, this PHY is a legacy module, and is only used for USB3 and USB2.

---
Changes for v3:
- Fix more schema errors

 .../bindings/phy/cdns,salvo-phy.yaml          | 53 +++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml
Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml new file +20 -0
new file mode 100644
index 000000000000..a36e21e1808c
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright (c) 2020 NXP
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/cdns,salvo-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Cadence SALVO PHY
+
+maintainers:
+  - Peter Chen <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - nxp,salvo-phy
+
+  reg:
+    maxItems: 1
+

Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml line 30

Quoted 10 lines
Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml new file +10 -0
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: salvo_phy_clk
+
+  power-domains:
+    maxItems: 1
+    description: phandle to the associated power domain

Drop. That's every power-domains property.

Quoted 6 lines
Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml new file +6 -0
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible

Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml line 46

Quoted 10 lines
Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml new file +10 -0
+  - reg
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/firmware/imx/rsrc.h>
+
+    usb3phy: usb3-phy@5B160000 {

Should be lowercase hex.

Quoted 10 lines
Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml new file +7 -0
+        compatible = "nxp,salvo-phy";
+        reg = <0x5B160000 0x40000>;
+        clocks = <&usb3_lpcg 4>;
+        clock-names = "salvo_phy_clk";
+        power-domains = <&pd IMX_SC_R_USB_2_PHY>;
+        #phy-cells = <0>;
+    };
Signature · 1 line
2.17.1