[LEDE-DEV] [PATCH] ar71xx: add support for Ubiquiti Litebeam M5
Specification: - SoC: Atheros AR9342 - Flash: 8 MiB - RAM: 64 MiB - UART: 1x UART on PCB - 115200 8N1 - Ethernet: 1 x 100 Mbit with passive PoE (24V/0.2A) Doesn't work: * Flash via TFTP with Uiquiti Uboot Installation via vendor firmware: - upload factory image via webinterface Signed-off-by: Arne Zachlod --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 5 ++ .../linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 3 ++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 ++ .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + .../ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c| 58 ++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/ubnt.mk | 8 ++- 8 files changed, 79 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 80d195301b..4dd5503a58 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -148,6 +148,11 @@ rocket-m-ti) ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link5" "wlan0" "76" "100" "-75" "13" ucidef_set_led_rssi "rssiveryhigh" "RSSIVERYHIGH" "ubnt:green:link4" "wlan0" "76" "100" "-75" "13" ;; +lbe-m5) + ucidef_set_led_wlan "wlan" "WLAN" "ubnt:green:wlan" "phy0tpt" + ucidef_set_led_netdev "lan" "LAN" "ubnt:green:lan" "eth0" + ucidef_set_led_default "sys" "SYS" "ubnt:green:sys" "1" + ;; bxu2000n-2-a1) ucidef_set_led_wlan "wlan" "WLAN" "bhu:green:wlan" "phy0tpt" ;; diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index d83835204a..807a396478 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ar71xx_setup_interfaces() fritz300e|\ gl-usb150|\ hiveap-121|\ + lbe-m5|\ loco-m-xw|\ mr12|\ mr16|\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index ade726f726..d26d3f1e3e 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -103,6 +103,9 @@ get_status_led() { rocket-m-ti) status_led="ubnt:green:link6" ;; + lbe-m5) + status_led="ubnt:green:sys" + ;; bxu2000n-2-a1) status_led="bhu:green:status" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 835ced67f3..2ab2015bc0 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -702,6 +702,9 @@ ar71xx_board_detect() { *"JWAP230") name="jwap230" ;; + *"Litebeam M5"*) + name="lbe-m5" + ;; *"Lima"*) name="lima" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 778faeda5a..836831020a 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -256,6 +256,7 @@ platform_check_image() { hornet-ub-x2|\ jwap230|\ lima|\ + lbe-m5|\ loco-m-xw|\ mzk-w04nu|\ mzk-w300nh|\ diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c index 55cf52d19e..5271aa6516 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -491,6 +492,60 @@ static struct mdio_board_info ubnt_loco_m_xw_mdio_info[] = { }, }; +#define UBNT_LBE_M5_GPIO_LED_WLAN 14 +#define UBNT_LBE_M5_GPIO_LED_LAN 13 +#define UBNT_LBE_M5_GPIO_LED_SYS 16 + +static struct gpio_led ubnt_lbe_m5_leds_gpio[] __initdata = { + { + .name = "ubnt:green:wlan", + .gpio = UBNT_LBE_M5_GPIO_LED_WLAN, + .active_low = 1, + }, { + .name = &qu
[LEDE-DEV] 34c3 CyberCompetenceCenter Infrastructure
Dear Free Infrastructure Enthusiasts, as you know the 34c3 is taking place in Leipzig and the organ team wants to shift more of the planning to the Communities. The orga wants to place all assemblies that have an infrastructure focus into a "CyberCompetenceCenter Infratsructure" :) The years before we have been placed anyways nearby by the assembly-orga ... Since Freifunk had already last year a speakers corner with some sessions, we have been asked to organize a stage for the CyberCompetenceCenter Infrastructure. Our current planning consists on 4 parts we will organize for all Infra-Assemblies or people in common, but we need your support to make it happen: An Exhibition area -> Please provide us Infrastructure pieces, posters or projections or whatever … A stage - We hope to have video streaming -> Please contribute to program with updates regarding your network, talks, quizzes, panels, discussions … -> Also I had the idea to show videos/documentaries in the evening, like from the Argentinians or Sarantaporo -> please send me links (lost them) -> Please invite speakers, you find interesting in terms of community or infrastructure topics, if they are attending the congress … unfortunately we cannot sponsor travel costs -> Please enter your session here: https://wiki.freifunk.net/34c3/Timetable Info desk -> Please bring or send flyers, buttons, stickers, books … if you need a postal address, please send me an email A Chillout area -> Sofas … we will organize that ;) -> We also do need help in terms of decoration and stage heralds (to start video and help speakers) and a DJs for the Infra-Drinkup! -> Join the OrgaMailinglist here: https://lists.freifunk.net/mailman/listinfo/34c3-orga-freifunk.net -> Do spread this mail to your channels or other groups that may be interested in infra topics! Who is attending the 34c3? We look forward to meet with you and collaborate for a gorgeous infrastructure space! Greetings from the Freifunk 34c3 Orgateam ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] ar71xx: add support for Ubiquiti Litebeam M5
Hi John, thanks for the input, the alphabetic ordering part is no problem, will do that later this week. The part I don't quite understand is > please also add the symbol as defined to target/linux/ar71xx/config-4.X > and undefined to target/linux/ar71xx/{nand,mikrotik}/config-default I had a look at these and it seems like there are only symbols in the form of CONFIG_ATH79_xxx in there. These Symbols are then used in target/linux/ar71xx/files/arch/mips/ath79/Makefile as far as I understand, the ATH79_MACH_UBNT_LBE_M5 symbol I introduced doesn't belong in there then (since that doesn't produce a new obj-file while compiling). Can you please tell me if I understood this correctly or if I totally misinterpreted what you wanted? - Arne ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] ar71xx: add support for Ubiquiti Litebeam M5
Specification: - SoC: Atheros AR9342 - Flash: 8 MiB - RAM: 64 MiB - UART: 1x UART on PCB - 115200 8N1 - Ethernet: 1 x 100 Mbit with passive PoE (24V/0.2A) Doesn't work: * Flash via TFTP with Uiquiti Uboot Installation via vendor firmware: - upload factory image via webinterface Signed-off-by: Arne Zachlod --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 5 ++ .../linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 3 ++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 ++ .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + .../ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c| 58 ++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/ubnt.mk | 7 +++ 8 files changed, 79 insertions(+) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index e5baa90db8..79fc8ec5e2 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -147,6 +147,11 @@ rocket-m-xw) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link3" "wlan0" "51" "100" "-50" "13" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link4" "wlan0" "76" "100" "-75" "13" ;; +lbe-m5) + ucidef_set_led_netdev "lan" "LAN" "ubnt:green:lan" "eth0" + ucidef_set_led_wlan "wlan" "WLAN" "ubnt:green:wlan" "phy0tpt" + ucidef_set_led_default "sys" "SYS" "ubnt:green:sys" "1" + ;; rocket-m-ti) ucidef_set_led_rssi "rssiverylow" "RSSIVERYLOW" "ubnt:green:link1" "wlan0" "1" "100" "0" "13" ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:green:link2" "wlan0" "26" "100" "-25" "13" diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index fb61792bf4..86d6ffd91d 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -78,6 +78,7 @@ ar71xx_setup_interfaces() fritz300e|\ gl-usb150|\ hiveap-121|\ + lbe-m5|\ loco-m-xw|\ mr12|\ mr16|\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 6cbb3576d8..f37541c75f 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -103,6 +103,9 @@ get_status_led() { rocket-m-xw) status_led="ubnt:green:link4" ;; + lbe-m5) + status_led="ubnt:green:sys" + ;; rocket-m-ti) status_led="ubnt:green:link6" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index b5440230a5..00a4acc6e0 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -711,6 +711,9 @@ ar71xx_board_detect() { *"Lima"*) name="lima" ;; + *"Litebeam M5"*) + name="lbe-m5" + ;; *"Loco M XW") name="loco-m-xw" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index ecf6820a2b..4e839f12c1 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -248,6 +248,7 @@ platform_check_image() { hiwifi-hc6361|\ hornet-ub-x2|\ jwap230|\ + lbe-m5|\ lima|\ loco-m-xw|\ mzk-w04nu|\ diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c index 55cf52d19e..8afb3ad054 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -503,6 +504,60 @@ static void __init ubnt_loco_m_xw_setup(void) ath79_register_eth(0); } +#define UBNT_LBE_M5_GPIO_LED_LAN 13 +#define UBNT_LBE_M5_GPIO_LED_WLAN 14 +#define UBNT_LBE_M5_GPIO_LED_SYS 16 + +static struct gpio_led ubnt_lbe_m5_leds_gpio[] __initdata = { + {
Re: [LEDE-DEV] [PATCH] ar71xx: add support for Ubiquiti Litebeam M5
Hi John, I ordered the device between the already existing bullet and the rocket-ti. To me this looks like the order already in place and the right spot because it is alphabetical for the manufacturer. In case that this is not the right thing to do maybe we should refactor the whole file, because at the moment it looks like its ordered per manufacturer and then alphabetical for that manufacturer. Bye Arne On 01/17/2018 10:06 AM, John Crispin wrote: > > > On 16/01/18 21:43, Arne Zachlod wrote: >> Specification: >> - SoC: Atheros AR9342 >> - Flash: 8 MiB >> - RAM: 64 MiB >> - UART: 1x UART on PCB - 115200 8N1 >> - Ethernet: 1 x 100 Mbit with passive PoE (24V/0.2A) >> >> Doesn't work: >> * Flash via TFTP with Uiquiti Uboot >> >> Installation via vendor firmware: >> - upload factory image via webinterface >> >> Signed-off-by: Arne Zachlod > > Hi Arne, > > comments inline ... > >> --- >> target/linux/ar71xx/base-files/etc/board.d/01_leds | 5 ++ >> .../linux/ar71xx/base-files/etc/board.d/02_network | 1 + >> target/linux/ar71xx/base-files/etc/diag.sh | 3 ++ >> target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 ++ >> .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + >> .../ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c | 58 >> ++ >> .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + >> target/linux/ar71xx/image/ubnt.mk | 7 +++ >> 8 files changed, 79 insertions(+) >> >> diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds >> b/target/linux/ar71xx/base-files/etc/board.d/01_leds >> index e5baa90db8..79fc8ec5e2 100755 >> --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds >> +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds >> @@ -147,6 +147,11 @@ rocket-m-xw) >> ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" >> "ubnt:green:link3" "wlan0" "51" "100" "-50" "13" >> ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link4" >> "wlan0" "76" "100" "-75" "13" >> ;; >> +lbe-m5) >> + ucidef_set_led_netdev "lan" "LAN" "ubnt:green:lan" "eth0" >> + ucidef_set_led_wlan "wlan" "WLAN" "ubnt:green:wlan" "phy0tpt" >> + ucidef_set_led_default "sys" "SYS" "ubnt:green:sys" "1" >> + ;; > > alphabetical ordering please > >> rocket-m-ti) >> ucidef_set_led_rssi "rssiverylow" "RSSIVERYLOW" >> "ubnt:green:link1" "wlan0" "1" "100" "0" "13" >> ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:green:link2" >> "wlan0" "26" "100" "-25" "13" >> diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network >> b/target/linux/ar71xx/base-files/etc/board.d/02_network >> index fb61792bf4..86d6ffd91d 100755 >> --- a/target/linux/ar71xx/base-files/etc/board.d/02_network >> +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network >> @@ -78,6 +78,7 @@ ar71xx_setup_interfaces() >> fritz300e|\ >> gl-usb150|\ >> hiveap-121|\ >> + lbe-m5|\ >> loco-m-xw|\ >> mr12|\ >> mr16|\ >> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh >> b/target/linux/ar71xx/base-files/etc/diag.sh >> index 6cbb3576d8..f37541c75f 100644 >> --- a/target/linux/ar71xx/base-files/etc/diag.sh >> +++ b/target/linux/ar71xx/base-files/etc/diag.sh >> @@ -103,6 +103,9 @@ get_status_led() { >> rocket-m-xw) >> status_led="ubnt:green:link4" >> ;; >> + lbe-m5) >> + status_led="ubnt:green:sys" >> + ;; > > > alphabetical ordering please >> rocket-m-ti) >> status_led="ubnt:green:link6" >> ;; >> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh >> b/target/linux/ar71xx/base-files/lib/ar71xx.sh >> index b5440230a5..00a4acc6e0 100755 >> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh >> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh >> @@ -711,6 +711,9 @@ ar71xx_board_detect() { >> *"Lima"*) >> name="lima" >> ;; >> + *"Litebeam M5"*) &g
[LEDE-DEV] [PATCH] ar71xx: Orders the names of the devices alphabetically.
Signed-off-by: Arne Zachlod --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 236 ++--- .../ar71xx/base-files/etc/board.d/03_gpio_switches | 12 +- target/linux/ar71xx/base-files/etc/diag.sh | 40 ++-- 3 files changed, 144 insertions(+), 144 deletions(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index e5baa90db8..150ef91b48 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -59,6 +59,27 @@ sc450) ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt" ;; archer-c25-v1|\ +archer-c58-v1|\ +archer-c59-v1|\ +archer-c60-v1) + ucidef_set_led_switch "lan" "LAN" "$board:green:lan" "switch0" "0x1E" + ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0" + ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan2g" "phy1tpt" + ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt" + + case "$board" in + archer-c59-v1) + ucidef_set_led_usbdev "usb" "USB" "$board:green:usb" "1-1" + ;; + esac + ;; +archer-c5|\ +archer-c7) + ucidef_set_led_usbdev "usb1" "USB1" "tp-link:green:usb1" "1-1" + ucidef_set_led_usbdev "usb2" "USB2" "tp-link:green:usb2" "2-1" + ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:blue:wlan2g" "phy1tpt" + ucidef_set_led_wlan "wlan5g" "WLAN5G" "tp-link:blue:wlan5g" "phy0tpt" + ;; archer-c7-v4) ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0" ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan2g" "phy1tpt" @@ -74,20 +95,6 @@ archer-c7-v4) ;; esac ;; -archer-c58-v1|\ -archer-c59-v1|\ -archer-c60-v1) - ucidef_set_led_switch "lan" "LAN" "$board:green:lan" "switch0" "0x1E" - ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0" - ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan2g" "phy1tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt" - - case "$board" in - archer-c59-v1) - ucidef_set_led_usbdev "usb" "USB" "$board:green:usb" "1-1" - ;; - esac - ;; arduino-yun) ucidef_set_led_wlan "wlan" "WLAN" "arduino:blue:wlan" "phy0tpt" ucidef_set_led_usbdev "usb" "USB" "arduino:white:usb" "1-1.1" @@ -147,22 +154,9 @@ rocket-m-xw) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link3" "wlan0" "51" "100" "-50" "13" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link4" "wlan0" "76" "100" "-75" "13" ;; -rocket-m-ti) - ucidef_set_led_rssi "rssiverylow" "RSSIVERYLOW" "ubnt:green:link1" "wlan0" "1" "100" "0" "13" - ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:green:link2" "wlan0" "26" "100" "-25" "13" - ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:green:link3" "wlan0" "51" "100" "-50" "13" - ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link4" "wlan0" "76" "100" "-75" "13" - ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link5" "wlan0" "76" "100" "-75" "13" - ucidef_set_led_rssi "rssiveryhigh" "RSSIVERYHIGH" "ubnt:green:link4" "wlan0" "76" "100" "-75" "13" - ;; bxu2000n-2-a1) ucidef_set_led_wlan "wlan" "WLAN" "bhu:green:wlan" "phy0tpt" ;; -cap324) - ucidef_set_led_netdev
[LEDE-DEV] [PATCH v2] ar71xx: add support for Ubiquiti Litebeam M5
Specification: - SoC: Atheros AR9342 - Flash: 8 MiB - RAM: 64 MiB - UART: 1x UART on PCB - 115200 8N1 - Ethernet: 1 x 100 Mbit with passive PoE (24V/0.2A) Doesn't work: * Flash via TFTP with Uiquiti Uboot Installation via vendor firmware: - upload factory image via webinterface Signed-off-by: Arne Zachlod --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 4 ++ .../linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 3 ++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 ++ .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + .../ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c| 58 ++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/ubnt.mk | 7 +++ 8 files changed, 78 insertions(+) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 150ef91b48..ebdfb142d4 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -363,6 +363,10 @@ hornet-ub-x2) ucidef_set_led_wlan "wlan" "WLAN" "alfa:blue:wlan" "phy0tpt" ucidef_set_led_usbdev "usb" "USB" "alfa:blue:usb" "1-1" ;; +lbe-m5) + ucidef_set_led_netdev "lan" "LAN" "ubnt:green:lan" "eth0" + ucidef_set_led_wlan "wlan" "WLAN" "ubnt:green:wlan" "phy0tpt" + ;; mc-mac1200r) ucidef_set_led_wlan "wlan2g" "WLAN2G" "mercury:green:wlan2g" "phy1tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "mercury:green:wlan5g" "phy0tpt" diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index fb61792bf4..86d6ffd91d 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -78,6 +78,7 @@ ar71xx_setup_interfaces() fritz300e|\ gl-usb150|\ hiveap-121|\ + lbe-m5|\ loco-m-xw|\ mr12|\ mr16|\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 5c60ebd6a8..5042e7a008 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -236,6 +236,9 @@ get_status_led() { jwap230) status_led="$board:green:led1" ;; + lbe-m5) + status_led="ubnt:green:sys" + ;; ls-sr71) status_led="ubnt:green:d22" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index b5440230a5..00a4acc6e0 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -711,6 +711,9 @@ ar71xx_board_detect() { *"Lima"*) name="lima" ;; + *"Litebeam M5"*) + name="lbe-m5" + ;; *"Loco M XW") name="loco-m-xw" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index ecf6820a2b..4e839f12c1 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -248,6 +248,7 @@ platform_check_image() { hiwifi-hc6361|\ hornet-ub-x2|\ jwap230|\ + lbe-m5|\ lima|\ loco-m-xw|\ mzk-w04nu|\ diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c index 55cf52d19e..8afb3ad054 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -503,6 +504,60 @@ static void __init ubnt_loco_m_xw_setup(void) ath79_register_eth(0); } +#define UBNT_LBE_M5_GPIO_LED_LAN 13 +#define UBNT_LBE_M5_GPIO_LED_WLAN 14 +#define UBNT_LBE_M5_GPIO_LED_SYS 16 + +static struct gpio_led ubnt_lbe_m5_leds_gpio[] __initdata = { + { + .name = "ubnt:green:lan", + .gpio = UBNT_LBE_M5_GPIO_LED_LAN, + .active_low = 1, + }, { + .name = "ubnt:green:wlan", + .gpio = UBNT_LBE_M5_GPIO_LED_WLAN, + .active_low = 1, + }, { + .name = "ubnt
[LEDE-DEV] [PATCH v3] ar71xx: add support for Ubiquiti Litebeam M5
Specification: - SoC: Atheros AR9342 - Flash: 8 MiB - RAM: 64 MiB - UART: 1x UART on PCB - 115200 8N1 - Ethernet: 1 x 100 Mbit with passive PoE (24V/0.2A) Doesn't work: * Flash via TFTP with Uiquiti Uboot Installation via vendor firmware: - upload factory image via webinterface Signed-off-by: Arne Zachlod --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 4 ++ .../linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 3 ++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 ++ .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + .../ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c| 58 ++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/generic-ubnt.mk | 7 +++ 8 files changed, 78 insertions(+) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 00954dfaa4..7a8ed9afe5 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -408,6 +408,10 @@ hornet-ub-x2) lan-turtle) ucidef_set_led_netdev "wan" "WAN" "$board:orange:system" "eth1" ;; +lbe-m5) + ucidef_set_led_netdev "lan" "LAN" "ubnt:green:lan" "eth0" + ucidef_set_led_wlan "wlan" "WLAN" "ubnt:green:wlan" "phy0tpt" + ;; mc-mac1200r) ucidef_set_led_wlan "wlan2g" "WLAN2G" "mercury:green:wlan2g" "phy1tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "mercury:green:wlan5g" "phy0tpt" diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 8f492cbf02..560112756a 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -82,6 +82,7 @@ ar71xx_setup_interfaces() fritz300e|\ gl-usb150|\ hiveap-121|\ + lbe-m5|\ loco-m-xw|\ mr12|\ mr16|\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 6b53ad03c7..6ea4fb085c 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -260,6 +260,9 @@ get_status_led() { lan-turtle) status_led="$board:orange:system" ;; + lbe-m5) + status_led="ubnt:green:sys" + ;; ls-sr71) status_led="ubnt:green:d22" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 01ac29601d..a7c2ccb52e 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -741,6 +741,9 @@ ar71xx_board_detect() { *"Lima"*) name="lima" ;; + *"Litebeam M5"*) + name="lbe-m5" + ;; *"Loco M XW") name="loco-m-xw" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 7738db33a7..2b15dec5be 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -256,6 +256,7 @@ platform_check_image() { hiwifi-hc6361|\ hornet-ub-x2|\ jwap230|\ + lbe-m5|\ lima|\ loco-m-xw|\ mzk-w04nu|\ diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c index 55cf52d19e..8afb3ad054 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -503,6 +504,60 @@ static void __init ubnt_loco_m_xw_setup(void) ath79_register_eth(0); } +#define UBNT_LBE_M5_GPIO_LED_LAN 13 +#define UBNT_LBE_M5_GPIO_LED_WLAN 14 +#define UBNT_LBE_M5_GPIO_LED_SYS 16 + +static struct gpio_led ubnt_lbe_m5_leds_gpio[] __initdata = { + { + .name = "ubnt:green:lan", + .gpio = UBNT_LBE_M5_GPIO_LED_LAN, + .active_low = 1, + }, { + .name = "ubnt:green:wlan", + .gpio = UBNT_LBE_M5_GPIO_LED_WLAN, + .active_low = 1, + }, { + .name = "ubnt:green:sys", + .gpio = UBNT_LBE_M5_GPIO_LED_SYS, +
[LEDE-DEV] [PATCH] ar71xx: mach-ubnt-xm.c convert patches to mach file
Signed-off-by: Arne Zachlod --- .../ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c| 700 + .../patches-4.4/607-MIPS-ath79-ubnt-xm-fixes.patch | 89 --- .../608-MIPS-ath79-ubnt-xm-add-more-boards.patch | 623 +- ...IPS-ath79-UBNT-add-airGateway-pro-support.patch | 62 -- 4 files changed, 701 insertions(+), 773 deletions(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c delete mode 100644 target/linux/ar71xx/patches-4.4/610-MIPS-ath79-UBNT-add-airGateway-pro-support.patch diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c new file mode 100644 index 000..bb5b28f --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c @@ -0,0 +1,700 @@ +/* + * Ubiquiti Networks XM (rev 1.0) board support + * + * Copyright (C) 2011 René Bolldorf + * + * Derived from: mach-pb44.c + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "common.h" +#include "dev-ap9x-pci.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" + +#define UBNT_XM_GPIO_LED_L10 +#define UBNT_XM_GPIO_LED_L21 +#define UBNT_XM_GPIO_LED_L311 +#define UBNT_XM_GPIO_LED_L47 + +#define UBNT_XM_GPIO_BTN_RESET 12 + +#define UBNT_XM_KEYS_POLL_INTERVAL 20 +#define UBNT_XM_KEYS_DEBOUNCE_INTERVAL (3 * UBNT_XM_KEYS_POLL_INTERVAL) + +#define UBNT_XM_EEPROM_ADDR0x1fff1000 + +static struct gpio_led ubnt_xm_leds_gpio[] __initdata = { + { + .name = "ubnt:red:link1", + .gpio = UBNT_XM_GPIO_LED_L1, + .active_low = 0, + }, { + .name = "ubnt:orange:link2", + .gpio = UBNT_XM_GPIO_LED_L2, + .active_low = 0, + }, { + .name = "ubnt:green:link3", + .gpio = UBNT_XM_GPIO_LED_L3, + .active_low = 0, + }, { + .name = "ubnt:green:link4", + .gpio = UBNT_XM_GPIO_LED_L4, + .active_low = 0, + }, +}; + +static struct gpio_keys_button ubnt_xm_gpio_keys[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = UBNT_XM_KEYS_DEBOUNCE_INTERVAL, + .gpio = UBNT_XM_GPIO_BTN_RESET, + .active_low = 1, + } +}; + +#define UBNT_M_WAN_PHYMASK BIT(4) + +static void __init ubnt_xm_init(void) +{ + u8 *eeprom = (u8 *) KSEG1ADDR(UBNT_XM_EEPROM_ADDR); + u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff); + u8 *mac2 = (u8 *) KSEG1ADDR(0x1fff + ETH_ALEN); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_xm_leds_gpio), +ubnt_xm_leds_gpio); + + ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL, + ARRAY_SIZE(ubnt_xm_gpio_keys), + ubnt_xm_gpio_keys); + + ath79_register_m25p80(NULL); + ap91_pci_init(eeprom, NULL); + + ath79_register_mdio(0, ~UBNT_M_WAN_PHYMASK); + ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0); + ath79_init_mac(ath79_eth1_data.mac_addr, mac2, 0); + ath79_register_eth(0); +} + +MIPS_MACHINE(ATH79_MACH_UBNT_XM, +"UBNT-XM", +"Ubiquiti Networks XM (rev 1.0) board", +ubnt_xm_init); + +MIPS_MACHINE(ATH79_MACH_UBNT_BULLET_M, "UBNT-BM", "Ubiquiti Bullet M", +ubnt_xm_init); + +static void __init ubnt_rocket_m_setup(void) +{ + ubnt_xm_init(); + ath79_register_usb(); +} + +MIPS_MACHINE(ATH79_MACH_UBNT_ROCKET_M, "UBNT-RM", "Ubiquiti Rocket M", +ubnt_rocket_m_setup); + +static void __init ubnt_nano_m_setup(void) +{ + ubnt_xm_init(); + ath79_register_eth(1); +} + +MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M, "UBNT-NM", "Ubiquiti Nanostation M", +ubnt_nano_m_setup); + +static struct gpio_led ubnt_airrouter_leds_gpio[] __initdata = { + { + .name = "ubnt:green:globe", + .gpio = 0, + .active_low