Commit Graph

833 Commits

Author SHA1 Message Date
Tony Ambardar
3980dfcd05 kernel: fix handling of CONFIG_DYNAMIC_DEBUG
Since CONFIG_DYNAMIC_DEBUG is already managed via the KERNEL_DYNAMIC_DEBUG
setting in Config-kernel.in (default N), remove or disable it in target
configs which unconditionally enable it, along with the related setting
CONFIG_DYNAMIC_DEBUG_CORE. This saves several KB in the kernels for
ipq40xx, ipq806x, filogic, mt7622, qoriq, and sunxi.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-05-03 10:26:17 -07:00
John Audia
126c64df2b kernel: bump 5.10 to 5.10.178
Removed upstreamed:
	backport-5.10/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.178&id=0279e82e148407feec88466990de14bcba9e12c0

All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-04-22 01:15:03 +02:00
Michael Trinidad
ff91a12c8d base-files: fix Linksys upgrade, restore config step
It appears that the refactor of the upgrade process for NAND devices                                                                                                                            resulted in the nand_do_upgrade_success step not being called for
devices using the linksys.sh script. As a result, configuration was
not preserved over sysupgrade steps.

This corrects a typo in the call of nand_do_upgrade_failed for ipq40xx
and ipq806x devices using the linksys.sh script.

Fixes: 8634c1080d ("ipq40xx: Fix Linksys upgrade, restore config step")
Fixes: 2715aff5df ("ipq806x: Fix Linksys upgrade, restore config step")
Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
2023-04-11 12:22:35 +02:00
Jacob Aharon
2715aff5df ipq806x: Fix Linksys upgrade, restore config step
It appears that the refactor of the upgrade process for NAND devices
resulted in the nand_do_upgrade_success step not being called for
devices using the linksys.sh script. As a result, configuration
was not preserved over sysupgrade steps.

This restores the preservation of configs for ipq806x devices using the
linksys.sh script. Other devices and targets have not been examined.

This commit uses the same functionality and terminology used in commit
8634c10 ("ipq40xx: Fix Linksys upgrade, restore config step")

Fixes: e25e6d8 ("base-files: fix and clean up nand sysupgrade code")
Tested-on: EA8500

Signed-off-by: Jacob Aharon <ah.jacob@gmail.com>
2023-04-02 12:22:37 +00:00
Hauke Mehrtens
93debecc88 ipq806x: Refresh patches
Make the patches apply cleanly again.

Fixes: a97965b7b1 ("kernel: add pending patches for bcm63268-timer-clocks")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-24 00:42:00 +01:00
John Audia
3ca9849589 kernel: bump 5.10 to 5.10.175
Manually rebased:
	backport-5.10/611-v5.12-net-ethernet-mediatek-support-setting-MTU.patch

Removed upstreamed:
	bcm47xx/patches-5.10/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.175&id=cbf11ff3708ff163387da924f80a47ce7c721e9b

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-20 22:44:28 +01:00
John Audia
d4aad642ff kernel: bump 5.10 to 5.10.173
Manually rebased:
        ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch

All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-20 22:44:28 +01:00
Kristjan Krušič
f574b535eb
ipq806x: add support for Nokia Airscale AC400i
Hardware
--------

SoC:    Qualcomm IPQ8065
RAM:    512 MB DDR3
Flash:  256 MB NAND (Macronix MX30UF2G18AC) (split into 2x128MB)
        4 MB SPI-NOR (Macronix MX25U3235F)
WLAN:   Qualcomm Atheros QCA9984 - 2.4Ghz
        Qualcomm Atheros QCA9984 - 5Ghz
ETH:    eth0 - POE (100Mbps in U-Boot, 1000Mbps in OpenWrt)
        eth1 - (1000Mbps in both)
        Auto-negotiation broken on both.
USB:    USB 2.0
LED:    5G, 2.4G, ETH1, ETH2, CTRL, PWR (All support green and red)
BTN:    Reset
Other:  SD card slot (non-functional)
Serial: 115200bps, near the Ethernet transformers, labeled 9X.
        Connections from the arrow to the 9X text:
		[NC] - [TXD] - [GND] - [RXD] - [NC]

Installation
------------

0. Connect to the device
Plug your computer into LAN2 (1000Mbps connection required).
If you use the LAN1/POE port, set your computer to force a 100Mbps link.

Connect to the device via TTL (Serial) 115200n8.
Locate the header (or solder pads) labeled 9X,
near the Ethernet jacks/transformers.
There should be an arrow on the other side of the header marking.
The connections should go like this:
(from the arrow to the 9X text): NC - TXD - GND - RXD - NC

1. Prepare for installation
While the AP is powering up, interrupt the startup process.
MAKE SURE TO CHECK YOUR CURRENT PARTITION!

If you see: "Current Partition is : partB" or
"Need to switch partition from partA to partB",
you have to force the device into partA mode, before continuing.
This can be done by changing the PKRstCnt to 5 and resetting the device.

setenv PKRstCnt 5
saveenv
reset

After you interrupt the startup process again,
you should see: Need to switch partition from partB to partA

You can now continue to the next step.

If you see: "Current Partition is : partA",
you can continue to the next step.

2. Prevent partition switching.
To prevent the device from switching partitions,
we are going to modify the startup command.
set bootcmd "setenv PKRstCnt 0; saveenv; bootipq"
setenv

3. First boot
Now, we have to boot the OpenWrt intifs.
The easiest way to do this is by using Tiny PXE.
You can also use the normal U-Boot tftp method.

Run "bootp" this will get an IP from the DHCP server
and possibly the firmware image.
If it doesn't download the firmware image, run "tftpboot".

Now run "bootm" to run the image.

You might see:
"ERROR: new format image overwritten - must RESET the board to recover"
this means that the image you are trying to load is too big.
Use a smaller image for the initial boot.

4. Install OpenWrt from initfs
Once you are booted into OpenWrt,
transfer the OpenWrt upgrade image and
use sysupgrade to install OpenWrt to the device.

Signed-off-by: Kristjan Krušič <kristjan.krusic@krusic22.com>
2023-03-19 18:02:34 +01:00
John Audia
d6d8851d12 kernel: bump 5.15 to 5.15.100
Manually rebased:
        bcm27xx/patches-5.15/950-0421-Support-RPi-DPI-interface-in-mode6-for-18-bit-color.patch
        bcm27xx/patches-5.15/950-0706-media-i2c-imx219-Scale-the-pixel-clock-rate-for-the-.patch
        ramips/patches-5.15/810-uvc-add-iPassion-iP2970-support.patch

Removed upstreamed:
        bcm27xx/patches-5.15/950-0707-drm-vc4-For-DPI-MEDIA_BUS_FMT_RGB565_1X16-is-mode-1-.patch[1]
        bcm27xx/patches-5.15/950-0596-drm-vc4-dpi-Add-option-for-inverting-pixel-clock-and.patch[2]
        ipq807x/0006-v5.16-arm64-dts-qcom-Fix-IPQ8074-PCIe-PHY-nodes.patch [3]
        ipq807x/0034-v6.1-arm64-dts-qcom-ipq8074-fix-PCIe-PHY-serdes-size.patch [4]
        ipq807x/0103-arm64-dts-qcom-ipq8074-fix-Gen2-PCIe-QMP-PHY.patch [5]
        ipq807x/0104-arm64-dts-qcom-ipq8074-fix-Gen3-PCIe-QMP-PHY.patch [6]
        ipq807x/0105-arm64-dts-qcom-ipq8074-correct-Gen2-PCIe-ranges.patch [7]
        ipq807x/0108-arm64-dts-qcom-ipq8074-fix-Gen3-PCIe-node.patch [8]
        ipq807x/0109-arm64-dts-qcom-ipq8074-correct-PCIe-QMP-PHY-output-c.patch [9]
        ipq807x/0132-arm64-dts-qcom-ipq8074-correct-USB3-QMP-PHY-s-clock-.patch [10]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.99&id=d2991e6b30020e286f2dd9d3b4f43548c547caa6
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/gpu/drm/vc4/vc4_dpi.c?h=v5.15.100&id=8e04aaffb6de5f1ae61de7b671c1531172ccf429
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=a55a645aa303a3f7ec37db69822d5420657626da
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=d9df682bcea57fa25f37bbf17eae56fa05662635
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=7e6eeb5fb3aa9e5feffdb6e137dcc06f5f6410e1
6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=e88204931d9a60634cd50bbc679f045439c4b91d
7.  https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=1563af0f28afd3b6d64ac79a2aecced3969c90bf
8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=feb8c71f015d416f1afe90e1f62cf51e47376c67
9. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=69c7a270357a7d50ffd3471b14c60250041200e3
10. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=dd3d021ae5471d98adf81f1e897431c8657d0a18

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Tested-by: Robert Marko <robimarko@gmail.com> #ipq807x/Dynalink WRX36
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> #ipq807x/ax3600, x86_64/FW-7543B, ath79/tl-wdr3600, ipq806x/g10, ipq806x/nbg6817
2023-03-18 12:52:17 +01:00
John Audia
b88955aa22 kernel: bump 5.10 to 5.10.169
Manually rebased:
        backport-5.10/811-v6.1-0001-nvmem-core-Fix-memleak-in-nvmem_register.patch

