Re: [PATCH 2/8] dt-bindings: mfd: ROHM BD73800 PMIC
From: Linus Walleij
Date: Fri Jul 03 2026 - 16:49:34 EST
Hi Matti,
thanks for your patch!
I have some inevitable pin control nitpicks!
On Wed, Jul 1, 2026 at 2:41 PM Matti Vaittinen
<matti.vaittinen@xxxxxxxxx> wrote:
> + # The GPIO1, CLKOUT (GPIO2), FAULT_B and EXTEN_OUT pins can be
> + # configured to interrupt pins by OTP.
Maybe move this helpful comment into the top description: instead?
It's kind of generic helpful info.
> +# The GPIO1, CLKOUT, FAULT_B and EXTEN_OUT pins may be configured for a
> +# specific purpose (like ADC input, 32.768 clk output, fault indicator or
> +# delivering power sequence to a companion PMIC when multiple PMICs are
> +# used) - but also to be either a GPO or GPI. (When used as a GPI the pin
> +# can also be used as an IRQ source). The pin purpose is determined by
> +# OTP (One Time Programmable memory), typically during device manufacturing.
> +# The OTP can't be read at runtime so device-tree should describe the pins.
> + rohm,pin-gpio1:
> + $ref: /schemas/types.yaml#/definitions/string
> + description:
> + Indicate if the GPIO1 pin has been set to GPI or GPO at manufacturing.
> + enum: [gpi, gpo]
> +
> + rohm,pin-clkout:
> + $ref: /schemas/types.yaml#/definitions/string
> + description:
> + Indicate if the CLKOUT pin has been set to GPI or GPO at manufacturing.
> + enum: [gpi, gpo]
> +
> + rohm,pin-fault-b:
> + $ref: /schemas/types.yaml#/definitions/string
> + description:
> + Indicate if the FAULT_B pin has been set to GPI or GPO at manufacturing.
> + enum: [gpi, gpo]
> +
> + rohm,pin-exten:
> + $ref: /schemas/types.yaml#/definitions/string
> + description:
> + Indicate if the EXTEN_OUT pin has been set to GPI or GPO at
> + manufacturing.
> + enum: [gpi, gpo]
Can we explain what "GPI" and "GPO" means in this context?
I read it as "general purpose input" and "general purpose output", but...
you just describe the exact purpose? So what is "general purpose"
about them in that case?
I would re-use "input-enable" and "output-enable" from:
Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml
(I mean don't $rf that, just use these strings).
I suppose:
enum: [input-enable, output-enable]
> + rohm,clkout-open-drain:
> + description: clk32kout mode. Set to 1 for "open-drain" or 0 for "cmos".
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 0
> + maximum: 1
Here I would also reuse the generic pinconf properties,
something like;
rohm,clkout-drive-type:
enum: [drive-push-pull, drive-open-drain]
(Push-pull is what is colloquially referred to as "cmos".)
> + rohm,pin-gpio1 = "gpo";
> + rohm,pin-exten = "gpi";
If you instead use nodes with properties you can do this:
rohm,pin-clkout {
output-enable;
drive-push-pull;
};
This collects the clkout config in one place and make
it obvious what is going on. But I don't know what the DT
maintainers think about this idea.
Yours,
Linus Walleij