Skip to contentSkip to conversation

RiOTboard: add new board

PATCH Superseded Eric Bénard 3 participants 6 messages Mar 26, 2014 – Mar 28, 2014

Subsystems (4)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 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)
- I2C 1/2/3
- 2 LEDs

Boot on eMMC and through USB loader are tested.

For more informations on this board : http://www.riotboard.org/

---
 arch/arm/boards/Makefile                           |   1 +
 arch/arm/boards/embest-riotboard/Makefile          |   3 +
 arch/arm/boards/embest-riotboard/board.c           |  86 +++++
 arch/arm/boards/embest-riotboard/env/config-board  |   6 +
 .../flash-header-embest-riotboard.imxcfg           |  62 ++++
 arch/arm/boards/embest-riotboard/lowlevel.c        |  43 +++
 arch/arm/dts/Makefile                              |   2 +
 arch/arm/dts/imx6s-riotboard.dts                   | 386 +++++++++++++++++++++
 arch/arm/mach-imx/Kconfig                          |   4 +
 images/Makefile.imx                                |   5 +
 10 files changed, 598 insertions(+)
 create mode 100644 arch/arm/boards/embest-riotboard/Makefile
 create mode 100644 arch/arm/boards/embest-riotboard/board.c
 create mode 100644 arch/arm/boards/embest-riotboard/env/config-board
 create mode 100644 arch/arm/boards/embest-riotboard/flash-header-embest-riotboard.imxcfg
 create mode 100644 arch/arm/boards/embest-riotboard/lowlevel.c
 create mode 100644 arch/arm/dts/imx6s-riotboard.dts
arch/arm/boards/Makefile +1 -0
index 0d8c9cf..4934a42 100644
@@ -28,6 +28,7 @@ obj-$(CONFIG_MACH_EDB9307)			+= edb93xx/
 obj-$(CONFIG_MACH_EDB9315A)			+= edb93xx/
 obj-$(CONFIG_MACH_EDB9315)			+= edb93xx/
 obj-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK)		+= efika-mx-smartbook/
+obj-$(CONFIG_MACH_EMBEST_RIOTBOARD)		+= embest-riotboard/
 obj-$(CONFIG_MACH_EUKREA_CPUIMX25)		+= eukrea_cpuimx25/
 obj-$(CONFIG_MACH_EUKREA_CPUIMX27)		+= eukrea_cpuimx27/
 obj-$(CONFIG_MACH_EUKREA_CPUIMX35)		+= eukrea_cpuimx35/
arch/arm/boards/embest-riotboard/Makefile new file +3 -0
new file mode 100644
index 0000000..9f8e1f2
@@ -0,0 +1,3 @@
+obj-y += board.o flash-header-embest-riotboard.dcd.o
+extra-y += flash-header-embest-riotboard.dcd.S flash-header-embest-riotboard.dcd
+lwl-y += lowlevel.o
arch/arm/boards/embest-riotboard/board.c new file +86 -0

86 lines not on this page · raw message

arch/arm/boards/embest-riotboard/env/config-board new file +6 -0
new file mode 100644
index 0000000..e8e8378
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.linux.bootargs.base="console=ttymxc0,115200"
arch/arm/boards/embest-riotboard/flash-header-embest-riotboard.imxcfg new file +62 -0

62 lines not on this page · raw message

arch/arm/boards/embest-riotboard/lowlevel.c new file +43 -0

43 lines not on this page · raw message

arch/arm/dts/Makefile +2 -0
index 6bac3b9..32fa44b 100644
@@ -25,6 +25,7 @@ dtb-$(CONFIG_ARCH_IMX6) += imx6q-gk802.dtb \
 	imx6q-guf-santaro.dtb \
 	imx6q-nitrogen6x.dtb \
 	imx6dl-nitrogen6x.dtb \
+	imx6s-riotboard.dtb \
 	imx6q-udoo.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += dove-cubox-bb.dtb
 dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5_sockit.dtb \
@@ -38,6 +39,7 @@ obj-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o
 
 pbl-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.dtb.o
 pbl-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += imx51-genesi-efika-sb.dtb.o
+pbl-$(CONFIG_MACH_EMBEST_RIOTBOARD) += imx6s-riotboard.dtb.o
 pbl-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o
 pbl-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o imx53-qsrb.dtb.o
 pbl-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += imx53-voipac-bsb.dtb.o
arch/arm/dts/imx6s-riotboard.dts new file +386 -0

386 lines not on this page · raw message

