Skip to content

Commit 2120005

Browse files
committed
Merge tag 'qcom-arm32-for-6.20-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt
More Qualcomm Arm32 DeviceTree updated for v6.20 MSM8226 is switched to generic RPMPD_ indices, to allow dropping the duplicate platform-specific constants. On MSM8960 two additional GSBIs and I2C controllers are introduced. Accelerometer, Magnetometer, NFC and Light/Proximity sensors are then enabled on the Samsung Galaxy Express. * tag 'qcom-arm32-for-6.20-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: switch to RPMPD_* indices ARM: dts: qcom: msm8960: expressatt: Add Accelerometer ARM: dts: qcom: msm8960: expressatt: Add Magnetometer ARM: dts: qcom: msm8960: expressatt: Add NFC ARM: dts: qcom: msm8960: expressatt: Add Light/Proximity Sensor ARM: dts: qcom: msm8960: Add GSBI2 & GSBI7 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents a1f4991 + 4506cdf commit 2120005

3 files changed

Lines changed: 207 additions & 2 deletions

File tree

arch/arm/boot/dts/qcom/qcom-msm8226.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@
959959
resets = <&gcc GCC_MSS_RESTART>;
960960
reset-names = "mss_restart";
961961

962-
power-domains = <&rpmpd MSM8226_VDDCX>;
962+
power-domains = <&rpmpd RPMPD_VDDCX>;
963963
power-domain-names = "cx";
964964

965965
qcom,ext-bhs-reg = <&tcsr_regs_1 0x194>;
@@ -1372,7 +1372,7 @@
13721372
<&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
13731373
interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
13741374

1375-
power-domains = <&rpmpd MSM8226_VDDCX>;
1375+
power-domains = <&rpmpd RPMPD_VDDCX>;
13761376
power-domain-names = "cx";
13771377

13781378
clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>;

arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,31 @@
5454
};
5555
};
5656

57+
&gsbi2 {
58+
qcom,mode = <GSBI_PROT_I2C>;
59+
60+
status = "okay";
61+
};
62+
63+
&gsbi2_i2c {
64+
status = "okay";
65+
66+
light-sensor@39 {
67+
compatible = "amstaos,tmd2772";
68+
reg = <0x39>;
69+
interrupts-extended = <&pm8921_gpio 6 IRQ_TYPE_EDGE_FALLING>;
70+
vdd-supply = <&pm8921_l9>;
71+
vddio-supply = <&pm8921_lvs4>;
72+
73+
/* TODO: Proximity doesn't work */
74+
amstaos,proximity-diodes = <0>;
75+
led-max-microamp = <100000>;
76+
77+
pinctrl-0 = <&prox_sensor_int>;
78+
pinctrl-names = "default";
79+
};
80+
};
81+
5782
&gsbi5 {
5883
qcom,mode = <GSBI_PROT_I2C_UART>;
5984
status = "okay";
@@ -157,12 +182,45 @@
157182
bias-disable;
158183
drive-strength = <2>;
159184
};
185+
186+
nfc_default: nfc-default-state {
187+
irq-pins {
188+
pins = "gpio106";
189+
function = "gpio";
190+
drive-strength = <2>;
191+
bias-pull-down;
192+
};
193+
194+
firmware-pins {
195+
pins = "gpio92";
196+
function = "gpio";
197+
drive-strength = <2>;
198+
bias-disable;
199+
};
200+
};
160201
};
161202

162203
&pm8921 {
163204
interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>;
164205
};
165206

207+
&pm8921_gpio {
208+
prox_sensor_int: prox-sensor-int-state {
209+
pins = "gpio6";
210+
function = "normal";
211+
input-enable;
212+
bias-disable;
213+
};
214+
215+
nfc_enable: nfc-enable-state {
216+
pins = "gpio21";
217+
function = "normal";
218+
bias-disable;
219+
qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
220+
power-source = <PM8921_GPIO_S4>;
221+
};
222+
};
223+
166224
&rpm {
167225
regulators {
168226
compatible = "qcom,rpm-pm8921-regulators";
@@ -408,3 +466,54 @@
408466
dr_mode = "otg";
409467
status = "okay";
410468
};
469+
470+
&gsbi7 {
471+
qcom,mode = <GSBI_PROT_I2C>;
472+
473+
status = "okay";
474+
};
475+
476+
&gsbi7_i2c {
477+
status = "okay";
478+
479+
nfc@2b {
480+
compatible = "nxp,pn544-i2c";
481+
reg = <0x2b>;
482+
interrupts-extended = <&tlmm 106 IRQ_TYPE_EDGE_RISING>;
483+
enable-gpios = <&pm8921_gpio 21 GPIO_ACTIVE_HIGH>;
484+
firmware-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>;
485+
486+
pinctrl-0 = <&nfc_default &nfc_enable>;
487+
pinctrl-names = "default";
488+
};
489+
};
490+
491+
&gsbi12 {
492+
qcom,mode = <GSBI_PROT_I2C>;
493+
494+
status = "okay";
495+
};
496+
497+
&gsbi12_i2c {
498+
status = "okay";
499+
500+
accelerometer@18 {
501+
compatible = "bosch,bma254";
502+
reg = <0x18>;
503+
vdd-supply = <&pm8921_l9>;
504+
vddio-supply = <&pm8921_lvs4>;
505+
506+
mount-matrix = "-1", "0", "0",
507+
"0", "-1", "0",
508+
"0", "0", "1";
509+
};
510+
511+
magnetometer@2e {
512+
compatible = "yamaha,yas532";
513+
reg = <0x2e>;
514+
vdd-supply = <&pm8921_l9>;
515+
iovdd-supply = <&pm8921_lvs4>;
516+
517+
/* TODO: Figure out Mount Matrix */
518+
};
519+
};

arch/arm/boot/dts/qcom/qcom-msm8960.dtsi

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,24 @@
149149
};
150150
};
151151

152+
i2c2_default_state: i2c2-default-state {
153+
i2c2-pins {
154+
pins = "gpio12", "gpio13";
155+
function = "gsbi2";
156+
drive-strength = <8>;
157+
bias-disable;
158+
};
159+
};
160+
161+
i2c2_sleep_state: i2c2-sleep-state {
162+
i2c2-pins {
163+
pins = "gpio12", "gpio13";
164+
function = "gpio";
165+
drive-strength = <2>;
166+
bias-bus-hold;
167+
};
168+
};
169+
152170
i2c3_default_state: i2c3-default-state {
153171
i2c3-pins {
154172
pins = "gpio16", "gpio17";
@@ -167,6 +185,24 @@
167185
};
168186
};
169187

188+
i2c7_default_state: i2c7-default-state {
189+
i2c7-pins {
190+
pins = "gpio32", "gpio33";
191+
function = "gsbi7";
192+
drive-strength = <8>;
193+
bias-disable;
194+
};
195+
};
196+
197+
i2c7_sleep_state: i2c7-sleep-state {
198+
i2c7-pins {
199+
pins = "gpio32", "gpio33";
200+
function = "gpio";
201+
drive-strength = <2>;
202+
bias-bus-hold;
203+
};
204+
};
205+
170206
i2c8_default_state: i2c8-default-state {
171207
i2c8-pins {
172208
pins = "gpio36", "gpio37";
@@ -543,6 +579,36 @@
543579
};
544580
};
545581

582+
gsbi2: gsbi@16100000 {
583+
compatible = "qcom,gsbi-v1.0.0";
584+
reg = <0x16100000 0x100>;
585+
ranges;
586+
cell-index = <2>;
587+
clocks = <&gcc GSBI2_H_CLK>;
588+
clock-names = "iface";
589+
#address-cells = <1>;
590+
#size-cells = <1>;
591+
592+
status = "disabled";
593+
594+
gsbi2_i2c: i2c@16180000 {
595+
compatible = "qcom,i2c-qup-v1.1.1";
596+
reg = <0x16180000 0x1000>;
597+
pinctrl-0 = <&i2c2_default_state>;
598+
pinctrl-1 = <&i2c2_sleep_state>;
599+
pinctrl-names = "default", "sleep";
600+
interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
601+
clocks = <&gcc GSBI2_QUP_CLK>,
602+
<&gcc GSBI2_H_CLK>;
603+
clock-names = "core",
604+
"iface";
605+
#address-cells = <1>;
606+
#size-cells = <0>;
607+
608+
status = "disabled";
609+
};
610+
};
611+
546612
gsbi3: gsbi@16200000 {
547613
compatible = "qcom,gsbi-v1.0.0";
548614
reg = <0x16200000 0x100>;
@@ -600,6 +666,36 @@
600666
};
601667
};
602668

669+
gsbi7: gsbi@16600000 {
670+
compatible = "qcom,gsbi-v1.0.0";
671+
reg = <0x16600000 0x100>;
672+
ranges;
673+
cell-index = <7>;
674+
clocks = <&gcc GSBI7_H_CLK>;
675+
clock-names = "iface";
676+
#address-cells = <1>;
677+
#size-cells = <1>;
678+
679+
status = "disabled";
680+
681+
gsbi7_i2c: i2c@16680000 {
682+
compatible = "qcom,i2c-qup-v1.1.1";
683+
reg = <0x16680000 0x1000>;
684+
pinctrl-0 = <&i2c7_default_state>;
685+
pinctrl-1 = <&i2c7_sleep_state>;
686+
pinctrl-names = "default", "sleep";
687+
interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
688+
clocks = <&gcc GSBI7_QUP_CLK>,
689+
<&gcc GSBI7_H_CLK>;
690+
clock-names = "core",
691+
"iface";
692+
#address-cells = <1>;
693+
#size-cells = <0>;
694+
695+
status = "disabled";
696+
};
697+
};
698+
603699
gsbi8: gsbi@1a000000 {
604700
compatible = "qcom,gsbi-v1.0.0";
605701
reg = <0x1a000000 0x100>;

0 commit comments

Comments
 (0)