Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ properties:
- qcom,x1e80100-adsp-pas
- qcom,x1e80100-cdsp-pas
- items:
- const: qcom,sm8750-adsp-pas
- enum:
- qcom,kaanapali-adsp-pas
- qcom,sm8750-adsp-pas
- const: qcom,sm8550-adsp-pas
- items:
- enum:
- qcom,kaanapali-cdsp-pas
- const: qcom,sm8550-cdsp-pas
- items:
- const: qcom,sm8750-cdsp-pas
- const: qcom,sm8650-cdsp-pas
Expand Down Expand Up @@ -95,6 +101,8 @@ allOf:
compatible:
contains:
enum:
- qcom,kaanapali-adsp-pas
- qcom,kaanapali-cdsp-pas
- qcom,sm8750-adsp-pas
then:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ properties:
- items:
- enum:
- qcom,soundwire-v2.1.0
- qcom,soundwire-v2.2.0
- const: qcom,soundwire-v2.0.0

reg:
Expand Down
240 changes: 240 additions & 0 deletions arch/arm64/boot/dts/qcom/kaanapali-mtp.dts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,115 @@
clock-div = <2>;
};
};

sound {
compatible = "qcom,kaanapali-sndcard", "qcom,sm8450-sndcard";
model = "Kaanapali-MTP";

audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
"SpkrRight IN", "WSA_SPK2 OUT",
"IN1_HPHL", "HPHL_OUT",
"IN2_HPHR", "HPHR_OUT",
"AMIC2", "MIC BIAS2",
"VA DMIC0", "MIC BIAS1",
"VA DMIC1", "MIC BIAS1",
"VA DMIC2", "MIC BIAS3",
"VA DMIC3", "MIC BIAS3",
"TX SWR_INPUT1", "ADC2_OUTPUT";

wcd-playback-dai-link {
link-name = "WCD Playback";

codec {
sound-dai = <&wcd939x 0>, <&swr1 0>, <&lpass_rxmacro 0>;
};

cpu {
sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
};

platform {
sound-dai = <&q6apm>;
};
};

wcd-capture-dai-link {
link-name = "WCD Capture";

codec {
sound-dai = <&wcd939x 1>, <&swr2 0>, <&lpass_txmacro 0>;
};

cpu {
sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
};

platform {
sound-dai = <&q6apm>;
};
};

wsa-dai-link {
link-name = "WSA Playback";

codec {
sound-dai = <&north_spkr>, <&south_spkr>, <&swr0 0>,
<&lpass_wsamacro 0>;
};

cpu {
sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>;
};

platform {
sound-dai = <&q6apm>;
};
};

va-dai-link {
link-name = "VA Capture";

codec {
sound-dai = <&lpass_vamacro 0>;
};

cpu {
sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>;
};

platform {
sound-dai = <&q6apm>;
};
};
};

wcd939x: audio-codec {
compatible = "qcom,wcd9395-codec", "qcom,wcd9390-codec";

pinctrl-0 = <&wcd_default>;
pinctrl-names = "default";

qcom,micbias1-microvolt = <1800000>;
qcom,micbias2-microvolt = <1800000>;
qcom,micbias3-microvolt = <1800000>;
qcom,micbias4-microvolt = <1800000>;
qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000
500000 500000 500000 500000>;
qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
qcom,rx-device = <&wcd_rx>;
qcom,tx-device = <&wcd_tx>;

reset-gpios = <&tlmm 161 GPIO_ACTIVE_LOW>;

vdd-buck-supply = <&vreg_l15b_1p8>;
vdd-rxtx-supply = <&vreg_l15b_1p8>;
vdd-io-supply = <&vreg_l15b_1p8>;
vdd-mic-bias-supply = <&vreg_bob1>;
vdd-px-supply = <&vreg_l1g_1p2>;

#sound-dai-cells = <1>;
};
};

&apps_rsc {
Expand Down Expand Up @@ -684,6 +793,28 @@
reset-gpios = <&tlmm 102 GPIO_ACTIVE_LOW>;
};

&lpass_vamacro {
pinctrl-0 = <&dmic01_default>, <&dmic23_default>;
pinctrl-names = "default";

vdd-micb-supply = <&vreg_l10b_1p8>;
qcom,dmic-sample-rate = <4800000>;
};

&remoteproc_adsp {
firmware-name = "qcom/kaanapali/adsp.mbn",
"qcom/kaanapali/adsp_dtb.mbn";

status = "okay";
};

&remoteproc_cdsp {
firmware-name = "qcom/kaanapali/cdsp.mbn",
"qcom/kaanapali/cdsp_dtb.mbn";

status = "okay";
};

&sdhc_2 {
cd-gpios = <&tlmm 55 GPIO_ACTIVE_LOW>;

Expand All @@ -701,12 +832,114 @@
status = "okay";
};

