Commit Graph

795 Commits

Author SHA1 Message Date
Mathias Kresin
1470009bf8 kernel: 5.10: packet mangling code only for ar8216 driver
Only the ar8216 switch driver uses the packet mangling code.

Update the kernel configs accordingly.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2021-11-02 22:36:41 +01:00
Robert Marko
76fff69180 ipq806x: ecw5410: use bootloader provided MAC-s
Currently, we are overriding the bootloader provided MAC-s as the ethernet
aliases are reversed so MAC-s were fixed up in userspace.
There is no need to do that as we can just fix the aliases instead and get
rid of MAC setting via userspace helper.

Fixes: 59f0a0f ("ipq806x: add Edgecore ECW5410 support")

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-10-31 21:24:47 +01:00
Robert Marko
2e3c79ef83 ipq806x: ecw5410: fix PCI1 radio caldata
ECW5410 has 2 QCA9984 cards, one per PCI controller.
They are located at PCI adresses 0001:01:00.0 and 0002:01:00.0.

Currently, pre-cal is not provided for 0001:01:00.0 at all,but for
0000:01:00.0 which is incorrect and causes the ath10k driver to not
be able to fetch the BMI ID and use that to fetch the proper BDF but
rather fail with:
[   12.029708] ath10k 5.10 driver, optimized for CT firmware, probing pci device: 0x46.
[   12.031816] ath10k_pci 0001:01:00.0: enabling device (0140 -> 0142)
[   12.037660] ath10k_pci 0001:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   13.173898] ath10k_pci 0001:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[   13.174015] ath10k_pci 0001:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   13.189304] ath10k_pci 0001:01:00.0: firmware ver 10.4b-ct-9984-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc35
[   15.492322] ath10k_pci 0001:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0046,subsystem-vendor=168c,subsystem-device=cafe,variant=Edgecore-ECW541 from ath10k/QCA9984/hw1.0/board-2.bin
[   15.543883] ath10k_pci 0001:01:00.0: failed to fetch board-2.bin or board.bin from ath10k/QCA9984/hw1.0
[   15.543920] ath10k_pci 0001:01:00.0: failed to fetch board file: -12
[   15.552281] ath10k_pci 0001:01:00.0: could not probe fw (-12)

So, provide the pre-cal for the actual PCI card and not the non-existent
one.

Fixes: 59f0a0f ("ipq806x: add Edgecore ECW5410 support")

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-10-31 21:24:47 +01:00
Robert Marko
fa3646c003 ipq806x: ecw5410: drop GPIO based MDIO1 node
It looks like this is a leftover before there was a proper MDIO driver.
Since both PHY-s are connected to the HW MDIO bus there is no reason for
this to exist anymore, especially since it uses the same pins as the HW
controller and has the pinmux for the set to "MDIO" so this worked by
pure luck as GPIO MDIO would probe first and override the HW driver.

Move the GMAC3 to simply use the same MDIO bus phandle.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-10-31 21:24:47 +01:00
Adrian Schmutzler
fbddb38442 ipq806x: consolidate 11-ath10k-caldata
After the ath10k_patch_mac lines have been removed, a lot of blocks
can be consolidated.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-30 22:11:23 +02:00
Adrian Schmutzler
6a27e8036e ipq806x: remove transition workarounds for qcom-smem partitions
The out-of-tree qcom-smem patches traditionally displayed mtd partition names
in upper case, starting with the new mainline qcom-smem support in kernel v5.10,
it switched to normalizing the partition names to lower case.

While both 5.4 and 5.10 were supported in the target, we carried a workaround
to support both of them. Since the target has dropped 5.4 recently, those
can be removed now.

Ref:

2db9dded0a ("ipq806x: nbg6817: case-insensitive qcom-smem partitions")
435dc2e77e ("ipq806x: ecw5410: case-insensitive qcom-smem partitions")
f70e11cd97 ("ipq806x: g10: case-insensitive qcom-smem partitions")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-30 22:11:23 +02:00
Ansuel Smith
f44e933458 ipq806x: provide WiFI mac-addresses from dts
Use nvmem framework for supported mac-address stored
in nvmem cells and drop mac patch function for hotplug
script for supported devices.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[rebase, move to correct node for d7800, include xr500]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-30 22:11:13 +02:00
Rui Salvaterra
02026d0a6f kernel: bump 5.10 to 5.10.76
Deleted (upstreamed):
bcm27xx/patches-5.10/950-0145-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch [1]

Manually rebased:
bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch

Note: although automatically rebaseable, the last patch has been edited to avoid
conflicting bit definitions.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=b6f32897af190d4716412e156ee0abcc16e4f1e5

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-10-30 21:17:20 +02:00
Peter Geis
70c12d26ca ipq806x: add support for Netgear Nighthawk Pro Gaming XR500
This adds support for the Netgear Nighthawk Pro Gaming XR500.
It is the successor to the Netgear Nighthawk R7800 and shares almost
identical hardware to that device.
The stock firmware is a heavily modified version of OpenWRT.

Specifications:
  SoC: Qualcomm Atheros IPQ8065
  RAM: 512 MB
  Storage: 256 MiB NAND Flash
  Wireless: 2x Qualcomm Atheros QCA9984
  Ethernet: 2x 1000/100/10 dedicated interfaces
  Switch: 5x 1000/100/10 external ports
  USB: 2x 3.0 ports

More information:
Manufacturer page: https://www.netgear.com/gaming/xr500/
Almost identical to Netgear R7800
Differences (r7800 > xr500):
  Flash: 128MiB > 256MiB
  Removed esata
  swapped leds:
    usb1 (gpio 7 > 8)
    usb2 (gpio 8 > 26)
    guest/esata (gpio 26 > 7)

MAC addresses:

On the OEM firmware, the mac addresses are:

  WAN: *:50  art 0x6
  LAN: *:4f  art 0x0 (label)
  2G:  *:4f  art 0x0
  5G:  *:51  art 0xc

Installation:
Install via Web Interface (preferred):
Utilize openwrt-ipq806x-netgear_xr500-squashfs-factory.img

Install via TFTP recovery:
1.Turn off the power, push and hold the reset button (in a hole on
  backside) with a pin
2.Turn on the power and wait till power led starts flashing white
  (after it first flashes orange for a while)
3.Release the reset button and tftp the factory img in binary mode.
  The power led will stop flashing if you succeeded in transferring
  the image, and the router reboots rather quickly with the new
  firmware.
4.Try to ping the router (ping 192.168.1.1). If does not respond,
  then tftp will not work either.

Uploading the firmware image with a TFTP client
$ tftp 192.168.1.1
bin
put openwrt-ipq806x-netgear_xr500-squashfs-factory.img

Note:

The end of the last partition is at 0xee00000. This was chosen
by the initial author, but nobody was able to tell why this
particular arbitrary size was chosen. Since it's not leaving
too much empty space and it's the only issue left, let's just
keep it for now.

Based on work by Adam Hnat <adamhnat@gmail.com>
ref: https://github.com/openwrt/openwrt/pull/3215

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
[squash commits, move common LEDs to DTSI, remove SPDX on old
 files, minor whitespace cleanup, commit message facelift,
 add MAC address overview, add Notes, fix MAC addresses,
 use generic name for partition nodes in DTS]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-26 22:30:18 +02:00
Paul Spooren
b48d30521d ipq806x: remove obsolete Kernel 5.4
With the upgrade to Kernel 5.10 per default the old version is no longer
required to be in tree.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-10-02 18:15:23 +02:00
Hauke Mehrtens
50f456b46c kernel: bump 5.4 to 5.4.150
Manually rebased:
  generic/pending-5.4/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch
  mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch

Removed upstreamed:
  layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch

All others updated automatically.

Compile-tested on: lantiq/xrx200, armvirt/64
Runtime-tested on: lantiq/xrx200, armvirt/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-02 16:45:56 +02:00
Rui Salvaterra
6e7fadb0c7 kernel: bump 5.10 to 5.10.67
Deleted (upstreamed):
bcm27xx/patches-5.10/950-0312-vc4_hdmi-Set-HD_CTL_WHOLSMP-and-HD_CTL_CHALIGN_SET.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-09-30 22:29:33 +01:00
Ansuel Smith
0470159552 ipq806x: switch to kernel 5.10
Move kernel version to 5.10 as has been tested by many users
with positive feedback.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[Tested on: ipq8064/g10; ipq8065/nbg6817]
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2021-09-12 18:52:30 +02:00
Hauke Mehrtens
b9cc16a5e8 kernel: Set CONFIG_RCU_CPU_STALL_TIMEOUT=21
The default value for CONFIG_RCU_CPU_STALL_TIMEOUT was changed from 60
seconds to 21 seconds in 2012 in the upstream kernel. Some targets
already use 21 seconds.

This patch changes the default value in the generic configuration to 21
seconds and removes the target specific configuration options.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-09-09 20:24:12 +02:00
Filip Matijević
e2b03c16eb ipq806x: add missing enclosing partitions block for TP-Link C2600
The partitions that have compatible property set are skipped by mtd if
they are not contained inside a partitions node and this breaks
fetching MAC address from "default-mac" partition.

Fix this by defining all the partitions inside partitions node with
compatible = "fixed-partitions" as nvmem requires the standard
partitions scheme to work correctly.

