1604bd5aeSNeil Armstrong# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2604bd5aeSNeil Armstrong# Copyright 2019 BayLibre, SAS 3604bd5aeSNeil Armstrong%YAML 1.2 4604bd5aeSNeil Armstrong--- 5604bd5aeSNeil Armstrong$id: "http://devicetree.org/schemas/media/amlogic,gx-vdec.yaml#" 6604bd5aeSNeil Armstrong$schema: "http://devicetree.org/meta-schemas/core.yaml#" 7604bd5aeSNeil Armstrong 8604bd5aeSNeil Armstrongtitle: Amlogic Video Decoder 9604bd5aeSNeil Armstrong 10604bd5aeSNeil Armstrongmaintainers: 11604bd5aeSNeil Armstrong - Neil Armstrong <narmstrong@baylibre.com> 12604bd5aeSNeil Armstrong - Maxime Jourdan <mjourdan@baylibre.com> 13604bd5aeSNeil Armstrong 14604bd5aeSNeil Armstrongdescription: | 15604bd5aeSNeil Armstrong The video decoding IP lies within the DOS memory region, 16604bd5aeSNeil Armstrong except for the hardware bitstream parser that makes use of an undocumented 17604bd5aeSNeil Armstrong region. 18604bd5aeSNeil Armstrong 19604bd5aeSNeil Armstrong It makes use of the following blocks: 20604bd5aeSNeil Armstrong - ESPARSER is a bitstream parser that outputs to a VIFIFO. Further VDEC blocks 21604bd5aeSNeil Armstrong then feed from this VIFIFO. 22604bd5aeSNeil Armstrong - VDEC_1 can decode MPEG-1, MPEG-2, MPEG-4 part 2, MJPEG, H.263, H.264, VC-1. 23604bd5aeSNeil Armstrong - VDEC_HEVC can decode HEVC and VP9. 24604bd5aeSNeil Armstrong 25604bd5aeSNeil Armstrong Both VDEC_1 and VDEC_HEVC share the "vdec" IRQ and as such cannot run 26604bd5aeSNeil Armstrong concurrently. 27604bd5aeSNeil Armstrong 28604bd5aeSNeil Armstrongproperties: 29604bd5aeSNeil Armstrong compatible: 3070ae805aSNeil Armstrong oneOf: 3170ae805aSNeil Armstrong - items: 32604bd5aeSNeil Armstrong - enum: 33604bd5aeSNeil Armstrong - amlogic,gxbb-vdec # GXBB (S905) 34604bd5aeSNeil Armstrong - amlogic,gxl-vdec # GXL (S905X, S905D) 35604bd5aeSNeil Armstrong - amlogic,gxm-vdec # GXM (S912) 36604bd5aeSNeil Armstrong - const: amlogic,gx-vdec 3770ae805aSNeil Armstrong - enum: 3870ae805aSNeil Armstrong - amlogic,g12a-vdec # G12A (S905X2, S905D2) 393d8af3b4SNeil Armstrong - amlogic,sm1-vdec # SM1 (S905X3, S905D3) 40604bd5aeSNeil Armstrong 41604bd5aeSNeil Armstrong interrupts: 42604bd5aeSNeil Armstrong minItems: 2 43604bd5aeSNeil Armstrong 44604bd5aeSNeil Armstrong interrupt-names: 45604bd5aeSNeil Armstrong items: 46604bd5aeSNeil Armstrong - const: vdec 47604bd5aeSNeil Armstrong - const: esparser 48604bd5aeSNeil Armstrong 49604bd5aeSNeil Armstrong reg: 50604bd5aeSNeil Armstrong minItems: 2 51604bd5aeSNeil Armstrong 52604bd5aeSNeil Armstrong reg-names: 53604bd5aeSNeil Armstrong items: 54604bd5aeSNeil Armstrong - const: dos 55604bd5aeSNeil Armstrong - const: esparser 56604bd5aeSNeil Armstrong 57604bd5aeSNeil Armstrong resets: 58604bd5aeSNeil Armstrong maxItems: 1 59604bd5aeSNeil Armstrong 60604bd5aeSNeil Armstrong reset-names: 61604bd5aeSNeil Armstrong items: 62604bd5aeSNeil Armstrong - const: esparser 63604bd5aeSNeil Armstrong 64604bd5aeSNeil Armstrong clocks: 65604bd5aeSNeil Armstrong minItems: 4 6670ae805aSNeil Armstrong maxItems: 5 67604bd5aeSNeil Armstrong 68604bd5aeSNeil Armstrong clock-names: 6970ae805aSNeil Armstrong minItems: 4 7070ae805aSNeil Armstrong maxItems: 5 71604bd5aeSNeil Armstrong items: 72604bd5aeSNeil Armstrong - const: dos_parser 73604bd5aeSNeil Armstrong - const: dos 74604bd5aeSNeil Armstrong - const: vdec_1 75604bd5aeSNeil Armstrong - const: vdec_hevc 7670ae805aSNeil Armstrong - const: vdec_hevcf 77604bd5aeSNeil Armstrong 78604bd5aeSNeil Armstrong amlogic,ao-sysctrl: 79604bd5aeSNeil Armstrong description: should point to the AOBUS sysctrl node 80*3d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/phandle 81604bd5aeSNeil Armstrong 82604bd5aeSNeil Armstrong amlogic,canvas: 83604bd5aeSNeil Armstrong description: should point to a canvas provider node 84*3d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/phandle 85604bd5aeSNeil Armstrong 8670ae805aSNeil ArmstrongallOf: 8770ae805aSNeil Armstrong - if: 8870ae805aSNeil Armstrong properties: 8970ae805aSNeil Armstrong compatible: 9070ae805aSNeil Armstrong contains: 9170ae805aSNeil Armstrong enum: 9270ae805aSNeil Armstrong - amlogic,gx-vdec 9370ae805aSNeil Armstrong 9470ae805aSNeil Armstrong then: 9570ae805aSNeil Armstrong properties: 9670ae805aSNeil Armstrong clock-names: 9770ae805aSNeil Armstrong maxItems: 4 9870ae805aSNeil Armstrong 9970ae805aSNeil Armstrong - if: 10070ae805aSNeil Armstrong properties: 10170ae805aSNeil Armstrong compatible: 10270ae805aSNeil Armstrong contains: 10370ae805aSNeil Armstrong enum: 10470ae805aSNeil Armstrong - amlogic,g12a-vdec 1053d8af3b4SNeil Armstrong - amlogic,sm1-vdec 10670ae805aSNeil Armstrong 10770ae805aSNeil Armstrong then: 10870ae805aSNeil Armstrong properties: 10970ae805aSNeil Armstrong clock-names: 11070ae805aSNeil Armstrong minItems: 5 11170ae805aSNeil Armstrong 112604bd5aeSNeil Armstrongrequired: 113604bd5aeSNeil Armstrong - compatible 114604bd5aeSNeil Armstrong - reg 115604bd5aeSNeil Armstrong - reg-names 116604bd5aeSNeil Armstrong - interrupts 117604bd5aeSNeil Armstrong - interrupt-names 118604bd5aeSNeil Armstrong - clocks 119604bd5aeSNeil Armstrong - clock-names 120604bd5aeSNeil Armstrong - resets 121604bd5aeSNeil Armstrong - reset-names 122604bd5aeSNeil Armstrong - amlogic,ao-sysctrl 123604bd5aeSNeil Armstrong - amlogic,canvas 124604bd5aeSNeil Armstrong 1257f464532SRob HerringadditionalProperties: false 1267f464532SRob Herring 127604bd5aeSNeil Armstrongexamples: 128604bd5aeSNeil Armstrong - | 129604bd5aeSNeil Armstrong vdec: video-decoder@c8820000 { 130604bd5aeSNeil Armstrong compatible = "amlogic,gxl-vdec", "amlogic,gx-vdec"; 131604bd5aeSNeil Armstrong reg = <0xc8820000 0x10000>, <0xc110a580 0xe4>; 132604bd5aeSNeil Armstrong reg-names = "dos", "esparser"; 133604bd5aeSNeil Armstrong interrupts = <44>, <32>; 134604bd5aeSNeil Armstrong interrupt-names = "vdec", "esparser"; 135604bd5aeSNeil Armstrong clocks = <&clk_dos_parser> ,<&clk_dos>, <&clk_vdec_1>, <&clk_vdec_hevc>; 136604bd5aeSNeil Armstrong clock-names = "dos_parser", "dos", "vdec_1", "vdec_hevc"; 137604bd5aeSNeil Armstrong resets = <&reset_parser>; 138604bd5aeSNeil Armstrong reset-names = "esparser"; 139604bd5aeSNeil Armstrong amlogic,ao-sysctrl = <&sysctrl_AO>; 140604bd5aeSNeil Armstrong amlogic,canvas = <&canvas>; 141604bd5aeSNeil Armstrong }; 142