&swr0 {
status = "okay";

/* WSA8845, Speaker North */
north_spkr: speaker@0,0 {
compatible = "sdw20217020400";
reg = <0 0>;
pinctrl-0 = <&spkr_0_sd_n_active>;
pinctrl-names = "default";
powerdown-gpios = <&tlmm 76 GPIO_ACTIVE_LOW>;
#sound-dai-cells = <0>;
sound-name-prefix = "SpkrLeft";
vdd-1p8-supply = <&vreg_l15b_1p8>;
vdd-io-supply = <&vreg_l2i_1p2>;

/*
* WSA8845 Port 1 (DAC) <=> SWR0 Port 1 (SPKR_L)
* WSA8845 Port 2 (COMP) <=> SWR0 Port 2 (SPKR_L_COMP)
* WSA8845 Port 3 (BOOST) <=> SWR0 Port 3 (SPKR_L_BOOST)
* WSA8845 Port 4 (PBR) <=> SWR0 Port 7 (PBR)
* WSA8845 Port 5 (VISENSE) <=> SWR0 Port 10 (SPKR_L_VI)
* WSA8845 Port 6 (CPS) <=> SWR0 Port 13 (CPS)
*/
qcom,port-mapping = <1 2 3 7 10 13>;
};

/* WSA8845, Speaker South */
south_spkr: speaker@0,1 {
compatible = "sdw20217020400";
reg = <0 1>;
pinctrl-0 = <&spkr_1_sd_n_active>;
pinctrl-names = "default";
powerdown-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>;
#sound-dai-cells = <0>;
sound-name-prefix = "SpkrRight";
vdd-1p8-supply = <&vreg_l15b_1p8>;
vdd-io-supply = <&vreg_l2i_1p2>;

/*
* WSA8845 Port 1 (DAC) <=> SWR0 Port 4 (SPKR_R)
* WSA8845 Port 2 (COMP) <=> SWR0 Port 5 (SPKR_R_COMP)
* WSA8845 Port 3 (BOOST) <=> SWR0 Port 6 (SPKR_R_BOOST)
* WSA8845 Port 4 (PBR) <=> SWR0 Port 7 (PBR)
* WSA8845 Port 5 (VISENSE) <=> SWR0 Port 11 (SPKR_R_VI)
* WSA8845 Port 6 (CPS) <=> SWR0 Port 13 (CPS)
*/
qcom,port-mapping = <4 5 6 7 11 13>;
};
};

&swr1 {
status = "okay";

/* WCD9395 RX */
wcd_rx: codec@0,4 {
compatible = "sdw20217010e00";
reg = <0 4>;

/*
* WCD9395 RX Port 1 (HPH_L/R) <=> SWR1 Port 1 (HPH_L/R)
* WCD9395 RX Port 2 (CLSH) <=> SWR1 Port 2 (CLSH)
* WCD9395 RX Port 3 (COMP_L/R) <=> SWR1 Port 3 (COMP_L/R)
* WCD9395 RX Port 4 (LO) <=> SWR1 Port 4 (LO)
* WCD9395 RX Port 5 (DSD_L/R) <=> SWR1 Port 5 (DSD_L/R)
* WCD9395 RX Port 6 (HIFI_PCM_L/R) <=> SWR1 Port 9 (HIFI_PCM_L/R)
*/
qcom,rx-port-mapping = <1 2 3 4 5 9>;
};
};

&swr2 {
status = "okay";

/* WCD9395 TX */
wcd_tx: codec@0,3 {
compatible = "sdw20217010e00";
reg = <0 3>;

/*
* WCD9395 TX Port 1 (ADC1,2,3,4) <=> SWR2 Port 2 (TX SWR_INPUT 0,1,2,3)
* WCD9395 TX Port 2 (ADC3,4 & DMIC0,1) <=> SWR2 Port 2 (TX SWR_INPUT 0,1,2,3)
* WCD9395 TX Port 3 (DMIC0,1,2,3 & MBHC) <=> SWR2 Port 3 (TX SWR_INPUT 4,5,6,7)
* WCD9395 TX Port 4 (DMIC4,5,6,7) <=> SWR2 Port 4 (TX SWR_INPUT 8,9,10,11)
*/
qcom,tx-port-mapping = <2 2 3 4>;
};
};

&tlmm {
gpio-reserved-ranges = <36 4>, /* NFC eSE SPI */
<74 1>, /* eSE */
<119 2>, /* SoCCP */
<144 4>; /* CXM UART */

spkr_0_sd_n_active: spkr-0-sd-n-active-state {
pins = "gpio76";
function = "gpio";
drive-strength = <16>;
bias-disable;
};

spkr_1_sd_n_active: spkr-1-sd-n-active-state {
pins = "gpio77";
function = "gpio";
drive-strength = <16>;
bias-disable;
};

pcie0_default_state: pcie0-default-state {
perst-n-pins {
pins = "gpio102";
Expand All @@ -729,6 +962,13 @@
bias-pull-up;
};
};

wcd_default: wcd-reset-n-active-state {
pins = "gpio161";
function = "gpio";
drive-strength = <16>;
bias-disable;
};
};

&uart7 {
Expand Down
14 changes: 14 additions & 0 deletions arch/arm64/boot/dts/qcom/kaanapali-qrd.dts
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,20 @@
status = "okay";
};

&remoteproc_adsp {
firmware-name = "qcom/kaanapali/adsp.mbn",
"qcom/kaanapali/adsp_dtb.mbn";

status = "okay";
};

&remoteproc_cdsp {
firmware-name = "qcom/kaanapali/cdsp.mbn",
"qcom/kaanapali/cdsp_dtb.mbn";

status = "okay";
};

&tlmm {
gpio-reserved-ranges = <36 4>, /* NFC eSE SPI */
<74 1>, /* eSE */
Expand Down
Loading