Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/adc/samsung,exynos-adc.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Samsung Exynos Analog to Digital Converter (ADC)
0008 
0009 maintainers:
0010   - Krzysztof Kozlowski <krzk@kernel.org>
0011 
0012 properties:
0013   compatible:
0014     enum:
0015       - samsung,exynos-adc-v1                 # Exynos5250
0016       - samsung,exynos-adc-v2
0017       - samsung,exynos3250-adc
0018       - samsung,exynos4212-adc                # Exynos4212 and Exynos4412
0019       - samsung,exynos7-adc
0020       - samsung,s3c2410-adc
0021       - samsung,s3c2416-adc
0022       - samsung,s3c2440-adc
0023       - samsung,s3c2443-adc
0024       - samsung,s3c6410-adc
0025       - samsung,s5pv210-adc
0026 
0027   reg:
0028     maxItems: 1
0029 
0030   clocks:
0031     description:
0032       Phandle to ADC bus clock. For Exynos3250 additional clock is needed.
0033     minItems: 1
0034     maxItems: 2
0035 
0036   clock-names:
0037     description:
0038       Must contain clock names (adc, sclk) matching phandles in clocks
0039       property.
0040     minItems: 1
0041     maxItems: 2
0042 
0043   interrupts:
0044     description:
0045       ADC interrupt followed by optional touchscreen interrupt.
0046     minItems: 1
0047     maxItems: 2
0048 
0049   "#io-channel-cells":
0050     const: 1
0051 
0052   vdd-supply: true
0053 
0054   samsung,syscon-phandle:
0055     $ref: '/schemas/types.yaml#/definitions/phandle'
0056     description:
0057       Phandle to the PMU system controller node (to access the ADC_PHY
0058       register on Exynos3250/4x12/5250/5420/5800).
0059 
0060   has-touchscreen:
0061     description:
0062       If present, indicates that a touchscreen is connected and usable.
0063     type: boolean
0064 
0065 required:
0066   - compatible
0067   - reg
0068   - clocks
0069   - clock-names
0070   - interrupts
0071   - "#io-channel-cells"
0072   - vdd-supply
0073 
0074 additionalProperties:
0075   type: object
0076 
0077 allOf:
0078   - if:
0079       properties:
0080         compatible:
0081           contains:
0082             enum:
0083               - samsung,exynos-adc-v1
0084               - samsung,exynos-adc-v2
0085               - samsung,exynos3250-adc
0086               - samsung,exynos4212-adc
0087     then:
0088       required:
0089         - samsung,syscon-phandle
0090 
0091   - if:
0092       properties:
0093         compatible:
0094           contains:
0095             enum:
0096               - samsung,exynos3250-adc
0097     then:
0098       properties:
0099         clocks:
0100           minItems: 2
0101           maxItems: 2
0102         clock-names:
0103           items:
0104             - const: adc
0105             - const: sclk
0106     else:
0107       properties:
0108         clocks:
0109           minItems: 1
0110           maxItems: 1
0111         clock-names:
0112           items:
0113             - const: adc
0114 
0115   - if:
0116       required:
0117         - has-touchscreen
0118     then:
0119       properties:
0120         interrupts:
0121           minItems: 2
0122           maxItems: 2
0123 
0124 examples:
0125   - |
0126     adc: adc@12d10000 {
0127         compatible = "samsung,exynos-adc-v1";
0128         reg = <0x12d10000 0x100>;
0129         interrupts = <0 106 0>;
0130         #io-channel-cells = <1>;
0131 
0132         clocks = <&clock 303>;
0133         clock-names = "adc";
0134 
0135         vdd-supply = <&buck5_reg>;
0136         samsung,syscon-phandle = <&pmu_system_controller>;
0137 
0138         /* NTC thermistor is a hwmon device */
0139         thermistor {
0140             compatible = "murata,ncp15wb473";
0141             pullup-uv = <1800000>;
0142             pullup-ohm = <47000>;
0143             pulldown-ohm = <0>;
0144             io-channels = <&adc 4>;
0145           };
0146     };
0147 
0148   - |
0149     #include <dt-bindings/clock/exynos3250.h>
0150 
0151     adc@126c0000 {
0152         compatible = "samsung,exynos3250-adc";
0153         reg = <0x126C0000 0x100>;
0154         interrupts = <0 137 0>;
0155         #io-channel-cells = <1>;
0156 
0157         clocks = <&cmu CLK_TSADC>,
0158                  <&cmu CLK_SCLK_TSADC>;
0159         clock-names = "adc", "sclk";
0160 
0161         vdd-supply = <&buck5_reg>;
0162         samsung,syscon-phandle = <&pmu_system_controller>;
0163     };