EricR Lai has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47639 )
Change subject: drivers/i2c/sx9310: Refactor register struct ......................................................................
drivers/i2c/sx9310: Refactor register struct
WIP
Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com Change-Id: I7d10f747e617e69a7697882c373ffdea2b43b691 --- M src/drivers/i2c/sx9310/chip.h M src/drivers/i2c/sx9310/sx9310.c M src/mainboard/google/hatch/variants/hatch/overridetree.cb M src/mainboard/google/hatch/variants/mushu/overridetree.cb M src/mainboard/google/octopus/variants/bobba/overridetree.cb M src/mainboard/google/poppy/variants/nocturne/devicetree.cb M src/mainboard/google/volteer/variants/halvor/overridetree.cb M src/mainboard/google/volteer/variants/malefor/overridetree.cb M src/mainboard/google/volteer/variants/terrador/overridetree.cb M src/mainboard/google/volteer/variants/todor/overridetree.cb M src/mainboard/google/volteer/variants/trondo/overridetree.cb M src/mainboard/google/volteer/variants/volteer/overridetree.cb M src/mainboard/google/volteer/variants/volteer2/overridetree.cb M src/mainboard/google/volteer/variants/voxel/overridetree.cb 14 files changed, 650 insertions(+), 326 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/47639/1
diff --git a/src/drivers/i2c/sx9310/chip.h b/src/drivers/i2c/sx9310/chip.h index 96690e3..1ba0716 100644 --- a/src/drivers/i2c/sx9310/chip.h +++ b/src/drivers/i2c/sx9310/chip.h @@ -6,9 +6,13 @@ #include <acpi/acpi_device.h> #include <device/i2c_simple.h>
-#define REGISTER(NAME) uint8_t NAME +#define MAX_REG 47 +#define REG_LEN 40
struct drivers_i2c_sx9310_config { + /* ACPI _HID (required) */ + const char *hid; + /* Device Description */ const char *desc;
@@ -23,9 +27,10 @@
/* IO-APIC interrupt */ struct acpi_irq irq; -#include "registers.h" + + struct { + const char *reg_name; + uint8_t value; + } regs[MAX_REG]; }; - -#undef REGISTER - #endif /* __DRIVERS_I2C_SX9310_CHIP_H__ */ diff --git a/src/drivers/i2c/sx9310/sx9310.c b/src/drivers/i2c/sx9310/sx9310.c index 8dc57a2..6542a96 100644 --- a/src/drivers/i2c/sx9310/sx9310.c +++ b/src/drivers/i2c/sx9310/sx9310.c @@ -9,12 +9,10 @@ #include <string.h> #include "chip.h"
-#define I2C_SX9310_ACPI_ID "STH9310" #define I2C_SX9310_ACPI_NAME "Semtech SX9310"
-#define REGISTER(NAME) acpi_dp_add_integer(dsd, \ - I2C_SX9310_ACPI_ID "," #NAME, \ - config->NAME) +#define REGISTER(name, val) \ + acpi_dp_add_integer(dsd, (name), (val))
static void i2c_sx9310_fill_ssdt(const struct device *dev) { @@ -27,6 +25,8 @@ .resource = scope, }; struct acpi_dp *dsd; + int index; + char name[REG_LEN];
if (!scope || !config) return; @@ -37,7 +37,7 @@ /* Device */ acpigen_write_scope(scope); acpigen_write_device(acpi_device_name(dev)); - acpigen_write_name_string("_HID", I2C_SX9310_ACPI_ID); + acpigen_write_name_string("_HID", config->hid); acpigen_write_name_integer("_UID", config->uid); acpigen_write_name_string("_DDN", config->desc); acpigen_write_STA(acpi_device_status(dev)); @@ -56,7 +56,14 @@
/* DSD */ dsd = acpi_dp_new_table("_DSD"); -#include "registers.h" + for (index = 0; index < MAX_REG; index++) { + if (config->regs[index].reg_name != NULL) { + snprintf(name, sizeof(name), "%s,%s", config->hid, + config->regs[0].reg_name); + REGISTER(name, config->regs[index].value); + } else + break; + } acpi_dp_write(dsd);
acpigen_pop_len(); /* Device */ diff --git a/src/mainboard/google/hatch/variants/hatch/overridetree.cb b/src/mainboard/google/hatch/variants/hatch/overridetree.cb index e13270f..630a7ba 100644 --- a/src/mainboard/google/hatch/variants/hatch/overridetree.cb +++ b/src/mainboard/google/hatch/variants/hatch/overridetree.cb @@ -122,33 +122,57 @@ device pci 15.2 off end # I2C #2 device pci 15.3 on chip drivers/i2c/sx9310 + register "hid" = ""STH9310"" register "desc" = ""SAR Proximity Sensor"" register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_A0)" register "speed" = "I2C_SPEED_FAST" register "uid" = "1" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x1f" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x1f" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end # I2C #3 diff --git a/src/mainboard/google/hatch/variants/mushu/overridetree.cb b/src/mainboard/google/hatch/variants/mushu/overridetree.cb index 29b87e4..c1f5831 100644 --- a/src/mainboard/google/hatch/variants/mushu/overridetree.cb +++ b/src/mainboard/google/hatch/variants/mushu/overridetree.cb @@ -142,33 +142,57 @@ device pci 15.2 off end # I2C #2 device pci 15.3 on chip drivers/i2c/sx9310 + register "hid" = ""STH9310"" register "desc" = ""SAR Proximity Sensor"" register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_A0)" register "speed" = "I2C_SPEED_FAST" register "uid" = "1" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x1f" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x1f" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end # I2C #3 diff --git a/src/mainboard/google/octopus/variants/bobba/overridetree.cb b/src/mainboard/google/octopus/variants/bobba/overridetree.cb index 662e6af..f375407 100644 --- a/src/mainboard/google/octopus/variants/bobba/overridetree.cb +++ b/src/mainboard/google/octopus/variants/bobba/overridetree.cb @@ -118,32 +118,56 @@ end # - I2C 0 device pci 16.1 on chip drivers/i2c/sx9310 + register "hid" = ""STH9310"" register "desc" = ""SAR Proximity Sensor"" register "irq" = "ACPI_IRQ_LEVEL_LOW(GPIO_214_IRQ)" register "uid" = "1" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x11" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x11" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end # - I2C 1 diff --git a/src/mainboard/google/poppy/variants/nocturne/devicetree.cb b/src/mainboard/google/poppy/variants/nocturne/devicetree.cb index ab1588a..960de09 100644 --- a/src/mainboard/google/poppy/variants/nocturne/devicetree.cb +++ b/src/mainboard/google/poppy/variants/nocturne/devicetree.cb @@ -310,33 +310,57 @@ end # I2C #0 - Touchscreen device pci 15.1 on chip drivers/i2c/sx9310 + register "hid" = ""STH9310"" register "desc" = ""Right SAR Proximity Sensor"" register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D9_IRQ)" register "speed" = "I2C_SPEED_FAST" register "uid" = "0" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x1f" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x1f" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end # I2C #1 @@ -351,33 +375,57 @@ device pci 19.0 on end # UART #2 device pci 19.1 on chip drivers/i2c/sx9310 + register "hid" = ""STH9310"" register "desc" = ""Left SAR Proximity Sensor"" register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D10_IRQ)" register "speed" = "I2C_SPEED_FAST" register "uid" = "1" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x1f" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x1f" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end # I2C #5 diff --git a/src/mainboard/google/volteer/variants/halvor/overridetree.cb b/src/mainboard/google/volteer/variants/halvor/overridetree.cb index 568ca73..44baecc 100644 --- a/src/mainboard/google/volteer/variants/halvor/overridetree.cb +++ b/src/mainboard/google/volteer/variants/halvor/overridetree.cb @@ -78,33 +78,57 @@ end device ref i2c2 on chip drivers/i2c/sx9310 - register "desc" = ""SAR0 Proximity Sensor"" - register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" + register "hid" = ""STH9310"" + register "desc" = ""SAR Proximity Sensor"" + register "irq_gpio" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" register "speed" = "I2C_SPEED_FAST" register "uid" = "0" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x1f" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x1f" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end diff --git a/src/mainboard/google/volteer/variants/malefor/overridetree.cb b/src/mainboard/google/volteer/variants/malefor/overridetree.cb index ec9bd67..e0c53ae 100644 --- a/src/mainboard/google/volteer/variants/malefor/overridetree.cb +++ b/src/mainboard/google/volteer/variants/malefor/overridetree.cb @@ -65,33 +65,57 @@ end device ref i2c3 on chip drivers/i2c/sx9310 - register "desc" = ""SAR0 Proximity Sensor"" - register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" + register "hid" = ""STH9310"" + register "desc" = ""SAR Proximity Sensor"" + register "irq_gpio" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" register "speed" = "I2C_SPEED_FAST" register "uid" = "0" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x1f" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x1f" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end diff --git a/src/mainboard/google/volteer/variants/terrador/overridetree.cb b/src/mainboard/google/volteer/variants/terrador/overridetree.cb index c3b5df7..d451c8f 100644 --- a/src/mainboard/google/volteer/variants/terrador/overridetree.cb +++ b/src/mainboard/google/volteer/variants/terrador/overridetree.cb @@ -132,33 +132,57 @@ end device ref i2c2 on chip drivers/i2c/sx9310 - register "desc" = ""SAR0 Proximity Sensor"" - register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" + register "hid" = ""STH9310"" + register "desc" = ""SAR Proximity Sensor"" + register "irq_gpio" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" register "speed" = "I2C_SPEED_FAST" register "uid" = "0" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x1f" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x1f" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end diff --git a/src/mainboard/google/volteer/variants/todor/overridetree.cb b/src/mainboard/google/volteer/variants/todor/overridetree.cb index 2c95b16..a66a440 100644 --- a/src/mainboard/google/volteer/variants/todor/overridetree.cb +++ b/src/mainboard/google/volteer/variants/todor/overridetree.cb @@ -134,33 +134,57 @@ end device ref i2c2 on chip drivers/i2c/sx9310 - register "desc" = ""SAR0 Proximity Sensor"" - register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" + register "hid" = ""STH9310"" + register "desc" = ""SAR Proximity Sensor"" + register "irq_gpio" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" register "speed" = "I2C_SPEED_FAST" register "uid" = "0" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x1f" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x1f" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end diff --git a/src/mainboard/google/volteer/variants/trondo/overridetree.cb b/src/mainboard/google/volteer/variants/trondo/overridetree.cb index 7169932..86c44f7 100644 --- a/src/mainboard/google/volteer/variants/trondo/overridetree.cb +++ b/src/mainboard/google/volteer/variants/trondo/overridetree.cb @@ -35,33 +35,57 @@ end device ref i2c2 on chip drivers/i2c/sx9310 - register "desc" = ""SAR0 Proximity Sensor"" - register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" + register "hid" = ""STH9310"" + register "desc" = ""SAR Proximity Sensor"" + register "irq_gpio" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" register "speed" = "I2C_SPEED_FAST" register "uid" = "0" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x1f" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x1f" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end diff --git a/src/mainboard/google/volteer/variants/volteer/overridetree.cb b/src/mainboard/google/volteer/variants/volteer/overridetree.cb index f23ef76..eee4a0e 100644 --- a/src/mainboard/google/volteer/variants/volteer/overridetree.cb +++ b/src/mainboard/google/volteer/variants/volteer/overridetree.cb @@ -151,33 +151,57 @@ end device ref i2c2 on chip drivers/i2c/sx9310 - register "desc" = ""SAR0 Proximity Sensor"" - register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" + register "hid" = ""STH9310"" + register "desc" = ""SAR Proximity Sensor"" + register "irq_gpio" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" register "speed" = "I2C_SPEED_FAST" register "uid" = "0" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x1f" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x1f" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end diff --git a/src/mainboard/google/volteer/variants/volteer2/overridetree.cb b/src/mainboard/google/volteer/variants/volteer2/overridetree.cb index e4da0e6..966fb5b 100644 --- a/src/mainboard/google/volteer/variants/volteer2/overridetree.cb +++ b/src/mainboard/google/volteer/variants/volteer2/overridetree.cb @@ -198,33 +198,57 @@ end device ref i2c2 on chip drivers/i2c/sx9310 - register "desc" = ""SAR0 Proximity Sensor"" - register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" + register "hid" = ""STH9310"" + register "desc" = ""SAR Proximity Sensor"" + register "irq_gpio" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" register "speed" = "I2C_SPEED_FAST" register "uid" = "0" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x1f" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x1f" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end diff --git a/src/mainboard/google/volteer/variants/voxel/overridetree.cb b/src/mainboard/google/volteer/variants/voxel/overridetree.cb index d2b1354..19a0027 100644 --- a/src/mainboard/google/volteer/variants/voxel/overridetree.cb +++ b/src/mainboard/google/volteer/variants/voxel/overridetree.cb @@ -147,33 +147,57 @@ end device ref i2c2 on chip drivers/i2c/sx9310 - register "desc" = ""SAR0 Proximity Sensor"" - register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" + register "hid" = ""STH9310"" + register "desc" = ""SAR Proximity Sensor"" + register "irq_gpio" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)" register "speed" = "I2C_SPEED_FAST" register "uid" = "0" - register "reg_prox_ctrl0" = "0x10" - register "reg_prox_ctrl1" = "0x00" - register "reg_prox_ctrl2" = "0x84" - register "reg_prox_ctrl3" = "0x0e" - register "reg_prox_ctrl4" = "0x07" - register "reg_prox_ctrl5" = "0xc6" - register "reg_prox_ctrl6" = "0x20" - register "reg_prox_ctrl7" = "0x0d" - register "reg_prox_ctrl8" = "0x8d" - register "reg_prox_ctrl9" = "0x43" - register "reg_prox_ctrl10" = "0x1f" - register "reg_prox_ctrl11" = "0x00" - register "reg_prox_ctrl12" = "0x00" - register "reg_prox_ctrl13" = "0x00" - register "reg_prox_ctrl14" = "0x00" - register "reg_prox_ctrl15" = "0x00" - register "reg_prox_ctrl16" = "0x00" - register "reg_prox_ctrl17" = "0x00" - register "reg_prox_ctrl18" = "0x00" - register "reg_prox_ctrl19" = "0x00" - register "reg_sar_ctrl0" = "0x50" - register "reg_sar_ctrl1" = "0x8a" - register "reg_sar_ctrl2" = "0x3c" + register "regs[0].reg_name" = ""reg_prox_ctrl0"" + register "regs[0].value" = "0x10" + register "regs[1].reg_name" = ""reg_prox_ctrl1"" + register "regs[1].value" = "0x00" + register "regs[2].reg_name" = ""reg_prox_ctrl2"" + register "regs[2].value" = "0x84" + register "regs[3].reg_name" = ""reg_prox_ctrl3"" + register "regs[3].value" = "0x0e" + register "regs[4].reg_name" = ""reg_prox_ctrl4"" + register "regs[4].value" = "0x07" + register "regs[5].reg_name" = ""reg_prox_ctrl5"" + register "regs[5].value" = "0xc6" + register "regs[6].reg_name" = ""reg_prox_ctrl6"" + register "regs[6].value" = "0x20" + register "regs[7].reg_name" = ""reg_prox_ctrl7"" + register "regs[7].value" = "0x0d" + register "regs[8].reg_name" = ""reg_prox_ctrl8"" + register "regs[8].value" = "0x8d" + register "regs[9].reg_name" = ""reg_prox_ctrl9"" + register "regs[9].value" = "0x43" + register "regs[10].reg_name" = ""reg_prox_ctrl10"" + register "regs[10].value" = "0x1f" + register "regs[11].reg_name" = ""reg_prox_ctrl11"" + register "regs[11].value" = "0x00" + register "regs[12].reg_name" = ""reg_prox_ctrl12"" + register "regs[12].value" = "0x00" + register "regs[13].reg_name" = ""reg_prox_ctrl13"" + register "regs[13].value" = "0x00" + register "regs[14].reg_name" = ""reg_prox_ctrl14"" + register "regs[14].value" = "0x00" + register "regs[15].reg_name" = ""reg_prox_ctrl15"" + register "regs[15].value" = "0x00" + register "regs[16].reg_name" = ""reg_prox_ctrl16"" + register "regs[16].value" = "0x00" + register "regs[17].reg_name" = ""reg_prox_ctrl17"" + register "regs[17].value" = "0x00" + register "regs[18].reg_name" = ""reg_prox_ctrl18"" + register "regs[18].value" = "0x00" + register "regs[19].reg_name" = ""reg_prox_ctrl19"" + register "regs[19].value" = "0x00" + register "regs[20].reg_name" = ""reg_sar_ctrl0"" + register "regs[20].value" = "0x50" + register "regs[21].reg_name" = ""reg_sar_ctrl1"" + register "regs[21].value" = "0x8a" + register "regs[22].reg_name" = ""reg_sar_ctrl2"" + register "regs[22].value" = "0x3c" device i2c 28 on end end end