linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] arm64: dts: imx8mp: add support for the ABB SoM and carrier
@ 2024-10-31 15:12 Heiko Schocher
  2024-10-31 15:12 ` [PATCH v2 2/3] dt-bindings: pinctrl: sx150xq: allow gpio line naming Heiko Schocher
  0 siblings, 1 reply; 5+ messages in thread
From: Heiko Schocher @ 2024-10-31 15:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: Heiko Schocher, Alexander Stein, Conor Dooley, Fabio Estevam,
	Frieder Schrempf, Gregor Herburger, Hiago De Franco,
	Hugo Villeneuve, Joao Paulo Goncalves, Krzysztof Kozlowski,
	Krzysztof Kozlowski, Linus Walleij, Mathieu Othacehe, Max Merchel,
	Michael Walle, Neil Armstrong, Peng Fan, Pengutronix Kernel Team,
	Rob Herring, Sascha Hauer, Shawn Guo, Tim Harvey, devicetree, imx,
	linux-arm-kernel, linux-gpio

The board uses an ABB specific SoM from ADLink, based on NXP
i.MX8MP SoC. The SoM is used on 3 different carrier boards,
with small differences.

series is based on:
819837584309 - (tag: v6.12-rc5, origin/master, origin/HEAD) Linux 6.12-rc5

patches are now checked with

make W=1 dt_binding_check
make W=1 dtbs_check
make W=1 CHECK_DTBS=y {for each dtb introduced in this series)

as Krzysztof suggested.

Changes in v2:
- worked in comments from Krzysztof
  - reworked the compatible strings for ABB imx8mp based boards
  - removed unneeded dtbos and build now dtbs for each
    carrierboard.
  - removed user spidev entries, as I do not know the
    real spi devices connected to...
  - call dtb check targets as described in cover letter
    and fixed warnings except warnings see below:
not fixed dtb check warnings
- pci (warning pops up for each new dtb from this patch, but
  also for a lot of other boards, which are already in tree)
imx8mp-aristainetos3-adpismarc.dtb: pcie-ep@33800000: reg: [[864026624, 4194304], [402653184, 134217728]] is too short
        from schema $id: http://devicetree.org/schemas/pci/fsl,imx6q-pcie-ep.yaml#
imx8mp-aristainetos3-adpismarc.dtb: pcie-ep@33800000: reg-names: ['dbi', 'addr_space'] is too short
        from schema $id: http://devicetree.org/schemas/pci/fsl,imx6q-pcie-ep.yaml#
- proton2s dtb specific:
  - rs485
    imx8mp-aristainetos3-proton2s.dtb: serial@30a60000: rs485-rts-delay:0: 0 is not of type 'array'
        from schema $id: http://devicetree.org/schemas/serial/fsl-imx-uart.yaml#
    imx8mp-aristainetos3-proton2s.dtb: serial@30a60000: rs485-rts-delay:1: 0 is not of type 'array'
        from schema $id: http://devicetree.org/schemas/serial/fsl-imx-uart.yaml#
    imx8mp-aristainetos3-proton2s.dtb: serial@30a60000: Unevaluated properties are not allowed ('linux,rs485-enabled-at-boot-time', 'rs485-rts-active-low', 'rs485-rts-delay' were unexpected)
        from schema $id: http://devicetree.org/schemas/serial/fsl-imx-uart.yaml#
    do not see, what I am doing wrong, also rs485 works fine
  - led driver
    imx8mp-aristainetos3-proton2s.dtb: /soc@0/bus@30800000/i2c@30a30000/tlc59108@40: failed to match any schema with compatible: ['ti,tlc59108']
    I use the comaptible entry used in drivers/leds/leds-tlc591xx.c
    Ah, may because file
    Documentation/devicetree/bindings/leds/leds-tlc591xx.txt
    is not converted to yaml?
  - pinctrl driver
    adding 'gpio-line-names' leads in a warning as this property
    is not checked yet (and so a warning is dropped).
    add this check in new patch
    dt-bindings: pinctrl: sx150xq: allow gpio line naming
    in v2

Heiko Schocher (3):
  dt-bindings: arm: fsl: Add ABB SoM and carrier
  dt-bindings: pinctrl: sx150xq: allow gpio line naming
  arm64: dts: imx8mp: add aristainetos3 board support

 .../devicetree/bindings/arm/fsl.yaml          |    9 +
 .../bindings/pinctrl/semtech,sx1501q.yaml     |    4 +
 arch/arm64/boot/dts/freescale/Makefile        |    5 +
 .../imx8mp-aristainetos3-adpismarc.dts        |   38 +
 .../imx8mp-aristainetos3-helios-lvds.dtso     |  115 ++
 .../freescale/imx8mp-aristainetos3-helios.dts |   99 ++
 .../imx8mp-aristainetos3-proton2s.dts         |  162 +++
 .../imx8mp-aristainetos3a-som-v1.dtsi         | 1116 +++++++++++++++++
 8 files changed, 1548 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-adpismarc.dts
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-helios-lvds.dtso
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-helios.dts
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-proton2s.dts
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-aristainetos3a-som-v1.dtsi

-- 
2.20.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] dt-bindings: pinctrl: sx150xq: allow gpio line naming
  2024-10-31 15:12 [PATCH v2 0/3] arm64: dts: imx8mp: add support for the ABB SoM and carrier Heiko Schocher
@ 2024-10-31 15:12 ` Heiko Schocher
  2024-10-31 18:14   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Heiko Schocher @ 2024-10-31 15:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: Heiko Schocher, Conor Dooley, Krzysztof Kozlowski,
	Krzysztof Kozlowski, Linus Walleij, Neil Armstrong, Rob Herring,
	devicetree, linux-gpio

Adding gpio-line-names property works fine for this
device node, but dtb check drops warning:

'gpio-line-names' does not match any of the regexes: '-cfg$', 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/pinctrl/semtech,sx1501q.yaml#

Allow to add property gpio-line-names for this devices.

Signed-off-by: Heiko Schocher <hs@denx.de>

---
checkpatch shows
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
'gpio-line-names' does not match any of the regexes: '-cfg$', 'pinctrl-[0-9]+'

Ignored, as it is a make output, which helps to understand the
reason for adding this patch.

Changes in v2:
patch dt-bindings: pinctrl: sx150xq: allow gpio line naming new in v2

 .../devicetree/bindings/pinctrl/semtech,sx1501q.yaml          | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
index 4214d7311f6b..fd0936545bb8 100644
--- a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
@@ -26,6 +26,10 @@ properties:
   reg:
     maxItems: 1
 
+  gpio-line-names:
+    minItems: 1
+    maxItems: 17
+
   interrupts:
     maxItems: 1
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/3] dt-bindings: pinctrl: sx150xq: allow gpio line naming
  2024-10-31 15:12 ` [PATCH v2 2/3] dt-bindings: pinctrl: sx150xq: allow gpio line naming Heiko Schocher
@ 2024-10-31 18:14   ` Krzysztof Kozlowski
  2024-11-02  5:24     ` Heiko Schocher
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-31 18:14 UTC (permalink / raw)
  To: Heiko Schocher, linux-kernel
  Cc: Conor Dooley, Krzysztof Kozlowski, Linus Walleij, Neil Armstrong,
	Rob Herring, devicetree, linux-gpio

On 31/10/2024 16:12, Heiko Schocher wrote:
> Adding gpio-line-names property works fine for this
> device node, but dtb check drops warning:
> 
> 'gpio-line-names' does not match any of the regexes: '-cfg$', 'pinctrl-[0-9]+'
> from schema $id: http://devicetree.org/schemas/pinctrl/semtech,sx1501q.yaml#
> 
> Allow to add property gpio-line-names for this devices.
> 
> Signed-off-by: Heiko Schocher <hs@denx.de>
> 
> ---
> checkpatch shows
> WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
> 'gpio-line-names' does not match any of the regexes: '-cfg$', 'pinctrl-[0-9]+'

No worries, this can be ignored. Warning messages can pass the limit (up
to some point).

> 
> Ignored, as it is a make output, which helps to understand the
> reason for adding this patch.
> 
> Changes in v2:
> patch dt-bindings: pinctrl: sx150xq: allow gpio line naming new in v2
> 
>  .../devicetree/bindings/pinctrl/semtech,sx1501q.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
> index 4214d7311f6b..fd0936545bb8 100644
> --- a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
> @@ -26,6 +26,10 @@ properties:
>    reg:
>      maxItems: 1
>  
> +  gpio-line-names:
> +    minItems: 1

I think gpio-line-names should always match the actual number of GPIOs
for given device. Do you have here devices with 1 gpio? This could be
further constrained in if:then sections.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/3] dt-bindings: pinctrl: sx150xq: allow gpio line naming
  2024-10-31 18:14   ` Krzysztof Kozlowski
@ 2024-11-02  5:24     ` Heiko Schocher
  2024-11-02  7:56       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Heiko Schocher @ 2024-11-02  5:24 UTC (permalink / raw)
  To: Krzysztof Kozlowski, linux-kernel
  Cc: Conor Dooley, Krzysztof Kozlowski, Linus Walleij, Neil Armstrong,
	Rob Herring, devicetree, linux-gpio

Hello Krzysztof,

On 31.10.24 19:14, Krzysztof Kozlowski wrote:
> On 31/10/2024 16:12, Heiko Schocher wrote:
>> Adding gpio-line-names property works fine for this
>> device node, but dtb check drops warning:
>>
>> 'gpio-line-names' does not match any of the regexes: '-cfg$', 'pinctrl-[0-9]+'
>> from schema $id: http://devicetree.org/schemas/pinctrl/semtech,sx1501q.yaml#
>>
>> Allow to add property gpio-line-names for this devices.
>>
>> Signed-off-by: Heiko Schocher <hs@denx.de>
>>
>> ---
>> checkpatch shows
>> WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
>> 'gpio-line-names' does not match any of the regexes: '-cfg$', 'pinctrl-[0-9]+'
> 
> No worries, this can be ignored. Warning messages can pass the limit (up
> to some point).

Fine, thanks!

>> Ignored, as it is a make output, which helps to understand the
>> reason for adding this patch.
>>
>> Changes in v2:
>> patch dt-bindings: pinctrl: sx150xq: allow gpio line naming new in v2
>>
>>   .../devicetree/bindings/pinctrl/semtech,sx1501q.yaml          | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
>> index 4214d7311f6b..fd0936545bb8 100644
>> --- a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
>> +++ b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
>> @@ -26,6 +26,10 @@ properties:
>>     reg:
>>       maxItems: 1
>>   
>> +  gpio-line-names:
>> +    minItems: 1
> 
> I think gpio-line-names should always match the actual number of GPIOs
> for given device. Do you have here devices with 1 gpio? This could be
> further constrained in if:then sections.

I have the device with "sx150x_16_pins", see drivers/pinctrl/pinctrl-sx150x.c

I started with minItems, because I thought it is okay to allow
less names... (as I did in patch 3/3) but see now, that other drivers have
minItems = maxItems.

So I think I should add to my patch the following part:

hs@threadripper:linux  [aristainetos3-dts-v3] $ git diff
diff --git a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml 
b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
index fd0936545bb8..0872ee1c6fa6 100644
--- a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
@@ -91,6 +91,45 @@ required:

  allOf:
    - $ref: pinctrl.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - semtech,sx1501q
+              - semtech,sx1504q
+              - semtech,sx1507q
+    then:
+       properties:
+          gpio-line-names:
+              minItems: 5
+              maxItems: 5
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - semtech,sx1502q
+              - semtech,sx1505q
+              - semtech,sx1508q
+    then:
+       properties:
+          gpio-line-names:
+              minItems: 9
+              maxItems: 9
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - semtech,sx1503q
+              - semtech,sx1506q
+              - semtech,sx1509q
+    then:
+       properties:
+          gpio-line-names:
+              minItems: 17
+              maxItems: 17
    - if:
        not:
          properties:

With that, dtb checks than claim (as expected) for my 3/3 patch
from this seris:
"""
imx8mp-aristainetos3-proton2s.dtb: pinctrl@3f: gpio-line-names: ['RELAY0', 'RELAY1', 'RELAY2', 
'HEATER', 'FAN', 'SPARE', 'CLEAR', 'FAULT'] is too short
"""

So, I adapt that too in a next version of the patchset, if above
change is okay... is it?

Thanks for your review!

bye,
Heiko
-- 
-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs@denx.de

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/3] dt-bindings: pinctrl: sx150xq: allow gpio line naming
  2024-11-02  5:24     ` Heiko Schocher
@ 2024-11-02  7:56       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-11-02  7:56 UTC (permalink / raw)
  To: hs, linux-kernel
  Cc: Conor Dooley, Krzysztof Kozlowski, Linus Walleij, Neil Armstrong,
	Rob Herring, devicetree, linux-gpio

On 02/11/2024 06:24, Heiko Schocher wrote:
>>>     reg:
>>>       maxItems: 1
>>>   
>>> +  gpio-line-names:
>>> +    minItems: 1
>>
>> I think gpio-line-names should always match the actual number of GPIOs
>> for given device. Do you have here devices with 1 gpio? This could be
>> further constrained in if:then sections.
> 
> I have the device with "sx150x_16_pins", see drivers/pinctrl/pinctrl-sx150x.c
> 
> I started with minItems, because I thought it is okay to allow
> less names... (as I did in patch 3/3) but see now, that other drivers have
> minItems = maxItems.
> 
> So I think I should add to my patch the following part:

Yes, but in top-level you keep widest constraints, so min 5 max 17.

> 
> hs@threadripper:linux  [aristainetos3-dts-v3] $ git diff
> diff --git a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml 
> b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
> index fd0936545bb8..0872ee1c6fa6 100644
> --- a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
> @@ -91,6 +91,45 @@ required:
> 
>   allOf:
>     - $ref: pinctrl.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - semtech,sx1501q
> +              - semtech,sx1504q
> +              - semtech,sx1507q
> +    then:
> +       properties:
> +          gpio-line-names:
> +              minItems: 5
> +              maxItems: 5
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - semtech,sx1502q
> +              - semtech,sx1505q
> +              - semtech,sx1508q
> +    then:
> +       properties:
> +          gpio-line-names:
> +              minItems: 9
> +              maxItems: 9
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - semtech,sx1503q
> +              - semtech,sx1506q
> +              - semtech,sx1509q
> +    then:
> +       properties:
> +          gpio-line-names:
> +              minItems: 17
> +              maxItems: 17
>     - if:
>         not:
>           properties:


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-02  7:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-31 15:12 [PATCH v2 0/3] arm64: dts: imx8mp: add support for the ABB SoM and carrier Heiko Schocher
2024-10-31 15:12 ` [PATCH v2 2/3] dt-bindings: pinctrl: sx150xq: allow gpio line naming Heiko Schocher
2024-10-31 18:14   ` Krzysztof Kozlowski
2024-11-02  5:24     ` Heiko Schocher
2024-11-02  7:56       ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).