18c2ecf20Sopenharmony_ciCS35L35 Boosted Speaker Amplifier
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci  - compatible : "cirrus,cs35l35"
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  - interrupts : IRQ line info CS35L35.
148c2ecf20Sopenharmony_ci    (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
158c2ecf20Sopenharmony_ci    for further information relating to interrupt properties)
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci - cirrus,boost-ind-nanohenry: Inductor value for boost converter. The value is
188c2ecf20Sopenharmony_ci    in nH and they can be values of 1000nH, 1200nH, 1500nH, and 2200nH.
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciOptional properties:
218c2ecf20Sopenharmony_ci  - reset-gpios : gpio used to reset the amplifier
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci  - cirrus,stereo-config : Boolean to determine if there are 2 AMPs for a
248c2ecf20Sopenharmony_ci  Stereo configuration
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci  - cirrus,audio-channel : Set Location of Audio Signal on Serial Port
278c2ecf20Sopenharmony_ci  0 = Data Packet received on Left I2S Channel
288c2ecf20Sopenharmony_ci  1 = Data Packet received on Right I2S Channel
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci  - cirrus,advisory-channel : Set Location of Advisory Signal on Serial Port
318c2ecf20Sopenharmony_ci  0 = Data Packet received on Left I2S Channel
328c2ecf20Sopenharmony_ci  1 = Data Packet received on Right I2S Channel
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci  - cirrus,shared-boost : Boolean to enable ClassH tracking of Advisory Signal
358c2ecf20Sopenharmony_ci  if 2 Devices share Boost BST_CTL
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci  - cirrus,external-boost : Boolean to specify the device is using an external
388c2ecf20Sopenharmony_ci  boost supply, note that sharing a boost from another cs35l35 would constitute
398c2ecf20Sopenharmony_ci  using an external supply for the slave device
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci  - cirrus,sp-drv-strength : Value for setting the Serial Port drive strength
428c2ecf20Sopenharmony_ci  Table 3-10 of the datasheet lists drive-strength specifications
438c2ecf20Sopenharmony_ci  0 = 1x (Default)
448c2ecf20Sopenharmony_ci  1 = .5x
458c2ecf20Sopenharmony_ci  - cirrus,sp-drv-unused : Determines how unused slots should be driven on the
468c2ecf20Sopenharmony_ci  Serial Port.
478c2ecf20Sopenharmony_ci  0 - Hi-Z
488c2ecf20Sopenharmony_ci  2 - Drive 0's (Default)
498c2ecf20Sopenharmony_ci  3 - Drive 1's
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci  - cirrus,bst-pdn-fet-on : Boolean to determine if the Boost PDN control
528c2ecf20Sopenharmony_ci  powers down with a rectification FET On or Off. If VSPK is supplied
538c2ecf20Sopenharmony_ci  externally then FET is off.
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci  - cirrus,boost-ctl-millivolt : Boost Voltage Value.  Configures the boost
568c2ecf20Sopenharmony_ci    converter's output voltage in mV. The range is from 2600mV to 9000mV with
578c2ecf20Sopenharmony_ci    increments of 100mV.
588c2ecf20Sopenharmony_ci    (Default) VP
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci  - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
618c2ecf20Sopenharmony_ci  Configures the peak current by monitoring the current through the boost FET.
628c2ecf20Sopenharmony_ci  Range starts at 1680mA and goes to a maximum of 4480mA with increments of
638c2ecf20Sopenharmony_ci  110mA.
648c2ecf20Sopenharmony_ci  (Default) 2.46 Amps
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci  - cirrus,amp-gain-zc : Boolean to determine if to use Amplifier gain-change
678c2ecf20Sopenharmony_ci  zero-cross
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ciOptional H/G Algorithm sub-node:
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci  The cs35l35 node can have a single "cirrus,classh-internal-algo" sub-node
728c2ecf20Sopenharmony_ci  that will disable automatic control of the internal H/G Algorithm.
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci  It is strongly recommended that the Datasheet be referenced when adjusting
758c2ecf20Sopenharmony_ci  or using these Class H Algorithm controls over the internal Algorithm.
768c2ecf20Sopenharmony_ci  Serious damage can occur to the Device and surrounding components.
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci  - cirrus,classh-internal-algo : Sub-node for the Internal Class H Algorithm
798c2ecf20Sopenharmony_ci  See Section 4.3 Internal Class H Algorithm in the Datasheet.
808c2ecf20Sopenharmony_ci  If not used, the device manages the ClassH Algorithm internally.
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ciOptional properties for the "cirrus,classh-internal-algo" Sub-node
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ci  Section 7.29 Class H Control
858c2ecf20Sopenharmony_ci  - cirrus,classh-bst-overide : Boolean
868c2ecf20Sopenharmony_ci  - cirrus,classh-bst-max-limit
878c2ecf20Sopenharmony_ci  - cirrus,classh-mem-depth
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci  Section 7.30 Class H Headroom Control
908c2ecf20Sopenharmony_ci  - cirrus,classh-headroom
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci  Section 7.31 Class H Release Rate
938c2ecf20Sopenharmony_ci  - cirrus,classh-release-rate
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ci  Section 7.32 Class H Weak FET Drive Control
968c2ecf20Sopenharmony_ci  - cirrus,classh-wk-fet-disable
978c2ecf20Sopenharmony_ci  - cirrus,classh-wk-fet-delay
988c2ecf20Sopenharmony_ci  - cirrus,classh-wk-fet-thld
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ci  Section 7.34 Class H VP Control
1018c2ecf20Sopenharmony_ci  - cirrus,classh-vpch-auto
1028c2ecf20Sopenharmony_ci  - cirrus,classh-vpch-rate
1038c2ecf20Sopenharmony_ci  - cirrus,classh-vpch-man
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ciOptional Monitor Signal Format sub-node:
1068c2ecf20Sopenharmony_ci
1078c2ecf20Sopenharmony_ci  The cs35l35 node can have a single "cirrus,monitor-signal-format" sub-node
1088c2ecf20Sopenharmony_ci  for adjusting the Depth, Location and Frame of the Monitoring Signals
1098c2ecf20Sopenharmony_ci  for Algorithms.
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ci  See Sections 4.8.2 through 4.8.4 Serial-Port Control in the Datasheet
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci  -cirrus,monitor-signal-format : Sub-node for the Monitor Signaling Formating
1148c2ecf20Sopenharmony_ci  on the I2S Port. Each of the 3 8 bit values in the array contain the settings
1158c2ecf20Sopenharmony_ci  for depth, location, and frame.
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ci  If not used, the defaults for the 6 monitor signals is used.
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ci  Sections 7.44 - 7.53 lists values for the depth, location, and frame
1208c2ecf20Sopenharmony_ci  for each monitoring signal.
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_ci  - cirrus,imon : 4 8 bit values to set the depth, location, frame and ADC
1238c2ecf20Sopenharmony_ci  scale of the IMON monitor signal.
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ci  - cirrus,vmon : 3 8 bit values to set the depth, location, and frame
1268c2ecf20Sopenharmony_ci  of the VMON monitor signal.
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ci  - cirrus,vpmon : 3 8 bit values to set the depth, location, and frame
1298c2ecf20Sopenharmony_ci  of the VPMON monitor signal.
1308c2ecf20Sopenharmony_ci
1318c2ecf20Sopenharmony_ci  - cirrus,vbstmon : 3 8 bit values to set the depth, location, and frame
1328c2ecf20Sopenharmony_ci  of the VBSTMON monitor signal
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ci  - cirrus,vpbrstat : 3 8 bit values to set the depth, location, and frame
1358c2ecf20Sopenharmony_ci  of the VPBRSTAT monitor signal
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ci  - cirrus,zerofill : 3 8 bit values to set the depth, location, and frame\
1388c2ecf20Sopenharmony_ci  of the ZEROFILL packet in the monitor signal
1398c2ecf20Sopenharmony_ci
1408c2ecf20Sopenharmony_ciExample:
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_cics35l35: cs35l35@20 {
1438c2ecf20Sopenharmony_ci	compatible = "cirrus,cs35l35";
1448c2ecf20Sopenharmony_ci	reg = <0x20>;
1458c2ecf20Sopenharmony_ci	VA-supply = <&dummy_vreg>;
1468c2ecf20Sopenharmony_ci	VP-supply = <&dummy_vreg>;
1478c2ecf20Sopenharmony_ci	reset-gpios = <&axi_gpio 54 0>;
1488c2ecf20Sopenharmony_ci	interrupt-parent = <&gpio8>;
1498c2ecf20Sopenharmony_ci	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
1508c2ecf20Sopenharmony_ci	cirrus,boost-ctl-millivolt = <9000>;
1518c2ecf20Sopenharmony_ci
1528c2ecf20Sopenharmony_ci	cirrus,stereo-config;
1538c2ecf20Sopenharmony_ci	cirrus,audio-channel = <0x00>;
1548c2ecf20Sopenharmony_ci	cirrus,advisory-channel = <0x01>;
1558c2ecf20Sopenharmony_ci	cirrus,shared-boost;
1568c2ecf20Sopenharmony_ci
1578c2ecf20Sopenharmony_ci	cirrus,classh-internal-algo {
1588c2ecf20Sopenharmony_ci		cirrus,classh-bst-overide;
1598c2ecf20Sopenharmony_ci		cirrus,classh-bst-max-limit = <0x01>;
1608c2ecf20Sopenharmony_ci		cirrus,classh-mem-depth = <0x01>;
1618c2ecf20Sopenharmony_ci		cirrus,classh-release-rate = <0x08>;
1628c2ecf20Sopenharmony_ci		cirrus,classh-headroom-millivolt = <0x0B>;
1638c2ecf20Sopenharmony_ci		cirrus,classh-wk-fet-disable = <0x01>;
1648c2ecf20Sopenharmony_ci		cirrus,classh-wk-fet-delay = <0x04>;
1658c2ecf20Sopenharmony_ci		cirrus,classh-wk-fet-thld = <0x01>;
1668c2ecf20Sopenharmony_ci		cirrus,classh-vpch-auto = <0x01>;
1678c2ecf20Sopenharmony_ci		cirrus,classh-vpch-rate = <0x02>;
1688c2ecf20Sopenharmony_ci		cirrus,classh-vpch-man = <0x05>;
1698c2ecf20Sopenharmony_ci	};
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_ci	/* Depth, Location, Frame */
1728c2ecf20Sopenharmony_ci	cirrus,monitor-signal-format {
1738c2ecf20Sopenharmony_ci		cirrus,imon = /bits/ 8 <0x03 0x00 0x01>;
1748c2ecf20Sopenharmony_ci		cirrus,vmon = /bits/ 8 <0x03 0x00 0x00>;
1758c2ecf20Sopenharmony_ci		cirrus,vpmon = /bits/ 8 <0x03 0x04 0x00>;
1768c2ecf20Sopenharmony_ci		cirrus,vbstmon = /bits/ 8 <0x03 0x04 0x01>;
1778c2ecf20Sopenharmony_ci		cirrus,vpbrstat = /bits/ 8 <0x00 0x04 0x00>;
1788c2ecf20Sopenharmony_ci		cirrus,zerofill = /bits/ 8 <0x00 0x00 0x00>;
1798c2ecf20Sopenharmony_ci	};
1808c2ecf20Sopenharmony_ci
1818c2ecf20Sopenharmony_ci};
182