Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -633,6 +633,14 @@ define Build/sysupgrade-tar
|
|||||||
$@
|
$@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Build/tplink-image-2022
|
||||||
|
$(TOPDIR)/scripts/tplink-mkimage-2022.py \
|
||||||
|
--create $@.new \
|
||||||
|
--rootfs $@ \
|
||||||
|
--support "$(TPLINK_SUPPORT_STRING)"
|
||||||
|
@mv $@.new $@
|
||||||
|
endef
|
||||||
|
|
||||||
define Build/tplink-safeloader
|
define Build/tplink-safeloader
|
||||||
-$(STAGING_DIR_HOST)/bin/tplink-safeloader \
|
-$(STAGING_DIR_HOST)/bin/tplink-safeloader \
|
||||||
-B $(TPLINK_BOARD_ID) \
|
-B $(TPLINK_BOARD_ID) \
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
LINUX_VERSION-6.6 = .70
|
LINUX_VERSION-6.6 = .71
|
||||||
LINUX_KERNEL_HASH-6.6.70 = 84d23ee07fb26febbcb6d1295ba15efdc67ac382b4137b2c8853146c10fd2f97
|
LINUX_KERNEL_HASH-6.6.71 = 219715ba2dcfa6539fba09ad3f9212772f3507189eb60d77f8e89b06c32e724e
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=uboot-envtools
|
PKG_NAME:=uboot-envtools
|
||||||
PKG_DISTNAME:=u-boot
|
PKG_DISTNAME:=u-boot
|
||||||
PKG_VERSION:=2024.07
|
PKG_VERSION:=2025.01
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
||||||
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:= \
|
|||||||
https://ftp.denx.de/pub/u-boot \
|
https://ftp.denx.de/pub/u-boot \
|
||||||
https://mirror.cyberbits.eu/u-boot \
|
https://mirror.cyberbits.eu/u-boot \
|
||||||
ftp://ftp.denx.de/pub/u-boot
|
ftp://ftp.denx.de/pub/u-boot
|
||||||
PKG_HASH:=f591da9ab90ef3d6b3d173766d0ddff90c4ed7330680897486117df390d83c8f
|
PKG_HASH:=cdef7d507c93f1bbd9f015ea9bc21fa074268481405501945abc6f854d5b686f
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ netgear,wax214)
|
|||||||
[ -n "$idx" ] && \
|
[ -n "$idx" ] && \
|
||||||
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000"
|
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000"
|
||||||
;;
|
;;
|
||||||
|
tplink,eap610-outdoor)
|
||||||
|
idx="$(find_mtd_index 0:appsblenv)"
|
||||||
|
[ -n "$idx" ] && \
|
||||||
|
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000"
|
||||||
yuncore,fap650)
|
yuncore,fap650)
|
||||||
idx="$(find_mtd_index 0:appsblenv)"
|
idx="$(find_mtd_index 0:appsblenv)"
|
||||||
[ -n "$idx" ] && \
|
[ -n "$idx" ] && \
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ ALLWIFIBOARDS:= \
|
|||||||
redmi_ax6 \
|
redmi_ax6 \
|
||||||
skspruce_wia3300-20 \
|
skspruce_wia3300-20 \
|
||||||
spectrum_sax1v1k \
|
spectrum_sax1v1k \
|
||||||
|
tplink_eap610-outdoor \
|
||||||
tplink_eap620hd-v1 \
|
tplink_eap620hd-v1 \
|
||||||
tplink_eap660hd-v1 \
|
tplink_eap660hd-v1 \
|
||||||
wallys_dr40x9 \
|
wallys_dr40x9 \
|
||||||
@@ -185,6 +186,7 @@ $(eval $(call generate-ipq-wifi-package,prpl_haze,prpl Haze))
|
|||||||
$(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6))
|
$(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6))
|
||||||
$(eval $(call generate-ipq-wifi-package,skspruce_wia3300-20,SKSpruce WIA3300-20))
|
$(eval $(call generate-ipq-wifi-package,skspruce_wia3300-20,SKSpruce WIA3300-20))
|
||||||
$(eval $(call generate-ipq-wifi-package,spectrum_sax1v1k,Spectrum SAX1V1K))
|
$(eval $(call generate-ipq-wifi-package,spectrum_sax1v1k,Spectrum SAX1V1K))
|
||||||
|
$(eval $(call generate-ipq-wifi-package,tplink_eap610-outdoor,TPLink EAP610-Outdoor))
|
||||||
$(eval $(call generate-ipq-wifi-package,tplink_eap620hd-v1,TP-Link EAP620 HD v1))
|
$(eval $(call generate-ipq-wifi-package,tplink_eap620hd-v1,TP-Link EAP620 HD v1))
|
||||||
$(eval $(call generate-ipq-wifi-package,tplink_eap660hd-v1,TP-Link EAP660 HD v1))
|
$(eval $(call generate-ipq-wifi-package,tplink_eap660hd-v1,TP-Link EAP660 HD v1))
|
||||||
$(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9))
|
$(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9))
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=hostapd
|
PKG_NAME:=hostapd
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE_URL:=https://w1.fi/hostap.git
|
PKG_SOURCE_URL:=https://w1.fi/hostap.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
sm->eap_if->aaaFail = true;
|
sm->eap_if->aaaFail = true;
|
||||||
--- a/src/ap/sta_info.h
|
--- a/src/ap/sta_info.h
|
||||||
+++ b/src/ap/sta_info.h
|
+++ b/src/ap/sta_info.h
|
||||||
@@ -95,6 +95,7 @@ struct sta_info {
|
@@ -94,6 +94,7 @@ struct sta_info {
|
||||||
u8 supported_rates[WLAN_SUPP_RATES_MAX];
|
u8 supported_rates[WLAN_SUPP_RATES_MAX];
|
||||||
int supported_rates_len;
|
int supported_rates_len;
|
||||||
u8 qosinfo; /* Valid when WLAN_STA_WMM is set */
|
u8 qosinfo; /* Valid when WLAN_STA_WMM is set */
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
+
|
+
|
||||||
--- a/src/ap/sta_info.h
|
--- a/src/ap/sta_info.h
|
||||||
+++ b/src/ap/sta_info.h
|
+++ b/src/ap/sta_info.h
|
||||||
@@ -408,23 +408,8 @@ int ap_sta_re_add(struct hostapd_data *h
|
@@ -409,23 +409,8 @@ int ap_sta_re_add(struct hostapd_data *h
|
||||||
|
|
||||||
void ap_free_sta_pasn(struct hostapd_data *hapd, struct sta_info *sta);
|
void ap_free_sta_pasn(struct hostapd_data *hapd, struct sta_info *sta);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
From 161327f91d956771996c96ea1b6e4e1cb8dc074c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stone Zhang <quic_stonez@quicinc.com>
|
||||||
|
Date: Mon, 14 Oct 2024 18:47:32 +0800
|
||||||
|
Subject: [PATCH] hostapd: Fix clearing up settings for color switch
|
||||||
|
|
||||||
|
Settings for color switch (struct cca_settings settings)
|
||||||
|
is used without zero clearing, which causes the member
|
||||||
|
settings->ubpr->unsol_bcast_probe_resp_intervalettings
|
||||||
|
to be a random value. It is againsts the NLA policy of
|
||||||
|
NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT and causes
|
||||||
|
BSS color switch failure.
|
||||||
|
|
||||||
|
Fixes: 654d2395dddf ("BSS coloring: Handling of collision events and triggering CCA")
|
||||||
|
Signed-off-by: Stone Zhang <quic_stonez@quicinc.com>
|
||||||
|
---
|
||||||
|
src/ap/hostapd.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
--- a/src/ap/hostapd.c
|
||||||
|
+++ b/src/ap/hostapd.c
|
||||||
|
@@ -4813,6 +4813,7 @@ static void hostapd_switch_color_timeout
|
||||||
|
struct cca_settings settings;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
+ os_memset(&settings, 0, sizeof(settings));
|
||||||
|
hostapd_cleanup_cca_params(bss);
|
||||||
|
bss->cca_color = r;
|
||||||
|
bss->cca_count = 10;
|
||||||
198
scripts/tplink-mkimage-2022.py
Executable file
198
scripts/tplink-mkimage-2022.py
Executable file
@@ -0,0 +1,198 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
'''A program for manipulating tplink2022 images.
|
||||||
|
|
||||||
|
A tplink2022 is an image format encountered on TP-Link devices around the year
|
||||||
|
2022. This was seen at least on the EAP610-Outdoor. The format is a container
|
||||||
|
for a rootfs, and has optional fields for the "software" version. It also
|
||||||
|
requires a "support" string that describes the list of compatible devices.
|
||||||
|
|
||||||
|
This module is intended for creating such images with an OpenWRT UBI image, but
|
||||||
|
also supports analysis and extraction of vendor images. Altough tplink2022
|
||||||
|
images can be signed, this program does not support signing image.
|
||||||
|
|
||||||
|
To get an explanation of the commandline arguments, run this program with the
|
||||||
|
"--help" argument.
|
||||||
|
'''
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import os
|
||||||
|
import pprint
|
||||||
|
import struct
|
||||||
|
|
||||||
|
def decode_header(datafile):
|
||||||
|
'''Read the tplink2022 image header anbd decode it into a dictionary'''
|
||||||
|
header = {}
|
||||||
|
fmt = '>2I'
|
||||||
|
|
||||||
|
datafile.seek(0x1014)
|
||||||
|
raw_header = datafile.read(8)
|
||||||
|
fields = struct.unpack(fmt, raw_header)
|
||||||
|
|
||||||
|
header['rootfs_size'] = fields[0]
|
||||||
|
header['num_items'] = fields[1]
|
||||||
|
header['items'] = []
|
||||||
|
|
||||||
|
rootfs = {}
|
||||||
|
rootfs['name'] = 'rootfs.ubi'
|
||||||
|
rootfs['offset'] = 0
|
||||||
|
rootfs['size'] = header['rootfs_size']
|
||||||
|
header['items'].append(rootfs)
|
||||||
|
|
||||||
|
for _ in range(header['num_items']):
|
||||||
|
entry = datafile.read(0x2c)
|
||||||
|
fmt = '>I32s2I'
|
||||||
|
fields = struct.unpack(fmt, entry)
|
||||||
|
|
||||||
|
section = {}
|
||||||
|
section['name'] = fields[1].decode("utf-8").rstrip('\0')
|
||||||
|
section['type'] = fields[0]
|
||||||
|
section['offset'] = fields[2]
|
||||||
|
section['size'] = fields[3]
|
||||||
|
header['items'].append(section)
|
||||||
|
return header
|
||||||
|
|
||||||
|
def extract(datafile):
|
||||||
|
'''Extract the sections of the tplink2022 image to separate files'''
|
||||||
|
header = decode_header(datafile)
|
||||||
|
|
||||||
|
pretty = pprint.PrettyPrinter(indent=4, sort_dicts=False)
|
||||||
|
pretty.pprint(header)
|
||||||
|
|
||||||
|
for section in header['items']:
|
||||||
|
datafile.seek(0x1814 + section['offset'])
|
||||||
|
section_contents = datafile.read(section['size'])
|
||||||
|
|
||||||
|
with open(f"{section['name']}.bin", 'wb') as section_file:
|
||||||
|
section_file.write(section_contents)
|
||||||
|
|
||||||
|
with open('leftover.bin', 'wb') as extras_file:
|
||||||
|
extras_file.write(datafile.read())
|
||||||
|
|
||||||
|
def get_section_contents(section):
|
||||||
|
'''I don't remember what this does. It's been a year since I wrote this'''
|
||||||
|
if section.get('data'):
|
||||||
|
data = section['data']
|
||||||
|
elif section.get('file'):
|
||||||
|
with open(section['file'], 'rb') as section_file:
|
||||||
|
data = section_file.read()
|
||||||
|
else:
|
||||||
|
data = bytes()
|
||||||
|
|
||||||
|
if section['size'] != len(data):
|
||||||
|
raise ValueError("Wrong section size", len(data))
|
||||||
|
|
||||||
|
return data
|
||||||
|
|
||||||
|
def write_image(output_image, header):
|
||||||
|
'''Write a tplink2022 image with the contents in the "header" dictionary'''
|
||||||
|
with open(output_image, 'w+b') as out_file:
|
||||||
|
# header MD5
|
||||||
|
salt = [ 0x7a, 0x2b, 0x15, 0xed,
|
||||||
|
0x9b, 0x98, 0x59, 0x6d,
|
||||||
|
0xe5, 0x04, 0xab, 0x44,
|
||||||
|
0xac, 0x2a, 0x9f, 0x4e
|
||||||
|
]
|
||||||
|
|
||||||
|
out_file.seek(4)
|
||||||
|
out_file.write(bytes(salt))
|
||||||
|
|
||||||
|
# unknown section
|
||||||
|
out_file.write(bytes([0xff] * 0x1000))
|
||||||
|
|
||||||
|
# Table of contents
|
||||||
|
raw_header = struct.pack('>2I', header['rootfs_size'],
|
||||||
|
header['num_items'])
|
||||||
|
out_file.write(raw_header)
|
||||||
|
|
||||||
|
for section in header['items']:
|
||||||
|
if section['name'] == 'rootfs.ubi':
|
||||||
|
continue
|
||||||
|
|
||||||
|
hdr = struct.pack('>I32s2I',
|
||||||
|
section.get('type', 0),
|
||||||
|
section['name'].encode('utf-8'),
|
||||||
|
section['offset'],
|
||||||
|
section['size']
|
||||||
|
)
|
||||||
|
|
||||||
|
out_file.write(hdr)
|
||||||
|
|
||||||
|
for section in header['items']:
|
||||||
|
out_file.seek(0x1814 + section['offset'])
|
||||||
|
out_file.write(get_section_contents(section))
|
||||||
|
|
||||||
|
size = out_file.tell()
|
||||||
|
|
||||||
|
out_file.seek(4)
|
||||||
|
md5_sum = hashlib.md5(out_file.read())
|
||||||
|
|
||||||
|
out_file.seek(0)
|
||||||
|
out_file.write(struct.pack('>I16s', size, md5_sum.digest()))
|
||||||
|
|
||||||
|
def encode_soft_verson():
|
||||||
|
'''Not sure of the meaning of version. Also doesn't appear to be needed.'''
|
||||||
|
return struct.pack('>4B1I2I', 0xff, 1, 0 ,0, 0x2020202, 30000, 1)
|
||||||
|
|
||||||
|
def create_image(output_image, root, support):
|
||||||
|
'''Create an image with a ubi "root" and a "support" string.'''
|
||||||
|
header = {}
|
||||||
|
|
||||||
|
header['rootfs_size'] = os.path.getsize(root)
|
||||||
|
header['items'] = []
|
||||||
|
|
||||||
|
rootfs = {}
|
||||||
|
rootfs['name'] = 'rootfs.ubi'
|
||||||
|
rootfs['file'] = root
|
||||||
|
rootfs['offset'] = 0
|
||||||
|
rootfs['size'] = header['rootfs_size']
|
||||||
|
header['items'].append(rootfs)
|
||||||
|
|
||||||
|
support_list = {}
|
||||||
|
support_list['name'] = 'support-list'
|
||||||
|
support_list['data'] = support.replace(" ", "\r\n").encode('utf-8')
|
||||||
|
support_list['offset'] = header['rootfs_size']
|
||||||
|
support_list['size'] = len(support_list['data'])
|
||||||
|
header['items'].append(support_list)
|
||||||
|
|
||||||
|
sw_version = {}
|
||||||
|
sw_version['name'] = 'soft-version'
|
||||||
|
sw_version['type'] = 1
|
||||||
|
sw_version['data'] = encode_soft_verson()
|
||||||
|
sw_version['offset'] = support_list['offset'] + support_list['size']
|
||||||
|
sw_version['size'] = len(sw_version['data'])
|
||||||
|
header['items'].append(sw_version)
|
||||||
|
|
||||||
|
header['num_items'] = len(header['items']) - 1
|
||||||
|
write_image(output_image, header)
|
||||||
|
|
||||||
|
def main(args):
|
||||||
|
'''We support image analysis,extraction, and creation'''
|
||||||
|
if args.extract:
|
||||||
|
with open(args.image, 'rb') as image:
|
||||||
|
extract(image)
|
||||||
|
elif args.create:
|
||||||
|
if not args.rootfs or not args.support:
|
||||||
|
raise ValueError('To create an image, specify rootfs and support list')
|
||||||
|
create_image(args.image, args.rootfs, args.support)
|
||||||
|
else:
|
||||||
|
with open(args.image, 'rb') as image:
|
||||||
|
header = decode_header(image)
|
||||||
|
|
||||||
|
pretty = pprint.PrettyPrinter(indent=4, sort_dicts=False)
|
||||||
|
pretty.pprint(header)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
parser = argparse.ArgumentParser(description='EAP extractor')
|
||||||
|
parser.add_argument('--info', action='store_true')
|
||||||
|
parser.add_argument('--extract', action='store_true')
|
||||||
|
parser.add_argument('--create', action='store_true')
|
||||||
|
parser.add_argument('image', type=str,
|
||||||
|
help='Name of image to create or decode')
|
||||||
|
parser.add_argument('--rootfs', type=str,
|
||||||
|
help='When creating an EAP image, UBI image with rootfs and kernel')
|
||||||
|
parser.add_argument('--support', type=str,
|
||||||
|
help='String for the "support-list" section')
|
||||||
|
|
||||||
|
main(parser.parse_args())
|
||||||
@@ -26,15 +26,15 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||||||
const struct clk_ops pcie_ops;
|
const struct clk_ops pcie_ops;
|
||||||
int (*hw_init)(struct platform_device *pdev,
|
int (*hw_init)(struct platform_device *pdev,
|
||||||
struct clk_hw_onecell_data *clk_data);
|
struct clk_hw_onecell_data *clk_data);
|
||||||
@@ -525,8 +526,6 @@ static void en7523_register_clocks(struc
|
@@ -504,8 +505,6 @@ static void en7523_register_clocks(struc
|
||||||
|
u32 rate;
|
||||||
|
int i;
|
||||||
|
|
||||||
hw = en7523_register_pcie_clk(dev, np_base);
|
|
||||||
clk_data->hws[EN7523_CLK_PCIE] = hw;
|
|
||||||
-
|
|
||||||
- clk_data->num = EN7523_NUM_CLOCKS;
|
- clk_data->num = EN7523_NUM_CLOCKS;
|
||||||
}
|
-
|
||||||
|
for (i = 0; i < ARRAY_SIZE(en7523_base_clks); i++) {
|
||||||
static int en7523_clk_hw_init(struct platform_device *pdev,
|
const struct en_clk_desc *desc = &en7523_base_clks[i];
|
||||||
|
u32 reg = desc->div_reg ? desc->div_reg : desc->base_reg;
|
||||||
@@ -587,8 +586,6 @@ static void en7581_register_clocks(struc
|
@@ -587,8 +586,6 @@ static void en7581_register_clocks(struc
|
||||||
|
|
||||||
hw = en7523_register_pcie_clk(dev, base);
|
hw = en7523_register_pcie_clk(dev, base);
|
||||||
|
|||||||
@@ -103,29 +103,27 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||||||
|
|
||||||
host->bus_clk = devm_clk_get_optional(&pdev->dev, "bus_clk");
|
host->bus_clk = devm_clk_get_optional(&pdev->dev, "bus_clk");
|
||||||
if (IS_ERR(host->bus_clk))
|
if (IS_ERR(host->bus_clk))
|
||||||
@@ -2740,11 +2767,14 @@ static int msdc_drv_probe(struct platfor
|
@@ -2731,10 +2758,13 @@ static int msdc_drv_probe(struct platfor
|
||||||
goto host_free;
|
return PTR_ERR(host->pins_default);
|
||||||
}
|
}
|
||||||
|
|
||||||
- host->pins_uhs = pinctrl_lookup_state(host->pinctrl, "state_uhs");
|
- host->pins_uhs = pinctrl_lookup_state(host->pinctrl, "state_uhs");
|
||||||
- if (IS_ERR(host->pins_uhs)) {
|
- if (IS_ERR(host->pins_uhs)) {
|
||||||
- ret = PTR_ERR(host->pins_uhs);
|
|
||||||
- dev_err(&pdev->dev, "Cannot find pinctrl uhs!\n");
|
- dev_err(&pdev->dev, "Cannot find pinctrl uhs!\n");
|
||||||
- goto host_free;
|
- return PTR_ERR(host->pins_uhs);
|
||||||
+ /* AN7581 doesn't have state_uhs pins */
|
+ /* AN7581 doesn't have state_uhs pins */
|
||||||
+ if (!device_is_compatible(&pdev->dev, "airoha,an7581-mmc")) {
|
+ if (!device_is_compatible(&pdev->dev, "airoha,an7581-mmc")) {
|
||||||
+ host->pins_uhs = pinctrl_lookup_state(host->pinctrl, "state_uhs");
|
+ host->pins_uhs = pinctrl_lookup_state(host->pinctrl, "state_uhs");
|
||||||
+ if (IS_ERR(host->pins_uhs)) {
|
+ if (IS_ERR(host->pins_uhs)) {
|
||||||
+ ret = PTR_ERR(host->pins_uhs);
|
|
||||||
+ dev_err(&pdev->dev, "Cannot find pinctrl uhs!\n");
|
+ dev_err(&pdev->dev, "Cannot find pinctrl uhs!\n");
|
||||||
+ goto host_free;
|
+ return PTR_ERR(host->pins_uhs);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Support for SDIO eint irq ? */
|
/* Support for SDIO eint irq ? */
|
||||||
@@ -2825,6 +2855,12 @@ static int msdc_drv_probe(struct platfor
|
@@ -2815,6 +2845,12 @@ static int msdc_drv_probe(struct platfor
|
||||||
dev_err(&pdev->dev, "Cannot ungate clocks!\n");
|
dev_err(&pdev->dev, "Cannot ungate clocks!\n");
|
||||||
goto release_mem;
|
goto release_clk;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ /* AN7581 without regulator require tune to OCR values */
|
+ /* AN7581 without regulator require tune to OCR values */
|
||||||
|
|||||||
@@ -62,16 +62,26 @@
|
|||||||
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
reg_power_usb: regulator {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "power_usb";
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
|
||||||
|
enable-active-high;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&usb {
|
&usb {
|
||||||
dr_mode = "host";
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
dr_mode = "host";
|
||||||
|
vbus-supply = <®_power_usb>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&usb_phy {
|
&usb_phy {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&spi {
|
&spi {
|
||||||
|
|||||||
@@ -29,12 +29,6 @@
|
|||||||
gpio-export,name = "usb-alarm";
|
gpio-export,name = "usb-alarm";
|
||||||
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
usb-power {
|
|
||||||
gpio-export,name = "usb-power";
|
|
||||||
gpio-export,output = <0>;
|
|
||||||
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
keys {
|
keys {
|
||||||
@@ -57,6 +51,14 @@
|
|||||||
linux,default-trigger = "phy0tpt";
|
linux,default-trigger = "phy0tpt";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
reg_power_usb: regulator {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "power_usb";
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
ð0 {
|
ð0 {
|
||||||
@@ -123,6 +125,8 @@
|
|||||||
|
|
||||||
&usb {
|
&usb {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
vbus-supply = <®_power_usb>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&usb_phy {
|
&usb_phy {
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
sim-tray {
|
sim-tray {
|
||||||
label = "sim-tray";
|
label = "sim-tray";
|
||||||
|
linux,input-type = <EV_SW>;
|
||||||
linux,code = <BTN_1>;
|
linux,code = <BTN_1>;
|
||||||
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
|
||||||
debounce-interval = <60>;
|
debounce-interval = <60>;
|
||||||
@@ -68,7 +69,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
signal-strength-4 {
|
signal-strength-4 {
|
||||||
label = "green:signal-strength4";
|
label = "green:signal-strength-4";
|
||||||
gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -82,6 +83,11 @@
|
|||||||
gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
4g {
|
||||||
|
label = "green:4g";
|
||||||
|
gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
lan {
|
lan {
|
||||||
function = LED_FUNCTION_LAN;
|
function = LED_FUNCTION_LAN;
|
||||||
color = <LED_COLOR_ID_GREEN>;
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
@@ -95,17 +101,6 @@
|
|||||||
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||||
/* GPIO 14 - ACTIVE HIGH for hwrev 0 */
|
/* GPIO 14 - ACTIVE HIGH for hwrev 0 */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 4G LED - GPIO21 ACTIVE_HIGH for RUT240 */
|
|
||||||
};
|
|
||||||
|
|
||||||
reg_usb_vbus: reg_usb_vbus {
|
|
||||||
compatible = "regulator-fixed";
|
|
||||||
regulator-name = "usb_vbus";
|
|
||||||
regulator-min-microvolt = <5000000>;
|
|
||||||
regulator-max-microvolt = <5000000>;
|
|
||||||
gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
|
|
||||||
enable-active-high;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -193,19 +188,9 @@
|
|||||||
|
|
||||||
&usb {
|
&usb {
|
||||||
dr_mode = "host";
|
dr_mode = "host";
|
||||||
vbus-supply = <®_usb_vbus>;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&gpio {
|
|
||||||
modem-power {
|
|
||||||
gpio-hog;
|
|
||||||
output-low;
|
|
||||||
gpios = <18 GPIO_ACTIVE_HIGH>;
|
|
||||||
line-name = "modem-power";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&usb_phy {
|
&usb_phy {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -48,6 +48,11 @@ dlink,dir-835-a1)
|
|||||||
librerouter,librerouter-v1)
|
librerouter,librerouter-v1)
|
||||||
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "513" "0"
|
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "513" "0"
|
||||||
;;
|
;;
|
||||||
|
teltonika,rut230-v1)
|
||||||
|
ucidef_add_gpio_switch "DOUT" "DOUT" "524" "0"
|
||||||
|
ucidef_add_gpio_switch "modem_pwr" "Modem power" "531" "1"
|
||||||
|
ucidef_add_gpio_switch "modem_rst" "Modem reset" "530" "0"
|
||||||
|
;;
|
||||||
teltonika,rut955)
|
teltonika,rut955)
|
||||||
ucidef_add_gpio_switch "sim_sel" "SIM select" "542" "1"
|
ucidef_add_gpio_switch "sim_sel" "SIM select" "542" "1"
|
||||||
ucidef_add_gpio_switch "DOUT1" "DOUT1 (OC)" "543" "0"
|
ucidef_add_gpio_switch "DOUT1" "DOUT1 (OC)" "543" "0"
|
||||||
|
|||||||
@@ -3068,8 +3068,11 @@ define Device/teltonika_rut230-v1
|
|||||||
DEVICE_VENDOR := Teltonika
|
DEVICE_VENDOR := Teltonika
|
||||||
DEVICE_MODEL := RUT230
|
DEVICE_MODEL := RUT230
|
||||||
DEVICE_VARIANT := v1
|
DEVICE_VARIANT := v1
|
||||||
DEVICE_PACKAGES := kmod-usb-chipidea2 kmod-usb-acm kmod-usb-net-qmi-wwan \
|
DEVICE_ALT0_VENDOR := Teltonika
|
||||||
uqmi -uboot-envtools
|
DEVICE_ALT0_MODEL := RUT240
|
||||||
|
DEVICE_ALT0_VARIANT := v1
|
||||||
|
DEVICE_PACKAGES := kmod-usb2 kmod-usb-chipidea2 kmod-usb-acm \
|
||||||
|
kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi -uboot-envtools
|
||||||
IMAGE_SIZE := 15552k
|
IMAGE_SIZE := 15552k
|
||||||
TPLINK_HWID := 0x32200002
|
TPLINK_HWID := 0x32200002
|
||||||
TPLINK_HWREV := 0x1
|
TPLINK_HWREV := 0x1
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||||||
obj-$(CONFIG_PHY_LPC18XX_USB_OTG) += phy-lpc18xx-usb-otg.o
|
obj-$(CONFIG_PHY_LPC18XX_USB_OTG) += phy-lpc18xx-usb-otg.o
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/phy/phy-ar7100-usb.c
|
+++ b/drivers/phy/phy-ar7100-usb.c
|
||||||
@@ -0,0 +1,127 @@
|
@@ -0,0 +1,117 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (C) 2018 John Crispin <john@phrozen.org>
|
+ * Copyright (C) 2018 John Crispin <john@phrozen.org>
|
||||||
+ *
|
+ *
|
||||||
@@ -144,16 +144,6 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||||||
+ if (IS_ERR(priv->phy))
|
+ if (IS_ERR(priv->phy))
|
||||||
+ return dev_err_probe(&pdev->dev, PTR_ERR(priv->phy), "failed to create PHY");
|
+ return dev_err_probe(&pdev->dev, PTR_ERR(priv->phy), "failed to create PHY");
|
||||||
+
|
+
|
||||||
+ priv->gpio = of_get_named_gpio(pdev->dev.of_node, "gpios", 0);
|
|
||||||
+ if (gpio_is_valid(priv->gpio)) {
|
|
||||||
+ int ret = devm_gpio_request(&pdev->dev, priv->gpio, dev_name(&pdev->dev));
|
|
||||||
+ if (ret)
|
|
||||||
+ return dev_err_probe(&pdev->dev, ret, "failed to request gpio");
|
|
||||||
+
|
|
||||||
+ gpio_export_with_name(gpio_to_desc(priv->gpio), 0, dev_name(&pdev->dev));
|
|
||||||
+ gpio_set_value(priv->gpio, 1);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ phy_set_drvdata(priv->phy, priv);
|
+ phy_set_drvdata(priv->phy, priv);
|
||||||
+
|
+
|
||||||
+ phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate);
|
+ phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate);
|
||||||
@@ -181,7 +171,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||||||
+MODULE_LICENSE("GPL");
|
+MODULE_LICENSE("GPL");
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/phy/phy-ar7200-usb.c
|
+++ b/drivers/phy/phy-ar7200-usb.c
|
||||||
@@ -0,0 +1,120 @@
|
@@ -0,0 +1,111 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (C) 2015 Alban Bedel <albeu@free.fr>
|
+ * Copyright (C) 2015 Alban Bedel <albeu@free.fr>
|
||||||
+ *
|
+ *
|
||||||
@@ -268,15 +258,6 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||||||
+ if (IS_ERR(priv->phy))
|
+ if (IS_ERR(priv->phy))
|
||||||
+ return dev_err_probe(&pdev->dev, PTR_ERR(priv->phy), "failed to create PHY");
|
+ return dev_err_probe(&pdev->dev, PTR_ERR(priv->phy), "failed to create PHY");
|
||||||
+
|
+
|
||||||
+ priv->gpio = of_get_named_gpio(pdev->dev.of_node, "gpios", 0);
|
|
||||||
+ if (gpio_is_valid(priv->gpio)) {
|
|
||||||
+ int ret = devm_gpio_request(&pdev->dev, priv->gpio, dev_name(&pdev->dev));
|
|
||||||
+ if (ret)
|
|
||||||
+ return dev_err_probe(&pdev->dev, ret, "failed to request gpio");
|
|
||||||
+ gpio_export_with_name(gpio_to_desc(priv->gpio), 0, dev_name(&pdev->dev));
|
|
||||||
+ gpio_set_value(priv->gpio, 1);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ phy_set_drvdata(priv->phy, priv);
|
+ phy_set_drvdata(priv->phy, priv);
|
||||||
+
|
+
|
||||||
+ phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate);
|
+ phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate);
|
||||||
|
|||||||
@@ -43,6 +43,17 @@ preinit_set_mac_address() {
|
|||||||
ip link set dev sw-eth1 address "$base_mac"
|
ip link set dev sw-eth1 address "$base_mac"
|
||||||
ip link set dev sw-eth2 address $(macaddr_add "$base_mac" 1)
|
ip link set dev sw-eth2 address $(macaddr_add "$base_mac" 1)
|
||||||
;;
|
;;
|
||||||
|
teltonika,rutx50)
|
||||||
|
# Vendor Bootloader removes nvmem-cells from partition,
|
||||||
|
# so this needs to be done here.
|
||||||
|
base_mac="$(mtd_get_mac_binary 0:CONFIG 0x0)"
|
||||||
|
ip link set dev eth0 address "$base_mac"
|
||||||
|
ip link set dev lan1 address "$base_mac"
|
||||||
|
ip link set dev lan2 address "$base_mac"
|
||||||
|
ip link set dev lan3 address "$base_mac"
|
||||||
|
ip link set dev lan4 address "$base_mac"
|
||||||
|
ip link set dev wan address "$(macaddr_add "$base_mac" 1)"
|
||||||
|
;;
|
||||||
zyxel,nbg6617)
|
zyxel,nbg6617)
|
||||||
base_mac=$(cat /sys/class/net/eth0/address)
|
base_mac=$(cat /sys/class/net/eth0/address)
|
||||||
ip link set dev eth0 address $(macaddr_add "$base_mac" 2)
|
ip link set dev eth0 address $(macaddr_add "$base_mac" 2)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
gpio_modem_power {
|
gpio_modem_power {
|
||||||
gpio-export,name = "modem_power";
|
gpio-export,name = "modem_power";
|
||||||
gpio-export,output = <0>;
|
gpio-export,output = <1>;
|
||||||
gpios = <&shift_io 9 GPIO_ACTIVE_HIGH>;
|
gpios = <&shift_io 9 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -103,11 +103,13 @@
|
|||||||
led-10 {
|
led-10 {
|
||||||
label = "green:wifi2g";
|
label = "green:wifi2g";
|
||||||
gpios = <&shift_io 12 GPIO_ACTIVE_HIGH>;
|
gpios = <&shift_io 12 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,default-trigger = "phy0tpt";
|
||||||
};
|
};
|
||||||
|
|
||||||
led-11 {
|
led-11 {
|
||||||
label = "green:wifi5g";
|
label = "green:wifi5g";
|
||||||
gpios = <&shift_io 13 GPIO_ACTIVE_HIGH>;
|
gpios = <&shift_io 13 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,default-trigger = "phy1tpt";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,12 @@ define Device/tplink_tdw8980
|
|||||||
$(Device/lantiqTpLink)
|
$(Device/lantiqTpLink)
|
||||||
DEVICE_MODEL := TD-W8980
|
DEVICE_MODEL := TD-W8980
|
||||||
DEVICE_VARIANT := v1
|
DEVICE_VARIANT := v1
|
||||||
|
DEVICE_ALT0_VENDOR := TP-LINK
|
||||||
|
DEVICE_ALT0_MODEL := TD-W9980
|
||||||
|
DEVICE_ALT0_VARIANT := v1
|
||||||
|
DEVICE_ALT1_VENDOR := TP-LINK
|
||||||
|
DEVICE_ALT1_MODEL := TD-W9980B
|
||||||
|
DEVICE_ALT1_VARIANT := v1
|
||||||
TPLINK_FLASHLAYOUT := 8Mltq
|
TPLINK_FLASHLAYOUT := 8Mltq
|
||||||
TPLINK_HWID := 0x89800001
|
TPLINK_HWID := 0x89800001
|
||||||
TPLINK_HWREV := 14
|
TPLINK_HWREV := 14
|
||||||
|
|||||||
@@ -292,6 +292,11 @@ define Device/bt_homehub-v5a
|
|||||||
DEVICE_VENDOR := British Telecom (BT)
|
DEVICE_VENDOR := British Telecom (BT)
|
||||||
DEVICE_MODEL := Home Hub 5
|
DEVICE_MODEL := Home Hub 5
|
||||||
DEVICE_VARIANT := Type A
|
DEVICE_VARIANT := Type A
|
||||||
|
DEVICE_ALT0_VENDOR := British Telecom (BT)
|
||||||
|
DEVICE_ALT0_MODEL := Business Hub 5
|
||||||
|
DEVICE_ALT0_VARIANT := Type A
|
||||||
|
DEVICE_ALT1_VENDOR := Plusnet
|
||||||
|
DEVICE_ALT1_MODEL := Hub One
|
||||||
BOARD_NAME := BTHOMEHUBV5A
|
BOARD_NAME := BTHOMEHUBV5A
|
||||||
DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader \
|
DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader \
|
||||||
kmod-ath10k-ct ath10k-firmware-qca988x-ct wpad-basic-openssl kmod-usb-dwc2
|
kmod-ath10k-ct ath10k-firmware-qca988x-ct wpad-basic-openssl kmod-usb-dwc2
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
CONFIG_AT803X_PHY=y
|
|
||||||
CONFIG_BLK_MQ_PCI=y
|
CONFIG_BLK_MQ_PCI=y
|
||||||
CONFIG_CONTEXT_TRACKING=y
|
CONFIG_CONTEXT_TRACKING=y
|
||||||
CONFIG_CONTEXT_TRACKING_IDLE=y
|
CONFIG_CONTEXT_TRACKING_IDLE=y
|
||||||
@@ -7,7 +6,6 @@ CONFIG_CPU_MIPSR2_IRQ_VI=y
|
|||||||
CONFIG_CPU_RMAP=y
|
CONFIG_CPU_RMAP=y
|
||||||
CONFIG_CRC16=y
|
CONFIG_CRC16=y
|
||||||
CONFIG_CRYPTO_DEFLATE=y
|
CONFIG_CRYPTO_DEFLATE=y
|
||||||
CONFIG_CRYPTO_HASH_INFO=y
|
|
||||||
CONFIG_CRYPTO_LZO=y
|
CONFIG_CRYPTO_LZO=y
|
||||||
CONFIG_CRYPTO_ZSTD=y
|
CONFIG_CRYPTO_ZSTD=y
|
||||||
CONFIG_EXTRA_FIRMWARE="lantiq/xrx200_phy11g_a14.bin lantiq/xrx200_phy11g_a22.bin lantiq/xrx200_phy22f_a14.bin lantiq/xrx200_phy22f_a22.bin"
|
CONFIG_EXTRA_FIRMWARE="lantiq/xrx200_phy11g_a14.bin lantiq/xrx200_phy11g_a22.bin lantiq/xrx200_phy22f_a14.bin lantiq/xrx200_phy22f_a22.bin"
|
||||||
@@ -17,7 +15,6 @@ CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
|||||||
CONFIG_GRO_CELLS=y
|
CONFIG_GRO_CELLS=y
|
||||||
CONFIG_HWMON=y
|
CONFIG_HWMON=y
|
||||||
CONFIG_HW_RANDOM=y
|
CONFIG_HW_RANDOM=y
|
||||||
CONFIG_ICPLUS_PHY=y
|
|
||||||
CONFIG_IFX_VPE_EXT=y
|
CONFIG_IFX_VPE_EXT=y
|
||||||
CONFIG_INPUT=y
|
CONFIG_INPUT=y
|
||||||
CONFIG_INPUT_EVDEV=y
|
CONFIG_INPUT_EVDEV=y
|
||||||
@@ -47,6 +44,7 @@ CONFIG_NET_SWITCHDEV=y
|
|||||||
CONFIG_NLS=y
|
CONFIG_NLS=y
|
||||||
CONFIG_NR_CPUS=2
|
CONFIG_NR_CPUS=2
|
||||||
CONFIG_PADATA=y
|
CONFIG_PADATA=y
|
||||||
|
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
|
||||||
CONFIG_PCI=y
|
CONFIG_PCI=y
|
||||||
CONFIG_PCIEPORTBUS=y
|
CONFIG_PCIEPORTBUS=y
|
||||||
CONFIG_PCIE_LANTIQ=y
|
CONFIG_PCIE_LANTIQ=y
|
||||||
@@ -57,7 +55,6 @@ CONFIG_PHY_LANTIQ_VRX200_PCIE=y
|
|||||||
CONFIG_POWER_RESET_GPIO=y
|
CONFIG_POWER_RESET_GPIO=y
|
||||||
CONFIG_POWER_SUPPLY=y
|
CONFIG_POWER_SUPPLY=y
|
||||||
CONFIG_POWER_SUPPLY_HWMON=y
|
CONFIG_POWER_SUPPLY_HWMON=y
|
||||||
CONFIG_QCOM_NET_PHYLIB=y
|
|
||||||
CONFIG_QUEUED_RWLOCKS=y
|
CONFIG_QUEUED_RWLOCKS=y
|
||||||
CONFIG_QUEUED_SPINLOCKS=y
|
CONFIG_QUEUED_SPINLOCKS=y
|
||||||
CONFIG_REGULATOR=y
|
CONFIG_REGULATOR=y
|
||||||
|
|||||||
337
target/linux/mediatek/dts/mt7981b-cudy-wr3000h-v1.dts
Normal file
337
target/linux/mediatek/dts/mt7981b-cudy-wr3000h-v1.dts
Normal file
@@ -0,0 +1,337 @@
|
|||||||
|
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
|
||||||
|
#include "mt7981.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Cudy WR3000H v1";
|
||||||
|
compatible = "cudy,wr3000h-v1", "mediatek,mt7981-spim-snand-rfb";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
label-mac-device = &gmac0;
|
||||||
|
led-boot = &led_status;
|
||||||
|
led-failsafe = &led_status;
|
||||||
|
led-running = &led_status;
|
||||||
|
led-upgrade = &led_status;
|
||||||
|
serial0 = &uart0;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
gpio-keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "wps";
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gpio-export {
|
||||||
|
compatible = "gpio-export";
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
phyreset {
|
||||||
|
gpio-export,name = "phyreset";
|
||||||
|
gpio-export,output = <1>;
|
||||||
|
gpios = <&pio 3 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led_status: led@0 {
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&pio 5 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
led_internet {
|
||||||
|
function = LED_FUNCTION_WAN_ONLINE;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_wps {
|
||||||
|
function = LED_FUNCTION_WPS;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&pio 9 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_wlan2g {
|
||||||
|
function = LED_FUNCTION_WLAN_2GHZ;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&pio 6 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "phy0tpt";
|
||||||
|
};
|
||||||
|
|
||||||
|
led_wlan5g {
|
||||||
|
function = LED_FUNCTION_WLAN_5GHZ;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&pio 7 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "phy1tpt";
|
||||||
|
};
|
||||||
|
|
||||||
|
led_lan1 {
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
function-enumerator = <1>;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&pio 8 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_lan2 {
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
function-enumerator = <2>;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_lan3 {
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
function-enumerator = <3>;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&pio 12 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_lan4 {
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
function-enumerator = <4>;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&pio 13 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_wan {
|
||||||
|
function = LED_FUNCTION_WAN;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&pio 35 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&watchdog {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
ð {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&mdio_pins>;
|
||||||
|
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
gmac0: mac@0 {
|
||||||
|
compatible = "mediatek,eth-mac";
|
||||||
|
reg = <0>;
|
||||||
|
phy-mode = "2500base-x";
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
nvmem-cells = <&macaddr_bdinfo_de00 0>;
|
||||||
|
label = "lan";
|
||||||
|
|
||||||
|
fixed-link {
|
||||||
|
speed = <2500>;
|
||||||
|
full-duplex;
|
||||||
|
pause;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gmac1: mac@1 {
|
||||||
|
compatible = "mediatek,eth-mac";
|
||||||
|
reg = <1>;
|
||||||
|
phy-mode = "2500base-x";
|
||||||
|
phy-handle = <&phy6>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
nvmem-cells = <&macaddr_bdinfo_de00 1>;
|
||||||
|
label = "wan";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio_bus {
|
||||||
|
switch: switch@1f {
|
||||||
|
compatible = "mediatek,mt7531";
|
||||||
|
reg = <31>;
|
||||||
|
reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
|
||||||
|
interrupt-controller;
|
||||||
|
#interrupt-cells = <1>;
|
||||||
|
interrupt-parent = <&pio>;
|
||||||
|
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
};
|
||||||
|
phy6: ethernet-phy@6 {
|
||||||
|
compatible = "ethernet-phy-ieee802.3-c22"; // [RTL8221B-VB-CG 2.5Gbps PHY (C22)]
|
||||||
|
reg = <6>;
|
||||||
|
phy-mode = "2500base-x";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&spi0_flash_pins>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
spi_nand: flash@0 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
compatible = "spi-nand";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <52000000>;
|
||||||
|
|
||||||
|
spi-cal-enable;
|
||||||
|
spi-cal-mode = "read-data";
|
||||||
|
spi-cal-datalen = <7>;
|
||||||
|
spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
|
||||||
|
spi-cal-addrlen = <5>;
|
||||||
|
spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
|
||||||
|
|
||||||
|
spi-tx-bus-width = <4>;
|
||||||
|
spi-rx-bus-width = <4>;
|
||||||
|
mediatek,nmbm;
|
||||||
|
mediatek,bmt-max-ratio = <1>;
|
||||||
|
mediatek,bmt-max-reserved-blocks = <64>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "BL2";
|
||||||
|
reg = <0x00000 0x0100000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@100000 {
|
||||||
|
label = "u-boot-env";
|
||||||
|
reg = <0x0100000 0x0080000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
factory: partition@180000 {
|
||||||
|
label = "Factory";
|
||||||
|
reg = <0x180000 0x0200000>;
|
||||||
|
read-only;
|
||||||
|
nvmem-layout {
|
||||||
|
compatible = "fixed-layout";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
eeprom_factory_0: eeprom@0 {
|
||||||
|
reg = <0x0 0x1000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@380000 {
|
||||||
|
label = "bdinfo";
|
||||||
|
reg = <0x380000 0x0040000>;
|
||||||
|
read-only;
|
||||||
|
nvmem-layout {
|
||||||
|
compatible = "fixed-layout";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_bdinfo_de00: macaddr@de00 {
|
||||||
|
compatible = "mac-base";
|
||||||
|
reg = <0xde00 0x6>;
|
||||||
|
#nvmem-cell-cells = <1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@3C0000 {
|
||||||
|
label = "FIP";
|
||||||
|
reg = <0x3C0000 0x0200000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@580000 {
|
||||||
|
label = "ubi";
|
||||||
|
reg = <0x5C0000 0x4000000>;
|
||||||
|
compatible = "linux,ubi";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pio {
|
||||||
|
spi0_flash_pins: spi0-pins {
|
||||||
|
mux {
|
||||||
|
function = "spi";
|
||||||
|
groups = "spi0", "spi0_wp_hold";
|
||||||
|
};
|
||||||
|
conf-pu {
|
||||||
|
pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||||
|
drive-strength = <MTK_DRIVE_8mA>;
|
||||||
|
bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
|
||||||
|
};
|
||||||
|
|
||||||
|
conf-pd {
|
||||||
|
pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||||
|
drive-strength = <MTK_DRIVE_8mA>;
|
||||||
|
bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&switch {
|
||||||
|
ports {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
port@0 {
|
||||||
|
reg = <0>;
|
||||||
|
label = "lan1";
|
||||||
|
};
|
||||||
|
|
||||||
|
port@1 {
|
||||||
|
reg = <1>;
|
||||||
|
label = "lan2";
|
||||||
|
};
|
||||||
|
|
||||||
|
port@2 {
|
||||||
|
reg = <2>;
|
||||||
|
label = "lan3";
|
||||||
|
};
|
||||||
|
|
||||||
|
port@3 {
|
||||||
|
reg = <3>;
|
||||||
|
label = "lan4";
|
||||||
|
};
|
||||||
|
|
||||||
|
port@6 {
|
||||||
|
reg = <6>;
|
||||||
|
label = "cpu";
|
||||||
|
ethernet = <&gmac0>;
|
||||||
|
phy-mode = "2500base-x";
|
||||||
|
|
||||||
|
fixed-link {
|
||||||
|
speed = <2500>;
|
||||||
|
full-duplex;
|
||||||
|
pause;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&wifi {
|
||||||
|
status = "okay";
|
||||||
|
nvmem-cells = <&eeprom_factory_0>;
|
||||||
|
nvmem-cell-names = "eeprom";
|
||||||
|
};
|
||||||
@@ -87,9 +87,8 @@
|
|||||||
reset-post-delay-us = <1000000>;
|
reset-post-delay-us = <1000000>;
|
||||||
|
|
||||||
phy6: phy@6 {
|
phy6: phy@6 {
|
||||||
compatible = "maxlinear,gpy211", "ethernet-phy-ieee802.3-c45";
|
compatible = "ethernet-phy-ieee802.3-c45";
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
phy-mode = "2500base-x";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
switch@1f {
|
switch@1f {
|
||||||
|
|||||||
@@ -38,6 +38,14 @@ cudy,re3000-v1)
|
|||||||
cudy,wr3000-v1)
|
cudy,wr3000-v1)
|
||||||
ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan"
|
ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan"
|
||||||
;;
|
;;
|
||||||
|
cudy,wr3000h-v1)
|
||||||
|
ucidef_set_led_netdev "lan1" "lan1" "white:lan-1" "lan1" "link tx rx"
|
||||||
|
ucidef_set_led_netdev "lan2" "lan2" "white:lan-2" "lan2" "link tx rx"
|
||||||
|
ucidef_set_led_netdev "lan3" "lan3" "white:lan-3" "lan3" "link tx rx"
|
||||||
|
ucidef_set_led_netdev "lan4" "lan4" "white:lan-4" "lan4" "link tx rx"
|
||||||
|
ucidef_set_led_netdev "wan" "wan" "white:wan" "wan" "link tx rx"
|
||||||
|
ucidef_set_led_netdev "internet" "internet" "white:wan-online" "wan" "link"
|
||||||
|
;;
|
||||||
glinet,gl-x3000|\
|
glinet,gl-x3000|\
|
||||||
glinet,gl-xe3000)
|
glinet,gl-xe3000)
|
||||||
ucidef_set_led_default "power" "POWER" "green:power" "1"
|
ucidef_set_led_default "power" "POWER" "green:power" "1"
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ case "$board" in
|
|||||||
cudy,re3000-v1|\
|
cudy,re3000-v1|\
|
||||||
cudy,tr3000-v1|\
|
cudy,tr3000-v1|\
|
||||||
cudy,wr3000s-v1|\
|
cudy,wr3000s-v1|\
|
||||||
|
cudy,wr3000h-v1|\
|
||||||
cudy,wr3000-v1)
|
cudy,wr3000-v1)
|
||||||
addr=$(mtd_get_mac_binary bdinfo 0xde00)
|
addr=$(mtd_get_mac_binary bdinfo 0xde00)
|
||||||
# Originally, phy0 is phy1 mac with LA bit set. However, this would conflict
|
# Originally, phy0 is phy1 mac with LA bit set. However, this would conflict
|
||||||
|
|||||||
@@ -124,6 +124,10 @@ platform_do_upgrade() {
|
|||||||
CI_KERNPART="linux"
|
CI_KERNPART="linux"
|
||||||
nand_do_upgrade "$1"
|
nand_do_upgrade "$1"
|
||||||
;;
|
;;
|
||||||
|
cudy,wr3000h-v1)
|
||||||
|
CI_UBIPART="ubi"
|
||||||
|
nand_do_upgrade "$1"
|
||||||
|
;;
|
||||||
cudy,re3000-v1|\
|
cudy,re3000-v1|\
|
||||||
cudy,wr3000-v1|\
|
cudy,wr3000-v1|\
|
||||||
yuncore,ax835)
|
yuncore,ax835)
|
||||||
|
|||||||
@@ -762,6 +762,23 @@ define Device/cudy_wr3000s-v1
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += cudy_wr3000s-v1
|
TARGET_DEVICES += cudy_wr3000s-v1
|
||||||
|
|
||||||
|
define Device/cudy_wr3000h-v1
|
||||||
|
DEVICE_VENDOR := Cudy
|
||||||
|
DEVICE_MODEL := WR3000H
|
||||||
|
DEVICE_VARIANT := v1
|
||||||
|
DEVICE_DTS := mt7981b-cudy-wr3000h-v1
|
||||||
|
DEVICE_DTS_DIR := ../dts
|
||||||
|
SUPPORTED_DEVICES += R59
|
||||||
|
UBINIZE_OPTS := -E 5
|
||||||
|
BLOCKSIZE := 128k
|
||||||
|
PAGESIZE := 2048
|
||||||
|
IMAGE_SIZE := 65536k
|
||||||
|
KERNEL_IN_UBI := 1
|
||||||
|
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||||
|
DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += cudy_wr3000h-v1
|
||||||
|
|
||||||
define Device/dlink_aquila-pro-ai-m30-a1
|
define Device/dlink_aquila-pro-ai-m30-a1
|
||||||
DEVICE_VENDOR := D-Link
|
DEVICE_VENDOR := D-Link
|
||||||
DEVICE_MODEL := AQUILA PRO AI M30
|
DEVICE_MODEL := AQUILA PRO AI M30
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ mvebu_setup_interfaces()
|
|||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
ctera,c200-v2|\
|
ctera,c200-v2|\
|
||||||
synology,ds213j)
|
synology,ds213j|\
|
||||||
|
wd,cloud-mirror-gen2)
|
||||||
ucidef_set_interface_lan "eth0" "dhcp"
|
ucidef_set_interface_lan "eth0" "dhcp"
|
||||||
;;
|
;;
|
||||||
cznic,turris-omnia)
|
cznic,turris-omnia)
|
||||||
@@ -94,6 +95,12 @@ mvebu_setup_macs()
|
|||||||
lan_mac=$label_mac
|
lan_mac=$label_mac
|
||||||
wan_mac=$label_mac
|
wan_mac=$label_mac
|
||||||
;;
|
;;
|
||||||
|
wd,cloud-mirror-gen2)
|
||||||
|
# mac address is on ubi "config" or ubi "reserve2" in text file.
|
||||||
|
# ubi "reserve2" /dev/mtd7 is twice small and only contains basic OEM factory info
|
||||||
|
label_mac=$(macaddr_canonicalize $(strings /dev/mtd7|grep -E '([0-9A-F]{2}[:])'))
|
||||||
|
lan_mac=$label_mac
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ platform_do_upgrade() {
|
|||||||
CI_ROOT_UBIPART=ubi
|
CI_ROOT_UBIPART=ubi
|
||||||
nand_do_upgrade "$1"
|
nand_do_upgrade "$1"
|
||||||
;;
|
;;
|
||||||
buffalo,ls421de)
|
buffalo,ls421de|\
|
||||||
|
wd,cloud-mirror-gen2)
|
||||||
nand_do_upgrade "$1"
|
nand_do_upgrade "$1"
|
||||||
;;
|
;;
|
||||||
ctera,c200-v2)
|
ctera,c200-v2)
|
||||||
|
|||||||
@@ -0,0 +1,368 @@
|
|||||||
|
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
/*
|
||||||
|
* Device Tree file for Western Digital My Cloud Mirror Gen 2
|
||||||
|
* (BWVZ/Grand Teton)
|
||||||
|
*
|
||||||
|
* Copyright (C) 2020
|
||||||
|
*
|
||||||
|
* Based on the code from:
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 Evgeny Kolesnikov <evgenyz@gmail.com>
|
||||||
|
* Copyright (C) 2016 Martin Mueller <mm@sig21.net>
|
||||||
|
* Copyright (C) 2013 Gregory CLEMENT <gregory.clement@free-electrons.com>
|
||||||
|
* Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
#include "armada-385.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "WD MyCloud Mirror Gen 2 (BWVZ/Grand Teton)";
|
||||||
|
compatible = "wd,cloud-mirror-gen2", "marvell,armada385", "marvell,armada380";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_boot;
|
||||||
|
led-failsafe = &led_boot;
|
||||||
|
led-upgrade = &led_boot;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
append-rootblock = "nullparameter="; /* override the bootloader args */
|
||||||
|
};
|
||||||
|
|
||||||
|
memory {
|
||||||
|
device_type = "memory";
|
||||||
|
reg = <0x00000000 0x20000000>; /* 512 MB */
|
||||||
|
};
|
||||||
|
|
||||||
|
soc {
|
||||||
|
ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
|
||||||
|
MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
|
||||||
|
MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
|
||||||
|
MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
|
||||||
|
MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
|
||||||
|
|
||||||
|
internal-regs {
|
||||||
|
timer@c200 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0: i2c@11000 {
|
||||||
|
status = "okay";
|
||||||
|
clock-frequency = <100000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c1: i2c@11100 {
|
||||||
|
status = "okay";
|
||||||
|
clock-frequency = <100000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
serial@12000 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Connected to Welltrend 6703F-OG240WT MCU
|
||||||
|
* which controls power, fan and other things
|
||||||
|
*/
|
||||||
|
serial@12100 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
pinctrl@18000 {
|
||||||
|
/* use only one pin for UART1, as mpp20 is used by sata0 */
|
||||||
|
uart1_pins: uart-pins-1 {
|
||||||
|
marvell,pins = "mpp19";
|
||||||
|
marvell,function = "ua1";
|
||||||
|
};
|
||||||
|
|
||||||
|
xhci0_vbus_pins: xhci0-vbus-pins {
|
||||||
|
marvell,pins = "mpp26";
|
||||||
|
marvell,function = "gpio";
|
||||||
|
};
|
||||||
|
|
||||||
|
xhci1_vbus_pins: xhci1-vbus-pins {
|
||||||
|
marvell,pins = "mpp27";
|
||||||
|
marvell,function = "gpio";
|
||||||
|
};
|
||||||
|
|
||||||
|
sata0_pins: sata-pins-0 {
|
||||||
|
marvell,pins = "mpp55";
|
||||||
|
marvell,function = "sata0";
|
||||||
|
};
|
||||||
|
|
||||||
|
sata1_pins: sata-pins-1 {
|
||||||
|
marvell,pins = "mpp56";
|
||||||
|
marvell,function = "sata1";
|
||||||
|
};
|
||||||
|
|
||||||
|
sata_leds: sata-leds {
|
||||||
|
marvell,pins = "mpp43", "mpp52", "mpp53", "mpp54";
|
||||||
|
marvell,function = "gpio";
|
||||||
|
};
|
||||||
|
|
||||||
|
btn_pins: btn-pins {
|
||||||
|
marvell,pins = "mpp50";
|
||||||
|
marvell,function = "gpio";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
usb@58000 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
phy: mdio@72004 {
|
||||||
|
phy0: ethernet-phy@0 {
|
||||||
|
/* Init ETH LEDs */
|
||||||
|
marvell,reg-init = <3 16 0 0x101e>;
|
||||||
|
reg = <0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sata@a8000 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
nand-controller@d0000 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
nand: nand@0 {
|
||||||
|
reg = <0>;
|
||||||
|
label = "pxa3xx_nand-0";
|
||||||
|
nand-rb = <0>;
|
||||||
|
marvell,nand-keep-config;
|
||||||
|
#marvell,nand-enable-arbiter; //optional
|
||||||
|
nand-on-flash-bbt;
|
||||||
|
nand-ecc-strength = <4>;
|
||||||
|
nand-ecc-step-size = <512>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@00000000 {
|
||||||
|
label = "U-Boot";
|
||||||
|
reg = <0x00000000 0x00500000>; /* 5 MB */
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@00500000 {
|
||||||
|
label = "kernel";
|
||||||
|
reg = <0x00500000 0x00500000>; /* 5 MB */
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@00a00000 {
|
||||||
|
label = "uRamdisk";
|
||||||
|
reg = <0x00a00000 0x00500000>; /* 5 MB */
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@00f00000 {
|
||||||
|
label = "ubi";
|
||||||
|
reg = <0x00f00000 0x0b900000>; /* 185 MB */
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@c800000 {
|
||||||
|
label = "rescue fw";
|
||||||
|
reg = <0x0c800000 0x00f00000>; /* 15 MB */
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@d70000 {
|
||||||
|
label = "config";
|
||||||
|
reg = <0x0d700000 0x01400000>; /* 20 MB */
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@eb00000 {
|
||||||
|
label = "reserve1";
|
||||||
|
reg = <0x0eb00000 0x00a00000>; /* 10 MB */
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@f500000 {
|
||||||
|
label = "reserve2";
|
||||||
|
reg = <0x0f500000 0x00a00000>; /* 10 MB */
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
usb3@f0000 {
|
||||||
|
usb-phy = <&usb3_0_phy>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
usb3@f8000 {
|
||||||
|
usb-phy = <&usb3_1_phy>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gpio-leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&sata_leds>;
|
||||||
|
|
||||||
|
led_boot: s1red {
|
||||||
|
label = "red:hdd1";
|
||||||
|
gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
s2red {
|
||||||
|
label = "red:hdd2";
|
||||||
|
gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
s1blue {
|
||||||
|
label = "blue:hdd1";
|
||||||
|
gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "ata1";
|
||||||
|
};
|
||||||
|
s2blue {
|
||||||
|
label = "blue:hdd2";
|
||||||
|
gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "ata2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gpio-keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&btn_pins>;
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
linux,code = <KEY_RESTART>; // Restart=0x198, Power=0x116
|
||||||
|
gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
wakeup-source;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
usb3_0_phy: usb3_0_phy {
|
||||||
|
compatible = "usb-nop-xceiv";
|
||||||
|
vcc-supply = <®_usb3_0_vbus>;
|
||||||
|
};
|
||||||
|
|
||||||
|
usb3_1_phy: usb3_1_phy {
|
||||||
|
compatible = "usb-nop-xceiv";
|
||||||
|
vcc-supply = <®_usb3_1_vbus>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_usb3_0_vbus: usb3-vbus0 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "usb3-vbus0";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&xhci0_vbus_pins>;
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
enable-active-high;
|
||||||
|
regulator-always-on;
|
||||||
|
gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_usb3_1_vbus: usb3-vbus1 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "usb3-vbus1";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&xhci1_vbus_pins>;
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
enable-active-high;
|
||||||
|
regulator-always-on;
|
||||||
|
gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_sata0: pwr-sata0 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "pwr_en_sata0";
|
||||||
|
regulator-min-microvolt = <12000000>;
|
||||||
|
regulator-max-microvolt = <12000000>;
|
||||||
|
enable-active-high;
|
||||||
|
regulator-boot-on;
|
||||||
|
gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_5v_sata0: v5-sata0 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "v5.0-sata0";
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
vin-supply = <®_sata0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_12v_sata0: v12-sata0 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "v12.0-sata0";
|
||||||
|
regulator-min-microvolt = <12000000>;
|
||||||
|
regulator-max-microvolt = <12000000>;
|
||||||
|
vin-supply = <®_sata0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_sata1: pwr-sata1 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "pwr_en_sata1";
|
||||||
|
regulator-min-microvolt = <12000000>;
|
||||||
|
regulator-max-microvolt = <12000000>;
|
||||||
|
enable-active-high;
|
||||||
|
regulator-boot-on;
|
||||||
|
gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_5v_sata1: v5-sata1 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "v5.0-sata1";
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
vin-supply = <®_sata1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_12v_sata1: v12-sata1 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "v12.0-sata1";
|
||||||
|
regulator-min-microvolt = <12000000>;
|
||||||
|
regulator-max-microvolt = <12000000>;
|
||||||
|
vin-supply = <®_sata1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&bm {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&bm_bppi {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
ð2 {
|
||||||
|
status = "okay";
|
||||||
|
phy = <&phy0>;
|
||||||
|
phy-mode = "sgmii";
|
||||||
|
buffer-manager = <&bm>;
|
||||||
|
bm,pool-long = <0>;
|
||||||
|
bm,pool-short = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&ahci0 {
|
||||||
|
status = "okay";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
sata-port@0 {
|
||||||
|
reg = <0>;
|
||||||
|
target-supply = <®_sata0>;
|
||||||
|
#thermal-sensor-cells = <0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
sata-port@1 {
|
||||||
|
reg = <1>;
|
||||||
|
target-supply = <®_sata1>;
|
||||||
|
#thermal-sensor-cells = <1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -448,3 +448,20 @@ define Device/synology_ds213j
|
|||||||
-ppp -kmod-nft-offload -dnsmasq -odhcpd-ipv6only
|
-ppp -kmod-nft-offload -dnsmasq -odhcpd-ipv6only
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += synology_ds213j
|
TARGET_DEVICES += synology_ds213j
|
||||||
|
|
||||||
|
define Device/wd_cloud-mirror-gen2
|
||||||
|
$(Device/NAND-128K)
|
||||||
|
DEVICE_VENDOR := Western Digital
|
||||||
|
DEVICE_MODEL := MyCloud Mirror Gen 2 (BWVZ/Grand Teton)
|
||||||
|
DEVICE_PACKAGES += -uboot-envtools coreutils-stty mkf2fs e2fsprogs \
|
||||||
|
partx-utils kmod-hwmon-drivetemp -ppp -kmod-nft-offload -dnsmasq \
|
||||||
|
-odhcpd-ipv6only
|
||||||
|
DEVICE_DTS := armada-385-wd_cloud-mirror-gen2
|
||||||
|
KERNEL_SIZE := 5120k
|
||||||
|
KERNEL := kernel-bin | append-dtb | uImage none
|
||||||
|
KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none
|
||||||
|
IMAGES += image-cfs-factory.bin uImage-factory.bin
|
||||||
|
IMAGE/image-cfs-factory.bin := append-ubi
|
||||||
|
IMAGE/uImage-factory.bin := append-kernel
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += wd_cloud-mirror-gen2
|
||||||
|
|||||||
@@ -0,0 +1,151 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
#include "ipq6018.dtsi"
|
||||||
|
#include "ipq6018-cp-cpu.dtsi"
|
||||||
|
#include "ipq6018-ess.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "TP-Link EAP610-Outdoor";
|
||||||
|
compatible = "tplink,eap610-outdoor", "qcom,ipq6018";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
serial0 = &blsp1_uart3;
|
||||||
|
led-boot = &led_sys_green;
|
||||||
|
led-failsafe = &led_sys_amber;
|
||||||
|
led-running = &led_sys_green;
|
||||||
|
led-upgrade = &led_sys_amber;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
bootargs-append = " ubi.block=0,rootfs root=/dev/ubiblock0_1";
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led_sys_amber: led-0 {
|
||||||
|
function = "system";
|
||||||
|
color = <LED_COLOR_ID_AMBER>;
|
||||||
|
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_sys_green: led-1 {
|
||||||
|
function = "system";
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gpio-restart {
|
||||||
|
compatible = "gpio-restart";
|
||||||
|
gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
|
||||||
|
open-source;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&blsp1_uart3 {
|
||||||
|
pinctrl-0 = <&serial_3_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&tlmm {
|
||||||
|
mdio_pins: mdio-pins {
|
||||||
|
mdc {
|
||||||
|
pins = "gpio64";
|
||||||
|
function = "mdc";
|
||||||
|
drive-strength = <8>;
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
|
||||||
|
mdio {
|
||||||
|
pins = "gpio65";
|
||||||
|
function = "mdio";
|
||||||
|
drive-strength = <8>;
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
led_enable {
|
||||||
|
gpio-hog;
|
||||||
|
output-high;
|
||||||
|
gpios = <36 GPIO_ACTIVE_HIGH>;
|
||||||
|
line-name = "enable-leds";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&dp5 {
|
||||||
|
phy-handle = <&rtl8211f_4>;
|
||||||
|
phy-mode = "sgmii";
|
||||||
|
label = "lan";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&edma {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio {
|
||||||
|
pinctrl-0 = <&mdio_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
reset-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>;
|
||||||
|
reset-delay-us = <10000>;
|
||||||
|
reset-post-delay-us = <50000>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
rtl8211f_4: ethernet-phy@4 {
|
||||||
|
reg = <4>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&switch {
|
||||||
|
switch_lan_bmp = <ESS_PORT5>;
|
||||||
|
switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
qcom,port_phyinfo {
|
||||||
|
port@4 {
|
||||||
|
port_id = <5>;
|
||||||
|
phy_address = <4>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&qpic_bam {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&qpic_nand {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
nand@0 {
|
||||||
|
reg = <0>;
|
||||||
|
|
||||||
|
nand-ecc-strength = <4>;
|
||||||
|
nand-ecc-step-size = <512>;
|
||||||
|
nand-bus-width = <8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&wifi {
|
||||||
|
ieee80211-freq-limit = <2402000 5835000>;
|
||||||
|
qcom,ath11k-calibration-variant = "TP-Link-EAP610-Outdoor";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
@@ -68,6 +68,24 @@ define Device/qihoo_360v6
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += qihoo_360v6
|
TARGET_DEVICES += qihoo_360v6
|
||||||
|
|
||||||
|
define Device/tplink_eap610-outdoor
|
||||||
|
$(call Device/FitImage)
|
||||||
|
$(call Device/UbiFit)
|
||||||
|
DEVICE_VENDOR := TP-Link
|
||||||
|
DEVICE_MODEL := EAP610-Outdoor
|
||||||
|
BLOCKSIZE := 128k
|
||||||
|
PAGESIZE := 2048
|
||||||
|
SOC := ipq6018
|
||||||
|
DEVICE_PACKAGES := ipq-wifi-tplink_eap610-outdoor
|
||||||
|
IMAGES += web-ui-factory.bin
|
||||||
|
IMAGE/web-ui-factory.bin := append-ubi | tplink-image-2022
|
||||||
|
TPLINK_SUPPORT_STRING := SupportList: \
|
||||||
|
EAP610-Outdoor(TP-Link|UN|AX1800-D):1.0 \
|
||||||
|
EAP610-Outdoor(TP-Link|JP|AX1800-D):1.0 \
|
||||||
|
EAP610-Outdoor(TP-Link|CA|AX1800-D):1.0
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += tplink_eap610-outdoor
|
||||||
|
|
||||||
define Device/yuncore_fap650
|
define Device/yuncore_fap650
|
||||||
$(call Device/FitImage)
|
$(call Device/FitImage)
|
||||||
$(call Device/UbiFit)
|
$(call Device/UbiFit)
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ ipq60xx_setup_interfaces()
|
|||||||
qihoo,360v6)
|
qihoo,360v6)
|
||||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
|
||||||
;;
|
;;
|
||||||
|
tplink,eap610-outdoor)
|
||||||
|
ucidef_set_interface_lan "lan" "dhcp"
|
||||||
|
;;
|
||||||
linksys,mr7350|\
|
linksys,mr7350|\
|
||||||
yuncore,fap650)
|
yuncore,fap650)
|
||||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
|
||||||
@@ -51,6 +54,10 @@ ipq60xx_setup_macs()
|
|||||||
wan_mac=$(macaddr_add "$lan_mac" 1)
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||||
label_mac=$lan_mac
|
label_mac=$lan_mac
|
||||||
;;
|
;;
|
||||||
|
tplink,eap610-outdoor)
|
||||||
|
label_mac=$(get_mac_binary /tmp/factory_data/default-mac 0)
|
||||||
|
lan_mac=$label_mac
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
||||||
|
|||||||
@@ -32,6 +32,13 @@ case "$FIRMWARE" in
|
|||||||
ath11k_patch_mac $(macaddr_add $label_mac 2) 1
|
ath11k_patch_mac $(macaddr_add $label_mac 2) 1
|
||||||
ath11k_set_macflag
|
ath11k_set_macflag
|
||||||
;;
|
;;
|
||||||
|
tplink,eap610-outdoor)
|
||||||
|
caldata_from_file "/tmp/factory_data/radio" 0 0x10000
|
||||||
|
label_mac=$(get_mac_binary /tmp/factory_data/default-mac 0)
|
||||||
|
ath11k_patch_mac $label_mac 1
|
||||||
|
ath11k_patch_mac $(macaddr_add $label_mac 1) 0
|
||||||
|
ath11k_set_macflag
|
||||||
|
;;
|
||||||
yuncore,fap650)
|
yuncore,fap650)
|
||||||
caldata_extract "0:art" 0x1000 0x20000
|
caldata_extract "0:art" 0x1000 0x20000
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
preinit_mount_factory_data() {
|
||||||
|
local mtd_path
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
|
case $(board_name) in
|
||||||
|
tplink,eap610-outdoor)
|
||||||
|
mtd_path=$(find_mtd_chardev "factory_data")
|
||||||
|
ubiattach --dev-path="$mtd_path" --devn=1
|
||||||
|
mkdir /tmp/factory_data
|
||||||
|
mount -o ro,noatime -t ubifs ubi1:ubi_factory_data /tmp/factory_data
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
boot_hook_add preinit_main preinit_mount_factory_data
|
||||||
@@ -4,6 +4,79 @@ REQUIRE_IMAGE_METADATA=1
|
|||||||
RAMFS_COPY_BIN='fw_printenv fw_setenv head'
|
RAMFS_COPY_BIN='fw_printenv fw_setenv head'
|
||||||
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
|
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
|
||||||
|
|
||||||
|
remove_oem_ubi_volume() {
|
||||||
|
local oem_volume_name="$1"
|
||||||
|
local oem_ubivol
|
||||||
|
local mtdnum
|
||||||
|
local ubidev
|
||||||
|
|
||||||
|
mtdnum=$(find_mtd_index "$CI_UBIPART")
|
||||||
|
if [ ! "$mtdnum" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
ubidev=$(nand_find_ubi "$CI_UBIPART")
|
||||||
|
if [ ! "$ubidev" ]; then
|
||||||
|
ubiattach --mtdn="$mtdnum"
|
||||||
|
ubidev=$(nand_find_ubi "$CI_UBIPART")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$ubidev" ]; then
|
||||||
|
oem_ubivol=$(nand_find_volume "$ubidev" "$oem_volume_name")
|
||||||
|
[ "$oem_ubivol" ] && ubirmvol "/dev/$ubidev" --name="$oem_volume_name"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
tplink_get_boot_part() {
|
||||||
|
local cur_boot_part
|
||||||
|
local args
|
||||||
|
|
||||||
|
# Try to find rootfs from kernel arguments
|
||||||
|
read -r args < /proc/cmdline
|
||||||
|
for arg in $args; do
|
||||||
|
local ubi_mtd_arg=${arg#ubi.mtd=}
|
||||||
|
case "$ubi_mtd_arg" in
|
||||||
|
rootfs|rootfs_1)
|
||||||
|
echo "$ubi_mtd_arg"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Fallback to u-boot env (e.g. when running initramfs)
|
||||||
|
cur_boot_part="$(/usr/sbin/fw_printenv -n tp_boot_idx)"
|
||||||
|
case $cur_boot_part in
|
||||||
|
1)
|
||||||
|
echo rootfs_1
|
||||||
|
;;
|
||||||
|
0|*)
|
||||||
|
echo rootfs
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
tplink_do_upgrade() {
|
||||||
|
local new_boot_part
|
||||||
|
|
||||||
|
case $(tplink_get_boot_part) in
|
||||||
|
rootfs)
|
||||||
|
CI_UBIPART="rootfs_1"
|
||||||
|
new_boot_part=1
|
||||||
|
;;
|
||||||
|
rootfs_1)
|
||||||
|
CI_UBIPART="rootfs"
|
||||||
|
new_boot_part=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
fw_setenv -s - <<-EOF
|
||||||
|
tp_boot_idx $new_boot_part
|
||||||
|
EOF
|
||||||
|
|
||||||
|
remove_oem_ubi_volume ubi_rootfs
|
||||||
|
nand_do_upgrade "$1"
|
||||||
|
}
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -55,6 +128,9 @@ platform_do_upgrade() {
|
|||||||
qihoo,360v6)
|
qihoo,360v6)
|
||||||
nand_do_upgrade "$1"
|
nand_do_upgrade "$1"
|
||||||
;;
|
;;
|
||||||
|
tplink,eap610-outdoor)
|
||||||
|
tplink_do_upgrade "$1"
|
||||||
|
;;
|
||||||
yuncore,fap650)
|
yuncore,fap650)
|
||||||
[ "$(fw_printenv -n owrt_env_ver 2>/dev/null)" != "7" ] && yuncore_fap650_env_setup
|
[ "$(fw_printenv -n owrt_env_ver 2>/dev/null)" != "7" ] && yuncore_fap650_env_setup
|
||||||
local active="$(fw_printenv -n owrt_slotactive 2>/dev/null)"
|
local active="$(fw_printenv -n owrt_slotactive 2>/dev/null)"
|
||||||
|
|||||||
@@ -30,18 +30,21 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
internet {
|
internet {
|
||||||
label = "green:internet";
|
function = LED_FUNCTION_WAN;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
wifi2 {
|
wifi2 {
|
||||||
label = "green:wifi2";
|
function = LED_FUNCTION_WLAN_2GHZ;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||||
linux,default-trigger = "phy0tpt";
|
linux,default-trigger = "phy0tpt";
|
||||||
};
|
};
|
||||||
|
|
||||||
wifi5 {
|
wifi5 {
|
||||||
label = "green:wifi5";
|
function = LED_FUNCTION_WLAN_5GHZ;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||||
linux,default-trigger = "phy1tpt";
|
linux,default-trigger = "phy1tpt";
|
||||||
};
|
};
|
||||||
|
|||||||
243
target/linux/ramips/dts/mt7628an_keenetic_kn-1711.dts
Normal file
243
target/linux/ramips/dts/mt7628an_keenetic_kn-1711.dts
Normal file
@@ -0,0 +1,243 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
#include "mt7628an.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "keenetic,kn-1711", "mediatek,mt7628an-soc";
|
||||||
|
model = "Keenetic KN-1711";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_power;
|
||||||
|
led-failsafe = &led_power;
|
||||||
|
led-running = &led_power;
|
||||||
|
led-upgrade = &led_power;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
bootargs = "console=ttyS0,115200";
|
||||||
|
};
|
||||||
|
|
||||||
|
regulator-usb {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "USB-power";
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
|
||||||
|
enable-active-high;
|
||||||
|
regulator-always-on;
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led_power: power {
|
||||||
|
function = LED_FUNCTION_POWER;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
internet {
|
||||||
|
function = LED_FUNCTION_WAN;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wifi2 {
|
||||||
|
function = LED_FUNCTION_WLAN_2GHZ;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "phy0tpt";
|
||||||
|
};
|
||||||
|
|
||||||
|
wifi5 {
|
||||||
|
function = LED_FUNCTION_WLAN_5GHZ;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "phy1tpt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
fn {
|
||||||
|
label = "fn";
|
||||||
|
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,code = <BTN_0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "restart";
|
||||||
|
gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "wps";
|
||||||
|
gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual_flash {
|
||||||
|
compatible = "mtd-concat";
|
||||||
|
devices = <&firmware1 &firmware2>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
compatible = "denx,uimage";
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0x0 0x1CC0000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&state_default {
|
||||||
|
gpio {
|
||||||
|
groups = "i2s", "i2c", "gpio", "refclk", "wdt", "wled_an";
|
||||||
|
function = "gpio";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <104000000>;
|
||||||
|
|
||||||
|
partitions: partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "u-boot";
|
||||||
|
reg = <0x0 0x30000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@30000 {
|
||||||
|
label = "u-config";
|
||||||
|
reg = <0x30000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@40000 {
|
||||||
|
label = "rf-eeprom";
|
||||||
|
reg = <0x40000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
|
||||||
|
nvmem-layout {
|
||||||
|
compatible = "fixed-layout";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
eeprom_factory_0: eeprom@0 {
|
||||||
|
reg = <0x0 0x400>;
|
||||||
|
};
|
||||||
|
|
||||||
|
eeprom_factory_400: eeprom@400 {
|
||||||
|
reg = <0x400 0x4da8>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_factory_28: macaddr@28 {
|
||||||
|
reg = <0x28 0x6>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
firmware1: partition@50000 {
|
||||||
|
label = "firmware_1";
|
||||||
|
reg = <0x50000 0xe60000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@eb0000 {
|
||||||
|
label = "config_1";
|
||||||
|
reg = <0xeb0000 0x40000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@ef0000 {
|
||||||
|
label = "storage";
|
||||||
|
reg = <0xef0000 0x100000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@ff0000 {
|
||||||
|
label = "dump";
|
||||||
|
reg = <0xff0000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@1000000 {
|
||||||
|
label = "u-state";
|
||||||
|
reg = <0x1000000 0x30000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@1030000 {
|
||||||
|
label = "u-config_res";
|
||||||
|
reg = <0x1030000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@1040000 {
|
||||||
|
label = "rf-eeprom_res";
|
||||||
|
reg = <0x1040000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
firmware2: partition@1050000 {
|
||||||
|
label = "firmware_2";
|
||||||
|
reg = <0x1050000 0xe60000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@1EB0000 {
|
||||||
|
label = "Config_2";
|
||||||
|
reg = <0x1eb0000 0x40000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ðernet {
|
||||||
|
nvmem-cells = <&macaddr_factory_28>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
};
|
||||||
|
|
||||||
|
&esw {
|
||||||
|
mediatek,portmap = <0x3e>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&wmac {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
nvmem-cells = <&eeprom_factory_0>;
|
||||||
|
nvmem-cell-names = "eeprom";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie0 {
|
||||||
|
wifi@0,0 {
|
||||||
|
compatible = "mediatek,mt76";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
nvmem-cells = <&eeprom_factory_400>;
|
||||||
|
nvmem-cell-names = "eeprom";
|
||||||
|
ieee80211-freq-limit = <5000000 6000000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
regulator-max-microvolt = <5000000>;
|
regulator-max-microvolt = <5000000>;
|
||||||
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
|
||||||
enable-active-high;
|
enable-active-high;
|
||||||
|
regulator-always-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
@@ -44,17 +45,18 @@
|
|||||||
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
fn {
|
wifi2 {
|
||||||
function = LED_FUNCTION_USB;
|
function = LED_FUNCTION_WLAN_2GHZ;
|
||||||
color = <LED_COLOR_ID_GREEN>;
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "phy0tpt";
|
||||||
};
|
};
|
||||||
|
|
||||||
wifi {
|
wifi5 {
|
||||||
function = LED_FUNCTION_WLAN;
|
function = LED_FUNCTION_WLAN_5GHZ;
|
||||||
color = <LED_COLOR_ID_GREEN>;
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||||
linux,default-trigger = "phy0tpt","phy1tpt";
|
linux,default-trigger = "phy1tpt";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -93,7 +95,7 @@
|
|||||||
partition@0 {
|
partition@0 {
|
||||||
compatible = "denx,uimage";
|
compatible = "denx,uimage";
|
||||||
label = "firmware";
|
label = "firmware";
|
||||||
reg = <0x0 0x1CC0000>;
|
reg = <0x0 0x1cc0000>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -160,21 +162,21 @@
|
|||||||
reg = <0x50000 0xe60000>;
|
reg = <0x50000 0xe60000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@EB0000 {
|
partition@eb0000 {
|
||||||
label = "config_1";
|
label = "config_1";
|
||||||
reg = <0xEB0000 0x40000>;
|
reg = <0xeb0000 0x40000>;
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@EF0000 {
|
partition@ef0000 {
|
||||||
label = "storage";
|
label = "storage";
|
||||||
reg = <0xEF0000 0x100000>;
|
reg = <0xef0000 0x100000>;
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@FF0000 {
|
partition@ff0000 {
|
||||||
label = "dump";
|
label = "dump";
|
||||||
reg = <0xFF0000 0x10000>;
|
reg = <0xff0000 0x10000>;
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -198,12 +200,12 @@
|
|||||||
|
|
||||||
firmware2: partition@1050000 {
|
firmware2: partition@1050000 {
|
||||||
label = "firmware_2";
|
label = "firmware_2";
|
||||||
reg = <0x1050000 0xE60000>;
|
reg = <0x1050000 0xe60000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@1EB0000 {
|
partition@1eb0000 {
|
||||||
label = "Config_2";
|
label = "Config_2";
|
||||||
reg = <0x1EB0000 0x40000>;
|
reg = <0x1eb0000 0x40000>;
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -367,6 +367,18 @@ define Device/keenetic_kn-1613
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += keenetic_kn-1613
|
TARGET_DEVICES += keenetic_kn-1613
|
||||||
|
|
||||||
|
define Device/keenetic_kn-1711
|
||||||
|
BLOCKSIZE := 64k
|
||||||
|
IMAGE_SIZE := 13434880
|
||||||
|
DEVICE_VENDOR := Keenetic
|
||||||
|
DEVICE_MODEL := KN-1711
|
||||||
|
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7663-firmware-ap kmod-usb2
|
||||||
|
IMAGES += factory.bin
|
||||||
|
IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to $$$$(BLOCKSIZE) | \
|
||||||
|
check-size | zyimage -d 0x801711 -v "KN-1711"
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += keenetic_kn-1711
|
||||||
|
|
||||||
define Device/keenetic_kn-1713
|
define Device/keenetic_kn-1713
|
||||||
BLOCKSIZE := 64k
|
BLOCKSIZE := 64k
|
||||||
IMAGE_SIZE := 13434880
|
IMAGE_SIZE := 13434880
|
||||||
|
|||||||
@@ -59,8 +59,9 @@ hiwifi,hc5761a)
|
|||||||
ucidef_set_led_switch "internet" "internet" "blue:internet" "switch0" "0x10"
|
ucidef_set_led_switch "internet" "internet" "blue:internet" "switch0" "0x10"
|
||||||
;;
|
;;
|
||||||
keenetic,kn-1613|\
|
keenetic,kn-1613|\
|
||||||
|
keenetic,kn-1711|\
|
||||||
keenetic,kn-1713)
|
keenetic,kn-1713)
|
||||||
ucidef_set_led_switch "internet" "internet" "green:internet" "switch0" "0x01"
|
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x01"
|
||||||
;;
|
;;
|
||||||
mediatek,linkit-smart-7688)
|
mediatek,linkit-smart-7688)
|
||||||
ucidef_set_led_wlan "wifi" "wifi" "orange:wifi" "phy0tpt"
|
ucidef_set_led_wlan "wifi" "wifi" "orange:wifi" "phy0tpt"
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ ramips_setup_interfaces()
|
|||||||
hilink,hlk-7628n|\
|
hilink,hlk-7628n|\
|
||||||
hilink,hlk-7688a|\
|
hilink,hlk-7688a|\
|
||||||
hiwifi,hc5861b|\
|
hiwifi,hc5861b|\
|
||||||
|
keenetic,kn-1711|\
|
||||||
kroks,kndrt31r16|\
|
kroks,kndrt31r16|\
|
||||||
skylab,skw92a|\
|
skylab,skw92a|\
|
||||||
tplink,archer-c20-v4|\
|
tplink,archer-c20-v4|\
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
. /lib/functions.sh
|
||||||
|
. /lib/functions/migrations.sh
|
||||||
|
|
||||||
|
board=$(board_name)
|
||||||
|
|
||||||
|
case "$board" in
|
||||||
|
keenetic,kn-1613)
|
||||||
|
migrate_leds 'green:internet=green:wan'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
remove_devicename_leds
|
||||||
|
|
||||||
|
migrations_apply system
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -4,13 +4,6 @@
|
|||||||
#include "rtl83xx_hpe_1920.dtsi"
|
#include "rtl83xx_hpe_1920.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
gpio1: rtl8231-gpio {
|
|
||||||
compatible = "realtek,rtl8231-gpio";
|
|
||||||
#gpio-cells = <2>;
|
|
||||||
gpio-controller;
|
|
||||||
indirect-access-bus-id = <0>;
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c0: i2c-gpio-0 {
|
i2c0: i2c-gpio-0 {
|
||||||
compatible = "i2c-gpio";
|
compatible = "i2c-gpio";
|
||||||
sda-gpios = <&gpio1 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
sda-gpios = <&gpio1 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
||||||
@@ -46,6 +39,24 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&mdio_aux {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
gpio1: expander@0 {
|
||||||
|
compatible = "realtek,rtl8231";
|
||||||
|
reg = <0>;
|
||||||
|
|
||||||
|
gpio-controller;
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
gpio-ranges = <&gpio1 0 0 37>;
|
||||||
|
|
||||||
|
led-controller {
|
||||||
|
compatible = "realtek,rtl8231-leds";
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
ðernet0 {
|
ðernet0 {
|
||||||
mdio: mdio-bus {
|
mdio: mdio-bus {
|
||||||
compatible = "realtek,rtl838x-mdio";
|
compatible = "realtek,rtl838x-mdio";
|
||||||
|
|||||||
@@ -4,12 +4,6 @@
|
|||||||
#include "rtl83xx_hpe_1920.dtsi"
|
#include "rtl83xx_hpe_1920.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
gpio1: rtl8231-gpio {
|
|
||||||
compatible = "realtek,rtl8231-gpio";
|
|
||||||
#gpio-cells = <2>;
|
|
||||||
gpio-controller;
|
|
||||||
indirect-access-bus-id = <0>;
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c0: i2c-gpio-0 {
|
i2c0: i2c-gpio-0 {
|
||||||
compatible = "i2c-gpio";
|
compatible = "i2c-gpio";
|
||||||
@@ -84,6 +78,24 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&mdio_aux {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
gpio1: expander@0 {
|
||||||
|
compatible = "realtek,rtl8231";
|
||||||
|
reg = <0>;
|
||||||
|
|
||||||
|
gpio-controller;
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
gpio-ranges = <&gpio1 0 0 37>;
|
||||||
|
|
||||||
|
led-controller {
|
||||||
|
compatible = "realtek,rtl8231-leds";
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
ðernet0 {
|
ðernet0 {
|
||||||
mdio: mdio-bus {
|
mdio: mdio-bus {
|
||||||
compatible = "realtek,rtl838x-mdio";
|
compatible = "realtek,rtl838x-mdio";
|
||||||
|
|||||||
@@ -551,12 +551,7 @@ CONFIG_POWER_RESET=y
|
|||||||
CONFIG_POWER_SUPPLY=y
|
CONFIG_POWER_SUPPLY=y
|
||||||
CONFIG_POWER_SUPPLY_HWMON=y
|
CONFIG_POWER_SUPPLY_HWMON=y
|
||||||
CONFIG_PPS=y
|
CONFIG_PPS=y
|
||||||
CONFIG_PREEMPT=y
|
CONFIG_PREEMPT_NONE_BUILD=y
|
||||||
CONFIG_PREEMPTION=y
|
|
||||||
CONFIG_PREEMPT_BUILD=y
|
|
||||||
CONFIG_PREEMPT_COUNT=y
|
|
||||||
# CONFIG_PREEMPT_NONE is not set
|
|
||||||
CONFIG_PREEMPT_RCU=y
|
|
||||||
CONFIG_PRINTK_TIME=y
|
CONFIG_PRINTK_TIME=y
|
||||||
CONFIG_PROC_PAGE_MONITOR=y
|
CONFIG_PROC_PAGE_MONITOR=y
|
||||||
CONFIG_PROC_VMCORE=y
|
CONFIG_PROC_VMCORE=y
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=cmake
|
PKG_NAME:=cmake
|
||||||
PKG_VERSION:=3.31.3
|
PKG_VERSION:=3.31.4
|
||||||
PKG_VERSION_MAJOR:=$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION)))
|
PKG_VERSION_MAJOR:=$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION)))
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_CPE_ID:=cpe:/a:kitware:cmake
|
PKG_CPE_ID:=cpe:/a:kitware:cmake
|
||||||
@@ -15,7 +15,7 @@ PKG_CPE_ID:=cpe:/a:kitware:cmake
|
|||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \
|
PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \
|
||||||
https://cmake.org/files/v$(PKG_VERSION_MAJOR)/
|
https://cmake.org/files/v$(PKG_VERSION_MAJOR)/
|
||||||
PKG_HASH:=fac45bc6d410b49b3113ab866074888d6c9e9dc81a141874446eb239ac38cb87
|
PKG_HASH:=a6130bfe75f5ba5c73e672e34359f7c0a1931521957e8393a5c2922c8b0f7f25
|
||||||
|
|
||||||
HOST_BUILD_PARALLEL:=1
|
HOST_BUILD_PARALLEL:=1
|
||||||
HOST_CONFIGURE_PARALLEL:=1
|
HOST_CONFIGURE_PARALLEL:=1
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=mkimage
|
PKG_NAME:=mkimage
|
||||||
PKG_VERSION:=2024.07
|
PKG_VERSION:=2025.01
|
||||||
|
|
||||||
PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:= \
|
PKG_SOURCE_URL:= \
|
||||||
https://mirror.cyberbits.eu/u-boot \
|
https://mirror.cyberbits.eu/u-boot \
|
||||||
https://ftp.denx.de/pub/u-boot \
|
https://ftp.denx.de/pub/u-boot \
|
||||||
ftp://ftp.denx.de/pub/u-boot
|
ftp://ftp.denx.de/pub/u-boot
|
||||||
PKG_HASH:=f591da9ab90ef3d6b3d173766d0ddff90c4ed7330680897486117df390d83c8f
|
PKG_HASH:=cdef7d507c93f1bbd9f015ea9bc21fa074268481405501945abc6f854d5b686f
|
||||||
|
|
||||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
|
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user