Re: [PATCH v1 1/2] dt-bindings: hwmon: Add starfive,jhb100-fan-tach
From: Changhuang Liang
Date: Wed May 06 2026 - 21:36:27 EST
Hi, Rob
Thanks for the review.
> On Tue, Apr 28, 2026 at 01:23:36AM -0700, Changhuang Liang wrote:
> > Add compatible "starfive,jhb100-fan-tach" for StarFive JHB100 Fan-Tach
> > controller.
> >
> > Signed-off-by: Changhuang Liang <changhuang.liang@xxxxxxxxxxxxxxxx>
> > ---
> > .../hwmon/starfive,jhb100-fan-tach.yaml | 98
> +++++++++++++++++++
> > 1 file changed, 98 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/hwmon/starfive,jhb100-fan-tach.yaml
> >
> > diff --git
> >
> a/Documentation/devicetree/bindings/hwmon/starfive,jhb100-fan-tach.yam
> > l
> >
> b/Documentation/devicetree/bindings/hwmon/starfive,jhb100-fan-tach.yam
> > l
> > new file mode 100644
> > index 000000000000..fdc8539ec804
> > --- /dev/null
> > +++
> b/Documentation/devicetree/bindings/hwmon/starfive,jhb100-fan-tach
> > +++ .yaml
> > @@ -0,0 +1,98 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2
> > +---
> > +$id:
> > +http://devicetree.org/schemas/hwmon/starfive,jhb100-fan-tach.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: StarFive JHB100 Fan-Tach controller
> > +
> > +maintainers:
> > + - Changhuang Liang <changhuang.liang@xxxxxxxxxxxxxxxx>
> > +
> > +description:
> > + The StarFive Fan-Tach controller can support up to 16 fan tach input.
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - starfive,jhb100-fan-tach
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + clocks:
> > + maxItems: 1
> > +
> > + resets:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + '#address-cells':
> > + const: 1
> > +
> > + '#size-cells':
> > + const: 0
> > +
> > +patternProperties:
> > + "^fan@[0-9]+$":
>
> Unit-addresses are hex.
>
> > + $ref: fan-common.yaml#
> > + unevaluatedProperties: false
> > + required:
> > + - reg
> > + - tach-ch
>
> You need constraints on the 'reg' values. Also, what does 'reg'
> represent in this case?
"reg" is only used to distinguish between different fan instances.
>
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - clocks
> > + - resets
> > + - interrupts
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + fan-tach-controller@11be0000 {
> > + compatible = "starfive,jhb100-fan-tach";
> > + reg = <0x11be0000 0x400>;
> > + interrupts = <128>;
> > + clocks = <&per2crg 33>;
> > + resets = <&per2crg 5>;
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + fan@0 {
> > + reg = <0>;
> > + tach-ch = /bits/ 8 <0x0>, <0x8>;
>
> How do you have 1 fan with 2 tach signals?
On our platform, two fans share one PWM channel. It seems there was a misunderstanding earlier.
I will change it to the form of one tach per fan.
Best Regards,
Changhuang