Skip to contentSkip to conversation

Add TQ Systems TQMa6 board support

PATCH New Markus Niebel 2 participants 2 messages Jul 18, 2014 – Jul 23, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 Add TQ Systems TQMa6 board support

From: Markus Niebel <[email protected]>

This patch adds the changes to boards.cfg and the board directory under board/tqc.

TQMa6 is a family of modules based on Freescale i.MX6. It consists of TQMa6Q (i.MX6 Quad), TQMa6D (i.MX6 Dual) featuring eMMC, and 1 GiB DDR3 TQMa6S (i.MX6 Solo) featuring eMMC and 512 MiB DDR3

The modules need a baseboard. Initially the MBa6x starterkit mainboard is supported. To easy support for other mainboards the functionality is splitted in one file for the module (tqma6.c) and one file for the baseboard (tqma6_ mba6).

The modules can be boot from eMMC (on USDHC3) and SPI flash.

The following features are supported:
- MMC: eMMC on module (on USDHC3) and SD-card (on MBa6x mainboard)
- Ethernet: RGMII using micrel KSZ9031 phy on MBa6x mainboard for TQMa6<x> module. The phy needs special configurations for the pad skew registers to adjust for the signal routing.
Also support for standard ethernet commands and uppdate via tftp.
- SPI: ECSPI1 with bootable serial flash on module and two additional chip selects on MBa6x
- I2C: This patch adds support for the I2C busses on the TQMa6<x> modules (I2C3) and MBa6x baseboards (I2C1). The LM75 temperature sensors on TQMa6<x> and MBa6x are also configured.
- USB: high speed host 1 on MBa6x and support for USB storage
- PMIC: support for pfuze 100 on TQMa6<x>

---
History:

- changes for v4:
- rebase to current u-boot-imx
- implement suggestions from S. Babic
- remove checkpatch warnings
- use puts wherever possible
- change dynamic env "board" to "board_name"
- define for PMIC I2C Bus
- add comment to the RGMII pad skew settings on baseboard
- prefix board specific defines in config header with TQMA6_ instead of CONFIG_
- optimize memory mapping (u-boot to end of DRAM, change FDT placement)
- change eMMC DSR fixup (patch posted to linux mainline)
- use rootpath instead of nfsroot in env (all other boards do so)

- changes for v3:
- squash the patches as suggested by S. Babic
- fix copy and paste error for MBa6x SD-Card slot
- fix WP handling for MBa6x SD-Card slot
- move PMIC init to board_late_init (power_init_board() does not work)

- changes for v2:
- fix long line warning as suggested by W. Denk
- remove baudrate from CONFIG_EXTRA_ENV_SETTINGS
- remove unused define CONFIG_TQMA6X_BASEBOARD_NAME
- add missing mmcblkdev definition to mmcboot logic in CONFIG_EXTRA_ENV_SETTINGS
- add missing stuff for tftp and nfs in CONFIG_EXTRA_ENV_SETTINGS
- fix fdt_file in env (was partially fdt)
- add missing int power_init_board(void) to tqma6.c

 board/tqc/tqma6/Makefile     |    9 +
 board/tqc/tqma6/README       |   35 +++
 board/tqc/tqma6/clocks.cfg   |   24 +++
 board/tqc/tqma6/tqma6.c      |  262 +++++++++++++++++++++++
 board/tqc/tqma6/tqma6_bb.h   |   30 +++
 board/tqc/tqma6/tqma6_mba6.c |  361 +++++++++++++++++++++++++++++++
 board/tqc/tqma6/tqma6q.cfg   |  125 +++++++++++
 board/tqc/tqma6/tqma6s.cfg   |  125 +++++++++++
 boards.cfg                   |    4 +
 include/configs/tqma6.h      |  483 ++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 1458 insertions(+)
 create mode 100644 board/tqc/tqma6/Makefile
 create mode 100644 board/tqc/tqma6/README
 create mode 100644 board/tqc/tqma6/clocks.cfg
 create mode 100644 board/tqc/tqma6/tqma6.c
 create mode 100644 board/tqc/tqma6/tqma6_bb.h
 create mode 100644 board/tqc/tqma6/tqma6_mba6.c
 create mode 100644 board/tqc/tqma6/tqma6q.cfg
 create mode 100644 board/tqc/tqma6/tqma6s.cfg
 create mode 100644 include/configs/tqma6.h
