Skip to contentSkip to conversation

mx6: Add support for the mx6solox variant

PATCH New Fabio Estevam 3 participants 15 messages Jun 24, 2014 – Jul 8, 2014

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH v5 1/4 mx6: Add support for the mx6solox variant

From: Fabio Estevam <[email protected]>

mx6solox is the newest member of the mx6 family.

Some of the new features on this variants are:
- Cortex M4 microcontroller (besides the CortexA9)
- Dual Gigabit Ethernet

Add the initial support for it.

---
Changes since v4:
- Go back to ifdef usae in clock.c as MXC_CCM_CSCDR1_UART_CLK_SEL is only defined for solox and sololite
Changes since v3:
- Add missing is_cpu_type(MXC_CPU_MX6SL)
Changes since v2:
- Improve commit log
- Use is_cpu_type() when possible

 arch/arm/cpu/armv7/mx6/clock.c            |   4 +-
 arch/arm/cpu/armv7/mx6/soc.c              |  26 +++++
 arch/arm/imx-common/cpu.c                 |   2 +
 arch/arm/include/asm/arch-imx/cpu.h       |   3 +-
 arch/arm/include/asm/arch-mx6/crm_regs.h  | 170 ++++++++++++++++++++++++++++++
 arch/arm/include/asm/arch-mx6/imx-regs.h  | 122 ++++++++++++++++++++-
 arch/arm/include/asm/arch-mx6/mx6-ddr.h   |   4 +
 arch/arm/include/asm/arch-mx6/mx6sx-ddr.h |  45 ++++++++
 8 files changed, 369 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-mx6/mx6sx-ddr.h
arch/arm/cpu/armv7/mx6/clock.c +2 -2
index bd65a08..d31fbbd 100644
@@ -214,7 +214,7 @@ static u32 get_uart_clk(void)
 	u32 reg, uart_podf;
 	u32 freq = decode_pll(PLL_USBOTG, MXC_HCLK) / 6; /* static divider */
 	reg = __raw_readl(&imx_ccm->cscdr1);
-#ifdef CONFIG_MX6SL
+#if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX))
 	if (reg & MXC_CCM_CSCDR1_UART_CLK_SEL)
 		freq = MXC_HCLK;
 #endif
@@ -282,7 +282,7 @@ static u32 get_emi_slow_clk(void)
 	return root_freq / (emi_slow_podf + 1);
 }
 
