Re: [U-Boot] [PATCH] embestmx6boards: Increase boot delay to 3s
Le Sun, 14 Dec 2014 22:56:21 +0200, Nikolay Dimitrov picmas...@mail.bg a écrit : On 12/14/2014 04:52 PM, Iain Paton wrote: This also leads to a slightly less unreasonable increase in bootdelay to 2s from config_distro_defaults.h Well, this is again subjective - we can always argue that 2s is both too long and too short for selected use cases, so I don't understand the qualification less unreasonable. In summary - I won't carry a war for this change, as it doesn't worth it. I just tried to contribute a tiny bit of improvement to the already excellent work of Eric, so we can have a silk-smooth out-of-the-box U-Boot user experience, and I'm doing this as an actual riotboard user. That's all. well if Iain's patch configure the bootdelay to 2 seconds by default this will be a perfect average between the actual state and your proposal so I suggest you test Iain's patch and if its OK for you send your ack as I have no time to test on Riot or Mars board before next year ;-) Thanks ! Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] embestmx6boards: Increase boot delay to 3s
Hi Nikolay, Le Fri, 12 Dec 2014 20:16:19 +0200, picmas...@mail.bg a écrit : From: Nikolay Dimitrov picmas...@mail.bg Signed-off-by: Nikolay Dimitrov picmas...@mail.bg --- include/configs/embestmx6boards.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/embestmx6boards.h b/include/configs/embestmx6boards.h index 185edbe..28099a8 100644 --- a/include/configs/embestmx6boards.h +++ b/include/configs/embestmx6boards.h @@ -120,7 +120,7 @@ #define CONFIG_CMD_SETEXPR #undef CONFIG_CMD_IMLS -#define CONFIG_BOOTDELAY 1 +#define CONFIG_BOOTDELAY 3 #define CONFIG_LOADADDR0x1200 #define CONFIG_SYS_TEXT_BASE 0x1780 This will increase the boot time by 2 seconds : why is that needed ? Best regards, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] embestmx6boards: Increase boot delay to 3s
Hi Nikolay, Le Sat, 13 Dec 2014 18:05:15 +0200, Nikolay Dimitrov picmas...@mail.bg a écrit : On 12/13/2014 04:16 PM, Eric Bénard wrote: Le Fri, 12 Dec 2014 20:16:19 +0200, picmas...@mail.bg a écrit : From: Nikolay Dimitrov picmas...@mail.bg Signed-off-by: Nikolay Dimitrov picmas...@mail.bg --- include/configs/embestmx6boards.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/embestmx6boards.h b/include/configs/embestmx6boards.h index 185edbe..28099a8 100644 --- a/include/configs/embestmx6boards.h +++ b/include/configs/embestmx6boards.h @@ -120,7 +120,7 @@ #define CONFIG_CMD_SETEXPR #undef CONFIG_CMD_IMLS -#define CONFIG_BOOTDELAY 1 +#define CONFIG_BOOTDELAY 3 #define CONFIG_LOADADDR0x1200 #define CONFIG_SYS_TEXT_BASE 0x1780 This will increase the boot time by 2 seconds : why is that needed ? Thanks for commenting. My intent is to give by default a reasonable time for the end-user to react and break the boot-sequence if needed (and avoid the nasty racing against the clock for this precious key-press). My motivation for this is that I see RIoTboard/MarsBoard mostly as boards that people can use for experimentation/prototyping, and not as a finished end-product, thus my thinking that the slightly increased boot-time won't be a critical issue for such applications. Still everyone can change the delay at will if they want to optimize the boot. Other hobby boards also have similarly handy boot-timings, like Wandboard (5s), Novena (5s), Udoo (3s). OK seems reasonable. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] USB Host not enumerating properly on AM335x-based board
Hi Maxime, Le Thu, 20 Nov 2014 17:49:17 +0100, Maxime Ripard maxime.rip...@free-electrons.com a écrit : Hi, I'm currently working on 2014.07, on a custom TI AM335x based board. Everything works great so far, except when we're trying to have USB host working. The board has the MUSB1 controller wired as USB Host only, with the following configuration: #define CONFIG_USB_MUSB_DSPS #define CONFIG_ARCH_MISC_INIT #define CONFIG_MUSB_PIO_ONLY #define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT #define CONFIG_MUSB_HOST #define CONFIG_MUSB_DSPS #define CONFIG_AM335X_USB1 #define CONFIG_AM335X_USB1_MODE MUSB_HOST #ifdef CONFIG_MUSB_HOST #define CONFIG_CMD_USB #define CONFIG_USB_STORAGE #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX #endif Whenever we try to scan the USB controller and that a device is attached, we get the following output: U-Boot# usb start (Re)start USB... USB0: scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found The device itself being a USB key, it's somewhat odd that it enumerates the device, but doesn't find the storage device... The same USB port with the same device works fine under Linux. The VBUS pin is still up after running the command, so it's not really a matter of power being shut down on the bus. I'm kind of running out of idea on what to test next. The differences between u-boot's musb-new and Linux' own musb driver seems thin and to make sense, so I don't think the driver itself is to blame. Anyone experienced such a thing? what is the log you get when you run usb start and the USB device is not plugged ? Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] NAND: Add Micron MT29F16G identifier
Hi, Le Wed, 30 Apr 2014 21:30:58 -0700 (PDT), smithknown jimzhan...@yahoo.com a écrit : I added same ids, the device was able to be detected, but the nand info, nand erase.chip did not work. Same command works for a Micron 512MBytes nand. I am using mxc_nand driver. What else do we need update? what change you made to the mxc_nand.c and board configuration .h file? isn't your flash an ONFI one ? This ID is wrong as if will return the same for (at least) MT29F16G and MT29F32G : you need to use ONFI to detect this kind of flashes. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] usbtty using i.MX6
Hi Otavio, Le Sat, 26 Apr 2014 19:47:27 -0300, Otavio Salvador ota...@ossystems.com.br a écrit : I'd like to know if someone has succeed in using usbtty with i.MX6. I am interested in using it for one board but been not succed, it seems: /home/otavio/hacking/u-boot/drivers/serial/usbtty.c:553: undefined reference to `udc_init' drivers/serial/built-in.o: In function `usbtty_init_instances': /home/otavio/hacking/u-boot/drivers/serial/usbtty.c:686: undefined reference to `udc_setup_ep' /home/otavio/hacking/u-boot/drivers/serial/usbtty.c:708: undefined reference to `urb_link_init' /home/otavio/hacking/u-boot/drivers/serial/usbtty.c:709: undefined reference to `urb_link_init' /home/otavio/hacking/u-boot/drivers/serial/usbtty.c:710: undefined reference to `urb_link_init ... Does someone got it working? you need a gadget driver for the i.MX6 USB port which doesn't seems to exist in u-boot. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] usbtty using i.MX6
Hi Eric, Le Sun, 27 Apr 2014 10:56:48 -0700, Eric Nelson eric.nel...@boundarydevices.com a écrit : We're using UDC on all of our i.MX6 board. Marek and Troy have had this working for a while now. I think the two key patches are these: https://github.com/boundarydevices/u-boot-imx6/commit/f3d7cff https://github.com/boundarydevices/u-boot-imx6/commit/f016f8c that's not mainline :-) We've been using it a lot for USB networking, where it provides a very nice download mechanism. See this post for details: http://boundarydevices.com/u-boot-2014-01/#usbrecover I think usbtty is a different thing though (USB serial adapter connected to a Host port). No, that's a serial port gadget on a USB device controler. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] usbtty using i.MX6
Hi again, Le Sun, 27 Apr 2014 20:56:56 +0200, Eric Bénard e...@eukrea.com a écrit : Le Sun, 27 Apr 2014 10:56:48 -0700, Eric Nelson eric.nel...@boundarydevices.com a écrit : We're using UDC on all of our i.MX6 board. Marek and Troy have had this working for a while now. I think the two key patches are these: https://github.com/boundarydevices/u-boot-imx6/commit/f3d7cff https://github.com/boundarydevices/u-boot-imx6/commit/f016f8c that's not mainline :-) Oops sorry, in fact that's also mainline. Interesting to learn it ;-) Quickly looking at the code, it seems that usbtty is not using the same API as the other gadgets in drivers/usb/gadget : it doesn't call usb_gadget_register_driver and instead call the udc functions directly. So indeed in the present state, this driver can't work on an i.MX6. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/8] imx-common: add board_video_skip
this function is shared by several boards and thus can be factorized Signed-off-by: Eric Bénard e...@eukrea.com Acked-by: Eric Nelson eric.nel...@boundarydevices.com Acked-by: Stefano Babic sba...@denx.de --- v2 : rename display_num to display_count as requested by Eric Nelson keep video.h as it will also contain common video functions such as detect_hdmi so it not tied only to video_skip. arch/arm/imx-common/Makefile| 1 + arch/arm/imx-common/video.c | 55 + arch/arm/include/asm/imx-common/video.h | 20 3 files changed, 76 insertions(+) create mode 100644 arch/arm/imx-common/video.c create mode 100644 arch/arm/include/asm/imx-common/video.h diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 16809fe..2a7fc42 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -19,6 +19,7 @@ obj-y += misc.o endif ifeq ($(SOC),$(filter $(SOC),mx6)) obj-$(CONFIG_CMD_SATA) += sata.o +obj-$(CONFIG_IMX_VIDEO_SKIP) += video.o endif obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o diff --git a/arch/arm/imx-common/video.c b/arch/arm/imx-common/video.c new file mode 100644 index 000..098239a --- /dev/null +++ b/arch/arm/imx-common/video.c @@ -0,0 +1,55 @@ +/* + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include common.h +#include asm/errno.h +#include asm/imx-common/video.h + +extern struct display_info_t const displays[]; +extern size_t display_count; + +int board_video_skip(void) +{ + int i; + int ret; + char const *panel = getenv(panel); + if (!panel) { + for (i = 0; i display_count; i++) { + struct display_info_t const *dev = displays+i; + if (dev-detect dev-detect(dev)) { + panel = dev-mode.name; + printf(auto-detected panel %s\n, panel); + break; + } + } + if (!panel) { + panel = displays[0].mode.name; + printf(No panel detected: default to %s\n, panel); + i = 0; + } + } else { + for (i = 0; i display_count; i++) { + if (!strcmp(panel, displays[i].mode.name)) + break; + } + } + if (i display_count) { + ret = ipuv3_fb_init(displays[i].mode, 0, + displays[i].pixfmt); + if (!ret) { + displays[i].enable(displays+i); + printf(Display: %s (%ux%u)\n, + displays[i].mode.name, + displays[i].mode.xres, + displays[i].mode.yres); + } else + printf(LCD %s cannot be configured: %d\n, + displays[i].mode.name, ret); + } else { + printf(unsupported panel %s\n, panel); + return -EINVAL; + } + + return 0; +} diff --git a/arch/arm/include/asm/imx-common/video.h b/arch/arm/include/asm/imx-common/video.h new file mode 100644 index 000..e0c4ef4 --- /dev/null +++ b/arch/arm/include/asm/imx-common/video.h @@ -0,0 +1,20 @@ +/* + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef __IMX_VIDEO_H_ +#define __IMX_VIDEO_H_ + +#include linux/fb.h +#include ipu_pixfmt.h + +struct display_info_t { + int bus; + int addr; + int pixfmt; + int (*detect)(struct display_info_t const *dev); + void(*enable)(struct display_info_t const *dev); + struct fb_videomode mode; +}; + +#endif -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/8] nitrogen6x: use common board_video_skip
Signed-off-by: Eric Bénard e...@eukrea.com Acked-by: Eric Nelson eric.nel...@boundarydevices.com --- v2 : rename display_num to display_count as requested by Eric Nelson board/boundary/nitrogen6x/nitrogen6x.c | 61 ++ include/configs/nitrogen6x.h | 1 + 2 files changed, 4 insertions(+), 58 deletions(-) diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index d9c05b0..cb5f787 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -19,13 +19,12 @@ #include asm/imx-common/mxc_i2c.h #include asm/imx-common/sata.h #include asm/imx-common/boot_mode.h +#include asm/imx-common/video.h #include mmc.h #include fsl_esdhc.h #include micrel.h #include miiphy.h #include netdev.h -#include linux/fb.h -#include ipu_pixfmt.h #include asm/arch/crm_regs.h #include asm/arch/mxc_hdmi.h #include i2c.h @@ -446,16 +445,6 @@ static iomux_v3_cfg_t const rgb_pads[] = { MX6_PAD_DISP0_DAT23__IPU1_DISP0_DATA23, }; -struct display_info_t { - int bus; - int addr; - int pixfmt; - int (*detect)(struct display_info_t const *dev); - void(*enable)(struct display_info_t const *dev); - struct fb_videomode mode; -}; - - static int detect_hdmi(struct display_info_t const *dev) { struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; @@ -492,7 +481,7 @@ static void enable_rgb(struct display_info_t const *dev) gpio_direction_output(RGB_BACKLIGHT_GP, 1); } -static struct display_info_t const displays[] = {{ +struct display_info_t const displays[] = {{ .bus= -1, .addr = 0, .pixfmt = IPU_PIX_FMT_RGB24, @@ -573,51 +562,7 @@ static struct display_info_t const displays[] = {{ .sync = 0, .vmode = FB_VMODE_NONINTERLACED } } }; - -int board_video_skip(void) -{ - int i; - int ret; - char const *panel = getenv(panel); - if (!panel) { - for (i = 0; i ARRAY_SIZE(displays); i++) { - struct display_info_t const *dev = displays+i; - if (dev-detect(dev)) { - panel = dev-mode.name; - printf(auto-detected panel %s\n, panel); - break; - } - } - if (!panel) { - panel = displays[0].mode.name; - printf(No panel detected: default to %s\n, panel); - i = 0; - } - } else { - for (i = 0; i ARRAY_SIZE(displays); i++) { - if (!strcmp(panel, displays[i].mode.name)) - break; - } - } - if (i ARRAY_SIZE(displays)) { - ret = ipuv3_fb_init(displays[i].mode, 0, - displays[i].pixfmt); - if (!ret) { - displays[i].enable(displays+i); - printf(Display: %s (%ux%u)\n, - displays[i].mode.name, - displays[i].mode.xres, - displays[i].mode.yres); - } else { - printf(LCD %s cannot be configured: %d\n, - displays[i].mode.name, ret); - } - } else { - printf(unsupported panel %s\n, panel); - ret = -EINVAL; - } - return (0 != ret); -} +size_t display_count = ARRAY_SIZE(displays); static void setup_display(void) { diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index f2db8c5..e5f1e97 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -141,6 +141,7 @@ #define CONFIG_CMD_HDMIDETECT #define CONFIG_CONSOLE_MUX #define CONFIG_IMX_HDMI +#define CONFIG_IMX_VIDEO_SKIP /* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/8] mx6sabresd: use common board_video_skip
Signed-off-by: Eric Bénard e...@eukrea.com --- v2 : rename display_num to display_count as requested by Eric Nelson board/freescale/mx6sabresd/mx6sabresd.c | 59 ++--- include/configs/mx6sabresd.h| 1 + 2 files changed, 4 insertions(+), 56 deletions(-) diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index 12d8c56..297d20d 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -14,14 +14,13 @@ #include asm/gpio.h #include asm/imx-common/iomux-v3.h #include asm/imx-common/boot_mode.h +#include asm/imx-common/video.h #include mmc.h #include fsl_esdhc.h #include miiphy.h #include netdev.h #include asm/arch/mxc_hdmi.h #include asm/arch/crm_regs.h -#include linux/fb.h -#include ipu_pixfmt.h #include asm/io.h #include asm/arch/sys_proto.h DECLARE_GLOBAL_DATA_PTR; @@ -255,14 +254,6 @@ int board_phy_config(struct phy_device *phydev) } #if defined(CONFIG_VIDEO_IPUV3) -struct display_info_t { - int bus; - int addr; - int pixfmt; - int (*detect)(struct display_info_t const *dev); - void(*enable)(struct display_info_t const *dev); - struct fb_videomode mode; -}; static int detect_hdmi(struct display_info_t const *dev) { @@ -299,7 +290,7 @@ static void enable_lvds(struct display_info_t const *dev) writel(reg, iomux-gpr[2]); } -static struct display_info_t const displays[] = {{ +struct display_info_t const displays[] = {{ .bus= -1, .addr = 0, .pixfmt = IPU_PIX_FMT_RGB666, @@ -340,51 +331,7 @@ static struct display_info_t const displays[] = {{ .sync = FB_SYNC_EXT, .vmode = FB_VMODE_NONINTERLACED } } }; - -int board_video_skip(void) -{ - int i; - int ret; - char const *panel = getenv(panel); - if (!panel) { - for (i = 0; i ARRAY_SIZE(displays); i++) { - struct display_info_t const *dev = displays+i; - if (dev-detect dev-detect(dev)) { - panel = dev-mode.name; - printf(auto-detected panel %s\n, panel); - break; - } - } - if (!panel) { - panel = displays[0].mode.name; - printf(No panel detected: default to %s\n, panel); - i = 0; - } - } else { - for (i = 0; i ARRAY_SIZE(displays); i++) { - if (!strcmp(panel, displays[i].mode.name)) - break; - } - } - if (i ARRAY_SIZE(displays)) { - ret = ipuv3_fb_init(displays[i].mode, 0, - displays[i].pixfmt); - if (!ret) { - displays[i].enable(displays+i); - printf(Display: %s (%ux%u)\n, - displays[i].mode.name, - displays[i].mode.xres, - displays[i].mode.yres); - } else - printf(LCD %s cannot be configured: %d\n, - displays[i].mode.name, ret); - } else { - printf(unsupported panel %s\n, panel); - return -EINVAL; - } - - return 0; -} +size_t display_count = ARRAY_SIZE(displays); static void setup_display(void) { diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index 4919f53..72ae024 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -47,5 +47,6 @@ #define CONFIG_VIDEO_BMP_LOGO #define CONFIG_IPUV3_CLK 26000 #define CONFIG_IMX_HDMI +#define CONFIG_IMX_VIDEO_SKIP #endif /* __MX6QSABRESD_CONFIG_H */ -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 4/8] RiOTboard and MarSBoard: add new boards support
RiOTboard is produced by Embest/Element 14 and is based on i.MX6 Solo The following features are tested : - UART2 (console) - eMMC - SDCard - uSDCard - Ethernet - USB Host (through 4 ports hub) - HDMI output - I2C 1/2/3 - LVDS TFT with LCD8000-97C from Embest/Element 14 Boot on eMMC and through USB loader are tested. For more informations on this board : http://www.riotboard.org/ MarSBoard is produced by Embest/Element 14 and is based on i.MX6 Dual The following features are tested : - UART2 (console) - eMMC - uSDCard - Ethernet - USB Host (through 2 ports hub) - HDMI output - I2C 1/2 - SPI NOR Flash - LVDS TFT with LCD8000-97C from Embest/Element 14 Boot on SPI NOR and through USB loader are tested. For more informations on this board : http://www.embest-tech.com/shop/star/marsboard.html Both boards are supported by the same code base as they are based on a common trunk of schematics. Signed-off-by: Eric Bénard e...@eukrea.com Acked-by: Stefano Babic sba...@denx.de --- v2 : rename display_num to display_count as requested by Eric Nelson remove last BOARD_IS_RIOT in embestmx6boards.h which was preventing CONFIG_SUPPORT_EMMC_BOOT to be defined. board/embest/mx6boards/Makefile| 9 + board/embest/mx6boards/mx6boards.c | 607 + boards.cfg | 2 + include/configs/embestmx6boards.h | 336 4 files changed, 954 insertions(+) create mode 100644 board/embest/mx6boards/Makefile create mode 100644 board/embest/mx6boards/mx6boards.c create mode 100644 include/configs/embestmx6boards.h diff --git a/board/embest/mx6boards/Makefile b/board/embest/mx6boards/Makefile new file mode 100644 index 000..467fb50 --- /dev/null +++ b/board/embest/mx6boards/Makefile @@ -0,0 +1,9 @@ +# +# Copyright (C) 2007, Guennadi Liakhovetski l...@denx.de +# +# (C) Copyright 2011 Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := mx6boards.o diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c new file mode 100644 index 000..6d86961 --- /dev/null +++ b/board/embest/mx6boards/mx6boards.c @@ -0,0 +1,607 @@ +/* + * Copyright (C) 2014 Eukréa Electromatique + * Author: Eric Bénard e...@eukrea.com + * Fabio Estevam fabio.este...@freescale.com + * Jon Nettleton jon.nettle...@gmail.com + * + * based on sabresd.c which is : + * Copyright (C) 2012 Freescale Semiconductor, Inc. + * and on hummingboard.c which is : + * Copyright (C) 2013 SolidRun ltd. + * Copyright (C) 2013 Jon Nettleton jon.nettle...@gmail.com. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include asm/arch/clock.h +#include asm/arch/sys_proto.h +#include asm/arch/imx-regs.h +#include asm/arch/iomux.h +#include asm/arch/mx6-pins.h +#include asm/errno.h +#include asm/gpio.h +#include asm/imx-common/iomux-v3.h +#include asm/imx-common/boot_mode.h +#include asm/imx-common/mxc_i2c.h +#include asm/imx-common/video.h +#include i2c.h +#include mmc.h +#include fsl_esdhc.h +#include miiphy.h +#include netdev.h +#include asm/arch/mxc_hdmi.h +#include asm/arch/crm_regs.h +#include linux/fb.h +#include ipu_pixfmt.h +#include asm/io.h +#include asm/arch/sys_proto.h +DECLARE_GLOBAL_DATA_PTR; + +#define UART_PAD_CTRL (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_PUS_47K_UP | \ + PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \ + PAD_CTL_SRE_FAST | PAD_CTL_HYS) + +#define USDHC_PAD_CLK_CTRL (PAD_CTL_SPEED_LOW |\ + PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | \ + PAD_CTL_HYS) + +#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_PD (PAD_CTL_PUS_100K_DOWN | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_CLK ((PAD_CTL_PUS_100K_UP ~PAD_CTL_PKE) | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +#define I2C_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ + PAD_CTL_ODE | PAD_CTL_SRE_FAST) + +#define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +static int board_type = -1; +#define BOARD_IS_MARSBOARD 0 +#define BOARD_IS_RIOTBOARD 1 + +int dram_init(void) +{ + gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); + + return 0; +} + +static iomux_v3_cfg_t const uart2_pads[] = { + MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), +}; + +static void setup_iomux_uart(void) +{ + imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads
[U-Boot] [PATCH v2 6/8] nitrogen6x: use common detect_hdmi
Signed-off-by: Eric Bénard e...@eukrea.com --- v2: no change board/boundary/nitrogen6x/nitrogen6x.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index cb5f787..8475653 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -445,12 +445,6 @@ static iomux_v3_cfg_t const rgb_pads[] = { MX6_PAD_DISP0_DAT23__IPU1_DISP0_DATA23, }; -static int detect_hdmi(struct display_info_t const *dev) -{ - struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; - return readb(hdmi-phy_stat0) HDMI_DVI_STAT; -} - static void do_enable_hdmi(struct display_info_t const *dev) { imx_enable_hdmi_phy(); -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 5/8] imx-common/video: add detect_hdmi
this function is used by several board together with board_video_skip to detect if hdmi is plugged is order to select the display to use. So move it in imx-common to share it. Signed-off-by: Eric Bénard e...@eukrea.com --- v2: no change arch/arm/imx-common/video.c | 10 ++ arch/arm/include/asm/imx-common/video.h | 4 2 files changed, 14 insertions(+) diff --git a/arch/arm/imx-common/video.c b/arch/arm/imx-common/video.c index 098239a..0121cd7 100644 --- a/arch/arm/imx-common/video.c +++ b/arch/arm/imx-common/video.c @@ -53,3 +53,13 @@ int board_video_skip(void) return 0; } + +#ifdef CONFIG_IMX_HDMI +#include asm/arch/mxc_hdmi.h +#include asm/io.h +int detect_hdmi(struct display_info_t const *dev) +{ + struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; + return readb(hdmi-phy_stat0) HDMI_DVI_STAT; +} +#endif diff --git a/arch/arm/include/asm/imx-common/video.h b/arch/arm/include/asm/imx-common/video.h index e0c4ef4..2d94850 100644 --- a/arch/arm/include/asm/imx-common/video.h +++ b/arch/arm/include/asm/imx-common/video.h @@ -17,4 +17,8 @@ struct display_info_t { struct fb_videomode mode; }; +#ifdef CONFIG_IMX_HDMI +extern int detect_hdmi(struct display_info_t const *dev); +#endif + #endif -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 7/8] mx6sabresd: use common detect_hdmi
Signed-off-by: Eric Bénard e...@eukrea.com --- v2: no change board/freescale/mx6sabresd/mx6sabresd.c | 8 1 file changed, 8 deletions(-) diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index 297d20d..2a1a2e8 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -254,14 +254,6 @@ int board_phy_config(struct phy_device *phydev) } #if defined(CONFIG_VIDEO_IPUV3) - -static int detect_hdmi(struct display_info_t const *dev) -{ - struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; - return readb(hdmi-phy_stat0) HDMI_DVI_STAT; -} - - static void disable_lvds(struct display_info_t const *dev) { struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR; -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/8] RiOTboard and MarSBoard: add new boards support
Hi, Le Fri, 04 Apr 2014 15:51:10 +0100, selsin...@gmail.com a écrit : Is these any chance the RIoT and MarS patches will make it into v2014.04 ? I don't think so as we are late in the development cycle of v2014.04. I'd like to write up a step by step howto at element14.com for people wanting to get recent linux and u-boot onto these boards and it would be much cleaner if I can point at a stable version to download instead of patches on the list. Please use the v2 as it fix one missing config for RiOTboard. Thanks a lot for your work on these Eric! FWIW, I will submit patches conteinaing dts which are working on both boards for inclusion in mainline kernel this weekend (at least I hope). Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/8] imx-common: add board_video_skip
this function is shared by several board and thus can be factorized Signed-off-by: Eric Bénard e...@eukrea.com --- arch/arm/imx-common/Makefile| 1 + arch/arm/imx-common/video.c | 55 + arch/arm/include/asm/imx-common/video.h | 20 3 files changed, 76 insertions(+) create mode 100644 arch/arm/imx-common/video.c create mode 100644 arch/arm/include/asm/imx-common/video.h diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 16809fe..2a7fc42 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -19,6 +19,7 @@ obj-y += misc.o endif ifeq ($(SOC),$(filter $(SOC),mx6)) obj-$(CONFIG_CMD_SATA) += sata.o +obj-$(CONFIG_IMX_VIDEO_SKIP) += video.o endif obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o diff --git a/arch/arm/imx-common/video.c b/arch/arm/imx-common/video.c new file mode 100644 index 000..8db5a84 --- /dev/null +++ b/arch/arm/imx-common/video.c @@ -0,0 +1,55 @@ +/* + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include common.h +#include asm/errno.h +#include asm/imx-common/video.h + +extern struct display_info_t const displays[]; +extern size_t display_number; + +int board_video_skip(void) +{ + int i; + int ret; + char const *panel = getenv(panel); + if (!panel) { + for (i = 0; i display_number; i++) { + struct display_info_t const *dev = displays+i; + if (dev-detect dev-detect(dev)) { + panel = dev-mode.name; + printf(auto-detected panel %s\n, panel); + break; + } + } + if (!panel) { + panel = displays[0].mode.name; + printf(No panel detected: default to %s\n, panel); + i = 0; + } + } else { + for (i = 0; i display_number; i++) { + if (!strcmp(panel, displays[i].mode.name)) + break; + } + } + if (i display_number) { + ret = ipuv3_fb_init(displays[i].mode, 0, + displays[i].pixfmt); + if (!ret) { + displays[i].enable(displays+i); + printf(Display: %s (%ux%u)\n, + displays[i].mode.name, + displays[i].mode.xres, + displays[i].mode.yres); + } else + printf(LCD %s cannot be configured: %d\n, + displays[i].mode.name, ret); + } else { + printf(unsupported panel %s\n, panel); + return -EINVAL; + } + + return 0; +} diff --git a/arch/arm/include/asm/imx-common/video.h b/arch/arm/include/asm/imx-common/video.h new file mode 100644 index 000..e0c4ef4 --- /dev/null +++ b/arch/arm/include/asm/imx-common/video.h @@ -0,0 +1,20 @@ +/* + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef __IMX_VIDEO_H_ +#define __IMX_VIDEO_H_ + +#include linux/fb.h +#include ipu_pixfmt.h + +struct display_info_t { + int bus; + int addr; + int pixfmt; + int (*detect)(struct display_info_t const *dev); + void(*enable)(struct display_info_t const *dev); + struct fb_videomode mode; +}; + +#endif -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/8] imx-common: add board_video_skip
this function is shared by several board and thus can be factorized Signed-off-by: Eric Bénard e...@eukrea.com --- arch/arm/imx-common/Makefile| 1 + arch/arm/imx-common/video.c | 55 + arch/arm/include/asm/imx-common/video.h | 20 3 files changed, 76 insertions(+) create mode 100644 arch/arm/imx-common/video.c create mode 100644 arch/arm/include/asm/imx-common/video.h diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 16809fe..2a7fc42 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -19,6 +19,7 @@ obj-y += misc.o endif ifeq ($(SOC),$(filter $(SOC),mx6)) obj-$(CONFIG_CMD_SATA) += sata.o +obj-$(CONFIG_IMX_VIDEO_SKIP) += video.o endif obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o diff --git a/arch/arm/imx-common/video.c b/arch/arm/imx-common/video.c new file mode 100644 index 000..8db5a84 --- /dev/null +++ b/arch/arm/imx-common/video.c @@ -0,0 +1,55 @@ +/* + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include common.h +#include asm/errno.h +#include asm/imx-common/video.h + +extern struct display_info_t const displays[]; +extern size_t display_number; + +int board_video_skip(void) +{ + int i; + int ret; + char const *panel = getenv(panel); + if (!panel) { + for (i = 0; i display_number; i++) { + struct display_info_t const *dev = displays+i; + if (dev-detect dev-detect(dev)) { + panel = dev-mode.name; + printf(auto-detected panel %s\n, panel); + break; + } + } + if (!panel) { + panel = displays[0].mode.name; + printf(No panel detected: default to %s\n, panel); + i = 0; + } + } else { + for (i = 0; i display_number; i++) { + if (!strcmp(panel, displays[i].mode.name)) + break; + } + } + if (i display_number) { + ret = ipuv3_fb_init(displays[i].mode, 0, + displays[i].pixfmt); + if (!ret) { + displays[i].enable(displays+i); + printf(Display: %s (%ux%u)\n, + displays[i].mode.name, + displays[i].mode.xres, + displays[i].mode.yres); + } else + printf(LCD %s cannot be configured: %d\n, + displays[i].mode.name, ret); + } else { + printf(unsupported panel %s\n, panel); + return -EINVAL; + } + + return 0; +} diff --git a/arch/arm/include/asm/imx-common/video.h b/arch/arm/include/asm/imx-common/video.h new file mode 100644 index 000..e0c4ef4 --- /dev/null +++ b/arch/arm/include/asm/imx-common/video.h @@ -0,0 +1,20 @@ +/* + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef __IMX_VIDEO_H_ +#define __IMX_VIDEO_H_ + +#include linux/fb.h +#include ipu_pixfmt.h + +struct display_info_t { + int bus; + int addr; + int pixfmt; + int (*detect)(struct display_info_t const *dev); + void(*enable)(struct display_info_t const *dev); + struct fb_videomode mode; +}; + +#endif -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/8] mx6sabresd: use common board_video_skip
Signed-off-by: Eric Bénard e...@eukrea.com Cc: Fabio Estevam fabio.este...@freescale.com --- board/freescale/mx6sabresd/mx6sabresd.c | 59 ++--- include/configs/mx6sabresd.h| 1 + 2 files changed, 4 insertions(+), 56 deletions(-) diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index 12d8c56..d54d5db 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -14,14 +14,13 @@ #include asm/gpio.h #include asm/imx-common/iomux-v3.h #include asm/imx-common/boot_mode.h +#include asm/imx-common/video.h #include mmc.h #include fsl_esdhc.h #include miiphy.h #include netdev.h #include asm/arch/mxc_hdmi.h #include asm/arch/crm_regs.h -#include linux/fb.h -#include ipu_pixfmt.h #include asm/io.h #include asm/arch/sys_proto.h DECLARE_GLOBAL_DATA_PTR; @@ -255,14 +254,6 @@ int board_phy_config(struct phy_device *phydev) } #if defined(CONFIG_VIDEO_IPUV3) -struct display_info_t { - int bus; - int addr; - int pixfmt; - int (*detect)(struct display_info_t const *dev); - void(*enable)(struct display_info_t const *dev); - struct fb_videomode mode; -}; static int detect_hdmi(struct display_info_t const *dev) { @@ -299,7 +290,7 @@ static void enable_lvds(struct display_info_t const *dev) writel(reg, iomux-gpr[2]); } -static struct display_info_t const displays[] = {{ +struct display_info_t const displays[] = {{ .bus= -1, .addr = 0, .pixfmt = IPU_PIX_FMT_RGB666, @@ -340,51 +331,7 @@ static struct display_info_t const displays[] = {{ .sync = FB_SYNC_EXT, .vmode = FB_VMODE_NONINTERLACED } } }; - -int board_video_skip(void) -{ - int i; - int ret; - char const *panel = getenv(panel); - if (!panel) { - for (i = 0; i ARRAY_SIZE(displays); i++) { - struct display_info_t const *dev = displays+i; - if (dev-detect dev-detect(dev)) { - panel = dev-mode.name; - printf(auto-detected panel %s\n, panel); - break; - } - } - if (!panel) { - panel = displays[0].mode.name; - printf(No panel detected: default to %s\n, panel); - i = 0; - } - } else { - for (i = 0; i ARRAY_SIZE(displays); i++) { - if (!strcmp(panel, displays[i].mode.name)) - break; - } - } - if (i ARRAY_SIZE(displays)) { - ret = ipuv3_fb_init(displays[i].mode, 0, - displays[i].pixfmt); - if (!ret) { - displays[i].enable(displays+i); - printf(Display: %s (%ux%u)\n, - displays[i].mode.name, - displays[i].mode.xres, - displays[i].mode.yres); - } else - printf(LCD %s cannot be configured: %d\n, - displays[i].mode.name, ret); - } else { - printf(unsupported panel %s\n, panel); - return -EINVAL; - } - - return 0; -} +size_t display_number = ARRAY_SIZE(displays); static void setup_display(void) { diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index 4919f53..72ae024 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -47,5 +47,6 @@ #define CONFIG_VIDEO_BMP_LOGO #define CONFIG_IPUV3_CLK 26000 #define CONFIG_IMX_HDMI +#define CONFIG_IMX_VIDEO_SKIP #endif /* __MX6QSABRESD_CONFIG_H */ -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/8] nitrogen6x: use common board_video_skip
Signed-off-by: Eric Bénard e...@eukrea.com Cc: Eric Nelson eric.nel...@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 61 ++ include/configs/nitrogen6x.h | 1 + 2 files changed, 4 insertions(+), 58 deletions(-) diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index d9c05b0..1d96db1 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -19,13 +19,12 @@ #include asm/imx-common/mxc_i2c.h #include asm/imx-common/sata.h #include asm/imx-common/boot_mode.h +#include asm/imx-common/video.h #include mmc.h #include fsl_esdhc.h #include micrel.h #include miiphy.h #include netdev.h -#include linux/fb.h -#include ipu_pixfmt.h #include asm/arch/crm_regs.h #include asm/arch/mxc_hdmi.h #include i2c.h @@ -446,16 +445,6 @@ static iomux_v3_cfg_t const rgb_pads[] = { MX6_PAD_DISP0_DAT23__IPU1_DISP0_DATA23, }; -struct display_info_t { - int bus; - int addr; - int pixfmt; - int (*detect)(struct display_info_t const *dev); - void(*enable)(struct display_info_t const *dev); - struct fb_videomode mode; -}; - - static int detect_hdmi(struct display_info_t const *dev) { struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; @@ -492,7 +481,7 @@ static void enable_rgb(struct display_info_t const *dev) gpio_direction_output(RGB_BACKLIGHT_GP, 1); } -static struct display_info_t const displays[] = {{ +struct display_info_t const displays[] = {{ .bus= -1, .addr = 0, .pixfmt = IPU_PIX_FMT_RGB24, @@ -573,51 +562,7 @@ static struct display_info_t const displays[] = {{ .sync = 0, .vmode = FB_VMODE_NONINTERLACED } } }; - -int board_video_skip(void) -{ - int i; - int ret; - char const *panel = getenv(panel); - if (!panel) { - for (i = 0; i ARRAY_SIZE(displays); i++) { - struct display_info_t const *dev = displays+i; - if (dev-detect(dev)) { - panel = dev-mode.name; - printf(auto-detected panel %s\n, panel); - break; - } - } - if (!panel) { - panel = displays[0].mode.name; - printf(No panel detected: default to %s\n, panel); - i = 0; - } - } else { - for (i = 0; i ARRAY_SIZE(displays); i++) { - if (!strcmp(panel, displays[i].mode.name)) - break; - } - } - if (i ARRAY_SIZE(displays)) { - ret = ipuv3_fb_init(displays[i].mode, 0, - displays[i].pixfmt); - if (!ret) { - displays[i].enable(displays+i); - printf(Display: %s (%ux%u)\n, - displays[i].mode.name, - displays[i].mode.xres, - displays[i].mode.yres); - } else { - printf(LCD %s cannot be configured: %d\n, - displays[i].mode.name, ret); - } - } else { - printf(unsupported panel %s\n, panel); - ret = -EINVAL; - } - return (0 != ret); -} +size_t display_number = ARRAY_SIZE(displays); static void setup_display(void) { diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index f2db8c5..e5f1e97 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -141,6 +141,7 @@ #define CONFIG_CMD_HDMIDETECT #define CONFIG_CONSOLE_MUX #define CONFIG_IMX_HDMI +#define CONFIG_IMX_VIDEO_SKIP /* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/8] imx-common/video: add detect_hdmi
this function is used by several board together with board_video_skip to detect if hdmi is plugged is order to select the display to use. So move it in imx-common to share it. Signed-off-by: Eric Bénard e...@eukrea.com --- arch/arm/imx-common/video.c | 10 ++ arch/arm/include/asm/imx-common/video.h | 4 2 files changed, 14 insertions(+) diff --git a/arch/arm/imx-common/video.c b/arch/arm/imx-common/video.c index 8db5a84..a65da5e 100644 --- a/arch/arm/imx-common/video.c +++ b/arch/arm/imx-common/video.c @@ -53,3 +53,13 @@ int board_video_skip(void) return 0; } + +#ifdef CONFIG_IMX_HDMI +#include asm/arch/mxc_hdmi.h +#include asm/io.h +int detect_hdmi(struct display_info_t const *dev) +{ + struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; + return readb(hdmi-phy_stat0) HDMI_DVI_STAT; +} +#endif diff --git a/arch/arm/include/asm/imx-common/video.h b/arch/arm/include/asm/imx-common/video.h index e0c4ef4..2d94850 100644 --- a/arch/arm/include/asm/imx-common/video.h +++ b/arch/arm/include/asm/imx-common/video.h @@ -17,4 +17,8 @@ struct display_info_t { struct fb_videomode mode; }; +#ifdef CONFIG_IMX_HDMI +extern int detect_hdmi(struct display_info_t const *dev); +#endif + #endif -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/8] RiOTboard and MarSBoard: add new boards support
RiOTboard is produced by Embest/Element 14 and is based on i.MX6 Solo The following features are tested : - UART2 (console) - eMMC - SDCard - uSDCard - Ethernet - USB Host (through 4 ports hub) - HDMI output - I2C 1/2/3 - LVDS TFT with LCD8000-97C from Embest/Element 14 Boot on eMMC and through USB loader are tested. For more informations on this board : http://www.riotboard.org/ MarSBoard is produced by Embest/Element 14 and is based on i.MX6 Dual The following features are tested : - UART2 (console) - eMMC - uSDCard - Ethernet - USB Host (through 2 ports hub) - HDMI output - I2C 1/2 - SPI NOR Flash - LVDS TFT with LCD8000-97C from Embest/Element 14 Boot on SPI NOR and through USB loader are tested. For more informations on this board : http://www.embest-tech.com/shop/star/marsboard.html Both boards are supported by the same code base as they are based on a common trunk of schematics. Signed-off-by: Eric Bénard e...@eukrea.com --- board/embest/mx6boards/Makefile| 9 + board/embest/mx6boards/mx6boards.c | 607 + boards.cfg | 2 + include/configs/embestmx6boards.h | 339 + 4 files changed, 957 insertions(+) create mode 100644 board/embest/mx6boards/Makefile create mode 100644 board/embest/mx6boards/mx6boards.c create mode 100644 include/configs/embestmx6boards.h diff --git a/board/embest/mx6boards/Makefile b/board/embest/mx6boards/Makefile new file mode 100644 index 000..467fb50 --- /dev/null +++ b/board/embest/mx6boards/Makefile @@ -0,0 +1,9 @@ +# +# Copyright (C) 2007, Guennadi Liakhovetski l...@denx.de +# +# (C) Copyright 2011 Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := mx6boards.o diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c new file mode 100644 index 000..f65c4fa --- /dev/null +++ b/board/embest/mx6boards/mx6boards.c @@ -0,0 +1,607 @@ +/* + * Copyright (C) 2014 Eukréa Electromatique + * Author: Eric Bénard e...@eukrea.com + * Fabio Estevam fabio.este...@freescale.com + * Jon Nettleton jon.nettle...@gmail.com + * + * based on sabresd.c which is : + * Copyright (C) 2012 Freescale Semiconductor, Inc. + * and on hummingboard.c which is : + * Copyright (C) 2013 SolidRun ltd. + * Copyright (C) 2013 Jon Nettleton jon.nettle...@gmail.com. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include asm/arch/clock.h +#include asm/arch/sys_proto.h +#include asm/arch/imx-regs.h +#include asm/arch/iomux.h +#include asm/arch/mx6-pins.h +#include asm/errno.h +#include asm/gpio.h +#include asm/imx-common/iomux-v3.h +#include asm/imx-common/boot_mode.h +#include asm/imx-common/mxc_i2c.h +#include asm/imx-common/video.h +#include i2c.h +#include mmc.h +#include fsl_esdhc.h +#include miiphy.h +#include netdev.h +#include asm/arch/mxc_hdmi.h +#include asm/arch/crm_regs.h +#include linux/fb.h +#include ipu_pixfmt.h +#include asm/io.h +#include asm/arch/sys_proto.h +DECLARE_GLOBAL_DATA_PTR; + +#define UART_PAD_CTRL (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_PUS_47K_UP | \ + PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \ + PAD_CTL_SRE_FAST | PAD_CTL_HYS) + +#define USDHC_PAD_CLK_CTRL (PAD_CTL_SPEED_LOW |\ + PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | \ + PAD_CTL_HYS) + +#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_PD (PAD_CTL_PUS_100K_DOWN | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_CLK ((PAD_CTL_PUS_100K_UP ~PAD_CTL_PKE) | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +#define I2C_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ + PAD_CTL_ODE | PAD_CTL_SRE_FAST) + +#define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +static int board_type = -1; +#define BOARD_IS_MARSBOARD 0 +#define BOARD_IS_RIOTBOARD 1 + +int dram_init(void) +{ + gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); + + return 0; +} + +static iomux_v3_cfg_t const uart2_pads[] = { + MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), +}; + +static void setup_iomux_uart(void) +{ + imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads)); +} + +iomux_v3_cfg_t const enet_pads[] = { + MX6_PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL), + /* GPIO16 - AR8035 25MHz
[U-Boot] [PATCH 6/8] nitrogen6x: use common detect_hdmi
Signed-off-by: Eric Bénard e...@eukrea.com Cc: Eric Nelson eric.nel...@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 1d96db1..4e78ce4 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -445,12 +445,6 @@ static iomux_v3_cfg_t const rgb_pads[] = { MX6_PAD_DISP0_DAT23__IPU1_DISP0_DATA23, }; -static int detect_hdmi(struct display_info_t const *dev) -{ - struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; - return readb(hdmi-phy_stat0) HDMI_DVI_STAT; -} - static void do_enable_hdmi(struct display_info_t const *dev) { imx_enable_hdmi_phy(); -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 7/8] mx6sabresd: use common detect_hdmi
Signed-off-by: Eric Bénard e...@eukrea.com Cc: Fabio Estevam fabio.este...@freescale.com --- board/freescale/mx6sabresd/mx6sabresd.c | 8 1 file changed, 8 deletions(-) diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index d54d5db..8935fa8 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -254,14 +254,6 @@ int board_phy_config(struct phy_device *phydev) } #if defined(CONFIG_VIDEO_IPUV3) - -static int detect_hdmi(struct display_info_t const *dev) -{ - struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; - return readb(hdmi-phy_stat0) HDMI_DVI_STAT; -} - - static void disable_lvds(struct display_info_t const *dev) { struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR; -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 8/8] embest/mx6boards: use common detect_hdmi
Signed-off-by: Eric Bénard e...@eukrea.com --- board/embest/mx6boards/mx6boards.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c index f65c4fa..808a855 100644 --- a/board/embest/mx6boards/mx6boards.c +++ b/board/embest/mx6boards/mx6boards.c @@ -392,12 +392,6 @@ static void disable_lvds(struct display_info_t const *dev) IOMUXC_GPR2_LVDS_CH0_MODE_MASK); } -static int detect_hdmi(struct display_info_t const *dev) -{ - struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; - return readb(hdmi-phy_stat0) HDMI_DVI_STAT; -} - static void do_enable_hdmi(struct display_info_t const *dev) { disable_lvds(dev); -- 1.9.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/2] RiOTboard: add new board
Hi Stefano, Le Tue, 01 Apr 2014 10:41:50 +0200, Stefano Babic sba...@denx.de a écrit : On 31/03/2014 22:02, Eric Bénard wrote: Le Sun, 30 Mar 2014 18:20:49 +0200, Stefano Babic sba...@denx.de a écrit : A general remark. I agree by reading the whole thread about checking at runtime which is the running board (you do it getting the cpu type). However, you use also a compiler switch mechanism, adding RIOTBOARD or MARSBOARD in the boards.cfg. You have implemented two ways to for the same thing. This makes in principle your runtime detection useless, because you can use #if CONFIG_MARSBOARD instead of if board_type == BOARD_IS_MARSBOARD). Is it possible to use only the runtime detection ? I think the main problem is CONFIG_ENV_IS_*, that is different for the two boards. What do you think about it ? I've tried and I don't see how to include functions to handle both MMC and SF environment in the same binary with the current env code. I was not sure, but I had the feeling this can be the major issue. A workaround would be to use MMC to store env also on the MarSBoard but as it is using the SPI flash as the boot source I would prefer to keep the env in the SPI flash. Ok - then I propose that you have still two entries in boards.cfg, and you set there ENV_IS_IN_MMC or ENV_IS_IN_SPI_FLASH. A lot of boards, having different hardware configurations, are doing in this way. You can drop CONFIG_RIOTBOARD and CONFIG_MARSBOARD as well (for example, mx28evk has an entry in boards.cfg mx28evk_nand for ENV on NAND). you're right that will remove the ifdef in the config file, thanks. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/2] RiOTboard: add new board
Hi Stefano, Le Sun, 30 Mar 2014 18:20:49 +0200, Stefano Babic sba...@denx.de a écrit : A general remark. I agree by reading the whole thread about checking at runtime which is the running board (you do it getting the cpu type). However, you use also a compiler switch mechanism, adding RIOTBOARD or MARSBOARD in the boards.cfg. You have implemented two ways to for the same thing. This makes in principle your runtime detection useless, because you can use #if CONFIG_MARSBOARD instead of if board_type == BOARD_IS_MARSBOARD). Is it possible to use only the runtime detection ? I think the main problem is CONFIG_ENV_IS_*, that is different for the two boards. What do you think about it ? I've tried and I don't see how to include functions to handle both MMC and SF environment in the same binary with the current env code. A workaround would be to use MMC to store env also on the MarSBoard but as it is using the SPI flash as the boot source I would prefer to keep the env in the SPI flash. Best regards, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/2] RiOTboard: add new board
Hi Stefano, Le Sun, 30 Mar 2014 18:20:49 +0200, Stefano Babic sba...@denx.de a écrit : I jump directly to V4 ;-) Sorry for late review, I was not in office last days. Added Ben in CC. He sent a first version for the Marsboard. On 29/03/2014 22:29, Eric Bénard wrote: this board is produced by Embest/Element 14 and is based on i.MX6 Solo The following features are tested : - UART2 (console) - eMMC - SDCard - uSDCard - Ethernet - USB Host (through 4 ports hub) - HDMI output - I2C 1/2/3 - LVDS TFT with LCD8000-97C from Embest/Element 14 Boot on eMMC and through USB loader are tested. For more informations on this board : http://www.riotboard.org/ Signed-off-by: Eric Bénard e...@eukrea.com --- A general remark. I agree by reading the whole thread about checking at runtime which is the running board (you do it getting the cpu type). However, you use also a compiler switch mechanism, adding RIOTBOARD or MARSBOARD in the boards.cfg. You have implemented two ways to for the same thing. This makes in principle your runtime detection useless, because you can use #if CONFIG_MARSBOARD instead of if board_type == BOARD_IS_MARSBOARD). True, as said in the log, anyway at the moment the same code can't run on both boards because of the different CPU (Solo vs Dual - and not Dual Lite). Is it possible to use only the runtime detection ? I think the main problem is CONFIG_ENV_IS_*, that is different for the two boards. What do you think about it ? I'll see how we can handle the 2 CONFIG_ENV_IS with runtime detection. IMHO you could also squash the two patches together. You add new files, and patch 2/2 changes some of them. I think in this case having a single patch makes review easier. OK no problem. + /* from linux/arch/arm/mach-imx/mach-imx6q.c : Codestyle in U-Boot for multiline comments is: /* * ... */ OK will fix. FWIW checkpatch doesn't provide any warning concerning this problem. +int board_video_skip(void) +{ ..././// We have already discussed in the past about this function. Each board (at least, imx6 board) want to have such of them, and code is duplicated. What about to factorize it ? I am not against to move it into imx-common, if we generally agree, but I would like to avoid to duplicate this function for each board. OK, if I understand correctly you want me to factorize it ? ;-) I'll see what I can do there. Thanks, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 1/2] RiOTboard: add new board
this board is produced by Embest/Element 14 and is based on i.MX6 Solo The following features are tested : - UART2 (console) - eMMC - SDCard - uSDCard - Ethernet - USB Host (through 4 ports hub) - HDMI output - I2C 1/2/3 - LVDS TFT with LCD8000-97C from Embest/Element 14 Boot on eMMC and through USB loader are tested. For more informations on this board : http://www.riotboard.org/ Signed-off-by: Eric Bénard e...@eukrea.com --- v4: add LVDS TFT support and use clrbits / setbits / clrsetbits as suggested by Wolfgang board/embest/riotboard/Makefile| 9 + board/embest/riotboard/riotboard.c | 566 + boards.cfg | 1 + include/configs/riotboard.h| 299 4 files changed, 875 insertions(+) create mode 100644 board/embest/riotboard/Makefile create mode 100644 board/embest/riotboard/riotboard.c create mode 100644 include/configs/riotboard.h diff --git a/board/embest/riotboard/Makefile b/board/embest/riotboard/Makefile new file mode 100644 index 000..5f978c0 --- /dev/null +++ b/board/embest/riotboard/Makefile @@ -0,0 +1,9 @@ +# +# Copyright (C) 2007, Guennadi Liakhovetski l...@denx.de +# +# (C) Copyright 2011 Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := riotboard.o diff --git a/board/embest/riotboard/riotboard.c b/board/embest/riotboard/riotboard.c new file mode 100644 index 000..1627156 --- /dev/null +++ b/board/embest/riotboard/riotboard.c @@ -0,0 +1,566 @@ +/* + * Copyright (C) 2014 Eukréa Electromatique + * Author: Eric Bénard e...@eukrea.com + * Fabio Estevam fabio.este...@freescale.com + * Jon Nettleton jon.nettle...@gmail.com + * + * based on sabresd.c which is : + * Copyright (C) 2012 Freescale Semiconductor, Inc. + * and on hummingboard.c which is : + * Copyright (C) 2013 SolidRun ltd. + * Copyright (C) 2013 Jon Nettleton jon.nettle...@gmail.com. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include asm/arch/clock.h +#include asm/arch/imx-regs.h +#include asm/arch/iomux.h +#include asm/arch/mx6-pins.h +#include asm/errno.h +#include asm/gpio.h +#include asm/imx-common/iomux-v3.h +#include asm/imx-common/boot_mode.h +#include asm/imx-common/mxc_i2c.h +#include i2c.h +#include mmc.h +#include fsl_esdhc.h +#include miiphy.h +#include netdev.h +#include asm/arch/mxc_hdmi.h +#include asm/arch/crm_regs.h +#include linux/fb.h +#include ipu_pixfmt.h +#include asm/io.h +#include asm/arch/sys_proto.h +DECLARE_GLOBAL_DATA_PTR; + +#define UART_PAD_CTRL (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_PUS_47K_UP | \ + PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \ + PAD_CTL_SRE_FAST | PAD_CTL_HYS) + +#define USDHC_PAD_CLK_CTRL (PAD_CTL_SPEED_LOW |\ + PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | \ + PAD_CTL_HYS) + +#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_PD (PAD_CTL_PUS_100K_DOWN | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_CLK ((PAD_CTL_PUS_100K_UP ~PAD_CTL_PKE) | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +#define I2C_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ + PAD_CTL_ODE | PAD_CTL_SRE_FAST) + +int dram_init(void) +{ + gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); + + return 0; +} + +static iomux_v3_cfg_t const uart2_pads[] = { + MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), +}; + +static void setup_iomux_uart(void) +{ + imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads)); +} + +iomux_v3_cfg_t const enet_pads[] = { + MX6_PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL), + /* GPIO16 - AR8035 25MHz */ + MX6_PAD_GPIO_16__ENET_REF_CLK | MUX_PAD_CTRL(NO_PAD_CTRL), + MX6_PAD_RGMII_TXC__RGMII_TXC | MUX_PAD_CTRL(NO_PAD_CTRL), + MX6_PAD_RGMII_TD0__RGMII_TD0 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD1__RGMII_TD1 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD2__RGMII_TD2 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD3__RGMII_TD3 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL), + /* AR8035 CLK_25M -- ENET_REF_CLK (V22) */ + MX6_PAD_ENET_REF_CLK__ENET_TX_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL_CLK), + MX6_PAD_RGMII_RXC__RGMII_RXC | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_RD0__RGMII_RD0 | MUX_PAD_CTRL
[U-Boot] [PATCH v4 2/2] MarSBoard: add new board
this board is produced by Embest/Element 14 and is based on i.MX6 Dual The following features are tested : - UART2 (console) - eMMC - uSDCard - Ethernet - USB Host (through 2 ports hub) - HDMI output - I2C 1/2 - SPI NOR Flash - LVDS TFT with LCD8000-97C from Embest/Element 14 Boot on SPI NOR and through USB loader are tested. For more informations on this board : http://www.embest-tech.com/shop/star/marsboard.html As this board shares a lot with RiOTboard, both boards are supported by the same code base which is renamed embest/mx6boards. Signed-off-by: Eric Bénard e...@eukrea.com --- v4: add LVDS TFT support v3: switch to automatic board detection in c code to remove the #ifdef #ifdef kept in the config file as one binary for both boards is not possible actually since both boards use different RAM init. board/embest/{riotboard = mx6boards}/Makefile | 2 +- .../riotboard.c = mx6boards/mx6boards.c} | 118 ++--- boards.cfg | 3 +- include/configs/{riotboard.h = embestmx6boards.h} | 58 ++ 4 files changed, 166 insertions(+), 15 deletions(-) rename board/embest/{riotboard = mx6boards}/Makefile (87%) rename board/embest/{riotboard/riotboard.c = mx6boards/mx6boards.c} (81%) rename include/configs/{riotboard.h = embestmx6boards.h} (84%) diff --git a/board/embest/riotboard/Makefile b/board/embest/mx6boards/Makefile similarity index 87% rename from board/embest/riotboard/Makefile rename to board/embest/mx6boards/Makefile index 5f978c0..467fb50 100644 --- a/board/embest/riotboard/Makefile +++ b/board/embest/mx6boards/Makefile @@ -6,4 +6,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y := riotboard.o +obj-y := mx6boards.o diff --git a/board/embest/riotboard/riotboard.c b/board/embest/mx6boards/mx6boards.c similarity index 81% rename from board/embest/riotboard/riotboard.c rename to board/embest/mx6boards/mx6boards.c index 1627156..fc133c5 100644 --- a/board/embest/riotboard/riotboard.c +++ b/board/embest/mx6boards/mx6boards.c @@ -14,6 +14,7 @@ */ #include asm/arch/clock.h +#include asm/arch/sys_proto.h #include asm/arch/imx-regs.h #include asm/arch/iomux.h #include asm/arch/mx6-pins.h @@ -60,6 +61,13 @@ DECLARE_GLOBAL_DATA_PTR; PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ PAD_CTL_ODE | PAD_CTL_SRE_FAST) +#define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +static int board_type = -1; +#define BOARD_IS_MARSBOARD 0 +#define BOARD_IS_RIOTBOARD 1 + int dram_init(void) { gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); @@ -153,6 +161,9 @@ iomux_v3_cfg_t const usdhc3_pads[] = { MX6_PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +}; + +iomux_v3_cfg_t const riotboard_usdhc3_pads[] = { MX6_PAD_SD3_DAT4__GPIO7_IO01 | MUX_PAD_CTRL(NO_PAD_CTRL), /* WP */ MX6_PAD_SD3_DAT5__GPIO7_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */ }; @@ -188,7 +199,10 @@ int board_mmc_getcd(struct mmc *mmc) ret = !gpio_get_value(USDHC2_CD_GPIO); break; case USDHC3_BASE_ADDR: - ret = !gpio_get_value(USDHC3_CD_GPIO); + if (board_type == BOARD_IS_RIOTBOARD) + ret = !gpio_get_value(USDHC3_CD_GPIO); + else if (board_type == BOARD_IS_MARSBOARD) + ret = 1; /* eMMC/uSDHC3 is always present */ break; case USDHC4_BASE_ADDR: ret = 1; /* eMMC/uSDHC4 is always present */ @@ -206,9 +220,13 @@ int board_mmc_init(bd_t *bis) /* * According to the board_mmc_init() the following map is done: * (U-boot device node)(Physical Port) +* ** RiOTboard : * mmc0SDCard slot (bottom) * mmc1uSDCard slot (top) * mmc2eMMC +* ** MarSBoard : +* mmc0uSDCard slot (bottom) +* mmc1eMMC */ for (i = 0; i CONFIG_SYS_FSL_USDHC_NUM; i++) { switch (i) { @@ -222,7 +240,15 @@ int board_mmc_init(bd_t *bis) case 1: imx_iomux_v3_setup_multiple_pads( usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); - gpio_direction_input(USDHC3_CD_GPIO); + if (board_type == BOARD_IS_RIOTBOARD) { + imx_iomux_v3_setup_multiple_pads( + riotboard_usdhc3_pads, + ARRAY_SIZE(riotboard_usdhc3_pads)); + gpio_direction_input(USDHC3_CD_GPIO); + gpio_direction_output
Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board
Hi Stefan, Le Thu, 27 Mar 2014 08:05:10 +0100, Stefan Roese s...@denx.de a écrit : Yes, I agree. #ifdef's are ugly. But code duplication is also a problem as Wolfgang has mentioned. Isn't there a way to detect the board type at runtime somehow (via CPU type or GPIO input, ...)? And then dynamically configure the board either for RiOT or MarS? This would make the code a bit more complex of course. But there would be no #ifdef's and no code duplication. And you would only have to maintain one U-Boot binary / version for both boards. So, what do you think? Is this possible? Thanks for the idea, that's possible by detecting i.MX6Solo vs i.MX6Dual. I'll try to implement that. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board
Hi Fabio, Le Thu, 27 Mar 2014 09:44:02 -0300, Fabio Estevam feste...@gmail.com a écrit : So in theory yes, we could have a single board file for all the mx6 boards out there and make it full of ifdefs all over it to handle all the hardware variations. here we talk of 2 boards from the same manufacturer which are very similar. What Wolfgang asked is very relevant in that case. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board
Hi Otavio, Le Thu, 27 Mar 2014 09:50:10 -0300, Otavio Salvador ota...@ossystems.com.br a écrit : And this does work, as can be seen in Barebox which has it working for quite some time. You can see equivalent patch in http://lists.infradead.org/pipermail/barebox/2014-March/018408.html It seems U-Boot is behind ! I don't know what you are trying to demonstrate here but in the present case, I'll also submit a v2 of these patches on barebox'ML to factorize the code and the device tree. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/2] RiOTboard: add new board
this board is produced by Embest/Element 14 and is based on i.MX6 Solo The following features are tested : - UART2 (console) - eMMC - SDCard - uSDCard - Ethernet - USB Host (through 4 ports hub) - HDMI output - I2C 1/2/3 Boot on eMMC and through USB loader are tested. For more informations on this board : http://www.riotboard.org/ Signed-off-by: Eric Bénard e...@eukrea.com --- board/embest/riotboard/Makefile| 9 + board/embest/riotboard/riotboard.c | 493 + boards.cfg | 1 + include/configs/riotboard.h| 299 ++ 4 files changed, 802 insertions(+) create mode 100644 board/embest/riotboard/Makefile create mode 100644 board/embest/riotboard/riotboard.c create mode 100644 include/configs/riotboard.h diff --git a/board/embest/riotboard/Makefile b/board/embest/riotboard/Makefile new file mode 100644 index 000..5f978c0 --- /dev/null +++ b/board/embest/riotboard/Makefile @@ -0,0 +1,9 @@ +# +# Copyright (C) 2007, Guennadi Liakhovetski l...@denx.de +# +# (C) Copyright 2011 Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := riotboard.o diff --git a/board/embest/riotboard/riotboard.c b/board/embest/riotboard/riotboard.c new file mode 100644 index 000..15eaa1e --- /dev/null +++ b/board/embest/riotboard/riotboard.c @@ -0,0 +1,493 @@ +/* + * Copyright (C) 2014 Eukréa Electromatique + * Author: Eric Bénard e...@eukrea.com + * Fabio Estevam fabio.este...@freescale.com + * Jon Nettleton jon.nettle...@gmail.com + * + * based on sabresd.c which is : + * Copyright (C) 2012 Freescale Semiconductor, Inc. + * and on hummingboard.c which is : + * Copyright (C) 2013 SolidRun ltd. + * Copyright (C) 2013 Jon Nettleton jon.nettle...@gmail.com. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include asm/arch/clock.h +#include asm/arch/imx-regs.h +#include asm/arch/iomux.h +#include asm/arch/mx6-pins.h +#include asm/errno.h +#include asm/gpio.h +#include asm/imx-common/iomux-v3.h +#include asm/imx-common/boot_mode.h +#include asm/imx-common/mxc_i2c.h +#include i2c.h +#include mmc.h +#include fsl_esdhc.h +#include miiphy.h +#include netdev.h +#include asm/arch/mxc_hdmi.h +#include asm/arch/crm_regs.h +#include linux/fb.h +#include ipu_pixfmt.h +#include asm/io.h +#include asm/arch/sys_proto.h +DECLARE_GLOBAL_DATA_PTR; + +#define UART_PAD_CTRL (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_PUS_47K_UP | \ + PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \ + PAD_CTL_SRE_FAST | PAD_CTL_HYS) + +#define USDHC_PAD_CLK_CTRL (PAD_CTL_SPEED_LOW |\ + PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | \ + PAD_CTL_HYS) + +#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_PD (PAD_CTL_PUS_100K_DOWN | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_CLK ((PAD_CTL_PUS_100K_UP ~PAD_CTL_PKE) | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +#define I2C_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ + PAD_CTL_ODE | PAD_CTL_SRE_FAST) + +int dram_init(void) +{ + gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); + + return 0; +} + +static iomux_v3_cfg_t const uart2_pads[] = { + MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), +}; + +static void setup_iomux_uart(void) +{ + imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads)); +} + +iomux_v3_cfg_t const enet_pads[] = { + MX6_PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL), + /* GPIO16 - AR8035 25MHz */ + MX6_PAD_GPIO_16__ENET_REF_CLK | MUX_PAD_CTRL(NO_PAD_CTRL), + MX6_PAD_RGMII_TXC__RGMII_TXC | MUX_PAD_CTRL(NO_PAD_CTRL), + MX6_PAD_RGMII_TD0__RGMII_TD0 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD1__RGMII_TD1 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD2__RGMII_TD2 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD3__RGMII_TD3 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL), + /* AR8035 CLK_25M -- ENET_REF_CLK (V22) */ + MX6_PAD_ENET_REF_CLK__ENET_TX_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL_CLK), + MX6_PAD_RGMII_RXC__RGMII_RXC | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_RD0__RGMII_RD0 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), + MX6_PAD_RGMII_RD1__RGMII_RD1 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), + MX6_PAD_RGMII_RD2__RGMII_RD2 | MUX_PAD_CTRL
[U-Boot] [PATCH v3 2/2] MarSBoard: add new board
this board is produced by Embest/Element 14 and is based on i.MX6 Dual The following features are tested : - UART2 (console) - eMMC - uSDCard - Ethernet - USB Host (through 2 ports hub) - HDMI output - I2C 1/2 - SPI NOR Flash Boot on SPI NOR and through USB loader are tested. For more informations on this board : http://www.embest-tech.com/shop/star/marsboard.html As this board shares a lot with RiOTboard, both boards are supported by the same code base which is renamed embest/mx6boards. Signed-off-by: Eric Bénard e...@eukrea.com --- v3: switch to automatic board detection in c code to remove the #ifdef #ifdef kept in the config file as one binary for both boards is not possible actually since both boards use different RAM init. board/embest/{riotboard = mx6boards}/Makefile | 2 +- .../riotboard.c = mx6boards/mx6boards.c} | 83 -- boards.cfg | 3 +- include/configs/{riotboard.h = embestmx6boards.h} | 58 +++ 4 files changed, 137 insertions(+), 9 deletions(-) rename board/embest/{riotboard = mx6boards}/Makefile (87%) rename board/embest/{riotboard/riotboard.c = mx6boards/mx6boards.c} (86%) rename include/configs/{riotboard.h = embestmx6boards.h} (84%) diff --git a/board/embest/riotboard/Makefile b/board/embest/mx6boards/Makefile similarity index 87% rename from board/embest/riotboard/Makefile rename to board/embest/mx6boards/Makefile index 5f978c0..467fb50 100644 --- a/board/embest/riotboard/Makefile +++ b/board/embest/mx6boards/Makefile @@ -6,4 +6,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y := riotboard.o +obj-y := mx6boards.o diff --git a/board/embest/riotboard/riotboard.c b/board/embest/mx6boards/mx6boards.c similarity index 86% rename from board/embest/riotboard/riotboard.c rename to board/embest/mx6boards/mx6boards.c index 15eaa1e..255771b 100644 --- a/board/embest/riotboard/riotboard.c +++ b/board/embest/mx6boards/mx6boards.c @@ -14,6 +14,7 @@ */ #include asm/arch/clock.h +#include asm/arch/sys_proto.h #include asm/arch/imx-regs.h #include asm/arch/iomux.h #include asm/arch/mx6-pins.h @@ -60,6 +61,13 @@ DECLARE_GLOBAL_DATA_PTR; PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ PAD_CTL_ODE | PAD_CTL_SRE_FAST) +#define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +static int board_type = -1; +#define BOARD_IS_MARSBOARD 0 +#define BOARD_IS_RIOTBOARD 1 + int dram_init(void) { gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); @@ -153,6 +161,9 @@ iomux_v3_cfg_t const usdhc3_pads[] = { MX6_PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +}; + +iomux_v3_cfg_t const riotboard_usdhc3_pads[] = { MX6_PAD_SD3_DAT4__GPIO7_IO01| MUX_PAD_CTRL(NO_PAD_CTRL), /* WP */ MX6_PAD_SD3_DAT5__GPIO7_IO00| MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */ }; @@ -187,7 +198,10 @@ int board_mmc_getcd(struct mmc *mmc) ret = !gpio_get_value(USDHC2_CD_GPIO); break; case USDHC3_BASE_ADDR: - ret = !gpio_get_value(USDHC3_CD_GPIO); + if (board_type == BOARD_IS_RIOTBOARD) + ret = !gpio_get_value(USDHC3_CD_GPIO); + else if (board_type == BOARD_IS_MARSBOARD) + ret = 1; /* eMMC/uSDHC3 is always present */ break; case USDHC4_BASE_ADDR: ret = 1; /* eMMC/uSDHC4 is always present */ @@ -205,9 +219,13 @@ int board_mmc_init(bd_t *bis) /* * According to the board_mmc_init() the following map is done: * (U-boot device node)(Physical Port) +* ** RiOTboard : * mmc0SDCard slot (bottom) * mmc1uSDCard slot (top) * mmc2eMMC +* ** MarSBoard : +* mmc0uSDCard slot (bottom) +* mmc1eMMC */ for (i = 0; i CONFIG_SYS_FSL_USDHC_NUM; i++) { switch (i) { @@ -221,7 +239,15 @@ int board_mmc_init(bd_t *bis) case 1: imx_iomux_v3_setup_multiple_pads( usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); - gpio_direction_input(USDHC3_CD_GPIO); + if (board_type == BOARD_IS_RIOTBOARD) { + imx_iomux_v3_setup_multiple_pads( + riotboard_usdhc3_pads, + ARRAY_SIZE(riotboard_usdhc3_pads)); + gpio_direction_input(USDHC3_CD_GPIO); + gpio_direction_output(IMX_GPIO_NR(7, 8) , 0); + udelay(250
[U-Boot] [PATCH 2/2] MarSBoard: add new board
this board is produced by Embest/Element 14 and is based on i.MX6 Dual The following features are tested : - UART2 (console) - eMMC - uSDCard - Ethernet - USB Host (through 2 ports hub) - HDMI output - I2C 1/2 - SPI NOR Flash Boot on SPI NOR and through USB loader are tested. For more informations on this board : http://www.embest-tech.com/shop/star/marsboard.html Signed-off-by: Eric Bénard e...@eukrea.com --- board/embest/marsboard/Makefile| 9 + board/embest/marsboard/marsboard.c | 489 + boards.cfg | 1 + include/configs/marsboard.h| 304 +++ 4 files changed, 803 insertions(+) create mode 100644 board/embest/marsboard/Makefile create mode 100644 board/embest/marsboard/marsboard.c create mode 100644 include/configs/marsboard.h diff --git a/board/embest/marsboard/Makefile b/board/embest/marsboard/Makefile new file mode 100644 index 000..e87cc87 --- /dev/null +++ b/board/embest/marsboard/Makefile @@ -0,0 +1,9 @@ +# +# Copyright (C) 2007, Guennadi Liakhovetski l...@denx.de +# +# (C) Copyright 2011 Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := marsboard.o diff --git a/board/embest/marsboard/marsboard.c b/board/embest/marsboard/marsboard.c new file mode 100644 index 000..3735462 --- /dev/null +++ b/board/embest/marsboard/marsboard.c @@ -0,0 +1,489 @@ +/* + * Copyright (C) 2014 Eukréa Electromatique + * Author: Eric Bénard e...@eukrea.com + * Fabio Estevam fabio.este...@freescale.com + * Jon Nettleton jon.nettle...@gmail.com + * + * based on sabresd.c which is : + * Copyright (C) 2012 Freescale Semiconductor, Inc. + * and on hummingboard.c which is : + * Copyright (C) 2013 SolidRun ltd. + * Copyright (C) 2013 Jon Nettleton jon.nettle...@gmail.com. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include asm/arch/clock.h +#include asm/arch/imx-regs.h +#include asm/arch/iomux.h +#include asm/arch/mx6-pins.h +#include asm/errno.h +#include asm/gpio.h +#include asm/imx-common/iomux-v3.h +#include asm/imx-common/boot_mode.h +#include asm/imx-common/mxc_i2c.h +#include i2c.h +#include mmc.h +#include fsl_esdhc.h +#include miiphy.h +#include netdev.h +#include asm/arch/mxc_hdmi.h +#include asm/arch/crm_regs.h +#include linux/fb.h +#include ipu_pixfmt.h +#include asm/io.h +#include asm/arch/sys_proto.h +DECLARE_GLOBAL_DATA_PTR; + +#define UART_PAD_CTRL (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_PUS_47K_UP | \ + PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \ + PAD_CTL_SRE_FAST | PAD_CTL_HYS) + +#define USDHC_PAD_CLK_CTRL (PAD_CTL_SPEED_LOW |\ + PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | \ + PAD_CTL_HYS) + +#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_PD (PAD_CTL_PUS_100K_DOWN | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_CLK ((PAD_CTL_PUS_100K_UP ~PAD_CTL_PKE) | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +#define I2C_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ + PAD_CTL_ODE | PAD_CTL_SRE_FAST) + +#define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +int dram_init(void) +{ + gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); + + return 0; +} + +static iomux_v3_cfg_t const uart2_pads[] = { + MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), +}; + +static void setup_iomux_uart(void) +{ + imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads)); +} + +iomux_v3_cfg_t const enet_pads[] = { + MX6_PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL), + /* GPIO16 - AR8035 25MHz */ + MX6_PAD_GPIO_16__ENET_REF_CLK | MUX_PAD_CTRL(NO_PAD_CTRL), + MX6_PAD_RGMII_TXC__RGMII_TXC | MUX_PAD_CTRL(NO_PAD_CTRL), + MX6_PAD_RGMII_TD0__RGMII_TD0 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD1__RGMII_TD1 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD2__RGMII_TD2 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD3__RGMII_TD3 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL), + /* AR8035 CLK_25M -- ENET_REF_CLK (V22) */ + MX6_PAD_ENET_REF_CLK__ENET_TX_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL_CLK), + MX6_PAD_RGMII_RXC__RGMII_RXC | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_RD0__RGMII_RD0
[U-Boot] [PATCH 1/2] RiOTboard: add new board
this board is produced by Embest/Element 14 and is based on i.MX6 Solo The following features are tested : - UART2 (console) - eMMC - SDCard - uSDCard - Ethernet - USB Host (through 4 ports hub) - HDMI output - I2C 1/2/3 Boot on eMMC and through USB loader are tested. For more informations on this board : http://www.riotboard.org/ Signed-off-by: Eric Bénard e...@eukrea.com --- board/embest/riotboard/Makefile| 9 + board/embest/riotboard/riotboard.c | 493 + boards.cfg | 1 + include/configs/riotboard.h| 299 ++ 4 files changed, 802 insertions(+) create mode 100644 board/embest/riotboard/Makefile create mode 100644 board/embest/riotboard/riotboard.c create mode 100644 include/configs/riotboard.h diff --git a/board/embest/riotboard/Makefile b/board/embest/riotboard/Makefile new file mode 100644 index 000..5f978c0 --- /dev/null +++ b/board/embest/riotboard/Makefile @@ -0,0 +1,9 @@ +# +# Copyright (C) 2007, Guennadi Liakhovetski l...@denx.de +# +# (C) Copyright 2011 Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := riotboard.o diff --git a/board/embest/riotboard/riotboard.c b/board/embest/riotboard/riotboard.c new file mode 100644 index 000..15eaa1e --- /dev/null +++ b/board/embest/riotboard/riotboard.c @@ -0,0 +1,493 @@ +/* + * Copyright (C) 2014 Eukréa Electromatique + * Author: Eric Bénard e...@eukrea.com + * Fabio Estevam fabio.este...@freescale.com + * Jon Nettleton jon.nettle...@gmail.com + * + * based on sabresd.c which is : + * Copyright (C) 2012 Freescale Semiconductor, Inc. + * and on hummingboard.c which is : + * Copyright (C) 2013 SolidRun ltd. + * Copyright (C) 2013 Jon Nettleton jon.nettle...@gmail.com. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include asm/arch/clock.h +#include asm/arch/imx-regs.h +#include asm/arch/iomux.h +#include asm/arch/mx6-pins.h +#include asm/errno.h +#include asm/gpio.h +#include asm/imx-common/iomux-v3.h +#include asm/imx-common/boot_mode.h +#include asm/imx-common/mxc_i2c.h +#include i2c.h +#include mmc.h +#include fsl_esdhc.h +#include miiphy.h +#include netdev.h +#include asm/arch/mxc_hdmi.h +#include asm/arch/crm_regs.h +#include linux/fb.h +#include ipu_pixfmt.h +#include asm/io.h +#include asm/arch/sys_proto.h +DECLARE_GLOBAL_DATA_PTR; + +#define UART_PAD_CTRL (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_PUS_47K_UP | \ + PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \ + PAD_CTL_SRE_FAST | PAD_CTL_HYS) + +#define USDHC_PAD_CLK_CTRL (PAD_CTL_SPEED_LOW |\ + PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | \ + PAD_CTL_HYS) + +#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_PD (PAD_CTL_PUS_100K_DOWN | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_CLK ((PAD_CTL_PUS_100K_UP ~PAD_CTL_PKE) | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +#define I2C_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ + PAD_CTL_ODE | PAD_CTL_SRE_FAST) + +int dram_init(void) +{ + gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); + + return 0; +} + +static iomux_v3_cfg_t const uart2_pads[] = { + MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), +}; + +static void setup_iomux_uart(void) +{ + imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads)); +} + +iomux_v3_cfg_t const enet_pads[] = { + MX6_PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL), + /* GPIO16 - AR8035 25MHz */ + MX6_PAD_GPIO_16__ENET_REF_CLK | MUX_PAD_CTRL(NO_PAD_CTRL), + MX6_PAD_RGMII_TXC__RGMII_TXC | MUX_PAD_CTRL(NO_PAD_CTRL), + MX6_PAD_RGMII_TD0__RGMII_TD0 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD1__RGMII_TD1 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD2__RGMII_TD2 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD3__RGMII_TD3 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL), + /* AR8035 CLK_25M -- ENET_REF_CLK (V22) */ + MX6_PAD_ENET_REF_CLK__ENET_TX_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL_CLK), + MX6_PAD_RGMII_RXC__RGMII_RXC | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_RD0__RGMII_RD0 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), + MX6_PAD_RGMII_RD1__RGMII_RD1 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), + MX6_PAD_RGMII_RD2__RGMII_RD2 | MUX_PAD_CTRL
Re: [U-Boot] [PATCH 2/2] MarSBoard: add new board
Hi Wolfgang, Le Wed, 26 Mar 2014 20:02:57 +0100, Wolfgang Denk w...@denx.de a écrit : In message 1395858363-21054-2-git-send-email-e...@eukrea.com you wrote: this board is produced by Embest/Element 14 and is based on i.MX6 Dual Comparing this patch agains the earlier one for the RiOTboard, it turns out that the differences between these two boards are really minimal. Would it not make sense to combine all the common code? Actually I think you should be able to use all common code with just two different target names. that seems possible : the main differences at u-boot level are the eSDHC (3 on the RiOT vs 2 on the MarS) and the SPI flash which is populated in the MarSBoard (and used for boot when the RiOT boots on the eMMC). I'll check how to factorize the code. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/2] MarSBoard: add new board
this board is produced by Embest/Element 14 and is based on i.MX6 Dual The following features are tested : - UART2 (console) - eMMC - uSDCard - Ethernet - USB Host (through 2 ports hub) - HDMI output - I2C 1/2 - SPI NOR Flash Boot on SPI NOR and through USB loader are tested. For more informations on this board : http://www.embest-tech.com/shop/star/marsboard.html As this board shares a lot with RiOTboard, both boards are supported by the same code base which is renamed embest/mx6boards Signed-off-by: Eric Bénard e...@eukrea.com --- board/embest/{riotboard = mx6boards}/Makefile | 2 +- .../riotboard.c = mx6boards/mx6boards.c} | 49 +- boards.cfg | 3 +- include/configs/{riotboard.h = embestmx6boards.h} | 58 ++ 4 files changed, 108 insertions(+), 4 deletions(-) rename board/embest/{riotboard = mx6boards}/Makefile (87%) rename board/embest/{riotboard/riotboard.c = mx6boards/mx6boards.c} (91%) rename include/configs/{riotboard.h = embestmx6boards.h} (84%) diff --git a/board/embest/riotboard/Makefile b/board/embest/mx6boards/Makefile similarity index 87% rename from board/embest/riotboard/Makefile rename to board/embest/mx6boards/Makefile index 5f978c0..467fb50 100644 --- a/board/embest/riotboard/Makefile +++ b/board/embest/mx6boards/Makefile @@ -6,4 +6,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y := riotboard.o +obj-y := mx6boards.o diff --git a/board/embest/riotboard/riotboard.c b/board/embest/mx6boards/mx6boards.c similarity index 91% rename from board/embest/riotboard/riotboard.c rename to board/embest/mx6boards/mx6boards.c index 15eaa1e..374c2ec 100644 --- a/board/embest/riotboard/riotboard.c +++ b/board/embest/mx6boards/mx6boards.c @@ -60,6 +60,9 @@ DECLARE_GLOBAL_DATA_PTR; PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ PAD_CTL_ODE | PAD_CTL_SRE_FAST) +#define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + int dram_init(void) { gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); @@ -153,8 +156,10 @@ iomux_v3_cfg_t const usdhc3_pads[] = { MX6_PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +#ifdef CONFIG_RIOTBOARD MX6_PAD_SD3_DAT4__GPIO7_IO01| MUX_PAD_CTRL(NO_PAD_CTRL), /* WP */ MX6_PAD_SD3_DAT5__GPIO7_IO00| MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */ +#endif }; iomux_v3_cfg_t const usdhc4_pads[] = { @@ -187,7 +192,12 @@ int board_mmc_getcd(struct mmc *mmc) ret = !gpio_get_value(USDHC2_CD_GPIO); break; case USDHC3_BASE_ADDR: +#ifdef CONFIG_RIOTBOARD ret = !gpio_get_value(USDHC3_CD_GPIO); +#endif +#ifdef CONFIG_MARSBOARD + ret = 1; /* eMMC/uSDHC3 is always present */ +#endif break; case USDHC4_BASE_ADDR: ret = 1; /* eMMC/uSDHC4 is always present */ @@ -205,9 +215,13 @@ int board_mmc_init(bd_t *bis) /* * According to the board_mmc_init() the following map is done: * (U-boot device node)(Physical Port) +* ** RiOTboard : * mmc0SDCard slot (bottom) * mmc1uSDCard slot (top) * mmc2eMMC +* ** MarSBoard : +* mmc0uSDCard slot (bottom) +* mmc1eMMC */ for (i = 0; i CONFIG_SYS_FSL_USDHC_NUM; i++) { switch (i) { @@ -224,6 +238,11 @@ int board_mmc_init(bd_t *bis) gpio_direction_input(USDHC3_CD_GPIO); usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); usdhc_cfg[1].max_bus_width = 4; +#ifdef CONFIG_MARSBOARD + gpio_direction_output(IMX_GPIO_NR(7, 8) , 0); + udelay(250); + gpio_set_value(IMX_GPIO_NR(7, 8), 1); +#endif break; case 2: imx_iomux_v3_setup_multiple_pads( @@ -248,6 +267,20 @@ int board_mmc_init(bd_t *bis) } #endif +#ifdef CONFIG_MXC_SPI +iomux_v3_cfg_t const ecspi1_pads[] = { + MX6_PAD_EIM_D16__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL), + MX6_PAD_EIM_D17__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL), + MX6_PAD_EIM_D18__ECSPI1_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL), + MX6_PAD_EIM_EB2__GPIO2_IO30 | MUX_PAD_CTRL(NO_PAD_CTRL), +}; + +static void setup_spi(void) +{ + imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads)); +} +#endif + struct i2c_pads_info i2c_pad_info1 = { .scl = { .i2c_mode = MX6_PAD_CSI0_DAT9__I2C1_SCL | MUX_PAD_CTRL(I2C_PAD_CTRL), @@ -458,21 +491,28 @@ int board_init(void) { /* address of boot
[U-Boot] [PATCH v2 1/2] RiOTboard: add new board
this board is produced by Embest/Element 14 and is based on i.MX6 Solo The following features are tested : - UART2 (console) - eMMC - SDCard - uSDCard - Ethernet - USB Host (through 4 ports hub) - HDMI output - I2C 1/2/3 Boot on eMMC and through USB loader are tested. For more informations on this board : http://www.riotboard.org/ Signed-off-by: Eric Bénard e...@eukrea.com --- board/embest/riotboard/Makefile| 9 + board/embest/riotboard/riotboard.c | 493 + boards.cfg | 1 + include/configs/riotboard.h| 299 ++ 4 files changed, 802 insertions(+) create mode 100644 board/embest/riotboard/Makefile create mode 100644 board/embest/riotboard/riotboard.c create mode 100644 include/configs/riotboard.h diff --git a/board/embest/riotboard/Makefile b/board/embest/riotboard/Makefile new file mode 100644 index 000..5f978c0 --- /dev/null +++ b/board/embest/riotboard/Makefile @@ -0,0 +1,9 @@ +# +# Copyright (C) 2007, Guennadi Liakhovetski l...@denx.de +# +# (C) Copyright 2011 Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := riotboard.o diff --git a/board/embest/riotboard/riotboard.c b/board/embest/riotboard/riotboard.c new file mode 100644 index 000..15eaa1e --- /dev/null +++ b/board/embest/riotboard/riotboard.c @@ -0,0 +1,493 @@ +/* + * Copyright (C) 2014 Eukréa Electromatique + * Author: Eric Bénard e...@eukrea.com + * Fabio Estevam fabio.este...@freescale.com + * Jon Nettleton jon.nettle...@gmail.com + * + * based on sabresd.c which is : + * Copyright (C) 2012 Freescale Semiconductor, Inc. + * and on hummingboard.c which is : + * Copyright (C) 2013 SolidRun ltd. + * Copyright (C) 2013 Jon Nettleton jon.nettle...@gmail.com. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include asm/arch/clock.h +#include asm/arch/imx-regs.h +#include asm/arch/iomux.h +#include asm/arch/mx6-pins.h +#include asm/errno.h +#include asm/gpio.h +#include asm/imx-common/iomux-v3.h +#include asm/imx-common/boot_mode.h +#include asm/imx-common/mxc_i2c.h +#include i2c.h +#include mmc.h +#include fsl_esdhc.h +#include miiphy.h +#include netdev.h +#include asm/arch/mxc_hdmi.h +#include asm/arch/crm_regs.h +#include linux/fb.h +#include ipu_pixfmt.h +#include asm/io.h +#include asm/arch/sys_proto.h +DECLARE_GLOBAL_DATA_PTR; + +#define UART_PAD_CTRL (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_PUS_47K_UP | \ + PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \ + PAD_CTL_SRE_FAST | PAD_CTL_HYS) + +#define USDHC_PAD_CLK_CTRL (PAD_CTL_SPEED_LOW |\ + PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | \ + PAD_CTL_HYS) + +#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_PD (PAD_CTL_PUS_100K_DOWN | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) + +#define ENET_PAD_CTRL_CLK ((PAD_CTL_PUS_100K_UP ~PAD_CTL_PKE) | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +#define I2C_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ + PAD_CTL_ODE | PAD_CTL_SRE_FAST) + +int dram_init(void) +{ + gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); + + return 0; +} + +static iomux_v3_cfg_t const uart2_pads[] = { + MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), +}; + +static void setup_iomux_uart(void) +{ + imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads)); +} + +iomux_v3_cfg_t const enet_pads[] = { + MX6_PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL), + /* GPIO16 - AR8035 25MHz */ + MX6_PAD_GPIO_16__ENET_REF_CLK | MUX_PAD_CTRL(NO_PAD_CTRL), + MX6_PAD_RGMII_TXC__RGMII_TXC | MUX_PAD_CTRL(NO_PAD_CTRL), + MX6_PAD_RGMII_TD0__RGMII_TD0 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD1__RGMII_TD1 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD2__RGMII_TD2 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TD3__RGMII_TD3 | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL), + /* AR8035 CLK_25M -- ENET_REF_CLK (V22) */ + MX6_PAD_ENET_REF_CLK__ENET_TX_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL_CLK), + MX6_PAD_RGMII_RXC__RGMII_RXC | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_RD0__RGMII_RD0 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), + MX6_PAD_RGMII_RD1__RGMII_RD1 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD), + MX6_PAD_RGMII_RD2__RGMII_RD2 | MUX_PAD_CTRL
Re: [U-Boot] iMX6 IPU display interface definition
Hi Andreas, Le Thu, 20 Mar 2014 16:13:53 +, Andreas Geisreiter ageisrei...@dh-electronics.de a écrit : Thanks for your help. In the header files which you mentioned I found the following: V-Sync: Active high or low = FB_SYNC_VERT_HIGH_ACT H-Sync: Active high or low = FB_SYNC_HOR_HIGH_ACT Output enable: Active high or low = FB_SYNC_OE_LOW_ACT Data lines: inverted or not = FB_SYNC_DATA_INVERT Pixel Clock: Data is driven on falling or rising edge But now I'm missing the define for switching pixel clock between rising and falling edge. Do you know how I can switch pixel clock activity? check in drivers/video/mxc_ipuv3_fb.c : if (!(fbi-var.sync FB_SYNC_CLK_LAT_FALL)) sig_cfg.clk_pol = 1; Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] i.MX6 freeze when running Linux FSL 3.10.9-1.0.0-alpha AND U-Boot 2013.10
Hi Otavio, Le Tue, 26 Nov 2013 12:32:45 -0200, Otavio Salvador ota...@ossystems.com.br a écrit : Hello, last days I've been trying to isolate the hung cause of a customer board, and also SabreSD board, when using the Freescale's Linux fork of 3.10.9 with 2013.10 U-Boot. The below patch makes it work fine but it does not seem to be possible to upstream this fix, that way. How you guys thing this could be properly integrated into U-Boot to not break other boards? diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index a390296..08f3eda 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -131,6 +131,34 @@ static void imx_set_wdog_powerdown(bool enable) writew(enable, wdog2-wmcr); } +static void imx_set_vddpu_power_down(void) +{ + struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR; + u32 val; + + /* need to power down xPU in GPC before turn off PU LDO */ + val = readl(GPC_BASE_ADDR + 0x260); + writel(val | 0x1, GPC_BASE_ADDR + 0x260); + + val = readl(GPC_BASE_ADDR + 0x0); + writel(val | 0x1, GPC_BASE_ADDR + 0x0); + while (readl(GPC_BASE_ADDR + 0x0) 0x1) + ; + + /* disable VDDPU */ + val = 0x3e00; + writel(val, anatop-reg_core_clr); +} + +static void imx_set_pcie_phy_power_down(void) +{ + u32 val; + + val = readl(IOMUXC_BASE_ADDR + 0x4); + val |= 0x1 18; + writel(val, IOMUXC_BASE_ADDR + 0x4); +} + int arch_cpu_init(void) { init_aips(); @@ -139,6 +167,9 @@ int arch_cpu_init(void) imx_set_wdog_powerdown(false); /* Disable PDE bit of WMCR register */ + imx_set_pcie_phy_power_down(); + imx_set_vddpu_power_down(); + #ifdef CONFIG_APBH_DMA /* Start APBH DMA */ mxs_dma_init(); diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 0cd2538..5cac1a9 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -171,9 +171,21 @@ u32 get_ahb_clk(void) return get_periph_clk() / (ahb_podf + 1); } +static void set_anatop_bypass(void) +{ + struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR; + u32 reg = readl(anatop-reg_core); + + /* bypass VDDARM/VDDSOC */ + reg = reg | (0x1F 18) | 0x1F; + writel(reg, anatop-reg_core); +} + #if defined(CONFIG_VIDEO_IPUV3) void arch_preboot_os(void) { + set_anatop_bypass(); + /* disable video before launching O/S */ ipuv3_fb_shutdown(); } isn't the last change (enabling bypass) sufficient to fix the problem or do you also need the 2 power_down before ? Do you also get the kernel freeze without changing anything in u-boot when you disable cpufreq in the kernel ? Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] i.MX6 freeze when running Linux FSL 3.10.9-1.0.0-alpha AND U-Boot 2013.10
Le Tue, 26 Nov 2013 13:59:36 -0200, Otavio Salvador ota...@ossystems.com.br a écrit : Do you also get the kernel freeze without changing anything in u-boot when you disable cpufreq in the kernel ? The FSL kernel does not build without cpufreq so I didn't try. check if your regulator settings is not defaulted to use anatop's ldo by default instead of the PMIC's one. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] gpio: mxc_gpio: Fix gpio_get_value() when the GPIO is an output
Hi Benoît, Le Sun, 29 Sep 2013 15:21:52 +0200 (CEST), Benoît Thébaudeau benoit.thebaud...@advansee.com a écrit : Why is this required? Is it because there is a different behavior of the PSR register on one of the i.MXs? See my commit message here: http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff;h=5dafa4543c399d329c7b01df1afa98437861cac0 In case the registers are configured to output some level on a GPIO but there is a level conflict with other hardware, the general assumption about gpio_get_value() would probably be that it returns the actual GPIO level, not the level that the registers try to apply. For the latter, another function accessing DR could be implemented. you are right and if that works in the kernel, that should also work in u-boot. It would be interesting to know if the original patch was really fixing a problem as it would be surprising that setting the pin as an input could fix the level sampling problem reliably : Otavio was that tested on real hardware ? BTW Otavio if you read that email through the ML, your MX server rejects my emails : ota...@ossystems.com.br: host mx.ossystems.com.br[66.7.219.172] said: 450 4.1.8 e...@eukrea.com: Sender address rejected: Domain not found (in reply to RCPT TO command) Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] gpio: mxc_gpio: Fix gpio_get_value() when the GPIO is an output
Le Sun, 29 Sep 2013 14:48:32 -0300, Otavio Salvador ota...@ossystems.com.br a écrit : On Sun, Sep 29, 2013 at 2:09 PM, Eric Bénard e...@eukrea.com wrote: Hi Benoît, Le Sun, 29 Sep 2013 15:21:52 +0200 (CEST), Benoît Thébaudeau benoit.thebaud...@advansee.com a écrit : Why is this required? Is it because there is a different behavior of the PSR register on one of the i.MXs? See my commit message here: http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff;h=5dafa4543c399d329c7b01df1afa98437861cac0 In case the registers are configured to output some level on a GPIO but there is a level conflict with other hardware, the general assumption about gpio_get_value() would probably be that it returns the actual GPIO level, not the level that the registers try to apply. For the latter, another function accessing DR could be implemented. you are right and if that works in the kernel, that should also work in u-boot. It would be interesting to know if the original patch was really fixing a problem as it would be surprising that setting the pin as an input could fix the level sampling problem reliably : Otavio was that tested on real hardware ? Yes; it did. Both my original patch (setting it as input) and Fabio's one checking the other register when in output worked fine. on which CPU is that ? It's strange reading PSR works in the kernel and not in u-boot. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] gpio: mxc_gpio: Fix gpio_get_value() when the GPIO is an output
Hi Fabio, Le Sun, 29 Sep 2013 15:22:36 -0300, Fabio Estevam feste...@gmail.com a écrit : On Sun, Sep 29, 2013 at 3:19 PM, Eric Bénard e...@eukrea.com wrote: on which CPU is that ? Otavio tested it on mx6. It's strange reading PSR works in the kernel and not in u-boot. The patch I sent aligns with the kernel behaviour as well: http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/arch/arm/plat-mxc/gpio.c?h=imx_3.0.35_4.1.0id=d6f32393eaf455ce3c32d4e9bafd34d9091eaf45 mainline kernel doesn't seem to have this fix. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/gpio/gpio-mxc.c Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/7] mtd: Fix function description in part_validate comment
Hi Otavio, Le Sat, 28 Sep 2013 00:24:12 -0300, Otavio Salvador ota...@ossystems.com.br a écrit : The part_validate comment had a wrong description of the actions it does and referenced to non-existent functions while in fact it calls 'part_validate_eraseblock()'. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- common/cmd_mtdparts.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c index 3023479..0104285 100644 --- a/common/cmd_mtdparts.c +++ b/common/cmd_mtdparts.c @@ -381,10 +381,10 @@ static int part_validate_eraseblock(struct mtdids *id, struct part_info *part) /** - * Performs sanity check for supplied partition. Offset and size are verified - * to be within valid range. Partition type is checked and either - * parts_validate_nor() or parts_validate_nand() is called with the argument - * of part. + * Performs sanity check for supplied partition. Offset and size are + * verified to be within valid range. Partition type is checked and + * either part_validate_eraseblock() is called with the argument of and now you can remove either ;-) Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/7] gpio-led: Fix __led_toggle support to first set GPIO as input
Hi Otavio, Le Sat, 28 Sep 2013 00:24:16 -0300, Otavio Salvador ota...@ossystems.com.br a écrit : The GPIO need to be set as input before reading its current value and set back to output for setting it; this fixes the non-working 'led id toggle' for GPIO based LEDs. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- drivers/misc/gpio_led.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/gpio_led.c b/drivers/misc/gpio_led.c index 6afb986..1882751 100644 --- a/drivers/misc/gpio_led.c +++ b/drivers/misc/gpio_led.c @@ -22,5 +22,6 @@ void __led_set(led_id_t mask, int state) void __led_toggle(led_id_t mask) { - gpio_set_value(mask, !gpio_get_value(mask)); + gpio_direction_input(mask); + __led_set(mask, !gpio_get_value(mask)); } How can that work on a hardware point of view ? If you configure the gpio as an input it isn't any more driven as an output so the value you read depends on the way the led is wired (and maybe also on internal pull up/down) and not on the way it was previously driven when the gpio was an output. Maybe the real fix would be to check why gpio_get_value doesn't return the level of the gpio when it's configured as an output. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx6sabresd: Avoid hang when HDMI cable is not connected
Hi Fabio, Le Wed, 11 Sep 2013 16:54:10 -0300, Fabio Estevam fabio.este...@freescale.com a écrit : Since commit d9b894603 (mx6sabresd: Add LVDS splash screen support) the following hang happens if the HDMI cable is not connected or the 'panel' variable is not set: U-Boot 2013.10-rc2-12978-g47ac53d-dirty (Sep 11 2013 - 15:07:38) CPU: Freescale i.MX6Q rev1.2 at 792 MHz Reset cause: POR Board: MX6-SabreSD DRAM: 1 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 ... Provide a detect_lvds() to avoid the hang. Reported-by: Pardeep Kumar Singla b45...@freescale.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- board/freescale/mx6sabresd/mx6sabresd.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index c832bd9..e514529 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -263,6 +263,12 @@ static void enable_lvds(struct display_info_t const *dev) IOMUXC_GPR2_DATA_WIDTH_CH1_24BIT; writel(reg, iomux-gpr[2]); } + +static int detect_lvds(struct display_info_t const *dev) +{ + return 0; +} + static struct display_info_t const displays[] = {{ .bus= -1, .addr = 0, @@ -287,7 +293,7 @@ static struct display_info_t const displays[] = {{ .bus= -1, .addr = 0, .pixfmt = IPU_PIX_FMT_LVDS666, - .detect = NULL, + .detect = detect_lvds, .enable = enable_lvds, .mode = { .name = Hannstar-XGA, instead of providing an empty function you could fix the problem in the code calling this function by changing if (dev-detect(dev)) to something like if (dev-detect dev-detect(dev)) Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Add support for TechNexion edm1-cf-imx6 SoM
Hi Tapani, Le Wed, 28 Aug 2013 19:23:33 +0800, Tapani tap...@technexion.com a écrit : Add support for TechNexion edm-cf-imx6 SoM The edm1-cf-imx6 SoM comes in three variants, one with imx6 solo cpu, one with an imx6 dual lite cpu and one with an imx6 quad cpu. aren't these boards Wandboard without the MicroSD connector but with either a eMMC or a NAND ? If yes maybe you could extend wandboard support instead of adding a new board ? Best regards, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] TFTP timeouts, i.mx fec problem?
Hi Ruud, Le Fri, 7 Jun 2013 11:28:54 +0200, Ruud Commandeur rcommand...@clb.nl a écrit : I have not come any further yet in finding the real cause. For now, I just tested with workarounds like lowering the ARP timeout and skipping the phy reset (or only reset for the 1st transfer). Note that also the phy reset and waiting for link-up takes about 2 seconds every time. I did not realise earlier that it would take this long, but this is the part before the TFTP from server... line is displayed and he transfer even starts. isn't your problem related to the fact that when you reset the PHY it samples some pins to get some settings and that after the first reset it could gets wrong settings because the i.MX pins are in a wrong state (because handled by the FEC) leading to the errors you meet ? Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Add minimal support for Congatec Conga-QEVAl Evaluation Carrier Board with a conga-Qmx6 module.
Hi Leo, Le Mon, 13 May 2013 14:02:57 +0200, SARTRE Leo lsar...@adeneo-embedded.com a écrit : diff --git a/board/freescale/cgtqmx6/cgtqmx6.c b/board/freescale/cgtqmx6/cgtqmx6.c new file mode 100644 index 000..ed5476a --- /dev/null +++ b/board/freescale/cgtqmx6/cgtqmx6.c @@ -0,0 +1,630 @@ +/* + * Copyright (C) 2013, Adeneo Embedded www.adeneo-embedded.com + * Leo Sartre, lsar...@adeneo-embedded.com + * Based on mx6qsabrelite.c file + * cgtqmx6.c is a direct copy of mx6qsabrelite.c adapted to your board but you remove the copyright to add your own, that's not a good practice. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include common.h +#include asm/io.h +#include asm/arch/clock.h +#include asm/arch/imx-regs.h +#include asm/arch/iomux.h +#include asm/arch/mx6-pins.h +#include asm/errno.h +#include asm/gpio.h +#include asm/imx-common/iomux-v3.h +#include asm/imx-common/mxc_i2c.h +#include asm/imx-common/boot_mode.h +#include mmc.h +#include fsl_esdhc.h +#include malloc.h +#include linux/fb.h +#include ipu_pixfmt.h +#include asm/arch/crm_regs.h +#include asm/arch/mxc_hdmi.h +#include i2c.h + +DECLARE_GLOBAL_DATA_PTR; + +#define UART_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE |\ + 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_47K_UP |\ + PAD_CTL_SPEED_LOW |\ + PAD_CTL_DSE_80ohm |\ + PAD_CTL_SRE_FAST|\ + PAD_CTL_HYS) + +#define SPI_PAD_CTRL (PAD_CTL_HYS |\ + PAD_CTL_PUS_100K_DOWN |\ + PAD_CTL_SPEED_MED |\ + PAD_CTL_DSE_40ohm |\ + PAD_CTL_SRE_FAST) + +#define BUTTON_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE |\ + PAD_CTL_PUS_100K_UP |\ + PAD_CTL_SPEED_MED |\ + PAD_CTL_DSE_40ohm |\ + PAD_CTL_HYS) + +#define I2C_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE |\ + PAD_CTL_PUS_100K_UP |\ + PAD_CTL_SPEED_MED |\ + PAD_CTL_DSE_40ohm |\ + PAD_CTL_HYS |\ + PAD_CTL_ODE |\ + PAD_CTL_SRE_FAST) + +int dram_init(void) +{ + gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); + + return 0; +} + +iomux_v3_cfg_t const uart1_pads[] = { + MX6_PAD_CSI0_DAT10__UART1_TXD | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_CSI0_DAT11__UART1_RXD | MUX_PAD_CTRL(UART_PAD_CTRL), +}; + +iomux_v3_cfg_t const uart2_pads[] = { + MX6_PAD_EIM_D26__UART2_TXD | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_EIM_D27__UART2_RXD | MUX_PAD_CTRL(UART_PAD_CTRL), +}; + +#define PC MUX_PAD_CTRL(I2C_PAD_CTRL) + +/* I2C1, SGTL5000 */ +struct i2c_pads_info i2c_pad_info0 = { + .scl = { + .i2c_mode = MX6_PAD_EIM_D21__I2C1_SCL | PC, + .gpio_mode = MX6_PAD_EIM_D21__GPIO_3_21 | PC, + .gp = IMX_GPIO_NR(3, 21) + }, + .sda = { + .i2c_mode = MX6_PAD_EIM_D28__I2C1_SDA | PC, + .gpio_mode = MX6_PAD_EIM_D28__GPIO_3_28 | PC, + .gp = IMX_GPIO_NR(3, 28) + } +}; + +/* I2C2 Camera, MIPI */ +struct i2c_pads_info i2c_pad_info1 = { + .scl = { + .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL | PC, + .gpio_mode = MX6_PAD_KEY_COL3__GPIO_4_12 | PC, + .gp =
Re: [U-Boot] [PATCH] mx23: Put back RAM voltage level to its original value
Hi Fabio, Le Fri, 26 Apr 2013 13:01:26 -0300, Fabio Estevam feste...@gmail.com a écrit : From: Fabio Estevam fabio.este...@freescale.com commit 5c2f444c9 (mxs: Reset the EMI block on mx23) changed the DDR voltage level, which causes mx23evk to fail to load a kernel. Put back the original values, so that mx23evk can boot a kernel again. what are the values of these levels (previous one and new one) in mV ? Best regards, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Beginner question: need help about LVDS channels for i.MX6Q SabreSD Board
Hi Igor, Le Fri, 26 Apr 2013 17:17:54 +0200, Igor Ferrara igor.ferr...@dotsystem.it a écrit : Please confirm the reception of the present message by sending back an answer message Thank You for the cooperation. this list has 2535 subscribers, do you really need to get 2535 answers each time tou send an email here ? ;-) Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx23: Put back RAM voltage level to its original value
Hi Marek, Le Fri, 26 Apr 2013 20:16:30 +0200, Marek Vasut ma...@denx.de a écrit : On Fri, Apr 26, 2013 at 1:24 PM, Eric Bénard e...@eukrea.com wrote: what are the values of these levels (previous one and new one) in mV ? 0x10 == 2.5V 0x12 == 2.6V 46v32m16 Eh? What's this code above? mt46v32m16 is a Micron DDR chipset : http://www.micron.com/parts/dram/ddr-sdram/mt46v32m16tg-6t?source=ps Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] da850: provide davinci_enable_uart0
this is needed to bring UART0 out of reset but this function currently only exists for dm644x/355/365/646x when da850 (at least am1808 also need it). Signed-off-by: Eric Bénard e...@eukrea.com --- arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 8 arch/arm/include/asm/arch-davinci/hardware.h| 2 ++ 2 files changed, 10 insertions(+) diff --git a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c index ff2e2e3..127beb8 100644 --- a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +++ b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c @@ -32,6 +32,14 @@ #include asm/arch/emif_defs.h #include asm/arch/pll_defs.h +void davinci_enable_uart0(void) +{ + lpsc_on(DAVINCI_LPSC_UART0); + + /* Bringup UART0 out of reset */ + REG(UART0_PWREMU_MGMT) = 0x6001; +} + #if defined(CONFIG_SYS_DA850_PLL_INIT) void da850_waitloop(unsigned long loopcnt) { diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h index 6eed6c9..a9017e4 100644 --- a/arch/arm/include/asm/arch-davinci/hardware.h +++ b/arch/arm/include/asm/arch-davinci/hardware.h @@ -346,6 +346,8 @@ void davinci_errata_workarounds(void); #define PSC_PSC0_MODULE_ID_CNT 16 #define PSC_PSC1_MODULE_ID_CNT 32 +#define UART0_PWREMU_MGMT (0x01c42030) + struct davinci_psc_regs { dv_reg revid; dv_reg rsvd0[71]; -- 1.7.11.7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] davinci: handle CONFIG_SYS_CLE_MASK and CONFIG_SYS_ALE_MASK
these variables are curently defined in several config files but the driver doesn't use them and defaults to hardcoded values in nand_defs.h It's interesting to be able to change this hardcoded valude when the hardware is not using the default adress signals to drive ALE and CLE and two configuration defines already exist for this purpose so use them. Signed-off-by: Eric Bénard e...@eukrea.com --- arch/arm/include/asm/arch-davinci/nand_defs.h | 9 + include/configs/da830evm.h| 4 ++-- include/configs/da850evm.h| 4 ++-- include/configs/enbw_cmc.h| 4 ++-- include/configs/tnetv107x_evm.h | 4 ++-- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/arch/arm/include/asm/arch-davinci/nand_defs.h b/arch/arm/include/asm/arch-davinci/nand_defs.h index 10f3a39..4a30813 100644 --- a/arch/arm/include/asm/arch-davinci/nand_defs.h +++ b/arch/arm/include/asm/arch-davinci/nand_defs.h @@ -36,6 +36,15 @@ #defineMASK_ALE0x08 #endif +#ifdef CONFIG_SYS_NAND_MASK_CLE +#undef MASK_CLE +#define MASK_CLE CONFIG_SYS_NAND_MASK_CLE +#endif +#ifdef CONFIG_SYS_NAND_MASK_ALE +#undef MASK_ALE +#define MASK_ALE CONFIG_SYS_NAND_MASK_ALE +#endif + #define NAND_READ_START0x00 #define NAND_READ_END 0x30 #define NAND_STATUS0x70 diff --git a/include/configs/da830evm.h b/include/configs/da830evm.h index f7ac256..198892b 100644 --- a/include/configs/da830evm.h +++ b/include/configs/da830evm.h @@ -109,8 +109,8 @@ #define CONFIG_SYS_NAND_CS 3 #define CONFIG_SYS_NAND_BASE DAVINCI_ASYNC_EMIF_DATA_CE3_BASE #define CONFIG_SYS_NAND_PAGE_2K -#define CONFIG_SYS_CLE_MASK0x10 -#define CONFIG_SYS_ALE_MASK0x8 +#define CONFIG_SYS_NAND_MASK_CLE 0x10 +#define CONFIG_SYS_NAND_MASK_ALE 0x8 #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */ #endif diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index 583568d..c420967 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -199,8 +199,8 @@ #defineCONFIG_SYS_NAND_PAGE_2K #define CONFIG_SYS_NAND_CS 3 #define CONFIG_SYS_NAND_BASE DAVINCI_ASYNC_EMIF_DATA_CE3_BASE -#define CONFIG_SYS_CLE_MASK0x10 -#define CONFIG_SYS_ALE_MASK0x8 +#define CONFIG_SYS_NAND_MASK_CLE 0x10 +#define CONFIG_SYS_NAND_MASK_ALE 0x8 #undef CONFIG_SYS_NAND_HW_ECC #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */ #define CONFIG_SYS_NAND_HW_ECC_OOBFIRST diff --git a/include/configs/enbw_cmc.h b/include/configs/enbw_cmc.h index 2d63b67..97bc972 100644 --- a/include/configs/enbw_cmc.h +++ b/include/configs/enbw_cmc.h @@ -118,8 +118,8 @@ #define CONFIG_SYS_NAND_PAGE_2K #define CONFIG_SYS_NAND_CS 3 #define CONFIG_SYS_NAND_BASE DAVINCI_ASYNC_EMIF_DATA_CE3_BASE -#define CONFIG_SYS_CLE_MASK0x10 -#define CONFIG_SYS_ALE_MASK0x8 +#define CONFIG_SYS_NAND_MASK_CLE 0x10 +#define CONFIG_SYS_NAND_MASK_ALE 0x8 #undef CONFIG_SYS_NAND_HW_ECC #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */ diff --git a/include/configs/tnetv107x_evm.h b/include/configs/tnetv107x_evm.h index d6371fc..cabc06e 100644 --- a/include/configs/tnetv107x_evm.h +++ b/include/configs/tnetv107x_evm.h @@ -82,8 +82,8 @@ #define CONFIG_SYS_NAND_CS 2 #define CONFIG_SYS_NAND_USE_FLASH_BBT #define CONFIG_SYS_NAND_BASE TNETV107X_ASYNC_EMIF_DATA_CE0_BASE -#define CONFIG_SYS_CLE_MASK0x10 -#define CONFIG_SYS_ALE_MASK0x8 +#define CONFIG_SYS_NAND_MASK_CLE 0x10 +#define CONFIG_SYS_NAND_MASK_ALE 0x8 #define CONFIG_SYS_MAX_NAND_DEVICE 1 #define CONFIG_MTD_PARTITIONS #define CONFIG_CMD_MTDPARTS -- 1.7.11.7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: Add support for the SabreSD shipped with i.MX6DL
Hi Stefano, Le Fri, 19 Apr 2013 10:15:49 +0200, Stefano Babic sba...@denx.de a écrit : On 18/04/2013 19:37, Wolfgang Denk wrote: Dear Pierre Aubert, In message 1366296086-22394-1-git-send-email-p.aub...@staubli.com you wrote: The SabreSD platform is available with i.MX6Q or i.MX6DL. This patch adds the support of the i.MX6DL. The config file and the board directory are renamed to remove the reference to the MX6Q. Formal issues: - entry to MAINTAINERS file missing - there are 2 checkpatch warnings (please, no spaces at the start of a line) that need to be fixed. int checkboard(void) { - puts(Board: MX6Q-SabreSD\n); - +#ifdef CONFIG_MX6Q +puts(Board: MX6Q-SabreSD\n); +#else +puts(Board: MX6DL-SabreSD\n); +#endif Can we please avoid such #ifdef's? Here, we could for example refer to the board name (CONFIG_SYS_BOARD if you like the name, or some custom defined CONFIG_BOARD_NAME like other boards do). And who does set CONFIG_MX6Q ? You drop it, but I do not see who sets it. that's done in boards.cfg : +++ b/boards.cfg +mx6qsabreautoarm armv7 mx6qsabreauto freescale mx6 mx6qsabreauto:IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx28evk: add trimffs to nand command
Hi Fabio, Le Tue, 9 Apr 2013 15:02:44 -0300, Fabio Estevam fabio.este...@freescale.com a écrit : Eric Bénard wrote: this is usefull when writing an UBI image which contains and UBIFS volume (check README.nand and UBI FAQ for more details) Signed-off-by: Eric Bénard e...@eukrea.com --- include/configs/mx28evk.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index d470b47..b22a20b 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -63,6 +63,7 @@ #define CONFIG_CMD_USB #define CONFIG_CMD_BOOTZ #define CONFIG_CMD_NAND +#define CONFIG_CMD_NAND_TRIMFFS You should add this into mx28evk_nand.h, available in u-boot.imx tree. that's the second time you ask this but mx28evk_nand.h doesn't exist, even in u-boot-imx tree, and you are the developer who added nand support to mx28evk in commit ab461be65dbfe3e2fa45f7cd836faa99663be5bb ;-) Here is a reminder of what you did in that commit : you added the mx28evk_nand option in boards.cfg which defines ENV_IS_IN_NAND when mx28evk defines ENV_IS_IN_MMC and both are using the same config which is include/configs/mx28evk.h : http://git.denx.de/?p=u-boot/u-boot-imx.git;a=commitdiff;h=ab461be65dbfe3e2fa45f7cd836faa99663be5bb So this patch is fine against u-boot-imx. Best regards Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] mx28evk: add NAND commands
the mx28evk has a socket which can contains a TSOP48 NAND flash. So enable the nand command and it's trimffs option. Tested on MX28EVK with NAND : NAND: 128 MiB MX28EVK U-Boot nand info Device 0: nand0, sector size 16 KiB Page size 2048 b OOB size 64 b Erase size16384 b and without NAND : NAND: No NAND device found!!! 0 MiB MX28EVK U-Boot nand info MX28EVK U-Boot Signed-off-by: Eric Bénard e...@eukrea.com --- include/configs/mx28evk.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 0d918a1..789d980 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -69,6 +69,8 @@ #define CONFIG_CMD_USB #define CONFIG_CMD_BOOTZ #define CONFIG_CMD_I2C +#define CONFIG_CMD_NAND +#define CONFIG_CMD_NAND_TRIMFFS /* * Memory configurations -- 1.7.11.7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx28evk: add NAND commands
Hi Fabio, Le Mon, 8 Apr 2013 10:24:45 -0300, Fabio Estevam feste...@gmail.com a écrit : On Mon, Apr 8, 2013 at 10:20 AM, Eric Bénard e...@eukrea.com wrote: diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 0d918a1..789d980 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -69,6 +69,8 @@ #define CONFIG_CMD_USB #define CONFIG_CMD_BOOTZ #define CONFIG_CMD_I2C +#define CONFIG_CMD_NAND Please check include/configs/mx28evk_nand.h in u-boot.imx. It has this define already. OK I was on master :-( Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx28evk: add NAND commands
Hi Tom, Le Mon, 8 Apr 2013 09:27:29 -0400, Tom Rini tr...@ti.com a écrit : On Mon, Apr 08, 2013 at 10:24:45AM -0300, Fabio Estevam wrote: Hi Eric, On Mon, Apr 8, 2013 at 10:20 AM, Eric B??nard e...@eukrea.com wrote: diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 0d918a1..789d980 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -69,6 +69,8 @@ #define CONFIG_CMD_USB #define CONFIG_CMD_BOOTZ #define CONFIG_CMD_I2C +#define CONFIG_CMD_NAND Please check include/configs/mx28evk_nand.h in u-boot.imx. It has this define already. +#define CONFIG_CMD_NAND_TRIMFFS Then you could add this command there, if you like. And check for UBI related things being on too. that's what I'm actually testing ;-) Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] mx28evk: add trimffs to nand command
this is usefull when writing an UBI image which contains and UBIFS volume (check README.nand and UBI FAQ for more details) Signed-off-by: Eric Bénard e...@eukrea.com --- include/configs/mx28evk.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index d470b47..b22a20b 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -63,6 +63,7 @@ #define CONFIG_CMD_USB #define CONFIG_CMD_BOOTZ #define CONFIG_CMD_NAND +#define CONFIG_CMD_NAND_TRIMFFS /* Memory configurations */ #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */ -- 1.7.11.7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] mtd: nand: mxc_nand: Fix is_16bit_nand()
Hi Fabio, Le Tue, 26 Feb 2013 15:35:20 -0300, Fabio Estevam fabio.este...@freescale.com a écrit : Currently is_16bit_nand() is a per SoC function and it decides the bus nand width by reading some boot related registers. This method works when NAND is the boot medium, but does not work if another boot medium is used. For example: booting from a SD card and then using NAND to store the environment variables, would lead to the following error: NAND bus width 16 instead 8 bit No NAND device found!!! 0 MiB Use CONFIG_SYS_NAND_BUSWIDTH_16BIT symbol to decide the bus width. If it is defined in the board file, then consider 16-bit NAND bus-width, otherwise assume 8-bit NAND is used. This also aligns with Documentation/devicetree/bindings/mtd/nand.txt, which states: nand-bus-width : 8 or 16 bus width if not present 82 are you sure that your patch won't break current boards booting on nand flash (and so which can use the current functions to detect the nand width) ? Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] mtd: nand: mxc_nand: Fix is_16bit_nand()
Hi Benoît, Le Wed, 27 Feb 2013 13:53:10 +0100 (CET), Benoît Thébaudeau benoit.thebaud...@advansee.com a écrit : This code is not used for NAND boot, for which the SPL version of this driver and CONFIG_SYS_NAND_BUSWIDTH_16 are used. I didn't follow SPL migration (I have to come back to it so the next question may be stupid sorry in advance) but once u-boot is running isn't it using the standard driver and no more the SPL one ? Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] mtd: nand: mxc_nand: Fix is_16bit_nand()
Hi Benoît and Fabio, Le Wed, 27 Feb 2013 14:40:51 +0100 (CET), Benoît Thébaudeau benoit.thebaud...@advansee.com a écrit : On Wednesday, February 27, 2013 2:15:21 PM, Eric Bénard wrote: Hi Benoît, Le Wed, 27 Feb 2013 13:53:10 +0100 (CET), Benoît Thébaudeau benoit.thebaud...@advansee.com a écrit : This code is not used for NAND boot, for which the SPL version of this driver and CONFIG_SYS_NAND_BUSWIDTH_16 are used. I didn't follow SPL migration (I have to come back to it so the next question may be stupid sorry in advance) but once u-boot is running isn't it using the standard driver and no more the SPL one ? Yes, that's correct (unless you need to access NAND only from SPL). But if any board booting from NAND had a 16-bit NAND, CONFIG_SYS_NAND_BUSWIDTH_16 would have to be defined, which no board does, so none of these boards needs CONFIG_SYS_NAND_BUSWIDTH_16BIT either. And the rest of the explanation is what Fabio has just said. thanks to both of you for the details. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] how to configure u-boot to tell me more about NAND flash?
Hi Robert, Le Tue, 05 Feb 2013 08:37:20 -0500, Robert P. J. Day rpj...@crashcourse.ca a écrit : main question -- should flinfo not tell me about my flash? what might this configuration be missing? i should have access to the board in an hour or two. thanks. you can read : doc/README.nand which contains quite a lot of details on how the nand flash are handled in u-boot and how to use the nand commands. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] how to create patches for mailing
Hi Maxim, Le Thu, 24 Jan 2013 12:21:30 +0400, Maxim Podbereznyy lisar...@gmail.com a écrit : Your instructions are exceptional! However I have a few questions: 1) why should I generate patches for 1st 3 patch, because I have only one? 2) if there are 3 patches (only 1 is mine) + a cover which exactly required-patches should I send? you have more details here : http://www.denx.de/wiki/U-Boot/Patches Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] m28evk/mx28evk: fix nand_update_full
Hi Scott, Le Mon, 10 Dec 2012 16:59:23 -0600, Scott Wood scottw...@freescale.com a écrit : On 12/10/2012 10:41:59 AM, Eric Bénard wrote: - commit 418396e212b59bf907dbccad997ff50f7eb61b16 chenged the behaviour of nand write.raw which now takes a pagecount as a parameter and no more the size to be written so update the default environment of these boards to fix the problem. It never really took the size to be written -- the size was implicitly one page before. It looks like there may have been a bug in the old code, where common code expected a size to be there anyway, even though it was ignored other than for error checking. true, before the size was forced to one page : rwsize = nand-writesize + nand-oobsize; now it's rwsize = pagecount * (nand-writesize + nand-oobsize); so the size parameter in this script was ignored and now leads to a wrong rwsize calculation. Do you want me to rephrase the commit log or will you take it as is ? Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] m28evk/mx28evk: fix nand_update_full
- since commit 418396e212b59bf907dbccad997ff50f7eb61b16 nand write.raw can take the number of page to be written as an argument. nand_update_full is passing the size (in bytes) to nand write.raw. This value was previously ignored but now breaks the write. - this patch updates the default environment of these boards to provide a pagecount instead of a size to nand write.raw. - tested on a mx28evk with a 4k page NAND and on a custom board with a 2k page NAND. Signed-off-by: Eric Bénard e...@eukrea.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este...@freescale.com --- include/configs/m28evk.h |2 +- include/configs/mx28evk.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index b49ec8c..3f37e84 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -297,7 +297,7 @@ if tftp ${update_nand_full_filename} ; then \ run update_nand_get_fcb_size ;\ nand scrub -y 0x0 ${filesize} ; \ - nand write.raw ${loadaddr} 0x0 ${update_nand_fcb} ; \ + nand write.raw ${loadaddr} 0x0 ${fcb_sz} ;\ setexpr update_off ${loadaddr} + ${update_nand_fcb} ; \ setexpr update_sz ${filesize} - ${update_nand_fcb} ; \ nand write ${update_off} ${update_nand_fcb} ${update_sz} ; \ diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 0511cd1..d474a92 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -264,7 +264,7 @@ if tftp ${update_nand_full_filename} ; then \ run update_nand_get_fcb_size ; \ nand scrub -y 0x0 ${filesize} ; \ - nand write.raw ${loadaddr} 0x0 ${update_nand_fcb} ; \ + nand write.raw ${loadaddr} 0x0 ${fcb_sz} ; \ setexpr update_off ${loadaddr} + ${update_nand_fcb} ; \ setexpr update_sz ${filesize} - ${update_nand_fcb} ; \ nand write ${update_off} ${update_nand_fcb} ${update_sz} ; \ -- 1.7.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] m28evk/mx28evk: fix nand_update_full
- commit 418396e212b59bf907dbccad997ff50f7eb61b16 chenged the behaviour of nand write.raw which now takes a pagecount as a parameter and no more the size to be written so update the default environment of these boards to fix the problem. - tested on a mx28evk with a 4k page NAND and on a custom board with a 2k page NAND. Signed-off-by: Eric Bénard e...@eukrea.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este...@freescale.com --- include/configs/m28evk.h |2 +- include/configs/mx28evk.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index b49ec8c..3f37e84 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -297,7 +297,7 @@ if tftp ${update_nand_full_filename} ; then \ run update_nand_get_fcb_size ;\ nand scrub -y 0x0 ${filesize} ; \ - nand write.raw ${loadaddr} 0x0 ${update_nand_fcb} ; \ + nand write.raw ${loadaddr} 0x0 ${fcb_sz} ;\ setexpr update_off ${loadaddr} + ${update_nand_fcb} ; \ setexpr update_sz ${filesize} - ${update_nand_fcb} ; \ nand write ${update_off} ${update_nand_fcb} ${update_sz} ; \ diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 0511cd1..d474a92 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -264,7 +264,7 @@ if tftp ${update_nand_full_filename} ; then \ run update_nand_get_fcb_size ; \ nand scrub -y 0x0 ${filesize} ; \ - nand write.raw ${loadaddr} 0x0 ${update_nand_fcb} ; \ + nand write.raw ${loadaddr} 0x0 ${fcb_sz} ; \ setexpr update_off ${loadaddr} + ${update_nand_fcb} ; \ setexpr update_sz ${filesize} - ${update_nand_fcb} ; \ nand write ${update_off} ${update_nand_fcb} ${update_sz} ; \ -- 1.7.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] mx25: add CPU revision 1.2
tested on a MCIMX257CJM4A which now reports : CPU: Freescale i.MX25 rev1.2 at 399 MHz Signed-off-by: Eric Bénard e...@eukrea.com Acked-by: Otavio Salvador ota...@ossystems.com.br --- v2 : rebased against 2012.10-rc1, added Otavio's ack arch/arm/cpu/arm926ejs/mx25/generic.c |3 +++ arch/arm/include/asm/arch-mx25/imx-regs.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c index a5c15ce..3b7f327 100644 --- a/arch/arm/cpu/arm926ejs/mx25/generic.c +++ b/arch/arm/cpu/arm926ejs/mx25/generic.c @@ -140,6 +140,9 @@ u32 get_cpu_rev(void) case 0x01: system_rev |= CHIP_REV_1_1; break; + case 0x02: + system_rev |= CHIP_REV_1_2; + break; default: system_rev |= 0x8000; break; diff --git a/arch/arm/include/asm/arch-mx25/imx-regs.h b/arch/arm/include/asm/arch-mx25/imx-regs.h index 672f9d7..e780296 100644 --- a/arch/arm/include/asm/arch-mx25/imx-regs.h +++ b/arch/arm/include/asm/arch-mx25/imx-regs.h @@ -357,5 +357,6 @@ struct aips_regs { #define CHIP_REV_1_0 0x10 #define CHIP_REV_1_1 0x11 +#define CHIP_REV_1_2 0x12 #endif /* _IMX_REGS_H */ -- 1.7.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/2] mx25: add CPU revision 1.2
tested on a MCIMX257CJM4A which now reports : CPU: Freescale i.MX25 rev1.2 at 399 MHz Signed-off-by: Eric Bénard e...@eukrea.com Acked-by: Otavio Salvador ota...@ossystems.com.br --- v2 : rebased against 2012.10-rc1, added Otavio's ack arch/arm/cpu/arm926ejs/mx25/generic.c |3 +++ arch/arm/include/asm/arch-mx25/imx-regs.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c index a5c15ce..3b7f327 100644 --- a/arch/arm/cpu/arm926ejs/mx25/generic.c +++ b/arch/arm/cpu/arm926ejs/mx25/generic.c @@ -140,6 +140,9 @@ u32 get_cpu_rev(void) case 0x01: system_rev |= CHIP_REV_1_1; break; + case 0x02: + system_rev |= CHIP_REV_1_2; + break; default: system_rev |= 0x8000; break; diff --git a/arch/arm/include/asm/arch-mx25/imx-regs.h b/arch/arm/include/asm/arch-mx25/imx-regs.h index 672f9d7..e780296 100644 --- a/arch/arm/include/asm/arch-mx25/imx-regs.h +++ b/arch/arm/include/asm/arch-mx25/imx-regs.h @@ -357,5 +357,6 @@ struct aips_regs { #define CHIP_REV_1_0 0x10 #define CHIP_REV_1_1 0x11 +#define CHIP_REV_1_2 0x12 #endif /* _IMX_REGS_H */ -- 1.7.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/2] add Eukrea's CPUIMX25
this board is based on an i.MX25 from Freescale. It consists of a SOM containing : - NAND flash (internal or external boot supported and tested) - mDDR (64MB tested) - ethernet PHY connected in RMII mode (tested) and a baseboard containing : - a serial transceiver on UART1 (tested) - a SDCard connector on eSDHC1 (tested but disabled until Benoît's fix gets applied) bootlog : U-Boot 2012.10-rc1-3-gdd12be5 (Sep 23 2012 - 13:53:21) CPU: Freescale i.MX25 rev1.2 at 399 MHz Reset cause: POR DRAM: 64 MiB NAND: 256 MiB MMC: In:serial Out: serial Err: serial Net: FEC Hit any key to stop autoboot: 0 Signed-off-by: Eric Bénard e...@eukrea.com --- v2: rebased against 2012.10-rc1, disabled eSDHC until proper fix from Benoît gets applied, updated bootlog. MAINTAINERS |2 + board/eukrea/cpuimx25/Makefile| 44 +++ board/eukrea/cpuimx25/config.mk |5 + board/eukrea/cpuimx25/cpuimx25.c | 123 ++ board/eukrea/cpuimx25/imximage.cfg| 55 board/eukrea/cpuimx25/lowlevel_init.S | 113 boards.cfg|2 + include/configs/cpuimx25.h| 198 + nand_spl/board/eukrea/cpuimx25/Makefile | 79 nand_spl/board/eukrea/cpuimx25/config.mk |1 + nand_spl/board/eukrea/cpuimx25/u-boot.lds | 83 11 files changed, 705 insertions(+), 0 deletions(-) create mode 100644 board/eukrea/cpuimx25/Makefile create mode 100644 board/eukrea/cpuimx25/config.mk create mode 100644 board/eukrea/cpuimx25/cpuimx25.c create mode 100644 board/eukrea/cpuimx25/imximage.cfg create mode 100644 board/eukrea/cpuimx25/lowlevel_init.S create mode 100644 include/configs/cpuimx25.h create mode 100644 nand_spl/board/eukrea/cpuimx25/Makefile create mode 100644 nand_spl/board/eukrea/cpuimx25/config.mk create mode 100644 nand_spl/board/eukrea/cpuimx25/u-boot.lds diff --git a/MAINTAINERS b/MAINTAINERS index aa54fe1..94e759f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -606,6 +606,8 @@ Eric Benard e...@eukrea.com cpuat91 ARM920T cpu9260 ARM926EJS (AT91SAM9260 SoC) cpu9G20 ARM926EJS (AT91SAM9G20 SoC) + cpuimx25i.MX25 + cpuimx25nandi.MX25 Ajay Bhargav ajay.bhar...@einfochips.com diff --git a/board/eukrea/cpuimx25/Makefile b/board/eukrea/cpuimx25/Makefile new file mode 100644 index 000..46131fd --- /dev/null +++ b/board/eukrea/cpuimx25/Makefile @@ -0,0 +1,44 @@ +# +# (C) Copyright 2009 DENX Software Engineering +# Author: John Rigby jcri...@gmail.com +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := cpuimx25.o +SOBJS := lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +# + +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/eukrea/cpuimx25/config.mk b/board/eukrea/cpuimx25/config.mk new file mode 100644 index 000..18b2883 --- /dev/null +++ b/board/eukrea/cpuimx25/config.mk @@ -0,0 +1,5 @@ +ifdef CONFIG_NAND_SPL +CONFIG_SYS_TEXT_BASE = 0x810c +else +CONFIG_SYS_TEXT_BASE = 0x8120 +endif diff --git a/board/eukrea/cpuimx25/cpuimx25.c b/board/eukrea/cpuimx25/cpuimx25.c new file mode 100644 index 000..72fa8a5 --- /dev/null +++ b/board/eukrea/cpuimx25/cpuimx25.c @@ -0,0 +1,123 @@ +/* + * (C) Copyright 2009 DENX Software Engineering + * (C) Copyright 2012 Eukrea Electromatique www.eukrea.com + * Eric Benard e...@eukrea.com + * + * Based on tx25.c: + * Author: John Rigby jri...@gmail.com + * + * Based on imx27lite.c: + * Copyright (C) 2008,2009 Eric Jarrige jora...@users.sourceforge.net + * Copyright (C) 2009 Ilya Yanok ya...@emcraft.com + * And: + * RedBoot tx25_misc.c Copyright (C) 2009 Red Hat + * + * This program is free software; you can
Re: [U-Boot] [PATCH 1/2] mx25: add CPU revision 1.2
Hi, Le Sun, 23 Sep 2012 14:02:17 +0200, Eric Bénard e...@eukrea.com a écrit : tested on a MCIMX257CJM4A which now reports : CPU: Freescale i.MX25 rev1.2 at 399 MHz Signed-off-by: Eric Bénard e...@eukrea.com Acked-by: Otavio Salvador ota...@ossystems.com.br --- v2 : rebased against 2012.10-rc1, added Otavio's ack sorry for the noise, this one was missing the v2 in the subject and I git Ctrl-C to late :-( Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] add Eukrea's CPUIMX25
Hi Vikram, Le Sun, 23 Sep 2012 23:02:18 +0530, Vikram Narayanan vikram...@gmail.com a écrit : Why the clock init is in two places? imximage.cfg and this file. Am I missing something? imximage.cfg for internal boot, lowlevel_init.S for external boot. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [NEXT PATCH v1 4/7] MX35: Add soc_boot_mode and soc_boot_device to MX35
Hi Stefano, Le Thu, 6 Sep 2012 10:04:57 +0200, Stefano Babic sba...@denx.de a écrit : +#define RCSR_MEM_CTL_WEIM0 +#define RCSR_MEM_CTL_NAND1 +#define RCSR_MEM_CTL_SD 2 +#define RCSR_MEM_TYPE_NOR0 +#define RCSR_MEM_TYPE_ONENAND2 +#define RCSR_MEM_TYPE_SD 0 +#define RCSR_MEM_TYPE_I2C2 +#define RCSR_MEM_TYPE_SPI3 + +u32 spl_boot_device(void) +{ + puts(spl_boot_device\n); + struct ccm_regs *ccm = + (struct ccm_regs *)IMX_CCM_BASE; + +#if 1 + return BOOT_DEVICE_MMC1; +#endif thisseems not clean and seems caused by the fact that the define RCSR_MEM_CTL_SD should be 3 and not 2 so in your tests the function spl_boot_device was not detecting the right boot mode. Also IMHO this define should be named RCSR_MEM_CTL_EXPANSION as in the app note AN3996 at end of page 3 (there is a typo in the reference manual which seems to be a copy'n paste from i.MX25 as it doesn't take in acount the ATA HDD case) : http://cache.freescale.com/files/dsp/doc/app_note/AN3996.pdf + + u32 rcsr = readl(ccm-rcsr); + u32 mem_type, mem_ctl; + + /* In external mode, no boot device is returned */ + if ((rcsr 10) 0x03) + return BOOT_DEVICE_NONE; + + mem_ctl = (rcsr 25) 0x03; + mem_type = (rcsr 23) 0x03; + + switch (mem_ctl) { + case RCSR_MEM_CTL_WEIM: + switch (mem_type) { + case RCSR_MEM_TYPE_NOR: + return BOOT_DEVICE_NOR; + case RCSR_MEM_TYPE_ONENAND: + return BOOT_DEVICE_ONE_NAND; + default: + return BOOT_DEVICE_NONE; + } + case RCSR_MEM_CTL_NAND: + return BOOT_DEVICE_NAND; + case RCSR_MEM_CTL_SD: + switch (mem_type) { + case RCSR_MEM_TYPE_SD: + return BOOT_DEVICE_MMC1; + case RCSR_MEM_TYPE_I2C: + return BOOT_DEVICE_I2C; + case RCSR_MEM_TYPE_SPI: + return BOOT_DEVICE_SPI; + default: + return BOOT_DEVICE_NONE; + } + } + + return BOOT_DEVICE_NONE; +} + Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] add Eukrea's CPUIMX25
Hi Stefano, Le Sun, 23 Sep 2012 19:46:50 +0200, Stefano Babic sba...@denx.de a écrit : nand_spl/board/eukrea/cpuimx25/Makefile | 79 nand_spl/board/eukrea/cpuimx25/config.mk |1 + nand_spl/board/eukrea/cpuimx25/u-boot.lds | 83 There is a main issue with these patches. According to some discussion in previous threads and hopefully I do not misinterprete Wolfgang's will about the direction that U-Boot will have in future, the nand_spl code is obsolete and it remains for the already supported boards. However, new boards must implement SPL using the SPL framework. New boards using nand_spl will not be integrated in mainline. else that would have been to easy ;-) OK I'll look at this SPL framework based on your serie introducing woorburn board, Thanks ! Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [NEXT PATCH v1 2/7] NAND: added NAND type to nand_ids
Hi Stefano, Le Mon, 10 Sep 2012 14:09:21 +0200, Stefano Babic sba...@denx.de a écrit : The chip supports ONFI, but it seems the i.MX driver does not. Quite as described in http://patchwork.ozlabs.org/patch/60042/. READ-ID is always sent with address 0, I do not know if we can convince the driver to send the address. to add ONFI support to i.MX's driver, you can check this patch (in barebox, a similar patch for Linux is cooking, actually tested on i.MX53 and i.MX25) : http://git.pengutronix.de/?p=barebox.git;a=commit;h=632c45795065e6a7471ab82be38e808eb6204341 Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] mx25: add CPU revision 1.2
tested on a MCIMX257CJM4A which now reports : CPU: Freescale i.MX25 rev1.2 at 399 MHz Signed-off-by: Eric Bénard e...@eukrea.com --- arch/arm/cpu/arm926ejs/mx25/generic.c |3 +++ arch/arm/include/asm/arch-mx25/imx-regs.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c index 8b07dae..cb74b82 100644 --- a/arch/arm/cpu/arm926ejs/mx25/generic.c +++ b/arch/arm/cpu/arm926ejs/mx25/generic.c @@ -140,6 +140,9 @@ u32 get_cpu_rev(void) case 0x01: system_rev |= CHIP_REV_1_1; break; + case 0x02: + system_rev |= CHIP_REV_1_2; + break; default: system_rev |= 0x8000; break; diff --git a/arch/arm/include/asm/arch-mx25/imx-regs.h b/arch/arm/include/asm/arch-mx25/imx-regs.h index cf925d7..35a2fb6 100644 --- a/arch/arm/include/asm/arch-mx25/imx-regs.h +++ b/arch/arm/include/asm/arch-mx25/imx-regs.h @@ -355,5 +355,6 @@ struct aips_regs { #define CHIP_REV_1_0 0x10 #define CHIP_REV_1_1 0x11 +#define CHIP_REV_1_2 0x12 #endif /* _IMX_REGS_H */ -- 1.7.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] mx25: fix compilation when CONFIG_FSL_ESDHC is enabled
else we get : generic.c: In function 'get_clocks': generic.c:210: error: 'MXC_ESDHC_CLK' undeclared (first use in this function) please note this fix is a hack similar to the one used in arch/arm/cpu/arm1136/mx35/generic.c and will pevent the usage of eSDHC2 (as done on i/MX35). Signed-off-by: Eric Bénard e...@eukrea.com --- arch/arm/cpu/arm926ejs/mx25/generic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c index cb74b82..6a3a8b3 100644 --- a/arch/arm/cpu/arm926ejs/mx25/generic.c +++ b/arch/arm/cpu/arm926ejs/mx25/generic.c @@ -207,7 +207,7 @@ int cpu_eth_init(bd_t *bis) int get_clocks(void) { #ifdef CONFIG_FSL_ESDHC - gd-sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); + gd-sdhc_clk = mxc_get_clock(MXC_ESDHC1_CLK); #endif return 0; } -- 1.7.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] add Eukrea's CPUIMX25
this board is based on an i.MX25 from Freescale. It consists of a SOM containing : - NAND flash (internal or external boot supported and tested) - mDDR (64MB tested) - ethernet PHY connected in RMII mode (tested) and a baseboard containing : - a serial transceiver on UART1 (tested) - a SDCard connector on eSDHC1 (tested) bootlog : U-Boot 2012.07-rc1-00029-gca2becc-dirty (Sep 22 2012 - 22:28:35) CPU: Freescale i.MX25 rev1.2 at 399 MHz Reset cause: POR DRAM: 64 MiB WARNING: Caches not enabled NAND: 256 MiB MMC: FSL_SDHC: 0 *** Warning - bad CRC, using default environment In:serial Out: serial Err: serial Net: FEC Hit any key to stop autoboot: 0 CPUIMX25 U-Boot mmc rescan CPUIMX25 U-Boot mmc part Partition Map for MMC device 0 -- Partition Type: DOS Partition Start Sector Num Sectors Type 1 2048 262144 b Signed-off-by: Eric Bénard e...@eukrea.com --- MAINTAINERS |2 + board/eukrea/cpuimx25/Makefile| 44 +++ board/eukrea/cpuimx25/config.mk |5 + board/eukrea/cpuimx25/cpuimx25.c | 123 ++ board/eukrea/cpuimx25/imximage.cfg| 55 board/eukrea/cpuimx25/lowlevel_init.S | 113 + boards.cfg|2 + include/configs/cpuimx25.h| 196 + nand_spl/board/eukrea/cpuimx25/Makefile | 79 nand_spl/board/eukrea/cpuimx25/config.mk |1 + nand_spl/board/eukrea/cpuimx25/u-boot.lds | 83 11 files changed, 703 insertions(+), 0 deletions(-) create mode 100644 board/eukrea/cpuimx25/Makefile create mode 100644 board/eukrea/cpuimx25/config.mk create mode 100644 board/eukrea/cpuimx25/cpuimx25.c create mode 100644 board/eukrea/cpuimx25/imximage.cfg create mode 100644 board/eukrea/cpuimx25/lowlevel_init.S create mode 100644 include/configs/cpuimx25.h create mode 100644 nand_spl/board/eukrea/cpuimx25/Makefile create mode 100644 nand_spl/board/eukrea/cpuimx25/config.mk create mode 100644 nand_spl/board/eukrea/cpuimx25/u-boot.lds diff --git a/MAINTAINERS b/MAINTAINERS index fd0c65c..25a58ab 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -603,6 +603,8 @@ Eric Benard e...@eukrea.com cpuat91 ARM920T cpu9260 ARM926EJS (AT91SAM9260 SoC) cpu9G20 ARM926EJS (AT91SAM9G20 SoC) + cpuimx25i.MX25 + cpuimx25nandi.MX25 Ajay Bhargav ajay.bhar...@einfochips.com diff --git a/board/eukrea/cpuimx25/Makefile b/board/eukrea/cpuimx25/Makefile new file mode 100644 index 000..46131fd --- /dev/null +++ b/board/eukrea/cpuimx25/Makefile @@ -0,0 +1,44 @@ +# +# (C) Copyright 2009 DENX Software Engineering +# Author: John Rigby jcri...@gmail.com +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := cpuimx25.o +SOBJS := lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +# + +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/eukrea/cpuimx25/config.mk b/board/eukrea/cpuimx25/config.mk new file mode 100644 index 000..18b2883 --- /dev/null +++ b/board/eukrea/cpuimx25/config.mk @@ -0,0 +1,5 @@ +ifdef CONFIG_NAND_SPL +CONFIG_SYS_TEXT_BASE = 0x810c +else +CONFIG_SYS_TEXT_BASE = 0x8120 +endif diff --git a/board/eukrea/cpuimx25/cpuimx25.c b/board/eukrea/cpuimx25/cpuimx25.c new file mode 100644 index 000..72fa8a5 --- /dev/null +++ b/board/eukrea/cpuimx25/cpuimx25.c @@ -0,0 +1,123 @@ +/* + * (C) Copyright 2009 DENX Software Engineering + * (C) Copyright 2012 Eukrea Electromatique www.eukrea.com + * Eric Benard e...@eukrea.com + * + * Based on tx25.c: + * Author: John Rigby jri...@gmail.com + * + * Based on imx27lite.c: + * Copyright (C) 2008,2009 Eric Jarrige jora...@users.sourceforge.net
Re: [U-Boot] [PATCH 3/3] add Eukrea's CPUIMX25
Le Sat, 22 Sep 2012 18:18:58 -0300, Otavio Salvador ota...@ossystems.com.br a écrit : On Sat, Sep 22, 2012 at 5:50 PM, Eric Bénard e...@eukrea.com wrote: this board is based on an i.MX25 from Freescale. It consists of a SOM containing : - NAND flash (internal or external boot supported and tested) - mDDR (64MB tested) - ethernet PHY connected in RMII mode (tested) and a baseboard containing : - a serial transceiver on UART1 (tested) - a SDCard connector on eSDHC1 (tested) bootlog : U-Boot 2012.07-rc1-00029-gca2becc-dirty (Sep 22 2012 - 22:28:35) Please rebase it against 2012.10. For iMX patches please keep Stefano Babic sba...@denx.de in CC as he is the iMX custodian. that should have been the case ... but I forget one = before his mail ... git send-email --to u-boot@lists.denx.de --cc sba...@denx.de --suppress-cc=self -3 Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] add Eukrea's CPUIMX25
Hi Otavio, Le Sat, 22 Sep 2012 18:18:58 -0300, Otavio Salvador ota...@ossystems.com.br a écrit : On Sat, Sep 22, 2012 at 5:50 PM, Eric Bénard e...@eukrea.com wrote: this board is based on an i.MX25 from Freescale. It consists of a SOM containing : - NAND flash (internal or external boot supported and tested) - mDDR (64MB tested) - ethernet PHY connected in RMII mode (tested) and a baseboard containing : - a serial transceiver on UART1 (tested) - a SDCard connector on eSDHC1 (tested) bootlog : U-Boot 2012.07-rc1-00029-gca2becc-dirty (Sep 22 2012 - 22:28:35) Please rebase it against 2012.10. the patch serie can be applied cleanly (and even compiled ;-) on 2012.10-rc1 Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] da850/omap-l138: Enable auto negotiation in RMII mode
Hi Prabhakar, Le Fri, 1 Jun 2012 19:04:37 +0530, Prabhakar Lad prabhakar@ti.com a écrit : From: Rajashekhara, Sudhakar sudhakar@ti.com On DA850/OMAP-L138 it was observed that in RMII mode, auto negotiation was not performed. This patch enables auto negotiation in RMII mode. Without this patch, EMAC initialization takes more time and sometimes tftp fails in RMII mode. Signed-off-by: Rajashekhara, Sudhakar sudhakar@ti.com Signed-off-by: Lad, Prabhakar prabhakar@ti.com Signed-off-by: Hadli, Manjunath manjunath.ha...@ti.com Tested-by: Eric Bénard e...@eukrea.com on an AM1808 with a RMII PHY where tftp was nearly always failing. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] I2C support on an AT91RM9200
Hi, Le 06/10/2011 17:00, Jamie Risk a écrit : I'm creating a configuration for a board that uses an AT91RM9200 and I'm getting unresolved linker errors concerning the i2c functions (i2c_write/read/probe/init). I know that the I2C peripheral for this SoC is buggy and am looking for a GPIO bus option - does this exist in u-boot, or do I need to add one? you will find such a configuration in : http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/cpuat91.h;h=1b43c54f486bec0a27b478cc3de2ba64be8692b5;hb=HEAD around line 104 Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] beagleboard: enable HUB power on all variants of the BeagleBoard
Hi Joel, Le 27/08/2011 06:46, Joel A Fernandes a écrit : The logic is wrong here. I don't remember the polarity, but I do remember that it is xM-A and xM-B that are the oddballs. I believe this is the correct change: Hi Jason, LEDAON should be high for HUB power up on xMA and xMB, so in your code snip: + switch (get_board_revision()) { + case REVISION_XM_A: + case REVISION_XM_B: + twl4030_led_init(TWL4030_LED_LEDEN_LEDBON); So this should be TWL4030_LED_LEDEN_LEDBON | TWL4030_LED_LEDEN_LEDAON + break; + default: + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); and, this should be TWL4030_LED_LEDEN_LEDBON Am I correct? LEDA LEDB are active low Open Drain outputs so enabling LEDAON bit in LEDEN means LEDA output is at low level. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] beagleboard: enable HUB power on XM boards
Hi Jason, On 12/08/2011 23:09, Jason Kridner wrote: On Tue, Jun 14, 2011 at 10:33 AM, Eric Bénarde...@eukrea.com wrote: Hi Christian, On 14/06/2011 16:27, Christian Spielberger wrote: we have both, a beagle xM-B and a beagle xM-C. The following works on both boards and is different from your patch. It is not possible to differentiate between Rev xM-A and xM-B. Anyway, the only difference is in the processors silicon revision (ES 1.0 to ES 1.1). ... ok thanks, I'll include it with an update to the previous patch that fix a problem when loading the kernel with USB clocks enabled. Eric, Christian, Are either of you still planning to send an updated patch to get USB working on BB-xM-A/B (and not break it for=BB-C5 and=BB-xM-C)? I do have this updated patch ready on a PC at work so I should be able to send it next week Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] beagleboard: enable HUB power on XM boards
Hi Christian, On 14/06/2011 16:27, Christian Spielberger wrote: we have both, a beagle xM-B and a beagle xM-C. The following works on both boards and is different from your patch. It is not possible to differentiate between Rev xM-A and xM-B. Anyway, the only difference is in the processors silicon revision (ES 1.0 to ES 1.1). regards, chris. --- @@ -299,7 +309,15 @@ int misc_init_r(void) setenv(expansion_config.env_var, expansion_config.env_setting); twl4030_power_init(); - twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); + switch (get_board_revision()) { + case REVISION_XM_C: + case REVISION_C4: + twl4030_led_init( TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON ); + break; + default: + twl4030_led_init( TWL4030_LED_LEDEN_LEDBON ); + break; + } /* Configure GPIOs to output */ writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), gpio6_base-oe); ok thanks, I'll include it with an update to the previous patch that fix a problem when loading the kernel with USB clocks enabled. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] at91rm9200.h: fix ATMEL_PMX_AA_TXD2
On 12/06/2011 13:25, Andreas Bießmann wrote: This patch sets the ATMEL_PMX_AA_TXD2 to the correct value. Signed-off-by: Andreas Bießmannandreas.de...@googlemail.com CC: Jens Scharsigjs_at...@scharsoft.de CC: e...@eukrea.com Acked-by: Eric Bénard e...@eukrea.com Thanks ! --- changes since v1: - fix typo in commit message arch/arm/include/asm/arch-at91/at91rm9200.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/include/asm/arch-at91/at91rm9200.h b/arch/arm/include/asm/arch-at91/at91rm9200.h index ff18014..f1912e2 100644 --- a/arch/arm/include/asm/arch-at91/at91rm9200.h +++ b/arch/arm/include/asm/arch-at91/at91rm9200.h @@ -99,7 +99,7 @@ #define ATMEL_PMX_AA_EMDC 0x8000 #define ATMEL_PMX_AA_EMDIO 0x0001 -#define ATMEL_PMX_AA_TXD20x0081 +#define ATMEL_PMX_AA_TXD20x0080 #define ATMEL_PMX_AA_TWD0x0200 #define ATMEL_PMX_AA_TWCK 0x0400 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 RESEND 1/5] Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter
Hi Simon, On 10/06/2011 17:04, Simon Glass wrote: +int smsc95xx_eth_get_info(struct usb_device *dev, struct ueth_data *ss, + struct eth_device *eth) +{ + debug(** %s()\n, __func__); + if (!eth) { + debug(%s: missing parameter.\n, __func__); + return 0; + } + sprintf(eth-name, %s%d, SMSC95XX_BASE_NAME, curr_eth_dev++); + eth-init = smsc95xx_init; + eth-send = smsc95xx_send; + eth-recv = smsc95xx_recv; + eth-halt = smsc95xx_halt; as Gilles in Re: [U-Boot] TFTP support for Pandaboard (OMAP4430 Cortex-A9 Dual core), you need + eth-write_hwaddr = smsc95xx_write_hwaddr; here else setting MAC address using setenv usbethaddr doesn't work Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] dm3730: enable dpll5
which is used to provide 120MHz to USB EHCI This allows EHCI to work on BeagleBoard XM Signed-off-by: Eric Bénard e...@eukrea.com --- arch/arm/cpu/armv7/omap3/clock.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/omap3/clock.c b/arch/arm/cpu/armv7/omap3/clock.c index 3d38d08..6a9edcf 100644 --- a/arch/arm/cpu/armv7/omap3/clock.c +++ b/arch/arm/cpu/armv7/omap3/clock.c @@ -579,6 +579,7 @@ void prcm_init(void) dpll3_init_36xx(0, clk_index); dpll4_init_36xx(0, clk_index); + dpll5_init_34xx(0, clk_index); iva_init_36xx(0, clk_index); mpu_init_36xx(0, clk_index); -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] beagleboard: enable HUB power on XM boards
LEDA needs to be at level 0 to enable HUB_3V3 Signed-off-by: Eric Bénard e...@eukrea.com --- board/ti/beagle/beagle.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index ab50514..7509916 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -299,7 +299,10 @@ int misc_init_r(void) setenv(expansion_config.env_var, expansion_config.env_setting); twl4030_power_init(); - twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); + if (get_board_revision() REVISION_C4) + twl4030_led_init(TWL4030_LED_LEDEN_LEDBON); /* Enable HUB PWR */ + else + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); /* Configure GPIOs to output */ writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), gpio6_base-oe); -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 RESEND 4/5] Put common autoload code into auto_load() function
Hi Simon, On 10/06/2011 17:04, Simon Glass wrote: This is a small clean-up patch. Signed-off-by: Simon Glasss...@chromium.org --- net/bootp.c | 75 +- 1 files changed, 32 insertions(+), 43 deletions(-) diff --git a/net/bootp.c b/net/bootp.c index 4db63cb..4774624 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -138,6 +138,35 @@ static int truncate_sz (const char *name, int maxlen, int curlen) return (curlen); } +/* + * Check if autoload is enabled. If so, use either NFS or TFTP to download + * the boot file. + */ +static void auto_load(void) +{ + const char *s = getenv(autoload); + + if (s != NULL) { + if (*s == 'n') { + /* + * Just use BOOTP to configure system; + * Do not use TFTP to load the bootfile. + */ + NetState = NETLOOP_SUCCESS; + return; + } +#if defined(CONFIG_CMD_NFS) + if (strcmp(s, NFS) == 0) { + /* + * Use NFS to load the bootfile. + */ + NfsStart(); + return; + } +#endif + TftpStart(); +} a } is missing here Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 RESEND 0/5] Add SMSC95XX support including MAC address control
Hi Simon, On 10/06/2011 17:04, Simon Glass wrote: Simon Glass (5): Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter Add Ethernet hardware MAC address framework to usbnet Add documentation for USB Host Networking Put common autoload code into auto_load() function for the 4 first patches, with the 2 comments I sent concerning patches 1 and 4 : Tested-by: Eric Bénard e...@eukrea.com Thanks, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 RESEND 1/5] Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter
On 11/06/2011 00:26, Simon Glass wrote: OK thanks have added Gilles' patch and will resend the series on Monday with any comments received. If this can get applied then perhaps we can more easily handle other patches that come up. This driver is by no means perfect but it is a start. a very good start as it simply works ;-) Thanks ! Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Atmel pull request?
Hi, On 09/06/2011 09:06, Wolfgang Denk wrote: what are the chances to see a pull request for the Atmel boards any time soon? As is, theyu still form the majority of broken ARM boards, and I would like to get the release out as soon as possible. So I'd appreciate if we could have your pull request ASAP, then I could make a -rc3 and allow for a few days of testing, before releasing v2011.06. here are pending patches to unbreak several AT91 boards : http://patchwork.ozlabs.org/patch/99096/ http://patchwork.ozlabs.org/patch/99097/ http://patchwork.ozlabs.org/patch/99099/ http://patchwork.ozlabs.org/patch/99098/ http://patchwork.ozlabs.org/patch/99400/ And the clock update for AT91RM9200 : http://patchwork.ozlabs.org/patch/99344/ http://patchwork.ozlabs.org/patch/99550/ Thanks, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/4] include/asm/arch-at91: update several .h files to ATMEL_xxx name scheme
Hi Reinhard, On 09/06/2011 10:17, Reinhard Meyer wrote: Several lines are longer than 80 chars. Can you fix this asap? I think the comments could be left away completely or at least shortened by removing the obvios SDAM Controller part. These lines are already over 80 char before this patch which only fix the define names : please apply this patch as is. In today's u-boot, linux's checkpatch.pl finds 483 over 80 in arch/arm/include/asm/arch-at91/ so I don't think this patch creates more trouble here. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/5] cpuat91: fix board support
Signed-off-by: Eric Bénard e...@eukrea.com --- MAKEALL|1 - board/eukrea/cpuat91/cpuat91.c |6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/MAKEALL b/MAKEALL index 13dde6f..50c0080 100755 --- a/MAKEALL +++ b/MAKEALL @@ -454,7 +454,6 @@ LIST_at91=$(boards_by_soc at91)\ at91sam9g20ek \ at91sam9m10g45ek\ at91sam9rlek\ - CPUAT91 \ pm9g45 \ SBC35_A9G20 \ TNY_A9260 \ diff --git a/board/eukrea/cpuat91/cpuat91.c b/board/eukrea/cpuat91/cpuat91.c index 4c4dad6..fa4b25b 100644 --- a/board/eukrea/cpuat91/cpuat91.c +++ b/board/eukrea/cpuat91/cpuat91.c @@ -63,7 +63,7 @@ int dram_init(void) #ifdef CONFIG_DRIVER_AT91EMAC int board_eth_init(bd_t *bis) { - return at91emac_register(bis, (u32) AT91_EMAC_BASE); + return at91emac_register(bis, (u32) ATMEL_BASE_EMAC); } #endif @@ -71,8 +71,8 @@ int board_eth_init(bd_t *bis) void i2c_init_board(void) { u32 pin; - at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE; - at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE; + at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC; + at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO; writel(1 AT91_ID_PIOA, pmc-pcer); pin = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK; -- 1.7.4.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/5] include/asm/arch-at91: update several .h files to ATMEL_xxx name scheme
Signed-off-by: Eric Bénard e...@eukrea.com --- arch/arm/include/asm/arch-at91/at91_matrix.h | 10 +++--- arch/arm/include/asm/arch-at91/at91_rstc.h |2 +- arch/arm/include/asm/arch-at91/at91_wdt.h|2 +- arch/arm/include/asm/arch-at91/at91sam9_sdramc.h | 30 +++--- arch/arm/include/asm/arch-at91/at91sam9_smc.h| 12 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/arch/arm/include/asm/arch-at91/at91_matrix.h b/arch/arm/include/asm/arch-at91/at91_matrix.h index f99b1d4..a9ba9e9 100644 --- a/arch/arm/include/asm/arch-at91/at91_matrix.h +++ b/arch/arm/include/asm/arch-at91/at91_matrix.h @@ -26,18 +26,18 @@ #ifdef __ASSEMBLY__ #if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20) -#define AT91_ASM_MATRIX_CSA0 (AT91_MATRIX_BASE + 0x11C) +#define AT91_ASM_MATRIX_CSA0 (ATMEL_BASE_MATRIX + 0x11C) #elif defined(CONFIG_AT91SAM9261) -#define AT91_ASM_MATRIX_CSA0 (AT91_MATRIX_BASE + 0x30) +#define AT91_ASM_MATRIX_CSA0 (ATMEL_BASE_MATRIX + 0x30) #elif defined(CONFIG_AT91SAM9263) -#define AT91_ASM_MATRIX_CSA0 (AT91_MATRIX_BASE + 0x120) +#define AT91_ASM_MATRIX_CSA0 (ATMEL_BASE_MATRIX + 0x120) #elif defined(CONFIG_AT91SAM9G45) -#define AT91_ASM_MATRIX_CSA0 (AT91_MATRIX_BASE + 0x128) +#define AT91_ASM_MATRIX_CSA0 (ATMEL_BASE_MATRIX + 0x128) #else #error AT91_ASM_MATRIX_CSA0 is not definied for current CPU #endif -#define AT91_ASM_MATRIX_MCFG AT91_MATRIX_BASE +#define AT91_ASM_MATRIX_MCFG ATMEL_BASE_MATRIX #else #if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20) diff --git a/arch/arm/include/asm/arch-at91/at91_rstc.h b/arch/arm/include/asm/arch-at91/at91_rstc.h index 510eed5..15ffd18 100644 --- a/arch/arm/include/asm/arch-at91/at91_rstc.h +++ b/arch/arm/include/asm/arch-at91/at91_rstc.h @@ -16,7 +16,7 @@ #ifndef AT91_RSTC_H #define AT91_RSTC_H -#define AT91_ASM_RSTC_MR (AT91_RSTC_BASE + 0x08) +#define AT91_ASM_RSTC_MR (ATMEL_BASE_RSTC + 0x08) #ifndef __ASSEMBLY__ diff --git a/arch/arm/include/asm/arch-at91/at91_wdt.h b/arch/arm/include/asm/arch-at91/at91_wdt.h index cf08daf..dc22ea1 100644 --- a/arch/arm/include/asm/arch-at91/at91_wdt.h +++ b/arch/arm/include/asm/arch-at91/at91_wdt.h @@ -19,7 +19,7 @@ #ifdef __ASSEMBLY__ -#define AT91_ASM_WDT_MR(AT91_WDT_BASE + 0x04) +#define AT91_ASM_WDT_MR(ATMEL_BASE_WDT + 0x04) #else diff --git a/arch/arm/include/asm/arch-at91/at91sam9_sdramc.h b/arch/arm/include/asm/arch-at91/at91sam9_sdramc.h index c3da3a6..54159a7 100644 --- a/arch/arm/include/asm/arch-at91/at91sam9_sdramc.h +++ b/arch/arm/include/asm/arch-at91/at91sam9_sdramc.h @@ -19,19 +19,19 @@ #ifdef __ASSEMBLY__ -#ifndef AT91_SDRAMC_BASE -#define AT91_SDRAMC_BASE AT91_SDRAMC0_BASE +#ifndef ATMEL_BASE_SDRAMC +#define ATMEL_BASE_SDRAMC AT91_SDRAMC0_BASE #endif -#define AT91_ASM_SDRAMC_MR AT91_SDRAMC_BASE -#define AT91_ASM_SDRAMC_TR (AT91_SDRAMC_BASE + 0x04) -#define AT91_ASM_SDRAMC_CR (AT91_SDRAMC_BASE + 0x08) -#define AT91_ASM_SDRAMC_MDR(AT91_SDRAMC_BASE + 0x24) +#define AT91_ASM_SDRAMC_MR ATMEL_BASE_SDRAMC +#define AT91_ASM_SDRAMC_TR (ATMEL_BASE_SDRAMC + 0x04) +#define AT91_ASM_SDRAMC_CR (ATMEL_BASE_SDRAMC + 0x08) +#define AT91_ASM_SDRAMC_MDR(ATMEL_BASE_SDRAMC + 0x24) #endif /* SDRAM Controller (SDRAMC) registers */ -#define AT91_SDRAMC_MR (AT91_SDRAMC + 0x00)/* SDRAM Controller Mode Register */ +#define AT91_SDRAMC_MR (ATMEL_BASE_SDRAMC + 0x00) /* SDRAM Controller Mode Register */ #defineAT91_SDRAMC_MODE(0xf 0) /* Command Mode */ #defineAT91_SDRAMC_MODE_NORMAL 0 #defineAT91_SDRAMC_MODE_NOP1 @@ -41,10 +41,10 @@ #defineAT91_SDRAMC_MODE_EXT_LMR5 #defineAT91_SDRAMC_MODE_DEEP 6 -#define AT91_SDRAMC_TR (AT91_SDRAMC + 0x04)/* SDRAM Controller Refresh Timer Register */ +#define AT91_SDRAMC_TR (ATMEL_BASE_SDRAMC + 0x04) /* SDRAM Controller Refresh Timer Register */ #defineAT91_SDRAMC_COUNT (0xfff 0)/* Refresh Timer Counter */ -#define AT91_SDRAMC_CR (AT91_SDRAMC + 0x08)/* SDRAM Controller Configuration Register */ +#define AT91_SDRAMC_CR (ATMEL_BASE_SDRAMC + 0x08) /* SDRAM Controller Configuration Register */ #defineAT91_SDRAMC_NC (3 0)/* Number of Column Bits */ #defineAT91_SDRAMC_NC_8(0 0) #defineAT91_SDRAMC_NC_9(1 0) @@ -71,7 +71,7 @@ #defineAT91_SDRAMC_TRAS(0xf 24) /* Active to Precharge Delay */ #defineAT91_SDRAMC_TXSR(0xf 28) /* Exit Self Refresh to Active Delay */ -#define AT91_SDRAMC_LPR