initial support of the new sysmocom SOB-AP2 (1xPD/3xPSE)

Port0 is uplink/PD port (IDC)
Port1-3 are downink/PSE ports (IDC)
Port4 is admin port (RJ45)

* we only have 8 MByte flash
* we use the hardware LEDs for switch ports 1-5

The image boots and is able to establish links on both eth0 and eth1.
However, the LED support is not yet working as expected.
This commit is contained in:
Harald Welte 2015-02-21 08:53:43 +01:00
parent 59f13eb186
commit e67d0c78a6
5 changed files with 45 additions and 2 deletions

View File

@ -212,6 +212,10 @@ sysmocom-sob-jb02)
ucidef_set_led_wlan "wlan" "WLAN" "sysmocom:orange:wlan" "phy0tpt"
;;
sysmocom-sob-ap2)
ucidef_set_led_wlan "wlan" "WLAN" "sysmocom:red:wlan" "phy0tpt"
;;
tew-712br)
ucidef_set_led_netdev "wan" "WAN" "trendnet:green:wan" "eth1"
ucidef_set_led_switch "lan1" "LAN1" "trendnet:green:lan1" "switch0" "0x02"

View File

@ -748,6 +748,9 @@ ar71xx_board_detect() {
*"sysmocom SOB-AP1")
name="sysmocom-sob-ap1"
;;
*"sysmocom SOB-AP2")
name="sysmocom-sob-ap2"
;;
*"sysmocom SOB-JB02")
name="sysmocom-sob-jb02"
;;

View File

@ -45,6 +45,14 @@ static struct gpio_led sysmocom_sob_ap1_leds_gpio[] __initdata = {
}
};
static struct gpio_led sysmocom_sob_ap2_leds_gpio[] __initdata = {
{
.name = "sysmocom:red:wlan",
.gpio = SYSMOCOM_GPIO_LED_WLAN,
.active_low = 0,
}
};
static struct gpio_led sysmocom_sob_jb02_leds_gpio[] __initdata = {
{
.name = "sysmocom:orange:wlan",
@ -91,6 +99,28 @@ static void __init sysmocom_sob_ap1_setup(void)
ath79_register_usb();
}
static void __init sysmocom_sob_ap2_setup(void)
{
u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
sysmocom_common_setup();
/* RJ45 port is separate WAN port / MAC, not switched with other ports */
ath79_setup_ar933x_phy4_switch(true, true);
ath79_init_mac(ath79_eth1_data.mac_addr, art + SYSMOCOM_MAC1_OFFSET, 1);
ath79_register_eth(1);
ath79_gpio_function_enable(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_register_leds_gpio(-1, ARRAY_SIZE(sysmocom_sob_ap2_leds_gpio),
sysmocom_sob_ap2_leds_gpio);
ath79_register_usb();
}
static void __init sysmocom_sob_jb02_setup(void)
{
sysmocom_common_setup();
@ -109,6 +139,9 @@ static void __init sysmocom_sob_jb02_setup(void)
MIPS_MACHINE(ATH79_MACH_SYSMOCOM_SOB_AP1, "SYSMOSOBAP1", "sysmocom SOB-AP1",
sysmocom_sob_ap1_setup);
MIPS_MACHINE(ATH79_MACH_SYSMOCOM_SOB_AP2, "SYSMOSOBAP2", "sysmocom SOB-AP2",
sysmocom_sob_ap2_setup);
MIPS_MACHINE(ATH79_MACH_SYSMOCOM_SOB_JB02, "SYSMOSOBJB02", "sysmocom SOB-JB02",
sysmocom_sob_jb02_setup);

View File

@ -249,6 +249,7 @@ ap113_mtd_layout=mtdparts=spi0.0:64k(u-boot),3008k(rootfs),896k(uImage),64k(NVRA
ap121_mtdlayout_2M=mtdparts=spi0.0:64k(u-boot)ro,1216k(rootfs),704k(kernel),64k(art)ro,1920k@0x10000(firmware)
ap121_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2752k(rootfs),896k(kernel),64k(nvram),64k(art)ro,3648k@0x50000(firmware)
carambola2_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
carambola2_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
ap132_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),6400k(rootfs),64k(art),7808k@0x50000(firmware)
ap135_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
ap136_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(mib0),64k(art)ro,7744k@0x50000(firmware)
@ -1068,6 +1069,7 @@ $(eval $(call SingleProfile,AthLzma,64k,AP121_2M,ap121-2M,AP121,ttyATH0,115200,$
$(eval $(call SingleProfile,AthLzma,64k,AP121_4M,ap121-4M,AP121,ttyATH0,115200,$$(ap121_mtdlayout_4M),RKuImage))
$(eval $(call SingleProfile,AthLzma,64k,CARAMBOLA2,carambola2,CARAMBOLA2,ttyATH0,115200,$$(carambola2_mtdlayout_16M),KRuImage,65536))
$(eval $(call SingleProfile,AthLzma,64k,SYSMOSOBAP1,sysmo-sob-ap1,SYSMOSOBAP1,ttyATH0,115200,$$(carambola2_mtdlayout_16M),KRuImage,65536))
$(eval $(call SingleProfile,AthLzma,64k,SYSMOSOBAP2,sysmo-sob-ap2,SYSMOSOBAP2,ttyATH0,115200,$$(carambola2_mtdlayout_8M),KRuImage,65536))
$(eval $(call SingleProfile,AthLzma,64k,SYSMOSOBJB02,sysmo-sob-jb02,SYSMOSOBJB02,ttyATH0,115200,$$(carambola2_mtdlayout_16M),KRuImage,65536))
$(eval $(call SingleProfile,AthLzma,64k,AP121MINI,ap121-mini,AP121-MINI,ttyATH0,115200,$$(ap121_mtdlayout_4M),RKuImage))
$(eval $(call SingleProfile,AthLzma,64k,AP132,ap132,AP132,ttyS0,115200,$$(ap132_mtdlayout),KRuImage))
@ -1274,7 +1276,7 @@ $(eval $(call MultiProfile,AP136,AP136_010 AP136_020))
$(eval $(call MultiProfile,ARCHERC7, ARCHERC5 ARCHERC7V1 ARCHERC7V2))
$(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT EWDORIN16M))
$(eval $(call MultiProfile,OPENMESH,OM2P OM5P MR600))
$(eval $(call MultiProfile,SYSMOSOB,SYSMOSOBAP1 SYSMOSOBJB02))
$(eval $(call MultiProfile,SYSMOSOB,SYSMOSOBAP1 SYSMOSOBAP2 SYSMOSOBJB02))
$(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY))
$(eval $(call MultiProfile,TLMR11U,TLMR11UV1 TLMR11UV2))
$(eval $(call MultiProfile,TLMR3040,TLMR3040V1 TLMR3040V2))

View File

@ -2,12 +2,13 @@ Index: linux-3.10.49/arch/mips/ath79/machtypes.h
===================================================================
--- linux-3.10.49.orig/arch/mips/ath79/machtypes.h
+++ linux-3.10.49/arch/mips/ath79/machtypes.h
@@ -103,6 +103,8 @@ enum ath79_mach_type {
@@ -103,6 +103,9 @@ enum ath79_mach_type {
ATH79_MACH_RB_SXTLITE2ND, /* Mikrotik RouterBOARD SXT Lite 2nD */
ATH79_MACH_RB_SXTLITE5ND, /* Mikrotik RouterBOARD SXT Lite 5nD */
ATH79_MACH_RW2458N, /* Redwave RW2458N */
+ ATH79_MACH_SYSMOCOM_SOB_JB02, /* sysmocom SOB-JB02 */
+ ATH79_MACH_SYSMOCOM_SOB_AP1, /* sysmocom SOB-AP */
+ ATH79_MACH_SYSMOCOM_SOB_AP2, /* sysmocom SOB-AP */
ATH79_MACH_SMART_300, /* NC-LINK SMART-300 */
ATH79_MACH_TEW_632BRP, /* TRENDnet TEW-632BRP */
ATH79_MACH_TEW_673GRU, /* TRENDnet TEW-673GRU */