renesas,gyroadc.txt 3.7 KB

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