summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210/mach-goni.c
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2010-10-04 16:39:22 +0900
committerKukjin Kim <kgene.kim@samsung.com>2010-10-21 07:54:58 +0900
commit528ef1b5f3998cd3199926526b4c188d52e4ba7c (patch)
tree6ea47a1e43d9acf83e418c3747dfecb8e43811ca /arch/arm/mach-s5pv210/mach-goni.c
parent8415d5c41564a9b7c802f26d5a4795ddb823d6ed (diff)
downloadblackbird-op-linux-528ef1b5f3998cd3199926526b4c188d52e4ba7c.tar.gz
blackbird-op-linux-528ef1b5f3998cd3199926526b4c188d52e4ba7c.zip
ARM: S5PV210: Add si470x radio device to the GONI board
Add required platform definitions for si470x radio device on Samsung Goni board. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> [kgene.kim@samsung.com: minor title fixes] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210/mach-goni.c')
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 435b68f07086..f1fe024144eb 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -39,6 +39,7 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/fb.h>
+#include <plat/iic.h>
#include <plat/keypad.h>
#include <plat/sdhci.h>
#include <plat/clock.h>
@@ -197,6 +198,27 @@ static struct samsung_keypad_platdata keypad_data __initdata = {
.cols = 3,
};
+/* Radio */
+static struct i2c_board_info i2c1_devs[] __initdata = {
+ {
+ I2C_BOARD_INFO("si470x", 0x10),
+ },
+};
+
+static void __init goni_radio_init(void)
+{
+ int gpio;
+
+ gpio = S5PV210_GPJ2(4); /* XMSMDATA_4 */
+ gpio_request(gpio, "FM_INT");
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
+ i2c1_devs[0].irq = gpio_to_irq(gpio);
+
+ gpio = S5PV210_GPJ2(5); /* XMSMDATA_5 */
+ gpio_request(gpio, "FM_RST");
+ gpio_direction_output(gpio, 1);
+}
+
/* MAX8998 regulators */
#if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
@@ -587,6 +609,7 @@ static struct platform_device *goni_devices[] __initdata = {
&s3c_device_hsmmc2,
&s3c_device_usb_hsotg,
&samsung_device_keypad,
+ &s3c_device_i2c1,
};
static void __init goni_map_io(void)
@@ -598,6 +621,13 @@ static void __init goni_map_io(void)
static void __init goni_machine_init(void)
{
+ /* Radio: call before I2C 1 registeration */
+ goni_radio_init();
+
+ /* I2C1 */
+ s3c_i2c1_set_platdata(NULL);
+ i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
+
/* PMIC */
goni_pmic_init();
i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4, i2c_gpio_pmic_devs,
OpenPOWER on IntegriCloud