riscv: dts: spacemit: Add hdmi and gpu nodes 24/316924/2
authorMichal Wilczynski <m.wilczynski@samsung.com>
Wed, 28 Aug 2024 08:19:57 +0000 (10:19 +0200)
committerMichal Wilczynski <m.wilczynski@samsung.com>
Fri, 30 Aug 2024 16:07:24 +0000 (18:07 +0200)
In order for the gpu and hdmi to work the device tree nodes need to be
added and enabled. Port them from the vendor kernel [1].

[1] - https://github.com/BPI-SINOVOIP/pi-linux.git

Change-Id: Ib6ec18e7781543446d1d8e3c3d6d1bfaf07eae25
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
arch/riscv/boot/dts/spacemit/k1.dtsi

index d1a54d28bc52ca01519e83da7edf96ea89a4c8d6..47409cb1e6d5e9dd9a7df4100dddc0abb46d9f50 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "k1.dtsi"
 #include "k1-x_pinctrl.dtsi"
+#include "k1-x-hdmi.dtsi"
 
 / {
        model = "Banana Pi BPI-F3";
        status = "okay";
 };
 
+&dpu_online2_hdmi {
+       memory-region = <&dpu_resv>;
+       status = "okay";
+};
+
+&hdmi{
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_hdmi_0>;
+       status = "okay";
+};
+
 &i2c2 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c2_0>;
        spacemit,sdh-freq = <375000000>;
        status = "okay";
 };
+
+&imggpu {
+       status = "okay";
+};
index 30b3cec7da82bc548ddd46dfcdc61fe1726ef72b..17bc7f6fca1c446de26f2fb3119018ae4fd51926 100644 (file)
@@ -8,6 +8,7 @@
 #include <dt-bindings/clock/spacemit-k1x-clock.h>
 #include <dt-bindings/dma/k1x-dmac.h>
 #include <dt-bindings/pmu/k1x_pmu.h>
+#include <dt-bindings/display/spacemit-dpu.h>
 
 /dts-v1/;
 / {
                };
        };
 
-       soc {
+       soc: soc {
                compatible = "simple-bus";
                interrupt-parent = <&plic>;
                #address-cells = <2>;
                        status = "ok";
                };
 
+               hdmi_adma: adma@C0883800 {
+                       compatible = "spacemit,k1x-adma";
+                       reg = <0x0 0xc0883800 0x0 0x100>,
+                               <0x0 0xc0882050 0x0 0x4>,
+                               <0x0 0xc08d0000 0x0 0x400>;
+                       reg-names = "adma_reg", "ctrl_reg", "buf_addr";
+                       #dma-cells = <0>;
+                       hdmi-sample;
+                       status = "ok";
+               };
+
                 i2c2: i2c@d4012000 {
                         compatible = "spacemit,k1x-i2c";
                         spacemit,adapter-id = <2>;
                        status = "disabled";
                };
 
+               imggpu: imggpu@cac00000 {
+                       compatible = "img,rgx";
+                       interrupt-names = "rgxirq";
+                       interrupt-parent = <&plic>;
+                       interrupts = <75>;
+                       reg = <0x0 0xcac00000 0x0 0x100000>;
+                       reg-names = "rgxregs";
+                       clocks = <&ccu CLK_GPU>;
+                       clock-names = "gpu_clk";
+                       resets = <&reset RESET_GPU>;
+                       power-domains = <&power K1X_PMU_GPU_PWR_DOMAIN>;
+                       interconnects = <&dram_range1>;
+                       interconnect-names = "dma-mem";
+                       status = "ok";
+               };
        };
 };