Commit Graph

134 Commits

Author SHA1 Message Date
AmadeusGhost
189844d71c rockchip: add OF node for pcie eth on NanoPi R4S
This adds the OF node for the pcie ethernet adapter on the FriendlyARM
NanoPi R4S. Add the correct value for the r8168 driver LED configuration
register to match the blink behavior of the other port on the device.

Run-tested-by: zcracker
Signed-off-by: AmadeusGhost <amadeus@immortalwrt.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-29 00:10:10 +08:00
Rui Salvaterra
edb4a919c2 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-22 23:12:24 +08:00
David Bauer
065ee6f9c2 rockchip: use alternative CID path
Use an alternative path to access the CID of the SD card in MMC0, used
for the generation of MAC addresses. With Kernel 5.10, the device name
of the MMC controller changed, breaking MAC address generation.

The new path is compatible with Kernel 5.4 as well as Kernel 5.10.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-04-18 23:51:13 +08:00
David Bauer
6ecda7f811 rockchip: add missing config symbols
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-04-18 23:50:55 +08:00
David Bauer
f729063a1d rockchip: fix kernel 5.10 built for RockPi 4
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-04-18 23:48:17 +08:00
Linus Walleij
04c0fe5324 kernel: Disable CONFIG_DMA_PERNUMA_CMA by default
This CMA memory allocation option only applies to NUMA
(Non-Uniform Memory Access) systems which are seldom
the kind of systems that OpenWRT address.

It is safe to assume that any system that need this
option would turn it on locally.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2021-04-18 23:33:22 +08:00
AmadeusGhost
c7fb16903d rockchip: orangepi-r1-plus: typo fixes
This affects nothing, just correct the format.
2021-04-07 23:20:37 +08:00
Tianling Shen
c67ca43017
Revert "rockchip: backport upstream usbdrd3 patches"
This reverts commit 2d6e43739c.

This is not stable yet, and has some issues when detects USB devices.

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
2021-04-06 19:56:35 +08:00
Tianling Shen
2d6e43739c
rockchip: backport upstream usbdrd3 patches
Link: https://lore.kernel.org/linux-rockchip/20210205114011.10381-1-jbx6244@gmail.com/
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-05 15:16:42 +08:00
Tianling Shen
bbceea5763
rockchip: nanopi-r4s: fix patch offset
Fixes: #343

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-04 14:10:07 +08:00
Kevin Darbyshire-Bryant
258e647d6b kernel: bump 5.10 to 5.10.27
Use update_kernel to refresh all patches, required manual updates to:

610-netfilter_match_bypass_default_checks.patch
611-netfilter_match_bypass_default_table.patch
762-net-bridge-switchdev-Refactor-br_switchdev_fdb_notif.patch
764-net-bridge-switchdev-Send-FDB-notifications-for-host.patch

Run-tested: x86_64

Nothing screamed out but any funny business with linux bridging should
suspect this update first.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2021-04-04 12:23:06 +08:00
John Audia
27f4500268 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-04 12:22:41 +08:00
QiuSimons
75f2e29fc4
rockchip: nanopi-r4s: adjust cpu-voltage table
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-04 01:41:51 +08:00
QiuSimons
c07a8ceb87
rockchip: nanopi-r4s: fix read macaddr from Ethernet
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-01 19:46:09 +08:00
AmadeusGhost
52470b2bd0 rockchip: add support for OrangePi R1 Plus
Hardware Specification:
  CPU: RockChip RK3328 (4 cores)
  RAM: 1GB DDR4
  Ethernet: 2x 1000 Base-T
  Flash: SPI-NOR 16 MB (mx25l12835f)
  LED: SYS, LAN, WAN
  MicroSD Slot x 1
  Button: Reset
  USB:1x 2.0
  Serial1: 13 Pin pin-header
  Serial2: 3 Pin debug port
  Type-C: for power input
  Power Supply: DC 5V/2A

Installation:
  Write the image to SD Card with dd.

