treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / arm64 / boot / dts / qcom / msm8916-samsung-a2015-common.dtsi
blobbd1eb3eeca53fdc5a5009fb3717bb61971e8e577
1 // SPDX-License-Identifier: GPL-2.0-only
3 #include "msm8916.dtsi"
4 #include "pm8916.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/interrupt-controller/irq.h>
9 / {
10         aliases {
11                 serial0 = &blsp1_uart2;
12         };
14         chosen {
15                 stdout-path = "serial0";
16         };
18         soc {
19                 sdhci@7824000 {
20                         status = "okay";
22                         vmmc-supply = <&pm8916_l8>;
23                         vqmmc-supply = <&pm8916_l5>;
25                         pinctrl-names = "default", "sleep";
26                         pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
27                         pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
28                 };
30                 sdhci@7864000 {
31                         status = "okay";
33                         vmmc-supply = <&pm8916_l11>;
34                         vqmmc-supply = <&pm8916_l12>;
36                         pinctrl-names = "default", "sleep";
37                         pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
38                         pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
40                         cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
41                 };
43                 serial@78b0000 {
44                         status = "okay";
45                         pinctrl-names = "default", "sleep";
46                         pinctrl-0 = <&blsp1_uart2_default>;
47                         pinctrl-1 = <&blsp1_uart2_sleep>;
48                 };
50                 usb@78d9000 {
51                         status = "okay";
52                         extcon = <&muic>, <&muic>;
54                         hnp-disable;
55                         srp-disable;
56                         adp-disable;
58                         ulpi {
59                                 phy {
60                                         extcon = <&muic>;
61                                         v1p8-supply = <&pm8916_l7>;
62                                         v3p3-supply = <&pm8916_l13>;
63                                 };
64                         };
65                 };
67                 wcnss@a21b000 {
68                         status = "okay";
69                 };
71                 /*
72                  * Attempting to enable these devices causes a "synchronous
73                  * external abort". Suspected cause is that the debug power
74                  * domain is not enabled by default on this device.
75                  * Disable these devices for now to avoid the crash.
76                  *
77                  * See: https://lore.kernel.org/linux-arm-msm/20190618202623.GA53651@gerhold.net/
78                  */
79                 tpiu@820000 { status = "disabled"; };
80                 funnel@821000 { status = "disabled"; };
81                 replicator@824000 { status = "disabled"; };
82                 etf@825000 { status = "disabled"; };
83                 etr@826000 { status = "disabled"; };
84                 funnel@841000 { status = "disabled"; };
85                 debug@850000 { status = "disabled"; };
86                 debug@852000 { status = "disabled"; };
87                 debug@854000 { status = "disabled"; };
88                 debug@856000 { status = "disabled"; };
89                 etm@85c000 { status = "disabled"; };
90                 etm@85d000 { status = "disabled"; };
91                 etm@85e000 { status = "disabled"; };
92                 etm@85f000 { status = "disabled"; };
93         };
95         gpio-keys {
96                 compatible = "gpio-keys";
98                 pinctrl-names = "default";
99                 pinctrl-0 = <&gpio_keys_default>;
101                 label = "GPIO Buttons";
103                 volume-up {
104                         label = "Volume Up";
105                         gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
106                         linux,code = <KEY_VOLUMEUP>;
107                 };
109                 home {
110                         label = "Home";
111                         gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>;
112                         linux,code = <KEY_HOMEPAGE>;
113                 };
114         };
116         gpio-hall-sensor {
117                 compatible = "gpio-keys";
119                 pinctrl-names = "default";
120                 pinctrl-0 = <&gpio_hall_sensor_default>;
122                 label = "GPIO Hall Effect Sensor";
124                 hall-sensor {
125                         label = "Hall Effect Sensor";
126                         gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>;
127                         linux,input-type = <EV_SW>;
128                         linux,code = <SW_LID>;
129                         linux,can-disable;
130                 };
131         };
133         i2c-muic {
134                 compatible = "i2c-gpio";
135                 sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
136                 scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
138                 #address-cells = <1>;
139                 #size-cells = <0>;
141                 muic: sm5502@25 {
142                         compatible = "siliconmitus,sm5502-muic";
144                         reg = <0x25>;
145                         interrupt-parent = <&msmgpio>;
146                         interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
148                         pinctrl-names = "default";
149                         pinctrl-0 = <&muic_int_default>;
150                 };
151         };
154 &msmgpio {
155         gpio_keys_default: gpio_keys_default {
156                 pinmux {
157                         function = "gpio";
158                         pins = "gpio107", "gpio109";
159                 };
160                 pinconf {
161                         pins = "gpio107", "gpio109";
162                         drive-strength = <2>;
163                         bias-pull-up;
164                 };
165         };
167         gpio_hall_sensor_default: gpio_hall_sensor_default {
168                 pinmux {
169                         function = "gpio";
170                         pins = "gpio52";
171                 };
172                 pinconf {
173                         pins = "gpio52";
174                         drive-strength = <2>;
175                         bias-disable;
176                 };
177         };
179         muic_int_default: muic_int_default {
180                 pinmux {
181                         function = "gpio";
182                         pins = "gpio12";
183                 };
184                 pinconf {
185                         pins = "gpio12";
186                         drive-strength = <2>;
187                         bias-disable;
188                 };
189         };
192 &smd_rpm_regulators {
193         vdd_l1_l2_l3-supply = <&pm8916_s3>;
194         vdd_l4_l5_l6-supply = <&pm8916_s4>;
195         vdd_l7-supply = <&pm8916_s4>;
197         s1 {
198                 regulator-min-microvolt = <500000>;
199                 regulator-max-microvolt = <1300000>;
200         };
202         s3 {
203                 regulator-min-microvolt = <1200000>;
204                 regulator-max-microvolt = <1300000>;
205         };
207         s4 {
208                 regulator-min-microvolt = <1800000>;
209                 regulator-max-microvolt = <2100000>;
210         };
212         l1 {
213                 regulator-min-microvolt = <1225000>;
214                 regulator-max-microvolt = <1225000>;
215         };
217         l2 {
218                 regulator-min-microvolt = <1200000>;
219                 regulator-max-microvolt = <1200000>;
220         };
222         l3 {
223                 regulator-min-microvolt = <500000>;
224                 regulator-max-microvolt = <1287500>;
225         };
227         l4 {
228                 regulator-min-microvolt = <2050000>;
229                 regulator-max-microvolt = <2050000>;
230         };
232         l5 {
233                 regulator-min-microvolt = <1800000>;
234                 regulator-max-microvolt = <1800000>;
235         };
237         l6 {
238                 regulator-min-microvolt = <1800000>;
239                 regulator-max-microvolt = <1800000>;
240         };
242         l7 {
243                 regulator-min-microvolt = <1800000>;
244                 regulator-max-microvolt = <1800000>;
245         };
247         l8 {
248                 regulator-min-microvolt = <2850000>;
249                 regulator-max-microvolt = <2900000>;
250         };
252         l9 {
253                 regulator-min-microvolt = <3300000>;
254                 regulator-max-microvolt = <3300000>;
255         };
257         l10 {
258                 regulator-min-microvolt = <2700000>;
259                 regulator-max-microvolt = <2800000>;
260         };
262         l11 {
263                 regulator-min-microvolt = <1800000>;
264                 regulator-max-microvolt = <2950000>;
265                 regulator-allow-set-load;
266                 regulator-system-load = <200000>;
267         };
269         l12 {
270                 regulator-min-microvolt = <1800000>;
271                 regulator-max-microvolt = <2950000>;
272         };
274         l13 {
275                 regulator-min-microvolt = <3075000>;
276                 regulator-max-microvolt = <3075000>;
277         };
279         l14 {
280                 regulator-min-microvolt = <1800000>;
281                 regulator-max-microvolt = <3300000>;
282         };
284         l15 {
285                 regulator-min-microvolt = <1800000>;
286                 regulator-max-microvolt = <3300000>;
287         };
289         l16 {
290                 regulator-min-microvolt = <1800000>;
291                 regulator-max-microvolt = <3300000>;
292         };
294         l17 {
295                 regulator-min-microvolt = <2850000>;
296                 regulator-max-microvolt = <2850000>;
297         };
299         l18 {
300                 regulator-min-microvolt = <2700000>;
301                 regulator-max-microvolt = <2700000>;
302         };
305 &spmi_bus {
306         pm8916@0 {
307                 pon@800 {
308                         volume-down {
309                                 compatible = "qcom,pm8941-resin";
310                                 interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
311                                 bias-pull-up;
312                                 linux,code = <KEY_VOLUMEDOWN>;
313                         };
314                 };
315         };