cs35l33.txt 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. CS35L33 Speaker Amplifier
  2. Required properties:
  3. - compatible : "cirrus,cs35l33"
  4. - reg : the I2C address of the device for I2C
  5. - VA-supply, VP-supply : power supplies for the device,
  6. as covered in
  7. Documentation/devicetree/bindings/regulator/regulator.txt.
  8. Optional properties:
  9. - reset-gpios : gpio used to reset the amplifier
  10. - interrupt-parent : Specifies the phandle of the interrupt controller to
  11. which the IRQs from CS35L33 are delivered to.
  12. - interrupts : IRQ line info CS35L33.
  13. (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
  14. for further information relating to interrupt properties)
  15. - cirrus,boost-ctl : Booster voltage use to supply the amp. If the value is
  16. 0, then VBST = VP. If greater than 0, the boost voltage will be 3300mV with
  17. a value of 1 and will increase at a step size of 100mV until a maximum of
  18. 8000mV.
  19. - cirrus,ramp-rate : On power up, it affects the time from when the power
  20. up sequence begins to the time the audio reaches a full-scale output.
  21. On power down, it affects the time from when the power-down sequence
  22. begins to when the amplifier disables the PWM outputs. If this property
  23. is not set then soft ramping will be disabled and ramp time would be
  24. 20ms. If this property is set to 0,1,2,3 then ramp times would be 40ms,
  25. 60ms,100ms,175ms respectively for 48KHz sample rate.
  26. - cirrus,boost-ipk : The maximum current allowed for the boost converter.
  27. The range starts at 1850000uA and goes to a maximum of 3600000uA
  28. with a step size of 15625uA. The default is 2500000uA.
  29. - cirrus,imon-adc-scale : Configures the scaling of data bits from the IMON
  30. ADC data word. This property can be set as a value of 0 for bits 15 down
  31. to 0, 6 for 21 down to 6, 7, for 22 down to 7, 8 for 23 down to 8.
  32. Optional H/G Algorithm sub-node:
  33. The cs35l33 node can have a single "cirrus,hg-algo" sub-node that will enable
  34. the internal H/G Algorithm.
  35. - cirrus,hg-algo : Sub-node for internal Class H/G algorithm that
  36. controls the amplifier supplies.
  37. Optional properties for the "cirrus,hg-algo" sub-node:
  38. - cirrus,mem-depth : Memory depth for the Class H/G algorithm measured in
  39. LRCLK cycles. If this property is set to 0, 1, 2, or 3 then the memory
  40. depths will be 1, 4, 8, 16 LRCLK cycles. The default is 16 LRCLK cycles.
  41. cirrus,release-rate : The number of consecutive LRCLK periods before
  42. allowing release condition tracking updates. The number of LRCLK periods
  43. start at 3 to a maximum of 255.
  44. - cirrus,ldo-thld : Configures the signal threshold at which the PWM output
  45. stage enters LDO operation. Starts as a default value of 50mV for a value
  46. of 1 and increases with a step size of 50mV to a maximum of 750mV (value of
  47. 0xF).
  48. - cirrus,ldo-path-disable : This is a boolean property. If present, the H/G
  49. algorithm uses the max detection path. If not present, the LDO
  50. detection path is used.
  51. - cirrus,ldo-entry-delay : The LDO entry delay in milliseconds before the H/G
  52. algorithm switches to the LDO voltage. This property can be set to values
  53. from 0 to 7 for delays of 5ms, 10ms, 50ms, 100ms, 200ms, 500ms, 1000ms.
  54. The default is 100ms.
  55. - cirrus,vp-hg-auto : This is a boolean property. When set, class H/G VPhg
  56. automatic updating is enabled.
  57. - cirrus,vp-hg : Class H/G algorithm VPhg. Controls the H/G algorithm's
  58. reference to the VP voltage for when to start generating a boosted VBST.
  59. The reference voltage starts at 3000mV with a value of 0x3 and is increased
  60. by 100mV per step to a maximum of 5500mV.
  61. - cirrus,vp-hg-rate : The rate (number of LRCLK periods) at which the VPhg is
  62. allowed to increase to a higher voltage when using VPhg automatic
  63. tracking. This property can be set to values from 0 to 3 with rates of 128
  64. periods, 2048 periods, 32768 periods, and 524288 periods.
  65. The default is 32768 periods.
  66. - cirrus,vp-hg-va : VA calculation reference for automatic VPhg tracking
  67. using VPMON. This property can be set to values from 0 to 6 starting at
  68. 1800mV with a step size of 50mV up to a maximum value of 1750mV.
  69. Default is 1800mV.
  70. Example:
  71. cs35l33: cs35l33@40 {
  72. compatible = "cirrus,cs35l33";
  73. reg = <0x40>;
  74. VA-supply = <&ldo5_reg>;
  75. VP-supply = <&ldo5_reg>;
  76. interrupt-parent = <&gpio8>;
  77. interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
  78. reset-gpios = <&cs47l91 34 0>;
  79. cirrus,ramp-rate = <0x0>;
  80. cirrus,boost-ctl = <0x30>; /* VBST = 8000mV */
  81. cirrus,boost-ipk = <0xE0>; /* 3600mA */
  82. cirrus,imon-adc-scale = <0> /* Bits 15 down to 0 */
  83. cirrus,hg-algo {
  84. cirrus,mem-depth = <0x3>;
  85. cirrus,release-rate = <0x3>;
  86. cirrus,ldo-thld = <0x1>;
  87. cirrus,ldo-path-disable = <0x0>;
  88. cirrus,ldo-entry-delay=<0x4>;
  89. cirrus,vp-hg-auto;
  90. cirrus,vp-hg=<0xF>;
  91. cirrus,vp-hg-rate=<0x2>;
  92. cirrus,vp-hg-va=<0x0>;
  93. };
  94. };