Commit Graph

433 Commits

Author SHA1 Message Date
Chukun Pan
29515862ac sunxi: backport h616 thermal sensor support
Backport H616 thermal sensor support from linux-next.
Tested on the Orange Pi Zero 3 (H618 SoC).

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-26 21:56:57 +01:00
Chukun Pan
29b8ba75fa sunxi: add support for Orange Pi Zero 3
Key features:
  Allwinner H618 SoC (Quad core Cortex-A53)
  1/1.5/2/4 GiB LPDDR4 DRAM
  1 USB 2.0 type C port (Power + OTG)
  1 USB 2.0 host port
  1Gbps Ethernet port
  Micro-HDMI port
  MicroSD slot

Installation:
  Write the image to SD Card with dd.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-26 21:56:57 +01:00
Qingfang Deng
6b007d2512 treewide: disable spectre mitigation on unaffected Arm64 targets
Cortex-A53 is not vulnerable to any Spectre variants.

Ref: https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2024-03-23 20:00:49 +01:00
Qingfang Deng
54f9744c82 treewide: disable spectre mitigation on unaffected Arm32 targets
Cortex-A5 and Cortex-A7 are not vulnerable to any Spectre variants.

Ref: https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2024-03-23 20:00:49 +01:00
Tianling Shen
b16928aa96 sunxi: mark upstreamed patches as such
Also sort them to start from 001.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-19 16:02:05 +01:00
Tianling Shen
193071fb01 sunxi: remove outdated kernel 5.15 files
We're on 6.1 now, these files can go.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-19 16:02:05 +01:00
Chukun Pan
00e3447926 sunxi: enable cpufreq driver for H6 SoC
Allwinner H6 needs this driver to enable DVFS support.
May also be used with H616/H618 SoC in the future.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-10-28 18:31:43 +02:00
Chukun Pan
b25c7548e0 sunxi: fixes led for nanopi boards
Kernel 5.15 already supports the NanoPi R1 and NanoPi R1S H5,
and they use new LED bindings that do not match the existing
settings in 01_leds. Update led settings to fixes that.

List the led node on NanoPi R1S H5:
root@OpenWrt:~# ls /sys/class/leds/
green:lan   green:wan   red:status

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-10-28 18:31:43 +02:00
Sebastian Pflieger
2970d4b6cc sunxi: generalize top-level BOARDNAME and update suported SoCs
Allwinner created to may SoC variants to list them all at top-level.

Signed-off-by: Sebastian Pflieger <sebastian@pflieger.email>
2023-09-24 18:16:40 +02:00
John Audia
e3559fb445
kernel: bump 6.1 to 6.1.54
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.54

Removed upstreamed:
	generic/backport-6.1/020-v6.3-02-UPSTREAM-mm-multi-gen-LRU-rename-lrugen-lists-to-lru.patch[1]
	ipq806x/patches-6.1/140-v6.5-hwspinlock-qcom-add-missing-regmap-config-for-SFPB-M.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.54&id=a73d04c460521e45f257d28d73df096e41ece324
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.54&id=e93bc372dbc0bde133c854c03502a95617041972

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-09-23 13:10:28 +02:00
Zoltan HERPAI
6bf8193b25 sunxi: add support for Bananapi P2 Zero
CPU:     Allwinner H2+ quad-core Cortex-A7 @ 1.2GHz
Memory:  512Mb DDR3
Storage: SDcard, 8GB eMMC
Network: 10/100M ethernet, optional PoE support, Ampak AP6212 wifi + BT
USB:     1x USB 2.0 OTG
Other:   40-pin expansion header, mini-HDMI

Flashing instructions:
  Standard sunxi SD card installation procedure - copy image to SD card,
  insert into SD card slot on the device and boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-09-18 18:15:21 +02:00
