add sysmocom devices SOB-AP1 SOB-JB02
This commit is contained in:
parent
e602c6df19
commit
bbc86587e4
|
@ -206,6 +206,12 @@ smart-300)
|
|||
ucidef_set_led_wlan "wlan" "WLAN" "nc-link:green:wlan" "phy0tpt"
|
||||
;;
|
||||
|
||||
sysmocom-sob-ap1 | \
|
||||
sysmocom-sob-jb02)
|
||||
ucidef_set_led_netdev "lan" "LAN" "sysmocom:orange:eth0" "eth0"
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "sysmocom:orange: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"
|
||||
|
|
|
@ -745,6 +745,12 @@ ar71xx_board_detect() {
|
|||
*"HiWiFi HC6361")
|
||||
name="hiwifi-hc6361"
|
||||
;;
|
||||
*"sysmocom SOB-AP1")
|
||||
name="sysmocom-sob-ap1"
|
||||
;;
|
||||
*"sysmocom SOB-JB02")
|
||||
name="sysmocom-sob-jb02"
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$machine" in
|
||||
|
|
|
@ -80,6 +80,8 @@ CONFIG_ATH79_MACH_PB92=y
|
|||
# CONFIG_ATH79_MACH_RBSXTLITE is not set
|
||||
CONFIG_ATH79_MACH_RW2458N=y
|
||||
CONFIG_ATH79_MACH_SMART_300=y
|
||||
CONFIG_ATH79_MACH_SYSMOCOM_SOB_AP1=y
|
||||
CONFIG_ATH79_MACH_SYSMOCOM_SOB_JB02=y
|
||||
CONFIG_ATH79_MACH_TEW_632BRP=y
|
||||
CONFIG_ATH79_MACH_TEW_673GRU=y
|
||||
CONFIG_ATH79_MACH_TEW_712BR=y
|
||||
|
|
|
@ -0,0 +1,114 @@
|
|||
/*
|
||||
* sysmocom devices
|
||||
*
|
||||
* Copyright (C) 2015 Alexander Couzens <lynxis@fe80.eu>
|
||||
*
|
||||
* 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 <asm/mach-ath79/ath79.h>
|
||||
#include <asm/mach-ath79/ar71xx_regs.h>
|
||||
#include "common.h"
|
||||
#include "dev-eth.h"
|
||||
#include "dev-gpio-buttons.h"
|
||||
#include "dev-leds-gpio.h"
|
||||
#include "dev-m25p80.h"
|
||||
#include "dev-spi.h"
|
||||
#include "dev-usb.h"
|
||||
#include "dev-wmac.h"
|
||||
#include "machtypes.h"
|
||||
|
||||
#define SYSMOCOM_GPIO_LED_WLAN 0
|
||||
#define SYSMOCOM_GPIO_LED_ETH0 13
|
||||
#define SYSMOCOM_GPIO_LED_PSE 15
|
||||
|
||||
#define SYSMOCOM_MAC0_OFFSET 0x0000
|
||||
#define SYSMOCOM_MAC1_OFFSET 0x0006
|
||||
#define SYSMOCOM_CALDATA_OFFSET 0x1000
|
||||
#define SYSMOCOM_WMAC_MAC_OFFSET 0x1002
|
||||
|
||||
static struct gpio_led sysmocom_sob_ap1_leds_gpio[] __initdata = {
|
||||
{
|
||||
.name = "sysmocom:orange:wlan",
|
||||
.gpio = SYSMOCOM_GPIO_LED_WLAN,
|
||||
.active_low = 0,
|
||||
}, {
|
||||
.name = "sysmocom:orange:eth0",
|
||||
.gpio = SYSMOCOM_GPIO_LED_ETH0,
|
||||
.active_low = 0,
|
||||
}, {
|
||||
.name = "sysmocom:red:pse",
|
||||
.gpio = SYSMOCOM_GPIO_LED_PSE,
|
||||
.active_low = 0,
|
||||
}
|
||||
};
|
||||
|
||||
static struct gpio_led sysmocom_sob_jb02_leds_gpio[] __initdata = {
|
||||
{
|
||||
.name = "sysmocom:orange:wlan",
|
||||
.gpio = SYSMOCOM_GPIO_LED_WLAN,
|
||||
.active_low = 0,
|
||||
}, {
|
||||
.name = "sysmocom:orange:eth0",
|
||||
.gpio = SYSMOCOM_GPIO_LED_ETH0,
|
||||
.active_low = 0,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static void __init sysmocom_common_setup(void)
|
||||
{
|
||||
u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
|
||||
|
||||
ath79_register_m25p80(NULL);
|
||||
ath79_register_wmac(art + SYSMOCOM_CALDATA_OFFSET,
|
||||
art + SYSMOCOM_WMAC_MAC_OFFSET);
|
||||
|
||||
ath79_setup_ar933x_phy4_switch(false, false);
|
||||
|
||||
ath79_init_mac(ath79_eth0_data.mac_addr, art + SYSMOCOM_MAC0_OFFSET, 0);
|
||||
|
||||
ath79_register_mdio(0, 0x0);
|
||||
|
||||
/* WAN port */
|
||||
ath79_register_eth(0);
|
||||
}
|
||||
|
||||
static void __init sysmocom_sob_ap1_setup(void)
|
||||
{
|
||||
sysmocom_common_setup();
|
||||
|
||||
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_register_leds_gpio(-1, ARRAY_SIZE(sysmocom_sob_ap1_leds_gpio),
|
||||
sysmocom_sob_ap1_leds_gpio);
|
||||
ath79_register_usb();
|
||||
}
|
||||
|
||||
static void __init sysmocom_sob_jb02_setup(void)
|
||||
{
|
||||
sysmocom_common_setup();
|
||||
|
||||
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_register_leds_gpio(-1, ARRAY_SIZE(sysmocom_sob_jb02_leds_gpio),
|
||||
sysmocom_sob_jb02_leds_gpio);
|
||||
ath79_register_usb();
|
||||
}
|
||||
|
||||
MIPS_MACHINE(ATH79_MACH_ATH79_MACH_SYSMOCOM_AP1, "SYSMOSOBAP1", "sysmocom SOB-AP1",
|
||||
sysmocom_sob_ap1_setup);
|
||||
|
||||
MIPS_MACHINE(ATH79_MACH_ATH79_MACH_SYSMOCOM_JB02, "SYSMOSOBJB02", "sysmocom SOB-JB02",
|
||||
sysmocom_setup);
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
define Profile/SYSMOSOBAP1
|
||||
NAME:=sysmocom SOB-AP1 board
|
||||
PACKAGES:=kmod-usb-core kmod-usb2
|
||||
endef
|
||||
|
||||
define Profile/SYSMOSOBAP1/Description
|
||||
Package set for sysmoSOB-AP
|
||||
endef
|
||||
|
||||
$(eval $(call Profile,SYSMOSOBAP1))
|
||||
|
||||
define Profile/SYSMOSOBJB02
|
||||
NAME:=sysmocom SOB-JB02 board
|
||||
PACKAGES:=kmod-usb-core kmod-usb2
|
||||
endef
|
||||
|
||||
define Profile/SYSMOSOBJB02/Description
|
||||
Package set for sysmoSOB JB02
|
||||
endef
|
||||
|
||||
$(eval $(call Profile,SYSMOSOBJB02))
|
|
@ -1067,6 +1067,8 @@ $(eval $(call SingleProfile,AthLzma,64k,AP113,ap113,AP113,ttyS0,115200,$$(ap113_
|
|||
$(eval $(call SingleProfile,AthLzma,64k,AP121_2M,ap121-2M,AP121,ttyATH0,115200,$$(ap121_mtdlayout_2M),RKuImage))
|
||||
$(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,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))
|
||||
$(eval $(call SingleProfile,AthLzma,64k,AP135,ap135-020,AP135-020,ttyS0,115200,$$(ap135_mtdlayout),RKuImage))
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
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 {
|
||||
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_SMART_300, /* NC-LINK SMART-300 */
|
||||
ATH79_MACH_TEW_632BRP, /* TRENDnet TEW-632BRP */
|
||||
ATH79_MACH_TEW_673GRU, /* TRENDnet TEW-673GRU */
|
||||
Index: linux-3.10.49/arch/mips/ath79/Kconfig
|
||||
===================================================================
|
||||
--- linux-3.10.49.orig/arch/mips/ath79/Kconfig
|
||||
+++ linux-3.10.49/arch/mips/ath79/Kconfig
|
||||
@@ -1034,6 +1034,26 @@ config ATH79_MACH_CARAMBOLA2
|
||||
select ATH79_DEV_USB
|
||||
select ATH79_DEV_WMAC
|
||||
|
||||
+config ATH79_MACH_SYSMOCOM_SOB_JB02
|
||||
+ bool "sysmocom SOB JB02"
|
||||
+ select SOC_AR933X
|
||||
+ select ATH79_DEV_ETH
|
||||
+ select ATH79_DEV_GPIO_BUTTONS
|
||||
+ select ATH79_DEV_LEDS_GPIO
|
||||
+ select ATH79_DEV_M25P80
|
||||
+ select ATH79_DEV_USB
|
||||
+ select ATH79_DEV_WMAC
|
||||
+
|
||||
+config ATH79_MACH_SYSMOCOM_SOB_AP1
|
||||
+ bool "sysmocom SOB SOB AP"
|
||||
+ select SOC_AR933X
|
||||
+ select ATH79_DEV_ETH
|
||||
+ select ATH79_DEV_GPIO_BUTTONS
|
||||
+ select ATH79_DEV_LEDS_GPIO
|
||||
+ select ATH79_DEV_M25P80
|
||||
+ select ATH79_DEV_USB
|
||||
+ select ATH79_DEV_WMAC
|
||||
+
|
||||
config ATH79_MACH_BHU_BXU2000N2_A
|
||||
bool "BHU BXU2000n-2 rev. A support"
|
||||
select SOC_AR934X
|
Loading…
Reference in New Issue