Naveen Krishna Chatradhi | 10f5b14 | 2013-02-15 06:56:00 +0000 | [diff] [blame] | 1 | Samsung Exynos Analog to Digital Converter bindings |
| 2 | |
Sachin Kamat | df4b404 | 2013-03-26 11:52:00 +0000 | [diff] [blame] | 3 | The devicetree bindings are for the new ADC driver written for |
Naveen Krishna Chatradhi | 10f5b14 | 2013-02-15 06:56:00 +0000 | [diff] [blame] | 4 | Exynos4 and upward SoCs from Samsung. |
| 5 | |
| 6 | New driver handles the following |
| 7 | 1. Supports ADC IF found on EXYNOS4412/EXYNOS5250 |
| 8 | and future SoCs from Samsung |
| 9 | 2. Add ADC driver under iio/adc framework |
| 10 | 3. Also adds the Documentation for device tree bindings |
| 11 | |
| 12 | Required properties: |
| 13 | - compatible: Must be "samsung,exynos-adc-v1" |
| 14 | for exynos4412/5250 controllers. |
| 15 | Must be "samsung,exynos-adc-v2" for |
| 16 | future controllers. |
| 17 | - reg: Contains ADC register address range (base address and |
Doug Anderson | bb916eb | 2013-03-13 20:40:00 +0000 | [diff] [blame] | 18 | length) and the address of the phy enable register. |
Naveen Krishna Chatradhi | 10f5b14 | 2013-02-15 06:56:00 +0000 | [diff] [blame] | 19 | - interrupts: Contains the interrupt information for the timer. The |
| 20 | format is being dependent on which interrupt controller |
| 21 | the Samsung device uses. |
| 22 | - #io-channel-cells = <1>; As ADC has multiple outputs |
Doug Anderson | 2b68402 | 2013-03-13 20:39:00 +0000 | [diff] [blame] | 23 | - clocks From common clock binding: handle to adc clock. |
| 24 | - clock-names From common clock binding: Shall be "adc". |
| 25 | - vdd-supply VDD input supply. |
Naveen Krishna Chatradhi | 10f5b14 | 2013-02-15 06:56:00 +0000 | [diff] [blame] | 26 | |
| 27 | Note: child nodes can be added for auto probing from device tree. |
| 28 | |
| 29 | Example: adding device info in dtsi file |
| 30 | |
| 31 | adc: adc@12D10000 { |
| 32 | compatible = "samsung,exynos-adc-v1"; |
Doug Anderson | bb916eb | 2013-03-13 20:40:00 +0000 | [diff] [blame] | 33 | reg = <0x12D10000 0x100>, <0x10040718 0x4>; |
Naveen Krishna Chatradhi | 10f5b14 | 2013-02-15 06:56:00 +0000 | [diff] [blame] | 34 | interrupts = <0 106 0>; |
| 35 | #io-channel-cells = <1>; |
| 36 | io-channel-ranges; |
Doug Anderson | 2b68402 | 2013-03-13 20:39:00 +0000 | [diff] [blame] | 37 | |
| 38 | clocks = <&clock 303>; |
| 39 | clock-names = "adc"; |
| 40 | |
| 41 | vdd-supply = <&buck5_reg>; |
Naveen Krishna Chatradhi | 10f5b14 | 2013-02-15 06:56:00 +0000 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | |
| 45 | Example: Adding child nodes in dts file |
| 46 | |
| 47 | adc@12D10000 { |
| 48 | |
| 49 | /* NTC thermistor is a hwmon device */ |
| 50 | ncp15wb473@0 { |
Naveen Krishna Chatradhi | 8b6f5e0 | 2014-06-25 11:59:31 +0530 | [diff] [blame] | 51 | compatible = "murata,ncp15wb473"; |
Chanwoo Choi | 1675088 | 2013-10-23 10:44:50 +0900 | [diff] [blame] | 52 | pullup-uv = <1800000>; |
Naveen Krishna Chatradhi | 10f5b14 | 2013-02-15 06:56:00 +0000 | [diff] [blame] | 53 | pullup-ohm = <47000>; |
| 54 | pulldown-ohm = <0>; |
| 55 | io-channels = <&adc 4>; |
| 56 | }; |
| 57 | }; |
| 58 | |
| 59 | Note: Does not apply to ADC driver under arch/arm/plat-samsung/ |
Sachin Kamat | df4b404 | 2013-03-26 11:52:00 +0000 | [diff] [blame] | 60 | Note: The child node can be added under the adc node or separately. |