Removed upstreamed:
        backport-5.10/811-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch[1]
	patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch[2]

Add fix:
	target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[3]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.169&id=a19a0f67dbb89ad2bfc466f2003841acba645884
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.169&id=a5c51e0c3202820192db3f3809e072f3ca2b1177
3. https://lore.kernel.org/stable/20230227211548.13923-1-kuniyu@amazon.com

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-07 00:06:40 +01:00
Alan Luck
4c1d7787d4 ipq806x: Add buttons to OnHub
These are the factory reset button (external) and "developer mode"
button (hidden inside the case (ASUS) or under a screw in the base
(TP-Link)) found on the TP-Link and ASUS OnHub devices.

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
[Brian: add description; factor out for both ASUS and TP-Link; use
existing pinmux definitions; add keycode for dev button]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2023-03-05 17:24:46 +01:00
Brian Norris
a79abd813d ipq806x: chromium: Enable kmod-ramoops by default
Chromium devices (like OnHub) have ramoops memory reserved by the
bootloader. Let's enable the ramoops kernel module by default, so we get
better crash logging.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2023-02-18 19:58:22 +01:00
Christian Marangi
86ecf7bd39
Revert "ipq806x: disable ea8500 image by default"
This reverts commit c4a9a67de8.

Device is now fixed and works correctly with kernel 5.15.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-02-17 04:27:16 +01:00
Christian Marangi
e12ff74ba1
Revert "ipq806x: disable ea8500 image by default"
This reverts commit 5384c9337f.

Device is now fixed and works correctly with kernel 5.15.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-02-17 04:27:15 +01:00
Christian Marangi
2ddf479cc7
ipq806x: 5.10: refresh patches
Refresh patches for kernel 5.10

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-02-17 04:27:15 +01:00
Christian Marangi
9a24040d20
ipq806x: fix Linksys EAX500 family devices dead Ethernet switch
With 5.15 kernel version Linksys EAX500 family devices suffered from a
big regression where the Ethernet switch became silent and started to
malfunction.

It was discovered later that the cause was not really the kernel upgrade
itself but a hackish implementation of the hw implementation of these
special routers.

In the original Linksys source code, GPIO 63 was handled in a special way
and was reset on reboot.

Normally GPIO 63 is used for pcie2 reset but in every device we support,
pcie2 is actually never used as nothing is attached to it.

Linksys rerouted GPIO 63 to the switch reset pin and deviates from
common hw implementation.

Till now it was used an hack to handle this case... It was set pcie3 as
working (while actually nothing was connected), set it to output low
(for assert-deassert from the pcie init code) and be done with it.
The result was that the GPIO was reset for enough time in early boot and
everything worked correctly.
This hack implementation was born to fail from the very start and in
kernel 5.15 finally problem arised.

In 5.15 pcie code changed and now the GPIO reset pin is not asserted as
probe won't fail if nothing is connected to the line (the old behaviour)
This result in the switch hold the reset pin and the Ethernet switch
dead.

On top of that with 5.15 code got optimized and simply attaching the
GPIO reset to the mdio wasn't enough as the switch require at least 10ms
to be correctly reset.

So implement finally a correct solution where:
- pcie2 is correctly disabled (nothing attached, unused)
- drop the wrong output-low for pcie2 reset pin
- define GPIO 63 as switch reset
- Add the reset-gpios to the mdio0 node
- Set the reset-post-delay-us to 12ms to correctly give time the switch
  to reset

