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

RockpiN10/dev/NPU-booting

< RockpiN10‎ | dev
    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