Message ID | 20200824162652.21047-13-krzk@kernel.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [v2,01/19] dt-bindings: gpio: fsl-imx-gpio: Add i.MX 8 compatibles | expand |
On Mon, Aug 24, 2020 at 06:26:46PM +0200, Krzysztof Kozlowski wrote: > DTSes with new i.MX 8M SoCs use two compatibles so update the binding to > fix dtbs_check warnings like: > > arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: efuse@30350000: compatible:1: 'syscon' was expected > From schema: Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml > > arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: efuse@30350000: > compatible: ['fsl,imx8mn-ocotp', 'fsl,imx8mm-ocotp', 'syscon'] is too long > > arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: efuse@30350000: > compatible: Additional items are not allowed ('syscon' was unexpected) > > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> > --- > .../devicetree/bindings/nvmem/imx-ocotp.yaml | 39 ++++++++++++------- > 1 file changed, 24 insertions(+), 15 deletions(-) > > diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml > index 1c9d7f05f173..b5b250185afd 100644 > --- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml > +++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml > @@ -19,21 +19,30 @@ allOf: > > properties: > compatible: > - items: > - - enum: > - - fsl,imx6q-ocotp > - - fsl,imx6sl-ocotp > - - fsl,imx6sx-ocotp > - - fsl,imx6ul-ocotp > - - fsl,imx6ull-ocotp > - - fsl,imx7d-ocotp > - - fsl,imx6sll-ocotp > - - fsl,imx7ulp-ocotp > - - fsl,imx8mq-ocotp > - - fsl,imx8mm-ocotp > - - fsl,imx8mn-ocotp > - - fsl,imx8mp-ocotp > - - const: syscon > + oneOf: > + - items: > + - enum: > + - fsl,imx6q-ocotp > + - fsl,imx6sl-ocotp > + - fsl,imx6sx-ocotp > + - fsl,imx6ul-ocotp > + - fsl,imx6ull-ocotp > + - fsl,imx7d-ocotp > + - fsl,imx6sll-ocotp > + - fsl,imx7ulp-ocotp > + - fsl,imx8mq-ocotp > + - fsl,imx8mm-ocotp > + - fsl,imx8mn-ocotp > + - fsl,imx8mp-ocotp Should be dropped. > + - const: syscon > + - items: > + # The devices are not really compatible with fsl,imx8mm-ocotp, however > + # the code for getting SoC revision depends on fsl,imx8mm-ocotp compatible. > + - enum: > + - fsl,imx8mn-ocotp > + - fsl,imx8mp-ocotp > + - const: fsl,imx8mm-ocotp > + - const: syscon > > reg: > maxItems: 1 > -- > 2.17.1 >
On Mon, Aug 24, 2020 at 06:26:46PM +0200, Krzysztof Kozlowski wrote: > + oneOf: > + - items: > + - enum: > + - fsl,imx6q-ocotp > + - fsl,imx6sl-ocotp > + - fsl,imx6sx-ocotp > + - fsl,imx6ul-ocotp > + - fsl,imx6ull-ocotp > + - fsl,imx7d-ocotp > + - fsl,imx6sll-ocotp > + - fsl,imx7ulp-ocotp > + - fsl,imx8mq-ocotp > + - fsl,imx8mm-ocotp > + - fsl,imx8mn-ocotp > + - fsl,imx8mp-ocotp > + - const: syscon > + - items: > + # The devices are not really compatible with fsl,imx8mm-ocotp, however > + # the code for getting SoC revision depends on fsl,imx8mm-ocotp compatible. Shouldn't this be fixed? It seems strange to justify a binding with existing code. Sascha > + - enum: > + - fsl,imx8mn-ocotp > + - fsl,imx8mp-ocotp > + - const: fsl,imx8mm-ocotp > + - const: syscon > > reg: > maxItems: 1 > -- > 2.17.1 > >
On Tue, Aug 25, 2020 at 06:46:53AM +0200, Sascha Hauer wrote: > On Mon, Aug 24, 2020 at 06:26:46PM +0200, Krzysztof Kozlowski wrote: > > + oneOf: > > + - items: > > + - enum: > > + - fsl,imx6q-ocotp > > + - fsl,imx6sl-ocotp > > + - fsl,imx6sx-ocotp > > + - fsl,imx6ul-ocotp > > + - fsl,imx6ull-ocotp > > + - fsl,imx7d-ocotp > > + - fsl,imx6sll-ocotp > > + - fsl,imx7ulp-ocotp > > + - fsl,imx8mq-ocotp > > + - fsl,imx8mm-ocotp > > + - fsl,imx8mn-ocotp > > + - fsl,imx8mp-ocotp > > + - const: syscon > > + - items: > > + # The devices are not really compatible with fsl,imx8mm-ocotp, however > > + # the code for getting SoC revision depends on fsl,imx8mm-ocotp compatible. > > Shouldn't this be fixed? It seems strange to justify a binding with > existing code. The fsl,imx8mn-ocotp is actually compatible with "mm", only the fsl,imx8mp-ocotp is not (although someone might argue that subset of "mp" falls into "mn"). The problem is that drivers/soc/imx/soc-imx8m.c checks revision only against the fsl,imx8mm-ocotp compatible, not the others. It's the pattern used in that driver also for other i.MX 8. Therefore it is a binding implemented and actually used, regardless whether it is correct from hardware point of view or not. If that's preferred, I could adjust the drivers/soc/imx/soc-imx8m.c for the incompatible "mp". It should not break anything. Best regards, Krzysztof
On Mon, Aug 24, 2020 at 08:39:04PM -0600, Rob Herring wrote: > On Mon, Aug 24, 2020 at 06:26:46PM +0200, Krzysztof Kozlowski wrote: > > DTSes with new i.MX 8M SoCs use two compatibles so update the binding to > > fix dtbs_check warnings like: > > > > arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: efuse@30350000: compatible:1: 'syscon' was expected > > From schema: Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml > > > > arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: efuse@30350000: > > compatible: ['fsl,imx8mn-ocotp', 'fsl,imx8mm-ocotp', 'syscon'] is too long > > > > arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: efuse@30350000: > > compatible: Additional items are not allowed ('syscon' was unexpected) > > > > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> > > --- > > .../devicetree/bindings/nvmem/imx-ocotp.yaml | 39 ++++++++++++------- > > 1 file changed, 24 insertions(+), 15 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml > > index 1c9d7f05f173..b5b250185afd 100644 > > --- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml > > +++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml > > @@ -19,21 +19,30 @@ allOf: > > > > properties: > > compatible: > > - items: > > - - enum: > > - - fsl,imx6q-ocotp > > - - fsl,imx6sl-ocotp > > - - fsl,imx6sx-ocotp > > - - fsl,imx6ul-ocotp > > - - fsl,imx6ull-ocotp > > - - fsl,imx7d-ocotp > > - - fsl,imx6sll-ocotp > > - - fsl,imx7ulp-ocotp > > - - fsl,imx8mq-ocotp > > - - fsl,imx8mm-ocotp > > - - fsl,imx8mn-ocotp > > - - fsl,imx8mp-ocotp > > - - const: syscon > > + oneOf: > > + - items: > > + - enum: > > + - fsl,imx6q-ocotp > > + - fsl,imx6sl-ocotp > > + - fsl,imx6sx-ocotp > > + - fsl,imx6ul-ocotp > > + - fsl,imx6ull-ocotp > > + - fsl,imx7d-ocotp > > + - fsl,imx6sll-ocotp > > + - fsl,imx7ulp-ocotp > > + - fsl,imx8mq-ocotp > > + - fsl,imx8mm-ocotp > > > + - fsl,imx8mn-ocotp > > + - fsl,imx8mp-ocotp > > Should be dropped. OK Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml index 1c9d7f05f173..b5b250185afd 100644 --- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml +++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml @@ -19,21 +19,30 @@ allOf: properties: compatible: - items: - - enum: - - fsl,imx6q-ocotp - - fsl,imx6sl-ocotp - - fsl,imx6sx-ocotp - - fsl,imx6ul-ocotp - - fsl,imx6ull-ocotp - - fsl,imx7d-ocotp - - fsl,imx6sll-ocotp - - fsl,imx7ulp-ocotp - - fsl,imx8mq-ocotp - - fsl,imx8mm-ocotp - - fsl,imx8mn-ocotp - - fsl,imx8mp-ocotp - - const: syscon + oneOf: + - items: + - enum: + - fsl,imx6q-ocotp + - fsl,imx6sl-ocotp + - fsl,imx6sx-ocotp + - fsl,imx6ul-ocotp + - fsl,imx6ull-ocotp + - fsl,imx7d-ocotp + - fsl,imx6sll-ocotp + - fsl,imx7ulp-ocotp + - fsl,imx8mq-ocotp + - fsl,imx8mm-ocotp + - fsl,imx8mn-ocotp + - fsl,imx8mp-ocotp + - const: syscon + - items: + # The devices are not really compatible with fsl,imx8mm-ocotp, however + # the code for getting SoC revision depends on fsl,imx8mm-ocotp compatible. + - enum: + - fsl,imx8mn-ocotp + - fsl,imx8mp-ocotp + - const: fsl,imx8mm-ocotp + - const: syscon reg: maxItems: 1
DTSes with new i.MX 8M SoCs use two compatibles so update the binding to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: efuse@30350000: compatible:1: 'syscon' was expected From schema: Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: efuse@30350000: compatible: ['fsl,imx8mn-ocotp', 'fsl,imx8mm-ocotp', 'syscon'] is too long arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: efuse@30350000: compatible: Additional items are not allowed ('syscon' was unexpected) Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> --- .../devicetree/bindings/nvmem/imx-ocotp.yaml | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-)