152 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/adc/amlogic,meson-saradc.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Amlogic Meson SAR (Successive Approximation Register) A/D converter8 9maintainers:10 - Martin Blumenstingl <martin.blumenstingl@googlemail.com>11 12description:13 Binding covers a range of ADCs found on Amlogic Meson SoCs.14 15properties:16 compatible:17 oneOf:18 - const: amlogic,meson-saradc19 - items:20 - enum:21 - amlogic,meson8-saradc22 - amlogic,meson8b-saradc23 - amlogic,meson8m2-saradc24 - amlogic,meson-gxbb-saradc25 - amlogic,meson-gxl-saradc26 - amlogic,meson-gxm-saradc27 - amlogic,meson-axg-saradc28 - amlogic,meson-g12a-saradc29 - const: amlogic,meson-saradc30 31 reg:32 maxItems: 133 34 interrupts:35 description: Interrupt indicates end of sampling.36 maxItems: 137 38 clocks:39 minItems: 240 maxItems: 441 42 clock-names:43 minItems: 244 items:45 - const: clkin46 - const: core47 - const: adc_clk48 - const: adc_sel49 50 vref-supply: true51 52 "#io-channel-cells":53 const: 154 55 amlogic,hhi-sysctrl:56 $ref: /schemas/types.yaml#/definitions/phandle57 description:58 Syscon which contains the 5th bit of the TSC (temperature sensor59 coefficient) on Meson8b and Meson8m2 (which used to calibrate the60 temperature sensor)61 62 nvmem-cells:63 description: phandle to the temperature_calib eFuse cells64 maxItems: 165 66 nvmem-cell-names:67 const: temperature_calib68 69 power-domains:70 maxItems: 171 72allOf:73 - if:74 properties:75 compatible:76 contains:77 enum:78 - amlogic,meson8-saradc79 - amlogic,meson8b-saradc80 - amlogic,meson8m2-saradc81 then:82 properties:83 clocks:84 maxItems: 285 clock-names:86 maxItems: 287 else:88 properties:89 nvmem-cells: false90 mvmem-cel-names: false91 clocks:92 minItems: 493 clock-names:94 minItems: 495 96 - if:97 properties:98 compatible:99 contains:100 enum:101 - amlogic,meson8b-saradc102 - amlogic,meson8m2-saradc103 then:104 properties:105 amlogic,hhi-sysctrl: true106 else:107 properties:108 amlogic,hhi-sysctrl: false109 110required:111 - compatible112 - reg113 - interrupts114 - clocks115 - clock-names116 - "#io-channel-cells"117 118additionalProperties: false119 120examples:121 - |122 #include <dt-bindings/interrupt-controller/irq.h>123 #include <dt-bindings/clock/gxbb-clkc.h>124 #include <dt-bindings/interrupt-controller/arm-gic.h>125 soc {126 #address-cells = <2>;127 #size-cells = <2>;128 adc@8680 {129 compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";130 #io-channel-cells = <1>;131 reg = <0x0 0x8680 0x0 0x34>;132 interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;133 clocks = <&xtal>,134 <&clkc CLKID_SAR_ADC>,135 <&clkc CLKID_SAR_ADC_CLK>,136 <&clkc CLKID_SAR_ADC_SEL>;137 clock-names = "clkin", "core", "adc_clk", "adc_sel";138 };139 adc@9680 {140 compatible = "amlogic,meson8b-saradc", "amlogic,meson-saradc";141 #io-channel-cells = <1>;142 reg = <0x0 0x9680 0x0 0x34>;143 interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;144 clocks = <&xtal>, <&clkc CLKID_SAR_ADC>;145 clock-names = "clkin", "core";146 nvmem-cells = <&tsens_caldata>;147 nvmem-cell-names = "temperature_calib";148 amlogic,hhi-sysctrl = <&hhi>;149 };150 };151...152