[PATCH v2 0/7] f_sdp: fix and update

2020-08-18 Thread Peng Fan
This is to upstream NXP downstream f_sdp fix/update. V2: Fix build break Frank Li (1): sdp: call board_usb_init at spl_sdp_load_image Peng Fan (2): f_sdp: Support searching and loading FIT or container image spl: add g_dnl_get_board_bcd_device_number Sherry Sun (2): f_sdp: Add EP1_OUT

[PATCH v2 1/7] sdp: call board_usb_init at spl_sdp_load_image

2020-08-18 Thread Peng Fan
From: Frank Li Need initialize UDC before run sdp download Signed-off-by: Frank Li Signed-off-by: Peng Fan --- common/spl/spl_sdp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c index e7f7b68411..ae9c09883a 100644 --- a/common/spl/spl_sdp.c

[PATCH v2 3/7] f_sdp: Fix wrong usb request size

2020-08-18 Thread Peng Fan
From: Ye Li Because the buffer length of sdp usb request is 65, we have to allocate 65 bytes not 64 bytes. Otherwise there is potential buffer overflow. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/usb/gadget/f_sdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v2 4/7] f_sdp: Support searching and loading FIT or container image

2020-08-18 Thread Peng Fan
data before second boot loader will be sent out. So we have to search the FIT header or container header in the buffer that SDP received. Also change to more common method to exit f_sdp handler not depending on SPL_FIT_FOUND flag because container loader won't set this. Signed-off-by

[PATCH v2 2/7] f_sdp: Add high speed endpoint descriptor

2020-08-18 Thread Peng Fan
From: Ye Li Add HS endpoint descriptor for SDP. So that we can use high speed endpoint, and the SDP device can send packet with 512 byte size. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/usb/gadget/f_sdp.c | 30 -- 1 file changed, 28 insertions(+), 2

[PATCH v2 7/7] f_sdp: Change bInterval of interrupt endpoint to 3

2020-08-18 Thread Peng Fan
the transmission speed. Reviewed-by: Ye Li Signed-off-by: Sherry Sun Signed-off-by: Peng Fan --- drivers/usb/gadget/f_sdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c index c5b35945c1..e48aa2f90d 100644 --- a

[PATCH v2 6/7] f_sdp: Add EP1_OUT as default data receive pipe in sdp

2020-08-18 Thread Peng Fan
twice as fast as using ep0 while receiving data in sdp. Signed-off-by: Sherry Sun Reviewed-by: Ye Li Signed-off-by: Peng Fan --- drivers/usb/gadget/f_sdp.c | 123 +++-- 1 file changed, 107 insertions(+), 16 deletions(-) diff --git a/drivers/usb/gadget

[PATCH v2 5/7] spl: add g_dnl_get_board_bcd_device_number

2020-08-18 Thread Peng Fan
Add g_dnl_get_board_bcd_device_number, the new BCD value is used by uuu to distinguish if the SPL supports the SDPV. Signed-off-by: Peng Fan --- arch/arm/mach-imx/spl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index 76a5f7aca6

RE: [PATCH v2 1/7] sdp: call board_usb_init at spl_sdp_load_image

2020-08-18 Thread Peng Fan
> Subject: Re: [PATCH v2 1/7] sdp: call board_usb_init at spl_sdp_load_image > > Hi Peng, > > > From: Frank Li > > > > Need initialize UDC before run sdp download > > > > Signed-off-by: Frank Li > > Signed-off-by: Peng Fan > > --- &

RE: [PATCH v2 4/7] f_sdp: Support searching and loading FIT or container image

2020-08-18 Thread Peng Fan
t f_sdp handler not depending > > on SPL_FIT_FOUND flag because container loader won't set this. > > > > Signed-off-by: Peng Fan > > --- > > drivers/usb/gadget/f_sdp.c | 70 > > ++ 1 file changed, 58 > > ins

RE: [PATCH v2 6/6] mmc: atmel-sdhci: use mmc_of_parse to get the DT properties

2020-08-27 Thread Peng Fan
tic int atmel_sdhci_probe(struct udevice *dev) > if (ret) > return ret; > > + ret = mmc_of_parse(dev, &plat->cfg); > + if (ret) > + return ret; > + > host->max_clk = max_clk; > host->mmc = &plat->mmc; > host->mmc->dev = dev; Reviewed-by: Peng Fan Thanks, Peng. > -- > 2.25.1

RE: [PATCH v2 3/6] mmc: atmel-sdhci: add sama7g5-sdhci compatibility string

2020-08-27 Thread Peng Fan
l_sdhci_ids[] = { > { .compatible = "atmel,sama5d2-sdhci" }, > { .compatible = "microchip,sam9x60-sdhci" }, > + { .compatible = "microchip,sama7g5-sdhci" }, > { } > }; > Reviewed-by: Peng Fan > -- > 2.25.1

