Commit Graph

184 Commits

Author SHA1 Message Date
Kyle Hendry
1a69543376 bmips: add support for SmartRG SR505n
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>
2024-03-10 20:26:07 +01:00
Álvaro Fernández Rojas
6bbb75dfdc bmips: dts: move leds dt-bindings include to SoCs
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>
2024-02-08 09:45:26 +01:00
Christian Marangi
0a4cc0a9ba
bmips: convert to new LED color/function format where possible
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>
2024-02-07 14:48:36 +01:00
John Audia
2c363a070e kernel: bump 6.1 to 6.1.75
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.75

Removed upstreamed:
	generic/hack-6.1/321-powerpc_crtsavres_prereq.patch[1]
	generic/pending-6.1/540-ksmbd-only-v2-leases-handle-the-directory.patch[2]

Rebased:
	bcm27xx/patches-6.1/950-0670-fbdev-Don-t-cancel-deferred-work-if-pagelist-empty.patch[3]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.75&id=16b88e68b85d5520c28498bb847358ff6300cb90
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/fs/smb?h=v6.1.75&id=c866866c795296d3637ab0d48a3d8a3ef5d6f4a3
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.75&id=81f444f22816a82ada2cc787a2845cffc8c584a6

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-02-01 21:34:05 +01:00
Linus Walleij
3cf1fe5508 bmips: bcm6368-enetsw: Bump max MTU
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>
2024-01-24 19:54:33 +01:00
Álvaro Fernández Rojas
f75de11de0 bmips: dts: remove unneeded cferom alias
This is no longer needed after nvmem-layout changes.
Same as 6f328dfe19 for NAND devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-18 08:57:43 +01:00
Álvaro Fernández Rojas
81b4160a6f bmips: drop patches/config for kernel 5.15
Drop patches/config for kernel 5.15 now that they are not used anymore.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-16 11:04:29 +01:00
Álvaro Fernández Rojas
5cfb416b85 bmips: move to kernel 6.1 by default
Move bmips to kernel 6.1 by default.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-16 11:02:01 +01:00
Álvaro Fernández Rojas
6f328dfe19 bmips: dts: remove unneeded cfe alias
This is no longer needed after nvmem-layout changes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-16 10:59:47 +01:00
Sieng-Piaw Liew
6bc26c7d49 bmips: bcm6328: add Innacomm W3400V6
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>
2024-01-16 10:49:27 +01:00
Rosen Penev
28a3dab2ab
bmips: remove mac-address-increment
It's deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-22 00:02:01 +01:00
John Audia
cd86f6c24d kernel: bump 6.1 to 6.1.60
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.60

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-10-26 12:08:52 +02:00
Marek Behún
b23c2ec831
kernel: ath79, bmips: refresh 5.15 patches
One LED patch for ath79 and one LED patch for bmips need to be
refreshed.

Signed-off-by: Marek Behún <kabel@kernel.org>
2023-10-23 15:19:49 +02:00
John Audia
2bda536a3d
kernel: bump 6.1 to 6.1.53
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.53

Removed upstreamed:
	bcm53xx/patches-6.1/032-v6.6-0005-ARM-dts-BCM53573-Drop-nonexistent-usb-cells.patch[1]
	bcm53xx/patches-6.1/032-v6.6-0006-ARM-dts-BCM53573-Add-cells-sizes-to-PCIe-node.patch[2]
	bcm53xx/patches-6.1/032-v6.6-0007-ARM-dts-BCM53573-Use-updated-spi-gpio-binding-proper.patch[3]
	bcm53xx/patches-6.1/032-v6.6-0011-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch[4]

All other patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.53&id=ee1d740374aa73fb32857685eb05167ad87458cf
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.53&id=ab5154ae26c446136827451e907db45d7b92a76f
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.53&id=f5ff6897094fa161be55786cb9e5d5b1bf7a9049
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.53&id=0ef736fec61422794c4a991d46c4ec212b01d8d1

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-09-23 13:10:28 +02:00
John Audia
1e0ee72b72 kernel: bump 6.1 to 6.1.44
Changelog: https://lore.kernel.org/stable/2023080822-repost-unfiled-2f01@gregkh/

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-08-09 20:39:20 -04:00
John Audia
daed3322d3 kernel: bump 5.15 to 5.15.125
1. Add new symbols to generic config
2. Bump kernel
   Changelog: https://lore.kernel.org/stable/2023080818-groin-gradient-a031@gregkh/

   All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-08-09 22:06:24 +02:00
