Re: [U-Boot] [EXT] [PATCH 2/6] spi: fsl_qspi: Fix erase issue to adapt spi-mem

2019-08-14 Thread Ye Li
Hi Ashish, > > >> -Original Message- >> From: U-Boot On Behalf Of Ye Li >> Sent: Wednesday, August 14, 2019 3:39 PM >> To: ja...@amarulasolutions.com >> Cc: Fabio Estevam ; u-boot@lists.denx.de; dl- >> uboot-imx >> Subject: [EXT] [U-

Re: [U-Boot] [EXT] Re: [PATCH 1/6] spi: fsl_qspi: Fix DDR mode setting for latest iMX platforms

2019-08-14 Thread Ye Li
Hi Frieder, > Caution: EXT Email > > Hi Ye, > > On 14.08.19 12:08, Ye Li wrote: >> On latest iMX platforms like iMX7D/iMX6UL/iMX8MQ, the QSPI controller >> is updated to have TDH field in FLSHCR register. According to reference >> manual, this TDH must be set t

[U-Boot] [PATCH v2 4/4] spi: fsl_qspi: Add support for QSPI on iMX7ULP

2019-08-14 Thread Ye Li
Add the compatible string and driver data for iMX7ULP platform Signed-off-by: Ye Li --- Changes in v2: - None drivers/spi/fsl_qspi.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c index d759e98..8e2a09d 100644 --- a/drivers/spi

[U-Boot] [PATCH v2 3/4] spi: fsl_qspi: Update to use driver data

2019-08-14 Thread Ye Li
Add the driver data for each compatible string. So we can remove the SOC config and use driver data instead. Signed-off-by: Ye Li --- Changes in v2: - None drivers/spi/fsl_qspi.c | 113 ++--- 1 file changed, 79 insertions(+), 34 deletions(-) diff

[U-Boot] [PATCH v2 0/4] Update fsl qspi driver

2019-08-14 Thread Ye Li
: fsl_qspi: Fix DDR mode setting for latest iMX platforms Ye Li (4): spi: fsl_qspi: Fix DDR mode setting for latest iMX platforms spi: fsl_qspi: Update write data size for page program LUT spi: fsl_qspi: Update to use driver data spi: fsl_qspi: Add support for QSPI on iMX7ULP drivers/spi

[U-Boot] [PATCH v2 2/4] spi: fsl_qspi: Update write data size for page program LUT

2019-08-14 Thread Ye Li
The write data size can be overwritten by writing to the IDATSZ field of IPCR register. Since the driver always updates the IDATSZ in page program operation. Set the LUT data size to 0 to align the codes with iMX. Signed-off-by: Ye Li --- Changes in v2: - None drivers/spi/fsl_qspi.c | 12

[U-Boot] [PATCH v2 1/4] spi: fsl_qspi: Fix DDR mode setting for latest iMX platforms

2019-08-14 Thread Ye Li
will be overwritten in every read/write/erase operation. This causes DDR_EN been cleared while TDH=1, then no clk2x output for TX data shift and all operations will fail. Signed-off-by: Ye Li --- Changes in v2: - Remove unused variable mcr_val drivers/spi/fsl_qspi.c | 31

Re: [U-Boot] [PATCH 1/6] spi: fsl_qspi: Fix DDR mode setting for latest iMX platforms

2019-08-14 Thread Ye Li
TX > DDR delay logic won't be enabled. > > Another issue in DDR mode is the MCR register will be overwritten in > every read/write/erase operation. This causes DDR_EN been cleared while > TDH=1, then no clk2x output for TX data shift and all operations will > fail. > > Signe

[U-Boot] [PATCH 3/6] spi: fsl_qspi: Update write data size for page program LUT

2019-08-14 Thread Ye Li
The write data size can be overwritten by writing to the IDATSZ field of IPCR register. Since the driver always updates the IDATSZ in page program operation. Set the LUT data size to 0 to align the codes with iMX. Signed-off-by: Ye Li --- drivers/spi/fsl_qspi.c | 12 +--- 1 file changed

[U-Boot] [PATCH 6/6] spi: fsl_qspi: Fix flash write issue with small TX FIFO

2019-08-14 Thread Ye Li
may set due to previous write is not completed by flash device, then cause current write failed. Signed-off-by: Ye Li --- drivers/spi/fsl_qspi.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c index f3cf8e6..450155e 100644

[U-Boot] [PATCH 4/6] spi: fsl_qspi: Update to use driver data

2019-08-14 Thread Ye Li
Add the driver data for each compatible string. So we can remove the SOC config and use driver data instead. Signed-off-by: Ye Li --- drivers/spi/fsl_qspi.c | 113 ++--- 1 file changed, 79 insertions(+), 34 deletions(-) diff --git a/drivers/spi

[U-Boot] [PATCH 5/6] spi: fsl_qspi: Add support for QSPI on iMX7ULP

2019-08-14 Thread Ye Li
Add the compatible string and driver data for iMX7ULP platform Signed-off-by: Ye Li --- drivers/spi/fsl_qspi.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c index 8950412..f3cf8e6 100644 --- a/drivers/spi/fsl_qspi.c +++ b/drivers

[U-Boot] [PATCH 2/6] spi: fsl_qspi: Fix erase issue to adapt spi-mem

2019-08-14 Thread Ye Li
After switched to spi-mem, the data format passed by xfer is changed for erase. The address of erase is moved to data phase in SPI_XFER_END. Update the driver to fix the erase issue Signed-off-by: Ye Li --- drivers/spi/fsl_qspi.c | 17 + 1 file changed, 13 insertions(+), 4

[U-Boot] [PATCH 1/6] spi: fsl_qspi: Fix DDR mode setting for latest iMX platforms

2019-08-14 Thread Ye Li
will be overwritten in every read/write/erase operation. This causes DDR_EN been cleared while TDH=1, then no clk2x output for TX data shift and all operations will fail. Signed-off-by: Ye Li --- drivers/spi/fsl_qspi.c | 30 -- 1 file changed, 16 insertions(+), 14

Re: [U-Boot] [PATCH v2 1/5] arm: dts: sync dts for i.MX6UL

2019-08-09 Thread Ye Li
> Sync kernel dts for i.MX6UL from > commit <0a8ad0ffa4d8> ("Merge tag 'for-linus-5.3-ofs1' of > git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux") > > Signed-off-by: Peng Fan > --- > > V2: > None > > arch/arm/dts/imx6ul-14x14-evk.dts| 422 +--- >

Re: [U-Boot] [PATCH V3 4/4] clk: imx: add i.MX8MM clk driver

2019-08-09 Thread Ye Li
imx8m_clk_composite("i2c2", imx8mm_i2c2_sels, base + 0xad80)); > + clk_dm(IMX8MM_CLK_I2C3, > +imx8m_clk_composite("i2c3", imx8mm_i2c3_sels, base + 0xae00)); > + clk_dm(IMX8MM_CLK_I2C4, > +imx8m_clk_composite("i2c4&qu

Re: [U-Boot] [PATCH V3 3/4] clk: imx: add i.MX8M composite clk support

2019-08-09 Thread Ye Li
IFT; > + div->width = PCG_PREDIV_WIDTH; > + div->flags = CLK_DIVIDER_ROUND_CLOSEST | flags; > + > + gate = kzalloc(sizeof(*gate), GFP_KERNEL); > + if (!gate) > + goto fail; > + > + gate->reg = reg; > + gate->bit_idx = PCG_CGC_

Re: [U-Boot] [PATCH V3 2/4] clk: imx: add pll14xx driver

2019-08-09 Thread Ye Li
if (ret) { > + pr_err("%s: failed to register pll %s %d\n", > + __func__, name, ret); > + kfree(pll); > + return ERR_PTR(ret); > + } > + > + return clk; > +} > + > +U_BOOT_DRIVER(clk_pll1443x) = { > + .name = UBOOT_DM_CLK_IMX_PLL1443X, > + .id = UCLASS_CLK, > + .ops= _pll1443x_ops, > + .flags = DM_FLAG_PRE_RELOC, > +}; > + > +U_BOOT_DRIVER(clk_pll1416x) = { > + .name = UBOOT_DM_CLK_IMX_PLL1416X, > + .id = UCLASS_CLK, > + .ops= _pll1416x_ops, > + .flags = DM_FLAG_PRE_RELOC, > +}; > diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h > index 1d480d8722..4956e04a92 100644 > --- a/drivers/clk/imx/clk.h > +++ b/drivers/clk/imx/clk.h > @@ -20,6 +20,31 @@ enum imx_pllv3_type { > IMX_PLLV3_DDR_IMX7, > }; > > +enum imx_pll14xx_type { > + PLL_1416X, > + PLL_1443X, > +}; > + > +/* NOTE: Rate table should be kept sorted in descending order. */ > +struct imx_pll14xx_rate_table { > + unsigned int rate; > + unsigned int pdiv; > + unsigned int mdiv; > + unsigned int sdiv; > + unsigned int kdiv; > +}; > + > +struct imx_pll14xx_clk { > + enum imx_pll14xx_type type; > + const struct imx_pll14xx_rate_table *rate_table; > + int rate_count; > + int flags; > +}; > + > +struct clk *imx_clk_pll14xx(const char *name, const char *parent_name, > + void __iomem *base, > + const struct imx_pll14xx_clk *pll_clk); > + > struct clk *clk_register_gate2(struct device *dev, const char *name, > const char *parent_name, unsigned long flags, > void __iomem *reg, u8 bit_idx, u8 cgr_val, > Reviewed-by: Ye Li Best regards, Ye Li ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Re: [U-Boot] [PATCH V3 1/4] clk: imx: add Kconfig entry for i.MX8MM

2019-08-09 Thread Ye Li
r clock driver in i.MX8MM > + > +config CLK_IMX8MM > + bool "Clock support for i.MX8MM" > + depends on ARCH_IMX8M > + select CLK > + select CLK_CCF > + help > + This enables support clock driver for i.MX8MM platforms. > Reviewed-by: Ye Li Best regards, Ye Li ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Re: [U-Boot] [PATCH v2 5/5] imx: add i.MX6ULZ board

2019-08-09 Thread Ye Li
"setenv fdt_file imx6ulz-14x14-evk.dtb; > fi; " \ > + "if test $board_name = EVK && test $board_rev = > 14X14; then " \ > + "setenv fdt_file imx6ull-14x14-evk.dtb; > fi; " \ > + "if test $fdt_file = undefined; then " \ > + "echo WARNING: Could not determine dtb > to use; " \ > + "fi; " \ > + "fi;\0" \ > "netargs=setenv bootargs console=${console},${baudrate} " \ > "root=/dev/nfs " \ > "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ > @@ -113,6 +123,7 @@ > "fi;\0" \ > > #define CONFIG_BOOTCOMMAND \ > +"run findfdt;" \ > "mmc dev ${mmcdev};" \ > "mmc dev ${mmcdev}; if mmc rescan; then " \ > "if run loadbootscript; then " \ > Reviewed-by: Ye Li Best regards, Ye Li ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Re: [U-Boot] [PATCH v2 4/5] imx: add i.MX6ULZ cpu type

2019-08-09 Thread Ye Li
x/mx6/soc.c > +++ b/arch/arm/mach-imx/mx6/soc.c > @@ -85,6 +85,10 @@ u32 get_cpu_rev(void) > type = MXC_CPU_MX6D; > } > > + if (type == MXC_CPU_MX6ULL) { > + if (readl(SRC_BASE_ADDR + 0x1c) & (1 << 6)) > +

Re: [U-Boot] [PATCH v2 3/5] arm: dts: import dts for i.MX6ULZ

2019-08-09 Thread Ye Li
/delete-property/ spi3; > + /delete-property/ spi4; > + }; > +}; > + > +/delete-node/ > +/delete-node/ > +/delete-node/ > +/delete-node/ > +/delete-node/ > +/delete-node/ > +/delete-node/ > +/delete-node/ > +/delete-node/ >

