Commit Graph

21 Commits

Author SHA1 Message Date
Aleksander Jan Bajkowski 1663dc7e82 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>
(cherry picked from commit 12e942b1fd)
2021-04-11 16:54:22 +02:00
Robert Marko b5c93edd74 ipq40xx: add Qualcomm QCA807x driver
This adds driver for the Qualcomm QCA8072 and QCA8075 PHY-s.

They are 2 or 5 port IEEE 802.3 clause 22 compliant
10BASE-Te, 100BASE-TX and 1000BASE-T PHY-s.

They feature 2 SerDes, one for PSGMII or QSGMII connection with MAC,
while second one is SGMII for connection to MAC or fiber.

Both models have a combo port that supports 1000BASE-X and 100BASE-FX
fiber.

Each PHY inside of QCA807x series has 2 digitally controlled output only
pins that natively drive LED-s.
But some vendors used these to driver generic LED-s controlled by
user space, so lets enable registering each PHY as GPIO controller and
add driver for it.

This also adds the ability to specify DT properties so that 1000 Base-T
LED will also be lit up for 100 and 10 Base connections.

This is usually done by U-boot, but boards running mainline U-boot are
not configuring this yet.

These PHY-s are commonly used in Qualcomm IPQ40xx, IPQ60xx and IPQ807x
boards.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2020-12-23 16:36:08 +01:00
Robert Marko 4cdc8d20fa ipq40xx: backport upstream MDIO driver
IPQ40xx MDIO driver was upstreamed in kernel version 5.8.
So lets backport the upstream version and drop our local one.

This also refreshed the kernel config since the symbol name has changed.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2020-12-23 16:36:08 +01:00
Robert Marko 49795690e6 ipq40xx: refresh kernel config
Generic kernel config changed a lot, so lets refresh ipq40xx
to reduce the diff.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2020-12-23 16:36:08 +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
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 d1db1f4240 ipq40xx: refresh kernel 5.4 config
Refresh config with make kernel_oldconfig.

