Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: peci: Add Platform Environment Control Interface API #22575

Merged
merged 9 commits into from
Mar 13, 2020

Conversation

albertofloyd
Copy link
Collaborator

@albertofloyd albertofloyd commented Feb 7, 2020

Platform Environment Control Interface, abbreviated as PECI, is a thermal management standard introduced in 2006, while the spec allows to retrieve temperature it also allows to retrieve additional information and/or update other properties involved in thermal management.

API: peci: Add Platform Environment Control Interface API

Add Platform Environment Control Interface API
This API defines following calls:

- peci_configure
- peci_enable
- peci_disable
- peci_transfer

@zephyrbot
Copy link
Collaborator

zephyrbot commented Feb 7, 2020

All checks are passing now.

Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages.

include/drivers/peci.h Outdated Show resolved Hide resolved
drivers/peci/Kconfig Outdated Show resolved Hide resolved
dts/arm/microchip/mec1501hsz.dtsi Outdated Show resolved Hide resolved
dts/bindings/peci/microchip,xec-peci.yaml Outdated Show resolved Hide resolved
doc/reference/peripherals/peci.rst Outdated Show resolved Hide resolved
drivers/peci/peci_mchp_xec.c Outdated Show resolved Hide resolved
drivers/peci/peci_mchp_xec.c Outdated Show resolved Hide resolved
drivers/peci/peci_mchp_xec.c Outdated Show resolved Hide resolved
drivers/peci/peci_mchp_xec.c Outdated Show resolved Hide resolved
samples/drivers/peci/src/main.c Outdated Show resolved Hide resolved
Copy link
Contributor

@andrewboie andrewboie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See notes about system calls. Have a look at other driver _handlers.c files for examples. Please contact me if you're unsure what needs to be done.

drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
include/drivers/peci.h Outdated Show resolved Hide resolved
@albertofloyd
Copy link
Collaborator Author

@andrewboie peci_handlers.c updated based on can_handlers.c as requested

Copy link
Contributor

@andrewboie andrewboie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this build? didn't see a change to gen_kobject_list.py to add the peci API type.

drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
@albertofloyd
Copy link
Collaborator Author

does this build? didn't see a change to gen_kobject_list.py to add the peci API type.
Yes, a sample peci app does build correctly when enabling CONFIG_USERSPACE with a dummy driver for frdm_k64f.

drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
include/drivers/peci.h Outdated Show resolved Hide resolved
drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
include/drivers/peci.h Outdated Show resolved Hide resolved
drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
drivers/peci/peci_handlers.c Outdated Show resolved Hide resolved
include/drivers/peci.h Outdated Show resolved Hide resolved
@albertofloyd albertofloyd force-pushed the peci branch 2 times, most recently from 0209f1c to 06871aa Compare March 12, 2020 23:23
Add Platform Environment Control Interface API
This API defines following calls:

- peci_configure
- peci_enable
- peci_disable
- peci_transaction

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Add PECI API documentation

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Define PECI_XEC feature.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Add the Kconfig for generic PECI drivers.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Add generic device tree bindings for PECI devices

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Add device for PECI driver for MEC family

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Copy link
Contributor

@andrewboie andrewboie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK leave handlers out for now, but please file a GH enhancement for them.

boards/arm/mec1501modular_assy6885/pinmux.c Outdated Show resolved Hide resolved
samples/drivers/peci/src/main.c Outdated Show resolved Hide resolved
drivers/peci/peci_mchp_xec.c Outdated Show resolved Hide resolved
drivers/peci/peci_mchp_xec.c Outdated Show resolved Hide resolved
drivers/peci/CMakeLists.txt Outdated Show resolved Hide resolved
Add PECI driver that support PECI API.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Sample code that showcase PECI API get device CPU information
then monitors temperature.
Verified in Modular MEC1501 connected to computer (PECI host).

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Enable PECI block for MEC15 boards.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
@albertofloyd
Copy link
Collaborator Author

OK leave handlers out for now, but please file a GH enhancement for them.

#23432

@andrewboie andrewboie merged commit 8462a37 into zephyrproject-rtos:master Mar 13, 2020
@albertofloyd albertofloyd deleted the peci branch April 8, 2020 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants