Re: [U-Boot] [PATCH v2 4/8] x86: Tidy up selection of building the EFI stub
Hi Alex, On Thu, Sep 29, 2016 at 1:08 PM, Alexander Grafwrote: > > > Am 29.09.2016 um 05:37 schrieb Bin Meng : > > Hi Simon, > > On Wed, Sep 28, 2016 at 10:43 PM, Simon Glass wrote: > > Hi Bin, > > > On 27 September 2016 at 19:23, Bin Meng wrote: > > Hi Simon, > > > On Wed, Sep 28, 2016 at 1:55 AM, Simon Glass wrote: > > Hi Bin, > > > On 26 September 2016 at 20:44, Bin Meng wrote: > > Hi Simon, > > > On Tue, Sep 27, 2016 at 8:35 AM, Simon Glass wrote: > > Hi Bin, > > > On 26 September 2016 at 02:50, Bin Meng wrote: > > Hi Simon, > > > On Mon, Sep 26, 2016 at 5:27 AM, Simon Glass wrote: > > At present we use a CONFIG option in efi.h to determine whether we are > > building the EFI stub or not. This means that the same header cannot be > > used for EFI_LOADER support. The CONFIG option will be enabled for the > > whole build, even when not building the stub. > > > Use a different define instead, set up just for the files that make up the > > stub. > > > Signed-off-by: Simon Glass > > --- > > > Changes in v2: > > - Add new patch to tidy up selection of building the EFI stub > > > include/efi.h| 7 +-- > > lib/efi/Makefile | 4 ++-- > > 2 files changed, 7 insertions(+), 4 deletions(-) > > > diff --git a/include/efi.h b/include/efi.h > > index d07187c..3d58780 100644 > > --- a/include/efi.h > > +++ b/include/efi.h > > @@ -30,8 +30,11 @@ struct efi_device_path; > > > #define EFI_BITS_PER_LONG BITS_PER_LONG > > > -/* With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64 */ > > -#ifdef CONFIG_EFI_STUB_64BIT > > +/* > > + * With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64. EFI_STUB is set > > + * in lib/efi/Makefile, when building the stub. > > + */ > > +#if defined(CONFIG_EFI_STUB_64BIT) && defined(EFI_STUB) > > > I don't understand why this is needed? > > > If building the 64-bit EFI stub, we need to use 64-bit ints for the > > stub, but 32-bits for the rest of U-Boot. So this header gets used > > both ways. > > > > For 32-bit EFI stub or U-Boot itself, EFI_BITS_PER_LONG is defined as > > BITS_PER_LONG which is 32. > > > Yes that's right. But in the case of the stub, it can be different > > from U-Boot itself. This case takes care of that. > > > > Sorry but I still don't get it. What's broken without this change? > > > When building U-Boot with CONFIG_EFI_STUB_64BIT enabled, at present > > EFI_BITS_PER_LONG will be 64. > > > This is fine for building the stub. > > > > Yes > > But for building U-Boot, we still want it to be 32. > > > > Yes > > At present the code overrides EFI_BITS_PER_LONG, setting it to 64 if > > CONFIG_EFI_STUB_64BIT is enabled. > > > This means that EFI_LOADER support does not build properly, since it > > uses 64 instead of 32. > > > > So you want CONFIG_EFI_STUB_64BIT and CONFIG_EFI_LOADER both be > defined? I don't think it is a valid configuration. > > > Why not? > So the board has a 64-bit UEFI BIOS, and with CONFIG_EFI_STUB_64BIT we build U-Boot as a 64-bit UEFI payload and let the UEFI BIOS boot the payload (U-Boot), then with CONFIG_EFI_LOADER we are trying to provide the UEFI runtime environment within the U-Boot. What value are we looking for? This is asking for troubles. Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/8] x86: Tidy up selection of building the EFI stub
> Am 29.09.2016 um 05:37 schrieb Bin Meng: > > Hi Simon, > >> On Wed, Sep 28, 2016 at 10:43 PM, Simon Glass wrote: >> Hi Bin, >> >>> On 27 September 2016 at 19:23, Bin Meng wrote: >>> Hi Simon, >>> On Wed, Sep 28, 2016 at 1:55 AM, Simon Glass wrote: Hi Bin, > On 26 September 2016 at 20:44, Bin Meng wrote: > Hi Simon, > >> On Tue, Sep 27, 2016 at 8:35 AM, Simon Glass wrote: >> Hi Bin, >> >>> On 26 September 2016 at 02:50, Bin Meng wrote: >>> Hi Simon, >>> On Mon, Sep 26, 2016 at 5:27 AM, Simon Glass wrote: At present we use a CONFIG option in efi.h to determine whether we are building the EFI stub or not. This means that the same header cannot be used for EFI_LOADER support. The CONFIG option will be enabled for the whole build, even when not building the stub. Use a different define instead, set up just for the files that make up the stub. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to tidy up selection of building the EFI stub include/efi.h| 7 +-- lib/efi/Makefile | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/efi.h b/include/efi.h index d07187c..3d58780 100644 --- a/include/efi.h +++ b/include/efi.h @@ -30,8 +30,11 @@ struct efi_device_path; #define EFI_BITS_PER_LONG BITS_PER_LONG -/* With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64 */ -#ifdef CONFIG_EFI_STUB_64BIT +/* + * With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64. EFI_STUB is set + * in lib/efi/Makefile, when building the stub. + */ +#if defined(CONFIG_EFI_STUB_64BIT) && defined(EFI_STUB) >>> >>> I don't understand why this is needed? >> >> If building the 64-bit EFI stub, we need to use 64-bit ints for the >> stub, but 32-bits for the rest of U-Boot. So this header gets used >> both ways. >> > > For 32-bit EFI stub or U-Boot itself, EFI_BITS_PER_LONG is defined as > BITS_PER_LONG which is 32. Yes that's right. But in the case of the stub, it can be different from U-Boot itself. This case takes care of that. >>> >>> Sorry but I still don't get it. What's broken without this change? >> >> When building U-Boot with CONFIG_EFI_STUB_64BIT enabled, at present >> EFI_BITS_PER_LONG will be 64. >> >> This is fine for building the stub. >> > > Yes > >> But for building U-Boot, we still want it to be 32. >> > > Yes > >> At present the code overrides EFI_BITS_PER_LONG, setting it to 64 if >> CONFIG_EFI_STUB_64BIT is enabled. >> >> This means that EFI_LOADER support does not build properly, since it >> uses 64 instead of 32. >> > > So you want CONFIG_EFI_STUB_64BIT and CONFIG_EFI_LOADER both be > defined? I don't think it is a valid configuration. Why not? Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/8] x86: Tidy up selection of building the EFI stub
Hi Simon, On Wed, Sep 28, 2016 at 10:43 PM, Simon Glasswrote: > Hi Bin, > > On 27 September 2016 at 19:23, Bin Meng wrote: >> Hi Simon, >> >> On Wed, Sep 28, 2016 at 1:55 AM, Simon Glass wrote: >>> Hi Bin, >>> >>> On 26 September 2016 at 20:44, Bin Meng wrote: Hi Simon, On Tue, Sep 27, 2016 at 8:35 AM, Simon Glass wrote: > Hi Bin, > > On 26 September 2016 at 02:50, Bin Meng wrote: >> Hi Simon, >> >> On Mon, Sep 26, 2016 at 5:27 AM, Simon Glass wrote: >>> At present we use a CONFIG option in efi.h to determine whether we are >>> building the EFI stub or not. This means that the same header cannot be >>> used for EFI_LOADER support. The CONFIG option will be enabled for the >>> whole build, even when not building the stub. >>> >>> Use a different define instead, set up just for the files that make up >>> the >>> stub. >>> >>> Signed-off-by: Simon Glass >>> --- >>> >>> Changes in v2: >>> - Add new patch to tidy up selection of building the EFI stub >>> >>> include/efi.h| 7 +-- >>> lib/efi/Makefile | 4 ++-- >>> 2 files changed, 7 insertions(+), 4 deletions(-) >>> >>> diff --git a/include/efi.h b/include/efi.h >>> index d07187c..3d58780 100644 >>> --- a/include/efi.h >>> +++ b/include/efi.h >>> @@ -30,8 +30,11 @@ struct efi_device_path; >>> >>> #define EFI_BITS_PER_LONG BITS_PER_LONG >>> >>> -/* With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64 */ >>> -#ifdef CONFIG_EFI_STUB_64BIT >>> +/* >>> + * With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64. EFI_STUB is >>> set >>> + * in lib/efi/Makefile, when building the stub. >>> + */ >>> +#if defined(CONFIG_EFI_STUB_64BIT) && defined(EFI_STUB) >> >> I don't understand why this is needed? > > If building the 64-bit EFI stub, we need to use 64-bit ints for the > stub, but 32-bits for the rest of U-Boot. So this header gets used > both ways. > For 32-bit EFI stub or U-Boot itself, EFI_BITS_PER_LONG is defined as BITS_PER_LONG which is 32. >>> >>> Yes that's right. But in the case of the stub, it can be different >>> from U-Boot itself. This case takes care of that. >>> >> >> Sorry but I still don't get it. What's broken without this change? > > When building U-Boot with CONFIG_EFI_STUB_64BIT enabled, at present > EFI_BITS_PER_LONG will be 64. > > This is fine for building the stub. > Yes > But for building U-Boot, we still want it to be 32. > Yes > At present the code overrides EFI_BITS_PER_LONG, setting it to 64 if > CONFIG_EFI_STUB_64BIT is enabled. > > This means that EFI_LOADER support does not build properly, since it > uses 64 instead of 32. > So you want CONFIG_EFI_STUB_64BIT and CONFIG_EFI_LOADER both be defined? I don't think it is a valid configuration. > You can try building without this commit to see the result. > Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC] Rearrange CONFIG_* macros
On 09/27/2016 10:55 AM, Simon Glass wrote: > Hi York, > > On 27 September 2016 at 11:39, york sunwrote: >> Guys, >> >> I want to discuss to rearrange the current CONFIG_* macros used by >> Freescale Layerscape SoCs. We have been encouraged to use CONFIG_SYS_* >> macros to define hardware setting, and other CONFIG_* macros for user >> setting. Clearly this has changed. Kconfig options are used for most >> user settings from now on. I am OK with it. But for existing >> CONFIG_SYS_* macros, we need a plan to either move them out of CONFIG_* >> name space, or move some to Kconfig, if that makes sense. Since most our >> CONFIG_SYS_* macros are cross platforms (including armv7 and armv8), if >> using Kconfig option, do we add another mach-fsl folder to host the >> Kconfig, or somewhere else? We also have macros cross ARM and PowerPC. >> So we either move them out of arch/, or duplicate them for both arch. >> >> If we move them to another name space, for example SYS_FSL_*, do we want >> to move them out of config.h? >> >> Any suggestion/comment? > > I wonder if some of these (the ones that represent actual values > rather than enabling functions) can move to device tree, or tables? > While I try to move some options to Kconfig, I have an issue of duplicated names. For example, the MAX_CPUS is used in arch/x86/Kconfig. I know I can put another config with the same name, for example arch/arm/cpu/armv8/fsl-layerscape/Kconfig. The funny thing is when I search for this config option under menuconfig, it shows the location of x86, but showing defined in arch/arm/cpu/armv8/fsl-layerscape/Kconfig. Same thing happens when I try to move an option which is used by both PowerPC and ARM. This is not related to a common driver so I cannot put the option into a driver Kconfig (for example CONFIG_SYS_HAS_SERDES). Is there a solution for this? York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] fsl-ifc-nand : Corrected the programming of chip select
On 09/26/2016 09:48 PM, Matt Weber wrote: > Corrected the chip selection in IFC_NAND_CSEL register. Due to this > issue in multi-chip nand use-case, IFC was always pointing to the last > probed chip even though the user select another device through "nand > device " command. > > Also, remove the usage of ifc_ctrl->cs_nand from driver as chipselect > is a property of the chip not the controller. > > Signed-off-by: Matthew Weber> Signed-off-by: Ronak Desai > > -- > v1 -> v2 > [ Scott W > - Update fsl_ifc_sram_init() with correct csel and >cs_nand removed. > > v2 -> v3 > [ Prabhakar > - Remove braces around if in fsl_ifc_chip_init() > --- > drivers/mtd/nand/fsl_ifc_nand.c | 16 +++- > 1 file changed, 7 insertions(+), 9 deletions(-) > > diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c > index bc6bdc9..990b698 100644 > --- a/drivers/mtd/nand/fsl_ifc_nand.c > +++ b/drivers/mtd/nand/fsl_ifc_nand.c > @@ -48,7 +48,7 @@ struct fsl_ifc_ctrl { > /* device info */ > struct fsl_ifc regs; > void __iomem *addr; /* Address of assigned IFC buffer*/ > - unsigned int cs_nand;/* On which chipsel NAND is connected*/ > + unsigned int cs_nand;/* On which chipsel NAND is connected*/ > unsigned int page; /* Last page written to / read from */ > unsigned int read_bytes; /* Number of bytes read during command */ > unsigned int column; /* Saved column from SEQIN */ Changelog says you removed cs_nand, but this hunk just changes whitespace. > @@ -798,7 +798,7 @@ static void fsl_ifc_select_chip(struct mtd_info *mtd, int > chip) > { > } > > -static int fsl_ifc_sram_init(uint32_t ver) > +static int fsl_ifc_sram_init(uint32_t ver, struct fsl_ifc_mtd *priv) Could you put priv first, as is usually done with context structs? I notice Linux doesn't pass "ver" at all to this function, and only implements the ver == 1.1.0 method. Prabhakar, any plans to update Linux for that? -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 0/3] Modifies the erratum A006261 according to endianness
On 08/16/2016 11:18 PM, Sriram Dash wrote: > Modifies erratum A006261 implementation due to the fact that P3041, > P5020, and P5040 are all big endian for the USB PHY registers, but > they were specified little endian. > Enables the Phy init settings for P1010 Soc. > Also, applies the erratum for P2041 rev 2.0, P2040 rev 2.0, P5040 rev 2.0, 2.1 > and removes the erratum for T4160, T4080, T1040, T1042, T1020, T1022, T2080, > T2081. > > Sriram Dash (3): > mpc85xx: powerpc: usb: Modified the erratum A006261 according to > endianness > mpc85xx: powerpc: usb: Enable Usb phy initialisation settings for > P1010 > mpc85xx: powerpc: usb: Update the list of Socs afftected by erratum > A006261 > > arch/powerpc/cpu/mpc85xx/cpu_init.c | 4 ++-- > arch/powerpc/include/asm/config_mpc85xx.h | 5 ++--- > arch/powerpc/include/asm/immap_85xx.h | 2 ++ > drivers/usb/common/fsl-errata.c | 13 - > 4 files changed, 10 insertions(+), 14 deletions(-) > Applied to u-boot-85xx master, awaiting upstream. Thanks. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 06/21] imx6: icorem6: Add ENET support
On Wed, Sep 28, 2016 at 2:36 PM, Jagan Tekiwrote: > On Thu, Sep 29, 2016 at 1:03 AM, Joe Hershberger > wrote: >> On Wed, Sep 28, 2016 at 2:30 PM, Jagan Teki wrote: >>> On Thu, Sep 29, 2016 at 12:51 AM, Joe Hershberger >>> wrote: On Wed, Sep 28, 2016 at 2:15 PM, Jagan Teki wrote: > On Thu, Sep 29, 2016 at 12:41 AM, Joe Hershberger > wrote: >> On Wed, Sep 28, 2016 at 1:28 PM, Jagan Teki wrote: >>> From: Jagan Teki >>> >>> Add enet support for engicam icorem6 qdl starter kit. >>> - Add pinmux settings >>> - Add board_eth_init >>> >>> TFTP log: >>> >>> Net: FEC [PRIME] >>> Hit any key to stop autoboot: 0 >>> icorem6qdl> tftpboot {fdt_addr} imx6dl-icore.dtb >>> Using FEC device >>> TFTP from server 192.168.2.96; our IP address is 192.168.2.75 >>> Filename 'imx6dl-icore.dtb'. >>> Load address: 0x0 >>> Loading: ## >>> 1.3 MiB/s >>> done >>> Bytes transferred = 28976 (7130 hex) >>> CACHE: Misaligned operation at range [, 7130] >>> icorem6qdl> >>> >>> Cc: Joe Hershberger >>> Cc: Peng Fan >>> Cc: Stefano Babic >>> Cc: Fabio Estevam >>> Cc: Matteo Lisi >>> Cc: Michael Trimarchi >>> Signed-off-by: Jagan Teki >>> --- >>> board/engicam/icorem6/icorem6.c | 72 >>> + >>> configs/imx6qdl_icore_mmc_defconfig | 4 +++ >>> include/configs/imx6qdl_icore.h | 12 +++ >>> 3 files changed, 88 insertions(+) >>> >> >> ... >> >>> diff --git a/configs/imx6qdl_icore_mmc_defconfig >>> b/configs/imx6qdl_icore_mmc_defconfig >>> index a658f4b..d304693 100644 >>> --- a/configs/imx6qdl_icore_mmc_defconfig >>> +++ b/configs/imx6qdl_icore_mmc_defconfig >>> @@ -14,6 +14,8 @@ CONFIG_SYS_MAXARGS=32 >>> # CONFIG_CMD_IMLS is not set >>> CONFIG_CMD_BOOTZ=y >>> CONFIG_CMD_GPIO=y >>> +CONFIG_CMD_MII=y >>> +CONFIG_CMD_PING=y >>> CONFIG_CMD_MEMTEST=y >>> CONFIG_CMD_MMC=y >>> CONFIG_CMD_CACHE=y >>> @@ -23,5 +25,7 @@ CONFIG_CMD_EXT4_WRITE=y >>> CONFIG_CMD_FAT=y >>> CONFIG_CMD_FS_GENERIC=y >>> CONFIG_OF_LIBFDT=y >>> +CONFIG_FEC_MXC=y >>> CONFIG_MXC_UART=y >>> +CONFIG_NETDEVICES=y >>> CONFIG_IMX_THERMAL=y >> >> I guess this board can't use CONFIG_DM_ETH for some reason? > > True I will remove and send the patch. I assume you mean you'll switch the board to enable CONFIG_DM_ETH? Not sure what you mean when you say you will remove (something) when my comment was about the absence of a config. >>> >>> Sorry, I am not planning to use DM_ETH as of now. Since all net >>> drivers in Kconfig are in if CONFIG_NETDEVICES. ie the reason I added. >>> I think this is needed in defconfig. >> >> CONFIG_NETDEVICES certainly is needed if you don't specify >> CONFIG_DM_ETH. I prefer new board support use DM_ETH. What's the >> reason for not using DM? > > Because fec_mxc still not supporting dm, it is still in ML. OK. Acked-by: Joe Hershberger ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 06/21] imx6: icorem6: Add ENET support
On Thu, Sep 29, 2016 at 1:03 AM, Joe Hershbergerwrote: > On Wed, Sep 28, 2016 at 2:30 PM, Jagan Teki wrote: >> On Thu, Sep 29, 2016 at 12:51 AM, Joe Hershberger >> wrote: >>> On Wed, Sep 28, 2016 at 2:15 PM, Jagan Teki >>> wrote: On Thu, Sep 29, 2016 at 12:41 AM, Joe Hershberger wrote: > On Wed, Sep 28, 2016 at 1:28 PM, Jagan Teki wrote: >> From: Jagan Teki >> >> Add enet support for engicam icorem6 qdl starter kit. >> - Add pinmux settings >> - Add board_eth_init >> >> TFTP log: >> >> Net: FEC [PRIME] >> Hit any key to stop autoboot: 0 >> icorem6qdl> tftpboot {fdt_addr} imx6dl-icore.dtb >> Using FEC device >> TFTP from server 192.168.2.96; our IP address is 192.168.2.75 >> Filename 'imx6dl-icore.dtb'. >> Load address: 0x0 >> Loading: ## >> 1.3 MiB/s >> done >> Bytes transferred = 28976 (7130 hex) >> CACHE: Misaligned operation at range [, 7130] >> icorem6qdl> >> >> Cc: Joe Hershberger >> Cc: Peng Fan >> Cc: Stefano Babic >> Cc: Fabio Estevam >> Cc: Matteo Lisi >> Cc: Michael Trimarchi >> Signed-off-by: Jagan Teki >> --- >> board/engicam/icorem6/icorem6.c | 72 >> + >> configs/imx6qdl_icore_mmc_defconfig | 4 +++ >> include/configs/imx6qdl_icore.h | 12 +++ >> 3 files changed, 88 insertions(+) >> > > ... > >> diff --git a/configs/imx6qdl_icore_mmc_defconfig >> b/configs/imx6qdl_icore_mmc_defconfig >> index a658f4b..d304693 100644 >> --- a/configs/imx6qdl_icore_mmc_defconfig >> +++ b/configs/imx6qdl_icore_mmc_defconfig >> @@ -14,6 +14,8 @@ CONFIG_SYS_MAXARGS=32 >> # CONFIG_CMD_IMLS is not set >> CONFIG_CMD_BOOTZ=y >> CONFIG_CMD_GPIO=y >> +CONFIG_CMD_MII=y >> +CONFIG_CMD_PING=y >> CONFIG_CMD_MEMTEST=y >> CONFIG_CMD_MMC=y >> CONFIG_CMD_CACHE=y >> @@ -23,5 +25,7 @@ CONFIG_CMD_EXT4_WRITE=y >> CONFIG_CMD_FAT=y >> CONFIG_CMD_FS_GENERIC=y >> CONFIG_OF_LIBFDT=y >> +CONFIG_FEC_MXC=y >> CONFIG_MXC_UART=y >> +CONFIG_NETDEVICES=y >> CONFIG_IMX_THERMAL=y > > I guess this board can't use CONFIG_DM_ETH for some reason? True I will remove and send the patch. >>> >>> I assume you mean you'll switch the board to enable CONFIG_DM_ETH? Not >>> sure what you mean when you say you will remove (something) when my >>> comment was about the absence of a config. >> >> Sorry, I am not planning to use DM_ETH as of now. Since all net >> drivers in Kconfig are in if CONFIG_NETDEVICES. ie the reason I added. >> I think this is needed in defconfig. > > CONFIG_NETDEVICES certainly is needed if you don't specify > CONFIG_DM_ETH. I prefer new board support use DM_ETH. What's the > reason for not using DM? Because fec_mxc still not supporting dm, it is still in ML. thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 06/21] imx6: icorem6: Add ENET support
On Wed, Sep 28, 2016 at 2:30 PM, Jagan Tekiwrote: > On Thu, Sep 29, 2016 at 12:51 AM, Joe Hershberger > wrote: >> On Wed, Sep 28, 2016 at 2:15 PM, Jagan Teki wrote: >>> On Thu, Sep 29, 2016 at 12:41 AM, Joe Hershberger >>> wrote: On Wed, Sep 28, 2016 at 1:28 PM, Jagan Teki wrote: > From: Jagan Teki > > Add enet support for engicam icorem6 qdl starter kit. > - Add pinmux settings > - Add board_eth_init > > TFTP log: > > Net: FEC [PRIME] > Hit any key to stop autoboot: 0 > icorem6qdl> tftpboot {fdt_addr} imx6dl-icore.dtb > Using FEC device > TFTP from server 192.168.2.96; our IP address is 192.168.2.75 > Filename 'imx6dl-icore.dtb'. > Load address: 0x0 > Loading: ## > 1.3 MiB/s > done > Bytes transferred = 28976 (7130 hex) > CACHE: Misaligned operation at range [, 7130] > icorem6qdl> > > Cc: Joe Hershberger > Cc: Peng Fan > Cc: Stefano Babic > Cc: Fabio Estevam > Cc: Matteo Lisi > Cc: Michael Trimarchi > Signed-off-by: Jagan Teki > --- > board/engicam/icorem6/icorem6.c | 72 > + > configs/imx6qdl_icore_mmc_defconfig | 4 +++ > include/configs/imx6qdl_icore.h | 12 +++ > 3 files changed, 88 insertions(+) > ... > diff --git a/configs/imx6qdl_icore_mmc_defconfig > b/configs/imx6qdl_icore_mmc_defconfig > index a658f4b..d304693 100644 > --- a/configs/imx6qdl_icore_mmc_defconfig > +++ b/configs/imx6qdl_icore_mmc_defconfig > @@ -14,6 +14,8 @@ CONFIG_SYS_MAXARGS=32 > # CONFIG_CMD_IMLS is not set > CONFIG_CMD_BOOTZ=y > CONFIG_CMD_GPIO=y > +CONFIG_CMD_MII=y > +CONFIG_CMD_PING=y > CONFIG_CMD_MEMTEST=y > CONFIG_CMD_MMC=y > CONFIG_CMD_CACHE=y > @@ -23,5 +25,7 @@ CONFIG_CMD_EXT4_WRITE=y > CONFIG_CMD_FAT=y > CONFIG_CMD_FS_GENERIC=y > CONFIG_OF_LIBFDT=y > +CONFIG_FEC_MXC=y > CONFIG_MXC_UART=y > +CONFIG_NETDEVICES=y > CONFIG_IMX_THERMAL=y I guess this board can't use CONFIG_DM_ETH for some reason? >>> >>> True I will remove and send the patch. >> >> I assume you mean you'll switch the board to enable CONFIG_DM_ETH? Not >> sure what you mean when you say you will remove (something) when my >> comment was about the absence of a config. > > Sorry, I am not planning to use DM_ETH as of now. Since all net > drivers in Kconfig are in if CONFIG_NETDEVICES. ie the reason I added. > I think this is needed in defconfig. CONFIG_NETDEVICES certainly is needed if you don't specify CONFIG_DM_ETH. I prefer new board support use DM_ETH. What's the reason for not using DM? Thanks, -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 06/21] imx6: icorem6: Add ENET support
On Thu, Sep 29, 2016 at 12:51 AM, Joe Hershbergerwrote: > On Wed, Sep 28, 2016 at 2:15 PM, Jagan Teki wrote: >> On Thu, Sep 29, 2016 at 12:41 AM, Joe Hershberger >> wrote: >>> On Wed, Sep 28, 2016 at 1:28 PM, Jagan Teki wrote: From: Jagan Teki Add enet support for engicam icorem6 qdl starter kit. - Add pinmux settings - Add board_eth_init TFTP log: Net: FEC [PRIME] Hit any key to stop autoboot: 0 icorem6qdl> tftpboot {fdt_addr} imx6dl-icore.dtb Using FEC device TFTP from server 192.168.2.96; our IP address is 192.168.2.75 Filename 'imx6dl-icore.dtb'. Load address: 0x0 Loading: ## 1.3 MiB/s done Bytes transferred = 28976 (7130 hex) CACHE: Misaligned operation at range [, 7130] icorem6qdl> Cc: Joe Hershberger Cc: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- board/engicam/icorem6/icorem6.c | 72 + configs/imx6qdl_icore_mmc_defconfig | 4 +++ include/configs/imx6qdl_icore.h | 12 +++ 3 files changed, 88 insertions(+) >>> >>> ... >>> diff --git a/configs/imx6qdl_icore_mmc_defconfig b/configs/imx6qdl_icore_mmc_defconfig index a658f4b..d304693 100644 --- a/configs/imx6qdl_icore_mmc_defconfig +++ b/configs/imx6qdl_icore_mmc_defconfig @@ -14,6 +14,8 @@ CONFIG_SYS_MAXARGS=32 # CONFIG_CMD_IMLS is not set CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_MMC=y CONFIG_CMD_CACHE=y @@ -23,5 +25,7 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_LIBFDT=y +CONFIG_FEC_MXC=y CONFIG_MXC_UART=y +CONFIG_NETDEVICES=y CONFIG_IMX_THERMAL=y >>> >>> I guess this board can't use CONFIG_DM_ETH for some reason? >> >> True I will remove and send the patch. > > I assume you mean you'll switch the board to enable CONFIG_DM_ETH? Not > sure what you mean when you say you will remove (something) when my > comment was about the absence of a config. Sorry, I am not planning to use DM_ETH as of now. Since all net drivers in Kconfig are in if CONFIG_NETDEVICES. ie the reason I added. I think this is needed in defconfig. thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 06/21] imx6: icorem6: Add ENET support
On Wed, Sep 28, 2016 at 2:15 PM, Jagan Tekiwrote: > On Thu, Sep 29, 2016 at 12:41 AM, Joe Hershberger > wrote: >> On Wed, Sep 28, 2016 at 1:28 PM, Jagan Teki wrote: >>> From: Jagan Teki >>> >>> Add enet support for engicam icorem6 qdl starter kit. >>> - Add pinmux settings >>> - Add board_eth_init >>> >>> TFTP log: >>> >>> Net: FEC [PRIME] >>> Hit any key to stop autoboot: 0 >>> icorem6qdl> tftpboot {fdt_addr} imx6dl-icore.dtb >>> Using FEC device >>> TFTP from server 192.168.2.96; our IP address is 192.168.2.75 >>> Filename 'imx6dl-icore.dtb'. >>> Load address: 0x0 >>> Loading: ## >>> 1.3 MiB/s >>> done >>> Bytes transferred = 28976 (7130 hex) >>> CACHE: Misaligned operation at range [, 7130] >>> icorem6qdl> >>> >>> Cc: Joe Hershberger >>> Cc: Peng Fan >>> Cc: Stefano Babic >>> Cc: Fabio Estevam >>> Cc: Matteo Lisi >>> Cc: Michael Trimarchi >>> Signed-off-by: Jagan Teki >>> --- >>> board/engicam/icorem6/icorem6.c | 72 >>> + >>> configs/imx6qdl_icore_mmc_defconfig | 4 +++ >>> include/configs/imx6qdl_icore.h | 12 +++ >>> 3 files changed, 88 insertions(+) >>> >> >> ... >> >>> diff --git a/configs/imx6qdl_icore_mmc_defconfig >>> b/configs/imx6qdl_icore_mmc_defconfig >>> index a658f4b..d304693 100644 >>> --- a/configs/imx6qdl_icore_mmc_defconfig >>> +++ b/configs/imx6qdl_icore_mmc_defconfig >>> @@ -14,6 +14,8 @@ CONFIG_SYS_MAXARGS=32 >>> # CONFIG_CMD_IMLS is not set >>> CONFIG_CMD_BOOTZ=y >>> CONFIG_CMD_GPIO=y >>> +CONFIG_CMD_MII=y >>> +CONFIG_CMD_PING=y >>> CONFIG_CMD_MEMTEST=y >>> CONFIG_CMD_MMC=y >>> CONFIG_CMD_CACHE=y >>> @@ -23,5 +25,7 @@ CONFIG_CMD_EXT4_WRITE=y >>> CONFIG_CMD_FAT=y >>> CONFIG_CMD_FS_GENERIC=y >>> CONFIG_OF_LIBFDT=y >>> +CONFIG_FEC_MXC=y >>> CONFIG_MXC_UART=y >>> +CONFIG_NETDEVICES=y >>> CONFIG_IMX_THERMAL=y >> >> I guess this board can't use CONFIG_DM_ETH for some reason? > > True I will remove and send the patch. I assume you mean you'll switch the board to enable CONFIG_DM_ETH? Not sure what you mean when you say you will remove (something) when my comment was about the absence of a config. Thanks, -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-85xx master
Tom, The following changes since commit 06572f0301c18e63b887efc91803bb9467e55dbe: Merge git://www.denx.de/git/u-boot-ppc4xx (2016-09-27 12:48:18 -0400) are available in the git repository at: git://git.denx.de/u-boot-mpc85xx.git for you to fetch changes up to f413d1cae89143ad45b066b3d3bc602deafcb50a: mpc85xx: powerpc: usb: Update the list of Socs afftected by erratum A006261 (2016-09-28 09:08:16 -0700) Sriram Dash (3): mpc85xx: powerpc: usb: Modified the erratum A006261 according to endianness mpc85xx: powerpc: usb: Enable Usb phy initialisation settings for P1010 mpc85xx: powerpc: usb: Update the list of Socs afftected by erratum A006261 arch/powerpc/cpu/mpc85xx/cpu_init.c | 4 ++-- arch/powerpc/include/asm/config_mpc85xx.h | 5 ++--- arch/powerpc/include/asm/immap_85xx.h | 2 ++ drivers/usb/common/fsl-errata.c | 13 - 4 files changed, 10 insertions(+), 14 deletions(-) Thanks. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC] Rearrange CONFIG_* macros
+Masahiro, who may know On 28 September 2016 at 12:57, york sunwrote: > On 09/27/2016 10:55 AM, Simon Glass wrote: >> Hi York, >> >> On 27 September 2016 at 11:39, york sun wrote: >>> Guys, >>> >>> I want to discuss to rearrange the current CONFIG_* macros used by >>> Freescale Layerscape SoCs. We have been encouraged to use CONFIG_SYS_* >>> macros to define hardware setting, and other CONFIG_* macros for user >>> setting. Clearly this has changed. Kconfig options are used for most >>> user settings from now on. I am OK with it. But for existing >>> CONFIG_SYS_* macros, we need a plan to either move them out of CONFIG_* >>> name space, or move some to Kconfig, if that makes sense. Since most our >>> CONFIG_SYS_* macros are cross platforms (including armv7 and armv8), if >>> using Kconfig option, do we add another mach-fsl folder to host the >>> Kconfig, or somewhere else? We also have macros cross ARM and PowerPC. >>> So we either move them out of arch/, or duplicate them for both arch. >>> >>> If we move them to another name space, for example SYS_FSL_*, do we want >>> to move them out of config.h? >>> >>> Any suggestion/comment? >> >> I wonder if some of these (the ones that represent actual values >> rather than enabling functions) can move to device tree, or tables? >> > > While I try to move some options to Kconfig, I have an issue of > duplicated names. For example, the MAX_CPUS is used in arch/x86/Kconfig. > I know I can put another config with the same name, for example > arch/arm/cpu/armv8/fsl-layerscape/Kconfig. The funny thing is when I > search for this config option under menuconfig, it shows the location of > x86, but showing defined in arch/arm/cpu/armv8/fsl-layerscape/Kconfig. > Same thing happens when I try to move an option which is used by both > PowerPC and ARM. This is not related to a common driver so I cannot put > the option into a driver Kconfig (for example CONFIG_SYS_HAS_SERDES). > > Is there a solution for this? > > York > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 06/21] imx6: icorem6: Add ENET support
On Thu, Sep 29, 2016 at 12:41 AM, Joe Hershbergerwrote: > On Wed, Sep 28, 2016 at 1:28 PM, Jagan Teki wrote: >> From: Jagan Teki >> >> Add enet support for engicam icorem6 qdl starter kit. >> - Add pinmux settings >> - Add board_eth_init >> >> TFTP log: >> >> Net: FEC [PRIME] >> Hit any key to stop autoboot: 0 >> icorem6qdl> tftpboot {fdt_addr} imx6dl-icore.dtb >> Using FEC device >> TFTP from server 192.168.2.96; our IP address is 192.168.2.75 >> Filename 'imx6dl-icore.dtb'. >> Load address: 0x0 >> Loading: ## >> 1.3 MiB/s >> done >> Bytes transferred = 28976 (7130 hex) >> CACHE: Misaligned operation at range [, 7130] >> icorem6qdl> >> >> Cc: Joe Hershberger >> Cc: Peng Fan >> Cc: Stefano Babic >> Cc: Fabio Estevam >> Cc: Matteo Lisi >> Cc: Michael Trimarchi >> Signed-off-by: Jagan Teki >> --- >> board/engicam/icorem6/icorem6.c | 72 >> + >> configs/imx6qdl_icore_mmc_defconfig | 4 +++ >> include/configs/imx6qdl_icore.h | 12 +++ >> 3 files changed, 88 insertions(+) >> > > ... > >> diff --git a/configs/imx6qdl_icore_mmc_defconfig >> b/configs/imx6qdl_icore_mmc_defconfig >> index a658f4b..d304693 100644 >> --- a/configs/imx6qdl_icore_mmc_defconfig >> +++ b/configs/imx6qdl_icore_mmc_defconfig >> @@ -14,6 +14,8 @@ CONFIG_SYS_MAXARGS=32 >> # CONFIG_CMD_IMLS is not set >> CONFIG_CMD_BOOTZ=y >> CONFIG_CMD_GPIO=y >> +CONFIG_CMD_MII=y >> +CONFIG_CMD_PING=y >> CONFIG_CMD_MEMTEST=y >> CONFIG_CMD_MMC=y >> CONFIG_CMD_CACHE=y >> @@ -23,5 +25,7 @@ CONFIG_CMD_EXT4_WRITE=y >> CONFIG_CMD_FAT=y >> CONFIG_CMD_FS_GENERIC=y >> CONFIG_OF_LIBFDT=y >> +CONFIG_FEC_MXC=y >> CONFIG_MXC_UART=y >> +CONFIG_NETDEVICES=y >> CONFIG_IMX_THERMAL=y > > I guess this board can't use CONFIG_DM_ETH for some reason? True I will remove and send the patch. thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH RESEND] phy: atheros: add support for RGMII_ID, RGMII_TXID and RGMII_RXID
On Wed, Sep 28, 2016 at 2:10 PM, Marek Vasutwrote: > On 09/28/2016 09:04 PM, Joe Hershberger wrote: >> On Wed, Sep 28, 2016 at 2:01 PM, Marek Vasut wrote: >>> On 09/28/2016 08:55 PM, Joe Hershberger wrote: On Tue, Sep 27, 2016 at 7:59 AM, Marek Vasut wrote: > On 05/26/2016 06:24 PM, Andrea Merello wrote: >> This adds support for internal delay on RX and TX on RGMII interface for >> the >> AR8035 phy. >> >> This is basically the same Linux driver do. Tested on a Zynq Zturn board >> (for >> which u-boot support in is my tree; first patch waiting ML approval) >> >> Signed-off-by: Andrea Merello > > Reviewed-by: Marek Vasut > Acked-by: Marek Vasut > > Can we get this applied ? Thanks This is assigned to Michal in patchwork, so at least someone thinks that's the correct path. I'm good either way. >>> >>> Well that doesn't make any sense, so please pick it. >> >> Probably was done because it mentions it's for a Zynq board. Sure >> would be nice if patchwork listed a history of who changed what >> fields. > > I would rather avoid fingerpointing, but probably Tom, he's the one > doing the hard work of reassigning patches and is alone at it I think. > Thus, accidents can happen. I also assign some, mostly unassigned and pertaining to me. I certainly try to not take patches assigned to others when there's any doubt in case they are in progress. I'm not interested in finger-pointing so much as knowing who to ask about the assignment. -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 06/21] imx6: icorem6: Add ENET support
On Wed, Sep 28, 2016 at 1:28 PM, Jagan Tekiwrote: > From: Jagan Teki > > Add enet support for engicam icorem6 qdl starter kit. > - Add pinmux settings > - Add board_eth_init > > TFTP log: > > Net: FEC [PRIME] > Hit any key to stop autoboot: 0 > icorem6qdl> tftpboot {fdt_addr} imx6dl-icore.dtb > Using FEC device > TFTP from server 192.168.2.96; our IP address is 192.168.2.75 > Filename 'imx6dl-icore.dtb'. > Load address: 0x0 > Loading: ## > 1.3 MiB/s > done > Bytes transferred = 28976 (7130 hex) > CACHE: Misaligned operation at range [, 7130] > icorem6qdl> > > Cc: Joe Hershberger > Cc: Peng Fan > Cc: Stefano Babic > Cc: Fabio Estevam > Cc: Matteo Lisi > Cc: Michael Trimarchi > Signed-off-by: Jagan Teki > --- > board/engicam/icorem6/icorem6.c | 72 > + > configs/imx6qdl_icore_mmc_defconfig | 4 +++ > include/configs/imx6qdl_icore.h | 12 +++ > 3 files changed, 88 insertions(+) > ... > diff --git a/configs/imx6qdl_icore_mmc_defconfig > b/configs/imx6qdl_icore_mmc_defconfig > index a658f4b..d304693 100644 > --- a/configs/imx6qdl_icore_mmc_defconfig > +++ b/configs/imx6qdl_icore_mmc_defconfig > @@ -14,6 +14,8 @@ CONFIG_SYS_MAXARGS=32 > # CONFIG_CMD_IMLS is not set > CONFIG_CMD_BOOTZ=y > CONFIG_CMD_GPIO=y > +CONFIG_CMD_MII=y > +CONFIG_CMD_PING=y > CONFIG_CMD_MEMTEST=y > CONFIG_CMD_MMC=y > CONFIG_CMD_CACHE=y > @@ -23,5 +25,7 @@ CONFIG_CMD_EXT4_WRITE=y > CONFIG_CMD_FAT=y > CONFIG_CMD_FS_GENERIC=y > CONFIG_OF_LIBFDT=y > +CONFIG_FEC_MXC=y > CONFIG_MXC_UART=y > +CONFIG_NETDEVICES=y > CONFIG_IMX_THERMAL=y I guess this board can't use CONFIG_DM_ETH for some reason? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH RESEND] phy: atheros: add support for RGMII_ID, RGMII_TXID and RGMII_RXID
On 09/28/2016 09:04 PM, Joe Hershberger wrote: > On Wed, Sep 28, 2016 at 2:01 PM, Marek Vasutwrote: >> On 09/28/2016 08:55 PM, Joe Hershberger wrote: >>> On Tue, Sep 27, 2016 at 7:59 AM, Marek Vasut wrote: On 05/26/2016 06:24 PM, Andrea Merello wrote: > This adds support for internal delay on RX and TX on RGMII interface for > the > AR8035 phy. > > This is basically the same Linux driver do. Tested on a Zynq Zturn board > (for > which u-boot support in is my tree; first patch waiting ML approval) > > Signed-off-by: Andrea Merello Reviewed-by: Marek Vasut Acked-by: Marek Vasut Can we get this applied ? Thanks >>> >>> This is assigned to Michal in patchwork, so at least someone thinks >>> that's the correct path. I'm good either way. >> >> Well that doesn't make any sense, so please pick it. > > Probably was done because it mentions it's for a Zynq board. Sure > would be nice if patchwork listed a history of who changed what > fields. I would rather avoid fingerpointing, but probably Tom, he's the one doing the hard work of reassigning patches and is alone at it I think. Thus, accidents can happen. -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH RESEND] phy: atheros: add support for RGMII_ID, RGMII_TXID and RGMII_RXID
On Wed, Sep 28, 2016 at 2:01 PM, Marek Vasutwrote: > On 09/28/2016 08:55 PM, Joe Hershberger wrote: >> On Tue, Sep 27, 2016 at 7:59 AM, Marek Vasut wrote: >>> On 05/26/2016 06:24 PM, Andrea Merello wrote: This adds support for internal delay on RX and TX on RGMII interface for the AR8035 phy. This is basically the same Linux driver do. Tested on a Zynq Zturn board (for which u-boot support in is my tree; first patch waiting ML approval) Signed-off-by: Andrea Merello >>> >>> Reviewed-by: Marek Vasut >>> Acked-by: Marek Vasut >>> >>> Can we get this applied ? Thanks >> >> This is assigned to Michal in patchwork, so at least someone thinks >> that's the correct path. I'm good either way. > > Well that doesn't make any sense, so please pick it. Probably was done because it mentions it's for a Zynq board. Sure would be nice if patchwork listed a history of who changed what fields. -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH RESEND] phy: atheros: add support for RGMII_ID, RGMII_TXID and RGMII_RXID
On 09/28/2016 08:55 PM, Joe Hershberger wrote: > On Tue, Sep 27, 2016 at 7:59 AM, Marek Vasutwrote: >> On 05/26/2016 06:24 PM, Andrea Merello wrote: >>> This adds support for internal delay on RX and TX on RGMII interface for the >>> AR8035 phy. >>> >>> This is basically the same Linux driver do. Tested on a Zynq Zturn board >>> (for >>> which u-boot support in is my tree; first patch waiting ML approval) >>> >>> Signed-off-by: Andrea Merello >> >> Reviewed-by: Marek Vasut >> Acked-by: Marek Vasut >> >> Can we get this applied ? Thanks > > This is assigned to Michal in patchwork, so at least someone thinks > that's the correct path. I'm good either way. Well that doesn't make any sense, so please pick it. -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/2] mx6sabresd: Add SPL support for the mx6dl variant
Hi Stefano, On Mon, Sep 26, 2016 at 9:14 AM, Fabio Estevamwrote: > From: Fabio Estevam > > Add support for the mx6dlsabresd board in SPL. > > Retrieved the DCD table from: > board/freescale/mx6sabresd/mx6dlsabresd.cfg > (NXP U-Boot branch imx_v2015.04_4.1.15_1.0.0_ga) > > Signed-off-by: Fabio Estevam Patch 1/2 works fine, but I saw an issue with this one and will rework it. Please do not apply 2/2. Thanks ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH RESEND] phy: atheros: add support for RGMII_ID, RGMII_TXID and RGMII_RXID
On Tue, Sep 27, 2016 at 7:59 AM, Marek Vasutwrote: > On 05/26/2016 06:24 PM, Andrea Merello wrote: >> This adds support for internal delay on RX and TX on RGMII interface for the >> AR8035 phy. >> >> This is basically the same Linux driver do. Tested on a Zynq Zturn board (for >> which u-boot support in is my tree; first patch waiting ML approval) >> >> Signed-off-by: Andrea Merello > > Reviewed-by: Marek Vasut > Acked-by: Marek Vasut > > Can we get this applied ? Thanks This is assigned to Michal in patchwork, so at least someone thinks that's the correct path. I'm good either way. -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH RESEND] phy: atheros: add support for RGMII_ID, RGMII_TXID and RGMII_RXID
On Thu, May 26, 2016 at 11:24 AM, Andrea Merellowrote: > This adds support for internal delay on RX and TX on RGMII interface for the > AR8035 phy. > > This is basically the same Linux driver do. Tested on a Zynq Zturn board (for > which u-boot support in is my tree; first patch waiting ML approval) > > Signed-off-by: Andrea Merello Acked-by: Joe Hershberger ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] i.MX6 nand bootupdate, reworked
On Wed, Sep 28, 2016 at 10:47 PM, Sergey Kubushynwrote: > On Wed, 28 Sep 2016, Jagan Teki wrote: > >> On Sun, Jun 19, 2016 at 3:14 AM, Sergey Kubushyn wrote: >>> >>> Here is yet another version, diff made against latest u-boot-imx master. >>> >>> Actual code moved from drivers/mtd/nand to /arch/arm/imx-common, some >>> functions renamed. No other changes. >> >> >> >> >> >>> return CMD_RET_USAGE; >>> } >>> @@ -766,6 +816,17 @@ static char nand_help_text[] = >>> "'addr', skipping bad blocks and dropping any pages at the >>> end\n" >>> "of eraseblocks that contain only 0xFF\n" >>> #endif >>> +#ifdef CONFIG_CMD_NAND_BOOTUPDATE >>> + "nand bootupdate - [addr] [size]\n" >> >> >> What is the addr here the nand offset or the ddr addr? I tried of >> doing the same but unable to boot any help? > > > It is where the actual U-Boot image is loaded in RAM. If "nand bootupdate" > is done right after reading U-Boot binary into RAM (e.g. with ext4load) > those can be both omitted. > > As a matter of fact I'm finishing a bunch of changes to U-Boot, including > that bootupdate command and 2 new boards right now and going to submit all > that either tonight or tomorrow. > > NAND bootupdate works like a charm here and we do actually use it in actual > production environment with both Linux and Android; firmware updates do > update U-Boot itself as a part of regular network (or OTA how it is called > in Android) updates. > > Will try to write a small README file on that if times permitted. True, good to have. > > Please note that it has been only tested on i.MX6 (don't have anything else > here; all our boards are i.MX6D/Q/DL.) We do not use SPL. > > As of your case I'm not exactly sure what you are trying to achieve. That > entire NAND boot thing with all FCB/DBBT/whatever only applies to INITIAL > boot off of raw NAND device. It allows to boot either the full U-Boot or > SPL using i.MX6 NAND ROM boot routine that reads that FCB and whatever > else then loads actual binary (either U-Boot or SPL or whatever) according > to information in that FCB and runs it. > > If you are booting your SPL off of some other media and then trying to load > second stage U-Boot from raw NAND you don't need all that FCB kabang. The > DCB part (if U-Boot is built as i.MX6 image) is also not needed so it can > be stripped or skipped. However your SPL must properly configure NAND > itself so it would be able to read from it and it should include all stuff > required to actually read data from NAND. > > The FCB/DBBT stuff is only needed for initial boot off of raw NAND. If you > are going to boot off of NAND and want to have your U-Boot in NAND (that is > the only logical use of NAND for U-Boot) I can not see any reason for going > SPL road but you might have your own reasons that I don't know. Since ROM expects the FCB/DBBT this tool adding that so I updated SPL and written u-boot-dtb.img using 'nand write' thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 20/21] imx6: icorem6: Enable MTD device support
From: Jagan TekiEnable MTD device, partition and command support. Cc: Stefano Babic Cc: Peng Fan Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- include/configs/imx6qdl_icore.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h index 899108e..913e1f5 100644 --- a/include/configs/imx6qdl_icore.h +++ b/include/configs/imx6qdl_icore.h @@ -124,6 +124,12 @@ # define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE # define CONFIG_SYS_NAND_U_BOOT_OFFS 0x20 +/* MTD device */ +# define CONFIG_MTD_DEVICE +# define CONFIG_CMD_MTDPARTS +# define CONFIG_MTD_PARTITIONS +# define MTDIDS_DEFAULT"nand0=nand" + # define CONFIG_APBH_DMA # define CONFIG_APBH_DMA_BURST # define CONFIG_APBH_DMA_BURST8 -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 21/21] imx6: icorem6: Add default mtd nand partition table
From: Jagan Tekiicorem6qdl> mtdparts device nand0 , # parts = 6 0: spl 0x0020 0x 0 1: uboot 0x0020 0x0020 0 2: env 0x0010 0x0040 0 3: kernel 0x0040 0x0050 0 4: dtb 0x0010 0x0090 0 5: rootfs 0x1f60 0x00a0 0 Cc: Stefano Babic Cc: Peng Fan Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- include/configs/imx6qdl_icore.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h index 913e1f5..b69be3b 100644 --- a/include/configs/imx6qdl_icore.h +++ b/include/configs/imx6qdl_icore.h @@ -129,6 +129,8 @@ # define CONFIG_CMD_MTDPARTS # define CONFIG_MTD_PARTITIONS # define MTDIDS_DEFAULT"nand0=nand" +# define MTDPARTS_DEFAULT "mtdparts=nand:2m(spl),2m(uboot)," \ + "1m(env),4m(kernel),1m(dtb),-(rootfs)" # define CONFIG_APBH_DMA # define CONFIG_APBH_DMA_BURST -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 19/21] imx6: icorem6: Add NAND support
From: Jagan TekiAdd NAND support for Engicam i.CoreM6 qdl board. Boot Log: U-Boot SPL 2016.09-rc2-30755-gd3dc581-dirty (Sep 28 2016 - 23:00:43) Trying to boot from NAND NAND : 512 MiB U-Boot 2016.09-rc2-30755-gd3dc581-dirty (Sep 28 2016 - 23:00:43 +0530) CPU: Freescale i.MX6SOLO rev1.3 at 792MHz CPU: Industrial temperature grade (-40C to 105C) at 55C Reset cause: WDOG Model: Engicam i.CoreM6 DualLite/Solo Starter Kit DRAM: 256 MiB NAND: 512 MiB MMC: FSL_SDHC: 0 In:serial Out: serial Err: serial Net: FEC [PRIME] Hit any key to stop autoboot: 0 icorem6qdl> Cc: Scott Wood Cc: Stefano Babic Cc: Peng Fan Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- board/engicam/icorem6/icorem6.c | 63 configs/imx6qdl_icore_nand_defconfig | 30 + include/configs/imx6qdl_icore.h | 18 +++ 3 files changed, 111 insertions(+) create mode 100644 configs/imx6qdl_icore_nand_defconfig diff --git a/board/engicam/icorem6/icorem6.c b/board/engicam/icorem6/icorem6.c index a370c8b..c152007 100644 --- a/board/engicam/icorem6/icorem6.c +++ b/board/engicam/icorem6/icorem6.c @@ -101,6 +101,66 @@ int board_eth_init(bd_t *bis) } #endif +#ifdef CONFIG_NAND_MXS + +#define GPMI_PAD_CTRL0 (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP) +#define GPMI_PAD_CTRL1 (PAD_CTL_DSE_40ohm | PAD_CTL_SPEED_MED | \ + PAD_CTL_SRE_FAST) +#define GPMI_PAD_CTRL2 (GPMI_PAD_CTRL0 | GPMI_PAD_CTRL1) + +iomux_v3_cfg_t gpmi_pads[] = { + IOMUX_PADS(PAD_NANDF_CLE__NAND_CLE | MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_NANDF_ALE__NAND_ALE | MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_NANDF_WP_B__NAND_WP_B| MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_NANDF_RB0__NAND_READY_B | MUX_PAD_CTRL(GPMI_PAD_CTRL0)), + IOMUX_PADS(PAD_NANDF_CS0__NAND_CE0_B| MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_SD4_CMD__NAND_RE_B | MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_SD4_CLK__NAND_WE_B | MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_NANDF_D0__NAND_DATA00| MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_NANDF_D1__NAND_DATA01| MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_NANDF_D2__NAND_DATA02| MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_NANDF_D3__NAND_DATA03| MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_NANDF_D4__NAND_DATA04| MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_NANDF_D5__NAND_DATA05| MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_NANDF_D6__NAND_DATA06| MUX_PAD_CTRL(GPMI_PAD_CTRL2)), + IOMUX_PADS(PAD_NANDF_D7__NAND_DATA07| MUX_PAD_CTRL(GPMI_PAD_CTRL2)), +}; + +static void setup_gpmi_nand(void) +{ + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + + /* config gpmi nand iomux */ + SETUP_IOMUX_PADS(gpmi_pads); + + /* gate ENFC_CLK_ROOT clock first,before clk source switch */ + clrbits_le32(_ccm->CCGR2, MXC_CCM_CCGR2_IOMUX_IPT_CLK_IO_MASK); + + /* config gpmi and bch clock to 100 MHz */ + clrsetbits_le32(_ccm->cs2cdr, + MXC_CCM_CS2CDR_ENFC_CLK_PODF_MASK | + MXC_CCM_CS2CDR_ENFC_CLK_PRED_MASK | + MXC_CCM_CS2CDR_ENFC_CLK_SEL_MASK, + MXC_CCM_CS2CDR_ENFC_CLK_PODF(0) | + MXC_CCM_CS2CDR_ENFC_CLK_PRED(3) | + MXC_CCM_CS2CDR_ENFC_CLK_SEL(3)); + + /* enable ENFC_CLK_ROOT clock */ + setbits_le32(_ccm->CCGR2, MXC_CCM_CCGR2_IOMUX_IPT_CLK_IO_MASK); + + /* enable gpmi and bch clock gating */ + setbits_le32(_ccm->CCGR4, +MXC_CCM_CCGR4_RAWNAND_U_BCH_INPUT_APB_MASK | +MXC_CCM_CCGR4_RAWNAND_U_GPMI_BCH_INPUT_BCH_MASK | +MXC_CCM_CCGR4_RAWNAND_U_GPMI_BCH_INPUT_GPMI_IO_MASK | +MXC_CCM_CCGR4_RAWNAND_U_GPMI_INPUT_APB_MASK | +MXC_CCM_CCGR4_PL301_MX6QPER1_BCH_OFFSET); + + /* enable apbh clock gating */ + setbits_le32(_ccm->CCGR0, MXC_CCM_CCGR0_APBHDMA_MASK); +} +#endif + int board_early_init_f(void) { SETUP_IOMUX_PADS(uart4_pads); @@ -113,6 +173,9 @@ int board_init(void) /* Address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; +#ifdef CONFIG_NAND_MXS + setup_gpmi_nand(); +#endif return 0; } diff --git a/configs/imx6qdl_icore_nand_defconfig b/configs/imx6qdl_icore_nand_defconfig new file mode 100644 index 000..ca4ff0f --- /dev/null +++ b/configs/imx6qdl_icore_nand_defconfig @@ -0,0 +1,30 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX6=y +CONFIG_TARGET_MX6Q_ICORE=y
[U-Boot] [PATCH v5 17/21] arm: imx6q: Add devicetree support for Engicam i.CoreM6 Quad/Dual
From: Jagan Tekii.CoreM6 Quad/Dual modules are system on module solutions manufactured by Engicam with following characteristics: CPU NXP i.MX6 DQ, 800MHz RAM 1GB, 32, 64 bit, DDR3-800/1066 NAND SLC,512MB Power supply Single 5V MAX LCD RES FULLHD and more info at http://www.engicam.com/en/products/embedded/som/sodimm/i-core-m6s-dl-d-q Cc: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- arch/arm/dts/Makefile| 3 ++- arch/arm/dts/imx6q-icore.dts | 59 board/engicam/icorem6/README | 9 ++- 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/imx6q-icore.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 39c1d2c..376fc58 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -274,7 +274,8 @@ dtb-$(CONFIG_VF610) += vf500-colibri.dtb \ dtb-$(CONFIG_MX7) += imx7-colibri.dtb dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \ - imx6dl-icore.dtb + imx6dl-icore.dtb \ + imx6q-icore.dtb dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \ k2l-evm.dtb \ diff --git a/arch/arm/dts/imx6q-icore.dts b/arch/arm/dts/imx6q-icore.dts new file mode 100644 index 000..025f543 --- /dev/null +++ b/arch/arm/dts/imx6q-icore.dts @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2016 Amarula Solutions B.V. + * Copyright (C) 2016 Engicam S.r.l. + * + * 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 + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This file is distributed in the hope that it will be useful + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; + +#include "imx6q.dtsi" +#include "imx6qdl-icore.dtsi" + +/ { + model = "Engicam i.CoreM6 Quad/Dual Starter Kit"; + compatible = "engicam,imx6-icore", "fsl,imx6q"; +}; + + { + status = "okay"; +}; + + { + status = "okay"; +}; diff --git a/board/engicam/icorem6/README b/board/engicam/icorem6/README index c264a94..12d1e21 100644 --- a/board/engicam/icorem6/README +++ b/board/engicam/icorem6/README @@ -1,12 +1,19 @@ How to use U-Boot on Engicam i.CoreM6 DualLite/Solo and Quad/Dual Starter Kit: - -- Build U-Boot for Engicam i.CoreM6 QDL: +- Configure U-Boot for Engicam i.CoreM6 QDL: $ make mrproper $ make icorem6qdl_mmc_defconfig + +- Build for i.CoreM6 DualLite/Solo + $ make +- Build for i.CoreM6 Quad/Dual + +$ make DEVICE_TREE=imx6q-icore + This will generate the SPL image called SPL and the u-boot-dtb.img. - Flash the SPL image into the micro SD card: -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 18/21] mtd: nand: Kconfig: Add NAND_MXS entry
From: Jagan TekiAdded kconfig for NAND_MXS driver. Cc: Scott Wood Cc: Simon Glass Cc: Fabio Estevam Cc: Stefano Babic Cc: Peng Fan Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- drivers/mtd/nand/Kconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 5ce7d6d..df154bf 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -80,6 +80,13 @@ config NAND_ARASAN controller. This uses the hardware ECC for read and write operations. +config NAND_MXS + bool "MXS NAND support" + depends on MX6 + help + This enables NAND driver for the NAND flash controller on the + MXS processors. + comment "Generic NAND options" # Enhance depends when converting drivers to Kconfig which use this config -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 16/21] arm: dts: imx6q: Add pinctrl defines
From: Jagan TekiAdd imx6q pinctrl defines support from Linux. Here is the last commit: "ARM: dts: imx: pinfunc: add MX6QDL_PAD_GPIO_6__ENET_IRQ" (sha1: d8c765e0d1ddbd5032c2491c82cc9660c2f0e7f2) Cc: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- arch/arm/dts/imx6q-pinfunc.h | 1047 ++ 1 file changed, 1047 insertions(+) create mode 100644 arch/arm/dts/imx6q-pinfunc.h diff --git a/arch/arm/dts/imx6q-pinfunc.h b/arch/arm/dts/imx6q-pinfunc.h new file mode 100644 index 000..9fc6120 --- /dev/null +++ b/arch/arm/dts/imx6q-pinfunc.h @@ -0,0 +1,1047 @@ +/* + * Copyright 2013 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef __DTS_IMX6Q_PINFUNC_H +#define __DTS_IMX6Q_PINFUNC_H + +/* + * The pin function ID is a tuple of + * + */ +#define MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x04c 0x360 0x000 0x0 0x0 +#define MX6QDL_PAD_SD2_DAT1__ECSPI5_SS0 0x04c 0x360 0x834 0x1 0x0 +#define MX6QDL_PAD_SD2_DAT1__EIM_CS2_B 0x04c 0x360 0x000 0x2 0x0 +#define MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x04c 0x360 0x7c8 0x3 0x0 +#define MX6QDL_PAD_SD2_DAT1__KEY_COL7 0x04c 0x360 0x8f0 0x4 0x0 +#define MX6QDL_PAD_SD2_DAT1__GPIO1_IO14 0x04c 0x360 0x000 0x5 0x0 +#define MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x050 0x364 0x000 0x0 0x0 +#define MX6QDL_PAD_SD2_DAT2__ECSPI5_SS1 0x050 0x364 0x838 0x1 0x0 +#define MX6QDL_PAD_SD2_DAT2__EIM_CS3_B 0x050 0x364 0x000 0x2 0x0 +#define MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x050 0x364 0x7b8 0x3 0x0 +#define MX6QDL_PAD_SD2_DAT2__KEY_ROW6 0x050 0x364 0x8f8 0x4 0x0 +#define MX6QDL_PAD_SD2_DAT2__GPIO1_IO13 0x050 0x364 0x000 0x5 0x0 +#define MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x054 0x368 0x000 0x0 0x0 +#define MX6QDL_PAD_SD2_DAT0__ECSPI5_MISO0x054 0x368 0x82c 0x1 0x0 +#define MX6QDL_PAD_SD2_DAT0__AUD4_RXD 0x054 0x368 0x7b4 0x3 0x0 +#define MX6QDL_PAD_SD2_DAT0__KEY_ROW7 0x054 0x368 0x8fc 0x4 0x0 +#define MX6QDL_PAD_SD2_DAT0__GPIO1_IO15 0x054 0x368 0x000 0x5 0x0 +#define MX6QDL_PAD_SD2_DAT0__DCIC2_OUT 0x054 0x368 0x000 0x6 0x0 +#define MX6QDL_PAD_RGMII_TXC__USB_H2_DATA 0x058 0x36c 0x000 0x0 0x0 +#define MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x058 0x36c 0x000 0x1 0x0 +#define MX6QDL_PAD_RGMII_TXC__SPDIF_EXT_CLK 0x058 0x36c 0x918 0x2 0x0 +#define MX6QDL_PAD_RGMII_TXC__GPIO6_IO190x058 0x36c 0x000 0x5 0x0 +#define MX6QDL_PAD_RGMII_TXC__XTALOSC_REF_CLK_24M 0x058 0x36c 0x000 0x7 0x0 +#define MX6QDL_PAD_RGMII_TD0__HSI_TX_READY 0x05c 0x370 0x000 0x0 0x0 +#define MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x05c 0x370 0x000 0x1 0x0 +#define MX6QDL_PAD_RGMII_TD0__GPIO6_IO200x05c 0x370 0x000 0x5 0x0 +#define MX6QDL_PAD_RGMII_TD1__HSI_RX_FLAG 0x060 0x374 0x000 0x0 0x0 +#define MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x060 0x374 0x000 0x1 0x0 +#define MX6QDL_PAD_RGMII_TD1__GPIO6_IO210x060 0x374 0x000 0x5 0x0 +#define MX6QDL_PAD_RGMII_TD2__HSI_RX_DATA 0x064 0x378 0x000 0x0 0x0 +#define MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x064 0x378 0x000 0x1 0x0 +#define MX6QDL_PAD_RGMII_TD2__GPIO6_IO220x064 0x378 0x000 0x5 0x0 +#define MX6QDL_PAD_RGMII_TD3__HSI_RX_WAKE 0x068 0x37c 0x000 0x0 0x0 +#define MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x068 0x37c 0x000 0x1 0x0 +#define MX6QDL_PAD_RGMII_TD3__GPIO6_IO230x068 0x37c 0x000 0x5 0x0 +#define MX6QDL_PAD_RGMII_RX_CTL__USB_H3_DATA0x06c 0x380 0x000 0x0 0x0 +#define MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x06c 0x380 0x858 0x1 0x0 +#define MX6QDL_PAD_RGMII_RX_CTL__GPIO6_IO24 0x06c 0x380 0x000 0x5 0x0 +#define MX6QDL_PAD_RGMII_RD0__HSI_RX_READY 0x070 0x384 0x000 0x0 0x0 +#define MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x070 0x384 0x848 0x1 0x0 +#define MX6QDL_PAD_RGMII_RD0__GPIO6_IO250x070 0x384 0x000 0x5 0x0 +#define MX6QDL_PAD_RGMII_TX_CTL__USB_H2_STROBE 0x074 0x388 0x000 0x0 0x0 +#define MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x074 0x388 0x000 0x1 0x0 +#define MX6QDL_PAD_RGMII_TX_CTL__GPIO6_IO26 0x074 0x388 0x000 0x5 0x0 +#define MX6QDL_PAD_RGMII_TX_CTL__ENET_REF_CLK 0x074 0x388 0x83c 0x7 0x0 +#define MX6QDL_PAD_RGMII_RD1__HSI_TX_FLAG 0x078 0x38c 0x000 0x0 0x0 +#define MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x078 0x38c 0x84c 0x1 0x0 +#define MX6QDL_PAD_RGMII_RD1__GPIO6_IO270x078 0x38c 0x000
[U-Boot] [PATCH v5 14/21] engicam: icorem6: Add DM_GPIO, DM_MMC support
From: Jagan TekiAdd DM_GPIO, DM_MMC support for u-boot and disable for SPL. Cc: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- arch/arm/cpu/armv7/mx6/Kconfig | 2 + board/engicam/icorem6/icorem6.c | 142 include/configs/imx6qdl_icore.h | 4 ++ 3 files changed, 78 insertions(+), 70 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig index e2431a8..762a581 100644 --- a/arch/arm/cpu/armv7/mx6/Kconfig +++ b/arch/arm/cpu/armv7/mx6/Kconfig @@ -100,6 +100,8 @@ config TARGET_MX6Q_ICORE select MX6QDL select OF_CONTROL select DM + select DM_GPIO + select DM_MMC select DM_THERMAL select SUPPORT_SPL diff --git a/board/engicam/icorem6/icorem6.c b/board/engicam/icorem6/icorem6.c index a23cb7e..a370c8b 100644 --- a/board/engicam/icorem6/icorem6.c +++ b/board/engicam/icorem6/icorem6.c @@ -7,8 +7,6 @@ */ #include -#include -#include #include #include @@ -29,10 +27,6 @@ DECLARE_GLOBAL_DATA_PTR; PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS) -#define USDHC_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ - PAD_CTL_PUS_22K_UP | PAD_CTL_SPEED_LOW | \ - PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS) - #define ENET_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE |\ PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ PAD_CTL_DSE_40ohm | PAD_CTL_HYS) @@ -55,70 +49,6 @@ static iomux_v3_cfg_t const enet_pads[] = { IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL)), }; -static iomux_v3_cfg_t const usdhc1_pads[] = { - IOMUX_PADS(PAD_SD1_CLK__SD1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), - IOMUX_PADS(PAD_SD1_CMD__SD1_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), - IOMUX_PADS(PAD_SD1_DAT0__SD1_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), - IOMUX_PADS(PAD_SD1_DAT1__SD1_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), - IOMUX_PADS(PAD_SD1_DAT2__SD1_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), - IOMUX_PADS(PAD_SD1_DAT3__SD1_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), - IOMUX_PADS(PAD_GPIO_1__GPIO1_IO01 | MUX_PAD_CTRL(NO_PAD_CTRL)),/* CD */ -}; - -#ifdef CONFIG_FSL_ESDHC -#define USDHC1_CD_GPIO IMX_GPIO_NR(1, 1) - -struct fsl_esdhc_cfg usdhc_cfg[1] = { - {USDHC1_BASE_ADDR, 0, 4}, -}; - -int board_mmc_getcd(struct mmc *mmc) -{ - struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; - int ret = 0; - - switch (cfg->esdhc_base) { - case USDHC1_BASE_ADDR: - ret = !gpio_get_value(USDHC1_CD_GPIO); - break; - } - - return ret; -} - -int board_mmc_init(bd_t *bis) -{ - int i, ret; - - /* - * According to the board_mmc_init() the following map is done: - * (U-boot device node)(Physical Port) - * mmc0 USDHC1 - */ - for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) { - switch (i) { - case 0: - SETUP_IOMUX_PADS(usdhc1_pads); - gpio_direction_input(USDHC1_CD_GPIO); - usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); - break; - default: - printf("Warning - USDHC%d controller not supporting\n", - i + 1); - return 0; - } - - ret = fsl_esdhc_initialize(bis, _cfg[i]); - if (ret) { - printf("Warning: failed to initialize mmc dev %d\n", i); - return ret; - } - } - - return 0; -} -#endif - #ifdef CONFIG_FEC_MXC #define ENET_PHY_RST IMX_GPIO_NR(7, 12) static int setup_fec(void) @@ -200,6 +130,78 @@ int dram_init(void) #include #include +/* MMC board initialization is needed till adding DM support in SPL */ +#if defined(CONFIG_FSL_ESDHC) && !defined(CONFIG_DM_MMC) +#include +#include + +#define USDHC_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ + PAD_CTL_PUS_22K_UP | PAD_CTL_SPEED_LOW | \ + PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS) + +static iomux_v3_cfg_t const usdhc1_pads[] = { + IOMUX_PADS(PAD_SD1_CLK__SD1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), + IOMUX_PADS(PAD_SD1_CMD__SD1_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), + IOMUX_PADS(PAD_SD1_DAT0__SD1_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), + IOMUX_PADS(PAD_SD1_DAT1__SD1_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), + IOMUX_PADS(PAD_SD1_DAT2__SD1_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), +
[U-Boot] [PATCH v5 15/21] arm: dts: Add devicetree for i.MX6Q
From: Jagan TekiAdd i.MX6Q dtsi support from Linux. Here is the last commit: "ARM: dts: add gpio-ranges property to iMX GPIO controllers" (sha1: bb728d662bed0fe91b152550e640cb3f6caa972c) Cc: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- arch/arm/dts/imx6q.dtsi | 300 1 file changed, 300 insertions(+) create mode 100644 arch/arm/dts/imx6q.dtsi diff --git a/arch/arm/dts/imx6q.dtsi b/arch/arm/dts/imx6q.dtsi new file mode 100644 index 000..c30c836 --- /dev/null +++ b/arch/arm/dts/imx6q.dtsi @@ -0,0 +1,300 @@ + +/* + * Copyright 2013 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include +#include "imx6q-pinfunc.h" +#include "imx6qdl.dtsi" + +/ { + aliases { + ipu1 = + spi4 = + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu@0 { + compatible = "arm,cortex-a9"; + device_type = "cpu"; + reg = <0>; + next-level-cache = <>; + operating-points = < + /* kHzuV */ + 120 1275000 + 996000 125 + 852000 125 + 792000 1175000 + 396000 975000 + >; + fsl,soc-operating-points = < + /* ARM kHz SOC-PU uV */ + 120 1275000 + 996000 125 + 852000 125 + 792000 1175000 + 396000 1175000 + >; + clock-latency = <61036>; /* two CLK32 periods */ + clocks = < IMX6QDL_CLK_ARM>, +< IMX6QDL_CLK_PLL2_PFD2_396M>, +< IMX6QDL_CLK_STEP>, +< IMX6QDL_CLK_PLL1_SW>, +< IMX6QDL_CLK_PLL1_SYS>; + clock-names = "arm", "pll2_pfd2_396m", "step", + "pll1_sw", "pll1_sys"; + arm-supply = <_arm>; + pu-supply = <_pu>; + soc-supply = <_soc>; + }; + + cpu@1 { + compatible = "arm,cortex-a9"; + device_type = "cpu"; + reg = <1>; + next-level-cache = <>; + }; + + cpu@2 { + compatible = "arm,cortex-a9"; + device_type = "cpu"; + reg = <2>; + next-level-cache = <>; + }; + + cpu@3 { + compatible = "arm,cortex-a9"; + device_type = "cpu"; + reg = <3>; + next-level-cache = <>; + }; + }; + + soc { + ocram: sram@0090 { + compatible = "mmio-sram"; + reg = <0x0090 0x4>; + clocks = < IMX6QDL_CLK_OCRAM>; + }; + + aips-bus@0200 { /* AIPS1 */ + spba-bus@0200 { + ecspi5: ecspi@02018000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi"; + reg = <0x02018000 0x4000>; + interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>; + clocks = < IMX6Q_CLK_ECSPI5>, +< IMX6Q_CLK_ECSPI5>; + clock-names = "ipg", "per"; + dmas = < 11 7 1>, < 12 7 2>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + }; + + iomuxc: iomuxc@020e { + compatible = "fsl,imx6q-iomuxc"; + }; + }; + + sata: sata@0220
[U-Boot] [PATCH v5 13/21] imx6q: icorem6: Enable pinctrl driver
From: Jagan TekiEnable imx6 pinctrl driver support for i.CoreM6. Cc: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- configs/imx6qdl_icore_mmc_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/imx6qdl_icore_mmc_defconfig b/configs/imx6qdl_icore_mmc_defconfig index 6870c06..b2d8cdf 100644 --- a/configs/imx6qdl_icore_mmc_defconfig +++ b/configs/imx6qdl_icore_mmc_defconfig @@ -30,3 +30,5 @@ CONFIG_FEC_MXC=y CONFIG_MXC_UART=y CONFIG_NETDEVICES=y CONFIG_IMX_THERMAL=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX6=y -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 12/21] arm: imx6q: Add devicetree support for Engicam i.CoreM6 DualLite/Solo
From: Jagan Tekii.CoreM6 DualLite/Solo modules are system on module solutions manufactured by Engicam with following characteristics: CPU NXP i.MX6 DL, 800MHz RAM 1GB, 32, 64 bit, DDR3-800/1066 NAND SLC,512MB Power supply Single 5V MAX LCD RES FULLHD and more info at http://www.engicam.com/en/products/embedded/som/sodimm/i-core-m6s-dl-d-q Cc: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- arch/arm/cpu/armv7/mx6/Kconfig | 1 + arch/arm/dts/Makefile | 3 +- arch/arm/dts/imx6dl-icore.dts | 59 +++ arch/arm/dts/imx6qdl-icore.dtsi | 196 board/engicam/icorem6/README| 6 +- configs/imx6qdl_icore_mmc_defconfig | 1 + 6 files changed, 262 insertions(+), 4 deletions(-) create mode 100644 arch/arm/dts/imx6dl-icore.dts create mode 100644 arch/arm/dts/imx6qdl-icore.dtsi diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig index 5d549bd..e2431a8 100644 --- a/arch/arm/cpu/armv7/mx6/Kconfig +++ b/arch/arm/cpu/armv7/mx6/Kconfig @@ -98,6 +98,7 @@ config TARGET_MX6QARM2 config TARGET_MX6Q_ICORE bool "Support Engicam i.Core" select MX6QDL + select OF_CONTROL select DM select DM_THERMAL select SUPPORT_SPL diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 74d6ed2..39c1d2c 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -273,7 +273,8 @@ dtb-$(CONFIG_VF610) += vf500-colibri.dtb \ dtb-$(CONFIG_MX7) += imx7-colibri.dtb -dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb +dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \ + imx6dl-icore.dtb dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \ k2l-evm.dtb \ diff --git a/arch/arm/dts/imx6dl-icore.dts b/arch/arm/dts/imx6dl-icore.dts new file mode 100644 index 000..aec332c --- /dev/null +++ b/arch/arm/dts/imx6dl-icore.dts @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2016 Amarula Solutions B.V. + * Copyright (C) 2016 Engicam S.r.l. + * + * 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 + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This file is distributed in the hope that it will be useful + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; + +#include "imx6dl.dtsi" +#include "imx6qdl-icore.dtsi" + +/ { + model = "Engicam i.CoreM6 DualLite/Solo Starter Kit"; + compatible = "engicam,imx6-icore", "fsl,imx6dl"; +}; + + { + status = "okay"; +}; + + { + status = "okay"; +}; diff --git a/arch/arm/dts/imx6qdl-icore.dtsi b/arch/arm/dts/imx6qdl-icore.dtsi new file mode 100644 index 000..f424cd5 --- /dev/null +++ b/arch/arm/dts/imx6qdl-icore.dtsi @@ -0,0 +1,196 @@ +/* + * Copyright (C) 2016 Amarula Solutions B.V. + * Copyright (C) 2016 Engicam S.r.l. + * + * 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 + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + *
[U-Boot] [PATCH v5 11/21] dt-bindings: clock: imx6qdl: Add clock defines
From: Jagan TekiAdd imx6qdl clock header defines support from Linux. "clk: imx: Add clock support for imx6qp" (sha1: ee36027427c769b0b9e5e205fe43aced93d6aa66) Cc: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- include/dt-bindings/clock/imx6qdl-clock.h | 274 ++ 1 file changed, 274 insertions(+) create mode 100644 include/dt-bindings/clock/imx6qdl-clock.h diff --git a/include/dt-bindings/clock/imx6qdl-clock.h b/include/dt-bindings/clock/imx6qdl-clock.h new file mode 100644 index 000..2905033 --- /dev/null +++ b/include/dt-bindings/clock/imx6qdl-clock.h @@ -0,0 +1,274 @@ +/* + * Copyright 2014 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __DT_BINDINGS_CLOCK_IMX6QDL_H +#define __DT_BINDINGS_CLOCK_IMX6QDL_H + +#define IMX6QDL_CLK_DUMMY 0 +#define IMX6QDL_CLK_CKIL 1 +#define IMX6QDL_CLK_CKIH 2 +#define IMX6QDL_CLK_OSC3 +#define IMX6QDL_CLK_PLL2_PFD0_352M 4 +#define IMX6QDL_CLK_PLL2_PFD1_594M 5 +#define IMX6QDL_CLK_PLL2_PFD2_396M 6 +#define IMX6QDL_CLK_PLL3_PFD0_720M 7 +#define IMX6QDL_CLK_PLL3_PFD1_540M 8 +#define IMX6QDL_CLK_PLL3_PFD2_508M 9 +#define IMX6QDL_CLK_PLL3_PFD3_454M 10 +#define IMX6QDL_CLK_PLL2_198M 11 +#define IMX6QDL_CLK_PLL3_120M 12 +#define IMX6QDL_CLK_PLL3_80M 13 +#define IMX6QDL_CLK_PLL3_60M 14 +#define IMX6QDL_CLK_TWD15 +#define IMX6QDL_CLK_STEP 16 +#define IMX6QDL_CLK_PLL1_SW17 +#define IMX6QDL_CLK_PERIPH_PRE 18 +#define IMX6QDL_CLK_PERIPH2_PRE19 +#define IMX6QDL_CLK_PERIPH_CLK2_SEL20 +#define IMX6QDL_CLK_PERIPH2_CLK2_SEL 21 +#define IMX6QDL_CLK_AXI_SEL22 +#define IMX6QDL_CLK_ESAI_SEL 23 +#define IMX6QDL_CLK_ASRC_SEL 24 +#define IMX6QDL_CLK_SPDIF_SEL 25 +#define IMX6QDL_CLK_GPU2D_AXI 26 +#define IMX6QDL_CLK_GPU3D_AXI 27 +#define IMX6QDL_CLK_GPU2D_CORE_SEL 28 +#define IMX6QDL_CLK_GPU3D_CORE_SEL 29 +#define IMX6QDL_CLK_GPU3D_SHADER_SEL 30 +#define IMX6QDL_CLK_IPU1_SEL 31 +#define IMX6QDL_CLK_IPU2_SEL 32 +#define IMX6QDL_CLK_LDB_DI0_SEL33 +#define IMX6QDL_CLK_LDB_DI1_SEL34 +#define IMX6QDL_CLK_IPU1_DI0_PRE_SEL 35 +#define IMX6QDL_CLK_IPU1_DI1_PRE_SEL 36 +#define IMX6QDL_CLK_IPU2_DI0_PRE_SEL 37 +#define IMX6QDL_CLK_IPU2_DI1_PRE_SEL 38 +#define IMX6QDL_CLK_IPU1_DI0_SEL 39 +#define IMX6QDL_CLK_IPU1_DI1_SEL 40 +#define IMX6QDL_CLK_IPU2_DI0_SEL 41 +#define IMX6QDL_CLK_IPU2_DI1_SEL 42 +#define IMX6QDL_CLK_HSI_TX_SEL 43 +#define IMX6QDL_CLK_PCIE_AXI_SEL 44 +#define IMX6QDL_CLK_SSI1_SEL 45 +#define IMX6QDL_CLK_SSI2_SEL 46 +#define IMX6QDL_CLK_SSI3_SEL 47 +#define IMX6QDL_CLK_USDHC1_SEL 48 +#define IMX6QDL_CLK_USDHC2_SEL 49 +#define IMX6QDL_CLK_USDHC3_SEL 50 +#define IMX6QDL_CLK_USDHC4_SEL 51 +#define IMX6QDL_CLK_ENFC_SEL 52 +#define IMX6QDL_CLK_EIM_SEL53 +#define IMX6QDL_CLK_EIM_SLOW_SEL 54 +#define IMX6QDL_CLK_VDO_AXI_SEL55 +#define IMX6QDL_CLK_VPU_AXI_SEL56 +#define IMX6QDL_CLK_CKO1_SEL 57 +#define IMX6QDL_CLK_PERIPH 58 +#define IMX6QDL_CLK_PERIPH259 +#define IMX6QDL_CLK_PERIPH_CLK260 +#define IMX6QDL_CLK_PERIPH2_CLK2 61 +#define IMX6QDL_CLK_IPG62 +#define IMX6QDL_CLK_IPG_PER63 +#define IMX6QDL_CLK_ESAI_PRED 64 +#define IMX6QDL_CLK_ESAI_PODF 65 +#define IMX6QDL_CLK_ASRC_PRED 66 +#define IMX6QDL_CLK_ASRC_PODF 67 +#define IMX6QDL_CLK_SPDIF_PRED 68 +#define IMX6QDL_CLK_SPDIF_PODF 69 +#define IMX6QDL_CLK_CAN_ROOT 70 +#define IMX6QDL_CLK_ECSPI_ROOT 71 +#define IMX6QDL_CLK_GPU2D_CORE_PODF72 +#define
[U-Boot] [PATCH v5 10/21] arm: dts: imx6dl: Add pinctrl defines
From: Jagan TekiAdd imx6dl pinctrl defines support from Linux. Here is the last commit: "ARM: dts: imx: pinfunc: add MX6QDL_PAD_GPIO_6__ENET_IRQ" (sha1: d8c765e0d1ddbd5032c2491c82cc9660c2f0e7f2) Cc: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- arch/arm/dts/imx6dl-pinfunc.h | 1091 + 1 file changed, 1091 insertions(+) create mode 100644 arch/arm/dts/imx6dl-pinfunc.h diff --git a/arch/arm/dts/imx6dl-pinfunc.h b/arch/arm/dts/imx6dl-pinfunc.h new file mode 100644 index 000..0ead323 --- /dev/null +++ b/arch/arm/dts/imx6dl-pinfunc.h @@ -0,0 +1,1091 @@ +/* + * Copyright 2013 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef __DTS_IMX6DL_PINFUNC_H +#define __DTS_IMX6DL_PINFUNC_H + +/* + * The pin function ID is a tuple of + * + */ +#define MX6QDL_PAD_CSI0_DAT10__IPU1_CSI0_DATA10 0x04c 0x360 0x000 0x0 0x0 +#define MX6QDL_PAD_CSI0_DAT10__AUD3_RXC 0x04c 0x360 0x000 0x1 0x0 +#define MX6QDL_PAD_CSI0_DAT10__ECSPI2_MISO 0x04c 0x360 0x7f8 0x2 0x0 +#define MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA0x04c 0x360 0x000 0x3 0x0 +#define MX6QDL_PAD_CSI0_DAT10__UART1_RX_DATA0x04c 0x360 0x8fc 0x3 0x0 +#define MX6QDL_PAD_CSI0_DAT10__GPIO5_IO28 0x04c 0x360 0x000 0x5 0x0 +#define MX6QDL_PAD_CSI0_DAT10__ARM_TRACE07 0x04c 0x360 0x000 0x7 0x0 +#define MX6QDL_PAD_CSI0_DAT11__IPU1_CSI0_DATA11 0x050 0x364 0x000 0x0 0x0 +#define MX6QDL_PAD_CSI0_DAT11__AUD3_RXFS0x050 0x364 0x000 0x1 0x0 +#define MX6QDL_PAD_CSI0_DAT11__ECSPI2_SS0 0x050 0x364 0x800 0x2 0x0 +#define MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA0x050 0x364 0x8fc 0x3 0x1 +#define MX6QDL_PAD_CSI0_DAT11__UART1_TX_DATA0x050 0x364 0x000 0x3 0x0 +#define MX6QDL_PAD_CSI0_DAT11__GPIO5_IO29 0x050 0x364 0x000 0x5 0x0 +#define MX6QDL_PAD_CSI0_DAT11__ARM_TRACE08 0x050 0x364 0x000 0x7 0x0 +#define MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12 0x054 0x368 0x000 0x0 0x0 +#define MX6QDL_PAD_CSI0_DAT12__EIM_DATA08 0x054 0x368 0x000 0x1 0x0 +#define MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA0x054 0x368 0x000 0x3 0x0 +#define MX6QDL_PAD_CSI0_DAT12__UART4_RX_DATA0x054 0x368 0x914 0x3 0x0 +#define MX6QDL_PAD_CSI0_DAT12__GPIO5_IO30 0x054 0x368 0x000 0x5 0x0 +#define MX6QDL_PAD_CSI0_DAT12__ARM_TRACE09 0x054 0x368 0x000 0x7 0x0 +#define MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13 0x058 0x36c 0x000 0x0 0x0 +#define MX6QDL_PAD_CSI0_DAT13__EIM_DATA09 0x058 0x36c 0x000 0x1 0x0 +#define MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA0x058 0x36c 0x914 0x3 0x1 +#define MX6QDL_PAD_CSI0_DAT13__UART4_TX_DATA0x058 0x36c 0x000 0x3 0x0 +#define MX6QDL_PAD_CSI0_DAT13__GPIO5_IO31 0x058 0x36c 0x000 0x5 0x0 +#define MX6QDL_PAD_CSI0_DAT13__ARM_TRACE10 0x058 0x36c 0x000 0x7 0x0 +#define MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14 0x05c 0x370 0x000 0x0 0x0 +#define MX6QDL_PAD_CSI0_DAT14__EIM_DATA10 0x05c 0x370 0x000 0x1 0x0 +#define MX6QDL_PAD_CSI0_DAT14__UART5_TX_DATA0x05c 0x370 0x000 0x3 0x0 +#define MX6QDL_PAD_CSI0_DAT14__UART5_RX_DATA0x05c 0x370 0x91c 0x3 0x0 +#define MX6QDL_PAD_CSI0_DAT14__GPIO6_IO00 0x05c 0x370 0x000 0x5 0x0 +#define MX6QDL_PAD_CSI0_DAT14__ARM_TRACE11 0x05c 0x370 0x000 0x7 0x0 +#define MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15 0x060 0x374 0x000 0x0 0x0 +#define MX6QDL_PAD_CSI0_DAT15__EIM_DATA11 0x060 0x374 0x000 0x1 0x0 +#define MX6QDL_PAD_CSI0_DAT15__UART5_RX_DATA0x060 0x374 0x91c 0x3 0x1 +#define MX6QDL_PAD_CSI0_DAT15__UART5_TX_DATA0x060 0x374 0x000 0x3 0x0 +#define MX6QDL_PAD_CSI0_DAT15__GPIO6_IO01 0x060 0x374 0x000 0x5 0x0 +#define MX6QDL_PAD_CSI0_DAT15__ARM_TRACE12 0x060 0x374 0x000 0x7 0x0 +#define MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16 0x064 0x378 0x000 0x0 0x0 +#define MX6QDL_PAD_CSI0_DAT16__EIM_DATA12 0x064 0x378 0x000 0x1 0x0 +#define MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B 0x064 0x378 0x910 0x3 0x0 +#define MX6QDL_PAD_CSI0_DAT16__UART4_CTS_B 0x064 0x378 0x000 0x3 0x0 +#define MX6QDL_PAD_CSI0_DAT16__GPIO6_IO02 0x064 0x378 0x000 0x5 0x0 +#define MX6QDL_PAD_CSI0_DAT16__ARM_TRACE13 0x064 0x378 0x000 0x7 0x0 +#define MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17 0x068 0x37c 0x000 0x0 0x0 +#define MX6QDL_PAD_CSI0_DAT17__EIM_DATA13 0x068 0x37c 0x000 0x1 0x0 +#define MX6QDL_PAD_CSI0_DAT17__UART4_CTS_B 0x068 0x37c 0x000 0x3 0x0 +#define MX6QDL_PAD_CSI0_DAT17__UART4_RTS_B 0x068
[U-Boot] [PATCH v5 09/21] arm: dts: Add devicetree for i.MX6DQL
From: Jagan TekiAdd i.MX6DQL dtsi support from Linux. Here is the last commit: "ARM: dts: imx6qdl: Fix SPDIF regression" (sha1: f065e9e4addd75c21bb976bb2558648bf4f61de6) Cc: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- arch/arm/dts/imx6qdl.dtsi | 1281 + 1 file changed, 1281 insertions(+) create mode 100644 arch/arm/dts/imx6qdl.dtsi diff --git a/arch/arm/dts/imx6qdl.dtsi b/arch/arm/dts/imx6qdl.dtsi new file mode 100644 index 000..b13b0b2 --- /dev/null +++ b/arch/arm/dts/imx6qdl.dtsi @@ -0,0 +1,1281 @@ +/* + * Copyright 2011 Freescale Semiconductor, Inc. + * Copyright 2011 Linaro Ltd. + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#include +#include + +#include "skeleton.dtsi" + +/ { + aliases { + ethernet0 = + can0 = + can1 = + gpio0 = + gpio1 = + gpio2 = + gpio3 = + gpio4 = + gpio5 = + gpio6 = + i2c0 = + i2c1 = + i2c2 = + ipu0 = + mmc0 = + mmc1 = + mmc2 = + mmc3 = + serial0 = + serial1 = + serial2 = + serial3 = + serial4 = + spi0 = + spi1 = + spi2 = + spi3 = + usbphy0 = + usbphy1 = + }; + + clocks { + #address-cells = <1>; + #size-cells = <0>; + + ckil { + compatible = "fsl,imx-ckil", "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + }; + + ckih1 { + compatible = "fsl,imx-ckih1", "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + osc { + compatible = "fsl,imx-osc", "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <2400>; + }; + }; + + soc { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + interrupt-parent = <>; + ranges; + + dma_apbh: dma-apbh@0011 { + compatible = "fsl,imx6q-dma-apbh", "fsl,imx28-dma-apbh"; + reg = <0x0011 0x2000>; + interrupts = <0 13 IRQ_TYPE_LEVEL_HIGH>, +<0 13 IRQ_TYPE_LEVEL_HIGH>, +<0 13 IRQ_TYPE_LEVEL_HIGH>, +<0 13 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "gpmi0", "gpmi1", "gpmi2", "gpmi3"; + #dma-cells = <1>; + dma-channels = <4>; + clocks = < IMX6QDL_CLK_APBH_DMA>; + }; + + gpmi: gpmi-nand@00112000 { + compatible = "fsl,imx6q-gpmi-nand"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x00112000 0x2000>, <0x00114000 0x2000>; + reg-names = "gpmi-nand", "bch"; + interrupts = <0 15 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "bch"; + clocks = < IMX6QDL_CLK_GPMI_IO>, +< IMX6QDL_CLK_GPMI_APB>, +< IMX6QDL_CLK_GPMI_BCH>, +< IMX6QDL_CLK_GPMI_BCH_APB>, +< IMX6QDL_CLK_PER1_BCH>; + clock-names = "gpmi_io", "gpmi_apb", "gpmi_bch", + "gpmi_bch_apb", "per1_bch"; + dmas = <_apbh 0>; + dma-names = "rx-tx"; + status = "disabled"; + }; + + hdmi: hdmi@012 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x0012 0x9000>; + interrupts = <0 115 0x04>; + gpr = <>; + clocks = < IMX6QDL_CLK_HDMI_IAHB>, +<
[U-Boot] [PATCH v5 08/21] arm: dts: Add devicetree for i.MX6DL
From: Jagan TekiAdd i.MX6DL dtsi support from Linux. Here is the last commit: "ARM: dts: add gpio-ranges property to iMX GPIO controllers" (sha1: bb728d662bed0fe91b152550e640cb3f6caa972c) Cc: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- arch/arm/dts/imx6dl.dtsi | 133 +++ 1 file changed, 133 insertions(+) create mode 100644 arch/arm/dts/imx6dl.dtsi diff --git a/arch/arm/dts/imx6dl.dtsi b/arch/arm/dts/imx6dl.dtsi new file mode 100644 index 000..9a4c22c --- /dev/null +++ b/arch/arm/dts/imx6dl.dtsi @@ -0,0 +1,133 @@ + +/* + * Copyright 2013 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include +#include "imx6dl-pinfunc.h" +#include "imx6qdl.dtsi" + +/ { + aliases { + i2c3 = + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + compatible = "arm,cortex-a9"; + device_type = "cpu"; + reg = <0>; + next-level-cache = <>; + operating-points = < + /* kHzuV */ + 996000 125 + 792000 1175000 + 396000 115 + >; + fsl,soc-operating-points = < + /* ARM kHz SOC-PU uV */ + 996000 1175000 + 792000 1175000 + 396000 1175000 + >; + clock-latency = <61036>; /* two CLK32 periods */ + clocks = < IMX6QDL_CLK_ARM>, +< IMX6QDL_CLK_PLL2_PFD2_396M>, +< IMX6QDL_CLK_STEP>, +< IMX6QDL_CLK_PLL1_SW>, +< IMX6QDL_CLK_PLL1_SYS>; + clock-names = "arm", "pll2_pfd2_396m", "step", + "pll1_sw", "pll1_sys"; + arm-supply = <_arm>; + pu-supply = <_pu>; + soc-supply = <_soc>; + }; + + cpu@1 { + compatible = "arm,cortex-a9"; + device_type = "cpu"; + reg = <1>; + next-level-cache = <>; + }; + }; + + soc { + ocram: sram@0090 { + compatible = "mmio-sram"; + reg = <0x0090 0x2>; + clocks = < IMX6QDL_CLK_OCRAM>; + }; + + aips1: aips-bus@0200 { + iomuxc: iomuxc@020e { + compatible = "fsl,imx6dl-iomuxc"; + }; + + pxp: pxp@020f { + reg = <0x020f 0x4000>; + interrupts = <0 98 IRQ_TYPE_LEVEL_HIGH>; + }; + + epdc: epdc@020f4000 { + reg = <0x020f4000 0x4000>; + interrupts = <0 97 IRQ_TYPE_LEVEL_HIGH>; + }; + + lcdif: lcdif@020f8000 { + reg = <0x020f8000 0x4000>; + interrupts = <0 39 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + + aips2: aips-bus@0210 { + i2c4: i2c@021f8000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c"; + reg = <0x021f8000 0x4000>; + interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>; + clocks = < IMX6DL_CLK_I2C4>; + status = "disabled"; + }; + }; + }; + + display-subsystem { + compatible = "fsl,imx-display-subsystem"; + ports = <_di0>, <_di1>; + }; + + gpu-subsystem { + compatible = "fsl,imx-gpu-subsystem"; + cores = <_2d>, <_3d>; + }; +}; + + { + compatible = "fsl,imx6dl-gpt"; +}; + + { + compatible = "fsl,imx6dl-hdmi"; +}; + + { + clocks = < IMX6QDL_CLK_LDB_DI0_SEL>, <
[U-Boot] [PATCH v5 07/21] imx: s/docs\/README.imximage/doc\/README.imximage/g
From: Jagan TekiFixed typo for doc/README.imximage on respective imximage.cfg files. Cc: Tom Rini Cc: Stefano Babic Cc: Fabio Estevam Acked-by: Peng Fan Signed-off-by: Jagan Teki --- board/barco/titanium/imximage.cfg | 2 +- board/ccv/xpress/imximage.cfg | 2 +- board/denx/m53evk/imximage.cfg | 2 +- board/freescale/mx6sabresd/mx6dlsabresd.cfg | 2 +- board/freescale/mx6slevk/imximage.cfg | 2 +- board/freescale/mx6ullevk/imximage.cfg | 2 +- board/freescale/mx7dsabresd/imximage.cfg| 2 +- board/freescale/s32v234evb/s32v234evb.cfg | 2 +- board/freescale/vf610twr/imximage.cfg | 2 +- board/phytec/pcm052/imximage.cfg| 2 +- board/technexion/pico-imx6ul/imximage.cfg | 2 +- board/toradex/colibri_imx7/imximage.cfg | 2 +- board/toradex/colibri_vf/imximage.cfg | 2 +- board/warp/imximage.cfg | 2 +- board/warp7/imximage.cfg| 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/board/barco/titanium/imximage.cfg b/board/barco/titanium/imximage.cfg index 7219256..4fb6982 100644 --- a/board/barco/titanium/imximage.cfg +++ b/board/barco/titanium/imximage.cfg @@ -7,7 +7,7 @@ * * SPDX-License-Identifier:GPL-2.0+ * - * Refer docs/README.imxmage for more details about how-to configure + * Refer doc/README.imximage for more details about how-to configure * and create imximage boot image * * The syntax is taken as close as possible with the kwbimage diff --git a/board/ccv/xpress/imximage.cfg b/board/ccv/xpress/imximage.cfg index 92167c9..d98bc36 100644 --- a/board/ccv/xpress/imximage.cfg +++ b/board/ccv/xpress/imximage.cfg @@ -3,7 +3,7 @@ * * SPDX-License-Identifier:GPL-2.0+ * - * Refer docs/README.imxmage for more details about how-to configure + * Refer doc/README.imximage for more details about how-to configure * and create imximage boot image * * The syntax is taken as close as possible with the kwbimage diff --git a/board/denx/m53evk/imximage.cfg b/board/denx/m53evk/imximage.cfg index 4cd002c..c0e2602 100644 --- a/board/denx/m53evk/imximage.cfg +++ b/board/denx/m53evk/imximage.cfg @@ -4,7 +4,7 @@ * * SPDX-License-Identifier:GPL-2.0+ * - * Refer docs/README.imxmage for more details about how-to configure + * Refer doc/README.imximage for more details about how-to configure * and create imximage boot image * * The syntax is taken as close as possible with the kwbimage diff --git a/board/freescale/mx6sabresd/mx6dlsabresd.cfg b/board/freescale/mx6sabresd/mx6dlsabresd.cfg index f35f22e..be9f87f 100644 --- a/board/freescale/mx6sabresd/mx6dlsabresd.cfg +++ b/board/freescale/mx6sabresd/mx6dlsabresd.cfg @@ -3,7 +3,7 @@ * * SPDX-License-Identifier:GPL-2.0+ * - * Refer docs/README.imxmage for more details about how-to configure + * Refer doc/README.imximage for more details about how-to configure * and create imximage boot image * * The syntax is taken as close as possible with the kwbimage diff --git a/board/freescale/mx6slevk/imximage.cfg b/board/freescale/mx6slevk/imximage.cfg index c77bbde..024de9c 100644 --- a/board/freescale/mx6slevk/imximage.cfg +++ b/board/freescale/mx6slevk/imximage.cfg @@ -3,7 +3,7 @@ * * SPDX-License-Identifier:GPL-2.0+ * - * Refer docs/README.imxmage for more details about how-to configure + * Refer doc/README.imximage for more details about how-to configure * and create imximage boot image * * The syntax is taken as close as possible with the kwbimage diff --git a/board/freescale/mx6ullevk/imximage.cfg b/board/freescale/mx6ullevk/imximage.cfg index 4604b62..3ae4912 100644 --- a/board/freescale/mx6ullevk/imximage.cfg +++ b/board/freescale/mx6ullevk/imximage.cfg @@ -3,7 +3,7 @@ * * SPDX-License-Identifier:GPL-2.0+ * - * Refer docs/README.imxmage for more details about how-to configure + * Refer doc/README.imximage for more details about how-to configure * and create imximage boot image * * The syntax is taken as close as possible with the kwbimage diff --git a/board/freescale/mx7dsabresd/imximage.cfg b/board/freescale/mx7dsabresd/imximage.cfg index 76574ff..c2b3a8c 100644 --- a/board/freescale/mx7dsabresd/imximage.cfg +++ b/board/freescale/mx7dsabresd/imximage.cfg @@ -3,7 +3,7 @@ * * SPDX-License-Identifier:GPL-2.0+ * - * Refer docs/README.imxmage for more details about how-to configure + * Refer doc/README.imximage for more details about how-to configure * and create imximage boot image * * The syntax is taken as close as possible with the kwbimage diff --git a/board/freescale/s32v234evb/s32v234evb.cfg b/board/freescale/s32v234evb/s32v234evb.cfg index 6017a40..6449ef2 100644 --- a/board/freescale/s32v234evb/s32v234evb.cfg +++ b/board/freescale/s32v234evb/s32v234evb.cfg @@ -5,7 +5,7 @@ */ /* - *
[U-Boot] [PATCH v5 06/21] imx6: icorem6: Add ENET support
From: Jagan TekiAdd enet support for engicam icorem6 qdl starter kit. - Add pinmux settings - Add board_eth_init TFTP log: Net: FEC [PRIME] Hit any key to stop autoboot: 0 icorem6qdl> tftpboot {fdt_addr} imx6dl-icore.dtb Using FEC device TFTP from server 192.168.2.96; our IP address is 192.168.2.75 Filename 'imx6dl-icore.dtb'. Load address: 0x0 Loading: ## 1.3 MiB/s done Bytes transferred = 28976 (7130 hex) CACHE: Misaligned operation at range [, 7130] icorem6qdl> Cc: Joe Hershberger Cc: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- board/engicam/icorem6/icorem6.c | 72 + configs/imx6qdl_icore_mmc_defconfig | 4 +++ include/configs/imx6qdl_icore.h | 12 +++ 3 files changed, 88 insertions(+) diff --git a/board/engicam/icorem6/icorem6.c b/board/engicam/icorem6/icorem6.c index 1856972..a23cb7e 100644 --- a/board/engicam/icorem6/icorem6.c +++ b/board/engicam/icorem6/icorem6.c @@ -9,12 +9,15 @@ #include #include #include +#include +#include #include #include #include #include +#include #include #include #include @@ -30,11 +33,28 @@ DECLARE_GLOBAL_DATA_PTR; PAD_CTL_PUS_22K_UP | PAD_CTL_SPEED_LOW | \ PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS) +#define ENET_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE |\ + PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + static iomux_v3_cfg_t const uart4_pads[] = { IOMUX_PADS(PAD_KEY_COL0__UART4_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)), IOMUX_PADS(PAD_KEY_ROW0__UART4_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)), }; +static iomux_v3_cfg_t const enet_pads[] = { + IOMUX_PADS(PAD_ENET_CRS_DV__ENET_RX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL)), + IOMUX_PADS(PAD_GPIO_16__ENET_REF_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL | PAD_CTL_SRE_FAST)), + IOMUX_PADS(PAD_ENET_TX_EN__ENET_TX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL)), + IOMUX_PADS(PAD_ENET_RXD1__ENET_RX_DATA1 | MUX_PAD_CTRL(ENET_PAD_CTRL)), + IOMUX_PADS(PAD_ENET_RXD0__ENET_RX_DATA0 | MUX_PAD_CTRL(ENET_PAD_CTRL)), + IOMUX_PADS(PAD_ENET_TXD1__ENET_TX_DATA1 | MUX_PAD_CTRL(ENET_PAD_CTRL)), + IOMUX_PADS(PAD_ENET_TXD0__ENET_TX_DATA0 | MUX_PAD_CTRL(ENET_PAD_CTRL)), + IOMUX_PADS(PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL)), + IOMUX_PADS(PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL)), + IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL)), +}; + static iomux_v3_cfg_t const usdhc1_pads[] = { IOMUX_PADS(PAD_SD1_CLK__SD1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), IOMUX_PADS(PAD_SD1_CMD__SD1_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), @@ -99,6 +119,58 @@ int board_mmc_init(bd_t *bis) } #endif +#ifdef CONFIG_FEC_MXC +#define ENET_PHY_RST IMX_GPIO_NR(7, 12) +static int setup_fec(void) +{ + struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR; + s32 timeout = 10; + u32 reg = 0; + int ret; + + /* Enable fec clock */ + setbits_le32(>CCGR1, MXC_CCM_CCGR1_ENET_MASK); + + /* use 50MHz */ + ret = enable_fec_anatop_clock(0, ENET_50MHZ); + if (ret) + return ret; + + /* Enable PLLs */ + reg = readl(>pll_enet); + reg &= ~BM_ANADIG_PLL_SYS_POWERDOWN; + writel(reg, >pll_enet); + reg = readl(>pll_enet); + reg |= BM_ANADIG_PLL_SYS_ENABLE; + while (timeout--) { + if (readl(>pll_enet) & BM_ANADIG_PLL_SYS_LOCK) + break; + } + if (timeout <= 0) + return -EIO; + reg &= ~BM_ANADIG_PLL_SYS_BYPASS; + writel(reg, >pll_enet); + + /* reset the phy */ + gpio_direction_output(ENET_PHY_RST, 0); + udelay(1); + gpio_set_value(ENET_PHY_RST, 1); + + return 0; +} + +int board_eth_init(bd_t *bis) +{ + int ret; + + SETUP_IOMUX_PADS(enet_pads); + setup_fec(); + + return ret = cpu_eth_init(bis); +} +#endif + int board_early_init_f(void) { SETUP_IOMUX_PADS(uart4_pads); diff --git a/configs/imx6qdl_icore_mmc_defconfig b/configs/imx6qdl_icore_mmc_defconfig index a658f4b..d304693 100644 --- a/configs/imx6qdl_icore_mmc_defconfig +++ b/configs/imx6qdl_icore_mmc_defconfig @@ -14,6 +14,8 @@ CONFIG_SYS_MAXARGS=32 # CONFIG_CMD_IMLS is not set CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_MMC=y CONFIG_CMD_CACHE=y @@ -23,5 +25,7 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_LIBFDT=y
[U-Boot] [PATCH v5 05/21] net: Kconfig: Add FEC_MXC entry
From: Jagan TekiAdded kconfig for FEC_MXC driver. Cc: Joe Hershberger Cc: Simon Glass Cc: Fabio Estevam Cc: Stefano Babic Cc: Peng Fan Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- drivers/net/Kconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index be3ed73..0c240a5 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -129,6 +129,13 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGA boards. +config FEC_MXC + bool "FEC Ethernet controller" + depends on MX6 + help + This driver supports the 10/100 Fast Ethernet controller for + NXP i.MX processors. + config MVPP2 bool "Marvell Armada 375 network interface support" depends on ARMADA_375 -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 04/21] arm: imx: Add Engicam i.CoreM6 QDL Starter Kit initial support
From: Jagan TekiBoot Log for i.CoreM6 DualLite/Solo Starter Kit: --- U-Boot SPL 2016.09-rc2-30739-gd1fa290 (Sep 17 2016 - 00:37:46) Trying to boot from MMC1 U-Boot 2016.09-rc2-30739-gd1fa290 (Sep 17 2016 - 00:37:46 +0530) CPU: Freescale i.MX6SOLO rev1.3 at 792MHz CPU: Industrial temperature grade (-40C to 105C) at 31C Reset cause: POR DRAM: 256 MiB MMC: FSL_SDHC: 0 *** Warning - bad CRC, using default environment In:serial Out: serial Err: serial Net: CPU Net Initialization Failed No ethernet found. Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device switch to partitions #0, OK mmc0 is current device reading boot.scr ** Unable to read file boot.scr ** reading zImage 6741808 bytes read in 341 ms (18.9 MiB/s) Booting from mmc ... reading imx6dl-icore.dtb 30600 bytes read in 19 ms (1.5 MiB/s) Booting using the fdt blob at 0x1800 Using Device Tree in place at 1800, end 1800a787 Starting kernel ... [0.00] Booting Linux on physical CPU 0x0 Boot Log for i.CoreM6 Quad/Dual Starter Kit: U-Boot SPL 2016.09-rc2-30739-gd1fa290 (Sep 17 2016 - 00:37:46) Trying to boot from MMC1 U-Boot 2016.09-rc2-30739-gd1fa290 (Sep 17 2016 - 00:37:46 +0530) CPU: Freescale i.MX6Q rev1.2 at 792MHz CPU: Industrial temperature grade (-40C to 105C) at 28C Reset cause: POR DRAM: 512 MiB MMC: FSL_SDHC: 0 *** Warning - bad CRC, using default environment In:serial Out: serial Err: serial Net: CPU Net Initialization Failed No ethernet found. Hit any key to stop autoboot: 0 icorem6qdl> Cc: Stefano Babic Cc: Fabio Estevam Cc: Matteo Lisi Cc: Michael Trimarchi Acked-by: Peng Fan Signed-off-by: Jagan Teki --- arch/arm/cpu/armv7/mx6/Kconfig | 8 + arch/arm/include/asm/imx-common/sys_proto.h | 2 + board/engicam/icorem6/Kconfig | 12 + board/engicam/icorem6/MAINTAINERS | 6 + board/engicam/icorem6/Makefile | 6 + board/engicam/icorem6/README| 31 +++ board/engicam/icorem6/icorem6.c | 400 configs/imx6qdl_icore_mmc_defconfig | 27 ++ include/configs/imx6qdl_icore.h | 126 + 9 files changed, 618 insertions(+) create mode 100644 board/engicam/icorem6/Kconfig create mode 100644 board/engicam/icorem6/MAINTAINERS create mode 100644 board/engicam/icorem6/Makefile create mode 100644 board/engicam/icorem6/README create mode 100644 board/engicam/icorem6/icorem6.c create mode 100644 configs/imx6qdl_icore_mmc_defconfig create mode 100644 include/configs/imx6qdl_icore.h diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig index d851b26..5d549bd 100644 --- a/arch/arm/cpu/armv7/mx6/Kconfig +++ b/arch/arm/cpu/armv7/mx6/Kconfig @@ -95,6 +95,13 @@ config TARGET_MX6CUBOXI config TARGET_MX6QARM2 bool "mx6qarm2" +config TARGET_MX6Q_ICORE + bool "Support Engicam i.Core" + select MX6QDL + select DM + select DM_THERMAL + select SUPPORT_SPL + config TARGET_MX6QSABREAUTO bool "mx6qsabreauto" select DM @@ -225,6 +232,7 @@ source "board/compulab/cm_fx6/Kconfig" source "board/congatec/cgtqmx6eval/Kconfig" source "board/el/el6x/Kconfig" source "board/embest/mx6boards/Kconfig" +source "board/engicam/icorem6/Kconfig" source "board/freescale/mx6qarm2/Kconfig" source "board/freescale/mx6qsabreauto/Kconfig" source "board/freescale/mx6sabresd/Kconfig" diff --git a/arch/arm/include/asm/imx-common/sys_proto.h b/arch/arm/include/asm/imx-common/sys_proto.h index 6ace8bb..005435a 100644 --- a/arch/arm/include/asm/imx-common/sys_proto.h +++ b/arch/arm/include/asm/imx-common/sys_proto.h @@ -30,8 +30,10 @@ #define is_mx6dqp() (is_cpu_type(MXC_CPU_MX6QP) || is_cpu_type(MXC_CPU_MX6DP)) #define is_mx6dq() (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) #define is_mx6sdl() (is_cpu_type(MXC_CPU_MX6SOLO) || is_cpu_type(MXC_CPU_MX6DL)) +#define is_mx6dl() (is_cpu_type(MXC_CPU_MX6DL)) #define is_mx6sx() (is_cpu_type(MXC_CPU_MX6SX)) #define is_mx6sl() (is_cpu_type(MXC_CPU_MX6SL)) +#define is_mx6solo() (is_cpu_type(MXC_CPU_MX6SOLO)) #define is_mx6ul() (is_cpu_type(MXC_CPU_MX6UL)) #define is_mx6ull() (is_cpu_type(MXC_CPU_MX6ULL)) diff --git a/board/engicam/icorem6/Kconfig b/board/engicam/icorem6/Kconfig new file mode 100644 index 000..6d62f0e --- /dev/null +++ b/board/engicam/icorem6/Kconfig @@ -0,0 +1,12 @@ +if TARGET_MX6Q_ICORE + +config SYS_BOARD + default "icorem6" + +config SYS_VENDOR + default "engicam" + +config SYS_CONFIG_NAME + default "imx6qdl_icore" + +endif diff --git a/board/engicam/icorem6/MAINTAINERS b/board/engicam/icorem6/MAINTAINERS new file mode
[U-Boot] [PATCH v5 02/21] thermal: Kconfig: Add IMX_THERMAL entry
From: Jagan TekiAdded kconfig for IMX_THERMAL driver. Cc: Simon Glass Cc: Fabio Estevam Cc: Stefano Babic Cc: Peng Fan Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- drivers/thermal/Kconfig | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 8e22ea7..f0ffbb3 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -5,3 +5,16 @@ config DM_THERMAL temperature sensors to permit warnings, speed throttling or even automatic power-off when the temperature gets too high or low. Other devices may be discrete but connected on a suitable bus. + +if DM_THERMAL + +config IMX_THERMAL + bool "Temperature sensor driver for Freescale i.MX SoCs" + depends on MX6 + help + Support for Temperature Monitor (TEMPMON) found on Freescale i.MX SoCs. + It supports one critical trip point and one passive trip point. The + cpufreq is used as the cooling device to throttle CPUs when the + passive trip is crossed. + +endif # if DM_THERMAL -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 03/21] Kconfig: Add DEFAULT_FDT_FILE entry
From: Jagan TekiAdd kconfig entry for CONFIG_DEFAULT_FDT_FILE Cc: Tom Rini Cc: Simon Glass Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- common/Kconfig | 5 + 1 file changed, 5 insertions(+) diff --git a/common/Kconfig b/common/Kconfig index 46e7173..f4e1ab6 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -198,6 +198,11 @@ config CONSOLE_RECORD_IN_SIZE The buffer is allocated immediately after the malloc() region is ready. +config DEFAULT_FDT_FILE + string "Default fdt file" + help + This option is used to set the default fdt file to boot OS. + config SYS_NO_FLASH bool "Disable support for parallel NOR flash" default n -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 01/21] serial: Kconfig: Add MXC_UART entry
From: Jagan TekiAdded kconfig for MXC_UART driver. Cc: Simon Glass Cc: Fabio Estevam Cc: Stefano Babic Cc: Peng Fan Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- drivers/serial/Kconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index ab5df70..9abf158 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -295,6 +295,13 @@ config FSL_LPUART Select this to enable a Low Power UART for Freescale VF610 and QorIQ Layerscape devices. +config MXC_UART + bool "IMX serial port support" + depends on MX6 + help + If you have a machine based on a Motorola IMX CPU you + can enable its onboard serial port by enabling this option. + config PIC32_SERIAL bool "Support for Microchip PIC32 on-chip UART" depends on DM_SERIAL && MACH_PIC32 -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 00/21] imx6: Add Engicam i.CoreM6 QDL support
From: Jagan TekiThis series supports Engicam i.CoreM6 QDL modules on top of u-boot-imx.git/next and test on the respective starter kits as well. Tested both MMC and NAND boot. Changes for v5: - Add NAND support Changes for v4: - Add 'net: Kconfig: Add FEC_MXC entry' patch - Updated ENV configs along with comments - Restructured configs for more readability - Add CONFIG_ENV_OVERWRITE - Rename icorem6qdl_defconfig with icorem6qdl_mmc_defconfig Changes for v3: - Remove "v2 01/17 imx: iomux-v3: Fix build error with snvs base" patch - Remove 'default n' on Kconfig DEFAULT_FDT_FILE patch - Add minimal devicetree support for Engicam i.CoreM6 QDL - Add is_mx6dl() - Add is_mx6solo() - Use is_mx6dq() - Add last commit sha1 and header in pull devicetree files from Linux Changes for v2: - Make static to local iomux structure in board file - Corrected rowaddr in mx6_ddr3_cfg - Used imx_ddr_size - Add FEC support and tested the same - Add DM_GPIO, DM_MMC support - Add pinctrl support - Add devicetree support Jagan Teki (21): serial: Kconfig: Add MXC_UART entry thermal: Kconfig: Add IMX_THERMAL entry Kconfig: Add DEFAULT_FDT_FILE entry arm: imx: Add Engicam i.CoreM6 QDL Starter Kit initial support net: Kconfig: Add FEC_MXC entry imx6: icorem6: Add ENET support imx: s/docs\/README.imximage/doc\/README.imximage/g arm: dts: Add devicetree for i.MX6DL arm: dts: Add devicetree for i.MX6DQL arm: dts: imx6dl: Add pinctrl defines dt-bindings: clock: imx6qdl: Add clock defines arm: imx6q: Add devicetree support for Engicam i.CoreM6 DualLite/Solo imx6q: icorem6: Enable pinctrl driver engicam: icorem6: Add DM_GPIO, DM_MMC support arm: dts: Add devicetree for i.MX6Q arm: dts: imx6q: Add pinctrl defines arm: imx6q: Add devicetree support for Engicam i.CoreM6 Quad/Dual mtd: nand: Kconfig: Add NAND_MXS entry imx6: icorem6: Add NAND support imx6: icorem6: Enable MTD device support imx6: icorem6: Add default mtd nand partition table arch/arm/cpu/armv7/mx6/Kconfig | 11 + arch/arm/dts/Makefile |4 +- arch/arm/dts/imx6dl-icore.dts | 59 ++ arch/arm/dts/imx6dl-pinfunc.h | 1091 +++ arch/arm/dts/imx6dl.dtsi| 133 +++ arch/arm/dts/imx6q-icore.dts| 59 ++ arch/arm/dts/imx6q-pinfunc.h| 1047 ++ arch/arm/dts/imx6q.dtsi | 300 +++ arch/arm/dts/imx6qdl-icore.dtsi | 196 arch/arm/dts/imx6qdl.dtsi | 1281 +++ arch/arm/include/asm/imx-common/sys_proto.h |2 + board/barco/titanium/imximage.cfg |2 +- board/ccv/xpress/imximage.cfg |2 +- board/denx/m53evk/imximage.cfg |2 +- board/engicam/icorem6/Kconfig | 12 + board/engicam/icorem6/MAINTAINERS |6 + board/engicam/icorem6/Makefile |6 + board/engicam/icorem6/README| 38 + board/engicam/icorem6/icorem6.c | 537 +++ board/freescale/mx6sabresd/mx6dlsabresd.cfg |2 +- board/freescale/mx6slevk/imximage.cfg |2 +- board/freescale/mx6ullevk/imximage.cfg |2 +- board/freescale/mx7dsabresd/imximage.cfg|2 +- board/freescale/s32v234evb/s32v234evb.cfg |2 +- board/freescale/vf610twr/imximage.cfg |2 +- board/phytec/pcm052/imximage.cfg|2 +- board/technexion/pico-imx6ul/imximage.cfg |2 +- board/toradex/colibri_imx7/imximage.cfg |2 +- board/toradex/colibri_vf/imximage.cfg |2 +- board/warp/imximage.cfg |2 +- board/warp7/imximage.cfg|2 +- common/Kconfig |5 + configs/imx6qdl_icore_mmc_defconfig | 34 + configs/imx6qdl_icore_nand_defconfig| 30 + drivers/mtd/nand/Kconfig|7 + drivers/net/Kconfig |7 + drivers/serial/Kconfig |7 + drivers/thermal/Kconfig | 13 + include/configs/imx6qdl_icore.h | 168 include/dt-bindings/clock/imx6qdl-clock.h | 274 ++ 40 files changed, 5341 insertions(+), 16 deletions(-) create mode 100644 arch/arm/dts/imx6dl-icore.dts create mode 100644 arch/arm/dts/imx6dl-pinfunc.h create mode 100644 arch/arm/dts/imx6dl.dtsi create mode 100644 arch/arm/dts/imx6q-icore.dts create mode 100644 arch/arm/dts/imx6q-pinfunc.h create mode 100644 arch/arm/dts/imx6q.dtsi create mode 100644 arch/arm/dts/imx6qdl-icore.dtsi create mode 100644 arch/arm/dts/imx6qdl.dtsi create mode 100644 board/engicam/icorem6/Kconfig create mode 100644 board/engicam/icorem6/MAINTAINERS
Re: [U-Boot] [PATCH] i.MX6 nand bootupdate, reworked
On Wed, 28 Sep 2016, Jagan Teki wrote: On Sun, Jun 19, 2016 at 3:14 AM, Sergey Kubushynwrote: Here is yet another version, diff made against latest u-boot-imx master. Actual code moved from drivers/mtd/nand to /arch/arm/imx-common, some functions renamed. No other changes. return CMD_RET_USAGE; } @@ -766,6 +816,17 @@ static char nand_help_text[] = "'addr', skipping bad blocks and dropping any pages at the end\n" "of eraseblocks that contain only 0xFF\n" #endif +#ifdef CONFIG_CMD_NAND_BOOTUPDATE + "nand bootupdate - [addr] [size]\n" What is the addr here the nand offset or the ddr addr? I tried of doing the same but unable to boot any help? It is where the actual U-Boot image is loaded in RAM. If "nand bootupdate" is done right after reading U-Boot binary into RAM (e.g. with ext4load) those can be both omitted. As a matter of fact I'm finishing a bunch of changes to U-Boot, including that bootupdate command and 2 new boards right now and going to submit all that either tonight or tomorrow. NAND bootupdate works like a charm here and we do actually use it in actual production environment with both Linux and Android; firmware updates do update U-Boot itself as a part of regular network (or OTA how it is called in Android) updates. Will try to write a small README file on that if times permitted. Please note that it has been only tested on i.MX6 (don't have anything else here; all our boards are i.MX6D/Q/DL.) We do not use SPL. As of your case I'm not exactly sure what you are trying to achieve. That entire NAND boot thing with all FCB/DBBT/whatever only applies to INITIAL boot off of raw NAND device. It allows to boot either the full U-Boot or SPL using i.MX6 NAND ROM boot routine that reads that FCB and whatever else then loads actual binary (either U-Boot or SPL or whatever) according to information in that FCB and runs it. If you are booting your SPL off of some other media and then trying to load second stage U-Boot from raw NAND you don't need all that FCB kabang. The DCB part (if U-Boot is built as i.MX6 image) is also not needed so it can be stripped or skipped. However your SPL must properly configure NAND itself so it would be able to read from it and it should include all stuff required to actually read data from NAND. The FCB/DBBT stuff is only needed for initial boot off of raw NAND. If you are going to boot off of NAND and want to have your U-Boot in NAND (that is the only logical use of NAND for U-Boot) I can not see any reason for going SPL road but you might have your own reasons that I don't know. --- ** * KSI@homeKOI8 Net < > The impossible we do immediately. * * Las Vegas NV, USA < > Miracles require 24-hour notice. * ** ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] i.MX6 nand bootupdate, reworked
On Wed, 28 Sep 2016, Jagan Teki wrote: On Wed, Sep 28, 2016 at 10:04 PM, Jagan Tekiwrote: On Sun, Jun 19, 2016 at 3:14 AM, Sergey Kubushyn wrote: Here is yet another version, diff made against latest u-boot-imx master. Actual code moved from drivers/mtd/nand to /arch/arm/imx-common, some functions renamed. No other changes. return CMD_RET_USAGE; } @@ -766,6 +816,17 @@ static char nand_help_text[] = "'addr', skipping bad blocks and dropping any pages at the end\n" "of eraseblocks that contain only 0xFF\n" #endif +#ifdef CONFIG_CMD_NAND_BOOTUPDATE + "nand bootupdate - [addr] [size]\n" What is the addr here the nand offset or the ddr addr? I tried of doing the same but unable to boot any help? $ dd if=SPL of=SPL-new bs=512 seek=2 Sorry it's work for me w/o seek hope this is doing inside your code, thanks! Yep, it is taken care of inside nand bootupdate code -- it allows to just load u-boot.imx image without bothering with offsets or skipping that leading empty kilobyte yourself. --- ** * KSI@homeKOI8 Net < > The impossible we do immediately. * * Las Vegas NV, USA < > Miracles require 24-hour notice. * ** ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 5/6] apalis/colibri_t30: move environment location
On 09/28/2016 03:35 AM, Marcel Ziswiler wrote: Now with the config block handling in place move the U-Boot environment location before the config block at the end of 1st "boot sector" as deployed during production using our downstream BSP. diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h -/* Environment in eMMC, at the end of 2nd "boot sector" */ +/* Environment in eMMC, before config block at the end of 1st "boot sector" */ #define CONFIG_ENV_IS_IN_MMC -#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE) +#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE + \ +CONFIG_TDX_CFG_BLOCK_OFFSET) I'm not convinced that ENV_OFFSET actually points where the description says it does. (-CONFIG_ENV_SIZE + CONFIG_TDX_CFG_BLOCK_OFFSET) is (-8192 + -512). The original comment states that an ENV_OFFSET of -8192 locates the environment at the end of a sector, so shifting it 512 bytes earlier in the flash can't possible now align it with a different sector? Should ENV_OFFSET be shifted down by a whole sector size by this patch, i.e. should +CONFIG_TXT_CFG_BLOCK_OFFSET be rounded up to a sector size to match the comment? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/6] apalis/colibri_t20/t30: deactivate displaying board info
On 09/28/2016 03:35 AM, Marcel Ziswiler wrote: Avoid a checkboard() name clash with our upcoming custom implementation thereof. If you want to avoid naming conflicts, please simply name your new function something that doesn't conflict. That way it will avoid confusion is someone actually wants to enable the CONFIG_DISPLAY_BOARDINFO option themselves, plus it avoids taking the current feature set away. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ccache and buildman
On 09/28/2016 10:56 AM, Simon Glass wrote: > Hi York, > > On 28 September 2016 at 11:52, york sunwrote: >> On 09/28/2016 10:32 AM, Simon Glass wrote: >>> Hi York, >>> >>> On 28 September 2016 at 11:28, york sun wrote: On 09/27/2016 03:11 PM, Simon Glass wrote: > Hi York, > > On 27 September 2016 at 14:42, york sun wrote: >> Simon, >> >> I read through the document but didn't figure out how to use ccache with >> buildman. Is it even possible? > > I'm not sure - you could try it if you like. If you figure it out, it > would be a good addition to the README. > I don't think it works without modification. Detecting toolchain fails if prefixed with ccache. >>> >>> OK - perhaps we need an option to enable it? >>> >> >> That will be nice. My python skill is not sharp and I'd rather not to >> mess with the code if you can work on it. > > I was thinking you might do this :-) > I can try to sharpen my python skill see how far I can go. In the meantime, if you can do it quickly, don't wait for me. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ccache and buildman
Hi York, On 28 September 2016 at 11:52, york sunwrote: > On 09/28/2016 10:32 AM, Simon Glass wrote: >> Hi York, >> >> On 28 September 2016 at 11:28, york sun wrote: >>> >>> On 09/27/2016 03:11 PM, Simon Glass wrote: Hi York, On 27 September 2016 at 14:42, york sun wrote: > Simon, > > I read through the document but didn't figure out how to use ccache with > buildman. Is it even possible? I'm not sure - you could try it if you like. If you figure it out, it would be a good addition to the README. >>> >>> I don't think it works without modification. Detecting toolchain fails >>> if prefixed with ccache. >> >> OK - perhaps we need an option to enable it? >> > > That will be nice. My python skill is not sharp and I'd rather not to > mess with the code if you can work on it. I was thinking you might do this :-) Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PULL] u-boot-usb/master
The following changes since commit cbe7706ab8aab06c18edaa9b120371f9c8012728: Merge git://git.denx.de/u-boot-fsl-qoriq (2016-09-26 17:10:56 -0400) are available in the git repository at: git://git.denx.de/u-boot-usb.git master for you to fetch changes up to 4c043712e9910ef1d612aedbd8304a1f7348ef5f: drivers: usb: xhci-fsl: Implement Erratum A-010151 for FSL USB3 controller (2016-09-27 23:30:49 +0200) Alban Bedel (1): net: asix: Fix ASIX 88772B with driver model B, Ravi (5): spl: dfu: add dfu support in SPL common: dfu: saperate the dfu common functionality spl: dfu: adding dfu support functions for SPL-DFU dra7x: boot: add dfu bootmode support dra7x: configs: enable SPL-DFU support Marcel Ziswiler (2): colibri_t30: fix usb ethernet functionality apalis_t30: colibri_imx7: colibri_t30: fix ethernet functionality Sanchayan Maity (5): cmd: dfu: Add error handling for failed registration usb: host: ehci-vf: Migrate Vybrid USB to driver model ARM: dts: vf: Add device tree node for USB on Vybrid ARM: dts: vf-colibri: Enable USB device tree node for Colibri Vybrid configs: colibri_vf_defconfig: Enable USB driver model for Colibri Vybrid Sriram Dash (4): drivers: usb: xhci-fsl: Change burst beat and outstanding pipelined transfers requests usb: fsl: Rename fdt_fixup_dr_usb usb: fsl: Renaming fdt_fixup_erratum and fdt_fixup_usb_erratum drivers: usb: xhci-fsl: Implement Erratum A-010151 for FSL USB3 controller Kconfig | 27 arch/arm/cpu/armv7/omap-common/boot-common.c | 5 +++ arch/arm/dts/vf-colibri.dtsi | 11 + arch/arm/dts/vf.dtsi | 14 +++ arch/arm/include/asm/arch-omap5/spl.h| 2 +- board/Arcturus/ucp1020/ucp1020.c | 2 +- board/freescale/b4860qds/b4860qds.c | 2 +- board/freescale/bsc9131rdb/bsc9131rdb.c | 2 +- board/freescale/bsc9132qds/bsc9132qds.c | 2 +- board/freescale/corenet_ds/corenet_ds.c | 2 +- board/freescale/ls2080aqds/ls2080aqds.c | 2 +- board/freescale/ls2080ardb/ls2080ardb.c | 2 +- board/freescale/mpc8308rdb/mpc8308rdb.c | 2 +- board/freescale/mpc8315erdb/mpc8315erdb.c| 2 +- board/freescale/mpc837xemds/mpc837xemds.c| 2 +- board/freescale/mpc837xerdb/mpc837xerdb.c| 2 +- board/freescale/mpc8536ds/mpc8536ds.c| 2 +- board/freescale/p1010rdb/p1010rdb.c | 2 +- board/freescale/p1022ds/p1022ds.c| 2 +- board/freescale/p1023rdb/p1023rdb.c | 2 +- board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 2 +- board/freescale/p1_twr/p1_twr.c | 2 +- board/freescale/p2041rdb/p2041rdb.c | 2 +- board/freescale/t102xqds/t102xqds.c | 2 +- board/freescale/t102xrdb/t102xrdb.c | 2 +- board/freescale/t1040qds/t1040qds.c | 2 +- board/freescale/t104xrdb/t104xrdb.c | 2 +- board/freescale/t208xqds/t208xqds.c | 2 +- board/freescale/t208xrdb/t208xrdb.c | 2 +- board/freescale/t4qds/t4240emu.c | 2 +- board/freescale/t4qds/t4240qds.c | 2 +- board/freescale/t4rdb/t4240rdb.c | 2 +- board/gdsys/mpc8308/hrcon.c | 2 +- board/gdsys/mpc8308/strider.c| 2 +- board/gdsys/p1022/controlcenterd.c | 2 +- board/keymile/kmp204x/kmp204x.c | 2 +- board/mpc8308_p1m/mpc8308_p1m.c | 2 +- board/varisys/cyrus/cyrus.c | 2 +- cmd/dfu.c| 61 +-- common/Makefile | 3 ++ common/dfu.c | 92 + common/spl/Makefile | 1 + common/spl/spl.c | 10 - common/spl/spl_dfu.c | 57 + configs/colibri_vf_defconfig | 1 + drivers/usb/common/fsl-dt-fixup.c| 47 ++--- drivers/usb/common/fsl-errata.c | 26 drivers/usb/eth/asix.c | 27 ++-- drivers/usb/host/ehci-vf.c | 208 drivers/usb/host/xhci-fsl.c | 23 +++ include/configs/apalis_t30.h | 2 +- include/configs/colibri_imx7.h | 4 +- include/configs/colibri_t30.h| 2 +- include/configs/dra7xx_evm.h | 20 - include/configs/ti_omap5_common.h| 2 - include/fdt_support.h| 4 +- include/fsl_usb.h| 1 +
Re: [U-Boot] ccache and buildman
On 09/28/2016 10:32 AM, Simon Glass wrote: > Hi York, > > On 28 September 2016 at 11:28, york sunwrote: >> >> On 09/27/2016 03:11 PM, Simon Glass wrote: >>> Hi York, >>> >>> On 27 September 2016 at 14:42, york sun wrote: Simon, I read through the document but didn't figure out how to use ccache with buildman. Is it even possible? >>> >>> I'm not sure - you could try it if you like. If you figure it out, it >>> would be a good addition to the README. >>> >> >> I don't think it works without modification. Detecting toolchain fails >> if prefixed with ccache. > > OK - perhaps we need an option to enable it? > That will be nice. My python skill is not sharp and I'd rather not to mess with the code if you can work on it. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC v2] bootm: fix passing argc to standalone apps
Hi, On 23 September 2016 at 04:17, Zubair Lutfullah Kakakhelwrote: > Hi, > > comments at end > > > On 09/19/2016 01:57 AM, Simon Glass wrote: >> >> On 9 September 2016 at 02:18, Zubair Lutfullah Kakakhel >> wrote: >>> >>> This bug appears in b6396403 which makes u-boot unable to pass >>> arguments via bootm to a standalone application without this patch. >>> >>> Steps to reproduce. >>> >>> Compile a u-boot. Use mkimage to package the standalone hello_world.bin >>> file. >>> >>> e.g. For the MIPS Boston platform >>> >>> mkimage -n "hello" -A mips -O u-boot -C none -T standalone \ >>> -a 0x8020 -d hello_world.bin \ >>> -ep 0x8020 hello_out >>> >>> Then tftp hello_out and run it using >>> >>> boston # dhcp 192.168.154.45:hello_out >>> ... >>> boston # bootm $loadaddr 123 321 >>> >>> Without the patch the following output is observed. >>> >>> boston # bootm $loadaddr 123 321 >>>Image Name: hello >>>Image Type: MIPS U-Boot Standalone Program (uncompressed) >>>Data Size:1240 Bytes = 1.2 KiB >>>Load Address: 8020 >>>Entry Point: 8020 >>>Verifying Checksum ... OK >>>Loading Standalone Program ... OK >>> Example expects ABI version 8 >>> Actual U-Boot ABI version 8 >>> Hello World >>> argc = 0 >>> argv[0] = "0x8800" >>> >>> With the patch, you see the following. >>> >>> boston # bootm $loadaddr 123 321 >>>Image Name: hello >>>Image Type: MIPS U-Boot Standalone Program (uncompressed) >>>Data Size:1240 Bytes = 1.2 KiB >>>Load Address: 8020 >>>Entry Point: 8020 >>>Verifying Checksum ... OK >>>Loading Standalone Program ... OK >>> Example expects ABI version 8 >>> Actual U-Boot ABI version 8 >>> Hello World >>> argc = 3 >>> argv[0] = "0x8800" >>> argv[1] = "123" >>> argv[2] = "321" >>> argv[3] = "" >>> >>> Without the patch, the go command at the entry point seems to work. >>> >>> boston # go 0x8020 123 321 >>> Example expects ABI version 8 >>> Actual U-Boot ABI version 8 >>> Hello World >>> argc = 3 >>> argv[0] = "0x8020" >>> argv[1] = "123" >>> argv[2] = "321" >>> argv[3] = "" >>> Hit any key to exit ... >>> >>> Signed-off-by: Zubair Lutfullah Kakakhel >>> >>> --- >>> >>> Tested on the MIPS Boston platform. >>> --- >>> common/bootm.c | 4 +--- >>> 1 file changed, 1 insertion(+), 3 deletions(-) >>> >>> diff --git a/common/bootm.c b/common/bootm.c >>> index e6da551..a26ada4 100644 >>> --- a/common/bootm.c >>> +++ b/common/bootm.c >>> @@ -602,10 +602,8 @@ int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int >>> argc, char * const argv[], >>> if (!ret && (states & BOOTM_STATE_FINDOS)) >>> ret = bootm_find_os(cmdtp, flag, argc, argv); >>> >>> - if (!ret && (states & BOOTM_STATE_FINDOTHER)) { >>> + if (!ret && (states & BOOTM_STATE_FINDOTHER)) >>> ret = bootm_find_other(cmdtp, flag, argc, argv); >>> - argc = 0; /* consume the args */ >>> - } >>> >>> /* Load the OS */ >>> if (!ret && (states & BOOTM_STATE_LOADOS)) { >>> -- >>> 1.9.1 >>> >> >> Reviewed-by: Simon Glass >> > > Thanks for the review. > > Can this be applied as is or do I need to send it again without the RFC > and as a Patch? I think it is fine as is. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC
Hi, On 28 September 2016 at 09:46,wrote: > From: Patrick Bruenn > > Add CX9020 board based on mx53loco. > Add simplified imx53 base device tree from kernel v4.8-rc8, to reuse > serial_mxc with DTE and prepare for device tree migration of other > functions and imx53 devices. > > The CX9020 differs from i.MX53 Quick Start Board by: > - use uart2 instead of uart1 > - DVI-D connector instead of VGA > - no audio > - CCAT FPGA connected to emi > - enable rtc > > Signed-off-by: Patrick Bruenn > > --- > > arch/arm/Kconfig | 7 + > arch/arm/dts/Makefile| 2 + > arch/arm/dts/imx53-cx9020.dts| 26 ++ > arch/arm/dts/imx53.dtsi | 41 ++ > board/beckhoff/mx53cx9020/Kconfig| 15 + > board/beckhoff/mx53cx9020/MAINTAINERS| 6 + > board/beckhoff/mx53cx9020/Makefile | 9 + > board/beckhoff/mx53cx9020/imximage.cfg | 82 > board/beckhoff/mx53cx9020/mx53cx9020.c | 564 > +++ > board/beckhoff/mx53cx9020/mx53cx9020_video.c | 83 > configs/mx53cx9020_defconfig | 19 + > include/configs/mx53cx9020.h | 211 ++ > 12 files changed, 1065 insertions(+) > create mode 100644 arch/arm/dts/imx53-cx9020.dts > create mode 100644 arch/arm/dts/imx53.dtsi > create mode 100644 board/beckhoff/mx53cx9020/Kconfig > create mode 100644 board/beckhoff/mx53cx9020/MAINTAINERS > create mode 100644 board/beckhoff/mx53cx9020/Makefile > create mode 100644 board/beckhoff/mx53cx9020/imximage.cfg > create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020.c > create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020_video.c > create mode 100644 configs/mx53cx9020_defconfig > create mode 100644 include/configs/mx53cx9020.h There are a few things here that should use driver model: - Video - LED GPIOs - Pinctrl Is that future work? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] power: regulator: lp873x: Add regulator support
Hi Keerthy, On 27 September 2016 at 21:27, Keerthywrote: > > > On Tuesday 27 September 2016 11:25 PM, Simon Glass wrote: [..] > > > Simon, > > I understand now. Though i would have loved to have this feedback on palmas > regulator driver as well. Based on which i did this. Understood. Sorry I did not notice it earlier. One thing I suggest is to take a look at how other drivers work. There may be counter-examples of course, but it should help. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] power: regulator: lp873x: Add regulator support
On 27 September 2016 at 23:05, Keerthywrote: > The driver provides regulator set/get voltage > enable/disable functions for lp873x family of PMICs. > > Signed-off-by: Keerthy > --- > > Changes in v2: > > * Used pmic_reg_read/pmic_reg_write instead of direct i2c > read/write calls. > > drivers/power/regulator/Kconfig| 8 + > drivers/power/regulator/Makefile | 1 + > drivers/power/regulator/lp873x_regulator.c | 357 > + > 3 files changed, 366 insertions(+) > create mode 100644 drivers/power/regulator/lp873x_regulator.c Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 2/6] power: pmic: Palmas: Add the base pmic support
Hi Keerthy, On 27 September 2016 at 22:27, Keerthywrote: > Add support to bind the regulators/child nodes with the pmic. > Also adds the pmic i2c based read/write funtions to access pmic > registers. > > Signed-off-by: Keerthy > Reviewed-by: Simon Glass > Reviewed-by: Tom Rini > --- > > Changes in v5: > > * Added pmic read/write functions. > > drivers/power/pmic/Kconfig | 7 +++ > drivers/power/pmic/Makefile | 1 + > drivers/power/pmic/palmas.c | 108 > > include/power/palmas.h | 25 ++ > 4 files changed, 141 insertions(+) > create mode 100644 drivers/power/pmic/palmas.c > create mode 100644 include/power/palmas.h > > diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig > index 69f8d51..92931c5 100644 > --- a/drivers/power/pmic/Kconfig > +++ b/drivers/power/pmic/Kconfig > @@ -135,3 +135,10 @@ config PMIC_TPS65090 > FETs and a battery charger. This driver provides register access > only, and you can enable the regulator/charger drivers separately if > required. > + > +config PMIC_PALMAS > + bool "Enable driver for Texas Instruments PALMAS PMIC" > + depends on DM_PMIC > + ---help--- > + The PALMAS is a PMIC containing several LDOs, SMPS. > + This driver binds the pmic children. > diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile > index 52b4f71..828c0cf 100644 > --- a/drivers/power/pmic/Makefile > +++ b/drivers/power/pmic/Makefile > @@ -15,6 +15,7 @@ obj-$(CONFIG_PMIC_PM8916) += pm8916.o > obj-$(CONFIG_PMIC_RK808) += rk808.o > obj-$(CONFIG_PMIC_TPS65090) += tps65090.o > obj-$(CONFIG_PMIC_S5M8767) += s5m8767.o > +obj-$(CONFIG_$(SPL_)PMIC_PALMAS) += palmas.o > > obj-$(CONFIG_POWER_LTC3676) += pmic_ltc3676.o > obj-$(CONFIG_POWER_MAX77696) += pmic_max77696.o > diff --git a/drivers/power/pmic/palmas.c b/drivers/power/pmic/palmas.c > new file mode 100644 > index 000..1d2bd67 > --- /dev/null > +++ b/drivers/power/pmic/palmas.c > @@ -0,0 +1,108 @@ > +/* > + * (C) Copyright 2016 Texas Instruments Incorporated, > + * Keerthy > + * > + * SPDX-License-Identifier:GPL-2.0+ > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +DECLARE_GLOBAL_DATA_PTR; > + > +static const struct pmic_child_info pmic_children_info[] = { > + { .prefix = "ldo", .driver = PALMAS_LDO_DRIVER }, > + { .prefix = "smps", .driver = PALMAS_SMPS_DRIVER }, > + { }, > +}; > + > +static int palmas_write(struct udevice *dev, uint reg, const uint8_t *buff, > + int len) > +{ > + if (dm_i2c_reg_write(dev, reg, *buff)) { I think this should be dm_i2c_write(). You are only writing a single byte. > + error("write error to device: %p register: %#x!", dev, reg); > + return -EIO; > + } > + > + return 0; > +} > + > +static int palmas_read(struct udevice *dev, uint reg, uint8_t *buff, int len) > +{ > + int ret; > + > + ret = dm_i2c_reg_read(dev, reg); dm_i2c_read() > + if (ret < 0) { > + error("read error %d from device: %p register: %#x!", ret, > dev, > + reg); > + return -EIO; > + } > + > + return ret; > +} [...] Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] power: pmic: lp873x: Add the base pmic support
On 27 September 2016 at 23:05, Keerthywrote: > Add support to bind the regulators/child nodes with the pmic. > > Signed-off-by: Keerthy > --- > > Changes in v2: > > * Added pmic read/write functions. > > drivers/power/pmic/Kconfig | 7 > drivers/power/pmic/Makefile | 1 + > drivers/power/pmic/lp873x.c | 90 > + > include/power/lp873x.h | 19 ++ > 4 files changed, 117 insertions(+) > create mode 100644 drivers/power/pmic/lp873x.c > create mode 100644 include/power/lp873x.h Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot DFU test and Ctrl+C
On 09/28/2016 03:32 AM, Lukasz Majewski wrote: Hi Tom, Hey guys, As I use the DFU tests more and more, I keep hitting what I'm pretty sure is a false failure in the tests. Sometimes the tests fail at: u_boot_console.wait_for('Ctrl+C to exit ...') and the last bit of the console log is: Starting download: [#] finished! unable to read DFU status #File System is consistent file found, deleting update journal finished File System is consistent update journal finished 65 bytes written in 12380 ms (0 Bytes/s) => So perhaps we should make the test look for the prompt itself rather than 'Ctrl+C' ? Thanks! As fair as I remember, dfu-util provides and u-boot's dfu supports -e switch behavior. This switch causes the dfu u-boot command to go directly to u-boot prompt. Tom, I suppose that this is what you would need. Just add -e to your host's dfu-util command. Using -e is the opposite of what Tom wants. The test/py script expects the dfu command to continue running after an upload/download, since that's the default behaviour. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ccache and buildman
On 09/27/2016 03:11 PM, Simon Glass wrote: > Hi York, > > On 27 September 2016 at 14:42, york sunwrote: >> Simon, >> >> I read through the document but didn't figure out how to use ccache with >> buildman. Is it even possible? > > I'm not sure - you could try it if you like. If you figure it out, it > would be a good addition to the README. > I don't think it works without modification. Detecting toolchain fails if prefixed with ccache. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ccache and buildman
Hi York, On 28 September 2016 at 11:28, york sunwrote: > > On 09/27/2016 03:11 PM, Simon Glass wrote: > > Hi York, > > > > On 27 September 2016 at 14:42, york sun wrote: > >> Simon, > >> > >> I read through the document but didn't figure out how to use ccache with > >> buildman. Is it even possible? > > > > I'm not sure - you could try it if you like. If you figure it out, it > > would be a good addition to the README. > > > > I don't think it works without modification. Detecting toolchain fails > if prefixed with ccache. OK - perhaps we need an option to enable it? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] i.MX6 nand bootupdate, reworked
On Wed, Sep 28, 2016 at 10:04 PM, Jagan Tekiwrote: > On Sun, Jun 19, 2016 at 3:14 AM, Sergey Kubushyn wrote: >> Here is yet another version, diff made against latest u-boot-imx master. >> >> Actual code moved from drivers/mtd/nand to /arch/arm/imx-common, some >> functions renamed. No other changes. > > > > >> return CMD_RET_USAGE; >> } >> @@ -766,6 +816,17 @@ static char nand_help_text[] = >> "'addr', skipping bad blocks and dropping any pages at the >> end\n" >> "of eraseblocks that contain only 0xFF\n" >> #endif >> +#ifdef CONFIG_CMD_NAND_BOOTUPDATE >> + "nand bootupdate - [addr] [size]\n" > > What is the addr here the nand offset or the ddr addr? I tried of > doing the same but unable to boot any help? > > $ dd if=SPL of=SPL-new bs=512 seek=2 Sorry it's work for me w/o seek hope this is doing inside your code, thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] i.MX6 nand bootupdate, reworked
On Sun, Jun 19, 2016 at 3:14 AM, Sergey Kubushynwrote: > Here is yet another version, diff made against latest u-boot-imx master. > > Actual code moved from drivers/mtd/nand to /arch/arm/imx-common, some > functions renamed. No other changes. > return CMD_RET_USAGE; > } > @@ -766,6 +816,17 @@ static char nand_help_text[] = > "'addr', skipping bad blocks and dropping any pages at the > end\n" > "of eraseblocks that contain only 0xFF\n" > #endif > +#ifdef CONFIG_CMD_NAND_BOOTUPDATE > + "nand bootupdate - [addr] [size]\n" What is the addr here the nand offset or the ddr addr? I tried of doing the same but unable to boot any help? $ dd if=SPL of=SPL-new bs=512 seek=2 icorem6qdl> tftpboot ${loadaddr} SPL-new Using FEC device TFTP from server 192.168.2.96; our IP address is 192.168.2.75 Filename 'SPL-new'. Load address: 0x1200 Loading: ### 1.4 MiB/s done Bytes transferred = 32768 (8000 hex) icorem6qdl> nand bootupdate ${loadaddr} 0x8000 NAND bootupdate successful icorem6qdl> thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC
From: Patrick BruennAdd CX9020 board based on mx53loco. Add simplified imx53 base device tree from kernel v4.8-rc8, to reuse serial_mxc with DTE and prepare for device tree migration of other functions and imx53 devices. The CX9020 differs from i.MX53 Quick Start Board by: - use uart2 instead of uart1 - DVI-D connector instead of VGA - no audio - CCAT FPGA connected to emi - enable rtc Signed-off-by: Patrick Bruenn --- arch/arm/Kconfig | 7 + arch/arm/dts/Makefile| 2 + arch/arm/dts/imx53-cx9020.dts| 26 ++ arch/arm/dts/imx53.dtsi | 41 ++ board/beckhoff/mx53cx9020/Kconfig| 15 + board/beckhoff/mx53cx9020/MAINTAINERS| 6 + board/beckhoff/mx53cx9020/Makefile | 9 + board/beckhoff/mx53cx9020/imximage.cfg | 82 board/beckhoff/mx53cx9020/mx53cx9020.c | 564 +++ board/beckhoff/mx53cx9020/mx53cx9020_video.c | 83 configs/mx53cx9020_defconfig | 19 + include/configs/mx53cx9020.h | 211 ++ 12 files changed, 1065 insertions(+) create mode 100644 arch/arm/dts/imx53-cx9020.dts create mode 100644 arch/arm/dts/imx53.dtsi create mode 100644 board/beckhoff/mx53cx9020/Kconfig create mode 100644 board/beckhoff/mx53cx9020/MAINTAINERS create mode 100644 board/beckhoff/mx53cx9020/Makefile create mode 100644 board/beckhoff/mx53cx9020/imximage.cfg create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020.c create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020_video.c create mode 100644 configs/mx53cx9020_defconfig create mode 100644 include/configs/mx53cx9020.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c871eaf..82afd55 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -573,6 +573,12 @@ config TARGET_MX53LOCO bool "Support mx53loco" select CPU_V7 +config TARGET_MX53CX9020 + bool "Support mx53cx9020" + select CPU_V7 + select DM + select DM_SERIAL + config TARGET_MX53SMD bool "Support mx53smd" select CPU_V7 @@ -994,6 +1000,7 @@ source "board/freescale/mx51evk/Kconfig" source "board/freescale/mx53ard/Kconfig" source "board/freescale/mx53evk/Kconfig" source "board/freescale/mx53loco/Kconfig" +source "board/beckhoff/mx53cx9020/Kconfig" source "board/freescale/mx53smd/Kconfig" source "board/freescale/s32v234evb/Kconfig" source "board/freescale/vf610twr/Kconfig" diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 74d6ed2..5a926cb 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -275,6 +275,8 @@ dtb-$(CONFIG_MX7) += imx7-colibri.dtb dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb +dtb-$(CONFIG_TARGET_MX53CX9020) += imx53-cx9020.dtb + dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \ k2l-evm.dtb \ k2e-evm.dtb \ diff --git a/arch/arm/dts/imx53-cx9020.dts b/arch/arm/dts/imx53-cx9020.dts new file mode 100644 index 000..4fc6214 --- /dev/null +++ b/arch/arm/dts/imx53-cx9020.dts @@ -0,0 +1,26 @@ +/* + * Copyright 2016 Beckhoff Automation + * Copyright 2011 Freescale Semiconductor, Inc. + * Copyright 2011 Linaro Ltd. + * + * SPDX-License-Identifier: GPL-2.0+ or X11 + */ + +/dts-v1/; +#include "imx53.dtsi" + +/ { + model = "Beckhoff CX9020-0100 i.MX53"; + compatible = "fsl,imx53-qsb", "fsl,imx53"; + + chosen { + stdout-path = + }; +}; + + { + pinctrl-names = "default"; + uart-has-rtscts; + fsl,dte-mode; + status = "okay"; +}; diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi new file mode 100644 index 000..3da0765 --- /dev/null +++ b/arch/arm/dts/imx53.dtsi @@ -0,0 +1,41 @@ +/* + * Copyright 2016 Beckhoff Automation + * Copyright 2011 Freescale Semiconductor, Inc. + * Copyright 2011 Linaro Ltd. + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#include "skeleton.dtsi" + +/ { + aliases { + serial1 = + }; + + soc { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges; + + aips@5000 { /* AIPS1 */ + compatible = "fsl,aips-bus", "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x5000 0x1000>; + ranges; + + uart2: serial@53fc { + compatible = "fsl,imx7d-uart", "fsl,imx53-uart", "fsl,imx21-uart"; + reg = <0x53fc 0x4000>; +
Re: [U-Boot] [PATCH V2 2/8] imx: mx6: Add plugin support
-Original Message- From: Tom Rini [mailto:tr...@konsulko.com] Sent: Tuesday, September 27, 2016 7:46 PM To: Peng FanCc: sba...@denx.de; u-boot@lists.denx.de; Utkarsh Gupta Subject: Re: [U-Boot] [PATCH V2 2/8] imx: mx6: Add plugin support On Tue, Sep 27, 2016 at 05:23:21PM +0800, Peng Fan wrote: > Add mx6_plugin.S which calls boot rom setup function, generate the > second ivt, and jump back to boot rom. > > Signed-off-by: Peng Fan > Signed-off-by: Ye Li > Signed-off-by: Utkarsh Gupta Reviewed-by: Tom Rini Acked-by: Utkarsh Gupta -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] i.MX6: NAND boot with SPL
Hi Stefano, On Wed, Sep 28, 2016 at 8:21 PM, Stefano Babicwrote: > Hi Jagan, > > On 28/09/2016 16:40, Jagan Teki wrote: > >>> >>> I do not understand: do you copy SPL into the NAND ? >> >> I booted through MMC first since it's only possible way to boot. And >> my plan is to write nand with MMC boot. > > mmhh...I understand what is happening. You boot from MMC, and reading > the src registers, this is the boot device. NAND is not selected, then. > > I would say this is a strange configuration: you boot from MMC (and > then, SPL and u-boot.img are on the MMC), or you boot from NAND, and bot > SPL + u-boot.img are on NAND. In the last case, you have to write SPL > according to the manual. 1) _mmc_defconfig - I've enabled SPL for MMC and add NAND support to that, so-that I can able to boot from MMC and trying to write on to NAND. 2) *_nand_defconfig - I've enabled SPL for NAND one. Once I booted with MMC as 1) I am trying to write NAND SPL which is created as 2) thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] rockchip: enable SPL_OF_PLATDATA for rk3288 board
On 28 September 2016 at 00:35, Jacob Chenwrote: > It seems ddr auto detect make SPL image to large. > So we have to use SPL_OF_PLATDATA to reduce size. > > Signed-off-by: Jacob Chen > --- > > configs/evb-rk3288_defconfig | 4 > configs/fennec-rk3288_defconfig | 3 +++ > configs/miniarm-rk3288_defconfig | 3 +++ > 3 files changed, 10 insertions(+) Acked-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 11/12] RFC: Use binman for a sunxi board
Hi Tom, On 27 September 2016 at 19:55, Tom Riniwrote: > On Sun, Sep 25, 2016 at 03:52:27PM -0600, Simon Glass wrote: > >> Add an example usage of binman for a sunxi board. This involves adding the >> image definition to the device tree and using it in the Makefile. >> >> This is for example only. >> >> Signed-off-by: Simon Glass >> --- >> >> Changes in v2: None >> >> Makefile| 4 +--- >> arch/arm/dts/sun7i-a20-pcduino3.dts | 12 > > I think this shows the big problem with using binman today. For the > common case of ARM, where we sync in the dts* files from upstream, this > will add hunks that must not be overwritten each time. > > Looking at scripts/Makefile.lib::cmd_fdt I wonder if we couldn't come up > with some wildcard rule and check if, somewhere CONFIG'd ? $(BOARDDIR)/ > ? u-boot.dtsi exists add in -include that/file.dtsi to the CPP rule so > that we can keep the parts that will never get upstream separate. We can do that, but I have found that most boards with the same SoC are the same, or similar. So for x86 [1] I put it in a separate patch with just an #include in the .dts file. We could have binman be a bit smarter about where it looks - e.g. if there is no binman node, it could look in the same directory for a file that matches the board name, or part of it? Regards, Simon [1] http://patchwork.ozlabs.org/patch/674743/ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv2] scripts: Add script to extract default environment
Hi, On 27 September 2016 at 07:37, Lukasz Majewskiwrote: > Hi Simon, > >> Hi Lukasz, >> >> On 16 September 2016 at 22:57, Lukasz Majewski >> wrote: >> > This script looks for env_common.o object file and extracts from it >> > default u-boot environment, which is afterwards printed on standard >> > output. >> > >> > Usage example: >> > get_default_envs.sh > u-boot-env-default.txt >> > >> > The generated text file can be used as input for mkenvimage. >> > >> > Signed-off-by: Lukasz Majewski >> > >> > --- >> > Changes for v2: >> > - Sort uniquely entries >> > - Exclude env_common.o generated for SPL >> > --- >> > scripts/get_default_envs.sh | 34 ++ >> > 1 file changed, 34 insertions(+) >> > create mode 100755 scripts/get_default_envs.sh >> >> Reviewed-by: Simon Glass >> >> But why is this needed? > > Some boards for production u-boot have all the envs hardcoded in > their ./include/configs/.h file. > > Also, they support envs stored on persistent memory - like eMMC. > > During flashing both u-boot and envs are stored on the target memory. > Such script allows having the same data in both places. > > I do know that I could also use external file, which I could include to > u-boot during compilation and compile the boot.scr file with mkimage. > > Or maybe there is any other way? Seems OK to me, I was just curious. > > Best regards, > Łukasz Majewski [...] ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] i.MX6: NAND boot with SPL
Hi Jagan, On 28/09/2016 16:40, Jagan Teki wrote: >> >> I do not understand: do you copy SPL into the NAND ? > > I booted through MMC first since it's only possible way to boot. And > my plan is to write nand with MMC boot. mmhh...I understand what is happening. You boot from MMC, and reading the src registers, this is the boot device. NAND is not selected, then. I would say this is a strange configuration: you boot from MMC (and then, SPL and u-boot.img are on the MMC), or you boot from NAND, and bot SPL + u-boot.img are on NAND. In the last case, you have to write SPL according to the manual. > > I find it it is taking boot image from MMC even if I set the NAND > bootmode with MMC card pluged in. Anyway I cleared with this. 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 http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/8] x86: Tidy up selection of building the EFI stub
Hi Bin, On 27 September 2016 at 19:23, Bin Mengwrote: > Hi Simon, > > On Wed, Sep 28, 2016 at 1:55 AM, Simon Glass wrote: >> Hi Bin, >> >> On 26 September 2016 at 20:44, Bin Meng wrote: >>> Hi Simon, >>> >>> On Tue, Sep 27, 2016 at 8:35 AM, Simon Glass wrote: Hi Bin, On 26 September 2016 at 02:50, Bin Meng wrote: > Hi Simon, > > On Mon, Sep 26, 2016 at 5:27 AM, Simon Glass wrote: >> At present we use a CONFIG option in efi.h to determine whether we are >> building the EFI stub or not. This means that the same header cannot be >> used for EFI_LOADER support. The CONFIG option will be enabled for the >> whole build, even when not building the stub. >> >> Use a different define instead, set up just for the files that make up >> the >> stub. >> >> Signed-off-by: Simon Glass >> --- >> >> Changes in v2: >> - Add new patch to tidy up selection of building the EFI stub >> >> include/efi.h| 7 +-- >> lib/efi/Makefile | 4 ++-- >> 2 files changed, 7 insertions(+), 4 deletions(-) >> >> diff --git a/include/efi.h b/include/efi.h >> index d07187c..3d58780 100644 >> --- a/include/efi.h >> +++ b/include/efi.h >> @@ -30,8 +30,11 @@ struct efi_device_path; >> >> #define EFI_BITS_PER_LONG BITS_PER_LONG >> >> -/* With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64 */ >> -#ifdef CONFIG_EFI_STUB_64BIT >> +/* >> + * With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64. EFI_STUB is set >> + * in lib/efi/Makefile, when building the stub. >> + */ >> +#if defined(CONFIG_EFI_STUB_64BIT) && defined(EFI_STUB) > > I don't understand why this is needed? If building the 64-bit EFI stub, we need to use 64-bit ints for the stub, but 32-bits for the rest of U-Boot. So this header gets used both ways. >>> >>> For 32-bit EFI stub or U-Boot itself, EFI_BITS_PER_LONG is defined as >>> BITS_PER_LONG which is 32. >> >> Yes that's right. But in the case of the stub, it can be different >> from U-Boot itself. This case takes care of that. >> > > Sorry but I still don't get it. What's broken without this change? When building U-Boot with CONFIG_EFI_STUB_64BIT enabled, at present EFI_BITS_PER_LONG will be 64. This is fine for building the stub. But for building U-Boot, we still want it to be 32. At present the code overrides EFI_BITS_PER_LONG, setting it to 64 if CONFIG_EFI_STUB_64BIT is enabled. This means that EFI_LOADER support does not build properly, since it uses 64 instead of 32. You can try building without this commit to see the result. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] i.MX6: NAND boot with SPL
Hi Stefano, On Tue, Sep 27, 2016 at 12:27 PM, Stefano Babicwrote: > Hi Jagan, > > On 26/09/2016 17:35, Jagan Teki wrote: >> Hi Fabio/Peng/Stefano/Any, >> >> Did anyone tried or used nand boot with SPL and >> u-boot.img(u-boot-dtb.img)? was it supported by imx6? >> > > Yes, I did sometime ago, and the combination SPL + u-boot.img worked. I > think I tried with 2016.05 or 2016.07, I do not test it recently. > >> So booted with MMC and trying to write the images from 1MB since I >> read 0x0 on the flash shows FCB. > > I do not understand: do you copy SPL into the NAND ? I booted through MMC first since it's only possible way to boot. And my plan is to write nand with MMC boot. > > The use case is having SPL and u-boot.img both in NAND. You can use two > different devices, too, but you have to provide your list of spl_devices. > >> >> Code: >> -- >> diff --git a/arch/arm/imx-common/spl.c b/arch/arm/imx-common/spl.c >> index bdcda7d..72f870e 100644 >> --- a/arch/arm/imx-common/spl.c >> +++ b/arch/arm/imx-common/spl.c >> @@ -84,6 +84,8 @@ u32 spl_boot_mode(const u32 boot_device) >> return MMCSD_MODE_RAW; >> #endif >> break; >> + case BOOT_DEVICE_NAND: >> + break; >> default: >> puts("spl: ERROR: unsupported device\n"); >> hang(); >> diff --git a/arch/arm/imx-common/spl_nand.cfg >> b/arch/arm/imx-common/spl_nand.cfg >> new file mode 100644 >> index 000..e918c0d >> --- /dev/null >> +++ b/arch/arm/imx-common/spl_nand.cfg >> @@ -0,0 +1,2 @@ >> +IMAGE_VERSION 2 >> +BOOT_FROM nand >> >> NAND write: >> >> U-Boot > tftpboot ${loadaddr} SPL >> Using FEC device >> TFTP from server 192.168.2.68; our IP address is 192.168.2.67 >> Filename 'SPL'. >> Load address: 0x1200 >> Loading: ### >> 1.4 MiB/s >> done >> Bytes transferred = 31744 (7c00 hex) >> U-Boot > nand erase 0x10 0x10 >> >> NAND erase: device 0 offset 0x10, size 0x10 >> Erasing at 0x1c -- 100% complete. > >> OK >> U-Boot > nand write ${loadaddr} 0x10 0x7c00 > > I do not understand: SPL is not loaded from NAND from address 0x10. > The SOC expects to have a right FCB from address 0. Correct, I am planning to try this on Linux through kobs-ng, based on the info from gw_ventana and let you know. > >> >> NAND write: device 0 offset 0x10, size 0x10 >> 1048576 bytes written: OK >> >> U-Boot > tftpboot ${loadaddr} u-boot-dtb.img > > I have not tried with -dtb, I cannot say anything. > >> Using FEC device >> TFTP from server 192.168.2.68; our IP address is 192.168.2.67 >> Filename 'u-boot-dtb.img'. >> Load address: 0x1200 >> Loading: >> 1.7 MiB/s >> done >> Bytes transferred = 282470 (44f66 hex) >> U-Boot > nand erase 0x20 0x10 >> >> NAND erase: device 0 offset 0x20, size 0x10 >> Erasing at 0x2c -- 100% complete. >> OK >> U-Boot > nand write ${loadaddr} 0x20 0x44f66 >> >> NAND write: device 0 offset 0x20, size 0x10 >> 1048576 bytes written: OK >> >> Boot Log: >> --- >> U-Boot SPL 2016.07-ge1e54c7-dirty (Sep 26 2016 - 16:07:01) >> Trying to boot from unknown boot device >> SPL: Unsupported Boot Device! >> SPL: failed to boot from all boot devices >> ### ERROR ### Please RESET the board ### > > This is just because the boot device from the src register is not as > expected. I think it does not try at all to load from NAND. I find it it is taking boot image from MMC even if I set the NAND bootmode with MMC card pluged in. Anyway I cleared with this. thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1 2/4] spi: fsl_qspi: Add 4bytes address support
From: Yuan YaoThe QSPI support the direct 4bytes address command for flash read/write/erase. And the address can cover the whole QSPI memory space. Signed-off-by: Yuan Yao --- drivers/spi/fsl_qspi.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c index 2144fca..119b782 100644 --- a/drivers/spi/fsl_qspi.c +++ b/drivers/spi/fsl_qspi.c @@ -25,7 +25,8 @@ DECLARE_GLOBAL_DATA_PTR; #define TX_BUFFER_SIZE 0x40 #endif -#define OFFSET_BITS_MASK GENMASK(23, 0) +#define OFFSET_BITS_MASK ((FSL_QSPI_FLASH_SIZE > SZ_16M) ? \ + GENMASK(27, 0) : GENMASK(23, 0)) #define FLASH_STATUS_WEL 0x02 @@ -760,7 +761,10 @@ int qspi_xfer(struct fsl_qspi_priv *priv, unsigned int bitlen, if (dout) { if (flags & SPI_XFER_BEGIN) { priv->cur_seqid = *(u8 *)dout; - memcpy(, dout, 4); + if (FSL_QSPI_FLASH_SIZE > SZ_16M) + memcpy(, dout + 1, 4); + else + memcpy(, dout, 4); } if (flags == SPI_XFER_END) { -- 2.1.0.27.g96db324 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1 4/4] armv8: ls1046a: update the flash size to 64M.
From: Yuan YaoThe QSPI flash on LS1046A is 64MB, and don't support BAR. Signed-off-by: Yuan Yao --- include/configs/ls1046ardb.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h index 693cc8d..3322953 100644 --- a/include/configs/ls1046ardb.h +++ b/include/configs/ls1046ardb.h @@ -209,9 +209,8 @@ /* QSPI device */ #ifdef CONFIG_FSL_QSPI #define CONFIG_SPI_FLASH_SPANSION -#define FSL_QSPI_FLASH_SIZE(1 << 26) +#define FSL_QSPI_FLASH_SIZESZ_64M #define FSL_QSPI_FLASH_NUM 2 -#define CONFIG_SPI_FLASH_BAR #endif /* SATA */ -- 2.1.0.27.g96db324 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1 1/4] sf: add ADDR_4B for 4byte address support
From: Yuan YaoSome new flash don't support bar register but use 4bytes address to support exceed 16MB flash size. So add flash flag: ADDR_4B for some flash which support 4bytes address. Signed-off-by: Yuan Yao --- drivers/mtd/spi/sf_internal.h | 4 +++- drivers/mtd/spi/sf_params.c | 2 +- drivers/mtd/spi/spi_flash.c | 38 +- include/spi_flash.h | 1 + 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h index cde4cfb..9ae1549 100644 --- a/drivers/mtd/spi/sf_internal.h +++ b/drivers/mtd/spi/sf_internal.h @@ -26,7 +26,8 @@ enum spi_nor_option_flags { }; #define SPI_FLASH_3B_ADDR_LEN 3 -#define SPI_FLASH_CMD_LEN (1 + SPI_FLASH_3B_ADDR_LEN) +#define SPI_FLASH_4B_ADDR_LEN 4 +#define SPI_FLASH_CMD_MAX_LEN (1 + SPI_FLASH_4B_ADDR_LEN) #define SPI_FLASH_16MB_BOUN0x100 /* CFI Manufacture ID's */ @@ -130,6 +131,7 @@ struct spi_flash_params { #define RD_DUALBIT(5) #define RD_QUADIO BIT(6) #define RD_DUALIO BIT(7) +#define ADDR_4BBIT(8) #define RD_FULL(RD_QUAD | RD_DUAL | RD_QUADIO | RD_DUALIO) }; diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c index 5b50114..9c26cc8 100644 --- a/drivers/mtd/spi/sf_params.c +++ b/drivers/mtd/spi/sf_params.c @@ -68,7 +68,7 @@ const struct spi_flash_params spi_flash_params_table[] = { {"S25FL128S_64K", 0x012018, 0x4d01,64 * 1024, 256, RD_FULL | WR_QPP}, {"S25FL256S_256K", 0x010219, 0x4d00, 256 * 1024, 128, RD_FULL | WR_QPP}, {"S25FL256S_64K", 0x010219, 0x4d01,64 * 1024, 512, RD_FULL | WR_QPP}, - {"S25FS512S", 0x010220, 0x4D00, 128 * 1024, 512, RD_FULL | WR_QPP}, + {"S25FS512S", 0x010220, 0x4D00, 128 * 1024, 512, RD_FULL | WR_QPP | ADDR_4B}, {"S25FL512S_256K", 0x010220, 0x4d00, 256 * 1024, 256, RD_FULL | WR_QPP}, {"S25FL512S_64K", 0x010220, 0x4d01,64 * 1024, 1024, RD_FULL | WR_QPP}, {"S25FL512S_512K", 0x010220, 0x4f00, 256 * 1024, 256, RD_FULL | WR_QPP}, diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 7f6e9ae..487488f 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -22,12 +22,15 @@ DECLARE_GLOBAL_DATA_PTR; -static void spi_flash_addr(u32 addr, u8 *cmd) +static void spi_flash_addr(struct spi_flash *flash, u32 addr, u8 *cmd) { /* cmd[0] is actual command */ - cmd[1] = addr >> 16; - cmd[2] = addr >> 8; - cmd[3] = addr >> 0; + int i; + + for (i = flash->cmd_len - 1; i > 0; i--) { + cmd[i] = addr; + addr = addr >> 8; + } } static int read_sr(struct spi_flash *flash, u8 *rs) @@ -327,7 +330,7 @@ int spi_flash_write_common(struct spi_flash *flash, const u8 *cmd, int spi_flash_cmd_erase_ops(struct spi_flash *flash, u32 offset, size_t len) { u32 erase_size, erase_addr; - u8 cmd[SPI_FLASH_CMD_LEN]; + u8 cmd[SPI_FLASH_CMD_MAX_LEN]; int ret = -1; erase_size = flash->erase_size; @@ -357,7 +360,7 @@ int spi_flash_cmd_erase_ops(struct spi_flash *flash, u32 offset, size_t len) if (ret < 0) return ret; #endif - spi_flash_addr(erase_addr, cmd); + spi_flash_addr(flash, erase_addr, cmd); debug("SF: erase %2x %2x %2x %2x (%x)\n", cmd[0], cmd[1], cmd[2], cmd[3], erase_addr); @@ -382,7 +385,7 @@ int spi_flash_cmd_write_ops(struct spi_flash *flash, u32 offset, unsigned long byte_addr, page_size; u32 write_addr; size_t chunk_len, actual; - u8 cmd[SPI_FLASH_CMD_LEN]; + u8 cmd[SPI_FLASH_CMD_MAX_LEN]; int ret = -1; page_size = flash->page_size; @@ -415,7 +418,7 @@ int spi_flash_cmd_write_ops(struct spi_flash *flash, u32 offset, chunk_len = min(chunk_len, (size_t)spi->max_write_size); - spi_flash_addr(write_addr, cmd); + spi_flash_addr(flash, write_addr, cmd); debug("SF: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x } chunk_len = %zu\n", buf + actual, cmd[0], cmd[1], cmd[2], cmd[3], chunk_len); @@ -492,7 +495,7 @@ int spi_flash_cmd_read_ops(struct spi_flash *flash, u32 offset, return 0; } - cmdsz = SPI_FLASH_CMD_LEN + flash->dummy_byte; + cmdsz = flash->cmd_len + flash->dummy_byte; cmd = calloc(1, cmdsz); if (!cmd) { debug("SF: Failed to allocate cmd\n"); @@ -513,14 +516,18 @@ int spi_flash_cmd_read_ops(struct spi_flash *flash, u32 offset, return ret; bank_sel =
[U-Boot] [PATCH v1 3/4] armv8: ls1012a: update the flash size to 64M.
From: Yuan YaoThe QSPI flash on LS1012A is 64MB, and don't support BAR. Signed-off-by: Yuan Yao --- include/configs/ls1012a_common.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h index 5fb6c47..4a900bf 100644 --- a/include/configs/ls1012a_common.h +++ b/include/configs/ls1012a_common.h @@ -60,9 +60,8 @@ #define CONFIG_FSL_QSPI #define QSPI0_AMBA_BASE0x4000 #define CONFIG_SPI_FLASH_SPANSION -#define CONFIG_SPI_FLASH_BAR -#define FSL_QSPI_FLASH_SIZE(1 << 24) +#define FSL_QSPI_FLASH_SIZESZ_64M #define FSL_QSPI_FLASH_NUM 2 /* -- 2.1.0.27.g96db324 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1 0/4] sf: add ADDR_4B for 4byte address support
From: Yuan YaoSome new flash don't support bar but use 4bytes address to direct support exceed 16MB flash size. So add flash flag: ADDR_4B for some flash which support 4bytes address. Yuan Yao (4): sf: add ADDR_4B for 4byte address support spi: fsl_qspi: Add 4bytes address support armv8: ls1012a: update the flash size to 64M. armv8: ls1046a: update the flash size to 64M. drivers/mtd/spi/sf_internal.h| 4 +++- drivers/mtd/spi/sf_params.c | 2 +- drivers/mtd/spi/spi_flash.c | 38 +- drivers/spi/fsl_qspi.c | 8 ++-- include/configs/ls1012a_common.h | 3 +-- include/configs/ls1046ardb.h | 3 +-- include/spi_flash.h | 1 + 7 files changed, 38 insertions(+), 21 deletions(-) -- 2.1.0.27.g96db324 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 0/6] toradex: config block handling
This series integrates Toradex factory configuration block handling. The config block is a data structure which gets stored to flash during production testing. The structure holds such information as board resp. hardware revision, product ID and serial number which is used as the NIC part of the Ethernet MAC address as well. The config block will be read upon boot by the checkboard() function, displayed as part of the board information and passed to Linux via device tree or ATAGs. Changes in v2: - fixed common.h include mess in board/toradex/common by renaming common* to tdx-common - renamed TRDX to TDX and trdx to tdx as in common use internally - consolidated makefiles and changed copyright message - renamed configblock* to tdx-cfg-block* analogous to Kconfig symbols - moved board/toradex/common/Kconfig sourcing from arch/arm/Kconfig into our own board Kconfig files - use a named choice for the config block location for above to work without issuing any warnings (undocumented kbuild feature curtsey Arnaud Lacombe) - added CUSTOM_BOARDINFO into our common Kconfig to avoid recent no_new_adhoc_configs_check error - add Max' patch colibri_vf: usb gadget: toradex pid is now set generically Marcel Ziswiler (5): colibri_imx7/vf: move to custom checkboard_fallback() apalis/colibri_t20/t30: deactivate displaying board info toradex: config block handling apalis/colibri_imx7/pxa270/t20/t30/vf: integrate config block handling apalis/colibri_t30: move environment location Max Krummenacher (1): colibri_vf: usb gadget: toradex pid is now set generically board/toradex/apalis_t30/Kconfig | 18 + board/toradex/apalis_t30/apalis_t30.c | 12 +- board/toradex/colibri_imx7/Kconfig| 16 + board/toradex/colibri_imx7/colibri_imx7.c | 6 +- board/toradex/colibri_pxa270/Kconfig | 11 + board/toradex/colibri_pxa270/colibri_pxa270.c | 8 + board/toradex/colibri_t20/Kconfig | 11 + board/toradex/colibri_t20/colibri_t20.c | 13 + board/toradex/colibri_t30/Kconfig | 18 + board/toradex/colibri_t30/colibri_t30.c | 9 +- board/toradex/colibri_vf/Kconfig | 14 + board/toradex/colibri_vf/colibri_vf.c | 24 +- board/toradex/common/Kconfig | 85 board/toradex/common/Makefile | 11 + board/toradex/common/tdx-cfg-block.c | 544 ++ board/toradex/common/tdx-cfg-block.h | 68 board/toradex/common/tdx-common.c | 180 + board/toradex/common/tdx-common.h | 13 + include/configs/apalis_t30.h | 12 +- include/configs/colibri_imx7.h| 6 +- include/configs/colibri_pxa270.h | 7 +- include/configs/colibri_t20.h | 3 +- include/configs/colibri_t30.h | 12 +- include/configs/colibri_vf.h | 14 +- scripts/config_whitelist.txt | 5 - 25 files changed, 1066 insertions(+), 54 deletions(-) create mode 100644 board/toradex/common/Kconfig create mode 100644 board/toradex/common/Makefile create mode 100644 board/toradex/common/tdx-cfg-block.c create mode 100644 board/toradex/common/tdx-cfg-block.h create mode 100644 board/toradex/common/tdx-common.c create mode 100644 board/toradex/common/tdx-common.h -- 2.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 5/6] apalis/colibri_t30: move environment location
Now with the config block handling in place move the U-Boot environment location before the config block at the end of 1st "boot sector" as deployed during production using our downstream BSP. Signed-off-by: Marcel Ziswiler--- Changes in v2: - fixed common.h include mess in board/toradex/common by renaming common* to tdx-common - renamed TRDX to TDX and trdx to tdx as in common use internally - consolidated makefiles and changed copyright message - renamed configblock* to tdx-cfg-block* analogous to Kconfig symbols - moved board/toradex/common/Kconfig sourcing from arch/arm/Kconfig into our own board Kconfig files - use a named choice for the config block location for above to work without issuing any warnings (undocumented kbuild feature curtsey Arnaud Lacombe) - added CUSTOM_BOARDINFO into our common Kconfig to avoid recent no_new_adhoc_configs_check error - add Max' patch colibri_vf: usb gadget: toradex pid is now set generically include/configs/apalis_t30.h | 7 --- include/configs/colibri_t30.h | 7 --- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h index 1a22973..5be770c 100644 --- a/include/configs/apalis_t30.h +++ b/include/configs/apalis_t30.h @@ -33,11 +33,12 @@ #define CONFIG_GENERIC_MMC #define CONFIG_TEGRA_MMC -/* Environment in eMMC, at the end of 2nd "boot sector" */ +/* Environment in eMMC, before config block at the end of 1st "boot sector" */ #define CONFIG_ENV_IS_IN_MMC -#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE) +#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE + \ +CONFIG_TDX_CFG_BLOCK_OFFSET) #define CONFIG_SYS_MMC_ENV_DEV 0 -#define CONFIG_SYS_MMC_ENV_PART2 +#define CONFIG_SYS_MMC_ENV_PART1 /* USB host support */ #define CONFIG_USB_EHCI diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h index 6b6496b..95cba12 100644 --- a/include/configs/colibri_t30.h +++ b/include/configs/colibri_t30.h @@ -33,11 +33,12 @@ #define CONFIG_GENERIC_MMC #define CONFIG_TEGRA_MMC -/* Environment in eMMC, at the end of 2nd "boot sector" */ +/* Environment in eMMC, before config block at the end of 1st "boot sector" */ #define CONFIG_ENV_IS_IN_MMC -#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE) +#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE + \ +CONFIG_TDX_CFG_BLOCK_OFFSET) #define CONFIG_SYS_MMC_ENV_DEV 0 -#define CONFIG_SYS_MMC_ENV_PART2 +#define CONFIG_SYS_MMC_ENV_PART1 /* USB host support */ #define CONFIG_USB_EHCI -- 2.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 6/6] colibri_vf: usb gadget: toradex pid is now set generically
From: Max Krummenacherremove now unused CONFIG_TRDX_PID_XXX Signed-off-by: Max Krummenacher Acked-by: Marcel Ziswiler --- Changes in v2: None board/toradex/colibri_vf/colibri_vf.c | 16 include/configs/colibri_vf.h | 7 --- scripts/config_whitelist.txt | 5 - 3 files changed, 28 deletions(-) diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index c636a8e..535d6d8 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -528,22 +528,6 @@ int checkboard_fallback(void) return 0; } -int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) -{ - unsigned short usb_pid; - - put_unaligned(CONFIG_TRDX_VID, >idVendor); - - if (is_colibri_vf61()) - usb_pid = CONFIG_TRDX_PID_COLIBRI_VF61IT; - else - usb_pid = CONFIG_TRDX_PID_COLIBRI_VF50IT; - - put_unaligned(usb_pid, >idProduct); - - return 0; -} - #ifdef CONFIG_USB_EHCI_VF int board_ehci_hcd_init(int port) { diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h index 38dbf35..78790f1 100644 --- a/include/configs/colibri_vf.h +++ b/include/configs/colibri_vf.h @@ -209,13 +209,6 @@ #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET -/* USB Client Support */ -#define CONFIG_TRDX_VID 0x1B67 -#define CONFIG_TRDX_PID_COLIBRI_VF50 0x0016 -#define CONFIG_TRDX_PID_COLIBRI_VF61 0x0017 -#define CONFIG_TRDX_PID_COLIBRI_VF61IT 0x0018 -#define CONFIG_TRDX_PID_COLIBRI_VF50IT 0x0019 - /* USB DFU */ #define CONFIG_SYS_DFU_DATA_BUF_SIZE (1024 * 1024) diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index efa95f0..f302ab8 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -8023,11 +8023,6 @@ CONFIG_TRACE_EARLY_ADDR CONFIG_TRACE_EARLY_SIZE CONFIG_TRAILBLAZER CONFIG_TRATS -CONFIG_TRDX_PID_COLIBRI_VF50 -CONFIG_TRDX_PID_COLIBRI_VF50IT -CONFIG_TRDX_PID_COLIBRI_VF61 -CONFIG_TRDX_PID_COLIBRI_VF61IT -CONFIG_TRDX_VID CONFIG_TSEC CONFIG_TSEC1 CONFIG_TSEC1_NAME -- 2.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 4/6] apalis/colibri_imx7/pxa270/t20/t30/vf: integrate config block handling
With our common code in place actually make use of it across all our modules. Signed-off-by: Marcel Ziswiler--- Changes in v2: None board/toradex/apalis_t30/Kconfig | 18 ++ board/toradex/apalis_t30/apalis_t30.c | 12 +++- board/toradex/colibri_imx7/Kconfig| 16 board/toradex/colibri_pxa270/Kconfig | 11 +++ board/toradex/colibri_pxa270/colibri_pxa270.c | 8 board/toradex/colibri_t20/Kconfig | 11 +++ board/toradex/colibri_t20/colibri_t20.c | 13 + board/toradex/colibri_t30/Kconfig | 18 ++ board/toradex/colibri_t30/colibri_t30.c | 9 - board/toradex/colibri_vf/Kconfig | 14 ++ board/toradex/common/Kconfig | 5 + include/configs/apalis_t30.h | 4 ++-- include/configs/colibri_imx7.h| 6 +- include/configs/colibri_pxa270.h | 7 +-- include/configs/colibri_t20.h | 2 +- include/configs/colibri_t30.h | 4 ++-- include/configs/colibri_vf.h | 7 --- 17 files changed, 152 insertions(+), 13 deletions(-) diff --git a/board/toradex/apalis_t30/Kconfig b/board/toradex/apalis_t30/Kconfig index f1dcda5..16224da 100644 --- a/board/toradex/apalis_t30/Kconfig +++ b/board/toradex/apalis_t30/Kconfig @@ -9,4 +9,22 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "apalis_t30" +config TDX_CFG_BLOCK + default y + +config TDX_HAVE_MMC + default y + +config TDX_CFG_BLOCK_DEV + default "0" + +config TDX_CFG_BLOCK_PART + default "1" + +# Toradex config block in eMMC, at the end of 1st "boot sector" +config TDX_CFG_BLOCK_OFFSET + default "-512" + +source "board/toradex/common/Kconfig" + endif diff --git a/board/toradex/apalis_t30/apalis_t30.c b/board/toradex/apalis_t30/apalis_t30.c index 3f56971..bf13053 100644 --- a/board/toradex/apalis_t30/apalis_t30.c +++ b/board/toradex/apalis_t30/apalis_t30.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2014 + * (C) Copyright 2014-2016 * Marcel Ziswiler * * SPDX-License-Identifier:GPL-2.0+ @@ -17,6 +17,8 @@ #include "pinmux-config-apalis_t30.h" +DECLARE_GLOBAL_DATA_PTR; + #define PMU_I2C_ADDRESS0x2D #define MAX_I2C_RETRY 3 @@ -29,6 +31,14 @@ int arch_misc_init(void) return 0; } +int checkboard_fallback(void) +{ + printf("Model: Toradex Apalis T30 %dGB\n", + (gd->ram_size == 0x4000) ? 1 : 2); + + return 0; +} + /* * Routine: pinmux_init * Description: Do individual peripheral pinmux configs diff --git a/board/toradex/colibri_imx7/Kconfig b/board/toradex/colibri_imx7/Kconfig index 7bba26b..414a600 100644 --- a/board/toradex/colibri_imx7/Kconfig +++ b/board/toradex/colibri_imx7/Kconfig @@ -16,5 +16,21 @@ config COLIBRI_IMX7_EXT_PHYCLK clock source. default y +config TDX_CFG_BLOCK + default y + +config TDX_HAVE_NAND + default y + +config TDX_CFG_BLOCK_OFFSET + default "2048" + +config TDX_CFG_BLOCK_OFFSET2 + default "133120" + +config TDX_CFG_BLOCK_2ND_ETHADDR + default y + +source "board/toradex/common/Kconfig" endif diff --git a/board/toradex/colibri_pxa270/Kconfig b/board/toradex/colibri_pxa270/Kconfig index 949407a..f646baa 100644 --- a/board/toradex/colibri_pxa270/Kconfig +++ b/board/toradex/colibri_pxa270/Kconfig @@ -9,4 +9,15 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "colibri_pxa270" +config TDX_CFG_BLOCK + default y + +config TDX_HAVE_NOR + default y + +config TDX_CFG_BLOCK_OFFSET + default "262144" + +source "board/toradex/common/Kconfig" + endif diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c index 3def0a6..5737363 100644 --- a/board/toradex/colibri_pxa270/colibri_pxa270.c +++ b/board/toradex/colibri_pxa270/colibri_pxa270.c @@ -2,6 +2,7 @@ * Toradex Colibri PXA270 Support * * Copyright (C) 2010 Marek Vasut + * Copyright (C) 2016 Marcel Ziswiler * * SPDX-License-Identifier:GPL-2.0+ */ @@ -32,6 +33,13 @@ int board_init(void) return 0; } +int checkboard_fallback(void) +{ + puts("Model: Toradex Colibri PXA270\n"); + + return 0; +} + int dram_init(void) { pxa2xx_dram_init(); diff --git a/board/toradex/colibri_t20/Kconfig b/board/toradex/colibri_t20/Kconfig index 7f373b2..a43acdd 100644 --- a/board/toradex/colibri_t20/Kconfig +++ b/board/toradex/colibri_t20/Kconfig @@ -9,4 +9,15 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "colibri_t20" +config TDX_CFG_BLOCK + default y + +config TDX_HAVE_NAND + default y + +config TDX_CFG_BLOCK_OFFSET + default "3145728" + +source
[U-Boot] [PATCH v2 1/6] colibri_imx7/vf: move to custom checkboard_fallback()
Rename checkboard() to checkboard_fallback() in order to avoid a name clash with our upcoming common implementation thereof. Signed-off-by: Marcel Ziswiler--- Changes in v2: None board/toradex/colibri_imx7/colibri_imx7.c | 6 +++--- board/toradex/colibri_vf/colibri_vf.c | 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index 8eedd65..73cd89c 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -377,10 +377,10 @@ int board_late_init(void) return 0; } -int checkboard(void) +int checkboard_fallback(void) { - printf("Model: Toradex Colibri iMX7%c\n", - is_cpu_type(MXC_CPU_MX7D) ? 'D' : 'S'); + printf("Model: Toradex Colibri iMX7%s\n", + is_cpu_type(MXC_CPU_MX7D) ? "D 512MB" : "S 256MB"); return 0; } diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index c65ccb3..c636a8e 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -1,5 +1,5 @@ /* - * Copyright 2015 Toradex, Inc. + * Copyright 2015-2016 Toradex, Inc. * * Based on vf610twr.c: * Copyright 2013 Freescale Semiconductor, Inc. @@ -518,12 +518,12 @@ int board_init(void) return 0; } -int checkboard(void) +int checkboard_fallback(void) { if (is_colibri_vf61()) - puts("Board: Colibri VF61\n"); + puts("Model: Toradex Colibri VF61 256MB\n"); else - puts("Board: Colibri VF50\n"); + puts("Model: Toradex Colibri VF50 128MB\n"); return 0; } -- 2.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/6] apalis/colibri_t20/t30: deactivate displaying board info
Avoid a checkboard() name clash with our upcoming custom implementation thereof. Signed-off-by: Marcel Ziswiler--- Changes in v2: None include/configs/apalis_t30.h | 1 + include/configs/colibri_t20.h | 1 + include/configs/colibri_t30.h | 1 + 3 files changed, 3 insertions(+) diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h index 3fc1779..dc17733 100644 --- a/include/configs/apalis_t30.h +++ b/include/configs/apalis_t30.h @@ -17,6 +17,7 @@ /* High-level configuration options */ #define CONFIG_TEGRA_BOARD_STRING "Toradex Apalis T30" +#undef CONFIG_DISPLAY_BOARDINFO/* As defined in tegra-common */ /* Board-specific serial config */ #define CONFIG_TEGRA_ENABLE_UARTA diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h index b299e15..431fec0 100644 --- a/include/configs/colibri_t20.h +++ b/include/configs/colibri_t20.h @@ -15,6 +15,7 @@ /* High-level configuration options */ #define CONFIG_TEGRA_BOARD_STRING "Toradex Colibri T20" +#undef CONFIG_DISPLAY_BOARDINFO/* As defined in tegra-common */ /* Board-specific serial config */ #define CONFIG_TEGRA_ENABLE_UARTA diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h index e2a2549..d83c5a0 100644 --- a/include/configs/colibri_t30.h +++ b/include/configs/colibri_t30.h @@ -17,6 +17,7 @@ /* High-level configuration options */ #define CONFIG_TEGRA_BOARD_STRING "Toradex Colibri T30" +#undef CONFIG_DISPLAY_BOARDINFO/* As defined in tegra-common */ /* Board-specific serial config */ #define CONFIG_TEGRA_ENABLE_UARTA -- 2.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/6] toradex: config block handling
Add Toradex factory configuration block handling. The config block is a data structure which gets stored to flash during production testing. The structure holds such information as board resp. hardware revision, product ID and serial number which is used as the NIC part of the Ethernet MAC address as well. The config block will be read upon boot by the checkboard() function, displayed as part of the board information and passed to Linux via device tree or ATAGs. Signed-off-by: Marcel Ziswiler--- Changes in v2: None board/toradex/common/Kconfig | 80 ++ board/toradex/common/Makefile| 11 + board/toradex/common/tdx-cfg-block.c | 544 +++ board/toradex/common/tdx-cfg-block.h | 68 + board/toradex/common/tdx-common.c| 180 board/toradex/common/tdx-common.h| 13 + 6 files changed, 896 insertions(+) create mode 100644 board/toradex/common/Kconfig create mode 100644 board/toradex/common/Makefile create mode 100644 board/toradex/common/tdx-cfg-block.c create mode 100644 board/toradex/common/tdx-cfg-block.h create mode 100644 board/toradex/common/tdx-common.c create mode 100644 board/toradex/common/tdx-common.h diff --git a/board/toradex/common/Kconfig b/board/toradex/common/Kconfig new file mode 100644 index 000..e269875 --- /dev/null +++ b/board/toradex/common/Kconfig @@ -0,0 +1,80 @@ +# Copyright (c) 2016 Toradex, Inc. +# SPDX-License-Identifier: GPL-2.0+ + +# Not from device tree model node +config CUSTOM_BOARDINFO + bool + +menuconfig TDX_CFG_BLOCK + bool "Enable Toradex config block support" + select OF_BOARD_SETUP + help + The Toradex config block stored production data on the on-module + flash device (NAND, NOR or eMMC). The area is normally preserved by + software and contains the serial number (out of which the MAC + address is generated) and the exact module type. + +# Helper config to determine the correct default location of the cfg block +config TDX_HAVE_MMC + bool + +config TDX_HAVE_NAND + bool + +config TDX_HAVE_NOR + bool + +if TDX_CFG_BLOCK + +choice TDX_CFG_BLOCK_LOCATION + prompt "Toradex config block location" + depends on TDX_CFG_BLOCK + default TDX_CFG_BLOCK_IS_IN_MMC if TDX_HAVE_MMC + default TDX_CFG_BLOCK_IS_IN_NAND if TDX_HAVE_NAND + default TDX_CFG_BLOCK_IS_IN_NOR if TDX_HAVE_NOR + help + Configure the location of the Toradex config block. By default, the + factory version of the Toradex config block is on the NAND, NOR or + eMMC flash device on the module. + +config TDX_CFG_BLOCK_IS_IN_MMC + bool "Location of the config block is in eMMC" + +config TDX_CFG_BLOCK_IS_IN_NAND + bool "Location of the config block is in NAND" + +config TDX_CFG_BLOCK_IS_IN_NOR + bool "Location of the config block is in NOR" + +endchoice + +config TDX_CFG_BLOCK_DEV + int "Toradex config block eMMC device ID" + depends on TDX_CFG_BLOCK_IS_IN_MMC + +config TDX_CFG_BLOCK_PART + int "Toradex config block eMMC partition ID" + depends on TDX_CFG_BLOCK_IS_IN_MMC + +config TDX_CFG_BLOCK_OFFSET + int "Toradex config block offset" + help + Specify the byte offset of the Toradex config block within the flash + device the config block is stored on. + +config TDX_CFG_BLOCK_OFFSET2 + int "Toradex config block offset, second instance" + default 0 + help + Specify the byte offset of the 2nd instance of the Toradex config block + within the flash device the config block is stored on. + Set to 0 on modules which have no 2nd instance. + +config TDX_CFG_BLOCK_2ND_ETHADDR + bool "Set the second Ethernet address" + help + For each serial number two Ethernet addresses are available for dual + Ethernet carrier boards. This options enables the code to set the + second Ethernet address as environment variable (eth1addr). + +endif diff --git a/board/toradex/common/Makefile b/board/toradex/common/Makefile new file mode 100644 index 000..d645f5a --- /dev/null +++ b/board/toradex/common/Makefile @@ -0,0 +1,11 @@ +# Copyright (c) 2016 Toradex, Inc. +# SPDX-License-Identifier: GPL-2.0+ + +# Common for all Toradex modules +ifeq ($(CONFIG_SPL_BUILD),y) +# Necessary to create built-in.o +obj- := __dummy__.o +else +obj-$(CONFIG_TDX_CFG_BLOCK) += tdx-cfg-block.o +obj-y += tdx-common.o +endif diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c new file mode 100644 index 000..0014ce8 --- /dev/null +++ b/board/toradex/common/tdx-cfg-block.c @@ -0,0 +1,544 @@ +/* + * Copyright (c) 2016 Toradex, Inc. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include "tdx-cfg-block.h" + +#if defined(CONFIG_TARGET_APALIS_IMX6) || defined(CONFIG_TARGET_COLIBRI_IMX6) +#include +#else +#define
Re: [U-Boot] U-Boot DFU test and Ctrl+C
Hi Tom, > Hey guys, > > As I use the DFU tests more and more, I keep hitting what I'm pretty > sure is a false failure in the tests. Sometimes the tests fail at: > > u_boot_console.wait_for('Ctrl+C to exit ...') > > and the last bit of the console log is: > Starting download: > [#] > finished! unable to read DFU status #File System is consistent > file found, deleting > update journal finished > File System is consistent > update journal finished > 65 bytes written in 12380 ms (0 Bytes/s) > => > > So perhaps we should make the test look for the prompt itself rather > than 'Ctrl+C' ? Thanks! As fair as I remember, dfu-util provides and u-boot's dfu supports -e switch behavior. This switch causes the dfu u-boot command to go directly to u-boot prompt. Tom, I suppose that this is what you would need. Just add -e to your host's dfu-util command. > -- Best regards, Lukasz Majewski Samsung R Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] ARM: vf610: use strcpy for soc environment variable
From: Stefan AgnerTo create the soc environment variable we concatenate two strings on the stack. So far, strcat has been used for the first string as well as for the second string. Since the variable on the stack is not initialized, the first strcat may not start using the first entry in the character array. This then could lead to an buffer overflow on the stack. Signed-off-by: Stefan Agner Acked-by: Marcel Ziswiler --- Changes in v2: - Re-based and re-send. arch/arm/cpu/armv7/vf610/generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c index 08b9ef4..50eb0c6 100644 --- a/arch/arm/cpu/armv7/vf610/generic.c +++ b/arch/arm/cpu/armv7/vf610/generic.c @@ -322,7 +322,7 @@ int arch_misc_init(void) { char soc[6]; - strcat(soc, "vf"); + strcpy(soc, "vf"); strcat(soc, soc_type); setenv("soc", soc); -- 2.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 3/5] regulator: fixed: honour optionality of enable gpio
According to the binding documentation the fixed regulator enable GPIO is optional. However so far registration thereof failed if no enable GPIO was specified. Fix this by making it entirely optional whether an enable GPIO is used. Signed-off-by: Marcel ZiswilerAcked-by: Stephen Warren --- Changes in v6: None Changes in v5: - Remove DEBUG define. - Put the " - not found! Error" back into the debug message as suggested by Stephen. - Add Stephen's ack. Changes in v4: - Use full regulator rather than reg wording again in debug message as suggested by Przemyslaw. - Tighten up error handling as suggested by John. - Fix set_enable() as suggested by Stephen. Changes in v3: - Introduce new patch to honour optionality of fixed regulator enable GPIO. Changes in v2: None drivers/power/regulator/fixed.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c index 37b8400..62dc47f 100644 --- a/drivers/power/regulator/fixed.c +++ b/drivers/power/regulator/fixed.c @@ -37,11 +37,15 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev) /* Set type to fixed */ uc_pdata->type = REGULATOR_TYPE_FIXED; - /* Get fixed regulator gpio desc */ + /* Get fixed regulator optional enable GPIO desc */ gpio = _pdata->gpio; ret = gpio_request_by_name(dev, "gpio", 0, gpio, GPIOD_IS_OUT); - if (ret) - debug("Fixed regulator gpio - not found! Error: %d", ret); + if (ret) { + debug("Fixed regulator optional enable GPIO - not found! Error: %d\n", + ret); + if (ret != -ENOENT) + return ret; + } /* Get optional ramp up delay */ dev_pdata->startup_delay_us = fdtdec_get_uint(gd->fdt_blob, @@ -87,8 +91,9 @@ static bool fixed_regulator_get_enable(struct udevice *dev) { struct fixed_regulator_platdata *dev_pdata = dev_get_platdata(dev); + /* Enable GPIO is optional */ if (!dev_pdata->gpio.dev) - return false; + return true; return dm_gpio_get_value(_pdata->gpio); } @@ -98,8 +103,12 @@ static int fixed_regulator_set_enable(struct udevice *dev, bool enable) struct fixed_regulator_platdata *dev_pdata = dev_get_platdata(dev); int ret; - if (!dev_pdata->gpio.dev) - return -ENOSYS; + /* Enable GPIO is optional */ + if (!dev_pdata->gpio.dev) { + if (!enable) + return -ENOSYS; + return 0; + } ret = dm_gpio_set_value(_pdata->gpio, enable); if (ret) { -- 2.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 0/5] various fixes mainly for colibri_t20
This series addresses various issues as seen on Colibri T20. Please note that for successful Ethernet operation not only on Colibri T20 but also on Colibri T30 the following patch will still be required already waiting in Marek's usb tree: [PATCH v2] net: asix: Fix ASIX 88772B with driver model https://www.mail-archive.com/u-boot@lists.denx.de/msg224349.html Changes in v6: - Re-based to latest tegra custodian tree and fixed sdhci0 vs. mmc0 merge conflict. Changes in v5: - Remove DEBUG define. - Put the " - not found! Error" back into the debug message as suggested by Stephen. - Add Stephen's ack. Changes in v4: - Use full regulator rather than reg wording again in debug message as suggested by Przemyslaw. - Tighten up error handling as suggested by John. - Fix set_enable() as suggested by Stephen. - Add Stephen's ack. Changes in v3: - Add Stephen's ack. - Introduce new patch to honour optionality of fixed regulator enable GPIO. - Get rid of dummy N/C GPIO work around now as the fixed regulator properly honours optionality of enable GPIO. - Add Stephen's ack. Changes in v2: - As suggested by Stephen gating the CONFIG_CI_UDC_HAS_HOSTPC define with CONFIG_TEGRA20 rather than duplicating the same into all other SoC type specific header files. - Add Anatolij's ack. - Rename dummy regulator to reg_3v3 as suggested by Stephen. - Keep dummy N/C GPIO to work around bug in U-Boot regulator driver requiring such node despite its binding claiming it being optional. - As suggested by Stephen remove last patch 5/5 colibri_t20: enable dfu also for nand. Marcel Ziswiler (5): tegra: usb gadget: fix ci udc operation if not hostpc capable simple panel: fix spelling of debug message regulator: fixed: honour optionality of enable gpio colibri_t20: fix display configuration colibri_t20: fix usb operation and controller order arch/arm/dts/tegra20-colibri.dts | 117 +++--- drivers/power/regulator/fixed.c | 21 -- drivers/video/simple_panel.c | 2 +- include/configs/tegra-common-usb-gadget.h | 2 + 4 files changed, 93 insertions(+), 49 deletions(-) -- 2.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 4/5] colibri_t20: fix display configuration
Without this patch the following error will be shown: stdio_add_devices: Video device failed (ret=-22) As commit ec5507707a1d1e84056a6c864338f95f6118d3ca (video: tegra: Move to using simple-panel and pwm-backlight) states the Colibri T20 needs updating too which this patch finally attempts doing. Signed-off-by: Marcel ZiswilerAcked-by: Stephen Warren --- Changes in v6: None Changes in v5: None Changes in v4: - Add Stephen's ack. Changes in v3: - Get rid of dummy N/C GPIO work around now as the fixed regulator properly honours optionality of enable GPIO. Changes in v2: - Rename dummy regulator to reg_3v3 as suggested by Stephen. - Keep dummy N/C GPIO to work around bug in U-Boot regulator driver requiring such node despite its binding claiming it being optional. arch/arm/dts/tegra20-colibri.dts | 71 +--- 1 file changed, 51 insertions(+), 20 deletions(-) diff --git a/arch/arm/dts/tegra20-colibri.dts b/arch/arm/dts/tegra20-colibri.dts index 777f63e..c198eef 100644 --- a/arch/arm/dts/tegra20-colibri.dts +++ b/arch/arm/dts/tegra20-colibri.dts @@ -21,12 +21,24 @@ }; host1x@5000 { - status = "okay"; dc@5420 { - status = "okay"; rgb { status = "okay"; nvidia,panel = <_panel>; + display-timings { + timing@0 { + /* VESA VGA */ + clock-frequency = <25175000>; + hactive = <640>; + vactive = <480>; + hback-porch = <48>; + hfront-porch = <16>; + hsync-len = <96>; + vback-porch = <31>; + vfront-porch = <11>; + vsync-len = <2>; + }; + }; }; }; }; @@ -61,6 +73,10 @@ }; }; + pwm@7000a000 { + status = "okay"; + }; + /* * GEN1_I2C: I2C_SDA/SCL on SODIMM pin 194/196 (e.g. RTC on carrier * board) @@ -92,6 +108,18 @@ cd-gpios = < TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>; }; + backlight: backlight { + compatible = "pwm-backlight"; + + brightness-levels = <255 128 64 32 16 8 4 0>; + default-brightness-level = <6>; + /* BL_ON */ + enable-gpios = < TEGRA_GPIO(T, 4) GPIO_ACTIVE_HIGH>; + power-supply = <_3v3>; + /* PWM */ + pwms = < 0 500>; + }; + clocks { compatible = "simple-bus"; #address-cells = <1>; @@ -105,25 +133,28 @@ }; }; - pwm: pwm@7000a000 { - status = "okay"; + lcd_panel: panel { + /* +* edt,et057090dhu: EDT 5.7" LCD TFT +* edt,et070080dh6: EDT 7.0" LCD TFT +*/ + compatible = "edt,et057090dhu", "simple-panel"; + + backlight = <>; }; - lcd_panel: panel { - clock = <25175000>; - xres = <640>; - yres = <480>; - left-margin = <48>; /* horizontal back porch */ - right-margin = <16>;/* horizontal front porch */ - hsync-len = <96>; - lower-margin = <11>;/* vertical front porch */ - upper-margin = <31>;/* vertical back porch */ - vsync-len = <2>; - hsync-active-high; - vsync-active-high; - nvidia,bits-per-pixel = <16>; - nvidia,pwm = < 0 0>; - nvidia,backlight-enable-gpios = < TEGRA_GPIO(T, 4) GPIO_ACTIVE_HIGH>; - nvidia,panel-timings = <0 0 0 0>; + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + reg_3v3: regulator@0 { + compatible = "regulator-fixed"; + reg = <0>; + regulator-name = "+V3.3"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + regulator-always-on; + }; }; }; -- 2.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de
[U-Boot] [PATCH v6 1/5] tegra: usb gadget: fix ci udc operation if not hostpc capable
The Tegra 2 aka T20 is not host PC capable. Therefore gate the define CONFIG_CI_UDC_HAS_HOSTPC in tegra-common-usb-gadget.h in case of CONFIG_TEGRA20. Signed-off-by: Marcel ZiswilerAcked-by: Stephen Warren --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: - Add Stephen's ack. Changes in v2: - As suggested by Stephen gating the CONFIG_CI_UDC_HAS_HOSTPC define with CONFIG_TEGRA20 rather than duplicating the same into all other SoC type specific header files. include/configs/tegra-common-usb-gadget.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/tegra-common-usb-gadget.h b/include/configs/tegra-common-usb-gadget.h index 3e3eeea..2e492c1 100644 --- a/include/configs/tegra-common-usb-gadget.h +++ b/include/configs/tegra-common-usb-gadget.h @@ -10,7 +10,9 @@ #ifndef CONFIG_SPL_BUILD /* USB gadget mode support*/ +#ifndef CONFIG_TEGRA20 #define CONFIG_CI_UDC_HAS_HOSTPC +#endif /* USB mass storage protocol */ #define CONFIG_USB_FUNCTION_MASS_STORAGE /* DFU protocol */ -- 2.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 5/5] colibri_t20: fix usb operation and controller order
Without this patch the following error will be shown: Colibri T20 # usb start starting USB... No controllers found This patch fixes USB operation and also the controller order as the CI UDC driver may only be instantiated on the first aka OTG port. Signed-off-by: Marcel ZiswilerAcked-by: Stephen Warren --- Changes in v6: - Re-based to latest tegra custodian tree and fixed sdhci0 vs. mmc0 merge conflict. Changes in v5: None Changes in v4: None Changes in v3: - Add Stephen's ack. Changes in v2: - As suggested by Stephen remove last patch 5/5 colibri_t20: enable dfu also for nand. arch/arm/dts/tegra20-colibri.dts | 46 +--- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/arch/arm/dts/tegra20-colibri.dts b/arch/arm/dts/tegra20-colibri.dts index c198eef..89adfb6 100644 --- a/arch/arm/dts/tegra20-colibri.dts +++ b/arch/arm/dts/tegra20-colibri.dts @@ -14,10 +14,10 @@ i2c0 = "/i2c@7000d000"; i2c1 = "/i2c@7000c000"; i2c2 = "/i2c@7000c400"; - usb0 = "/usb@c5008000"; - usb1 = "/usb@c500"; - usb2 = "/usb@c5004000"; mmc0 = "/sdhci@c8000600"; + usb0 = "/usb@c500"; + usb1 = "/usb@c5004000"; /* on-module only, for ASIX */ + usb2 = "/usb@c5008000"; }; host1x@5000 { @@ -43,25 +43,6 @@ }; }; - usb@c500 { - statuc = "okay"; - dr_mode = "otg"; - }; - - usb@c5004000 { - statuc = "okay"; - /* VBUS_LAN */ - nvidia,phy-reset-gpio = < TEGRA_GPIO(V, 1) - GPIO_ACTIVE_LOW>; - nvidia,vbus-gpio = < TEGRA_GPIO(BB, 1) GPIO_ACTIVE_HIGH>; - }; - - usb@c5008000 { - statuc = "okay"; - /* USBH_PEN */ - nvidia,vbus-gpio = < TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>; - }; - nand-controller@70008000 { nvidia,wp-gpios = < TEGRA_GPIO(S, 0) GPIO_ACTIVE_HIGH>; nvidia,width = <8>; @@ -102,6 +83,27 @@ clock-frequency = <10>; }; + /* EHCI instance 0: USB1_DP/N -> USBC_P/N */ + usb@c500 { + status = "okay"; + dr_mode = "otg"; + }; + + /* EHCI instance 1: ULPI -> USB3340 -> AX88772B */ + usb@c5004000 { + status = "okay"; + /* VBUS_LAN */ + nvidia,phy-reset-gpio = < TEGRA_GPIO(V, 1) GPIO_ACTIVE_HIGH>; + nvidia,vbus-gpio = < TEGRA_GPIO(BB, 1) GPIO_ACTIVE_HIGH>; + }; + + /* EHCI instance 2: USB3_DP/N -> USBH_P/N */ + usb@c5008000 { + status = "okay"; + /* USBH_PEN */ + nvidia,vbus-gpio = < TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>; + }; + sdhci@c8000600 { status = "okay"; bus-width = <4>; -- 2.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 2/5] simple panel: fix spelling of debug message
Fix spelling of debug message from cnnot to cannot. Signed-off-by: Marcel ZiswilerAcked-by: Anatolij Gustschin --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: - Add Anatolij's ack. drivers/video/simple_panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/simple_panel.c b/drivers/video/simple_panel.c index b2fe345..baa95f6 100644 --- a/drivers/video/simple_panel.c +++ b/drivers/video/simple_panel.c @@ -42,7 +42,7 @@ static int simple_panel_ofdata_to_platdata(struct udevice *dev) ret = uclass_get_device_by_phandle(UCLASS_REGULATOR, dev, "power-supply", >reg); if (ret) { - debug("%s: Warning: cnnot get power supply: ret=%d\n", + debug("%s: Warning: cannot get power supply: ret=%d\n", __func__, ret); if (ret != -ENOENT) return ret; -- 2.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] x86: baytrail: Add 2nd eMMC controller to the PCI probe list
On Mon, Sep 26, 2016 at 4:52 PM, Bin Mengwrote: > On Mon, Sep 26, 2016 at 4:18 PM, Stefan Roese wrote: >> With this addition, the eMMC device available on the congatec and DFI >> BayTrail SoM is detected correctly. >> >> Signed-off-by: Stefan Roese >> Cc: Simon Glass >> Cc: Bin Meng >> --- >> v2: >> - Change VALLEYVIEW macros to also use BYT names, to match the >> naming of the Linux SHDCI device driver >> >> arch/x86/cpu/baytrail/valleyview.c | 5 +++-- >> include/pci_ids.h | 5 +++-- >> 2 files changed, 6 insertions(+), 4 deletions(-) >> > > Reviewed-by: Bin Meng applied to u-boot-x86, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] usb:gadget: Disallow DFU in SPL for now
Hi Tom, > Previously, DFU was not built in for SPL and often disabled via the > board config.h file, in the SPL build. By moving DFU to Kconfig we > now need to move this logic to the Makefile to continue to allow > boards to fit within their SPL size limit (until gcc 6 is more > widespread and unused strings will be discarded). > > Signed-off-by: Tom Rini> --- > Without this, but everything converted am335x_evm_usbspl fails to > link (does gadget USB in SPL) unless we make drivers/dfu/ > unconditional. This however breaks a few other platforms that have a > smaller SPL size due to undiscarded strings, and a lot of other > platforms just grow by a few KiB. This is the best solution I can > come up with for now. Ok, lets disable it (hopefully for now). > > drivers/usb/gadget/Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile > index c915c79..acc9964 100644 > --- a/drivers/usb/gadget/Makefile > +++ b/drivers/usb/gadget/Makefile > @@ -19,7 +19,9 @@ obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o > obj-$(CONFIG_CI_UDC) += ci_udc.o > obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o > obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o > +ifndef CONFIG_SPL_BUILD > obj-$(CONFIG_USB_FUNCTION_DFU) += f_dfu.o > +endif > obj-$(CONFIG_USB_FUNCTION_MASS_STORAGE) += f_mass_storage.o > obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += f_fastboot.o > endif -- Best regards, Lukasz Majewski Samsung R Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] spl: saveenv: adding saveenv support in SPL
Drop this send wrong version Regards Ravi -Original Message- From: B, Ravi Sent: Wednesday, September 28, 2016 2:43 PM To: u-boot@lists.denx.de Cc: tr...@konsulko.com; s...@chromium.org; jh80.ch...@samsung.com; Vutla, Lokesh; B, Ravi Subject: [PATCH] spl: saveenv: adding saveenv support in SPL By default saveenv option is not supported for SPL. This patch enable the support for save environment variable for SPL build. Enable save environment support in SPL after setenv. By default the saveenv option is not provided in SPL, but some boards need this support in 'Falcon' boot, where SPL need to boot from different images based on environment variable set by OS. For example OS may set "reboot_image" environment variable to "recovery" inorder to boot recovery image by SPL. The SPL read "reboot_image" and act accordingly and change the reboot_image to default mode using setenv and save the environemnt. Signed-off-by: Ravi BabuReviewed-by: Simon Glass --- common/spl/Kconfig| 13 + drivers/mmc/Makefile | 1 + drivers/mmc/mmc_private.h | 3 +-- lib/Makefile | 1 + lib/hashtable.c | 2 +- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 2a8ddbc..605cf66 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -163,6 +163,19 @@ config SPL_ENV_SUPPORT starting U-Boot first. Enabling this option will make getenv() and setenv() available in SPL. +config SPL_SAVEENV + bool "Support save environment" + depends on SPL && SPL_ENV_SUPPORT + help + Enable save environment support in SPL after setenv. By default + the saveenv option is not provided in SPL, but some boards need + this support in 'Falcon' boot, where SPL need to boot from + different images based on environment variable set by OS. For + example OS may set "reboot_image" environment variable to + "recovery" inorder to boot recovery image by SPL. The SPL read + "reboot_image" and act accordingly and change the reboot_image + to default mode using setenv and save the environemnt. + config SPL_ETH_SUPPORT bool "Support Ethernet" depends on SPL_ENV_SUPPORT diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile index 18351fb..d850758 100644 --- a/drivers/mmc/Makefile +++ b/drivers/mmc/Makefile @@ -60,6 +60,7 @@ obj-$(CONFIG_ROCKCHIP_SDHCI) += rockchip_sdhci.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_MMC_BOOT) += fsl_esdhc_spl.o +obj-$(CONFIG_SPL_SAVEENV) += mmc_write.o else obj-$(CONFIG_GENERIC_MMC) += mmc_write.o endif diff --git a/drivers/mmc/mmc_private.h b/drivers/mmc/mmc_private.h index 49ec022..e0c9849 100644 --- a/drivers/mmc/mmc_private.h +++ b/drivers/mmc/mmc_private.h @@ -28,8 +28,7 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, void *dst); #endif -#ifndef CONFIG_SPL_BUILD - +#if !(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SAVEENV)) unsigned long mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt); diff --git a/lib/Makefile b/lib/Makefile index c81bfeb..e3383f4 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -47,6 +47,7 @@ obj-$(CONFIG_$(SPL_)RSA) += rsa/ obj-$(CONFIG_$(SPL_)SHA1) += sha1.o obj-$(CONFIG_$(SPL_)SHA256) += sha256.o +obj-$(CONFIG_SPL_SAVEENV) += qsort.o obj-$(CONFIG_$(SPL_)OF_LIBFDT) += libfdt/ ifneq ($(CONFIG_SPL_BUILD)$(CONFIG_SPL_OF_PLATDATA),yy) obj-$(CONFIG_$(SPL_)OF_CONTROL) += fdtdec_common.o diff --git a/lib/hashtable.c b/lib/hashtable.c index 4e52b36..07c437c 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -477,11 +477,11 @@ int hdelete_r(const char *key, struct hsearch_data *htab, int flag) return 1; } +#if !(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SAVEENV)) /* * hexport() */ -#ifndef CONFIG_SPL_BUILD /* * Export the data stored in the hash table in linearized form. * -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1] spl: saveenv: adding saveenv support in SPL
By default saveenv option is not supported for SPL. This patch enable the support for save environment variable for SPL build. Enable save environment support in SPL after setenv. By default the saveenv option is not provided in SPL, but some boards need this support in 'Falcon' boot, where SPL need to boot from different images based on environment variable set by OS. For example OS may set "reboot_image" environment variable to "recovery" inorder to boot recovery image by SPL. The SPL read "reboot_image" and act accordingly and change the reboot_image to default mode using setenv and save the environemnt. Signed-off-by: Ravi BabuReviewed-by: Simon Glass change in v1: - dropped SUPPORT, use CONFIG_SPL_SAVEENV - updates the comments in mmc_private.h --- common/spl/Kconfig| 13 + drivers/mmc/Makefile | 1 + drivers/mmc/mmc_private.h | 7 +++ lib/Makefile | 1 + lib/hashtable.c | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 2a8ddbc..605cf66 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -163,6 +163,19 @@ config SPL_ENV_SUPPORT starting U-Boot first. Enabling this option will make getenv() and setenv() available in SPL. +config SPL_SAVEENV + bool "Support save environment" + depends on SPL && SPL_ENV_SUPPORT + help + Enable save environment support in SPL after setenv. By default + the saveenv option is not provided in SPL, but some boards need + this support in 'Falcon' boot, where SPL need to boot from + different images based on environment variable set by OS. For + example OS may set "reboot_image" environment variable to + "recovery" inorder to boot recovery image by SPL. The SPL read + "reboot_image" and act accordingly and change the reboot_image + to default mode using setenv and save the environemnt. + config SPL_ETH_SUPPORT bool "Support Ethernet" depends on SPL_ENV_SUPPORT diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile index 18351fb..d850758 100644 --- a/drivers/mmc/Makefile +++ b/drivers/mmc/Makefile @@ -60,6 +60,7 @@ obj-$(CONFIG_ROCKCHIP_SDHCI) += rockchip_sdhci.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_MMC_BOOT) += fsl_esdhc_spl.o +obj-$(CONFIG_SPL_SAVEENV) += mmc_write.o else obj-$(CONFIG_GENERIC_MMC) += mmc_write.o endif diff --git a/drivers/mmc/mmc_private.h b/drivers/mmc/mmc_private.h index 49ec022..d8b399e 100644 --- a/drivers/mmc/mmc_private.h +++ b/drivers/mmc/mmc_private.h @@ -28,8 +28,7 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, void *dst); #endif -#ifndef CONFIG_SPL_BUILD - +#if !(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SAVEENV)) unsigned long mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt); @@ -41,9 +40,9 @@ ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, const void *src); #endif -#else /* CONFIG_SPL_BUILD */ +#else /* CONFIG_SPL_BUILD and CONFIG_SPL_SAVEENV is not defined */ -/* SPL will never write or erase, declare dummies to reduce code size. */ +/* declare dummies to reduce code size. */ #ifdef CONFIG_BLK static inline unsigned long mmc_berase(struct udevice *dev, diff --git a/lib/Makefile b/lib/Makefile index c81bfeb..e3383f4 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -47,6 +47,7 @@ obj-$(CONFIG_$(SPL_)RSA) += rsa/ obj-$(CONFIG_$(SPL_)SHA1) += sha1.o obj-$(CONFIG_$(SPL_)SHA256) += sha256.o +obj-$(CONFIG_SPL_SAVEENV) += qsort.o obj-$(CONFIG_$(SPL_)OF_LIBFDT) += libfdt/ ifneq ($(CONFIG_SPL_BUILD)$(CONFIG_SPL_OF_PLATDATA),yy) obj-$(CONFIG_$(SPL_)OF_CONTROL) += fdtdec_common.o diff --git a/lib/hashtable.c b/lib/hashtable.c index 4e52b36..07c437c 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -477,11 +477,11 @@ int hdelete_r(const char *key, struct hsearch_data *htab, int flag) return 1; } +#if !(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SAVEENV)) /* * hexport() */ -#ifndef CONFIG_SPL_BUILD /* * Export the data stored in the hash table in linearized form. * -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] spl: saveenv: adding saveenv support in SPL
By default saveenv option is not supported for SPL. This patch enable the support for save environment variable for SPL build. Enable save environment support in SPL after setenv. By default the saveenv option is not provided in SPL, but some boards need this support in 'Falcon' boot, where SPL need to boot from different images based on environment variable set by OS. For example OS may set "reboot_image" environment variable to "recovery" inorder to boot recovery image by SPL. The SPL read "reboot_image" and act accordingly and change the reboot_image to default mode using setenv and save the environemnt. Signed-off-by: Ravi BabuReviewed-by: Simon Glass --- common/spl/Kconfig| 13 + drivers/mmc/Makefile | 1 + drivers/mmc/mmc_private.h | 3 +-- lib/Makefile | 1 + lib/hashtable.c | 2 +- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 2a8ddbc..605cf66 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -163,6 +163,19 @@ config SPL_ENV_SUPPORT starting U-Boot first. Enabling this option will make getenv() and setenv() available in SPL. +config SPL_SAVEENV + bool "Support save environment" + depends on SPL && SPL_ENV_SUPPORT + help + Enable save environment support in SPL after setenv. By default + the saveenv option is not provided in SPL, but some boards need + this support in 'Falcon' boot, where SPL need to boot from + different images based on environment variable set by OS. For + example OS may set "reboot_image" environment variable to + "recovery" inorder to boot recovery image by SPL. The SPL read + "reboot_image" and act accordingly and change the reboot_image + to default mode using setenv and save the environemnt. + config SPL_ETH_SUPPORT bool "Support Ethernet" depends on SPL_ENV_SUPPORT diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile index 18351fb..d850758 100644 --- a/drivers/mmc/Makefile +++ b/drivers/mmc/Makefile @@ -60,6 +60,7 @@ obj-$(CONFIG_ROCKCHIP_SDHCI) += rockchip_sdhci.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_MMC_BOOT) += fsl_esdhc_spl.o +obj-$(CONFIG_SPL_SAVEENV) += mmc_write.o else obj-$(CONFIG_GENERIC_MMC) += mmc_write.o endif diff --git a/drivers/mmc/mmc_private.h b/drivers/mmc/mmc_private.h index 49ec022..e0c9849 100644 --- a/drivers/mmc/mmc_private.h +++ b/drivers/mmc/mmc_private.h @@ -28,8 +28,7 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, void *dst); #endif -#ifndef CONFIG_SPL_BUILD - +#if !(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SAVEENV)) unsigned long mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt); diff --git a/lib/Makefile b/lib/Makefile index c81bfeb..e3383f4 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -47,6 +47,7 @@ obj-$(CONFIG_$(SPL_)RSA) += rsa/ obj-$(CONFIG_$(SPL_)SHA1) += sha1.o obj-$(CONFIG_$(SPL_)SHA256) += sha256.o +obj-$(CONFIG_SPL_SAVEENV) += qsort.o obj-$(CONFIG_$(SPL_)OF_LIBFDT) += libfdt/ ifneq ($(CONFIG_SPL_BUILD)$(CONFIG_SPL_OF_PLATDATA),yy) obj-$(CONFIG_$(SPL_)OF_CONTROL) += fdtdec_common.o diff --git a/lib/hashtable.c b/lib/hashtable.c index 4e52b36..07c437c 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -477,11 +477,11 @@ int hdelete_r(const char *key, struct hsearch_data *htab, int flag) return 1; } +#if !(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SAVEENV)) /* * hexport() */ -#ifndef CONFIG_SPL_BUILD /* * Export the data stored in the hash table in linearized form. * -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 15/23] gpio: eg20t: Add driver for Intel EG20T GPIO controllers
On Tue, Sep 27, 2016 at 2:22 PM, Bin Mengwrote: > Hi Paul, > > On Tue, Sep 27, 2016 at 2:29 AM, Paul Burton wrote: >> Add a driver for the GPIO controller found in the Intel EG20T Platform >> Controller Hub. This is used on the MIPS Boston development board to >> provide GPIOs including ethernet PHY reset. >> >> Signed-off-by: Paul Burton >> >> --- >> >> drivers/gpio/Kconfig | 8 +++ >> drivers/gpio/Makefile | 1 + >> drivers/gpio/eg20t-gpio.c | 133 >> ++ > > Please use eg20t_gpio.c as the filename, like others do. > >> 3 files changed, 142 insertions(+) >> create mode 100644 drivers/gpio/eg20t-gpio.c >> >> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig >> index 8d9ab52..4a6a22f 100644 >> --- a/drivers/gpio/Kconfig >> +++ b/drivers/gpio/Kconfig >> @@ -221,4 +221,12 @@ config MPC85XX_GPIO >> >> The driver has been tested on MPC85XX, but it is likely that other >> PowerQUICC III devices will work as well. >> + >> +config EG20T_GPIO >> + bool "Intel EG20T GPIO driver" >> + depends on DM_GPIO && DM_PCI >> + help >> + Enable this to support the GPIO controller found in the Intel EG20T >> + Platform Controller Hub. >> + >> endmenu >> diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile >> index 8939226..a94aeb1 100644 >> --- a/drivers/gpio/Makefile >> +++ b/drivers/gpio/Makefile >> @@ -58,3 +58,4 @@ obj-$(CONFIG_MVEBU_GPIO) += mvebu_gpio.o >> obj-$(CONFIG_MSM_GPIO) += msm_gpio.o >> obj-$(CONFIG_$(SPL_)PCF8575_GPIO) += pcf8575_gpio.o >> obj-$(CONFIG_PM8916_GPIO) += pm8916_gpio.o >> +obj-$(CONFIG_EG20T_GPIO) += eg20t-gpio.o >> diff --git a/drivers/gpio/eg20t-gpio.c b/drivers/gpio/eg20t-gpio.c >> new file mode 100644 >> index 000..05db771 >> --- /dev/null >> +++ b/drivers/gpio/eg20t-gpio.c >> @@ -0,0 +1,133 @@ >> +/* >> + * Copyright (C) 2016 Imagination Technologies >> + * >> + * SPDX-License-Identifier:GPL-2.0 >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +enum { >> + REG_IEN = 0x00, >> + REG_ISTATUS = 0x04, >> + REG_IDISP = 0x08, >> + REG_ICLR= 0x0c, >> + REG_IMASK = 0x10, >> + REG_IMASKCLR= 0x14, >> + REG_PO = 0x18, >> + REG_PI = 0x1c, >> + REG_PM = 0x20, >> +}; >> + > > Please use a struct. > >> +struct eg20t_gpio_priv { >> + void *base; >> +}; >> + >> +static int eg20t_gpio_get_value(struct udevice *dev, unsigned int offset) >> +{ >> + struct eg20t_gpio_priv *priv = dev_get_priv(dev); >> + uint32_t pm, pval; >> + >> + pm = readl(priv->base + REG_PM); >> + if ((pm >> offset) & 0x1) >> + pval = readl(priv->base + REG_PO); >> + else >> + pval = readl(priv->base + REG_PI); >> + >> + return (pval >> offset) & 0x1; >> +} >> + >> +static int eg20t_gpio_set_value(struct udevice *dev, unsigned int offset, >> + int value) >> +{ >> + struct eg20t_gpio_priv *priv = dev_get_priv(dev); >> + uint32_t po; >> + >> + po = readl(priv->base + REG_PO); >> + if (value) >> + po |= 1 << offset; >> + else >> + po &= ~(1 << offset); >> + writel(po, priv->base + REG_PO); > > nits: need a blank line. > >> + return 0; >> +} >> + >> +static int eg20t_gpio_direction_input(struct udevice *dev, unsigned int >> offset) >> +{ >> + struct eg20t_gpio_priv *priv = dev_get_priv(dev); >> + uint32_t pm; >> + >> + pm = readl(priv->base + REG_PM); >> + pm &= ~(1 << offset); >> + writel(pm, priv->base + REG_PM); > > nits: need a blank line. > >> + return 0; >> +} >> + >> +static int eg20t_gpio_direction_output(struct udevice *dev, unsigned int >> offset, >> + int value) >> +{ >> + struct eg20t_gpio_priv *priv = dev_get_priv(dev); >> + uint32_t pm; >> + >> + pm = readl(priv->base + REG_PM); >> + pm |= 1 << offset; >> + writel(pm, priv->base + REG_PM); >> + >> + return eg20t_gpio_set_value(dev, offset, value); >> +} >> + >> +static int eg20t_gpio_get_function(struct udevice *dev, unsigned int offset) >> +{ >> + struct eg20t_gpio_priv *priv = dev_get_priv(dev); >> + uint32_t pm; >> + >> + pm = readl(priv->base + REG_PM); >> + >> + if ((pm >> offset) & 0x1) >> + return GPIOF_OUTPUT; >> + >> + return GPIOF_INPUT; >> +} >> + >> +static const struct dm_gpio_ops eg20t_gpio_ops = { >> + .direction_input= eg20t_gpio_direction_input, >> + .direction_output = eg20t_gpio_direction_output, >> + .get_value = eg20t_gpio_get_value, >> + .set_value = eg20t_gpio_set_value, >>
Re: [U-Boot] [PATCH 16/23] net: pch_gbe: Support PHY reset GPIOs
On Tue, Sep 27, 2016 at 2:29 AM, Paul Burtonwrote: > Add support to the pch_gbe driver for resetting the PHY using a GPIO > specified in the device tree. This matches the support already in Linux. > > Signed-off-by: Paul Burton > > --- > > drivers/net/pch_gbe.c | 29 +++-- > drivers/net/pch_gbe.h | 1 + > 2 files changed, 28 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng Tested on Crown Bay Tested-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot