From patchwork Sun Apr 12 18:20:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11484653 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0FFE13B2 for ; Sun, 12 Apr 2020 18:20:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF712206C3 for ; Sun, 12 Apr 2020 18:20:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="f36j3/w4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF712206C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 029C46E126; Sun, 12 Apr 2020 18:20:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id C888D6E126 for ; Sun, 12 Apr 2020 18:20:23 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id y4so563489ljn.7 for ; Sun, 12 Apr 2020 11:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ASiH77KqT+uIPGN2ZfFxNnHDvvgHobJSFotNpJNlIq0=; b=f36j3/w4PIac6wI43iNe9WBgl5Y4J8foTCyQSghBaK1vuu7eDZMvJggaDzt/90gNYT kYrPvi7VB6Zx7TZ/ns1h4qU7o7rmA6FaGK+ZXBO/FzhCxmRPWcIaPC0HmmHtRJYUaoMd qZyfLZIw2zDJeqADcYJ3r7uRUV+adjlBe7Cq46f+ShgEvDe0Sx1IowH/UoI2VlbCNC5x gg7ru6YJgt0KSpZhAY74HwF/srLxzuVBkOqjaDzJ9fgYDcDvpaLeAl64Gd8jOhFVNp2P AYWRBrvw/YRTqefWPCk1I0Tfp/CYdbqIXYehzl9FnTqxPB3t85+73Lx89ZY+1AL2Lvfa x57w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ASiH77KqT+uIPGN2ZfFxNnHDvvgHobJSFotNpJNlIq0=; b=TCtfaG+H5LCnaLZySEbuusv56b1jmB8xMsgdXFCdJbFz5PcKSLfCJO5M9q579SbNiJ q3irnmMr7BY4SNtbxIABU2zZI3FqGvAvf061ceURq24p4wlsK0PcraKGDdPnT5ZuIjF5 psH/gxq3NtxOLsVWBemnruxKkWG2yP797KlLHRRRrtsakPavsKA82lp8RnnFSYbgQWe/ RS+sQojO839EevJ3DJKjjpo91hETOvNfgbOmqSXbD2Mz1JdmwL6HDOCM77zXzHVQw6Cu PI9S3IN4Tvl+83G9r27dYq6/kut0D6FOZq8nw5Gt9r7L3E+6Dz+z12w9Be4a8ClnT91Z /2hQ== X-Gm-Message-State: AGi0PuYMjIu79MA1WabKfAzlG08gW6zVY6ZtBcsVZIO/eeBgTuT40Uao /iwk08PsxJUQM9MHpA/LI4s= X-Google-Smtp-Source: APiQypLohagm5VawXigAmzF4HYOmsoRJOvC1c2kS6bgTv+0U7HyuTnjttLKVJkQBLxtCAulwnyhYmQ== X-Received: by 2002:a2e:985a:: with SMTP id e26mr8617976ljj.17.1586715621920; Sun, 12 Apr 2020 11:20:21 -0700 (PDT) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id m13sm6434394lfk.12.2020.04.12.11.20.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Apr 2020 11:20:21 -0700 (PDT) From: Sam Ravnborg To: devicetree@vger.kernel.org, Rob Herring , dri-devel@lists.freedesktop.org Subject: [PATCH v1 1/4] dt-bindings: display: convert atmel-hlcdc to DT Schema Date: Sun, 12 Apr 2020 20:20:09 +0200 Message-Id: <20200412182012.27515-2-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200412182012.27515-1-sam@ravnborg.org> References: <20200412182012.27515-1-sam@ravnborg.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Boris Brezillon , Nicolas Ferre , Hans Verkuil , Mauro Carvalho Chehab , Sam Ravnborg , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" atmel hlcdc is a MFD devide with two sub-devices: - PWM - Display controller Add binding files for each device: - mfd/atmel-hlcdc - this is overall device - pwm/atmel-hlcdc-pwm - the pwm part, used for backlight - display/atmel/hlcdc-dc - the display controller The hlcdc IP is present in several different chips from microchip (former Atmel). The individual chips has independent compatibles in the mfd binding, to allow for chip specific configuration. As the conversion is a full re-write there was no tie to the original license, and the standard license for bindings is used. Signed-off-by: Sam Ravnborg Cc: Boris Brezillon --- .../bindings/display/atmel/hlcdc-dc.txt | 75 ------------- .../bindings/display/atmel/hlcdc-dc.yaml | 102 ++++++++++++++++++ .../devicetree/bindings/mfd/atmel-hlcdc.txt | 55 ---------- .../devicetree/bindings/mfd/atmel-hlcdc.yaml | 78 ++++++++++++++ .../bindings/pwm/atmel-hlcdc-pwm.txt | 29 ----- .../bindings/pwm/atmel-hlcdc-pwm.yaml | 39 +++++++ 6 files changed, 219 insertions(+), 159 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt create mode 100644 Documentation/devicetree/bindings/display/atmel/hlcdc-dc.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt create mode 100644 Documentation/devicetree/bindings/mfd/atmel-hlcdc.yaml delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt create mode 100644 Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.yaml diff --git a/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt deleted file mode 100644 index 0398aec488ac..000000000000 --- a/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt +++ /dev/null @@ -1,75 +0,0 @@ -Device-Tree bindings for Atmel's HLCDC (High LCD Controller) DRM driver - -The Atmel HLCDC Display Controller is subdevice of the HLCDC MFD device. -See ../../mfd/atmel-hlcdc.txt for more details. - -Required properties: - - compatible: value should be "atmel,hlcdc-display-controller" - - pinctrl-names: the pin control state names. Should contain "default". - - pinctrl-0: should contain the default pinctrl states. - - #address-cells: should be set to 1. - - #size-cells: should be set to 0. - -Required children nodes: - Children nodes are encoding available output ports and their connections - to external devices using the OF graph reprensentation (see ../graph.txt). - At least one port node is required. - -Optional properties in grandchild nodes: - Any endpoint grandchild node may specify a desired video interface - according to ../../media/video-interfaces.txt, specifically - - bus-width: recognized values are <12>, <16>, <18> and <24>, and - override any output mode selection heuristic, forcing "rgb444", - "rgb565", "rgb666" and "rgb888" respectively. - -Example: - - hlcdc: hlcdc@f0030000 { - compatible = "atmel,sama5d3-hlcdc"; - reg = <0xf0030000 0x2000>; - interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>; - clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>; - clock-names = "periph_clk","sys_clk", "slow_clk"; - - hlcdc-display-controller { - compatible = "atmel,hlcdc-display-controller"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>; - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0>; - - hlcdc_panel_output: endpoint@0 { - reg = <0>; - remote-endpoint = <&panel_input>; - }; - }; - }; - - hlcdc_pwm: hlcdc-pwm { - compatible = "atmel,hlcdc-pwm"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_lcd_pwm>; - #pwm-cells = <3>; - }; - }; - -Example 2: With a video interface override to force rgb565; as above -but with these changes/additions: - - &hlcdc { - hlcdc-display-controller { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb565>; - - port@0 { - hlcdc_panel_output: endpoint@0 { - bus-width = <16>; - }; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.yaml b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.yaml new file mode 100644 index 000000000000..7eb6266a25a2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/atmel/hlcdc-dc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel HLCDC (High LCD Controller) display controller + +maintainers: + - Sam Ravnborg + - Boris Brezillon + +description: | + The Atmel HLCDC Display Controller is subdevice of the HLCDC MFD device. + See ../../mfd/atmel-hlcdc.yaml for more details. + +properties: + compatible: + const: atmel,hlcdc-display-controller + + "#address-cells": + const: 1 + "#size-cells": + const: 0 + +required: + - compatible + - "#address-cells" + - "#size-cells" + +patternProperties: + "^port@[0-9]$": + type: object + description: | + A port node with endpoint definitions as defined in + ../../media/video-interfaces.txt + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + reg: + maxItems: 1 + description: The virtual number of the port + + patternProperties: + "^endpoint(@[0-9])$": + type: object + + properties: + reg: + maxItems: 1 + description: The virtual number of the endpoint + + bus-width: + enum: [12, 16, 18, 24] + description: + Any endpoint node may specify a desired video interface + according to ../../media/video-interfaces.txt, specifically + Recognized values are <12>, <16>, <18> and <24>, and + override any output mode selection heuristic, forcing + "rgb444", "rgb565", "rgb666" and "rgb888" respectively. + + remote-endpoint: + $ref: /schemas/types.yaml#/definitions/phandle + description: + phandle to the panel node + + required: + - reg + + required: + - "#address-cells" + - "#size-cells" + - reg + +additionalProperties: false + +examples: + - | + hlcdc-display-controller { + compatible = "atmel,hlcdc-display-controller"; + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + endpoint@0 { + reg = <0>; + bus-width = <16>; + remote-endpoint = <&panel_input>; + }; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt deleted file mode 100644 index 5f8880cc757e..000000000000 --- a/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt +++ /dev/null @@ -1,55 +0,0 @@ -Device-Tree bindings for Atmel's HLCDC (High LCD Controller) MFD driver - -Required properties: - - compatible: value should be one of the following: - "atmel,at91sam9n12-hlcdc" - "atmel,at91sam9x5-hlcdc" - "atmel,sama5d2-hlcdc" - "atmel,sama5d3-hlcdc" - "atmel,sama5d4-hlcdc" - "microchip,sam9x60-hlcdc" - - reg: base address and size of the HLCDC device registers. - - clock-names: the name of the 3 clocks requested by the HLCDC device. - Should contain "periph_clk", "sys_clk" and "slow_clk". - - clocks: should contain the 3 clocks requested by the HLCDC device. - - interrupts: should contain the description of the HLCDC interrupt line - -The HLCDC IP exposes two subdevices: - - a PWM chip: see ../pwm/atmel-hlcdc-pwm.txt - - a Display Controller: see ../display/atmel/hlcdc-dc.txt - -Example: - - hlcdc: hlcdc@f0030000 { - compatible = "atmel,sama5d3-hlcdc"; - reg = <0xf0030000 0x2000>; - clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>; - clock-names = "periph_clk","sys_clk", "slow_clk"; - interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>; - - hlcdc-display-controller { - compatible = "atmel,hlcdc-display-controller"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>; - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0>; - - hlcdc_panel_output: endpoint@0 { - reg = <0>; - remote-endpoint = <&panel_input>; - }; - }; - }; - - hlcdc_pwm: hlcdc-pwm { - compatible = "atmel,hlcdc-pwm"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_lcd_pwm>; - #pwm-cells = <3>; - }; - }; diff --git a/Documentation/devicetree/bindings/mfd/atmel-hlcdc.yaml b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.yaml new file mode 100644 index 000000000000..cad14fa173a1 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.yaml @@ -0,0 +1,78 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/atmel-hlcdc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Device-Tree bindings for Atmel's HLCDC (High LCD Controller) + +maintainers: + - Sam Ravnborg + - Boris Brezillon + +properties: + compatible: + enum: + - atmel,at91sam9n12-hlcdc + - atmel,at91sam9x5-hlcdc + - atmel,sama5d2-hlcdc + - atmel,sama5d3-hlcdc + - atmel,sama5d4-hlcdc + - microchip,sam9x60-hlcdc + + reg: + maxItems: 1 + + clocks: + maxItems: 3 + + clock-names: + maxItems: 3 + items: + - const: periph_clk + - const: sys_clk + - const: slow_clk + + interrupts: + description: The HLCDC interrupt line + maxItems: 1 + + hlcdc_pwm: + type: object + description: | + PWM controller - used for backlight. + See ../pwm/atmel-hlcdc-pwm.yaml for details + + hlcdc-display-controller: + type: object + description: | + LCD display controller + See ../display/atmel/hlcdc-dc.yaml for details + +required: + - compatible + - reg + - clocks + - interrupts + +additionalProperties: false + +examples: + - | + #include + + hlcdc { + compatible = "atmel,sama5d3-hlcdc"; + reg = <0xf0030000 0x2000>; + clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>; + clock-names = "periph_clk","sys_clk", "slow_clk"; + interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>; + + hlcdc-display-controller { + }; + + hlcdc_pwm { + }; + }; + +... diff --git a/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt b/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt deleted file mode 100644 index afa501bf7f94..000000000000 --- a/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt +++ /dev/null @@ -1,29 +0,0 @@ -Device-Tree bindings for Atmel's HLCDC (High-end LCD Controller) PWM driver - -The Atmel HLCDC PWM is subdevice of the HLCDC MFD device. -See ../mfd/atmel-hlcdc.txt for more details. - -Required properties: - - compatible: value should be one of the following: - "atmel,hlcdc-pwm" - - pinctr-names: the pin control state names. Should contain "default". - - pinctrl-0: should contain the pinctrl states described by pinctrl - default. - - #pwm-cells: should be set to 3. This PWM chip use the default 3 cells - bindings defined in pwm.yaml in this directory. - -Example: - - hlcdc: hlcdc@f0030000 { - compatible = "atmel,sama5d3-hlcdc"; - reg = <0xf0030000 0x2000>; - clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>; - clock-names = "periph_clk","sys_clk", "slow_clk"; - - hlcdc_pwm: hlcdc-pwm { - compatible = "atmel,hlcdc-pwm"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_lcd_pwm>; - #pwm-cells = <3>; - }; - }; diff --git a/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.yaml new file mode 100644 index 000000000000..70d063b48260 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.yaml @@ -0,0 +1,39 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/atmel-hlcdc-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Device-Tree bindings for Atmel's HLCDC (High-end LCD Controller) PWM + +maintainers: + - Sam Ravnborg + - Boris Brezillon + +description: | + The Atmel HLCDC PWM is subdevice of the HLCDC MFD device. + See ../mfd/atmel-hlcdc.txt for more details. + +properties: + compatible: + const: atmel,hlcdc-pwm + + "#pwm-cells": + const: 3 + description: + This PWM chip use the default 3 cells bindings defined in pwm.yaml. + +required: + - compatible + - "#pwm-cells" + +additionalProperties: false + +examples: + - | + hlcdc_pwm { + compatible = "atmel,hlcdc-pwm"; + #pwm-cells = <3>; + }; + +... From patchwork Sun Apr 12 18:20:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11484651 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ABDB313B2 for ; Sun, 12 Apr 2020 18:20:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8A111206C3 for ; Sun, 12 Apr 2020 18:20:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="W/4THMap" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A111206C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2743F6E12A; Sun, 12 Apr 2020 18:20:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id 045B26E126 for ; Sun, 12 Apr 2020 18:20:24 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id h6so5011975lfc.0 for ; Sun, 12 Apr 2020 11:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0pbLfr+nqgYUtCdJqqKNf5Tp0hM3f65yvGA3bZ3B05c=; b=W/4THMap5VWgZDYSArlhOr/33w32rR4CrPznKwmf4eV2YeNbx38QUxz5LIYOC1XUvy QynF4DiZhe7K72ILNnLVmWYt0LElk/+22TpObOkdthky9U2bZoHrBemU7FssxMaolzr9 OHnNY8ppUS93RaVSkq+1MUtg0yHEs2ORexVabJ8FFXQ9wqzZy9Uhks9s14AJnJKccOSR Ua9ZyAM2UDq1YSxtliwJAe29MgAsRdIIjD6RATDIr5mSfBuq1NtATe57ARWO7qnvhnj5 zTbBmEA3msDdK4CFjFJwiiAFSeY7isfdvSuQawtCkuB+LqXv2VdPAiUgSe+YOjswPCkz qTSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=0pbLfr+nqgYUtCdJqqKNf5Tp0hM3f65yvGA3bZ3B05c=; b=QZBQzTrx84x682yFOerFAC+1L8Nwu4rwLbVRiw/b3KmmHlWjk7P7OV3FJ9XIrm2wNW pwNmFq1X7cHcsyZJVIcLm2+axOY5qWOC/mf+LXGc1zyAD5usq+VPK7mV43ShwrEjcgM5 BwWWuLzb5YKklZ7002b5irPw18NVdE1u7l8R+tHkeyE/hlaOLjnS67qki+2KBLIvkOcs rs6d8Ims7bEPezv6362BqHN9oBAV5lssCOPftnrGtI3lFRKMlPfqqu5xY/ayxUB6EekD euKrwvzktpwPlVlgHMrHoKQUz0KOPRxphcK5nTj0bRwQ7qMHnkNPSPhjJULsTH0WbKuF 0UsA== X-Gm-Message-State: AGi0PuZL0jK+HkcWzwzpv5bXEzCFrVypmuMUC+giM78FpOHPCIzAp5vU mQlgG8xzChsjU/IewmG6s7w= X-Google-Smtp-Source: APiQypLNQSDf9U1QklVk237XXcfj1gMY0TpODl2xX9qpvSdr5iq3/V3MK6IVO8SZUNmLTlln272Snw== X-Received: by 2002:ac2:57cb:: with SMTP id k11mr8378106lfo.19.1586715623259; Sun, 12 Apr 2020 11:20:23 -0700 (PDT) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id m13sm6434394lfk.12.2020.04.12.11.20.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Apr 2020 11:20:22 -0700 (PDT) From: Sam Ravnborg To: devicetree@vger.kernel.org, Rob Herring , dri-devel@lists.freedesktop.org Subject: [PATCH v1 2/4] dt-bindings: display: convert atmel lcdc to DT Schema Date: Sun, 12 Apr 2020 20:20:10 +0200 Message-Id: <20200412182012.27515-3-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200412182012.27515-1-sam@ravnborg.org> References: <20200412182012.27515-1-sam@ravnborg.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Boris Brezillon , Nicolas Ferre , Hans Verkuil , Mauro Carvalho Chehab , Sam Ravnborg , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add a new binding file to describe the bindings for the Atmel LCDC IP. This replaces the old txt based binding. The binding file describes the current binding, including properties to specify register values etc. The binding will be updated in a follow-up patch, the current binding describes the actual situation. This new binding file replaces the old .txt based binding which is deleted. Signed-off-by: Sam Ravnborg --- .../bindings/display/atmel,lcdc.txt | 88 ----------- .../bindings/display/atmel/lcdc.yaml | 137 ++++++++++++++++++ 2 files changed, 137 insertions(+), 88 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/atmel,lcdc.txt create mode 100644 Documentation/devicetree/bindings/display/atmel/lcdc.yaml diff --git a/Documentation/devicetree/bindings/display/atmel,lcdc.txt b/Documentation/devicetree/bindings/display/atmel,lcdc.txt deleted file mode 100644 index acb5a0132127..000000000000 --- a/Documentation/devicetree/bindings/display/atmel,lcdc.txt +++ /dev/null @@ -1,88 +0,0 @@ -Atmel LCDC Framebuffer ------------------------------------------------------ - -Required properties: -- compatible : - "atmel,at91sam9261-lcdc" , - "atmel,at91sam9263-lcdc" , - "atmel,at91sam9g10-lcdc" , - "atmel,at91sam9g45-lcdc" , - "atmel,at91sam9g45es-lcdc" , - "atmel,at91sam9rl-lcdc" , - "atmel,at32ap-lcdc" -- reg : Should contain 1 register ranges(address and length). - Can contain an additional register range(address and length) - for fixed framebuffer memory. Useful for dedicated memories. -- interrupts : framebuffer controller interrupt -- display: a phandle pointing to the display node - -Required nodes: -- display: a display node is required to initialize the lcd panel - This should be in the board dts. -- default-mode: a videomode within the display with timing parameters - as specified below. - -Optional properties: -- lcd-supply: Regulator for LCD supply voltage. - -Example: - - fb0: fb@00500000 { - compatible = "atmel,at91sam9g45-lcdc"; - reg = <0x00500000 0x1000>; - interrupts = <23 3 0>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_fb>; - display = <&display0>; - #address-cells = <1>; - #size-cells = <1>; - - }; - -Example for fixed framebuffer memory: - - fb0: fb@00500000 { - compatible = "atmel,at91sam9263-lcdc"; - reg = <0x00700000 0x1000 0x70000000 0x200000>; - [...] - }; - -Atmel LCDC Display ------------------------------------------------------ -Required properties (as per of_videomode_helper): - - - atmel,dmacon: dma controller configuration - - atmel,lcdcon2: lcd controller configuration - - atmel,guard-time: lcd guard time (Delay in frame periods) - - bits-per-pixel: lcd panel bit-depth. - -Optional properties (as per of_videomode_helper): - - atmel,lcdcon-backlight: enable backlight - - atmel,lcdcon-backlight-inverted: invert backlight PWM polarity - - atmel,lcd-wiring-mode: lcd wiring mode "RGB" or "BRG" - - atmel,power-control-gpio: gpio to power on or off the LCD (as many as needed) - -Example: - display0: display { - bits-per-pixel = <32>; - atmel,lcdcon-backlight; - atmel,dmacon = <0x1>; - atmel,lcdcon2 = <0x80008002>; - atmel,guard-time = <9>; - atmel,lcd-wiring-mode = <1>; - - display-timings { - native-mode = <&timing0>; - timing0: timing0 { - clock-frequency = <9000000>; - hactive = <480>; - vactive = <272>; - hback-porch = <1>; - hfront-porch = <1>; - vback-porch = <40>; - vfront-porch = <1>; - hsync-len = <45>; - vsync-len = <1>; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/display/atmel/lcdc.yaml b/Documentation/devicetree/bindings/display/atmel/lcdc.yaml new file mode 100644 index 000000000000..7dcb9a4d5902 --- /dev/null +++ b/Documentation/devicetree/bindings/display/atmel/lcdc.yaml @@ -0,0 +1,137 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/atmel/lcdc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel LCDC (LCD Controller) display controller with PWM + +maintainers: + - Sam Ravnborg + +description: | + The Atmel LCDC Display Controller is display controller that + includes a PWM for backlight/contrast. + +properties: + compatible: + enum: + - atmel,at91sam9261-lcdc + - atmel,at91sam9263-lcdc + - atmel,at91sam9g10-lcdc + - atmel,at91sam9g45-lcdc + - atmel,at91sam9g45es-lcdc + - atmel,at91sam9g46-lcdc + - atmel,at91sam9m10-lcdc + - atmel,at91sam9m11-lcdc + - atmel,at91sam9rl-lcdc + + "#address-cells": + const: 1 + "#size-cells": + const: 0 + + reg: + description: | + Contains 1 register range (address and length). + Can contain an additional register range (address and length) + for fixed framebuffer memory + + interrupts: + maxItems: 1 + + lcd-supply: + description: Regulator for LCD supply voltage. + + display: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to display node + +patternProperties: + "^display[0-9]$": + type: object + description: | + Display node is required to initialize the lcd panel. + This should be in the board dts + + properties: + + atmel,dmacon: + $ref: /schemas/types.yaml#/definitions/uint32 + description: DMA controller configuration + + atmel,lcdcon2: + $ref: /schemas/types.yaml#/definitions/uint32 + description: LCD controller configuration + + atmel,guard-time: + $ref: /schemas/types.yaml#/definitions/uint32 + description: LCD guard time (Delay in frame periods) + + bits-per-pixel: + $ref: /schemas/types.yaml#/definitions/uint32 + description: LCD panel bit-depth. + + atmel,lcdcon-backlight: + type: boolean + description: Enable backlight + + atmel,lcdcon-backlight-inverted: + type: boolean + description: Invert backlight PWM polarity + + atmel,lcd-wiring-mode: + enum: + - RGB + - BGR + description: LCD wiring mode + + atmel,power-control-gpio: + description: gpio to power on or off the LCD + + display-timings: + type: object + description: | + display-timings node as described in ../display-timings.yaml + + required: + - atmel,dmacon + - atmel,lcdcon2 + - atmel,guard-time + - bits-per-pixel + - display-timings + +required: + - compatible + - reg + +examples: + - | + fb { + compatible = "atmel,at91sam9263-lcdc"; + reg = <0x00700000 0x1000>; + interrupts = <23 3 0>; + #address-cells = <1>; + #size-cells = <0>; + }; + + - | + fb { + compatible = "atmel,at91sam9263-lcdc"; + reg = <0x00700000 0x1000 0x70000000 0x200000>; + display = <&display0>; + + display0 { + bits-per-pixel = <32>; + atmel,lcdcon-backlight; + atmel,dmacon = <0x1>; + atmel,lcdcon2 = <0x80008002>; + atmel,guard-time = <9>; + atmel,lcd-wiring-mode = "BGR"; + + display-timings { + }; + }; + }; + +... From patchwork Sun Apr 12 18:20:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11484655 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BE85713B2 for ; Sun, 12 Apr 2020 18:20:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9CDE3206C3 for ; Sun, 12 Apr 2020 18:20:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hipBb+D/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9CDE3206C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C2786E12E; Sun, 12 Apr 2020 18:20:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0F49C6E127 for ; Sun, 12 Apr 2020 18:20:26 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id v16so6765137ljg.5 for ; Sun, 12 Apr 2020 11:20:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=did1T2/HwLMbYWYOlmzUGj6USB2Yk/B/7FfjOftQ9s8=; b=hipBb+D/jP/qEHd5BxbwYSODqx8BortuRIMkzRERp+XNGiT4yk7To7/dmj1lelc1as +0NSQvV64w2t/PnzKb1LJ3XbFzahoqefh/RWPrxsSegizIkWgg36JQCN7Pzo1nK5cvN0 lJGNzou6X3se3VQTxHXXbePUXVNBOzKlaBO7QS8ktk7UZG46dTbDykrRvVjsRkLAqgvJ nurSgm8718ek6yzWafK9i7ZgFVeXqFJyZ81gy03GMLVQhUJHCwpBjnj6wwSdxV6cn8Pu EsR5rTAsyO+knJtNRCnAFVxaQC0KxbtqlP0eGap3QBlcASp7GH3XKhXAjIACUV/Pci/X cG2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=did1T2/HwLMbYWYOlmzUGj6USB2Yk/B/7FfjOftQ9s8=; b=tELv/uihRLwAh/+3GnE1HHz5GL0cpXu15n1YpsBtKY309V23bImEmktOQ+8sJbb9GG nRs9JtA8UPDRXOeP/W1sYQEtr/RVge2VjnBuuuCFgOJ9yniKwkNwNkob+qKozR9mCcp6 67v2sWc3CP9S0pvXBP4bI8z366H54+KqywDmMFEpLImbvUp+RxWOXFKLqiNa0Mr4lyka b7Dbt8jnwvFaXshLAu8lJ7H1+bV9IsyB0JqNhhaNhVSoEDt89Z4pDSOsvAbAKmv6bDeW SXPG9Avi81OV4a96ZynC3oJHYl2V8cy/tS2hCAVdKG9RO9nvNoCmfd62dtUs4VcOmvGr 0zsA== X-Gm-Message-State: AGi0PuZN19FlvYL/XfbRi7apDy1RbQAoM+FYk8252v9lHqnBMGjeKVqt kNQ9Q45JULj+TQ4/1OlKavE= X-Google-Smtp-Source: APiQypLW6zIR1umbR/uxwiVl6Mu1txVZ1wgbVD7efr/eOYIQSegWjWS1ZWxFJ0MQHCvZ9C0SrDDCRg== X-Received: by 2002:a2e:7d09:: with SMTP id y9mr8491929ljc.146.1586715624424; Sun, 12 Apr 2020 11:20:24 -0700 (PDT) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id m13sm6434394lfk.12.2020.04.12.11.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Apr 2020 11:20:23 -0700 (PDT) From: Sam Ravnborg To: devicetree@vger.kernel.org, Rob Herring , dri-devel@lists.freedesktop.org Subject: [PATCH v1 3/4] dt-bindings: media: add wiring property to video-interfaces Date: Sun, 12 Apr 2020 20:20:11 +0200 Message-Id: <20200412182012.27515-4-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200412182012.27515-1-sam@ravnborg.org> References: <20200412182012.27515-1-sam@ravnborg.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Boris Brezillon , Nicolas Ferre , Hans Verkuil , Mauro Carvalho Chehab , Sam Ravnborg , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The wiring property is used to describe the wiring between the connector and the panel. The property can be used when the wiring is used to change the mode from for example BGR to RGB. The first users are the at91sam9 family where such a wiring trick is sometimes used. The possilbe values are so far limited to what is required by the at91sam9 family, but using "text" allows us to extend this in the future. There exists similar properties today: - display/tilcdc/tilcdc.txt: blue-and-red-wiring - display/atmel,lcdc.txt: atmel,lcd-wiring-mode Neither of the above are defined as endpoint properties. The new property "wiring" has a more general name and is defined as an endpoint property. It will replace atmel,lcd-wiring-mode and may replace blue-and-red-wiring. Signed-off-by: Sam Ravnborg Cc: Mauro Carvalho Chehab Cc: Rob Herring Cc: Hans Verkuil Cc: linux-media@vger.kernel.org --- Documentation/devicetree/bindings/media/video-interfaces.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt index f884ada0bffc..c3bb87c5c9a9 100644 --- a/Documentation/devicetree/bindings/media/video-interfaces.txt +++ b/Documentation/devicetree/bindings/media/video-interfaces.txt @@ -141,6 +141,9 @@ Optional endpoint properties - link-frequencies: Allowed data bus frequencies. For MIPI CSI-2, for instance, this is the actual frequency of the bus, not bits per clock per lane value. An array of 64-bit unsigned integers. +- wiring: Wiring of data lines to display. + "straight" - normal wiring. + "red-blue-reversed" - red and blue lines reversed. - lane-polarities: an array of polarities of the lanes starting from the clock lane and followed by the data lanes in the same order as in data-lanes. Valid values are 0 (normal) and 1 (inverted). The length of the array From patchwork Sun Apr 12 18:20:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11484657 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6B19B15AB for ; Sun, 12 Apr 2020 18:20:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4987E206C3 for ; Sun, 12 Apr 2020 18:20:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="O3gdcKnk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4987E206C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E1BE76E134; Sun, 12 Apr 2020 18:20:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 215286E13A for ; Sun, 12 Apr 2020 18:20:27 +0000 (UTC) Received: by mail-lf1-x141.google.com with SMTP id h6so5012014lfc.0 for ; Sun, 12 Apr 2020 11:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=s7PyP7wM+hSmqY+Nl4dhHB6/+lR7BTTva1Z1R03Oe1A=; b=O3gdcKnk6nH6vW/0o9T/tib9LsIjIxtq7DG8LrEag2qjwgCdtswUsLnNipTw+jT4mP e6cbPPRL2CNlRKZQh2uOMyQo8DyoWKT/QaNU20nlUtHfdcRUNBK4L6HBlspqSom+34R3 j5TopCMaCD4NhkoQu4G+WM7fTFuXOdCPJ4KUsfEo9ysytuqSgn7sMNY/2udkVmdpe+Sq E6lHiaVugK/D0cp8oht8TJynVaMa1uDkGVpjyHYgwvMMhfaYM0BhWCdi9naledajb1/J HXbSROWbXH982peXfJctgLkwg1M88T2iLbE70T8ApVkffnPJ8+xumdNgXwejrBbJmrne 2Cog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=s7PyP7wM+hSmqY+Nl4dhHB6/+lR7BTTva1Z1R03Oe1A=; b=qHRXAHRe50HcQkv9dUTzPQ0E4YYPIOLsmiRntLEJyWEP7j2qRYeDs7IOClf5YA9O50 s9eFjMyl3D3uP9n5YznqPJYvgCGAO6uUuD954OglvDpBvF9cHU5fmokeN6pnvA/CFbtL 43JZuTwXM71y4l/6gWUiT9SCZJNEAPFkb88yydYbx7VLYZ4OKqz9e3g5x0RLQu0EfLFH cE2QTZyhoYCmyfe16UDvld4IPOGaZ/PVg8m57ISzGV9ANe93nNug7qwbWq5FHaimc+jR p/csy6S6zJ9GmrUeEgfn5saoCvlRU35Doj/mXp2MQExuG+OrhKEkn9sougdT9MLZ7sWJ aRhQ== X-Gm-Message-State: AGi0PubjnAAp78HiE/UWXhQJn8or99UXFbqdvDMd48ugSF3daTlJZTWo 1gESKvn6nt478oFyU1XwP5A= X-Google-Smtp-Source: APiQypJSXZxot3B6tsVUM4YKg3cHraXKHQBplcVR54rLr6Cr3IwsfjmqDogPJQNAHRKGcEqAoTxaPg== X-Received: by 2002:a05:6512:10c9:: with SMTP id k9mr8379271lfg.183.1586715625482; Sun, 12 Apr 2020 11:20:25 -0700 (PDT) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id m13sm6434394lfk.12.2020.04.12.11.20.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Apr 2020 11:20:25 -0700 (PDT) From: Sam Ravnborg To: devicetree@vger.kernel.org, Rob Herring , dri-devel@lists.freedesktop.org Subject: [PATCH v1 4/4] dt-bindings: display: add port support to atmel lcdc Date: Sun, 12 Apr 2020 20:20:12 +0200 Message-Id: <20200412182012.27515-5-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200412182012.27515-1-sam@ravnborg.org> References: <20200412182012.27515-1-sam@ravnborg.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Boris Brezillon , Nicolas Ferre , Hans Verkuil , Mauro Carvalho Chehab , Sam Ravnborg , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Update the Atmel LCDC binding to include: - pwm. Used for backlight - endpoints using port node Used for handle to panel - Added wiring property that is used to describe the wiring between the LCDC and the panel Existing properties that should not be used in new bindings are deprecated. Updated example to include the updated way to specify panel etc. Signed-off-by: Sam Ravnborg --- .../bindings/display/atmel/lcdc.yaml | 94 ++++++++++++++++++- 1 file changed, 93 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/atmel/lcdc.yaml b/Documentation/devicetree/bindings/display/atmel/lcdc.yaml index 7dcb9a4d5902..b5c2628f7805 100644 --- a/Documentation/devicetree/bindings/display/atmel/lcdc.yaml +++ b/Documentation/devicetree/bindings/display/atmel/lcdc.yaml @@ -28,6 +28,7 @@ properties: "#address-cells": const: 1 + "#size-cells": const: 0 @@ -43,13 +44,84 @@ properties: lcd-supply: description: Regulator for LCD supply voltage. + "#pwm-cells": + description: + This PWM chip use the default 3 cells bindings + defined in ../../pwm/pwm.yaml. + const: 3 + + clocks: + maxItems: 2 + + clock-names: + maxItems: 2 + items: + - const: lcdc_clk + - const: hclk + + port@0: + type: object + description: Endpoints of the display controller + + properties: + + reg: + const: 0 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + endpoint@0: + type: object + description: endpoint node that include phandle to panel + + properties: + + reg: + const: 0 + + wiring: + enum: + - straight + - red-blue-reversed + description: | + The LCDC is based on a blue-green-red configuration but to adapt + to SW only supporting red-green-blue the data lines for red and blue + may be reversed. + See details in: http://ww1.microchip.com/downloads/en/AppNotes/doc6300.pdf + "straight" - default value. Data lines are not reversed, uses BGR + "red-blue-reversed" - red and green are reversed, uses RGB + + remote-endpoint: + $ref: /schemas/types.yaml#/definitions/phandle + description: + phandle to the panel node + + required: + - reg + - remote-endpoint + + additionalProperties: false + + required: + - "#address-cells" + - "#size-cells" + - reg + + additionalProperties: false + display: $ref: /schemas/types.yaml#/definitions/phandle + deprecated: true description: phandle to display node patternProperties: "^display[0-9]$": type: object + deprecated: true description: | Display node is required to initialize the lcd panel. This should be in the board dts @@ -107,12 +179,32 @@ required: examples: - | + #include + #include + fb { compatible = "atmel,at91sam9263-lcdc"; reg = <0x00700000 0x1000>; - interrupts = <23 3 0>; + interrupts = <26 IRQ_TYPE_LEVEL_HIGH 3>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 26>, <&pmc PMC_TYPE_PERIPHERAL 26>; + clock-names = "lcdc_clk", "hclk"; + + /* pwm for backlight */ + #pwm-cells = <3>; + #address-cells = <1>; #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + endpoint@0 { + reg = <0>; + wiring = "red-blue-reversed"; + remote-endpoint = <&panel_input>; + }; + }; }; - |