Christian Marangi
c64a5d122f
sunxi: refresh kernel patches
Refresh kernel patches for sunxi target.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-09-18 13:44:50 +02:00
Zoltan HERPAI
12584395dc sunxi: add support for H616 SoC and Orangepi Zero 2
Specifications:

SoC:     Allwinner H616 @ 1.5 Ghz
DRAM:    1Gb LPDDR3
Power:   5V USB-C
Video:   HDMI (Type 2.0A - micro)
Network: 10/100/1000Mbps Ethernet (Realtek RTL8211F), AW859A BT+wifi
Storage: microSD / 2Mb SPI flash
USB:     1 USB2.0 Host
Debug    Serial UART

Flashing instructions:
  Standard sunxi SD card installation procedure - copy image to SD card,
  insert into SD card slot on the device and boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-09-18 00:08:19 +02:00
Zoltan HERPAI
863444f9cb sunxi: use kernel 6.1 as default
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-09-16 22:27:17 +02:00
Zoltan HERPAI
f01982ec0b sunxi: add testing kernel 6.1
Compile-tested: all targets
Runtime-tested:
 - Cortex-A53: Pine64+
 - Cortex-A7:  Bananapro, Orange Pi 2
 - Cortex-A8:  pcDuino v2

Patches refreshed.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-08-24 18:52:06 +02:00
Zoltan HERPAI
939d4d0b70 sunxi: copy patches from 5.15 to 6.1
To start the migration, we copy the patches from 5.15 to 6.1.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-08-24 18:51:51 +02:00
Zoltan HERPAI
22d7ac4b80 sunxi: bananapro: add firmware files for Ampak 6181
The Bananapro board has an Ampak 6181 onboard (BCM43362/1), enable
the firmware files in the device profile, and add wpad-basic-mbedtls.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-08-12 14:00:18 +02:00
Zoltan HERPAI
80edfaf675 sunxi: add support for Banana Pi M3
CPU	Allwinner A83t Octa-core Cortex A7 @ 1.2GHz
Memory  2Gb DDR3
Storage	SDcard, SATA (via USB), 8GB eMMC
Network	10/100/1000M ethernet, Ampak AP6212 wifi + BT
USB	2x USB 2.0

Flashing instructions:
 Standard sunxi SD card installation procedure - copy image to SD card,
 insert into SD card slot on the device and boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-08-11 18:04:44 +02:00
Zoltan HERPAI
dc122f4d9e sunxi: add modules for AC100 MFD and RTC
The X-Powers AC100 is a multi-function IC used to provide RTC
and audio codec via RSB (reduced serial bus, an Allwinner-
speciality). On some boards using the A80/A83T SoCs, aside
from the RTC functionality, the RTC is used as a clocksource
for the Ampak WiFi/BT modules.

Add modules for the core MFD support and the RTC.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-08-11 18:04:43 +02:00
Christian Svensson
c170fc78ba kernel: remove CRYPTO_BLAKE2S from all >=5.15
This option was removed from upstream kernel back in 2022.
See commits:
 2d16803c562ecc644803d42ba98a8e0aef9c014e (>=6.0)
 3dd33a09f5dc12ccb0902923c4c784eb0f8c7554 (>=5.15.61 backport)

Signed-off-by: Christian Svensson <blue@cmd.nu>
2023-07-08 16:54:01 +02:00
Hauke Mehrtens
16a20512d8
kernel: Set CONFIG_FRAME_WARN depending on target
This set the CONFIG_FRAME_WARN option depending on some target settings.
It will use the default from the upstream kernel and not the hard coded
value of 1024 now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-06-02 11:19:32 +02:00
Nick Hainke
1d3e71bd97
treewide: remove files for building 5.10 kernel
All targets are bumped to 5.15. Remove the old 5.10 patches, configs
and files using:

  find target/linux -iname '*-5.10' -exec rm -r {} \;

