1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-26 17:47:29 +02:00
Commit Graph

23 Commits

Author SHA1 Message Date
David Bauer
6f1b8c652f rockchip: remove unused config symbols
Remove MDIO and I2C bitbangig support from the kernel.

These functionalities are currently not used by any board in the target.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-11-04 23:58:27 +01:00
David Bauer
3f05b5fda3 rockchip: fix NanoPi R2S GMAC clock name
This commit fixes the name for the GMAC clock to gmac_clkin, as this is
the name of the clock provided by the rk3328-clk driver.

Without this commit, the GMAC will not work in TX direction.

Suggested-by: Tobias Waldvogel <tobias.waldvogel@gmail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
2020-11-04 23:58:13 +01:00
Daniel Golle
5423d9d27e kernel: move F2FS_FS_XATTR and F2FS_STAT_FS symbols to generic
Similar to how it was already done for other filesystems' *_FS_XATTR
kernel config symbols, also move CONFIG_F2FS_FS_XATTR=y and
CONFIG_F2FS_STAT_FS=y to target/linux/generic.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-10-09 23:20:19 +01:00
Paul Spooren
0f5b5cf730 kernel: clean up XATTR config symbols
Extended attributes are required for overlayfs and have hence been long
ago enabled for jffs2, but should be enabled unconditionally for all
other filesystems which may potentially serve as overlayfs' upper
directory. Previously it was inconsistently added in multiple targets.
Add symbols to generic kernel config and remove all *_XATTR symbols
from target configs.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[keep things as they are for squashfs, improve commit message]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-10-09 01:49:22 +01:00
Marty Jones
5b5469f87a rockchip: add support for Radxa Rock Pi 4
This adds basic support for Radxa Rock Pi 4

Specification:
  - RAM:      1 GB/ 2 GB/4 GB LPDDR4

  - SoC:      Rockchip RK3399
  - CPU:      64bit hexa core processor
              Dual Cortex-A72, freqency 1.8Ghz
              with quad Cortex-A53, frequency 1.4Ghz
  - USB:      USB 3.0 OTG x1
              hardware switch for host/device switch, upper one
              USB 3.0 HOST x1
              dedicated USB3.0 channel, lower one
              USB 2.0 HOST x2
  - Ethernet: 1x GbE
  - Storage:  eMMC module
              uSD card
              M.2 SSD
  - Wireless: 802.11 ac wifi
              Bluetooth 5.0
              currently not supported

 firmware Installation
 ======================
 gzip -d xxx.img.gz, then dd the .img to SD/eMMC
 ======================

 Device Tested: ROCK PI 4 Model B v1.3

Signed-off-by: Marty Jones <mj8263788@gmail.com>
2020-10-03 22:51:36 +02:00
David Bauer
4b4bff5070 rockchip: enable Realtek PHY support
The NanoPi R2S features a Realtek Gigabit Ethernet PHY. Enable the
Realtek specific PHY driver to correctly configure internal delays.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-10-03 19:00:49 +02:00
David Bauer
9f907c46bb rockchip: fix NanoPi R2S PHY ID
Fix the PHY ID for the NanoPi R2S PHY compatible to match the used PHY.
The ID was wrong as I've accidentally picked the wrong upstream patch.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-10-03 19:00:49 +02:00
David Bauer
18acf62be1 rockchip: rk3328: add compatible to NanoPi R2S ethernet PHY
This adds the compatible property to the NanoPi R2S ethernet PHY node.
Otherwise, the PHY might not be probed, as the PHY ID reads all 0xff
when it is still in reset.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-09-30 00:06:59 +02:00
David Bauer
8b4233188d rockchip: refresh NanoPi R2S patches
Update the patches for the NanoPi R2S to the v3 sent (and accepted)
upstream.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-09-28 17:32:14 +02:00
John Audia
da98603597 kernel: bump 5.4 to 5.4.58
This PR is a blend of several kernel bumps authored by ldir taken from his
staging tree w/ some further adjustments made by me and update_kernel.sh

Summary:
Deleted upstreamed patches:
  generic:
    742-v5.5-net-sfp-add-support-for-module-quirks.patch
    743-v5.5-net-sfp-add-some-quirks-for-GPON-modules.patch
  bcm63xx:
    022-v5.8-mtd-rawnand-brcmnand-correctly-verify-erased-pages.patch
    024-v5.8-mtd-rawnand-brcmnand-fix-CS0-layout.patch
  mediatek:
    0402-net-ethernet-mtk_eth_soc-Always-call-mtk_gmac0_rgmii.patch

Deleted patches applied differently upstream:
  generic:
    641-sch_cake-fix-IP-protocol-handling-in-the-presence-of.patch

Manually merged patches:
  generic:
    395-v5.8-net-sch_cake-Take-advantage-of-skb-hash-where-appropriate.patch
  bcm27xx:
    950-0132-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch
  layerscape:
    701-net-0231-enetc-Use-DT-protocol-information-to-set-up-the-port.patch

Build system: x86_64
Build-tested: ath79/generic, bcm27xx/bcm2708, bcm27xx/bcm2711,
  imx6, mvebu/cortexa9, sunxi/a53
