Re: [PATCH v4 1/2] dt-bindings: iio: adc: Add the Ingenic X1600 ADC
From: H. Nikolaus Schaller
Date: Thu Nov 05 2026 - 08:21:40 EST
> Am 05.11.2026 um 10:57 schrieb H. Nikolaus Schaller <hns@xxxxxxxxxxxxx>:
>
> Hi Olivier, Conor,
>
>> Am 02.11.2026 um 21:48 schrieb Conor Dooley <conor@xxxxxxxxxx>:
>>
>> On Mon, Nov 02, 2026 at 09:11:54PM +0100, Olivier Louvignes wrote:
>>> The X1600's SAR ADC has four auxiliary channels and none of the
>>> touchscreen or battery engines of the JZ47xx ADCs in ingenic,adc.yaml,
>>> so it gets a binding of its own.
>>>
>>> Signed-off-by: Olivier Louvignes <olivier@xxxxxxxxx>
>>> ---
>>> .../bindings/iio/adc/ingenic,x1600-adc.yaml | 53 +++++++++++++++++++
>>> MAINTAINERS | 5 ++
>>> 2 files changed, 58 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/iio/adc/ingenic,x1600-adc.yaml
one more:
why not call it x1600-sadc as in the documentation of the chip vendor?
>>>
>>> diff --git a/Documentation/devicetree/bindings/iio/adc/ingenic,x1600-adc.yaml b/Documentation/devicetree/bindings/iio/adc/ingenic,x1600-adc.yaml
>>> new file mode 100644
>>> index 000000000000..f6356ea97980
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/iio/adc/ingenic,x1600-adc.yaml
>>> @@ -0,0 +1,53 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/iio/adc/ingenic,x1600-adc.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Ingenic X1600 ADC
>>> +
>>> +maintainers:
>>> + - Olivier Louvignes <olivier@xxxxxxxxx>
>>> +
>>> +description:
>>> + The SAR ADC of the Ingenic X1600 SoC, with four auxiliary input channels
>>> + measured against a 3.3 V reference.
>>
>> The wording here makes me wonder if a 3v3 supply is missing here? Or is
>> this some internal supply on the soc?
>
> It is an external SADC_VREFP input pin (ball P12) which is usually connected to
> the 3v3 supply. But it is specified to be min=0V .. typical=3.3V ... max=VADC
> voltage levels.
>
> VADC is indeed the power supply for the SADC on a separate ball. It must
> be in the range of 2.97V .. 3.3V .. 3.63V so that it is extremely likely to be
> connected to the system 3.3V rail.
>
> Therefore I do not see a necessity to require a separate regulator reference here.
>
> I would suggest:
>
> The SAR ADC of the Ingenic X1600 SoC, with four auxiliary input channels
> measured against an external SADC_VREFP reference (typically 3.3 V).
>
>>
>> Otherwise, this looks fine really.
>>
>>> +
>>> +properties:
>>> + compatible:
>>> + const: ingenic,x1600-adc
same here.
>>> +
>>> + reg:
>>> + maxItems: 1
>>> +
>>> + clocks:
>>> + maxItems: 1
>>> +
>>> + interrupts:
>>> + maxItems: 1
>>> +
>>> + '#io-channel-cells':
>>> + const: 1
>>> +
>>> +required:
>>> + - compatible
>>> + - reg
>>> + - clocks
>>> + - interrupts
>>> + - '#io-channel-cells'
>>> +
>>> +additionalProperties: false
>>> +
>>> +examples:
>>> + - |
>>> + adc@10070000 {
>>> + compatible = "ingenic,x1600-adc";
>>> + reg = <0x10070000 0x30>;
>>
>> That said, the 0x30 looks suspiciously small - but the region is aligned
>> neatly so I suppose it's probably not problematic..
The last register offset used is ADRETM at base + 0x0028. So it will fit.
On the other hand the programming manual defines
1.3 IO Devices Physical Memory Map
Module Start Addr End Address Description
SADC 0x10070000 0x10070FFFSAR A/D Controller
>>
>> Cheers,
>> Conor.
>>
>>> +
>>> + clocks = <&cgu 28>;
>>> +
>>> + interrupt-parent = <&intc>;
>>> + interrupts = <11>;
>>> +
>>> + #io-channel-cells = <1>;
>>> + };
>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>> index ecc22d1149d1..fd4bb5c6bf16 100644
>>> --- a/MAINTAINERS
>>> +++ b/MAINTAINERS
>>> @@ -12925,6 +12925,11 @@ F: include/linux/mfd/ingenic-tcu.h
>>> F: sound/soc/codecs/jz47*
>>> F: sound/soc/jz4740/
>>>
>>> +INGENIC X1600 ADC DRIVER
>>> +M: Olivier Louvignes <olivier@xxxxxxxxx>
>>> +S: Maintained
>>> +F: Documentation/devicetree/bindings/iio/adc/ingenic,x1600-adc.yaml
>>> +
>>> INJOINIC IP5xxx POWER BANK IC DRIVER
>>> M: Samuel Holland <samuel@xxxxxxxxxxxx>
>>> S: Maintained
>>> --
>>> 2.54.0
>>>
>
> BR and thanks,
> Nikolaus