ARM: dts: msm: Adding base vm dt for kalama and support for rumi platform

Adding initial vm dt ,vm_dma_heaps dt for kalama and
support for rumi platform.

Change-Id: Id54bf931c2b777621fb8a5d9d8d7619d1e5b172b
This commit is contained in:
Ashish Bhimanpalliwar
2021-08-26 17:52:59 +05:30
parent a735108cb0
commit a154ddc24e
4 changed files with 261 additions and 0 deletions

View File

@@ -8,6 +8,8 @@
add-overlays = $(foreach o,$1,$(foreach b,$2,$(eval $(basename $b)-$(basename $o)-dtbs = $b $o) $(basename $b)-$(basename $o).dtb))
ifneq ($(CONFIG_ARCH_QTI_VM), y)
WAIPIO_BASE_DTB += waipio.dtb waipio-v2.dtb
WAIPIO_APQ_BASE_DTB += waipiop.dtb waipiop-v2.dtb
@@ -64,6 +66,14 @@ dtb-$(CONFIG_ARCH_CINDER) += cinder-rumi.dtb \
cinder-idp.dtb
endif
endif
ifeq ($(CONFIG_ARCH_KALAMA), y)
ifeq ($(CONFIG_ARCH_QTI_VM), y)
dtb-$(CONFIG_ARCH_QTI_VM) += kalama-vm-rumi.dtb
endif
endif
always-y := $(dtb-y)
subdir-y := $(dts-dirs)
clean-files := *.dtb *.dtbo

10
qcom/kalama-vm-rumi.dts Normal file
View File

@@ -0,0 +1,10 @@
/dts-v1/;
#include "kalama-vm.dtsi"
#include "kalama-vm-rumi.dtsi"
/ {
model = "Qualcomm Technologies, Inc. Kalama SVM RUMI";
compatible = "qcom,kalama-rumi", "qcom,kalama", "qcom,rumi";
qcom,board-id = <15 0>;
};

3
qcom/kalama-vm-rumi.dtsi Normal file
View File

@@ -0,0 +1,3 @@
&arch_timer {
clock-frequency = <500000>;
};

238
qcom/kalama-vm.dtsi Normal file
View File

@@ -0,0 +1,238 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/qcom,gcc-kalama.h>
#include <dt-bindings/clock/qcom,rpmh.h>
/ {
#address-cells = <0x2>;
#size-cells = <0x2>;
qcom,msm-id = <519 0x10000>;
interrupt-parent = <&vgic>;
qcom,mem-buf {
compatible = "qcom,mem-buf";
qcom,mem-buf-capabilities = "consumer";
qcom,vmid = <45>;
};
qcom,mem-buf-msgq {
compatible = "qcom,mem-buf-msgq";
};
chosen {
bootargs = "nokaslr log_buf_len=256K root=/dev/ram rw init=/init console=hvc0 loglevel=8";
};
cpus {
#address-cells = <0x2>;
#size-cells = <0x0>;
CPU0: cpu@0 {
compatible = "arm,armv8";
reg = <0x0 0x0>;
device_type = "cpu";
enable-method = "spin-table";
};
CPU1: cpu@100 {
compatible = "arm,armv8";
reg = <0x0 0x100>;
device_type = "cpu";
enable-method = "spin-table";
};
};
qrtr-gunyah {
compatible = "qcom,qrtr-gunyah";
gunyah-label = <3>;
};
qcom,vm-config {
compatible = "qcom,vm-1.0";
vm-type = "aarch64-guest";
boot-config = "fdt,unified";
os-type = "linux";
kernel-entry-segment = "kernel";
kernel-entry-offset = <0x0 0x0>;
vendor = "QTI";
image-name = "qcom,trustedvm";
qcom,pasid = <0x0 0x1c>;
iomemory-ranges = <0x0 0x92c000 0x0 0x92c000 0x0 0x4000 0x0
0x0 0xc400000 0x0 0xc400000 0x0 0x3000 0x1
0x0 0xc42d000 0x0 0xc42d000 0x0 0x4000 0x1
0x0 0xc440000 0x0 0xc440000 0x0 0x80000 0x1
0x0 0xc4c0000 0x0 0xc4c0000 0x0 0x10000 0x1
0x0 0xae8f000 0x0 0xae8f000 0x0 0x1000 0x0>;
gic-irq-ranges = <283 283>; /* PVM->SVM IRQ transfer */
memory {
#address-cells = <0x2>;
#size-cells = <0x0>;
base-address = <0x0 0xf4400000>;
size-min = <0x0 0x42f3000>; /* 66 MB */
};
segments {
ramdisk = <2>; /* 8MB */
};
vcpus {
config = "/cpus";
affinity = "static";
affinity-map = <0x5 0x6>;
sched-priority = <0>; /* relative to PVM */
sched-timeslice = <2000>; /* in ms */
};
interrupts {
config = &vgic;
};
vdevices {
generate = "/hypervisor";
rm-rpc {
vdevice-type = "rm-rpc";
generate = "/hypervisor/qcom,resource-mgr";
console-dev;
message-size = <0x000000f0>;
queue-depth = <0x00000008>;
qcom,label = <0x1>;
};
virtio-mmio@0 {
vdevice-type = "virtio-mmio";
generate = "/virtio-mmio";
peer-default;
vqs-num = <0x1>;
push-compatible = "virtio,mmio";
dma-coherent;
dma_base = <0x0 0x0>;
memory {
qcom,label = <0x11>;
#address-cells = <0x2>;
base = <0x0 0xFFEFC000>;
};
};
swiotlb-shm {
vdevice-type = "shm";
generate = "/swiotlb";
push-compatible = "swiotlb";
peer-default;
dma_base = <0x0 0x4000>;
memory {
qcom,label = <0x12>;
#address-cells = <0x2>;
base = <0x0 0xFFF00000>;
};
};
mem-buf-message-queue-pair {
vdevice-type = "message-queue-pair";
generate = "/hypervisor/membuf-msgq-pair";
message-size = <0x000000f0>;
queue-depth = <0x00000008>;
peer-default;
qcom,label = <0x0000001>;
};
display-message-queue-pair {
vdevice-type = "message-queue-pair";
generate = "/hypervisor/display-msgq-pair";
message-size = <0x000000f0>;
queue-depth = <0x00000008>;
peer-default;
qcom,label = <0x0000002>;
};
qrtr-shm {
vdevice-type = "shm-doorbell";
generate = "/hypervisor/qrtr-shm";
push-compatible = "qcom,qrtr-gunyah-gen";
peer-default;
memory {
qcom,label = <0x3>;
allocate-base;
};
};
gpiomem0 {
vdevice-type = "iomem";
patch = "/soc/tlmm-vm-mem-access";
push-compatible = "qcom,tlmm-vm-mem-access";
peer-default;
memory {
qcom,label = <0x8>;
qcom,mem-info-tag = <0x2>;
allocate-base;
};
};
};
};
firmware: firmware {
scm {
compatible = "qcom,scm";
};
};
soc: soc { };
};
&soc {
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0 0 0xffffffff>;
compatible = "simple-bus";
vm_tlmm_irq: vm-tlmm-irq@0 {
compatible = "qcom,tlmm-vm-irq";
reg = <0x0 0x0>;
interrupt-controller;
#interrupt-cells = <2>;
status = "disabled";
};
tlmm: pinctrl@f000000 {
compatible = "qcom,kalama-vm-pinctrl";
reg = <0x0F000000 0x1000000>;
interrupts-extended = <&vm_tlmm_irq 1 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
/* Valid pins */
gpios = /bits/ 16 <64 65 66 67 0 4 86 87>;
status = "disabled";
};
tlmm-vm-mem-access {
compatible = "qcom,tlmm-vm-mem-access";
tlmm-vm-gpio-list = <365 366 367 368 301 305 387 388>;
status = "disabled";
};
vgic: interrupt-controller@17100000 {
compatible = "arm,gic-v3";
interrupt-controller;
#interrupt-cells = <0x3>;
#redistributor-regions = <1>;
redistributor-stride = <0x0 0x40000>;
reg = <0x17100000 0x10000>, /* GICD */
<0x17180000 0x100000>; /* GICR * 8 */
};
arch_timer: timer {
compatible = "arm,armv8-timer";
always-on;
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 12 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
clock-frequency = <19200000>;
};
};