[PATCH 1/1] net: nfs: fix file handle length in NFSv3
The NFS protocol uses file handles to refer to file or directory. In NFSv2 file handles have a fixed size of 32 bytes. In NFSv3 file handles have a variable length up to 64 bytes. This is also true for the MOUNT protocol. [1] When the NFSv3 server replies with a file handle length > 32 bytes, U-Boot only copies 32 bytes of that file handle and the next LOOKUP Call fails: BIOS> nfs ${loadaddr} 192.168.1.51:/nfsroot/opos93dev-br/boot/Image Using ethernet@428a device File transfer via NFS from server 192.168.1.51; our IP address is 192.168.1.133 Filename '/nfsroot/opos93dev-br/boot/Image'. Load address: 0x8040 Loading: *** ERROR: File lookup fail done BIOS> Looking at this transfer in Wireshark, we can see that the server replies with the following file handle: length: 36 [hash (CRC-32): 0x230ac67b] FileHandle: 0100070101005e0091763911f87c449fa73c298552db19ba0c9f60002980cfd2 and U-Boot sends the following file handle in the next LOOKUP Call: length: 32 [hash (CRC-32): 0x6314131b] FileHandle: 00240100070101005e0091763911f87c449fa73c298552db19ba Fix this by using a variable length file handle for dirfh. [1] https://www.rfc-editor.org/rfc/rfc1813.html#page-106 Fixes: b0baca982048 ("net: NFS: Add NFSv3 support") Signed-off-by: Sébastien Szymanski --- net/nfs.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/net/nfs.c b/net/nfs.c index 7a8887ef2368..c18282448ccd 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -57,7 +57,8 @@ static int nfs_offset = -1; static int nfs_len; static const ulong nfs_timeout = CONFIG_NFS_TIMEOUT; -static char dirfh[NFS_FHSIZE]; /* NFSv2 / NFSv3 file handle of directory */ +static char dirfh[NFS3_FHSIZE]; /* NFSv2 / NFSv3 file handle of directory */ +static unsigned int dirfh3_length; /* (variable) length of dirfh when NFSv3 */ static char filefh[NFS3_FHSIZE]; /* NFSv2 / NFSv3 file handle */ static unsigned int filefh3_length;/* (variable) length of filefh when NFSv3 */ @@ -377,9 +378,9 @@ static void nfs_lookup_req(char *fname) rpc_req(PROG_NFS, NFS_LOOKUP, data, len); } else { /* NFS_V3 */ - *p++ = htonl(NFS_FHSIZE); /* Dir handle length */ - memcpy(p, dirfh, NFS_FHSIZE); - p += (NFS_FHSIZE / 4); + *p++ = htonl(dirfh3_length);/* Dir handle length */ + memcpy(p, dirfh, dirfh3_length); + p += (dirfh3_length / 4); *p++ = htonl(fnamelen); if (fnamelen & 3) *(p + fnamelen / 4) = 0; @@ -565,7 +566,14 @@ static int nfs_mount_reply(uchar *pkt, unsigned len) fs_mounted = 1; /* NFSv2 and NFSv3 use same structure */ - memcpy(dirfh, rpc_pkt.u.reply.data + 1, NFS_FHSIZE); + if (choosen_nfs_version != NFS_V3) { + memcpy(dirfh, rpc_pkt.u.reply.data + 1, NFS_FHSIZE); + } else { + dirfh3_length = ntohl(rpc_pkt.u.reply.data[1]); + if (dirfh3_length > NFS3_FHSIZE) + dirfh3_length = NFS3_FHSIZE; + memcpy(dirfh, rpc_pkt.u.reply.data + 2, dirfh3_length); + } return 0; } -- 2.43.2
Re: [PATCH 1/2] opos6uldev: make the LCD work again
On 3/1/24 07:02, Sumit Garg wrote: On Thu, 29 Feb 2024 at 19:31, Tom Rini wrote: On Thu, Feb 29, 2024 at 08:42:42AM -0500, Tom Rini wrote: On Thu, Feb 29, 2024 at 11:17:28AM +0530, Sumit Garg wrote: On Wed, 28 Feb 2024 at 20:50, Tom Rini wrote: On Wed, Feb 28, 2024 at 07:44:42PM +0530, Sumit Garg wrote: + Shawn, Krzysztof, Conor Hi Tom, On Wed, 28 Feb 2024 at 18:40, Tom Rini wrote: On Wed, Feb 28, 2024 at 10:09:13AM +0300, Dan Carpenter wrote: On Tue, Feb 27, 2024 at 04:40:01PM +0100, Sébastien Szymanski wrote: Commit 5d7a95f4 ("imx6ul/imx6ull: synchronise device trees with linux") removed the display timings from the board device tree whereas they are still needed by the mxsfb driver. Add the timings back (the correct ones) in the imx6ul-opos6uldev-u-boot.dtsi file and remove them from the opos6uldev.env file. Update the opos6uldev_defconfig file so that the LCD turns on at boot. Fixes: 5d7a95f4 ("imx6ul/imx6ull: synchronise device trees with linux") Signed-off-by: Sébastien Szymanski Huh. This is the commit that did that upstream. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d9aa4d4fca67823838fe9861456201430c545e69 It's interesting how the timings in linux were always slightly different from in u-boot. Thanks for tracking that down, Dan. I'm adding in Sumit and Rob here because this is a recent (rather than ancient) example of one of the concerns about OF_UPSTREAM. I rather think about this as an opportunity to improve with OF_UPSTREAM. We can feed these kinds of DT ABI breakages to corresponding Linux kernel sub-arch maintainers. Especially once we move to OF_UPSTREAM and a sub-arch maintainer profile in Linux kernel to keep them aware that U-Boot should be considered too. Yes, a more extensive check around when removing information from dts files would be good. I think the commit in question can be summarized as "remove a bunch of explicit HW information because there's now a Linux Kernel driver that determines that dynamically". What do we do next? The old information is in a presumably valid binding still, can we just put it back and comment that consumers outside of Linux use this still so it's not removed again later? Or am I just missing where we can instead get this information from the DT still and not need to come up with a new driver and subsystems? I can see following two paths forward: 1) Partially revert the Linux kernel commit to add back the display timings in DT. 2) Extend drivers/video/simple_panel.c in U-Boot to add support for compatible: "armadeus,st0700-adapt". If possible then I would be in favour of (2) rather than the current patch to do this properly. Well, looking at the kernel drivers/gpu/drm/panel/panel-simple.c driver and then our drivers/video/simple_panel.c it sure would be nice if it's just a matter of adding a compatible but I wouldn't be surprised if it ends up needing more information being passed along too? Although I am not a LCD panel expert but looking at the kernel driver code [1], the display timings are rather taken from a static data structure matching the compatible "armadeus,st0700-adapt". [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/panel/panel-simple.c#n901 Yes. My point is that it seems like the situation changed from "device tree provides timings for the platform" to "driver has timing information for N displays" and so we'll need to do something clever to avoid including the structs for 5 panels when we'll only ever (likely...) see one. And that also yes, we'll probably need to add data for this panel rather than re-use the PANASONIC_VVX10F004B00 data. And I'm going assume there's good reasons for the design change in how the drivers work in Linux now and note that it might make things more challenging for us when we do care about space. I agree it is always going to be challenging to use DT during SPL stage which is mostly constrained by limited on-chip RAM. Well, no. The DT way handled this more efficiently, I think I wasn't clear enough in my reply. And it's not just SPL, full U-Boot needs to stay small and within flash partition considerations and I become cranky and question people when non-generic changes impact platforms that don't need the change. Okay I can see your point. I suppose this leads us to option (1) to partially revert the Linux kernel commit [1] to add back the display timings in DT. Ironically all the folks (developer, U-Boot and Linux kernel iMX maintainers) were involved in the upstream process for the Linux kernel commit [1] under question. So I will let them chime in too. It is also now possible to have the display timings under the panel node: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/drm/panel/panel-simple.c?h=v6.8-rc6=4a1d0dbc8332231d1d500d7a1d13c45457262a97 Not sure
[PATCH 2/2] video: mxsfb: add back imx6ul/imx6ull support
Because of commit bf947d2a4b15 ("imx6ul: synchronise device tree with linux"), the compatible property of lcdif in imx6ul.dtsi went from compatible = "fsl,imx6ul-lcdif", "fsl,imx28-lcdif"; to compatible = "fsl,imx6ul-lcdif", "fsl,imx6sx-lcdif"; without updating the mxsfb driver to match that change. Add "fsl,imx6sx-lcdif" as a compatible id to fix that. Fixes: bf947d2a4b15 ("imx6ul: synchronise device tree with linux") Signed-off-by: Sébastien Szymanski --- drivers/video/mxsfb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 10433949bb80..515363f6a49b 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -387,6 +387,7 @@ static int mxs_video_remove(struct udevice *dev) static const struct udevice_id mxs_video_ids[] = { { .compatible = "fsl,imx23-lcdif" }, { .compatible = "fsl,imx28-lcdif" }, + { .compatible = "fsl,imx6sx-lcdif" }, { .compatible = "fsl,imx7ulp-lcdif" }, { .compatible = "fsl,imxrt-lcdif" }, { /* sentinel */ } -- 2.43.0
[PATCH 1/2] opos6uldev: make the LCD work again
Commit 5d7a95f4 ("imx6ul/imx6ull: synchronise device trees with linux") removed the display timings from the board device tree whereas they are still needed by the mxsfb driver. Add the timings back (the correct ones) in the imx6ul-opos6uldev-u-boot.dtsi file and remove them from the opos6uldev.env file. Update the opos6uldev_defconfig file so that the LCD turns on at boot. Fixes: 5d7a95f4 ("imx6ul/imx6ull: synchronise device trees with linux") Signed-off-by: Sébastien Szymanski --- arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi | 28 +- board/armadeus/opos6uldev/opos6uldev.env | 1 - configs/opos6uldev_defconfig | 3 --- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi b/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi index aa88964f210d..3b52d6bbd9b9 100644 --- a/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi +++ b/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi @@ -7,12 +7,6 @@ #include "imx6ul-opos6ul-u-boot.dtsi" -/ { - aliases { - display0 = - }; -}; - { bootph-pre-ram; @@ -22,7 +16,29 @@ }; { + display = <>; bootph-some-ram; + + display0: display0 { + bits-per-pixel = <18>; + bus-width = <18>; + + display-timings { + timing0 { + clock-frequency = <3330>; + hactive = <800>; + vactive = <480>; + hback-porch = <36>; + hfront-porch = <210>; + vback-porch = <13>; + vfront-porch = <22>; + hsync-len = <10>; + vsync-len = <10>; + de-active = <1>; + pixelclk-active = <0>; + }; + }; + }; }; _uart1 { diff --git a/board/armadeus/opos6uldev/opos6uldev.env b/board/armadeus/opos6uldev/opos6uldev.env index f90029787104..2e7b65968d1d 100644 --- a/board/armadeus/opos6uldev/opos6uldev.env +++ b/board/armadeus/opos6uldev/opos6uldev.env @@ -24,7 +24,6 @@ mmcrootfstype=ext4 rootwait kernelimg=opos6ul-linux.bin splashpos=0,0 splashimage=CONFIG_SYS_LOAD_ADDR -videomode=video=ctfb:x:800,y:480,depth:18,pclk:33033,le:96,ri:96,up:20,lo:21,hs:64,vs:4,sync:0,vmode:0 check_env=if test -n ${flash_env_version}; then env default env_version; else env set flash_env_version ${env_version}; env save; diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig index e1884df9dd23..7d21a6fe93c5 100644 --- a/configs/opos6uldev_defconfig +++ b/configs/opos6uldev_defconfig @@ -115,13 +115,10 @@ CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_VIDEO=y CONFIG_VIDEO_LOGO=y -# CONFIG_VIDEO_BPP8 is not set -# CONFIG_VIDEO_BPP32 is not set CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_MXS=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y -CONFIG_SPLASH_SOURCE=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y -- 2.43.0
[PATCH v3 1/1] Makefile: pass -undef option to cmd_gen_envp
Without the '-undef' option, the 'linux' string in .env files is replaced with the string '1 '. For example, in the board/armadeus/opos6uldev/opos6uldev.env file, kernelimg=opos6ul-linux.bin becomes kernelimg=opos6ul-1 .bin in the include/generated/env.in file. That's because 'linux' is a System-specific Predefined Macros. [1] Pass the '-undef' option to fix this issue. [1] https://gcc.gnu.org/onlinedocs/gcc-13.2.0/cpp/System-specific-Predefined-Macros.html Signed-off-by: Sébastien Szymanski --- Changes for v3: - use -undef instead of ansi. With -undef, there is no need to modify iot2050.env and smegw01.env files anymore. Changes for v2: - explain the change of iot2050.env and smegw01.env in the commit log Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3b5db90df6f9..63b006e0e0f1 100644 --- a/Makefile +++ b/Makefile @@ -1804,7 +1804,8 @@ ENV_FILE := $(if $(ENV_SOURCE_FILE),$(ENV_FILE_CFG),$(wildcard $(ENV_FILE_BOARD) quiet_cmd_gen_envp = ENVP$@ cmd_gen_envp = \ if [ -s "$(ENV_FILE)" ]; then \ - $(CPP) -P $(CFLAGS) -x assembler-with-cpp -D__ASSEMBLY__ \ + $(CPP) -P $(CFLAGS) -x assembler-with-cpp -undef \ + -D__ASSEMBLY__ \ -D__UBOOT_CONFIG__ \ -I . -I include -I $(srctree)/include \ -include linux/kconfig.h -include include/config.h \ -- 2.43.0
[PATCH 1/1] opos6uldev: Convert to watchdog driver model
Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused the 'reset' command in U-Boot to not cause a board reset. Fix it by switching to the watchdog driver model via sysreset, which is the preferred method for implementing the watchdog reset. Signed-off-by: Sébastien Szymanski --- arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi | 10 ++ configs/opos6uldev_defconfig| 3 +++ 2 files changed, 13 insertions(+) diff --git a/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi b/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi index ebfb95dcdf4b..e65eeb8d8ceb 100644 --- a/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi +++ b/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi @@ -9,6 +9,12 @@ soc { bootph-pre-ram; }; + + wdt-reboot { + compatible = "wdt-reboot"; + wdt = <>; + bootph-pre-ram; + }; }; { @@ -26,3 +32,7 @@ { bootph-pre-ram; }; + + { + bootph-pre-ram; +}; diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig index ac4170d2e49a..e1884df9dd23 100644 --- a/configs/opos6uldev_defconfig +++ b/configs/opos6uldev_defconfig @@ -102,6 +102,8 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_WATCHDOG=y CONFIG_IMX_THERMAL=y CONFIG_USB=y CONFIG_USB_STORAGE=y @@ -123,4 +125,5 @@ CONFIG_SPLASH_SOURCE=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_IMX_WATCHDOG=y # CONFIG_EFI_LOADER is not set -- 2.43.0
[PATCH v2 1/1] Makefile: pass -ansi option to cmd_gen_envp
Without the '-ansi' option, the 'linux' string in env. files is replaced with the string '1 '. For example, in the board/armadeus/opos6uldev/opos6uldev.env file, kernelimg=opos6ul-linux.bin becomes kernelimg=opos6ul-1 .bin in the include/generated/env.in file. That's because 'linux' is a System-specific Predefined Macros. [1] Pass the '-ansi' option as suggested by the GCC documentation. [1] The option "disables recognition of C++ style ‘//’ comments" [2] so fix the two .env files using C++ comment style for the SPDX licence. [1] https://gcc.gnu.org/onlinedocs/gcc-13.2.0/cpp/System-specific-Predefined-Macros.html [2] https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-ANSI-support Signed-off-by: Sébastien Szymanski --- Changes for v2: - explain the change of iot2050.env and smegw01.env in the commit log Makefile| 3 ++- board/siemens/iot2050/iot2050.env | 2 +- board/storopack/smegw01/smegw01.env | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 220411a293f4..6703646d48a4 100644 --- a/Makefile +++ b/Makefile @@ -1803,7 +1803,8 @@ ENV_FILE := $(if $(ENV_SOURCE_FILE),$(ENV_FILE_CFG),$(wildcard $(ENV_FILE_BOARD) quiet_cmd_gen_envp = ENVP$@ cmd_gen_envp = \ if [ -s "$(ENV_FILE)" ]; then \ - $(CPP) -P $(CFLAGS) -x assembler-with-cpp -D__ASSEMBLY__ \ + $(CPP) -P $(CFLAGS) -x assembler-with-cpp -ansi \ + -D__ASSEMBLY__ \ -D__UBOOT_CONFIG__ \ -I . -I include -I $(srctree)/include \ -include linux/kconfig.h -include include/config.h \ diff --git a/board/siemens/iot2050/iot2050.env b/board/siemens/iot2050/iot2050.env index 8bbd7abe98f0..a3bdbf4f6998 100644 --- a/board/siemens/iot2050/iot2050.env +++ b/board/siemens/iot2050/iot2050.env @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright (c) Siemens AG, 2023 * diff --git a/board/storopack/smegw01/smegw01.env b/board/storopack/smegw01/smegw01.env index 93de8669109d..6807ada71887 100644 --- a/board/storopack/smegw01/smegw01.env +++ b/board/storopack/smegw01/smegw01.env @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ #ifdef CONFIG_SYS_BOOT_LOCKED #define SETUP_BOOT_MENU setup_boot_menu=setenv bootmenu_0 eMMC=run bootcmd #else -- 2.41.0
[PATCH 1/1] Makefile: pass -ansi option to cmd_gen_envp
Without the '-ansi' option, the 'linux' string in env. files is replaced with the string '1 '. For example, in the board/armadeus/opos6uldev/opos6uldev.env file, kernelimg=opos6ul-linux.bin becomes kernelimg=opos6ul-1 .bin in the include/generated/env.in. That's because 'linux' is a System-specific Predefined Macros. [1] Pass the '-ansi' option as suggested by the GCC documentation. [1] Fix the two .env files using C++ comment style for their SPDX licence. [1] https://gcc.gnu.org/onlinedocs/gcc-13.2.0/cpp/System-specific-Predefined-Macros.html Signed-off-by: Sébastien Szymanski --- Makefile| 3 ++- board/siemens/iot2050/iot2050.env | 2 +- board/storopack/smegw01/smegw01.env | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 750bbdb1b713..5fc7a20df7f0 100644 --- a/Makefile +++ b/Makefile @@ -1803,7 +1803,8 @@ ENV_FILE := $(if $(ENV_SOURCE_FILE),$(ENV_FILE_CFG),$(wildcard $(ENV_FILE_BOARD) quiet_cmd_gen_envp = ENVP$@ cmd_gen_envp = \ if [ -s "$(ENV_FILE)" ]; then \ - $(CPP) -P $(CFLAGS) -x assembler-with-cpp -D__ASSEMBLY__ \ + $(CPP) -P $(CFLAGS) -x assembler-with-cpp -ansi \ + -D__ASSEMBLY__ \ -D__UBOOT_CONFIG__ \ -I . -I include -I $(srctree)/include \ -include linux/kconfig.h -include include/config.h \ diff --git a/board/siemens/iot2050/iot2050.env b/board/siemens/iot2050/iot2050.env index 8bbd7abe98f0..a3bdbf4f6998 100644 --- a/board/siemens/iot2050/iot2050.env +++ b/board/siemens/iot2050/iot2050.env @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright (c) Siemens AG, 2023 * diff --git a/board/storopack/smegw01/smegw01.env b/board/storopack/smegw01/smegw01.env index 93de8669109d..6807ada71887 100644 --- a/board/storopack/smegw01/smegw01.env +++ b/board/storopack/smegw01/smegw01.env @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ #ifdef CONFIG_SYS_BOOT_LOCKED #define SETUP_BOOT_MENU setup_boot_menu=setenv bootmenu_0 eMMC=run bootcmd #else -- 2.41.0
Re: [PATCH 1/1] Makefile: pass -ansi option to cmd_gen_envp
Hi Fabio, On 12/15/23 13:03, Fabio Estevam wrote: Hi Sébastien, On Fri, Dec 15, 2023 at 8:14 AM Sébastien Szymanski wrote: --- a/board/siemens/iot2050/iot2050.env +++ b/board/siemens/iot2050/iot2050.env @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ With the -ansi option, the C++ style comments make an error: include/generated/env.txt:1:1: error: C++ style comments are not allowed in ISO C90 1 | // SPDX-License-Identifier: GPL-2.0+ I should have mention that in my commit log. Regards, This is an unrelated change. /* * Copyright (c) Siemens AG, 2023 * diff --git a/board/storopack/smegw01/smegw01.env b/board/storopack/smegw01/smegw01.env index 93de8669109d..6807ada71887 100644 --- a/board/storopack/smegw01/smegw01.env +++ b/board/storopack/smegw01/smegw01.env @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ Same here. -- Sébastien Szymanski, Armadeus Systems Software engineer
[PATCH 1/1] Makefile: pass -ansi option to cmd_gen_envp
Without the '-ansi' option, the 'linux' string in env. files is replaced with the string '1 '. For example, in the board/armadeus/opos6uldev/opos6uldev.env file, kernelimg=opos6ul-linux.bin becomes kernelimg=opos6ul-1 .bin in the include/generated/env.in. That's because 'linux' is a System-specific Predefined Macros. [1] Pass the '-ansi' option as suggested by the GCC documentation. [1] Fix the two .env files using C++ comment style for their SPDX licence. [1] https://gcc.gnu.org/onlinedocs/gcc-13.2.0/cpp/System-specific-Predefined-Macros.html Signed-off-by: Sébastien Szymanski --- Makefile| 3 ++- board/siemens/iot2050/iot2050.env | 2 +- board/storopack/smegw01/smegw01.env | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 750bbdb1b713..5fc7a20df7f0 100644 --- a/Makefile +++ b/Makefile @@ -1803,7 +1803,8 @@ ENV_FILE := $(if $(ENV_SOURCE_FILE),$(ENV_FILE_CFG),$(wildcard $(ENV_FILE_BOARD) quiet_cmd_gen_envp = ENVP$@ cmd_gen_envp = \ if [ -s "$(ENV_FILE)" ]; then \ - $(CPP) -P $(CFLAGS) -x assembler-with-cpp -D__ASSEMBLY__ \ + $(CPP) -P $(CFLAGS) -x assembler-with-cpp -ansi \ + -D__ASSEMBLY__ \ -D__UBOOT_CONFIG__ \ -I . -I include -I $(srctree)/include \ -include linux/kconfig.h -include include/config.h \ diff --git a/board/siemens/iot2050/iot2050.env b/board/siemens/iot2050/iot2050.env index 8bbd7abe98f0..a3bdbf4f6998 100644 --- a/board/siemens/iot2050/iot2050.env +++ b/board/siemens/iot2050/iot2050.env @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright (c) Siemens AG, 2023 * diff --git a/board/storopack/smegw01/smegw01.env b/board/storopack/smegw01/smegw01.env index 93de8669109d..6807ada71887 100644 --- a/board/storopack/smegw01/smegw01.env +++ b/board/storopack/smegw01/smegw01.env @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ #ifdef CONFIG_SYS_BOOT_LOCKED #define SETUP_BOOT_MENU setup_boot_menu=setenv bootmenu_0 eMMC=run bootcmd #else -- 2.41.0
[PATCH v2 3/4] net: phy: realtek: Add support for RTL8211F(D)(I)-VD-CG
Add support for the RTL8211F(D)(I)-VD-CG PHY present on the i.MX93 EVK board. Signed-off-by: Sébastien Szymanski --- Changes for v3: - none drivers/net/phy/realtek.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 396cac76d632..7e1036b2271f 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -446,6 +446,20 @@ U_BOOT_PHY_DRIVER(rtl8211f) = { .writeext = _phy_extwrite, }; +/* Support for RTL8211F-VD PHY */ +U_BOOT_PHY_DRIVER(rtl8211fvd) = { + .name = "RealTek RTL8211F-VD", + .uid = 0x1cc878, + .mask = 0xff, + .features = PHY_GBIT_FEATURES, + .probe = _probe, + .config = _config, + .startup = _startup, + .shutdown = _shutdown, + .readext = _phy_extread, + .writeext = _phy_extwrite, +}; + /* Support for RTL8201F PHY */ U_BOOT_PHY_DRIVER(rtl8201f) = { .name = "RealTek RTL8201F 10/100Mbps Ethernet", -- 2.41.0
[PATCH v2 2/4] net: dwc_eth_qos: Add board_interface_eth_init() for i.MX93
Add a common board_interface_eth_init() called by the DWC MAC driver to setup the MAC <-> PHY interface according to the PHY mode obtained from DT. Remove the board-side configuration in the i.MX93 EVK files. Signed-off-by: Sébastien Szymanski --- Changes for v2: - none arch/arm/mach-imx/imx9/clock.c| 53 +++ board/freescale/imx93_evk/imx93_evk.c | 16 2 files changed, 53 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-imx/imx9/clock.c b/arch/arm/mach-imx/imx9/clock.c index 766a8811c1fa..92c41e9a67bf 100644 --- a/arch/arm/mach-imx/imx9/clock.c +++ b/arch/arm/mach-imx/imx9/clock.c @@ -18,6 +18,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -832,6 +833,58 @@ u32 imx_get_fecclk(void) return ccm_clk_root_get_rate(WAKEUP_AXI_CLK_ROOT); } +#if defined(CONFIG_IMX93) && defined(CONFIG_DWC_ETH_QOS) +static int imx93_eqos_interface_init(struct udevice *dev, phy_interface_t interface_type) +{ + struct blk_ctrl_wakeupmix_regs *bctrl = + (struct blk_ctrl_wakeupmix_regs *)BLK_CTRL_WAKEUPMIX_BASE_ADDR; + + clrbits_le32(>eqos_gpr, +BCTRL_GPR_ENET_QOS_INTF_MODE_MASK | +BCTRL_GPR_ENET_QOS_CLK_GEN_EN); + + switch (interface_type) { + case PHY_INTERFACE_MODE_MII: + setbits_le32(>eqos_gpr, +BCTRL_GPR_ENET_QOS_INTF_SEL_MII | +BCTRL_GPR_ENET_QOS_CLK_GEN_EN); + break; + case PHY_INTERFACE_MODE_RMII: + setbits_le32(>eqos_gpr, +BCTRL_GPR_ENET_QOS_INTF_SEL_RMII | +BCTRL_GPR_ENET_QOS_CLK_GEN_EN); + break; + case PHY_INTERFACE_MODE_RGMII: + case PHY_INTERFACE_MODE_RGMII_ID: + case PHY_INTERFACE_MODE_RGMII_RXID: + case PHY_INTERFACE_MODE_RGMII_TXID: + setbits_le32(>eqos_gpr, +BCTRL_GPR_ENET_QOS_INTF_SEL_RGMII | +BCTRL_GPR_ENET_QOS_CLK_GEN_EN); + break; + default: + return -EINVAL; + } + + return 0; +} +#else +static int imx93_eqos_interface_init(struct udevice *dev, phy_interface_t interface_type) +{ + return 0; +} +#endif + +int board_interface_eth_init(struct udevice *dev, phy_interface_t interface_type) +{ + if (IS_ENABLED(CONFIG_IMX93) && + IS_ENABLED(CONFIG_DWC_ETH_QOS) && + device_is_compatible(dev, "nxp,imx93-dwmac-eqos")) + return imx93_eqos_interface_init(dev, interface_type); + + return -EINVAL; +} + int set_clk_enet(enum enet_freq type) { u32 div; diff --git a/board/freescale/imx93_evk/imx93_evk.c b/board/freescale/imx93_evk/imx93_evk.c index f4297f8fd4d4..c54dc9d05c5c 100644 --- a/board/freescale/imx93_evk/imx93_evk.c +++ b/board/freescale/imx93_evk/imx93_evk.c @@ -49,27 +49,11 @@ int board_phy_config(struct phy_device *phydev) return 0; } -static int setup_eqos(void) -{ - struct blk_ctrl_wakeupmix_regs *bctrl = - (struct blk_ctrl_wakeupmix_regs *)BLK_CTRL_WAKEUPMIX_BASE_ADDR; - - /* set INTF as RGMII, enable RGMII TXC clock */ - clrsetbits_le32(>eqos_gpr, - BCTRL_GPR_ENET_QOS_INTF_MODE_MASK, - BCTRL_GPR_ENET_QOS_INTF_SEL_RGMII | BCTRL_GPR_ENET_QOS_CLK_GEN_EN); - - return set_clk_eqos(ENET_125MHZ); -} - int board_init(void) { if (IS_ENABLED(CONFIG_FEC_MXC)) setup_fec(); - if (IS_ENABLED(CONFIG_DWC_ETH_QOS)) - setup_eqos(); - return 0; } -- 2.41.0
[PATCH v2 4/4] arm: dts: imx93-evk: remove wrong eqos compatible string
The correct compatible string for i.MX93 variant of DWC EQoS MAC is now "nxp,imx93-dwmac-eqos". Signed-off-by: Sébastien Szymanski --- Changes for v4: - none arch/arm/dts/imx93-11x11-evk-u-boot.dtsi | 4 1 file changed, 4 deletions(-) diff --git a/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi b/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi index a9dffa5a71e9..4ecb53ed8be1 100644 --- a/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi +++ b/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi @@ -131,10 +131,6 @@ phy-reset-post-delay = <100>; }; - { - compatible = "fsl,imx-eqos"; -}; - { reset-gpios = < 15 GPIO_ACTIVE_LOW>; reset-assert-us = <15000>; -- 2.41.0
[PATCH v2 1/4] net: dwc_eth_qos: add i.MX93 support
Add support for DWC EQoS MAC on i.MX93. Signed-off-by: Sébastien Szymanski --- Changes for v2: - rebase to not break Rockchip's boards drivers/net/dwc_eth_qos.c | 4 drivers/net/dwc_eth_qos_imx.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 18466cfe257e..e7eb6213adad 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -1707,6 +1707,10 @@ static const struct udevice_id eqos_ids[] = { .compatible = "nxp,imx8mp-dwmac-eqos", .data = (ulong)_imx_config }, + { + .compatible = "nxp,imx93-dwmac-eqos", + .data = (ulong)_imx_config + }, #endif #if IS_ENABLED(CONFIG_DWC_ETH_QOS_ROCKCHIP) { diff --git a/drivers/net/dwc_eth_qos_imx.c b/drivers/net/dwc_eth_qos_imx.c index 60f3f3f5a10f..e3f55dd98173 100644 --- a/drivers/net/dwc_eth_qos_imx.c +++ b/drivers/net/dwc_eth_qos_imx.c @@ -181,6 +181,9 @@ static int eqos_set_tx_clk_speed_imx(struct udevice *dev) ulong rate; int ret; + if (device_is_compatible(dev, "nxp,imx93-dwmac-eqos")) + return 0; + debug("%s(dev=%p):\n", __func__, dev); if (eqos->phy->interface == PHY_INTERFACE_MODE_RMII) -- 2.41.0
Re: [PATCH 1/4] net: dwc_eth_qos: add i.MX93 support
Hi Stefano, On 10/16/23 16:22, Stefano Babic wrote: Hi Sebastian, On 27.07.23 10:33, Sébastien Szymanski wrote: Add support for DWC EQoS MAC on i.MX93. Signed-off-by: Sébastien Szymanski --- drivers/net/dwc_eth_qos.c | 4 drivers/net/dwc_eth_qos_imx.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 1e92bd9ca9c0..f70f8afe5831 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -1717,6 +1717,10 @@ static const struct udevice_id eqos_ids[] = { .compatible = "nxp,imx8mp-dwmac-eqos", .data = (ulong)_imx_config }, + { + .compatible = "nxp,imx93-dwmac-eqos", + .data = (ulong)_imx_config + }, #endif #if IS_ENABLED(CONFIG_DWC_ETH_QOS_QCOM) diff --git a/drivers/net/dwc_eth_qos_imx.c b/drivers/net/dwc_eth_qos_imx.c index 60f3f3f5a10f..e3f55dd98173 100644 --- a/drivers/net/dwc_eth_qos_imx.c +++ b/drivers/net/dwc_eth_qos_imx.c @@ -181,6 +181,9 @@ static int eqos_set_tx_clk_speed_imx(struct udevice *dev) ulong rate; int ret; + if (device_is_compatible(dev, "nxp,imx93-dwmac-eqos")) + return 0; + debug("%s(dev=%p):\n", __func__, dev); if (eqos->phy->interface == PHY_INTERFACE_MODE_RMII) Your series breaks Rockchip's boards. For example: +aarch64-linux-ld.bfd: drivers/net/dwc_eth_qos.o:(.rodata.eqos_ids+0x28): undefined reference to `eqos_imx_config' +make[1]: *** [Makefile:1765: u-boot] Error 1 +make: *** [Makefile:177: sub-make] Error 2 aarch64: w+ rock-4c-plus-rk3399 But it is just an example, quite all boards are broken. Please check this and repost, thanks ! https://source.denx.de/u-boot/custodians/u-boot-imx/-/blob/99807515b8eeff11487a278c956ed1893d54e61e/drivers/net/dwc_eth_qos.c#L1720 That's because, for some reason, the "nxp,imx93-dwmac-eqos" ended up in the if CONFIG_DWC_ETH_QOS_ROCKCHIP / def statement... I'll send a v2. Also, I am confused: why did I receive mails saying other patches of this series have been applied ? Regards, Best regards, Stefano -- Sébastien Szymanski, Armadeus Systems Software engineer
Re: [PATCH 0/4] clk: imx: add i.MX93 CCF driver
Hello, On 7/25/23 10:08, Sébastien Szymanski wrote: This series adds i.MX93 CCF driver, modifed from Linux kernel 6.5-rc2 and adapted for U-Boot. Patches 2 and 3 come from NXP U-Boot. A boot log and a dump of the clock tree are available at the following URL: https://pastebin.com/7WbubSXK Alice Guo (1): arm: dts: imx93: add a per clock for LPUART1 Sébastien Szymanski (2): clk: imx: add i.MX93 CCF driver imx93_evk: defconfig: enable clock driver Ye Li (1): serial: lpuart: Enable IPG clock gentle ping. Maybe someone at NXP can help review this patchset? Regards, arch/arm/dts/imx93-11x11-evk-u-boot.dtsi | 23 ++ arch/arm/dts/imx93.dtsi | 4 +- board/freescale/imx93_evk/imx93_evk.c| 2 - configs/imx93_11x11_evk_defconfig| 2 + drivers/clk/imx/Kconfig | 18 ++ drivers/clk/imx/Makefile | 2 + drivers/clk/imx/clk-composite-93.c | 142 + drivers/clk/imx/clk-fracn-gppll.c| 382 +++ drivers/clk/imx/clk-gate-93.c| 148 + drivers/clk/imx/clk-imx93.c | 343 drivers/clk/imx/clk.h| 42 +++ drivers/serial/serial_lpuart.c | 14 +- include/dt-bindings/clock/imx93-clock.h | 6 +- 13 files changed, 1122 insertions(+), 6 deletions(-) create mode 100644 drivers/clk/imx/clk-composite-93.c create mode 100644 drivers/clk/imx/clk-fracn-gppll.c create mode 100644 drivers/clk/imx/clk-gate-93.c create mode 100644 drivers/clk/imx/clk-imx93.c -- Sébastien Szymanski, Armadeus Systems Software engineer
[PATCH 2/2] dm: adc: imx93-adc depends on ADC (fix boot)
The i.MX93 11x11 EVK fails to boot with following error: Model: NXP i.MX93 11X11 EVK board DRAM: 2 GiB Error binding driver 'imx93-adc': -96 Some drivers failed to bind Error binding driver 'simple_bus': -96 Some drivers failed to bind Error binding driver 'simple_bus': -96 Some drivers failed to bind initcall sequence fffb8f28 failed at call 8021e0d4 (err=-96) ### ERROR ### Please RESET the board ### That's because since commit e7ff54d96303 ("imx93_evk: defconfig: add adc support") CONFIG_ADC_IMX93 is enabled but CONFIG_ADC is not. Fix this by enabling CONFIG_ADC in imx93_11x11_evk_defconfig. Make sure this situation won't happen again in future i.MX93 defconfig by making CONFIG_ADC_IMX93 depend on CONFIG_ADC. Signed-off-by: Sébastien Szymanski --- configs/imx93_11x11_evk_defconfig | 1 + drivers/adc/Kconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/imx93_11x11_evk_defconfig b/configs/imx93_11x11_evk_defconfig index 89130c437d6d..7a7978c280a5 100644 --- a/configs/imx93_11x11_evk_defconfig +++ b/configs/imx93_11x11_evk_defconfig @@ -81,6 +81,7 @@ CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM=y CONFIG_REGMAP=y CONFIG_SYSCON=y +CONFIG_ADC=y CONFIG_ADC_IMX93=y CONFIG_CPU=y CONFIG_CPU_IMX=y diff --git a/drivers/adc/Kconfig b/drivers/adc/Kconfig index 4336732dee56..a01d73846b74 100644 --- a/drivers/adc/Kconfig +++ b/drivers/adc/Kconfig @@ -66,6 +66,7 @@ config STM32_ADC config ADC_IMX93 bool "Enable NXP IMX93 ADC driver" + depends on ADC help This enables basic driver for NXP IMX93 ADC. It provides: -- 2.41.0
[PATCH 1/2] arm: dts: imx93-11x11-evk: add bootph-some-ram property
i.MX93 11x11 EVK fails to boot: U-Boot SPL 2023.10-00558-g65b9b3462bec-dirty (Oct 03 2023 - 17:40:10 +0200) SOC: 0xa0009300 LC: 0x40010 M33 prepare ok Normal Boot Trying to boot from BOOTROM Boot Stage: Primary boot image offset 0x8000, pagesize 0x200, ivt offset 0x0 Load image from 0x44400 by ROM_API NOTICE: BL31: v2.8(release):android-13.0.0_2.0.0-0-ge4b2dbfa52f5 NOTICE: BL31: Built : 17:52:46, Sep 28 2023 That's because commit 9e644284ab81 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation"): "[This] changes behavior of what nodes are bound in the U-Boot proper pre-relocation phase. Change to bootph-all or add bootph-some-ram prop to restore prior behavior." Fix this by adding bootph-some-ram prop as suggested by the commit above. Fixes: 9e644284ab81 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation") Signed-off-by: Sébastien Szymanski --- arch/arm/dts/imx93-11x11-evk-u-boot.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi b/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi index 5b465e2dbd9d..2d9c9618ce2d 100644 --- a/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi +++ b/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi @@ -8,6 +8,7 @@ compatible = "wdt-reboot"; wdt = <>; bootph-pre-ram; + bootph-some-ram; }; firmware { @@ -30,19 +31,23 @@ { bootph-pre-ram; + bootph-some-ram; }; { bootph-pre-ram; + bootph-some-ram; }; { bootph-pre-ram; + bootph-some-ram; }; _usdhc2_vmmc { u-boot,off-on-delay-us = <2>; bootph-pre-ram; + bootph-some-ram; }; _reg_usdhc2_vmmc { @@ -51,59 +56,73 @@ _uart1 { bootph-pre-ram; + bootph-some-ram; }; _usdhc2_gpio { bootph-pre-ram; + bootph-some-ram; }; _usdhc2 { bootph-pre-ram; + bootph-some-ram; }; { bootph-pre-ram; + bootph-some-ram; }; { bootph-pre-ram; + bootph-some-ram; }; { bootph-pre-ram; + bootph-some-ram; }; { bootph-pre-ram; + bootph-some-ram; }; { bootph-pre-ram; + bootph-some-ram; }; { bootph-pre-ram; + bootph-some-ram; }; { bootph-pre-ram; + bootph-some-ram; fsl,signal-voltage-switch-extra-delay-ms = <8>; }; { bootph-pre-ram; + bootph-some-ram; }; &{/soc@0/bus@4400/i2c@4435/pmic@25} { bootph-pre-ram; + bootph-some-ram; }; &{/soc@0/bus@4400/i2c@4435/pmic@25/regulators} { bootph-pre-ram; + bootph-some-ram; }; _lpi2c2 { bootph-pre-ram; + bootph-some-ram; }; { @@ -124,5 +143,6 @@ { bootph-pre-ram; + bootph-some-ram; status = "okay"; }; -- 2.41.0
[PATCH 0/2] Fixes i.MX93 11x11 EVK boot failures
This series fixes i.MX93 11x11 EVK boot failures. Sébastien Szymanski (2): arm: dts: imx93-11x11-evk: add bootph-some-ram property dm: adc: imx93-adc depends on ADC (fix boot) arch/arm/dts/imx93-11x11-evk-u-boot.dtsi | 20 configs/imx93_11x11_evk_defconfig| 1 + drivers/adc/Kconfig | 1 + 3 files changed, 22 insertions(+) -- 2.41.0
[PATCH 4/4] arm: dts: imx93-evk: remove wrong eqos compatible string
The correct compatible string for i.MX93 variant of DWC EQoS MAC is now "nxp,imx93-dwmac-eqos". Signed-off-by: Sébastien Szymanski --- arch/arm/dts/imx93-11x11-evk-u-boot.dtsi | 4 1 file changed, 4 deletions(-) diff --git a/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi b/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi index 93b4d91e4c39..0521012a5324 100644 --- a/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi +++ b/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi @@ -112,10 +112,6 @@ phy-reset-post-delay = <100>; }; - { - compatible = "fsl,imx-eqos"; -}; - { reset-gpios = < 15 GPIO_ACTIVE_LOW>; reset-assert-us = <15000>; -- 2.41.0
[PATCH 3/4] net: phy: realtek: Add support for RTL8211F(D)(I)-VD-CG
Add support for the RTL8211F(D)(I)-VD-CG PHY present on the i.MX93 EVK board. Signed-off-by: Sébastien Szymanski --- drivers/net/phy/realtek.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 396cac76d632..7e1036b2271f 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -446,6 +446,20 @@ U_BOOT_PHY_DRIVER(rtl8211f) = { .writeext = _phy_extwrite, }; +/* Support for RTL8211F-VD PHY */ +U_BOOT_PHY_DRIVER(rtl8211fvd) = { + .name = "RealTek RTL8211F-VD", + .uid = 0x1cc878, + .mask = 0xff, + .features = PHY_GBIT_FEATURES, + .probe = _probe, + .config = _config, + .startup = _startup, + .shutdown = _shutdown, + .readext = _phy_extread, + .writeext = _phy_extwrite, +}; + /* Support for RTL8201F PHY */ U_BOOT_PHY_DRIVER(rtl8201f) = { .name = "RealTek RTL8201F 10/100Mbps Ethernet", -- 2.41.0
[PATCH 2/4] net: dwc_eth_qos: Add board_interface_eth_init() for i.MX93
Add a common board_interface_eth_init() called by the DWC MAC driver to setup the MAC <-> PHY interface according to the PHY mode obtained from DT. Remove the board-side configuration in the i.MX93 EVK files. Signed-off-by: Sébastien Szymanski --- arch/arm/mach-imx/imx9/clock.c| 53 +++ board/freescale/imx93_evk/imx93_evk.c | 16 2 files changed, 53 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-imx/imx9/clock.c b/arch/arm/mach-imx/imx9/clock.c index 766a8811c1fa..92c41e9a67bf 100644 --- a/arch/arm/mach-imx/imx9/clock.c +++ b/arch/arm/mach-imx/imx9/clock.c @@ -18,6 +18,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -832,6 +833,58 @@ u32 imx_get_fecclk(void) return ccm_clk_root_get_rate(WAKEUP_AXI_CLK_ROOT); } +#if defined(CONFIG_IMX93) && defined(CONFIG_DWC_ETH_QOS) +static int imx93_eqos_interface_init(struct udevice *dev, phy_interface_t interface_type) +{ + struct blk_ctrl_wakeupmix_regs *bctrl = + (struct blk_ctrl_wakeupmix_regs *)BLK_CTRL_WAKEUPMIX_BASE_ADDR; + + clrbits_le32(>eqos_gpr, +BCTRL_GPR_ENET_QOS_INTF_MODE_MASK | +BCTRL_GPR_ENET_QOS_CLK_GEN_EN); + + switch (interface_type) { + case PHY_INTERFACE_MODE_MII: + setbits_le32(>eqos_gpr, +BCTRL_GPR_ENET_QOS_INTF_SEL_MII | +BCTRL_GPR_ENET_QOS_CLK_GEN_EN); + break; + case PHY_INTERFACE_MODE_RMII: + setbits_le32(>eqos_gpr, +BCTRL_GPR_ENET_QOS_INTF_SEL_RMII | +BCTRL_GPR_ENET_QOS_CLK_GEN_EN); + break; + case PHY_INTERFACE_MODE_RGMII: + case PHY_INTERFACE_MODE_RGMII_ID: + case PHY_INTERFACE_MODE_RGMII_RXID: + case PHY_INTERFACE_MODE_RGMII_TXID: + setbits_le32(>eqos_gpr, +BCTRL_GPR_ENET_QOS_INTF_SEL_RGMII | +BCTRL_GPR_ENET_QOS_CLK_GEN_EN); + break; + default: + return -EINVAL; + } + + return 0; +} +#else +static int imx93_eqos_interface_init(struct udevice *dev, phy_interface_t interface_type) +{ + return 0; +} +#endif + +int board_interface_eth_init(struct udevice *dev, phy_interface_t interface_type) +{ + if (IS_ENABLED(CONFIG_IMX93) && + IS_ENABLED(CONFIG_DWC_ETH_QOS) && + device_is_compatible(dev, "nxp,imx93-dwmac-eqos")) + return imx93_eqos_interface_init(dev, interface_type); + + return -EINVAL; +} + int set_clk_enet(enum enet_freq type) { u32 div; diff --git a/board/freescale/imx93_evk/imx93_evk.c b/board/freescale/imx93_evk/imx93_evk.c index f4297f8fd4d4..c54dc9d05c5c 100644 --- a/board/freescale/imx93_evk/imx93_evk.c +++ b/board/freescale/imx93_evk/imx93_evk.c @@ -49,27 +49,11 @@ int board_phy_config(struct phy_device *phydev) return 0; } -static int setup_eqos(void) -{ - struct blk_ctrl_wakeupmix_regs *bctrl = - (struct blk_ctrl_wakeupmix_regs *)BLK_CTRL_WAKEUPMIX_BASE_ADDR; - - /* set INTF as RGMII, enable RGMII TXC clock */ - clrsetbits_le32(>eqos_gpr, - BCTRL_GPR_ENET_QOS_INTF_MODE_MASK, - BCTRL_GPR_ENET_QOS_INTF_SEL_RGMII | BCTRL_GPR_ENET_QOS_CLK_GEN_EN); - - return set_clk_eqos(ENET_125MHZ); -} - int board_init(void) { if (IS_ENABLED(CONFIG_FEC_MXC)) setup_fec(); - if (IS_ENABLED(CONFIG_DWC_ETH_QOS)) - setup_eqos(); - return 0; } -- 2.41.0
[PATCH 1/4] net: dwc_eth_qos: add i.MX93 support
Add support for DWC EQoS MAC on i.MX93. Signed-off-by: Sébastien Szymanski --- drivers/net/dwc_eth_qos.c | 4 drivers/net/dwc_eth_qos_imx.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 1e92bd9ca9c0..f70f8afe5831 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -1717,6 +1717,10 @@ static const struct udevice_id eqos_ids[] = { .compatible = "nxp,imx8mp-dwmac-eqos", .data = (ulong)_imx_config }, + { + .compatible = "nxp,imx93-dwmac-eqos", + .data = (ulong)_imx_config + }, #endif #if IS_ENABLED(CONFIG_DWC_ETH_QOS_QCOM) diff --git a/drivers/net/dwc_eth_qos_imx.c b/drivers/net/dwc_eth_qos_imx.c index 60f3f3f5a10f..e3f55dd98173 100644 --- a/drivers/net/dwc_eth_qos_imx.c +++ b/drivers/net/dwc_eth_qos_imx.c @@ -181,6 +181,9 @@ static int eqos_set_tx_clk_speed_imx(struct udevice *dev) ulong rate; int ret; + if (device_is_compatible(dev, "nxp,imx93-dwmac-eqos")) + return 0; + debug("%s(dev=%p):\n", __func__, dev); if (eqos->phy->interface == PHY_INTERFACE_MODE_RMII) -- 2.41.0
[PATCH 0/4] imx93: add DWC EQoS MAC driver support
This series makes the DWC EQos MAC work on i.MX93. It depends on the i.MX93 CCF driver: https://lore.kernel.org/u-boot/20230725080856.26567-1-sebastien.szyman...@armadeus.com/ Tested on i.MX93 EVK board: u-boot=> dhcp ethernet@428a Waiting for PHY auto negotiation to complete done BOOTP broadcast 1 *** Unhandled DHCP Option in OFFER/ACK: 125 *** Unhandled DHCP Option in OFFER/ACK: 125 DHCP client bound to address 192.168.1.50 (35 ms) u-boot=> ping 192.168.1.51 Using ethernet@428a device host 192.168.1.51 is alive u-boot=> Sébastien Szymanski (4): net: dwc_eth_qos: add i.MX93 support net: dwc_eth_qos: Add board_interface_eth_init() for i.MX93 net: phy: realtek: Add support for RTL8211F(D)(I)-VD-CG arm: dts: imx93-evk: remove wrong eqos compatible string arch/arm/dts/imx93-11x11-evk-u-boot.dtsi | 4 -- arch/arm/mach-imx/imx9/clock.c | 53 board/freescale/imx93_evk/imx93_evk.c| 16 --- drivers/net/dwc_eth_qos.c| 4 ++ drivers/net/dwc_eth_qos_imx.c| 3 ++ drivers/net/phy/realtek.c| 14 +++ 6 files changed, 74 insertions(+), 20 deletions(-) -- 2.41.0
[PATCH 3/4] serial: lpuart: Enable IPG clock
From: Ye Li Current codes only ennable the PER clock. However on iMX8 the LPUART also needs IPG clock which is an LPCG. Should not depend on the default LPCG setting. Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Sébastien Szymanski --- This commit comes from downstream U-Boot: https://github.com/nxp-imx/uboot-imx/commit/16aa73211a260c6f04d489ff8aa3476c670a7022 drivers/serial/serial_lpuart.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c index 51e66abdbc15..ce08a6b4486c 100644 --- a/drivers/serial/serial_lpuart.c +++ b/drivers/serial/serial_lpuart.c @@ -480,18 +480,30 @@ static int lpuart_serial_probe(struct udevice *dev) { #if CONFIG_IS_ENABLED(CLK) struct clk per_clk; + struct clk ipg_clk; int ret; ret = clk_get_by_name(dev, "per", _clk); if (!ret) { ret = clk_enable(_clk); if (ret) { - dev_err(dev, "Failed to get per clk: %d\n", ret); + dev_err(dev, "Failed to enable per clk: %d\n", ret); return ret; } } else { debug("%s: Failed to get per clk: %d\n", __func__, ret); } + + ret = clk_get_by_name(dev, "ipg", _clk); + if (!ret) { + ret = clk_enable(_clk); + if (ret) { + dev_err(dev, "Failed to enable ipg clk: %d\n", ret); + return ret; + } + } else { + debug("%s: Failed to get ipg clk: %d\n", __func__, ret); + } #endif if (is_lpuart32(dev)) -- 2.41.0
[PATCH 1/4] clk: imx: add i.MX93 CCF driver
Add i.MX93 CCF driver support. Modifed from Linux Kernel v6.5-rc2 and adapted for U-Boot. Signed-off-by: Sébastien Szymanski --- drivers/clk/imx/Kconfig | 18 ++ drivers/clk/imx/Makefile| 2 + drivers/clk/imx/clk-composite-93.c | 142 + drivers/clk/imx/clk-fracn-gppll.c | 382 drivers/clk/imx/clk-gate-93.c | 148 + drivers/clk/imx/clk-imx93.c | 343 + drivers/clk/imx/clk.h | 42 +++ include/dt-bindings/clock/imx93-clock.h | 6 +- 8 files changed, 1082 insertions(+), 1 deletion(-) create mode 100644 drivers/clk/imx/clk-composite-93.c create mode 100644 drivers/clk/imx/clk-fracn-gppll.c create mode 100644 drivers/clk/imx/clk-gate-93.c create mode 100644 drivers/clk/imx/clk-imx93.c diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig index abcb19ce6d5c..56d893e05799 100644 --- a/drivers/clk/imx/Kconfig +++ b/drivers/clk/imx/Kconfig @@ -89,6 +89,24 @@ config CLK_IMX8MQ help This enables support clock driver for i.MX8MQ platforms. +config SPL_CLK_IMX93 + bool "SPL clock support for i.MX93" + depends on ARCH_IMX9 && SPL + select SPL_CLK + select SPL_CLK_CCF + select SPL_CLK_COMPOSITE_CCF + help + This enables SPL DM/DTS support for clock driver in i.MX93 + +config CLK_IMX93 + bool "Clock support for i.MX93" + depends on ARCH_IMX9 + select CLK + select CLK_CCF + select CLK_COMPOSITE_CCF + help + This enables support for clock driver in i.MX93 + config SPL_CLK_IMXRT1020 bool "SPL clock support for i.MXRT1020" depends on ARCH_IMXRT && SPL diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index b9c197f952ea..6d4bcd357143 100644 --- a/drivers/clk/imx/Makefile +++ b/drivers/clk/imx/Makefile @@ -18,6 +18,8 @@ obj-$(CONFIG_$(SPL_TPL_)CLK_IMX8MP) += clk-imx8mp.o clk-pll14xx.o \ clk-composite-8m.o obj-$(CONFIG_$(SPL_TPL_)CLK_IMX8MQ) += clk-imx8mq.o clk-pll14xx.o \ clk-composite-8m.o +obj-$(CONFIG_$(SPL_TPL_)CLK_IMX93) += clk-imx93.o clk-fracn-gppll.o \ + clk-gate-93.o clk-composite-93.o obj-$(CONFIG_$(SPL_TPL_)CLK_IMXRT1020) += clk-imxrt1020.o obj-$(CONFIG_$(SPL_TPL_)CLK_IMXRT1050) += clk-imxrt1050.o diff --git a/drivers/clk/imx/clk-composite-93.c b/drivers/clk/imx/clk-composite-93.c new file mode 100644 index ..6d71c0c03ffe --- /dev/null +++ b/drivers/clk/imx/clk-composite-93.c @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2021 NXP + * + * Peng Fan + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "clk.h" +#include + +#define TIMEOUT_US 500U + +#define CCM_DIV_SHIFT 0 +#define CCM_DIV_WIDTH 8 +#define CCM_MUX_SHIFT 8 +#define CCM_MUX_MASK 3 +#define CCM_OFF_SHIFT 24 +#define CCM_BUSY_SHIFT 28 + +#define STAT_OFFSET0x4 +#define AUTHEN_OFFSET 0x30 +#define TZ_NS_SHIFT9 +#define TZ_NS_MASK BIT(9) + +#define WHITE_LIST_SHIFT 16 + +#define readl_poll_timeout_atomic readl_poll_timeout + +static int imx93_clk_composite_wait_ready(struct clk *clk, void __iomem *reg) +{ + int ret; + u32 val; + + ret = readl_poll_timeout_atomic(reg + STAT_OFFSET, val, !(val & BIT(CCM_BUSY_SHIFT)), + TIMEOUT_US); + if (ret) + pr_err("Slice[%s] busy timeout\n", "TODO"); + + return ret; +} + +static void imx93_clk_composite_gate_endisable(struct clk *clk, int enable) +{ + struct clk_gate *gate = to_clk_gate(clk); + u32 reg; + + reg = readl(gate->reg); + + if (enable) + reg &= ~BIT(gate->bit_idx); + else + reg |= BIT(gate->bit_idx); + + writel(reg, gate->reg); + + imx93_clk_composite_wait_ready(clk, gate->reg); +} + +static int imx93_clk_composite_gate_enable(struct clk *clk) +{ + imx93_clk_composite_gate_endisable(clk, 1); + + return 0; +} + +static int imx93_clk_composite_gate_disable(struct clk *clk) +{ + imx93_clk_composite_gate_endisable(clk, 0); + + return 0; +} + +static const struct clk_ops imx93_clk_composite_gate_ops = { + .enable = imx93_clk_composite_gate_enable, + .disable = imx93_clk_composite_gate_disable, +}; + +struct clk *imx93_clk_composite_flags(const char *name, + const char * const *parent_names, + int num_parents, void __iomem *reg, u32 domain_id, + unsigned long flags) +{ + struct clk *clk = ERR_PTR(-ENOMEM); + struct clk_divider *div = NULL; + struct clk_gate
[PATCH 2/4] arm: dts: imx93: add a per clock for LPUART1
From: Alice Guo When CLK is enabled, get_lpuart_clk_rate() needs to get a per clock of lpuart, so that add a per clock for lpuart1. Signed-off-by: Alice Guo Reviewed-by: Ye Li Signed-off-by: Sébastien Szymanski --- This commit comes from downstream U-Boot: https://github.com/nxp-imx/uboot-imx/commit/6cc90f4e65d5803f5e15765602febee8166708eb arch/arm/dts/imx93.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/imx93.dtsi b/arch/arm/dts/imx93.dtsi index 13cf32d4b277..90de635481f9 100644 --- a/arch/arm/dts/imx93.dtsi +++ b/arch/arm/dts/imx93.dtsi @@ -254,8 +254,8 @@ compatible = "fsl,imx93-lpuart", "fsl,imx7ulp-lpuart"; reg = <0x4438 0x1000>; interrupts = ; - clocks = < IMX93_CLK_LPUART1_GATE>; - clock-names = "ipg"; + clocks = < IMX93_CLK_LPUART1_GATE>, < IMX93_CLK_LPUART1_GATE>; + clock-names = "ipg", "per"; status = "disabled"; }; -- 2.41.0
[PATCH 0/4] clk: imx: add i.MX93 CCF driver
This series adds i.MX93 CCF driver, modifed from Linux kernel 6.5-rc2 and adapted for U-Boot. Patches 2 and 3 come from NXP U-Boot. A boot log and a dump of the clock tree are available at the following URL: https://pastebin.com/7WbubSXK Alice Guo (1): arm: dts: imx93: add a per clock for LPUART1 Sébastien Szymanski (2): clk: imx: add i.MX93 CCF driver imx93_evk: defconfig: enable clock driver Ye Li (1): serial: lpuart: Enable IPG clock arch/arm/dts/imx93-11x11-evk-u-boot.dtsi | 23 ++ arch/arm/dts/imx93.dtsi | 4 +- board/freescale/imx93_evk/imx93_evk.c| 2 - configs/imx93_11x11_evk_defconfig| 2 + drivers/clk/imx/Kconfig | 18 ++ drivers/clk/imx/Makefile | 2 + drivers/clk/imx/clk-composite-93.c | 142 + drivers/clk/imx/clk-fracn-gppll.c| 382 +++ drivers/clk/imx/clk-gate-93.c| 148 + drivers/clk/imx/clk-imx93.c | 343 drivers/clk/imx/clk.h| 42 +++ drivers/serial/serial_lpuart.c | 14 +- include/dt-bindings/clock/imx93-clock.h | 6 +- 13 files changed, 1122 insertions(+), 6 deletions(-) create mode 100644 drivers/clk/imx/clk-composite-93.c create mode 100644 drivers/clk/imx/clk-fracn-gppll.c create mode 100644 drivers/clk/imx/clk-gate-93.c create mode 100644 drivers/clk/imx/clk-imx93.c -- 2.41.0
[PATCH 4/4] imx93_evk: defconfig: enable clock driver
Add clocks nodes in u-boot.dtsi file. Remove init_uart_clk() call. Signed-off-by: Sébastien Szymanski --- arch/arm/dts/imx93-11x11-evk-u-boot.dtsi | 23 +++ board/freescale/imx93_evk/imx93_evk.c| 2 -- configs/imx93_11x11_evk_defconfig| 2 ++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi b/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi index 5b465e2dbd9d..93b4d91e4c39 100644 --- a/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi +++ b/arch/arm/dts/imx93-11x11-evk-u-boot.dtsi @@ -126,3 +126,26 @@ bootph-pre-ram; status = "okay"; }; + + { + bootph-all; + bootph-pre-ram; + /delete-property/ assigned-clocks; + /delete-property/ assigned-clock-rates; + /delete-property/ assigned-clock-parents; +}; + +_32k { + bootph-all; + bootph-pre-ram; +}; + +_24m { + bootph-all; + bootph-pre-ram; +}; + +_ext1 { + bootph-all; + bootph-pre-ram; +}; diff --git a/board/freescale/imx93_evk/imx93_evk.c b/board/freescale/imx93_evk/imx93_evk.c index e73a498733be..f4297f8fd4d4 100644 --- a/board/freescale/imx93_evk/imx93_evk.c +++ b/board/freescale/imx93_evk/imx93_evk.c @@ -33,8 +33,6 @@ int board_early_init_f(void) { imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads)); - init_uart_clk(LPUART1_CLK_ROOT); - return 0; } diff --git a/configs/imx93_11x11_evk_defconfig b/configs/imx93_11x11_evk_defconfig index a480a71246b7..38c645ce733e 100644 --- a/configs/imx93_11x11_evk_defconfig +++ b/configs/imx93_11x11_evk_defconfig @@ -83,6 +83,8 @@ CONFIG_REGMAP=y CONFIG_SYSCON=y CONFIG_ADC=y CONFIG_ADC_IMX93=y +CONFIG_SPL_CLK_IMX93=y +CONFIG_CLK_IMX93=y CONFIG_CPU=y CONFIG_CPU_IMX=y CONFIG_IMX_RGPIO2P=y -- 2.41.0
[PATCH 1/1] dm: adc: imx93-adc depends on ADC (fix boot)
The i.MX93 11x11 EVK fails to boot with following error: Model: NXP i.MX93 11X11 EVK board DRAM: 2 GiB Error binding driver 'imx93-adc': -96 Some drivers failed to bind Error binding driver 'simple_bus': -96 Some drivers failed to bind Error binding driver 'simple_bus': -96 Some drivers failed to bind initcall sequence fffb8f28 failed at call 8021e0d4 (err=-96) ### ERROR ### Please RESET the board ### That's because since commit e7ff54d96303 ("imx93_evk: defconfig: add adc support") CONFIG_ADC_IMX93 is enabled but CONFIG_ADC is not. Fix this by making CONFIG_ADC_IMX93 depend on CONFIG_ADC. Signed-off-by: Sébastien Szymanski --- drivers/adc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/adc/Kconfig b/drivers/adc/Kconfig index 4336732dee56..a01d73846b74 100644 --- a/drivers/adc/Kconfig +++ b/drivers/adc/Kconfig @@ -66,6 +66,7 @@ config STM32_ADC config ADC_IMX93 bool "Enable NXP IMX93 ADC driver" + depends on ADC help This enables basic driver for NXP IMX93 ADC. It provides: -- 2.41.0
[PATCH 1/1] cmd: pwm: fix typo 'eisable' -> 'disable'
Fixed misspelled 'disable' in help text. Signed-off-by: Sébastien Szymanski --- cmd/pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/pwm.c b/cmd/pwm.c index 7947e61aee..7e82955239 100644 --- a/cmd/pwm.c +++ b/cmd/pwm.c @@ -111,5 +111,5 @@ U_BOOT_CMD(pwm, 6, 0, do_pwm, "invert- invert polarity\n" "pwm config - config PWM\n" "pwm enable - enable PWM output\n" - "pwm disable - eisable PWM output\n" + "pwm disable - disable PWM output\n" "Note: All input values are in decimal"); -- 2.34.1
[PATCH 1/1] video: mxsfb: fix pixel clock polarity
DISPLAY_FLAGS_PIXDATA_NEGEDGE means the controller drives the data on pixel clocks falling edge. That is DOTCLK_POL=0 (default) not 1. The same change has been made on the Linux's driver: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/drm/mxsfb?h=v5.16-rc2=53990e416bb7adaa59d045f325a47f31a11b75ee Signed-off-by: Sébastien Szymanski --- drivers/video/mxsfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 98d2965711..7aeea4b23f 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -161,7 +161,7 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, vdctrl0 |= LCDIF_VDCTRL0_HSYNC_POL; if(flags & DISPLAY_FLAGS_VSYNC_HIGH) vdctrl0 |= LCDIF_VDCTRL0_VSYNC_POL; - if(flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) + if(flags & DISPLAY_FLAGS_PIXDATA_POSEDGE) vdctrl0 |= LCDIF_VDCTRL0_DOTCLK_POL; if(flags & DISPLAY_FLAGS_DE_HIGH) vdctrl0 |= LCDIF_VDCTRL0_ENABLE_POL; -- 2.32.0
[PATCH 1/1] configs: opos6uldev: update to have screen working at power on
Signed-off-by: Sébastien Szymanski --- configs/opos6uldev_defconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig index c52d2a5d39..409c48451e 100644 --- a/configs/opos6uldev_defconfig +++ b/configs/opos6uldev_defconfig @@ -103,13 +103,10 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_DM_VIDEO=y -# CONFIG_VIDEO_BPP8 is not set -# CONFIG_VIDEO_BPP32 is not set CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_MXS=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y -CONFIG_SPLASH_SOURCE=y CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y -- 2.32.0
Re: [PATCH] power: pmic: pca9450: fix i2c address for PCA9450A
Hi, On 7/13/20 10:47 AM, Peng Fan wrote: >> Subject: [PATCH] power: pmic: pca9450: fix i2c address for PCA9450A >> >> Change the I2C Slave Address of the PCA9450A: >> >> 0x35 --> 0x25 >> >> According to the NXP documentation, in the datasheet: >> >> PCA9450DS.pdf (Rev 1.0 - 19 November 2019) >> >> in the table 19 "PCA9450 I2C Slave Address) at page 27/96, >> >> all the PCA9450 have the same I2C address. >> In particular, in case of 7-bit Slave Address, the address is 0x25. >> >> This modification was tested on the imx8mm-evk, with the SOC equipped with >> the PCA9450A instead of the previous ROHM BD71847. >> >> Signed-off-by: Flavio Suligoi >> --- >> drivers/power/pmic/pca9450.c | 2 +- >> drivers/power/pmic/pmic_pca9450.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c >> index 0c9d9a366e..c7f8b80954 100644 >> --- a/drivers/power/pmic/pca9450.c >> +++ b/drivers/power/pmic/pca9450.c >> @@ -80,7 +80,7 @@ static struct dm_pmic_ops pca9450_ops = { }; >> >> static const struct udevice_id pca9450_ids[] = { >> -{ .compatible = "nxp,pca9450a", .data = 0x35, }, >> +{ .compatible = "nxp,pca9450a", .data = 0x25, }, >> { .compatible = "nxp,pca9450b", .data = 0x25, }, >> { } >> }; >> diff --git a/drivers/power/pmic/pmic_pca9450.c >> b/drivers/power/pmic/pmic_pca9450.c >> index 67a9090200..c0fb78c4cd 100644 >> --- a/drivers/power/pmic/pmic_pca9450.c >> +++ b/drivers/power/pmic/pmic_pca9450.c >> @@ -23,7 +23,7 @@ int power_pca9450a_init(unsigned char bus) >> p->name = pca9450_name; >> p->interface = PMIC_I2C; >> p->number_of_regs = PCA9450_REG_NUM; >> -p->hw.i2c.addr = 0x35; >> +p->hw.i2c.addr = 0x25; >> p->hw.i2c.tx_num = 1; >> p->bus = bus; > > There was a thread to address this, but not take udevice_id into > consideration. > Your version looks better. In that thread [1], it was suggested to merge both function power_pca9450{a,b}_init into one function power_pca9450_init. [1] https://lists.denx.de/pipermail/u-boot/2020-June/418123.html Regards, > > Reviewed-by: Peng Fan > >> >> -- >> 2.17.1 > -- Sébastien Szymanski, Armadeus Systems Software engineer
[PATCH v2 1/1] power: pmic_pca9450: fix PCA9450A I2C address
Quoting Ye Li from NXP: "We have confirmed with PMIC team, 0x35 is used only on early chips and not used any more. 0x25 is the final address." Fix it by merging power_pca9450a_init and power_pca9450b_init into one function power_pca9450_init. Signed-off-by: Sébastien Szymanski --- Changes for v2: * Quoting Ye Li * Merge both function into one as suggested by Ye Li board/freescale/imx8mp_evk/spl.c | 2 +- drivers/power/pmic/pmic_pca9450.c | 21 + include/power/pca9450.h | 3 +-- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c index 3b3a854e29..3214718e62 100644 --- a/board/freescale/imx8mp_evk/spl.c +++ b/board/freescale/imx8mp_evk/spl.c @@ -68,7 +68,7 @@ int power_init_board(void) struct pmic *p; int ret; - ret = power_pca9450b_init(I2C_PMIC); + ret = power_pca9450_init(I2C_PMIC); if (ret) printf("power init failed"); p = pmic_get("PCA9450"); diff --git a/drivers/power/pmic/pmic_pca9450.c b/drivers/power/pmic/pmic_pca9450.c index 67a9090200..d4f27428bd 100644 --- a/drivers/power/pmic/pmic_pca9450.c +++ b/drivers/power/pmic/pmic_pca9450.c @@ -11,26 +11,7 @@ static const char pca9450_name[] = "PCA9450"; -int power_pca9450a_init(unsigned char bus) -{ - struct pmic *p = pmic_alloc(); - - if (!p) { - printf("%s: POWER allocation error!\n", __func__); - return -ENOMEM; - } - - p->name = pca9450_name; - p->interface = PMIC_I2C; - p->number_of_regs = PCA9450_REG_NUM; - p->hw.i2c.addr = 0x35; - p->hw.i2c.tx_num = 1; - p->bus = bus; - - return 0; -} - -int power_pca9450b_init(unsigned char bus) +int power_pca9450_init(unsigned char bus) { struct pmic *p = pmic_alloc(); diff --git a/include/power/pca9450.h b/include/power/pca9450.h index 5d4f58ca44..5a9a697d62 100644 --- a/include/power/pca9450.h +++ b/include/power/pca9450.h @@ -54,7 +54,6 @@ enum { PCA9450_REG_NUM, }; -int power_pca9450a_init(unsigned char bus); -int power_pca9450b_init(unsigned char bus); +int power_pca9450_init(unsigned char bus); #endif -- 2.26.2
Re: [EXT] [PATCH 1/1] power: pmic_pca9450: fix PCA9450A I2C address
On 6/29/20 11:51 AM, Ye Li wrote: > On Mon, 2020-06-29 at 10:42 +0200, Sébastien Szymanski wrote: >> Caution: EXT Email >> >> PCA9450A I2C address is 0x25. Fix it. >> >> Signed-off-by: Sébastien Szymanski >> --- >> drivers/power/pmic/pmic_pca9450.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/power/pmic/pmic_pca9450.c >> b/drivers/power/pmic/pmic_pca9450.c >> index 67a9090200..c0fb78c4cd 100644 >> --- a/drivers/power/pmic/pmic_pca9450.c >> +++ b/drivers/power/pmic/pmic_pca9450.c >> @@ -23,7 +23,7 @@ int power_pca9450a_init(unsigned char bus) >> p->name = pca9450_name; >> p->interface = PMIC_I2C; >> p->number_of_regs = PCA9450_REG_NUM; >> - p->hw.i2c.addr = 0x35; >> + p->hw.i2c.addr = 0x25; > > The address 0x35 is correct for PCA9540A. You are probably using > PCA9540B/C which address is 0x25. If so, please > call power_pca9450b_init. No. I am using a PCA9450A chip and its address is 0x25: # i2cget -f -y 0 0x25 0x00 0x10 Moreover, the datasheet says it's 0x25. [1] [1] https://www.nxp.com/docs/en/data-sheet/PCA9450DS.pdf Regards, > > Best regards, > Ye Li >> p->hw.i2c.tx_num = 1; >> p->bus = bus; >> >> -- >> 2.26.2 -- Sébastien Szymanski, Armadeus Systems Software engineer
[PATCH 1/1] power: pmic_pca9450: fix PCA9450A I2C address
PCA9450A I2C address is 0x25. Fix it. Signed-off-by: Sébastien Szymanski --- drivers/power/pmic/pmic_pca9450.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/pmic/pmic_pca9450.c b/drivers/power/pmic/pmic_pca9450.c index 67a9090200..c0fb78c4cd 100644 --- a/drivers/power/pmic/pmic_pca9450.c +++ b/drivers/power/pmic/pmic_pca9450.c @@ -23,7 +23,7 @@ int power_pca9450a_init(unsigned char bus) p->name = pca9450_name; p->interface = PMIC_I2C; p->number_of_regs = PCA9450_REG_NUM; - p->hw.i2c.addr = 0x35; + p->hw.i2c.addr = 0x25; p->hw.i2c.tx_num = 1; p->bus = bus; -- 2.26.2
Re: [EXT] [PATCH v2 1/1] imx: rom api: fix image offset computation
Hi, On 6/9/20 6:03 AM, Ye Li wrote: > Hi Sébastien, > >> -Original Message- >> From: U-Boot On Behalf Of >> sba...@denx.de >> Sent: 2020年6月9日 1:22 >> To: Sébastien Szymanski ; u- >> b...@lists.denx.de >> Subject: [EXT] [PATCH v2 1/1] imx: rom api: fix image offset computation >> >> Caution: EXT Email >> >>> When not booting from FlexSPI, the offset computation is: >>> offset = image_offset + >> CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512 >>> - 0x8000; When booting from SD card or eMMC user partition, >>> image_offset is 0x8000. It is useless to add and remove 0x8000. >>> When booting from other device, image_offset is 0 so this computation is >> wrong. >>> Simplfy this computation to work on all booting devices. >>> Signed-off-by: Sébastien Szymanski >> Applied to u-boot-imx, master, thanks ! > > I just notice this patch. Can you elaborate the problem you met? > Because from my view, your change is wrong. > 1. Removing the image_offset will break secondary (redundant) boot support > for sd and emmc. > 2. When booting from emmc boot partition, the image_offset is 0. But the > flash.bin > generated by mkimage with imximage-8mp-lpddr4.cfg is for sd. It expects to be > burn at 32KB offset. > The fit offset 0x6 has already included the 32KB offset. So when you > burn this flash.bin > to emmc boot partition at offset 0, the fit offset should subtract the 32KB > (0x6 - 0x8000). You are right ! When I tried, I used a .cfg file without SECOND_LOADER and flashed proper U-Boot "by hand" at offset 0x6 which is wrong. Stefano, can you drop my patch please ? Sorry :/ Regards, > > Best regards, > Ye Li >> >> Best regards, >> Stefano Babic >> >> -- >> == >> === >> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk >> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany >> Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de >> == >> === -- Sébastien Szymanski, Armadeus Systems Software engineer
Re: imx: move ATF to the back of the FIT to fix loading over yModem
Hi, On 5/8/20 11:59 AM, Patrick Wildt wrote: > With yModem the FIT Image is only supplied once, so we can only > seek forward in the yModem supplied image and never backwards. > With the recent changes to the SPL mechanism, including loading > U-Boot first, FDT after, then the loadables, we must also reorder > the FIT image script to make sure that the loadables are last in > the FIT image. > > Signed-off-by: Patrick Wildt > Thanks to this patch, I was able to push a FIT image (ATF, U-Boot, dtb) using yModem, so: Tested-by: Sébastien Szymanski Regards, -- Sébastien Szymanski, Armadeus Systems Software engineer
[PATCH v2 1/1] imx: rom api: fix image offset computation
When not booting from FlexSPI, the offset computation is: offset = image_offset + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512 - 0x8000; When booting from SD card or eMMC user partition, image_offset is 0x8000. It is useless to add and remove 0x8000. When booting from other device, image_offset is 0 so this computation is wrong. Simplfy this computation to work on all booting devices. Signed-off-by: Sébastien Szymanski --- Changes from v2: * Previous version was wrong. arch/arm/mach-imx/spl_imx_romapi.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/mach-imx/spl_imx_romapi.c b/arch/arm/mach-imx/spl_imx_romapi.c index 5dc0f7174e..78dd005e7f 100644 --- a/arch/arm/mach-imx/spl_imx_romapi.c +++ b/arch/arm/mach-imx/spl_imx_romapi.c @@ -83,12 +83,7 @@ static int spl_romapi_load_image_seekable(struct spl_image_info *spl_image, printf("image offset 0x%x, pagesize 0x%x, ivt offset 0x%x\n", image_offset, pagesize, offset); - if (((rom_bt_dev >> 16) & 0xff) == BT_DEV_TYPE_FLEXSPINOR) - offset = CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512; - else - offset = image_offset + - CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512 - 0x8000; - + offset = CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512; size = ALIGN(sizeof(struct image_header), pagesize); ret = g_rom_api->download_image((u8 *)header, offset, size, ((uintptr_t)header) ^ offset ^ size); -- 2.26.2
[PATCH 1/1] imx: rom api: fix image offset computation
According to the table 6-25 "Primary image offset and IVT offset details", in the IMX8MNRM, the ROM expects the following image offset: SD: 32KB eMMC: 0 if image is in boot partion and 32KB if it is on user partition NAND: 0 FlexSPI: 4KB SPI: 0 On eMMC, it is more likely that U-Boot is on the boot partion, so rework the offset computation by handling the two specific cases (SD and FlexSPI). Signed-off-by: Sébastien Szymanski --- arch/arm/mach-imx/spl_imx_romapi.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/spl_imx_romapi.c b/arch/arm/mach-imx/spl_imx_romapi.c index 5dc0f7174e..1e9d7bd9ab 100644 --- a/arch/arm/mach-imx/spl_imx_romapi.c +++ b/arch/arm/mach-imx/spl_imx_romapi.c @@ -84,10 +84,12 @@ static int spl_romapi_load_image_seekable(struct spl_image_info *spl_image, image_offset, pagesize, offset); if (((rom_bt_dev >> 16) & 0xff) == BT_DEV_TYPE_FLEXSPINOR) - offset = CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512; + offset = CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512 - 0x1000; + else if (((rom_bt_dev >> 16) & 0xff) == BT_DEV_TYPE_SD) + offset = CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512 - 0x8000; else offset = image_offset + - CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512 - 0x8000; + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512; size = ALIGN(sizeof(struct image_header), pagesize); ret = g_rom_api->download_image((u8 *)header, offset, size, -- 2.26.2
[PATCH 1/1] dm: pinctrl: include linux/errno.h in pinctrl.h
Otherwise the compilation fails with PINCTRL_GENERIC=n : In file included from drivers/pinctrl/nxp/pinctrl-imx8m.c:7:0: include/dm/pinctrl.h: In function ‘pinctrl_generic_set_state’: include/dm/pinctrl.h:319:10: error: ‘EINVAL’ undeclared (first use in this function) return -EINVAL; ^~ include/dm/pinctrl.h:319:10: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: Sébastien Szymanski --- include/dm/pinctrl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h index 692e5fc8cb..2012bb941e 100644 --- a/include/dm/pinctrl.h +++ b/include/dm/pinctrl.h @@ -6,6 +6,8 @@ #ifndef __PINCTRL_H #define __PINCTRL_H +#include + #define PINNAME_SIZE 10 #define PINMUX_SIZE40 -- 2.24.1
imx8m: composite clock wrong clock parent ?
Hi, I am working on a i.MX8MM based board and I got issue to make the Ethernet phy work. I noticed that the MDIO clock is not configured properly and the FEC outputs a 26,6MHz MDIO clock. That's because the clk_get_rate() call at line 1389 returns 24MHz whereas it should returns 266MHz as it is set in the device tree and configured in the SoC: BIOS> md.l 0x3030 1 3030: 1100 With some debug traces we can see that the enet_axi's parent is wrong: fecmxc_probe 1388 clk_get_rate 447: clk clock-controller@3038 clk_get_rate 447: clk enet1_root_clk clk_get_rate 447: clk enet_axi clk_get_parent_rate 489: clk enet_axi parent clock-osc-24m clk_get_parent_rate 489: clk enet1_root_clk parent enet_axi fecmxc_probe 1390 Is this a known issue ? Regards, -- Sébastien Szymanski, Armadeus Systems Software engineer
[PATCH 1/1] tools: imx8m_image: fix warning message
When a firmware file is missing the warning message doesn't indicate the firmware file name because '$tmp' var doesn't exist. Fix the warning message and while at it reduce the if/else statement. Signed-off-by: Sébastien Szymanski --- tools/imx8m_image.sh | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/imx8m_image.sh b/tools/imx8m_image.sh index 4959f9c835..ba60104443 100755 --- a/tools/imx8m_image.sh +++ b/tools/imx8m_image.sh @@ -14,10 +14,8 @@ for f in $blobs; do continue fi - if [ -f $f ]; then - continue - else - echo "WARNING '$tmp' not found, resulting binary is not-functional" >&2 + if [ ! -f $f ]; then + echo "WARNING '$f' not found, resulting binary is not-functional" >&2 exit 1 fi done -- 2.24.1
[U-Boot] [PATCH v2 1/3] imx6ul: opos6ul: migrate to DM_ETH
Migrate to DM_ETH and remove code that is no longer necessary. Reviewed-by: Peng Fan Signed-off-by: Sébastien Szymanski --- Changes for v2: - added Reviewed-by tag arch/arm/mach-imx/mx6/opos6ul.c | 76 +++-- configs/opos6uldev_defconfig| 2 + include/configs/opos6uldev.h| 8 3 files changed, 8 insertions(+), 78 deletions(-) diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index c5fafb9f8e..50aec5171c 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -6,11 +6,7 @@ #include #include #include -#include -#include #include -#include -#include #include #include #include @@ -20,43 +16,6 @@ DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_FEC_MXC #include -#define MDIO_PAD_CTRL ( \ - PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ - PAD_CTL_DSE_40ohm \ -) - -#define ENET_PAD_CTRL_PU ( \ - PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ - PAD_CTL_DSE_40ohm \ -) - -#define ENET_PAD_CTRL_PD ( \ - PAD_CTL_HYS | PAD_CTL_PUS_100K_DOWN | PAD_CTL_SPEED_MED | \ - PAD_CTL_DSE_40ohm \ -) - -#define ENET_CLK_PAD_CTRL ( \ - PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_LOW | \ - PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST \ -) - -static iomux_v3_cfg_t const fec1_pads[] = { - MX6_PAD_GPIO1_IO06__ENET1_MDIO| MUX_PAD_CTRL(MDIO_PAD_CTRL), - MX6_PAD_GPIO1_IO07__ENET1_MDC | MUX_PAD_CTRL(MDIO_PAD_CTRL), - MX6_PAD_ENET1_RX_ER__ENET1_RX_ER | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), - MX6_PAD_ENET1_RX_EN__ENET1_RX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), - MX6_PAD_ENET1_RX_DATA1__ENET1_RDATA01 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), - MX6_PAD_ENET1_RX_DATA0__ENET1_RDATA00 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), - MX6_PAD_ENET1_TX_DATA0__ENET1_TDATA00 | MUX_PAD_CTRL(ENET_PAD_CTRL_PU), - MX6_PAD_ENET1_TX_DATA1__ENET1_TDATA01 | MUX_PAD_CTRL(ENET_PAD_CTRL_PU), - MX6_PAD_ENET1_TX_EN__ENET1_TX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL_PU), - /* PHY Int */ - MX6_PAD_NAND_DQS__GPIO4_IO16 | MUX_PAD_CTRL(ENET_PAD_CTRL_PU), - /* PHY Reset */ - MX6_PAD_NAND_DATA00__GPIO4_IO02 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), - MX6_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 | MUX_PAD_CTRL(ENET_CLK_PAD_CTRL), -}; - int board_phy_config(struct phy_device *phydev) { phy_write(phydev, MDIO_DEVAD_NONE, 0x1f, 0x8190); @@ -67,43 +26,16 @@ int board_phy_config(struct phy_device *phydev) return 0; } -int board_eth_init(bd_t *bis) +static int setup_fec(void) { struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; - struct gpio_desc rst; - int ret; /* Use 50M anatop loopback REF_CLK1 for ENET1, * clear gpr1[13], set gpr1[17] */ clrsetbits_le32(_regs->gpr[1], IOMUX_GPR1_FEC1_MASK, IOMUX_GPR1_FEC1_CLOCK_MUX1_SEL_MASK); - ret = enable_fec_anatop_clock(0, ENET_50MHZ); - if (ret) - return ret; - - enable_enet_clk(1); - - imx_iomux_v3_setup_multiple_pads(fec1_pads, ARRAY_SIZE(fec1_pads)); - - ret = dm_gpio_lookup_name("GPIO4_2", ); - if (ret) { - printf("Cannot get GPIO4_2\n"); - return ret; - } - - ret = dm_gpio_request(, "phy-rst"); - if (ret) { - printf("Cannot request GPIO4_2\n"); - return ret; - } - - dm_gpio_set_dir_flags(, GPIOD_IS_OUT); - dm_gpio_set_value(, 0); - udelay(1000); - dm_gpio_set_value(, 1); - - return fecmxc_initialize(bis); + return enable_fec_anatop_clock(0, ENET_50MHZ); } #endif /* CONFIG_FEC_MXC */ @@ -112,6 +44,10 @@ int board_init(void) /* Address of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; +#ifdef CONFIG_FEC_MXC + setup_fec(); +#endif + return 0; } diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig index 5eef6527cd..44236e99bc 100644 --- a/configs/opos6uldev_defconfig +++ b/configs/opos6uldev_defconfig @@ -73,6 +73,8 @@ CONFIG_FSL_USDHC=y CONFIG_PHYLIB=y CONFIG_PHY_MICREL=y CONFIG_PHY_MICREL_KSZ8XXX=y +CONFIG_DM_ETH=y +CONFIG_DM_MDIO=y CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y diff --git a/include/configs/opos6uldev.h b/include/configs/opos6uldev.h index b13e476027..b10071eaaf 100644 --- a/include/configs/opos6uldev.h +++ b/include/configs/opos6uldev.h @@ -41,14 +41,6 @@ #define CONFIG_USB_MAX_CONTROLLER_COUNT2 #endif -/* Ethernet */ -#ifdef CONFIG_FEC_MXC -#define IMX_FEC_BASE ENET_BASE_ADDR -#define CONFIG_FEC_MXC_PHYADDR 0x1 -#define CONFIG_FEC_XCV_TYPE RMII -#define CONFIG_ETHPRIME"FEC" -#endif - /* LCD */ #ifndef CONFIG_SPL_BUILD #ifdef CONFIG_VIDEO -- 2.2
[U-Boot] [PATCH v2 2/3] opos6uldev: migrate to DM_VIDEO
Migrate to DM_VIDEO, update the device tree and remove code that is no longer necessary. Reviewed-by: Peng Fan Signed-off-by: Sébastien Szymanski --- Changes for v2: - added Reviewed-by tag arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi | 10 ++ arch/arm/dts/imx6ul-opos6uldev.dts | 4 +-- board/armadeus/opos6uldev/board.c | 36 -- configs/opos6uldev_defconfig | 3 +- include/configs/opos6uldev.h | 6 +++- 5 files changed, 19 insertions(+), 40 deletions(-) diff --git a/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi b/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi index da8b0392ef..3f351ef0c4 100644 --- a/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi +++ b/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi @@ -7,6 +7,12 @@ #include "imx6ul-opos6ul-u-boot.dtsi" +/ { + aliases { + display0 = + }; +}; + { u-boot,dm-spl; @@ -15,6 +21,10 @@ }; }; + { + u-boot,dm-pre-proper; +}; + _uart1 { u-boot,dm-spl; }; diff --git a/arch/arm/dts/imx6ul-opos6uldev.dts b/arch/arm/dts/imx6ul-opos6uldev.dts index 0e59ee57fd..4a541be6b0 100644 --- a/arch/arm/dts/imx6ul-opos6uldev.dts +++ b/arch/arm/dts/imx6ul-opos6uldev.dts @@ -187,7 +187,7 @@ status = "okay"; display0: display0 { - bits-per-pixel = <32>; + bits-per-pixel = <18>; bus-width = <18>; display-timings { @@ -202,7 +202,7 @@ hsync-len = <64>; vsync-len = <4>; de-active = <1>; - pixelclk-active = <0>; + pixelclk-active = <1>; }; }; }; diff --git a/board/armadeus/opos6uldev/board.c b/board/armadeus/opos6uldev/board.c index cbf40d5c4a..ade155c5ad 100644 --- a/board/armadeus/opos6uldev/board.c +++ b/board/armadeus/opos6uldev/board.c @@ -3,53 +3,17 @@ * Copyright (C) 2018 Armadeus Systems */ -#include #include #include -#include #include #include #ifdef CONFIG_VIDEO_MXS -#define LCD_PAD_CTRL ( \ - PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \ - PAD_CTL_PKE | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm \ -) - -static iomux_v3_cfg_t const lcd_pads[] = { - MX6_PAD_LCD_CLK__LCDIF_CLK | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_ENABLE__LCDIF_ENABLE | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_HSYNC__LCDIF_HSYNC | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_VSYNC__LCDIF_VSYNC | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA00__LCDIF_DATA00 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA01__LCDIF_DATA01 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA02__LCDIF_DATA02 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA03__LCDIF_DATA03 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA04__LCDIF_DATA04 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA05__LCDIF_DATA05 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA06__LCDIF_DATA06 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA07__LCDIF_DATA07 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA08__LCDIF_DATA08 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA09__LCDIF_DATA09 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA10__LCDIF_DATA10 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA11__LCDIF_DATA11 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA12__LCDIF_DATA12 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA13__LCDIF_DATA13 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA14__LCDIF_DATA14 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA15__LCDIF_DATA15 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA16__LCDIF_DATA16 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA17__LCDIF_DATA17 | MUX_PAD_CTRL(LCD_PAD_CTRL), - - MX6_PAD_NAND_ALE__GPIO4_IO10 | MUX_PAD_CTRL(NO_PAD_CTRL) -}; - int setup_lcd(void) { struct gpio_desc backlight; int ret; - imx_iomux_v3_setup_multiple_pads(lcd_pads, ARRAY_SIZE(lcd_pads)); - /* Set Brightness to high */ ret = dm_gpio_lookup_name("GPIO4_10", ); if (ret) { diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig index 44236e99bc..352d10a0d8 100644 --- a/configs/opos6uldev_defconfig +++ b/configs/opos6uldev_defconfig @@ -95,6 +95,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y -CONFIG_VIDEO=y +CONFIG_DM_VIDEO=y +CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER is not set diff --git a/include/configs/opos6uldev.h b/include/configs/opos6uldev.h index b10071eaaf..11face21a1 100644 --- a/include/configs/opos6uldev.h +++ b/include/configs/opos6uldev.h @@ -43,7 +43,7 @@ /* LCD */ #ifndef CONFIG_SPL
[U-Boot] [PATCH v2 3/3] video: mxsfb: set gd->fb_base
Set gd->fb_base so it can be shown with bdinfo command. Signed-off-by: Sébastien Szymanski --- Changes for v3: - use plat->base instead of fb_start drivers/video/mxsfb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 6922a130c6..c52981053e 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -367,6 +367,7 @@ static int mxs_video_probe(struct udevice *dev) mmu_set_region_dcache_behaviour(fb_start, fb_end - fb_start, DCACHE_WRITEBACK); video_set_flush_dcache(dev, true); + gd->fb_base = plat->base; return ret; } -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 3/3] video: mxsfb: set gd->fb_base
Set gd->fb_base so it can be shown with bdinfo command. Signed-off-by: Sébastien Szymanski --- drivers/video/mxsfb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 6922a130c6..ce67f3f32b 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -367,6 +367,7 @@ static int mxs_video_probe(struct udevice *dev) mmu_set_region_dcache_behaviour(fb_start, fb_end - fb_start, DCACHE_WRITEBACK); video_set_flush_dcache(dev, true); + gd->fb_base = fb_start; return ret; } -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/3] opos6uldev: migrate to DM_VIDEO
Migrate to DM_VIDEO, update the device tree and remove code that is no longer necessary. Signed-off-by: Sébastien Szymanski --- arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi | 10 ++ arch/arm/dts/imx6ul-opos6uldev.dts | 4 +-- board/armadeus/opos6uldev/board.c | 36 -- configs/opos6uldev_defconfig | 3 +- include/configs/opos6uldev.h | 6 +++- 5 files changed, 19 insertions(+), 40 deletions(-) diff --git a/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi b/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi index da8b0392ef..3f351ef0c4 100644 --- a/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi +++ b/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi @@ -7,6 +7,12 @@ #include "imx6ul-opos6ul-u-boot.dtsi" +/ { + aliases { + display0 = + }; +}; + { u-boot,dm-spl; @@ -15,6 +21,10 @@ }; }; + { + u-boot,dm-pre-proper; +}; + _uart1 { u-boot,dm-spl; }; diff --git a/arch/arm/dts/imx6ul-opos6uldev.dts b/arch/arm/dts/imx6ul-opos6uldev.dts index 0e59ee57fd..4a541be6b0 100644 --- a/arch/arm/dts/imx6ul-opos6uldev.dts +++ b/arch/arm/dts/imx6ul-opos6uldev.dts @@ -187,7 +187,7 @@ status = "okay"; display0: display0 { - bits-per-pixel = <32>; + bits-per-pixel = <18>; bus-width = <18>; display-timings { @@ -202,7 +202,7 @@ hsync-len = <64>; vsync-len = <4>; de-active = <1>; - pixelclk-active = <0>; + pixelclk-active = <1>; }; }; }; diff --git a/board/armadeus/opos6uldev/board.c b/board/armadeus/opos6uldev/board.c index cbf40d5c4a..ade155c5ad 100644 --- a/board/armadeus/opos6uldev/board.c +++ b/board/armadeus/opos6uldev/board.c @@ -3,53 +3,17 @@ * Copyright (C) 2018 Armadeus Systems */ -#include #include #include -#include #include #include #ifdef CONFIG_VIDEO_MXS -#define LCD_PAD_CTRL ( \ - PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \ - PAD_CTL_PKE | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm \ -) - -static iomux_v3_cfg_t const lcd_pads[] = { - MX6_PAD_LCD_CLK__LCDIF_CLK | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_ENABLE__LCDIF_ENABLE | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_HSYNC__LCDIF_HSYNC | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_VSYNC__LCDIF_VSYNC | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA00__LCDIF_DATA00 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA01__LCDIF_DATA01 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA02__LCDIF_DATA02 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA03__LCDIF_DATA03 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA04__LCDIF_DATA04 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA05__LCDIF_DATA05 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA06__LCDIF_DATA06 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA07__LCDIF_DATA07 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA08__LCDIF_DATA08 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA09__LCDIF_DATA09 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA10__LCDIF_DATA10 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA11__LCDIF_DATA11 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA12__LCDIF_DATA12 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA13__LCDIF_DATA13 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA14__LCDIF_DATA14 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA15__LCDIF_DATA15 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA16__LCDIF_DATA16 | MUX_PAD_CTRL(LCD_PAD_CTRL), - MX6_PAD_LCD_DATA17__LCDIF_DATA17 | MUX_PAD_CTRL(LCD_PAD_CTRL), - - MX6_PAD_NAND_ALE__GPIO4_IO10 | MUX_PAD_CTRL(NO_PAD_CTRL) -}; - int setup_lcd(void) { struct gpio_desc backlight; int ret; - imx_iomux_v3_setup_multiple_pads(lcd_pads, ARRAY_SIZE(lcd_pads)); - /* Set Brightness to high */ ret = dm_gpio_lookup_name("GPIO4_10", ); if (ret) { diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig index 44236e99bc..352d10a0d8 100644 --- a/configs/opos6uldev_defconfig +++ b/configs/opos6uldev_defconfig @@ -95,6 +95,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y -CONFIG_VIDEO=y +CONFIG_DM_VIDEO=y +CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER is not set diff --git a/include/configs/opos6uldev.h b/include/configs/opos6uldev.h index b10071eaaf..11face21a1 100644 --- a/include/configs/opos6uldev.h +++ b/include/configs/opos6uldev.h @@ -43,7 +43,7 @@ /* LCD */ #ifndef CONFIG_SPL_BUILD -#ifdef CONFIG_VIDEO +#ifdef CONFIG_DM_VIDEO #define CONFI
[U-Boot] [PATCH 1/3] imx6ul: opos6ul: migrate to DM_ETH
Migrate to DM_ETH and remove code that is no longer necessary. Signed-off-by: Sébastien Szymanski --- arch/arm/mach-imx/mx6/opos6ul.c | 76 +++-- configs/opos6uldev_defconfig| 2 + include/configs/opos6uldev.h| 8 3 files changed, 8 insertions(+), 78 deletions(-) diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index c5fafb9f8e..50aec5171c 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -6,11 +6,7 @@ #include #include #include -#include -#include #include -#include -#include #include #include #include @@ -20,43 +16,6 @@ DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_FEC_MXC #include -#define MDIO_PAD_CTRL ( \ - PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ - PAD_CTL_DSE_40ohm \ -) - -#define ENET_PAD_CTRL_PU ( \ - PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ - PAD_CTL_DSE_40ohm \ -) - -#define ENET_PAD_CTRL_PD ( \ - PAD_CTL_HYS | PAD_CTL_PUS_100K_DOWN | PAD_CTL_SPEED_MED | \ - PAD_CTL_DSE_40ohm \ -) - -#define ENET_CLK_PAD_CTRL ( \ - PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_LOW | \ - PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST \ -) - -static iomux_v3_cfg_t const fec1_pads[] = { - MX6_PAD_GPIO1_IO06__ENET1_MDIO| MUX_PAD_CTRL(MDIO_PAD_CTRL), - MX6_PAD_GPIO1_IO07__ENET1_MDC | MUX_PAD_CTRL(MDIO_PAD_CTRL), - MX6_PAD_ENET1_RX_ER__ENET1_RX_ER | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), - MX6_PAD_ENET1_RX_EN__ENET1_RX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), - MX6_PAD_ENET1_RX_DATA1__ENET1_RDATA01 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), - MX6_PAD_ENET1_RX_DATA0__ENET1_RDATA00 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), - MX6_PAD_ENET1_TX_DATA0__ENET1_TDATA00 | MUX_PAD_CTRL(ENET_PAD_CTRL_PU), - MX6_PAD_ENET1_TX_DATA1__ENET1_TDATA01 | MUX_PAD_CTRL(ENET_PAD_CTRL_PU), - MX6_PAD_ENET1_TX_EN__ENET1_TX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL_PU), - /* PHY Int */ - MX6_PAD_NAND_DQS__GPIO4_IO16 | MUX_PAD_CTRL(ENET_PAD_CTRL_PU), - /* PHY Reset */ - MX6_PAD_NAND_DATA00__GPIO4_IO02 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), - MX6_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 | MUX_PAD_CTRL(ENET_CLK_PAD_CTRL), -}; - int board_phy_config(struct phy_device *phydev) { phy_write(phydev, MDIO_DEVAD_NONE, 0x1f, 0x8190); @@ -67,43 +26,16 @@ int board_phy_config(struct phy_device *phydev) return 0; } -int board_eth_init(bd_t *bis) +static int setup_fec(void) { struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; - struct gpio_desc rst; - int ret; /* Use 50M anatop loopback REF_CLK1 for ENET1, * clear gpr1[13], set gpr1[17] */ clrsetbits_le32(_regs->gpr[1], IOMUX_GPR1_FEC1_MASK, IOMUX_GPR1_FEC1_CLOCK_MUX1_SEL_MASK); - ret = enable_fec_anatop_clock(0, ENET_50MHZ); - if (ret) - return ret; - - enable_enet_clk(1); - - imx_iomux_v3_setup_multiple_pads(fec1_pads, ARRAY_SIZE(fec1_pads)); - - ret = dm_gpio_lookup_name("GPIO4_2", ); - if (ret) { - printf("Cannot get GPIO4_2\n"); - return ret; - } - - ret = dm_gpio_request(, "phy-rst"); - if (ret) { - printf("Cannot request GPIO4_2\n"); - return ret; - } - - dm_gpio_set_dir_flags(, GPIOD_IS_OUT); - dm_gpio_set_value(, 0); - udelay(1000); - dm_gpio_set_value(, 1); - - return fecmxc_initialize(bis); + return enable_fec_anatop_clock(0, ENET_50MHZ); } #endif /* CONFIG_FEC_MXC */ @@ -112,6 +44,10 @@ int board_init(void) /* Address of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; +#ifdef CONFIG_FEC_MXC + setup_fec(); +#endif + return 0; } diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig index 5eef6527cd..44236e99bc 100644 --- a/configs/opos6uldev_defconfig +++ b/configs/opos6uldev_defconfig @@ -73,6 +73,8 @@ CONFIG_FSL_USDHC=y CONFIG_PHYLIB=y CONFIG_PHY_MICREL=y CONFIG_PHY_MICREL_KSZ8XXX=y +CONFIG_DM_ETH=y +CONFIG_DM_MDIO=y CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y diff --git a/include/configs/opos6uldev.h b/include/configs/opos6uldev.h index b13e476027..b10071eaaf 100644 --- a/include/configs/opos6uldev.h +++ b/include/configs/opos6uldev.h @@ -41,14 +41,6 @@ #define CONFIG_USB_MAX_CONTROLLER_COUNT2 #endif -/* Ethernet */ -#ifdef CONFIG_FEC_MXC -#define IMX_FEC_BASE ENET_BASE_ADDR -#define CONFIG_FEC_MXC_PHYADDR 0x1 -#define CONFIG_FEC_XCV_TYPE RMII -#define CONFIG_ETHPRIME"FEC" -#endif - /* LCD */ #ifndef CONFIG_SPL_BUILD #ifdef CONFIG_VIDEO -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] Convert CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE to Kconfig
Hello, On 9/9/19 3:59 AM, Peng Fan wrote: >> Subject: [PATCH 1/2] Convert CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE to >> Kconfig >> >> This converts the following to Kconfig: >> >> CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE >> >> Signed-off-by: Sébastien Szymanski >> --- >> configs/warp7_defconfig | 1 + >> configs/warp_defconfig | 1 + >> drivers/mmc/Kconfig | 6 ++ >> include/configs/warp.h | 1 - >> include/configs/warp7.h | 1 - >> scripts/config_whitelist.txt | 1 - >> 6 files changed, 8 insertions(+), 3 deletions(-) >> >> diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index >> a022454976..9a167d2c43 100644 >> --- a/configs/warp7_defconfig >> +++ b/configs/warp7_defconfig >> @@ -40,6 +40,7 @@ CONFIG_DM_I2C=y >> CONFIG_DM_MMC=y >> CONFIG_SUPPORT_EMMC_BOOT=y >> CONFIG_FSL_USDHC=y >> +CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE=y >> CONFIG_PINCTRL=y >> CONFIG_PINCTRL_IMX7=y >> CONFIG_DM_PMIC=y >> diff --git a/configs/warp_defconfig b/configs/warp_defconfig index >> 7a6ea6f8c6..d719dc779a 100644 >> --- a/configs/warp_defconfig >> +++ b/configs/warp_defconfig >> @@ -31,6 +31,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_DFU_MMC=y >> CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y >> +CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE=y >> CONFIG_USB=y >> CONFIG_USB_STORAGE=y >> CONFIG_USB_GADGET=y >> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index >> 0ccb1ea701..f61b17b86b 100644 >> --- a/drivers/mmc/Kconfig >> +++ b/drivers/mmc/Kconfig >> @@ -701,6 +701,12 @@ config FSL_USDHC >> help >>This enables the Ultra Secured Digital Host Controller enhancements >> >> +config SYS_FSL_ESDHC_HAS_DDR_MODE >> +depends on FSL_ESDHC || FSL_ESDHC_IMX > > Please drop FSL_ESDHC. Why ? SYS_FSL_ESDHC_HAS_DDR_MODE is used in fsl_esdhc.c too. Regards, > > Regards, > Peng. > >> +bool "Enable Dual Data Rate support" >> +help >> + This enables Dual Data Rate support (DDR52) >> + >> endmenu >> >> config SYS_FSL_ERRATUM_ESDHC111 >> diff --git a/include/configs/warp.h b/include/configs/warp.h index >> 5345f5314d..a00c535b50 100644 >> --- a/include/configs/warp.h >> +++ b/include/configs/warp.h >> @@ -22,7 +22,6 @@ >> >> /* MMC Configs */ >> #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR >> -#define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE >> >> /* Watchdog */ >> #define CONFIG_WATCHDOG_TIMEOUT_MSECS 3 /* 30s */ diff --git >> a/include/configs/warp7.h b/include/configs/warp7.h index >> 73541fe176..aa259cd9ef 100644 >> --- a/include/configs/warp7.h >> +++ b/include/configs/warp7.h >> @@ -18,7 +18,6 @@ >> >> /* MMC Config*/ >> #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC3_BASE_ADDR >> -#define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE >> #define CONFIG_SYS_MMC_IMG_LOAD_PART1 >> >> /* Switch on SERIAL_TAG */ >> diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt >> index >> b18eab1707..49c041b59e 100644 >> --- a/scripts/config_whitelist.txt >> +++ b/scripts/config_whitelist.txt >> @@ -2555,7 +2555,6 @@ CONFIG_SYS_FSL_ERRATUM_A_004934 >> CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_FSL_ESDHC_BE >> CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT >> -CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE >> CONFIG_SYS_FSL_ESDHC_LE >> CONFIG_SYS_FSL_ESDHC_NUM >> CONFIG_SYS_FSL_ESDHC_P1010_BROKEN_SDCLK >> -- >> 2.21.0 > -- Sébastien Szymanski, Armadeus Systems Software engineer ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/2] configs: opos6uldev: Select CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
This significally increases performance: reading zImage, without DDR: 6203640 bytes read in 157 ms (37.7 MiB/s) reading zImage, with DDR: 6203640 bytes read in 88 ms (67.2 MiB/s) Signed-off-by: Sébastien Szymanski --- configs/opos6uldev_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig index 1b68b8e12f..50450a7114 100644 --- a/configs/opos6uldev_defconfig +++ b/configs/opos6uldev_defconfig @@ -70,6 +70,7 @@ CONFIG_SYS_I2C_MXC=y CONFIG_PWRSEQ=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y +CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE=y CONFIG_PHYLIB=y CONFIG_PHY_MICREL=y CONFIG_PHY_MICREL_KSZ8XXX=y -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/2] Convert CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE to Kconfig
This converts the following to Kconfig: CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE Signed-off-by: Sébastien Szymanski --- configs/warp7_defconfig | 1 + configs/warp_defconfig | 1 + drivers/mmc/Kconfig | 6 ++ include/configs/warp.h | 1 - include/configs/warp7.h | 1 - scripts/config_whitelist.txt | 1 - 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index a022454976..9a167d2c43 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -40,6 +40,7 @@ CONFIG_DM_I2C=y CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y +CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y CONFIG_DM_PMIC=y diff --git a/configs/warp_defconfig b/configs/warp_defconfig index 7a6ea6f8c6..d719dc779a 100644 --- a/configs/warp_defconfig +++ b/configs/warp_defconfig @@ -31,6 +31,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_DFU_MMC=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y +CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=y diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 0ccb1ea701..f61b17b86b 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -701,6 +701,12 @@ config FSL_USDHC help This enables the Ultra Secured Digital Host Controller enhancements +config SYS_FSL_ESDHC_HAS_DDR_MODE + depends on FSL_ESDHC || FSL_ESDHC_IMX + bool "Enable Dual Data Rate support" + help + This enables Dual Data Rate support (DDR52) + endmenu config SYS_FSL_ERRATUM_ESDHC111 diff --git a/include/configs/warp.h b/include/configs/warp.h index 5345f5314d..a00c535b50 100644 --- a/include/configs/warp.h +++ b/include/configs/warp.h @@ -22,7 +22,6 @@ /* MMC Configs */ #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR -#define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE /* Watchdog */ #define CONFIG_WATCHDOG_TIMEOUT_MSECS 3 /* 30s */ diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 73541fe176..aa259cd9ef 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -18,7 +18,6 @@ /* MMC Config*/ #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC3_BASE_ADDR -#define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE #define CONFIG_SYS_MMC_IMG_LOAD_PART 1 /* Switch on SERIAL_TAG */ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index b18eab1707..49c041b59e 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -2555,7 +2555,6 @@ CONFIG_SYS_FSL_ERRATUM_A_004934 CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_FSL_ESDHC_BE CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT -CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE CONFIG_SYS_FSL_ESDHC_LE CONFIG_SYS_FSL_ESDHC_NUM CONFIG_SYS_FSL_ESDHC_P1010_BROKEN_SDCLK -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 2/2] opos6uldev: remove board_ehci_hcd_init function
This function sets the polarity of the PWR signal which is not used on the opos6uldev board. Remove it. Reviewed-by: Fabio Estevam Signed-off-by: Sébastien Szymanski --- Changes for v2: - better commit log board/armadeus/opos6uldev/board.c | 21 - 1 file changed, 21 deletions(-) diff --git a/board/armadeus/opos6uldev/board.c b/board/armadeus/opos6uldev/board.c index aed334f8fb..cbf40d5c4a 100644 --- a/board/armadeus/opos6uldev/board.c +++ b/board/armadeus/opos6uldev/board.c @@ -70,27 +70,6 @@ int setup_lcd(void) } #endif -#ifdef CONFIG_USB_EHCI_MX6 -#define USB_OTHERREGS_OFFSET 0x800 -#define UCTRL_PWR_POL (1 << 9) - -int board_ehci_hcd_init(int port) -{ - u32 *usbnc_usb_ctrl; - - if (port > 1) - return -EINVAL; - - usbnc_usb_ctrl = (u32 *)(USB_BASE_ADDR + USB_OTHERREGS_OFFSET + -port * 4); - - /* Set Power polarity */ - setbits_le32(usbnc_usb_ctrl, UCTRL_PWR_POL); - - return 0; -} -#endif - int opos6ul_board_late_init(void) { #ifdef CONFIG_VIDEO_MXS -- 2.19.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/2] opos6uldev: don't call enable_lcdif_clock
The mxsfb driver already calls enable_lcdif_clock. Reviewed-by: Fabio Estevam Signed-off-by: Sébastien Szymanski --- Changes for v2: - none board/armadeus/opos6uldev/board.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/board/armadeus/opos6uldev/board.c b/board/armadeus/opos6uldev/board.c index 4faa997126..aed334f8fb 100644 --- a/board/armadeus/opos6uldev/board.c +++ b/board/armadeus/opos6uldev/board.c @@ -3,7 +3,6 @@ * Copyright (C) 2018 Armadeus Systems */ -#include #include #include #include @@ -49,8 +48,6 @@ int setup_lcd(void) struct gpio_desc backlight; int ret; - enable_lcdif_clock(LCDIF1_BASE_ADDR, 1); - imx_iomux_v3_setup_multiple_pads(lcd_pads, ARRAY_SIZE(lcd_pads)); /* Set Brightness to high */ -- 2.19.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] opos6uldev: remove board_ehci_hcd_init function
Hi Fabio, On 5/14/19 2:17 PM, Fabio Estevam wrote: > On Tue, May 14, 2019 at 8:48 AM Sébastien Szymanski > wrote: >> >> It's useless on the opos6uldev. Remove it. > > Why is it useless? No USB host on this port? There is an USB host port but this function was just setting the polarity of the PWR signal which is not used on the opos6uldev board. I guess I should send a v2 with that explanation. Regards, > > Reviewed-by: Fabio Estevam > -- Sébastien Szymanski Software engineer, Armadeus Systems Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/2] opos6uldev: remove board_ehci_hcd_init function
It's useless on the opos6uldev. Remove it. Signed-off-by: Sébastien Szymanski --- board/armadeus/opos6uldev/board.c | 21 - 1 file changed, 21 deletions(-) diff --git a/board/armadeus/opos6uldev/board.c b/board/armadeus/opos6uldev/board.c index aed334f8fb..cbf40d5c4a 100644 --- a/board/armadeus/opos6uldev/board.c +++ b/board/armadeus/opos6uldev/board.c @@ -70,27 +70,6 @@ int setup_lcd(void) } #endif -#ifdef CONFIG_USB_EHCI_MX6 -#define USB_OTHERREGS_OFFSET 0x800 -#define UCTRL_PWR_POL (1 << 9) - -int board_ehci_hcd_init(int port) -{ - u32 *usbnc_usb_ctrl; - - if (port > 1) - return -EINVAL; - - usbnc_usb_ctrl = (u32 *)(USB_BASE_ADDR + USB_OTHERREGS_OFFSET + -port * 4); - - /* Set Power polarity */ - setbits_le32(usbnc_usb_ctrl, UCTRL_PWR_POL); - - return 0; -} -#endif - int opos6ul_board_late_init(void) { #ifdef CONFIG_VIDEO_MXS -- 2.19.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/2] opos6uldev: don't call enable_lcdif_clock
The mxsfb driver already calls enable_lcdif_clock. Signed-off-by: Sébastien Szymanski --- board/armadeus/opos6uldev/board.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/board/armadeus/opos6uldev/board.c b/board/armadeus/opos6uldev/board.c index 4faa997126..aed334f8fb 100644 --- a/board/armadeus/opos6uldev/board.c +++ b/board/armadeus/opos6uldev/board.c @@ -3,7 +3,6 @@ * Copyright (C) 2018 Armadeus Systems */ -#include #include #include #include @@ -49,8 +48,6 @@ int setup_lcd(void) struct gpio_desc backlight; int ret; - enable_lcdif_clock(LCDIF1_BASE_ADDR, 1); - imx_iomux_v3_setup_multiple_pads(lcd_pads, ARRAY_SIZE(lcd_pads)); /* Set Brightness to high */ -- 2.19.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] opos6ul: set REFSEL and REFR fields
Signed-off-by: Sébastien Szymanski --- arch/arm/mach-imx/mx6/opos6ul.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index a578fd67db..55ebe3a624 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -197,6 +197,8 @@ struct mx6_ddr_sysinfo ddr_sysinfo = { .sde_to_rst = 0x10, /* 14 cycles, 200us (JEDEC default) */ .rst_to_cke = 0x23, /* 33 cycles, 500us (JEDEC default) */ .ddr_type = DDR_TYPE_DDR3, + .refsel = 1,/* Refresh cycles at 32KHz */ + .refr = 7, /* 8 refreshes commands per refresh cycle */ }; static struct mx6_ddr3_cfg mem_ddr = { -- 2.19.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] Convert CONFIG_SUPPORT_EMMC_BOOT to Kconfig
Hi, On 4/19/19 6:38 AM, Alex Kiernan wrote: > This converts the following to Kconfig: >CONFIG_SUPPORT_EMMC_BOOT > > Signed-off-by: Alex Kiernan > --- > Green travis build: > > https://travis-ci.org/akiernan/u-boot/builds/521906850 > > Testing affected boards for configuration changes: > > boards.cfg is up to date. Nothing to do. > Summary of 3 commits for 95 boards (4 threads, 1 job per thread) > 01: Merge tag 'u-boot-imx-20190415' of git://git.denx.de/u-boot-imx > aarch64: w+ xilinx_zynqmp_mini_emmc1 xilinx_zynqmp_mini_emmc0 > xilinx_zynqmp_mini_qspi clearfog_gt_8k imx8qxp_mek xilinx_zynqmp_mini > xilinx_zynqmp_mini_nand imx8mq_evk > arm: w+ cm_t54 cl-som-imx7 marsboard clearfog apalis_imx6 warp7 > pico-hobbit-imx7d pico-pi-imx6ul dms-ba16 arndale riotboard > pico-hobbit-imx6ul colibri_imx7 pico-imx7d xpress_spl opos6uldev warp7_bl33 > imx6dl_mamoj ge_bx50v3 display5 mx7dsabresd_qspi display5_factory > colibri_imx7_emmc gwventana_nand mx7dsabresd gwventana_gw5904 gwventana_emmc > am57xx_hs_evm_usb omap5_uevm brppt1_spi xilinx_zynqmp_r5 vinco mx6sabresd > warp riotboard_spl vining_2000 zc5601 zc5202 xpress pico-imx6ul dms-ba16-1g > pico-pi-imx7d > 02: configs: Resync with savedefconfig > 03: Convert CONFIG_SUPPORT_EMMC_BOOT to Kconfig > > configs/opos6uldev_defconfig | 1 + > include/configs/opos6uldev.h | 3 --- Tested-by: Sébastien Szymanski Regards, -- Sébastien Szymanski Software engineer, Armadeus Systems Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] fs: ext4: do not write on filesystem with metadata_csum feature
U-Boot doesn't support metadata_csum feature. Writing to filesystem with metadata_csum feature makes the filesystem corrupted and unbootable by Linux: [2.527495] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 0 failed (52188!=0) [2.537421] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 1 failed (5262!=0) ... [2.653308] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 14 failed (42611!=0) [2.662179] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 15 failed (21527!=0) [2.687920] JBD2: journal checksum error [2.691982] EXT4-fs (mmcblk0p2): error loading journal [2.698292] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -74 Don't write to filesystem with meatadata_csum feature to not corrupt the filesystem. Signed-off-by: Sébastien Szymanski --- fs/ext4/ext4_write.c | 6 ++ include/ext4fs.h | 1 + 2 files changed, 7 insertions(+) diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c index a7f543f7df..4eb77c327e 100644 --- a/fs/ext4/ext4_write.c +++ b/fs/ext4/ext4_write.c @@ -864,6 +864,12 @@ int ext4fs_write(const char *fname, unsigned char *buffer, printf("error in File System init\n"); return -1; } + + if (le32_to_cpu(fs->sb->feature_ro_compat) & EXT4_FEATURE_RO_COMPAT_METADATA_CSUM) { + printf("Unsupported feature metadata_csum found, not writing.\n"); + return -1; + } + inodes_per_block = fs->blksz / fs->inodesz; parent_inodeno = ext4fs_get_parent_inode_num(fname, filename, F_FILE); if (parent_inodeno == -1) diff --git a/include/ext4fs.h b/include/ext4fs.h index bb55639107..2421011341 100644 --- a/include/ext4fs.h +++ b/include/ext4fs.h @@ -32,6 +32,7 @@ #define EXT4_EXTENTS_FL0x0008 /* Inode uses extents */ #define EXT4_EXT_MAGIC 0xf30a #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM0x0010 +#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM 0x0400 #define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040 #define EXT4_FEATURE_INCOMPAT_64BIT0x0080 #define EXT4_INDIRECT_BLOCKS 12 -- 2.19.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/1] ARM: opos6ul: make the board boot again
Hello, On 09/06/2018 03:57 PM, Stefano Babic wrote: > On 06/09/2018 09:51, Sébastien Szymanski wrote: >> Commit 9faa43c4b5e5 ("ARM: dts: i.MX6UL: U-Boot specific dts for u-boot, >> dm-spl") removes the u-boot,dm-spl properties from the imx6ul.dtsi file >> and breaks the OPOS6UL board. >> Add the u-boot,dm-spl properties into *-u-boot.dts files to make the >> board boot again. >> >> Fixes: commit 9faa43c4b5e5 ("ARM: dts: i.MX6UL: U-Boot specific dts for >> u-boot, dm-spl") >> Signed-off-by: Sébastien Szymanski >> --- >> >> Changes for v3: >> - use the automatic inclusion of -u-boot.dtsi mechanism of U-Boot. >> >> Changes for v2: >> - put u-boot,dm-spl properties into -u-boot.dts files >> >> arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi| 28 >> arch/arm/dts/imx6ul-opos6ul.dtsi | 2 -- >> arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi | 24 >> arch/arm/dts/imx6ul-opos6uldev.dts | 2 -- >> 4 files changed, 52 insertions(+), 4 deletions(-) >> create mode 100644 arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi >> create mode 100644 arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi >> [...] > > Reviewed-by: Stefano Babic Is there still something preventing this patch to be applied ? Best regards, > > Best regards, > Stefano Babic > -- Sébastien Szymanski Software engineer, Armadeus Systems Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] video: cfb_console: flush cache in display_rle8_bitmap
Otherwise BMP RLE8 images are not properly displayed. Signed-off-by: Sébastien Szymanski --- drivers/video/cfb_console.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 40110668a6..636c3e8c18 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1297,6 +1297,10 @@ next_run: break; } } + + if (cfb_do_flush_cache) + flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE); + return 0; error: printf("Error: Too much encoded pixel data, validate your bitmap\n"); -- 2.16.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v3 1/1] ARM: opos6ul: make the board boot again
Commit 9faa43c4b5e5 ("ARM: dts: i.MX6UL: U-Boot specific dts for u-boot, dm-spl") removes the u-boot,dm-spl properties from the imx6ul.dtsi file and breaks the OPOS6UL board. Add the u-boot,dm-spl properties into *-u-boot.dts files to make the board boot again. Fixes: commit 9faa43c4b5e5 ("ARM: dts: i.MX6UL: U-Boot specific dts for u-boot, dm-spl") Signed-off-by: Sébastien Szymanski --- Changes for v3: - use the automatic inclusion of -u-boot.dtsi mechanism of U-Boot. Changes for v2: - put u-boot,dm-spl properties into -u-boot.dts files arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi| 28 arch/arm/dts/imx6ul-opos6ul.dtsi | 2 -- arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi | 24 arch/arm/dts/imx6ul-opos6uldev.dts | 2 -- 4 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi create mode 100644 arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi diff --git a/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi b/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi new file mode 100644 index 00..4918de388e --- /dev/null +++ b/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source extras for U-Boot for the OPOS6UL SoM + * + * Copyright (C) 2018 Armadeus Systems + */ + +/ { + soc { + u-boot,dm-spl; + }; +}; + + { + u-boot,dm-spl; +}; + + { + u-boot,dm-spl; +}; + +_usdhc1 { + u-boot,dm-spl; +}; + + { + u-boot,dm-spl; +}; diff --git a/arch/arm/dts/imx6ul-opos6ul.dtsi b/arch/arm/dts/imx6ul-opos6ul.dtsi index d51ad4de20..8f16a0a81c 100644 --- a/arch/arm/dts/imx6ul-opos6ul.dtsi +++ b/arch/arm/dts/imx6ul-opos6ul.dtsi @@ -99,7 +99,6 @@ /* eMMC */ { - u-boot,dm-spl; pinctrl-names = "default"; pinctrl-0 = <_usdhc1>; bus-width = <8>; @@ -162,7 +161,6 @@ }; pinctrl_usdhc1: usdhc1grp { - u-boot,dm-spl; fsl,pins = < MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x17059 MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x10059 diff --git a/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi b/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi new file mode 100644 index 00..da8b0392ef --- /dev/null +++ b/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source extras for U-Boot for the OPOS6ULDev board + * + * Copyright (C) 2018 Armadeus Systems + */ + +#include "imx6ul-opos6ul-u-boot.dtsi" + + { + u-boot,dm-spl; + + spba-bus@0200 { + u-boot,dm-spl; + }; +}; + +_uart1 { + u-boot,dm-spl; +}; + + { + u-boot,dm-spl; +}; diff --git a/arch/arm/dts/imx6ul-opos6uldev.dts b/arch/arm/dts/imx6ul-opos6uldev.dts index 9a51d1e54f..0e59ee57fd 100644 --- a/arch/arm/dts/imx6ul-opos6uldev.dts +++ b/arch/arm/dts/imx6ul-opos6uldev.dts @@ -228,7 +228,6 @@ }; { - u-boot,dm-spl; pinctrl-names = "default"; pinctrl-0 = <_uart1>; status = "okay"; @@ -374,7 +373,6 @@ }; pinctrl_uart1: uart1grp { - u-boot,dm-spl; fsl,pins = < MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b1 MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b1 -- 2.16.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PULL] Please pull u-boot-imx
Hi Tom, > On 1 Sep 2018, at 13:37, Tom Rini wrote: > > - So I start reading the whole diff and I see: > commit 8e00d802e402d2a6734a88ebeb77a70efcfc354c > Author: Sébastien Szymanski > Date: Wed Jul 25 14:47:53 2018 +0200 > >ARM: opos6ul: make the board boot again > > Which is wrong. The -u-boot.dtsi file is automatically included and > should have all of the U-Boot specific DTS changes. > :( I don’t understand your comment. What -u-boot.dtsi file is automatically included ? I have put all the U-Boot specific DTS changes in imx6ul-opos6ul-u-boot.dtsi and imx6u-opos6uldev-u-boot.dts files. Regards, > > -- > Tom > ___ > U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot -- Sébastien Szymanski Software engineer, Armadeus Systems Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/1] ARM: opos6ul: make the board boot again
Commit 9faa43c4b5e5 ("ARM: dts: i.MX6UL: U-Boot specific dts for u-boot, dm-spl") removes the u-boot,dm-spl properties from the imx6ul.dtsi file and breaks the OPOS6UL board. Add the u-boot,dm-spl properties into *-u-boot.dts files to make the board boot again. Fixes: commit 9faa43c4b5e5 ("ARM: dts: i.MX6UL: U-Boot specific dts for u-boot, dm-spl") Signed-off-by: Sébastien Szymanski --- Changes for v2: - put u-boot,dm-spl properties into -u-boot.dts files arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi | 28 arch/arm/dts/imx6ul-opos6ul.dtsi | 2 -- arch/arm/dts/imx6ul-opos6uldev-u-boot.dts | 25 + arch/arm/dts/imx6ul-opos6uldev.dts| 2 -- configs/opos6uldev_defconfig | 2 +- 5 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi create mode 100644 arch/arm/dts/imx6ul-opos6uldev-u-boot.dts diff --git a/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi b/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi new file mode 100644 index 00..4918de388e --- /dev/null +++ b/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source extras for U-Boot for the OPOS6UL SoM + * + * Copyright (C) 2018 Armadeus Systems + */ + +/ { + soc { + u-boot,dm-spl; + }; +}; + + { + u-boot,dm-spl; +}; + + { + u-boot,dm-spl; +}; + +_usdhc1 { + u-boot,dm-spl; +}; + + { + u-boot,dm-spl; +}; diff --git a/arch/arm/dts/imx6ul-opos6ul.dtsi b/arch/arm/dts/imx6ul-opos6ul.dtsi index d51ad4de20..8f16a0a81c 100644 --- a/arch/arm/dts/imx6ul-opos6ul.dtsi +++ b/arch/arm/dts/imx6ul-opos6ul.dtsi @@ -99,7 +99,6 @@ /* eMMC */ { - u-boot,dm-spl; pinctrl-names = "default"; pinctrl-0 = <_usdhc1>; bus-width = <8>; @@ -162,7 +161,6 @@ }; pinctrl_usdhc1: usdhc1grp { - u-boot,dm-spl; fsl,pins = < MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x17059 MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x10059 diff --git a/arch/arm/dts/imx6ul-opos6uldev-u-boot.dts b/arch/arm/dts/imx6ul-opos6uldev-u-boot.dts new file mode 100644 index 00..21899cdd67 --- /dev/null +++ b/arch/arm/dts/imx6ul-opos6uldev-u-boot.dts @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source extras for U-Boot for the OPOS6ULDev board + * + * Copyright (C) 2018 Armadeus Systems + */ + +#include "imx6ul-opos6uldev.dts" +#include "imx6ul-opos6ul-u-boot.dtsi" + + { + u-boot,dm-spl; + + spba-bus@0200 { + u-boot,dm-spl; + }; +}; + +_uart1 { + u-boot,dm-spl; +}; + + { + u-boot,dm-spl; +}; diff --git a/arch/arm/dts/imx6ul-opos6uldev.dts b/arch/arm/dts/imx6ul-opos6uldev.dts index 9a51d1e54f..0e59ee57fd 100644 --- a/arch/arm/dts/imx6ul-opos6uldev.dts +++ b/arch/arm/dts/imx6ul-opos6uldev.dts @@ -228,7 +228,6 @@ }; { - u-boot,dm-spl; pinctrl-names = "default"; pinctrl-0 = <_uart1>; status = "okay"; @@ -374,7 +373,6 @@ }; pinctrl_uart1: uart1grp { - u-boot,dm-spl; fsl,pins = < MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b1 MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b1 diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig index 729f9d78be..9f5697b121 100644 --- a/configs/opos6uldev_defconfig +++ b/configs/opos6uldev_defconfig @@ -12,7 +12,7 @@ CONFIG_SPL_SYS_MALLOC_F_LEN=0x400 CONFIG_SPL=y CONFIG_SPL_LIBDISK_SUPPORT=y # CONFIG_CMD_BMODE is not set -CONFIG_DEFAULT_DEVICE_TREE="imx6ul-opos6uldev" +CONFIG_DEFAULT_DEVICE_TREE="imx6ul-opos6uldev-u-boot" CONFIG_TPL_SYS_MALLOC_F_LEN=0x400 CONFIG_BOOTDELAY=5 CONFIG_USE_BOOTARGS=y -- 2.16.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] ARM: dts: opos6ul: make the board boot again
Commit 9faa43c4b5e5 ("ARM: dts: i.MX6UL: U-Boot specific dts for u-boot, dm-spl") removes the u-boot,dm-spl properties from the imx6ul.dtsi file and breaks the OPOS6UL board. Add the u-boot,dm-spl properties to make the board boot again. Fixes: commit 9faa43c4b5e5 ("ARM: dts: i.MX6UL: U-Boot specific dts for u-boot, dm-spl") Signed-off-by: Sébastien Szymanski --- arch/arm/dts/imx6ul-opos6ul.dtsi | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/imx6ul-opos6ul.dtsi b/arch/arm/dts/imx6ul-opos6ul.dtsi index d51ad4de20..7023842315 100644 --- a/arch/arm/dts/imx6ul-opos6ul.dtsi +++ b/arch/arm/dts/imx6ul-opos6ul.dtsi @@ -99,7 +99,6 @@ /* eMMC */ { - u-boot,dm-spl; pinctrl-names = "default"; pinctrl-0 = <_usdhc1>; bus-width = <8>; @@ -162,7 +161,6 @@ }; pinctrl_usdhc1: usdhc1grp { - u-boot,dm-spl; fsl,pins = < MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x17059 MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x10059 @@ -192,3 +190,34 @@ >; }; }; + +/* Specific to U-Boot */ +/ { + soc { + u-boot,dm-spl; + }; +}; + + { + u-boot,dm-spl; + + spba-bus@0200 { + u-boot,dm-spl; + }; +}; + + { + u-boot,dm-spl; +}; + + { + u-boot,dm-spl; +}; + +_usdhc1 { + u-boot,dm-spl; +}; + + { + u-boot,dm-spl; +}; -- 2.16.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: mx6ul: Apply ERR011115 errata workaround
Hi, On 07/19/2018 01:37 PM, Marcin Niestroj wrote: > ERR05 in IMX6UL errata says to use OCRAM memory above > 0x908000 (instead of 0x907000) for silicon revision 1.2 shipped > prior date code 1740. > > As we cannot check affected targets in runtime, apply that > workaround by default for all IMX6UL platforms. Leave possibility > to disable that workaround for non-affected targets, so more OCRAM > area can be used by SPL (e.g. for featureful SPL images). > > Signed-off-by: Marcin Niestroj > --- > arch/arm/mach-imx/mx6/Kconfig | 9 + > include/configs/imx6_spl.h| 11 +-- > 2 files changed, 18 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig > index 521fad74b5..61708a0526 100644 > --- a/arch/arm/mach-imx/mx6/Kconfig > +++ b/arch/arm/mach-imx/mx6/Kconfig > @@ -58,6 +58,15 @@ config MX6UL > select SYSCOUNTER_TIMER > bool > > +config MX6UL_ERR05 > + bool "Workaround for ERR05 in IMX6UL Errata" > + depends on MX6UL > + default MX6UL > + help > + Say N here if you are sure that your platform is not affected > + with ERR05. Doing so might be useful in case of featureful > + (big) SPL images. > + > config MX6UL_LITESOM > bool > select MX6UL > diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h > index 720ff045a7..42d12c7503 100644 > --- a/include/configs/imx6_spl.h > +++ b/include/configs/imx6_spl.h > @@ -19,16 +19,23 @@ > *which consists of a 4K header in front of us that contains the IVT, DCD > *and some padding thus 'our' max size is really 0x00908000 - 0x00918000 > *or 64KB > + * - Use 0x00909000 as start of OCRAM Free Area as a workaround for > + *ERR05 in IMX6UL Errata > */ > +#ifdef CONFIG_MX6UL_ERR05 > +#define CONFIG_SPL_TEXT_BASE 0x00909000 > +#else > #define CONFIG_SPL_TEXT_BASE 0x00908000 > -#define CONFIG_SPL_MAX_SIZE 0x1 > +#endif > + > +#define CONFIG_SPL_MAX_SIZE (0x00918000 - CONFIG_SPL_TEXT_BASE) > #define CONFIG_SPL_STACK 0x0091FFB8 > /* > * Pad SPL to 68KB (4KB header + 64KB max size). This allows to write the > * SPL/U-Boot combination generated with u-boot-with-spl.imx directly to a > * boot media (given that boot media specific offset is configured properly). > */ > -#define CONFIG_SPL_PAD_TO0x11000 > +#define CONFIG_SPL_PAD_TO(CONFIG_SPL_MAX_SIZE + 0x1000) I got the following error when building the u-boot-with-spl.imx file: /home/sszy/development/armadeus-git-opos6ul/buildroot/output/host/usr/bin/arm-linux-gnueabihf-objcopy: --pad-to: bad number: (CONFIG_SPL_MAX_SIZE + 0x1000) Anyway, this is wrong and will break the u-boot-with-spl.imx for MMC/SD boot device. The default offset for the U-Boot image on MMC/SD boot device is 69KB (see SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR) so I think CONFIG_SPL_PAD_TO should always be 0x11000 (== 68KB). Regards, > > /* MMC support */ > #if defined(CONFIG_SPL_MMC_SUPPORT) > -- Sébastien Szymanski Software engineer, Armadeus Systems Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] DM-SERIAL-SPL on MX6
On 06/07/2018 10:35 AM, Hannes Schmelzer wrote: > On 06/07/2018 09:50 AM, Sébastien Szymanski wrote: >> Hi, > Hi Sébastien, >> >> On 06/07/2018 09:14 AM, Jagan Teki wrote: >>> + Add few imx maintainers >>> >>> On Thu, Jun 7, 2018 at 12:25 PM, Hannes Schmelzer >>> wrote: >>>> hi, >>>> >>>> i'm actually trying to convert my i.mx6 boards to DM, many things are >>>> already doing well. >>>> But I've trouble getting the console (UART) runnin SPL. >>>> >>>> The "preloader_console_init" is called very early in board_init_f, i >>>> guess >>>> that DM isn't ready at this point. >>>> >>>> has anyone experience in this? >>> Yes I've faced the same, look like DEBUG Uart doesn't support low >>> level init. Peng or someone can explain more. >> When converting the OPOS6UL to DM, I had to move the >> preloader_console_init call into the spl_board_init function. > thanks for this hint, i also tried this. But unfortunately without success. > But it is good to know that this way on your side works. > > what i've done to try make it work: > > add to my dts: > chosen { > stdout-path = > }; > > { > u-boot,dm-spl; > u-boot,dm-preloc; > status = "okay"; > }; Don't you need pins muxing properties in uart1 ( pinctrl-names / pinctrl-0 ) ? > > so the device should be present during spl stage and console should be > set to it. > > # Serial drivers > # > CONFIG_BAUDRATE=115200 > CONFIG_SERIAL_PRESENT=y > CONFIG_SPL_SERIAL_PRESENT=y > CONFIG_DM_SERIAL=y > CONFIG_SPL_DM_SERIAL=y > CONFIG_MXC_UART=y > > maybe i'm still missing something. > -- Sébastien Szymanski Software engineer, Armadeus Systems Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] DM-SERIAL-SPL on MX6
Hi, On 06/07/2018 09:14 AM, Jagan Teki wrote: > + Add few imx maintainers > > On Thu, Jun 7, 2018 at 12:25 PM, Hannes Schmelzer > wrote: >> hi, >> >> i'm actually trying to convert my i.mx6 boards to DM, many things are >> already doing well. >> But I've trouble getting the console (UART) runnin SPL. >> >> The "preloader_console_init" is called very early in board_init_f, i guess >> that DM isn't ready at this point. >> >> has anyone experience in this? > > Yes I've faced the same, look like DEBUG Uart doesn't support low > level init. Peng or someone can explain more. When converting the OPOS6UL to DM, I had to move the preloader_console_init call into the spl_board_init function. Regards, > > Jagan. > -- Sébastien Szymanski Software engineer, Armadeus Systems Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] imx6ul: opos6ul: in Serial Downloader boot mode use ymodem
Hi Fabio, On 04/17/2018 11:52 PM, Fabio Estevam wrote: > Hi Sébastien, > > On Tue, Apr 17, 2018 at 12:29 PM, Sébastien Szymanski > <sebastien.szyman...@armadeus.com> wrote: >> When booting in Serial Downloader mode load the U-Boot image using >> ymodem. > > Not sure if you are aware, but it is possible to use imx_usb_loader to > also load SPL + u-boot.img as described at: > doc/README.sdp > > Your patch looks good, but just wanted to point out this alternative > in case it fits your needs. I am aware about the SDP support in U-Boot but I prefer to keep using ymodem at the moment. Thanks! Regards, > -- Sébastien Szymanski Software engineer, Armadeus Systems Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/2] imx6ul: opos6ul: add SPL_DM support
Since commit commit 152038ea1886 ("i.MX6UL: icore: Add SPL_OF_CONTROL support") the OPOS6UL board doesn't boot anymore. Adding SPL_DM support makes the board boot again. Fixes: commit 152038ea1886 ("i.MX6UL: icore: Add SPL_OF_CONTROL support") Signed-off-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> --- Changes for v2: - none arch/arm/dts/imx6ul-opos6ul.dtsi| 4 ++- arch/arm/dts/imx6ul-opos6uldev.dts | 2 ++ arch/arm/dts/imx6ul.dtsi| 1 + arch/arm/include/asm/arch-mx6/opos6ul.h | 4 --- arch/arm/mach-imx/mx6/Kconfig | 4 +++ arch/arm/mach-imx/mx6/opos6ul.c | 50 - board/armadeus/opos6uldev/board.c | 20 + configs/opos6uldev_defconfig| 5 include/configs/opos6uldev.h| 9 ++ 9 files changed, 25 insertions(+), 74 deletions(-) diff --git a/arch/arm/dts/imx6ul-opos6ul.dtsi b/arch/arm/dts/imx6ul-opos6ul.dtsi index 51095df33a..d51ad4de20 100644 --- a/arch/arm/dts/imx6ul-opos6ul.dtsi +++ b/arch/arm/dts/imx6ul-opos6ul.dtsi @@ -1,5 +1,5 @@ /* - * Copyright 2017 Armadeus Systems <supp...@armadeus.com> + * Copyright 2018 Armadeus Systems <supp...@armadeus.com> * * This file is dual-licensed: you can use it either under the terms * of the GPL or the X11 license, at your option. Note that this dual @@ -99,6 +99,7 @@ /* eMMC */ { + u-boot,dm-spl; pinctrl-names = "default"; pinctrl-0 = <_usdhc1>; bus-width = <8>; @@ -161,6 +162,7 @@ }; pinctrl_usdhc1: usdhc1grp { + u-boot,dm-spl; fsl,pins = < MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x17059 MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x10059 diff --git a/arch/arm/dts/imx6ul-opos6uldev.dts b/arch/arm/dts/imx6ul-opos6uldev.dts index 0e59ee57fd..9a51d1e54f 100644 --- a/arch/arm/dts/imx6ul-opos6uldev.dts +++ b/arch/arm/dts/imx6ul-opos6uldev.dts @@ -228,6 +228,7 @@ }; { + u-boot,dm-spl; pinctrl-names = "default"; pinctrl-0 = <_uart1>; status = "okay"; @@ -373,6 +374,7 @@ }; pinctrl_uart1: uart1grp { + u-boot,dm-spl; fsl,pins = < MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b1 MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b1 diff --git a/arch/arm/dts/imx6ul.dtsi b/arch/arm/dts/imx6ul.dtsi index b63f5a53ac..d5ce3f13c2 100644 --- a/arch/arm/dts/imx6ul.dtsi +++ b/arch/arm/dts/imx6ul.dtsi @@ -194,6 +194,7 @@ #size-cells = <1>; reg = <0x0200 0x4>; ranges; + u-boot,dm-spl; ecspi1: ecspi@02008000 { #address-cells = <1>; diff --git a/arch/arm/include/asm/arch-mx6/opos6ul.h b/arch/arm/include/asm/arch-mx6/opos6ul.h index b5363850d2..8adff67cea 100644 --- a/arch/arm/include/asm/arch-mx6/opos6ul.h +++ b/arch/arm/include/asm/arch-mx6/opos6ul.h @@ -9,8 +9,4 @@ int opos6ul_board_late_init(void); -#ifdef CONFIG_SPL_BUILD -void opos6ul_setup_uart_debug(void); -#endif - #endif diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index aa6f5facbf..98ea1f566c 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -73,6 +73,10 @@ config MX6UL_OPOS6UL select DM_MMC select DM_THERMAL select SUPPORT_SPL + select SPL_DM if SPL + select SPL_OF_CONTROL if SPL + select SPL_SEPARATE_BSS if SPL + select SPL_PINCTRL if SPL config MX6ULL select SYS_L2CACHE_OFF diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index 2de1321b56..ef70a7d323 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Armadeus Systems + * Copyright (C) 2018 Armadeus Systems * * SPDX-License-Identifier:GPL-2.0+ */ @@ -9,15 +9,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include DECLARE_GLOBAL_DATA_PTR; @@ -138,12 +135,6 @@ int board_late_init(void) return opos6ul_board_late_init(); } -int board_mmc_getcd(struct mmc *mmc) -{ - struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; - return cfg->esdhc_base == USDHC1_BASE_ADDR; -} - int dram_init(void) { gd->ram_size = imx_ddr_size(); @@ -153,32 +144,9 @@ int dram_init(void) #ifdef CONFIG_SPL_BUILD #include -#include #include #include -#define USDHC_PAD_CTRL ( \ - PAD_CTL_HYS | PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_MED | \ - PAD_CTL_DSE_8
[U-Boot] [PATCH v2 2/2] imx6ul: opos6ul: in Serial Downloader boot mode use ymodem
When booting in Serial Downloader mode load the U-Boot image using ymodem. Signed-off-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> --- Changes for v2: - Add commit log. arch/arm/mach-imx/mx6/opos6ul.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index ef70a7d323..5d39c0bc1b 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -208,6 +208,16 @@ static struct mx6_ddr3_cfg mem_ddr = { .trasmin = 3750, }; +void board_boot_order(u32 *spl_boot_list) +{ + unsigned int bmode = readl(_base->sbmr2); + + if (((bmode >> 24) & 0x03) == 0x01) /* Serial Downloader */ + spl_boot_list[0] = BOOT_DEVICE_UART; + else + spl_boot_list[0] = spl_boot_device(); +} + static void ccgr_init(void) { struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; -- 2.16.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/2] imx6ul: opos6ul: in Serial Downloader boot mode use ymodem
Signed-off-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> --- arch/arm/mach-imx/mx6/opos6ul.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index ef70a7d323..5d39c0bc1b 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -208,6 +208,16 @@ static struct mx6_ddr3_cfg mem_ddr = { .trasmin = 3750, }; +void board_boot_order(u32 *spl_boot_list) +{ + unsigned int bmode = readl(_base->sbmr2); + + if (((bmode >> 24) & 0x03) == 0x01) /* Serial Downloader */ + spl_boot_list[0] = BOOT_DEVICE_UART; + else + spl_boot_list[0] = spl_boot_device(); +} + static void ccgr_init(void) { struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; -- 2.16.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/2] imx6ul: opos6ul: add SPL_DM support
Since commit commit 152038ea1886 ("i.MX6UL: icore: Add SPL_OF_CONTROL support") the OPOS6UL board doesn't boot anymore. Adding SPL_DM support makes the board boot again. Fixes: commit 152038ea1886 ("i.MX6UL: icore: Add SPL_OF_CONTROL support") Signed-off-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> --- arch/arm/dts/imx6ul-opos6ul.dtsi| 4 ++- arch/arm/dts/imx6ul-opos6uldev.dts | 2 ++ arch/arm/dts/imx6ul.dtsi| 1 + arch/arm/include/asm/arch-mx6/opos6ul.h | 4 --- arch/arm/mach-imx/mx6/Kconfig | 4 +++ arch/arm/mach-imx/mx6/opos6ul.c | 50 - board/armadeus/opos6uldev/board.c | 20 + configs/opos6uldev_defconfig| 5 include/configs/opos6uldev.h| 9 ++ 9 files changed, 25 insertions(+), 74 deletions(-) diff --git a/arch/arm/dts/imx6ul-opos6ul.dtsi b/arch/arm/dts/imx6ul-opos6ul.dtsi index 51095df33a..d51ad4de20 100644 --- a/arch/arm/dts/imx6ul-opos6ul.dtsi +++ b/arch/arm/dts/imx6ul-opos6ul.dtsi @@ -1,5 +1,5 @@ /* - * Copyright 2017 Armadeus Systems <supp...@armadeus.com> + * Copyright 2018 Armadeus Systems <supp...@armadeus.com> * * This file is dual-licensed: you can use it either under the terms * of the GPL or the X11 license, at your option. Note that this dual @@ -99,6 +99,7 @@ /* eMMC */ { + u-boot,dm-spl; pinctrl-names = "default"; pinctrl-0 = <_usdhc1>; bus-width = <8>; @@ -161,6 +162,7 @@ }; pinctrl_usdhc1: usdhc1grp { + u-boot,dm-spl; fsl,pins = < MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x17059 MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x10059 diff --git a/arch/arm/dts/imx6ul-opos6uldev.dts b/arch/arm/dts/imx6ul-opos6uldev.dts index 0e59ee57fd..9a51d1e54f 100644 --- a/arch/arm/dts/imx6ul-opos6uldev.dts +++ b/arch/arm/dts/imx6ul-opos6uldev.dts @@ -228,6 +228,7 @@ }; { + u-boot,dm-spl; pinctrl-names = "default"; pinctrl-0 = <_uart1>; status = "okay"; @@ -373,6 +374,7 @@ }; pinctrl_uart1: uart1grp { + u-boot,dm-spl; fsl,pins = < MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b1 MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b1 diff --git a/arch/arm/dts/imx6ul.dtsi b/arch/arm/dts/imx6ul.dtsi index b63f5a53ac..d5ce3f13c2 100644 --- a/arch/arm/dts/imx6ul.dtsi +++ b/arch/arm/dts/imx6ul.dtsi @@ -194,6 +194,7 @@ #size-cells = <1>; reg = <0x0200 0x4>; ranges; + u-boot,dm-spl; ecspi1: ecspi@02008000 { #address-cells = <1>; diff --git a/arch/arm/include/asm/arch-mx6/opos6ul.h b/arch/arm/include/asm/arch-mx6/opos6ul.h index b5363850d2..8adff67cea 100644 --- a/arch/arm/include/asm/arch-mx6/opos6ul.h +++ b/arch/arm/include/asm/arch-mx6/opos6ul.h @@ -9,8 +9,4 @@ int opos6ul_board_late_init(void); -#ifdef CONFIG_SPL_BUILD -void opos6ul_setup_uart_debug(void); -#endif - #endif diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index aa6f5facbf..98ea1f566c 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -73,6 +73,10 @@ config MX6UL_OPOS6UL select DM_MMC select DM_THERMAL select SUPPORT_SPL + select SPL_DM if SPL + select SPL_OF_CONTROL if SPL + select SPL_SEPARATE_BSS if SPL + select SPL_PINCTRL if SPL config MX6ULL select SYS_L2CACHE_OFF diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index 2de1321b56..ef70a7d323 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Armadeus Systems + * Copyright (C) 2018 Armadeus Systems * * SPDX-License-Identifier:GPL-2.0+ */ @@ -9,15 +9,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include DECLARE_GLOBAL_DATA_PTR; @@ -138,12 +135,6 @@ int board_late_init(void) return opos6ul_board_late_init(); } -int board_mmc_getcd(struct mmc *mmc) -{ - struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; - return cfg->esdhc_base == USDHC1_BASE_ADDR; -} - int dram_init(void) { gd->ram_size = imx_ddr_size(); @@ -153,32 +144,9 @@ int dram_init(void) #ifdef CONFIG_SPL_BUILD #include -#include #include #include -#define USDHC_PAD_CTRL ( \ - PAD_CTL_HYS | PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_MED | \ - PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST
Re: [U-Boot] [PATCH v2] imx: Fix regression with CONFIG_DM_MMC=y
Hello Fabio, On 10/20/2017 01:41 PM, Fabio Estevam wrote: > When CONFIG_DM_MMC=y, CONFIG_BLK should be selected, otherwise the > SD/eMMC card cannot be used. > > Also, select CONFIG_DM_USB=y when CONFIG_USB=y to avoid build failure. > > Tested on mx6slevk, mx7dsabresd and mx6ullevk. > > Signed-off-by: Fabio Estevam <fabio.este...@nxp.com> > --- > Changes since v1: > - Cover all imx boards > > configs/imx6q_logic_defconfig | 1 - > configs/imx6qdl_icore_nand_defconfig | 1 - > configs/imx6ul_geam_mmc_defconfig | 1 - > configs/imx6ul_geam_nand_defconfig| 1 - > configs/imx6ul_isiot_emmc_defconfig | 1 - > configs/imx6ul_isiot_mmc_defconfig| 1 - > configs/imx6ul_isiot_nand_defconfig | 1 - > configs/mx6slevk_defconfig| 2 +- > configs/mx6slevk_spinor_defconfig | 2 +- > configs/mx6sllevk_defconfig | 1 - > configs/mx6sllevk_plugin_defconfig| 1 - > configs/mx6sxsabreauto_defconfig | 2 +- > configs/mx6ull_14x14_evk_defconfig| 1 - > configs/mx6ull_14x14_evk_plugin_defconfig | 1 - > configs/mx7dsabresd_defconfig | 1 - > configs/mx7dsabresd_secure_defconfig | 1 - > configs/mx7ulp_evk_defconfig | 1 - > configs/mx7ulp_evk_plugin_defconfig | 1 - > configs/opos6uldev_defconfig | 1 - > 19 files changed, 3 insertions(+), 19 deletions(-) > The compilation fails for the opos6uldev board. The following change is needed to fix it: diff --git a/include/configs/opos6uldev.h b/include/configs/opos6uldev.h index d018984..04fc602 100644 --- a/include/configs/opos6uldev.h +++ b/include/configs/opos6uldev.h @@ -17,6 +17,7 @@ #ifdef CONFIG_SPL_BUILD #undef CONFIG_DM_GPIO #undef CONFIG_DM_MMC +#undef CONFIG_BLK #define CONFIG_MXC_UART_BASE UART1_BASE #endif Otherwise, your change fixes the eMMC on the board. Tested-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> Thanks. Regards, -- Sébastien Szymanski Software engineer, Armadeus Systems Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v1 2/2] imx: use BOOT_DEVICE_BOARD instead of UART
Hello, > On 27 Aug 2017, at 21:17, Stefan Agner <ste...@agner.ch> wrote: > > On 2017-08-27 01:45, Sébastien Szymanski wrote: >> Hello, >> >>> On 25 Aug 2017, at 13:33, Stefano Babic <sba...@denx.de> wrote: >>> >>> On 16/08/2017 02:49, Stefan Agner wrote: >>>> From: Stefan Agner <stefan.ag...@toradex.com> >>>> >>>> i.MX 6 serial downloader is not necessarily booting via UART but can >>>> also boot from USB. In fact only some i.MX chips have serial >>>> downloader support via UART (e.g. 6UL/ULL and Vybrid) but all of >>>> them have serial downloader support via USB. Use the more appropriate >>>> BOOT_DEVICE_BOARD define which is used for ROM provided recovery >>>> mechanisms in general. >>>> >>>> Signed-off-by: Stefan Agner <stefan.ag...@toradex.com> >>>> --- >>>> >>>> arch/arm/mach-imx/spl.c | 4 ++-- >>>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c >>>> index 836b334fa9..bcd1033fdb 100644 >>>> --- a/arch/arm/mach-imx/spl.c >>>> +++ b/arch/arm/mach-imx/spl.c >>>> @@ -27,7 +27,7 @@ u32 spl_boot_device(void) >>>> * BOOT_MODE - see IMX6DQRM Table 8-1 >>>> */ >>>>if (((bmode >> 24) & 0x03) == 0x01) /* Serial Downloader */ >>>> - return BOOT_DEVICE_UART; >> >> Returning BOOT_DEVICE_UART here makes the SPL to load U-Boot from the >> debug UART using a ymodem transfer when enabled with >> CONFIG_SPL_YMODEM_SUPPORT like it is on the OPOS6ULDev board. This is >> now broken. > > For reference, the change has been discussed here: > https://www.mail-archive.com/u-boot@lists.denx.de/msg259729.html > > Returning UART is definitely wrong, because the boot ROM can also boot > from USB… > As I mentioned in the other thread, ideally we should be able to do a > runtime detection to discriminate between UART and USB loader. I think > Stefano did not like that since it relies on undocumented features. I don’t understand. This has nothing to do with what the ROM can or can’t boot. spl_boot_device returns the device where the SPL will find the U-Boot image. Here, it makes the distinction between normal boots and Serial Downloader boots (BOOT_MODE[0:1] = 0b01) no matter how the SPL has been loaded. So, we actually could return whatever we want here, UART, USB, eMMC, etc…, as the function does for normal boots. Of course, UART or USB is the only two choices that make sense for Serial Downloader boots. Maybe we could do something like: #if CONFIG_IS_ENABLED(SPL_YMODEM_SUPPORT) return BOOT_DEVICE_UART #else return BOOT_DEVICE_BOARD #endif or let the boards return the device they want by overloading board_boot_order. ? Regards, > > So BOOT_DEVICE is really ambiguous. Maybe BOOT_DEVICE_* should be a > bitfield? Then we could return BOOT_DEVICE_UART and BOOT_DEVICE_USB, and > boards can just compile in the support they need. > > > Changing the Y-Modem support to boot device BOOT_DEVICE_BOARD is not > possible since other SoCs use BOOT_DEVICE_UART. > > I guess we could just add a second SPL_LOAD_IMAGE_METHOD in > common/spl/spl_ymodem.c for BOOT_DEVICE_BOARD. > > -- > Stefan > > >> >> Regards, >> >>>> + return BOOT_DEVICE_BOARD; >>>> >>>>/* BOOT_CFG1[7:4] - see IMX6DQRM Table 8-8 */ >>>>switch ((reg & IMX6_BMODE_MASK) >> IMX6_BMODE_SHIFT) { >>>> @@ -43,7 +43,7 @@ u32 spl_boot_device(void) >>>>} >>>>/* Reserved: Used to force Serial Downloader */ >>>>case IMX6_BMODE_RESERVED: >>>> - return BOOT_DEVICE_UART; >>>> + return BOOT_DEVICE_BOARD; >>>>/* SATA: See 8.5.4, Table 8-20 */ >>>>case IMX6_BMODE_SATA: >>>>return BOOT_DEVICE_SATA; >>>> >>> >>> Applied to u-boot-imx, -master, thanks ! >>> >>> Best regards, >>> Stefano Babic >>> >>> >>> -- >>> = >>> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk >>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany >>> Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de >>> = >>> ___ >>> U-Boot mailing list >>> U-Boot@lists.denx.de >>> https://lists.denx.de/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v1 2/2] imx: use BOOT_DEVICE_BOARD instead of UART
Hello, > On 25 Aug 2017, at 13:33, Stefano Babicwrote: > > On 16/08/2017 02:49, Stefan Agner wrote: >> From: Stefan Agner >> >> i.MX 6 serial downloader is not necessarily booting via UART but can >> also boot from USB. In fact only some i.MX chips have serial >> downloader support via UART (e.g. 6UL/ULL and Vybrid) but all of >> them have serial downloader support via USB. Use the more appropriate >> BOOT_DEVICE_BOARD define which is used for ROM provided recovery >> mechanisms in general. >> >> Signed-off-by: Stefan Agner >> --- >> >> arch/arm/mach-imx/spl.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c >> index 836b334fa9..bcd1033fdb 100644 >> --- a/arch/arm/mach-imx/spl.c >> +++ b/arch/arm/mach-imx/spl.c >> @@ -27,7 +27,7 @@ u32 spl_boot_device(void) >> * BOOT_MODE - see IMX6DQRM Table 8-1 >> */ >> if (((bmode >> 24) & 0x03) == 0x01) /* Serial Downloader */ >> -return BOOT_DEVICE_UART; Returning BOOT_DEVICE_UART here makes the SPL to load U-Boot from the debug UART using a ymodem transfer when enabled with CONFIG_SPL_YMODEM_SUPPORT like it is on the OPOS6ULDev board. This is now broken. Regards, >> +return BOOT_DEVICE_BOARD; >> >> /* BOOT_CFG1[7:4] - see IMX6DQRM Table 8-8 */ >> switch ((reg & IMX6_BMODE_MASK) >> IMX6_BMODE_SHIFT) { >> @@ -43,7 +43,7 @@ u32 spl_boot_device(void) >> } >> /* Reserved: Used to force Serial Downloader */ >> case IMX6_BMODE_RESERVED: >> -return BOOT_DEVICE_UART; >> +return BOOT_DEVICE_BOARD; >> /* SATA: See 8.5.4, Table 8-20 */ >> case IMX6_BMODE_SATA: >> return BOOT_DEVICE_SATA; >> > > Applied to u-boot-imx, -master, thanks ! > > Best regards, > Stefano Babic > > > -- > = > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de > = > ___ > U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v1 1/2] imx: fix USB boot mode detection for i.MX 6UL and 6ULL
Hello, > > On 25 Aug 2017, at 13:32, Stefano Babic <sba...@denx.de> wrote: > > On 16/08/2017 02:49, Stefan Agner wrote: >> From: Stefan Agner <stefan.ag...@toradex.com> >> >> Add the reserved boot mode used in the bmode command for i.MX 6UL >> and 6ULL as introduced in commit 3fd9579085fa ("imx: mx6ull: fix USB >> bmode for i.MX 6UL and 6ULL"). >> >> Also replace BMODE_UART with BMODE_RESERVED, which is more appropriate. >> Commit 96aac843b68d ("imx: Use IMX6_BMODE_* macros instead of numericals") >> added macros for boot modes, in the process the reserved boot mode got >> named BMODE_UART. We use the reserved boot mode in the bmode command to >> let the boot ROM enter serial downloader recovery mode. But this is only >> a side effect, the actual boot mode is reserved... >> >> Signed-off-by: Stefan Agner <stefan.ag...@toradex.com> >> --- >> Afaik there is no board yet using SPL on 6UL/ULL... > > Not yet… ? There are boards in the tree using SPL on i.MX6UL. OPOS6UL is one of them. Regards, Sébastien Szymanski > >> >> arch/arm/include/asm/mach-imx/sys_proto.h | 7 ++- >> arch/arm/mach-imx/spl.c | 2 +- >> 2 files changed, 7 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h >> b/arch/arm/include/asm/mach-imx/sys_proto.h >> index 046df6291a..d94c095118 100644 >> --- a/arch/arm/include/asm/mach-imx/sys_proto.h >> +++ b/arch/arm/include/asm/mach-imx/sys_proto.h >> @@ -69,8 +69,13 @@ enum imx6_bmode_emi { >> >> enum imx6_bmode { >> IMX6_BMODE_EMI, >> -IMX6_BMODE_UART, >> +#if defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL) >> +IMX6_BMODE_QSPI, >> +IMX6_BMODE_RESERVED, >> +#else >> +IMX6_BMODE_RESERVED, >> IMX6_BMODE_SATA, >> +#endif >> IMX6_BMODE_SERIAL_ROM, >> IMX6_BMODE_SD, >> IMX6_BMODE_ESD, >> diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c >> index 75698c48ea..836b334fa9 100644 >> --- a/arch/arm/mach-imx/spl.c >> +++ b/arch/arm/mach-imx/spl.c >> @@ -42,7 +42,7 @@ u32 spl_boot_device(void) >> break; >> } >> /* Reserved: Used to force Serial Downloader */ >> -case IMX6_BMODE_UART: >> +case IMX6_BMODE_RESERVED: >> return BOOT_DEVICE_UART; >> /* SATA: See 8.5.4, Table 8-20 */ >> case IMX6_BMODE_SATA: >> > > Applied to u-boot-imx, -master, thanks ! > > Best regards, > Stefano Babic > > > -- > = > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de > = > ___ > U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/2] imx: imx6ull: correct get_cpu_speed_grade_hz
i.MX6ULL has different speed grades than i.MX6UL. Signed-off-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> --- Notice that the i.MX6ULL RM says: 2b'00: 800MHz; 2b'01: 850MHz; 2b'10: 1GHz; 2b'11: 1.2Ghz; which seems incorrect. The commit [1] confirmed it, but I cannot find any 996MHz i.MX6ULL on the NXP website. According to [2], there are only 3 i.MX6ULL versions: 528, 792 and 900MHz. [1] http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/commit/arch/arm/mach-imx/mach-imx6ul.c?h=imx_4.1.15_2.0.0_ga=e8b9e8acb5ee44f48e048d744ccae4b6b02ef6a6 [2] http://www.nxp.com/docs/en/data-sheet/IMX6ULLIEC.pdf --- arch/arm/mach-imx/mx6/soc.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 7607456..c15b9cb 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -114,6 +114,12 @@ u32 get_cpu_rev(void) #define OCOTP_CFG3_SPEED_528MHZ 1 #define OCOTP_CFG3_SPEED_696MHZ 2 +/* + * For i.MX6ULL + */ +#define OCOTP_CFG3_SPEED_792MHZ 2 +#define OCOTP_CFG3_SPEED_900MHZ 3 + u32 get_cpu_speed_grade_hz(void) { struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; @@ -126,7 +132,7 @@ u32 get_cpu_speed_grade_hz(void) val >>= OCOTP_CFG3_SPEED_SHIFT; val &= 0x3; - if (is_mx6ul() || is_mx6ull()) { + if (is_mx6ul()) { if (val == OCOTP_CFG3_SPEED_528MHZ) return 52800; else if (val == OCOTP_CFG3_SPEED_696MHZ) @@ -135,6 +141,17 @@ u32 get_cpu_speed_grade_hz(void) return 0; } + if (is_mx6ull()) { + if (val == OCOTP_CFG3_SPEED_528MHZ) + return 52800; + else if (val == OCOTP_CFG3_SPEED_792MHZ) + return 79200; + else if (val == OCOTP_CFG3_SPEED_900MHZ) + return 9; + else + return 0; + } + switch (val) { /* Valid for IMX6DQ */ case OCOTP_CFG3_SPEED_1P2GHZ: -- 2.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/2] imx: imx6ul: correct get_cpu_speed_grade_hz on 696MHz SoCs
Return the correct value when the speed grade is 696MHz. Signed-off-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> --- Changes v1 -> v2: - Only true on i.MX6UL so adapt the subject and commit log accordingly. --- arch/arm/mach-imx/mx6/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index af31673..7607456 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -130,7 +130,7 @@ u32 get_cpu_speed_grade_hz(void) if (val == OCOTP_CFG3_SPEED_528MHZ) return 52800; else if (val == OCOTP_CFG3_SPEED_696MHZ) - return 6960; + return 69600; else return 0; } -- 2.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] imx: imx6ull: correct get_cpu_speed_grade_hz on 696MHz SoCs
Hi, On 08/02/2017 12:11 PM, Stefano Babic wrote: > On 02/08/2017 12:15, Sébastien Szymanski wrote: >> Return the correct value when the speed grade is 696MHz. >> This makes U-Boot to print the correct value at boot: >> >> U-Boot 2017.09-rc1-dirty (Aug 02 2017 - 12:02:26 +0200) >> >> CPU: Freescale i.MX6ULL rev1.0 696 MHz (running at 396 MHz) >> >> instead of >> >> U-Boot 2017.09-rc1-dirty (Aug 02 2017 - 11:47:51 +0200) >> >> CPU: Freescale i.MX6ULL rev1.0 69 MHz (running at 396 MHz) >> Signed-off-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> >> --- >> arch/arm/mach-imx/mx6/soc.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c >> index af31673..7607456 100644 >> --- a/arch/arm/mach-imx/mx6/soc.c >> +++ b/arch/arm/mach-imx/mx6/soc.c >> @@ -130,7 +130,7 @@ u32 get_cpu_speed_grade_hz(void) >> if (val == OCOTP_CFG3_SPEED_528MHZ) >> return 52800; >> else if (val == OCOTP_CFG3_SPEED_696MHZ) >> -return 6960; >> +return 69600; >> else >> return 0; >> } >> > > Reviewed-by: Stefano Babic <sba...@denx.de> > Thanks. However, I've just noticed this is only true for i.MX6UL. i.MX6ULL has different speed grading. Should I resend my patch and fix the commit log? Best regards, > Best regards, > Stefano Babic > > -- Sébastien Szymanski Software engineer, Armadeus Systems Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] imx: imx6ull: correct get_cpu_speed_grade_hz on 696MHz SoCs
Return the correct value when the speed grade is 696MHz. This makes U-Boot to print the correct value at boot: U-Boot 2017.09-rc1-dirty (Aug 02 2017 - 12:02:26 +0200) CPU: Freescale i.MX6ULL rev1.0 696 MHz (running at 396 MHz) instead of U-Boot 2017.09-rc1-dirty (Aug 02 2017 - 11:47:51 +0200) CPU: Freescale i.MX6ULL rev1.0 69 MHz (running at 396 MHz) Signed-off-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> --- arch/arm/mach-imx/mx6/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index af31673..7607456 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -130,7 +130,7 @@ u32 get_cpu_speed_grade_hz(void) if (val == OCOTP_CFG3_SPEED_528MHZ) return 52800; else if (val == OCOTP_CFG3_SPEED_696MHZ) - return 6960; + return 69600; else return 0; } -- 2.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: dts: imx: add aliases for usbotg nodes
Hi, On 05/18/2017 12:13 PM, Stefano Babic wrote: > On 18/05/2017 10:53, Stefano Babic wrote: >> On 24/04/2017 23:20, Alexey Ignatov wrote: >>> Aliases must be present for USB gadget with DM_USB. Without this, >>> usb_setup_ehci_gadget() fails because it can't find required devices >>> in UCLASS_USB. >>> >>> Signed-off-by: Alexey Ignatov <lexsz...@gmail.com> >>> --- >> >> >> Applied to u-boot-imx, thanks ! >> > > Sorry, I cannot. This patch is breaking several boards with "Reference > to non-existent node or label "usbotg1"" when DTS is compiled: > > opos6uldev > mx6sllevk_plugin > mx6slevk_spinor > imx6qdl_icore_rqs_mmc > ... > It looks like my comment has been missed. The imx6ul.dtsi file already has usbotg{0,1} aliases. Regards, > > Can you check this, please ? > > Best regards, > Stefano Babic > > -- Sébastien Szymanski Software Engineer, Armadeus Systems sebastien.szyman...@armadeus.com Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: dts: imx: add aliases for usbotg nodes
Hi, On 04/24/2017 11:20 PM, Alexey Ignatov wrote: > Aliases must be present for USB gadget with DM_USB. Without this, > usb_setup_ehci_gadget() fails because it can't find required devices > in UCLASS_USB. > > Signed-off-by: Alexey Ignatov <lexsz...@gmail.com> > --- > arch/arm/dts/imx6qdl.dtsi | 1 + > arch/arm/dts/imx6sll.dtsi | 2 ++ > arch/arm/dts/imx6sx.dtsi | 2 ++ > arch/arm/dts/imx6ul.dtsi | 2 ++ ... > > cpus { > diff --git a/arch/arm/dts/imx6ul.dtsi b/arch/arm/dts/imx6ul.dtsi > index c5c05fdccc..0b27ba85a0 100644 > --- a/arch/arm/dts/imx6ul.dtsi > +++ b/arch/arm/dts/imx6ul.dtsi > @@ -45,6 +45,8 @@ > spi3 = > usbphy0 = > usbphy1 = > + usb0 = > + usb1 = > }; > > cpus { The imx6ul.dtsi file already has usbotg{0,1} aliases. http://git.denx.de/?p=u-boot.git;a=commit;h=b3cab814232d3b5e165c09ffad4af5b71bde15f3 Regards, -- Sébastien Szymanski Software Engineer, Armadeus Systems sebastien.szyman...@armadeus.com Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/2] arm: i.MX6UL: add Armadeus Systems OPOS6UL SoM and OPOS6ULDev carrier board
OPOS6UL is an i.MX6UL based SoM with 256MB RAM, 4GB eMMC and an ethernet phy. OPOS6ULDev is carrier board for the OPOS6UL. U-Boot SPL 2017.03-rc3-2-g5085c26 (Mar 07 2017 - 09:48:09) Trying to boot from MMC1 U-Boot 2017.03-rc3-2-g5085c26 (Mar 07 2017 - 09:48:09 +0100) CPU: Freescale i.MX6UL rev1.0 528 MHz (running at 396 MHz) CPU: Industrial temperature grade (-40C to 105C) at 40C Reset cause: POR Model: Armadeus Systems OPOS6UL SoM on OPOS6ULDev board DRAM: 256 MiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 Video: 800x480x18 In:serial Out: serial Err: serial Net: FEC [PRIME] Hit any key to stop autoboot: 0 Signed-off-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> --- arch/arm/cpu/armv7/mx6/Kconfig | 15 ++ arch/arm/cpu/armv7/mx6/Makefile | 1 + arch/arm/cpu/armv7/mx6/opos6ul.c| 302 +++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/imx6ul-opos6ul.dtsi| 192 +++ arch/arm/dts/imx6ul-opos6uldev.dts | 412 arch/arm/include/asm/arch-mx6/opos6ul.h | 16 ++ board/armadeus/opos6uldev/Kconfig | 15 ++ board/armadeus/opos6uldev/MAINTAINERS | 6 + board/armadeus/opos6uldev/Makefile | 6 + board/armadeus/opos6uldev/board.c | 125 ++ configs/opos6uldev_defconfig| 85 +++ include/configs/opos6uldev.h| 219 + 13 files changed, 1396 insertions(+), 1 deletion(-) create mode 100644 arch/arm/cpu/armv7/mx6/opos6ul.c create mode 100644 arch/arm/dts/imx6ul-opos6ul.dtsi create mode 100644 arch/arm/dts/imx6ul-opos6uldev.dts create mode 100644 arch/arm/include/asm/arch-mx6/opos6ul.h create mode 100644 board/armadeus/opos6uldev/Kconfig create mode 100644 board/armadeus/opos6uldev/MAINTAINERS create mode 100644 board/armadeus/opos6uldev/Makefile create mode 100644 board/armadeus/opos6uldev/board.c create mode 100644 configs/opos6uldev_defconfig create mode 100644 include/configs/opos6uldev.h diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig index 19cc1f6..f31f612 100644 --- a/arch/arm/cpu/armv7/mx6/Kconfig +++ b/arch/arm/cpu/armv7/mx6/Kconfig @@ -42,6 +42,16 @@ config MX6UL_LITESOM select DM_THERMAL select SUPPORT_SPL +config MX6UL_OPOS6UL + bool + select MX6UL + select BOARD_LATE_INIT + select DM + select DM_GPIO + select DM_MMC + select DM_THERMAL + select SUPPORT_SPL + config MX6ULL bool select MX6UL @@ -248,6 +258,10 @@ config TARGET_MX6ULL_14X14_EVK config TARGET_NITROGEN6X bool "nitrogen6x" +config TARGET_OPOS6ULDEV + bool "Armadeus OPOS6ULDev board" + select MX6UL_OPOS6UL + config TARGET_OT1200 bool "Bachmann OT1200" select SUPPORT_SPL @@ -346,6 +360,7 @@ config SYS_SOC source "board/ge/bx50v3/Kconfig" source "board/advantech/dms-ba16/Kconfig" source "board/aristainetos/Kconfig" +source "board/armadeus/opos6uldev/Kconfig" source "board/bachmann/ot1200/Kconfig" source "board/barco/platinum/Kconfig" source "board/barco/titanium/Kconfig" diff --git a/arch/arm/cpu/armv7/mx6/Makefile b/arch/arm/cpu/armv7/mx6/Makefile index 024f703..c183eb4 100644 --- a/arch/arm/cpu/armv7/mx6/Makefile +++ b/arch/arm/cpu/armv7/mx6/Makefile @@ -11,3 +11,4 @@ obj-y := soc.o clock.o obj-$(CONFIG_SPL_BUILD) += ddr.o obj-$(CONFIG_MP) += mp.o obj-$(CONFIG_MX6UL_LITESOM) += litesom.o +obj-$(CONFIG_MX6UL_OPOS6UL) += opos6ul.o diff --git a/arch/arm/cpu/armv7/mx6/opos6ul.c b/arch/arm/cpu/armv7/mx6/opos6ul.c new file mode 100644 index 000..ea2f0ec --- /dev/null +++ b/arch/arm/cpu/armv7/mx6/opos6ul.c @@ -0,0 +1,302 @@ +/* + * Copyright (C) 2017 Armadeus Systems + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +#ifdef CONFIG_FEC_MXC +#include + +#define MDIO_PAD_CTRL ( \ + PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm \ +) + +#define ENET_PAD_CTRL_PU ( \ + PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm \ +) + +#define ENET_PAD_CTRL_PD ( \ + PAD_CTL_HYS | PAD_CTL_PUS_100K_DOWN | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm \ +) + +#define ENET_CLK_PAD_CTRL ( \ + PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_LOW | \ + PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST \ +) + +static iomux_v3_cfg_t const fec1_pads[] = { + MX6_PAD_GPIO1_IO06__ENET1_MDIO| MUX_PAD_CTRL(MDIO_PAD_CTRL), + MX6_PAD_GPIO1_IO07__ENET1_MDC | MUX_PAD_CTRL(MDIO_PAD_CTRL), + MX6_PAD_ENET1_RX_ER__ENET1_RX_ER | MUX
[U-Boot] [PATCH 1/2] dm: imx: serial: add i.MX6UL support
Signed-off-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> --- drivers/serial/serial_mxc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c index 1cfcbf2..64126e2 100644 --- a/drivers/serial/serial_mxc.c +++ b/drivers/serial/serial_mxc.c @@ -365,6 +365,7 @@ static int mxc_serial_ofdata_to_platdata(struct udevice *dev) } static const struct udevice_id mxc_serial_ids[] = { + { .compatible = "fsl,imx6ul-uart" }, { .compatible = "fsl,imx7d-uart" }, { } }; -- 2.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 00/15] i.MX6: Engicam i.CoreM6/Is.IoT eMMC boot support
On 02/27/2017 03:38 PM, Jagan Teki wrote: > On Monday 27 February 2017 07:58 PM, Sébastien Szymanski wrote: >> Hello, >> >> On 02/26/2017 12:54 PM, Stefano Babic wrote: >>> On 24/02/2017 11:15, Jagan Teki wrote: >>>> From: Jagan Teki <ja...@amarulasolutions.com> >>>> >>>> Changes for v3: >>>> - Rebase on master >>>> - Fix checkpatch.pl Warnings >>>> - Add IMX6_BMODE_UART macro for uart bootmode >>>> - Remove value assignment in enum, since all enum list is order >>>> >>>> Changes for v3: >>>> - Update IMX6_BMODE_* shift macros with real number instead of bitops >>>> - %s/IMX6_BMODE_SERIAL/IMX6_BMODE_SERIAL_ROM >>>> - Assign enums with numbers so-that it can easy to see same in RM >>>> - Update board MAINTAINERS file with imx6ul-isiot-emmc.dts file >>>> >>>> Changes for v2: >>>> - Rebase on master >>>> - Add Is.IoT eMMC boot patches >>>> - Add few mmc env patches on board >>>> >>>> Jagan Teki (15): >>>> imx6: Add imx6_src_get_boot_mode >>>> imx: spl: Update NAND bootmode detection bit >>>> imx: Use IMX6_BMODE_* macros instead of numericals >>>> imx6: Add src_base structure define macro >>>> imx6: isiotmx6ul: Update SPL board boot order for eMMC >>>> i.MX6UL: isiot: Add eMMC boot support >>>> i.MX6UL: isiot: Add modeboot env via board_late_init >>>> i.MX6UL: isiot: Add mmc_late_init >>>> i.MX6UL: isiot: Switch the mmc env based on devno >>>> arm: dts: imx6qdl-icore-rqs: Add eMMC node >>>> imx6: icorem6_rqs: Update SPL board boot order for eMMC >>>> imx6: icorem6_rqs: Add eMMC boot support >>>> i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init >>>> i.MX6Q: icorem6_rqs: Add mmc_late_init >>>> i.MX6Q: isiot: Switch the mmc env based on devno >>>> >>>> arch/arm/dts/Makefile | 1 + >>>> arch/arm/dts/imx6qdl-icore-rqs.dtsi | 22 ++ >>>> arch/arm/dts/imx6ul-isiot-emmc.dts | 77 >>>> + >>>> arch/arm/imx-common/init.c | 10 +++ >>>> arch/arm/imx-common/spl.c | 49 -- >>>> arch/arm/include/asm/arch-mx6/imx-regs.h| 2 + >>>> arch/arm/include/asm/imx-common/sys_proto.h | 47 + >>>> board/engicam/icorem6_rqs/icorem6_rqs.c | 96 >>>> +- >>>> board/engicam/isiotmx6ul/MAINTAINERS| 2 + >>>> board/engicam/isiotmx6ul/isiotmx6ul.c | 101 >>>> +++- >>>> configs/imx6dl_icore_rqs_mmc_defconfig | 1 + >>>> configs/imx6q_icore_rqs_mmc_defconfig | 1 + >>>> configs/imx6ul_isiot_emmc_defconfig | 40 +++ >>>> configs/imx6ul_isiot_mmc_defconfig | 1 + >>>> configs/imx6ul_isiot_nand_defconfig | 1 + >>>> include/configs/imx6qdl_icore_rqs.h | 36 +- >>>> include/configs/imx6ul_isiot.h | 40 +-- >>>> 17 files changed, 462 insertions(+), 65 deletions(-) >>>> create mode 100644 arch/arm/dts/imx6ul-isiot-emmc.dts >>>> create mode 100644 configs/imx6ul_isiot_emmc_defconfig >>>> >>> >>> Applied to u-boot-imx, thanks ! >> >> The dts files fail to build: >> >> Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error >> FATAL ERROR: Unable to parse input tree >> scripts/Makefile.lib:322: recipe for target >> 'arch/arm/dts/imx6ul-isiot-mmc.dtb' failed >> make[2]: *** [arch/arm/dts/imx6ul-isiot-mmc.dtb] Error 1 >> make[2]: *** Waiting for unfinished jobs >> Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error >> FATAL ERROR: Unable to parse input tree >> scripts/Makefile.lib:322: recipe for target >> 'arch/arm/dts/imx6ul-isiot-emmc.dtb' failed >> make[2]: *** [arch/arm/dts/imx6ul-isiot-emmc.dtb] Error 1 >> Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error >> FATAL ERROR: Unable to parse input tree >> scripts/Makefile.lib:322: recipe for target >> 'arch/arm/dts/imx6ul-isiot-nand.dtb' failed >> make[2]: *** [arch/arm/dts/imx6ul-isiot-nand.dtb] Error 1 >> dts/Makefile:36: recipe for target 'arch-dtbs' failed >> make[1]: *** [arch-dtbs] Error 2 >> Makefile:860: recipe for target 'dts/dt.dtb' failed >> make: *** [dts/dt.dtb] Error 2 >> >> I think that's because there is '/dts-v1/;' in the imx6ul-isiot.dtsi >> file and in imx6ul-isiot-*.dts files. > > What is the dtc version used? mine with > > dtc -v > Version: DTC 1.4.2-gdaa75e8f > > No build issues. > I was using: dtc -v Version: DTC 1.4.1 With DTC.1.4.2, no build issues. Thanks ! > thanks! -- Sébastien Szymanski Software Engineer, Armadeus Systems sebastien.szyman...@armadeus.com Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 00/15] i.MX6: Engicam i.CoreM6/Is.IoT eMMC boot support
Hello, On 02/26/2017 12:54 PM, Stefano Babic wrote: > On 24/02/2017 11:15, Jagan Teki wrote: >> From: Jagan Teki <ja...@amarulasolutions.com> >> >> Changes for v3: >> - Rebase on master >> - Fix checkpatch.pl Warnings >> - Add IMX6_BMODE_UART macro for uart bootmode >> - Remove value assignment in enum, since all enum list is order >> >> Changes for v3: >> - Update IMX6_BMODE_* shift macros with real number instead of bitops >> - %s/IMX6_BMODE_SERIAL/IMX6_BMODE_SERIAL_ROM >> - Assign enums with numbers so-that it can easy to see same in RM >> - Update board MAINTAINERS file with imx6ul-isiot-emmc.dts file >> >> Changes for v2: >> - Rebase on master >> - Add Is.IoT eMMC boot patches >> - Add few mmc env patches on board >> >> Jagan Teki (15): >> imx6: Add imx6_src_get_boot_mode >> imx: spl: Update NAND bootmode detection bit >> imx: Use IMX6_BMODE_* macros instead of numericals >> imx6: Add src_base structure define macro >> imx6: isiotmx6ul: Update SPL board boot order for eMMC >> i.MX6UL: isiot: Add eMMC boot support >> i.MX6UL: isiot: Add modeboot env via board_late_init >> i.MX6UL: isiot: Add mmc_late_init >> i.MX6UL: isiot: Switch the mmc env based on devno >> arm: dts: imx6qdl-icore-rqs: Add eMMC node >> imx6: icorem6_rqs: Update SPL board boot order for eMMC >> imx6: icorem6_rqs: Add eMMC boot support >> i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init >> i.MX6Q: icorem6_rqs: Add mmc_late_init >> i.MX6Q: isiot: Switch the mmc env based on devno >> >> arch/arm/dts/Makefile | 1 + >> arch/arm/dts/imx6qdl-icore-rqs.dtsi | 22 ++ >> arch/arm/dts/imx6ul-isiot-emmc.dts | 77 + >> arch/arm/imx-common/init.c | 10 +++ >> arch/arm/imx-common/spl.c | 49 -- >> arch/arm/include/asm/arch-mx6/imx-regs.h| 2 + >> arch/arm/include/asm/imx-common/sys_proto.h | 47 + >> board/engicam/icorem6_rqs/icorem6_rqs.c | 96 +- >> board/engicam/isiotmx6ul/MAINTAINERS| 2 + >> board/engicam/isiotmx6ul/isiotmx6ul.c | 101 >> +++- >> configs/imx6dl_icore_rqs_mmc_defconfig | 1 + >> configs/imx6q_icore_rqs_mmc_defconfig | 1 + >> configs/imx6ul_isiot_emmc_defconfig | 40 +++ >> configs/imx6ul_isiot_mmc_defconfig | 1 + >> configs/imx6ul_isiot_nand_defconfig | 1 + >> include/configs/imx6qdl_icore_rqs.h | 36 +- >> include/configs/imx6ul_isiot.h | 40 +-- >> 17 files changed, 462 insertions(+), 65 deletions(-) >> create mode 100644 arch/arm/dts/imx6ul-isiot-emmc.dts >> create mode 100644 configs/imx6ul_isiot_emmc_defconfig >> > > Applied to u-boot-imx, thanks ! The dts files fail to build: Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error FATAL ERROR: Unable to parse input tree scripts/Makefile.lib:322: recipe for target 'arch/arm/dts/imx6ul-isiot-mmc.dtb' failed make[2]: *** [arch/arm/dts/imx6ul-isiot-mmc.dtb] Error 1 make[2]: *** Waiting for unfinished jobs Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error FATAL ERROR: Unable to parse input tree scripts/Makefile.lib:322: recipe for target 'arch/arm/dts/imx6ul-isiot-emmc.dtb' failed make[2]: *** [arch/arm/dts/imx6ul-isiot-emmc.dtb] Error 1 Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error FATAL ERROR: Unable to parse input tree scripts/Makefile.lib:322: recipe for target 'arch/arm/dts/imx6ul-isiot-nand.dtb' failed make[2]: *** [arch/arm/dts/imx6ul-isiot-nand.dtb] Error 1 dts/Makefile:36: recipe for target 'arch-dtbs' failed make[1]: *** [arch-dtbs] Error 2 Makefile:860: recipe for target 'dts/dt.dtb' failed make: *** [dts/dt.dtb] Error 2 I think that's because there is '/dts-v1/;' in the imx6ul-isiot.dtsi file and in imx6ul-isiot-*.dts files. With this change: diff --git a/arch/arm/dts/imx6ul-isiot.dtsi b/arch/arm/dts/imx6ul-isiot.dtsi index 346079a..9a3c35c 100644 --- a/arch/arm/dts/imx6ul-isiot.dtsi +++ b/arch/arm/dts/imx6ul-isiot.dtsi @@ -40,8 +40,6 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -/dts-v1/; - #include #include #include "imx6ul.dtsi" The compilation passes. Best regards, > > Best regards, > Stefano > -- Sébastien Szymanski Software Engineer, Armadeus Systems sebastien.szyman...@armadeus.com Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] arm: dts: imx6ul: add usbotg aliases
This is needed to make the UMS command work again as it fails with the following error: BIOS> ums 0 mmc 0 UMS: LUN 0, dev 0, hwpart 0, sector 0x0, count 0x748000 g_dnl_register: failed!, error: -19 ERROR: g_dnl_register failed at cmd/usb_mass_storage.c:179/do_usb_mass_storage() That's because usb_setup_ehci_gadget() function is looking for the usb device using the req_sed number. This change makes the usb device have a req_seq number and the UMS command work again: BIOS> ums 0 mmc 0 UMS: LUN 0, dev 0, hwpart 0, sector 0x0, count 0x748000 CTRL+C - Operation aborted Signed-off-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> --- arch/arm/dts/imx6ul.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/dts/imx6ul.dtsi b/arch/arm/dts/imx6ul.dtsi index c5c05fd..def5f8c 100644 --- a/arch/arm/dts/imx6ul.dtsi +++ b/arch/arm/dts/imx6ul.dtsi @@ -43,6 +43,8 @@ spi1 = spi2 = spi3 = + usbotg0 = + usbotg1 = usbphy0 = usbphy1 = }; -- 2.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ext4: crash when writing a file
On 01/23/2017 05:38 PM, Brüns, Stefan wrote: > On Freitag, 20. Januar 2017 18:32:49 CET Sébastien Szymanski wrote: > [...] >> Then under the sandbox I do the following: >> >> U-Boot 2017.01-2-g558e41e-dirty (Jan 20 2017 - 16:19:47 +0100) >> >> DRAM: 256 MiB >> MMC: >> Using default environment >> >> In:serial >> Out: serial >> Err: serial >> SCSI: Net: No ethernet found. >> IDE: Bus 0: not available >> >> => host bind 0 /tftproot/rootfs.raw >> >> => ls host 0:2 >>1024 . >>1024 .. >> 16384 lost+found >>1024 var >>1024 run >>1024 root >>1024 media >>1024 mnt >>1024 tmp >> 3 lib32 >>1024 usr >>1024 proc >>1024 dev >>1024 boot >>1024 sys >>3072 sbin >>3072 bin >> 11 linuxrc >>1024 etc >>1024 opt >>3072 lib >> >> => ls host 0:2 /boot >>1024 . >>1024 .. >>26909 imx6ul-opos6uldev.dtb >> 1 dtbs >> 5359984 opos6ul-linux.bin >> >> => host load hostfs - 0 /tftproot/opos6ul-linux.bin >> 5359984 bytes read in 2 ms (2.5 GiB/s) >> >> => printenv filesize >> filesize=51c970 >> >> => ext4write host 0:2 0 /boot/opos6ul-linux.bin ${filesize} >> File System is consistent >> file found, deleting >> update journal finished >> File System is consistent >> update journal finished >> Segmentation fault > > As you can repeat this under sandbox, the next step would be to run sandbox > under gdb, e.g.: > $> gdb --args sandbox -c "host bind 0 /tftproot/rootfs.raw ; host load hostfs > - 0 /tftproot/opos6ul-linux.bin ; ext4write host 0:2 0 > /boot/opos6ul-linux.bin > ${filesize}" Yes, I did this and it crashes exactly where I pointed out in my first post: (gdb) run Starting program: /home/sszy/development/armadeus-u-boot/u-boot -c host\ bind\ 0\ /tftproot/rootfs.raw\;\ host\ load\ hostfs\ -\ 0\ /tftproot/opos6ul-linux.bin\;\ ext4write\ host\ 0:2\ 0\ /boot/opos6ul-linux.bin\ \$\{filesize\} [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". U-Boot 2017.01-2-g558e41e-dirty (Jan 24 2017 - 10:44:13 +0100) DRAM: 256 MiB MMC: Using default environment In:serial Out: serial Err: serial SCSI: Net: No ethernet found. IDE: Bus 0: not available 5359984 bytes read in 2 ms (2.5 GiB/s) File System is consistent file found, deleting update journal finished File System is consistent update journal finished Program received signal SIGSEGV, Segmentation fault. free (mem=) at common/dlmalloc.c:1586 1586 if (!(inuse_bit_at_offset(next, nextsz))) /* consolidate forward */ (gdb) bt #0 free (mem=) at common/dlmalloc.c:1586 #1 0x0044e9a3 in ext4fs_deinit () at fs/ext4/ext4_write.c:722 #2 0x0044fd85 in ext4fs_write (fname=, buffer=, sizebytes=sizebytes@entry=5359984) at fs/ext4/ext4_write.c:980 #3 0x0044fe5f in ext4_write_file (filename=, buf=, offset=, len=5359984, actwrite=0x7fffd5b8) at fs/ext4/ext4_write.c:1012 #4 0x0044a41b in fs_write (filename=filename@entry=0x74887280 "/boot/opos6ul-linux.bin", addr=addr@entry=0, offset=offset@entry=0, len=len@entry=5359984, actwrite=actwrite@entry=0x7fffd5b8) at fs/fs.c:325 #5 0x0044a7a3 in do_save (cmdtp=, flag=, argc=6, argv=, fstype=) at fs/fs.c:478 Regards, > > Kind regards, > > Stefan > -- Sébastien Szymanski Software Engineer, Armadeus Systems sebastien.szyman...@armadeus.com Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ext4: crash when writing a file
Hi, sorry for the late answer. > So to restate what you are doing: > > 1. You have a partitioned MMC, where the 2nd partition starts at block > 264192/0x40800 > 2. You load a 93958144 byte (~90 MB) file via TFTP to ${loadaddr} > 3. You write this partition image to 0x40800 using "mmc write" > 4. You load another 5345128 byte (5 MB) file via TFTP to $loadaddr > 5. You try to write this file to the 2nd partition, which now is ext4 > formatted, and already contains a file of the same name, i.e. boot/opos6ul- > linux.bin That's right. > > > Actually, I can't reproduce the crash. Maybe you have corrupted part of the > memory when loading the image, e.g. overwritten part of u-boot or its heap. > > Things you can try: > a) reboot the system after loading/writing the partion image. > b) checking the fs contents after the reboot, e.g "ls mmc 0:2 /boot" No issue here. > c) overwriting opos6ul-linux.bin with just a single byte, e.g "ext4write mmc > 0:2 0x0 /boot/opos6ul-linux.bin 1" It doesn't crash here. On the u-boot sandbox I can write up to 256Ko. When I try 512Ko it crashes. > d) transferring back the partition image to your host and running fschk on it The partition is fine when transferred back to my host. > > You may also able to reproduce this using the u-boot sandbox. I'm able to reproduce it using the u-boot sandbox. I've created a disk image as explained in board/sandbox/README.sandbox "Block Device Emulation": Command (m for help): p Disk /dev/loop0: 3 GiB, 3221225472 bytes, 6291456 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xd8192f55 Device Boot Start End Sectors Size Id Type /dev/loop0p12048 264191 262144 128M 83 Linux /dev/loop0p2 264192 4458495 41943042G 83 Linux Then I use dd to emulate the mmc write command since there is no host write command: dd if=/tftproot/opos6ul-rootfs.ext4 of=/dev/loop0p2 The partition seems to be fine according to fsck.ext4: e2fsck 1.43.3 (04-Sep-2016) "ROOTFS": clean, 3830/4312 files, 73797/88390 blocks I can mount it and see its content. Then under the sandbox I do the following: U-Boot 2017.01-2-g558e41e-dirty (Jan 20 2017 - 16:19:47 +0100) DRAM: 256 MiB MMC: Using default environment In:serial Out: serial Err: serial SCSI: Net: No ethernet found. IDE: Bus 0: not available => host bind 0 /tftproot/rootfs.raw => ls host 0:2 1024 . 1024 .. 16384 lost+found 1024 var 1024 run 1024 root 1024 media 1024 mnt 1024 tmp 3 lib32 1024 usr 1024 proc 1024 dev 1024 boot 1024 sys 3072 sbin 3072 bin 11 linuxrc 1024 etc 1024 opt 3072 lib => ls host 0:2 /boot 1024 . 1024 .. 26909 imx6ul-opos6uldev.dtb 1 dtbs 5359984 opos6ul-linux.bin => host load hostfs - 0 /tftproot/opos6ul-linux.bin 5359984 bytes read in 2 ms (2.5 GiB/s) => printenv filesize filesize=51c970 => ext4write host 0:2 0 /boot/opos6ul-linux.bin ${filesize} File System is consistent file found, deleting update journal finished File System is consistent update journal finished Segmentation fault Regards, > > Kind regards, > > Stefan Sébastien Szymanski ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/1] cmd/host: add missing \n in help text
Signed-off-by: Sébastien Szymanski <sebastien.szyman...@armadeus.com> --- cmd/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/host.c b/cmd/host.c index 515621b..080b7cf 100644 --- a/cmd/host.c +++ b/cmd/host.c @@ -181,7 +181,7 @@ U_BOOT_CMD( "host ls hostfs - - list files on host\n" "host save hostfs -[] - " "save a file to host\n" - "host size hostfs - - determine size of file on host" + "host size hostfs - - determine size of file on host\n" "host bind [] - bind \"host\" device to file\n" "host info []- show device binding & info\n" "host dev [] - Set or retrieve the current host device\n" -- 2.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ext4: crash when writing a file
On 11/29/2016 03:38 PM, Brüns, Stefan wrote: > On Dienstag, 29. November 2016 14:10:54 CET Sébastien Szymanski wrote: >> >>> Btw, which u-boot version are you using? >> >> I first noticed the issue on U-Boot 2016.05 so I rebase on master from >> http://git.denx.de/u-boot.git >> >> Regards, > > That still doesn't make clear on which version you see this issue. 2016.05? > Master? Which date/tag/hash? > > U-Boot 2016.11 has received a huge number of fixes, and current master has > some more. Sorry for being unclear. I was working with U-Boot 2016.05 (commit aeaec0e682f45b9e0c62c522fafea353931f73ed) when I saw this issue. Then, I rebased on current master (commit e94793c844a40606252f2e3f6428063e057b3fd2) and I still see this issue. I hope it's clearer now. Regards, > > Regards, > > Stefan > Sébastien Szymanski ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ext4: crash when writing a file
On 11/29/2016 01:14 PM, Brüns, Stefan wrote: > On Dienstag, 29. November 2016 10:50:45 CET you wrote: >> Hello, >> >> I am working on a i.MX6UL based board with a 4GB eMMC partitioned as >> following: >> >> Device Boot Start End Sectors Size Id Type >> /dev/sdb1 2048 264191 262144 128M 83 Linux >> /dev/sdb2264192 4458495 41943042G 83 Linux >> /dev/sdb3 4458496 7634943 3176448 1.5G 83 Linux >> >> On the 2nd partition, I write this ext4 filesystem file generated by >> Buildroot: >> Filesystem volume name: "ROOTFS" >> Last mounted on: >> Filesystem UUID: b9833a36-e89d-429a-b120-c3b00bcb7785 >> Filesystem magic number: 0xEF53 >> Filesystem revision #:1 (dynamic) >> Filesystem features: has_journal dir_index filetype extent >> sparse_super uninit_bg >> Filesystem flags: signed_directory_hash >> Default mount options:(none) >> Filesystem state: clean >> Errors behavior: Unknown (continue) >> Filesystem OS type: Linux >> Inode count: 3456 >> Block count: 91756 > 91756 blocks ... > >> Reserved block count: 4587 >> Free blocks: 13458 >> Free inodes: 488 >> First block: 1 >> Block size: 1024 > 1k each -> 91 MByte filesystem Yes. Is there something wrong here ? > >> Fragment size:1024 >> Blocks per group: 7648 >> Fragments per group: 7648 >> Inodes per group: 288 >> Inode blocks per group: 36 >> Last mount time: n/a >> Last write time: Tue Nov 29 09:44:52 2016 >> Mount count: 0 >> Maximum mount count: -1 >> Last checked: Tue Nov 29 09:44:52 2016 >> Check interval: 0 () >> Reserved blocks uid: 0 (user root) >> Reserved blocks gid: 0 (group root) >> First inode: 11 >> Inode size: 128 >> Journal inode:8 >> Default directory hash: half_md4 >> Directory Hash Seed: a583a07f-6b59-442d-8e08-9be305f78d17 >> Journal backup: inode blocks >> >> This filesystem is written with the following commands: >> >> BIOS> setexpr nbblocks ${filesize} / 0x200 >> BIOS> setexpr nbblocks ${nbblocks} + 1 >> BIOS> mmc write ${loadaddr} 0x40800 ${nbblocks} >> MMC write: dev # 0, block # 264192, count 183513 ... 183513 blocks >> written: OK >> >> I can boot Linux with it without any issues, however if I try to write a >> file in it I get the following crash: >> >> BIOS> ext4write mmc 0:2 ${loadaddr} /boot/${kernelimg} ${filesize} > > What are you trying to achieve here? What is the value of $filesize? I try to update the kernel image which is /boot/opos6ul-linux.bin. I download it from a tftp server so $filesize is the size of the kernel image BIOS> printenv filesize filesize=518f68 > > Btw, which u-boot version are you using? I first noticed the issue on U-Boot 2016.05 so I rebase on master from http://git.denx.de/u-boot.git Regards, > > Regards, > > Stefan > -- Sébastien Szymanski Software Engineer, Armadeus Systems sebastien.szyman...@armadeus.com Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] ext4: crash when writing a file
Hello, I am working on a i.MX6UL based board with a 4GB eMMC partitioned as following: Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 264191 262144 128M 83 Linux /dev/sdb2264192 4458495 41943042G 83 Linux /dev/sdb3 4458496 7634943 3176448 1.5G 83 Linux On the 2nd partition, I write this ext4 filesystem file generated by Buildroot: Filesystem volume name: "ROOTFS" Last mounted on: Filesystem UUID: b9833a36-e89d-429a-b120-c3b00bcb7785 Filesystem magic number: 0xEF53 Filesystem revision #:1 (dynamic) Filesystem features: has_journal dir_index filetype extent sparse_super uninit_bg Filesystem flags: signed_directory_hash Default mount options:(none) Filesystem state: clean Errors behavior: Unknown (continue) Filesystem OS type: Linux Inode count: 3456 Block count: 91756 Reserved block count: 4587 Free blocks: 13458 Free inodes: 488 First block: 1 Block size: 1024 Fragment size:1024 Blocks per group: 7648 Fragments per group: 7648 Inodes per group: 288 Inode blocks per group: 36 Last mount time: n/a Last write time: Tue Nov 29 09:44:52 2016 Mount count: 0 Maximum mount count: -1 Last checked: Tue Nov 29 09:44:52 2016 Check interval: 0 () Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 128 Journal inode:8 Default directory hash: half_md4 Directory Hash Seed: a583a07f-6b59-442d-8e08-9be305f78d17 Journal backup: inode blocks This filesystem is written with the following commands: BIOS> setexpr nbblocks ${filesize} / 0x200 BIOS> setexpr nbblocks ${nbblocks} + 1 BIOS> mmc write ${loadaddr} 0x40800 ${nbblocks} MMC write: dev # 0, block # 264192, count 183513 ... 183513 blocks written: OK I can boot Linux with it without any issues, however if I try to write a file in it I get the following crash: BIOS> ext4write mmc 0:2 ${loadaddr} /boot/${kernelimg} ${filesize} File System is consistent file found, deleting update journal finished File System is consistent update journal finished data abort pc : [<8ff783ac>] lr : [<8ff86c95>] reloc pc : [<8780e3ac>]lr : [<8781cc95>] sp : 8ef696b8 ip : fp : 8ffbc6d8 r10: 0200 r9 : 8ef69ee8 r8 : 8ffbc744 r7 : 8ef9f600 r6 : 8ef999b6 r5 : 0003 r4 : 8ffa35fc r3 : 8ef999b8 r2 : 0001 r1 : fffe r0 : 8ef999c0 Flags: NzCv IRQs off FIQs off Mode SVC_32 Resetting CPU ... resetting ... I have investigated a bit and I found that the crash is in the ext4fs_deinit() function provoked by the free() call at line 722 (fs/ext4/ext4_write.c) and the ext4fs_deinit() is called in ext4fs_write() at line 980. If I resize the filesystem under Linux, I don't get the crash but the following error: ext4fs_devread read outside partition 4294967294 error in File System init ** Error ext4fs_write() ** ** Unable to write file /boot/opos6ul-linux.bin ** Any idea ? Regards, -- Sébastien Szymanski Software Engineer, Armadeus Systems sebastien.szyman...@armadeus.com Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot