summaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx/patches-4.4
diff options
context:
space:
mode:
authorChris Blake <chrisrblake93@gmail.com>2016-07-20 15:44:51 +0200
committerFelix Fietkau <nbd@nbd.name>2016-07-22 09:48:12 +0200
commita57d6e2d47688cfa392d6ea7f36ae6f9d84affc5 (patch)
treed2e04f9253dd23c513a662eed52c37ee959b5729 /target/linux/apm821xx/patches-4.4
parent3827ce2c3dc1849033d6de52e58fcbccc7ed74a2 (diff)
downloadmaster-31e0f0ae-a57d6e2d47688cfa392d6ea7f36ae6f9d84affc5.tar.gz
master-31e0f0ae-a57d6e2d47688cfa392d6ea7f36ae6f9d84affc5.tar.bz2
master-31e0f0ae-a57d6e2d47688cfa392d6ea7f36ae6f9d84affc5.zip
apm821xx: add support for the Cisco Meraki MR24
This patch adds support for the Cisco Meraki MR24 Access point to the apm821xx target. Board: MR24 - Meraki MR24 Cloud Managed Access Point CPU: APM82181 SoC 800 MHz (PLB=200 OPB=100 EBC=100) Flash size: 32MiB RAM Size: 128MiB Wireless: Atheros AR9380 5.0GHz + Atheros AR9380 2.4GHz Ethernet ports: 1x Gigabit Atheros AR8035 WARNING: The serial port needs a TTL/RS-232 v3.3 level converter! For flashing instructions, visit: <https://github.com/riptidewave93/Openwrt-MR24/blob/master/README.md#flashing> Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
Diffstat (limited to 'target/linux/apm821xx/patches-4.4')
-rw-r--r--target/linux/apm821xx/patches-4.4/002-powerpc_ibm_phy_add_ar8035.patch62
-rw-r--r--target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch31
2 files changed, 93 insertions, 0 deletions
diff --git a/target/linux/apm821xx/patches-4.4/002-powerpc_ibm_phy_add_ar8035.patch b/target/linux/apm821xx/patches-4.4/002-powerpc_ibm_phy_add_ar8035.patch
new file mode 100644
index 0000000000..b7316e15b3
--- /dev/null
+++ b/target/linux/apm821xx/patches-4.4/002-powerpc_ibm_phy_add_ar8035.patch
@@ -0,0 +1,62 @@
+From 0c13957a43a90b1522eb616f3c9967ec44e4da1d Mon Sep 17 00:00:00 2001
+From: Christian Lamparter <chunkeey@googlemail.com>
+Date: Tue, 3 May 2016 13:58:24 +0200
+Subject: [PATCH] drivers: net: emac: add Atheros AR8035 phy initialization
+ code
+To: netdev@vger.kernel.org
+
+This patch adds the phy initialization code for Qualcomm
+Atheros AR8035 phy. This configuration is found in the
+Cisco Meraki MR24.
+
+Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
+---
+ drivers/net/ethernet/ibm/emac/phy.c | 26 ++++++++++++++++++++++++++
+ 1 file changed, 26 insertions(+)
+
+diff --git a/drivers/net/ethernet/ibm/emac/phy.c b/drivers/net/ethernet/ibm/emac/phy.c
+index d3b9d10..5b88cc6 100644
+--- a/drivers/net/ethernet/ibm/emac/phy.c
++++ b/drivers/net/ethernet/ibm/emac/phy.c
+@@ -470,12 +470,38 @@ static struct mii_phy_def m88e1112_phy_def = {
+ .ops = &m88e1112_phy_ops,
+ };
+
++static int ar8035_init(struct mii_phy *phy)
++{
++ phy_write(phy, 0x1d, 0x5); /* Address debug register 5 */
++ phy_write(phy, 0x1e, 0x2d47); /* Value copied from u-boot */
++ phy_write(phy, 0x1d, 0xb); /* Address hib ctrl */
++ phy_write(phy, 0x1e, 0xbc20); /* Value copied from u-boot */
++
++ return 0;
++}
++
++static struct mii_phy_ops ar8035_phy_ops = {
++ .init = ar8035_init,
++ .setup_aneg = genmii_setup_aneg,
++ .setup_forced = genmii_setup_forced,
++ .poll_link = genmii_poll_link,
++ .read_link = genmii_read_link,
++};
++
++static struct mii_phy_def ar8035_phy_def = {
++ .phy_id = 0x004dd070,
++ .phy_id_mask = 0xfffffff0,
++ .name = "Atheros 8035 Gigabit Ethernet",
++ .ops = &ar8035_phy_ops,
++};
++
+ static struct mii_phy_def *mii_phy_table[] = {
+ &et1011c_phy_def,
+ &cis8201_phy_def,
+ &bcm5248_phy_def,
+ &m88e1111_phy_def,
+ &m88e1112_phy_def,
++ &ar8035_phy_def,
+ &genmii_phy_def,
+ NULL
+ };
+--
+2.8.1
+
diff --git a/target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch b/target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch
new file mode 100644
index 0000000000..45892f272f
--- /dev/null
+++ b/target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch
@@ -0,0 +1,31 @@
+--- a/arch/powerpc/platforms/44x/Kconfig
++++ b/arch/powerpc/platforms/44x/Kconfig
+@@ -40,6 +40,19 @@ config EBONY
+ help
+ This option enables support for the IBM PPC440GP evaluation board.
+
++config IKAREM
++ bool "Ikarem"
++ depends on 44x
++ default n
++ select PPC44x_SIMPLE
++ select APM821xx
++ select PCI_MSI
++ select PPC4xx_MSI
++ select PPC4xx_PCI_EXPRESS
++ select IBM_EMAC_RGMII
++ help
++ This option enables support for the Cisco Meraki MR24 (Ikarem) Access Point.
++
+ config SAM440EP
+ bool "Sam440ep"
+ depends on 44x
+--- a/arch/powerpc/platforms/44x/ppc44x_simple.c
++++ b/arch/powerpc/platforms/44x/ppc44x_simple.c
+@@ -62,6 +62,7 @@ static char *board[] __initdata = {
+ "amcc,sequoia",
+ "amcc,taishan",
+ "amcc,yosemite",
++ "meraki,ikarem",
+ "mosaixtech,icon"
+ };