John Audia
79a82d7e87 kernel: bump 6.1 to 6.1.37
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>
2023-07-05 20:32:37 +02:00
Stefan Kalscheuer
b308bd50ef kernel: migrate FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER for 6.1
The flag FORCE_MAX_ZONEORDER was renamed to ARCH_FORCE_MAX_ORDER in
Kernel 6.1 [1]. Rename the flag in generic Kconfig and remove it from
target configs.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0192445cb2f7ed1cd7a95a0fc8c7645480baba25

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
2023-06-25 11:26:50 +02:00
John Audia
e0fb38f4ee kernel: bump 6.1 to 6.1.35
All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-06-23 23:07:17 +02:00
John Audia
1f5fce27c1 kernel: bump 5.15 to 5.15.118
All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-06-23 23:05:45 +02:00
Daniel González Cabanelas
df8e4b6c2e bmips: add support for Arcadyan AR7516
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>
2023-06-22 17:53:32 +02:00
Daniel González Cabanelas
6cb3328b4f bmips: add support for NuCom R5010UNv2
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>
2023-06-19 20:39:52 +02:00
Daniel González Cabanelas
6d1265b148 bmips: enable the data Read Ahead Cache for BMIPS4350
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>
2023-06-18 20:06:06 +02:00
Álvaro Fernández Rojas
62cdca25ed bmips: fix DMA RAC flush
BMIPS_GET_CBR() returns an invalid address on some SoCs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-18 19:50:23 +02:00
Álvaro Fernández Rojas
47cc09aa7a bmips: add support for Comtrend VG-8050
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>
2023-06-16 09:48:53 +02:00
Álvaro Fernández Rojas
d9210c5ff7 bmips: dts: dgnd3700: fix WAN port
All switch ports are labeled as port@address so let's follow the same pattern.

Fixes: ed79519b8d ("bmips: add support for Netgear DGND3700 v1, DGND3800B")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-15 20:53:11 +02:00
Álvaro Fernández Rojas
38ebb2eafd bmips: add support for Sercomm AD1018
The Sercomm AD1018 is a wifi fast ethernet router, 2.4 GHz single band with
two internal antennas.

Hardware:
 - SoC: Broadcom BCM6328
 - CPU: single core BMIPS4350 @ 320Mhz
 - RAM: 64 MB (v1) / 128 MB (v2) DDR
 - Flash: 128 MB NAND
 - Ethernet LAN: 4x 100Mbit
 - Wifi 2.4 GHz: miniPCI Broadcom BCM43217 802.11bgn
 - USB: 1x 2.0
 - Buttons: 3x (reset)
 - LEDs: yes
 - UART: yes

Installation via OEM web UI:
  1. Use the admin credentials to login via web UI
  2. Go to Managament->Update firmware and select the OpenWrt CFE firmware
  3. Press "Update Firmware" button and wait some minutes until it finish

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-15 20:47:40 +02:00
Álvaro Fernández Rojas
434434ca47 bmips: bump LOADER_ENTRY to RAM + 16M
This is needed on devices like Sercomm AD1018 for booting recent kernels due
to bigger kernels.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-15 20:47:40 +02:00
Daniel González Cabanelas
e1a55de7a7 bmips: add support for Actiontec R1000H
The  Actiontec R1000H is a gigabit wifi router, 2.4 GHz single band with
two external antennas. It comes with a coaxial HomePNA port.

Hardware:
 - SoC: Broadcom BCM6368
 - CPU: dual core BMIPS4350 V3.1 @400Mhz
 - RAM: 64 MB DDR
 - Flash: 32 MB parallel NOR
 - LAN switch: Broadcom BCM53115, 5x 1Gbit
 - LAN coaxial : 1x HPNA 3.1, CG3211 + CG3213
 - Wifi 2.4 GHz: Broadcom BCM4322 802.11bgn
 - USB: 1x 2.0
 - Buttons: 2x, 1 reset
 - LEDs: 7x
 - UART: yes

The HPNA hardware probably needs a firmware to make the coaxial port work.
In the OEM firmware, it's apparently sent with an utility (inhpna) through
the ethernet port.

Installation via CFE web UI:
  1. Connect the UART serial port.
  2. Power on the router and press enter at the console prompt to stop the
     bootloader.
  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>
2023-06-15 17:58:58 +02:00
Álvaro Fernández Rojas
464dfac049 bmips: switch to standard nand_do_upgrade
Now that JFFS2 cleanmarkers are supported on the standard nand_do_upgrade
function we can start using it on bmips.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-15 10:51:21 +02:00
Álvaro Fernández Rojas
915e914cfa bmips: fix NETGEAR DGND3700v2 boot loop
The DGND3700v2 renames the cferam bootloader from cferam to cfeXXX, where XXX
is the number of firmware upgrades performed by the bootloader. Other bcm63xx
devices rename cferam.000 to cferam.XXX, but this device is special because
the cferam name isn't changed on the first firmware flashing but it's changed
on the subsequent ones.
Therefore, we need to look for "cfe" instead of "cferam" to properly detect
the cferam partition and fix the bootlop.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-14 23:23:14 +02:00
Álvaro Fernández Rojas
bcdf861519 bmips: add support for Comtrend AR-5381u
The Comtrend AR-5381u is a wifi fast ethernet router, 2.4 GHz single band with
two internal antennas.

