Skip to content
Open
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
166 changes: 166 additions & 0 deletions arch/arm/boot/dts/qcom/qcom-apq8009-modem-qdsp6.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
/*
* Copied from msm8916-modem-qdsp6.dtsi.
*
* qcom-apq8009-modem-qdsp6.dtsi describes the typical modem setup on APQ8009 devices
* (or similar SoCs) with audio routed via the QDSP6 services provided by the
* modem firmware. The digital/analog codec in the SoC/PMIC is used by default,
* but boards can define additional codecs by adding additional backend DAI links.
*
* This is APQ8009-specific because this assumes a PM8916, which MSM8909s don't
* seem to usually be paired with.
*/

#include <dt-bindings/clock/qcom,gcc-msm8909.h>
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
#include <dt-bindings/sound/qcom,q6voice.h>

&apr {
status = "okay";
};

&bam_dmux {
status = "okay";
};

&bam_dmux_dma {
status = "okay";
};

&lpass {
status = "reserved"; /* Controlled by QDSP6 */
};

&lpass_codec {
status = "okay";
};

&mba_mem {
status = "okay";
};

&mpss {
status = "okay";
};

&mpss_mem {
status = "okay";
};

&q6afedai {
dai@16 {
reg = <PRIMARY_MI2S_RX>;
qcom,sd-lines = <0 1>;
};
dai@20 {
reg = <TERTIARY_MI2S_TX>;
qcom,sd-lines = <0 1>;
};
};

&q6asmdai {
dai@0 {
reg = <MSM_FRONTEND_DAI_MULTIMEDIA1>;
direction = <Q6ASM_DAI_RX>;
};
dai@1 {
reg = <MSM_FRONTEND_DAI_MULTIMEDIA2>;
direction = <Q6ASM_DAI_TX>;
};
dai@2 {
reg = <MSM_FRONTEND_DAI_MULTIMEDIA3>;
direction = <Q6ASM_DAI_RX>;
};
dai@3 {
reg = <MSM_FRONTEND_DAI_MULTIMEDIA4>;
direction = <Q6ASM_DAI_RX>;
is-compress-dai;
};
};

&sound {
compatible = "qcom,msm8916-qdsp6-sndcard";
model = "msm8909";

pinctrl-0 = <&cdc_pdm_default>;
pinctrl-1 = <&cdc_pdm_sleep>;
pinctrl-names = "default", "sleep";

clocks = <&gcc GCC_ULTAUDIO_LPAIF_PRI_I2S_CLK>,
<&gcc GCC_ULTAUDIO_PCNOC_MPORT_CLK>,
<&gcc GCC_ULTAUDIO_PCNOC_SWAY_CLK>;
clock-names = "lpaif-pri-i2s", "pcnoc-mport", "pcnoc-sway";
assigned-clocks = <&gcc GCC_ULTAUDIO_LPAIF_PRI_I2S_CLK>;
assigned-clock-rates = <1536000>;

status = "okay";

frontend0-dai-link {
link-name = "MultiMedia1";

cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
};
};

frontend1-dai-link {
link-name = "MultiMedia2";

cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
};
};

frontend2-dai-link {
link-name = "MultiMedia3";

cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
};
};

frontend3-dai-link {
link-name = "MultiMedia4";

cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
};
};

frontend4-dai-link {
link-name = "CS-Voice";

cpu {
sound-dai = <&q6voicedai CS_VOICE>;
};
};

sound_link_backend0: backend0-dai-link {
link-name = "Primary MI2S";

cpu {
sound-dai = <&q6afedai PRIMARY_MI2S_RX>;
};
platform {
sound-dai = <&q6routing>;
};
codec {
sound-dai = <&lpass_codec 0>, <&pm8916_codec 0>;
};
};

sound_link_backend1: backend1-dai-link {
link-name = "Tertiary MI2S";

cpu {
sound-dai = <&q6afedai TERTIARY_MI2S_TX>;
};
platform {
sound-dai = <&q6routing>;
};
codec {
sound-dai = <&lpass_codec 1>, <&pm8916_codec 1>;
};
};
};
130 changes: 130 additions & 0 deletions arch/arm/boot/dts/qcom/qcom-msm8909-pm8916.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
// SPDX-License-Identifier: GPL-2.0-only

#include "qcom-msm8909.dtsi"
#include "arm64/qcom/pm8916.dtsi"

&mpss {
pll-supply = <&pm8916_l7>;
};

&sdhc_1 {
vmmc-supply = <&pm8916_l8>;
vqmmc-supply = <&pm8916_l5>;
};

&sdhc_2 {
vmmc-supply = <&pm8916_l11>;
vqmmc-supply = <&pm8916_l12>;
};

&usb_hs_phy {
v1p8-supply = <&pm8916_l7>;
v3p3-supply = <&pm8916_l13>;
};

&wcnss {
vddpx-supply = <&pm8916_l7>;
};

&wcnss_iris {
vddxo-supply = <&pm8916_l7>;
vddrfa-supply = <&pm8916_s3>;
vddpa-supply = <&pm8916_l9>;
vdddig-supply = <&pm8916_l5>;
};

&rpm_requests {
pm8916_rpm_regulators: regulators {
compatible = "qcom,rpm-pm8916-regulators";
vdd_l1_l2_l3-supply = <&pm8916_s3>;
vdd_l4_l5_l6-supply = <&pm8916_s4>;
vdd_l7-supply = <&pm8916_s4>;

/* pm8916_s1 is managed by rpmpd (MSM8909_VDDCX) */

pm8916_s3: s3 {
regulator-min-microvolt = <1250000>;
regulator-max-microvolt = <1350000>;
regulator-always-on; /* Needed for L2 */
};

pm8916_s4: s4 {
regulator-min-microvolt = <1850000>;
regulator-max-microvolt = <2150000>;
regulator-always-on; /* Needed for L5/L7 */
};

/*
* Some of the regulators are unused or managed by another
* processor (e.g. the modem). We should still define nodes for
* them to ensure the vote from the application processor can be
* dropped in case the regulators are already on during boot.
*
* The labels for these nodes are omitted on purpose because
* boards should configure a proper voltage before using them.
*/
l1 {};

pm8916_l2: l2 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-always-on; /* Needed for LPDDR RAM */
};

/* pm8916_l3 is managed by rpmpd (MSM8909_VDDMX) */

l4 {};

pm8916_l5: l5 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on; /* Needed for most digital I/O */
};

pm8916_l6: l6 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};

pm8916_l7: l7 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on; /* Needed for CPU PLL */
};

pm8916_l8: l8 {
regulator-min-microvolt = <2900000>;
regulator-max-microvolt = <2900000>;
};

pm8916_l9: l9 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};

l10 {};

pm8916_l11: l11 {
regulator-min-microvolt = <2950000>;
regulator-max-microvolt = <2950000>;
regulator-allow-set-load;
regulator-system-load = <200000>;
};

pm8916_l12: l12 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2950000>;
};

pm8916_l13: l13 {
regulator-min-microvolt = <3075000>;
regulator-max-microvolt = <3075000>;
};

l14 {};
l15 {};
l16 {};
l17 {};
l18 {};
};
};
Loading
Loading