Fixes: #10983
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-02-17 04:27:15 +01:00
Daniel Golle
e8625c89ef treewide: replace /sys/devices/virtual/ubi by /sys/class/ubi
Starting from Linux Kernel version 6.3 UBI devices will no longer be
considered virtual, but rather have an MTD device parent. Hence they
will no longer be listed under /sys/devices/virtual/ubi which is
used in multiple places in OpenWrt. Prepare for future kernels by
using /sys/class/ubi instead of /sys/devuces/virtual/ubi.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-02-15 03:27:59 +00:00
Felix Baumann
505cf10e83
ipq806x: fix dts whitespace
Replace blanks with tabs

Signed-off-by: Felix Baumann <felix.bau@gmx.de>
2023-02-09 03:03:51 +01:00
Filip Matijević
047fb7c76d
ipq806x: add missing enclosing reserved-memory block on C2600/AD7200
Most of the time when booting kernel prints a warning from
mm/page_alloc.c when pstore/ramoops is being initialized and ramoops is
not functional.

Fix this by moving ramopps node into reserved-memory block as described
in kernel documentation.

Fixes: 2964e5024c ("ipq806x: kernel ramoops storage for C2600/AD7200")
Signed-off-by: Filip Matijević <filip.matijevic.pz@gmail.com>
2023-02-07 16:27:02 +01:00
Brian Norris
b5193291bd
ipq806x: onhub: Enable fstools_partname_fallback_scan
When fstools is unable to parse our root=<...> arg correctly, it can
fall back to scanning all block devices for a 'rootfs_data' partition.
This fallback was deemed wrong (or at least, a breaking/incompatible
change) for some targets, so we're forced to opt back into it with
fstools_partname_fallback_scan=1.

Without this, OnHub devices will use a rootfs-appended loop device for
rootfs_data instead of the intended 3rd partition.

While I'm at it, just move all the boot args into the 'cros-vboot'
build rule, instead of using the custom bootargs-append. All cros-vboot
subtargets here are using the same rootwait (to support both eMMC and
USB boot) and root/partition args.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
[ drop unrelated comments in commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-02-04 20:16:20 +01:00
Rosen Penev
2630e5063d treewide: replace wpad-basic-wolfssl default
The newly merged mbedtls backend is smaller and has fewer ABI related
issues than the wolfSSL one.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-04 02:35:03 +01:00
John Audia
50324b949b kernel: bump 5.10 to 5.10.166
All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-02-03 09:38:11 +01:00
John Audia
6a3816efb7 kernel: bump 5.15 to 5.15.89
Removed upstreamed:
  ipq806x/patches-5.15/007-v6.3-ASoC-qcom-lpass-cpu-Fix-fallback-SD-line-index-handl.patch[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.89&id=d4fa65960a9d0cb87a1102d47145675ceed7a4e6

All other patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-01-22 01:41:10 +01:00
Brian Norris
ef649b0b14
ipq806x: Initial TP-Link and ASUS OnHub support
TP-Link and ASUS OnHub devices are very similar, sharing many of the
same characteristics and much of their Device Tree. They both run a
version of ChromeOS for their factory firmware, and so installation
instructions look very similar to Google Wifi [1].

Things I've tested, and are working:

 * Ethernet
 * WiFi (2.4 and 5 GHz)
 * LEDs
 * USB
 * eMMC
 * Serial console (if you wire it up yourself)
 * 2x CPU
 * Speaker

== Installation instructions summary ==

1. Flash *-factory.bin to a USB drive (e.g., with `dd`)
2. Insert USB drive, to boot OpenWrt from USB
3. Copy the same *-factory.bin over to device, and flash it to eMMC to
   make OpenWrt permanent

== Developer mode, booting from USB (Step 2) ==

To enter Developer Mode and boot OpenWrt from a USB stick:

1. Unplug power
2. Gain access to the "developer switch" through the bottom of the
   device
3. Hold down the "reset switch" (near the USB port / power plug)
4. Plug power back in
5. The LED on the device should turn white, then blink orange, then
   red. Release the reset switch.
6. Insert USB drive with OpenWrt factory.bin
7. Press the hidden developer switch under the device to boot to USB;
   you should see some activity lights (if you have any) on your USB
   drive
8. Depending on your configuration, the router's LED(s) should come on.
   You're now running OpenWrt off a USB stick.

These instructions are derived from:

https://www.exploitee.rs/index.php/Rooting_The_Google_OnHub#Enabling_%22Developer_Mode%22_on_the_OnHub
https://www.exploitee.rs/index.php/Asus_OnHub#Enabling_%22Developer_Mode%22_on_the_OnHub

~~Finding the developer switch:~~ for TP-Link, the developer switch is
on the bottom of the device, underneath some of the rubber padding and a
screw. For ASUS, remove the entire base, via 4 screws under the rubber
feet. See the Exploitee instructions for more info and photos.

== Making OpenWrt permanent (on eMMC) (Step 3) ==

Once you're running OpenWrt via USB:

1. Connect Ethernet to the LAN port; router's LAN address should be at
   192.168.1.1
2. Connect another system to the router's LAN, and copy the factory.bin
   image over, via SCP and SSH:

     scp -O openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin root@192.168.1.1:
     ssh root@192.168.1.1 -C "dd if=/dev/zero bs=512 seek=7552991 of=/dev/mmcblk0 count=33 && \
     dd if=/root/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin of=/dev/mmcblk0"
3. Reboot and remove the USB drive.

== Developer mode beep ==

Note that every time you boot the OnHub in developer mode, the device
will play a loud "beep" after a few seconds. This is described in the
Chromium docs [2], and is intended to make it clear that the device is
not running Google software. It is nontrivial to completely disable this
beep, although it's possible to "acknowledge" developer mode (and skip
the beep) by using a USB keyboard to press CTRL+D every time you boot.

[1] https://openwrt.org/toh/google/wifi
[2] https://chromium.googlesource.com/chromiumos/docs/+/HEAD/developer_mode.md

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2023-01-21 01:02:25 +01:00
Brian Norris
69d1b289b0
ipq806x: Add kmod-sound-soc-ipq8064-storm
For IPQ8064 systems based off the "Google Storm" reference platform,
such as the TP-Link OnHub.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2023-01-21 01:02:25 +01:00
Brian Norris
c20915e841
ipq806x: ASoC: qcom: lpass-cpu: Fix fallback SD line index handling
This fixes device tree registration for 'qcom,lpass-cpu' as used by
qcom-ipq8064 SoCs, and allows speaker audio to function.

This patch has been submitted (and merged, for -next; likely v6.3)
upstream.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2023-01-21 01:02:24 +01:00
Brian Norris
108ed0e1c7
ipq806x: config-5.15: Normalize
Refresh target config with `make kernel_menuconfig`, then save the
result. This drops missing symbols or otherwise accounts for defaults.
It should not change any functionality.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2023-01-21 01:02:24 +01:00
Brian Norris
84ee3436a4
ipq806x: Point to externally compiled dtbs in recipes
Similar to commit 4d8b42d8a7 ("ipq40xx: point to externally compiled
dtbs in recipes").

Currently, we patch our DTS files into the kernel source tree, so the
kernel build process will produce DTBs for us. The kernel-to-DTS
dependency can cause buildroot to perform excessive rebuilds of the
kernel though, which slows down device development iteration.

Buildroot also compiles DTBs on its own, to
$(KDIR)/image-$(DEVICE_DTS).dtb. With small adjustments, we can leverage
this, and stop patching DTS files into the kernel Makefile at the same
time.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2023-01-21 01:02:24 +01:00
John Audia
2835df54ab kernel: bump 5.10 to 5.10.163
Removed upstreamed:
  generic/101-Use-stddefs.h-instead-of-compiler.h.patch[1]

All patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.163&id=ddd2bb08bd99b7ee4442fbbe0f9b80236fdd71d2

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-01-14 22:31:38 +01:00
John Audia
843e3dace7 kernel: bump 5.15 to 5.15.87
Removed upstreamed:
  generic/hack-5.15/290-net-dsa-mv88e6xxx-depend-on-PTP-conditionally.patch[1]

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.87&id=945e58bdaf6faf6e3f957d182244fa830acddab4

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-01-13 22:04:22 +01:00
Christian Marangi
55c32a6ce3
ipq806x: refresh upstreamed patch with kernel version tag
Refresh upstreamed patch with kernel version tag and replace them with
the upstream version.

For krait-cc patch rework them with the upstream changes.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-10 20:59:21 +01:00
Rafał Miłecki
11759a5bf3 kernel: backport of changes & helpers
This code is required for upcoming NVMEM changes.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-01-07 17:45:17 +01:00
Rafał Miłecki
69ea580882 treewide: update NVMEM symbols
Fixes: 8dfe69cdfc ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-01-07 01:30:31 +01:00
John Audia
738b04c881 kernel: bump 5.15 to 5.15.86
Removed upstreamed:
  pending-5.15/101-Use-stddefs.h-instead-of-compiler.h.patch[1]
  ipq806x/patches-5.15/122-01-clk-qcom-clk-krait-fix-wrong-div2-functions.patch[2]
  bcm27xx/patches-5.15/950-0198-drm-fourcc-Add-packed-10bit-YUV-4-2-0-format.patch[3]

Manually rebased:
  ramips/patches-5.15/100-PCI-mt7621-Add-MediaTek-MT7621-PCIe-host-controller-.patch[4]

Added patch/backported:
  ramips/patches-5.15/107-PCI-mt7621-Add-sentinel-to-quirks-table.patch[5]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.86&id=c160505c9b574b346031fdf2c649d19e7939ca11
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.86&id=a051e10bfc6906d29dae7a31f0773f2702edfe1b
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.86&id=ec1727f89ecd6f2252c0c75e200058819f7ce47a
4. Quilt gave this output when I applied the patch to rebase it:
% quilt push -f
Applying patch platform/100-PCI-mt7621-Add-MediaTek-MT7621-PCIe-host-controller-.patch
patching file arch/mips/ralink/Kconfig
patching file drivers/pci/controller/Kconfig
patching file drivers/pci/controller/Makefile
patching file drivers/staging/Kconfig
patching file drivers/staging/Makefile
patching file drivers/staging/mt7621-pci/Kconfig
patching file drivers/staging/mt7621-pci/Makefile
patching file drivers/staging/mt7621-pci/TODO
patching file drivers/staging/mt7621-pci/mediatek,mt7621-pci.txt
patching file drivers/staging/mt7621-pci/pci-mt7621.c
Hunk #1 FAILED at 1.
Not deleting file drivers/staging/mt7621-pci/pci-mt7621.c as content differs from patch
1 out of 1 hunk FAILED -- saving rejects to file drivers/staging/mt7621-pci/pci-mt7621.c.rej
patching file drivers/pci/controller/pcie-mt7621.c
Applied patch platform/100-PCI-mt7621-Add-MediaTek-MT7621-PCIe-host-controller-.patch (forced; needs refresh)

Upon inspecting drivers/staging/mt7621-pci/pci-mt7621.c.rej, it seems that
the original patch wants to delete drivers/staging/mt7621-pci/pci-mt7621.c
but upstream's version was not an exact match.  I opted to delete that
file.

5. Suggestion by hauke: 19098934f9
"This patch is in upstream kernel, but it was backported to the old
staging driver in kernel 5.15."

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-01-03 23:55:45 +01:00
Christian Marangi
823ddab80e
ipq806x: 5.15: standardize wpq864 partition table
Compex WPQ864 contains a non standard partition table. Each partition
node should be named partition and should contain a valid reg.
Fix an extra "-" present after the reg for SBL2_1 partition.

Also add "0:" to each qcom default partition following smem naming.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-12-14 02:23:22 +01:00
Christian Marangi
266b261d39
ipq806x: 5.15: fix wrong boot-partitions values for split partitions
The refreshed patch actually use the format of <start size start size>
instead of <start end start end>. This cause boot fail since the rootfs
can't be mounted with these wrong values.

Fix it to the correct format in each affected dts.

Fixes: #11498
Fixes: 6134ba4a34 ("ipq806x: 5.15: add boot-partitions binding to fix block warning")
Tested-by: Matt Buczko <mbuczko@hotmail.com> # Askey RT4230W
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-12-14 02:23:22 +01:00
John Audia
6801c460b6 kernel: bump 5.10 to 5.10.158
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-12-11 02:43:28 +01:00
Christian Marangi
60fc93b359
ipq806x: disable cache and fabric devfreq driver to improve stability
It was tested that cache scaling currently cause instability problem.
This is probably caused by a latent misconfiguration that cause the L2
cache to be sourced from the wrong source and runs at an unstable freq
compared to the original QSDK fw.

To improve stability while the problem is bisected, disable the devfreq
drivers with minimal perf penality.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-11-26 00:38:31 +01:00
Edward Matijevic
2964e5024c
ipq806x: kernel ramoops storage for C2600/AD7200
Define the kernel crash log storage ramoops/pstore feature
for C2600/AD7200 and add kmod-ramoops to default.

Tested with C2600 only.

Signed-off-by: Edward Matijevic <motolav@gmail.com>
2022-11-09 17:07:15 +01:00
John Audia
52400e167d kernel: bump 5.10 to 5.10.152
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-30 17:54:59 +01:00
John Audia
aa2fa2eb76 kernel: bump 5.10 to 5.10.150
Manually rebased:
  bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
[Move gro_skip in 680-NET-skip-GRO-for-foreign-MAC-addresses.patch to old position]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-10-30 17:52:42 +01:00
Christian Marangi
5384c9337f
ipq806x: disable ea8500 image by default
Linksys EA8500 is currently broken after the kernel 5.15 bump. Disable
compiling it by default from buildbot to prevent brick from the user.

Don't mark it as BROKEN to permit user to compile images and permit devs
to bisect the problem with the users.

The current problem with the device is that the switch is not detected
and we can't comunicate with it via MDIO.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-28 01:16:00 +02:00
Christian Marangi
c4a9a67de8
ipq806x: disable ea8500 image by default
Linksys EA8500 is currently broken after the kernel 5.15 bump. Disable
compiling it by default from buildbot to prevent brick from the user.

Don't mark it as BROKEN to permit user to compile images and permit devs
to bisect the problem with the users.

The current problem with the device is that the switch is not detected
and we can't comunicate with it via MDIO.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-28 01:10:21 +02:00
Christian Marangi
ea63945b25
generic: 5.15: add missing CMDLINE_OVERRIDE patch
This patch was wrongly dropped with the assumption that it was moved to
generic. This wasn't the case and caused the malfunction of the Asrock
G10 router.

Reintroduce it to fix Asrock G10 functionality.

Fixes: 8cc2caed58 ("ipq806x: 5:15: add testing kernel version")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-25 01:29:45 +02:00
Christian Marangi
1c514f05ab
ipq806x: 5.15: drop mmc-ddr-1_8v from sdcc1 node
Zyxel NGB6817 is the only router that use mmc for rootfs. Upstream
kernel dtsi have mmc-ddr-1_8v enabled for sddc1. This is wrong as mmc on
ipq806x is supplied by a fixed 3.3v regulator and can't operate at 1.8v.
This cause the sddc1 to malfunction and cause kernel panic.
In old 5.15 version this was disabled but it was put in addition to many
other changes so it was dropped silently. Restore this patch to fix
working condition of such router.

Fixes: 88bf652 ("ipq806x: 5.15: replace dtsi patches with upstream version")
Fixes: #11000
Tested-by: Hendrik Koerner <koerhen@web.de>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-25 01:29:45 +02:00
Christian Marangi
a87b6cda02
ipq806x: 5.15: revert unwanted DSA conversion for ASRock G10
In refreshing DTS to the upstream version an unwanted change slipped in
the commit. The ASRock G10 dts got converted to DSA without any support.

Revert this to swconfig driver to restore normal functionality.

Fixes: 88bf652525 ("ipq806x: 5.15: replace dtsi patches with upstream version")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-25 01:29:45 +02:00
Christian Marangi
dd2515cb53
ipq806x: 5.15: backport qcom_nandc patch for unprotected spare data fix
We currently ignore ret of the nandc partition parser if unprotected
spare data is true. This is the case for ipq806x nand.

Backport patch that fix this error and correctly handle error from
partition parser.

Fixes: ae6a63bc97 ("ipq806x: 5.15: replace nandc patch with upstream version")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-25 01:29:44 +02:00
Christian Marangi
4611fdd759
ipq806x: 5.15: add 6.1 tag to upstream patch
Add 6.1 tag to upstream patch now that 6.1 got tagged. This permits to
track patch in a better way and directly drop them on kernel bump.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-18 22:21:04 +02:00
Christian Marangi
1b147bec1a
ipq806x: 5.15: refresh target patches
Refresh ipq806x target patches for kernel 5.15.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-17 00:40:16 +02:00
Christian Marangi
bb451eccaa
ipq806x: switch to 5.15 kernel by default
Switch to 5.15 kernel by default to promote more wider testing and use
better upstream patch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:46 +02:00