From nobody Wed Dec 17 12:25:55 2025 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A68A24DD00; Sun, 5 Oct 2025 11:14:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759662894; cv=none; b=tHzUsvgxEbzyUIcKSngaXjYcLGW3Z3tbV5udR50sQOQM3hpoRMvkQc8/Q4sZeAU8Rk4rnP7wndhAE1UoA0UW9swBCNslFSGPKXs0jYfj5syCNc3VAzykZ0B940xSgsBnlf5KXhe0JPekigSHMKeuGOz+0WzYVs/FigOjInk4hGk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759662894; c=relaxed/simple; bh=flfBbhak/YrsZJhiUlCQnOSGQcRNBKtGFS2x79uQJFw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WzG04N4tIzMMg5+NYwIiqRclttHoVieh/wcnGJIOeSNHk/IXrOf8nhGesu98WZ/GDmeTTbzOmLIXWmdJ5Aiw0NuQo6gKEgpXtMl2nWoBAXJYio3yBEBI62sxyy4ieAl3PMK0YKaeDCcq2z00dl1Yv/5tvZ7hytGtMn4nc73i2c8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com X-CSE-ConnectionGUID: ibfIh42cTBmmRfCe0UUoGw== X-CSE-MsgGUID: K1BREhvAScSrGdjwTUf5Zg== Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 05 Oct 2025 20:14:45 +0900 Received: from demon-pc.localdomain (unknown [10.226.92.25]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 4C10440062B8; Sun, 5 Oct 2025 20:14:41 +0900 (JST) From: Cosmin Tanislav To: Cc: Cosmin Tanislav , Jonathan Cameron , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , linux-iio@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Conor Dooley Subject: [PATCH v4 1/6] dt-bindings: iio: adc: document RZ/T2H and RZ/N2H ADC Date: Sun, 5 Oct 2025 14:13:17 +0300 Message-ID: <20251005111323.804638-2-cosmin-gabriel.tanislav.xa@renesas.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251005111323.804638-1-cosmin-gabriel.tanislav.xa@renesas.com> References: <20251005111323.804638-1-cosmin-gabriel.tanislav.xa@renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Document the A/D 12-Bit successive approximation converters found in the Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs. RZ/T2H has two ADCs with 4 channels and one with 6. RZ/N2H has two ADCs with 4 channels and one with 15. Signed-off-by: Cosmin Tanislav Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- .../iio/adc/renesas,r9a09g077-adc.yaml | 135 ++++++++++++++++++ MAINTAINERS | 7 + 2 files changed, 142 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/renesas,r9a09= g077-adc.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/renesas,r9a09g077-ad= c.yaml b/Documentation/devicetree/bindings/iio/adc/renesas,r9a09g077-adc.ya= ml new file mode 100644 index 000000000000..dc0206b28231 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/renesas,r9a09g077-adc.yaml @@ -0,0 +1,135 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/renesas,r9a09g077-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas RZ/T2H / RZ/N2H ADC12 + +maintainers: + - Cosmin Tanislav + +description: | + A/D Converter block is a successive approximation analog-to-digital conv= erter + with a 12-bit accuracy. Up to 16 analog input channels can be selected. + Conversions can be performed in single or continuous mode. Result of the= ADC + is stored in a 16-bit data register corresponding to each channel. + +properties: + compatible: + oneOf: + - items: + - const: renesas,r9a09g087-adc # RZ/N2H + - const: renesas,r9a09g077-adc # RZ/T2H + - items: + - const: renesas,r9a09g077-adc # RZ/T2H + + reg: + maxItems: 1 + + interrupts: + items: + - description: A/D scan end interrupt + - description: A/D scan end interrupt for Group B + - description: A/D scan end interrupt for Group C + - description: Window A compare match + - description: Window B compare match + - description: Compare match + - description: Compare mismatch + + interrupt-names: + items: + - const: adi + - const: gbadi + - const: gcadi + - const: cmpai + - const: cmpbi + - const: wcmpm + - const: wcmpum + + clocks: + items: + - description: Converter clock + - description: Peripheral clock + + clock-names: + items: + - const: adclk + - const: pclk + + power-domains: + maxItems: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + "#io-channel-cells": + const: 1 + +patternProperties: + "^channel@[0-9a-f]$": + $ref: adc.yaml + type: object + description: The external channels which are connected to the ADC. + + properties: + reg: + description: The channel number. + maximum: 15 + + required: + - reg + + additionalProperties: false + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - power-domains + +additionalProperties: false + +examples: + - | + #include + #include + + adc@80008000 { + compatible =3D "renesas,r9a09g077-adc"; + reg =3D <0x80008000 0x400>; + interrupts =3D , + , + , + , + , + , + ; + interrupt-names =3D "adi", "gbadi", "gcadi", + "cmpai", "cmpbi", "wcmpm", "wcmpum"; + clocks =3D <&cpg CPG_CORE R9A09G077_CLK_PCLKL>, + <&cpg CPG_MOD 225>; + clock-names =3D "adclk", "pclk"; + power-domains =3D <&cpg>; + #address-cells =3D <1>; + #size-cells =3D <0>; + #io-channel-cells =3D <1>; + + channel@0 { + reg =3D <0x0>; + }; + channel@1 { + reg =3D <0x1>; + }; + channel@2 { + reg =3D <0x2>; + }; + channel@3 { + reg =3D <0x3>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 07363437c278..ff2a3257a498 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -21835,6 +21835,13 @@ S: Supported F: Documentation/devicetree/bindings/timer/renesas,rz-mtu3.yaml F: drivers/counter/rz-mtu3-cnt.c =20 +RENESAS RZ/T2H / RZ/N2H A/D DRIVER +M: Cosmin Tanislav +L: linux-iio@vger.kernel.org +L: linux-renesas-soc@vger.kernel.org +S: Supported +F: Documentation/devicetree/bindings/iio/adc/renesas,r9a09g077-adc.yaml + RENESAS RTCA-3 RTC DRIVER M: Claudiu Beznea L: linux-rtc@vger.kernel.org --=20 2.51.0