Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/2] hwmon: Add Axiado AX3000 TSADC driver
@ 2026-09-03  7:09 Petar Stepanovic
  2026-09-03  7:09 ` [PATCH 1/2] dt-bindings: hwmon: Add Axiado AX3000 TSADC Petar Stepanovic
  2026-09-03  7:09 ` [PATCH 2/2] hwmon: axiado-tsadc: Add AX3000/AX3005 TSADC support Petar Stepanovic
  0 siblings, 2 replies; 6+ messages in thread
From: Petar Stepanovic @ 2026-09-03  7:09 UTC (permalink / raw)
  To: Akhila Kavi, Prasad Bolisetty, Guenter Roeck, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Tzu-Hao Wei,
	Karthikeyan Mitran, Jonathan Corbet, Shuah Khan, Randy Dunlap
  Cc: linux-hwmon, devicetree, linux-arm-kernel, linux-kernel,
	linux-doc, openbmc, Petar Stepanovic

This series adds support for the temperature sensor ADC (TSADC)
controller found on the Axiado AX3000 and AX3005 SoCs. The controller
measures temperature at locations within the SoC silicon die.

AX3005 uses the same programming model as AX3000 and uses
"axiado,ax3000-tsadc" as its fallback compatible.

Each TSADC controller is represented by a separate Devicetree node and
registered as a separate hwmon device exposing one read-only temperature
channel.

The sensor is configured for continuous conversion during probe. The
averaged 12-bit ADC code is converted to millidegrees Celsius using a
lookup table with linear interpolation between adjacent entries. Raw
values outside the characterized lookup-table range are clamped to the
nearest supported temperature.

Signed-off-by: Petar Stepanovic <pstepanovic@axiado.com>
---
Petar Stepanovic (2):
      dt-bindings: hwmon: Add Axiado AX3000 TSADC
      hwmon: axiado-tsadc: Add AX3000/AX3005 TSADC support

 .../bindings/hwmon/axiado,ax3000-tsadc.yaml        |  45 ++++
 Documentation/hwmon/axiado-tsadc.rst               |  41 +++
 Documentation/hwmon/index.rst                      |   1 +
 MAINTAINERS                                        |  10 +
 drivers/hwmon/Kconfig                              |  11 +
 drivers/hwmon/Makefile                             |   1 +
 drivers/hwmon/axiado-tsadc.c                       | 275 +++++++++++++++++++++
 7 files changed, 384 insertions(+)
---
base-commit: 8ce12a5ddf8b86bc5b92c454e85591b1729b78e3
change-id: 20260818-axiado-ax3000-tsadc-9e8bc95bf87a

Best regards,
--  
Petar Stepanovic <pstepanovic@axiado.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] dt-bindings: hwmon: Add Axiado AX3000 TSADC
  2026-09-03  7:09 [PATCH 0/2] hwmon: Add Axiado AX3000 TSADC driver Petar Stepanovic
@ 2026-09-03  7:09 ` Petar Stepanovic
  2026-09-03  7:14   ` sashiko-bot
  2026-09-03 17:43   ` Conor Dooley
  2026-09-03  7:09 ` [PATCH 2/2] hwmon: axiado-tsadc: Add AX3000/AX3005 TSADC support Petar Stepanovic
  1 sibling, 2 replies; 6+ messages in thread
From: Petar Stepanovic @ 2026-09-03  7:09 UTC (permalink / raw)
  To: Akhila Kavi, Prasad Bolisetty, Guenter Roeck, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Tzu-Hao Wei,
	Karthikeyan Mitran, Jonathan Corbet, Shuah Khan, Randy Dunlap
  Cc: linux-hwmon, devicetree, linux-arm-kernel, linux-kernel,
	linux-doc, openbmc, Petar Stepanovic

Add a Devicetree binding for the temperature sensor ADC (TSADC)
controller found on the Axiado AX3000 and AX3005 SoCs.

The controller monitors the on-die temperature. An SoC may contain
multiple TSADC controllers at different locations on the die, each
represented by a separate Devicetree node.

AX3005 uses the same programming model as AX3000 and is compatible
with the AX3000 implementation. Therefore, axiado,ax3000-tsadc is
used as its fallback compatible.

Also add a MAINTAINERS entry covering the binding and driver.