arch/arm/mach-imx/Kconfig +4 -0
index b7e7533..15b78e2 100644
@@ -243,6 +243,10 @@ config MACH_SOLIDRUN_HUMMINGBOARD
 	bool "SolidRun Hummingboard"
 	select ARCH_IMX6
 
+config MACH_EMBEST_RIOTBOARD
+	bool "Embest RIoTboard"
+	select ARCH_IMX6
+
 config MACH_UDOO
 	bool "Freescale i.MX6 UDOO Board"
 	select ARCH_IMX6
images/Makefile.imx +5 -0
index 5b650de..bd1b300 100644
@@ -143,3 +143,8 @@ pblx-$(CONFIG_MACH_UDOO) += start_imx6_udoo
 CFG_start_imx6_udoo.pblx.imximg = $(board)/udoo/flash-header-mx6-udoo.imxcfg
 FILE_barebox-udoo-imx6q.img = start_imx6_udoo.pblx.imximg
 image-$(CONFIG_MACH_UDOO) += barebox-udoo-imx6q.img
+
+pblx-$(CONFIG_MACH_EMBEST_RIOTBOARD) += start_imx6s_riotboard
+CFG_start_imx6s_riotboard.pblx.imximg = $(board)/embest-riotboard/flash-header-embest-riotboard.imxcfg
+FILE_barebox-embest-imx6s-riotboard.img = start_imx6s_riotboard.pblx.imximg
+image-$(CONFIG_MACH_EMBEST_RIOTBOARD) += barebox-embest-imx6s-riotboard.img
Signature · 7 lines
1.8.5.3


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 2/3 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)
- 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

---
 arch/arm/boards/Makefile                           |   1 +
 arch/arm/boards/embest-marsboard/Makefile          |   3 +
 arch/arm/boards/embest-marsboard/board.c           |  90 +++++++++++++++++
 arch/arm/boards/embest-marsboard/env/config-board  |   6 ++
 .../flash-header-embest-marsboard.imxcfg           | 106 +++++++++++++++++++++
 arch/arm/boards/embest-marsboard/lowlevel.c        |  44 +++++++++
 arch/arm/dts/Makefile                              |   2 +
 arch/arm/mach-imx/Kconfig                          |   4 +
 images/Makefile.imx                                |   5 +
 9 files changed, 261 insertions(+)
 create mode 100644 arch/arm/boards/embest-marsboard/Makefile
 create mode 100644 arch/arm/boards/embest-marsboard/board.c
 create mode 100644 arch/arm/boards/embest-marsboard/env/config-board
 create mode 100644 arch/arm/boards/embest-marsboard/flash-header-embest-marsboard.imxcfg
 create mode 100644 arch/arm/boards/embest-marsboard/lowlevel.c
arch/arm/boards/Makefile +1 -0
index 4934a42..df2519e 100644
@@ -29,6 +29,7 @@ obj-$(CONFIG_MACH_EDB9315A)			+= edb93xx/
 obj-$(CONFIG_MACH_EDB9315)			+= edb93xx/
 obj-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK)		+= efika-mx-smartbook/
 obj-$(CONFIG_MACH_EMBEST_RIOTBOARD)		+= embest-riotboard/
+obj-$(CONFIG_MACH_EMBEST_MARSBOARD)		+= embest-marsboard/
 obj-$(CONFIG_MACH_EUKREA_CPUIMX25)		+= eukrea_cpuimx25/
 obj-$(CONFIG_MACH_EUKREA_CPUIMX27)		+= eukrea_cpuimx27/
 obj-$(CONFIG_MACH_EUKREA_CPUIMX35)		+= eukrea_cpuimx35/
arch/arm/boards/embest-marsboard/Makefile new file +3 -0
new file mode 100644
index 0000000..e77796c
@@ -0,0 +1,3 @@
+obj-y += board.o flash-header-embest-marsboard.dcd.o
+extra-y += flash-header-embest-marsboard.dcd.S flash-header-embest-marsboard.dcd
+lwl-y += lowlevel.o
arch/arm/boards/embest-marsboard/board.c new file +90 -0

90 lines not on this page · raw message

arch/arm/boards/embest-marsboard/env/config-board new file +6 -0
new file mode 100644
index 0000000..e8e8378
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.linux.bootargs.base="console=ttymxc0,115200"
arch/arm/boards/embest-marsboard/flash-header-embest-marsboard.imxcfg new file +106 -0

106 lines not on this page · raw message

arch/arm/boards/embest-marsboard/lowlevel.c new file +44 -0

44 lines not on this page · raw message