Signed-off-by: AmadeusGhost <amadeus@jmu.edu.cn>
2021-03-29 23:29:18 +08:00
Lucian Cristian
c10101fc0c rockchip: add drm and lima gpu driver
Pack the drivers needed for enabling the drm and gpu driver
for rk3328 and rk3399. Fix: #304

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
[rebase commit, apply review recommendations]
Signed-off-by: AmadeusGhost <amadeus@immortalwrt.org>
2021-03-28 23:54:59 +08:00
Tianling Shen
604ec3d037
rockchip: nanopi-r4s: fix read mac address
The valid mac address only exists on ETH1.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-28 21:26:50 +08:00
Hauke Mehrtens
2596175750 kernel: Move CONFIG_USERIO to generic config
The CONFIG_USERIO option is unset in multiple target configurations. On
the sunxi target it is activated. Move the kernel configuration option
to the generic kernel configuration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-03-28 11:17:21 +08:00
Hauke Mehrtens
e723e1d4b1 kernel: Deactivate CONFIG_VFIO in generic kernel config
Instead of deactivating this in every target config, deactivate it once
in the generic kernel config. I was asked for this config option in a
x86 64 build in OpenWrt 21.02.

Fixes: 87046e87e2 ("kernel: add missing kernel config symbol")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-03-28 11:16:57 +08:00
Tianling Shen
c12fc6205c
rockchip: nanopi-r4s: refresh latest patches accepted by upstream
Link: https://lore.kernel.org/r/20210319051627.814-2-cnsztl@gmail.com
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-22 19:55:38 +08:00
Tianling Shen
8b7824a7fd
kernel: 5.10: refresh patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-22 18:54:08 +08:00
Aleksander Jan Bajkowski
762bdbf498 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-20 11:19:57 +08:00
Tianling Shen
c9ba4a6854
rockchip: refresh patches for k5.4
Fixes: 8dae2b8 ("kernel: bump 5.4 to 5.4.105")

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-14 11:36:29 +08:00
Tianling Shen
6c805220cf
target/rockchip: rockpi4: fix typo err
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-13 01:43:52 +08:00
Tianling Shen
44cbe50f17
Revert "rockchip: rk3328: refresh usb3 nodes"
This reverts commit 1f2b46cbb5.

We found some issues with the usb3 inno driver, however it's good enough
to use generic usb3 driver for R2S, so revert it here and wait for fixes.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-10 00:51:41 +08:00
Tianling Shen
1f2b46cbb5
rockchip: rk3328: refresh usb3 nodes
Reference:
- e93adaa8e9

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-09 00:37:49 +08:00
Tianling Shen
201dc3506a
rockchip: introduce vendor USB3 inno driver
Reference: faa767a9d0

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-09 00:37:49 +08:00
AmadeusGhost
c536e20c61 rockchip/image: update note for pine64-bin
Signed-off-by: AmadeusGhost <amadeus@immortalwrt.org>
2021-03-08 12:00:17 +08:00
AmadeusGhost
959b033fc3
rockchip: nanopi-r2s: add dmc controller nodes
Rererred to: f9ae6e992d

Signed-off-by: AmadeusGhost <amadeus@immortalwrt.org>
[separated new files from patches, rename dtsi]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-07 17:05:22 +08:00
AmadeusGhost
a07adcaeea
rorkchip: rk3328: introduce dmc driver from vendor
Referred to:
- a0e009a73e
- fcd9629c05

Signed-off-by: AmadeusGhost <amadeus@immortalwrt.org>
[separated new files from patches]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-07 17:05:22 +08:00
AmadeusGhost
effa994f43
uboot-rockchip: add support for building with rockchip ddrloader
Referred to http://opensource.rock-chips.com/wiki_Boot_option#Boot_flow.

Signed-off-by: AmadeusGhost <amadeus@immortalwrt.org>
[fixed format issue]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-07 17:05:22 +08:00
Tianling Shen
6401fca74d
rockchip: use native mac address for NanoPi R4S
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-07 15:43:46 +08:00
Ilya Lipnitskiy
7387a3a03d apm821xx, mt7621, oxnas, rockchip, zynq: remove PLUGIN_HOSTCC
This config symbol should not be defined in target configs.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-03-06 18:06:08 +08:00
Rui Salvaterra
eeb082bd80 kernel: bump 5.10 to 5.10.20
Also add a new kconfig symbol (CONFIG_KCMP) to the generic config,
disabling the SYS_kcmp syscall (it was split from
CONFIG_CHECKPOINT_RESTORE, which is disabled by default, so the
previous behaviour is kept).

Removed (upstreamed) patches:
  070-net-icmp-pass-zeroed-opts-from-icmp-v6-_ndo_send-bef.patch
  081-wireguard-device-do-not-generate-ICMP-for-non-IP-pac.patch
  082-wireguard-queueing-get-rid-of-per-peer-ring-buffers.patch
  083-wireguard-kconfig-use-arm-chacha-even-with-no-neon.patch
  830-v5.12-0002-usb-serial-option-update-interface-mapping-for-ZTE-P685M.patch

Manually rebased patches:
  313-helios4-dts-status-led-alias.patch
  104-powerpc-mpc85xx-change-P2020RDB-dts-file-for-OpenWRT.patch

Run tested:
  ath79 (TL-WDR3600)
  mvebu (Turris Omnia)

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-03-06 12:21:43 +08:00
Tianling Shen
7fe6f5b9fa
kernel: 5.10: refresh generic and rockchip patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-05 16:32:13 +08:00
Daniel Golle
ab28d07c3b
treewide: fix spelling 'seperate' -> 'separate'
This popular spelling mistake was also introduced by myself lately.
Fix it everywhere.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-02 22:26:41 +08:00
Aleksander Jan Bajkowski
b9457eb465 kernel: move some new symbols available on 5.10 to generic
Move some disabled config options found in sunxi target to generic.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-02-28 12:00:47 +08:00
CN_SZTL
887eddeb07
rockchip: add missing Kconfig
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-21 16:00:59 +08:00
CN_SZTL
0ade988ff1
rockchip: remove urngd package for rk3399
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-21 15:45:19 +08:00
CN_SZTL
c7b200b8a2
rockchip: re-order patches
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-21 15:37:10 +08:00
CN_SZTL
9a30f65efb
rockchip: apply own patches
Included:
 - Hack for support MTWiFi
 - HWRNG driver for RK3328 & RK3399
 - Fix for hot reboot
 - I2C screen support for NanoPi R2S
 - Overclocking support for RK3328 and NanoPi4 series
 - Ethernet compat node for NanoPi R2S
 - Support for NanoPi R4S

Minor adjustments:
 - Used r8169 driver for NanoPi R4S by default as r8168 is broken on newer kernel

Refreshed all patches.

Reviewed-by: AmadeusGhost <amadeus@project-openwrt.eu.org>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 13:39:19 +08:00
David Bauer
d53ae8c4d1
rockchip: add Kernel 5.10 support
Remove all upstreamed patches and add the kernel configuration for
version 5.10.

The Rock Pi 4 was split in multiple versions. Add a DTS with the old
name in order to keep compatibility while having kernel 5.4 and 5.10 in
parallel. Switch to the Rock Pi 4A DTS once Kernel 5.4 support is
removed.

Tested-on: Nanoi R2S

Signed-off-by: David Bauer <mail@david-bauer.net>

Reviewed-by: AmadeusGhost <amadeus@project-openwrt.eu.org>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 13:39:19 +08:00
CN_SZTL
60e043ab40
Revert "rockchip: use LZMA compressed FIT image for NanoPi R2S"
This reverts commit 0f57324f48.
Prepare for the upcoming kernel 5.10 support.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-17 21:58:38 +08:00
CN_SZTL
842881e337
sunxi: add r8152 patches for customized LEDs
Move these patches out of generic and put into specific targets for easy maintaince.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-17 19:38:52 +08:00
Adrian Schmutzler
0cd3943f36 target: use SPDX license identifiers on Makefiles
Use SPDX license tags to allow machines to check licenses.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-11 12:05:39 +08:00
AmadeusGhost
673f0c11b1 r8152: move led configuration patches into generic 2021-02-10 12:13:04 +08:00
Adrian Schmutzler
0e2815c5c6
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>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-01-29 15:20:43 +08:00
Marty Jones
02395293a2
rockchip: fix SUPPORTED_DEVICES for Radxa ROCK Pi 4
This sets SUPPORTED_DEVICES to match the compatible in the DTS.

While at it, synchronize the capitalization in DEVICE_MODEL and
DTS model.

Signed-off-by: Marty Jones <mj8263788@gmail.com>
[commit title/message facelift, move variable in armv8.mk]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-01-29 15:13:44 +08:00
CN_SZTL
03489fc1a4
rockchip: re-order patches
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-01-24 00:14:55 +08:00
David Bauer
aa75db53e8 rockchip: use stable MAC-address for NanoPi R2S
The NanoPi R2S does not have a board specific MAC address written inside
e.g. an EEPROM, hence why it is randomly generated on first boot.

The issue with that however is the lack of a driver for the PRNG.
It often results to the same MAC address used on multiple boards by
default, as urngd is not active at this early stage resulting in low
available entropy.

There is however a semi-unique identifier available to us, which is the
CID of the used SD card. It is unique to each SD card, hence we can use
it to generate the MAC address used for LAN and WAN.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-01-19 12:10:04 +08:00