From: Rob Herring <robh@kernel.org>
To: Johan Jonker <jbx6244@gmail.com>
Cc: heiko@sntech.de, linus.walleij@linaro.org, kishon@ti.com,
vkoul@kernel.org, jay.xu@rock-chips.com,
shawn.lin@rock-chips.com, david.wu@rock-chips.com,
zhangqing@rock-chips.com, huangtao@rock-chips.com,
cl@rock-chips.com, linux-phy@lists.infradead.org,
linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 1/4] dt-bindings: phy: convert rockchip-usb-phy.txt to YAML
Date: Mon, 17 May 2021 20:04:38 -0500 [thread overview]
Message-ID: <20210518010438.GA3548693@robh.at.kernel.org> (raw)
In-Reply-To: <20210512122346.9463-2-jbx6244@gmail.com>
On Wed, May 12, 2021 at 02:23:43PM +0200, Johan Jonker wrote:
> Current dts files with Rockchip 'usbphy' nodes are manually verified.
> In order to automate this process rockchip-usb-phy.txt has to be
> converted to YAML.
>
> Add "#phy-cells", because it is a required property
> by phy-provider.yaml
Maybe we should relax that. Or changing the node name would solve it.
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> ---
> .../devicetree/bindings/phy/rockchip-usb-phy.txt | 52 -------------
> .../devicetree/bindings/phy/rockchip-usb-phy.yaml | 86 ++++++++++++++++++++++
> 2 files changed, 86 insertions(+), 52 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
> create mode 100644 Documentation/devicetree/bindings/phy/rockchip-usb-phy.yaml
>
> diff --git a/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt b/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
> deleted file mode 100644
> index 4ed569046..000000000
> --- a/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
> +++ /dev/null
> @@ -1,52 +0,0 @@
> -ROCKCHIP USB2 PHY
> -
> -Required properties:
> - - compatible: matching the soc type, one of
> - "rockchip,rk3066a-usb-phy"
> - "rockchip,rk3188-usb-phy"
> - "rockchip,rk3288-usb-phy"
> - - #address-cells: should be 1
> - - #size-cells: should be 0
> -
> -Deprecated properties:
> - - rockchip,grf : phandle to the syscon managing the "general
> - register files" - phy should be a child of the GRF instead
> -
> -Sub-nodes:
> -Each PHY should be represented as a sub-node.
> -
> -Sub-nodes
> -required properties:
> -- #phy-cells: should be 0
> -- reg: PHY configure reg address offset in GRF
> - "0x320" - for PHY attach to OTG controller
> - "0x334" - for PHY attach to HOST0 controller
> - "0x348" - for PHY attach to HOST1 controller
> -
> -Optional Properties:
> -- clocks : phandle + clock specifier for the phy clocks
> -- clock-names: string, clock name, must be "phyclk"
> -- #clock-cells: for users of the phy-pll, should be 0
> -- reset-names: Only allow the following entries:
> - - phy-reset
> -- resets: Must contain an entry for each entry in reset-names.
> -- vbus-supply: power-supply phandle for vbus power source
> -
> -Example:
> -
> -grf: syscon@ff770000 {
> - compatible = "rockchip,rk3288-grf", "syscon", "simple-mfd";
> -
> -...
> -
> - usbphy: phy {
> - compatible = "rockchip,rk3288-usb-phy";
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - usbphy0: usb-phy0 {
> - #phy-cells = <0>;
> - reg = <0x320>;
> - };
> - };
> -};
> diff --git a/Documentation/devicetree/bindings/phy/rockchip-usb-phy.yaml b/Documentation/devicetree/bindings/phy/rockchip-usb-phy.yaml
> new file mode 100644
> index 000000000..3b6b39da0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/rockchip-usb-phy.yaml
> @@ -0,0 +1,86 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/phy/rockchip-usb-phy.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Rockchip USB2.0 phy
> +
> +maintainers:
> + - Heiko Stuebner <heiko@sntech.de>
> +
> +properties:
> + compatible:
> + oneOf:
> + - const: rockchip,rk3288-usb-phy
> + - items:
> + - enum:
> + - rockchip,rk3066a-usb-phy
> + - rockchip,rk3188-usb-phy
> + - const: rockchip,rk3288-usb-phy
> +
> + "#phy-cells":
> + const: 0
If we did add this, we'd want it to be 1 so we could identify which phy.
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> +required:
> + - compatible
> + - "#phy-cells"
> + - "#address-cells"
> + - "#size-cells"
> +
> +additionalProperties: false
> +
> +patternProperties:
> + "usb-phy@[0-9a-f]+$":
> + type: object
> +
> + properties:
> + reg:
> + maxItems: 1
> +
> + "#phy-cells":
> + const: 0
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + const: phyclk
> +
> + "#clock-cells":
> + const: 0
> +
> + resets:
> + maxItems: 1
> +
> + reset-names:
> + const: phy-reset
> +
> + vbus-supply:
> + description: phandle for vbus power source
> +
> + required:
> + - reg
> + - "#phy-cells"
> +
> + additionalProperties: false
> +
> +examples:
> + - |
> + usbphy: usbphy {
> + compatible = "rockchip,rk3288-usb-phy";
> + #phy-cells = <0>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + usbphy0: usb-phy@320 {
> + reg = <0x320>;
> + #phy-cells = <0>;
> + };
> + };
> --
> 2.11.0
>
next prev parent reply other threads:[~2021-05-18 1:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-12 12:23 [PATCH v5 0/4] convert grf.txt to YAML Johan Jonker
2021-05-12 12:23 ` [PATCH v5 1/4] dt-bindings: phy: convert rockchip-usb-phy.txt " Johan Jonker
2021-05-18 1:04 ` Rob Herring [this message]
2021-05-12 12:23 ` [PATCH v5 2/4] dt-bindings: soc: rockchip: convert grf.txt " Johan Jonker
2021-05-13 2:28 ` Rob Herring
2021-05-12 12:23 ` [PATCH v5 3/4] ARM: dts: rockchip: move and restyle grf nodes rk3066/rk3188 Johan Jonker
2021-05-12 12:23 ` [PATCH v5 4/4] arm64: dts: rename grf-gpio nodename in rk3328.dtsi Johan Jonker
2021-05-14 16:37 ` (subset) [PATCH v5 0/4] convert grf.txt to YAML Heiko Stuebner
2021-05-19 15:17 ` Rob Herring
2021-05-19 23:18 ` Heiko Stübner
2021-05-31 11:57 ` Heiko Stuebner
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=20210518010438.GA3548693@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=cl@rock-chips.com \
--cc=david.wu@rock-chips.com \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=huangtao@rock-chips.com \
--cc=jay.xu@rock-chips.com \
--cc=jbx6244@gmail.com \
--cc=kishon@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=shawn.lin@rock-chips.com \
--cc=vkoul@kernel.org \
--cc=zhangqing@rock-chips.com \
/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).