[U-Boot] [RFC] Add Nitrogen6x support.

Eric Nelson eric.nelson at boundarydevices.com
Wed Jan 30 19:10:51 CET 2013


I'd like to get some feedback on this patch set which adds support
for our Nitrogen6X series of boards because this patch introduces
some additional feature for i.MX6x processors specifically, but
possibly other i.MX processors as well.

To give a little background, we're supporting a variety of 
i.MX6 processors with out Nitrogen6X product, including
the Dual-Lite and Solo processors.

Some of this has been discussed on the mailing list,
most recently here:
	http://lists.denx.de/pipermail/u-boot/2013-January/#144323

To give a little background, the i.MX6x architecture has 
three major variants:
	i.MX6 Quad and i.MX6 Dual 
	i.MX6 Dual-Lite and i.MX6 Solo
	i.MX6 Solo Lite

Because the first two are pin compatible, those variants are
what we're supporting in this product line. 

Unfortunately, they have differing register locations, and
also support different DDR clock rates (1066MHz on Quad/Dual
and 800MHz on Dual-Lite/Solo).

To simplify support for the two, we recently pushed patches
adding support for the preprocessor to the 'imximage' utility
and these have been merged.

This allows us to define a single set of DCD data to
configure portions of the device setup like this
line from board/boundary/ddr-setup.cfg:

	DATA 4, IOM_DRAM_SDQS0, 0x00000030

The address of IOM_DRAM_SDQS0 depends on which processor
variant is used. To resolve this, we've introduced 
header files
	arch/arm/include/asm/arch-mx6/mx6q-ddr.h
and
	arch/arm/include/asm/arch-mx6/mx6dl-ddr.h

The 'q' refers to Quad/Dual. The 'dl' refers to Dual-Lite/Solo.

To make things simpler, we've added this header file, 
which includes one of the headers above based on whether
we're compiling for MX6Q or MX6DL.

	arch/arm/include/asm/arch-mx6/mx6-ddr.h

The net result seems to be fairly clean. We're able
to express the various boards concisely in these files
within board/boundary/nitrogen6x:
	board/boundary/nitrogen6x/nitrogen6dl2g.cfg
	board/boundary/nitrogen6x/nitrogen6dl.cfg
	board/boundary/nitrogen6x/nitrogen6q2g.cfg
	board/boundary/nitrogen6x/nitrogen6q.cfg
	board/boundary/nitrogen6x/nitrogen6s1g.cfg
	board/boundary/nitrogen6x/nitrogen6s.cfg

By using the preprocessor, we were also able to separate
common setup for clocks and DDR from the specific memory
arrangements that differentiate some of our boards:
	clocks.cfg
	ddr-setup.cfg
	1066mhz_4x128mx16.cfg
	1066mhz_4x256mx16.cfg
	800mhz_2x128mx16.cfg
	800mhz_2x256mx16.cfg
	800mhz_4x128mx16.cfg
	800mhz_4x256mx16.cfg

We're trying to keep the nomenclature consistent:
	6x	- refers to things that are independent
		of the variant used
	6q	- refers to the 6Quad/6Dual variant
	6dl	- refers to the 6Dual-Lite/6Solo

Note that this differs from what's currently done in
some other i.MX6 headers.

For example, arch/arm/include/asm/arch-mx6/mx6x_pins.h
defines the pad setting for UART2 using symbol
	MX6Q_PAD_EIM_D26__UART2_TXD
while arch/arm/include/asm/arch-mx6/mx6dl_pins.h defines
	MX6DL_PAD_EIM_D26__UART2_TXD

This necessitated a bit of preprocessor-fu in nitrogen6x.c
where we create a common MX6PAD macro:

	#ifdef FOR_DL_SOLO
	#define MX6PAD(a) MX6DL_PAD_##a
	#else
	#define MX6PAD(a) MX6Q_PAD_##a
	#endif

and use it later like this:
	MX6PAD(EIM_D26__UART2_TXD)

It seems worthwhile to rename mx6x_pins.h to mx6q_pins.h
and also change the pad declarations so that other boards
can avoid the MX6PAD() macro.

I also suggest that we add an intermediate mx6_pins.h or
mx6x_pins.h file that includes the appropriate file based
on the processor macro.

There are a couple of other changes to common files that
I'll break out before submitting this officially, but
I'm hoping to get some feedback first.

