Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Exynos850 ADC support and soc thermistor
@ 2026-11-25 14:23 Alexey Klimov
  2026-11-25 14:23 ` [PATCH v2 1/5] dt-bindings: iio: adc: samsung,exynos: Add Exynos850 compatible Alexey Klimov
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Alexey Klimov @ 2026-11-25 14:23 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Peter Griffin,
	Alim Akhtar
  Cc: Sam Protsenko, Sam Protsenko, Krzysztof Kozlowski, linux-iio,
	devicetree, linux-arm-kernel, linux-samsung-soc, Conor Dooley

Hi all,

This small series adds support for the ADC block found in the Samsung
Exynos850 SoC and enables the Murata NTC thermistor on the WinLink E850-96
development board.

Exynos850 ADC is also called ADC v3 in downstream but my understanding is
that SoC names are more prefered.
It also relies on PMIC 1.8v regulator which currently represented as a
dummy one.

First commit adds compatible for device tree bindings, the next two add
the ->read_value() callback and Exynos850 support in the driver, and the
last two place things in device tree files for WinLink E850-96 board.

This was tested on mentioned above devboard by reading reported
temperatures from thermistor.

If dts patches should be split out as a separate series and should go
separately please let me know.

Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
Changes in v2:
- split the Exynos850 support patch into two patches: the first one adds
  the ->read_value() callback and the second one adds Exynos850 support;
- added an empty line in adc node before status = "disabled";
- Link to v1: https://lore.kernel.org/r/20261001-exynos850_adc-v1-0-791b3516bb9d@linaro.org

---
Alexey Klimov (5):
      dt-bindings: iio: adc: samsung,exynos: Add Exynos850 compatible
      iio: adc: exynos_adc: add ->read_value() callback
      iio: adc: exynos_adc: add Exynos850 support
      arm64: dts: exynos850: add ADC node
      arm64: dts: exynos850-e850-96: add soc thermistor node

 .../bindings/iio/adc/samsung,exynos-adc.yaml       |  1 +
 arch/arm64/boot/dts/exynos/exynos850-e850-96.dts   | 22 ++++++++
 arch/arm64/boot/dts/exynos/exynos850.dtsi          | 11 ++++
 drivers/iio/adc/exynos_adc.c                       | 66 +++++++++++++++++++++-
 4 files changed, 98 insertions(+), 2 deletions(-)
---
base-commit: 7cfbf79c66c63e807ea452abf0546e6f6d6833a6
change-id: 20261118-exynos850_adc-9cfe569acd8a

Best regards,
-- 
Alexey Klimov <alexey.klimov@linaro.org>


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

* [PATCH v2 1/5] dt-bindings: iio: adc: samsung,exynos: Add Exynos850 compatible
  2026-11-25 14:23 [PATCH v2 0/5] Exynos850 ADC support and soc thermistor Alexey Klimov
@ 2026-11-25 14:23 ` Alexey Klimov
  2026-11-25 14:23 ` [PATCH v2 2/5] iio: adc: exynos_adc: add ->read_value() callback Alexey Klimov
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Alexey Klimov @ 2026-11-25 14:23 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Peter Griffin,
	Alim Akhtar
  Cc: Sam Protsenko, Sam Protsenko, Krzysztof Kozlowski, linux-iio,
	devicetree, linux-arm-kernel, linux-samsung-soc, Conor Dooley

The Exynos850 SoC contains an ADC block within the CMGP block.
While similar to existing Exynos ADC v2 blocks, its data register is
located at a different base offset (0x08) hence a new compatible.

Add "samsung,exynos850-adc" to the devicetree bindings to differentiate
it from existing Exynos ADC variants.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
 Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
index def879f6ed20..90a220e3b78d 100644
--- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
@@ -18,6 +18,7 @@ properties:
           - samsung,exynos3250-adc
           - samsung,exynos4212-adc                # Exynos4212 and Exynos4412
           - samsung,exynos7-adc
+          - samsung,exynos850-adc
           - samsung,s3c6410-adc
           - samsung,s5pv210-adc
       - items:

-- 
2.53.0


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

* [PATCH v2 2/5] iio: adc: exynos_adc: add ->read_value() callback
  2026-11-25 14:23 [PATCH v2 0/5] Exynos850 ADC support and soc thermistor Alexey Klimov
  2026-11-25 14:23 ` [PATCH v2 1/5] dt-bindings: iio: adc: samsung,exynos: Add Exynos850 compatible Alexey Klimov
