From patchwork Wed Nov 11 13:07:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 322922 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp374351ils; Wed, 11 Nov 2020 05:08:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVhWRbWGvSMzUxWINMT9IUvh0f6j9HmA9hKszpVIpEC4bTUCPBfF1B6mV1ZpaAwpgDBo7H X-Received: by 2002:a17:906:6b82:: with SMTP id l2mr24465046ejr.241.1605100093399; Wed, 11 Nov 2020 05:08:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605100093; cv=none; d=google.com; s=arc-20160816; b=AhkzcqOjSAfNjUkCpdZttHXejg4BooE02yoP7fyDL58oHqQ4I4+wkgHoi3j7wQIFAY enAUIMHcigWhJeunpfjbI+EtrweWnXozW4UVvC3QoWGDRHSsa5Z2c3GVT3np/1DhV/lP eXm8S84DBTnbZKr1tv/U4nYvkioSGL3CyQzGCSmTY0sQN9iR4snIIYIVg9FcAYs2f4t7 0iF60ykfzdoZ41x/Y7H3ErInkIergcogNGSlKmK377kdO1gWE6IP/U/IP7Mz0IwQUvHa 6SY7xiymKw91HgvQResHX2TEDtONkfVsTk4JrcXufhA204997i9q98GNF5BlhOBOx4AS 8H8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=oxwnhzkt/PN6/sXeM3n8c5ZwySGgQoKrslhl8b+S4sY=; b=AIvOY+51V288gUhODJoAr/OrvUzAbSoioWjuJ5EW1K1crXV0CaZP6U5zVQGm2fKJxD 7PFsZUV5Ln80LGKTreFk+8QxHrZQ/pIBsMyQJvWoSyYblaBhbN5vmjRpMc8FguiRGDNp aviGWIccuIJr7v68TgkLbtE+kYtf/YjO2KiiZVCH2ibDogLrSnFXPygb21Xt+XnHvLJo AqHrTGX8qAfio4Tzm1OuhqQCEypVUFQpyl+cVk7gIv0hpi7qWDiW4V2mC3MD7yNLy+X+ q1jSQY7BNoHBcz+ggsJWGGlOChqQLnwrc1i0f6KdraH2X8McFERsLZ2CiGVnR8LL3315 MLpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LoRB7XIM; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bz12si1369740ejc.672.2020.11.11.05.08.13; Wed, 11 Nov 2020 05:08:13 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LoRB7XIM; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726424AbgKKNIM (ORCPT + 6 others); Wed, 11 Nov 2020 08:08:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726588AbgKKNIL (ORCPT ); Wed, 11 Nov 2020 08:08:11 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FBF4C0613D1 for ; Wed, 11 Nov 2020 05:08:11 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id l2so3098213lfk.0 for ; Wed, 11 Nov 2020 05:08:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oxwnhzkt/PN6/sXeM3n8c5ZwySGgQoKrslhl8b+S4sY=; b=LoRB7XIMp+jsMO/urS8K8C+S8QcJKlGd3y80e9+mJwhmPjMAANbpmsytiUqsrOo9Zc xY4ycP+c96Qz5SMtcoPxArWIjOKJ9/exdk7CXt/EgoWWkDONceqLE7P1POjqP8hlMoJs 6KIz693z8rYq9+BJw9XA9YS8wYkGUbu9SIuZ09NavZMxKy5AVPHjfcLv3q++oteJopOO XBvLlWnoWwAqLaU1kpUZGF/DlLNGGNTVl9Jl/eh+Bddyj8vGK1fNm3Z8lj6Nje1DFJaN Wcp21tHJFHcTjaKUVKXSb3f9QLH+HF4wotTB0uQThyxQoswAkH9iI8aPHMSSjSWL/pOV aICQ== 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:mime-version :content-transfer-encoding; bh=oxwnhzkt/PN6/sXeM3n8c5ZwySGgQoKrslhl8b+S4sY=; b=Ba+t28CUpZshsENJIGyZQEZHWegspsEzHNVG3yUxYaPtzq21HEvq8AoBN8Xd5Puw5y Es0nUAsXyfjKh7u6gSAGmfgL5mknjd70veDo7Q62vengNZSwouctgUIKD3Oo+iy5pgDY 40hHLielrdA2GHlLh2uGYNnjj1eKrdaKXy/3N1n4rPzR9wFaeGrTOK+/nMyrtdvBaZzZ WjZS85X//VSAbyzcqk+UD1PfE+qJ+UWAUOn994QpvFC/3OdXVIyNehvzzhtYqulJxeih uckR2VZeH1yil6q0vZaTaFfil2pXFvLQPy8IPSx6EgnCsNvctL1bXTK0CuvsuaTVu1gR YAmg== X-Gm-Message-State: AOAM530e22o4S1ENrrwG5PlleEdKiHzxosSyRbd6Kem9mNPbQOvexm66 /83VMXf8Ii3YBFLTzCRMq2C9Jw== X-Received: by 2002:a19:ad06:: with SMTP id t6mr10021401lfc.222.1605100089749; Wed, 11 Nov 2020 05:08:09 -0800 (PST) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id q7sm230512ljh.79.2020.11.11.05.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 05:08:09 -0800 (PST) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH v2] dt-bindings: display: mcde: Convert to YAML schema Date: Wed, 11 Nov 2020 14:07:54 +0100 Message-Id: <20201111130754.2283993-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This moves the MCDE bindings over to using the YAML schema to describe the ST-Ericsson MCDE display controller, making use of the generic DSI controller schema. We also add the "port" node, we will use this when adding LCD panels using the direct parallel interface DPI instead of DSI. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Cut the description on the interrupts. - Drop maxItems: 3 on clocks and clock-names: implicit from the number of listed items. - Tag the DSI ports with unevaluatedProperties: false - Tag the MCDE as such with additionalProperties: true - It was a bit hard to test this because of the code base being out of phase with the validation tools but it seems to check out. --- .../devicetree/bindings/display/ste,mcde.txt | 104 ----------- .../devicetree/bindings/display/ste,mcde.yaml | 166 ++++++++++++++++++ 2 files changed, 166 insertions(+), 104 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/ste,mcde.txt create mode 100644 Documentation/devicetree/bindings/display/ste,mcde.yaml -- 2.26.2 diff --git a/Documentation/devicetree/bindings/display/ste,mcde.txt b/Documentation/devicetree/bindings/display/ste,mcde.txt deleted file mode 100644 index 4c33c692bd5f..000000000000 --- a/Documentation/devicetree/bindings/display/ste,mcde.txt +++ /dev/null @@ -1,104 +0,0 @@ -ST-Ericsson Multi Channel Display Engine MCDE - -The ST-Ericsson MCDE is a display controller with support for compositing -and displaying several channels memory resident graphics data on DSI or -LCD displays or bridges. It is used in the ST-Ericsson U8500 platform. - -Required properties: - -- compatible: must be: - "ste,mcde" -- reg: register base for the main MCDE control registers, should be - 0x1000 in size -- interrupts: the interrupt line for the MCDE -- epod-supply: a phandle to the EPOD regulator -- vana-supply: a phandle to the analog voltage regulator -- clocks: an array of the MCDE clocks in this strict order: - MCDECLK (main MCDE clock), LCDCLK (LCD clock), PLLDSI - (HDMI clock), DSI0ESCLK (DSI0 energy save clock), - DSI1ESCLK (DSI1 energy save clock), DSI2ESCLK (DSI2 energy - save clock) -- clock-names: must be the following array: - "mcde", "lcd", "hdmi" - to match the required clock inputs above. -- #address-cells: should be <1> (for the DSI hosts that will be children) -- #size-cells: should be <1> (for the DSI hosts that will be children) -- ranges: this should always be stated - -Required subnodes: - -The devicetree must specify subnodes for the DSI host adapters. -These must have the following characteristics: - -- compatible: must be: - "ste,mcde-dsi" -- reg: must specify the register range for the DSI host -- vana-supply: phandle to the VANA voltage regulator -- clocks: phandles to the high speed and low power (energy save) clocks - the high speed clock is not present on the third (dsi2) block, so it - should only have the "lp" clock -- clock-names: "hs" for the high speed clock and "lp" for the low power - (energy save) clock -- #address-cells: should be <1> -- #size-cells: should be <0> - -Display panels and bridges will appear as children on the DSI hosts, and -the displays are connected to the DSI hosts using the common binding -for video transmitter interfaces; see -Documentation/devicetree/bindings/media/video-interfaces.txt - -If a DSI host is unused (not connected) it will have no children defined. - -Example: - -mcde@a0350000 { - compatible = "ste,mcde"; - reg = <0xa0350000 0x1000>; - interrupts = ; - epod-supply = <&db8500_b2r2_mcde_reg>; - vana-supply = <&ab8500_ldo_ana_reg>; - clocks = <&prcmu_clk PRCMU_MCDECLK>, /* Main MCDE clock */ - <&prcmu_clk PRCMU_LCDCLK>, /* LCD clock */ - <&prcmu_clk PRCMU_PLLDSI>; /* HDMI clock */ - clock-names = "mcde", "lcd", "hdmi"; - #address-cells = <1>; - #size-cells = <1>; - ranges; - - dsi0: dsi@a0351000 { - compatible = "ste,mcde-dsi"; - reg = <0xa0351000 0x1000>; - vana-supply = <&ab8500_ldo_ana_reg>; - clocks = <&prcmu_clk PRCMU_DSI0CLK>, <&prcmu_clk PRCMU_DSI0ESCCLK>; - clock-names = "hs", "lp"; - #address-cells = <1>; - #size-cells = <0>; - - panel { - compatible = "samsung,s6d16d0"; - reg = <0>; - vdd1-supply = <&ab8500_ldo_aux1_reg>; - reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; - }; - - }; - dsi1: dsi@a0352000 { - compatible = "ste,mcde-dsi"; - reg = <0xa0352000 0x1000>; - vana-supply = <&ab8500_ldo_ana_reg>; - clocks = <&prcmu_clk PRCMU_DSI1CLK>, <&prcmu_clk PRCMU_DSI1ESCCLK>; - clock-names = "hs", "lp"; - #address-cells = <1>; - #size-cells = <0>; - }; - dsi2: dsi@a0353000 { - compatible = "ste,mcde-dsi"; - reg = <0xa0353000 0x1000>; - vana-supply = <&ab8500_ldo_ana_reg>; - /* This DSI port only has the Low Power / Energy Save clock */ - clocks = <&prcmu_clk PRCMU_DSI2ESCCLK>; - clock-names = "lp"; - #address-cells = <1>; - #size-cells = <0>; - }; -}; diff --git a/Documentation/devicetree/bindings/display/ste,mcde.yaml b/Documentation/devicetree/bindings/display/ste,mcde.yaml new file mode 100644 index 000000000000..51851566c72d --- /dev/null +++ b/Documentation/devicetree/bindings/display/ste,mcde.yaml @@ -0,0 +1,166 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/ste,mcde.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ST-Ericsson Multi Channel Display Engine MCDE + +maintainers: + - Linus Walleij + +properties: + compatible: + const: ste,mcde + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + description: an array of the MCDE clocks + items: + - description: MCDECLK (main MCDE clock) + - description: LCDCLK (LCD clock) + - description: PLLDSI (HDMI clock) + + clock-names: + items: + - const: mcde + - const: lcd + - const: hdmi + + epod-supply: + description: a phandle to the EPOD regulator + + vana-supply: + description: a phandle to the analog voltage regulator + + port: + type: object + description: + A DPI port node with endpoint definitions as defined in + Documentation/devicetree/bindings/media/video-interfaces.txt + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^dsi@[0-9a-f]+$": + description: subnodes for the three DSI host adapters + type: object + allOf: + - $ref: dsi-controller.yaml# + properties: + compatible: + const: ste,mcde-dsi + + reg: + maxItems: 1 + + vana-supply: + description: a phandle to the analog voltage regulator + + clocks: + description: phandles to the high speed and low power (energy save) clocks + the high speed clock is not present on the third (dsi2) block, so it + should only have the "lp" clock + minItems: 1 + maxItems: 2 + + clock-names: + oneOf: + - items: + - const: hs + - const: lp + - items: + - const: lp + + required: + - compatible + - reg + - vana-supply + - clocks + - clock-names + + unevaluatedProperties: false + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - epod-supply + - vana-supply + +additionalProperties: true + +examples: + - | + #include + #include + #include + #include + + mcde@a0350000 { + compatible = "ste,mcde"; + reg = <0xa0350000 0x1000>; + interrupts = ; + epod-supply = <&db8500_b2r2_mcde_reg>; + vana-supply = <&ab8500_ldo_ana_reg>; + clocks = <&prcmu_clk PRCMU_MCDECLK>, + <&prcmu_clk PRCMU_LCDCLK>, + <&prcmu_clk PRCMU_PLLDSI>; + clock-names = "mcde", "lcd", "hdmi"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dsi0: dsi@a0351000 { + compatible = "ste,mcde-dsi"; + reg = <0xa0351000 0x1000>; + vana-supply = <&ab8500_ldo_ana_reg>; + clocks = <&prcmu_clk PRCMU_DSI0CLK>, <&prcmu_clk PRCMU_DSI0ESCCLK>; + clock-names = "hs", "lp"; + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "samsung,s6d16d0"; + reg = <0>; + vdd1-supply = <&ab8500_ldo_aux1_reg>; + reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; + }; + }; + + dsi1: dsi@a0352000 { + compatible = "ste,mcde-dsi"; + reg = <0xa0352000 0x1000>; + vana-supply = <&ab8500_ldo_ana_reg>; + clocks = <&prcmu_clk PRCMU_DSI1CLK>, <&prcmu_clk PRCMU_DSI1ESCCLK>; + clock-names = "hs", "lp"; + #address-cells = <1>; + #size-cells = <0>; + }; + + dsi2: dsi@a0353000 { + compatible = "ste,mcde-dsi"; + reg = <0xa0353000 0x1000>; + vana-supply = <&ab8500_ldo_ana_reg>; + /* This DSI port only has the Low Power / Energy Save clock */ + clocks = <&prcmu_clk PRCMU_DSI2ESCCLK>; + clock-names = "lp"; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + +...