|
@@ -1061,3 +1061,159 @@ static int __init da850_evm_config_emac(void)
|
|
val &= ~BIT(8);
|
|
val &= ~BIT(8);
|
|
ret = davinci_cfg_reg_list(da850_evm_mii_pins);
|
|
ret = davinci_cfg_reg_list(da850_evm_mii_pins);
|
|
pr_info("EMAC: MII PHY configured, RMII PHY will not be"
|
|
pr_info("EMAC: MII PHY configured, RMII PHY will not be"
|
|
|
|
+ " functional\n");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (ret)
|
|
|
|
+ pr_warning("da850_evm_init: cpgmac/rmii mux setup failed: %d\n",
|
|
|
|
+ ret);
|
|
|
|
+
|
|
|
|
+ /* configure the CFGCHIP3 register for RMII or MII */
|
|
|
|
+ __raw_writel(val, cfg_chip3_base);
|
|
|
|
+
|
|
|
|
+ ret = davinci_cfg_reg(DA850_GPIO2_6);
|
|
|
|
+ if (ret)
|
|
|
|
+ pr_warning("da850_evm_init:GPIO(2,6) mux setup "
|
|
|
|
+ "failed\n");
|
|
|
|
+
|
|
|
|
+ ret = gpio_request(DA850_MII_MDIO_CLKEN_PIN, "mdio_clk_en");
|
|
|
|
+ if (ret) {
|
|
|
|
+ pr_warning("Cannot open GPIO %d\n",
|
|
|
|
+ DA850_MII_MDIO_CLKEN_PIN);
|
|
|
|
+ return ret;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /* Enable/Disable MII MDIO clock */
|
|
|
|
+ gpio_direction_output(DA850_MII_MDIO_CLKEN_PIN, rmii_en);
|
|
|
|
+
|
|
|
|
+ soc_info->emac_pdata->phy_id = DA850_EVM_PHY_ID;
|
|
|
|
+
|
|
|
|
+ ret = da8xx_register_emac();
|
|
|
|
+ if (ret)
|
|
|
|
+ pr_warning("da850_evm_init: emac registration failed: %d\n",
|
|
|
|
+ ret);
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+device_initcall(da850_evm_config_emac);
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * The following EDMA channels/slots are not being used by drivers (for
|
|
|
|
+ * example: Timer, GPIO, UART events etc) on da850/omap-l138 EVM, hence
|
|
|
|
+ * they are being reserved for codecs on the DSP side.
|
|
|
|
+ */
|
|
|
|
+static const s16 da850_dma0_rsv_chans[][2] = {
|
|
|
|
+ /* (offset, number) */
|
|
|
|
+ { 8, 6},
|
|
|
|
+ {24, 4},
|
|
|
|
+ {30, 2},
|
|
|
|
+ {-1, -1}
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static const s16 da850_dma0_rsv_slots[][2] = {
|
|
|
|
+ /* (offset, number) */
|
|
|
|
+ { 8, 6},
|
|
|
|
+ {24, 4},
|
|
|
|
+ {30, 50},
|
|
|
|
+ {-1, -1}
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static const s16 da850_dma1_rsv_chans[][2] = {
|
|
|
|
+ /* (offset, number) */
|
|
|
|
+ { 0, 28},
|
|
|
|
+ {30, 2},
|
|
|
|
+ {-1, -1}
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static const s16 da850_dma1_rsv_slots[][2] = {
|
|
|
|
+ /* (offset, number) */
|
|
|
|
+ { 0, 28},
|
|
|
|
+ {30, 90},
|
|
|
|
+ {-1, -1}
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct edma_rsv_info da850_edma_cc0_rsv = {
|
|
|
|
+ .rsv_chans = da850_dma0_rsv_chans,
|
|
|
|
+ .rsv_slots = da850_dma0_rsv_slots,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct edma_rsv_info da850_edma_cc1_rsv = {
|
|
|
|
+ .rsv_chans = da850_dma1_rsv_chans,
|
|
|
|
+ .rsv_slots = da850_dma1_rsv_slots,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct edma_rsv_info *da850_edma_rsv[2] = {
|
|
|
|
+ &da850_edma_cc0_rsv,
|
|
|
|
+ &da850_edma_cc1_rsv,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+#ifdef CONFIG_CPU_FREQ
|
|
|
|
+static __init int da850_evm_init_cpufreq(void)
|
|
|
|
+{
|
|
|
|
+ switch (system_rev & 0xF) {
|
|
|
|
+ case 3:
|
|
|
|
+ da850_max_speed = 456000;
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ da850_max_speed = 408000;
|
|
|
|
+ break;
|
|
|
|
+ case 1:
|
|
|
|
+ da850_max_speed = 372000;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return da850_register_cpufreq("pll0_sysclk3");
|
|
|
|
+}
|
|
|
|
+#else
|
|
|
|
+static __init int da850_evm_init_cpufreq(void) { return 0; }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_DA850_UI_SD_VIDEO_PORT)
|
|
|
|
+
|
|
|
|
+#define TVP5147_CH0 "tvp514x-0"
|
|
|
|
+#define TVP5147_CH1 "tvp514x-1"
|
|
|
|
+
|
|
|
|
+/* VPIF capture configuration */
|
|
|
|
+static struct tvp514x_platform_data tvp5146_pdata = {
|
|
|
|
+ .clk_polarity = 0,
|
|
|
|
+ .hs_polarity = 1,
|
|
|
|
+ .vs_polarity = 1,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+#define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
|
|
|
|
+
|
|
|
|
+static const struct vpif_input da850_ch0_inputs[] = {
|
|
|
|
+ {
|
|
|
|
+ .input = {
|
|
|
|
+ .index = 0,
|
|
|
|
+ .name = "Composite",
|
|
|
|
+ .type = V4L2_INPUT_TYPE_CAMERA,
|
|
|
|
+ .capabilities = V4L2_IN_CAP_STD,
|
|
|
|
+ .std = TVP514X_STD_ALL,
|
|
|
|
+ },
|
|
|
|
+ .input_route = INPUT_CVBS_VI2B,
|
|
|
|
+ .output_route = OUTPUT_10BIT_422_EMBEDDED_SYNC,
|
|
|
|
+ .subdev_name = TVP5147_CH0,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static const struct vpif_input da850_ch1_inputs[] = {
|
|
|
|
+ {
|
|
|
|
+ .input = {
|
|
|
|
+ .index = 0,
|
|
|
|
+ .name = "S-Video",
|
|
|
|
+ .type = V4L2_INPUT_TYPE_CAMERA,
|
|
|
|
+ .capabilities = V4L2_IN_CAP_STD,
|
|
|
|
+ .std = TVP514X_STD_ALL,
|
|
|
|
+ },
|
|
|
|
+ .input_route = INPUT_SVIDEO_VI2C_VI1C,
|
|
|
|
+ .output_route = OUTPUT_10BIT_422_EMBEDDED_SYNC,
|
|
|
|
+ .subdev_name = TVP5147_CH1,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = {
|
|
|
|
+ {
|
|
|
|
+ .name = TVP5147_CH0,
|
|
|
|
+ .board_info = {
|
|
|
|
+ I2C_BOARD_INFO("tvp5146", 0x5d),
|