After d1a8217d87 ("kernel: clean-up build-configurable kernel
config symbols"), the routine wants to add an additional
CONFIG_CGROUPS (=n), which has been removed manually again, as
this seems unintended.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-06 12:51:51 +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
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
DENG Qingfang 752cee796d ipq40xx: disable DSA and Switchdev
ipq40xx is still using swconfig based switch management. This might
change in he future, however disable the DSA and Switchdev support for
now.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[rephrased commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
2020-06-13 16:57:15 +02:00
David Bauer 300b7fe85a ipq40xx: add support for Aruba AP-365
Hardware
--------
SoC:   Qualcomm IPQ4029
RAM:   512M DDR3
FLASH: - 128MB NAND (Macronix MX30LF1G18AC)
       - 4MB SPI-NOR (Macronix MX25R3235F)
TPM:   Atmel AT97SC3203
BLE:   Texas Instruments CC2540T
       attached to ttyMSM0
ETH:   Atheros AR8035
LED:   System (red / green / amber)
BTN:   Reset

The USB port on the device is (in contrast to other Aruba boards) real
USB. The AP uses a CP2101 USB TTY converter on the board.

Console baudrate is 9600 8n1.

To enable a full list of commands in the U-Boot "help" command, execute
the literal "diag" command.

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

1. Get the OpenWrt initramfs image. Rename it to ipq40xx.ari and put it
   into the TFTP server root directory. Configure the TFTP server to
   be reachable at 192.168.1.75/24. Connect the machine running the TFTP
   server to the ethernet port of the access point.

2. Connect to the serial console. Interrupt autobooting by pressing
   Enter when prompted.

3. Configure the bootargs and bootcmd for OpenWrt.
   $ setenv bootargs_openwrt "setenv bootargs console=ttyMSM1,9600n8"
   $ setenv nandboot_openwrt "run bootargs_openwrt; ubi part aos1;
     ubi read 0x85000000 kernel; bootm 0x85000000"
   $ setenv ramboot_openwrt "run bootargs_openwrt;
     setenv ipaddr 192.168.1.105; setenv serverip 192.168.1.75;
     netget; set fdt_high 0x87000000; bootm"
   $ setenv bootcmd "run nandboot_openwrt"
   $ saveenv

4. Load OpenWrt into RAM:
   $ run ramboot_openwrt

5. After OpenWrt booted, transfer the OpenWrt sysupgrade image to the
   /tmp folder on the device.

6. Flash OpenWrt:
   Make sure you use the mtd partition with the label "ubi" here!

   $ ubidetach -p /dev/mtd1
   $ ubiformat /dev/mtd1
   $ sysupgrade -n /tmp/openwrt-sysupgrade.bin

To go back to the stock firmware, simply reset the bootcmd in the
bootloader to the original value:

  $ setenv bootcmd "boot"
  $ saveenv

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-05-11 01:05:16 +02:00
Stefan Lippers-Hollmann fabcfa9222 ipq40xx: re-add LEDS_LP5523 for the ASUS Lyra MAP-AC2200
This symbol had been enabled in the initial device support submission
for kernel 4.14, but apparently got lost during the v4.19 port.

The ASUS Lyra MAP-AC2200 has a single (very bright) rgb LED, which is
controlled by the TI/National LP5523/55231 LED driver chip. It is left
enabled in a pulsating infinite rainbow loop by the bootloader,
expecting it to be reconfigured (disabled by default) after the boot
process has finished and is also required to indicate failsafe/
firstboot conditions.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2020-04-09 12:51:10 +02:00
Petr Štetiar 5562c5add2 ipq40xx: fix DAP-2610 boot failure
Albert has reported, that his DAP-2610 wont boot with the latest
snapshot and Fredrik has found out, that the device gets stuck at
"Waiting for root device ..." due to missing 5.4 kernel config symbol
CONFIG_MTD_SPLIT_WRGG_FW which was probably lost during the kernel
version bump.

Ref: https://forum.openwrt.org/t/dap-2610-bricked-help-needed
Fixes: 272e0a702a ("ipq40xx: add v5.4 support")
Suggested-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-03-31 16:20:47 +02:00
Tomasz Maciej Nowak ddc0e87fae kernel: move TEO governor to generic config
This new symbol popped up in few places. Disable it in generic config.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[fixed merge conflict in generic/config-5.4]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-03-17 00:51:48 +01:00
Robert Marko e09a5efcdb ipq40xx: 5.4: enable NAND
Lets enable RAW NAND and Qcom NANDC drivers again in kernel 5.4.
They were dropped when 5.4 support was introduced due to upstream
changing the symbol names so refreshing was not enough.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
[cut long line in commit message, enabled BCH as well]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2020-03-15 15:26:34 +01:00
Yousong Zhou 860652f4b9 kernel: 5.4: move some kconfig options to generic
CONFIG_64BIT_TIME=y
	CONFIG_KASAN_STACK=1
	CONFIG_UBSAN_ALIGNMENT=y
	CONFIG_UNIX_SCM=y
	CONFIG_DMA_DECLARE_COHERENT=y
	CONFIG_OF_RESERVED_MEM=y

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-03-10 10:05:50 +08:00
Robert Marko 4ff6c43499 ipq40xx: add IPQ4019 SD/MMC controller support
This commit finally adds support for the built in SD/MMC controller in IPQ4019 SoC.

Controller is supported by the upstream SDHCI-MSM driver with a minor clock setting patch.
Patch is special to the IPQ4019 and cannot be upstreamed.

LDO and SDHCI node are upstreamed, and LDO node is awaiting to be accepted.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2020-03-09 00:53:50 +01:00
David Bauer 0d727f231f treewide: move commonly disabled symbols to generic config
Move new commonly disabled kernel 5.4 symbols to the generic kernel
configuration.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-03-01 00:51:23 +01:00
Christian Lamparter 91a7c9c27d ipq40xx: 5.4: refresh patches and config
This patch just refreshes the 5.4 patches. It seems as if
070-v4.20-soc-qcom-spm-add-SCM-probe-dependency.patch is
already applied, so drop it. It also does a quick
make kernel_oldconfig to get rid of unneeded symbols.

[Looks like USB and Ethernet need some more work].

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2020-02-28 22:46:27 +01:00
Eneas U de Queiroz ee4a0afdcd ipq40xx: use neon crypto drivers
This adds the neon based implementations of AES & SHA256.

For AES, according to the kernel config help:

Use a faster and more secure NEON based implementation of AES in CBC,
CTR and XTS modes.
Bit sliced AES gives around 45% speedup on Cortex-A15 for CTR mode
and for XTS mode encryption, CBC and XTS mode decryption speedup is
around 25%. (CBC encryption speed is not affected by this driver.)
This implementation does not rely on any lookup tables so it is
believed to be invulnerable to cache timing attacks.
...
The observed speedups on ipq40xx are more modest: speedup is around 20%
for CTR mode and for XTS mode encryption, CBC and XTS mode decryption
speedup is around 10%. Measurements were made using tcrypt, with
1024-bytes blocks for CTR & CBC, and 4096-bytes for XTS.
The aes-neon-bs driver uses a fallback for CBC encryption; that fallback
could be either the generic driver written in C, or the scalar arm-asm
one.  Even though aes-arm is 1.9% slower, it is more resilient to timing
attacks (the reason for being slower), so it is being included here.

The neon sha256 module increases performance over the generic module by
33%.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
[Enable only ciphers for now, reorder patch in series to help bisect
as new symbols could lead to build failures, 5.4]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2020-02-28 22:46:09 +01:00
John Crispin 272e0a702a ipq40xx: add v5.4 support
Signed-off-by: John Crispin <john@phrozen.org>
2020-02-28 17:50:46 +01:00