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