Signed-off-by: Petar Stepanovic <pstepanovic@axiado.com>
---
 .../bindings/hwmon/axiado,ax3000-tsadc.yaml        | 45 ++++++++++++++++++++++
 MAINTAINERS                                        |  8 ++++
 2 files changed, 53 insertions(+)

diff --git a/Documentation/devicetree/bindings/hwmon/axiado,ax3000-tsadc.yaml b/Documentation/devicetree/bindings/hwmon/axiado,ax3000-tsadc.yaml
new file mode 100644
index 000000000000..4b56e4fd9ef9
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/axiado,ax3000-tsadc.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/axiado,ax3000-tsadc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Axiado AX3000 and AX3005 TSADC
+
+maintainers:
+  - Petar Stepanovic <pstepanovic@axiado.com>
+  - Akhila Kavi <akavi@axiado.com>
+  - Prasad Bolisetty <pbolisetty@axiado.com>
+
+description: |
+  The Axiado AX3000 and AX3005 Temperature Sensor ADC (TSADC) controllers
+  monitor the on-die temperature of the SoC.
+
+properties:
+  compatible:
+    oneOf:
+      - const: axiado,ax3000-tsadc
+      - items:
+          - const: axiado,ax3005-tsadc
+          - const: axiado,ax3000-tsadc
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    temperature-sensor@33021000 {
+        compatible = "axiado,ax3000-tsadc";
+        reg = <0x33021000 0x100>;
+        clocks = <&refclk>;
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 77159f279621..c6efb04fc376 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4467,6 +4467,14 @@ F:	Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml
 F:	drivers/spi/spi-axiado.c
 F:	drivers/spi/spi-axiado.h
 
+AXIADO TSADC DRIVER
+M:	Petar Stepanovic <pstepanovic@axiado.com>
+M:	Akhila Kavi <akavi@axiado.com>
+M:	Prasad Bolisetty <pbolisetty@axiado.com>
+L:	linux-hwmon@vger.kernel.org
+S:	Supported
+F:	Documentation/devicetree/bindings/hwmon/axiado,ax3000-tsadc.yaml
+
 AYANEO PLATFORM EC DRIVER
 M:	Antheas Kapenekakis <lkml@antheas.dev>
 L:	platform-driver-x86@vger.kernel.org

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] hwmon: axiado-tsadc: Add AX3000/AX3005 TSADC support
  2026-09-03  7:09 [PATCH 0/2] hwmon: Add Axiado AX3000 TSADC driver Petar Stepanovic
  2026-09-03  7:09 ` [PATCH 1/2] dt-bindings: hwmon: Add Axiado AX3000 TSADC Petar Stepanovic
@ 2026-09-03  7:09 ` Petar Stepanovic
  2026-09-03  7:15   ` sashiko-bot
  1 sibling, 1 reply; 6+ messages in thread
From: Petar Stepanovic @ 2026-09-03  7:09 UTC (permalink / raw)
  To: Akhila Kavi, Prasad Bolisetty, Guenter Roeck, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Tzu-Hao Wei,
	Karthikeyan Mitran, Jonathan Corbet, Shuah Khan, Randy Dunlap
  Cc: linux-hwmon, devicetree, linux-arm-kernel, linux-kernel,
	linux-doc, openbmc, Petar Stepanovic

Add a hwmon driver for the temperature sensor ADC (TSADC) controller
found on Axiado AX3000 and AX3005 SoCs. The controller measures
temperature at locations within the SoC silicon die.

Each TSADC controller is registered as a separate hwmon device and
exposes one read-only temperature channel. The sensor is configured for
continuous conversion during probe.

The current TSADC hardware does not support threshold or alarm reporting.
All TSADC interrupt sources are masked during initialization, and only
the current temperature is exposed through temp1_input.

The averaged 12-bit ADC code is converted to millidegrees Celsius using
a lookup table with linear interpolation between adjacent entries. Raw
values outside the characterized lookup-table range are clamped to the
nearest supported temperature.

Signed-off-by: Petar Stepanovic <pstepanovic@axiado.com>
---
 Documentation/hwmon/axiado-tsadc.rst |  41 ++++++
 Documentation/hwmon/index.rst        |   1 +
 MAINTAINERS                          |   2 +
 drivers/hwmon/Kconfig                |  11 ++
 drivers/hwmon/Makefile               |   1 +
 drivers/hwmon/axiado-tsadc.c         | 275 +++++++++++++++++++++++++++++++++++
 6 files changed, 331 insertions(+)

diff --git a/Documentation/hwmon/axiado-tsadc.rst b/Documentation/hwmon/axiado-tsadc.rst
new file mode 100644
index 000000000000..b8fd0aeacc1f
--- /dev/null
+++ b/Documentation/hwmon/axiado-tsadc.rst
@@ -0,0 +1,41 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Kernel driver axiado-tsadc
+==========================
+
+Supported chips:
+
+  * Axiado AX3000 and AX3005 on-chip temperature sensor (TSADC)
+
+    Prefix: 'axiado_tsadc'
+
+    Addresses scanned: -
+
+    Datasheet: Not publicly available
+
+Authors:
+
+  - Petar Stepanovic <pstepanovic@axiado.com>
+
+Description
+-----------
+
+This driver supports the Temperature Sensor ADC (TSADC) block found on Axiado
+AX3000 and AX3005 SoCs. The block monitors the on-die temperature of the SoC.
+
+An SoC may instantiate several TSADC blocks at different locations on the die.
+Each block is described by its own device tree node and is registered as a
+separate hwmon device with a single temperature channel.
+
+The sensor is configured for continuous conversion at probe time, averaging
+16 samples per conversion. The averaged 12-bit ADC code is converted to
+millidegrees Celsius using a lookup table with linear interpolation between
+entries. The table covers -40 to +125 degrees Celsius; readings outside that
+range are clamped to the nearest supported temperature.
+
+sysfs entries
+-------------
+
+======================= =======================================================
+temp1_input             Die temperature in millidegrees Celsius (read-only)
+======================= =======================================================
diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
index d979e6d6e9f2..b79a27aeb4b4 100644
--- a/Documentation/hwmon/index.rst
+++ b/Documentation/hwmon/index.rst
@@ -51,6 +51,7 @@ Hardware Monitoring Kernel Drivers
    asus_ec_sensors
    asus_rog_ryujin
    asus_wmi_sensors
+   axiado-tsadc
    bcm54140
    bel-pfe
    bpa-rs600
diff --git a/MAINTAINERS b/MAINTAINERS
index c6efb04fc376..3108a004439f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4474,6 +4474,8 @@ M:	Prasad Bolisetty <pbolisetty@axiado.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Supported
 F:	Documentation/devicetree/bindings/hwmon/axiado,ax3000-tsadc.yaml
+F:	Documentation/hwmon/axiado-tsadc.rst
+F:	drivers/hwmon/axiado-tsadc.c
 
 AYANEO PLATFORM EC DRIVER
 M:	Antheas Kapenekakis <lkml@antheas.dev>
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 81a9a1d40eec..f12a47e70f0c 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -311,6 +311,17 @@ config SENSORS_AXI_FAN_CONTROL
 	  This driver can also be built as a module. If so, the module
 	  will be called axi-fan-control
 
+config SENSORS_AXIADO_TSADC
+	tristate "Axiado AX3000 TSADC temperature sensor"
+	depends on ARCH_AXIADO || COMPILE_TEST
+	help
+	  If you say yes here you get support for the on-chip temperature
+	  sensor (TSADC) found on Axiado AX3000 and AX3005 SoCs. The die
+	  temperature is reported through the hwmon sysfs interface.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called axiado-tsadc.
+
 config SENSORS_K8TEMP
 	tristate "AMD Athlon64/FX or Opteron temperature sensor"
 	depends on X86 && PCI
diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
index 0cad7e21634c..b5f5d18e1ccf 100644
--- a/drivers/hwmon/Makefile
+++ b/drivers/hwmon/Makefile
@@ -59,6 +59,7 @@ obj-$(CONFIG_SENSORS_ASPEED_G6) += aspeed-g6-pwm-tach.o
 obj-$(CONFIG_SENSORS_ASUS_ROG_RYUJIN)	+= asus_rog_ryujin.o
 obj-$(CONFIG_SENSORS_ATXP1)	+= atxp1.o
 obj-$(CONFIG_SENSORS_AXI_FAN_CONTROL) += axi-fan-control.o
+obj-$(CONFIG_SENSORS_AXIADO_TSADC)	+= axiado-tsadc.o
 obj-$(CONFIG_SENSORS_CGBC)	+= cgbc-hwmon.o
 obj-$(CONFIG_SENSORS_CHIPCAP2) += chipcap2.o
 obj-$(CONFIG_SENSORS_CORETEMP)	+= coretemp.o
diff --git a/drivers/hwmon/axiado-tsadc.c b/drivers/hwmon/axiado-tsadc.c
new file mode 100644
index 000000000000..c111df6f0044
--- /dev/null
+++ b/drivers/hwmon/axiado-tsadc.c
@@ -0,0 +1,275 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2021-2026 Axiado Corporation
+ *
+ * Driver for the Axiado on-chip temperature sensor (TSADC)
+ */
+
+#include <linux/bitfield.h>
+#include <linux/bits.h>
+#include <linux/clk.h>
+#include <linux/err.h>
+#include <linux/hwmon.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+
+/* TSADC register offsets */
+#define AXIADO_TSADC_MODE	0x0000
+#define AXIADO_TSADC_FUNC_CTRL	0x0004
+#define AXIADO_TSADC_AVG_DOUT	0x000c
+#define AXIADO_TSADC_INTR_MASK	0x0010
+#define AXIADO_TSADC_ANA_REG	0x0020
+#define AXIADO_TSADC_SEL	0x0028
+#define AXIADO_TSADC_TSEN_EN	0x002c
+#define AXIADO_TSADC_EN	0x0030
+
+/* TSADC mode register: continuous conversion */
+#define AXIADO_TSADC_MODE_CONT	0x2
+
+/*
+ * TSADC functional control register: bit 0 starts the conversion and
+ * bits [31:16] specify the number of samples. Average over 16 samples.
+ */
+#define AXIADO_TSADC_FUNC_CTRL_START		BIT(0)
+#define AXIADO_TSADC_FUNC_CTRL_NUM_SAMPLES	GENMASK(31, 16)
+#define AXIADO_TSADC_FUNC_CTRL_CLR		0x0
+#define AXIADO_TSADC_FUNC_CTRL_SET				\
+	(FIELD_PREP(AXIADO_TSADC_FUNC_CTRL_NUM_SAMPLES, 16) |	\
+	 AXIADO_TSADC_FUNC_CTRL_START)
+
+/* TSADC average output register: 12-bit ADC result */
+#define AXIADO_TSADC_AVG_DOUT_MASK	GENMASK(11, 0)
+
+/* Interrupt mask bits */
+#define AXIADO_TSADC_INTR_BIST_DONE		BIT(0)
+#define AXIADO_TSADC_INTR_LOOP_DONE		BIT(1)
+#define AXIADO_TSADC_INTR_THRESHOLD		BIT(2)
+#define AXIADO_TSADC_INTR_MASK_ALL		\
+	(AXIADO_TSADC_INTR_BIST_DONE |		\
+	 AXIADO_TSADC_INTR_LOOP_DONE |		\
+	 AXIADO_TSADC_INTR_THRESHOLD)
+
+/* TSADC analog block configuration required for temperature measurement */
+#define AXIADO_TSADC_ANA_REG_INIT	0x6
+
+/* TSADC SEL: select temperature measurement */
+#define AXIADO_TSADC_SEL_TEMP	0x00
+
+/* TSADC EN / TSEN_EN field values */
+#define AXIADO_TSADC_DIS	0x00
+#define AXIADO_TSADC_ENA	0x01
+
+struct axiado_tsadc {
+	void __iomem *regs;
+};
+
+/*
+ * Lookup table: raw ADC output (12-bit) vs temperature in millidegrees
+ * Celsius. Raw values decrease as temperature increases, from -40°C
+ * to 125°C in 5°C steps.
+ */
+struct axiado_tsadc_point {
+	u32 raw;
+	int temp_mc;
+};
+
+static const struct axiado_tsadc_point axiado_tsadc_table[] = {
+	{ .raw = 2776, .temp_mc = -40000 },
+	{ .raw = 2748, .temp_mc = -35000 },
+	{ .raw = 2721, .temp_mc = -30000 },
+	{ .raw = 2694, .temp_mc = -25000 },
+	{ .raw = 2667, .temp_mc = -20000 },
+	{ .raw = 2640, .temp_mc = -15000 },
+	{ .raw = 2612, .temp_mc = -10000 },
+	{ .raw = 2584, .temp_mc =  -5000 },
+	{ .raw = 2556, .temp_mc =      0 },
+	{ .raw = 2528, .temp_mc =   5000 },
+	{ .raw = 2500, .temp_mc =  10000 },
+	{ .raw = 2472, .temp_mc =  15000 },
+	{ .raw = 2444, .temp_mc =  20000 },
+	{ .raw = 2416, .temp_mc =  25000 },
+	{ .raw = 2389, .temp_mc =  30000 },
+	{ .raw = 2362, .temp_mc =  35000 },
+	{ .raw = 2335, .temp_mc =  40000 },
+	{ .raw = 2307, .temp_mc =  45000 },
+	{ .raw = 2279, .temp_mc =  50000 },
+	{ .raw = 2251, .temp_mc =  55000 },
+	{ .raw = 2223, .temp_mc =  60000 },
+	{ .raw = 2195, .temp_mc =  65000 },
+	{ .raw = 2167, .temp_mc =  70000 },
+	{ .raw = 2138, .temp_mc =  75000 },
+	{ .raw = 2110, .temp_mc =  80000 },
+	{ .raw = 2081, .temp_mc =  85000 },
+	{ .raw = 2052, .temp_mc =  90000 },
+	{ .raw = 2024, .temp_mc =  95000 },
+	{ .raw = 1996, .temp_mc = 100000 },
+	{ .raw = 1967, .temp_mc = 105000 },
+	{ .raw = 1938, .temp_mc = 110000 },
+	{ .raw = 1909, .temp_mc = 115000 },
+	{ .raw = 1880, .temp_mc = 120000 },
+	{ .raw = 1852, .temp_mc = 125000 },
+};
+
+/* Convert raw ADC code to millidegrees Celsius with linear interpolation. */
+static int axiado_tsadc_raw_to_mc(u32 raw, long *val)
+{
+	int i, n = ARRAY_SIZE(axiado_tsadc_table);
+	long num, denom;
+
+	if (raw >= axiado_tsadc_table[0].raw) {
+		*val = axiado_tsadc_table[0].temp_mc;
+		return 0;
+	}
+
+	if (raw <= axiado_tsadc_table[n - 1].raw) {
+		*val = axiado_tsadc_table[n - 1].temp_mc;
+		return 0;
+	}
+
+	/* Find i such that axiado_tsadc_table[i].raw >= raw > axiado_tsadc_table[i+1].raw */
+	for (i = 0; i < n - 1; i++) {
+		if (raw >= axiado_tsadc_table[i + 1].raw)
+			break;
+	}
+
+	if (raw == axiado_tsadc_table[i].raw) {
+		*val = axiado_tsadc_table[i].temp_mc;
+		return 0;
+	}
+
+	/* Linear interpolation within the interval */
+	num = (long)(axiado_tsadc_table[i + 1].temp_mc - axiado_tsadc_table[i].temp_mc) *
+	      (axiado_tsadc_table[i].raw - raw);
+	denom = axiado_tsadc_table[i].raw - axiado_tsadc_table[i + 1].raw;
+	*val = axiado_tsadc_table[i].temp_mc + num / denom;
+	return 0;
+}
+
+static int axiado_tsadc_read(struct device *dev, enum hwmon_sensor_types type,
+			     u32 attr, int channel, long *val)
+{
+	struct axiado_tsadc *tsadc = dev_get_drvdata(dev);
+	u32 raw;
+
+	if (type != hwmon_temp)
+		return -EOPNOTSUPP;
+
+	switch (attr) {
+	case hwmon_temp_input:
+		if (ioread32(tsadc->regs + AXIADO_TSADC_SEL) != AXIADO_TSADC_SEL_TEMP ||
+		    ioread32(tsadc->regs + AXIADO_TSADC_EN) != AXIADO_TSADC_ENA)
+			return -ENODATA;
+
+		raw = ioread32(tsadc->regs + AXIADO_TSADC_AVG_DOUT) &
+			       AXIADO_TSADC_AVG_DOUT_MASK;
+
+		return axiado_tsadc_raw_to_mc(raw, val);
+	default:
+		return -EOPNOTSUPP;
+	}
+}
+
+static umode_t axiado_tsadc_is_visible(const void *data,
+				       enum hwmon_sensor_types type, u32 attr,
+				       int channel)
+{
+	if (type == hwmon_temp) {
+		switch (attr) {
+		case hwmon_temp_input:
+			return 0444;
+		default:
+			break;
+		}
+	}
+
+	return 0;
+}
+
+static const struct hwmon_channel_info * const axiado_tsadc_info[] = {
+	HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT),
+	NULL
+};
+
+static const struct hwmon_ops axiado_tsadc_hwmon_ops = {
+	.is_visible = axiado_tsadc_is_visible,
+	.read = axiado_tsadc_read,
+};
+
+static const struct hwmon_chip_info axiado_tsadc_chip_info = {
+	.ops = &axiado_tsadc_hwmon_ops,
+	.info = axiado_tsadc_info,
+};
+
+static void axiado_tsadc_disable(void *data)
+{
+	struct axiado_tsadc *tsadc = data;
+
+	iowrite32(AXIADO_TSADC_DIS, tsadc->regs + AXIADO_TSADC_TSEN_EN);
+	iowrite32(AXIADO_TSADC_DIS, tsadc->regs + AXIADO_TSADC_EN);
+}
+
+static int axiado_tsadc_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct axiado_tsadc *tsadc;
+	struct device *hwmon_dev;
+	struct clk *refclk;
+	int ret;
+
+	tsadc = devm_kzalloc(dev, sizeof(*tsadc), GFP_KERNEL);
+	if (!tsadc)
+		return -ENOMEM;
+
+	tsadc->regs = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(tsadc->regs))
+		return dev_err_probe(dev, PTR_ERR(tsadc->regs),
+				     "failed to map registers\n");
+
+	refclk = devm_clk_get_enabled(dev, NULL);
+	if (IS_ERR(refclk))
+		return dev_err_probe(dev, PTR_ERR(refclk),
+				     "failed to enable reference clock\n");
+
+	/* Mask all interrupts before setup */
+	iowrite32(AXIADO_TSADC_INTR_MASK_ALL, tsadc->regs + AXIADO_TSADC_INTR_MASK);
+
+	iowrite32(AXIADO_TSADC_ANA_REG_INIT, tsadc->regs + AXIADO_TSADC_ANA_REG);
+	iowrite32(AXIADO_TSADC_ENA, tsadc->regs + AXIADO_TSADC_EN);
+	iowrite32(AXIADO_TSADC_SEL_TEMP, tsadc->regs + AXIADO_TSADC_SEL);
+	iowrite32(AXIADO_TSADC_MODE_CONT, tsadc->regs + AXIADO_TSADC_MODE);
+	iowrite32(AXIADO_TSADC_FUNC_CTRL_CLR, tsadc->regs + AXIADO_TSADC_FUNC_CTRL);
+	iowrite32(AXIADO_TSADC_FUNC_CTRL_SET, tsadc->regs + AXIADO_TSADC_FUNC_CTRL);
+
+	/* Enable the bandgap circuit once the block is fully configured */
+	iowrite32(AXIADO_TSADC_ENA, tsadc->regs + AXIADO_TSADC_TSEN_EN);
+
+	ret = devm_add_action_or_reset(dev, axiado_tsadc_disable, tsadc);
+	if (ret)
+		return ret;
+
+	hwmon_dev = devm_hwmon_device_register_with_info(dev, "axiado_tsadc",
+							 tsadc,
+							 &axiado_tsadc_chip_info,
+							 NULL);
+	return PTR_ERR_OR_ZERO(hwmon_dev);
+}
+
+static const struct of_device_id axiado_tsadc_match[] = {
+	{ .compatible = "axiado,ax3000-tsadc" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, axiado_tsadc_match);
+
+static struct platform_driver axiado_tsadc_driver = {
+	.driver = {
+		.name = "axiado-tsadc",
+		.of_match_table	= axiado_tsadc_match,
+	},
+	.probe = axiado_tsadc_probe,
+};
+module_platform_driver(axiado_tsadc_driver);
+
+MODULE_DESCRIPTION("Axiado TSADC temperature sensor driver");
+MODULE_AUTHOR("Axiado Corporation");
+MODULE_LICENSE("GPL");

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] dt-bindings: hwmon: Add Axiado AX3000 TSADC
  2026-09-03  7:09 ` [PATCH 1/2] dt-bindings: hwmon: Add Axiado AX3000 TSADC Petar Stepanovic
