target/ar71xx: add rb711 platform support on 3.18 linux kernel
authoracoul <alex@ozo.com>
Wed, 30 Dec 2015 16:42:31 +0000 (18:42 +0200)
committeracoul <alex@ozo.com>
Thu, 31 Mar 2016 05:28:36 +0000 (08:28 +0300)
target/linux/ar71xx/patches-3.18/701-MIPS-ath79-add-routerboard-detection.patch [new file with mode: 0644]
target/linux/ar71xx/patches-3.18/702-MIPS-ath79-add-rb711.patch [new file with mode: 0644]

diff --git a/target/linux/ar71xx/patches-3.18/701-MIPS-ath79-add-routerboard-detection.patch b/target/linux/ar71xx/patches-3.18/701-MIPS-ath79-add-routerboard-detection.patch
new file mode 100644 (file)
index 0000000..aba3df4
--- /dev/null
@@ -0,0 +1,16 @@
+--- a/arch/mips/ath79/prom.c
++++ b/arch/mips/ath79/prom.c
+@@ -180,6 +180,13 @@ void __init prom_init(void)
+                       ath79_prom_append_cmdline("board", env);
+               }
+       }
++      if (strstr(arcs_cmdline, "board=750Gr3") ||
++          strstr(arcs_cmdline, "board=951G") ||
++          strstr(arcs_cmdline, "board=2011L") ||
++          strstr(arcs_cmdline, "board=711") ||
++          strstr(arcs_cmdline, "board=711Gr100") ||
++          strstr(arcs_cmdline, "board=922gs"))
++              ath79_prom_append_cmdline("console", "ttyS0,115200");
+ }
+ void __init prom_free_prom_memory(void)
diff --git a/target/linux/ar71xx/patches-3.18/702-MIPS-ath79-add-rb711.patch b/target/linux/ar71xx/patches-3.18/702-MIPS-ath79-add-rb711.patch
new file mode 100644 (file)
index 0000000..0d0ac62
--- /dev/null
@@ -0,0 +1,45 @@
+--- a/arch/mips/ath79/mach-rb750.c
++++ b/arch/mips/ath79/mach-rb750.c
+@@ -325,6 +325,32 @@ static void __init rb751_wlan_setup(void
+       ap91_pci_init(NULL, mac);
+ }
++static void __init rb711_setup(void)
++{
++      ath79_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
++                                  AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
++                                  AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
++                                  AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
++                                  AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
++
++      ath79_init_mac(ath79_eth0_data.mac_addr, ath79_mac_base, 0);
++
++      ath79_register_mdio(0, 0x0);
++
++      ath79_register_eth(0);
++
++      rb750_nand_data.nce_line = RB750_NAND_NCE;
++      rb750_nand_data.enable_pins = rb750_nand_enable_pins;
++      rb750_nand_data.disable_pins = rb750_nand_disable_pins;
++      rb750_nand_data.latch_change = rb750_latch_change;
++      platform_device_register(&rb750_nand_device);
++
++      rb751_wlan_setup();
++}
++
++MIPS_MACHINE(ATH79_MACH_RB_711, "711", "MikroTik RouterBOARD 711",
++             rb711_setup);
++
+ static void __init rb751_setup(void)
+ {
+       rb750_setup();
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
+@@ -127,6 +127,7 @@ enum ath79_mach_type {
+       ATH79_MACH_RB_493,              /* Mikrotik RouterBOARD 493/493AH */
+       ATH79_MACH_RB_493G,             /* Mikrotik RouterBOARD 493G */
+       ATH79_MACH_RB_711GR100,         /* Mikrotik RouterBOARD 911/912 boards */
++      ATH79_MACH_RB_711,              /* MikroTik RouterBOARD 711 */
+       ATH79_MACH_RB_750,              /* MikroTik RouterBOARD 750 */
+       ATH79_MACH_RB_750G_R3,          /* MikroTik RouterBOARD 750GL */
+       ATH79_MACH_RB_751,              /* MikroTik RouterBOARD 751 */