| /* Copyright (c) 2018, The Linux Foundation. All rights reserved. |
| * |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 and |
| * only version 2 as published by the Free Software Foundation. |
| * |
| * This program is distributed in the hope that it will be useful, |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| * GNU General Public License for more details. |
| */ |
| |
| #include "../qcom/sm8150-audio-overlay.dtsi" |
| #include <dt-bindings/mfd/iaxxx.h> |
| |
| &tlmm { |
| cs35l36_pins { |
| cs35l36_reset_top: cs35l36_reset_top { |
| mux { |
| pins = "gpio35"; |
| function = "gpio"; |
| }; |
| |
| config { |
| pins = "gpio35"; |
| drive-strength = <2>; |
| bias-disable; |
| }; |
| }; |
| |
| cs35l36_irq_top: cs35l36_irq_top { |
| mux { |
| pins = "gpio36"; |
| function = "gpio"; |
| }; |
| |
| config { |
| pins = "gpio36"; |
| drive-strength = <2>; |
| bias-pull-up; |
| }; |
| }; |
| cs35l36_reset_bottom: cs35l36_reset_bottom { |
| mux { |
| pins = "gpio148"; |
| function = "gpio"; |
| }; |
| |
| config { |
| pins = "gpio148"; |
| drive-strength = <2>; |
| bias-disable; |
| }; |
| }; |
| |
| cs35l36_irq_bottom: cs35l36_irq_bottom { |
| mux { |
| pins = "gpio132"; |
| function = "gpio"; |
| }; |
| |
| config { |
| pins = "gpio132"; |
| drive-strength = <2>; |
| bias-pull-up; |
| }; |
| }; |
| }; |
| }; |
| |
| &qupv3_se15_i2c { |
| status = "ok"; |
| cs35l36_codec_bottom: cs35l36@40 { |
| /* bottom speaker - portrait right */ |
| compatible = "cirrus,cs35l36"; |
| reg = <0x40>; |
| reset-gpios = <&tlmm 148 0>; |
| irq-gpio = <&tlmm 132 0>; |
| //VA-supply = <&pm8150_s4>; |
| interrupt-parent = <&tlmm>; |
| interrupts = <132 IRQ_TYPE_LEVEL_LOW>; |
| pinctrl-names = "default"; |
| pinctrl-0 = <&cs35l36_reset_bottom &cs35l36_irq_bottom>; |
| cirrus,boost-ind-nanohenry = <1000>; |
| cirrus,boost-ctl-select = <0x01>; |
| cirrus,boost-ctl-millivolt = <10000>; |
| cirrus,boost-peak-milliamp = <3700>; |
| cirrus,amp-gain-zc; |
| cirrus,ldm-mode-select = <0x01>; |
| cirrus,pdm-ldm-exit; |
| cirrus,pdm-ldm-enter; |
| cirrus,weak-fet-delay = <0x04>; |
| cirrus,weak-fet-thld = <0x01>; |
| cirrus,temp-warn-threshold = <0x01>; |
| cirrus,multi-amp-mode; |
| cirrus,name = "cs35l36_r"; |
| |
| cirrus,irq-config { |
| cirrus,irq-drive-select = <0x00>; |
| cirrus,irq-polarity = <0x00>; |
| cirrus,irq-gpio-select = <0x00>; |
| cirrus,irq-output-enable = <0x01>; |
| cirrus,irq-src-select = <0x01>; |
| }; |
| }; |
| |
| cs35l36_codec_top: cs35l36@41 { |
| /* top speaker - portrait left */ |
| compatible = "cirrus,cs35l36"; |
| reg = <0x41>; |
| reset-gpios = <&tlmm 35 0>; |
| irq-gpio = <&tlmm 36 0>; |
| //VA-supply = <&pm8150_s4>; |
| interrupt-parent = <&tlmm>; |
| interrupts = <36 IRQ_TYPE_LEVEL_LOW>; |
| pinctrl-names = "default"; |
| pinctrl-0 = <&cs35l36_reset_top &cs35l36_irq_top>; |
| cirrus,boost-ind-nanohenry = <1000>; |
| cirrus,boost-ctl-select = <0x01>; |
| cirrus,boost-ctl-millivolt = <10000>; |
| cirrus,boost-peak-milliamp = <3700>; |
| cirrus,amp-gain-zc; |
| cirrus,ldm-mode-select = <0x01>; |
| cirrus,pdm-ldm-exit; |
| cirrus,pdm-ldm-enter; |
| cirrus,weak-fet-delay = <0x04>; |
| cirrus,weak-fet-thld = <0x01>; |
| cirrus,temp-warn-threshold = <0x01>; |
| cirrus,multi-amp-mode; |
| cirrus,name = "cs35l36_l"; |
| |
| cirrus,irq-config { |
| cirrus,irq-drive-select = <0x00>; |
| cirrus,irq-polarity = <0x00>; |
| cirrus,irq-gpio-select = <0x00>; |
| cirrus,irq-output-enable = <0x01>; |
| cirrus,irq-src-select = <0x01>; |
| }; |
| }; |
| }; |
| |
| &dai_tert_tdm_rx_0 { |
| qcom,msm-cpudai-tdm-header-start-offset = <0>; |
| qcom,msm-cpudai-tdm-header-width = <2>; |
| qcom,msm-cpudai-tdm-header-num-frame-repeat = <8>; |
| }; |
| |
| &soc { |
| qcom,msm-dai-tdm-tert-rx { |
| qcom,msm-cpudai-tdm-clk-rate = <6144000>; |
| qcom,msm-cpudai-tdm-clk-attribute = /bits/ 16 <1>; |
| qcom,msm-cpudai-tdm-sync-mode = <0>; |
| qcom,msm-cpudai-tdm-invert-sync = <0>; |
| qcom,msm-cpudai-tdm-group-num-ports = <2>; |
| qcom,msm-cpudai-tdm-group-port-id = <36896 36898>; |
| |
| pinctrl-names = "default", "sleep"; |
| pinctrl-0 = <&tert_mi2s_active &tert_mi2s_sd0_active |
| &tert_mi2s_sd1_active>; |
| pinctrl-1 = <&tert_mi2s_sleep &tert_mi2s_sd0_sleep |
| &tert_mi2s_sd1_sleep>; |
| |
| dai_tert_tdm_rx_1: qcom,msm-dai-q6-tdm-tert-rx-1 { |
| compatible = "qcom,msm-dai-q6-tdm"; |
| qcom,msm-cpudai-tdm-dev-id = <36898>; |
| qcom,msm-cpudai-tdm-data-align = <0>; |
| }; |
| |
| }; |
| |
| qcom,msm-dai-tdm-tert-tx { |
| qcom,msm-cpudai-tdm-clk-rate = <6144000>; |
| qcom,msm-cpudai-tdm-clk-attribute = /bits/ 16 <1>; |
| qcom,msm-cpudai-tdm-sync-mode = <0>; |
| qcom,msm-cpudai-tdm-invert-sync = <0>; |
| }; |
| |
| msm_cirrus_playback: msm_cirrus_playback { |
| compatible = "cirrus,msm-cirrus-playback"; |
| usecase-names = "Playback"; |
| |
| /* |
| * Mapping formula from audio hw |
| * ohm = imp / Qfactor * Amp_Constant |
| * ohm = imp / 8192 * 5.85714 |
| */ |
| |
| /* the resistance is 6.2 ohm */ |
| cirrus,top-speaker-impedance = <8671>; |
| |
| /* the percentage of tolerance is 10 */ |
| cirrus,top-speaker-tolerance = <10>; |
| |
| /* the resistance is 6.2 ohm */ |
| cirrus,top-speaker-mean = <8671>; |
| |
| /* the resistance is 6.2 ohm */ |
| cirrus,bottom-speaker-impedance = <8671>; |
| |
| /* the percentage of tolerance is 10 */ |
| cirrus,bottom-speaker-tolerance = <10>; |
| |
| /* the resistance is 6.2 ohm */ |
| cirrus,bottom-speaker-mean = <8671>; |
| }; |
| |
| qcom,msm-dai-tdm-quat-rx { |
| qcom,msm-cpudai-tdm-group-num-ports = <1>; |
| qcom,msm-cpudai-tdm-group-port-id = <36912>; |
| qcom,msm-cpudai-tdm-clk-rate = <6144000>; |
| qcom,msm-cpudai-tdm-clk-attribute = /bits/ 16 <1>; |
| qcom,msm-cpudai-tdm-sync-mode = <0>; |
| qcom,msm-cpudai-tdm-invert-sync = <0>; |
| }; |
| |
| qcom,msm-dai-tdm-quat-tx { |
| qcom,msm-cpudai-tdm-clk-rate = <6144000>; |
| qcom,msm-cpudai-tdm-clk-attribute = /bits/ 16 <1>; |
| qcom,msm-cpudai-tdm-sync-mode = <0>; |
| qcom,msm-cpudai-tdm-invert-sync = <0>; |
| }; |
| |
| iaxxx-mic { |
| compatible = "knowles,iaxxx-msm"; |
| model = "msm-oq-iaxxx"; |
| |
| iaxxx-odsp-celldrv { |
| device_type = "mfd_cell"; |
| compatible = "adnc,iaxxx-odsp-celldrv"; |
| }; |
| }; |
| }; |
| |
| &qupv3_se11_spi_active { |
| config { |
| drive-strength = <16>; |
| }; |
| }; |
| |
| &qupv3_se11_spi_sleep { |
| config { |
| drive-strength = <16>; |
| }; |
| }; |
| |
| /* knowles IA8508 SPI1 */ |
| &qupv3_se11_spi { |
| status = "ok"; |
| iaxxxspi1: iaxxx@0 { |
| compatible = "knowles,iaxxx-spi"; |
| reg = <0>; |
| #address-cells = <1>; |
| #size-cells = <0>; |
| |
| spi-max-frequency = <4800000>; |
| spi-cpha; |
| |
| /* Regulator LDO_9A, 1.2V, max load 385mA */ |
| adnc,vdd-core-supply = <&pm8150_l9>; |
| adnc,vdd-core-voltage-uV = <1224000 1224000>; |
| adnc,vdd-core-maxload-uA = <385000>; |
| |
| clock-names = "iaxxx_clk"; |
| clocks = <&clock_rpmh RPMH_LN_BB_CLK3>; |
| |
| adnc,reset-gpio = <&tlmm 143 0>; |
| adnc,event-gpio = <&tlmm 123 0>; |
| |
| adnc,pwr-vld-gpio = <&tlmm 151 0>; |
| adnc,spi-app-speed = <9600000>; |
| |
| /* Ext Oscillator: 0 , Int Oscillator: 1 */ |
| adnc,oscillator-mode = <1>; |
| |
| /* The PDM port used by FlickerSensor */ |
| adnc,sensor-port = <IAXXX_PDM_PORT_B>; |
| |
| /* no of output channels to mute and unmute */ |
| adnc,op-ch-active = <0xF>; |
| /* pcm port format configuration |
| * 0 is i2s mode |
| * 1 is tdm mode |
| * 2 is DSP_A mode |
| */ |
| adnc,pcm-port-fmt = <2>, <0>, <0>, <0>, <2>, <0>; |
| /* pcm port word length configuration |
| * 0: auto (according to application) |
| * 16: 16 bits per sample |
| * 20: 20 bits per sample |
| * 24: 24 bits per sample |
| * 32: 32 bits per sample |
| */ |
| adnc,pcm-port-word-len = <32>, <0>, <0>, <0>, <32>, <0>; |
| /* input pdm port acting as master or slave */ |
| adnc,ip-port-master = <0>, <0>, <0>, <0>, <0>, <0>, <1>; |
| /* Input pdm clock source for all microphones are defined |
| * here. |
| * Each MIC from same port can act as master clock source |
| * or it can be derived from common clock source from a |
| * shared port. |
| */ |
| adnc,ip-pdm-clk-src = <0>, <0>, <0>, <0>, <0>, <0>, <1>; |
| }; |
| }; |
| |
| /* sound card */ |
| &audio_apr { |
| snd_8150: snd_8150 { |
| compatible = "qcom,sm8150-asoc-snd"; |
| |
| qcom,model = "sm8150-iaxxx-floral-snd-card"; |
| |
| qcom,audio-routing = "AIF4 VI", "MCLK"; |
| |
| qcom,wcn-btfm; |
| qcom,mi2s-audio-intf; |
| qcom,auxpcm-audio-intf; |
| qcom,msm-mi2s-master = <1>, <1>, <1>, <1>, <1>; |
| |
| asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>, |
| <&loopback>, <&compress>, <&hostless>, |
| <&afe>, <&lsm>, <&routing>, <&compr>, |
| <&pcm_noirq>; |
| asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1", |
| "msm-pcm-dsp.2", "msm-voip-dsp", |
| "msm-pcm-voice", "msm-pcm-loopback", |
| "msm-compress-dsp", "msm-pcm-hostless", |
| "msm-pcm-afe", "msm-lsm-client", |
| "msm-pcm-routing", "msm-compr-dsp", |
| "msm-pcm-dsp-noirq"; |
| asoc-cpu = <&dai_hdmi>, <&dai_dp>, |
| <&dai_mi2s0>, <&dai_mi2s1>, |
| <&dai_mi2s2>, <&dai_mi2s3>, |
| <&dai_mi2s4>, <&dai_pri_auxpcm>, |
| <&dai_sec_auxpcm>, <&dai_tert_auxpcm>, |
| <&dai_quat_auxpcm>, <&dai_quin_auxpcm>, |
| |
| <&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>, |
| <&sb_2_rx>, <&sb_2_tx>, <&sb_3_rx>, <&sb_3_tx>, |
| <&sb_4_rx>, <&sb_4_tx>, <&sb_5_tx>, |
| |
| <&afe_pcm_rx>, <&afe_pcm_tx>, <&afe_proxy_rx>, |
| <&afe_proxy_tx>, <&incall_record_rx>, |
| <&incall_record_tx>, <&incall_music_rx>, |
| <&incall_music_2_rx>, |
| |
| <&sb_5_rx>, <&sb_6_rx>, |
| <&sb_7_rx>, <&sb_7_tx>, <&sb_8_tx>, |
| |
| <&usb_audio_rx>, <&usb_audio_tx>, |
| <&dai_pri_tdm_rx_0>, <&dai_pri_tdm_tx_0>, |
| <&dai_sec_tdm_rx_0>, <&dai_sec_tdm_tx_0>, |
| <&dai_tert_tdm_rx_0>, <&dai_tert_tdm_tx_0>, |
| <&dai_tert_tdm_rx_1>, |
| <&dai_quat_tdm_rx_0>, <&dai_quat_tdm_tx_0>, |
| <&dai_quin_tdm_rx_0>, <&dai_quin_tdm_tx_0>; |
| asoc-cpu-names = "msm-dai-q6-hdmi.8", "msm-dai-q6-dp.24608", |
| "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1", |
| "msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3", |
| "msm-dai-q6-mi2s.4", "msm-dai-q6-auxpcm.1", |
| "msm-dai-q6-auxpcm.2", "msm-dai-q6-auxpcm.3", |
| "msm-dai-q6-auxpcm.4", "msm-dai-q6-auxpcm.5", |
| |
| "msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385", |
| "msm-dai-q6-dev.16386", "msm-dai-q6-dev.16387", |
| "msm-dai-q6-dev.16388", "msm-dai-q6-dev.16389", |
| "msm-dai-q6-dev.16390", "msm-dai-q6-dev.16391", |
| "msm-dai-q6-dev.16392", "msm-dai-q6-dev.16393", |
| "msm-dai-q6-dev.16395", |
| |
| "msm-dai-q6-dev.224", |
| "msm-dai-q6-dev.225", "msm-dai-q6-dev.241", |
| "msm-dai-q6-dev.240", "msm-dai-q6-dev.32771", |
| "msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773", |
| "msm-dai-q6-dev.32770", |
| |
| "msm-dai-q6-dev.16394", |
| "msm-dai-q6-dev.16396", "msm-dai-q6-dev.16398", |
| "msm-dai-q6-dev.16399", "msm-dai-q6-dev.16401", |
| |
| "msm-dai-q6-dev.28672", "msm-dai-q6-dev.28673", |
| "msm-dai-q6-tdm.36864", "msm-dai-q6-tdm.36865", |
| "msm-dai-q6-tdm.36880", "msm-dai-q6-tdm.36881", |
| "msm-dai-q6-tdm.36896", "msm-dai-q6-tdm.36897", |
| "msm-dai-q6-tdm.36898", |
| "msm-dai-q6-tdm.36912", "msm-dai-q6-tdm.36913", |
| "msm-dai-q6-tdm.36928", "msm-dai-q6-tdm.36929"; |
| |
| asoc-codec = <&iaxxxspi1>, <&stub_codec>, |
| <&ext_disp_audio_codec>, |
| <&cs35l36_codec_bottom> , <&cs35l36_codec_top>; |
| asoc-codec-names = "iaxxx-codec", "msm-stub-codec.1", |
| "msm-ext-disp-audio-codec-rx", |
| "cs35l36_codec_bottom", "cs35l36_codec_top"; |
| |
| pinctrl-names = "quat_mi2s_enable", "quat_mi2s_disable", |
| "quat_tdm_enable", "quat_tdm_disable"; |
| pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active |
| &quat_mi2s_sd1_active>; |
| pinctrl-1 = <&quat_mi2s_sleep &quat_mi2s_sd0_sleep |
| &quat_mi2s_sd1_sleep>; |
| pinctrl-2 = <&quat_tdm_active &quat_tdm_dout_active |
| &quat_tdm_din_active>; |
| pinctrl-3 = <&quat_tdm_sleep &quat_tdm_dout_sleep |
| &quat_tdm_din_sleep>; |
| }; |
| }; |
| |
| &routing { |
| qcom,msm-pcm-config = "jaws"; |
| }; |
| |
| &snd_9360 { |
| status = "disabled"; |
| }; |
| |
| &snd_934x { |
| status = "disabled"; |
| }; |
| |
| &slim_aud { |
| status = "disabled"; |
| }; |
| |
| &clock_audio { |
| status = "disabled"; |
| }; |
| |
| &wcd9xxx_intc { |
| status = "disabled"; |
| }; |
| |
| &wcd_rst_gpio { |
| status = "disabled"; |
| }; |
| |
| &pahu_wdsp { |
| status = "disabled"; |
| }; |
| |
| &tavil_wdsp { |
| status = "disabled"; |
| }; |
| |
| &clock_audio_lnbb { |
| status = "disabled"; |
| }; |