Merge Official Source
This commit is contained in:
commit
a19da363be
|
@ -478,7 +478,7 @@ define Device/Build/initramfs
|
|||
$$(if $$(CONFIG_JSON_OVERVIEW_IMAGE_INFO), $(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,))
|
||||
|
||||
$(KDIR)/$$(KERNEL_INITRAMFS_NAME):: image_prepare
|
||||
$(1)-images: $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
|
||||
$(1)-images: $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE))
|
||||
$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
|
||||
cp $$^ $$@
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ case "$board" in
|
|||
checkpoint,l-50|\
|
||||
cloudengines,pogoe02|\
|
||||
cloudengines,pogoplugv4|\
|
||||
globalscale,sheevaplug|\
|
||||
iom,ix2-200|\
|
||||
linksys,e4200-v2|\
|
||||
linksys,ea4500|\
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_VERSION:=2020.04
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
|
||||
|
||||
|
@ -94,6 +94,11 @@ define U-Boot/pogoplugv4
|
|||
BUILD_DEVICES:=cloudengines_pogoplugv4
|
||||
endef
|
||||
|
||||
define U-Boot/sheevaplug
|
||||
NAME:=Globalscale SheevaPlug
|
||||
BUILD_DEVICES:=globalscale_sheevaplug
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
dockstar dockstar_second_stage \
|
||||
goflexhome \
|
||||
|
@ -105,7 +110,8 @@ UBOOT_TARGETS := \
|
|||
nsa310s \
|
||||
nsa325 \
|
||||
pogo_e02 pogo_e02_second_stage \
|
||||
pogoplugv4
|
||||
pogoplugv4 \
|
||||
sheevaplug
|
||||
|
||||
define Build/Configure
|
||||
$(if $(findstring _second_stage,$(BUILD_VARIANT)),
|
||||
|
|
|
@ -28,13 +28,13 @@ NOTE: this patch is ready for upstream, LEDE-specific parts are in
|
|||
@@ -53,6 +53,9 @@ config TARGET_GOFLEXHOME
|
||||
config TARGET_NAS220
|
||||
bool "BlackArmor NAS220"
|
||||
|
||||
|
||||
+config TARGET_NSA310
|
||||
+ bool "Zyxel NSA310 Board"
|
||||
+
|
||||
config TARGET_NSA310S
|
||||
bool "Zyxel NSA310S"
|
||||
|
||||
|
||||
@@ -86,6 +89,7 @@ source "board/raidsonic/ib62x0/Kconfig"
|
||||
source "board/Seagate/dockstar/Kconfig"
|
||||
source "board/Seagate/goflexhome/Kconfig"
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
@@ -25,6 +25,9 @@ config TARGET_LSXL
|
||||
config TARGET_POGO_E02
|
||||
bool "pogo_e02 Board"
|
||||
|
||||
|
||||
+config TARGET_POGOPLUGV4
|
||||
+ bool "Pogoplug V4 Board"
|
||||
+
|
||||
config TARGET_DNS325
|
||||
bool "dns325 Board"
|
||||
|
||||
|
||||
@@ -83,6 +86,7 @@ source "board/Marvell/guruplug/Kconfig"
|
||||
source "board/Marvell/sheevaplug/Kconfig"
|
||||
source "board/buffalo/lsxl/Kconfig"
|
||||
|
@ -22,11 +22,11 @@
|
|||
+++ b/arch/arm/mach-kirkwood/include/mach/kw88f6192.h
|
||||
@@ -15,6 +15,6 @@
|
||||
#define KW_REGS_PHY_BASE KW88F6192_REGS_PHYS_BASE
|
||||
|
||||
|
||||
/* TCLK Core Clock defination */
|
||||
-#define CONFIG_SYS_TCLK 166000000 /* 166MHz */
|
||||
+#define CONFIG_SYS_TCLK 166666667 /* 166MHz */
|
||||
|
||||
|
||||
#endif /* _CONFIG_KW88F6192_H */
|
||||
--- a/arch/arm/mach-kirkwood/include/mach/mpp.h
|
||||
+++ b/arch/arm/mach-kirkwood/include/mach/mpp.h
|
||||
|
@ -35,12 +35,12 @@
|
|||
#define MPP33_TDM_DTX MPP( 33, 0x2, 0, 1, 0, 0, 1, 1 )
|
||||
#define MPP33_GE1_13 MPP( 33, 0x3, 0, 0, 0, 1, 1, 1 )
|
||||
+#define MPP33_SATA1_ACTn MPP( 33, 0x5, 0, 1, 0, 1, 1, 1 )
|
||||
|
||||
|
||||
#define MPP34_GPIO MPP( 34, 0x0, 1, 1, 0, 1, 1, 1 )
|
||||
#define MPP34_TDM_SPI_CS1 MPP( 34, 0x2, 0, 1, 0, 0, 1, 1 )
|
||||
#define MPP34_GE1_14 MPP( 34, 0x3, 0, 0, 0, 1, 1, 1 )
|
||||
+#define MPP34_SATA1_ACTn MPP( 34, 0x5, 0, 1, 0, 1, 1, 1 )
|
||||
|
||||
|
||||
#define MPP35_GPIO MPP( 35, 0x0, 1, 1, 1, 1, 1, 1 )
|
||||
#define MPP35_TDM_CH0_TX_QL MPP( 35, 0x2, 0, 1, 0, 0, 1, 1 )
|
||||
--- /dev/null
|
||||
|
@ -630,7 +630,7 @@
|
|||
obj-$(CONFIG_MMC_SDHCI_XENON) += xenon_sdhci.o
|
||||
obj-$(CONFIG_MMC_SDHCI_ZYNQ) += zynq_sdhci.o
|
||||
+obj-$(CONFIG_KIRKWOOD_MMC) += kirkwood_mmc.o
|
||||
|
||||
|
||||
obj-$(CONFIG_MMC_SUNXI) += sunxi_mmc.o
|
||||
obj-$(CONFIG_MMC_UNIPHIER) += tmio-common.o uniphier-sd.o
|
||||
--- /dev/null
|
||||
|
@ -1123,7 +1123,7 @@
|
|||
@@ -75,4 +75,10 @@
|
||||
#define CONFIG_SYS_MAX_NAND_DEVICE 1
|
||||
#endif
|
||||
|
||||
|
||||
+/*
|
||||
+ * Kirkwood MMC
|
||||
+ */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#define CONFIG_KW88F6281 1 /* SOC Name */
|
||||
#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
|
||||
+#define CONFIG_SYS_MVFS
|
||||
|
||||
|
||||
/*
|
||||
* mv-common.h should be defined after CMD configs since it used them
|
||||
@@ -37,19 +38,15 @@
|
||||
|
@ -20,7 +20,7 @@
|
|||
+ "ubi part ubi; " \
|
||||
+ "ubi read 0x800000 kernel; " \
|
||||
+ "bootm 0x800000"
|
||||
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
- "console=console=ttyS0,115200\0" \
|
||||
- "mtdids=nand0=orion_nand\0" \
|
||||
|
@ -32,7 +32,7 @@
|
|||
+ "mtdids=nand0=orion_nand\0" \
|
||||
+ "mtdparts="CONFIG_MTDPARTS_DEFAULT "\0" \
|
||||
+ "bootargs_root=\0"
|
||||
|
||||
|
||||
/*
|
||||
* Ethernet Driver configuration
|
||||
--- a/configs/dockstar_defconfig
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
+ "ubi part ubi; " \
|
||||
+ "ubi read 0x800000 kernel; " \
|
||||
"bootm 0x800000"
|
||||
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"console=console=ttyS0,115200\0" \
|
||||
"mtdids=nand0=orion_nand\0" \
|
||||
|
@ -19,7 +19,7 @@
|
|||
- "bootargs_root=noinitrd ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs\0"
|
||||
+ "mtdparts="CONFIG_MTDPARTS_DEFAULT "\0" \
|
||||
+ "bootargs_root=\0"
|
||||
|
||||
|
||||
/*
|
||||
* Ethernet driver configuration
|
||||
--- a/configs/iconnect_defconfig
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
+ "ubi part ubi; " \
|
||||
+ "ubi read 0x800000 kernel; " \
|
||||
+ "bootm 0x800000"
|
||||
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"console=console=ttyS0,115200\0" \
|
||||
"mtdids=nand0=orion_nand\0" \
|
||||
|
@ -24,7 +24,7 @@
|
|||
- "bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0"
|
||||
+ "mtdparts="CONFIG_MTDPARTS_DEFAULT "\0" \
|
||||
+ "bootargs_root=\0"
|
||||
|
||||
|
||||
/*
|
||||
* Ethernet driver configuration
|
||||
--- a/configs/ib62x0_defconfig
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
+ "ubifsmount ubi:rootfs; " \
|
||||
+ "ubi read 0x800000 kernel; " \
|
||||
+ "bootm 0x800000"
|
||||
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
- "mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage)," \
|
||||
- "32M(rootfs),-(data)\0"\
|
||||
|
@ -24,7 +24,7 @@
|
|||
+ "mtdids=nand0=orion_nand\0" \
|
||||
+ "mtdparts="CONFIG_MTDPARTS_DEFAULT "\0" \
|
||||
+ "bootargs_root=\0"
|
||||
|
||||
|
||||
/*
|
||||
* Ethernet Driver configuration
|
||||
--- a/configs/pogo_e02_defconfig
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
+ "ubi part ubi; " \
|
||||
+ "ubi read 0x800000 kernel; " \
|
||||
"bootm 0x800000"
|
||||
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"console=console=ttyS0,115200\0" \
|
||||
"mtdids=nand0=orion_nand\0" \
|
||||
|
@ -19,7 +19,7 @@
|
|||
- "bootargs_root=ubi.mtd=root root=ubi0:root rootfstype=ubifs ro\0"
|
||||
+ "mtdparts="CONFIG_MTDPARTS_DEFAULT "\0" \
|
||||
+ "bootargs_root=\0"
|
||||
|
||||
|
||||
/*
|
||||
* Ethernet Driver configuration
|
||||
--- a/configs/goflexhome_defconfig
|
||||
|
|
39
package/boot/uboot-kirkwood/patches/170-sheevaplug.patch
Normal file
39
package/boot/uboot-kirkwood/patches/170-sheevaplug.patch
Normal file
|
@ -0,0 +1,39 @@
|
|||
--- a/include/configs/sheevaplug.h
|
||||
+++ b/include/configs/sheevaplug.h
|
||||
@@ -45,15 +45,17 @@
|
||||
/*
|
||||
* Default environment variables
|
||||
*/
|
||||
-#define CONFIG_BOOTCOMMAND "${x_bootcmd_kernel}; " \
|
||||
- "setenv bootargs ${x_bootargs} ${x_bootargs_root}; " \
|
||||
- "bootm 0x6400000;"
|
||||
+#define CONFIG_BOOTCOMMAND \
|
||||
+ "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
|
||||
+ "ubi part ubi; " \
|
||||
+ "ubi read 0x800000 kernel; " \
|
||||
+ "bootm 0x800000"
|
||||
|
||||
-#define CONFIG_EXTRA_ENV_SETTINGS "x_bootargs=console" \
|
||||
- "=ttyS0,115200 mtdparts="CONFIG_MTDPARTS_DEFAULT \
|
||||
- "x_bootcmd_kernel=nand read 0x6400000 0x100000 0x400000\0" \
|
||||
- "x_bootcmd_usb=usb start\0" \
|
||||
- "x_bootargs_root=root=/dev/mtdblock3 rw rootfstype=jffs2\0"
|
||||
+#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
+ "console=console=ttyS0,115200\0" \
|
||||
+ "mtdids="CONFIG_MTDIDS_DEFAULT "\0" \
|
||||
+ "mtdparts="CONFIG_MTDPARTS_DEFAULT "\0" \
|
||||
+ "bootargs_root=\0"
|
||||
|
||||
/*
|
||||
* Ethernet Driver configuration
|
||||
--- a/configs/sheevaplug_defconfig
|
||||
+++ b/configs/sheevaplug_defconfig
|
||||
@@ -30,7 +30,7 @@ CONFIG_CMD_FAT=y
|
||||
CONFIG_CMD_JFFS2=y
|
||||
CONFIG_CMD_MTDPARTS=y
|
||||
CONFIG_MTDIDS_DEFAULT="nand0=orion_nand"
|
||||
-CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:512K(uboot),512K(env),4M(kernel),-(rootfs)"
|
||||
+CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:1M(uboot),-(ubi)"
|
||||
CONFIG_CMD_UBI=y
|
||||
CONFIG_ISO_PARTITION=y
|
||||
CONFIG_OF_CONTROL=y
|
|
@ -3,7 +3,7 @@
|
|||
@@ -107,4 +107,7 @@ source "board/alliedtelesis/SBx81LIFXCAT
|
||||
source "board/Marvell/db-88f6281-bp/Kconfig"
|
||||
source "board/checkpoint/l-50/Kconfig"
|
||||
|
||||
|
||||
+config SECOND_STAGE
|
||||
+ bool "OpenWrt second stage hack"
|
||||
+
|
||||
|
@ -13,7 +13,7 @@
|
|||
@@ -60,4 +60,6 @@
|
||||
* File system
|
||||
*/
|
||||
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_DOCKSTAR_H */
|
||||
|
@ -22,7 +22,7 @@
|
|||
@@ -77,4 +77,6 @@
|
||||
#define CONFIG_RTC_MV
|
||||
#endif /* CONFIG_CMD_DATE */
|
||||
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_IB62x0_H */
|
||||
|
@ -31,7 +31,7 @@
|
|||
@@ -67,4 +67,6 @@
|
||||
* File system
|
||||
*/
|
||||
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_ICONNECT_H */
|
||||
|
@ -40,7 +40,7 @@
|
|||
@@ -12,6 +12,8 @@
|
||||
#ifndef _CONFIG_L50_H
|
||||
#define _CONFIG_L50_H
|
||||
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
/*
|
||||
|
@ -85,7 +85,7 @@
|
|||
@@ -66,4 +66,6 @@
|
||||
* File system
|
||||
*/
|
||||
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_POGO_E02_H */
|
||||
|
@ -94,7 +94,7 @@
|
|||
@@ -85,4 +85,6 @@
|
||||
#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
|
||||
#endif /*CONFIG_MVSATA_IDE*/
|
||||
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_GOFLEXHOME_H */
|
||||
|
@ -103,7 +103,7 @@
|
|||
@@ -100,4 +100,6 @@
|
||||
#define CONFIG_RTC_MV
|
||||
#endif /* CONFIG_CMD_DATE */
|
||||
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_NSA310_H */
|
||||
|
@ -200,7 +200,17 @@
|
|||
@@ -63,4 +63,6 @@
|
||||
#define CONFIG_RTC_MV
|
||||
#endif /* CONFIG_CMD_DATE */
|
||||
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_NSA310S_H */
|
||||
--- a/configs/sheevaplug_defconfig
|
||||
+++ b/configs/sheevaplug_defconfig
|
||||
@@ -49,4 +49,7 @@ CONFIG_USB=y
|
||||
CONFIG_DM_USB=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_LZMA=y
|
||||
+CONFIG_LZO=y
|
||||
|
|
|
@ -17,8 +17,6 @@ Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
|||
drivers/net/phy/mv88e61xx.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c
|
||||
index 5aff7ed397..889327639d 100644
|
||||
--- a/drivers/net/phy/mv88e61xx.c
|
||||
+++ b/drivers/net/phy/mv88e61xx.c
|
||||
@@ -94,6 +94,8 @@
|
||||
|
@ -30,7 +28,7 @@ index 5aff7ed397..889327639d 100644
|
|||
#define PORT_REG_PHYS_CTRL_PCS_AN_EN BIT(10)
|
||||
#define PORT_REG_PHYS_CTRL_PCS_AN_RST BIT(9)
|
||||
#define PORT_REG_PHYS_CTRL_FC_VALUE BIT(7)
|
||||
@@ -747,9 +749,16 @@ static int mv88e61xx_fixed_port_setup(struct phy_device *phydev, u8 port)
|
||||
@@ -747,9 +749,16 @@ static int mv88e61xx_fixed_port_setup(st
|
||||
PORT_REG_PHYS_CTRL_SPD1000;
|
||||
}
|
||||
|
||||
|
@ -48,6 +46,3 @@ index 5aff7ed397..889327639d 100644
|
|||
|
||||
return mv88e61xx_port_write(phydev, port, PORT_REG_PHYS_CTRL,
|
||||
val);
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
|
@ -16,8 +16,6 @@ Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
|||
drivers/net/phy/mv88e61xx.c | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c
|
||||
index 889327639d..e0b648a54e 100644
|
||||
--- a/drivers/net/phy/mv88e61xx.c
|
||||
+++ b/drivers/net/phy/mv88e61xx.c
|
||||
@@ -180,6 +180,7 @@
|
||||
|
@ -28,7 +26,7 @@ index 889327639d..e0b648a54e 100644
|
|||
#define PORT_SWITCH_ID_6172 0x1720
|
||||
#define PORT_SWITCH_ID_6176 0x1760
|
||||
#define PORT_SWITCH_ID_6220 0x2200
|
||||
@@ -997,6 +998,7 @@ static int mv88e61xx_probe(struct phy_device *phydev)
|
||||
@@ -997,6 +998,7 @@ static int mv88e61xx_probe(struct phy_de
|
||||
switch (priv->id) {
|
||||
case PORT_SWITCH_ID_6096:
|
||||
case PORT_SWITCH_ID_6097:
|
||||
|
@ -36,7 +34,7 @@ index 889327639d..e0b648a54e 100644
|
|||
case PORT_SWITCH_ID_6172:
|
||||
case PORT_SWITCH_ID_6176:
|
||||
case PORT_SWITCH_ID_6240:
|
||||
@@ -1152,6 +1154,17 @@ static struct phy_driver mv88e61xx_driver = {
|
||||
@@ -1152,6 +1154,17 @@ static struct phy_driver mv88e61xx_drive
|
||||
.shutdown = &genphy_shutdown,
|
||||
};
|
||||
|
||||
|
@ -54,7 +52,7 @@ index 889327639d..e0b648a54e 100644
|
|||
static struct phy_driver mv88e609x_driver = {
|
||||
.name = "Marvell MV88E609x",
|
||||
.uid = 0x1410c89,
|
||||
@@ -1177,6 +1190,7 @@ static struct phy_driver mv88e6071_driver = {
|
||||
@@ -1177,6 +1190,7 @@ static struct phy_driver mv88e6071_drive
|
||||
int phy_mv88e61xx_init(void)
|
||||
{
|
||||
phy_register(&mv88e61xx_driver);
|
||||
|
@ -62,6 +60,3 @@ index 889327639d..e0b648a54e 100644
|
|||
phy_register(&mv88e609x_driver);
|
||||
phy_register(&mv88e6071_driver);
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=linux-firmware
|
||||
PKG_VERSION:=20210315
|
||||
PKG_VERSION:=20210511
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_HASH:=a2348f03492713dca9aef202496c6e58f5e63ee5bec6a7bdfcf8b18ce7155e70
|
||||
PKG_HASH:=2aa6ae8b9808408f9811ac38f00c188e53e984a2b3990254f6c9c02c1ab13417
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
|
|
|
@ -549,7 +549,6 @@ endef
|
|||
define KernelPackage/cfg80211/install
|
||||
$(INSTALL_DIR) $(1)/lib/wifi $(1)/lib/netifd/wireless
|
||||
$(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
|
||||
$(INSTALL_DATA) ./files/lib/netifd/mac80211.sh $(1)/lib/netifd
|
||||
$(INSTALL_BIN) ./files/lib/netifd/wireless/mac80211.sh $(1)/lib/netifd/wireless
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/ieee80211
|
||||
$(INSTALL_DATA) ./files/mac80211.hotplug $(1)/etc/hotplug.d/ieee80211/10-wifi-detect
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
mac80211_phy_to_path() {
|
||||
local phy="$1"
|
||||
|
||||
[ -x /usr/bin/readlink -a -h /sys/class/ieee80211/${phy} ] || return
|
||||
|
||||
local path="$(readlink -f /sys/class/ieee80211/${phy}/device)"
|
||||
[ -n "$path" ] || return
|
||||
|
||||
path="${path##/sys/devices/}"
|
||||
case "$path" in
|
||||
platform*/pci*) path="${path##platform/}";;
|
||||
esac
|
||||
|
||||
local p
|
||||
local seq=""
|
||||
for p in $(ls /sys/class/ieee80211/$phy/device/ieee80211); do
|
||||
[ "$p" = "$phy" ] && {
|
||||
echo "$path${seq:++$seq}"
|
||||
break
|
||||
}
|
||||
|
||||
seq=$((${seq:-0} + 1))
|
||||
done
|
||||
}
|
||||
|
||||
mac80211_path_to_phy() {
|
||||
local path="$1"
|
||||
|
||||
local p
|
||||
for p in $(ls /sys/class/ieee80211); do
|
||||
local cur="$(mac80211_phy_to_path "$p")"
|
||||
case "$cur" in
|
||||
*$path) echo "$p"; return;;
|
||||
esac
|
||||
done
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
#!/bin/sh
|
||||
. /lib/netifd/netifd-wireless.sh
|
||||
. /lib/netifd/hostapd.sh
|
||||
. /lib/netifd/mac80211.sh
|
||||
|
||||
init_wireless_driver "$@"
|
||||
|
||||
|
@ -546,7 +545,7 @@ mac80211_generate_mac() {
|
|||
find_phy() {
|
||||
[ -n "$phy" -a -d /sys/class/ieee80211/$phy ] && return 0
|
||||
[ -n "$path" ] && {
|
||||
phy="$(mac80211_path_to_phy "$path")"
|
||||
phy="$(iwinfo nl80211 phyname "path=$path")"
|
||||
[ -n "$phy" ] && return 0
|
||||
}
|
||||
[ -n "$macaddr" ] && {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/sh
|
||||
. /lib/netifd/mac80211.sh
|
||||
|
||||
append DRIVERS "mac80211"
|
||||
|
||||
|
@ -11,7 +10,7 @@ lookup_phy() {
|
|||
local devpath
|
||||
config_get devpath "$device" path
|
||||
[ -n "$devpath" ] && {
|
||||
phy="$(mac80211_path_to_phy "$devpath")"
|
||||
phy="$(iwinfo nl80211 phyname "path=$devpath")"
|
||||
[ -n "$phy" ] && return
|
||||
}
|
||||
|
||||
|
@ -161,7 +160,7 @@ detect_mac80211() {
|
|||
|
||||
get_band_defaults "$dev"
|
||||
|
||||
path="$(mac80211_phy_to_path "$dev")"
|
||||
path="$(iwinfo nl80211 path "$dev")"
|
||||
if [ -n "$path" ]; then
|
||||
dev_id="set wireless.radio${devidx}.path='$path'"
|
||||
else
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ethtool
|
||||
PKG_VERSION:=5.10
|
||||
PKG_VERSION:=5.12
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/software/network/ethtool
|
||||
PKG_HASH:=817d5396a9307b4c637b435d4c558b8f5f964a1464a035ca3c0180f4cc93cfcf
|
||||
PKG_HASH:=f5ddfa9c75053d8011b8c8c99ec4e2d3c83cd1972f638692d62e37fa3ef36f07
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
|
|
@ -11,9 +11,9 @@ PKG_RELEASE:=1
|
|||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
|
||||
PKG_SOURCE_DATE:=2021-04-30
|
||||
PKG_SOURCE_VERSION:=c45f0b584b4b86f8250f90ea19afca271c114fa2
|
||||
PKG_MIRROR_HASH:=24ad04791254a0523cd15a4fec6116d9ff121e006c93e5e41459f91347b33ec2
|
||||
PKG_SOURCE_DATE:=2021-06-09
|
||||
PKG_SOURCE_VERSION:=c0414642fead263a4a6a686ad3cb7e965ec8a23a
|
||||
PKG_MIRROR_HASH:=c5686bbae86753c53db03a686b034bbb80d31107cc359ebd8522ea1c82db35ea
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ugps
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ugps.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2020-08-29
|
||||
PKG_SOURCE_VERSION:=511a5b3c84fa715ef0305cf26c98619c12a4867a
|
||||
PKG_MIRROR_HASH:=551d57b4c18da4c4695fa2f7a959c25a03be35d14cf872785e7db740f12366e2
|
||||
PKG_SOURCE_DATE:=2021-06-08
|
||||
PKG_SOURCE_VERSION:=5e88403fc0d39ae8a270d2c6c6e9c8a4d5232cf3
|
||||
PKG_MIRROR_HASH:=a3dfc2cc6def3b634d8b7cda9139926be3d876cf2faa5251c4821987954442a5
|
||||
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
PKG_LICENSE:=GPL-2.0+
|
||||
|
|
|
@ -756,12 +756,11 @@ sub uninstall {
|
|||
return 0;
|
||||
}
|
||||
|
||||
sub update_feed($$$$$)
|
||||
sub update_feed($$$$)
|
||||
{
|
||||
my $type=shift;
|
||||
my $name=shift;
|
||||
my $src=shift;
|
||||
my $perform_update=shift;
|
||||
my $force_update=shift;
|
||||
my $force_relocate=update_location( $name, "@$src" );
|
||||
my $rv=0;
|
||||
|
@ -773,28 +772,22 @@ sub update_feed($$$$$)
|
|||
warn "Unknown type '$type' in feed $name\n";
|
||||
return 1;
|
||||
};
|
||||
$perform_update and do {
|
||||
my $failed = 1;
|
||||
foreach my $feedsrc (@$src) {
|
||||
warn "Updating feed '$name' from '$feedsrc' ...\n";
|
||||
if (update_feed_via($type, $name, $feedsrc, $force_relocate, $force_update) != 0) {
|
||||
if ($force_update) {
|
||||
$rv=1;
|
||||
$failed=0;
|
||||
warn "failed, ignore.\n";
|
||||
next;
|
||||
}
|
||||
last;
|
||||
|
||||
my $failed = 1;
|
||||
foreach my $feedsrc (@$src) {
|
||||
warn "Updating feed '$name' from '$feedsrc' ...\n";
|
||||
if (update_feed_via($type, $name, $feedsrc, $force_relocate, $force_update) != 0) {
|
||||
if ($force_update) {
|
||||
$rv=1;
|
||||
$failed=0;
|
||||
warn "failed, ignore.\n";
|
||||
next;
|
||||
}
|
||||
$failed = 0;
|
||||
last;
|
||||
}
|
||||
$failed and do {
|
||||
warn "failed.\n";
|
||||
return 1;
|
||||
};
|
||||
};
|
||||
warn "Create index file './feeds/$name.index' \n";
|
||||
update_index($name) == 0 or do {
|
||||
$failed = 0;
|
||||
}
|
||||
$failed and do {
|
||||
warn "failed.\n";
|
||||
return 1;
|
||||
};
|
||||
|
@ -803,45 +796,39 @@ sub update_feed($$$$$)
|
|||
|
||||
sub update {
|
||||
my %opts;
|
||||
my $feed_name;
|
||||
my $perform_update=1;
|
||||
my %argv_feeds;
|
||||
my $failed=0;
|
||||
|
||||
$ENV{SCAN_COOKIE} = $$;
|
||||
$ENV{OPENWRT_VERBOSE} = 's';
|
||||
|
||||
getopts('ahif', \%opts);
|
||||
%argv_feeds = map { $_ => 1 } @ARGV;
|
||||
|
||||
if ($opts{h}) {
|
||||
usage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($opts{i}) {
|
||||
# don't update from (remote) repository
|
||||
# only re-create index information
|
||||
$perform_update=0;
|
||||
}
|
||||
|
||||
-d "feeds" or do {
|
||||
mkdir "feeds" or die "Unable to create the feeds directory";
|
||||
};
|
||||
|
||||
if ( ($#ARGV == -1) or $opts{a}) {
|
||||
foreach my $feed (@feeds) {
|
||||
my ($type, $name, $src) = @$feed;
|
||||
update_feed($type, $name, $src, $perform_update, $opts{f}) == 0 or $failed=1;
|
||||
}
|
||||
} else {
|
||||
while ($feed_name = shift @ARGV) {
|
||||
foreach my $feed (@feeds) {
|
||||
my ($type, $name, $src) = @$feed;
|
||||
if($feed_name ne $name) {
|
||||
next;
|
||||
}
|
||||
update_feed($type, $name, $src, $perform_update, $opts{f}) == 0 or $failed=1;
|
||||
}
|
||||
my @index_feeds;
|
||||
foreach my $feed (@feeds) {
|
||||
my ($type, $name, $src) = @$feed;
|
||||
next unless $#ARGV == -1 or $opts{a} or $argv_feeds{$name};
|
||||
if (not $opts{i}) {
|
||||
update_feed($type, $name, $src, $opts{f}) == 0 or $failed=1;
|
||||
}
|
||||
push @index_feeds, $name;
|
||||
}
|
||||
foreach my $name (@index_feeds) {
|
||||
warn "Create index file './feeds/$name.index' \n";
|
||||
update_index($name) == 0 or do {
|
||||
warn "failed.\n";
|
||||
$failed=1;
|
||||
};
|
||||
}
|
||||
|
||||
refresh_config();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
board_config_update
|
||||
|
||||
case "$(board_name)" in
|
||||
"snps,axs101")
|
||||
snps,axs101)
|
||||
ucidef_set_interface_lan "eth0" "dhcp"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "ar9344_devolo_dlan_wifi.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Devolo dLAN pro 1200+ WiFi ac";
|
||||
compatible = "devolo,dlan-pro-1200plus-ac", "qca,ar9344";
|
||||
};
|
170
target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi
Normal file
170
target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi
Normal file
|
@ -0,0 +1,170 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "ar9344.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
led-boot = &led_dlan_red;
|
||||
led-failsafe = &led_dlan_red;
|
||||
led-running = &led_dlan_white;
|
||||
led-upgrade = &led_dlan_red;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
wlan {
|
||||
label = "white:wlan";
|
||||
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
led_dlan_white: dlan_white {
|
||||
label = "white:dlan";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_dlan_red: dlan_red {
|
||||
label = "red:dlan";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
|
||||
panic-indicator;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "Reset button";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wifi {
|
||||
label = "WIFI button";
|
||||
linux,code = <KEY_RFKILL>;
|
||||
gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
dlan {
|
||||
label = "DLAN button";
|
||||
linux,code = <BTN_0>;
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpio {
|
||||
wlan_power {
|
||||
gpio-hog;
|
||||
line-name = "WLAN power";
|
||||
gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <25000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
uboot: partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
label = "Config1";
|
||||
reg = <0x50000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@60000 {
|
||||
label = "Config2";
|
||||
reg = <0x60000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@70000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x70000 0xf80000>;
|
||||
};
|
||||
|
||||
art: partition@ff0000 {
|
||||
label = "art";
|
||||
reg = <0xff0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ref {
|
||||
clock-frequency = <40000000>;
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
pll-data = <0x02000000 0x00000101 0x00001616>;
|
||||
|
||||
mtd-mac-address = <&art 0x1002>;
|
||||
mtd-mac-address-increment = <2>;
|
||||
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <&phy0>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0 0 0 0 0>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
phy-mode = "rgmii";
|
||||
|
||||
qca,ar8327-initvals = <
|
||||
/* PORT0: RGMII, MAC0/6 exchange, tx_delay 01, No rx_delay */
|
||||
0x04 0x06400000
|
||||
0x08 0x00000000 /* PORT5 PAD MODE CTRL */
|
||||
0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
|
||||
0x7c 0x0000007e /* PORT0_STATUS */
|
||||
>;
|
||||
};
|
||||
};
|
|
@ -1,173 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "ar9344.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include "ar9344_devolo_dlan_wifi.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Devolo Magic 2 Wifi";
|
||||
compatible = "devolo,magic-2-wifi", "qca,ar9344";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_dlan_red;
|
||||
led-failsafe = &led_dlan_red;
|
||||
led-running = &led_dlan_white;
|
||||
led-upgrade = &led_dlan_red;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
wlan {
|
||||
label = "white:wlan";
|
||||
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
led_dlan_white: dlan_white {
|
||||
label = "white:dlan";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_dlan_red: dlan_red {
|
||||
label = "red:dlan";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
|
||||
panic-indicator;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "Reset button";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wifi {
|
||||
label = "WIFI button";
|
||||
linux,code = <KEY_RFKILL>;
|
||||
gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
dlan {
|
||||
label = "DLAN button";
|
||||
linux,code = <BTN_0>;
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpio {
|
||||
wlan_power {
|
||||
gpio-hog;
|
||||
line-name = "WLAN power";
|
||||
gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <25000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
uboot: partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
label = "Config1";
|
||||
reg = <0x50000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@60000 {
|
||||
label = "Config2";
|
||||
reg = <0x60000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@70000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x70000 0xf80000>;
|
||||
};
|
||||
|
||||
art: partition@ff0000 {
|
||||
label = "art";
|
||||
reg = <0xff0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ref {
|
||||
clock-frequency = <40000000>;
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
pll-data = <0x02000000 0x00000101 0x00001616>;
|
||||
|
||||
mtd-mac-address = <&art 0x1002>;
|
||||
mtd-mac-address-increment = <2>;
|
||||
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <&phy0>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0 0 0 0 0>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
phy-mode = "rgmii";
|
||||
|
||||
qca,ar8327-initvals = <
|
||||
/* PORT0: RGMII, MAC0/6 exchage, tx_delay 01, No rx_delay */
|
||||
0x04 0x06400000
|
||||
0x08 0x00000000 /* PORT5 PAD MODE CTRL */
|
||||
0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
|
||||
0x7c 0x0000007e /* PORT0_STATUS */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -144,10 +144,10 @@
|
|||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
pll-data = <0x0e000000 0x3c000101 0x3c001313>;
|
||||
pll-data = <0x02000000 0x00000101 0x00001313>;
|
||||
|
||||
/* ethernet MAC is stored in nvram */
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
phy-handle = <&phy4>;
|
||||
|
||||
gmac-config {
|
||||
|
|
38
target/linux/ath79/dts/qca9558_ubnt_rocket-5ac-lite.dts
Normal file
38
target/linux/ath79/dts/qca9558_ubnt_rocket-5ac-lite.dts
Normal file
|
@ -0,0 +1,38 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include "qca955x_ubnt_xc.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "ubnt,rocket-5ac-lite", "ubnt,xc", "qca,qca9558";
|
||||
model = "Ubiquiti Rocket 5AC Lite";
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "Reset button";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy-mask = <4>;
|
||||
phy4: ethernet-phy@4 {
|
||||
phy-mode = "sgmii";
|
||||
reg = <4>;
|
||||
at803x-override-sgmii-link-check;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&art 0x0>;
|
||||
phy-mode = "sgmii";
|
||||
phy-handle = <&phy4>;
|
||||
};
|
166
target/linux/ath79/dts/qca9561_nec_wf1200cr.dts
Normal file
166
target/linux/ath79/dts/qca9561_nec_wf1200cr.dts
Normal file
|
@ -0,0 +1,166 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca956x.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "NEC Aterm WF1200CR";
|
||||
compatible = "nec,wf1200cr", "qca,qca9561";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
/* other LEDs are connected to ath10k (QCA9888) gpiochip */
|
||||
|
||||
led_power_green: power_green {
|
||||
label = "green:power";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_power_red: power_red {
|
||||
label = "red:power";
|
||||
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
router {
|
||||
label = "rt";
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <BTN_0>;
|
||||
linux,input-type = <EV_SW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <25000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x000000 0x040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "devdata";
|
||||
reg = <0x040000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
label = "devconf";
|
||||
reg = <0x050000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@60000 {
|
||||
label = "misc";
|
||||
reg = <0x060000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@70000 {
|
||||
compatible = "seama";
|
||||
label = "firmware";
|
||||
reg = <0x070000 0x780000>;
|
||||
};
|
||||
|
||||
partition@7f0000 {
|
||||
label = "art";
|
||||
reg = <0x7f0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
pll-data = <0x03000101 0x00000101 0x00001919>;
|
||||
|
||||
phy-handle = <&swphy0>;
|
||||
|
||||
gmac-config {
|
||||
device = <&gmac>;
|
||||
|
||||
switch-phy-swap = <1>;
|
||||
switch-phy-addr-swap = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinmux_swled_enable_pins>;
|
||||
};
|
||||
|
||||
&gpio {
|
||||
switch_leds {
|
||||
gpio-hog;
|
||||
gpios = <14 GPIO_ACTIVE_HIGH>, /* WAN */
|
||||
<19 GPIO_ACTIVE_HIGH>; /* LAN */
|
||||
output-high;
|
||||
line-name = "led:wan-lan";
|
||||
};
|
||||
};
|
||||
|
||||
&pinmux {
|
||||
pinmux_swled_enable_pins: swled_enable_pins {
|
||||
pinctrl-single,bits =
|
||||
<0xc 0x240000 0xff0000>, /* WAN */
|
||||
<0x10 0x10000000 0xff000000>; /* LAN */
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
};
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
qca,no-eeprom;
|
||||
};
|
|
@ -178,6 +178,7 @@ compex,wpj531-16m)
|
|||
ucidef_set_led_rssi "sig3" "SIG3" "green:sig3" "wlan0" "65" "100"
|
||||
ucidef_set_led_rssi "sig4" "SIG4" "green:sig4" "wlan0" "50" "100"
|
||||
;;
|
||||
devolo,dlan-pro-1200plus-ac|\
|
||||
devolo,magic-2-wifi)
|
||||
ucidef_set_led_netdev "plcw" "dLAN" "white:dlan" "eth0.1" "rx"
|
||||
;;
|
||||
|
|
|
@ -86,6 +86,7 @@ ath79_setup_interfaces()
|
|||
ubnt,powerbeam-5ac-500|\
|
||||
ubnt,powerbeam-5ac-gen2|\
|
||||
ubnt,powerbridge-m|\
|
||||
ubnt,rocket-5ac-lite|\
|
||||
ubnt,rocket-m|\
|
||||
ubnt,unifiac-lite|\
|
||||
ubnt,unifiac-lr|\
|
||||
|
@ -210,6 +211,7 @@ ath79_setup_interfaces()
|
|||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "3:lan" "2:wan"
|
||||
;;
|
||||
devolo,dlan-pro-1200plus-ac|\
|
||||
devolo,magic-2-wifi)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:wan" "3:lan" "4:lan"
|
||||
|
@ -300,6 +302,11 @@ ath79_setup_interfaces()
|
|||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
|
||||
;;
|
||||
nec,wf1200cr)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan"
|
||||
;;
|
||||
nec,wg1200cr|\
|
||||
qxwlan,e1700ac-v2-8m|\
|
||||
qxwlan,e1700ac-v2-16m|\
|
||||
|
@ -503,6 +510,7 @@ ath79_setup_macs()
|
|||
compex,wpj563)
|
||||
wan_mac=$(mtd_get_mac_binary u-boot 0x2e018)
|
||||
;;
|
||||
devolo,dlan-pro-1200plus-ac|\
|
||||
devolo,magic-2-wifi)
|
||||
label_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" 3)
|
||||
;;
|
||||
|
@ -598,6 +606,7 @@ ath79_setup_macs()
|
|||
base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
|
||||
wan_mac=$(macaddr_add "$base_mac" 1)
|
||||
;;
|
||||
nec,wf1200cr|\
|
||||
nec,wg1200cr)
|
||||
lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
|
||||
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
|
||||
|
|
|
@ -31,6 +31,9 @@ telco,t1)
|
|||
ucidef_add_gpio_switch "lte_poweroff" "LTE Poweroff" "1" "1"
|
||||
ucidef_add_gpio_switch "lte_reset" "LTE Reset" "12" "1"
|
||||
;;
|
||||
devolo,dlan-pro-1200plus-ac)
|
||||
ucidef_add_gpio_switch "plc_enable" "PLC enable" "13" "0"
|
||||
;;
|
||||
devolo,magic-2-wifi)
|
||||
ucidef_add_gpio_switch "plc_pairing" "PLC pairing" "11" "1"
|
||||
ucidef_add_gpio_switch "plc_enable" "PLC enable" "13" "1"
|
||||
|
|
|
@ -32,6 +32,7 @@ case "$FIRMWARE" in
|
|||
dlink,dir-842-c2|\
|
||||
dlink,dir-842-c3|\
|
||||
dlink,dir-859-a1|\
|
||||
nec,wf1200cr|\
|
||||
nec,wg1200cr|\
|
||||
wd,mynet-n750)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
|
|
|
@ -23,6 +23,7 @@ case "$FIRMWARE" in
|
|||
;;
|
||||
comfast,cf-wr650ac-v1|\
|
||||
comfast,cf-wr650ac-v2|\
|
||||
devolo,dlan-pro-1200plus-ac|\
|
||||
devolo,magic-2-wifi|\
|
||||
qxwlan,e1700ac-v2-8m|\
|
||||
qxwlan,e1700ac-v2-16m|\
|
||||
|
@ -42,6 +43,7 @@ case "$FIRMWARE" in
|
|||
ubnt,nanostation-ac-loco|\
|
||||
ubnt,powerbeam-5ac-500|\
|
||||
ubnt,powerbeam-5ac-gen2|\
|
||||
ubnt,rocket-5ac-lite|\
|
||||
ubnt,unifiac-pro|\
|
||||
yuncore,a770)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
|
@ -200,6 +202,7 @@ case "$FIRMWARE" in
|
|||
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
|
||||
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
|
||||
;;
|
||||
nec,wf1200cr|\
|
||||
nec,wg1200cr)
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_ascii devdata wlan5mac)
|
||||
|
|
|
@ -337,6 +337,15 @@ define Device/ubnt_powerbridge-m
|
|||
endef
|
||||
TARGET_DEVICES += ubnt_powerbridge-m
|
||||
|
||||
define Device/ubnt_rocket-5ac-lite
|
||||
$(Device/ubnt-xc)
|
||||
SOC := qca9558
|
||||
DEVICE_MODEL := Rocket 5AC
|
||||
DEVICE_VARIANT := Lite
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
endef
|
||||
TARGET_DEVICES += ubnt_rocket-5ac-lite
|
||||
|
||||
define Device/ubnt_rocket-m
|
||||
$(Device/ubnt-xm)
|
||||
SOC := ar7241
|
||||
|
|
|
@ -691,6 +691,15 @@ define Device/compex_wpj563
|
|||
endef
|
||||
TARGET_DEVICES += compex_wpj563
|
||||
|
||||
define Device/devolo_dlan-pro-1200plus-ac
|
||||
SOC := ar9344
|
||||
DEVICE_VENDOR := Devolo
|
||||
DEVICE_MODEL := dLAN pro 1200+ WiFi ac
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
IMAGE_SIZE := 15872k
|
||||
endef
|
||||
TARGET_DEVICES += devolo_dlan-pro-1200plus-ac
|
||||
|
||||
define Device/devolo_dvl1200e
|
||||
SOC := qca9558
|
||||
DEVICE_VENDOR := devolo
|
||||
|
@ -1435,20 +1444,37 @@ define Device/mercury_mw4530r-v1
|
|||
endef
|
||||
TARGET_DEVICES += mercury_mw4530r-v1
|
||||
|
||||
define Device/nec_wg1200cr
|
||||
SOC := qca9563
|
||||
define Device/nec_wx1200cr
|
||||
DEVICE_VENDOR := NEC
|
||||
IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
|
||||
IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \
|
||||
append-metadata | check-size
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
|
||||
endef
|
||||
|
||||
define Device/nec_wf1200cr
|
||||
$(Device/nec_wx1200cr)
|
||||
SOC := qca9561
|
||||
DEVICE_MODEL := Aterm WF1200CR
|
||||
IMAGE_SIZE := 7680k
|
||||
SEAMA_MTDBLOCK := 5
|
||||
SEAMA_SIGNATURE := wrgac62_necpf.2016gui_wf1200cr
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \
|
||||
seama-seal | nec-enc ryztfyutcrqqo69d | check-size
|
||||
endef
|
||||
TARGET_DEVICES += nec_wf1200cr
|
||||
|
||||
define Device/nec_wg1200cr
|
||||
$(Device/nec_wx1200cr)
|
||||
SOC := qca9563
|
||||
DEVICE_MODEL := Aterm WG1200CR
|
||||
IMAGE_SIZE := 7616k
|
||||
SEAMA_MTDBLOCK := 6
|
||||
SEAMA_SIGNATURE := wrgac72_necpf.2016gui_wg1200cr
|
||||
IMAGES += factory.bin
|
||||
IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
|
||||
IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \
|
||||
append-metadata | check-size
|
||||
IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \
|
||||
seama-seal | nec-enc 9gsiy9nzep452pad | check-size
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
|
||||
endef
|
||||
TARGET_DEVICES += nec_wg1200cr
|
||||
|
||||
|
|
|
@ -0,0 +1,108 @@
|
|||
From c329e5afb42ff0a88285eb4d8a391a18793e4777 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Thu, 15 Apr 2021 03:26:50 +0200
|
||||
Subject: [PATCH] net: phy: at803x: select correct page on config init
|
||||
|
||||
The Atheros AR8031 and AR8033 expose different registers for SGMII/Fiber
|
||||
as well as the copper side of the PHY depending on the BT_BX_REG_SEL bit
|
||||
in the chip configure register.
|
||||
|
||||
The driver assumes the copper side is selected on probe, but this might
|
||||
not be the case depending which page was last selected by the
|
||||
bootloader. Notably, Ubiquiti UniFi bootloaders show this behavior.
|
||||
|
||||
Select the copper page when probing to circumvent this.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 50 +++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 49 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -139,6 +139,9 @@
|
||||
#define ATH8035_PHY_ID 0x004dd072
|
||||
#define AT8030_PHY_ID_MASK 0xffffffef
|
||||
|
||||
+#define AT803X_PAGE_FIBER 0
|
||||
+#define AT803X_PAGE_COPPER 1
|
||||
+
|
||||
MODULE_DESCRIPTION("Qualcomm Atheros AR803x PHY driver");
|
||||
MODULE_AUTHOR("Matus Ujhelyi");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -190,6 +193,35 @@ static int at803x_debug_reg_mask(struct
|
||||
return phy_write(phydev, AT803X_DEBUG_DATA, val);
|
||||
}
|
||||
|
||||
+static int at803x_write_page(struct phy_device *phydev, int page)
|
||||
+{
|
||||
+ int mask;
|
||||
+ int set;
|
||||
+
|
||||
+ if (page == AT803X_PAGE_COPPER) {
|
||||
+ set = AT803X_BT_BX_REG_SEL;
|
||||
+ mask = 0;
|
||||
+ } else {
|
||||
+ set = 0;
|
||||
+ mask = AT803X_BT_BX_REG_SEL;
|
||||
+ }
|
||||
+
|
||||
+ return __phy_modify(phydev, AT803X_REG_CHIP_CONFIG, mask, set);
|
||||
+}
|
||||
+
|
||||
+static int at803x_read_page(struct phy_device *phydev)
|
||||
+{
|
||||
+ int ccr = __phy_read(phydev, AT803X_REG_CHIP_CONFIG);
|
||||
+
|
||||
+ if (ccr < 0)
|
||||
+ return ccr;
|
||||
+
|
||||
+ if (ccr & AT803X_BT_BX_REG_SEL)
|
||||
+ return AT803X_PAGE_COPPER;
|
||||
+
|
||||
+ return AT803X_PAGE_FIBER;
|
||||
+}
|
||||
+
|
||||
static int at803x_enable_rx_delay(struct phy_device *phydev)
|
||||
{
|
||||
return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, 0,
|
||||
@@ -508,6 +540,7 @@ static int at803x_probe(struct phy_devic
|
||||
{
|
||||
struct device *dev = &phydev->mdio.dev;
|
||||
struct at803x_priv *priv;
|
||||
+ int ret;
|
||||
|
||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
@@ -515,7 +548,20 @@ static int at803x_probe(struct phy_devic
|
||||
|
||||
phydev->priv = priv;
|
||||
|
||||
- return at803x_parse_dt(phydev);
|
||||
+ ret = at803x_parse_dt(phydev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Some bootloaders leave the fiber page selected.
|
||||
+ * Switch to the copper page, as otherwise we read
|
||||
+ * the PHY capabilities from the fiber side.
|
||||
+ */
|
||||
+ if (at803x_match_phy_id(phydev, ATH8031_PHY_ID)) {
|
||||
+ ret = phy_select_page(phydev, AT803X_PAGE_COPPER);
|
||||
+ ret = phy_restore_page(phydev, AT803X_PAGE_COPPER, ret);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static void at803x_remove(struct phy_device *phydev)
|
||||
@@ -1097,6 +1143,8 @@ static struct phy_driver at803x_driver[]
|
||||
.get_wol = at803x_get_wol,
|
||||
.suspend = at803x_suspend,
|
||||
.resume = at803x_resume,
|
||||
+ .read_page = at803x_read_page,
|
||||
+ .write_page = at803x_write_page,
|
||||
/* PHY_GBIT_FEATURES */
|
||||
.read_status = at803x_read_status,
|
||||
.aneg_done = at803x_aneg_done,
|
|
@ -0,0 +1,73 @@
|
|||
From 8f7e876273e294b732b42af2e5e6bba91d798954 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Walle <michael@walle.cc>
|
||||
Date: Tue, 20 Apr 2021 12:29:29 +0200
|
||||
Subject: [PATCH] net: phy: at803x: fix probe error if copper page is selected
|
||||
|
||||
The commit c329e5afb42f ("net: phy: at803x: select correct page on
|
||||
config init") selects the copper page during probe. This fails if the
|
||||
copper page was already selected. In this case, the value of the copper
|
||||
page (which is 1) is propagated through phy_restore_page() and is
|
||||
finally returned for at803x_probe(). Fix it, by just using the
|
||||
at803x_page_write() directly.
|
||||
|
||||
Also in case of an error, the regulator is not disabled and leads to a
|
||||
WARN_ON() when the probe fails. This couldn't happen before, because
|
||||
at803x_parse_dt() was the last call in at803x_probe(). It is hard to
|
||||
see, that the parse_dt() actually enables the regulator. Thus move the
|
||||
regulator_enable() to the probe function and undo it in case of an
|
||||
error.
|
||||
|
||||
Fixes: c329e5afb42f ("net: phy: at803x: select correct page on config init")
|
||||
Signed-off-by: Michael Walle <michael@walle.cc>
|
||||
Reviewed-by: David Bauer <mail@david-bauer.net>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 23 +++++++++++++++++------
|
||||
1 file changed, 17 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -527,10 +527,6 @@ static int at803x_parse_dt(struct phy_de
|
||||
phydev_err(phydev, "failed to get VDDIO regulator\n");
|
||||
return PTR_ERR(priv->vddio);
|
||||
}
|
||||
-
|
||||
- ret = regulator_enable(priv->vddio);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -552,15 +548,30 @@ static int at803x_probe(struct phy_devic
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ if (priv->vddio) {
|
||||
+ ret = regulator_enable(priv->vddio);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
/* Some bootloaders leave the fiber page selected.
|
||||
* Switch to the copper page, as otherwise we read
|
||||
* the PHY capabilities from the fiber side.
|
||||
*/
|
||||
if (at803x_match_phy_id(phydev, ATH8031_PHY_ID)) {
|
||||
- ret = phy_select_page(phydev, AT803X_PAGE_COPPER);
|
||||
- ret = phy_restore_page(phydev, AT803X_PAGE_COPPER, ret);
|
||||
+ phy_lock_mdio_bus(phydev);
|
||||
+ ret = at803x_write_page(phydev, AT803X_PAGE_COPPER);
|
||||
+ phy_unlock_mdio_bus(phydev);
|
||||
+ if (ret)
|
||||
+ goto err;
|
||||
}
|
||||
|
||||
+ return 0;
|
||||
+
|
||||
+err:
|
||||
+ if (priv->vddio)
|
||||
+ regulator_disable(priv->vddio);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
From c329e5afb42ff0a88285eb4d8a391a18793e4777 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Thu, 15 Apr 2021 03:26:50 +0200
|
||||
Subject: [PATCH] net: phy: at803x: select correct page on config init
|
||||
|
||||
The Atheros AR8031 and AR8033 expose different registers for SGMII/Fiber
|
||||
as well as the copper side of the PHY depending on the BT_BX_REG_SEL bit
|
||||
in the chip configure register.
|
||||
|
||||
The driver assumes the copper side is selected on probe, but this might
|
||||
not be the case depending which page was last selected by the
|
||||
bootloader. Notably, Ubiquiti UniFi bootloaders show this behavior.
|
||||
|
||||
Select the copper page when probing to circumvent this.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 50 +++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 49 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -67,6 +67,9 @@
|
||||
#define ATH8035_PHY_ID 0x004dd072
|
||||
#define AT803X_PHY_ID_MASK 0xffffffef
|
||||
|
||||
+#define AT803X_PAGE_FIBER 0
|
||||
+#define AT803X_PAGE_COPPER 1
|
||||
+
|
||||
MODULE_DESCRIPTION("Atheros 803x PHY driver");
|
||||
MODULE_AUTHOR("Matus Ujhelyi");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -112,6 +115,35 @@ static int at803x_debug_reg_mask(struct
|
||||
return phy_write(phydev, AT803X_DEBUG_DATA, val);
|
||||
}
|
||||
|
||||
+static int at803x_write_page(struct phy_device *phydev, int page)
|
||||
+{
|
||||
+ int mask;
|
||||
+ int set;
|
||||
+
|
||||
+ if (page == AT803X_PAGE_COPPER) {
|
||||
+ set = AT803X_BT_BX_REG_SEL;
|
||||
+ mask = 0;
|
||||
+ } else {
|
||||
+ set = 0;
|
||||
+ mask = AT803X_BT_BX_REG_SEL;
|
||||
+ }
|
||||
+
|
||||
+ return __phy_modify(phydev, AT803X_REG_CHIP_CONFIG, mask, set);
|
||||
+}
|
||||
+
|
||||
+static int at803x_read_page(struct phy_device *phydev)
|
||||
+{
|
||||
+ int ccr = __phy_read(phydev, AT803X_REG_CHIP_CONFIG);
|
||||
+
|
||||
+ if (ccr < 0)
|
||||
+ return ccr;
|
||||
+
|
||||
+ if (ccr & AT803X_BT_BX_REG_SEL)
|
||||
+ return AT803X_PAGE_COPPER;
|
||||
+
|
||||
+ return AT803X_PAGE_FIBER;
|
||||
+}
|
||||
+
|
||||
static int at803x_enable_rx_delay(struct phy_device *phydev)
|
||||
{
|
||||
return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, 0,
|
||||
@@ -244,6 +276,7 @@ static int at803x_probe(struct phy_devic
|
||||
{
|
||||
struct device *dev = &phydev->mdio.dev;
|
||||
struct at803x_priv *priv;
|
||||
+ int ret;
|
||||
|
||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
@@ -251,7 +284,16 @@ static int at803x_probe(struct phy_devic
|
||||
|
||||
phydev->priv = priv;
|
||||
|
||||
- return 0;
|
||||
+ /* Some bootloaders leave the fiber page selected.
|
||||
+ * Switch to the copper page, as otherwise we read
|
||||
+ * the PHY capabilities from the fiber side.
|
||||
+ */
|
||||
+ if ((phydev->phy_id & phydev->drv->phy_id_mask) == (ATH8031_PHY_ID & phydev->drv->phy_id_mask)) {
|
||||
+ ret = phy_select_page(phydev, AT803X_PAGE_COPPER);
|
||||
+ ret = phy_restore_page(phydev, AT803X_PAGE_COPPER, ret);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int at803x_config_init(struct phy_device *phydev)
|
||||
@@ -466,6 +508,8 @@ static struct phy_driver at803x_driver[]
|
||||
.get_wol = at803x_get_wol,
|
||||
.suspend = at803x_suspend,
|
||||
.resume = at803x_resume,
|
||||
+ .read_page = at803x_read_page,
|
||||
+ .write_page = at803x_write_page,
|
||||
/* PHY_GBIT_FEATURES */
|
||||
.read_status = at803x_read_status,
|
||||
.aneg_done = at803x_aneg_done,
|
|
@ -0,0 +1,41 @@
|
|||
From 8f7e876273e294b732b42af2e5e6bba91d798954 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Walle <michael@walle.cc>
|
||||
Date: Tue, 20 Apr 2021 12:29:29 +0200
|
||||
Subject: [PATCH] net: phy: at803x: fix probe error if copper page is selected
|
||||
|
||||
The commit c329e5afb42f ("net: phy: at803x: select correct page on
|
||||
config init") selects the copper page during probe. This fails if the
|
||||
copper page was already selected. In this case, the value of the copper
|
||||
page (which is 1) is propagated through phy_restore_page() and is
|
||||
finally returned for at803x_probe(). Fix it, by just using the
|
||||
at803x_page_write() directly.
|
||||
|
||||
Also in case of an error, the regulator is not disabled and leads to a
|
||||
WARN_ON() when the probe fails. This couldn't happen before, because
|
||||
at803x_parse_dt() was the last call in at803x_probe(). It is hard to
|
||||
see, that the parse_dt() actually enables the regulator. Thus move the
|
||||
regulator_enable() to the probe function and undo it in case of an
|
||||
error.
|
||||
|
||||
Fixes: c329e5afb42f ("net: phy: at803x: select correct page on config init")
|
||||
Signed-off-by: Michael Walle <michael@walle.cc>
|
||||
Reviewed-by: David Bauer <mail@david-bauer.net>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 23 +++++++++++++++++------
|
||||
1 file changed, 17 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -289,8 +289,9 @@ static int at803x_probe(struct phy_devic
|
||||
* the PHY capabilities from the fiber side.
|
||||
*/
|
||||
if ((phydev->phy_id & phydev->drv->phy_id_mask) == (ATH8031_PHY_ID & phydev->drv->phy_id_mask)) {
|
||||
- ret = phy_select_page(phydev, AT803X_PAGE_COPPER);
|
||||
- ret = phy_restore_page(phydev, AT803X_PAGE_COPPER, ret);
|
||||
+ mutex_lock(&phydev->mdio.bus->mdio_lock);
|
||||
+ ret = at803x_write_page(phydev, AT803X_PAGE_COPPER);
|
||||
+ mutex_unlock(&phydev->mdio.bus->mdio_lock);
|
||||
}
|
||||
|
||||
return ret;
|
|
@ -1,51 +0,0 @@
|
|||
From: Roman Yeryomin <roman@advem.lv>
|
||||
Subject: kernel: add at803x fix for sgmii mode
|
||||
|
||||
Some (possibly broken) bootloaders incorreclty initialize at8033
|
||||
phy. This patch enables sgmii autonegotiation mode.
|
||||
|
||||
[john@phrozen.org: felix added this to his upstream queue]
|
||||
|
||||
Signed-off-by: Roman Yeryomin <roman@advem.lv>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -76,6 +76,7 @@
|
||||
#define AT803X_LOC_MAC_ADDR_32_47_OFFSET 0x804A
|
||||
#define AT803X_REG_CHIP_CONFIG 0x1f
|
||||
#define AT803X_BT_BX_REG_SEL 0x8000
|
||||
+#define AT803X_SGMII_ANEG_EN 0x1000
|
||||
|
||||
#define AT803X_DEBUG_ADDR 0x1D
|
||||
#define AT803X_DEBUG_DATA 0x1E
|
||||
@@ -562,6 +563,27 @@ static int at8031_pll_config(struct phy_
|
||||
static int at803x_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
+ u32 v;
|
||||
+
|
||||
+ if (phydev->drv->phy_id == ATH8031_PHY_ID &&
|
||||
+ phydev->interface == PHY_INTERFACE_MODE_SGMII)
|
||||
+ {
|
||||
+ v = phy_read(phydev, AT803X_REG_CHIP_CONFIG);
|
||||
+ /* select SGMII/fiber page */
|
||||
+ ret = phy_write(phydev, AT803X_REG_CHIP_CONFIG,
|
||||
+ v & ~AT803X_BT_BX_REG_SEL);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ /* enable SGMII autonegotiation */
|
||||
+ ret = phy_write(phydev, MII_BMCR, AT803X_SGMII_ANEG_EN);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ /* select copper page */
|
||||
+ ret = phy_write(phydev, AT803X_REG_CHIP_CONFIG,
|
||||
+ v | AT803X_BT_BX_REG_SEL);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
/* The RX and TX delay default is:
|
||||
* after HW reset: RX delay enabled and TX delay disabled
|
|
@ -1,36 +0,0 @@
|
|||
Add back explicit PHY feature flags for the AR8031 and
|
||||
AR8033 PHY instead of reading them from the PHY.
|
||||
|
||||
The Botloader for Ubiquiti UniFi AC boards (and possibly more)
|
||||
leave fiber page selected, thus we will end up reading the PHY
|
||||
capabilities of the SGMII side (which does not offer 10 Mbit/s).
|
||||
|
||||
We already have a hack in place, which switches back to the copper
|
||||
page, however this happens after capabilities are read.
|
||||
|
||||
The original conversation about 735-net-phy-at803x-fix-at8033-sgmii-mode
|
||||
back in 2015 explicitly mention the UniFi AC Lite. The issue however is
|
||||
not missing autonegotiation on the Fiber side, but the fact the PHY
|
||||
is never switched to the copper side. So half of this patch is superfluous.
|
||||
|
||||
A fix is currently being upstreamed. Once this is mainlined and available to us,
|
||||
these patches can be dropped:
|
||||
|
||||
735-net-phy-at803x-fix-at8033-sgmii-mode.patch
|
||||
736-net-phy-at803x-add-at8031-features.patch
|
||||
|
||||
This was tested on a UniFi AC Lite.
|
||||
|
||||
See https://patchwork.kernel.org/project/netdevbpf/list/?series=467341
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1119,7 +1119,7 @@ static struct phy_driver at803x_driver[]
|
||||
.get_wol = at803x_get_wol,
|
||||
.suspend = at803x_suspend,
|
||||
.resume = at803x_resume,
|
||||
- /* PHY_GBIT_FEATURES */
|
||||
+ .features = PHY_GBIT_FEATURES,
|
||||
.read_status = at803x_read_status,
|
||||
.aneg_done = at803x_aneg_done,
|
||||
.ack_interrupt = &at803x_ack_interrupt,
|
|
@ -1,51 +0,0 @@
|
|||
From: Roman Yeryomin <roman@advem.lv>
|
||||
Subject: kernel: add at803x fix for sgmii mode
|
||||
|
||||
Some (possibly broken) bootloaders incorreclty initialize at8033
|
||||
phy. This patch enables sgmii autonegotiation mode.
|
||||
|
||||
[john@phrozen.org: felix added this to his upstream queue]
|
||||
|
||||
Signed-off-by: Roman Yeryomin <roman@advem.lv>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -46,6 +46,7 @@
|
||||
#define AT803X_LOC_MAC_ADDR_32_47_OFFSET 0x804A
|
||||
#define AT803X_REG_CHIP_CONFIG 0x1f
|
||||
#define AT803X_BT_BX_REG_SEL 0x8000
|
||||
+#define AT803X_SGMII_ANEG_EN 0x1000
|
||||
|
||||
#define AT803X_DEBUG_ADDR 0x1D
|
||||
#define AT803X_DEBUG_DATA 0x1E
|
||||
@@ -259,6 +260,27 @@ static int at803x_probe(struct phy_devic
|
||||
static int at803x_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
+ u32 v;
|
||||
+
|
||||
+ if (phydev->drv->phy_id == ATH8031_PHY_ID &&
|
||||
+ phydev->interface == PHY_INTERFACE_MODE_SGMII)
|
||||
+ {
|
||||
+ v = phy_read(phydev, AT803X_REG_CHIP_CONFIG);
|
||||
+ /* select SGMII/fiber page */
|
||||
+ ret = phy_write(phydev, AT803X_REG_CHIP_CONFIG,
|
||||
+ v & ~AT803X_BT_BX_REG_SEL);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ /* enable SGMII autonegotiation */
|
||||
+ ret = phy_write(phydev, MII_BMCR, AT803X_SGMII_ANEG_EN);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ /* select copper page */
|
||||
+ ret = phy_write(phydev, AT803X_REG_CHIP_CONFIG,
|
||||
+ v | AT803X_BT_BX_REG_SEL);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
/* The RX and TX delay default is:
|
||||
* after HW reset: RX delay enabled and TX delay disabled
|
|
@ -1,36 +0,0 @@
|
|||
Add back explicit PHY feature flags for the AR8031 and
|
||||
AR8033 PHY instead of reading them from the PHY.
|
||||
|
||||
The Botloader for Ubiquiti UniFi AC boards (and possibly more)
|
||||
leave fiber page selected, thus we will end up reading the PHY
|
||||
capabilities of the SGMII side (which does not offer 10 Mbit/s).
|
||||
|
||||
We already have a hack in place, which switches back to the copper
|
||||
page, however this happens after capabilities are read.
|
||||
|
||||
The original conversation about 735-net-phy-at803x-fix-at8033-sgmii-mode
|
||||
back in 2015 explicitly mention the UniFi AC Lite. The issue however is
|
||||
not missing autonegotiation on the Fiber side, but the fact the PHY
|
||||
is never switched to the copper side. So half of this patch is superfluous.
|
||||
|
||||
A fix is currently being upstreamed. Once this is mainlined and available to us,
|
||||
these patches can be dropped:
|
||||
|
||||
735-net-phy-at803x-fix-at8033-sgmii-mode.patch
|
||||
736-net-phy-at803x-add-at8031-features.patch
|
||||
|
||||
This was tested on a UniFi AC Lite.
|
||||
|
||||
See https://patchwork.kernel.org/project/netdevbpf/list/?series=467341
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -490,7 +490,7 @@ static struct phy_driver at803x_driver[]
|
||||
.get_wol = at803x_get_wol,
|
||||
.suspend = at803x_suspend,
|
||||
.resume = at803x_resume,
|
||||
- /* PHY_GBIT_FEATURES */
|
||||
+ .features = PHY_GBIT_FEATURES,
|
||||
.read_status = at803x_read_status,
|
||||
.aneg_done = at803x_aneg_done,
|
||||
.ack_interrupt = &at803x_ack_interrupt,
|
|
@ -10,32 +10,33 @@ board_config_update
|
|||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
"checkpoint,l-50")
|
||||
checkpoint,l-50)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 dmz" "eth0"
|
||||
;;
|
||||
"cisco,on100")
|
||||
cisco,on100)
|
||||
ucidef_set_interface_lan "eth0 eth1"
|
||||
;;
|
||||
"cloudengines,pogoe02"|\
|
||||
"cloudengines,pogoplugv4"|\
|
||||
"iom,iconnect-1.1"|\
|
||||
"iom,ix2-200"|\
|
||||
"raidsonic,ib-nas62x0"|\
|
||||
"seagate,blackarmor-nas220"|\
|
||||
"seagate,dockstar"|\
|
||||
"seagate,goflexhome"|\
|
||||
"seagate,goflexnet"|\
|
||||
"zyxel,nsa310s")
|
||||
cloudengines,pogoe02|\
|
||||
cloudengines,pogoplugv4|\
|
||||
globalscale,sheevaplug|\
|
||||
iom,iconnect-1.1|\
|
||||
iom,ix2-200|\
|
||||
raidsonic,ib-nas62x0|\
|
||||
seagate,blackarmor-nas220|\
|
||||
seagate,dockstar|\
|
||||
seagate,goflexhome|\
|
||||
seagate,goflexnet|\
|
||||
zyxel,nsa310s)
|
||||
ucidef_set_interface_lan "eth0" "dhcp"
|
||||
;;
|
||||
"linksys,e4200-v2"|\
|
||||
"linksys,ea3500"|\
|
||||
"linksys,ea4500")
|
||||
linksys,e4200-v2|\
|
||||
linksys,ea3500|\
|
||||
linksys,ea4500)
|
||||
ucidef_set_interfaces_lan_wan "ethernet1 ethernet2 ethernet3 ethernet4" "internet"
|
||||
ucidef_set_interface_macaddr "wan" $( mtd_get_mac_ascii u_env eth1addr )
|
||||
;;
|
||||
"zyxel,nsa310b"|\
|
||||
"zyxel,nsa325")
|
||||
zyxel,nsa310b|\
|
||||
zyxel,nsa325)
|
||||
ucidef_set_interface_lan "eth0" "dhcp"
|
||||
ucidef_set_interface_macaddr "lan" $( mtd_get_mac_ascii uboot_env ethaddr )
|
||||
;;
|
||||
|
|
|
@ -67,6 +67,13 @@ define Device/cloudengines_pogoplugv4
|
|||
endef
|
||||
TARGET_DEVICES += cloudengines_pogoplugv4
|
||||
|
||||
define Device/globalscale_sheevaplug
|
||||
DEVICE_VENDOR := Globalscale
|
||||
DEVICE_MODEL := Sheevaplug
|
||||
DEVICE_PACKAGES := kmod-mvsdio
|
||||
endef
|
||||
TARGET_DEVICES += globalscale_sheevaplug
|
||||
|
||||
define Device/iom_iconnect-1.1
|
||||
DEVICE_VENDOR := Iomega
|
||||
DEVICE_MODEL := Iconnect
|
||||
|
|
47
target/linux/kirkwood/patches-5.10/112-sheevaplug.patch
Normal file
47
target/linux/kirkwood/patches-5.10/112-sheevaplug.patch
Normal file
|
@ -0,0 +1,47 @@
|
|||
--- a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
|
||||
@@ -78,13 +78,8 @@
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
- label = "uImage";
|
||||
- reg = <0x0100000 0x400000>;
|
||||
- };
|
||||
-
|
||||
- partition@500000 {
|
||||
- label = "root";
|
||||
- reg = <0x0500000 0x1fb00000>;
|
||||
+ label = "ubi";
|
||||
+ reg = <0x0100000 0x1ff00000>;
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm/boot/dts/kirkwood-sheevaplug.dts
|
||||
+++ b/arch/arm/boot/dts/kirkwood-sheevaplug.dts
|
||||
@@ -13,6 +13,13 @@
|
||||
model = "Globalscale Technologies SheevaPlug";
|
||||
compatible = "globalscale,sheevaplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
|
||||
|
||||
+ aliases {
|
||||
+ led-boot = &led_health;
|
||||
+ led-failsafe = &led_health;
|
||||
+ led-running = &led_health;
|
||||
+ led-upgrade = &led_health;
|
||||
+ };
|
||||
+
|
||||
ocp@f1000000 {
|
||||
mvsdio@90000 {
|
||||
pinctrl-0 = <&pmx_sdio>;
|
||||
@@ -28,10 +35,10 @@
|
||||
pinctrl-0 = <&pmx_led_blue &pmx_led_red>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
- health {
|
||||
+ led_health: health {
|
||||
label = "sheevaplug:blue:health";
|
||||
gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
|
||||
- default-state = "keep";
|
||||
+ default-state = "on";
|
||||
};
|
||||
|
||||
misc {
|
47
target/linux/kirkwood/patches-5.4/112-sheevaplug.patch
Normal file
47
target/linux/kirkwood/patches-5.4/112-sheevaplug.patch
Normal file
|
@ -0,0 +1,47 @@
|
|||
--- a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
|
||||
@@ -78,13 +78,8 @@
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
- label = "uImage";
|
||||
- reg = <0x0100000 0x400000>;
|
||||
- };
|
||||
-
|
||||
- partition@500000 {
|
||||
- label = "root";
|
||||
- reg = <0x0500000 0x1fb00000>;
|
||||
+ label = "ubi";
|
||||
+ reg = <0x0100000 0x1ff00000>;
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm/boot/dts/kirkwood-sheevaplug.dts
|
||||
+++ b/arch/arm/boot/dts/kirkwood-sheevaplug.dts
|
||||
@@ -13,6 +13,13 @@
|
||||
model = "Globalscale Technologies SheevaPlug";
|
||||
compatible = "globalscale,sheevaplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
|
||||
|
||||
+ aliases {
|
||||
+ led-boot = &led_health;
|
||||
+ led-failsafe = &led_health;
|
||||
+ led-running = &led_health;
|
||||
+ led-upgrade = &led_health;
|
||||
+ };
|
||||
+
|
||||
ocp@f1000000 {
|
||||
mvsdio@90000 {
|
||||
pinctrl-0 = <&pmx_sdio>;
|
||||
@@ -28,10 +35,10 @@
|
||||
pinctrl-0 = <&pmx_led_blue &pmx_led_red>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
- health {
|
||||
+ led_health: health {
|
||||
label = "sheevaplug:blue:health";
|
||||
gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
|
||||
- default-state = "keep";
|
||||
+ default-state = "on";
|
||||
};
|
||||
|
||||
misc {
|
|
@ -6,8 +6,8 @@ reorder_layerscape_interfaces() {
|
|||
|
||||
board=$(cat /tmp/sysinfo/board_name)
|
||||
case "$board" in
|
||||
"traverse,ls1043v" | \
|
||||
"traverse,ls1043s")
|
||||
traverse,ls1043v|\
|
||||
traverse,ls1043s)
|
||||
|
||||
# Reorder ethernet interfaces to match the physical order
|
||||
ip link set eth2 name fm1-mac3
|
||||
|
|
|
@ -41,7 +41,7 @@ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
|
|||
depends on BCM63XX || COMPILE_TEST
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -63,6 +63,8 @@
|
||||
@@ -62,6 +62,8 @@
|
||||
#define AT803X_DEBUG_REG_5 0x05
|
||||
#define AT803X_DEBUG_TX_CLK_DLY_EN BIT(8)
|
||||
|
||||
|
@ -50,8 +50,8 @@ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
|
|||
#define ATH8030_PHY_ID 0x004dd076
|
||||
#define ATH8031_PHY_ID 0x004dd074
|
||||
#define ATH8032_PHY_ID 0x004dd023
|
||||
@@ -257,6 +259,19 @@ static int at803x_probe(struct phy_devic
|
||||
return 0;
|
||||
@@ -299,10 +301,30 @@ static int at803x_probe(struct phy_devic
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static void at803x_enable_smart_eee(struct phy_device *phydev, int on)
|
||||
|
@ -70,9 +70,6 @@ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
|
|||
static int at803x_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
@@ -282,6 +297,13 @@ static int at803x_config_init(struct phy
|
||||
return ret;
|
||||
}
|
||||
|
||||
+
|
||||
+#ifdef CONFIG_AT803X_PHY_SMART_EEE
|
||||
|
|
|
@ -28,10 +28,10 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
|||
#define AT803X_REG_CHIP_CONFIG 0x1f
|
||||
#define AT803X_BT_BX_REG_SEL 0x8000
|
||||
+#define AT803X_SMARTEEE_DISABLED_VAL 0x1000
|
||||
#define AT803X_SGMII_ANEG_EN 0x1000
|
||||
|
||||
#define AT803X_DEBUG_ADDR 0x1D
|
||||
@@ -65,6 +70,9 @@
|
||||
#define AT803X_DEBUG_DATA 0x1E
|
||||
@@ -64,6 +69,9 @@
|
||||
|
||||
#define AT803X_LPI_EN BIT(8)
|
||||
|
||||
|
@ -41,9 +41,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
|||
#define ATH8030_PHY_ID 0x004dd076
|
||||
#define ATH8031_PHY_ID 0x004dd074
|
||||
#define ATH8032_PHY_ID 0x004dd023
|
||||
@@ -72,12 +80,16 @@
|
||||
#define AT803X_PHY_ID_MASK 0xffffffef
|
||||
#define AT8032_PHY_ID_MASK 0xffffffff
|
||||
@@ -74,12 +82,16 @@
|
||||
#define AT803X_PAGE_FIBER 0
|
||||
#define AT803X_PAGE_COPPER 1
|
||||
|
||||
+#define AT803X_EEE_FEATURE_DISABLE (1 << 1)
|
||||
+#define AT803X_VDDIO_1P8V (1 << 2)
|
||||
|
@ -58,7 +58,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
|||
};
|
||||
|
||||
struct at803x_context {
|
||||
@@ -141,6 +153,39 @@ static int at803x_disable_tx_delay(struc
|
||||
@@ -172,6 +184,39 @@ static int at803x_disable_tx_delay(struc
|
||||
AT803X_DEBUG_TX_CLK_DLY_EN, 0);
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
|||
/* save relevant PHY registers to private copy */
|
||||
static void at803x_context_save(struct phy_device *phydev,
|
||||
struct at803x_context *context)
|
||||
@@ -254,6 +299,12 @@ static int at803x_probe(struct phy_devic
|
||||
@@ -286,6 +331,12 @@ static int at803x_probe(struct phy_devic
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -110,16 +110,16 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
|||
+
|
||||
phydev->priv = priv;
|
||||
|
||||
return 0;
|
||||
@@ -275,6 +326,7 @@ static void at803x_enable_smart_eee(stru
|
||||
/* Some bootloaders leave the fiber page selected.
|
||||
@@ -316,6 +367,7 @@ static void at803x_enable_smart_eee(stru
|
||||
|
||||
static int at803x_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
+ struct at803x_priv *priv = phydev->priv;
|
||||
u32 v;
|
||||
int ret;
|
||||
|
||||
if (phydev->drv->phy_id == ATH8031_PHY_ID &&
|
||||
@@ -323,6 +375,18 @@ static int at803x_config_init(struct phy
|
||||
|
||||
@@ -344,6 +396,18 @@ static int at803x_config_init(struct phy
|
||||
else
|
||||
ret = at803x_disable_tx_delay(phydev);
|
||||
|
||||
|
|
210
target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts
Normal file
210
target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts
Normal file
|
@ -0,0 +1,210 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "mt7620a.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "wavlink,wl-wn579x3", "ralink,mt7620a-soc";
|
||||
model = "Wavlink WL-WN579X3";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_wps;
|
||||
led-failsafe = &led_wps;
|
||||
led-running = &led_wps;
|
||||
led-upgrade = &led_wps;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
|
||||
switch_aps {
|
||||
label = "mode_aps";
|
||||
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <BTN_1>;
|
||||
linux,input-type = <EV_SW>;
|
||||
};
|
||||
|
||||
switch_repeater {
|
||||
label = "mode_repeater";
|
||||
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <BTN_0>;
|
||||
linux,input-type = <EV_SW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_wps: wps {
|
||||
label = "blue:wps";
|
||||
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
lan {
|
||||
label = "blue:lan";
|
||||
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wan {
|
||||
label = "blue:wan";
|
||||
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wifi {
|
||||
label = "blue:wifi";
|
||||
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
/* These three form the signal wifi strength segments */
|
||||
wifi_high {
|
||||
label = "blue:wifi_high";
|
||||
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wifi_medium {
|
||||
label = "blue:wifi_medium";
|
||||
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wifi_low {
|
||||
label = "blue:wifi_low";
|
||||
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpio2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "config";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@40000 {
|
||||
label = "factory";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x50000 0x790000>;
|
||||
};
|
||||
|
||||
partition@7e0000 {
|
||||
label = "board_data";
|
||||
reg = <0x7e0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@7f0000 {
|
||||
label = "nvram";
|
||||
reg = <0x7f0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
|
||||
port@4 {
|
||||
status = "okay";
|
||||
phy-handle = <&phy4>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
|
||||
port@5 {
|
||||
status = "okay";
|
||||
phy-handle = <&phy5>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
|
||||
mdio-bus {
|
||||
status = "okay";
|
||||
|
||||
phy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
|
||||
phy5: ethernet-phy@5 {
|
||||
reg = <5>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gsw {
|
||||
mediatek,port4 = "gmac";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
ralink,mtd-eeprom = <&factory 0x0>;
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "ephy", "i2c", "wled", "uartf";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
212
target/linux/ramips/dts/mt7621_sercomm_na502.dts
Normal file
212
target/linux/ramips/dts/mt7621_sercomm_na502.dts
Normal file
|
@ -0,0 +1,212 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "mt7621.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "sercomm,na502", "mediatek,mt7621-soc";
|
||||
model = "SERCOMM NA502";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power: power {
|
||||
label = "green:power";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
internet {
|
||||
label = "green:internet";
|
||||
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wifi {
|
||||
label = "green:wifi";
|
||||
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
zwave {
|
||||
label = "green:zwave";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
service {
|
||||
label = "green:service";
|
||||
gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
zigbee {
|
||||
label = "green:zigbee";
|
||||
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
bluetooth {
|
||||
label = "green:bluetooth";
|
||||
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
select {
|
||||
label = "select";
|
||||
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <BTN_0>;
|
||||
};
|
||||
|
||||
sync {
|
||||
label = "sync";
|
||||
gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RFKILL>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
|
||||
zwave_reset {
|
||||
gpio-export,name = "zwave_reset";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
zigbee_reset {
|
||||
gpio-export,name = "zigbee_reset";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
mtd-mac-address = <&factory 0xe000>;
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@80000 {
|
||||
label = "config";
|
||||
reg = <0x80000 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@100000 {
|
||||
label = "factory";
|
||||
reg = <0x100000 0x40000>;
|
||||
};
|
||||
|
||||
partition@140000 {
|
||||
label = "kernel1";
|
||||
reg = <0x140000 0x1400000>;
|
||||
};
|
||||
|
||||
partition@1540000 {
|
||||
label = "kernel";
|
||||
reg = <0x1540000 0x400000>;
|
||||
};
|
||||
|
||||
partition@1940000 {
|
||||
label = "ubi";
|
||||
reg = <0x1940000 0x1000000>;
|
||||
};
|
||||
|
||||
partition@2940000 {
|
||||
label = "user_storage";
|
||||
reg = <0x2940000 0x100000>;
|
||||
};
|
||||
|
||||
partition@2a40000 {
|
||||
label = "data";
|
||||
reg = <0x2a40000 0x1000000>;
|
||||
};
|
||||
|
||||
partition@3a40000 {
|
||||
label = "storage";
|
||||
reg = <0x3a40000 0x3200000>;
|
||||
};
|
||||
|
||||
partition@6c40000 {
|
||||
label = "backup";
|
||||
reg = <0x6c40000 0x1340000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||
mtd-mac-address = <&factory 0xe000>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x0000>;
|
||||
mtd-mac-address = <&factory 0xe000>;
|
||||
mtd-mac-address-increment = <2>;
|
||||
ieee80211-freq-limit = <2400000 2500000>;
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "jtag", "rgmii2";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@4 {
|
||||
status = "okay";
|
||||
label = "lan";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uartlite2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uartlite3 {
|
||||
status = "okay";
|
||||
};
|
|
@ -48,7 +48,7 @@
|
|||
lan3_amber {
|
||||
label = "amber:lan3";
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "dsa-0.0:01:1Gbps";
|
||||
linux,default-trigger = "dsa-0.0:03:1Gbps";
|
||||
};
|
||||
|
||||
lan2_amber {
|
||||
|
@ -60,7 +60,7 @@
|
|||
lan1_amber {
|
||||
label = "amber:lan1";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "dsa-0.0:03:1Gbps";
|
||||
linux,default-trigger = "dsa-0.0:01:1Gbps";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -80,6 +80,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/mii.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
@ -168,9 +169,10 @@ static void mt7620_hw_init(struct mt7620_gsw *gsw, int mdio_mode)
|
|||
|
||||
/* turn on all PHYs */
|
||||
for (i = 0; i <= 4; i++) {
|
||||
val = _mt7620_mii_read(gsw, gsw->ephy_base + i, 0);
|
||||
val &= ~BIT(11);
|
||||
_mt7620_mii_write(gsw, gsw->ephy_base + i, 0, val);
|
||||
val = _mt7620_mii_read(gsw, gsw->ephy_base + i, MII_BMCR);
|
||||
val &= ~BMCR_PDOWN;
|
||||
val |= BMCR_ANRESTART | BMCR_ANENABLE | BMCR_SPEED100;
|
||||
_mt7620_mii_write(gsw, gsw->ephy_base + i, MII_BMCR, val);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,10 +62,12 @@ TARGET_DEVICES += alfa-network_tube-e4g
|
|||
define Device/amit_jboot
|
||||
DLINK_IMAGE_OFFSET := 0x10000
|
||||
KERNEL := $(KERNEL_DTB)
|
||||
KERNEL_SIZE := 2048k
|
||||
IMAGES += factory.bin
|
||||
IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata
|
||||
IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory
|
||||
DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-usb-ohci
|
||||
DEFAULT := n
|
||||
endef
|
||||
|
||||
define Device/asus_rp-n53
|
||||
|
@ -1092,6 +1094,15 @@ define Device/wavlink_wl-wn530hg4
|
|||
endef
|
||||
TARGET_DEVICES += wavlink_wl-wn530hg4
|
||||
|
||||
define Device/wavlink_wl-wn579x3
|
||||
SOC := mt7620a
|
||||
IMAGE_SIZE := 7744k
|
||||
DEVICE_VENDOR := Wavlink
|
||||
DEVICE_MODEL := WL-WN579X3
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-phy-realtek
|
||||
endef
|
||||
TARGET_DEVICES += wavlink_wl-wn579x3
|
||||
|
||||
define Device/wrtnode_wrtnode
|
||||
SOC := mt7620n
|
||||
IMAGE_SIZE := 16064k
|
||||
|
|
|
@ -1167,6 +1167,20 @@ define Device/samknows_whitebox-v8
|
|||
endef
|
||||
TARGET_DEVICES += samknows_whitebox-v8
|
||||
|
||||
define Device/sercomm_na502
|
||||
$(Device/uimage-lzma-loader)
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 20480k
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
UBINIZE_OPTS := -E 5
|
||||
KERNEL_SIZE := 4096k
|
||||
DEVICE_VENDOR := SERCOMM
|
||||
DEVICE_MODEL := NA502
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-mt7603 kmod-usb3
|
||||
endef
|
||||
TARGET_DEVICES += sercomm_na502
|
||||
|
||||
define Device/storylink_sap-g3200u3
|
||||
$(Device/dsa-migration)
|
||||
IMAGE_SIZE := 7872k
|
||||
|
|
|
@ -194,6 +194,10 @@ tplink,archer-mr200)
|
|||
tplink,re200-v1)
|
||||
ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
|
||||
;;
|
||||
wavlink,wl-wn579x3)
|
||||
ucidef_set_led_switch "lan" "lan" "blue:lan" "switch0" "0x20"
|
||||
ucidef_set_led_switch "wan" "wan" "blue:wan" "switch0" "0x10"
|
||||
;;
|
||||
zbtlink,zbt-ape522ii)
|
||||
ucidef_set_led_netdev "wlan2g4" "wlan1-link" "green:wlan2g4" "wlan1"
|
||||
ucidef_set_led_netdev "sys1" "wlan1" "green:sys1" "wlan1" "tx rx"
|
||||
|
|
|
@ -215,6 +215,10 @@ ramips_setup_interfaces()
|
|||
ucidef_add_switch "switch0" \
|
||||
"0:lan" "4:wan" "6@eth0"
|
||||
;;
|
||||
wavlink,wl-wn579x3)
|
||||
ucidef_add_switch "switch0" \
|
||||
"5:lan" "4:wan" "6@eth0"
|
||||
;;
|
||||
youku,yk-l1|\
|
||||
youku,yk-l1c)
|
||||
ucidef_add_switch "switch0" \
|
||||
|
|
|
@ -12,6 +12,7 @@ ramips_setup_interfaces()
|
|||
edimax,re23s|\
|
||||
mikrotik,routerboard-m11g|\
|
||||
netgear,ex6150|\
|
||||
sercomm,na502|\
|
||||
thunder,timecloud|\
|
||||
tplink,re350-v1|\
|
||||
tplink,re500-v1|\
|
||||
|
|
|
@ -72,6 +72,7 @@ platform_do_upgrade() {
|
|||
netgear,wac104|\
|
||||
netgear,wac124|\
|
||||
netis,wf2881|\
|
||||
sercomm,na502|\
|
||||
xiaomi,mi-router-3g|\
|
||||
xiaomi,mi-router-3-pro|\
|
||||
xiaomi,mi-router-4|\
|
||||
|
|
|
@ -168,6 +168,7 @@ ramips_setup_macs()
|
|||
lan_mac=$wan_mac
|
||||
;;
|
||||
cudy,wr1000|\
|
||||
hilink,hlk-7628n|\
|
||||
hilink,hlk-7688a|\
|
||||
wavlink,wl-wn577a2|\
|
||||
wavlink,wl-wn578a2)
|
||||
|
@ -187,10 +188,6 @@ ramips_setup_macs()
|
|||
wan_mac=$(mtd_get_mac_binary factory 0x22)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
hilink,hlk-7628n)
|
||||
lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)")
|
||||
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||
;;
|
||||
hiwifi,hc5661a|\
|
||||
hiwifi,hc5761a|\
|
||||
hiwifi,hc5861b)
|
||||
|
|
|
@ -23,7 +23,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
|||
|
||||
#define AT803X_SPECIFIC_FUNCTION_CONTROL 0x10
|
||||
#define AT803X_SFC_ASSERT_CRS BIT(11)
|
||||
@@ -83,9 +85,18 @@
|
||||
@@ -82,9 +84,18 @@
|
||||
|
||||
#define AT803X_MODE_CFG_MASK 0x0F
|
||||
#define AT803X_MODE_CFG_SGMII 0x01
|
||||
|
@ -42,7 +42,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
|||
|
||||
#define AT803X_DEBUG_REG_0 0x00
|
||||
#define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15)
|
||||
@@ -505,10 +516,72 @@ static int at803x_parse_dt(struct phy_de
|
||||
@@ -532,12 +543,75 @@ static int at803x_parse_dt(struct phy_de
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -100,22 +100,25 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
|||
+ .detach = phy_sfp_detach,
|
||||
+ .module_insert = at803x_sfp_insert,
|
||||
+};
|
||||
+
|
||||
+
|
||||
static int at803x_probe(struct phy_device *phydev)
|
||||
{
|
||||
struct device *dev = &phydev->mdio.dev;
|
||||
struct at803x_priv *priv;
|
||||
+ int ret;
|
||||
int ret;
|
||||
|
||||
+
|
||||
+ if (at803x_mode(phydev) == AT803X_MODE_FIBER) {
|
||||
+ ret = phy_sfp_probe(phydev, &at803x_sfp_ops);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
+
|
||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
@@ -709,6 +782,10 @@ static int at803x_read_status(struct phy
|
||||
return -ENOMEM;
|
||||
@@ -744,6 +818,10 @@ static int at803x_read_status(struct phy
|
||||
{
|
||||
int ss, err, old_link = phydev->link;
|
||||
|
||||
|
@ -126,7 +129,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
|||
/* Update the link, but return if there was an error */
|
||||
err = genphy_update_link(phydev);
|
||||
if (err)
|
||||
@@ -809,6 +886,12 @@ static int at803x_config_aneg(struct phy
|
||||
@@ -844,6 +922,12 @@ static int at803x_config_aneg(struct phy
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -139,7 +142,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
|||
ret = at803x_config_mdix(phydev, phydev->mdix_ctrl);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
@@ -1110,6 +1193,7 @@ static struct phy_driver at803x_driver[]
|
||||
@@ -1145,6 +1229,7 @@ static struct phy_driver at803x_driver[]
|
||||
/* Qualcomm Atheros AR8031/AR8033 */
|
||||
PHY_ID_MATCH_EXACT(ATH8031_PHY_ID),
|
||||
.name = "Qualcomm Atheros AR8031/AR8033",
|
||||
|
|
|
@ -23,7 +23,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
|||
|
||||
#define AT803X_SPECIFIC_STATUS 0x11
|
||||
#define AT803X_SS_SPEED_MASK (3 << 14)
|
||||
@@ -53,9 +55,18 @@
|
||||
@@ -52,9 +54,18 @@
|
||||
|
||||
#define AT803X_MODE_CFG_MASK 0x0F
|
||||
#define AT803X_MODE_CFG_SGMII 0x01
|
||||
|
@ -42,7 +42,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
|||
|
||||
#define AT803X_DEBUG_REG_0 0x00
|
||||
#define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15)
|
||||
@@ -243,10 +254,72 @@ static int at803x_resume(struct phy_devi
|
||||
@@ -274,12 +285,73 @@ static int at803x_resume(struct phy_devi
|
||||
return phy_modify(phydev, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE, 0);
|
||||
}
|
||||
|
||||
|
@ -105,17 +105,18 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
|||
{
|
||||
struct device *dev = &phydev->mdio.dev;
|
||||
struct at803x_priv *priv;
|
||||
+ int ret;
|
||||
+
|
||||
int ret;
|
||||
|
||||
+ if (at803x_mode(phydev) == AT803X_MODE_FIBER) {
|
||||
+ ret = phy_sfp_probe(phydev, &at803x_sfp_ops);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
+
|
||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
@@ -394,6 +467,10 @@ static int at803x_read_status(struct phy
|
||||
return -ENOMEM;
|
||||
@@ -415,6 +487,10 @@ static int at803x_read_status(struct phy
|
||||
{
|
||||
int ss, err, old_link = phydev->link;
|
||||
|
||||
|
@ -126,7 +127,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
|||
/* Update the link, but return if there was an error */
|
||||
err = genphy_update_link(phydev);
|
||||
if (err)
|
||||
@@ -448,6 +525,19 @@ static int at803x_read_status(struct phy
|
||||
@@ -469,6 +545,19 @@ static int at803x_read_status(struct phy
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -146,11 +147,11 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
|||
static struct phy_driver at803x_driver[] = {
|
||||
{
|
||||
/* ATHEROS 8035 */
|
||||
@@ -461,6 +551,7 @@ static struct phy_driver at803x_driver[]
|
||||
.suspend = at803x_suspend,
|
||||
.resume = at803x_resume,
|
||||
/* PHY_GBIT_FEATURES */
|
||||
@@ -504,6 +593,7 @@ static struct phy_driver at803x_driver[]
|
||||
/* ATHEROS 8031 */
|
||||
.phy_id = ATH8031_PHY_ID,
|
||||
.name = "Atheros 8031 ethernet",
|
||||
+ .config_aneg = at803x_config_aneg,
|
||||
.read_status = at803x_read_status,
|
||||
.ack_interrupt = at803x_ack_interrupt,
|
||||
.config_intr = at803x_config_intr,
|
||||
.phy_id_mask = AT803X_PHY_ID_MASK,
|
||||
.probe = at803x_probe,
|
||||
.config_init = at803x_config_init,
|
||||
|
|
|
@ -46,7 +46,7 @@ HOST_CONFIGURE_ARGS = \
|
|||
ifneq ($(CONFIG_GDB_PYTHON),)
|
||||
HOST_CONFIGURE_ARGS+= --with-python
|
||||
else
|
||||
HOST_CONFIGURE_ARGS:= --without-python
|
||||
HOST_CONFIGURE_ARGS+= --without-python
|
||||
endif
|
||||
|
||||
define Host/Install
|
||||
|
|
Loading…
Reference in New Issue
Block a user