<div dir="ltr">Hi Iwona,<div><br></div><div>Attach NPCM PECI driver support.</div><div>The PECI driver built-in kernel 5.16-rc and tested on NPCM750 and NPCM845 BMC SoC's</div><div><br></div><div>It will be great if you can add it to the PECI patchset.</div><div><br></div><div>Thanks,</div><div><br></div><div>Tomer</div><div> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 23 Nov 2021 at 16:09, Iwona Winiarska <<a href="mailto:iwona.winiarska@intel.com">iwona.winiarska@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The Platform Environment Control Interface (PECI) is a communication<br>
interface between Intel processors and management controllers (e.g.<br>
Baseboard Management Controller, BMC).<br>
<br>
This series adds a PECI subsystem and introduces drivers which run in<br>
the Linux instance on the management controller (not the main Intel<br>
processor) and is intended to be used by the OpenBMC [1], a Linux<br>
distribution for BMC devices.<br>
The information exposed over PECI (like processor and DIMM<br>
temperature) refers to the Intel processor and can be consumed by<br>
daemons running on the BMC to, for example, display the processor<br>
temperature in its web interface.<br>
<br>
The PECI bus is collection of code that provides interface support<br>
between PECI devices (that actually represent processors) and PECI<br>
controllers (such as the "peci-aspeed" controller) that allow to<br>
access physical PECI interface. PECI devices are bound to PECI<br>
drivers that provides access to PECI services. This series introduces<br>
a generic "peci-cpu" driver that exposes hardware monitoring "cputemp"<br>
and "dimmtemp" using the auxiliary bus.<br>
<br>
Exposing "raw" PECI to userspace, either to write userspace drivers or<br>
for debug/testing purpose was left out of this series to encourage<br>
writing kernel drivers instead, but may be pursued in the future.<br>
<br>
Introducing PECI to upstream Linux was already attempted before [2].<br>
Since it's been over a year since last revision, and the series<br>
changed quite a bit in the meantime, I've decided to start from v1.<br>
<br>
I would also like to give credit to everyone who helped me with<br>
different aspects of preliminary review:<br>
- Pierre-Louis Bossart,<br>
- Tony Luck, <br>
- Andy Shevchenko,<br>
- Dave Hansen.<br>
<br>
[1] <a href="https://github.com/openbmc/openbmc" rel="noreferrer" target="_blank">https://github.com/openbmc/openbmc</a><br>
[2] <a href="https://lore.kernel.org/openbmc/20191211194624.2872-1-jae.hyun.yoo@linux.intel.com/" rel="noreferrer" target="_blank">https://lore.kernel.org/openbmc/20191211194624.2872-1-jae.hyun.yoo@linux.intel.com/</a><br>
<br>
Changes v3 -> v4:<br>
* Fixed an issue where peci doesn't work after host shutdown (Zev)<br>
* Replaced kill_device() with peci_device_del_lock (Greg)<br>
* Fixed dts_valid() parameter type (Guenter)<br>
* Removed Jae from MAINTAINERS file (Jae)<br>
<br>
Changes v2 -> v3:<br>
<br>
* Dropped x86/cpu patches (Boris)<br>
* Dropped pr_fmt() for PECI module (Dan)<br>
* Fixed releasing peci controller device flow (Dan) <br>
* Improved peci-aspeed commit-msg and Kconfig help (Dan)<br>
* Fixed aspeed_peci_xfer() to use the proper spin_lock function (Dan) <br>
* Wrapped print_hex_dump_bytes() in CONFIG_DYNAMIC_DEBUG (Dan)<br>
* Removed debug status logs from aspeed_peci_irq_handler() (Dan)<br>
* Renamed functions using devres to start with "devm" (Dan)<br>
* Changed request to be allocated on stack in peci_detect (Dan)<br>
* Removed redundant WARN_ON on invalid PECI addr (Dan)<br>
* Changed peci_device_create() to use device_initialize() + device_add() pattern (Dan)<br>
* Fixed peci_device_destroy() to use kill_device() avoiding double-free (Dan)<br>
* Renamed functions that perform xfer using "peci_xfer_*" prefix (Dan) <br>
* Renamed peci_request_data_dib(temp) -> peci_request_dib(temp)_read (Dan)<br>
* Fixed thermal margin readings for older Intel processors (Zev) <br>
* Misc hwmon simplifications (Guenter)<br>
* Used BIT_PER_TYPE to verify macro value constrains (Guenter)<br>
* Improved WARN_ON message to print chan_rank_max and idx_dimm_max (Guenter)<br>
* Improved dimmtemp to not reattempt probe if no dimms are populated<br>
<br>
Changes v1 -> v2:<br>
<br>
Biggest changes when it comes to diffstat are locking in HWMON<br>
(I decided to clean things up a bit while adding it), switching to<br>
devres usage in more places and exposing sysfs interface in separate patch.<br>
<br>
* Moved extending X86 ARCHITECTURE MAINTAINERS earlier in series (Dan)<br>
* Removed "default n" for GENERIC_LIB_X86 (Dan)<br>
* Added vendor prefix for peci-aspeed specific properties (Rob)<br>
* Refactored PECI to use devres consistently (Dan)<br>
* Added missing sysfs documentation and excluded adding peci-sysfs to<br>
separate patch (Dan)<br>
* Used module_init() instead of subsys_init() for peci module initialization (Dan)<br>
* Removed redundant struct peci_device member (Dan)<br>
* Improved PECI Kconfig help (Randy/Dan)<br>
* Fixed/removed log messages (Dan, Guenter)<br>
* Refactored peci-cputemp and peci-dimmtemp and added missing locks (Guenter)<br>
* Removed unused dev_set_drvdata() in peci-cputemp and peci-dimmtemp (Guenter)<br>
* Fixed used types, names, fixed broken and added additional comments<br>
to peci-hwmon (Guenter, Zev)<br>
* Refactored peci-dimmtemp to not return -ETIMEDOUT (Guenter)<br>
* Added sanity check for min_peci_revision in peci-hwmon drivers (Zev)<br>
* Added assert for DIMM_NUMS_MAX and additional warning in peci-dimmtemp (Zev)<br>
* Fixed macro names in peci-aspeed (Zev)<br>
* Refactored peci-aspeed sanitizing properties to a single helper function (Zev)<br>
* Fixed peci_cpu_device_ids definition for Broadwell Xeon D (David)<br>
* Refactor peci_request to use a single allocation (Zev)<br>
* Used min_t() to improve code readability (Zev)<br>
* Added macro for PECI_RDENDPTCFG_MMIO_WR_LEN_BASE and fixed adev type<br>
array name to more descriptive (Zev)<br>
* Fixed peci-hwmon commit-msg and documentation (Zev)<br>
<br>
Thanks<br>
-Iwona<br>
<br>
Iwona Winiarska (11):<br>
dt-bindings: Add generic bindings for PECI<br>
dt-bindings: Add bindings for peci-aspeed<br>
ARM: dts: aspeed: Add PECI controller nodes<br>
peci: Add core infrastructure<br>
peci: Add device detection<br>
peci: Add sysfs interface for PECI bus<br>
peci: Add support for PECI device drivers<br>
peci: Add peci-cpu driver<br>
hwmon: peci: Add cputemp driver<br>
hwmon: peci: Add dimmtemp driver<br>
docs: Add PECI documentation<br>
<br>
Jae Hyun Yoo (2):<br>
peci: Add peci-aspeed controller driver<br>
docs: hwmon: Document PECI drivers<br>
<br>
Documentation/ABI/testing/sysfs-bus-peci | 16 +<br>
.../devicetree/bindings/peci/peci-aspeed.yaml | 109 +++<br>
.../bindings/peci/peci-controller.yaml | 33 +<br>
Documentation/hwmon/index.rst | 2 +<br>
Documentation/hwmon/peci-cputemp.rst | 90 +++<br>
Documentation/hwmon/peci-dimmtemp.rst | 57 ++<br>
Documentation/index.rst | 1 +<br>
Documentation/peci/index.rst | 16 +<br>
Documentation/peci/peci.rst | 51 ++<br>
MAINTAINERS | 26 +<br>
arch/arm/boot/dts/aspeed-g4.dtsi | 14 +<br>
arch/arm/boot/dts/aspeed-g5.dtsi | 14 +<br>
arch/arm/boot/dts/aspeed-g6.dtsi | 14 +<br>
drivers/Kconfig | 3 +<br>
drivers/Makefile | 1 +<br>
drivers/hwmon/Kconfig | 2 +<br>
drivers/hwmon/Makefile | 1 +<br>
drivers/hwmon/peci/Kconfig | 31 +<br>
drivers/hwmon/peci/Makefile | 7 +<br>
drivers/hwmon/peci/common.h | 58 ++<br>
drivers/hwmon/peci/cputemp.c | 592 ++++++++++++++++<br>
drivers/hwmon/peci/dimmtemp.c | 630 ++++++++++++++++++<br>
drivers/peci/Kconfig | 36 +<br>
drivers/peci/Makefile | 10 +<br>
drivers/peci/controller/Kconfig | 17 +<br>
drivers/peci/controller/Makefile | 3 +<br>
drivers/peci/controller/peci-aspeed.c | 429 ++++++++++++<br>
drivers/peci/core.c | 236 +++++++<br>
drivers/peci/cpu.c | 343 ++++++++++<br>
drivers/peci/device.c | 252 +++++++<br>
drivers/peci/internal.h | 136 ++++<br>
drivers/peci/request.c | 482 ++++++++++++++<br>
drivers/peci/sysfs.c | 82 +++<br>
include/linux/peci-cpu.h | 40 ++<br>
include/linux/peci.h | 112 ++++<br>
35 files changed, 3946 insertions(+)<br>
create mode 100644 Documentation/ABI/testing/sysfs-bus-peci<br>
create mode 100644 Documentation/devicetree/bindings/peci/peci-aspeed.yaml<br>
create mode 100644 Documentation/devicetree/bindings/peci/peci-controller.yaml<br>
create mode 100644 Documentation/hwmon/peci-cputemp.rst<br>
create mode 100644 Documentation/hwmon/peci-dimmtemp.rst<br>
create mode 100644 Documentation/peci/index.rst<br>
create mode 100644 Documentation/peci/peci.rst<br>
create mode 100644 drivers/hwmon/peci/Kconfig<br>
create mode 100644 drivers/hwmon/peci/Makefile<br>
create mode 100644 drivers/hwmon/peci/common.h<br>
create mode 100644 drivers/hwmon/peci/cputemp.c<br>
create mode 100644 drivers/hwmon/peci/dimmtemp.c<br>
create mode 100644 drivers/peci/Kconfig<br>
create mode 100644 drivers/peci/Makefile<br>
create mode 100644 drivers/peci/controller/Kconfig<br>
create mode 100644 drivers/peci/controller/Makefile<br>
create mode 100644 drivers/peci/controller/peci-aspeed.c<br>
create mode 100644 drivers/peci/core.c<br>
create mode 100644 drivers/peci/cpu.c<br>
create mode 100644 drivers/peci/device.c<br>
create mode 100644 drivers/peci/internal.h<br>
create mode 100644 drivers/peci/request.c<br>
create mode 100644 drivers/peci/sysfs.c<br>
create mode 100644 include/linux/peci-cpu.h<br>
create mode 100644 include/linux/peci.h<br>
<br>
-- <br>
2.31.1<br>
<br>
</blockquote></div>