Fixes: FS#3945
Fixes: cd36d71655 ("ipq806x/dts: Add Archer C2600 DTS")
Fixes: 0458a8993c ("ipq806x: convert mtd-mac-address to nvmem
implementation")

Signed-off-by: Filip Matijević <filip.matijevic.pz@gmail.com>
Reviewed-by: Ansuel Smith <ansuelsmth@gmail.com>
[adjust commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-30 00:37:35 +02:00
Rui Salvaterra
505b7a2d08 kernel: move two symbols to the generic kconfigs
CONFIG_RCU_{NEED_SEGCBLIST,STALL_COMMON} are set basically everywhere. Move them
to the generic kconfigs. And resort the generic kconfigs while at it.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-29 17:07:19 +02:00
Chukun Pan
269758a5bc ipq806x: Askey RT4230W REV6: use usual writing for pcie part
The problem has been fixed in f47cb405ca ("ipq806x: fix pci broken
on bootm command"), now the pcie part can be written in the usual way.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-08-25 01:42:16 +02:00
Chukun Pan
fcc075e12f ipq806x: Askey RT4230W REV6: fix caldata script
The partition name in the device dts is '0:ART'.
Be independent to prevent this part from becoming
incorrect once the kernel v5.4 gone.

Fixes: da8428d277 ("ipq806x: add support for Askey RT4230W REV6")

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2021-08-24 20:26:00 +02:00
Shane Synan
9baca41064 ipq806x: fix min<>target opp-microvolt DTS mixup
Rearrange all voltage triplets for "opp_table0" to match the
specifications.  "opp-microvolt" and "opp-microvolt-<name>" triplets
are in order of <target min max>, and NOT <min target max>.

Previously, the CPU would *always* spend its time at the "minimum"
voltage, ignoring the actual intended target.  This is a regression
from previous behavior.

On an NBG6817 with a Qualcomm CPU of PVS bin #2...
(see &opp_table0 -> opp-1725000000 -> opp-microvolt-speed0-pvs2-v0)

* Before:
/usr/bin/tail -n +1 /sys/kernel/debug/opp/cpu0/opp\:1725000000/supply-0/u_volt_*
==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_max <==
1260000

==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_min <==
1200000

==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_target <==
1140000

* After:
/usr/bin/tail -n +1 /sys/kernel/debug/opp/cpu0/opp\:1725000000/supply-0/u_volt_*
==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_max <==
1260000

==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_min <==
1140000

==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_target <==
1200000

To check voltages and frequencies at run time, use...
/bin/cat /sys/kernel/debug/regulator/regulator_summary &&
  /bin/cat /sys/kernel/debug/clk/clk_summary | grep "hfpll"

See
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/bindings/opp/opp.txt?h=v5.4.142#n91

Fixes: 1e25423be8 ("ipq806x: refresh dtsi patches")

Signed-off-by: Shane Synan <digitalcircuit36939@gmail.com>
Reviewed-by: Ansuel Smith <ansuelsmth@gmail.com>
[commit message style cleanup, another kernel refresh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-21 23:54:31 +02:00
Ansuel Smith
0458a8993c ipq806x: convert mtd-mac-address to nvmem implementation
Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
The conversion is done with an automated script.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-07-19 14:51:22 +02:00
Ansuel Smith
d284e6ef0f treewide: convert mtd-mac-address-increment* to generic implementation
Rework patch 681-NET-add-mtd-mac-address-support to implement
only the function to read the mac-address from mtd.
Generalize mtd-mac-address-increment function so it can be applied
to any source of of_get_mac_address.
Rename any mtd-mac-address-increment to mac-address-increment.
Rename any mtd-mac-address-increment-byte to mac-address-increment-byte.

This should make simplify the conversion of target to nvmem implementation.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-07-19 14:51:22 +02:00
Adrian Schmutzler
cce8d16bf1 treewide: call check-size before append-metadata
sysupgrade metadata is not flashed to the device, so check-size
should be called _before_ adding metadata to the image.

While at it, do some obvious wrapping improvements.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Paul Spooren <mail@aparcar.org>
2021-07-10 19:40:10 +02:00
Ansuel Smith
5e52f96714 ipq806x: fix dedicated cpufreq driver
2 small fix for the dedicated cpufreq driver:
- Fix index wrongly used as the current cpu
- Exit early if a bad freq is detected. In the current state the freq
is applied anyway even with invalid state.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-06-30 23:14:43 +02:00
Ansuel Smith
014aac7944 ipq806x: fix missing 1.4ghz cache freq for ipq8065 SoC
With the new implementation of the dedicated cpufreq driver,
the 1.4 Ghz was only dropped and not added to the ipq8065 SoC.
Fix this to improve performance.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-06-30 23:14:43 +02:00
Ansuel Smith
aeee1bd2da ipq806x: fix missing changes in 5.4 for new cpufreq implementation
The new cpufreq dedicated driver changed the node structure
on how the cache should be defined in the dts. The 5.4 dtsi addition
patch has not been updated to follow the new implementation.
Fix this to restore correct cache scaling and restore any performance
regression.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-06-30 23:14:43 +02:00
John Audia
f727005ae9 ipq806x: refresh config for kernel 5.4
* With kernel 5.4.128, ran: make kernel_menuconfig CONFIG_TARGET=generic
* Manually added back CONFIG_LEDS_TRIGGER_DISK=y so as not to revert
  f93fcf8923 ("ipq806x: enable disk-activity LED trigger")

Signed-off-by: John Audia <graysky@archlinux.us>
[minor commit title/message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-28 01:06:08 +02:00
Alex Henrie
6fb27e8e6d ipq806x: fix LAN and WAN port assignments on TP-Link AD7200
LAN port 4 was swapped with the WAN port and the remaining three LAN
ports were numbered in reverse order from their labels on the case.

Fixes: 1a775a4fd0 ("ipq806x: add support for TP-Link Talon AD7200")
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2021-06-06 00:26:13 +02:00
Adrian Schmutzler
6f648ed7e6 treewide: remove "+" sign for increment with macaddr_add
Many people appear to use an unneeded "+" prefix for the increment
when calculating a MAC address with macaddr_add. Since this is not
required and used inconsistently [*], just remove it.

[*] As a funny side-fact, copy-pasting has led to almost all
    hotplug.d files using the "+", while nearly all of the
    02_network files are not using it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-05 23:54:37 +02:00
Lauro Moreno
da8428d277 ipq806x: add support for Askey RT4230W REV6
This adds support for the Askey RT4230W REV6
(Branded by Spectrum/Charter as RAC2V1K)

At this time, there's no way to reinstall the stock firmware so don't install
this on a router that's being rented.

Specifications:

    Qualcomm IPQ8065
    1 GB of RAM (DDR3)
    512 MB Flash (NAND)
    2x Wave 2 WiFi cards (QCA9984)
    5x 10/100/1000 Mbps Ethernet (Switch: QCA8337)
    1x LED (Controlled by a microcontroller that switches it between red and
        blue with different patterns)
    1x USB 3.0 Type-A
    12V DC Power Input
    UART header on PCB - pinout from top to bottom is RX, TX, GND, 5V
    Port settings are 115200n8

More information: https://forum.openwrt.org/t/askey-rac2v1k-support/15830
https://deviwiki.com/wiki/Askey_RAC2V1K

To check what revision your router is, restore one of these config backups
through the stock firmware to get ssh access then run
"cat /proc/device-tree/model".
https://forum.openwrt.org/t/askey-rac2v1k-support/15830/17
The revision number on the board doesn't seem to be very consistent so that's
why this is needed. You can also run printenv in the uboot console and if
machid is set to 177d, that means your router is rev6.

Note: Don't install this if the router is being rented from an ISP. The defined
partition layout is different from the OEM one and even if you changed the
layout to match, backing up and restoring the OEM firmware breaks /overlay so
nothing will save and the router will likely enter a bootloop.

How to install:

Method 1: Install without opening the case using SSH and tftp

    You'll need:
    RAC2V1K-SSH.zip:
https://github.com/lmore377/openwrt-rt4230w/blob/master/RAC2V1K-SSH.zip
    initramfs and sysupgrade images

    Connect to one of the router's LAN ports

    Download the RAC2V1K-SSH.zip file and restore the config file that
corresponds to your router's firmware (If you're firmware is newer than what's
in the zip file, just restore the 1.1.16 file)

    After a reboot, you should be able to ssh into the router with username:
"4230w" and password: "linuxbox" or "admin". Run the following commannds
     fw_setenv ipaddr 10.42.0.10 #IP of router, can be anything as long as
it's in the same subnet as the server
     fw_setenv serverip 10.42.0.1# #IP of tftp server that's set up in next
steps
     fw_setenv bootdelay 8
     fw_setenv bootcmd "tftpboot initramfs.bin; bootm; bootipq"

    Don't reboot the router yet.

    Install and set up a tftp server on your computer

    Set a static ip on the ethernet interface of your computer (use this for
serverip in the above commands)

    Rename the initramfs image to initramfs.bin, and host it with the tftp
server

    Reboot the router. If you set up everything right, the router led should
switch over to a slow blue glow which means openwrt is booted. If for some
reason the file doesn't get loaded into ram properly, it should still boot to
the OEM firmware.
    After openwrt boots, ssh into it and run these commands:
    fw_setenv bootcmd "setenv mtdids nand0=nand0 && setenv mtdparts
 mtdparts=nand0:0x1A000000@0x2400000(firmware) && ubi part firmware && ubi
read 0x44000000 kernel 0x6e0000 && bootm"
    fw_setenv bootdelay 2

    After openwrt boots up, figure out a way to get the sysupgrade file onto it
(scp, custom build with usb kernel module included, wget, etc.) then flash it
with sysupgrade. After it finishes flashing, it should reboot, the light should
start flashing blue, then when the light starts "breathing" blue that means
openwrt is booted.

Method 2: Install with serial access (Do this if something fails and you can't
boot after using method 1)

    You'll need:
    initramfs and sysupgrade images
    Serial access:
https://openwrt.org/inbox/toh/askey/askey_rt4230w_rev6#opening_the_case

    Install and set up a tftp server

    Set a static ip on the ethernet interface of your computer

    Download the initramfs image, rename it to initramfs.bin, and host it with
the tftp server

    Connect the wan port of the router to your computer

    Interrupt U-Boot and run these commands:
    setenv serverip 10.42.0.1 (You can use whatever ip you set for the computer)
    setenv ipaddr 10.42.0.10 (Can be any ip as long as it's in the same subnet)
    setenv bootcmd "setenv mtdids nand0=nand0 &&
set mtdparts mtdparts=nand0:0x1A000000@0x2400000(firmware) && ubi part firmware
&& ubi read 0x44000000 kernel 0x6e0000 && bootm"

    saveenv
    tftpboot initramfs.bin
    bootm

    After openwrt boots up, figure out a way to get the sysupgrade file onto it
(scp, custom build with usb kernel module included, wget, etc.) then flash it
with sysupgrade. After it finishes flashing, it should reboot, the light should
start flashing blue, then when the light starts "breathing" blue that means
openwrt is booted.

Signed-off-by: Lauro Moreno <lmore377@gmail.com>
[add entry in 5.10 patch, fix whitespace issues]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-05 23:39:14 +02:00
Ansuel Smith
21d4b228d1 ipq806x: fix warning about tsens debugfs already registered
Backport a pending patch already reviewed that fix some warning about tsens debugs already registered.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-23 15:09:06 +02:00
Ansuel Smith
e5d50f69e8 ipq806x: reduce pci IO space to 64k
With some talk with the ARM maintainer, it was notice that enlarging the limit
to the current value is VERY wrong and clash with other memory.
A better solution would be to reduce the IO space from 1MB to 64K as probably
it's a long lasting typo and even x86 arch doesn't have a IO space that big.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-23 15:09:06 +02:00
John Audia
fec92f1ec3 kernel: bump 5.4 to 5.4.120
Removed upstreamed:
  generic/pending-5.4/770-02-net-ethernet-mtk_eth_soc-fix-rx-vlan-offload.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Note that since I rebased the previous commit, I removed my Run-tested line
although I confirm building the image successfully.

Signed-off-by: John Audia <graysky@archlinux.us>
2021-05-23 15:09:06 +02:00
Rui Salvaterra
8615573ac1 kernel: bump 5.10 to 5.10.38
Automatically refreshed:
apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch
generic/backport-5.10/610-v5.13-31-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch
generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch
generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch
generic/hack-5.10/204-module_strip.patch
generic/hack-5.10/911-kobject_add_broadcast_uevent.patch
ipq806x/patches-5.10/104-1-drivers-thermal-tsens-Add-VER_0-tsens-version.patch
ipq806x/patches-5.10/104-8-drivers-thermal-tsens-Add-support-for-ipq8064-tsens.patch

Deleted (reverse-appliable):
generic/backport-5.10/610-v5.13-37-net-ethernet-mtk_eth_soc-fix-RX-VLAN-offload.patch
ipq806x/patches-5.10/106-5.13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-05-22 21:54:17 +01:00
Rui Salvaterra
d337731f85 kernel: bump 5.10 to 5.10.37
Automatically refreshed:
ath79/patches-5.10/0032-MIPS-ath79-sanitize-symbols.patch
bcm63xx/patches-5.10/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch
bcm63xx/patches-5.10/434-nand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch
bmips/patches-5.10/001-v5.11-mips-bmips-select-ARCH_HAS_RESET_CONTROLLER.patch
bmips/patches-5.10/041-v5.13-mtd-rawnand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch
bmips/patches-5.10/202-mips-bmips-disable-ARCH_HAS_SYNC_DMA_FOR_CPU_ALL.patch
bmips/patches-5.10/600-mips-bmips-add-pci-support.patch
generic/backport-5.10/103-v5.13-MIPS-select-CPU_MIPS64-for-remaining-MIPS64-CPUs.patch
generic/hack-5.10/301-mips_image_cmdline_hack.patch
generic/hack-5.10/402-mtd-blktrans-call-add-disks-after-mtd-device.patch
generic/hack-5.10/902-debloat_proc.patch
generic/pending-5.10/300-mips_expose_boot_raw.patch
generic/pending-5.10/495-mtd-core-add-get_mtd_device_by_node.patch
generic/pending-5.10/630-packet_socket_type.patch
ipq806x/patches-5.10/0072-add-ipq806x-with-no-clocks.patch
ipq806x/patches-5.10/099-1-mtd-nand-raw-qcom_nandc-add-boot_layout_mode-support.patch
lantiq/patches-5.10/0001-MIPS-lantiq-add-pcie-driver.patch
lantiq/patches-5.10/0023-NET-PHY-add-led-support-for-intel-xway.patch
lantiq/patches-5.10/0152-lantiq-VPE.patch

Deleted (reverse-appliable):
bmips/patches-5.10/052-v5.13-gpio-guard-gpiochip_irqchip_add_domain-with-GPIOLIB_.patch
generic/backport-5.10/499-v5.13-mtd-don-t-lock-when-recursively-deleting-partitions.patch

Deleted (alternative upstream fix):
ramips/patches-5.10/330-fix-pci-init-mt7620.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-05-14 14:50:03 +01:00
Rui Salvaterra
6a57e1fbfc kernel: bump 5.10 to 5.10.36
Automatically refreshed:
apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch
ath79/patches-5.10/410-spi-ath79-Implement-the-spi_mem-interface.patch
bcm63xx/patches-5.10/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch
generic/pending-5.10/465-m25p80-mx-disable-software-protection.patch
ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch
ipq806x/patches-5.10/101-dwmac-ipq806x-qsgmii-pcs-all-ch-ctl.patch
ipq806x/patches-5.10/106-5.13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch

Deleted (empty or reverse-appliable):
ath79/patches-5.10/411-spi-ath79-add-SPI_MASTER_GPIO_SS-flag.patch
ath79/patches-5.10/0050-spi-ath79-remove-spi-master-setup-and-cleanup-assign.patch
ath79/patches-5.10/0054-spi-sync-up-initial-chipselect-state.patch

Manually refreshed:
ath79/patches-5.10/0033-spi-ath79-drop-pdata-support.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-05-14 08:46:45 +01:00
Petr Štetiar
ce8af0ace0 ipq806x: base-files: asrock: fix bootcount include
Fixes following error while executing the init script on the buildhost:

 Enabling boot
 ./etc/init.d/bootcount: line 5: /lib/upgrade/asrock.sh: No such file or directory
 Enabling bootcount

While at it fix following shellcheck issue:

 base-files/etc/init.d/bootcount line 11:
    if [ $? -eq 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.

Cc: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Pawel Dembicki <paweldembicki@gmail.com>
Cc: Christian Lamparter <chunkeey@gmail.com>
Fixes: 98b86296e6 ("ipq806x: add support for ASRock G10")
References: https://gitlab.com/ynezz/openwrt/-/jobs/1243290743#L1444
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-05-13 15:13:15 +02:00
Kevin Darbyshire-Bryant
f35dbef6d2 kernel: bump 5.10 to 5.10.35
Refresh kernel patches.

Built under MacOS

Run tested: x86_64 (apu2)

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2021-05-09 09:55:58 +01:00
Mark Mentovai
62850e7a77 ipq806x: Bring missing patches from 5.4 to 5.10
Kernel 5.10 support for ipq806x was added at the same time that these
patches were developed for kernel 5.4. This carries the patches forward
to kernel 5.10.

fa731838c5 ipq806x: dwmac: clear forced speed during probe
75ca641f1b ipq806x: Add "snps,dwmac" to all gmac compatible=
d62825dd77 ipq806x: dwmac: set forced speed when using fixed-link

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Run-tested: ipq806x/ubnt,unifi-ac-hd
Cc: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-09 09:15:44 +02:00
Mark Mentovai
a1afeb9270 ipq806x: Add mising devices to kernel 5.10
d53be2a2e9 migrated 0069-arm-boot-add-dts-files.patch from patches-5.4
to patches-5.10, but a subsequent patch in that set, 1e25423be8,
erroneously removed several devices:

ipq8062/nec,wg2600hp3 from 3bb1618573
ipq8064/asrock,g10 from 98b86296e6
ipq8064/ubnt,unifi-ac-hd from 4e46beb313

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Run-tested: ipq806x/ubnt,unifi-ac-hd
Cc: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-09 09:15:44 +02:00
John Audia
da16b801a3 kernel: bump 5.4 to 5.4.117
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-05-09 09:15:44 +02:00
Stefan Lippers-Hollmann
435dc2e77e ipq806x: ecw5410: case-insensitive qcom-smem partitions
The out-of-tree qcom-smem patches traditionally displayed mtd partition names
in upper case, starting with the new mainline qcom-smem support in kernel v5.10,
it switches to normalizing the partition names to lower case.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2021-05-08 18:45:42 +02:00
Stefan Lippers-Hollmann
f70e11cd97 ipq806x: g10: case-insensitive qcom-smem partitions
The out-of-tree qcom-smem patches traditionally displayed mtd partition names
in upper case, starting with the new mainline qcom-smem support in kernel v5.10,
it switches to normalizing the partition names to lower case.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2021-05-08 18:45:42 +02:00
Stefan Lippers-Hollmann
2db9dded0a ipq806x: nbg6817: case-insensitive qcom-smem partitions
The out-of-tree qcom-smem patches traditionally displayed mtd partition names
in upper case, starting with the new mainline qcom-smem support in kernel v5.10,
it switches to normalizing the partition names to lower case.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2021-05-08 18:45:42 +02:00
Mark Mentovai
d62825dd77 ipq806x: dwmac: fix GMACs connected via SGMII fixed-link
fa731838c5 cleared the forced speed in the QSGMII PCS_ALL_CH_CTL
register during probe, but this is only correct for GMACs that are not
configured with fixed-link. This prevented GMACs configured with both
phy-mode = "sgmii" and fixed-link from working properly, as discussed at
https://github.com/openwrt/openwrt/pull/3954#issuecomment-834625090 and
the comments that follow. Notably, this prevented all communication
between gmac2 and the switch on the Netgear R7800.

The correct behavior is to set the QSGMII PCS_ALL_CH_CTL register by
considering the gmac's fixed-link child, setting the speed as directed by
fixed-link if present, and otherwise clearing it as was done previously.

Fixes: fa731838c5 ("ipq806x: dwmac: clear forced speed during probe")
Signed-off-by: Mark Mentovai <mark@moxienet.com>
Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
Run-tested: ipq806x/ubnt,unifi-ac-hd, ipq806x/netgear,r7800
Cc: Petr Štetiar <ynezz@true.cz>
Cc: Ansuel Smith <ansuelsmth@gmail.com>
Tested-by:  Ansuel Smith <ansuelsmth@gmail.com>
2021-05-08 18:45:42 +02:00
Ansuel Smith
3bae740311 ipq806x: add missing wakeup-source for gpio keys
wakeup-source is required for gpio keys to fix error
genirq: irq_chip msmgpio did not update eff. affinity mask

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
1603d09964 ipq806x: apply correct voltage tolerance
Voltage tolerance was 5%, not 5000. Update min and max voltage of the target opp.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
4cd43af0de ipq806x: fix missing tx/rx fifo depth gmac configuration
tx/rx-fifo-depth is required to set mtu to the gmac. Backport upstream patch.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
db2c147cf4 ipq806x: refresh 5.10 patches
make target/linux/kernel refresh

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
d079c8fa48 ipq806x: simplify ecw5410 dts
Simplify ecw5410 dts instead of redefine nodes.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
e3daef34a0 ipq806x: set boot layout for nandc compatible
Set boot layout size to fix io error on block scan.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
85adcec3ba ipq806x: add kernel 5.10 as testing kernel
Add kernel 5.10 as testing kernel

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
9e843a9b8a ipq806x: refresh config 5.10
Refresh config for kernel 5.10.
- Added new symbol.
- Refreshed with make kernel_oldconfig

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
1e25423be8 ipq806x: refresh dtsi patches
- Add new tsens node
- Add new cpufreq required nodes
- Drop arm cpuidle compatible
- Fix duplicate node set upstream
- Add voltage tolerance value for cpu opp

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
62cc66fa67 ipq806x: introduce nandc boot layout mode
ipq806x have different ecc configuration for boot partition and rootfs partition. Add support for this to fix IO error on mtd block scan.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
fdb739bef6 ipq806x: fix broken pci2 and pci3
pci2 and pci3 has a too big io address space. Enlarge the IO_SPACE_LIMIT define for the arm arch.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
6e411b8416 ipq806x: backport cpufreq changes to 5.4
The new cpufreq driver requires different dts bindings.
Backport the new driver to kernel 5.4

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
5dbbefcbcc ipq806x: introduce dedicated krait cpufreq
- Drop cpufreq patchs that tweak the cpufreq-dt driver
- Add dedicated krait cpufreq driver

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
e17fb62293 ipq806x: drop upstream patch
Drop upstream patch already included in the kernel 5.10

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
e2b0ad1114 ipq806x: drop cpuidle generic support from QCOM
The spm driver now has dedicated support for krait cpu idle state. We don't need to add generic arm cpuidle support for qcom.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
c864f587a2 ipq806x: backport mtd adm and smem driver
- Backport mtd adm driver from kernel 5.12
- Backport mtd parser smem from kernel 5.11
- Fix mtd rootfs patch
- Update qcom,smem compatible to qcom,smem-parts

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
cde218d14b ipq806x: fix missing clk and reset
Patch 0030 wrongly disables gsbi1 instead of gsbi4.
Fix the wrong patch and also include other fix from the original qsdk source.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
96f10c9d7a ipq806x: use newer tsens patch
Use improved tsens patch proposed upstream.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
d53be2a2e9 ipq806x: copy kernel 5.4 patches to 5.10
Copy kernel 5.4 patches and config to 5.10

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith
861b82d36a ipq806x: improve system latency
Various report and data show that the freq 384000 is too low and cause some
extra latency to the entire system. OEM qsdk code also set the min frequency
for this target to 800 mhz.
Also some user notice some instability with this idle frequency, solved by
setting the min frequency to 600mhz. Fix all these kind of problem by
introducing a boot init.d script that set the min frequency to 600mhz and set
the ondemand governor to be more aggressive. The script set these value only if
the ondemand governor is detected. 384 mhz freq is still available and user can
decide to restore the old behavior by disabling this script.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Mark Mentovai
75ca641f1b ipq806x: Add "snps,dwmac" to all gmac compatible=
This was introduced to gmac2 and gmac3 in 57ea767a53 without fanfare.
There's no indication of why it was added to those devices, but not to
gmac0 or gmac1. It was probably an unintentional omission. It should be
present on all four gmac devices.

This property is considered by
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
stmmac_probe_config_dt.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Build-tested: ipq806x/ubnt,unifi-ac-hd
Run-tested: ipq806x/ubnt,unifi-ac-hd
2021-05-07 07:05:16 +02:00
Mark Mentovai
565814a5ee ipq806x: ubnt,unifi-ac-hd: reorder eth0 and eth1
The Ubiquiti UniFi AC HD (UAP-AC-HD, UAP301) has two Ethernet ports,
labeled MAIN and SECONDARY, connected to gmac2 and gmac1, respectively.
The standard probe order results in gmac1/SECONDARY being eth0 and
gmac2/MAIN being eth1. This does not match the stock firmware, is
contrary to user expectation, causes the wrong (high) MAC address to be
used in a bridged configuration (the default for this device), and makes
the gmac2/MAIN port unusable in the preinit environment (such as for
failsafe). Until a recent patch, gmac1/SECONDARY (eth0) was not even
usable.

This reorders the ports so that gmac2/MAIN is eth0, and the now-working
gmac1/SECONDARY is eth1. eth0 has the low MAC address and eth1 has the
high; when bridged, the bridge takes on the correct low MAC address.
This matches the stock firmware. The MAIN port is usable for failsafe
during preinit.

This device does not have a switch on board, so there's no possibility
to remap ports via switch configuration. "ip link set $interface name"
is used instead, during preinit before networking is configured.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Build-tested: ipq806x/ubnt,unifi-ac-hd
Run-tested: ipq806x/ubnt,unifi-ac-hd
2021-05-07 07:05:16 +02:00
Mark Mentovai
4f74966852 ipq806x: ubnt,unifi-ac-hd: use on-board PHYs
Unlike many ipq806x devices, Ubiquiti UniFi AC HD (UAP-AC-HD, UAP301)
has no switch on board. Its two Ethernet ports are connected to Atheros
AR8033 PHYs. It is not appropriate to use fixed-link in this
configuration. Instead, configure the correct PHYs in the device tree
configuration to allow the at803x driver to load.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Build-tested: ipq806x/ubnt,unifi-ac-hd
Run-tested: ipq806x/ubnt,unifi-ac-hd
2021-05-07 07:05:16 +02:00
Mark Mentovai
fa731838c5 ipq806x: dwmac: clear forced speed during probe
On a Ubiquiti UniFi AC HD (ubnt,unifi-ac-hd, UAP-AC-HD, UAP301), a
forced speed on gmac1 is set in the QSGMII PCS_ALL_CH_CTL register,
presumably by the bootloader (4.3.28), preventing the interface from
being usable. The QSDK NSS GMAC driver takes care to clear the forced
speed in nss_gmac_qsgmii_dev_init
(https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-gmac/tree/ipq806x/nss_gmac_init.c?h=nss
at d5bb14925861).

gmac1 is connected to the port on the device labeled SECONDARY, and is
currently eth0 but will be switched to eth1 by a subsequent patch. By
clearing the QSGMII PCS forced speed during dwmac initialization when
SGMII is in use, this port becomes usable.

This patch is upstreamable, and will be sent upstream after successful
testing in OpenWrt.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Build-tested: ipq806x/ubnt,unifi-ac-hd
Run-tested: ipq806x/ubnt,unifi-ac-hd
2021-05-07 07:05:16 +02:00
Rui Salvaterra
3326b5e75c treewide: switch the timer frequency to 100 Hz
Some targets select HZ=100, others HZ=250. There's no reason to select a higher
timer frequency (and 100 Hz are available in every architecture), so change all
targets to 100 Hz.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-04-21 10:31:10 +01:00
Rui Salvaterra
27b5bae2ec treewide: remove redundant ubifs kconfig symbols
For the targets which enable ubifs, these symbols are already part of the
generic kconfigs. Drop them from the target kconfigs.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-04-21 10:31:07 +01:00
John Audia
ec6293febc kernel: bump 5.4 to 5.4.109
Ran update_kernel.sh in a fresh clone without any existing toolchains.

Manually rebased:
  pending-5.4/611-netfilter_match_bypass_default_table.patch

The upstream change affecting this patch is the revert of an earlier
kernel commit. Therefore, we just revert our corresponding changes
in [1].

Build system: x86_64
Build-tested: ipq806x/R7800

[1] 9b1b89229f ("kernel: bump 5.4 to 5.4.86")

Signed-off-by: John Audia <graysky@archlinux.us>
[adjust manually rebased patch, add explanation]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-04-02 16:45:28 +02:00
Rafał Miłecki
3fd0a4222b kernel: backport 5.13 mtd partitioning changes
1. Use upstream accepted NVMEM patches
2. Minor fix for BCM4908 partitioning
3. Support for Linksys firmware partitions on Northstar

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-03-29 08:46:17 +02:00
Daniel Golle
d0d63162b6
ipq806x: work-around vendor 'rootfs_data' GPT partition
ZyXEL NBG6817 comes with an eMMC which contains a GPT partition named
'rootfs_data'. This currently confuses fstools and makes it pick that
(not suitable) partition.
Use the newly introduced fstools_ignore_partname=1 kernel cmdline
parameter to have fstools ignore that partition.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-19 13:36:02 +00:00
Aleksander Jan Bajkowski
12e942b1fd kernel: move some disabled symbols to generic
Move some disabled symbols found in armvirt target to generic.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-03-19 00:59:22 +01:00
Daniel Golle
e991c1b8a2 ipq806x: work-around borked QCA SDK bootloader
The bootloader of many ipq806x boards seems to require the config node
of the FIT image to be 'config@1' (or a secific different value).
This requirement used to be implicitely satisfied because OpenWrt used
to also call the configuration node inside a FIT image 'config@1'.
However, as recent U-Boot now prohibits the use of the '@' symbol as
part of node names, this was changed by
commit 5ec60cbe9d ("scripts: mkits.sh: replace @ with - in nodes")
Explicitely restore the default name of the configuration node to
'config@1' on ipq806x.
(ipq807x is unaffected as DEVICE_DTS_CONFIG default is set
"config@hk01" in target/linux/ipq807x/image/Makefile)

Reported-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-06 19:05:53 +00:00
Adrian Schmutzler
85b1f4d8ca treewide: remove execute bit and shebang from board.d files
So far, board.d files were having execute bit set and contained a
shebang. However, they are just sourced in board_detect, with an
apparantly unnecessary check for execute permission beforehand.

Replace this check by one for existance and make the board.d files
"normal" files, as would be expected in /etc anyway.

Note:

This removes an apparantly unused '#!/bin/sh /etc/rc.common' in
target/linux/bcm47xx/base-files/etc/board.d/01_network

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-03-06 11:30:06 +01:00
Jason A. Donenfeld
196f3d586f kernel-5.4: bump to 5.4.102 and refresh patches
5.4.102 backported a lot of stuff that our WireGuard backport already
did, in addition to other patches we had, so those patches were
removed from that part of the series. In the process other patches were
refreshed or reworked to account for upstream changes.

This commit involved `update_kernel.sh -v -u 5.4`.

Cc: John Audia <graysky@archlinux.us>
Cc: David Bauer <mail@david-bauer.net>
Cc: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-04 22:06:53 +01:00
Rafał Miłecki
7a7b2fd809 kernel: add the latest mtd patch extending ofpart parser
This adds the latest version of ofpart commit. It hopefully
1. Doesn't break compilation
2. Doesn't break partitioning
(this time).

It's required to implement fixed partitioning with some quirks. It's
required by bcm53xx, bcm4908, kirkwood, lantiq and mvebu.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-03-01 18:18:38 +01:00
Paul Spooren
6ab33103af treewide: remove redundant KERNEL_PREFIX definitions
The variables KERNEL_INITRAMFS_PREFIX and KERNEL_PREFIX are already
defined in include/image.mk and don't have to be redefined in the
target Makefiles.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[also cover imx6]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-23 00:26:40 +01:00
Adrian Schmutzler
04a0e5c082 ipq806x: replace full-text BSC license by SPDX identifier
This replaces a full-text BSD clause by the corresponding SPDX
identifier.

This should make it easier to identify the license both by humans
and machines.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-05 18:28:30 +01:00
Adrian Schmutzler
5b0644b71d ipq806x: remove generic profile
On a platform with many very different devices, like found on ipq806x,
the generic profile seems like a remnant of the past that does not
have a real use anymore.

Remove it to have one thing less to maintain.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Paul Spooren <mail@aparcar.org>
2021-01-27 21:31:20 +01:00
Adrian Schmutzler
f52081bcf9 treewide: provide global default for SUPPORTED_DEVICES
The majority of our targets provide a default value for the variable
SUPPORTED_DEVICES, which is used in images to check against the
compatible on a running device:

  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))

At the moment, this is implemented in the Device/Default block of
the individual targets or even subtargets. However, since we
standardized device names and compatible in the recent past, almost
all targets are following the same scheme now:

  device/image name:  vendor_model
  compatible:         vendor,model

The equal redundant definitions are a symptom of this process.

Consequently, this patch moves the definition to image.mk making it
a global default. For the few targets not using the scheme above,
SUPPORTED_DEVICES will be defined to a different value in
Device/Default anyway, overwriting the default. In other words:
This change is supposed to be cosmetic.

This can be used as a global measure to get the current compatible
with: $(firstword $(SUPPORTED_DEVICES))
(Though this is not precisely an achievement of this commit.)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-23 12:45:21 +01:00
Jan Alexander
05707e6460 ipq806x: fix Ubiquiti UniFi AC HD partition map
This fixes a typo in the previously committed partition map that led to
the extension of the read-only mtd partition "SSD" into the following
partitions.

Fixes: 4e46beb313 ("ipq806x: add support for Ubiquiti UniFi AC HD")

Signed-off-by: Jan Alexander <jan@nalx.net>
2021-01-15 17:34:04 +01:00
Jan Alexander
4e46beb313 ipq806x: add support for Ubiquiti UniFi AC HD
Hardware
--------

SoC:   Qualcomm IPQ8064
RAM:   512MB DDR3
Flash: 256MB NAND (Micron MT29F2G08ABBEAH4)
       32MB SPI-NOR (Macronix MX25U25635F)
WLAN:  Qualcomm Atheros QCA9994 4T4R b/g/n
       Qualcomm Atheros QCA9994 4T4R a/n/ac
ETH:   eth0 - SECONDARY (Atheros AR8033)
       eth1 - MAIN (Atheros AR8033)
USB:   USB-C
LED:   Dome (white / blue)
BTN:   Reset

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

Copy the OpenWrt sysupgrade image to the /tmp directory of the device
using scp. Default IP address is 192.168.1.20 and default username and
password are "ubnt".

SSH to the device and write the bootselect flag to ensure it is booting
from the mtd partition the OpenWrt image will be written to. Verify the
output device below matches mtd partition "bootselect" using /proc/mtd.

> dd if=/dev/zero bs=1 count=1 seek=7 conv=notrunc of=/dev/mtd11

Write the OpenWrt sysupgrade image to the mtd partition labeled
"kernel0". Also verify the used partition device using /proc/mtd.

> dd if=/tmp/sysupgrade.bin of=/dev/mtdblock12

Reboot the device.

Back to stock
-------------

Use the TFTP recovery procedure with the Ubiquiti firmware image to
restore the vendor firmware.

Signed-off-by: Jan Alexander <jan@nalx.net>
2021-01-14 01:03:54 +01:00
Adrian Schmutzler
849d4b3940 ipq806x: add space before SPDX identifier (again)
Strictly, an SPDX identifier requires a space between the comment
marker and the identifier itself. This has been addressed in
b69c21738e ("treewide: add space before SPDX identifier"), but
some new malformatted identifiers were merged recently.

This could have been prevented by using checkpatch.pl earlier.

Fixes: 1a775a4fd0 ("ipq806x: add support for TP-Link Talon AD7200")
Fixes: 8ddaeaf642 ("ipq806x: create DTSI for TP-Link AD7200 and C2600")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-06 23:53:25 +01:00
Adrian Schmutzler
b039f76f35 ipq806x: improve model name and revision for TP-Link AD7200
The TP-Link AD7200 appears with and without the "Talon" model name
prefix. Let's use both variants for 'make menuconfig' so everybody
can locate the device.

Concerning the revision, the TP-Link page lists v1 and v2 with the
device currently marked as "End of Life". However, the v2 and latest
v1 firmware are byte-identical. Thus, we only need one image for
this device and do not need to include the revision in the image name.

While at it, remove the useless BOARD_NAME variable which only makes
sense in combination with upgrade from legacy stable versions or when
custom upgrade scripts are involved.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-06 14:43:12 +01:00
Adrian Schmutzler
8ddaeaf642 ipq806x: create DTSI for TP-Link AD7200 and C2600
Both devices share most of their setup except buttons and LEDs,
so having a common DTSI removes a lot of duplicate code.

In order to have a shared partitioning scheme, device-id and
product-info from AD7200 have been merged into a single
product-info partition like for C2600.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-06 14:43:12 +01:00
Adrian Schmutzler
8050b70514 ipq806x: clean up DTS file for TP-Link AD7200
This does several cosmetic adjustments for AD7200's DTS:

 - Make node name, DT label and label property consistent
 - Drop wrong and unused spi4 label
 - Use generic flash@0 node name

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-06 14:43:12 +01:00
Daniel Golle
f4c64937cf ipq806x: fix LED names of TP-Link Talon AD2700
While the underscore in the name of the USB LEDs was removed from DTS,
/etc/board.d/01_leds also has to reflect that change.

Fixes: 28fd279e5d ("ipq806x: some corrections for TP-Link Talon AD7200")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-05 16:26:44 +00:00
Daniel Golle
28fd279e5d ipq806x: some corrections for TP-Link Talon AD7200
Address most comments made by Adrian Schmutzler on the mailing list.
The device name is kept as 'TP-Link Talon AD7200' as that seems to be
the marketing name TP-Link chose for that device, it also matches the
naming scheme for other TP-Link devices (e.g. 'TP-Link Archer C7').

Fixes: 1a775a4fd0 ("ipq806x: add support for TP-Link Talon AD7200")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-05 12:58:43 +00:00
Gary Cooper
1a775a4fd0 ipq806x: add support for TP-Link Talon AD7200
Device hardware: https://deviwiki.com/wiki/TP-LINK_AD7200_(Talon)

The Talon AD7200 is basically an Archer C2600 with a third PCIe lane
and an 802.11ad radio. It looks like the Archers C2600/5400 but the
housing is slightly larger.

Specifications
--------------

  - IPQ8064 dual-core 1400MHz
  - QCA9988 2.4GHz WiFi
  - QCA9990 5GHz WiFi
  - QCA9500 60GHz WiFi
  - 32MB SPI Flash
  - 512MiB RAM
  - 5 GBit Ports (QCA8337)

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

Installation is possible from the OEM web interface.
Sysupgrade is possible.
TFTP recovery is possible.
  - Image: AD7200_1.0_tp_recovery.bin

Notes
  - This will be the first 802.11ad device supported by mainline.

Signed-off-by: Gary Cooper <gaco@bitmessage.de>
2021-01-05 02:16:24 +00:00
Sungbo Eo
cbccc2560c ipq806x: consolidate DTS files directory
Commit 29ca10e537 ("ipq806x: remove support for kernel 4.19") moved
DTS files to "files" directory, but after that a new DTS file was added
to the former "files-5.4" directory. Move it to the new directory.

Fixes: 98b86296e6 ("ipq806x: add support for ASRock G10")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2021-01-03 15:50:55 +01:00
Pawel Dembicki
ac25b64350 ipq806x: reenable CONFIG_CMDLINE_OVERRIDE and ASRock G10
This reverts commit 57e4cc8261.

Cmdline override patch was fixed. It's time for reenable
Asrock G10 support.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Tested-by: Hannu Nyman <hannu.nyman@iki.fi> (run-tested for R7800)
2021-01-01 22:10:20 +01:00
Pawel Dembicki
6230b235b2 ipq806x: fix 900-arm-add-cmdline-override.patch
900-arm-add-cmdline-override.patch have missplaced entry in
arch/arm/Kconfig file. It causes problem with other cmdline
patches. This patch put Kconfig entry in correct place.

Fixes: 98b86296e6 ("ipq806x: add support for ASRock G10")

Suggested-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Tested-by: Hannu Nyman <hannu.nyman@iki.fi> (run-tested for R7800)
2021-01-01 22:10:20 +01:00
Adrian Schmutzler
9b1b89229f kernel: bump 5.4 to 5.4.86
Removed upstreamed patches:
  pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch

Manually merged:
  pending-5.4/611-netfilter_match_bypass_default_table.patch
  layerscape/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch

Build-tested: ipq806x/R7800, bcm27xx/bcm2711, ath79/{generic,tiny},
              ipq40xx, octeon, ramips/mt7621, realtek, x86/64
Run-tested: ipq806x/R7800, realtek

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org>
2021-01-01 17:07:28 +01:00
Adrian Schmutzler
57e4cc8261 ipq806x: disable CONFIG_CMDLINE_OVERRIDE and ASRock G10
After device support for ASRock G10 was added in [1], several
people reported broken ipq806x devices, with one or several of the
following symptoms:

  - Device does not boot
  - Sysupgrade does not work
  - Serial console is broken

The issues appears to be caused by the introduction of the symbol
CONFIG_CMDLINE_OVERRIDE=y in [1].

This patch disables the corresponding symbol again and marks the
ASRock as BROKEN, as it probably won't work properly without it.

Further references:

https://bugs.openwrt.org/index.php?do=details&task_id=3540
98b86296e6 (commitcomment-45455875)

[1] 98b86296e6 ("ipq806x: add support for ASRock G10")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-12-28 15:17:57 +01:00
Yanase Yuki
3bb1618573 ipq806x: add support for NEC Platforms Aterm WG2600HP3
NEC Platforms Aterm WG2600HP3 is a dual-band router based on Qualcomm IPQ8062.

Specification
-------------
- SoC: Qualcomm IPQ8062
- RAM: 512MiB
- Flash memory: SPI-NOR 32MiB (Cypress S25FL256S)
- Wi-Fi: Qualcomm QCA9984 (2.4GHz, 1ch - 13ch)
- Wi-Fi: Qualcomm QCA9984 (5GHz, 36ch - 64ch, 100ch - 140ch)
- Ethernet: 4x 100/1000 Mbps (1x WAN, 4x LAN)
- LED: 6x green LED, 6x red LED
- Input: 2x tactile switch, 1x SP3T slide switch
- Serial console: 115200bps, through-hole J3
  - [  ] [GND] [  ] [TX] [RX] ----> DC jack
- Power: DC 12V 1.5A

This device does not support VHT160 and VHT80+80.
Custom BDFs are required to limit VHT capabilities.

Flash instructions
------------------
1. Setup TFTP server (IP address: 192.168.1.2)
2. Put initramfs image into TFTP server directory
3. Connect WG2600HP3 lan port and computer that runs TFTP server
4. Connect to the serial console
5. Interrupt booting by Esc key (password: chiron)
6. Execute the following commands
    # setenv bootcmd "nboot 0x44000000 1 0x860000"
    # saveenv
    # setenv ipaddr 192.168.1.1
    # setenv serverip 192.168.1.2
    # tftpboot 0x44000000 openwrt-ipq806x-generic-nec_wg2600hp3-initramfs-uImage
7. After booting OpenWrt initramfs image, backup SPI-NOR flash memory
8. Erase firmware partition
    # mtd erase firmware
9. Run sysupgrade

Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
2020-12-25 10:38:13 +01:00
Yanase Yuki
d64102e00a ipq806x: add support for Qualcomm IPQ8062 SoC
This commit adds support for Qualcomm IPQ8062 SoC.
IPQ8062 is a lower clock variant of IPQ8064.

CPU and NSS clocks:
- CPU: 384 MHz - 1 GHz
- NSS: 110 MHz - 550 MHz

opp and l2 clock values are taken from WG2600HP3 GPL source code [1].

Due to a lack of devices, I didn't test the following features.
- SATA
- NAND flash memory controller
- SD
- USB
- GSBI2, GSBI7
- PCIE2
- GMAC0, GMAC3

Works properly:
- GSBI4 UART
- GSBI5 SPI
- GMAC1, GMAC2
- PCIE0, PCIE1
- MDIO0

Does not work properly:
- CPU SPC
  - This can cause a system hang. Same as IPQ8065.
    See 2336c2dbb1

[1] https://www.aterm.jp/function/wg2600hp3/appendix/opensource.html

Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
2020-12-25 10:38:13 +01:00
Adrian Schmutzler
212ad91630 ipq806x: remove unneeded empty lines
This removes two unneeded empty lines in base-files.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-12-22 21:44:57 +01:00
Christian Lamparter
98b86296e6 ipq806x: add support for ASRock G10
The ASRock G10 is a 2.4/5 GHz band 11ac "Gaming" router,
based on Qualcomm IPQ8064.

Specifications:

SoC:	Qualcomm IPQ8064
CPU:	Dual-Core A15 @ (384 - 1,400 MHz, 2C2T)
DRAM:	512 MiB (~467 MiB available)
NAND:	128 MB (Micron MT29F1G08ABBEAH4)
WLAN0:	4T4R 5 GHz Wlan (QCA9980)
WLAN1:	4T4R 2.4 GHz Wlan (QCA9980)
ETH:    5x 10/100/1000 Mbps Ethernet (QCA8337)
INPUT:  Reset Button, WPS 2.4G and WPS 5G Button
LEDS:   1 multicolor status LED
USB:    2x USB 3.0 Type-A
POWER:  12VDC/3A AC Adapter + dedicated Power Switch
UART:   Setting is 115200-8-N-1. 1x4 .1" unpopulated header
	on the PCB (J6 - very tiny silkscreen next to TX).
        Pinout: 1. 3v3 (Square - best skipped!), 2. RX, 3. GND, 4. TX

WARNING: The serial port needs a TTL/RS-232 3.3v level converter!
	 (Depending on the serial adapter RX and TX might need to
	  be swapped).

Note about the IR-Remote:
There's a 8-Bit MCU (SONIX SN8F25E21SG) which is controlling the
IR-Remote and is fed by the IR-Photodiode. The SoC can talk to
the device via I2C. The vendor's GPL archive comes with the source
of the interface driver for this as a (character driver), the main
control software is however a blob.

Installation Instructions:
 1. Download factory image to disk
 2. Apply factory image via stock web-gui

Back to stock:
 1. Login to router via ssh
 2. run "asrock_g10_back_to_factory" script from /sbin

Notes:
 - If something goes wrong durring sysupgrade, router will go back to
   factory image.
 - Asrock G10 uses partition layout from smem. So partition layout can
   be normal or alternate.
 - 900-arm-add-cmdline-override.patch was copied from 102-powerpc-add-cmdline-override.patch
   from powerpc target.

Knowledge about BOOTCONFIG partition was based on user "jmomo" post from old
OpenWrt forum (Post #50):
https://forum.archive.openwrt.org/viewtopic.php?id=65956&p=2

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[bump to 5.4, add factory image, fix sysupgrade, convert partition
layout to smem, remove ipq-wifi-asrock-g10 and use ART, minor fixes]
Co-Authored-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Tested-by: Lukasz Ostapiuk <palibrzuch@gmail.com>
2020-12-22 19:11:50 +01:00
INAGAKI Hiroshi
622ce713ca ipq806x: disable SPC of IPQ8064 on NEC WG2600HP to fix boot issue
The SPC (Standalone Power Collapse) of IPQ8064 on NEC Aterm WG2600HP
need to be disabled to fix the boot stucking issue on WG2600HP with
kernel 5.4.

log:

[    3.036965] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    3.038007] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    3.045849] sdhci: Secure Digital Host Controller Interface driver
[    3.052385] sdhci: Copyright(c) Pierre Ossman
[    3.058712] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.065469] NET: Registered protocol family 10
[    3.070184] Segment Routing with IPv6
[    3.073141] NET: Registered protocol family 17
[    3.078157] 8021q: 802.1Q VLAN Support v1.8
[    3.081149] Registering SWP/SWPB emulation handler
[    3.107125] qcom_rpm 108000.rpm: RPM firmware 3.0.16777371
[    3.120475] s1a: Bringing 0uV into 1050000-1050000uV
[    3.120747] s1a: supplied by regulator-dummy
[    3.124775] s1b: Bringing 0uV into 1050000-1050000uV
[    3.128969] s1b: supplied by regulator-dummy
[    3.133905] s2a: Bringing 0uV into 800000-800000uV
[    3.138190] s2a: supplied by regulator-dummy
[    3.142693] s2b: Bringing 0uV into 800000-800000uV
[    3.147266] s2b: supplied by regulator-dummy
[
(stuck)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2020-12-22 19:11:50 +01:00
Aleksander Jan Bajkowski
77575d4c02 kernel: move some disabled symbols to generic
Move some disabled config options found in lantiq target to generic.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2020-12-22 19:11:50 +01:00
Peter Cardoe
b163bfbba5 ipq806x: Fix gmac1 (WAN) on Netgear D7800
The WAN port on Netgear D7800 is unable to connect to an ISP when the
link to the modem is running at less than 1GB.

This patch fixes the issue by removing the phy-handle definition
and replacing it with a fixed-link definition

The WAN port is then able to connect to a modem via a link running at 100Mbs or 10Mbs

Fixes: FS#3086
Signed-off-by: Peter Cardoe <peter@cardoe.co.uk>
2020-12-22 18:59:10 +01:00
John Audia
9100566267 kernel: bump 5.4 to 5.4.79
Manually rebased patches:
  ath79/patches-5.4/910-unaligned_access_hacks.patch
  bcm27xx/patches-5.4/950-0135-spi-spi-bcm2835-Disable-forced-software-CS.patch
  bcm27xx/patches-5.4/950-0414-SQUASH-Fix-spi-driver-compiler-warnings.patch
  ipq806x/patches-5.4/093-4-v5.8-ipq806x-PCI-qcom-Use-bulk-clk-api-and-assert-on-error.patch

Removed since could be reverse-applied by quilt and found to be included upstream:
  ipq806x/patches-5.4/096-PCI-qcom-Make-sure-PCIe-is-reset-before-init-for-rev.patch

All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[refresh altered targets after rebase]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-24 15:36:59 +01:00
John Audia
a47279154e kernel: bump 5.4 to 5.4.75
Manually rebased patches:
  bcm27xx:
    patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
  bcm53xx:
    patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
  layerscape:
    patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch
    patches-5.4/808-i2c-0002-MLK-10893-i2c-imx-add-irqf_no_suspend.patch
    patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch

Removed since could be reverse-applied by quilt:
  mediatek:
    patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch

All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711, x86_64
Run-tested: ipq806x/R7800, x86_64

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [x86_64]

Rebase of 802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2020-11-10 13:11:32 +01:00
John Audia
b4c02c9998 kernel: bump 5.4 to 5.4.73
Removed upstreamed patches:
 generic/pending-5.4
   445-mtd-spinand-gigadevice-Only-one-dummy-byte-in-QUA.patch
   446-mtd-spinand-gigadevice-Add-QE-Bit.patch
 pistachio/patches-5.4
   150-pwm-img-Fix-null-pointer-access-in-probe.patch

Manually rebased:
 layerscape/patches-5.4
   801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch
   801-audio-0039-MLK-16224-6-ASoC-fsl_sai-fix-DSD-suspend-resume.patch
   801-audio-0073-MLK-21957-3-ASoC-fsl_sai-add-bitcount-and-timestamp-.patch
   820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch

All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711,
              mvebu (mamba, rango), x86_64, ramips/mt7621
Run-tested: ipq806x/R7800, mvebu (mamba, rango), x86_64, ramips (RT-AC57U)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[alter 820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-01 14:44:06 +01:00
Ansuel Smith
f47cb405ca ipq806x: fix pci broken on bootm command
Pci is broken when bootm is used instead of the custom bootipq. This
is caused by the lack of reset by the bootloader. Make the driver do
the reset to fix this specific problem.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-10-19 15:46:17 +02:00
Adrian Schmutzler
29ca10e537 ipq806x: remove support for kernel 4.19
The target uses 5.4 as default kernel since 04/2020.

Kernel 4.19 support is not really maintained anymore, and there has
been a lot of changes between 4.19 and 5.4 on this target. Despite,
new devices are typically added for 5.4 only anyway.

Thus, make maintaining of old stuff and reviewing of new stuff
easier by removing support for kernel 4.19.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-19 15:37:54 +02:00
Rui Salvaterra
e788e9bd87 treewide: enable the vDSO
The vDSO is used to accelerate some syscalls. It should work fine wherever it's
available, so enable it globally for all targets.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2020-10-13 20:08:41 +02:00
Adrian Schmutzler
d181b2cefa ipq806x: remove model name from LED labels
Like in the previous patches for ath79 and ramips, this will remove
the "devicename" from LED labels in ipq806x.

The devicename is removed in DTS files and 01_leds, and a migration
script is added.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-07 01:31:45 +02:00
John Audia
d6a9a92e32 kernel: bump 5.4 to 5.4.69
Seemingly unneeded based on new upstream code so manually deleted:
 layerscape:
  820-usb-0007-usb-dwc3-gadget-increase-timeout-value-for-send-ep-c.patch

Manually merged:
 generic-hack:
  251-sound_kconfig.patch

All other modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711
Run-tested: ipq806x/R7800, lantiq/Easybox 904 xDSL

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add lantiq test report, minor commit message clarification]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-02 22:02:26 +02:00
Adrian Schmutzler
95c9df7971 ipq806x: fix support of Edgecore ECW5410 support
This fixes several stylistic and functional errors of the recently
added Edgecore ECW5410:

  - fix call in 11-ath10k-caldata
  - use hex notation in 11-ath10k-caldata
  - remove redundant definitions from DTS that are already in DTSI
  - use proper sorting in image/Makefile
  - use DEVICE_VENDOR/DEVICE_MODEL instead of DEVICE_TITLE
  - use SOC instead of DEVICE_DTS

Fixes: 59f0a0fd83 ("ipq806x: add Edgecore ECW5410 support")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-19 13:32:11 +02:00
John Audia
770a9c6787 kernel: bump 5.4 to 5.4.66
All modifications made by update_kernel.sh/no manual intervention needed

Run-tested: ipq806x (R7800), ath79 (Archer C7v5), x86/64

No dmesg regressions, everything appears functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add run test from PR]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-19 12:41:29 +02:00
Adrian Schmutzler
6e170ffb96 ipq806x: sort entries in lib/upgrade/platform.sh
Apply alphabetic sorting like in the other files.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-17 13:03:18 +02:00
Adrian Schmutzler
0b1cdb7eea treewide: remove empty default cases
There is no apparent reason to have an empty default case.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-17 12:46:19 +02:00
Adrian Schmutzler
a744c14dfa ipq806x: sort entries in 02_network
Apply alphabetic sorting like in the other files.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-17 12:33:45 +02:00
Robert Marko
59f0a0fd83 ipq806x: add Edgecore ECW5410 support
This patch adds support for the Edgecore ECW5410 indoor AP.

Specification:
- SoC: Qualcomm Atheros IPQ8068 ARMv7 2x Cortex A-15
- RAM: 256MB(225 usable) DDR3
- NOR Flash: 16MB SPI NOR
- NAND Flash: 128MB S34MS01G2 Parallel NAND
- Ethernet: 2 x 1G via 2x AR8033 PHY-s connected directly to GMAC2 and GMAC3 via SGMII (802.3af POE IN on eth0)
- USB: 1 x USB 3.0 SuperSpeed
- WLAN: 2x QCA9994 AC Wawe 2 (1x 2GHz bgn, 1x 5GHz acn)
- CC2540 BLE
- UART console on RJ45 next to ethernet ports exposed.
Its Cisco pin compatible, 115200 8n1 baud.

Installation instructions:
Through stock firmware or initramfs.

1.Connect to console
2. Login with root account, if password is unknown then interrupt the boot with f and reset it in failsafe.
3. Transfer factory image
4. Flash the image with ubiformat /dev/mtd1 -y -f <your factory image path>

This will replace the rootfs2 with OpenWrt, if you are currently running from rootfs2 then simply change /dev/mtd1 to /dev/mtd0

Note

Initramfs:
1.  Connect to console
2.  Transfer the image from TFTP server with tftpboot,
or by using DHCP advertised image with dhcp command.
3. bootm
4. Run ubiformat /dev/mtd1

You need to interrupt the bootloader after rebooting and run:
run altbootcmd

This will switch your active rootfs partition to one you wrote to and boot from it.

So if rootfs1 is active, then it will change it to rootfs2.

This will format the rootfs2 partition, if your active partition is 2 then simply change /dev/mtd1 with /dev/mtd0
If you dont format the partition you will be writing too, then sysupgrade will find existing UBI rootfs and kernel volumes and update those.
This will result in wrong ordering and OpenWrt will panic on boot.

5. Transfer sysupgrade image
6. Flash with sysupgrade -n.

Note that sysupgrade will write the image to rootfs partition that is not currently in use.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2020-09-17 08:42:17 +02:00
Robert Marko
43a53891ce ipq806x: import bootargs-append from IPQ40xx
This imports the patch that adds bootargs-append support from IPQ40xx.

This way we can append additional boot arguments from DTS instead of only being able to overwrite them.

This way dual firmware devices can use the rootfs number that bootloader passes to decide from what to boot.
But we still need to append console info and ubi root info.

This is used by Edgecore ECW5410.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2020-09-17 08:42:17 +02:00
Robert Marko
811af0d98a ipq806x: add GSBI1 node to DTSI
IPQ806x series also has a GSBI1 with UART and I2C peripherals, so lets add the node for it.

Its needed for Edgecore ECW5410 which uses the UART from GSBI1 as second UART for Bluetooth.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2020-09-17 08:42:17 +02:00
Robert Marko
6133ac8e99 ipq806x: 5.4: enable AT803X driver
Its needed for Edgecore ECW5410 which does not use QCA8337 switch,
but rather 2x AR8033 PHY-s directly connected to GMAC-s.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2020-09-17 08:42:17 +02:00
John Audia
2c2fcbd2e0 kernel: bump 5.4 to 5.4.63
Manually merged:
 hack-5.4
  230-openwrt_lzma_options.patch
 bcm27xx
  950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
 x86
  011-tune_lzma_options.patch

Remove upstreamed patches in collaboration with Ansuel Smith:
 ipq806x
  093-1-v5.8-ipq806x-PCI-qcom-Add-missing-ipq806x-clocks-in-PCIe-driver.patch
  093-2-v5.8-ipq806x-PCI-qcom-Change-duplicate-PCI-reset-to-phy-reset.patch
  093-3-v5.8-ipq806x-PCI-qcom-Add-missing-reset-for-ipq806x.patch

All other modifications made by update_kernel.sh

Build-tested: bcm27xx/bcm2708, ipq806x, x86/64
Run-tested: ipq806x (R7800), x86/64

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[update commit message/tested]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-06 19:55:19 +02:00
John Audia
05b8e84362 kernel: bump 5.4 to 5.4.61
Manually merged:
  backport-5.4
     011-kbuild-export-SUBARCH.patch
  layerscape
    701-net-0262-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch

All other modifications made by update_kernel.sh

Build-tested: x86/64, lantiq/xrx200, ramips/mt7621
Run-tested: ipq806x (R7800), lantiq/xrx200, x86/64, ramips (RT-AC57U)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[minor commit message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-30 19:44:47 +02:00
Adrian Schmutzler
36aa27189a kernel: bump 5.4 to 5.4.60
Deleted upstream patches:
  generic:
    041-genirq-affinity-Make-affinity-setting-if-activated-o.patch
  ipq806x:
    093-5-v5.8-ipq806x-PCI-qcom-Define-some-PARF-params-needed-for-ipq8064-SoC.patch
    093-6-v5.8-ipq806x-PCI-qcom-Add-support-for-tx-term-offset-for-rev-2_1_0.patch

Merged manually:
  ipq806x:
    093-4-v5.8-ipq806x-PCI-qcom-Use-bulk-clk-api-and-assert-on-error.patch
  layerscape:
    804-crypto-0016-MLKU-114-1-crypto-caam-reduce-page-0-regs-access-to-.patch

Build-tested: ath79/generic, ipq806x, layerscape/armv7, layerscape/armv8_64b
Run-tested: ipq806x (R7800)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-24 17:33:58 +02:00
Ansuel Smith
58d2bd88ae ipq806x: replace pci patchset with upstream version
Changes:
- Update patches
- Update dts with new binding
    Tx term offset dropped and replaced with a new compatible

Removed:
- 0071-5-PCI-qcom-Programming-the-PCIE-iATU-for-IPQ806x
    Pci init does the same exact thing (was needed in older kernel version)
- 0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B
    Rejected upstream, can't find any reason to have this. No regression with
    testing it on R7800.

Tested on R7800 (ipq8065), R7500 v2 ("ipq8064-v2")

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Tested-by: Paul Blazejowski <paulb@blazebox.homeip.net> [R7800]
[rebase and refresh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-24 14:09:11 +02:00
Adrian Schmutzler
441b36236f ipq806x: create shared DTSI for EA7500 v1 and EA8500
Most of the definitions for the two devices are shared, so put
them in a shared DTSI.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-22 14:20:25 +02:00
Adrian Schmutzler
83b1e40561 kernel: bump 5.4 to 5.4.59
Removed since added upstream:
  bcm27xx:
    950-0428-staging-vchiq_arm-Add-a-matching-unregister-call.patch
  lantiq:
    0800-spi-lantiq-ssc-Fix-warning-by-using-WQ_MEM_RECLAI.patch

Manually adjusted patches:
  layerscape:
    801-audio-0005-Revert-ASoC-fsl_sai-Add-support-for-SAI-new-version.patch

Build-tested: ath79/generic, ramips, lantiq/xrx200, lantiq/xway,
   mvebu/cortexa9, sunxi/a53
Run-tested: ipq806x (R7800), layerscape (LS1012A-FRDM, LS1046A-RDB)

Building on layerscape is only possible with workaround from PR #3179.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-By: John Audia <graysky@archlinux.us> [ipq806x]
Tested-by: Pawel Dembicki <paweldembicki@gmail.com> [layerscape]
2020-08-20 14:19:39 +02:00
Petr Štetiar
a14f5bb4bd treewide: use wpad-basic-wolfssl as default
In order to support SAE/WPA3-Personal in default images. Replace almost
all occurencies of wpad-basic and wpad-mini with wpad-basic-wolfssl for
consistency. Keep out ar71xx from the list as it won't be in the next
release and would only make backports harder.

Build-tested (build-bot settings):
ath79: generic, ramips: mt7620/mt76x8/rt305x, lantiq: xrx200/xway,
sunxi: a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[rebase, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-20 14:19:39 +02:00
Adrian Schmutzler
57e029ba57 ipq806x: move further common nodes to the DTSI files
The moves a few additional common nodes to the common DTSI files
for qcom-ipq8064-v2.0 and qcom-ipq8065 devices.

Remove a few redundant definitions on the way.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-17 15:25:11 +02:00
Ansuel Smith
87e92d50e5 kernel: usb: move phy-qcom-ipq806x-usb to ipq806x modules.mk
This driver is only used by ipq806x SoCs. Move it there and drop
dependency from ipq40xx since it's not used anywere.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[rebase on changes to previous patches]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Paul Blazejowski <paulb@blazebox.homeip.net> [R7800]
2020-08-13 02:12:12 +02:00
Ansuel Smith
35d1f05094 ipq806x: replace nvmem qcom patch with upstream version
- Replace nvmem qcom patch with upstream version
- Update compatible

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[refresh patches, minor commit message rewording]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Paul Blazejowski <paulb@blazebox.homeip.net> [R7800]
2020-08-13 02:12:12 +02:00
Ansuel Smith
0c45ad41e1 ipq806x: replace phy dwc3 patch with upstream version
- Replace dwc3 phy patch with upstream version
- Rework the dts to use the upstream bindings
- Update changed config flags
- Rename module to reflect config name

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[fix qcom,tx-deamp_3_5db typo, refresh patches, rename kmod]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Paul Blazejowski <paulb@blazebox.homeip.net> [R7800]
2020-08-13 02:12:12 +02:00
Ansuel Smith
df3ad130d5 ipq806x: replace patches with upstream version
Replace all the custom patches with the backported upstream version

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[refresh patches]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-08 18:07:17 +02:00
Felix Fietkau
b0f7ea2853 kernel: unify CONFIG_GPIO_SYSFS in kernel configs
Enable it for all platforms

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-06 12:37:04 +02:00
Adrian Schmutzler
7c1c0a00fc ipq806x: use qcom-ipq8064-v1.0.dtsi from upstream
This uses upstream qcom-ipq8064-v1.0.dtsi and modifies it by patches
instead of keeping a local version. As a consequence:

- we use a part of the shared definitions there and update device
  DTS files accordingly
- we move additional stuff from our local v1.0.dtsi to the patch
- we drop partitions, LEDs and keys from the file as we will
  implement them differently anyway

Like with the previous patch, this follows the idea that a diff
from upstream might be easier to handle than a big file of our
own with different distribution pattern of properties.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-05 23:08:03 +02:00
Adrian Schmutzler
b7b7c2a6ad ipq806x: use qcom-ipq8064.dtsi from upstream
Though a qcom-ipq8064.dtsi file exists upstream, we still do overwrite
it with a full version of our own in the ipq806x target. About half of
the contents of our file are upstream content, the other half are local
improvements.

To prevent us from having a lot of code maintained twice in parallel,
this adjusts the target to use the upstream qcom-ipq8064.dtsi. Our
local changes are arranged into three patches, the first pulling a
commit from upstream, the second doing a few small adjustments, and
the third adding all additional stuff.

This should get us the best of both worlds.

The property "ports-implemented" on sata@29000000 is moved to
2nd-level DTSI files as kernel defines it there as well.

While at, rename 080-ARM-dts-qcom-add-gpio-ranges-property.patch to
include the kernel version where it's added upstream.

Even though this might look more complicated in the first place,
the aim is to bring our files closer to upstream, so we can benefit
from changes directly and vice-versa. After all, this drop about
650 lines just copied from the upstream DTSI file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-05 23:08:03 +02:00
Adrian Schmutzler
3635f7efc1 ipq806x: really fix aliases node for Qualcomm IPQ8064/DB149
Having looked at this again, it appears that only gsbi2_serial
is actually enabled for this device, so the entry in the broken
aliases node was correct.

Therefore, this needs to set its own serial0 instead of inheriting
"serial0 = &gsbi4_serial;" from DTSI. Do this with the correctly
named aliases node now.

Fixes: c83f7b6d21 ("ipq806x: fix aliases node name for Qualcomm
IPQ8064/DB149")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-14 17:02:40 +02:00
Adrian Schmutzler
e363470d1a ipq806x: use consistent DT labels for gsbiX_serial
Kernel uses the label gsbiX_serial, so let's adjust our labels to
this naming scheme.

This is cosmetic, and actually only already existing gsbi4_serial
has been used at all.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-14 12:38:24 +02:00
Adrian Schmutzler
c83f7b6d21 ipq806x: fix aliases node name for Qualcomm IPQ8064/DB149
This device uses a node incorrectly named "alias" instead of
"aliases" since it was introduced.

Remove it without replacement, as the definitions in it don't
seem to be required anyway:

The serial0 definition has never been effective anyway and this
would be the only device deviating from the common setting
"serial0 = &gsbi4_serial;" for ipq8064. (So, maybe the wrong
node prevented us from finding out about the wrong serial
definition?)

The mdio-gpio0 alias was supposed to be removed in d2a2eb7e48
anyway, the redundant definition in the alias node was just
overlooked back then.

Fixes: 0fd202f3e5 ("ipq806x: add db149 dts files")
Fixes: d2a2eb7e48 ("ipq806x: replace caf nss-gmac driver by upstream stmmac")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-14 12:38:24 +02:00
Pawel Dembicki
f93267bccf ipq806x: enable Linksys EA8500 eth1 interface
At this moment Linksys EA8500 uses only eth0.

This patch change switch registers, which allow to use eth1 as lan
and eth0 as wan. The method work with similar Linksys EA7500V1
and it work with EA8500.

Suggested-by: Sungbo Eo <mans0n@gorani.run>
Tested-by: Brian Onn <brian.a.onn@gmail.com>
Tested-by: Adrian Panella <ianchi74@outlook.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2020-07-11 13:33:28 +02:00
Petr Štetiar
c7b750e7ac treewide: kernel: drop redundant USB_EHCI_HCD=n config symbol
Commit e53ec043ba ("kirkwood: move usb support to modules") has moved
this config symbol into generic configs, so it could be removed from
other configs.

Suggested-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-07-09 10:28:40 +02:00
John Audia
3e992ea790 ipq806x: compile in schedutil governor
Gives users a third option to augment ondemand and performance. Kernel
docs[1] explain differences and this PR empowers users w/ the choice to
select between the older ondemand and newer and more simplistic schedutil
should they wish to use one that is not the performance governor.

1. Documentation/admin-guide/pm/cpufreq.rst

Signed-off-by: John Audia <graysky@archlinux.us>
[fixed From: to match SoB:]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-07-08 22:54:13 +02:00
Pawel Dembicki
20c7abd4b7 ipq806x: add support for Linksys EA7500 V1
This patch adds support for the Linksys EA7500 V1 router.

Specification:
 - CPU: Qualcomm IPQ8064
 - RAM: 256MB
 - Flash: NAND 128MB
 - WiFi: QCA9982 an+ac + QCA9983 bgn
 - Ethernet: 5 GBE Ports (WAN+ 4xLAN) (QCA8337)
 - USB: 1x USB 3.0 1x USB2.0
 - Serial console: RJ-45 115200 8n1 (1V8 Voltage level)
 - 2 Buttons
 - 1 LED

Known issues:
 - Some devices won't flash via web gui

Installation:
- Newer stock images doesn't allow to install custom firmware.
- Please downgrade software to 1.1.2 version. Official firmware:
https://downloads.linksys.com/downloads/firmware/FW_EA7500_1.1.2.172843_prod.gpg.img
- Do it two times to downgrade all stored images.
- Apply factory image via web-gui.

Serial + TFTP method:
 - downgrade to 1.1.2 two times
 - connect ehternet and serial cable
 - set ip address of tftp server to 192.168.1.254
 - put openwrt factory image to tftp folder and rename it to macan.bin
 - stop device while booting in u-boot
 - run command: "run flashimg"
 - run command: "setenv boot_part 1"
 - run command "saveenv"
 - reset

Back to stock:
- Please use old non-gpg image like this 1.1.2:
https://downloads.linksys.com/downloads/firmware/FW_EA7500_1.1.2.172843_prod.img
- ssh to router and copy image to tmp
- use sysupgrade -n -F

Tested by github users: @jack338c and @grzesiczek1

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[removed i2c4_pins, mdio0_pins, nand_pins, rgmii2_pins from DTSI]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-08 16:07:05 +02:00
Adrian Schmutzler
883250014d ipq806x: move serial0 to DTSI files
All device DTS files in the target set the serial0 property to the
same value (*). So, let's move the definitions to the DTSI files.

That's also where the kernel defines it (qcom-ipq8064-v1.0.dtsi).

* The only exception is ipq8064-db149, which defines
  "serial0 = &uart2;", but inside a block called "alias" instead of
  "aliases". It must be assumed that this is broken anyway, so we
  don't touch it here.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-06 16:24:30 +02:00
Adrian Schmutzler
74e339f118 ipq806x: move stdout-path to DTSI files
All device DTS files in the target set the stdout-path to the same
value. So, let's move the definitions to the DTSI files.

That's also where the kernel defines it (qcom-ipq8064-v1.0.dtsi).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-06 16:23:23 +02:00
Adrian Schmutzler
ed761344d2 ipq806x: disentangle and clean up SoC DTSI files
So far, the DTSI files on ipq806x had a linear inheritance:

  qcom-ipq8064.dtsi
  v
  qcom-ipq8064-v1.0.dtsi
  v
  qcom-ipq8064-v2.0.dtsi
  v
  qcom-ipq8065.dtsi

This poses problems when one wants to set something that is specific
to an architecture closer to the top of the tree.

In this patch, we remove the chain-like inheritance and have all
other files derived from qcom-ipq8064.dtsi (changing this name to
something more generic is not possible due to upstream use).

The removal of inheritance will require a few entries to be copied
from qcom-ipq8064-v2.0.dtsi to qcom-ipq8065.dtsi. However, it also
opens an opportunity for some clean-up:

- Many definitions can be improved by just using the innermost labels.

- Instead of disabling the CPU_SPC node for ipq8065, it is now off by
  default and enabled where needed.

- Instead of patching phy-tx0-term-offset into qcom-ipq8064.dtsi and
  then having it changed for qcom-ipq8064-v2.0/qcom-ipq8065, just have
  the appropriate settings done in the lower DTSI files directly.

- For the opp_table0 adjustments for ipq8065, just redefine what's
  changed, but don't add all the untouched properties again.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-06 16:21:15 +02:00
Sungbo Eo
19c8f11d92 ipq806x: move common pinmux nodes to SoC DTSI
As almost same pinmux nodes are repeated in each device dts,
let's define them once in the ipq8064 dtsi and remove the rest.

* uart0_pins : Did not touch.
* i2c4_pins  : This node seems to be not used at all in dts.
               Added the most common form in the dtsi. Did not touch rpm_pins.
* spi_pins   : The common mux node is already present in the dtsi.
               Removed the duplicate nodes from dts.
* nand_pins  : Moved the entire node.
* mdio0_pins : Moved the common mux node.
* rgmii2_pins: Moved the common mux node. "pins" property is overrided in ap161.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2020-07-06 16:08:18 +02:00
Hauke Mehrtens
68d9cb8214 kernel: Update kernel 5.4 to version 5.4.50
Run tested: ath79, ipq40xx
Build tested: ath79, ipq40xx

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-04 21:12:42 +02:00
Hauke Mehrtens
6062d85892 kernel: Update kernel 4.19 to version 4.19.131
Fixes:
- CVE-2020-10757

The "mtd: rawnand: Pass a nand_chip object to nand_release()" commit was
backported which needed some adaptations to other code.

Run tested: ath79
Build tested: ath79

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-04 21:12:42 +02:00
John Audia
472f5b1474 ipq806x: refresh config
Based on "make kernel_menuconfig CONFIG_TARGET=generic" and 5.4.49

CONFIG_LEDS_TRIGGER_DISK has been removed by the refresh and added
back manually in order to not revert f93fcf8923 ("ipq806x: enable
disk-activity LED trigger").

Signed-off-by: John Audia <graysky@archlinux.us>
[extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-03 20:38:06 +02:00
Adrian Schmutzler
0127de9547 ipq806x: set IMAGES in Device/Default definition
The Device/Default definition sets a default IMAGE/sysupgrade.bin,
but does not enable it by setting IMAGES. This is not consistent,
and has led to IMAGES being defined at various other places in the
file.

Thus, this patch consolidates the default value for IMAGES by putting
it in Device/Default. Since it's still overwritten where necessary,
this patch is cosmetic.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-28 14:07:50 +02:00