* [PATCH v4 0/7] Support for the NPU in Vim3
@ 2022-12-01 9:21 Tomeu Vizoso
2022-12-01 9:21 ` [PATCH v4 1/7] dt-bindings: reset: meson-g12a: Add missing NNA reset Tomeu Vizoso
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tomeu Vizoso @ 2022-12-01 9:21 UTC (permalink / raw)
Cc: italonicola, Tomeu Vizoso, Christian Gmeiner, Daniel Vetter,
David Airlie,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:DRM DRIVERS FOR VIVANTE GPU IP,
moderated list:DRM DRIVERS FOR VIVANTE GPU IP, Jerome Brunet,
Kevin Hilman, Krzysztof Kozlowski,
open list:ARM/Amlogic Meson SoC support,
moderated list:ARM/Amlogic Meson SoC support, open list,
Lucas Stach, Martin Blumenstingl, Neil Armstrong, Philipp Zabel,
Rob Herring, Russell King
Hi,
This series adds support for the Verisilicon VIPNano-QI NPU in the A311D
as in the VIM3 board.
The IP is very closely based on previous Vivante GPUs, so the etnaviv
kernel driver works basically unchanged.
The userspace part of the driver is being reviewed at:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18986
v2: Move reference to RESET_NNA to npu node (Neil)
v3: Fix indentation mistake (Neil)
v4: Add warning when etnaviv probes on a NPU
Regards,
Tomeu
Tomeu Vizoso (7):
dt-bindings: reset: meson-g12a: Add missing NNA reset
dt-bindings: power: Add G12A NNA power domain
soc: amlogic: meson-pwrc: Add NNA power domain for A311D
arm64: dts: Add DT node for the VIPNano-QI on the A311D
drm/etnaviv: add HWDB entry for VIPNano-QI.7120.0055
drm/etnaviv: Add nn_core_count to chip feature struct
drm/etnaviv: Warn when probing on NPUs
.../boot/dts/amlogic/meson-g12-common.dtsi | 11 ++++++
.../amlogic/meson-g12b-a311d-khadas-vim3.dts | 4 +++
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 +++
drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 3 ++
drivers/gpu/drm/etnaviv/etnaviv_hwdb.c | 36 +++++++++++++++++++
drivers/soc/amlogic/meson-ee-pwrc.c | 17 +++++++++
include/dt-bindings/power/meson-g12a-power.h | 1 +
.../reset/amlogic,meson-g12a-reset.h | 4 ++-
8 files changed, 79 insertions(+), 1 deletion(-)
--
2.38.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v4 1/7] dt-bindings: reset: meson-g12a: Add missing NNA reset
2022-12-01 9:21 [PATCH v4 0/7] Support for the NPU in Vim3 Tomeu Vizoso
@ 2022-12-01 9:21 ` Tomeu Vizoso
2022-12-01 9:21 ` [PATCH v4 2/7] dt-bindings: power: Add G12A NNA power domain Tomeu Vizoso
2022-12-01 9:21 ` [PATCH v4 4/7] arm64: dts: Add DT node for the VIPNano-QI on the A311D Tomeu Vizoso
2 siblings, 0 replies; 4+ messages in thread
From: Tomeu Vizoso @ 2022-12-01 9:21 UTC (permalink / raw)
Cc: italonicola, Tomeu Vizoso, Neil Armstrong, Philipp Zabel,
Rob Herring, Krzysztof Kozlowski, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:ARM/Amlogic Meson SoC support,
open list:ARM/Amlogic Meson SoC support, open list
Doesn't appear in the TRM I have, but it is used by the downstream
galcore driver.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
---
include/dt-bindings/reset/amlogic,meson-g12a-reset.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/dt-bindings/reset/amlogic,meson-g12a-reset.h b/include/dt-bindings/reset/amlogic,meson-g12a-reset.h
index 6d487c5eba2c..45f6b8a951d0 100644
--- a/include/dt-bindings/reset/amlogic,meson-g12a-reset.h
+++ b/include/dt-bindings/reset/amlogic,meson-g12a-reset.h
@@ -69,7 +69,9 @@
#define RESET_PARSER_FETCH 72
#define RESET_CTL 73
#define RESET_PARSER_TOP 74
-/* 75-77 */
+/* 75 */
+#define RESET_NNA 76
+/* 77 */
#define RESET_DVALIN 78
#define RESET_HDMITX 79
/* 80-95 */
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v4 2/7] dt-bindings: power: Add G12A NNA power domain
2022-12-01 9:21 [PATCH v4 0/7] Support for the NPU in Vim3 Tomeu Vizoso
2022-12-01 9:21 ` [PATCH v4 1/7] dt-bindings: reset: meson-g12a: Add missing NNA reset Tomeu Vizoso
@ 2022-12-01 9:21 ` Tomeu Vizoso
2022-12-01 9:21 ` [PATCH v4 4/7] arm64: dts: Add DT node for the VIPNano-QI on the A311D Tomeu Vizoso
2 siblings, 0 replies; 4+ messages in thread
From: Tomeu Vizoso @ 2022-12-01 9:21 UTC (permalink / raw)
Cc: italonicola, Tomeu Vizoso, Neil Armstrong, Rob Herring,
Krzysztof Kozlowski, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:ARM/Amlogic Meson SoC support,
open list:ARM/Amlogic Meson SoC support, open list
Add define for the NNA power domain for the NPU in the G12A.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
---
include/dt-bindings/power/meson-g12a-power.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/dt-bindings/power/meson-g12a-power.h b/include/dt-bindings/power/meson-g12a-power.h
index bb5e67a842de..93b03bdd60b7 100644
--- a/include/dt-bindings/power/meson-g12a-power.h
+++ b/include/dt-bindings/power/meson-g12a-power.h
@@ -9,5 +9,6 @@
#define PWRC_G12A_VPU_ID 0
#define PWRC_G12A_ETH_ID 1
+#define PWRC_G12A_NNA_ID 2
#endif
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v4 4/7] arm64: dts: Add DT node for the VIPNano-QI on the A311D
2022-12-01 9:21 [PATCH v4 0/7] Support for the NPU in Vim3 Tomeu Vizoso
2022-12-01 9:21 ` [PATCH v4 1/7] dt-bindings: reset: meson-g12a: Add missing NNA reset Tomeu Vizoso
2022-12-01 9:21 ` [PATCH v4 2/7] dt-bindings: power: Add G12A NNA power domain Tomeu Vizoso
@ 2022-12-01 9:21 ` Tomeu Vizoso
2 siblings, 0 replies; 4+ messages in thread
From: Tomeu Vizoso @ 2022-12-01 9:21 UTC (permalink / raw)
Cc: italonicola, Tomeu Vizoso, Neil Armstrong, Rob Herring,
Krzysztof Kozlowski, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:ARM/Amlogic Meson SoC support,
open list:ARM/Amlogic Meson SoC support, open list
This "NPU" is very similar to the Vivante GPUs and Etnaviv works well
with it with just a few small changes.
v2: Add reference to RESET_NNA (Neil)
v3: Fix indentation (Neil)
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
---
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 11 +++++++++++
.../boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts | 4 ++++
2 files changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index 45947c1031c4..61c8461df614 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -11,6 +11,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/reset/amlogic,meson-g12a-reset.h>
#include <dt-bindings/thermal/thermal.h>
+#include <dt-bindings/power/meson-g12a-power.h>
/ {
interrupt-parent = <&gic>;
@@ -2484,4 +2485,14 @@ xtal: xtal-clk {
#clock-cells = <0>;
};
+ npu: npu@ff100000 {
+ compatible = "vivante,gc";
+ reg = <0x0 0xff100000 0x0 0x20000>;
+ interrupts = <0 147 4>;
+ clocks = <&clkc CLKID_NNA_CORE_CLK>,
+ <&clkc CLKID_NNA_AXI_CLK>;
+ clock-names = "core", "bus";
+ resets = <&reset RESET_NNA>;
+ power-domains = <&pwrc PWRC_G12A_NNA_ID>;
+ };
};
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts
index 124a80901084..73f3d87dcefd 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts
@@ -15,6 +15,10 @@ / {
compatible = "khadas,vim3", "amlogic,a311d", "amlogic,g12b";
};
+&npu {
+ status = "okay";
+};
+
/*
* The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential
* lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-01 9:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-01 9:21 [PATCH v4 0/7] Support for the NPU in Vim3 Tomeu Vizoso
2022-12-01 9:21 ` [PATCH v4 1/7] dt-bindings: reset: meson-g12a: Add missing NNA reset Tomeu Vizoso
2022-12-01 9:21 ` [PATCH v4 2/7] dt-bindings: power: Add G12A NNA power domain Tomeu Vizoso
2022-12-01 9:21 ` [PATCH v4 4/7] arm64: dts: Add DT node for the VIPNano-QI on the A311D Tomeu Vizoso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).