int (*io_deinit)(void);
};
-/*vmac*/
-struct rk29_vmac_platform_data {
- int (*vmac_register_set)(void);
- int (*rmii_io_init)(void);
- int (*rmii_io_deinit)(void);
- int (*rmii_power_control)(int enable);
-};
-
#define INVALID_GPIO -1
CLK1(pclk_timer2),
CLK(NULL, "rmii_clkin", &rmii_clkin),
- CLK1(mac_pll_div),
+ CLK(NULL, "mac_ref_div", &clk_mac_pll_div), // compatible with rk29
CLK1(mac_ref),
CLK1(mii_tx),
CLK1(hsadc_pll_div),
static void __init rk30_cpu_axi_init(void)
{
- writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x0088);
- writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x0108);
- writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x0188);
- writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x0388);
- writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x4008);
- writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x5008);
- writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x6008);
- writel_relaxed(0xa, RK30_CPU_AXI_BUS_BASE + 0x7008);
- writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7088);
- writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7108);
- writel_relaxed(0xa, RK30_CPU_AXI_BUS_BASE + 0x7188);
- writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7208);
- writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7288);
- writel_relaxed(0x3f, RK30_CPU_AXI_BUS_BASE + 0x0014);
+ writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x0088); // cpu0
+ writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x0108); // dmac1
+ writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x0188); // cpu1r
+ writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x0388); // cpu1w
+#ifdef CONFIG_RK29_VMAC
+ writel_relaxed(0xa, RK30_CPU_AXI_BUS_BASE + 0x4008); // peri
+#else
+ writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x4008); // peri
+#endif
+ writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x5008); // gpu
+ writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x6008); // vpu
+ writel_relaxed(0xa, RK30_CPU_AXI_BUS_BASE + 0x7008); // lcdc0
+ writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7088); // cif0
+ writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7108); // ipp
+ writel_relaxed(0xa, RK30_CPU_AXI_BUS_BASE + 0x7188); // lcdc1
+ writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7208); // cif1
+ writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7288); // rga
+ writel_relaxed(0x3f, RK30_CPU_AXI_BUS_BASE + 0x0014); // memory scheduler read latency
dsb();
}
-
#define L2_LY_SP_OFF (0)
#define L2_LY_SP_MSK (0x7)
};
#endif
-//#ifdef CONFIG_RK29_IPP
static struct resource resource_ipp[] = {
[0] = {
.start = RK30_IPP_PHYS,
.num_resources = ARRAY_SIZE(resource_ipp),
.resource = resource_ipp,
};
-//#endif
#ifdef CONFIG_SND_RK29_SOC_I2S
#ifdef CONFIG_SND_RK29_SOC_I2S_8CH
#endif
platform_device_register(&device_pcm);
}
+
#ifdef CONFIG_USB20_OTG
/*DWC_OTG*/
static struct resource usb20_otg_resource[] = {
#endif
}
-extern int rk29sdk_wifi_bt_gpio_control_init(void);
+#ifdef CONFIG_RK29_VMAC
+static u64 eth_dmamask = DMA_BIT_MASK(32);
+static struct resource resources_vmac[] = {
+ [0] = {
+ .start = RK30_MAC_PHYS,
+ .end = RK30_MAC_PHYS + RK30_MAC_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = IRQ_MAC,
+ .end = IRQ_MAC,
+ .flags = IORESOURCE_IRQ,
+ }
+};
+
+static struct platform_device device_vmac = {
+ .name = "rk29 vmac",
+ .id = 0,
+ .dev = {
+ .dma_mask = ð_dmamask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ .platform_data = &board_vmac_data,
+ },
+ .num_resources = ARRAY_SIZE(resources_vmac),
+ .resource = resources_vmac,
+};
+#endif
static int __init rk30_init_devices(void)
{
#ifdef CONFIG_RGA_RK30
platform_device_register(&device_rga);
#endif
-//#ifdef CONFIG_RK29_IPP
platform_device_register(&device_ipp);
-//#endif
#ifdef CONFIG_LCDC0_RK30
platform_device_register(&device_lcdc0);
#endif
rk_serial_debug_init(DEBUG_UART_BASE, IRQ_UART0 + CONFIG_RK_DEBUG_UART, IRQ_UART_SIGNAL, -1);
#endif
rk30_init_i2s();
+#ifdef CONFIG_RK29_VMAC
+ platform_device_register(&device_vmac);
+#endif
return 0;
}
extern struct rk29_sdmmc_platform_data default_sdmmc1_data;
extern struct i2c_gpio_platform_data default_i2c_gpio_data;
+extern struct rk29_vmac_platform_data board_vmac_data;
void __init rk30_map_common_io(void);
void __init rk30_init_irq(void);
unsigned int pin_value; //GPIO_HIGH or GPIO_LOW
};
+/*vmac*/
+struct rk29_vmac_platform_data {
+ int (*vmac_register_set)(void);
+ int (*rmii_io_init)(void);
+ int (*rmii_io_deinit)(void);
+ int (*rmii_power_control)(int enable);
+};
+
#define BOOT_MODE_NORMAL 0
#define BOOT_MODE_FACTORY2 1
#define BOOT_MODE_RECOVERY 2