Skip to content

Commit

Permalink
arm64: dts: qcom: msm8916-huawei-g7: Add sound card
Browse files Browse the repository at this point in the history
The headphone detection stuff may need some tweaking, on my phone
headphones are always detected as headset for some reason. Weird.

Signed-off-by: Stephan Gerhold <[email protected]>
  • Loading branch information
stephan-gh committed Nov 12, 2021
1 parent c622ad4 commit 97a7f9c
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/sound/apq8016-lpass.h>

/*
* Note: The original firmware from Huawei can only boot 32-bit kernels.
Expand Down Expand Up @@ -242,6 +243,10 @@
qcom,dsi-phy-regulator-ldo-mode;
};

&lpass {
status = "okay";
};

&mdss {
status = "okay";
};
Expand Down Expand Up @@ -290,6 +295,40 @@
cd-gpios = <&msmgpio 56 GPIO_ACTIVE_LOW>;
};

&sound {
status = "okay";

pinctrl-names = "default", "sleep";
pinctrl-0 = <&cdc_pdm_lines_act>;
pinctrl-1 = <&cdc_pdm_lines_sus>;

model = "msm8916";
audio-routing =
"AMIC1", "MIC BIAS External1",
"AMIC2", "MIC BIAS External2",
"AMIC3", "MIC BIAS External1";

dai-link-primary {
link-name = "Primary MI2S";
cpu {
sound-dai = <&lpass MI2S_PRIMARY>;
};
codec {
sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
};
};

dai-link-tertiary {
link-name = "Tertiary MI2S";
cpu {
sound-dai = <&lpass MI2S_TERTIARY>;
};
codec {
sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
};
};
};

&usb {
status = "okay";
extcon = <&usb_id>, <&usb_id>;
Expand All @@ -299,6 +338,13 @@
extcon = <&usb_id>;
};

&wcd_codec {
qcom,micbias-lvl = <2800>;
qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
qcom,hphl-jack-type-normally-open;
};

&smd_rpm_regulators {
vdd_l1_l2_l3-supply = <&pm8916_s3>;
vdd_l4_l5_l6-supply = <&pm8916_s4>;
Expand Down

0 comments on commit 97a7f9c

Please sign in to comment.