Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请求适配RK3399开发板:GC18-108-RK3399-V2.0 #2216

Closed
eagle-lk opened this issue Apr 7, 2024 · 39 comments
Closed

请求适配RK3399开发板:GC18-108-RK3399-V2.0 #2216

eagle-lk opened this issue Apr 7, 2024 · 39 comments

Comments

@eagle-lk
Copy link

eagle-lk commented Apr 7, 2024

Device Information | RK3399开发板

  • SOC: RK3399
  • Model: GC18-108-RK3399-V2.0 (开发板中间扩展槽边的丝印)

96f0a11732e34ed7aa1c47af2ab8a44e

Armbian Version | 24.2.1 aarch64

  • Kernel Version: [6.6.16]
  • Release: [upgraded from Armbian_23.8.1_mrk3399_jammy_current_6.1.50 ]
rk3399-02:lib:# neofetch
                                 root@rk3399-02 
                                 -------------- 
      █ █ █ █ █ █ █ █ █ █ █      OS: Armbian (24.2.1) aarch64 
     ███████████████████████     Host: MRK3399_KJ_V00 
   ▄▄██                   ██▄▄   Kernel: 6.6.16-current-rockchip64 
   ▄▄██    ███████████    ██▄▄   Uptime: 8 hours, 20 mins 
   ▄▄██   ██         ██   ██▄▄   Packages: 542 (dpkg) 
   ▄▄██   ██         ██   ██▄▄   Shell: zsh 5.8.1 
   ▄▄██   ██         ██   ██▄▄   Terminal: /dev/pts/0 
   ▄▄██   █████████████   ██▄▄   CPU: (6) @ 1.416GHz 
   ▄▄██   ██         ██   ██▄▄   Memory: 163MiB / 3798MiB 
   ▄▄██   ██         ██   ██▄▄
   ▄▄██   ██         ██   ██▄▄                           
   ▄▄██                   ██▄▄                           
     ███████████████████████
      █ █ █ █ █ █ █ █ █ █ █

rk3399-02:lib:# uname -a
Linux rk3399-02 6.6.16-current-rockchip64 #1 SMP PREEMPT Fri Feb 23 08:25:28 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

Describe the bug | 问题描述
全部USB外部接口无响应。U盘插入没有任何相关事件。

详细描述
该板为咸鱼购买的拆机板。参考 RK3399 板子烧录Armbian完成了烧录过程。使用的固件来自:下载站

该板左上角有一个RTL8723BU模块,经查询为2.4G单频的WLAN/BT4.0组合,USB接口。以太网phy为百兆,芯片为SMSC的8720A。

该板没有hdmi接口,初始情况下上电无法正常启动。下载链接中提供了标注为原版andriod的dtb文件。经过反编译得到的dts,能够找到8723字样,可能是匹配的。

首次刷入后的固件为Armbian_23.8.1_mrk3399_jammy_current_6.1.50,也不是本仓库的支持的设备。

首次刷入后,日志没有任何错误提示,系统能够正常启动,两组网络芯片都正确识别并驱动,可以正常连接到网络并获得IP地址。其中ethernet0本地iperf3 10流测速为80Mb/s左右,wlan0则为35Mb/s左右,普遍比预期稍低。此时还未注意到USB的问题,尤其是RTL8723BU是通过USB总线连接到系统,标明内核USB的基本功能应该都是正常的。随后对系统进行了升级,upgrade后内核自动升级到了【6.1.50->6.6.16】,armbian【23.8.1->24.2.1】。重启后网络功能正常。

GC18-108-RK3399-V2.0-logs.txt

随后测试USB功能,注意到该板顶部的c-type 3.0接口和底部4个USB2.0接口都不能正常工作,表现为插入U盘系统未检测到任何事件。

rk3399-02:log:# lsusb -t
/:  Bus 08.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/7p, 480M
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Wireless, Driver=btusb, 480M
    |__ Port 1: Dev 2, If 1, Class=Wireless, Driver=btusb, 480M
    |__ Port 1: Dev 2, If 2, Class=Vendor Specific Class, Driver=rtl8xxxu, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M

查看USB设备只能看到网卡。右上角的EC200T-CN是一个4G LTE CAT4模块,也有一定的利用价值,似乎也是注册为USB设备,现在同样无法使用。

请求大侠指导一下思路和方法,目前这种情况应该如何着手?谢谢!

@eagle-lk
Copy link
Author

eagle-lk commented Apr 7, 2024

补充一些内容:
把当前系统下/sys/firmware/fdt文件拷贝出来,改名为gc18-108-rk3399.dtb,用dtc工具反编译了一份。编译时dtc提示了一些信息:

eagle@DESKTOP-93CNGH4:~/projects/dtb$ dtc -I dtb -O dts -o gc18-108.dts gc18-108.dtb
gc18-108.dts: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name
gc18-108.dts: Warning (unit_address_vs_reg): /usb@fe800000: node has a unit name, but no reg or ranges property
gc18-108.dts: Warning (unit_address_vs_reg): /usb@fe900000: node has a unit name, but no reg or ranges property
gc18-108.dts: Warning (avoid_unnecessary_addr_size): /mipi@ff960000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
gc18-108.dts: Warning (avoid_unnecessary_addr_size): /mipi@ff968000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
gc18-108.dts: Warning (interrupt_provider): /pinctrl/gpio@ff720000: Missing #address-cells in interrupt provider
gc18-108.dts: Warning (interrupt_provider): /pinctrl/gpio@ff730000: Missing #address-cells in interrupt provider
gc18-108.dts: Warning (interrupt_provider): /pinctrl/gpio@ff780000: Missing #address-cells in interrupt provider
gc18-108.dts: Warning (interrupt_provider): /pinctrl/gpio@ff788000: Missing #address-cells in interrupt provider
gc18-108.dts: Warning (interrupt_provider): /pinctrl/gpio@ff790000: Missing #address-cells in interrupt provider
gc18-108.dts: Warning (graph_child_address): /mipi@ff960000/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
gc18-108.dts: Warning (graph_child_address): /mipi@ff968000/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
gc18-108.dts: Warning (graph_child_address): /edp@ff970000/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary

gc18-108.dts.txt

@eagle-lk
Copy link
Author

eagle-lk commented Apr 8, 2024

@13584452567 大牛之前提到过,适配king3399时有块板子上的USB2.0也是通过hub转出来的,和这个板子有点象。他提了一句说,把某个GPIO拉高就可以了。从我的日志看RK3399的自带的USB bus都起来了,连bus7下的FE2.1 7port-hub都看到了,就是不能使用。很有可能也是需要开启一下。

rk3399-01:debug:# cat gpio
gpiochip0: GPIOs 0-31, parent: platform/ff720000.gpio, gpio0:
 gpio-6   (                    |ir-receiver         ) in  lo IRQ ACTIVE LOW
 gpio-10  (                    |reset               ) out lo ACTIVE LOW

gpiochip1: GPIOs 32-63, parent: platform/ff730000.gpio, gpio1:
 gpio-35  (                    |vcc5v0-typec-regulat) out hi 

gpiochip2: GPIOs 64-95, parent: platform/ff780000.gpio, gpio2:

gpiochip3: GPIOs 96-127, parent: platform/ff788000.gpio, gpio3:
 gpio-111 (                    |snps,reset          ) out hi ACTIVE LOW

gpiochip4: GPIOs 128-159, parent: platform/ff790000.gpio, gpio4:
 gpio-146 (                    |blue:power          ) out hi 
 gpio-154 (                    |vcc5v0-host-regulato) out lo 

