public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Rob Herring <robh+dt@kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH] dt-bindings: phy: Convert Broadcom SATA PHY to YAML
Date: Mon, 30 Nov 2020 21:04:34 +0530	[thread overview]
Message-ID: <20201130153434.GT8403@vkoul-mobl> (raw)
In-Reply-To: <20201122032926.2185026-1-f.fainelli@gmail.com>

Hi Florian,


On 21-11-20, 19:29, Florian Fainelli wrote:
> Update the Broadcom SATA PHY Device Tree binding to a YAML format.
> 
> Suggested-by: Vinod Koul <vkoul@kernel.org>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

I am getting these warns:

Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml:19:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml:20:12: [warning] wrong indentation: expected 12 but found 11 (indentation)
Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml:26:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml:28:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml:30:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml:51:6: [warning] wrong indentation: expected 4 but found 5 (indentation)
Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml:71:11: [warning] wrong indentation: expected 9 but found 10 (indentation)
Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml:80:11: [warning] wrong indentation: expected 9 but found 10 (indentation)
Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml:88:11: [warning] wrong indentation: expected 9 but found 10 (indentation)

Documentation/devicetree/bindings/phy/brcm,sata-phy.example.dt.yaml: sata-phy@f0458100: '#phy-cells' is a required property
	From schema: /usr/local/lib/python3.8/site-packages/dtschema/schemas/phy/phy-provider.yaml

> ---
> This is based on phy/next and it depends on the following commit:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/?h=next&id=6d3b3f88423e4edc0fad5853c10558b42e1a91dd
> 
> it would make sense to have Vinod apply this change.
> 
>  .../bindings/phy/brcm,sata-phy.yaml           | 148 ++++++++++++++++++
>  .../devicetree/bindings/phy/brcm-sata-phy.txt |  61 --------
>  2 files changed, 148 insertions(+), 61 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml
>  delete mode 100644 Documentation/devicetree/bindings/phy/brcm-sata-phy.txt
> 
> diff --git a/Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml b/Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml
> new file mode 100644
> index 000000000000..979b7419dc69
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml
> @@ -0,0 +1,148 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/phy/brcm,sata-phy.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Broadcom SATA3 PHY
> +
> +maintainers:
> +  - Florian Fainelli <f.fainelli@gmail.com>
> +
> +properties:
> +  $nodename:
> +    pattern: "^sata[-|_]phy(@.*)?$"
> +
> +  compatible:
> +    oneOf:
> +      - items:
> +        - enum:
> +           - brcm,bcm7216-sata-phy
> +           - brcm,bcm7425-sata-phy
> +           - brcm,bcm7445-sata-phy
> +           - brcm,bcm63138-sata-phy
> +        - const: brcm,phy-sata3
> +      - items:
> +        - const: brcm,iproc-nsp-sata-phy
> +      - items:
> +        - const: brcm,iproc-ns2-sata-phy
> +      - items:
> +        - const: brcm,iproc-sr-sata-phy
> +
> +  reg:
> +    minItems: 1
> +    maxItems: 2
> +
> +  reg-names:
> +    minItems: 1
> +    maxItems: 2
> +    items:
> +      - const: phy
> +      - const: phy-ctrl
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +patternProperties:
> +  "^sata-phy@[0-9]+$":
> +     type: object
> +     description: |
> +       Each port's PHY should be represented as a sub-node.
> +
> +     properties:
> +       reg:
> +         description: The SATA PHY port number
> +         maxItems: 1
> +
> +       "#phy-cells":
> +         const: 0
> +
> +       "brcm,enable-ssc":
> +         $ref: /schemas/types.yaml#/definitions/flag
> +         description: |
> +           Use spread spectrum clocking (SSC) on this port
> +           This property is not applicable for "brcm,iproc-ns2-sata-phy",
> +           "brcm,iproc-nsp-sata-phy" and "brcm,iproc-sr-sata-phy".
> +
> +       "brcm,rxaeq-mode":
> +          $ref: /schemas/types.yaml#/definitions/string
> +          description:
> +            String that indicates the desired RX equalizer mode.
> +          enum:
> +            - off
> +            - auto
> +            - manual
> +
> +       "brcm,rxaeq-value":
> +          $ref: /schemas/types.yaml#/definitions/uint32
> +          description: |
> +            When 'brcm,rxaeq-mode' is set to "manual", provides the RX
> +            equalizer value that should be used.
> +          minimum: 0
> +          maximum: 63
> +
> +       "brcm,tx-amplitude-millivolt":
> +          description: |
> +            Transmit amplitude voltage in millivolt.
> +          $ref: /schemas/types.yaml#/definitions/uint32
> +          enum: [400, 500, 600, 800]
> +
> +     required:
> +       - reg
> +       - "#phy-cells"
> +
> +     additionalProperties: false
> +
> +if:
> +  properties:
> +    compatible:
> +      items:
> +        const: brcm,iproc-ns2-sata-phy
> +then:
> +  properties:
> +    reg:
> +      maxItems: 2
> +    reg-names:
> +      items:
> +        - const: "phy"
> +        - const: "phy-ctrl"
> +else:
> +  properties:
> +    reg:
> +      maxItems: 1
> +    reg-names:
> +      maxItems: 1
> +      items:
> +        - const: "phy"
> +
> +required:
> +  - compatible
> +  - "#address-cells"
> +  - "#size-cells"
> +  - reg
> +  - reg-names
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    sata-phy@f0458100 {
> +        compatible = "brcm,bcm7445-sata-phy", "brcm,phy-sata3";
> +        reg = <0xf0458100 0x1e00>;
> +        reg-names = "phy";
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        sata-phy@0 {
> +                reg = <0>;
> +                #phy-cells = <0>;
> +        };
> +
> +        sata-phy@1 {
> +                reg = <1>;
> +                #phy-cells = <0>;
> +        };
> +    };
> diff --git a/Documentation/devicetree/bindings/phy/brcm-sata-phy.txt b/Documentation/devicetree/bindings/phy/brcm-sata-phy.txt
> deleted file mode 100644
> index e5abbace93a3..000000000000
> --- a/Documentation/devicetree/bindings/phy/brcm-sata-phy.txt
> +++ /dev/null
> @@ -1,61 +0,0 @@
> -* Broadcom SATA3 PHY
> -
> -Required properties:
> -- compatible: should be one or more of
> -     "brcm,bcm7216-sata-phy"
> -     "brcm,bcm7425-sata-phy"
> -     "brcm,bcm7445-sata-phy"
> -     "brcm,iproc-ns2-sata-phy"
> -     "brcm,iproc-nsp-sata-phy"
> -     "brcm,phy-sata3"
> -     "brcm,iproc-sr-sata-phy"
> -     "brcm,bcm63138-sata-phy"
> -- address-cells: should be 1
> -- size-cells: should be 0
> -- reg: register ranges for the PHY PCB interface
> -- reg-names: should be "phy" and "phy-ctrl"
> -     The "phy-ctrl" registers are only required for
> -     "brcm,iproc-ns2-sata-phy" and "brcm,iproc-sr-sata-phy".
> -
> -Sub-nodes:
> -  Each port's PHY should be represented as a sub-node.
> -
> -Sub-nodes required properties:
> -- reg: the PHY number
> -- phy-cells: generic PHY binding; must be 0
> -
> -Sub-nodes optional properties:
> -- brcm,enable-ssc: use spread spectrum clocking (SSC) on this port
> -     This property is not applicable for "brcm,iproc-ns2-sata-phy",
> -     "brcm,iproc-nsp-sata-phy" and "brcm,iproc-sr-sata-phy".
> -
> -- brcm,rxaeq-mode: string that indicates the desired RX equalizer
> -  mode, possible values are:
> -	"off" (equivalent to not specifying the property)
> -	"auto"
> -	"manual" (brcm,rxaeq-value is used in that case)
> -
> -- brcm,rxaeq-value: when 'rxaeq-mode' is set to "manual", provides the RX
> -  equalizer value that should be used. Allowed range is 0..63.
> -
> -- brcm,tx-amplitude-millivolt: transmit amplitude voltage in millivolt.
> -  Possible values are 400, 500, 600 or 800 mV.
> -
> -Example
> -	sata-phy@f0458100 {
> -		compatible = "brcm,bcm7445-sata-phy", "brcm,phy-sata3";
> -		reg = <0xf0458100 0x1e00>, <0xf045804c 0x10>;
> -		reg-names = "phy";
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -
> -		sata-phy@0 {
> -			reg = <0>;
> -			#phy-cells = <0>;
> -		};
> -
> -		sata-phy@1 {
> -			reg = <1>;
> -			#phy-cells = <0>;
> -		};
> -	};
> -- 
> 2.25.1

-- 
~Vinod

      reply	other threads:[~2020-11-30 15:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-22  3:29 [PATCH] dt-bindings: phy: Convert Broadcom SATA PHY to YAML Florian Fainelli
2020-11-30 15:34 ` Vinod Koul [this message]

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=20201130153434.GT8403@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@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