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