|
@@ -822,3 +822,147 @@ static struct asoc_simple_card_info fsi_wm8978_info = {
|
|
|
.codec_dai = "wm8978-hifi",
|
|
|
.init = &fsi_wm8978_init_info,
|
|
|
};
|
|
|
+
|
|
|
+static struct platform_device fsi_wm8978_device = {
|
|
|
+ .name = "asoc-simple-card",
|
|
|
+ .id = 0,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &fsi_wm8978_info,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+/* FSI-HDMI */
|
|
|
+static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = {
|
|
|
+ .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM,
|
|
|
+};
|
|
|
+
|
|
|
+static struct asoc_simple_card_info fsi2_hdmi_info = {
|
|
|
+ .name = "HDMI",
|
|
|
+ .card = "FSI2B-HDMI",
|
|
|
+ .cpu_dai = "fsib-dai",
|
|
|
+ .codec = "sh-mobile-hdmi",
|
|
|
+ .platform = "sh_fsi2",
|
|
|
+ .codec_dai = "sh_mobile_hdmi-hifi",
|
|
|
+ .init = &fsi2_hdmi_init_info,
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device fsi_hdmi_device = {
|
|
|
+ .name = "asoc-simple-card",
|
|
|
+ .id = 1,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &fsi2_hdmi_info,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+/* RTC: RTC connects i2c-gpio. */
|
|
|
+static struct i2c_gpio_platform_data i2c_gpio_data = {
|
|
|
+ .sda_pin = GPIO_PORT208,
|
|
|
+ .scl_pin = GPIO_PORT91,
|
|
|
+ .udelay = 5, /* 100 kHz */
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device i2c_gpio_device = {
|
|
|
+ .name = "i2c-gpio",
|
|
|
+ .id = 2,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &i2c_gpio_data,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+/* I2C */
|
|
|
+static struct i2c_board_info i2c0_devices[] = {
|
|
|
+ {
|
|
|
+ I2C_BOARD_INFO("st1232-ts", 0x55),
|
|
|
+ .irq = evt2irq(0x0340),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ I2C_BOARD_INFO("wm8978", 0x1a),
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct i2c_board_info i2c2_devices[] = {
|
|
|
+ {
|
|
|
+ I2C_BOARD_INFO("s35390a", 0x30),
|
|
|
+ .type = "s35390a",
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+/*
|
|
|
+ * board devices
|
|
|
+ */
|
|
|
+static struct platform_device *eva_devices[] __initdata = {
|
|
|
+ &lcdc0_device,
|
|
|
+ &gpio_keys_device,
|
|
|
+ &sh_eth_device,
|
|
|
+ &sdhi0_device,
|
|
|
+ &sh_mmcif_device,
|
|
|
+ &hdmi_device,
|
|
|
+ &hdmi_lcdc_device,
|
|
|
+ &camera_device,
|
|
|
+ &ceu0_device,
|
|
|
+ &fsi_device,
|
|
|
+ &fsi_wm8978_device,
|
|
|
+ &fsi_hdmi_device,
|
|
|
+ &i2c_gpio_device,
|
|
|
+};
|
|
|
+
|
|
|
+static void __init eva_clock_init(void)
|
|
|
+{
|
|
|
+ struct clk *system = clk_get(NULL, "system_clk");
|
|
|
+ struct clk *xtal1 = clk_get(NULL, "extal1");
|
|
|
+ struct clk *usb24s = clk_get(NULL, "usb24s");
|
|
|
+ struct clk *fsibck = clk_get(NULL, "fsibck");
|
|
|
+
|
|
|
+ if (IS_ERR(system) ||
|
|
|
+ IS_ERR(xtal1) ||
|
|
|
+ IS_ERR(usb24s) ||
|
|
|
+ IS_ERR(fsibck)) {
|
|
|
+ pr_err("armadillo800eva board clock init failed\n");
|
|
|
+ goto clock_error;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* armadillo 800 eva extal1 is 24MHz */
|
|
|
+ clk_set_rate(xtal1, 24000000);
|
|
|
+
|
|
|
+ /* usb24s use extal1 (= system) clock (= 24MHz) */
|
|
|
+ clk_set_parent(usb24s, system);
|
|
|
+
|
|
|
+ /* FSIBCK is 12.288MHz, and it is parent of FSI-B */
|
|
|
+ clk_set_rate(fsibck, 12288000);
|
|
|
+
|
|
|
+clock_error:
|
|
|
+ if (!IS_ERR(system))
|
|
|
+ clk_put(system);
|
|
|
+ if (!IS_ERR(xtal1))
|
|
|
+ clk_put(xtal1);
|
|
|
+ if (!IS_ERR(usb24s))
|
|
|
+ clk_put(usb24s);
|
|
|
+ if (!IS_ERR(fsibck))
|
|
|
+ clk_put(fsibck);
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+ * board init
|
|
|
+ */
|
|
|
+#define GPIO_PORT7CR IOMEM(0xe6050007)
|
|
|
+#define GPIO_PORT8CR IOMEM(0xe6050008)
|
|
|
+static void __init eva_init(void)
|
|
|
+{
|
|
|
+ struct platform_device *usb = NULL;
|
|
|
+
|
|
|
+ regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
|
|
|
+ ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
|
|
|
+
|
|
|
+ r8a7740_pinmux_init();
|
|
|
+ r8a7740_meram_workaround();
|
|
|
+
|
|
|
+ /* SCIFA1 */
|
|
|
+ gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
|
|
|
+ gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
|
|
|
+
|
|
|
+ /* LCDC0 */
|
|
|
+ gpio_request(GPIO_FN_LCDC0_SELECT, NULL);
|
|
|
+ gpio_request(GPIO_FN_LCD0_D0, NULL);
|
|
|
+ gpio_request(GPIO_FN_LCD0_D1, NULL);
|
|
|
+ gpio_request(GPIO_FN_LCD0_D2, NULL);
|
|
|
+ gpio_request(GPIO_FN_LCD0_D3, NULL);
|