mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
Merge branch 'master' of https://github.com/coolsnowwolf/lede
This commit is contained in:
commit
7d63a39b97
@ -10,6 +10,7 @@ ifeq ($(CONFIG_BUILD_NLS),y)
|
||||
INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-full
|
||||
INTL_FULL:=1
|
||||
|
||||
CMAKE_OPTIONS += -DCMAKE_PREFIX_PATH="$(ICONV_PREFIX);$(INTL_PREFIX)"
|
||||
else
|
||||
ICONV_PREFIX:=
|
||||
ICONV_FULL:=
|
||||
|
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wolfssl
|
||||
PKG_VERSION:=5.5.1-stable
|
||||
PKG_VERSION:=5.5.3-stable
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
|
||||
PKG_HASH:=97339e6956c90e7c881ba5c748dd04f7c30e5dbe0c06da765418c51375a6dee3
|
||||
PKG_HASH:=fd3135b8657d09fb96a8aad16585da850b96ea420ae8ce5ac4d5fdfc614c2683
|
||||
|
||||
PKG_FIXUP:=libtool libtool-abiver
|
||||
PKG_INSTALL:=1
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/wolfssl/wolfcrypt/settings.h
|
||||
+++ b/wolfssl/wolfcrypt/settings.h
|
||||
@@ -2454,7 +2454,7 @@ extern void uITRON4_free(void *p) ;
|
||||
@@ -2455,7 +2455,7 @@ extern void uITRON4_free(void *p) ;
|
||||
#endif
|
||||
|
||||
/* warning for not using harden build options (default with ./configure) */
|
||||
|
@ -1,50 +0,0 @@
|
||||
Since commit 6467de5a8840 ("Randomize z ordinates in scalar
|
||||
mult when timing resistant") wolfssl requires a RNG for an EC
|
||||
key when the hardened built option is selected.
|
||||
|
||||
wc_ecc_set_rng is only available when built hardened, so there
|
||||
is no safe way to install the RNG to the key regardless whether
|
||||
or not wolfssl is compiled hardened.
|
||||
|
||||
Always export wc_ecc_set_rng so tools such as hostapd can install
|
||||
RNG regardless of the built settings for wolfssl.
|
||||
|
||||
--- a/wolfcrypt/src/ecc.c
|
||||
+++ b/wolfcrypt/src/ecc.c
|
||||
@@ -12505,21 +12505,21 @@ void wc_ecc_fp_free(void)
|
||||
|
||||
#endif /* FP_ECC */
|
||||
|
||||
-#ifdef ECC_TIMING_RESISTANT
|
||||
int wc_ecc_set_rng(ecc_key* key, WC_RNG* rng)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
+#ifdef ECC_TIMING_RESISTANT
|
||||
if (key == NULL) {
|
||||
err = BAD_FUNC_ARG;
|
||||
}
|
||||
else {
|
||||
key->rng = rng;
|
||||
}
|
||||
+#endif
|
||||
|
||||
return err;
|
||||
}
|
||||
-#endif
|
||||
|
||||
#ifdef HAVE_ECC_ENCRYPT
|
||||
|
||||
--- a/wolfssl/wolfcrypt/ecc.h
|
||||
+++ b/wolfssl/wolfcrypt/ecc.h
|
||||
@@ -656,10 +656,8 @@ WOLFSSL_ABI WOLFSSL_API
|
||||
void wc_ecc_fp_free(void);
|
||||
WOLFSSL_LOCAL
|
||||
void wc_ecc_fp_init(void);
|
||||
-#ifdef ECC_TIMING_RESISTANT
|
||||
WOLFSSL_API
|
||||
int wc_ecc_set_rng(ecc_key* key, WC_RNG* rng);
|
||||
-#endif
|
||||
|
||||
WOLFSSL_API
|
||||
int wc_ecc_set_curve(ecc_key* key, int keysize, int curve_id);
|
@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ipset
|
||||
PKG_VERSION:=7.15
|
||||
PKG_VERSION:=7.16
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://ipset.netfilter.org
|
||||
PKG_HASH:=0a5545aaadb640142c1f888d366a78ddf8724799967fa20686a70053bd621751
|
||||
PKG_HASH:=87b1d9cdf4a1de3d1d0671e7da33e111eb65087e65ad75268b22bf13f0f296d0
|
||||
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- a/lib/ipset.c
|
||||
+++ b/lib/ipset.c
|
||||
@@ -1847,7 +1847,7 @@ static int ipset_xlate(struct ipset *ips
|
||||
return -1;
|
||||
case IPSET_CMD_LIST:
|
||||
if (!set) {
|
||||
- printf("list sets %s\n",
|
||||
+ printf("list sets %s %s\n",
|
||||
ipset_xlate_family(family), table);
|
||||
} else {
|
||||
printf("list set %s %s %s\n",
|
@ -12,10 +12,6 @@
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
led-boot = &led_status_green;
|
||||
led-failsafe = &led_status_yellow;
|
||||
led-running = &led_status_white;
|
||||
led-upgrade = &led_status_blue;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@ -99,13 +95,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
spi_led_pins: spic-pins-29-to-32 {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi1_2";
|
||||
};
|
||||
};
|
||||
|
||||
wf_2g_5g_pins: wf_2g_5g-pins {
|
||||
mux {
|
||||
function = "wifi";
|
||||
@ -216,73 +205,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi_led_pins>;
|
||||
cs-gpios = <0>, <0>;
|
||||
status = "okay";
|
||||
|
||||
miwifi-hm0807a-led@0x00 {
|
||||
compatible = "xiaomi,HM0807A";
|
||||
reg = <0x00>;
|
||||
spi-max-frequency = <3000000>;
|
||||
|
||||
status_led@0 {
|
||||
led@0 {
|
||||
label = "red:status";
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led_status_blue: led@1 {
|
||||
label = "blue:status";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led_status_yellow: led@2 {
|
||||
label = "yellow:status";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led_status_white: led@3 {
|
||||
label = "white:status";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led_status_green: led@4 {
|
||||
label = "green:status";
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
|
||||
network_led@1 {
|
||||
led@0 {
|
||||
label = "red:network";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@1 {
|
||||
label = "blue:network";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@2 {
|
||||
label = "yellow:network";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@3 {
|
||||
label = "white:network";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@4 {
|
||||
label = "green:network";
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&switch {
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
|
@ -1,183 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
// Copyright (c) 2022 Furong Xu <xfr@outlook.com>
|
||||
|
||||
#include <linux/leds.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <uapi/linux/uleds.h>
|
||||
|
||||
#define LED_COLOR_MAX 5
|
||||
|
||||
static unsigned char *led_color_table[LED_COLOR_MAX + 1] = {
|
||||
"\x92\x49\x24\x92\x49\x24\x92\x49\x24", /* LED OFF */
|
||||
"\xdb\x6d\x36\x92\x49\x24\x92\x49\x24", /* LED RED */
|
||||
"\x92\x49\x24\x92\x49\x24\xdb\x6d\x36", /* LED BLUE */
|
||||
"\xdb\x6d\x36\x9a\x49\x34\x92\x49\x24", /* LED YELLOW */
|
||||
"\xda\x4d\x36\xdb\x6d\x36\xda\x49\x24", /* LED WHITE */
|
||||
"\x92\x49\x24\xdb\x6d\x36\x92\x49\x24", /* LED GREEN */
|
||||
};
|
||||
|
||||
struct spi_single_wire_chipdef {
|
||||
unsigned char chip_num;
|
||||
unsigned char led_ctrl_cmd_len;
|
||||
};
|
||||
|
||||
struct spi_single_wire_led {
|
||||
struct led_classdev ldev;
|
||||
struct spi_device *spi;
|
||||
char name[LED_MAX_NAME_SIZE];
|
||||
struct mutex mutex;
|
||||
const struct spi_single_wire_chipdef *cdef;
|
||||
unsigned char *led_ctrl_cmd;
|
||||
unsigned char chip_id;
|
||||
unsigned char color_id;
|
||||
};
|
||||
|
||||
static struct spi_single_wire_chipdef miwifi_hm0807a_led = {
|
||||
.chip_num = 2, /* Redmi AX6000 has 2 LED chips */
|
||||
.led_ctrl_cmd_len = 9, /* 9 bytes per LED chip */
|
||||
};
|
||||
|
||||
static const struct spi_device_id spi_ids[] = {
|
||||
{ .name = "HM0807A" },
|
||||
{},
|
||||
};
|
||||
|
||||
static const struct of_device_id spi_single_wire_dt_ids[] = {
|
||||
{ .compatible = "xiaomi,HM0807A", .data = &miwifi_hm0807a_led },
|
||||
{},
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(of, spi_single_wire_dt_ids);
|
||||
|
||||
static int spi_brightness_set_blocking(struct led_classdev *dev,
|
||||
enum led_brightness brightness)
|
||||
{
|
||||
struct spi_single_wire_led *led = container_of(dev, struct spi_single_wire_led, ldev);
|
||||
unsigned char *ctrl_cmd_head;
|
||||
unsigned char *ctrl_cmd_payload;
|
||||
unsigned char ctrl_cmd_len = led->cdef->chip_num * led->cdef->led_ctrl_cmd_len;
|
||||
int ret = 0;
|
||||
|
||||
ctrl_cmd_head = kzalloc(ctrl_cmd_len + 2, GFP_KERNEL); /* 2 bytes pad is required */
|
||||
if (!ctrl_cmd_head)
|
||||
return -ENOMEM;
|
||||
|
||||
mutex_lock(&led->mutex);
|
||||
ctrl_cmd_payload = ctrl_cmd_head + 1; /* skip the SOF byte */
|
||||
|
||||
if (brightness == LED_OFF) {
|
||||
memcpy(led->led_ctrl_cmd, led_color_table[0], led->cdef->led_ctrl_cmd_len);
|
||||
} else {
|
||||
memcpy(led->led_ctrl_cmd, led_color_table[led->color_id + 1], led->cdef->led_ctrl_cmd_len);
|
||||
}
|
||||
|
||||
memcpy(ctrl_cmd_payload, led->led_ctrl_cmd - led->cdef->led_ctrl_cmd_len * led->chip_id,
|
||||
led->cdef->led_ctrl_cmd_len * led->cdef->chip_num);
|
||||
|
||||
ret = spi_write(led->spi, ctrl_cmd_head, ctrl_cmd_len + 2); /* 2 bytes pad */
|
||||
mutex_unlock(&led->mutex);
|
||||
|
||||
kfree(ctrl_cmd_head);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int spi_single_wire_probe(struct spi_device *spi)
|
||||
{
|
||||
struct spi_single_wire_led *led;
|
||||
const struct spi_single_wire_chipdef *cdef;
|
||||
struct device *dev = &spi->dev;
|
||||
struct device_node *np = dev_of_node(dev);
|
||||
struct device_node *chip_node;
|
||||
struct device_node *color_node;
|
||||
const char *color_name = "";
|
||||
unsigned char *chip_cmd_buffer;
|
||||
const char *state;
|
||||
unsigned char cur_chip_id = 0;
|
||||
unsigned char cur_color_id = 0;
|
||||
int ret;
|
||||
int chip_count;
|
||||
|
||||
cdef = device_get_match_data(dev);
|
||||
if (!cdef)
|
||||
return -ENODEV;
|
||||
|
||||
chip_count = of_get_available_child_count(np);
|
||||
dev_info(dev, "Device has %d LED chip(s)\n", chip_count);
|
||||
if (chip_count == 0 || chip_count != cdef->chip_num)
|
||||
return -ENODEV;
|
||||
|
||||
chip_cmd_buffer = devm_kzalloc(dev, cdef->led_ctrl_cmd_len * cdef->chip_num, GFP_KERNEL);
|
||||
if (!chip_cmd_buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
for_each_available_child_of_node(np, chip_node) {
|
||||
for_each_available_child_of_node(chip_node, color_node) {
|
||||
led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL);
|
||||
if (!led)
|
||||
return -ENOMEM;
|
||||
|
||||
/* all LEDs of one chip share one cmd_buffer */
|
||||
led->led_ctrl_cmd = chip_cmd_buffer + cdef->led_ctrl_cmd_len * cur_chip_id;
|
||||
|
||||
of_property_read_string(color_node, "label", &color_name);
|
||||
snprintf(led->name, sizeof(led->name), "%s", color_name);
|
||||
led->spi = spi;
|
||||
mutex_init(&led->mutex);
|
||||
led->cdef = cdef;
|
||||
led->chip_id = cur_chip_id;
|
||||
led->color_id = cur_color_id;
|
||||
led->ldev.name = led->name;
|
||||
led->ldev.brightness = LED_OFF;
|
||||
led->ldev.max_brightness = LED_FULL;
|
||||
led->ldev.brightness_set_blocking = spi_brightness_set_blocking;
|
||||
|
||||
state = of_get_property(color_node, "default-state", NULL);
|
||||
if (state) {
|
||||
if (!strcmp(state, "on")) {
|
||||
led->ldev.brightness = led->ldev.max_brightness;
|
||||
}
|
||||
/* default to LED_OFF already */
|
||||
}
|
||||
spi_brightness_set_blocking(&led->ldev, led->ldev.brightness);
|
||||
|
||||
ret = devm_led_classdev_register(&spi->dev, &led->ldev);
|
||||
if (ret) {
|
||||
mutex_destroy(&led->mutex);
|
||||
return ret;
|
||||
}
|
||||
spi_set_drvdata(spi, led);
|
||||
cur_color_id++;
|
||||
}
|
||||
cur_chip_id++;
|
||||
cur_color_id = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int spi_single_wire_remove(struct spi_device *spi)
|
||||
{
|
||||
/* module should never be removed from kernel */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct spi_driver spi_single_wire_led_driver = {
|
||||
.probe = spi_single_wire_probe,
|
||||
.remove = spi_single_wire_remove,
|
||||
.driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.of_match_table = spi_single_wire_dt_ids,
|
||||
},
|
||||
.id_table = spi_ids,
|
||||
};
|
||||
|
||||
module_spi_driver(spi_single_wire_led_driver);
|
||||
|
||||
MODULE_AUTHOR("Furong Xu <xfr@outlook.com>");
|
||||
MODULE_DESCRIPTION("single wire SPI LED driver for Xiaomi Redmi AX6000");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS("spi:leds-spi-single-wire");
|
@ -1,18 +0,0 @@
|
||||
|
||||
. /lib/functions/leds.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
board_config_update
|
||||
|
||||
case $board in
|
||||
xiaomi,redmi-router-ax6000)
|
||||
ucidef_set_led_netdev "wan" "wan" "blue:network" "wan"
|
||||
ucidef_set_led_heartbeat "status" "status" "white:status"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
@ -143,8 +143,6 @@ define Device/xiaomi_redmi-router-ax6000
|
||||
DEVICE_MODEL := Redmi Router AX6000
|
||||
DEVICE_DTS := mt7986a-xiaomi-redmi-router-ax6000
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
DEVICE_PACKAGES := kmod-leds-spi-single-wire
|
||||
KERNEL_LOADADDR := 0x48000000
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
|
@ -37,18 +37,3 @@ define KernelPackage/iio-mt6577-auxadc
|
||||
$(call AddDepends/iio)
|
||||
endef
|
||||
$(eval $(call KernelPackage,iio-mt6577-auxadc))
|
||||
|
||||
define KernelPackage/leds-spi-single-wire
|
||||
SUBMENU:=LED modules
|
||||
TITLE:=SPI single wire LED support
|
||||
DEPENDS:=@(TARGET_mediatek_filogic)
|
||||
KCONFIG:=CONFIG_LEDS_SPI_SINGLE_WIRE
|
||||
FILES:= $(LINUX_DIR)/drivers/leds/leds-spi-single-wire.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,leds-spi-single-wire,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-spi-single-wire/description
|
||||
LED support for SPI LED controller with a single wire (MOSI)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-spi-single-wire))
|
||||
|
@ -1,29 +0,0 @@
|
||||
--- a/drivers/spi/spi-mt65xx.c
|
||||
+++ b/drivers/spi/spi-mt65xx.c
|
||||
@@ -1223,10 +1223,16 @@ static int mtk_spi_probe(struct platform
|
||||
goto err_disable_spi_hclk;
|
||||
}
|
||||
|
||||
+ ret = clk_prepare_enable(mdata->sel_clk);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(&pdev->dev, "failed to enable sel_clk (%d)\n", ret);
|
||||
+ goto err_disable_spi_clk;
|
||||
+ }
|
||||
+
|
||||
ret = clk_set_parent(mdata->sel_clk, mdata->parent_clk);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to clk_set_parent (%d)\n", ret);
|
||||
- goto err_disable_spi_clk;
|
||||
+ goto err_disable_spi_sel_clk;
|
||||
}
|
||||
|
||||
mdata->spi_clk_hz = clk_get_rate(mdata->spi_clk);
|
||||
@@ -1277,6 +1283,8 @@ static int mtk_spi_probe(struct platform
|
||||
|
||||
err_disable_runtime_pm:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
+err_disable_spi_sel_clk:
|
||||
+ clk_disable_unprepare(mdata->sel_clk);
|
||||
err_disable_spi_clk:
|
||||
clk_disable_unprepare(mdata->spi_clk);
|
||||
err_disable_spi_hclk:
|
@ -1,29 +0,0 @@
|
||||
--- a/drivers/leds/Makefile
|
||||
+++ b/drivers/leds/Makefile
|
||||
@@ -93,6 +93,7 @@ obj-$(CONFIG_LEDS_CR0014114) += leds-cr
|
||||
obj-$(CONFIG_LEDS_DAC124S085) += leds-dac124s085.o
|
||||
obj-$(CONFIG_LEDS_EL15203000) += leds-el15203000.o
|
||||
obj-$(CONFIG_LEDS_SPI_BYTE) += leds-spi-byte.o
|
||||
+obj-$(CONFIG_LEDS_SPI_SINGLE_WIRE) += leds-spi-single-wire.o
|
||||
|
||||
# LED Userspace Drivers
|
||||
obj-$(CONFIG_LEDS_USER) += uleds.o
|
||||
--- a/drivers/leds/Kconfig
|
||||
+++ b/drivers/leds/Kconfig
|
||||
@@ -818,6 +818,16 @@ config LEDS_SPI_BYTE
|
||||
for controlling the brightness. Currently the following controller is
|
||||
supported: Ubiquiti airCube ISP microcontroller based LED controller.
|
||||
|
||||
+config LEDS_SPI_SINGLE_WIRE
|
||||
+ tristate "LED support for SPI LED controller with a single wire (MOSI)"
|
||||
+ depends on LEDS_CLASS
|
||||
+ depends on SPI
|
||||
+ depends on OF
|
||||
+ help
|
||||
+ This option enables support for LED controller which use a single wire
|
||||
+ for controlling the brightness. Currently the following controller is
|
||||
+ supported: Xiaomi Redmi AX6000
|
||||
+
|
||||
config LEDS_TI_LMU_COMMON
|
||||
tristate "LED driver for TI LMU"
|
||||
depends on LEDS_CLASS
|
153
target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts
Normal file
153
target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts
Normal file
@ -0,0 +1,153 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "jdcloud,re-sp-01b", "mediatek,mt7621-soc";
|
||||
model = "JDCloud RE-SP-01B";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_red;
|
||||
led-failsafe = &led_red;
|
||||
led-running = &led_green;
|
||||
led-upgrade = &led_blue;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_red: red {
|
||||
label = "red:sys";
|
||||
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
||||
panic-indicator;
|
||||
};
|
||||
|
||||
led_green: green {
|
||||
label = "green:sys";
|
||||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_blue: blue {
|
||||
label = "blue:sys";
|
||||
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
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 0x1ab0000>;
|
||||
};
|
||||
|
||||
partition@1b00000 {
|
||||
label = "mini";
|
||||
reg = <0x1b00000 0x400000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1f00000 {
|
||||
label = "oem";
|
||||
reg = <0x1f00000 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@0 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "uart2", "uart3", "wdt";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
@ -970,6 +970,16 @@ define Device/jcg_y2
|
||||
endef
|
||||
TARGET_DEVICES += jcg_y2
|
||||
|
||||
define Device/jdcloud_re-sp-01b
|
||||
$(Device/dsa-migration)
|
||||
IMAGE_SIZE := 27328k
|
||||
DEVICE_VENDOR := JDCloud
|
||||
DEVICE_MODEL := RE-SP-01B
|
||||
DEVICE_PACKAGES := kmod-fs-ext4 kmod-mt7603 kmod-mt7615e \
|
||||
kmod-mt7615-firmware kmod-sdhci-mt7620 kmod-usb3
|
||||
endef
|
||||
TARGET_DEVICES += jdcloud_re-sp-01b
|
||||
|
||||
define Device/lenovo_newifi-d1
|
||||
$(Device/dsa-migration)
|
||||
$(Device/uimage-lzma-loader)
|
||||
|
@ -33,6 +33,7 @@ ramips_setup_interfaces()
|
||||
asiarf,ap7621-nv1|\
|
||||
glinet,gl-mt1300|\
|
||||
jcg,q20|\
|
||||
jdcloud,re-sp-01b|\
|
||||
lenovo,newifi-d1|\
|
||||
mikrotik,routerboard-m33g|\
|
||||
oraybox,x3a|\
|
||||
@ -188,6 +189,12 @@ ramips_setup_macs()
|
||||
zbtlink,zbt-wg3526-32m)
|
||||
label_mac=$(mtd_get_mac_binary factory 0x4)
|
||||
;;
|
||||
jdcloud,re-sp-01b)
|
||||
local index="$(find_mtd_index "config")"
|
||||
label_mac=$(macaddr_canonicalize $(dd if="/dev/mtd${index}" bs=12 skip=17449 iflag=skip_bytes count=1 2>/dev/null))
|
||||
lan_mac=$label_mac
|
||||
wan_mac=$label_mac
|
||||
;;
|
||||
linksys,e5600|\
|
||||
linksys,ea7300-v1|\
|
||||
linksys,ea7300-v2|\
|
||||
|
@ -35,6 +35,12 @@ case "$board" in
|
||||
[ "$PHYNBR" = "1" ] && \
|
||||
macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
jdcloud,re-sp-01b)
|
||||
local index="$(find_mtd_index "config")"
|
||||
local label_mac=$(macaddr_canonicalize $(dd if="/dev/mtd${index}" bs=12 skip=17449 iflag=skip_bytes count=1 2>/dev/null))
|
||||
[ "$PHYNBR" -eq 0 ] && echo $label_mac > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" -eq 1 ] && macaddr_add $label_mac 0x800000 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
linksys,e5600|\
|
||||
linksys,ea7300-v1|\
|
||||
linksys,ea7300-v2|\
|
||||
|
Loading…
Reference in New Issue
Block a user