Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4060297ybh; Tue, 6 Aug 2019 05:45:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzm1Xpr5hVOi425Rqqftp7GI8PozuoRZFTkQgLO+5cLS2k0UZDPFu918TqcD3yUSESVyM9I X-Received: by 2002:a63:61cf:: with SMTP id v198mr2871140pgb.217.1565095518584; Tue, 06 Aug 2019 05:45:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565095518; cv=none; d=google.com; s=arc-20160816; b=kTAVOAXG7WKZmrQACx9Hq6vw8o17pE+QepWWTURYh7ALXz5gz6QgJIax/NHuGfHhoc t0+EVx7Fea/dPhHgI4z3AMSHs2OaE0ySteJf5uTNxALEBbv+BHp66NXuGxbjruomyNJx JIA7PCeRwsPPrcJ5YA9qGZJS73Yn8Lep2ZSe0eRwIivy4JCEwlqNC8OxaZtxBKlhurYm XITjuVMaUKIDkJzJPYkBVKohVNRr0jYC0hBQxnhbyrgephjwiIgulMIp/SIykLgai0oS YBCcepzY1DhxoscAqj/A0Q0PS3xc/vhnGp9fkpN34M+n8Jq7Dwbux/DZK3hMozQMYqhp 95nw== 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=2lVMWHx5qAevL1/U6+YnagBJZPJOzF3+ruF+O3h641A=; b=J2ffc6vr+Hhd+Mb7GTVLM810qQUWtZVBsejURR0lBQtWKd6PFVcQsUHQcOWJVFgYlp 0GbjGfXt3+RPDSAfHr/5UI1Z69vE1qo1roocG2Mx80zWlKNv1Lt2Ux1iCVEB85a47jnv 6o+m1UEBzNDGQF1VC1IEE3ZEQukus2Cb6gZ4qJDc/2cLnQy/LWim1PwSZy+Xh0U0MUfH pYLPX5qsGjAYAQW28ArXtOxvK6gG+xqDdQ9JrpCebRnmGg22zvSp2LozRgB1rppsEVMr Z4dg949rIX39ZmAsF/iarEBhCFlQrSizmWC1jsSHoDUzaLgVeuhM7IhBB3Fmh2APqkX8 blig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=J8QHtTBc; 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 q2si14813569pjq.89.2019.08.06.05.45.03; Tue, 06 Aug 2019 05:45:18 -0700 (PDT) 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=J8QHtTBc; 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 S1731401AbfHFMoZ (ORCPT + 99 others); Tue, 6 Aug 2019 08:44:25 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39697 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728156AbfHFMoX (ORCPT ); Tue, 6 Aug 2019 08:44:23 -0400 Received: by mail-wm1-f66.google.com with SMTP id u25so65969582wmc.4 for ; Tue, 06 Aug 2019 05:44:20 -0700 (PDT) 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=2lVMWHx5qAevL1/U6+YnagBJZPJOzF3+ruF+O3h641A=; b=J8QHtTBcjHJliMwi++UTONXnx7sAEPSRrnfN5m2eAcJIns1AWrBm+/7aStQt0BBYZo 11jo9qA+awMsAkdaHs/1vLETxDhJWGFCxrNQb91BNy9K+VKW3F6oJCYteE4RykNMrsEV EjnLjvx/loWBHxJ/JsrtdGKNcPbJh2Q1DLU89lqi2NHDA0feXKuFIXuTAKIicoEWvv0a GzyBbdChTc0H1ehS+oOZyIS5N9/g+x/fOcWYjFrAnOK31UvFLnrcLLt/XJpvjkqCF2L1 oMUX47ExVvHsgxkzkgwunPbj1wvLsHq1zHk3eJ6pkOA2/6n2aOhrXkoR53v4nJpuKwC9 ZmRg== 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=2lVMWHx5qAevL1/U6+YnagBJZPJOzF3+ruF+O3h641A=; b=tQ3wOzK4+FA7riI3GlZqmENan2thT9dgiM+ut+4t3Bt/cnvmeGuPCyFioghOvhndtz lWzGGnQzet6seGee2jyMJHBll9nZmG2RvyuTz+xFk81YO4YMRgEGGZNcoDkiMm9zTmxn TyRXD8CaW1q2BKnCuGmxEpT1OZPHfegpP1uIzh370guLZP9Ek1bsUP4pxv5LxOMAtoGD sYnQFN5ZiZBZf6vrDLPJJAvBduFEdgRfGoWp4ViVKGoIX84ppOKVK3HOHPED2llL2avY BenRdq4rrTUGuiN+Le4kFxhTzc5I0bNC1SROSSx1AxPCjaUeDRGC1MFfUfmtyiDmLxly u2tQ== X-Gm-Message-State: APjAAAVkHpDQgVI6Qi0UijnHRSi/Zik5ETqbeZOJ9eRwHblzxHfg8vRl PLJSJTRj3nkTenzt3BdhXTEj6Q== X-Received: by 2002:a1c:968c:: with SMTP id y134mr4712041wmd.75.1565095459981; Tue, 06 Aug 2019 05:44:19 -0700 (PDT) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id q20sm3842135wrc.79.2019.08.06.05.44.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 06 Aug 2019 05:44:19 -0700 (PDT) From: Neil Armstrong To: robh+dt@kernel.org Cc: Neil Armstrong , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] dt-bindings: display: amlogic,meson-vpu: convert to yaml Date: Tue, 6 Aug 2019 14:44:15 +0200 Message-Id: <20190806124416.15561-3-narmstrong@baylibre.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190806124416.15561-1-narmstrong@baylibre.com> References: <20190806124416.15561-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 Display Controller over to YAML schemas. The original example has a leftover "dmc" memory cell, that has been removed in the yaml rewrite. The port connection table has been dropped in favor of a description of each port. Signed-off-by: Neil Armstrong --- .../bindings/display/amlogic,meson-vpu.txt | 121 --------------- .../bindings/display/amlogic,meson-vpu.yaml | 138 ++++++++++++++++++ 2 files changed, 138 insertions(+), 121 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/amlogic,meson-vpu.txt create mode 100644 Documentation/devicetree/bindings/display/amlogic,meson-vpu.yaml diff --git a/Documentation/devicetree/bindings/display/amlogic,meson-vpu.txt b/Documentation/devicetree/bindings/display/amlogic,meson-vpu.txt deleted file mode 100644 index be40a780501c..000000000000 --- a/Documentation/devicetree/bindings/display/amlogic,meson-vpu.txt +++ /dev/null @@ -1,121 +0,0 @@ -Amlogic Meson Display Controller -================================ - -The Amlogic Meson Display controller is composed of several components -that are going to be documented below: - -DMC|---------------VPU (Video Processing Unit)----------------|------HHI------| - | vd1 _______ _____________ _________________ | | -D |-------| |----| | | | | HDMI PLL | -D | vd2 | VIU | | Video Post | | Video Encoders |<---|-----VCLK | -R |-------| |----| Processing | | | | | - | osd2 | | | |---| Enci ----------|----|-----VDAC------| -R |-------| CSC |----| Scalers | | Encp ----------|----|----HDMI-TX----| -A | osd1 | | | Blenders | | Encl ----------|----|---------------| -M |-------|______|----|____________| |________________| | | -___|__________________________________________________________|_______________| - - -VIU: Video Input Unit ---------------------- - -The Video Input Unit is in charge of the pixel scanout from the DDR memory. -It fetches the frames addresses, stride and parameters from the "Canvas" memory. -This part is also in charge of the CSC (Colorspace Conversion). -It can handle 2 OSD Planes and 2 Video Planes. - -VPP: Video Post Processing --------------------------- - -The Video Post Processing is in charge of the scaling and blending of the -various planes into a single pixel stream. -There is a special "pre-blending" used by the video planes with a dedicated -scaler and a "post-blending" to merge with the OSD Planes. -The OSD planes also have a dedicated scaler for one of the OSD. - -VENC: Video Encoders --------------------- - -The VENC is composed of the multiple pixel encoders : - - ENCI : Interlace Video encoder for CVBS and Interlace HDMI - - ENCP : Progressive Video Encoder for HDMI - - ENCL : LCD LVDS Encoder -The VENC Unit gets a Pixel Clocks (VCLK) from a dedicated HDMI PLL and clock -tree and provides the scanout clock to the VPP and VIU. -The ENCI is connected to a single VDAC for Composite Output. -The ENCI and ENCP are connected to an on-chip HDMI Transceiver. - -Device Tree Bindings: ---------------------- - -VPU: Video Processing Unit --------------------------- - -Required properties: -- compatible: value should be different for each SoC family as : - - GXBB (S905) : "amlogic,meson-gxbb-vpu" - - GXL (S905X, S905D) : "amlogic,meson-gxl-vpu" - - GXM (S912) : "amlogic,meson-gxm-vpu" - followed by the common "amlogic,meson-gx-vpu" - - G12A (S905X2, S905Y2, S905D2) : "amlogic,meson-g12a-vpu" -- reg: base address and size of he following memory-mapped regions : - - vpu - - hhi -- reg-names: should contain the names of the previous memory regions -- interrupts: should contain the VENC Vsync interrupt number -- amlogic,canvas: phandle to canvas provider node as described in the file - ../soc/amlogic/amlogic,canvas.txt - -Optional properties: -- power-domains: Optional phandle to associated power domain as described in - the file ../power/power_domain.txt - -Required nodes: - -The connections to the VPU output video ports are modeled using the OF graph -bindings specified in Documentation/devicetree/bindings/graph.txt. - -The following table lists for each supported model the port number -corresponding to each VPU output. - - Port 0 Port 1 ------------------------------------------ - S905 (GXBB) CVBS VDAC HDMI-TX - S905X (GXL) CVBS VDAC HDMI-TX - S905D (GXL) CVBS VDAC HDMI-TX - S912 (GXM) CVBS VDAC HDMI-TX - S905X2 (G12A) CVBS VDAC HDMI-TX - S905Y2 (G12A) CVBS VDAC HDMI-TX - S905D2 (G12A) CVBS VDAC HDMI-TX - -Example: - -tv-connector { - compatible = "composite-video-connector"; - - port { - tv_connector_in: endpoint { - remote-endpoint = <&cvbs_vdac_out>; - }; - }; -}; - -vpu: vpu@d0100000 { - compatible = "amlogic,meson-gxbb-vpu"; - reg = <0x0 0xd0100000 0x0 0x100000>, - <0x0 0xc883c000 0x0 0x1000>, - <0x0 0xc8838000 0x0 0x1000>; - reg-names = "vpu", "hhi", "dmc"; - interrupts = ; - #address-cells = <1>; - #size-cells = <0>; - - /* CVBS VDAC output port */ - port@0 { - reg = <0>; - - cvbs_vdac_out: endpoint { - remote-endpoint = <&tv_connector_in>; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/display/amlogic,meson-vpu.yaml b/Documentation/devicetree/bindings/display/amlogic,meson-vpu.yaml new file mode 100644 index 000000000000..71f572f6cb3b --- /dev/null +++ b/Documentation/devicetree/bindings/display/amlogic,meson-vpu.yaml @@ -0,0 +1,138 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2019 BayLibre, SAS +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/display/amlogic,meson-vpu.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Amlogic Meson Display Controller + +maintainers: + - Neil Armstrong + +description: | + The Amlogic Meson Display controller is composed of several components + that are going to be documented below + + DMC|---------------VPU (Video Processing Unit)----------------|------HHI------| + | vd1 _______ _____________ _________________ | | + D |-------| |----| | | | | HDMI PLL | + D | vd2 | VIU | | Video Post | | Video Encoders |<---|-----VCLK | + R |-------| |----| Processing | | | | | + | osd2 | | | |---| Enci ----------|----|-----VDAC------| + R |-------| CSC |----| Scalers | | Encp ----------|----|----HDMI-TX----| + A | osd1 | | | Blenders | | Encl ----------|----|---------------| + M |-------|______|----|____________| |________________| | | + ___|__________________________________________________________|_______________| + + + VIU: Video Input Unit + --------------------- + + The Video Input Unit is in charge of the pixel scanout from the DDR memory. + It fetches the frames addresses, stride and parameters from the "Canvas" memory. + This part is also in charge of the CSC (Colorspace Conversion). + It can handle 2 OSD Planes and 2 Video Planes. + + VPP: Video Post Processing + -------------------------- + + The Video Post Processing is in charge of the scaling and blending of the + various planes into a single pixel stream. + There is a special "pre-blending" used by the video planes with a dedicated + scaler and a "post-blending" to merge with the OSD Planes. + The OSD planes also have a dedicated scaler for one of the OSD. + + VENC: Video Encoders + -------------------- + + The VENC is composed of the multiple pixel encoders + - ENCI : Interlace Video encoder for CVBS and Interlace HDMI + - ENCP : Progressive Video Encoder for HDMI + - ENCL : LCD LVDS Encoder + The VENC Unit gets a Pixel Clocks (VCLK) from a dedicated HDMI PLL and clock + tree and provides the scanout clock to the VPP and VIU. + The ENCI is connected to a single VDAC for Composite Output. + The ENCI and ENCP are connected to an on-chip HDMI Transceiver. + +properties: + compatible: + oneOf: + - items: + - enum: + - amlogic,meson-gxbb-vpu # GXBB (S905) + - amlogic,meson-gxl-vpu # GXL (S905X, S905D) + - amlogic,meson-gxm-vpu # GXM (S912) + - const: amlogic,meson-gx-vpu + - enum: + - amlogic,meson-g12a-vpu # G12A (S905X2, S905Y2, S905D2) + + reg: + maxItems: 2 + + reg-names: + items: + - const: vpu + - const: hhi + + interrupts: + maxItems: 1 + + power-domains: + description: phandle to the associated power domain + allOf: + - $ref: /schemas/types.yaml#/definitions/phandle + + port@0: + type: object + description: + A port node pointing to the CVBS VDAC port node. + + port@1: + type: object + description: + A port node pointing to the HDMI-TX port node. + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +required: + - compatible + - reg + - interrupts + - port@0 + - port@1 + - "#address-cells" + - "#size-cells" + +examples: + - | + vpu: vpu@d0100000 { + compatible = "amlogic,meson-gxbb-vpu", "amlogic,meson-gx-vpu"; + reg = <0xd0100000 0x100000>, <0xc883c000 0x1000>; + reg-names = "vpu", "hhi"; + interrupts = <3>; + #address-cells = <1>; + #size-cells = <0>; + + /* CVBS VDAC output port */ + port@0 { + reg = <0>; + + cvbs_vdac_out: endpoint { + remote-endpoint = <&tv_connector_in>; + }; + }; + + /* HDMI TX output port */ + port@1 { + reg = <1>; + + hdmi_tx_out: endpoint { + remote-endpoint = <&hdmi_tx_in>; + }; + }; + }; -- 2.22.0