-
Notifications
You must be signed in to change notification settings - Fork 26
/
00005-add-at-f-stm32mp157a-sodimm2-mx.patch
950 lines (950 loc) · 21.9 KB
/
00005-add-at-f-stm32mp157a-sodimm2-mx.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
diff --git a/fdts/stm32mp15-mx.dtsi b/fdts/stm32mp15-mx.dtsi
new file mode 100644
index 000000000..2b1e690de
--- /dev/null
+++ b/fdts/stm32mp15-mx.dtsi
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2015-2018, STMicroelectronics - All Rights Reserved
+ *
+ * SPDX-License-Identifier: GPL-2.0+ BSD-3-Clause
+ *
+ */
+
+/*
+ * File generated by STMicroelectronics STM32CubeMX DDR Tool for MPUs
+ * DDR type: DDR3 / DDR3L
+ * DDR width: 32bits
+ * DDR density: 8Gb
+ * System frequency: 533000kHz
+ * Relaxed Timing Mode: false
+ * Address mapping type: RBC
+ *
+ * Save Date: 2022.02.21, save Time: 13:47:46
+ */
+
+#define DDR_MEM_NAME "DDR3-DDR3L 32bits 533000kHz"
+#define DDR_MEM_SPEED 533000
+#define DDR_MEM_SIZE 0x40000000
+
+#define DDR_MSTR 0x00040401
+#define DDR_MRCTRL0 0x00000010
+#define DDR_MRCTRL1 0x00000000
+#define DDR_DERATEEN 0x00000000
+#define DDR_DERATEINT 0x00800000
+#define DDR_PWRCTL 0x00000000
+#define DDR_PWRTMG 0x00400010
+#define DDR_HWLPCTL 0x00000000
+#define DDR_RFSHCTL0 0x00210000
+#define DDR_RFSHCTL3 0x00000000
+#define DDR_RFSHTMG 0x0081008B
+#define DDR_CRCPARCTL0 0x00000000
+#define DDR_DRAMTMG0 0x121B2414
+#define DDR_DRAMTMG1 0x000A041C
+#define DDR_DRAMTMG2 0x0608090F
+#define DDR_DRAMTMG3 0x0050400C
+#define DDR_DRAMTMG4 0x08040608
+#define DDR_DRAMTMG5 0x06060403
+#define DDR_DRAMTMG6 0x02020002
+#define DDR_DRAMTMG7 0x00000202
+#define DDR_DRAMTMG8 0x00001005
+#define DDR_DRAMTMG14 0x000000A0
+#define DDR_ZQCTL0 0xC2000040
+#define DDR_DFITMG0 0x02060105
+#define DDR_DFITMG1 0x00000202
+#define DDR_DFILPCFG0 0x07000000
+#define DDR_DFIUPD0 0xC0400003
+#define DDR_DFIUPD1 0x00000000
+#define DDR_DFIUPD2 0x00000000
+#define DDR_DFIPHYMSTR 0x00000000
+#define DDR_ODTCFG 0x06000600
+#define DDR_ODTMAP 0x00000001
+#define DDR_SCHED 0x00000C01
+#define DDR_SCHED1 0x00000000
+#define DDR_PERFHPR1 0x01000001
+#define DDR_PERFLPR1 0x08000200
+#define DDR_PERFWR1 0x08000400
+#define DDR_DBG0 0x00000000
+#define DDR_DBG1 0x00000000
+#define DDR_DBGCMD 0x00000000
+#define DDR_POISONCFG 0x00000000
+#define DDR_PCCFG 0x00000010
+#define DDR_PCFGR_0 0x00010000
+#define DDR_PCFGW_0 0x00000000
+#define DDR_PCFGQOS0_0 0x02100C03
+#define DDR_PCFGQOS1_0 0x00800100
+#define DDR_PCFGWQOS0_0 0x01100C03
+#define DDR_PCFGWQOS1_0 0x01000200
+#define DDR_PCFGR_1 0x00010000
+#define DDR_PCFGW_1 0x00000000
+#define DDR_PCFGQOS0_1 0x02100C03
+#define DDR_PCFGQOS1_1 0x00800040
+#define DDR_PCFGWQOS0_1 0x01100C03
+#define DDR_PCFGWQOS1_1 0x01000200
+#define DDR_ADDRMAP1 0x00080808
+#define DDR_ADDRMAP2 0x00000000
+#define DDR_ADDRMAP3 0x00000000
+#define DDR_ADDRMAP4 0x00001F1F
+#define DDR_ADDRMAP5 0x07070707
+#define DDR_ADDRMAP6 0x0F070707
+#define DDR_ADDRMAP9 0x00000000
+#define DDR_ADDRMAP10 0x00000000
+#define DDR_ADDRMAP11 0x00000000
+#define DDR_PGCR 0x01442E02
+#define DDR_PTR0 0x0022AA5B
+#define DDR_PTR1 0x04841104
+#define DDR_PTR2 0x042DA068
+#define DDR_ACIOCR 0x10400812
+#define DDR_DXCCR 0x00000C40
+#define DDR_DSGCR 0xF200011F
+#define DDR_DCR 0x0000000B
+#define DDR_DTPR0 0x38D488D0
+#define DDR_DTPR1 0x098B00D8
+#define DDR_DTPR2 0x10023600
+#define DDR_MR0 0x00000840
+#define DDR_MR1 0x00000000
+#define DDR_MR2 0x00000208
+#define DDR_MR3 0x00000000
+#define DDR_ODTCR 0x00010000
+#define DDR_ZQ0CR1 0x00000038
+#define DDR_DX0GCR 0x0000CE81
+#define DDR_DX0DLLCR 0x40000000
+#define DDR_DX0DQTR 0xFFFFFFFF
+#define DDR_DX0DQSTR 0x3DB02000
+#define DDR_DX1GCR 0x0000CE81
+#define DDR_DX1DLLCR 0x40000000
+#define DDR_DX1DQTR 0xFFFFFFFF
+#define DDR_DX1DQSTR 0x3DB02000
+#define DDR_DX2GCR 0x0000CE81
+#define DDR_DX2DLLCR 0x40000000
+#define DDR_DX2DQTR 0xFFFFFFFF
+#define DDR_DX2DQSTR 0x3DB02000
+#define DDR_DX3GCR 0x0000CE81
+#define DDR_DX3DLLCR 0x40000000
+#define DDR_DX3DQTR 0xFFFFFFFF
+#define DDR_DX3DQSTR 0x3DB02000
diff --git a/fdts/stm32mp157a-sodimm2-mx-fw-config.dts b/fdts/stm32mp157a-sodimm2-mx-fw-config.dts
new file mode 100644
index 000000000..d7dcbb0a4
--- /dev/null
+++ b/fdts/stm32mp157a-sodimm2-mx-fw-config.dts
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
+/*
+ * Copyright (C) STMicroelectronics 2022 - All Rights Reserved
+ * Author: STM32CubeMX code generation for STMicroelectronics.
+ */
+
+/* For more information on Device Tree configuration, please refer to
+ * https://wiki.st.com/stm32mpu/wiki/Category:Device_tree_configuration
+ */
+
+#define DDR_SIZE 0x40000000 /* 1GB */
+#include "stm32mp15-fw-config.dts"
diff --git a/fdts/stm32mp157a-sodimm2-mx.dts b/fdts/stm32mp157a-sodimm2-mx.dts
new file mode 100644
index 000000000..cd86c1181
--- /dev/null
+++ b/fdts/stm32mp157a-sodimm2-mx.dts
@@ -0,0 +1,801 @@
+/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
+/*
+ * Copyright (C) STMicroelectronics 2022 - All Rights Reserved
+ * Author: STM32CubeMX code generation for STMicroelectronics.
+ */
+
+/* For more information on Device Tree configuration, please refer to
+ * https://wiki.st.com/stm32mpu/wiki/Category:Device_tree_configuration
+ */
+
+/dts-v1/;
+#include <dt-bindings/pinctrl/stm32-pinfunc.h>
+#include <dt-bindings/clock/stm32mp1-clksrc.h>
+#include <dt-bindings/soc/st,stm32-etzpc.h>
+#include "stm32mp15-mx.dtsi"
+
+#include "stm32mp157.dtsi"
+#include "stm32mp15xa.dtsi"
+#include "stm32mp15xxaa-pinctrl.dtsi"
+#include "stm32mp15-ddr.dtsi"
+
+/* USER CODE BEGIN includes */
+#include <dt-bindings/power/stm32mp1-power.h>
+/* USER CODE END includes */
+
+/ {
+ model = "STMicroelectronics STM32MP157AAA3 SODIMM module";
+ compatible = "st,stm32mp157a-sodimm2-mx", "st,stm32mp157";
+
+ memory@c0000000 {
+ device_type = "memory";
+ reg = <0xc0000000 0x40000000>;
+
+ /* USER CODE BEGIN memory */
+ /* USER CODE END memory */
+ };
+
+ /* USER CODE BEGIN root */
+
+ aliases{
+ serial0 = &uart4;
+ //serial1 = &usart3;
+ };
+
+ vin:vin{
+ compatible = "regulator-fixed";
+ regulator-name = "vin";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ chosen{
+ stdout-path = "serial0:115200n8";
+ };
+ /* USER CODE END root */
+
+ clocks {
+ /* USER CODE BEGIN clocks */
+ /* USER CODE END clocks */
+
+ clk_lse: clk-lse {
+ st,drive = < LSEDRV_MEDIUM_HIGH >;
+
+ /* USER CODE BEGIN clk_lse */
+ /* USER CODE END clk_lse */
+ };
+
+ clk_hse: clk-hse {
+ st,digbypass;
+
+ /* USER CODE BEGIN clk_hse */
+ /* USER CODE END clk_hse */
+ };
+ };
+
+}; /*root*/
+
+&pinctrl {
+ quadspi_pins_mx: quadspi_mx-0 {
+ pins1 {
+ pinmux = <STM32_PINMUX('B', 6, AF10)>, /* QUADSPI_BK1_NCS */
+ <STM32_PINMUX('C', 0, AF10)>; /* QUADSPI_BK2_NCS */
+ bias-pull-up;
+ drive-push-pull;
+ slew-rate = <1>;
+ };
+ pins2 {
+ pinmux = <STM32_PINMUX('F', 10, AF9)>; /* QUADSPI_CLK */
+ bias-disable;
+ drive-push-pull;
+ slew-rate = <3>;
+ };
+ pins3 {
+ pinmux = <STM32_PINMUX('F', 6, AF9)>, /* QUADSPI_BK1_IO3 */
+ <STM32_PINMUX('F', 7, AF9)>, /* QUADSPI_BK1_IO2 */
+ <STM32_PINMUX('F', 8, AF10)>, /* QUADSPI_BK1_IO0 */
+ <STM32_PINMUX('F', 9, AF10)>, /* QUADSPI_BK1_IO1 */
+ <STM32_PINMUX('G', 7, AF11)>, /* QUADSPI_BK2_IO3 */
+ <STM32_PINMUX('G', 10, AF11)>, /* QUADSPI_BK2_IO2 */
+ <STM32_PINMUX('H', 2, AF9)>, /* QUADSPI_BK2_IO0 */
+ <STM32_PINMUX('H', 3, AF9)>; /* QUADSPI_BK2_IO1 */
+ bias-disable;
+ drive-push-pull;
+ slew-rate = <1>;
+ };
+ };
+
+ sdmmc1_pins_mx: sdmmc1_mx-0 {
+ pins1 {
+ pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
+ <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */
+ <STM32_PINMUX('C', 10, AF12)>, /* SDMMC1_D2 */
+ <STM32_PINMUX('C', 11, AF12)>, /* SDMMC1_D3 */
+ <STM32_PINMUX('D', 2, AF12)>; /* SDMMC1_CMD */
+ bias-pull-up;
+ drive-push-pull;
+ slew-rate = <1>;
+ };
+ pins2 {
+ pinmux = <STM32_PINMUX('C', 12, AF12)>; /* SDMMC1_CK */
+ bias-pull-up;
+ drive-push-pull;
+ slew-rate = <2>;
+ };
+ };
+
+ sdmmc2_pins_mx: sdmmc2_mx-0 {
+ pins1 {
+ pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
+ <STM32_PINMUX('A', 9, AF10)>, /* SDMMC2_D5 */
+ <STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
+ <STM32_PINMUX('B', 4, AF9)>, /* SDMMC2_D3 */
+ <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
+ <STM32_PINMUX('B', 15, AF9)>, /* SDMMC2_D1 */
+ <STM32_PINMUX('D', 3, AF9)>, /* SDMMC2_D7 */
+ <STM32_PINMUX('E', 5, AF9)>, /* SDMMC2_D6 */
+ <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
+ bias-pull-up;
+ drive-push-pull;
+ slew-rate = <1>;
+ };
+ pins2 {
+ pinmux = <STM32_PINMUX('E', 3, AF9)>; /* SDMMC2_CK */
+ bias-pull-up;
+ drive-push-pull;
+ slew-rate = <2>;
+ };
+ };
+
+ uart4_pins_mx: uart4_mx-0 {
+ pins1 {
+ pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
+ bias-disable;
+ };
+ pins2 {
+ pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
+ bias-disable;
+ drive-push-pull;
+ slew-rate = <0>;
+ };
+ };
+
+ usb_otg_hs_pins_mx: usb_otg_hs_mx-0 {
+ pins {
+ pinmux = <STM32_PINMUX('A', 10, ANALOG)>; /* USB_OTG_HS_ID */
+ };
+ };
+
+ /* USER CODE BEGIN pinctrl */
+ /* USER CODE END pinctrl */
+};
+
+&pinctrl_z {
+ i2c4_pins_z_mx: i2c4_mx-0 {
+ pins {
+ pinmux = <STM32_PINMUX('Z', 4, AF6)>, /* I2C4_SCL */
+ <STM32_PINMUX('Z', 5, AF6)>; /* I2C4_SDA */
+ bias-disable;
+ drive-open-drain;
+ slew-rate = <0>;
+ };
+ };
+
+ /* USER CODE BEGIN pinctrl_z */
+ /* USER CODE END pinctrl_z */
+};
+
+&bsec{
+ status = "okay";
+ secure-status = "okay";
+
+ /* USER CODE BEGIN bsec */
+
+ board_id:board_id@ec{
+ reg = <0xec 0x4>;
+ st,non-secure-otp;
+ };
+ /* USER CODE END bsec */
+};
+
+&etzpc{
+ secure-status = "okay";
+ st,decprot = <
+ /*"Non Secured" peripherals*/
+ DECPROT(STM32MP1_ETZPC_ADC_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_DCMI_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_DMA1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_DMA2_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_DMAMUX_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_ETH_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_TT_FDCAN_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_HASH1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_I2C2_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_I2C4_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_I2C5_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_QSPI_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_DLYBQ_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_RNG1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_TIM6_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_UART4_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ DECPROT(STM32MP1_ETZPC_OTG_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
+ /*"NS_R S_W" peripherals*/
+ DECPROT(STM32MP1_ETZPC_DDRCTRL_ID, DECPROT_NS_R_S_W, DECPROT_LOCK)
+ DECPROT(STM32MP1_ETZPC_DDRPHYC_ID, DECPROT_NS_R_S_W, DECPROT_LOCK)
+ /*"Secured" peripherals*/
+ DECPROT(STM32MP1_ETZPC_STGENC_ID, DECPROT_S_RW, DECPROT_UNLOCK)
+
+ /*Restriction: following IDs are not managed - please to use User-Section if needed:
+ STM32MP1_ETZPC_SRAMx_ID STM32MP1_ETZPC_RETRAM_ID STM32MP1_ETZPC_BKPSRAM_ID*/
+
+ /* USER CODE BEGIN etzpc_decprot */
+ /*STM32CubeMX generates a basic and standard configuration for ETZPC.
+ Additional device configurations can be added here if needed.
+ "etzpc" node could be also overloaded in "addons" User-Section.*/
+
+ DECPROT(STM32MP1_ETZPC_BKPSRAM_ID, DECPROT_S_RW, DECPROT_UNLOCK)
+
+ /* USER CODE END etzpc_decprot */
+ >;
+
+ /* USER CODE BEGIN etzpc */
+ /* USER CODE END etzpc */
+};
+
+&hash1{
+ status = "okay";
+
+ /* USER CODE BEGIN hash1 */
+ /* USER CODE END hash1 */
+};
+
+&i2c4{
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c4_pins_z_mx>;
+ status = "okay";
+ secure-status = "okay";
+
+ /* USER CODE BEGIN i2c4 */
+ i2c-scl-rising-time-ns = <185>;
+ i2c-scl-falling-time-ns = <20>;
+ clock-frequency = <400000>;
+
+ pmic:stpmic@33{
+ compatible = "st,stpmic1";
+ reg = <0x33>;
+ interrupts-extended = <&exti_pwr 55 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ status = "okay";
+ secure-status = "okay";
+
+ regulators{
+ compatible = "st,stpmic1-regulators";
+ buck1-supply = <&vin>;
+ buck2-supply = <&vin>;
+ buck3-supply = <&vin>;
+ buck4-supply = <&vin>;
+ ldo1-supply = <&v3v3>;
+ ldo2-supply = <&v3v3>;
+ ldo3-supply = <&vdd_ddr>;
+ ldo4-supply = <&vin>;
+ ldo5-supply = <&v3v3>;
+ ldo6-supply = <&v3v3>;
+ vref_ddr-supply = <&vin>;
+ boost-supply = <&vin>;
+ pwr_sw1-supply = <&bst_out>;
+ pwr_sw2-supply = <&bst_out>;
+
+ vddcore:buck1{
+ regulator-name = "vddcore";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-always-on;
+ regulator-initial-mode = <0>;
+ regulator-over-current-protection;
+
+ lp-stop{
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1200000>;
+ };
+
+ lplv-stop{
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <900000>;
+ };
+
+ standby-ddr-sr{
+ regulator-off-in-suspend;
+ };
+
+ standby-ddr-off{
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr:buck2{
+ regulator-name = "vdd_ddr";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-always-on;
+ regulator-initial-mode = <0>;
+ regulator-over-current-protection;
+
+ lp-stop{
+ regulator-suspend-microvolt = <1350000>;
+ regulator-on-in-suspend;
+ };
+
+ lplv-stop{
+ regulator-suspend-microvolt = <1350000>;
+ regulator-on-in-suspend;
+ };
+
+ standby-ddr-sr{
+ regulator-suspend-microvolt = <1350000>;
+ regulator-on-in-suspend;
+ };
+
+ standby-ddr-off{
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd:buck3{
+ regulator-name = "vdd";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ st,mask-reset;
+ regulator-initial-mode = <0>;
+ regulator-over-current-protection;
+
+ lp-stop{
+ regulator-suspend-microvolt = <3300000>;
+ regulator-on-in-suspend;
+ };
+
+ lplv-stop{
+ regulator-suspend-microvolt = <3300000>;
+ regulator-on-in-suspend;
+ };
+
+ standby-ddr-sr{
+ regulator-suspend-microvolt = <3300000>;
+ regulator-on-in-suspend;
+ };
+
+ standby-ddr-off{
+ regulator-suspend-microvolt = <3300000>;
+ regulator-on-in-suspend;
+ };
+ };
+
+ v3v3:buck4{
+ regulator-name = "v3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-over-current-protection;
+ regulator-initial-mode = <0>;
+
+ standby-ddr-sr{
+ regulator-off-in-suspend;
+ };
+
+ standby-ddr-off{
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda:ldo1{
+ regulator-name = "vdda";
+ regulator-min-microvolt = <2900000>;
+ regulator-max-microvolt = <2900000>;
+
+ standby-ddr-sr{
+ regulator-off-in-suspend;
+ };
+
+ standby-ddr-off{
+ regulator-off-in-suspend;
+ };
+ };
+
+ v2v8:ldo2{
+ regulator-name = "v2v8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+
+ standby-ddr-sr{
+ regulator-off-in-suspend;
+ };
+
+ standby-ddr-off{
+ regulator-off-in-suspend;
+ };
+ };
+
+ vtt_ddr:ldo3{
+ regulator-name = "vtt_ddr";
+ regulator-always-on;
+ regulator-over-current-protection;
+ st,regulator-sink-source;
+
+ lp-stop{
+ regulator-off-in-suspend;
+ };
+
+ lplv-stop{
+ regulator-off-in-suspend;
+ };
+
+ standby-ddr-sr{
+ regulator-off-in-suspend;
+ };
+
+ standby-ddr-off{
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_usb:ldo4{
+ regulator-name = "vdd_usb";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ standby-ddr-sr{
+ regulator-off-in-suspend;
+ };
+
+ standby-ddr-off{
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_sd:ldo5{
+ regulator-name = "vdd_sd";
+ regulator-min-microvolt = <2900000>;
+ regulator-max-microvolt = <2900000>;
+ regulator-boot-on;
+
+ standby-ddr-sr{
+ regulator-off-in-suspend;
+ };
+
+ standby-ddr-off{
+ regulator-off-in-suspend;
+ };
+ };
+
+ v1v8:ldo6{
+ regulator-name = "v1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <300000>;
+
+ standby-ddr-sr{
+ regulator-off-in-suspend;
+ };
+
+ standby-ddr-off{
+ regulator-off-in-suspend;
+ };
+ };
+
+ vref_ddr:vref_ddr{
+ regulator-name = "vref_ddr";
+ regulator-always-on;
+
+ lp-stop{
+ regulator-on-in-suspend;
+ };
+
+ lplv-stop{
+ regulator-on-in-suspend;
+ };
+
+ standby-ddr-sr{
+ regulator-on-in-suspend;
+ };
+
+ standby-ddr-off{
+ regulator-off-in-suspend;
+ };
+ };
+
+ bst_out:boost{
+ regulator-name = "bst_out";
+ };
+
+ vbus_otg:pwr_sw1{
+ regulator-name = "vbus_otg";
+ };
+
+ vbus_sw:pwr_sw2{
+ regulator-name = "vbus_sw";
+ regulator-active-discharge = <1>;
+ };
+ };
+ };
+ /* USER CODE END i2c4 */
+};
+
+&iwdg2{
+ status = "okay";
+ secure-status = "okay";
+
+ /* USER CODE BEGIN iwdg2 */
+ timeout-sec = <32>;
+ secure-timeout-sec = <5>;
+ /* USER CODE END iwdg2 */
+};
+
+&pwr_regulators{
+ status = "okay";
+ secure-status = "okay";
+
+ /* USER CODE BEGIN pwr_regulators */
+ system_suspend_supported_soc_modes = <
+ STM32_PM_CSLEEP_RUN
+ STM32_PM_CSTOP_ALLOW_LP_STOP
+ STM32_PM_CSTOP_ALLOW_LPLV_STOP
+ STM32_PM_CSTOP_ALLOW_STANDBY_DDR_SR
+ >;
+ system_off_soc_mode = <STM32_PM_CSTOP_ALLOW_STANDBY_DDR_OFF>;
+ vdd-supply = <&vdd>;
+ vdd_3v3_usbfs-supply = <&vdd_usb>;
+ /* USER CODE END pwr_regulators */
+};
+
+&qspi{
+ pinctrl-names = "default";
+ pinctrl-0 = <&quadspi_pins_mx>;
+ status = "okay";
+
+ /* USER CODE BEGIN qspi */
+ reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ flash0:mx66l51235l@0{
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-rx-bus-width = <4>;
+ spi-max-frequency = <108000000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+ /* USER CODE END qspi */
+};
+
+&rcc{
+ status = "okay";
+ secure-status = "okay";
+ st,csi-cal;
+ st,hsi-cal;
+ st,cal-sec = <60>;
+ st,clksrc = <
+ CLK_MPU_PLL1P
+ CLK_AXI_PLL2P
+ CLK_MCU_PLL3P
+ CLK_PLL12_HSE
+ CLK_PLL3_HSE
+ CLK_PLL4_HSE
+ CLK_RTC_LSE
+ CLK_MCO1_DISABLED
+ CLK_MCO2_DISABLED
+ >;
+ st,clkdiv = <
+ 1 /*MPU*/
+ 0 /*AXI*/
+ 0 /*MCU*/
+ 1 /*APB1*/
+ 1 /*APB2*/
+ 1 /*APB3*/
+ 1 /*APB4*/
+ 2 /*APB5*/
+ 23 /*RTC*/
+ 0 /*MCO1*/
+ 0 /*MCO2*/
+ >;
+ st,pkcs = <
+ CLK_CKPER_DISABLED
+ CLK_QSPI_ACLK
+ CLK_ETH_PLL4P
+ CLK_SDMMC12_PLL4P
+ CLK_STGEN_HSE
+ CLK_USBPHY_HSE
+ CLK_SPI2S1_DISABLED
+ CLK_SPI2S23_DISABLED
+ CLK_SPI45_DISABLED
+ CLK_SPI6_DISABLED
+ CLK_I2C46_HSI
+ CLK_SDMMC3_DISABLED
+ CLK_USBO_USBPHY
+ CLK_ADC_PLL4R
+ CLK_CEC_DISABLED
+ CLK_I2C12_HSI
+ CLK_I2C35_PCLK1
+ CLK_UART1_DISABLED
+ CLK_UART24_HSI
+ CLK_UART35_DISABLED
+ CLK_UART6_DISABLED
+ CLK_UART78_DISABLED
+ CLK_SPDIF_DISABLED
+ CLK_FDCAN_PLL3Q
+ CLK_SAI1_DISABLED
+ CLK_SAI2_DISABLED
+ CLK_SAI3_DISABLED
+ CLK_SAI4_DISABLED
+ CLK_RNG1_LSI
+ CLK_LPTIM1_DISABLED
+ CLK_LPTIM23_DISABLED
+ CLK_LPTIM45_DISABLED
+ >;
+ pll2:st,pll@1 {
+ compatible = "st,stm32mp1-pll";
+ reg = <1>;
+ cfg = < 2 65 1 0 0 PQR(1,1,1) >;
+ frac = < 0x1400 >;
+ };
+ pll3:st,pll@2 {
+ compatible = "st,stm32mp1-pll";
+ reg = <2>;
+ cfg = < 1 49 2 5 36 PQR(1,1,0) >;
+ };
+ pll4:st,pll@3 {
+ compatible = "st,stm32mp1-pll";
+ reg = <3>;
+ cfg = < 3 98 5 17 7 PQR(1,1,0) >;
+ };
+
+ /* USER CODE BEGIN rcc */
+ /* USER CODE END rcc */
+};
+
+&rng1{
+ status = "okay";
+ secure-status = "okay";
+
+ /* USER CODE BEGIN rng1 */
+ /* USER CODE END rng1 */
+};
+
+&rtc{
+ status = "okay";
+ secure-status = "okay";
+
+ /* USER CODE BEGIN rtc */
+ /* USER CODE END rtc */
+};
+
+&sdmmc1{
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc1_pins_mx>;
+ status = "okay";
+
+ /* USER CODE BEGIN sdmmc1 */
+ broken-cd;
+ st,neg-edge;
+ bus-width = <4>;
+ vmmc-supply = <&vdd_sd>;
+ //sd-uhs-sdr12;
+ //sd-uhs-sdr25;
+ //sd-uhs-sdr50;
+ //sd-uhs-ddr50;
+ /* USER CODE END sdmmc1 */
+};
+
+&sdmmc2{
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc2_pins_mx>;
+ status = "okay";
+
+ /* USER CODE BEGIN sdmmc2 */
+ non-removable;
+ no-sd;
+ no-sdio;
+ st,neg-edge;
+ bus-width = <8>;
+ vmmc-supply = <&v3v3>;
+ vqmmc-supply = <&vdd>;
+ mmc-ddr-3_3v;
+ /* USER CODE END sdmmc2 */
+};
+
+&tamp{
+ status = "okay";
+ secure-status = "okay";
+
+ /* USER CODE BEGIN tamp */
+ /* USER CODE END tamp */
+};
+
+&timers15{
+ secure-status = "okay";
+
+ /* USER CODE BEGIN timers15 */
+ st,hsi-cal-input = <7>;
+ st,csi-cal-input = <8>;
+ /* USER CODE END timers15 */
+};
+
+&uart4{
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart4_pins_mx>;
+ status = "okay";
+
+ /* USER CODE BEGIN uart4 */
+ /* USER CODE END uart4 */
+};
+
+&usbotg_hs{
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_otg_hs_pins_mx>;
+ status = "okay";
+
+ /* USER CODE BEGIN usbotg_hs */
+ vbus-supply = <&vbus_otg>;
+ phys = <&usbphyc_port1 0>;
+ phy-names = "usb2-phy";
+ /* USER CODE END usbotg_hs */
+};
+
+&usbphyc{
+ status = "okay";
+
+ /* USER CODE BEGIN usbphyc */
+ /* USER CODE END usbphyc */
+};
+
+&usbphyc_port0{
+ status = "okay";
+
+ /* USER CODE BEGIN usbphyc_port0 */
+ phy-supply = <&vdd_usb>;
+ /* USER CODE END usbphyc_port0 */
+};
+
+&usbphyc_port1{
+ status = "okay";
+
+ /* USER CODE BEGIN usbphyc_port1 */
+ phy-supply = <&vdd_usb>;
+ /* USER CODE END usbphyc_port1 */
+};
+
+/* USER CODE BEGIN addons */
+
+&cpu0{
+ cpu-supply = <&vddcore>;
+ clock-frequency = <650000000>;
+};
+
+&cpu1{
+ cpu-supply = <&vddcore>;
+ clock-frequency = <650000000>;
+};
+
+&nvmem_layout{
+ nvmem-cells = <&cfg0_otp>,
+ <&part_number_otp>,
+ <&monotonic_otp>,
+ <&nand_otp>,
+ <&uid_otp>,
+ <&package_otp>,
+ <&hw2_otp>,
+ <&pkh_otp>,
+ <&board_id>;
+ nvmem-cell-names = "cfg0_otp",
+ "part_number_otp",
+ "monotonic_otp",
+ "nand_otp",
+ "uid_otp",
+ "package_otp",
+ "hw2_otp",
+ "pkh_otp",
+ "board_id";
+};
+/* USER CODE END addons */