1354d7675SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2354d7675SEmmanuel Vadot%YAML 1.2 3354d7675SEmmanuel Vadot--- 4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/renesas,rzg2l-adc.yaml# 5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6354d7675SEmmanuel Vadot 7354d7675SEmmanuel Vadottitle: Renesas RZ/G2L ADC 8354d7675SEmmanuel Vadot 9354d7675SEmmanuel Vadotmaintainers: 10354d7675SEmmanuel Vadot - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> 11354d7675SEmmanuel Vadot 12354d7675SEmmanuel Vadotdescription: | 13354d7675SEmmanuel Vadot A/D Converter block is a successive approximation analog-to-digital converter 14354d7675SEmmanuel Vadot with a 12-bit accuracy. Up to eight analog input channels can be selected. 15354d7675SEmmanuel Vadot Conversions can be performed in single or repeat mode. Result of the ADC is 16354d7675SEmmanuel Vadot stored in a 32-bit data register corresponding to each channel. 17354d7675SEmmanuel Vadot 18354d7675SEmmanuel Vadotproperties: 19354d7675SEmmanuel Vadot compatible: 20354d7675SEmmanuel Vadot items: 21354d7675SEmmanuel Vadot - enum: 228bab661aSEmmanuel Vadot - renesas,r9a07g043-adc # RZ/G2UL and RZ/Five 23d5b0e70fSEmmanuel Vadot - renesas,r9a07g044-adc # RZ/G2L 24d5b0e70fSEmmanuel Vadot - renesas,r9a07g054-adc # RZ/V2L 25354d7675SEmmanuel Vadot - const: renesas,rzg2l-adc 26354d7675SEmmanuel Vadot 27354d7675SEmmanuel Vadot reg: 28354d7675SEmmanuel Vadot maxItems: 1 29354d7675SEmmanuel Vadot 30354d7675SEmmanuel Vadot interrupts: 31354d7675SEmmanuel Vadot maxItems: 1 32354d7675SEmmanuel Vadot 33354d7675SEmmanuel Vadot clocks: 34354d7675SEmmanuel Vadot items: 35354d7675SEmmanuel Vadot - description: converter clock 36354d7675SEmmanuel Vadot - description: peripheral clock 37354d7675SEmmanuel Vadot 38354d7675SEmmanuel Vadot clock-names: 39354d7675SEmmanuel Vadot items: 40354d7675SEmmanuel Vadot - const: adclk 41354d7675SEmmanuel Vadot - const: pclk 42354d7675SEmmanuel Vadot 43354d7675SEmmanuel Vadot power-domains: 44354d7675SEmmanuel Vadot maxItems: 1 45354d7675SEmmanuel Vadot 46354d7675SEmmanuel Vadot resets: 47354d7675SEmmanuel Vadot maxItems: 2 48354d7675SEmmanuel Vadot 49354d7675SEmmanuel Vadot reset-names: 50354d7675SEmmanuel Vadot items: 51354d7675SEmmanuel Vadot - const: presetn 52354d7675SEmmanuel Vadot - const: adrst-n 53354d7675SEmmanuel Vadot 54354d7675SEmmanuel Vadot '#address-cells': 55354d7675SEmmanuel Vadot const: 1 56354d7675SEmmanuel Vadot 57354d7675SEmmanuel Vadot '#size-cells': 58354d7675SEmmanuel Vadot const: 0 59354d7675SEmmanuel Vadot 60354d7675SEmmanuel Vadotrequired: 61354d7675SEmmanuel Vadot - compatible 62354d7675SEmmanuel Vadot - reg 63354d7675SEmmanuel Vadot - interrupts 64354d7675SEmmanuel Vadot - clocks 65354d7675SEmmanuel Vadot - clock-names 66354d7675SEmmanuel Vadot - power-domains 67354d7675SEmmanuel Vadot - resets 68354d7675SEmmanuel Vadot - reset-names 69354d7675SEmmanuel Vadot 70354d7675SEmmanuel VadotpatternProperties: 71354d7675SEmmanuel Vadot "^channel@[0-7]$": 72*cb7aa33aSEmmanuel Vadot $ref: adc.yaml 73354d7675SEmmanuel Vadot type: object 74354d7675SEmmanuel Vadot description: | 75354d7675SEmmanuel Vadot Represents the external channels which are connected to the ADC. 76354d7675SEmmanuel Vadot 77354d7675SEmmanuel Vadot properties: 78354d7675SEmmanuel Vadot reg: 79354d7675SEmmanuel Vadot description: | 80b97ee269SEmmanuel Vadot The channel number. 81354d7675SEmmanuel Vadot 82354d7675SEmmanuel Vadot required: 83354d7675SEmmanuel Vadot - reg 84354d7675SEmmanuel Vadot 85354d7675SEmmanuel Vadot additionalProperties: false 86354d7675SEmmanuel Vadot 87b97ee269SEmmanuel VadotallOf: 88b97ee269SEmmanuel Vadot - if: 89b97ee269SEmmanuel Vadot properties: 90b97ee269SEmmanuel Vadot compatible: 91b97ee269SEmmanuel Vadot contains: 92b97ee269SEmmanuel Vadot const: renesas,r9a07g043-adc 93b97ee269SEmmanuel Vadot then: 94b97ee269SEmmanuel Vadot patternProperties: 95b97ee269SEmmanuel Vadot "^channel@[2-7]$": false 96b97ee269SEmmanuel Vadot "^channel@[0-1]$": 97b97ee269SEmmanuel Vadot properties: 98b97ee269SEmmanuel Vadot reg: 99b97ee269SEmmanuel Vadot minimum: 0 100b97ee269SEmmanuel Vadot maximum: 1 101b97ee269SEmmanuel Vadot else: 102b97ee269SEmmanuel Vadot patternProperties: 103b97ee269SEmmanuel Vadot "^channel@[0-7]$": 104b97ee269SEmmanuel Vadot properties: 105b97ee269SEmmanuel Vadot reg: 106b97ee269SEmmanuel Vadot minimum: 0 107b97ee269SEmmanuel Vadot maximum: 7 108b97ee269SEmmanuel Vadot 109354d7675SEmmanuel VadotadditionalProperties: false 110354d7675SEmmanuel Vadot 111354d7675SEmmanuel Vadotexamples: 112354d7675SEmmanuel Vadot - | 113354d7675SEmmanuel Vadot #include <dt-bindings/clock/r9a07g044-cpg.h> 114354d7675SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 115354d7675SEmmanuel Vadot 116354d7675SEmmanuel Vadot adc: adc@10059000 { 117354d7675SEmmanuel Vadot compatible = "renesas,r9a07g044-adc", "renesas,rzg2l-adc"; 118354d7675SEmmanuel Vadot reg = <0x10059000 0x400>; 119354d7675SEmmanuel Vadot interrupts = <GIC_SPI 347 IRQ_TYPE_EDGE_RISING>; 120354d7675SEmmanuel Vadot clocks = <&cpg CPG_MOD R9A07G044_ADC_ADCLK>, 121354d7675SEmmanuel Vadot <&cpg CPG_MOD R9A07G044_ADC_PCLK>; 122354d7675SEmmanuel Vadot clock-names = "adclk", "pclk"; 123354d7675SEmmanuel Vadot power-domains = <&cpg>; 124354d7675SEmmanuel Vadot resets = <&cpg R9A07G044_ADC_PRESETN>, 125354d7675SEmmanuel Vadot <&cpg R9A07G044_ADC_ADRST_N>; 126354d7675SEmmanuel Vadot reset-names = "presetn", "adrst-n"; 127354d7675SEmmanuel Vadot 128354d7675SEmmanuel Vadot #address-cells = <1>; 129354d7675SEmmanuel Vadot #size-cells = <0>; 130354d7675SEmmanuel Vadot 131354d7675SEmmanuel Vadot channel@0 { 132354d7675SEmmanuel Vadot reg = <0>; 133354d7675SEmmanuel Vadot }; 134354d7675SEmmanuel Vadot channel@1 { 135354d7675SEmmanuel Vadot reg = <1>; 136354d7675SEmmanuel Vadot }; 137354d7675SEmmanuel Vadot channel@2 { 138354d7675SEmmanuel Vadot reg = <2>; 139354d7675SEmmanuel Vadot }; 140354d7675SEmmanuel Vadot channel@3 { 141354d7675SEmmanuel Vadot reg = <3>; 142354d7675SEmmanuel Vadot }; 143354d7675SEmmanuel Vadot channel@4 { 144354d7675SEmmanuel Vadot reg = <4>; 145354d7675SEmmanuel Vadot }; 146354d7675SEmmanuel Vadot channel@5 { 147354d7675SEmmanuel Vadot reg = <5>; 148354d7675SEmmanuel Vadot }; 149354d7675SEmmanuel Vadot channel@6 { 150354d7675SEmmanuel Vadot reg = <6>; 151354d7675SEmmanuel Vadot }; 152354d7675SEmmanuel Vadot channel@7 { 153354d7675SEmmanuel Vadot reg = <7>; 154354d7675SEmmanuel Vadot }; 155354d7675SEmmanuel Vadot }; 156