Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/coolsnowwolf/lede:
  bcm53xx: build a single device per profile
  ramips: fix mt7621 kernel compilation
  mediatek: configure TUF-AX4200 LAN LEDs
  mediatek: apply stock configuration for WAN-LED
  generic: add hack for MT753x LED configuration
  generic: mt7530: enable PHY configuration using OF
  r8125: update to 9.012.03-1
  r8152: update to 2.17.1-3
  r8168: update to 8.052.01
  mediatek: fix gl-mt6000 wireless
  kernel: bump 6.1 to 6.1.61 (coolsnowwolf#11637)
  • Loading branch information
github-actions[bot] committed Nov 11, 2023
2 parents c34901f + 59e6620 commit 3e516dc
Show file tree
Hide file tree
Showing 18 changed files with 231 additions and 65 deletions.
4 changes: 2 additions & 2 deletions include/kernel-6.1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .60
LINUX_KERNEL_HASH-6.1.60 = 58520e7ae5a6af254ddf7ddbfc42e4373b0d36c67d467f6e35a3bd1672f5fb0a
LINUX_VERSION-6.1 = .61
LINUX_KERNEL_HASH-6.1.61 = ad2c9d12fc36e2dde4796a3eec8f4ddca2e278098f4e555b6e6f5f03ef6964ce
4 changes: 2 additions & 2 deletions package/lean/r8125/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=r8125
PKG_VERSION:=9.010.01-2
PKG_VERSION:=9.012.03-1
PKG_RELEASE:=$(AUTORELEASE)

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/awesometic/realtek-r8125-dkms/tar.gz/$(PKG_VERSION)?
PKG_HASH:=b3e1b36578ba92a775049535e7434a9fc46710a721846c3706aca3d265db8cb9
PKG_HASH:=7964aacf4a2873cbe4133aeca830bd0725f819ea286bab162026ff283510144f
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-dkms-$(PKG_VERSION)

PKG_LICENSE:=GPL-2.0-only
Expand Down
2 changes: 1 addition & 1 deletion package/lean/r8125/patches/010-config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
+ENABLE_RSS_SUPPORT = y
ENABLE_LIB_SUPPORT = n
ENABLE_USE_FIRMWARE_FILE = n
DISABLE_PM_SUPPORT = n
DISABLE_WOL_SUPPORT = n
2 changes: 1 addition & 1 deletion package/lean/r8125/patches/020-fixes-build-werror.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/src/r8125_rss.c
+++ b/src/r8125_rss.c
@@ -57,21 +57,21 @@ static int rtl8125_get_rss_hash_opts(struct rtl8125_private *tp,
@@ -60,21 +60,21 @@ static int rtl8125_get_rss_hash_opts(str
switch (cmd->flow_type) {
case TCP_V4_FLOW:
cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <linux/if_vlan.h>
#include <linux/crc32.h>
#include <linux/interrupt.h>
@@ -10416,6 +10417,23 @@ rtl8125_setup_mqs_reg(struct rtl8125_private *tp)
@@ -14818,6 +14819,23 @@ rtl8125_setup_mqs_reg(struct rtl8125_pri
}
}

Expand All @@ -32,7 +32,7 @@
static void
rtl8125_init_software_variable(struct net_device *dev)
{
@@ -10847,6 +10865,8 @@ rtl8125_init_software_variable(struct net_device *dev)
@@ -15384,6 +15402,8 @@ rtl8125_init_software_variable(struct ne
if (tp->InitRxDescType == RX_DESC_RING_TYPE_3)
tp->rtl8125_rx_config |= EnableRxDescV3;

Expand Down
6 changes: 3 additions & 3 deletions package/lean/r8152/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=r8152
PKG_VERSION:=2.16.3-4
PKG_RELEASE:=3
PKG_VERSION:=2.17.1-3
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/awesometic/realtek-r8152-dkms/tar.gz/$(PKG_VERSION)?
PKG_HASH:=a80563c6abb05f4aeab5be9d63b0497859878c86e0f72c49dd527de2adec7b68
PKG_HASH:=3e0486d412cb05ede0571b19fa6d402c1448b0220e5ae54aa5b11af918ad9a43
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-dkms-$(PKG_VERSION)

PKG_MAINTAINER:=Tianling Shen <[email protected]>
Expand Down
9 changes: 4 additions & 5 deletions package/lean/r8168/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=r8168
PKG_VERSION:=8.051.02
PKG_VERSION:=8.052.01
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/BROBIRD/openwrt-r8168.git
PKG_SOURCE_VERSION:=4f6cfe1ca12fb772deed57f1d2d1062af041ad07
PKG_MIRROR_HASH:=6b149f5eb3b9e1dc50867a694984d253aa58d97dd5fbab30eb405d2d7b2be587
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/mtorromeo/r8168/tar.gz/$(PKG_VERSION)?
PKG_HASH:=cd8ee58a260e9b654080d39e3a42e3a3fb821041ee79e631b4647d84120aa999

PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

Expand Down
18 changes: 0 additions & 18 deletions package/lean/r8168/patches/020-5.19-support.patch

This file was deleted.

14 changes: 0 additions & 14 deletions package/lean/r8168/patches/030-6.1-support.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <linux/if_vlan.h>
#include <linux/crc32.h>
#include <linux/interrupt.h>
@@ -24769,6 +24770,22 @@ rtl8168_set_bios_setting(struct net_devi
}
@@ -25852,6 +25853,22 @@ rtl8168_setup_mqs_reg(struct rtl8168_pri
tp->imr_reg[3] = IntrMask3;
}

+static int rtl8168_led_configuration(struct rtl8168_private *tp)
Expand All @@ -31,9 +31,9 @@
static void
rtl8168_init_software_variable(struct net_device *dev)
{
@@ -25343,6 +25360,8 @@ rtl8168_init_software_variable(struct ne
tp->NotWrMcuPatchCode = TRUE;
}
@@ -26547,6 +26564,8 @@ err1:
if (tp->InitRxDescType == RX_DESC_RING_TYPE_2)
tp->RxDescLength = RX_DESC_LEN_TYPE_2;

+ rtl8168_led_configuration(tp);
+
Expand Down
1 change: 1 addition & 0 deletions target/linux/bcm53xx/image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ USB2_PACKAGES += kmod-usb-ledtrig-usbport
USB3_PACKAGES := $(USB2_PACKAGES) kmod-usb3 kmod-phy-bcm-ns-usb3

define Device/Default
PROFILES = Generic $$(DEVICE_NAME)
# .dtb files are prefixed by SoC type, e.g. bcm4708- which is not included in device/image names
# extract the full dtb name based on the device info
DEVICE_DTS := $(patsubst %.dtb,%,$(notdir $(wildcard $(if $(IB),$(KDIR),$(DTS_DIR))/*-$(subst _,-,$(1)).dtb)))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
From cc225d163b5a4f7a0d1968298bf7927306646a47 Mon Sep 17 00:00:00 2001
From: David Bauer <[email protected]>
Date: Fri, 28 Apr 2023 01:53:01 +0200
Subject: [PATCH] net: phy: mediatek-ge: add LED configuration interface

This adds a small hack similar to the one used for ar8xxx switches to
read a reg:value map for configuring the LED configuration registers.

This allows OpenWrt to write device-specific LED action as well as blink
configurations. It is unlikely to be accepted upstream, as upstream
plans on integrating their own framework for handling these LEDs.

Signed-off-by: David Bauer <[email protected]>
---
drivers/net/phy/mediatek-ge.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

--- a/drivers/net/phy/mediatek-ge.c
+++ b/drivers/net/phy/mediatek-ge.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0+
+#include <linux/of.h>
#include <linux/bitfield.h>
#include <linux/module.h>
#include <linux/phy.h>
@@ -53,6 +54,36 @@ static int mt7530_phy_config_init(struct
return 0;
}

+static int mt7530_led_config_of(struct phy_device *phydev)
+{
+ struct device_node *np = phydev->mdio.dev.of_node;
+ const __be32 *paddr;
+ int len;
+ int i;
+
+ paddr = of_get_property(np, "mediatek,led-config", &len);
+ if (!paddr)
+ return 0;
+
+ if (len < (2 * sizeof(*paddr)))
+ return -EINVAL;
+
+ len /= sizeof(*paddr);
+
+ phydev_warn(phydev, "Configure LED registers (num=%d)\n", len);
+ for (i = 0; i < len - 1; i += 2) {
+ u32 reg;
+ u32 val;
+
+ reg = be32_to_cpup(paddr + i);
+ val = be32_to_cpup(paddr + i + 1);
+
+ phy_write_mmd(phydev, MDIO_MMD_VEND2, reg, val);
+ }
+
+ return 0;
+}
+
static int mt7531_phy_config_init(struct phy_device *phydev)
{
mtk_gephy_config_init(phydev);
@@ -65,6 +96,9 @@ static int mt7531_phy_config_init(struct
phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x13, 0x404);
phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x14, 0x404);

+ /* LED Config*/
+ mt7530_led_config_of(phydev);
+
return 0;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 1d81e51d6d79d9098013b2e8cdd677bae998c5d8 Mon Sep 17 00:00:00 2001
From: David Bauer <[email protected]>
Date: Fri, 28 Apr 2023 02:22:59 +0200
Subject: [PATCH 1/2] mt7530: register OF node for internal MDIO bus

The MT753x switches provide a switch-internal MDIO bus for the embedded
PHYs.

Register a OF sub-node on the switch OF-node for this internal MDIO bus.
This allows to configure the embedded PHYs using device-tree.

Signed-off-by: David Bauer <[email protected]>
---
drivers/net/dsa/mt7530.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2081,10 +2081,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
{
struct dsa_switch *ds = priv->ds;
struct device *dev = priv->dev;
+ struct device_node *np, *mnp;
struct mii_bus *bus;
static int idx;
int ret;

+ np = priv->dev->of_node;
+
bus = devm_mdiobus_alloc(dev);
if (!bus)
return -ENOMEM;
@@ -2101,7 +2104,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
if (priv->irq)
mt7530_setup_mdio_irq(priv);

- ret = devm_mdiobus_register(dev, bus);
+ mnp = of_get_child_by_name(np, "mdio");
+ ret = devm_of_mdiobus_register(dev, bus, mnp);
+ of_node_put(mnp);
if (ret) {
dev_err(dev, "failed to register MDIO bus: %d\n", ret);
if (priv->irq)
63 changes: 62 additions & 1 deletion target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
reset-deassert-us = <10000>;

/* LED0: CONN (WAN white) */
mxl,led-config = <0x00f0 0x0 0x0 0x0>;
mxl,led-config = <0x03f0 0x0 0x0 0x0>;
};

switch: switch@0 {
Expand Down Expand Up @@ -267,6 +267,67 @@
};
};
};

mdio {
#address-cells = <1>;
#size-cells = <0>;

phy@1 {
reg = <1>;

mediatek,led-config = <
0x21 0x8009 /* BASIC_CTRL */
0x22 0x0c00 /* ON_DURATION */
0x23 0x1400 /* BLINK_DURATION */
0x24 0x8000 /* LED0_ON_CTRL */
0x25 0x0000 /* LED0_BLINK_CTRL */
0x26 0xc007 /* LED1_ON_CTRL */
0x27 0x003f /* LED1_BLINK_CTRL */
>;
};

phy@2 {
reg = <2>;

mediatek,led-config = <
0x21 0x8009 /* BASIC_CTRL */
0x22 0x0c00 /* ON_DURATION */
0x23 0x1400 /* BLINK_DURATION */
0x24 0x8000 /* LED0_ON_CTRL */
0x25 0x0000 /* LED0_BLINK_CTRL */
0x26 0xc007 /* LED1_ON_CTRL */
0x27 0x003f /* LED1_BLINK_CTRL */
>;
};

phy@3 {
reg = <3>;

mediatek,led-config = <
0x21 0x8009 /* BASIC_CTRL */
0x22 0x0c00 /* ON_DURATION */
0x23 0x1400 /* BLINK_DURATION */
0x24 0x8000 /* LED0_ON_CTRL */
0x25 0x0000 /* LED0_BLINK_CTRL */
0x26 0xc007 /* LED1_ON_CTRL */
0x27 0x003f /* LED1_BLINK_CTRL */
>;
};

phy@4 {
reg = <4>;

mediatek,led-config = <
0x21 0x8009 /* BASIC_CTRL */
0x22 0x0c00 /* ON_DURATION */
0x23 0x1400 /* BLINK_DURATION */
0x24 0x8000 /* LED0_ON_CTRL */
0x25 0x0000 /* LED0_BLINK_CTRL */
0x26 0xc007 /* LED1_ON_CTRL */
0x27 0x003f /* LED1_BLINK_CTRL */
>;
};
};
};

&wmac {
Expand Down
4 changes: 2 additions & 2 deletions target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
compatible = "glinet,gl-mt6000", "mediatek,mt7986a";

aliases {
led-boot = &led_run;
led-boot = &led_run;
led-failsafe = &led_run;
led-running = &led_white;
led-upgrade = &led_run;
Expand Down Expand Up @@ -55,7 +55,7 @@
leds {
compatible = "gpio-leds";

led_run: led@0 {
led_run: run {
label = "blue:run";
gpios = <&pio 38 GPIO_ACTIVE_LOW>;
default-state = "on";
Expand Down
22 changes: 22 additions & 0 deletions target/linux/mediatek/filogic/base-files/lib/preinit/81_fix_eeprom
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
. /lib/functions/caldata.sh

preinit_fix_eeprom() {
case $(board_name) in
glinet,gl-mt6000)
mmc_part=$(find_mmc_part factory)
FIRMWARE="mediatek/mt7986_eeprom_mt7976_dual.bin"
[ ! -e /lib/firmware/"$FIRMWARE" ] && \
export FIRMWARE="$FIRMWARE" && \
caldata_extract_mmc "factory" 0x0 0x1000
;;
mercusys,mr90x-v1)
eeprom="/lib/firmware/mediatek/mt7986_eeprom_mt7975_dual.bin"
[ ! -e $eeprom ] && \
ln -sf /tmp/tp_data/MT7986_EEPROM.bin $eeprom
;;
*)
;;
esac
}

boot_hook_add preinit_main preinit_fix_eeprom
Loading

0 comments on commit 3e516dc

Please sign in to comment.