PECI device driver introduction
Subsystems (6)
v6 cover PECI device driver introduction
Introduction of the Platform Environment Control Interface (PECI) bus device driver. PECI is a one-wire bus interface that provides a communication channel from Intel processors and chipset components to external monitoring or control devices. PECI is designed to support the following sideband functions:
* Processor and DRAM thermal management
- Processor fan speed control is managed by comparing Digital Thermal Sensor (DTS) thermal readings acquired via PECI against the processor-specific fan speed control reference point, or TCONTROL. Both TCONTROL and DTS thermal readings are accessible via the processor PECI client. These variables are referenced to a common temperature, the TCC activation point, and are both defined as negative offsets from that reference.
- PECI based access to the processor package configuration space provides a means for Baseboard Management Controllers (BMC) or other platform management devices to actively manage the processor and memory power and thermal features.
* Platform Manageability
- Platform manageability functions including thermal, power, and error monitoring. Note that platform 'power' management includes monitoring and control for both the processor and DRAM subsystem to assist with data center power limiting.
- PECI allows read access to certain error registers in the processor MSR space and status monitoring registers in the PCI configuration space within the processor and downstream devices.
- PECI permits writes to certain registers in the processor PCI configuration space.
* Processor Interface Tuning and Diagnostics
- Processor interface tuning and diagnostics capabilities (Intel Interconnect BIST). The processors Intel Interconnect Built In Self Test (Intel IBIST) allows for infield diagnostic capabilities in the Intel UPI and memory controller interfaces. PECI provides a port to execute these diagnostics via its PCI Configuration read and write capabilities.
* Failure Analysis
- Output the state of the processor after a failure for analysis via Crashdump.
PECI uses a single wire for self-clocking and data transfer. The bus requires no additional control lines. The physical layer is a self-clocked one-wire bus that begins each bit with a driven, rising edge from an idle level near zero volts. The duration of the signal driven high depends on whether the bit value is a logic '0' or logic '1'. PECI also includes variable data transfer rate established with every message. In this way, it is highly flexible even though underlying logic is simple.
The interface design was optimized for interfacing between an Intel processor and chipset components in both single processor and multiple processor environments. The single wire interface provides low board routing overhead for the multiple load connections in the congested routing area near the processor and chipset components. Bus speed, error checking, and low protocol overhead provides adequate link bandwidth and reliability to transfer critical device operating conditions and configuration information.
This implementation provides the basic framework to add PECI extensions to the Linux bus and device models. A hardware specific 'Adapter' driver can be attached to the PECI bus to provide sideband functions described above. It is also possible to access all devices on an adapter from userspace through the /dev interface. A device specific 'Client' driver also can be attached to the PECI bus so each processor client's features can be supported by the 'Client' driver through an adapter connection in the bus. This patch set includes Aspeed 24xx/25xx PECI driver and PECI cputemp/dimmtemp drivers as the first implementation for both adapter and client drivers on the PECI bus framework.
Please review.
Thanks,
-Jae
Changes since v5:
* Added more detailed descriptions for PECI client MFD documents.
* Changed PECI client MFD souce file names.
* Fixed DT example of PECI client MFD.
* Removed unnecessary debug printings.
* Moved the asm/intel-family.h inclusion place.
Changes since v4:
* Fixed an incorrect endianness handling in peci-aspeed.
* Added a comment to explain about the asm/intel-family.h inclusion.
* Added an MFD module to support multi-function PECI client devices.
Changes since v3:
* Made code more simple and compact.
* Removed unused header file inclusion.
* Fixed incorrect error return values and messages.
* Removed DTS margin temperature from the peci-cputemp.
* Made some magic numbers use defines.
* Moved peci_get_cpu_id() into peci-core as a common function.
* Replaced the cancel_delayed_work() call with a cancel_delayed_work_sync().
* Replaced AST and Aspeed uses with ASPEED.
* Simplified peci command timeout checking logic using regmap_read_poll_timeout().
* Simplified endian swap codes using endian handling macros.
* Dropped regmap read/write error checking except for the first access.
* Added a PECI reset setting in the device tree node.
* Removed unnecessary sleep from the probe context.
* Removed IRQF_SHARED flag from irq request code in the ASPEED PECI driver.
* Fixed typos in documents.
* Combined peci-bus.txt, peci-adapter.txt and peci-client.txt into peci.txt.
* Fixed and swept documents to drop some incorrect or unnecessary descriptions.
* Fixed device tree to make unit-address format use reg contents.
* Simplified bit manipulations using <linux/bitfield.h>.
* Made client CPU model checking use <asm/intel-family.h> if available.
* Modified adapter heap allocation method to use kobject reference count based.
* Added the low-level PECI xfer IOCTL again to support the Redfish requirement.
* Added PM domain attach/detach code.
* Added logic for device instantiation through sysfs.
* Fix a bug of interrupt status checking code in peci-aspeed driver.
Changes since v2:
* Divided peci-hwmon driver into two drivers, peci-cputemp and peci-dimmtemp.
* Added generic dt binding documents for PECI bus, adapter and client.
* Removed in_atomic() call from the PECI core driver.
* Improved PECI commands masking logic.
* Added permission check logic for PECI ioctls.
* Removed unnecessary type casts.
* Fixed some invalid error return codes.
* Added the mark_updated() function to improve update interval checking logic.
* Fixed a bug in populated DIMM checking function.
* Fixed some typo, grammar and style issues in documents.
* Rewrote hwmon drivers to use devm_hwmon_device_register_with_info API.
* Made peci_match_id() function as a static.
* Replaced a deprecated create_singlethread_workqueue() call with an alloc_ordered_workqueue() call.
* Reordered local variable definitions in reversed xmas tree notation.
* Listed up client CPUs that can be supported by peci-cputemp and peci-dimmtemp hwmon drivers.
* Added CPU generation detection logic which checks CPUID signature through PECI connection.
* Improved interrupt handling logic in the Aspeed PECI adapter driver.
* Fixed SPDX license identifier style in header files.
* Changed some macros in peci.h to static inline functions.
* Dropped sleepable context checking code in peci-core.
* Adjusted rt_mutex protection scope in peci-core.
* Moved adapter->xfer() checking code into peci_register_adapter().
* Improved PECI command retry checking logic.
* Changed ioctl base from 'P' to 0xb6 to avoid confiliction and updated ioctl-number.txt to reflect the ioctl number of PECI subsystem.
* Added a comment to describe PECI retry action.
* Simplified return code handling of peci_ioctl_ping().
* Changed type of peci_ioctl_fn[] to static const.
* Fixed range checking code for valid PECI commands.
* Fixed the error return code on invalid PECI commands.
* Fixed incorrect definitions of PECI ioctl and its handling logic.
Changes since v1:
* Additionally implemented a core driver to support PECI linux bus driver model.
* Modified Aspeed PECI driver to make that to be an adapter driver in PECI bus.
* Modified PECI hwmon driver to make that to be a client driver in PECI bus.
* Simplified hwmon driver attribute labels and removed redundant strings.
* Removed core_nums from device tree setting of hwmon driver and modified core number detection logic to check the resolved_core register in client CPU's local PCI configuration area.
* Removed dimm_nums from device tree setting of hwmon driver and added populated DIMM detection logic to support dynamic creation.
* Removed indexing gap on core temperature and DIMM temperature attributes.
* Improved hwmon registration and dynamic attribute creation logic.
* Fixed structure definitions in PECI uapi header to make that use __u8, __u16 and etc.
* Modified wait_for_completion_interruptible_timeout error handling logic in Aspeed PECI driver to deliver errors correctly.
* Removed low-level xfer command from ioctl and kept only high-level PECI command suite as ioctls.
* Fixed I/O timeout logic in Aspeed PECI driver using ktime.
* Added a function into hwmon driver to simplify update delay checking.
* Added a function into hwmon driver to convert 10.6 to millidegree.
* Dropped non-standard attributes in hwmon driver.
* Fixed OF table for hwmon to make it indicate as a PECI client of Intel CPU target.
* Added a maintainer of PECI subsystem into MAINTAINERS document.
Jae Hyun Yoo (13):
dt-bindings: Add a document of PECI subsystem
Documentation: ioctl: Add ioctl numbers for PECI subsystem
peci: Add support for PECI bus driver core
dt-bindings: Add a document of PECI adapter driver for ASPEED
AST24xx/25xx SoCs
ARM: dts: aspeed: peci: Add PECI node
peci: Add a PECI adapter driver for Aspeed AST24xx/AST25xx
dt-bindings: mfd: Add a document for PECI client MFD
mfd: intel-peci-client: Add PECI client MFD driver
dt-bindings: hwmon: Add documents for PECI hwmon client drivers
Documentation: hwmon: Add documents for PECI hwmon client drivers
hwmon: Add PECI cputemp driver
hwmon: Add PECI dimmtemp driver
Add maintainers for the PECI subsystem
.../bindings/hwmon/peci-cputemp.txt | 11 + .../bindings/hwmon/peci-dimmtemp.txt | 12 + .../bindings/mfd/intel-peci-client.txt | 34 + .../devicetree/bindings/peci/peci-aspeed.txt | 57 + .../devicetree/bindings/peci/peci.txt | 60 + Documentation/hwmon/peci-cputemp | 78 + Documentation/hwmon/peci-dimmtemp | 50 + Documentation/ioctl/ioctl-number.txt | 2 + MAINTAINERS | 12 + arch/arm/boot/dts/aspeed-g4.dtsi | 26 + arch/arm/boot/dts/aspeed-g5.dtsi | 26 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/hwmon/Kconfig | 28 + drivers/hwmon/Makefile | 2 + drivers/hwmon/peci-cputemp.c | 401 +++++ drivers/hwmon/peci-dimmtemp.c | 295 ++++ drivers/mfd/Kconfig | 14 + drivers/mfd/Makefile | 1 + drivers/mfd/intel-peci-client.c | 182 +++ drivers/peci/Kconfig | 39 + drivers/peci/Makefile | 9 + drivers/peci/peci-aspeed.c | 498 ++++++ drivers/peci/peci-core.c | 1438 +++++++++++++++++ include/linux/mfd/intel-peci-client.h | 81 + include/linux/peci.h | 104 ++ include/uapi/linux/peci-ioctl.h | 265 +++ 27 files changed, 3728 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/peci-cputemp.txt create mode 100644 Documentation/devicetree/bindings/hwmon/peci-dimmtemp.txt create mode 100644 Documentation/devicetree/bindings/mfd/intel-peci-client.txt create mode 100644 Documentation/devicetree/bindings/peci/peci-aspeed.txt create mode 100644 Documentation/devicetree/bindings/peci/peci.txt create mode 100644 Documentation/hwmon/peci-cputemp create mode 100644 Documentation/hwmon/peci-dimmtemp create mode 100644 drivers/hwmon/peci-cputemp.c create mode 100644 drivers/hwmon/peci-dimmtemp.c create mode 100644 drivers/mfd/intel-peci-client.c create mode 100644 drivers/peci/Kconfig create mode 100644 drivers/peci/Makefile create mode 100644 drivers/peci/peci-aspeed.c create mode 100644 drivers/peci/peci-core.c create mode 100644 include/linux/mfd/intel-peci-client.h create mode 100644 include/linux/peci.h create mode 100644 include/uapi/linux/peci-ioctl.h
Signature · 1 line
2.17.1
PATCH v6 1/13 dt-bindings: Add a document of PECI subsystem
This commit adds a document of generic PECI bus, adapter and client driver.
--- .../devicetree/bindings/peci/peci.txt | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/peci/peci.txt
Documentation/devicetree/bindings/peci/peci.txt new file +60 -0
@@ -0,0 +1,60 @@ +Generic device tree configuration for PECI buses +================================================ + +Required properties: +- compatible : Should be "simple-bus". +- #address-cells : Should be present if the device has sub-nodes. +- #size-cells : Should be present if the device has sub-nodes. +- ranges : Should contain PECI controller registers ranges. + +Example: + peci: peci@10000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x10000000 0x1000>; + }; + +Generic device tree configuration for PECI adapters +=================================================== + +Required properties: +- #address-cells : Should be <1>. Read more about client addresses below. +- #size-cells : Should be <0>. Read more about client addresses below. + +The cells properties above define that an address of CPU clients of a PECI bus +are described by a single value. + +Example: + peci0: peci-bus@0 { + compatible = "vendor,soc-peci"; + reg = <0x0 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + }; + +Generic device tree configuration for PECI clients +================================================== + +Required properties: +- compatible : Should contain name of PECI client. +- reg : Should contain address of a client CPU. Address range of CPU + clients starts from 0x30 based on PECI specification. + +Example: + peci-bus@0 { + compatible = "vendor,soc-peci"; + reg = <0x0 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + peci-client@30 { + compatible = "vendor,peci-client"; + reg = <0x30>; + }; + + peci-client@31 { + compatible = "vendor,peci-client"; + reg = <0x31>; + }; + };
Signature · 1 line
2.17.1
Rob Herring
maintainerRe: [PATCH linux-next v6 01/13] dt-bindings: Add a document of PECI subsystem
Quoted 26 lines · Jae Hyun Yoo
This commit adds a document of generic PECI bus, adapter and client driver.
Signed-off-by Jae Hyun Yoo <[email protected]>Reviewed-by Haiyue Wang <[email protected]>Reviewed-by James Feist <[email protected]>Reviewed-by Vernon Mauery <[email protected]>Cc Andrew Jeffery <[email protected]>Cc Joel Stanley <[email protected]>--- .../devicetree/bindings/peci/peci.txt | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/peci/peci.txtDocumentation/devicetree/bindings/peci/peci.txt new file +6
-0@@ -0,0 +1,60 @@ +Generic device tree configuration for PECI buses +================================================ + +Required properties: +- compatible : Should be "simple-bus". +- #address-cells : Should be present if the device has sub-nodes.
Documentation/devicetree/bindings/peci/peci.txt line 16
Quoted 10 lines
Documentation/devicetree/bindings/peci/peci.txt new file +10
-0+- #size-cells : Should be present if the device has sub-nodes. +- ranges : Should contain PECI controller registers ranges. + +Example: + peci: peci@10000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x10000000 0x1000>; + };
I don't think you need this section. It's just the parent of the controller, right?
Quoted 47 lines
Documentation/devicetree/bindings/peci/peci.txt new file +44
-0+ +Generic device tree configuration for PECI adapters +=================================================== + +Required properties: +- #address-cells : Should be <1>. Read more about client addresses below. +- #size-cells : Should be <0>. Read more about client addresses below. + +The cells properties above define that an address of CPU clients of a PECI bus +are described by a single value. + +Example: + peci0: peci-bus@0 { + compatible = "vendor,soc-peci"; + reg = <0x0 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + }; + +Generic device tree configuration for PECI clients +================================================== + +Required properties: +- compatible : Should contain name of PECI client. +- reg : Should contain address of a client CPU. Address range of CPU + clients starts from 0x30 based on PECI specification. + +Example: + peci-bus@0 { + compatible = "vendor,soc-peci"; + reg = <0x0 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + peci-client@30 { + compatible = "vendor,peci-client"; + reg = <0x30>; + }; + + peci-client@31 { + compatible = "vendor,peci-client"; + reg = <0x31>; + }; + };Signature · 1 line
2.17.1
Re: [PATCH linux-next v6 01/13] dt-bindings: Add a document of PECI subsystem
Hi Rob,
Thanks for the review. Please see my inline answer.
Quoted 32 lines · Rob Herring
Quoted 31 lines · Jae Hyun Yoo
This commit adds a document of generic PECI bus, adapter and client driver.
Signed-off-by Jae Hyun Yoo <[email protected]>Reviewed-by Haiyue Wang <[email protected]>Reviewed-by James Feist <[email protected]>Reviewed-by Vernon Mauery <[email protected]>Cc Andrew Jeffery <[email protected]>Cc Joel Stanley <[email protected]>--- .../devicetree/bindings/peci/peci.txt | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+)create mode 100644
Documentation/devicetree/bindings/peci/peci.txtDocumentation/devicetree/bindings/peci/peci.txt new file +11
-0@@ -0,0 +1,60 @@ +Generic device tree configuration for PECI buses +================================================ + +Required properties: +- compatible : Should be "simple-bus". +- #address-cells : Should be present if the device has sub-nodes. +- #size-cells : Should be present if the device has sub-nodes. +- ranges : Should contain PECI controller registers ranges. + +Example: + peci: peci@10000000 {
Quoted 9 lines
Documentation/devicetree/bindings/peci/peci.txt line 16
Quoted 5 lines
Documentation/devicetree/bindings/peci/peci.txt new file +5
-0+ compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x10000000 0x1000>; + };I don't think you need this section. It's just the parent of the controller, right?
Right. I'll drop this section out.
Thanks a lot,
Jae
Quoted 47 lines
Quoted 47 lines
Documentation/devicetree/bindings/peci/peci.txt new file +44
-0+ +Generic device tree configuration for PECI adapters +=================================================== + +Required properties: +- #address-cells : Should be <1>. Read more about client addresses below. +- #size-cells : Should be <0>. Read more about client addresses below. + +The cells properties above define that an address of CPU clients of a PECI bus +are described by a single value. + +Example: + peci0: peci-bus@0 { + compatible = "vendor,soc-peci"; + reg = <0x0 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + }; + +Generic device tree configuration for PECI clients +================================================== + +Required properties: +- compatible : Should contain name of PECI client. +- reg : Should contain address of a client CPU. Address range of CPU + clients starts from 0x30 based on PECI specification. + +Example: + peci-bus@0 { + compatible = "vendor,soc-peci"; + reg = <0x0 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + peci-client@30 { + compatible = "vendor,peci-client"; + reg = <0x30>; + }; + + peci-client@31 { + compatible = "vendor,peci-client"; + reg = <0x31>; + }; + };Signature · 1 line
2.17.1
PATCH v6 2/13 Documentation: ioctl: Add ioctl numbers for PECI subsystem
In reply to Jae Hyun YooThis commit updates ioctl-number.txt to reflect ioctl numbers used by the PECI subsystem.
--- Documentation/ioctl/ioctl-number.txt | 2 ++ 1 file changed, 2 insertions(+)
Documentation/ioctl/ioctl-number.txt +2 -0
@@ -322,6 +322,8 @@ Code Seq#(hex) Include File Comments 0xB3 00 linux/mmc/ioctl.h 0xB4 00-0F linux/gpio.h <mailto:[email protected]> 0xB5 00-0F uapi/linux/rpmsg.h <mailto:[email protected]> +0xB6 00-0F uapi/linux/peci-ioctl.h PECI subsystem + <mailto:[email protected]> 0xC0 00-0F linux/usb/iowarrior.h 0xCA 00-0F uapi/misc/cxl.h 0xCA 10-2F uapi/misc/ocxl.h
Signature · 1 line
2.17.1
PATCH v6 3/13 peci: Add support for PECI bus driver core
In reply to Jae Hyun YooThis commit adds driver implementation for PECI bus core into linux driver framework.
--- drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/peci/Kconfig | 12 + drivers/peci/Makefile | 6 + drivers/peci/peci-core.c | 1438 +++++++++++++++++++++++++++++++ include/linux/peci.h | 104 +++ include/uapi/linux/peci-ioctl.h | 265 ++++++ 7 files changed, 1828 insertions(+) create mode 100644 drivers/peci/Kconfig create mode 100644 drivers/peci/Makefile create mode 100644 drivers/peci/peci-core.c create mode 100644 include/linux/peci.h create mode 100644 include/uapi/linux/peci-ioctl.h
drivers/Kconfig +2 -0
@@ -217,4 +217,6 @@ source "drivers/siox/Kconfig" source "drivers/slimbus/Kconfig" +source "drivers/peci/Kconfig" + endmenu
drivers/Makefile +1 -0
@@ -185,3 +185,4 @@ obj-$(CONFIG_TEE) += tee/ obj-$(CONFIG_MULTIPLEXER) += mux/ obj-$(CONFIG_UNISYS_VISORBUS) += visorbus/ obj-$(CONFIG_SIOX) += siox/ +obj-$(CONFIG_PECI) += peci/
drivers/peci/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +# +# Platform Environment Control Interface (PECI) subsystem configuration +# + +config PECI + bool "PECI support" + select RT_MUTEXES + select CRC8 + help + The Platform Environment Control Interface (PECI) is a one-wire bus + interface that provides a communication channel from Intel processors + and chipset components to external monitoring or control devices.
drivers/peci/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# +# Makefile for the PECI core and bus drivers. +# + +# Core functionality +obj-$(CONFIG_PECI) += peci-core.o
drivers/peci/peci-core.c new file +1438 -0
1,438 lines not on this page · raw message
include/linux/peci.h new file +104 -0
104 lines not on this page · raw message
include/uapi/linux/peci-ioctl.h new file +265 -0
265 lines not on this page · raw message
Signature · 1 line
2.17.1
Re: [PATCH linux-next v6 03/13] peci: Add support for PECI bus driver core
Quoted 17 lines · Jae Hyun Yoo
This commit adds driver implementation for PECI bus core into linux driver framework.
Signed-off-by Jae Hyun Yoo <[email protected]>Signed-off-by Fengguang Wu <[email protected]>Reviewed-by Haiyue Wang <[email protected]>Reviewed-by James Feist <[email protected]>Reviewed-by Vernon Mauery <[email protected]>Cc Alan Cox <[email protected]>Cc Andrew Lunn <[email protected]>Cc Andy Shevchenko <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Fengguang Wu <[email protected]>Cc Greg KH <[email protected]>Cc Jason M Biils <[email protected]>Cc Julia Cartwright <[email protected]>
Quoted 14 lines
--- drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/peci/Kconfig | 12 + drivers/peci/Makefile | 6 + drivers/peci/peci-core.c | 1438 +++++++++++++++++++++++++++++++ include/linux/peci.h | 104 +++ include/uapi/linux/peci-ioctl.h | 265 ++++++ 7 files changed, 1828 insertions(+) create mode 100644 drivers/peci/Kconfig create mode 100644 drivers/peci/Makefile create mode 100644 drivers/peci/peci-core.c create mode 100644 include/linux/peci.h create mode 100644 include/uapi/linux/peci-ioctl.h
I'm struggling to see the justification for adding an entirely new subsystem for what looks like a bespoke, and perhaps more damning, *proprietary* 1-wire interface. Especially one which has such limited use. Between yourself and the other silicon chip vendors there must be 100s of these knocking about. What makes this one special? Or even useful? Will there ever be more than a single source file in this directory?
Don't get me wrong, I'm all for upstreaming code, but to create a new subsystem and bus for this kind of device seems very over the top.
Since PECI's main purpose in life is Thermal Management, perhaps the whole thing should live in drivers/thermal or drivers/hwmon. I've also seen you reference this as a kind of BMC too, so maybe drivers/platform/x86 would also be a nice place for it to reside.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH linux-next v6 03/13] peci: Add support for PECI bus driver core
Quoted 42 lines · Lee Jones
Quoted 26 lines · Jae Hyun Yoo
This commit adds driver implementation for PECI bus core into linux driver framework.
Signed-off-by Jae Hyun Yoo <[email protected]>Signed-off-by Fengguang Wu <[email protected]>Reviewed-by Haiyue Wang <[email protected]>Reviewed-by James Feist <[email protected]>Reviewed-by Vernon Mauery <[email protected]>Cc Alan Cox <[email protected]>Cc Andrew Lunn <[email protected]>Cc Andy Shevchenko <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Fengguang Wu <[email protected]>Cc Greg KH <[email protected]>Cc Jason M Biils <[email protected]>Cc Julia Cartwright <[email protected]>--- drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/peci/Kconfig | 12 + drivers/peci/Makefile | 6 + drivers/peci/peci-core.c | 1438 +++++++++++++++++++++++++++++++ include/linux/peci.h | 104 +++ include/uapi/linux/peci-ioctl.h | 265 ++++++ 7 files changed, 1828 insertions(+)Quoted 5 lines
create mode 100644
drivers/peci/Kconfigcreate mode 100644drivers/peci/Makefilecreate mode 100644drivers/peci/peci-core.ccreate mode 100644include/linux/peci.hcreate mode 100644include/uapi/linux/peci-ioctl.hI'm struggling to see the justification for adding an entirely new subsystem for what looks like a bespoke, and perhaps more damning, *proprietary* 1-wire interface. Especially one which has such limited use. Between yourself and the other silicon chip vendors there must be 100s of these knocking about. What makes this one special? Or even useful? Will there ever be more than a single source file in this directory?
Quoted 8 lines
Don't get me wrong, I'm all for upstreaming code, but to create a new subsystem and bus for this kind of device seems very over the top.
Since PECI's main purpose in life is Thermal Management, perhaps the whole thing should live in
drivers/thermalordrivers/hwmon. I've also seen you reference this as a kind of BMC too, so maybedrivers/platform/x86would also be a nice place for it to reside.
I think, I already discussed about it with other reviewers but I have to explain it again. Yes, PECI is yet not a popular interface but plays a vital role in BMC system, so most of BMC chip vendors provide PECI interface in their BMC chipsets, and it is the reason why the PECI subsystem is added by this implementation because we should provide a generic bus system for those BMC chipsets from multiple vendors so that they can add their chip set specific driver to support that through the generic interface. At this moment, the folder has only PECI core and ASPEED PECI adapter drivers but other vendors' (i.e. Nuvoton) driver could be added into the folder.
As you said, PECI's main purpose is Thermal Management but it's not limited on that. As I already said in another thread and the cover letter, PECI also can provide other sideband functions such as Platform Manageability, Processor Tuning and Diagnostics and Failure Analysis.
AFAIK, only ARM core based BMC chipsets are rolled out so this PECI implementation will be running on an ARM kernel at this moment. It's not an x86 limited implementation.
Thanks,
Jae
PATCH v6 4/13 dt-bindings: Add a document of PECI adapter driver for ASPEED AST24xx/25xx SoCs
In reply to Jae Hyun YooThis commit adds a dt-bindings document of PECI adapter driver for ASPEED AST24xx/25xx SoCs.
--- .../devicetree/bindings/peci/peci-aspeed.txt | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/peci/peci-aspeed.txt
Documentation/devicetree/bindings/peci/peci-aspeed.txt new file +57 -0
@@ -0,0 +1,57 @@ +Device tree configuration for PECI buses on the AST24XX and AST25XX SoCs. + +Required properties: +- compatible : Should be "aspeed,ast2400-peci" or "aspeed,ast2500-peci" + - aspeed,ast2400-peci: ASPEED AST2400 family PECI + controller + - aspeed,ast2500-peci: ASPEED AST2500 family PECI + controller +- reg : Should contain PECI controller registers location and + length. +- #address-cells : Should be <1> required to define a client address. +- #size-cells : Should be <0> required to define a client address. +- interrupts : Should contain PECI controller interrupt. +- clocks : Should contain clock source for PECI controller. Should + reference the external oscillator clock in the second + cell. +- resets : Should contain phandle to reset controller with the reset + number in the second cell. +- clock-frequency : Should contain the operation frequency of PECI controller + in units of Hz. + 187500 ~ 24000000 + +Optional properties: +- msg-timing : Message timing negotiation period. This value will + determine the period of message timing negotiation to be + issued by PECI controller. The unit of the programmed + value is four times of PECI clock period. + 0 ~ 255 (default: 1) +- addr-timing : Address timing negotiation period. This value will + determine the period of address timing negotiation to be + issued by PECI controller. The unit of the programmed + value is four times of PECI clock period. + 0 ~ 255 (default: 1) +- rd-sampling-point : Read sampling point selection. The whole period of a bit + time will be divided into 16 time frames. This value will + determine the time frame in which the controller will + sample PECI signal for data read back. Usually in the + middle of a bit time is the best. + 0 ~ 15 (default: 8) +- cmd-timeout-ms : Command timeout in units of ms. + 1 ~ 60000 (default: 1000) + +Example: + peci0: peci-bus at 0 { + compatible = "aspeed,ast2500-peci"; + reg = <0x0 0x60>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <15>; + clocks = <&syscon ASPEED_CLK_GATE_REFCLK>; + resets = <&syscon ASPEED_RESET_PECI>; + clock-frequency = <24000000>; + msg-timing = <1>; + addr-timing = <1>; + rd-sampling-point = <8>; + cmd-timeout-ms = <1000>; + };
Signature · 1 line
2.17.1
Re: [PATCH linux-next v6 04/13] dt-bindings: Add a document of PECI adapter driver for ASPEED AST24xx/25xx SoCs
Quoted 25 lines · Jae Hyun Yoo
This commit adds a dt-bindings document of PECI adapter driver for ASPEED AST24xx/25xx SoCs.
Signed-off-by Jae Hyun Yoo <[email protected]>Reviewed-by Haiyue Wang <[email protected]>Reviewed-by James Feist <[email protected]>Reviewed-by Vernon Mauery <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Greg KH <[email protected]>Cc Jason M Biils <[email protected]>Cc Milton Miller II <[email protected]>Cc Pavel Machek <[email protected]>Cc Robin Murphy <[email protected]>Cc Ryan Chen <[email protected]>--- .../devicetree/bindings/peci/peci-aspeed.txt | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/peci/peci-aspeed.txtDocumentation/devicetree/bindings/peci/peci-aspeed.txt new file +0
-0
Documentation/devicetree/bindings/peci/peci-aspeed.txt line 8
Quoted 8 lines
Documentation/devicetree/bindings/peci/peci-aspeed.txt new file +8
-0@@ -0,0 +1,57 @@ +Device tree configuration for PECI buses on the AST24XX and AST25XX SoCs. + +Required properties: +- compatible : Should be "aspeed,ast2400-peci" or "aspeed,ast2500-peci" + - aspeed,ast2400-peci: ASPEED AST2400 family PECI + controller + - aspeed,ast2500-peci: ASPEED AST2500 family PECI + controller
Just this is sufficient:
Should be one of:
"aspeed,ast2400-peci" "aspeed,ast2500-peci"
With that,
Quoted 52 lines
Documentation/devicetree/bindings/peci/peci-aspeed.txt new file +49
-0+- reg : Should contain PECI controller registers location and + length. +- #address-cells : Should be <1> required to define a client address. +- #size-cells : Should be <0> required to define a client address. +- interrupts : Should contain PECI controller interrupt. +- clocks : Should contain clock source for PECI controller. Should + reference the external oscillator clock in the second + cell. +- resets : Should contain phandle to reset controller with the reset + number in the second cell. +- clock-frequency : Should contain the operation frequency of PECI controller + in units of Hz. + 187500 ~ 24000000 + +Optional properties: +- msg-timing : Message timing negotiation period. This value will + determine the period of message timing negotiation to be + issued by PECI controller. The unit of the programmed + value is four times of PECI clock period. + 0 ~ 255 (default: 1) +- addr-timing : Address timing negotiation period. This value will + determine the period of address timing negotiation to be + issued by PECI controller. The unit of the programmed + value is four times of PECI clock period. + 0 ~ 255 (default: 1) +- rd-sampling-point : Read sampling point selection. The whole period of a bit + time will be divided into 16 time frames. This value will + determine the time frame in which the controller will + sample PECI signal for data read back. Usually in the + middle of a bit time is the best. + 0 ~ 15 (default: 8) +- cmd-timeout-ms : Command timeout in units of ms. + 1 ~ 60000 (default: 1000) + +Example: + peci0: peci-bus at 0 { + compatible = "aspeed,ast2500-peci"; + reg = <0x0 0x60>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <15>; + clocks = <&syscon ASPEED_CLK_GATE_REFCLK>; + resets = <&syscon ASPEED_RESET_PECI>; + clock-frequency = <24000000>; + msg-timing = <1>; + addr-timing = <1>; + rd-sampling-point = <8>; + cmd-timeout-ms = <1000>; + };Signature · 1 line
2.17.1
Re: [PATCH linux-next v6 04/13] dt-bindings: Add a document of PECI adapter driver for ASPEED AST24xx/25xx SoCs
Hi Rob,
Thanks a lot for the review. Please check my inline answer.
Quoted 37 lines · Rob Herring
Quoted 25 lines · Jae Hyun Yoo
This commit adds a dt-bindings document of PECI adapter driver for ASPEED AST24xx/25xx SoCs.
Signed-off-by Jae Hyun Yoo <[email protected]>Reviewed-by Haiyue Wang <[email protected]>Reviewed-by James Feist <[email protected]>Reviewed-by Vernon Mauery <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Greg KH <[email protected]>Cc Jason M Biils <[email protected]>Cc Milton Miller II <[email protected]>Cc Pavel Machek <[email protected]>Cc Robin Murphy <[email protected]>Cc Ryan Chen <[email protected]>--- .../devicetree/bindings/peci/peci-aspeed.txt | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+)create mode 100644
Documentation/devicetree/bindings/peci/peci-aspeed.txtDocumentation/devicetree/bindings/peci/peci-aspeed.txt new file +0
-0Documentation/devicetree/bindings/peci/peci-aspeed.txt line 8
Quoted 8 lines
Documentation/devicetree/bindings/peci/peci-aspeed.txt new file +8
-0@@ -0,0 +1,57 @@ +Device tree configuration for PECI buses on the AST24XX and AST25XX SoCs. + +Required properties: +- compatible : Should be "aspeed,ast2400-peci" or "aspeed,ast2500-peci" + - aspeed,ast2400-peci: ASPEED AST2400 family PECI + controller + - aspeed,ast2500-peci: ASPEED AST2500 family PECI + controllerJust this is sufficient:
Quoted 8 lines
Should be one of:
"aspeed,ast2400-peci" "aspeed,ast2500-peci"With that,
Reviewed-by Rob Herring <[email protected]>
Thanks! I'll change it as you commented out.
Jae
Quoted 52 lines
Quoted 52 lines
Documentation/devicetree/bindings/peci/peci-aspeed.txt new file +49
-0+- reg : Should contain PECI controller registers location and + length. +- #address-cells : Should be <1> required to define a client address. +- #size-cells : Should be <0> required to define a client address. +- interrupts : Should contain PECI controller interrupt. +- clocks : Should contain clock source for PECI controller. Should + reference the external oscillator clock in the second + cell. +- resets : Should contain phandle to reset controller with the reset + number in the second cell. +- clock-frequency : Should contain the operation frequency of PECI controller + in units of Hz. + 187500 ~ 24000000 + +Optional properties: +- msg-timing : Message timing negotiation period. This value will + determine the period of message timing negotiation to be + issued by PECI controller. The unit of the programmed + value is four times of PECI clock period. + 0 ~ 255 (default: 1) +- addr-timing : Address timing negotiation period. This value will + determine the period of address timing negotiation to be + issued by PECI controller. The unit of the programmed + value is four times of PECI clock period. + 0 ~ 255 (default: 1) +- rd-sampling-point : Read sampling point selection. The whole period of a bit + time will be divided into 16 time frames. This value will + determine the time frame in which the controller will + sample PECI signal for data read back. Usually in the + middle of a bit time is the best. + 0 ~ 15 (default: 8) +- cmd-timeout-ms : Command timeout in units of ms. + 1 ~ 60000 (default: 1000) + +Example: + peci0: peci-bus at 0 { + compatible = "aspeed,ast2500-peci"; + reg = <0x0 0x60>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <15>; + clocks = <&syscon ASPEED_CLK_GATE_REFCLK>; + resets = <&syscon ASPEED_RESET_PECI>; + clock-frequency = <24000000>; + msg-timing = <1>; + addr-timing = <1>; + rd-sampling-point = <8>; + cmd-timeout-ms = <1000>; + };Signature · 1 line
2.17.1
PATCH v6 5/13 ARM: dts: aspeed: peci: Add PECI node
In reply to Jae Hyun YooThis commit adds PECI bus/adapter node of AST24xx/AST25xx into aspeed-g4 and aspeed-g5.
--- arch/arm/boot/dts/aspeed-g4.dtsi | 26 ++++++++++++++++++++++++++ arch/arm/boot/dts/aspeed-g5.dtsi | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+)
arch/arm/boot/dts/aspeed-g4.dtsi +26 -0
@@ -29,6 +29,7 @@ serial3 = &uart4; serial4 = &uart5; serial5 = &vuart; + peci0 = &peci0; }; cpus {
@@ -295,6 +296,13 @@ }; }; + peci: peci at 1e78b000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x1e78b000 0x60>; + }; + uart2: serial at 1e78d000 { compatible = "ns16550a"; reg = <0x1e78d000 0x20>;
@@ -338,6 +346,24 @@ }; }; +&peci { + peci0: peci-bus at 0 { + compatible = "aspeed,ast2400-peci"; + reg = <0x0 0x60>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <15>; + clocks = <&syscon ASPEED_CLK_GATE_REFCLK>; + resets = <&syscon ASPEED_RESET_PECI>; + clock-frequency = <24000000>; + msg-timing = <1>; + addr-timing = <1>; + rd-sampling-point = <8>; + cmd-timeout-ms = <1000>; + status = "disabled"; + }; +}; + &i2c { i2c_ic: interrupt-controller at 0 { #interrupt-cells = <1>;
arch/arm/boot/dts/aspeed-g5.dtsi +26 -0
@@ -29,6 +29,7 @@ serial3 = &uart4; serial4 = &uart5; serial5 = &vuart; + peci0 = &peci0; }; cpus {
@@ -352,6 +353,13 @@ }; }; + peci: peci at 1e78b000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x1e78b000 0x60>; + }; + uart2: serial at 1e78d000 { compatible = "ns16550a"; reg = <0x1e78d000 0x20>;
@@ -395,6 +403,24 @@ }; }; +&peci { + peci0: peci-bus at 0 { + compatible = "aspeed,ast2500-peci"; + reg = <0x0 0x60>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <15>; + clocks = <&syscon ASPEED_CLK_GATE_REFCLK>; + resets = <&syscon ASPEED_RESET_PECI>; + clock-frequency = <24000000>; + msg-timing = <1>; + addr-timing = <1>; + rd-sampling-point = <8>; + cmd-timeout-ms = <1000>; + status = "disabled"; + }; +}; + &i2c { i2c_ic: interrupt-controller at 0 { #interrupt-cells = <1>;
Signature · 1 line
2.17.1
PATCH v6 6/13 peci: Add a PECI adapter driver for Aspeed AST24xx/AST25xx
In reply to Jae Hyun YooThis commit adds PECI adapter driver implementation for Aspeed AST24xx/AST25xx SoCs.
--- drivers/peci/Kconfig | 27 ++ drivers/peci/Makefile | 3 + drivers/peci/peci-aspeed.c | 498 +++++++++++++++++++++++++++++++++++++ 3 files changed, 528 insertions(+) create mode 100644 drivers/peci/peci-aspeed.c
drivers/peci/Kconfig +27 -0
@@ -10,3 +10,30 @@ config PECI The Platform Environment Control Interface (PECI) is a one-wire bus interface that provides a communication channel from Intel processors and chipset components to external monitoring or control devices. + + If you want PECI support, you should say Y here and also to the + specific driver for your bus adapter(s) below. + +if PECI + +# +# PECI hardware bus configuration +# + +menu "PECI Hardware Bus support" + +config PECI_ASPEED + tristate "ASPEED PECI support" + select REGMAP_MMIO + depends on OF + depends on ARCH_ASPEED || COMPILE_TEST + help + Say Y here if you want support for the Platform Environment Control + Interface (PECI) bus adapter driver on the ASPEED SoCs. + + This support is also available as a module. If so, the module + will be called peci-aspeed. + +endmenu + +endif # PECI
drivers/peci/Makefile +3 -0
@@ -4,3 +4,6 @@ # Core functionality obj-$(CONFIG_PECI) += peci-core.o + +# Hardware specific bus drivers +obj-$(CONFIG_PECI_ASPEED) += peci-aspeed.o
drivers/peci/peci-aspeed.c new file +498 -0
498 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v6 7/13 dt-bindings: mfd: Add a document for PECI client MFD
In reply to Jae Hyun YooThis commit adds a dt-bindings document for PECI client MFD.
--- .../bindings/mfd/intel-peci-client.txt | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/intel-peci-client.txt
Documentation/devicetree/bindings/mfd/intel-peci-client.txt new file +34 -0
@@ -0,0 +1,34 @@ +* Intel PECI client bindings + +PECI (Platform Environment Control Interface) is a one-wire bus interface that +provides a communication channel from PECI clients in Intel processors and +chipset components to external monitoring or control devices. PECI is designed +to support the following sideband functions: + +- Processor and DRAM thermal management +- Platform Manageability +- Processor Interface Tuning and Diagnostics +- Failure Analysis + +Required properties: +- compatible : Should be "intel,peci-client". +- reg : Should contain address of a client CPU. Address range of CPU + clients starts from 0x30 based on PECI specification. + +Example: + peci-bus@0 { + compatible = "vendor,soc-peci"; + reg = <0x0 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + peci-client@30 { + compatible = "intel,peci-client"; + reg = <0x30>; + }; + + peci-client@31 { + compatible = "intel,peci-client"; + reg = <0x31>; + }; + };
Signature · 1 line
2.17.1
Rob Herring
maintainerRe: [PATCH linux-next v6 07/13] dt-bindings: mfd: Add a document for PECI client MFD
Quoted 1 line · Jae Hyun Yoo
This commit adds a dt-bindings document for PECI client MFD.
This and the next patch still have the same issues I've outlined in at least 2 prior versions.
Quoted 54 lines
Signed-off-by Jae Hyun Yoo <[email protected]>Cc Andrew Jeffery <[email protected]>Cc James Feist <[email protected]>Cc Jason M Biils <[email protected]>Cc Joel Stanley <[email protected]>Cc Vernon Mauery <[email protected]>--- .../bindings/mfd/intel-peci-client.txt | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/intel-peci-client.txtDocumentation/devicetree/bindings/mfd/intel-peci-client.txt new file +34
-0@@ -0,0 +1,34 @@ +* Intel PECI client bindings + +PECI (Platform Environment Control Interface) is a one-wire bus interface that +provides a communication channel from PECI clients in Intel processors and +chipset components to external monitoring or control devices. PECI is designed +to support the following sideband functions: + +- Processor and DRAM thermal management +- Platform Manageability +- Processor Interface Tuning and Diagnostics +- Failure Analysis + +Required properties: +- compatible : Should be "intel,peci-client". +- reg : Should contain address of a client CPU. Address range of CPU + clients starts from 0x30 based on PECI specification. + +Example: + peci-bus@0 { + compatible = "vendor,soc-peci"; + reg = <0x0 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + peci-client@30 { + compatible = "intel,peci-client"; + reg = <0x30>; + }; + + peci-client@31 { + compatible = "intel,peci-client"; + reg = <0x31>; + }; + };Signature · 1 line
2.17.1
Re: [PATCH linux-next v6 07/13] dt-bindings: mfd: Add a document for PECI client MFD
Hi Rob,
Thanks for the review. Please see my inline answer.
Quoted 6 lines · Rob Herring
Quoted 1 line · Jae Hyun Yoo
This commit adds a dt-bindings document for PECI client MFD.
This and the next patch still have the same issues I've outlined in at least 2 prior versions.
Okay. I think the next patch (9/13) for hwmon dt-bindings document is not needed anymore because those were already added in MFD driver implementation in the patch 8/13. Please correct me if it's not you pointed.
Quoted 55 lines
Quoted 54 lines
Signed-off-by Jae Hyun Yoo <[email protected]>Cc Andrew Jeffery <[email protected]>Cc James Feist <[email protected]>Cc Jason M Biils <[email protected]>Cc Joel Stanley <[email protected]>Cc Vernon Mauery <[email protected]>--- .../bindings/mfd/intel-peci-client.txt | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+)create mode 100644
Documentation/devicetree/bindings/mfd/intel-peci-client.txtDocumentation/devicetree/bindings/mfd/intel-peci-client.txt new file +34
-0@@ -0,0 +1,34 @@ +* Intel PECI client bindings + +PECI (Platform Environment Control Interface) is a one-wire bus interface that +provides a communication channel from PECI clients in Intel processors and +chipset components to external monitoring or control devices. PECI is designed +to support the following sideband functions: + +- Processor and DRAM thermal management +- Platform Manageability +- Processor Interface Tuning and Diagnostics +- Failure Analysis + +Required properties: +- compatible : Should be "intel,peci-client". +- reg : Should contain address of a client CPU. Address range of CPU + clients starts from 0x30 based on PECI specification. + +Example: + peci-bus@0 { + compatible = "vendor,soc-peci"; + reg = <0x0 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + peci-client@30 { + compatible = "intel,peci-client"; + reg = <0x30>; + }; + + peci-client@31 { + compatible = "intel,peci-client"; + reg = <0x31>; + }; + };Signature · 1 line
2.17.1
PATCH v6 8/13 mfd: intel-peci-client: Add PECI client MFD driver
In reply to Jae Hyun YooThis commit adds PECI client MFD driver.
--- drivers/mfd/Kconfig | 14 ++ drivers/mfd/Makefile | 1 + drivers/mfd/intel-peci-client.c | 182 ++++++++++++++++++++++++++ include/linux/mfd/intel-peci-client.h | 81 ++++++++++++ 4 files changed, 278 insertions(+) create mode 100644 drivers/mfd/intel-peci-client.c create mode 100644 include/linux/mfd/intel-peci-client.h
drivers/mfd/Kconfig +14 -0
@@ -565,6 +565,20 @@ config MFD_INTEL_MSIC Passage) chip. This chip embeds audio, battery, GPIO, etc. devices used in Intel Medfield platforms. +config MFD_INTEL_PECI_CLIENT + bool "Intel PECI client" + depends on (PECI || COMPILE_TEST) + select MFD_CORE + help + If you say yes to this option, support will be included for the + multi-funtional Intel PECI (Platform Environment Control Interface) + client. PECI is a one-wire bus interface that provides a communication + channel from PECI clients in Intel processors and chipset components + to external monitoring or control devices. + + Additional drivers must be enabled in order to use the functionality + of the device. + config MFD_IPAQ_MICRO bool "Atmel Micro ASIC (iPAQ h3100/h3600/h3700) Support" depends on SA1100_H3100 || SA1100_H3600
drivers/mfd/Makefile +1 -0
@@ -191,6 +191,7 @@ obj-$(CONFIG_MFD_INTEL_LPSS) += intel-lpss.o obj-$(CONFIG_MFD_INTEL_LPSS_PCI) += intel-lpss-pci.o obj-$(CONFIG_MFD_INTEL_LPSS_ACPI) += intel-lpss-acpi.o obj-$(CONFIG_MFD_INTEL_MSIC) += intel_msic.o +obj-$(CONFIG_MFD_INTEL_PECI_CLIENT) += intel-peci-client.o obj-$(CONFIG_MFD_PALMAS) += palmas.o obj-$(CONFIG_MFD_VIPERBOARD) += viperboard.o obj-$(CONFIG_MFD_RC5T583) += rc5t583.o rc5t583-irq.o
drivers/mfd/intel-peci-client.c new file +182 -0
182 lines not on this page · raw message
include/linux/mfd/intel-peci-client.h new file +81 -0
81 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v6 9/13 dt-bindings: hwmon: Add documents for PECI hwmon client drivers
In reply to Jae Hyun YooThis commit adds dt-bindings documents for PECI hwmon client drivers.
--- .../devicetree/bindings/hwmon/peci-cputemp.txt | 11 +++++++++++ .../devicetree/bindings/hwmon/peci-dimmtemp.txt | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/peci-cputemp.txt create mode 100644 Documentation/devicetree/bindings/hwmon/peci-dimmtemp.txt
Documentation/devicetree/bindings/hwmon/peci-cputemp.txt new file +11 -0
@@ -0,0 +1,11 @@ +Bindings for Intel PECI (Platform Environment Control Interface) cputemp driver. + +Required properties: +- compatible : Should be "intel,peci-cputemp". + +This node is a subnode of the PECI client MFD. + +Example: + peci-cputemp { + compatible = "intel,peci-cputemp"; + };
Documentation/devicetree/bindings/hwmon/peci-dimmtemp.txt new file +12 -0
@@ -0,0 +1,12 @@ +Bindings for Intel PECI (Platform Environment Control Interface) dimmtemp +driver. + +Required properties: +- compatible : Should be "intel,peci-dimmtemp". + +This node is a subnode of the PECI client MFD. + +Example: + peci-dimmtemp@30 { + compatible = "intel,peci-dimmtemp"; + };
Signature · 1 line
2.17.1
PATCH v6 10/13 Documentation: hwmon: Add documents for PECI hwmon client drivers
In reply to Jae Hyun YooThis commit adds hwmon documents for PECI cputemp and dimmtemp drivers.
--- Documentation/hwmon/peci-cputemp | 78 +++++++++++++++++++++++++++++++ Documentation/hwmon/peci-dimmtemp | 50 ++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 Documentation/hwmon/peci-cputemp create mode 100644 Documentation/hwmon/peci-dimmtemp
Documentation/hwmon/peci-cputemp new file +78 -0
@@ -0,0 +1,78 @@ +Kernel driver peci-cputemp +========================== + +Supported chips: + One of Intel server CPUs listed below which is connected to a PECI bus. + * Intel Xeon E5/E7 v3 server processors + Intel Xeon E5-14xx v3 family + Intel Xeon E5-24xx v3 family + Intel Xeon E5-16xx v3 family + Intel Xeon E5-26xx v3 family + Intel Xeon E5-46xx v3 family + Intel Xeon E7-48xx v3 family + Intel Xeon E7-88xx v3 family + * Intel Xeon E5/E7 v4 server processors + Intel Xeon E5-16xx v4 family + Intel Xeon E5-26xx v4 family + Intel Xeon E5-46xx v4 family + Intel Xeon E7-48xx v4 family + Intel Xeon E7-88xx v4 family + * Intel Xeon Scalable server processors + Intel Xeon Bronze family + Intel Xeon Silver family + Intel Xeon Gold family + Intel Xeon Platinum family + Addresses scanned: PECI client address 0x30 - 0x37 + Datasheet: Available from http://www.intel.com/design/literature.htm + +Author: + Jae Hyun Yoo <[email protected]> + +Description +----------- + +This driver implements a generic PECI hwmon feature which provides Digital +Thermal Sensor (DTS) thermal readings of the CPU package and CPU cores that are +accessible using the PECI Client Command Suite via the processor PECI client. + +All temperature values are given in millidegree Celsius and will be measurable +only when the target CPU is powered on. + +sysfs attributes +---------------- + +temp1_label "Die" +temp1_input Provides current die temperature of the CPU package. +temp1_max Provides thermal control temperature of the CPU package + which is also known as Tcontrol. +temp1_crit Provides shutdown temperature of the CPU package which + is also known as the maximum processor junction + temperature, Tjmax or Tprochot. +temp1_crit_hyst Provides the hysteresis value from Tcontrol to Tjmax of + the CPU package. + +temp2_label "Tcontrol" +temp2_input Provides current Tcontrol temperature of the CPU + package which is also known as Fan Temperature target. + Indicates the relative value from thermal monitor trip + temperature at which fans should be engaged. +temp2_crit Provides Tcontrol critical value of the CPU package + which is same to Tjmax. + +temp3_label "Tthrottle" +temp3_input Provides current Tthrottle temperature of the CPU + package. Used for throttling temperature. If this value + is allowed and lower than Tjmax - the throttle will + occur and reported at lower than Tjmax. + +temp4_label "Tjmax" +temp4_input Provides the maximum junction temperature, Tjmax of the + CPU package. + +temp[5-*]_label Provides string "Core X", where X is resolved core + number. +temp[5-*]_input Provides current temperature of each core. +temp[5-*]_max Provides thermal control temperature of the core. +temp[5-*]_crit Provides shutdown temperature of the core. +temp[5-*]_crit_hyst Provides the hysteresis value from Tcontrol to Tjmax of + the core.
Documentation/hwmon/peci-dimmtemp new file +50 -0
50 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v6 11/13 hwmon: Add PECI cputemp driver
In reply to Jae Hyun YooThis commit adds PECI cputemp hwmon driver.
--- drivers/hwmon/Kconfig | 14 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/peci-cputemp.c | 401 +++++++++++++++++++++++++++++++++++ 3 files changed, 416 insertions(+) create mode 100644 drivers/hwmon/peci-cputemp.c
drivers/hwmon/Kconfig +14 -0
@@ -1256,6 +1256,20 @@ config SENSORS_NCT7904 This driver can also be built as a module. If so, the module will be called nct7904. +config SENSORS_PECI_CPUTEMP + tristate "PECI CPU temperature monitoring support" + depends on PECI + select MFD_INTEL_PECI_CLIENT + help + If you say yes here you get support for the generic Intel PECI + cputemp driver which provides Digital Thermal Sensor (DTS) thermal + readings of the CPU package and CPU cores that are accessible using + the PECI Client Command Suite via the processor PECI client. + Check Documentation/hwmon/peci-cputemp for details. + + This driver can also be built as a module. If so, the module + will be called peci-cputemp. + config SENSORS_NSA320 tristate "ZyXEL NSA320 and compatible fan speed and temperature sensors" depends on GPIOLIB && OF
drivers/hwmon/Makefile +1 -0
@@ -136,6 +136,7 @@ obj-$(CONFIG_SENSORS_NCT7802) += nct7802.o obj-$(CONFIG_SENSORS_NCT7904) += nct7904.o obj-$(CONFIG_SENSORS_NSA320) += nsa320-hwmon.o obj-$(CONFIG_SENSORS_NTC_THERMISTOR) += ntc_thermistor.o +obj-$(CONFIG_SENSORS_PECI_CPUTEMP) += peci-cputemp.o obj-$(CONFIG_SENSORS_PC87360) += pc87360.o obj-$(CONFIG_SENSORS_PC87427) += pc87427.o obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o
drivers/hwmon/peci-cputemp.c new file +401 -0
401 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v6 12/13 hwmon: Add PECI dimmtemp driver
In reply to Jae Hyun YooThis commit adds PECI dimmtemp hwmon driver.
--- drivers/hwmon/Kconfig | 14 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/peci-dimmtemp.c | 295 ++++++++++++++++++++++++++++++++++ 3 files changed, 310 insertions(+) create mode 100644 drivers/hwmon/peci-dimmtemp.c
drivers/hwmon/Kconfig +14 -0
@@ -1270,6 +1270,20 @@ config SENSORS_PECI_CPUTEMP This driver can also be built as a module. If so, the module will be called peci-cputemp. +config SENSORS_PECI_DIMMTEMP + tristate "PECI DIMM temperature monitoring support" + depends on PECI + select MFD_INTEL_PECI_CLIENT + help + If you say yes here you get support for the generic Intel PECI hwmon + driver which provides Digital Thermal Sensor (DTS) thermal readings of + DIMM components that are accessible using the PECI Client Command + Suite via the processor PECI client. + Check Documentation/hwmon/peci-dimmtemp for details. + + This driver can also be built as a module. If so, the module + will be called peci-dimmtemp. + config SENSORS_NSA320 tristate "ZyXEL NSA320 and compatible fan speed and temperature sensors" depends on GPIOLIB && OF
drivers/hwmon/Makefile +1 -0
@@ -137,6 +137,7 @@ obj-$(CONFIG_SENSORS_NCT7904) += nct7904.o obj-$(CONFIG_SENSORS_NSA320) += nsa320-hwmon.o obj-$(CONFIG_SENSORS_NTC_THERMISTOR) += ntc_thermistor.o obj-$(CONFIG_SENSORS_PECI_CPUTEMP) += peci-cputemp.o +obj-$(CONFIG_SENSORS_PECI_DIMMTEMP) += peci-dimmtemp.o obj-$(CONFIG_SENSORS_PC87360) += pc87360.o obj-$(CONFIG_SENSORS_PC87427) += pc87427.o obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o
drivers/hwmon/peci-dimmtemp.c new file +295 -0
295 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v6 13/13 Add maintainers for the PECI subsystem
In reply to Jae Hyun YooThis commit adds maintainer information for the PECI subsystem.
--- MAINTAINERS | 12 ++++++++++++ 1 file changed, 12 insertions(+)
MAINTAINERS +12 -0
@@ -11137,6 +11137,18 @@ L: [email protected] S: Maintained F: drivers/platform/x86/peaq-wmi.c +PECI SUBSYSTEM +M: Jae Hyun Yoo <[email protected]> +M: Jason M Biils <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/peci/ +F: drivers/mfd/intel-peci-client.c +F: drivers/peci/ +F: drivers/hwmon/peci-*.c +F: include/linux/mfd/intel-peci-client.h +F: include/linux/peci.h +F: include/uapi/linux/peci-ioctl.h + PER-CPU MEMORY ALLOCATOR M: Tejun Heo <[email protected]> M: Christoph Lameter <[email protected]>
Signature · 1 line
2.17.1