arm64: dts: imx8mp-skov: add pinctrl-name 'reset' to fix CHECK_DTB warning
Subsystems (2)
Frank Li
maintainerPATCH 1/1 arm64: dts: imx8mp-skov: add pinctrl-name 'reset' to fix CHECK_DTB warning
Add pinctrl-name 'reset' to fix below CHECK_DTB warnings:
arch/arm64/boot/dts/freescale/imx8mp-skov-basic.dtb: switch@5f (microchip,ksz9893): pinctrl-names: ['default'] is too short
from schema $id: http://devicetree.org/schemas/net/dsa/microchip,ksz.yaml#
The commit (e469b87e0fb0d dt-bindings: net: dsa: microchip: Add strap description to set SPI mode" force use two pinctrl-name 'default' and 'reset'. switch@5f doesn't use SPI, so it is safe to use the same pinctrl setting for both.
--- arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi +2 -2
@@ -373,8 +373,8 @@ &i2c4 { switch: switch@5f { compatible = "microchip,ksz9893"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_switch>; + pinctrl-names = "default", "reset"; + pinctrl-0 = <&pinctrl_switch>, <&pinctrl_switch>; reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; reg = <0x5f>;
Signature · 1 line
2.34.1
Hi Frank,
Quoted 8 lines · Frank Li
Add pinctrl-name 'reset' to fix below
CHECK_DTBwarnings:
arch/arm64/boot/dts/freescale/imx8mp-skov-basic.dtb: switch@5f (microchip,ksz9893): pinctrl-names: ['default'] is too short
from schema $id: http://devicetree.org/schemas/net/dsa/microchip,ksz.yaml#The commit (
e469b87e0fb0ddt-bindings: net: dsa: microchip: Add strap description to set SPI mode" force use two pinctrl-name 'default' and 'reset'. switch@5f doesn't use SPI, so it is safe to use the same pinctrl setting for both.
please see:
- https://lore.kernel.org/all/[email protected]/
I stumbled over the same warning, but came to the conclusion, that the dt-bindings should be fixed instead of workaround broken bindings within the dtb.
Regards,
Marco
Quoted 26 lines
Signed-off-by Frank Li <[email protected]>--- arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi +2
-2@@ -373,8 +373,8 @@ &i2c4 { switch: switch@5f { compatible = "microchip,ksz9893"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_switch>; + pinctrl-names = "default", "reset"; + pinctrl-0 = <&pinctrl_switch>, <&pinctrl_switch>; reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; reg = <0x5f>;Signature · 1 line
2.34.1
Signature · 7 lines
#gernperDu #CallMeByMyFirstName Pengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Frank Li
maintainerQuoted 12 lines · Marco Felsch
Hi Frank,
Quoted 8 lines · Frank Li
Add pinctrl-name 'reset' to fix below
CHECK_DTBwarnings:
arch/arm64/boot/dts/freescale/imx8mp-skov-basic.dtb: switch@5f (microchip,ksz9893): pinctrl-names: ['default'] is too short
from schema $id: http://devicetree.org/schemas/net/dsa/microchip,ksz.yaml#The commit (
e469b87e0fb0ddt-bindings: net: dsa: microchip: Add strap description to set SPI mode" force use two pinctrl-name 'default' and 'reset'. switch@5f doesn't use SPI, so it is safe to use the same pinctrl setting for both.
Quoted 6 lines
please see:
- https://lore.kernel.org/all/[email protected]/I stumbled over the same warning, but came to the conclusion, that the dt-bindings should be fixed instead of workaround broken bindings within the dtb.
I have not seen "the conclusion" at above thread. I think patch 'reset' may be reasonable for SPI pin, which used for stub at reset. And there are not good method to distinguish under SPI or I2C.
Frank
Quoted 39 lines
Regards,
MarcoQuoted 22 lines
Signed-off-by Frank Li <[email protected]>--- arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi +2
-3@@ -373,8 +373,8 @@ &i2c4 { switch: switch@5f { compatible = "microchip,ksz9893"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_switch>; + pinctrl-names = "default", "reset"; + pinctrl-0 = <&pinctrl_switch>, <&pinctrl_switch>; reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; reg = <0x5f>; --Quoted 4 lines
2.34.1
--
#gernperDu
#CallMeByMyFirstNamePengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Quoted 16 lines · Frank Li
Quoted 15 lines · Marco Felsch
Hi Frank,
Quoted 8 lines · Frank Li
Add pinctrl-name 'reset' to fix below
CHECK_DTBwarnings:
arch/arm64/boot/dts/freescale/imx8mp-skov-basic.dtb: switch@5f (microchip,ksz9893): pinctrl-names: ['default'] is too short
from schema $id: http://devicetree.org/schemas/net/dsa/microchip,ksz.yaml#The commit (
e469b87e0fb0ddt-bindings: net: dsa: microchip: Add strap description to set SPI mode" force use two pinctrl-name 'default' and 'reset'. switch@5f doesn't use SPI, so it is safe to use the same pinctrl setting for both.please see:
- https://lore.kernel.org/all/[email protected]/
Quoted 7 lines
Quoted 3 lines
I stumbled over the same warning, but came to the conclusion, that the dt-bindings should be fixed instead of workaround broken bindings within the dtb.
I have not seen "the conclusion" at above thread. I think patch 'reset' may be reasonable for SPI pin, which used for stub at reset. And there are not good method to distinguish under SPI or I2C.
The linked-linked dt-patch from Bastien adapts the pinctrl-names unconditionally for all KSZ switches, while he writes within the commit message, that only KSZ8463 should be affected. Therefore the straps-rxd-gpios was added only for the microchip,ksz8463.
Furthermore the pinctrl-names should be either:
- default
or
- default
- reset
since the 'reset' pinctrl is optional if no strapping pins are connected.
So IMHO the correct fix should be a dt-bindings fix.
Regards,
Marco
Quoted 43 lines
Frank
Quoted 39 lines
Regards,
MarcoQuoted 22 lines
Signed-off-by Frank Li <[email protected]>--- arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi +2
-3@@ -373,8 +373,8 @@ &i2c4 { switch: switch@5f { compatible = "microchip,ksz9893"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_switch>; + pinctrl-names = "default", "reset"; + pinctrl-0 = <&pinctrl_switch>, <&pinctrl_switch>; reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; reg = <0x5f>; --Quoted 4 lines
2.34.1
--
#gernperDu
#CallMeByMyFirstNamePengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Signature · 7 lines
#gernperDu #CallMeByMyFirstName Pengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Hi Marco,
Quoted 12 lines · Marco Felsch
Hi Frank,
Quoted 8 lines · Frank Li
Add pinctrl-name 'reset' to fix below
CHECK_DTBwarnings:
arch/arm64/boot/dts/freescale/imx8mp-skov-basic.dtb: switch@5f (microchip,ksz9893): pinctrl-names: ['default'] is too short
from schema $id: http://devicetree.org/schemas/net/dsa/microchip,ksz.yaml#The commit (
e469b87e0fb0ddt-bindings: net: dsa: microchip: Add strap description to set SPI mode" force use two pinctrl-name 'default' and 'reset'. switch@5f doesn't use SPI, so it is safe to use the same pinctrl setting for both.
Quoted 6 lines
please see:
- https://lore.kernel.org/all/[email protected]/I stumbled over the same warning, but came to the conclusion, that the dt-bindings should be fixed instead of workaround broken bindings within the dtb.
If reset is optional, the dt-bindings should include "minItems:1" per my understanding.
But..
Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi &i2c4 { · line 377
Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi +2
-2- pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_switch>; + pinctrl-names = "default", "reset"; + pinctrl-0 = <&pinctrl_switch>, <&pinctrl_switch>;
Per checking
https://elixir.bootlin.com/linux/v6.18.3/source/drivers/net/dsa/microchip/ksz_common.c#L5372
seems "reset" is required in driver.
Regards
Peng
Quoted 17 lines
Quoted 8 lines
arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi +0
-0reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; reg = <0x5f>;Signature · 2 lines
-- 2.34.1Signature · 7 lines
#gernperDu #CallMeByMyFirstName Pengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Hi Peng,
Quoted 18 lines · Peng Fan
Hi Marco,
Quoted 15 lines · Marco Felsch
Hi Frank,
Quoted 8 lines · Frank Li
Add pinctrl-name 'reset' to fix below
CHECK_DTBwarnings:
arch/arm64/boot/dts/freescale/imx8mp-skov-basic.dtb: switch@5f (microchip,ksz9893): pinctrl-names: ['default'] is too short
from schema $id: http://devicetree.org/schemas/net/dsa/microchip,ksz.yaml#The commit (
e469b87e0fb0ddt-bindings: net: dsa: microchip: Add strap description to set SPI mode" force use two pinctrl-name 'default' and 'reset'. switch@5f doesn't use SPI, so it is safe to use the same pinctrl setting for both.please see:
- https://lore.kernel.org/all/[email protected]/
Quoted 6 lines
Quoted 3 lines
I stumbled over the same warning, but came to the conclusion, that the dt-bindings should be fixed instead of workaround broken bindings within the dtb.
If reset is optional, the dt-bindings should include "minItems:1" per my understanding.
Not sure, since the pinctrl-names is just an enum list. That beeing said, I don't see it as required since the strapping may not be required for systems which do already has correct ext. strapping options. Therefore the binding should be always optional and the driver should be adapted.
Quoted 11 lines
But..
Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi &i2c4 { · line 377
Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi +2
-2- pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_switch>; + pinctrl-names = "default", "reset"; + pinctrl-0 = <&pinctrl_switch>, <&pinctrl_switch>;Per checking
https://elixir.bootlin.com/linux/v6.18.3/source/drivers/net/dsa/microchip/ksz_common.c#L5372
Quoted 1 line
seems "reset" is required in driver.
For the ksz8463 but not for the ksz9893 which is used by the imx8mp-skov-reva.dtsi (here).
Regards,
Marco
Quoted 22 lines
Regards
PengQuoted 17 lines
Quoted 8 lines
arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi +0
-0reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; reg = <0x5f>;Signature · 2 lines
-- 2.34.1Signature · 7 lines
#gernperDu #CallMeByMyFirstName Pengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Signature · 7 lines
#gernperDu #CallMeByMyFirstName Pengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Rob Herring
maintainerQuoted 20 lines · Frank Li
Add pinctrl-name 'reset' to fix below
CHECK_DTBwarnings:
arch/arm64/boot/dts/freescale/imx8mp-skov-basic.dtb: switch@5f (microchip,ksz9893): pinctrl-names: ['default'] is too short
from schema $id: http://devicetree.org/schemas/net/dsa/microchip,ksz.yaml#The commit (
e469b87e0fb0ddt-bindings: net: dsa: microchip: Add strap description to set SPI mode" force use two pinctrl-name 'default' and 'reset'. switch@5f doesn't use SPI, so it is safe to use the same pinctrl setting for both.Signed-off-by Frank Li <[email protected]>--- arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi +0
-0
arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi &i2c4 { · line 377
Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mp-skov-reva.dtsi +2
-2@@ -373,8 +373,8 @@ &i2c4 { switch: switch@5f { compatible = "microchip,ksz9893"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_switch>; + pinctrl-names = "default", "reset"; + pinctrl-0 = <&pinctrl_switch>, <&pinctrl_switch>;
I guess this is getting dropped anyways, but this is completely wrong. "reset" entry here corresponds to pinctrl-1 property. pinctrl-N properties can have any number of phandles, but those are all one name.
Rob