修订版 | e5aa3f4d97b11271c3a2407e272a131b7e975c61 (tree) |
---|---|
时间 | 2019-01-10 23:28:16 |
作者 | Tom Rini <trini@kons...> |
Commiter | Tom Rini |
Merge tag 'u-boot-imx-20190110' of git://git.denx.de/u-boot-imx
Fixes for 2019.01
@@ -123,7 +123,7 @@ F: drivers/spi/bcmstb_spi.c | ||
123 | 123 | ARM FREESCALE IMX |
124 | 124 | M: Stefano Babic <sbabic@denx.de> |
125 | 125 | M: Fabio Estevam <fabio.estevam@nxp.com> |
126 | -R: NXP Linux Team <linux-imx@nxp.com> | |
126 | +R: NXP i.MX U-Boot Team <uboot-imx@nxp.com> | |
127 | 127 | S: Maintained |
128 | 128 | T: git git://git.denx.de/u-boot-imx.git |
129 | 129 | F: arch/arm/cpu/arm1136/mx*/ |
@@ -1155,6 +1155,9 @@ U_BOOT_ITS = $(subst ",,$(CONFIG_SPL_FIT_SOURCE)) | ||
1155 | 1155 | else |
1156 | 1156 | ifneq ($(CONFIG_SPL_FIT_GENERATOR),"") |
1157 | 1157 | U_BOOT_ITS := u-boot.its |
1158 | +ifeq ($(CONFIG_SPL_FIT_GENERATOR),"arch/arm/mach-imx/mkimage_fit_atf.sh") | |
1159 | +U_BOOT_ITS_DEPS += u-boot-nodtb.bin | |
1160 | +endif | |
1158 | 1161 | ifeq ($(CONFIG_SPL_FIT_GENERATOR),"arch/arm/mach-rockchip/make_fit_atf.py") |
1159 | 1162 | U_BOOT_ITS_DEPS += u-boot |
1160 | 1163 | endif |
@@ -200,7 +200,8 @@ | ||
200 | 200 | #define DDRMC_CR78_Q_FULLNESS(v) (((v) & 0x7) << 24) |
201 | 201 | #define DDRMC_CR78_BUR_ON_FLY_BIT(v) ((v) & 0xf) |
202 | 202 | #define DDRMC_CR79_CTLUPD_AREF(v) (((v) & 0x1) << 24) |
203 | -#define DDRMC_CR82_INT_MASK 0x10000000 | |
203 | +#define DDRMC_CR80_MC_INIT_COMPLETE (1 << 8) | |
204 | +#define DDRMC_CR82_INT_MASK (1 << 28) | |
204 | 205 | #define DDRMC_CR87_ODT_WR_MAPCS0(v) ((v) << 24) |
205 | 206 | #define DDRMC_CR87_ODT_RD_MAPCS0(v) ((v) << 16) |
206 | 207 | #define DDRMC_CR88_TODTL_CMD(v) (((v) & 0x1f) << 16) |
@@ -239,7 +240,7 @@ | ||
239 | 240 | #define DDRMC_CR132_RDLAT_ADJ(v) ((v) & 0x3f) |
240 | 241 | #define DDRMC_CR137_PHYCTL_DL(v) (((v) & 0xf) << 16) |
241 | 242 | #define DDRMC_CR138_PHY_WRLV_MXDL(v) (((v) & 0xffff) << 16) |
242 | -#define DDRMC_CR138_PHYDRAM_CK_EN(v) (((v) & 0x8) << 8) | |
243 | +#define DDRMC_CR138_PHYDRAM_CK_EN(v) (((v) & 0x7) << 8) | |
243 | 244 | #define DDRMC_CR139_PHY_WRLV_RESPLAT(v) (((v) & 0xff) << 24) |
244 | 245 | #define DDRMC_CR139_PHY_WRLV_LOAD(v) (((v) & 0xff) << 16) |
245 | 246 | #define DDRMC_CR139_PHY_WRLV_DLL(v) (((v) & 0xff) << 8) |
@@ -244,6 +244,8 @@ enum { | ||
244 | 244 | VF610_PAD_DDR_WE__DDR_WE_B = IOMUX_PAD(0x02d0, 0x02d0, 0, __NA_, 0, VF610_DDR_PAD_CTRL), |
245 | 245 | VF610_PAD_DDR_ODT1__DDR_ODT_0 = IOMUX_PAD(0x02d4, 0x02d4, 0, __NA_, 0, VF610_DDR_PAD_CTRL), |
246 | 246 | VF610_PAD_DDR_ODT0__DDR_ODT_1 = IOMUX_PAD(0x02d8, 0x02d8, 0, __NA_, 0, VF610_DDR_PAD_CTRL), |
247 | + VF610_PAD_DDR_DDRBYTE1__DDR_DDRBYTE1 = IOMUX_PAD(0x02dc, 0x02dc, 0, __NA_, 0, VF610_DDR_PAD_CTRL), | |
248 | + VF610_PAD_DDR_DDRBYTE2__DDR_DDRBYTE2 = IOMUX_PAD(0x02e0, 0x02e0, 0, __NA_, 0, VF610_DDR_PAD_CTRL), | |
247 | 249 | }; |
248 | 250 | |
249 | 251 | #endif /* __IOMUX_VF610_H__ */ |
@@ -61,6 +61,8 @@ void ddrmc_setup_iomux(const iomux_v3_cfg_t *pads, int pads_count) | ||
61 | 61 | VF610_PAD_DDR_WE__DDR_WE_B, |
62 | 62 | VF610_PAD_DDR_ODT1__DDR_ODT_0, |
63 | 63 | VF610_PAD_DDR_ODT0__DDR_ODT_1, |
64 | + VF610_PAD_DDR_DDRBYTE1__DDR_DDRBYTE1, | |
65 | + VF610_PAD_DDR_DDRBYTE2__DDR_DDRBYTE2, | |
64 | 66 | VF610_PAD_DDR_RESETB, |
65 | 67 | }; |
66 | 68 |
@@ -188,7 +190,6 @@ void ddrmc_ctrl_init_ddr3(struct ddr3_jedec_timings const *timings, | ||
188 | 190 | DDRMC_CR77_SWAP_EN, &ddrmr->cr[77]); |
189 | 191 | writel(DDRMC_CR78_Q_FULLNESS(timings->q_fullness) | |
190 | 192 | DDRMC_CR78_BUR_ON_FLY_BIT(12), &ddrmr->cr[78]); |
191 | - writel(DDRMC_CR79_CTLUPD_AREF(0), &ddrmr->cr[79]); | |
192 | 193 | |
193 | 194 | writel(DDRMC_CR82_INT_MASK, &ddrmr->cr[82]); |
194 | 195 |
@@ -231,6 +232,7 @@ void ddrmc_ctrl_init_ddr3(struct ddr3_jedec_timings const *timings, | ||
231 | 232 | /* all inits done, start the DDR controller */ |
232 | 233 | writel(DDRMC_CR00_DRAM_CLASS_DDR3 | DDRMC_CR00_START, &ddrmr->cr[0]); |
233 | 234 | |
234 | - while (!(readl(&ddrmr->cr[80]) && 0x100)) | |
235 | + while (!(readl(&ddrmr->cr[80]) & DDRMC_CR80_MC_INIT_COMPLETE)) | |
235 | 236 | udelay(10); |
237 | + writel(DDRMC_CR80_MC_INIT_COMPLETE, &ddrmr->cr[81]); | |
236 | 238 | } |
@@ -573,7 +573,7 @@ int cpu_imx_get_desc(struct udevice *dev, char *buf, int size) | ||
573 | 573 | if (size < 100) |
574 | 574 | return -ENOSPC; |
575 | 575 | |
576 | - snprintf(buf, size, "CPU: Freescale i.MX8%s Rev%s %s at %u MHz\n", | |
576 | + snprintf(buf, size, "NXP i.MX8%s Rev%s %s at %u MHz\n", | |
577 | 577 | plat->type, plat->rev, plat->name, plat->freq_mhz); |
578 | 578 | |
579 | 579 | return 0; |
@@ -250,9 +250,9 @@ static u32 get_root_src_clk(enum clk_root_src root_src) | ||
250 | 250 | case OSC_25M_CLK: |
251 | 251 | return 25000000; |
252 | 252 | case OSC_27M_CLK: |
253 | - return 25000000; | |
253 | + return 27000000; | |
254 | 254 | case OSC_32K_CLK: |
255 | - return 32000; | |
255 | + return 32768; | |
256 | 256 | case ARM_PLL_CLK: |
257 | 257 | return decode_frac_pll(root_src); |
258 | 258 | case SYSTEM_PLL1_800M_CLK: |
@@ -42,14 +42,6 @@ DECLARE_GLOBAL_DATA_PTR; | ||
42 | 42 | #define USB_CDET_GPIO 102 |
43 | 43 | |
44 | 44 | static struct ddrmc_cr_setting colibri_vf_cr_settings[] = { |
45 | - /* levelling */ | |
46 | - { DDRMC_CR97_WRLVL_EN, 97 }, | |
47 | - { DDRMC_CR98_WRLVL_DL_0(0), 98 }, | |
48 | - { DDRMC_CR99_WRLVL_DL_1(0), 99 }, | |
49 | - { DDRMC_CR102_RDLVL_REG_EN | DDRMC_CR102_RDLVL_GT_REGEN, 102 }, | |
50 | - { DDRMC_CR105_RDLVL_DL_0(0), 105 }, | |
51 | - { DDRMC_CR106_RDLVL_GTDL_0(4), 106 }, | |
52 | - { DDRMC_CR110_RDLVL_DL_1(0) | DDRMC_CR110_RDLVL_GTDL_1(4), 110 }, | |
53 | 45 | /* AXI */ |
54 | 46 | { DDRMC_CR117_AXI0_W_PRI(0) | DDRMC_CR117_AXI0_R_PRI(0), 117 }, |
55 | 47 | { DDRMC_CR118_AXI1_W_PRI(1) | DDRMC_CR118_AXI1_R_PRI(1), 118 }, |
@@ -88,7 +80,7 @@ static struct ddrmc_cr_setting colibri_vf_cr_settings[] = { | ||
88 | 80 | DDRMC_CR154_PAD_ZQ_MODE(1) | |
89 | 81 | DDRMC_CR154_DDR_SEL_PAD_CONTR(3) | |
90 | 82 | DDRMC_CR154_PAD_ZQ_HW_FOR(1), 154 }, |
91 | - { DDRMC_CR155_PAD_ODT_BYTE1(1) | DDRMC_CR155_PAD_ODT_BYTE0(1), 155 }, | |
83 | + { DDRMC_CR155_PAD_ODT_BYTE1(2) | DDRMC_CR155_PAD_ODT_BYTE0(2), 155 }, | |
92 | 84 | { DDRMC_CR158_TWR(6), 158 }, |
93 | 85 | { DDRMC_CR161_ODT_EN(1) | DDRMC_CR161_TODTH_RD(2) | |
94 | 86 | DDRMC_CR161_TODTH_WR(2), 161 }, |
@@ -23,11 +23,14 @@ CONFIG_CMD_MEMTEST=y | ||
23 | 23 | CONFIG_CMD_DFU=y |
24 | 24 | CONFIG_CMD_FUSE=y |
25 | 25 | CONFIG_CMD_GPIO=y |
26 | +# CONFIG_CMD_LOADB is not set | |
27 | +# CONFIG_CMD_LOADS is not set | |
26 | 28 | CONFIG_CMD_MMC=y |
27 | 29 | CONFIG_CMD_USB=y |
28 | 30 | CONFIG_CMD_USB_MASS_STORAGE=y |
29 | 31 | # CONFIG_CMD_SETEXPR is not set |
30 | 32 | CONFIG_CMD_DHCP=y |
33 | +# CONFIG_CMD_NFS is not set | |
31 | 34 | CONFIG_CMD_MII=y |
32 | 35 | CONFIG_CMD_PING=y |
33 | 36 | CONFIG_CMD_BMP=y |
@@ -20,6 +20,7 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y | ||
20 | 20 | CONFIG_VERSION_VARIABLE=y |
21 | 21 | CONFIG_SPL_BOARD_INIT=y |
22 | 22 | CONFIG_SPL_NAND_SUPPORT=y |
23 | +CONFIG_SPL_WATCHDOG_SUPPORT=y | |
23 | 24 | CONFIG_HUSH_PARSER=y |
24 | 25 | CONFIG_CMD_ASKENV=y |
25 | 26 | CONFIG_CMD_GREPENV=y |
@@ -33,6 +34,7 @@ CONFIG_CMD_DHCP=y | ||
33 | 34 | CONFIG_CMD_MII=y |
34 | 35 | CONFIG_CMD_PING=y |
35 | 36 | CONFIG_CMD_BMP=y |
37 | +CONFIG_CMD_BOOTCOUNT=y | |
36 | 38 | CONFIG_CMD_DATE=y |
37 | 39 | CONFIG_CMD_BTRFS=y |
38 | 40 | CONFIG_CMD_EXT4=y |
@@ -44,6 +46,11 @@ CONFIG_MTDIDS_DEFAULT="nand0=mxc_nand" | ||
44 | 46 | CONFIG_MTDPARTS_DEFAULT="mtdparts=mxc_nand:1m(u-boot),512k(env1),512k(env2),-(ubi)" |
45 | 47 | CONFIG_CMD_UBI=y |
46 | 48 | CONFIG_ENV_IS_IN_NAND=y |
49 | +CONFIG_BOOTCOUNT_LIMIT=y | |
50 | +CONFIG_BOOTCOUNT_BOOTLIMIT=3 | |
51 | +CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y | |
52 | +CONFIG_SYS_BOOTCOUNT_ADDR=0x53FA401C | |
53 | +CONFIG_SYS_BOOTCOUNT_MAGIC=0x0B01C041 | |
47 | 54 | CONFIG_FSL_ESDHC=y |
48 | 55 | CONFIG_NAND=y |
49 | 56 | CONFIG_NAND_MXC=y |
@@ -58,5 +65,6 @@ CONFIG_USB_ETHER_MCS7830=y | ||
58 | 65 | CONFIG_USB_ETHER_SMSC95XX=y |
59 | 66 | CONFIG_VIDEO=y |
60 | 67 | # CONFIG_VIDEO_SW_CURSOR is not set |
68 | +CONFIG_IMX_WATCHDOG=y | |
61 | 69 | CONFIG_FAT_WRITE=y |
62 | 70 | CONFIG_OF_LIBFDT=y |
@@ -5,7 +5,6 @@ CONFIG_SYS_TEXT_BASE=0x17800000 | ||
5 | 5 | CONFIG_TARGET_TBS2910=y |
6 | 6 | CONFIG_CMD_HDMIDETECT=y |
7 | 7 | CONFIG_NR_DRAM_BANKS=1 |
8 | -CONFIG_FIT=y | |
9 | 8 | CONFIG_BOOTDELAY=3 |
10 | 9 | CONFIG_PRE_CONSOLE_BUFFER=y |
11 | 10 | CONFIG_PRE_CON_BUF_ADDR=0x7c000000 |
@@ -18,6 +18,7 @@ struct imx8_clks { | ||
18 | 18 | const char *name; |
19 | 19 | }; |
20 | 20 | |
21 | +#if CONFIG_IS_ENABLED(CMD_CLK) | |
21 | 22 | static struct imx8_clks imx8_clk_names[] = { |
22 | 23 | { IMX8QXP_A35_DIV, "A35_DIV" }, |
23 | 24 | { IMX8QXP_I2C0_CLK, "I2C0" }, |
@@ -39,6 +40,7 @@ static struct imx8_clks imx8_clk_names[] = { | ||
39 | 40 | { IMX8QXP_ENET1_REF_DIV, "ENET1_REF" }, |
40 | 41 | { IMX8QXP_ENET1_PTP_CLK, "ENET1_PTP" }, |
41 | 42 | }; |
43 | +#endif | |
42 | 44 | |
43 | 45 | static ulong imx8_clk_get_rate(struct clk *clk) |
44 | 46 | { |
@@ -158,7 +158,7 @@ static int sc_ipc_write(struct mu_type *base, void *data) | ||
158 | 158 | static int imx8_scu_call(struct udevice *dev, int no_resp, void *tx_msg, |
159 | 159 | int tx_size, void *rx_msg, int rx_size) |
160 | 160 | { |
161 | - struct imx8_scu *priv = dev_get_priv(dev); | |
161 | + struct imx8_scu *plat = dev_get_platdata(dev); | |
162 | 162 | sc_err_t result; |
163 | 163 | int ret; |
164 | 164 |
@@ -166,11 +166,11 @@ static int imx8_scu_call(struct udevice *dev, int no_resp, void *tx_msg, | ||
166 | 166 | if (rx_msg && tx_msg != rx_msg) |
167 | 167 | printf("tx_msg %p, rx_msg %p\n", tx_msg, rx_msg); |
168 | 168 | |
169 | - ret = sc_ipc_write(priv->base, tx_msg); | |
169 | + ret = sc_ipc_write(plat->base, tx_msg); | |
170 | 170 | if (ret) |
171 | 171 | return ret; |
172 | 172 | if (!no_resp) { |
173 | - ret = sc_ipc_read(priv->base, rx_msg); | |
173 | + ret = sc_ipc_read(plat->base, rx_msg); | |
174 | 174 | if (ret) |
175 | 175 | return ret; |
176 | 176 | } |
@@ -182,24 +182,24 @@ static int imx8_scu_call(struct udevice *dev, int no_resp, void *tx_msg, | ||
182 | 182 | |
183 | 183 | static int imx8_scu_probe(struct udevice *dev) |
184 | 184 | { |
185 | - struct imx8_scu *priv = dev_get_priv(dev); | |
185 | + struct imx8_scu *plat = dev_get_platdata(dev); | |
186 | 186 | fdt_addr_t addr; |
187 | 187 | |
188 | - debug("%s(dev=%p) (priv=%p)\n", __func__, dev, priv); | |
188 | + debug("%s(dev=%p) (plat=%p)\n", __func__, dev, plat); | |
189 | 189 | |
190 | 190 | addr = devfdt_get_addr(dev); |
191 | 191 | if (addr == FDT_ADDR_T_NONE) |
192 | 192 | return -EINVAL; |
193 | 193 | |
194 | - priv->base = (struct mu_type *)addr; | |
194 | + plat->base = (struct mu_type *)addr; | |
195 | 195 | |
196 | 196 | /* U-Boot not enable interrupts, so need to enable RX interrupts */ |
197 | - mu_hal_init(priv->base); | |
197 | + mu_hal_init(plat->base); | |
198 | 198 | |
199 | 199 | gd->arch.scu_dev = dev; |
200 | 200 | |
201 | - device_probe(priv->clk); | |
202 | - device_probe(priv->pinclk); | |
201 | + device_probe(plat->clk); | |
202 | + device_probe(plat->pinclk); | |
203 | 203 | |
204 | 204 | return 0; |
205 | 205 | } |
@@ -211,7 +211,7 @@ static int imx8_scu_remove(struct udevice *dev) | ||
211 | 211 | |
212 | 212 | static int imx8_scu_bind(struct udevice *dev) |
213 | 213 | { |
214 | - struct imx8_scu *priv = dev_get_priv(dev); | |
214 | + struct imx8_scu *plat = dev_get_platdata(dev); | |
215 | 215 | int ret; |
216 | 216 | struct udevice *child; |
217 | 217 | int node; |
@@ -227,7 +227,7 @@ static int imx8_scu_bind(struct udevice *dev) | ||
227 | 227 | if (ret) |
228 | 228 | return ret; |
229 | 229 | |
230 | - priv->clk = child; | |
230 | + plat->clk = child; | |
231 | 231 | |
232 | 232 | node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, |
233 | 233 | "fsl,imx8qxp-iomuxc"); |
@@ -238,7 +238,7 @@ static int imx8_scu_bind(struct udevice *dev) | ||
238 | 238 | if (ret) |
239 | 239 | return ret; |
240 | 240 | |
241 | - priv->pinclk = child; | |
241 | + plat->pinclk = child; | |
242 | 242 | |
243 | 243 | return 0; |
244 | 244 | } |
@@ -261,6 +261,6 @@ U_BOOT_DRIVER(imx8_scu) = { | ||
261 | 261 | .bind = imx8_scu_bind, |
262 | 262 | .remove = imx8_scu_remove, |
263 | 263 | .ops = &imx8_scu_ops, |
264 | - .priv_auto_alloc_size = sizeof(struct imx8_scu), | |
264 | + .platdata_auto_alloc_size = sizeof(struct imx8_scu), | |
265 | 265 | .flags = DM_FLAG_PRE_RELOC, |
266 | 266 | }; |
@@ -169,7 +169,7 @@ int sc_misc_get_control(sc_ipc_t ipc, sc_rsrc_t resource, sc_ctrl_t ctrl, | ||
169 | 169 | printf("%s: ctrl:%d resource:%d: res:%d\n", |
170 | 170 | __func__, ctrl, resource, RPC_R8(&msg)); |
171 | 171 | |
172 | - if (!val) | |
172 | + if (val) | |
173 | 173 | *val = RPC_U32(&msg, 0U); |
174 | 174 | |
175 | 175 | return ret; |
@@ -194,7 +194,7 @@ void sc_misc_get_boot_dev(sc_ipc_t ipc, sc_rsrc_t *boot_dev) | ||
194 | 194 | if (ret) |
195 | 195 | printf("%s: res:%d\n", __func__, RPC_R8(&msg)); |
196 | 196 | |
197 | - if (!boot_dev) | |
197 | + if (boot_dev) | |
198 | 198 | *boot_dev = RPC_U16(&msg, 0U); |
199 | 199 | } |
200 | 200 |
@@ -157,6 +157,9 @@ | ||
157 | 157 | /* IIM Fuses */ |
158 | 158 | #define CONFIG_FSL_IIM |
159 | 159 | |
160 | +/* Watchdog */ | |
161 | +#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000 | |
162 | + | |
160 | 163 | /* |
161 | 164 | * Boot Linux |
162 | 165 | */ |
@@ -122,6 +122,8 @@ | ||
122 | 122 | #define CONFIG_ENV_OFFSET (384 * 1024) |
123 | 123 | #define CONFIG_ENV_OVERWRITE |
124 | 124 | |
125 | +#define CONFIG_BOARD_SIZE_LIMIT 392192 /* (CONFIG_ENV_OFFSET - 1024) */ | |
126 | + | |
125 | 127 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
126 | 128 | "bootargs_mmc1=console=ttymxc0,115200 di0_primary console=tty1\0" \ |
127 | 129 | "bootargs_mmc2=video=mxcfb0:dev=hdmi,1920x1080M@60 " \ |
@@ -968,7 +968,7 @@ int imx8image_copy_image(int outfd, struct image_tool_params *mparams) | ||
968 | 968 | fprintf(stdout, "CONTAINER SW VERSION:\t0x%04x\n", sw_version); |
969 | 969 | |
970 | 970 | build_container(soc, sector_size, emmc_fastboot, |
971 | - img_sp, false, fuse_version, sw_version, outfd); | |
971 | + img_sp, true, fuse_version, sw_version, outfd); | |
972 | 972 | |
973 | 973 | return 0; |
974 | 974 | } |