diff mbox series

[v3,1/3] dt-binding: phy: convert ti,omap-usb2 to YAML

Message ID 20200630092729.15346-2-rogerq@ti.com
State Superseded
Headers show
Series phy: omap-usb2: add quirk to disable charger detection | expand

Commit Message

Roger Quadros June 30, 2020, 9:27 a.m. UTC
Move ti,omap-usb2 to its own YAML schema.

Signed-off-by: Roger Quadros <rogerq@ti.com>

Reviewed-by: Rob Herring <robh@kernel.org>

---
 .../devicetree/bindings/phy/ti,omap-usb2.yaml | 69 +++++++++++++++++++
 .../devicetree/bindings/phy/ti-phy.txt        | 37 ----------
 2 files changed, 69 insertions(+), 37 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/ti,omap-usb2.yaml

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Comments

Rob Herring July 2, 2020, 8:47 p.m. UTC | #1
On Tue, 30 Jun 2020 12:27:27 +0300, Roger Quadros wrote:
> Move ti,omap-usb2 to its own YAML schema.

> 

> Signed-off-by: Roger Quadros <rogerq@ti.com>

> Reviewed-by: Rob Herring <robh@kernel.org>

> ---

>  .../devicetree/bindings/phy/ti,omap-usb2.yaml | 69 +++++++++++++++++++

>  .../devicetree/bindings/phy/ti-phy.txt        | 37 ----------

>  2 files changed, 69 insertions(+), 37 deletions(-)

>  create mode 100644 Documentation/devicetree/bindings/phy/ti,omap-usb2.yaml

> 



My bot found errors running 'make dt_binding_check' on your patch:

/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/ti,omap-usb2.example.dt.yaml: example-0: phy@4100000:reg:0: [0, 68157440, 0, 84] is too long


See https://patchwork.ozlabs.org/patch/1319665

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

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.
Roger Quadros July 3, 2020, 8:58 a.m. UTC | #2
Hi Rob,

On 02/07/2020 23:47, Rob Herring wrote:
> On Tue, 30 Jun 2020 12:27:27 +0300, Roger Quadros wrote:

>> Move ti,omap-usb2 to its own YAML schema.

>>

>> Signed-off-by: Roger Quadros <rogerq@ti.com>

>> Reviewed-by: Rob Herring <robh@kernel.org>

>> ---

>>   .../devicetree/bindings/phy/ti,omap-usb2.yaml | 69 +++++++++++++++++++

>>   .../devicetree/bindings/phy/ti-phy.txt        | 37 ----------

>>   2 files changed, 69 insertions(+), 37 deletions(-)

>>   create mode 100644 Documentation/devicetree/bindings/phy/ti,omap-usb2.yaml

>>

> 

> 

> My bot found errors running 'make dt_binding_check' on your patch:

> 

> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/ti,omap-usb2.example.dt.yaml: example-0: phy@4100000:reg:0: [0, 68157440, 0, 84] is too long

> 


In my local build in the dt example I see

     phy@4100000:
       compatible: ["ti,am654-usb2", "ti,omap-usb2"]
       reg: [[0x0, 0x4100000, 0x0, 0x54]]

And I don't see any errors. I've updated my dt-schema as well.

> 

> See https://patchwork.ozlabs.org/patch/1319665

> 

> If you already ran 'make dt_binding_check' and didn't see the above

> error(s), then make sure dt-schema is up to date:

> 

> pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

> 

> Please check and re-submit.

> 


-- 
cheers,
-roger

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Roger Quadros July 16, 2020, 7:49 a.m. UTC | #3
On 03/07/2020 11:58, Roger Quadros wrote:
> Hi Rob,

> 

> On 02/07/2020 23:47, Rob Herring wrote:

>> On Tue, 30 Jun 2020 12:27:27 +0300, Roger Quadros wrote:

>>> Move ti,omap-usb2 to its own YAML schema.

>>>

>>> Signed-off-by: Roger Quadros <rogerq@ti.com>

>>> Reviewed-by: Rob Herring <robh@kernel.org>

>>> ---

>>>   .../devicetree/bindings/phy/ti,omap-usb2.yaml | 69 +++++++++++++++++++

>>>   .../devicetree/bindings/phy/ti-phy.txt        | 37 ----------

>>>   2 files changed, 69 insertions(+), 37 deletions(-)

>>>   create mode 100644 Documentation/devicetree/bindings/phy/ti,omap-usb2.yaml

>>>

>>

>>

>> My bot found errors running 'make dt_binding_check' on your patch:

>>

>> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/ti,omap-usb2.example.dt.yaml: example-0: phy@4100000:reg:0: [0, 68157440, 0, 84] is too long

>>

> 

