Skip to contentSkip to conversation

davinci: Initial support for MityDSP-L138/MityARM-1808

PATCH New Michael Williamson 3 participants 4 messages Sep 2, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 davinci: Initial support for MityDSP-L138/MityARM-1808

This patch adds initial support for the MityDSP-L138 and MityDSP-1808 system on Module (SOM) under the machine name "mityomapl138". These SOMs are based on the da850 davinci CPU architecture. Information on these SOMs may be found at http://www.mitydsp.com.

Basic support for the console UART, NAND, and EMAC (MII interface) is included in this patch.

---
Changes since v2:
1) Remove defaulting this board from Kconfig.
2) Add MITYOMAPL138 board to da8xx_omapl_defconfig.
3) Fix tabs alignment per comment.

The new defconfig file was generated by:
make da8xx_omapl_defconfig
make menuconfig
select MITYOMAPL138 option
make savedefconfig
cp defconfig arch/arm/configs/da8xx_omapl_defconfig

I think the other 3 lines were a result of updated KConfig options in the current baseline.

 arch/arm/configs/da8xx_omapl_defconfig          |    4 +-
 arch/arm/mach-davinci/Kconfig                   |    8 +
 arch/arm/mach-davinci/Makefile                  |    1 +
 arch/arm/mach-davinci/board-mityomapl138.c      |  220 +++++++++++++++++++++++
 arch/arm/mach-davinci/include/mach/uncompress.h |    1 +
 5 files changed, 232 insertions(+), 2 deletions(-)
arch/arm/configs/da8xx_omapl_defconfig +2 -2
index 3952a4e..38e58e8 100644
@@ -17,6 +17,7 @@ CONFIG_MODVERSIONS=y
 CONFIG_ARCH_DAVINCI=y
 CONFIG_ARCH_DAVINCI_DA830=y
 CONFIG_ARCH_DAVINCI_DA850=y
+CONFIG_MACH_MITYOMAPL138=y
 CONFIG_DAVINCI_RESET_CLOCKS=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
@@ -73,6 +74,7 @@ CONFIG_SERIO_LIBPS2=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=3
+CONFIG_SERIAL_8250_RUNTIME_UARTS=3
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_DAVINCI=y
@@ -83,7 +85,6 @@ CONFIG_REGULATOR_DUMMY=y
 CONFIG_REGULATOR_TPS6507X=y
 CONFIG_FB=y
 CONFIG_FB_DA8XX=y
-# CONFIG_VGA_CONSOLE is not set
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 CONFIG_SOUND=m
@@ -95,7 +96,6 @@ CONFIG_SND_DAVINCI_SOC=m
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 CONFIG_XFS_FS=m
-CONFIG_INOTIFY=y
 CONFIG_AUTOFS4_FS=m
 CONFIG_MSDOS_FS=y
 CONFIG_VFAT_FS=y
arch/arm/mach-davinci/Kconfig +8 -0
index 2bf03e9..9aca60c 100644
@@ -185,6 +185,14 @@ config MACH_TNETV107X
 	help
 	  Say Y here to select the TI TNETV107X Evaluation Module.
 
+config MACH_MITYOMAPL138
+	bool "Critical Link MityDSP-L138/MityARM-1808 SoM"
+	depends on ARCH_DAVINCI_DA850
+	help
+	  Say Y here to select the Critical Link MityDSP-L138/MityARM-1808
+	  System on Module.  Information on this SoM may be found at
+	  http://www.mitydsp.com
+
 config DAVINCI_MUX
 	bool "DAVINCI multiplexing support"
 	depends on ARCH_DAVINCI
arch/arm/mach-davinci/Makefile +1 -0
index eab4c0f..3e966e8 100644
@@ -33,6 +33,7 @@ obj-$(CONFIG_MACH_DAVINCI_DM365_EVM)	+= board-dm365-evm.o
 obj-$(CONFIG_MACH_DAVINCI_DA830_EVM)	+= board-da830-evm.o
 obj-$(CONFIG_MACH_DAVINCI_DA850_EVM)	+= board-da850-evm.o
 obj-$(CONFIG_MACH_TNETV107X)		+= board-tnetv107x-evm.o
+obj-$(CONFIG_MACH_MITYOMAPL138)		+= board-mityomapl138.o
 
 # Power Management
 obj-$(CONFIG_CPU_FREQ)			+= cpufreq.o
arch/arm/mach-davinci/board-mityomapl138.c new file +220 -0

220 lines not on this page · raw message

arch/arm/mach-davinci/include/mach/uncompress.h +1 -0
index 15a6192..d370391 100644
@@ -88,6 +88,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
 		/* DA8xx boards */
 		DEBUG_LL_DA8XX(davinci_da830_evm,	2);
 		DEBUG_LL_DA8XX(davinci_da850_evm,	2);
+		DEBUG_LL_DA8XX(mityomapl138,		1);
 
 		/* TNETV107x boards */
 		DEBUG_LL_TNETV107X(tnetv107x,		1);
#1 lore raw

PATCH v3 1/1 davinci: Initial support for MityDSP-L138/MityARM-1808

Hello.

Quoted 9 lines · Michael Williamson

This patch adds initial support for the MityDSP-L138 and MityDSP-1808 system on Module (SOM) under the machine name "mityomapl138". These SOMs are based on the da850 davinci CPU architecture. Information on these SOMs may be found at http://www.mitydsp.com.

Basic support for the console UART, NAND, and EMAC (MII interface) is included in this patch.

[...]

Quoted 6 lines
arch/arm/mach-davinci/board-mityomapl138.c new file +0 -0
new file mode 100644
index 0000000..78c972b
@@ -0,0 +1,220 @@

[...]

Quoted 13 lines
arch/arm/mach-davinci/board-mityomapl138.c new file +13 -0
+static const short mityomap_mii_pins[] = {
+	DA850_MII_TXEN, DA850_MII_TXCLK, DA850_MII_COL, DA850_MII_TXD_3,
+	DA850_MII_TXD_2, DA850_MII_TXD_1, DA850_MII_TXD_0, DA850_MII_RXER,
+	DA850_MII_CRS, DA850_MII_RXCLK, DA850_MII_RXDV, DA850_MII_RXD_3,
+	DA850_MII_RXD_2, DA850_MII_RXD_1, DA850_MII_RXD_0, DA850_MDIO_CLK,
+	DA850_MDIO_D,
+	-1
+};
+
+static const short mityomap_rmii_pins[] = {
+	DA850_RMII_TXD_0, DA850_RMII_TXD_1, DA850_RMII_TXEN,
+	DA850_RMII_CRS_DV, DA850_RMII_RXD_0, DA850_RMII_RXD_1,
+	DA850_RMII_RXER, DA850_RMII_MHZ_50_CLK, DA850_MDIO_CLK,

arch/arm/mach-davinci/board-mityomapl138.c line 114

Quoted 10 lines
arch/arm/mach-davinci/board-mityomapl138.c new file +10 -0
+	DA850_MDIO_D,
+	-1
+};
+
+static void __init mityomapl138_config_emac(void)
+{
+	void __iomem *cfg_chip3_base;
+	int ret;
+	u32 val;
+	struct davinci_soc_info *soc_info = &davinci_soc_info;

Should be an empty line here...

arch/arm/mach-davinci/board-mityomapl138.c line 120

Quoted 6 lines
arch/arm/mach-davinci/board-mityomapl138.c new file +6 -0
+	soc_info->emac_pdata->rmii_en = 0; /* hardcoded for now */
+
+	cfg_chip3_base = DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG);
+	val = __raw_readl(cfg_chip3_base);
+
+	if (soc_info->emac_pdata->rmii_en) {

If it's hard coded to 0, why handle the other case?

arch/arm/mach-davinci/board-mityomapl138.c line 128

Quoted 8 lines
arch/arm/mach-davinci/board-mityomapl138.c new file +8 -0
+		val |= BIT(8);
+		ret = davinci_cfg_reg_list(mityomap_rmii_pins);
+		pr_info("RMII PHY configured\n");
+	} else {
+		val &= ~BIT(8);
+		ret = davinci_cfg_reg_list(mityomap_mii_pins);
+		pr_info("MII PHY configured\n");
+	}

WBR, Sergei

#2 lore raw

PATCH v3 1/1 davinci: Initial support for MityDSP-L138/MityARM-1808

Quoted 40 lines · Sergei Shtylyov

Hello.

Quoted 9 lines · Michael Williamson

This patch adds initial support for the MityDSP-L138 and MityDSP-1808 system on Module (SOM) under the machine name "mityomapl138". These SOMs are based on the da850 davinci CPU architecture. Information on these SOMs may be found at http://www.mitydsp.com.

Basic support for the console UART, NAND, and EMAC (MII interface) is included in this patch.

[...]

Quoted 6 lines
arch/arm/mach-davinci/board-mityomapl138.c new file +0 -0
new file mode 100644
index 0000000..78c972b
@@ -0,0 +1,220 @@

[...]

Quoted 17 lines
arch/arm/mach-davinci/board-mityomapl138.c new file +17 -0
+static const short mityomap_mii_pins[] = {
+	DA850_MII_TXEN, DA850_MII_TXCLK, DA850_MII_COL, DA850_MII_TXD_3,
+	DA850_MII_TXD_2, DA850_MII_TXD_1, DA850_MII_TXD_0, DA850_MII_RXER,
+	DA850_MII_CRS, DA850_MII_RXCLK, DA850_MII_RXDV, DA850_MII_RXD_3,
+	DA850_MII_RXD_2, DA850_MII_RXD_1, DA850_MII_RXD_0, DA850_MDIO_CLK,
+	DA850_MDIO_D,
+	-1
+};
+
+static const short mityomap_rmii_pins[] = {
+	DA850_RMII_TXD_0, DA850_RMII_TXD_1, DA850_RMII_TXEN,
+	DA850_RMII_CRS_DV, DA850_RMII_RXD_0, DA850_RMII_RXD_1,
+	DA850_RMII_RXER, DA850_RMII_MHZ_50_CLK, DA850_MDIO_CLK,
+	DA850_MDIO_D,
+	-1
+};
+
Quoted 8 lines

arch/arm/mach-davinci/board-mityomapl138.c line 114

Quoted 6 lines
arch/arm/mach-davinci/board-mityomapl138.c new file +6 -0
+static void __init mityomapl138_config_emac(void)
+{
+	void __iomem *cfg_chip3_base;
+	int ret;
+	u32 val;
+	struct davinci_soc_info *soc_info = &davinci_soc_info;

Should be an empty line here...

I'll add this before pushing.

Quoted 8 lines

arch/arm/mach-davinci/board-mityomapl138.c line 120

Quoted 6 lines
arch/arm/mach-davinci/board-mityomapl138.c new file +6 -0
+	soc_info->emac_pdata->rmii_en = 0; /* hardcoded for now */
+
+	cfg_chip3_base = DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG);
+	val = __raw_readl(cfg_chip3_base);
+
+	if (soc_info->emac_pdata->rmii_en) {

If it's hard coded to 0, why handle the other case?

He's planning to add support for the other options in subsequent patches, so I'm OK with leaving this as is.

Quoted 10 lines

arch/arm/mach-davinci/board-mityomapl138.c line 128

Quoted 8 lines
arch/arm/mach-davinci/board-mityomapl138.c new file +8 -0
+		val |= BIT(8);
+		ret = davinci_cfg_reg_list(mityomap_rmii_pins);
+		pr_info("RMII PHY configured\n");
+	} else {
+		val &= ~BIT(8);
+		ret = davinci_cfg_reg_list(mityomap_mii_pins);
+		pr_info("MII PHY configured\n");
+	}

WBR, Sergei

Kevin

#3 lore raw

PATCH v3 1/1 davinci: Initial support for MityDSP-L138/MityARM-1808

In reply to Michael Williamson
Quoted 9 lines · Michael Williamson

This patch adds initial support for the MityDSP-L138 and MityDSP-1808 system on Module (SOM) under the machine name "mityomapl138". These SOMs are based on the da850 davinci CPU architecture. Information on these SOMs may be found at http://www.mitydsp.com.

Basic support for the console UART, NAND, and EMAC (MII interface) is included in this patch.

Thanks, applying and queueing for 2.6.37 (with one minor change below...)

Quoted 13 lines

---
Changes since v2:
1) Remove defaulting this board from Kconfig.
2) Add MITYOMAPL138 board to da8xx_omapl_defconfig.
3) Fix tabs alignment per comment.

The new defconfig file was generated by:
make da8xx_omapl_defconfig
make menuconfig
select MITYOMAPL138 option
make savedefconfig
cp defconfig arch/arm/configs/da8xx_omapl_defconfig

Quoted 2 lines

I think the other 3 lines were a result of updated KConfig options in the current baseline.

Yes, but to minimize unrelated defconfig diffs upstream, I'm going to remove the 3 unrelated ones when applying this patch.

Soon we will hopefully be getting rid of defconfigs all together, but until that is sorted out, we need to minimize diffs against defconfigs, especially ones that are not related to the patch.

Kevin