Skip to contentSkip to conversation

mx6: Add solo-lite variant support

PATCH New festevam at gmail.com 1 participant 2 messages Apr 10, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1365622378-11196-1-git-send-email-a

festevam at gmail.com

author reviewer
#1 lore raw

PATCH v3 2/3 mx6: Add solo-lite variant support

From: Fabio Estevam <[email protected]>

mx6 solo-lite is another member of the mx6 series.

For more information about mx6 solo-lite, please visit:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6SL&nodeId=018rH3ZrDRB24A

---
Changes since v2:
- None
Changes since v1:
- None

 arch/arm/cpu/armv7/mx6/clock.c             |   38 ++++++++++++++++-
 arch/arm/include/asm/arch-mx6/crm_regs.h   |    5 +++
 arch/arm/include/asm/arch-mx6/imx-regs.h   |   63 +++++++++++++++++++++++++++-
 arch/arm/include/asm/arch-mx6/mx6-pins.h   |    4 ++
 arch/arm/include/asm/arch-mx6/mx6sl_pins.h |   25 +++++++++++
 5 files changed, 132 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-mx6/mx6sl_pins.h
arch/arm/cpu/armv7/mx6/clock.c +36 -2
index a50db70..8cba4fd 100644
@@ -186,12 +186,16 @@ static u32 get_ipg_per_clk(void)
 static u32 get_uart_clk(void)
 {
 	u32 reg, uart_podf;
-
+	u32 freq = PLL3_80M;
 	reg = __raw_readl(&imx_ccm->cscdr1);
+#ifdef CONFIG_MX6SL
+	if (reg & MXC_CCM_CSCDR1_UART_CLK_SEL)
+		freq = MXC_HCLK;
+#endif
 	reg &= MXC_CCM_CSCDR1_UART_CLK_PODF_MASK;
 	uart_podf = reg >> MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET;
 
-	return PLL3_80M / (uart_podf + 1);
+	return freq / (uart_podf + 1);
 }
 
 static u32 get_cspi_clk(void)
@@ -252,6 +256,35 @@ static u32 get_emi_slow_clk(void)
 	return root_freq / (emi_slow_pof + 1);
 }
 
+#ifdef CONFIG_MX6SL
+static u32 get_mmdc_ch0_clk(void)
+{
+	u32 cbcmr = __raw_readl(&imx_ccm->cbcmr);
+	u32 cbcdr = __raw_readl(&imx_ccm->cbcdr);
+	u32 freq, podf;
+
+	podf = (cbcdr & MXC_CCM_CBCDR_MMDC_CH1_PODF_MASK) \
+			>> MXC_CCM_CBCDR_MMDC_CH1_PODF_OFFSET;
+
+	switch ((cbcmr & MXC_CCM_CBCMR_PRE_PERIPH2_CLK_SEL_MASK) >>
+		MXC_CCM_CBCMR_PRE_PERIPH2_CLK_SEL_OFFSET) {
+	case 0:
+		freq = decode_pll(PLL_BUS, MXC_HCLK);
+		break;
+	case 1:
+		freq = PLL2_PFD2_FREQ;
+		break;
+	case 2:
+		freq = PLL2_PFD0_FREQ;
+		break;
+	case 3:
+		freq = PLL2_PFD2_DIV_FREQ;
+	}
+
+	return freq / (podf + 1);
+
+}
+#else
 static u32 get_mmdc_ch0_clk(void)
 {
 	u32 cbcdr = __raw_readl(&imx_ccm->cbcdr);
@@ -260,6 +293,7 @@ static u32 get_mmdc_ch0_clk(void)
 
 	return get_periph_clk() / (mmdc_ch0_podf + 1);
 }
+#endif
 
 static u32 get_usdhc_clk(u32 port)
 {
arch/arm/include/asm/arch-mx6/crm_regs.h +5 -0
index 7676457..b1ed62f 100644
@@ -244,7 +244,12 @@ struct mxc_ccm_reg {
 #define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_MASK		(0x7 << 8)
 #define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_OFFSET		6
 #define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_MASK		(0x3 << 6)
+#ifdef CONFIG_MX6SL
+#define MXC_CCM_CSCDR1_UART_CLK_PODF_MASK		0x1F
+#define MXC_CCM_CSCDR1_UART_CLK_SEL			(1 << 6)
+#else
 #define MXC_CCM_CSCDR1_UART_CLK_PODF_MASK		0x3F
+#endif
 #define MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET		0
 
 /* Define the bits in register CS1CDR */
arch/arm/include/asm/arch-mx6/imx-regs.h +62 -1

136 lines not on this page · raw message

arch/arm/include/asm/arch-mx6/mx6-pins.h +4 -0
index 63f4856..ce865a6 100644
@@ -24,7 +24,11 @@
 #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
 #include "mx6dl_pins.h"
 #else
+#if defined(CONFIG_MX6SL)
+#include "mx6sl_pins.h"
+#else
 #error "Please select cpu"
+#endif	/* CONFIG_MX6SL */
 #endif	/* CONFIG_MX6DL or CONFIG_MX6S */
 #endif	/* CONFIG_MX6Q */
 
arch/arm/include/asm/arch-mx6/mx6sl_pins.h new file +25 -0
new file mode 100644
index 0000000..bfe4f00
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef __ASM_ARCH_MX6_MX6SL_PINS_H__
+#define __ASM_ARCH_MX6_MX6SL_PINS_H__
+
+#include <asm/imx-common/iomux-v3.h>
+
+enum {
+	MX6_PAD_SD2_CLK__USDHC2_CLK				= IOMUX_PAD(0x055C, 0x0254, 0, 0x0000, 0, 0),
+	MX6_PAD_SD2_CMD__USDHC2_CMD				= IOMUX_PAD(0x0560, 0x0258, 0, 0x0000, 0, 0),
+	MX6_PAD_SD2_DAT0__USDHC2_DAT0				= IOMUX_PAD(0x0564, 0x025C, 0, 0x0000, 0, 0),
+	MX6_PAD_SD2_DAT1__USDHC2_DAT1				= IOMUX_PAD(0x0568, 0x0260, 0, 0x0000, 0, 0),
+	MX6_PAD_SD2_DAT2__USDHC2_DAT2				= IOMUX_PAD(0x056C, 0x0264, 0, 0x0000, 0, 0),
+	MX6_PAD_SD2_DAT3__USDHC2_DAT3				= IOMUX_PAD(0x0570, 0x0268, 0, 0x0000, 0, 0),
+	MX6_PAD_UART1_RXD__UART1_RXD				= IOMUX_PAD(0x05A0, 0x0298, 0, 0x07FC, 0, 0),
+	MX6_PAD_UART1_TXD__UART1_TXD				= IOMUX_PAD(0x05A4, 0x029C, 0, 0x0000, 0, 0),
+};
+#endif	/* __ASM_ARCH_MX6_MX6SL_PINS_H__ */
Signature · 1 line
1.7.9.5
author reviewer
#2 lore raw

PATCH v2 3/3 mx6sl: Add initial support for mx6slevk board

In reply to a message not in the archive

From: Fabio Estevam <[email protected]>

mx6slevk board is a development board from Freescale based on the mx6 solo-lite processor.

For details about mx6slevk, please refer to:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX6SLEVK&parentCode=i.MX6SL&fpsp=1

---
Changes since v2:
- Total RAM is 1GB, not 512MB
Changes since v1:
- None

 MAINTAINERS                           |    1 +
 board/freescale/mx6slevk/Makefile     |   28 +++++
 board/freescale/mx6slevk/imximage.cfg |  118 ++++++++++++++++++++
 board/freescale/mx6slevk/mx6slevk.c   |  102 ++++++++++++++++++
 boards.cfg                            |    1 +
 include/configs/mx6slevk.h            |  189 +++++++++++++++++++++++++++++++++
 6 files changed, 439 insertions(+)
 create mode 100644 board/freescale/mx6slevk/Makefile
 create mode 100644 board/freescale/mx6slevk/imximage.cfg
 create mode 100644 board/freescale/mx6slevk/mx6slevk.c
 create mode 100644 include/configs/mx6slevk.h
MAINTAINERS +1 -0
index 0f19078..723a316 100644
@@ -665,6 +665,7 @@ Fabio Estevam <[email protected]>
 	mx6qsabresd	i.MX6Q
 	mx6qsabreauto	i.MX6Q
 	wandboard	i.MX6DL/S
+	mx6slevk	i.MX6SL
 
 Daniel Gorsulowski <[email protected]>
 
board/freescale/mx6slevk/Makefile new file +28 -0
new file mode 100644
index 0000000..43af351
@@ -0,0 +1,28 @@
+# (C) Copyright 2013 Freescale Semiconductor, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).o
+
+COBJS  := mx6slevk.o
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):        $(obj).depend $(OBJS)
+	$(call cmd_link_o_target, $(OBJS))
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/freescale/mx6slevk/imximage.cfg new file +118 -0

118 lines not on this page · raw message

board/freescale/mx6slevk/mx6slevk.c new file +102 -0

102 lines not on this page · raw message

boards.cfg +1 -0
index 7725a15..9e213ad 100644
@@ -257,6 +257,7 @@ mx6qarm2                     arm         armv7       mx6qarm2            freesca
 mx6qsabreauto                arm         armv7       mx6qsabreauto       freescale      mx6		mx6qsabreauto:IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg
 mx6qsabrelite                arm         armv7       mx6qsabrelite       freescale      mx6		mx6qsabrelite:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
 mx6qsabresd                  arm         armv7       mx6qsabresd         freescale      mx6		mx6qsabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
+mx6slevk                     arm         armv7       mx6slevk            freescale      mx6		mx6slevk:IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL
 eco5pk                       arm         armv7       eco5pk              8dtech         omap3
 nitrogen6dl                  arm         armv7       nitrogen6x          boundary       mx6		nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL,DDR_MB=1024
 nitrogen6dl2g                arm         armv7       nitrogen6x          boundary       mx6		nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl2g.cfg,MX6DL,DDR_MB=2048
include/configs/mx6slevk.h new file +189 -0

189 lines not on this page · raw message

Signature · 1 line
1.7.9.5