Ejemplo n.º 1
0
static void __init wcr150gn_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
	rt305x_register_flash(0, &wcr150gn_flash_data);
	rt305x_register_ethernet();
	rt305x_register_wifi();
	rt305x_register_wdt();
}
Ejemplo n.º 2
0
static void __init all5002_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
	rt305x_register_spi(all5002_spi_slave_info,
			    ARRAY_SIZE(all5002_spi_slave_info));
	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_NONE;
	rt305x_register_ethernet();
	rt305x_register_wifi();
	rt305x_register_wdt();
	rt305x_register_usb();
}
Ejemplo n.º 3
0
static void __init whr_g300n_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);

	rt305x_register_flash(0, &whr_g300n_flash_data);
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(whr_g300n_leds_gpio),
				  whr_g300n_leds_gpio);
	ramips_register_gpio_buttons(-1, WHR_G300N_BUTTONS_POLL_INTERVAL,
				     ARRAY_SIZE(whr_g300n_gpio_buttons),
				     whr_g300n_gpio_buttons);
	rt305x_register_wifi();
}
Ejemplo n.º 4
0
static void __init rt_g32b_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
	rt305x_register_spi(rt_g32b_spi_slave_info,
			    ARRAY_SIZE(rt_g32b_spi_slave_info));

	rt305x_register_ethernet();
	ramips_register_gpio_buttons(-1, RT_G32B_BUTTONS_POLL_INTERVAL,
				     ARRAY_SIZE(rt_g32b_gpio_buttons),
				     rt_g32b_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_wdt();
}
Ejemplo n.º 5
0
static void __init dir_300b_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);

	rt305x_register_flash(0, &dir_300b_flash_data);
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(dir_300b_leds_gpio),
				  dir_300b_leds_gpio);
	ramips_register_gpio_buttons(-1, DIR_300B_BUTTONS_POLL_INTERVAL,
				     ARRAY_SIZE(dir_300b_gpio_buttons),
				     dir_300b_gpio_buttons);
	rt305x_register_wifi();
}
Ejemplo n.º 6
0
static void __init pwh2004_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
	rt305x_register_flash(0, &pwh2004_flash_data);
	ramips_register_gpio_leds(-1, ARRAY_SIZE(pwh2004_leds_gpio),
				  pwh2004_leds_gpio);
	ramips_register_gpio_buttons(-1, PWH2004_BUTTONS_POLL_INTERVAL,
				     ARRAY_SIZE(pwh2004_gpio_buttons),
				     pwh2004_gpio_buttons);
	rt305x_register_ethernet();
	rt305x_register_wifi();
	rt305x_register_wdt();
}
Ejemplo n.º 7
0
static void __init pwh2004_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
	rt305x_register_flash(0, &pwh2004_flash_data);
	ramips_register_gpio_leds(-1, ARRAY_SIZE(pwh2004_leds_gpio),
				  pwh2004_leds_gpio);
	ramips_register_gpio_buttons(-1, PWH2004_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(pwh2004_gpio_buttons),
				     pwh2004_gpio_buttons);
	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
	rt305x_register_ethernet();
	rt305x_register_wifi();
	rt305x_register_wdt();
}
Ejemplo n.º 8
0
static void __init dir_common_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);

	rt305x_register_flash(0);

	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
	rt305x_register_ethernet();
	ramips_register_gpio_buttons(-1, DIR_300B_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(dir_300b_gpio_buttons),
				     dir_300b_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_wdt();
}
Ejemplo n.º 9
0
static void __init dir615h1_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
	rt305x_register_spi(dir615h1_spi_slave_info,
			    ARRAY_SIZE(dir615h1_spi_slave_info));
	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(dir_615_h1_leds_gpio),
				  dir_615_h1_leds_gpio);
	ramips_register_gpio_buttons(-1, DIR_615_H1_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(dir_615_h1_gpio_buttons),
				     dir_615_h1_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_wdt();
}
Ejemplo n.º 10
0
static void __init all0256n_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
	rt305x_register_spi(all0256n_spi_slave_info,
			    ARRAY_SIZE(all0256n_spi_slave_info));
	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_NONE;
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(all0256n_leds_gpio),
				  all0256n_leds_gpio);
	ramips_register_gpio_buttons(-1, ALL0256N_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(all0256n_gpio_buttons),
				     all0256n_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_wdt();
}
Ejemplo n.º 11
0
static void __init f5d8235v2_init(void)
{
	rt305x_gpio_init((RT305X_GPIO_MODE_GPIO <<
					RT305X_GPIO_MODE_UART0_SHIFT) |
					RT305X_GPIO_MODE_I2C |
					RT305X_GPIO_MODE_SPI |
					RT305X_GPIO_MODE_MDIO);
	rt305x_register_flash(0, &f5d8235v2_flash_data);
	ramips_register_gpio_leds(-1, ARRAY_SIZE(f5d8235v2_leds_gpio),
						f5d8235v2_leds_gpio);
	rt305x_register_ethernet();
	platform_device_register(&f5d8235v2_switch);
	rt305x_register_wifi();
	rt305x_register_wdt();
}
Ejemplo n.º 12
0
static void __init hw550_3g_init(void)
{
	rt305x_gpio_init(HW550_3G_GPIO_MODE);

	rt305x_register_flash(0, &hw550_3g_flash_data);
       rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_WLLLL;
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(hw550_3g_leds_gpio),
				  hw550_3g_leds_gpio);
	ramips_register_gpio_buttons(-1, HW550_3G_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(hw550_3g_gpio_buttons),
				     hw550_3g_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_wdt();
	rt305x_register_usb();
}
Ejemplo n.º 13
0
static void __init wl341v3_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);

	rt305x_register_flash(0, &wl341v3_flash_data);
	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_WLLLL;
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(wl341v3_leds_gpio),
				  wl341v3_leds_gpio);
	ramips_register_gpio_buttons(-1, WL341V3_BUTTONS_POLL_INTERVAL,
				     ARRAY_SIZE(wl341v3_gpio_buttons),
				     wl341v3_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_wdt();
	rt305x_register_usb();
}
Ejemplo n.º 14
0
static void __init wl_330n3g_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
	rt305x_register_spi(wl_330n3g_spi_slave_info,
			    ARRAY_SIZE(wl_330n3g_spi_slave_info));
	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_WLLLL;
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(wl_330n3g_leds_gpio),
				  wl_330n3g_leds_gpio);
	ramips_register_gpio_buttons(-1, WL_330N3G_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(wl_330n3g_gpio_buttons),
				     wl_330n3g_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_usb();
	rt305x_register_wdt();
}
Ejemplo n.º 15
0
static void __init w306r_v20_init(void)
{
	rt305x_register_flash(0);

	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);

	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_WLLLL;
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(w306r_v20_leds_gpio),
				  w306r_v20_leds_gpio);
	ramips_register_gpio_buttons(-1, W306R_V20_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(w306r_v20_gpio_buttons),
				     w306r_v20_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_wdt();
}
Ejemplo n.º 16
0
static void __init mofi3500_3gn_init(void)
{
	rt305x_gpio_init(MOFI3500_3GN_GPIO_MODE);

	rt305x_register_flash(0, &mofi3500_3gn_flash_data);
	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(mofi3500_3gn_leds_gpio),
				  mofi3500_3gn_leds_gpio);
	ramips_register_gpio_buttons(-1, MOFI3500_3GN_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(mofi3500_3gn_gpio_buttons),
				     mofi3500_3gn_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_wdt();
	rt305x_register_usb();
}
Ejemplo n.º 17
0
static void __init nbg_419n_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);

	rt305x_register_flash(0);

	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(nbg_419n_leds_gpio),
				  nbg_419n_leds_gpio);
	ramips_register_gpio_buttons(-1, NBG_419N_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(nbg_419n_gpio_buttons),
				     nbg_419n_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_wdt();
}
Ejemplo n.º 18
0
static void __init v22rw_2x2_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);

	rt305x_register_flash(0);

	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(v22rw_2x2_leds_gpio),
				  v22rw_2x2_leds_gpio);
	ramips_register_gpio_buttons(-1, V22RW_2X2_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(v22rw_2x2_gpio_buttons),
				     v22rw_2x2_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_wdt();
	rt305x_register_usb();
}
Ejemplo n.º 19
0
static void __init nw718_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_I2C |
			 RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);

	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(nw718_leds_gpio),
				  nw718_leds_gpio);
	ramips_register_gpio_buttons(-1, NW718_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(nw718_gpio_buttons),
				     nw718_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_wdt();
	rt305x_register_spi(nw718_spi_info, ARRAY_SIZE(nw718_spi_info));
	rt305x_register_usb();
}
static void __init omni_emb_init(void)
{
	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;

	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);

	ramips_register_gpio_leds(-1, ARRAY_SIZE(omni_emb_leds_gpio),
				omni_emb_leds_gpio);
	ramips_register_gpio_buttons(-1, OMNI_EMB_BUTTONS_POLL_INTERVAL,
				ARRAY_SIZE(omni_emb_gpio_buttons),
				omni_emb_gpio_buttons);

	rt305x_register_flash(0, &omni_emb_flash_data);
	rt305x_register_ethernet();
	rt305x_register_wifi();
	rt305x_register_wdt();
	rt305x_register_usb();
}
Ejemplo n.º 21
0
static void __init fonera20n_init(void)
{
	rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);

	rt305x_register_flash(0, &fonera20n_flash_data);

	ramips_register_gpio_leds(-1, ARRAY_SIZE(fonera20n_leds_gpio),
				  fonera20n_leds_gpio);

	ramips_register_gpio_buttons(-1, FONERA20N_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(fonera20n_gpio_buttons),
				     fonera20n_gpio_buttons);

	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
	rt305x_register_ethernet();
	rt305x_register_wifi();
	rt305x_register_wdt();
	rt305x_register_usb();
}
Ejemplo n.º 22
0
static void __init f5d8235v2_init(void)
{
	rt305x_gpio_init((RT305X_GPIO_MODE_GPIO <<
					RT305X_GPIO_MODE_UART0_SHIFT) |
					RT305X_GPIO_MODE_I2C |
					RT305X_GPIO_MODE_SPI |
					RT305X_GPIO_MODE_MDIO);

	rt305x_register_flash(0);

	ramips_register_gpio_leds(-1, ARRAY_SIZE(f5d8235v2_leds_gpio),
						f5d8235v2_leds_gpio);
	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_NONE;
	rt305x_register_ethernet();
	platform_device_register(&f5d8235v2_switch);
	rt305x_register_wifi();
	rt305x_register_wdt();
	rt305x_register_usb();
}
Ejemplo n.º 23
0
static void __init w502u_init(void)
{
	rt305x_gpio_init((RT305X_GPIO_MODE_GPIO <<
			  RT305X_GPIO_MODE_UART0_SHIFT));

	rt305x_flash0_data.nr_parts = ARRAY_SIZE(w502u_partitions);
	rt305x_flash0_data.parts = w502u_partitions;
	rt305x_register_flash(0);

	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_WLLLL;
	rt305x_register_ethernet();
	ramips_register_gpio_leds(-1, ARRAY_SIZE(w502u_leds_gpio),
				  w502u_leds_gpio);
	ramips_register_gpio_buttons(-1, W502U_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(w502u_gpio_buttons),
				     w502u_gpio_buttons);
	rt305x_register_wifi();
	rt305x_register_wdt();
	rt305x_register_usb();
}
Ejemplo n.º 24
0
static void __init bc2_init(void)
{
	rt305x_gpio_init((RT305X_GPIO_MODE_GPIO <<
			  RT305X_GPIO_MODE_UART0_SHIFT) |
			  RT305X_GPIO_MODE_JTAG);

	rt305x_register_flash(0, &bc2_flash_data);

	ramips_register_gpio_leds(-1, ARRAY_SIZE(bc2_leds_gpio),
				  bc2_leds_gpio);

	ramips_register_gpio_buttons(-1, BC2_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(bc2_gpio_buttons),
				     bc2_gpio_buttons);

	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
	rt305x_register_ethernet();
	rt305x_register_wifi();
	rt305x_register_wdt();
	rt305x_register_usb();
}
Ejemplo n.º 25
0
static void __init wl351_init(void)
{
	rt305x_gpio_init((RT305X_GPIO_MODE_GPIO <<
				RT305X_GPIO_MODE_UART0_SHIFT) |
				RT305X_GPIO_MODE_I2C |
				RT305X_GPIO_MODE_SPI |
				RT305X_GPIO_MODE_MDIO);
	rt305x_register_flash(0, &wl351_flash_data);
	ramips_register_gpio_leds(-1, ARRAY_SIZE(wl351_leds_gpio),
						wl351_leds_gpio);
	ramips_register_gpio_buttons(-1, WL351_KEYS_POLL_INTERVAL,
				     ARRAY_SIZE(wl351_gpio_buttons),
				     wl351_gpio_buttons);
	// external rtl8366rb
	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_BYPASS;
	rt305x_esw_data.reg_initval_fct2 = 0x0002500c;
	rt305x_esw_data.reg_initval_fpa2 = 0x1f003fff;
	rt305x_register_ethernet();
	platform_device_register(&wl351_switch);
	rt305x_register_wifi();
	rt305x_register_wdt();
	rt305x_register_usb();
}
Ejemplo n.º 26
0
static int __init carambola_register_gpiodev(void)
{
       static struct resource res = {
               .start = 0xFFFFFFFF,
       };
       struct platform_device *pdev;

       pdev = platform_device_register_simple("GPIODEV", 0, &res, 1);
       if (!pdev) {
               printk(KERN_ERR "carambole: GPIODEV init failed\n");
               return -ENODEV;
       }

       return 0;
}

