mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Changhuang Liang <changhuang.liang@starfivetech.com>
Cc: Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v5 1/2] dt-bindings: hwmon: Add starfive,jhb100-pwm-fan
Date: Wed, 23 Sep 2026 17:37:29 +0100	[thread overview]
Message-ID: <20260923-feline-tattle-ecc37a0a9c56@spud> (raw)
In-Reply-To: <20260923130624.239499-2-changhuang.liang@starfivetech.com>

[-- Attachment #1: Type: text/plain, Size: 3473 bytes --]

On Wed, Sep 23, 2026 at 06:06:23AM -0700, Changhuang Liang wrote:
> Add a binding for the StarFive JHB100 PWM fan controller. The controller
> has a hardware tachometer block with 16 tachometer inputs, while fan
> speed is controlled through 8 PWM channels supplied by an external PWM
> controller.
> 
> One PWM channel can drive up to two fans, so each fan-N child node
> references one PWM channel and lists the tachometer inputs wired to the
> fans it drives.
> 
> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable

> ---
>  .../hwmon/starfive,jhb100-pwm-fan.yaml        | 87 +++++++++++++++++++
>  1 file changed, 87 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/starfive,jhb100-pwm-fan.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/starfive,jhb100-pwm-fan.yaml b/Documentation/devicetree/bindings/hwmon/starfive,jhb100-pwm-fan.yaml
> new file mode 100644
> index 000000000000..b05789867c0e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/starfive,jhb100-pwm-fan.yaml
> @@ -0,0 +1,87 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hwmon/starfive,jhb100-pwm-fan.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: StarFive JHB100 PWM Fan Controller
> +
> +maintainers:
> +  - Changhuang Liang <changhuang.liang@starfivetech.com>
> +
> +description:
> +  The StarFive JHB100 fan controller uses a hardware tachometer block with
> +  16 tachometer inputs to measure fan speed. Fan speed is controlled through
> +  8 PWM channels supplied by an external PWM controller, and one PWM channel
> +  can drive up to two fans. Each fan child node references the PWM channel
> +  driving the fan(s) and lists the tachometer inputs wired to them.
> +
> +properties:
> +  compatible:
> +    const: starfive,jhb100-pwm-fan
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  resets:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +patternProperties:
> +  "^fan-[0-7]$":
> +    $ref: fan-common.yaml#
> +    unevaluatedProperties: false
> +
> +    properties:
> +      pulses-per-revolution:
> +        minimum: 1
> +        default: 2
> +
> +      tach-ch:
> +        description:
> +          The tachometer input(s) wired to the fan(s) driven by the PWM
> +          channel. One PWM channel can drive up to two fans.
> +        minItems: 1
> +        maxItems: 2
> +        items:
> +          maximum: 15
> +
> +    required:
> +      - pwms
> +      - tach-ch
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - resets
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    fan-controller@11be0000 {
> +        compatible = "starfive,jhb100-pwm-fan";
> +        reg = <0x11be0000 0x400>;
> +        interrupts = <128>;
> +        clocks = <&per2crg 33>;
> +        resets = <&per2crg 5>;
> +
> +        fan-0 {
> +            pwms = <&pwm0 0 40000 0>;
> +            tach-ch = /bits/ 8 <0x0 0x8>;
> +            pulses-per-revolution = <2>;
> +        };
> +
> +        fan-1 {
> +            pwms = <&pwm1 0 40000 0>;
> +            tach-ch = /bits/ 8 <0x1 0x9>;
> +        };
> +    };
> +...
> -- 
> 2.25.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-09-23 16:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 13:06 [PATCH v5 0/2] Add JHB100 Fan-Tach support Changhuang Liang
2026-09-23 13:06 ` [PATCH v5 1/2] dt-bindings: hwmon: Add starfive,jhb100-pwm-fan Changhuang Liang
2026-09-23 16:37   ` Conor Dooley [this message]
2026-09-23 13:06 ` [PATCH v5 2/2] hwmon: (starfive-pwm-fan) Add PWM fan driver for StarFive JHB100 Changhuang Liang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260923-feline-tattle-ecc37a0a9c56@spud \
    --to=conor@kernel.org \
    --cc=changhuang.liang@starfivetech.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®