@ 2026-09-03  7:14   ` sashiko-bot
  2026-09-03 17:43   ` Conor Dooley
  1 sibling, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-09-03  7:14 UTC (permalink / raw)
  To: Petar Stepanovic; +Cc: devicetree, robh, linux-hwmon, conor+dt

> Add a Devicetree binding for the temperature sensor ADC (TSADC)
> controller found on the Axiado AX3000 and AX3005 SoCs.
> 
> The controller monitors the on-die temperature. An SoC may contain
> multiple TSADC controllers at different locations on the die, each
> represented by a separate Devicetree node.
> 
> AX3005 uses the same programming model as AX3000 and is compatible
> with the AX3000 implementation. Therefore, axiado,ax3000-tsadc is
> used as its fallback compatible.
> 
> Also add a MAINTAINERS entry covering the binding and driver.
> 
> Signed-off-by: Petar Stepanovic <pstepanovic@axiado.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260903-axiado-ax3000-tsadc-v1-0-a8a0f3b251f5@axiado.com?part=1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] hwmon: axiado-tsadc: Add AX3000/AX3005 TSADC support
  2026-09-03  7:09 ` [PATCH 2/2] hwmon: axiado-tsadc: Add AX3000/AX3005 TSADC support Petar Stepanovic
@ 2026-09-03  7:15   ` sashiko-bot
  0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-09-03  7:15 UTC (permalink / raw)
  To: Petar Stepanovic; +Cc: linux-hwmon, conor+dt, robh, devicetree