static struct i2c_gpio_platform_data carambola_i2c_gpio_data = {
	.sda_pin        = 1,
	.scl_pin        = 2,
};

static struct platform_device carambola_i2c_gpio = {
	.name           = "i2c-gpio",
	.id             = 0,
	.dev     = {
		.platform_data  = &carambola_i2c_gpio_data,
	},
};

static struct platform_device *carambola_devices[] __initdata = {
        &carambola_i2c_gpio
};

static struct spi_board_info carambola_spi_info[] = {
	{
		.bus_num	= 0,
		.chip_select	= 0,
		.max_speed_hz	= 0,
		.modalias	= "spidev",
	}
};

static void __init carambola_init(void)
{
	//what you add here means rest of pins will be reserved for other purposes instead of gpios

	//rt305x_gpio_init((RT305X_GPIO_MODE_GPIO_UARTF << RT305X_GPIO_MODE_UART0_SHIFT) |		//use uartf gpios, i2c and spi
	//			RT305X_GPIO_MODE_I2C | RT305X_GPIO_MODE_SPI);

	rt305x_gpio_init((RT305X_GPIO_MODE_GPIO_UARTF << RT305X_GPIO_MODE_UART0_SHIFT) |
				RT305X_GPIO_MODE_I2C);


	carambola_register_gpiodev();
	platform_add_devices(carambola_devices, ARRAY_SIZE(carambola_devices));
	rt305x_register_flash(0, &carambola_flash_data);
	rt305x_register_spi(spiflash_spi_slave_info, ARRAY_SIZE(spiflash_spi_slave_info));

	rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_WLLLL;
	rt305x_register_ethernet();
	rt305x_register_wifi();
	rt305x_register_wdt();
	//rt305x_register_spi(carambola_spi_info, ARRAY_SIZE(carambola_spi_info));


	rt305x_register_usb();
}