Skip to contentSkip to conversation

Add TI814x EVM Support

PATCH Superseded Matt Porter 4 participants 37 messages Feb 13, 2013 – Feb 25, 2013 4 messages not in the archive

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover Add TI814x EVM Support

This series adds support for the PG1.0 TI814x EVM board. TI814x fits into the existing AM33XX SoC support with some refactoring of the AM33XX-specific emif4, clock, and mux code.

It has been tested booting up a Linux kernel and regression tested on BeagleBone and EVM-SK AM33XX boards.

Matt Porter (10):
am33xx: convert defines from am33xx-specific to generic names
am33xx: refactor emif4/ddr to support multiple EMIF instances
am33xx: refactor am33xx clocks and add ti814x support
am33xx: refactor am33xx mux support and add ti814x support
am33xx: add ti814x specific register definitions
am33xx: add dmm support to emif4 library
ti814x_evm: add ti814x evm board support
ns16550: enable quirks for ti814x
ti814x_evm: enable ti814x evm build
MAINTAINERS: add ti814x_evm maintainer

 MAINTAINERS                                      |    4 +
 Makefile                                         |    2 +-
 arch/arm/cpu/armv7/Makefile                      |    2 +-
 arch/arm/cpu/armv7/am33xx/Makefile               |    3 +-
 arch/arm/cpu/armv7/am33xx/board.c                |    4 +-
 arch/arm/cpu/armv7/am33xx/clock-am335x.c         |  374 ++++++++++++++++++++++
 arch/arm/cpu/armv7/am33xx/clock-ti814x.c         |  234 ++++++++++++++
 arch/arm/cpu/armv7/am33xx/clock.c                |  374 ----------------------
 arch/arm/cpu/armv7/am33xx/ddr.c                  |   99 +++---
 arch/arm/cpu/armv7/am33xx/emif4.c                |   55 ++--
 arch/arm/cpu/armv7/am33xx/sys_info.c             |    3 +
 arch/arm/cpu/armv7/omap-common/Makefile          |    2 +-
 arch/arm/include/asm/arch-am33xx/clock.h         |    4 +
 arch/arm/include/asm/arch-am33xx/clocks_ti814x.h |  112 +++++++
 arch/arm/include/asm/arch-am33xx/cpu.h           |   11 +-
 arch/arm/include/asm/arch-am33xx/ddr_defs.h      |   57 +++-
 arch/arm/include/asm/arch-am33xx/hardware.h      |   60 +++-
 arch/arm/include/asm/arch-am33xx/mux-am335x.h    |  246 ++++++++++++++
 arch/arm/include/asm/arch-am33xx/mux-ti814x.h    |  310 ++++++++++++++++++
 arch/arm/include/asm/arch-am33xx/mux.h           |  230 +------------
 arch/arm/include/asm/arch-am33xx/omap.h          |    7 +
 arch/arm/include/asm/arch-am33xx/spl.h           |    5 +
 board/ti/am335x/board.c                          |   10 +-
 board/ti/ti814x/Makefile                         |   46 +++
 board/ti/ti814x/evm.c                            |  198 ++++++++++++
 board/ti/ti814x/evm.h                            |    7 +
 board/ti/ti814x/mux.c                            |   51 +++
 boards.cfg                                       |    1 +
 drivers/serial/ns16550.c                         |    5 +-
 include/configs/ti814x_evm.h                     |  213 ++++++++++++
 spl/Makefile                                     |    2 +-
 31 files changed, 2044 insertions(+), 687 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/am33xx/clock-am335x.c
 create mode 100644 arch/arm/cpu/armv7/am33xx/clock-ti814x.c
 delete mode 100644 arch/arm/cpu/armv7/am33xx/clock.c
 create mode 100644 arch/arm/include/asm/arch-am33xx/clocks_ti814x.h
 create mode 100644 arch/arm/include/asm/arch-am33xx/mux-am335x.h
 create mode 100644 arch/arm/include/asm/arch-am33xx/mux-ti814x.h
 create mode 100644 board/ti/ti814x/Makefile
 create mode 100644 board/ti/ti814x/evm.c
 create mode 100644 board/ti/ti814x/evm.h
 create mode 100644 board/ti/ti814x/mux.c
 create mode 100644 include/configs/ti814x_evm.h
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/10 am33xx: convert defines from am33xx-specific to generic names

Eliminate AM33xx specific names to prepare for TI814x support within AM33xx-land.

---
 arch/arm/cpu/armv7/am33xx/board.c           |    4 ++--
 arch/arm/include/asm/arch-am33xx/hardware.h |   10 +++++-----
 board/ti/am335x/board.c                     |    6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)
arch/arm/cpu/armv7/am33xx/board.c +2 -2
index ab31326..b186b32 100644
@@ -141,11 +141,11 @@ int arch_misc_init(void)
 {
 #ifdef CONFIG_AM335X_USB0
 	musb_register(&otg0_plat, &otg0_board_data,
-		(void *)AM335X_USB0_OTG_BASE);
+		(void *)USB0_OTG_BASE);
 #endif
 #ifdef CONFIG_AM335X_USB1
 	musb_register(&otg1_plat, &otg1_board_data,
-		(void *)AM335X_USB1_OTG_BASE);
+		(void *)USB1_OTG_BASE);
 #endif
 	return 0;
 }
arch/arm/include/asm/arch-am33xx/hardware.h +5 -5
index 6dd3296..7016e25 100644
@@ -84,14 +84,14 @@
 #define GPMC_BASE			0x50000000
 
 /* CPSW Config space */
-#define AM335X_CPSW_BASE		0x4A100000
-#define AM335X_CPSW_MDIO_BASE		0x4A101000
+#define CPSW_BASE			0x4A100000
+#define CPSW_MDIO_BASE			0x4A101000
 
 /* RTC base address */
-#define AM335X_RTC_BASE			0x44E3E000
+#define RTC_BASE			0x44E3E000
 
 /* OTG */
-#define AM335X_USB0_OTG_BASE		0x47401000
-#define AM335X_USB1_OTG_BASE		0x47401800
+#define USB0_OTG_BASE			0x47401000
+#define USB1_OTG_BASE			0x47401800
 
 #endif /* __AM33XX_HARDWARE_H */
