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--- 5*ab190665SRob Herring$id: http://devicetree.org/schemas/media/amlogic,gx-vdec.yaml# 6*ab190665SRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml# 7604bd5aeSNeil Armstrong 8604bd5aeSNeil Armstrongtitle: Amlogic Video Decoder 9604bd5aeSNeil Armstrong 10604bd5aeSNeil Armstrongmaintainers: 11c6a43fb3SNeil Armstrong - Neil Armstrong <neil.armstrong@linaro.org> 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 70604bd5aeSNeil Armstrong items: 71604bd5aeSNeil Armstrong - const: dos_parser 72604bd5aeSNeil Armstrong - const: dos 73604bd5aeSNeil Armstrong - const: vdec_1 74604bd5aeSNeil Armstrong - const: vdec_hevc 7570ae805aSNeil Armstrong - const: vdec_hevcf 76604bd5aeSNeil Armstrong 77604bd5aeSNeil Armstrong amlogic,ao-sysctrl: 78604bd5aeSNeil Armstrong description: should point to the AOBUS sysctrl node 793d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/phandle 80604bd5aeSNeil Armstrong 81604bd5aeSNeil Armstrong amlogic,canvas: 82604bd5aeSNeil Armstrong description: should point to a canvas provider node 833d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/phandle 84604bd5aeSNeil Armstrong 8570ae805aSNeil ArmstrongallOf: 8670ae805aSNeil Armstrong - if: 8770ae805aSNeil Armstrong properties: 8870ae805aSNeil Armstrong compatible: 8970ae805aSNeil Armstrong contains: 9070ae805aSNeil Armstrong enum: 9170ae805aSNeil Armstrong - amlogic,gx-vdec 9270ae805aSNeil Armstrong 9370ae805aSNeil Armstrong then: 9470ae805aSNeil Armstrong properties: 9570ae805aSNeil Armstrong clock-names: 9670ae805aSNeil Armstrong maxItems: 4 9770ae805aSNeil Armstrong 9870ae805aSNeil Armstrong - if: 9970ae805aSNeil Armstrong properties: 10070ae805aSNeil Armstrong compatible: 10170ae805aSNeil Armstrong contains: 10270ae805aSNeil Armstrong enum: 10370ae805aSNeil Armstrong - amlogic,g12a-vdec 1043d8af3b4SNeil Armstrong - amlogic,sm1-vdec 10570ae805aSNeil Armstrong 10670ae805aSNeil Armstrong then: 10770ae805aSNeil Armstrong properties: 10870ae805aSNeil Armstrong clock-names: 10970ae805aSNeil Armstrong minItems: 5 11070ae805aSNeil Armstrong 111604bd5aeSNeil Armstrongrequired: 112604bd5aeSNeil Armstrong - compatible 113604bd5aeSNeil Armstrong - reg 114604bd5aeSNeil Armstrong - reg-names 115604bd5aeSNeil Armstrong - interrupts 116604bd5aeSNeil Armstrong - interrupt-names 117604bd5aeSNeil Armstrong - clocks 118604bd5aeSNeil Armstrong - clock-names 119604bd5aeSNeil Armstrong - resets 120604bd5aeSNeil Armstrong - reset-names 121604bd5aeSNeil Armstrong - amlogic,ao-sysctrl 122604bd5aeSNeil Armstrong - amlogic,canvas 123604bd5aeSNeil Armstrong 1247f464532SRob HerringadditionalProperties: false 1257f464532SRob Herring 126604bd5aeSNeil Armstrongexamples: 127604bd5aeSNeil Armstrong - | 128604bd5aeSNeil Armstrong vdec: video-decoder@c8820000 { 129604bd5aeSNeil Armstrong compatible = "amlogic,gxl-vdec", "amlogic,gx-vdec"; 130604bd5aeSNeil Armstrong reg = <0xc8820000 0x10000>, <0xc110a580 0xe4>; 131604bd5aeSNeil Armstrong reg-names = "dos", "esparser"; 132604bd5aeSNeil Armstrong interrupts = <44>, <32>; 133604bd5aeSNeil Armstrong interrupt-names = "vdec", "esparser"; 134604bd5aeSNeil Armstrong clocks = <&clk_dos_parser> ,<&clk_dos>, <&clk_vdec_1>, <&clk_vdec_hevc>; 135604bd5aeSNeil Armstrong clock-names = "dos_parser", "dos", "vdec_1", "vdec_hevc"; 136604bd5aeSNeil Armstrong resets = <&reset_parser>; 137604bd5aeSNeil Armstrong reset-names = "esparser"; 138604bd5aeSNeil Armstrong amlogic,ao-sysctrl = <&sysctrl_AO>; 139604bd5aeSNeil Armstrong amlogic,canvas = <&canvas>; 140604bd5aeSNeil Armstrong }; 141