Hardware:
 - SoC: Broadcom BCM6328
 - CPU: single core BMIPS4350 @ 320Mhz
 - RAM: 64 MB DDR
 - Flash: 16 MB SPI NOR
 - Ethernet LAN: 4x 100Mbit
 - Wifi 2.4 GHz: miniPCI Broadcom BCM43225 802.11bgn
 - USB: 1x 2.0
 - Buttons: 1x (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>
2023-06-12 18:53:00 +02:00
Álvaro Fernández Rojas
c3b1ef2dfd bmips: add support for Comtrend WAP-5813n
The Comtrend WAP-5813n is a wifi gigabit router, 2.4 GHz single band with
two external antennas.

Hardware:
 - SoC: Broadcom BCM6369
 - CPU: dual core BMIPS4350 @ 400Mhz
 - RAM: 64 MB DDR
 - Flash: 8 MB parallel NOR
 - LAN switch: Broadcom BCM53115, 5x 1Gbit
 - Wifi 2.4 GHz: miniPCI Broadcom BCM4322 802.11bgn
 - USB: 1x 2.0 (optional)
 - Buttons: 3x (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>
2023-06-11 18:31:23 +02:00
Álvaro Fernández Rojas
3baa45fbd8 bmips: add support for Comtrend VR-3025un
The Comtrend VR-3025un is a wifi gigabit router, 2.4 GHz single band with
two external antennas.

Hardware:
 - SoC: Broadcom BCM6368
 - CPU: dual core BMIPS4350 @ 400Mhz
 - RAM: 64 MB DDR
 - Flash: 8 MB parallel NOR
 - Ethernet LAN: 4x 100Mbit
 - Wifi 2.4 GHz: miniPCI Broadcom BCM43222 802.11bgn
 - USB: 1x 2.0
 - Buttons: 1x (reset)
 - LEDs: yes
 - UART: yes

Installation via CFE web UI:
  1. Power off the router.
  2. Press reset button near the antenna.
  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>
2023-06-11 12:09:40 +02:00
Álvaro Fernández Rojas
79844637df bmips: dgnd3700v1/dgnd3800b: add missing kmod-leds-gpio
Commit ed79519b8d missed adding kmod-leds-gpio to these devices.

Fixes: ed79519b8d ("bmips: add support for Netgear DGND3700 v1, DGND3800B")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-11 10:25:03 +02:00
Álvaro Fernández Rojas
389f7802db bmips: image: rename Device/bcm63xx_netgear
Every other Device definition in the target is using hyphens instead of
underscores.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-11 10:17:50 +02:00
Álvaro Fernández Rojas
130e5c63c7 bmips: dts: improve and align device tree files
Align all the device tree files and follow the same criteria before more
devices are ported from bcm63xx and this goes out of control.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-11 10:14:25 +02:00
Daniel González Cabanelas
71a6f45fdf bmips: add support for Netgear EVG2000
The Netgear EVG2000 is a wifi gigabit router, 2.4 GHz single band with
two internal antennas integrated in the main PCB.

Hardware:
 - SoC: Broadcom BCM6369
 - CPU: dual core BMIPS4350 V3.1 @400Mhz
 - RAM: 64 MB DDR
 - Flash: 16 MB parallel NOR
 - LAN switch: Broadcom BCM53115, 5x 1Gbit
 - Wifi 2.4 GHz: Broadcom BCM4322 802.11bgn
 - USB: 2x 2.0
 - Buttons: 2x, 1 reset
 - LEDs: 10x
 - FXS: 2x
 - UART: yes

Installation via CFE web UI:
  1. Power off the router and make a temporal TX-RX shortcircuit on the
     serial pins.
  2. Power on the router and wait 3 or more seconds
  3. Remove the TX-RX shortcircuit
  4. Browse to http://192.168.1.1 or http://192.168.0.1 and upload the
     firmware
  5. Wait a few minutes for it to finish

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
2023-06-11 09:54:52 +02:00
Daniel González Cabanelas
ed79519b8d bmips: add support for Netgear DGND3700 v1, DGND3800B
The Netgear DGND3700 v1 and DGND3800B are the same device but with
different factory firmwares. It's an xDSL wifi router with a slim black
shiny casing and 4 PCB internal antennas connected via UFL to a miniPCI
detachable card.

Hardware:
 - SoC: Broadcom BCM6368
 - CPU: dual core BMIPS4350 V3.1 @400Mhz
 - RAM: 128 MB DDR
 - NOR Flash: 32 MB parallel (CFE and OS)
 - NAND flash: 128 MB (empty)
 - Ethernet LAN: 5x 1Gbit
 - Wifi 2.4 GHz: Broadcom BCM43222 802.11bgn
 - Wifi 5 GHz: Broadcom BCM43222 802.11abgn
 - USB: 2x 2.0
 - Buttons: 3x, 1 reset
 - LEDs: 11x
 - UART: yes

Installation via OEM web UI:
  1. Open the Netgear administration web interface, by default:
        http://192.168.0.1
	user: admin
        password: password
  2. Look for "upgrade firmware" and proceed
  3. Wait some minutes until it finishes

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
2023-06-10 15:37:52 +02:00
Álvaro Fernández Rojas
47ca33a0be bmips: bump LZMA Loader address
This allows booting bigger ramdisk images via TFTP at the cost of breaking 32M
RAM compatibility, but those devices have been unable to boot ramdisks on this
target for some time anyway due to not having enough RAM.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-09 19:48:42 +02:00
Daniel González Cabanelas
e7a0b61397 bmips: add support for Observa VH4032N
The Observa VH4032N is an xDSL wifi router with a vertical white casing
and two internal antennas connected via UFL.

Hardware:
 - SoC: Broadcom BCM6368
 - CPU: dual core BMIPS4350 V3.1 @400MHz
 - RAM: 128 MB DDR
 - Flash: 32 MB parallel NOR
 - Ethernet LAN: 4x 100Mbit
 - Wifi 2.4/5 GHz: onboard Broadcom BCM43222 802.11abgn
 - USB: 3x 2.0
 - Buttons: 2x, 1 reset
 - LEDs: 8x, blue and red
 - UART: 1x

Installation via OEM web UI:
  1. Use the admin credentials to login via web UI
  2. Go to Managament->Update firmware and select the OpenWrt CFE firmware
  3. Press "Update Firmware" button and wait some minutes until it finish

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
2023-06-09 19:44:28 +02:00
Robert Marko
b81045a818 kernel: bump 6.1 to 6.1.31
All patches automatically rebased.

Build system: x86_64/Fedora 38
Build-tested: ipq807x/Qnap 301W, ipq807x/Dynalink DL-WRX36
Run-tested: ipq807x/Qnap 301W, ipq807x/Dynalink DL-WRX36

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-06-02 21:23:12 +02:00
Álvaro Fernández Rojas
2aca88ef8d bmips: enable testing kernel version with 6.1 version
Enable testing kernel version with 6.1 kernel version.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-30 21:00:34 +02:00
Álvaro Fernández Rojas
f6c02b014d bmips: 6.1: refresh config and add missing symbols
Refresh config for kernel 6.1 and add missing symbols.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-30 21:00:24 +02:00
Álvaro Fernández Rojas
959d3f0582 bmips: 6.1: refresh kernel patches
Refresh kernel patches for version 6.1.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-30 20:55:12 +02:00
Álvaro Fernández Rojas
a937eef305 bmips: 6.1: copy patches, config from 5.15
Copy patches and config from 5.15 kernel version.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-30 20:55:12 +02:00
Álvaro Fernández Rojas
8f6033e287 bmips: enet: add compatibility with kernel 6.1
Make bmips ethernet drivers compatible with 6.1 kernel.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-30 20:54:54 +02:00
Álvaro Fernández Rojas
0dd5505a17 bmips: improve kernel patches
Add missing patch headers and regenerate the ones that contain an obsolete
patch header.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-17 18:25:40 +02:00
Christian Marangi
150508e47c
bmips: 5.15: comment unused macronix_nand_block_protection_support
Comment unused function macronix_nand_block_protection_support since it
does cause boot problem
Fix compilation error:
drivers/mtd/nand/raw/nand_macronix.c:220:13: error: 'macronix_nand_block_protection_support' defined but not used [-Werror=unused-function]
  220 | static void macronix_nand_block_protection_support(struct nand_chip *chip)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-12 03:15:42 +02:00
Álvaro Fernández Rojas
c3549b9319 bmips: fix external interrupt controller
- irq_domain_add_simple() can't be used on bmips since interrupts aren't
hardcoded with specific offsets for internal and external as opposed to
bcm63xx. This is needed to avoid collisions with other interrupts.
- remove unused bcm63xx-specific code.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-27 15:39:09 +02:00