board/ti/am335x/board.c +3 -3
index ed4229e..1e698df 100644
@@ -123,7 +123,7 @@ static int read_eeprom(void)
 
 static void rtc32k_enable(void)
 {
-	struct rtc_regs *rtc = (struct rtc_regs *)AM335X_RTC_BASE;
+	struct rtc_regs *rtc = (struct rtc_regs *)RTC_BASE;
 
 	/*
 	 * Unlock the RTC's registers.  For more details please see the
@@ -365,8 +365,8 @@ static struct cpsw_slave_data cpsw_slaves[] = {
 };
 
 static struct cpsw_platform_data cpsw_data = {
-	.mdio_base		= AM335X_CPSW_MDIO_BASE,
-	.cpsw_base		= AM335X_CPSW_BASE,
+	.mdio_base		= CPSW_MDIO_BASE,
+	.cpsw_base		= CPSW_BASE,
 	.mdio_div		= 0xff,
 	.channels		= 8,
 	.cpdma_reg_ofs		= 0x800,
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 1/10 am33xx: convert defines from am33xx-specific to generic names

Quoted 4 lines · Matt Porter

Eliminate AM33xx specific names to prepare for TI814x support within AM33xx-land.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/bcb50037/attachment.pgp>
#3 lore raw

PATCH 2/10 am33xx: refactor emif4/ddr to support multiple EMIF instances

In reply to Matt Porter

The AM33xx emif4/ddr support closely matches what is need to support TI814x except that TI814x has two EMIF instances. Refactor all the emif4 helper calls and the config_ddr() init function to use an additional instance number argument.

---
 arch/arm/cpu/armv7/am33xx/ddr.c             |   99 ++++++++++++++++-----------
 arch/arm/cpu/armv7/am33xx/emif4.c           |   38 +++++-----
 arch/arm/include/asm/arch-am33xx/ddr_defs.h |   52 ++++++++++++--
 arch/arm/include/asm/arch-am33xx/hardware.h |   18 ++++-
 board/ti/am335x/board.c                     |    4 +-
 5 files changed, 143 insertions(+), 68 deletions(-)
arch/arm/cpu/armv7/am33xx/ddr.c +59 -40
index fd9fc4a..493b99b 100644
@@ -24,15 +24,20 @@ http://www.ti.com/
 /**
  * Base address for EMIF instances
  */
-static struct emif_reg_struct *emif_reg = {
-				(struct emif_reg_struct *)EMIF4_0_CFG_BASE};
+static struct emif_reg_struct *emif_reg[2] = {
+				(struct emif_reg_struct *)EMIF4_0_CFG_BASE,
+				(struct emif_reg_struct *)EMIF4_1_CFG_BASE};
 
 /**
- * Base address for DDR instance
+ * Base addresses for DDR PHY cmd/data regs
  */
-static struct ddr_regs *ddr_reg[2] = {
-				(struct ddr_regs *)DDR_PHY_BASE_ADDR,
-				(struct ddr_regs *)DDR_PHY_BASE_ADDR2};
+static struct ddr_cmd_regs *ddr_cmd_reg[2] = {
+				(struct ddr_regs *)DDR_PHY_CMD_ADDR,
+				(struct ddr_regs *)DDR_PHY_CMD_ADDR2};
+
+static struct ddr_data_regs *ddr_data_reg[2] = {
+				(struct ddr_regs *)DDR_PHY_DATA_ADDR,
+				(struct ddr_regs *)DDR_PHY_DATA_ADDR2};
 
 /**
  * Base address for ddr io control instances
@@ -43,70 +48,84 @@ static struct ddr_cmdtctrl *ioctrl_reg = {
 /**
  * Configure SDRAM
  */
-void config_sdram(const struct emif_regs *regs)
+void config_sdram(const struct emif_regs *regs, int nr)
 {
-	writel(regs->ref_ctrl, &emif_reg->emif_sdram_ref_ctrl);
-	writel(regs->ref_ctrl, &emif_reg->emif_sdram_ref_ctrl_shdw);
+	writel(regs->ref_ctrl, &emif_reg[nr]->emif_sdram_ref_ctrl);
+	writel(regs->ref_ctrl, &emif_reg[nr]->emif_sdram_ref_ctrl_shdw);
 	if (regs->zq_config){
-		writel(regs->zq_config, &emif_reg->emif_zq_config);
+		writel(regs->zq_config, &emif_reg[nr]->emif_zq_config);
 		writel(regs->sdram_config, &cstat->secure_emif_sdram_config);
 	}
-	writel(regs->sdram_config, &emif_reg->emif_sdram_config);
+	writel(regs->sdram_config, &emif_reg[nr]->emif_sdram_config);
 }
 
 /**
  * Set SDRAM timings
  */
-void set_sdram_timings(const struct emif_regs *regs)
+void set_sdram_timings(const struct emif_regs *regs, int nr)
 {
-	writel(regs->sdram_tim1, &emif_reg->emif_sdram_tim_1);
-	writel(regs->sdram_tim1, &emif_reg->emif_sdram_tim_1_shdw);
-	writel(regs->sdram_tim2, &emif_reg->emif_sdram_tim_2);
-	writel(regs->sdram_tim2, &emif_reg->emif_sdram_tim_2_shdw);
-	writel(regs->sdram_tim3, &emif_reg->emif_sdram_tim_3);
-	writel(regs->sdram_tim3, &emif_reg->emif_sdram_tim_3_shdw);
+	writel(regs->sdram_tim1, &emif_reg[nr]->emif_sdram_tim_1);
+	writel(regs->sdram_tim1, &emif_reg[nr]->emif_sdram_tim_1_shdw);
+	writel(regs->sdram_tim2, &emif_reg[nr]->emif_sdram_tim_2);
+	writel(regs->sdram_tim2, &emif_reg[nr]->emif_sdram_tim_2_shdw);
+	writel(regs->sdram_tim3, &emif_reg[nr]->emif_sdram_tim_3);
+	writel(regs->sdram_tim3, &emif_reg[nr]->emif_sdram_tim_3_shdw);
 }
 
 /**
  * Configure DDR PHY
  */
-void config_ddr_phy(const struct emif_regs *regs)
+void config_ddr_phy(const struct emif_regs *regs, int nr)
 {
-	writel(regs->emif_ddr_phy_ctlr_1, &emif_reg->emif_ddr_phy_ctrl_1);
-	writel(regs->emif_ddr_phy_ctlr_1, &emif_reg->emif_ddr_phy_ctrl_1_shdw);
+	writel(regs->emif_ddr_phy_ctlr_1,
+		&emif_reg[nr]->emif_ddr_phy_ctrl_1);
+	writel(regs->emif_ddr_phy_ctlr_1,
+		&emif_reg[nr]->emif_ddr_phy_ctrl_1_shdw);
 }
 
 /**
  * Configure DDR CMD control registers
  */
-void config_cmd_ctrl(const struct cmd_control *cmd)
+void config_cmd_ctrl(const struct cmd_control *cmd, int nr)
 {
-	writel(cmd->cmd0csratio, &ddr_reg[0]->cm0csratio);
-	writel(cmd->cmd0dldiff, &ddr_reg[0]->cm0dldiff);
-	writel(cmd->cmd0iclkout, &ddr_reg[0]->cm0iclkout);
+	writel(cmd->cmd0csratio, &ddr_cmd_reg[nr]->cm0csratio);
+	writel(cmd->cmd0dldiff, &ddr_cmd_reg[nr]->cm0dldiff);
+	writel(cmd->cmd0iclkout, &ddr_cmd_reg[nr]->cm0iclkout);
 
-	writel(cmd->cmd1csratio, &ddr_reg[0]->cm1csratio);
-	writel(cmd->cmd1dldiff, &ddr_reg[0]->cm1dldiff);
-	writel(cmd->cmd1iclkout, &ddr_reg[0]->cm1iclkout);
+	writel(cmd->cmd1csratio, &ddr_cmd_reg[nr]->cm1csratio);
+	writel(cmd->cmd1dldiff, &ddr_cmd_reg[nr]->cm1dldiff);
+	writel(cmd->cmd1iclkout, &ddr_cmd_reg[nr]->cm1iclkout);
 
-	writel(cmd->cmd2csratio, &ddr_reg[0]->cm2csratio);
-	writel(cmd->cmd2dldiff, &ddr_reg[0]->cm2dldiff);
-	writel(cmd->cmd2iclkout, &ddr_reg[0]->cm2iclkout);
+	writel(cmd->cmd2csratio, &ddr_cmd_reg[nr]->cm2csratio);
+	writel(cmd->cmd2dldiff, &ddr_cmd_reg[nr]->cm2dldiff);
+	writel(cmd->cmd2iclkout, &ddr_cmd_reg[nr]->cm2iclkout);
 }
 
 /**
  * Configure DDR DATA registers
  */
-void config_ddr_data(int macrono, const struct ddr_data *data)
+void config_ddr_data(const struct ddr_data *data, int nr)
 {
-	writel(data->datardsratio0, &ddr_reg[macrono]->dt0rdsratio0);
-	writel(data->datawdsratio0, &ddr_reg[macrono]->dt0wdsratio0);
-	writel(data->datawiratio0, &ddr_reg[macrono]->dt0wiratio0);
-	writel(data->datagiratio0, &ddr_reg[macrono]->dt0giratio0);
-	writel(data->datafwsratio0, &ddr_reg[macrono]->dt0fwsratio0);
-	writel(data->datawrsratio0, &ddr_reg[macrono]->dt0wrsratio0);
-	writel(data->datauserank0delay, &ddr_reg[macrono]->dt0rdelays0);
-	writel(data->datadldiff0, &ddr_reg[macrono]->dt0dldiff0);
+	int i;
+
+	for (i = 0; i < DDR_DATA_REGS_NR; i++) {
+		writel(data->datardsratio0,
+			&(ddr_data_reg[nr]+i)->dt0rdsratio0);
+		writel(data->datawdsratio0,
+			&(ddr_data_reg[nr]+i)->dt0wdsratio0);
+		writel(data->datawiratio0,
+			&(ddr_data_reg[nr]+i)->dt0wiratio0);
+		writel(data->datagiratio0,
+			&(ddr_data_reg[nr]+i)->dt0giratio0);
+		writel(data->datafwsratio0,
+			&(ddr_data_reg[nr]+i)->dt0fwsratio0);
+		writel(data->datawrsratio0,
+			&(ddr_data_reg[nr]+i)->dt0wrsratio0);
+		writel(data->datauserank0delay,
+			&(ddr_data_reg[nr]+i)->dt0rdelays0);
+		writel(data->datadldiff0,
+			&(ddr_data_reg[nr]+i)->dt0dldiff0);
+	}
 }
 
 void config_io_ctrl(unsigned long val)
arch/arm/cpu/armv7/am33xx/emif4.c +20 -18
index 01e3a52..0c617fa 100644
@@ -44,44 +44,46 @@ void dram_init_banksize(void)
 
 
 #ifdef CONFIG_SPL_BUILD
-static struct vtp_reg *vtpreg = (struct vtp_reg *)VTP0_CTRL_ADDR;
+static struct vtp_reg *vtpreg[2] = {
+				(struct vtp_reg *)VTP0_CTRL_ADDR,
+				(struct vtp_reg *)VTP1_CTRL_ADDR};
 static struct ddr_ctrl *ddrctrl = (struct ddr_ctrl *)DDR_CTRL_ADDR;
 
-static void config_vtp(void)
+static void config_vtp(int nr)
 {
-	writel(readl(&vtpreg->vtp0ctrlreg) | VTP_CTRL_ENABLE,
-			&vtpreg->vtp0ctrlreg);
-	writel(readl(&vtpreg->vtp0ctrlreg) & (~VTP_CTRL_START_EN),
-			&vtpreg->vtp0ctrlreg);
-	writel(readl(&vtpreg->vtp0ctrlreg) | VTP_CTRL_START_EN,
-			&vtpreg->vtp0ctrlreg);
+	writel(readl(&vtpreg[nr]->vtp0ctrlreg) | VTP_CTRL_ENABLE,
+			&vtpreg[nr]->vtp0ctrlreg);
+	writel(readl(&vtpreg[nr]->vtp0ctrlreg) & (~VTP_CTRL_START_EN),
+			&vtpreg[nr]->vtp0ctrlreg);
+	writel(readl(&vtpreg[nr]->vtp0ctrlreg) | VTP_CTRL_START_EN,
+			&vtpreg[nr]->vtp0ctrlreg);
 
 	/* Poll for READY */
-	while ((readl(&vtpreg->vtp0ctrlreg) & VTP_CTRL_READY) !=
+	while ((readl(&vtpreg[nr]->vtp0ctrlreg) & VTP_CTRL_READY) !=
 			VTP_CTRL_READY)
 		;
 }
 
 void config_ddr(unsigned int pll, unsigned int ioctrl,
 		const struct ddr_data *data, const struct cmd_control *ctrl,
-		const struct emif_regs *regs)
+		const struct emif_regs *regs, int nr)
 {
 	enable_emif_clocks();
 	ddr_pll_config(pll);
-	config_vtp();
-	config_cmd_ctrl(ctrl);
-
-	config_ddr_data(0, data);
-	config_ddr_data(1, data);
+	config_vtp(nr);
+	config_cmd_ctrl(ctrl, nr);
 
+	config_ddr_data(data, nr);
+#ifdef CONFIG_AM33XX
 	config_io_ctrl(ioctrl);
 
 	/* Set CKE to be controlled by EMIF/DDR PHY */
 	writel(DDR_CKE_CTRL_NORMAL, &ddrctrl->ddrckectrl);
+#endif
 
 	/* Program EMIF instance */
-	config_ddr_phy(regs);
-	set_sdram_timings(regs);
-	config_sdram(regs);
+	config_ddr_phy(regs, nr);
+	set_sdram_timings(regs, nr);
+	config_sdram(regs, nr);
 }
 #endif
arch/arm/include/asm/arch-am33xx/ddr_defs.h +46 -6

81 lines not on this page · raw message

arch/arm/include/asm/arch-am33xx/hardware.h +16 -2
index 7016e25..41ab2c0 100644
@@ -66,13 +66,27 @@
 #define PRM_DEVICE			0x44E00F00
 
 /* VTP Base address */
+#ifdef CONFIG_AM33XX
 #define VTP0_CTRL_ADDR			0x44E10E0C
+#elif defined(CONFIG_TI814X)
+#define VTP0_CTRL_ADDR			0x48140E0C
+#endif
+#define VTP1_CTRL_ADDR			0x48140E10
 
 /* DDR Base address */
 #define DDR_CTRL_ADDR			0x44E10E04
 #define DDR_CONTROL_BASE_ADDR		0x44E11404
-#define DDR_PHY_BASE_ADDR		0x44E12000
-#define DDR_PHY_BASE_ADDR2		0x44E120A4
+#ifdef CONFIG_AM33XX
+#define DDR_PHY_CMD_ADDR		0x44E12000
+#define DDR_PHY_DATA_ADDR		0x44E120C8
+#define DDR_DATA_REGS_NR		2
+#elif defined(CONFIG_TI814X)
+#define DDR_PHY_CMD_ADDR		0x47C0C400
+#define DDR_PHY_DATA_ADDR		0x47C0C4C8
+#define DDR_DATA_REGS_NR		4
+#endif
+#define DDR_PHY_CMD_ADDR2		0x47C0C800
+#define DDR_PHY_DATA_ADDR2		0x47C0C8C8
 
 /* UART */
 #define DEFAULT_UART_BASE		UART0_BASE
board/ti/am335x/board.c +2 -2
index 1e698df..3189408 100644
@@ -300,10 +300,10 @@ void s_init(void)
 
 	if (board_is_evm_sk() || board_is_bone_lt())
 		config_ddr(303, MT41J128MJT125_IOCTRL_VALUE, &ddr3_data,
-			   &ddr3_cmd_ctrl_data, &ddr3_emif_reg_data);
+			   &ddr3_cmd_ctrl_data, &ddr3_emif_reg_data, 0);
 	else
 		config_ddr(266, MT47H128M16RT25E_IOCTRL_VALUE, &ddr2_data,
-			   &ddr2_cmd_ctrl_data, &ddr2_emif_reg_data);
+			   &ddr2_cmd_ctrl_data, &ddr2_emif_reg_data, 0);
 #endif
 }
 
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 2/10 am33xx: refactor emif4/ddr to support multiple EMIF instances

Quoted 6 lines · Matt Porter

The AM33xx emif4/ddr support closely matches what is need to support TI814x except that TI814x has two EMIF instances. Refactor all the emif4 helper calls and the config_ddr() init function to use an additional instance number argument.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/e89d1691/attachment.pgp>
#5 lore raw

PATCH 3/10 am33xx: refactor am33xx clocks and add ti814x support

In reply to Matt Porter

Split clock.c for am335x and ti814x and add the ti814x include file.

---
 arch/arm/cpu/armv7/am33xx/Makefile               |    3 +-
 arch/arm/cpu/armv7/am33xx/clock-am335x.c         |  374 ++++++++++++++++++++++
 arch/arm/cpu/armv7/am33xx/clock-ti814x.c         |  234 ++++++++++++++
 arch/arm/cpu/armv7/am33xx/clock.c                |  374 ----------------------
 arch/arm/include/asm/arch-am33xx/clock.h         |    4 +
 arch/arm/include/asm/arch-am33xx/clocks_ti814x.h |  112 +++++++
 6 files changed, 726 insertions(+), 375 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/am33xx/clock-am335x.c
 create mode 100644 arch/arm/cpu/armv7/am33xx/clock-ti814x.c
 delete mode 100644 arch/arm/cpu/armv7/am33xx/clock.c
 create mode 100644 arch/arm/include/asm/arch-am33xx/clocks_ti814x.h
arch/arm/cpu/armv7/am33xx/Makefile +2 -1
index 70c443e..7051029 100644
@@ -16,7 +16,8 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(SOC).o
 
-COBJS	+= clock.o
+COBJS-$(CONFIG_AM33XX)	+= clock-am335x.o
+COBJS-$(CONFIG_TI814X)	+= clock-ti814x.o
 COBJS	+= sys_info.o
 COBJS	+= mem.o
 COBJS	+= ddr.o
arch/arm/cpu/armv7/am33xx/clock-am335x.c new file +374 -0

374 lines not on this page · raw message

arch/arm/cpu/armv7/am33xx/clock-ti814x.c new file +234 -0

234 lines not on this page · raw message

arch/arm/cpu/armv7/am33xx/clock.c deleted +0 -374

374 lines not on this page · raw message

arch/arm/include/asm/arch-am33xx/clock.h +4 -0
index 872ff82..786eecf 100644
@@ -19,6 +19,10 @@
 #ifndef _CLOCKS_H_
 #define _CLOCKS_H_
 
+#ifdef CONFIG_AM33XX
 #include <asm/arch/clocks_am33xx.h>
+#elif defined(CONFIG_TI814X)
+#include <asm/arch/clocks_ti814x.h>
+#endif
 
 #endif
arch/arm/include/asm/arch-am33xx/clocks_ti814x.h new file +112 -0

112 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#6 lore raw

PATCH 3/10 am33xx: refactor am33xx clocks and add ti814x support

Quoted 3 lines · Matt Porter

Split clock.c for am335x and ti814x and add the ti814x include file.

[snip]

Quoted 1 line

+++ b/arch/arm/cpu/armv7/am33xx/clock-am335x.c

[snip]

Quoted 19 lines
arch/arm/cpu/armv7/am33xx/clock-am335x.c new file +19 -0
+#define PRCM_MOD_EN		0x2
+#define PRCM_FORCE_WAKEUP	0x2
+#define PRCM_FUNCTL		0x0
+
+#define PRCM_EMIF_CLK_ACTIVITY	BIT(2)
+#define PRCM_L3_GCLK_ACTIVITY	BIT(4)
+
+#define PLL_BYPASS_MODE		0x4
+#define ST_MN_BYPASS		0x00000100
+#define ST_DPLL_CLK		0x00000001
+#define CLK_SEL_MASK		0x7ffff
+#define CLK_DIV_MASK		0x1f
+#define CLK_DIV2_MASK		0x7f
+#define CLK_SEL_SHIFT		0x8
+#define CLK_MODE_SEL		0x7
+#define CLK_MODE_MASK		0xfffffff8
+#define CLK_DIV_SEL		0xFFFFFFE0
+#define CPGMAC0_IDLE		0x30000
+#define DPLL_CLKDCOLDO_GATE_CTRL        0x300

[snip]

Quoted 1 line

+++ b/arch/arm/cpu/armv7/am33xx/clock-ti814x.c

[snip]

arch/arm/cpu/armv7/am33xx/clock-ti814x.c line 38

Quoted 7 lines
arch/arm/cpu/armv7/am33xx/clock-ti814x.c new file +7 -0
+	/* Selects OSC0 (20MHz) for DMTIMER1 */
+	temp = readl(DMTIMER_CLKSRC);
+	temp &= ~(0x7 << 3);
+	temp |= (0x4 << 3);
+	writel(temp, DMTIMER_CLKSRC);
+
+	writel(0x2, DM_TIMER1_BASE + 0x54);

Magic values are defined for clock-am335x.c but not in clock-ti814x.c, please fix clock-ti814x.c to define out the magic values ala am335x.c. Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/fdda41c8/attachment.pgp>

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

PATCH 3/10 am33xx: refactor am33xx clocks and add ti814x support

Quoted 31 lines · Tom Rini
Quoted 3 lines · Matt Porter

Split clock.c for am335x and ti814x and add the ti814x include file.

[snip]

Quoted 1 line

+++ b/arch/arm/cpu/armv7/am33xx/clock-am335x.c

[snip]

Quoted 19 lines
arch/arm/cpu/armv7/am33xx/clock-am335x.c new file +19 -0
+#define PRCM_MOD_EN		0x2
+#define PRCM_FORCE_WAKEUP	0x2
+#define PRCM_FUNCTL		0x0
+
+#define PRCM_EMIF_CLK_ACTIVITY	BIT(2)
+#define PRCM_L3_GCLK_ACTIVITY	BIT(4)
+
+#define PLL_BYPASS_MODE		0x4
+#define ST_MN_BYPASS		0x00000100
+#define ST_DPLL_CLK		0x00000001
+#define CLK_SEL_MASK		0x7ffff
+#define CLK_DIV_MASK		0x1f
+#define CLK_DIV2_MASK		0x7f
+#define CLK_SEL_SHIFT		0x8
+#define CLK_MODE_SEL		0x7
+#define CLK_MODE_MASK		0xfffffff8
+#define CLK_DIV_SEL		0xFFFFFFE0
+#define CPGMAC0_IDLE		0x30000
+#define DPLL_CLKDCOLDO_GATE_CTRL        0x300

[snip]

Quoted 1 line

+++ b/arch/arm/cpu/armv7/am33xx/clock-ti814x.c

[snip]

Quoted 11 lines

arch/arm/cpu/armv7/am33xx/clock-ti814x.c line 38

Quoted 7 lines
arch/arm/cpu/armv7/am33xx/clock-ti814x.c new file +7 -0
+	/* Selects OSC0 (20MHz) for DMTIMER1 */
+	temp = readl(DMTIMER_CLKSRC);
+	temp &= ~(0x7 << 3);
+	temp |= (0x4 << 3);
+	writel(temp, DMTIMER_CLKSRC);
+
+	writel(0x2, DM_TIMER1_BASE + 0x54);

Magic values are defined for clock-am335x.c but not in clock-ti814x.c, please fix clock-ti814x.c to define out the magic values ala am335x.c. Thanks!

Ok, will clean this up.

-Matt

#9 lore raw

PATCH 3/10 am33xx: refactor am33xx clocks and add ti814x support

In reply to Matt Porter
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Matt" == Matt Porter <[email protected]> writes:

Matt> Split clock.c for am335x and ti814x and add the ti814x include file. Matt> Signed-off-by: Matt Porter <[email protected]>
Matt> ---

 Matt>  arch/arm/cpu/armv7/am33xx/Makefile               |    3 +-
 Matt>  arch/arm/cpu/armv7/am33xx/clock-am335x.c         |  374 ++++++++++++++++++++++
 Matt>  arch/arm/cpu/armv7/am33xx/clock-ti814x.c         |  234 ++++++++++++++
 Matt>  arch/arm/cpu/armv7/am33xx/clock.c                |  374 ----------------------
 Matt>  arch/arm/include/asm/arch-am33xx/clock.h         |    4 +
 Matt>  arch/arm/include/asm/arch-am33xx/clocks_ti814x.h |  112 +++++++
 Matt>  6 files changed, 726 insertions(+), 375 deletions(-)
 Matt>  create mode 100644 arch/arm/cpu/armv7/am33xx/clock-am335x.c
 Matt>  create mode 100644 arch/arm/cpu/armv7/am33xx/clock-ti814x.c
 Matt>  delete mode 100644 arch/arm/cpu/armv7/am33xx/clock.c
 Matt>  create mode 100644 arch/arm/include/asm/arch-am33xx/clocks_ti814x.h

Do you have rename detection enabled? I would have imagined clock-am335x.c to show up as a copy of clock.c

