18c2ecf20Sopenharmony_ciCS42L52 audio CODEC
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci  - compatible : "cirrus,cs42l56"
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci  - reg : the I2C address of the device for I2C
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci  - VA-supply, VCP-supply, VLDO-supply : power supplies for the device,
108c2ecf20Sopenharmony_ci  as covered in Documentation/devicetree/bindings/regulator/regulator.txt.
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciOptional properties:
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci  - cirrus,gpio-nreset : GPIO controller's phandle and the number
158c2ecf20Sopenharmony_ci  of the GPIO used to reset the codec.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci  - cirrus,chgfreq-divisor : Values used to set the Charge Pump Frequency.
188c2ecf20Sopenharmony_ci  Allowable values of 0x00 through 0x0F. These are raw values written to the
198c2ecf20Sopenharmony_ci  register, not the actual frequency. The frequency is determined by the following.
208c2ecf20Sopenharmony_ci  Frequency = MCLK / 4 * (N+2)
218c2ecf20Sopenharmony_ci  N = chgfreq_val
228c2ecf20Sopenharmony_ci  MCLK = Where MCLK is the frequency of the mclk signal after the MCLKDIV2 circuit.
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci  - cirrus,ain1a-ref-cfg, ain1b-ref-cfg : boolean, If present, AIN1A or AIN1B are configured
258c2ecf20Sopenharmony_ci  as a pseudo-differential input referenced to AIN1REF/AIN3A.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci  - cirrus,ain2a-ref-cfg, ain2b-ref-cfg : boolean, If present, AIN2A or AIN2B are configured
288c2ecf20Sopenharmony_ci  as a pseudo-differential input referenced to AIN2REF/AIN3B.
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci  - cirrus,micbias-lvl: Set the output voltage level on the MICBIAS Pin.
318c2ecf20Sopenharmony_ci  0 = 0.5 x VA
328c2ecf20Sopenharmony_ci  1 = 0.6 x VA
338c2ecf20Sopenharmony_ci  2 = 0.7 x VA
348c2ecf20Sopenharmony_ci  3 = 0.8 x VA
358c2ecf20Sopenharmony_ci  4 = 0.83 x VA
368c2ecf20Sopenharmony_ci  5 = 0.91 x VA
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci  - cirrus,adaptive-pwr-cfg : Configures how the power to the Headphone and Lineout
398c2ecf20Sopenharmony_ci  Amplifiers adapt to the output signal levels.
408c2ecf20Sopenharmony_ci  0 = Adapt to Volume Mode. Voltage level determined by the sum of the relevant volume settings.
418c2ecf20Sopenharmony_ci  1 = Fixed - Headphone and Line Amp supply = + or - VCP/2.
428c2ecf20Sopenharmony_ci  2 = Fixed - Headphone and Line Amp supply = + or - VCP.
438c2ecf20Sopenharmony_ci  3 = Adapted to Signal; Voltage level is dynamically determined by the output signal.
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci  - cirrus,hpf-left-freq, hpf-right-freq : Sets the corner frequency (-3dB point) for the internal High-Pass
468c2ecf20Sopenharmony_ci  Filter.
478c2ecf20Sopenharmony_ci  0 = 1.8Hz
488c2ecf20Sopenharmony_ci  1 = 119Hz
498c2ecf20Sopenharmony_ci  2 = 236Hz
508c2ecf20Sopenharmony_ci  3 = 464Hz
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ciExample:
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_cicodec: codec@4b {
568c2ecf20Sopenharmony_ci	compatible = "cirrus,cs42l56";
578c2ecf20Sopenharmony_ci	reg = <0x4b>;
588c2ecf20Sopenharmony_ci	cirrus,gpio-nreset = <&gpio 10 0>;
598c2ecf20Sopenharmony_ci	cirrus,chgfreq-divisor = <0x05>;
608c2ecf20Sopenharmony_ci	cirrus.ain1_ref_cfg;
618c2ecf20Sopenharmony_ci	cirrus,micbias-lvl = <5>;
628c2ecf20Sopenharmony_ci	VA-supply = <&reg_audio>;
638c2ecf20Sopenharmony_ci};
64