RE: [PATCH v2 5/6] mmc: atmel-sdhci: enable the required generic clock

2020-08-27 Thread Peng Fan
) > return -EINVAL; > > + ret = clk_enable(&clk); > + if (ret) > + return ret; > + > host->max_clk = max_clk; > host->mmc = &plat->mmc; > host->mmc->dev = dev; Reviewed-by: Peng Fan > -- > 2.25.1

RE: [PATCH v2 4/6] mmc: atmel-sdhci: do not check clk_set_rate return value

2020-08-27 Thread Peng Fan
> Subject: [PATCH v2 4/6] mmc: atmel-sdhci: do not check clk_set_rate return > value > > clk_set_rate will return rate in case of success and zero in case of error, > however it can also return -ev, but it's an ulong function. > To avoid any issues, disregard the return value of this call. > In ca

RE: [PATCH v2] mmc: fsl_esdhc_imx: check the clock stable status after config the clock rate.

2020-08-27 Thread Peng Fan
> Subject: [PATCH v2] mmc: fsl_esdhc_imx: check the clock stable status after > config the clock rate. > > From: Haibo Chen > > Currently, after config the clock rate, delay 10ms, this is quite a rough > method. > Check the clock stable status in the present status register is enough. > > Test

RE: [v4, 00/11] mmc: fsl_esdhc: support eMMC HS200/HS400 modes

2020-09-07 Thread Peng Fan
ext branch. Thanks, Peng. > Thank you. > > Best regards, > Yangbo Lu > > > -Original Message- > > From: Yangbo Lu > > Sent: Tuesday, September 1, 2020 4:58 PM > > To: u-boot@lists.denx.de; Peng Fan ; Priyanka Jain > > ; 'Jaehoon Chung

RE: [PATCH] imx8mn_ddr4_evk: Allow booting the kernel by default

2021-03-21 Thread Peng Fan
quot; \ > - "boot_fit=try\0" \ > + "boot_fit=no\0" \ > "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ > "initrd_addr=0x4380\0" \ > "bootm_size=0x1000\0" \ > -- Reviewed-by: Peng Fan

RE: [PATCH] Revert "mmc: sdhci: set to INT_DATA_END when there are data"

2021-04-06 Thread Peng Fan
> Subject: RE: [PATCH] Revert "mmc: sdhci: set to INT_DATA_END when there > are data" > > Hi Jaehoon > > > Did you test on latest u-boot? v2018.01 was too old version. > > > Yes, we tested on v2020.04, although there is no such issue, but I think it > just > depends on call sequence timing. >

[PULL] please pull mmc-2021-4-6

2021-04-07 Thread Peng Fan
Hi Tom, Please pull mmc-2021-4-6 CI: https://source.denx.de/u-boot/custodians/u-boot-mmc/-/pipelines/7022 -- Update hwpartition usage Check bootbus's arguments workaround for erratum A-011334 for fsl_esdhc driver add pulse width detection workaround for fsl_esdhc

RE: [NXP-IMX] please pull nxp-imx-2021-4-6

2021-04-07 Thread Peng Fan
ommand to set PRIBLOB bitfield from CAAM > SCFGR register to 0x3 > > Franck LENORMAND (3): > crypto: caam: change JR running loop > caam: enable support for iMX7ULP > imx7ulp: Enable support for cmd blob > > Jacky Bai (1): > imx8mn: Update the DDR

RE: [PATCH] ARM: dts: imxrt1050: indent lcdif node correctly

2020-04-28 Thread Peng Fan
> Subject: [PATCH] ARM: dts: imxrt1050: indent lcdif node correctly > > Accidentally submitted a patch with indentation not correct, let's fix it by > indenting wrong lines. > > Signed-off-by: Giulio Benetti Acked-by: Peng Fan > --- > arch/arm/dts/imxrt1050.dts

[PATCH 1/7] uclass: cpu: Add new API to get udevice for current CPU

2020-04-28 Thread Peng Fan
udevice in cpu uclass. Signed-off-by: Peng Fan Signed-off-by: Ye Li --- drivers/cpu/cpu-uclass.c | 31 +++ include/cpu.h| 15 +++ 2 files changed, 46 insertions(+) diff --git a/drivers/cpu/cpu-uclass.c b/drivers/cpu/cpu-uclass.c index 457f77b7c8

[PATCH 2/7] common: board_f: Use cpu_get_current_dev in print_cpuinfo

2020-04-28 Thread Peng Fan
From: Ye Li Current print_cpuinfo gets the first udevice in CPU class to return the cpu info. This has problem if the boot CPU is not fixed. Changing to use new API cpu_get_current_dev to fix the issue. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- common/board_f.c | 10 +- 1

