Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronize official source code #134

Merged
merged 4 commits into from
Oct 10, 2024
Merged

Synchronize official source code #134

merged 4 commits into from
Oct 10, 2024

Conversation

openwrtdiy
Copy link
Owner

Thanks for your contribution to OpenWrt!

To help keep the codebase consistent and readable,
and to help people review your contribution,
we ask you to follow the rules you find in the wiki at this link
https://openwrt.org/submitting-patches

Please remove this message before posting the pull request.

Leo-PL and others added 4 commits October 7, 2024 10:36
...conversion.
Commit 2073601 ("kernel: backport nvmem v6.6 fixes and v6.7 changes")
has caused dthe device to no longer correctly read MAC address from its
onboard 24c64 EEPROM, because "at24" driver doesn't support legacy
nvmem-cell bindings [1] - and there was an explicit config option added
to mandate that behaviour in the following patch:

820-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch

But some of the devices, MR33 and MR74 included, weren't converted with
that as well.
Convert the definition to use proper fixed-layout binding to fix it.

The offending change was introduced between v23.05.0 and v23.05.1, and
found by bisection:
git bisect start
# status: waiting for both good and bad commits
# good: [bd4f415] OpenWrt v23.05.0: adjust config defaults
git bisect good bd4f415
# status: waiting for bad commit, 1 good commit known
# bad: [a58a866] OpenWrt v23.05.1: adjust config defaults
git bisect bad a58a866
# good: [3d0a78a] qualcommax: only build initramfs if CONFIG_TARGET_ROOTFS_INITRAMFS is set
git bisect good 3d0a78a
# bad: [21e5db9] build: add CycloneDX SBOM JSON support
git bisect bad 21e5db9
# good: [89184b1] mediatek: add build for MT7981 RFB
git bisect good 89184b1
# bad: [41f27bb] bcm53xx: add the latest fix version of brcm_nvram
git bisect bad 41f27bb
# good: [b649b0b] kernel: nvmem: fix "fixed-layout" & support "mac-base"
git bisect good b649b0b
# bad: [2073601] kernel: backport nvmem v6.6 fixes and v6.7 changes
git bisect bad 2073601
# good: [0669716] kernel: backport v6.6 nvmem changes
git bisect good 0669716
# first bad commit: [2073601] kernel: backport nvmem v6.6 fixes and v6.7 changes

Link: [1] openwrt#15393 (comment)
Fixes: 2073601 ("kernel: backport nvmem v6.6 fixes and v6.7 changes")
Fixes: openwrt#15393
Signed-off-by: Lech Perczak <[email protected]>
(cherry picked from commit ccbffad)
[replace mac-address-increment with #nvmem-cell-cells]
Signed-off-by: Lech Perczak <[email protected]>
Link: openwrt#16624
Signed-off-by: Robert Marko <[email protected]>
This commit adds support for netis N6 WiFi 6 router.

Specification
-------------
- SoC       : MediaTek MT7621AT, MIPS, 880 MHz
- RAM       : 256 MiB
- Flash     : NAND 128 MiB (ESMT PSU1GA30DT)
- WLAN      : MT7905DAN + MT7975DN
  - 2.4 GHz : b/g/n/ax, 574 Mbps, MIMO 2x2
  - 5 GHz   : a/n/ac/ax, 1201 Mbps, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x5 (1x WAN, 4x LAN)
- USB       : 1x 3.0
- UART      : 3.3V, 115200n8
- Buttons   : 1x Reset
              1x WPS
- LEDs      : 1x Power (green)
              1x System (green)
              1x WAN (green)
              1x WiFi 2.4 GHz (green), controlled by phy
              1x WiFi 5 GHz (green), controlled by phy
              1x WPS (green)
              1x USB (green)
              5x ethernet leds (green), controlled by switch
- Power     : 12 VDC, 1.5 A

Installation
------------
1. Update the router using stock firmware web interface and OpenWrt
   factory.bin image.

Recovery and return to stock
----------------------------
1. Assign your PC a static IP 192.168.1.2 and connect to the router using
   the ethernet cable;
2. Power off the router;
3. Press Reset button, power on the router and wait until ethernet led
   start blinking;
4. Release the button;
5. Open http://192.168.1.1/ (N6 System Recovery Mode) in your browser;
6. Upload OpenWrt factory.bin (or stock firmware *.bin) image and proceed
   with upgrade.

MAC addresses
-------------
+---------+-------------------+
|         | MAC example       |
+---------+-------------------+
| LAN     | dc:xx:xx:49:xx:04 |
| WAN     | dc:xx:xx:49:xx:05 |
| WLAN 2g | dc:xx:xx:19:xx:06 |
| WLAN 5g | dc:xx:xx:79:xx:06 |
+---------+-------------------+
The WLAN MAC prototype was found in 'Factory', 0x4
The LAN MAC was found in 'Factory', 0x7ef20
The WAN MAC was found in 'Factory', 0x7ef26

Known issue
-----------
2.4 GHz WLAN doesn't start with mt76 driver.

Probable reason:
   Original Netis N6 EEPROM contains wrong MT_EE_WIFI_CONF value (0xd2).
   Other routers with the same WLAN hardware (e.g., Routerich AX1800)
   have MT_EE_WIFI_CONF = 0x92.

Workaround (already included in this commit):
   Extract EEPROM to a file at the first time boot and change
   MT_EE_WIFI_CONF (offset 0x190) value from 0xd2 to 0x92. See
   /etc/hotplug.d/firmware/11-mt76-caldata for details.

Signed-off-by: Mikhail Zhilkin <[email protected]>
Link: openwrt#16322
(cherry picked from commit f368e2d)
[ Fix merging onflicts in mt7621.mk, 10_fix_wifi_mac, platform.sh ]
[ Change &ethphy4 -> &mdio in dts file ]
Signed-off-by: Mikhail Zhilkin <[email protected]>
Link: openwrt#16436
Signed-off-by: Hauke Mehrtens <[email protected]>
It can be used to workaround the booting stuck issue caused by the
u-boot LZMA decompression error.

The new kernel image structure:
+------+------------------+------------------+---------------+-----------------+
| name | tplink-v1 header | OKLI lzma-loader | uImage header | lzma kernel+dtb |
+------+------------------+------------------+---------------+-----------------+
| size |      0x200       |       0xe00      |     0x40      |     dynamic     |
+------+------------------+------------------+---------------+-----------------+

Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt#16473
Signed-off-by: Hauke Mehrtens <[email protected]>
(cherry picked from commit 08eecec)
Using OKLI image to fix the booting stuck issue.

Tested with u-boot extracted from TP-Link stock images
"RE200(EU)_V1_171206.zip" and "RE210(US_CA)_V1_171205.zip".

Fixes: openwrt#16296
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt#16473
Signed-off-by: Hauke Mehrtens <[email protected]>
(cherry picked from commit b62e6f5)
@openwrtdiy openwrtdiy merged commit 4346825 into diy-23.05 Oct 10, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants