Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
ae5a4ecbe1
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.6 = .68
|
||||
LINUX_KERNEL_HASH-6.6.68 = 283ff410e3f352ceed161ae30c0020301326059db03e86efcb384d46ac5840e2
|
||||
LINUX_VERSION-6.6 = .69
|
||||
LINUX_KERNEL_HASH-6.6.69 = 9c6305567b75d99514cde6eb9de39973f3d5c857a75bd9dcdfca57041f8d4f34
|
||||
|
@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=strace
|
||||
PKG_VERSION:=6.11
|
||||
PKG_VERSION:=6.12
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
|
||||
PKG_HASH:=83262583a3529f02c3501aa8b8ac772b4cbc03dc934e98bab6e4883626e283a5
|
||||
PKG_HASH:=c47da93be45b6055f4dc741d7f20efaf50ca10160a5b100c109b294fd9c0bdfe
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=LGPL-2.1-or-later
|
||||
|
@ -575,6 +575,23 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,dsa-b53-mdio))
|
||||
|
||||
define KernelPackage/dsa-mv88e6060
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Marvell MV88E6060 DSA Switch
|
||||
DEPENDS:=+kmod-dsa +kmod-phy-marvell
|
||||
KCONFIG:=CONFIG_NET_DSA_TAG_TRAILER \
|
||||
CONFIG_NET_DSA_MV88E6060
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/net/dsa/mv88e6060.ko \
|
||||
$(LINUX_DIR)/net/dsa/tag_trailer.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,mv88e6060,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/dsa-mv88e6060/description
|
||||
Kernel modules for MV88E6060 DSA switches
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,dsa-mv88e6060))
|
||||
|
||||
define KernelPackage/dsa-tag-dsa
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
|
@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=6.12.6
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -976,6 +976,10 @@ struct ath_hw {
|
||||
bool disable_2ghz;
|
||||
bool disable_5ghz;
|
||||
|
||||
+ unsigned num_btns;
|
||||
+ const struct gpio_keys_button *btns;
|
||||
+ unsigned btn_poll_interval;
|
||||
+
|
||||
const struct firmware *eeprom_blob;
|
||||
u16 *nvmem_blob; /* devres managed */
|
||||
size_t nvmem_blob_len;
|
@ -38,7 +38,7 @@
|
||||
#ifdef CPTCFG_ATH9K_DEBUGFS
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
@@ -39,61 +39,115 @@ static void ath_fill_led_pin(struct ath_
|
||||
@@ -39,61 +39,111 @@ static void ath_fill_led_pin(struct ath_
|
||||
else
|
||||
ah->led_pin = ATH_LED_PIN_DEF;
|
||||
}
|
||||
@ -125,11 +125,11 @@
|
||||
{
|
||||
- if (!sc->led_registered)
|
||||
- return;
|
||||
-
|
||||
- ath_led_brightness(&sc->led_cdev, LED_OFF);
|
||||
- led_classdev_unregister(&sc->led_cdev);
|
||||
+ struct ath_led *led;
|
||||
|
||||
- ath_led_brightness(&sc->led_cdev, LED_OFF);
|
||||
- led_classdev_unregister(&sc->led_cdev);
|
||||
-
|
||||
- ath9k_hw_gpio_free(sc->sc_ah, sc->sc_ah->led_pin);
|
||||
+ while (!list_empty(&sc->leds)) {
|
||||
+ led = list_first_entry(&sc->leds, struct ath_led, list);
|
||||
@ -144,7 +144,6 @@
|
||||
void ath_init_leds(struct ath_softc *sc)
|
||||
{
|
||||
- int ret;
|
||||
+ struct ath_hw *ah = sc->sc_ah;
|
||||
+ char led_name[32];
|
||||
+ const char *trigger;
|
||||
+
|
||||
@ -163,21 +162,18 @@
|
||||
- "ath9k-%s", wiphy_name(sc->hw->wiphy));
|
||||
- sc->led_cdev.name = sc->led_name;
|
||||
- sc->led_cdev.brightness_set = ath_led_brightness;
|
||||
-
|
||||
- ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &sc->led_cdev);
|
||||
- if (ret < 0)
|
||||
+ if (ah->led_pin < 0)
|
||||
return;
|
||||
|
||||
- sc->led_registered = true;
|
||||
+ snprintf(led_name, sizeof(led_name), "ath9k-%s",
|
||||
+ wiphy_name(sc->hw->wiphy));
|
||||
+
|
||||
|
||||
- ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &sc->led_cdev);
|
||||
- if (ret < 0)
|
||||
- return;
|
||||
+ if (ath9k_led_blink)
|
||||
+ trigger = sc->led_default_trigger;
|
||||
+ else
|
||||
+ trigger = ieee80211_get_radio_led_name(sc->hw);
|
||||
+
|
||||
|
||||
- sc->led_registered = true;
|
||||
+ ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger,
|
||||
+ !sc->sc_ah->config.led_active_high);
|
||||
}
|
||||
|
@ -0,0 +1,64 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "ath9k.h"
|
||||
+#include <linux/ath9k_platform.h>
|
||||
|
||||
/********************************/
|
||||
/* LED functions */
|
||||
@@ -108,6 +109,24 @@ int ath_create_gpio_led(struct ath_softc
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static int ath_create_platform_led(struct ath_softc *sc,
|
||||
+ const struct gpio_led *gpio)
|
||||
+{
|
||||
+ struct ath_led *led;
|
||||
+ int ret;
|
||||
+
|
||||
+ led = kzalloc(sizeof(*led), GFP_KERNEL);
|
||||
+ if (!led)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ led->gpio = gpio;
|
||||
+ ret = ath_add_led(sc, led);
|
||||
+ if (ret < 0)
|
||||
+ kfree(led);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
void ath_deinit_leds(struct ath_softc *sc)
|
||||
{
|
||||
struct ath_led *led;
|
||||
@@ -124,8 +143,10 @@ void ath_deinit_leds(struct ath_softc *s
|
||||
|
||||
void ath_init_leds(struct ath_softc *sc)
|
||||
{
|
||||
+ struct ath9k_platform_data *pdata = sc->dev->platform_data;
|
||||
char led_name[32];
|
||||
const char *trigger;
|
||||
+ int i;
|
||||
|
||||
INIT_LIST_HEAD(&sc->leds);
|
||||
|
||||
@@ -134,6 +155,17 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
|
||||
ath_fill_led_pin(sc);
|
||||
|
||||
+ if (pdata && pdata->leds && pdata->num_leds)
|
||||
+ for (i = 0; i < pdata->num_leds; i++) {
|
||||
+ if (pdata->leds[i].gpio == sc->sc_ah->led_pin)
|
||||
+ sc->sc_ah->led_pin = -1;
|
||||
+
|
||||
+ ath_create_platform_led(sc, &pdata->leds[i]);
|
||||
+ }
|
||||
+
|
||||
+ if (sc->sc_ah->led_pin < 0)
|
||||
+ return;
|
||||
+
|
||||
snprintf(led_name, sizeof(led_name), "ath9k-%s",
|
||||
wiphy_name(sc->hw->wiphy));
|
||||
|
@ -84,7 +84,7 @@
|
||||
bool reset_power_on;
|
||||
bool htc_reset_init;
|
||||
|
||||
@@ -1083,6 +1091,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
|
||||
@@ -1079,6 +1087,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
|
||||
bool ath9k_hw_check_alive(struct ath_hw *ah);
|
||||
|
||||
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
|
||||
|
@ -13,7 +13,7 @@ Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
@@ -73,8 +73,11 @@ static int ath_add_led(struct ath_softc
|
||||
@@ -74,8 +74,11 @@ static int ath_add_led(struct ath_softc
|
||||
ath9k_hw_gpio_request_out(sc->sc_ah, gpio->gpio, gpio->name,
|
||||
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||
|
||||
|
@ -10,32 +10,47 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -25,6 +25,8 @@
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <linux/completion.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/hw_random.h>
|
||||
+#include <linux/gpio/driver.h>
|
||||
+#include <linux/gpio/consumer.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "debug.h"
|
||||
@@ -1046,6 +1048,10 @@ struct ath_softc {
|
||||
@@ -991,6 +992,14 @@ struct ath_led {
|
||||
struct led_classdev cdev;
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_GPIOLIB
|
||||
+struct ath9k_gpio_chip {
|
||||
+ struct ath_softc *sc;
|
||||
+ char label[32];
|
||||
+ struct gpio_chip gchip;
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
struct ath_softc {
|
||||
struct ieee80211_hw *hw;
|
||||
struct device *dev;
|
||||
@@ -1046,6 +1055,9 @@ struct ath_softc {
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
const char *led_default_trigger;
|
||||
struct list_head leds;
|
||||
+#ifdef CONFIG_GPIOLIB
|
||||
+ struct gpio_chip *gpiochip;
|
||||
+ struct gpio_desc *gpiodesc;
|
||||
+ struct ath9k_gpio_chip *gpiochip;
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#ifdef CPTCFG_ATH9K_DEBUGFS
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
@@ -16,12 +16,123 @@
|
||||
@@ -16,13 +16,135 @@
|
||||
|
||||
#include "ath9k.h"
|
||||
|
||||
#include <linux/ath9k_platform.h>
|
||||
+#include <linux/gpio.h>
|
||||
+
|
||||
+#ifdef CPTCFG_MAC80211_LEDS
|
||||
+
|
||||
+#ifdef CONFIG_GPIOLIB
|
||||
@ -47,9 +62,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+/* gpio_chip handler : set GPIO to input */
|
||||
+static int ath9k_gpio_pin_cfg_input(struct gpio_chip *chip, unsigned offset)
|
||||
+{
|
||||
+ struct ath_softc *sc = gpiochip_get_data(chip);
|
||||
+ struct ath9k_gpio_chip *gc = container_of(chip, struct ath9k_gpio_chip,
|
||||
+ gchip);
|
||||
+
|
||||
+ ath9k_hw_gpio_request_in(sc->sc_ah, offset, "ath9k-gpio");
|
||||
+ ath9k_hw_gpio_request_in(gc->sc->sc_ah, offset, "ath9k-gpio");
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
@ -58,11 +74,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+static int ath9k_gpio_pin_cfg_output(struct gpio_chip *chip, unsigned offset,
|
||||
+ int value)
|
||||
+{
|
||||
+ struct ath_softc *sc = gpiochip_get_data(chip);
|
||||
+ struct ath9k_gpio_chip *gc = container_of(chip, struct ath9k_gpio_chip,
|
||||
+ gchip);
|
||||
+
|
||||
+ ath9k_hw_gpio_request_out(sc->sc_ah, offset, "ath9k-gpio",
|
||||
+ ath9k_hw_gpio_request_out(gc->sc->sc_ah, offset, "ath9k-gpio",
|
||||
+ AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||
+ ath9k_hw_set_gpio(sc->sc_ah, offset, value);
|
||||
+ ath9k_hw_set_gpio(gc->sc->sc_ah, offset, value);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
@ -70,8 +87,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+/* gpio_chip handler : query GPIO direction (0=out, 1=in) */
|
||||
+static int ath9k_gpio_pin_get_dir(struct gpio_chip *chip, unsigned offset)
|
||||
+{
|
||||
+ struct ath_softc *sc = gpiochip_get_data(chip);
|
||||
+ struct ath_hw *ah = sc->sc_ah;
|
||||
+ struct ath9k_gpio_chip *gc = container_of(chip, struct ath9k_gpio_chip,
|
||||
+ gchip);
|
||||
+ struct ath_hw *ah = gc->sc->sc_ah;
|
||||
+
|
||||
+ return !((REG_READ(ah, AR_GPIO_OE_OUT(ah)) >> (offset * 2)) & 3);
|
||||
+}
|
||||
@ -79,62 +97,69 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+/* gpio_chip handler : get GPIO pin value */
|
||||
+static int ath9k_gpio_pin_get(struct gpio_chip *chip, unsigned offset)
|
||||
+{
|
||||
+ struct ath_softc *sc = gpiochip_get_data(chip);
|
||||
+ struct ath9k_gpio_chip *gc = container_of(chip, struct ath9k_gpio_chip,
|
||||
+ gchip);
|
||||
+
|
||||
+ return ath9k_hw_gpio_get(sc->sc_ah, offset);
|
||||
+ return ath9k_hw_gpio_get(gc->sc->sc_ah, offset);
|
||||
+}
|
||||
+
|
||||
+/* gpio_chip handler : set GPIO pin to value */
|
||||
+static void ath9k_gpio_pin_set(struct gpio_chip *chip, unsigned offset,
|
||||
+ int value)
|
||||
+{
|
||||
+ struct ath_softc *sc = gpiochip_get_data(chip);
|
||||
+ struct ath9k_gpio_chip *gc = container_of(chip, struct ath9k_gpio_chip,
|
||||
+ gchip);
|
||||
+
|
||||
+ ath9k_hw_set_gpio(sc->sc_ah, offset, value);
|
||||
+ ath9k_hw_set_gpio(gc->sc->sc_ah, offset, value);
|
||||
+}
|
||||
+
|
||||
+/* register GPIO chip */
|
||||
+static void ath9k_register_gpio_chip(struct ath_softc *sc)
|
||||
+{
|
||||
+ struct gpio_chip *gc = sc->gpiochip;
|
||||
+ struct ath9k_gpio_chip *gc;
|
||||
+ struct ath_hw *ah = sc->sc_ah;
|
||||
+
|
||||
+ gc = kzalloc(sizeof(struct gpio_chip), GFP_KERNEL);
|
||||
+ gc = kzalloc(sizeof(struct ath9k_gpio_chip), GFP_KERNEL);
|
||||
+ if (!gc)
|
||||
+ return;
|
||||
+
|
||||
+ gc->label = kasprintf(GFP_KERNEL, "ath9k-%s",
|
||||
+ wiphy_name(sc->hw->wiphy));
|
||||
+ if (!gc->label)
|
||||
+ return;
|
||||
+ gc->sc = sc;
|
||||
+ snprintf(gc->label, sizeof(gc->label), "ath9k-%s",
|
||||
+ wiphy_name(sc->hw->wiphy));
|
||||
+#ifdef CONFIG_OF
|
||||
+ gc->gchip.parent = sc->dev;
|
||||
+#endif
|
||||
+ gc->gchip.label = gc->label;
|
||||
+ gc->gchip.base = -1; /* determine base automatically */
|
||||
+ gc->gchip.ngpio = ah->caps.num_gpio_pins;
|
||||
+ gc->gchip.direction_input = ath9k_gpio_pin_cfg_input;
|
||||
+ gc->gchip.direction_output = ath9k_gpio_pin_cfg_output;
|
||||
+ gc->gchip.get_direction = ath9k_gpio_pin_get_dir;
|
||||
+ gc->gchip.get = ath9k_gpio_pin_get;
|
||||
+ gc->gchip.set = ath9k_gpio_pin_set;
|
||||
+
|
||||
+ gc->parent = sc->dev;
|
||||
+ gc->base = -1; /* determine base automatically */
|
||||
+ gc->ngpio = ah->caps.num_gpio_pins;
|
||||
+ gc->direction_input = ath9k_gpio_pin_cfg_input;
|
||||
+ gc->direction_output = ath9k_gpio_pin_cfg_output;
|
||||
+ gc->get_direction = ath9k_gpio_pin_get_dir;
|
||||
+ gc->get = ath9k_gpio_pin_get;
|
||||
+ gc->set = ath9k_gpio_pin_set;
|
||||
+
|
||||
+ if (gpiochip_add_data(gc, sc)) {
|
||||
+ kfree(gc->label);
|
||||
+ if (gpiochip_add(&gc->gchip)) {
|
||||
+ kfree(gc);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+#ifdef CONFIG_OF
|
||||
+ gc->gchip.owner = NULL;
|
||||
+#endif
|
||||
+ sc->gpiochip = gc;
|
||||
+}
|
||||
+
|
||||
+/* remove GPIO chip */
|
||||
+static void ath9k_unregister_gpio_chip(struct ath_softc *sc)
|
||||
+{
|
||||
+ struct gpio_chip *gc = sc->gpiochip;
|
||||
+ struct ath9k_gpio_chip *gc = sc->gpiochip;
|
||||
+
|
||||
+ if (!gc)
|
||||
+ return;
|
||||
+
|
||||
+ gpiochip_remove(gc);
|
||||
+ kfree(gc->label);
|
||||
+ gpiochip_remove(&gc->gchip);
|
||||
+ kfree(gc);
|
||||
+ sc->gpiochip = NULL;
|
||||
+}
|
||||
+
|
||||
+#else /* CONFIG_GPIOLIB */
|
||||
@ -148,7 +173,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+}
|
||||
+
|
||||
+#endif /* CONFIG_GPIOLIB */
|
||||
+
|
||||
|
||||
/********************************/
|
||||
/* LED functions */
|
||||
/********************************/
|
||||
@ -158,27 +183,27 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static void ath_fill_led_pin(struct ath_softc *sc)
|
||||
{
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
@@ -79,6 +190,12 @@ static int ath_add_led(struct ath_softc
|
||||
@@ -80,6 +202,12 @@ static int ath_add_led(struct ath_softc
|
||||
else
|
||||
ath9k_hw_set_gpio(sc->sc_ah, gpio->gpio, gpio->active_low);
|
||||
|
||||
+#ifdef CONFIG_GPIOLIB
|
||||
+ /* If there is GPIO chip configured, reserve LED pin */
|
||||
+ if (sc->gpiochip)
|
||||
+ sc->gpiodesc = gpiod_get(sc->dev, gpio->name, GPIOD_ASIS);
|
||||
+ gpio_request(sc->gpiochip->gchip.base + gpio->gpio, gpio->name);
|
||||
+#endif
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -117,17 +234,24 @@ void ath_deinit_leds(struct ath_softc *s
|
||||
@@ -136,17 +264,24 @@ void ath_deinit_leds(struct ath_softc *s
|
||||
|
||||
while (!list_empty(&sc->leds)) {
|
||||
led = list_first_entry(&sc->leds, struct ath_led, list);
|
||||
+#ifdef CONFIG_GPIOLIB
|
||||
+ /* If there is GPIO chip configured, free LED pin */
|
||||
+ if (sc->gpiochip)
|
||||
+ gpiod_put(sc->gpiodesc);
|
||||
+ gpio_free(sc->gpiochip->gchip.base + led->gpio->gpio);
|
||||
+#endif
|
||||
list_del(&led->list);
|
||||
ath_led_brightness(&led->cdev, LED_OFF);
|
||||
@ -191,15 +216,18 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
void ath_init_leds(struct ath_softc *sc)
|
||||
{
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath9k_platform_data *pdata = sc->dev->platform_data;
|
||||
+ struct device_node *np = sc->dev->of_node;
|
||||
char led_name[32];
|
||||
const char *trigger;
|
||||
|
||||
@@ -136,6 +260,12 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
int i;
|
||||
@@ -156,6 +291,15 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
if (AR_SREV_9100(sc->sc_ah))
|
||||
return;
|
||||
|
||||
+ if (!np)
|
||||
+ ath9k_register_gpio_chip(sc);
|
||||
+
|
||||
+ /* setup gpio controller only if requested and skip the led_pin setup */
|
||||
+ if (of_property_read_bool(np, "gpio-controller")) {
|
||||
+ ath9k_register_gpio_chip(sc);
|
||||
@ -208,4 +236,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+
|
||||
ath_fill_led_pin(sc);
|
||||
|
||||
if (ah->led_pin < 0)
|
||||
if (pdata && pdata->leds && pdata->num_leds)
|
||||
@@ -180,6 +324,7 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger,
|
||||
!sc->sc_ah->config.led_active_high);
|
||||
}
|
||||
+
|
||||
#endif
|
||||
|
||||
/*******************/
|
||||
|
@ -10,27 +10,27 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -1051,6 +1051,7 @@ struct ath_softc {
|
||||
@@ -1057,6 +1057,7 @@ struct ath_softc {
|
||||
struct list_head leds;
|
||||
#ifdef CONFIG_GPIOLIB
|
||||
struct gpio_chip *gpiochip;
|
||||
struct gpio_desc *gpiodesc;
|
||||
struct ath9k_gpio_chip *gpiochip;
|
||||
+ struct platform_device *btnpdev; /* gpio-keys-polled */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "ath9k.h"
|
||||
#include <linux/ath9k_platform.h>
|
||||
#include <linux/gpio.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/gpio_keys.h>
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
||||
@@ -117,6 +119,67 @@ static void ath9k_unregister_gpio_chip(s
|
||||
kfree(gc);
|
||||
@@ -129,6 +131,67 @@ static void ath9k_unregister_gpio_chip(s
|
||||
sc->gpiochip = NULL;
|
||||
}
|
||||
|
||||
+/******************/
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+/* add GPIO buttons */
|
||||
+static void ath9k_init_buttons(struct ath_softc *sc)
|
||||
+{
|
||||
+ struct ath_hw *ah = sc->sc_ah;
|
||||
+ struct ath9k_platform_data *pdata = sc->dev->platform_data;
|
||||
+ struct platform_device *pdev;
|
||||
+ struct gpio_keys_platform_data gkpdata;
|
||||
+ struct gpio_keys_button *bt;
|
||||
@ -49,28 +49,28 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+ if (!sc->gpiochip)
|
||||
+ return;
|
||||
+
|
||||
+ if (!ah->btns || !ah->num_btns)
|
||||
+ if (!pdata || !pdata->btns || !pdata->num_btns)
|
||||
+ return;
|
||||
+
|
||||
+ bt = devm_kmemdup(sc->dev, ah->btns,
|
||||
+ ah->num_btns * sizeof(struct gpio_keys_button),
|
||||
+ bt = devm_kmemdup(sc->dev, pdata->btns,
|
||||
+ pdata->num_btns * sizeof(struct gpio_keys_button),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!bt)
|
||||
+ return;
|
||||
+
|
||||
+ for (i = 0; i < ah->num_btns; i++) {
|
||||
+ if (ah->btns[i].gpio == sc->sc_ah->led_pin)
|
||||
+ for (i = 0; i < pdata->num_btns; i++) {
|
||||
+ if (pdata->btns[i].gpio == sc->sc_ah->led_pin)
|
||||
+ sc->sc_ah->led_pin = -1;
|
||||
+
|
||||
+ ath9k_hw_gpio_request_in(sc->sc_ah, ah->btns[i].gpio,
|
||||
+ ath9k_hw_gpio_request_in(sc->sc_ah, pdata->btns[i].gpio,
|
||||
+ "ath9k-gpio");
|
||||
+ bt[i].gpio = sc->gpiochip->base + ah->btns[i].gpio;
|
||||
+ bt[i].gpio = sc->gpiochip->gchip.base + pdata->btns[i].gpio;
|
||||
+ }
|
||||
+
|
||||
+ memset(&gkpdata, 0, sizeof(struct gpio_keys_platform_data));
|
||||
+ gkpdata.buttons = bt;
|
||||
+ gkpdata.nbuttons = ah->num_btns;
|
||||
+ gkpdata.poll_interval = ah->btn_poll_interval;
|
||||
+ gkpdata.nbuttons = pdata->num_btns;
|
||||
+ gkpdata.poll_interval = pdata->btn_poll_interval;
|
||||
+
|
||||
+ pdev = platform_device_register_data(sc->dev, "gpio-keys-polled",
|
||||
+ PLATFORM_DEVID_AUTO, &gkpdata,
|
||||
@ -97,7 +97,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
#else /* CONFIG_GPIOLIB */
|
||||
|
||||
static inline void ath9k_register_gpio_chip(struct ath_softc *sc)
|
||||
@@ -127,6 +190,14 @@ static inline void ath9k_unregister_gpio
|
||||
@@ -139,6 +202,14 @@ static inline void ath9k_unregister_gpio
|
||||
{
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
#endif /* CONFIG_GPIOLIB */
|
||||
|
||||
/********************************/
|
||||
@@ -232,6 +303,7 @@ void ath_deinit_leds(struct ath_softc *s
|
||||
@@ -262,6 +333,7 @@ void ath_deinit_leds(struct ath_softc *s
|
||||
{
|
||||
struct ath_led *led;
|
||||
|
||||
@ -120,11 +120,11 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
while (!list_empty(&sc->leds)) {
|
||||
led = list_first_entry(&sc->leds, struct ath_led, list);
|
||||
#ifdef CONFIG_GPIOLIB
|
||||
@@ -267,6 +339,7 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
@@ -301,6 +373,7 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
}
|
||||
|
||||
ath_fill_led_pin(sc);
|
||||
+ ath9k_init_buttons(sc);
|
||||
|
||||
if (ah->led_pin < 0)
|
||||
return;
|
||||
if (pdata && pdata->leds && pdata->num_leds)
|
||||
for (i = 0; i < pdata->num_leds; i++) {
|
||||
|
@ -1,22 +1,27 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
@@ -20,8 +20,12 @@
|
||||
@@ -20,7 +20,15 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
+#include <linux/of_device.h>
|
||||
#include "ath9k.h"
|
||||
|
||||
+#include <linux/ath9k_platform.h>
|
||||
+
|
||||
+#ifdef CONFIG_OF
|
||||
+#include <asm/mach-ath79/ath79.h>
|
||||
+#include <asm/mach-ath79/ar71xx_regs.h>
|
||||
+
|
||||
+#include <linux/mtd/mtd.h>
|
||||
+#endif
|
||||
|
||||
static const struct platform_device_id ath9k_platform_id_table[] = {
|
||||
{
|
||||
.name = "ath9k",
|
||||
@@ -69,22 +73,198 @@ static const struct ath_bus_ops ath_ahb_
|
||||
@@ -69,6 +77,192 @@ static const struct ath_bus_ops ath_ahb_
|
||||
.eeprom_read = ath_ahb_eeprom_read,
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_OF
|
||||
+
|
||||
+#define QCA955X_DDR_CTL_CONFIG 0x108
|
||||
+#define QCA955X_DDR_CTL_CONFIG_ACT_WMAC BIT(23)
|
||||
+
|
||||
@ -157,7 +162,7 @@
|
||||
+
|
||||
+static int of_ath_ahb_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct ath_hw *ah = platform_get_drvdata(pdev);
|
||||
+ struct ath9k_platform_data *pdata;
|
||||
+ const struct of_device_id *match;
|
||||
+ const struct of_ath_ahb_data *data;
|
||||
+ u8 led_pin;
|
||||
@ -165,17 +170,19 @@
|
||||
+ match = of_match_device(of_ath_ahb_match, &pdev->dev);
|
||||
+ data = (const struct of_ath_ahb_data *)match->data;
|
||||
+
|
||||
+ pdata = dev_get_platdata(&pdev->dev);
|
||||
+
|
||||
+ if (!of_property_read_u8(pdev->dev.of_node, "qca,led-pin", &led_pin))
|
||||
+ ah->led_pin = led_pin;
|
||||
+ pdata->led_pin = led_pin;
|
||||
+ else
|
||||
+ ah->led_pin = -1;
|
||||
+ pdata->led_pin = -1;
|
||||
+
|
||||
+ if (of_property_read_bool(pdev->dev.of_node, "qca,tx-gain-buffalo"))
|
||||
+ ah->config.tx_gain_buffalo = true;
|
||||
+ pdata->tx_gain_buffalo = true;
|
||||
+
|
||||
+ if (data->wmac_reset) {
|
||||
+ data->wmac_reset();
|
||||
+ ah->external_reset = data->wmac_reset;
|
||||
+ pdata->external_reset = data->wmac_reset;
|
||||
+ }
|
||||
+
|
||||
+ if (data->dev_id == AR9300_DEVID_AR953X) {
|
||||
@ -184,55 +191,94 @@
|
||||
+ * Some vendors have an invalid bootstrap option
|
||||
+ * set, which would break the WMAC here.
|
||||
+ */
|
||||
+ ah->is_clk_25mhz = true;
|
||||
+ pdata->is_clk_25mhz = true;
|
||||
+ } else if (data->bootstrap_reg && data->bootstrap_ref) {
|
||||
+ u32 t = ath79_reset_rr(data->bootstrap_reg);
|
||||
+ if (t & data->bootstrap_ref)
|
||||
+ ah->is_clk_25mhz = false;
|
||||
+ pdata->is_clk_25mhz = false;
|
||||
+ else
|
||||
+ ah->is_clk_25mhz = true;
|
||||
+ pdata->is_clk_25mhz = true;
|
||||
+ }
|
||||
+
|
||||
+ ah->get_mac_revision = data->soc_revision;
|
||||
+ pdata->get_mac_revision = data->soc_revision;
|
||||
+
|
||||
+ return data->dev_id;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static int ath_ahb_probe(struct platform_device *pdev)
|
||||
{
|
||||
void __iomem *mem;
|
||||
struct ath_softc *sc;
|
||||
struct ieee80211_hw *hw;
|
||||
struct resource *res;
|
||||
- const struct platform_device_id *id = platform_get_device_id(pdev);
|
||||
int irq;
|
||||
@@ -80,6 +274,17 @@ static int ath_ahb_probe(struct platform
|
||||
int ret = 0;
|
||||
struct ath_hw *ah;
|
||||
char hw_name[64];
|
||||
-
|
||||
- if (!dev_get_platdata(&pdev->dev)) {
|
||||
- dev_err(&pdev->dev, "no platform data specified\n");
|
||||
- return -EINVAL;
|
||||
- }
|
||||
+ u32 dev_id;
|
||||
+ u16 dev_id;
|
||||
+
|
||||
+ if (id)
|
||||
+ dev_id = id->driver_data;
|
||||
+
|
||||
+#ifdef CONFIG_OF
|
||||
+ if (pdev->dev.of_node)
|
||||
+ pdev->dev.platform_data = devm_kzalloc(&pdev->dev,
|
||||
+ sizeof(struct ath9k_platform_data),
|
||||
+ GFP_KERNEL);
|
||||
+#endif
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (res == NULL) {
|
||||
@@ -124,7 +304,8 @@ static int ath_ahb_probe(struct platform
|
||||
if (!dev_get_platdata(&pdev->dev)) {
|
||||
dev_err(&pdev->dev, "no platform data specified\n");
|
||||
@@ -118,17 +323,23 @@ static int ath_ahb_probe(struct platform
|
||||
sc->mem = mem;
|
||||
sc->irq = irq;
|
||||
|
||||
+#ifdef CONFIG_OF
|
||||
+ dev_id = of_ath_ahb_probe(pdev);
|
||||
+#endif
|
||||
ret = request_irq(irq, ath_isr, IRQF_SHARED, "ath9k", sc);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "request_irq failed\n");
|
||||
goto err_free_hw;
|
||||
}
|
||||
|
||||
- ret = ath9k_init_device(id->driver_data, sc, &ath_ahb_bus_ops);
|
||||
+ dev_id = of_ath_ahb_probe(pdev);
|
||||
+ ret = ath9k_init_device(dev_id, sc, &ath_ahb_bus_ops);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to initialize device\n");
|
||||
goto err_irq;
|
||||
@@ -162,6 +343,7 @@ static struct platform_driver ath_ahb_dr
|
||||
}
|
||||
+#ifdef CONFIG_OF
|
||||
+ pdev->dev.platform_data = NULL;
|
||||
+#endif
|
||||
|
||||
ah = sc->sc_ah;
|
||||
ath9k_hw_name(ah, hw_name, sizeof(hw_name));
|
||||
@@ -162,6 +373,9 @@ static struct platform_driver ath_ahb_dr
|
||||
.remove_new = ath_ahb_remove,
|
||||
.driver = {
|
||||
.name = "ath9k",
|
||||
+#ifdef CONFIG_OF
|
||||
+ .of_match_table = of_ath_ahb_match,
|
||||
+#endif
|
||||
},
|
||||
.id_table = ath9k_platform_id_table,
|
||||
};
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <linux/time.h>
|
||||
#include <linux/hw_random.h>
|
||||
#include <linux/gpio/driver.h>
|
||||
+#include <linux/reset.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "debug.h"
|
||||
@@ -1013,6 +1014,9 @@ struct ath_softc {
|
||||
struct ath_hw *sc_ah;
|
||||
void __iomem *mem;
|
||||
int irq;
|
||||
+#ifdef CONFIG_OF
|
||||
+ struct reset_control *reset;
|
||||
+#endif
|
||||
spinlock_t sc_serial_rw;
|
||||
spinlock_t sc_pm_lock;
|
||||
spinlock_t sc_pcu_lock;
|
||||
|
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
|
||||
PKG_SOURCE_DATE:=2024-10-20
|
||||
PKG_SOURCE_VERSION:=252a9b0c1774790fb9c25735d5a09c27dba895db
|
||||
PKG_MIRROR_HASH:=72c21f02710d2314447670f1f1ea1833d2961f65fea3f9f94c060dda7c9d5914
|
||||
PKG_SOURCE_DATE:=2025-01-02
|
||||
PKG_SOURCE_VERSION:=afa57cce0aff82f4a7a0e509d4387ebc23dd3be7
|
||||
PKG_MIRROR_HASH:=a0b3c1961f5f49d31c34a44576ce44538c3ee97bfce97f86f732d7ecc1df9798
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
|
@ -20,6 +20,25 @@ endef
|
||||
$(eval $(call KernelPackage,camera-bcm2835))
|
||||
|
||||
|
||||
define KernelPackage/rp1-cfe
|
||||
TITLE:=RP1 Camera Front-End
|
||||
SUBMENU:=$(VIDEO_MENU)
|
||||
KCONFIG:= \
|
||||
CONFIG_VIDEO_RP1_CFE \
|
||||
CONFIG_VIDEO_BCM2835
|
||||
FILES:=$(LINUX_DIR)/drivers/media/platform/raspberrypi/rp1_cfe/rp1-cfe.ko
|
||||
AUTOLOAD:=$(call AutoLoad,67,rp1-cfe)
|
||||
DEPENDS:=@TARGET_bcm27xx_bcm2712 +kmod-video-core +kmod-video-fwnode +kmod-video-dma-contig +kmod-video-async
|
||||
endef
|
||||
|
||||
define KernelPackage/rp1-cfe/description
|
||||
Driver for the Camera Serial Interface (CSI) to capture video
|
||||
streams from connected cameras.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rp1-cfe))
|
||||
|
||||
|
||||
define KernelPackage/codec-bcm2835
|
||||
TITLE:=BCM2835 Video Codec
|
||||
KCONFIG:= \
|
||||
|
@ -68,7 +68,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
select SOC_BRCMSTB if ARCH_BRCMSTB
|
||||
--- a/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c
|
||||
+++ b/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c
|
||||
@@ -335,6 +335,36 @@ static void usb_init_common_7216(struct
|
||||
@@ -341,6 +341,36 @@ static void usb_init_common_7216(struct
|
||||
usb_init_common(params);
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
static void usb_init_xhci(struct brcm_usb_init_params *params)
|
||||
{
|
||||
pr_debug("%s\n", __func__);
|
||||
@@ -380,6 +410,18 @@ static void usb_uninit_common_7211b0(str
|
||||
@@ -386,6 +416,18 @@ static void usb_uninit_common_7211b0(str
|
||||
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
static void usb_uninit_xhci(struct brcm_usb_init_params *params)
|
||||
{
|
||||
|
||||
@@ -434,6 +476,16 @@ static const struct brcm_usb_init_ops bc
|
||||
@@ -440,6 +482,16 @@ static const struct brcm_usb_init_ops bc
|
||||
.set_dual_select = usb_set_dual_select,
|
||||
};
|
||||
|
||||
@ -141,7 +141,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
void brcm_usb_dvr_init_7216(struct brcm_usb_init_params *params)
|
||||
{
|
||||
|
||||
@@ -451,3 +503,10 @@ void brcm_usb_dvr_init_7211b0(struct brc
|
||||
@@ -457,3 +509,10 @@ void brcm_usb_dvr_init_7211b0(struct brc
|
||||
params->family_name = "7211";
|
||||
params->ops = &bcm7211b0_ops;
|
||||
}
|
||||
|
58
target/linux/generic/files/include/linux/ath9k_platform.h
Normal file
58
target/linux/generic/files/include/linux/ath9k_platform.h
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2008 Atheros Communications Inc.
|
||||
* Copyright (c) 2009 Gabor Juhos <juhosg@openwrt.org>
|
||||
* Copyright (c) 2009 Imre Kaloz <kaloz@openwrt.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_ATH9K_PLATFORM_H
|
||||
#define _LINUX_ATH9K_PLATFORM_H
|
||||
|
||||
#define ATH9K_PLAT_EEP_MAX_WORDS 2048
|
||||
|
||||
struct ath9k_platform_data {
|
||||
const char *eeprom_name;
|
||||
|
||||
u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS];
|
||||
u8 *macaddr;
|
||||
|
||||
int led_pin;
|
||||
u32 gpio_mask;
|
||||
u32 gpio_val;
|
||||
|
||||
u32 bt_active_pin;
|
||||
u32 bt_priority_pin;
|
||||
u32 wlan_active_pin;
|
||||
|
||||
bool endian_check;
|
||||
bool is_clk_25mhz;
|
||||
bool tx_gain_buffalo;
|
||||
bool disable_2ghz;
|
||||
bool disable_5ghz;
|
||||
bool led_active_high;
|
||||
|
||||
int (*get_mac_revision)(void);
|
||||
int (*external_reset)(void);
|
||||
|
||||
bool use_eeprom;
|
||||
|
||||
int num_leds;
|
||||
const struct gpio_led *leds;
|
||||
|
||||
unsigned num_btns;
|
||||
const struct gpio_keys_button *btns;
|
||||
unsigned btn_poll_interval;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_ATH9K_PLATFORM_H */
|
@ -11,7 +11,8 @@ gateworks,gw2358)
|
||||
;;
|
||||
dlink,dsm-g600-a|\
|
||||
iom,nas-100d|\
|
||||
linksys,nslu2)
|
||||
linksys,nslu2|\
|
||||
netgear,wg302v1)
|
||||
ucidef_set_interface_lan "eth0" "dhcp"
|
||||
;;
|
||||
usr,usr8200)
|
||||
|
@ -5,8 +5,12 @@
|
||||
set_from_redboot () {
|
||||
for npe in eth0 eth1 eth2
|
||||
do
|
||||
mac="$(fconfig -s -r -d /dev/$1 -n npe_"$npe"_esa)"
|
||||
if [ -z $mac ] ; then
|
||||
mac="$(fconfig -s -r -d /dev/$1 -n zcom_npe_esa)"
|
||||
fi
|
||||
if ip link show dev $npe > /dev/null 2>&1; then
|
||||
ip link set dev $npe address $(fconfig -s -r -d /dev/$1 -n npe_"$npe"_esa)
|
||||
ip link set dev $npe address $mac
|
||||
fi
|
||||
done
|
||||
|
||||
|
27
target/linux/ixp4xx/base-files/lib/upgrade/platform.sh
Normal file
27
target/linux/ixp4xx/base-files/lib/upgrade/platform.sh
Normal file
@ -0,0 +1,27 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
REQUIRE_IMAGE_METADATA=1
|
||||
|
||||
platform_check_image() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
netgear,wg302v1)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Sysupgrade is not yet supported on $board."
|
||||
return 1
|
||||
}
|
||||
|
||||
platform_do_upgrade() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
netgear,wg302v1)
|
||||
PART_NAME=rootfs
|
||||
default_do_upgrade "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
@ -168,9 +168,6 @@ CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_KUSER_HELPERS=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_MV88E6060=y
|
||||
CONFIG_NET_DSA_TAG_TRAILER=y
|
||||
CONFIG_NET_EGRESS=y
|
||||
CONFIG_NET_INGRESS=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
|
@ -124,11 +124,27 @@ define Device/linksys_nslu2
|
||||
endef
|
||||
TARGET_DEVICES += linksys_nslu2
|
||||
|
||||
define Device/netgear_wg302v1
|
||||
DEVICE_VENDOR := Netgear
|
||||
DEVICE_MODEL := WG302 v1
|
||||
DEVICE_PACKAGES := ixp4xx-microcode-ethernet kmod-phy-amd kmod-ath5k \
|
||||
wpad-basic-mbedtls kmod-input-gpio-keys-polled
|
||||
# Only 32 MB of RAM and small flash so not building by default
|
||||
DEFAULT := n
|
||||
DEVICE_DTS := intel-ixp42x-netgear-wg302v1
|
||||
KERNEL := kernel-bin | append-dtb
|
||||
IMAGES := kernel.bin rootfs.bin
|
||||
IMAGE/kernel.bin := append-kernel
|
||||
IMAGE/rootfs.bin := append-rootfs | pad-rootfs | pad-to 128k
|
||||
IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to 128k | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += netgear_wg302v1
|
||||
|
||||
define Device/usrobotics_usr8200
|
||||
DEVICE_VENDOR := USRobotics
|
||||
DEVICE_MODEL := USR8200
|
||||
# USB2 is compiled in and needs no package
|
||||
DEVICE_PACKAGES := ixp4xx-microcode-ethernet kmod-rtc-r7301 kmod-firewire kmod-firewire-ohci
|
||||
DEVICE_PACKAGES := ixp4xx-microcode-ethernet kmod-rtc-r7301 kmod-firewire kmod-firewire-ohci kmod-dsa-mv88e6060
|
||||
DEVICE_DTS := intel-ixp42x-usrobotics-usr8200
|
||||
KERNEL := kernel-bin | append-dtb
|
||||
IMAGES := kernel.bin rootfs.bin
|
||||
|
@ -0,0 +1,40 @@
|
||||
From ed23e07bf7a1896b6eaa85b773bb43b1fad66d4b Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Sat, 21 Dec 2024 00:07:11 +0100
|
||||
Subject: [PATCH] ARM: dts: ixp4xx: Fix up PCI on WG302
|
||||
|
||||
Looking at the board file for WG302 v2 was not a good idea
|
||||
because the GPIO IRQ for slot 2 differs, and v1 uses GPIO
|
||||
10 instead of GPIO 9. Fix it up.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
.../dts/intel/ixp/intel-ixp42x-netgear-wg302v1.dts | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-netgear-wg302v1.dts
|
||||
+++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-netgear-wg302v1.dts
|
||||
@@ -57,7 +57,7 @@
|
||||
status = "okay";
|
||||
|
||||
/*
|
||||
- * Taken from WG302 v2 PCI boardfile (wg302v2-pci.c)
|
||||
+ * Taken from WG302 v1 PCI boardfile (wg302v1-pci.c)
|
||||
* We have slots (IDSEL) 1 and 2 with one assigned IRQ
|
||||
* each handling all IRQs.
|
||||
*/
|
||||
@@ -70,10 +70,10 @@
|
||||
<0x0800 0 0 3 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 1 is irq 8 */
|
||||
<0x0800 0 0 4 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 1 is irq 8 */
|
||||
/* IDSEL 2 */
|
||||
- <0x1000 0 0 1 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 9 */
|
||||
- <0x1000 0 0 2 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 2 is irq 9 */
|
||||
- <0x1000 0 0 3 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 2 is irq 9 */
|
||||
- <0x1000 0 0 4 &gpio0 9 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 2 is irq 9 */
|
||||
+ <0x1000 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 10 */
|
||||
+ <0x1000 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 2 is irq 10 */
|
||||
+ <0x1000 0 0 3 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 2 is irq 10 */
|
||||
+ <0x1000 0 0 4 &gpio0 10 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 2 is irq 10 */
|
||||
};
|
||||
|
||||
ethernet@c8009000 {
|
@ -0,0 +1,59 @@
|
||||
From 1d22f422fca8875f6d2cb297f735d41fd5830000 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Mon, 23 Dec 2024 17:50:52 +0100
|
||||
Subject: [PATCH] ARM: dts: ixp4xx: Add Netgear WG302 v1 GPIOs
|
||||
|
||||
This adds GPIO LED indicators, the reset GPIO RESET
|
||||
button on the Netgear WG302 v1 to the device tree.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
.../ixp/intel-ixp42x-netgear-wg302v1.dts | 30 +++++++++++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-netgear-wg302v1.dts
|
||||
+++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-netgear-wg302v1.dts
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "intel-ixp42x.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
model = "Netgear WG302 v1";
|
||||
@@ -32,6 +33,35 @@
|
||||
serial0 = &uart1;
|
||||
};
|
||||
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ test_led: led-test {
|
||||
+ color = <LED_COLOR_ID_AMBER>;
|
||||
+ function = "test";
|
||||
+ gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ wlan_led: led-wlan {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ function = LED_FUNCTION_WLAN;
|
||||
+ gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ linux,default-trigger = "phy0tx";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio_keys {
|
||||
+ /* RESET is on GPIO13 which can't fire interrupts */
|
||||
+ compatible = "gpio-keys-polled";
|
||||
+ poll-interval = <100>;
|
||||
+
|
||||
+ button-reset {
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ label = "reset";
|
||||
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
soc {
|
||||
bus@c4000000 {
|
||||
flash@0,0 {
|
@ -0,0 +1,228 @@
|
||||
From d672011e10097e5e61659a5d64ac9cb7b7544b60 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Wed, 25 Dec 2024 01:09:20 +0100
|
||||
Subject: [PATCH] ARM: dts: ixp4xx OpenWrt LED aliases
|
||||
|
||||
This outoftree patch adds OpenWrt LED aliases to the DTS files
|
||||
of supported devices.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
.../boot/dts/intel/ixp/intel-ixp42x-dlink-dsm-g600.dts | 9 ++++++---
|
||||
.../boot/dts/intel/ixp/intel-ixp42x-freecom-fsg-3.dts | 10 +++++++---
|
||||
.../dts/intel/ixp/intel-ixp42x-gateworks-gw2348.dts | 6 +++++-
|
||||
.../boot/dts/intel/ixp/intel-ixp42x-iomega-nas100d.dts | 9 ++++++---
|
||||
.../boot/dts/intel/ixp/intel-ixp42x-linksys-nslu2.dts | 9 ++++++---
|
||||
.../dts/intel/ixp/intel-ixp42x-netgear-wg302v1.dts | 3 +++
|
||||
.../dts/intel/ixp/intel-ixp42x-usrobotics-usr8200.dts | 5 ++++-
|
||||
.../dts/intel/ixp/intel-ixp43x-gateworks-gw2358.dts | 6 +++++-
|
||||
8 files changed, 42 insertions(+), 15 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-dlink-dsm-g600.dts
|
||||
+++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-dlink-dsm-g600.dts
|
||||
@@ -31,16 +31,19 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
+ led-boot = &led_power;
|
||||
+ led-failsafe = &led_power;
|
||||
+ led-running = &led_power;
|
||||
+ led-upgrade = &led_power;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
- led-power {
|
||||
+ led_power: led-power {
|
||||
label = "dsmg600:green:power";
|
||||
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
- linux,default-trigger = "heartbeat";
|
||||
};
|
||||
led-wlan {
|
||||
label = "dsmg600:green:wlan";
|
||||
@@ -48,7 +51,7 @@
|
||||
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
/* We don't have WLAN trigger in the kernel (yet) */
|
||||
- linux,default-trigger = "netdev";
|
||||
+ linux,default-trigger = "phy0tx";
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-freecom-fsg-3.dts
|
||||
+++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-freecom-fsg-3.dts
|
||||
@@ -29,6 +29,10 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
+ led-boot = &led_ring;
|
||||
+ led-failsafe = &led_sync;
|
||||
+ led-running = &led_ring;
|
||||
+ led-upgrade = &led_sync;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
@@ -112,7 +116,7 @@
|
||||
reg = <0x00 0x02>;
|
||||
mask = <0x01>;
|
||||
label = "fsg:blue:wlan";
|
||||
- linux,default-trigger = "wlan";
|
||||
+ linux,default-trigger = "phy0tx";
|
||||
default-state = "on";
|
||||
};
|
||||
led@0,1 {
|
||||
@@ -139,7 +143,7 @@
|
||||
linux,default-trigger = "";
|
||||
default-state = "on";
|
||||
};
|
||||
- led@0,4 {
|
||||
+ led_sync: led@0,4 {
|
||||
compatible = "register-bit-led";
|
||||
reg = <0x00 0x02>;
|
||||
mask = <0x08>;
|
||||
@@ -147,7 +151,7 @@
|
||||
linux,default-trigger = "";
|
||||
default-state = "on";
|
||||
};
|
||||
- led@0,5 {
|
||||
+ led_ring: led@0,5 {
|
||||
compatible = "register-bit-led";
|
||||
reg = <0x00 0x02>;
|
||||
mask = <0x10>;
|
||||
--- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-gateworks-gw2348.dts
|
||||
+++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-gateworks-gw2348.dts
|
||||
@@ -26,12 +26,16 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
+ led-boot = &usr_led;
|
||||
+ led-failsafe = &usr_led;
|
||||
+ led-running = &usr_led;
|
||||
+ led-upgrade = &usr_led;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
- led-user {
|
||||
+ usr_led: led-user {
|
||||
label = "gw2348:green:user";
|
||||
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
--- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-iomega-nas100d.dts
|
||||
+++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-iomega-nas100d.dts
|
||||
@@ -26,6 +26,10 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
+ led-boot = &pwr_led;
|
||||
+ led-failsafe = &pwr_led;
|
||||
+ led-running = &pwr_led;
|
||||
+ led-upgrade = &pwr_led;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
@@ -36,7 +40,7 @@
|
||||
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
/* We don't have WLAN trigger in the kernel (yet) */
|
||||
- linux,default-trigger = "netdev";
|
||||
+ linux,default-trigger = "phy0tx";
|
||||
};
|
||||
led-disk {
|
||||
label = "nas100d:red:disk";
|
||||
@@ -44,11 +48,10 @@
|
||||
default-state = "on";
|
||||
linux,default-trigger = "disk-activity";
|
||||
};
|
||||
- led-power {
|
||||
+ pwr_led: led-power {
|
||||
label = "nas100d:red:power";
|
||||
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
- linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-nslu2.dts
|
||||
+++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-nslu2.dts
|
||||
@@ -26,18 +26,21 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
+ led-boot = &led_status;
|
||||
+ led-failsafe = &led_status;
|
||||
+ led-running = &led_ready;
|
||||
+ led-upgrade = &led_status;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
- led-status {
|
||||
+ led_status: led-status {
|
||||
label = "nslu2:red:status";
|
||||
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
- linux,default-trigger = "heartbeat";
|
||||
};
|
||||
- led-ready {
|
||||
+ led_ready: led-ready {
|
||||
label = "nslu2:green:ready";
|
||||
gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
--- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-netgear-wg302v1.dts
|
||||
+++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-netgear-wg302v1.dts
|
||||
@@ -29,6 +29,9 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
+ led-boot = &test_led;
|
||||
+ led-failsafe = &test_led;
|
||||
+ led-upgrade = &test_led;
|
||||
/* These are switched around */
|
||||
serial0 = &uart1;
|
||||
};
|
||||
--- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-usrobotics-usr8200.dts
|
||||
+++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-usrobotics-usr8200.dts
|
||||
@@ -29,6 +29,10 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
+ led-boot = &pwr_led;
|
||||
+ led-failsafe = &pwr_led;
|
||||
+ led-running = &pwr_led;
|
||||
+ led-upgrade = &pwr_led;
|
||||
/* These are switched around */
|
||||
serial0 = &uart1;
|
||||
serial1 = &uart0;
|
||||
@@ -67,7 +71,6 @@
|
||||
label = "usr8200:green:pwr";
|
||||
gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
- linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm/boot/dts/intel/ixp/intel-ixp43x-gateworks-gw2358.dts
|
||||
+++ b/arch/arm/boot/dts/intel/ixp/intel-ixp43x-gateworks-gw2358.dts
|
||||
@@ -25,12 +25,16 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
+ led-boot = &usr_led;
|
||||
+ led-failsafe = &usr_led;
|
||||
+ led-running = &usr_led;
|
||||
+ led-upgrade = &usr_led;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
- led-user {
|
||||
+ usr_led: led-user {
|
||||
label = "gw2358:green:LED";
|
||||
gpios = <&pld1 0 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
@ -17,6 +17,7 @@
|
||||
led-failsafe = &led_status_red;
|
||||
led-running = &led_status_white;
|
||||
led-upgrade = &led_status_blue;
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
|
||||
|
||||
--- a/drivers/watchdog/mtk_wdt.c
|
||||
+++ b/drivers/watchdog/mtk_wdt.c
|
||||
@@ -58,9 +58,13 @@
|
||||
@@ -59,9 +59,13 @@
|
||||
#define WDT_SWSYSRST 0x18U
|
||||
#define WDT_SWSYS_RST_KEY 0x88000000
|
||||
|
||||
@ -32,7 +32,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
|
||||
static bool nowayout = WATCHDOG_NOWAYOUT;
|
||||
static unsigned int timeout;
|
||||
|
||||
@@ -71,10 +75,12 @@ struct mtk_wdt_dev {
|
||||
@@ -72,10 +76,12 @@ struct mtk_wdt_dev {
|
||||
struct reset_controller_dev rcdev;
|
||||
bool disable_wdt_extrst;
|
||||
bool reset_by_toprgu;
|
||||
@ -45,7 +45,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
|
||||
};
|
||||
|
||||
static const struct mtk_wdt_data mt2712_data = {
|
||||
@@ -89,6 +95,11 @@ static const struct mtk_wdt_data mt7986_
|
||||
@@ -94,6 +100,11 @@ static const struct mtk_wdt_data mt7986_
|
||||
.toprgu_sw_rst_num = MT7986_TOPRGU_SW_RST_NUM,
|
||||
};
|
||||
|
||||
@ -57,7 +57,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
|
||||
static const struct mtk_wdt_data mt8183_data = {
|
||||
.toprgu_sw_rst_num = MT8183_TOPRGU_SW_RST_NUM,
|
||||
};
|
||||
@@ -109,6 +120,28 @@ static const struct mtk_wdt_data mt8195_
|
||||
@@ -114,6 +125,28 @@ static const struct mtk_wdt_data mt8195_
|
||||
.toprgu_sw_rst_num = MT8195_TOPRGU_SW_RST_NUM,
|
||||
};
|
||||
|
||||
@ -86,7 +86,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
|
||||
static int toprgu_reset_update(struct reset_controller_dev *rcdev,
|
||||
unsigned long id, bool assert)
|
||||
{
|
||||
@@ -119,6 +152,9 @@ static int toprgu_reset_update(struct re
|
||||
@@ -124,6 +157,9 @@ static int toprgu_reset_update(struct re
|
||||
|
||||
spin_lock_irqsave(&data->lock, flags);
|
||||
|
||||
@ -96,7 +96,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
|
||||
tmp = readl(data->wdt_base + WDT_SWSYSRST);
|
||||
if (assert)
|
||||
tmp |= BIT(id);
|
||||
@@ -127,6 +163,9 @@ static int toprgu_reset_update(struct re
|
||||
@@ -132,6 +168,9 @@ static int toprgu_reset_update(struct re
|
||||
tmp |= WDT_SWSYS_RST_KEY;
|
||||
writel(tmp, data->wdt_base + WDT_SWSYSRST);
|
||||
|
||||
@ -106,7 +106,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
|
||||
spin_unlock_irqrestore(&data->lock, flags);
|
||||
|
||||
return 0;
|
||||
@@ -412,6 +451,8 @@ static int mtk_wdt_probe(struct platform
|
||||
@@ -417,6 +456,8 @@ static int mtk_wdt_probe(struct platform
|
||||
wdt_data->toprgu_sw_rst_num);
|
||||
if (err)
|
||||
return err;
|
||||
@ -115,8 +115,8 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
|
||||
}
|
||||
|
||||
mtk_wdt->disable_wdt_extrst =
|
||||
@@ -450,6 +491,7 @@ static const struct of_device_id mtk_wdt
|
||||
{ .compatible = "mediatek,mt6589-wdt" },
|
||||
@@ -456,6 +497,7 @@ static const struct of_device_id mtk_wdt
|
||||
{ .compatible = "mediatek,mt6735-wdt", .data = &mt6735_data },
|
||||
{ .compatible = "mediatek,mt6795-wdt", .data = &mt6795_data },
|
||||
{ .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data },
|
||||
+ { .compatible = "mediatek,mt7988-wdt", .data = &mt7988_data },
|
||||
|
@ -294,11 +294,11 @@ TARGET_DEVICES += alfa-network_quad-e4g
|
||||
|
||||
define Device/ampedwireless_ally_common
|
||||
$(Device/nand)
|
||||
$(Device/uimage-lzma-loader)
|
||||
DEVICE_VENDOR := Amped Wireless
|
||||
DEVICE_PACKAGES := kmod-mt7615-firmware
|
||||
IMAGE_SIZE := 32768k
|
||||
KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma -n 'flashable-initramfs' |\
|
||||
edimax-header -s CSYS -m RN68 -f 0x001c0000 -S 0x01100000
|
||||
KERNEL_INITRAMFS := $$(KERNEL) | edimax-header -s CSYS -m RN68 -f 0x001c0000 -S 0x01100000
|
||||
endef
|
||||
|
||||
define Device/ampedwireless_ally-r1900k
|
||||
|
@ -36,7 +36,7 @@ hpe,1920-8g-poe-65w|\
|
||||
hpe,1920-8g-poe-180w|\
|
||||
hpe,1920-16g|\
|
||||
hpe,1920-24g|\
|
||||
hpe,1920-24g-poe-370w|\)
|
||||
hpe,1920-24g-poe-370w|\
|
||||
hpe,1920-48g|\
|
||||
hpe,1920-48g-poe)
|
||||
label_mac=$(mtd_get_mac_binary factory 0x68)
|
||||
@ -96,6 +96,9 @@ hpe,1920-8g-poe-65w)
|
||||
hpe,1920-8g-poe-180w)
|
||||
ucidef_set_poe 180 "$(filter_port_list_reverse "$lan_list" "lan9 lan10")"
|
||||
;;
|
||||
hpe,1920-24g-poe-180w)
|
||||
ucidef_set_poe 180 "$(filter_port_list_reverse "$lan_list" "lan25 lan26 lan27 lan28")"
|
||||
;;
|
||||
hpe,1920-24g-poe-370w)
|
||||
ucidef_set_poe 370 "$(filter_port_list_reverse "$lan_list" "lan25 lan26 lan27 lan28")"
|
||||
;;
|
||||
|
@ -7,6 +7,7 @@ board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
hpe,1920-8g-poe-180w|\
|
||||
hpe,1920-24g-poe-180w|\
|
||||
hpe,1920-24g-poe-370w)
|
||||
ucidef_add_gpio_switch "fan_ctrl" "Fan control" "456" "0"
|
||||
;;
|
||||
|
@ -26,6 +26,7 @@
|
||||
label = "reset";
|
||||
gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <100>;
|
||||
};
|
||||
};
|
||||
|
||||
|
12
target/linux/realtek/dts/rtl8382_hpe_1920-24g-poe-180w.dts
Normal file
12
target/linux/realtek/dts/rtl8382_hpe_1920-24g-poe-180w.dts
Normal file
@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "rtl8382_hpe_1920-24g.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "hpe,1920-24g-poe-180w", "realtek,rtl838x-soc";
|
||||
model = "HPE 1920-24G-PoE+ 180W (JG925A)";
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
status = "okay";
|
||||
};
|
@ -43,10 +43,11 @@
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <20>;
|
||||
|
||||
mode {
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <100>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -144,6 +144,15 @@ define Device/hpe_1920-24g
|
||||
endef
|
||||
TARGET_DEVICES += hpe_1920-24g
|
||||
|
||||
define Device/hpe_1920-24g-poe-180w
|
||||
$(Device/hpe_1920)
|
||||
SOC := rtl8382
|
||||
DEVICE_MODEL := 1920-24G-PoE+ 180W (JG925A)
|
||||
DEVICE_PACKAGES += realtek-poe
|
||||
H3C_DEVICE_ID := 0x00010028
|
||||
endef
|
||||
TARGET_DEVICES += hpe_1920-24g-poe-180w
|
||||
|
||||
define Device/hpe_1920-24g-poe-370w
|
||||
$(Device/hpe_1920)
|
||||
SOC := rtl8382
|
||||
|
Loading…
x
Reference in New Issue
Block a user