Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "RockpiN10/dev/NPU-booting"

< RockpiN10‎ | dev
(Created page with "{{rockpiN10_header}} {{Languages|rockpiN10/dev/NPU-booting}} ROCK Pi N10 > Development > rockpiN10/dev/NPU-booting | NPU Booting Pr...")
 
(FAQs)
 
(3 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
RK3399Pro is made of two blocks, RK3399 and the NPU. The RK3399, running Linux or Android is the host, and the NPU running Linux is the device.
 
RK3399Pro is made of two blocks, RK3399 and the NPU. The RK3399, running Linux or Android is the host, and the NPU running Linux is the device.
 
The host controls the power of NPU and the NPU firmware updating. Firmware updating is via USB2.0 and the model data transfer between host/device via USB 3.0.
 
The host controls the power of NPU and the NPU firmware updating. Firmware updating is via USB2.0 and the model data transfer between host/device via USB 3.0.
 +
 +
[[File:Rk3399pro-host-npu-block.png]]
  
 
== NPU tools and utilities ==
 
== NPU tools and utilities ==
 
=== Boot Service ===
 
=== Boot Service ===
The npu_upgrade service, powering the NPU and NPU firmware upgrading:
+
The rockchip-npu service, powering the NPU and NPU firmware upgrading:
  
<syntaxhighlight lang="bash">
+
Check file /etc/init.d/npuservice.
  
 +
<syntaxhighlight lang="bash">
  
root@linaro-alip:~# cat /etc/init.d/rockchip.sh function update_npu_fw() {
+
root@rockpin10:~# /etc/init.d/npuservice start
/usr/bin/npu-image.sh
+
sleep 1 /usr/bin/npu_transfer_proxy&
+
}
+
root@linaro-alip:~# cat /usr/bin/npu-image.sh
+
npu_upgrade MiniLoaderAll.bin uboot.img trust.img boot.img
+
  
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 67: Line 65:
 
Bus 004 Device 003: ID 2207:1808
 
Bus 004 Device 003: ID 2207:1808
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=== FAQs ===

Latest revision as of 02:32, 6 August 2020

    ROCK Pi N10 >  Development >  NPU Booting Process

Introduction

RK3399Pro is made of two blocks, RK3399 and the NPU. The RK3399, running Linux or Android is the host, and the NPU running Linux is the device. The host controls the power of NPU and the NPU firmware updating. Firmware updating is via USB2.0 and the model data transfer between host/device via USB 3.0.

Rk3399pro-host-npu-block.png

NPU tools and utilities

Boot Service

The rockchip-npu service, powering the NPU and NPU firmware upgrading:

Check file /etc/init.d/npuservice.

root@rockpin10:~# /etc/init.d/npuservice start

Powering Control

npu_powerctrl is the binary utility to control the NPU power by toggle the GPIO of NPU power.

   /usr/bin/npu_powerctrl -i
   /usr/bin/npu_powerctrl -o

If the NPU power is on, on the host side, the USB device(ID: 180a) will be detected, NPU is in maskrom mode.

   [ 4.437235] usb 3-1: New USB device found, idVendor=2207, idProduct=180a
root@linaro-alip:~# npu_powerctrl Usage:npu_powerctrl [-s] [-r] [-o] [-i] [-d]
-s -r -o -i
npu enter sleep wakup npu
power up or reset npu gpio init

Firmware upgrading

npu_upgrade is the tool for downloading the firmware to NPU ram.

   NPU firmware path: DIR="/usr/share/npu_fw"
   Tool path: UPGRADE_TOOL=/usr/bin/upgrade_tool

After firmware finish downloading, the NPU will boot automatically.

NPU troubleshooting

1. NPU sleep and USB enumerating

On the host:

   [ 14.265132] usb 4-1: New USB device found, idVendor=2207, idProduct=1808

Check the device status and wake up manually

root@linaro-alip:~# npu_powerctrl -s     # Manually sleep npu 
root@linaro-alip:~# lsusb       # No USB device if the npu is sleep 
root@linaro-alip:~# npu_powerctrl -r  # Manually wakeup npu 
root@linaro-alip:~# lsusb
Bus 004 Device 003: ID 2207:1808

FAQs