Skip to contentSkip to conversation

arm64: dts: rockchip: Enable the NPU on ODROID-M2

PATCH Applied Youngwon Son 2 participants 2 messages Oct 4

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: rockchip: Enable the NPU on ODROID-M2

Enable the NPU cores and their IOMMUs on the ODROID-M2 and wire up the vdd_npu_s0 regulator.

As the regulator is now controlled through the NPU power domain, remove regulator-always-on. regulator-boot-on is not needed either, since the RK8602 state can be read back.

Tested with the rocket driver and Mesa Teflon (MobileNet V1).

---
 .../boot/dts/rockchip/rk3588s-odroid-m2.dts   | 36 +++++++++++++++++--
 1 file changed, 34 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3588s-odroid-m2.dts +34 -2
index 4e98fa3349..ea4d86a588 100644
@@ -320,8 +320,6 @@ vdd_npu_s0: regulator@42 {
 		reg = <0x42>;
 		fcs,suspend-voltage-selector = <1>;
 		regulator-name = "vdd_npu_s0";
-		regulator-always-on;
-		regulator-boot-on;
 		regulator-min-microvolt = <550000>;
 		regulator-max-microvolt = <950000>;
 		regulator-ramp-delay = <2300>;
@@ -441,6 +439,10 @@ &pd_gpu {
 	domain-supply = <&vdd_gpu_s0>;
 };
 
+&pd_npu {
+	domain-supply = <&vdd_npu_s0>;
+};
+
 &pinctrl {
 	hdmi {
 		hdmi0_tx_on_h: hdmi0-tx-on-h {
@@ -514,6 +516,36 @@ &pwm0 {
 	status = "okay";
 };
 
+&rknn_core_0 {
+	npu-supply = <&vdd_npu_s0>;
+	sram-supply = <&vdd_npu_s0>;
+	status = "okay";
+};
+
+&rknn_core_1 {
+	npu-supply = <&vdd_npu_s0>;
+	sram-supply = <&vdd_npu_s0>;
+	status = "okay";
+};
+
+&rknn_core_2 {
+	npu-supply = <&vdd_npu_s0>;
+	sram-supply = <&vdd_npu_s0>;
+	status = "okay";
+};
+
+&rknn_mmu_0 {
+	status = "okay";
+};
+
+&rknn_mmu_1 {
+	status = "okay";
+};
+
+&rknn_mmu_2 {
+	status = "okay";
+};
+
 &saradc {
 	vref-supply = <&vcca_1v8_s0>;
 	status = "okay";
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 8 lines · Youngwon Son

Enable the NPU cores and their IOMMUs on the ODROID-M2 and wire up the vdd_npu_s0 regulator.

As the regulator is now controlled through the NPU power domain, remove regulator-always-on. regulator-boot-on is not needed either, since the RK8602 state can be read back.

[...]

Applied, thanks!

[1/1] arm64: dts: rockchip: Enable the NPU on ODROID-M2

      commit: bda971ceb9aa263512b46a785abc9218d3e08d17

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>