From 51f16c00884ffe4dadc72532b7b29d736d2d9e09 Mon Sep 17 00:00:00 2001 From: Murali Nalajala Date: Tue, 9 Jun 2020 11:55:40 -0700 Subject: [PATCH] dt-bindings: haven: Add bindings for qcom,haven-hypervisor-1.0 Add bindings for qcom,haven-hypervisor-1.0. Change-Id: I04d6e9d479755df2cb2464be03a746cef3145ad1 --- bindings/haven/qcom,hypervisor.yml | 177 +++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 bindings/haven/qcom,hypervisor.yml diff --git a/bindings/haven/qcom,hypervisor.yml b/bindings/haven/qcom,hypervisor.yml new file mode 100644 index 000000000000..973edf198a44 --- /dev/null +++ b/bindings/haven/qcom,hypervisor.yml @@ -0,0 +1,177 @@ +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/haven/qcom,hypervisor.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Hypervisor node to define virtual devices and other services. + +maintainers: + - Murali Nalajala + +description: |+ + Top-level node named /hypervisor that describes virtual devices and other + services. + +properties: + compatible: + oneOf: + items: + - const: qcom,haven-hypervisor-1.0 + - const: qcom,haven-hypervisor + + properties: + "#address-cells": + const: 2 + "#size-cells": + description: must be 0, because capability IDs are not memory address + ranges and do not have a size. + const: 0 + + +required: +- compatible +- "#address-cells" +- "#size-cells" + + +description: |+ + The VM Identification is a virtual node that conveys to the VM information + about itself in the context of the hypervisor-based system and may be + present as a child of the /hypervisor node + +properties: + compatible: + oneOf: + description: |+ + Must contain the VM-ID compatible string, which is provisionally + specified as "qcom,haven-vm-id". This should be preceded by + a string that specifies the VM ID API version, which is currently + 1.0, thus "qcom,haven-vm-id-1.0". + items: + - const: qcom,haven-vm-id-1.0 + - const: qcom,haven-vm-id + + properties: + qcom,vendor: + description: must contain the VM vendor string, for example: "Qualcomm". + $ref: /schemas/types.yaml#/definitions/string + + qcom,vmid: + $ref: /schemas/types.yaml#/definitions/uint32 + description: must contain the hypervisor VMID of the VM, as + a 32-bit value + + qcom,owner-vmid: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Contains the hypervisor VMID of the VM’s owner. The owner + is the VM that allocated and created the VM. VMs directly + managed by the resource manager, such as the HLOS do not + have an owner. + + qcom,image-name: + $ref: /schemas/types.yaml#/definitions/string + description: contains the VM image name string. + + qcom,swid: + $ref: /schemas/types.yaml#/definitions/uint32 + description: must contain the Qualcomm PIL software ID value. + +required: +- compatible +- qcom,vmid +- qcom,owner-vmid + + +description: |+ + Resource Manager node which is required to communicate to Resource + Manager VM using RM Message Queues. + +properties: + compatible: + oneOf: + description: + The resource manager RPC communicate link is required to be in the + device-tree of a VM at boot, without it, a VM may be unable to + communicate with the Resource Manager. Resource Manager VM can + support implementation of various versions i.e 1.0 or 2.0 + + items: + - const: qcom,resource-manager-1-0 + - const: qcom,resource-manager + - const: qcom,haven-message-queue + - const: qcom,haven-capability + + interrupts: + maxItems: 2 + + reg: + maxItems: 2 + + qcom,is-full-duplex: + $ref: /schemas/types.yaml#/definitions/flag + description: This node is a pair of message queues i.e. Tx and Rx + + qcom,tx-message-size: + $ref: /schemas/types.yaml#/definitions/uint32 + description: maximum message size in bytes, >= 240 bytes for RM IPC + + qcom,tx-queue-depth: + $ref: /schemas/types.yaml#/definitions/uint32 + description: depth(size) of transmit queue in hypervisor + + qcom,rx-message-size: + $ref: /schemas/types.yaml#/definitions/uint32 + description: maximum message size in bytes, >= 240 bytes for RM IPC + + qcom,rx-queue-depth: + $ref: /schemas/types.yaml#/definitions/uint32 + description: depth(size) of receive queue in hypervisor + + qcom,console-dev: + $ref: /schemas/types.yaml#/definitions/flag + description: if set, the resource-manger will accept console logs + from the VM + + qcom,free-irq-start: + $ref: /schemas/types.yaml#/definitions/uint32 + description: first VIRQ number which is free for virtual interrupt + use. Here SPI 0 = VIRQ 32. + +required: +- compatible +- interrupts +- reg +- qcom,is-full-duplex + +examples: + - | + hypervisor { + #address-cells = <2>; + #size-cells = <0>; + compatible = "qcom,haven-hypervisor-1.0", "qcom,haven-hypervisor", + "simple-bus"; + name = "hypervisor"; + + qcom,haven-vm { + compatible = "qcom,haven-vm-id-1.0", "qcom,haven-vm-id"; + qcom,vendor = "Qualcomm Technologies, Inc."; + qcom,vmid = <45>; + qcom,owner-vmid = <3>; + }; + + qcom,resource-manager-rpc@0000000000000001 { + compatible = "qcom,resource-manager-1-0", "qcom,resource-manager", + "qcom,haven-message-queue", "qcom,haven-capability"; + interrupts = , /* TX full IRQ */ + ; /* RX empty IRQ */ + reg = <0x00000000 0x00000000>, <0x00000000 0x00000001>; + /* TX, RX cap ids */ + qcom,is-full-duplex; + qcom,free-irq-start = <0>; + qcom,tx-queue-depth = <8>; + qcom,tx-message-size = <0xf0>; + qcom,rx-queue-depth = <8>; + qcom,rx-message-size = <0xf0>; + }; + }; +