169 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---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 oneOf:15 - enum:16 - samsung,exynos-adc-v1 # Exynos525017 - samsung,exynos-adc-v218 - samsung,exynos3250-adc19 - samsung,exynos4212-adc # Exynos4212 and Exynos441220 - samsung,exynos7-adc21 - samsung,s3c2410-adc22 - samsung,s3c2416-adc23 - samsung,s3c2440-adc24 - samsung,s3c2443-adc25 - samsung,s3c6410-adc26 - samsung,s5pv210-adc27 - items:28 - enum:29 - samsung,exynos5433-adc30 - const: samsung,exynos7-adc31 32 reg:33 maxItems: 134 35 clocks:36 description:37 Phandle to ADC bus clock. For Exynos3250 additional clock is needed.38 minItems: 139 maxItems: 240 41 clock-names:42 description:43 Must contain clock names (adc, sclk) matching phandles in clocks44 property.45 minItems: 146 maxItems: 247 48 interrupts:49 description:50 ADC interrupt followed by optional touchscreen interrupt.51 minItems: 152 maxItems: 253 54 "#io-channel-cells":55 const: 156 57 vdd-supply: true58 59 samsung,syscon-phandle:60 $ref: /schemas/types.yaml#/definitions/phandle61 description:62 Phandle to the PMU system controller node (to access the ADC_PHY63 register on Exynos3250/4x12/5250/5420/5800).64 65 has-touchscreen:66 description:67 If present, indicates that a touchscreen is connected and usable.68 type: boolean69 70required:71 - compatible72 - reg73 - clocks74 - clock-names75 - interrupts76 - "#io-channel-cells"77 - vdd-supply78 79additionalProperties:80 type: object81 82allOf:83 - if:84 properties:85 compatible:86 contains:87 enum:88 - samsung,exynos-adc-v189 - samsung,exynos-adc-v290 - samsung,exynos3250-adc91 - samsung,exynos4212-adc92 then:93 required:94 - samsung,syscon-phandle95 96 - if:97 properties:98 compatible:99 contains:100 enum:101 - samsung,exynos3250-adc102 then:103 properties:104 clocks:105 minItems: 2106 maxItems: 2107 clock-names:108 items:109 - const: adc110 - const: sclk111 else:112 properties:113 clocks:114 minItems: 1115 maxItems: 1116 clock-names:117 items:118 - const: adc119 120 - if:121 required:122 - has-touchscreen123 then:124 properties:125 interrupts:126 minItems: 2127 maxItems: 2128 129examples:130 - |131 adc: adc@12d10000 {132 compatible = "samsung,exynos-adc-v1";133 reg = <0x12d10000 0x100>;134 interrupts = <0 106 0>;135 #io-channel-cells = <1>;136 137 clocks = <&clock 303>;138 clock-names = "adc";139 140 vdd-supply = <&buck5_reg>;141 samsung,syscon-phandle = <&pmu_system_controller>;142 143 /* NTC thermistor is a hwmon device */144 thermistor {145 compatible = "murata,ncp15wb473";146 pullup-uv = <1800000>;147 pullup-ohm = <47000>;148 pulldown-ohm = <0>;149 io-channels = <&adc 4>;150 };151 };152 153 - |154 #include <dt-bindings/clock/exynos3250.h>155 156 adc@126c0000 {157 compatible = "samsung,exynos3250-adc";158 reg = <0x126c0000 0x100>;159 interrupts = <0 137 0>;160 #io-channel-cells = <1>;161 162 clocks = <&cmu CLK_TSADC>,163 <&cmu CLK_SCLK_TSADC>;164 clock-names = "adc", "sclk";165 166 vdd-supply = <&buck5_reg>;167 samsung,syscon-phandle = <&pmu_system_controller>;168 };169