From patchwork Thu Jun 22 09:21:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 111591 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4945386vqr; Thu, 22 Jun 2023 02:54:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4BH16/ur/D2tCWKTWmrs+7BRK+gAv4pPVeGlkaxIl9UjYVcJh+jY/b7zQHE2534VfeRUSg X-Received: by 2002:a05:6808:df4:b0:3a0:699a:3cd7 with SMTP id g52-20020a0568080df400b003a0699a3cd7mr241601oic.38.1687427647921; Thu, 22 Jun 2023 02:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687427647; cv=none; d=google.com; s=arc-20160816; b=rfIESm7xzZHCtfIuu3BUlupydOLXTTNzbJls8t/KBqgBwIB73voUCTzD4q/dGgeDSb dK6upBOonP8Tdo+IPdtizZynL9UcF4QJBOLOgi0+P9/QhDT33Qb9y3OfgnH3bTMhLISH Ogvtw2MwR2f+6DoEhHCDIdJa6JuUXXzhgbvBj8+A+qUC4+tUgW6jepTBe9Fs1wLcuv2g jkdRbSabSs7Hs5ymj3D5pPc0mq2oMbUNMbQDaTc/fdKvqx7IAzfNHAbQkvJ4GWuX4mTs zOAddgZSlbqwzsPixU+Yov6a5m3xfVk00GPh5+bBFBSS1N3g/u5LpT4SjSqXKOVRF2tO YDGw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=RHgoNVBop9RbvpE+Gqmd/1Azsble+9trZyeB0VOH1Xo=; b=OWX8dChS5Oc+5bPqKTcqeLMAsBiL5pNn+sCoFqJ4/HGPSTXIggWTW8FMvCyrEcKROX 7daaTHdpSp+lxLfjKC8sPaSKeaZPcHSk2AwJ2vxfXzS4/ReiBAoPeXKLYfL6MHht2sPP cJSZbUBxfhvkKIMUJHoiziXrPnDcZq+P9qQE8PhQoDLZEODDtz+fMkW7/2sjApMM7vie AAwVBSi/xZYQQLM5MpGQTJnhkhbJfeBrWbnroewdjpEhrmvFFrjZzKRleAVr7uasF5KC x6GrvbMT9p/M8A34kyXcvTGZvdTryxiPoHguSfVBKIy6GWQCRVaD4hWZt7r8dzGXXF3D jGiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a170903024700b001b66f1fcf0csi6965990plh.174.2023.06.22.02.53.55; Thu, 22 Jun 2023 02:54:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230346AbjFVJaE (ORCPT + 99 others); Thu, 22 Jun 2023 05:30:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231768AbjFVJ3i (ORCPT ); Thu, 22 Jun 2023 05:29:38 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25A3F4208 for ; Thu, 22 Jun 2023 02:22:43 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:991a:a831:ea4b:6058]) by albert.telenet-ops.be with bizsmtp id C9Nd2A0091yfRTD069Ndiq; Thu, 22 Jun 2023 11:22:41 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qCGWR-000BvG-H5; Thu, 22 Jun 2023 11:22:37 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qCGWT-003Vvf-37; Thu, 22 Jun 2023 11:22:37 +0200 From: Geert Uytterhoeven To: Laurent Pinchart , Kieran Bingham , David Airlie , Daniel Vetter , Thomas Zimmermann , Magnus Damm Cc: dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org Subject: [PATCH 01/39] dt-bindings: display: Add Renesas SH-Mobile LCDC bindings Date: Thu, 22 Jun 2023 11:21:13 +0200 Message-Id: <2259ff548f007afcb5a315a4c95c83a0ee4b7e03.1687423204.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769396133350457547?= X-GMAIL-MSGID: =?utf-8?q?1769396133350457547?= Add device tree bindings for the LCD Controller (LCDC) found in Renesas SuperH SH-Mobile and ARM SH/R-Mobile SOCs. Based on a plain text prototype by Laurent Pinchart. Signed-off-by: Geert Uytterhoeven Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Conor Dooley Cc: devicetree@vger.kernel.org --- Changes compared to Laurent's original: - Convert to json-schema, - Rename compatible values from "renesas,lcdc-" to "renesas,-lcdc", - Add power-domains property, - Add MIPI-DSI port on SH-Mobile AG5, - Update example to reflect reality, - Add to MAINTAINERS. --- .../display/renesas,shmobile-lcdc.yaml | 108 ++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 109 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml diff --git a/Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml b/Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml new file mode 100644 index 0000000000000000..72a39fce7294d56d --- /dev/null +++ b/Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml @@ -0,0 +1,108 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/renesas,shmobile-lcdc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas SH-Mobile LCD Controller (LCDC) + +maintainers: + - Laurent Pinchart + +properties: + compatible: + enum: + - renesas,r8a7740-lcdc # R-Mobile A1 + - renesas,sh73a0-lcdc # SH-Mobile AG5 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 5 + description: + Only the functional clock is mandatory. + Some of the optional clocks are model-dependent (e.g. "video" (a.k.a. + "vou" or "dv_clk") is available on R-Mobile A1 only). + + clock-names: + minItems: 1 + maxItems: 5 + items: + enum: [ fck, media, lclk, hdmi, video ] + + power-domains: + maxItems: 1 + + ports: + $ref: /schemas/graph.yaml#/properties/ports + description: | + The connections to the output video ports are modeled using the OF graph + bindings specified in Documentation/devicetree/bindings/graph.txt. + The number of ports and their assignment are model-dependent. + Each port shall have a single endpoint. + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: LCD port (R-Mobile A1 and SH-Mobile AG5) + unevaluatedProperties: false + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: HDMI port (R-Mobile A1 LCDC1 and SH-Mobile AG5) + unevaluatedProperties: false + + port@2: + $ref: /schemas/graph.yaml#/properties/port + description: MIPI-DSI port (SH-Mobile AG5) + unevaluatedProperties: false + + required: + - port@0 + + unevaluatedProperties: false + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - power-domains + - ports + +additionalProperties: false + +examples: + - | + #include + #include + + lcdc0: lcd-controller@fe940000 { + compatible = "renesas,r8a7740-lcdc"; + reg = <0xfe940000 0x4000>; + interrupts = ; + clocks = <&mstp1_clks R8A7740_CLK_LCDC0>, + <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk0_clk>, + <&vou_clk>; + clock-names = "fck", "media", "lclk", "video"; + power-domains = <&pd_a4lc>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lcdc0_rgb: endpoint { + }; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 83e9f4ac6bedaa9f..dc1935c196cb0e0b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7023,6 +7023,7 @@ F: Documentation/devicetree/bindings/display/bridge/renesas,dsi-csi2-tx.yaml F: Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.yaml F: Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml F: Documentation/devicetree/bindings/display/renesas,du.yaml +F: Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml F: drivers/gpu/drm/renesas/ F: include/linux/platform_data/shmob_drm.h