1# SPDX-License-Identifier: GPL-2.0 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/iio/adc/samsung,exynos-adc.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Samsung Exynos Analog to Digital Converter (ADC) 8 9maintainers: 10 - Krzysztof Kozlowski <krzk@kernel.org> 11 12properties: 13 compatible: 14 enum: 15 - samsung,exynos-adc-v1 # Exynos5250 16 - samsung,exynos-adc-v2 17 - samsung,exynos3250-adc 18 - samsung,exynos4212-adc # Exynos4212 and Exynos4412 19 - samsung,exynos7-adc 20 - samsung,s3c2410-adc 21 - samsung,s3c2416-adc 22 - samsung,s3c2440-adc 23 - samsung,s3c2443-adc 24 - samsung,s3c6410-adc 25 - samsung,s5pv210-adc 26 27 reg: 28 maxItems: 1 29 30 clocks: 31 description: 32 Phandle to ADC bus clock. For Exynos3250 additional clock is needed. 33 minItems: 1 34 maxItems: 2 35 36 clock-names: 37 description: 38 Must contain clock names (adc, sclk) matching phandles in clocks 39 property. 40 minItems: 1 41 maxItems: 2 42 43 interrupts: 44 description: 45 ADC interrupt followed by optional touchscreen interrupt. 46 minItems: 1 47 maxItems: 2 48 49 "#io-channel-cells": 50 const: 1 51 52 vdd-supply: true 53 54 samsung,syscon-phandle: 55 $ref: /schemas/types.yaml#/definitions/phandle 56 description: 57 Phandle to the PMU system controller node (to access the ADC_PHY 58 register on Exynos3250/4x12/5250/5420/5800). 59 60 has-touchscreen: 61 description: 62 If present, indicates that a touchscreen is connected and usable. 63 type: boolean 64 65required: 66 - compatible 67 - reg 68 - clocks 69 - clock-names 70 - interrupts 71 - "#io-channel-cells" 72 - vdd-supply 73 74additionalProperties: 75 type: object 76 77allOf: 78 - if: 79 properties: 80 compatible: 81 contains: 82 enum: 83 - samsung,exynos-adc-v1 84 - samsung,exynos-adc-v2 85 - samsung,exynos3250-adc 86 - samsung,exynos4212-adc 87 then: 88 required: 89 - samsung,syscon-phandle 90 91 - if: 92 properties: 93 compatible: 94 contains: 95 enum: 96 - samsung,exynos3250-adc 97 then: 98 properties: 99 clocks: 100 minItems: 2 101 maxItems: 2 102 clock-names: 103 items: 104 - const: adc 105 - const: sclk 106 else: 107 properties: 108 clocks: 109 minItems: 1 110 maxItems: 1 111 clock-names: 112 items: 113 - const: adc 114 115 - if: 116 required: 117 - has-touchscreen 118 then: 119 properties: 120 interrupts: 121 minItems: 2 122 maxItems: 2 123 124examples: 125 - | 126 adc: adc@12d10000 { 127 compatible = "samsung,exynos-adc-v1"; 128 reg = <0x12d10000 0x100>; 129 interrupts = <0 106 0>; 130 #io-channel-cells = <1>; 131 132 clocks = <&clock 303>; 133 clock-names = "adc"; 134 135 vdd-supply = <&buck5_reg>; 136 samsung,syscon-phandle = <&pmu_system_controller>; 137 138 /* NTC thermistor is a hwmon device */ 139 thermistor { 140 compatible = "murata,ncp15wb473"; 141 pullup-uv = <1800000>; 142 pullup-ohm = <47000>; 143 pulldown-ohm = <0>; 144 io-channels = <&adc 4>; 145 }; 146 }; 147 148 - | 149 #include <dt-bindings/clock/exynos3250.h> 150 151 adc@126c0000 { 152 compatible = "samsung,exynos3250-adc"; 153 reg = <0x126c0000 0x100>; 154 interrupts = <0 137 0>; 155 #io-channel-cells = <1>; 156 157 clocks = <&cmu CLK_TSADC>, 158 <&cmu CLK_SCLK_TSADC>; 159 clock-names = "adc", "sclk"; 160 161 vdd-supply = <&buck5_reg>; 162 samsung,syscon-phandle = <&pmu_system_controller>; 163 }; 164