board/tqc/tqma6/Makefile new file +9 -0
new file mode 100644
index 0000000..9ee6920
@@ -0,0 +1,9 @@
+#
+# Copyright (C) 2014, Markus Niebel <[email protected]>
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y  := tqma6.o
+
+obj-$(CONFIG_MBA6) += tqma6_mba6.o
board/tqc/tqma6/README new file +35 -0
new file mode 100644
index 0000000..2c012e7
@@ -0,0 +1,35 @@
+U-Boot for the TQ Systems TQMa6 modules
+
+This file contains information for the port of
+U-Boot to the TQ Systems TQMa6 modules.
+
+1. Boot source
+--------------
+
+The following boot source is supported:
+
+- SD/eMMC
+- SPI NOR
+
+2. Building
+------------
+
+To build U-Boot for the TQ Systems TQMa6 modules:
+
+	make tqma6<x>_<baseboard>_<boot>_config
+	make
+
+x is a placeholder for the CPU variant
+q - means i.MX6Q/D: TQMa6Q (i.MX6Q) and TQMa6D  (i.MX6D)
+s - means i.MX6S: TQMa6S  (i.MX6S)
+
+baseboard is a placeholder for the boot device
+mmc - means eMMC
+spi - mean SPI NOR
+
+This gives the following configurations:
+
+tqma6q_mba6_mmc_config
+tqma6q_mba6_spi_config
+tqma6s_mba6_mmc_config
+tqma6s_mba6_spi_config
board/tqc/tqma6/clocks.cfg new file +24 -0
new file mode 100644
index 0000000..d9dd273
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2013 Boundary Devices
+ * Copyright (C) 2013, 2014 Markus Niebel <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ *
+ * Refer doc/README.imximage for more details about how-to configure
+ * and create imximage boot image
+ */
+
+/* set the default clock gate to save power */
+DATA 4, CCM_CCGR0, 0x00C03F3F
+DATA 4, CCM_CCGR1, 0x0030FC03
+DATA 4, CCM_CCGR2, 0x0FFFC000
+DATA 4, CCM_CCGR3, 0x3FF00000
+DATA 4, CCM_CCGR4, 0x00FFF300
+DATA 4, CCM_CCGR5, 0x0F0000C3
+DATA 4, CCM_CCGR6, 0x000003FF
+
+/* enable AXI cache for VDOA/VPU/IPU */
+DATA 4, MX6_IOMUXC_GPR4, 0xF00000CF
+/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */
+DATA 4, MX6_IOMUXC_GPR6, 0x007F007F
+DATA 4, MX6_IOMUXC_GPR7, 0x007F007F
board/tqc/tqma6/tqma6.c new file +262 -0

262 lines not on this page · raw message

board/tqc/tqma6/tqma6_bb.h new file +30 -0
new file mode 100644
index 0000000..9d072d2
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2013, 2014 TQ Systems
+ * Author: Markus Niebel <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __TQMA6_BB__
+#define __TQMA6_BB
+
+#include <common.h>
+
+int tqma6_bb_board_mmc_getwp(struct mmc *mmc);
+int tqma6_bb_board_mmc_getcd(struct mmc *mmc);
+int tqma6_bb_board_mmc_init(bd_t *bis);
+
+int tqma6_bb_board_early_init_f(void);
+int tqma6_bb_board_init(void);
+int tqma6_bb_board_late_init(void);
+int tqma6_bb_checkboard(void);
+
+const char *tqma6_bb_get_boardname(void);
+/*
+ * Device Tree Support
+ */
+#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
+void tqma6_bb_ft_board_setup(void *blob, bd_t *bd);
+#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
+
+#endif
board/tqc/tqma6/tqma6_mba6.c new file +361 -0

361 lines not on this page · raw message

board/tqc/tqma6/tqma6q.cfg new file +125 -0

125 lines not on this page · raw message

board/tqc/tqma6/tqma6s.cfg new file +125 -0

125 lines not on this page · raw message

boards.cfg +4 -0
index 65bbec5..14084de 100644
@@ -334,6 +334,10 @@ Active  arm         armv7          mx6         freescale       mx6slevk
 Active  arm         armv7          mx6         freescale       mx6sxsabresd        mx6sxsabresd                          mx6sxsabresd:IMX_CONFIG=board/freescale/mx6sxsabresd/imximage.cfg,MX6SX                                                           Fabio Estevam <[email protected]>
 Active  arm         armv7          mx6         gateworks       gw_ventana          gwventana                             gw_ventana:IMX_CONFIG=board/gateworks/gw_ventana/gw_ventana.cfg,MX6QDL,SPL                                                        Tim Harvey <[email protected]>
 Active  arm         armv7          mx6         solidrun        hummingboard        hummingboard_solo                     hummingboard:IMX_CONFIG=board/solidrun/hummingboard/solo.cfg,MX6S,DDR_MB=512                                                      Jon Nettleton <[email protected]>
+Active  arm         armv7          mx6         tqc             tqma6               tqma6q_mba6_mmc                       tqma6:IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MX6Q,MBA6,TQMA6X_MMC_BOOT                                                            Markus Niebel <[email protected]>
+Active  arm         armv7          mx6         tqc             tqma6               tqma6q_mba6_spi                       tqma6:IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MX6Q,MBA6,TQMA6X_SPI_BOOT                                                            Markus Niebel <[email protected]>
+Active  arm         armv7          mx6         tqc             tqma6               tqma6s_mba6_mmc                       tqma6:IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MX6S,MBA6,TQMA6X_MMC_BOOT                                                            Markus Niebel <[email protected]>
+Active  arm         armv7          mx6         tqc             tqma6               tqma6s_mba6_spi                       tqma6:IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MX6S,MBA6,TQMA6X_SPI_BOOT                                                            Markus Niebel <[email protected]>
 Active  arm         armv7          omap3       -               overo               omap3_overo                           -                                                                                                                                 Steve Sakoman <[email protected]>
 Active  arm         armv7          omap3       -               pandora             omap3_pandora                         -                                                                                                                                 Grazvydas Ignotas <[email protected]>
 Active  arm         armv7          omap3       8dtech          eco5pk              eco5pk                                -                                                                                                                                 Raphael Assenat <[email protected]>
include/configs/tqma6.h new file +483 -0

483 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v4 1/1 Add TQ Systems TQMa6 board support

Quoted 30 lines · Markus Niebel

From: Markus Niebel <[email protected]>

This patch adds the changes to boards.cfg and the board directory under board/tqc.

TQMa6 is a family of modules based on Freescale i.MX6. It consists of TQMa6Q (i.MX6 Quad), TQMa6D (i.MX6 Dual) featuring eMMC, and 1 GiB DDR3 TQMa6S (i.MX6 Solo) featuring eMMC and 512 MiB DDR3

The modules need a baseboard. Initially the MBa6x starterkit mainboard is supported. To easy support for other mainboards the functionality is splitted in one file for the module (tqma6.c) and one file for the baseboard (tqma6_ mba6).

The modules can be boot from eMMC (on USDHC3) and SPI flash.

The following features are supported:
- MMC: eMMC on module (on USDHC3) and SD-card (on MBa6x mainboard)
- Ethernet: RGMII using micrel KSZ9031 phy on MBa6x mainboard for TQMa6<x> module. The phy needs special configurations for the pad skew registers to adjust for the signal routing.
Also support for standard ethernet commands and uppdate via tftp.
- SPI: ECSPI1 with bootable serial flash on module and two additional chip selects on MBa6x
- I2C: This patch adds support for the I2C busses on the TQMa6<x> modules (I2C3) and MBa6x baseboards (I2C1). The LM75 temperature sensors on TQMa6<x> and MBa6x are also configured.
- USB: high speed host 1 on MBa6x and support for USB storage
- PMIC: support for pfuze 100 on TQMa6<x>

Quoted 2 lines

---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================