rk3399-01:pinctrl:# cat pinctrl-handles 
Requested pin control handlers their pinmux maps:
device: vcc5v0-host-regulator current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: host-vbus-drv (109) function: usb2 (70)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-26 (154)config 00000001
device: ff420020.pwm current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: pwm2-pin-pull-down (90) function: pwm2 (58)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-19 (51)config 00000103
device: ff1a0000.serial current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: uart2c-xfer (77) function: uart2c (52)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-19 (147)config 00000105
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-20 (148)config 00000001
device: ff110000.i2c current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: i2c1-xfer (8) function: i2c1 (26)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-2 (130)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-1 (129)config 00000001
device: ff130000.i2c current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: i2c3-xfer (10) function: i2c3 (28)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-17 (145)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-16 (144)config 00000001
device: ff160000.i2c current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: i2c7-xfer (14) function: i2c7 (32)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio2-8 (72)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio2-7 (71)config 00000001
device: ff3c0000.i2c current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: i2c0-xfer (7) function: i2c0 (25)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-15 (47)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-16 (48)config 00000001
device: ff3d0000.i2c current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: i2c4-xfer (11) function: i2c4 (29)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-12 (44)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-11 (43)config 00000001
device: ff260000.tsadc current state: default
  state: init
    type: MUX_GROUP controller rockchip-pinctrl group: otp-pin (69) function: tsadc (47)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-6 (38)config 00000001
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: otp-out (70) function: tsadc (47)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-6 (38)config 00000001
  state: sleep
    type: MUX_GROUP controller rockchip-pinctrl group: otp-pin (69) function: tsadc (47)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-6 (38)config 00000001
device: leds current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: power-led-pin (99) function: leds (65)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-18 (146)config 00000001
device: vcc5v0-typec-regulator current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: vcc5v0_typec_en (108) function: usb-typec (69)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-3 (35)config 00000105
device: 0-001b current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: pmic-int-l (100) function: pmic (66)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-21 (53)config 00000105
device: sdio-pwrseq current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: wifi-reg_on-h (106) function: sdio (67)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio0-10 (10)config 00000001
device: fe320000.mmc current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: sdmmc-clk (33) function: sdmmc (37)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-12 (140)config 00000001
config 00000c09
    type: MUX_GROUP controller rockchip-pinctrl group: sdmmc-cmd (34) function: sdmmc (37)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-13 (141)config 00000105
config 00000809
    type: MUX_GROUP controller rockchip-pinctrl group: sdmmc-cd (35) function: sdmmc (37)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio0-7 (7)config 00000105
    type: MUX_GROUP controller rockchip-pinctrl group: sdmmc-bus4 (32) function: sdmmc (37)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-8 (136)config 00000105
config 00000809
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-9 (137)config 00000105
config 00000809
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-10 (138)config 00000105
config 00000809
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-11 (139)config 00000105
config 00000809
device: fe300000.ethernet current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: rgmii-pins (4) function: gmac (24)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-17 (113)config 00000001
config 00000d09
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-14 (110)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-13 (109)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-12 (108)config 00000001
config 00000d09
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-11 (107)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-9 (105)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-8 (104)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-7 (103)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-6 (102)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-5 (101)config 00000001
config 00000d09
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-4 (100)config 00000001
config 00000d09
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-3 (99)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-2 (98)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-1 (97)config 00000001
config 00000d09
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-0 (96)config 00000001
config 00000d09
device: ir-receiver current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: ir-rx (98) function: ir (64)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio0-6 (6)config 00000001
device: ff880000.i2s current state: bclk_off
  state: bclk_on
    type: MUX_GROUP controller rockchip-pinctrl group: i2s0-8ch-bus (17) function: i2s0 (34)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-24 (120)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-25 (121)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-26 (122)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-27 (123)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-28 (124)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-29 (125)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-30 (126)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-31 (127)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-0 (128)config 00000001
  state: bclk_off
    type: MUX_GROUP controller rockchip-pinctrl group: i2s0-8ch-bus-bclk-off (18) function: i2s0 (34)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-24 (120)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-25 (121)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-26 (122)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-27 (123)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-28 (124)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-29 (125)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-30 (126)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-31 (127)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-0 (128)config 00000001
device: ff890000.i2s current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: i2s1-2ch-bus (19) function: i2s1 (35)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-3 (131)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-4 (132)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-5 (133)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-6 (134)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-7 (135)config 00000001
device: ff870000.spdif current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: spdif-bus-1 (40) function: spdif (39)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-16 (112)config 00000001

补充当前运行系统的pinctrl和gpio信息。看起来gpio4-26非常像,但是不能直接修改:

rk3399-01:gpio:# ll
total 0
--w------- 1 root root 4.0K Apr  8 16:50 export
lrwxrwxrwx 1 root root    0 Apr  8 16:50 gpiochip0 -> ../../devices/platform/pinctrl/ff720000.gpio/gpio/gpiochip0
lrwxrwxrwx 1 root root    0 Apr  8 16:50 gpiochip128 -> ../../devices/platform/pinctrl/ff790000.gpio/gpio/gpiochip128
lrwxrwxrwx 1 root root    0 Apr  8 16:50 gpiochip32 -> ../../devices/platform/pinctrl/ff730000.gpio/gpio/gpiochip32
lrwxrwxrwx 1 root root    0 Apr  8 16:50 gpiochip64 -> ../../devices/platform/pinctrl/ff780000.gpio/gpio/gpiochip64
lrwxrwxrwx 1 root root    0 Apr  8 16:50 gpiochip96 -> ../../devices/platform/pinctrl/ff788000.gpio/gpio/gpiochip96
--w------- 1 root root 4.0K Apr  8 16:50 unexport
rk3399-01:gpio:# echo 154 > export
echo: write error: device or resource busy

还有什么好办法吗?

@Xianleewu
Copy link

  1. 有原机的固件(外设正常工作的),把DTS导出来一份;
  2. 没有原机固件,编写一个shell脚本,从GPIO0开始export并拉高,遍历所有gpio,这样也行。

@eagle-lk
Copy link
Author

eagle-lk commented Apr 9, 2024

  1. 有原机的固件(外设正常工作的),把DTS导出来一份;
  2. 没有原机固件,编写一个shell脚本,从GPIO0开始export并拉高,遍历所有gpio,这样也行。

加上了1.5M波特率的串口,可以看到boot日志了。

[  156.511778] reboot: Restarting system
DDR Version 1.25 20210517
In
soft reset
SRX
channel 0
CS = 0
MR0=0x98
MR4=0x3
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
CS = 1
MR0=0x18
MR4=0x3
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0x98
MR4=0x3
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
CS = 1
MR0=0x18
MR4=0x3
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 416MHz 0,1
Channel 0: LPDDR4,416MHz
Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB
Channel 1: LPDDR4,416MHz
Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB
256B stride
channel 0
CS = 0
MR0=0x98
MR4=0x82
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
CS = 1
MR0=0x18
MR4=0x3
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0x98
MR4=0x3
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
CS = 1
MR0=0x18
MR4=0x81
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
channel 0, cs 0, advanced training done
channel 0, cs 1, advanced training done
channel 1, cs 0, advanced training done
channel 1, cs 1, advanced training done
change freq to 856MHz 1,0
ch 0 ddrconfig = 0x101, ddrsize = 0x2020
ch 1 ddrconfig = 0x101, ddrsize = 0x2020
pmugrf_os_reg[2] = 0x3AA1FAA1, stride = 0xD
ddr_set_rate to 328MHZ
ddr_set_rate to 666MHZ
ddr_set_rate to 928MHZ
channel 0, cs 0, advanced training done
channel 0, cs 1, advanced training done
channel 1, cs 0, advanced training done
channel 1, cs 1, advanced training done
ddr_set_rate to 416MHZ, ctl_index 0
ddr_set_rate to 856MHZ, ctl_index 1
support 416 856 328 666 928 MHz, current 856MHz
OUT

U-Boot SPL 2022.07-armbian (Aug 22 2023 - 15:22:58 +0000)
Trying to boot from MMC2
NOTICE:  BL31: v1.3(release):845ee93
NOTICE:  BL31: Built : 15:51:11, Jul 22 2020
NOTICE:  BL31: Rockchip release version: v1.1
INFO:    GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    plat_rockchip_pmu_init(1196): pd status 3e
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9


U-Boot 2022.07-armbian (Aug 22 2023 - 15:22:58 +0000)

SoC: Rockchip rk3399
Reset cause: RST
Model: FriendlyElec NanoPC-T4
DRAM:  3.9 GiB
PMIC:  RK808
Core:  290 devices, 29 uclasses, devicetree: separate
MMC:   mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Model: FriendlyElec NanoPC-T4
Net:   PHY reset timed out
eth0: ethernet@fe300000
Hit any key to stop autoboot:  0
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe900000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 2 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 2 USB Device(s) found
scanning bus usb@fe900000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
1:      Armbian
Retrieving file: /boot/uInitrd
Retrieving file: /boot/Image
append: root=UUID=ebd4d6c9-9162-41be-b226-91d60add1250 console=ttyS2,1500000 console=tty0 rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles
Retrieving file: /boot/extlinux/4
Moving Image from 0x2080000 to 0x2200000, end=4060000
## Loading init Ramdisk from Legacy Image at 06000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    22633685 Bytes = 21.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to f0971000, end f1f06cd5 ... OK
   Loading Device Tree to 00000000f095a000, end 00000000f0970537 ... OK

