Rizwan Qureshi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31444
Change subject: soc/intel/cannonlake: Add ASL function for setting pad mode ......................................................................
soc/intel/cannonlake: Add ASL function for setting pad mode
Add a funtion in gpio ASL library to set pad mode.
BUG=b:123350329
Change-Id: I6c683f27ddffc3132001706d1694c71bb5664577 Signed-off-by: Rizwan Qureshi rizwan.qureshi@intel.com --- M src/soc/intel/cannonlake/acpi/gpio_op.asl 1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/31444/1
diff --git a/src/soc/intel/cannonlake/acpi/gpio_op.asl b/src/soc/intel/cannonlake/acpi/gpio_op.asl index 0618601..b051685 100644 --- a/src/soc/intel/cannonlake/acpi/gpio_op.asl +++ b/src/soc/intel/cannonlake/acpi/gpio_op.asl @@ -72,3 +72,24 @@ } And (Not (GPIOTXSTATE_MASK), VAL0, VAL0) } + +/* + * Set Pad mode + * Arg0 - GPIO Number + * Arg1 - Pad mode + * 0 = GPIO control pad + * 1 = Native Funtion 1 + * 2 = Native Funtion 2 + * 3 = Native Funtion 3 + */ +Method (GPMO, 2, Serialized) +{ + OperationRegion (PREG, SystemMemory, GADD (Arg0), 4) + Field (PREG, AnyAcc, NoLock, Preserve) + { + TMP1, 10, + PADM, 2, + TMP2, 20, + } + Store(Arg1, PADM) +}