aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/rockchip
Commit message (Collapse)AuthorAgeFilesLines
* rockchip: fix SUPPORTED_DEVICES for Radxa ROCK Pi 4Marty Jones2021-01-271-1/+2
| | | | | | | | | | | 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>
* treewide: provide global default for SUPPORTED_DEVICESAdrian Schmutzler2021-01-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rockchip: use stable MAC-address for NanoPi R2SDavid Bauer2021-01-181-1/+8
| | | | | | | | | | | | | | | | 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>
* kernel: enable CONFIG_LEDS_TRIGGER_HEARTBEATSungbo Eo2021-01-151-1/+0
| | | | | | | | | | The heartbeat trigger is used by luci-mod-system, which is installed as a part of the standard luci package set. It seems the LED trigger will be required quite often, so let's enable it by default. This increases uncompressed kernel size by about 100 bytes on ath79/generic. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* rockchip: add missing Kconfig symbolsDavid Bauer2021-01-111-0/+5
| | | | | | | | When compiling with CONFIG_ALL_KMODS enabled, compilation might stall due to unset rockchip-specific config symbols. Disable these to avoid stalling this step. Signed-off-by: David Bauer <mail@david-bauer.net>
* kernel: add disabled PROC_STRIPPEDSungbo Eo2020-12-271-1/+0
| | | | | | | | | | Otherwise the missing symbol is added to target config for every kernel config refresh. While at it, remove the disabled symbol from target configs. Fixes: 4943bc5cff47 ("kernel: only strip proc for small flash devices") Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* rockchip: use USB host by default on rk3399-rock-pi-4Marty Jones2020-12-251-0/+32
| | | | | | | This backport fix connections errors on the upper USB3 port of the Radxa ROCK Pi 4 . Signed-off-by: Marty Jones <mj8263788@gmail.com>
* kernel: bump 5.4 to 5.4.85John Audia2020-12-221-1/+1
| | | | | | | | | | | | | All modifications made by update_kernel.sh run in a fresh clone without any existing toolchains. 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>
* rockchip: remove unused config symbolsDavid Bauer2020-11-041-2/+0
| | | | | | | | 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>
* rockchip: fix NanoPi R2S GMAC clock nameDavid Bauer2020-11-041-0/+27
| | | | | | | | | | 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>
* kernel: move F2FS_FS_XATTR and F2FS_STAT_FS symbols to genericDaniel Golle2020-10-091-1/+0
| | | | | | | | 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>
* kernel: clean up XATTR config symbolsPaul Spooren2020-10-092-2/+0
| | | | | | | | | | | | | 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>
* rockchip: add support for Radxa Rock Pi 4Marty Jones2020-10-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rockchip: enable Realtek PHY supportDavid Bauer2020-10-031-0/+1
| | | | | | | 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>
* rockchip: fix NanoPi R2S PHY IDDavid Bauer2020-10-031-1/+1
| | | | | | | 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>
* rockchip: rk3328: add compatible to NanoPi R2S ethernet PHYDavid Bauer2020-09-303-3/+28
| | | | | | | | 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>
* rockchip: refresh NanoPi R2S patchesDavid Bauer2020-09-284-146/+171
| | | | | | | Update the patches for the NanoPi R2S to the v3 sent (and accepted) upstream. Signed-off-by: David Bauer <mail@david-bauer.net>
* kernel: bump 5.4 to 5.4.58John Audia2020-08-183-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* rockchip: remove useless echo in 40-net-smp-affinityAdrian Schmutzler2020-08-171-1/+1
| | | | | | The command in the $() brackets will already provide the same output. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: Move CONFIG_IONIC to generic kernel configHauke Mehrtens2020-08-101-1/+0
| | | | | | | 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>
* treewide: make dependency on kmod-usb-net selectiveAdrian Schmutzler2020-08-101-1/+1
| | | | | | | | 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>
* rockchip: enable rockchip-thermalDavid Bauer2020-07-291-1/+1
| | | | | | | | | 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>
* rockchip: distribute net interruptsDavid Bauer2020-07-281-0/+30
| | | | | | | | | | | | 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>
* arm64: dts: rockchip: Add txpbl node for RK3399/RK3328David Bauer2020-07-281-0/+54
| | | | | | | | | | | | | | | | | | | | 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>
* rockchip: enable LAN LED configurationDavid Bauer2020-07-283-0/+156
| | | | | | This enables the LEDs on the LAN interfaces. Signed-off-by: David Bauer <mail@david-bauer.net>
* rockchip: add NanoPi R2S supportDavid Bauer2020-07-289-6/+609
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rockchip: allow for multiple boot-scriptsDavid Bauer2020-07-281-1/+1
| | | | | | | | 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>
* rockchip: don't disable timer LED triggerDavid Bauer2020-07-131-1/+0
| | | | | | | | 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>
* rockchip: use downstream GPIO button implementationDavid Bauer2020-07-132-2/+1
| | | | | | | | 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>
* treewide: simplify inclusion of subtarget image filesAdrian Schmutzler2020-06-111-3/+1
| | | | | | | | | | | | | | 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>
* rockchip: add support for Pine64 RockPro64Tobias Mädel2020-04-2010-0/+1051
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>