mbox series

[0/7] archs: use proper node names for GPIO based I2C busses

Message ID 20250519121512.5657-1-wsa+renesas@sang-engineering.com
Headers show
Series archs: use proper node names for GPIO based I2C busses | expand

Message

Wolfram Sang May 19, 2025, 12:15 p.m. UTC
A lot of boards across various archs have a superfluous '-' in their
node name for GPIO based I2C busses. 'dtbs_check' complains, so fix
them.

Based on linux-next as of 20250516. Build bots are happy. ARM patches
depend on another cleanup series[1], the rest has no dependencies. I
suggest that patches go via their subsystem trees.

Tested on Calao USB boards using AT91 chipsets and a Renesas Lager board
using R-Car H2.

[1] "[PATCH 0/4] ARM: dts: use recent scl/sda gpio bindings"
    https://lore.kernel.org/r/20250519112107.2980-1-wsa+renesas@sang-engineering.com

Wolfram Sang (7):
  arm64: dts: exynos: use proper node names for GPIO based I2C busses
  arm64: dts: mediatek: use proper node names for GPIO based I2C busses
  ARM: dts: microchip: use proper node names for GPIO based I2C busses
  ARM: dts: samsung: use proper node names for GPIO based I2C busses
  ARM: dts: stm32: use proper node names for GPIO based I2C busses
  LoongArch: dts: use proper node names for GPIO based I2C busses
  riscv: dts: allwinner: use proper node names for GPIO based I2C busses

 arch/arm/boot/dts/microchip/at91-foxg20.dts      |  2 +-
 arch/arm/boot/dts/microchip/at91-qil_a9260.dts   |  2 +-
 arch/arm/boot/dts/microchip/at91-sam9_l9260.dts  |  2 +-
 arch/arm/boot/dts/microchip/at91rm9200.dtsi      |  2 +-
 arch/arm/boot/dts/microchip/at91sam9260.dtsi     |  2 +-
 arch/arm/boot/dts/microchip/at91sam9260ek.dts    |  2 +-
 arch/arm/boot/dts/microchip/at91sam9261.dtsi     |  2 +-
 arch/arm/boot/dts/microchip/at91sam9263.dtsi     |  2 +-
 arch/arm/boot/dts/microchip/at91sam9263ek.dts    |  2 +-
 .../boot/dts/microchip/at91sam9g20ek_common.dtsi |  2 +-
 arch/arm/boot/dts/microchip/at91sam9g45.dtsi     |  2 +-
 arch/arm/boot/dts/microchip/at91sam9n12.dtsi     |  2 +-
 arch/arm/boot/dts/microchip/at91sam9rl.dtsi      |  4 ++--
 arch/arm/boot/dts/microchip/at91sam9rlek.dts     |  4 ++--
 arch/arm/boot/dts/microchip/at91sam9x5.dtsi      |  6 +++---
 arch/arm/boot/dts/microchip/ethernut5.dts        |  2 +-
 arch/arm/boot/dts/microchip/evk-pro3.dts         |  2 +-
 arch/arm/boot/dts/microchip/mpa1600.dts          |  2 +-
 arch/arm/boot/dts/microchip/tny_a9263.dts        |  2 +-
 .../arm/boot/dts/microchip/usb_a9260_common.dtsi |  2 +-
 arch/arm/boot/dts/microchip/usb_a9263.dts        |  2 +-
 arch/arm/boot/dts/microchip/usb_a9g20_lpw.dts    |  2 +-
 arch/arm/boot/dts/samsung/exynos3250-monk.dts    |  2 +-
 arch/arm/boot/dts/samsung/exynos3250-rinato.dts  |  2 +-
 arch/arm/boot/dts/samsung/exynos4210-i9100.dts   |  6 +++---
 arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi   | 10 +++++-----
 .../boot/dts/samsung/exynos4412-galaxy-s3.dtsi   |  4 ++--
 arch/arm/boot/dts/samsung/exynos4412-midas.dtsi  |  6 +++---
 arch/arm/boot/dts/samsung/exynos4412-p4note.dtsi |  8 ++++----
 arch/arm/boot/dts/samsung/s5pv210-aries.dtsi     | 16 ++++++++--------
 arch/arm/boot/dts/samsung/s5pv210-galaxys.dts    |  2 +-
 .../boot/dts/st/ste-ux500-samsung-codina-tmo.dts |  8 ++++----
 .../arm/boot/dts/st/ste-ux500-samsung-codina.dts |  8 ++++----
 .../arm/boot/dts/st/ste-ux500-samsung-gavini.dts | 12 ++++++------
 .../arm/boot/dts/st/ste-ux500-samsung-golden.dts |  8 ++++----
 .../arm/boot/dts/st/ste-ux500-samsung-janice.dts | 16 ++++++++--------
 arch/arm/boot/dts/st/ste-ux500-samsung-kyle.dts  |  8 ++++----
 .../arm/boot/dts/st/ste-ux500-samsung-skomer.dts |  8 ++++----
 .../boot/dts/exynos/exynos5433-tm2-common.dtsi   |  2 +-
 .../dts/mediatek/mt7986a-bananapi-bpi-r3.dts     |  4 ++--
 arch/loongarch/boot/dts/loongson-2k1000.dtsi     |  4 ++--
 .../dts/allwinner/sun20i-d1-devterm-v3.14.dts    |  2 +-
 42 files changed, 94 insertions(+), 94 deletions(-)

