Repository navigation
Conversation
|
Wrong title. |
Can you be a little bit more precise on what you need to be changed? Is it the Title of the PR? If yes, I would require some more hint on what to change in the title.... |
|
Your commits should have a title starting with "ramips: " |
|
Alright, got it. What would be your suggestion on how to fix that? Fix it with a further commit (i need to update the leds in the dts) or revert this PR and add a new one? |
title: Are you supporting LTE3302 or LTE3301? |
OMG, my bad. I am targeting the LTE3302. Sorry for the typo... |
|
I don't want to overcomplicate things, but since this is my first PR, can somebody please advise if it makes sense to keep this PR open and correct the issues in this PR or close it in favor for a new PR with all the issues corrected? |
|
Keep it open and fix PR. |
0f5d487 to
195fe3a
Compare
ca414a2 to
9ce65af
Compare
|
@perrin-1: Good job! |
|
The line |
fixed in f6ee014 |
|
Please use a name and not just for initials as author and in the SoB line. |
e937640 to
e9f5508
Compare
I've changed my git username. hope this is now ok... |
DragonBluep
left a comment
There was a problem hiding this comment.
Please use full name for SoB. Same request as upstream.
https://lore.kernel.org/linux-usb/2025012501-pediatric-abide-b802@gregkh/T/#me93c52ed4b3276c995400c71b5ba49ac82d2ece1
I guess you need to re-send the patch set.
Thanks for pointing me towards this PR. I did not notice that one before I created my own. However I think the old PR is outdated and not fully functional, especially regarding the issues with the modem which are solved in this PR. Also the other PR only contains a single variant and not both like this one. |
| macaddr_config: macaddr@e2cd { | ||
| compatible = "mac-base"; | ||
| reg = <0xc2cd 0x6>; |
There was a problem hiding this comment.
(on my eeprom dump the mac address is at e2cc)
There was a problem hiding this comment.
is that a typo? (e2cd, c2cd)
c2cd is a typo - needs to be e2cd in my device.
(on my eeprom dump the mac address is at e2cc)
that seems to be the same issue as the RF Chipset issue. Your device seems to have a different eeprom contents. We'll have to figure out if that is due to the device being somewhat different (branding?) or if there are multiple versions of the eeprom data. In the latter case, we'd have to keep using the userspace programs to set the mac address and rf frontends, which is not nice...
| #size-cells = <1>; | ||
|
|
||
| eeprom_config: eeprom@e07c { | ||
| reg = <0xe07c 0x200>; |
There was a problem hiding this comment.
0xe07c in my firmware is 0x02 0x20.
This results in Invalid RF chipset 0x2002 detected in dmesg.
The next byte is 0x76. So offset 0xe07d should match RF7620.
With that offset, I have wifi working.
The WiFi MAC is the MAC printed on the label + 1. (Ending in e2 instead of e1).
There was a problem hiding this comment.
oh, that is not good. So it seems that these eeprom contents are not stable.
What is the exact model and brand of your device?
There was a problem hiding this comment.
I have bought it straight from the shop like a regular customer a long long time ago. It was not some operator deal or operator branded device.
The label on the bottom does not specify any model name.
SN is S182Z05001456.
|
@perrin-1: Have you progressed on it? |
Sorry, did not make any further progress as the problem with the eeprom data seems to be not solvable for me. Did not have the time to further debug and did not continue working on this project. So if no one else can step in, we might have to close this pr. |
openwrt-ai
left a comment
There was a problem hiding this comment.
Most important item: the two kernel patches are filed under patches-6.6/, but ramips on main has moved to KERNEL_PATCHVER:=6.18 (only patches-6.18/ exists in-tree now), so they would not be applied — see the inline comment. The DTS also still ships with CRLF line endings despite an earlier resolved thread. Both inline. One nit on redundant variant variables.
The macaddr@e2cd node name vs reg = <0xc2cd> offset mismatch and the RF-chipset/MAC offset questions are already under active discussion in existing threads, so not re-flagged here.
Generated by Claude Code
| @@ -0,0 +1,172 @@ | |||
| // SPDX-License-Identifier: GPL-2.0-or-later | |||
| #include "mt7620n.dtsi" | |||
There was a problem hiding this comment.
All 172 lines of this DTS use CRLF (Windows) line endings. An earlier thread flagged this and was marked resolved, but the current head commit still has them on every line. In-tree DTS files are LF-only. Please convert to LF-only line endings (this also clears the trailing space after the semicolon on the openwrt,ih-magic = <IH_MAGIC_OKLI>; line at L119 and the trailing tabs on the blank line between the firmware and config partitions).
Generated by Claude Code
| $(Device/zyxel_lte3302) | ||
| DEVICE_DTS := mt7620n_zyxel_lte3302 | ||
| DEVICE_VENDOR := ZyXEL | ||
| DEVICE_MODEL := LTE3302-M432 |
There was a problem hiding this comment.
nit: zyxel_lte3302-dt already inherits DEVICE_VENDOR and DEVICE_MODEL from $(Device/zyxel_lte3302) and redefines them to identical values, so these two lines are redundant. Drop them and keep only the variant-specific overrides (DEVICE_DTS, DEVICE_VARIANT, DLINK_ROM_ID, SUPPORTED_DEVICES).
Generated by Claude Code
openwrt-ai
left a comment
There was a problem hiding this comment.
Fresh review of the single commit at e9f5508. The most important item: the two kernel patches are added under patches-6.6/, but ramips is on kernel 6.18 on current main, so they would never be applied and the LTE modem support would be missing from the build — see the inline comments for the move to patches-6.18/. A likely-real DTS offset bug (macaddr@e2cd vs reg = <0xc2cd ...>) and a couple of whitespace/wording nits are also flagged inline.
Generated by Claude Code
|
Take a look at my pr #25670. Perhaps jboot supports helps here, too? |
@ddimension That might acutally help. So you managed to flash stock uboot on the device thus, having the config as uboot vars instead of the jboot binary? |
e9f5508 to
76689ab
Compare
76689ab to
8528359
Compare
|
Rebased onto current main (kernel 6.18) and reworked the MAC / calibration data handling. Root cause of the different offsets: the JBOOT Changes (details in the updated PR description):
Tested on 6.18 (LTE3302-M432, Telekom variant): eth0 = label MAC, wlan = label MAC + 1, @kke: since your unit has the shifted layout, could you test the @ddimension: thanks for the pointer to #25670. I went for an NVMEM layout instead of replacing JBOOT, because the offsets are per unit, not per variant. Your M209/Q222 offsets ( |
dfa764d to
064dde7
Compare
064dde7 to
9606816
Compare
The ZyXEL LTE3302-M432 is a 4G indoor CPE with 2 external LTE antennas.
There are multiple variants of the device. This patch includes support
for the "Deutsche Telekom" as well as the "genuine ZyXEL" variant.
The device is fully functional including the LTE modem.
Specifications:
SoC: MediaTek MT7620N
RAM: 64 MB
Flash: 16 MB NOR (W25Q128FV)
WiFi: MediaTek MT7620N built-in wifi
Switch: 2 LAN ports (100M)
LTE: WNC M18QW modem
SIM: 1 micro-SIM slot
Buttons: Reset, WPS
LEDs: Multicolor LTE signal, multicolor internet, WiFi, LAN, Battery
The device is built as an indoor ethernet to LTE bridge or router with
WiFi.
UART Serial:
57600 8N1
Located on unpopulated 4 pin header J8:
[o] GND
[o] RX
[o] TX
[o] 3.3V Vcc
MAC assignment:
lan: label MAC (base, on the device bottom)
wlan: label MAC + 1
Installation:
Boot the bootloader into recovery by pushing and holding the reset
key while powering on the device.
Wait until the lights start flashing quickly.
Open http://192.168.123.254
Upload openwrt-ramips-mt7620-zyxel_lte3302-squashfs-factory.bin
If http doesn't work, it can be done with curl:
curl -F [email protected] http://192.168.123.254/upg
where XXXXX.bin is the name of the firmware file.
Wait for OpenWrt to boot and ssh to [email protected]
The variants differ by their ROM_ID, which can be checked in the
bootloader using the "info" command. The ROM_ID is needed for the
factory image so that the bootloader recognizes and accepts it.
Signed-off-by: Ulv Michel <[email protected]>
Devices booting the AMIT JBOOT loader (D-Link DWR/DIR, Zyxel LTE, ...) store their factory data in a config partition as a STAG/CSXF header followed by tightly packed, variable length records. Some records hold per-unit strings (keys, PINs) of varying length, so the absolute offsets of the MAC address and the wireless calibration data differ between units of the same model and cannot be described with a fixed-layout. Add an NVMEM layout driver which validates the STAG and CSXF headers and their checksums, walks the record list and exposes: - "mac-address" (record type 0x42, id 0x30), supports a MAC offset index - "eeprom" (record type 0xf5, id 0x00), the wireless calibration data The layout must be attached to a (sub)partition starting with the factory block STAG header. The driver registers at subsys_initcall level so that the cells exist before consumers which do not handle -EPROBE_DEFER (e.g. the ralink ethernet driver) probe. Signed-off-by: Ulv Michel <[email protected]>
The offsets of the MAC address and the calibration data inside the JBOOT config partition differ between units, so fixed nvmem cells only work on some devices. Use the new JBOOT config NVMEM layout on a "jboot-config" sub-partition at 0xe000 of the config partition instead: - ethernet: base MAC, label MAC - wmac: calibration data and base MAC + 1 This removes the need for jboot_config_read in userspace, so drop the LTE3302 cases from 02_network and 10_fix_wifi_mac and don't install jboot-tools. While at it, convert the DTS to LF line endings and remove trailing whitespace. Tested on kernel 6.18: ethernet and wlan get the label MAC and label MAC + 1, the RF chipset is detected from the calibration data and the LTE modem enumerates (qmi_wwan, option). Signed-off-by: Ulv Michel <[email protected]>
9606816 to
52441c4
Compare
ramips: add support for ZyXEL LTE3302
The ZyXEL LTE3302-M432 is a 4G indoor CPE with 2 external LTE antennas. There are multiple variants of the device. This PR includes support for the "Deutsche Telekom" as well as the "genuine ZyXEL" variant. The device is fully functional including the LTE modem.
Specifications
The device is built as an indoor ethernet to LTE bridge or router with WiFi.
UART Serial
57600 8N1, located on the unpopulated 4 pin header J8:
MAC assignment
The MAC address and the WiFi calibration data are read from the JBOOT
configpartition by a new NVMEM layout driver (see below), because their offsets differ between units.Installation
openwrt-ramips-mt7620-zyxel_lte3302-squashfs-factory.bin(or-dt-for the Telekom variant, see ROM_ID below).If http doesn't work, it can be done with curl:
curl -F [email protected] http://192.168.123.254/upgwhere XXXXX.bin is the name of the firmware file.
The variants differ by their ROM_ID, which can be checked in the bootloader using the
infocommand. The ROM_ID is needed for the factory image so that the bootloader recognizes and accepts it:zyxel_lte3302ZXL6E2431001zyxel_lte3302-dt(Deutsche Telekom)ZXL6E2431002Commits
ramips: add support for ZyXEL LTE3302: device support, including two kernel patches for the WNC M18QW modem (qmi_wwanDTR quirk,optionserial interfaces).generic: nvmem: add AMIT JBOOT config layout: new NVMEM layout driver (amit,jboot-config) for the JBOOT factory config block. JBOOT stores the factory data as variable length records, so the absolute offsets of MAC and calibration data differ between units of the same model. The driver validates the STAG/CSXF headers and checksums, walks the records and exposesmac-addressandeepromcells. Other JBOOT based boards can use it later instead ofjboot_config_readin userspace.ramips: lte3302: use JBOOT nvmem layout for MAC and eeprom: uses the new layout for the LTE3302.Tested
On an LTE3302-M432 (Telekom variant) with kernel 6.18: ethernet and wlan MACs (label MAC / +1), WiFi calibration (
RF chipset 7620 detected), LTE modem (qmi_wwan,option), sysupgrade.