Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1824009ybl; Thu, 5 Dec 2019 07:35:45 -0800 (PST) X-Google-Smtp-Source: APXvYqzBCcbvFTxYKzLiBVSbcm+MdTeIQoStccqilwPFuiMOj7o+aWvAnGReMsH1zpdyBmR4taMV X-Received: by 2002:a05:6808:b26:: with SMTP id t6mr7161196oij.123.1575560145394; Thu, 05 Dec 2019 07:35:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575560145; cv=none; d=google.com; s=arc-20160816; b=o1xW/FgJI+adah0xm04BftOFcBzRgDDXxyncwapbcyX9JqJ0ftMj3XhL2jXAeCwng7 rwyn0BEpQcnF19p3lM3qJZvf3ceWbbMSevhCYi/RUWzJ2tjn7nlmiAbneXLJv7mN54cZ PtmSUfm1eXXo5MDVwIznde1O+OtgIvtwUW4QyNfFcY+o1cS6ya5eCkJfYHIMbJb4ussm HYgWFHEEPeN5yW+oYq0koF2lqBoaq3mw6kovqS3sfUjGw6bPX2HOGNp/6fYxvFslS65M FBeowBXZ0OZq9NzQyMh6HfrGcHS2WrdcGyqFTHc9Np6bsBD1VfjRiK+hKfFz6Y3UslmV OiWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9UAzxsWf4W83oyvFQkH2hZ4vYVx6AktY/uiCE2SmLc4=; b=q7aR8OgP7ffxTkQkwUh+tEN4TNrdItkA3M470Fx0AFltmjBgrzPKxnpEaQ6eM0lxvO 8Fcr5zYCQ65rjfLguQWotpHOarsBVUMCgi087vq+cKb9SUgmUBxN6wCg6yfQt99a0DEA ncs9qYP3Ab92DnoV0OWc5NkFlaAdMSSrVlmR+ubF2ZZ/67y5eBz4iItzY+yDGV2zGlty bKahPZL5z7G3/cANIrbHI/vu4i6SztIp/fU/+gVzP/Q6yke1w1Q5Xs+8YFCImYGybxvB 2dTrDcHXz/wdnjCyIeGXedpQ4wnmFt+x8X+lTCBfhY9BIgrnZbsWDWsOuJoEmaplslwr CFNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=kK5tYBPe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m19si3618197oig.91.2019.12.05.07.35.32; Thu, 05 Dec 2019 07:35:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=kK5tYBPe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729845AbfLEPeT (ORCPT + 99 others); Thu, 5 Dec 2019 10:34:19 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40923 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729708AbfLEPeS (ORCPT ); Thu, 5 Dec 2019 10:34:18 -0500 Received: by mail-wm1-f65.google.com with SMTP id t14so4135671wmi.5 for ; Thu, 05 Dec 2019 07:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9UAzxsWf4W83oyvFQkH2hZ4vYVx6AktY/uiCE2SmLc4=; b=kK5tYBPengXlEp3cXfE31aL8ioJ/Jeb3OtQZRhtxXwubJE9Nd2KtnBcbF/Zk2nmSgN nCFQhFu+ptx1ASM6Tncq2RZ0Wf7Li76CdM3/4Aw1dQNwP3w/XBai54MKJfKTN04mor1y BoUpLTZFh/stv9NxxbEVM8zVadVW4sM1hMQ4JytGPWU6L1blZFORKQtY+ghZzFH/DzJd EDHZjbwYYiH/QSuFJyZky3Sc4YcMTPqR7a6hmUk1tY3jiIm1e0zerfmNPGhD4qAUtbtG RxPMxZEIUm/rkkYxZc1eESPgRziIPE3/BuKYCDROguRrpEd/o5+/ZCqqXp8dsFEtaGz+ Cv0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9UAzxsWf4W83oyvFQkH2hZ4vYVx6AktY/uiCE2SmLc4=; b=ULB2cuSq4Nfg7ZwWxzgSuZcXhJMH8NxVKyPD20LEZx55p2FeylETPdhedZDRdEKV+f zBRXxrC8XyWI3WZclX3sT57yMkQQMhIz+FYeKsWXjcC+JFu1IwA/KnqdQthOl5PsWMKD 2bIfVysFV0mZHg5lcM4COncN9Uckq8f+yNJUtS9nefM2yu8+rzzbIQAe8nuBMWQnD824 uN+vqzYC17gSKGxYShWTvhFyCfNt3s90WUzZEIlIE9sdJTJFLOj/9OTzhCLW88hAxDvN JUPcbCrQw3W7TmBOfdJRE1gi+pzn9zkLH45lY0jPX1zHTfxvkI4g1peuiO3iy/2nwZ36 d/6g== X-Gm-Message-State: APjAAAVbgfY68JGHynuvPy9LsH9yihDgZeKWfWomKlI2KAvupuumlnC1 aR3k4+8aCr8KwjQRYzEQt8kiqVEKHCSsrg== X-Received: by 2002:a1c:4f:: with SMTP id 76mr3234343wma.69.1575560053556; Thu, 05 Dec 2019 07:34:13 -0800 (PST) Received: from bender.baylibre.local (wal59-h01-176-150-251-154.dsl.sta.abo.bbox.fr. [176.150.251.154]) by smtp.gmail.com with ESMTPSA id u26sm191894wmj.9.2019.12.05.07.34.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2019 07:34:13 -0800 (PST) From: Neil Armstrong To: mjourdan@baylibre.com, devicetree@vger.kernel.org Cc: Neil Armstrong , linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring Subject: [PATCH v2 1/4] dt-bindings: media: amlogic,vdec: convert to yaml Date: Thu, 5 Dec 2019 16:34:05 +0100 Message-Id: <20191205153408.26500-2-narmstrong@baylibre.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20191205153408.26500-1-narmstrong@baylibre.com> References: <20191205153408.26500-1-narmstrong@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that we have the DT validation in place, let's convert the device tree bindings for the Amlogic Video Controller over to YAML schemas. This yaml bindings will then be extended to support new SoCs. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring --- .../bindings/media/amlogic,gx-vdec.yaml | 107 ++++++++++++++++++ .../bindings/media/amlogic,vdec.txt | 72 ------------ 2 files changed, 107 insertions(+), 72 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml delete mode 100644 Documentation/devicetree/bindings/media/amlogic,vdec.txt diff --git a/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml b/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml new file mode 100644 index 000000000000..878944867d6e --- /dev/null +++ b/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml @@ -0,0 +1,107 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2019 BayLibre, SAS +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/media/amlogic,gx-vdec.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Amlogic Video Decoder + +maintainers: + - Neil Armstrong + - Maxime Jourdan + +description: | + The video decoding IP lies within the DOS memory region, + except for the hardware bitstream parser that makes use of an undocumented + region. + + It makes use of the following blocks: + - ESPARSER is a bitstream parser that outputs to a VIFIFO. Further VDEC blocks + then feed from this VIFIFO. + - VDEC_1 can decode MPEG-1, MPEG-2, MPEG-4 part 2, MJPEG, H.263, H.264, VC-1. + - VDEC_HEVC can decode HEVC and VP9. + + Both VDEC_1 and VDEC_HEVC share the "vdec" IRQ and as such cannot run + concurrently. + +properties: + compatible: + items: + - enum: + - amlogic,gxbb-vdec # GXBB (S905) + - amlogic,gxl-vdec # GXL (S905X, S905D) + - amlogic,gxm-vdec # GXM (S912) + - const: amlogic,gx-vdec + + interrupts: + minItems: 2 + + interrupt-names: + items: + - const: vdec + - const: esparser + + reg: + minItems: 2 + + reg-names: + items: + - const: dos + - const: esparser + + resets: + maxItems: 1 + + reset-names: + items: + - const: esparser + + clocks: + minItems: 4 + + clock-names: + items: + - const: dos_parser + - const: dos + - const: vdec_1 + - const: vdec_hevc + + amlogic,ao-sysctrl: + description: should point to the AOBUS sysctrl node + allOf: + - $ref: /schemas/types.yaml#/definitions/phandle + + amlogic,canvas: + description: should point to a canvas provider node + allOf: + - $ref: /schemas/types.yaml#/definitions/phandle + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-names + - clocks + - clock-names + - resets + - reset-names + - amlogic,ao-sysctrl + - amlogic,canvas + +examples: + - | + vdec: video-decoder@c8820000 { + compatible = "amlogic,gxl-vdec", "amlogic,gx-vdec"; + reg = <0xc8820000 0x10000>, <0xc110a580 0xe4>; + reg-names = "dos", "esparser"; + interrupts = <44>, <32>; + interrupt-names = "vdec", "esparser"; + clocks = <&clk_dos_parser> ,<&clk_dos>, <&clk_vdec_1>, <&clk_vdec_hevc>; + clock-names = "dos_parser", "dos", "vdec_1", "vdec_hevc"; + resets = <&reset_parser>; + reset-names = "esparser"; + amlogic,ao-sysctrl = <&sysctrl_AO>; + amlogic,canvas = <&canvas>; + }; diff --git a/Documentation/devicetree/bindings/media/amlogic,vdec.txt b/Documentation/devicetree/bindings/media/amlogic,vdec.txt deleted file mode 100644 index 9b6aace86ca7..000000000000 --- a/Documentation/devicetree/bindings/media/amlogic,vdec.txt +++ /dev/null @@ -1,72 +0,0 @@ -Amlogic Video Decoder -================================ - -The video decoding IP lies within the DOS memory region, -except for the hardware bitstream parser that makes use of an undocumented -region. - -It makes use of the following blocks: - -- ESPARSER is a bitstream parser that outputs to a VIFIFO. Further VDEC blocks -then feed from this VIFIFO. -- VDEC_1 can decode MPEG-1, MPEG-2, MPEG-4 part 2, MJPEG, H.263, H.264, VC-1. -- VDEC_HEVC can decode HEVC and VP9. - -Both VDEC_1 and VDEC_HEVC share the "vdec" IRQ and as such cannot run -concurrently. - -Device Tree Bindings: ---------------------- - -VDEC: Video Decoder --------------------------- - -Required properties: -- compatible: value should be different for each SoC family as : - - GXBB (S905) : "amlogic,gxbb-vdec" - - GXL (S905X, S905D) : "amlogic,gxl-vdec" - - GXM (S912) : "amlogic,gxm-vdec" - followed by the common "amlogic,gx-vdec" -- reg: base address and size of he following memory-mapped regions : - - dos - - esparser -- reg-names: should contain the names of the previous memory regions -- interrupts: should contain the following IRQs: - - vdec - - esparser -- interrupt-names: should contain the names of the previous interrupts -- amlogic,ao-sysctrl: should point to the AOBUS sysctrl node -- amlogic,canvas: should point to a canvas provider node -- clocks: should contain the following clocks : - - dos_parser - - dos - - vdec_1 - - vdec_hevc -- clock-names: should contain the names of the previous clocks -- resets: should contain the parser reset -- reset-names: should be "esparser" - -Example: - -vdec: video-codec@c8820000 { - compatible = "amlogic,gxbb-vdec", "amlogic,gx-vdec"; - reg = <0x0 0xc8820000 0x0 0x10000>, - <0x0 0xc110a580 0x0 0xe4>; - reg-names = "dos", "esparser"; - - interrupts = , - ; - interrupt-names = "vdec", "esparser"; - - amlogic,ao-sysctrl = <&sysctrl_AO>; - amlogic,canvas = <&canvas>; - - clocks = <&clkc CLKID_DOS_PARSER>, - <&clkc CLKID_DOS>, - <&clkc CLKID_VDEC_1>, - <&clkc CLKID_VDEC_HEVC>; - clock-names = "dos_parser", "dos", "vdec_1", "vdec_hevc"; - - resets = <&reset RESET_PARSER>; - reset-names = "esparser"; -}; -- 2.22.0