summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-11-18 10:18:01 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-11-18 10:18:01 +0000
commitd44d954dec6c9c2647a5d66e9d049eeb02367bc7 (patch)
tree383073e5be9697d82f7eab3ba9556dfeedc4e3ea /target
parentd62bddc620b372446cf437c228d24b17c34ad0f2 (diff)
downloadmtk-20170518-d44d954dec6c9c2647a5d66e9d049eeb02367bc7.zip
mtk-20170518-d44d954dec6c9c2647a5d66e9d049eeb02367bc7.tar.gz
mtk-20170518-d44d954dec6c9c2647a5d66e9d049eeb02367bc7.tar.bz2
ar71xx: add kernel support for the RB435G board
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34239
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-rb4xx.c29
-rw-r--r--target/linux/ar71xx/patches-3.3/615-MIPS-ath79-RB435G-support.patch10
-rw-r--r--target/linux/ar71xx/patches-3.6/615-MIPS-ath79-RB435G-support.patch10
3 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb4xx.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb4xx.c
index 0699232..3f02be7 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb4xx.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb4xx.c
@@ -305,6 +305,35 @@ static void __init rb433u_setup(void)
MIPS_MACHINE(ATH79_MACH_RB_433U, "433U", "MikroTik RouterBOARD 433UAH",
rb433u_setup);
+static void __init rb435g_setup(void)
+{
+ rb4xx_generic_setup();
+
+ spi_register_board_info(rb4xx_microsd_info,
+ ARRAY_SIZE(rb4xx_microsd_info));
+
+ ath79_register_mdio(0, ~RB433_MDIO_PHYMASK);
+
+ ath79_init_mac(ath79_eth0_data.mac_addr, ath79_mac_base, 1);
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+ ath79_eth0_data.phy_mask = RB433_LAN_PHYMASK;
+
+ ath79_init_mac(ath79_eth1_data.mac_addr, ath79_mac_base, 0);
+ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+ ath79_eth1_data.phy_mask = RB433_WAN_PHYMASK;
+
+ ath79_register_eth(1);
+ ath79_register_eth(0);
+
+ ath79_pci_set_irq_map(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs);
+ ath79_register_pci();
+
+ ath79_register_usb();
+}
+
+MIPS_MACHINE(ATH79_MACH_RB_435G, "435G", "MikroTik RouterBOARD 435G",
+ rb435g_setup);
+
#define RB450_LAN_PHYMASK BIT(0)
#define RB450_WAN_PHYMASK BIT(4)
#define RB450_MDIO_PHYMASK (RB450_LAN_PHYMASK | RB450_WAN_PHYMASK)
diff --git a/target/linux/ar71xx/patches-3.3/615-MIPS-ath79-RB435G-support.patch b/target/linux/ar71xx/patches-3.3/615-MIPS-ath79-RB435G-support.patch
new file mode 100644
index 0000000..5921417
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.3/615-MIPS-ath79-RB435G-support.patch
@@ -0,0 +1,10 @@
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
+@@ -56,6 +56,7 @@ enum ath79_mach_type {
+ ATH79_MACH_RB_411U, /* MikroTik RouterBOARD 411U */
+ ATH79_MACH_RB_433, /* MikroTik RouterBOARD 433/433AH */
+ ATH79_MACH_RB_433U, /* MikroTik RouterBOARD 433UAH */
++ ATH79_MACH_RB_435G, /* MikroTik RouterBOARD 435G */
+ ATH79_MACH_RB_450G, /* MikroTik RouterBOARD 450G */
+ ATH79_MACH_RB_450, /* MikroTik RouterBOARD 450 */
+ ATH79_MACH_RB_493, /* Mikrotik RouterBOARD 493/493AH */
diff --git a/target/linux/ar71xx/patches-3.6/615-MIPS-ath79-RB435G-support.patch b/target/linux/ar71xx/patches-3.6/615-MIPS-ath79-RB435G-support.patch
new file mode 100644
index 0000000..5921417
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.6/615-MIPS-ath79-RB435G-support.patch
@@ -0,0 +1,10 @@
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
+@@ -56,6 +56,7 @@ enum ath79_mach_type {
+ ATH79_MACH_RB_411U, /* MikroTik RouterBOARD 411U */
+ ATH79_MACH_RB_433, /* MikroTik RouterBOARD 433/433AH */
+ ATH79_MACH_RB_433U, /* MikroTik RouterBOARD 433UAH */
++ ATH79_MACH_RB_435G, /* MikroTik RouterBOARD 435G */
+ ATH79_MACH_RB_450G, /* MikroTik RouterBOARD 450G */
+ ATH79_MACH_RB_450, /* MikroTik RouterBOARD 450 */
+ ATH79_MACH_RB_493, /* Mikrotik RouterBOARD 493/493AH */