Eric Nelson (1):
  Add support for Boundary Devices Nitrogen6x boards

 MAINTAINERS                                        |    8 +
 arch/arm/include/asm/arch-mx6/crm_regs.h           |   12 +
 arch/arm/include/asm/arch-mx6/iomux.h              |    5 +
 arch/arm/include/asm/arch-mx6/mx6-ddr.h            |   73 ++
 arch/arm/include/asm/arch-mx6/mx6dl-ddr.h          |   59 ++
 arch/arm/include/asm/arch-mx6/mx6dl_pins.h         |    3 +
 arch/arm/include/asm/arch-mx6/mx6q-ddr.h           |   57 ++
 board/boundary/nitrogen6x/1066mhz_4x128mx16.cfg    |   37 +
 board/boundary/nitrogen6x/1066mhz_4x256mx16.cfg    |   37 +
 board/boundary/nitrogen6x/6x_bootscript.txt        |   58 ++
 .../boundary/nitrogen6x/6x_bootscript_android.txt  |   64 ++
 .../nitrogen6x/6x_bootscript_android_recovery.txt  |   64 ++
 board/boundary/nitrogen6x/6x_upgrade.txt           |   46 +
 board/boundary/nitrogen6x/800mhz_2x128mx16.cfg     |   37 +
 board/boundary/nitrogen6x/800mhz_2x256mx16.cfg     |   37 +
 board/boundary/nitrogen6x/800mhz_4x128mx16.cfg     |   37 +
 board/boundary/nitrogen6x/800mhz_4x256mx16.cfg     |   37 +
 board/boundary/nitrogen6x/Makefile                 |   41 +
 board/boundary/nitrogen6x/README                   |   93 ++
 board/boundary/nitrogen6x/clocks.cfg               |   31 +
 board/boundary/nitrogen6x/ddr-setup.cfg            |   94 ++
 board/boundary/nitrogen6x/nitrogen6dl.cfg          |   46 +
 board/boundary/nitrogen6x/nitrogen6dl2g.cfg        |   46 +
 board/boundary/nitrogen6x/nitrogen6q.cfg           |   46 +
 board/boundary/nitrogen6x/nitrogen6q2g.cfg         |   46 +
 board/boundary/nitrogen6x/nitrogen6s.cfg           |   46 +
 board/boundary/nitrogen6x/nitrogen6s1g.cfg         |   46 +
 board/boundary/nitrogen6x/nitrogen6x.c             |  901 ++++++++++++++++++++
 boards.cfg                                         |    6 +
 drivers/usb/host/ehci-mx6.c                        |    1 -
 include/configs/nitrogen6x.h                       |  284 ++++++
 31 files changed, 2397 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/include/asm/arch-mx6/mx6-ddr.h
 create mode 100644 arch/arm/include/asm/arch-mx6/mx6dl-ddr.h
 create mode 100644 arch/arm/include/asm/arch-mx6/mx6q-ddr.h
 create mode 100644 board/boundary/nitrogen6x/1066mhz_4x128mx16.cfg
 create mode 100644 board/boundary/nitrogen6x/1066mhz_4x256mx16.cfg
 create mode 100644 board/boundary/nitrogen6x/6x_bootscript.txt
 create mode 100644 board/boundary/nitrogen6x/6x_bootscript_android.txt
 create mode 100644 board/boundary/nitrogen6x/6x_bootscript_android_recovery.txt
 create mode 100644 board/boundary/nitrogen6x/6x_upgrade.txt
 create mode 100644 board/boundary/nitrogen6x/800mhz_2x128mx16.cfg
 create mode 100644 board/boundary/nitrogen6x/800mhz_2x256mx16.cfg
 create mode 100644 board/boundary/nitrogen6x/800mhz_4x128mx16.cfg
 create mode 100644 board/boundary/nitrogen6x/800mhz_4x256mx16.cfg
 create mode 100644 board/boundary/nitrogen6x/Makefile
 create mode 100644 board/boundary/nitrogen6x/README
 create mode 100644 board/boundary/nitrogen6x/clocks.cfg
 create mode 100644 board/boundary/nitrogen6x/ddr-setup.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6dl.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6dl2g.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6q.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6q2g.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6s.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6s1g.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6x.c
 create mode 100644 include/configs/nitrogen6x.h

-- 
1.7.9.5



More information about the U-Boot mailing list