Further, remove the 5.10 include.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-12 13:02:43 +02:00
Tony Ambardar
3980dfcd05 kernel: fix handling of CONFIG_DYNAMIC_DEBUG
Since CONFIG_DYNAMIC_DEBUG is already managed via the KERNEL_DYNAMIC_DEBUG
setting in Config-kernel.in (default N), remove or disable it in target
configs which unconditionally enable it, along with the related setting
CONFIG_DYNAMIC_DEBUG_CORE. This saves several KB in the kernels for
ipq40xx, ipq806x, filogic, mt7622, qoriq, and sunxi.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-05-03 10:26:17 -07:00
Jan-Niklas Burfeind
1e138ca703 sunxi: enable CONFIG_NVMEM_SYSFS
in both the stable and the testing kernel

h2+/h3/h5 devices have a Secure ID that can be read from
`/sys/bus/nvmem/devices/sunxi-sid0/nvmem`.
Enabling CONFIG_NVMEM_SYSFS grants sysfs access from userspace.

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
2023-02-26 22:22:48 +01:00
Rosen Penev
2630e5063d treewide: replace wpad-basic-wolfssl default
The newly merged mbedtls backend is smaller and has fewer ABI related
issues than the wolfSSL one.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-04 02:35:03 +01:00
Stijn Tintel
f1aa8f34ff sunxi: switch to kernel 5.15
The testing kernel has been available since early 2022, and is running
fine for several people. Let's switch to it by default.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Karl Palsson <karlp@etactica.com>
Tested-by: Jan-Niklas Burfeind <openwrt@aiyionpri.me>
2023-01-09 21:39:46 +02:00
Jan-Niklas Burfeind
c7d3bbb909 sunxi: ensure NanoPi R1 has unique MAC address
Ensure the MAC address for all NanoPi R1 boards is assigned uniquely for
each board.

The vendor ships the device in two variants; one with and one without
eMMC; but both without static mac-addresses.
In order to assign both board types unique MAC addresses, fall back on
the same method used for the NanoPi R2S and R4S in case the EEPROM
chip is not present by generating the board MAC from the SD card CID.

[0] https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R1#Hardware_Spec

Similar too and based on:

commit b5675f500d ("rockchip: ensure NanoPi R4S has unique MAC address")

Co-authored-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
2022-12-25 02:27:55 +01:00
Chukun Pan
53123b93b0 sunxi: fix board_name for MarsBoard A10
The compatible in the device tree is "haoyu,a10-marsboard",
modify the board_name to keep it consistent.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2022-12-17 20:55:47 +01:00
Chukun Pan
7bcf6b54fc sunxi: fix typo in device packages for MarsBoard A10
The kmod prefix for sound-soc-sunxi is missing, fix it.
Also add kmod-sound-core as dependence.

Fixes: 6a35659 ("sunxi: Added profile for HAOYU Electronics Marsboard A10")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2022-12-17 20:55:47 +01:00
Chukun Pan
b40a047f1f sunxi: fix sunxi-ir kconfig and description
Removed a20 in description, since it
only works for a10, a13 and a31.
Also refreshed kernel config.

Fixes: #10466
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(moved fixes, refreshed, added CONFIG_DVB_USB=n)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-12-12 09:06:17 +01:00
Chukun Pan
a125d46a28 sunxi: modules: remove useless AddDepends/rtc
AddDepends/rtc has been removed in commit 3da7fe6, same here.
Fixes: 3da7fe6 ("kernel: remove useless AddDepends/rtc abstraction")

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(RTC_SUPPORT - though this is implied by the TARGET_sunxi)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-12-12 09:06:17 +01:00
Aleksander Jan Bajkowski
9226f1e419
kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config
Endianness depends on CPU architecture. CONFIG_CPU_(BIG/LITTLE)_ENDIAN should
be enabled on target or subtarget based on SoC architecture.

Fixes warning:
$ make kernel_oldconfig CONFIG_TARGET=subtarget
...
.config:1008:warning: override: CPU_LITTLE_ENDIAN changes choice state
....