Comments

Geert Uytterhoeven May 19, 2025, 12:54 p.m. UTC | #1
Hi Wolfram,

On Mon, 19 May 2025 at 14:15, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> A lot of boards across various archs have a superfluous '-' in their
> node name for GPIO based I2C busses. 'dtbs_check' complains, so fix
> them.
>
> Based on linux-next as of 20250516. Build bots are happy. ARM patches
> depend on another cleanup series[1], the rest has no dependencies. I
> suggest that patches go via their subsystem trees.
>
> Tested on Calao USB boards using AT91 chipsets and a Renesas Lager board
> using R-Car H2.

Thanks for your series!

>   arm64: dts: exynos: use proper node names for GPIO based I2C busses
>   arm64: dts: mediatek: use proper node names for GPIO based I2C busses
>   ARM: dts: microchip: use proper node names for GPIO based I2C busses
>   ARM: dts: samsung: use proper node names for GPIO based I2C busses
>   ARM: dts: stm32: use proper node names for GPIO based I2C busses
>   LoongArch: dts: use proper node names for GPIO based I2C busses
>   riscv: dts: allwinner: use proper node names for GPIO based I2C busses

Hmmm... which of these changes affect the R-Car board? ;-)
Am I missing something?

Gr{oetje,eeting}s,

                        Geert
