Compare commits

...

10 Commits

Author SHA1 Message Date
4ae1326660
Update README.md 2026-06-17 13:15:45 -04:00
de1bb47bf1
Update README.md 2026-06-17 13:14:59 -04:00
2c0a4fac8c
DTS update
upload of canonical single source of truth DTS extracted from running device
2026-06-17 13:13:18 -04:00
18c2f8f478
Update README.md 2026-06-16 02:01:46 -04:00
45ba1e4955
Update README.md 2026-06-15 11:46:35 -04:00
76aa7426c4
Update README.md
updated wifi identifiers
2026-06-14 19:05:57 -04:00
3f22c77def
Update README.md 2026-06-13 13:00:14 -04:00
48cfbf5716
Update README.md 2026-06-13 12:58:34 -04:00
d37cd7fe5c
Update README.md 2026-06-13 12:57:05 -04:00
4e7014c3db
Update README.md 2026-06-13 12:55:52 -04:00
2 changed files with 1229 additions and 57 deletions

187
README.md
View File

@ -25,8 +25,9 @@ I am doing so for a few reasons:
**NOTE:** The archiver will run once weekly on Sunday at 0000 - it only downloads corrupted or missing files - based on SHA1 hashes. As the script is rate limiting itself to prevent damage to their infrastructure, it may take over night to complete. Should TRENDnet have issue with this and outright block my download attempts, that would be a GPL violation. Rate limits I will accept to a degree, I understand the circumstances, hence why the script already rate limits itself.
### REPOSITORY FILES:
- [stock-fixed.dts](https://github.com/catspeed-cc/tew-829dru/blob/master/stock-fixed.dts) (current running DTS from router)
- [trendnet_tew-829dru.dts](https://github.com/catspeed-cc/tew-829dru/blob/master/trendnet_tew-829dru.dts) (tew-829dru DTS from router)
- [spi-extracted.dts](https://github.com/catspeed-cc/tew-829dru/blob/master/spi-extracted.dts) (current running DTS from router SPI NOR - canonical single source of truth)
- [stock-fixed.dts](https://github.com/catspeed-cc/tew-829dru/blob/master/stock-fixed.dts) (tew-829dru DTS from firmware image extraction - copy?)
- [trendnet_tew-829dru.dts](https://github.com/catspeed-cc/tew-829dru/blob/master/trendnet_tew-829dru.dts) (tew-829dru DTS from firmware image extraction)
### You may follow my port of TEW-829DRU to OpenWRT by [visiting the repository](https://github.com/catspeed-cc/openwrt), [the DTS file](https://github.com/catspeed-cc/openwrt/blob/tew-829dru-25.12/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4019-tew-829dru.dts) and [this support ticket](https://github.com/catspeed-cc/openwrt/issues/1)
@ -34,7 +35,7 @@ I am doing so for a few reasons:
## ORIGINAL SOURCE - UP TO DATE GOLD SHEET:
```
######################
######################
## GOLD SHEET ##
######################
@ -56,7 +57,7 @@ Target: ipq40xx
Subtarget: generic
Package architecture: arm_cortex-a7_neon-vfpv4
Bootloader: U-Boot
CPU: Qualcomm Atheros IPQ4019
CPU: Qualcomm Atheros IPQ4019 SoC
CPU Cores: 4
CPU MHz: 717
Flash MB: 8, 128 (Macronix MX25L6433F SPI NOR / Micron MT29F1G08ABADA NAND)
@ -68,11 +69,11 @@ Ethernet 5Gbit ports: -
Ethernet 10Gbit ports: -
SFP ports: -
SFP+ ports: -
Switch: Qualcomm Atheros QCA8337, Qualcomm Atheros QCA8075
Switch: Qualcomm Atheros QCA8075, Qualcomm Atheros QCA8337
VLAN: Yes
Modem: -
Comments network ports: 2 WAN + 8 LAN Port Switch
WLAN Hardware: Qualcomm Atheros IPQ4019, Qualcomm Atheros QCA9984
WLAN Hardware: Qualcomm Atheros QCA4019, Qualcomm Atheros QCA9984
WLAN 2.4GHz: b/g/n
WLAN 5.0GHz: a/n/ac
WLAN driver: ath10k
@ -102,7 +103,6 @@ Wireguard performance: ?
###############################
FCC ID: XU8TEW829DRU
Board Manufacturer: U-MEDIA
DevKit: Qualcomm IPQ40xx/AP-DK04.1-C1 (corrected)
@ -112,6 +112,11 @@ DTS Closest Sibling: qcom-ipq4019-ap.dk04.1-c1.dts (corrected)
DTSI File: qcom-ipq4019-ap.dk04.1.dtsi
Inherits: qcom-ipq4019.dtsi
QCA9984 firmware identifier: bus=pci,bmi-chip-id=0,bmi-board-id=1
QCA4019 firmware identifier: bus=ahb,bmi-chip-id=0,bmi-board-id=28,variant=TEW-829DRU-2G
bus=ahb,bmi-chip-id=0,bmi-board-id=30,variant=TEW-829DRU-5G
###########
## NOTES ##
@ -119,21 +124,21 @@ Inherits: qcom-ipq4019.dtsi
- This is a quad core, 717 Mhz, 256MB RAM IPQ4019 device
- This device is based off the Qualcomm ap.dk04.1-c1 SDK development board
- This is a Dual Switch Architecture device (QCA8337/QCA8075)
- This is a Dual Switch / Dual MAC Architecture device (QCA8337/QCA8075)
- This device has a redundant setup with two flash chips:
- Macronix MX25L6433F SPI NOR - for the redundant/dual bootloader setup
- Macronix MX25L6433F SPI NOR - for the single bootloader setup
- Micron MT29F1G08ABADA NAND) - for the redundant/dual root filesystem
- This device is a tri-band wireless device (QC4019, QCA9984)
- This device firmware is based off OpenWRT 15.05 Chaos Calmer (licensed under GPLv2)
- This device has a redundant/dual bootloader setup
- This device has a single bootloader setup
- This device has a redundant/dual kernel/rootfs setup
- This device has a rootfs_data overlay
- Ideally we would preserve the redundant bootloader/rootfs functionality
- Ideally we would preserve the redundant rootfs functionality
################
@ -147,10 +152,12 @@ Pin 1: If facing router, with ports & lights in front of you, pin 1 is on the
Pin FUNCTION
1 VCC (3.3v constant)
2 GND (continuity to DC negative)
3 TX (3.3v high, fluctuating during transmission, dead when unpowered)
4 RX (3.3v high, fluctuating during transmission, dead when unpowered)
1 VCC (3.3v constant)
2 GND (continuity to DC negative)
3 TX (3.3v high, fluctuating during transmission while device is powered, dead when device is unpowered)
4 RX (3.3v high, fluctuating during transmission, most likely dead unless UART device is connected)
Note: this has been verified with a multimeter, it is the most common used pinout layout
#################
@ -162,9 +169,11 @@ Note: GPIO's on this device are offset by +512 - logical GPIO1 is actually GPIO5
Note: Working on obtaining LED & switch/phy reset GPIO's
Note: TRENDnet does not provide GPIO mappings - failing to comply w/ GPL & provide proper CCS
GPIO FUNCTION
48 usb-power-enable -> drive HIGH to enable USB power (finally found it via probing!)
LOGICAL GPIO ACTUAL GPIO FUNCTION
6 518 mdio0 (determined following hardware lineage)
7 519 mdc (determined following hardware lineage)
48 560 usb-power-enable -> drive HIGH to enable USB power (finally found it via probing!)
#############
@ -405,6 +414,22 @@ DECIMAL HEXADECIMAL DESCRIPTION
root@AIKS0:~/work/flash-dump#
######################################
## Micron MT29F1G08ABADA NAND 128MB ##
## PARTITION TABLE DUMP ##
######################################
group_pairs Layout blocks found at PEBs: [[0, 1], [384, 385], [801, 921]]
description Create Volume: b'kernel', ID: 0, Block Cnt: 29
description Create Volume: b'ubi_rootfs', ID: 1, Block Cnt: 162
description Created Image: 1119963279, Volume Cnt: 2
description Create Volume: b'kernel', ID: 0, Block Cnt: 30
description Create Volume: b'ubi_rootfs', ID: 1, Block Cnt: 162
description Created Image: 490764789, Volume Cnt: 2
description Create Volume: b'rootfs_data', ID: 0, Block Cnt: 39
description Created Image: 864603106, Volume Cnt: 1
# FROM GPL SOURCE:
root@AIKS0:~/work/GPL_SOURCE/GPL_TEW-829DRU_v1/IPQ4019.ILQ.1.2# cat common/build/ipq/nand-flash.conf
@ -488,22 +513,6 @@ filename = openwrt-ipq806x-ipq40xx-ubi-root.img
root@AIKS0:~/work/GPL_SOURCE/GPL_TEW-829DRU_v1/IPQ4019.ILQ.1.2#
######################################
## Micron MT29F1G08ABADA NAND 128MB ##
## PARTITION TABLE DUMP ##
######################################
group_pairs Layout blocks found at PEBs: [[0, 1], [384, 385], [801, 921]]
description Create Volume: b'kernel', ID: 0, Block Cnt: 29
description Create Volume: b'ubi_rootfs', ID: 1, Block Cnt: 162
description Created Image: 1119963279, Volume Cnt: 2
description Create Volume: b'kernel', ID: 0, Block Cnt: 30
description Create Volume: b'ubi_rootfs', ID: 1, Block Cnt: 162
description Created Image: 490764789, Volume Cnt: 2
description Create Volume: b'rootfs_data', ID: 0, Block Cnt: 39
description Created Image: 864603106, Volume Cnt: 1
###################
## DMESG on BOOT ##
###################
@ -613,33 +622,33 @@ No size specified -> Using max size (3809280)
## Booting kernel from FIT Image at 84000000 ...
Using 'config@ap.dk07.1-c1' configuration
Trying 'kernel@1' kernel subimage
Description: ARM OpenWrt Linux-3.14.43
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x840000e4
Data Size: 3361261 Bytes = 3.2 MiB
Architecture: ARM
OS: Linux
Load Address: 0x80208000
Entry Point: 0x80208000
Hash algo: crc32
Hash value: 455baf05
Hash algo: sha1
Hash value: 815ee16957306915e27edd00aa3f66ef979b805b
Description: ARM OpenWrt Linux-3.14.43
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x840000e4
Data Size: 3361261 Bytes = 3.2 MiB
Architecture: ARM
OS: Linux
Load Address: 0x80208000
Entry Point: 0x80208000
Hash algo: crc32
Hash value: 455baf05
Hash algo: sha1
Hash value: 815ee16957306915e27edd00aa3f66ef979b805b
Verifying Hash Integrity ... crc32+ sha1+ OK
## Flattened Device Tree from FIT Image at 84000000
Using 'config@ap.dk07.1-c1' configuration
Trying 'fdt@ap.dk07.1-c1' FDT blob subimage
Description: ARM OpenWrt qcom-ipq40xx-ap.dkxx device tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x8436c2f8
Data Size: 37922 Bytes = 37 KiB
Architecture: ARM
Hash algo: crc32
Hash value: b448c7b5
Hash algo: sha1
Hash value: c2130265a9512115b7a12df0207d3b0f268068f2
Description: ARM OpenWrt qcom-ipq40xx-ap.dkxx device tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x8436c2f8
Data Size: 37922 Bytes = 37 KiB
Architecture: ARM
Hash algo: crc32
Hash value: b448c7b5
Hash algo: sha1
Hash value: c2130265a9512115b7a12df0207d3b0f268068f2
Verifying Hash Integrity ... crc32+ sha1+ OK
Booting using the fdt blob at 0x8436c2f8
Uncompressing Kernel Image ... OK
@ -650,4 +659,68 @@ eth2 MAC Address from ART: 3c:8c:f8:f3:96:b3
Using machid 0x8010006 from environment
Starting kernel ...
#####################
## CALDATA PACKING ##
#####################
These are the board-2.json files I used (named differently)
This is only required for developers porting devices, the average user will not have to do any of this process.
This is mainly documentation for myself.
What is important here is the overall structure, and the `names` field. Copy it exactly.
The filenames are irrelevant. Yours may be different. Just rename or replace them.
qca4019-artcaldata.json
###
[
{
"names": ["bus=ahb,bmi-chip-id=0,bmi-board-id=28,variant=TEW-829DRU-2G"],
"data": "cal-ahb-0-fresh.bin"
},
{
"names": ["bus=ahb,bmi-chip-id=0,bmi-board-id=30,variant=TEW-829DRU-5G"],
"data": "cal-ahb-1-fresh.bin"
}
]
###
qca9984-artcaldata.json
###
[
{
"names": [
"bus=pci,bmi-chip-id=0,bmi-board-id=1"
],
"data": "cal-pci-fresh.bin"
}
]
###
The commands to run to build the bin file:
###
# CREATE BOARD-2.BIN (QCA9984)
qca-swiss-army-knife/tools/scripts/ath10k/ath10k-bdencoder -c qca9984-artcaldata.json -o qca9984-artcaldata.bin
qca-swiss-army-knife/tools/scripts/ath10k/ath10k-bdencoder -c qca9984-boardData.json -o qca9984-boardData.bin
# EXTRACT BOARD-2.BIN - INSIDE tmp/ (QCA9984)
qca-swiss-army-knife/tools/scripts/ath10k/ath10k-bdencoder -e ../../qca9984-artcaldata.bin
qca-swiss-army-knife/tools/scripts/ath10k/ath10k-bdencoder -e ../../qca9984-boardData.bin
# CREATE BOARD-2.BINS (QCA4019)
qca-swiss-army-knife/tools/scripts/ath10k/ath10k-bdencoder -c qca4019-artcaldata.json -o qca4019-artcaldata.bin
tools/qca-swiss-army-knife/tools/scripts/ath10k/ath10k-bdencoder -c qca4019-boardData.json -o qca4019-boardData.bin
# EXTRACT BOARD-2.BIN - INSIDE tmp/ (QCA4019)
qca-swiss-army-knife/tools/scripts/ath10k/ath10k-bdencoder -e ../qca4019-artcaldata.bin
qca-swiss-army-knife/tools/scripts/ath10k/ath10k-bdencoder -e ../qca4019-boardData.bin
###
You can make a tmp/ directory, enter it, and run the extraction command in order to extract it back into a board-2.json and the original bin file(s)
Should the JSON look correct (has both entries if there are two) and there are all bin files present (with different names is ok) then you completed a "round trip".
The files are ready for insertion into your dev environment and to be built into the image.
```

1099
spi-extracted.dts Normal file

File diff suppressed because it is too large Load Diff