Commit Graph

437 Commits

Author SHA1 Message Date
Tianling Shen
5a893a7c88
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>
(cherry picked from commit 158e54ce28)
2024-03-26 00:56:47 +08:00
Tianling Shen
daebb1de7e
rockchip: update wireless packages for nanopi r5c
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-04 20:49:44 +08:00
Tianling Shen
d98b570ef9
rockchip: switch to full version wpad
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 4d9dbd54fd)
2024-03-02 19:37:23 +08:00
Tianling Shen
93686b7596
rockchip: replace local rfkill hack with upstream patch
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit f7dc31b451)
2024-02-28 23:58:19 +08:00
Tianling Shen
b3861bb039
rockchip: fix regulator order on photonicat
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit d5615b220b)
2024-02-28 23:53:40 +08:00
Tianling Shen
01e25240b4
rockchip: adjust usb node for photonicat
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 22e57892c6)
2024-02-28 20:54:35 +08:00
Tianling Shen
c88f3520a4
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-28 14:17:42 +08:00
Tianling Shen
e5f313e099
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>
(cherry picked from commit 938cf080db)
2024-02-28 13:57:17 +08:00
Tianling Shen
f5721cfeb2
rockchip: enable hwRNG support at SoC level
RK3328 is skipped due to hardware bugs.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit ffd4b3c3ae)
2024-02-28 13:12:12 +08:00
Tianling Shen
97550efd03
rockchip: backport mmc fixes from newer kernel
Refreshed patches while at it.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-27 18:59:49 +08:00
Justin Klaassen
f4da20840e
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>
(cherry picked from commit 4d49ce1bde)
2024-01-26 13:02:36 +08:00
Tianling Shen
80ef582dee 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: 3f3586a06d ("rockchip: add Orange Pi R1 Plus LTS support")
Fixes: #13117
Fixes: #13759

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 3645ac8a10)
[rebased onto openwrt-23.05 branch]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-05 23:36:31 +01:00
Tianling Shen
13cbe9253a
rockchip: backport upstreamed fixes for orangepi r1 plus lts
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-27 12:51:35 +08:00
Tianling Shen
4e7e1e851f
Revert "rockchip: refresh patches"
This actually breaks the build, revert it.

