Amlogic Meson SAR (Successive Approximation Register) A/D converter

Schema identifier ($id): "http://devicetree.org/schemas/iio/adc/amlogic,meson-saradc.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Martin Blumenstingl <martin.blumenstingl@googlemail.com>"

Binding covers a range of ADCs found on Amlogic Meson SoCs.

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Exact value (const): "amlogic,meson-saradc"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "amlogic,meson8-saradc", "amlogic,meson8b-saradc", "amlogic,meson8m2-saradc", "amlogic,meson-gxbb-saradc", "amlogic,meson-gxl-saradc", "amlogic,meson-gxlx-saradc", "amlogic,meson-gxm-saradc", "amlogic,meson-axg-saradc", "amlogic,meson-g12a-saradc"

Item 2

Exact value (const): "amlogic,meson-saradc"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Interrupt indicates end of sampling.

Maximum number of items (maxItems): 1

clocks — required here #

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 4

clock-names — required here #

Minimum number of items (minItems): 2

Array item rules (items) #

Item 1

Exact value (const): "clkin"

Item 2

Exact value (const): "core"

Item 3

Exact value (const): "adc_clk"

Item 4

Exact value (const): "adc_sel"

vref-supply — not listed as required here #

true — No constraints added by this property rule.

#io-channel-cells — required here #

Exact value (const): 1

amlogic,hhi-sysctrl — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

Syscon which contains the 5th bit of the TSC (temperature sensor coefficient) on Meson8b and Meson8m2 (which used to calibrate the temperature sensor)

nvmem-cells — not listed as required here #

phandle to the temperature_calib eFuse cells

Maximum number of items (maxItems): 1

nvmem-cell-names — not listed as required here #

Exact value (const): "temperature_calib"

power-domains — not listed as required here #

Maximum number of items (maxItems): 1

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "amlogic,meson8-saradc", "amlogic,meson8b-saradc", "amlogic,meson8m2-saradc"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Maximum number of items (maxItems): 2

clock-names — not listed as required here

Maximum number of items (maxItems): 2

When the condition does not match (else) #

Properties and child nodes (properties)

nvmem-cells — not listed as required here

false — Not permitted by this property rule.

mvmem-cel-names — not listed as required here

false — Not permitted by this property rule.

clocks — not listed as required here

Minimum number of items (minItems): 4

clock-names — not listed as required here

Minimum number of items (minItems): 4

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "amlogic,meson8-saradc", "amlogic,meson8b-saradc", "amlogic,meson8m2-saradc"

When the condition matches (then) #

Properties and child nodes (properties)

amlogic,hhi-sysctrl — not listed as required here

true — No constraints added by this property rule.

When the condition does not match (else) #

Properties and child nodes (properties)

amlogic,hhi-sysctrl — not listed as required here

false — Not permitted by this property rule.

Required in this object (required): "compatible", "reg", "interrupts", "clocks", "clock-names", "#io-channel-cells"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/gxbb-clkc.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
soc {
    #address-cells = <2>;
    #size-cells = <2>;
    adc@8680 {
        compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";
        #io-channel-cells = <1>;
        reg = <0x0 0x8680 0x0 0x34>;
        interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
        clocks = <&xtal>,
            <&clkc CLKID_SAR_ADC>,
            <&clkc CLKID_SAR_ADC_CLK>,
            <&clkc CLKID_SAR_ADC_SEL>;
        clock-names = "clkin", "core", "adc_clk", "adc_sel";
    };
    adc@9680 {
        compatible = "amlogic,meson8b-saradc", "amlogic,meson-saradc";
        #io-channel-cells = <1>;
        reg = <0x0 0x9680 0x0 0x34>;
        interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
        clocks = <&xtal>, <&clkc CLKID_SAR_ADC>;
        clock-names = "clkin", "core";
        nvmem-cells = <&tsens_caldata>;
        nvmem-cell-names = "temperature_calib";
        amlogic,hhi-sysctrl = <&hhi>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

Edit this page