Message ID | 20200430115702.5768-5-plaes@plaes.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | ARM: sunxi: Clean up sun7i-a20-gmac-clk usage | expand |
On Thu, Apr 30, 2020 at 02:57:00PM +0300, Priit Laes wrote: > Now that driver supports syscon-based regmap access, document also the > devicetree binding. > > Signed-off-by: Priit Laes <plaes@plaes.org> > --- > .../bindings/net/allwinner,sun7i-a20-gmac.yaml | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml > index 703d0d886884..c41d7c598c19 100644 > --- a/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml > +++ b/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml > @@ -29,17 +29,26 @@ properties: > clocks: > items: > - description: GMAC main clock > + > + # Deprecated > - description: TX clock > > clock-names: > items: > - const: stmmaceth > + > + # Deprecated > - const: allwinner_gmac_tx That would be deprecated: true Also, you still require to have two clocks here? > > phy-supply: > description: > PHY regulator > > + syscon: > + $ref: /schemas/types.yaml#definitions/phandle > + description: > + Phandle to the device containing the GMAC clock register > + > required: > - compatible > - reg > @@ -48,6 +57,7 @@ required: > - clocks > - clock-names > - phy-mode > + - syscon You can't do that though, this changes the binding in a non-backward compatible way I guess you could add an if clause to require it if clocks has a single member. Maxime
On Thu, 30 Apr 2020 14:57:00 +0300, Priit Laes wrote: > Now that driver supports syscon-based regmap access, document also the > devicetree binding. > > Signed-off-by: Priit Laes <plaes@plaes.org> > --- > .../bindings/net/allwinner,sun7i-a20-gmac.yaml | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > My bot found errors running 'make dt_binding_check' on your patch: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.example.dt.yaml: ethernet@1c50000: clock-names: ['stmmaceth'] is too short /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.example.dt.yaml: ethernet@1c50000: clocks: [[4294967295, 49]] is too short See https://patchwork.ozlabs.org/patch/1280292 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.
diff --git a/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml index 703d0d886884..c41d7c598c19 100644 --- a/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml +++ b/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml @@ -29,17 +29,26 @@ properties: clocks: items: - description: GMAC main clock + + # Deprecated - description: TX clock clock-names: items: - const: stmmaceth + + # Deprecated - const: allwinner_gmac_tx phy-supply: description: PHY regulator + syscon: + $ref: /schemas/types.yaml#definitions/phandle + description: + Phandle to the device containing the GMAC clock register + required: - compatible - reg @@ -48,6 +57,7 @@ required: - clocks - clock-names - phy-mode + - syscon unevaluatedProperties: false @@ -55,11 +65,12 @@ examples: - | gmac: ethernet@1c50000 { compatible = "allwinner,sun7i-a20-gmac"; + syscon = <&syscon>; reg = <0x01c50000 0x10000>; interrupts = <0 85 1>; interrupt-names = "macirq"; - clocks = <&ahb_gates 49>, <&gmac_tx>; - clock-names = "stmmaceth", "allwinner_gmac_tx"; + clocks = <&ahb_gates 49>; + clock-names = "stmmaceth"; phy-mode = "mii"; };
Now that driver supports syscon-based regmap access, document also the devicetree binding. Signed-off-by: Priit Laes <plaes@plaes.org> --- .../bindings/net/allwinner,sun7i-a20-gmac.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)