drivers/i2c: sx9310: Replace register map with descriptive names
The current driver is using chip registers map to configure the SAR sensor, which is opaque, especially when the datasheet is not published widely. Use more descriptive names, as defined in Linux kernel documentation at https://www.kernel.org/doc/Documentation/devicetree/bindings/iio/proximity/semtech%2Csx9310.yaml BUG=b:173341604 BRANCH=volteer TEST=Dump all tables, check semtech property: for i in $(find /sys/firmware/acpi/tables/ -type f) ; do f=$(basename $i); cat $i > /tmp/$f.dat ; iasl -d /tmp/$f.dat done In SSDT.dsl, we have: Package (0x06) { Package (0x02) { "semtech,cs0-ground", Zero }, Package (0x02) { "semtech,startup-sensor", Zero }, Package (0x02) { "semtech,proxraw-strength", Zero }, Package (0x02) { "semtech,avg-pos-strength", 0x0200 }, Package (0x02) { "semtech,combined-sensors", Package (0x03) { Zero, One, 0x02 } }, Package (0x02) { "semtech,resolution", "finest" } } Change-Id: I8d1c81b56eaeef1dbb0f73c1d74c3a20e8b2fd7b Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50210 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
e4a7e46a9c
commit
689c25b9d6
|
@ -6,7 +6,18 @@
|
||||||
#include <acpi/acpi_device.h>
|
#include <acpi/acpi_device.h>
|
||||||
#include <device/i2c_simple.h>
|
#include <device/i2c_simple.h>
|
||||||
|
|
||||||
#define REGISTER(NAME) uint8_t NAME
|
#define MAX_COMBINED_SENSORS_ENTRIES 4
|
||||||
|
|
||||||
|
enum sx9310_resolution {
|
||||||
|
SX9310_COARSEST = 1,
|
||||||
|
SX9310_VERY_COARSE,
|
||||||
|
SX9310_COARSE,
|
||||||
|
SX9310_MEDIUM_COARSE,
|
||||||
|
SX9310_MEDIUM,
|
||||||
|
SX9310_FINE,
|
||||||
|
SX9310_VERY_FINE,
|
||||||
|
SX9310_FINEST,
|
||||||
|
};
|
||||||
|
|
||||||
struct drivers_i2c_sx9310_config {
|
struct drivers_i2c_sx9310_config {
|
||||||
/* Device Description */
|
/* Device Description */
|
||||||
|
@ -23,9 +34,34 @@ struct drivers_i2c_sx9310_config {
|
||||||
|
|
||||||
/* IO-APIC interrupt */
|
/* IO-APIC interrupt */
|
||||||
struct acpi_irq irq;
|
struct acpi_irq irq;
|
||||||
#include "registers.h"
|
|
||||||
|
/*
|
||||||
|
* Registers definition in the kernel source tree at:
|
||||||
|
* Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* When true, cs0 is the ground. 0 [default] is false. */
|
||||||
|
uint32_t cs0_ground;
|
||||||
|
|
||||||
|
/* Sensor used for start-up proximity detection: Default 0. */
|
||||||
|
uint32_t startup_sensor;
|
||||||
|
|
||||||
|
/* Raw Proximity filter strength: When not set, disabled. */
|
||||||
|
uint32_t proxraw_strength;
|
||||||
|
|
||||||
|
/* Average Proximity filter strength: When not set, disabled. */
|
||||||
|
uint32_t avg_pos_strength;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* List of which sensors are combined and represented by CS3.
|
||||||
|
* Could be standalone (3) or combination of 0, 1, 2, 3.
|
||||||
|
* Driver default: CS0 + CS1.
|
||||||
|
*/
|
||||||
|
uint32_t combined_sensors_count;
|
||||||
|
uint32_t combined_sensors[MAX_COMBINED_SENSORS_ENTRIES];
|
||||||
|
|
||||||
|
/* Capacitance measure resolution. Driver default: "finest". */
|
||||||
|
enum sx9310_resolution resolution;
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef REGISTER
|
|
||||||
|
|
||||||
#endif /* __DRIVERS_I2C_SX9310_CHIP_H__ */
|
#endif /* __DRIVERS_I2C_SX9310_CHIP_H__ */
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
|
|
||||||
#ifndef REGISTER
|
|
||||||
#error "define REGISTER(NAME) before including this file"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
REGISTER(reg_prox_ctrl0);
|
|
||||||
REGISTER(reg_prox_ctrl1);
|
|
||||||
REGISTER(reg_prox_ctrl2);
|
|
||||||
REGISTER(reg_prox_ctrl3);
|
|
||||||
REGISTER(reg_prox_ctrl4);
|
|
||||||
REGISTER(reg_prox_ctrl5);
|
|
||||||
REGISTER(reg_prox_ctrl6);
|
|
||||||
REGISTER(reg_prox_ctrl7);
|
|
||||||
REGISTER(reg_prox_ctrl8);
|
|
||||||
REGISTER(reg_prox_ctrl9);
|
|
||||||
REGISTER(reg_prox_ctrl10);
|
|
||||||
REGISTER(reg_prox_ctrl11);
|
|
||||||
REGISTER(reg_prox_ctrl12);
|
|
||||||
REGISTER(reg_prox_ctrl13);
|
|
||||||
REGISTER(reg_prox_ctrl14);
|
|
||||||
REGISTER(reg_prox_ctrl15);
|
|
||||||
REGISTER(reg_prox_ctrl16);
|
|
||||||
REGISTER(reg_prox_ctrl17);
|
|
||||||
REGISTER(reg_prox_ctrl18);
|
|
||||||
REGISTER(reg_prox_ctrl19);
|
|
||||||
REGISTER(reg_sar_ctrl0);
|
|
||||||
REGISTER(reg_sar_ctrl1);
|
|
||||||
REGISTER(reg_sar_ctrl2);
|
|
|
@ -12,9 +12,16 @@
|
||||||
#define I2C_SX9310_ACPI_ID "STH9310"
|
#define I2C_SX9310_ACPI_ID "STH9310"
|
||||||
#define I2C_SX9310_ACPI_NAME "Semtech SX9310"
|
#define I2C_SX9310_ACPI_NAME "Semtech SX9310"
|
||||||
|
|
||||||
#define REGISTER(NAME) acpi_dp_add_integer(dsd, \
|
static const char * const i2c_sx9310_resolution[] = {
|
||||||
I2C_SX9310_ACPI_ID "," #NAME, \
|
[SX9310_COARSEST] = "coarsest",
|
||||||
config->NAME)
|
[SX9310_VERY_COARSE] = "very-coarse",
|
||||||
|
[SX9310_COARSE] = "coarse",
|
||||||
|
[SX9310_MEDIUM_COARSE] = "medium-coarse",
|
||||||
|
[SX9310_MEDIUM] = "medium",
|
||||||
|
[SX9310_FINE] = "fine",
|
||||||
|
[SX9310_VERY_FINE] = "very-fine",
|
||||||
|
[SX9310_FINEST] = "finest",
|
||||||
|
};
|
||||||
|
|
||||||
static void i2c_sx9310_fill_ssdt(const struct device *dev)
|
static void i2c_sx9310_fill_ssdt(const struct device *dev)
|
||||||
{
|
{
|
||||||
|
@ -27,6 +34,7 @@ static void i2c_sx9310_fill_ssdt(const struct device *dev)
|
||||||
.resource = scope,
|
.resource = scope,
|
||||||
};
|
};
|
||||||
struct acpi_dp *dsd;
|
struct acpi_dp *dsd;
|
||||||
|
struct acpi_dp *combined_sensors;
|
||||||
|
|
||||||
if (!scope || !config)
|
if (!scope || !config)
|
||||||
return;
|
return;
|
||||||
|
@ -56,9 +64,35 @@ static void i2c_sx9310_fill_ssdt(const struct device *dev)
|
||||||
|
|
||||||
/* DSD */
|
/* DSD */
|
||||||
dsd = acpi_dp_new_table("_DSD");
|
dsd = acpi_dp_new_table("_DSD");
|
||||||
#include "registers.h"
|
|
||||||
acpi_dp_write(dsd);
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Format describe in linux kernel documentation. See
|
||||||
|
* https://www.kernel.org/doc/Documentation/devicetree/bindings/iio/proximity/semtech%2Csx9310.yaml
|
||||||
|
*/
|
||||||
|
acpi_dp_add_integer(dsd, "semtech,cs0-ground", config->cs0_ground);
|
||||||
|
acpi_dp_add_integer(dsd, "semtech,startup-sensor",
|
||||||
|
config->startup_sensor);
|
||||||
|
acpi_dp_add_integer(dsd, "semtech,proxraw-strength",
|
||||||
|
config->proxraw_strength);
|
||||||
|
acpi_dp_add_integer(dsd, "semtech,avg-pos-strength",
|
||||||
|
config->avg_pos_strength);
|
||||||
|
|
||||||
|
/* Add combined_sensors package */
|
||||||
|
if (config->combined_sensors_count > 0) {
|
||||||
|
combined_sensors = acpi_dp_new_table("semtech,combined-sensors");
|
||||||
|
for (int i = 0;
|
||||||
|
i < config->combined_sensors_count &&
|
||||||
|
i < MAX_COMBINED_SENSORS_ENTRIES; ++i) {
|
||||||
|
acpi_dp_add_integer(combined_sensors, NULL,
|
||||||
|
config->combined_sensors[i]);
|
||||||
|
}
|
||||||
|
acpi_dp_add_array(dsd, combined_sensors);
|
||||||
|
}
|
||||||
|
if (config->resolution && config->resolution < ARRAY_SIZE(i2c_sx9310_resolution))
|
||||||
|
acpi_dp_add_string(dsd, "semtech,resolution",
|
||||||
|
i2c_sx9310_resolution[config->resolution]);
|
||||||
|
|
||||||
|
acpi_dp_write(dsd);
|
||||||
acpigen_pop_len(); /* Device */
|
acpigen_pop_len(); /* Device */
|
||||||
acpigen_pop_len(); /* Scope */
|
acpigen_pop_len(); /* Scope */
|
||||||
|
|
||||||
|
@ -66,8 +100,6 @@ static void i2c_sx9310_fill_ssdt(const struct device *dev)
|
||||||
config->desc ? : dev->chip_ops->name, dev_path(dev));
|
config->desc ? : dev->chip_ops->name, dev_path(dev));
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef REGISTER
|
|
||||||
|
|
||||||
static const char *i2c_sx9310_acpi_name(const struct device *dev)
|
static const char *i2c_sx9310_acpi_name(const struct device *dev)
|
||||||
{
|
{
|
||||||
static char name[5];
|
static char name[5];
|
||||||
|
|
|
@ -129,29 +129,15 @@ chip soc/intel/cannonlake
|
||||||
register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_A0)"
|
register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_A0)"
|
||||||
register "speed" = "I2C_SPEED_FAST"
|
register "speed" = "I2C_SPEED_FAST"
|
||||||
register "uid" = "1"
|
register "uid" = "1"
|
||||||
register "reg_prox_ctrl0" = "0x10"
|
register "cs0_ground" = "0x0"
|
||||||
register "reg_prox_ctrl1" = "0x00"
|
register "combined_sensors_count" = "3"
|
||||||
register "reg_prox_ctrl2" = "0x84"
|
register "combined_sensors[0]" = "0"
|
||||||
register "reg_prox_ctrl3" = "0x0e"
|
register "combined_sensors[1]" = "1"
|
||||||
register "reg_prox_ctrl4" = "0x07"
|
register "combined_sensors[2]" = "2"
|
||||||
register "reg_prox_ctrl5" = "0xc6"
|
register "resolution" = "SX9310_FINEST"
|
||||||
register "reg_prox_ctrl6" = "0x20"
|
register "avg_pos_strength" = "512"
|
||||||
register "reg_prox_ctrl7" = "0x0d"
|
register "startup_sensor" = "0"
|
||||||
register "reg_prox_ctrl8" = "0x8d"
|
register "proxraw_strength" = "0"
|
||||||
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"
|
|
||||||
device i2c 28 on end
|
device i2c 28 on end
|
||||||
end
|
end
|
||||||
end # I2C #3
|
end # I2C #3
|
||||||
|
|
|
@ -149,29 +149,15 @@ chip soc/intel/cannonlake
|
||||||
register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_A0)"
|
register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_A0)"
|
||||||
register "speed" = "I2C_SPEED_FAST"
|
register "speed" = "I2C_SPEED_FAST"
|
||||||
register "uid" = "1"
|
register "uid" = "1"
|
||||||
register "reg_prox_ctrl0" = "0x10"
|
register "cs0_ground" = "0x0"
|
||||||
register "reg_prox_ctrl1" = "0x00"
|
register "combined_sensors_count" = "3"
|
||||||
register "reg_prox_ctrl2" = "0x84"
|
register "combined_sensors[0]" = "0"
|
||||||
register "reg_prox_ctrl3" = "0x0e"
|
register "combined_sensors[1]" = "1"
|
||||||
register "reg_prox_ctrl4" = "0x07"
|
register "combined_sensors[2]" = "2"
|
||||||
register "reg_prox_ctrl5" = "0xc6"
|
register "resolution" = "SX9310_FINEST"
|
||||||
register "reg_prox_ctrl6" = "0x20"
|
register "avg_pos_strength" = "512"
|
||||||
register "reg_prox_ctrl7" = "0x0d"
|
register "startup_sensor" = "0"
|
||||||
register "reg_prox_ctrl8" = "0x8d"
|
register "proxraw_strength" = "0"
|
||||||
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"
|
|
||||||
device i2c 28 on end
|
device i2c 28 on end
|
||||||
end
|
end
|
||||||
end # I2C #3
|
end # I2C #3
|
||||||
|
|
|
@ -121,29 +121,15 @@ chip soc/intel/apollolake
|
||||||
register "desc" = ""SAR Proximity Sensor""
|
register "desc" = ""SAR Proximity Sensor""
|
||||||
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPIO_214_IRQ)"
|
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPIO_214_IRQ)"
|
||||||
register "uid" = "1"
|
register "uid" = "1"
|
||||||
register "reg_prox_ctrl0" = "0x10"
|
register "cs0_ground" = "0x0"
|
||||||
register "reg_prox_ctrl1" = "0x00"
|
register "combined_sensors_count" = "3"
|
||||||
register "reg_prox_ctrl2" = "0x84"
|
register "combined_sensors[0]" = "0"
|
||||||
register "reg_prox_ctrl3" = "0x0e"
|
register "combined_sensors[1]" = "1"
|
||||||
register "reg_prox_ctrl4" = "0x07"
|
register "combined_sensors[2]" = "2"
|
||||||
register "reg_prox_ctrl5" = "0xc6"
|
register "resolution" = "SX9310_FINEST"
|
||||||
register "reg_prox_ctrl6" = "0x20"
|
register "avg_pos_strength" = "512"
|
||||||
register "reg_prox_ctrl7" = "0x0d"
|
register "startup_sensor" = "0"
|
||||||
register "reg_prox_ctrl8" = "0x8d"
|
register "proxraw_strength" = "0"
|
||||||
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"
|
|
||||||
device i2c 28 on end
|
device i2c 28 on end
|
||||||
end
|
end
|
||||||
end # - I2C 1
|
end # - I2C 1
|
||||||
|
|
|
@ -311,30 +311,16 @@ chip soc/intel/skylake
|
||||||
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D9_IRQ)"
|
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D9_IRQ)"
|
||||||
register "speed" = "I2C_SPEED_FAST"
|
register "speed" = "I2C_SPEED_FAST"
|
||||||
register "uid" = "0"
|
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"
|
|
||||||
device i2c 28 on end
|
device i2c 28 on end
|
||||||
|
register "cs0_ground" = "0x0"
|
||||||
|
register "combined_sensors_count" = "3"
|
||||||
|
register "combined_sensors[0]" = "0"
|
||||||
|
register "combined_sensors[1]" = "1"
|
||||||
|
register "combined_sensors[2]" = "2"
|
||||||
|
register "resolution" = "SX9310_FINEST"
|
||||||
|
register "avg_pos_strength" = "512"
|
||||||
|
register "startup_sensor" = "0"
|
||||||
|
register "proxraw_strength" = "0"
|
||||||
end
|
end
|
||||||
end # I2C #1
|
end # I2C #1
|
||||||
device pci 15.2 off end # I2C #2
|
device pci 15.2 off end # I2C #2
|
||||||
|
@ -352,30 +338,16 @@ chip soc/intel/skylake
|
||||||
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D10_IRQ)"
|
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D10_IRQ)"
|
||||||
register "speed" = "I2C_SPEED_FAST"
|
register "speed" = "I2C_SPEED_FAST"
|
||||||
register "uid" = "1"
|
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"
|
|
||||||
device i2c 28 on end
|
device i2c 28 on end
|
||||||
|
register "cs0_ground" = "0x0"
|
||||||
|
register "combined_sensors_count" = "3"
|
||||||
|
register "combined_sensors[0]" = "0"
|
||||||
|
register "combined_sensors[1]" = "1"
|
||||||
|
register "combined_sensors[2]" = "2"
|
||||||
|
register "resolution" = "SX9310_FINEST"
|
||||||
|
register "avg_pos_strength" = "512"
|
||||||
|
register "startup_sensor" = "0"
|
||||||
|
register "proxraw_strength" = "0"
|
||||||
end
|
end
|
||||||
end # I2C #5
|
end # I2C #5
|
||||||
device pci 19.2 on
|
device pci 19.2 on
|
||||||
|
|
|
@ -82,29 +82,15 @@ chip soc/intel/tigerlake
|
||||||
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)"
|
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)"
|
||||||
register "speed" = "I2C_SPEED_FAST"
|
register "speed" = "I2C_SPEED_FAST"
|
||||||
register "uid" = "0"
|
register "uid" = "0"
|
||||||
register "reg_prox_ctrl0" = "0x10"
|
register "cs0_ground" = "0x0"
|
||||||
register "reg_prox_ctrl1" = "0x00"
|
register "combined_sensors_count" = "3"
|
||||||
register "reg_prox_ctrl2" = "0x84"
|
register "combined_sensors[0]" = "0"
|
||||||
register "reg_prox_ctrl3" = "0x0e"
|
register "combined_sensors[1]" = "1"
|
||||||
register "reg_prox_ctrl4" = "0x07"
|
register "combined_sensors[2]" = "2"
|
||||||
register "reg_prox_ctrl5" = "0xc6"
|
register "resolution" = "SX9310_FINEST"
|
||||||
register "reg_prox_ctrl6" = "0x20"
|
register "avg_pos_strength" = "512"
|
||||||
register "reg_prox_ctrl7" = "0x0d"
|
register "startup_sensor" = "0"
|
||||||
register "reg_prox_ctrl8" = "0x8d"
|
register "proxraw_strength" = "0"
|
||||||
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"
|
|
||||||
device i2c 28 on end
|
device i2c 28 on end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -69,29 +69,15 @@ chip soc/intel/tigerlake
|
||||||
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)"
|
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)"
|
||||||
register "speed" = "I2C_SPEED_FAST"
|
register "speed" = "I2C_SPEED_FAST"
|
||||||
register "uid" = "0"
|
register "uid" = "0"
|
||||||
register "reg_prox_ctrl0" = "0x10"
|
register "cs0_ground" = "0x0"
|
||||||
register "reg_prox_ctrl1" = "0x00"
|
register "combined_sensors_count" = "3"
|
||||||
register "reg_prox_ctrl2" = "0x84"
|
register "combined_sensors[0]" = "0"
|
||||||
register "reg_prox_ctrl3" = "0x0e"
|
register "combined_sensors[1]" = "1"
|
||||||
register "reg_prox_ctrl4" = "0x07"
|
register "combined_sensors[2]" = "2"
|
||||||
register "reg_prox_ctrl5" = "0xc6"
|
register "resolution" = "SX9310_FINEST"
|
||||||
register "reg_prox_ctrl6" = "0x20"
|
register "avg_pos_strength" = "512"
|
||||||
register "reg_prox_ctrl7" = "0x0d"
|
register "startup_sensor" = "0"
|
||||||
register "reg_prox_ctrl8" = "0x8d"
|
register "proxraw_strength" = "0"
|
||||||
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"
|
|
||||||
device i2c 28 on end
|
device i2c 28 on end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -39,29 +39,15 @@ chip soc/intel/tigerlake
|
||||||
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)"
|
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)"
|
||||||
register "speed" = "I2C_SPEED_FAST"
|
register "speed" = "I2C_SPEED_FAST"
|
||||||
register "uid" = "0"
|
register "uid" = "0"
|
||||||
register "reg_prox_ctrl0" = "0x10"
|
register "cs0_ground" = "0x0"
|
||||||
register "reg_prox_ctrl1" = "0x00"
|
register "combined_sensors_count" = "3"
|
||||||
register "reg_prox_ctrl2" = "0x84"
|
register "combined_sensors[0]" = "0"
|
||||||
register "reg_prox_ctrl3" = "0x0e"
|
register "combined_sensors[1]" = "1"
|
||||||
register "reg_prox_ctrl4" = "0x07"
|
register "combined_sensors[2]" = "2"
|
||||||
register "reg_prox_ctrl5" = "0xc6"
|
register "resolution" = "SX9310_FINEST"
|
||||||
register "reg_prox_ctrl6" = "0x20"
|
register "avg_pos_strength" = "512"
|
||||||
register "reg_prox_ctrl7" = "0x0d"
|
register "startup_sensor" = "0"
|
||||||
register "reg_prox_ctrl8" = "0x8d"
|
register "proxraw_strength" = "0"
|
||||||
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"
|
|
||||||
device i2c 28 on end
|
device i2c 28 on end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -155,29 +155,15 @@ chip soc/intel/tigerlake
|
||||||
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)"
|
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)"
|
||||||
register "speed" = "I2C_SPEED_FAST"
|
register "speed" = "I2C_SPEED_FAST"
|
||||||
register "uid" = "0"
|
register "uid" = "0"
|
||||||
register "reg_prox_ctrl0" = "0x10"
|
register "cs0_ground" = "0x0"
|
||||||
register "reg_prox_ctrl1" = "0x00"
|
register "combined_sensors_count" = "3"
|
||||||
register "reg_prox_ctrl2" = "0x84"
|
register "combined_sensors[0]" = "0"
|
||||||
register "reg_prox_ctrl3" = "0x0e"
|
register "combined_sensors[1]" = "1"
|
||||||
register "reg_prox_ctrl4" = "0x07"
|
register "combined_sensors[2]" = "2"
|
||||||
register "reg_prox_ctrl5" = "0xc6"
|
register "resolution" = "SX9310_FINEST"
|
||||||
register "reg_prox_ctrl6" = "0x20"
|
register "avg_pos_strength" = "512"
|
||||||
register "reg_prox_ctrl7" = "0x0d"
|
register "startup_sensor" = "0"
|
||||||
register "reg_prox_ctrl8" = "0x8d"
|
register "proxraw_strength" = "0"
|
||||||
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"
|
|
||||||
device i2c 28 on end
|
device i2c 28 on end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -213,29 +213,14 @@ chip soc/intel/tigerlake
|
||||||
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)"
|
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)"
|
||||||
register "speed" = "I2C_SPEED_FAST"
|
register "speed" = "I2C_SPEED_FAST"
|
||||||
register "uid" = "0"
|
register "uid" = "0"
|
||||||
register "reg_prox_ctrl0" = "0x10"
|
register "cs0_ground" = "0x0"
|
||||||
register "reg_prox_ctrl1" = "0x00"
|
register "combined_sensors_count" = "3"
|
||||||
register "reg_prox_ctrl2" = "0x84"
|
register "combined_sensors[0]" = "0"
|
||||||
register "reg_prox_ctrl3" = "0x0e"
|
register "combined_sensors[1]" = "1"
|
||||||
register "reg_prox_ctrl4" = "0x07"
|
register "combined_sensors[2]" = "2"
|
||||||
register "reg_prox_ctrl5" = "0xc6"
|
register "avg_pos_strength" = "512"
|
||||||
register "reg_prox_ctrl6" = "0x20"
|
register "startup_sensor" = "0"
|
||||||
register "reg_prox_ctrl7" = "0x0d"
|
register "proxraw_strength" = "0"
|
||||||
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"
|
|
||||||
device i2c 28 on end
|
device i2c 28 on end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -177,29 +177,15 @@ chip soc/intel/tigerlake
|
||||||
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)"
|
register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_F14_IRQ)"
|
||||||
register "speed" = "I2C_SPEED_FAST"
|
register "speed" = "I2C_SPEED_FAST"
|
||||||
register "uid" = "0"
|
register "uid" = "0"
|
||||||
register "reg_prox_ctrl0" = "0x10"
|
register "cs0_ground" = "0x0"
|
||||||
register "reg_prox_ctrl1" = "0x00"
|
register "combined_sensors_count" = "3"
|
||||||
register "reg_prox_ctrl2" = "0x84"
|
register "combined_sensors[0]" = "0"
|
||||||
register "reg_prox_ctrl3" = "0x0e"
|
register "combined_sensors[1]" = "1"
|
||||||
register "reg_prox_ctrl4" = "0x07"
|
register "combined_sensors[2]" = "2"
|
||||||
register "reg_prox_ctrl5" = "0xc6"
|
register "resolution" = "SX9310_FINEST"
|
||||||
register "reg_prox_ctrl6" = "0x20"
|
register "avg_pos_strength" = "512"
|
||||||
register "reg_prox_ctrl7" = "0x0d"
|
register "startup_sensor" = "0"
|
||||||
register "reg_prox_ctrl8" = "0x8d"
|
register "proxraw_strength" = "0"
|
||||||
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"
|
|
||||||
device i2c 28 on end
|
device i2c 28 on end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue