18c2ecf20Sopenharmony_cimsm8916 analog audio CODEC 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciBindings for codec Analog IP which is integrated in pmic pm8916, 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci## Bindings for codec core on pmic: 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciRequired properties 88c2ecf20Sopenharmony_ci - compatible = "qcom,pm8916-wcd-analog-codec"; 98c2ecf20Sopenharmony_ci - reg: represents the slave base address provided to the peripheral. 108c2ecf20Sopenharmony_ci - interrupts: List of interrupts in given SPMI peripheral. 118c2ecf20Sopenharmony_ci - interrupt-names: Names specified to above list of interrupts in same 128c2ecf20Sopenharmony_ci order. List of supported interrupt names are: 138c2ecf20Sopenharmony_ci "cdc_spk_cnp_int" - Speaker click and pop interrupt. 148c2ecf20Sopenharmony_ci "cdc_spk_clip_int" - Speaker clip interrupt. 158c2ecf20Sopenharmony_ci "cdc_spk_ocp_int" - Speaker over current protect interrupt. 168c2ecf20Sopenharmony_ci "mbhc_ins_rem_det1" - jack insert removal detect interrupt 1. 178c2ecf20Sopenharmony_ci "mbhc_but_rel_det" - button release interrupt. 188c2ecf20Sopenharmony_ci "mbhc_but_press_det" - button press event 198c2ecf20Sopenharmony_ci "mbhc_ins_rem_det" - jack insert removal detect interrupt. 208c2ecf20Sopenharmony_ci "mbhc_switch_int" - multi button headset interrupt. 218c2ecf20Sopenharmony_ci "cdc_ear_ocp_int" - Earphone over current protect interrupt. 228c2ecf20Sopenharmony_ci "cdc_hphr_ocp_int" - Headphone R over current protect interrupt. 238c2ecf20Sopenharmony_ci "cdc_hphl_ocp_det" - Headphone L over current protect interrupt. 248c2ecf20Sopenharmony_ci "cdc_ear_cnp_int" - earphone cnp interrupt. 258c2ecf20Sopenharmony_ci "cdc_hphr_cnp_int" - hphr click and pop interrupt. 268c2ecf20Sopenharmony_ci "cdc_hphl_cnp_int" - hphl click and pop interrupt. 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci - clocks: Handle to mclk. 298c2ecf20Sopenharmony_ci - clock-names: should be "mclk" 308c2ecf20Sopenharmony_ci - vdd-cdc-io-supply: phandle to VDD_CDC_IO regulator DT node. 318c2ecf20Sopenharmony_ci - vdd-cdc-tx-rx-cx-supply: phandle to VDD_CDC_TX/RX/CX regulator DT node. 328c2ecf20Sopenharmony_ci - vdd-micbias-supply: phandle of VDD_MICBIAS supply's regulator DT node. 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciOptional Properties: 358c2ecf20Sopenharmony_ci - qcom,mbhc-vthreshold-low: Array of 5 threshold voltages in mV for 5 buttons 368c2ecf20Sopenharmony_ci detection on headset when the mbhc is powered up 378c2ecf20Sopenharmony_ci by internal current source, this is a low power. 388c2ecf20Sopenharmony_ci - qcom,mbhc-vthreshold-high: Array of 5 thresold voltages in mV for 5 buttons 398c2ecf20Sopenharmony_ci detection on headset when mbhc is powered up 408c2ecf20Sopenharmony_ci from micbias. 418c2ecf20Sopenharmony_ci- qcom,micbias-lvl: Voltage (mV) for Mic Bias 428c2ecf20Sopenharmony_ci- qcom,hphl-jack-type-normally-open: boolean, present if hphl pin on jack is a 438c2ecf20Sopenharmony_ci NO (Normally Open). If not specified, then 448c2ecf20Sopenharmony_ci its assumed that hphl pin on jack is NC 458c2ecf20Sopenharmony_ci (Normally Closed). 468c2ecf20Sopenharmony_ci- qcom,gnd-jack-type-normally-open: boolean, present if gnd pin on jack is 478c2ecf20Sopenharmony_ci NO (Normally Open). If not specified, then 488c2ecf20Sopenharmony_ci its assumed that gnd pin on jack is NC 498c2ecf20Sopenharmony_ci (Normally Closed). 508c2ecf20Sopenharmony_ci- qcom,micbias1-ext-cap: boolean, present if micbias1 has external capacitor 518c2ecf20Sopenharmony_ci connected. 528c2ecf20Sopenharmony_ci- qcom,micbias2-ext-cap: boolean, present if micbias2 has external capacitor 538c2ecf20Sopenharmony_ci connected. 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ciExample: 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_cispmi_bus { 588c2ecf20Sopenharmony_ci ... 598c2ecf20Sopenharmony_ci audio-codec@f000{ 608c2ecf20Sopenharmony_ci compatible = "qcom,pm8916-wcd-analog-codec"; 618c2ecf20Sopenharmony_ci reg = <0xf000 0x200>; 628c2ecf20Sopenharmony_ci reg-names = "pmic-codec-core"; 638c2ecf20Sopenharmony_ci clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; 648c2ecf20Sopenharmony_ci clock-names = "mclk"; 658c2ecf20Sopenharmony_ci qcom,mbhc-vthreshold-low = <75 150 237 450 500>; 668c2ecf20Sopenharmony_ci qcom,mbhc-vthreshold-high = <75 150 237 450 500>; 678c2ecf20Sopenharmony_ci interrupt-parent = <&spmi_bus>; 688c2ecf20Sopenharmony_ci interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>, 698c2ecf20Sopenharmony_ci <0x1 0xf0 0x1 IRQ_TYPE_NONE>, 708c2ecf20Sopenharmony_ci <0x1 0xf0 0x2 IRQ_TYPE_NONE>, 718c2ecf20Sopenharmony_ci <0x1 0xf0 0x3 IRQ_TYPE_NONE>, 728c2ecf20Sopenharmony_ci <0x1 0xf0 0x4 IRQ_TYPE_NONE>, 738c2ecf20Sopenharmony_ci <0x1 0xf0 0x5 IRQ_TYPE_NONE>, 748c2ecf20Sopenharmony_ci <0x1 0xf0 0x6 IRQ_TYPE_NONE>, 758c2ecf20Sopenharmony_ci <0x1 0xf0 0x7 IRQ_TYPE_NONE>, 768c2ecf20Sopenharmony_ci <0x1 0xf1 0x0 IRQ_TYPE_NONE>, 778c2ecf20Sopenharmony_ci <0x1 0xf1 0x1 IRQ_TYPE_NONE>, 788c2ecf20Sopenharmony_ci <0x1 0xf1 0x2 IRQ_TYPE_NONE>, 798c2ecf20Sopenharmony_ci <0x1 0xf1 0x3 IRQ_TYPE_NONE>, 808c2ecf20Sopenharmony_ci <0x1 0xf1 0x4 IRQ_TYPE_NONE>, 818c2ecf20Sopenharmony_ci <0x1 0xf1 0x5 IRQ_TYPE_NONE>; 828c2ecf20Sopenharmony_ci interrupt-names = "cdc_spk_cnp_int", 838c2ecf20Sopenharmony_ci "cdc_spk_clip_int", 848c2ecf20Sopenharmony_ci "cdc_spk_ocp_int", 858c2ecf20Sopenharmony_ci "mbhc_ins_rem_det1", 868c2ecf20Sopenharmony_ci "mbhc_but_rel_det", 878c2ecf20Sopenharmony_ci "mbhc_but_press_det", 888c2ecf20Sopenharmony_ci "mbhc_ins_rem_det", 898c2ecf20Sopenharmony_ci "mbhc_switch_int", 908c2ecf20Sopenharmony_ci "cdc_ear_ocp_int", 918c2ecf20Sopenharmony_ci "cdc_hphr_ocp_int", 928c2ecf20Sopenharmony_ci "cdc_hphl_ocp_det", 938c2ecf20Sopenharmony_ci "cdc_ear_cnp_int", 948c2ecf20Sopenharmony_ci "cdc_hphr_cnp_int", 958c2ecf20Sopenharmony_ci "cdc_hphl_cnp_int"; 968c2ecf20Sopenharmony_ci vdd-cdc-io-supply = <&pm8916_l5>; 978c2ecf20Sopenharmony_ci vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>; 988c2ecf20Sopenharmony_ci vdd-micbias-supply = <&pm8916_l13>; 998c2ecf20Sopenharmony_ci #sound-dai-cells = <1>; 1008c2ecf20Sopenharmony_ci }; 1018c2ecf20Sopenharmony_ci}; 102