public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
	Tero Kristo <kristo@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arm64: dts: ti: k3-am625-sk: Add power/temperature sensors
Date: Fri, 9 May 2025 01:47:53 -0500	[thread overview]
Message-ID: <20250509064753.4ntxyozwlebnskod@compound> (raw)
In-Reply-To: <aB2hdA8mfKGlk8d8@pengutronix.de>

On 08:32-20250509, Sascha Hauer wrote:
> Hi Nishanth,
> 
> On Wed, May 07, 2025 at 07:01:04AM -0500, Nishanth Menon wrote:
> > On 15:24-20250505, Sascha Hauer wrote:
> > > The AM625-SK has six power sensors and two temperature sensors connected
> > > to I2C. Add them to the device tree.
> > > 
> > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > ---
> > > The AM625-SK has six power sensors and two temperature sensors connected
> > > to I2C. Add them to the device tree.
> > 
> > Sascha,
> > 
> > I suggest making this as overlay. The reason is as follows: AM625-SK
> > among other TI evms do have automated power measurement capability from
> > XDS110 (accessible via USB port for jtag - appears as a rudimentary
> > menu option). The way this works is that it uses TM4C1294NCPDT to use
> > I2C commands to control the INA226/231 depending on the evm.
> > 
> > This firmware should be flashed by default on production boards (if
> > not, starting up CCS[1], autodetects older firmware and updates - at
> > least to my understanding) - by the way, this firmware also does test
> > automation, such as boot mode switch control, reset control etc.
> > 
> > This is the primary framework meant to be used by test automation and
> > indeed it is the default inside TI.
> > 
> > Challenge here is this: if we make this default in Linux, the test
> > automation system configures the INA226/231 in a different sampling
> > mode depending on usecase etc Vs what Linux does (even though the
> > shunt and the bus voltage for a given INA is the same). And just like
> > Linux, the firmware power measurement logic has changed over the
> > years.
> > 
> > Anyways, while I know that the SoC and TM4C can both handle
> > multi-master, the challenge is the same INA controlled and
> > mix-configured by two masters (and there is no synchronization between
> > the two).
> > 
> > To avoid this entire conflict and headache, I suggest adding it as
> > overlay that can be applied depending on the preference of measurement
> > desired.
> 
> Thanks for this explanation. I'll go for the overlay then.

Thanks. do check if the default defconfig needs to be updated as well -
i didn't get a chance to cross verify - will be good to ensure deferred
devices are 0. if something to be enabled, do enable them as modules,
i'd gladly pull it in.

just a headsup - i plan on closing the window today and pick last set of
patches and tag on monday. a bit tight given the window currently..

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

      reply	other threads:[~2025-05-09  6:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-05 13:24 [PATCH] arm64: dts: ti: k3-am625-sk: Add power/temperature sensors Sascha Hauer
2025-05-07 12:01 ` Nishanth Menon
2025-05-09  6:32   ` Sascha Hauer
2025-05-09  6:47     ` Nishanth Menon [this message]

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=20250509064753.4ntxyozwlebnskod@compound \
    --to=nm@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=vigneshr@ti.com \
    /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