Commit 1ab40719 authored by Nikita Travkin's avatar Nikita Travkin Committed by Bjorn Andersson

arm64: dts: qcom: msm8916-longcheer-l8150: Add sound and modem

Enable sound and modem for the Longcheer L8150 (e.g. Wileyfox Swift).
The setup is similar to most MSM8916 devices, i.e.:

 - QDSP6 audio
 - Speaker/earpiece/headphones/microphones via digital/analog codec
   in MSM8916/PM8916
 - Audio jack detection via analog codec in PM8916
 - WWAN Internet via BAM-DMUX

except:

 - The mpss firmware region must be relocated to a different address.
   This is because the wcnss firmware is not relocatable for some
   reason. The mpss firmware is too large to avoid overlap with wcnss
   when placed at the default address (0x86800000).

   Surprisingly the vendor kernel does not handle this. The firmware
   regions end up overlapping there and somehow this does not explode.
   We try to handle this more safely by relocating the mpss region to
   the first higher address that is working correctly: 0x8e800000.
Signed-off-by: default avatarNikita Travkin <nikita@trvn.ru>
Co-developed-by: default avatarStephan Gerhold <stephan@gerhold.net>
Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-10-61b684be55c0@gerhold.netSigned-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent 462cdffa
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
/dts-v1/; /dts-v1/;
#include "msm8916-pm8916.dtsi" #include "msm8916-pm8916.dtsi"
#include "msm8916-modem-qdsp6.dtsi"
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
...@@ -25,17 +27,26 @@ chosen { ...@@ -25,17 +27,26 @@ chosen {
/* /*
* For some reason, the signed wcnss firmware is not relocatable. * For some reason, the signed wcnss firmware is not relocatable.
* It must be loaded at 0x8b600000. All other firmware is relocatable, * It must be loaded at 0x8b600000. Unfortunately, this also means that
* so place wcnss at the fixed address and then all other firmware * mpss_mem does not fit when loaded to the typical address at 0x86800000.
* regions will be automatically allocated at a fitting place. *
* Load wcnss_mem to the fixed address and relocate mpss_mem to the next
* working higher address. For some reason the modem firmware does not
* boot when placed at 0x8a800000 to 0x8e800000.
*/ */
reserved-memory { reserved-memory {
/delete-node/ mpss@86800000;
/delete-node/ wcnss; /delete-node/ wcnss;
wcnss_mem: wcnss@8b600000 { wcnss_mem: wcnss@8b600000 {
reg = <0x0 0x8b600000 0x0 0x600000>; reg = <0x0 0x8b600000 0x0 0x600000>;
no-map; no-map;
}; };
mpss_mem: mpss@8e800000 {
reg = <0x0 0x8e800000 0x0 0x5000000>;
no-map;
};
}; };
gpio-keys { gpio-keys {
...@@ -225,6 +236,13 @@ &blsp_uart2 { ...@@ -225,6 +236,13 @@ &blsp_uart2 {
status = "okay"; status = "okay";
}; };
&pm8916_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;
};
&pm8916_resin { &pm8916_resin {
status = "okay"; status = "okay";
linux,code = <KEY_VOLUMEDOWN>; linux,code = <KEY_VOLUMEDOWN>;
...@@ -254,6 +272,13 @@ &sdhc_2 { ...@@ -254,6 +272,13 @@ &sdhc_2 {
non-removable; non-removable;
}; };
&sound {
audio-routing =
"AMIC1", "MIC BIAS Internal1",
"AMIC2", "MIC BIAS Internal2",
"AMIC3", "MIC BIAS Internal3";
};
&usb { &usb {
status = "okay"; status = "okay";
dr_mode = "peripheral"; dr_mode = "peripheral";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment