Re: [U-Boot] [PATCH] arm: at91: Add support for DENX MA5D4 SoM and EVK
On 02/14/2016 11:20 AM, Wolfgang Denk wrote: > Dear Marek, > > In message <56bc890d.8020...@denx.de> you wrote: >> +/* + * re h ; load 0x20 ma5d4evk/u-boot-spl.bin BIN ; go 0x20 + * h ; load 0x26f0 ma5d4evk/u-boot.bin BIN ; go 0x26f0 + */ >>> >>> ;-) Maybe a comment that this are the magic commands in the BDI >>> for starting the generated images would be helpful. >> >> Guh, nice catch, removed. > > I think this was pretty useful information. If you don't want to have > it in the code, please move it to some README, but don't drop it. It's in the BDI config file, no problem. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: at91: Add support for DENX MA5D4 SoM and EVK
Dear Marek, In message <56bc890d.8020...@denx.de> you wrote: > > >> +/* > >> + * re h ; load 0x20 ma5d4evk/u-boot-spl.bin BIN ; go 0x20 > >> + * h ; load 0x26f0 ma5d4evk/u-boot.bin BIN ; go 0x26f0 > >> + */ > > > > ;-) Maybe a comment that this are the magic commands in the BDI > > for starting the generated images would be helpful. > > Guh, nice catch, removed. I think this was pretty useful information. If you don't want to have it in the code, please move it to some README, but don't drop it. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "There's only one way to have a happy marriage and as soon as I learn what it is I'll get married again." - Clint Eastwood ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm: at91: Add support for DENX MA5D4 SoM and EVK
Add support for DENX MA5D4 SoM and MA5D4EVK board, based on the Atmel SAMA5D4 SoC. The SoM contains the SoC, eMMC, SPI NOR, SPI CAN controllers and DRAM, the baseboard contains UART connectors, ethernet port, microSD slot, LCD header, 2x CAN connector and a lot of expansion headers. Signed-off-by: Marek VasutCc: Andreas Bießmann Reviewed-by: Heiko Schocher --- V2: Remove the BDI commands, that was just a development remnant --- arch/arm/mach-at91/Kconfig | 6 + board/denx/ma5d4evk/Kconfig | 12 ++ board/denx/ma5d4evk/MAINTAINERS | 6 + board/denx/ma5d4evk/Makefile| 7 + board/denx/ma5d4evk/ma5d4evk.c | 412 configs/ma5d4evk_defconfig | 11 ++ include/configs/ma5d4evk.h | 255 + 7 files changed, 709 insertions(+) create mode 100644 board/denx/ma5d4evk/Kconfig create mode 100644 board/denx/ma5d4evk/MAINTAINERS create mode 100644 board/denx/ma5d4evk/Makefile create mode 100644 board/denx/ma5d4evk/ma5d4evk.c create mode 100644 configs/ma5d4evk_defconfig create mode 100644 include/configs/ma5d4evk.h diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 9426302b..88ccf23 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -96,6 +96,11 @@ config TARGET_SAMA5D4EK select CPU_V7 select SUPPORT_SPL +config TARGET_MA5D4EVK + bool "DENX MA5D4EVK Evaluation Kit" + select CPU_V7 + select SUPPORT_SPL + config TARGET_MEESC bool "Support meesc" select CPU_ARM926EJS @@ -135,6 +140,7 @@ source "board/atmel/sama5d4_xplained/Kconfig" source "board/atmel/sama5d4ek/Kconfig" source "board/bluewater/snapper9260/Kconfig" source "board/calao/usb_a9263/Kconfig" +source "board/denx/ma5d4evk/Kconfig" source "board/egnite/ethernut5/Kconfig" source "board/esd/meesc/Kconfig" source "board/mini-box/picosam9g45/Kconfig" diff --git a/board/denx/ma5d4evk/Kconfig b/board/denx/ma5d4evk/Kconfig new file mode 100644 index 000..b4ef106 --- /dev/null +++ b/board/denx/ma5d4evk/Kconfig @@ -0,0 +1,12 @@ +if TARGET_MA5D4EVK + +config SYS_BOARD + default "ma5d4evk" + +config SYS_VENDOR + default "denx" + +config SYS_CONFIG_NAME + default "ma5d4evk" + +endif diff --git a/board/denx/ma5d4evk/MAINTAINERS b/board/denx/ma5d4evk/MAINTAINERS new file mode 100644 index 000..bb25a9c --- /dev/null +++ b/board/denx/ma5d4evk/MAINTAINERS @@ -0,0 +1,6 @@ +DENX MA5D4EVK BOARD +M: Marek Vasut +S: Maintained +F: board/denx/ma5d4evk/ +F: include/configs/ma5d4evk.h +F: configs/ma5d4evk_defconfig diff --git a/board/denx/ma5d4evk/Makefile b/board/denx/ma5d4evk/Makefile new file mode 100644 index 000..b12b5dc --- /dev/null +++ b/board/denx/ma5d4evk/Makefile @@ -0,0 +1,7 @@ +# +# Copyright (C) 2015 Marek Vasut +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += ma5d4evk.o diff --git a/board/denx/ma5d4evk/ma5d4evk.c b/board/denx/ma5d4evk/ma5d4evk.c new file mode 100644 index 000..ec0fa28 --- /dev/null +++ b/board/denx/ma5d4evk/ma5d4evk.c @@ -0,0 +1,412 @@ +/* + * Copyright (C) 2015 Marek Vasut + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +#ifdef CONFIG_ATMEL_SPI +int spi_cs_is_valid(unsigned int bus, unsigned int cs) +{ + return bus == 0 && cs == 0; +} + +void spi_cs_activate(struct spi_slave *slave) +{ + at91_set_pio_output(AT91_PIO_PORTC, 3, 0); +} + +void spi_cs_deactivate(struct spi_slave *slave) +{ + at91_set_pio_output(AT91_PIO_PORTC, 3, 1); +} + +static void ma5d4evk_spi0_hw_init(void) +{ + at91_set_a_periph(AT91_PIO_PORTC, 0, 0);/* SPI0_MISO */ + at91_set_a_periph(AT91_PIO_PORTC, 1, 0);/* SPI0_MOSI */ + at91_set_a_periph(AT91_PIO_PORTC, 2, 0);/* SPI0_SPCK */ + + at91_set_pio_output(AT91_PIO_PORTC, 3, 1); /* SPI0_CS0 */ + + /* Enable clock */ + at91_periph_clk_enable(ATMEL_ID_SPI0); +} +#endif /* CONFIG_ATMEL_SPI */ + +#ifdef CONFIG_CMD_USB +static void ma5d4evk_usb_hw_init(void) +{ + at91_set_pio_output(AT91_PIO_PORTE, 11, 0); + at91_set_pio_output(AT91_PIO_PORTE, 14, 0); +} +#endif + +#ifdef CONFIG_LCD +vidinfo_t panel_info = { + .vl_col = 800, + .vl_row = 480, + .vl_clk = 3350, + .vl_bpix= LCD_BPP, + .vl_tft = 1, + .vl_hsync_len = 10, + .vl_left_margin = 89, + .vl_right_margin= 164, + .vl_vsync_len = 10, + .vl_upper_margin= 23, + .vl_lower_margin= 10,
Re: [U-Boot] [PATCH] arm: at91: Add support for DENX MA5D4 SoM and EVK
On 02/11/2016 06:52 AM, Heiko Schocher wrote: > Hello Marek, Hi! > added Andreas to cc as he is the at91 custodian. > > Am 10.02.2016 um 22:41 schrieb Marek Vasut: >> Add support for DENX MA5D4 SoM and MA5D4EVK board, based on the >> Atmel SAMA5D4 SoC. The SoM contains the SoC, eMMC, SPI NOR, SPI >> CAN controllers and DRAM, the baseboard contains UART connectors, >> ethernet port, microSD slot, LCD header, 2x CAN connector and a >> lot of expansion headers. >> >> Signed-off-by: Marek Vasut>> Cc: Andreas Bießmann Andreas should be in Cc , see ^ , could it be that the ML is doing something funny again ? >> --- >> arch/arm/mach-at91/Kconfig | 6 + >> board/denx/ma5d4evk/Kconfig | 12 ++ >> board/denx/ma5d4evk/MAINTAINERS | 6 + >> board/denx/ma5d4evk/Makefile| 7 + >> board/denx/ma5d4evk/ma5d4evk.c | 417 >> >> configs/ma5d4evk_defconfig | 11 ++ >> include/configs/ma5d4evk.h | 255 >> 7 files changed, 714 insertions(+) >> create mode 100644 board/denx/ma5d4evk/Kconfig >> create mode 100644 board/denx/ma5d4evk/MAINTAINERS >> create mode 100644 board/denx/ma5d4evk/Makefile >> create mode 100644 board/denx/ma5d4evk/ma5d4evk.c >> create mode 100644 configs/ma5d4evk_defconfig >> create mode 100644 include/configs/ma5d4evk.h > > just some nitpick ;-) > > [...] >> diff --git a/board/denx/ma5d4evk/ma5d4evk.c >> b/board/denx/ma5d4evk/ma5d4evk.c >> new file mode 100644 >> index 000..d1a550e >> --- /dev/null >> +++ b/board/denx/ma5d4evk/ma5d4evk.c >> @@ -0,0 +1,417 @@ >> +/* >> + * Copyright (C) 2015 Marek Vasut >> + * >> + * SPDX-License-Identifier:GPL-2.0+ >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +DECLARE_GLOBAL_DATA_PTR; >> + >> +/* >> + * re h ; load 0x20 ma5d4evk/u-boot-spl.bin BIN ; go 0x20 >> + * h ; load 0x26f0 ma5d4evk/u-boot.bin BIN ; go 0x26f0 >> + */ > > ;-) Maybe a comment that this are the magic commands in the BDI > for starting the generated images would be helpful. Guh, nice catch, removed. > And plan is to switch to CONFIG_DM for all boards (I know, I did not > started with this job for "my" boards ...)... do you have plans/time > for switching (or may you use it already and i just overseen it)? I'd like to start with MX6 when I have time, but that's not gonna happen soon I'm afraid. I'm hoping someone from Atmel will take up the job for Atmel-based boards ;-) > Beside of this: > Reviewed-by: Heiko Schocher > > bye, > Heiko ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm: at91: Add support for DENX MA5D4 SoM and EVK
Add support for DENX MA5D4 SoM and MA5D4EVK board, based on the Atmel SAMA5D4 SoC. The SoM contains the SoC, eMMC, SPI NOR, SPI CAN controllers and DRAM, the baseboard contains UART connectors, ethernet port, microSD slot, LCD header, 2x CAN connector and a lot of expansion headers. Signed-off-by: Marek VasutCc: Andreas Bießmann --- arch/arm/mach-at91/Kconfig | 6 + board/denx/ma5d4evk/Kconfig | 12 ++ board/denx/ma5d4evk/MAINTAINERS | 6 + board/denx/ma5d4evk/Makefile| 7 + board/denx/ma5d4evk/ma5d4evk.c | 417 configs/ma5d4evk_defconfig | 11 ++ include/configs/ma5d4evk.h | 255 7 files changed, 714 insertions(+) create mode 100644 board/denx/ma5d4evk/Kconfig create mode 100644 board/denx/ma5d4evk/MAINTAINERS create mode 100644 board/denx/ma5d4evk/Makefile create mode 100644 board/denx/ma5d4evk/ma5d4evk.c create mode 100644 configs/ma5d4evk_defconfig create mode 100644 include/configs/ma5d4evk.h diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 9426302b..88ccf23 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -96,6 +96,11 @@ config TARGET_SAMA5D4EK select CPU_V7 select SUPPORT_SPL +config TARGET_MA5D4EVK + bool "DENX MA5D4EVK Evaluation Kit" + select CPU_V7 + select SUPPORT_SPL + config TARGET_MEESC bool "Support meesc" select CPU_ARM926EJS @@ -135,6 +140,7 @@ source "board/atmel/sama5d4_xplained/Kconfig" source "board/atmel/sama5d4ek/Kconfig" source "board/bluewater/snapper9260/Kconfig" source "board/calao/usb_a9263/Kconfig" +source "board/denx/ma5d4evk/Kconfig" source "board/egnite/ethernut5/Kconfig" source "board/esd/meesc/Kconfig" source "board/mini-box/picosam9g45/Kconfig" diff --git a/board/denx/ma5d4evk/Kconfig b/board/denx/ma5d4evk/Kconfig new file mode 100644 index 000..b4ef106 --- /dev/null +++ b/board/denx/ma5d4evk/Kconfig @@ -0,0 +1,12 @@ +if TARGET_MA5D4EVK + +config SYS_BOARD + default "ma5d4evk" + +config SYS_VENDOR + default "denx" + +config SYS_CONFIG_NAME + default "ma5d4evk" + +endif diff --git a/board/denx/ma5d4evk/MAINTAINERS b/board/denx/ma5d4evk/MAINTAINERS new file mode 100644 index 000..bb25a9c --- /dev/null +++ b/board/denx/ma5d4evk/MAINTAINERS @@ -0,0 +1,6 @@ +DENX MA5D4EVK BOARD +M: Marek Vasut +S: Maintained +F: board/denx/ma5d4evk/ +F: include/configs/ma5d4evk.h +F: configs/ma5d4evk_defconfig diff --git a/board/denx/ma5d4evk/Makefile b/board/denx/ma5d4evk/Makefile new file mode 100644 index 000..b12b5dc --- /dev/null +++ b/board/denx/ma5d4evk/Makefile @@ -0,0 +1,7 @@ +# +# Copyright (C) 2015 Marek Vasut +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += ma5d4evk.o diff --git a/board/denx/ma5d4evk/ma5d4evk.c b/board/denx/ma5d4evk/ma5d4evk.c new file mode 100644 index 000..d1a550e --- /dev/null +++ b/board/denx/ma5d4evk/ma5d4evk.c @@ -0,0 +1,417 @@ +/* + * Copyright (C) 2015 Marek Vasut + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +/* + * re h ; load 0x20 ma5d4evk/u-boot-spl.bin BIN ; go 0x20 + * h ; load 0x26f0 ma5d4evk/u-boot.bin BIN ; go 0x26f0 + */ + +#ifdef CONFIG_ATMEL_SPI +int spi_cs_is_valid(unsigned int bus, unsigned int cs) +{ + return bus == 0 && cs == 0; +} + +void spi_cs_activate(struct spi_slave *slave) +{ + at91_set_pio_output(AT91_PIO_PORTC, 3, 0); +} + +void spi_cs_deactivate(struct spi_slave *slave) +{ + at91_set_pio_output(AT91_PIO_PORTC, 3, 1); +} + +static void ma5d4evk_spi0_hw_init(void) +{ + at91_set_a_periph(AT91_PIO_PORTC, 0, 0);/* SPI0_MISO */ + at91_set_a_periph(AT91_PIO_PORTC, 1, 0);/* SPI0_MOSI */ + at91_set_a_periph(AT91_PIO_PORTC, 2, 0);/* SPI0_SPCK */ + + at91_set_pio_output(AT91_PIO_PORTC, 3, 1); /* SPI0_CS0 */ + + /* Enable clock */ + at91_periph_clk_enable(ATMEL_ID_SPI0); +} +#endif /* CONFIG_ATMEL_SPI */ + +#ifdef CONFIG_CMD_USB +static void ma5d4evk_usb_hw_init(void) +{ + at91_set_pio_output(AT91_PIO_PORTE, 11, 0); + at91_set_pio_output(AT91_PIO_PORTE, 14, 0); +} +#endif + +#ifdef CONFIG_LCD +vidinfo_t panel_info = { + .vl_col = 800, + .vl_row = 480, + .vl_clk = 3350, + .vl_bpix= LCD_BPP, + .vl_tft = 1, + .vl_hsync_len = 10, + .vl_left_margin = 89, + .vl_right_margin= 164, + .vl_vsync_len = 10, + .vl_upper_margin= 23, +
Re: [U-Boot] [PATCH] arm: at91: Add support for DENX MA5D4 SoM and EVK
Hello Marek, added Andreas to cc as he is the at91 custodian. Am 10.02.2016 um 22:41 schrieb Marek Vasut: Add support for DENX MA5D4 SoM and MA5D4EVK board, based on the Atmel SAMA5D4 SoC. The SoM contains the SoC, eMMC, SPI NOR, SPI CAN controllers and DRAM, the baseboard contains UART connectors, ethernet port, microSD slot, LCD header, 2x CAN connector and a lot of expansion headers. Signed-off-by: Marek VasutCc: Andreas Bießmann --- arch/arm/mach-at91/Kconfig | 6 + board/denx/ma5d4evk/Kconfig | 12 ++ board/denx/ma5d4evk/MAINTAINERS | 6 + board/denx/ma5d4evk/Makefile| 7 + board/denx/ma5d4evk/ma5d4evk.c | 417 configs/ma5d4evk_defconfig | 11 ++ include/configs/ma5d4evk.h | 255 7 files changed, 714 insertions(+) create mode 100644 board/denx/ma5d4evk/Kconfig create mode 100644 board/denx/ma5d4evk/MAINTAINERS create mode 100644 board/denx/ma5d4evk/Makefile create mode 100644 board/denx/ma5d4evk/ma5d4evk.c create mode 100644 configs/ma5d4evk_defconfig create mode 100644 include/configs/ma5d4evk.h just some nitpick ;-) [...] diff --git a/board/denx/ma5d4evk/ma5d4evk.c b/board/denx/ma5d4evk/ma5d4evk.c new file mode 100644 index 000..d1a550e --- /dev/null +++ b/board/denx/ma5d4evk/ma5d4evk.c @@ -0,0 +1,417 @@ +/* + * Copyright (C) 2015 Marek Vasut + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +/* + * re h ; load 0x20 ma5d4evk/u-boot-spl.bin BIN ; go 0x20 + * h ; load 0x26f0 ma5d4evk/u-boot.bin BIN ; go 0x26f0 + */ ;-) Maybe a comment that this are the magic commands in the BDI for starting the generated images would be helpful. And plan is to switch to CONFIG_DM for all boards (I know, I did not started with this job for "my" boards ...)... do you have plans/time for switching (or may you use it already and i just overseen it)? Beside of this: Reviewed-by: Heiko Schocher bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot