ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
6.24k stars 2k forks source link

请求支持 友善之臂 nanopc T6 #2453

Open hunter24099 opened 4 months ago

hunter24099 commented 4 months ago

Device Information | 设备信息

找到一个dts https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts

官方armbian https://download.friendlyelec.com/NanoPC-T6

ophub commented 3 months ago

https://github.com/ophub/amlogic-s9xxx-armbian/releases/download/Armbian_bullseye_save_2024.07/Armbian_24.8.0_rockchip_nanopc-t6_bullseye_6.6.43_server_2024.07.31.img.gz

你下载测试下,我看官方支持主线,所以我选择了主线内核6.6.y,你试试这个内核是否可以使用。之前的rockchip都是使用的独立分支。

cm9vdA commented 3 months ago

T6硬件有两个版本,一个是最早发布的2301版本,Linux主线内核和Armbian社区支持的也是这个版本,后来友善又改了一个新版本LTS(2310),现在销售的也是LTS版本了,两个版本的设备树基本通用,区别是LTS增加了两个USB2.0接口,有一个GPIO去控制供电,还请O大把LTS也一起支持了吧。

硬件差异参考:https://wiki.friendlyelec.com/wiki/index.php/NanoPC-T6#NanoPC-T6-LTS

需要修改的部分可以参考这里:https://github.com/friendlyarm/kernel-rockchip/blob/nanopi6-v6.1.y/arch/arm64/boot/dts/rockchip/rk3588-nanopi6-rev07.dts

ophub commented 3 months ago

我看armbian使用的是主线内核,看友善使用的是rockchip专用内核,你有哪个设备,你测试下上面的固件是否可以正常启动。上面使用的是主线的linux-6.6.y,如果可以使用的话,可以把这个LTS提交到6.6.y里。

cm9vdA commented 3 months ago

我有LTS版本的,周末我回去刷下试试再给你反馈。

cm9vdA commented 3 months ago

我看armbian使用的是主线内核,看友善使用的是rockchip专用内核,你有哪个设备,你测试下上面的固件是否可以正常启动。上面使用的是主线的linux-6.6.y,如果可以使用的话,可以把这个LTS提交到6.6.y里。

今天试了,可以正常启动进系统,但所有的USB接口都不能使用,USB2.0和USB3.0没有5v供电,Type-C有供电但不识别设备

我根据友善的源码试着改了下,拉高GPIO_1 RK_PA4可以开启USB2.0的供电,USB2.0可以用了;GPIO_4 RK_PB0是控制USB3.0的供电,但是我试了下,拉高以后USB3.0还是没有5v电压。

从Armbian官网下载的社区版T6固件除了USB2.0,其他都正常,额外添加GPIO_1 RK_PA4的配置以后就全都正常了,但这个dtb放在你的固件里启动不了


Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x412fd050]
[    0.000000] Linux version 6.6.43-ophub (root@fv-az523-848) (aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 13.3.Rel1 (Build arm-13.24)) 13.3.1 20240614, GNU ld (Arm GNU Toolchain 13.3.Rel1 (Build arm-13.24)) 2.42.0.20240614) #1 SMP Sat Jul 27 09:39:04 EDT 2024
[    0.000000] Machine model: FriendlyElec NanoPC-T6
[    0.000000] earlycon: uart8250 at MMIO32 0x00000000feb50000 (options '')
[    0.000000] printk: bootconsole [uart8250] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] OF: fdt: Reserved memory: failed to reserve memory for node 'drm-logo@00000000': base 0x0000000000000000, size 0 MiB
[    0.000000] OF: fdt: Reserved memory: failed to reserve memory for node 'drm-cubic-lut@00000000': base 0x0000000000000000, size 0 MiB
[    0.000000] OF: reserved mem: 0x0000000000110000..0x00000000001effff (896 KiB) map non-reusable ramoops@110000
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000010000000, size 256 MiB
[    0.000000] OF: reserved mem: initialized node cma, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0x0000000010000000..0x000000001fffffff (262144 KiB) map reusable cma
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000200000-0x00000000ffffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   [mem 0x0000000100000000-0x00000004ffffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000200000-0x00000000efffffff]
[    0.000000]   node   0: [mem 0x0000000100000000-0x00000003fbffffff]
[    0.000000]   node   0: [mem 0x00000003fc500000-0x00000003ffefffff]
[    0.000000]   node   0: [mem 0x00000004f0000000-0x00000004ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x00000004ffffffff]
[    0.000000] On node 0, zone DMA: 512 pages in unavailable ranges
[    0.000000] On node 0, zone Normal: 1280 pages in unavailable ranges
[    0.000000] On node 0, zone Normal: 256 pages in unavailable ranges
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 29 pages/cpu s80616 r8192 d29976 u118784
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: detected: Virtualization Host Extensions
[    0.000000] CPU features: detected: Qualcomm erratum 1009, or ARM erratum 1286807, 2441009
[    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line: root=UUID=797e2979-ab43-4134-b354-be49d07b7534 rootwait rootfstype=ext4 splash=verbose console=ttyFIQ0 console=tty1 consoleblank=0 loglevel=7 ubootpart=46dbea66-00a4-41a6-a669-5557ea2bb063 usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u  net.ifnames=0 max_loop=128 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory earlycon=uart8250,mmio32,0xfeb50000 coherent_pool=1m irqchip.gicv3_pseudo_nmi=0 androidboot.fwver=ddr-v1.16-9fffbe1e78,bl31-v1.45,uboot-rmbian-07/21/2024
[    0.000000] Unknown kernel command line parameters "splash=verbose ubootpart=46dbea66-00a4-41a6-a669-5557ea2bb063 cgroup_enable=memory cgroup_memory=1", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes, linear)
[    0.000000] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 4126752
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: area num 8.
[    0.000000] software IO TLB: mapped [mem 0x00000000ec000000-0x00000000f0000000] (64MB)
[    0.000000] Memory: 16090940K/16769024K available (18688K kernel code, 4032K rwdata, 16212K rodata, 6976K init, 924K bss, 415940K reserved, 262144K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 480 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv3: GICv3 features: 16 PPIs
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000fe680000
[    0.000000] ITS [mem 0xfe640000-0xfe65ffff]
[    0.000000] GIC: enabling workaround for ITS: Rockchip erratum RK3588001
[    0.000000] GIC: enabling workaround for ITS: Rockchip erratum 114514
[    0.000000] ITS@0x00000000fe640000: allocated 8192 Devices @3410000 (indirect, esz 8, psz 64K, shr 0)
[    0.000000] ITS@0x00000000fe640000: allocated 32768 Interrupt Collections @3420000 (flat, esz 2, psz 64K, shr 0)
[    0.000000] ITS: using cache flushing for cmd queue
[    0.000000] ITS [mem 0xfe660000-0xfe67ffff]
[    0.000000] GIC: enabling workaround for ITS: Rockchip erratum RK3588001
[    0.000000] GIC: enabling workaround for ITS: Rockchip erratum 114514
[    0.000000] ITS@0x00000000fe660000: allocated 8192 Devices @3440000 (indirect, esz 8, psz 64K, shr 0)
[    0.000000] ITS@0x00000000fe660000: allocated 32768 Interrupt Collections @3450000 (flat, esz 2, psz 64K, shr 0)
[    0.000000] ITS: using cache flushing for cmd queue
[    0.000000] ITS ALLOCATE PROP WORKAROUND
[    0.000000] GICv3: using LPI property table @0x0000000003460000
[    0.000000] GIC: using cache flushing for LPI property table
[    0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000003470000
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] rockchip_cpuclk_pre_rate_change: Invalid rate : 1100000000 for cpuclk
[    0.000000] clk: couldn't set armclk_l clk rate to 1100000000 (-16), current rate: 24000000
hunter24099 commented 3 months ago

2301版本,正常启动,usb3.0无法使用。可能是我提供的dts有问题 https://github.com/friendlyarm/kernel-rockchip/blob/nanopi6-v6.1.y/arch/arm64/boot/dts/rockchip/ 有多个版本,估计能有好用的

ophub commented 3 months ago

https://github.com/unifreq/linux-6.6.y/blob/main/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts

我用的是这个dts编译的,测试一下修改的内容在这个主线内核里可以编译,把修改提交到f大的这个仓库吧。