Difference between revisions of "RockpiN10/dev/NPU-booting"
(→Boot Service) |
|||
Line 14: | Line 14: | ||
== NPU tools and utilities == | == NPU tools and utilities == | ||
=== Boot Service === | === Boot Service === | ||
− | The | + | The rockchip-npu service, powering the NPU and NPU firmware upgrading: |
− | + | Check file /etc/init.d/npuservice. | |
+ | <syntaxhighlight lang="bash"> | ||
− | root@ | + | root@rockpin10:~# /etc/init.d/npuservice start |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 05:11, 30 May 2020
ROCK Pi N10 > Development > NPU Booting Process
Contents
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.
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