Commit ce3c9a59afd0591a105a316335d7015d8d902367
Committed by
Michal Simek
1 parent
e7affad190
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
i2c: Added Kconfig support for CONFIG_SYS_I2C_ZYNQ_SPEED
This patch added Kconfig support for CONFIG_SYS_I2C_ZYNQ_SPEED and set it to default value 100000. Signed-off-by: Vipul Kumar <vipulk@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Showing 3 changed files with 7 additions and 2 deletions Inline Diff
drivers/i2c/Kconfig
1 | # | 1 | # |
2 | # I2C subsystem configuration | 2 | # I2C subsystem configuration |
3 | # | 3 | # |
4 | 4 | ||
5 | menu "I2C support" | 5 | menu "I2C support" |
6 | 6 | ||
7 | config DM_I2C | 7 | config DM_I2C |
8 | bool "Enable Driver Model for I2C drivers" | 8 | bool "Enable Driver Model for I2C drivers" |
9 | depends on DM | 9 | depends on DM |
10 | help | 10 | help |
11 | Enable driver model for I2C. The I2C uclass interface: probe, read, | 11 | Enable driver model for I2C. The I2C uclass interface: probe, read, |
12 | write and speed, is implemented with the bus drivers operations, | 12 | write and speed, is implemented with the bus drivers operations, |
13 | which provide methods for bus setting and data transfer. Each chip | 13 | which provide methods for bus setting and data transfer. Each chip |
14 | device (bus child) info is kept as parent platdata. The interface | 14 | device (bus child) info is kept as parent platdata. The interface |
15 | is defined in include/i2c.h. When i2c bus driver supports the i2c | 15 | is defined in include/i2c.h. When i2c bus driver supports the i2c |
16 | uclass, but the device drivers not, then DM_I2C_COMPAT config can | 16 | uclass, but the device drivers not, then DM_I2C_COMPAT config can |
17 | be used as compatibility layer. | 17 | be used as compatibility layer. |
18 | 18 | ||
19 | config DM_I2C_COMPAT | 19 | config DM_I2C_COMPAT |
20 | bool "Enable I2C compatibility layer" | 20 | bool "Enable I2C compatibility layer" |
21 | depends on DM | 21 | depends on DM |
22 | help | 22 | help |
23 | Enable old-style I2C functions for compatibility with existing code. | 23 | Enable old-style I2C functions for compatibility with existing code. |
24 | This option can be enabled as a temporary measure to avoid needing | 24 | This option can be enabled as a temporary measure to avoid needing |
25 | to convert all code for a board in a single commit. It should not | 25 | to convert all code for a board in a single commit. It should not |
26 | be enabled for any board in an official release. | 26 | be enabled for any board in an official release. |
27 | 27 | ||
28 | config I2C_CROS_EC_TUNNEL | 28 | config I2C_CROS_EC_TUNNEL |
29 | tristate "Chrome OS EC tunnel I2C bus" | 29 | tristate "Chrome OS EC tunnel I2C bus" |
30 | depends on CROS_EC | 30 | depends on CROS_EC |
31 | help | 31 | help |
32 | This provides an I2C bus that will tunnel i2c commands through to | 32 | This provides an I2C bus that will tunnel i2c commands through to |
33 | the other side of the Chrome OS EC to the I2C bus connected there. | 33 | the other side of the Chrome OS EC to the I2C bus connected there. |
34 | This will work whatever the interface used to talk to the EC (SPI, | 34 | This will work whatever the interface used to talk to the EC (SPI, |
35 | I2C or LPC). Some Chromebooks use this when the hardware design | 35 | I2C or LPC). Some Chromebooks use this when the hardware design |
36 | does not allow direct access to the main PMIC from the AP. | 36 | does not allow direct access to the main PMIC from the AP. |
37 | 37 | ||
38 | config I2C_CROS_EC_LDO | 38 | config I2C_CROS_EC_LDO |
39 | bool "Provide access to LDOs on the Chrome OS EC" | 39 | bool "Provide access to LDOs on the Chrome OS EC" |
40 | depends on CROS_EC | 40 | depends on CROS_EC |
41 | ---help--- | 41 | ---help--- |
42 | On many Chromebooks the main PMIC is inaccessible to the AP. This is | 42 | On many Chromebooks the main PMIC is inaccessible to the AP. This is |
43 | often dealt with by using an I2C pass-through interface provided by | 43 | often dealt with by using an I2C pass-through interface provided by |
44 | the EC. On some unfortunate models (e.g. Spring) the pass-through | 44 | the EC. On some unfortunate models (e.g. Spring) the pass-through |
45 | is not available, and an LDO message is available instead. This | 45 | is not available, and an LDO message is available instead. This |
46 | option enables a driver which provides very basic access to those | 46 | option enables a driver which provides very basic access to those |
47 | regulators, via the EC. We implement this as an I2C bus which | 47 | regulators, via the EC. We implement this as an I2C bus which |
48 | emulates just the TPS65090 messages we know about. This is done to | 48 | emulates just the TPS65090 messages we know about. This is done to |
49 | avoid duplicating the logic in the TPS65090 regulator driver for | 49 | avoid duplicating the logic in the TPS65090 regulator driver for |
50 | enabling/disabling an LDO. | 50 | enabling/disabling an LDO. |
51 | 51 | ||
52 | config I2C_SET_DEFAULT_BUS_NUM | 52 | config I2C_SET_DEFAULT_BUS_NUM |
53 | bool "Set default I2C bus number" | 53 | bool "Set default I2C bus number" |
54 | depends on DM_I2C | 54 | depends on DM_I2C |
55 | help | 55 | help |
56 | Set default number of I2C bus to be accessed. This option provides | 56 | Set default number of I2C bus to be accessed. This option provides |
57 | behaviour similar to old (i.e. pre DM) I2C bus driver. | 57 | behaviour similar to old (i.e. pre DM) I2C bus driver. |
58 | 58 | ||
59 | config I2C_DEFAULT_BUS_NUMBER | 59 | config I2C_DEFAULT_BUS_NUMBER |
60 | hex "I2C default bus number" | 60 | hex "I2C default bus number" |
61 | depends on I2C_SET_DEFAULT_BUS_NUM | 61 | depends on I2C_SET_DEFAULT_BUS_NUM |
62 | default 0x0 | 62 | default 0x0 |
63 | help | 63 | help |
64 | Number of default I2C bus to use | 64 | Number of default I2C bus to use |
65 | 65 | ||
66 | config DM_I2C_GPIO | 66 | config DM_I2C_GPIO |
67 | bool "Enable Driver Model for software emulated I2C bus driver" | 67 | bool "Enable Driver Model for software emulated I2C bus driver" |
68 | depends on DM_I2C && DM_GPIO | 68 | depends on DM_I2C && DM_GPIO |
69 | help | 69 | help |
70 | Enable the i2c bus driver emulation by using the GPIOs. The bus GPIO | 70 | Enable the i2c bus driver emulation by using the GPIOs. The bus GPIO |
71 | configuration is given by the device tree. Kernel-style device tree | 71 | configuration is given by the device tree. Kernel-style device tree |
72 | bindings are supported. | 72 | bindings are supported. |
73 | Binding info: doc/device-tree-bindings/i2c/i2c-gpio.txt | 73 | Binding info: doc/device-tree-bindings/i2c/i2c-gpio.txt |
74 | 74 | ||
75 | config SYS_I2C_AT91 | 75 | config SYS_I2C_AT91 |
76 | bool "Atmel I2C driver" | 76 | bool "Atmel I2C driver" |
77 | depends on DM_I2C && ARCH_AT91 | 77 | depends on DM_I2C && ARCH_AT91 |
78 | help | 78 | help |
79 | Add support for the Atmel I2C driver. A serious problem is that there | 79 | Add support for the Atmel I2C driver. A serious problem is that there |
80 | is no documented way to issue repeated START conditions for more than | 80 | is no documented way to issue repeated START conditions for more than |
81 | two messages, as needed to support combined I2C messages. Use the | 81 | two messages, as needed to support combined I2C messages. Use the |
82 | i2c-gpio driver unless your system can cope with this limitation. | 82 | i2c-gpio driver unless your system can cope with this limitation. |
83 | Binding info: doc/device-tree-bindings/i2c/i2c-at91.txt | 83 | Binding info: doc/device-tree-bindings/i2c/i2c-at91.txt |
84 | 84 | ||
85 | config SYS_I2C_FSL | 85 | config SYS_I2C_FSL |
86 | bool "Freescale I2C bus driver" | 86 | bool "Freescale I2C bus driver" |
87 | depends on DM_I2C | 87 | depends on DM_I2C |
88 | help | 88 | help |
89 | Add support for Freescale I2C busses as used on MPC8240, MPC8245, and | 89 | Add support for Freescale I2C busses as used on MPC8240, MPC8245, and |
90 | MPC85xx processors. | 90 | MPC85xx processors. |
91 | 91 | ||
92 | config SYS_I2C_CADENCE | 92 | config SYS_I2C_CADENCE |
93 | tristate "Cadence I2C Controller" | 93 | tristate "Cadence I2C Controller" |
94 | depends on DM_I2C && (ARCH_ZYNQ || ARM64) | 94 | depends on DM_I2C && (ARCH_ZYNQ || ARM64) |
95 | help | 95 | help |
96 | Say yes here to select Cadence I2C Host Controller. This controller is | 96 | Say yes here to select Cadence I2C Host Controller. This controller is |
97 | e.g. used by Xilinx Zynq. | 97 | e.g. used by Xilinx Zynq. |
98 | 98 | ||
99 | config SYS_I2C_DW | 99 | config SYS_I2C_DW |
100 | bool "Designware I2C Controller" | 100 | bool "Designware I2C Controller" |
101 | default n | 101 | default n |
102 | help | 102 | help |
103 | Say yes here to select the Designware I2C Host Controller. This | 103 | Say yes here to select the Designware I2C Host Controller. This |
104 | controller is used in various SoCs, e.g. the ST SPEAr, Altera | 104 | controller is used in various SoCs, e.g. the ST SPEAr, Altera |
105 | SoCFPGA, Synopsys ARC700 and some Intel x86 SoCs. | 105 | SoCFPGA, Synopsys ARC700 and some Intel x86 SoCs. |
106 | 106 | ||
107 | config SYS_I2C_DW_ENABLE_STATUS_UNSUPPORTED | 107 | config SYS_I2C_DW_ENABLE_STATUS_UNSUPPORTED |
108 | bool "DW I2C Enable Status Register not supported" | 108 | bool "DW I2C Enable Status Register not supported" |
109 | depends on SYS_I2C_DW && (TARGET_SPEAR300 || TARGET_SPEAR310 || \ | 109 | depends on SYS_I2C_DW && (TARGET_SPEAR300 || TARGET_SPEAR310 || \ |
110 | TARGET_SPEAR320 || TARGET_SPEAR600 || TARGET_X600) | 110 | TARGET_SPEAR320 || TARGET_SPEAR600 || TARGET_X600) |
111 | default y | 111 | default y |
112 | help | 112 | help |
113 | Some versions of the Designware I2C controller do not support the | 113 | Some versions of the Designware I2C controller do not support the |
114 | enable status register. This config option can be enabled in such | 114 | enable status register. This config option can be enabled in such |
115 | cases. | 115 | cases. |
116 | 116 | ||
117 | config SYS_I2C_ASPEED | 117 | config SYS_I2C_ASPEED |
118 | bool "Aspeed I2C Controller" | 118 | bool "Aspeed I2C Controller" |
119 | depends on DM_I2C && ARCH_ASPEED | 119 | depends on DM_I2C && ARCH_ASPEED |
120 | help | 120 | help |
121 | Say yes here to select Aspeed I2C Host Controller. The driver | 121 | Say yes here to select Aspeed I2C Host Controller. The driver |
122 | supports AST2500 and AST2400 controllers, but is very limited. | 122 | supports AST2500 and AST2400 controllers, but is very limited. |
123 | Only single master mode is supported and only byte-by-byte | 123 | Only single master mode is supported and only byte-by-byte |
124 | synchronous reads and writes are supported, no Pool Buffers or DMA. | 124 | synchronous reads and writes are supported, no Pool Buffers or DMA. |
125 | 125 | ||
126 | config SYS_I2C_INTEL | 126 | config SYS_I2C_INTEL |
127 | bool "Intel I2C/SMBUS driver" | 127 | bool "Intel I2C/SMBUS driver" |
128 | depends on DM_I2C | 128 | depends on DM_I2C |
129 | help | 129 | help |
130 | Add support for the Intel SMBUS driver. So far this driver is just | 130 | Add support for the Intel SMBUS driver. So far this driver is just |
131 | a stub which perhaps some basic init. There is no implementation of | 131 | a stub which perhaps some basic init. There is no implementation of |
132 | the I2C API meaning that any I2C operations will immediately fail | 132 | the I2C API meaning that any I2C operations will immediately fail |
133 | for now. | 133 | for now. |
134 | 134 | ||
135 | config SYS_I2C_IMX_LPI2C | 135 | config SYS_I2C_IMX_LPI2C |
136 | bool "NXP i.MX LPI2C driver" | 136 | bool "NXP i.MX LPI2C driver" |
137 | help | 137 | help |
138 | Add support for the NXP i.MX LPI2C driver. | 138 | Add support for the NXP i.MX LPI2C driver. |
139 | 139 | ||
140 | config SYS_I2C_MESON | 140 | config SYS_I2C_MESON |
141 | bool "Amlogic Meson I2C driver" | 141 | bool "Amlogic Meson I2C driver" |
142 | depends on DM_I2C && ARCH_MESON | 142 | depends on DM_I2C && ARCH_MESON |
143 | help | 143 | help |
144 | Add support for the I2C controller available in Amlogic Meson | 144 | Add support for the I2C controller available in Amlogic Meson |
145 | SoCs. The controller supports programmable bus speed including | 145 | SoCs. The controller supports programmable bus speed including |
146 | standard (100kbits/s) and fast (400kbit/s) speed and allows the | 146 | standard (100kbits/s) and fast (400kbit/s) speed and allows the |
147 | software to define a flexible format of the bit streams. It has an | 147 | software to define a flexible format of the bit streams. It has an |
148 | internal buffer holding up to 8 bytes for transfers and supports | 148 | internal buffer holding up to 8 bytes for transfers and supports |
149 | both 7-bit and 10-bit addresses. | 149 | both 7-bit and 10-bit addresses. |
150 | 150 | ||
151 | config SYS_I2C_MXC | 151 | config SYS_I2C_MXC |
152 | bool "NXP i.MX I2C driver" | 152 | bool "NXP i.MX I2C driver" |
153 | depends on MX6 | 153 | depends on MX6 |
154 | help | 154 | help |
155 | Add support for the NXP i.MX I2C driver. This supports upto for bus | 155 | Add support for the NXP i.MX I2C driver. This supports upto for bus |
156 | channels and operating on standard mode upto 100 kbits/s and fast | 156 | channels and operating on standard mode upto 100 kbits/s and fast |
157 | mode upto 400 kbits/s. | 157 | mode upto 400 kbits/s. |
158 | 158 | ||
159 | config SYS_I2C_OMAP24XX | 159 | config SYS_I2C_OMAP24XX |
160 | bool "TI OMAP2+ I2C driver" | 160 | bool "TI OMAP2+ I2C driver" |
161 | depends on ARCH_OMAP2PLUS | 161 | depends on ARCH_OMAP2PLUS |
162 | help | 162 | help |
163 | Add support for the OMAP2+ I2C driver. | 163 | Add support for the OMAP2+ I2C driver. |
164 | 164 | ||
165 | if SYS_I2C_OMAP24XX | 165 | if SYS_I2C_OMAP24XX |
166 | config SYS_OMAP24_I2C_SLAVE | 166 | config SYS_OMAP24_I2C_SLAVE |
167 | int "I2C Slave addr channel 0" | 167 | int "I2C Slave addr channel 0" |
168 | default 1 | 168 | default 1 |
169 | help | 169 | help |
170 | OMAP24xx I2C Slave address channel 0 | 170 | OMAP24xx I2C Slave address channel 0 |
171 | 171 | ||
172 | config SYS_OMAP24_I2C_SPEED | 172 | config SYS_OMAP24_I2C_SPEED |
173 | int "I2C Slave channel 0 speed" | 173 | int "I2C Slave channel 0 speed" |
174 | default 100000 | 174 | default 100000 |
175 | help | 175 | help |
176 | OMAP24xx Slave speed channel 0 | 176 | OMAP24xx Slave speed channel 0 |
177 | endif | 177 | endif |
178 | 178 | ||
179 | config SYS_I2C_RCAR_IIC | 179 | config SYS_I2C_RCAR_IIC |
180 | bool "Renesas RCar Gen3 IIC driver" | 180 | bool "Renesas RCar Gen3 IIC driver" |
181 | depends on (RCAR_GEN3 || RCAR_GEN2) && DM_I2C | 181 | depends on (RCAR_GEN3 || RCAR_GEN2) && DM_I2C |
182 | help | 182 | help |
183 | Support for Renesas RCar Gen3 IIC controller. | 183 | Support for Renesas RCar Gen3 IIC controller. |
184 | 184 | ||
185 | config SYS_I2C_ROCKCHIP | 185 | config SYS_I2C_ROCKCHIP |
186 | bool "Rockchip I2C driver" | 186 | bool "Rockchip I2C driver" |
187 | depends on DM_I2C | 187 | depends on DM_I2C |
188 | help | 188 | help |
189 | Add support for the Rockchip I2C driver. This is used with various | 189 | Add support for the Rockchip I2C driver. This is used with various |
190 | Rockchip parts such as RK3126, RK3128, RK3036 and RK3288. All chips | 190 | Rockchip parts such as RK3126, RK3128, RK3036 and RK3288. All chips |
191 | have several I2C ports and all are provided, controled by the | 191 | have several I2C ports and all are provided, controled by the |
192 | device tree. | 192 | device tree. |
193 | 193 | ||
194 | config SYS_I2C_SANDBOX | 194 | config SYS_I2C_SANDBOX |
195 | bool "Sandbox I2C driver" | 195 | bool "Sandbox I2C driver" |
196 | depends on SANDBOX && DM_I2C | 196 | depends on SANDBOX && DM_I2C |
197 | help | 197 | help |
198 | Enable I2C support for sandbox. This is an emulation of a real I2C | 198 | Enable I2C support for sandbox. This is an emulation of a real I2C |
199 | bus. Devices can be attached to the bus using the device tree | 199 | bus. Devices can be attached to the bus using the device tree |
200 | which specifies the driver to use. See sandbox.dts as an example. | 200 | which specifies the driver to use. See sandbox.dts as an example. |
201 | 201 | ||
202 | config SYS_I2C_S3C24X0 | 202 | config SYS_I2C_S3C24X0 |
203 | bool "Samsung I2C driver" | 203 | bool "Samsung I2C driver" |
204 | depends on ARCH_EXYNOS4 && DM_I2C | 204 | depends on ARCH_EXYNOS4 && DM_I2C |
205 | help | 205 | help |
206 | Support for Samsung I2C controller as Samsung SoCs. | 206 | Support for Samsung I2C controller as Samsung SoCs. |
207 | 207 | ||
208 | config SYS_I2C_STM32F7 | 208 | config SYS_I2C_STM32F7 |
209 | bool "STMicroelectronics STM32F7 I2C support" | 209 | bool "STMicroelectronics STM32F7 I2C support" |
210 | depends on (STM32F7 || STM32H7) && DM_I2C | 210 | depends on (STM32F7 || STM32H7) && DM_I2C |
211 | help | 211 | help |
212 | Enable this option to add support for STM32 I2C controller | 212 | Enable this option to add support for STM32 I2C controller |
213 | introduced with STM32F7/H7 SoCs. This I2C controller supports : | 213 | introduced with STM32F7/H7 SoCs. This I2C controller supports : |
214 | _ Slave and master modes | 214 | _ Slave and master modes |
215 | _ Multimaster capability | 215 | _ Multimaster capability |
216 | _ Standard-mode (up to 100 kHz) | 216 | _ Standard-mode (up to 100 kHz) |
217 | _ Fast-mode (up to 400 kHz) | 217 | _ Fast-mode (up to 400 kHz) |
218 | _ Fast-mode Plus (up to 1 MHz) | 218 | _ Fast-mode Plus (up to 1 MHz) |
219 | _ 7-bit and 10-bit addressing mode | 219 | _ 7-bit and 10-bit addressing mode |
220 | _ Multiple 7-bit slave addresses (2 addresses, 1 with configurable mask) | 220 | _ Multiple 7-bit slave addresses (2 addresses, 1 with configurable mask) |
221 | _ All 7-bit addresses acknowledge mode | 221 | _ All 7-bit addresses acknowledge mode |
222 | _ General call | 222 | _ General call |
223 | _ Programmable setup and hold times | 223 | _ Programmable setup and hold times |
224 | _ Easy to use event management | 224 | _ Easy to use event management |
225 | _ Optional clock stretching | 225 | _ Optional clock stretching |
226 | _ Software reset | 226 | _ Software reset |
227 | 227 | ||
228 | config SYS_I2C_UNIPHIER | 228 | config SYS_I2C_UNIPHIER |
229 | bool "UniPhier I2C driver" | 229 | bool "UniPhier I2C driver" |
230 | depends on ARCH_UNIPHIER && DM_I2C | 230 | depends on ARCH_UNIPHIER && DM_I2C |
231 | default y | 231 | default y |
232 | help | 232 | help |
233 | Support for UniPhier I2C controller driver. This I2C controller | 233 | Support for UniPhier I2C controller driver. This I2C controller |
234 | is used on PH1-LD4, PH1-sLD8 or older UniPhier SoCs. | 234 | is used on PH1-LD4, PH1-sLD8 or older UniPhier SoCs. |
235 | 235 | ||
236 | config SYS_I2C_UNIPHIER_F | 236 | config SYS_I2C_UNIPHIER_F |
237 | bool "UniPhier FIFO-builtin I2C driver" | 237 | bool "UniPhier FIFO-builtin I2C driver" |
238 | depends on ARCH_UNIPHIER && DM_I2C | 238 | depends on ARCH_UNIPHIER && DM_I2C |
239 | default y | 239 | default y |
240 | help | 240 | help |
241 | Support for UniPhier FIFO-builtin I2C controller driver. | 241 | Support for UniPhier FIFO-builtin I2C controller driver. |
242 | This I2C controller is used on PH1-Pro4 or newer UniPhier SoCs. | 242 | This I2C controller is used on PH1-Pro4 or newer UniPhier SoCs. |
243 | 243 | ||
244 | config SYS_I2C_MVTWSI | 244 | config SYS_I2C_MVTWSI |
245 | bool "Marvell I2C driver" | 245 | bool "Marvell I2C driver" |
246 | depends on DM_I2C | 246 | depends on DM_I2C |
247 | help | 247 | help |
248 | Support for Marvell I2C controllers as used on the orion5x and | 248 | Support for Marvell I2C controllers as used on the orion5x and |
249 | kirkwood SoC families. | 249 | kirkwood SoC families. |
250 | 250 | ||
251 | config TEGRA186_BPMP_I2C | 251 | config TEGRA186_BPMP_I2C |
252 | bool "Enable Tegra186 BPMP-based I2C driver" | 252 | bool "Enable Tegra186 BPMP-based I2C driver" |
253 | depends on TEGRA186_BPMP | 253 | depends on TEGRA186_BPMP |
254 | help | 254 | help |
255 | Support for Tegra I2C controllers managed by the BPMP (Boot and | 255 | Support for Tegra I2C controllers managed by the BPMP (Boot and |
256 | Power Management Processor). On Tegra186, some I2C controllers are | 256 | Power Management Processor). On Tegra186, some I2C controllers are |
257 | directly controlled by the main CPU, whereas others are controlled | 257 | directly controlled by the main CPU, whereas others are controlled |
258 | by the BPMP, and can only be accessed by the main CPU via IPC | 258 | by the BPMP, and can only be accessed by the main CPU via IPC |
259 | requests to the BPMP. This driver covers the latter case. | 259 | requests to the BPMP. This driver covers the latter case. |
260 | 260 | ||
261 | config SYS_I2C_BUS_MAX | 261 | config SYS_I2C_BUS_MAX |
262 | int "Max I2C busses" | 262 | int "Max I2C busses" |
263 | depends on ARCH_KEYSTONE || ARCH_OMAP2PLUS || ARCH_SOCFPGA | 263 | depends on ARCH_KEYSTONE || ARCH_OMAP2PLUS || ARCH_SOCFPGA |
264 | default 2 if TI816X | 264 | default 2 if TI816X |
265 | default 3 if OMAP34XX || AM33XX || AM43XX || ARCH_KEYSTONE | 265 | default 3 if OMAP34XX || AM33XX || AM43XX || ARCH_KEYSTONE |
266 | default 4 if ARCH_SOCFPGA || OMAP44XX || TI814X | 266 | default 4 if ARCH_SOCFPGA || OMAP44XX || TI814X |
267 | default 5 if OMAP54XX | 267 | default 5 if OMAP54XX |
268 | help | 268 | help |
269 | Define the maximum number of available I2C buses. | 269 | Define the maximum number of available I2C buses. |
270 | 270 | ||
271 | config SYS_I2C_ZYNQ | 271 | config SYS_I2C_ZYNQ |
272 | bool "Xilinx I2C driver" | 272 | bool "Xilinx I2C driver" |
273 | depends on ARCH_ZYNQMP || ARCH_ZYNQ | 273 | depends on ARCH_ZYNQMP || ARCH_ZYNQ |
274 | help | 274 | help |
275 | Support for Xilinx I2C controller. | 275 | Support for Xilinx I2C controller. |
276 | 276 | ||
277 | config SYS_I2C_ZYNQ_SLAVE | 277 | config SYS_I2C_ZYNQ_SLAVE |
278 | hex "Set slave addr" | 278 | hex "Set slave addr" |
279 | depends on SYS_I2C_ZYNQ | 279 | depends on SYS_I2C_ZYNQ |
280 | default 0 | 280 | default 0 |
281 | help | 281 | help |
282 | Set CONFIG_SYS_I2C_ZYNQ_SLAVE for slave addr. | 282 | Set CONFIG_SYS_I2C_ZYNQ_SLAVE for slave addr. |
283 | 283 | ||
284 | config SYS_I2C_ZYNQ_SPEED | ||
285 | int "Set I2C speed" | ||
286 | depends on SYS_I2C_ZYNQ | ||
287 | default 100000 | ||
288 | help | ||
289 | Set CONFIG_SYS_I2C_ZYNQ_SPEED for speed setting. | ||
290 | |||
284 | config SYS_I2C_IHS | 291 | config SYS_I2C_IHS |
285 | bool "gdsys IHS I2C driver" | 292 | bool "gdsys IHS I2C driver" |
286 | depends on DM_I2C | 293 | depends on DM_I2C |
287 | help | 294 | help |
288 | Support for gdsys IHS I2C driver on FPGA bus. | 295 | Support for gdsys IHS I2C driver on FPGA bus. |
289 | 296 | ||
290 | source "drivers/i2c/muxes/Kconfig" | 297 | source "drivers/i2c/muxes/Kconfig" |
291 | 298 | ||
292 | endmenu | 299 | endmenu |
293 | 300 |
include/configs/xilinx_zynqmp.h
1 | /* | 1 | /* |
2 | * Configuration for Xilinx ZynqMP | 2 | * Configuration for Xilinx ZynqMP |
3 | * (C) Copyright 2014 - 2015 Xilinx, Inc. | 3 | * (C) Copyright 2014 - 2015 Xilinx, Inc. |
4 | * Michal Simek <michal.simek@xilinx.com> | 4 | * Michal Simek <michal.simek@xilinx.com> |
5 | * | 5 | * |
6 | * Based on Configuration for Versatile Express | 6 | * Based on Configuration for Versatile Express |
7 | * | 7 | * |
8 | * SPDX-License-Identifier: GPL-2.0+ | 8 | * SPDX-License-Identifier: GPL-2.0+ |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __XILINX_ZYNQMP_H | 11 | #ifndef __XILINX_ZYNQMP_H |
12 | #define __XILINX_ZYNQMP_H | 12 | #define __XILINX_ZYNQMP_H |
13 | 13 | ||
14 | #define CONFIG_REMAKE_ELF | 14 | #define CONFIG_REMAKE_ELF |
15 | 15 | ||
16 | /* #define CONFIG_ARMV8_SWITCH_TO_EL1 */ | 16 | /* #define CONFIG_ARMV8_SWITCH_TO_EL1 */ |
17 | 17 | ||
18 | /* Generic Interrupt Controller Definitions */ | 18 | /* Generic Interrupt Controller Definitions */ |
19 | #define CONFIG_GICV2 | 19 | #define CONFIG_GICV2 |
20 | #define GICD_BASE 0xF9010000 | 20 | #define GICD_BASE 0xF9010000 |
21 | #define GICC_BASE 0xF9020000 | 21 | #define GICC_BASE 0xF9020000 |
22 | 22 | ||
23 | #define CONFIG_SYS_ALT_MEMTEST | 23 | #define CONFIG_SYS_ALT_MEMTEST |
24 | #define CONFIG_SYS_MEMTEST_SCRATCH 0xfffc0000 | 24 | #define CONFIG_SYS_MEMTEST_SCRATCH 0xfffc0000 |
25 | 25 | ||
26 | #ifndef CONFIG_NR_DRAM_BANKS | 26 | #ifndef CONFIG_NR_DRAM_BANKS |
27 | # define CONFIG_NR_DRAM_BANKS 2 | 27 | # define CONFIG_NR_DRAM_BANKS 2 |
28 | #endif | 28 | #endif |
29 | #define CONFIG_SYS_MEMTEST_START 0 | 29 | #define CONFIG_SYS_MEMTEST_START 0 |
30 | #define CONFIG_SYS_MEMTEST_END 1000 | 30 | #define CONFIG_SYS_MEMTEST_END 1000 |
31 | 31 | ||
32 | #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_TEXT_BASE | 32 | #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_TEXT_BASE |
33 | 33 | ||
34 | /* Generic Timer Definitions - setup in EL3. Setup by ATF for other cases */ | 34 | /* Generic Timer Definitions - setup in EL3. Setup by ATF for other cases */ |
35 | #if !defined(COUNTER_FREQUENCY) | 35 | #if !defined(COUNTER_FREQUENCY) |
36 | # define COUNTER_FREQUENCY 100000000 | 36 | # define COUNTER_FREQUENCY 100000000 |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | /* Size of malloc() pool */ | 39 | /* Size of malloc() pool */ |
40 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x2000000) | 40 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x2000000) |
41 | 41 | ||
42 | /* Serial setup */ | 42 | /* Serial setup */ |
43 | #define CONFIG_ARM_DCC | 43 | #define CONFIG_ARM_DCC |
44 | #define CONFIG_CPU_ARMV8 | 44 | #define CONFIG_CPU_ARMV8 |
45 | 45 | ||
46 | #define CONFIG_CONS_INDEX 0 | 46 | #define CONFIG_CONS_INDEX 0 |
47 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 47 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
48 | { 4800, 9600, 19200, 38400, 57600, 115200 } | 48 | { 4800, 9600, 19200, 38400, 57600, 115200 } |
49 | 49 | ||
50 | /* Command line configuration */ | 50 | /* Command line configuration */ |
51 | #define CONFIG_MP | 51 | #define CONFIG_MP |
52 | 52 | ||
53 | /* BOOTP options */ | 53 | /* BOOTP options */ |
54 | #define CONFIG_BOOTP_BOOTFILESIZE | 54 | #define CONFIG_BOOTP_BOOTFILESIZE |
55 | #define CONFIG_BOOTP_MAY_FAIL | 55 | #define CONFIG_BOOTP_MAY_FAIL |
56 | 56 | ||
57 | #if defined(CONFIG_MMC_SDHCI_ZYNQ) | 57 | #if defined(CONFIG_MMC_SDHCI_ZYNQ) |
58 | # define CONFIG_SUPPORT_EMMC_BOOT | 58 | # define CONFIG_SUPPORT_EMMC_BOOT |
59 | # ifndef CONFIG_ZYNQ_SDHCI_MAX_FREQ | 59 | # ifndef CONFIG_ZYNQ_SDHCI_MAX_FREQ |
60 | # define CONFIG_ZYNQ_SDHCI_MAX_FREQ 200000000 | 60 | # define CONFIG_ZYNQ_SDHCI_MAX_FREQ 200000000 |
61 | # endif | 61 | # endif |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #ifdef CONFIG_NAND_ARASAN | 64 | #ifdef CONFIG_NAND_ARASAN |
65 | # define CONFIG_SYS_MAX_NAND_DEVICE 1 | 65 | # define CONFIG_SYS_MAX_NAND_DEVICE 1 |
66 | # define CONFIG_SYS_NAND_ONFI_DETECTION | 66 | # define CONFIG_SYS_NAND_ONFI_DETECTION |
67 | # define CONFIG_MTD_DEVICE | 67 | # define CONFIG_MTD_DEVICE |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | #if defined(CONFIG_SPL_BUILD) | 70 | #if defined(CONFIG_SPL_BUILD) |
71 | #define CONFIG_ZYNQMP_PSU_INIT_ENABLED | 71 | #define CONFIG_ZYNQMP_PSU_INIT_ENABLED |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | /* Miscellaneous configurable options */ | 74 | /* Miscellaneous configurable options */ |
75 | #define CONFIG_SYS_LOAD_ADDR 0x8000000 | 75 | #define CONFIG_SYS_LOAD_ADDR 0x8000000 |
76 | 76 | ||
77 | #if defined(CONFIG_ZYNQMP_USB) | 77 | #if defined(CONFIG_ZYNQMP_USB) |
78 | #define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x1800000 | 78 | #define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x1800000 |
79 | #define DFU_DEFAULT_POLL_TIMEOUT 300 | 79 | #define DFU_DEFAULT_POLL_TIMEOUT 300 |
80 | #define CONFIG_USB_CABLE_CHECK | 80 | #define CONFIG_USB_CABLE_CHECK |
81 | #define CONFIG_THOR_RESET_OFF | 81 | #define CONFIG_THOR_RESET_OFF |
82 | #define DFU_ALT_INFO_RAM \ | 82 | #define DFU_ALT_INFO_RAM \ |
83 | "dfu_ram_info=" \ | 83 | "dfu_ram_info=" \ |
84 | "setenv dfu_alt_info " \ | 84 | "setenv dfu_alt_info " \ |
85 | "Image ram $kernel_addr $kernel_size\\\\;" \ | 85 | "Image ram $kernel_addr $kernel_size\\\\;" \ |
86 | "system.dtb ram $fdt_addr $fdt_size\0" \ | 86 | "system.dtb ram $fdt_addr $fdt_size\0" \ |
87 | "dfu_ram=run dfu_ram_info && dfu 0 ram 0\0" \ | 87 | "dfu_ram=run dfu_ram_info && dfu 0 ram 0\0" \ |
88 | "thor_ram=run dfu_ram_info && thordown 0 ram 0\0" | 88 | "thor_ram=run dfu_ram_info && thordown 0 ram 0\0" |
89 | 89 | ||
90 | #define DFU_ALT_INFO \ | 90 | #define DFU_ALT_INFO \ |
91 | DFU_ALT_INFO_RAM | 91 | DFU_ALT_INFO_RAM |
92 | 92 | ||
93 | #ifndef CONFIG_SPL_BUILD | 93 | #ifndef CONFIG_SPL_BUILD |
94 | # define PARTS_DEFAULT \ | 94 | # define PARTS_DEFAULT \ |
95 | "partitions=uuid_disk=${uuid_gpt_disk};" \ | 95 | "partitions=uuid_disk=${uuid_gpt_disk};" \ |
96 | "name=""boot"",size=16M,uuid=${uuid_gpt_boot};" \ | 96 | "name=""boot"",size=16M,uuid=${uuid_gpt_boot};" \ |
97 | "name=""Linux"",size=-M,uuid=${uuid_gpt_Linux}\0" | 97 | "name=""Linux"",size=-M,uuid=${uuid_gpt_Linux}\0" |
98 | #endif | 98 | #endif |
99 | #endif | 99 | #endif |
100 | 100 | ||
101 | #if !defined(DFU_ALT_INFO) | 101 | #if !defined(DFU_ALT_INFO) |
102 | # define DFU_ALT_INFO | 102 | # define DFU_ALT_INFO |
103 | #endif | 103 | #endif |
104 | 104 | ||
105 | #if !defined(PARTS_DEFAULT) | 105 | #if !defined(PARTS_DEFAULT) |
106 | # define PARTS_DEFAULT | 106 | # define PARTS_DEFAULT |
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | /* Do not preserve environment */ | 109 | /* Do not preserve environment */ |
110 | #define CONFIG_ENV_SIZE 0x8000 | 110 | #define CONFIG_ENV_SIZE 0x8000 |
111 | 111 | ||
112 | /* Monitor Command Prompt */ | 112 | /* Monitor Command Prompt */ |
113 | /* Console I/O Buffer Size */ | 113 | /* Console I/O Buffer Size */ |
114 | #define CONFIG_SYS_CBSIZE 2048 | 114 | #define CONFIG_SYS_CBSIZE 2048 |
115 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE | 115 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
116 | #define CONFIG_PANIC_HANG | 116 | #define CONFIG_PANIC_HANG |
117 | #define CONFIG_SYS_MAXARGS 64 | 117 | #define CONFIG_SYS_MAXARGS 64 |
118 | 118 | ||
119 | /* Ethernet driver */ | 119 | /* Ethernet driver */ |
120 | #if defined(CONFIG_ZYNQ_GEM) | 120 | #if defined(CONFIG_ZYNQ_GEM) |
121 | # define CONFIG_MII | 121 | # define CONFIG_MII |
122 | # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN | 122 | # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN |
123 | # define PHY_ANEG_TIMEOUT 20000 | 123 | # define PHY_ANEG_TIMEOUT 20000 |
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | /* I2C */ | 126 | /* I2C */ |
127 | #if defined(CONFIG_SYS_I2C_ZYNQ) | 127 | #if defined(CONFIG_SYS_I2C_ZYNQ) |
128 | # define CONFIG_SYS_I2C | 128 | # define CONFIG_SYS_I2C |
129 | # define CONFIG_SYS_I2C_ZYNQ_SPEED 100000 | ||
130 | #endif | 129 | #endif |
131 | 130 | ||
132 | /* EEPROM */ | 131 | /* EEPROM */ |
133 | #ifdef CONFIG_ZYNQMP_EEPROM | 132 | #ifdef CONFIG_ZYNQMP_EEPROM |
134 | # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 | 133 | # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
135 | # define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 | 134 | # define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 |
136 | # define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 | 135 | # define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 |
137 | # define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 | 136 | # define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 |
138 | # define CONFIG_SYS_EEPROM_SIZE (64 * 1024) | 137 | # define CONFIG_SYS_EEPROM_SIZE (64 * 1024) |
139 | #endif | 138 | #endif |
140 | 139 | ||
141 | #ifdef CONFIG_SATA_CEVA | 140 | #ifdef CONFIG_SATA_CEVA |
142 | #define CONFIG_SYS_SCSI_MAX_SCSI_ID 2 | 141 | #define CONFIG_SYS_SCSI_MAX_SCSI_ID 2 |
143 | #define CONFIG_SYS_SCSI_MAX_LUN 1 | 142 | #define CONFIG_SYS_SCSI_MAX_LUN 1 |
144 | #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ | 143 | #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ |
145 | CONFIG_SYS_SCSI_MAX_LUN) | 144 | CONFIG_SYS_SCSI_MAX_LUN) |
146 | #endif | 145 | #endif |
147 | 146 | ||
148 | #define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024) | 147 | #define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024) |
149 | 148 | ||
150 | #define CONFIG_BOARD_EARLY_INIT_R | 149 | #define CONFIG_BOARD_EARLY_INIT_R |
151 | #define CONFIG_CLOCKS | 150 | #define CONFIG_CLOCKS |
152 | 151 | ||
153 | #define ENV_MEM_LAYOUT_SETTINGS \ | 152 | #define ENV_MEM_LAYOUT_SETTINGS \ |
154 | "fdt_high=10000000\0" \ | 153 | "fdt_high=10000000\0" \ |
155 | "initrd_high=10000000\0" \ | 154 | "initrd_high=10000000\0" \ |
156 | "fdt_addr_r=0x40000000\0" \ | 155 | "fdt_addr_r=0x40000000\0" \ |
157 | "pxefile_addr_r=0x10000000\0" \ | 156 | "pxefile_addr_r=0x10000000\0" \ |
158 | "kernel_addr_r=0x18000000\0" \ | 157 | "kernel_addr_r=0x18000000\0" \ |
159 | "scriptaddr=0x02000000\0" \ | 158 | "scriptaddr=0x02000000\0" \ |
160 | "ramdisk_addr_r=0x02100000\0" \ | 159 | "ramdisk_addr_r=0x02100000\0" \ |
161 | 160 | ||
162 | #if defined(CONFIG_MMC_SDHCI_ZYNQ) | 161 | #if defined(CONFIG_MMC_SDHCI_ZYNQ) |
163 | # define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) | 162 | # define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) |
164 | #else | 163 | #else |
165 | # define BOOT_TARGET_DEVICES_MMC(func) | 164 | # define BOOT_TARGET_DEVICES_MMC(func) |
166 | #endif | 165 | #endif |
167 | 166 | ||
168 | #if defined(CONFIG_SATA_CEVA) | 167 | #if defined(CONFIG_SATA_CEVA) |
169 | # define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0) | 168 | # define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0) |
170 | #else | 169 | #else |
171 | # define BOOT_TARGET_DEVICES_SCSI(func) | 170 | # define BOOT_TARGET_DEVICES_SCSI(func) |
172 | #endif | 171 | #endif |
173 | 172 | ||
174 | #if defined(CONFIG_ZYNQMP_USB) | 173 | #if defined(CONFIG_ZYNQMP_USB) |
175 | # define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) func(USB, usb, 1) | 174 | # define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) func(USB, usb, 1) |
176 | #else | 175 | #else |
177 | # define BOOT_TARGET_DEVICES_USB(func) | 176 | # define BOOT_TARGET_DEVICES_USB(func) |
178 | #endif | 177 | #endif |
179 | 178 | ||
180 | #define BOOT_TARGET_DEVICES(func) \ | 179 | #define BOOT_TARGET_DEVICES(func) \ |
181 | BOOT_TARGET_DEVICES_MMC(func) \ | 180 | BOOT_TARGET_DEVICES_MMC(func) \ |
182 | BOOT_TARGET_DEVICES_USB(func) \ | 181 | BOOT_TARGET_DEVICES_USB(func) \ |
183 | BOOT_TARGET_DEVICES_SCSI(func) \ | 182 | BOOT_TARGET_DEVICES_SCSI(func) \ |
184 | func(PXE, pxe, na) \ | 183 | func(PXE, pxe, na) \ |
185 | func(DHCP, dhcp, na) | 184 | func(DHCP, dhcp, na) |
186 | 185 | ||
187 | #include <config_distro_bootcmd.h> | 186 | #include <config_distro_bootcmd.h> |
188 | 187 | ||
189 | /* Initial environment variables */ | 188 | /* Initial environment variables */ |
190 | #ifndef CONFIG_EXTRA_ENV_SETTINGS | 189 | #ifndef CONFIG_EXTRA_ENV_SETTINGS |
191 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 190 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
192 | ENV_MEM_LAYOUT_SETTINGS \ | 191 | ENV_MEM_LAYOUT_SETTINGS \ |
193 | BOOTENV \ | 192 | BOOTENV \ |
194 | DFU_ALT_INFO | 193 | DFU_ALT_INFO |
195 | #endif | 194 | #endif |
196 | 195 | ||
197 | /* SPL can't handle all huge variables - define just DFU */ | 196 | /* SPL can't handle all huge variables - define just DFU */ |
198 | #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU_SUPPORT) | 197 | #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU_SUPPORT) |
199 | #undef CONFIG_EXTRA_ENV_SETTINGS | 198 | #undef CONFIG_EXTRA_ENV_SETTINGS |
200 | # define CONFIG_EXTRA_ENV_SETTINGS \ | 199 | # define CONFIG_EXTRA_ENV_SETTINGS \ |
201 | "dfu_alt_info_ram=uboot.bin ram 0x8000000 0x1000000;" \ | 200 | "dfu_alt_info_ram=uboot.bin ram 0x8000000 0x1000000;" \ |
202 | "atf-uboot.ub ram 0x10000000 0x1000000;" \ | 201 | "atf-uboot.ub ram 0x10000000 0x1000000;" \ |
203 | "Image ram 0x80000 0x3f80000;" \ | 202 | "Image ram 0x80000 0x3f80000;" \ |
204 | "system.dtb ram 0x4000000 0x100000\0" \ | 203 | "system.dtb ram 0x4000000 0x100000\0" \ |
205 | "dfu_bufsiz=0x1000\0" | 204 | "dfu_bufsiz=0x1000\0" |
206 | #endif | 205 | #endif |
207 | 206 | ||
208 | #define CONFIG_SPL_TEXT_BASE 0xfffc0000 | 207 | #define CONFIG_SPL_TEXT_BASE 0xfffc0000 |
209 | #define CONFIG_SPL_STACK 0xfffffffc | 208 | #define CONFIG_SPL_STACK 0xfffffffc |
210 | #define CONFIG_SPL_MAX_SIZE 0x40000 | 209 | #define CONFIG_SPL_MAX_SIZE 0x40000 |
211 | 210 | ||
212 | /* Just random location in OCM */ | 211 | /* Just random location in OCM */ |
213 | #define CONFIG_SPL_BSS_START_ADDR 0x0 | 212 | #define CONFIG_SPL_BSS_START_ADDR 0x0 |
214 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 | 213 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 |
215 | 214 | ||
216 | #if defined(CONFIG_SPL_SPI_FLASH_SUPPORT) | 215 | #if defined(CONFIG_SPL_SPI_FLASH_SUPPORT) |
217 | # define CONFIG_SPL_SPI_LOAD | 216 | # define CONFIG_SPL_SPI_LOAD |
218 | # define CONFIG_SYS_SPI_KERNEL_OFFS 0x80000 | 217 | # define CONFIG_SYS_SPI_KERNEL_OFFS 0x80000 |
219 | # define CONFIG_SYS_SPI_ARGS_OFFS 0xa0000 | 218 | # define CONFIG_SYS_SPI_ARGS_OFFS 0xa0000 |
220 | # define CONFIG_SYS_SPI_ARGS_SIZE 0xa0000 | 219 | # define CONFIG_SYS_SPI_ARGS_SIZE 0xa0000 |
221 | 220 | ||
222 | # define CONFIG_SYS_SPI_U_BOOT_OFFS 0x170000 | 221 | # define CONFIG_SYS_SPI_U_BOOT_OFFS 0x170000 |
223 | #endif | 222 | #endif |
224 | 223 | ||
225 | /* u-boot is like dtb */ | 224 | /* u-boot is like dtb */ |
226 | #define CONFIG_SPL_FS_LOAD_ARGS_NAME "u-boot.bin" | 225 | #define CONFIG_SPL_FS_LOAD_ARGS_NAME "u-boot.bin" |
227 | #define CONFIG_SYS_SPL_ARGS_ADDR 0x8000000 | 226 | #define CONFIG_SYS_SPL_ARGS_ADDR 0x8000000 |
228 | 227 | ||
229 | /* ATF is my kernel image */ | 228 | /* ATF is my kernel image */ |
230 | #define CONFIG_SPL_FS_LOAD_KERNEL_NAME "atf-uboot.ub" | 229 | #define CONFIG_SPL_FS_LOAD_KERNEL_NAME "atf-uboot.ub" |
231 | 230 | ||
232 | /* FIT load address for RAM boot */ | 231 | /* FIT load address for RAM boot */ |
233 | #define CONFIG_SPL_LOAD_FIT_ADDRESS 0x10000000 | 232 | #define CONFIG_SPL_LOAD_FIT_ADDRESS 0x10000000 |
234 | 233 | ||
235 | /* MMC support */ | 234 | /* MMC support */ |
236 | #ifdef CONFIG_MMC_SDHCI_ZYNQ | 235 | #ifdef CONFIG_MMC_SDHCI_ZYNQ |
237 | # define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 | 236 | # define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 |
238 | # define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0 /* unused */ | 237 | # define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0 /* unused */ |
239 | # define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0 /* unused */ | 238 | # define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0 /* unused */ |
240 | # define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0 /* unused */ | 239 | # define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0 /* unused */ |
241 | # define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" | 240 | # define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" |
242 | #endif | 241 | #endif |
243 | 242 | ||
244 | #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU_SUPPORT) | 243 | #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU_SUPPORT) |
245 | # undef CONFIG_CMD_BOOTD | 244 | # undef CONFIG_CMD_BOOTD |
246 | # define CONFIG_SPL_ENV_SUPPORT | 245 | # define CONFIG_SPL_ENV_SUPPORT |
247 | # define CONFIG_SPL_HASH_SUPPORT | 246 | # define CONFIG_SPL_HASH_SUPPORT |
248 | # define CONFIG_ENV_MAX_ENTRIES 10 | 247 | # define CONFIG_ENV_MAX_ENTRIES 10 |
249 | #endif | 248 | #endif |
250 | 249 | ||
251 | #define CONFIG_SYS_SPL_MALLOC_START 0x20000000 | 250 | #define CONFIG_SYS_SPL_MALLOC_START 0x20000000 |
252 | #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 | 251 | #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 |
253 | 252 | ||
254 | #ifdef CONFIG_SPL_SYS_MALLOC_SIMPLE | 253 | #ifdef CONFIG_SPL_SYS_MALLOC_SIMPLE |
255 | # error "Disable CONFIG_SPL_SYS_MALLOC_SIMPLE. Full malloc needs to be used" | 254 | # error "Disable CONFIG_SPL_SYS_MALLOC_SIMPLE. Full malloc needs to be used" |
256 | #endif | 255 | #endif |
257 | 256 | ||
258 | #define CONFIG_BOARD_EARLY_INIT_F | 257 | #define CONFIG_BOARD_EARLY_INIT_F |
259 | 258 | ||
260 | #endif /* __XILINX_ZYNQMP_H */ | 259 | #endif /* __XILINX_ZYNQMP_H */ |
261 | 260 |
include/configs/zynq-common.h
1 | /* | 1 | /* |
2 | * (C) Copyright 2012 Michal Simek <monstr@monstr.eu> | 2 | * (C) Copyright 2012 Michal Simek <monstr@monstr.eu> |
3 | * (C) Copyright 2013 - 2018 Xilinx, Inc. | 3 | * (C) Copyright 2013 - 2018 Xilinx, Inc. |
4 | * | 4 | * |
5 | * Common configuration options for all Zynq boards. | 5 | * Common configuration options for all Zynq boards. |
6 | * | 6 | * |
7 | * SPDX-License-Identifier: GPL-2.0+ | 7 | * SPDX-License-Identifier: GPL-2.0+ |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef __CONFIG_ZYNQ_COMMON_H | 10 | #ifndef __CONFIG_ZYNQ_COMMON_H |
11 | #define __CONFIG_ZYNQ_COMMON_H | 11 | #define __CONFIG_ZYNQ_COMMON_H |
12 | 12 | ||
13 | /* CPU clock */ | 13 | /* CPU clock */ |
14 | #ifndef CONFIG_CPU_FREQ_HZ | 14 | #ifndef CONFIG_CPU_FREQ_HZ |
15 | # define CONFIG_CPU_FREQ_HZ 800000000 | 15 | # define CONFIG_CPU_FREQ_HZ 800000000 |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | /* Cache options */ | 18 | /* Cache options */ |
19 | #define CONFIG_SYS_L2CACHE_OFF | 19 | #define CONFIG_SYS_L2CACHE_OFF |
20 | #ifndef CONFIG_SYS_L2CACHE_OFF | 20 | #ifndef CONFIG_SYS_L2CACHE_OFF |
21 | # define CONFIG_SYS_L2_PL310 | 21 | # define CONFIG_SYS_L2_PL310 |
22 | # define CONFIG_SYS_PL310_BASE 0xf8f02000 | 22 | # define CONFIG_SYS_PL310_BASE 0xf8f02000 |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | #define ZYNQ_SCUTIMER_BASEADDR 0xF8F00600 | 25 | #define ZYNQ_SCUTIMER_BASEADDR 0xF8F00600 |
26 | #define CONFIG_SYS_TIMERBASE ZYNQ_SCUTIMER_BASEADDR | 26 | #define CONFIG_SYS_TIMERBASE ZYNQ_SCUTIMER_BASEADDR |
27 | #define CONFIG_SYS_TIMER_COUNTS_DOWN | 27 | #define CONFIG_SYS_TIMER_COUNTS_DOWN |
28 | #define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMERBASE + 0x4) | 28 | #define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMERBASE + 0x4) |
29 | 29 | ||
30 | /* Serial drivers */ | 30 | /* Serial drivers */ |
31 | /* The following table includes the supported baudrates */ | 31 | /* The following table includes the supported baudrates */ |
32 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 32 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
33 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400} | 33 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400} |
34 | 34 | ||
35 | #define CONFIG_ARM_DCC | 35 | #define CONFIG_ARM_DCC |
36 | 36 | ||
37 | /* Ethernet driver */ | 37 | /* Ethernet driver */ |
38 | #if defined(CONFIG_ZYNQ_GEM) | 38 | #if defined(CONFIG_ZYNQ_GEM) |
39 | # define CONFIG_MII | 39 | # define CONFIG_MII |
40 | # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN | 40 | # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN |
41 | # define CONFIG_BOOTP_MAY_FAIL | 41 | # define CONFIG_BOOTP_MAY_FAIL |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | /* SPI */ | 44 | /* SPI */ |
45 | #ifdef CONFIG_ZYNQ_SPI | 45 | #ifdef CONFIG_ZYNQ_SPI |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | /* QSPI */ | 48 | /* QSPI */ |
49 | #ifdef CONFIG_ZYNQ_QSPI | 49 | #ifdef CONFIG_ZYNQ_QSPI |
50 | # define CONFIG_SF_DEFAULT_SPEED 30000000 | 50 | # define CONFIG_SF_DEFAULT_SPEED 30000000 |
51 | # define CONFIG_SPI_FLASH_ISSI | 51 | # define CONFIG_SPI_FLASH_ISSI |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | /* NOR */ | 54 | /* NOR */ |
55 | #ifdef CONFIG_MTD_NOR_FLASH | 55 | #ifdef CONFIG_MTD_NOR_FLASH |
56 | # define CONFIG_SYS_FLASH_BASE 0xE2000000 | 56 | # define CONFIG_SYS_FLASH_BASE 0xE2000000 |
57 | # define CONFIG_SYS_FLASH_SIZE (16 * 1024 * 1024) | 57 | # define CONFIG_SYS_FLASH_SIZE (16 * 1024 * 1024) |
58 | # define CONFIG_SYS_MAX_FLASH_BANKS 1 | 58 | # define CONFIG_SYS_MAX_FLASH_BANKS 1 |
59 | # define CONFIG_SYS_MAX_FLASH_SECT 512 | 59 | # define CONFIG_SYS_MAX_FLASH_SECT 512 |
60 | # define CONFIG_SYS_FLASH_ERASE_TOUT 1000 | 60 | # define CONFIG_SYS_FLASH_ERASE_TOUT 1000 |
61 | # define CONFIG_SYS_FLASH_WRITE_TOUT 5000 | 61 | # define CONFIG_SYS_FLASH_WRITE_TOUT 5000 |
62 | # define CONFIG_FLASH_SHOW_PROGRESS 10 | 62 | # define CONFIG_FLASH_SHOW_PROGRESS 10 |
63 | # define CONFIG_SYS_FLASH_CFI | 63 | # define CONFIG_SYS_FLASH_CFI |
64 | # undef CONFIG_SYS_FLASH_EMPTY_INFO | 64 | # undef CONFIG_SYS_FLASH_EMPTY_INFO |
65 | # define CONFIG_FLASH_CFI_DRIVER | 65 | # define CONFIG_FLASH_CFI_DRIVER |
66 | # undef CONFIG_SYS_FLASH_PROTECTION | 66 | # undef CONFIG_SYS_FLASH_PROTECTION |
67 | # define CONFIG_SYS_FLASH_USE_BUFFER_WRITE | 67 | # define CONFIG_SYS_FLASH_USE_BUFFER_WRITE |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | #ifdef CONFIG_NAND_ZYNQ | 70 | #ifdef CONFIG_NAND_ZYNQ |
71 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 | 71 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
72 | #define CONFIG_SYS_NAND_ONFI_DETECTION | 72 | #define CONFIG_SYS_NAND_ONFI_DETECTION |
73 | #define CONFIG_MTD_DEVICE | 73 | #define CONFIG_MTD_DEVICE |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | /* MMC */ | 76 | /* MMC */ |
77 | #if defined(CONFIG_MMC_SDHCI_ZYNQ) | 77 | #if defined(CONFIG_MMC_SDHCI_ZYNQ) |
78 | # define CONFIG_ZYNQ_SDHCI_MAX_FREQ 52000000 | 78 | # define CONFIG_ZYNQ_SDHCI_MAX_FREQ 52000000 |
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | #ifdef CONFIG_USB_EHCI_ZYNQ | 81 | #ifdef CONFIG_USB_EHCI_ZYNQ |
82 | # define CONFIG_EHCI_IS_TDI | 82 | # define CONFIG_EHCI_IS_TDI |
83 | 83 | ||
84 | # define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x600000 | 84 | # define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x600000 |
85 | # define DFU_DEFAULT_POLL_TIMEOUT 300 | 85 | # define DFU_DEFAULT_POLL_TIMEOUT 300 |
86 | # define CONFIG_USB_CABLE_CHECK | 86 | # define CONFIG_USB_CABLE_CHECK |
87 | # define CONFIG_THOR_RESET_OFF | 87 | # define CONFIG_THOR_RESET_OFF |
88 | # define DFU_ALT_INFO_RAM \ | 88 | # define DFU_ALT_INFO_RAM \ |
89 | "dfu_ram_info=" \ | 89 | "dfu_ram_info=" \ |
90 | "set dfu_alt_info " \ | 90 | "set dfu_alt_info " \ |
91 | "${kernel_image} ram 0x3000000 0x500000\\\\;" \ | 91 | "${kernel_image} ram 0x3000000 0x500000\\\\;" \ |
92 | "${devicetree_image} ram 0x2A00000 0x20000\\\\;" \ | 92 | "${devicetree_image} ram 0x2A00000 0x20000\\\\;" \ |
93 | "${ramdisk_image} ram 0x2000000 0x600000\0" \ | 93 | "${ramdisk_image} ram 0x2000000 0x600000\0" \ |
94 | "dfu_ram=run dfu_ram_info && dfu 0 ram 0\0" \ | 94 | "dfu_ram=run dfu_ram_info && dfu 0 ram 0\0" \ |
95 | "thor_ram=run dfu_ram_info && thordown 0 ram 0\0" | 95 | "thor_ram=run dfu_ram_info && thordown 0 ram 0\0" |
96 | 96 | ||
97 | # if defined(CONFIG_MMC_SDHCI_ZYNQ) | 97 | # if defined(CONFIG_MMC_SDHCI_ZYNQ) |
98 | # define DFU_ALT_INFO_MMC \ | 98 | # define DFU_ALT_INFO_MMC \ |
99 | "dfu_mmc_info=" \ | 99 | "dfu_mmc_info=" \ |
100 | "set dfu_alt_info " \ | 100 | "set dfu_alt_info " \ |
101 | "${kernel_image} fat 0 1\\\\;" \ | 101 | "${kernel_image} fat 0 1\\\\;" \ |
102 | "${devicetree_image} fat 0 1\\\\;" \ | 102 | "${devicetree_image} fat 0 1\\\\;" \ |
103 | "${ramdisk_image} fat 0 1\0" \ | 103 | "${ramdisk_image} fat 0 1\0" \ |
104 | "dfu_mmc=run dfu_mmc_info && dfu 0 mmc 0\0" \ | 104 | "dfu_mmc=run dfu_mmc_info && dfu 0 mmc 0\0" \ |
105 | "thor_mmc=run dfu_mmc_info && thordown 0 mmc 0\0" | 105 | "thor_mmc=run dfu_mmc_info && thordown 0 mmc 0\0" |
106 | 106 | ||
107 | # define DFU_ALT_INFO \ | 107 | # define DFU_ALT_INFO \ |
108 | DFU_ALT_INFO_RAM \ | 108 | DFU_ALT_INFO_RAM \ |
109 | DFU_ALT_INFO_MMC | 109 | DFU_ALT_INFO_MMC |
110 | # else | 110 | # else |
111 | # define DFU_ALT_INFO \ | 111 | # define DFU_ALT_INFO \ |
112 | DFU_ALT_INFO_RAM | 112 | DFU_ALT_INFO_RAM |
113 | # endif | 113 | # endif |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | #if !defined(DFU_ALT_INFO) | 116 | #if !defined(DFU_ALT_INFO) |
117 | # define DFU_ALT_INFO | 117 | # define DFU_ALT_INFO |
118 | #endif | 118 | #endif |
119 | 119 | ||
120 | /* I2C */ | 120 | /* I2C */ |
121 | #if defined(CONFIG_SYS_I2C_ZYNQ) | 121 | #if defined(CONFIG_SYS_I2C_ZYNQ) |
122 | # define CONFIG_SYS_I2C | 122 | # define CONFIG_SYS_I2C |
123 | # define CONFIG_SYS_I2C_ZYNQ_SPEED 100000 | ||
124 | #endif | 123 | #endif |
125 | 124 | ||
126 | /* EEPROM */ | 125 | /* EEPROM */ |
127 | #ifdef CONFIG_ZYNQ_EEPROM | 126 | #ifdef CONFIG_ZYNQ_EEPROM |
128 | # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 | 127 | # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
129 | # define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 | 128 | # define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 |
130 | # define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 | 129 | # define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 |
131 | # define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 | 130 | # define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 |
132 | # define CONFIG_SYS_EEPROM_SIZE 1024 /* Bytes */ | 131 | # define CONFIG_SYS_EEPROM_SIZE 1024 /* Bytes */ |
133 | #endif | 132 | #endif |
134 | 133 | ||
135 | /* Total Size of Environment Sector */ | 134 | /* Total Size of Environment Sector */ |
136 | #define CONFIG_ENV_SIZE (128 << 10) | 135 | #define CONFIG_ENV_SIZE (128 << 10) |
137 | 136 | ||
138 | /* Allow to overwrite serial and ethaddr */ | 137 | /* Allow to overwrite serial and ethaddr */ |
139 | #define CONFIG_ENV_OVERWRITE | 138 | #define CONFIG_ENV_OVERWRITE |
140 | 139 | ||
141 | /* Environment */ | 140 | /* Environment */ |
142 | #ifndef CONFIG_ENV_IS_NOWHERE | 141 | #ifndef CONFIG_ENV_IS_NOWHERE |
143 | # define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE | 142 | # define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE |
144 | # define CONFIG_ENV_OFFSET 0xE0000 | 143 | # define CONFIG_ENV_OFFSET 0xE0000 |
145 | #endif | 144 | #endif |
146 | 145 | ||
147 | /* enable preboot to be loaded before CONFIG_BOOTDELAY */ | 146 | /* enable preboot to be loaded before CONFIG_BOOTDELAY */ |
148 | #define CONFIG_PREBOOT | 147 | #define CONFIG_PREBOOT |
149 | 148 | ||
150 | /* Boot configuration */ | 149 | /* Boot configuration */ |
151 | #define CONFIG_SYS_LOAD_ADDR 0 /* default? */ | 150 | #define CONFIG_SYS_LOAD_ADDR 0 /* default? */ |
152 | 151 | ||
153 | /* Distro boot enablement */ | 152 | /* Distro boot enablement */ |
154 | 153 | ||
155 | #ifdef CONFIG_SPL_BUILD | 154 | #ifdef CONFIG_SPL_BUILD |
156 | #define BOOTENV | 155 | #define BOOTENV |
157 | #else | 156 | #else |
158 | 157 | ||
159 | #ifdef CONFIG_CMD_MMC | 158 | #ifdef CONFIG_CMD_MMC |
160 | #define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) | 159 | #define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) |
161 | #else | 160 | #else |
162 | #define BOOT_TARGET_DEVICES_MMC(func) | 161 | #define BOOT_TARGET_DEVICES_MMC(func) |
163 | #endif | 162 | #endif |
164 | 163 | ||
165 | #ifdef CONFIG_CMD_USB | 164 | #ifdef CONFIG_CMD_USB |
166 | #define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) | 165 | #define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) |
167 | #else | 166 | #else |
168 | #define BOOT_TARGET_DEVICES_USB(func) | 167 | #define BOOT_TARGET_DEVICES_USB(func) |
169 | #endif | 168 | #endif |
170 | 169 | ||
171 | #if defined(CONFIG_CMD_PXE) | 170 | #if defined(CONFIG_CMD_PXE) |
172 | #define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na) | 171 | #define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na) |
173 | #else | 172 | #else |
174 | #define BOOT_TARGET_DEVICES_PXE(func) | 173 | #define BOOT_TARGET_DEVICES_PXE(func) |
175 | #endif | 174 | #endif |
176 | 175 | ||
177 | #if defined(CONFIG_CMD_DHCP) | 176 | #if defined(CONFIG_CMD_DHCP) |
178 | #define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na) | 177 | #define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na) |
179 | #else | 178 | #else |
180 | #define BOOT_TARGET_DEVICES_DHCP(func) | 179 | #define BOOT_TARGET_DEVICES_DHCP(func) |
181 | #endif | 180 | #endif |
182 | 181 | ||
183 | #define BOOT_TARGET_DEVICES(func) \ | 182 | #define BOOT_TARGET_DEVICES(func) \ |
184 | BOOT_TARGET_DEVICES_MMC(func) \ | 183 | BOOT_TARGET_DEVICES_MMC(func) \ |
185 | BOOT_TARGET_DEVICES_USB(func) \ | 184 | BOOT_TARGET_DEVICES_USB(func) \ |
186 | BOOT_TARGET_DEVICES_PXE(func) \ | 185 | BOOT_TARGET_DEVICES_PXE(func) \ |
187 | BOOT_TARGET_DEVICES_DHCP(func) | 186 | BOOT_TARGET_DEVICES_DHCP(func) |
188 | 187 | ||
189 | #include <config_distro_bootcmd.h> | 188 | #include <config_distro_bootcmd.h> |
190 | #endif /* CONFIG_SPL_BUILD */ | 189 | #endif /* CONFIG_SPL_BUILD */ |
191 | 190 | ||
192 | /* Default environment */ | 191 | /* Default environment */ |
193 | #ifndef CONFIG_EXTRA_ENV_SETTINGS | 192 | #ifndef CONFIG_EXTRA_ENV_SETTINGS |
194 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 193 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
195 | "fit_image=fit.itb\0" \ | 194 | "fit_image=fit.itb\0" \ |
196 | "load_addr=0x2000000\0" \ | 195 | "load_addr=0x2000000\0" \ |
197 | "fit_size=0x800000\0" \ | 196 | "fit_size=0x800000\0" \ |
198 | "flash_off=0x100000\0" \ | 197 | "flash_off=0x100000\0" \ |
199 | "nor_flash_off=0xE2100000\0" \ | 198 | "nor_flash_off=0xE2100000\0" \ |
200 | "fdt_high=0x20000000\0" \ | 199 | "fdt_high=0x20000000\0" \ |
201 | "initrd_high=0x20000000\0" \ | 200 | "initrd_high=0x20000000\0" \ |
202 | "loadbootenv_addr=0x2000000\0" \ | 201 | "loadbootenv_addr=0x2000000\0" \ |
203 | "fdt_addr_r=0x1f00000\0" \ | 202 | "fdt_addr_r=0x1f00000\0" \ |
204 | "pxefile_addr_r=0x2000000\0" \ | 203 | "pxefile_addr_r=0x2000000\0" \ |
205 | "kernel_addr_r=0x2000000\0" \ | 204 | "kernel_addr_r=0x2000000\0" \ |
206 | "scriptaddr=0x3000000\0" \ | 205 | "scriptaddr=0x3000000\0" \ |
207 | "ramdisk_addr_r=0x3100000\0" \ | 206 | "ramdisk_addr_r=0x3100000\0" \ |
208 | "bootenv=uEnv.txt\0" \ | 207 | "bootenv=uEnv.txt\0" \ |
209 | "bootenv_dev=mmc\0" \ | 208 | "bootenv_dev=mmc\0" \ |
210 | "loadbootenv=load ${bootenv_dev} 0 ${loadbootenv_addr} ${bootenv}\0" \ | 209 | "loadbootenv=load ${bootenv_dev} 0 ${loadbootenv_addr} ${bootenv}\0" \ |
211 | "importbootenv=echo Importing environment from ${bootenv_dev} ...; " \ | 210 | "importbootenv=echo Importing environment from ${bootenv_dev} ...; " \ |
212 | "env import -t ${loadbootenv_addr} $filesize\0" \ | 211 | "env import -t ${loadbootenv_addr} $filesize\0" \ |
213 | "bootenv_existence_test=test -e ${bootenv_dev} 0 /${bootenv}\0" \ | 212 | "bootenv_existence_test=test -e ${bootenv_dev} 0 /${bootenv}\0" \ |
214 | "setbootenv=if env run bootenv_existence_test; then " \ | 213 | "setbootenv=if env run bootenv_existence_test; then " \ |
215 | "if env run loadbootenv; then " \ | 214 | "if env run loadbootenv; then " \ |
216 | "env run importbootenv; " \ | 215 | "env run importbootenv; " \ |
217 | "fi; " \ | 216 | "fi; " \ |
218 | "fi; \0" \ | 217 | "fi; \0" \ |
219 | "sd_loadbootenv=set bootenv_dev mmc && " \ | 218 | "sd_loadbootenv=set bootenv_dev mmc && " \ |
220 | "run setbootenv \0" \ | 219 | "run setbootenv \0" \ |
221 | "usb_loadbootenv=set bootenv_dev usb && usb start && run setbootenv \0" \ | 220 | "usb_loadbootenv=set bootenv_dev usb && usb start && run setbootenv \0" \ |
222 | "preboot=if test $modeboot = sdboot; then " \ | 221 | "preboot=if test $modeboot = sdboot; then " \ |
223 | "run sd_loadbootenv; " \ | 222 | "run sd_loadbootenv; " \ |
224 | "echo Checking if uenvcmd is set ...; " \ | 223 | "echo Checking if uenvcmd is set ...; " \ |
225 | "if test -n $uenvcmd; then " \ | 224 | "if test -n $uenvcmd; then " \ |
226 | "echo Running uenvcmd ...; " \ | 225 | "echo Running uenvcmd ...; " \ |
227 | "run uenvcmd; " \ | 226 | "run uenvcmd; " \ |
228 | "fi; " \ | 227 | "fi; " \ |
229 | "fi; \0" \ | 228 | "fi; \0" \ |
230 | "norboot=echo Copying FIT from NOR flash to RAM... && " \ | 229 | "norboot=echo Copying FIT from NOR flash to RAM... && " \ |
231 | "cp.b ${nor_flash_off} ${load_addr} ${fit_size} && " \ | 230 | "cp.b ${nor_flash_off} ${load_addr} ${fit_size} && " \ |
232 | "bootm ${load_addr}\0" \ | 231 | "bootm ${load_addr}\0" \ |
233 | "sdboot=echo Copying FIT from SD to RAM... && " \ | 232 | "sdboot=echo Copying FIT from SD to RAM... && " \ |
234 | "load mmc 0 ${load_addr} ${fit_image} && " \ | 233 | "load mmc 0 ${load_addr} ${fit_image} && " \ |
235 | "bootm ${load_addr}\0" \ | 234 | "bootm ${load_addr}\0" \ |
236 | "jtagboot=echo TFTPing FIT to RAM... && " \ | 235 | "jtagboot=echo TFTPing FIT to RAM... && " \ |
237 | "tftpboot ${load_addr} ${fit_image} && " \ | 236 | "tftpboot ${load_addr} ${fit_image} && " \ |
238 | "bootm ${load_addr}\0" \ | 237 | "bootm ${load_addr}\0" \ |
239 | "usbboot=if usb start; then " \ | 238 | "usbboot=if usb start; then " \ |
240 | "echo Copying FIT from USB to RAM... && " \ | 239 | "echo Copying FIT from USB to RAM... && " \ |
241 | "load usb 0 ${load_addr} ${fit_image} && " \ | 240 | "load usb 0 ${load_addr} ${fit_image} && " \ |
242 | "bootm ${load_addr}; fi\0" \ | 241 | "bootm ${load_addr}; fi\0" \ |
243 | DFU_ALT_INFO \ | 242 | DFU_ALT_INFO \ |
244 | BOOTENV | 243 | BOOTENV |
245 | #endif | 244 | #endif |
246 | 245 | ||
247 | /* Miscellaneous configurable options */ | 246 | /* Miscellaneous configurable options */ |
248 | 247 | ||
249 | #define CONFIG_CLOCKS | 248 | #define CONFIG_CLOCKS |
250 | #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ | 249 | #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ |
251 | 250 | ||
252 | #ifndef CONFIG_NR_DRAM_BANKS | 251 | #ifndef CONFIG_NR_DRAM_BANKS |
253 | # define CONFIG_NR_DRAM_BANKS 1 | 252 | # define CONFIG_NR_DRAM_BANKS 1 |
254 | #endif | 253 | #endif |
255 | 254 | ||
256 | #define CONFIG_SYS_MEMTEST_START 0 | 255 | #define CONFIG_SYS_MEMTEST_START 0 |
257 | #define CONFIG_SYS_MEMTEST_END 0x1000 | 256 | #define CONFIG_SYS_MEMTEST_END 0x1000 |
258 | 257 | ||
259 | #define CONFIG_SYS_MALLOC_LEN 0x1400000 | 258 | #define CONFIG_SYS_MALLOC_LEN 0x1400000 |
260 | 259 | ||
261 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFFFF0000 | 260 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFFFF0000 |
262 | #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 | 261 | #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 |
263 | #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ | 262 | #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ |
264 | CONFIG_SYS_INIT_RAM_SIZE - \ | 263 | CONFIG_SYS_INIT_RAM_SIZE - \ |
265 | GENERATED_GBL_DATA_SIZE) | 264 | GENERATED_GBL_DATA_SIZE) |
266 | 265 | ||
267 | 266 | ||
268 | /* FIT support */ | 267 | /* FIT support */ |
269 | #define CONFIG_IMAGE_FORMAT_LEGACY /* enable also legacy image format */ | 268 | #define CONFIG_IMAGE_FORMAT_LEGACY /* enable also legacy image format */ |
270 | 269 | ||
271 | /* Extend size of kernel image for uncompression */ | 270 | /* Extend size of kernel image for uncompression */ |
272 | #define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024) | 271 | #define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024) |
273 | 272 | ||
274 | /* Boot FreeBSD/vxWorks from an ELF image */ | 273 | /* Boot FreeBSD/vxWorks from an ELF image */ |
275 | #define CONFIG_SYS_MMC_MAX_DEVICE 1 | 274 | #define CONFIG_SYS_MMC_MAX_DEVICE 1 |
276 | 275 | ||
277 | #define CONFIG_SYS_LDSCRIPT "arch/arm/mach-zynq/u-boot.lds" | 276 | #define CONFIG_SYS_LDSCRIPT "arch/arm/mach-zynq/u-boot.lds" |
278 | 277 | ||
279 | /* Commands */ | 278 | /* Commands */ |
280 | 279 | ||
281 | /* SPL part */ | 280 | /* SPL part */ |
282 | 281 | ||
283 | /* MMC support */ | 282 | /* MMC support */ |
284 | #ifdef CONFIG_MMC_SDHCI_ZYNQ | 283 | #ifdef CONFIG_MMC_SDHCI_ZYNQ |
285 | #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 | 284 | #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 |
286 | #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" | 285 | #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" |
287 | #endif | 286 | #endif |
288 | 287 | ||
289 | /* Disable dcache for SPL just for sure */ | 288 | /* Disable dcache for SPL just for sure */ |
290 | #ifdef CONFIG_SPL_BUILD | 289 | #ifdef CONFIG_SPL_BUILD |
291 | #define CONFIG_SYS_DCACHE_OFF | 290 | #define CONFIG_SYS_DCACHE_OFF |
292 | #endif | 291 | #endif |
293 | 292 | ||
294 | /* Address in RAM where the parameters must be copied by SPL. */ | 293 | /* Address in RAM where the parameters must be copied by SPL. */ |
295 | #define CONFIG_SYS_SPL_ARGS_ADDR 0x10000000 | 294 | #define CONFIG_SYS_SPL_ARGS_ADDR 0x10000000 |
296 | 295 | ||
297 | #define CONFIG_SPL_FS_LOAD_ARGS_NAME "system.dtb" | 296 | #define CONFIG_SPL_FS_LOAD_ARGS_NAME "system.dtb" |
298 | #define CONFIG_SPL_FS_LOAD_KERNEL_NAME "uImage" | 297 | #define CONFIG_SPL_FS_LOAD_KERNEL_NAME "uImage" |
299 | 298 | ||
300 | /* Not using MMC raw mode - just for compilation purpose */ | 299 | /* Not using MMC raw mode - just for compilation purpose */ |
301 | #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0 | 300 | #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0 |
302 | #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0 | 301 | #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0 |
303 | #define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0 | 302 | #define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0 |
304 | 303 | ||
305 | /* qspi mode is working fine */ | 304 | /* qspi mode is working fine */ |
306 | #ifdef CONFIG_ZYNQ_QSPI | 305 | #ifdef CONFIG_ZYNQ_QSPI |
307 | #define CONFIG_SPL_SPI_LOAD | 306 | #define CONFIG_SPL_SPI_LOAD |
308 | #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x100000 | 307 | #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x100000 |
309 | #define CONFIG_SYS_SPI_ARGS_OFFS 0x200000 | 308 | #define CONFIG_SYS_SPI_ARGS_OFFS 0x200000 |
310 | #define CONFIG_SYS_SPI_ARGS_SIZE 0x80000 | 309 | #define CONFIG_SYS_SPI_ARGS_SIZE 0x80000 |
311 | #define CONFIG_SYS_SPI_KERNEL_OFFS (CONFIG_SYS_SPI_ARGS_OFFS + \ | 310 | #define CONFIG_SYS_SPI_KERNEL_OFFS (CONFIG_SYS_SPI_ARGS_OFFS + \ |
312 | CONFIG_SYS_SPI_ARGS_SIZE) | 311 | CONFIG_SYS_SPI_ARGS_SIZE) |
313 | #endif | 312 | #endif |
314 | 313 | ||
315 | /* for booting directly linux */ | 314 | /* for booting directly linux */ |
316 | 315 | ||
317 | /* SP location before relocation, must use scratch RAM */ | 316 | /* SP location before relocation, must use scratch RAM */ |
318 | #define CONFIG_SPL_TEXT_BASE 0x0 | 317 | #define CONFIG_SPL_TEXT_BASE 0x0 |
319 | 318 | ||
320 | /* 3 * 64kB blocks of OCM - one is on the top because of bootrom */ | 319 | /* 3 * 64kB blocks of OCM - one is on the top because of bootrom */ |
321 | #define CONFIG_SPL_MAX_SIZE 0x30000 | 320 | #define CONFIG_SPL_MAX_SIZE 0x30000 |
322 | 321 | ||
323 | /* On the top of OCM space */ | 322 | /* On the top of OCM space */ |
324 | #define CONFIG_SYS_SPL_MALLOC_START CONFIG_SPL_STACK_R_ADDR | 323 | #define CONFIG_SYS_SPL_MALLOC_START CONFIG_SPL_STACK_R_ADDR |
325 | #define CONFIG_SYS_SPL_MALLOC_SIZE 0x2000000 | 324 | #define CONFIG_SYS_SPL_MALLOC_SIZE 0x2000000 |
326 | 325 | ||
327 | /* | 326 | /* |
328 | * SPL stack position - and stack goes down | 327 | * SPL stack position - and stack goes down |
329 | * 0xfffffe00 is used for putting wfi loop. | 328 | * 0xfffffe00 is used for putting wfi loop. |
330 | * Set it up as limit for now. | 329 | * Set it up as limit for now. |
331 | */ | 330 | */ |
332 | #define CONFIG_SPL_STACK 0xfffffe00 | 331 | #define CONFIG_SPL_STACK 0xfffffe00 |
333 | 332 | ||
334 | /* BSS setup */ | 333 | /* BSS setup */ |
335 | #define CONFIG_SPL_BSS_START_ADDR 0x100000 | 334 | #define CONFIG_SPL_BSS_START_ADDR 0x100000 |
336 | #define CONFIG_SPL_BSS_MAX_SIZE 0x100000 | 335 | #define CONFIG_SPL_BSS_MAX_SIZE 0x100000 |
337 | 336 | ||
338 | #define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE | 337 | #define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE |
339 | 338 | ||
340 | #endif /* __CONFIG_ZYNQ_COMMON_H */ | 339 | #endif /* __CONFIG_ZYNQ_COMMON_H */ |
341 | 340 |