[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAcybutsMdXmqrA6kG9L5OTP9ZPyLzYrXTGUGLAkWs5+MH9ifA@mail.gmail.com>
Date: Fri, 5 Sep 2025 10:22:26 -0700
From: Gregory Fuchedgi <gfuchedgi@...il.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Robert Marko <robert.marko@...tura.hr>, Luka Perkov <luka.perkov@...tura.hr>,
Jean Delvare <jdelvare@...e.com>, Guenter Roeck <linux@...ck-us.net>, Jonathan Corbet <corbet@....net>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
linux-hwmon@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v3 1/2] dt-bindings: hwmon: update TI TPS23861 with
per-port schema
On Fri, Sep 5, 2025 at 1:10 AM Krzysztof Kozlowski <krzk@...nel.org> wrote:
> On Thu, Sep 04, 2025 at 10:33:44AM -0700, Gregory Fuchedgi wrote:
> What's the meaning of values? There are no other generic properties like
> that? Last time it was a generic property, but maybe the answer to my
> question should be that there is or should be such generic one?
>
> Also, why exactly wouldn't you want to accept here always the highest
> power class? What makes it a board-level property?
poe class (values from 0 to 8, this chip only supports 0 to 4) defines maximum
power of a poe session. The higher the class the higher the power (with an
exception of 0 for historical reasons).
A board may have a power budget of let's say 7W allocated for a poe device. In
that case the board should only provide power to devices which ask/negotiate poe
class 1 (up to 4W) or class 2 (up to 7W). Devices that ask for more should be
rejected to prevent brown out issues.
I think some of my questions last time got lost in the noise. Given the info
above, should this be a generic property? And if yes where do I put it?
I haven't found an existing one.
> I fail to see how this is property of a board... unless you wanted to
> figure out which ports are not connected, but status=disabled could be
> used for that.
yes, status=disabled is used for ports that are not connected at all.
off-by-default property is different.
Most boards want simple automatic operation, no userspace involved. E.g. enable
power as soon as acceptable class was negotiated.
For some boards, however, it is critical to have control of poe from the
userspace. Without this property the driver may enable power before userspace is
ready.
> Sorry, but device has FIXED reset values for registers, so whether
> something is off or on by default is defined by compatible.
yes, but it is also defined by ports-shutdown pin state.
Here's our board startup sequence (see 2/2 patch):
reset pin has pull resistor keeping reset active until driver takes over the
pin. The driver activates ports-shutdown pin first and only then deactivates
reset. Then configuration over i2c happens, while ports are shut down. Then the
driver either enables a port based on off-by-default property or
doesn't, leaving
this up to the userspace.
This setup guarantees that from soc reset until userspace is ready there's no
poe activity on the ports. This implementation is also flexible and backwards
compatible.
Powered by blists - more mailing lists