Summary:
- ARC - only the CONFIG_CPU_BIG_ENDIAN symbol is defined for this architeture.
  If it is disabled then the processor operates in LITTLE_ENDIAN mode (default),
- ARM32 - CONFIG_CPU_LITTLE_ENDIAN symbol available since kernel 5.19. This
  option should be enabled after OpenWRT moves to kernel 6.x. After refreshing
  the kernel, the symbol disappears,
- ARM64 - enabled CONFIG_CPU_LITTLE_ENDIAN,
- MIPS - enabled relevant symbols,
- POWERPC -  enabled CONFIG_CPU_BIG_ENDIAN,
- UML - Symbols are not defined for this architecture,
- X86 - always little endian. Symbols are not defined for this architecture.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2022-10-21 13:47:01 +02:00
Petr Štetiar
d1163fd13f kernel: bump 5.10 to 5.10.137
Removed following upstreamed patch:

 * bcm53xx: 081-next-ARM_dts_BCM53015-add-mr26.patch

All other patches automagically rebased.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-08-23 10:37:04 +02:00
Hauke Mehrtens
ff06edd1f0 kernel: Activate CONFIG_GPIOLIB in generic configuration
All targets expect the malta target already activate the CONFIG_GPIOLIB
option. Move it to generic kernel configuration and also activate it for
malta.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Tomasz Maciej Nowak
539e60539a generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM]
This is now built-in, enable so it won't propagate on target configs.

Link: https://lkml.org/lkml/2022/1/3/168
Fixes: 79e7a2552e ("kernel: bump 5.15 to 5.15.44")
Fixes: 0ca93670693b ("kernel: bump 5.10 to 5.10.119")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
(Link to Kernel's commit taht made it built-in,
CRYPTO_LIB_BLAKE2S[_ARM|_X86] as it's selectable, 5.10 backport)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-24 17:10:24 +02:00
Eneas U de Queiroz
9be35180f4 sunxi/cortexa53: enable armv8-CE crypto algorithms
This enables armv8 crypto extensions version of AES, GHASH, SHA1, and
CRC T10 algorithms in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Eneas U de Queiroz
306861cf38 sunxi/cortexa53: refresh kernel 5.15 config
This is result of a make kernel_oldconfig CONFIG_TARGET=subtarget.

One new option popped up:
Support for the Allwinner H616 CCU (SUN50I_H616_CCU) [Y/n/?] (NEW) n

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Aleksander Jan Bajkowski
a98ded6c5c kernel: move some symbols to generic config
This commit add some enabled symbols to generic config.
LTO is only supported by clang compiler and therefore should
be disabled in the generic config instead of duplicating this
symbol in each target. CONFIG_LTO_NONE do this job.

The second group of symbols is enabled by the options available
in the generic config and is therefore added here:
* CONFIG_AF_UNIX_OOB is selected by CONFIG_NET && CONFIG_UNIX,
* CONFIG_BINARY_PRINTF is selected by CONFIG_BPF_SYSCALL,
* CONFIG_NET_SOCK_MSG is selected by CONFIG_BPF_SYSCALL && CONFIG_NET.

The other symbols are disabled and should be in the generic config.

This commit also removes these symbols from subtargets.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2022-04-09 19:31:46 +02:00
Petr Štetiar
f32ecb9665 sunxi: update config for 5.15
Refresh kernel config with `make kernel_oldconfig` make target.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-29 12:02:50 +02:00
Petr Štetiar
177e79c218 sunxi: refresh kernel 5.15 patches
So the patches apply cleanly.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-29 12:02:50 +02:00
Petr Štetiar
c80088b407 sunxi: rebase sun50i-h5-nanopi-r1s-h5.dts onto 5.15
So the patch can be applied on top of 5.15 kernel.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-29 12:02:50 +02:00
Petr Štetiar
6d1dd34732 sunxi: enable 5.15 as testing kernel
So anyone interested can help with new kernel version integration and
testing.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-29 12:02:50 +02:00
Petr Štetiar
c707e1bc04 sunxi: copy config and patches from 5.10 to 5.15
So the upcoming changes needed for 5.15 can be reviewed easily.

Removed following upstreamed patches:

 * 062-add-sun8i-h3-zeropi-support.patch
 * 100-sunxi-h3-add-support-for-nanopi-r1.patch
 * 101-sunxi-h5-add-support-for-nanopi-r1s-h5.patch

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-29 12:02:50 +02:00
Petr Štetiar
ffa1088f63 sunxi: cortexa7: fix ethernet link detection on a20-olinuxino-lime2
a20-olinuxino-lime2 is currently having hard time with link detection of
certain 1000Mbit partners due to usage of generic PHY driver, probably
due to following missing workaround introduced in upstream in commit
3aed3e2a143c ("net: phy: micrel: add Asym Pause workaround"):

 The Micrel KSZ9031 PHY may fail to establish a link when the Asymmetric
 Pause capability is set. This issue is described in a Silicon Errata
 (DS80000691D or DS80000692D), which advises to always disable the
 capability. This patch implements the workaround by defining a KSZ9031
 specific get_feature callback to force the Asymmetric Pause capability
 bit to be cleared.

 This fixes issues where the link would not come up at boot time, or when
 the Asym Pause bit was set later on.

As a20-olinuxino-lime2 has Micrel KSZ9031RNXCC-TR Gigabit PHY since
revision H, so we need to use Micrel PHY driver on those devices.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-21 23:05:27 +01:00
Daniel Golle
3a14580411 kernel: delete Linux 5.4 config and patches
As the upcoming release will be based on Linux 5.10 only, remove all
kernel configuration as well as patches for Linux 5.4.
There were no targets still actively using Linux 5.4.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-03-21 11:36:30 +00:00
John Audia
a2d4b5711a kernel: bump 5.10 to 5.10.101
Removed upstreamed:
  pending-5.10/841-USB-serial-option-add-ZTE-MF286D-modem.patch[1]
  bcm27xx/950-0592-drm-vc4-Allow-DBLCLK-modes-even-if-horz-timing-is-od.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.101&id=7113440a36c741efd7c76e3d70b3634100120cdb
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.101&id=21c890ca8eaecea06cabb92be2a53a6f26f56383

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <graysky@archlinux.us>
2022-03-01 21:38:36 +01:00
Paul Spooren
e329227f40 sunix: fix typo in kmod-ata-core
There was a missing `k` in the package name.
s/mod-ata-core/kmod-ata-core

Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-02-18 01:31:15 +01:00
Daniel Golle
d05ac928f6
sunxi: make use of 'rootfs-part' feature
Use 'rootfs-part' feature instead of referencing the TARGET_sunxi in
Config-images.in.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-01-23 19:48:25 +00:00
Rui Salvaterra
2bb02ccae3 kernel: bump 5.10 to 5.10.89
Deleted (upstreamed):
bcm27xx/patches-5.10/950-0186-pinctrl-bcm2835-Change-init-order-for-gpio-hogs.patch [1]
sunxi/patches-5.10/103-arm64-dts-allwinner-orangepi-zero-plus-fix-PHY-mo.patch [2]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.89&id=ba696b470839d70c6b8290c1f798bac7fb2a584c
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.89&id=93a957bbf46ceb224b959de61fe85cfc6f71b6c7

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-01-03 01:00:03 +01:00
Hauke Mehrtens
0dc4ab344b sunxi: Use rtl8723bu-firmware instead of rtl8723bs-firmware
The firmware for the rtl8723bs chip is now included in the
rtl8723bu-firmware package.

Fixes: 397dfe4a97 ("linux-firmware: Update to version 20121216")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-12-27 00:58:29 +01:00