108080963SLad Prabhakar# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 208080963SLad Prabhakar%YAML 1.2 308080963SLad Prabhakar--- 408080963SLad Prabhakar$id: http://devicetree.org/schemas/iio/adc/renesas,rzg2l-adc.yaml# 508080963SLad Prabhakar$schema: http://devicetree.org/meta-schemas/core.yaml# 608080963SLad Prabhakar 708080963SLad Prabhakartitle: Renesas RZ/G2L ADC 808080963SLad Prabhakar 908080963SLad Prabhakarmaintainers: 1008080963SLad Prabhakar - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> 1108080963SLad Prabhakar 1208080963SLad Prabhakardescription: | 1308080963SLad Prabhakar A/D Converter block is a successive approximation analog-to-digital converter 1408080963SLad Prabhakar with a 12-bit accuracy. Up to eight analog input channels can be selected. 1508080963SLad Prabhakar Conversions can be performed in single or repeat mode. Result of the ADC is 1608080963SLad Prabhakar stored in a 32-bit data register corresponding to each channel. 1708080963SLad Prabhakar 1808080963SLad Prabhakarproperties: 1908080963SLad Prabhakar compatible: 2008080963SLad Prabhakar items: 2108080963SLad Prabhakar - enum: 2232abe97bSLad Prabhakar - renesas,r9a07g043-adc # RZ/G2UL and RZ/Five 2342763b24SBiju Das - renesas,r9a07g044-adc # RZ/G2L 2442763b24SBiju Das - renesas,r9a07g054-adc # RZ/V2L 2508080963SLad Prabhakar - const: renesas,rzg2l-adc 2608080963SLad Prabhakar 2708080963SLad Prabhakar reg: 2808080963SLad Prabhakar maxItems: 1 2908080963SLad Prabhakar 3008080963SLad Prabhakar interrupts: 3108080963SLad Prabhakar maxItems: 1 3208080963SLad Prabhakar 3308080963SLad Prabhakar clocks: 3408080963SLad Prabhakar items: 3508080963SLad Prabhakar - description: converter clock 3608080963SLad Prabhakar - description: peripheral clock 3708080963SLad Prabhakar 3808080963SLad Prabhakar clock-names: 3908080963SLad Prabhakar items: 4008080963SLad Prabhakar - const: adclk 4108080963SLad Prabhakar - const: pclk 4208080963SLad Prabhakar 4308080963SLad Prabhakar power-domains: 4408080963SLad Prabhakar maxItems: 1 4508080963SLad Prabhakar 4608080963SLad Prabhakar resets: 4708080963SLad Prabhakar maxItems: 2 4808080963SLad Prabhakar 4908080963SLad Prabhakar reset-names: 5008080963SLad Prabhakar items: 5108080963SLad Prabhakar - const: presetn 5208080963SLad Prabhakar - const: adrst-n 5308080963SLad Prabhakar 5408080963SLad Prabhakar '#address-cells': 5508080963SLad Prabhakar const: 1 5608080963SLad Prabhakar 5708080963SLad Prabhakar '#size-cells': 5808080963SLad Prabhakar const: 0 5908080963SLad Prabhakar 6008080963SLad Prabhakarrequired: 6108080963SLad Prabhakar - compatible 6208080963SLad Prabhakar - reg 6308080963SLad Prabhakar - interrupts 6408080963SLad Prabhakar - clocks 6508080963SLad Prabhakar - clock-names 6608080963SLad Prabhakar - power-domains 6708080963SLad Prabhakar - resets 6808080963SLad Prabhakar - reset-names 6908080963SLad Prabhakar 7008080963SLad PrabhakarpatternProperties: 7108080963SLad Prabhakar "^channel@[0-7]$": 72*34d1e754SKrzysztof Kozlowski $ref: adc.yaml 7308080963SLad Prabhakar type: object 7408080963SLad Prabhakar description: | 7508080963SLad Prabhakar Represents the external channels which are connected to the ADC. 7608080963SLad Prabhakar 7708080963SLad Prabhakar properties: 7808080963SLad Prabhakar reg: 7908080963SLad Prabhakar description: | 80153415feSBiju Das The channel number. 8108080963SLad Prabhakar 8208080963SLad Prabhakar required: 8308080963SLad Prabhakar - reg 8408080963SLad Prabhakar 8508080963SLad Prabhakar additionalProperties: false 8608080963SLad Prabhakar 87153415feSBiju DasallOf: 88153415feSBiju Das - if: 89153415feSBiju Das properties: 90153415feSBiju Das compatible: 91153415feSBiju Das contains: 92153415feSBiju Das const: renesas,r9a07g043-adc 93153415feSBiju Das then: 94153415feSBiju Das patternProperties: 95153415feSBiju Das "^channel@[2-7]$": false 96153415feSBiju Das "^channel@[0-1]$": 97153415feSBiju Das properties: 98153415feSBiju Das reg: 99153415feSBiju Das minimum: 0 100153415feSBiju Das maximum: 1 101153415feSBiju Das else: 102153415feSBiju Das patternProperties: 103153415feSBiju Das "^channel@[0-7]$": 104153415feSBiju Das properties: 105153415feSBiju Das reg: 106153415feSBiju Das minimum: 0 107153415feSBiju Das maximum: 7 108153415feSBiju Das 10908080963SLad PrabhakaradditionalProperties: false 11008080963SLad Prabhakar 11108080963SLad Prabhakarexamples: 11208080963SLad Prabhakar - | 11308080963SLad Prabhakar #include <dt-bindings/clock/r9a07g044-cpg.h> 11408080963SLad Prabhakar #include <dt-bindings/interrupt-controller/arm-gic.h> 11508080963SLad Prabhakar 11608080963SLad Prabhakar adc: adc@10059000 { 11708080963SLad Prabhakar compatible = "renesas,r9a07g044-adc", "renesas,rzg2l-adc"; 11808080963SLad Prabhakar reg = <0x10059000 0x400>; 11908080963SLad Prabhakar interrupts = <GIC_SPI 347 IRQ_TYPE_EDGE_RISING>; 12008080963SLad Prabhakar clocks = <&cpg CPG_MOD R9A07G044_ADC_ADCLK>, 12108080963SLad Prabhakar <&cpg CPG_MOD R9A07G044_ADC_PCLK>; 12208080963SLad Prabhakar clock-names = "adclk", "pclk"; 12308080963SLad Prabhakar power-domains = <&cpg>; 12408080963SLad Prabhakar resets = <&cpg R9A07G044_ADC_PRESETN>, 12508080963SLad Prabhakar <&cpg R9A07G044_ADC_ADRST_N>; 12608080963SLad Prabhakar reset-names = "presetn", "adrst-n"; 12708080963SLad Prabhakar 12808080963SLad Prabhakar #address-cells = <1>; 12908080963SLad Prabhakar #size-cells = <0>; 13008080963SLad Prabhakar 13108080963SLad Prabhakar channel@0 { 13208080963SLad Prabhakar reg = <0>; 13308080963SLad Prabhakar }; 13408080963SLad Prabhakar channel@1 { 13508080963SLad Prabhakar reg = <1>; 13608080963SLad Prabhakar }; 13708080963SLad Prabhakar channel@2 { 13808080963SLad Prabhakar reg = <2>; 13908080963SLad Prabhakar }; 14008080963SLad Prabhakar channel@3 { 14108080963SLad Prabhakar reg = <3>; 14208080963SLad Prabhakar }; 14308080963SLad Prabhakar channel@4 { 14408080963SLad Prabhakar reg = <4>; 14508080963SLad Prabhakar }; 14608080963SLad Prabhakar channel@5 { 14708080963SLad Prabhakar reg = <5>; 14808080963SLad Prabhakar }; 14908080963SLad Prabhakar channel@6 { 15008080963SLad Prabhakar reg = <6>; 15108080963SLad Prabhakar }; 15208080963SLad Prabhakar channel@7 { 15308080963SLad Prabhakar reg = <7>; 15408080963SLad Prabhakar }; 15508080963SLad Prabhakar }; 156