> Add a hwmon driver for the temperature sensor ADC (TSADC) controller
> found on Axiado AX3000 and AX3005 SoCs. The controller measures
> temperature at locations within the SoC silicon die.
> 
> Each TSADC controller is registered as a separate hwmon device and
> exposes one read-only temperature channel. The sensor is configured for
> continuous conversion during probe.
> 
> The current TSADC hardware does not support threshold or alarm reporting.
> All TSADC interrupt sources are masked during initialization, and only
> the current temperature is exposed through temp1_input.
> 
> The averaged 12-bit ADC code is converted to millidegrees Celsius using
> a lookup table with linear interpolation between adjacent entries. Raw
> values outside the characterized lookup-table range are clamped to the
> nearest supported temperature.
> 
> Signed-off-by: Petar Stepanovic <pstepanovic@axiado.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260903-axiado-ax3000-tsadc-v1-0-a8a0f3b251f5@axiado.com?part=2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] dt-bindings: hwmon: Add Axiado AX3000 TSADC
  2026-09-03  7:09 ` [PATCH 1/2] dt-bindings: hwmon: Add Axiado AX3000 TSADC Petar Stepanovic
  2026-09-03  7:14   ` sashiko-bot
@ 2026-09-03 17:43   ` Conor Dooley
  1 sibling, 0 replies; 6+ messages in thread
From: Conor Dooley @ 2026-09-03 17:43 UTC (permalink / raw)
  To: Petar Stepanovic
  Cc: Akhila Kavi, Prasad Bolisetty, Guenter Roeck, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Tzu-Hao Wei,
	Karthikeyan Mitran, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	linux-hwmon, devicetree, linux-arm-kernel, linux-kernel,
	linux-doc, openbmc

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-03 17:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03  7:09 [PATCH 0/2] hwmon: Add Axiado AX3000 TSADC driver Petar Stepanovic
2026-09-03  7:09 ` [PATCH 1/2] dt-bindings: hwmon: Add Axiado AX3000 TSADC Petar Stepanovic
2026-09-03  7:14   ` sashiko-bot
2026-09-03 17:43   ` Conor Dooley
2026-09-03  7:09 ` [PATCH 2/2] hwmon: axiado-tsadc: Add AX3000/AX3005 TSADC support Petar Stepanovic
2026-09-03  7:15   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox