arm64: dts: qcom: sm8550: add TRNG node
[linux-modified.git] / arch / arm64 / boot / dts / ti / k3-am62a7-sk.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * AM62A SK: https://www.ti.com/lit/zip/sprr459
4  *
5  * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
6  */
7
8 /dts-v1/;
9
10 #include <dt-bindings/leds/common.h>
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/net/ti-dp83867.h>
13 #include "k3-am62a7.dtsi"
14
15 / {
16         compatible = "ti,am62a7-sk", "ti,am62a7";
17         model = "Texas Instruments AM62A7 SK";
18
19         aliases {
20                 serial0 = &wkup_uart0;
21                 serial2 = &main_uart0;
22                 serial3 = &main_uart1;
23                 mmc1 = &sdhci1;
24         };
25
26         chosen {
27                 stdout-path = "serial2:115200n8";
28         };
29
30         memory@80000000 {
31                 device_type = "memory";
32                 /* 4G RAM */
33                 reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
34                       <0x00000008 0x80000000 0x00000000 0x80000000>;
35         };
36
37         reserved-memory {
38                 #address-cells = <2>;
39                 #size-cells = <2>;
40                 ranges;
41
42                 secure_tfa_ddr: tfa@9e780000 {
43                         reg = <0x00 0x9e780000 0x00 0x80000>;
44                         alignment = <0x1000>;
45                         no-map;
46                 };
47
48                 secure_ddr: optee@9e800000 {
49                         reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
50                         alignment = <0x1000>;
51                         no-map;
52                 };
53
54                 wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 {
55                         compatible = "shared-dma-pool";
56                         reg = <0x00 0x9c900000 0x00 0x01e00000>;
57                         no-map;
58                 };
59         };
60
61         vmain_pd: regulator-0 {
62                 /* TPS25750 PD CONTROLLER OUTPUT */
63                 compatible = "regulator-fixed";
64                 regulator-name = "vmain_pd";
65                 regulator-min-microvolt = <5000000>;
66                 regulator-max-microvolt = <5000000>;
67                 regulator-always-on;
68                 regulator-boot-on;
69         };
70
71         vcc_5v0: regulator-1 {
72                 /* Output of TPS63070 */
73                 compatible = "regulator-fixed";
74                 regulator-name = "vcc_5v0";
75                 regulator-min-microvolt = <5000000>;
76                 regulator-max-microvolt = <5000000>;
77                 vin-supply = <&vmain_pd>;
78                 regulator-always-on;
79                 regulator-boot-on;
80         };
81
82         vcc_3v3_main: regulator-2 {
83                 /* output of LM5141-Q1 */
84                 compatible = "regulator-fixed";
85                 regulator-name = "vcc_3v3_main";
86                 regulator-min-microvolt = <3300000>;
87                 regulator-max-microvolt = <3300000>;
88                 vin-supply = <&vmain_pd>;
89                 regulator-always-on;
90                 regulator-boot-on;
91         };
92
93         vdd_mmc1: regulator-3 {
94                 /* TPS22918DBVR */
95                 compatible = "regulator-fixed";
96                 regulator-name = "vdd_mmc1";
97                 regulator-min-microvolt = <3300000>;
98                 regulator-max-microvolt = <3300000>;
99                 regulator-boot-on;
100                 enable-active-high;
101                 gpio = <&exp1 3 GPIO_ACTIVE_HIGH>;
102         };
103
104         vcc_3v3_sys: regulator-4 {
105                 /* output of TPS222965DSGT */
106                 compatible = "regulator-fixed";
107                 regulator-name = "vcc_3v3_sys";
108                 regulator-min-microvolt = <3300000>;
109                 regulator-max-microvolt = <3300000>;
110                 vin-supply = <&vcc_3v3_main>;
111                 regulator-always-on;
112                 regulator-boot-on;
113         };
114
115         leds {
116                 compatible = "gpio-leds";
117                 pinctrl-names = "default";
118                 pinctrl-0 = <&usr_led_pins_default>;
119
120                 led-0 {
121                         label = "am62a-sk:green:heartbeat";
122                         gpios = <&main_gpio1 49 GPIO_ACTIVE_HIGH>;
123                         linux,default-trigger = "heartbeat";
124                         function = LED_FUNCTION_HEARTBEAT;
125                         default-state = "off";
126                 };
127         };
128
129         tlv320_mclk: clk-0 {
130                 #clock-cells = <0>;
131                 compatible = "fixed-clock";
132                 clock-frequency = <12288000>;
133         };
134
135         codec_audio: sound {
136                 compatible = "simple-audio-card";
137                 simple-audio-card,name = "AM62Ax-SKEVM";
138                 simple-audio-card,widgets =
139                         "Headphone",    "Headphone Jack",
140                         "Line",         "Line In",
141                         "Microphone",   "Microphone Jack";
142                 simple-audio-card,routing =
143                         "Headphone Jack",       "HPLOUT",
144                         "Headphone Jack",       "HPROUT",
145                         "LINE1L",               "Line In",
146                         "LINE1R",               "Line In",
147                         "MIC3R",                "Microphone Jack",
148                         "Microphone Jack",      "Mic Bias";
149                 simple-audio-card,format = "dsp_b";
150                 simple-audio-card,bitclock-master = <&sound_master>;
151                 simple-audio-card,frame-master = <&sound_master>;
152                 simple-audio-card,bitclock-inversion;
153
154                 simple-audio-card,cpu {
155                         sound-dai = <&mcasp1>;
156                 };
157
158                 sound_master: simple-audio-card,codec {
159                         sound-dai = <&tlv320aic3106>;
160                         clocks = <&tlv320_mclk>;
161                 };
162         };
163 };
164
165 &mcu_pmx0 {
166         wkup_uart0_pins_default: wkup-uart0-default-pins {
167                 pinctrl-single,pins = <
168                         AM62AX_MCU_IOPAD(0x0024, PIN_INPUT, 0) /* (C9) WKUP_UART0_RXD */
169                         AM62AX_MCU_IOPAD(0x0028, PIN_OUTPUT, 0) /* (E9) WKUP_UART0_TXD */
170                         AM62AX_MCU_IOPAD(0x002c, PIN_INPUT, 0) /* (C10) WKUP_UART0_CTSn */
171                         AM62AX_MCU_IOPAD(0x0030, PIN_OUTPUT, 0) /* (C8) WKUP_UART0_RTSn */
172                 >;
173         };
174 };
175
176 /* WKUP UART0 is used for DM firmware logs */
177 &wkup_uart0 {
178         pinctrl-names = "default";
179         pinctrl-0 = <&wkup_uart0_pins_default>;
180         status = "reserved";
181 };
182
183 &main_pmx0 {
184         main_uart0_pins_default: main-uart0-default-pins {
185                 pinctrl-single,pins = <
186                         AM62AX_IOPAD(0x1c8, PIN_INPUT, 0) /* (E14) UART0_RXD */
187                         AM62AX_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (D15) UART0_TXD */
188                 >;
189         };
190
191         main_uart1_pins_default: main-uart1-default-pins {
192                 pinctrl-single,pins = <
193                         AM62AX_IOPAD(0x01e8, PIN_INPUT, 1) /* (C17) I2C1_SCL.UART1_RXD */
194                         AM62AX_IOPAD(0x01ec, PIN_OUTPUT, 1) /* (E17) I2C1_SDA.UART1_TXD */
195                         AM62AX_IOPAD(0x0194, PIN_INPUT, 2) /* (C19) MCASP0_AXR3.UART1_CTSn */
196                         AM62AX_IOPAD(0x0198, PIN_OUTPUT, 2) /* (B19) MCASP0_AXR2.UART1_RTSn */
197                 >;
198         };
199
200         main_i2c0_pins_default: main-i2c0-default-pins {
201                 pinctrl-single,pins = <
202                         AM62AX_IOPAD(0x1e0, PIN_INPUT_PULLUP, 0) /* (B16) I2C0_SCL */
203                         AM62AX_IOPAD(0x1e4, PIN_INPUT_PULLUP, 0) /* (A16) I2C0_SDA */
204                 >;
205         };
206
207         main_i2c1_pins_default: main-i2c1-default-pins {
208                 pinctrl-single,pins = <
209                         AM62AX_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17) I2C1_SCL */
210                         AM62AX_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17) I2C1_SDA */
211                 >;
212         };
213
214         main_i2c2_pins_default: main-i2c2-default-pins {
215                 pinctrl-single,pins = <
216                         AM62AX_IOPAD(0x0b0, PIN_INPUT_PULLUP, 1) /* (K22) GPMC0_CSn2.I2C2_SCL */
217                         AM62AX_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */
218                 >;
219         };
220
221         main_mmc1_pins_default: main-mmc1-default-pins {
222                 pinctrl-single,pins = <
223                         AM62AX_IOPAD(0x23c, PIN_INPUT, 0) /* (A21) MMC1_CMD */
224                         AM62AX_IOPAD(0x234, PIN_INPUT, 0) /* (B22) MMC1_CLK */
225                         AM62AX_IOPAD(0x230, PIN_INPUT, 0) /* (A22) MMC1_DAT0 */
226                         AM62AX_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */
227                         AM62AX_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */
228                         AM62AX_IOPAD(0x224, PIN_INPUT, 0) /* (D22) MMC1_DAT3 */
229                         AM62AX_IOPAD(0x240, PIN_INPUT, 0) /* (D17) MMC1_SDCD */
230                 >;
231         };
232
233         usr_led_pins_default: usr-led-default-pins {
234                 pinctrl-single,pins = <
235                         AM62AX_IOPAD(0x244, PIN_OUTPUT, 7) /* (D18) MMC1_SDWP.GPIO1_49 */
236                 >;
237         };
238
239         main_usb1_pins_default: main-usb1-default-pins {
240                 pinctrl-single,pins = <
241                         AM62AX_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18) USB1_DRVVBUS */
242                 >;
243         };
244
245         main_mdio1_pins_default: main-mdio1-default-pins {
246                 pinctrl-single,pins = <
247                         AM62AX_IOPAD(0x160, PIN_OUTPUT, 0) /* (V12) MDIO0_MDC */
248                         AM62AX_IOPAD(0x15c, PIN_INPUT, 0) /* (V13) MDIO0_MDIO */
249                 >;
250         };
251
252         main_rgmii1_pins_default: main-rgmii1-default-pins {
253                 pinctrl-single,pins = <
254                         AM62AX_IOPAD(0x14c, PIN_INPUT, 0) /* (AB16) RGMII1_RD0 */
255                         AM62AX_IOPAD(0x150, PIN_INPUT, 0) /* (V15) RGMII1_RD1 */
256                         AM62AX_IOPAD(0x154, PIN_INPUT, 0) /* (W15) RGMII1_RD2 */
257                         AM62AX_IOPAD(0x158, PIN_INPUT, 0) /* (V14) RGMII1_RD3 */
258                         AM62AX_IOPAD(0x148, PIN_INPUT, 0) /* (AA16) RGMII1_RXC */
259                         AM62AX_IOPAD(0x144, PIN_INPUT, 0) /* (AA15) RGMII1_RX_CTL */
260                         AM62AX_IOPAD(0x134, PIN_INPUT, 0) /* (Y17) RGMII1_TD0 */
261                         AM62AX_IOPAD(0x138, PIN_INPUT, 0) /* (V16) RGMII1_TD1 */
262                         AM62AX_IOPAD(0x13c, PIN_INPUT, 0) /* (Y16) RGMII1_TD2 */
263                         AM62AX_IOPAD(0x140, PIN_INPUT, 0) /* (AA17) RGMII1_TD3 */
264                         AM62AX_IOPAD(0x130, PIN_INPUT, 0) /* (AB17) RGMII1_TXC */
265                         AM62AX_IOPAD(0x12c, PIN_INPUT, 0) /* (W16) RGMII1_TX_CTL */
266                 >;
267         };
268
269         main_mcasp1_pins_default: main-mcasp1-default-pins {
270                 pinctrl-single,pins = <
271                         AM62AX_IOPAD(0x090, PIN_INPUT, 2) /* (L19) GPMC0_BE0n_CLE.MCASP1_ACLKX */
272                         AM62AX_IOPAD(0x098, PIN_INPUT, 2) /* (R18) GPMC0_WAIT0.MCASP1_AFSX */
273                         AM62AX_IOPAD(0x08c, PIN_OUTPUT, 2) /* (K19) GPMC0_WEn.MCASP1_AXR0 */
274                         AM62AX_IOPAD(0x084, PIN_INPUT, 2) /* (L18) GPMC0_ADVn_ALE.MCASP1_AXR2 */
275                 >;
276         };
277 };
278
279 &mcu_pmx0 {
280         status = "okay";
281
282         pmic_irq_pins_default: pmic-irq-default-pins {
283                 pinctrl-single,pins = <
284                         AM62AX_MCU_IOPAD(0x000, PIN_INPUT, 7) /* (E11) MCU_GPIO0_0 */
285                 >;
286         };
287 };
288
289 &mcu_gpio0 {
290         status = "okay";
291 };
292
293 &main_i2c0 {
294         status = "okay";
295         pinctrl-names = "default";
296         pinctrl-0 = <&main_i2c0_pins_default>;
297         clock-frequency = <400000>;
298
299         typec_pd0: usb-power-controller@3f {
300                 compatible = "ti,tps6598x";
301                 reg = <0x3f>;
302
303                 connector {
304                         compatible = "usb-c-connector";
305                         label = "USB-C";
306                         self-powered;
307                         data-role = "dual";
308                         power-role = "sink";
309                         port {
310                                 usb_con_hs: endpoint {
311                                         remote-endpoint = <&usb0_hs_ep>;
312                                 };
313                         };
314                 };
315         };
316
317         tps659312: pmic@48 {
318                 compatible = "ti,tps6593-q1";
319                 reg = <0x48>;
320                 ti,primary-pmic;
321                 system-power-controller;
322
323                 gpio-controller;
324                 #gpio-cells = <2>;
325
326                 pinctrl-names = "default";
327                 pinctrl-0 = <&pmic_irq_pins_default>;
328                 interrupt-parent = <&mcu_gpio0>;
329                 interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
330
331                 buck123-supply = <&vcc_3v3_sys>;
332                 buck4-supply = <&vcc_3v3_sys>;
333                 buck5-supply = <&vcc_3v3_sys>;
334                 ldo1-supply = <&vcc_3v3_sys>;
335                 ldo2-supply = <&vcc_3v3_sys>;
336                 ldo3-supply = <&buck5>;
337                 ldo4-supply = <&vcc_3v3_sys>;
338
339                 regulators {
340                         buck123: buck123 {
341                                 regulator-name = "vcc_core";
342                                 regulator-min-microvolt = <715000>;
343                                 regulator-max-microvolt = <895000>;
344                                 regulator-boot-on;
345                                 regulator-always-on;
346                         };
347
348                         buck4: buck4 {
349                                 regulator-name = "vcc_1v1";
350                                 regulator-min-microvolt = <1100000>;
351                                 regulator-max-microvolt = <1100000>;
352                                 regulator-boot-on;
353                                 regulator-always-on;
354                         };
355
356                         buck5: buck5 {
357                                 regulator-name = "vcc_1v8_sys";
358                                 regulator-min-microvolt = <1800000>;
359                                 regulator-max-microvolt = <1800000>;
360                                 regulator-boot-on;
361                                 regulator-always-on;
362                         };
363
364                         ldo1: ldo1 {
365                                 regulator-name = "vddshv5_sdio";
366                                 regulator-min-microvolt = <3300000>;
367                                 regulator-max-microvolt = <3300000>;
368                                 regulator-boot-on;
369                                 regulator-always-on;
370                         };
371
372                         ldo2: ldo2 {
373                                 regulator-name = "vpp_1v8";
374                                 regulator-min-microvolt = <1800000>;
375                                 regulator-max-microvolt = <1800000>;
376                                 regulator-boot-on;
377                                 regulator-always-on;
378                         };
379
380                         ldo3: ldo3 {
381                                 regulator-name = "vcc_0v85";
382                                 regulator-min-microvolt = <850000>;
383                                 regulator-max-microvolt = <850000>;
384                                 regulator-boot-on;
385                                 regulator-always-on;
386                         };
387
388                         ldo4: ldo4 {
389                                 regulator-name = "vdda_1v8";
390                                 regulator-min-microvolt = <1800000>;
391                                 regulator-max-microvolt = <1800000>;
392                                 regulator-boot-on;
393                                 regulator-always-on;
394                         };
395                 };
396         };
397 };
398
399 &main_i2c1 {
400         status = "okay";
401         pinctrl-names = "default";
402         pinctrl-0 = <&main_i2c1_pins_default>;
403         clock-frequency = <100000>;
404
405         exp1: gpio@22 {
406                 compatible = "ti,tca6424";
407                 reg = <0x22>;
408                 gpio-controller;
409                 #gpio-cells = <2>;
410
411                 gpio-line-names = "GPIO_CPSW2_RST", "GPIO_CPSW1_RST",
412                                    "BT_EN_SOC", "MMC1_SD_EN",
413                                    "VPP_EN", "EXP_PS_3V3_En",
414                                    "EXP_PS_5V0_En", "EXP_HAT_DETECT",
415                                    "GPIO_AUD_RSTn", "GPIO_eMMC_RSTn",
416                                    "UART1_FET_BUF_EN", "BT_UART_WAKE_SOC",
417                                    "GPIO_HDMI_RSTn", "CSI_GPIO0",
418                                    "CSI_GPIO1", "WLAN_ALERTn",
419                                    "HDMI_INTn", "TEST_GPIO2",
420                                    "MCASP1_FET_EN", "MCASP1_BUF_BT_EN",
421                                    "MCASP1_FET_SEL", "UART1_FET_SEL",
422                                    "PD_I2C_IRQ", "IO_EXP_TEST_LED";
423         };
424
425         tlv320aic3106: audio-codec@1b {
426                 #sound-dai-cells = <0>;
427                 compatible = "ti,tlv320aic3106";
428                 reg = <0x1b>;
429                 ai3x-micbias-vg = <1>;  /* 2.0V */
430
431                 /* Regulators */
432                 AVDD-supply = <&vcc_3v3_sys>;
433                 IOVDD-supply = <&vcc_3v3_sys>;
434                 DRVDD-supply = <&vcc_3v3_sys>;
435                 DVDD-supply = <&buck5>;
436         };
437 };
438
439 &sdhci1 {
440         /* SD/MMC */
441         status = "okay";
442         vmmc-supply = <&vdd_mmc1>;
443         pinctrl-names = "default";
444         pinctrl-0 = <&main_mmc1_pins_default>;
445         ti,driver-strength-ohm = <50>;
446         disable-wp;
447 };
448
449 &main_gpio0 {
450         status = "okay";
451 };
452
453 &main_gpio1 {
454         status = "okay";
455 };
456
457 &main_gpio_intr {
458         status = "okay";
459 };
460
461 &main_uart0 {
462         status = "okay";
463         pinctrl-names = "default";
464         pinctrl-0 = <&main_uart0_pins_default>;
465 };
466
467 /* Main UART1 is used for TIFS firmware logs */
468 &main_uart1 {
469         pinctrl-names = "default";
470         pinctrl-0 = <&main_uart1_pins_default>;
471         status = "reserved";
472 };
473
474 &usbss0 {
475         status = "okay";
476         ti,vbus-divider;
477 };
478
479 &usb0 {
480         usb-role-switch;
481
482         port {
483                 usb0_hs_ep: endpoint {
484                         remote-endpoint = <&usb_con_hs>;
485                 };
486         };
487 };
488
489 &usbss1 {
490         status = "okay";
491 };
492
493 &usb1 {
494         dr_mode = "host";
495         pinctrl-names = "default";
496         pinctrl-0 = <&main_usb1_pins_default>;
497 };
498
499 &cpsw3g {
500         status = "okay";
501         pinctrl-names = "default";
502         pinctrl-0 = <&main_rgmii1_pins_default>;
503 };
504
505 &cpsw_port1 {
506         status = "okay";
507         phy-mode = "rgmii-rxid";
508         phy-handle = <&cpsw3g_phy0>;
509 };
510
511 &cpsw_port2 {
512         status = "disabled";
513 };
514
515 &cpsw3g_mdio {
516         status = "okay";
517         pinctrl-names = "default";
518         pinctrl-0 = <&main_mdio1_pins_default>;
519
520         cpsw3g_phy0: ethernet-phy@0 {
521                 reg = <0>;
522                 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
523                 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
524                 ti,min-output-impedance;
525         };
526 };
527
528 &mcasp1 {
529         status = "okay";
530         #sound-dai-cells = <0>;
531
532         pinctrl-names = "default";
533         pinctrl-0 = <&main_mcasp1_pins_default>;
534
535         op-mode = <0>;          /* MCASP_IIS_MODE */
536         tdm-slots = <2>;
537
538         serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
539                1 0 2 0
540                0 0 0 0
541                0 0 0 0
542                0 0 0 0
543         >;
544         tx-num-evt = <32>;
545         rx-num-evt = <32>;
546 };