Run-tested: Netgear R7800 (ipq806x)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-By: Lucian Cristian <Lucian.cristian@gmail.com> [mvebu]
Tested-By: Curtis Deptuck <curtdept@me.com> [x86/64]
[do not remove 395-v5.8-net-sch_cake-Take-advantage-... patch,
adjust and refresh patches, adjust commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-By: John Audia <graysky@archlinux.us> [ipq806x]
2020-08-18 18:14:54 +02:00
84fc80dd66 rockchip: remove useless echo in 40-net-smp-affinity
The command in the $() brackets will already provide the same output.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-17 23:13:57 +02:00
Hauke Mehrtens
b35c54227b kernel: Move CONFIG_IONIC to generic kernel config
It is deactivated everywhere, just set this in the generic config.

Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-10 23:58:58 +02:00
d4ac0ad543 treewide: make dependency on kmod-usb-net selective
A bunch of kernel modules depends on kmod-usb-net, but does not
select it. Make AddDepends/usb-net selective, so we can drop
some redundant +kmod-usb-net definitions for DEVICE_PACKAGES.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-10 12:54:30 +02:00
David Bauer
c5360894dc rockchip: enable rockchip-thermal
Enable the rockchip-thermal driver to allow reading the temperature of
the SoC.

Tested on NanoPi R2S

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-07-29 01:40:20 +02:00
David Bauer
7a4fc8906c rockchip: distribute net interrupts
This adds a hotplug script for distributing interrupts of eth0 and eth1
across different cores. Otherwise the forwarding performance between
eth0 and eth1 is severely affected.

The existing SMP distribution mechanic in OpenWrt can't be used here, as
the actual device IRQ has to be moved to dedicated cores. In case of
eth1, this is in fact the USB3 controller.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-07-28 15:52:44 +02:00
David Bauer
5a57a1ac1f arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
where tx checksumming does not work with packets larger than 1498.

The default Programmable Buffer Length for TX in these GMAC's is
not suitable for MTUs higher than 1498. The workaround is to disable
TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
impacts as it disables hardware checksumming.

This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
the most popular MTU value of 1500.

For reference, see https://lkml.org/lkml/2019/4/1/1382.

Signed-off-by: Carlos de Paula <me@carlosedp.com>
Link: https://lore.kernel.org/r/20200218221040.10955-1-me@carlosedp.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
2020-07-28 15:52:44 +02:00
David Bauer
6242ac4735 rockchip: enable LAN LED configuration
This enables the LEDs on the LAN interfaces.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-07-28 15:52:44 +02:00
David Bauer
b7a9a183fb rockchip: add NanoPi R2S support
Hardware
--------
RockChip RK3328 ARM64 (4 cores)
1GB DDR4 RAM
2x 1000 Base-T
3 LEDs (LAN / WAN / SYS)
1 Button (Reset)
Micro-SD slot
USB 2.0 Port

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card using
dd.

MAC-address
-----------
The vendor code supports reading a MAC address from an EEPROM connected
via i2c0 of the SoC. The EEPROM (address 0x51) should contain the MAC
address in binary at offset 0xfa. However, my two units didn't come with
such an EEPROM soldered on. The EEPROM should be placed between the SoC
and the GPIO pins on the board. (U10)

Generating rendom MAC addresses works around this issue. Otherwise, all
boards running the same image have identical MAC addresses.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-07-28 15:52:44 +02:00
David Bauer
b72f7c64a4 rockchip: allow for multiple boot-scripts
Add support for select a bootscript depending on the device built. This
is necessary, as the FriendlyARM NanoPi R2S needs a different bootcmd in
order to produce output on the debug UART.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-07-28 15:52:44 +02:00
David Bauer
0485fb3925 rockchip: don't disable timer LED trigger
The timer LED trigger is enabled in all targets (except for lantiq
xway-legacy). It's necessary for the OpenWrt preinit LED pattern to
work.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-07-13 17:50:53 +02:00
David Bauer
875a04478c rockchip: use downstream GPIO button implementation
Use the OpenWrt netlink GPIO button implementation to forward button
presses to procd. This is necessary to make failsafe-mode access
using a button possible.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-07-13 17:50:35 +02:00
bb39fea11a treewide: simplify inclusion of subtarget image files
Many target use a repetitive if-include scheme for their subtarget
image files, though their names are consistent with the subtarget
names.

This patch removes these redundant conditions and just uses the
variable for the include where the target setup allows it.

For sunxi, this includes a trivial rename of the subtarget image
Makefiles.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-11 01:44:13 +02:00
Tobias Mädel
6a05a85dcb rockchip: add support for Pine64 RockPro64
This adds the new rockchip target and support for RockPro64 RK3399

Flash:    16 MiB SPI NOR
RAM:      2 GiB/4 GiB LPDDR4
SoC:      RK3399
USB:      2x USB 2.0, 1x USB 3.0, 1x USB-C
Ethernet: 1x GbE
PCIe:     PCIe 2.0, 4 lanes
Storage:  eMMC or SD card
Optional SDIO wifi/bt module

The Pine64 RockPro64 is a single-board-computer with a 4x PCIe connector,
6 ARM64 cores (4 little, 2 big), plenty of RAM and storage.

By default the single Gigabit-Ethernet port is configured as the
LAN port.

Installation of the firware is possible by dd'ing the image
to an SD card or the eMMC flash.

Serial: 3v3 1500000 8n1

U-boot is build from the mainline tree and
integrated into the images. Required ATF to build u-boot
is downloaded from a CI build bot.

Signed-off-by: Tobias Mädel <t.maedel@alfeld.de>
Tested-by: Tobias Schramm <t.schramm@manjaro.org>
2020-04-20 16:37:56 +02:00