Re: [U-Boot] [PATCH v2 2/5] arm: dts: sync dts for i.MX6ULL

2019-08-09 Thread Ye Li
> Sync kernel dts for i.MX6ULL from > commit <0a8ad0ffa4d8> ("Merge tag 'for-linus-5.3-ofs1' of > git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux") > > Signed-off-by: Peng Fan > --- > > V2: > None > > arch/arm/dts/imx6ull-14x14-evk.dts | 523 +--- >

Re: [U-Boot] [PATCH V2 4/4] clk: imx: add i.MX8MM clk driver

2019-08-09 Thread Ye Li
_nand_usdhc_sels, > + base + 0x8900)); > + > + /* IP */ > + clk_dm(IMX8MM_CLK_USDHC1, > +imx8m_clk_composite("usdhc1", imx8mm_usdhc1_sels, > +base + 0xac00)); > + clk_dm(IMX8MM_CL

Re: [U-Boot] [PATCH V2 2/4] clk: imx: add pll14xx driver

2019-08-09 Thread Ye Li
rn clk_pll1416x_recalc_rate(clk); > +} > + > +static ulong clk_pll1443x_set_rate(struct clk *clk, unsigned long drate) > +{ > + struct clk_pll14xx *pll = to_clk_pll14xx(dev_get_clk_ptr(clk->dev)); > + const struct imx_pll14xx_rate_table *rate; > + u32 tmp, div_v

Re: [U-Boot] [PATCH] i2c: mxc: add CONFIG_CLK support

2019-08-07 Thread Ye Li
gt; ret = i2c_idle_bus(i2c_bus); > if (ret < 0) { > /* Disable clk */ > +#if CONFIG_IS_ENABLED(CLK) > + clk_disable(_bus->per_clk); > +#else > enable_i2c_clk(0, bus->seq); > +#endif > return ret; > } Reviewed-by: Ye Li Best regards, Ye Li > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Re: [U-Boot] [PATCH] tools: imx8mimage: fix HDMI/FIT parsing

2019-08-07 Thread Ye Li
k; > case CFG_REG_SIZE: > parse_cfg_cmd(*cmd, token, name, lineno); > Reviewed-by: Ye Li Best regards, Ye Li ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Re: [U-Boot] [PATCH] serial: Kconfig: make MXC_UART usable for MX7 and IMX8M

2019-08-07 Thread Ye Li
/Kconfig > index 8a447fd6e3..e5657979ff 100644 > --- a/drivers/serial/Kconfig > +++ b/drivers/serial/Kconfig > @@ -569,7 +569,7 @@ config MCFUART > > config MXC_UART > bool "IMX serial port support" > - depends on MX5 || MX6 > + depends on MX5

Re: [U-Boot] [PATCH v2 4/4] net: fec: add fuse check

2019-08-01 Thread Ye Li
return -ENODEV; > + } > + } > + > if (IS_ENABLED(CONFIG_IMX8)) { > ret = clk_get_by_name(dev, "ipg", >ipg_clk); > if (ret < 0) { > Reviewed-by: Ye Li Best regards, Ye Li ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

[U-Boot] [PATCH 1/2] imx8: Jump from alias to OCRAM address at SPL init

2019-07-12 Thread Ye Li
linker address to OCRAM address 0x10. And then jump to the absolute address not the PC relative address for entering OCRAM. Signed-off-by: Ye Li --- arch/arm/Kconfig | 1 + arch/arm/include/asm/arch-imx8/boot0.h | 21 + 2 files changed, 22

[U-Boot] [PATCH 2/2] imx8qm/qxp: Set SPL TEXT base to OCRAM base

2019-07-12 Thread Ye Li
Modify the SPL TEXT base from OCRAM alias to OCRAM base 0x10, so we can use full OCRAM not limit to 96KB Signed-off-by: Ye Li --- configs/imx8qm_mek_defconfig | 1 + configs/imx8qxp_mek_defconfig | 1 + include/configs/imx8qm_mek.h | 1 - 3 files changed, 2 insertions(+), 1 deletion

[U-Boot] [PATCH] serial_lpuart: Fix config check issue when using clk driver in SPL

2019-07-10 Thread Ye Li
Should use CONFIG_IS_ENABLED not IS_ENABLED for CLK driver, so it will check the CONFIG_SPL_CLK when building SPL Signed-off-by: Ye Li --- drivers/serial/serial_lpuart.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial

[U-Boot] [PATCH] mmc: fsl_esdhc_imx: fix config check issue when building in SPL

2019-07-10 Thread Ye Li
Should use CONFIG_IS_ENABLED not IS_ENABLED for clock and regulator drivers, CONFIG_IS_ENABLED will check the CONFIG_SPL_CLK and CONFIG_SPL_DM_REGULATOR when building SPL. Signed-off-by: Ye Li --- drivers/mmc/fsl_esdhc_imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[U-Boot] [PATCH] imx6dq: Fix chip version issue for rev1.3

2019-07-10 Thread Ye Li
According to iMX6DQ RM, the minor field (low 8 bits) in DIGPROG is not aligned on silicon revision 1.3. So update get_cpu_rev to correct the revision. 0x00630002 Silicon revision 1.2 0x00630005 Silicon revision 1.3 0x00630006 Silicon revision 1.6 Signed-off-by: Ye Li Reviewed-by: Peng Fan

[U-Boot] [PATCH 1/2] i2c-mux-gpio: Fix GPIO request flag issue

2019-07-10 Thread Ye Li
When requesting GPIO, the GPIOD_IS_OUT is missed in flag, so the GPIO is set the input mode not output and cause mux not work. Signed-off-by: Ye Li --- drivers/i2c/muxes/i2c-mux-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers

[U-Boot] [PATCH 2/2] i2c: mxc_i2c: Remove i2c_idle_bus from probe

2019-07-10 Thread Ye Li
, at this moment the mux is still in idle state not select any port. So if we call i2c_idle_bus in probe, it will fail and cause mxc_i2c probe failed. Signed-off-by: Ye Li --- drivers/i2c/mxc_i2c.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c

[U-Boot] [PATCH] spi: fsl_qspi: Fix flash write issue on i.MX7ULP

2019-07-10 Thread Ye Li
the WIP before each write on mx7ulp. Otherwise the WIP may set due to previous write is not completed by flash device, then cause current write failed. Signed-off-by: Ye Li --- drivers/spi/fsl_qspi.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/spi/fsl_qspi.c b

[U-Boot] [PATCH] spi: spi-mem: Fix read data size issue

2019-07-10 Thread Ye Li
When slave drivers don't set the max_read_size, the spi-mem should directly use data.nbytes and not limit to any size. But current logic will limit to the max_write_size. Signed-off-by: Ye Li --- drivers/spi/spi-mem.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

Re: [U-Boot] [EXT] Re: [PATCH 3/5] clk: imx8: Update imx8 clock driver

2019-07-10 Thread Ye Li
ork v5 to the mailing list >>> recently: https://patchwork.ozlabs.org/cover/1121348/ >>> >>> >>> So maybe this code could benefit from those patches and use this >>> infrastructure ? >>> >> I think so. We will look into the CCF in u-bo

Re: [U-Boot] [EXT] Re: [PATCH 3/5] clk: imx8: Update imx8 clock driver

2019-07-10 Thread Ye Li
and migrate it later. But now we prefer upstream this update first. This one has been tested in downstream. And we have some driver patches going for upstream depending on it, while a new driver using CCF may need more time to get ready. Best regards, Ye Li >> >> Note: since the cloc

Re: [U-Boot] [EXT] Re: [PATCH 5/5] net: fec_mxc: Update driver to use full clks for iMX8

2019-07-09 Thread Ye Li
在 2019/7/7 7:10, Lukasz Majewski 写道: > Hi Ye, > >> Add support for more clocks used by iMX8 from DTB: >> ref_clock, tx_2x_clock, ahb_clock >> And update get clock rate interface to support multiple fec ports. >> >> Signed-off-by: Ye Li &

[U-Boot] [PATCH v2 7/7] imx8qm/qxp: Enable UART0 LPCG clock for early serial

2019-07-03 Thread Ye Li
Enable the UART0 LPCG clock in board_early_init_f not depending on the reset default value. Signed-off-by: Ye Li --- Changes in v2: - New patch in v2, enable the UART0 LPCG since we added LPCG driver board/freescale/imx8qm_mek/imx8qm_mek.c | 3 +++ board/freescale/imx8qxp_mek/imx8qxp_mek.c

[U-Boot] [PATCH v2 6/7] imx8qm/imx8qxp: Power down the resources before SPL jump to u-boot

2019-07-03 Thread Ye Li
"power_off_pd_devices" to power off all active devices. Signed-off-by: Ye Li --- Changes in v2: - New patch in v2 to fix clock set parent failure in u-boot, due to SPL does not power off the resource. arch/arm/include/asm/arch-imx8/sys_proto.h | 1 + arch/arm/mach-imx/

[U-Boot] [PATCH v2 4/7] imx8qm_mek: increase the size of early malloc pool

2019-07-03 Thread Ye Li
Encounter malloc failure in arch_cpu_init_dm when binding "fsl,imx8-mu" node with imx8_scu driver. So increase the early malloc pool to fix the issue. Signed-off-by: Ye Li --- Changes in v2: - None configs/imx8qm_mek_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[U-Boot] [PATCH v2 5/7] net: fec_mxc: Update driver to use full clks for iMX8

2019-07-03 Thread Ye Li
Add support for more clocks used by iMX8 from DTB: ref_clock, tx_2x_clock, ahb_clock And update get clock rate interface to support multiple fec ports. Signed-off-by: Ye Li --- Changes in v2: - None drivers/net/fec_mxc.c | 47 ++- drivers/net

[U-Boot] [PATCH v2 3/7] clk: imx8: Update imx8 clock driver

2019-07-03 Thread Ye Li
on the resource firstly, then we can get the clock. Otherwise, we can't access lpcg. Thus, the clock dump only works for the slice clock. Signed-off-by: Ye Li --- Changes in v2: - None drivers/clk/imx/clk-imx8.c| 304 +-- drivers/clk/imx/clk-imx8.h| 83

[U-Boot] [PATCH v2 2/7] misc: scu_api: Add new APIs for clk-imx8 driver

2019-07-03 Thread Ye Li
Add sc_misc_set_control to write the subsystem's DSC GPR registers, and sc_pm_set_clock_parent to select parent clock source. Signed-off-by: Ye Li --- Changes in v2: - None arch/arm/include/asm/arch-imx8/sci/sci.h| 4 ++ arch/arm/include/asm/arch-imx8/sci/svc/pm/api.h | 7 arch

[U-Boot] [PATCH v2 1/7] imx8: Add lpcg driver for iMX8QM/QXP

2019-07-03 Thread Ye Li
Each module may have one or more lpcg registers for SW/HW enabling its clocks. Add lpcg register address and its driver for accessing lpcg. Signed-off-by: Ye Li --- Changes in v2: - Fix license and blank line arch/arm/include/asm/arch-imx8/imx8qm_lpcg.h | 198 ++ arch

[U-Boot] [PATCH 5/5] net: fec_mxc: Update driver to use full clks for iMX8

2019-07-02 Thread Ye Li
Add support for more clocks used by iMX8 from DTB: ref_clock, tx_2x_clock, ahb_clock And update get clock rate interface to support multiple fec ports. Signed-off-by: Ye Li --- drivers/net/fec_mxc.c | 47 ++- drivers/net/fec_mxc.h | 1 + 2 files

[U-Boot] [PATCH 4/5] imx8qm_mek: increase the size of early malloc pool

2019-07-02 Thread Ye Li
Encounter malloc failure in arch_cpu_init_dm when binding "fsl,imx8-mu" node with imx8_scu driver. So increase the early malloc pool to fix the issue. Signed-off-by: Ye Li --- configs/imx8qm_mek_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[U-Boot] [PATCH 3/5] clk: imx8: Update imx8 clock driver

2019-07-02 Thread Ye Li
on the resource firstly, then we can get the clock. Otherwise, we can't access lpcg. Thus, the clock dump only works for the slice clock. Signed-off-by: Ye Li --- drivers/clk/imx/clk-imx8.c| 304 +-- drivers/clk/imx/clk-imx8.h| 83 +++- drivers/clk/imx/clk-imx8qm.c

[U-Boot] [PATCH 2/5] misc: scu_api: Add new APIs for clk-imx8 driver

2019-07-02 Thread Ye Li
Add sc_misc_set_control to write the subsystem's DSC GPR registers, and sc_pm_set_clock_parent to select parent clock source. Signed-off-by: Ye Li --- arch/arm/include/asm/arch-imx8/sci/sci.h| 4 ++ arch/arm/include/asm/arch-imx8/sci/svc/pm/api.h | 7 arch/arm/include/asm/arch

[U-Boot] [PATCH 1/5] imx8: Add lpcg driver for iMX8QM/QXP

2019-07-02 Thread Ye Li
Each module may have one or more lpcg registers for SW/HW enabling its clocks. Add lpcg register address and its driver for accessing lpcg. Signed-off-by: Ye Li --- arch/arm/include/asm/arch-imx8/imx8qm_lpcg.h | 200 ++ arch/arm/include/asm/arch-imx8/imx8qxp_lpcg.h

Re: [U-Boot] [EXT] Re: [PATCH 4/6] spl: mmc: support loading i.MX container format file

2019-05-30 Thread Ye Li
format supported? > > If the functionality of the new image format is a subset of already > present image format, then no, that's called a duplication. > >>> We >>> don't force to use container, just set it as default. Users still can >>> choose fit or >&

Re: [U-Boot] [EXT] Re: [PATCH 4/6] spl: mmc: support loading i.MX container format file

2019-05-23 Thread Ye Li
Hi Marek, On 2019/5/22 19:41, Marek Vasut wrote: > Caution: EXT Email > > On 5/22/19 9:34 AM, Lukasz Majewski wrote: > [...] By using above approach we do have the NXP's "container" format only seen in the SPL (which is OK, as for example Samsung does similar thing

Re: [U-Boot] [PATCH v2] usb: xhci-mem: Fix scratchpad array issue

2019-01-07 Thread Ye Li
On 1/7/2019 5:54 PM, Bin Meng wrote: > On Mon, Jan 7, 2019 at 10:45 AM Ye Li wrote: >> >> After updating the value of dev_context_ptrs[0], we should flush this >> from cache to memory. Otherwise the xhci controller won't use it. >> >> Signed-off-by: Y

[U-Boot] [PATCH] imx: Check the PL310 version for applying errata

2019-01-07 Thread Ye Li
and dst aligned buffer. Signed-off-by: Nitin Garg Signed-off-by: Ye Li --- arch/arm/include/asm/pl310.h | 5 + arch/arm/mach-imx/cache.c| 18 ++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/arch/arm/include/asm/pl310.h b/arch/arm/include/asm/pl310.h index

[U-Boot] [PATCH] env: sata: Fix saveenv issue

2019-01-07 Thread Ye Li
Wrong env buffer was passed into sata write function, cause the saveenv not work. Signed-off-by: Ye Li --- env/sata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/sata.c b/env/sata.c index 59aedf4..a2ff5c6 100644 --- a/env/sata.c +++ b/env/sata.c @@ -65,7 +65,7

[U-Boot] [PATCH] mmc: fsl_esdhc: Fix wp_enable issue

2019-01-07 Thread Ye Li
"wp-gpios" for muxing to gpio. Signed-off-by: Ye Li --- drivers/mmc/fsl_esdhc.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 87273c8..4e10f13 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/dri

[U-Boot] [PATCH] mtd: qspi: support read the flag status in fspi driver

2019-01-07 Thread Ye Li
From: Han Xu Support to read the flag status in driver to avoid the spi-nor framework wait_for_ready hang issue. Signed-off-by: Han Xu --- drivers/spi/fsl_qspi.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/drivers/spi/fsl_qspi.c

[U-Boot] [PATCH] spi: qspi: Fix issue when booting with DDR mode

2019-01-07 Thread Ye Li
will be correctly set by this function. Signed-off-by: Ye Li --- drivers/spi/fsl_qspi.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c index 1598c4f..1987a72 100644 --- a/drivers/spi/fsl_qspi.c +++ b

[U-Boot] [PATCH] sf: Add Macronix MX25R6435F SPI NOR flash to flash parameters array

2019-01-06 Thread Ye Li
On i.MX7ULP EVK board, we use MX25R6435F NOR flash, add its parameters and IDs to flash parameter array. Otherwise, the flash probe will fails. Signed-off-by: Ye Li --- drivers/mtd/spi/spi_flash_ids.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi/spi_flash_ids.c b/drivers

[U-Boot] [PATCH] mtd: spi: Add 4bytes extend address support

2019-01-06 Thread Ye Li
add the support for this 4bytes extend address mode to SPI flash framework. The configuration CONFIG_SPI_FLASH_4BYTES_ADDR is used to enable the feature. Signed-off-by: Ye Li --- drivers/mtd/spi/Kconfig | 7 drivers/mtd/spi/sf_internal.h | 8 + drivers/mtd/spi/spi_flash.c |

[U-Boot] [PATCH] mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue

2019-01-06 Thread Ye Li
Chen Signed-off-by: Ye Li --- drivers/mmc/fsl_esdhc.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 74007e2..87273c8 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -585,18

[U-Boot] [PATCH v2] usb: xhci-mem: Fix scratchpad array issue

2019-01-06 Thread Ye Li
After updating the value of dev_context_ptrs[0], we should flush this from cache to memory. Otherwise the xhci controller won't use it. Signed-off-by: Ye Li Reviewed-by: Marek Vasut --- Changes for v2: - Change to use sizeof(ctrl->dcbaa->dev_context_ptrs[0]) drivers/usb/host/xhci-mem

[U-Boot] [PATCH] usb: xhci-mem: Fix scratchpad array issue

2019-01-04 Thread Ye Li
After updating the value of dev_context_ptrs[0], we should flush this from cache to memory. Otherwise the xhci controller won't use it. Signed-off-by: Ye Li --- drivers/usb/host/xhci-mem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci

[U-Boot] [PATCH] env: sata: Add missed env location for SATA boot

2019-01-04 Thread Ye Li
The env location label ENVL_ESATA is missed in location tables, so when we configure the ENV in SATA, u-boot fails to get correct env location and cause boot hang in board_f. Signed-off-by: Ye Li Reviewed-by: Peng Fan --- env/env.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/env

[U-Boot] [PATCH] spi: mxc_spi: Fix build warning on ARM64 platforms

2019-01-04 Thread Ye Li
31:2: note: in expansion of macro ‘debug’ debug("%s: bitlen %d dout 0x%x din 0x%x\n", ^~~~~ Signed-off-by: Ye Li Reviewed-by: Peng Fan --- drivers/spi/mxc_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index b26

[U-Boot] [PATCH] arm: Round the dma_alloc_coherent memory size to cache line aligned

2019-01-04 Thread Ye Li
the dma_alloc_coherent API to round the size to cache line aligned. Signed-off-by: Ye Li Reviewed-by: Peng Fan --- arch/arm/include/asm/dma-mapping.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 0883b7e

[U-Boot] [PATCH] imx: video: Fix return value issue

2019-01-04 Thread Ye Li
When framebuffer driver init is failed, we should return the err value not 0. So the video init can exit immediately. Signed-off-by: Ye Li --- arch/arm/mach-imx/video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/video.c b/arch/arm/mach-imx/video.c

[U-Boot] [PATCH] imx: Fix potential lmb memory overwritten by stack

2019-01-04 Thread Ye Li
. This causes the lmb allocated memory is overwritten by stack. Fix the issue by implementing the board_lmb_reserve to reserve from SP - 16KB to memory end for lmb. Signed-off-by: Ye Li --- arch/arm/mach-imx/misc.c | 32 1 file changed, 32 insertions(+) diff

[U-Boot] [PATCH] pinctrl: imx: Fix select input issue

2019-01-04 Thread Ye Li
anging the input_val, config_val and mux_mode to u32. Signed-off-by: Ye Li Reviewed-by: Fugang Duan --- drivers/pinctrl/nxp/pinctrl-imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/nxp/pinctrl-imx.c b/drivers/pinctrl/nxp/pinctrl-imx.c index 04ea82a..0

[U-Boot] [PATCH 2/3] dts: imx6ul_evk: Add DTS files for 14x14 EVK and 9x9 EVK boards

2018-06-27 Thread Ye Li
Add the board DTS files for 14x14 EVK and 9x9 EVK. They are necessary for converting to use u-boot DM driver. Two -u-boot.dtsi are added to modify compatible string of SPI flash device to "spi-flash". Signed-off-by: Ye Li --- arch/arm/dts/Makefile | 4 +- ar

[U-Boot] [PATCH 3/3] imx: imx6ul_evk: Enable DM driver for iMX6UL EVK u-boot

2018-06-27 Thread Ye Li
Convert the codes and configurations to enable DM drivers in u-boot for modules: i2c, PMIC, regulator, USB, Ethernet, SD/MMC, GPIO and QSPI This patch does not change SPL, so it still uses non-DM driver for UART, GPIO and SD/MMC. Signed-off-by: Ye Li --- board/freescale/mx6ul_14x14_evk

[U-Boot] [PATCH 1/3] dts: imx6ul: Update alias to support DM

2018-06-27 Thread Ye Li
Add spi0 alias for qspi for enabling DM SPI. Change usb alias for usbotg1 and usbotg2 for enabling DM USB Signed-off-by: Ye Li --- arch/arm/dts/imx6ul.dtsi | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/arm/dts/imx6ul.dtsi b/arch/arm/dts/imx6ul.dtsi index

[U-Boot] [PATCH v2] imx: imx7d-sdb: Add DM QSPI support

2018-06-27 Thread Ye Li
t;spi-flash" - Remove iomux settings of qspi in board codes which is not needed for DM driver. Signed-off-by: Ye Li --- Changes in v2: - Add imx7d-sdb-qspi-u-boot.dtsi for u-boot "spi-flash" compatible string arch/arm/dts/Makefile | 3 +- arch/arm/

[U-Boot] [PATCH v2 2/2] imx: imx6sx-sabreauto: convert to use DM QSPI driver

2018-06-27 Thread Ye Li
driver. Signed-off-by: Ye Li --- Changes in v2: - Add imx6sx-sabreauto-u-boot.dtsi for u-boot specified dts changes. arch/arm/dts/imx6sx-sabreauto-u-boot.dtsi | 16 ++ arch/arm/dts/imx6sx-sabreauto.dts | 40 + board/freescale/mx6sxsabreauto/m

[U-Boot] [PATCH v2 1/2] imx: imx6sx-sdb: Enable DM QSPI driver

2018-06-27 Thread Ye Li
in board codes which is not needed for DM driver. - Add sf default settings. So running "sf probe" can detect the flash Signed-off-by: Ye Li --- Changes for v2: - Add imx6sx-sdb-u-boot.dtsi for u-boot specified dts changes. arch/arm/dts/imx6sx-sdb-u-boot.dtsi | 16

Re: [U-Boot] [PATCH 1/2] imx: imx6sx-sdb: Enable DM QSPI driver

2018-06-27 Thread Ye Li
On 6/27/2018 6:28 PM, Jagan Teki wrote: > On Wed, Jun 27, 2018 at 3:29 PM, Fabio Estevam wrote: >> Hi Ye Li, >> >> On Wed, Jun 27, 2018 at 3:48 AM, Ye Li wrote: >>> To support DM QSPI driver >>> - Add spi0 and spi1 alias for qspi1 and qspi2. >>>

Re: [U-Boot] [PATCH] imx: imx7d-sdb: Add DM QSPI support

2018-06-27 Thread Ye Li
On 6/27/2018 6:33 PM, Jagan Teki wrote: > On Wed, Jun 27, 2018 at 12:19 PM, Ye Li wrote: >> On iMX7D SabreSD board, the QSPI has pins conflict with EPDC (default). >> To use QSPI, users have to rework the board (de-populate R388-R391, R396-R399 >> populate R392-R395, R299,

[U-Boot] [PATCH] imx: imx7d-sdb: Add DM QSPI support

2018-06-27 Thread Ye Li
-by: Ye Li --- arch/arm/dts/Makefile | 3 +- arch/arm/dts/imx7d-sdb-qspi.dts | 44 arch/arm/dts/imx7d-sdb.dts| 6 ++- arch/arm/dts/imx7d.dtsi | 12 + arch/arm/dts/imx7s.dtsi | 22 ++-- board

[U-Boot] [PATCH 2/2] imx: imx6sx-sabreauto: convert to use DM QSPI driver

2018-06-27 Thread Ye Li
To support DM QSPI driver: - Modify n25q256a@0 and n25q256a@1 compatible string to "spi-flash" - Enable DM SPI and DM SPI FLASH configurations - Remove iomux settings of qspi1 in board codes which is not needed for DM driver. Signed-off-by: Ye Li --- arch/arm/dts/imx6sx-sab

[U-Boot] [PATCH 1/2] imx: imx6sx-sdb: Enable DM QSPI driver

2018-06-27 Thread Ye Li
sf default settings. So running "sf probe" can detect the flash Signed-off-by: Ye Li --- arch/arm/dts/imx6sx-sdb.dts | 4 ++-- arch/arm/dts/imx6sx.dtsi| 12 +++- board/freescale/mx6sxsabresd/mx6sxsabresd.c | 25 --

[U-Boot] [PATCH] imx: imx7d-sdb: Add DM QSPI support

2018-06-27 Thread Ye Li
-by: Ye Li --- arch/arm/dts/Makefile | 3 +- arch/arm/dts/imx7d-sdb-qspi.dts | 44 arch/arm/dts/imx7d-sdb.dts| 6 ++- arch/arm/dts/imx7d.dtsi | 12 + arch/arm/dts/imx7s.dtsi | 22 ++-- board

[U-Boot] [PATCH 1/2] imx: imx6sx-sdb: Enable DM QSPI driver

2018-06-27 Thread Ye Li
sf default settings. So running "sf probe" can detect the flash Signed-off-by: Ye Li --- arch/arm/dts/imx6sx-sdb.dts | 4 ++-- arch/arm/dts/imx6sx.dtsi| 12 +++- board/freescale/mx6sxsabresd/mx6sxsabresd.c | 25 --

[U-Boot] [PATCH 2/2] imx: imx6sx-sabreauto: convert to use DM QSPI driver

2018-06-27 Thread Ye Li
To support DM QSPI driver: - Modify n25q256a@0 and n25q256a@1 compatible string to "spi-flash" - Enable DM SPI and DM SPI FLASH configurations - Remove iomux settings of qspi1 in board codes which is not needed for DM driver. Signed-off-by: Ye Li --- arch/arm/dts/imx6sx-sab

Re: [U-Boot] mx6ull evk reboots automatically

2017-11-22 Thread Ye Li
reset. The wdog3 is not disabled for i.mx6ull on mainline U-boot. Please fix it in imx_set_wdog_powerdown. if (is_mx6sx() || is_mx6ul() || is_mx6ull() || is_mx7()) writew(enable, >wmcr); Best regards, Ye Li > > Regards, > Peng. > > > > > Thanks,

Re: [U-Boot] [U-Boot,2/3] imx: mx6: correct IPU clock

2017-09-06 Thread Ye Li
> U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot > CONFIG_IPUV3_CLK is used to indicate the default rate for IPU HSP clock. The IPU driver in u-boot won't calculate the HSP clock rate accor

Re: [U-Boot] mx7: ums command does not mount SD card partitions

2016-08-30 Thread Ye Li
Hi Fabio, On 8/25/2016 8:18 PM, Fabio Estevam wrote: > Hi Ye Li, > > On Thu, Aug 25, 2016 at 3:25 AM, Ye Li <ye...@nxp.com> wrote: >> Hi Fabio, >> >>I just tried 'ums' on mx7d sabresd with latest u-boot-imx codes. It works >> well on my board. I don

Re: [U-Boot] mx7: ums command does not mount SD card partitions

2016-08-25 Thread Ye Li
Hi Fabio, I just tried 'ums' on mx7d sabresd with latest u-boot-imx codes. It works well on my board. I don't see your issue. My SD card has a FAT partition. I can access it from my host after running the "ums 0 mmc 0". Best regards, Ye Li -Original Message- From: U-Boot

[U-Boot] [PATCH v3 2/2] imx: mx6sxsabreauto: Add support for mx6sx SABREAUTO board

2016-01-31 Thread Ye Li
Initial version for mx6sx SABREAUTO board support with features: PMIC, QSPI, NAND flash, SD/MMC, USB, Ethernet, I2C, IO Expander. Signed-off-by: Ye Li <ye...@nxp.com> --- Changes for v3: - None Changes for v2: - None arch/arm/cpu/armv7/mx6/Kconfig

[U-Boot] [PATCH v3 1/2] mx6: soc: Add ENET2 mac address support

2016-01-31 Thread Ye Li
The i.MX6SX and i.MX6UL has two ENET controllers, add support for reading MAC address from fuse for ENET2. Signed-off-by: Ye Li <ye...@nxp.com> --- Changes for v3: - Modify dev_id check expression according to Fabio's comment. Changes for v2: - Add second MAC a

[U-Boot] [PATCH v2 2/2] imx: mx6sxsabreauto: Add support for mx6sx SABREAUTO board

2016-01-26 Thread Ye Li
Initial version for mx6sx SABREAUTO board support with features: PMIC, QSPI, NAND flash, SD/MMC, USB, Ethernet, I2C, IO Expander. Signed-off-by: Ye Li <ye...@nxp.com> --- Changes for v2: - None arch/arm/cpu/armv7/mx6/Kconfig |6 + board/freescale/mx6sxsab

[U-Boot] [PATCH v2 1/2] mx6: soc: Add ENET2 mac address support

2016-01-26 Thread Ye Li
The i.MX6SX and i.MX6UL has two ENET controllers, add support for reading MAC address from fuse for ENET2. Signed-off-by: Ye Li <ye...@nxp.com> --- Changes for v2: - Add second MAC address to README.imx6. - Rename mac_addr_low and mac_addr_high fields to mac_addr0 and mac

[U-Boot] [PATCH 1/2] imx: mx6sx: Fix issue in LCDIF clock enablement

2016-01-26 Thread Ye Li
Wrong checking for the base_addr paramter with LCDIF1 and LCDIF2. Always enter the -EINVAL return. Signed-off-by: Ye Li <ye...@nxp.com> --- arch/arm/cpu/armv7/mx6/clock.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/a

[U-Boot] [PATCH 2/2] imx: mx6ul/sx: Fix issue in LCDIF clock dividers calculation

2016-01-26 Thread Ye Li
-by: Ye Li <ye...@nxp.com> --- arch/arm/cpu/armv7/mx6/clock.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index 007204d..88380a6 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/c

[U-Boot] [PATCH] imx: mx6sxsabresd: Add MCIMX28LCD display support

2016-01-26 Thread Ye Li
The i.MX6SX SABRESD board supports MCIMX28LCD (800x480x24) at LCDIF1 port, enable this display feature by adding relevant BSP codes and configurations. Signed-off-by: Ye Li <ye...@nxp.com> --- board/freescale/mx6sxsabresd/mx6sxsabresd.c | 61 +++ include/c

Re: [U-Boot] [PATCH 1/2] mx6: soc: Add ENET2 mac address support

2016-01-24 Thread Ye Li
Hi Stefano, On 1/24/2016 6:35 PM, Stefano Babic wrote: > Hi Ye, > > On 19/01/2016 14:16, Ye Li wrote: >> The i.MX6SX and i.MX6UL has two ENET controllers, add support for reading >> MAC address from fuse for ENET2. >> >> Signed-off-by: Ye Li <ye...@nxp.com>

[U-Boot] [PATCH 1/2] mx6: soc: Add ENET2 mac address support

2016-01-19 Thread Ye Li
The i.MX6SX and i.MX6UL has two ENET controllers, add support for reading MAC address from fuse for ENET2. Signed-off-by: Ye Li <ye...@nxp.com> --- arch/arm/cpu/armv7/mx6/soc.c | 32 + arch/arm/include/asm/arch-mx6/imx-regs.h | 19 +-

[U-Boot] [PATCH 2/2] imx: mx6sxsabreauto: Add support for mx6sx SABREAUTO board

2016-01-19 Thread Ye Li
Initial version for mx6sx SABREAUTO board support with features: PMIC, QSPI, NAND flash, SD/MMC, USB, Ethernet, I2C, IO Expander. Signed-off-by: Ye Li <ye...@nxp.com> --- arch/arm/cpu/armv7/mx6/Kconfig |6 + board/freescale/mx6sxsabreauto/Kconfig | 12 +

  1   2   3   >