rockchip-linux / rkdeveloptool

GNU General Public License v2.0
159 stars 91 forks source link

RK3399 Support? #32

Open ClarenceYk opened 5 years ago

ClarenceYk commented 5 years ago

Command lsusb shows the following message:

Bus 003 Device 006: ID 2207:0011

But when I try rkdeveloptool with argument ld to show USB devices, it comes:

not found any devices!

Then I checked the source code of rkdeveloptool, I found this:

typedef enum{
    RKNONE_DEVICE = 0,
    RK27_DEVICE = 0x10,
    RKCAYMAN_DEVICE,
    RK28_DEVICE = 0x20,
    RK281X_DEVICE,
    RKPANDA_DEVICE,
    RKNANO_DEVICE = 0x30,
    RKSMART_DEVICE,
    RKCROWN_DEVICE = 0x40,
    RK29_DEVICE = 0x50,
    RK292X_DEVICE,
    RK30_DEVICE = 0x60,
    RK30B_DEVICE,
    RK31_DEVICE = 0x70,
    RK32_DEVICE = 0x80
} ENUM_RKDEVICE_TYPE;

Seems that rkdeveloptool doesn't support RK3399 yet. And how do I make rkdeveloptool working for RK3399?

julienchauveau commented 5 years ago

Hello,

rkdeveloptool does support RK3399 but you have to get into Maskrom mode or Rockusb mode, as specified in the Rockchip Wiki: http://opensource.rock-chips.com/wiki_Rockusb

You have to press Recovery button (or Volume +) while powering up your device.

If you have installed Android Developer Tools, you can also enter this command:

adb reboot loader
ClarenceYk commented 5 years ago

Thanks for your comment.

I followed the instructions in this document https://www.96boards.org/documentation/consumer/rock/installation/linux-mac-rkdeveloptool.md.html

It says that in order to get into Maskrom mode, you need:

  • power on rock960
  • plug the rock960 to Linux desktop with USB type A to type C cable
  • press and hold the maskrom key, then short press reset key
  • release mask rom key(important!)

And I have done all these instructions many times, I'm sure my board is in Maskrom mode but still can't figure out where the problem is.

julienchauveau commented 5 years ago

I don't have a Rock960, but I get USB ID 2207:330C in Maskrom mode with the Rock Pi 4, and that works fine.

$ lsusb
Bus 020 Device 062: ID 2207:330c Fuzhou Rockchip Electronics Co., Ltd. USB download gadget

$ rkdeveloptool ld
DevNo=1 Vid=0x2207,Pid=0x330c,LocationID=1404   Loader

For the Rock960, check out page 21 on this document: http://openaccess.uoc.edu/webapps/o2/bitstream/10609/90746/1/aruiz23TFC0119.pdf

VID/PID in Maskrom mode is also 2207:330C for the Rock960.

I think 2207:0011 is wrong on the Wiki.

ClarenceYk commented 5 years ago

At the bottom of page 21:

ID may be slightly different.

It may not be the main problem.

ClarenceYk commented 5 years ago

I added some code:

config.emDeviceType = RKNONE_DEVICE;
config.usPid = 0x0011;
config.usVid = 0x2207;
m_deviceConfigSet.push_back(config);

in this function and rebuilt the project then rkdeveloptool ld works! It shows:

DevNo=1 Vid=0x2207,Pid=0x11,LocationID=30b    Maskrom

but other arguments like rd still not work fine. Information like

creating comm object failed!

being showed in the terminal.

novumdun commented 5 years ago

Same question!!

julienchauveau commented 5 years ago

I'm pretty sure you need to get USB ID 2207:330C in maskrom mode.

You may be too quick to release the maskrom button. Try to wait a few seconds after releasing the reset button.

This could also be useful if you can get the logs from the serial console.

ClarenceYk commented 5 years ago

I tried many times with different methods including holding the maskrom button longer, but things seem not good.

Finally, I quit. I flashed the Ubuntu system image to a Mirco SD card and boot my board from that SD card.

Thanks for your time again!

PS: I'll try the Flashing to eMMC method later and I'll update this post if I have any progress.

lbdroid commented 5 years ago

There are two main hardware versions of Rock960. A/B (these are the same as each other, but the B is just slightly more refined), C (this one is the "cheap" downgrade, does not include eMMC, cheaper wifi, etc.)

I believe that there is a hardware defect in the "C" version. The USB-A port closest to the USB-C port NEVER shows any sign of life, even as a host port when the OS is booted, and regardless of the state of the "host / device" switch.

Its too bad that the vendor wasn't smart enough to wire up the USB ports correctly as per 96boards specification, which would have the device mode available on the USB-C port, and keep the A ports as host-ONLY instead of abusing one as a device port. Its hard to imagine what kind of drugs they must be on to think it is OK to wire the plugs that way???

Anyhow, the point is that Rock960-C is unlikely to ever work in markrom mode unless they offer an updated revision with the hardware fixed. Loading OS must be done using the sdcard images (labeled inappropriately as "gpt", which has nothing to do with eMMC vs sd).

keveryang commented 5 years ago

All RK3399 share the same rockusb ID, which is 2207:330C, and rkdeveloptool only work correct with this ID on RK3399,

mightymos commented 2 years ago

I've only been able to get the Windows gui tools working for RK3399 available from Radxa: https://wiki.radxa.com/Rock3/install/rockchip-flash-tools https://dl.radxa.com/tools/