Krzysztof Kozlowski May 19, 2025, 1:54 p.m. UTC | #2
On 19/05/2025 14:15, Wolfram Sang wrote:
> There shall not be a '-' before the number.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
> index 8f02de8480b6..197de398dd9b 100644
> --- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
> @@ -85,7 +85,7 @@ homepage-key {
>  		};
>  	};
>  
> -	i2c_max98504: i2c-gpio-0 {
> +	i2c_max98504: i2c-gpio0 {


You did not paste the warning in commit msg, so I don't know the
rationale, but at first glance this is not correct. "-0" is the
preferred suffix. "0" is not.

Best regards,
Krzysztof
Wolfram Sang May 19, 2025, 2:45 p.m. UTC | #3
> You did not paste the warning in commit msg, so I don't know the
> rationale, but at first glance this is not correct. "-0" is the
> preferred suffix. "0" is not.

Here is an example:

.../Kernel/linux/arch/arm/boot/dts/microchip/usb_a9g20.dtb: i2c-gpio-0 (i2c-gpio): $nodename:0: 'i2c-gpio-0' does not match '^i2c(@.+|-[a-z0-9]+)?$'
	from schema $id: http://devicetree.org/schemas/i2c/i2c-gpio.yaml#
Krzysztof Kozlowski May 19, 2025, 3:05 p.m. UTC | #4
On 19/05/2025 16:45, Wolfram Sang wrote:
> 
>> You did not paste the warning in commit msg, so I don't know the
>> rationale, but at first glance this is not correct. "-0" is the
>> preferred suffix. "0" is not.
> 
> Here is an example:
> 
> .../Kernel/linux/arch/arm/boot/dts/microchip/usb_a9g20.dtb: i2c-gpio-0 (i2c-gpio): $nodename:0: 'i2c-gpio-0' does not match '^i2c(@.+|-[a-z0-9]+)?$'
> 	from schema $id: http://devicetree.org/schemas/i2c/i2c-gpio.yaml#
> 

... so clearly the suffix is "-foo" or "-0", as we usually prefer. This
should be replaced into i2c-X, by dropping "gpio", instead of using less
favored suffixing (one without -).

Best regards,
Krzysztof
Krzysztof Kozlowski May 19, 2025, 4:11 p.m. UTC | #5
On 19/05/2025 17:14, Wolfram Sang wrote:
> 
>> ... so clearly the suffix is "-foo" or "-0", as we usually prefer. This
>> should be replaced into i2c-X, by dropping "gpio", instead of using less
>> favored suffixing (one without -).
> 
> Hmm, I can't automate this because it will then need to be aligned with
> the bus numbering of other existing non-GPIO-busses. Which is highly
> individual per board. That means we need to drop this series?

I think either we use i2c-X or commit 57138f5b8c92 ("schemas: i2c: Avoid
extra characters in i2c nodename pattern") from Herve was not correct
and needs to be fixed.


Best regards,
Krzysztof
Wolfram Sang May 19, 2025, 4:25 p.m. UTC | #6
> I think either we use i2c-X or commit 57138f5b8c92 ("schemas: i2c: Avoid
> extra characters in i2c nodename pattern") from Herve was not correct
> and needs to be fixed.

I will look if I can fix dt-schema instead. Thanks for the pointer!
Herve Codina May 19, 2025, 4:28 p.m. UTC | #7
On Mon, 19 May 2025 18:11:29 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On 19/05/2025 17:14, Wolfram Sang wrote:
> >   
> >> ... so clearly the suffix is "-foo" or "-0", as we usually prefer. This
> >> should be replaced into i2c-X, by dropping "gpio", instead of using less
> >> favored suffixing (one without -).  
> > 
> > Hmm, I can't automate this because it will then need to be aligned with
> > the bus numbering of other existing non-GPIO-busses. Which is highly
> > individual per board. That means we need to drop this series?  
> 
> I think either we use i2c-X or commit 57138f5b8c92 ("schemas: i2c: Avoid
> extra characters in i2c nodename pattern") from Herve was not correct
> and needs to be fixed.
> 

I don't know if relevant for this case but Rob did the fix
  647181a ("schemas: i2c: Allow for 'i2c-.*' node names")
on top of my commit.

Best regards,
Hervé
Wolfram Sang May 19, 2025, 6:50 p.m. UTC | #8
On Mon, May 19, 2025 at 06:25:39PM +0200, Wolfram Sang wrote:
> 
> > I think either we use i2c-X or commit 57138f5b8c92 ("schemas: i2c: Avoid
> > extra characters in i2c nodename pattern") from Herve was not correct
> > and needs to be fixed.
> 
> I will look if I can fix dt-schema instead. Thanks for the pointer!

Found it! Patch sent.
Wolfram Sang May 19, 2025, 6:59 p.m. UTC | #9
On Mon, May 19, 2025 at 02:15:00PM +0200, Wolfram Sang wrote:
> A lot of boards across various archs have a superfluous '-' in their
> node name for GPIO based I2C busses. 'dtbs_check' complains, so fix
> them.

Please drop this series. We found out that upstream dt-schema is broken
instead. I sent a fix.