-#ifdef CONFIG_MX6SL
+#if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX))
 static u32 get_mmdc_ch0_clk(void)
 {
 	u32 cbcmr = __raw_readl(&imx_ccm->cbcmr);
arch/arm/cpu/armv7/mx6/soc.c +26 -0
index 1725279..e394e3f 100644
@@ -79,9 +79,15 @@ u32 __weak get_board_rev(void)
 void init_aips(void)
 {
 	struct aipstz_regs *aips1, *aips2;
+#ifdef CONFIG_MX6SX
+	struct aipstz_regs *aips3;
+#endif
 
 	aips1 = (struct aipstz_regs *)AIPS1_BASE_ADDR;
 	aips2 = (struct aipstz_regs *)AIPS2_BASE_ADDR;
+#ifdef CONFIG_MX6SX
+	aips3 = (struct aipstz_regs *)AIPS3_BASE_ADDR;
+#endif
 
 	/*
 	 * Set all MPROTx to be non-bufferable, trusted for R/W,
@@ -107,6 +113,26 @@ void init_aips(void)
 	writel(0x00000000, &aips2->opacr2);
 	writel(0x00000000, &aips2->opacr3);
 	writel(0x00000000, &aips2->opacr4);
+
+#ifdef CONFIG_MX6SX
+	/*
+	 * Set all MPROTx to be non-bufferable, trusted for R/W,
+	 * not forced to user-mode.
+	 */
+	writel(0x77777777, &aips3->mprot0);
+	writel(0x77777777, &aips3->mprot1);
+
+	/*
+	 * Set all OPACRx to be non-bufferable, not require
+	 * supervisor privilege level for access,allow for
+	 * write access and untrusted master access.
+	 */
+	writel(0x00000000, &aips3->opacr0);
+	writel(0x00000000, &aips3->opacr1);
+	writel(0x00000000, &aips3->opacr2);
+	writel(0x00000000, &aips3->opacr3);
+	writel(0x00000000, &aips3->opacr4);
+#endif
 }
 
 static void clear_ldo_ramp(void)
arch/arm/imx-common/cpu.c +2 -0
index 5a09107..7bb0e83 100644
@@ -112,6 +112,8 @@ const char *get_imx_type(u32 imxtype)
 		return "6SOLO";	/* Solo version of the mx6 */
 	case MXC_CPU_MX6SL:
 		return "6SL";	/* Solo-Lite version of the mx6 */
+	case MXC_CPU_MX6SX:
+		return "6SX";   /* SoloX version of the mx6 */
 	case MXC_CPU_MX51:
 		return "51";
 	case MXC_CPU_MX53:
arch/arm/include/asm/arch-imx/cpu.h +2 -1
index a35940e..a3cc96f 100644
@@ -8,6 +8,7 @@
 #define MXC_CPU_MX53		0x53
 #define MXC_CPU_MX6SL		0x60
 #define MXC_CPU_MX6DL		0x61
-#define MXC_CPU_MX6SOLO		0x62
+#define MXC_CPU_MX6SX		0x62
 #define MXC_CPU_MX6Q		0x63
 #define MXC_CPU_MX6D		0x64
+#define MXC_CPU_MX6SOLO		0x65 /* dummy ID */
arch/arm/include/asm/arch-mx6/crm_regs.h +170 -0

455 lines not on this page · raw message

arch/arm/include/asm/arch-mx6/imx-regs.h +118 -4

227 lines not on this page · raw message

arch/arm/include/asm/arch-mx6/mx6-ddr.h +4 -0
index d544d2e..5ebabfa 100644
@@ -13,7 +13,11 @@
 #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
 #include "mx6dl-ddr.h"
 #else
+#ifdef CONFIG_MX6SX
+#include "mx6sx-ddr.h"
+#else
 #error "Please select cpu"
+#endif	/* CONFIG_MX6SX */
 #endif	/* CONFIG_MX6DL or CONFIG_MX6S */
 #endif	/* CONFIG_MX6Q */
 #else
arch/arm/include/asm/arch-mx6/mx6sx-ddr.h new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
1.8.3.2
author reviewer
#1 lore raw

PATCH v5 1/4 mx6: Add support for the mx6solox variant

Hi Stefano,

Quoted 11 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

mx6solox is the newest member of the mx6 family.

Some of the new features on this variants are:
- Cortex M4 microcontroller (besides the CortexA9)
- Dual Gigabit Ethernet

Add the initial support for it.

Any comments about this series?

#2 lore raw

PATCH v5 1/4 mx6: Add support for the mx6solox variant

Hi Fabio,

Quoted 11 lines · Fabio Estevam

Hi Stefano,

Quoted 8 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

mx6solox is the newest member of the mx6 family.

Some of the new features on this variants are:
- Cortex M4 microcontroller (besides the CortexA9)
- Dual Gigabit Ethernet

Quoted 5 lines
Quoted 3 lines

Add the initial support for it.

Any comments about this series?

I have only taken a short look because the series should flow after 2014.07. Anyway, I could push them into -next.

Regards,
Stefano

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
=====================================================================
author reviewer
#3 lore raw

PATCH v5 1/4 mx6: Add support for the mx6solox variant

Hi Stefano,

Quoted 2 lines · Stefano Babic

I have only taken a short look because the series should flow after 2014.07. Anyway, I could push them into -next.

Pushing them into -next would be very helpful, so that we can continue on adding new support for mx6solox.

Thanks,

Fabio Estevam

author reviewer
#4 lore raw

PATCH v5 1/4 mx6: Add support for the mx6solox variant

Hi Stefano,

Quoted 9 lines · Fabio Estevam

Hi Stefano,

Quoted 2 lines · Stefano Babic

I have only taken a short look because the series should flow after 2014.07. Anyway, I could push them into -next.

Pushing them into -next would be very helpful, so that we can continue on adding new support for mx6solox.

Would it be possible to review the initial series that adds mx6solox support and apply it to -next if you are happy with it?

Otherwise, I am not able to proceed with further mx6solox U-boot upstream work.

#5 lore raw

PATCH v5 1/4 mx6: Add support for the mx6solox variant

Quoted 5 lines · Fabio Estevam
Quoted 4 lines · Fabio Estevam
Quoted 2 lines · Stefano Babic

I have only taken a short look because the series should flow after 2014.07. Anyway, I could push them into -next.

Quoted 7 lines
Quoted 2 lines

Pushing them into -next would be very helpful, so that we can continue on adding new support for mx6solox.

Would it be possible to review the initial series that adds mx6solox support and apply it to -next if you are happy with it?

Otherwise, I am not able to proceed with further mx6solox U-boot upstream work.

I second this request. I see no reason why patches takes so long to get applied in master/next when people agree with them.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#6 lore raw

PATCH v5 1/4 mx6: Add support for the mx6solox variant

In reply to Fabio Estevam

Hi Fabio,

Quoted 10 lines · Fabio Estevam

Hi Stefano,

Quoted 7 lines · Fabio Estevam

Hi Stefano,

Quoted 2 lines · Stefano Babic

I have only taken a short look because the series should flow after 2014.07. Anyway, I could push them into -next.

Quoted 8 lines
Quoted 2 lines

Pushing them into -next would be very helpful, so that we can continue on adding new support for mx6solox.

Would it be possible to review the initial series that adds mx6solox support and apply it to -next if you are happy with it?

Otherwise, I am not able to proceed with further mx6solox U-boot upstream work.

Sorry, I was not in office last week, I am back again. I will apply them now.

Best regards,
Stefano

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
=====================================================================
author reviewer
#7 lore raw

PATCH v5 2/4 mx6sx: Add pin definitions

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

Add the pin definitions for mx6sx.

---
Changes since v4:
- None
Changes since v3:
- None
Changes since v2:
- None
Changes since v1:
- None

 arch/arm/include/asm/arch-mx6/mx6-pins.h   |    2 +
 arch/arm/include/asm/arch-mx6/mx6sx_pins.h | 1675 ++++++++++++++++++++++++++++
 2 files changed, 1677 insertions(+)
 create mode 100644 arch/arm/include/asm/arch-mx6/mx6sx_pins.h
arch/arm/include/asm/arch-mx6/mx6-pins.h +2 -0
index dcd7f8f..534f780 100644
@@ -35,6 +35,8 @@ enum {
 };
 #elif defined(CONFIG_MX6SL)
 #include "mx6sl_pins.h"
+#elif defined(CONFIG_MX6SX)
+#include "mx6sx_pins.h"
 #else
 #error "Please select cpu"
 #endif	/* CONFIG_MX6Q */
arch/arm/include/asm/arch-mx6/mx6sx_pins.h new file +1675 -0

1,675 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#8 lore raw

PATCH v5 2/4 mx6sx: Add pin definitions

Quoted 6 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Add the pin definitions for mx6sx.

---

Applied to u-boot-imx, -next branch, 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
=====================================================================
author reviewer
#9 lore raw

PATCH v5 3/4 mx6: clock: Do not enable sata and ipu clocks

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

mx6sx does not have sata nor ipu blocks, so do not handle such clocks.

---
Changes since v4:
- None
Changes since v3:
- None
Changes since v2:
- None
Changes since v1:
- None

 arch/arm/cpu/armv7/mx6/clock.c | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/cpu/armv7/mx6/clock.c +8 -0
index d31fbbd..51c964c 100644
@@ -437,6 +437,7 @@ static int enable_enet_pll(uint32_t en)
 	return 0;
 }
 
+#ifndef CONFIG_MX6SX
 static void ungate_sata_clock(void)
 {
 	struct mxc_ccm_reg *const imx_ccm =
@@ -445,6 +446,7 @@ static void ungate_sata_clock(void)
 	/* Enable SATA clock. */
 	setbits_le32(&imx_ccm->CCGR5, MXC_CCM_CCGR5_SATA_MASK);
 }
+#endif
 
 static void ungate_pcie_clock(void)
 {
@@ -455,11 +457,13 @@ static void ungate_pcie_clock(void)
 	setbits_le32(&imx_ccm->CCGR4, MXC_CCM_CCGR4_PCIE_MASK);
 }
 
+#ifndef CONFIG_MX6SX
 int enable_sata_clock(void)
 {
 	ungate_sata_clock();
 	return enable_enet_pll(BM_ANADIG_PLL_ENET_ENABLE_SATA);
 }
+#endif
 
 int enable_pcie_clock(void)
 {
@@ -491,7 +495,9 @@ int enable_pcie_clock(void)
 	clrbits_le32(&ccm_regs->cbcmr, MXC_CCM_CBCMR_PCIE_AXI_CLK_SEL);
 
 	/* Party time! Ungate the clock to the PCIe. */
+#ifndef CONFIG_MX6SX
 	ungate_sata_clock();
+#endif
 	ungate_pcie_clock();
 
 	return enable_enet_pll(BM_ANADIG_PLL_ENET_ENABLE_SATA |
@@ -573,6 +579,7 @@ int do_mx6_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
+#ifndef CONFIG_MX6SX
 void enable_ipu_clock(void)
 {
 	struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
@@ -581,6 +588,7 @@ void enable_ipu_clock(void)
 	reg |= MXC_CCM_CCGR3_IPU1_IPU_MASK;
 	writel(reg, &mxc_ccm->CCGR3);
 }
+#endif
 /***************************************************/
 
 U_BOOT_CMD(
Signature · 1 line
1.8.3.2
#10 lore raw

PATCH v5 3/4 mx6: clock: Do not enable sata and ipu clocks

Quoted 6 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

mx6sx does not have sata nor ipu blocks, so do not handle such clocks.

---

Applied to u-boot-imx, -next branch, 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
=====================================================================
author reviewer
#11 lore raw

PATCH v5 4/4 mx6sx: Add initial support for mx6sxsabresd board

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

---
Changes since v4:
- None
Changes since v3:
- None
Changes since v2:
- Adjust CONFIG_LOADADDR
Changes since v1:
- Previous commit log belonged to 1/4 patch, so moved it to the correct patch

 board/freescale/mx6sxsabresd/Makefile       |   6 +
 board/freescale/mx6sxsabresd/imximage.cfg   | 105 ++++++++++++++++
 board/freescale/mx6sxsabresd/mx6sxsabresd.c |  95 ++++++++++++++
 boards.cfg                                  |   1 +
 include/configs/mx6sxsabresd.h              | 186 ++++++++++++++++++++++++++++
 5 files changed, 393 insertions(+)
 create mode 100644 board/freescale/mx6sxsabresd/Makefile
 create mode 100644 board/freescale/mx6sxsabresd/imximage.cfg
 create mode 100644 board/freescale/mx6sxsabresd/mx6sxsabresd.c
 create mode 100644 include/configs/mx6sxsabresd.h
board/freescale/mx6sxsabresd/Makefile new file +6 -0
new file mode 100644
index 0000000..97dbfda
@@ -0,0 +1,6 @@
+# (C) Copyright 2014 Freescale Semiconductor, Inc.
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y  := mx6sxsabresd.o
board/freescale/mx6sxsabresd/imximage.cfg new file +105 -0

105 lines not on this page · raw message

board/freescale/mx6sxsabresd/mx6sxsabresd.c new file +95 -0

95 lines not on this page · raw message

boards.cfg +1 -0
index fd4324d..b726feb 100644
@@ -328,6 +328,7 @@ Active  arm         armv7          mx6         freescale       mx6qsabreauto
 Active  arm         armv7          mx6         freescale       mx6sabresd          mx6dlsabresd                          mx6sabresd:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL                                                             Fabio Estevam <[email protected]>
 Active  arm         armv7          mx6         freescale       mx6sabresd          mx6qsabresd                           mx6sabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q                                                           Fabio Estevam <[email protected]>
 Active  arm         armv7          mx6         freescale       mx6slevk            mx6slevk                              mx6slevk:IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL                                                                   Fabio Estevam <[email protected]>
+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          omap3       -               overo               omap3_overo                           -                                                                                                                                 Steve Sakoman <[email protected]>
include/configs/mx6sxsabresd.h new file +186 -0

186 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#12 lore raw

PATCH v5 4/4 mx6sx: Add initial support for mx6sxsabresd board

Quoted 4 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

---

Applied to u-boot-imx, -next branch, 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
=====================================================================
#13 lore raw

PATCH v5 1/4 mx6: Add support for the mx6solox variant

In reply to Fabio Estevam
Quoted 4 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

mx6solox is the newest member of the mx6 family.

Quoted 8 lines

Some of the new features on this variants are:
- Cortex M4 microcontroller (besides the CortexA9)
- Dual Gigabit Ethernet

Add the initial support for it.

---

Applied to u-boot-imx, -next branch, 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
=====================================================================
author reviewer
#14 lore raw

PATCH v5 1/4 mx6: Add support for the mx6solox variant

Quoted 9 lines · Stefano Babic
Quoted 8 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

mx6solox is the newest member of the mx6 family.

Some of the new features on this variants are:
- Cortex M4 microcontroller (besides the CortexA9)
- Dual Gigabit Ethernet

Quoted 6 lines
Quoted 4 lines

Add the initial support for it.

---

Applied to u-boot-imx, -next branch, thanks !

Thanks, Stefano