16be33864SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 26be33864SEmmanuel Vadot%YAML 1.2 36be33864SEmmanuel Vadot--- 46be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/amlogic,meson-saradc.yaml# 56be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 66be33864SEmmanuel Vadot 76be33864SEmmanuel Vadottitle: Amlogic Meson SAR (Successive Approximation Register) A/D converter 86be33864SEmmanuel Vadot 96be33864SEmmanuel Vadotmaintainers: 106be33864SEmmanuel Vadot - Martin Blumenstingl <martin.blumenstingl@googlemail.com> 116be33864SEmmanuel Vadot 126be33864SEmmanuel Vadotdescription: 136be33864SEmmanuel Vadot Binding covers a range of ADCs found on Amlogic Meson SoCs. 146be33864SEmmanuel Vadot 156be33864SEmmanuel Vadotproperties: 166be33864SEmmanuel Vadot compatible: 176be33864SEmmanuel Vadot oneOf: 186be33864SEmmanuel Vadot - const: amlogic,meson-saradc 196be33864SEmmanuel Vadot - items: 206be33864SEmmanuel Vadot - enum: 216be33864SEmmanuel Vadot - amlogic,meson8-saradc 226be33864SEmmanuel Vadot - amlogic,meson8b-saradc 236be33864SEmmanuel Vadot - amlogic,meson8m2-saradc 246be33864SEmmanuel Vadot - amlogic,meson-gxbb-saradc 256be33864SEmmanuel Vadot - amlogic,meson-gxl-saradc 266be33864SEmmanuel Vadot - amlogic,meson-gxm-saradc 276be33864SEmmanuel Vadot - amlogic,meson-axg-saradc 286be33864SEmmanuel Vadot - amlogic,meson-g12a-saradc 296be33864SEmmanuel Vadot - const: amlogic,meson-saradc 306be33864SEmmanuel Vadot 316be33864SEmmanuel Vadot reg: 326be33864SEmmanuel Vadot maxItems: 1 336be33864SEmmanuel Vadot 346be33864SEmmanuel Vadot interrupts: 356be33864SEmmanuel Vadot description: Interrupt indicates end of sampling. 366be33864SEmmanuel Vadot maxItems: 1 376be33864SEmmanuel Vadot 386be33864SEmmanuel Vadot clocks: 396be33864SEmmanuel Vadot minItems: 2 406be33864SEmmanuel Vadot maxItems: 4 416be33864SEmmanuel Vadot 426be33864SEmmanuel Vadot clock-names: 436be33864SEmmanuel Vadot minItems: 2 446be33864SEmmanuel Vadot items: 456be33864SEmmanuel Vadot - const: clkin 466be33864SEmmanuel Vadot - const: core 476be33864SEmmanuel Vadot - const: adc_clk 486be33864SEmmanuel Vadot - const: adc_sel 496be33864SEmmanuel Vadot 506be33864SEmmanuel Vadot vref-supply: true 516be33864SEmmanuel Vadot 526be33864SEmmanuel Vadot "#io-channel-cells": 536be33864SEmmanuel Vadot const: 1 546be33864SEmmanuel Vadot 556be33864SEmmanuel Vadot amlogic,hhi-sysctrl: 566be33864SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 576be33864SEmmanuel Vadot description: 586be33864SEmmanuel Vadot Syscon which contains the 5th bit of the TSC (temperature sensor 596be33864SEmmanuel Vadot coefficient) on Meson8b and Meson8m2 (which used to calibrate the 606be33864SEmmanuel Vadot temperature sensor) 616be33864SEmmanuel Vadot 626be33864SEmmanuel Vadot nvmem-cells: 636be33864SEmmanuel Vadot description: phandle to the temperature_calib eFuse cells 646be33864SEmmanuel Vadot maxItems: 1 656be33864SEmmanuel Vadot 666be33864SEmmanuel Vadot nvmem-cell-names: 676be33864SEmmanuel Vadot const: temperature_calib 686be33864SEmmanuel Vadot 69*0e8011faSEmmanuel Vadot power-domains: 70*0e8011faSEmmanuel Vadot maxItems: 1 71*0e8011faSEmmanuel Vadot 726be33864SEmmanuel VadotallOf: 736be33864SEmmanuel Vadot - if: 746be33864SEmmanuel Vadot properties: 756be33864SEmmanuel Vadot compatible: 766be33864SEmmanuel Vadot contains: 776be33864SEmmanuel Vadot enum: 786be33864SEmmanuel Vadot - amlogic,meson8-saradc 796be33864SEmmanuel Vadot - amlogic,meson8b-saradc 806be33864SEmmanuel Vadot - amlogic,meson8m2-saradc 816be33864SEmmanuel Vadot then: 826be33864SEmmanuel Vadot properties: 836be33864SEmmanuel Vadot clocks: 846be33864SEmmanuel Vadot maxItems: 2 856be33864SEmmanuel Vadot clock-names: 866be33864SEmmanuel Vadot maxItems: 2 876be33864SEmmanuel Vadot else: 886be33864SEmmanuel Vadot properties: 896be33864SEmmanuel Vadot nvmem-cells: false 906be33864SEmmanuel Vadot mvmem-cel-names: false 916be33864SEmmanuel Vadot clocks: 926be33864SEmmanuel Vadot minItems: 4 936be33864SEmmanuel Vadot clock-names: 946be33864SEmmanuel Vadot minItems: 4 956be33864SEmmanuel Vadot 966be33864SEmmanuel Vadot - if: 976be33864SEmmanuel Vadot properties: 986be33864SEmmanuel Vadot compatible: 996be33864SEmmanuel Vadot contains: 1006be33864SEmmanuel Vadot enum: 1016be33864SEmmanuel Vadot - amlogic,meson8b-saradc 1026be33864SEmmanuel Vadot - amlogic,meson8m2-saradc 1036be33864SEmmanuel Vadot then: 1046be33864SEmmanuel Vadot properties: 1056be33864SEmmanuel Vadot amlogic,hhi-sysctrl: true 1066be33864SEmmanuel Vadot else: 1076be33864SEmmanuel Vadot properties: 1086be33864SEmmanuel Vadot amlogic,hhi-sysctrl: false 1096be33864SEmmanuel Vadot 1106be33864SEmmanuel Vadotrequired: 1116be33864SEmmanuel Vadot - compatible 1126be33864SEmmanuel Vadot - reg 1136be33864SEmmanuel Vadot - interrupts 1146be33864SEmmanuel Vadot - clocks 1156be33864SEmmanuel Vadot - clock-names 1166be33864SEmmanuel Vadot - "#io-channel-cells" 1176be33864SEmmanuel Vadot 1186be33864SEmmanuel VadotadditionalProperties: false 1196be33864SEmmanuel Vadot 1206be33864SEmmanuel Vadotexamples: 1216be33864SEmmanuel Vadot - | 1226be33864SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 1236be33864SEmmanuel Vadot #include <dt-bindings/clock/gxbb-clkc.h> 1246be33864SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 1256be33864SEmmanuel Vadot soc { 1266be33864SEmmanuel Vadot #address-cells = <2>; 1276be33864SEmmanuel Vadot #size-cells = <2>; 1286be33864SEmmanuel Vadot adc@8680 { 1296be33864SEmmanuel Vadot compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc"; 1306be33864SEmmanuel Vadot #io-channel-cells = <1>; 1316be33864SEmmanuel Vadot reg = <0x0 0x8680 0x0 0x34>; 1326be33864SEmmanuel Vadot interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>; 1336be33864SEmmanuel Vadot clocks = <&xtal>, 1346be33864SEmmanuel Vadot <&clkc CLKID_SAR_ADC>, 1356be33864SEmmanuel Vadot <&clkc CLKID_SAR_ADC_CLK>, 1366be33864SEmmanuel Vadot <&clkc CLKID_SAR_ADC_SEL>; 1376be33864SEmmanuel Vadot clock-names = "clkin", "core", "adc_clk", "adc_sel"; 1386be33864SEmmanuel Vadot }; 1396be33864SEmmanuel Vadot adc@9680 { 1406be33864SEmmanuel Vadot compatible = "amlogic,meson8b-saradc", "amlogic,meson-saradc"; 1416be33864SEmmanuel Vadot #io-channel-cells = <1>; 1426be33864SEmmanuel Vadot reg = <0x0 0x9680 0x0 0x34>; 1436be33864SEmmanuel Vadot interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>; 1446be33864SEmmanuel Vadot clocks = <&xtal>, <&clkc CLKID_SAR_ADC>; 1456be33864SEmmanuel Vadot clock-names = "clkin", "core"; 1466be33864SEmmanuel Vadot nvmem-cells = <&tsens_caldata>; 1476be33864SEmmanuel Vadot nvmem-cell-names = "temperature_calib"; 1486be33864SEmmanuel Vadot amlogic,hhi-sysctrl = <&hhi>; 1496be33864SEmmanuel Vadot }; 1506be33864SEmmanuel Vadot }; 1516be33864SEmmanuel Vadot... 152