Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: adc: Add Renesas GyroADC bindings

Add DT bindings for the Renesas RCar GyroADC block. This block is
a simple 4/8-channel ADC which samples 12/15/24 bits of data every
cycle from all channels.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: linux-renesas-soc@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Rob Herring <robh@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

authored by

Marek Vasut and committed by
Jonathan Cameron
ec2ef153 63d8d50c

+99
+99
Documentation/devicetree/bindings/iio/adc/renesas,gyroadc.txt
··· 1 + * Renesas RCar GyroADC device driver 2 + 3 + The GyroADC block is a reduced SPI block with up to 8 chipselect lines, 4 + which supports the SPI protocol of a selected few SPI ADCs. The SPI ADCs 5 + are sampled by the GyroADC block in a round-robin fashion and the result 6 + presented in the GyroADC registers. 7 + 8 + Required properties: 9 + - compatible: Should be "<soc-specific>", "renesas,rcar-gyroadc". 10 + The <soc-specific> should be one of: 11 + renesas,r8a7791-gyroadc - for the GyroADC block present 12 + in r8a7791 SoC 13 + renesas,r8a7792-gyroadc - for the GyroADC with interrupt 14 + block present in r8a7792 SoC 15 + - reg: Address and length of the register set for the device 16 + - clocks: References to all the clocks specified in the clock-names 17 + property as specified in 18 + Documentation/devicetree/bindings/clock/clock-bindings.txt. 19 + - clock-names: Shall contain "fck" and "if". The "fck" is the GyroADC block 20 + clock, the "if" is the interface clock. 21 + - power-domains: Must contain a reference to the PM domain, if available. 22 + - #address-cells: Should be <1> (setting for the subnodes) for all ADCs 23 + except for "fujitsu,mb88101a". Should be <0> (setting for 24 + only subnode) for "fujitsu,mb88101a". 25 + - #size-cells: Should be <0> (setting for the subnodes) 26 + 27 + Sub-nodes: 28 + You must define subnode(s) which select the connected ADC type and reference 29 + voltage for the GyroADC channels. 30 + 31 + Required properties for subnodes: 32 + - compatible: Should be either of: 33 + "fujitsu,mb88101a" 34 + - Fujitsu MB88101A compatible mode, 35 + 12bit sampling, up to 4 channels can be sampled in 36 + round-robin fashion. One Fujitsu chip supplies four 37 + GyroADC channels with data as it contains four ADCs 38 + on the chip and thus for 4-channel operation, single 39 + MB88101A is required. The Cx chipselect lines of the 40 + MB88101A connect directly to two CHS lines of the 41 + GyroADC, no demuxer is required. The data out line 42 + of each MB88101A connects to a shared input pin of 43 + the GyroADC. 44 + "ti,adcs7476" or "ti,adc121" or "adi,ad7476" 45 + - TI ADCS7476 / TI ADC121 / ADI AD7476 compatible mode, 46 + 15bit sampling, up to 8 channels can be sampled in 47 + round-robin fashion. One TI/ADI chip supplies single 48 + ADC channel with data, thus for 8-channel operation, 49 + 8 chips are required. A 3:8 chipselect demuxer is 50 + required to connect the nCS line of the TI/ADI chips 51 + to the GyroADC, while MISO line of each TI/ADI ADC 52 + connects to a shared input pin of the GyroADC. 53 + "maxim,max1162" or "maxim,max11100" 54 + - Maxim MAX1162 / Maxim MAX11100 compatible mode, 55 + 16bit sampling, up to 8 channels can be sampled in 56 + round-robin fashion. One Maxim chip supplies single 57 + ADC channel with data, thus for 8-channel operation, 58 + 8 chips are required. A 3:8 chipselect demuxer is 59 + required to connect the nCS line of the MAX chips 60 + to the GyroADC, while MISO line of each Maxim ADC 61 + connects to a shared input pin of the GyroADC. 62 + - reg: Should be the number of the analog input. Should be present 63 + for all ADCs except "fujitsu,mb88101a". 64 + - vref-supply: Reference to the channel reference voltage regulator. 65 + 66 + Example: 67 + vref_max1162: regulator-vref-max1162 { 68 + compatible = "regulator-fixed"; 69 + 70 + regulator-name = "MAX1162 Vref"; 71 + regulator-min-microvolt = <4096000>; 72 + regulator-max-microvolt = <4096000>; 73 + }; 74 + 75 + adc@e6e54000 { 76 + compatible = "renesas,r8a7791-gyroadc", "renesas,rcar-gyroadc"; 77 + reg = <0 0xe6e54000 0 64>; 78 + clocks = <&mstp9_clks R8A7791_CLK_GYROADC>, <&clk_65m>; 79 + clock-names = "fck", "if"; 80 + power-domains = <&sysc R8A7791_PD_ALWAYS_ON>; 81 + 82 + pinctrl-0 = <&adc_pins>; 83 + pinctrl-names = "default"; 84 + 85 + #address-cells = <1>; 86 + #size-cells = <0>; 87 + 88 + adc@0 { 89 + reg = <0>; 90 + compatible = "maxim,max1162"; 91 + vref-supply = <&vref_max1162>; 92 + }; 93 + 94 + adc@1 { 95 + reg = <1>; 96 + compatible = "maxim,max1162"; 97 + vref-supply = <&vref_max1162>; 98 + }; 99 + };