Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4582832ybp; Mon, 14 Oct 2019 07:00:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8ekpMCEuUN4+86KH3gfVjM0FG+qnh/3Y3QLPOMV5PpvuVQZCFRX3s0ctAF8P+Q+3NSBtt X-Received: by 2002:a50:c304:: with SMTP id a4mr28528736edb.303.1571061627493; Mon, 14 Oct 2019 07:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571061627; cv=none; d=google.com; s=arc-20160816; b=B2/hUH2E6B7Ahv4PqGFV1RbZAErenxisJkjXrGWJ7xVAm1QN+5vwMw49NeCT3Fc5dw ZmcQ/T3BFFwvKkw8OcoLCvTtaat1IrotRLXP01Z4yPgKF6nKFbKyYSEoZUSGhIPmgFqO 92zCMfoqWCwOZVB2DtNseiAGbXPq1eTaZZ1Jw+0eBR7woFCOVNnyg7OQ51B71N0Ny5Xc jbw/cGsahq3v1Gb9pJKFD3ywKJnh9efRg4gPRXREY7IuNyp8zy70JmUPcEh03ajbnrRv tiRGWndxpq8TtM2RgDlaFaXnxfqSOCa84sFJIoypIPttEOjtDOmzfPkKhm6PtYqf7Cyo Ymww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Pgg5RdBV3ao1jZeALf8Mqv+dnFY3MbIxheh4qapmE5g=; b=tW/o9I0bPjAHCq28Orq5kywuOYrvpzSxPEd0L2+YOtEzmle2Sre7J4KdVzImiv0uvR 4Qfq33Dl84P8iePlDoW0eg0wMfmg8ZzAhvhurM7CvssQbxdqoUyFGeZ83/yp3oK3bjiN PRfyr1v0fN6W3J/EMjWbSsm6opnZqUsb6il7N8+Y8+A5gy5MXJnHB/dIxukdfjvOz0sn sMLUH8Zmt+WOkZh3ZS9GrPXDI2aflQp6crcg18YqSXFIaZLOlv6gNpjLN9FDOy8ttASX EKxZM1x8lLd5yBkELJAKo3kCiUP+nYZ5tGMhWEqiFdkY1jMkAt1SeU2bSr/y1fNluOtV 2Qiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WhWA0Z26; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y27si13854796edd.249.2019.10.14.07.00.03; Mon, 14 Oct 2019 07:00:27 -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=@kernel.org header.s=default header.b=WhWA0Z26; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732350AbfJNN50 (ORCPT + 99 others); Mon, 14 Oct 2019 09:57:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:43302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730477AbfJNN50 (ORCPT ); Mon, 14 Oct 2019 09:57:26 -0400 Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 86B2D21A4A; Mon, 14 Oct 2019 13:57:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571061444; bh=LLH2uQ5gYg+SBXTksDYlU+T3+fs82qQa6ba8XCr/GLI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=WhWA0Z26YBfhBAV8RCEZEMYp1v+sqt+colar2WnzuXDlL8iW6T6nbdwUUz7lR8xRD k0e4PvOQpMwHU+2BFSDNQzxl86uVe5XU5vttQ3NcDIoX47dI8JTqJVYmbE02q9jLiH nUhPVzxIyECh8oC7bBNWteH980agEaehLbva3a1w= Received: by mail-qt1-f177.google.com with SMTP id w14so25522096qto.9; Mon, 14 Oct 2019 06:57:24 -0700 (PDT) X-Gm-Message-State: APjAAAUVQuV76dR08KCLMQTH23BGbX7FB9mZsU9tnsOwYQ8kycto0+SB tzW383NdNFW3i8apbb9zfzaEA8sEQ3Py/znyEA== X-Received: by 2002:ac8:6782:: with SMTP id b2mr32574382qtp.143.1571061443573; Mon, 14 Oct 2019 06:57:23 -0700 (PDT) MIME-Version: 1.0 References: <20191014091622.23562-1-benjamin.gaignard@st.com> In-Reply-To: <20191014091622.23562-1-benjamin.gaignard@st.com> From: Rob Herring Date: Mon, 14 Oct 2019 08:57:11 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3] dt-bindings: display: Convert stm32 display bindings to json-schema To: Benjamin Gaignard Cc: David Airlie , Daniel Vetter , Mark Rutland , Alexandre Torgue , Yannick Fertre , Philippe Cornu , dri-devel , devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 14, 2019 at 4:16 AM Benjamin Gaignard wrote: > > Convert the STM32 display binding to DT schema format using json-schema. > Split the original bindings in two yaml files: > - one for display controller (ltdc) > - one for DSI controller > > Signed-off-by: Benjamin Gaignard > --- > changes in v3: > - use (GPL-2.0-only OR BSD-2-Clause) license > > changes in v2: > - use BSD-2-Clause license > - add panel property > - fix identation > - remove pinctrl-names: true > - remove pinctrl-[0-9]+: true > - rework ports block to include port@0 and port@1 > - use const for #adress-cells and #size-cells > - add additionalProperties: false > > .../devicetree/bindings/display/st,stm32-dsi.yaml | 151 +++++++++++++++++++++ > .../devicetree/bindings/display/st,stm32-ltdc.txt | 144 -------------------- > .../devicetree/bindings/display/st,stm32-ltdc.yaml | 81 +++++++++++ > 3 files changed, 232 insertions(+), 144 deletions(-) > create mode 100644 Documentation/devicetree/bindings/display/st,stm32-dsi.yaml > delete mode 100644 Documentation/devicetree/bindings/display/st,stm32-ltdc.txt > create mode 100644 Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml > > diff --git a/Documentation/devicetree/bindings/display/st,stm32-dsi.yaml b/Documentation/devicetree/bindings/display/st,stm32-dsi.yaml > new file mode 100644 > index 000000000000..8dd727c7533e > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/st,stm32-dsi.yaml > @@ -0,0 +1,151 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/display/st,stm32-dsi.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: STMicroelectronics STM32 DSI host controller > + > +maintainers: > + - Philippe Cornu > + - Yannick Fertre > + > +description: > + The STMicroelectronics STM32 DSI controller uses the Synopsys DesignWare MIPI-DSI host controller. > + > +properties: > + compatible: > + const: st,stm32-dsi > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: Module Clock > + - description: DSI bus clock > + - description: Pixel clock > + minItems: 2 > + maxItems: 3 > + > + clock-names: > + items: > + - const: pclk > + - const: ref > + - const: px_clk > + minItems: 2 > + maxItems: 3 > + > + resets: > + maxItems: 1 > + > + reset-names: > + items: > + - const: apb > + > + phy-dsi-supply: > + maxItems: 1 > + description: > + Phandle of the regulator that provides the supply voltage. > + > + ports: > + type: object > + description: > + A node containing DSI input & output port nodes with endpoint > + definitions as documented in > + Documentation/devicetree/bindings/media/video-interfaces.txt > + Documentation/devicetree/bindings/graph.txt > + properties: > + port@0: > + type: object > + description: > + DSI input port node, connected to the ltdc rgb output port. > + > + port@1: > + type: object > + description: > + DSI output port node, connected to a panel or a bridge input port" > + > +patternProperties: > + "^(panel|panel-dsi)@[0-9]$": > + type: object > + description: > + A node containing the panel or bridge description as documented in > + Documentation/devicetree/bindings/display/mipi-dsi-bus.txt > + properties: > + port@0: You can drop this. The unit address for the panel port is decided by the panel binding, not this one. > + type: object > + description: > + Panel or bridge port node, connected to the DSI output port (port@1) [...] > diff --git a/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml b/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml > new file mode 100644 > index 000000000000..94a4137f7236 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml > @@ -0,0 +1,81 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/display/st,stm32-ltdc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: STMicroelectronics STM32 lcd-tft display controller > + > +maintainers: > + - Philippe Cornu > + - Yannick Fertre > + > +properties: > + compatible: > + const: st,stm32-ltdc > + > + reg: > + maxItems: 1 > + > + interrupts: > + minItems: 2 > + maxItems: 2 Need to describe what each interrupt is. items: - description: ... - description: ... > + > + clocks: > + maxItems: 1 > + > + clock-names: > + items: > + - const: lcd > + > + resets: > + maxItems: 1 > + > + port: > + type: object > + description: > + "Video port for DPI RGB output. > + ltdc has one video port with up to 2 endpoints: > + - for external dpi rgb panel or bridge, using gpios. > + - for internal dpi input of the MIPI DSI host controller. > + Note: These 2 endpoints cannot be activated simultaneously. > + Please refer to the bindings defined in > + Documentation/devicetree/bindings/media/video-interfaces.txt." > + > + dma-ranges: > + maxItems: 1 dma-ranges goes in bus nodes, not device nodes. > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - clock-names > + - resets > + - port > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + ltdc: display-controller@40016800 { > + compatible = "st,stm32-ltdc"; > + reg = <0x5a001000 0x400>; > + interrupts = , > + ; > + clocks = <&rcc LTDC_PX>; > + clock-names = "lcd"; > + resets = <&rcc LTDC_R>; > + > + port { > + ltdc_out_dsi: endpoint { > + remote-endpoint = <&dsi_in>; > + }; > + }; > + }; > + > +... > + > -- > 2.15.0 >