Commit 4c9db8b127aa09fed18f7a7d4ac457ad3ed42206
1 parent
2e50d048bf
Exists in
emb_lf_v2022.04
MLK-18147-2 mx6sabreauto/sabresd: Update mx6dq/dqp/dl/s sabre boards codes
Porting the mx6dq/dqp/dl/s sabresd and sabreauto codes from v2018.03 The major change is moving back to non-SPL mode for sabre boards. which means all old things like DCD, plugin are added back for each platform. This inherits the way used in v2018.03 Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 3a3a0f07c85b0ae86b18709445206db0310c3b63) (cherry picked from commit 90b86014f70f44db3b18e96b2643a57a0a6f92a3) (cherry picked from commit 2660660f213e117c3445ba6f18e78d44df1683bc) (cherry picked from commit 7e4494e316fd48aad0cee22f45722147ff1f6dcd) (cherry picked from commit b29f22f4314bc67305e1533ba21ddaa67aa8df49)
Showing 19 changed files with 4085 additions and 232 deletions Side-by-side Diff
- arch/arm/mach-imx/mx6/Kconfig
- board/freescale/mx6sabreauto/Kconfig
- board/freescale/mx6sabreauto/imximage.cfg
- board/freescale/mx6sabreauto/mx6dl.cfg
- board/freescale/mx6sabreauto/mx6qp.cfg
- board/freescale/mx6sabreauto/mx6sabreauto.c
- board/freescale/mx6sabreauto/mx6solo.cfg
- board/freescale/mx6sabreauto/plugin.S
- board/freescale/mx6sabresd/Kconfig
- board/freescale/mx6sabresd/mx6dlsabresd.cfg
- board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg
- board/freescale/mx6sabresd/mx6qp.cfg
- board/freescale/mx6sabresd/mx6sabresd.c
- board/freescale/mx6sabresd/mx6solo_4x_mt41j128.cfg
- board/freescale/mx6sabresd/plugin.S
- include/configs/mx6sabre_common.h
- include/configs/mx6sabreauto.h
- include/configs/mx6sabresd.h
- scripts/config_whitelist.txt
arch/arm/mach-imx/mx6/Kconfig
... | ... | @@ -125,6 +125,30 @@ |
125 | 125 | help |
126 | 126 | Set "Y" to enable the bee commands |
127 | 127 | |
128 | +config TARGET_MX6SABREAUTO_COMMON | |
129 | + bool | |
130 | + select BOARD_LATE_INIT | |
131 | + select DM | |
132 | + select DM_THERMAL | |
133 | + select IMX_THERMAL | |
134 | + select BOARD_EARLY_INIT_F | |
135 | + select NXP_BOARD_REVISION | |
136 | + imply CMD_DM | |
137 | + select FSL_CAAM | |
138 | + select ARCH_MISC_INIT | |
139 | + | |
140 | +config TARGET_MX6SABRESD_COMMON | |
141 | + bool | |
142 | + select BOARD_LATE_INIT | |
143 | + select DM | |
144 | + select DM_THERMAL | |
145 | + select IMX_THERMAL | |
146 | + select BOARD_EARLY_INIT_F | |
147 | + select NXP_BOARD_REVISION | |
148 | + imply CMD_DM | |
149 | + select FSL_CAAM | |
150 | + select ARCH_MISC_INIT | |
151 | + | |
128 | 152 | choice |
129 | 153 | prompt "MX6 board select" |
130 | 154 | optional |
... | ... | @@ -387,6 +411,46 @@ |
387 | 411 | imply CMD_DM |
388 | 412 | select FSL_CAAM |
389 | 413 | select ARCH_MISC_INIT |
414 | + | |
415 | +config TARGET_MX6QSABREAUTO | |
416 | + bool "mx6qsabreauto" | |
417 | + select TARGET_MX6SABREAUTO_COMMON | |
418 | + depends on MX6Q | |
419 | + | |
420 | +config TARGET_MX6QPSABREAUTO | |
421 | + bool "mx6qpsabreauto" | |
422 | + select TARGET_MX6SABREAUTO_COMMON | |
423 | + depends on MX6QP | |
424 | + | |
425 | +config TARGET_MX6DLSABREAUTO | |
426 | + bool "mx6dlsabreauto" | |
427 | + select TARGET_MX6SABREAUTO_COMMON | |
428 | + depends on MX6DL | |
429 | + | |
430 | +config TARGET_MX6SOLOSABREAUTO | |
431 | + bool "mx6solosabreauto" | |
432 | + select TARGET_MX6SABREAUTO_COMMON | |
433 | + depends on MX6S | |
434 | + | |
435 | +config TARGET_MX6QSABRESD | |
436 | + bool "mx6qsabresd" | |
437 | + select TARGET_MX6SABRESD_COMMON | |
438 | + depends on MX6Q | |
439 | + | |
440 | +config TARGET_MX6QPSABRESD | |
441 | + bool "mx6qpsabresd" | |
442 | + select TARGET_MX6SABRESD_COMMON | |
443 | + depends on MX6QP | |
444 | + | |
445 | +config TARGET_MX6DLSABRESD | |
446 | + bool "mx6dlsabresd" | |
447 | + select TARGET_MX6SABRESD_COMMON | |
448 | + depends on MX6DL | |
449 | + | |
450 | +config TARGET_MX6SOLOSABRESD | |
451 | + bool "mx6solosabresd" | |
452 | + select TARGET_MX6SABRESD_COMMON | |
453 | + depends on MX6S | |
390 | 454 | |
391 | 455 | config TARGET_MX6SLEVK |
392 | 456 | bool "mx6slevk" |
board/freescale/mx6sabreauto/Kconfig
1 | -if TARGET_MX6SABREAUTO | |
1 | +if TARGET_MX6SABREAUTO || TARGET_MX6SABREAUTO_COMMON | |
2 | 2 | |
3 | 3 | config SYS_BOARD |
4 | 4 | default "mx6sabreauto" |
... | ... | @@ -9,5 +9,13 @@ |
9 | 9 | config SYS_CONFIG_NAME |
10 | 10 | default "mx6sabreauto" |
11 | 11 | |
12 | +config SYS_TEXT_BASE | |
13 | + default 0x17800000 | |
14 | + | |
15 | +config NOR | |
16 | + bool "Support for NOR flash" | |
17 | + help | |
18 | + The i.MX SoC supports having a NOR flash connected to the WEIM. | |
19 | + Need to set this for NOR_BOOT. | |
12 | 20 | endif |
board/freescale/mx6sabreauto/imximage.cfg
1 | +/* | |
2 | + * Copyright (C) 2012-2016 Freescale Semiconductor, Inc. | |
3 | + * | |
4 | + * SPDX-License-Identifier: GPL-2.0+ | |
5 | + * | |
6 | + * Refer doc/README.imximage for more details about how-to configure | |
7 | + * and create imximage boot image | |
8 | + * | |
9 | + * The syntax is taken as close as possible with the kwbimage | |
10 | + */ | |
11 | + | |
12 | +#include <config.h> | |
13 | + | |
14 | +/* image version */ | |
15 | + | |
16 | +IMAGE_VERSION 2 | |
17 | + | |
18 | +/* | |
19 | + * Boot Device : one of spi, sd, eimnor, nand, sata: | |
20 | + * spinor: flash_offset: 0x0400 | |
21 | + * nand: flash_offset: 0x0400 | |
22 | + * sata: flash_offset: 0x0400 | |
23 | + * sd/mmc: flash_offset: 0x0400 | |
24 | + * eimnor: flash_offset: 0x1000 | |
25 | + */ | |
26 | + | |
27 | +#if defined(CONFIG_NOR_BOOT) | |
28 | +BOOT_FROM nor | |
29 | +#else /* others has the same flash_offset as sd */ | |
30 | +BOOT_FROM sd | |
31 | +#endif | |
32 | + | |
33 | +#ifdef CONFIG_USE_IMXIMG_PLUGIN | |
34 | +/*PLUGIN plugin-binary-file IRAM_FREE_START_ADDR*/ | |
35 | +PLUGIN board/freescale/mx6sabreauto/plugin.bin 0x00907000 | |
36 | +#else | |
37 | + | |
38 | +#ifdef CONFIG_IMX_HAB | |
39 | +CSF CONFIG_CSF_SIZE | |
40 | +#endif | |
41 | + | |
42 | +/* | |
43 | + * Device Configuration Data (DCD) | |
44 | + * | |
45 | + * Each entry must have the format: | |
46 | + * Addr-type Address Value | |
47 | + * | |
48 | + * where: | |
49 | + * Addr-type register length (1,2 or 4 bytes) | |
50 | + * Address absolute address of the register | |
51 | + * value value to be stored in the register | |
52 | + */ | |
53 | +DATA 4 0x020e0798 0x000C0000 | |
54 | +DATA 4 0x020e0758 0x00000000 | |
55 | +DATA 4 0x020e0588 0x00000030 | |
56 | +DATA 4 0x020e0594 0x00000030 | |
57 | +DATA 4 0x020e056c 0x00000030 | |
58 | +DATA 4 0x020e0578 0x00000030 | |
59 | +DATA 4 0x020e074c 0x00000030 | |
60 | +DATA 4 0x020e057c 0x00000030 | |
61 | +DATA 4 0x020e058c 0x00000000 | |
62 | +DATA 4 0x020e059c 0x00000030 | |
63 | +DATA 4 0x020e05a0 0x00000030 | |
64 | +DATA 4 0x020e078c 0x00000030 | |
65 | +DATA 4 0x020e0750 0x00020000 | |
66 | +DATA 4 0x020e05a8 0x00000028 | |
67 | +DATA 4 0x020e05b0 0x00000028 | |
68 | +DATA 4 0x020e0524 0x00000028 | |
69 | +DATA 4 0x020e051c 0x00000028 | |
70 | +DATA 4 0x020e0518 0x00000028 | |
71 | +DATA 4 0x020e050c 0x00000028 | |
72 | +DATA 4 0x020e05b8 0x00000028 | |
73 | +DATA 4 0x020e05c0 0x00000028 | |
74 | +DATA 4 0x020e0774 0x00020000 | |
75 | +DATA 4 0x020e0784 0x00000028 | |
76 | +DATA 4 0x020e0788 0x00000028 | |
77 | +DATA 4 0x020e0794 0x00000028 | |
78 | +DATA 4 0x020e079c 0x00000028 | |
79 | +DATA 4 0x020e07a0 0x00000028 | |
80 | +DATA 4 0x020e07a4 0x00000028 | |
81 | +DATA 4 0x020e07a8 0x00000028 | |
82 | +DATA 4 0x020e0748 0x00000028 | |
83 | +DATA 4 0x020e05ac 0x00000028 | |
84 | +DATA 4 0x020e05b4 0x00000028 | |
85 | +DATA 4 0x020e0528 0x00000028 | |
86 | +DATA 4 0x020e0520 0x00000028 | |
87 | +DATA 4 0x020e0514 0x00000028 | |
88 | +DATA 4 0x020e0510 0x00000028 | |
89 | +DATA 4 0x020e05bc 0x00000028 | |
90 | +DATA 4 0x020e05c4 0x00000028 | |
91 | +DATA 4 0x021b0800 0xa1390003 | |
92 | +DATA 4 0x021b080c 0x001F001F | |
93 | +DATA 4 0x021b0810 0x001F001F | |
94 | +DATA 4 0x021b480c 0x001F001F | |
95 | +DATA 4 0x021b4810 0x001F001F | |
96 | +DATA 4 0x021b083c 0x43260335 | |
97 | +DATA 4 0x021b0840 0x031A030B | |
98 | +DATA 4 0x021b483c 0x4323033B | |
99 | +DATA 4 0x021b4840 0x0323026F | |
100 | +DATA 4 0x021b0848 0x483D4545 | |
101 | +DATA 4 0x021b4848 0x44433E48 | |
102 | +DATA 4 0x021b0850 0x41444840 | |
103 | +DATA 4 0x021b4850 0x4835483E | |
104 | +DATA 4 0x021b081c 0x33333333 | |
105 | +DATA 4 0x021b0820 0x33333333 | |
106 | +DATA 4 0x021b0824 0x33333333 | |
107 | +DATA 4 0x021b0828 0x33333333 | |
108 | +DATA 4 0x021b481c 0x33333333 | |
109 | +DATA 4 0x021b4820 0x33333333 | |
110 | +DATA 4 0x021b4824 0x33333333 | |
111 | +DATA 4 0x021b4828 0x33333333 | |
112 | +DATA 4 0x021b08b8 0x00000800 | |
113 | +DATA 4 0x021b48b8 0x00000800 | |
114 | +DATA 4 0x021b0004 0x00020036 | |
115 | +DATA 4 0x021b0008 0x09444040 | |
116 | +DATA 4 0x021b000c 0x8A8F7955 | |
117 | +DATA 4 0x021b0010 0xFF328F64 | |
118 | +DATA 4 0x021b0014 0x01FF00DB | |
119 | +DATA 4 0x021b0018 0x00001740 | |
120 | +DATA 4 0x021b001c 0x00008000 | |
121 | +DATA 4 0x021b002c 0x000026d2 | |
122 | +DATA 4 0x021b0030 0x008F1023 | |
123 | +DATA 4 0x021b0040 0x00000047 | |
124 | +DATA 4 0x021b0000 0x841A0000 | |
125 | +DATA 4 0x021b001c 0x04088032 | |
126 | +DATA 4 0x021b001c 0x00008033 | |
127 | +DATA 4 0x021b001c 0x00048031 | |
128 | +DATA 4 0x021b001c 0x09408030 | |
129 | +DATA 4 0x021b001c 0x04008040 | |
130 | +DATA 4 0x021b0020 0x00005800 | |
131 | +DATA 4 0x021b0818 0x00011117 | |
132 | +DATA 4 0x021b4818 0x00011117 | |
133 | +DATA 4 0x021b0004 0x00025576 | |
134 | +DATA 4 0x021b0404 0x00011006 | |
135 | +DATA 4 0x021b001c 0x00000000 | |
136 | + | |
137 | +/* set the default clock gate to save power */ | |
138 | +DATA 4 0x020c4068 0x00C03F3F | |
139 | +DATA 4 0x020c406c 0x0030FC03 | |
140 | +DATA 4 0x020c4070 0x0FFFF000 | |
141 | +DATA 4 0x020c4074 0x3FF00000 | |
142 | +DATA 4 0x020c4078 0xFFFFF300 | |
143 | +DATA 4 0x020c407c 0x0F0000F3 | |
144 | +DATA 4 0x020c4080 0x00000FFF | |
145 | + | |
146 | +/* enable AXI cache for VDOA/VPU/IPU */ | |
147 | +DATA 4 0x020e0010 0xF00000CF | |
148 | +/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ | |
149 | +DATA 4 0x020e0018 0x007F007F | |
150 | +DATA 4 0x020e001c 0x007F007F | |
151 | +#endif |
board/freescale/mx6sabreauto/mx6dl.cfg
1 | +/* | |
2 | + * Copyright (C) 2013-2016 Freescale Semiconductor, Inc. | |
3 | + * Jason Liu <r64343@freescale.com> | |
4 | + * | |
5 | + * SPDX-License-Identifier: GPL-2.0+ | |
6 | + * | |
7 | + * Refer doc/README.imximage for more details about how-to configure | |
8 | + * and create imximage boot image | |
9 | + * | |
10 | + * The syntax is taken as close as possible with the kwbimage | |
11 | + */ | |
12 | + | |
13 | +#include <config.h> | |
14 | + | |
15 | +/* image version */ | |
16 | + | |
17 | +IMAGE_VERSION 2 | |
18 | + | |
19 | +/* | |
20 | + * Boot Device : one of spi, sd, eimnor, nand, sata: | |
21 | + * spinor: flash_offset: 0x0400 | |
22 | + * nand: flash_offset: 0x0400 | |
23 | + * sata: flash_offset: 0x0400 | |
24 | + * sd/mmc: flash_offset: 0x0400 | |
25 | + * eimnor: flash_offset: 0x1000 | |
26 | + */ | |
27 | + | |
28 | +#if defined(CONFIG_NOR_BOOT) | |
29 | +BOOT_FROM nor | |
30 | +#else /* others has the same flash_offset as sd */ | |
31 | +BOOT_FROM sd | |
32 | +#endif | |
33 | + | |
34 | +#ifdef CONFIG_USE_IMXIMG_PLUGIN | |
35 | +/*PLUGIN plugin-binary-file IRAM_FREE_START_ADDR*/ | |
36 | +PLUGIN board/freescale/mx6sabreauto/plugin.bin 0x00907000 | |
37 | +#else | |
38 | + | |
39 | +#ifdef CONFIG_IMX_HAB | |
40 | +CSF CONFIG_CSF_SIZE | |
41 | +#endif | |
42 | + | |
43 | +/* | |
44 | + * Device Configuration Data (DCD) | |
45 | + * | |
46 | + * Each entry must have the format: | |
47 | + * Addr-type Address Value | |
48 | + * | |
49 | + * where: | |
50 | + * Addr-type register length (1,2 or 4 bytes) | |
51 | + * Address absolute address of the register | |
52 | + * value value to be stored in the register | |
53 | + */ | |
54 | +DATA 4 0x020e0774 0x000C0000 | |
55 | +DATA 4 0x020e0754 0x00000000 | |
56 | +DATA 4 0x020e04ac 0x00000030 | |
57 | +DATA 4 0x020e04b0 0x00000030 | |
58 | +DATA 4 0x020e0464 0x00000030 | |
59 | +DATA 4 0x020e0490 0x00000030 | |
60 | +DATA 4 0x020e074c 0x00000030 | |
61 | +DATA 4 0x020e0494 0x00000030 | |
62 | +DATA 4 0x020e04a0 0x00000000 | |
63 | +DATA 4 0x020e04b4 0x00000030 | |
64 | +DATA 4 0x020e04b8 0x00000030 | |
65 | +DATA 4 0x020e076c 0x00000030 | |
66 | +DATA 4 0x020e0750 0x00020000 | |
67 | +DATA 4 0x020e04bc 0x00000028 | |
68 | +DATA 4 0x020e04c0 0x00000028 | |
69 | +DATA 4 0x020e04c4 0x00000028 | |
70 | +DATA 4 0x020e04c8 0x00000028 | |
71 | +DATA 4 0x020e04cc 0x00000028 | |
72 | +DATA 4 0x020e04d0 0x00000028 | |
73 | +DATA 4 0x020e04d4 0x00000028 | |
74 | +DATA 4 0x020e04d8 0x00000028 | |
75 | +DATA 4 0x020e0760 0x00020000 | |
76 | +DATA 4 0x020e0764 0x00000028 | |
77 | +DATA 4 0x020e0770 0x00000028 | |
78 | +DATA 4 0x020e0778 0x00000028 | |
79 | +DATA 4 0x020e077c 0x00000028 | |
80 | +DATA 4 0x020e0780 0x00000028 | |
81 | +DATA 4 0x020e0784 0x00000028 | |
82 | +DATA 4 0x020e078c 0x00000028 | |
83 | +DATA 4 0x020e0748 0x00000028 | |
84 | +DATA 4 0x020e0470 0x00000028 | |
85 | +DATA 4 0x020e0474 0x00000028 | |
86 | +DATA 4 0x020e0478 0x00000028 | |
87 | +DATA 4 0x020e047c 0x00000028 | |
88 | +DATA 4 0x020e0480 0x00000028 | |
89 | +DATA 4 0x020e0484 0x00000028 | |
90 | +DATA 4 0x020e0488 0x00000028 | |
91 | +DATA 4 0x020e048c 0x00000028 | |
92 | +DATA 4 0x021b0800 0xa1390003 | |
93 | +DATA 4 0x021b080c 0x001F001F | |
94 | +DATA 4 0x021b0810 0x001F001F | |
95 | +DATA 4 0x021b480c 0x001F001F | |
96 | +DATA 4 0x021b4810 0x001F001F | |
97 | +DATA 4 0x021b083c 0x42190217 | |
98 | +DATA 4 0x021b0840 0x017B017B | |
99 | +DATA 4 0x021b483c 0x4176017B | |
100 | +DATA 4 0x021b4840 0x015F016C | |
101 | +DATA 4 0x021b0848 0x4C4C4D4C | |
102 | +DATA 4 0x021b4848 0x4A4D4C48 | |
103 | +DATA 4 0x021b0850 0x3F3F3F40 | |
104 | +DATA 4 0x021b4850 0x3538382E | |
105 | +DATA 4 0x021b081c 0x33333333 | |
106 | +DATA 4 0x021b0820 0x33333333 | |
107 | +DATA 4 0x021b0824 0x33333333 | |
108 | +DATA 4 0x021b0828 0x33333333 | |
109 | +DATA 4 0x021b481c 0x33333333 | |
110 | +DATA 4 0x021b4820 0x33333333 | |
111 | +DATA 4 0x021b4824 0x33333333 | |
112 | +DATA 4 0x021b4828 0x33333333 | |
113 | +DATA 4 0x021b08b8 0x00000800 | |
114 | +DATA 4 0x021b48b8 0x00000800 | |
115 | +DATA 4 0x021b0004 0x00020025 | |
116 | +DATA 4 0x021b0008 0x00333030 | |
117 | +DATA 4 0x021b000c 0x676B5313 | |
118 | +DATA 4 0x021b0010 0xB66E8B63 | |
119 | +DATA 4 0x021b0014 0x01FF00DB | |
120 | +DATA 4 0x021b0018 0x00001740 | |
121 | +DATA 4 0x021b001c 0x00008000 | |
122 | +DATA 4 0x021b002c 0x000026d2 | |
123 | +DATA 4 0x021b0030 0x006B1023 | |
124 | +DATA 4 0x021b0040 0x00000047 | |
125 | +DATA 4 0x021b0000 0x841A0000 | |
126 | +DATA 4 0x021b001c 0x04008032 | |
127 | +DATA 4 0x021b001c 0x00008033 | |
128 | +DATA 4 0x021b001c 0x00048031 | |
129 | +DATA 4 0x021b001c 0x05208030 | |
130 | +DATA 4 0x021b001c 0x04008040 | |
131 | +DATA 4 0x021b0020 0x00005800 | |
132 | +DATA 4 0x021b0818 0x00011117 | |
133 | +DATA 4 0x021b4818 0x00011117 | |
134 | +DATA 4 0x021b0004 0x00025565 | |
135 | +DATA 4 0x021b0404 0x00011006 | |
136 | +DATA 4 0x021b001c 0x00000000 | |
137 | + | |
138 | +/* set the default clock gate to save power */ | |
139 | +DATA 4 0x020c4068 0x00C03F3F | |
140 | +DATA 4 0x020c406c 0x0030FC03 | |
141 | +DATA 4 0x020c4070 0x0FFFF000 | |
142 | +DATA 4 0x020c4074 0x3FF00000 | |
143 | +DATA 4 0x020c4078 0xFFFFF300 | |
144 | +DATA 4 0x020c407c 0x0F0000C3 | |
145 | +DATA 4 0x020c4080 0x00000FFF | |
146 | + | |
147 | +/* enable AXI cache for VDOA/VPU/IPU */ | |
148 | +DATA 4 0x020e0010 0xF00000CF | |
149 | +/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ | |
150 | +DATA 4 0x020e0018 0x007F007F | |
151 | +DATA 4 0x020e001c 0x007F007F | |
152 | +#endif |
board/freescale/mx6sabreauto/mx6qp.cfg
1 | +/* | |
2 | + * Copyright (C) 2015-2016 Freescale Semiconductor, Inc. | |
3 | + * | |
4 | + * SPDX-License-Identifier: GPL-2.0+ | |
5 | + * | |
6 | + * Refer doc/README.imximage for more details about how-to configure | |
7 | + * and create imximage boot image | |
8 | + * | |
9 | + * The syntax is taken as close as possible with the kwbimage | |
10 | + */ | |
11 | +/* image version */ | |
12 | + | |
13 | +#include <config.h> | |
14 | + | |
15 | +IMAGE_VERSION 2 | |
16 | + | |
17 | +/* | |
18 | + * Boot Device : one of spi, sd, eimnor, nand, sata: | |
19 | + * spinor: flash_offset: 0x0400 | |
20 | + * nand: flash_offset: 0x0400 | |
21 | + * sata: flash_offset: 0x0400 | |
22 | + * sd/mmc: flash_offset: 0x0400 | |
23 | + * eimnor: flash_offset: 0x1000 | |
24 | + */ | |
25 | + | |
26 | +#if defined(CONFIG_NOR_BOOT) | |
27 | +BOOT_FROM nor | |
28 | +#else /* others has the same flash_offset as sd */ | |
29 | +BOOT_FROM sd | |
30 | +#endif | |
31 | + | |
32 | +#ifdef CONFIG_USE_IMXIMG_PLUGIN | |
33 | +/*PLUGIN plugin-binary-file IRAM_FREE_START_ADDR*/ | |
34 | +PLUGIN board/freescale/mx6sabreauto/plugin.bin 0x00907000 | |
35 | +#else | |
36 | + | |
37 | +#ifdef CONFIG_IMX_HAB | |
38 | +CSF CONFIG_CSF_SIZE | |
39 | +#endif | |
40 | + | |
41 | +/* | |
42 | + * Device Configuration Data (DCD) | |
43 | + * | |
44 | + * Each entry must have the format: | |
45 | + * Addr-type Address Value | |
46 | + * | |
47 | + * where: | |
48 | + * Addr-type register length (1,2 or 4 bytes) | |
49 | + * Address absolute address of the register | |
50 | + * value value to be stored in the register | |
51 | + */ | |
52 | +DATA 4 0x020e0798 0x000C0000 | |
53 | +DATA 4 0x020e0758 0x00000000 | |
54 | +DATA 4 0x020e0588 0x00000030 | |
55 | +DATA 4 0x020e0594 0x00000030 | |
56 | +DATA 4 0x020e056c 0x00000030 | |
57 | +DATA 4 0x020e0578 0x00000030 | |
58 | +DATA 4 0x020e074c 0x00000030 | |
59 | +DATA 4 0x020e057c 0x00000030 | |
60 | +DATA 4 0x020e058c 0x00000000 | |
61 | +DATA 4 0x020e059c 0x00000030 | |
62 | +DATA 4 0x020e05a0 0x00000030 | |
63 | +DATA 4 0x020e078c 0x00000030 | |
64 | +DATA 4 0x020e0750 0x00020000 | |
65 | +DATA 4 0x020e05a8 0x00000030 | |
66 | +DATA 4 0x020e05b0 0x00000030 | |
67 | +DATA 4 0x020e0524 0x00000030 | |
68 | +DATA 4 0x020e051c 0x00000030 | |
69 | +DATA 4 0x020e0518 0x00000030 | |
70 | +DATA 4 0x020e050c 0x00000030 | |
71 | +DATA 4 0x020e05b8 0x00000030 | |
72 | +DATA 4 0x020e05c0 0x00000030 | |
73 | +DATA 4 0x020e0774 0x00020000 | |
74 | +DATA 4 0x020e0784 0x00000030 | |
75 | +DATA 4 0x020e0788 0x00000030 | |
76 | +DATA 4 0x020e0794 0x00000030 | |
77 | +DATA 4 0x020e079c 0x00000030 | |
78 | +DATA 4 0x020e07a0 0x00000030 | |
79 | +DATA 4 0x020e07a4 0x00000030 | |
80 | +DATA 4 0x020e07a8 0x00000030 | |
81 | +DATA 4 0x020e0748 0x00000030 | |
82 | +DATA 4 0x020e05ac 0x00000030 | |
83 | +DATA 4 0x020e05b4 0x00000030 | |
84 | +DATA 4 0x020e0528 0x00000030 | |
85 | +DATA 4 0x020e0520 0x00000030 | |
86 | +DATA 4 0x020e0514 0x00000030 | |
87 | +DATA 4 0x020e0510 0x00000030 | |
88 | +DATA 4 0x020e05bc 0x00000030 | |
89 | +DATA 4 0x020e05c4 0x00000030 | |
90 | +DATA 4 0x021b0800 0xa1390003 | |
91 | +DATA 4 0x021b080c 0x001b001e | |
92 | +DATA 4 0x021b0810 0x002e0029 | |
93 | +DATA 4 0x021b480c 0x001b002a | |
94 | +DATA 4 0x021b4810 0x0019002c | |
95 | +DATA 4 0x021b083c 0x43240334 | |
96 | +DATA 4 0x021b0840 0x0324031a | |
97 | +DATA 4 0x021b483c 0x43340344 | |
98 | +DATA 4 0x021b4840 0x03280276 | |
99 | +DATA 4 0x021b0848 0x44383A3E | |
100 | +DATA 4 0x021b4848 0x3C3C3846 | |
101 | +DATA 4 0x021b0850 0x2e303230 | |
102 | +DATA 4 0x021b4850 0x38283E34 | |
103 | +DATA 4 0x021b081c 0x33333333 | |
104 | +DATA 4 0x021b0820 0x33333333 | |
105 | +DATA 4 0x021b0824 0x33333333 | |
106 | +DATA 4 0x021b0828 0x33333333 | |
107 | +DATA 4 0x021b481c 0x33333333 | |
108 | +DATA 4 0x021b4820 0x33333333 | |
109 | +DATA 4 0x021b4824 0x33333333 | |
110 | +DATA 4 0x021b4828 0x33333333 | |
111 | +DATA 4 0x021b08c0 0x24912249 | |
112 | +DATA 4 0x021b48c0 0x24914289 | |
113 | +DATA 4 0x021b08b8 0x00000800 | |
114 | +DATA 4 0x021b48b8 0x00000800 | |
115 | +DATA 4 0x021b0004 0x00020036 | |
116 | +DATA 4 0x021b0008 0x24444040 | |
117 | +DATA 4 0x021b000c 0x898E7955 | |
118 | +DATA 4 0x021b0010 0xFF320F64 | |
119 | +DATA 4 0x021b0014 0x01FF00DB | |
120 | +DATA 4 0x021b0018 0x00001740 | |
121 | +DATA 4 0x021b001c 0x00008000 | |
122 | + | |
123 | +DATA 4 0x021b002c 0x000026d2 | |
124 | +DATA 4 0x021b0030 0x008E1023 | |
125 | +DATA 4 0x021b0040 0x00000047 | |
126 | +DATA 4 0x021b0400 0x14420000 | |
127 | +DATA 4 0x021b0000 0x841A0000 | |
128 | +DATA 4 0x021b0890 0x00400C58 | |
129 | +DATA 4 0x00bb0008 0x00000000 | |
130 | +DATA 4 0x00bb000c 0x2891E41A | |
131 | +DATA 4 0x00bb0038 0x00000564 | |
132 | +DATA 4 0x00bb0014 0x00000040 | |
133 | +DATA 4 0x00bb0028 0x00000020 | |
134 | +DATA 4 0x00bb002c 0x00000020 | |
135 | +DATA 4 0x021b001c 0x04088032 | |
136 | +DATA 4 0x021b001c 0x00008033 | |
137 | +DATA 4 0x021b001c 0x00048031 | |
138 | +DATA 4 0x021b001c 0x09408030 | |
139 | +DATA 4 0x021b001c 0x04008040 | |
140 | +DATA 4 0x021b0020 0x00005800 | |
141 | +DATA 4 0x021b0818 0x00011117 | |
142 | +DATA 4 0x021b4818 0x00011117 | |
143 | +DATA 4 0x021b0004 0x00025576 | |
144 | +DATA 4 0x021b0404 0x00011006 | |
145 | +DATA 4 0x021b001c 0x00000000 | |
146 | +/* set the default clock gate to save power */ | |
147 | +DATA 4, 0x020c4068, 0x00C03F3F | |
148 | +DATA 4, 0x020c406c, 0x0030FC03 | |
149 | +DATA 4, 0x020c4070, 0x0FFFF000 | |
150 | +DATA 4, 0x020c4074, 0x3FF00000 | |
151 | +DATA 4, 0x020c4078, 0xFFFFF300 | |
152 | +DATA 4, 0x020c407c, 0x0F0000F3 | |
153 | +DATA 4, 0x020c4080, 0x00000FFF | |
154 | + | |
155 | +/* enable AXI cache for VDOA/VPU/IPU */ | |
156 | +DATA 4, 0x020e0010, 0xF00000CF | |
157 | +/* set IPU AXI-id1 Qos=0x1 AXI-id0/2/3 Qos=0x7 */ | |
158 | +DATA 4, 0x020e0018, 0x77177717 | |
159 | +DATA 4, 0x020e001c, 0x77177717 | |
160 | +#endif |
board/freescale/mx6sabreauto/mx6sabreauto.c
1 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | 2 | /* |
3 | - * Copyright (C) 2012 Freescale Semiconductor, Inc. | |
3 | + * Copyright (C) 2012-2016 Freescale Semiconductor, Inc. | |
4 | + * Copyright 2017 NXP | |
4 | 5 | * |
5 | 6 | * Author: Fabio Estevam <fabio.estevam@freescale.com> |
6 | 7 | */ |
... | ... | @@ -36,6 +37,16 @@ |
36 | 37 | #include <power/pfuze100_pmic.h> |
37 | 38 | #include "../common/pfuze.h" |
38 | 39 | |
40 | +#ifdef CONFIG_SATA | |
41 | +#include <asm/mach-imx/sata.h> | |
42 | +#endif | |
43 | +#ifdef CONFIG_FSL_FASTBOOT | |
44 | +#include <fsl_fastboot.h> | |
45 | +#ifdef CONFIG_ANDROID_RECOVERY | |
46 | +#include <recovery.h> | |
47 | +#endif | |
48 | +#endif /*CONFIG_FSL_FASTBOOT*/ | |
49 | + | |
39 | 50 | DECLARE_GLOBAL_DATA_PTR; |
40 | 51 | |
41 | 52 | #define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ |
... | ... | @@ -46,6 +57,11 @@ |
46 | 57 | PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \ |
47 | 58 | PAD_CTL_SRE_FAST | PAD_CTL_HYS) |
48 | 59 | |
60 | +/*Need more drive strength for SD1 slot on base board*/ | |
61 | +#define USDHC1_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ | |
62 | + PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_LOW | \ | |
63 | + PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS) | |
64 | + | |
49 | 65 | #define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ |
50 | 66 | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) |
51 | 67 | |
52 | 68 | |
... | ... | @@ -60,10 +76,18 @@ |
60 | 76 | |
61 | 77 | #define PC MUX_PAD_CTRL(I2C_PAD_CTRL) |
62 | 78 | |
79 | +#define SPI_PAD_CTRL (PAD_CTL_HYS | \ | |
80 | + PAD_CTL_PUS_100K_DOWN | PAD_CTL_SPEED_MED | \ | |
81 | + PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) | |
82 | + | |
63 | 83 | #define WEIM_NOR_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ |
64 | 84 | PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ |
65 | 85 | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) |
66 | 86 | |
87 | +#define OTG_ID_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ | |
88 | + PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_LOW | \ | |
89 | + PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS) | |
90 | + | |
67 | 91 | #define I2C_PMIC 1 |
68 | 92 | |
69 | 93 | int dram_init(void) |
70 | 94 | |
71 | 95 | |
72 | 96 | |
73 | 97 | |
74 | 98 | |
75 | 99 | |
76 | 100 | |
77 | 101 | |
78 | 102 | |
... | ... | @@ -78,65 +102,40 @@ |
78 | 102 | IOMUX_PADS(PAD_KEY_ROW0__UART4_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)), |
79 | 103 | }; |
80 | 104 | |
81 | - | |
105 | +#ifdef CONFIG_SYS_I2C_LEGACY | |
82 | 106 | /* I2C2 PMIC, iPod, Tuner, Codec, Touch, HDMI EDID, MIPI CSI2 card */ |
83 | -static struct i2c_pads_info mx6q_i2c_pad_info1 = { | |
107 | +static struct i2c_pads_info i2c_pad_info1 = { | |
84 | 108 | .scl = { |
85 | - .i2c_mode = MX6Q_PAD_EIM_EB2__I2C2_SCL | PC, | |
86 | - .gpio_mode = MX6Q_PAD_EIM_EB2__GPIO2_IO30 | PC, | |
109 | + .i2c_mode = MX6_PAD_EIM_EB2__I2C2_SCL | PC, | |
110 | + .gpio_mode = MX6_PAD_EIM_EB2__GPIO2_IO30 | PC, | |
87 | 111 | .gp = IMX_GPIO_NR(2, 30) |
88 | 112 | }, |
89 | 113 | .sda = { |
90 | - .i2c_mode = MX6Q_PAD_KEY_ROW3__I2C2_SDA | PC, | |
91 | - .gpio_mode = MX6Q_PAD_KEY_ROW3__GPIO4_IO13 | PC, | |
114 | + .i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA | PC, | |
115 | + .gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13 | PC, | |
92 | 116 | .gp = IMX_GPIO_NR(4, 13) |
93 | 117 | } |
94 | 118 | }; |
95 | 119 | |
96 | -static struct i2c_pads_info mx6dl_i2c_pad_info1 = { | |
97 | - .scl = { | |
98 | - .i2c_mode = MX6DL_PAD_EIM_EB2__I2C2_SCL | PC, | |
99 | - .gpio_mode = MX6DL_PAD_EIM_EB2__GPIO2_IO30 | PC, | |
100 | - .gp = IMX_GPIO_NR(2, 30) | |
101 | - }, | |
102 | - .sda = { | |
103 | - .i2c_mode = MX6DL_PAD_KEY_ROW3__I2C2_SDA | PC, | |
104 | - .gpio_mode = MX6DL_PAD_KEY_ROW3__GPIO4_IO13 | PC, | |
105 | - .gp = IMX_GPIO_NR(4, 13) | |
106 | - } | |
107 | -}; | |
108 | - | |
109 | 120 | #ifndef CONFIG_SYS_FLASH_CFI |
110 | 121 | /* |
111 | 122 | * I2C3 MLB, Port Expanders (A, B, C), Video ADC, Light Sensor, |
112 | 123 | * Compass Sensor, Accelerometer, Res Touch |
113 | 124 | */ |
114 | -static struct i2c_pads_info mx6q_i2c_pad_info2 = { | |
125 | +static struct i2c_pads_info i2c_pad_info2 = { | |
115 | 126 | .scl = { |
116 | - .i2c_mode = MX6Q_PAD_GPIO_3__I2C3_SCL | PC, | |
117 | - .gpio_mode = MX6Q_PAD_GPIO_3__GPIO1_IO03 | PC, | |
127 | + .i2c_mode = MX6_PAD_GPIO_3__I2C3_SCL | PC, | |
128 | + .gpio_mode = MX6_PAD_GPIO_3__GPIO1_IO03 | PC, | |
118 | 129 | .gp = IMX_GPIO_NR(1, 3) |
119 | 130 | }, |
120 | 131 | .sda = { |
121 | - .i2c_mode = MX6Q_PAD_EIM_D18__I2C3_SDA | PC, | |
122 | - .gpio_mode = MX6Q_PAD_EIM_D18__GPIO3_IO18 | PC, | |
132 | + .i2c_mode = MX6_PAD_EIM_D18__I2C3_SDA | PC, | |
133 | + .gpio_mode = MX6_PAD_EIM_D18__GPIO3_IO18 | PC, | |
123 | 134 | .gp = IMX_GPIO_NR(3, 18) |
124 | 135 | } |
125 | 136 | }; |
126 | - | |
127 | -static struct i2c_pads_info mx6dl_i2c_pad_info2 = { | |
128 | - .scl = { | |
129 | - .i2c_mode = MX6DL_PAD_GPIO_3__I2C3_SCL | PC, | |
130 | - .gpio_mode = MX6DL_PAD_GPIO_3__GPIO1_IO03 | PC, | |
131 | - .gp = IMX_GPIO_NR(1, 3) | |
132 | - }, | |
133 | - .sda = { | |
134 | - .i2c_mode = MX6DL_PAD_EIM_D18__I2C3_SDA | PC, | |
135 | - .gpio_mode = MX6DL_PAD_EIM_D18__GPIO3_IO18 | PC, | |
136 | - .gp = IMX_GPIO_NR(3, 18) | |
137 | - } | |
138 | -}; | |
139 | 137 | #endif |
138 | +#endif | |
140 | 139 | |
141 | 140 | static iomux_v3_cfg_t const i2c3_pads[] = { |
142 | 141 | IOMUX_PADS(PAD_EIM_A24__GPIO5_IO04 | MUX_PAD_CTRL(NO_PAD_CTRL)), |
... | ... | @@ -245,6 +244,26 @@ |
245 | 244 | #endif |
246 | 245 | |
247 | 246 | |
247 | +static void setup_iomux_uart(void) | |
248 | +{ | |
249 | + SETUP_IOMUX_PADS(uart4_pads); | |
250 | +} | |
251 | + | |
252 | +#ifdef CONFIG_FSL_ESDHC_IMX | |
253 | +#if !CONFIG_IS_ENABLED(DM_MMC) | |
254 | +static iomux_v3_cfg_t const usdhc1_pads[] = { | |
255 | + /*To avoid pin conflict with NAND, set usdhc1 to 4 pins*/ | |
256 | + IOMUX_PADS(PAD_SD1_CLK__SD1_CLK | MUX_PAD_CTRL(USDHC1_PAD_CTRL)), | |
257 | + IOMUX_PADS(PAD_SD1_CMD__SD1_CMD | MUX_PAD_CTRL(USDHC1_PAD_CTRL)), | |
258 | + IOMUX_PADS(PAD_SD1_DAT0__SD1_DATA0 | MUX_PAD_CTRL(USDHC1_PAD_CTRL)), | |
259 | + IOMUX_PADS(PAD_SD1_DAT1__SD1_DATA1 | MUX_PAD_CTRL(USDHC1_PAD_CTRL)), | |
260 | + IOMUX_PADS(PAD_SD1_DAT2__SD1_DATA2 | MUX_PAD_CTRL(USDHC1_PAD_CTRL)), | |
261 | + IOMUX_PADS(PAD_SD1_DAT3__SD1_DATA3 | MUX_PAD_CTRL(USDHC1_PAD_CTRL)), | |
262 | + | |
263 | + /*CD pin*/ | |
264 | + IOMUX_PADS(PAD_GPIO_1__GPIO1_IO01 | MUX_PAD_CTRL(NO_PAD_CTRL)), | |
265 | +}; | |
266 | + | |
248 | 267 | static iomux_v3_cfg_t const usdhc3_pads[] = { |
249 | 268 | IOMUX_PADS(PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), |
250 | 269 | IOMUX_PADS(PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), |
251 | 270 | |
252 | 271 | |
253 | 272 | |
254 | 273 | |
255 | 274 | |
... | ... | @@ -260,30 +279,71 @@ |
260 | 279 | IOMUX_PADS(PAD_NANDF_CS2__GPIO6_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL)), |
261 | 280 | }; |
262 | 281 | |
263 | -static void setup_iomux_uart(void) | |
264 | -{ | |
265 | - SETUP_IOMUX_PADS(uart4_pads); | |
266 | -} | |
282 | +#define USDHC1_CD_GPIO IMX_GPIO_NR(1, 1) | |
283 | +#define USDHC3_CD_GPIO IMX_GPIO_NR(6, 15) | |
267 | 284 | |
268 | -#ifdef CONFIG_FSL_ESDHC_IMX | |
269 | -static struct fsl_esdhc_cfg usdhc_cfg[1] = { | |
285 | +static struct fsl_esdhc_cfg usdhc_cfg[2] = { | |
286 | + {USDHC1_BASE_ADDR, 0, 4}, | |
270 | 287 | {USDHC3_BASE_ADDR}, |
271 | 288 | }; |
272 | 289 | |
273 | 290 | int board_mmc_getcd(struct mmc *mmc) |
274 | 291 | { |
275 | - gpio_direction_input(IMX_GPIO_NR(6, 15)); | |
276 | - return !gpio_get_value(IMX_GPIO_NR(6, 15)); | |
292 | + struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; | |
293 | + int ret = 0; | |
294 | + | |
295 | + switch (cfg->esdhc_base) { | |
296 | + case USDHC1_BASE_ADDR: | |
297 | + gpio_direction_input(USDHC1_CD_GPIO); | |
298 | + ret = !gpio_get_value(USDHC1_CD_GPIO); | |
299 | + break; | |
300 | + case USDHC3_BASE_ADDR: | |
301 | + gpio_direction_input(USDHC3_CD_GPIO); | |
302 | + ret = !gpio_get_value(USDHC3_CD_GPIO); | |
303 | + break; | |
304 | + } | |
305 | + | |
306 | + return ret; | |
277 | 307 | } |
278 | 308 | |
279 | 309 | int board_mmc_init(struct bd_info *bis) |
280 | 310 | { |
281 | - SETUP_IOMUX_PADS(usdhc3_pads); | |
311 | + int i; | |
282 | 312 | |
283 | - usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); | |
284 | - return fsl_esdhc_initialize(bis, &usdhc_cfg[0]); | |
313 | + /* | |
314 | + * According to the board_mmc_init() the following map is done: | |
315 | + * (U-boot device node) (Physical Port) | |
316 | + * mmc0 USDHC1 | |
317 | + * mmc1 USDHC3 | |
318 | + */ | |
319 | + for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) { | |
320 | + switch (i) { | |
321 | + case 0: | |
322 | + SETUP_IOMUX_PADS(usdhc1_pads); | |
323 | + gpio_request(USDHC1_CD_GPIO, "usdhc1 cd"); | |
324 | + gpio_direction_input(USDHC1_CD_GPIO); | |
325 | + usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); | |
326 | + break; | |
327 | + case 1: | |
328 | + SETUP_IOMUX_PADS(usdhc3_pads); | |
329 | + gpio_request(USDHC3_CD_GPIO, "usdhc3 cd"); | |
330 | + gpio_direction_input(USDHC3_CD_GPIO); | |
331 | + usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); | |
332 | + break; | |
333 | + default: | |
334 | + printf("Warning: you configured more USDHC controllers" | |
335 | + "(%d) than supported by the board\n", i + 1); | |
336 | + return 0; | |
337 | + } | |
338 | + | |
339 | + if (fsl_esdhc_initialize(bis, &usdhc_cfg[i])) | |
340 | + printf("Warning: failed to initialize mmc dev %d\n", i); | |
341 | + } | |
342 | + | |
343 | + return 0; | |
285 | 344 | } |
286 | 345 | #endif |
346 | +#endif | |
287 | 347 | |
288 | 348 | #ifdef CONFIG_NAND_MXS |
289 | 349 | static iomux_v3_cfg_t gpmi_pads[] = { |
... | ... | @@ -321,6 +381,24 @@ |
321 | 381 | } |
322 | 382 | #endif |
323 | 383 | |
384 | +static void setup_fec(void) | |
385 | +{ | |
386 | + int ret; | |
387 | + | |
388 | + if (is_mx6dqp()) { | |
389 | + /* | |
390 | + * select ENET MAC0 TX clock from PLL | |
391 | + */ | |
392 | + imx_iomux_set_gpr_register(5, 9, 1, 1); | |
393 | + } else { | |
394 | + imx_iomux_set_gpr_register(1, 21, 1, 1); | |
395 | + } | |
396 | + | |
397 | + ret = enable_fec_anatop_clock(0, ENET_125MHZ); | |
398 | + if (ret) | |
399 | + printf("Error fec anatop clock settings!\n"); | |
400 | +} | |
401 | + | |
324 | 402 | #ifdef CONFIG_REVISION_TAG |
325 | 403 | u32 get_board_rev(void) |
326 | 404 | { |
... | ... | @@ -403,7 +481,7 @@ |
403 | 481 | .bus = -1, |
404 | 482 | .addr = 0, |
405 | 483 | .pixfmt = IPU_PIX_FMT_RGB24, |
406 | - .detect = detect_hdmi, | |
484 | + .detect = NULL, | |
407 | 485 | .enable = do_enable_hdmi, |
408 | 486 | .mode = { |
409 | 487 | .name = "HDMI", |
... | ... | @@ -428,8 +506,22 @@ |
428 | 506 | |
429 | 507 | static void setup_iomux_backlight(void) |
430 | 508 | { |
431 | - gpio_request(IMX_GPIO_NR(2, 9), "backlight"); | |
432 | - gpio_direction_output(IMX_GPIO_NR(2, 9), 1); | |
509 | + int ret; | |
510 | + struct gpio_desc desc; | |
511 | + | |
512 | + ret = dm_gpio_lookup_name("GPIO2_9", &desc); | |
513 | + if (ret) { | |
514 | + printf("%s lookup GPIO2_9 failed ret = %d\n", __func__, ret); | |
515 | + return; | |
516 | + } | |
517 | + | |
518 | + ret = dm_gpio_request(&desc, "backlight"); | |
519 | + if (ret) { | |
520 | + printf("%s request backlight failed ret = %d\n", __func__, ret); | |
521 | + return; | |
522 | + } | |
523 | + | |
524 | + dm_gpio_set_dir_flags(&desc, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); | |
433 | 525 | SETUP_IOMUX_PADS(backlight_pads); |
434 | 526 | } |
435 | 527 | |
... | ... | @@ -497,6 +589,24 @@ |
497 | 589 | return 1; |
498 | 590 | } |
499 | 591 | |
592 | +#ifdef CONFIG_MXC_SPI | |
593 | +iomux_v3_cfg_t const ecspi1_pads[] = { | |
594 | + IOMUX_PADS(PAD_EIM_D16__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL)), | |
595 | + IOMUX_PADS(PAD_EIM_D17__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL)), | |
596 | + IOMUX_PADS(PAD_EIM_D18__ECSPI1_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL)), | |
597 | + IOMUX_PADS(PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL)), | |
598 | + /* Steer logic */ | |
599 | + IOMUX_PADS(PAD_EIM_A24__GPIO5_IO04 | MUX_PAD_CTRL(NO_PAD_CTRL)), | |
600 | +}; | |
601 | + | |
602 | +void setup_spinor(void) | |
603 | +{ | |
604 | + SETUP_IOMUX_PADS(ecspi1_pads); | |
605 | + | |
606 | + gpio_direction_output(IMX_GPIO_NR(5, 4), 0); | |
607 | +} | |
608 | +#endif | |
609 | + | |
500 | 610 | int board_early_init_f(void) |
501 | 611 | { |
502 | 612 | setup_iomux_uart(); |
503 | 613 | |
504 | 614 | |
505 | 615 | |
506 | 616 | |
507 | 617 | |
508 | 618 | |
509 | 619 | |
510 | 620 | |
511 | 621 | |
512 | 622 | |
513 | 623 | |
514 | 624 | |
515 | 625 | |
516 | 626 | |
517 | 627 | |
518 | 628 | |
519 | 629 | |
520 | 630 | |
... | ... | @@ -513,65 +623,281 @@ |
513 | 623 | |
514 | 624 | int board_init(void) |
515 | 625 | { |
626 | + int ret; | |
627 | + struct gpio_desc desc; | |
628 | + | |
516 | 629 | /* address of boot parameters */ |
517 | 630 | gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; |
518 | 631 | |
632 | +#ifdef CONFIG_SYS_I2C_LEGACY | |
519 | 633 | /* I2C 2 and 3 setup - I2C 3 hw mux with EIM */ |
520 | - if (is_mx6dq() || is_mx6dqp()) | |
521 | - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info1); | |
522 | - else | |
523 | - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1); | |
524 | - /* I2C 3 Steer */ | |
525 | - gpio_request(IMX_GPIO_NR(5, 4), "steer logic"); | |
526 | - gpio_direction_output(IMX_GPIO_NR(5, 4), 1); | |
527 | - SETUP_IOMUX_PADS(i2c3_pads); | |
634 | + setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); | |
528 | 635 | #ifndef CONFIG_SYS_FLASH_CFI |
529 | - if (is_mx6dq() || is_mx6dqp()) | |
530 | - setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info2); | |
531 | - else | |
532 | - setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info2); | |
636 | + setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2); | |
533 | 637 | #endif |
534 | - gpio_request(IMX_GPIO_NR(1, 15), "expander en"); | |
535 | - gpio_direction_output(IMX_GPIO_NR(1, 15), 1); | |
638 | +#endif | |
639 | + | |
640 | + /* I2C 3 Steer */ | |
641 | + ret = dm_gpio_lookup_name("GPIO5_4", &desc); | |
642 | + if (ret) { | |
643 | + printf("%s lookup GPIO5_4 failed ret = %d\n", __func__, ret); | |
644 | + return -ENODEV; | |
645 | + } | |
646 | + ret = dm_gpio_request(&desc, "steer logic"); | |
647 | + if (ret) { | |
648 | + printf("%s request steer logic failed ret = %d\n", __func__, ret); | |
649 | + return -ENODEV; | |
650 | + } | |
651 | + dm_gpio_set_dir_flags(&desc, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); | |
652 | + SETUP_IOMUX_PADS(i2c3_pads); | |
653 | + | |
654 | + ret = dm_gpio_lookup_name("GPIO1_15", &desc); | |
655 | + if (ret) { | |
656 | + printf("%s lookup GPIO1_15 failed ret = %d\n", __func__, ret); | |
657 | + return -ENODEV; | |
658 | + } | |
659 | + ret = dm_gpio_request(&desc, "expander en"); | |
660 | + if (ret) { | |
661 | + printf("%s request steer logic failed ret = %d\n", __func__, ret); | |
662 | + return -ENODEV; | |
663 | + } | |
664 | + dm_gpio_set_dir_flags(&desc, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); | |
536 | 665 | SETUP_IOMUX_PADS(port_exp); |
537 | 666 | |
538 | 667 | #ifdef CONFIG_VIDEO_IPUV3 |
539 | 668 | setup_display(); |
540 | 669 | #endif |
541 | 670 | |
671 | +#ifdef CONFIG_MXC_SPI | |
672 | + setup_spinor(); | |
673 | +#endif | |
674 | + | |
675 | +#ifdef CONFIG_SATA | |
676 | + setup_sata(); | |
677 | +#endif | |
678 | + | |
542 | 679 | #ifdef CONFIG_MTD_NOR_FLASH |
543 | 680 | setup_iomux_eimnor(); |
544 | 681 | #endif |
545 | - return 0; | |
546 | -} | |
547 | 682 | |
548 | -#ifdef CONFIG_MXC_SPI | |
549 | -int board_spi_cs_gpio(unsigned bus, unsigned cs) | |
550 | -{ | |
551 | - return (bus == 0 && cs == 0) ? (IMX_GPIO_NR(4, 9)) : -1; | |
552 | -} | |
683 | +#ifdef CONFIG_FEC_MXC | |
684 | + setup_fec(); | |
553 | 685 | #endif |
554 | 686 | |
687 | + return 0; | |
688 | +} | |
689 | + | |
690 | +#ifdef CONFIG_POWER_LEGACY | |
555 | 691 | int power_init_board(void) |
556 | 692 | { |
557 | - struct pmic *p; | |
693 | + struct pmic *pfuze; | |
558 | 694 | unsigned int value; |
695 | + int ret; | |
559 | 696 | |
560 | - p = pfuze_common_init(I2C_PMIC); | |
561 | - if (!p) | |
697 | + pfuze = pfuze_common_init(I2C_PMIC); | |
698 | + if (!pfuze) | |
562 | 699 | return -ENODEV; |
563 | 700 | |
701 | + if (is_mx6dqp()) | |
702 | + ret = pfuze_mode_init(pfuze, APS_APS); | |
703 | + else | |
704 | + ret = pfuze_mode_init(pfuze, APS_PFM); | |
705 | + | |
706 | + if (ret < 0) | |
707 | + return ret; | |
708 | + | |
564 | 709 | if (is_mx6dqp()) { |
710 | + /* set SW1C staby volatage 1.075V*/ | |
711 | + pmic_reg_read(pfuze, PFUZE100_SW1CSTBY, &value); | |
712 | + value &= ~0x3f; | |
713 | + value |= 0x1f; | |
714 | + pmic_reg_write(pfuze, PFUZE100_SW1CSTBY, value); | |
715 | + | |
716 | + /* set SW1C/VDDSOC step ramp up time to from 16us to 4us/25mV */ | |
717 | + pmic_reg_read(pfuze, PFUZE100_SW1CCONF, &value); | |
718 | + value &= ~0xc0; | |
719 | + value |= 0x40; | |
720 | + pmic_reg_write(pfuze, PFUZE100_SW1CCONF, value); | |
721 | + | |
565 | 722 | /* set SW2 staby volatage 0.975V*/ |
566 | - pmic_reg_read(p, PFUZE100_SW2STBY, &value); | |
723 | + pmic_reg_read(pfuze, PFUZE100_SW2STBY, &value); | |
567 | 724 | value &= ~0x3f; |
568 | 725 | value |= 0x17; |
569 | - pmic_reg_write(p, PFUZE100_SW2STBY, value); | |
726 | + pmic_reg_write(pfuze, PFUZE100_SW2STBY, value); | |
727 | + | |
728 | + /* set SW2/VDDARM step ramp up time to from 16us to 4us/25mV */ | |
729 | + pmic_reg_read(pfuze, PFUZE100_SW2CONF, &value); | |
730 | + value &= ~0xc0; | |
731 | + value |= 0x40; | |
732 | + pmic_reg_write(pfuze, PFUZE100_SW2CONF, value); | |
733 | + } else { | |
734 | + /* set SW1AB staby volatage 0.975V*/ | |
735 | + pmic_reg_read(pfuze, PFUZE100_SW1ABSTBY, &value); | |
736 | + value &= ~0x3f; | |
737 | + value |= 0x1b; | |
738 | + pmic_reg_write(pfuze, PFUZE100_SW1ABSTBY, value); | |
739 | + | |
740 | + /* set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */ | |
741 | + pmic_reg_read(pfuze, PFUZE100_SW1ABCONF, &value); | |
742 | + value &= ~0xc0; | |
743 | + value |= 0x40; | |
744 | + pmic_reg_write(pfuze, PFUZE100_SW1ABCONF, value); | |
745 | + | |
746 | + /* set SW1C staby volatage 0.975V*/ | |
747 | + pmic_reg_read(pfuze, PFUZE100_SW1CSTBY, &value); | |
748 | + value &= ~0x3f; | |
749 | + value |= 0x1b; | |
750 | + pmic_reg_write(pfuze, PFUZE100_SW1CSTBY, value); | |
751 | + | |
752 | + /* set SW1C/VDDSOC step ramp up time to from 16us to 4us/25mV */ | |
753 | + pmic_reg_read(pfuze, PFUZE100_SW1CCONF, &value); | |
754 | + value &= ~0xc0; | |
755 | + value |= 0x40; | |
756 | + pmic_reg_write(pfuze, PFUZE100_SW1CCONF, value); | |
570 | 757 | } |
571 | 758 | |
572 | - return pfuze_mode_init(p, APS_PFM); | |
759 | + return 0; | |
573 | 760 | } |
761 | +#elif defined(CONFIG_DM_PMIC_PFUZE100) | |
762 | +int power_init_board(void) | |
763 | +{ | |
764 | + struct udevice *dev; | |
765 | + unsigned int reg; | |
766 | + int ret; | |
574 | 767 | |
768 | + dev = pfuze_common_init(); | |
769 | + if (!dev) | |
770 | + return -ENODEV; | |
771 | + | |
772 | + if (is_mx6dqp()) | |
773 | + ret = pfuze_mode_init(dev, APS_APS); | |
774 | + else | |
775 | + ret = pfuze_mode_init(dev, APS_PFM); | |
776 | + if (ret < 0) | |
777 | + return ret; | |
778 | + | |
779 | + if (is_mx6dqp()) { | |
780 | + /* set SW1C staby volatage 1.075V*/ | |
781 | + reg = pmic_reg_read(dev, PFUZE100_SW1CSTBY); | |
782 | + reg &= ~0x3f; | |
783 | + reg |= 0x1f; | |
784 | + pmic_reg_write(dev, PFUZE100_SW1CSTBY, reg); | |
785 | + | |
786 | + /* set SW1C/VDDSOC step ramp up time to from 16us to 4us/25mV */ | |
787 | + reg = pmic_reg_read(dev, PFUZE100_SW1CCONF); | |
788 | + reg &= ~0xc0; | |
789 | + reg |= 0x40; | |
790 | + pmic_reg_write(dev, PFUZE100_SW1CCONF, reg); | |
791 | + | |
792 | + /* set SW2/VDDARM staby volatage 0.975V*/ | |
793 | + reg = pmic_reg_read(dev, PFUZE100_SW2STBY); | |
794 | + reg &= ~0x3f; | |
795 | + reg |= 0x17; | |
796 | + pmic_reg_write(dev, PFUZE100_SW2STBY, reg); | |
797 | + | |
798 | + /* set SW2/VDDARM step ramp up time to from 16us to 4us/25mV */ | |
799 | + reg = pmic_reg_read(dev, PFUZE100_SW2CONF); | |
800 | + reg &= ~0xc0; | |
801 | + reg |= 0x40; | |
802 | + pmic_reg_write(dev, PFUZE100_SW2CONF, reg); | |
803 | + } else { | |
804 | + /* set SW1AB staby volatage 0.975V*/ | |
805 | + reg = pmic_reg_read(dev, PFUZE100_SW1ABSTBY); | |
806 | + reg &= ~0x3f; | |
807 | + reg |= 0x1b; | |
808 | + pmic_reg_write(dev, PFUZE100_SW1ABSTBY, reg); | |
809 | + | |
810 | + /* set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */ | |
811 | + reg = pmic_reg_read(dev, PFUZE100_SW1ABCONF); | |
812 | + reg &= ~0xc0; | |
813 | + reg |= 0x40; | |
814 | + pmic_reg_write(dev, PFUZE100_SW1ABCONF, reg); | |
815 | + | |
816 | + /* set SW1C staby volatage 0.975V*/ | |
817 | + reg = pmic_reg_read(dev, PFUZE100_SW1CSTBY); | |
818 | + reg &= ~0x3f; | |
819 | + reg |= 0x1b; | |
820 | + pmic_reg_write(dev, PFUZE100_SW1CSTBY, reg); | |
821 | + | |
822 | + /* set SW1C/VDDSOC step ramp up time to from 16us to 4us/25mV */ | |
823 | + reg = pmic_reg_read(dev, PFUZE100_SW1CCONF); | |
824 | + reg &= ~0xc0; | |
825 | + reg |= 0x40; | |
826 | + pmic_reg_write(dev, PFUZE100_SW1CCONF, reg); | |
827 | + } | |
828 | + | |
829 | + return 0; | |
830 | +} | |
831 | +#endif | |
832 | + | |
833 | +#ifdef CONFIG_LDO_BYPASS_CHECK | |
834 | +#ifdef CONFIG_POWER_LEGACY | |
835 | +void ldo_mode_set(int ldo_bypass) | |
836 | +{ | |
837 | + unsigned int value; | |
838 | + struct pmic *p = pmic_get("PFUZE100"); | |
839 | + | |
840 | + if (!p) { | |
841 | + printf("No PMIC found!\n"); | |
842 | + return; | |
843 | + } | |
844 | + | |
845 | + /* increase VDDARM/VDDSOC to support 1.2G chip */ | |
846 | + if (check_1_2G()) { | |
847 | + ldo_bypass = 0; /* ldo_enable on 1.2G chip */ | |
848 | + printf("1.2G chip, increase VDDARM_IN/VDDSOC_IN\n"); | |
849 | + | |
850 | + if (is_mx6dqp()) { | |
851 | + /* increase VDDARM to 1.425V */ | |
852 | + pmic_reg_read(p, PFUZE100_SW2VOL, &value); | |
853 | + value &= ~0x3f; | |
854 | + value |= 0x29; | |
855 | + pmic_reg_write(p, PFUZE100_SW2VOL, value); | |
856 | + } else { | |
857 | + /* increase VDDARM to 1.425V */ | |
858 | + pmic_reg_read(p, PFUZE100_SW1ABVOL, &value); | |
859 | + value &= ~0x3f; | |
860 | + value |= 0x2d; | |
861 | + pmic_reg_write(p, PFUZE100_SW1ABVOL, value); | |
862 | + } | |
863 | + /* increase VDDSOC to 1.425V */ | |
864 | + pmic_reg_read(p, PFUZE100_SW1CVOL, &value); | |
865 | + value &= ~0x3f; | |
866 | + value |= 0x2d; | |
867 | + pmic_reg_write(p, PFUZE100_SW1CVOL, value); | |
868 | + } | |
869 | +} | |
870 | +#elif defined(CONFIG_DM_PMIC_PFUZE100) | |
871 | +void ldo_mode_set(int ldo_bypass) | |
872 | +{ | |
873 | + struct udevice *dev; | |
874 | + int ret; | |
875 | + | |
876 | + ret = pmic_get("pfuze100@8", &dev); | |
877 | + if (ret == -ENODEV) { | |
878 | + printf("No PMIC found!\n"); | |
879 | + return; | |
880 | + } | |
881 | + | |
882 | + /* increase VDDARM/VDDSOC to support 1.2G chip */ | |
883 | + if (check_1_2G()) { | |
884 | + ldo_bypass = 0; /* ldo_enable on 1.2G chip */ | |
885 | + printf("1.2G chip, increase VDDARM_IN/VDDSOC_IN\n"); | |
886 | + | |
887 | + if (is_mx6dqp()) { | |
888 | + /* increase VDDARM to 1.425V */ | |
889 | + pmic_clrsetbits(dev, PFUZE100_SW2VOL, 0x3f, 0x29); | |
890 | + } else { | |
891 | + /* increase VDDARM to 1.425V */ | |
892 | + pmic_clrsetbits(dev, PFUZE100_SW1ABVOL, 0x3f, 0x2d); | |
893 | + } | |
894 | + /* increase VDDSOC to 1.425V */ | |
895 | + pmic_clrsetbits(dev, PFUZE100_SW1CVOL, 0x3f, 0x2d); | |
896 | + } | |
897 | +} | |
898 | +#endif | |
899 | +#endif | |
900 | + | |
575 | 901 | #ifdef CONFIG_CMD_BMODE |
576 | 902 | static const struct boot_mode board_boot_modes[] = { |
577 | 903 | /* 4 bit bus width */ |
... | ... | @@ -627,6 +953,49 @@ |
627 | 953 | return 0; |
628 | 954 | } |
629 | 955 | #endif |
956 | + | |
957 | +#ifdef CONFIG_FSL_FASTBOOT | |
958 | +#ifdef CONFIG_ANDROID_RECOVERY | |
959 | + | |
960 | +iomux_v3_cfg_t const recovery_key_pads[] = { | |
961 | + IOMUX_PADS(PAD_DISP0_DAT20__GPIO5_IO14 | MUX_PAD_CTRL(NO_PAD_CTRL)), | |
962 | +}; | |
963 | + | |
964 | +int is_recovery_key_pressing(void) | |
965 | +{ | |
966 | + int button_pressed = 0; | |
967 | + int ret; | |
968 | + struct gpio_desc desc; | |
969 | + | |
970 | + /* Check Recovery Combo Button press or not. */ | |
971 | + SETUP_IOMUX_PADS(recovery_key_pads); | |
972 | + | |
973 | + ret = dm_gpio_lookup_name("GPIO5_14", &desc); | |
974 | + if (ret) { | |
975 | + printf("%s lookup GPIO5_14 failed ret = %d\n", __func__, ret); | |
976 | + return; | |
977 | + } | |
978 | + | |
979 | + ret = dm_gpio_request(&desc, "volume_dn_key"); | |
980 | + if (ret) { | |
981 | + printf("%s request volume_dn_key failed ret = %d\n", __func__, ret); | |
982 | + return; | |
983 | + } | |
984 | + | |
985 | + dm_gpio_set_dir_flags(&desc, GPIOD_IS_IN); | |
986 | + | |
987 | + if (dm_gpio_get_value(&desc) == 0) { /* VOL_DN key is low assert */ | |
988 | + button_pressed = 1; | |
989 | + printf("Recovery key pressed\n"); | |
990 | + } | |
991 | + | |
992 | + return button_pressed; | |
993 | +} | |
994 | + | |
995 | +#endif /*CONFIG_ANDROID_RECOVERY*/ | |
996 | + | |
997 | +#endif /*CONFIG_FSL_FASTBOOT*/ | |
998 | + | |
630 | 999 | |
631 | 1000 | #ifdef CONFIG_SPL_BUILD |
632 | 1001 | #include <asm/arch/mx6-ddr.h> |
board/freescale/mx6sabreauto/mx6solo.cfg
1 | +/* | |
2 | + * Copyright (C) 2014-2016 Freescale Semiconductor, Inc. | |
3 | + * Jason Liu <r64343@freescale.com> | |
4 | + * | |
5 | + * SPDX-License-Identifier: GPL-2.0+ | |
6 | + * | |
7 | + * Refer docs/README.imxmage for more details about how-to configure | |
8 | + * and create imximage boot image | |
9 | + * | |
10 | + * The syntax is taken as close as possible with the kwbimage | |
11 | + */ | |
12 | + | |
13 | +#include <config.h> | |
14 | + | |
15 | +/* image version */ | |
16 | + | |
17 | +IMAGE_VERSION 2 | |
18 | + | |
19 | +/* | |
20 | + * Boot Device : one of spi, sd, eimnor, nand, sata: | |
21 | + * spinor: flash_offset: 0x0400 | |
22 | + * nand: flash_offset: 0x0400 | |
23 | + * sata: flash_offset: 0x0400 | |
24 | + * sd/mmc: flash_offset: 0x0400 | |
25 | + * eimnor: flash_offset: 0x1000 | |
26 | + */ | |
27 | + | |
28 | +#if defined(CONFIG_NOR_BOOT) | |
29 | +BOOT_FROM nor | |
30 | +#else /* others has the same flash_offset as sd */ | |
31 | +BOOT_FROM sd | |
32 | +#endif | |
33 | + | |
34 | +#ifdef CONFIG_USE_IMXIMG_PLUGIN | |
35 | +/*PLUGIN plugin-binary-file IRAM_FREE_START_ADDR*/ | |
36 | +PLUGIN board/freescale/mx6sabreauto/plugin.bin 0x00907000 | |
37 | +#else | |
38 | + | |
39 | +#ifdef CONFIG_IMX_HAB | |
40 | +CSF CONFIG_CSF_SIZE | |
41 | +#endif | |
42 | + | |
43 | +/* | |
44 | + * Device Configuration Data (DCD) | |
45 | + * | |
46 | + * Each entry must have the format: | |
47 | + * Addr-type Address Value | |
48 | + * | |
49 | + * where: | |
50 | + * Addr-type register length (1,2 or 4 bytes) | |
51 | + * Address absolute address of the register | |
52 | + * value value to be stored in the register | |
53 | + */ | |
54 | +DATA 4, 0x020e0774, 0x000C0000 | |
55 | +DATA 4, 0x020e0754, 0x00000000 | |
56 | +DATA 4, 0x020e04ac, 0x00000030 | |
57 | +DATA 4, 0x020e04b0, 0x00000030 | |
58 | +DATA 4, 0x020e0464, 0x00000030 | |
59 | +DATA 4, 0x020e0490, 0x00000030 | |
60 | +DATA 4, 0x020e074c, 0x00000030 | |
61 | +DATA 4, 0x020e0494, 0x00000030 | |
62 | +DATA 4, 0x020e04a0, 0x00000000 | |
63 | +DATA 4, 0x020e04b4, 0x00000030 | |
64 | +DATA 4, 0x020e04b8, 0x00000030 | |
65 | +DATA 4, 0x020e076c, 0x00000030 | |
66 | +DATA 4, 0x020e0750, 0x00020000 | |
67 | +DATA 4, 0x020e04bc, 0x00000028 | |
68 | +DATA 4, 0x020e04c0, 0x00000028 | |
69 | +DATA 4, 0x020e04c4, 0x00000028 | |
70 | +DATA 4, 0x020e04c8, 0x00000028 | |
71 | +DATA 4, 0x020e0760, 0x00020000 | |
72 | +DATA 4, 0x020e0764, 0x00000028 | |
73 | +DATA 4, 0x020e0770, 0x00000028 | |
74 | +DATA 4, 0x020e0778, 0x00000028 | |
75 | +DATA 4, 0x020e077c, 0x00000028 | |
76 | +DATA 4, 0x020e0470, 0x00000028 | |
77 | +DATA 4, 0x020e0474, 0x00000028 | |
78 | +DATA 4, 0x020e0478, 0x00000028 | |
79 | +DATA 4, 0x020e047c, 0x00000028 | |
80 | +DATA 4, 0x021b0800, 0xa1390003 | |
81 | +DATA 4, 0x021b080c, 0x001F001F | |
82 | +DATA 4, 0x021b0810, 0x001F001F | |
83 | +DATA 4, 0x021b083c, 0x421C0216 | |
84 | +DATA 4, 0x021b0840, 0x017B017A | |
85 | +DATA 4, 0x021b0848, 0x4B4A4E4C | |
86 | +DATA 4, 0x021b0850, 0x3F3F3334 | |
87 | +DATA 4, 0x021b081c, 0x33333333 | |
88 | +DATA 4, 0x021b0820, 0x33333333 | |
89 | +DATA 4, 0x021b0824, 0x33333333 | |
90 | +DATA 4, 0x021b0828, 0x33333333 | |
91 | +DATA 4, 0x021b08b8, 0x00000800 | |
92 | +DATA 4, 0x021b0004, 0x00020025 | |
93 | +DATA 4, 0x021b0008, 0x00333030 | |
94 | +DATA 4, 0x021b000c, 0x676B5313 | |
95 | +DATA 4, 0x021b0010, 0xB66E8B63 | |
96 | +DATA 4, 0x021b0014, 0x01FF00DB | |
97 | +DATA 4, 0x021b0018, 0x00001740 | |
98 | +DATA 4, 0x021b001c, 0x00008000 | |
99 | +DATA 4, 0x021b002c, 0x000026d2 | |
100 | +DATA 4, 0x021b0030, 0x006B1023 | |
101 | +DATA 4, 0x021b0040, 0x00000027 | |
102 | +DATA 4, 0x021b0000, 0x84190000 | |
103 | +DATA 4, 0x021b001c, 0x04008032 | |
104 | +DATA 4, 0x021b001c, 0x00008033 | |
105 | +DATA 4, 0x021b001c, 0x00048031 | |
106 | +DATA 4, 0x021b001c, 0x05208030 | |
107 | +DATA 4, 0x021b001c, 0x04008040 | |
108 | +DATA 4, 0x021b0020, 0x00005800 | |
109 | +DATA 4, 0x021b0818, 0x00011117 | |
110 | +DATA 4, 0x021b0004, 0x00025565 | |
111 | +DATA 4, 0x021b0404, 0x00011006 | |
112 | +DATA 4, 0x021b001c, 0x00000000 | |
113 | + | |
114 | +/* set the default clock gate to save power */ | |
115 | +DATA 4, 0x020c4068, 0x00C03F3F | |
116 | +DATA 4, 0x020c406c, 0x0030FC03 | |
117 | +DATA 4, 0x020c4070, 0x0FFFF000 | |
118 | +DATA 4, 0x020c4074, 0x3FF00000 | |
119 | +DATA 4, 0x020c4078, 0xFFFFF300 | |
120 | +DATA 4, 0x020c407c, 0x0F0000C3 | |
121 | +DATA 4, 0x020c4080, 0x00000FFF | |
122 | + | |
123 | +/* enable AXI cache for VDOA/VPU/IPU */ | |
124 | +DATA 4, 0x020e0010, 0xF00000CF | |
125 | +/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ | |
126 | +DATA 4, 0x020e0018, 0x007F007F | |
127 | +DATA 4, 0x020e001c, 0x007F007F | |
128 | +#endif |
board/freescale/mx6sabreauto/plugin.S
1 | +/* | |
2 | + * Copyright (C) 2012-2016 Freescale Semiconductor, Inc. | |
3 | + * | |
4 | + * SPDX-License-Identifier: GPL-2.0+ | |
5 | + */ | |
6 | + | |
7 | +#include <config.h> | |
8 | + | |
9 | +/* DDR script */ | |
10 | +.macro imx6dqpsabreauto_ddr_setting | |
11 | + ldr r0, =IOMUXC_BASE_ADDR | |
12 | + ldr r1, =0x000c0000 | |
13 | + str r1, [r0, #0x798] | |
14 | + ldr r1, =0x00000000 | |
15 | + str r1, [r0, #0x758] | |
16 | + | |
17 | + ldr r1, =0x00000030 | |
18 | + str r1, [r0, #0x588] | |
19 | + str r1, [r0, #0x594] | |
20 | + str r1, [r0, #0x56c] | |
21 | + str r1, [r0, #0x578] | |
22 | + str r1, [r0, #0x74c] | |
23 | + str r1, [r0, #0x57c] | |
24 | + | |
25 | + ldr r1, =0x00000000 | |
26 | + str r1, [r0, #0x58c] | |
27 | + | |
28 | + ldr r1, =0x00000030 | |
29 | + str r1, [r0, #0x59c] | |
30 | + str r1, [r0, #0x5a0] | |
31 | + str r1, [r0, #0x78c] | |
32 | + | |
33 | + ldr r1, =0x00020000 | |
34 | + str r1, [r0, #0x750] | |
35 | + | |
36 | + ldr r1, =0x00000030 | |
37 | + str r1, [r0, #0x5a8] | |
38 | + str r1, [r0, #0x5b0] | |
39 | + str r1, [r0, #0x524] | |
40 | + str r1, [r0, #0x51c] | |
41 | + str r1, [r0, #0x518] | |
42 | + str r1, [r0, #0x50c] | |
43 | + str r1, [r0, #0x5b8] | |
44 | + str r1, [r0, #0x5c0] | |
45 | + | |
46 | + ldr r1, =0x00020000 | |
47 | + str r1, [r0, #0x774] | |
48 | + | |
49 | + ldr r1, =0x00000030 | |
50 | + str r1, [r0, #0x784] | |
51 | + str r1, [r0, #0x788] | |
52 | + str r1, [r0, #0x794] | |
53 | + str r1, [r0, #0x79c] | |
54 | + str r1, [r0, #0x7a0] | |
55 | + str r1, [r0, #0x7a4] | |
56 | + str r1, [r0, #0x7a8] | |
57 | + str r1, [r0, #0x748] | |
58 | + str r1, [r0, #0x5ac] | |
59 | + str r1, [r0, #0x5b4] | |
60 | + str r1, [r0, #0x528] | |
61 | + str r1, [r0, #0x520] | |
62 | + str r1, [r0, #0x514] | |
63 | + str r1, [r0, #0x510] | |
64 | + str r1, [r0, #0x5bc] | |
65 | + str r1, [r0, #0x5c4] | |
66 | + | |
67 | + ldr r0, =MMDC_P0_BASE_ADDR | |
68 | + ldr r2, =0xa1390003 | |
69 | + str r2, [r0, #0x800] | |
70 | + | |
71 | + ldr r2, =0x001b001e | |
72 | + str r2, [r0, #0x80c] | |
73 | + ldr r2, =0x002e0029 | |
74 | + str r2, [r0, #0x810] | |
75 | + ldr r1, =MMDC_P1_BASE_ADDR | |
76 | + ldr r2, =0x001b002a | |
77 | + str r2, [r1, #0x80c] | |
78 | + ldr r2, =0x0019002c | |
79 | + str r2, [r1, #0x810] | |
80 | + | |
81 | + ldr r2, =0x43240334 | |
82 | + str r2, [r0, #0x83c] | |
83 | + ldr r2, =0x0324031a | |
84 | + str r2, [r0, #0x840] | |
85 | + | |
86 | + ldr r2, =0x43340344 | |
87 | + str r2, [r1, #0x83c] | |
88 | + ldr r2, =0x03280276 | |
89 | + str r2, [r1, #0x840] | |
90 | + | |
91 | + ldr r2, =0x44383A3E | |
92 | + str r2, [r0, #0x848] | |
93 | + ldr r2, =0x3C3C3846 | |
94 | + str r2, [r1, #0x848] | |
95 | + | |
96 | + ldr r2, =0x2e303230 | |
97 | + str r2, [r0, #0x850] | |
98 | + ldr r2, =0x38283E34 | |
99 | + str r2, [r1, #0x850] | |
100 | + | |
101 | + ldr r2, =0x33333333 | |
102 | + str r2, [r0, #0x81c] | |
103 | + str r2, [r0, #0x820] | |
104 | + str r2, [r0, #0x824] | |
105 | + str r2, [r0, #0x828] | |
106 | + str r2, [r1, #0x81c] | |
107 | + str r2, [r1, #0x820] | |
108 | + str r2, [r1, #0x824] | |
109 | + str r2, [r1, #0x828] | |
110 | + | |
111 | + ldr r2, =0x24912249 | |
112 | + str r2, [r0, #0x8c0] | |
113 | + ldr r2, =0x24914289 | |
114 | + str r2, [r1, #0x8c0] | |
115 | + | |
116 | + ldr r2, =0x00000800 | |
117 | + str r2, [r0, #0x8b8] | |
118 | + str r2, [r1, #0x8b8] | |
119 | + | |
120 | + ldr r2, =0x00020036 | |
121 | + str r2, [r0, #0x004] | |
122 | + ldr r2, =0x24444040 | |
123 | + str r2, [r0, #0x008] | |
124 | + | |
125 | + ldr r2, =0x898E7955 | |
126 | + str r2, [r0, #0x00c] | |
127 | + ldr r2, =0xFF320F64 | |
128 | + str r2, [r0, #0x010] | |
129 | + | |
130 | + ldr r2, =0x01FF00DB | |
131 | + str r2, [r0, #0x014] | |
132 | + ldr r2, =0x00001740 | |
133 | + str r2, [r0, #0x018] | |
134 | + | |
135 | + ldr r2, =0x00008000 | |
136 | + str r2, [r0, #0x01c] | |
137 | + ldr r2, =0x000026d2 | |
138 | + str r2, [r0, #0x02c] | |
139 | + ldr r2, =0x008E1023 | |
140 | + str r2, [r0, #0x030] | |
141 | + ldr r2, =0x00000047 | |
142 | + str r2, [r0, #0x040] | |
143 | + | |
144 | + ldr r2, =0x14420000 | |
145 | + str r2, [r0, #0x400] | |
146 | + ldr r2, =0x841A0000 | |
147 | + str r2, [r0, #0x000] | |
148 | + | |
149 | + ldr r2, =0x00400C58 | |
150 | + str r2, [r0, #0x890] | |
151 | + | |
152 | + ldr r3, =0x00bb0000 | |
153 | + ldr r2, =0x00000000 | |
154 | + str r2, [r3, #0x008] | |
155 | + ldr r2, =0x2891E41A | |
156 | + str r2, [r3, #0x00c] | |
157 | + ldr r2, =0x00000564 | |
158 | + str r2, [r3, #0x038] | |
159 | + ldr r2, =0x00000040 | |
160 | + str r2, [r3, #0x014] | |
161 | + ldr r2, =0x00000020 | |
162 | + str r2, [r3, #0x028] | |
163 | + str r2, [r3, #0x02c] | |
164 | + | |
165 | + ldr r2, =0x04088032 | |
166 | + str r2, [r0, #0x01c] | |
167 | + ldr r2, =0x00008033 | |
168 | + str r2, [r0, #0x01c] | |
169 | + ldr r2, =0x00048031 | |
170 | + str r2, [r0, #0x01c] | |
171 | + ldr r2, =0x09408030 | |
172 | + str r2, [r0, #0x01c] | |
173 | + ldr r2, =0x04008040 | |
174 | + str r2, [r0, #0x01c] | |
175 | + | |
176 | + ldr r2, =0x00005800 | |
177 | + str r2, [r0, #0x020] | |
178 | + ldr r2, =0x00011117 | |
179 | + str r2, [r0, #0x818] | |
180 | + str r2, [r1, #0x818] | |
181 | + ldr r2, =0x00025576 | |
182 | + str r2, [r0, #0x004] | |
183 | + ldr r2, =0x00011006 | |
184 | + str r2, [r0, #0x404] | |
185 | + ldr r2, =0x00000000 | |
186 | + str r2, [r0, #0x01c] | |
187 | +.endm | |
188 | + | |
189 | +.macro imx6dqsabreauto_ddr_setting | |
190 | + ldr r0, =IOMUXC_BASE_ADDR | |
191 | + ldr r1, =0x000c0000 | |
192 | + str r1, [r0, #0x798] | |
193 | + ldr r1, =0x00000000 | |
194 | + str r1, [r0, #0x758] | |
195 | + | |
196 | + ldr r1, =0x00000030 | |
197 | + str r1, [r0, #0x588] | |
198 | + str r1, [r0, #0x594] | |
199 | + str r1, [r0, #0x56c] | |
200 | + str r1, [r0, #0x578] | |
201 | + str r1, [r0, #0x74c] | |
202 | + str r1, [r0, #0x57c] | |
203 | + | |
204 | + ldr r1, =0x00000000 | |
205 | + str r1, [r0, #0x58c] | |
206 | + | |
207 | + ldr r1, =0x00000030 | |
208 | + str r1, [r0, #0x59c] | |
209 | + str r1, [r0, #0x5a0] | |
210 | + str r1, [r0, #0x78c] | |
211 | + | |
212 | + ldr r1, =0x00020000 | |
213 | + str r1, [r0, #0x750] | |
214 | + | |
215 | + ldr r1, =0x00000028 | |
216 | + str r1, [r0, #0x5a8] | |
217 | + str r1, [r0, #0x5b0] | |
218 | + str r1, [r0, #0x524] | |
219 | + str r1, [r0, #0x51c] | |
220 | + str r1, [r0, #0x518] | |
221 | + str r1, [r0, #0x50c] | |
222 | + str r1, [r0, #0x5b8] | |
223 | + str r1, [r0, #0x5c0] | |
224 | + | |
225 | + ldr r1, =0x00020000 | |
226 | + str r1, [r0, #0x774] | |
227 | + | |
228 | + ldr r1, =0x00000028 | |
229 | + str r1, [r0, #0x784] | |
230 | + str r1, [r0, #0x788] | |
231 | + str r1, [r0, #0x794] | |
232 | + str r1, [r0, #0x79c] | |
233 | + str r1, [r0, #0x7a0] | |
234 | + str r1, [r0, #0x7a4] | |
235 | + str r1, [r0, #0x7a8] | |
236 | + str r1, [r0, #0x748] | |
237 | + str r1, [r0, #0x5ac] | |
238 | + str r1, [r0, #0x5b4] | |
239 | + str r1, [r0, #0x528] | |
240 | + str r1, [r0, #0x520] | |
241 | + str r1, [r0, #0x514] | |
242 | + str r1, [r0, #0x510] | |
243 | + str r1, [r0, #0x5bc] | |
244 | + str r1, [r0, #0x5c4] | |
245 | + | |
246 | + ldr r0, =MMDC_P0_BASE_ADDR | |
247 | + ldr r2, =0xa1390003 | |
248 | + str r2, [r0, #0x800] | |
249 | + | |
250 | + ldr r2, =0x001F001F | |
251 | + str r2, [r0, #0x80c] | |
252 | + str r2, [r0, #0x810] | |
253 | + ldr r1, =MMDC_P1_BASE_ADDR | |
254 | + str r2, [r1, #0x80c] | |
255 | + str r2, [r1, #0x810] | |
256 | + | |
257 | + ldr r2, =0x43260335 | |
258 | + str r2, [r0, #0x83c] | |
259 | + ldr r2, =0x031A030B | |
260 | + str r2, [r0, #0x840] | |
261 | + | |
262 | + ldr r2, =0x4323033B | |
263 | + str r2, [r1, #0x83c] | |
264 | + ldr r2, =0x0323026F | |
265 | + str r2, [r1, #0x840] | |
266 | + | |
267 | + ldr r2, =0x483D4545 | |
268 | + str r2, [r0, #0x848] | |
269 | + ldr r2, =0x44433E48 | |
270 | + str r2, [r1, #0x848] | |
271 | + | |
272 | + ldr r2, =0x41444840 | |
273 | + str r2, [r0, #0x850] | |
274 | + ldr r2, =0x4835483E | |
275 | + str r2, [r1, #0x850] | |
276 | + | |
277 | + ldr r2, =0x33333333 | |
278 | + str r2, [r0, #0x81c] | |
279 | + str r2, [r0, #0x820] | |
280 | + str r2, [r0, #0x824] | |
281 | + str r2, [r0, #0x828] | |
282 | + str r2, [r1, #0x81c] | |
283 | + str r2, [r1, #0x820] | |
284 | + str r2, [r1, #0x824] | |
285 | + str r2, [r1, #0x828] | |
286 | + | |
287 | + ldr r2, =0x00000800 | |
288 | + str r2, [r0, #0x8b8] | |
289 | + str r2, [r1, #0x8b8] | |
290 | + | |
291 | + ldr r2, =0x00020036 | |
292 | + str r2, [r0, #0x004] | |
293 | + ldr r2, =0x09444040 | |
294 | + str r2, [r0, #0x008] | |
295 | + | |
296 | + ldr r2, =0x8A8F7955 | |
297 | + str r2, [r0, #0x00c] | |
298 | + ldr r2, =0xFF328F64 | |
299 | + str r2, [r0, #0x010] | |
300 | + | |
301 | + ldr r2, =0x01FF00DB | |
302 | + str r2, [r0, #0x014] | |
303 | + ldr r2, =0x00001740 | |
304 | + str r2, [r0, #0x018] | |
305 | + | |
306 | + ldr r2, =0x00008000 | |
307 | + str r2, [r0, #0x01c] | |
308 | + ldr r2, =0x000026d2 | |
309 | + str r2, [r0, #0x02c] | |
310 | + ldr r2, =0x008F1023 | |
311 | + str r2, [r0, #0x030] | |
312 | + ldr r2, =0x00000047 | |
313 | + str r2, [r0, #0x040] | |
314 | + | |
315 | + ldr r2, =0x841A0000 | |
316 | + str r2, [r0, #0x000] | |
317 | + | |
318 | + ldr r2, =0x04088032 | |
319 | + str r2, [r0, #0x01c] | |
320 | + ldr r2, =0x00008033 | |
321 | + str r2, [r0, #0x01c] | |
322 | + ldr r2, =0x00048031 | |
323 | + str r2, [r0, #0x01c] | |
324 | + ldr r2, =0x09408030 | |
325 | + str r2, [r0, #0x01c] | |
326 | + ldr r2, =0x04008040 | |
327 | + str r2, [r0, #0x01c] | |
328 | + | |
329 | + ldr r2, =0x00005800 | |
330 | + str r2, [r0, #0x020] | |
331 | + ldr r2, =0x00011117 | |
332 | + str r2, [r0, #0x818] | |
333 | + str r2, [r1, #0x818] | |
334 | + ldr r2, =0x00025576 | |
335 | + str r2, [r0, #0x004] | |
336 | + ldr r2, =0x00011006 | |
337 | + str r2, [r0, #0x404] | |
338 | + ldr r2, =0x00000000 | |
339 | + str r2, [r0, #0x01c] | |
340 | +.endm | |
341 | + | |
342 | +.macro imx6dlsabreauto_ddr_setting | |
343 | + ldr r0, =IOMUXC_BASE_ADDR | |
344 | + ldr r1, =0x000c0000 | |
345 | + str r1, [r0, #0x774] | |
346 | + ldr r1, =0x00000000 | |
347 | + str r1, [r0, #0x754] | |
348 | + | |
349 | + ldr r1, =0x00000030 | |
350 | + str r1, [r0, #0x4ac] | |
351 | + str r1, [r0, #0x4b0] | |
352 | + str r1, [r0, #0x464] | |
353 | + str r1, [r0, #0x490] | |
354 | + str r1, [r0, #0x74c] | |
355 | + str r1, [r0, #0x494] | |
356 | + | |
357 | + ldr r1, =0x00000000 | |
358 | + str r1, [r0, #0x4a0] | |
359 | + | |
360 | + ldr r1, =0x00000030 | |
361 | + str r1, [r0, #0x4b4] | |
362 | + str r1, [r0, #0x4b8] | |
363 | + str r1, [r0, #0x76c] | |
364 | + | |
365 | + ldr r1, =0x00020000 | |
366 | + str r1, [r0, #0x750] | |
367 | + | |
368 | + ldr r1, =0x00000028 | |
369 | + str r1, [r0, #0x4bc] | |
370 | + str r1, [r0, #0x4c0] | |
371 | + str r1, [r0, #0x4c4] | |
372 | + str r1, [r0, #0x4c8] | |
373 | + str r1, [r0, #0x4cc] | |
374 | + str r1, [r0, #0x4d0] | |
375 | + str r1, [r0, #0x4d4] | |
376 | + str r1, [r0, #0x4d8] | |
377 | + | |
378 | + ldr r1, =0x00020000 | |
379 | + str r1, [r0, #0x760] | |
380 | + | |
381 | + ldr r1, =0x00000028 | |
382 | + str r1, [r0, #0x764] | |
383 | + str r1, [r0, #0x770] | |
384 | + str r1, [r0, #0x778] | |
385 | + str r1, [r0, #0x77c] | |
386 | + str r1, [r0, #0x780] | |
387 | + str r1, [r0, #0x784] | |
388 | + str r1, [r0, #0x78c] | |
389 | + str r1, [r0, #0x748] | |
390 | + str r1, [r0, #0x470] | |
391 | + str r1, [r0, #0x474] | |
392 | + str r1, [r0, #0x478] | |
393 | + str r1, [r0, #0x47c] | |
394 | + str r1, [r0, #0x480] | |
395 | + str r1, [r0, #0x484] | |
396 | + str r1, [r0, #0x488] | |
397 | + str r1, [r0, #0x48c] | |
398 | + | |
399 | + ldr r0, =MMDC_P0_BASE_ADDR | |
400 | + ldr r2, =0xa1390003 | |
401 | + str r2, [r0, #0x800] | |
402 | + | |
403 | + ldr r2, =0x001f001f | |
404 | + str r2, [r0, #0x80c] | |
405 | + str r2, [r0, #0x810] | |
406 | + ldr r1, =MMDC_P1_BASE_ADDR | |
407 | + str r2, [r1, #0x80c] | |
408 | + str r2, [r1, #0x810] | |
409 | + | |
410 | + ldr r2, =0x42190217 | |
411 | + str r2, [r0, #0x83c] | |
412 | + ldr r2, =0x017b017b | |
413 | + str r2, [r0, #0x840] | |
414 | + | |
415 | + ldr r2, =0x4176017b | |
416 | + str r2, [r1, #0x83c] | |
417 | + ldr r2, =0x015f016c | |
418 | + str r2, [r1, #0x840] | |
419 | + | |
420 | + ldr r2, =0x4c4c4d4c | |
421 | + str r2, [r0, #0x848] | |
422 | + ldr r2, =0x4a4d4c48 | |
423 | + str r2, [r1, #0x848] | |
424 | + | |
425 | + ldr r2, =0x3f3f3f40 | |
426 | + str r2, [r0, #0x850] | |
427 | + ldr r2, =0x3538382e | |
428 | + str r2, [r1, #0x850] | |
429 | + | |
430 | + ldr r2, =0x33333333 | |
431 | + str r2, [r0, #0x81c] | |
432 | + str r2, [r0, #0x820] | |
433 | + str r2, [r0, #0x824] | |
434 | + str r2, [r0, #0x828] | |
435 | + str r2, [r1, #0x81c] | |
436 | + str r2, [r1, #0x820] | |
437 | + str r2, [r1, #0x824] | |
438 | + str r2, [r1, #0x828] | |
439 | + | |
440 | + ldr r2, =0x00000800 | |
441 | + str r2, [r0, #0x8b8] | |
442 | + str r2, [r1, #0x8b8] | |
443 | + | |
444 | + ldr r2, =0x00020025 | |
445 | + str r2, [r0, #0x004] | |
446 | + ldr r2, =0x00333030 | |
447 | + str r2, [r0, #0x008] | |
448 | + | |
449 | + ldr r2, =0x676b5313 | |
450 | + str r2, [r0, #0x00c] | |
451 | + ldr r2, =0xb66e8b63 | |
452 | + str r2, [r0, #0x010] | |
453 | + | |
454 | + ldr r2, =0x01ff00db | |
455 | + str r2, [r0, #0x014] | |
456 | + ldr r2, =0x00001740 | |
457 | + str r2, [r0, #0x018] | |
458 | + | |
459 | + ldr r2, =0x00008000 | |
460 | + str r2, [r0, #0x01c] | |
461 | + ldr r2, =0x000026d2 | |
462 | + str r2, [r0, #0x02c] | |
463 | + ldr r2, =0x006b1023 | |
464 | + str r2, [r0, #0x030] | |
465 | + ldr r2, =0x00000047 | |
466 | + str r2, [r0, #0x040] | |
467 | + | |
468 | + ldr r2, =0x841a0000 | |
469 | + str r2, [r0, #0x000] | |
470 | + | |
471 | + ldr r2, =0x04008032 | |
472 | + str r2, [r0, #0x01c] | |
473 | + ldr r2, =0x00008033 | |
474 | + str r2, [r0, #0x01c] | |
475 | + ldr r2, =0x00048031 | |
476 | + str r2, [r0, #0x01c] | |
477 | + ldr r2, =0x05208030 | |
478 | + str r2, [r0, #0x01c] | |
479 | + ldr r2, =0x04008040 | |
480 | + str r2, [r0, #0x01c] | |
481 | + | |
482 | + ldr r2, =0x00005800 | |
483 | + str r2, [r0, #0x020] | |
484 | + ldr r2, =0x00011117 | |
485 | + str r2, [r0, #0x818] | |
486 | + str r2, [r1, #0x818] | |
487 | + ldr r2, =0x00025565 | |
488 | + str r2, [r0, #0x004] | |
489 | + ldr r2, =0x00011006 | |
490 | + str r2, [r0, #0x404] | |
491 | + ldr r2, =0x00000000 | |
492 | + str r2, [r0, #0x01c] | |
493 | +.endm | |
494 | + | |
495 | +.macro imx6solosabreauto_ddr_setting | |
496 | + ldr r0, =IOMUXC_BASE_ADDR | |
497 | + ldr r1, =0x000c0000 | |
498 | + str r1, [r0, #0x774] | |
499 | + ldr r1, =0x00000000 | |
500 | + str r1, [r0, #0x754] | |
501 | + | |
502 | + ldr r1, =0x00000030 | |
503 | + str r1, [r0, #0x4ac] | |
504 | + str r1, [r0, #0x4b0] | |
505 | + str r1, [r0, #0x464] | |
506 | + str r1, [r0, #0x490] | |
507 | + str r1, [r0, #0x74c] | |
508 | + str r1, [r0, #0x494] | |
509 | + | |
510 | + ldr r1, =0x00000000 | |
511 | + str r1, [r0, #0x4a0] | |
512 | + | |
513 | + ldr r1, =0x00000030 | |
514 | + str r1, [r0, #0x4b4] | |
515 | + str r1, [r0, #0x4b8] | |
516 | + str r1, [r0, #0x76c] | |
517 | + | |
518 | + ldr r1, =0x00020000 | |
519 | + str r1, [r0, #0x750] | |
520 | + | |
521 | + ldr r1, =0x00000028 | |
522 | + str r1, [r0, #0x4bc] | |
523 | + str r1, [r0, #0x4c0] | |
524 | + str r1, [r0, #0x4c4] | |
525 | + str r1, [r0, #0x4c8] | |
526 | + | |
527 | + ldr r1, =0x00020000 | |
528 | + str r1, [r0, #0x760] | |
529 | + | |
530 | + ldr r1, =0x00000028 | |
531 | + str r1, [r0, #0x764] | |
532 | + str r1, [r0, #0x770] | |
533 | + str r1, [r0, #0x778] | |
534 | + str r1, [r0, #0x77c] | |
535 | + str r1, [r0, #0x470] | |
536 | + str r1, [r0, #0x474] | |
537 | + str r1, [r0, #0x478] | |
538 | + str r1, [r0, #0x47c] | |
539 | + | |
540 | + ldr r0, =MMDC_P0_BASE_ADDR | |
541 | + ldr r2, =0xa1390003 | |
542 | + str r2, [r0, #0x800] | |
543 | + | |
544 | + ldr r2, =0x001F001F | |
545 | + str r2, [r0, #0x80c] | |
546 | + str r2, [r0, #0x810] | |
547 | + | |
548 | + ldr r2, =0x421C0216 | |
549 | + str r2, [r0, #0x83c] | |
550 | + ldr r2, =0x017B017A | |
551 | + str r2, [r0, #0x840] | |
552 | + | |
553 | + ldr r2, =0x4B4A4E4C | |
554 | + str r2, [r0, #0x848] | |
555 | + | |
556 | + ldr r2, =0x3F3F3334 | |
557 | + str r2, [r0, #0x850] | |
558 | + | |
559 | + ldr r2, =0x33333333 | |
560 | + str r2, [r0, #0x81c] | |
561 | + str r2, [r0, #0x820] | |
562 | + str r2, [r0, #0x824] | |
563 | + str r2, [r0, #0x828] | |
564 | + | |
565 | + ldr r2, =0x00000800 | |
566 | + str r2, [r0, #0x8b8] | |
567 | + | |
568 | + ldr r2, =0x00020025 | |
569 | + str r2, [r0, #0x004] | |
570 | + ldr r2, =0x00333030 | |
571 | + str r2, [r0, #0x008] | |
572 | + | |
573 | + ldr r2, =0x676B5313 | |
574 | + str r2, [r0, #0x00c] | |
575 | + ldr r2, =0xB66E8B63 | |
576 | + str r2, [r0, #0x010] | |
577 | + | |
578 | + ldr r2, =0x01FF00DB | |
579 | + str r2, [r0, #0x014] | |
580 | + ldr r2, =0x00001740 | |
581 | + str r2, [r0, #0x018] | |
582 | + | |
583 | + ldr r2, =0x00008000 | |
584 | + str r2, [r0, #0x01c] | |
585 | + ldr r2, =0x000026d2 | |
586 | + str r2, [r0, #0x02c] | |
587 | + ldr r2, =0x006B1023 | |
588 | + str r2, [r0, #0x030] | |
589 | + ldr r2, =0x00000027 | |
590 | + str r2, [r0, #0x040] | |
591 | + | |
592 | + ldr r2, =0x84190000 | |
593 | + str r2, [r0, #0x000] | |
594 | + | |
595 | + ldr r2, =0x04008032 | |
596 | + str r2, [r0, #0x01c] | |
597 | + ldr r2, =0x00008033 | |
598 | + str r2, [r0, #0x01c] | |
599 | + ldr r2, =0x00048031 | |
600 | + str r2, [r0, #0x01c] | |
601 | + ldr r2, =0x05208030 | |
602 | + str r2, [r0, #0x01c] | |
603 | + ldr r2, =0x04008040 | |
604 | + str r2, [r0, #0x01c] | |
605 | + | |
606 | + ldr r2, =0x00005800 | |
607 | + str r2, [r0, #0x020] | |
608 | + ldr r2, =0x00011117 | |
609 | + str r2, [r0, #0x818] | |
610 | + ldr r2, =0x00025565 | |
611 | + str r2, [r0, #0x004] | |
612 | + ldr r2, =0x00011006 | |
613 | + str r2, [r0, #0x404] | |
614 | + ldr r2, =0x00000000 | |
615 | + str r2, [r0, #0x01c] | |
616 | +.endm | |
617 | + | |
618 | +.macro imx6_clock_gating | |
619 | + ldr r0, =CCM_BASE_ADDR | |
620 | + ldr r1, =0x00C03F3F | |
621 | + str r1, [r0, #0x068] | |
622 | + ldr r1, =0x0030FC03 | |
623 | + str r1, [r0, #0x06c] | |
624 | + ldr r1, =0x0FFFF000 | |
625 | + str r1, [r0, #0x070] | |
626 | + ldr r1, =0x3FF00000 | |
627 | + str r1, [r0, #0x074] | |
628 | + ldr r1, =0xFFFFF300 | |
629 | + str r1, [r0, #0x078] | |
630 | + ldr r1, =0x0F0000C3 | |
631 | + str r1, [r0, #0x07c] | |
632 | + ldr r1, =0x00000FFF | |
633 | + str r1, [r0, #0x080] | |
634 | +.endm | |
635 | + | |
636 | +.macro imx6_qos_setting | |
637 | + ldr r0, =IOMUXC_BASE_ADDR | |
638 | + ldr r1, =0xF00000CF | |
639 | + str r1, [r0, #0x10] | |
640 | + | |
641 | +#if defined(CONFIG_MX6QP) | |
642 | + ldr r1, =0x77177717 | |
643 | + str r1, [r0, #0x18] | |
644 | + str r1, [r0, #0x1c] | |
645 | +#else | |
646 | + ldr r1, =0x007F007F | |
647 | + str r1, [r0, #0x18] | |
648 | + str r1, [r0, #0x1c] | |
649 | +#endif | |
650 | +.endm | |
651 | + | |
652 | +.macro imx6_ddr_setting | |
653 | +#if defined (CONFIG_MX6S) | |
654 | + imx6solosabreauto_ddr_setting | |
655 | +#elif defined (CONFIG_MX6DL) | |
656 | + imx6dlsabreauto_ddr_setting | |
657 | +#elif defined (CONFIG_MX6QP) | |
658 | + imx6dqpsabreauto_ddr_setting | |
659 | +#elif defined (CONFIG_MX6Q) | |
660 | + imx6dqsabreauto_ddr_setting | |
661 | +#else | |
662 | + #error "SOC not configured" | |
663 | +#endif | |
664 | +.endm | |
665 | + | |
666 | +/* include the common plugin code here */ | |
667 | +#include <asm/arch/mx6_plugin.S> |
board/freescale/mx6sabresd/Kconfig
board/freescale/mx6sabresd/mx6dlsabresd.cfg
1 | +/* | |
2 | + * Copyright (C) 2014-2016 Freescale Semiconductor, Inc. | |
3 | + * Copyright 2017 NXP | |
4 | + * | |
5 | + * SPDX-License-Identifier: GPL-2.0+ | |
6 | + * | |
7 | + * Refer doc/README.imximage for more details about how-to configure | |
8 | + * and create imximage boot image | |
9 | + * | |
10 | + * The syntax is taken as close as possible with the kwbimage | |
11 | + */ | |
12 | + | |
13 | +#include <config.h> | |
14 | + | |
15 | +/* image version */ | |
16 | + | |
17 | +IMAGE_VERSION 2 | |
18 | + | |
19 | +/* | |
20 | + * Boot Device : one of | |
21 | + * spi, sd (the board has no nand neither onenand) | |
22 | + */ | |
23 | + | |
24 | +BOOT_FROM sd | |
25 | + | |
26 | +#ifdef CONFIG_USE_IMXIMG_PLUGIN | |
27 | +/*PLUGIN plugin-binary-file IRAM_FREE_START_ADDR*/ | |
28 | +PLUGIN board/freescale/mx6sabresd/plugin.bin 0x00907000 | |
29 | +#else | |
30 | + | |
31 | +#ifdef CONFIG_IMX_HAB | |
32 | +CSF CONFIG_CSF_SIZE | |
33 | +#endif | |
34 | + | |
35 | +/* | |
36 | + * Device Configuration Data (DCD) | |
37 | + * | |
38 | + * Each entry must have the format: | |
39 | + * Addr-type Address Value | |
40 | + * | |
41 | + * where: | |
42 | + * Addr-type register length (1,2 or 4 bytes) | |
43 | + * Address absolute address of the register | |
44 | + * value value to be stored in the register | |
45 | + */ | |
46 | +DATA 4 0x020e0774 0x000C0000 | |
47 | +DATA 4 0x020e0754 0x00000000 | |
48 | +DATA 4 0x020e04ac 0x00000030 | |
49 | +DATA 4 0x020e04b0 0x00000030 | |
50 | +DATA 4 0x020e0464 0x00000030 | |
51 | +DATA 4 0x020e0490 0x00000030 | |
52 | +DATA 4 0x020e074c 0x00000030 | |
53 | +DATA 4 0x020e0494 0x00000030 | |
54 | +DATA 4 0x020e04a0 0x00000000 | |
55 | +DATA 4 0x020e04b4 0x00000030 | |
56 | +DATA 4 0x020e04b8 0x00000030 | |
57 | +DATA 4 0x020e076c 0x00000030 | |
58 | +DATA 4 0x020e0750 0x00020000 | |
59 | +DATA 4 0x020e04bc 0x00000030 | |
60 | +DATA 4 0x020e04c0 0x00000030 | |
61 | +DATA 4 0x020e04c4 0x00000030 | |
62 | +DATA 4 0x020e04c8 0x00000030 | |
63 | +DATA 4 0x020e04cc 0x00000030 | |
64 | +DATA 4 0x020e04d0 0x00000030 | |
65 | +DATA 4 0x020e04d4 0x00000030 | |
66 | +DATA 4 0x020e04d8 0x00000030 | |
67 | +DATA 4 0x020e0760 0x00020000 | |
68 | +DATA 4 0x020e0764 0x00000030 | |
69 | +DATA 4 0x020e0770 0x00000030 | |
70 | +DATA 4 0x020e0778 0x00000030 | |
71 | +DATA 4 0x020e077c 0x00000030 | |
72 | +DATA 4 0x020e0780 0x00000030 | |
73 | +DATA 4 0x020e0784 0x00000030 | |
74 | +DATA 4 0x020e078c 0x00000030 | |
75 | +DATA 4 0x020e0748 0x00000030 | |
76 | +DATA 4 0x020e0470 0x00000030 | |
77 | +DATA 4 0x020e0474 0x00000030 | |
78 | +DATA 4 0x020e0478 0x00000030 | |
79 | +DATA 4 0x020e047c 0x00000030 | |
80 | +DATA 4 0x020e0480 0x00000030 | |
81 | +DATA 4 0x020e0484 0x00000030 | |
82 | +DATA 4 0x020e0488 0x00000030 | |
83 | +DATA 4 0x020e048c 0x00000030 | |
84 | +DATA 4 0x021b0800 0xa1390003 | |
85 | +DATA 4 0x021b080c 0x001F001F | |
86 | +DATA 4 0x021b0810 0x001F001F | |
87 | +DATA 4 0x021b480c 0x001F001F | |
88 | +DATA 4 0x021b4810 0x001F001F | |
89 | +DATA 4 0x021b083c 0x4220021F | |
90 | +DATA 4 0x021b0840 0x0207017E | |
91 | +DATA 4 0x021b483c 0x4201020C | |
92 | +DATA 4 0x021b4840 0x01660172 | |
93 | +DATA 4 0x021b0848 0x4A4D4E4D | |
94 | +DATA 4 0x021b4848 0x4A4F5049 | |
95 | +DATA 4 0x021b0850 0x3F3C3D31 | |
96 | +DATA 4 0x021b4850 0x3238372B | |
97 | +DATA 4 0x021b081c 0x33333333 | |
98 | +DATA 4 0x021b0820 0x33333333 | |
99 | +DATA 4 0x021b0824 0x33333333 | |
100 | +DATA 4 0x021b0828 0x33333333 | |
101 | +DATA 4 0x021b481c 0x33333333 | |
102 | +DATA 4 0x021b4820 0x33333333 | |
103 | +DATA 4 0x021b4824 0x33333333 | |
104 | +DATA 4 0x021b4828 0x33333333 | |
105 | +DATA 4 0x021b08b8 0x00000800 | |
106 | +DATA 4 0x021b48b8 0x00000800 | |
107 | +DATA 4 0x021b0004 0x0002002D | |
108 | +DATA 4 0x021b0008 0x00333030 | |
109 | +DATA 4 0x021b000c 0x3F435313 | |
110 | +DATA 4 0x021b0010 0xB66E8B63 | |
111 | +DATA 4 0x021b0014 0x01FF00DB | |
112 | +DATA 4 0x021b0018 0x00001740 | |
113 | +DATA 4 0x021b001c 0x00008000 | |
114 | +DATA 4 0x021b002c 0x000026d2 | |
115 | +DATA 4 0x021b0030 0x00431023 | |
116 | +DATA 4 0x021b0040 0x00000027 | |
117 | +DATA 4 0x021b0000 0x831A0000 | |
118 | +DATA 4 0x021b001c 0x04008032 | |
119 | +DATA 4 0x021b001c 0x00008033 | |
120 | +DATA 4 0x021b001c 0x00048031 | |
121 | +DATA 4 0x021b001c 0x05208030 | |
122 | +DATA 4 0x021b001c 0x04008040 | |
123 | +DATA 4 0x021b0020 0x00005800 | |
124 | +DATA 4 0x021b0818 0x00011117 | |
125 | +DATA 4 0x021b4818 0x00011117 | |
126 | +DATA 4 0x021b0004 0x0002556D | |
127 | +DATA 4 0x021b0404 0x00011006 | |
128 | +DATA 4 0x021b001c 0x00000000 | |
129 | + | |
130 | +/* set the default clock gate to save power */ | |
131 | +DATA 4 0x020c4068 0x00C03F3F | |
132 | +DATA 4 0x020c406c 0x0030FC03 | |
133 | +DATA 4 0x020c4070 0x0FFFF000 | |
134 | +DATA 4 0x020c4074 0x3FF00000 | |
135 | +DATA 4 0x020c4078 0x00FFF300 | |
136 | +DATA 4 0x020c407c 0x0F0000C3 | |
137 | +DATA 4 0x020c4080 0x000003FF | |
138 | + | |
139 | +/* enable AXI cache for VDOA/VPU/IPU */ | |
140 | +DATA 4 0x020e0010 0xF00000CF | |
141 | +/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ | |
142 | +DATA 4 0x020e0018 0x007F007F | |
143 | +DATA 4 0x020e001c 0x007F007F | |
144 | +#endif |
board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg
1 | +/* | |
2 | + * Copyright (C) 2011-2016 Freescale Semiconductor, Inc. | |
3 | + * Copyright 2017 NXP | |
4 | + * Jason Liu <r64343@freescale.com> | |
5 | + * | |
6 | + * SPDX-License-Identifier: GPL-2.0+ | |
7 | + * | |
8 | + * Refer doc/README.imximage for more details about how-to configure | |
9 | + * and create imximage boot image | |
10 | + * | |
11 | + * The syntax is taken as close as possible with the kwbimage | |
12 | + */ | |
13 | + | |
14 | +#include <config.h> | |
15 | + | |
16 | +/* image version */ | |
17 | +IMAGE_VERSION 2 | |
18 | + | |
19 | +/* | |
20 | + * Boot Device : one of | |
21 | + * spi, sd (the board has no nand neither onenand) | |
22 | + */ | |
23 | +BOOT_FROM sd | |
24 | + | |
25 | +#ifdef CONFIG_USE_IMXIMG_PLUGIN | |
26 | +/*PLUGIN plugin-binary-file IRAM_FREE_START_ADDR*/ | |
27 | +PLUGIN board/freescale/mx6sabresd/plugin.bin 0x00907000 | |
28 | +#else | |
29 | + | |
30 | +#ifdef CONFIG_IMX_HAB | |
31 | +CSF CONFIG_CSF_SIZE | |
32 | +#endif | |
33 | + | |
34 | +/* | |
35 | + * Device Configuration Data (DCD) | |
36 | + * | |
37 | + * Each entry must have the format: | |
38 | + * Addr-type Address Value | |
39 | + * | |
40 | + * where: | |
41 | + * Addr-type register length (1,2 or 4 bytes) | |
42 | + * Address absolute address of the register | |
43 | + * value value to be stored in the register | |
44 | + */ | |
45 | +DATA 4 0x020e0798 0x000C0000 | |
46 | +DATA 4 0x020e0758 0x00000000 | |
47 | +DATA 4 0x020e0588 0x00000030 | |
48 | +DATA 4 0x020e0594 0x00000030 | |
49 | +DATA 4 0x020e056c 0x00000030 | |
50 | +DATA 4 0x020e0578 0x00000030 | |
51 | +DATA 4 0x020e074c 0x00000030 | |
52 | +DATA 4 0x020e057c 0x00000030 | |
53 | +DATA 4 0x020e058c 0x00000000 | |
54 | +DATA 4 0x020e059c 0x00000030 | |
55 | +DATA 4 0x020e05a0 0x00000030 | |
56 | +DATA 4 0x020e078c 0x00000030 | |
57 | +DATA 4 0x020e0750 0x00020000 | |
58 | +DATA 4 0x020e05a8 0x00000030 | |
59 | +DATA 4 0x020e05b0 0x00000030 | |
60 | +DATA 4 0x020e0524 0x00000030 | |
61 | +DATA 4 0x020e051c 0x00000030 | |
62 | +DATA 4 0x020e0518 0x00000030 | |
63 | +DATA 4 0x020e050c 0x00000030 | |
64 | +DATA 4 0x020e05b8 0x00000030 | |
65 | +DATA 4 0x020e05c0 0x00000030 | |
66 | +DATA 4 0x020e0774 0x00020000 | |
67 | +DATA 4 0x020e0784 0x00000030 | |
68 | +DATA 4 0x020e0788 0x00000030 | |
69 | +DATA 4 0x020e0794 0x00000030 | |
70 | +DATA 4 0x020e079c 0x00000030 | |
71 | +DATA 4 0x020e07a0 0x00000030 | |
72 | +DATA 4 0x020e07a4 0x00000030 | |
73 | +DATA 4 0x020e07a8 0x00000030 | |
74 | +DATA 4 0x020e0748 0x00000030 | |
75 | +DATA 4 0x020e05ac 0x00000030 | |
76 | +DATA 4 0x020e05b4 0x00000030 | |
77 | +DATA 4 0x020e0528 0x00000030 | |
78 | +DATA 4 0x020e0520 0x00000030 | |
79 | +DATA 4 0x020e0514 0x00000030 | |
80 | +DATA 4 0x020e0510 0x00000030 | |
81 | +DATA 4 0x020e05bc 0x00000030 | |
82 | +DATA 4 0x020e05c4 0x00000030 | |
83 | +DATA 4 0x021b0800 0xa1390003 | |
84 | +DATA 4 0x021b080c 0x001F001F | |
85 | +DATA 4 0x021b0810 0x001F001F | |
86 | +DATA 4 0x021b480c 0x001F001F | |
87 | +DATA 4 0x021b4810 0x001F001F | |
88 | +DATA 4 0x021b083c 0x43270338 | |
89 | +DATA 4 0x021b0840 0x03200314 | |
90 | +DATA 4 0x021b483c 0x431A032F | |
91 | +DATA 4 0x021b4840 0x03200263 | |
92 | +DATA 4 0x021b0848 0x4B434748 | |
93 | +DATA 4 0x021b4848 0x4445404C | |
94 | +DATA 4 0x021b0850 0x38444542 | |
95 | +DATA 4 0x021b4850 0x4935493A | |
96 | +DATA 4 0x021b081c 0x33333333 | |
97 | +DATA 4 0x021b0820 0x33333333 | |
98 | +DATA 4 0x021b0824 0x33333333 | |
99 | +DATA 4 0x021b0828 0x33333333 | |
100 | +DATA 4 0x021b481c 0x33333333 | |
101 | +DATA 4 0x021b4820 0x33333333 | |
102 | +DATA 4 0x021b4824 0x33333333 | |
103 | +DATA 4 0x021b4828 0x33333333 | |
104 | +DATA 4 0x021b08b8 0x00000800 | |
105 | +DATA 4 0x021b48b8 0x00000800 | |
106 | +DATA 4 0x021b0004 0x00020036 | |
107 | +DATA 4 0x021b0008 0x09444040 | |
108 | +DATA 4 0x021b000c 0x555A7975 | |
109 | +DATA 4 0x021b0010 0xFF538F64 | |
110 | +DATA 4 0x021b0014 0x01FF00DB | |
111 | +DATA 4 0x021b0018 0x00001740 | |
112 | +DATA 4 0x021b001c 0x00008000 | |
113 | +DATA 4 0x021b002c 0x000026d2 | |
114 | +DATA 4 0x021b0030 0x005A1023 | |
115 | +DATA 4 0x021b0040 0x00000027 | |
116 | +DATA 4 0x021b0000 0x831A0000 | |
117 | +DATA 4 0x021b001c 0x04088032 | |
118 | +DATA 4 0x021b001c 0x00008033 | |
119 | +DATA 4 0x021b001c 0x00048031 | |
120 | +DATA 4 0x021b001c 0x09408030 | |
121 | +DATA 4 0x021b001c 0x04008040 | |
122 | +DATA 4 0x021b0020 0x00005800 | |
123 | +DATA 4 0x021b0818 0x00011117 | |
124 | +DATA 4 0x021b4818 0x00011117 | |
125 | +DATA 4 0x021b0004 0x00025576 | |
126 | +DATA 4 0x021b0404 0x00011006 | |
127 | +DATA 4 0x021b001c 0x00000000 | |
128 | + | |
129 | +/* set the default clock gate to save power */ | |
130 | +DATA 4 0x020c4068 0x00C03F3F | |
131 | +DATA 4 0x020c406c 0x0030FC03 | |
132 | +DATA 4 0x020c4070 0x0FFFF000 | |
133 | +DATA 4 0x020c4074 0x3FF00000 | |
134 | +DATA 4 0x020c4078 0x00FFF300 | |
135 | +DATA 4 0x020c407c 0x0F0000F3 | |
136 | +DATA 4 0x020c4080 0x000003FF | |
137 | + | |
138 | +/* enable AXI cache for VDOA/VPU/IPU */ | |
139 | +DATA 4 0x020e0010 0xF00000CF | |
140 | +/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ | |
141 | +DATA 4 0x020e0018 0x007F007F | |
142 | +DATA 4 0x020e001c 0x007F007F | |
143 | + | |
144 | +/* | |
145 | + * Setup CCM_CCOSR register as follows: | |
146 | + * | |
147 | + * cko1_en = 1 --> CKO1 enabled | |
148 | + * cko1_div = 111 --> divide by 8 | |
149 | + * cko1_sel = 1011 --> ahb_clk_root | |
150 | + * | |
151 | + * This sets CKO1 at ahb_clk_root/8 = 132/8 = 16.5 MHz | |
152 | + */ | |
153 | +DATA 4 0x020c4060 0x000000fb | |
154 | +#endif |
board/freescale/mx6sabresd/mx6qp.cfg
1 | +/* | |
2 | + * Copyright (C) 2015-2016 Freescale Semiconductor, Inc. | |
3 | + * | |
4 | + * SPDX-License-Identifier: GPL-2.0+ | |
5 | + * | |
6 | + * Refer doc/README.imximage for more details about how-to configure | |
7 | + * and create imximage boot image | |
8 | + * | |
9 | + * The syntax is taken as close as possible with the kwbimage | |
10 | + */ | |
11 | + | |
12 | +#include <config.h> | |
13 | +/* image version */ | |
14 | +IMAGE_VERSION 2 | |
15 | + | |
16 | +/* | |
17 | + * Boot Device : one of | |
18 | + * spi, sd (the board has no nand neither onenand) | |
19 | + */ | |
20 | +BOOT_FROM sd | |
21 | + | |
22 | +#ifdef CONFIG_USE_IMXIMG_PLUGIN | |
23 | +/*PLUGIN plugin-binary-file IRAM_FREE_START_ADDR*/ | |
24 | +PLUGIN board/freescale/mx6sabresd/plugin.bin 0x00907000 | |
25 | +#else | |
26 | + | |
27 | +#ifdef CONFIG_IMX_HAB | |
28 | +CSF CONFIG_CSF_SIZE | |
29 | +#endif | |
30 | + | |
31 | +/* | |
32 | + * Device Configuration Data (DCD) | |
33 | + * | |
34 | + * Each entry must have the format: | |
35 | + * Addr-type Address Value | |
36 | + * | |
37 | + * where: | |
38 | + * Addr-type register length (1,2 or 4 bytes) | |
39 | + * Address absolute address of the register | |
40 | + * value value to be stored in the register | |
41 | + */ | |
42 | +DATA 4, 0x020e0798, 0x000c0000 | |
43 | +DATA 4, 0x020e0758, 0x00000000 | |
44 | +DATA 4, 0x020e0588, 0x00000030 | |
45 | +DATA 4, 0x020e0594, 0x00000030 | |
46 | +DATA 4, 0x020e056c, 0x00000030 | |
47 | +DATA 4, 0x020e0578, 0x00000030 | |
48 | +DATA 4, 0x020e074c, 0x00000030 | |
49 | +DATA 4, 0x020e057c, 0x00000030 | |
50 | +DATA 4, 0x020e058c, 0x00000000 | |
51 | +DATA 4, 0x020e059c, 0x00000030 | |
52 | +DATA 4, 0x020e05a0, 0x00000030 | |
53 | +DATA 4, 0x020e078c, 0x00000030 | |
54 | +DATA 4, 0x020e0750, 0x00020000 | |
55 | +DATA 4, 0x020e05a8, 0x00000030 | |
56 | +DATA 4, 0x020e05b0, 0x00000030 | |
57 | +DATA 4, 0x020e0524, 0x00000030 | |
58 | +DATA 4, 0x020e051c, 0x00000030 | |
59 | +DATA 4, 0x020e0518, 0x00000030 | |
60 | +DATA 4, 0x020e050c, 0x00000030 | |
61 | +DATA 4, 0x020e05b8, 0x00000030 | |
62 | +DATA 4, 0x020e05c0, 0x00000030 | |
63 | + | |
64 | +DATA 4, 0x020e0534, 0x00018200 | |
65 | +DATA 4, 0x020e0538, 0x00008000 | |
66 | +DATA 4, 0x020e053c, 0x00018200 | |
67 | +DATA 4, 0x020e0540, 0x00018200 | |
68 | +DATA 4, 0x020e0544, 0x00018200 | |
69 | +DATA 4, 0x020e0548, 0x00018200 | |
70 | +DATA 4, 0x020e054c, 0x00018200 | |
71 | +DATA 4, 0x020e0550, 0x00018200 | |
72 | + | |
73 | +DATA 4, 0x020e0774, 0x00020000 | |
74 | +DATA 4, 0x020e0784, 0x00000030 | |
75 | +DATA 4, 0x020e0788, 0x00000030 | |
76 | +DATA 4, 0x020e0794, 0x00000030 | |
77 | +DATA 4, 0x020e079c, 0x00000030 | |
78 | +DATA 4, 0x020e07a0, 0x00000030 | |
79 | +DATA 4, 0x020e07a4, 0x00000030 | |
80 | +DATA 4, 0x020e07a8, 0x00000030 | |
81 | +DATA 4, 0x020e0748, 0x00000030 | |
82 | +DATA 4, 0x020e05ac, 0x00000030 | |
83 | +DATA 4, 0x020e05b4, 0x00000030 | |
84 | +DATA 4, 0x020e0528, 0x00000030 | |
85 | +DATA 4, 0x020e0520, 0x00000030 | |
86 | +DATA 4, 0x020e0514, 0x00000030 | |
87 | +DATA 4, 0x020e0510, 0x00000030 | |
88 | +DATA 4, 0x020e05bc, 0x00000030 | |
89 | +DATA 4, 0x020e05c4, 0x00000030 | |
90 | +DATA 4, 0x021b0800, 0xa1390003 | |
91 | +DATA 4, 0x021b080c, 0x001b001e | |
92 | +DATA 4, 0x021b0810, 0x002e0029 | |
93 | +DATA 4, 0x021b480c, 0x001b002a | |
94 | +DATA 4, 0x021b4810, 0x0019002c | |
95 | +DATA 4, 0x021b083c, 0x43240334 | |
96 | +DATA 4, 0x021b0840, 0x0324031a | |
97 | +DATA 4, 0x021b483c, 0x43340344 | |
98 | +DATA 4, 0x021b4840, 0x03280276 | |
99 | +DATA 4, 0x021b0848, 0x44383A3E | |
100 | +DATA 4, 0x021b4848, 0x3C3C3846 | |
101 | +DATA 4, 0x021b0850, 0x2e303230 | |
102 | +DATA 4, 0x021b4850, 0x38283E34 | |
103 | +DATA 4, 0x021b081c, 0x33333333 | |
104 | +DATA 4, 0x021b0820, 0x33333333 | |
105 | +DATA 4, 0x021b0824, 0x33333333 | |
106 | +DATA 4, 0x021b0828, 0x33333333 | |
107 | +DATA 4, 0x021b481c, 0x33333333 | |
108 | +DATA 4, 0x021b4820, 0x33333333 | |
109 | +DATA 4, 0x021b4824, 0x33333333 | |
110 | +DATA 4, 0x021b4828, 0x33333333 | |
111 | +DATA 4, 0x021b08c0, 0x24912489 | |
112 | +DATA 4, 0x021b48c0, 0x24914452 | |
113 | +DATA 4, 0x021b08b8, 0x00000800 | |
114 | +DATA 4, 0x021b48b8, 0x00000800 | |
115 | +DATA 4, 0x021b0004, 0x00020036 | |
116 | +DATA 4, 0x021b0008, 0x24444040 | |
117 | +DATA 4, 0x021b000c, 0x555A7955 | |
118 | +DATA 4, 0x021b0010, 0xFF320F64 | |
119 | +DATA 4, 0x021b0014, 0x01ff00db | |
120 | +DATA 4, 0x021b0018, 0x00011740 | |
121 | +DATA 4, 0x021b001c, 0x00008000 | |
122 | +DATA 4, 0x021b002c, 0x000026d2 | |
123 | +DATA 4, 0x021b0030, 0x005A1023 | |
124 | +DATA 4, 0x021b0040, 0x00000027 | |
125 | +DATA 4, 0x021b0400, 0x14420000 | |
126 | +DATA 4, 0x021b0000, 0x831A0000 | |
127 | +DATA 4, 0x021b0890, 0x00400C58 | |
128 | +DATA 4, 0x00bb0008, 0x00000000 | |
129 | +DATA 4, 0x00bb000c, 0x2891E41A | |
130 | +DATA 4, 0x00bb0038, 0x00000564 | |
131 | +DATA 4, 0x00bb0014, 0x00000040 | |
132 | +DATA 4, 0x00bb0028, 0x00000020 | |
133 | +DATA 4, 0x00bb002c, 0x00000020 | |
134 | +DATA 4, 0x021b001c, 0x04088032 | |
135 | +DATA 4, 0x021b001c, 0x00008033 | |
136 | +DATA 4, 0x021b001c, 0x00048031 | |
137 | +DATA 4, 0x021b001c, 0x09408030 | |
138 | +DATA 4, 0x021b001c, 0x04008040 | |
139 | +DATA 4, 0x021b0020, 0x00005800 | |
140 | +DATA 4, 0x021b0818, 0x00011117 | |
141 | +DATA 4, 0x021b4818, 0x00011117 | |
142 | +DATA 4, 0x021b0004, 0x00025576 | |
143 | +DATA 4, 0x021b0404, 0x00011006 | |
144 | +DATA 4, 0x021b001c, 0x00000000 | |
145 | + | |
146 | +/* set the default clock gate to save power */ | |
147 | +DATA 4, 0x020c4068, 0x00C03F3F | |
148 | +DATA 4, 0x020c406c, 0x0030FC03 | |
149 | +DATA 4, 0x020c4070, 0x0FFFF000 | |
150 | +DATA 4, 0x020c4074, 0x3FF00000 | |
151 | +DATA 4, 0x020c4078, 0x00FFF300 | |
152 | +DATA 4, 0x020c407c, 0x0F0000F3 | |
153 | +DATA 4, 0x020c4080, 0x000003FF | |
154 | + | |
155 | +/* enable AXI cache for VDOA/VPU/IPU */ | |
156 | +DATA 4, 0x020e0010, 0xF00000CF | |
157 | +/* set IPU AXI-id1 Qos=0x1 AXI-id0/2/3 Qos=0x7 */ | |
158 | +DATA 4, 0x020e0018, 0x77177717 | |
159 | +DATA 4, 0x020e001c, 0x77177717 | |
160 | +#endif |
board/freescale/mx6sabresd/mx6sabresd.c
Changes suppressed. Click to show
1 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | 2 | /* |
3 | - * Copyright (C) 2012 Freescale Semiconductor, Inc. | |
3 | + * Copyright (C) 2012-2016 Freescale Semiconductor, Inc. | |
4 | + * Copyright 2017-2018 NXP | |
4 | 5 | * |
5 | 6 | * Author: Fabio Estevam <fabio.estevam@freescale.com> |
6 | 7 | */ |
... | ... | @@ -16,6 +17,7 @@ |
16 | 17 | #include <asm/mach-imx/spi.h> |
17 | 18 | #include <env.h> |
18 | 19 | #include <linux/errno.h> |
20 | +#include <linux/delay.h> | |
19 | 21 | #include <asm/gpio.h> |
20 | 22 | #include <asm/mach-imx/mxc_i2c.h> |
21 | 23 | #include <asm/mach-imx/iomux-v3.h> |
... | ... | @@ -35,6 +37,20 @@ |
35 | 37 | #include "../common/pfuze.h" |
36 | 38 | #include <usb.h> |
37 | 39 | #include <usb/ehci-ci.h> |
40 | +#include <asm/arch/mx6-ddr.h> | |
41 | +#if defined(CONFIG_MX6DL) && defined(CONFIG_MXC_EPDC) | |
42 | +#include <lcd.h> | |
43 | +#include <mxc_epdc_fb.h> | |
44 | +#endif | |
45 | +#ifdef CONFIG_SATA | |
46 | +#include <asm/mach-imx/sata.h> | |
47 | +#endif | |
48 | +#ifdef CONFIG_FSL_FASTBOOT | |
49 | +#include <fsl_fastboot.h> | |
50 | +#ifdef CONFIG_ANDROID_RECOVERY | |
51 | +#include <recovery.h> | |
52 | +#endif | |
53 | +#endif /*CONFIG_FSL_FASTBOOT*/ | |
38 | 54 | |
39 | 55 | DECLARE_GLOBAL_DATA_PTR; |
40 | 56 | |
41 | 57 | |
... | ... | @@ -53,12 +69,18 @@ |
53 | 69 | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ |
54 | 70 | PAD_CTL_ODE | PAD_CTL_SRE_FAST) |
55 | 71 | |
72 | +#define EPDC_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_SPEED_MED | \ | |
73 | + PAD_CTL_DSE_40ohm | PAD_CTL_HYS) | |
74 | + | |
75 | +#define OTG_ID_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ | |
76 | + PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_LOW | \ | |
77 | + PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS) | |
78 | + | |
79 | + | |
56 | 80 | #define I2C_PMIC 1 |
57 | 81 | |
58 | 82 | #define I2C_PAD MUX_PAD_CTRL(I2C_PAD_CTRL) |
59 | 83 | |
60 | -#define DISP0_PWR_EN IMX_GPIO_NR(1, 21) | |
61 | - | |
62 | 84 | #define KEY_VOL_UP IMX_GPIO_NR(1, 4) |
63 | 85 | |
64 | 86 | int dram_init(void) |
... | ... | @@ -72,47 +94,7 @@ |
72 | 94 | IOMUX_PADS(PAD_CSI0_DAT11__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)), |
73 | 95 | }; |
74 | 96 | |
75 | -static iomux_v3_cfg_t const usdhc2_pads[] = { | |
76 | - IOMUX_PADS(PAD_SD2_CLK__SD2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
77 | - IOMUX_PADS(PAD_SD2_CMD__SD2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
78 | - IOMUX_PADS(PAD_SD2_DAT0__SD2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
79 | - IOMUX_PADS(PAD_SD2_DAT1__SD2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
80 | - IOMUX_PADS(PAD_SD2_DAT2__SD2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
81 | - IOMUX_PADS(PAD_SD2_DAT3__SD2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
82 | - IOMUX_PADS(PAD_NANDF_D4__SD2_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
83 | - IOMUX_PADS(PAD_NANDF_D5__SD2_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
84 | - IOMUX_PADS(PAD_NANDF_D6__SD2_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
85 | - IOMUX_PADS(PAD_NANDF_D7__SD2_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
86 | - IOMUX_PADS(PAD_NANDF_D2__GPIO2_IO02 | MUX_PAD_CTRL(NO_PAD_CTRL)), /* CD */ | |
87 | -}; | |
88 | - | |
89 | -static iomux_v3_cfg_t const usdhc3_pads[] = { | |
90 | - IOMUX_PADS(PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
91 | - IOMUX_PADS(PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
92 | - IOMUX_PADS(PAD_SD3_DAT0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
93 | - IOMUX_PADS(PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
94 | - IOMUX_PADS(PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
95 | - IOMUX_PADS(PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
96 | - IOMUX_PADS(PAD_SD3_DAT4__SD3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
97 | - IOMUX_PADS(PAD_SD3_DAT5__SD3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
98 | - IOMUX_PADS(PAD_SD3_DAT6__SD3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
99 | - IOMUX_PADS(PAD_SD3_DAT7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
100 | - IOMUX_PADS(PAD_NANDF_D0__GPIO2_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL)), /* CD */ | |
101 | -}; | |
102 | - | |
103 | -static iomux_v3_cfg_t const usdhc4_pads[] = { | |
104 | - IOMUX_PADS(PAD_SD4_CLK__SD4_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
105 | - IOMUX_PADS(PAD_SD4_CMD__SD4_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
106 | - IOMUX_PADS(PAD_SD4_DAT0__SD4_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
107 | - IOMUX_PADS(PAD_SD4_DAT1__SD4_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
108 | - IOMUX_PADS(PAD_SD4_DAT2__SD4_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
109 | - IOMUX_PADS(PAD_SD4_DAT3__SD4_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
110 | - IOMUX_PADS(PAD_SD4_DAT4__SD4_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
111 | - IOMUX_PADS(PAD_SD4_DAT5__SD4_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
112 | - IOMUX_PADS(PAD_SD4_DAT6__SD4_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
113 | - IOMUX_PADS(PAD_SD4_DAT7__SD4_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
114 | -}; | |
115 | - | |
97 | +#ifdef CONFIG_MXC_SPI | |
116 | 98 | static iomux_v3_cfg_t const ecspi1_pads[] = { |
117 | 99 | IOMUX_PADS(PAD_KEY_COL0__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL)), |
118 | 100 | IOMUX_PADS(PAD_KEY_COL1__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL)), |
... | ... | @@ -120,6 +102,12 @@ |
120 | 102 | IOMUX_PADS(PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL)), |
121 | 103 | }; |
122 | 104 | |
105 | +static void setup_spi(void) | |
106 | +{ | |
107 | + SETUP_IOMUX_PADS(ecspi1_pads); | |
108 | +} | |
109 | +#endif | |
110 | + | |
123 | 111 | static iomux_v3_cfg_t const rgb_pads[] = { |
124 | 112 | IOMUX_PADS(PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK | MUX_PAD_CTRL(NO_PAD_CTRL)), |
125 | 113 | IOMUX_PADS(PAD_DI0_PIN15__IPU1_DI0_PIN15 | MUX_PAD_CTRL(NO_PAD_CTRL)), |
126 | 114 | |
... | ... | @@ -158,9 +146,20 @@ |
158 | 146 | |
159 | 147 | static void enable_backlight(void) |
160 | 148 | { |
149 | + struct gpio_desc desc; | |
150 | + int ret; | |
151 | + | |
161 | 152 | SETUP_IOMUX_PADS(bl_pads); |
162 | - gpio_request(DISP0_PWR_EN, "Display Power Enable"); | |
163 | - gpio_direction_output(DISP0_PWR_EN, 1); | |
153 | + | |
154 | + ret = dm_gpio_lookup_name("GPIO1_21", &desc); | |
155 | + if (ret) | |
156 | + return; | |
157 | + | |
158 | + ret = dm_gpio_request(&desc, "Display Power Enable"); | |
159 | + if (ret) | |
160 | + return; | |
161 | + | |
162 | + dm_gpio_set_dir_flags(&desc, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); | |
164 | 163 | } |
165 | 164 | |
166 | 165 | static void enable_rgb(struct display_info_t const *dev) |
167 | 166 | |
168 | 167 | |
169 | 168 | |
170 | 169 | |
171 | 170 | |
172 | 171 | |
173 | 172 | |
... | ... | @@ -174,36 +173,34 @@ |
174 | 173 | enable_backlight(); |
175 | 174 | } |
176 | 175 | |
177 | -static struct i2c_pads_info mx6q_i2c_pad_info1 = { | |
176 | +#ifdef CONFIG_SYS_I2C_LEGACY | |
177 | +static struct i2c_pads_info i2c_pad_info1 = { | |
178 | 178 | .scl = { |
179 | - .i2c_mode = MX6Q_PAD_KEY_COL3__I2C2_SCL | I2C_PAD, | |
180 | - .gpio_mode = MX6Q_PAD_KEY_COL3__GPIO4_IO12 | I2C_PAD, | |
179 | + .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL | I2C_PAD, | |
180 | + .gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12 | I2C_PAD, | |
181 | 181 | .gp = IMX_GPIO_NR(4, 12) |
182 | 182 | }, |
183 | 183 | .sda = { |
184 | - .i2c_mode = MX6Q_PAD_KEY_ROW3__I2C2_SDA | I2C_PAD, | |
185 | - .gpio_mode = MX6Q_PAD_KEY_ROW3__GPIO4_IO13 | I2C_PAD, | |
184 | + .i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA | I2C_PAD, | |
185 | + .gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13 | I2C_PAD, | |
186 | 186 | .gp = IMX_GPIO_NR(4, 13) |
187 | 187 | } |
188 | 188 | }; |
189 | +#endif | |
189 | 190 | |
190 | -static struct i2c_pads_info mx6dl_i2c_pad_info1 = { | |
191 | - .scl = { | |
192 | - .i2c_mode = MX6DL_PAD_KEY_COL3__I2C2_SCL | I2C_PAD, | |
193 | - .gpio_mode = MX6DL_PAD_KEY_COL3__GPIO4_IO12 | I2C_PAD, | |
194 | - .gp = IMX_GPIO_NR(4, 12) | |
195 | - }, | |
196 | - .sda = { | |
197 | - .i2c_mode = MX6DL_PAD_KEY_ROW3__I2C2_SDA | I2C_PAD, | |
198 | - .gpio_mode = MX6DL_PAD_KEY_ROW3__GPIO4_IO13 | I2C_PAD, | |
199 | - .gp = IMX_GPIO_NR(4, 13) | |
200 | - } | |
191 | +#ifdef CONFIG_PCIE_IMX | |
192 | +iomux_v3_cfg_t const pcie_pads[] = { | |
193 | + IOMUX_PADS(PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL)), /* POWER */ | |
194 | + IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL)), /* RESET */ | |
201 | 195 | }; |
202 | 196 | |
203 | -static void setup_spi(void) | |
197 | +static void setup_pcie(void) | |
204 | 198 | { |
205 | - SETUP_IOMUX_PADS(ecspi1_pads); | |
199 | + SETUP_IOMUX_PADS(pcie_pads); | |
200 | + gpio_request(CONFIG_PCIE_IMX_POWER_GPIO, "PCIE Power Enable"); | |
201 | + gpio_request(CONFIG_PCIE_IMX_PERST_GPIO, "PCIE Reset"); | |
206 | 202 | } |
203 | +#endif | |
207 | 204 | |
208 | 205 | iomux_v3_cfg_t const di0_pads[] = { |
209 | 206 | IOMUX_PADS(PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK), /* DISP0_CLK */ |
210 | 207 | |
... | ... | @@ -216,7 +213,97 @@ |
216 | 213 | SETUP_IOMUX_PADS(uart1_pads); |
217 | 214 | } |
218 | 215 | |
216 | +#if defined(CONFIG_MX6DL) && defined(CONFIG_MXC_EPDC) | |
217 | +static iomux_v3_cfg_t const epdc_enable_pads[] = { | |
218 | + IOMUX_PADS(PAD_EIM_A16__EPDC_DATA00 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
219 | + IOMUX_PADS(PAD_EIM_DA10__EPDC_DATA01 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
220 | + IOMUX_PADS(PAD_EIM_DA12__EPDC_DATA02 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
221 | + IOMUX_PADS(PAD_EIM_DA11__EPDC_DATA03 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
222 | + IOMUX_PADS(PAD_EIM_LBA__EPDC_DATA04 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
223 | + IOMUX_PADS(PAD_EIM_EB2__EPDC_DATA05 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
224 | + IOMUX_PADS(PAD_EIM_CS0__EPDC_DATA06 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
225 | + IOMUX_PADS(PAD_EIM_RW__EPDC_DATA07 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
226 | + IOMUX_PADS(PAD_EIM_A21__EPDC_GDCLK | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
227 | + IOMUX_PADS(PAD_EIM_A22__EPDC_GDSP | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
228 | + IOMUX_PADS(PAD_EIM_A23__EPDC_GDOE | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
229 | + IOMUX_PADS(PAD_EIM_A24__EPDC_GDRL | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
230 | + IOMUX_PADS(PAD_EIM_D31__EPDC_SDCLK_P | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
231 | + IOMUX_PADS(PAD_EIM_D27__EPDC_SDOE | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
232 | + IOMUX_PADS(PAD_EIM_DA1__EPDC_SDLE | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
233 | + IOMUX_PADS(PAD_EIM_EB1__EPDC_SDSHR | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
234 | + IOMUX_PADS(PAD_EIM_DA2__EPDC_BDR0 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
235 | + IOMUX_PADS(PAD_EIM_DA4__EPDC_SDCE0 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
236 | + IOMUX_PADS(PAD_EIM_DA5__EPDC_SDCE1 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
237 | + IOMUX_PADS(PAD_EIM_DA6__EPDC_SDCE2 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
238 | +}; | |
239 | + | |
240 | +static iomux_v3_cfg_t const epdc_disable_pads[] = { | |
241 | + IOMUX_PADS(PAD_EIM_A16__GPIO2_IO22), | |
242 | + IOMUX_PADS(PAD_EIM_DA10__GPIO3_IO10), | |
243 | + IOMUX_PADS(PAD_EIM_DA12__GPIO3_IO12), | |
244 | + IOMUX_PADS(PAD_EIM_DA11__GPIO3_IO11), | |
245 | + IOMUX_PADS(PAD_EIM_LBA__GPIO2_IO27), | |
246 | + IOMUX_PADS(PAD_EIM_EB2__GPIO2_IO30), | |
247 | + IOMUX_PADS(PAD_EIM_CS0__GPIO2_IO23), | |
248 | + IOMUX_PADS(PAD_EIM_RW__GPIO2_IO26), | |
249 | + IOMUX_PADS(PAD_EIM_A21__GPIO2_IO17), | |
250 | + IOMUX_PADS(PAD_EIM_A22__GPIO2_IO16), | |
251 | + IOMUX_PADS(PAD_EIM_A23__GPIO6_IO06), | |
252 | + IOMUX_PADS(PAD_EIM_A24__GPIO5_IO04), | |
253 | + IOMUX_PADS(PAD_EIM_D31__GPIO3_IO31), | |
254 | + IOMUX_PADS(PAD_EIM_D27__GPIO3_IO27), | |
255 | + IOMUX_PADS(PAD_EIM_DA1__GPIO3_IO01), | |
256 | + IOMUX_PADS(PAD_EIM_EB1__GPIO2_IO29), | |
257 | + IOMUX_PADS(PAD_EIM_DA2__GPIO3_IO02), | |
258 | + IOMUX_PADS(PAD_EIM_DA4__GPIO3_IO04), | |
259 | + IOMUX_PADS(PAD_EIM_DA5__GPIO3_IO05), | |
260 | + IOMUX_PADS(PAD_EIM_DA6__GPIO3_IO06), | |
261 | +}; | |
262 | +#endif | |
263 | + | |
219 | 264 | #ifdef CONFIG_FSL_ESDHC_IMX |
265 | +#if !CONFIG_IS_ENABLED(DM_MMC) | |
266 | +static iomux_v3_cfg_t const usdhc2_pads[] = { | |
267 | + IOMUX_PADS(PAD_SD2_CLK__SD2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
268 | + IOMUX_PADS(PAD_SD2_CMD__SD2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
269 | + IOMUX_PADS(PAD_SD2_DAT0__SD2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
270 | + IOMUX_PADS(PAD_SD2_DAT1__SD2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
271 | + IOMUX_PADS(PAD_SD2_DAT2__SD2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
272 | + IOMUX_PADS(PAD_SD2_DAT3__SD2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
273 | + IOMUX_PADS(PAD_NANDF_D4__SD2_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
274 | + IOMUX_PADS(PAD_NANDF_D5__SD2_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
275 | + IOMUX_PADS(PAD_NANDF_D6__SD2_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
276 | + IOMUX_PADS(PAD_NANDF_D7__SD2_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
277 | + IOMUX_PADS(PAD_NANDF_D2__GPIO2_IO02 | MUX_PAD_CTRL(NO_PAD_CTRL)), /* CD */ | |
278 | +}; | |
279 | + | |
280 | +static iomux_v3_cfg_t const usdhc3_pads[] = { | |
281 | + IOMUX_PADS(PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
282 | + IOMUX_PADS(PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
283 | + IOMUX_PADS(PAD_SD3_DAT0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
284 | + IOMUX_PADS(PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
285 | + IOMUX_PADS(PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
286 | + IOMUX_PADS(PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
287 | + IOMUX_PADS(PAD_SD3_DAT4__SD3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
288 | + IOMUX_PADS(PAD_SD3_DAT5__SD3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
289 | + IOMUX_PADS(PAD_SD3_DAT6__SD3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
290 | + IOMUX_PADS(PAD_SD3_DAT7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
291 | + IOMUX_PADS(PAD_NANDF_D0__GPIO2_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL)), /* CD */ | |
292 | +}; | |
293 | + | |
294 | +static iomux_v3_cfg_t const usdhc4_pads[] = { | |
295 | + IOMUX_PADS(PAD_SD4_CLK__SD4_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
296 | + IOMUX_PADS(PAD_SD4_CMD__SD4_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
297 | + IOMUX_PADS(PAD_SD4_DAT0__SD4_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
298 | + IOMUX_PADS(PAD_SD4_DAT1__SD4_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
299 | + IOMUX_PADS(PAD_SD4_DAT2__SD4_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
300 | + IOMUX_PADS(PAD_SD4_DAT3__SD4_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
301 | + IOMUX_PADS(PAD_SD4_DAT4__SD4_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
302 | + IOMUX_PADS(PAD_SD4_DAT5__SD4_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
303 | + IOMUX_PADS(PAD_SD4_DAT6__SD4_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
304 | + IOMUX_PADS(PAD_SD4_DAT7__SD4_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), | |
305 | +}; | |
306 | + | |
220 | 307 | struct fsl_esdhc_cfg usdhc_cfg[3] = { |
221 | 308 | {USDHC2_BASE_ADDR}, |
222 | 309 | {USDHC3_BASE_ADDR}, |
... | ... | @@ -226,11 +313,6 @@ |
226 | 313 | #define USDHC2_CD_GPIO IMX_GPIO_NR(2, 2) |
227 | 314 | #define USDHC3_CD_GPIO IMX_GPIO_NR(2, 0) |
228 | 315 | |
229 | -int board_mmc_get_env_dev(int devno) | |
230 | -{ | |
231 | - return devno - 1; | |
232 | -} | |
233 | - | |
234 | 316 | int board_mmc_getcd(struct mmc *mmc) |
235 | 317 | { |
236 | 318 | struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; |
237 | 319 | |
238 | 320 | |
239 | 321 | |
... | ... | @@ -288,21 +370,28 @@ |
288 | 370 | return fsl_esdhc_initialize(bis, &usdhc_cfg[0]); |
289 | 371 | } |
290 | 372 | #endif |
373 | +#endif | |
291 | 374 | |
292 | 375 | static int ar8031_phy_fixup(struct phy_device *phydev) |
293 | 376 | { |
294 | 377 | unsigned short val; |
295 | 378 | |
296 | 379 | /* To enable AR8031 ouput a 125MHz clk from CLK_25M */ |
297 | - phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x7); | |
298 | - phy_write(phydev, MDIO_DEVAD_NONE, 0xe, 0x8016); | |
299 | - phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x4007); | |
380 | + if (!is_mx6dqp()) { | |
381 | + phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x7); | |
382 | + phy_write(phydev, MDIO_DEVAD_NONE, 0xe, 0x8016); | |
383 | + phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x4007); | |
300 | 384 | |
301 | - val = phy_read(phydev, MDIO_DEVAD_NONE, 0xe); | |
302 | - val &= 0xffe3; | |
303 | - val |= 0x18; | |
304 | - phy_write(phydev, MDIO_DEVAD_NONE, 0xe, val); | |
385 | + val = phy_read(phydev, MDIO_DEVAD_NONE, 0xe); | |
386 | + val &= 0xffe3; | |
387 | + val |= 0x18; | |
388 | + phy_write(phydev, MDIO_DEVAD_NONE, 0xe, val); | |
389 | + } | |
305 | 390 | |
391 | + /* set the IO voltage to 1.8v */ | |
392 | + phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x1f); | |
393 | + phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x8); | |
394 | + | |
306 | 395 | /* introduce tx clock delay */ |
307 | 396 | phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x5); |
308 | 397 | val = phy_read(phydev, MDIO_DEVAD_NONE, 0x1e); |
... | ... | @@ -322,6 +411,227 @@ |
322 | 411 | return 0; |
323 | 412 | } |
324 | 413 | |
414 | +#if defined(CONFIG_MX6DL) && defined(CONFIG_MXC_EPDC) | |
415 | +vidinfo_t panel_info = { | |
416 | + .vl_refresh = 85, | |
417 | + .vl_col = 800, | |
418 | + .vl_row = 600, | |
419 | + .vl_pixclock = 26666667, | |
420 | + .vl_left_margin = 8, | |
421 | + .vl_right_margin = 100, | |
422 | + .vl_upper_margin = 4, | |
423 | + .vl_lower_margin = 8, | |
424 | + .vl_hsync = 4, | |
425 | + .vl_vsync = 1, | |
426 | + .vl_sync = 0, | |
427 | + .vl_mode = 0, | |
428 | + .vl_flag = 0, | |
429 | + .vl_bpix = 3, | |
430 | + .cmap = 0, | |
431 | +}; | |
432 | + | |
433 | +struct epdc_timing_params panel_timings = { | |
434 | + .vscan_holdoff = 4, | |
435 | + .sdoed_width = 10, | |
436 | + .sdoed_delay = 20, | |
437 | + .sdoez_width = 10, | |
438 | + .sdoez_delay = 20, | |
439 | + .gdclk_hp_offs = 419, | |
440 | + .gdsp_offs = 20, | |
441 | + .gdoe_offs = 0, | |
442 | + .gdclk_offs = 5, | |
443 | + .num_ce = 1, | |
444 | +}; | |
445 | + | |
446 | +static iomux_v3_cfg_t const epdc_pwr_ctrl_pads[] = { | |
447 | + IOMUX_PADS(PAD_EIM_A17__GPIO2_IO21 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
448 | + IOMUX_PADS(PAD_EIM_D17__GPIO3_IO17 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
449 | + IOMUX_PADS(PAD_EIM_D20__GPIO3_IO20 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
450 | + IOMUX_PADS(PAD_EIM_A18__GPIO2_IO20 | MUX_PAD_CTRL(EPDC_PAD_CTRL)), | |
451 | +}; | |
452 | + | |
453 | +struct gpio_desc epd_pwrstat_desc; | |
454 | +struct gpio_desc epd_vcom_desc; | |
455 | +struct gpio_desc epd_wakeup_desc; | |
456 | +struct gpio_desc epd_pwr_ctl0_desc; | |
457 | + | |
458 | +static void setup_epdc_power(void) | |
459 | +{ | |
460 | + int ret; | |
461 | + | |
462 | + SETUP_IOMUX_PADS(epdc_pwr_ctrl_pads); | |
463 | + | |
464 | + /* Setup epdc voltage */ | |
465 | + | |
466 | + /* EIM_A17 - GPIO2[21] for PWR_GOOD status */ | |
467 | + /* Set as input */ | |
468 | + ret = dm_gpio_lookup_name("GPIO2_21", &epd_pwrstat_desc); | |
469 | + if (ret) { | |
470 | + printf("%s lookup GPIO2_21 failed ret = %d\n", __func__, ret); | |
471 | + return; | |
472 | + } | |
473 | + | |
474 | + ret = dm_gpio_request(&epd_pwrstat_desc, "EPDC PWRSTAT"); | |
475 | + if (ret) { | |
476 | + printf("%s request EPDC PWRSTAT failed ret = %d\n", __func__, ret); | |
477 | + return; | |
478 | + } | |
479 | + | |
480 | + dm_gpio_set_dir_flags(&epd_pwrstat_desc, GPIOD_IS_IN); | |
481 | + | |
482 | + /* EIM_D17 - GPIO3[17] for VCOM control */ | |
483 | + /* Set as output */ | |
484 | + ret = dm_gpio_lookup_name("GPIO3_17", &epd_vcom_desc); | |
485 | + if (ret) { | |
486 | + printf("%s lookup GPIO3_17 failed ret = %d\n", __func__, ret); | |
487 | + return; | |
488 | + } | |
489 | + | |
490 | + ret = dm_gpio_request(&epd_vcom_desc, "EPDC VCOM0"); | |
491 | + if (ret) { | |
492 | + printf("%s request EPDC VCOM0 failed ret = %d\n", __func__, ret); | |
493 | + return; | |
494 | + } | |
495 | + | |
496 | + dm_gpio_set_dir_flags(&epd_vcom_desc, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); | |
497 | + | |
498 | + /* EIM_D20 - GPIO3[20] for EPD PMIC WAKEUP */ | |
499 | + /* Set as output */ | |
500 | + ret = dm_gpio_lookup_name("GPIO3_20", &epd_wakeup_desc); | |
501 | + if (ret) { | |
502 | + printf("%s lookup GPIO3_20 failed ret = %d\n", __func__, ret); | |
503 | + return; | |
504 | + } | |
505 | + | |
506 | + ret = dm_gpio_request(&epd_wakeup_desc, "EPDC PWR WAKEUP"); | |
507 | + if (ret) { | |
508 | + printf("%s request EPDC PWR WAKEUP failed ret = %d\n", __func__, ret); | |
509 | + return; | |
510 | + } | |
511 | + | |
512 | + dm_gpio_set_dir_flags(&epd_wakeup_desc, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); | |
513 | + | |
514 | + /* EIM_A18 - GPIO2[20] for EPD PWR CTL0 */ | |
515 | + /* Set as output */ | |
516 | + ret = dm_gpio_lookup_name("GPIO2_20", &epd_pwr_ctl0_desc); | |
517 | + if (ret) { | |
518 | + printf("%s lookup GPIO2_20 failed ret = %d\n", __func__, ret); | |
519 | + return; | |
520 | + } | |
521 | + | |
522 | + ret = dm_gpio_request(&epd_pwr_ctl0_desc, "EPDC PWR CTRL0"); | |
523 | + if (ret) { | |
524 | + printf("%s request EPDC PWR CTRL0 failed ret = %d\n", __func__, ret); | |
525 | + return; | |
526 | + } | |
527 | + | |
528 | + dm_gpio_set_dir_flags(&epd_pwr_ctl0_desc, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); | |
529 | +} | |
530 | + | |
531 | +static void epdc_enable_pins(void) | |
532 | +{ | |
533 | + /* epdc iomux settings */ | |
534 | + SETUP_IOMUX_PADS(epdc_enable_pads); | |
535 | +} | |
536 | + | |
537 | +static void epdc_disable_pins(void) | |
538 | +{ | |
539 | + /* Configure MUX settings for EPDC pins to GPIO */ | |
540 | + SETUP_IOMUX_PADS(epdc_disable_pads); | |
541 | +} | |
542 | + | |
543 | +static void setup_epdc(void) | |
544 | +{ | |
545 | + unsigned int reg; | |
546 | + struct mxc_ccm_reg *ccm_regs = (struct mxc_ccm_reg *)CCM_BASE_ADDR; | |
547 | + | |
548 | + /*** Set pixel clock rates for EPDC ***/ | |
549 | + | |
550 | + /* EPDC AXI clk (IPU2_CLK) from PFD_400M, set to 396/2 = 198MHz */ | |
551 | + reg = readl(&ccm_regs->cscdr3); | |
552 | + reg &= ~0x7C000; | |
553 | + reg |= (1 << 16) | (1 << 14); | |
554 | + writel(reg, &ccm_regs->cscdr3); | |
555 | + | |
556 | + /* EPDC AXI clk enable */ | |
557 | + reg = readl(&ccm_regs->CCGR3); | |
558 | + reg |= 0x00C0; | |
559 | + writel(reg, &ccm_regs->CCGR3); | |
560 | + | |
561 | + /* EPDC PIX clk (IPU2_DI1_CLK) from PLL5, set to 650/4/6 = ~27MHz */ | |
562 | + reg = readl(&ccm_regs->cscdr2); | |
563 | + reg &= ~0x3FE00; | |
564 | + reg |= (2 << 15) | (5 << 12); | |
565 | + writel(reg, &ccm_regs->cscdr2); | |
566 | + | |
567 | + /* PLL5 enable (defaults to 650) */ | |
568 | + reg = readl(&ccm_regs->analog_pll_video); | |
569 | + reg &= ~((1 << 16) | (1 << 12)); | |
570 | + reg |= (1 << 13); | |
571 | + writel(reg, &ccm_regs->analog_pll_video); | |
572 | + | |
573 | + /* EPDC PIX clk enable */ | |
574 | + reg = readl(&ccm_regs->CCGR3); | |
575 | + reg |= 0x0C00; | |
576 | + writel(reg, &ccm_regs->CCGR3); | |
577 | + | |
578 | + panel_info.epdc_data.wv_modes.mode_init = 0; | |
579 | + panel_info.epdc_data.wv_modes.mode_du = 1; | |
580 | + panel_info.epdc_data.wv_modes.mode_gc4 = 3; | |
581 | + panel_info.epdc_data.wv_modes.mode_gc8 = 2; | |
582 | + panel_info.epdc_data.wv_modes.mode_gc16 = 2; | |
583 | + panel_info.epdc_data.wv_modes.mode_gc32 = 2; | |
584 | + | |
585 | + panel_info.epdc_data.epdc_timings = panel_timings; | |
586 | + | |
587 | + setup_epdc_power(); | |
588 | +} | |
589 | + | |
590 | +void epdc_power_on(void) | |
591 | +{ | |
592 | + unsigned int reg; | |
593 | + struct gpio_regs *gpio_regs = (struct gpio_regs *)GPIO2_BASE_ADDR; | |
594 | + | |
595 | + /* Set EPD_PWR_CTL0 to high - enable EINK_VDD (3.15) */ | |
596 | + dm_gpio_set_value(&epd_pwr_ctl0_desc, 1); | |
597 | + udelay(1000); | |
598 | + | |
599 | + /* Enable epdc signal pin */ | |
600 | + epdc_enable_pins(); | |
601 | + | |
602 | + /* Set PMIC Wakeup to high - enable Display power */ | |
603 | + dm_gpio_set_value(&epd_wakeup_desc, 1); | |
604 | + | |
605 | + /* Wait for PWRGOOD == 1 */ | |
606 | + while (1) { | |
607 | + reg = readl(&gpio_regs->gpio_psr); | |
608 | + if (!(reg & (1 << 21))) | |
609 | + break; | |
610 | + | |
611 | + udelay(100); | |
612 | + } | |
613 | + | |
614 | + /* Enable VCOM */ | |
615 | + dm_gpio_set_value(&epd_vcom_desc, 1); | |
616 | + | |
617 | + udelay(500); | |
618 | +} | |
619 | + | |
620 | +void epdc_power_off(void) | |
621 | +{ | |
622 | + /* Set PMIC Wakeup to low - disable Display power */ | |
623 | + dm_gpio_set_value(&epd_wakeup_desc, 0); | |
624 | + | |
625 | + /* Disable VCOM */ | |
626 | + dm_gpio_set_value(&epd_vcom_desc, 0); | |
627 | + | |
628 | + epdc_disable_pins(); | |
629 | + | |
630 | + /* Set EPD_PWR_CTL0 to low - disable EINK_VDD (3.15) */ | |
631 | + dm_gpio_set_value(&epd_pwr_ctl0_desc, 0); | |
632 | +} | |
633 | +#endif | |
634 | + | |
325 | 635 | #if defined(CONFIG_VIDEO_IPUV3) |
326 | 636 | static void disable_lvds(struct display_info_t const *dev) |
327 | 637 | { |
... | ... | @@ -365,7 +675,7 @@ |
365 | 675 | .bus = -1, |
366 | 676 | .addr = 0, |
367 | 677 | .pixfmt = IPU_PIX_FMT_RGB24, |
368 | - .detect = detect_hdmi, | |
678 | + .detect = NULL, | |
369 | 679 | .enable = do_enable_hdmi, |
370 | 680 | .mode = { |
371 | 681 | .name = "HDMI", |
372 | 682 | |
373 | 683 | |
374 | 684 | |
... | ... | @@ -469,20 +779,46 @@ |
469 | 779 | return 1; |
470 | 780 | } |
471 | 781 | |
782 | +static void setup_fec(void) | |
783 | +{ | |
784 | + if (is_mx6dqp()) { | |
785 | + int ret; | |
786 | + | |
787 | + /* select ENET MAC0 TX clock from PLL */ | |
788 | + imx_iomux_set_gpr_register(5, 9, 1, 1); | |
789 | + ret = enable_fec_anatop_clock(0, ENET_125MHZ); | |
790 | + if (ret) | |
791 | + printf("Error fec anatop clock settings!\n"); | |
792 | + } | |
793 | +} | |
794 | + | |
472 | 795 | #ifdef CONFIG_USB_EHCI_MX6 |
473 | -static void setup_usb(void) | |
796 | +int board_ehci_hcd_init(int port) | |
474 | 797 | { |
475 | - /* | |
476 | - * set daisy chain for otg_pin_id on 6q. | |
477 | - * for 6dl, this bit is reserved | |
478 | - */ | |
479 | - imx_iomux_set_gpr_register(1, 13, 1, 0); | |
798 | + switch (port) { | |
799 | + case 0: | |
800 | + /* | |
801 | + * Set daisy chain for otg_pin_id on 6q. | |
802 | + * For 6dl, this bit is reserved. | |
803 | + */ | |
804 | + imx_iomux_set_gpr_register(1, 13, 1, 0); | |
805 | + break; | |
806 | + case 1: | |
807 | + break; | |
808 | + default: | |
809 | + printf("MXC USB port %d not yet supported\n", port); | |
810 | + return -EINVAL; | |
811 | + } | |
812 | + return 0; | |
480 | 813 | } |
481 | 814 | #endif |
482 | 815 | |
483 | 816 | int board_early_init_f(void) |
484 | 817 | { |
485 | 818 | setup_iomux_uart(); |
819 | +#if defined(CONFIG_VIDEO_IPUV3) | |
820 | + setup_display(); | |
821 | +#endif | |
486 | 822 | |
487 | 823 | return 0; |
488 | 824 | } |
489 | 825 | |
490 | 826 | |
491 | 827 | |
492 | 828 | |
493 | 829 | |
494 | 830 | |
495 | 831 | |
496 | 832 | |
497 | 833 | |
498 | 834 | |
499 | 835 | |
500 | 836 | |
501 | 837 | |
... | ... | @@ -495,56 +831,394 @@ |
495 | 831 | #ifdef CONFIG_MXC_SPI |
496 | 832 | setup_spi(); |
497 | 833 | #endif |
498 | - if (is_mx6dq() || is_mx6dqp()) | |
499 | - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info1); | |
500 | - else | |
501 | - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1); | |
502 | -#if defined(CONFIG_VIDEO_IPUV3) | |
503 | - setup_display(); | |
834 | + | |
835 | +#ifdef CONFIG_SYS_I2C_LEGACY | |
836 | + setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); | |
504 | 837 | #endif |
505 | -#ifdef CONFIG_USB_EHCI_MX6 | |
506 | - setup_usb(); | |
838 | + | |
839 | +#ifdef CONFIG_PCIE_IMX | |
840 | + setup_pcie(); | |
507 | 841 | #endif |
508 | 842 | |
843 | +#if defined(CONFIG_MX6DL) && defined(CONFIG_MXC_EPDC) | |
844 | + setup_epdc(); | |
845 | +#endif | |
846 | + | |
847 | +#ifdef CONFIG_SATA | |
848 | + setup_sata(); | |
849 | +#endif | |
850 | + | |
851 | +#ifdef CONFIG_FEC_MXC | |
852 | + setup_fec(); | |
853 | +#endif | |
854 | + | |
509 | 855 | return 0; |
510 | 856 | } |
511 | 857 | |
858 | +#ifdef CONFIG_POWER_LEGACY | |
512 | 859 | int power_init_board(void) |
513 | 860 | { |
514 | - struct pmic *p; | |
861 | + struct pmic *pfuze; | |
515 | 862 | unsigned int reg; |
516 | 863 | int ret; |
517 | 864 | |
518 | - p = pfuze_common_init(I2C_PMIC); | |
519 | - if (!p) | |
865 | + pfuze = pfuze_common_init(I2C_PMIC); | |
866 | + if (!pfuze) | |
520 | 867 | return -ENODEV; |
521 | 868 | |
522 | - ret = pfuze_mode_init(p, APS_PFM); | |
869 | + if (is_mx6dqp()) | |
870 | + ret = pfuze_mode_init(pfuze, APS_APS); | |
871 | + else | |
872 | + ret = pfuze_mode_init(pfuze, APS_PFM); | |
873 | + | |
523 | 874 | if (ret < 0) |
524 | 875 | return ret; |
876 | + /* VGEN3 and VGEN5 corrected on i.mx6qp board */ | |
877 | + if (!is_mx6dqp()) { | |
878 | + /* Increase VGEN3 from 2.5 to 2.8V */ | |
879 | + pmic_reg_read(pfuze, PFUZE100_VGEN3VOL, ®); | |
880 | + reg &= ~LDO_VOL_MASK; | |
881 | + reg |= LDOB_2_80V; | |
882 | + pmic_reg_write(pfuze, PFUZE100_VGEN3VOL, reg); | |
525 | 883 | |
526 | - /* Increase VGEN3 from 2.5 to 2.8V */ | |
527 | - pmic_reg_read(p, PFUZE100_VGEN3VOL, ®); | |
528 | - reg &= ~LDO_VOL_MASK; | |
529 | - reg |= LDOB_2_80V; | |
530 | - pmic_reg_write(p, PFUZE100_VGEN3VOL, reg); | |
884 | + /* Increase VGEN5 from 2.8 to 3V */ | |
885 | + pmic_reg_read(pfuze, PFUZE100_VGEN5VOL, ®); | |
886 | + reg &= ~LDO_VOL_MASK; | |
887 | + reg |= LDOB_3_00V; | |
888 | + pmic_reg_write(pfuze, PFUZE100_VGEN5VOL, reg); | |
889 | + } | |
531 | 890 | |
532 | - /* Increase VGEN5 from 2.8 to 3V */ | |
533 | - pmic_reg_read(p, PFUZE100_VGEN5VOL, ®); | |
534 | - reg &= ~LDO_VOL_MASK; | |
535 | - reg |= LDOB_3_00V; | |
536 | - pmic_reg_write(p, PFUZE100_VGEN5VOL, reg); | |
891 | + if (is_mx6dqp()) { | |
892 | + /* set SW1C staby volatage 1.075V*/ | |
893 | + pmic_reg_read(pfuze, PFUZE100_SW1CSTBY, ®); | |
894 | + reg &= ~0x3f; | |
895 | + reg |= 0x1f; | |
896 | + pmic_reg_write(pfuze, PFUZE100_SW1CSTBY, reg); | |
537 | 897 | |
898 | + /* set SW1C/VDDSOC step ramp up time to from 16us to 4us/25mV */ | |
899 | + pmic_reg_read(pfuze, PFUZE100_SW1CCONF, ®); | |
900 | + reg &= ~0xc0; | |
901 | + reg |= 0x40; | |
902 | + pmic_reg_write(pfuze, PFUZE100_SW1CCONF, reg); | |
903 | + | |
904 | + /* set SW2/VDDARM staby volatage 0.975V*/ | |
905 | + pmic_reg_read(pfuze, PFUZE100_SW2STBY, ®); | |
906 | + reg &= ~0x3f; | |
907 | + reg |= 0x17; | |
908 | + pmic_reg_write(pfuze, PFUZE100_SW2STBY, reg); | |
909 | + | |
910 | + /* set SW2/VDDARM step ramp up time to from 16us to 4us/25mV */ | |
911 | + pmic_reg_read(pfuze, PFUZE100_SW2CONF, ®); | |
912 | + reg &= ~0xc0; | |
913 | + reg |= 0x40; | |
914 | + pmic_reg_write(pfuze, PFUZE100_SW2CONF, reg); | |
915 | + } else { | |
916 | + /* set SW1AB staby volatage 0.975V*/ | |
917 | + pmic_reg_read(pfuze, PFUZE100_SW1ABSTBY, ®); | |
918 | + reg &= ~0x3f; | |
919 | + reg |= 0x1b; | |
920 | + pmic_reg_write(pfuze, PFUZE100_SW1ABSTBY, reg); | |
921 | + | |
922 | + /* set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */ | |
923 | + pmic_reg_read(pfuze, PFUZE100_SW1ABCONF, ®); | |
924 | + reg &= ~0xc0; | |
925 | + reg |= 0x40; | |
926 | + pmic_reg_write(pfuze, PFUZE100_SW1ABCONF, reg); | |
927 | + | |
928 | + /* set SW1C staby volatage 0.975V*/ | |
929 | + pmic_reg_read(pfuze, PFUZE100_SW1CSTBY, ®); | |
930 | + reg &= ~0x3f; | |
931 | + reg |= 0x1b; | |
932 | + pmic_reg_write(pfuze, PFUZE100_SW1CSTBY, reg); | |
933 | + | |
934 | + /* set SW1C/VDDSOC step ramp up time to from 16us to 4us/25mV */ | |
935 | + pmic_reg_read(pfuze, PFUZE100_SW1CCONF, ®); | |
936 | + reg &= ~0xc0; | |
937 | + reg |= 0x40; | |
938 | + pmic_reg_write(pfuze, PFUZE100_SW1CCONF, reg); | |
939 | + } | |
940 | + | |
538 | 941 | return 0; |
539 | 942 | } |
540 | 943 | |
541 | -#ifdef CONFIG_MXC_SPI | |
542 | -int board_spi_cs_gpio(unsigned bus, unsigned cs) | |
944 | +#elif defined(CONFIG_DM_PMIC_PFUZE100) | |
945 | +int power_init_board(void) | |
543 | 946 | { |
544 | - return (bus == 0 && cs == 0) ? (IMX_GPIO_NR(4, 9)) : -1; | |
947 | + struct udevice *dev; | |
948 | + unsigned int reg; | |
949 | + int ret; | |
950 | + | |
951 | + dev = pfuze_common_init(); | |
952 | + if (!dev) | |
953 | + return -ENODEV; | |
954 | + | |
955 | + if (is_mx6dqp()) | |
956 | + ret = pfuze_mode_init(dev, APS_APS); | |
957 | + else | |
958 | + ret = pfuze_mode_init(dev, APS_PFM); | |
959 | + if (ret < 0) | |
960 | + return ret; | |
961 | + | |
962 | + /* VGEN3 and VGEN5 corrected on i.mx6qp board */ | |
963 | + if (!is_mx6dqp()) { | |
964 | + /* Increase VGEN3 from 2.5 to 2.8V */ | |
965 | + reg = pmic_reg_read(dev, PFUZE100_VGEN3VOL); | |
966 | + reg &= ~LDO_VOL_MASK; | |
967 | + reg |= LDOB_2_80V; | |
968 | + pmic_reg_write(dev, PFUZE100_VGEN3VOL, reg); | |
969 | + | |
970 | + /* Increase VGEN5 from 2.8 to 3V */ | |
971 | + reg = pmic_reg_read(dev, PFUZE100_VGEN5VOL); | |
972 | + reg &= ~LDO_VOL_MASK; | |
973 | + reg |= LDOB_3_00V; | |
974 | + pmic_reg_write(dev, PFUZE100_VGEN5VOL, reg); | |
975 | + } | |
976 | + | |
977 | + if (is_mx6dqp()) { | |
978 | + /* set SW1C staby volatage 1.075V*/ | |
979 | + reg = pmic_reg_read(dev, PFUZE100_SW1CSTBY); | |
980 | + reg &= ~0x3f; | |
981 | + reg |= 0x1f; | |
982 | + pmic_reg_write(dev, PFUZE100_SW1CSTBY, reg); | |
983 | + | |
984 | + /* set SW1C/VDDSOC step ramp up time to from 16us to 4us/25mV */ | |
985 | + reg = pmic_reg_read(dev, PFUZE100_SW1CCONF); | |
986 | + reg &= ~0xc0; | |
987 | + reg |= 0x40; | |
988 | + pmic_reg_write(dev, PFUZE100_SW1CCONF, reg); | |
989 | + | |
990 | + /* set SW2/VDDARM staby volatage 0.975V*/ | |
991 | + reg = pmic_reg_read(dev, PFUZE100_SW2STBY); | |
992 | + reg &= ~0x3f; | |
993 | + reg |= 0x17; | |
994 | + pmic_reg_write(dev, PFUZE100_SW2STBY, reg); | |
995 | + | |
996 | + /* set SW2/VDDARM step ramp up time to from 16us to 4us/25mV */ | |
997 | + reg = pmic_reg_read(dev, PFUZE100_SW2CONF); | |
998 | + reg &= ~0xc0; | |
999 | + reg |= 0x40; | |
1000 | + pmic_reg_write(dev, PFUZE100_SW2CONF, reg); | |
1001 | + } else { | |
1002 | + /* set SW1AB staby volatage 0.975V*/ | |
1003 | + reg = pmic_reg_read(dev, PFUZE100_SW1ABSTBY); | |
1004 | + reg &= ~0x3f; | |
1005 | + reg |= 0x1b; | |
1006 | + pmic_reg_write(dev, PFUZE100_SW1ABSTBY, reg); | |
1007 | + | |
1008 | + /* set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */ | |
1009 | + reg = pmic_reg_read(dev, PFUZE100_SW1ABCONF); | |
1010 | + reg &= ~0xc0; | |
1011 | + reg |= 0x40; | |
1012 | + pmic_reg_write(dev, PFUZE100_SW1ABCONF, reg); | |
1013 | + | |
1014 | + /* set SW1C staby volatage 0.975V*/ | |
1015 | + reg = pmic_reg_read(dev, PFUZE100_SW1CSTBY); | |
1016 | + reg &= ~0x3f; | |
1017 | + reg |= 0x1b; | |
1018 | + pmic_reg_write(dev, PFUZE100_SW1CSTBY, reg); | |
1019 | + | |
1020 | + /* set SW1C/VDDSOC step ramp up time to from 16us to 4us/25mV */ | |
1021 | + reg = pmic_reg_read(dev, PFUZE100_SW1CCONF); | |
1022 | + reg &= ~0xc0; | |
1023 | + reg |= 0x40; | |
1024 | + pmic_reg_write(dev, PFUZE100_SW1CCONF, reg); | |
1025 | + } | |
1026 | + | |
1027 | + return 0; | |
545 | 1028 | } |
546 | 1029 | #endif |
547 | 1030 | |
1031 | +#ifdef CONFIG_LDO_BYPASS_CHECK | |
1032 | +#ifdef CONFIG_POWER_LEGACY | |
1033 | +void ldo_mode_set(int ldo_bypass) | |
1034 | +{ | |
1035 | + unsigned int value; | |
1036 | + int is_400M; | |
1037 | + unsigned char vddarm; | |
1038 | + struct pmic *p = pmic_get("PFUZE100"); | |
1039 | + | |
1040 | + if (!p) { | |
1041 | + printf("No PMIC found!\n"); | |
1042 | + return; | |
1043 | + } | |
1044 | + | |
1045 | + /* increase VDDARM/VDDSOC to support 1.2G chip */ | |
1046 | + if (check_1_2G()) { | |
1047 | + ldo_bypass = 0; /* ldo_enable on 1.2G chip */ | |
1048 | + printf("1.2G chip, increase VDDARM_IN/VDDSOC_IN\n"); | |
1049 | + if (is_mx6dqp()) { | |
1050 | + /* increase VDDARM to 1.425V */ | |
1051 | + pmic_reg_read(p, PFUZE100_SW2VOL, &value); | |
1052 | + value &= ~0x3f; | |
1053 | + value |= 0x29; | |
1054 | + pmic_reg_write(p, PFUZE100_SW2VOL, value); | |
1055 | + } else { | |
1056 | + /* increase VDDARM to 1.425V */ | |
1057 | + pmic_reg_read(p, PFUZE100_SW1ABVOL, &value); | |
1058 | + value &= ~0x3f; | |
1059 | + value |= 0x2d; | |
1060 | + pmic_reg_write(p, PFUZE100_SW1ABVOL, value); | |
1061 | + } | |
1062 | + /* increase VDDSOC to 1.425V */ | |
1063 | + pmic_reg_read(p, PFUZE100_SW1CVOL, &value); | |
1064 | + value &= ~0x3f; | |
1065 | + value |= 0x2d; | |
1066 | + pmic_reg_write(p, PFUZE100_SW1CVOL, value); | |
1067 | + } | |
1068 | + /* switch to ldo_bypass mode , boot on 800Mhz */ | |
1069 | + if (ldo_bypass) { | |
1070 | + prep_anatop_bypass(); | |
1071 | + if (is_mx6dqp()) { | |
1072 | + /* decrease VDDARM for 400Mhz DQP:1.1V*/ | |
1073 | + pmic_reg_read(p, PFUZE100_SW2VOL, &value); | |
1074 | + value &= ~0x3f; | |
1075 | + value |= 0x1c; | |
1076 | + pmic_reg_write(p, PFUZE100_SW2VOL, value); | |
1077 | + } else { | |
1078 | + /* decrease VDDARM for 400Mhz DQ:1.1V, DL:1.275V */ | |
1079 | + pmic_reg_read(p, PFUZE100_SW1ABVOL, &value); | |
1080 | + value &= ~0x3f; | |
1081 | + if (is_mx6dl()) | |
1082 | + value |= 0x27; | |
1083 | + else | |
1084 | + value |= 0x20; | |
1085 | + | |
1086 | + pmic_reg_write(p, PFUZE100_SW1ABVOL, value); | |
1087 | + } | |
1088 | + /* increase VDDSOC to 1.3V */ | |
1089 | + pmic_reg_read(p, PFUZE100_SW1CVOL, &value); | |
1090 | + value &= ~0x3f; | |
1091 | + value |= 0x28; | |
1092 | + pmic_reg_write(p, PFUZE100_SW1CVOL, value); | |
1093 | + | |
1094 | + /* | |
1095 | + * MX6Q/DQP: | |
1096 | + * VDDARM:1.15V@800M; VDDSOC:1.175V@800M | |
1097 | + * VDDARM:0.975V@400M; VDDSOC:1.175V@400M | |
1098 | + * MX6DL: | |
1099 | + * VDDARM:1.175V@800M; VDDSOC:1.175V@800M | |
1100 | + * VDDARM:1.15V@400M; VDDSOC:1.175V@400M | |
1101 | + */ | |
1102 | + is_400M = set_anatop_bypass(2); | |
1103 | + if (is_mx6dqp()) { | |
1104 | + pmic_reg_read(p, PFUZE100_SW2VOL, &value); | |
1105 | + value &= ~0x3f; | |
1106 | + if (is_400M) | |
1107 | + value |= 0x17; | |
1108 | + else | |
1109 | + value |= 0x1e; | |
1110 | + pmic_reg_write(p, PFUZE100_SW2VOL, value); | |
1111 | + } | |
1112 | + | |
1113 | + if (is_400M) { | |
1114 | + if (is_mx6dl()) | |
1115 | + vddarm = 0x22; | |
1116 | + else | |
1117 | + vddarm = 0x1b; | |
1118 | + } else { | |
1119 | + if (is_mx6dl()) | |
1120 | + vddarm = 0x23; | |
1121 | + else | |
1122 | + vddarm = 0x22; | |
1123 | + } | |
1124 | + pmic_reg_read(p, PFUZE100_SW1ABVOL, &value); | |
1125 | + value &= ~0x3f; | |
1126 | + value |= vddarm; | |
1127 | + pmic_reg_write(p, PFUZE100_SW1ABVOL, value); | |
1128 | + | |
1129 | + /* decrease VDDSOC to 1.175V */ | |
1130 | + pmic_reg_read(p, PFUZE100_SW1CVOL, &value); | |
1131 | + value &= ~0x3f; | |
1132 | + value |= 0x23; | |
1133 | + pmic_reg_write(p, PFUZE100_SW1CVOL, value); | |
1134 | + | |
1135 | + finish_anatop_bypass(); | |
1136 | + printf("switch to ldo_bypass mode!\n"); | |
1137 | + } | |
1138 | +} | |
1139 | +#elif defined(CONFIG_DM_PMIC_PFUZE100) | |
1140 | +void ldo_mode_set(int ldo_bypass) | |
1141 | +{ | |
1142 | + int is_400M; | |
1143 | + unsigned char vddarm; | |
1144 | + struct udevice *dev; | |
1145 | + int ret; | |
1146 | + | |
1147 | + ret = pmic_get("pfuze100@8", &dev); | |
1148 | + if (ret == -ENODEV) { | |
1149 | + printf("No PMIC found!\n"); | |
1150 | + return; | |
1151 | + } | |
1152 | + | |
1153 | + /* increase VDDARM/VDDSOC to support 1.2G chip */ | |
1154 | + if (check_1_2G()) { | |
1155 | + ldo_bypass = 0; /* ldo_enable on 1.2G chip */ | |
1156 | + printf("1.2G chip, increase VDDARM_IN/VDDSOC_IN\n"); | |
1157 | + if (is_mx6dqp()) { | |
1158 | + /* increase VDDARM to 1.425V */ | |
1159 | + pmic_clrsetbits(dev, PFUZE100_SW2VOL, 0x3f, 0x29); | |
1160 | + } else { | |
1161 | + /* increase VDDARM to 1.425V */ | |
1162 | + pmic_clrsetbits(dev, PFUZE100_SW1ABVOL, 0x3f, 0x2d); | |
1163 | + } | |
1164 | + /* increase VDDSOC to 1.425V */ | |
1165 | + pmic_clrsetbits(dev, PFUZE100_SW1CVOL, 0x3f, 0x2d); | |
1166 | + } | |
1167 | + /* switch to ldo_bypass mode , boot on 800Mhz */ | |
1168 | + if (ldo_bypass) { | |
1169 | + prep_anatop_bypass(); | |
1170 | + if (is_mx6dqp()) { | |
1171 | + /* decrease VDDARM for 400Mhz DQP:1.1V*/ | |
1172 | + pmic_clrsetbits(dev, PFUZE100_SW2VOL, 0x3f, 0x1c); | |
1173 | + } else { | |
1174 | + /* decrease VDDARM for 400Mhz DQ:1.1V, DL:1.275V */ | |
1175 | + if (is_mx6dl()) | |
1176 | + pmic_clrsetbits(dev, PFUZE100_SW1ABVOL, 0x3f, 0x27); | |
1177 | + else | |
1178 | + pmic_clrsetbits(dev, PFUZE100_SW1ABVOL, 0x3f, 0x20); | |
1179 | + } | |
1180 | + /* increase VDDSOC to 1.3V */ | |
1181 | + pmic_clrsetbits(dev, PFUZE100_SW1CVOL, 0x3f, 0x28); | |
1182 | + | |
1183 | + /* | |
1184 | + * MX6Q/DQP: | |
1185 | + * VDDARM:1.15V@800M; VDDSOC:1.175V@800M | |
1186 | + * VDDARM:0.975V@400M; VDDSOC:1.175V@400M | |
1187 | + * MX6DL: | |
1188 | + * VDDARM:1.175V@800M; VDDSOC:1.175V@800M | |
1189 | + * VDDARM:1.15V@400M; VDDSOC:1.175V@400M | |
1190 | + */ | |
1191 | + is_400M = set_anatop_bypass(2); | |
1192 | + if (is_mx6dqp()) { | |
1193 | + if (is_400M) | |
1194 | + pmic_clrsetbits(dev, PFUZE100_SW2VOL, 0x3f, 0x17); | |
1195 | + else | |
1196 | + pmic_clrsetbits(dev, PFUZE100_SW2VOL, 0x3f, 0x1e); | |
1197 | + } | |
1198 | + | |
1199 | + if (is_400M) { | |
1200 | + if (is_mx6dl()) | |
1201 | + vddarm = 0x22; | |
1202 | + else | |
1203 | + vddarm = 0x1b; | |
1204 | + } else { | |
1205 | + if (is_mx6dl()) | |
1206 | + vddarm = 0x23; | |
1207 | + else | |
1208 | + vddarm = 0x22; | |
1209 | + } | |
1210 | + pmic_clrsetbits(dev, PFUZE100_SW1ABVOL, 0x3f, vddarm); | |
1211 | + | |
1212 | + /* decrease VDDSOC to 1.175V */ | |
1213 | + pmic_clrsetbits(dev, PFUZE100_SW1CVOL, 0x3f, 0x23); | |
1214 | + | |
1215 | + finish_anatop_bypass(); | |
1216 | + printf("switch to ldo_bypass mode!\n"); | |
1217 | + } | |
1218 | +} | |
1219 | +#endif | |
1220 | +#endif | |
1221 | + | |
548 | 1222 | #ifdef CONFIG_CMD_BMODE |
549 | 1223 | static const struct boot_mode board_boot_modes[] = { |
550 | 1224 | /* 4 bit bus width */ |
... | ... | @@ -575,6 +1249,49 @@ |
575 | 1249 | |
576 | 1250 | return 0; |
577 | 1251 | } |
1252 | + | |
1253 | +#ifdef CONFIG_FSL_FASTBOOT | |
1254 | +#ifdef CONFIG_ANDROID_RECOVERY | |
1255 | + | |
1256 | +#define GPIO_VOL_DN_KEY IMX_GPIO_NR(1, 5) | |
1257 | +iomux_v3_cfg_t const recovery_key_pads[] = { | |
1258 | + IOMUX_PADS(PAD_GPIO_5__GPIO1_IO05 | MUX_PAD_CTRL(NO_PAD_CTRL)), | |
1259 | +}; | |
1260 | + | |
1261 | +int is_recovery_key_pressing(void) | |
1262 | +{ | |
1263 | + int button_pressed = 0; | |
1264 | + int ret; | |
1265 | + struct gpio_desc desc; | |
1266 | + | |
1267 | + /* Check Recovery Combo Button press or not. */ | |
1268 | + SETUP_IOMUX_PADS(recovery_key_pads); | |
1269 | + | |
1270 | + ret = dm_gpio_lookup_name("GPIO1_5", &desc); | |
1271 | + if (ret) { | |
1272 | + printf("%s lookup GPIO1_5 failed ret = %d\n", __func__, ret); | |
1273 | + return; | |
1274 | + } | |
1275 | + | |
1276 | + ret = dm_gpio_request(&desc, "volume_dn_key"); | |
1277 | + if (ret) { | |
1278 | + printf("%s request volume_dn_key failed ret = %d\n", __func__, ret); | |
1279 | + return; | |
1280 | + } | |
1281 | + | |
1282 | + dm_gpio_set_dir_flags(&desc, GPIOD_IS_IN); | |
1283 | + | |
1284 | + if (dm_gpio_get_value(&desc) == 0) { /* VOL_DN key is low assert */ | |
1285 | + button_pressed = 1; | |
1286 | + printf("Recovery key pressed\n"); | |
1287 | + } | |
1288 | + | |
1289 | + return button_pressed; | |
1290 | +} | |
1291 | + | |
1292 | +#endif /*CONFIG_ANDROID_RECOVERY*/ | |
1293 | + | |
1294 | +#endif /*CONFIG_FSL_FASTBOOT*/ | |
578 | 1295 | |
579 | 1296 | #ifdef CONFIG_SPL_BUILD |
580 | 1297 | #include <asm/arch/mx6-ddr.h> |
board/freescale/mx6sabresd/mx6solo_4x_mt41j128.cfg
1 | +/* | |
2 | + * Copyright (C) 2014-2016 Freescale Semiconductor, Inc. | |
3 | + * Copyright 2017 NXP | |
4 | + * Jason Liu <r64343@freescale.com> | |
5 | + * | |
6 | + * SPDX-License-Identifier: GPL-2.0+ | |
7 | + * | |
8 | + * Refer docs/README.imxmage for more details about how-to configure | |
9 | + * and create imximage boot image | |
10 | + * | |
11 | + * The syntax is taken as close as possible with the kwbimage | |
12 | + */ | |
13 | + | |
14 | +#include <config.h> | |
15 | + | |
16 | +/* image version */ | |
17 | +IMAGE_VERSION 2 | |
18 | + | |
19 | +/* | |
20 | + * Boot Device : one of | |
21 | + * spi, sd (the board has no nand neither onenand) | |
22 | + */ | |
23 | +BOOT_FROM sd | |
24 | + | |
25 | +#ifdef CONFIG_USE_IMXIMG_PLUGIN | |
26 | +/*PLUGIN plugin-binary-file IRAM_FREE_START_ADDR*/ | |
27 | +PLUGIN board/freescale/mx6sabresd/plugin.bin 0x00907000 | |
28 | +#else | |
29 | + | |
30 | +#ifdef CONFIG_IMX_HAB | |
31 | +CSF CONFIG_CSF_SIZE | |
32 | +#endif | |
33 | + | |
34 | +/* | |
35 | + * Device Configuration Data (DCD) | |
36 | + * | |
37 | + * Each entry must have the format: | |
38 | + * Addr-type Address Value | |
39 | + * | |
40 | + * where: | |
41 | + * Addr-type register length (1,2 or 4 bytes) | |
42 | + * Address absolute address of the register | |
43 | + * value value to be stored in the register | |
44 | + */ | |
45 | +DATA 4, 0x020e0774, 0x000C0000 | |
46 | +DATA 4, 0x020e0754, 0x00000000 | |
47 | +DATA 4, 0x020e04ac, 0x00000030 | |
48 | +DATA 4, 0x020e04b0, 0x00000030 | |
49 | +DATA 4, 0x020e0464, 0x00000030 | |
50 | +DATA 4, 0x020e0490, 0x00000030 | |
51 | +DATA 4, 0x020e074c, 0x00000030 | |
52 | +DATA 4, 0x020e0494, 0x00000030 | |
53 | +DATA 4, 0x020e04a0, 0x00000000 | |
54 | +DATA 4, 0x020e04b4, 0x00000030 | |
55 | +DATA 4, 0x020e04b8, 0x00000030 | |
56 | +DATA 4, 0x020e076c, 0x00000030 | |
57 | +DATA 4, 0x020e0750, 0x00020000 | |
58 | +DATA 4, 0x020e04bc, 0x00000030 | |
59 | +DATA 4, 0x020e04c0, 0x00000030 | |
60 | +DATA 4, 0x020e04c4, 0x00000030 | |
61 | +DATA 4, 0x020e04c8, 0x00000030 | |
62 | +DATA 4, 0x020e0760, 0x00020000 | |
63 | +DATA 4, 0x020e0764, 0x00000030 | |
64 | +DATA 4, 0x020e0770, 0x00000030 | |
65 | +DATA 4, 0x020e0778, 0x00000030 | |
66 | +DATA 4, 0x020e077c, 0x00000030 | |
67 | +DATA 4, 0x020e0470, 0x00000030 | |
68 | +DATA 4, 0x020e0474, 0x00000030 | |
69 | +DATA 4, 0x020e0478, 0x00000030 | |
70 | +DATA 4, 0x020e047c, 0x00000030 | |
71 | +DATA 4, 0x021b0800, 0xa1390003 | |
72 | +DATA 4, 0x021b080c, 0x001F001F | |
73 | +DATA 4, 0x021b0810, 0x001F001F | |
74 | +DATA 4, 0x021b083c, 0x42190219 | |
75 | +DATA 4, 0x021b0840, 0x017B0177 | |
76 | +DATA 4, 0x021b0848, 0x4B4D4E4D | |
77 | +DATA 4, 0x021b0850, 0x3F3E2D36 | |
78 | +DATA 4, 0x021b081c, 0x33333333 | |
79 | +DATA 4, 0x021b0820, 0x33333333 | |
80 | +DATA 4, 0x021b0824, 0x33333333 | |
81 | +DATA 4, 0x021b0828, 0x33333333 | |
82 | +DATA 4, 0x021b08b8, 0x00000800 | |
83 | +DATA 4, 0x021b0004, 0x0002002D | |
84 | +DATA 4, 0x021b0008, 0x00333030 | |
85 | +DATA 4, 0x021b000c, 0x3F435313 | |
86 | +DATA 4, 0x021b0010, 0xB66E8B63 | |
87 | +DATA 4, 0x021b0014, 0x01FF00DB | |
88 | +DATA 4, 0x021b0018, 0x00001740 | |
89 | +DATA 4, 0x021b001c, 0x00008000 | |
90 | +DATA 4, 0x021b002c, 0x000026d2 | |
91 | +DATA 4, 0x021b0030, 0x00431023 | |
92 | +DATA 4, 0x021b0040, 0x00000017 | |
93 | +DATA 4, 0x021b0000, 0x83190000 | |
94 | +DATA 4, 0x021b001c, 0x04008032 | |
95 | +DATA 4, 0x021b001c, 0x00008033 | |
96 | +DATA 4, 0x021b001c, 0x00048031 | |
97 | +DATA 4, 0x021b001c, 0x05208030 | |
98 | +DATA 4, 0x021b001c, 0x04008040 | |
99 | +DATA 4, 0x021b0020, 0x00005800 | |
100 | +DATA 4, 0x021b0818, 0x00011117 | |
101 | +DATA 4, 0x021b0004, 0x0002556D | |
102 | +DATA 4, 0x021b0404, 0x00011006 | |
103 | +DATA 4, 0x021b001c, 0x00000000 | |
104 | + | |
105 | +/* set the default clock gate to save power */ | |
106 | +DATA 4, 0x020c4068, 0x00C03F3F | |
107 | +DATA 4, 0x020c406c, 0x0030FC03 | |
108 | +DATA 4, 0x020c4070, 0x0FFFF000 | |
109 | +DATA 4, 0x020c4074, 0x3FF00000 | |
110 | +DATA 4, 0x020c4078, 0x00FFF300 | |
111 | +DATA 4, 0x020c407c, 0x0F0000C3 | |
112 | +DATA 4, 0x020c4080, 0x000003FF | |
113 | + | |
114 | +/* enable AXI cache for VDOA/VPU/IPU */ | |
115 | +DATA 4, 0x020e0010, 0xF00000CF | |
116 | +/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ | |
117 | +DATA 4, 0x020e0018, 0x007F007F | |
118 | +DATA 4, 0x020e001c, 0x007F007F | |
119 | +#endif |
board/freescale/mx6sabresd/plugin.S
1 | +/* | |
2 | + * Copyright (C) 2012-2016 Freescale Semiconductor, Inc. | |
3 | + * Copyright 2017 NXP | |
4 | + * | |
5 | + * SPDX-License-Identifier: GPL-2.0+ | |
6 | + */ | |
7 | + | |
8 | +#include <config.h> | |
9 | + | |
10 | +/* DDR script */ | |
11 | +.macro imx6dqpsabresd_ddr_setting | |
12 | + ldr r0, =IOMUXC_BASE_ADDR | |
13 | + ldr r1, =0x000c0000 | |
14 | + str r1, [r0, #0x798] | |
15 | + ldr r1, =0x00000000 | |
16 | + str r1, [r0, #0x758] | |
17 | + | |
18 | + ldr r1, =0x00000030 | |
19 | + str r1, [r0, #0x588] | |
20 | + str r1, [r0, #0x594] | |
21 | + str r1, [r0, #0x56c] | |
22 | + str r1, [r0, #0x578] | |
23 | + str r1, [r0, #0x74c] | |
24 | + str r1, [r0, #0x57c] | |
25 | + | |
26 | + ldr r1, =0x00000000 | |
27 | + str r1, [r0, #0x58c] | |
28 | + | |
29 | + ldr r1, =0x00000030 | |
30 | + str r1, [r0, #0x59c] | |
31 | + str r1, [r0, #0x5a0] | |
32 | + str r1, [r0, #0x78c] | |
33 | + | |
34 | + ldr r1, =0x00020000 | |
35 | + str r1, [r0, #0x750] | |
36 | + | |
37 | + ldr r1, =0x00000030 | |
38 | + str r1, [r0, #0x5a8] | |
39 | + str r1, [r0, #0x5b0] | |
40 | + str r1, [r0, #0x524] | |
41 | + str r1, [r0, #0x51c] | |
42 | + str r1, [r0, #0x518] | |
43 | + str r1, [r0, #0x50c] | |
44 | + str r1, [r0, #0x5b8] | |
45 | + str r1, [r0, #0x5c0] | |
46 | + | |
47 | + ldr r1, =0x00018200 | |
48 | + str r1, [r0, #0x534] | |
49 | + ldr r1, =0x00008000 | |
50 | + str r1, [r0, #0x538] | |
51 | + ldr r1, =0x00018200 | |
52 | + str r1, [r0, #0x53c] | |
53 | + str r1, [r0, #0x540] | |
54 | + str r1, [r0, #0x544] | |
55 | + str r1, [r0, #0x548] | |
56 | + str r1, [r0, #0x54c] | |
57 | + str r1, [r0, #0x550] | |
58 | + | |
59 | + ldr r1, =0x00020000 | |
60 | + str r1, [r0, #0x774] | |
61 | + | |
62 | + ldr r1, =0x00000030 | |
63 | + str r1, [r0, #0x784] | |
64 | + str r1, [r0, #0x788] | |
65 | + str r1, [r0, #0x794] | |
66 | + str r1, [r0, #0x79c] | |
67 | + str r1, [r0, #0x7a0] | |
68 | + str r1, [r0, #0x7a4] | |
69 | + str r1, [r0, #0x7a8] | |
70 | + str r1, [r0, #0x748] | |
71 | + str r1, [r0, #0x5ac] | |
72 | + str r1, [r0, #0x5b4] | |
73 | + str r1, [r0, #0x528] | |
74 | + str r1, [r0, #0x520] | |
75 | + str r1, [r0, #0x514] | |
76 | + str r1, [r0, #0x510] | |
77 | + str r1, [r0, #0x5bc] | |
78 | + str r1, [r0, #0x5c4] | |
79 | + | |
80 | + ldr r0, =MMDC_P0_BASE_ADDR | |
81 | + ldr r2, =0xa1390003 | |
82 | + str r2, [r0, #0x800] | |
83 | + | |
84 | + ldr r2, =0x001b001e | |
85 | + str r2, [r0, #0x80c] | |
86 | + ldr r2, =0x002e0029 | |
87 | + str r2, [r0, #0x810] | |
88 | + | |
89 | + ldr r1, =MMDC_P1_BASE_ADDR | |
90 | + ldr r2, =0x001b002a | |
91 | + str r2, [r1, #0x80c] | |
92 | + ldr r2, =0x0019002c | |
93 | + str r2, [r1, #0x810] | |
94 | + | |
95 | + ldr r2, =0x43240334 | |
96 | + str r2, [r0, #0x83c] | |
97 | + ldr r2, =0x0324031a | |
98 | + str r2, [r0, #0x840] | |
99 | + | |
100 | + ldr r2, =0x43340344 | |
101 | + str r2, [r1, #0x83c] | |
102 | + ldr r2, =0x03280276 | |
103 | + str r2, [r1, #0x840] | |
104 | + | |
105 | + ldr r2, =0x44383A3E | |
106 | + str r2, [r0, #0x848] | |
107 | + ldr r2, =0x3C3C3846 | |
108 | + str r2, [r1, #0x848] | |
109 | + | |
110 | + ldr r2, =0x2e303230 | |
111 | + str r2, [r0, #0x850] | |
112 | + ldr r2, =0x38283E34 | |
113 | + str r2, [r1, #0x850] | |
114 | + | |
115 | + ldr r2, =0x33333333 | |
116 | + str r2, [r0, #0x81c] | |
117 | + str r2, [r0, #0x820] | |
118 | + str r2, [r0, #0x824] | |
119 | + str r2, [r0, #0x828] | |
120 | + str r2, [r1, #0x81c] | |
121 | + str r2, [r1, #0x820] | |
122 | + str r2, [r1, #0x824] | |
123 | + str r2, [r1, #0x828] | |
124 | + | |
125 | + ldr r2, =0x24912489 | |
126 | + str r2, [r0, #0x8c0] | |
127 | + ldr r2, =0x24914452 | |
128 | + str r2, [r1, #0x8c0] | |
129 | + | |
130 | + ldr r2, =0x00000800 | |
131 | + str r2, [r0, #0x8b8] | |
132 | + str r2, [r1, #0x8b8] | |
133 | + | |
134 | + ldr r2, =0x00020036 | |
135 | + str r2, [r0, #0x004] | |
136 | + ldr r2, =0x24444040 | |
137 | + str r2, [r0, #0x008] | |
138 | + | |
139 | + ldr r2, =0x555A7955 | |
140 | + str r2, [r0, #0x00c] | |
141 | + ldr r2, =0xFF320F64 | |
142 | + str r2, [r0, #0x010] | |
143 | + | |
144 | + ldr r2, =0x01FF00DB | |
145 | + str r2, [r0, #0x014] | |
146 | + ldr r2, =0x00011740 | |
147 | + str r2, [r0, #0x018] | |
148 | + | |
149 | + ldr r2, =0x00008000 | |
150 | + str r2, [r0, #0x01c] | |
151 | + ldr r2, =0x000026d2 | |
152 | + str r2, [r0, #0x02c] | |
153 | + ldr r2, =0x005A1023 | |
154 | + str r2, [r0, #0x030] | |
155 | + ldr r2, =0x00000027 | |
156 | + str r2, [r0, #0x040] | |
157 | + | |
158 | + ldr r2, =0x14420000 | |
159 | + str r2, [r0, #0x400] | |
160 | + | |
161 | + ldr r2, =0x831A0000 | |
162 | + str r2, [r0, #0x000] | |
163 | + | |
164 | + ldr r2, =0x00400C58 | |
165 | + str r2, [r0, #0x890] | |
166 | + | |
167 | + ldr r3, =0x00bb0000 | |
168 | + ldr r2, =0x00000000 | |
169 | + str r2, [r3, #0x008] | |
170 | + ldr r2, =0x2891E41A | |
171 | + str r2, [r3, #0x00C] | |
172 | + ldr r2, =0x00000564 | |
173 | + str r2, [r3, #0x038] | |
174 | + ldr r2, =0x00000040 | |
175 | + str r2, [r3, #0x014] | |
176 | + ldr r2, =0x00000020 | |
177 | + str r2, [r3, #0x028] | |
178 | + ldr r2, =0x00000020 | |
179 | + str r2, [r3, #0x02c] | |
180 | + | |
181 | + ldr r2, =0x04088032 | |
182 | + str r2, [r0, #0x01c] | |
183 | + ldr r2, =0x00008033 | |
184 | + str r2, [r0, #0x01c] | |
185 | + ldr r2, =0x00048031 | |
186 | + str r2, [r0, #0x01c] | |
187 | + ldr r2, =0x09408030 | |
188 | + str r2, [r0, #0x01c] | |
189 | + ldr r2, =0x04008040 | |
190 | + str r2, [r0, #0x01c] | |
191 | + | |
192 | + ldr r2, =0x00005800 | |
193 | + str r2, [r0, #0x020] | |
194 | + ldr r2, =0x00011117 | |
195 | + str r2, [r0, #0x818] | |
196 | + str r2, [r1, #0x818] | |
197 | + ldr r2, =0x00025576 | |
198 | + str r2, [r0, #0x004] | |
199 | + ldr r2, =0x00011006 | |
200 | + str r2, [r0, #0x404] | |
201 | + ldr r2, =0x00000000 | |
202 | + str r2, [r0, #0x01c] | |
203 | +.endm | |
204 | + | |
205 | +.macro imx6dqsabresd_ddr_setting | |
206 | + ldr r0, =IOMUXC_BASE_ADDR | |
207 | + ldr r1, =0x000c0000 | |
208 | + str r1, [r0, #0x798] | |
209 | + ldr r1, =0x00000000 | |
210 | + str r1, [r0, #0x758] | |
211 | + | |
212 | + ldr r1, =0x00000030 | |
213 | + str r1, [r0, #0x588] | |
214 | + str r1, [r0, #0x594] | |
215 | + str r1, [r0, #0x56c] | |
216 | + str r1, [r0, #0x578] | |
217 | + str r1, [r0, #0x74c] | |
218 | + str r1, [r0, #0x57c] | |
219 | + | |
220 | + ldr r1, =0x00000000 | |
221 | + str r1, [r0, #0x58c] | |
222 | + | |
223 | + ldr r1, =0x00000030 | |
224 | + str r1, [r0, #0x59c] | |
225 | + str r1, [r0, #0x5a0] | |
226 | + str r1, [r0, #0x78c] | |
227 | + | |
228 | + ldr r1, =0x00020000 | |
229 | + str r1, [r0, #0x750] | |
230 | + | |
231 | + ldr r1, =0x00000030 | |
232 | + str r1, [r0, #0x5a8] | |
233 | + str r1, [r0, #0x5b0] | |
234 | + str r1, [r0, #0x524] | |
235 | + str r1, [r0, #0x51c] | |
236 | + str r1, [r0, #0x518] | |
237 | + str r1, [r0, #0x50c] | |
238 | + str r1, [r0, #0x5b8] | |
239 | + str r1, [r0, #0x5c0] | |
240 | + | |
241 | + ldr r1, =0x00020000 | |
242 | + str r1, [r0, #0x774] | |
243 | + | |
244 | + ldr r1, =0x00000030 | |
245 | + str r1, [r0, #0x784] | |
246 | + str r1, [r0, #0x788] | |
247 | + str r1, [r0, #0x794] | |
248 | + str r1, [r0, #0x79c] | |
249 | + str r1, [r0, #0x7a0] | |
250 | + str r1, [r0, #0x7a4] | |
251 | + str r1, [r0, #0x7a8] | |
252 | + str r1, [r0, #0x748] | |
253 | + str r1, [r0, #0x5ac] | |
254 | + str r1, [r0, #0x5b4] | |
255 | + str r1, [r0, #0x528] | |
256 | + str r1, [r0, #0x520] | |
257 | + str r1, [r0, #0x514] | |
258 | + str r1, [r0, #0x510] | |
259 | + str r1, [r0, #0x5bc] | |
260 | + str r1, [r0, #0x5c4] | |
261 | + | |
262 | + ldr r0, =MMDC_P0_BASE_ADDR | |
263 | + ldr r2, =0xa1390003 | |
264 | + str r2, [r0, #0x800] | |
265 | + | |
266 | + ldr r2, =0x001F001F | |
267 | + str r2, [r0, #0x80c] | |
268 | + str r2, [r0, #0x810] | |
269 | + ldr r1, =MMDC_P1_BASE_ADDR | |
270 | + str r2, [r1, #0x80c] | |
271 | + str r2, [r1, #0x810] | |
272 | + | |
273 | + ldr r2, =0x43270338 | |
274 | + str r2, [r0, #0x83c] | |
275 | + ldr r2, =0x03200314 | |
276 | + str r2, [r0, #0x840] | |
277 | + | |
278 | + ldr r2, =0x431A032F | |
279 | + str r2, [r1, #0x83c] | |
280 | + ldr r2, =0x03200263 | |
281 | + str r2, [r1, #0x840] | |
282 | + | |
283 | + ldr r2, =0x4B434748 | |
284 | + str r2, [r0, #0x848] | |
285 | + ldr r2, =0x4445404C | |
286 | + str r2, [r1, #0x848] | |
287 | + | |
288 | + ldr r2, =0x38444542 | |
289 | + str r2, [r0, #0x850] | |
290 | + ldr r2, =0x4935493A | |
291 | + str r2, [r1, #0x850] | |
292 | + | |
293 | + ldr r2, =0x33333333 | |
294 | + str r2, [r0, #0x81c] | |
295 | + str r2, [r0, #0x820] | |
296 | + str r2, [r0, #0x824] | |
297 | + str r2, [r0, #0x828] | |
298 | + str r2, [r1, #0x81c] | |
299 | + str r2, [r1, #0x820] | |
300 | + str r2, [r1, #0x824] | |
301 | + str r2, [r1, #0x828] | |
302 | + | |
303 | + ldr r2, =0x00000800 | |
304 | + str r2, [r0, #0x8b8] | |
305 | + str r2, [r1, #0x8b8] | |
306 | + | |
307 | + ldr r2, =0x00020036 | |
308 | + str r2, [r0, #0x004] | |
309 | + ldr r2, =0x09444040 | |
310 | + str r2, [r0, #0x008] | |
311 | + | |
312 | + ldr r2, =0x555A7975 | |
313 | + str r2, [r0, #0x00c] | |
314 | + ldr r2, =0xFF538F64 | |
315 | + str r2, [r0, #0x010] | |
316 | + | |
317 | + ldr r2, =0x01FF00DB | |
318 | + str r2, [r0, #0x014] | |
319 | + ldr r2, =0x00001740 | |
320 | + str r2, [r0, #0x018] | |
321 | + | |
322 | + ldr r2, =0x00008000 | |
323 | + str r2, [r0, #0x01c] | |
324 | + ldr r2, =0x000026d2 | |
325 | + str r2, [r0, #0x02c] | |
326 | + ldr r2, =0x005A1023 | |
327 | + str r2, [r0, #0x030] | |
328 | + ldr r2, =0x00000027 | |
329 | + str r2, [r0, #0x040] | |
330 | + | |
331 | + ldr r2, =0x831A0000 | |
332 | + str r2, [r0, #0x000] | |
333 | + | |
334 | + ldr r2, =0x04088032 | |
335 | + str r2, [r0, #0x01c] | |
336 | + ldr r2, =0x00008033 | |
337 | + str r2, [r0, #0x01c] | |
338 | + ldr r2, =0x00048031 | |
339 | + str r2, [r0, #0x01c] | |
340 | + ldr r2, =0x09408030 | |
341 | + str r2, [r0, #0x01c] | |
342 | + ldr r2, =0x04008040 | |
343 | + str r2, [r0, #0x01c] | |
344 | + | |
345 | + ldr r2, =0x00005800 | |
346 | + str r2, [r0, #0x020] | |
347 | + ldr r2, =0x00011117 | |
348 | + str r2, [r0, #0x818] | |
349 | + str r2, [r1, #0x818] | |
350 | + ldr r2, =0x00025576 | |
351 | + str r2, [r0, #0x004] | |
352 | + ldr r2, =0x00011006 | |
353 | + str r2, [r0, #0x404] | |
354 | + ldr r2, =0x00000000 | |
355 | + str r2, [r0, #0x01c] | |
356 | +.endm | |
357 | + | |
358 | +.macro imx6dlsabresd_ddr_setting | |
359 | + ldr r0, =IOMUXC_BASE_ADDR | |
360 | + ldr r1, =0x000c0000 | |
361 | + str r1, [r0, #0x774] | |
362 | + ldr r1, =0x00000000 | |
363 | + str r1, [r0, #0x754] | |
364 | + | |
365 | + ldr r1, =0x00000030 | |
366 | + str r1, [r0, #0x4ac] | |
367 | + str r1, [r0, #0x4b0] | |
368 | + str r1, [r0, #0x464] | |
369 | + str r1, [r0, #0x490] | |
370 | + str r1, [r0, #0x74c] | |
371 | + str r1, [r0, #0x494] | |
372 | + | |
373 | + ldr r1, =0x00000000 | |
374 | + str r1, [r0, #0x4a0] | |
375 | + | |
376 | + ldr r1, =0x00000030 | |
377 | + str r1, [r0, #0x4b4] | |
378 | + str r1, [r0, #0x4b8] | |
379 | + str r1, [r0, #0x76c] | |
380 | + | |
381 | + ldr r1, =0x00020000 | |
382 | + str r1, [r0, #0x750] | |
383 | + | |
384 | + ldr r1, =0x00000030 | |
385 | + str r1, [r0, #0x4bc] | |
386 | + str r1, [r0, #0x4c0] | |
387 | + str r1, [r0, #0x4c4] | |
388 | + str r1, [r0, #0x4c8] | |
389 | + str r1, [r0, #0x4cc] | |
390 | + str r1, [r0, #0x4d0] | |
391 | + str r1, [r0, #0x4d4] | |
392 | + str r1, [r0, #0x4d8] | |
393 | + | |
394 | + ldr r1, =0x00020000 | |
395 | + str r1, [r0, #0x760] | |
396 | + | |
397 | + ldr r1, =0x00000030 | |
398 | + str r1, [r0, #0x764] | |
399 | + str r1, [r0, #0x770] | |
400 | + str r1, [r0, #0x778] | |
401 | + str r1, [r0, #0x77c] | |
402 | + str r1, [r0, #0x780] | |
403 | + str r1, [r0, #0x784] | |
404 | + str r1, [r0, #0x78c] | |
405 | + str r1, [r0, #0x748] | |
406 | + str r1, [r0, #0x470] | |
407 | + str r1, [r0, #0x474] | |
408 | + str r1, [r0, #0x478] | |
409 | + str r1, [r0, #0x47c] | |
410 | + str r1, [r0, #0x480] | |
411 | + str r1, [r0, #0x484] | |
412 | + str r1, [r0, #0x488] | |
413 | + str r1, [r0, #0x48c] | |
414 | + | |
415 | + ldr r0, =MMDC_P0_BASE_ADDR | |
416 | + ldr r2, =0xa1390003 | |
417 | + str r2, [r0, #0x800] | |
418 | + | |
419 | + ldr r2, =0x001f001f | |
420 | + str r2, [r0, #0x80c] | |
421 | + str r2, [r0, #0x810] | |
422 | + ldr r1, =MMDC_P1_BASE_ADDR | |
423 | + str r2, [r1, #0x80c] | |
424 | + str r2, [r1, #0x810] | |
425 | + | |
426 | + ldr r2, =0x4220021F | |
427 | + str r2, [r0, #0x83c] | |
428 | + ldr r2, =0x0207017E | |
429 | + str r2, [r0, #0x840] | |
430 | + | |
431 | + ldr r2, =0x4201020C | |
432 | + str r2, [r1, #0x83c] | |
433 | + ldr r2, =0x01660172 | |
434 | + str r2, [r1, #0x840] | |
435 | + | |
436 | + ldr r2, =0x4A4D4E4D | |
437 | + str r2, [r0, #0x848] | |
438 | + ldr r2, =0x4A4F5049 | |
439 | + str r2, [r1, #0x848] | |
440 | + | |
441 | + ldr r2, =0x3F3C3D31 | |
442 | + str r2, [r0, #0x850] | |
443 | + ldr r2, =0x3238372B | |
444 | + str r2, [r1, #0x850] | |
445 | + | |
446 | + ldr r2, =0x33333333 | |
447 | + str r2, [r0, #0x81c] | |
448 | + str r2, [r0, #0x820] | |
449 | + str r2, [r0, #0x824] | |
450 | + str r2, [r0, #0x828] | |
451 | + str r2, [r1, #0x81c] | |
452 | + str r2, [r1, #0x820] | |
453 | + str r2, [r1, #0x824] | |
454 | + str r2, [r1, #0x828] | |
455 | + | |
456 | + ldr r2, =0x00000800 | |
457 | + str r2, [r0, #0x8b8] | |
458 | + str r2, [r1, #0x8b8] | |
459 | + | |
460 | + ldr r2, =0x0002002D | |
461 | + str r2, [r0, #0x004] | |
462 | + ldr r2, =0x00333030 | |
463 | + str r2, [r0, #0x008] | |
464 | + | |
465 | + ldr r2, =0x3F435313 | |
466 | + str r2, [r0, #0x00c] | |
467 | + ldr r2, =0xB66E8B63 | |
468 | + str r2, [r0, #0x010] | |
469 | + | |
470 | + ldr r2, =0x01FF00DB | |
471 | + str r2, [r0, #0x014] | |
472 | + ldr r2, =0x00001740 | |
473 | + str r2, [r0, #0x018] | |
474 | + | |
475 | + ldr r2, =0x00008000 | |
476 | + str r2, [r0, #0x01c] | |
477 | + ldr r2, =0x000026d2 | |
478 | + str r2, [r0, #0x02c] | |
479 | + ldr r2, =0x00431023 | |
480 | + str r2, [r0, #0x030] | |
481 | + ldr r2, =0x00000027 | |
482 | + str r2, [r0, #0x040] | |
483 | + | |
484 | + ldr r2, =0x831A0000 | |
485 | + str r2, [r0, #0x000] | |
486 | + | |
487 | + ldr r2, =0x04008032 | |
488 | + str r2, [r0, #0x01c] | |
489 | + ldr r2, =0x00008033 | |
490 | + str r2, [r0, #0x01c] | |
491 | + ldr r2, =0x00048031 | |
492 | + str r2, [r0, #0x01c] | |
493 | + ldr r2, =0x05208030 | |
494 | + str r2, [r0, #0x01c] | |
495 | + ldr r2, =0x04008040 | |
496 | + str r2, [r0, #0x01c] | |
497 | + | |
498 | + ldr r2, =0x00005800 | |
499 | + str r2, [r0, #0x020] | |
500 | + ldr r2, =0x00011117 | |
501 | + str r2, [r0, #0x818] | |
502 | + str r2, [r1, #0x818] | |
503 | + ldr r2, =0x0002556D | |
504 | + str r2, [r0, #0x004] | |
505 | + ldr r2, =0x00011006 | |
506 | + str r2, [r0, #0x404] | |
507 | + ldr r2, =0x00000000 | |
508 | + str r2, [r0, #0x01c] | |
509 | +.endm | |
510 | + | |
511 | +.macro imx6solosabresd_ddr_setting | |
512 | + ldr r0, =IOMUXC_BASE_ADDR | |
513 | + ldr r1, =0x000c0000 | |
514 | + str r1, [r0, #0x774] | |
515 | + ldr r1, =0x00000000 | |
516 | + str r1, [r0, #0x754] | |
517 | + | |
518 | + ldr r1, =0x00000030 | |
519 | + str r1, [r0, #0x4ac] | |
520 | + str r1, [r0, #0x4b0] | |
521 | + str r1, [r0, #0x464] | |
522 | + str r1, [r0, #0x490] | |
523 | + str r1, [r0, #0x74c] | |
524 | + str r1, [r0, #0x494] | |
525 | + | |
526 | + ldr r1, =0x00000000 | |
527 | + str r1, [r0, #0x4a0] | |
528 | + | |
529 | + ldr r1, =0x00000030 | |
530 | + str r1, [r0, #0x4b4] | |
531 | + str r1, [r0, #0x4b8] | |
532 | + str r1, [r0, #0x76c] | |
533 | + | |
534 | + ldr r1, =0x00020000 | |
535 | + str r1, [r0, #0x750] | |
536 | + | |
537 | + ldr r1, =0x00000030 | |
538 | + str r1, [r0, #0x4bc] | |
539 | + str r1, [r0, #0x4c0] | |
540 | + str r1, [r0, #0x4c4] | |
541 | + str r1, [r0, #0x4c8] | |
542 | + | |
543 | + ldr r1, =0x00020000 | |
544 | + str r1, [r0, #0x760] | |
545 | + | |
546 | + ldr r1, =0x00000030 | |
547 | + str r1, [r0, #0x764] | |
548 | + str r1, [r0, #0x770] | |
549 | + str r1, [r0, #0x778] | |
550 | + str r1, [r0, #0x77c] | |
551 | + str r1, [r0, #0x470] | |
552 | + str r1, [r0, #0x474] | |
553 | + str r1, [r0, #0x478] | |
554 | + str r1, [r0, #0x47c] | |
555 | + | |
556 | + ldr r0, =MMDC_P0_BASE_ADDR | |
557 | + ldr r2, =0xa1390003 | |
558 | + str r2, [r0, #0x800] | |
559 | + | |
560 | + ldr r2, =0x001F001F | |
561 | + str r2, [r0, #0x80c] | |
562 | + str r2, [r0, #0x810] | |
563 | + | |
564 | + ldr r2, =0x42190219 | |
565 | + str r2, [r0, #0x83c] | |
566 | + ldr r2, =0x017B0177 | |
567 | + str r2, [r0, #0x840] | |
568 | + | |
569 | + ldr r2, =0x4B4D4E4D | |
570 | + str r2, [r0, #0x848] | |
571 | + | |
572 | + ldr r2, =0x3F3E2D36 | |
573 | + str r2, [r0, #0x850] | |
574 | + | |
575 | + ldr r2, =0x33333333 | |
576 | + str r2, [r0, #0x81c] | |
577 | + str r2, [r0, #0x820] | |
578 | + str r2, [r0, #0x824] | |
579 | + str r2, [r0, #0x828] | |
580 | + | |
581 | + ldr r2, =0x00000800 | |
582 | + str r2, [r0, #0x8b8] | |
583 | + | |
584 | + ldr r2, =0x0002002D | |
585 | + str r2, [r0, #0x004] | |
586 | + ldr r2, =0x00333030 | |
587 | + str r2, [r0, #0x008] | |
588 | + | |
589 | + ldr r2, =0x3F435313 | |
590 | + str r2, [r0, #0x00c] | |
591 | + ldr r2, =0xB66E8B63 | |
592 | + str r2, [r0, #0x010] | |
593 | + | |
594 | + ldr r2, =0x01FF00DB | |
595 | + str r2, [r0, #0x014] | |
596 | + ldr r2, =0x00001740 | |
597 | + str r2, [r0, #0x018] | |
598 | + | |
599 | + ldr r2, =0x00008000 | |
600 | + str r2, [r0, #0x01c] | |
601 | + ldr r2, =0x000026d2 | |
602 | + str r2, [r0, #0x02c] | |
603 | + ldr r2, =0x00431023 | |
604 | + str r2, [r0, #0x030] | |
605 | + ldr r2, =0x00000017 | |
606 | + str r2, [r0, #0x040] | |
607 | + | |
608 | + ldr r2, =0x83190000 | |
609 | + str r2, [r0, #0x000] | |
610 | + | |
611 | + ldr r2, =0x04008032 | |
612 | + str r2, [r0, #0x01c] | |
613 | + ldr r2, =0x00008033 | |
614 | + str r2, [r0, #0x01c] | |
615 | + ldr r2, =0x00048031 | |
616 | + str r2, [r0, #0x01c] | |
617 | + ldr r2, =0x05208030 | |
618 | + str r2, [r0, #0x01c] | |
619 | + ldr r2, =0x04008040 | |
620 | + str r2, [r0, #0x01c] | |
621 | + | |
622 | + ldr r2, =0x00005800 | |
623 | + str r2, [r0, #0x020] | |
624 | + ldr r2, =0x00011117 | |
625 | + str r2, [r0, #0x818] | |
626 | + ldr r2, =0x0002556D | |
627 | + str r2, [r0, #0x004] | |
628 | + ldr r2, =0x00011006 | |
629 | + str r2, [r0, #0x404] | |
630 | + ldr r2, =0x00000000 | |
631 | + str r2, [r0, #0x01c] | |
632 | +.endm | |
633 | +.macro imx6_clock_gating | |
634 | + ldr r0, =CCM_BASE_ADDR | |
635 | + ldr r1, =0x00C03F3F | |
636 | + str r1, [r0, #0x068] | |
637 | + ldr r1, =0x0030FC03 | |
638 | + str r1, [r0, #0x06c] | |
639 | + ldr r1, =0x0FFFF000 | |
640 | + str r1, [r0, #0x070] | |
641 | + ldr r1, =0x3FF00000 | |
642 | + str r1, [r0, #0x074] | |
643 | + ldr r1, =0x00FFF300 | |
644 | + str r1, [r0, #0x078] | |
645 | + ldr r1, =0x0F0000C3 | |
646 | + str r1, [r0, #0x07c] | |
647 | + ldr r1, =0x000003FF | |
648 | + str r1, [r0, #0x080] | |
649 | +.endm | |
650 | + | |
651 | +.macro imx6_qos_setting | |
652 | + ldr r0, =IOMUXC_BASE_ADDR | |
653 | + ldr r1, =0xF00000CF | |
654 | + str r1, [r0, #0x10] | |
655 | + | |
656 | +#if defined(CONFIG_MX6QP) | |
657 | + ldr r1, =0x77177717 | |
658 | + str r1, [r0, #0x18] | |
659 | + str r1, [r0, #0x1c] | |
660 | +#else | |
661 | + ldr r1, =0x007F007F | |
662 | + str r1, [r0, #0x18] | |
663 | + str r1, [r0, #0x1c] | |
664 | +#endif | |
665 | +.endm | |
666 | + | |
667 | +.macro imx6_ddr_setting | |
668 | +#if defined (CONFIG_MX6S) | |
669 | + imx6solosabresd_ddr_setting | |
670 | +#elif defined (CONFIG_MX6DL) | |
671 | + imx6dlsabresd_ddr_setting | |
672 | +#elif defined (CONFIG_MX6QP) | |
673 | + imx6dqpsabresd_ddr_setting | |
674 | +#elif defined (CONFIG_MX6Q) | |
675 | + imx6dqsabresd_ddr_setting | |
676 | +#else | |
677 | + #error "SOC not configured" | |
678 | +#endif | |
679 | + | |
680 | +.endm | |
681 | + | |
682 | +/* include the common plugin code here */ | |
683 | +#include <asm/arch/mx6_plugin.S> |
include/configs/mx6sabre_common.h
1 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
2 | 2 | /* |
3 | 3 | * Copyright (C) 2012 Freescale Semiconductor, Inc. |
4 | + * Copyright 2018 NXP | |
4 | 5 | * |
5 | 6 | * Configuration settings for the Freescale i.MX6Q SabreSD board. |
6 | 7 | */ |
... | ... | @@ -15,6 +16,39 @@ |
15 | 16 | /* MMC Configs */ |
16 | 17 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
17 | 18 | |
19 | +#define CONFIG_FEC_MXC | |
20 | +#define CONFIG_FEC_XCV_TYPE RGMII | |
21 | +#define CONFIG_ETHPRIME "eth0" | |
22 | + | |
23 | +#define CONFIG_PHY_ATHEROS | |
24 | + | |
25 | +#ifdef CONFIG_MX6S | |
26 | +#define SYS_NOSMP "nosmp" | |
27 | +#else | |
28 | +#define SYS_NOSMP | |
29 | +#endif | |
30 | + | |
31 | +#ifdef CONFIG_NAND_BOOT | |
32 | +#define MFG_NAND_PARTITION "mtdparts=8000000.nor:1m(boot),-(rootfs)\\;gpmi-nand:64m(nandboot),16m(nandkernel),16m(nanddtb),16m(nandtee),-(nandrootfs) " | |
33 | +#else | |
34 | +#define MFG_NAND_PARTITION "" | |
35 | +#endif | |
36 | + | |
37 | +#define CONFIG_MFG_ENV_SETTINGS \ | |
38 | + "mfgtool_args=setenv bootargs console=" CONSOLE_DEV ",115200 " \ | |
39 | + "rdinit=/linuxrc " \ | |
40 | + "g_mass_storage.stall=0 g_mass_storage.removable=1 " \ | |
41 | + "g_mass_storage.file=/fat g_mass_storage.ro=1 " \ | |
42 | + "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\ | |
43 | + "g_mass_storage.iSerialNumber=\"\" "\ | |
44 | + "enable_wait_mode=off "\ | |
45 | + MFG_NAND_PARTITION \ | |
46 | + "\0" \ | |
47 | + "initrd_addr=0x12C00000\0" \ | |
48 | + "initrd_high=0xffffffff\0" \ | |
49 | + "bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};\0" \ | |
50 | + | |
51 | + | |
18 | 52 | #ifdef CONFIG_SUPPORT_EMMC_BOOT |
19 | 53 | #define EMMC_ENV \ |
20 | 54 | "emmcdev=2\0" \ |
21 | 55 | |
22 | 56 | |
... | ... | @@ -35,10 +69,75 @@ |
35 | 69 | #define EMMC_ENV "" |
36 | 70 | #endif |
37 | 71 | |
72 | +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG | |
73 | + | |
74 | +#if defined(CONFIG_NAND_BOOT) | |
75 | + /* | |
76 | + * The dts also enables the WEIN NOR which is mtd0. | |
77 | + * So the partions' layout for NAND is: | |
78 | + * mtd1: 16M (uboot) | |
79 | + * mtd2: 16M (kernel) | |
80 | + * mtd3: 16M (dtb) | |
81 | + * mtd4: left (rootfs) | |
82 | + */ | |
38 | 83 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
84 | + CONFIG_MFG_ENV_SETTINGS \ | |
85 | + "fdt_addr=0x18000000\0" \ | |
86 | + "fdt_high=0xffffffff\0" \ | |
87 | + "console=" CONSOLE_DEV "\0" \ | |
88 | + "bootargs=console=" CONSOLE_DEV ",115200 ubi.mtd=6 " \ | |
89 | + "root=ubi0:nandrootfs rootfstype=ubifs " \ | |
90 | + MFG_NAND_PARTITION \ | |
91 | + "\0" \ | |
92 | + "bootcmd=nand read ${loadaddr} 0x4000000 0xc00000;"\ | |
93 | + "nand read ${fdt_addr} 0x5000000 0x100000;"\ | |
94 | + "bootz ${loadaddr} - ${fdt_addr}\0" | |
95 | + | |
96 | +#elif defined(CONFIG_SATA_BOOT) | |
97 | + | |
98 | +#define CONFIG_EXTRA_ENV_SETTINGS \ | |
99 | + CONFIG_MFG_ENV_SETTINGS \ | |
100 | + "image=zImage\0" \ | |
101 | + "fdt_file=undefined\0" \ | |
102 | + "fdt_addr=0x18000000\0" \ | |
103 | + "fdt_high=0xffffffff\0" \ | |
104 | + "findfdt="\ | |
105 | + "if test $fdt_file = undefined; then " \ | |
106 | + "if test $board_name = SABREAUTO && test $board_rev = MX6QP; then " \ | |
107 | + "setenv fdt_file imx6qp-sabreauto.dtb; fi; " \ | |
108 | + "if test $board_name = SABREAUTO && test $board_rev = MX6Q; then " \ | |
109 | + "setenv fdt_file imx6q-sabreauto.dtb; fi; " \ | |
110 | + "if test $board_name = SABREAUTO && test $board_rev = MX6DL; then " \ | |
111 | + "setenv fdt_file imx6dl-sabreauto.dtb; fi; " \ | |
112 | + "if test $board_name = SABRESD && test $board_rev = MX6QP; then " \ | |
113 | + "setenv fdt_file imx6qp-sabresd.dtb; fi; " \ | |
114 | + "if test $board_name = SABRESD && test $board_rev = MX6Q; then " \ | |
115 | + "setenv fdt_file imx6q-sabresd.dtb; fi; " \ | |
116 | + "if test $board_name = SABRESD && test $board_rev = MX6DL; then " \ | |
117 | + "setenv fdt_file imx6dl-sabresd.dtb; fi; " \ | |
118 | + "if test $fdt_file = undefined; then " \ | |
119 | + "echo WARNING: Could not determine dtb to use; " \ | |
120 | + "fi; " \ | |
121 | + "fi;\0" \ | |
122 | + "findtee="\ | |
123 | + "bootargs=console=" CONSOLE_DEV ",115200 \0"\ | |
124 | + "bootargs_sata=setenv bootargs ${bootargs} " \ | |
125 | + "root=/dev/sda2 rootwait rw \0" \ | |
126 | + "bootcmd_sata=run bootargs_sata; sata init; " \ | |
127 | + "run findfdt;" \ | |
128 | + "fatload sata 0:1 ${loadaddr} ${image}; " \ | |
129 | + "fatload sata 0:1 ${fdt_addr} ${fdt_file}; " \ | |
130 | + "bootz ${loadaddr} - ${fdt_addr} \0" \ | |
131 | + "bootcmd=run bootcmd_sata \0" | |
132 | + | |
133 | +#else | |
134 | + | |
135 | +#define CONFIG_EXTRA_ENV_SETTINGS \ | |
136 | + CONFIG_MFG_ENV_SETTINGS \ | |
137 | + "epdc_waveform=epdc_splash.bin\0" \ | |
39 | 138 | "script=boot.scr\0" \ |
40 | 139 | "image=zImage\0" \ |
41 | - "fdtfile=undefinedfile=undefined\0" \" \ | |
140 | + "fdt_file=undefinedfile=undefined\0" \" \ | |
42 | 141 | "fdt_addr=0x18000000\0" \ |
43 | 142 | "boot_fdt=try\0" \ |
44 | 143 | "ip_dyn=yes\0" \ |
... | ... | @@ -53,6 +152,8 @@ |
53 | 152 | "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ |
54 | 153 | "mmcpart=1\0" \ |
55 | 154 | "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \ |
155 | + "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ | |
156 | + "mmcautodetect=yes\0" \ | |
56 | 157 | "update_sd_firmware=" \ |
57 | 158 | "if test ${ip_dyn} = yes; then " \ |
58 | 159 | "setenv get_cmd dhcp; " \ |
... | ... | @@ -67,8 +168,9 @@ |
67 | 168 | "fi; " \ |
68 | 169 | "fi\0" \ |
69 | 170 | EMMC_ENV \ |
70 | - "mmcargs=setenv bootargs console=${console},${baudrate} " \ | |
71 | - "root=PARTUUID=${uuid} rootwait rw\0" \ | |
171 | + "smp=" SYS_NOSMP "\0"\ | |
172 | + "mmcargs=setenv bootargs console=${console},${baudrate} ${smp} " \ | |
173 | + "root=${mmcroot}\0" \ | |
72 | 174 | "loadbootscript=" \ |
73 | 175 | "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script} || " \ |
74 | 176 | "load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${script};\0" \ |
75 | 177 | |
... | ... | @@ -76,10 +178,9 @@ |
76 | 178 | "source\0" \ |
77 | 179 | "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image} || " \ |
78 | 180 | "load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${image}\0" \ |
79 | - "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile} || " \ | |
80 | - "load mmc ${mmcdev}:${mmcpart} ${fdt_addr} boot/${fdtfile}\0" \ | |
181 | + "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file} || " \ | |
182 | + "load mmc ${mmcdev}:${mmcpart} ${fdt_addr} boot/${fdt_file}\0" \ | |
81 | 183 | "mmcboot=echo Booting from mmc ...; " \ |
82 | - "run finduuid; " \ | |
83 | 184 | "run mmcargs; " \ |
84 | 185 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
85 | 186 | "if run loadfdt; then " \ |
... | ... | @@ -94,7 +195,7 @@ |
94 | 195 | "else " \ |
95 | 196 | "bootz; " \ |
96 | 197 | "fi;\0" \ |
97 | - "netargs=setenv bootargs console=${console},${baudrate} " \ | |
198 | + "netargs=setenv bootargs console=${console},${baudrate} ${smp} " \ | |
98 | 199 | "root=/dev/nfs " \ |
99 | 200 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
100 | 201 | "netboot=echo Booting from net ...; " \ |
... | ... | @@ -106,7 +207,7 @@ |
106 | 207 | "fi; " \ |
107 | 208 | "${get_cmd} ${image}; " \ |
108 | 209 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
109 | - "if ${get_cmd} ${fdt_addr} ${fdtfile}; then " \ | |
210 | + "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ | |
110 | 211 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
111 | 212 | "else " \ |
112 | 213 | "if test ${boot_fdt} = try; then " \ |
113 | 214 | |
114 | 215 | |
115 | 216 | |
116 | 217 | |
117 | 218 | |
118 | 219 | |
119 | 220 | |
... | ... | @@ -119,23 +220,25 @@ |
119 | 220 | "bootz; " \ |
120 | 221 | "fi;\0" \ |
121 | 222 | "findfdt="\ |
122 | - "if test $fdtfile = undefined; then " \ | |
223 | + "if test $fdt_file = undefined; then " \ | |
123 | 224 | "if test $board_name = SABREAUTO && test $board_rev = MX6QP; then " \ |
124 | - "setenv fdtfile imx6qp-sabreauto.dtb; fi; " \ | |
225 | + "setenv fdt_file imx6qp-sabreauto.dtb; fi; " \ | |
125 | 226 | "if test $board_name = SABREAUTO && test $board_rev = MX6Q; then " \ |
126 | - "setenv fdtfile imx6q-sabreauto.dtb; fi; " \ | |
227 | + "setenv fdt_file imx6q-sabreauto.dtb; fi; " \ | |
127 | 228 | "if test $board_name = SABREAUTO && test $board_rev = MX6DL; then " \ |
128 | - "setenv fdtfile imx6dl-sabreauto.dtb; fi; " \ | |
229 | + "setenv fdt_file imx6dl-sabreauto.dtb; fi; " \ | |
129 | 230 | "if test $board_name = SABRESD && test $board_rev = MX6QP; then " \ |
130 | - "setenv fdtfile imx6qp-sabresd.dtb; fi; " \ | |
231 | + "setenv fdt_file imx6qp-sabresd.dtb; fi; " \ | |
131 | 232 | "if test $board_name = SABRESD && test $board_rev = MX6Q; then " \ |
132 | - "setenv fdtfile imx6q-sabresd.dtb; fi; " \ | |
233 | + "setenv fdt_file imx6q-sabresd.dtb; fi; " \ | |
133 | 234 | "if test $board_name = SABRESD && test $board_rev = MX6DL; then " \ |
134 | - "setenv fdtfile imx6dl-sabresd.dtb; fi; " \ | |
135 | - "if test $fdtfile = undefined; then " \ | |
235 | + "setenv fdt_file imx6dl-sabresd.dtb; fi; " \ | |
236 | + "if test $fdt_file = undefined; then " \ | |
136 | 237 | "echo WARNING: Could not determine dtb to use; fi; " \ |
137 | 238 | "fi;\0" \ |
138 | 239 | |
240 | +#endif | |
241 | + | |
139 | 242 | #define CONFIG_ARP_TIMEOUT 200UL |
140 | 243 | |
141 | 244 | /* Physical Memory Map */ |
142 | 245 | |
143 | 246 | |
144 | 247 | |
... | ... | @@ -150,14 +253,54 @@ |
150 | 253 | #define CONFIG_SYS_INIT_SP_ADDR \ |
151 | 254 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
152 | 255 | |
153 | -/* Environment organization */ | |
256 | +#ifdef CONFIG_SATA | |
257 | +#define CONFIG_DWC_AHSATA | |
258 | +#define CONFIG_SYS_SATA_MAX_DEVICE 1 | |
259 | +#define CONFIG_DWC_AHSATA_PORT_ID 0 | |
260 | +#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR | |
261 | +#define CONFIG_LBA48 | |
262 | +#define CONFIG_LIBATA | |
263 | +#endif | |
154 | 264 | |
265 | +#ifdef CONFIG_MTD_NOR_FLASH | |
266 | +#define CONFIG_SYS_FLASH_BASE WEIM_ARB_BASE_ADDR | |
267 | +#define CONFIG_SYS_FLASH_SECT_SIZE (128 * 1024) | |
268 | +#define CONFIG_SYS_MAX_FLASH_SECT 256 /* max number of sectors on one chip */ | |
269 | +#define CONFIG_SYS_FLASH_EMPTY_INFO | |
270 | +#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT | |
271 | +#endif | |
272 | + | |
273 | +#ifdef CONFIG_NAND_MXS | |
274 | + | |
275 | +#define CONFIG_SYS_MAX_NAND_DEVICE 1 | |
276 | +#define CONFIG_SYS_NAND_BASE 0x40000000 | |
277 | +#define CONFIG_SYS_NAND_USE_FLASH_BBT | |
278 | + | |
279 | +/* DMA stuff, needed for GPMI/MXS NAND support */ | |
280 | +#endif | |
281 | + | |
282 | +#if defined(CONFIG_ENV_IS_IN_SATA) | |
283 | +#define CONFIG_SYS_SATA_ENV_DEV 0 | |
284 | +#define CONFIG_SYS_DCACHE_OFF /* remove when sata driver support cache */ | |
285 | +#endif | |
286 | + | |
287 | + | |
288 | +/* PMIC */ | |
289 | +#ifndef CONFIG_DM_PMIC | |
290 | +#define CONFIG_POWER_PFUZE100 | |
291 | +#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 | |
292 | +#endif | |
293 | + | |
155 | 294 | /* Framebuffer */ |
156 | 295 | #define CONFIG_VIDEO_BMP_LOGO |
157 | 296 | #define CONFIG_IMX_HDMI |
158 | 297 | #define CONFIG_IMX_VIDEO_SKIP |
159 | 298 | |
299 | +#if defined(CONFIG_ANDROID_SUPPORT) | |
300 | +#include "mx6sabreandroid_common.h" | |
301 | +#else | |
160 | 302 | #define CONFIG_USBD_HS |
161 | 303 | |
304 | +#endif /* CONFIG_ANDROID_SUPPORT */ | |
162 | 305 | #endif /* __MX6QSABRE_COMMON_CONFIG_H */ |
include/configs/mx6sabreauto.h
1 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
2 | 2 | /* |
3 | 3 | * Copyright (C) 2012 Freescale Semiconductor, Inc. |
4 | + * Copyright 2018 NXP | |
4 | 5 | * |
5 | 6 | * Configuration settings for the Freescale i.MX6Q SabreAuto board. |
6 | 7 | */ |
7 | 8 | |
8 | 9 | |
9 | 10 | |
10 | 11 | |
... | ... | @@ -14,18 +15,31 @@ |
14 | 15 | |
15 | 16 | #define CONFIG_MXC_UART_BASE UART4_BASE |
16 | 17 | #define CONSOLE_DEV "ttymxc3" |
18 | +#define CONFIG_MMCROOT "/dev/mmcblk2p2" /* SDHC3 */ | |
19 | +#define PHYS_SDRAM_SIZE (2u * 1024 * 1024 * 1024) | |
20 | +#ifdef CONFIG_MX6S | |
21 | +#undef PHYS_SDRAM_SIZE | |
22 | +#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024) | |
23 | +#endif | |
17 | 24 | |
25 | +#include "mx6sabre_common.h" | |
26 | + | |
27 | +#define CONFIG_SYS_FSL_USDHC_NUM 2 | |
28 | + | |
29 | +/*Since the pin conflicts on EIM D18, disable the USB host if the NOR flash is enabled */ | |
30 | +#ifdef CONFIG_USB | |
18 | 31 | /* USB Configs */ |
19 | 32 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
20 | 33 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ |
21 | 34 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
22 | 35 | #define CONFIG_MXC_USB_FLAGS 0 |
23 | 36 | |
37 | +#if !defined(CONFIG_DM_PCA953X) && defined(CONFIG_SYS_I2C) | |
24 | 38 | #define CONFIG_PCA953X |
25 | 39 | #define CONFIG_SYS_I2C_PCA953X_WIDTH { {0x30, 8}, {0x32, 8}, {0x34, 8} } |
40 | +#endif | |
41 | +#endif | |
26 | 42 | |
27 | -#include "mx6sabre_common.h" | |
28 | - | |
29 | 43 | /* Falcon Mode */ |
30 | 44 | #ifdef CONFIG_SPL_OS_BOOT |
31 | 45 | #define CONFIG_SPL_FS_LOAD_ARGS_NAME "args" |
... | ... | @@ -36,26 +50,6 @@ |
36 | 50 | #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x800 /* 1MB */ |
37 | 51 | #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS (CONFIG_CMD_SPL_WRITE_SIZE / 512) |
38 | 52 | #endif |
39 | - | |
40 | -#ifdef CONFIG_MTD_NOR_FLASH | |
41 | -#define CONFIG_SYS_FLASH_BASE WEIM_ARB_BASE_ADDR | |
42 | -#define CONFIG_SYS_FLASH_SECT_SIZE (128 * 1024) | |
43 | -#define CONFIG_SYS_MAX_FLASH_SECT 256 /* max number of sectors on one chip */ | |
44 | -#define CONFIG_SYS_FLASH_EMPTY_INFO | |
45 | -#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT | |
46 | -#endif | |
47 | - | |
48 | -#define CONFIG_SYS_FSL_USDHC_NUM 2 | |
49 | - | |
50 | -/* NAND stuff */ | |
51 | -#define CONFIG_SYS_MAX_NAND_DEVICE 1 | |
52 | -#define CONFIG_SYS_NAND_BASE 0x40000000 | |
53 | - | |
54 | -/* DMA stuff, needed for GPMI/MXS NAND support */ | |
55 | - | |
56 | -/* PMIC */ | |
57 | -#define CONFIG_POWER_PFUZE100 | |
58 | -#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 | |
59 | 53 | |
60 | 54 | #endif /* __MX6SABREAUTO_CONFIG_H */ |
include/configs/mx6sabresd.h
1 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
2 | 2 | /* |
3 | 3 | * Copyright (C) 2012 Freescale Semiconductor, Inc. |
4 | + * Copyright 2017-2018 NXP | |
4 | 5 | * |
5 | 6 | * Configuration settings for the Freescale i.MX6Q SabreSD board. |
6 | 7 | */ |
7 | 8 | |
... | ... | @@ -14,7 +15,16 @@ |
14 | 15 | |
15 | 16 | #define CONFIG_MXC_UART_BASE UART1_BASE |
16 | 17 | #define CONSOLE_DEV "ttymxc0" |
18 | +#define CONFIG_MMCROOT "/dev/mmcblk2p2" /* SDHC3 */ | |
17 | 19 | |
20 | +#if defined(CONFIG_MX6Q) || defined(CONFIG_MX6QP) | |
21 | +#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024) | |
22 | +#elif defined(CONFIG_MX6DL) | |
23 | +#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024) | |
24 | +#elif defined(CONFIG_MX6S) | |
25 | +#define PHYS_SDRAM_SIZE (512u * 1024 * 1024) | |
26 | +#endif | |
27 | + | |
18 | 28 | #include "mx6sabre_common.h" |
19 | 29 | |
20 | 30 | /* Falcon Mode */ |
... | ... | @@ -28,6 +38,17 @@ |
28 | 38 | |
29 | 39 | #define CONFIG_SYS_FSL_USDHC_NUM 3 |
30 | 40 | |
41 | +/* | |
42 | + * imx6 q/dl/solo pcie would be failed to work properly in kernel, if | |
43 | + * the pcie module is iniialized/enumerated both in uboot and linux | |
44 | + * kernel. | |
45 | + * rootcause:imx6 q/dl/solo pcie don't have the reset mechanism. | |
46 | + * it is only be RESET by the POR. So, the pcie module only be | |
47 | + * initialized/enumerated once in one POR. | |
48 | + * Set to use pcie in kernel defaultly, mask the pcie config here. | |
49 | + * Remove the mask freely, if the uboot pcie functions, rather than | |
50 | + * the kernel's, are required. | |
51 | + */ | |
31 | 52 | #ifdef CONFIG_CMD_PCI |
32 | 53 | #define CONFIG_PCI_SCAN_SHOW |
33 | 54 | #define CONFIG_PCIE_IMX |
... | ... | @@ -35,10 +56,6 @@ |
35 | 56 | #define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(3, 19) |
36 | 57 | #endif |
37 | 58 | |
38 | -/* PMIC */ | |
39 | -#define CONFIG_POWER_PFUZE100 | |
40 | -#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 | |
41 | - | |
42 | 59 | /* USB Configs */ |
43 | 60 | #ifdef CONFIG_CMD_USB |
44 | 61 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
... | ... | @@ -46,6 +63,25 @@ |
46 | 63 | #define CONFIG_MXC_USB_FLAGS 0 |
47 | 64 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Enabled USB controller number */ |
48 | 65 | #endif |
66 | + | |
67 | +/*#define CONFIG_SPLASH_SCREEN*/ | |
68 | +/*#define CONFIG_MXC_EPDC*/ | |
69 | + | |
70 | +/* | |
71 | + * SPLASH SCREEN Configs | |
72 | + */ | |
73 | +#if defined(CONFIG_MXC_EPDC) | |
74 | + /* | |
75 | + * Framebuffer and LCD | |
76 | + */ | |
77 | + #define CONFIG_CMD_BMP | |
78 | + #undef LCD_TEST_PATTERN | |
79 | + /* #define CONFIG_SPLASH_IS_IN_MMC 1 */ | |
80 | + #define LCD_BPP LCD_MONOCHROME | |
81 | + /* #define CONFIG_SPLASH_SCREEN_ALIGN 1 */ | |
82 | + | |
83 | + #define CONFIG_WAVEFORM_BUF_SIZE 0x400000 | |
84 | +#endif /* CONFIG_SPLASH_SCREEN && CONFIG_MXC_EPDC */ | |
49 | 85 | |
50 | 86 | #endif /* __MX6SABRESD_CONFIG_H */ |
scripts/config_whitelist.txt