Project

General

Profile

Actions

Feature #319

open

denverton_ns: Add ASL to support Linux pinctrl driver (GPIO controller)

Added by King Sumo over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
09/02/2021
Due date:
% Done:

0%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:

Description

ASL code to support the Linux pinctrl driver is missing for denverton_ns platform, the below patch adds the very basic functionality in order to Linux driver find the GPIO controller via INTC3000 APCI id:
https://review.coreboot.org/c/coreboot/+/56975

soc/intel/denverton_ns: Add GPIO controller ASL

Add support for the pinctrl denverton Linux driver which provides an interface
that allows configuring of Intel Denverton SoC pins and using them as GPIOs.

Test using the sysfs interface:

  • Load the pinctrl-denverton module, sysfs interface available in the /sys/kernel/debug/pinctrl/INTC3000:00 folder.
  • Export the GPIO (here we are using GPIO_10): ~> cd /sys/kernel/debug/pinctrl/INTC3000:00/ ~> grep GPIO_10 pinconf-pins pin 139 (GPIO_10): input bias disabled ~> cat gpio-ranges GPIO ranges handled: 0: INTC3000:00 GPIOS [358 - 511] PINS [0 - 153] ~> echo $((358+139)) > /sys/class/gpio/export
  • Above GPIO's are starting at 358 with GPIO_10 at 139 offset, the sysfs folder for controlling the pin will be /sys/class/gpio/gpio497 (358+139).
  • Input mode: ~> cd /sys/class/gpio/gpio497 ~> echo in > direction ~> cat value 0 ~> cat value 1
  • Output mode: ~> cd /sys/class/gpio/gpio497 ~> echo out > direction ~> echo 1 > value ~> echo 0 > value

No data to display

Actions

Also available in: Atom PDF