Re: [PATCH v2 1/2] dt-bindings: gpio: otto-gpio: Add gpio-ranges
From: Sander Vanheule
Date: Wed Aug 19 2026 - 16:06:51 EST
Hi,
On Wed, 2026-08-19 at 22:51 +0700, misha.zavertkin@xxxxxxx wrote:
> Pinctrl is required for RTL9607C GPIOs to work, otherwise controller
> won't be routed to SoC pins. Add corresponding requirement to
> Documentation for realtek,rtl9607-gpio.
>
> Signed-off-by: Michael Zavertkin <misha.zavertkin@xxxxxxx>
> ---
> .../bindings/gpio/realtek,otto-gpio.yaml | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
> b/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
> index b18f8f0ca0ae..96396f968e78 100644
> --- a/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
> @@ -40,6 +40,8 @@ properties:
>
> gpio-controller: true
>
> + gpio-ranges: false
> +
> ngpios:
> minimum: 1
> maximum: 32
> @@ -75,6 +77,18 @@ required:
> - "#gpio-cells"
> - gpio-controller
>
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: realtek,rtl9607-gpio
> + then:
> + properties:
> + gpio-ranges: true
> + required:
> + - gpio-ranges
> +
> additionalProperties: false
>
> dependencies:
Same remark as for the driver: I would just allow gpio-ranges for all
compatibles and keep it optional. Since realtek,rtl9607-gpio was already
published, it needs to remain backwards compatible. Making the property required
now would theoretically invalidate existing devicetrees.
pinctrl-* properties already serve as an (actively used) alternative way to
select GPIO functions e.g. on RTL8380, so that's another reason for me to leave
this property optional.
In any case, thanks for the update to the driver!
Best,
Sander