Re: [U-Boot] [PATCH] pm9261: add mach-type localy for the board
Hi Albert, On 10/28/2011 09:17 PM, Albert ARIBAUD wrote: Hi Asen, You should copy Ilko as the maintainer, unless you are taking over maintainership of this board (and pm9263 and pm9g45), in which case please modify MAINTAINERS file as well. Ok, I will CC: him next time. Le 28/10/2011 18:10, Asen Chavdarov Dimov a écrit : Signed-off-by: Asen Chavdarov Dimovdi...@ronetix.at --- board/ronetix/pm9261/mach-type.h | 31 +++ NAK. Do not copy-paste mach-type.h, just add the MACH_TYPE_PM9261 define in include/configs/pm9261.h. board/ronetix/pm9261/pm9261.c|1 + 2 files changed, 32 insertions(+), 0 deletions(-) create mode 100644 board/ronetix/pm9261/mach-type.h ... #includecommon.h +#include mach-type.h NAK -- you don't need this if you add MACH_TYPE_PM9261. #includeasm/sizes.h #includeasm/io.h #includeasm/arch/at91sam9_smc.h Same applies to the other two boards -- you can actually submit a single patch for all three of them. Ok. Amicalement, Regards, Asen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH, AT91, rework v2] change common at91sam9261 files after AT91 rework
Hello Reinhard, On 07/26/2011 10:14 AM, Reinhard Meyer wrote: Dear Asen Dimov, Signed-off-by: Asen Dimovdi...@ronetix.at --- Note: This patch was a part of patches, but it is better to be done step by step and so this patch is a split from the patch series with message id: 1307606409-29818-2-git-send-email-di...@ronetix.at and Patchwork: http://patchwork.ozlabs.org/patch/99665/ Changes for v2: - add CONFIG_AT91_GPIO_PIULLUP - reneme at91_serial3_hw_init() to at91_seriald_hw_init() - remove at91_serial_hw_init() What I miss in at91sam9261_devices.c (as compared to the 9260) is support for MACB and MCI. Don't 9261 systems use Ethernet? Or is that part still in the board specific files? Then, I would like to add the following changes: -- arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c @@ -79,14 +79,14 @@ void at91_seriald_hw_init(void) writel(1 ATMEL_ID_SYS,pmc-pcer); } -#ifdef CONFIG_HAS_DATAFLASH +#if defined(CONFIG_HAS_DATAFLASH) || defined(CONFIG_ATMEL_SPI) void at91_spi0_hw_init(unsigned long cs_mask) { at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; - at91_set_a_periph(AT91_PIO_PORTA, 0, 0);/* SPI0_MISO */ - at91_set_a_periph(AT91_PIO_PORTA, 1, 0);/* SPI0_MOSI */ - at91_set_a_periph(AT91_PIO_PORTA, 2, 0);/* SPI0_SPCK */ + at91_set_a_periph(AT91_PIO_PORTA, 0, PUP); /* SPI0_MISO */ + at91_set_a_periph(AT91_PIO_PORTA, 1, PUP); /* SPI0_MOSI */ + at91_set_a_periph(AT91_PIO_PORTA, 2, PUP); /* SPI0_SPCK */ /* Enable clock */ writel(1 ATMEL_ID_SPI0,pmc-pcer); @@ -121,9 +121,9 @@ void at91_spi1_hw_init(unsigned long cs_mask) { at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; - at91_set_a_periph(AT91_PIO_PORTB, 30, 0); /* SPI1_MISO */ - at91_set_a_periph(AT91_PIO_PORTB, 31, 0); /* SPI1_MOSI */ - at91_set_a_periph(AT91_PIO_PORTB, 29, 0); /* SPI1_SPCK */ + at91_set_a_periph(AT91_PIO_PORTB, 30, PUP); /* SPI1_MISO */ + at91_set_a_periph(AT91_PIO_PORTB, 31, PUP); /* SPI1_MOSI */ + at91_set_a_periph(AT91_PIO_PORTB, 29, PUP); /* SPI1_SPCK */ /* Enable clock */ writel(1 ATMEL_ID_SPI1,pmc-pcer); - arch/arm/include/asm/arch-at91/at91sam9261.h @@ -104,7 +104,7 @@ #define ATMEL_SIZE_SRAM 0x00028000 /* Internal SRAM size (160Kb) */ #define ATMEL_BASE_ROM 0x0040 /* Internal ROM base address */ -#define ATMEL_SIZE_ROM SZ_32K /* Internal ROM size (32Kb) */ +#define ATMEL_SIZE_ROM 0x8000 /* Internal ROM size (32Kb) */ #define ATMEL_BASE_UHP 0x0050 /* USB Host controller */ #define ATMEL_BASE_LCDC 0x0060 /* LDC controller */ I have this as a local patch and could squash this onto yours, or you may provide an updated patch. I will try once more to make it as it should be. Thanks, Reinhard Regards, Asen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH, AT91, rework v2] change common at91sam9261 files after AT91 rework
and one forgotten answer ... On 07/26/2011 12:11 PM, RONETIX - Asen Dimov wrote: Hello Reinhard, On 07/26/2011 10:14 AM, Reinhard Meyer wrote: Dear Asen Dimov, Signed-off-by: Asen Dimovdi...@ronetix.at --- Note: This patch was a part of patches, but it is better to be done step by step and so this patch is a split from the patch series with message id: 1307606409-29818-2-git-send-email-di...@ronetix.at and Patchwork: http://patchwork.ozlabs.org/patch/99665/ Changes for v2: - add CONFIG_AT91_GPIO_PIULLUP - reneme at91_serial3_hw_init() to at91_seriald_hw_init() - remove at91_serial_hw_init() What I miss in at91sam9261_devices.c (as compared to the 9260) is support for MACB and MCI. Don't 9261 systems use Ethernet? Or is that part still in the board specific files? that part is in the board file. [snip] Regards, Asen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH, AT91, rework v2] change common at91sam9261 files after AT91 rework
Hello Reinhard, On 07/26/2011 12:58 PM, Reinhard Meyer wrote: Dear Asen Dimov, I have this as a local patch and could squash this onto yours, or you may provide an updated patch. I will try once more to make it as it should be. The squashed version is at top of u-boot-atmel/rework-at91sam9261. If you are OK with that, I'll post the patch and apply it to master. (I also changed the subject a bit) Good, I am OK with that. The pm9261 now boots and the patch will come soon. Best Regards, Reinhard Regards, Asen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] AT91 rework: pm9261, pm9263 and pm9g45
Hello, I got several instances of the patches, probably you got it too, so I apology for the mess. Here is the list of patches: [PM9261] http://patchwork.ozlabs.org/patch/99663/ http://patchwork.ozlabs.org/patch/99665/ http://patchwork.ozlabs.org/patch/99666/ [PM9263] http://patchwork.ozlabs.org/patch/99662/ http://patchwork.ozlabs.org/patch/99668/ [PM9G45] http://patchwork.ozlabs.org/patch/99664/ http://patchwork.ozlabs.org/patch/99667/ Regards, Asen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] AT91 rework: pm9261, pm9263 and pm9g45
Hello Reinhard, On 06/09/2011 01:57 PM, Reinhard Meyer wrote: ... Dear Asen Dimov, The empty reset_timer() function added there can obviously only solve build issues. On any account reset_timer() must not be used anymore. As such this patch must get a NAK. The architectures, except AT91 are using reset_timer() to make epochs (start from zero). I don't want to break the other architectures and I need the CFI driver for pm92613 and pm9261. I can not think of another idea, except an empty reset_timer(). Any suggestions, ideas? ... Best Regards, Reinhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Regards, Asen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] AT91 rework: pm9261, pm9263 and pm9g45
Hi Reinhard, On 06/09/2011 02:00 PM, Reinhard Meyer wrote: ... http://patchwork.ozlabs.org/patch/99665/ http://patchwork.ozlabs.org/patch/99666/ [PM9263] http://patchwork.ozlabs.org/patch/99662/ http://patchwork.ozlabs.org/patch/99668/ [PM9G45] http://patchwork.ozlabs.org/patch/99664/ http://patchwork.ozlabs.org/patch/99667/ Ah, and patches should be numbered 1/n .. n/n; 0/n is only for a descriptive summary. should I repost them numbering with 1/n? Best Regards, Reinhard Regards, Asen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] mpc5125: nand flash commands
Hello, Have anybody made the nand support for mpc5125, especially commads for flashing first stage boot loader and U-Boot: nand_e, nand_w and nand_loader, which are implemented in /fscale/cys/git-freescale/u-boot-2009.03/drivers/mtd/nand/mpc5125_nfc_mtc.c. The BSP from Freescale has these commands as as object file not source. We need these sources to implement nand programming in our JTAG programmer. Since U-Boot is GPL licensed all sources shout be public. Thanks in advance. Regards, Asen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] pm9g45_v1.3: make ethernet works
Hello, Asen Dimov with Message-Id: 1296141314-9580-1-git-send-email-di...@ronetix.at wrote: Signed-off-by: Asen Dimov di...@ronetix.at --- board/ronetix/pm9g45/pm9g45.c | 15 +++ include/configs/pm9g45.h |5 + 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/board/ronetix/pm9g45/pm9g45.c b/board/ronetix/pm9g45/pm9g45.c index 79b7c9d..0e1d6b2 100644 --- a/board/ronetix/pm9g45/pm9g45.c +++ b/board/ronetix/pm9g45/pm9g45.c @@ -96,6 +96,8 @@ static void pm9g45_nand_hw_init(void) static void pm9g45_macb_hw_init(void) { at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_rstc_t *rstc = (at91_rstc_t *) AT91_RSTC_BASE; + unsigned long erstl; /* * PD2 enables the 50MHz oscillator for Ethernet PHY @@ -120,6 +122,19 @@ static void pm9g45_macb_hw_init(void) at91_set_pio_pullup(AT91_PIO_PORTA, 12, 0); at91_set_pio_pullup(AT91_PIO_PORTA, 13, 0); + erstl = readl(rstc-mr) AT91_RSTC_MR_ERSTL_MASK; + + /* Need to reset PHY - 500ms reset */ + writel(AT91_RSTC_KEY | AT91_RSTC_MR_ERSTL(0x0D) | + AT91_RSTC_MR_URSTEN, rstc-mr); + writel(AT91_RSTC_KEY | AT91_RSTC_CR_EXTRST, rstc-cr); + + /* Wait for end hardware reset */ + while (!(readl(rstc-sr) AT91_RSTC_SR_NRSTL)); + + /* Restore NRST value */ + writel(AT91_RSTC_KEY | erstl | AT91_RSTC_MR_URSTEN, rstc-mr); + /* Re-enable pull-up */ at91_set_pio_pullup(AT91_PIO_PORTA, 15, 1); at91_set_pio_pullup(AT91_PIO_PORTA, 12, 1); diff --git a/include/configs/pm9g45.h b/include/configs/pm9g45.h index ec51ccf..4d8089f 100644 --- a/include/configs/pm9g45.h +++ b/include/configs/pm9g45.h @@ -125,6 +125,11 @@ #define CONFIG_NET_MULTI 1 #define CONFIG_NET_RETRY_COUNT 20 #define CONFIG_RESET_PHY_R 1 +#define CONFIG_MACB_SEARCH_PHY +#define CONFIG_CMD_MII +#define CONFIG_OVERWRITE_ETHADDR_ONCE +/* MAC is Organizationally Unique Identifier + 3 octects user numbers */ +#define CONFIG_ETHADDR 02:00:00:fe:ed:00 /* USB */ #define CONFIG_USB_ATMEL is this fix lost or there is something wrong with it? Regards, Asen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/1] at91: USART3_BASE use AT91_DBGU_BASE instead of (AT91_BASE_SYS + AT91_DBGU)
Hello Reinhard, Reinhard Meyer wrote: Dear Asen Dimov, Signed-off-by: Asen Dimovdi...@ronetix.at --- arch/arm/include/asm/arch-at91/at91cap9.h|1 + arch/arm/include/asm/arch-at91/at91sam9260.h |1 + arch/arm/include/asm/arch-at91/at91sam9261.h |1 + arch/arm/include/asm/arch-at91/at91sam9g45.h |1 + arch/arm/include/asm/arch-at91/at91sam9rl.h |1 + arch/arm/include/asm/arch-at91/memory-map.h |5 - 6 files changed, 9 insertions(+), 1 deletions(-) We are currently reworking the avr32 and at91 files. Please rebase your work on top of the u-boot-atmel.git, rework101209 branch. You will find that most of your changes to common files are already done. in this case you can discard this patch. With best regards, Reinhard Regards, Asen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] pm9263 converted to at91 soc access
Tom wrote: Asen Dimov wrote: Signed-off-by: Asen Dimov di...@ronetix.at --- board/ronetix/pm9263/led.c| 15 ++-- board/ronetix/pm9263/pm9263.c | 195 + include/configs/pm9263.h | 82 - 3 files changed, 146 insertions(+), 146 deletions(-) diff --git a/board/ronetix/pm9263/led.c b/board/ronetix/pm9263/led.c index fe1a1d2..4e585a4 100644 --- a/board/ronetix/pm9263/led.c +++ b/board/ronetix/pm9263/led.c @@ -26,18 +26,19 @@ #include common.h #include asm/arch/at91sam9263.h #include asm/arch/at91_pmc.h -#include asm/arch/gpio.h +#include asm/arch/at91_pio.h #include asm/arch/io.h void coloured_LED_init(void) { +at91_pmc_t*pmc= (at91_pmc_t *) AT91_PMC_BASE; + /* Enable clock */ -at91_sys_write(AT91_PMC_PCER, 1 AT91SAM9263_ID_PIOB | - 1 AT91SAM9263_ID_PIOCDE); +writel(1 AT91SAM9263_ID_PIOB, pmc-pcer); Missing PICOCDE.. Is this ok ? The two leds are on PIOB, no leds on PIO: C, D or E. It is ok. -at91_set_gpio_output(CONFIG_RED_LED, 1); -at91_set_gpio_output(CONFIG_GREEN_LED, 1); +at91_set_pio_output(CONFIG_RED_LED, 1); +at91_set_pio_output(CONFIG_GREEN_LED, 1); -at91_set_gpio_value(CONFIG_RED_LED, 0); -at91_set_gpio_value(CONFIG_GREEN_LED, 1); +at91_set_pio_value(CONFIG_RED_LED, 0); +at91_set_pio_value(CONFIG_GREEN_LED, 1); } diff --git a/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c index 23ea154..83371e5 100644 --- a/board/ronetix/pm9263/pm9263.c +++ b/board/ronetix/pm9263/pm9263.c @@ -27,13 +27,13 @@ #include common.h #include asm/sizes.h #include asm/arch/at91sam9263.h -#include asm/arch/at91sam9263_matrix.h #include asm/arch/at91sam9_smc.h #include asm/arch/at91_common.h #include asm/arch/at91_pmc.h #include asm/arch/at91_rstc.h +#include asm/arch/at91_matrix.h +#include asm/arch/at91_pio.h #include asm/arch/clk.h -#include asm/arch/gpio.h #include asm/arch/io.h #include asm/arch/hardware.h #include lcd.h @@ -55,52 +55,59 @@ DECLARE_GLOBAL_DATA_PTR; static void pm9263_nand_hw_init(void) { unsigned long csa; +at91_smc_t *smc = (at91_smc_t *) AT91_SMC0_BASE; +at91_matrix_t *matrix = (at91_matrix_t *) AT91_MATRIX_BASE; /* Enable CS3 */ -csa = at91_sys_read(AT91_MATRIX_EBI0CSA); -at91_sys_write(AT91_MATRIX_EBI0CSA, - csa | AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA); +csa = readl(matrix-csa[0]) | AT91_MATRIX_CSA_EBI_CS3A; +writel(csa, matrix-csa[0]); Missing SMARTMEDIA Is this ok? AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA sets the SMARTMEDIA bit and AT91_MATRIX_CSA_EBI_CS3A sets the SMARTMEDIA bit too. It is ok. /* Configure SMC CS3 for NAND/SmartMedia */ -at91_sys_write(AT91_SMC_SETUP(3), - AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(1) | - AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(1)); -at91_sys_write(AT91_SMC_PULSE(3), - AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) | - AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3)); -at91_sys_write(AT91_SMC_CYCLE(3), - AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5)); -at91_sys_write(AT91_SMC_MODE(3), - AT91_SMC_READMODE | AT91_SMC_WRITEMODE | - AT91_SMC_EXNWMODE_DISABLE | +writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(1) | +AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(1), +smc-cs[3].setup); + +writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) | +AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3), +smc-cs[3].pulse); + +writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5), +smc-cs[3].cycle); + +writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE | +AT91_SMC_MODE_EXNW_DISABLE | #ifdef CONFIG_SYS_NAND_DBW_16 - AT91_SMC_DBW_16 | +AT91_SMC_MODE_DBW_16 | #else /* CONFIG_SYS_NAND_DBW_8 */ - AT91_SMC_DBW_8 | +AT91_SMC_MODE_DBW_8 | #endif - AT91_SMC_TDF_(2)); +AT91_SMC_MODE_TDF_CYCLE(2), +smc-cs[3].mode); /* Configure RDY/BSY */ -at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1); +at91_set_pio_input(CONFIG_SYS_NAND_READY_PIN, 1); /* Enable NandFlash */ -at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1); +at91_set_pio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1); } #endif #ifdef CONFIG_MACB static void pm9263_macb_hw_init(void) { +at91_pmc_t*pmc= (at91_pmc_t *) AT91_PMC_BASE; +at91_pio_t*pio= (at91_pio_t *) AT91_PIO_BASE; + /* * PB27 enables the 50MHz oscillator for Ethernet PHY * 1 - enable * 0 - disable */ -at91_set_gpio_output(AT91_PIN_PB27, 1); -at91_set_gpio_value(AT91_PIN_PB27, 1); /* 1- enable, 0 - disable */ +
Re: [U-Boot] [PATCH] add new board pm9g45
Hello Tom, In respond of the message 4ba51dad.5020...@windriver.com you wrote: there is a second version of the this patch in e-mail with message-id 1268928021-31632-1-git-send-email-di...@ronetix.at and subject [U-Boot][PATCH v2] add new board pm9g45 from 18.03.2010. Regards, Asen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] add new board pm9g45
Hello Wolfgang, in the message 20100316190012.84ca750...@gemini.denx.de form 16.03.2010 at 09:00 PM +#ifdef CONFIG_LCD +/* + * LCD name TX09D50VM1CCA + */ +vidinfo_t panel_info = { + vl_col: 240, + vl_row: 320, + vl_clk: 4965000, + vl_sync:ATMEL_LCDC_INVLINE_NORMAL | + ATMEL_LCDC_INVFRAME_NORMAL, + vl_bpix:3, + vl_tft: 1, + vl_hsync_len: 5, + vl_left_margin: 1, + vl_right_margin:33, + vl_vsync_len: 1, + vl_upper_margin:1, + vl_lower_margin:0, + mmio: AT91SAM9G45_LCDC_BASE, +}; This information should not be board-specific. The panel information is generic and should moved to a separate header file that is not part of the board code. In the boards (at91sam9263ek and at91sam9m10g45ek, and some more at91sam9 based boards) I am looking at, the panel_info is in the board specific code. There are some lcd.c files with panel_info structures: drivers/video/mx3fb.c, cpu/pxa/pxafb.c and cpu/mpc8xx/lcd.c . Where should be the proper place for panel_info which is somehow architecture dependent? Regards, Asen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot