Skip to contentSkip to conversation

ARM: EXYNOS: Adds Samsung TRATS board support

PATCH In review HeungJun, Kim 7 participants 16 messages Dec 23, 2011 – Feb 10, 2012

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

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

This patch adds Samsung Mobile TRATS board support.

---
 arch/arm/mach-exynos/Kconfig       |   11 ++
 arch/arm/mach-exynos/Makefile      |    1 +
 arch/arm/mach-exynos/board-trats.c |  340 ++++++++++++++++++++++++++++++++++++
 3 files changed, 352 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/board-trats.c
arch/arm/mach-exynos/Kconfig +11 -0
index 0afcc3b..3bbbef8 100644
@@ -304,6 +304,17 @@ config MACH_ORIGEN
 	help
 	  Machine support for ORIGEN based on Samsung EXYNOS4210
 
+config MACH_TRATS
+	bool "Mobile TRATS Board"
+	select CPU_EXYNOS4210
+	select S3C_DEV_WDT
+	select S3C_DEV_HSMMC
+	select S3C_DEV_I2C5
+	select EXYNOS4_SETUP_I2C5
+	select EXYNOS4_SETUP_SDHCI
+	help
+	  Machine support for Samsung Mobile TRATS Board.
+
 comment "EXYNOS4212 Boards"
 
 config MACH_SMDK4212
arch/arm/mach-exynos/Makefile +1 -0
index 57e5296..f3bdda9 100644
@@ -33,6 +33,7 @@ obj-$(CONFIG_MACH_ARMLEX4210)		+= mach-armlex4210.o
 obj-$(CONFIG_MACH_UNIVERSAL_C210)	+= mach-universal_c210.o
 obj-$(CONFIG_MACH_NURI)			+= mach-nuri.o
 obj-$(CONFIG_MACH_ORIGEN)		+= mach-origen.o
+obj-$(CONFIG_MACH_TRATS)		+= board-trats.o
 
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
arch/arm/mach-exynos/board-trats.c new file +340 -0

340 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 5 lines · Kim

This patch adds Samsung Mobile TRATS board support.

Quoted 8 lines
---
 arch/arm/mach-exynos/Kconfig       |   11 ++
 arch/arm/mach-exynos/Makefile      |    1 +
 arch/arm/mach-exynos/board-trats.c |  340
++++++++++++++++++++++++++++++++++++
 3 files changed, 352 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/board-trats.c

If this is for v3.3, unfortunately, it's a little late to add board file and since many things have changed I don't want to cause the conflicts with others now.

BTW, why is the name board-xxx not mach-xxx like others?

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

Quoted 117 lines
arch/arm/mach-exynos/Kconfig +11 -0
index 0afcc3b..3bbbef8 100644
@@ -304,6 +304,17 @@ config MACH_ORIGEN
 	help
 	  Machine support for ORIGEN based on Samsung EXYNOS4210
 
+config MACH_TRATS
+	bool "Mobile TRATS Board"
+	select CPU_EXYNOS4210
+	select S3C_DEV_WDT
+	select S3C_DEV_HSMMC
+	select S3C_DEV_I2C5
+	select EXYNOS4_SETUP_I2C5
+	select EXYNOS4_SETUP_SDHCI
+	help
+	  Machine support for Samsung Mobile TRATS Board.
+
 comment "EXYNOS4212 Boards"
 
 config MACH_SMDK4212
arch/arm/mach-exynos/Makefile +0 -0
index 57e5296..f3bdda9 100644
@@ -33,6 +33,7 @@ obj-$(CONFIG_MACH_ARMLEX4210)		+= mach-

armlex4210.o
obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o
obj-$(CONFIG_MACH_NURI) += mach-nuri.o
obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o

arch/arm/mach-exynos/Makefile +1 -0
+obj-$(CONFIG_MACH_TRATS)		+= board-trats.o
 
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
arch/arm/mach- renamed from arch/arm/mach-exynos/board-trats.c +0 -0

exynos/board-trats.c
new file mode 100644
index 0000000..4c13dfc

arch/arm/mach-exynos/board-trats.c new file +35 -0
@@ -0,0 +1,340 @@
+/*
+ * linux/arch/arm/mach-exynos4/board-trats.c
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/platform_device.h>
+#include <linux/serial_core.h>
+#include <linux/i2c.h>
+#include <linux/gpio.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
+#include <linux/mfd/max8997.h>
+#include <linux/mfd/max8997-private.h>
+#include <linux/mmc/host.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+
+#include <plat/regs-serial.h>
+#include <plat/exynos4.h>
+#include <plat/cpu.h>
+#include <plat/devs.h>
+#include <plat/sdhci.h>
+#include <plat/clock.h>
+#include <plat/gpio-cfg.h>
+#include <plat/iic.h>
+
+#include <mach/map.h>
+
+/* Following are default values for UCON, ULCON and UFCON UART registers

*/

arch/arm/mach-exynos/board-trats.c new file +39 -0
+#define TRATS_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
+				 S3C2410_UCON_RXILEVEL |	\
+				 S3C2410_UCON_TXIRQMODE |	\
+				 S3C2410_UCON_RXIRQMODE |	\
+				 S3C2410_UCON_RXFIFO_TOI |	\
+				 S3C2443_UCON_RXERR_IRQEN)
+
+#define TRATS_ULCON_DEFAULT	S3C2410_LCON_CS8
+
+#define TRATS_UFCON_DEFAULT	(S3C2410_UFCON_FIFOMODE |	\
+				 S5PV210_UFCON_TXTRIG256 |	\
+				 S5PV210_UFCON_RXTRIG256)
+
+enum fixed_regulator_id {
+	FIXED_REG_ID_MMC = 0,
+};
+
+static struct s3c2410_uartcfg trats_uartcfgs[] __initdata = {
+	{
+		.hwport		= 0,
+		.ucon		= TRATS_UCON_DEFAULT,
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+	{
+		.hwport		= 1,
+		.ucon		= TRATS_UCON_DEFAULT,
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+	{
+		.hwport		= 2,
+		.ucon		= TRATS_UCON_DEFAULT,
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+	{
+		.hwport		= 3,
+		.ucon		= TRATS_UCON_DEFAULT,

arch/arm/mach-exynos/board-trats.c

Quoted 10 lines
arch/arm/mach-exynos/board-trats.c new file +10 -0
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+};
+
+/* eMMC */
+static struct s3c_sdhci_platdata trats_hsmmc0_data __initdata = {
+	.max_width		= 8,
+	.host_caps		= (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA |
+				MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED

|

Quoted 144 lines
arch/arm/mach-exynos/board-trats.c new file +144 -0
+				MMC_CAP_DISABLE | MMC_CAP_ERASE),
+	.cd_type		= S3C_SDHCI_CD_PERMANENT,
+	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
+};
+
+static struct regulator_consumer_supply emmc_supplies[] = {
+	REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
+};
+
+static struct regulator_init_data emmc_fixed_voltage_init_data = {
+	.constraints		= {
+		.name		= "VMEM_VDD_2.8V",
+		.valid_ops_mask	= REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(emmc_supplies),
+	.consumer_supplies	= emmc_supplies,
+};
+
+static struct fixed_voltage_config emmc_fixed_voltage_config = {
+	.supply_name		= "MASSMEMORY_EN (inverted)",
+	.microvolts		= 2800000,
+	.gpio			= EXYNOS4_GPK0(2),
+	.enable_high		= true,
+	.init_data		= &emmc_fixed_voltage_init_data,
+};
+
+static struct platform_device emmc_fixed_voltage = {
+	.name			= "reg-fixed-voltage",
+	.id			= FIXED_REG_ID_MMC,
+	.dev			= {
+		.platform_data	= &emmc_fixed_voltage_config,
+	},
+};
+
+static void __init trats_sdhci_init(void)
+{
+	s3c_sdhci0_set_platdata(&trats_hsmmc0_data);
+}
+
+static struct regulator_consumer_supply __initdata max8997_buck1_[] = {
+	REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
+};
+static struct regulator_consumer_supply __initdata max8997_buck2_[] = {
+	REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */
+};
+
+static struct regulator_init_data __initdata max8997_ldo2_data = {
+	.constraints	= {
+		.name		= "VALIVE_1.1V_C210",
+		.min_uV		= 1100000,
+		.max_uV		= 1100000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_ldo6_data = {
+	.constraints	= {
+		.name		= "VCC_1.8V_PDA",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_ldo9_data = {
+	.constraints	= {
+		.name		= "VCC_2.8V_PDA",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_ldo10_data = {
+	.constraints	= {
+		.name		= "VPLL_1.1V_C210",
+		.min_uV		= 1100000,
+		.max_uV		= 1100000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.disabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_buck1_data = {
+	.constraints	= {
+		.name		= "VARM_1.2V_C210",
+		.min_uV		= 900000,
+		.max_uV		= 1350000,
+		.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE,
+		.always_on	= 1,
+		.state_mem	= {
+			.disabled	= 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max8997_buck1_),
+	.consumer_supplies = max8997_buck1_,
+};
+
+static struct regulator_init_data __initdata max8997_buck2_data = {
+	.constraints	= {
+		.name		= "VINT_1.1V_C210",
+		.min_uV		= 900000,
+		.max_uV		= 1100000,
+		.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE,
+		.always_on	= 1,
+		.state_mem	= {
+			.disabled	= 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max8997_buck2_),
+	.consumer_supplies = max8997_buck2_,
+};
+
+static struct regulator_init_data __initdata max8997_buck5_data = {
+	.constraints	= {
+		.name		= "VMEM_1.2V_C210",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_buck6_data = {
+	.constraints	= {
+		.name		= "V_BAT",

arch/arm/mach-exynos/board-trats.c

Quoted 10 lines
arch/arm/mach-exynos/board-trats.c new file +10 -0
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct max8997_regulator_data __initdata

trats_max8997_regulators[]

Quoted 106 lines

= {

arch/arm/mach-exynos/board-trats.c new file +18 -0
+	{ MAX8997_LDO2, &max8997_ldo2_data },
+	{ MAX8997_LDO6, &max8997_ldo6_data },
+	{ MAX8997_LDO9, &max8997_ldo9_data },
+	{ MAX8997_LDO10, &max8997_ldo10_data },
+
+	{ MAX8997_BUCK1, &max8997_buck1_data },
+	{ MAX8997_BUCK2, &max8997_buck2_data },
+	{ MAX8997_BUCK5, &max8997_buck5_data },
+	{ MAX8997_BUCK6, &max8997_buck6_data },
+};
+
+static struct max8997_platform_data __initdata trats_max8997_pdata = {
+	.wakeup			= 1,
+
+	.num_regulators		= ARRAY_SIZE(trats_max8997_regulators),
+	.regulators		= trats_max8997_regulators,
+
+	.buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6),

EXYNOS4_GPL0(0) },

arch/arm/mach-exynos/board-trats.c new file +84 -1
+
+	.buck1_voltage[0] = 1350000, /* 1.35V */
+	.buck1_voltage[1] = 1300000, /* 1.3V */
+	.buck1_voltage[2] = 1250000, /* 1.25V */
+	.buck1_voltage[3] = 1200000, /* 1.2V */
+	.buck1_voltage[4] = 1150000, /* 1.15V */
+	.buck1_voltage[5] = 1100000, /* 1.1V */
+	.buck1_voltage[6] = 1000000, /* 1.0V */
+	.buck1_voltage[7] = 950000, /* 0.95V */
+
+	.buck2_voltage[0] = 1100000, /* 1.1V */
+	.buck2_voltage[1] = 1000000, /* 1.0V */
+	.buck2_voltage[2] = 950000, /* 0.95V */
+	.buck2_voltage[3] = 900000, /* 0.9V */
+	.buck2_voltage[4] = 1100000, /* 1.1V */
+	.buck2_voltage[5] = 1000000, /* 1.0V */
+	.buck2_voltage[6] = 950000, /* 0.95V */
+	.buck2_voltage[7] = 900000, /* 0.9V */
+
+	.buck5_voltage[0] = 1200000, /* 1.2V */
+	.buck5_voltage[1] = 1200000, /* 1.2V */
+	.buck5_voltage[2] = 1200000, /* 1.2V */
+	.buck5_voltage[3] = 1200000, /* 1.2V */
+	.buck5_voltage[4] = 1200000, /* 1.2V */
+	.buck5_voltage[5] = 1200000, /* 1.2V */
+	.buck5_voltage[6] = 1200000, /* 1.2V */
+	.buck5_voltage[7] = 1200000, /* 1.2V */
+};
+
+/* I2C 5 (PMIC) */
+enum { I2C5_MAX8997 };
+static struct i2c_board_info i2c5_devs[] __initdata = {
+	[I2C5_MAX8997] = {
+		I2C_BOARD_INFO("max8997", 0xCC >> 1),
+		.platform_data	= &trats_max8997_pdata,
+	},
+};
+
+static void __init trats_power_init(void)
+{
+	int gpio;
+
+	gpio = EXYNOS4_GPX0(7);
+	gpio_request(gpio, "AP_PMIC_IRQ");
+	s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
+	s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+}
+
+static struct platform_device *trats_devices[] __initdata = {
+	/* Samsung Platform Devices */
+	&s3c_device_i2c5, /* PMIC should initialize first */
+	&emmc_fixed_voltage,
+	&s3c_device_hsmmc0,
+	&s3c_device_wdt,
+};
+
+static void __init trats_map_io(void)
+{
+	s5p_init_io(NULL, 0, S5P_VA_CHIPID);
+	s3c24xx_init_clocks(24000000);
+	s3c24xx_init_uarts(trats_uartcfgs, ARRAY_SIZE(trats_uartcfgs));
+}
+
+static void __init trats_machine_init(void)
+{
+	trats_sdhci_init();
+	trats_power_init();
+
+	s3c_i2c5_set_platdata(NULL);
+	i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
+	i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
+
+	/* Last */
+	platform_add_devices(trats_devices, ARRAY_SIZE(trats_devices));
+}
+
+MACHINE_START(TRATS, "TRATS")
+	/* Maintainer: Kyungmin Park <[email protected]> */
+	.atag_offset	= 0x100,
+	.init_irq	= exynos4_init_irq,
+	.map_io		= trats_map_io,
+	.init_machine	= trats_machine_init,
+	.timer		= &exynos4_timer,
+MACHINE_END
--

1.7.4.1

#2 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

Quoted 15 lines · Kukjin Kim
Quoted 5 lines · Kim

This patch adds Samsung Mobile TRATS board support.

Quoted 8 lines
---
 arch/arm/mach-exynos/Kconfig       |   11 ++
 arch/arm/mach-exynos/Makefile      |    1 +
 arch/arm/mach-exynos/board-trats.c |  340
++++++++++++++++++++++++++++++++++++
 3 files changed, 352 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/board-trats.c
Quoted 5 lines

If this is for v3.3, unfortunately, it's a little late to add board file and since many things have changed I don't want to cause the conflicts with others now.

BTW, why is the name board-xxx not mach-xxx like others?

It's mentioned several times,
How do you talk with other when talk about the smdk?
"I'm using the smdk machine and it's based on smdk machine?" As board is more proper word and it's easy to know when find the board at source code.
So hope to use the board if it's not big deal.

BR,
Kyungmin Park

Quoted 397 lines
Quoted 118 lines
arch/arm/mach-exynos/Kconfig +11 -0
index 0afcc3b..3bbbef8 100644
@@ -304,6 +304,17 @@ config MACH_ORIGEN
 	help
 	  Machine support for ORIGEN based on Samsung EXYNOS4210
 
+config MACH_TRATS
+	bool "Mobile TRATS Board"
+	select CPU_EXYNOS4210
+	select S3C_DEV_WDT
+	select S3C_DEV_HSMMC
+	select S3C_DEV_I2C5
+	select EXYNOS4_SETUP_I2C5
+	select EXYNOS4_SETUP_SDHCI
+	help
+	  Machine support for Samsung Mobile TRATS Board.
+
 comment "EXYNOS4212 Boards"
 
 config MACH_SMDK4212
arch/arm/mach-exynos/Makefile +0 -0
index 57e5296..f3bdda9 100644
@@ -33,6 +33,7 @@ obj-$(CONFIG_MACH_ARMLEX4210)		+= mach-

armlex4210.o
obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o
obj-$(CONFIG_MACH_NURI) += mach-nuri.o
obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o

arch/arm/mach-exynos/Makefile +1 -0
+obj-$(CONFIG_MACH_TRATS)		+= board-trats.o
 
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
arch/arm/mach- renamed from arch/arm/mach-exynos/board-trats.c +0 -0

exynos/board-trats.c
new file mode 100644
index 0000000..4c13dfc

arch/arm/mach-exynos/board-trats.c new file +35 -0
@@ -0,0 +1,340 @@
+/*
+ * linux/arch/arm/mach-exynos4/board-trats.c
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/platform_device.h>
+#include <linux/serial_core.h>
+#include <linux/i2c.h>
+#include <linux/gpio.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
+#include <linux/mfd/max8997.h>
+#include <linux/mfd/max8997-private.h>
+#include <linux/mmc/host.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+
+#include <plat/regs-serial.h>
+#include <plat/exynos4.h>
+#include <plat/cpu.h>
+#include <plat/devs.h>
+#include <plat/sdhci.h>
+#include <plat/clock.h>
+#include <plat/gpio-cfg.h>
+#include <plat/iic.h>
+
+#include <mach/map.h>
+
+/* Following are default values for UCON, ULCON and UFCON UART registers

*/

arch/arm/mach-exynos/board-trats.c new file +39 -0
+#define TRATS_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
+				 S3C2410_UCON_RXILEVEL |	\
+				 S3C2410_UCON_TXIRQMODE |	\
+				 S3C2410_UCON_RXIRQMODE |	\
+				 S3C2410_UCON_RXFIFO_TOI |	\
+				 S3C2443_UCON_RXERR_IRQEN)
+
+#define TRATS_ULCON_DEFAULT	S3C2410_LCON_CS8
+
+#define TRATS_UFCON_DEFAULT	(S3C2410_UFCON_FIFOMODE |	\
+				 S5PV210_UFCON_TXTRIG256 |	\
+				 S5PV210_UFCON_RXTRIG256)
+
+enum fixed_regulator_id {
+	FIXED_REG_ID_MMC = 0,
+};
+
+static struct s3c2410_uartcfg trats_uartcfgs[] __initdata = {
+	{
+		.hwport		= 0,
+		.ucon		= TRATS_UCON_DEFAULT,
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+	{
+		.hwport		= 1,
+		.ucon		= TRATS_UCON_DEFAULT,
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+	{
+		.hwport		= 2,
+		.ucon		= TRATS_UCON_DEFAULT,
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+	{
+		.hwport		= 3,
+		.ucon		= TRATS_UCON_DEFAULT,

arch/arm/mach-exynos/board-trats.c

Quoted 10 lines
arch/arm/mach-exynos/board-trats.c new file +10 -0
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+};
+
+/* eMMC */
+static struct s3c_sdhci_platdata trats_hsmmc0_data __initdata = {
+	.max_width		= 8,
+	.host_caps		= (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA |
+				MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED

|

Quoted 144 lines
arch/arm/mach-exynos/board-trats.c new file +144 -0
+				MMC_CAP_DISABLE | MMC_CAP_ERASE),
+	.cd_type		= S3C_SDHCI_CD_PERMANENT,
+	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
+};
+
+static struct regulator_consumer_supply emmc_supplies[] = {
+	REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
+};
+
+static struct regulator_init_data emmc_fixed_voltage_init_data = {
+	.constraints		= {
+		.name		= "VMEM_VDD_2.8V",
+		.valid_ops_mask	= REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(emmc_supplies),
+	.consumer_supplies	= emmc_supplies,
+};
+
+static struct fixed_voltage_config emmc_fixed_voltage_config = {
+	.supply_name		= "MASSMEMORY_EN (inverted)",
+	.microvolts		= 2800000,
+	.gpio			= EXYNOS4_GPK0(2),
+	.enable_high		= true,
+	.init_data		= &emmc_fixed_voltage_init_data,
+};
+
+static struct platform_device emmc_fixed_voltage = {
+	.name			= "reg-fixed-voltage",
+	.id			= FIXED_REG_ID_MMC,
+	.dev			= {
+		.platform_data	= &emmc_fixed_voltage_config,
+	},
+};
+
+static void __init trats_sdhci_init(void)
+{
+	s3c_sdhci0_set_platdata(&trats_hsmmc0_data);
+}
+
+static struct regulator_consumer_supply __initdata max8997_buck1_[] = {
+	REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
+};
+static struct regulator_consumer_supply __initdata max8997_buck2_[] = {
+	REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */
+};
+
+static struct regulator_init_data __initdata max8997_ldo2_data = {
+	.constraints	= {
+		.name		= "VALIVE_1.1V_C210",
+		.min_uV		= 1100000,
+		.max_uV		= 1100000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_ldo6_data = {
+	.constraints	= {
+		.name		= "VCC_1.8V_PDA",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_ldo9_data = {
+	.constraints	= {
+		.name		= "VCC_2.8V_PDA",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_ldo10_data = {
+	.constraints	= {
+		.name		= "VPLL_1.1V_C210",
+		.min_uV		= 1100000,
+		.max_uV		= 1100000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.disabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_buck1_data = {
+	.constraints	= {
+		.name		= "VARM_1.2V_C210",
+		.min_uV		= 900000,
+		.max_uV		= 1350000,
+		.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE,
+		.always_on	= 1,
+		.state_mem	= {
+			.disabled	= 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max8997_buck1_),
+	.consumer_supplies = max8997_buck1_,
+};
+
+static struct regulator_init_data __initdata max8997_buck2_data = {
+	.constraints	= {
+		.name		= "VINT_1.1V_C210",
+		.min_uV		= 900000,
+		.max_uV		= 1100000,
+		.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE,
+		.always_on	= 1,
+		.state_mem	= {
+			.disabled	= 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max8997_buck2_),
+	.consumer_supplies = max8997_buck2_,
+};
+
+static struct regulator_init_data __initdata max8997_buck5_data = {
+	.constraints	= {
+		.name		= "VMEM_1.2V_C210",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_buck6_data = {
+	.constraints	= {
+		.name		= "V_BAT",

arch/arm/mach-exynos/board-trats.c

Quoted 10 lines
arch/arm/mach-exynos/board-trats.c new file +10 -0
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct max8997_regulator_data __initdata

trats_max8997_regulators[]

Quoted 105 lines

= {

arch/arm/mach-exynos/board-trats.c new file +18 -0
+	{ MAX8997_LDO2, &max8997_ldo2_data },
+	{ MAX8997_LDO6, &max8997_ldo6_data },
+	{ MAX8997_LDO9, &max8997_ldo9_data },
+	{ MAX8997_LDO10, &max8997_ldo10_data },
+
+	{ MAX8997_BUCK1, &max8997_buck1_data },
+	{ MAX8997_BUCK2, &max8997_buck2_data },
+	{ MAX8997_BUCK5, &max8997_buck5_data },
+	{ MAX8997_BUCK6, &max8997_buck6_data },
+};
+
+static struct max8997_platform_data __initdata trats_max8997_pdata = {
+	.wakeup			= 1,
+
+	.num_regulators		= ARRAY_SIZE(trats_max8997_regulators),
+	.regulators		= trats_max8997_regulators,
+
+	.buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6),

EXYNOS4_GPL0(0) },

arch/arm/mach-exynos/board-trats.c new file +84 -1
+
+	.buck1_voltage[0] = 1350000, /* 1.35V */
+	.buck1_voltage[1] = 1300000, /* 1.3V */
+	.buck1_voltage[2] = 1250000, /* 1.25V */
+	.buck1_voltage[3] = 1200000, /* 1.2V */
+	.buck1_voltage[4] = 1150000, /* 1.15V */
+	.buck1_voltage[5] = 1100000, /* 1.1V */
+	.buck1_voltage[6] = 1000000, /* 1.0V */
+	.buck1_voltage[7] = 950000, /* 0.95V */
+
+	.buck2_voltage[0] = 1100000, /* 1.1V */
+	.buck2_voltage[1] = 1000000, /* 1.0V */
+	.buck2_voltage[2] = 950000, /* 0.95V */
+	.buck2_voltage[3] = 900000, /* 0.9V */
+	.buck2_voltage[4] = 1100000, /* 1.1V */
+	.buck2_voltage[5] = 1000000, /* 1.0V */
+	.buck2_voltage[6] = 950000, /* 0.95V */
+	.buck2_voltage[7] = 900000, /* 0.9V */
+
+	.buck5_voltage[0] = 1200000, /* 1.2V */
+	.buck5_voltage[1] = 1200000, /* 1.2V */
+	.buck5_voltage[2] = 1200000, /* 1.2V */
+	.buck5_voltage[3] = 1200000, /* 1.2V */
+	.buck5_voltage[4] = 1200000, /* 1.2V */
+	.buck5_voltage[5] = 1200000, /* 1.2V */
+	.buck5_voltage[6] = 1200000, /* 1.2V */
+	.buck5_voltage[7] = 1200000, /* 1.2V */
+};
+
+/* I2C 5 (PMIC) */
+enum { I2C5_MAX8997 };
+static struct i2c_board_info i2c5_devs[] __initdata = {
+	[I2C5_MAX8997] = {
+		I2C_BOARD_INFO("max8997", 0xCC >> 1),
+		.platform_data	= &trats_max8997_pdata,
+	},
+};
+
+static void __init trats_power_init(void)
+{
+	int gpio;
+
+	gpio = EXYNOS4_GPX0(7);
+	gpio_request(gpio, "AP_PMIC_IRQ");
+	s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
+	s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+}
+
+static struct platform_device *trats_devices[] __initdata = {
+	/* Samsung Platform Devices */
+	&s3c_device_i2c5, /* PMIC should initialize first */
+	&emmc_fixed_voltage,
+	&s3c_device_hsmmc0,
+	&s3c_device_wdt,
+};
+
+static void __init trats_map_io(void)
+{
+	s5p_init_io(NULL, 0, S5P_VA_CHIPID);
+	s3c24xx_init_clocks(24000000);
+	s3c24xx_init_uarts(trats_uartcfgs, ARRAY_SIZE(trats_uartcfgs));
+}
+
+static void __init trats_machine_init(void)
+{
+	trats_sdhci_init();
+	trats_power_init();
+
+	s3c_i2c5_set_platdata(NULL);
+	i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
+	i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
+
+	/* Last */
+	platform_add_devices(trats_devices, ARRAY_SIZE(trats_devices));
+}
+
+MACHINE_START(TRATS, "TRATS")
+	/* Maintainer: Kyungmin Park <[email protected]> */
+	.atag_offset	= 0x100,
+	.init_irq	= exynos4_init_irq,
+	.map_io		= trats_map_io,
+	.init_machine	= trats_machine_init,
+	.timer		= &exynos4_timer,
+MACHINE_END
--
Quoted 1 line

1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

Hi Kukjun Kim,

Quoted 28 lines

-----Original Message-----
From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-arm-kernel- bounces at lists.infradead.org] On Behalf Of Kyungmin Park
Sent: Monday, December 26, 2011 8:56 AM
To: Kukjin Kim
Cc: HeungJun, Kim; linux-samsung-soc at vger.kernel.org; arm-linux
Subject: Re: [PATCH] ARM: EXYNOS: Adds Samsung TRATS board support

Quoted 19 lines · Kukjin Kim
Quoted 5 lines · Kim

This patch adds Samsung Mobile TRATS board support.

Quoted 8 lines
---
 arch/arm/mach-exynos/Kconfig       |   11 ++
 arch/arm/mach-exynos/Makefile      |    1 +
 arch/arm/mach-exynos/board-trats.c |  340
++++++++++++++++++++++++++++++++++++
 3 files changed, 352 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/board-trats.c

If this is for v3.3, unfortunately, it's a little late to add board file and since many things have changed I don't want to cause the conflicts with others now.

Quoted 8 lines
Quoted 1 line

BTW, why is the name board-xxx not mach-xxx like others?

It's mentioned several times,
How do you talk with other when talk about the smdk?
"I'm using the smdk machine and it's based on smdk machine?" As board is more proper word and it's easy to know when find the board at source code.
So hope to use the board if it's not big deal.

If you don't mind, I want to let you know additional information.

I also agree with Mr.Park.

Generally in the robot field, the term "machine" means the total things including the machinery part and even the brain "board", and the machine is more bigger concept.
Probably, in the other field, this confusion will be occurred when they see the linux kernel source first.
So, I think these terms might be necessary to distinguish.

Thanks and Regards,
Heungjun Kim

Quoted 405 lines

BR,
Kyungmin Park

Quoted 388 lines
Quoted 118 lines
arch/arm/mach-exynos/Kconfig +11 -0
index 0afcc3b..3bbbef8 100644
@@ -304,6 +304,17 @@ config MACH_ORIGEN
 	help
 	  Machine support for ORIGEN based on Samsung EXYNOS4210
 
+config MACH_TRATS
+	bool "Mobile TRATS Board"
+	select CPU_EXYNOS4210
+	select S3C_DEV_WDT
+	select S3C_DEV_HSMMC
+	select S3C_DEV_I2C5
+	select EXYNOS4_SETUP_I2C5
+	select EXYNOS4_SETUP_SDHCI
+	help
+	  Machine support for Samsung Mobile TRATS Board.
+
 comment "EXYNOS4212 Boards"
 
 config MACH_SMDK4212
arch/arm/mach-exynos/Makefile +0 -0
index 57e5296..f3bdda9 100644
@@ -33,6 +33,7 @@ obj-$(CONFIG_MACH_ARMLEX4210)		+= mach-

armlex4210.o
obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o
obj-$(CONFIG_MACH_NURI) += mach-nuri.o
obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o

arch/arm/mach-exynos/Makefile +1 -0
+obj-$(CONFIG_MACH_TRATS)		+= board-trats.o
 
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
arch/arm/mach- renamed from arch/arm/mach-exynos/board-trats.c +0 -0

exynos/board-trats.c
new file mode 100644
index 0000000..4c13dfc

arch/arm/mach-exynos/board-trats.c new file +35 -0
@@ -0,0 +1,340 @@
+/*
+ * linux/arch/arm/mach-exynos4/board-trats.c
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/platform_device.h>
+#include <linux/serial_core.h>
+#include <linux/i2c.h>
+#include <linux/gpio.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
+#include <linux/mfd/max8997.h>
+#include <linux/mfd/max8997-private.h>
+#include <linux/mmc/host.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+
+#include <plat/regs-serial.h>
+#include <plat/exynos4.h>
+#include <plat/cpu.h>
+#include <plat/devs.h>
+#include <plat/sdhci.h>
+#include <plat/clock.h>
+#include <plat/gpio-cfg.h>
+#include <plat/iic.h>
+
+#include <mach/map.h>
+
+/* Following are default values for UCON, ULCON and UFCON UART registers

*/

arch/arm/mach-exynos/board-trats.c new file +39 -0
+#define TRATS_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
+				 S3C2410_UCON_RXILEVEL |	\
+				 S3C2410_UCON_TXIRQMODE |	\
+				 S3C2410_UCON_RXIRQMODE |	\
+				 S3C2410_UCON_RXFIFO_TOI |	\
+				 S3C2443_UCON_RXERR_IRQEN)
+
+#define TRATS_ULCON_DEFAULT	S3C2410_LCON_CS8
+
+#define TRATS_UFCON_DEFAULT	(S3C2410_UFCON_FIFOMODE |	\
+				 S5PV210_UFCON_TXTRIG256 |	\
+				 S5PV210_UFCON_RXTRIG256)
+
+enum fixed_regulator_id {
+	FIXED_REG_ID_MMC = 0,
+};
+
+static struct s3c2410_uartcfg trats_uartcfgs[] __initdata = {
+	{
+		.hwport		= 0,
+		.ucon		= TRATS_UCON_DEFAULT,
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+	{
+		.hwport		= 1,
+		.ucon		= TRATS_UCON_DEFAULT,
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+	{
+		.hwport		= 2,
+		.ucon		= TRATS_UCON_DEFAULT,
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+	{
+		.hwport		= 3,
+		.ucon		= TRATS_UCON_DEFAULT,

arch/arm/mach-exynos/board-trats.c

Quoted 10 lines
arch/arm/mach-exynos/board-trats.c new file +10 -0
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+};
+
+/* eMMC */
+static struct s3c_sdhci_platdata trats_hsmmc0_data __initdata = {
+	.max_width		= 8,
+	.host_caps		= (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA |
+				MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED

|

Quoted 144 lines
arch/arm/mach-exynos/board-trats.c new file +144 -0
+				MMC_CAP_DISABLE | MMC_CAP_ERASE),
+	.cd_type		= S3C_SDHCI_CD_PERMANENT,
+	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
+};
+
+static struct regulator_consumer_supply emmc_supplies[] = {
+	REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
+};
+
+static struct regulator_init_data emmc_fixed_voltage_init_data = {
+	.constraints		= {
+		.name		= "VMEM_VDD_2.8V",
+		.valid_ops_mask	= REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(emmc_supplies),
+	.consumer_supplies	= emmc_supplies,
+};
+
+static struct fixed_voltage_config emmc_fixed_voltage_config = {
+	.supply_name		= "MASSMEMORY_EN (inverted)",
+	.microvolts		= 2800000,
+	.gpio			= EXYNOS4_GPK0(2),
+	.enable_high		= true,
+	.init_data		= &emmc_fixed_voltage_init_data,
+};
+
+static struct platform_device emmc_fixed_voltage = {
+	.name			= "reg-fixed-voltage",
+	.id			= FIXED_REG_ID_MMC,
+	.dev			= {
+		.platform_data	= &emmc_fixed_voltage_config,
+	},
+};
+
+static void __init trats_sdhci_init(void)
+{
+	s3c_sdhci0_set_platdata(&trats_hsmmc0_data);
+}
+
+static struct regulator_consumer_supply __initdata max8997_buck1_[] = {
+	REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
+};
+static struct regulator_consumer_supply __initdata max8997_buck2_[] = {
+	REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */
+};
+
+static struct regulator_init_data __initdata max8997_ldo2_data = {
+	.constraints	= {
+		.name		= "VALIVE_1.1V_C210",
+		.min_uV		= 1100000,
+		.max_uV		= 1100000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_ldo6_data = {
+	.constraints	= {
+		.name		= "VCC_1.8V_PDA",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_ldo9_data = {
+	.constraints	= {
+		.name		= "VCC_2.8V_PDA",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_ldo10_data = {
+	.constraints	= {
+		.name		= "VPLL_1.1V_C210",
+		.min_uV		= 1100000,
+		.max_uV		= 1100000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.disabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_buck1_data = {
+	.constraints	= {
+		.name		= "VARM_1.2V_C210",
+		.min_uV		= 900000,
+		.max_uV		= 1350000,
+		.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE,
+		.always_on	= 1,
+		.state_mem	= {
+			.disabled	= 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max8997_buck1_),
+	.consumer_supplies = max8997_buck1_,
+};
+
+static struct regulator_init_data __initdata max8997_buck2_data = {
+	.constraints	= {
+		.name		= "VINT_1.1V_C210",
+		.min_uV		= 900000,
+		.max_uV		= 1100000,
+		.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE,
+		.always_on	= 1,
+		.state_mem	= {
+			.disabled	= 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max8997_buck2_),
+	.consumer_supplies = max8997_buck2_,
+};
+
+static struct regulator_init_data __initdata max8997_buck5_data = {
+	.constraints	= {
+		.name		= "VMEM_1.2V_C210",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_buck6_data = {
+	.constraints	= {
+		.name		= "V_BAT",

arch/arm/mach-exynos/board-trats.c

Quoted 10 lines
arch/arm/mach-exynos/board-trats.c new file +10 -0
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct max8997_regulator_data __initdata

trats_max8997_regulators[]

Quoted 104 lines

= {

arch/arm/mach-exynos/board-trats.c new file +18 -0
+	{ MAX8997_LDO2, &max8997_ldo2_data },
+	{ MAX8997_LDO6, &max8997_ldo6_data },
+	{ MAX8997_LDO9, &max8997_ldo9_data },
+	{ MAX8997_LDO10, &max8997_ldo10_data },
+
+	{ MAX8997_BUCK1, &max8997_buck1_data },
+	{ MAX8997_BUCK2, &max8997_buck2_data },
+	{ MAX8997_BUCK5, &max8997_buck5_data },
+	{ MAX8997_BUCK6, &max8997_buck6_data },
+};
+
+static struct max8997_platform_data __initdata trats_max8997_pdata = {
+	.wakeup			= 1,
+
+	.num_regulators		= ARRAY_SIZE(trats_max8997_regulators),
+	.regulators		= trats_max8997_regulators,
+
+	.buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6),

EXYNOS4_GPL0(0) },

arch/arm/mach-exynos/board-trats.c new file +84 -0
+
+	.buck1_voltage[0] = 1350000, /* 1.35V */
+	.buck1_voltage[1] = 1300000, /* 1.3V */
+	.buck1_voltage[2] = 1250000, /* 1.25V */
+	.buck1_voltage[3] = 1200000, /* 1.2V */
+	.buck1_voltage[4] = 1150000, /* 1.15V */
+	.buck1_voltage[5] = 1100000, /* 1.1V */
+	.buck1_voltage[6] = 1000000, /* 1.0V */
+	.buck1_voltage[7] = 950000, /* 0.95V */
+
+	.buck2_voltage[0] = 1100000, /* 1.1V */
+	.buck2_voltage[1] = 1000000, /* 1.0V */
+	.buck2_voltage[2] = 950000, /* 0.95V */
+	.buck2_voltage[3] = 900000, /* 0.9V */
+	.buck2_voltage[4] = 1100000, /* 1.1V */
+	.buck2_voltage[5] = 1000000, /* 1.0V */
+	.buck2_voltage[6] = 950000, /* 0.95V */
+	.buck2_voltage[7] = 900000, /* 0.9V */
+
+	.buck5_voltage[0] = 1200000, /* 1.2V */
+	.buck5_voltage[1] = 1200000, /* 1.2V */
+	.buck5_voltage[2] = 1200000, /* 1.2V */
+	.buck5_voltage[3] = 1200000, /* 1.2V */
+	.buck5_voltage[4] = 1200000, /* 1.2V */
+	.buck5_voltage[5] = 1200000, /* 1.2V */
+	.buck5_voltage[6] = 1200000, /* 1.2V */
+	.buck5_voltage[7] = 1200000, /* 1.2V */
+};
+
+/* I2C 5 (PMIC) */
+enum { I2C5_MAX8997 };
+static struct i2c_board_info i2c5_devs[] __initdata = {
+	[I2C5_MAX8997] = {
+		I2C_BOARD_INFO("max8997", 0xCC >> 1),
+		.platform_data	= &trats_max8997_pdata,
+	},
+};
+
+static void __init trats_power_init(void)
+{
+	int gpio;
+
+	gpio = EXYNOS4_GPX0(7);
+	gpio_request(gpio, "AP_PMIC_IRQ");
+	s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
+	s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+}
+
+static struct platform_device *trats_devices[] __initdata = {
+	/* Samsung Platform Devices */
+	&s3c_device_i2c5, /* PMIC should initialize first */
+	&emmc_fixed_voltage,
+	&s3c_device_hsmmc0,
+	&s3c_device_wdt,
+};
+
+static void __init trats_map_io(void)
+{
+	s5p_init_io(NULL, 0, S5P_VA_CHIPID);
+	s3c24xx_init_clocks(24000000);
+	s3c24xx_init_uarts(trats_uartcfgs, ARRAY_SIZE(trats_uartcfgs));
+}
+
+static void __init trats_machine_init(void)
+{
+	trats_sdhci_init();
+	trats_power_init();
+
+	s3c_i2c5_set_platdata(NULL);
+	i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
+	i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
+
+	/* Last */
+	platform_add_devices(trats_devices, ARRAY_SIZE(trats_devices));
+}
+
+MACHINE_START(TRATS, "TRATS")
+	/* Maintainer: Kyungmin Park <[email protected]> */
+	.atag_offset	= 0x100,
+	.init_irq	= exynos4_init_irq,
+	.map_io		= trats_map_io,
+	.init_machine	= trats_machine_init,
+	.timer		= &exynos4_timer,
+MACHINE_END
Quoted 9 lines
Quoted 2 lines

--
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

Quoted 44 lines · Kim

Hi Kukjun Kim,

Quoted 2 lines

-----Original Message-----
From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-arm-

kernel-

Quoted 6 lines

bounces at lists.infradead.org] On Behalf Of Kyungmin Park
Sent: Monday, December 26, 2011 8:56 AM
To: Kukjin Kim
Cc: HeungJun, Kim; linux-samsung-soc at vger.kernel.org; arm-linux
Subject: Re: [PATCH] ARM: EXYNOS: Adds Samsung TRATS board support

Quoted 17 lines
Quoted 16 lines · Kukjin Kim
Quoted 5 lines · Kim

This patch adds Samsung Mobile TRATS board support.

Quoted 8 lines
---
 arch/arm/mach-exynos/Kconfig       |   11 ++
 arch/arm/mach-exynos/Makefile      |    1 +
 arch/arm/mach-exynos/board-trats.c |  340
++++++++++++++++++++++++++++++++++++
 3 files changed, 352 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/board-trats.c

If this is for v3.3, unfortunately, it's a little late to add board

file and

Quoted 1 line
Quoted 1 line

since many things have changed I don't want to cause the conflicts

with

Quoted 10 lines
Quoted 3 lines

others now.

BTW, why is the name board-xxx not mach-xxx like others?

It's mentioned several times,
How do you talk with other when talk about the smdk?
"I'm using the smdk machine and it's based on smdk machine?" As board is more proper word and it's easy to know when find the board at source code.
So hope to use the board if it's not big deal.

If you don't mind, I want to let you know additional information.

Quoted 9 lines

I also agree with Mr.Park.

Generally in the robot field, the term "machine" means the total things including the machinery part and even the brain "board", and the machine is more bigger concept.
Probably, in the other field, this confusion will be occurred when they see the linux kernel source first.
So, I think these terms might be necessary to distinguish.

Well, I don't think so. I'd like to ask why you _do_ think the meaning of machine is bigger than board. General robot field?...Nobody knows machine does not mean board in the arch/arm/ kernel.

If we use the meaning what you said the contrary is rather to be supposed. The confusion can be caused.
And how about machine_is_xxx() and CONFIG_MACH_XXX for board?

...

Anyway, the board-xxx.c file can be used for it later but as I said, if required, we need to change it all at once in samsung stuff not just for TRATS board.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#5 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

In reply to HeungJun, Kim
Quoted 7 lines · Kim

If you don't mind, I want to let you know additional information.

I also agree with Mr.Park.

Generally in the robot field, the term "machine" means the total things including the machinery part and even the brain "board", and the machine is more bigger concept.

Some platforms which the kernel runs on are not a 'board' but a set of
boards: a motherboard and a separate CPU card. So to call these a 'board' is wrong too.

Welcome to the problem: there is not one single term which satisfies everyone. The solution: a compromise.

The compromise that has been chosen for the ARM kernel is to call this stuff 'machines' or 'platforms' - and the exynos stuff has decided to call it 'machines'. (Some people have decided to use 'board' in their directories, which is fine _provided_ there is consistency within that directory.)

That's actually the _most_ important thing: consistency. So if a maintainer has decided to use one way in their directory, that's the way which rules for that directory. So, please, get over it - and don't start a brand new naming scheme in a directory just because you don't agree with the maintainers opinion.

So, please name the board mach-trats.c as requested by Kukjin (who is the maintainer for exynos.)

#6 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

In reply to Kyungmin Park
Quoted 22 lines · Kyungmin Park
Quoted 15 lines · Kukjin Kim
Quoted 5 lines · Kim

This patch adds Samsung Mobile TRATS board support.

Quoted 8 lines
---
 arch/arm/mach-exynos/Kconfig       |   11 ++
 arch/arm/mach-exynos/Makefile      |    1 +
 arch/arm/mach-exynos/board-trats.c |  340
++++++++++++++++++++++++++++++++++++
 3 files changed, 352 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/board-trats.c
Quoted 1 line

If this is for v3.3, unfortunately, it's a little late to add board file

and

Quoted 3 lines

since many things have changed I don't want to cause the conflicts with others now.

Quoted 9 lines
Quoted 1 line

BTW, why is the name board-xxx not mach-xxx like others?

It's mentioned several times,
How do you talk with other when talk about the smdk?
"I'm using the smdk machine and it's based on smdk machine?" As board is more proper word and it's easy to know when find the board at source code.
So hope to use the board if it's not big deal.

Yes, we say 'SMDK board blah blah' so it can be no big deal, but I don't want to make a confusion between CONFIG_MACH_XXX and mach-xxx.c yet even though there is a similar situation of arch/arm/mach-xxx/ directory and CONFIG_ARCH_XXX. In addition, the machine_is_xxx() is used to distinguish board in the kernel.

Anyway, I think, if to use board-xxx.c is required, we can change it all at once and let me think again.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#7 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

Quoted 32 lines · Kukjin Kim
Quoted 22 lines · Kyungmin Park
Quoted 15 lines · Kukjin Kim
Quoted 5 lines · Kim

This patch adds Samsung Mobile TRATS board support.

Quoted 8 lines
---
 arch/arm/mach-exynos/Kconfig       |   11 ++
 arch/arm/mach-exynos/Makefile      |    1 +
 arch/arm/mach-exynos/board-trats.c |  340
++++++++++++++++++++++++++++++++++++
 3 files changed, 352 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/board-trats.c
Quoted 1 line

If this is for v3.3, unfortunately, it's a little late to add board file

and

Quoted 3 lines

since many things have changed I don't want to cause the conflicts with others now.

Quoted 9 lines
Quoted 1 line

BTW, why is the name board-xxx not mach-xxx like others?

It's mentioned several times,
How do you talk with other when talk about the smdk?
"I'm using the smdk machine and it's based on smdk machine?" As board is more proper word and it's easy to know when find the board at source code.
So hope to use the board if it's not big deal.

Quoted 8 lines

Yes, we say 'SMDK board blah blah' so it can be no big deal, but I don't want to make a confusion between CONFIG_MACH_XXX and mach-xxx.c yet even though there is a similar situation of arch/arm/mach-xxx/ directory and CONFIG_ARCH_XXX. In addition, the machine_is_xxx() is used to distinguish board in the kernel.

Anyway, I think, if to use board-xxx.c is required, we can change it all at once and let me think again.

Don't think, use the current way.

Quoted 15 lines

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

Quoted 40 lines · Kyungmin Park
Quoted 18 lines · Kukjin Kim
Quoted 17 lines · Kyungmin Park
Quoted 15 lines · Kukjin Kim
Quoted 13 lines · Kim

This patch adds Samsung Mobile TRATS board support.

---
 arch/arm/mach-exynos/Kconfig       |   11 ++
 arch/arm/mach-exynos/Makefile      |    1 +
 arch/arm/mach-exynos/board-trats.c |  340
++++++++++++++++++++++++++++++++++++
 3 files changed, 352 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/board-trats.c
Quoted 1 line
Quoted 1 line
Quoted 1 line

If this is for v3.3, unfortunately, it's a little late to add board

file

Quoted 2 lines
Quoted 2 lines

and

Quoted 1 line

since many things have changed I don't want to cause the conflicts

with

Quoted 11 lines
Quoted 11 lines
Quoted 3 lines

others now.

BTW, why is the name board-xxx not mach-xxx like others?

It's mentioned several times,
How do you talk with other when talk about the smdk?
"I'm using the smdk machine and it's based on smdk machine?" As board is more proper word and it's easy to know when find the board at source code.
So hope to use the board if it's not big deal.

Quoted 4 lines

Yes, we say 'SMDK board blah blah' so it can be no big deal, but I don't want to make a confusion between CONFIG_MACH_XXX and mach-xxx.c yet even though there is a similar situation of arch/arm/mach-xxx/ directory and CONFIG_ARCH_XXX. In addition, the machine_is_xxx() is used to

Quoted 8 lines

distinguish

Quoted 3 lines

board in the kernel.

Anyway, I think, if to use board-xxx.c is required, we can change it all

at

Quoted 1 line

once and let me think again.

Don't think, use the current way.

You seem not to have the common courtesy to discuss something here.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#9 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

Quoted 44 lines · Kukjin Kim
Quoted 43 lines · Kyungmin Park
Quoted 18 lines · Kukjin Kim
Quoted 17 lines · Kyungmin Park
Quoted 15 lines · Kukjin Kim
Quoted 13 lines · Kim

This patch adds Samsung Mobile TRATS board support.

---
 arch/arm/mach-exynos/Kconfig       |   11 ++
 arch/arm/mach-exynos/Makefile      |    1 +
 arch/arm/mach-exynos/board-trats.c |  340
++++++++++++++++++++++++++++++++++++
 3 files changed, 352 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/board-trats.c
Quoted 1 line
Quoted 1 line
Quoted 1 line

If this is for v3.3, unfortunately, it's a little late to add board

file

Quoted 2 lines
Quoted 2 lines

and

Quoted 1 line

since many things have changed I don't want to cause the conflicts

with

Quoted 11 lines
Quoted 11 lines
Quoted 3 lines

others now.

BTW, why is the name board-xxx not mach-xxx like others?

It's mentioned several times,
How do you talk with other when talk about the smdk?
"I'm using the smdk machine and it's based on smdk machine?" As board is more proper word and it's easy to know when find the board at source code.
So hope to use the board if it's not big deal.

Quoted 4 lines

Yes, we say 'SMDK board blah blah' so it can be no big deal, but I don't want to make a confusion between CONFIG_MACH_XXX and mach-xxx.c yet even though there is a similar situation of arch/arm/mach-xxx/ directory and CONFIG_ARCH_XXX. In addition, the machine_is_xxx() is used to

distinguish

Quoted 2 lines

board in the kernel.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Anyway, I think, if to use board-xxx.c is required, we can change it all

at

Quoted 1 line

once and let me think again.

Don't think, use the current way.

You seem not to have the common courtesy to discuss something here.

I also have same opinion on you. Discussion(?) with you is meaningless and don't see any progress.

BR

#10 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

In reply to HeungJun, Kim

This patch adds Samsung Mobile TRATS board support.

---
 arch/arm/mach-exynos/Kconfig      |   11 ++
 arch/arm/mach-exynos/Makefile     |    1 +
 arch/arm/mach-exynos/mach-trats.c |  344 +++++++++++++++++++++++++++++++++++++
 3 files changed, 356 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/mach-trats.c
arch/arm/mach-exynos/Kconfig +11 -0
index 5d602f6..b698e4c 100644
@@ -318,6 +318,17 @@ config MACH_ORIGEN
 	help
 	  Machine support for ORIGEN based on Samsung EXYNOS4210
 
+config MACH_TRATS
+	bool "Mobile TRATS Board"
+	select CPU_EXYNOS4210
+	select S3C_DEV_WDT
+	select S3C_DEV_HSMMC
+	select S3C_DEV_I2C5
+	select EXYNOS4_SETUP_I2C5
+	select EXYNOS4_SETUP_SDHCI
+	help
+	  Machine support for Samsung Mobile TRATS Board.
+
 comment "EXYNOS4212 Boards"
 
 config MACH_SMDK4212
arch/arm/mach-exynos/Makefile +1 -0
index 5fc202c..9432a21 100644
@@ -35,6 +35,7 @@ obj-$(CONFIG_MACH_ARMLEX4210)		+= mach-armlex4210.o
 obj-$(CONFIG_MACH_UNIVERSAL_C210)	+= mach-universal_c210.o
 obj-$(CONFIG_MACH_NURI)			+= mach-nuri.o
 obj-$(CONFIG_MACH_ORIGEN)		+= mach-origen.o
+obj-$(CONFIG_MACH_TRATS)		+= mach-trats.o
 
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
arch/arm/mach-exynos/mach-trats.c new file +344 -0

344 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#11 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

Quoted 132 lines · Kim

This patch adds Samsung Mobile TRATS board support.

---
 arch/arm/mach-exynos/Kconfig      |   11 ++
 arch/arm/mach-exynos/Makefile     |    1 +
 arch/arm/mach-exynos/mach-trats.c |  344
+++++++++++++++++++++++++++++++++++++
 3 files changed, 356 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/mach-trats.c
arch/arm/mach-exynos/Kconfig +11 -0
index 5d602f6..b698e4c 100644
@@ -318,6 +318,17 @@ config MACH_ORIGEN
 	help
 	  Machine support for ORIGEN based on Samsung EXYNOS4210
 
+config MACH_TRATS
+	bool "Mobile TRATS Board"
+	select CPU_EXYNOS4210
+	select S3C_DEV_WDT
+	select S3C_DEV_HSMMC
+	select S3C_DEV_I2C5
+	select EXYNOS4_SETUP_I2C5
+	select EXYNOS4_SETUP_SDHCI
+	help
+	  Machine support for Samsung Mobile TRATS Board.
+
 comment "EXYNOS4212 Boards"
 
 config MACH_SMDK4212
arch/arm/mach-exynos/Makefile +0 -0
index 5fc202c..9432a21 100644
@@ -35,6 +35,7 @@ obj-$(CONFIG_MACH_ARMLEX4210)		+= mach-

armlex4210.o
obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o
obj-$(CONFIG_MACH_NURI) += mach-nuri.o
obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o

arch/arm/mach-exynos/Makefile +1 -0
+obj-$(CONFIG_MACH_TRATS)		+= mach-trats.o
 
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
arch/arm/mach- renamed from arch/arm/mach-exynos/mach-trats.c +0 -0

exynos/mach-trats.c
new file mode 100644
index 0000000..65c7069

arch/arm/mach-exynos/mach-trats.c new file +37 -0
@@ -0,0 +1,344 @@
+/*
+ * linux/arch/arm/mach-exynos/board-trats.c
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/platform_device.h>
+#include <linux/serial_core.h>
+#include <linux/i2c.h>
+#include <linux/gpio.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
+#include <linux/mfd/max8997.h>
+#include <linux/mfd/max8997-private.h>
+#include <linux/mmc/host.h>
+
+#include <asm/mach/arch.h>
+#include <asm/hardware/gic.h>
+#include <asm/mach-types.h>
+
+#include <plat/regs-serial.h>
+#include <plat/cpu.h>
+#include <plat/devs.h>
+#include <plat/sdhci.h>
+#include <plat/clock.h>
+#include <plat/gpio-cfg.h>
+#include <plat/iic.h>
+
+#include <mach/map.h>
+
+#include "common.h"
+
+/* Following are default values for UCON, ULCON and UFCON UART registers

*/

arch/arm/mach-exynos/mach-trats.c new file +39 -0
+#define TRATS_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
+				 S3C2410_UCON_RXILEVEL |	\
+				 S3C2410_UCON_TXIRQMODE |	\
+				 S3C2410_UCON_RXIRQMODE |	\
+				 S3C2410_UCON_RXFIFO_TOI |	\
+				 S3C2443_UCON_RXERR_IRQEN)
+
+#define TRATS_ULCON_DEFAULT	S3C2410_LCON_CS8
+
+#define TRATS_UFCON_DEFAULT	(S3C2410_UFCON_FIFOMODE |	\
+				 S5PV210_UFCON_TXTRIG256 |	\
+				 S5PV210_UFCON_RXTRIG256)
+
+enum fixed_regulator_id {
+	FIXED_REG_ID_MMC = 0,
+};
+
+static struct s3c2410_uartcfg trats_uartcfgs[] __initdata = {
+	{
+		.hwport		= 0,
+		.ucon		= TRATS_UCON_DEFAULT,
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+	{
+		.hwport		= 1,
+		.ucon		= TRATS_UCON_DEFAULT,
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+	{
+		.hwport		= 2,
+		.ucon		= TRATS_UCON_DEFAULT,
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+	{
+		.hwport		= 3,
+		.ucon		= TRATS_UCON_DEFAULT,

arch/arm/mach-exynos/mach-trats.c

Quoted 10 lines
arch/arm/mach-exynos/mach-trats.c new file +10 -0
+		.ulcon		= TRATS_ULCON_DEFAULT,
+		.ufcon		= TRATS_UFCON_DEFAULT,
+	},
+};
+
+/* eMMC */
+static struct s3c_sdhci_platdata trats_hsmmc0_data __initdata = {
+	.max_width		= 8,
+	.host_caps		= (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA |
+				MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED

|

Quoted 144 lines
arch/arm/mach-exynos/mach-trats.c new file +144 -0
+				MMC_CAP_DISABLE | MMC_CAP_ERASE),
+	.cd_type		= S3C_SDHCI_CD_PERMANENT,
+	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
+};
+
+static struct regulator_consumer_supply emmc_supplies[] = {
+	REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
+};
+
+static struct regulator_init_data emmc_fixed_voltage_init_data = {
+	.constraints		= {
+		.name		= "VMEM_VDD_2.8V",
+		.valid_ops_mask	= REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(emmc_supplies),
+	.consumer_supplies	= emmc_supplies,
+};
+
+static struct fixed_voltage_config emmc_fixed_voltage_config = {
+	.supply_name		= "MASSMEMORY_EN",
+	.microvolts		= 2800000,
+	.gpio			= EXYNOS4_GPK0(2),
+	.enable_high		= true,
+	.init_data		= &emmc_fixed_voltage_init_data,
+};
+
+static struct platform_device emmc_fixed_voltage = {
+	.name			= "reg-fixed-voltage",
+	.id			= FIXED_REG_ID_MMC,
+	.dev			= {
+		.platform_data	= &emmc_fixed_voltage_config,
+	},
+};
+
+static void __init trats_sdhci_init(void)
+{
+	s3c_sdhci0_set_platdata(&trats_hsmmc0_data);
+}
+
+static struct regulator_consumer_supply __initdata max8997_buck1_[] = {
+	REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
+};
+static struct regulator_consumer_supply __initdata max8997_buck2_[] = {
+	REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */
+};
+
+static struct regulator_init_data __initdata max8997_ldo2_data = {
+	.constraints	= {
+		.name		= "VALIVE_1.1V_C210",
+		.min_uV		= 1100000,
+		.max_uV		= 1100000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_ldo6_data = {
+	.constraints	= {
+		.name		= "VCC_1.8V_PDA",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_ldo9_data = {
+	.constraints	= {
+		.name		= "VCC_2.8V_PDA",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_ldo10_data = {
+	.constraints	= {
+		.name		= "VPLL_1.1V_C210",
+		.min_uV		= 1100000,
+		.max_uV		= 1100000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.disabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_buck1_data = {
+	.constraints	= {
+		.name		= "VARM_1.2V_C210",
+		.min_uV		= 900000,
+		.max_uV		= 1350000,
+		.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE,
+		.always_on	= 1,
+		.state_mem	= {
+			.disabled	= 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max8997_buck1_),
+	.consumer_supplies = max8997_buck1_,
+};
+
+static struct regulator_init_data __initdata max8997_buck2_data = {
+	.constraints	= {
+		.name		= "VINT_1.1V_C210",
+		.min_uV		= 900000,
+		.max_uV		= 1100000,
+		.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE,
+		.always_on	= 1,
+		.state_mem	= {
+			.disabled	= 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max8997_buck2_),
+	.consumer_supplies = max8997_buck2_,
+};
+
+static struct regulator_init_data __initdata max8997_buck5_data = {
+	.constraints	= {
+		.name		= "VMEM_1.2V_C210",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max8997_buck6_data = {
+	.constraints	= {
+		.name		= "V_BAT",

arch/arm/mach-exynos/mach-trats.c

Quoted 10 lines
arch/arm/mach-exynos/mach-trats.c new file +10 -0
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.always_on	= 1,
+		.state_mem	= {
+			.enabled	= 1,
+		},
+	},
+};
+
+static struct max8997_regulator_data __initdata

trats_max8997_regulators[]

Quoted 107 lines

= {

arch/arm/mach-exynos/mach-trats.c new file +18 -0
+	{ MAX8997_LDO2, &max8997_ldo2_data },
+	{ MAX8997_LDO6, &max8997_ldo6_data },
+	{ MAX8997_LDO9, &max8997_ldo9_data },
+	{ MAX8997_LDO10, &max8997_ldo10_data },
+
+	{ MAX8997_BUCK1, &max8997_buck1_data },
+	{ MAX8997_BUCK2, &max8997_buck2_data },
+	{ MAX8997_BUCK5, &max8997_buck5_data },
+	{ MAX8997_BUCK6, &max8997_buck6_data },
+};
+
+static struct max8997_platform_data __initdata trats_max8997_pdata = {
+	.wakeup			= 1,
+
+	.num_regulators		= ARRAY_SIZE(trats_max8997_regulators),
+	.regulators		= trats_max8997_regulators,
+
+	.buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6),

EXYNOS4_GPL0(0) },

arch/arm/mach-exynos/mach-trats.c new file +86 -1
+
+	.buck1_voltage[0] = 1350000, /* 1.35V */
+	.buck1_voltage[1] = 1300000, /* 1.3V */
+	.buck1_voltage[2] = 1250000, /* 1.25V */
+	.buck1_voltage[3] = 1200000, /* 1.2V */
+	.buck1_voltage[4] = 1150000, /* 1.15V */
+	.buck1_voltage[5] = 1100000, /* 1.1V */
+	.buck1_voltage[6] = 1000000, /* 1.0V */
+	.buck1_voltage[7] = 950000, /* 0.95V */
+
+	.buck2_voltage[0] = 1100000, /* 1.1V */
+	.buck2_voltage[1] = 1000000, /* 1.0V */
+	.buck2_voltage[2] = 950000, /* 0.95V */
+	.buck2_voltage[3] = 900000, /* 0.9V */
+	.buck2_voltage[4] = 1100000, /* 1.1V */
+	.buck2_voltage[5] = 1000000, /* 1.0V */
+	.buck2_voltage[6] = 950000, /* 0.95V */
+	.buck2_voltage[7] = 900000, /* 0.9V */
+
+	.buck5_voltage[0] = 1200000, /* 1.2V */
+	.buck5_voltage[1] = 1200000, /* 1.2V */
+	.buck5_voltage[2] = 1200000, /* 1.2V */
+	.buck5_voltage[3] = 1200000, /* 1.2V */
+	.buck5_voltage[4] = 1200000, /* 1.2V */
+	.buck5_voltage[5] = 1200000, /* 1.2V */
+	.buck5_voltage[6] = 1200000, /* 1.2V */
+	.buck5_voltage[7] = 1200000, /* 1.2V */
+};
+
+/* I2C 5 (PMIC) */
+enum { I2C5_MAX8997 };
+static struct i2c_board_info i2c5_devs[] __initdata = {
+	[I2C5_MAX8997] = {
+		I2C_BOARD_INFO("max8997", 0xCC >> 1),
+		.platform_data	= &trats_max8997_pdata,
+	},
+};
+
+static void __init trats_power_init(void)
+{
+	int gpio;
+
+	gpio = EXYNOS4_GPX0(7);
+	gpio_request(gpio, "AP_PMIC_IRQ");
+	s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
+	s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+}
+
+static struct platform_device *trats_devices[] __initdata = {
+	/* Samsung Platform Devices */
+	&s3c_device_i2c5, /* PMIC should initialize first */
+	&emmc_fixed_voltage,
+	&s3c_device_hsmmc0,
+	&s3c_device_wdt,
+};
+
+static void __init trats_map_io(void)
+{
+	exynos_init_io(NULL, 0);
+	s3c24xx_init_clocks(24000000);
+	s3c24xx_init_uarts(trats_uartcfgs, ARRAY_SIZE(trats_uartcfgs));
+}
+
+static void __init trats_machine_init(void)
+{
+	trats_sdhci_init();
+	trats_power_init();
+
+	s3c_i2c5_set_platdata(NULL);
+	i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
+	i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
+
+	/* Last */
+	platform_add_devices(trats_devices, ARRAY_SIZE(trats_devices));
+}
+
+MACHINE_START(TRATS, "TRATS")
+	/* Maintainer: Kyungmin Park <[email protected]> */
+	.atag_offset	= 0x100,
+	.init_irq	= exynos4_init_irq,
+	.map_io		= trats_map_io,
+	.handle_irq	= gic_handle_irq,
+	.init_machine	= trats_machine_init,
+	.timer		= &exynos4_timer,
+	.restart	= exynos4_restart,
+MACHINE_END
--
Quoted 1 line

1.7.4.1

OK, will apply.
Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#12 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

In reply to HeungJun, Kim

Dear Mr. HeungJun Kim,

Quoted 10 lines · Kim

This patch adds Samsung Mobile TRATS board support.

---

?arch/arm/mach-exynos/Kconfig ? ? ?| ? 11 ++
?arch/arm/mach-exynos/Makefile ? ? | ? ?1 +
?arch/arm/mach-exynos/mach-trats.c | ?344 +++++++++++++++++++++++++++++++++++++

?3 files changed, 356 insertions(+), 0 deletions(-) ?create mode 100644 arch/arm/mach-exynos/mach-trats.c

The exynos4 dt-enabled board file can support most of the features added in this board file. The other option that could be considered here would be to add DT support for this board file, and use AUX_DATA to supply platform data for drivers that do not have dt support yet. It would be better to use dt support for new board support that we add.

Thanks,
Thomas.

(snip)

#13 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

+ Karol for DT support later

Quoted 29 lines · Thomas Abraham

Dear Mr. HeungJun Kim,

Quoted 10 lines · Kim

This patch adds Samsung Mobile TRATS board support.

---

?arch/arm/mach-exynos/Kconfig ? ? ?| ? 11 ++
?arch/arm/mach-exynos/Makefile ? ? | ? ?1 +
?arch/arm/mach-exynos/mach-trats.c | ?344 +++++++++++++++++++++++++++++++++++++

?3 files changed, 356 insertions(+), 0 deletions(-) ?create mode 100644 arch/arm/mach-exynos/mach-trats.c

The exynos4 dt-enabled board file can support most of the features added in this board file. The other option that could be considered here would be to add DT support for this board file, and use AUX_DATA to supply platform data for drivers that do not have dt support yet. It would be better to use dt support for new board support that we add.

Thanks,
Thomas.

(snip)
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html

#14 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

Quoted 24 lines · Kyungmin Park

+ Karol for DT support later

Quoted 20 lines · Thomas Abraham

Dear Mr. HeungJun Kim,

Quoted 10 lines · Kim

This patch adds Samsung Mobile TRATS board support.

---
 arch/arm/mach-exynos/Kconfig      |   11 ++
 arch/arm/mach-exynos/Makefile     |    1 +
 arch/arm/mach-exynos/mach-trats.c |  344 +++++++++++++++++++++++++++++++++++++
 3 files changed, 356 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/mach-trats.c

The exynos4 dt-enabled board file can support most of the features added in this board file. The other option that could be considered here would be to add DT support for this board file, and use AUX_DATA to supply platform data for drivers that do not have dt support yet. It would be better to use dt support for new board support that we add.

Thanks to Thomas' work TRATS can be booted today using exynos4-dt. However, we are still missing some bits needed to make it fully functional:

- sdhci-s3c patchset[1] is needed for eMMC support

http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/9216

- irq-eint[2] and max8997-pmic[3] for regulators

[2] http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/8197
[3] http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/8865

These patches (created entirely by Thomas) would allow me to write description (dts) that should cover what mach-trats.c did.

However, due to ongoing irqdomain and related changes I assume this might take a while.

Thomas, may I ask about your plans wrt to irqdomains and wakeup/eints (this [2] patchset)?

Regards,

Signature · 1 line
Karol Lewandowski | Samsung Poland R&D Center | Linux/Platform
#15 lore raw

PATCH 1/1 ARM: EXYNOS: Adds Samsung TRATS board support

Hi Karol,

Quoted 40 lines · Karol Lewandowski
Quoted 24 lines · Kyungmin Park

+ Karol for DT support later

Quoted 20 lines · Thomas Abraham

Dear Mr. HeungJun Kim,

Quoted 10 lines · Kim

This patch adds Samsung Mobile TRATS board support.

---

?arch/arm/mach-exynos/Kconfig ? ? ?| ? 11 ++
?arch/arm/mach-exynos/Makefile ? ? | ? ?1 +
?arch/arm/mach-exynos/mach-trats.c | ?344 +++++++++++++++++++++++++++++++++++++

?3 files changed, 356 insertions(+), 0 deletions(-) ?create mode 100644 arch/arm/mach-exynos/mach-trats.c

The exynos4 dt-enabled board file can support most of the features added in this board file. The other option that could be considered here would be to add DT support for this board file, and use AUX_DATA to supply platform data for drivers that do not have dt support yet. It would be better to use dt support for new board support that we add.

Thanks to Thomas' work TRATS can be booted today using exynos4-dt. However, we are still missing some bits needed to make it fully functional:

?- sdhci-s3c patchset[1] is needed for eMMC support

? http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/9216

?- irq-eint[2] and max8997-pmic[3] for regulators

? [2] http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/8197
? [3] http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/8865

Quoted 8 lines

These patches (created entirely by Thomas) would allow me to write description (dts) that should cover what mach-trats.c did.

However, due to ongoing irqdomain and related changes I assume this might take a while.

Thomas, may I ask about your plans wrt to irqdomains and wakeup/eints (this [2] patchset)?

I am in the process of converting max8997, wake-interrupts and interrupt combiner to the updated irqdomains support posted by Grant Likely. I will be working on the updated patches for this in the next week.

Thanks,
Thomas.

Quoted 4 lines

Regards,
--
Karol Lewandowski | Samsung Poland R&D Center | Linux/Platform