|
@@ -1090,3 +1090,132 @@ static struct resource sdhi2_resources[] = {
|
|
|
.end = 0xe68700ff,
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
},
|
|
|
+ [1] = {
|
|
|
+ .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT,
|
|
|
+ .start = evt2irq(0x1200), /* SDHI2_SDHI2I0 */
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+ [2] = {
|
|
|
+ .name = SH_MOBILE_SDHI_IRQ_SDCARD,
|
|
|
+ .start = evt2irq(0x1220), /* SDHI2_SDHI2I1 */
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+ [3] = {
|
|
|
+ .name = SH_MOBILE_SDHI_IRQ_SDIO,
|
|
|
+ .start = evt2irq(0x1240), /* SDHI2_SDHI2I2 */
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device sdhi2_device = {
|
|
|
+ .name = "sh_mobile_sdhi",
|
|
|
+ .num_resources = ARRAY_SIZE(sdhi2_resources),
|
|
|
+ .resource = sdhi2_resources,
|
|
|
+ .id = 2,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &sdhi2_info,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+/* SH_MMCIF */
|
|
|
+static struct resource sh_mmcif_resources[] = {
|
|
|
+ [0] = {
|
|
|
+ .name = "MMCIF",
|
|
|
+ .start = 0xE6BD0000,
|
|
|
+ .end = 0xE6BD00FF,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ [1] = {
|
|
|
+ /* MMC ERR */
|
|
|
+ .start = evt2irq(0x1ac0),
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+ [2] = {
|
|
|
+ /* MMC NOR */
|
|
|
+ .start = evt2irq(0x1ae0),
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct sh_mmcif_plat_data sh_mmcif_plat = {
|
|
|
+ .sup_pclk = 0,
|
|
|
+ .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
|
|
|
+ .caps = MMC_CAP_4_BIT_DATA |
|
|
|
+ MMC_CAP_8_BIT_DATA |
|
|
|
+ MMC_CAP_NEEDS_POLL,
|
|
|
+ .get_cd = slot_cn7_get_cd,
|
|
|
+ .slave_id_tx = SHDMA_SLAVE_MMCIF_TX,
|
|
|
+ .slave_id_rx = SHDMA_SLAVE_MMCIF_RX,
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device sh_mmcif_device = {
|
|
|
+ .name = "sh_mmcif",
|
|
|
+ .id = 0,
|
|
|
+ .dev = {
|
|
|
+ .dma_mask = NULL,
|
|
|
+ .coherent_dma_mask = 0xffffffff,
|
|
|
+ .platform_data = &sh_mmcif_plat,
|
|
|
+ },
|
|
|
+ .num_resources = ARRAY_SIZE(sh_mmcif_resources),
|
|
|
+ .resource = sh_mmcif_resources,
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+static int mackerel_camera_add(struct soc_camera_device *icd);
|
|
|
+static void mackerel_camera_del(struct soc_camera_device *icd);
|
|
|
+
|
|
|
+static int camera_set_capture(struct soc_camera_platform_info *info,
|
|
|
+ int enable)
|
|
|
+{
|
|
|
+ return 0; /* camera sensor always enabled */
|
|
|
+}
|
|
|
+
|
|
|
+static struct soc_camera_platform_info camera_info = {
|
|
|
+ .format_name = "UYVY",
|
|
|
+ .format_depth = 16,
|
|
|
+ .format = {
|
|
|
+ .code = V4L2_MBUS_FMT_UYVY8_2X8,
|
|
|
+ .colorspace = V4L2_COLORSPACE_SMPTE170M,
|
|
|
+ .field = V4L2_FIELD_NONE,
|
|
|
+ .width = 640,
|
|
|
+ .height = 480,
|
|
|
+ },
|
|
|
+ .mbus_param = V4L2_MBUS_PCLK_SAMPLE_RISING | V4L2_MBUS_MASTER |
|
|
|
+ V4L2_MBUS_VSYNC_ACTIVE_HIGH | V4L2_MBUS_HSYNC_ACTIVE_HIGH |
|
|
|
+ V4L2_MBUS_DATA_ACTIVE_HIGH,
|
|
|
+ .mbus_type = V4L2_MBUS_PARALLEL,
|
|
|
+ .set_capture = camera_set_capture,
|
|
|
+};
|
|
|
+
|
|
|
+static struct soc_camera_link camera_link = {
|
|
|
+ .bus_id = 0,
|
|
|
+ .add_device = mackerel_camera_add,
|
|
|
+ .del_device = mackerel_camera_del,
|
|
|
+ .module_name = "soc_camera_platform",
|
|
|
+ .priv = &camera_info,
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device *camera_device;
|
|
|
+
|
|
|
+static void mackerel_camera_release(struct device *dev)
|
|
|
+{
|
|
|
+ soc_camera_platform_release(&camera_device);
|
|
|
+}
|
|
|
+
|
|
|
+static int mackerel_camera_add(struct soc_camera_device *icd)
|
|
|
+{
|
|
|
+ return soc_camera_platform_add(icd, &camera_device, &camera_link,
|
|
|
+ mackerel_camera_release, 0);
|
|
|
+}
|
|
|
+
|
|
|
+static void mackerel_camera_del(struct soc_camera_device *icd)
|
|
|
+{
|
|
|
+ soc_camera_platform_del(icd, camera_device, &camera_link);
|
|
|
+}
|
|
|
+
|
|
|
+static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
|
|
|
+ .flags = SH_CEU_FLAG_USE_8BIT_BUS,
|
|
|
+ .max_width = 8188,
|
|
|
+ .max_height = 8188,
|
|
|
+};
|
|
|
+
|