18c2ecf20Sopenharmony_ciCS35L36 Speaker Amplifier
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci  - compatible : "cirrus,cs35l36"
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci  - reg : the I2C address of the device for I2C
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci  - VA-supply, VP-supply : power supplies for the device,
108c2ecf20Sopenharmony_ci  as covered in
118c2ecf20Sopenharmony_ci  Documentation/devicetree/bindings/regulator/regulator.txt.
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci  - cirrus,boost-ctl-millivolt : Boost Voltage Value.  Configures the boost
148c2ecf20Sopenharmony_ci  converter's output voltage in mV. The range is from 2550mV to 12000mV with
158c2ecf20Sopenharmony_ci  increments of 50mV.
168c2ecf20Sopenharmony_ci  (Default) VP
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci  - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
198c2ecf20Sopenharmony_ci  Configures the peak current by monitoring the current through the boost FET.
208c2ecf20Sopenharmony_ci  Range starts at 1600mA and goes to a maximum of 4500mA with increments of
218c2ecf20Sopenharmony_ci  50mA.
228c2ecf20Sopenharmony_ci  (Default) 4.50 Amps
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci  - cirrus,boost-ind-nanohenry : Inductor estimation LBST reference value.
258c2ecf20Sopenharmony_ci  Seeds the digital boost converter's inductor estimation block with the initial
268c2ecf20Sopenharmony_ci  inductance value to reference.
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci  1000 = 1uH (Default)
298c2ecf20Sopenharmony_ci  1200 = 1.2uH
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciOptional properties:
328c2ecf20Sopenharmony_ci  - cirrus,multi-amp-mode : Boolean to determine if there are more than
338c2ecf20Sopenharmony_ci  one amplifier in the system. If more than one it is best to Hi-Z the ASP
348c2ecf20Sopenharmony_ci  port to prevent bus contention on the output signal
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci  - cirrus,boost-ctl-select : Boost conerter control source selection.
378c2ecf20Sopenharmony_ci  Selects the source of the BST_CTL target VBST voltage for the boost
388c2ecf20Sopenharmony_ci  converter to generate.
398c2ecf20Sopenharmony_ci  0x00 - Control Port Value
408c2ecf20Sopenharmony_ci  0x01 - Class H Tracking (Default)
418c2ecf20Sopenharmony_ci  0x10 - MultiDevice Sync Value
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci  - cirrus,amp-pcm-inv : Boolean to determine Amplifier will invert incoming
448c2ecf20Sopenharmony_ci  PCM data
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci  - cirrus,imon-pol-inv : Boolean to determine Amplifier will invert the
478c2ecf20Sopenharmony_ci  polarity of outbound IMON feedback data
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci  - cirrus,vmon-pol-inv : Boolean to determine Amplifier will invert the
508c2ecf20Sopenharmony_ci  polarity of outbound VMON feedback data
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci  - cirrus,dcm-mode-enable : Boost converter automatic DCM Mode enable.
538c2ecf20Sopenharmony_ci  This enables the digital boost converter to operate in a low power
548c2ecf20Sopenharmony_ci  (Discontinuous Conduction) mode during low loading conditions.
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci  - cirrus,weak-fet-disable : Boolean : The strength of the output drivers is
578c2ecf20Sopenharmony_ci  reduced when operating in a Weak-FET Drive Mode and must not be used to drive
588c2ecf20Sopenharmony_ci  a large load.
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci  - cirrus,classh-wk-fet-delay :  Weak-FET entry delay. Controls the delay
618c2ecf20Sopenharmony_ci  (in ms) before the Class H algorithm switches to the weak-FET voltage
628c2ecf20Sopenharmony_ci  (after the audio falls and remains below the value specified in WKFET_AMP_THLD).
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci  0 = 0ms
658c2ecf20Sopenharmony_ci  1 = 5ms
668c2ecf20Sopenharmony_ci  2 = 10ms
678c2ecf20Sopenharmony_ci  3 = 50ms
688c2ecf20Sopenharmony_ci  4 = 100ms (Default)
698c2ecf20Sopenharmony_ci  5 = 200ms
708c2ecf20Sopenharmony_ci  6 = 500ms
718c2ecf20Sopenharmony_ci  7 = 1000ms
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci  - cirrus,classh-weak-fet-thld-millivolt : Weak-FET amplifier drive threshold.
748c2ecf20Sopenharmony_ci  Configures the signal threshold at which the PWM output stage enters
758c2ecf20Sopenharmony_ci  weak-FET operation. The range is 50mV to 700mV in 50mV increments.
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci  - cirrus,temp-warn-threshold :  Amplifier overtemperature warning threshold.
788c2ecf20Sopenharmony_ci  Configures the threshold at which the overtemperature warning condition occurs.
798c2ecf20Sopenharmony_ci  When the threshold is met, the overtemperature warning attenuation is applied
808c2ecf20Sopenharmony_ci  and the TEMP_WARN_EINT interrupt status bit is set.
818c2ecf20Sopenharmony_ci  If TEMP_WARN_MASK = 0, INTb is asserted.
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci  0 = 105C
848c2ecf20Sopenharmony_ci  1 = 115C
858c2ecf20Sopenharmony_ci  2 = 125C (Default)
868c2ecf20Sopenharmony_ci  3 = 135C
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci  - cirrus,irq-drive-select : Selects the driver type of the selected interrupt
898c2ecf20Sopenharmony_ci  output.
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci  0 = Open-drain
928c2ecf20Sopenharmony_ci  1 = Push-pull (Default)
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ci  - cirrus,irq-gpio-select : Selects the pin to serve as the programmable
958c2ecf20Sopenharmony_ci  interrupt output.
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci  0 = PDM_DATA / SWIRE_SD / INT (Default)
988c2ecf20Sopenharmony_ci  1 = GPIO
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ciOptional properties for the "cirrus,vpbr-config" Sub-node
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci  - cirrus,vpbr-en : VBST brownout prevention enable. Configures whether the
1038c2ecf20Sopenharmony_ci  VBST brownout prevention algorithm is enabled or disabled.
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci  0 = VBST brownout prevention disabled (default)
1068c2ecf20Sopenharmony_ci  1 = VBST brownout prevention enabled
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ci  See Section 7.31.1 VPBR Config for configuration options & further details
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci  - cirrus,vpbr-thld : Initial VPBR threshold. Configures the VP brownout
1118c2ecf20Sopenharmony_ci  threshold voltage
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci  - cirrus,cirrus,vpbr-atk-rate : Attenuation attack step rate. Configures the
1148c2ecf20Sopenharmony_ci  amount delay between consecutive volume attenuation steps when a brownout
1158c2ecf20Sopenharmony_ci  condition is present and the VP brownout condition is in an attacking state.
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ci  - cirrus,vpbr-atk-vol : VP brownout prevention step size. Configures the VP
1188c2ecf20Sopenharmony_ci  brownout prevention attacking attenuation step size when operating in either
1198c2ecf20Sopenharmony_ci  digital volume or analog gain modes.
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ci  - cirrus,vpbr-max-attn : Maximum attenuation that the VP brownout prevention
1228c2ecf20Sopenharmony_ci  can apply to the audio signal.
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ci  - cirrus,vpbr-wait : Configures the delay time between a brownout condition
1258c2ecf20Sopenharmony_ci  no longer being present and the VP brownout prevention entering an attenuation
1268c2ecf20Sopenharmony_ci  release state.
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ci  - cirrus,vpbr-rel-rate : Attenuation release step rate. Configures the delay
1298c2ecf20Sopenharmony_ci  between consecutive volume attenuation release steps when a brownout condition
1308c2ecf20Sopenharmony_ci  is not longer present and the VP brownout is in an attenuation release state.
1318c2ecf20Sopenharmony_ci
1328c2ecf20Sopenharmony_ci  - cirrus,vpbr-mute-en : During the attack state, if the vpbr-max-attn value
1338c2ecf20Sopenharmony_ci  is reached, the error condition still remains, and this bit is set, the audio
1348c2ecf20Sopenharmony_ci  is muted.
1358c2ecf20Sopenharmony_ci
1368c2ecf20Sopenharmony_ciExample:
1378c2ecf20Sopenharmony_ci
1388c2ecf20Sopenharmony_cics35l36: cs35l36@40 {
1398c2ecf20Sopenharmony_ci	compatible = "cirrus,cs35l36";
1408c2ecf20Sopenharmony_ci	reg = <0x40>;
1418c2ecf20Sopenharmony_ci	VA-supply = <&dummy_vreg>;
1428c2ecf20Sopenharmony_ci	VP-supply = <&dummy_vreg>;
1438c2ecf20Sopenharmony_ci	reset-gpios = <&gpio0 54 0>;
1448c2ecf20Sopenharmony_ci	interrupt-parent = <&gpio8>;
1458c2ecf20Sopenharmony_ci	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
1468c2ecf20Sopenharmony_ci
1478c2ecf20Sopenharmony_ci	cirrus,boost-ind-nanohenry = <1000>;
1488c2ecf20Sopenharmony_ci	cirrus,boost-ctl-millivolt = <10000>;
1498c2ecf20Sopenharmony_ci	cirrus,boost-peak-milliamp = <4500>;
1508c2ecf20Sopenharmony_ci	cirrus,boost-ctl-select = <0x00>;
1518c2ecf20Sopenharmony_ci	cirrus,weak-fet-delay = <0x04>;
1528c2ecf20Sopenharmony_ci	cirrus,weak-fet-thld = <0x01>;
1538c2ecf20Sopenharmony_ci	cirrus,temp-warn-threshold = <0x01>;
1548c2ecf20Sopenharmony_ci	cirrus,multi-amp-mode;
1558c2ecf20Sopenharmony_ci	cirrus,irq-drive-select = <0x01>;
1568c2ecf20Sopenharmony_ci	cirrus,irq-gpio-select = <0x01>;
1578c2ecf20Sopenharmony_ci
1588c2ecf20Sopenharmony_ci	cirrus,vpbr-config {
1598c2ecf20Sopenharmony_ci		cirrus,vpbr-en = <0x00>;
1608c2ecf20Sopenharmony_ci		cirrus,vpbr-thld = <0x05>;
1618c2ecf20Sopenharmony_ci		cirrus,vpbr-atk-rate = <0x02>;
1628c2ecf20Sopenharmony_ci		cirrus,vpbr-atk-vol = <0x01>;
1638c2ecf20Sopenharmony_ci		cirrus,vpbr-max-attn = <0x09>;
1648c2ecf20Sopenharmony_ci		cirrus,vpbr-wait = <0x01>;
1658c2ecf20Sopenharmony_ci		cirrus,vpbr-rel-rate = <0x05>;
1668c2ecf20Sopenharmony_ci		cirrus,vpbr-mute-en = <0x00>;
1678c2ecf20Sopenharmony_ci	};
1688c2ecf20Sopenharmony_ci};
169