Skip to content

Commit

Permalink
Merge branch 'openwrt:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
aUsernameWoW authored Jun 28, 2024
2 parents 2b650ec + 7c32295 commit 244746e
Show file tree
Hide file tree
Showing 141 changed files with 5,601 additions and 6,394 deletions.
4 changes: 4 additions & 0 deletions include/host-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ HOST_CONFIGURE_ARGS = \
--localstatedir=$(HOST_BUILD_PREFIX)/var \
--sbindir=$(HOST_BUILD_PREFIX)/bin

ifneq ($(YEAR_2038),y)
HOST_CONFIGURE_ARGS += --disable-year2038
endif

HOST_MAKE_VARS = \
CFLAGS="$(HOST_CFLAGS)" \
CPPFLAGS="$(HOST_CPPFLAGS)" \
Expand Down
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 = .94
LINUX_KERNEL_HASH-6.1.94 = 38ea71ad22ae0187fd8ee5ff879b33b0d9bd58161ac9a3e868ae0b4c66b95369
LINUX_VERSION-6.1 = .95
LINUX_KERNEL_HASH-6.1.95 = 2960f0aa1d75665f39114ad3c272a999c54796e553a2355d0379f5188d14dfbd
11 changes: 10 additions & 1 deletion package/boot/uboot-mvebu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,22 @@ define U-Boot/eDPU
BUILD_SUBTARGET:=cortexa53
endef

define U-Boot/rb5009
NAME:=MikroTik RB5009
BUILD_SUBTARGET:=cortexa72
BUILD_DEVICES:=mikrotik_rb5009
UBOOT_CONFIG:=mvebu_rb5009
UBOOT_IMAGE:=u-boot.elf
endef

UBOOT_TARGETS:= \
clearfog \
helios4 \
omnia \
espressobin \
uDPU \
eDPU
eDPU \
rb5009

define Package/u-boot/install
$(if $(findstring cortexa53,$(BUILD_SUBTARGET)),,$(Package/u-boot/install/default))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From a322b1cbb3f3e606d33a11fd18df20811e5c16f2 Mon Sep 17 00:00:00 2001
From: Robert Marko <[email protected]>
Date: Fri, 21 Jun 2024 11:41:30 +0200
Subject: [PATCH 1/3] mvebu: armada-8k: respect CONFIG_DISTRO_DEFAULTS

Currently, Armada 8k config header is setting boot devices and including
<config_distro_bootcmd.h> regardless of the CONFIG_DISTRO_DEFAULTS being
enabled or not, thus populating the environment for distro boot even on
devices that have no need for it.

So, lets simply respect the value of CONFIG_DISTRO_DEFAULTS.

Signed-off-by: Robert Marko <[email protected]>
---
include/configs/mvebu_armada-8k.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

--- a/include/configs/mvebu_armada-8k.h
+++ b/include/configs/mvebu_armada-8k.h
@@ -30,7 +30,7 @@
/*
* PCI configuration
*/
-
+#ifdef CONFIG_DISTRO_DEFAULTS
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
func(MMC, mmc, 0) \
@@ -40,6 +40,9 @@
func(DHCP, dhcp, na)

#include <config_distro_bootcmd.h>
+#else
+#define BOOTENV
+#endif

#define CFG_EXTRA_ENV_SETTINGS \
"scriptaddr=0x6d00000\0" \
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
From 0de5d031f36bca4f7c2686287eff1ef0f5412367 Mon Sep 17 00:00:00 2001
From: Sergey Sergeev <[email protected]>
Date: Sun, 16 Jan 2022 17:19:35 +0100
Subject: [PATCH 2/3] net: mvpp2: fix 10GBase-R support

Due to the lack of XPCS register initialization code and partially incorrect
initialization of the MPCS network controler registers (tested on Mikrotik RB5009
in conjunction with MV88E6393X) the network does not work correctly.
The problem manifests itself as an arbitrary delay (0.4-4 sec) for the actual
data transmission to the network! Accordingly, an almost completely non-working
network for U-Boot is obtained. The code is backported from a similar Linux driver.

Signed-off-by: Sergey Sergeev <[email protected]>
Signed-off-by: Robert Marko <[email protected]>
---
drivers/net/mvpp2.c | 73 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)

--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -3255,6 +3255,76 @@ static int gop_gpcs_reset(struct mvpp2_p
return 0;
}

+static void gop_pcs_reset_assert(struct mvpp2_port *port)
+{
+ u32 val;
+
+ if (port->priv->hw_version == MVPP21 || port->gop_id != 0)
+ return;
+
+ val = readl(port->priv->mpcs_base + port->gop_id * MVPP22_PORT_OFFSET +
+ PCS_CLOCK_RESET);
+ val &= ~(MAC_CLK_RESET_MASK | RX_SD_CLK_RESET_MASK | TX_SD_CLK_RESET_MASK);
+ val |= CLK_DIV_PHASE_SET_MASK;
+ writel(val, port->priv->mpcs_base + port->gop_id * MVPP22_PORT_OFFSET +
+ PCS_CLOCK_RESET);
+
+ val = readl(port->priv->xpcs_base + port->gop_id * MVPP22_PORT_OFFSET +
+ MVPP22_XPCS_GLOBAL_CFG_0_REG);
+ val &= ~MVPP22_XPCS_PCSRESET;
+ writel(val, port->priv->xpcs_base + port->gop_id * MVPP22_PORT_OFFSET +
+ MVPP22_XPCS_GLOBAL_CFG_0_REG);
+}
+
+static void gps_pcs_reset_deassert(struct mvpp2_port *port)
+{
+ u32 val;
+
+ if (port->priv->hw_version == MVPP21 || port->gop_id != 0)
+ return;
+
+ /* this code is only for case of PHY_INTERFACE_MODE_10GBASER! */
+ val = readl(port->priv->mpcs_base + port->gop_id * MVPP22_PORT_OFFSET +
+ PCS_CLOCK_RESET);
+ val |= MAC_CLK_RESET_MASK | RX_SD_CLK_RESET_MASK |
+ TX_SD_CLK_RESET_MASK;
+ val &= ~CLK_DIV_PHASE_SET_MASK;
+ writel(val, port->priv->mpcs_base + port->gop_id * MVPP22_PORT_OFFSET +
+ PCS_CLOCK_RESET);
+}
+
+/* Set the internal mux's to the required PCS in the PI */
+static int gop_xpcs_mode(struct mvpp2_port *port, int num_of_lanes)
+{
+ u32 val;
+ int lane;
+
+ switch (num_of_lanes) {
+ case 1:
+ lane = 0;
+ break;
+ case 2:
+ lane = 1;
+ break;
+ case 4:
+ lane = 2;
+ break;
+ default:
+ return -1;
+ }
+
+ /* configure XG MAC mode */
+ val = readl(port->priv->xpcs_base + port->gop_id * MVPP22_PORT_OFFSET +
+ MVPP22_XPCS_GLOBAL_CFG_0_REG);
+ val &= ~MVPP22_XPCS_PCSMODE_MASK;
+ val &= ~MVPP22_XPCS_LANEACTIVE_MASK;
+ val |= (2 * lane) << MVPP22_XPCS_LANEACTIVE_OFFS;
+ writel(val, port->priv->xpcs_base + port->gop_id * MVPP22_PORT_OFFSET +
+ MVPP22_XPCS_GLOBAL_CFG_0_REG);
+
+ return 0;
+}
+
static int gop_mpcs_mode(struct mvpp2_port *port)
{
u32 val;
@@ -3397,7 +3467,10 @@ static int gop_port_init(struct mvpp2_po
num_of_act_lanes = 2;
mac_num = 0;
/* configure PCS */
+ gop_pcs_reset_assert(port);
+ gop_xpcs_mode(port, num_of_act_lanes);
gop_mpcs_mode(port);
+ gps_pcs_reset_deassert(port);
/* configure MAC */
gop_xlg_mac_mode_cfg(port, num_of_act_lanes);

Loading

0 comments on commit 244746e

Please sign in to comment.