[PATCH 7/7] cpu: imx8: show RevC instead of Rev? at boot log

2020-04-28 Thread Peng Fan
From: Frank Li Add REVC informaiton. Signed-off-by: Frank Li Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx/cpu.h | 1 + drivers/cpu/imx8_cpu.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx

[PATCH 6/7] cpu: imx_cpu: Print the CPU temperature for iMX8QM A72

2020-04-28 Thread Peng Fan
From: Ye Li iMX8QM registers two thermal devices for CPUs, get the temperature from "cpu-thermal1" device for A72 Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/cpu/imx8_cpu.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/d

[PATCH 5/7] cpu: imx8: fix get core name and rate

2020-04-28 Thread Peng Fan
When current cpu is A53, using is_cortex_a53 could not detect A72 information, so check cpu device compatible property to get the correct information. Signed-off-by: Peng Fan --- drivers/cpu/imx8_cpu.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff

[PATCH 4/7] cpu: imx8: support a72 as boot cpu

2020-04-28 Thread Peng Fan
Support booting i.MX8QM with A72 as boot cpu Signed-off-by: Peng Fan --- drivers/cpu/imx8_cpu.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c index 7c54c290b8..029f20632e 100644 --- a/drivers/cpu/imx8_cpu.c +++ b/drivers

[PATCH 3/7] cpu: imx8: reimplement get cpu count

2020-04-28 Thread Peng Fan
Return 4 is not correct on i.MX8DX/DXL/8QM and etc. we need to count available cpu node with device_type "cpu". Signed-off-by: Peng Fan --- drivers/cpu/imx8_cpu.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/cpu/imx8_cpu.c b/d

[PATCH 1/5] spl: sdp: call board_usb_init at spl_sdp_load_image

2020-04-28 Thread Peng Fan
From: Frank Li Need initialize UDC before run sdp download Signed-off-by: Frank Li Signed-off-by: Peng Fan --- common/spl/spl_sdp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c index 806bf1327e..a54c7479d0 100644 --- a/common/spl/spl_sdp.c

[PATCH 2/5] usb: gadget: sdp: use CONFIG_SDP_LOADADDR as default load address

2020-04-28 Thread Peng Fan
From: Frank Li If SDP_WRITE and SDP_JUMP addr is zero, use CONFIG_SDP_LOADADDR as default address Signed-off-by: Frank Li Signed-off-by: Peng Fan --- drivers/usb/gadget/Kconfig | 4 drivers/usb/gadget/f_sdp.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a

[PATCH 3/5] spl: sdp: Add CONFIG_SPL_SDP_USB_DEV for USB device

2020-04-28 Thread Peng Fan
From: Ye Li Add a new configuration CONFIG_SPL_SDP_USB_DEV to specify the usb index for spl sdp driver, so that we change use different device. The default value is 0. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- common/spl/Kconfig | 8 common/spl/spl_sdp.c | 4 ++-- 2 files

[PATCH 5/5] spl: sdp: Add DM gadget support for sdp

2020-04-28 Thread Peng Fan
From: Sherry Sun When enable CONFG_SPL_DM_USB_GADGET, sdp should use usb_gadget_initialize() and usb_gadget_release() to support DM gadget driver. Signed-off-by: Sherry Sun Signed-off-by: Peng Fan --- common/spl/spl_sdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 4/5] spl: sdp: Add a callback to clean up USB driver

2020-04-28 Thread Peng Fan
From: Ye Li Because SDP directly jumps to next level boot image, we'd better clean up the USB driver before it. Implement a weak callback function, that spl sdp can use it to clean up USB driver. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- common/spl/spl_sdp.c | 1 + 1 file chang

[PATCH] video: cfb_console: Fix 64 bits support problem

2020-04-28 Thread Peng Fan
From: Ye Li There are some integer to pointer convert. To support 64 bits system, change the unsigned int to unsigned long. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/video/cfb_console.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH V2 1/9] uclass: cpu: Add new API to get udevice for current CPU

2020-05-01 Thread Peng Fan
udevice in cpu uclass. Signed-off-by: Peng Fan Signed-off-by: Ye Li --- V2: Per Simon's comment, - Add cpu_is_current - use uclass_foreach_dev_probe - Update code comment drivers/cpu/cpu-uclass.c | 34 ++ include/cpu.h

[PATCH V2 2/9] cpu: sandbox: support is_current

2020-05-01 Thread Peng Fan
Support querying whether U-Boot is running on current cpu Signed-off-by: Peng Fan --- V2: New drivers/cpu/cpu_sandbox.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/cpu/cpu_sandbox.c b/drivers/cpu/cpu_sandbox.c index 05b384f6a4..30a12e5a53 100644 --- a/drivers/cpu

[PATCH V2 4/9] common: board_f: Use cpu_get_current_dev in print_cpuinfo

2020-05-01 Thread Peng Fan
From: Ye Li Current print_cpuinfo gets the first udevice in CPU class to return the cpu info. This has problem if the boot CPU is not fixed. Changing to use new API cpu_get_current_dev to fix the issue. Reviewed-by: Simon Glass Signed-off-by: Ye Li Signed-off-by: Peng Fan --- V2: Add R-b

[PATCH V2 5/9] cpu: imx8: reimplement get cpu count

2020-05-01 Thread Peng Fan
Return 4 is not correct on i.MX8DX/DXL/8QM and etc. we need to count available cpu node with device_type "cpu". Reviewed-by: Simon Glass Signed-off-by: Peng Fan --- V2: Add R-b tag drivers/cpu/imx8_cpu.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) di

[PATCH V2 3/9] test: cpu: test current cpu

2020-05-01 Thread Peng Fan
Add test whether the CPU is U-Boot is running from. Signed-off-by: Peng Fan --- V2: New test/dm/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/dm/cpu.c b/test/dm/cpu.c index e6dc576ea3..def9b64a28 100644 --- a/test/dm/cpu.c +++ b/test/dm/cpu.c @@ -26,6 +26,8 @@ static int

[PATCH V2 8/9] cpu: imx_cpu: Print the CPU temperature for iMX8QM A72

2020-05-01 Thread Peng Fan
From: Ye Li iMX8QM registers two thermal devices for CPUs, get the temperature from "cpu-thermal1" device for A72 Signed-off-by: Ye Li Signed-off-by: Peng Fan --- V2: Per Simon's comments, use uclass_get_device drivers/cpu/imx8_cpu.c | 18 -- 1 file changed

[PATCH V2 7/9] cpu: imx8: fix get core name and rate

2020-05-01 Thread Peng Fan
When current cpu is A53, using is_cortex_a53 could not detect A72 information, so check cpu device compatible property to get the correct information. Reviewed-by: Simon Glass Signed-off-by: Peng Fan --- V2: Add R-b tag drivers/cpu/imx8_cpu.c | 27 +-- 1 file changed

[PATCH V2 9/9] cpu: imx8: show RevC instead of Rev? at boot log

2020-05-01 Thread Peng Fan
From: Frank Li Add REVC informaiton. Reviewed-by: Simon Glass Signed-off-by: Frank Li Signed-off-by: Peng Fan --- V2: Add R-b tag arch/arm/include/asm/arch-imx/cpu.h | 1 + drivers/cpu/imx8_cpu.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/arm/include/asm

[PATCH V2 6/9] cpu: imx8: support a72 as boot cpu

2020-05-01 Thread Peng Fan
Support booting i.MX8QM with A72 as boot cpu Reviewed-by: Simon Glass Signed-off-by: Peng Fan --- V2: Add R-b tag drivers/cpu/imx8_cpu.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c index 7c54c290b8..d1bd4edfc7

[PATCH V2 resend 0/4] support i.MX module fuse

2020-05-01 Thread Peng Fan
://patchwork.ozlabs.org/project/uboot/patch/20190801090117.24692-1-peng@nxp.com/ I dropped the R-b/A-b tags since long time. Peng Fan (4): imx: add module fuse support i2c: mxc: add fuse check usb: mx6: add fuse check net: fec: add fuse check arch/arm/include/asm/mach-imx/module_fuse.h | 127

[PATCH V2 resend 2/4] i2c: mxc: add fuse check

2020-05-01 Thread Peng Fan
Add fuse check for I2C. If the fuse indicates the module will not work in the SoC, let's fail the initialization. Signed-off-by: Peng Fan --- drivers/i2c/mxc_i2c.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c

[PATCH V2 resend 1/4] imx: add module fuse support

2020-05-01 Thread Peng Fan
uboot driver probe if the corresponding module not exists in the part. Signed-off-by: Peng Fan --- arch/arm/include/asm/mach-imx/module_fuse.h | 127 +++ arch/arm/include/asm/mach-imx/sys_proto.h | 1 + arch/arm/mach-imx/Kconfig | 7 + arch/arm/mach-imx/mx6/Makefile

[PATCH V2 resend 3/4] usb: mx6: add fuse check

2020-05-01 Thread Peng Fan
Add fuse check for USB. If the fuse indicates the module will not work in the SoC, let's fail the initialization. Signed-off-by: Peng Fan --- drivers/usb/host/ehci-mx6.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehc

[PATCH V2 resend 4/4] net: fec: add fuse check

2020-05-01 Thread Peng Fan
Add fuse check for fec. If the fuse indicates the module will not work in the SoC, let's fail the initialization. Signed-off-by: Peng Fan Acked-by: Joe Hershberger --- drivers/net/fec_mxc.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/fec_mxc.c b/driver

[PATCH 1/4] clk: clk-imx8mm: Add flexspi clock and fix set parent

2020-05-03 Thread Peng Fan
From: Ye Li Add flexspi relevant clocks, and fix set parent clock, so we can assign clocks through DTB Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mm.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imx8mm.c

[PATCH 4/4] clk: imx8mp: Update imx8mp ccf clock driver

2020-05-03 Thread Peng Fan
From: Ye Li Add clocks for FEC and flexspi, and add set parent clock callback, so DTS can assign clocks Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mp.c | 52 1 file changed, 52 insertions(+) diff --git a/drivers/clk

[PATCH 3/4] clk: imx8mm/8mn: Add USB clocks

2020-05-03 Thread Peng Fan
From: Ye Li Add USB relevant clocks to support usb clock settings for both DM USB host and gadget drivers Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mm.c | 17 + drivers/clk/imx/clk-imx8mn.c | 20 2 files changed, 37

[PATCH 2/4] clk: clk-imx8mn: Update clock tree and support set parent

2020-05-03 Thread Peng Fan
From: Ye Li Add set clock parent support. Add ENET and flexspi related clocks to support assigned clocks Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mn.c | 56 1 file changed, 56 insertions(+) diff --git a/drivers/clk

[PATCH] pinctrl: nxp: scu: Check the pad partition before set pinmux

2020-05-03 Thread Peng Fan
From: Ye Li If a pad is not owned by current partition we should not set its pinmux. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/pinctrl/nxp/pinctrl-scu.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/nxp/pinctrl-scu.c b/drivers

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

2020-05-03 Thread Peng Fan
From: 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 Signed-off-by: Peng Fan --- drivers/mtd/spi/spi-nor-ids.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH] dm: serial: introduce puts hook

2020-05-03 Thread Peng Fan
Introduce puts hook for dm serial driver. Signed-off-by: Peng Fan --- drivers/serial/serial-uclass.c | 13 +++-- include/serial.h | 8 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c

RE: [PATCH V2 1/9] uclass: cpu: Add new API to get udevice for current CPU

2020-05-03 Thread Peng Fan
Hi Simon, > Subject: Re: [PATCH V2 1/9] uclass: cpu: Add new API to get udevice for > current CPU > > Hi Peng, > > On Fri, 1 May 2020 at 07:22, Peng Fan wrote: > > > > When running on SoC with multiple clusters, the boot CPU may not be > > fixed, saying

[PATCH V3 4/9] common: board_f: Use cpu_get_current_dev in print_cpuinfo

2020-05-03 Thread Peng Fan
From: Ye Li Current print_cpuinfo gets the first udevice in CPU class to return the cpu info. This has problem if the boot CPU is not fixed. Changing to use new API cpu_get_current_dev to fix the issue. Reviewed-by: Simon Glass Signed-off-by: Ye Li Signed-off-by: Peng Fan --- V3: None V2

[PATCH V3 3/9] test: cpu: test current cpu

2020-05-03 Thread Peng Fan
Add test whether the CPU is U-Boot is running from. Reviewed-by: Simon Glass Signed-off-by: Peng Fan --- V3: Add R-b tag V2: New test/dm/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/dm/cpu.c b/test/dm/cpu.c index e6dc576ea3..def9b64a28 100644 --- a/test/dm/cpu.c +++ b

[PATCH V3 5/9] cpu: imx8: reimplement get cpu count

2020-05-03 Thread Peng Fan
Return 4 is not correct on i.MX8DX/DXL/8QM and etc. we need to count available cpu node with device_type "cpu". Reviewed-by: Simon Glass Signed-off-by: Peng Fan --- V3: None V2: Add R-b tag drivers/cpu/imx8_cpu.c | 19 ++- 1 file changed, 18 insertions(+),

[PATCH V3 2/9] cpu: sandbox: support is_current

2020-05-03 Thread Peng Fan
Support querying whether U-Boot is running on current cpu Reviewed-by: Simon Glass Signed-off-by: Peng Fan --- V3: Add R-b V2: New drivers/cpu/cpu_sandbox.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/cpu/cpu_sandbox.c b/drivers/cpu/cpu_sandbox.c index 05b384f6a4

[PATCH V3 6/9] cpu: imx8: support a72 as boot cpu

2020-05-03 Thread Peng Fan
Support booting i.MX8QM with A72 as boot cpu Reviewed-by: Simon Glass Signed-off-by: Peng Fan --- V3: None V2: Add R-b tag drivers/cpu/imx8_cpu.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c index 7c54c290b8

[PATCH V3 1/9] uclass: cpu: Add new API to get udevice for current CPU

