Skip to content

Commit 58782c2

Browse files
Dzmitry Sankouskiandersson
authored andcommitted
arm64: dts: qcom: sdm845-starqltechn: add initial sound support
Add support for sound (headphones and mics only) Also redefine slpi reserved memory, because adsp_mem overlaps with slpi_mem inherited from sdm845.dtsi. Signed-off-by: Dzmitry Sankouski <[email protected]> Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-10-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 9380e0a commit 58782c2

File tree

1 file changed

+223
-0
lines changed

1 file changed

+223
-0
lines changed

arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,16 @@
1111
#include <dt-bindings/gpio/gpio.h>
1212
#include <dt-bindings/leds/common.h>
1313
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
14+
#include <dt-bindings/sound/qcom,q6afe.h>
15+
#include <dt-bindings/sound/qcom,q6asm.h>
16+
#include <dt-bindings/sound/qcom,wcd934x.h>
17+
1418
#include "sdm845.dtsi"
1519
#include "pm8998.dtsi"
20+
#include "sdm845-wcd9340.dtsi"
21+
22+
/delete-node/ &adsp_mem;
23+
/delete-node/ &slpi_mem;
1624

1725
/ {
1826
chassis-type = "handset";
@@ -97,6 +105,16 @@
97105
ftrace-size = <0x40000>;
98106
pmsg-size = <0x40000>;
99107
};
108+
109+
slpi_mem: slpi@96700000 {
110+
reg = <0 0x96700000 0 0xf00000>;
111+
no-map;
112+
};
113+
114+
adsp_mem: memory@97800000 {
115+
reg = <0 0x97800000 0 0x2000000>;
116+
no-map;
117+
};
100118
};
101119

102120
i2c21 {
@@ -595,6 +613,211 @@
595613
};
596614
};
597615

616+
&adsp_pas {
617+
firmware-name = "qcom/sdm845/starqltechn/adsp.mbn";
618+
status = "okay";
619+
};
620+
621+
&lpasscc {
622+
status = "okay";
623+
};
624+
625+
&sound {
626+
compatible = "qcom,sdm845-sndcard";
627+
model = "Samsung Galaxy S9";
628+
pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active &quat_mi2s_sd1_active>;
629+
pinctrl-names = "default";
630+
status = "okay";
631+
632+
audio-routing = "RX_BIAS", "MCLK",
633+
"AMIC2", "MIC BIAS2", /* Headset Mic */
634+
"AMIC3", "MIC BIAS2", /* FM radio left Tx */
635+
"AMIC4", "MIC BIAS2", /* FM radio right Tx */
636+
"DMIC0", "MCLK", /* Bottom Mic */
637+
"DMIC0", "MIC BIAS1",
638+
"DMIC2", "MCLK", /* Top Mic */
639+
"DMIC2", "MIC BIAS3";
640+
641+
mm1-dai-link {
642+
link-name = "MultiMedia1";
643+
644+
cpu {
645+
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
646+
};
647+
};
648+
649+
mm2-dai-link {
650+
link-name = "MultiMedia2";
651+
652+
cpu {
653+
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
654+
};
655+
};
656+
657+
mm3-dai-link {
658+
link-name = "MultiMedia3";
659+
660+
cpu {
661+
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
662+
};
663+
};
664+
665+
mm4-dai-link {
666+
link-name = "MultiMedia4";
667+
668+
cpu {
669+
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
670+
};
671+
};
672+
673+
mm5-dai-link {
674+
link-name = "MultiMedia5";
675+
676+
cpu {
677+
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA5>;
678+
};
679+
};
680+
681+
mm6-dai-link {
682+
link-name = "MultiMedia6";
683+
684+
cpu {
685+
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA6>;
686+
};
687+
};
688+
689+
slim-dai-link {
690+
link-name = "SLIM Playback 1";
691+
692+
codec {
693+
sound-dai = <&wcd9340 AIF1_PB>;
694+
};
695+
696+
cpu {
697+
sound-dai = <&q6afedai SLIMBUS_0_RX>;
698+
};
699+
700+
platform {
701+
sound-dai = <&q6routing>;
702+
};
703+
};
704+
705+
slimcap-dai-link {
706+
link-name = "SLIM Capture 1";
707+
708+
codec {
709+
sound-dai = <&wcd9340 AIF1_CAP>;
710+
};
711+
712+
cpu {
713+
sound-dai = <&q6afedai SLIMBUS_0_TX>;
714+
};
715+
716+
platform {
717+
sound-dai = <&q6routing>;
718+
};
719+
};
720+
721+
slim2-dai-link {
722+
link-name = "SLIM Playback 2";
723+
724+
codec {
725+
sound-dai = <&wcd9340 AIF2_PB>;
726+
};
727+
728+
cpu {
729+
sound-dai = <&q6afedai SLIMBUS_1_RX>;
730+
};
731+
732+
platform {
733+
sound-dai = <&q6routing>;
734+
};
735+
};
736+
737+
slimcap2-dai-link {
738+
link-name = "SLIM Capture 2";
739+
740+
codec {
741+
sound-dai = <&wcd9340 AIF2_CAP>;
742+
};
743+
744+
cpu {
745+
sound-dai = <&q6afedai SLIMBUS_1_TX>;
746+
};
747+
748+
platform {
749+
sound-dai = <&q6routing>;
750+
};
751+
};
752+
753+
slimcap3-dai-link {
754+
link-name = "SLIM Capture 3";
755+
756+
codec {
757+
sound-dai = <&wcd9340 AIF3_CAP>;
758+
};
759+
760+
cpu {
761+
sound-dai = <&q6afedai SLIMBUS_2_TX>;
762+
};
763+
764+
platform {
765+
sound-dai = <&q6routing>;
766+
};
767+
};
768+
};
769+
770+
&q6afedai {
771+
dai@22 {
772+
reg = <22>;
773+
qcom,sd-lines = <1>;
774+
};
775+
776+
dai@23 {
777+
reg = <23>;
778+
qcom,sd-lines = <0>;
779+
};
780+
};
781+
782+
&q6asmdai {
783+
dai@0 {
784+
reg = <0>;
785+
};
786+
787+
dai@1 {
788+
reg = <1>;
789+
};
790+
791+
dai@2 {
792+
reg = <2>;
793+
};
794+
795+
dai@3 {
796+
reg = <3>;
797+
};
798+
799+
dai@4 {
800+
reg = <4>;
801+
};
802+
803+
dai@5 {
804+
reg = <5>;
805+
};
806+
};
807+
808+
&wcd9340 {
809+
reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
810+
vdd-buck-supply = <&vreg_s4a_1p8>;
811+
vdd-buck-sido-supply = <&vreg_s4a_1p8>;
812+
vdd-tx-supply = <&vreg_s4a_1p8>;
813+
vdd-rx-supply = <&vreg_s4a_1p8>;
814+
vdd-io-supply = <&vreg_s4a_1p8>;
815+
qcom,micbias1-microvolt = <1800000>;
816+
qcom,micbias2-microvolt = <2700000>;
817+
qcom,micbias3-microvolt = <1800000>;
818+
qcom,micbias4-microvolt = <1800000>;
819+
};
820+
598821
&usb_1 {
599822
status = "okay";
600823
};

0 commit comments

Comments
 (0)