Re: [PATCH 00/13] Switch realtek target to upstream platform

2021-12-12 Thread Birger Koblitz
Hi,

On 12.12.21 20:51, Sander Vanheule wrote:
> Hi Sebastian,
> 
> On Sun, 2021-12-12 at 12:38 +0100, Sebastian Gottschall wrote:
>>
>>> I have not experienced a single lock-up when booting with this patch, but I 
>>> also
>>> didn't
>>> stress-test the machine or even used the switch part. Do you guys have more 
>>> details on
>>> why
>>> it locks up, or how exactly these lock-ups can be resolved?
>> so far we found out it was related to the ethernet driver. but this is 
>> all part of the work we spended into it
>> the last months and recently again since i'm back on this projects
> 
> If it's most likely caused by the ethernet driver, then I don't think 
> complaining about
> vsmp_smp_ops not being sufficient is appropriate here. We didn't touch the 
> ethernet driver
> with this patch series, so any of your changes there should still apply.
It has been mentioned that it is also other parts of the interplay between SMP 
code, clocksource and
IRQ driver, especially for the RTL93xx. What you are proposing will likely make 
it much harder
to tackle this, it might even mean that we have to revert everything back out.

> 
 if you do performance tests
 in addition the mainline still uses 4kc as cpu architecture, which is
 simply wrong for anything else but 838x
>>> Wrong or suboptimal? I don't currently experience any obvious issues, using 
>>> the same
>>> toolchain for 8380, 8390 and 9300.
>> below suboptimal. i mean it decreases performance in a significant 
>> amount and fixing this issue is more than just easy
> 
> If you know since a while that this will be necessary and is an easy win, 
> then please
> submit a patch upstream to break up the target into the SoC-families. I'd 
> actually love to
> see things like this being submitted by you or Birger!
There is a fundamental lack of understanding here. The break-up of the families 
is for
OpenWRT and the way things are being built, including different configurations 
and code
paths for targets. So this is nothing to upstream apart from maybe some 
additional driver
code going there. We are trying to make OWRT do the right thing, talking about 
upstream
is not getting us anywhere.

>From my point of view it looks like you are trying to pull the realtek 
>architecture
in OWRT into a direction that is based on our understanding more than 1 year 
ago when
stuff started to go upstream. Our understanding has fundamentally shifted with 
SMP and
the 93xx architectures.

> 
> Generally speaking, I don't see a reason to wait with submitting patches 
> until other parts
> have stopped breaking. At least then we can all work from a common code base. 
> I obviously
> prefer submitting upstream where possible, but the networking part will be 
> mostly (or
> only) OpenWrt for a while still. People could then enjoy a continous stream of
> improvements in the snapshot builds, and might be encouraged to try writing 
> some code
> themselves.
Indeed. A common code base. And that is moving into a completely different 
direction than
what you propose, based on current knowledge about the targets. If we don't 
have any
possibility to have different code paths plus go for GENERIC_MIPS which is 
likely the
wrong choice, then we essentially cut development off, because that is 
currently focussing
on diversifying the different architectures.

The network code is a long way away from going upstream. There is still a lot 
that is not
understood. From fundamentals like SMI to the right architecture of the 
Ethernet driver
in the face of SMP to how the SoC architectures can be put into one overall 
code-framework.
My point of view is that we should not be upstreaming half-baked stuff. But 
what is even
worse in my eyes is when we then take that half-baked stuff a year later and 
say: oh,
but this is the way it needs to be done now even if this no longer has anything 
to
do with our current understanding.

My proposal to go forward: please provide a patch to split architectures and 
show that
we can optimize compiler and code paths in the face of MIPS Generic for the 4 
SoC
families.

Cheers,
  Birger

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[sdwalker/sdwalker.github.io] f143b7: This week's update

2021-12-12 Thread Stephen Walker via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
  Branch: refs/heads/master
  Home:   https://github.com/sdwalker/sdwalker.github.io
  Commit: f143b7f92e11ee191496f6166c377116c7a0e625
  
https://github.com/sdwalker/sdwalker.github.io/commit/f143b7f92e11ee191496f6166c377116c7a0e625
  Author: Stephen Walker 
  Date:   2021-12-12 (Sun, 12 Dec 2021)

  Changed paths:
M uscan/index-19.07.html
M uscan/index-21.02.html
M uscan/index.html

  Log Message:
  ---
  This week's update



--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 19.07] mac80211: Update to version 4.19.220

2021-12-12 Thread Hauke Mehrtens
The following patch was backported from upstream before and is not
needed any more:
  package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch

Signed-off-by: Hauke Mehrtens 
---
 package/kernel/mac80211/Makefile  |  6 +--
 .../patches/ath/542-ath9k_debugfs_diag.patch  |  4 +-
 .../ath/551-ath9k_ubnt_uap_plus_hsr.patch |  4 +-
 ...-of-peer_bw_rxnss_override-parameter.patch |  2 +-
 ...rolling-support-for-various-chipsets.patch |  2 +-
 ...980-ath10k-fix-max-antenna-gain-unit.patch | 49 ---
 .../100-remove-cryptoapi-dependencies.patch   | 10 ++--
 .../subsys/140-tweak-TSQ-setting.patch|  2 +-
 ...d-stop-start-logic-for-software-TXQs.patch |  4 +-
 .../320-mac80211-Add-TXQ-scheduling-API.patch |  2 +-
 ...time-accounting-and-scheduling-to-TX.patch |  4 +-
 ...pose-ieee80211_schedule_txq-function.patch |  2 +-
 ...0211-add-hdrlen-to-ieee80211_tx_data.patch | 12 ++---
 ...1-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch | 16 +++---
 ...locking-for-txq-scheduling-airtime-f.patch | 10 ++--
 ...op-redundant-rcu_read_lock-unlock-ca.patch |  2 +-
 ...te-hash-for-fq-without-holding-fq-lo.patch |  6 +--
 ...e-dequeue-late-tx-handlers-without-h.patch |  8 +--
 ...ee80211_schedule_txq-schedule-empty-.patch |  6 +--
 ...ing-iTXQ-select-the-queue-in-ieee802.patch |  4 +-
 ...E80211_KEY_FLAG_GENERATE_MMIE-to-iee.patch |  4 +-
 21 files changed, 55 insertions(+), 104 deletions(-)
 delete mode 100644 
package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 1ae7d713e7..be387c4d10 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=mac80211
 
-PKG_VERSION:=4.19.207-1
+PKG_VERSION:=4.19.220-test2
 PKG_RELEASE:=1
-PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.207/
-PKG_HASH:=e119fd57c868e22c0481171ff561902f8c1565f896d97a2163c0d138808cc5f7
+PKG_SOURCE_URL:=https://hauke-m.de/files/backports-test/
+PKG_HASH:=384c9738829d3b7816069959f67b5c27ed9bad1a71b6dff576297500cc483100
 
 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
diff --git a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch 
b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch
index 19bbee09a9..0bfe3ab683 100644
--- a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch
+++ b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch
@@ -125,9 +125,9 @@
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, 
AR_BTCOEX_WL_LNADIV_FORCE_ON);
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -533,6 +533,11 @@ irqreturn_t ath_isr(int irq, void *dev)
-   if (test_bit(ATH_OP_HW_RESET, >op_flags))
+@@ -535,6 +535,11 @@ irqreturn_t ath_isr(int irq, void *dev)
return IRQ_HANDLED;
+   }
  
 +  if (test_bit(ATH_DIAG_TRIGGER_ERROR, >diag)) {
 +  status |= ATH9K_INT_FATAL;
diff --git 
a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch 
b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch
index 08b92d4a86..e39c53086f 100644
--- a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch
+++ b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch
@@ -343,7 +343,7 @@
  
  u8 ath9k_parse_mpdudensity(u8 mpdudensity)
  {
-@@ -654,6 +656,7 @@ void ath_reset_work(struct work_struct *
+@@ -656,6 +658,7 @@ void ath_reset_work(struct work_struct *
  static int ath9k_start(struct ieee80211_hw *hw)
  {
struct ath_softc *sc = hw->priv;
@@ -351,7 +351,7 @@
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
-@@ -732,6 +735,11 @@ static int ath9k_start(struct ieee80211_
+@@ -734,6 +737,11 @@ static int ath9k_start(struct ieee80211_
  AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
}
  
diff --git 
a/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch
 
b/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch
index 64772e8d9d..9b96535b6d 100644
--- 
a/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch
+++ 
b/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch
@@ -121,7 +121,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask 
handling
  static int
 --- a/drivers/net/wireless/ath/ath10k/wmi.h
 +++ b/drivers/net/wireless/ath/ath10k/wmi.h
-@@ -6357,7 +6357,19 @@ struct wmi_10_2_peer_assoc_complete_cmd
+@@ -6360,7 +6360,19 @@ struct 

[PATCH 3/3] iw: Update to version 5.16

2021-12-12 Thread Hauke Mehrtens
Revert a commit to allow providing CFLAGS and LIBS from OpenWrt package
Makefile.

This downgrades the nl80211.h to kernel 5.15 and removes FILS_CRYPTO_OFFLOAD.
This is needed to make it compatible with our patches mac80211 from
kernel 5.15

Signed-off-by: Hauke Mehrtens 
---
 package/network/utils/iw/Makefile |  13 +-
 .../utils/iw/patches/001-nl80211_h_sync.patch | 512 ++
 ...ow-specifying-CFLAGS-LIBS-externally.patch |  68 +++
 .../utils/iw/patches/200-reduce_size.patch|  34 +-
 4 files changed, 260 insertions(+), 367 deletions(-)
 create mode 100644 
package/network/utils/iw/patches/010-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch

diff --git a/package/network/utils/iw/Makefile 
b/package/network/utils/iw/Makefile
index 8e11046189c0..da2b5564168f 100644
--- a/package/network/utils/iw/Makefile
+++ b/package/network/utils/iw/Makefile
@@ -8,13 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iw
-PKG_VERSION:=5.9-8fab0c9e
-PKG_RELEASE:=$(AUTORELEASE)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jberg/iw.git
-PKG_SOURCE_VERSION:=8fab0c9ee9db217587a58efcc37421c86edcb638
-PKG_MIRROR_HASH:=797b322bc03952f3127ae0a7da476c14ada1bbe9a9ae234a56dd6f864c568e16
+PKG_VERSION:=5.16
+PKG_RELEASE:=1
+ 
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@KERNEL/software/network/iw
+PKG_HASH:=4c44e42762f903f9094ba5a598998c800a97a62afd6fd31ec1e0a799e308659c
 
 PKG_MAINTAINER:=Felix Fietkau 
 PKG_LICENSE:=GPL-2.0
diff --git a/package/network/utils/iw/patches/001-nl80211_h_sync.patch 
b/package/network/utils/iw/patches/001-nl80211_h_sync.patch
index f788e6915f96..6d81dd0da1ef 100644
--- a/package/network/utils/iw/patches/001-nl80211_h_sync.patch
+++ b/package/network/utils/iw/patches/001-nl80211_h_sync.patch
@@ -1,375 +1,203 @@
 --- a/nl80211.h
 +++ b/nl80211.h
-@@ -11,7 +11,7 @@
-  * Copyright 2008 Jouni Malinen 
-  * Copyright 2008 Colin McCabe 
-  * Copyright 2015-2017Intel Deutschland GmbH
-- * Copyright (C) 2018-2020 Intel Corporation
-+ * Copyright (C) 2018-2021 Intel Corporation
-  *
-  * Permission to use, copy, modify, and/or distribute this software for any
-  * purpose with or without fee is hereby granted, provided that the above
-@@ -655,6 +655,9 @@
-  *When a security association was established on an 802.1X network using
-  *fast transition, this event should be followed by an
-  *%NL80211_CMD_PORT_AUTHORIZED event.
-+ *Following a %NL80211_CMD_ROAM event userspace can issue
-+ *%NL80211_CMD_GET_SCAN in order to obtain the scan information for the
-+ *new BSS the card/driver roamed to.
-  * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
-  *userspace that a connection was dropped by the AP or due to other
-  *reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and
-@@ -757,7 +760,8 @@
-  *of any other interfaces, and other interfaces will again take
-  *precedence when they are used.
+@@ -301,29 +301,6 @@
+  */
+ 
+ /**
+- * DOC: FILS shared key crypto offload
+- *
+- * This feature is applicable to drivers running in AP mode.
+- *
+- * FILS shared key crypto offload can be advertised by drivers by setting
+- * @NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD flag. The drivers that support
+- * FILS shared key crypto offload should be able to encrypt and decrypt
+- * association frames for FILS shared key authentication as per IEEE 802.11ai.
+- * With this capability, for FILS key derivation, drivers depend on userspace.
+- *
+- * After FILS key derivation, userspace shares the FILS AAD details with the
+- * driver and the driver stores the same to use in decryption of association
+- * request and in encryption of association response. The below parameters
+- * should be given to the driver in %NL80211_CMD_SET_FILS_AAD.
+- *%NL80211_ATTR_MAC - STA MAC address, used for storing FILS AAD per STA
+- *%NL80211_ATTR_FILS_KEK - Used for encryption or decryption
+- *%NL80211_ATTR_FILS_NONCES - Used for encryption or decryption
+- *(STA Nonce 16 bytes followed by AP Nonce 16 bytes)
+- *
+- * Once the association is done, the driver cleans the FILS AAD data.
+- */
+-
+-/**
+  * enum nl80211_commands - supported nl80211 commands
   *
-- * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS 
interface.
-+ * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS 
interface
-+ *(no longer supported).
+  * @NL80211_CMD_UNSPEC: unspecified command to catch errors
+@@ -360,10 +337,7 @@
+  * @NL80211_CMD_DEL_INTERFACE: Virtual interface was deleted, has attributes
+  *%NL80211_ATTR_IFINDEX and %NL80211_ATTR_WIPHY. Can also be sent from
+  *userspace to request deletion of a virtual interface, then requires
+- *attribute %NL80211_ATTR_IFINDEX. If multiple BSSID advertisements are
+- *enabled using %NL80211_ATTR_MBSSID_CONFIG, %NL80211_ATTR_MBSSID_ELEMS,
+- *and if this command is 

[PATCH 1/3] mac80211: Update to version 5.15.6

2021-12-12 Thread Hauke Mehrtens
The following patches were backported from upstream before and are not
needed any more:
  
package/kernel/mac80211/patches/ath10k/081-ath10k-fix-module-load-regression-with-iram-recovery-feature.patch
  
package/kernel/mac80211/patches/ath10k/980-ath10k-fix-max-antenna-gain-unit.patch
  
package/kernel/mac80211/patches/build/010-headers-Add-devm_platform_get_and_ioremap_resource.patch
  
package/kernel/mac80211/patches/subsys/300-mac80211-drop-check-for-DONT_REORDER-in-__ieee80211_.patch
  
package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch
  
package/kernel/mac80211/patches/subsys/308-mac80211-fix-radiotap-header-generation.patch

Signed-off-by: Hauke Mehrtens 
---
 package/kernel/mac80211/Makefile  |   6 +-
 ...egression-with-iram-recovery-feature.patch | 121 --
 .../930-ath10k_add_tpt_led_trigger.patch  |   4 +-
 ...rolling-support-for-various-chipsets.patch |  14 +-
 ...75-ath10k-use-tpt-trigger-by-default.patch |   2 +-
 ...980-ath10k-fix-max-antenna-gain-unit.patch |  49 ---
 ...-power-reduction-for-US-regulatory-d.patch |   8 +-
 .../ath9k/542-ath9k_debugfs_diag.patch|   4 +-
 .../ath9k/551-ath9k_ubnt_uap_plus_hsr.patch   |   4 +-
 ...vm_platform_get_and_ioremap_resource.patch |  79 
 .../110-mac80211_keep_keys_on_stop_ap.patch   |   2 +-
 .../mac80211/patches/subsys/210-ap_scan.patch |   2 +-
 ...eck-for-DONT_REORDER-in-__ieee80211_.patch |  37 --
 ...ate-control-for-retransmitted-frames.patch |   2 +-
 ...-the-fwd_skb-dev-for-mesh-forwarding.patch |   2 +-
 ...t-access-the-IV-when-it-was-stripped.patch |  26 
 ...80211-fix-radiotap-header-generation.patch |  49 ---
 .../patches/subsys/400-allow-ibss-mixed.patch |   2 +-
 .../500-mac80211_configure_antenna_gain.patch |   6 +-
 19 files changed, 29 insertions(+), 390 deletions(-)
 delete mode 100644 
package/kernel/mac80211/patches/ath10k/081-ath10k-fix-module-load-regression-with-iram-recovery-feature.patch
 delete mode 100644 
package/kernel/mac80211/patches/ath10k/980-ath10k-fix-max-antenna-gain-unit.patch
 delete mode 100644 
package/kernel/mac80211/patches/build/010-headers-Add-devm_platform_get_and_ioremap_resource.patch
 delete mode 100644 
package/kernel/mac80211/patches/subsys/300-mac80211-drop-check-for-DONT_REORDER-in-__ieee80211_.patch
 delete mode 100644 
package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch
 delete mode 100644 
package/kernel/mac80211/patches/subsys/308-mac80211-fix-radiotap-header-generation.patch

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index e3cf2d380098..dfc907344fc9 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=mac80211
 
-PKG_VERSION:=5.15-rc6-1
+PKG_VERSION:=5.15.7-test2
 PKG_RELEASE:=1
-PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15-rc6/
-PKG_HASH:=9282612c4c02ef9fc9d74405303033f6b53914cd63d631eef0f43155fcd38932
+PKG_SOURCE_URL:=https://hauke-m.de/files/backports-test/
+PKG_HASH:=539c256521d88b3965884e92f06b6f3f9f64bd1c5ea060acf35d51efc5f907d5
 
 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
diff --git 
a/package/kernel/mac80211/patches/ath10k/081-ath10k-fix-module-load-regression-with-iram-recovery-feature.patch
 
b/package/kernel/mac80211/patches/ath10k/081-ath10k-fix-module-load-regression-with-iram-recovery-feature.patch
deleted file mode 100644
index 7a7d08be487f..
--- 
a/package/kernel/mac80211/patches/ath10k/081-ath10k-fix-module-load-regression-with-iram-recovery-feature.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 6f8c8bf4c7c9be1c42088689fd4370e06b46608a Mon Sep 17 00:00:00 2001
-From: Abinaya Kalaiselvan 
-Date: Wed, 20 Oct 2021 11:59:07 +0300
-Subject: ath10k: fix module load regression with iram-recovery feature
-
-Commit 9af7c32ceca8 ("ath10k: add target IRAM recovery feature support")
-introduced a new firmware feature flag ATH10K_FW_FEATURE_IRAM_RECOVERY. But
-this caused ath10k_pci module load to fail if ATH10K_FW_CRASH_DUMP_RAM_DATA bit
-was not enabled in the ath10k coredump_mask module parameter:
-
-[ 2209.328190] ath10k_pci :02:00.0: qca9984/qca9994 hw1.0 target 
0x0100 chip_id 0x sub 168c:cafe
-[ 2209.434414] ath10k_pci :02:00.0: kconfig debug 1 debugfs 1 tracing 1 
dfs 1 testmode 1
-[ 2209.547191] ath10k_pci :02:00.0: firmware ver 10.4-3.9.0.2-00099 api 5 
features 
no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps,peer-fixed-rate,iram-recovery
 crc32 cbade90a
-[ 2210.896485] ath10k_pci :02:00.0: board_file api 1 bmi_id 0:1 crc32 
a040efc2
-[ 2213.603339] ath10k_pci :02:00.0: failed to copy target iram contents: 
-12
-[ 2213.839027] ath10k_pci :02:00.0: could not init core (-12)
-[ 2213.933910] ath10k_pci :02:00.0: could not probe fw (-12)
-

[PATCH 21.02] mac80211: Update toversion 5.10.83

2021-12-12 Thread Hauke Mehrtens
The following patches were backported from upstream before and are not
needed any more:
  package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch
  
package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch

Signed-off-by: Hauke Mehrtens 
---
 package/kernel/mac80211/Makefile  |  8 +--
 .../patches/ath/542-ath9k_debugfs_diag.patch  |  4 +-
 .../ath/551-ath9k_ubnt_uap_plus_hsr.patch |  4 +-
 .../ath/930-ath10k_add_tpt_led_trigger.patch  |  4 +-
 ...rolling-support-for-various-chipsets.patch | 14 +++---
 ...75-ath10k-use-tpt-trigger-by-default.patch |  2 +-
 ...980-ath10k-fix-max-antenna-gain-unit.patch | 49 ---
 ...-power-reduction-for-US-regulatory-d.patch |  8 +--
 .../100-remove-cryptoapi-dependencies.patch   | 10 ++--
 ...ort-immediate-reconnect-request-hint.patch |  2 +-
 ...-the-fwd_skb-dev-for-mesh-forwarding.patch |  2 +-
 ...t-access-the-IV-when-it-was-stripped.patch | 26 --
 ...-get_default_func-move-default-flow-.patch |  2 +-
 ...ot-maintain-a-backlog-sorted-list-of.patch |  2 +-
 ...add-rx-decapsulation-offload-support.patch | 18 +++
 ...le-QoS-support-for-nl80211-ctrl-port.patch |  6 +--
 ...pply-flow-control-on-management-fram.patch |  2 +-
 ...set-sk_pacing_shift-for-802.3-txpath.patch |  2 +-
 ...MPDU-session-check-from-minstrel_ht-.patch |  6 +--
 ...eee80211_tx_h_rate_ctrl-when-dequeue.patch |  8 +--
 ...te-control-support-for-encap-offload.patch |  2 +-
 ...rting-aggregation-sessions-on-mesh-i.patch |  2 +-
 ...introduce-aql_enable-node-in-debugfs.patch |  4 +-
 ...to-a-virtual-time-based-airtime-sche.patch |  6 +--
 ...eck-per-vif-offload_flags-in-Tx-path.patch |  2 +-
 ...nl80211-add-support-for-BSS-coloring.patch |  2 +-
 ...211-add-support-for-BSS-color-change.patch |  6 +--
 .../patches/subsys/400-allow-ibss-mixed.patch |  2 +-
 28 files changed, 65 insertions(+), 140 deletions(-)
 delete mode 100644 
package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch
 delete mode 100644 
package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 211bb346f3..a985964da5 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=mac80211
 
-PKG_VERSION:=5.10.68-1
-PKG_RELEASE:=3
-PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.68/
-PKG_HASH:=bba161b0084590c677a84b80993709e388a3c478f29ed0c475d4fce1b9162968
+PKG_VERSION:=5.10.84-test2
+PKG_RELEASE:=1
+PKG_SOURCE_URL:=https://hauke-m.de/files/backports-test/
+PKG_HASH:=8555e203d76aead4cad85d351d1565d332413674af89c802bd689ac5fa4e8aae
 
 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
diff --git a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch 
b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch
index 0e75b86cbf..76f9846fa4 100644
--- a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch
+++ b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch
@@ -125,9 +125,9 @@
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, 
AR_BTCOEX_WL_LNADIV_FORCE_ON);
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -536,6 +536,11 @@ irqreturn_t ath_isr(int irq, void *dev)
-   if (test_bit(ATH_OP_HW_RESET, >op_flags))
+@@ -538,6 +538,11 @@ irqreturn_t ath_isr(int irq, void *dev)
return IRQ_HANDLED;
+   }
  
 +  if (test_bit(ATH_DIAG_TRIGGER_ERROR, >diag)) {
 +  status |= ATH9K_INT_FATAL;
diff --git 
a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch 
b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch
index c98222781d..e9cf00769d 100644
--- a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch
+++ b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch
@@ -339,7 +339,7 @@
  
  static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u32 queues, bool drop);
-@@ -657,6 +658,7 @@ void ath_reset_work(struct work_struct *
+@@ -659,6 +660,7 @@ void ath_reset_work(struct work_struct *
  static int ath9k_start(struct ieee80211_hw *hw)
  {
struct ath_softc *sc = hw->priv;
@@ -347,7 +347,7 @@
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
-@@ -735,6 +737,11 @@ static int ath9k_start(struct ieee80211_
+@@ -737,6 +739,11 @@ static int ath9k_start(struct ieee80211_
  AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
}
  
diff --git 
a/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch 

[PATCH 2/3] libnl-tiny: Add NLA_PUT_S32()

2021-12-12 Thread Hauke Mehrtens
This function is used by iw 5.16.

Signed-off-by: Hauke Mehrtens 
---
 package/libs/libnl-tiny/Makefile  |  2 +-
 .../patches/0001-attr.h-Add-NLA_PUT_S32.patch | 62 +++
 2 files changed, 63 insertions(+), 1 deletion(-)
 create mode 100644 
package/libs/libnl-tiny/patches/0001-attr.h-Add-NLA_PUT_S32.patch

diff --git a/package/libs/libnl-tiny/Makefile b/package/libs/libnl-tiny/Makefile
index bdb496c48e60..7fe8b5c5f708 100644
--- a/package/libs/libnl-tiny/Makefile
+++ b/package/libs/libnl-tiny/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libnl-tiny
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/libnl-tiny.git
diff --git a/package/libs/libnl-tiny/patches/0001-attr.h-Add-NLA_PUT_S32.patch 
b/package/libs/libnl-tiny/patches/0001-attr.h-Add-NLA_PUT_S32.patch
new file mode 100644
index ..517d4b5c1565
--- /dev/null
+++ b/package/libs/libnl-tiny/patches/0001-attr.h-Add-NLA_PUT_S32.patch
@@ -0,0 +1,62 @@
+From f4e190cfed119fcf8db4870b0a86dd6ba95034a8 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens 
+Date: Sun, 21 Nov 2021 00:08:55 +0100
+Subject: [PATCH] attr.h: Add NLA_PUT_S32
+
+This function is used by iw now.
+
+Signed-off-by: Hauke Mehrtens 
+---
+ include/netlink/attr.h | 34 ++
+ 1 file changed, 34 insertions(+)
+
+--- a/include/netlink/attr.h
 b/include/netlink/attr.h
+@@ -299,6 +299,31 @@ static inline uint16_t nla_get_u16(struc
+ }
+ 
+ /**
++ * Add 32 bit signed integer attribute to netlink message.
++ * @arg msg Netlink message.
++ * @arg attrtypeAttribute type.
++ * @arg value   Numeric value to store as payload.
++ *
++ * @see nla_put
++ * @return 0 on success or a negative error code.
++ */
++static inline int nla_put_s32(struct nl_msg *msg, int attrtype, int32_t value)
++{
++  return nla_put(msg, attrtype, sizeof(int32_t), );
++}
++
++/**
++ * Return payload of 32 bit signed integer attribute.
++ * @arg nla 32 bit integer attribute.
++ *
++ * @return Payload as 32 bit integer.
++ */
++static inline int32_t nla_get_s32(struct nlattr *nla)
++{
++  return *(int32_t *) nla_data(nla);
++}
++
++/**
+  * Add 32 bit integer attribute to netlink message.
+  * @arg msg   Netlink message.
+  * @arg attrtype  Attribute type.
+@@ -632,6 +657,15 @@ static inline size_t nla_strlcpy(char *d
+   NLA_PUT_TYPE(msg, uint16_t, attrtype, value)
+ 
+ /**
++ * Add 32 bit signed integer attribute to netlink message.
++ * @arg msg   Netlink message.
++ * @arg attrtype  Attribute type.
++ * @arg value Numeric value.
++ */
++#define NLA_PUT_S32(msg, attrtype, value) \
++  NLA_PUT_TYPE(msg, int32_t, attrtype, value)
++
++/**
+  * Add 32 bit integer attribute to netlink message.
+  * @arg msg   Netlink message.
+  * @arg attrtype  Attribute type.
-- 
2.30.2


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 10/14] realtek: update driver platform dependencies

2021-12-12 Thread Sander Vanheule
Make all drivers depend on the upstream platform, instead of the
downstream platform. This can be achieved by dropping the dependendy
patches, and requires some updates to the downstream drivers.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
Tested-by: Bjørn Mork 
---
 .../files-5.10/drivers/net/dsa/rtl83xx/Kconfig|  2 +-
 .../301-gpio-add-rtl8231-driver.patch |  2 +-
 ...pdate-dependencies-for-gpio-realtek-otto.patch | 13 -
 ...pi-update-dependency-for-spi-realtek-rtl.patch | 11 ---
 ...ip-update-dependency-for-irq-realtek-rtl.patch |  8 
 .../306-gpio-add-legacy-rtl838x-driver.patch  |  2 +-
 ...t-update-dependency-for-realtek-otto-wdt.patch | 15 ---
 ...thernet-add-support-for-rtl838x-ethernet.patch |  2 +-
 .../realtek/patches-5.10/705-add-rtl-phy.patch|  2 +-
 9 files changed, 5 insertions(+), 52 deletions(-)
 delete mode 100644 
target/linux/realtek/patches-5.10/303-gpio-update-dependencies-for-gpio-realtek-otto.patch
 delete mode 100644 
target/linux/realtek/patches-5.10/304-spi-update-dependency-for-spi-realtek-rtl.patch
 delete mode 100644 
target/linux/realtek/patches-5.10/305-irqchip-update-dependency-for-irq-realtek-rtl.patch
 delete mode 100644 
target/linux/realtek/patches-5.10/307-wdt-update-dependency-for-realtek-otto-wdt.patch

diff --git a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/Kconfig 
b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/Kconfig
index b423d2c3ea58..79146599180e 100644
--- a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/Kconfig
+++ b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config NET_DSA_RTL83XX
tristate "Realtek RTL838x/RTL839x switch support"
-   depends on RTL838X
+   depends on MACH_REALTEK_RTL
select NET_DSA_TAG_TRAILER
help
  This driver adds support for Realtek RTL83xx series switching.
diff --git 
a/target/linux/realtek/patches-5.10/301-gpio-add-rtl8231-driver.patch 
b/target/linux/realtek/patches-5.10/301-gpio-add-rtl8231-driver.patch
index 496d3f41627b..57334e472443 100644
--- a/target/linux/realtek/patches-5.10/301-gpio-add-rtl8231-driver.patch
+++ b/target/linux/realtek/patches-5.10/301-gpio-add-rtl8231-driver.patch
@@ -6,7 +6,7 @@
  
 +config GPIO_RTL8231
 +  tristate "RTL8231 GPIO"
-+  depends on RTL838X
++  depends on MACH_REALTEK_RTL
 +  help
 +Say yes here to support Realtek RTL8231 GPIO expansion chips.
 +
diff --git 
a/target/linux/realtek/patches-5.10/303-gpio-update-dependencies-for-gpio-realtek-otto.patch
 
b/target/linux/realtek/patches-5.10/303-gpio-update-dependencies-for-gpio-realtek-otto.patch
deleted file mode 100644
index 4ff98e44e8a1..
--- 
a/target/linux/realtek/patches-5.10/303-gpio-update-dependencies-for-gpio-realtek-otto.patch
+++ /dev/null
@@ -1,13 +0,0 @@
 a/drivers/gpio/Kconfig
-+++ b/drivers/gpio/Kconfig
-@@ -491,8 +491,8 @@ config GPIO_RDA
- 
- config GPIO_REALTEK_OTTO
-   tristate "Realtek Otto GPIO support"
--  depends on MACH_REALTEK_RTL
--  default MACH_REALTEK_RTL
-+  depends on RTL838X
-+  default RTL838X
-   select GPIO_GENERIC
-   select GPIOLIB_IRQCHIP
-   help
diff --git 
a/target/linux/realtek/patches-5.10/304-spi-update-dependency-for-spi-realtek-rtl.patch
 
b/target/linux/realtek/patches-5.10/304-spi-update-dependency-for-spi-realtek-rtl.patch
deleted file mode 100644
index 6975bfd2287c..
--- 
a/target/linux/realtek/patches-5.10/304-spi-update-dependency-for-spi-realtek-rtl.patch
+++ /dev/null
@@ -1,11 +0,0 @@
 a/drivers/spi/Makefile
-+++ b/drivers/spi/Makefile
-@@ -94,7 +94,7 @@ obj-$(CONFIG_SPI_QCOM_QSPI)  += spi-qcom
- obj-$(CONFIG_SPI_QUP) += spi-qup.o
- obj-$(CONFIG_SPI_ROCKCHIP)+= spi-rockchip.o
- obj-$(CONFIG_SPI_RB4XX)   += spi-rb4xx.o
--obj-$(CONFIG_MACH_REALTEK_RTL)+= spi-realtek-rtl.o
-+obj-$(CONFIG_RTL838X) += spi-realtek-rtl.o
- obj-$(CONFIG_SPI_RPCIF)   += spi-rpc-if.o
- obj-$(CONFIG_SPI_RSPI)+= spi-rspi.o
- obj-$(CONFIG_SPI_S3C24XX) += spi-s3c24xx-hw.o
diff --git 
a/target/linux/realtek/patches-5.10/305-irqchip-update-dependency-for-irq-realtek-rtl.patch
 
b/target/linux/realtek/patches-5.10/305-irqchip-update-dependency-for-irq-realtek-rtl.patch
deleted file mode 100644
index 96321f0bba2c..
--- 
a/target/linux/realtek/patches-5.10/305-irqchip-update-dependency-for-irq-realtek-rtl.patch
+++ /dev/null
@@ -1,8 +0,0 @@
 a/drivers/irqchip/Makefile
-+++ b/drivers/irqchip/Makefile
-@@ -114,4 +114,4 @@ obj-$(CONFIG_LOONGSON_PCH_PIC) += irq-l
- obj-$(CONFIG_LOONGSON_PCH_MSI)+= irq-loongson-pch-msi.o
- obj-$(CONFIG_MST_IRQ) += irq-mst-intc.o
- 

[PATCH v2 14/14] realtek: initialise mulithreading on supported SoCs

2021-12-12 Thread Sander Vanheule
In addition to CPS SMP setups, also try to initialise MT SMP setups with
multiple VPEs per CPU core on MIPS_GENERIC. CMP SMP support is not
provided as it is considered deprecated. This is required to enabled SMP
on RTL839x and RTL930x devices.

Additionally, rework the code by dropping the err variable and make it
similar to how other platforms perform this initialisation.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
---
 ...S-generic-enable-SMP-on-SMVP-systems.patch | 23 +++
 1 file changed, 23 insertions(+)
 create mode 100644 
target/linux/realtek/patches-5.10/310-MIPS-generic-enable-SMP-on-SMVP-systems.patch

diff --git 
a/target/linux/realtek/patches-5.10/310-MIPS-generic-enable-SMP-on-SMVP-systems.patch
 
b/target/linux/realtek/patches-5.10/310-MIPS-generic-enable-SMP-on-SMVP-systems.patch
new file mode 100644
index ..f6363b2048e5
--- /dev/null
+++ 
b/target/linux/realtek/patches-5.10/310-MIPS-generic-enable-SMP-on-SMVP-systems.patch
@@ -0,0 +1,23 @@
+--- a/arch/mips/generic/init.c
 b/arch/mips/generic/init.c
+@@ -111,14 +111,15 @@ void __init plat_mem_setup(void)
+ 
+ void __init device_tree_init(void)
+ {
+-  int err;
+-
+   unflatten_and_copy_device_tree();
+   mips_cpc_probe();
+ 
+-  err = register_cps_smp_ops();
+-  if (err)
+-  err = register_up_smp_ops();
++  if (!register_cps_smp_ops())
++  return;
++  if (!register_vsmp_smp_ops())
++  return;
++
++  register_up_smp_ops();
+ }
+ 
+ int __init apply_mips_fdt_fixups(void *fdt_out, size_t fdt_out_size,
-- 
2.33.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 13/14] realtek: modernise devicetree console setup

2021-12-12 Thread Sander Vanheule
Instead of providing a console= bootarg, provide the stdout-path
property. Complement this with adding the earlycon bootarg, so early
console output is available.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
Tested-by: Bjørn Mork 
---
 target/linux/realtek/dts-5.10/rtl838x.dtsi | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/target/linux/realtek/dts-5.10/rtl838x.dtsi 
b/target/linux/realtek/dts-5.10/rtl838x.dtsi
index 835fc4a8f8c3..f7b497978ae8 100644
--- a/target/linux/realtek/dts-5.10/rtl838x.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl838x.dtsi
@@ -65,8 +65,13 @@
};
};
 
+   aliases {
+   serial0 = 
+   };
+
chosen {
-   bootargs = "console=ttyS0,115200";
+   stdout-path = "serial0:115200n8";
+   bootargs = "earlycon";
};
 
cpu_clk: cpu_clk {
-- 
2.33.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 12/14] realtek: drop downstream platform

2021-12-12 Thread Sander Vanheule
The original platform is no longer used by any drivers, but was replaced
by MACH_REALTEK_RTL. Drop the old platform patch and unused files.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
Tested-by: Bjørn Mork 
---
 .../mips/include/asm/mach-rtl838x/ioremap.h   |  29 ---
 .../files-5.10/arch/mips/rtl838x/Makefile |   5 -
 .../files-5.10/arch/mips/rtl838x/Platform |   5 -
 .../files-5.10/arch/mips/rtl838x/prom.c   | 183 --
 .../files-5.10/arch/mips/rtl838x/setup.c  |  76 
 .../300-mips-add-rtl838x-platform.patch   |  39 
 6 files changed, 337 deletions(-)
 delete mode 100644 
target/linux/realtek/files-5.10/arch/mips/include/asm/mach-rtl838x/ioremap.h
 delete mode 100644 target/linux/realtek/files-5.10/arch/mips/rtl838x/Makefile
 delete mode 100644 target/linux/realtek/files-5.10/arch/mips/rtl838x/Platform
 delete mode 100644 target/linux/realtek/files-5.10/arch/mips/rtl838x/prom.c
 delete mode 100644 target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c
 delete mode 100644 
target/linux/realtek/patches-5.10/300-mips-add-rtl838x-platform.patch

diff --git 
a/target/linux/realtek/files-5.10/arch/mips/include/asm/mach-rtl838x/ioremap.h 
b/target/linux/realtek/files-5.10/arch/mips/include/asm/mach-rtl838x/ioremap.h
deleted file mode 100644
index c49a09579233..
--- 
a/target/linux/realtek/files-5.10/arch/mips/include/asm/mach-rtl838x/ioremap.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef RTL838X_IOREMAP_H_
-#define RTL838X_IOREMAP_H_
-
-static inline int is_rtl838x_internal_registers(phys_addr_t offset)
-{
-   /* IO-Block */
-   if (offset >= 0xb800 && offset < 0xb900)
-   return 1;
-   /* Switch block */
-   if (offset >= 0xbb00 && offset < 0xbc00)
-   return 1;
-   return 0;
-}
-
-static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long 
size,
-unsigned long flags)
-{
-   if (is_rtl838x_internal_registers(offset))
-   return (void __iomem *)offset;
-   return NULL;
-}
-
-static inline int plat_iounmap(const volatile void __iomem *addr)
-{
-   return is_rtl838x_internal_registers((unsigned long)addr);
-}
-
-#endif
diff --git a/target/linux/realtek/files-5.10/arch/mips/rtl838x/Makefile 
b/target/linux/realtek/files-5.10/arch/mips/rtl838x/Makefile
deleted file mode 100644
index a9d1666d4652..
--- a/target/linux/realtek/files-5.10/arch/mips/rtl838x/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# Makefile for the rtl838x specific parts of the kernel
-#
-
-obj-y := setup.o prom.o
diff --git a/target/linux/realtek/files-5.10/arch/mips/rtl838x/Platform 
b/target/linux/realtek/files-5.10/arch/mips/rtl838x/Platform
deleted file mode 100644
index f9f189b68945..
--- a/target/linux/realtek/files-5.10/arch/mips/rtl838x/Platform
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# Realtek RTL838x SoCs
-#
-cflags-$(CONFIG_RTL838X)   += -I$(srctree)/arch/mips/include/asm/mach-rtl838x/
-load-$(CONFIG_RTL838X) += 0x8000
diff --git a/target/linux/realtek/files-5.10/arch/mips/rtl838x/prom.c 
b/target/linux/realtek/files-5.10/arch/mips/rtl838x/prom.c
deleted file mode 100644
index aea53c545159..
--- a/target/linux/realtek/files-5.10/arch/mips/rtl838x/prom.c
+++ /dev/null
@@ -1,183 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * prom.c
- * Early intialization code for the Realtek RTL838X SoC
- *
- * based on the original BSP by
- * Copyright (C) 2006-2012 Tony Wu (ton...@realtek.com)
- * Copyright (C) 2020 B. Koblitz
- *
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-extern char arcs_cmdline[];
-extern const char __appended_dtb;
-
-struct rtl83xx_soc_info soc_info;
-const void *fdt;
-
-const char *get_system_type(void)
-{
-   return soc_info.name;
-}
-
-void __init prom_free_prom_memory(void)
-{
-
-}
-
-void __init device_tree_init(void)
-{
-   if (!fdt_check_header(&__appended_dtb)) {
-   fdt = &__appended_dtb;
-   pr_info("Using appended Device Tree.\n");
-   }
-   initial_boot_params = (void *)fdt;
-   unflatten_and_copy_device_tree();
-}
-
-static void __init prom_init_cmdline(void)
-{
-   int argc = fw_arg0;
-   char **argv = (char **) KSEG1ADDR(fw_arg1);
-   int i;
-
-   arcs_cmdline[0] = '\0';
-
-   for (i = 0; i < argc; i++) {
-   char *p = (char *) KSEG1ADDR(argv[i]);
-
-   if (CPHYSADDR(p) && *p) {
-   strlcat(arcs_cmdline, p, sizeof(arcs_cmdline));
-   strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
-   }
-   }
-   pr_info("Kernel command line: %s\n", arcs_cmdline);
-}
-
-void __init identify_rtl9302(void)
-{
-   switch (sw_r32(RTL93XX_MODEL_NAME_INFO) & 

[PATCH v2 11/14] realtek: switch target to upstream platform

2021-12-12 Thread Sander Vanheule
Use the upstream MACH_REALTEK_RTL platform instead of the downstream
RTL83XX platform. This effectively deprecates the original platform.

The updated config was generated by kernel_oldconfig, using the defaults
for the now available symbols.

Since the upstream platform is based on MIPS_GENERIC, the kernel load
and entry addresses need to be updated to match the expected values.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
Tested-by: Bjørn Mork 
---
 target/linux/realtek/config-5.10| 36 -
 target/linux/realtek/image/Makefile |  4 ++--
 2 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/target/linux/realtek/config-5.10 b/target/linux/realtek/config-5.10
index f75cf92897ad..eb3eb0e2b51c 100644
--- a/target/linux/realtek/config-5.10
+++ b/target/linux/realtek/config-5.10
@@ -1,9 +1,7 @@
 CONFIG_AQUANTIA_PHY=y
 CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_MMAP_RND_BITS_MAX=15
 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
@@ -25,8 +23,11 @@ CONFIG_CPU_MIPS32=y
 # CONFIG_CPU_MIPS32_R1 is not set
 CONFIG_CPU_MIPS32_R2=y
 CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_MIPSR2_IRQ_EI=y
+CONFIG_CPU_MIPSR2_IRQ_VI=y
 CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
 CONFIG_CPU_R4K_CACHE_TLB=y
+CONFIG_CPU_RMAP=y
 CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_CPU_SUPPORTS_MSA=y
@@ -89,6 +90,7 @@ CONFIG_I2C_GPIO=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_IRQCHIP=y
 CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_MIPS_CPU=y
 CONFIG_IRQ_WORK=y
@@ -99,6 +101,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 CONFIG_LIBFDT=y
 CONFIG_LLD_VERSION=0
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MACH_REALTEK_RTL=y
 CONFIG_MARVELL_PHY=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
@@ -110,17 +113,24 @@ CONFIG_MIGRATION=y
 CONFIG_MIPS=y
 CONFIG_MIPS_ASID_BITS=8
 CONFIG_MIPS_ASID_SHIFT=0
-CONFIG_MIPS_CBPF_JIT=y
 CONFIG_MIPS_CLOCK_VSYSCALL=y
 # CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set
 # CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
 CONFIG_MIPS_CMDLINE_FROM_DTB=y
+CONFIG_MIPS_EBPF_JIT=y
 # CONFIG_MIPS_ELF_APPENDED_DTB is not set
+CONFIG_MIPS_GENERIC=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 CONFIG_MIPS_LD_CAN_LINK_VDSO=y
+CONFIG_MIPS_MT=y
+CONFIG_MIPS_MT_FPAFF=y
+CONFIG_MIPS_MT_SMP=y
 # CONFIG_MIPS_NO_APPENDED_DTB is not set
+CONFIG_MIPS_NR_CPU_NR_MAP=2
+CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
 CONFIG_MIPS_RAW_APPENDED_DTB=y
 CONFIG_MIPS_SPRAM=y
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_MTD_CFI_GEOMETRY=y
@@ -133,14 +143,15 @@ CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_TPLINK_FW=y
 CONFIG_MTD_SPLIT_UIMAGE_FW=y
 CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NET_DEVLINK=y
 CONFIG_NET_DSA=y
 CONFIG_NET_DSA_RTL83XX=y
 CONFIG_NET_DSA_TAG_TRAILER=y
+CONFIG_NET_FLOW_LIMIT=y
 CONFIG_NET_RTL838X=y
 CONFIG_NET_SWITCHDEV=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NR_CPUS=2
 CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
@@ -151,6 +162,7 @@ CONFIG_OF_IRQ=y
 CONFIG_OF_KOBJ=y
 CONFIG_OF_MDIO=y
 CONFIG_OF_NET=y
+CONFIG_PADATA=y
 CONFIG_PCI_DRIVERS_LEGACY=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
@@ -160,6 +172,8 @@ CONFIG_PINCTRL=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_GPIO_RESTART=y
 CONFIG_POWER_RESET_SYSCON=y
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
 CONFIG_RATIONAL=y
 CONFIG_REALTEK_OTTO_WDT=y
 CONFIG_REALTEK_PHY=y
@@ -167,16 +181,20 @@ CONFIG_REALTEK_SOC_PHY=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_RESET_CONTROLLER=y
-CONFIG_RTL838X=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
 CONFIG_RTL9300_TIMER=y
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SFP=y
+CONFIG_SMP=y
+CONFIG_SMP_UP=y
 CONFIG_SPI=y
 CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 CONFIG_SRCU=y
 CONFIG_SWPHY=y
+CONFIG_SYNC_R4K=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
 CONFIG_SYS_HAS_CPU_MIPS32_R1=y
 CONFIG_SYS_HAS_CPU_MIPS32_R2=y
@@ -185,13 +203,19 @@ CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
 CONFIG_SYS_SUPPORTS_MIPS16=y
+CONFIG_SYS_SUPPORTS_MULTITHREADING=y
+CONFIG_SYS_SUPPORTS_SCHED_SMT=y
+CONFIG_SYS_SUPPORTS_SMP=y
+CONFIG_SYS_SUPPORTS_VPE_LOADER=y
 CONFIG_TARGET_ISA_REV=2
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y
-CONFIG_TINY_SRCU=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
 CONFIG_USE_GENERIC_EARLY_PRINTK_8250=y
 CONFIG_USE_OF=y
 CONFIG_WATCHDOG_CORE=y
+CONFIG_XPS=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_ZLIB_INFLATE=y
diff --git a/target/linux/realtek/image/Makefile 
b/target/linux/realtek/image/Makefile
index a7961970a302..84cfc5a9c679 100644
--- a/target/linux/realtek/image/Makefile
+++ b/target/linux/realtek/image/Makefile
@@ -3,8 +3,8 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-KERNEL_LOADADDR = 0x8000

[PATCH v2 09/14] realtek: use correct compatible for rtl930x SoCs

2021-12-12 Thread Sander Vanheule
The base DTSI for RTL930x-based devices contained the compatible for
RTL838x-based devices. Although this will be overridden by devices
including this file, correct it to indicate what the fallback should be.

Signed-off-by: Sander Vanheule 
---
 target/linux/realtek/dts-5.10/rtl930x.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/realtek/dts-5.10/rtl930x.dtsi 
b/target/linux/realtek/dts-5.10/rtl930x.dtsi
index 3a9b0e23c470..43816c6c1f7d 100644
--- a/target/linux/realtek/dts-5.10/rtl930x.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl930x.dtsi
@@ -51,7 +51,7 @@
#address-cells = <1>;
#size-cells = <1>;
 
-   compatible = "realtek,rtl838x-soc";
+   compatible = "realtek,rtl93xx-soc";
 
cpus {
#address-cells = <1>;
-- 
2.33.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 08/14] realtek: add board file for MACH_REALTEK_RTL

2021-12-12 Thread Sander Vanheule
To maintain compatibility with existing drivers, which require the
soc_info struct to be available, add a downstream board file for the
MACH_REALTEK_RTL platform.

MIPS_GENERIC based platforms will iterate through the array of available
MIPS_MACHINE-s to perform platform detection. For devicetree based
platforms, this happens via a call to fixup_fdt. Use this call to
perform the SoC detection, adapted from the old prom.c file.

A list of supported root compatibles are provided, along with matching
register offsets for where to find the SoC model. This offset is then
the only one probed in place of the old detection heuristic.

MIPS_GENERIC also implements its own custom get_system_type(), which can
be customized via the system_type variable. Set this variable to ensure
the specific SoC ID is available at runtime from /proc/cpuinfo.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
Tested-by: Bjørn Mork 
---
v2:
- Fix function definition formatting
---
 .../arch/mips/generic/board-realtek.c | 145 ++
 ...-in-board-realtek-for-generic-kernel.patch |   9 ++
 2 files changed, 154 insertions(+)
 create mode 100644 
target/linux/realtek/files-5.10/arch/mips/generic/board-realtek.c
 create mode 100644 
target/linux/realtek/patches-5.10/309-mips-built-in-board-realtek-for-generic-kernel.patch

diff --git a/target/linux/realtek/files-5.10/arch/mips/generic/board-realtek.c 
b/target/linux/realtek/files-5.10/arch/mips/generic/board-realtek.c
new file mode 100644
index ..8ebebcfa7257
--- /dev/null
+++ b/target/linux/realtek/files-5.10/arch/mips/generic/board-realtek.c
@@ -0,0 +1,145 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Board detection for the Realtek RTL838X, RTL839X, RTL930X, RTL931X SoCs
+ *
+ * based on the original BSP by
+ * Copyright (C) 2006-2012 Tony Wu (ton...@realtek.com)
+ * Copyright (C) 2020 B. Koblitz
+ *
+ */
+
+#include 
+#include 
+
+#include 
+
+struct rtl83xx_soc_info soc_info;
+
+static __init void identify_rtl9302(u32 model)
+{
+   switch (model & 0xfff0) {
+   case 0x93020810:
+   soc_info.name = "RTL9302A 12x2.5G";
+   break;
+   case 0x93021010:
+   soc_info.name = "RTL9302B 8x2.5G";
+   break;
+   case 0x93021810:
+   soc_info.name = "RTL9302C 16x2.5G";
+   break;
+   case 0x93022010:
+   soc_info.name = "RTL9302D 24x2.5G";
+   break;
+   case 0x93020800:
+   soc_info.name = "RTL9302A";
+   break;
+   case 0x93021000:
+   soc_info.name = "RTL9302B";
+   break;
+   case 0x93021800:
+   soc_info.name = "RTL9302C";
+   break;
+   case 0x93022000:
+   soc_info.name = "RTL9302D";
+   break;
+   case 0x93023001:
+   soc_info.name = "RTL9302F";
+   break;
+   default:
+   soc_info.name = "RTL9302";
+   }
+}
+
+static __init void realtek_detect(u32 info_addr)
+{
+   u32 model;
+
+   model = sw_r32(info_addr);
+   soc_info.id = model >> 16 & 0x;
+
+   switch (soc_info.id) {
+   case 0x8328:
+   soc_info.name = "RTL8328";
+   soc_info.family = RTL8328_FAMILY_ID;
+   break;
+   case 0x8332:
+   soc_info.name = "RTL8332";
+   soc_info.family = RTL8380_FAMILY_ID;
+   break;
+   case 0x8380:
+   soc_info.name = "RTL8380";
+   soc_info.family = RTL8380_FAMILY_ID;
+   break;
+   case 0x8382:
+   soc_info.name = "RTL8382";
+   soc_info.family = RTL8380_FAMILY_ID;
+   break;
+   case 0x8390:
+   soc_info.name = "RTL8390";
+   soc_info.family = RTL8390_FAMILY_ID;
+   break;
+   case 0x8391:
+   soc_info.name = "RTL8391";
+   soc_info.family = RTL8390_FAMILY_ID;
+   break;
+   case 0x8392:
+   soc_info.name = "RTL8392";
+   soc_info.family = RTL8390_FAMILY_ID;
+   break;
+   case 0x8393:
+   soc_info.name = "RTL8393";
+   soc_info.family = RTL8390_FAMILY_ID;
+   break;
+   case 0x9301:
+   soc_info.name = "RTL9301";
+   soc_info.family = RTL9300_FAMILY_ID;
+   break;
+   case 0x9302:
+   identify_rtl9302(model);
+   soc_info.family = RTL9300_FAMILY_ID;
+   break;
+   case 0x9313:
+   soc_info.name = "RTL9313";
+   soc_info.family = RTL9310_FAMILY_ID;
+   break;
+   default:
+   soc_info.name = "DEFAULT";
+   soc_info.family = 0;
+   }
+
+   system_type = soc_info.name;
+}
+
+static __init const void *realtek_fixup_fdt(const void *fdt, const void 

[PATCH v2 07/14] realtek: backport upstream platform

2021-12-12 Thread Sander Vanheule
Backport the patch that introduced the MACH_REALTEK_RTL platform in
5.12, which is based on MIPS_GENERIC. This will allow some custom
platform code to be dropped from the realtek target.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
Tested-by: Bjørn Mork 
---
 ...-add-realtek-rtl838x-rtl839x-support.patch | 45 +++
 1 file changed, 45 insertions(+)
 create mode 100644 
target/linux/realtek/patches-5.10/009-5.12-MIPS-add-realtek-rtl838x-rtl839x-support.patch

diff --git 
a/target/linux/realtek/patches-5.10/009-5.12-MIPS-add-realtek-rtl838x-rtl839x-support.patch
 
b/target/linux/realtek/patches-5.10/009-5.12-MIPS-add-realtek-rtl838x-rtl839x-support.patch
new file mode 100644
index ..f343251d2341
--- /dev/null
+++ 
b/target/linux/realtek/patches-5.10/009-5.12-MIPS-add-realtek-rtl838x-rtl839x-support.patch
@@ -0,0 +1,45 @@
+From 4042147a0cc6af5a400b5e12a7855e893dec01b4 Mon Sep 17 00:00:00 2001
+From: Bert Vermeulen 
+Date: Tue, 19 Jan 2021 10:21:07 +0100
+Subject: [PATCH] MIPS: Add Realtek RTL838x/RTL839x support as generic MIPS
+ system
+
+This is just enough system to boot the kernel with earlycon working.
+
+Signed-off-by: Bert Vermeulen 
+Signed-off-by: Sander Vanheule 
+Signed-off-by: Thomas Bogendoerfer 
+---
+ arch/mips/Kconfig | 21 +
+ 1 file changed, 21 insertions(+)
+
+--- a/arch/mips/Kconfig
 b/arch/mips/Kconfig
+@@ -632,6 +632,27 @@ config RALINK
+   select ARCH_HAS_RESET_CONTROLLER
+   select RESET_CONTROLLER
+ 
++config MACH_REALTEK_RTL
++  bool "Realtek RTL838x/RTL839x based machines"
++  select MIPS_GENERIC
++  select DMA_NONCOHERENT
++  select IRQ_MIPS_CPU
++  select CSRC_R4K
++  select CEVT_R4K
++  select SYS_HAS_CPU_MIPS32_R1
++  select SYS_HAS_CPU_MIPS32_R2
++  select SYS_SUPPORTS_BIG_ENDIAN
++  select SYS_SUPPORTS_32BIT_KERNEL
++  select SYS_SUPPORTS_MIPS16
++  select SYS_SUPPORTS_MULTITHREADING
++  select SYS_SUPPORTS_VPE_LOADER
++  select SYS_HAS_EARLY_PRINTK
++  select SYS_HAS_EARLY_PRINTK_8250
++  select USE_GENERIC_EARLY_PRINTK_8250
++  select BOOT_RAW
++  select PINCTRL
++  select USE_OF
++
+ config SGI_IP22
+   bool "SGI IP22 (Indy/Indigo2)"
+   select ARC_MEMORY
-- 
2.33.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 06/14] realtek: update mach-rtl83xx.h includes

2021-12-12 Thread Sander Vanheule
Include the mach-rtl83xx.h header from the root MIPS asm include
directory. This will allow custom build options to be dropped once
ioremap.h is no longer required.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
Tested-by: Bjørn Mork 
---
 target/linux/realtek/files-5.10/arch/mips/rtl838x/prom.c| 2 +-
 target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c   | 2 +-
 .../realtek/files-5.10/drivers/clocksource/timer-rtl9300.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/realtek/files-5.10/arch/mips/rtl838x/prom.c 
b/target/linux/realtek/files-5.10/arch/mips/rtl838x/prom.c
index 3390c043347e..aea53c545159 100644
--- a/target/linux/realtek/files-5.10/arch/mips/rtl838x/prom.c
+++ b/target/linux/realtek/files-5.10/arch/mips/rtl838x/prom.c
@@ -19,7 +19,7 @@
 #include 
 #include 
 
-#include 
+#include 
 
 extern char arcs_cmdline[];
 extern const char __appended_dtb;
diff --git a/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c 
b/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c
index df29b76bbf0f..eed24ef50f59 100644
--- a/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c
+++ b/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c
@@ -24,7 +24,7 @@
 #include 
 #include 
 
-#include "mach-rtl83xx.h"
+#include "asm/mach-rtl838x/mach-rtl83xx.h"
 
 extern struct rtl83xx_soc_info soc_info;
 
diff --git 
a/target/linux/realtek/files-5.10/drivers/clocksource/timer-rtl9300.c 
b/target/linux/realtek/files-5.10/drivers/clocksource/timer-rtl9300.c
index 9ab1733fe38c..f749cce64758 100644
--- a/target/linux/realtek/files-5.10/drivers/clocksource/timer-rtl9300.c
+++ b/target/linux/realtek/files-5.10/drivers/clocksource/timer-rtl9300.c
@@ -9,7 +9,7 @@
 #include 
 #include "timer-of.h"
 
-#include 
+#include 
 
 /* 
  * Timer registers
-- 
2.33.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 04/14] realtek: use fixed-clock as CPU clock

2021-12-12 Thread Sander Vanheule
CPU clock definition in devicetree should be specified per CPU, not in
the cpus node. This modification causes plat_init_time() to not find the
CPU frequency in the devicetree any more, but it can fall back to the
(identical) default.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
Tested-by: Bjørn Mork 
---
 target/linux/realtek/dts-5.10/rtl838x.dtsi | 9 -
 target/linux/realtek/dts-5.10/rtl930x.dtsi | 9 -
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/target/linux/realtek/dts-5.10/rtl838x.dtsi 
b/target/linux/realtek/dts-5.10/rtl838x.dtsi
index 899c1731fb51..835fc4a8f8c3 100644
--- a/target/linux/realtek/dts-5.10/rtl838x.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl838x.dtsi
@@ -56,11 +56,12 @@
cpus {
#address-cells = <1>;
#size-cells = <0>;
-   frequency = <5>;
 
cpu@0 {
compatible = "mips,mips4KEc";
reg = <0>;
+   clocks = <_clk>;
+   clock-names = "cpu";
};
};
 
@@ -68,6 +69,12 @@
bootargs = "console=ttyS0,115200";
};
 
+   cpu_clk: cpu_clk {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency = <5>;
+   };
+
lx_clk: lx_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
diff --git a/target/linux/realtek/dts-5.10/rtl930x.dtsi 
b/target/linux/realtek/dts-5.10/rtl930x.dtsi
index 991e9e2f9a28..3a9b0e23c470 100644
--- a/target/linux/realtek/dts-5.10/rtl930x.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl930x.dtsi
@@ -56,11 +56,12 @@
cpus {
#address-cells = <1>;
#size-cells = <0>;
-   frequency = <8>;
 
cpu@0 {
compatible = "mips,mips34Kc";
reg = <0>;
+   clocks = <_clk>;
+   clock-names = "cpu";
};
};
 
@@ -80,6 +81,12 @@
interrupt-controller;
};
 
+   cpu_clk: cpu_clk {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency  = <8>;
+   };
+
lx_clk: lx_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
-- 
2.33.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 05/14] realtek: include io.h in mach-rtl83xx.h

2021-12-12 Thread Sander Vanheule
The readl and writel calls used in macros defined in this header are not
included here. As a result, this header cannot be included by itself,
but must be preceded by other includes providing these calls. Fix this
by including asm/io.h in this header too.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
Tested-by: Bjørn Mork 
---
 .../files-5.10/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/target/linux/realtek/files-5.10/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
 
b/target/linux/realtek/files-5.10/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
index ecec0fec2dce..831edf8de76b 100644
--- 
a/target/linux/realtek/files-5.10/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
+++ 
b/target/linux/realtek/files-5.10/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
@@ -6,6 +6,7 @@
 #ifndef _MACH_RTL838X_H_
 #define _MACH_RTL838X_H_
 
+#include 
 #include 
 /*
  * Register access macros
-- 
2.33.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 03/14] realtek: remove hardcoded sys-led configurations

2021-12-12 Thread Sander Vanheule
Disabling the sys-led peripheral should be done via a pin controller,
for which pinctrl-single nodes are present in the platform DTSI files.
Drop the hardcoded per-platform sys-led configurations, and require
things to be set up in the devicetree.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
Tested-by: Bjørn Mork 
---
 .../files-5.10/arch/mips/rtl838x/setup.c  | 40 ---
 1 file changed, 40 deletions(-)

diff --git a/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c 
b/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c
index 55419c7b0b7a..df29b76bbf0f 100644
--- a/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c
+++ b/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c
@@ -28,31 +28,6 @@
 
 extern struct rtl83xx_soc_info soc_info;
 
-static void __init rtl838x_setup(void)
-{
-   /* Setup System LED. Bit 15 then allows to toggle it */
-   sw_w32_mask(0, 3 << 16, RTL838X_LED_GLB_CTRL);
-}
-
-static void __init rtl839x_setup(void)
-{
-   /* Setup System LED. Bit 14 of RTL839X_LED_GLB_CTRL then allows to 
toggle it */
-   sw_w32_mask(0, 3 << 15, RTL839X_LED_GLB_CTRL);
-}
-
-static void __init rtl930x_setup(void)
-{
-   if (soc_info.id == 0x9302)
-   sw_w32_mask(0, 3 << 13, RTL9302_LED_GLB_CTRL);
-   else
-   sw_w32_mask(0, 3 << 13, RTL930X_LED_GLB_CTRL);
-}
-
-static void __init rtl931x_setup(void)
-{
-   sw_w32_mask(0, 3 << 12, RTL931X_LED_GLB_CTRL);
-}
-
 void __init plat_mem_setup(void)
 {
void *dtb;
@@ -71,21 +46,6 @@ void __init plat_mem_setup(void)
 * parsed resulting in our memory appearing
 */
__dt_setup_arch(dtb);
-
-   switch (soc_info.family) {
-   case RTL8380_FAMILY_ID:
-   rtl838x_setup();
-   break;
-   case RTL8390_FAMILY_ID:
-   rtl839x_setup();
-   break;
-   case RTL9300_FAMILY_ID:
-   rtl930x_setup();
-   break;
-   case RTL9310_FAMILY_ID:
-   rtl931x_setup();
-   break;
-   }
 }
 
 void __init plat_time_init(void)
-- 
2.33.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 01/14] realtek: add missing gpio0 pinctrl properties

2021-12-12 Thread Sander Vanheule
Not all devices using the gpio0/sys-led pin as a GPIO, configure the
pinmux. Add the necessary pinctrl properties to these devices to ensure
the pin is set up for use as GPIO.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
Tested-by: Bjørn Mork 
---
 target/linux/realtek/dts-5.10/rtl8380_netgear_gigabit.dtsi | 3 +++
 target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi | 3 +++
 target/linux/realtek/dts-5.10/rtl8382_inaba_aml2-17gp.dts  | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/target/linux/realtek/dts-5.10/rtl8380_netgear_gigabit.dtsi 
b/target/linux/realtek/dts-5.10/rtl8380_netgear_gigabit.dtsi
index 72956359d18b..d91403fd2092 100644
--- a/target/linux/realtek/dts-5.10/rtl8380_netgear_gigabit.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl8380_netgear_gigabit.dtsi
@@ -14,6 +14,9 @@
};
 
keys {
+   pinctrl-names = "default";
+   pinctrl-0 = <_disable_sys_led>;
+
compatible = "gpio-keys";
 
mode {
diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi 
b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi
index 312a36c1a844..219814eb4a58 100644
--- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi
@@ -19,6 +19,9 @@
};
 
leds {
+   pinctrl-names = "default";
+   pinctrl-0 = <_disable_sys_led>;
+
compatible = "gpio-leds";
 
led_power: power {
diff --git a/target/linux/realtek/dts-5.10/rtl8382_inaba_aml2-17gp.dts 
b/target/linux/realtek/dts-5.10/rtl8382_inaba_aml2-17gp.dts
index 30960afff4d9..48081414941f 100644
--- a/target/linux/realtek/dts-5.10/rtl8382_inaba_aml2-17gp.dts
+++ b/target/linux/realtek/dts-5.10/rtl8382_inaba_aml2-17gp.dts
@@ -15,6 +15,9 @@
};
 
keys {
+   pinctrl-names = "default";
+   pinctrl-0 = <_disable_sys_led>;
+
compatible = "gpio-keys";
 
reset {
-- 
2.33.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 02/14] realtek: add sys-led disable pinctrl for rtl930x

2021-12-12 Thread Sander Vanheule
Like for RTL838x devices, add a pinctrl-single node to manage the
sys-led/gpio0 mux, and allow using the pin as GPIO.

Co-developed-by: INAGAKI Hiroshi 
Signed-off-by: INAGAKI Hiroshi 
Signed-off-by: Sander Vanheule 
---
 target/linux/realtek/dts-5.10/rtl930x.dtsi | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/target/linux/realtek/dts-5.10/rtl930x.dtsi 
b/target/linux/realtek/dts-5.10/rtl930x.dtsi
index a4c9757505f5..991e9e2f9a28 100644
--- a/target/linux/realtek/dts-5.10/rtl930x.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl930x.dtsi
@@ -194,6 +194,21 @@
};
};
 
+   pinmux_led: pinmux@1b00a000 {
+   compatible = "pinctrl-single";
+   reg = <0x1b00cc00 0x4>;
+
+   pinctrl-single,bit-per-mux;
+   pinctrl-single,register-width = <32>;
+   pinctrl-single,function-mask = <0x1>;
+   #pinctrl-cells = <2>;
+
+   /* enable GPIO 0 */
+   pinmux_disable_sys_led: disable_sys_led {
+   pinctrl-single,bits = <0x0 0x0 0x1000>;
+   };
+   };
+
ethernet0: ethernet@1b00a300 {
compatible = "realtek,rtl838x-eth";
reg = <0x1b00a300 0x100>;
-- 
2.33.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 00/14] Switch realtek target to upstream platform

2021-12-12 Thread Sander Vanheule
To reduce the maintenance burden of the realtek target in OpenWrt, Hiroshi and
I have worked on these patches to switch to the upstream platform. Some
downstream code is maintained, primarily for compatibility with the current
downstream-only networking drivers. There should be no functional changes for
users, although there will be some bootlog differences.

In addition to switching MIPS platforms, a patch is provided to enable SMP
support on RTL839x and RTL930x. This is required to support some out-of-tree
code that relies on SMP-support, but is not yet finished and will be added
later.

We hope these patches will make it easier for developers to write upstream-
compatible code on OpenWrt. Vice versa, it should also be easier with these
changes to backport drivers and patches that were upstreamed.

Changes in v2:
- Reorder patches to fix rtl93xx compatible before switching platforms
- Fix small formatting issue in realtek-board.c
- Add Bjørn's Tested-by to all relevant patches for RTL8380
- Add patch to enable SMP

Sander Vanheule (14):
  realtek: add missing gpio0 pinctrl properties
  realtek: add sys-led disable pinctrl for rtl930x
  realtek: remove hardcoded sys-led configurations
  realtek: use fixed-clock as CPU clock
  realtek: include io.h in mach-rtl83xx.h
  realtek: update mach-rtl83xx.h includes
  realtek: backport upstream platform
  realtek: add board file for MACH_REALTEK_RTL
  realtek: use correct compatible for rtl930x SoCs
  realtek: update driver platform dependencies
  realtek: switch target to upstream platform
  realtek: drop downstream platform
  realtek: modernise devicetree console setup
  realtek: initialise mulithreading on supported SoCs

 target/linux/realtek/config-5.10  |  36 +++-
 .../dts-5.10/rtl8380_netgear_gigabit.dtsi |   3 +
 .../dts-5.10/rtl8382_d-link_dgs-1210.dtsi |   3 +
 .../dts-5.10/rtl8382_inaba_aml2-17gp.dts  |   3 +
 target/linux/realtek/dts-5.10/rtl838x.dtsi|  16 +-
 target/linux/realtek/dts-5.10/rtl930x.dtsi|  26 ++-
 .../arch/mips/generic/board-realtek.c | 145 ++
 .../mips/include/asm/mach-rtl838x/ioremap.h   |  29 ---
 .../include/asm/mach-rtl838x/mach-rtl83xx.h   |   1 +
 .../files-5.10/arch/mips/rtl838x/Makefile |   5 -
 .../files-5.10/arch/mips/rtl838x/Platform |   5 -
 .../files-5.10/arch/mips/rtl838x/prom.c   | 183 --
 .../files-5.10/arch/mips/rtl838x/setup.c  | 116 ---
 .../drivers/clocksource/timer-rtl9300.c   |   2 +-
 .../drivers/net/dsa/rtl83xx/Kconfig   |   2 +-
 target/linux/realtek/image/Makefile   |   4 +-
 ...-add-realtek-rtl838x-rtl839x-support.patch |  45 +
 .../300-mips-add-rtl838x-platform.patch   |  39 
 .../301-gpio-add-rtl8231-driver.patch |   2 +-
 ...e-dependencies-for-gpio-realtek-otto.patch |  13 --
 ...pdate-dependency-for-spi-realtek-rtl.patch |  11 --
 ...pdate-dependency-for-irq-realtek-rtl.patch |   8 -
 .../306-gpio-add-legacy-rtl838x-driver.patch  |   2 +-
 ...date-dependency-for-realtek-otto-wdt.patch |  15 --
 ...-in-board-realtek-for-generic-kernel.patch |   9 +
 ...S-generic-enable-SMP-on-SMVP-systems.patch |  23 +++
 ...net-add-support-for-rtl838x-ethernet.patch |   2 +-
 .../patches-5.10/705-add-rtl-phy.patch|   2 +-
 28 files changed, 308 insertions(+), 442 deletions(-)
 create mode 100644 
target/linux/realtek/files-5.10/arch/mips/generic/board-realtek.c
 delete mode 100644 
target/linux/realtek/files-5.10/arch/mips/include/asm/mach-rtl838x/ioremap.h
 delete mode 100644 target/linux/realtek/files-5.10/arch/mips/rtl838x/Makefile
 delete mode 100644 target/linux/realtek/files-5.10/arch/mips/rtl838x/Platform
 delete mode 100644 target/linux/realtek/files-5.10/arch/mips/rtl838x/prom.c
 delete mode 100644 target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c
 create mode 100644 
target/linux/realtek/patches-5.10/009-5.12-MIPS-add-realtek-rtl838x-rtl839x-support.patch
 delete mode 100644 
target/linux/realtek/patches-5.10/300-mips-add-rtl838x-platform.patch
 delete mode 100644 
target/linux/realtek/patches-5.10/303-gpio-update-dependencies-for-gpio-realtek-otto.patch
 delete mode 100644 
target/linux/realtek/patches-5.10/304-spi-update-dependency-for-spi-realtek-rtl.patch
 delete mode 100644 
target/linux/realtek/patches-5.10/305-irqchip-update-dependency-for-irq-realtek-rtl.patch
 delete mode 100644 
target/linux/realtek/patches-5.10/307-wdt-update-dependency-for-realtek-otto-wdt.patch
 create mode 100644 
target/linux/realtek/patches-5.10/309-mips-built-in-board-realtek-for-generic-kernel.patch
 create mode 100644 
target/linux/realtek/patches-5.10/310-MIPS-generic-enable-SMP-on-SMVP-systems.patch

-- 
2.33.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 00/13] Switch realtek target to upstream platform

2021-12-12 Thread Sander Vanheule
Hi Sebastian,

On Sun, 2021-12-12 at 12:38 +0100, Sebastian Gottschall wrote:
> 
> > I have not experienced a single lock-up when booting with this patch, but I 
> > also
> > didn't
> > stress-test the machine or even used the switch part. Do you guys have more 
> > details on
> > why
> > it locks up, or how exactly these lock-ups can be resolved?
> so far we found out it was related to the ethernet driver. but this is 
> all part of the work we spended into it
> the last months and recently again since i'm back on this projects

If it's most likely caused by the ethernet driver, then I don't think 
complaining about
vsmp_smp_ops not being sufficient is appropriate here. We didn't touch the 
ethernet driver
with this patch series, so any of your changes there should still apply.

> > > if you do performance tests
> > > in addition the mainline still uses 4kc as cpu architecture, which is
> > > simply wrong for anything else but 838x
> > Wrong or suboptimal? I don't currently experience any obvious issues, using 
> > the same
> > toolchain for 8380, 8390 and 9300.
> below suboptimal. i mean it decreases performance in a significant 
> amount and fixing this issue is more than just easy

If you know since a while that this will be necessary and is an easy win, then 
please
submit a patch upstream to break up the target into the SoC-families. I'd 
actually love to
see things like this being submitted by you or Birger!

Generally speaking, I don't see a reason to wait with submitting patches until 
other parts
have stopped breaking. At least then we can all work from a common code base. I 
obviously
prefer submitting upstream where possible, but the networking part will be 
mostly (or
only) OpenWrt for a while still. People could then enjoy a continous stream of
improvements in the snapshot builds, and might be encouraged to try writing 
some code
themselves.

Best,
Sander



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[RFC] Stop providing binary package updates for release builds?

2021-12-12 Thread Jo-Philipp Wich
Hi,

since the release of LEDE 17.01.0, OpenWrt started offering updated binary
packages for released versions, means the HEAD of a released stable branch is
continuously getting rebuilt and the resulting binaries are uploaded to the
release repositories. Users will see those updated packages as "upgrades" and
are able to install them via opkg or LuCI.

There were several motivations to work towards providing these "continuous"
updates:

 - Ability to quickly push security or bug fixes without requiring users to
   wait for the next release and forcing them to fully reflash their
   deployments (also having to accept unwanted Kernel updates, potential
   regressions or potential flash failures)

 - Ability to de-duplicate required disk space, no need to keep a ~90%
   identical copy of the entire package universe for each minor release

 - Ability for package maintainers to push important/useful updates to
   stable releases without needing to wait for the next release cycle to
   have these changes available for a wider, non-snapshot using audience

However after over four years of providing these updates it appears that the
overall usefulness of this approach to the user base is not as certain:

 - The wiki actively discourages users from upgrading packages [1]

 - The overall sentiment in the forum is to instruct users to not/never
   upgrade packages [2] but to always upgrade to the next release, build from
   source [3] or use snapshots/IB

 - Many contributors are not aware of the additional responsibilities and
   potential pitfalls when backporting features, fixes or updates to stable
   branches [4]

 - Many developers or active community members do not appear to care about
   binary releases at all, only using the full buildroot to build images
   completely from source

 - In my view, an overall sentiment among most contributors that OpenWrt is a
   source based distribution, with precompiled images and binary package
   repositories being an after thought at best

Given these facts I would like to propose rolling back continuous package
build changes and revert mostly to the pre-LEDE 17.01.0 approach for future
release processes. In particular this entails:

 - Stop providing binary package updates; build release images and associated
   repositories once only, archive the artifacts and redelegate build
   resources back to master snapshots

   - Maintainers must ensure that packages/device images that should be part
 of a release build properly during the RC phase, whatever is broken will
 not be part of the repositories but might/might not reappear with the
 next maintenance release

 - Stop dividing the build process into distinct image and package phases,
   simply build the entire release once from a complete source tree

 - Stop sharing package repositories among different targets

 - Discontinue release branch HEAD builders and only do branch build testing
   during the pre- and RC build phases

Once implemented, this would allow us to:

 - Massively reduce the complexity of the build logic, it will basically
   become a "make world" with no need to track changes, iterative cleanups
   etc.

 - Reduce the amount of needed compute resources, we only need to build master
   snapshots and occasionally ramp up resources to build release images

 - Focus on source code development and master branch features without having
   to worry about binary package peculiarities such as ABI- and feature
   compatibility, versioning or dependency handling

 - Simplify release branch maintenance, build images every few months and in
   case of security issues in vital components like openssl or dropbear we
   could instruct users to wait for the next maintenance release or switch to
   snapshots

 - Optimize packages. Ship different package feature selections for each
   target, e.g. small ones for restricted targets, big fully featured packages
   with hand written assembly optimizations for mvebu. Full coreutils, glibc
   for x86 builds

Potential alternatives for users:

 - Attended sysupgrade instead of releases and package updates to reflash
   master snapshots with updated packages from time to time

 - Build from source

 - Use another downstream distribution


In my opinion, there is a fundamental decision to be made on whether we would
like to pursue the goal of (also) being a binary distribution for
routers/embedded appliances or if we simply concentrate on the build-from-
source aspect and leave the binary package business to forks or other
downstream distributions projects.

Solutions like Debian/Alpine chroots or entware maybe could also be an
alternative for OpenWrt's own binary package ecosystem.

Given that maintaining binary package distributions is hard and boring work we
need to decide whether we want to fully and properly pursue this goal or
rather not at all and focus on always porting master to the latest minor
Kernel version and finding the optimal compilation flags for 

Re: P2812HNUF3

2021-12-12 Thread Petr Štetiar
Ivar Orskaug  [2021-12-12 13:32:34]:

Hi,

> Thanks for all the good feedback.

can you please read https://openwrt.org/submitting-patches and adjust your
patch accordingly? Thanks.

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 19.07] wolfssl: update to 4.8.1-stable

2021-12-12 Thread Petr Štetiar
Eneas U de Queiroz  [2021-09-14 15:07:28]:

Hi Eneas,

> Changes from 4.7.0:
>   Fix one high (OCSP verification issue) and two low vulnerabilities
>   Improve compatibility layer
>   Other improvements and fixes

I'm wondering if we can do such an upgrade as the binary compatibility report 
for
wolfSSL 4.7.0 vs 4.8.0 looks quite scary to me. Would it be possible to just
backport those patches which fixes those security related issues?

1. 
https://abi-laboratory.pro/index.php?view=compat_report=wolfssl=4.7.0=4.8.0=948e4=abi#Removed

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] cherry-pick Xiaomi AC2350 for 21.02

2021-12-12 Thread Petr Štetiar
Simon Iremonger  [2021-11-30 21:48:43]:

Hi,

> no apparent issues!.

thank you for testing, pushed 
https://git.openwrt.org/06547e0a58daf768ff9776339cd31231dcd5c0ea

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: P2812HNUF3

2021-12-12 Thread Ivar Orskaug
Thanks for all the good feedback.
As pointed out, it's not possible to migrate from version 19 to 21
after applying this patch.
A backup/restore of config is required.
Some additional info for upgrading is also in the commit message
(updating uboot parameters).
The same information should be updated in the wiki page for the device also.

Ivar
diff --git 
a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts
b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts
index 376cdaeb61..a24dfcd5f9 100644
--- 
a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts
+++ 
b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts
@@ -55,11 +55,11 @@

partition@0 {
label = "kernel";
-   reg = <0x0 0x20>;
+   reg = <0x0 0x50>;
};
-   partition@20 {
+   partition@50 {
label = "ubi";
-   reg = <0x20 0x7e0>;
+   reg = <0x50 0x7b0>;
};
};
 };
diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk
index 909479587c..1686141438 100644
--- a/target/linux/lantiq/image/vr9.mk
+++ b/target/linux/lantiq/image/vr9.mk
@@ -282,8 +282,9 @@ define Device/zyxel_p-2812hnu-f3
   DEVICE_VARIANT := F3
   BOARD_NAME := P2812HNUF3
   DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic-wolfssl kmod-usb-dwc2
-  KERNEL_SIZE := 2048k
+  KERNEL_SIZE := 5120k
   SUPPORTED_DEVICES += P2812HNUF3
-  DEFAULT := n
+  DEVICE_COMPAT_VERSION := 1.1
+  DEVICE_COMPAT_MESSAGE := Flash layout changed
 endef
 TARGET_DEVICES += zyxel_p-2812hnu-f3
Repartition flash to accommodate for a bigger kernel image.
The new kernel image (.bin) must be booted from tftp before running sysupgrade.
Running configuration must be backed up and restored.
After upgrading, update uboot parameters to load the entire kernel partition:

setenv nboot ' nand read 0x8080 0x0 0x50; bootm 0x8080'
setenv bootcmd 'run nboot'
saveenv


tor. 9. des. 2021 kl. 22:14 skrev Ivar Orskaug :
>
> Hi,
> P2812HNUF3 is currently broken in main because of the kernel 5.10
> increase in size. This patch increases the kernel flash partition to
> 3072k, aligning with P2812HNUF1. Would it be possible to apply it to
> main?
> Regards Ivar
>
> diff --git 
> a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts
> b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts
> index 376cdaeb61..86520247d0 100644
> --- 
> a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts
> +++ 
> b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts
> @@ -55,11 +55,11 @@
>
> partition@0 {
> label = "kernel";
> -   reg = <0x0 0x20>;
> +   reg = <0x0 0x30>;
> };
> -   partition@20 {
> +   partition@30 {
> label = "ubi";
> -   reg = <0x20 0x7e0>;
> +   reg = <0x30 0x7d0>;
> };
> };
>  };
> diff --git a/target/linux/lantiq/image/vr9.mk 
> b/target/linux/lantiq/image/vr9.mk
> index 909479587c..9e9818bdbf 100644
> --- a/target/linux/lantiq/image/vr9.mk
> +++ b/target/linux/lantiq/image/vr9.mk
> @@ -282,7 +282,7 @@ define Device/zyxel_p-2812hnu-f3
>DEVICE_VARIANT := F3
>BOARD_NAME := P2812HNUF3
>DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic-wolfssl kmod-usb-dwc2
> -  KERNEL_SIZE := 2048k
> +  KERNEL_SIZE := 3072k
>SUPPORTED_DEVICES += P2812HNUF3
>DEFAULT := n
>  endef

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 00/13] Switch realtek target to upstream platform

2021-12-12 Thread Sebastian Gottschall




I have not experienced a single lock-up when booting with this patch, but I 
also didn't
stress-test the machine or even used the switch part. Do you guys have more 
details on why
it locks up, or how exactly these lock-ups can be resolved?
so far we found out it was related to the ethernet driver. but this is 
all part of the work we spended into it

the last months and recently again since i'm back on this projects

if you do performance tests
in addition the mainline still uses 4kc as cpu architecture, which is
simply wrong for anything else but 838x

Wrong or suboptimal? I don't currently experience any obvious issues, using the 
same
toolchain for 8380, 8390 and 9300.
below suboptimal. i mean it decreases performance in a significant 
amount and fixing this issue is more than just easy


Best,
Sander



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 00/13] Switch realtek target to upstream platform

2021-12-12 Thread Sander Vanheule
Hi Sebastian,

On Sun, 2021-12-12 at 00:40 +0100, Sebastian Gottschall wrote:
> 
> > I've provided a patch below that enables VPE support for RTL839x. Since 
> > RTL930x uses
> > the
> > same CPU architecture, I expect it to also bring up both threads there. 
> > Like you note
> > RTL930x requires a specific clocksource driver, but it should be possible 
> > to run your
> > current code for that on top of this (ammended) series.
> > 
> > I will respin the series with some small changes, and add that VSMP-support 
> > patch.
> > Please
> > let us know if you can get your reworked IRQ driver and timer code working 
> > on top of
> > the
> > v2. That way, you wouldn't have to take a step back in your development, 
> > and we could
> > continue providing support through upstream.
> just enabling vsmp in that way is not enough. it looks simple and this 
> is how we started too but  you will quickly find out that it will cause 
> lockups and hangs.

I have not experienced a single lock-up when booting with this patch, but I 
also didn't
stress-test the machine or even used the switch part. Do you guys have more 
details on why
it locks up, or how exactly these lock-ups can be resolved?

> if you do performance tests
> in addition the mainline still uses 4kc as cpu architecture, which is 
> simply wrong for anything else but 838x

Wrong or suboptimal? I don't currently experience any obvious issues, using the 
same
toolchain for 8380, 8390 and 9300.

Best,
Sander

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel