mbox series

[v1,0/7] Add support for various features to i.MX6 bindings

Message ID 20230601101451.357662-1-o.rempel@pengutronix.de
Headers show
Series Add support for various features to i.MX6 bindings | expand

Message

Oleksij Rempel June 1, 2023, 10:14 a.m. UTC
This patch series is aimed at addressing several dtbs_check warnings by
introducing additional support in the device tree bindings for i.MX6
series SoCs. The warnings surfaced while validating some i.MX6 boards.
The issues were predominantly around unrecognized compatibility strings
and missing properties in the device trees.

Oleksij Rempel (7):
  dt-bindings: mmc: fsl-imx-esdhc: Add imx6ul support
  dt-bindings: timer: gpt: Add i.MX6UL support
  dt-bindings: timer: gpt: Support 3rd clock for i.MX6DL
  dt-bindings: crypto: fsl-dcp: Add i.MX6SL, i.MX6SLL, and i.MX6ULL
    support
  dt-bindings: clock: imx6ul: Support optional enet*_ref_pad clocks
  dt-bindings: clock: imx6q: Allow single optional clock and add
    enet_ref_pad
  dt-bindings: input: touchscreen: edt-ft5x06: Add 'threshold' property

 .../bindings/clock/imx6q-clock.yaml           | 15 ++++++-----
 .../bindings/clock/imx6ul-clock.yaml          |  6 +++++
 .../devicetree/bindings/crypto/fsl-dcp.yaml   | 19 +++++++++++---
 .../input/touchscreen/edt-ft5x06.yaml         |  6 +++++
 .../bindings/mmc/fsl-imx-esdhc.yaml           |  2 ++
 .../devicetree/bindings/timer/fsl,imxgpt.yaml | 26 ++++++++++++++-----
 6 files changed, 59 insertions(+), 15 deletions(-)

Comments

Conor Dooley June 1, 2023, 6:18 p.m. UTC | #1
On Thu, Jun 01, 2023 at 12:14:45PM +0200, Oleksij Rempel wrote:
> Add the 'fsl,imx6ul-usdhc' value to the compatible properties list in
> the fsl-imx-esdhc.yaml file. This is required to match the compatible
> strings present in the 'mmc@2190000' node of 'imx6ul-prti6g.dtb'. This
> commit addresses the following dtbs_check warning:
>   imx6ul-prti6g.dtb: mmc@2190000: compatible: 'oneOf' conditional failed,
>     one must be fixed: ['fsl,imx6ul-usdhc', 'fsl,imx6sx-usdhc'] is too long
>     'fsl,imx6ul-usdhc' is not one of ['fsl,imx25-esdhc', 'fsl,imx35-esdhc',
>     'fsl,imx51-esdhc', 'fsl,imx53-esdhc', 'fsl,imx6q-usdhc',
>     'fsl,imx6sl-usdhc', 'fsl,imx6sx-usdhc', 'fsl,imx7d-usdhc',
>     'fsl,imx7ulp-usdhc', 'fsl,imx8mm-usdhc', 'fsl,imxrt1050-usdhc',
>     'nxp,s32g2-usdhc']
>   From schema: Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> index fbfd822b9270..090e781705d3 100644
> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> @@ -30,6 +30,7 @@ properties:
>            - fsl,imx6q-usdhc
>            - fsl,imx6sl-usdhc
>            - fsl,imx6sx-usdhc
> +          - fsl,imx6ul-usdhc

How come this gets added as a standalone compatible _and_ one that
should fall back to imx6sx?

>            - fsl,imx7d-usdhc
>            - fsl,imx7ulp-usdhc
>            - fsl,imx8mm-usdhc
> @@ -42,6 +43,7 @@ properties:
>            - enum:
>                - fsl,imx6sll-usdhc
>                - fsl,imx6ull-usdhc
> +              - fsl,imx6ul-usdhc
>            - const: fsl,imx6sx-usdhc
>        - items:
>            - const: fsl,imx7d-usdhc
> -- 
> 2.39.2
>
Conor Dooley June 1, 2023, 6:19 p.m. UTC | #2
On Thu, Jun 01, 2023 at 07:18:31PM +0100, Conor Dooley wrote:
> On Thu, Jun 01, 2023 at 12:14:45PM +0200, Oleksij Rempel wrote:
> > Add the 'fsl,imx6ul-usdhc' value to the compatible properties list in
> > the fsl-imx-esdhc.yaml file. This is required to match the compatible
> > strings present in the 'mmc@2190000' node of 'imx6ul-prti6g.dtb'. This
> > commit addresses the following dtbs_check warning:
> >   imx6ul-prti6g.dtb: mmc@2190000: compatible: 'oneOf' conditional failed,
> >     one must be fixed: ['fsl,imx6ul-usdhc', 'fsl,imx6sx-usdhc'] is too long
> >     'fsl,imx6ul-usdhc' is not one of ['fsl,imx25-esdhc', 'fsl,imx35-esdhc',
> >     'fsl,imx51-esdhc', 'fsl,imx53-esdhc', 'fsl,imx6q-usdhc',
> >     'fsl,imx6sl-usdhc', 'fsl,imx6sx-usdhc', 'fsl,imx7d-usdhc',
> >     'fsl,imx7ulp-usdhc', 'fsl,imx8mm-usdhc', 'fsl,imxrt1050-usdhc',
> >     'nxp,s32g2-usdhc']
> >   From schema: Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > 
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > ---
> >  Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > index fbfd822b9270..090e781705d3 100644
> > --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > @@ -30,6 +30,7 @@ properties:
> >            - fsl,imx6q-usdhc
> >            - fsl,imx6sl-usdhc
> >            - fsl,imx6sx-usdhc
> > +          - fsl,imx6ul-usdhc
> 
> How come this gets added as a standalone compatible _and_ one that
> should fall back to imx6sx?

Whoops, sent too soon.
I meant to point out that the only user in-tree uses the fallback to
imx6sx.

Cheers,
Conor.

> >            - fsl,imx7d-usdhc
> >            - fsl,imx7ulp-usdhc
> >            - fsl,imx8mm-usdhc
> > @@ -42,6 +43,7 @@ properties:
> >            - enum:
> >                - fsl,imx6sll-usdhc
> >                - fsl,imx6ull-usdhc
> > +              - fsl,imx6ul-usdhc
> >            - const: fsl,imx6sx-usdhc
> >        - items:
> >            - const: fsl,imx7d-usdhc
> > -- 
> > 2.39.2
> >
Conor Dooley June 1, 2023, 6:20 p.m. UTC | #3
On Thu, Jun 01, 2023 at 12:14:46PM +0200, Oleksij Rempel wrote:
> Add 'fsl,imx6ul-gpt' compatible to resolve the following dtbs_check
> warning:
> /arch/arm/boot/dts/imx6ull-jozacp.dtb: timer@20e8000: compatible:
> 'oneOf' conditional failed, one must be fixed:
>     'fsl,imx6ul-gpt' is not one of ['fsl,imx25-gpt', 'fsl,imx50-gpt',
>     'fsl,imx51-gpt', 'fsl,imx53-gpt', 'fsl,imx6q-gpt']
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
> index 716c6afcca1f..adf617b8f353 100644
> --- a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
> +++ b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
> @@ -34,6 +34,10 @@ properties:
>                - fsl,imxrt1050-gpt
>                - fsl,imxrt1170-gpt
>            - const: fsl,imx6dl-gpt
> +      - const: fsl,imx6ul-gpt

Again, why add this as an appears-on its own compatible when it seems to
be used only with a fallback to imx6sx? (In-tree at least)

> +      - items:
> +          - const: fsl,imx6ul-gpt
> +          - const: fsl,imx6sx-gpt
>  
>    reg:
>      maxItems: 1
> -- 
> 2.39.2
>
Conor Dooley June 1, 2023, 6:26 p.m. UTC | #4
On Thu, Jun 01, 2023 at 12:14:48PM +0200, Oleksij Rempel wrote:
> Add support for i.MX6SL, i.MX6SLL, and i.MX6ULL to the 'fsl-dcp' binding
> to address the following dtbs_check warning:
>   imx6ull-jozacp.dtb: crypto@2280000: compatible:0: 'fsl,imx6ull-dcp' is
>     not one of ['fsl,imx23-dcp', 'fsl,imx28-dcp']
>   From schema: Documentation/devicetree/bindings/crypto/fsl-dcp.yaml
> 
>   imx6ull-jozacp.dtb: crypto@2280000: compatible: ['fsl,imx6ull-dcp',
>     'fsl,imx28-dcp'] is too long
>   From schema: Documentation/devicetree/bindings/crypto/fsl-dcp.yaml
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  .../devicetree/bindings/crypto/fsl-dcp.yaml   | 19 ++++++++++++++++---
>  1 file changed, 16 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/crypto/fsl-dcp.yaml b/Documentation/devicetree/bindings/crypto/fsl-dcp.yaml
> index 99be01539fcd..8af393b9f3ca 100644
> --- a/Documentation/devicetree/bindings/crypto/fsl-dcp.yaml
> +++ b/Documentation/devicetree/bindings/crypto/fsl-dcp.yaml
> @@ -11,9 +11,22 @@ maintainers:
>  
>  properties:
>    compatible:
> -    enum:
> -      - fsl,imx23-dcp
> -      - fsl,imx28-dcp
> +    oneOf:
> +      - const: fsl,imx23-dcp
> +      - const: fsl,imx28-dcp
> +      - const: fsl,imx6sl-dcp
> +      - const: fsl,imx6sll-dcp
> +      - const: fsl,imx6ull-dcp

Confused again here chief, why allow these to appear on their own if
their are all compatible with the imx28-dcp?

> +      - items:
> +          - enum:
> +              - fsl,imx6sl-dcp
> +              - fsl,imx6sll-dcp
> +              - fsl,imx6ull-dcp
> +          - const: fsl,imx28-dcp
> +      - items:
> +          - enum:
> +              - fsl,imx28-dcp
> +          - const: fsl,imx23-dcp

I don't get this either. Why set the imx23-dcp as the fallback for the
imx28-dcp, when the imx28-dcp is being used as the fallback for the imx6
stuff?

I get the impression that some of the devicetrees should be fixed up,
rather than adding these sorta odd conditions to the bindings.

To me it'd make sense to swap everything that uses imx28-dcp as a
fallback to use imx23-dcp instead, since that is the most generic one?

What am I missing?

Cheers,
Conor.

>  
>    reg:
>      maxItems: 1
> -- 
> 2.39.2
>
Krzysztof Kozlowski June 2, 2023, 8:27 a.m. UTC | #5
On 01/06/2023 12:14, Oleksij Rempel wrote:
> Add the 'fsl,imx6ul-usdhc' value to the compatible properties list in
> the fsl-imx-esdhc.yaml file. This is required to match the compatible
> strings present in the 'mmc@2190000' node of 'imx6ul-prti6g.dtb'. This
> commit addresses the following dtbs_check warning:
>   imx6ul-prti6g.dtb: mmc@2190000: compatible: 'oneOf' conditional failed,
>     one must be fixed: ['fsl,imx6ul-usdhc', 'fsl,imx6sx-usdhc'] is too long
>     'fsl,imx6ul-usdhc' is not one of ['fsl,imx25-esdhc', 'fsl,imx35-esdhc',
>     'fsl,imx51-esdhc', 'fsl,imx53-esdhc', 'fsl,imx6q-usdhc',
>     'fsl,imx6sl-usdhc', 'fsl,imx6sx-usdhc', 'fsl,imx7d-usdhc',
>     'fsl,imx7ulp-usdhc', 'fsl,imx8mm-usdhc', 'fsl,imxrt1050-usdhc',
>     'nxp,s32g2-usdhc']
>   From schema: Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml

Except what Conor wrote, please don't wrap that much the error log - it
is unreadable. Trim it, remove unneeded parts and keep some decent
one/two lines even if it exceeds the commit msg. This applies to other
patches as well.

Best regards,
Krzysztof