@ 2026-11-25 14:23 ` Alexey Klimov
  2026-11-25 14:23 ` [PATCH v2 3/5] iio: adc: exynos_adc: add Exynos850 support Alexey Klimov
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Alexey Klimov @ 2026-11-25 14:23 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Peter Griffin,
	Alim Akhtar
  Cc: Sam Protsenko, Sam Protsenko, Krzysztof Kozlowski, linux-iio,
	devicetree, linux-arm-kernel, linux-samsung-soc

The ADC data register offset differs between SoCs. In preparation for
adding Exynos850 support, abstract reading the conversion result into a
->read_value() callback in struct exynos_adc_data.

Add exynos_adc_v1_read_value() for the existing SoCs and use it from the
interrupt handler. No functional change intended.

Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
 drivers/iio/adc/exynos_adc.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index c1a0061b16ca..a1124a418f29 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -133,6 +133,7 @@ struct exynos_adc_data {
 	void (*exit_hw)(struct exynos_adc *info);
 	void (*clear_irq)(struct exynos_adc *info);
 	void (*start_conv)(struct exynos_adc *info, unsigned long addr);
+	u32 (*read_value)(struct exynos_adc *info);
 };
 
 static void exynos_adc_unprepare_clk(struct exynos_adc *info)
@@ -195,6 +196,11 @@ static int exynos_adc_enable_clk(struct exynos_adc *info)
 	return 0;
 }
 
+static u32 exynos_adc_v1_read_value(struct exynos_adc *info)
+{
+	return readl(ADC_V1_DATX(info->regs)) & info->data->mask;
+}
+
 static void exynos_adc_v1_init_hw(struct exynos_adc *info)
 {
 	u32 con1;
@@ -252,6 +258,7 @@ static const struct exynos_adc_data exynos4212_adc_data = {
 	.exit_hw	= exynos_adc_v1_exit_hw,
 	.clear_irq	= exynos_adc_v1_clear_irq,
 	.start_conv	= exynos_adc_v1_start_conv,
+	.read_value	= exynos_adc_v1_read_value,
 };
 
 static const struct exynos_adc_data exynos_adc_v1_data = {
@@ -264,6 +271,7 @@ static const struct exynos_adc_data exynos_adc_v1_data = {
 	.exit_hw	= exynos_adc_v1_exit_hw,
 	.clear_irq	= exynos_adc_v1_clear_irq,
 	.start_conv	= exynos_adc_v1_start_conv,
+	.read_value	= exynos_adc_v1_read_value,
 };
 
 static const struct exynos_adc_data exynos_adc_s5pv210_data = {
@@ -274,6 +282,7 @@ static const struct exynos_adc_data exynos_adc_s5pv210_data = {
 	.exit_hw	= exynos_adc_v1_exit_hw,
 	.clear_irq	= exynos_adc_v1_clear_irq,
 	.start_conv	= exynos_adc_v1_start_conv,
+	.read_value	= exynos_adc_v1_read_value,
 };
 
 static void exynos_adc_s3c64xx_start_conv(struct exynos_adc *info,
@@ -295,6 +304,7 @@ static struct exynos_adc_data const exynos_adc_s3c64xx_data = {
 	.exit_hw	= exynos_adc_v1_exit_hw,
 	.clear_irq	= exynos_adc_v1_clear_irq,
 	.start_conv	= exynos_adc_s3c64xx_start_conv,
+	.read_value	= exynos_adc_v1_read_value,
 };
 
 static void exynos_adc_v2_init_hw(struct exynos_adc *info)
@@ -356,6 +366,7 @@ static const struct exynos_adc_data exynos_adc_v2_data = {
 	.exit_hw	= exynos_adc_v2_exit_hw,
 	.clear_irq	= exynos_adc_v2_clear_irq,
 	.start_conv	= exynos_adc_v2_start_conv,
+	.read_value	= exynos_adc_v1_read_value,
 };
 
 static const struct exynos_adc_data exynos3250_adc_data = {
@@ -369,6 +380,7 @@ static const struct exynos_adc_data exynos3250_adc_data = {
 	.exit_hw	= exynos_adc_v2_exit_hw,
 	.clear_irq	= exynos_adc_v2_clear_irq,
 	.start_conv	= exynos_adc_v2_start_conv,
+	.read_value	= exynos_adc_v1_read_value,
 };
 
 static void exynos_adc_exynos7_init_hw(struct exynos_adc *info)
@@ -395,6 +407,7 @@ static const struct exynos_adc_data exynos7_adc_data = {
 	.exit_hw	= exynos_adc_v2_exit_hw,
 	.clear_irq	= exynos_adc_v2_clear_irq,
 	.start_conv	= exynos_adc_v2_start_conv,
+	.read_value	= exynos_adc_v1_read_value,
 };
 
 static const struct of_device_id exynos_adc_match[] = {
@@ -484,10 +497,9 @@ static int exynos_read_raw(struct iio_dev *indio_dev,
 static irqreturn_t exynos_adc_isr(int irq, void *dev_id)
 {
 	struct exynos_adc *info = dev_id;
-	u32 mask = info->data->mask;
 
 	/* Read value */
-	info->value = readl(ADC_V1_DATX(info->regs)) & mask;
+	info->value = info->data->read_value(info);
 
 	/* clear irq */
 	if (info->data->clear_irq)

-- 
2.53.0


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

* [PATCH v2 3/5] iio: adc: exynos_adc: add Exynos850 support
  2026-11-25 14:23 [PATCH v2 0/5] Exynos850 ADC support and soc thermistor Alexey Klimov
  2026-11-25 14:23 ` [PATCH v2 1/5] dt-bindings: iio: adc: samsung,exynos: Add Exynos850 compatible Alexey Klimov
  2026-11-25 14:23 ` [PATCH v2 2/5] iio: adc: exynos_adc: add ->read_value() callback Alexey Klimov
@ 2026-11-25 14:23 ` Alexey Klimov
  2026-11-25 14:23 ` [PATCH v2 4/5] arm64: dts: exynos850: add ADC node Alexey Klimov
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Alexey Klimov @ 2026-11-25 14:23 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Peter Griffin,
	Alim Akhtar
  Cc: Sam Protsenko, Sam Protsenko, Krzysztof Kozlowski, linux-iio,
	devicetree, linux-arm-kernel, linux-samsung-soc

The Exynos850 ADC controller located inside the CMGP block differs from
other Exynos ADC controllers, mainly in its register layout.
Specifically, the data register sits at offset 0x08.

Add the exynos850_adc_data struct that describes Exynos850 ADC ops.
It also requires its own hardware initialization and exit routines.
Add them as well.

Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
 drivers/iio/adc/exynos_adc.c | 50 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index a1124a418f29..3e9b5d28b922 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -46,6 +46,8 @@
 #define ADC_V2_INT_ST(x)	((x) + 0x14)
 #define ADC_V2_VER(x)		((x) + 0x20)
 
+#define ADC_EXYNOS850_DAT(x)	((x) + 0x08)
+
 /* Bit definitions for ADC_V1 */
 #define ADC_V1_CON_RES		(1u << 16)
 #define ADC_V1_CON_PRSCEN	(1u << 14)
@@ -410,6 +412,51 @@ static const struct exynos_adc_data exynos7_adc_data = {
 	.read_value	= exynos_adc_v1_read_value,
 };
 
+static void exynos850_adc_init_hw(struct exynos_adc *info)
+{
+	u32 con1, con2;
+
+	con1 = ADC_V2_CON1_SOFT_RESET;
+	writel(con1, ADC_V2_CON1(info->regs));
+
+	/* Bring out of reset */
+	writel(0, ADC_V2_CON1(info->regs));
+
+	/* 64 times conversion */
+	con2 = ADC_V2_CON2_C_TIME(6);
+	writel(con2, ADC_V2_CON2(info->regs));
+
+	writel(1, ADC_V2_INT_EN(info->regs));
+}
+
+static void exynos850_adc_exit_hw(struct exynos_adc *info)
+{
+	u32 con2;
+
+	con2 = readl(ADC_V2_CON2(info->regs));
+	con2 &= ~ADC_V2_CON2_C_TIME(7);
+	writel(con2, ADC_V2_CON2(info->regs));
+
+	writel(0, ADC_V2_INT_EN(info->regs));
+}
+
+static u32 exynos850_adc_read_value(struct exynos_adc *info)
+{
+	return readl(ADC_EXYNOS850_DAT(info->regs)) & info->data->mask;
+}
+
+static const struct exynos_adc_data exynos850_adc_data = {
+	.num_channels	= MAX_ADC_V2_CHANNELS,
+	.mask		= ADC_DATX_MASK, /* 12 bit ADC resolution */
+	.needs_adc_phy	= false,
+
+	.init_hw	= exynos850_adc_init_hw,
+	.exit_hw	= exynos850_adc_exit_hw,
+	.clear_irq	= exynos_adc_v2_clear_irq,
+	.start_conv	= exynos_adc_v2_start_conv,
+	.read_value	= exynos850_adc_read_value,
+};
+
 static const struct of_device_id exynos_adc_match[] = {
 	{
 		.compatible = "samsung,s3c6410-adc",
@@ -432,6 +479,9 @@ static const struct of_device_id exynos_adc_match[] = {
 	}, {
 		.compatible = "samsung,exynos7-adc",
 		.data = &exynos7_adc_data,
+	}, {
+		.compatible = "samsung,exynos850-adc",
+		.data = &exynos850_adc_data,
 	},
 	{ }
 };

-- 
2.53.0


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

* [PATCH v2 4/5] arm64: dts: exynos850: add ADC node
  2026-11-25 14:23 [PATCH v2 0/5] Exynos850 ADC support and soc thermistor Alexey Klimov
                   ` (2 preceding siblings ...)
  2026-11-25 14:23 ` [PATCH v2 3/5] iio: adc: exynos_adc: add Exynos850 support Alexey Klimov
@ 2026-11-25 14:23 ` Alexey Klimov
  2026-11-25 14:23 ` [PATCH v2 5/5] arm64: dts: exynos850-e850-96: add soc thermistor node Alexey Klimov
  2026-11-25 19:31 ` [PATCH v2 0/5] Exynos850 ADC support and soc thermistor Adil Hüsrev Tepe
  5 siblings, 0 replies; 9+ messages in thread
From: Alexey Klimov @ 2026-11-25 14:23 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Peter Griffin,
	Alim Akhtar
  Cc: Sam Protsenko, Sam Protsenko, Krzysztof Kozlowski, linux-iio,
	devicetree, linux-arm-kernel, linux-samsung-soc

Exynos850 SoC has the ADC controller within CMGP (common GPIO) block.
Add DT node that describes it.

Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
 arch/arm64/boot/dts/exynos/exynos850.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos850.dtsi b/arch/arm64/boot/dts/exynos/exynos850.dtsi
index ace747fa80c4..feac3ebc4de9 100644
--- a/arch/arm64/boot/dts/exynos/exynos850.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos850.dtsi
@@ -354,6 +354,17 @@ cmu_cmgp: clock-controller@11c00000 {
 			clock-names = "oscclk", "gout_clkcmu_cmgp_bus";
 		};
 
+		exynos_adc: adc@11c40000 {
+			compatible = "samsung,exynos850-adc";
+			reg = <0x11c40000 0x100>;
+			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+			#io-channel-cells = <1>;
+			clocks = <&cmu_cmgp CLK_GOUT_CMGP_ADC_S0_PCLK>;
+			clock-names = "adc";
+
+			status = "disabled";
+		};
+
 		cmu_core: clock-controller@12000000 {
 			compatible = "samsung,exynos850-cmu-core";
 			reg = <0x12000000 0x8000>;

-- 
2.53.0


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

* [PATCH v2 5/5] arm64: dts: exynos850-e850-96: add soc thermistor node
  2026-11-25 14:23 [PATCH v2 0/5] Exynos850 ADC support and soc thermistor Alexey Klimov
                   ` (3 preceding siblings ...)
  2026-11-25 14:23 ` [PATCH v2 4/5] arm64: dts: exynos850: add ADC node Alexey Klimov
@ 2026-11-25 14:23 ` Alexey Klimov
  2026-11-25 19:31 ` [PATCH v2 0/5] Exynos850 ADC support and soc thermistor Adil Hüsrev Tepe
  5 siblings, 0 replies; 9+ messages in thread
From: Alexey Klimov @ 2026-11-25 14:23 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Peter Griffin,
	Alim Akhtar
  Cc: Sam Protsenko, Sam Protsenko, Krzysztof Kozlowski, linux-iio,
	devicetree, linux-arm-kernel, linux-samsung-soc

The WinLink E850-96 board has a Murata NCP03WF104 NTC thermistor placed
near the SoC package die and connected to channel 0 of the CMGP ADC.

Enable the ADC node, define a dummy 1.8V regulator supply for ADC, and
add the board-level thermistor node linked to channel 0 of exynos_adc.
Regulator is represented as a dummy one because we lack PMIC support and
should be replaced with a real one when PMIC support will be implemented.

Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
 arch/arm64/boot/dts/exynos/exynos850-e850-96.dts | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos850-e850-96.dts b/arch/arm64/boot/dts/exynos/exynos850-e850-96.dts
index afef32ad4ee2..1abae8b9fa49 100644
--- a/arch/arm64/boot/dts/exynos/exynos850-e850-96.dts
+++ b/arch/arm64/boot/dts/exynos/exynos850-e850-96.dts
@@ -126,6 +126,14 @@ reg_dummy: regulator-0 {
 		regulator-name = "dummy_reg";
 	};
 
+	/* TODO: Remove this once PMIC is implemented  */
+	vdd_1v8_dummy: regulator-1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "vdd_1v8_dummy";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+
 	reg_usb_host_vbus: regulator-1 {
 		compatible = "regulator-fixed";
 		regulator-name = "usb_host_vbus";
@@ -166,6 +174,20 @@ rtcclk: clock-rtcclk {
 		#clock-cells = <0>;
 		clock-frequency = <32768>;
 	};
+
+	thermistor-soc {
+		compatible = "murata,ncp03wf104";
+		pullup-uv = <1800000>;
+		pullup-ohm = <100000>;
+		pulldown-ohm = <0>;
+		io-channels = <&exynos_adc 0>;
+		#thermal-sensor-cells = <0>;
+	};
+};
+
+&exynos_adc {
+	status = "okay";
+	vdd-supply = <&vdd_1v8_dummy>;
 };
 
 &cmu_hsi {

-- 
2.53.0


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

* Re: [PATCH v2 0/5] Exynos850 ADC support and soc thermistor
  2026-11-25 14:23 [PATCH v2 0/5] Exynos850 ADC support and soc thermistor Alexey Klimov
                   ` (4 preceding siblings ...)
  2026-11-25 14:23 ` [PATCH v2 5/5] arm64: dts: exynos850-e850-96: add soc thermistor node Alexey Klimov
@ 2026-11-25 19:31 ` Adil Hüsrev Tepe
  2026-11-26  1:41   ` Jonathan Cameron
  2026-11-26 16:23   ` Alexey Klimov
  5 siblings, 2 replies; 9+ messages in thread
From: Adil Hüsrev Tepe @ 2026-11-25 19:31 UTC (permalink / raw)
  To: Alexey Klimov
  Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Peter Griffin,
	Alim Akhtar, Sam Protsenko, Krzysztof Kozlowski, linux-iio,
	devicetree, linux-arm-kernel, linux-samsung-soc

On Wed, Nov 25, 2026 at 02:23:32PM +0000, Alexey Klimov wrote:
> This small series adds support for the ADC block found in the Samsung
> Exynos850 SoC and enables the Murata NTC thermistor on the WinLink E850-96
> development board.

I tested patches 1-3 on a Samsung Galaxy XCover5 (SM-G525F, Exynos850),
with an ADC node equivalent to patch 4 (same reg, interrupt and clock)
and the board's three NTC channels.
Readings match what I get with the vendor-style sequence (re-init around
every conversion, SOFT_NON_RESET after reset) to 1-2 LSB on the static
channels, the NTC channels follow the temperature, and 200 back-to-back
reads per channel show no stale values. So initialising once at probe
works fine here.

One small thing: channels 8 and 9 always read 0. The downstream driver
uses 8 channels for this SoC, so MAX_ADC_V2_CHANNELS (10) may expose two
channels that don't exist.

For patches 1-3:
Tested-by: Adil Hüsrev Tepe <tadilhusrev@gmail.com>

Adil

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

* Re: [PATCH v2 0/5] Exynos850 ADC support and soc thermistor
  2026-11-25 19:31 ` [PATCH v2 0/5] Exynos850 ADC support and soc thermistor Adil Hüsrev Tepe
@ 2026-11-26  1:41   ` Jonathan Cameron
  2026-11-26 16:23   ` Alexey Klimov
  1 sibling, 0 replies; 9+ messages in thread
From: Jonathan Cameron @ 2026-11-26  1:41 UTC (permalink / raw)
  To: Adil Hüsrev Tepe
  Cc: Alexey Klimov, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Peter Griffin,
	Alim Akhtar, Sam Protsenko, Krzysztof Kozlowski, linux-iio,
	devicetree, linux-arm-kernel, linux-samsung-soc

On Wed, 25 Nov 2026 22:31:23 +0300
Adil Hüsrev Tepe <tadilhusrev@gmail.com> wrote:

> On Wed, Nov 25, 2026 at 02:23:32PM +0000, Alexey Klimov wrote:
> > This small series adds support for the ADC block found in the Samsung
> > Exynos850 SoC and enables the Murata NTC thermistor on the WinLink E850-96
> > development board.  
> 
> I tested patches 1-3 on a Samsung Galaxy XCover5 (SM-G525F, Exynos850),
> with an ADC node equivalent to patch 4 (same reg, interrupt and clock)
> and the board's three NTC channels.
> Readings match what I get with the vendor-style sequence (re-init around
> every conversion, SOFT_NON_RESET after reset) to 1-2 LSB on the static
> channels, the NTC channels follow the temperature, and 200 back-to-back
> reads per channel show no stale values. So initialising once at probe
> works fine here.
> 
> One small thing: channels 8 and 9 always read 0. The downstream driver
> uses 8 channels for this SoC, so MAX_ADC_V2_CHANNELS (10) may expose two
> channels that don't exist.

Other than that thing to chase down this looks fine to me.  So I'll wait
for Alexey to confirm if the magic channel pair exist before picking it up ;)

Thanks for testing!

Jonathan

> 
> For patches 1-3:
> Tested-by: Adil Hüsrev Tepe <tadilhusrev@gmail.com>
> 
> Adil
> 


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

* Re: [PATCH v2 0/5] Exynos850 ADC support and soc thermistor
  2026-11-25 19:31 ` [PATCH v2 0/5] Exynos850 ADC support and soc thermistor Adil Hüsrev Tepe
  2026-11-26  1:41   ` Jonathan Cameron
@ 2026-11-26 16:23   ` Alexey Klimov
  1 sibling, 0 replies; 9+ messages in thread
From: Alexey Klimov @ 2026-11-26 16:23 UTC (permalink / raw)
  To: Adil Hüsrev Tepe
  Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Peter Griffin,
	Alim Akhtar, Sam Protsenko, Krzysztof Kozlowski, linux-iio,
	devicetree, linux-arm-kernel, linux-samsung-soc

Hi Adil,

On Wed Nov 25, 2026 at 7:31 PM GMT, Adil Hüsrev Tepe wrote:
> On Wed, Nov 25, 2026 at 02:23:32PM +0000, Alexey Klimov wrote:
>> This small series adds support for the ADC block found in the Samsung
>> Exynos850 SoC and enables the Murata NTC thermistor on the WinLink E850-96
>> development board.
>
> I tested patches 1-3 on a Samsung Galaxy XCover5 (SM-G525F, Exynos850),
> with an ADC node equivalent to patch 4 (same reg, interrupt and clock)
> and the board's three NTC channels.
> Readings match what I get with the vendor-style sequence (re-init around
> every conversion, SOFT_NON_RESET after reset) to 1-2 LSB on the static
> channels, the NTC channels follow the temperature, and 200 back-to-back
> reads per channel show no stale values. So initialising once at probe
> works fine here.
>
> One small thing: channels 8 and 9 always read 0. The downstream driver
> uses 8 channels for this SoC, so MAX_ADC_V2_CHANNELS (10) may expose two
> channels that don't exist.
>
> For patches 1-3:
> Tested-by: Adil Hüsrev Tepe <tadilhusrev@gmail.com>

Thank you for the testing!

Regarding number of channels. The Exynos850 spec says that ADC has 10
channels and, looking at the registers, the ADC_CON2 register (offset 0x4)
lists 10 channels as acceptable ones.
ACH_SEL bits [3:0] field in this register wants to see numbers from 0b0000
to 0b1001 (from 0 to 9) and lists numbers 1010 to 1111 as "Reserved".

So, I tend to say it is fine to have it set to 10 if it doesn't trigger
any hw issues.

Best regards,
Alexey

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

end of thread, other threads:[~2026-11-26 16:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 14:23 [PATCH v2 0/5] Exynos850 ADC support and soc thermistor Alexey Klimov
2026-11-25 14:23 ` [PATCH v2 1/5] dt-bindings: iio: adc: samsung,exynos: Add Exynos850 compatible Alexey Klimov
2026-11-25 14:23 ` [PATCH v2 2/5] iio: adc: exynos_adc: add ->read_value() callback Alexey Klimov
2026-11-25 14:23 ` [PATCH v2 3/5] iio: adc: exynos_adc: add Exynos850 support Alexey Klimov
2026-11-25 14:23 ` [PATCH v2 4/5] arm64: dts: exynos850: add ADC node Alexey Klimov
2026-11-25 14:23 ` [PATCH v2 5/5] arm64: dts: exynos850-e850-96: add soc thermistor node Alexey Klimov
2026-11-25 19:31 ` [PATCH v2 0/5] Exynos850 ADC support and soc thermistor Adil Hüsrev Tepe
2026-11-26  1:41   ` Jonathan Cameron
2026-11-26 16:23   ` Alexey Klimov

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