linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	p.zabel@pengutronix.de, linux-kernel@vger.kernel.org,
	linux-mips@vger.kernel.org, vkoul@kernel.org, kishon@ti.com,
	rtanwar@maxlinear.com
Subject: Re: [PATCH v1 1/9] dt-bindings: phy: lantiq: xway-rcu-usb2-phy: Convert to YAML
Date: Fri, 1 Jul 2022 10:25:21 -0600	[thread overview]
Message-ID: <20220701162521.GA1067947-robh@kernel.org> (raw)
In-Reply-To: <20220628124441.2385023-2-martin.blumenstingl@googlemail.com>

On Tue, Jun 28, 2022 at 02:44:33PM +0200, Martin Blumenstingl wrote:
> Convert the Lantiq XWAY RCU USB2 PHY bindings to YAML.
> 
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  .../phy/lantiq,xway-rcu-usb2-phy.yaml         | 68 +++++++++++++++++++
>  .../bindings/phy/phy-lantiq-rcu-usb2.txt      | 40 -----------
>  2 files changed, 68 insertions(+), 40 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/phy/lantiq,xway-rcu-usb2-phy.yaml
>  delete mode 100644 Documentation/devicetree/bindings/phy/phy-lantiq-rcu-usb2.txt
> 
> diff --git a/Documentation/devicetree/bindings/phy/lantiq,xway-rcu-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/lantiq,xway-rcu-usb2-phy.yaml
> new file mode 100644
> index 000000000000..702a8e8c64b5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/lantiq,xway-rcu-usb2-phy.yaml
> @@ -0,0 +1,68 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/phy/lantiq,xway-rcu-usb2-phy.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Lantiq XWAY SoC RCU USB 1.1/2.0 PHY binding
> +
> +maintainers:
> +  - Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> +
> +properties:
> +  "#phy-cells":
> +    const: 0
> +
> +  compatible:
> +    enum:
> +      - lantiq,ase-usb2-phy
> +      - lantiq,danube-usb2-phy
> +      - lantiq,xrx100-usb2-phy
> +      - lantiq,xrx200-usb2-phy
> +      - lantiq,xrx300-usb2-phy
> +
> +  reg:
> +    minItems: 2

Need to define what each entry is which you lost.

> +
> +  clocks:
> +    minItems: 1
> +
> +  clock-names:
> +    items:
> +      - const: phy
> +
> +  resets:
> +    minItems: 1

But reset-names requires 2 entries.

> +    maxItems: 2
> +
> +  reset-names:
> +    items:
> +      - const: phy

'phy' was optional before. You may want to add another case with oneOf:

items:
  - const: ctrl

I'm not sure on all the possibilities though. Is 'ctrl' optional?

> +      - const: ctrl
> +
> +required:
> +  - "#phy-cells"
> +  - compatible
> +  - reg
> +  - clocks
> +  - clock-names
> +  - resets
> +  - reset-names
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    usb_phy0: usb2-phy@18 {
> +        compatible = "lantiq,xrx200-usb2-phy";
> +        reg = <0x18 4>, <0x38 4>;
> +
> +        clocks = <&pmu_USB0_PHY>;
> +        clock-names = "phy";
> +
> +        resets = <&reset1 4 4>, <&reset0 4 4>;
> +        reset-names = "phy", "ctrl";
> +
> +        #phy-cells = <0>;
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/phy/phy-lantiq-rcu-usb2.txt b/Documentation/devicetree/bindings/phy/phy-lantiq-rcu-usb2.txt
> deleted file mode 100644
> index 643948b6b576..000000000000
> --- a/Documentation/devicetree/bindings/phy/phy-lantiq-rcu-usb2.txt
> +++ /dev/null
> @@ -1,40 +0,0 @@
> -Lantiq XWAY SoC RCU USB 1.1/2.0 PHY binding
> -===========================================
> -
> -This binding describes the USB PHY hardware provided by the RCU module on the
> -Lantiq XWAY SoCs.
> -
> -This node has to be a sub node of the Lantiq RCU block.
> -
> --------------------------------------------------------------------------------
> -Required properties (controller (parent) node):
> -- compatible	: Should be one of
> -			"lantiq,ase-usb2-phy"
> -			"lantiq,danube-usb2-phy"
> -			"lantiq,xrx100-usb2-phy"
> -			"lantiq,xrx200-usb2-phy"
> -			"lantiq,xrx300-usb2-phy"
> -- reg		: Defines the following sets of registers in the parent
> -		  syscon device
> -			- Offset of the USB PHY configuration register
> -			- Offset of the USB Analog configuration
> -			  register (only for xrx200 and xrx200)
> -- clocks	: References to the (PMU) "phy" clk gate.
> -- clock-names	: Must be "phy"
> -- resets	: References to the RCU USB configuration reset bits.
> -- reset-names	: Must be one of the following:
> -			"phy" (optional)
> -			"ctrl" (shared)
> -
> --------------------------------------------------------------------------------
> -Example for the USB PHYs on an xRX200 SoC:
> -	usb_phy0: usb2-phy@18 {
> -		compatible = "lantiq,xrx200-usb2-phy";
> -		reg = <0x18 4>, <0x38 4>;
> -
> -		clocks = <&pmu PMU_GATE_USB0_PHY>;
> -		clock-names = "phy";
> -		resets = <&reset1 4 4>, <&reset0 4 4>;
> -		reset-names = "phy", "ctrl";
> -		#phy-cells = <0>;
> -	};
> -- 
> 2.36.1
> 
> 

  reply	other threads:[~2022-07-01 16:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 12:44 [PATCH v1 0/9] reset: replace reset-lantiq with reset-intel-gw Martin Blumenstingl
2022-06-28 12:44 ` [PATCH v1 1/9] dt-bindings: phy: lantiq: xway-rcu-usb2-phy: Convert to YAML Martin Blumenstingl
2022-07-01 16:25   ` Rob Herring [this message]
2022-06-28 12:44 ` [PATCH v1 2/9] dt-bindings: reset: intel,rcu-gw: Allow up to three global reset items Martin Blumenstingl
2022-07-01 16:26   ` Rob Herring
2022-06-28 12:44 ` [PATCH v1 3/9] dt-bindings: reset: intel,rcu-gw: Update bindings for "legacy" SoCs Martin Blumenstingl
2022-07-01 16:33   ` Rob Herring
2022-07-02 23:04     ` Martin Blumenstingl
2022-07-12 15:21       ` Rob Herring
2022-06-28 12:44 ` [PATCH v1 4/9] dt-bindings: mips: lantiq: rcu: Remove binding documentation Martin Blumenstingl
2022-07-01 16:34   ` Rob Herring
2022-06-28 12:44 ` [PATCH v1 5/9] reset: intel: Allow enabling the driver on "LANTIQ" (MIPS) platforms Martin Blumenstingl
2022-06-28 12:44 ` [PATCH v1 6/9] reset: intel: Add and update compatible strings Lantiq SoCs Martin Blumenstingl
2022-06-28 12:44 ` [PATCH v1 7/9] reset: intel: Use syscon_node_to_regmap on legacy SoCs Martin Blumenstingl
2022-06-28 12:44 ` [PATCH v1 8/9] reset: lantiq: Remove driver as it has been replaced by reset-intel-gw Martin Blumenstingl
2022-06-28 12:44 ` [PATCH v1 9/9] mips: dts: lantiq: Update the RCU node to match the intel,rcu-gw binding Martin Blumenstingl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220701162521.GA1067947-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=rtanwar@maxlinear.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).