Commit Graph

702 Commits

Author SHA1 Message Date
Tianling Shen
86b4b39f83
rockchip: disable hwrng for rk3588 by default
It's not working with current clk driver.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-07-11 20:47:14 +08:00
Tianling Shen
97ca0819e9
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-07-10 19:16:17 +08:00
Tianling Shen
7a96d36188 rockchip: fix baudrate for Radxa E25
According to the documentation[1], the serial baudrate of E25 is
115.2 Kbps, and setting it to 1.5 Mbps will cause onboard CH340B
USB-UART chip unstable.

Since mainline TPL is yet available, download patched TPL binary
from Radxa.

1. https://wiki.radxa.com/Rock3/CM/CM3I/E25/getting_started

Fixes: https://github.com/openwrt/openwrt/issues/15814
Fixes: f7c732bf9e ("rockchip: add Radxa E25 board support")
Tested-by: FUKAUMI Naoki <naoki@radxa.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/15870
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-07-10 09:46:19 +02:00
Tianling Shen
456ad0e4f8
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-07-06 15:00:48 +08:00
FUKAUMI Naoki
1664e506ac uboot-rockchip: use u-boot-rockchip.bin
use u-boot-rockchip.bin to copy SPL/TPL/U-Boot to the image.

since binman was used in mainline u-boot for rockchip, we can use
u-boot-rockchip.bin instead of idbloader.img and u-boot.itb.

Reviewed-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/15815
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-07-04 19:26:00 +02:00
Tianling Shen
a3ac91322e
rockchip: fix reset pcie
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-07-04 18:07:28 +08:00
Tianling Shen
4b9cf965ff
rockchip: reorder board patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-06-27 02:38:36 +08:00
Tianling Shen
095f52b437
rockchip: backport upstreamed cpufreq support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-06-26 21:32:44 +08:00
Tianling Shen
7f2199ef6b
rockchip: remove useless evb patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-06-26 20:35:38 +08:00
Tianling Shen
b87d4bf502
pcat-manager: mark as broken
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-06-26 20:17:44 +08:00
Tianling Shen
5e63e0a0a3
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-06-17 16:21:53 +08:00
Milinda Brantini
c95ed79787 rockchip: Add cache information to the SoC dtsi for RK356x
Fix cacheinfo: Unable to detect cache hierarchy for CPU 0.

Signed-off-by: Milinda Brantini <C_A_T_T_E_R_Y@outlook.com>
2024-06-16 21:59:11 +02:00
Tianling Shen
75942eaaab
rockchip: enable log output for hdmi
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-06-04 22:13:07 +08:00
Tianling Shen
e7fbc901f1
rockchip: configure ETH LED for NanoPi R5C/R5S
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-18 14:04:36 +08:00
Tianling Shen
82a4875114
rockchip: configure ETH LED for NanoPC T6
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-18 13:26:44 +08:00
Tianling Shen
72ccbed99c
rockchip: fix eth index name for FastRhino R68S
Fixes: #1298
Fixes: 8d4ca61288 ("rockchip: configure ETH LED for FastRhino R66S/R68S")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-18 13:06:46 +08:00
Tianling Shen
f80be246c9
rockchip: configure ETH LED for NanoPi R6C/R6S
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-17 19:27:14 +08:00
Tianling Shen
8d4ca61288
rockchip: configure ETH LED for FastRhino R66S/R68S
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-17 17:29:25 +08:00
Tianling Shen
cda5cfb9d5
rockchip: remove LED configuration hack for r8169
Upstream now uses standard ETH LED bindings to configure LED registers.
However, we don't use the r8169 driver for rockchip, so simply remove
this outdated hack.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-17 17:28:31 +08:00
Tianling Shen
c9a2cc2a3c
rockchip: remove extra its hack
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-17 16:55:44 +08:00
Tianling Shen
cfe71917c7
rockchip: replace depreacted 'strlcpy' func with 'strscpy'
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-17 16:50:43 +08:00
Tianling Shen
78773bc80c
rockchip: port cpuinfo driver from BSP kernel
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-15 15:46:44 +08:00
Tianling Shen
32779d3e62
rockchip: configure rtl8211f led data for nanopi r6s
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-10 19:53:16 +08:00
Tianling Shen
07900bc830
rockchip: fix OF devname configuration for r8169
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-10 19:52:48 +08:00
Tianling Shen
7376941a97
rockchip: pull hwRNG driver from BSP kernel
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-10 14:29:49 +08:00
Tianling Shen
0341a06f1f rockchip: switch to kernel 6.6
Switch to Linux kernel version 6.6 and drop configs, files and patches
for Linux 6.1.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-09 10:43:37 +02:00
Tianling Shen
e628dadacf
rockchip: refresh kernel patches
Fixes: #1292
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-07 17:48:07 +08:00
Antonio Flores
ce4da3cf41 rockchip: add kernel 6.6 as testing kernel
Add kernel 6.6 as testing kernel

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-07 00:17:12 +02:00
Antonio Flores
83edd39db6 rockchip: refresh config 6.6
Refresh config 6.6 (make kernel_oldconfig).

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-07 00:17:12 +02:00
Antonio Flores
728db5ec05 rockchip: refresh 6.6 patches
Refresh kernel 6.6 patches.
Removed backpored patches.

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-07 00:17:12 +02:00
Antonio Flores
dcd2367349 kernel/rockchip: Restore kernel files for v6.1
This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-07 00:17:12 +02:00
Antonio Flores
ddfd526140 kernel/rockchip: Create kernel files for v6.6 (from v6.1)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-07 00:17:12 +02:00
Tianling Shen
44708860a6
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-06 14:33:10 +08:00
Tianling Shen
3c53757c59
rockchip: add missing BOOT_FLOW to bpi-r2 pro
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-06 11:59:01 +08:00
Tianling Shen
c200bf51db
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-05 14:01:19 +08:00
Tianling Shen
307e378458
rockchip: enable GPU for nanopi r6c/s
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-05 13:50:46 +08:00
Antonio Flores
4ebcc5375a rockchip: add Bananapi-R2 Pro board support
Hardware spec:

- Rockchip RK3568 Quad-core ARM Cortex-A55 CPU 2GHz
- GPU Mali-G52 1-Core-2EE OpenGL ES3.2 Vu1kn 1.1 OpenCL 2.0
- Memory2G DDR3 SDRAM (option 4G)
- Storage Onboard 16GB eMMC Flash, Micro SD-Card slot, SATA 3.0 Port,SPI flash
- Network 5 x 10/100/1000 Mbit/s Ethernet MT7531
- Display 1 HDMI port, 2 DSI interface(1 DSI can change to LVDS by software)
- Camera 1 CSI camera interface
- Audio Output HDMI & I2S & Speaker & Headphone
- USB port USB 3.0 PORT (x2), micro USB OTG (x1)
- PCIE 1 mini pcie interface & 1 M.2 key-e interface
- Remote IR Receiver (x1)
- GPIO 40 Pin Header : GPIO (x28) and Power (+5V, +3.3V and GND).
- Switches Reset button, Power button, U-boot button
- LED Power Status
- Power Source 12 volt 2A via DC Power

Installation:

Uncompress the OpenWrt sysupgrade and write image to the SD card using dd (dd if=*.img of=/*)
Boot from the SD card
1-hold down the MaskRom button
2-Connect DC power
3-Wait 5 seconds, release the button.

eMMC Installation:

1-Uncompress the OpenWrt sysupgrade image
2-fash to eMMC
dd if=openwrt-rockchip-armv8-sinovoip_bpi-r2-pro-squashfs-sysupgrade.img of=/dev/mmcblk1
sync
3-remove SD card
reboot

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-05 00:46:48 +02:00
Antonio Flores
298e11e43d rockchip: enable MT7531 and RTC drivers
This patch enable MT7531 switch and RTC drivers for BPI-R2 Pro.

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-05 00:46:48 +02:00
Daniel Golle
d9d7286279 rockchip: add driver for hardware RNG
Rockchip SoCs used to have a random number generator as part of their
crypto device, and support for it has to be added to the corresponding
driver.

Newer Rockchip SoCs like the RK3568 have an independent True Random
Number Generator device. Import pending patchset which adds a driver for
it, include it in Kconfig and enable it in the device tree.

Doing so significantly reduces the time needed to boot devices based on
those SoCs, from about 27 seconds until Ethernet is up and running to
less than 13 seconds with a minimal snapshot image.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-04 13:59:48 +01:00
Tianling Shen
f1ac8ecf1b
rockchip: backport latest rk3588 patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-04 20:36:34 +08:00
Tianling Shen
67317ec075
rockchip: backport panthor GPU driver
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-04 20:12:02 +08:00
Tianling Shen
8acaa11bfb
Revert "rockchip: pack Hantro VPU driver"
Needs more work.

This reverts commit 57128cc2ef.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-01 20:18:41 +08:00
Tianling Shen
57128cc2ef
rockchip: pack Hantro VPU driver
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-01 19:41:35 +08:00
Tianling Shen
c87729cbdb
rockchip: backport rk3588 vop2 support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-01 16:18:03 +08:00
Tianling Shen
08b6454d66
rockchip: backport Samsung HDMI/eDP Combo PHY driver
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-01 16:18:00 +08:00
Tianling Shen
4465dc87d8
rockchip: add clk fixes removed by mistake
Fixes: a09aab301f ("rockchip: update rk3588 gate link patches")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-01 14:32:48 +08:00
Tianling Shen
a09aab301f
rockchip: update rk3588 gate link patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-01 14:07:54 +08:00
Tianling Shen
1b53b6d0d2
rockchip: backport latest rk3588 dt patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-05-01 13:55:23 +08:00
ZiMing Mo
fa454662b8
rockchip: refresh DTS about usbdp
Signed-off-by: ZiMing Mo <msylgj@immortalwrt.org>
2024-04-27 15:54:33 +08:00
ZiMing Mo
b217eac89e
rockchip: refresh usbdp driver patch
Signed-off-by: ZiMing Mo <msylgj@immortalwrt.org>
2024-04-27 15:51:59 +08:00
Tianling Shen
073c5c9485
rockchip: refresh upstreamed patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-26 18:26:37 +08:00
Tianling Shen
4f4e8820bd
rockchip: enable OTP NVMEM and RTC HYM8563 support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-23 15:33:34 +08:00
Tianling Shen
80c7834062
rockchip: sync rtl8211f patch from lede
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-12 15:32:25 +08:00
Tianling Shen
86eb3e4b99
rockchip: add even more missing Kconfig
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-08 15:19:12 +08:00
Tianling Shen
c3f9efdcd0
rockchip: add more missing Kconfig
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-08 13:59:30 +08:00
Tianling Shen
bc7807b661
rockchip: add missing Kconfig
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-08 12:55:43 +08:00
Tianling Shen
3cfe0d1005
rockchip: update target description
We have RK356x and RK3588 support now.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-07 17:28:07 +08:00
Tianling Shen
df6698361d
rockchip: switch to use kernel 6.6
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-07 17:28:07 +08:00
ZiMing Mo
bcc4b0414c
rockchip: refresh Kconfig
Refresh kernel config.

Signed-off-by: ZiMing Mo <msylgj@immortalwrt.org>
[rebased upon HEAD]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-07 17:28:06 +08:00
Tianling Shen
681786e382
rockchip: reorder patches
Reorder patches after refresh.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-07 17:28:06 +08:00
ZiMing Mo
35dc676ba3
rockchip: refresh patches
Drop upstreamed patches, refresh remaining patches.

Signed-off-by: ZiMing Mo <msylgj@immortalwrt.org>
[rebased upon HEAD]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-07 17:28:06 +08:00
Tianling Shen
4d5fe0a362
rockchip: move kernel files to 6.6
Move kernel config and patches to kernel 6.6.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-04-07 17:28:06 +08:00
Tianling Shen
b62a01c747
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-30 21:31:52 +08:00
Tianling Shen
163c3d0bde rockchip: remove redundant 'console' parameter from boot script
ttyS2 is the default console used for all rockchip boards.
The redundant 'console=tty1' parameter now breaks the console due to
recent procd update.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-29 19:34:42 +01:00
Tianling Shen
50e6c8ae8d rockchip: remove 'swiotlb' parameter from boot script
We have hardware IOMMU support and this is totally unnecessary.
The given value is also unreasonable, it's too small and causes
kernel panic in some cases:

[ 5706.856473] sdhci-dwcmshc fe310000.mmc: swiotlb buffer is full (sz: 28672 bytes), total 512 (slots), used 498 (slots)
[ 5706.864451] sdhci-dwcmshc fe310000.mmc: swiotlb buffer is full (sz: 65536 bytes), total 512 (slots), used 464 (slots)

This parameter seems to be added by mistake, so remove it.

Fixes: e35c7ab51f ("rockchip: merge bootscript")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-29 19:34:42 +01:00
Tianling Shen
158e54ce28
rockchip: remove swiotlb parameter from boot script
We have hardware IOMMU support and this is totally unnecessary.
The given value is also unreasonable, it's too small and causes
kernel panic in some cases:

[ 5706.856473] sdhci-dwcmshc fe310000.mmc: swiotlb buffer is full (sz: 28672 bytes), total 512 (slots), used 498 (slots)
[ 5706.864451] sdhci-dwcmshc fe310000.mmc: swiotlb buffer is full (sz: 65536 bytes), total 512 (slots), used 464 (slots)

This parameter seems to be added by mistake, so remove it.

Fixes: 058bdf0396 ("rockchip: lzma compression for kernel")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-26 00:56:04 +08:00
Marius Durbaca
f7c732bf9e rockchip: add Radxa E25 board support
Radxa E25 is a network application carrier board for the Radxa CM3
Industrial (CM3I) SoM, which is based on the Rockchip RK3568 SoC.

It has the following features:

- MicroSD card socket, on board eMMC flash
- 2x 2.5GbE Realtek RTL8125B Ethernet transceiver
- 1x USB Type-C port (Power and Serial console)
- 1x USB 3.0 OTG port
- mini PCIe socket (USB or PCIe)
- ngff PCIe socket (USB or SATA)
- 1x User LED and 16x RGB LEDs
- 26-pin expansion header

Installation:
Uncompress the OpenWrt sysupgrade and write it to a micro SD card or
internal eMMC using dd.

Signed-off-by: Marius Durbaca <mariusd84@gmail.com>
2024-03-23 07:55:43 +01:00
Tianling Shen
a337bdb07d
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-05 11:40:31 +08:00
Tianling Shen
c58a66a9d8
rockchip: backport clk fixes for rk3588
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-03 17:32:08 +08:00
Tianling Shen
0b2803b5dc
rockchip: backport latest dt fixes accepted upstream
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-03 16:55:40 +08:00
Tianling Shen
4d9dbd54fd
rockchip: switch to full version wpad
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-02 19:36:16 +08:00
Tianling Shen
f08b89f121
rockchip: add gic hack for rk356x back
It's not included in rockchip erratum RK3588001.

Fixes: 3faa54bb9d ("rockchip: replace local gic its hack with upstream solution")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-29 00:30:52 +08:00
Tianling Shen
f7dc31b451
rockchip: replace local rfkill hack with upstream patch
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-28 23:53:01 +08:00
Tianling Shen
d5615b220b
rockchip: fix regulator order on photonicat
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-28 23:52:36 +08:00
Tianling Shen
22e57892c6
rockchip: adjust usb node for photonicat
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-28 20:54:10 +08:00
Tianling Shen
7790b6994a
rockchip: fix uboot device name for radxa e25
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-28 15:30:59 +08:00
Tianling Shen
2a55f33355
rockchip: add missing cells properties to photonicat dts
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-28 13:54:37 +08:00
Tianling Shen
21cf14ec9f
rockchip: add workaround for photonicat's godda*n sdio wifi
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-28 00:56:24 +08:00
Tianling Shen
f295771158
rockchip: enable wireless support for photonicat
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-28 00:20:10 +08:00
Tianling Shen
80f796076f
rockchip: add Radxa E25 support
Hardware
--------
RockChip RK3568 ARM64 (4 cores)
RGB LED
1/2/4/8GB LPDDR4 RAM
2x 2500 Base-T
2/16/32/64/128GB eMMC on-board
M.2 Slot
miniPCIe Slot
Micro-SD Slot
USB 3.0 Port
Type-C PD Power

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

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-27 22:03:03 +08:00
Tianling Shen
2613235692
rockchip: rock-3a: move reset properties to gmac node
Resetting via phy node may not work for rk356x.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-27 21:27:33 +08:00
Tianling Shen
fa2cb0a297
rockchip: remove redundant rng reference in dts files
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-27 20:42:09 +08:00
Tianling Shen
ffd4b3c3ae
rockchip: enable hwRNG support at SoC level
RK3328 is skipped due to hardware bugs.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-27 20:36:35 +08:00
Tianling Shen
f5bd84762f
rockchip: backport missing i2s2 device node
Fixes: 70f07967a3 ("rockchip: add ROCK 3A support")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-27 20:30:05 +08:00
Tianling Shen
70f07967a3
rockchip: add ROCK 3A support
Hardware
--------
RockChip RK3568 ARM64 (4 cores)
2/4/8GB LPDDR4 RAM
1000 Base-T
eMMC on-board
M.2 Slot
Micro-SD Slot
HDMI Port
3.5mm Audio Jack
2x USB 3.0 Port
2x USB 2.0 Port
Type-C PD Power

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

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-27 19:45:59 +08:00
Tianling Shen
938cf080db
rockchip: add Ariaboard Photonicat support
Hardware
--------
RockChip RK3568 ARM64 (4 cores)
2GB or 4GB LPDDR4 RAM
2x 1000 Base-T
QCA1023 Wi-Fi 5 / Bluetooth
16GB or 64GB eMMC on-board
2x M.2 Slot (B+E Key)
Micro-SD Slot
HDMI Port
USB 3.0 Port
7000 mAh Battery
Type-C Power

Note
----
The sdio card QCA1023 is not supported for now due to broken
ath10k-sdio driver.

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

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-27 18:41:52 +08:00
Tianling Shen
334baf02c8
rockchip: enable hwRNG for Orange Pi 5/Plus
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-27 16:38:40 +08:00
Tianling Shen
3faa54bb9d
rockchip: replace local gic its hack with upstream solution
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-27 16:03:35 +08:00
Tianling Shen
5ec6c58738
rockchip: fix device packages for nanopi r4s enterprise edition
In official OpenWrt we use kmod-r8169 driver provided by upstream kernel
instead of kmod-r8168 driver from Realtek.

Fixes: afca1236f3 ("rockchip: add NanoPi R4S Enterprise Edition build")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-25 12:36:02 +08:00
Tianling Shen
d209cb2f4b
rockchip: enable hwRNG support to rk3566
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-24 13:30:46 +08:00
Tianling Shen
acb88c40ea
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-23 23:28:51 +08:00
Tianling Shen
08e249d43c rockchip: remove LED label hack
Now we support parsing the color and function properties.
Ref: e814acc599 ("base-files: support parse DT LED color and function")

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-22 17:30:05 +01:00
Marius Durbaca
c22c63bce3 rockchip: add Radxa CM3 IO board support
Hardware
--------
RockChip RK3566 ARM64 (4 cores)
- up to 8GB LPDDR4X
- 1x HDMI,
- 2x MIPI DSI
- 2x MIPI CSI2
- 1x eDP
- 1x PCIe card
- 2x SATA
- 2x USB 2.0 Host
- 1x USB 3.0
- 1x USB 2.0 OTG
- 10/100/1000 Base-T
- microSD slot
- 40-pin GPIO expansion header
- 12V DC

Radxa CM3 needs to mount on top of this IO board in order to create
complete Radxa CM3 IO board platform.

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

Reviewed-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Marius Durbaca <mariusd84@gmail.com>
2024-02-21 13:29:26 +01:00
Tianling Shen
afca1236f3 rockchip: add NanoPi R4S Enterprise Edition build
FriendlyElec renamed the NanoPi R4S board with EEPROM (mac address)
to "enterprise" edition, and it was added as a "new" board in upstream
kernel.

This patch switched to use that upstreamed dts and removed local
EEPROM patch.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-19 20:52:06 +01:00
Tianling Shen
ee914a4af6
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-19 23:48:41 +08:00
Tianling Shen
782266473d rockchip: add NanoPi R2C Plus support
The NanoPi R2C Plus is a small variant of NanoPi R2C with a on-board
eMMC flash (8G) included.

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

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-19 16:23:32 +01:00
Tianling Shen
cccc428fb4
rockchip: refresh RK3588 USB DP patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-16 16:43:25 +08:00
Tianling Shen
66e530f016
rockchip: backport upstream dts fixes
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-16 16:22:59 +08:00
Tianling Shen
3bc7cfe092
target: add cpufreq to default packages
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-13 14:13:25 +08:00
Tianling Shen
46fd3bd024
rockchip: add more missing LED bindings
Fixes: bdff7b7758 ("rockchip: remove LED label hack")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-13 13:36:04 +08:00
Tianling Shen
79001fd46a
rockchip: add missing LED bindings
Fixes: bdff7b7758 ("rockchip: remove LED label hack")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-12 23:26:54 +08:00
Tianling Shen
bdff7b7758
rockchip: remove LED label hack
Now we support parsing the color and function properties.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-12 19:52:40 +08:00
Tianling Shen
e959958693
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-26 18:43:17 +08:00
Tianling Shen
b25025ba48
rockchip: update soc compatible for opi 5
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-26 17:55:15 +08:00
Tianling Shen
32ea24c8cb
rockchip: add OrangePi 5 (Plus) support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-26 17:47:43 +08:00
Tianling Shen
e43d30cd04
rockchip: backport upstream sdhci fixes
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-26 16:14:22 +08:00
Tianling Shen
b4281bd4fb
rockchip: backport poweroff support for rk806
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-26 15:54:24 +08:00
Tianling Shen
a87e404eb8
rockchip: import pending clk patches for rk3588
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-26 14:08:30 +08:00
Tianling Shen
f2395e35a4
rockchip: backport latest upstreamed patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-26 13:21:23 +08:00
Tianling Shen
3db6161c85
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-20 13:01:37 +08:00
Justin Klaassen
4d49ce1bde rockchip: fix boot from non-MMC devices
Booting from non-MMC devices on Rockchip targets without this
change results in a boot failure:

Model: FriendlyElec NanoPi R5S
Net:   eth0: ethernet@fe2a0000
Hit any key to stop autoboot:  0
** Booting bootflow 'nvme#0.blk#1.bootdev.part_1' with script
** No partition table - mmc 0 **
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
Can't set block device
Wrong Image Type for bootm command
ERROR -91: Protocol wrong type for socket: can't get kernel image!
Boot failed (err=1)

This change fixes the default boot script for Rockchip targets to
support booting from non-MMC devices such as NVMe or USB drives.

Some targets with only a boot rom (e.g. NanoPi R5S) may require u-boot
to be installed on the eMMC or a MicroSD card in order to boot from
non-MMC devices.

Fixes: #14420
Reviewed-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Justin Klaassen <justin@tidylabs.app>
2024-01-19 21:31:39 +01:00
Tianling Shen
b8ba5564d7
uboot-rockchip: remove redudant NanoPi R4S Enterprise Edition build
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-10 19:33:38 +08:00
Tianling Shen
445458316b
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-05 11:05:31 +08:00
Tianling Shen
3645ac8a10 rockchip: configure eth pad driver strength for orangepi r1 plus lts
The default strength is not enough to provide stable connection
under 3.3v LDO voltage.

Fixes: 32d5921b8b ("rockchip: add Orange Pi R1 Plus LTS support")
Fixes: #13117
Fixes: #13759

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-04 22:07:01 +01:00
Tianling Shen
494e7859b8
rockchip: backport latest upstreamed patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-25 11:19:30 +08:00
Tianling Shen
26d4e9ce2c
kernel: move motorcomm LED hack to generic
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-18 12:23:24 +08:00
Tianling Shen
b26299f319
rockchip: configure pad driver strength for orangepi r1 plus lts
The default strength is not enough to provide stable connection
under 3.3v LDO voltage.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-16 12:02:45 +08:00
Tianling Shen
2e68a7d289
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-16 11:24:07 +08:00
Furong Xu
314af7018a rockchip: make SMP affinity of RTL8152 on XHCI more robust
XHCI bus numbers are assigned dynamically, it may varies among boards,
match the device irq name with regexp, drop the hardcoded name.

Signed-off-by: Furong Xu <xfr@outlook.com>
2023-12-15 18:02:43 +01:00
Tianling Shen
616efa5f15
rockchip: replace coherent pool hack with bootargs
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-14 16:44:44 +08:00
Tianling Shen
64e03c7ca7
rockchip: rk3328: enable dfi on soc dtsi
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-14 16:34:55 +08:00
Tianling Shen
7dbca5869f
rockchip: backport latest rk3588 patches from upstream
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-14 16:15:45 +08:00
Tianling Shen
22616d37fe
kernel: backport pad driver strength cfg support for motorcomm phy
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-13 17:07:17 +08:00
Tianling Shen
84e828e119
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-13 12:20:42 +08:00
Furong Xu
1438bc583c rockchip: fix eth1 irq affinity
NanoPi R2S and some other RK3328 boards use RTL8152 as eth1,
which is connected to xhci-hcd:usb1 but not xhci-hcd:usb3

|:~# cat /proc/interrupts
|           CPU0       CPU1       CPU2       CPU3
| 11:      53449     171813     129595      87823     GICv2  30 Level     arch_timer
| 18:          0          0          0          0     GICv2  94 Level     rockchip_usb2phy
| 19:          0          0          0          0     GICv2  32 Level     ff1f0000.dma-controller
| 20:          0          0          0          0     GICv2  33 Level     ff1f0000.dma-controller
| 21:          4          0          0          0     GICv2  89 Level     ttyS2
| 22:          0          0          0          0     GICv2  43 Level     ff350800.iommu
| 23:          0          0          0          0     GICv2 106 Level     ff360480.iommu
| 24:          0    1417932          0          0     GICv2  56 Level     eth0
| 25:        334          0          0    4422194     GICv2  99 Level     xhci-hcd:usb1
| 26:          0          0          0          0     GICv2  48 Level     ehci_hcd:usb3
| 27:          0          0          0          0     GICv2  49 Level     ohci_hcd:usb2
| 28:       3285          0          0          0     GICv2  69 Level     ff160000.i2c
| 29:          0          0          0          0  rockchip_gpio_irq  24 Level     rk805
| 30:          0          0          0          0     rk805   0 Edge      rk805_pwrkey_fall
| 35:          0          0          0          0     rk805   5 Edge      RTC alarm
| 37:          0          0          0          0     rk805   7 Edge      rk805_pwrkey_rise
| 38:          0          0          0          0     GICv2  90 Level     rockchip_thermal
| 39:          0          0          0          0     GICv2  72 Edge      ff1a0000.watchdog
| 40:       2601          0          0          0     GICv2  44 Level     dw-mci
| 41:          0          0          0          0  rockchip_gpio_irq   0 Edge      keys
|IPI0:      1559       1208        893       1131       Rescheduling interrupts
|[...]

Fix 40-net-smp-affinity to match the correct device irq name.

Signed-off-by: Furong Xu <xfr@outlook.com>
2023-12-12 19:50:43 +01:00
David Bauer
54e52fdacb rockchip: require image metadata
All devices in the rockchip target have appended image-metadata. Enforce
the presence of this metadata to avoid flashing incomplete images.

This is the de-facto standard for almost all OpenWrt targets.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-11-27 07:54:00 +01:00
Tianling Shen
4e09722a68 rockchip: add NanoPi R5C support
Hardware
--------
RockChip RK3568 ARM64 (4 cores)
1GB or 4GB LPDDR4X RAM
2x 2500 Base-T
4 LEDs (LAN / WAN / WIFI / POWER)
1 Button (Reset)
8GB or 32GB eMMC on-board
Micro-SD Slot
M.2 Slot
2x USB 3.0 Port

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

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
c06a71f0b3 rockchip: add NanoPi R5S support
Hardware
--------
RockChip RK3568 ARM64 (4 cores)
2GB or 4GB LPDDR4X RAM
1x 1000 Base-T
2x 2500 Base-T
4 LEDs (LAN1 / LAN2 / WAN / POWER)
8GB eMMC on-board
Micro-SD Slot
M.2 Slot
2x USB 3.0 Port

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

Tested-by: Packet Please <pktpls@systemli.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
4d9059aed9 rockchip: armv8: broaden boardname
Now we have rk356x support :-)

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
4be1e39c4e rockchip: enable drivers for rk356x
Enable all necessary drivers for the rk356x SoCs, including PHY,
SCMI, SPI etc. Also backport 2 upstream patches for sdhci fixes.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
22a9c4b67d rockchip: remove kernel 5.15 patches and config
As we switched to kernel 6.1, these files can go.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
48c9a4b47c rockchip: switch to kernel 6.1
Required by the following rk3568 support.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
dd8972fde3 rockchip: move image generation command to default
It's applicable for all devices so move it to default to reduce
redudant code. Addtionally introduce a new variable `BOOT_SCRIPT`
to allow custom boot script (if necessary).

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
e63193a95d
rockchip: refresh patches
Fixes: #1118

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 00:21:01 +08:00
Tianling Shen
f1748b432e
rockchip: update rtw88 package
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-17 20:30:37 +08:00
Tianling Shen
175ad5ee6c
rockchip: fix packet drop issue on orangepi r1 plus lts
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-15 22:06:14 +08:00
Tianling Shen
6b5ec5a5ee
rockchip: motorcomm: simplify redundant code
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-15 20:55:11 +08:00
Tianling Shen
3313bd7e8a
rockchip: add LED configuration for yt8531
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-15 20:24:16 +08:00
Tianling Shen
aac4f084ce
rockchip: backport upstreamed NanoPC T6 dts
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-14 20:06:47 +08:00
Tianling Shen
606df19a72
rockchip: add pwmfan driver for radxa rock5a/b
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-14 17:39:25 +08:00
Tianling Shen
37031fa7fa
rockchip: update upstreamed patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-11 14:53:15 +08:00
Tianling Shen
31f2c18a35
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-10 13:02:09 +08:00
Rafał Miłecki
3b63208443 treewide: disable CONFIG_SLUB_DEBUG in target configs
From the symbol help message:
> SLUB has extensive debug support features. Disabling these can result
> in significant savings in code size.

There seems to be no need to enable those debugging features for
standard use.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-11-09 21:23:01 +01:00
Tianling Shen
6a90306784
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-09 14:24:52 +08:00
Rafał Miłecki
7a8424827f rockchip: refresh kernel config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-11-07 13:39:40 +01:00
Islam Mansour
694f77b660
rockchip: configure wlan led for nanopi r5c 2023-10-13 15:45:22 +08:00
Tianling Shen
dd9a0e06a8
rockchip: fix generate mac addr for nanopi r5c/r6s without emmc
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-10-08 12:18:42 +08:00
Tianling Shen
f1346bf77b
rockchip: refresh upstreamed patches
Fixes: #1080

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-10-07 16:56:13 +08:00
Tianling Shen
e0ab5b6aa8
rockchip: remove Hinlink support
Just ask the vendor for firmware.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-09-20 11:07:49 +08:00
Jayantajit Gogoi
1b15cb21db rockchip: add support for Radxa ROCK Pi E
This adds support for Radxa ROCK Pi E, rockchip rk3328 board.

Specification:

- CPU: Rockchip RK3328 64-bit Quad-core
- RAM: DDR3 256MB ~ 2GB
- Network:
    1 x 10/100/1000M Ethernet
    1 x 10/100M Ethernet
- Storage:
    1 x MicroSD Slot
    1 x eMMC Module Slot
- USB Host/OTG:
    1 x USB3.0 Type A HOST
    1 x USB2.0 HOST (40-pin pin-header)
- Wireless
    RTL8723DU/RTL8821CU
- Debug Serial:
    1500000 baud at UART2 ( 40-pin pin-header)
- Power Supply:
    Type-C 5V
    Optionally PoE

Installation:
- Write image to SD Card or EMMC with dd
- Boot ROCK Pi E from the SD Card

Signed-off-by: Jayantajit Gogoi <jayanta.gogoi525@gmail.com>
2023-09-05 00:20:51 +05:30