1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2c9ccf3a3SEmmanuel Vadot 3c9ccf3a3SEmmanuel Vadot%YAML 1.2 4c9ccf3a3SEmmanuel Vadot--- 5c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/media/amphion,vpu.yaml# 6c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 7c9ccf3a3SEmmanuel Vadot 8c9ccf3a3SEmmanuel Vadottitle: Amphion VPU codec IP 9c9ccf3a3SEmmanuel Vadot 10c9ccf3a3SEmmanuel Vadotmaintainers: 11c9ccf3a3SEmmanuel Vadot - Ming Qian <ming.qian@nxp.com> 12c9ccf3a3SEmmanuel Vadot - Shijie Qin <shijie.qin@nxp.com> 13c9ccf3a3SEmmanuel Vadot 14c9ccf3a3SEmmanuel Vadotdescription: |- 15c9ccf3a3SEmmanuel Vadot The Amphion MXC video encoder(Windsor) and decoder(Malone) accelerators present 16c9ccf3a3SEmmanuel Vadot on NXP i.MX8Q SoCs. 17c9ccf3a3SEmmanuel Vadot 18c9ccf3a3SEmmanuel Vadotproperties: 19c9ccf3a3SEmmanuel Vadot $nodename: 20c9ccf3a3SEmmanuel Vadot pattern: "^vpu@[0-9a-f]+$" 21c9ccf3a3SEmmanuel Vadot 22c9ccf3a3SEmmanuel Vadot compatible: 23c9ccf3a3SEmmanuel Vadot items: 24c9ccf3a3SEmmanuel Vadot - enum: 25c9ccf3a3SEmmanuel Vadot - nxp,imx8qm-vpu 26c9ccf3a3SEmmanuel Vadot - nxp,imx8qxp-vpu 27c9ccf3a3SEmmanuel Vadot 28c9ccf3a3SEmmanuel Vadot reg: 29c9ccf3a3SEmmanuel Vadot maxItems: 1 30c9ccf3a3SEmmanuel Vadot 31c9ccf3a3SEmmanuel Vadot power-domains: 32c9ccf3a3SEmmanuel Vadot maxItems: 1 33c9ccf3a3SEmmanuel Vadot 34c9ccf3a3SEmmanuel Vadot "#address-cells": 35c9ccf3a3SEmmanuel Vadot const: 1 36c9ccf3a3SEmmanuel Vadot 37c9ccf3a3SEmmanuel Vadot "#size-cells": 38c9ccf3a3SEmmanuel Vadot const: 1 39c9ccf3a3SEmmanuel Vadot 40c9ccf3a3SEmmanuel Vadot ranges: true 41c9ccf3a3SEmmanuel Vadot 42c9ccf3a3SEmmanuel VadotpatternProperties: 43c9ccf3a3SEmmanuel Vadot "^mailbox@[0-9a-f]+$": 44c9ccf3a3SEmmanuel Vadot description: 45c9ccf3a3SEmmanuel Vadot Each vpu encoder or decoder correspond a MU, which used for communication 46c9ccf3a3SEmmanuel Vadot between driver and firmware. Implement via mailbox on driver. 47c9ccf3a3SEmmanuel Vadot $ref: ../mailbox/fsl,mu.yaml# 48c9ccf3a3SEmmanuel Vadot 49c9ccf3a3SEmmanuel Vadot 50*aa1a8ff2SEmmanuel Vadot "^vpu-core@[0-9a-f]+$": 51c9ccf3a3SEmmanuel Vadot description: 52c9ccf3a3SEmmanuel Vadot Each core correspond a decoder or encoder, need to configure them 53c9ccf3a3SEmmanuel Vadot separately. NXP i.MX8QM SoC has one decoder and two encoder, i.MX8QXP SoC 54c9ccf3a3SEmmanuel Vadot has one decoder and one encoder. 55c9ccf3a3SEmmanuel Vadot type: object 56c9ccf3a3SEmmanuel Vadot 57c9ccf3a3SEmmanuel Vadot properties: 58c9ccf3a3SEmmanuel Vadot compatible: 59c9ccf3a3SEmmanuel Vadot items: 60c9ccf3a3SEmmanuel Vadot - enum: 61c9ccf3a3SEmmanuel Vadot - nxp,imx8q-vpu-decoder 62c9ccf3a3SEmmanuel Vadot - nxp,imx8q-vpu-encoder 63c9ccf3a3SEmmanuel Vadot 64c9ccf3a3SEmmanuel Vadot reg: 65c9ccf3a3SEmmanuel Vadot maxItems: 1 66c9ccf3a3SEmmanuel Vadot 67c9ccf3a3SEmmanuel Vadot power-domains: 68c9ccf3a3SEmmanuel Vadot maxItems: 1 69c9ccf3a3SEmmanuel Vadot 70c9ccf3a3SEmmanuel Vadot mbox-names: 71c9ccf3a3SEmmanuel Vadot items: 72c9ccf3a3SEmmanuel Vadot - const: tx0 73c9ccf3a3SEmmanuel Vadot - const: tx1 74c9ccf3a3SEmmanuel Vadot - const: rx 75c9ccf3a3SEmmanuel Vadot 76c9ccf3a3SEmmanuel Vadot mboxes: 77c9ccf3a3SEmmanuel Vadot description: 78c9ccf3a3SEmmanuel Vadot List of phandle of 2 MU channels for tx, 1 MU channel for rx. 79c9ccf3a3SEmmanuel Vadot maxItems: 3 80c9ccf3a3SEmmanuel Vadot 81c9ccf3a3SEmmanuel Vadot memory-region: 82c9ccf3a3SEmmanuel Vadot description: 83c9ccf3a3SEmmanuel Vadot Phandle to the reserved memory nodes to be associated with the 84c9ccf3a3SEmmanuel Vadot remoteproc device. The reserved memory nodes should be carveout nodes, 85c9ccf3a3SEmmanuel Vadot and should be defined as per the bindings in 86c9ccf3a3SEmmanuel Vadot Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt 87c9ccf3a3SEmmanuel Vadot items: 88c9ccf3a3SEmmanuel Vadot - description: region reserved for firmware image sections. 89c9ccf3a3SEmmanuel Vadot - description: region used for RPC shared memory between firmware and 90c9ccf3a3SEmmanuel Vadot driver. 91c9ccf3a3SEmmanuel Vadot 92c9ccf3a3SEmmanuel Vadot required: 93c9ccf3a3SEmmanuel Vadot - compatible 94c9ccf3a3SEmmanuel Vadot - reg 95c9ccf3a3SEmmanuel Vadot - power-domains 96c9ccf3a3SEmmanuel Vadot - mbox-names 97c9ccf3a3SEmmanuel Vadot - mboxes 98c9ccf3a3SEmmanuel Vadot - memory-region 99c9ccf3a3SEmmanuel Vadot 100c9ccf3a3SEmmanuel Vadot additionalProperties: false 101c9ccf3a3SEmmanuel Vadot 102c9ccf3a3SEmmanuel Vadotrequired: 103c9ccf3a3SEmmanuel Vadot - compatible 104c9ccf3a3SEmmanuel Vadot - reg 105c9ccf3a3SEmmanuel Vadot - power-domains 106c9ccf3a3SEmmanuel Vadot 107c9ccf3a3SEmmanuel VadotadditionalProperties: false 108c9ccf3a3SEmmanuel Vadot 109c9ccf3a3SEmmanuel Vadotexamples: 110c9ccf3a3SEmmanuel Vadot # Device node example for i.MX8QM platform: 111c9ccf3a3SEmmanuel Vadot - | 112c9ccf3a3SEmmanuel Vadot #include <dt-bindings/firmware/imx/rsrc.h> 113c9ccf3a3SEmmanuel Vadot 114c9ccf3a3SEmmanuel Vadot vpu: vpu@2c000000 { 115c9ccf3a3SEmmanuel Vadot compatible = "nxp,imx8qm-vpu"; 116c9ccf3a3SEmmanuel Vadot ranges = <0x2c000000 0x2c000000 0x2000000>; 117c9ccf3a3SEmmanuel Vadot reg = <0x2c000000 0x1000000>; 118c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 119c9ccf3a3SEmmanuel Vadot #size-cells = <1>; 120c9ccf3a3SEmmanuel Vadot power-domains = <&pd IMX_SC_R_VPU>; 121c9ccf3a3SEmmanuel Vadot 122c9ccf3a3SEmmanuel Vadot mu_m0: mailbox@2d000000 { 123c9ccf3a3SEmmanuel Vadot compatible = "fsl,imx6sx-mu"; 124c9ccf3a3SEmmanuel Vadot reg = <0x2d000000 0x20000>; 125c9ccf3a3SEmmanuel Vadot interrupts = <0 472 4>; 126c9ccf3a3SEmmanuel Vadot #mbox-cells = <2>; 127c9ccf3a3SEmmanuel Vadot power-domains = <&pd IMX_SC_R_VPU_MU_0>; 128c9ccf3a3SEmmanuel Vadot }; 129c9ccf3a3SEmmanuel Vadot 130c9ccf3a3SEmmanuel Vadot mu1_m0: mailbox@2d020000 { 131c9ccf3a3SEmmanuel Vadot compatible = "fsl,imx6sx-mu"; 132c9ccf3a3SEmmanuel Vadot reg = <0x2d020000 0x20000>; 133c9ccf3a3SEmmanuel Vadot interrupts = <0 473 4>; 134c9ccf3a3SEmmanuel Vadot #mbox-cells = <2>; 135c9ccf3a3SEmmanuel Vadot power-domains = <&pd IMX_SC_R_VPU_MU_1>; 136c9ccf3a3SEmmanuel Vadot }; 137c9ccf3a3SEmmanuel Vadot 138c9ccf3a3SEmmanuel Vadot mu2_m0: mailbox@2d040000 { 139c9ccf3a3SEmmanuel Vadot compatible = "fsl,imx6sx-mu"; 140c9ccf3a3SEmmanuel Vadot reg = <0x2d040000 0x20000>; 141c9ccf3a3SEmmanuel Vadot interrupts = <0 474 4>; 142c9ccf3a3SEmmanuel Vadot #mbox-cells = <2>; 143c9ccf3a3SEmmanuel Vadot power-domains = <&pd IMX_SC_R_VPU_MU_2>; 144c9ccf3a3SEmmanuel Vadot }; 145c9ccf3a3SEmmanuel Vadot 146*aa1a8ff2SEmmanuel Vadot vpu_core0: vpu-core@2d080000 { 147c9ccf3a3SEmmanuel Vadot compatible = "nxp,imx8q-vpu-decoder"; 148c9ccf3a3SEmmanuel Vadot reg = <0x2d080000 0x10000>; 149c9ccf3a3SEmmanuel Vadot power-domains = <&pd IMX_SC_R_VPU_DEC_0>; 150c9ccf3a3SEmmanuel Vadot mbox-names = "tx0", "tx1", "rx"; 151c9ccf3a3SEmmanuel Vadot mboxes = <&mu_m0 0 0>, 152c9ccf3a3SEmmanuel Vadot <&mu_m0 0 1>, 153c9ccf3a3SEmmanuel Vadot <&mu_m0 1 0>; 154c9ccf3a3SEmmanuel Vadot memory-region = <&decoder_boot>, <&decoder_rpc>; 155c9ccf3a3SEmmanuel Vadot }; 156c9ccf3a3SEmmanuel Vadot 157*aa1a8ff2SEmmanuel Vadot vpu_core1: vpu-core@2d090000 { 158c9ccf3a3SEmmanuel Vadot compatible = "nxp,imx8q-vpu-encoder"; 159c9ccf3a3SEmmanuel Vadot reg = <0x2d090000 0x10000>; 160c9ccf3a3SEmmanuel Vadot power-domains = <&pd IMX_SC_R_VPU_ENC_0>; 161c9ccf3a3SEmmanuel Vadot mbox-names = "tx0", "tx1", "rx"; 162c9ccf3a3SEmmanuel Vadot mboxes = <&mu1_m0 0 0>, 163c9ccf3a3SEmmanuel Vadot <&mu1_m0 0 1>, 164c9ccf3a3SEmmanuel Vadot <&mu1_m0 1 0>; 165c9ccf3a3SEmmanuel Vadot memory-region = <&encoder1_boot>, <&encoder1_rpc>; 166c9ccf3a3SEmmanuel Vadot }; 167c9ccf3a3SEmmanuel Vadot 168*aa1a8ff2SEmmanuel Vadot vpu_core2: vpu-core@2d0a0000 { 169c9ccf3a3SEmmanuel Vadot reg = <0x2d0a0000 0x10000>; 170c9ccf3a3SEmmanuel Vadot compatible = "nxp,imx8q-vpu-encoder"; 171c9ccf3a3SEmmanuel Vadot power-domains = <&pd IMX_SC_R_VPU_ENC_1>; 172c9ccf3a3SEmmanuel Vadot mbox-names = "tx0", "tx1", "rx"; 173c9ccf3a3SEmmanuel Vadot mboxes = <&mu2_m0 0 0>, 174c9ccf3a3SEmmanuel Vadot <&mu2_m0 0 1>, 175c9ccf3a3SEmmanuel Vadot <&mu2_m0 1 0>; 176c9ccf3a3SEmmanuel Vadot memory-region = <&encoder2_boot>, <&encoder2_rpc>; 177c9ccf3a3SEmmanuel Vadot }; 178c9ccf3a3SEmmanuel Vadot }; 179c9ccf3a3SEmmanuel Vadot 180c9ccf3a3SEmmanuel Vadot... 181