Re: [PATCH v10 11/36] pinctrl: airoha: fix I2C pin mux config for AN7583

[email protected]
Newsgroups org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing Devicetree Binding Update for AN7583 'i2c0' pin group
--

--- Patch [11]: [PATCH v10 11/36] pinctrl: airoha: fix I2C pin mux config for AN7583 ---
commit e28587d243bbc4921ed81a1b0233d819959a9116
Author: Daniel Schwierzeck <[email protected]>

pinctrl: airoha: fix I2C pin mux config for AN7583

This commit adds dedicated I2C pin groups and function groups for AN7583.
It introduces new groups to support both i2c0 and i2c1 because both busses
share pins with GPIO.

> diff --git a/drivers/pinctrl/airoha/pinctrl-airoha.c b/drivers/pinctrl/airoha/pinctrl-airoha.c
> index 2695342adfc76..7de07d002d05f 100644
> --- a/drivers/pinctrl/airoha/pinctrl-airoha.c
> +++ b/drivers/pinctrl/airoha/pinctrl-airoha.c
> @@ -896,6 +896,7 @@ static const char *const uart_groups[] = { "uart2", "uart2_cts_rts", "hsuart",
>  					   "hsuart_cts_rts", "uart4",
>  					   "uart5" };
>  static const char *const i2c_groups[] = { "i2c1" };
> +static const char *const an7583_i2c_groups[] = { "i2c0", "i2c1" };

[Severity: Medium]
Will this addition cause device tree validation failures?

Looking at Documentation/devicetree/bindings/pinctrl/airoha,an7583-pinctrl.yaml,
the schema strictly limits the "i2c" function's valid groups to only "i2c1":

          - if:
              properties:
                function:
                  const: i2c
            then:
              properties:
                groups:
                  enum: [i2c1]

If a user specifies function = "i2c" and groups = "i2c0" in a board device
tree, it will fail dtbs_check schema validation, despite being valid and
supported by the updated driver.

Should the device tree binding document be updated alongside this change to
allow the new "i2c0" group?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=11
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.