From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2DC953A963E for ; Mon, 13 Jul 2026 08:12:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783930331; cv=none; b=Y9qOyFasH3TbgfuVtQW/L7kzefY3/xbqgW+5ljY8lDyyyXNZqrggFcpiOwxWjRfq8kPiRfBQRmhdSLH4k78joBomuEb+PrA2tkgs8gxO6Cd9hhDPORZMAz2E5z6o2UTju+jn2Xam+NEHSF6DydzCRvTSWJ9kFNPEXPg02hVrxbE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783930331; c=relaxed/simple; bh=gAwrYaW8vCsSAnNCmcchp0PHhs5DGs2/EkBdFCJYnAc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jbx57Pfr31q1igOUia1GQK3mBIACX3KbFOOJ0/+uwurvnswhQnKwPWJReEhEcxl/cbo5Y0b3G5MLAF3tTkL174CEUmEiZKp7KKvJANUJsDsD8c5Z+htG1RMElIArO6Lp1Ltr60HcLhuuyZ9cFtkb39xSRI1TK8zPxuTuVFbkkLg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CO9nszE6; arc=none smtp.client-ip=209.85.216.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CO9nszE6" Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-38dcbade417so1220313a91.1 for ; Mon, 13 Jul 2026 01:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783930329; x=1784535129; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=eO0942WY587PlgQYOqbKcvLrhgs/k5YOSOmJGEVN3qc=; b=CO9nszE64xhN8Ol1AA4n8cbGm7Pi/b0YrPWkTiAE0Xc0NGtf8ytpwHt0mSXbaqqpJL 6ja6Ptb3WOjo4doFxOmqFc/R7Ezo3YRiTOmDy93hALFQm6d+HD9ykbpe57AavahXbuq6 /kIhN1KSLDAW1jPbNQStscH2qKaC8orae0yoAGW5FdxPLalAma8qyhpLGG2KyjVyH4Yl gfn81xLlTeMpCqqz7JeYTtUDrby4zQrjD8HzvyK8FJYAPjwjdjLOhl0KUgtyaVECq9SW WmzrunXJosjfHwEn6JyRj9pteKboBdp5KRzyil6X7KavJ9CqWEkoO2HZ4HcExdVjzjqF UJuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783930329; x=1784535129; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=eO0942WY587PlgQYOqbKcvLrhgs/k5YOSOmJGEVN3qc=; b=fvWpA4qHKqwBa3gst9yHfliQI4tfcD/nDMxM+PLEZxSXLaWPC1ZFxLcSf+m7KxiquL XClPHVhcycIHrHiSTWUxkV9ZuWDX80D7W/0UPA5DjBPVjPg5Tf5/fKOK4ZaR7+MpAZfW miMtvCOHA7E9CabZRl6COuClCjpQsY2Yp12I1Wxq5ZC+ieMNkU2Zp3HpwCTq4plsJeAo hcuO3FN0qaSy860tQG/m/n31NlGpAyFwIhgC9ySO12Tlnl06CjgVecCG/98UU1tGkS7M PooubeXPkY1yYAocfn3DCTywzY6+VWSXZw0QwnHqgitWkLjU9HmxkKOjbamFiK0DbUmG gefw== X-Forwarded-Encrypted: i=1; AHgh+RqDsq1etFtSpNOqMF5rpnmHf9pITqC8jP/aHmcFijjpE2L+QHFCiu5UL7e4v61Yn3lHstqSEUL9TmRC3V8=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5AGjXFcbY2kSjjpa654cafA5MRRPnhXKkkd70+aYHowf8jnnY ycy8K6e+eTMZtv+5xQlNp6g7uNNOqF1LNb3RHJfqd1eFW5tpLNYmKrAi X-Gm-Gg: AfdE7clliGvGA2M8YW7Bznq/oRKlXAHSQlOk7bhXbYJ1S6E+lmSDvwtXJ7w/LzK7H9z YTz3/EM+wTvGKzLfQ7i0XspOtqnhaSvGLk1mVpH048B5MdLcmU1d0p+9Z3ww/DOiMKqEk5tLLR0 dfF2K8CzJBzF+HftdJ5dtbKq2U2XYOWGtAHYst6x/3L5sserImqDLggXqN1l+dsHfoiywvW7FoH ByzDSSgCo/TfHQq9kxF3VzPDnH4xpqmtSLB/Hkbydg+STmLg3PQMxyCbzzH4R3QYvPtznEwkvBv GU6IH2QT2D9IIXjrbMSJmYBsdopOeqLD2zOOhKTxToH5029MbHpwE6KkjHoQ9cXn1qBTSUDdT9a i/2CxjzUSX5/gThmRWwPd00jeDYY3nlXVOL8zR910mvwbBUbj+yGhBJK+/eaAeRLwZYi2c56bJD 92zI2Ya11Lje4rfChzFervpPhFoylxrH3L2Oi2VUMr7ZV8uDKJtpkCSOoTijcdwD4FwmjOb31aK EM= X-Received: by 2002:a17:90b:2f47:b0:389:8f6c:4d70 with SMTP id 98e67ed59e1d1-38dc77f74d5mr7473535a91.28.1783930329361; Mon, 13 Jul 2026 01:12:09 -0700 (PDT) Received: from localhost.localdomain (60-250-196-139.hinet-ip.hinet.net. [60.250.196.139]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38e0e033de6sm269636a91.13.2026.07.13.01.12.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 01:12:08 -0700 (PDT) From: Chi-Wen Weng To: jic23@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, cwweng@nuvoton.com, cwweng.linux@gmail.com Subject: [PATCH v2 1/2] dt-bindings: iio: adc: Add Nuvoton MA35D1 EADC Date: Mon, 13 Jul 2026 16:11:26 +0800 Message-Id: <20260713081127.115197-2-cwweng.linux@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260713081127.115197-1-cwweng.linux@gmail.com> References: <20260713081127.115197-1-cwweng.linux@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chi-Wen Weng Add devicetree binding for the Enhanced ADC controller found on Nuvoton MA35D1 SoCs. The controller has one register region, up to four end-of-conversion interrupts, one functional clock, and an optional reset line. The binding also describes the optional external reference supply and the optional DMA request supported by the hardware. ADC input pins are described using standard channel child nodes. The external ADC input channels are 0 to 7. Differential inputs are described with diff-channels and are limited to the fixed hardware pairs. Signed-off-by: Chi-Wen Weng --- .../bindings/iio/adc/nuvoton,ma35d1-eadc.yaml | 163 ++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/nuvoton,ma35d1-eadc.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,ma35d1-eadc.yaml b/Documentation/devicetree/bindings/iio/adc/nuvoton,ma35d1-eadc.yaml new file mode 100644 index 000000000000..1be5470643d1 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/nuvoton,ma35d1-eadc.yaml @@ -0,0 +1,163 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/nuvoton,ma35d1-eadc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton MA35D1 Enhanced Analog to Digital Converter + +maintainers: + - Chi-Wen Weng + +description: + The Nuvoton MA35D1 Enhanced Analog to Digital Converter is a 12-bit + ADC controller with 8 external input channels, 4 fixed differential + input pairs and 1 internal VBAT input. Board wired ADC inputs are + described using channel child nodes. + +properties: + compatible: + const: nuvoton,ma35d1-eadc + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 4 + items: + - description: ADINT0 end-of-conversion interrupt + - description: ADINT1 end-of-conversion interrupt + - description: ADINT2 end-of-conversion interrupt + - description: ADINT3 end-of-conversion interrupt + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + vref-supply: + description: + External reference voltage supply connected to the VREF pin. If this + property is omitted, the internal 1.6 V reference is used. + + dmas: + maxItems: 1 + + dma-names: + const: rx + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +patternProperties: + '^channel@[0-7]$': + type: object + $ref: adc.yaml + unevaluatedProperties: false + + properties: + reg: + maximum: 7 + + diff-channels: true + + allOf: + - if: + properties: + reg: + const: 0 + then: + properties: + diff-channels: + items: + - const: 0 + - const: 4 + - if: + properties: + reg: + const: 1 + then: + properties: + diff-channels: + items: + - const: 1 + - const: 5 + - if: + properties: + reg: + const: 2 + then: + properties: + diff-channels: + items: + - const: 2 + - const: 6 + - if: + properties: + reg: + const: 3 + then: + properties: + diff-channels: + items: + - const: 3 + - const: 7 + - if: + properties: + reg: + enum: [4, 5, 6, 7] + then: + not: + required: + - diff-channels + + required: + - reg + +required: + - compatible + - reg + - interrupts + - clocks + - '#address-cells' + - '#size-cells' + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + adc@40430000 { + compatible = "nuvoton,ma35d1-eadc"; + reg = <0x0 0x40430000 0x0 0x10000>; + interrupts = ; + clocks = <&clk EADC_GATE>; + resets = <&reset MA35D1_RESET_EADC0>; + + #address-cells = <1>; + #size-cells = <0>; + + channel@0 { + reg = <0>; + }; + + channel@2 { + reg = <2>; + diff-channels = <2 6>; + }; + }; + }; +... -- 2.25.1