2020-05-03 Thread Peng Fan
udevice in cpu uclass. Reviewed-by: Simon Glass Signed-off-by: Peng Fan Signed-off-by: Ye Li --- V3: Drop ops check. Add R-b V2: Per Simon's comment, - Add cpu_is_current - use uclass_foreach_dev_probe - Update code comment drivers/cpu/cpu-uclass.c

[PATCH V3 7/9] cpu: imx8: fix get core name and rate

2020-05-03 Thread Peng Fan
When current cpu is A53, using is_cortex_a53 could not detect A72 information, so check cpu device compatible property to get the correct information. Reviewed-by: Simon Glass Signed-off-by: Peng Fan --- V3: None V2: Add R-b tag drivers/cpu/imx8_cpu.c | 27 +-- 1

[PATCH V3 9/9] cpu: imx8: show RevC instead of Rev? at boot log

2020-05-03 Thread Peng Fan
From: Frank Li Add REVC informaiton. Reviewed-by: Simon Glass Signed-off-by: Frank Li Signed-off-by: Peng Fan --- V3: None V2: Add R-b tag arch/arm/include/asm/arch-imx/cpu.h | 1 + drivers/cpu/imx8_cpu.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/arm

[PATCH V3 8/9] cpu: imx_cpu: Print the CPU temperature for iMX8QM A72

2020-05-03 Thread Peng Fan
From: Ye Li iMX8QM registers two thermal devices for CPUs, get the temperature from "cpu-thermal1" device for A72 Reviewed-by: Simon Glass Signed-off-by: Ye Li Signed-off-by: Peng Fan --- V3: None V2: Per Simon's comments, use uclass_get_device drivers/cpu/

[PATCH 00/13] imx: tmu support and scu thermal update

2020-05-03 Thread Peng Fan
This patchset is to support TMU in i.MX8M family, including i.MX8QM SCU thermal update. Peng Fan (8): thermal: Add thermal driver for i.MX8M thermal: imx_tmu: Add support for thermal sensor on iMX8MM thermal: imx_tmu: support TMU arch level initialization thermal: imx_tmu: Fix for

[PATCH 03/13] thermal: imx_tmu: Add support for thermal sensor on iMX8MM

2020-05-03 Thread Peng Fan
The analog sensors on iMX8MM are new, used for 14LPP process. So the Temperature Sensor Monitoring Unit (TMU) has some change accordingly. We use version 2 in TMU driver to represent the new TMU, so the one driver can service for both i.MX8MQ/M. Signed-off-by: Peng Fan --- drivers/thermal

[PATCH 01/13] thermal: imx_scu_thermal: Update driver for i.MX8QM thermal sensor

2020-05-03 Thread Peng Fan
From: Ye Li Add iMX8QM thermal compatible string and its driver data. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/thermal/imx_scu_thermal.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c index

[PATCH 04/13] thermal: imx_tmu: support TMU arch level initialization

2020-05-03 Thread Peng Fan
i.MX8MM TMU needs to load some registers from fuse, this is arch dependent operation and may vary on different platforms. So add a interface for arch level initialization. Signed-off-by: Peng Fan --- drivers/thermal/imx_tmu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers

[PATCH 07/13] thermal: imx_tmu: support i.MX8MP

2020-05-03 Thread Peng Fan
Support i.MX8MP thermal which has two probes and supports temperature range from -40 to 125. Still uses default 1p HW calibration at 25C and loads calibration parameters from fuse. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/thermal/imx_tmu.c | 76

[PATCH 06/13] thermal: imx_tmu: Check the TEMP range for iMX8MM

2020-05-03 Thread Peng Fan
On iMX8MM, the V flag in TRISTR register only reflect the state of SNSR value, not the calibrated TEMP value. So checking this flag is not reliable. Per IC suggestion, change to read the TEMP/AVG_TEMP directly and check whether it in valid range 10-125C. Signed-off-by: Ye Li Signed-off-by: Peng

[PATCH 08/13] imx8mm: Load fuse for TMU TCALIV and TASR

2020-05-03 Thread Peng Fan
From: Ye Li On iMX8MM, the default value of TMU registers TCALIV and TASR need be loaded from fuse. HW won't do this, it expect SW loads them before using TMU. Reviewed-by: Bai Ping Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/soc.c

[PATCH 02/13] thermal: Add thermal driver for i.MX8M

2020-05-03 Thread Peng Fan
The driver is ported form Linux Kernel and support driver model. Users need to provide the tmu node and sensors nodes in DTB. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/thermal/Kconfig | 9 ++ drivers/thermal/Makefile | 1 + drivers/thermal/imx_tmu.c | 325

[PATCH 05/13] thermal: imx_tmu: Fix for temperature out of range

2020-05-03 Thread Peng Fan
;s NXP patch Signed-off-by: Peng Fan --- drivers/thermal/imx_tmu.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/imx_tmu.c b/drivers/thermal/imx_tmu.c index 049f32c39e..2a08d5085c 100644 --- a/drivers/thermal/imx_tmu.c +++ b/drivers/thermal/

[PATCH 10/13] imx: load calibration parameters from fuse for i.MX8MP

2020-05-03 Thread Peng Fan
From: Ye Li i.MX8MP thermal which has two probes and supports temperature range from -40 to 125. The driver still uses default 1p HW calibration at 25C and loads calibration parameters from fuse. Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m

[PATCH 09/13] imx: i.MX8MN: Enable loading TASR and TCALIV from fuse

2020-05-03 Thread Peng Fan
From: Ye Li Like iMX8MM, iMX8MN also needs SW to load TMU TASR and TCALIV registers value from fuse before enabling TMU calibration. Otherwise the calibration is not exact. Reviewed-by: Anson Huang Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/soc.c | 2 +- 1 file

[PATCH 11/13] imx8mp: Set default SNSR25C for TMU probe1

2020-05-03 Thread Peng Fan
From: Ye Li So far u-boot only load SNSR25C for TMU main probe (probe 0). However, kernel enables two probes. So it also needs to set default SNSR25C of TCALIV1 for blank samples. Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/soc.c | 2 ++ 1

[PATCH 13/13] imx: cpu: support tmu

2020-05-03 Thread Peng Fan
Support tmu when print cpu info Signed-off-by: peng Fan --- arch/arm/mach-imx/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c index bfa85c64c6..2d70b6861d 100644 --- a/arch/arm/mach-imx/cpu.c +++ b/arch/arm/mach-imx

[PATCH 12/13] imx: regs: add more fuse bank structure

2020-05-03 Thread Peng Fan
Add more fuse bank structure for use. Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8m/imx-regs.h | 41 +- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/arch/arm/include/asm/arch-imx8m/imx-regs.h b/arch/arm/include/asm/arch-imx8m/imx

[PATCH 1/4] sata: ahsata: Fix resource leak

2020-05-03 Thread Peng Fan
From: Ye Li Fix coverity issue CID 3606684: Resource leak (RESOURCE_LEAK) leaked_storage: Variable uc_priv going out of scope leaks the storage it points to Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/ata/dwc_ahsata.c | 5 + 1 file changed, 5 insertions(+) diff --git a

[PATCH 2/4] sata: ahsata: Fix wrong operand for checking SERR DIAG_X

2020-05-03 Thread Peng Fan
should use '&' to check whether it is set. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/ata/dwc_ahsata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c index a775214792..4b37a02338 100644 ---

[PATCH 3/4] sata: dwc_ahsata: Fix incorrect free

2020-05-03 Thread Peng Fan
From: Ye Li Fix coverity issue CID 43665: Free of address-of expression (BAD_FREE) incorrect_free: free frees incorrect pointer pp. pp points the port array field of struct ahci_uc_priv, should not free it. Acked-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/ata

[PATCH 4/4] sata: dwc_ahsata: Fix memory issue in reset_sata

2020-05-03 Thread Peng Fan
From: Ye Li The reset_sata should reset the sata device info and free the probe_ent memory. Otherwise, it will cause memory leak if we init the sata again. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/ata/dwc_ahsata.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers

[PATCH 2/2] misc: scu: Increase the timeout for MU communication

2020-05-03 Thread Peng Fan
From: Ye Li When power on some sources in Video system, current timeout 10ms is too short and returns before SCU response. So increase the timeout to 1s. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/misc/imx8/scu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/2] misc: fuse: Update imx8 fuse driver for 8QM

2020-05-03 Thread Peng Fan
From: Ye Li Add the second ECC fuse area for 8QM which is different with 8QXP Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/misc/imx8/fuse.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/misc/imx8/fuse.c b/drivers/misc/imx8/fuse.c index 1309215d4d..4d7f2f524d

[PATCH 2/5] power: imx8-power-domain: Set DM_FLAG_DEFAULT_PD_CTRL_OFF flag

2020-05-03 Thread Peng Fan
DM_FLAG_DEFAULT_PD_CTRL_OFF to avoid such issue Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/power/domain/imx8-power-domain-legacy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c index

[PATCH 1/5] imx8: power: Add PD device lookup interface to power domain uclass

2020-05-03 Thread Peng Fan
tream patch only for legacy imx8 power domain driver, since we have not migrated to use new power domain driver. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8/sys_proto.h | 7 +++ drivers/power/domain/imx8-power-domain-legacy.c

[PATCH 3/5] power: imx8: remove the resource owned check before power off

2020-05-03 Thread Peng Fan
resource owner, the power domain in the other software partition could be powered off with parent partition could access child partition resources. Signed-off-by: Peng Fan --- drivers/power/domain/imx8-power-domain-legacy.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a

