ARM: dts: marvell: armada-388: use onnn,pca9655 compatible
Subsystems (3)
PATCH v2 1/1 ARM: dts: marvell: armada-388: use onnn,pca9655 compatible
The PCA9655s on the ClearFog and Helios4 boards are register-compatible with the pca9555, and the gpio-pca953x driver has matched "onnn,pca9655" in its OF match table since
commit 6d49b3a0f351 ("gpio: pca953x: Add support for the On Semi pca9655"). OF matching is tried before the legacy I2C ID-table matching that the old comment alluded to, so the restriction no longer applies. List the real part and drop the stale comment.
The I2C client is now named "pca9655" instead of "pca9555", but the expander is otherwise identical.
---
v2: rebase.
arch/arm/boot/dts/marvell/armada-388-clearfog.dtsi | 7 +------ arch/arm/boot/dts/marvell/armada-388-helios4.dts | 9 +-------- 2 files changed, 2 insertions(+), 14 deletions(-)
arch/arm/boot/dts/marvell/armada-388-clearfog.dtsi +1 -6
@@ -131,12 +131,7 @@ &i2c0 { * 15-SFP_MOD_DEF0 */ expander0: gpio-expander@20 { - /* - * This is how it should be: - * compatible = "onnn,pca9655", "nxp,pca9555"; - * but you can't do this because of the way I2C works. - */ - compatible = "nxp,pca9555"; + compatible = "onnn,pca9655"; gpio-controller; #gpio-cells = <2>; reg = <0x20>;
arch/arm/boot/dts/marvell/armada-388-helios4.dts +1 -8
@@ -160,14 +160,7 @@ i2c@11000 { * 6-USB3 power */ expander0: gpio-expander@20 { - /* - * This is how it should be: - * compatible = "onnn,pca9655", - * "nxp,pca9555"; - * but you can't do this because of - * the way I2C works. - */ - compatible = "nxp,pca9555"; + compatible = "onnn,pca9655"; gpio-controller; #gpio-cells = <2>; reg = <0x20>;
Signature · 1 line
2.55.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] Dropping the 'nxp,pca9555' fallback compatible string breaks backwards compatibility with older…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Dropping the 'nxp,pca9555' fallback compatible string breaks backwards compatibility with older kernels and bootloaders.
- [Low] The new compatible string 'onnn,pca9655' is not documented in the device tree bindings schema.
--
commit 0aa44d4fbea2198095d07080778a930cfaf868f9
Author: Rosen Penev <[email protected]>
ARM: dts: marvell: armada-388: use onnn,pca9655 compatible
This commit updates the Armada 388 ClearFog and Helios4 device trees to use the "onnn,pca9655" compatible string for their PCA9655 GPIO expanders, removing the previous "nxp,pca9555" compatible and a stale comment.
Quoted 3 lines
arch/arm/boot/dts/marvell/armada-388-clearfog.dtsi +0
-0
[ ... ]
arch/arm/boot/dts/marvell/armada-388-clearfog.dtsi &i2c0 { · line 134
Quoted 10 lines
arch/arm/boot/dts/marvell/armada-388-clearfog.dtsi +1
-6* 15-SFP_MOD_DEF0 */ expander0: gpio-expander@20 { - /* - * This is how it should be: - * compatible = "onnn,pca9655", "nxp,pca9555"; - * but you can't do this because of the way I2C works. - */ - compatible = "nxp,pca9555"; + compatible = "onnn,pca9655";
[Severity: Low]
Is the new compatible string "onnn,pca9655" documented in the device tree bindings schema? Running dt validation tools like make dtbs_check against the modified device tree files might report schema validation failures for expander0.
[Severity: High]
Does dropping the "nxp,pca9555" fallback compatible string break backwards compatibility with older kernels and bootloaders?
When booting an older kernel (e.g. LTS v5.10, prior to the addition of "onnn,pca9655") with this newly compiled device tree binary (DTB), the driver's OF match table will fail to recognize "onnn,pca9655".
Because the "nxp,pca9555" fallback has been removed instead of combined into a proper compatible list, probing will fail, making dependent hardware functionality such as SFP modules unusable.
Quoted 3 lines
arch/arm/boot/dts/marvell/armada-388-helios4.dts +0
-0
[ ... ]
arch/arm/boot/dts/marvell/armada-388-helios4.dts i2c@11000 { · line 163
Quoted 12 lines
arch/arm/boot/dts/marvell/armada-388-helios4.dts +1
-8* 6-USB3 power */ expander0: gpio-expander@20 { - /* - * This is how it should be: - * compatible = "onnn,pca9655", - * "nxp,pca9555"; - * but you can't do this because of - * the way I2C works. - */ - compatible = "nxp,pca9555"; + compatible = "onnn,pca9655";
[Severity: High]
Similarly for expander0 on the Helios4 board, does removing the fallback compatible string prevent older kernels from probing the I2C GPIO expander and break USB3 power functionality when a user updates their DTB independently of their kernel?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Gregory CLEMENT
maintainerQuoted 8 lines · Rosen Penev
The PCA9655s on the ClearFog and Helios4 boards are register-compatible with the pca9555, and the gpio-pca953x driver has matched "onnn,pca9655" in its OF match table since
commit6d49b3a0f351("gpio: pca953x: Add support for the On Semi pca9655"). OF matching is tried before the legacy I2C ID-table matching that the old comment alluded to, so the restriction no longer applies. List the real part and drop the stale comment.
Quoted 5 lines
The I2C client is now named "pca9655" instead of "pca9555", but the expander is otherwise identical.
Assisted-by opencode:big-pickleSigned-off-by Rosen Penev <[email protected]>
Applied on mvebu/dt
Thanks,
Gregory
Quoted 47 lines
---
v2: rebase.arch/arm/boot/dts/marvell/armada-388-clearfog.dtsi | 7 +------ arch/arm/boot/dts/marvell/armada-388-helios4.dts | 9 +-------- 2 files changed, 2 insertions(+), 14 deletions(-)arch/arm/boot/dts/marvell/armada-388-clearfog.dtsi +1
-6@@ -131,12 +131,7 @@ &i2c0 { * 15-SFP_MOD_DEF0 */ expander0: gpio-expander@20 { - /* - * This is how it should be: - * compatible = "onnn,pca9655", "nxp,pca9555"; - * but you can't do this because of the way I2C works. - */ - compatible = "nxp,pca9555"; + compatible = "onnn,pca9655"; gpio-controller; #gpio-cells = <2>; reg = <0x20>;arch/arm/boot/dts/marvell/armada-388-helios4.dts +1
-8@@ -160,14 +160,7 @@ i2c@11000 { * 6-USB3 power */ expander0: gpio-expander@20 { - /* - * This is how it should be: - * compatible = "onnn,pca9655", - * "nxp,pca9555"; - * but you can't do this because of - * the way I2C works. - */ - compatible = "nxp,pca9555"; + compatible = "onnn,pca9655"; gpio-controller; #gpio-cells = <2>; reg = <0x20>;Signature · 1 line
2.55.0
Signature · 3 lines
Grégory CLEMENT, Bootlin Embedded Linux and Kernel engineering https://bootlin.com