Samsung Exynos Analog to Digital Converter (ADC)
Schema identifier ($id): "http://devicetree.org/schemas/iio/adc/samsung,exynos-adc.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Krzysztof Kozlowski <krzk@kernel.org>"
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Allowed values (
enum):"samsung,exynos-adc-v1","samsung,exynos-adc-v2","samsung,exynos3250-adc","samsung,exynos4212-adc","samsung,exynos7-adc","samsung,s3c6410-adc","samsung,s5pv210-adc"
Rule 2
Array item rules (
items)Item 1
Item 2
Exact value (
const):"samsung,exynos7-adc"
reg — required here #
Maximum number of items (maxItems): 1
clocks — required here #
Phandle to ADC bus clock. For Exynos3250 additional clock is needed.
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 2
clock-names — required here #
Must contain clock names (adc, sclk) matching phandles in clocks property.
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 2
interrupts — required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 2
#io-channel-cells — required here #
Exact value (const): 1
vdd-supply — required here #
true — No constraints added by this property rule.
samsung,syscon-phandle — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle
Phandle to the PMU system controller node (to access the ADC_PHY register on Exynos3250/4x12/5250/5420/5800).
Required in this object (required): "compatible", "reg", "clocks", "clock-names", "interrupts", "#io-channel-cells", "vdd-supply"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
Value type (
type):"object"
All of these rules must match (allOf) #
Rule 1 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"samsung,exynos-adc-v1","samsung,exynos-adc-v2","samsung,exynos3250-adc","samsung,exynos4212-adc"When the condition matches (
then) #Required in this object (
required):"samsung,syscon-phandle"
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)When the condition matches (
then) #Properties and child nodes (
properties)
clocks— not listed as required hereMinimum number of items (
minItems):2Maximum number of items (
maxItems):2
clock-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"adc"Item 2
Exact value (
const):"sclk"When the condition does not match (
else) #Properties and child nodes (
properties)
clocks— not listed as required hereMinimum number of items (
minItems):1Maximum number of items (
maxItems):1
clock-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"adc"
Rule 3 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"samsung,s5pv210-adc"When the condition matches (
then) #Properties and child nodes (
properties)
interrupts— not listed as required hereArray item rules (
items)Item 1
main (ADC)
Item 2
pending (PENDN)
When the condition does not match (
else) #Properties and child nodes (
properties)
interrupts— not listed as required hereMaximum number of items (
maxItems):1
Examples (examples) #
#include <dt-bindings/interrupt-controller/arm-gic.h>
adc: adc@12d10000 {
compatible = "samsung,exynos-adc-v1";
reg = <0x12d10000 0x100>;
interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
#io-channel-cells = <1>;
clocks = <&clock 303>;
clock-names = "adc";
vdd-supply = <&buck5_reg>;
samsung,syscon-phandle = <&pmu_system_controller>;
/* NTC thermistor is a hwmon device */
thermistor {
compatible = "murata,ncp15wb473";
pullup-uv = <1800000>;
pullup-ohm = <47000>;
pulldown-ohm = <0>;
io-channels = <&adc 4>;
};
};
#include <dt-bindings/clock/exynos3250.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
adc@126c0000 {
compatible = "samsung,exynos3250-adc";
reg = <0x126c0000 0x100>;
interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
#io-channel-cells = <1>;
clocks = <&cmu CLK_TSADC>,
<&cmu CLK_SCLK_TSADC>;
clock-names = "adc", "sclk";
vdd-supply = <&buck5_reg>;
samsung,syscon-phandle = <&pmu_system_controller>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0
Line 16: Exynos5250
Line 19: Exynos4212 and Exynos4412