[PATCH 4/5] power: imx8: Check owned resource in power on

2020-05-03 Thread Peng Fan
in power on. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/power/domain/imx8-power-domain-legacy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c index b68be40766..a5f2f8a445

[PATCH 5/5] power: imx8: Replace SC_R_LAST with SC_R_NONE

2020-05-03 Thread Peng Fan
every time we need to update linux and uboot headers together or boot can fail. Fix this by replacing SC_R_LAST usage with a new constant SC_R_NONE defined to be 0xFFF0. Reviewed-by: Peng Fan Signed-off-by: Leonard Crestez Signed-off-by: Peng Fan --- arch/arm/dts/fsl-imx8dx.dtsi

[PATCH V2 3/8] net: Update eQos driver and FEC driver to use eth phy interfaces

2020-05-03 Thread Peng Fan
From: Ye Li Update eQoS and fec ethernet drivers to support shared MDIO framework Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/net/dwc_eth_qos.c | 45 +++-- drivers/net/fec_mxc.c | 16 ++-- 2 files changed, 45 insertions

[PATCH V2 2/8] net: Add eth phy generic driver for shared MDIO

2020-05-03 Thread Peng Fan
g its MDIO. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/net/Kconfig | 6 +++ drivers/net/Makefile | 1 + drivers/net/eth-phy-uclass.c | 122 +++ include/dm/uclass-id.h | 1 + include/eth_phy.h| 17 ++

[PATCH V2 1/8] net: eth-uclass: add return value check

2020-05-03 Thread Peng Fan
Add return value check Signed-off-by: Peng Fan --- net/eth-uclass.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/net/eth-uclass.c b/net/eth-uclass.c index 8bf2eabe90..950a48d520 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -40,8 +40,12 @@ static

[PATCH V2 4/8] net: phy: realtek: add rx delay support for RTL8211F

2020-05-03 Thread Peng Fan
From: Fugang Duan Add RX delay enable support for RTL8211F PHY. Reviewed-by: Ye Li Signed-off-by: Fugang Duan Signed-off-by: Peng Fan --- drivers/net/phy/realtek.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index

[PATCH V2 6/8] net: eqos: implement callbaks to get interface and set txclk rate

2020-05-03 Thread Peng Fan
From: Fugang Duan Implement the callbacks to get phy mode interface and txclk rate configuration. Reviewed-by: Ye Li Signed-off-by: Fugang Duan Signed-off-by: Peng Fan --- V2: Fix build break drivers/net/dwc_eth_qos.c | 55 --- 1 file changed

[PATCH V2 5/8] net: dwc_eth_qos: add dwc eqos for imx support

2020-05-03 Thread Peng Fan
From: Fugang Duan Add dwc eqos for imx support. Reviewed-by: Ye Li Signed-off-by: Fugang Duan Signed-off-by: Peng Fan --- drivers/net/dwc_eth_qos.c | 187 ++ 1 file changed, 173 insertions(+), 14 deletions(-) diff --git a/drivers/net

[PATCH V2 8/8] eQos: Implement the read_rom_hwaddr callback

2020-05-03 Thread Peng Fan
From: Ye Li Implement the read_rom_hwaddr callback to load MAC address from fuse for imx8m platforms. Reviewed-by: Fugang Duan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/net/dwc_eth_qos.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net

[PATCH V2 7/8] fec: Move imx_get_mac_from_fuse declare to imx file

2020-05-03 Thread Peng Fan
From: Ye Li imx_get_mac_from_fuse is used to load MAC address from fuse. On imx8mp, we have two different ENET controllers and both need to call this function. So decouple its declare from fec driver. Reviewed-by: Fugang Duan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/include

RE: [PATCH 5/5] power: imx8: Replace SC_R_LAST with SC_R_NONE

2020-05-03 Thread Peng Fan
> Subject: Re: [PATCH 5/5] power: imx8: Replace SC_R_LAST with SC_R_NONE > > Hi Peng, > > On Sun, 3 May 2020 22:33:23 +0800 > Peng Fan peng@nxp.com wrote: > ... > > --- > > arch/arm/dts/fsl-imx8dx.dtsi| 619 >

RE: [PATCH 10/13] imx: load calibration parameters from fuse for i.MX8MP

2020-05-03 Thread Peng Fan
Hi Fabio, > Subject: Re: [PATCH 10/13] imx: load calibration parameters from fuse for > i.MX8MP > > Hi Peng and Ye Li, > > On Sun, May 3, 2020 at 10:57 AM Peng Fan wrote: > > > > From: Ye Li > > > > i.MX8MP thermal which has two probes and supports t

<    1   2   3   4   5   6   7   8   9   10   >