[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240423-gallantly-slurp-24adbfbd6f09@spud>
Date: Tue, 23 Apr 2024 18:02:36 +0100
From: Conor Dooley <conor@...nel.org>
To: Chanh Nguyen <chanh@...eremail.onmicrosoft.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Chanh Nguyen <chanh@...amperecomputing.com>,
Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Justin Ledford <justinledford@...gle.com>,
devicetree@...r.kernel.org, linux-hwmon@...r.kernel.org,
linux-kernel@...r.kernel.org,
OpenBMC Maillist <openbmc@...ts.ozlabs.org>,
Open Source Submission <patches@...erecomputing.com>,
Phong Vo <phong@...amperecomputing.com>,
Thang Nguyen <thang@...amperecomputing.com>,
Quan Nguyen <quan@...amperecomputing.com>
Subject: Re: [PATCH v2 3/3] dt-bindings: hwmon: max31790: Add
maxim,pwmout-pin-as-tach-input property
On Tue, Apr 23, 2024 at 03:45:12PM +0700, Chanh Nguyen wrote:
>
>
> On 16/04/2024 11:52, Chanh Nguyen wrote:
> >
> >
> > On 14/04/2024 13:07, Krzysztof Kozlowski wrote:
> > > On 14/04/2024 06:22, Chanh Nguyen wrote:
> > > > The max31790 supports six pins, which are dedicated PWM outputs.
> > > > Any of the
> > > > six PWM outputs can also be configured to serve as tachometer inputs,
> > > > allowing for up to 12 tachometer fans to be monitored.
> > > >
> > > > Add a new vendor-specific property, 'maxim,pwmout-pin-as-tach-input',
> > > > to allow PWMOUT to become a TACH input.
> > > >
> > > > An array of six integers responds to six PWM channels for configuring
> > > > the PWM to TACH mode. When set to 0, the associated PWMOUT produces
> > > > a PWM waveform for control of fan speed. When set to 1, PWMOUT becomes
> > > > a TACH input.
> > > >
> > > > Signed-off-by: Chanh Nguyen <chanh@...amperecomputing.com>
> > > > ---
> > > > Changes in v2:
> > > > - Update the vendor property name to
> > > > "maxim,pwmout-pin-as-tach-input" [Rob]
> > > > - Update commit
> > > > message
> > > > [Krzysztof]
> > >
> > > Please put binding before its user.
> > >
> >
> > Hi Krzysztof, I'll drop this [Path 3/3] in the patch series v3.
> >
> > My patch series will only be two patches. They are "dt-bindings: hwmon:
> > Add maxim max31790" and "hwmon: (max31790): Support config PWM output
> > becomes TACH"
> >
> > > > ---
> > > > .../devicetree/bindings/hwmon/maxim,max31790.yaml | 11 +++++++++++
> > > > 1 file changed, 11 insertions(+)
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml
> > > > b/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml
> > > > index a561e5a3e9e4..2d4f50bc7c41 100644
> > > > --- a/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml
> > > > +++ b/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml
> > > > @@ -30,6 +30,16 @@ properties:
> > > > resets:
> > > > maxItems: 1
> > > > + maxim,pwmout-pin-as-tach-input:
> > > > + description: |
> > > > + An array of six integers responds to six PWM channels for
> > > > + configuring the pwm to tach mode.
> > > > + When set to 0, the associated PWMOUT produces a PWM waveform for
> > > > + control of fan speed. When set to 1, PWMOUT becomes a TACH input
> > > > + $ref: /schemas/types.yaml#/definitions/uint8-array
> > > > + maxItems: 6
> > > > + minItems: 6
> > >
> > > tach-ch solves your case. You define which inputs should be used for
> > > tach.
> > >
> >
> > Agree Krzysztof. I'll use the tach-ch property from the fan-common.yaml
> > to solve my case. So I will not need to define a new vendor property as
> > "maxim,pwmout-pin-as-tach-input". I'll drop this [Path 3/3] in the patch
> > series v3.
> >
> >
> > > Best regards,
> > > Krzysztof
> > >
>
>
> Hi Krzysztof,
>
> I checked in the
> Documentation/devicetree/bindings/hwmon/fan-common.yaml. I found the
> tach-ch property, but it seems define the tach channel used for fan.
>
> tach-ch:
> description:
> The tach channel used for the fan.
> $ref: /schemas/types.yaml#/definitions/uint8-array
>
>
> In my purpose, I would like to configure the pwm output pins to become
> tachometer input pins by setting bit[0] in the Configuration Register.
>
>
> I think a vendor property is suitable for this purpose. It is only available
> on specific MAX31790 fan controllers and not on other fan controller
> devices. So I think we can't use the "tach-ch" in fan-common.yaml.
Can you explain why you think that only MAX31790 fan controllers are
capable of an arbitrary mapping of PWM outputs to TACH inputs?
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists