Skip to content

Commit 2e15ec2

Browse files
committed
Merge remote-tracking branch tech/all/dt/qcs6490 into qcom-next
2 parents a824c9f + 304deb2 commit 2e15ec2

File tree

8 files changed

+723
-9
lines changed

8 files changed

+723
-9
lines changed

Documentation/devicetree/bindings/arm/psci.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,27 @@ properties:
9898
[1] Kernel documentation - ARM idle states bindings
9999
Documentation/devicetree/bindings/cpu/idle-states.yaml
100100
101+
reset-types:
102+
type: object
103+
$ref: /schemas/power/reset/reboot-mode.yaml#
104+
unevaluatedProperties: false
105+
properties:
106+
# "mode-normal" is just SYSTEM_RESET
107+
mode-normal: false
108+
patternProperties:
109+
"^mode-.*$":
110+
minItems: 1
111+
maxItems: 2
112+
description: |
113+
Describes a vendor-specific reset type. The string after "mode-"
114+
maps a reboot mode to the parameters in the PSCI SYSTEM_RESET2 call.
115+
116+
Parameters are named mode-xxx = <type[, cookie]>, where xxx
117+
is the name of the magic reboot mode, type is the lower 31 bits
118+
of the reset_type, and, optionally, the cookie value. If the cookie
119+
is not provided, it is defaulted to zero.
120+
The 31st bit (vendor-resets) will be implicitly set by the driver.
121+
101122
patternProperties:
102123
"^power-domain-":
103124
$ref: /schemas/power/power-domain.yaml#
@@ -137,6 +158,15 @@ allOf:
137158
required:
138159
- cpu_off
139160
- cpu_on
161+
- if:
162+
not:
163+
properties:
164+
compatible:
165+
contains:
166+
const: arm,psci-1.0
167+
then:
168+
properties:
169+
reset-types: false
140170

141171
additionalProperties: false
142172

@@ -261,4 +291,17 @@ examples:
261291
domain-idle-states = <&cluster_ret>, <&cluster_pwrdn>;
262292
};
263293
};
294+
295+
- |+
296+
297+
// Case 5: SYSTEM_RESET2 vendor resets
298+
psci {
299+
compatible = "arm,psci-1.0";
300+
method = "smc";
301+
302+
reset-types {
303+
mode-edl = <0>;
304+
mode-bootloader = <1 2>;
305+
};
306+
};
264307
...

Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ properties:
2020
reg:
2121
maxItems: 2
2222

23+
clocks:
24+
items:
25+
- description: LPASS Core voting clock
26+
- description: LPASS Audio voting clock
27+
28+
clock-names:
29+
items:
30+
- const: core
31+
- const: audio
32+
2333
patternProperties:
2434
"-state$":
2535
oneOf:

Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,16 @@ allOf:
7878
then:
7979
properties:
8080
clocks:
81-
maxItems: 1
81+
minItems: 1
82+
maxItems: 3
8283
clock-names:
83-
items:
84-
- const: mclk
84+
oneOf:
85+
- items: # for ADSP based platforms
86+
- const: mclk
87+
- const: macro
88+
- const: dcodec
89+
- items: # for ADSP bypass based platforms
90+
- const: mclk
8591

8692
- if:
8793
properties:

Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ properties:
3535
const: 0
3636

3737
clocks:
38-
minItems: 4
38+
minItems: 3
3939
maxItems: 6
4040

4141
clock-names:
42-
minItems: 4
42+
minItems: 3
4343
maxItems: 6
4444

4545
clock-output-names:
@@ -59,12 +59,30 @@ required:
5959

6060
allOf:
6161
- $ref: dai-common.yaml#
62-
6362
- if:
6463
properties:
6564
compatible:
6665
enum:
6766
- qcom,sc7280-lpass-wsa-macro
67+
then:
68+
properties:
69+
clock-names:
70+
oneOf:
71+
- items: # for ADSP based platforms
72+
- const: mclk
73+
- const: npl
74+
- const: macro
75+
- const: dcodec
76+
- const: fsgen
77+
- items: # for ADSP bypass based platforms
78+
- const: mclk
79+
- const: npl
80+
- const: fsgen
81+
82+
- if:
83+
properties:
84+
compatible:
85+
enum:
6886
- qcom,sm8250-lpass-wsa-macro
6987
- qcom,sm8450-lpass-wsa-macro
7088
- qcom,sc8280xp-lpass-wsa-macro

arch/arm64/boot/dts/qcom/qcm6490-idp.dts

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "pm7325.dtsi"
1919
#include "pm8350c.dtsi"
2020
#include "pmk8350.dtsi"
21+
#include "qcs6490-audioreach.dtsi"
2122

2223
/delete-node/ &ipa_fw_mem;
2324
/delete-node/ &rmtfs_mem;
@@ -169,6 +170,30 @@
169170
regulator-min-microvolt = <3700000>;
170171
regulator-max-microvolt = <3700000>;
171172
};
173+
174+
wcd9370: audio-codec-0 {
175+
compatible = "qcom,wcd9370-codec";
176+
177+
pinctrl-0 = <&wcd_default>;
178+
pinctrl-names = "default";
179+
180+
reset-gpios = <&tlmm 83 GPIO_ACTIVE_HIGH>;
181+
182+
vdd-buck-supply = <&vreg_l17b_1p7>;
183+
vdd-rxtx-supply = <&vreg_l18b_1p8>;
184+
vdd-px-supply = <&vreg_l18b_1p8>;
185+
vdd-mic-bias-supply = <&vreg_bob_3p296>;
186+
187+
qcom,micbias1-microvolt = <1800000>;
188+
qcom,micbias2-microvolt = <1800000>;
189+
qcom,micbias3-microvolt = <1800000>;
190+
qcom,micbias4-microvolt = <1800000>;
191+
192+
qcom,rx-device = <&wcd937x_rx>;
193+
qcom,tx-device = <&wcd937x_tx>;
194+
195+
#sound-dai-cells = <1>;
196+
};
172197
};
173198

174199
&apps_rsc {
@@ -536,6 +561,22 @@
536561
firmware-name = "qcom/qcm6490/a660_zap.mbn";
537562
};
538563

564+
&lpass_rx_macro {
565+
status = "okay";
566+
};
567+
568+
&lpass_tx_macro {
569+
status = "okay";
570+
};
571+
572+
&lpass_va_macro {
573+
status = "okay";
574+
};
575+
576+
&lpass_wsa_macro {
577+
status = "okay";
578+
};
579+
539580
&mdss {
540581
status = "okay";
541582
};
@@ -654,6 +695,13 @@
654695
status = "okay";
655696
};
656697

698+
&psci {
699+
reset-types {
700+
mode-bootloader = <0x10001 0x2>;
701+
mode-edl = <0 0x1>;
702+
};
703+
};
704+
657705
&qupv3_id_0 {
658706
status = "okay";
659707
};
@@ -716,6 +764,138 @@
716764
cd-gpios = <&tlmm 91 GPIO_ACTIVE_LOW>;
717765
};
718766

767+
&sound {
768+
compatible = "qcom,qcm6490-idp-sndcard";
769+
model = "qcm6490-idp-snd-card";
770+
771+
audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
772+
"SpkrRight IN", "WSA_SPK2 OUT",
773+
"IN1_HPHL", "HPHL_OUT",
774+
"IN2_HPHR", "HPHR_OUT",
775+
"AMIC2", "MIC BIAS2",
776+
"TX DMIC0", "MIC BIAS1",
777+
"TX DMIC1", "MIC BIAS2",
778+
"TX DMIC2", "MIC BIAS3",
779+
"TX SWR_ADC1", "ADC2_OUTPUT",
780+
"VA DMIC0", "VA MIC BIAS3",
781+
"VA DMIC1", "VA MIC BIAS3",
782+
"VA DMIC2", "VA MIC BIAS1",
783+
"VA DMIC3", "VA MIC BIAS1";
784+
785+
wsa-dai-link {
786+
link-name = "WSA Playback";
787+
788+
codec {
789+
sound-dai = <&left_spkr>, <&right_spkr>,
790+
<&swr2 0>, <&lpass_wsa_macro 0>;
791+
};
792+
793+
cpu {
794+
sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>;
795+
};
796+
797+
platform {
798+
sound-dai = <&q6apm>;
799+
};
800+
};
801+
802+
wcd-playback-dai-link {
803+
link-name = "WCD Playback";
804+
805+
codec {
806+
sound-dai = <&wcd9370 0>, <&swr0 0>, <&lpass_rx_macro 0>;
807+
};
808+
809+
cpu {
810+
sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
811+
};
812+
813+
platform {
814+
sound-dai = <&q6apm>;
815+
};
816+
};
817+
818+
wcd-capture-dai-link {
819+
link-name = "WCD Capture";
820+
821+
codec {
822+
sound-dai = <&wcd9370 1>, <&swr1 0>, <&lpass_tx_macro 0>;
823+
};
824+
825+
cpu {
826+
sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
827+
};
828+
829+
platform {
830+
sound-dai = <&q6apm>;
831+
};
832+
};
833+
834+
va-dai-link {
835+
link-name = "VA Capture";
836+
837+
codec {
838+
sound-dai = <&lpass_va_macro 0>;
839+
};
840+
841+
cpu {
842+
sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>;
843+
};
844+
845+
platform {
846+
sound-dai = <&q6apm>;
847+
};
848+
};
849+
};
850+
851+
&swr0 {
852+
status = "okay";
853+
854+
wcd937x_rx: codec@0,4 {
855+
compatible = "sdw20217010a00";
856+
reg = <0 4>;
857+
qcom,rx-port-mapping = <1 2 3 4 5>;
858+
qcom,rx-channel-mapping = /bits/ 8 <1 2 1 1 2 1 1 2>;
859+
};
860+
};
861+
862+
&swr1 {
863+
status = "okay";
864+
865+
wcd937x_tx: codec@0,3 {
866+
compatible = "sdw20217010a00";
867+
reg = <0 3>;
868+
qcom,tx-port-mapping = <1 1 2 3>;
869+
qcom,tx-channel-mapping = /bits/ 8 <1 2 1 1 2 3 3 4 1 2 3 4>;
870+
};
871+
};
872+
873+
&swr2 {
874+
status = "okay";
875+
876+
left_spkr: speaker@0,1 {
877+
compatible = "sdw10217020200";
878+
reg = <0 1>;
879+
powerdown-gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
880+
#sound-dai-cells = <0>;
881+
sound-name-prefix = "SpkrLeft";
882+
#thermal-sensor-cells = <0>;
883+
vdd-supply = <&vreg_l18b_1p8>;
884+
qcom,port-mapping = <1 2 3 7>;
885+
};
886+
887+
right_spkr: speaker@0,2 {
888+
compatible = "sdw10217020200";
889+
reg = <0 2>;
890+
powerdown-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
891+
#sound-dai-cells = <0>;
892+
sound-name-prefix = "SpkrRight";
893+
#thermal-sensor-cells = <0>;
894+
vdd-supply = <&vreg_l18b_1p8>;
895+
qcom,port-mapping = <4 5 6 8>;
896+
};
897+
};
898+
719899
&tlmm {
720900
gpio-reserved-ranges = <32 2>, /* ADSP */
721901
<48 4>; /* NFC */
@@ -725,6 +905,13 @@
725905
function = "gpio";
726906
bias-pull-up;
727907
};
908+
909+
wcd_default: wcd-reset-n-active-state {
910+
pins = "gpio83";
911+
function = "gpio";
912+
drive-strength = <16>;
913+
bias-disable;
914+
};
728915
};
729916

730917
&uart5 {

0 commit comments

Comments
 (0)