* [PATCH 1/3] dt-bindings: vendor-prefixes: Add Goermicro
2026-11-17 8:39 [PATCH 0/3] iio: pressure: dps310: add Goermicro SPL07-003 Jorijn van der Graaf
@ 2026-11-17 8:39 ` Jorijn van der Graaf
2026-11-17 10:07 ` Krzysztof Kozlowski
2026-11-17 8:39 ` [PATCH 2/3] dt-bindings: iio: pressure: infineon,dps310: Add Goermicro SPL07-003 Jorijn van der Graaf
2026-11-17 8:39 ` [PATCH 3/3] iio: pressure: dps310: add Goermicro SPL07-003 support Jorijn van der Graaf
2 siblings, 1 reply; 7+ messages in thread
From: Jorijn van der Graaf @ 2026-11-17 8:39 UTC (permalink / raw)
To: Jonathan Cameron, linux-iio
Cc: David Lechner, Nuno Sá,
Andy Shevchenko, Eddie James, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree, linux-kernel, Paulius Zaleckas,
Rupesh Majhi, Joshua Crofts, Luca Weiss, Jorijn van der Graaf
Goermicro (Goertek Microelectronics Inc.) makes sensors and sensor
modules such as the SPL07-003 barometric pressure sensor. It is a
subsidiary of Goertek Inc. with its own name and domain.
Link: https://en.goermicro.com/
Signed-off-by: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 0cfafd297978..c740a98522c3 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -696,6 +696,8 @@ patternProperties:
description: Global Mixed-mode Technology, Inc.
"^gocontroll,.*":
description: GOcontroll Modular Embedded Electronics B.V.
+ "^goermicro,.*":
+ description: Goertek Microelectronics Inc.
"^goldelico,.*":
description: Golden Delicious Computers GmbH & Co. KG
"^goodix,.*":
--
2.56.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 2/3] dt-bindings: iio: pressure: infineon,dps310: Add Goermicro SPL07-003
2026-11-17 8:39 [PATCH 0/3] iio: pressure: dps310: add Goermicro SPL07-003 Jorijn van der Graaf
2026-11-17 8:39 ` [PATCH 1/3] dt-bindings: vendor-prefixes: Add Goermicro Jorijn van der Graaf
@ 2026-11-17 8:39 ` Jorijn van der Graaf
2026-11-17 10:08 ` Krzysztof Kozlowski
2026-11-17 8:39 ` [PATCH 3/3] iio: pressure: dps310: add Goermicro SPL07-003 support Jorijn van der Graaf
2 siblings, 1 reply; 7+ messages in thread
From: Jorijn van der Graaf @ 2026-11-17 8:39 UTC (permalink / raw)
To: Jonathan Cameron, linux-iio
Cc: David Lechner, Nuno Sá,
Andy Shevchenko, Eddie James, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree, linux-kernel, Paulius Zaleckas,
Rupesh Majhi, Joshua Crofts, Luca Weiss, Jorijn van der Graaf
The Goermicro SPL07-003 is register compatible with the DPS310, but has
two more pressure calibration coefficients, and bit 7 of TMP_CFG is a
rate bit where the DPS310 selects its temperature sensor.
So the DPS310 compatible cannot be a fallback. The ZTS8032 compatible
cannot be one either: the ZTS8032 has the two coefficients as 16 bit
values in four bytes, the SPL07-003 as 12 bit values in three.
Signed-off-by: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
---
.../devicetree/bindings/iio/pressure/infineon,dps310.yaml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml b/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
index 416117dfd927..46f0892a75fb 100644
--- a/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
+++ b/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
@@ -11,12 +11,13 @@ maintainers:
description:
The DPS310 is a barometric pressure and temperature sensor with an I2C
- interface. The Zilltek ZTS8032 is register compatible with it, but has
- additional calibration coefficients.
+ interface. The Goermicro SPL07-003 and the Zilltek ZTS8032 are register
+ compatible with it, but have additional calibration coefficients.
properties:
compatible:
enum:
+ - goermicro,spl07-003
- infineon,dps310
- zilltek,zts8032
--
2.56.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 3/3] iio: pressure: dps310: add Goermicro SPL07-003 support
2026-11-17 8:39 [PATCH 0/3] iio: pressure: dps310: add Goermicro SPL07-003 Jorijn van der Graaf
2026-11-17 8:39 ` [PATCH 1/3] dt-bindings: vendor-prefixes: Add Goermicro Jorijn van der Graaf
2026-11-17 8:39 ` [PATCH 2/3] dt-bindings: iio: pressure: infineon,dps310: Add Goermicro SPL07-003 Jorijn van der Graaf
@ 2026-11-17 8:39 ` Jorijn van der Graaf
2026-11-17 9:49 ` Andy Shevchenko
2 siblings, 1 reply; 7+ messages in thread
From: Jorijn van der Graaf @ 2026-11-17 8:39 UTC (permalink / raw)
To: Jonathan Cameron, linux-iio
Cc: David Lechner, Nuno Sá,
Andy Shevchenko, Eddie James, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree, linux-kernel, Paulius Zaleckas,
Rupesh Majhi, Joshua Crofts, Luca Weiss, Jorijn van der Graaf
The Goermicro SPL07-003 needs what the ZTS8032 chip data already
describes: c31 and c40 in the pressure polynomial, and TMP_CFG bit 7, a
rate bit on this chip too, left clear. Its TMP_EXT is MEAS_CFG bit 3 and
stays at the reset value, the internal sensor the datasheet recommends.
Its c31 and c40 are 12 bit values packed into 0x22-0x24, where the
ZTS8032 has 16 bit values in 0x22-0x25, so the coefficient block is 21
bytes. Add a chip flag for that layout, the chip data and the I2C and OF
IDs.
Tested on a Fairphone (Gen. 6). The DPS310 temperature workaround skips
this unit: bit 1 of register 0x32 is set.
Datasheet: https://media.digikey.com/pdf/Data%20Sheets/Goertek%20Microelectronics%20PDFs/SPL07-003.pdf
Signed-off-by: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
---
drivers/iio/pressure/Kconfig | 1 +
drivers/iio/pressure/dps310.c | 32 ++++++++++++++++++++++++++++----
2 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/pressure/Kconfig b/drivers/iio/pressure/Kconfig
index ffd072e4bb8f..26bbfe944980 100644
--- a/drivers/iio/pressure/Kconfig
+++ b/drivers/iio/pressure/Kconfig
@@ -116,6 +116,7 @@ config DPS310
select IIO_TRIGGERED_BUFFER
help
Support for the following digital barometric pressure sensors:
+ - Goermicro SPL07-003
- Infineon DPS310
- Zilltek ZTS8032
They can be accessed over I2C bus.
diff --git a/drivers/iio/pressure/dps310.c b/drivers/iio/pressure/dps310.c
index 5cee23986f30..22ed88d17926 100644
--- a/drivers/iio/pressure/dps310.c
+++ b/drivers/iio/pressure/dps310.c
@@ -9,6 +9,11 @@
* calibration coefficients (c31, c40) and temperature calibrated against
* the internal sensor.
*
+ * The Goermicro SPL07-003 has c31 and c40 too, as 12 bit values, and its
+ * datasheet recommends the internal temperature sensor.
+ *
+ * https://media.digikey.com/pdf/Data%20Sheets/Goertek%20Microelectronics%20PDFs/SPL07-003.pdf
+ *
* Temperature calculation:
* c0 * 0.5 + c1 * T_raw / kT °C
*/
@@ -71,6 +76,7 @@
#define DPS310_RESET_MAGIC 0x09
#define DPS310_COEF_BASE 0x10
#define DPS310_COEF_LEN 18
+#define SPL07_COEF_LEN 21
#define ZTS8032_COEF_LEN 22
#define MAX_COEF_LEN 22
@@ -115,6 +121,7 @@ struct dps310_chip_info {
bool coef_for_ext_sensor;
u8 coef_len;
bool has_c31_c40;
+ bool c31_c40_12bit;
};
static const struct dps310_chip_info dps310_chip_info = {
@@ -123,6 +130,14 @@ static const struct dps310_chip_info dps310_chip_info = {
.coef_len = DPS310_COEF_LEN,
};
+static const struct dps310_chip_info spl07_chip_info = {
+ .name = "spl07-003",
+ .coef_for_ext_sensor = false,
+ .coef_len = SPL07_COEF_LEN,
+ .has_c31_c40 = true,
+ .c31_c40_12bit = true,
+};
+
static const struct dps310_chip_info zts8032_chip_info = {
.name = "zts8032",
.coef_for_ext_sensor = false,
@@ -234,8 +249,8 @@ static int dps310_get_coefs(struct dps310_data *data)
/*
* Calculate pressure calibration coefficients. c00 and c10 are 20 bit
- * 2's complement numbers, while the rest are 16 bit 2's complement
- * numbers.
+ * 2's complement numbers, while c01, c11, c20, c21 and c30 are 16 bit
+ * 2's complement numbers.
*/
c00 = (coef[3] << 12) | (coef[4] << 4) | (coef[5] >> 4);
data->c00 = sign_extend32(c00, 19);
@@ -258,7 +273,14 @@ static int dps310_get_coefs(struct dps310_data *data)
c30 = (coef[16] << 8) | coef[17];
data->c30 = sign_extend32(c30, 15);
- if (data->info->has_c31_c40) {
+ if (!data->info->has_c31_c40)
+ return 0;
+
+ if (data->info->c31_c40_12bit) {
+ /* Two 12 bit values in three bytes, like c0 and c1 */
+ data->c31 = sign_extend32(get_unaligned_be16(&coef[18]) >> 4, 11);
+ data->c40 = sign_extend32(get_unaligned_be16(&coef[19]), 11);
+ } else {
data->c31 = sign_extend32(get_unaligned_be16(&coef[18]), 15);
data->c40 = sign_extend32(get_unaligned_be16(&coef[20]), 15);
}
@@ -810,7 +832,7 @@ static int dps310_calculate_pressure(struct dps310_data *data, int *val)
/*
* Section 4.9.1 of the DPS310 spec, Horner form to avoid overflow.
- * c40 and c31 are ZTS8032 only and zero on the DPS310.
+ * c40 and c31 are zero on the DPS310.
*/
if (!dps310_horner_step(&prs, data->c40, p, kp) ||
!dps310_horner_step(&prs, data->c30, p, kp) ||
@@ -1495,12 +1517,14 @@ static int dps310_probe(struct i2c_client *client)
static const struct i2c_device_id dps310_id[] = {
{ .name = "dps310", .driver_data = (kernel_ulong_t)&dps310_chip_info },
+ { .name = "spl07-003", .driver_data = (kernel_ulong_t)&spl07_chip_info },
{ .name = "zts8032", .driver_data = (kernel_ulong_t)&zts8032_chip_info },
{ }
};
MODULE_DEVICE_TABLE(i2c, dps310_id);
static const struct of_device_id dps310_of_match[] = {
+ { .compatible = "goermicro,spl07-003", .data = &spl07_chip_info },
{ .compatible = "infineon,dps310", .data = &dps310_chip_info },
{ .compatible = "zilltek,zts8032", .data = &zts8032_chip_info },
{ }
--
2.56.0
^ permalink raw reply [flat|nested] 7+ messages in thread