xref: /linux/Documentation/devicetree/bindings/sound/cs35l36.txt (revision a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0)
10d250bf2SJames SchulmanCS35L36 Speaker Amplifier
20d250bf2SJames Schulman
30d250bf2SJames SchulmanRequired properties:
40d250bf2SJames Schulman
50d250bf2SJames Schulman  - compatible : "cirrus,cs35l36"
60d250bf2SJames Schulman
70d250bf2SJames Schulman  - reg : the I2C address of the device for I2C
80d250bf2SJames Schulman
90d250bf2SJames Schulman  - VA-supply, VP-supply : power supplies for the device,
100d250bf2SJames Schulman  as covered in
110d250bf2SJames Schulman  Documentation/devicetree/bindings/regulator/regulator.txt.
120d250bf2SJames Schulman
130d250bf2SJames Schulman  - cirrus,boost-ctl-millivolt : Boost Voltage Value.  Configures the boost
140d250bf2SJames Schulman  converter's output voltage in mV. The range is from 2550mV to 12000mV with
150d250bf2SJames Schulman  increments of 50mV.
160d250bf2SJames Schulman  (Default) VP
170d250bf2SJames Schulman
180d250bf2SJames Schulman  - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
190d250bf2SJames Schulman  Configures the peak current by monitoring the current through the boost FET.
200d250bf2SJames Schulman  Range starts at 1600mA and goes to a maximum of 4500mA with increments of
210d250bf2SJames Schulman  50mA.
220d250bf2SJames Schulman  (Default) 4.50 Amps
230d250bf2SJames Schulman
240d250bf2SJames Schulman  - cirrus,boost-ind-nanohenry : Inductor estimation LBST reference value.
250d250bf2SJames Schulman  Seeds the digital boost converter's inductor estimation block with the initial
260d250bf2SJames Schulman  inductance value to reference.
270d250bf2SJames Schulman
280d250bf2SJames Schulman  1000 = 1uH (Default)
290d250bf2SJames Schulman  1200 = 1.2uH
300d250bf2SJames Schulman
310d250bf2SJames SchulmanOptional properties:
320d250bf2SJames Schulman  - cirrus,multi-amp-mode : Boolean to determine if there are more than
330d250bf2SJames Schulman  one amplifier in the system. If more than one it is best to Hi-Z the ASP
340d250bf2SJames Schulman  port to prevent bus contention on the output signal
350d250bf2SJames Schulman
36*47aab533SBjorn Helgaas  - cirrus,boost-ctl-select : Boost converter control source selection.
370d250bf2SJames Schulman  Selects the source of the BST_CTL target VBST voltage for the boost
380d250bf2SJames Schulman  converter to generate.
390d250bf2SJames Schulman  0x00 - Control Port Value
400d250bf2SJames Schulman  0x01 - Class H Tracking (Default)
410d250bf2SJames Schulman  0x10 - MultiDevice Sync Value
420d250bf2SJames Schulman
430d250bf2SJames Schulman  - cirrus,amp-pcm-inv : Boolean to determine Amplifier will invert incoming
440d250bf2SJames Schulman  PCM data
450d250bf2SJames Schulman
460d250bf2SJames Schulman  - cirrus,imon-pol-inv : Boolean to determine Amplifier will invert the
470d250bf2SJames Schulman  polarity of outbound IMON feedback data
480d250bf2SJames Schulman
490d250bf2SJames Schulman  - cirrus,vmon-pol-inv : Boolean to determine Amplifier will invert the
500d250bf2SJames Schulman  polarity of outbound VMON feedback data
510d250bf2SJames Schulman
520d250bf2SJames Schulman  - cirrus,dcm-mode-enable : Boost converter automatic DCM Mode enable.
530d250bf2SJames Schulman  This enables the digital boost converter to operate in a low power
540d250bf2SJames Schulman  (Discontinuous Conduction) mode during low loading conditions.
550d250bf2SJames Schulman
560d250bf2SJames Schulman  - cirrus,weak-fet-disable : Boolean : The strength of the output drivers is
570d250bf2SJames Schulman  reduced when operating in a Weak-FET Drive Mode and must not be used to drive
580d250bf2SJames Schulman  a large load.
590d250bf2SJames Schulman
600d250bf2SJames Schulman  - cirrus,classh-wk-fet-delay :  Weak-FET entry delay. Controls the delay
610d250bf2SJames Schulman  (in ms) before the Class H algorithm switches to the weak-FET voltage
620d250bf2SJames Schulman  (after the audio falls and remains below the value specified in WKFET_AMP_THLD).
630d250bf2SJames Schulman
640d250bf2SJames Schulman  0 = 0ms
650d250bf2SJames Schulman  1 = 5ms
660d250bf2SJames Schulman  2 = 10ms
670d250bf2SJames Schulman  3 = 50ms
680d250bf2SJames Schulman  4 = 100ms (Default)
690d250bf2SJames Schulman  5 = 200ms
700d250bf2SJames Schulman  6 = 500ms
710d250bf2SJames Schulman  7 = 1000ms
720d250bf2SJames Schulman
730d250bf2SJames Schulman  - cirrus,classh-weak-fet-thld-millivolt : Weak-FET amplifier drive threshold.
740d250bf2SJames Schulman  Configures the signal threshold at which the PWM output stage enters
750d250bf2SJames Schulman  weak-FET operation. The range is 50mV to 700mV in 50mV increments.
760d250bf2SJames Schulman
770d250bf2SJames Schulman  - cirrus,temp-warn-threshold :  Amplifier overtemperature warning threshold.
780d250bf2SJames Schulman  Configures the threshold at which the overtemperature warning condition occurs.
790d250bf2SJames Schulman  When the threshold is met, the overtemperature warning attenuation is applied
800d250bf2SJames Schulman  and the TEMP_WARN_EINT interrupt status bit is set.
810d250bf2SJames Schulman  If TEMP_WARN_MASK = 0, INTb is asserted.
820d250bf2SJames Schulman
830d250bf2SJames Schulman  0 = 105C
840d250bf2SJames Schulman  1 = 115C
850d250bf2SJames Schulman  2 = 125C (Default)
860d250bf2SJames Schulman  3 = 135C
870d250bf2SJames Schulman
880d250bf2SJames Schulman  - cirrus,irq-drive-select : Selects the driver type of the selected interrupt
890d250bf2SJames Schulman  output.
900d250bf2SJames Schulman
910d250bf2SJames Schulman  0 = Open-drain
920d250bf2SJames Schulman  1 = Push-pull (Default)
930d250bf2SJames Schulman
940d250bf2SJames Schulman  - cirrus,irq-gpio-select : Selects the pin to serve as the programmable
950d250bf2SJames Schulman  interrupt output.
960d250bf2SJames Schulman
970d250bf2SJames Schulman  0 = PDM_DATA / SWIRE_SD / INT (Default)
980d250bf2SJames Schulman  1 = GPIO
990d250bf2SJames Schulman
1000d250bf2SJames SchulmanOptional properties for the "cirrus,vpbr-config" Sub-node
1010d250bf2SJames Schulman
1020d250bf2SJames Schulman  - cirrus,vpbr-en : VBST brownout prevention enable. Configures whether the
1030d250bf2SJames Schulman  VBST brownout prevention algorithm is enabled or disabled.
1040d250bf2SJames Schulman
1050d250bf2SJames Schulman  0 = VBST brownout prevention disabled (default)
1060d250bf2SJames Schulman  1 = VBST brownout prevention enabled
1070d250bf2SJames Schulman
1080d250bf2SJames Schulman  See Section 7.31.1 VPBR Config for configuration options & further details
1090d250bf2SJames Schulman
1100d250bf2SJames Schulman  - cirrus,vpbr-thld : Initial VPBR threshold. Configures the VP brownout
1110d250bf2SJames Schulman  threshold voltage
1120d250bf2SJames Schulman
1130d250bf2SJames Schulman  - cirrus,cirrus,vpbr-atk-rate : Attenuation attack step rate. Configures the
1140d250bf2SJames Schulman  amount delay between consecutive volume attenuation steps when a brownout
1150d250bf2SJames Schulman  condition is present and the VP brownout condition is in an attacking state.
1160d250bf2SJames Schulman
1170d250bf2SJames Schulman  - cirrus,vpbr-atk-vol : VP brownout prevention step size. Configures the VP
1180d250bf2SJames Schulman  brownout prevention attacking attenuation step size when operating in either
1190d250bf2SJames Schulman  digital volume or analog gain modes.
1200d250bf2SJames Schulman
1210d250bf2SJames Schulman  - cirrus,vpbr-max-attn : Maximum attenuation that the VP brownout prevention
1220d250bf2SJames Schulman  can apply to the audio signal.
1230d250bf2SJames Schulman
1240d250bf2SJames Schulman  - cirrus,vpbr-wait : Configures the delay time between a brownout condition
1250d250bf2SJames Schulman  no longer being present and the VP brownout prevention entering an attenuation
1260d250bf2SJames Schulman  release state.
1270d250bf2SJames Schulman
1280d250bf2SJames Schulman  - cirrus,vpbr-rel-rate : Attenuation release step rate. Configures the delay
1290d250bf2SJames Schulman  between consecutive volume attenuation release steps when a brownout condition
1300d250bf2SJames Schulman  is not longer present and the VP brownout is in an attenuation release state.
1310d250bf2SJames Schulman
1320d250bf2SJames Schulman  - cirrus,vpbr-mute-en : During the attack state, if the vpbr-max-attn value
1330d250bf2SJames Schulman  is reached, the error condition still remains, and this bit is set, the audio
1340d250bf2SJames Schulman  is muted.
1350d250bf2SJames Schulman
1360d250bf2SJames SchulmanExample:
1370d250bf2SJames Schulman
1380d250bf2SJames Schulmancs35l36: cs35l36@40 {
1390d250bf2SJames Schulman	compatible = "cirrus,cs35l36";
1400d250bf2SJames Schulman	reg = <0x40>;
1410d250bf2SJames Schulman	VA-supply = <&dummy_vreg>;
1420d250bf2SJames Schulman	VP-supply = <&dummy_vreg>;
1430d250bf2SJames Schulman	reset-gpios = <&gpio0 54 0>;
1440d250bf2SJames Schulman	interrupt-parent = <&gpio8>;
1450d250bf2SJames Schulman	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
1460d250bf2SJames Schulman
1470d250bf2SJames Schulman	cirrus,boost-ind-nanohenry = <1000>;
1480d250bf2SJames Schulman	cirrus,boost-ctl-millivolt = <10000>;
1490d250bf2SJames Schulman	cirrus,boost-peak-milliamp = <4500>;
1500d250bf2SJames Schulman	cirrus,boost-ctl-select = <0x00>;
1510d250bf2SJames Schulman	cirrus,weak-fet-delay = <0x04>;
1520d250bf2SJames Schulman	cirrus,weak-fet-thld = <0x01>;
1530d250bf2SJames Schulman	cirrus,temp-warn-threshold = <0x01>;
1540d250bf2SJames Schulman	cirrus,multi-amp-mode;
1550d250bf2SJames Schulman	cirrus,irq-drive-select = <0x01>;
1560d250bf2SJames Schulman	cirrus,irq-gpio-select = <0x01>;
1570d250bf2SJames Schulman
1580d250bf2SJames Schulman	cirrus,vpbr-config {
1590d250bf2SJames Schulman		cirrus,vpbr-en = <0x00>;
1600d250bf2SJames Schulman		cirrus,vpbr-thld = <0x05>;
1610d250bf2SJames Schulman		cirrus,vpbr-atk-rate = <0x02>;
1620d250bf2SJames Schulman		cirrus,vpbr-atk-vol = <0x01>;
1630d250bf2SJames Schulman		cirrus,vpbr-max-attn = <0x09>;
1640d250bf2SJames Schulman		cirrus,vpbr-wait = <0x01>;
1650d250bf2SJames Schulman		cirrus,vpbr-rel-rate = <0x05>;
1660d250bf2SJames Schulman		cirrus,vpbr-mute-en = <0x00>;
1670d250bf2SJames Schulman	};
1680d250bf2SJames Schulman};
169