arch/arm/dts/Makefile +2 -0
index 32fa44b..f6d00c1 100644
@@ -26,6 +26,7 @@ dtb-$(CONFIG_ARCH_IMX6) += imx6q-gk802.dtb \
 	imx6q-nitrogen6x.dtb \
 	imx6dl-nitrogen6x.dtb \
 	imx6s-riotboard.dtb \
+	imx6q-marsboard.dtb \
 	imx6q-udoo.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += dove-cubox-bb.dtb
 dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5_sockit.dtb \
@@ -40,6 +41,7 @@ obj-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o
 pbl-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.dtb.o
 pbl-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += imx51-genesi-efika-sb.dtb.o
 pbl-$(CONFIG_MACH_EMBEST_RIOTBOARD) += imx6s-riotboard.dtb.o
+pbl-$(CONFIG_MACH_EMBEST_MARSBOARD) += imx6q-marsboard.dtb.o
 pbl-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o
 pbl-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o imx53-qsrb.dtb.o
 pbl-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += imx53-voipac-bsb.dtb.o
arch/arm/mach-imx/Kconfig +4 -0
index 15b78e2..a5b87e8 100644
@@ -243,6 +243,10 @@ config MACH_SOLIDRUN_HUMMINGBOARD
 	bool "SolidRun Hummingboard"
 	select ARCH_IMX6
 
+config MACH_EMBEST_MARSBOARD
+	bool "Embest MarSBoard"
+	select ARCH_IMX6
+
 config MACH_EMBEST_RIOTBOARD
 	bool "Embest RIoTboard"
 	select ARCH_IMX6
images/Makefile.imx +5 -0
index bd1b300..7d927ce 100644
@@ -148,3 +148,8 @@ pblx-$(CONFIG_MACH_EMBEST_RIOTBOARD) += start_imx6s_riotboard
 CFG_start_imx6s_riotboard.pblx.imximg = $(board)/embest-riotboard/flash-header-embest-riotboard.imxcfg
 FILE_barebox-embest-imx6s-riotboard.img = start_imx6s_riotboard.pblx.imximg
 image-$(CONFIG_MACH_EMBEST_RIOTBOARD) += barebox-embest-imx6s-riotboard.img
+
+pblx-$(CONFIG_MACH_EMBEST_MARSBOARD) += start_imx6q_marsboard
+CFG_start_imx6q_marsboard.pblx.imximg = $(board)/embest-marsboard/flash-header-embest-marsboard.imxcfg
+FILE_barebox-embest-imx6q-marsboard.img = start_imx6q_marsboard.pblx.imximg
+image-$(CONFIG_MACH_EMBEST_MARSBOARD) += barebox-embest-imx6q-marsboard.img
Signature · 7 lines
1.8.5.3


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer
#2 lore raw

Re: [PATCH 2/3] MarSBoard: add new board

Hi Eric,

Quoted 8 lines · Eric Bénard
(quoted diff) +2 -0
+}
+postcore_initcall(marsboard_lwl_init);
arch/arm/boards/embest-marsboard/env/config-board new file +0 -0
new file mode 100644
index 0000000..e8e8378

arch/arm/boards/embest-marsboard/env/config-board line 6

Quoted 6 lines
arch/arm/boards/embest-marsboard/env/config-board new file +6 -0
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.linux.bootargs.base="console=ttymxc0,115200"

For the board specific environment I'd like to do the following:

move the $BOARD/env directory to a board specific name, like $BOARD/marsboard-env. In your board code (when you know that you're running on the marsboard), do: defaultenv_append_directory(marsboard_env);

For the environment snippet above: You can simply drop it. barebox will append a correct 'console=' parameter automatically for you.

arch/arm/boards/embest-marsboard/env/config-board

Quoted 7 lines
arch/arm/boards/embest-marsboard/env/config-board new file +7 -0
+wm 32 0x020c407c 0x0f0000c3
+wm 32 0x020c4080 0x000003ff
+/* enable AXI cache for VDOA/VPU/IPU */
+wm 32 0x020e0010 0xf00000cf
+/* set IPU AXI-id0 Qos=0xf(bypass AXI-id1 Qos=0x7 */
+wm 32 0x020e0018 0x007f007f
+wm 32 0x020e001c 0x007f007f

You can probably drop these. The -next branch has a patch in it which should do it:

3739b84 ARM i.MX6q: Mark VPU and IPU AXI transfers as cacheable, increase IPU priority

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

PATCH 3/3 arm: add defconfig for Embest boards

In reply to Eric Bénard
---
 arch/arm/configs/embest_defconfig | 100 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 100 insertions(+)
 create mode 100644 arch/arm/configs/embest_defconfig
arch/arm/configs/embest_defconfig new file +100 -0
new file mode 100644
index 0000000..09b4d35
@@ -0,0 +1,100 @@
+CONFIG_ARCH_IMX=y
+CONFIG_IMX_MULTI_BOARDS=y
+CONFIG_MACH_EMBEST_MARSBOARD=y
+CONFIG_MACH_EMBEST_RIOTBOARD=y
+CONFIG_ARCH_IMX_USBLOADER=y
+CONFIG_IMX_IIM=y
+CONFIG_IMX_IIM_FUSE_BLOW=y
+CONFIG_THUMB2_BAREBOX=y
+CONFIG_CMD_ARM_MMUINFO=y
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_ARM_UNWIND=y
+CONFIG_MMU=y
+CONFIG_TEXT_BASE=0x08f80000
+CONFIG_MALLOC_SIZE=0x4000000
+CONFIG_MALLOC_TLSF=y
+CONFIG_KALLSYMS=y
+CONFIG_RELOCATABLE=y
+CONFIG_LONGHELP=y
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_MENU=y
+CONFIG_CONSOLE_ACTIVATE_ALL=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
+CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/embest-marsboard/env"
+CONFIG_DEFAULT_LOGLEVEL=6
+CONFIG_DEBUG_INFO=y
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_MSLEEP=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_EXPORT=y
+CONFIG_CMD_READLINE=y
+CONFIG_CMD_MENU=y
+CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_TFTP=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_IOMEM=y
+CONFIG_CMD_CRC=y
+CONFIG_CMD_CRC_CMP=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_FLASH=y
+CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_VERBOSE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_BOOTM_OFTREE=y
+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
+CONFIG_CMD_BOOTM_AIMAGE=y
+# CONFIG_CMD_BOOTU is not set
+CONFIG_CMD_RESET=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_TIMEOUT=y
+CONFIG_CMD_PARTITION=y
+CONFIG_CMD_MAGICVAR=y
+CONFIG_CMD_MAGICVAR_HELP=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_UNCOMPRESS=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
+CONFIG_CMD_MIITOOL=y
+CONFIG_CMD_CLK=y
+CONFIG_CMD_DETECT=y
+CONFIG_NET=y
+CONFIG_NET_DHCP=y
+CONFIG_NET_PING=y
+CONFIG_OFDEVICE=y
+CONFIG_OF_BAREBOX_DRIVERS=y
+CONFIG_DRIVER_NET_FEC_IMX=y
+CONFIG_AT803X_PHY=y
+CONFIG_DRIVER_SPI_IMX=y
+CONFIG_I2C=y
+CONFIG_I2C_IMX=y
+CONFIG_MTD=y
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SST25L=y
+CONFIG_USB=y
+CONFIG_USB_IMX_CHIPIDEA=y
+CONFIG_USB_EHCI=y
+CONFIG_USB_ULPI=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DFU=y
+CONFIG_MCI=y
+CONFIG_MCI_IMX_ESDHC=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_GPIO_OF=y
+CONFIG_LED_GPIO_RGB=y
+CONFIG_LED_GPIO_BICOLOR=y
+CONFIG_LED_TRIGGERS=y
+CONFIG_FS_EXT4=y
+CONFIG_FS_TFTP=y
+CONFIG_FS_NFS=y
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_WRITE=y
+CONFIG_FS_FAT_LFN=y
+CONFIG_LZO_DECOMPRESS=y
Signature · 7 lines
1.8.5.3


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

Re: [PATCH 3/3] arm: add defconfig for Embest boards

Hi Eric,

Am Mittwoch, den 26.03.2014, 21:22 +0100 schrieb Eric Bénard:

Quoted 6 lines
---
 arch/arm/configs/embest_defconfig | 100 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 100 insertions(+)
 create mode 100644 arch/arm/configs/embest_defconfig

Please don't add new configs for multi-image capable boards. If anything is missing from the imx_v7_defconfig just add it there. This means at least both of your board additions should be reflected in the imx_v7 defconfig.

Regards,
Lucas

Signature · 10 lines
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

Re: [PATCH 3/3] arm: add defconfig for Embest boards

Hi Lucas,

Quoted 5 lines · Lucas Stach

Please don't add new configs for multi-image capable boards. If anything is missing from the imx_v7_defconfig just add it there. This means at least both of your board additions should be reflected in the imx_v7 defconfig.

OK, I'll include them to imx_v7_defconfig and also will factorize the dts and board support as both boards are very similar.

Eric

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox