Re: [PATCH v1 01/20] dt-bindings: pinctrl: Add starfive,jhb100-sys0-pinctrl

Linus Walleij
2026-04-28T10:34:35Z

Hi Changhuang,

thanks for your patch!

On Fri, Apr 24, 2026 at 1:13 PM Changhuang Liang
<changhuang.liang@starfivetech.com> wrote:

> Add pinctrl bindings for StarFive JHB100 SoC System-0(sys0) pinctrl
> controller.
>
> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
(...)
> + properties:
> + pinmux:
> + description: |
> + The list of GPIOs and their function select.
> + The PINMUX macros are used to configure the
> + function selection.
> +
> + bias-disable: true
> +
> + bias-pull-up:
> + type: boolean
> +
> + bias-pull-down:
> + type: boolean
> +
> + drive-strength:
> + enum: [ 2, 4, 8, 12 ]
> +
> + drive-strength-microamp:
> + enum: [ 2000, 4000, 8000, 12000 ]
> +
> + input-enable: true
> +
> + input-disable: true
> +
> + input-schmitt-enable: true
> +
> + input-schmitt-disable: true
> +
> + slew-rate:
> + enum: [ 0, 1 ]
> + default: 0
> + description: |
> + 0: slow (half frequency)
> + 1: fast
> +
> + starfive,debounce-width:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + default: 0
> + description:
> + Debounce width 0 = Disabled, Others = 80ns*N stages

The argument to the existing
input-debounce is expressed in microseconds. Just recalculate
that value to your "width"? If you need more granularity add a
generic property input-debound-nanoseconds = <...>;

The code you submitted contains these undocumented properties,
copied from the driver review:

> +static const struct pinconf_generic_params jhb100_custom_bindings[] = {
> + { "starfive,gmac-vsel", STARFIVE_PIN_CONFIG_GMAC_VSEL, 0 },

Can't you use the existing "power-source" instead? It's fine if it's only
applicable to a few pins. This is overly specific.

> + { "starfive,drive-i2c-fast-mode", STARFIVE_PIN_DRIVE_I2C_FAST_MODE, 0 },
> + { "starfive,drive-i2c-fast-mode-plus", STARFIVE_PIN_DRIVE_I2C_FAST_MODE_PLUS, 0 },

It's not special that things are for i2c. Use the generic
slew-rate for these two, it describes how fast something is.

> + { "starfive,i2c-open-drain-pull-up-ohm", STARFIVE_PIN_OPEN_DRAIN_PULLUP_SELECT, 0 },

Use the existing drive-open-drain; with the existing bias-pull-up = <ohms>;
two properties. No need to be fancy and create a new property for this.

> + { "starfive,vga-rte", STARFIVE_PIN_VGA_RTE_SELECT, 0 },

No idea what this is...

Yours,
Linus Walleij