> In my local build in the dt example I see

> 

>      phy@4100000:

>        compatible: ["ti,am654-usb2", "ti,omap-usb2"]

>        reg: [[0x0, 0x4100000, 0x0, 0x54]]

> 

> And I don't see any errors. I've updated my dt-schema as well.


I'm able to see the issue now. Will fix it and send v4.

> 

>>

>> See https://patchwork.ozlabs.org/patch/1319665

>>

>> If you already ran 'make dt_binding_check' and didn't see the above

>> error(s), then make sure dt-schema is up to date:

>>

>> pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

>>

>> Please check and re-submit.

>>

> 


cheers,
-roger
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/phy/ti,omap-usb2.yaml b/Documentation/devicetree/bindings/phy/ti,omap-usb2.yaml
new file mode 100644
index 000000000000..8df74629dc55
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/ti,omap-usb2.yaml
@@ -0,0 +1,69 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/ti,omap-usb2.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OMAP USB2 PHY
+
+maintainers:
+ - Kishon Vijay Abraham I <kishon@ti.com>
+ - Roger Quadros <rogerq@ti.com>
+
+properties:
+  compatible:
+    items:
+      - enum:
+        - ti,dra7x-usb2
+        - ti,dra7x-usb2-phy2a
+        - ti,am654-usb2
+      - enum:
+        - ti,omap-usb2
+
+  reg:
+    maxItems: 1
+
+  '#phy-cells':
+    const: 0
+
+  clocks:
+    minItems: 1
+    items:
+      - description: wakeup clock
+      - description: reference clock
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: wkupclk
+      - const: refclk
+
+  syscon-phy-power:
+    $ref: /schemas/types.yaml#definitions/phandle-array
+    description:
+      phandle/offset pair. Phandle to the system control module and
+      register offset to power on/off the PHY.
+
+  ctrl-module:
+    $ref: /schemas/types.yaml#definitions/phandle
+    description:
+      (deprecated) phandle of the control module used by PHY driver
+      to power on the PHY. Use syscon-phy-power instead.
+
+required:
+  - compatible
+  - reg
+  - '#phy-cells'
+  - clocks
+  - clock-names
+
+examples:
+  - |
+    usb0_phy: phy@4100000 {
+      compatible = "ti,am654-usb2", "ti,omap-usb2";
+      reg = <0x0 0x4100000 0x0 0x54>;
+      syscon-phy-power = <&scm_conf 0x4000>;
+      clocks = <&k3_clks 151 0>, <&k3_clks 151 1>;
+      clock-names = "wkupclk", "refclk";
+      #phy-cells = <0>;
+    };
diff --git a/Documentation/devicetree/bindings/phy/ti-phy.txt b/Documentation/devicetree/bindings/phy/ti-phy.txt
index 8f93c3b694a7..60c9d0ac75e6 100644
--- a/Documentation/devicetree/bindings/phy/ti-phy.txt
+++ b/Documentation/devicetree/bindings/phy/ti-phy.txt
@@ -27,43 +27,6 @@  omap_control_usb: omap-control-usb@4a002300 {
         reg-names = "otghs_control";
 };
 
-OMAP USB2 PHY
-
-Required properties:
- - compatible: Should be "ti,omap-usb2"
-	       Should be "ti,dra7x-usb2" for the 1st instance of USB2 PHY on
-	       DRA7x
-	       Should be "ti,dra7x-usb2-phy2" for the 2nd instance of USB2 PHY
-	       in DRA7x
-	       Should be "ti,am654-usb2" for the USB2 PHYs on AM654.
- - reg : Address and length of the register set for the device.
- - #phy-cells: determine the number of cells that should be given in the
-   phandle while referencing this phy.
- - clocks: a list of phandles and clock-specifier pairs, one for each entry in
-   clock-names.
- - clock-names: should include:
-   * "wkupclk" - wakeup clock.
-   * "refclk" - reference clock (optional).
-
-Deprecated properties:
- - ctrl-module : phandle of the control module used by PHY driver to power on
-   the PHY.
-
-Recommended properies:
-- syscon-phy-power : phandle/offset pair. Phandle to the system control
-  module and the register offset to power on/off the PHY.
-
-This is usually a subnode of ocp2scp to which it is connected.
-
-usb2phy@4a0ad080 {
-	compatible = "ti,omap-usb2";
-	reg = <0x4a0ad080 0x58>;
-	ctrl-module = <&omap_control_usb>;
-	#phy-cells = <0>;
-	clocks = <&usb_phy_cm_clk32k>, <&usb_otg_ss_refclk960m>;
-	clock-names = "wkupclk", "refclk";
-};
-
 TI PIPE3 PHY
 
 Required properties: