Message ID | 20191025175625.8011-2-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
On Fri, Oct 25, 2019 at 11:26:19PM +0530, Jagan Teki wrote: > The MIPI DSI controller in Allwinner A64 is similar to A33. > > But unlike A33, A64 doesn't have DSI_SCLK gating so it is valid > to have separate compatible for A64 on the same driver. > > DSI_SCLK uses mod clock-names on dt-bindings, so the same > is not required for A64. > > On that note > - A64 require minimum of 1 clock like the bus clock > - A33 require minimum of 2 clocks like both bus, mod clocks > > So, update dt-bindings so-that it can document both A33, > A64 bindings requirements. > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > --- > .../display/allwinner,sun6i-a31-mipi-dsi.yaml | 20 +++++++++++++++++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml b/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml > index dafc0980c4fa..2b7016ca382c 100644 > --- a/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml > +++ b/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml > @@ -15,7 +15,9 @@ properties: > "#size-cells": true > > compatible: > - const: allwinner,sun6i-a31-mipi-dsi > + oneOf: > + - const: allwinner,sun6i-a31-mipi-dsi > + - const: allwinner,sun50i-a64-mipi-dsi Use 'enum' instead of oneOf+const. With that fixed, Reviewed-by: Rob Herring <robh@kernel.org> > > reg: > maxItems: 1 > @@ -24,6 +26,8 @@ properties: > maxItems: 1 > > clocks: > + minItems: 1 > + maxItems: 2 > items: > - description: Bus Clock > - description: Module Clock > @@ -63,13 +67,25 @@ required: > - reg > - interrupts > - clocks > - - clock-names > - phys > - phy-names > - resets > - vcc-dsi-supply > - port > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: allwinner,sun6i-a31-mipi-dsi > + then: > + properties: > + clocks: > + minItems: 2 > + required: > + - clock-names > + > additionalProperties: false > > examples: > -- > 2.18.0.321.gffc6fa0e3 >
diff --git a/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml b/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml index dafc0980c4fa..2b7016ca382c 100644 --- a/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml +++ b/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml @@ -15,7 +15,9 @@ properties: "#size-cells": true compatible: - const: allwinner,sun6i-a31-mipi-dsi + oneOf: + - const: allwinner,sun6i-a31-mipi-dsi + - const: allwinner,sun50i-a64-mipi-dsi reg: maxItems: 1 @@ -24,6 +26,8 @@ properties: maxItems: 1 clocks: + minItems: 1 + maxItems: 2 items: - description: Bus Clock - description: Module Clock @@ -63,13 +67,25 @@ required: - reg - interrupts - clocks - - clock-names - phys - phy-names - resets - vcc-dsi-supply - port +allOf: + - if: + properties: + compatible: + contains: + const: allwinner,sun6i-a31-mipi-dsi + then: + properties: + clocks: + minItems: 2 + required: + - clock-names + additionalProperties: false examples:
The MIPI DSI controller in Allwinner A64 is similar to A33. But unlike A33, A64 doesn't have DSI_SCLK gating so it is valid to have separate compatible for A64 on the same driver. DSI_SCLK uses mod clock-names on dt-bindings, so the same is not required for A64. On that note - A64 require minimum of 1 clock like the bus clock - A33 require minimum of 2 clocks like both bus, mod clocks So, update dt-bindings so-that it can document both A33, A64 bindings requirements. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- .../display/allwinner,sun6i-a31-mipi-dsi.yaml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)