Starting kernel ...

拿到开发板时也想过备份,但是上电没有输出,有线网络也不通,料想原来的固件也不好用。现在回想可能应该用andriodtool尝试备份一下。总之是没有原来的固件了。
写了个脚本,从159一直刷到2,发现109拉高时ethernet掉线了;96拉高时usb hub就掉线了,46就i2c掉线了。其他gpio没有什么反应。

有些引脚原来就被占用了不允许写,比如154,146之类。有些gpio刷进去就系统就没响应了,比如38,39之类。

@13584452567
Copy link
Contributor

@13584452567 大牛之前提到过,适配king3399时有块板子上的USB2.0也是通过hub转出来的,和这个板子有点象。他提了一句说,把某个GPIO拉高就可以了。从我的日志看RK3399的自带的USB bus都起来了,连bus7下的FE2.1 7port-hub都看到了,就是不能使用。很有可能也是需要开启一下。

rk3399-01:debug:# cat gpio
gpiochip0: GPIOs 0-31, parent: platform/ff720000.gpio, gpio0:
 gpio-6   (                    |ir-receiver         ) in  lo IRQ ACTIVE LOW
 gpio-10  (                    |reset               ) out lo ACTIVE LOW

gpiochip1: GPIOs 32-63, parent: platform/ff730000.gpio, gpio1:
 gpio-35  (                    |vcc5v0-typec-regulat) out hi 

gpiochip2: GPIOs 64-95, parent: platform/ff780000.gpio, gpio2:

gpiochip3: GPIOs 96-127, parent: platform/ff788000.gpio, gpio3:
 gpio-111 (                    |snps,reset          ) out hi ACTIVE LOW

gpiochip4: GPIOs 128-159, parent: platform/ff790000.gpio, gpio4:
 gpio-146 (                    |blue:power          ) out hi 
 gpio-154 (                    |vcc5v0-host-regulato) out lo 

rk3399-01:pinctrl:# cat pinctrl-handles 
Requested pin control handlers their pinmux maps:
device: vcc5v0-host-regulator current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: host-vbus-drv (109) function: usb2 (70)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-26 (154)config 00000001
device: ff420020.pwm current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: pwm2-pin-pull-down (90) function: pwm2 (58)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-19 (51)config 00000103
device: ff1a0000.serial current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: uart2c-xfer (77) function: uart2c (52)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-19 (147)config 00000105
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-20 (148)config 00000001
device: ff110000.i2c current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: i2c1-xfer (8) function: i2c1 (26)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-2 (130)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-1 (129)config 00000001
device: ff130000.i2c current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: i2c3-xfer (10) function: i2c3 (28)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-17 (145)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-16 (144)config 00000001
device: ff160000.i2c current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: i2c7-xfer (14) function: i2c7 (32)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio2-8 (72)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio2-7 (71)config 00000001
device: ff3c0000.i2c current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: i2c0-xfer (7) function: i2c0 (25)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-15 (47)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-16 (48)config 00000001
device: ff3d0000.i2c current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: i2c4-xfer (11) function: i2c4 (29)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-12 (44)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-11 (43)config 00000001
device: ff260000.tsadc current state: default
  state: init
    type: MUX_GROUP controller rockchip-pinctrl group: otp-pin (69) function: tsadc (47)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-6 (38)config 00000001
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: otp-out (70) function: tsadc (47)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-6 (38)config 00000001
  state: sleep
    type: MUX_GROUP controller rockchip-pinctrl group: otp-pin (69) function: tsadc (47)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-6 (38)config 00000001
device: leds current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: power-led-pin (99) function: leds (65)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-18 (146)config 00000001
device: vcc5v0-typec-regulator current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: vcc5v0_typec_en (108) function: usb-typec (69)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-3 (35)config 00000105
device: 0-001b current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: pmic-int-l (100) function: pmic (66)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio1-21 (53)config 00000105
device: sdio-pwrseq current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: wifi-reg_on-h (106) function: sdio (67)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio0-10 (10)config 00000001
device: fe320000.mmc current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: sdmmc-clk (33) function: sdmmc (37)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-12 (140)config 00000001
config 00000c09
    type: MUX_GROUP controller rockchip-pinctrl group: sdmmc-cmd (34) function: sdmmc (37)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-13 (141)config 00000105
config 00000809
    type: MUX_GROUP controller rockchip-pinctrl group: sdmmc-cd (35) function: sdmmc (37)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio0-7 (7)config 00000105
    type: MUX_GROUP controller rockchip-pinctrl group: sdmmc-bus4 (32) function: sdmmc (37)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-8 (136)config 00000105
config 00000809
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-9 (137)config 00000105
config 00000809
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-10 (138)config 00000105
config 00000809
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-11 (139)config 00000105
config 00000809
device: fe300000.ethernet current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: rgmii-pins (4) function: gmac (24)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-17 (113)config 00000001
config 00000d09
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-14 (110)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-13 (109)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-12 (108)config 00000001
config 00000d09
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-11 (107)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-9 (105)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-8 (104)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-7 (103)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-6 (102)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-5 (101)config 00000001
config 00000d09
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-4 (100)config 00000001
config 00000d09
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-3 (99)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-2 (98)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-1 (97)config 00000001
config 00000d09
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-0 (96)config 00000001
config 00000d09
device: ir-receiver current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: ir-rx (98) function: ir (64)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio0-6 (6)config 00000001
device: ff880000.i2s current state: bclk_off
  state: bclk_on
    type: MUX_GROUP controller rockchip-pinctrl group: i2s0-8ch-bus (17) function: i2s0 (34)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-24 (120)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-25 (121)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-26 (122)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-27 (123)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-28 (124)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-29 (125)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-30 (126)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-31 (127)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-0 (128)config 00000001
  state: bclk_off
    type: MUX_GROUP controller rockchip-pinctrl group: i2s0-8ch-bus-bclk-off (18) function: i2s0 (34)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-24 (120)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-25 (121)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-26 (122)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-27 (123)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-28 (124)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-29 (125)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-30 (126)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-31 (127)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-0 (128)config 00000001
device: ff890000.i2s current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: i2s1-2ch-bus (19) function: i2s1 (35)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-3 (131)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-4 (132)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-5 (133)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-6 (134)config 00000001
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio4-7 (135)config 00000001
device: ff870000.spdif current state: default
  state: default
    type: MUX_GROUP controller rockchip-pinctrl group: spdif-bus-1 (40) function: spdif (39)
    type: CONFIGS_PIN controller rockchip-pinctrl pin gpio3-16 (112)config 00000001

补充当前运行系统的pinctrl和gpio信息。看起来gpio4-26非常像,但是不能直接修改:

rk3399-01:gpio:# ll
total 0
--w------- 1 root root 4.0K Apr  8 16:50 export
lrwxrwxrwx 1 root root    0 Apr  8 16:50 gpiochip0 -> ../../devices/platform/pinctrl/ff720000.gpio/gpio/gpiochip0
lrwxrwxrwx 1 root root    0 Apr  8 16:50 gpiochip128 -> ../../devices/platform/pinctrl/ff790000.gpio/gpio/gpiochip128
lrwxrwxrwx 1 root root    0 Apr  8 16:50 gpiochip32 -> ../../devices/platform/pinctrl/ff730000.gpio/gpio/gpiochip32
lrwxrwxrwx 1 root root    0 Apr  8 16:50 gpiochip64 -> ../../devices/platform/pinctrl/ff780000.gpio/gpio/gpiochip64
lrwxrwxrwx 1 root root    0 Apr  8 16:50 gpiochip96 -> ../../devices/platform/pinctrl/ff788000.gpio/gpio/gpiochip96
--w------- 1 root root 4.0K Apr  8 16:50 unexport
rk3399-01:gpio:# echo 154 > export
echo: write error: device or resource busy

还有什么好办法吗?

king的是因为有设计缺陷,关机后重新启动无法正常复位那个引脚所以要手动拉高,你这个应该是别的原因。
我没有这个板子,没法给出什么建设性建议。

@eagle-lk
Copy link
Author

@13584452567 谢谢回复,我也还在摸索中。没有原理图确实难度很大。

[    1.123520] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    1.126506] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[    1.130550] drop_monitor: Initializing network drop monitor service
[    1.131473] NET: Registered PF_INET6 protocol family
[    1.136820] mmc2: SDHCI controller on fe330000.mmc [fe330000.mmc] using ADMA
[    1.267051] mmc2: new HS400 MMC card at address 0001
[    1.269183] mmcblk2: mmc2:0001 RS016G 14.4 GiB
[    1.273945]  mmcblk2: p1
[    1.275481] mmcblk2boot0: mmc2:0001 RS016G 4.00 MiB
[    1.279291] mmcblk2boot1: mmc2:0001 RS016G 4.00 MiB
[    1.282972] mmcblk2rpmb: mmc2:0001 RS016G 4.00 MiB, chardev (243:0)
[    1.320854] usb 3-1: new high-speed USB device number 2 using ehci-platform
[    1.344853] usb 5-1: new high-speed USB device number 2 using ehci-platform
[    1.478837] usb 3-1: New USB device found, idVendor=1a40, idProduct=0201, bcdDevice= 1.00
[    1.479623] usb 3-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    1.480281] usb 3-1: Product: USB 2.0 Hub [MTT]
[    1.482183] hub 3-1:1.0: USB hub found
[    1.482833] hub 3-1:1.0: 7 ports detected
[    1.502678] usb 5-1: New USB device found, idVendor=0bda, idProduct=b720, bcdDevice= 2.00
[    1.503468] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.504127] usb 5-1: Product: 802.11n WLAN Adapter
[    1.504574] usb 5-1: Manufacturer: Realtek
[    1.504992] usb 5-1: SerialNumber: 00e04c000001
[    1.908888] usb 8-1: new SuperSpeed USB device number 2 using xhci-hcd
[    1.930400] usb 8-1: LPM exit latency is zeroed, disabling LPM.
[    1.932883] usb 8-1: New USB device found, idVendor=346d, idProduct=5678, bcdDevice= 2.00
[    1.933633] usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.934278] usb 8-1: Product: Teclast CoolFlash
[    1.934692] usb 8-1: Manufacturer: Teclast
[    1.935068] usb 8-1: SerialNumber: FC15545E75096
[    1.938777] usb-storage 8-1:1.0: USB Mass Storage device detected
[    1.940744] scsi host0: usb-storage 8-1:1.0
[    2.386024] Freeing initrd memory: 22100K
[    2.443376] Segment Routing with IPv6
[    2.443828] In-situ OAM (IOAM) with IPv6
[    2.444334] NET: Registered PF_PACKET protocol family
[    2.445825] 8021q: 802.1Q VLAN Support v1.8
[    2.446377] Key type dns_resolver registered
[    2.459458] registered taskstats version 1
[    2.460088] Loading compiled-in X.509 certificates
[    2.482014] zswap: loaded using pool zstd/z3fold
[    2.498376] Key type .fscrypt registered
[    2.498753] Key type fscrypt-provisioning registered
[    2.502568] Btrfs loaded, zoned=yes, fsverity=yes
[    2.503182] Key type encrypted registered
[    2.503564] AppArmor: AppArmor sha1 policy hashing enabled
[    2.558091] syr828: mapping for mode 1 not defined
[    2.559153] fan53555-regulator 0-0040: FAN53555 Option[8] Rev[1] Detected!
[    2.559701] fan53555-regulator 0-0041: FAN53555 Option[8] Rev[1] Detected!
[    2.571130] rk808-regulator rk808-regulator.3.auto: there is no dvs0 gpio
[    2.571813] rk808-regulator rk808-regulator.3.auto: there is no dvs1 gpio
[    2.572440] rk808-regulator rk808-regulator.3.auto: max buck steps per change: 8
[    2.580702] vcca1v8_hdmi: Bringing 3000000uV into 1800000-1800000uV
[    2.593258] vcca0v9_hdmi: Bringing 1800000uV into 900000-900000uV
[    2.607746] rk808-rtc rk808-rtc.4.auto: registered as rtc0
[    2.609263] rk808-rtc rk808-rtc.4.auto: setting system clock to 2024-04-14T14:49:38 UTC (1713106178)
[    2.616295] WCN: marlin_init entry!
[    2.616308] dwmmc_rockchip fe320000.mmc: IDMAC supports 32-bit address mode.
[    2.616369] dwmmc_rockchip fe320000.mmc: Using internal DMA controller.
[    2.617281] of_cfs_init
[    2.617361] dwmmc_rockchip fe320000.mmc: Version ID is 270a
[    2.617973] of_cfs_init: OK
[    2.618282] dwmmc_rockchip fe320000.mmc: DW MMC controller at irq 70,32 bit host data width,256 deep fifo
[    2.618881] clk: Disabling unused clocks
[    2.632530] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    2.639217] usb 8-1: USB disconnect, device number 2

通过拉高GPIO的方式,在日志中确实短暂的出现过检测到U盘的记录,而且是type-c和USB-hub上都出现过。但随后就被自动拔出去了。

@ophub ophub closed this as completed Apr 27, 2024
@ChaoliesTinnu
Copy link

我也在搞这个板子。
上面有三个EUP3484芯片将12V转5V(应该是5V,也支持3.3V),这颗DCDC芯片需要外部给一个0->1的跳变才开始供电,然后有电路自维持。
上电是不会直接启动,原因就是没有供电,要给micro usb插一下,然后其中一颗EUP3484就会上电。我测量过剩下两颗都没有启动,看起来一颗是供4G模块,另一颗是供USB的,可能不是GPIO的问题,而是要外部给哪里激活EUP3484,但还没找到,用探针短一个5V过去没成功,不知道是不是手抖又把电拉下来了。

1 similar comment
@ChaoliesTinnu
Copy link

我也在搞这个板子。
上面有三个EUP3484芯片将12V转5V(应该是5V,也支持3.3V),这颗DCDC芯片需要外部给一个0->1的跳变才开始供电,然后有电路自维持。
上电是不会直接启动,原因就是没有供电,要给micro usb插一下,然后其中一颗EUP3484就会上电。我测量过剩下两颗都没有启动,看起来一颗是供4G模块,另一颗是供USB的,可能不是GPIO的问题,而是要外部给哪里激活EUP3484,但还没找到,用探针短一个5V过去没成功,不知道是不是手抖又把电拉下来了。

@ChaoliesTinnu
Copy link

GC18-108-RK3399.dtb.zip
我找了下,这个好象是当初备份的dtb.
当时群里面有个叫Q的大佬貌似已经搞出来了,不过那个群已经解散了。
当时留的一些链接也已经失效了。
Screenshot_20240501_160146

@eagle-lk
Copy link
Author

eagle-lk commented May 4, 2024

我也在搞这个板子。 上面有三个EUP3484芯片将12V转5V(应该是5V,也支持3.3V),这颗DCDC芯片需要外部给一个0->1的跳变才开始供电,然后有电路自维持。 上电是不会直接启动,原因就是没有供电,要给micro usb插一下,然后其中一颗EUP3484就会上电。我测量过剩下两颗都没有启动,看起来一颗是供4G模块,另一颗是供USB的,可能不是GPIO的问题,而是要外部给哪里激活EUP3484,但还没找到,用探针短一个5V过去没成功,不知道是不是手抖又把电拉下来了。

谢谢您的回复,我有一阵没弄这个板子了,主要是板子好几层,光靠看分析不出所以然,非得有原理图不可,之前的固件能把两组网络都驱动起来很了不起了。可惜这个EC200T没机会用了。

@eagle-lk
Copy link
Author

eagle-lk commented May 4, 2024

GC18-108-RK3399.dtb.zip 我找了下,这个好象是当初备份的dtb. 当时群里面有个叫Q的大佬貌似已经搞出来了,不过那个群已经解散了。 当时留的一些链接也已经失效了。 Screenshot_20240501_160146

看了一遍您提供的dtb,看起来有点像,可惜是个Android版本的,可能要修改的地方比较多。不知道您目前的进展如何,我是有点无法前进了。谢谢

@eagle-lk
Copy link
Author

eagle-lk commented May 5, 2024

  • GC18-108-RK3399-V2.0

通过您给的链接,找到了赵启大侠两年前提交的一份dts文件,稍微修改了一下,编译出一个可用的版本,现在usb可以挂载u盘了!
rk3399-gc18-108.zip

@eagle-lk
Copy link
Author

eagle-lk commented May 5, 2024

rk3399-01:~:# lsusb -t
/:  Bus 08.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/7p, 480M
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Wireless, Driver=btusb, 480M
    |__ Port 1: Dev 2, If 1, Class=Wireless, Driver=btusb, 480M
    |__ Port 1: Dev 2, If 2, Class=Vendor Specific Class, Driver=rtl8xxxu, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M

@ChaoliesTinnu
Copy link

  • GC18-108-RK3399-V2.0

通过您给的链接,找到了赵启大侠两年前提交的一份dts文件,稍微修改了一下,编译出一个可用的版本,现在usb可以挂载u盘了! rk3399-gc18-108.zip

强!
我这边遇到个问题,寒芒这个MRK3399的固件的dtb好像不是在/boot/dtb下面的,boot下面也没有配置文件,我换了些别的固件发现启动不起来。您那边的MRK3399这个固件是怎么替换dtb的?

@eagle-lk
Copy link
Author

eagle-lk commented May 5, 2024

这个容易,你看一下你的 /boot/extlinux/extlinux.conf,其中fdt指向的就是要使用的dtb,比如我这里是:

rk3399-01:rockchip:# cat /boot/extlinux/extlinux.conf 
label Armbian
  kernel /boot/Image
  initrd /boot/uInitrd
  fdt /boot/dtb-6.6.16-current-rockchip64/rockchip/rk3399-gc18-108.dtb
  append root=UUID=ebd4d6c9-9162-41be-b226-91d60add1250 console=ttyS2,1500000 console=tty0 rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles

放在哪里不重要,关键是匹配,kernel启动时需要读取这个文件。

@nqhdanny
Copy link

nqhdanny commented May 7, 2024

哪里不重要,关键是匹配,kernel启动时需要读取这

使用了你修改的DTB可以正常识别USB端口了, 感谢感谢!
我现在还有个问题就是启动一定要插着Micro USB才可以,不然上电不启动

@eagle-lk
Copy link
Author

eagle-lk commented May 8, 2024

哪里不重要,关键是匹配,kernel启动时需要读取这

使用了你修改的DTB可以正常识别USB端口了, 感谢感谢! 我现在还有个问题就是启动一定要插着Micro USB才可以,不然上电不启动。

我这里倒是不用插着microusb。不过需要长按上方边缘(EC200T的左上角处)的按钮大约3s才能启动。从目前的dts来看是有个powerbutton的。

命令行reboot就不需要了,可以直接启动。完成启动大概10s左右。

@nqhdanny
Copy link

nqhdanny commented May 9, 2024

使用了你修改的DTB可以正常识别USB端口了, 感谢感谢!
我现在还有个问题就是启动一定要插着Micro USB才可以,不然上电不启动

感谢 感谢! 终于不用插着Micro USB 上电啦

@nqhdanny
Copy link

不知道是否有方法把TypeC和那个4G网卡一起开启,目前还是不工作的状态

@eagle-lk
Copy link
Author

不知道是否有方法把TypeC和那个4G网卡一起开启,目前还是不工作的状态

没有原理图确实有点难度。无法形成完整的dts。从板子的布局看,type-c可能是用作视频接口;4G LTE是通过usb2接入的,即有可能是直接挂在rk3399上,也有可能是挂在左下角的USB-Hub上。

@nqhdanny
Copy link

不知道是否有方法把TypeC和那个4G网卡一起开启,目前还是不工作的状态

没有原理图确实有点难度。无法形成完整的dts。从板子的布局看,type-c可能是用作视频接口;4G LTE是通过usb2接入的,即有可能是直接挂在rk3399上,也有可能是挂在左下角的USB-Hub上。

升级了下系统, 进不去了 , 不知道是不是因为我改了那个 DTB的名字导致的

@nqhdanny
Copy link

升级新系统后确认无法启动了, 我重新写了下系统, 升级到最新版本, 可以正常启动, 但是替换了DTB文件后就卡在这个位置了
[ 373.261168] reboot: Restarting system
DDR Version 1.25 20210517
In
soft reset
SRX
channel 0
CS = 0
MR0=0x98
MR4=0x3
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
CS = 1
MR0=0x18
MR4=0x3
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0x98
MR4=0x3
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
CS = 1
MR0=0x18
MR4=0x2
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 416MHz 0,1
Channel 0: LPDDR4,416MHz
Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB
Channel 1: LPDDR4,416MHz
Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB
256B stride
channel 0
CS = 0
MR0=0x98
MR4=0x82
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
CS = 1
MR0=0x18
MR4=0x82
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0x98
MR4=0x82
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
CS = 1
MR0=0x18
MR4=0x2
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
channel 0, cs 0, advanced training done
channel 0, cs 1, advanced training done
channel 1, cs 0, advanced training done
channel 1, cs 1, advanced training done
change freq to 856MHz 1,0
ch 0 ddrconfig = 0x101, ddrsize = 0x2020
ch 1 ddrconfig = 0x101, ddrsize = 0x2020
pmugrf_os_reg[2] = 0x3AA1FAA1, stride = 0xD
ddr_set_rate to 328MHZ
ddr_set_rate to 666MHZ
ddr_set_rate to 928MHZ
channel 0, cs 0, advanced training done
channel 0, cs 1, advanced training done
channel 1, cs 0, advanced training done
channel 1, cs 1, advanced training done
ddr_set_rate to 416MHZ, ctl_index 0
ddr_set_rate to 856MHZ, ctl_index 1
support 416 856 328 666 928 MHz, current 856MHz
OUT

U-Boot SPL 2022.07-armbian (Aug 22 2023 - 15:22:58 +0000)
Trying to boot from MMC2
NOTICE: BL31: v1.3(release):845ee93
NOTICE: BL31: Built : 15:51:11, Jul 22 2020
NOTICE: BL31: Rockchip release version: v1.1
INFO: GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 0
INFO: plat_rockchip_pmu_init(1196): pd status 3e
INFO: BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR: Error initializing runtime service opteed_fast
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9

U-Boot 2022.07-armbian (Aug 22 2023 - 15:22:58 +0000)

SoC: Rockchip rk3399
Reset cause: unknown reset
Model: FriendlyElec NanoPC-T4
DRAM: 3.9 GiB
PMIC: RK808
Core: 290 devices, 29 uclasses, devicetree: separate
MMC: mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Model: FriendlyElec NanoPC-T4
Net: PHY reset timed out
eth0: ethernet@fe300000
Hit any key to stop autoboot: 0
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe900000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 2 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 2 USB Device(s) found
scanning bus usb@fe900000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
1: Armbian
Retrieving file: /boot/uInitrd
Retrieving file: /boot/Image
append: root=UUID=ebd4d6c9-9162-41be-b226-91d60add1250 console=ttyS2,1500000 console=tty0 rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles
Retrieving file: /boot/extlinux/4
Moving Image from 0x2080000 to 0x2200000, end=3f40000

Loading init Ramdisk from Legacy Image at 06000000 ...

Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 22620053 Bytes = 21.6 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK

Flattened Device Tree blob at 01f00000

Booting using the fdt blob at 0x1f00000
Loading Ramdisk to f0974000, end f1f06795 ... OK
Loading Device Tree to 00000000f0961000, end 00000000f0973750 ... OK

Starting kernel ...

efi_free_pool: illegal free 0x00000000f0f09040
efi_free_pool: illegal free 0x00000000f0f06040
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.6.32-current-rockchip64 (armbian@next) (aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 SMP PREEMPT Sat May 25 14:22:56 UTC 2024
[ 0.000000] Machine model: Rockchip RK3399 GC18-108-V2
[ 0.000000] efi: UEFI not found.
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000200000-0x00000000f7ffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0xf77d5980-0xf77d7fff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000200000-0x00000000f7ffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000200000-0x00000000f7ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x00000000f7ffffff]
[ 0.000000] On node 0, zone DMA: 512 pages in unavailable ranges
[ 0.000000] cma: Reserved 128 MiB at 0x00000000e8800000 on node -1
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 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.0
[ 0.000000] percpu: Embedded 31 pages/cpu s88296 r8192 d30488 u126976
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: detected: GIC system register CPU interface
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] alternatives: applying boot alternatives
[ 0.000000] Kernel command line: root=UUID=ebd4d6c9-9162-41be-b226-91d60add1250 console=ttyS2,1500000 console=tty0 rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles
[ 0.000000] Unknown kernel command line parameters "splash", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Fallback order for Node 0: 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 999432
[ 0.000000] Policy zone: DMA
[ 0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
[ 0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 3MB
[ 0.000000] software IO TLB: area num 8.
[ 0.000000] software IO TLB: mapped [mem 0x00000000f2e00000-0x00000000f3200000] (4MB)
[ 0.000000] Memory: 3795112K/4061184K available (16960K kernel code, 2316K rwdata, 5236K rodata, 4672K init, 604K bss, 135000K reserved, 131072K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
[ 0.000000] trace event string verifier disabled
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=6.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=6
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[ 0.000000] GICv3: 256 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:0x00000000fef00000
[ 0.000000] ITS [mem 0xfee20000-0xfee3ffff]
[ 0.000000] ITS@0x00000000fee20000: allocated 65536 Devices @500000 (flat, esz 8, psz 64K, shr 0)
[ 0.000000] ITS: using cache flushing for cmd queue
[ 0.000000] GICv3: using LPI property table @0x00000000004f0000
[ 0.000000] GIC: using cache flushing for LPI property table
[ 0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000000580000
[ 0.000000] GICv3: GIC: PPI partition interrupt-partition-0[0] { /cpus/cpu@0[0] /cpus/cpu@1[1] /cpus/cpu@2[2] /cpus/cpu@3[3] }
[ 0.000000] GICv3: GIC: PPI partition interrupt-partition-1[1] { /cpus/cpu@100[4] /cpus/cpu@101[5] }
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.001323] Console: colour dummy device 80x25
[ 0.001342] printk: console [tty0] enabled
[ 0.002587] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.002638] pid_max: default: 32768 minimum: 301
[ 0.002793] LSM: initializing lsm=capability,yama,apparmor,integrity
[ 0.002864] Yama: becoming mindful.
[ 0.003000] AppArmor: AppArmor initialized
[ 0.003179] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.003237] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.005326] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 0.006848] RCU Tasks: Setting shift to 3 and lim to 1 rcu_task_cb_adjust=1.
[ 0.007027] RCU Tasks Trace: Setting shift to 3 and lim to 1 rcu_task_cb_adjust=1.
[ 0.007408] rcu: Hierarchical SRCU implementation.
[ 0.007436] rcu: Max phase no-delay instances is 1000.
[ 0.009184] Platform MSI: msi-controller@fee20000 domain created
[ 0.009653] PCI/MSI: /interrupt-controller@fee00000/msi-controller@fee20000 domain created
[ 0.011437] EFI services will not be available.
[ 0.012191] smp: Bringing up secondary CPUs ...
[ 0.013276] Detected VIPT I-cache on CPU1
[ 0.013389] GICv3: CPU1: found redistributor 1 region 0:0x00000000fef20000
[ 0.013414] GICv3: CPU1: using allocated LPI pending table @0x0000000000590000
[ 0.013486] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.014860] Detected VIPT I-cache on CPU2
[ 0.014976] GICv3: CPU2: found redistributor 2 region 0:0x00000000fef40000
[ 0.015000] GICv3: CPU2: using allocated LPI pending table @0x00000000005a0000
[ 0.015069] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.016487] Detected VIPT I-cache on CPU3
[ 0.016610] GICv3: CPU3: found redistributor 3 region 0:0x00000000fef60000
[ 0.016634] GICv3: CPU3: using allocated LPI pending table @0x00000000005b0000
[ 0.016701] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.018085] CPU features: detected: Spectre-v2
[ 0.018099] CPU features: detected: Spectre-v4
[ 0.018105] CPU features: detected: Spectre-BHB
[ 0.018113] CPU features: detected: ARM erratum 1742098
[ 0.018121] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[ 0.018128] Detected PIPT I-cache on CPU4
[ 0.018204] GICv3: CPU4: found redistributor 100 region 0:0x00000000fef80000
[ 0.018222] GICv3: CPU4: using allocated LPI pending table @0x00000000005c0000
[ 0.018267] CPU4: Booted secondary processor 0x0000000100 [0x410fd082]
[ 0.019470] Detected PIPT I-cache on CPU5
[ 0.019559] GICv3: CPU5: found redistributor 101 region 0:0x00000000fefa0000
[ 0.019579] GICv3: CPU5: using allocated LPI pending table @0x00000000005d0000
[ 0.019623] CPU5: Booted secondary processor 0x0000000101 [0x410fd082]
[ 0.019790] smp: Brought up 1 node, 6 CPUs
[ 0.020243] SMP: Total of 6 processors activated.
[ 0.020267] CPU features: detected: 32-bit EL0 Support
[ 0.020289] CPU features: detected: 32-bit EL1 Support
[ 0.020313] CPU features: detected: CRC32 instructions
[ 0.020481] CPU: All CPU(s) started at EL2
[ 0.020516] alternatives: applying system-wide alternatives
[ 0.024590] devtmpfs: initialized
[ 0.037429] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.037505] futex hash table entries: 2048 (order: 5, 131072 bytes, linear)
[ 0.040309] pinctrl core: initialized pinctrl subsystem
[ 0.040843] DMI not present or invalid.
[ 0.041618] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.044225] DMA: preallocated 2048 KiB GFP_KERNEL pool for atomic allocations
[ 0.045405] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.046533] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.046604] audit: initializing netlink subsys (disabled)
[ 0.046838] audit: type=2000 audit(0.044:1): state=initialized audit_enabled=0 res=1
[ 0.048080] thermal_sys: Registered thermal governor 'fair_share'
[ 0.048089] thermal_sys: Registered thermal governor 'bang_bang'
[ 0.048110] thermal_sys: Registered thermal governor 'step_wise'
[ 0.048124] thermal_sys: Registered thermal governor 'user_space'
[ 0.048188] cpuidle: using governor menu
[ 0.048466] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.048695] ASID allocator initialised with 65536 entries
[ 0.049788] Serial: AMBA PL011 UART driver
[ 0.069908] platform fe330000.mmc: Fixed dependency cycle(s) with /syscon@ff770000/phy@f780
[ 0.070015] platform ff770000.syscon:phy@f780: Fixed dependency cycle(s) with /mmc@fe330000
[ 0.071937] platform fec00000.dp: Fixed dependency cycle(s) with /vop@ff8f0000
[ 0.072034] platform ff8f0000.vop: Fixed dependency cycle(s) with /dp@fec00000
[ 0.072857] platform fec00000.dp: Fixed dependency cycle(s) with /vop@ff900000
[ 0.072953] platform ff900000.vop: Fixed dependency cycle(s) with /dp@fec00000
[ 0.074423] platform ff900000.vop: Fixed dependency cycle(s) with /hdmi@ff940000
[ 0.074528] platform ff8f0000.vop: Fixed dependency cycle(s) with /hdmi@ff940000
[ 0.074632] platform ff940000.hdmi: Fixed dependency cycle(s) with /vop@ff900000
[ 0.081032] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 0.081482] rockchip-gpio ff720000.gpio: probed /pinctrl/gpio@ff720000
[ 0.081921] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 0.082217] rockchip-gpio ff730000.gpio: probed /pinctrl/gpio@ff730000
[ 0.082605] gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 0.082887] rockchip-gpio ff780000.gpio: probed /pinctrl/gpio@ff780000
[ 0.083326] gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 0.083607] rockchip-gpio ff788000.gpio: probed /pinctrl/gpio@ff788000
[ 0.083970] gpio gpiochip4: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 0.084249] rockchip-gpio ff790000.gpio: probed /pinctrl/gpio@ff790000
[ 0.090840] Modules: 25280 pages in range for non-PLT usage
[ 0.090851] Modules: 516800 pages in range for PLT usage
[ 0.091977] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.092012] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[ 0.092031] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.092047] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
[ 0.092064] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.092079] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[ 0.092096] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.092112] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
[ 0.093399] cryptd: max_cpu_qlen set to 1000
[ 0.160080] raid6: neonx8 gen() 1698 MB/s
[ 0.228198] raid6: neonx4 gen() 1750 MB/s
[ 0.296310] raid6: neonx2 gen() 1534 MB/s
[ 0.364408] raid6: neonx1 gen() 1189 MB/s
[ 0.432513] raid6: int64x8 gen() 907 MB/s
[ 0.500628] raid6: int64x4 gen() 1017 MB/s
[ 0.568752] raid6: int64x2 gen() 955 MB/s
[ 0.636854] raid6: int64x1 gen() 730 MB/s
[ 0.636869] raid6: using algorithm neonx4 gen() 1750 MB/s
[ 0.704965] raid6: .... xor() 1309 MB/s, rmw enabled
[ 0.704983] raid6: using neon recovery algorithm
[ 0.705964] iommu: Default domain type: Translated
[ 0.705986] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.706478] SCSI subsystem initialized
[ 0.706967] usbcore: registered new interface driver usbfs
[ 0.707015] usbcore: registered new interface driver hub
[ 0.707075] usbcore: registered new device driver usb
[ 0.707604] pps_core: LinuxPPS API ver. 1 registered
[ 0.707623] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it
[ 0.707656] PTP clock support registered
[ 0.707931] EDAC MC: Ver: 3.0.0
[ 0.708536] scmi_core: SCMI protocol bus registered
[ 0.709712] NetLabel: Initializing
[ 0.709732] NetLabel: domain hash size = 128
[ 0.709746] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
[ 0.709831] NetLabel: unlabeled traffic allowed by default
[ 0.710050] vgaarb: loaded
[ 0.710558] clocksource: Switched to clocksource arch_sys_counter
[ 0.711118] VFS: Disk quotas dquot_6.6.0
[ 0.711185] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.711985] AppArmor: AppArmor Filesystem Enabled
[ 0.722966] NET: Registered PF_INET protocol family
[ 0.723269] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[ 0.728077] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[ 0.728274] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.728370] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.728965] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[ 0.730261] TCP: Hash tables configured (established 32768 bind 32768)
[ 0.730442] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[ 0.730656] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[ 0.731048] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.731118] NET: Registered PF_XDP protocol family
[ 0.731146] PCI: CLS 0 bytes, default 64
[ 0.731425] Trying to unpack rootfs image as initramfs...
[ 0.734692] kvm [1]: IPA Size Limit: 40 bits
[ 0.736066] kvm [1]: vgic-v2@fff20000
[ 0.736112] kvm [1]: GIC system register CPU interface enabled
[ 0.736150] kvm [1]: vgic interrupt IRQ18
[ 0.736197] kvm [1]: Hyp mode initialized successfully
[ 0.738448] Initialise system trusted keyrings
[ 0.738613] Key type blacklist registered
[ 0.738883] workingset: timestamp_bits=44 max_order=20 bucket_order=0
[ 0.738965] zbud: loaded
[ 0.739602] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.740054] fuse: init (API version 7.39)
[ 0.742036] integrity: Platform Keyring initialized
[ 0.786898] xor: measuring software checksum speed
[ 0.790294] 8regs : 2926 MB/sec
[ 0.793447] 32regs : 3148 MB/sec
[ 0.797321] arm64_neon : 2555 MB/sec
[ 0.797337] xor: using function: 32regs (3148 MB/sec)
[ 0.797359] Key type asymmetric registered
[ 0.797374] Asymmetric key parser 'x509' registered
[ 0.797480] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.797711] io scheduler mq-deadline registered
[ 0.797732] io scheduler kyber registered
[ 0.797805] io scheduler bfq registered
[ 0.809059] rockchip-pcie f8000000.pcie: host bridge /pcie@f8000000 ranges:
[ 0.809124] rockchip-pcie f8000000.pcie: MEM 0x00fa000000..0x00fbdfffff -> 0x00fa000000
[ 0.809160] rockchip-pcie f8000000.pcie: IO 0x00fbe00000..0x00fbefffff -> 0x00fbe00000
[ 0.809679] rockchip-pcie f8000000.pcie: no bus scan delay, default to 0 ms
[ 0.809716] rockchip-pcie f8000000.pcie: no vpcie12v regulator found
[ 0.809744] rockchip-pcie f8000000.pcie: no vpcie3v3 regulator found
[ 0.809771] rockchip-pcie f8000000.pcie: supply vpcie1v8 not found, using dummy regulator
[ 0.809912] rockchip-pcie f8000000.pcie: supply vpcie0v9 not found, using dummy regulator
[ 1.814592] phy phy-ff770000.syscon:pcie-phy.1: pll lock timeout!
[ 1.814630] phy phy-ff770000.syscon:pcie-phy.1: phy poweron failed --> -22
[ 1.814652] rockchip-pcie f8000000.pcie: power on phy0 err -22
[ 1.814693] rockchip-pcie: probe of f8000000.pcie failed with error -22
[ 1.818513] dma-pl330 ff6d0000.dma-controller: Loaded driver for PL330 DMAC-241330
[ 1.818668] dma-pl330 ff6d0000.dma-controller: DBUFF-32x8bytes Num_Chans-6 Num_Peri-12 Num_Events-12
[ 1.820581] dma-pl330 ff6e0000.dma-controller: Loaded driver for PL330 DMAC-241330
[ 1.820615] dma-pl330 ff6e0000.dma-controller: DBUFF-128x8bytes Num_Chans-8 Num_Peri-20 Num_Events-16
[ 1.823559] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 1.828243] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 35, base_baud = 1500000) is a 16550A
[ 1.829552] ff1a0000.serial: ttyS2 at MMIO 0xff1a0000 (irq = 36, base_baud = 1500000) is a 16550A
[ 1.829783] printk: console [ttyS2] enabled
[ 1.964624] Serial: AMBA driver
[ 1.969385] rockchip-vop ff8f0000.vop: Adding to iommu group 2
[ 1.970079] clk: failed to reparent dclk_vop1_div to vpll: -22
[ 1.971879] rockchip-vop ff900000.vop: Adding to iommu group 3
[ 1.972575] clk: failed to reparent dclk_vop0_div to cpll: -22
[ 2.310069] Freeing initrd memory: 22088K
[ 11.203633] rockchip-pm-domain ff310000.power-management:power-controller: failed to get ack on domain 'vopb', val=0x698

@eagle-lk
Copy link
Author

我也注意到这个问题了,6.6.32确实卡在这了,启动时的检查比6.6.16严格。得把之前的dts找出来重新检视并编译。或者在armbian-config里把内核版本冻结。主要是没有原理图,视频接口一个都搞不定,感觉价值有限啊

@nqhdanny
Copy link

我也注意到这个问题了,6.6.32确实卡在这了,启动时的检查比6.6.16严格。得把之前的dts找出来重新检视并编译。或者在armbian-config里把内核版本冻结。主要是没有原理图,视频接口一个都搞不定,感觉价值有限啊

主要是能力和时间有限, DTB的相关内容学习的成本和研究后的产出不成正比,同意你的观点, 决定放弃这个板子了, 回到我的Panther X2去 ,谢谢!

@eagle-lk
Copy link
Author

把内核锁定在6.1.50了。Armbian自身的升级不受影响,目前已经升级到了24.5.1。已知最后可用的内核是6.6.16。

@eagle-lk
Copy link
Author

我也注意到这个问题了,6.6.32确实卡在这了,启动时的检查比6.6.16严格。得把之前的dts找出来重新检视并编译。或者在armbian-config里把内核版本冻结。主要是没有原理图,视频接口一个都搞不定,感觉价值有限啊

主要是能力和时间有限, DTB的相关内容学习的成本和研究后的产出不成正比,同意你的观点, 决定放弃这个板子了, 回到我的Panther X2去 ,谢谢!

彻底放弃之前还有一个折中的方法:我试了Armbian_24.5.0_rockchip_tn3399_noble_6.1.91_server_2024.05.18.img固件可以驱动这块板子的无线网卡。通过瑞芯微的烧录工具写入固件。先配置好wifi环境,然后把dtb文件上传到/boot/dtb/rockchip/。然后修改/boot/armbianEnv.txt,将fdtfile指向我们的dtb。再次重启就可以正常工作了。
这种修改方法的好处是内核可以使用6.1.91;armbian可以升级到以Ubuntu Nobel为基础,除了几个视频接口可以完全正常使用。

@nqhdanny
Copy link

我也注意到这个问题了,6.6.32确实卡在这了,启动时的检查比6.6.16严格。得把之前的dts找出来重新检视并编译。或者在armbian-config里把内核版本冻结。主要是没有原理图,视频接口一个都搞不定,感觉价值有限啊

主要是能力和时间有限, DTB的相关内容学习的成本和研究后的产出不成正比,同意你的观点, 决定放弃这个板子了, 回到我的Panther X2去 ,谢谢!

彻底放弃之前还有一个折中的方法:我试了Armbian_24.5.0_rockchip_tn3399_noble_6.1.91_server_2024.05.18.img固件可以驱动这块板子的无线网卡。通过瑞芯微的烧录工具写入固件。先配置好wifi环境,然后把dtb文件上传到/boot/dtb/rockchip/。然后修改/boot/armbianEnv.txt,将fdtfile指向我们的dtb。再次重启就可以正常工作了。 这种修改方法的好处是内核可以使用6.1.91;armbian可以升级到以Ubuntu Nobel为基础,除了几个视频接口可以完全正常使用。

给你点赞!!

@ophub
Copy link
Owner

ophub commented May 29, 2024

rk3399-gc18-108.zip

@eagle-lk 你修改好的可以dts分享吗?

你分享的这个dtb可以使用的话,可以使用tn3399的uboot打包试试

@eagle-lk
Copy link
Author

rk3399-gc18-108.zip

@eagle-lk 你修改好的可以dts分享吗?

你分享的这个dtb可以使用的话,可以使用tn3399的uboot打包试试

当然可以,说起来惭愧的很,一直没分享dts主要是改得既肤浅又潦草,几个视频接口都不能用,此外一直感兴趣的EC200T-CN LTE CAT4模块始终无法启用。
rk3399-gc18-108-dts-src.zip

@ophub
Copy link
Owner

ophub commented May 29, 2024

这个dts在6.1.y下编译失败了,这是安卓的?你是在哪个版本的内核下编译的?

Snip20240529_1

@eagle-lk
Copy link
Author

这个dts在6.1.y下编译失败了,这是安卓的?你是在哪个版本的内核下编译的?

Snip20240529_1
6.6.26,我是单独编译的dtb

eagle@us2204-kernel-dev:~/linux-6.6.26/arch/arm64/boot/dts/rockchip$ touch rk3399-gc18-108.dtsi
eagle@us2204-kernel-dev:~/linux-6.6.26/arch/arm64/boot/dts/rockchip$ touch rk3399-gc18-108.dts
eagle@us2204-kernel-dev:~/linux-6.6.26/arch/arm64/boot/dts/rockchip$ cd ~/linux-6.6.26/
eagle@us2204-kernel-dev:~/linux-6.6.26$ make dtbs
  DTC     arch/arm64/boot/dts/rockchip/rk3399-gc18-108.dtb
arch/arm64/boot/dts/rockchip/rk3399-gc18-108.dts:50.9-54.5: Warning (graph_port): /panel/ports: graph port node name should be 'port'
arch/arm64/boot/dts/rockchip/rk3399-gc18-108.dts:51.23-53.6: Warning (graph_endpoint): /panel/ports/endpoint: graph connection to node '/dp@ff970000/ports/port@1' is not bidirectional
eagle@us2204-kernel-dev:~/linux-6.6.26$

@eagle-lk
Copy link
Author

rk3399-gc18-108.dts有一个依赖文件rk3399-gc18-108.dtsi,需要放到同一个目录下。这个dts有一部分比较规范的源码,所以不能只用dtc编译。我这方面经验很少,我尽量表述的完整一些供您参考。

@eagle-lk
Copy link
Author

eagle@us2204-kernel-dev:~/linux-6.6.26/arch/arm64/boot/dts/rockchip$ grep edp_out *
rk3399.dtsi:                    edp_out: port@1 {
rk3399-evb.dts:                         remote-endpoint = <&edp_out_panel>;
rk3399-evb.dts:         edp_out: port@1 {
rk3399-evb.dts:                 edp_out_panel: endpoint@0 {
rk3399-gc18-108.dts:                            remote-endpoint = <&edp_out>;
rk3399-gru-bob.dts:                             remote-endpoint = <&edp_out_panel>;
rk3399-gru-chromebook.dtsi:             edp_out: port@1 {
rk3399-gru-chromebook.dtsi:                     edp_out_panel: endpoint@0 {
rk3399-gru-kevin.dts:                           remote-endpoint = <&edp_out_panel>;
rk3399-pinebook-pro.dts:                                remote-endpoint = <&edp_out_panel>;
rk3399-pinebook-pro.dts:                edp_out: port@1 {
rk3399-pinebook-pro.dts:                        edp_out_panel: endpoint@0 {
rk3399-sapphire-excavator.dts:                          remote-endpoint = <&edp_out_panel>;
rk3399-sapphire-excavator.dts:          edp_out: port@1 {
rk3399-sapphire-excavator.dts:                  edp_out_panel: endpoint@0 {

edp_out最基础的定义是在rk3399.dtsi中提供的,这应该是瑞芯微官方的定义。提供视频输出的单板对这个定义进行扩展。

@ophub
Copy link
Owner

ophub commented May 29, 2024

这2个文件我都放了。报错的这段代码,在仓库的其他文件里没有找到相同的信息。

@eagle-lk
Copy link
Author

这2个文件我都放了。报错的这段代码,在仓库的其他文件里没有找到相同的信息。

rk3399.dtsi是瑞芯微提供的,应该也在同一个目录下。edp_out是在rk3399.dtsi中定义的,gc18-108只是引用了一下。其他我也想不到什么可以修改的地方了。

@nqhdanny
Copy link

  • GC18-108-RK3399-V2.0

通过您给的链接,找到了赵启大侠两年前提交的一份dts文件,稍微修改了一下,编译出一个可用的版本,现在usb可以挂载u盘了! rk3399-gc18-108.zip

大侠上传的dts文件可以共享下嘛? 我再研究研究 :)

@nqhdanny
Copy link

rk3399-gc18-108.zip

@eagle-lk 你修改好的可以dts分享吗?

你分享的这个dtb可以使用的话,可以使用tn3399的uboot打包试试

你好 我正在尝试用 Android DTB 反编译出来的DTS 重新生成 Armbian可用的DTS,还差好多知识要学习,
想问下目前 Armbian有没有最基础的RK3399可用的DTS文件? 我在这个基础上进行编辑移植, 一个一个接口来尝试
我有下载过源码但是编译后直接无法启动, DTB里面有一些这个板子没有的设备就卡死了
看看是否有个纯净版的 支持RK3399的版本? 谢谢

@ophub
Copy link
Owner

ophub commented Aug 15, 2024

@eagle-lk
Copy link
Author

rk3399-gc18-108.zip
@eagle-lk 你修改好的可以dts分享吗?
你分享的这个dtb可以使用的话,可以使用tn3399的uboot打包试试

你好 我正在尝试用 Android DTB 反编译出来的DTS 重新生成 Armbian可用的DTS,还差好多知识要学习, 想问下目前 Armbian有没有最基础的RK3399可用的DTS文件? 我在这个基础上进行编辑移植, 一个一个接口来尝试 我有下载过源码但是编译后直接无法启动, DTB里面有一些这个板子没有的设备就卡死了 看看是否有个纯净版的 支持RK3399的版本? 谢谢

抱歉刚注意到你的问题。我也注意到ophub大侠给你指出了明路。我也建议不要从最基本的开始,因为缺失太多,非到精通很难完整的添加。最好的方法还是尽量找一个最接近的,然后尽可能的少量修改,使其可以工作。如果你有几种不同的板子,对照学习效果更好。
我分享的dtb已经可以让这块板子工作在6.6.48内核,24.08 noble版,感觉还是相当不错的。 @ophub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants