target/ar71xx: add RouterBoard 711 support
authoracoul <alex@ozo.com>
Tue, 15 Dec 2015 12:30:52 +0000 (14:30 +0200)
committeracoul <alex@ozo.com>
Thu, 31 Mar 2016 05:28:36 +0000 (08:28 +0300)
target/linux/ar71xx/patches-4.1/701-MIPS-ath79-add-routerboard-detection.patch
target/linux/ar71xx/patches-4.1/702-MIPS-ath79-add-rb711.patch [new file with mode: 0644]

index 8dee006c800f09cb40a2b82291f3c7f61860590e..bb6e81919d29bbe5e8787d96ebba3f463855476c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/prom.c
 +++ b/arch/mips/ath79/prom.c
-@@ -136,6 +136,13 @@ void __init prom_init(void)
+@@ -136,6 +136,14 @@ void __init prom_init(void)
                initrd_end = initrd_start + fw_getenvl("initrd_size");
        }
  #endif
@@ -8,6 +8,7 @@
 +      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");
diff --git a/target/linux/ar71xx/patches-4.1/702-MIPS-ath79-add-rb711.patch b/target/linux/ar71xx/patches-4.1/702-MIPS-ath79-add-rb711.patch
new file mode 100644 (file)
index 0000000..6f56781
--- /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
+@@ -123,6 +123,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 */