Matt> +++ b/arch/arm/cpu/armv7/am33xx/clock-am335x.c
Matt> @@ -0,0 +1,374 @@
Matt> +/*
Matt> + * clock.c
Matt> + *
Matt> + * clocks for AM33XX based boards
Matt> + *
Matt> + * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/

This is no longer clock.c or 2011. Care to update the header?

Matt> +++ b/arch/arm/cpu/armv7/am33xx/clock-ti814x.c
Matt> @@ -0,0 +1,234 @@
Matt> +/*
Matt> + * clock.c
Matt> + *
Matt> + * clocks for TI814X based boards
Matt> + *
Matt> + * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/

Same here.

Signature · 1 line
Bye, Peter Korsgaard
#10 lore raw

PATCH 3/10 am33xx: refactor am33xx clocks and add ti814x support

Quoted 5 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Matt" == Matt Porter <[email protected]> writes:

Matt> Split clock.c for am335x and ti814x and add the ti814x include file. Matt> Signed-off-by: Matt Porter <[email protected]>
Matt> ---

Quoted 11 lines
 Matt>  arch/arm/cpu/armv7/am33xx/Makefile               |    3 +-
 Matt>  arch/arm/cpu/armv7/am33xx/clock-am335x.c         |  374 ++++++++++++++++++++++
 Matt>  arch/arm/cpu/armv7/am33xx/clock-ti814x.c         |  234 ++++++++++++++
 Matt>  arch/arm/cpu/armv7/am33xx/clock.c                |  374 ----------------------
 Matt>  arch/arm/include/asm/arch-am33xx/clock.h         |    4 +
 Matt>  arch/arm/include/asm/arch-am33xx/clocks_ti814x.h |  112 +++++++
 Matt>  6 files changed, 726 insertions(+), 375 deletions(-)
 Matt>  create mode 100644 arch/arm/cpu/armv7/am33xx/clock-am335x.c
 Matt>  create mode 100644 arch/arm/cpu/armv7/am33xx/clock-ti814x.c
 Matt>  delete mode 100644 arch/arm/cpu/armv7/am33xx/clock.c
 Matt>  create mode 100644 arch/arm/include/asm/arch-am33xx/clocks_ti814x.h

Hi Peter...thanks for reviewing this.

Quoted 2 lines

Do you have rename detection enabled? I would have imagined clock-am335x.c to show up as a copy of clock.c

On any given day I forget to format-patch with rename detection enabled. You caught me...will be fixed in v2.

Quoted 10 lines

Matt> +++ b/arch/arm/cpu/armv7/am33xx/clock-am335x.c
Matt> @@ -0,0 +1,374 @@
Matt> +/*
Matt> + * clock.c
Matt> + *
Matt> + * clocks for AM33XX based boards
Matt> + *
Matt> + * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/

This is no longer clock.c or 2011. Care to update the header?

Ok

Quoted 11 lines

Matt> +++ b/arch/arm/cpu/armv7/am33xx/clock-ti814x.c
Matt> @@ -0,0 +1,234 @@
Matt> +/*
Matt> + * clock.c
Matt> + *
Matt> + * clocks for TI814X based boards
Matt> + *
Matt> + * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/

Same here.

Ok

-Matt

#11 lore raw

PATCH 4/10 am33xx: refactor am33xx mux support and add ti814x support

In reply to Matt Porter

AM33XX and TI814X have a similar mux though the pinmux register layout and address space differ. Add a separate ti814x mux include to support the TI814X-specific differences.

---
 arch/arm/include/asm/arch-am33xx/mux-am335x.h |  246 ++++++++++++++++++++
 arch/arm/include/asm/arch-am33xx/mux-ti814x.h |  310 +++++++++++++++++++++++++
 arch/arm/include/asm/arch-am33xx/mux.h        |  230 +-----------------
 3 files changed, 562 insertions(+), 224 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-am33xx/mux-am335x.h
 create mode 100644 arch/arm/include/asm/arch-am33xx/mux-ti814x.h
arch/arm/include/asm/arch-am33xx/mux-am335x.h new file +246 -0
new file mode 100644
index 0000000..7258135
@@ -0,0 +1,246 @@
+/*
+ * mux.h
+ *
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _MUX_AM335X_H_
+#define _MUX_AM335X_H_
+
+#include <common.h>
+#include <asm/io.h>
+
+#define MUX_CFG(value, offset)	\
+	__raw_writel(value, (CTRL_BASE + offset));
+
+/* PAD Control Fields */
+#define SLEWCTRL	(0x1 << 6)
+#define RXACTIVE	(0x1 << 5)
+#define PULLUP_EN	(0x1 << 4) /* Pull UP Selection */
+#define PULLUDEN	(0x0 << 3) /* Pull up enabled */
+#define PULLUDDIS	(0x1 << 3) /* Pull up disabled */
+#define MODE(val)	val	/* used for Readability */
+
+/*
+ * PAD CONTROL OFFSETS
+ * Field names corresponds to the pad signal name
+ */
+struct pad_signals {
+	int gpmc_ad0;
+	int gpmc_ad1;
+	int gpmc_ad2;
+	int gpmc_ad3;
+	int gpmc_ad4;
+	int gpmc_ad5;
+	int gpmc_ad6;
+	int gpmc_ad7;
+	int gpmc_ad8;
+	int gpmc_ad9;
+	int gpmc_ad10;
+	int gpmc_ad11;
+	int gpmc_ad12;
+	int gpmc_ad13;
+	int gpmc_ad14;
+	int gpmc_ad15;
+	int gpmc_a0;
+	int gpmc_a1;
+	int gpmc_a2;
+	int gpmc_a3;
+	int gpmc_a4;
+	int gpmc_a5;
+	int gpmc_a6;
+	int gpmc_a7;
+	int gpmc_a8;
+	int gpmc_a9;
+	int gpmc_a10;
+	int gpmc_a11;
+	int gpmc_wait0;
+	int gpmc_wpn;
+	int gpmc_be1n;
+	int gpmc_csn0;
+	int gpmc_csn1;
+	int gpmc_csn2;
+	int gpmc_csn3;
+	int gpmc_clk;
+	int gpmc_advn_ale;
+	int gpmc_oen_ren;
+	int gpmc_wen;
+	int gpmc_be0n_cle;
+	int lcd_data0;
+	int lcd_data1;
+	int lcd_data2;
+	int lcd_data3;
+	int lcd_data4;
+	int lcd_data5;
+	int lcd_data6;
+	int lcd_data7;
+	int lcd_data8;
+	int lcd_data9;
+	int lcd_data10;
+	int lcd_data11;
+	int lcd_data12;
+	int lcd_data13;
+	int lcd_data14;
+	int lcd_data15;
+	int lcd_vsync;
+	int lcd_hsync;
+	int lcd_pclk;
+	int lcd_ac_bias_en;
+	int mmc0_dat3;
+	int mmc0_dat2;
+	int mmc0_dat1;
+	int mmc0_dat0;
+	int mmc0_clk;
+	int mmc0_cmd;
+	int mii1_col;
+	int mii1_crs;
+	int mii1_rxerr;
+	int mii1_txen;
+	int mii1_rxdv;
+	int mii1_txd3;
+	int mii1_txd2;
+	int mii1_txd1;
+	int mii1_txd0;
+	int mii1_txclk;
+	int mii1_rxclk;
+	int mii1_rxd3;
+	int mii1_rxd2;
+	int mii1_rxd1;
+	int mii1_rxd0;
+	int rmii1_refclk;
+	int mdio_data;
+	int mdio_clk;
+	int spi0_sclk;
+	int spi0_d0;
+	int spi0_d1;
+	int spi0_cs0;
+	int spi0_cs1;
+	int ecap0_in_pwm0_out;
+	int uart0_ctsn;
+	int uart0_rtsn;
+	int uart0_rxd;
+	int uart0_txd;
+	int uart1_ctsn;
+	int uart1_rtsn;
+	int uart1_rxd;
+	int uart1_txd;
+	int i2c0_sda;
+	int i2c0_scl;
+	int mcasp0_aclkx;
+	int mcasp0_fsx;
+	int mcasp0_axr0;
+	int mcasp0_ahclkr;
+	int mcasp0_aclkr;
+	int mcasp0_fsr;
+	int mcasp0_axr1;
+	int mcasp0_ahclkx;
+	int xdma_event_intr0;
+	int xdma_event_intr1;
+	int nresetin_out;
+	int porz;
+	int nnmi;
+	int osc0_in;
+	int osc0_out;
+	int rsvd1;
+	int tms;
+	int tdi;
+	int tdo;
+	int tck;
+	int ntrst;
+	int emu0;
+	int emu1;
+	int osc1_in;
+	int osc1_out;
+	int pmic_power_en;
+	int rtc_porz;
+	int rsvd2;
+	int ext_wakeup;
+	int enz_kaldo_1p8v;
+	int usb0_dm;
+	int usb0_dp;
+	int usb0_ce;
+	int usb0_id;
+	int usb0_vbus;
+	int usb0_drvvbus;
+	int usb1_dm;
+	int usb1_dp;
+	int usb1_ce;
+	int usb1_id;
+	int usb1_vbus;
+	int usb1_drvvbus;
+	int ddr_resetn;
+	int ddr_csn0;
+	int ddr_cke;
+	int ddr_ck;
+	int ddr_nck;
+	int ddr_casn;
+	int ddr_rasn;
+	int ddr_wen;
+	int ddr_ba0;
+	int ddr_ba1;
+	int ddr_ba2;
+	int ddr_a0;
+	int ddr_a1;
+	int ddr_a2;
+	int ddr_a3;
+	int ddr_a4;
+	int ddr_a5;
+	int ddr_a6;
+	int ddr_a7;
+	int ddr_a8;
+	int ddr_a9;
+	int ddr_a10;
+	int ddr_a11;
+	int ddr_a12;
+	int ddr_a13;
+	int ddr_a14;
+	int ddr_a15;
+	int ddr_odt;
+	int ddr_d0;
+	int ddr_d1;
+	int ddr_d2;
+	int ddr_d3;
+	int ddr_d4;
+	int ddr_d5;
+	int ddr_d6;
+	int ddr_d7;
+	int ddr_d8;
+	int ddr_d9;
+	int ddr_d10;
+	int ddr_d11;
+	int ddr_d12;
+	int ddr_d13;
+	int ddr_d14;
+	int ddr_d15;
+	int ddr_dqm0;
+	int ddr_dqm1;
+	int ddr_dqs0;
+	int ddr_dqsn0;
+	int ddr_dqs1;
+	int ddr_dqsn1;
+	int ddr_vref;
+	int ddr_vtp;
+	int ddr_strben0;
+	int ddr_strben1;
+	int ain7;
+	int ain6;
+	int ain5;
+	int ain4;
+	int ain3;
+	int ain2;
+	int ain1;
+	int ain0;
+	int vrefp;
+	int vrefn;
+};
+
+#endif
arch/arm/include/asm/arch-am33xx/mux-ti814x.h new file +310 -0

310 lines not on this page · raw message

arch/arm/include/asm/arch-am33xx/mux.h +6 -224

239 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#12 lore raw

PATCH 4/10 am33xx: refactor am33xx mux support and add ti814x support

Quoted 5 lines · Matt Porter

AM33XX and TI814X have a similar mux though the pinmux register layout and address space differ. Add a separate ti814x mux include to support the TI814X-specific differences.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/e5e52fcd/attachment.pgp>
#13 lore raw

PATCH 4/10 am33xx: refactor am33xx mux support and add ti814x support

In reply to Matt Porter
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Matt" == Matt Porter <[email protected]> writes:

Matt> AM33XX and TI814X have a similar mux though the pinmux register Matt> layout and address space differ. Add a separate ti814x mux include Matt> to support the TI814X-specific differences.

Same comment about the file headers as patch 03, otherwise it looks good.

Signature · 1 line
Bye, Peter Korsgaard

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw

PATCH 4/10 am33xx: refactor am33xx mux support and add ti814x support

Quoted 8 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Matt" == Matt Porter <[email protected]> writes:

Matt> AM33XX and TI814X have a similar mux though the pinmux register Matt> layout and address space differ. Add a separate ti814x mux include Matt> to support the TI814X-specific differences.

Same comment about the file headers as patch 03, otherwise it looks good.

Will clean the headers.

-Matt

Quoted 4 lines
Signature · 1 line
Bye, Peter Korsgaard
#16 lore raw

PATCH 5/10 am33xx: add ti814x specific register definitions

In reply to Matt Porter

Support the ti814x specific register definitions within arch-am33xx.

---
 arch/arm/cpu/armv7/am33xx/sys_info.c        |    3 +++
 arch/arm/include/asm/arch-am33xx/cpu.h      |   11 +++++----
 arch/arm/include/asm/arch-am33xx/hardware.h |   32 +++++++++++++++++++++++++++
 arch/arm/include/asm/arch-am33xx/omap.h     |    7 ++++++
 arch/arm/include/asm/arch-am33xx/spl.h      |    5 +++++
 5 files changed, 54 insertions(+), 4 deletions(-)
arch/arm/cpu/armv7/am33xx/sys_info.c +3 -0
index 507b618..402127c 100644
@@ -98,6 +98,9 @@ int print_cpuinfo(void)
 	case AM335X:
 		cpu_s = "AM335X";
 		break;
+	case TI81XX:
+		cpu_s = "TI81XX";
+		break;
 	default:
 		cpu_s = "Unknown cpu type";
 		break;
arch/arm/include/asm/arch-am33xx/cpu.h +7 -4
index 16e8a80..3d3a7c8 100644
@@ -42,9 +42,10 @@
 #define HS_DEVICE			0x2
 #define GP_DEVICE			0x3
 
-/* cpu-id for AM33XX family */
+/* cpu-id for AM33XX and TI81XX family */
 #define AM335X				0xB944
-#define DEVICE_ID			0x44E10600
+#define TI81XX				0xB81E
+#define DEVICE_ID			(CTRL_BASE + 0x0600)
 
 /* This gives the status of the boot mode pins on the evm */
 #define SYSBOOT_MASK			(BIT(0) | BIT(1) | BIT(2)\
@@ -52,9 +53,11 @@
 
 /* Reset control */
 #ifdef CONFIG_AM33XX
-#define PRM_RSTCTRL			0x44E00F00
-#define PRM_RSTST			0x44E00F08
+#define PRM_RSTCTRL			(PRCM_BASE + 0x0F00)
+#elif defined(CONFIG_TI814X)
+#define PRM_RSTCTRL			(PRCM_BASE + 0x00A0)
 #endif
+#define PRM_RSTST			(PRM_RSTCTRL + 8)
 #define PRM_RSTCTRL_RESET		0x01
 #define PRM_RSTST_WARM_RESET_MASK	0x232
 
arch/arm/include/asm/arch-am33xx/hardware.h +32 -0
index 41ab2c0..786c159 100644
@@ -20,9 +20,14 @@
 #define __AM33XX_HARDWARE_H
 
 #include <asm/arch/omap.h>
+#include <config.h>
 
 /* Module base addresses */
+#ifdef CONFIG_AM33XX
 #define UART0_BASE			0x44E09000
+#elif defined(CONFIG_TI814X)
+#define UART0_BASE			0x48020000
+#endif
 
 /* DM Timer base addresses */
 #define DM_TIMER0_BASE			0x4802C000
@@ -37,20 +42,39 @@
 /* GPIO Base address */
 #define GPIO0_BASE			0x48032000
 #define GPIO1_BASE			0x4804C000
+#ifdef CONFIG_AM33XX
 #define GPIO2_BASE			0x481AC000
+#endif
 
 /* BCH Error Location Module */
 #define ELM_BASE			0x48080000
 
 /* Watchdog Timer */
+#ifdef CONFIG_AM33XX
 #define WDT_BASE			0x44E35000
+#elif defined(CONFIG_TI814X)
+#define WDT_BASE			0x481C7000
+#endif
 
 /* Control Module Base Address */
+#ifdef CONFIG_AM33XX
 #define CTRL_BASE			0x44E10000
 #define CTRL_DEVICE_BASE		0x44E10600
+#elif defined(CONFIG_TI814X)
+#define CTRL_BASE			0x48140000
+#endif
 
 /* PRCM Base Address */
+#ifdef CONFIG_AM33XX
 #define PRCM_BASE			0x44E00000
+#elif defined(CONFIG_TI814X)
+#define PRCM_BASE			0x48180000
+#endif
+
+/* PLL Subsystem Base Address */
+#ifdef CONFIG_TI814X
+#define PLL_SUBSYS_BASE			0x481C5000
+#endif
 
 /* EMIF Base address */
 #define EMIF4_0_CFG_BASE		0x4C000000
@@ -99,10 +123,18 @@
 
 /* CPSW Config space */
 #define CPSW_BASE			0x4A100000
+#ifdef CONFIG_AM33XX
 #define CPSW_MDIO_BASE			0x4A101000
+#elif defined(CONFIG_TI814X)
+#define CPSW_MDIO_BASE			0x4A100800
+#endif
 
 /* RTC base address */
+#ifdef CONFIG_AM33XX
 #define RTC_BASE			0x44E3E000
+#elif defined(CONFIG_TI814X)
+#define RTC_BASE			0x480C0000
+#endif
 
 /* OTG */
 #define USB0_OTG_BASE			0x47401000
arch/arm/include/asm/arch-am33xx/omap.h +7 -0
index 850f8a5..ba4f6d2 100644
@@ -23,13 +23,20 @@
 #ifndef _OMAP_H_
 #define _OMAP_H_
 
+#include <config.h>
+
 /*
  * Non-secure SRAM Addresses
  * Non-secure RAM starts at 0x40300000 for GP devices. But we keep SRAM_BASE
  * at 0x40304000(EMU base) so that our code works for both EMU and GP
  */
+#ifdef CONFIG_AM33XX
 #define NON_SECURE_SRAM_START	0x40304000
 #define NON_SECURE_SRAM_END	0x4030E000
+#elif defined(CONFIG_TI814X)
+#define NON_SECURE_SRAM_START	0x40300000
+#define NON_SECURE_SRAM_END	0x40320000
+#endif
 
 /* ROM code defines */
 /* Boot device */
arch/arm/include/asm/arch-am33xx/spl.h +5 -0
index 644ff35..9b5fe9e 100644
@@ -25,8 +25,13 @@
 
 #define BOOT_DEVICE_XIP       	2
 #define BOOT_DEVICE_NAND	5
+#ifdef CONFIG_AM33XX
 #define BOOT_DEVICE_MMC1	8
 #define BOOT_DEVICE_MMC2	9	/* eMMC or daughter card */
+#elif defined(CONFIG_TI814X)
+#define BOOT_DEVICE_MMC1	9
+#define BOOT_DEVICE_MMC2	8	/* ROM only supports 2nd instance */
+#endif
 #define BOOT_DEVICE_SPI		11
 #define BOOT_DEVICE_UART	65
 #define BOOT_DEVICE_CPGMAC	70
Signature · 1 line
1.7.9.5
#17 lore raw

PATCH 5/10 am33xx: add ti814x specific register definitions

Quoted 4 lines · Matt Porter

Support the ti814x specific register definitions within arch-am33xx.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/5eb443b6/attachment.pgp>
#18 lore raw

PATCH 5/10 am33xx: add ti814x specific register definitions

In reply to Matt Porter
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Matt" == Matt Porter <[email protected]> writes:

Matt> Support the ti814x specific register definitions within Matt> arch-am33xx.

Matt> Signed-off-by: Matt Porter <[email protected]> Matt> ---

 Matt>  arch/arm/cpu/armv7/am33xx/sys_info.c        |    3 +++
 Matt>  arch/arm/include/asm/arch-am33xx/cpu.h      |   11 +++++----
 Matt>  arch/arm/include/asm/arch-am33xx/hardware.h |   32 +++++++++++++++++++++++++++
 Matt>  arch/arm/include/asm/arch-am33xx/omap.h     |    7 ++++++
 Matt>  arch/arm/include/asm/arch-am33xx/spl.h      |    5 +++++

Matt> 5 files changed, 54 insertions(+), 4 deletions(-)

Matt> diff --git a/arch/arm/include/asm/arch-am33xx/hardware.h b/arch/arm/include/asm/arch-am33xx/hardware.h Matt> index 41ab2c0..786c159 100644
Matt> --- a/arch/arm/include/asm/arch-am33xx/hardware.h
Matt> +++ b/arch/arm/include/asm/arch-am33xx/hardware.h
Matt> @@ -20,9 +20,14 @@
Matt> #define __AM33XX_HARDWARE_H

Matt> #include <asm/arch/omap.h>
Matt> +#include <config.h>

Quite some of the base addresses are similar, but I wonder if it wouldn't be cleaner to simply have a hardware-am33xx.h / hardware-ti814x.h instead of all these ifdef / elif?

Matt> /* Control Module Base Address */
Matt> +#ifdef CONFIG_AM33XX
Matt> #define CTRL_BASE 0x44E10000
Matt> #define CTRL_DEVICE_BASE 0x44E10600
Matt> +#elif defined(CONFIG_TI814X)
Matt> +#define CTRL_BASE 0x48140000
Matt> +#endif

No CTRL_DEVICE_BASE on ti814x?

Matt> --- a/arch/arm/include/asm/arch-am33xx/spl.h Matt> +++ b/arch/arm/include/asm/arch-am33xx/spl.h Matt> @@ -25,8 +25,13 @@

Matt> #define BOOT_DEVICE_XIP 2
Matt> #define BOOT_DEVICE_NAND 5
Matt> +#ifdef CONFIG_AM33XX
Matt> #define BOOT_DEVICE_MMC1 8
Matt> #define BOOT_DEVICE_MMC2 9 /* eMMC or daughter card */
Matt> +#elif defined(CONFIG_TI814X)
Matt> +#define BOOT_DEVICE_MMC1 9
Matt> +#define BOOT_DEVICE_MMC2 8 /* ROM only supports 2nd instance */

Argh! Couldn't we just swap the meaning of mmc1/mmc2 or would that be too confusing?

Matt> +#endif

 Matt>  #define BOOT_DEVICE_SPI		11
 Matt>  #define BOOT_DEVICE_UART	65
 Matt>  #define BOOT_DEVICE_CPGMAC	70

Matt> --
Matt> 1.7.9.5

Matt> _______________________________________________ Matt> U-Boot mailing list
Matt> U-Boot at lists.denx.de
Matt> http://lists.denx.de/mailman/listinfo/u-boot

Signature · 1 line
Bye, Peter Korsgaard
#19 lore raw

PATCH 5/10 am33xx: add ti814x specific register definitions

Quoted 21 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Matt" == Matt Porter <[email protected]> writes:

Matt> Support the ti814x specific register definitions within Matt> arch-am33xx.

Matt> Signed-off-by: Matt Porter <[email protected]> Matt> ---

 Matt>  arch/arm/cpu/armv7/am33xx/sys_info.c        |    3 +++
 Matt>  arch/arm/include/asm/arch-am33xx/cpu.h      |   11 +++++----
 Matt>  arch/arm/include/asm/arch-am33xx/hardware.h |   32 +++++++++++++++++++++++++++
 Matt>  arch/arm/include/asm/arch-am33xx/omap.h     |    7 ++++++
 Matt>  arch/arm/include/asm/arch-am33xx/spl.h      |    5 +++++

Matt> 5 files changed, 54 insertions(+), 4 deletions(-)

Matt> diff --git a/arch/arm/include/asm/arch-am33xx/hardware.h b/arch/arm/include/asm/arch-am33xx/hardware.h Matt> index 41ab2c0..786c159 100644
Matt> --- a/arch/arm/include/asm/arch-am33xx/hardware.h
Matt> +++ b/arch/arm/include/asm/arch-am33xx/hardware.h
Matt> @@ -20,9 +20,14 @@
Matt> #define __AM33XX_HARDWARE_H

Quoted 6 lines

Matt> #include <asm/arch/omap.h>
Matt> +#include <config.h>

Quite some of the base addresses are similar, but I wonder if it wouldn't be cleaner to simply have a hardware-am33xx.h / hardware-ti814x.h instead of all these ifdef / elif?

Since I suspect the things common from ti814x and am33xx are also common to ti816x (which has been left as an exercise to whomever needs that next), I think we can re-structure this into something like that, but keeping the common parts within hardware.h still.

Quoted 9 lines

Matt> /* Control Module Base Address */
Matt> +#ifdef CONFIG_AM33XX
Matt> #define CTRL_BASE 0x44E10000
Matt> #define CTRL_DEVICE_BASE 0x44E10600
Matt> +#elif defined(CONFIG_TI814X)
Matt> +#define CTRL_BASE 0x48140000
Matt> +#endif

No CTRL_DEVICE_BASE on ti814x?

I think this is a side-effect of Matt not supporting the things attached to it (USB in the case of am335x).

Quoted 13 lines

Matt> --- a/arch/arm/include/asm/arch-am33xx/spl.h Matt> +++ b/arch/arm/include/asm/arch-am33xx/spl.h Matt> @@ -25,8 +25,13 @@

Matt> #define BOOT_DEVICE_XIP 2
Matt> #define BOOT_DEVICE_NAND 5
Matt> +#ifdef CONFIG_AM33XX
Matt> #define BOOT_DEVICE_MMC1 8
Matt> #define BOOT_DEVICE_MMC2 9 /* eMMC or daughter card */
Matt> +#elif defined(CONFIG_TI814X)
Matt> +#define BOOT_DEVICE_MMC1 9
Matt> +#define BOOT_DEVICE_MMC2 8 /* ROM only supports 2nd instance */

Quoted 2 lines

Argh! Couldn't we just swap the meaning of mmc1/mmc2 or would that be too confusing?

IMHO, that will lead to further confusion down the line. I talked with Matt about this before and well, it's funky.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130218/8a90135f/attachment.pgp>
#20 lore raw

PATCH 5/10 am33xx: add ti814x specific register definitions

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Tom" == Tom Rini <[email protected]> writes:

Hi,

Quoted 3 lines
Quoted 3 lines

Quite some of the base addresses are similar, but I wonder if it wouldn't be cleaner to simply have a hardware-am33xx.h / hardware-ti814x.h instead of all these ifdef / elif?

Tom> Since I suspect the things common from ti814x and am33xx are also common Tom> to ti816x (which has been left as an exercise to whomever needs that Tom> next), I think we can re-structure this into something like that, but Tom> keeping the common parts within hardware.h still.

FYI, I might very well be that guy as I've recently started work on a ti816x based project.

Quoted 2 lines
Quoted 2 lines

Argh! Couldn't we just swap the meaning of mmc1/mmc2 or would that be too confusing?

Tom> IMHO, that will lead to further confusion down the line. I talked with Tom> Matt about this before and well, it's funky.

Ok.

Signature · 1 line
Bye, Peter Korsgaard
#21 lore raw

PATCH 5/10 am33xx: add ti814x specific register definitions

I need ti816x u-boot too! Maybe I can help too. Need 3.x kernel too but I guess that is for another list :)

Regards,

Brian

Quoted 10 lines · Peter Korsgaard
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Tom" == Tom Rini <[email protected]> writes:

Hi,

Quoted 3 lines
Quoted 3 lines

Quite some of the base addresses are similar, but I wonder if it wouldn't be cleaner to simply have a hardware-am33xx.h / hardware-ti814x.h instead of all these ifdef / elif?

Tom> Since I suspect the things common from ti814x and am33xx are also

common

Quoted 2 lines

Tom> to ti816x (which has been left as an exercise to whomever needs that Tom> next), I think we can re-structure this into something like that,

but

Quoted 9 lines

Tom> keeping the common parts within hardware.h still.

FYI, I might very well be that guy as I've recently started work on a ti816x based project.

Quoted 2 lines
Quoted 2 lines

Argh! Couldn't we just swap the meaning of mmc1/mmc2 or would that be too confusing?

Tom> IMHO, that will lead to further confusion down the line. I talked

with

Quoted 10 lines

Tom> Matt about this before and well, it's funky.

Ok.

--
Bye, Peter Korsgaard
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#22 lore raw

PATCH 5/10 am33xx: add ti814x specific register definitions

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Brian" == Brian Hutchinson <[email protected]> writes:

Hi,

Brian> I need ti816x u-boot too!? Maybe I can help too. Need 3.x kernel Brian> too but I guess that is for another list :)

Antoine is working on it, and the basics are running:

U-Boot SPL 2013.01-00297-gf592f9c-dirty (Feb 22 2013 - 16:25:01) OMAP SD/MMC: 0
boot mode - FAT
reading u-boot.img
reading u-boot.img

U-Boot 2013.01-00297-gf592f9c-dirty (Feb 22 2013 - 16:25:01)

AMTI81XX-GP rev 1

DRAM:  1 GiB
WARNING: Caches not enabled
MMC:   OMAP SD/MMC: 0

Using default environment

Net:   DaVinci-EMAC
Hit any key to stop autoboot:  0

I'm looking at the emac driver at the moment. It still needs some more work and cleanup, but I would imagine an early series could be posted next week or so is Antoine agrees.

Signature · 1 line
Bye, Peter Korsgaard
#23 lore raw

PATCH 5/10 am33xx: add ti814x specific register definitions

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 17 lines · Peter Korsgaard
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Brian" == Brian Hutchinson <[email protected]> writes:

Hi,

Brian> I need ti816x u-boot too! Maybe I can help too. Need 3.x kernel Brian> too but I guess that is for another list :)

Antoine is working on it, and the basics are running:

U-Boot SPL 2013.01-00297-gf592f9c-dirty (Feb 22 2013 - 16:25:01) OMAP SD/MMC: 0 boot mode - FAT reading u-boot.img reading u-boot.img

U-Boot 2013.01-00297-gf592f9c-dirty (Feb 22 2013 - 16:25:01)

Quoted 8 lines

AMTI81XX-GP rev 1 DRAM: 1 GiB WARNING: Caches not enabled MMC:
OMAP SD/MMC: 0 Using default environment

Net: DaVinci-EMAC Hit any key to stop autoboot: 0

I'm looking at the emac driver at the moment. It still needs some more work and cleanup, but I would imagine an early series could be posted next week or so is Antoine agrees.

Can we please make the emac driver switch to phylib while you're in there? Thanks!

- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRJ5PvAAoJENk4IS6UOR1WbzMP/jj3pbTEdKtC3ZVoPIPAXSt7 cOqiqgEZT8eeP9EPOTuM/Gp11W5ARHhxbD9x/6QG3fVqDSO+aMR5RBcfvRllIMXP 3KqI0hrGrrW5l0mkN/y0TH9A2rwGeqs4NxkV0QK6USQz7ei11iqSf9bW4fhQ6/9i BkzCxrK4Jl1BMcPHx8x4EnTAzscteQQeKmQGrPjI1HjdPeQ7R9v/Azl7rtBbNeGd JwSBGWiiZAL6C3tYQi5N90zgeGlk1lChJkTB3knunD2IGnFL1KpAy2I7q/IEf55i sc6R4TNZlKpp/IOEvd69KYjAQzefcAMryiLQJsMlw8L6XTDuVEC2H1EztfLqawGZ pUkVUDRKqKXzZYZQNgv0f/+euUWB04IOzSw1lI0SqLK43h8Mkdh0UTcRIOEFhlR/ j7LKi2Nw3PTwub9tCXHd3a9iOtUtMT55CuPOFaj3jBOBU3PADiFoD9zvD49oir8Z ruc7Mtm/stvTnAsW/IsPuXXyxhv3wO5YrMO2AzbaZTqf3hvNcaIQStWVCZLdjs7U rsvDW5P4ocoYgQfexXsg4/sOuJfu7JCIzmejovuNsJMxJREjuCIdMrQlW0SaGuf6 5wZKakYgNKyITyJFDtM9FatflOwpYTLP4MnnDNnFuup0/yuUHwYHoCyaiiscDsYv 7eaCMGN9K0g6q1+EWhCR
=WPpm
-----END PGP SIGNATURE-----

#24 lore raw

PATCH 5/10 am33xx: add ti814x specific register definitions

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Tom" == Tom Rini <[email protected]> writes:

Hi,

Quoted 3 lines
Quoted 3 lines

I'm looking at the emac driver at the moment. It still needs some more work and cleanup, but I would imagine an early series could be posted next week or so is Antoine agrees.

Tom> Can we please make the emac driver switch to phylib while you're Tom> in there? Thanks!

I can have a look, but I don't have access to any of the older devices using the driver.

Signature · 1 line
Bye, Peter Korsgaard

A message that is not in the archive (sent off-list or not yet received): [email protected]

#26 lore raw

PATCH 5/10 am33xx: add ti814x specific register definitions

Quoted 25 lines · Tom Rini
Quoted 24 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Matt" == Matt Porter <[email protected]> writes:

Matt> Support the ti814x specific register definitions within Matt> arch-am33xx.

Matt> Signed-off-by: Matt Porter <[email protected]> Matt> ---

 Matt>  arch/arm/cpu/armv7/am33xx/sys_info.c        |    3 +++
 Matt>  arch/arm/include/asm/arch-am33xx/cpu.h      |   11 +++++----
 Matt>  arch/arm/include/asm/arch-am33xx/hardware.h |   32 +++++++++++++++++++++++++++
 Matt>  arch/arm/include/asm/arch-am33xx/omap.h     |    7 ++++++
 Matt>  arch/arm/include/asm/arch-am33xx/spl.h      |    5 +++++

Matt> 5 files changed, 54 insertions(+), 4 deletions(-)

Matt> diff --git a/arch/arm/include/asm/arch-am33xx/hardware.h b/arch/arm/include/asm/arch-am33xx/hardware.h Matt> index 41ab2c0..786c159 100644
Matt> --- a/arch/arm/include/asm/arch-am33xx/hardware.h
Matt> +++ b/arch/arm/include/asm/arch-am33xx/hardware.h
Matt> @@ -20,9 +20,14 @@
Matt> #define __AM33XX_HARDWARE_H

Matt> #include <asm/arch/omap.h>
Matt> +#include <config.h>

Quoted 8 lines
Quoted 3 lines

Quite some of the base addresses are similar, but I wonder if it wouldn't be cleaner to simply have a hardware-am33xx.h / hardware-ti814x.h instead of all these ifdef / elif?

Since I suspect the things common from ti814x and am33xx are also common to ti816x (which has been left as an exercise to whomever needs that next), I think we can re-structure this into something like that, but keeping the common parts within hardware.h still.

Sounds good. I'll restructure with only the common parts in hardware.h.

Quoted 8 lines
Quoted 8 lines

Matt> /* Control Module Base Address */
Matt> +#ifdef CONFIG_AM33XX
Matt> #define CTRL_BASE 0x44E10000
Matt> #define CTRL_DEVICE_BASE 0x44E10600
Matt> +#elif defined(CONFIG_TI814X)
Matt> +#define CTRL_BASE 0x48140000
Matt> +#endif

Quoted 4 lines
Quoted 1 line

No CTRL_DEVICE_BASE on ti814x?

I think this is a side-effect of Matt not supporting the things attached to it (USB in the case of am335x).

I tried to avoid defining things I'm not yet using. For CTRL_DEVICE_BASE, I would add it once I get to adding cpsw support as we need to read the efused macid value from that area.

Quoted 13 lines
Quoted 13 lines

Matt> --- a/arch/arm/include/asm/arch-am33xx/spl.h Matt> +++ b/arch/arm/include/asm/arch-am33xx/spl.h Matt> @@ -25,8 +25,13 @@

Matt> #define BOOT_DEVICE_XIP 2
Matt> #define BOOT_DEVICE_NAND 5
Matt> +#ifdef CONFIG_AM33XX
Matt> #define BOOT_DEVICE_MMC1 8
Matt> #define BOOT_DEVICE_MMC2 9 /* eMMC or daughter card */
Matt> +#elif defined(CONFIG_TI814X)
Matt> +#define BOOT_DEVICE_MMC1 9
Matt> +#define BOOT_DEVICE_MMC2 8 /* ROM only supports 2nd instance */

Quoted 5 lines
Quoted 2 lines

Argh! Couldn't we just swap the meaning of mmc1/mmc2 or would that be too confusing?

IMHO, that will lead to further confusion down the line. I talked with Matt about this before and well, it's funky.

This is definitely a quirky area wrt TI814x. AFAIK it's the only OMAP-ish part where the ROM only allows boot from a single MMC instance. Further, that single MMC instance is actually the 2nd one as noted in the comment. This means to keep all the existing SPL mmc init logic intact, we need to define as above so that the unimplemented first MMC instance (which does exist on the part) does not get intialized when the ROM drops a bootdevice of "8".

-Matt

#27 lore raw

PATCH 6/10 am33xx: add dmm support to emif4 library

In reply to Matt Porter

Adds a config_dmm() routine to support TI814X DMM configuration.

---
 arch/arm/cpu/armv7/am33xx/emif4.c           |   17 +++++++++++++++++
 arch/arm/include/asm/arch-am33xx/ddr_defs.h |    5 +++++
 2 files changed, 22 insertions(+)
arch/arm/cpu/armv7/am33xx/emif4.c +17 -0
index 0c617fa..27547be 100644
@@ -44,11 +44,28 @@ void dram_init_banksize(void)
 
 
 #ifdef CONFIG_SPL_BUILD
+static struct dmm_lisa_map_regs *hw_lisa_map_regs =
+				(struct dmm_lisa_map_regs *)DMM_BASE;
 static struct vtp_reg *vtpreg[2] = {
 				(struct vtp_reg *)VTP0_CTRL_ADDR,
 				(struct vtp_reg *)VTP1_CTRL_ADDR};
 static struct ddr_ctrl *ddrctrl = (struct ddr_ctrl *)DDR_CTRL_ADDR;
 
+void config_dmm(const struct dmm_lisa_map_regs *regs)
+{
+	enable_dmm_clocks();
+
+	writel(0, &hw_lisa_map_regs->dmm_lisa_map_3);
+	writel(0, &hw_lisa_map_regs->dmm_lisa_map_2);
+	writel(0, &hw_lisa_map_regs->dmm_lisa_map_1);
+	writel(0, &hw_lisa_map_regs->dmm_lisa_map_0);
+
+	writel(regs->dmm_lisa_map_3, &hw_lisa_map_regs->dmm_lisa_map_3);
+	writel(regs->dmm_lisa_map_2, &hw_lisa_map_regs->dmm_lisa_map_2);
+	writel(regs->dmm_lisa_map_1, &hw_lisa_map_regs->dmm_lisa_map_1);
+	writel(regs->dmm_lisa_map_0, &hw_lisa_map_regs->dmm_lisa_map_0);
+}
+
 static void config_vtp(int nr)
 {
 	writel(readl(&vtpreg[nr]->vtp0ctrlreg) | VTP_CTRL_ENABLE,
arch/arm/include/asm/arch-am33xx/ddr_defs.h +5 -0
index 8bf25a0..943b4ce 100644
@@ -66,6 +66,11 @@
 #define MT41J128MJT125_IOCTRL_VALUE		0x18B
 
 /**
+ * Configure DMM
+ */
+void config_dmm(const struct dmm_lisa_map_regs *regs);
+
+/**
  * Configure SDRAM
  */
 void config_sdram(const struct emif_regs *regs, int nr);
Signature · 1 line
1.7.9.5
#28 lore raw

PATCH 6/10 am33xx: add dmm support to emif4 library

Quoted 3 lines · Matt Porter

Adds a config_dmm() routine to support TI814X DMM configuration.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/e5f808e3/attachment.pgp>
#29 lore raw

PATCH 7/10 ti814x_evm: add ti814x evm board support

In reply to Matt Porter

Add TI814X EVM board directory and config file.

---
 board/ti/ti814x/Makefile     |   46 +++++++++
 board/ti/ti814x/evm.c        |  198 +++++++++++++++++++++++++++++++++++++++
 board/ti/ti814x/evm.h        |    7 ++
 board/ti/ti814x/mux.c        |   51 ++++++++++
 include/configs/ti814x_evm.h |  213 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 515 insertions(+)
 create mode 100644 board/ti/ti814x/Makefile
 create mode 100644 board/ti/ti814x/evm.c
 create mode 100644 board/ti/ti814x/evm.h
 create mode 100644 board/ti/ti814x/mux.c
 create mode 100644 include/configs/ti814x_evm.h
board/ti/ti814x/Makefile new file +46 -0
new file mode 100644
index 0000000..09d2422
@@ -0,0 +1,46 @@
+#
+# Makefile
+#
+# Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+#
+# 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.
+#
+# This program is distributed "as is" WITHOUT ANY WARRANTY of any
+# kind, whether express or implied; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(BOARD).o
+
+ifdef CONFIG_SPL_BUILD
+COBJS	:= mux.o
+endif
+
+COBJS	+= evm.o
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+clean:
+	rm -f $(SOBJS) $(OBJS)
+
+distclean:	clean
+	rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/ti/ti814x/evm.c new file +198 -0

198 lines not on this page · raw message

board/ti/ti814x/evm.h new file +7 -0
new file mode 100644
index 0000000..40f8710
@@ -0,0 +1,7 @@
+#ifndef _EVM_H
+#define _EVM_H
+
+void enable_uart0_pin_mux(void);
+void enable_mmc1_pin_mux(void);
+
+#endif /* _EVM_H */
board/ti/ti814x/mux.c new file +51 -0

51 lines not on this page · raw message

include/configs/ti814x_evm.h new file +213 -0

213 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#30 lore raw

PATCH 7/10 ti814x_evm: add ti814x evm board support

Quoted 3 lines · Matt Porter

Add TI814X EVM board directory and config file.

[snip]

Quoted 3 lines

+++ b/board/ti/ti814x/evm.h

board/ti/ti814x/evm.h new file +1 -0
@@ -0,0 +1,7 @@
+#ifndef _EVM_H

[snip]

include/configs/ti814x_evm.h line 1

Quoted 3 lines

+++ b/include/configs/ti814x_evm.h

include/configs/ti814x_evm.h new file +1 -0
@@ -0,0 +1,213 @@
+#define __CONFIG_TI814X_EVM_H

Needs GPLv2 or later boilerplate.

[snip]

include/configs/ti814x_evm.h line 24

Quoted 3 lines
include/configs/ti814x_evm.h new file +3 -0
+#define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs  */
+#define CONFIG_SETUP_MEMORY_TAGS	1
+#define CONFIG_INITRD_TAG		1	/* for ramdisk support */

Just #define CONFIG_FOO in these cases (and some others that follow)

[snip]

include/configs/ti814x_evm.h line 75

Quoted 7 lines
include/configs/ti814x_evm.h new file +7 -0
+	"findfdt="\
+		"if test $board_name = A335BONE; then " \
+			"setenv fdtfile am335x-bone.dtb; fi; " \
+		"if test $board_name = A33515BB; then " \
+			"setenv fdtfile am335x-evm.dtb; fi; " \
+		"if test $board_name = A335X_SK; then " \
+			"setenv fdtfile am335x-evmsk.dtb; fi\0" \

That's not right :)

[snip]

include/configs/ti814x_evm.h line 115

Quoted 4 lines
include/configs/ti814x_evm.h new file +4 -0
+/* memtest works on 8 MB in DRAM offset 32MB from start of ram disk*/
+#define CONFIG_SYS_MEMTEST_START	(PHYS_DRAM_1 + (64 * 1024 * 1024))
+#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START \
+					+ (8 * 1024 * 1024))

This isn't your mistake initially, but this should just be start of memory to smallest possible config the evm can come with - 4MB.

[snip]

include/configs/ti814x_evm.h line 147

Quoted 1 line
include/configs/ti814x_evm.h new file +1 -0
+#undef CONFIG_NAND_OMAP_GPMC

Just leave it out.

include/configs/ti814x_evm.h line 158

Quoted 2 lines
include/configs/ti814x_evm.h new file +2 -0
+#define CONFIG_SYS_BAUDRATE_TABLE	{ 110, 300, 600, 1200, 2400, \
+4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 }

Leave that out and get the generic table. am335x needs to be updated for that.

[snip]

include/configs/ti814x_evm.h line 207

Quoted 3 lines
include/configs/ti814x_evm.h new file +3 -0
+/* Since SPL did pll and ddr initialization for us,
+ * we don't need to do it twice.
+ */

/*
* Must be like
* this.
*/

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/d5e2e3be/attachment.pgp>

A message that is not in the archive (sent off-list or not yet received): [email protected]

#32 lore raw

PATCH 7/10 ti814x_evm: add ti814x evm board support

Quoted 10 lines · Tom Rini
Quoted 3 lines · Matt Porter

Add TI814X EVM board directory and config file.

[snip]

Quoted 3 lines

+++ b/board/ti/ti814x/evm.h

board/ti/ti814x/evm.h new file +1 -0
@@ -0,0 +1,7 @@
+#ifndef _EVM_H

[snip]

Quoted 5 lines

include/configs/ti814x_evm.h line 1

Quoted 3 lines

+++ b/include/configs/ti814x_evm.h

include/configs/ti814x_evm.h new file +1 -0
@@ -0,0 +1,213 @@
+#define __CONFIG_TI814X_EVM_H

Needs GPLv2 or later boilerplate.

Ok.

Quoted 7 lines

[snip]

include/configs/ti814x_evm.h line 24

Quoted 3 lines
include/configs/ti814x_evm.h new file +3 -0
+#define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs  */
+#define CONFIG_SETUP_MEMORY_TAGS	1
+#define CONFIG_INITRD_TAG		1	/* for ramdisk support */

Just #define CONFIG_FOO in these cases (and some others that follow)

Ok.

Quoted 11 lines

[snip]

include/configs/ti814x_evm.h line 75

Quoted 7 lines
include/configs/ti814x_evm.h new file +7 -0
+	"findfdt="\
+		"if test $board_name = A335BONE; then " \
+			"setenv fdtfile am335x-bone.dtb; fi; " \
+		"if test $board_name = A33515BB; then " \
+			"setenv fdtfile am335x-evm.dtb; fi; " \
+		"if test $board_name = A335X_SK; then " \
+			"setenv fdtfile am335x-evmsk.dtb; fi\0" \

That's not right :)

LOL, indeed..forgot about that am335x specific stuff. Will fix.

Quoted 8 lines

[snip]

include/configs/ti814x_evm.h line 115

Quoted 4 lines
include/configs/ti814x_evm.h new file +4 -0
+/* memtest works on 8 MB in DRAM offset 32MB from start of ram disk*/
+#define CONFIG_SYS_MEMTEST_START	(PHYS_DRAM_1 + (64 * 1024 * 1024))
+#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START \
+					+ (8 * 1024 * 1024))

This isn't your mistake initially, but this should just be start of memory to smallest possible config the evm can come with - 4MB.

Ok.

Quoted 5 lines

[snip]

Quoted 1 line

+#undef CONFIG_NAND_OMAP_GPMC

Just leave it out.

Ok.

Quoted 5 lines
Quoted 2 lines

+#define CONFIG_SYS_BAUDRATE_TABLE { 110, 300, 600, 1200, 2400, \
+4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 }

Leave that out and get the generic table. am335x needs to be updated for that.

Ok, will do. I even saw something about this and forgot to update this config.

Quoted 9 lines

[snip]

Quoted 3 lines

+/* Since SPL did pll and ddr initialization for us,
+ * we don't need to do it twice.
+ */

/*
* Must be like
* this.
*/

Ok.

#33 lore raw

PATCH 8/10 ns16550: enable quirks for ti814x

In reply to Matt Porter

TI814X requires the same quirks as AM33XX to be enabled.

---
 drivers/serial/ns16550.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/serial/ns16550.c +3 -2
index 87a0917..02bc85b 100644
@@ -43,7 +43,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
 
 	serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier);
 #if (defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)) || \
-					defined(CONFIG_AM33XX)
+			defined(CONFIG_AM33XX) || defined(CONFIG_TI814X)
 	serial_out(0x7, &com_port->mdr1);	/* mode select reset TL16C750*/
 #endif
 	serial_out(UART_LCR_BKSE | UART_LCRVAL, (ulong)&com_port->lcr);
@@ -57,7 +57,8 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
 	serial_out((baud_divisor >> 8) & 0xff, &com_port->dlm);
 	serial_out(UART_LCRVAL, &com_port->lcr);
 #if (defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)) || \
-	defined(CONFIG_AM33XX) || defined(CONFIG_SOC_DA8XX)
+	defined(CONFIG_AM33XX) || defined(CONFIG_SOC_DA8XX) || \
+	defined(CONFIG_TI814X)
 
 #if defined(CONFIG_APTIX)
 	/* /13 mode so Aptix 6MHz can hit 115200 */
Signature · 1 line
1.7.9.5
#34 lore raw

PATCH 8/10 ns16550: enable quirks for ti814x

Quoted 3 lines · Matt Porter

TI814X requires the same quirks as AM33XX to be enabled.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/bceee9f0/attachment.pgp>
#35 lore raw

PATCH 9/10 ti814x_evm: enable ti814x evm build

In reply to Matt Porter

Enable TI814X EVM build via ti814x_evm target.

---
 Makefile                                |    2 +-
 arch/arm/cpu/armv7/Makefile             |    2 +-
 arch/arm/cpu/armv7/omap-common/Makefile |    2 +-
 boards.cfg                              |    1 +
 spl/Makefile                            |    2 +-
 5 files changed, 5 insertions(+), 4 deletions(-)
Makefile +1 -1
index 51bd918..120ab31 100644
@@ -334,7 +334,7 @@ LIBS-y += api/libapi.o
 LIBS-y += post/libpost.o
 LIBS-y += test/libtest.o
 
-ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
+ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TI814X),)
 LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
 endif
 
arch/arm/cpu/armv7/Makefile +1 -1
index 4fdbee4..156a5ba 100644
@@ -32,7 +32,7 @@ COBJS	+= cache_v7.o
 COBJS	+= cpu.o
 COBJS	+= syslib.o
 
-ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA20),)
+ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA20)$(CONFIG_TI814X),)
 SOBJS	+= lowlevel_init.o
 endif
 
arch/arm/cpu/armv7/omap-common/Makefile +1 -1
index 0efc80d..55e82ba 100644
@@ -36,7 +36,7 @@ COBJS	+= emif-common.o
 COBJS	+= vc.o
 endif
 
-ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
+ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TI814X),)
 COBJS	+= boot-common.o
 SOBJS	+= lowlevel_init.o
 endif
boards.cfg +1 -0
index 98f7a14..0eabae9 100644
@@ -236,6 +236,7 @@ am335x_evm_uart2             arm         armv7       am335x              ti
 am335x_evm_uart3             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL4,CONS_INDEX=4
 am335x_evm_uart4             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL5,CONS_INDEX=5
 am335x_evm_uart5             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL6,CONS_INDEX=6
+ti814x_evm                   arm         armv7       ti814x              ti             am33xx
 highbank                     arm         armv7       highbank            -              highbank
 mx51_efikamx                 arm         armv7       mx51_efikamx        genesi         mx5		mx51_efikamx:MACH_TYPE=MACH_TYPE_MX51_EFIKAMX,IMX_CONFIG=board/genesi/mx51_efikamx/imximage_mx.cfg
 mx51_efikasb                 arm         armv7       mx51_efikamx        genesi         mx5		mx51_efikamx:MACH_TYPE=MACH_TYPE_MX51_EFIKASB,IMX_CONFIG=board/genesi/mx51_efikamx/imximage_sb.cfg
spl/Makefile +1 -1
index 6dbb105..9761e7d 100644
@@ -82,7 +82,7 @@ LIBS-$(CONFIG_SPL_NET_SUPPORT) += net/libnet.o
 LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/libnet.o
 LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/phy/libphy.o
 
-ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
+ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TI814X),)
 LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
 endif
 
Signature · 1 line
1.7.9.5
#36 lore raw

PATCH 9/10 ti814x_evm: enable ti814x evm build

Quoted 3 lines · Matt Porter

Enable TI814X EVM build via ti814x_evm target.

This should just get squashed into the patch that adds the board code. Otherwise,

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/3a2e7683/attachment.pgp>
#37 lore raw

PATCH 9/10 ti814x_evm: enable ti814x evm build

Quoted 10 lines · Tom Rini
Quoted 3 lines · Matt Porter

Enable TI814X EVM build via ti814x_evm target.

This should just get squashed into the patch that adds the board code. Otherwise,

Sounds good. I'll squash it in there.

-Matt

#38 lore raw

PATCH 10/10 MAINTAINERS: add ti814x_evm maintainer

In reply to Matt Porter

Add a maintainer entry for the TI814x EVM.

---
 MAINTAINERS |    4 ++++
 1 file changed, 4 insertions(+)
MAINTAINERS +4 -0
index d3ed390..282dead 100644
@@ -830,6 +830,10 @@ Stelian Pop <[email protected]>
 	at91sam9263ek	ARM926EJS (AT91SAM9263 SoC)
 	at91sam9rlek	ARM926EJS (AT91SAM9RL SoC)
 
+Matt Porter <[email protected]>
+
+	ti814x_evm	ARM ARMV7 (TI814x Soc)
+
 Dave Purdy <[email protected]>
 
 	pogo_e02	ARM926EJS (Kirkwood SoC)
Signature · 1 line
1.7.9.5
#39 lore raw

PATCH 10/10 MAINTAINERS: add ti814x_evm maintainer

Quoted 3 lines · Matt Porter

Add a maintainer entry for the TI814x EVM.

Please squash this into the patch which adds the EVM, thanks.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/64f0a700/attachment.pgp>
#40 lore raw

PATCH 10/10 MAINTAINERS: add ti814x_evm maintainer

Quoted 7 lines · Tom Rini
Quoted 3 lines · Matt Porter

Add a maintainer entry for the TI814x EVM.

Please squash this into the patch which adds the EVM, thanks.

Will do, thanks for the review.

-Matt