Allwinner D1 General Purpose ADC

Schema identifier ($id): "http://devicetree.org/schemas/iio/adc/allwinner,sun20i-d1-gpadc.yaml#"

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

Maintainers (maintainers): "Maksim Kiselev <bigunclemax@gmail.com>"

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Allowed values (enum): "allwinner,sun20i-d1-gpadc"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "allwinner,sun50i-h616-gpadc"

Item 2

Exact value (const): "allwinner,sun20i-d1-gpadc"

#io-channel-cells — required here #

Exact value (const): 1

#address-cells — not listed as required here #

Exact value (const): 1

#size-cells — not listed as required here #

Exact value (const): 0

clocks — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Maximum number of items (maxItems): 1

reg — required here #

Maximum number of items (maxItems): 1

resets — required here #

Maximum number of items (maxItems): 1

Properties matching a name pattern (patternProperties) #

^channel@[0-9a-f]+$ — name matches this regular expression #

Shared schema rule ($ref): adc.yaml

Value type (type): "object"

Represents the internal channels of the ADC.

Properties and child nodes (properties) #

reg — required here

Array item rules (items)

Minimum value (minimum): 0

Maximum value (maximum): 15

Required in this object (required): "reg"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

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

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

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/sun20i-d1-ccu.h>
#include <dt-bindings/reset/sun20i-d1-ccu.h>
#include <dt-bindings/interrupt-controller/irq.h>

gpadc: adc@2009000 {
    compatible = "allwinner,sun20i-d1-gpadc";
    reg = <0x2009000 0x400>;
    clocks = <&ccu CLK_BUS_GPADC>;
    resets = <&ccu RST_BUS_GPADC>;
    interrupts = <73 IRQ_TYPE_LEVEL_HIGH>;
    #io-channel-cells = <1>;

    #address-cells = <1>;
    #size-cells = <0>;

    channel@0 {
        reg = <0>;
    };

    channel@1 {
        reg = <1>;
    };
};

Source notes #

Annotations retained from the schema source

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

Edit this page