From: Oleksandr Natalenko <oleksandr@natalenko.name>
To: linux-hwmon@vger.kernel.org, Guenter Roeck <linux@roeck-us.net>,
Jean Delvare <jdelvare@suse.com>,
Zev Weiss <zev@bewilderbeest.net>
Cc: devicetree@vger.kernel.org, openbmc@lists.ozlabs.org,
Rob Herring <robh+dt@kernel.org>,
linux-kernel@vger.kernel.org, Renze Nicolai <renze@rnplus.nl>
Subject: Re: [PATCH 0/5] hwmon: (nct6775) Add i2c support
Date: Sun, 27 Feb 2022 01:14:12 +0100 [thread overview]
Message-ID: <2620147.mvXUDI8C0e@natalenko.name> (raw)
In-Reply-To: <20220226133047.6226-1-zev@bewilderbeest.net>
Hello.
On sobota 26. února 2022 14:30:42 CET Zev Weiss wrote:
> Hello,
>
> This patch series augments the existing nct6775 driver with support
> for the hardware's i2c interface.
Is it something I can test on my ASUS Pro WS X570-ACE board as an ordinary user, and if so, how?
Thanks.
> Thus far the nct6775 driver has only supported the LPC interface,
> which is the main interface by which the Super-I/O chip is typically
> connected to the host (x86) processor.
>
> However, these chips also provide an i2c interface, which can provide
> a way for a BMC to also monitor sensor readings from them. On some
> systems (such as the ASRock Rack ROMED8HM3 and X570-D4U) this may be
> the only way for the BMC to monitor host CPU temperatures (e.g. to
> indirectly access a TSI interface); this functionality is thus an
> important component of enabling OpenBMC to support such systems.
>
> In such an arrangement the Super-I/O chip is simultaneously controlled
> by two independent processors (the host and the BMC) which typically
> do not coordinate their accesses with each other. In order to avoid
> conflicts between the two, the i2c driver avoids all writes to the
> device, since the BMC's needs with the hardware are merely that it be
> able to retrieve sensor readings. This allows the host processor to
> remain ultimately in control of the chip and unaware of the BMC's use
> of it at all.
>
> The sole exception to the "no writes" rule for the i2c driver is for
> the bank-select register -- while I haven't been able to find any
> explicit statement in the Nuvoton datasheets guaranteeing this, all
> experiments I've done have indicated that, as one might hope, the i2c
> interface has its own bank-select register independent of the one used
> by the LPC interface.
>
> In terms of code structure, the approach taken in this series is to
> split the LPC-specific parts of the driver out into a separate module
> (called nct6775-platform), leaving the interface-independent parts in
> a generic driver (called nct6775-core). The nct6775-i2c driver is
> then added as an additional consumer of the nct6775-core module's
> functionality.
>
> The first two patches make some relatively small infrastructural
> changes to the nct6775 driver; the bulk of the core/platform driver
> split is in the third patch. The final two patches add DT bindings
> and the i2c driver itself.
>
> I've tested the nct6775-platform and nct6775-i2c drivers with the
> NCT6779D in an ASRock ROMED8HM3 system (the latter driver on its
> AST2500 BMC); both seem to work as expected. Broader testing would of
> course be welcome though, as is review feedback.
>
>
> Thanks,
> Zev
>
>
> Zev Weiss (5):
> hwmon: (nct6775) Rearrange attr-group initialization
> hwmon: (nct6775) Add read-only mode
> hwmon: (nct6775) Split core and platform driver
> dt-bindings: hwmon: Add nuvoton,nct6775
> hwmon: (nct6775) Add i2c driver
>
> .../bindings/hwmon/nuvoton,nct6775.yaml | 48 +
> MAINTAINERS | 12 +-
> drivers/hwmon/Kconfig | 32 +-
> drivers/hwmon/Makefile | 4 +-
> drivers/hwmon/{nct6775.c => nct6775-core.c} | 1464 +----------------
> drivers/hwmon/nct6775-i2c.c | 191 +++
> drivers/hwmon/nct6775-platform.c | 1185 +++++++++++++
> drivers/hwmon/nct6775.h | 233 +++
> 8 files changed, 1763 insertions(+), 1406 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/hwmon/nuvoton,nct6775.yaml
> rename drivers/hwmon/{nct6775.c => nct6775-core.c} (75%)
> create mode 100644 drivers/hwmon/nct6775-i2c.c
> create mode 100644 drivers/hwmon/nct6775-platform.c
> create mode 100644 drivers/hwmon/nct6775.h
>
>
--
Oleksandr Natalenko (post-factum)
next prev parent reply other threads:[~2022-02-28 4:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-26 13:30 [PATCH 0/5] hwmon: (nct6775) Add i2c support Zev Weiss
2022-02-26 13:30 ` [PATCH 1/5] hwmon: (nct6775) Rearrange attr-group initialization Zev Weiss
2022-02-27 15:01 ` Guenter Roeck
2022-02-28 8:24 ` Zev Weiss
2022-02-28 15:16 ` Guenter Roeck
2022-02-26 13:30 ` [PATCH 2/5] hwmon: (nct6775) Add read-only mode Zev Weiss
2022-02-26 13:30 ` [PATCH 3/5] hwmon: (nct6775) Split core and platform driver Zev Weiss
2022-02-26 13:30 ` [PATCH 4/5] dt-bindings: hwmon: Add nuvoton,nct6775 Zev Weiss
2022-02-27 10:58 ` Krzysztof Kozlowski
2022-02-26 13:30 ` [PATCH 5/5] hwmon: (nct6775) Add i2c driver Zev Weiss
2022-02-26 22:47 ` [PATCH 0/5] hwmon: (nct6775) Add i2c support Zev Weiss
2022-02-26 23:54 ` Guenter Roeck
2022-02-27 12:25 ` Zev Weiss
2022-02-27 0:14 ` Oleksandr Natalenko [this message]
2022-02-27 0:27 ` Zev Weiss
2022-02-27 21:38 ` Oleksandr Natalenko
2022-02-28 2:48 ` Zev Weiss
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=2620147.mvXUDI8C0e@natalenko.name \
--to=oleksandr@natalenko.name \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=openbmc@lists.ozlabs.org \
--cc=renze@rnplus.nl \
--cc=robh+dt@kernel.org \
--cc=zev@bewilderbeest.net \
/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;
as well as URLs for NNTP newsgroup(s).