lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 17 Jun 2024 23:44:50 +0530
From: Shresth Prasad <shresthprasad7@...il.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: vkoul@...nel.org, kishon@...nel.org, robh@...nel.org, krzk+dt@...nel.org, 
	conor+dt@...nel.org, heiko@...ech.de, sebastian.reichel@...labora.com, 
	andy.yan@...k-chips.com, s.hauer@...gutronix.de, jbx6244@...dex.com, 
	linux-phy@...ts.infradead.org, devicetree@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org, 
	linux-kernel@...r.kernel.org, javier.carrasco.cruz@...il.com, 
	skhan@...uxfoundation.org
Subject: Re: [PATCH v4] dt-bindings: phy: rockchip-emmc-phy: Convert to dtschema

On Mon, Jun 17, 2024 at 9:29 PM Krzysztof Kozlowski <krzk@...nel.org> wrote:
>
> On 17/06/2024 10:53, Shresth Prasad wrote:
> > Convert txt bindings of Rockchip EMMC PHY to dtschema to allow
> > for validation.
> >
> > Signed-off-by: Shresth Prasad <shresthprasad7@...il.com>
> > ---
>
>
> ...
>
>
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  clock-names:
> > +    const: emmcclk
> > +
> > +  clocks:
> > +    maxItems: 1
>
> Keep order from DTS coding style, so clocks then clock-names.
>
> > +
> > +  drive-impedance-ohm:
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description:
> > +      Specifies the drive impedance in Ohm.
> > +    enum: [33, 40, 50, 66, 100]
> > +    default: 50
> > +
> > +  rockchip,enable-strobe-pulldown:
> > +    type: boolean
> > +    description: |
> > +      Enable internal pull-down for the strobe
> > +      line.  If not set, pull-down is not used.
> > +
> > +  rockchip,output-tapdelay-select:
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description:
> > +      Specifies the phyctrl_otapdlysec register.
> > +    default: 0x4
> > +    maximum: 0xf
> > +
> > +  "#phy-cells":
> > +    const: 0
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - "#phy-cells"
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    grf: syscon@...70000 {
>
> Drop label... actually entire node looks not needed.

>From what I understand, this `phy` node should be a sub-node of a `grf`
node which is why it is part of the example.

>
> > +      compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
>
> Drop
>
> > +      reg = <0xff770000 0x10000>;
>
> Drop

Removing `reg` causes the following warning:
Warning (unit_address_vs_reg): /example-0/syscon@...70000: node has a
unit name, but no reg or ranges property

Please let me know what the prefered solution would be here.

>
>
> > +      #address-cells = <1>;
> > +      #size-cells = <1>;
> > +
> > +      emmcphy: phy@...0 {
>
> Drop label
>
> > +        compatible = "rockchip,rk3399-emmc-phy";
> > +        reg = <0xf780 0x20>;
> > +        clocks = <&sdhci>;
> > +        clock-names = "emmcclk";
> > +        drive-impedance-ohm = <50>;
> > +        #phy-cells = <0>;
> > +      };
> > +    };
> > diff --git a/Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt b/Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt
> > deleted file mode 100644
> > index 57d28c0d5696..000000000000
> > --- a/Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt
> > +++ /dev/null
> > @@ -1,43 +0,0 @@
> > -Rockchip EMMC PHY
> > ------------------------
> > -
> > -Required properties:
> > - - compatible: rockchip,rk3399-emmc-phy
> > - - #phy-cells: must be 0
> > - - reg: PHY register address offset and length in "general
> > -   register files"
> > -
> > -Optional properties:
> > - - clock-names: Should contain "emmcclk".  Although this is listed as optional
> > -             (because most boards can get basic functionality without having
> > -             access to it), it is strongly suggested.
> > -             See ../clock/clock-bindings.txt for details.
> > - - clocks: Should have a phandle to the card clock exported by the SDHCI driver.
> > - - drive-impedance-ohm: Specifies the drive impedance in Ohm.
> > -                        Possible values are 33, 40, 50, 66 and 100.
> > -                        If not set, the default value of 50 will be applied.
> > - - rockchip,enable-strobe-pulldown: Enable internal pull-down for the strobe
> > -                                    line.  If not set, pull-down is not used.
> > - - rockchip,output-tapdelay-select: Specifies the phyctrl_otapdlysec register.
> > -                                    If not set, the register defaults to 0x4.
> > -                                    Maximum value 0xf.
> > -
> > -Example:
> > -
> > -
> > -grf: syscon@...70000 {
> > -     compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
> > -     #address-cells = <1>;
> > -     #size-cells = <1>;
> > -
> > -...
> > -
> > -     emmcphy: phy@...0 {
> > -             compatible = "rockchip,rk3399-emmc-phy";
> > -             reg = <0xf780 0x20>;
> > -             clocks = <&sdhci>;
> > -             clock-names = "emmcclk";
> > -             drive-impedance-ohm = <50>;
> > -             #phy-cells = <0>;
> > -     };
> > -};
> > diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
> > index 79798c747476..6e1b1cdea680 100644
> > --- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
> > +++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
> > @@ -176,9 +176,12 @@ allOf:
> >              Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt
> >
> >        patternProperties:
> > -        "phy@[0-9a-f]+$":
> > -          description:
> > -            Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt
> > +        "^phy@[0-9a-f]+$":
> > +          type: object
> > +
>
> Drop blank line
>
> > +          $ref: /schemas/phy/rockchip,rk3399-emmc-phy.yaml#
> > +
>
> Drop blank line

The rest of the document also has these blank lines, which is why I've
also kept them here. Are you sure I should remove them?

>
> > +          unevaluatedProperties: false
> >
> >    - if:
> >        properties:
>
> Nothing in example? Isn't the example for 3399?
>
> We want only one complete example of such multi-children devices, so the
> example can be moved and included in existing one here.

The example in this file is actually for `rockchip,rk3399-usb2phy` and
not `rockchip,rk3399-emmc-phy` which is why I haven't touched it.

Should I add to the example in `grf.yaml` ?

>
>
> Best regards,
> Krzysztof
>

Please let me know if I've misunderstood anything or if there are any
other changes I should make.

Regards,
Shresth

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