Re: [PATCH v5 03/21] dt-bindings: pinctrl: Add starfive,jhb100-sys0-pinctrl

From: Changhuang Liang

Date: Mon Aug 10 2026 - 23:25:03 EST


HI, Rob

Thanks for the review.

> On Mon, Aug 10, 2026 at 09:51:07AM +0000, Changhuang Liang wrote:
> > Hi, Rob
> >
> > > On Sun, 09 Aug 2026 23:36:32 -0700, Changhuang Liang wrote:
> > > > Add pinctrl bindings for StarFive JHB100 SoC System-0(sys0)
> > > > pinctrl controller.
> > > >
> > > > Signed-off-by: Changhuang Liang
> > > > <changhuang.liang@xxxxxxxxxxxxxxxx>
> > > > ---
> > > > .../pinctrl/starfive,jhb100-sys0-pinctrl.yaml | 164
> ++++++++++++++++++
> > > > .../pinctrl/starfive,jhb100-pinctrl.h | 17 ++
> > > > 2 files changed, 181 insertions(+) create mode 100644
> > > > Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys0-pin
> > > > ctrl
> > > > .yaml create mode 100644
> > > > include/dt-bindings/pinctrl/starfive,jhb100-pinctrl.h
> > > >
> > >
> > > My bot found errors running 'make dt_binding_check' on your patch:
> > >
> > > yamllint warnings/errors:
> > >
> > > dtschema/dtc warnings/errors:
> > > Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys0-pinct
> > > rl.exa
> > > mple.dtb: pinctrl@13080000 (starfive,jhb100-sys0-pinctrl):
> > > gpio-ranges:1: [4] is too short
> > > from schema $id: http://devicetree.org/schemas/gpio/gpio.yaml
> > >
> > > doc reference errors (make refcheckdocs):
> > >
> > > See
> > > https://patchwork.kernel.org/project/devicetree/patch/20260810063650
> > > .23 9303-4-changhuang.liang@xxxxxxxxxxxxxxxx
> > >
> > > The base for the series is generally the latest rc1. A different
> > > dependency should be noted in *this* patch.
> > >
> > > If you already ran 'make dt_binding_check' and didn't see the above
> > > error(s), then make sure 'yamllint' is installed and dt-schema is up
> > > to
> > > date:
> > >
> > > pip3 install dtschema --upgrade
> > >
> > > Please check and re-submit after running the above command yourself.
> > > Note that DT_SCHEMA_FILES can be set to your schema file to speed up
> > > checking your schema. However, it must be unset to test all examples
> > > with your schema.
> >
> > Hi Rob,
> >
> > Regarding this link:
> >
> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schema
> s
> > /gpio/gpio.yaml#L71
> >
> > It seems that the configuration to support #gpio-cells = <3>; has not been
> added here yet, is that correct?
>
> Shrug. Based on the description, gpio-ranges doesn't depend the # of cells.
>
> Why do you need 3 cells? You haven't described the cell content.

For the pinctrl of JHB100, every 32 GPIOs correspond to one register, so it uses 3-cell
#gpio-cells and 4-cell gpio-ranges, which helps simplify the driver code.

I referred to this generic implementation:
https://elixir.bootlin.com/linux/v7.2-rc6/source/drivers/gpio/gpiolib-of.c#L936

So the content of gpio cells and gpio-ranges is as follows:
gpios = <&gpio [instance] offset flags>;
gpio-ranges = <&pinctrl [gpio_instance] gpio_offset pin_offset count>;

I'm not sure whether this error is caused by a mismatch with the definition in schemas/gpio/gpio.yaml:

gpio-ranges:
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
items:
- description: pin controller phandle
- description: GPIO controller offset
- description: pin controller offset
- description: number of pins

Do you have any suggestions for fixing this? Thank you very much.

Best Regards,
Changhuang