This reverts commit 7817745a74.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-27 12:50:45 +08:00
QiuSimons
7817745a74 rockchip: refresh patches
Fix compilation errors caused by incorrect cherry-pick.
2023-12-21 11:05:01 +08:00
Furong Xu
07e86d6da3
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>
(cherry picked from commit 314af7018a)
2023-12-17 12:55:24 +08:00
Furong Xu
c3caa26a8e
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>
(cherry picked from commit 1438bc583c)
2023-12-17 12:55:17 +08:00
Tianling Shen
8fc938774d
rockchip: replace coherent pool hack with bootargs
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 616efa5f15)
2023-12-14 16:45:42 +08:00
Tianling Shen
794b26e30f
rockchip: rk3328: enable dfi on soc dtsi
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 64e03c7ca7)
2023-12-14 16:35:15 +08:00
Tianling Shen
54b367f6dc
rockchip: backport upstream clk fixes for rk3568
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-14 16:14:23 +08:00
Tianling Shen
041c7cc5cc
kernel: backport pad driver strength cfg support for motorcomm phy
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 22616d37fe)
2023-12-13 21:09:14 +08:00
Tianling Shen
6f36e9d388
rockchip: refresh patches
Fixes: #1118

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit e63193a95d)
2023-12-11 17:39:28 +08:00
Heiko Stuebner
654e43e781
rockchip: fix rk356x pcie msg interrupt name
The expected name by the binding at this position is "msg" and the SoC's
manual also calls the interrupt in question "msg", so fix the rk356x dtsi
to use the correct name.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-10 16:58:38 +08:00
David Bauer
238a4dcc0b
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>
(cherry picked from commit 54e52fdacb)
2023-11-27 22:11:20 +08:00
Tianling Shen
01aed3b625
rockchip: fix packet drop issue on orangepi r1 plus lts
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 175ad5ee6c)
2023-11-15 22:07:31 +08:00
Tianling Shen
585172558c
rockchip: motorcomm: simplify redundant code
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 6b5ec5a5ee)
2023-11-15 21:04:30 +08:00
Tianling Shen
b28a438abf
rockchip: add LED configuration for yt8531
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 3313bd7e8a)
2023-11-15 20:28:58 +08:00
Islam Mansour
bf495e16bd
rockchip: configure wlan led for nanopi r5c
(cherry picked from commit 694f77b660)
2023-10-13 17:05:28 +08:00
Tianling Shen
c585ba5e67
rockchip: fix generate mac addr for nanopi r5c without emmc
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit dd9a0e06a8)
2023-10-08 12:20:12 +08:00
Tianling Shen
2cf2a50b30
rockchip: remove Hinlink support
Just ask the vendor for firmware.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit e0ab5b6aa8)
2023-09-20 11:10:58 +08:00
Tianling Shen
4e5e2a35eb
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-09-03 12:13:48 +08:00
Tianling Shen
909f191fec
rockchip: refactor yt8521 LED configuration using OF
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit df4507d339)
2023-08-23 17:35:56 +08:00
Tianling Shen
29dd9a413b
rockchip: add LED configuration for Hinlink H68K/H69K
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 06900b328d)
2023-08-23 13:25:08 +08:00
Tianling Shen
02d5f38ab2
rockchip: add LED configuration for Mrkaio M68S
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 0a4d4cc209)
2023-08-23 13:25:07 +08:00
Tianling Shen
43644e1aa1
rockchip: add LED configuration for NanoPi R5S
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 6f7eddb42c)
2023-08-23 13:21:18 +08:00
Tianling Shen
1f92f2faf4
rockchip: add LED configuration for FastRhino R68S
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 7564d4123a)
2023-08-23 13:10:29 +08:00
AmadeusGhost
5a6a452a74
rockchip: add LED configuration from OF for rtl8211f
(cherry picked from commit 1289211440)
2023-08-23 13:09:25 +08:00
Tianling Shen
c6de172abb
rockchip: fix pcie address for fastrhino r68s
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 3711ed503b)
2023-08-23 13:09:19 +08:00
Tianling Shen
1238dd540c
rockchip: re-order eth ports for fastrhino r68s
eth0 <-> eth1
eth2 <-> eth3

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 77763dd129)
2023-08-23 13:07:27 +08:00
Tianling Shen
0b0f0a5973
rockchip: stmmac: add devname configuration from OF
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 9353f90342)
2023-08-23 13:05:58 +08:00
Tianling Shen
61cfcc61df
rockchip: refresh patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-08-23 12:57:56 +08:00
Tianling Shen
f652ea6c89
rockchip: add OLED support for OPC-H69K
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-08-13 10:47:54 +08:00
Tianling Shen
ccd122afa5
rockchip: add Hilink OPC-H6XK support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 7ce74cfbc2)
2023-08-13 10:45:49 +08:00
Tianling Shen
b378b1bdc3
rockchip: add wireless firmware to nanopi t4
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit ccbebe8a3b)
2023-07-23 20:46:07 +08:00
Lu jicong
418ef8cd83
rockchip: add FriendlyARM NanoPC T4 support
Hardware
--------
RockChip RK3399 ARM64 (6 cores)
4GB LPDDR3 RAM
1x 1000 Base-T
1 GPIO LED (status)
HDMI 2.0
3.5mm TRRS AV jack
Micro-SD slot
16GB eMMC
1x USB 3.0 Port
2x USB 2.0 Port
1x USB Type-C Port
1x M.2 PCI-E Port
AP6356S (BCM4356) SDIO WiFi & Bluetooth adapter
--------
Note: AP6356S is not supported yet due to the lack of firmware and NVRAM

Signed-off-by: Lu jicong <jiconglu58@gmail.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 4689114669)
2023-07-23 20:46:06 +08:00
Tianling Shen
9c61c36164
rockchip: exchange power and user LEDs for station p2
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit d8b07e76b3)
2023-07-15 18:03:41 +08:00
Tianling Shen
9dccfb8079
rockchip: add missing network setup for station p2
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 8c751d42c0)
2023-07-15 18:03:38 +08:00
Tianling Shen
d8dc0eb2e4
rockchip: add Station P2 support
Hardware
--------
RockChip RK3568 ARM64 (4 cores)
2/4/8GB LPDDR4 RAM
2x 1000 Base-T
Bluetooth 5.0
Dual-band Wi-Fi6
2 LEDs (POWER / USER)
32/64/128GB eMMC on-board
Micro-SD Slot
M.2 Slot
SATA 3.0 interfaces
HDMI 2.0
Headphone
2x USB 2.0 Port
USB 3.0 Port
DC 12V

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

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 4194e38ac5)
2023-07-15 18:03:26 +08:00
Tianling Shen
50150fb5f8
rockchip: re-enable wifi for rockpi 4a
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 74c3699c02)
2023-07-12 23:26:34 +08:00
Tianling Shen
4603e7933e
rockchip: refresh LED patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit dec8c4080e)
2023-07-10 17:08:43 +08:00