Re: [PATCH v13 2/7] dt-bindings: i3c: Add NXP P3H2x4x i3c-hub support

[email protected]
Newsgroups org.infradead.lists.linux-i3c,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The device tree binding advertises GPIO capabilities in the hardware description but omits the required GPIO controller properties from the schema.
- [Medium] The binding schema fails to include compatible strings for all hardware variants claimed in the commit message.
--

commit 02eaa0b7ff6f65192cd318d6704be98b321762da
Author: Aman Kumar Pandey <[email protected]>

dt-bindings: i3c: Add NXP P3H2x4x i3c-hub support

Add bindings for the NXP P3H2x4x (P3H2440/P3H2441/P3H2840/P3H2841)
multiport I3C hub family.

> diff --git a/Documentation/devicetree/bindings/i3c/nxp,p3h2840.yaml b/Documentation/devicetree/bindings/i3c/nxp,p3h2840.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i3c/nxp,p3h2840.yaml
[ ... ]
> +description: |
> +  P3H2x4x (P3H2440/P3H2441/P3H2840/P3H2841) is a family of multiport I3C
> +  hub devices that connect to:-
> +  1. A host CPU via I3C/I2C/SMBus bus on upstream side and connect to multiple
> +     peripheral devices on the downstream  side.
> +  2. Have two Controller Ports which can support either
> +     I2C/SMBus or I3C buses and connect to a CPU, BMC or SOC.
> +  3. P3H2840/ P3H2841 are 8 port I3C hub with eight I3C/I2C Target Port.
> +  4. P3H2440/ P3H2441 are 4 port I3C hub with four I3C/I2C Target Port.
> +     Target ports can be configured as I2C/SMBus, I3C or GPIO and connect to
> +     peripherals.

[Severity: Medium]
The description states that target ports can be configured as GPIO.
Since unevaluatedProperties is set to false, shouldn't this schema include the
standard GPIO provider properties (like gpio-controller and #gpio-cells)
so device trees can actually configure and utilize the advertised GPIO
capabilities without triggering validation errors?

> +
> +properties:
> +  compatible:
> +    const: nxp,p3h2840

[Severity: Medium]
The commit message and schema description indicate support for the P3H2x4x
family, including the P3H2440, P3H2441, and P3H2841. Does this compatible block
need to be expanded from a const constraint to an enum to allow strings for
those other variants?

Also, if the 4-port variants are added, would they require different schema
constraints, such as a maximum port reg of 3 rather than 7 for the
patternProperties?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2

-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.