These get dynamically set based on compiler version. Not relevant for
targets.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16770
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The cbr-reg DTS property uses a wrong name causing the RAC kernel
panic again on BCM6358 BCM6368 boards.
Use the correct cbr-reg name property.
Fixes: 7c9644a7b5 ("bmips: backport upstreamed RAC patches")
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16561
Signed-off-by: Robert Marko <robimarko@gmail.com>
TP-Link TD-W8968 v3 is an 300Mbps Wireless N USB ADSL2+ Modem Router based on
Broadcom BCM6318 SoC.
Hardware:
CPU: Broadcom BCM6318, 333 MHz, 1 core
Flash: 8MB
RAM: 64 MB
Ethernet: 4x 10/100 Mbps
Wireless: 802.11b/g/n, BCM43217
LEDs/Buttons: 10x / 3x
USB: 1x 2.0
Flash instructions:
* Assign static IP 192.168.1.100 to PC
* Unplug the power source
* Press the RESET button at the router, don't release it yet!
* Plug the power source. Wait for some seconds
* Release the RESET button
* Browse to http://192.168.1.1
* Upload the openwrt-bmips-bcm6318-tp-link_td-w8968-v3-squashfs-cfe.bin file
* Wait some minutes until the firmware upgrade finish.
Signed-off-by: Mathesh Velayudan <123v.mathesh@gmail.com>
The D-Link DSL-2750B rev B1 (AW4339U) is a wifi fast ethernet router, 2.4 GHz single band
with two external antennas.
This ports the device from old target bcm63xx/generic to bmips/bcm6328.
The hardware is the same of D-Link DSL-2740B rev F1 and DSL-2741B rev F1, plus a usb2 port.
Hardware:
- SoC: Broadcom BCM63281
- CPU: single core BMIPS4350 @ 320Mhz
- RAM: 64 MB (Nanya NT5TU32M16DG)
- Flash: 8 MB NOR (Macronix MX25L6406ENI-12G)
- Ethernet LAN: 4x 100Mbit (Broadcom BCM63281)
- Wifi 2.4 GHz: 802.11bgn (Atheros AR9287)
- USB: 1x 2.0
- Buttons: 3x
- LEDs: 10x
- UART: yes
Installation via CFE web UI:
1. Power off the router.
2. Press reset button near the power switch.
3. Keep it pressed while powering up during ~20+ seconds.
4. Browse to http://192.168.1.1 and upload the firmware.
5. Wait a few minutes for it to finish.
Signed-off-by: Samuele Longhi <agave@dracaena.it>
This adds the LED definitons for the XG6846 DSA port LEDs.
These are standard properties compatible with the existing
Marvell 88e6xxx DT bindings and fully standardized so this
is fine to add. They will be used by the in-flight Marvell
88e6xxx LEDs support patch.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[add empty lines between leds, remove default-state="off"]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
For some troublesome devices it is necessary to obtain direct access
to the SFP module EEPROM so define it in the device tree.
Suggested-by: Paul Donald <newtwen@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Some versions of the Inteno XG6846 has a USB port mounted.
For these machines the corresponing USB port nodes need to
be enabled.
Suggested-by: Henrik Ginstmark <henrik@ginstmark.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[reorder DTS alphabetically]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Refactor Inteno XG6846 device tree to be in line with other bmips devices.
Also expose USB LED automatically.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Switch to netif_napi_add_weight and add back weight value from <= v5.15.
Fixes: 8f6033e287 ("bmips: enet: add compatibility with kernel 6.1")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Specifications:
* SoC: BCM63168
* RAM: NT5CC64M16GP-DI, DDR3 128MiB
* NAND: W29N01HVSINA, 128MiB
* Ethernet: 4x1000M LAN, 1x 1000M WAN
* Serial interface: on board but not populated, 3.3V, 115200, 8N1
Notes:
* Use DSA for VLAN and switches
* Ethernet ports and USB works
* gpio-leds are not working
* WLAN, xDSL, and FXS are not going to work
Signed-off-by: Hang Zhou <929513338@qq.com>
[refactor, reorder, drop unneeded or not working stuff]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Remove unneeded default-state from led_power_green (led@8) to be in line with
other bmips devices.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Remove unneeded default-state from led_power_green (led@4) to be in line with
other bmips devices.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
It appears that the CFE boot loader found in the XG6846
cannot load kernels over a certain size, and the old
relocate hack is not working.
What to do? We can build a small U-Boot into the image,
make CFE boot that, place the kernel immediately after
U-Boot, and use U-Boot to boot the system instead.
The compiled u-boot.bin becomes around ~300KB and with
LZMA compression it will swiftly fit into 128KB, so
we use two 64KB erase blocks right after the CFE to
store an imagetag:ed U-Boot.
Reviewed-by: Paul Donald <newtwen+github@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This adds a device tree and build options for the XG6846
switch/router to the BMIPS target.
Hardware:
- SoC: Broadcom BCM6328
- CPU: BMIPS4350 V7.5
- RAM: 64 MB DDR
- NOR Flash: 16 MB parallel (CFE and OS)
- Ethernet LAN: 4x 1Gbit
- Ethernet WAN: 2x 1Gbit, fiber and TP
- Buttons: reset
- LEDs: 7 or 8, power and USB LEDs are GPIO-based, the
LAN LEDs are controlled by the Marvell DSA Switch.
- USB: on some versions
- UART: yes
The device ODM (original device manufacturer) is XAVi
http://www.xavi.com.tw/
It is possible to boot the initramfs version
openwrt-bmips-bcm6328-inteno_xg6846-initramfs.elf from
CFE by interrupting the boot on the UART console and downloading
it from a TFTP server e.g.:
CFE> r 192.168.1.2:openwrt-bmips-bcm6328-inteno_xg6846-initramfs.elf
Installation to target flash is not possible using CFE because
the image becomes too big for the CFE version found in these
devices. A separate U-Boot two-stage solution exists for
actually booting the device.
This device is called a "managed ethernet switch" by the vendor
and "media converter" or "fiber modem" by some of the ISPs
using it: the main purpose is to convert fiber connections to
ethernet, most devices just act as switches bridging the
fiber SFP to ethernet TP.
The device has a Marvell MV88E6352 DSA switch managed by
a BCM6328 BMIPS SoC.
This port makes it possible to use the XG6846 to grab an IP
number from the fiber connection and use all four LAN
connections out, turning it into a proper router.
This support is based mostly on the observations by the people on
the forum thread "Help with Inteno XG6846" where users NPeca75,
mrhaav, systemcrash and csom helped out to reverse engineer the
device. Then I made it work on the BMIPS target, figured out
the two-level switch hierarchy and settings.
Link: https://forum.openwrt.org/t/help-with-inteno-xg6846/68276/14
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Since we split the Inteno XG6846 "firmware" partition with the
uImage MTD splitter, we need to compile in support for this
splitting method into the BCM6328.
Reviewed-by: Paul Donald <newtwen+github@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Specifications:
- SoC: Broadcom BCM63168 dual 400MHz MIPS
- Flash: 16MB SPI NOR W25Q128WFG
- RAM: 128MB DDR3 W631GG6KB-15
- Ethernet: 1x 1000M, 3x 100M
- Wifi: BCM435F
- 1x USB 2.0 port
- 3x Button
- 12x LED
Flashing via serial
- Connect to the 3.3V TTL UART on the board
(J6 pinout Vcc Rx Tx Gnd) at 115200-8-N-1
- Press any key in the serial console when powering up the board to enter
the CFE prompt
- Configure an interface on your workstation to static IP 192.168.1.100
and connect it to the board
- Start a TFTP server with the firmware image
- On the CFE prompt, enter the command
"f 192.168.1.100:openwrt-bmips-bcm63268-smartrg_sr505n-squashfs-cfe.bin"
Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
[Remove unneeded LED labels]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
bmips has all the dt-bindings includes inside each SoC .dtsi files, so let's
move the new includes there instead of adding them to each board .dts files.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Initial conversion to new LED color/function format
and drop label format where possible. The same label
is composed at runtime.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The safe max frame size for this ethernet switch is 1532 bytes,
excluding the DSA TAG and extra VLAN header, so the maximum
outgoing frame is 1542 bytes.
The available overhead is needed when using the DSA switch with
a cascaded Marvell DSA switch, which is something that exist in
real products, in this case the Inteno XG6846.
Use defines at the top of the size for max MTU so it is clear how
we think about this, add comments.
We need to adjust the RX buffer size to fit the new max frame size,
which is 1542 when the DSA tag (6 bytes) and VLAN header (4 extra
bytes) is added.
We also drop this default MTU:
#define ENETSW_TAG_SIZE (6 + VLAN_HLEN)
ndev->mtu = ETH_DATA_LEN + ENETSW_TAG_SIZE;
in favor of just:
ndev->mtu = ETH_DATA_LEN;
I don't know why the default MTU is trying to second guess the
overhead required by DSA and VLAN but the framework will also
try to bump the MTU for e.g. DSA tags, and the VLAN overhead is
not supposed to be included in the MTU, so this is clearly not
right.
Before this patch (on the lan1 DSA port in this case):
dsa_slave_change_mtu: master->max_mtu = 9724, dev->max_mtu = 10218, DSA overhead = 8
dsa_slave_change_mtu: master = extsw, dev = lan1
dsa_slave_change_mtu: master->max_mtu = 1510, dev->max_mtu = 9724, DSA overhead = 6
dsa_slave_change_mtu: master = eth0, dev = extsw
dsa_slave_change_mtu new_master_mtu 1514 > mtu_limit 1510
mdio_mux-0.1:00: nonfatal error -34 setting MTU to 1500 on port 0
My added debug prints before the nonfatal error: the first switch from the top
is the Marvell switch, the second in the bcm6368-enetsw with its 1510 limit.
After this patch the error is gone.
OpenWrt adds a VLAN to each port so we get VLAN tags on all frames. On this
setup we even have 4 more bytes left after the two DSA tags and VLAN so
we can go all the way up to 1532 as MTU.
Testing the new 1532 MTU:
eth0 ext1 enp7s0
.--------. .-----------. cable .------.
| enetsw | <-> | mv88e6152 | <-----> | host |
`--------´ `-----------´ `------´
On the router we set the max MTU for test:
ifconfig eth0 mtu 1520
ifconfig br-wan mtu 1520
ifconfig ext1 mtu 1506
An MTU of 1506 on ext1 is a logic consequence of the above setup:
this is the max bytes actually transferred. The framing added will be:
- 18 bytes standard ethernet header
- 4 bytes VLAN header
- 6 bytes DSA tag for enetsw
- 8 bytes DSA tag for mv88e6152
Sum: 1506 + 18 + 4 + 6 + 8 = 1542 which is out max frame size.
Test pinging from host:
ping -s 1478 -M do 192.168.1.220
PING 192.168.1.220 (192.168.1.220) 1478(1506) bytes of data.
1486 bytes from 192.168.1.220: icmp_seq=1 ttl=64 time=0.696 ms
1486 bytes from 192.168.1.220: icmp_seq=2 ttl=64 time=0.615 ms
Test pinging from router:
PING 192.168.1.2 (192.168.1.2): 1478 data bytes
1486 bytes from 192.168.1.2: seq=0 ttl=64 time=0.931 ms
1486 bytes from 192.168.1.2: seq=1 ttl=64 time=0.810 ms
The max IP packet without headers is 1478, the outgoing ICMP packet is
1506 bytes. Then the DSA, VLAN and ethernet overhead is added.
Let us verify the contents of the resulting ethernet frame of 1542 bytes.
Ping packet on router side as viewed with tcpdump:
00:54:51.900869 AF Unknown (1429722180), length 1538:
0x0000: 3d93 bcae c56b a83d 8874 0300 0004 8100 =....k.=.t......
0x0010: 0000 dada 0000 c020 0fff 0800 4500 05e2 ............E...
0x0020: 0000 4000 4001 b0ec c0a8 0102 c0a8 01dc ..@.@...........
0x0030: 0800 7628 00c3 0001 f5da 1d65 0000 0000 ..v(.......e....
0x0040: ce65 0a00 0000 0000 1011 1213 1415 1617 .e..............
0x0050: 1819 1a1b 1c1d 1e1f 2021 2223 2425 2627 .........!"#$%&'
0x0060: 2829 2a2b 2c2d 2e2f 3031 3233 3435 3637 ()*+,-./0123456
(...)
- 3d93 = First four bytes are the last two bytes of the destination
ethernet address I don't know why the first four are missing,
but it sure explains why the paket is 1538 bytes and not 1542
which is the actual max frame size.
- bcae c56b a83b = source ethernet address
- 8874 0300 0004 = Broadcom enetsw DSA tag
- 8100 0000 = VLAN 802.1Q header
- dada 0000 c020 0fff = EDSA tag for the Marvell (outer) switch,
- 0800 is the ethertype (part of the EDSA tag technically)
- Next follows the contents of the ping packet as it appears if
we dump it on the DSA interface such as tcpdump -i lan1
etc, there we get the stripped out packet, 1506 bytes.
- At the end 4 bytes of FCS.
This clearly illustrates that the DSA tag is included in the MTU
which we set up in Linux, but the VLAN tag and ethernet headers and
checksum is not.
Tested-by: Paul Donald <newtwen@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Innacomm W3400V6 is an xDSL B/G wireless router based on Broadcom
BCM6328 SoC.
SoC: Broadcom BCM6328
CPU: BMIPS4350 V8.0, 320 MHz, 1 core
Flash: SPI-NOR 8MB, MX25L6406E
RAM: 64 MB
Ethernet: 4x 10/100 Mbps
Switch: Integrated
Wireless: 802.11b/g, BCM4312
LEDs/Buttons: 9x / 2x
Flash instruction, web UI:
1. Set a static IP on your computer compatible with 192.168.1.1, i.e
192.168.1.100.
2. Connect the ethernet cable from your computer to the router.
3. Make sure the router is powered off.
4. Press the reset button, don't release it yet!
5. While pressing reset, power on the router.
6. Wait 10 seconds or more.
Note: The power LED is red at first then turns to solid green when
ready.
7. Release the reset button.
8. Browse to 192.168.1.1
9. Select .bin file.
10. Upgrade the image.
11. Wait for it to reboot.
Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
[Fix cfe nvmem-layout and pinctrl_leds indentation]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Manually rebased:
generic/hack-6.1/220-arm-gc_sections.patch
armsr/patches-6.1/221-armsr-disable_gc_sections_armv7.patch
All other patches automatically rebased.
Signed-off-by: John Audia <therealgraysky@proton.me>
The Arcadyan AR7516, AKA Orange Bright Box or EE Bright Box 1, is a wifi
fast ethernet router, 2.4 GHz single band with two internal antennas. It
comes with a horizontal stand black shiny casing.
Newer Bright Box 1 model stands vertically, and comes with a totally
different board inside, not compatible with this firmware.
Hardware:
- SoC: Broadcom BCM6328
- CPU: single core BMIPS4350 V7.5 @ 320Mhz
- RAM: 64 MB DDR2
- Flash: 8 MB SPI NOR
- Ethernet LAN: 4x 100Mbit
- Wifi 2.4 GHz: Broadcom BCM43227 802.11bgn (onboard)
- USB: 1x 2.0
- ADSL: yes, unsupported
- Buttons: 2x
- LEDs: 9x, power LED is hardware controlled
- UART: yes
Installation in two steps, new CFE bootloader and firmware:
Install new CFE:
1. Power off the router and press the RESET button
2. Power on the router and wait some seconds
3. Release the RESET button
3. Browse to http://192.168.1.1, this web interface will offer both
firmware (“Software”) upgrade and bootloader upgrade; be sure to
use the bootloader section of the upload form.
4. Upload the new CFE (availabe at the wiki page)
5. Wait about a minute for flashing to finish and reboot into the new bootloader.
Install OpenWrt via new CFE web UI:
1. After installing the new CFE, visit http://192.168.1.1
2. Upload the Openwrt cfe firmware
5. Wait a few minutes for it to finish
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
The NuCom R5010UNv2 is a wifi fast ethernet router, 2.4 GHz single band
with two external antennas.
Hardware:
- SoC: Broadcom BCM6328
- CPU: single core BMIPS4350 V7.5 @ 320Mhz
- RAM: 64 MB DDR2
- Flash: 16 MB SPI NOR
- Ethernet LAN: 4x 100Mbit
- Wifi 2.4 GHz: Broadcom BCM43217 802.11bgn (onboard)
- USB: 1x 2.0
- Buttons: 2x
- ADSL: yes, unsupported
- LEDs: 7x
- UART: yes
Installation via CFE web UI:
1. Power off the router and press the RESET button
2. Power on the router and wait 12 or more seconds
3. Release the RESET button
4. Browse to http://192.168.1.1 and upload the Openwrt cfe firmware
5. Wait a few minutes for it to finish
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
The data RAC is left disabled by the bootloader in some SoCs, at least in
the core it boots from. Enabling this feature increases the performance up
to +30% depending on the task.
The kernel enables the whole RAC unconditionally on BMIPS3300 CPUs. Enable
the data RAC in a similar way also for BMIPS4350.
Tested on DGND3700 v1 (BCM6368) and HG556a (BCM6358).
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
The Comtrend VG-8050 is a wifi gigabit ethernet router, 2.4 GHz single band with
two external antennas.
Hardware:
- SoC: Broadcom BCM63169
- CPU: dual core BMIPS4350 @ 400Mhz
- RAM: 128 MB DDR
- Flash: 128 MB NAND
- LAN switch: Broadcom BCM53125, 5x 1Gbit
- Wifi 2.4 GHz: SoC (BCM63268) 802.11bgn
- USB: 1x 2.0 (optional)
- Buttons: 2x (reset)
- LEDs: yes
- UART: yes
Installation via CFE web UI:
1. Power off the router.
2. Press reset button near the power switch.
3. Keep it pressed while powering up during ~20+ seconds.
4. Browse to http://192.168.1.1 and upload the firmware.
5. Wait a few minutes for it to finish.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>