Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4435308rdb; Fri, 15 Sep 2023 01:58:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeMBqzVRwdwcnj69pocViISABKQ3gN4eiErRzg4n8SEucrDF10I/Zyz87L3qZRQUAEEO95 X-Received: by 2002:a17:902:ab95:b0:1c3:36d9:3f96 with SMTP id f21-20020a170902ab9500b001c336d93f96mr915364plr.31.1694768305187; Fri, 15 Sep 2023 01:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694768305; cv=none; d=google.com; s=arc-20160816; b=FtRTWNy10OHjQthVTQIOXV4nEyr/wx6VkfSBhr69dhX6OvCBlkkAj1CjceLZ8O+cWi TuQcJalwqGYPqIrt8w4ydMDpY01BJTheZXx4bAdcDuTHpGobK5Z28XgGeWSkBebVvYsJ J/Mf9qXHnZ4/2bufAvgJGn9Acl6Fu8id7OCBf94tw8tywAuqL1F7vDzJFhjgb3fon2eK lvl1UYvFzeB8WZW4HxcTo5oHOBJ7rUg4j7lXl8yCo0Vg1eX9XEabRHjCb2WeY8XSX0bX iQ4GvWYvAXzx1ltcZ6JQsD9DG1SmDQybo4iot4E+Ug4/76+cZ1K6qmqJajqRt5REKCnP pEGw== 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=DKzWi0a7V2WA5sMz3o2XWjPnmTyCuJehY635dphrooI=; fh=eSLw3rxeJcvsd/4iMQ6bby3oSiFmyhznSRv+UIzNWWM=; b=BTL98wTX/scC1OuZ1QfTuEZw5J0rCb711vmG1pvTaj+9k4F0uHNhfdzRYtAlC1M4vn HC10dptlC0bfsBz1dU/OHTEKaLA3igAgihUQFnwu3dO0ni7DuMjTZPFbuunyob76a2Zx X9ZJNWYog8BhE0FXkqvuN45Uv9iX8kOqr9fGpammLacwGtbTALeT4iMDMO7W+k7QPa3T bhCnBkbRD9p/XktKLE3PU9vpiqtvKm4ByAsZY1opSL2CRas6yB4SnvnblBeR1dfjf4vt uhR6y3/gHJEJGe+WacUcHRv5683KtKt3jTAO1hmrNbeEO77rb0qH0c/62CF0rdKVovx1 NwMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id u15-20020a170902714f00b001c434b3659bsi723376plm.354.2023.09.15.01.58.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 01:58:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id AEF5282B6B53; Fri, 15 Sep 2023 01:56:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233621AbjIOI4I (ORCPT + 99 others); Fri, 15 Sep 2023 04:56:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233437AbjIOIyr (ORCPT ); Fri, 15 Sep 2023 04:54:47 -0400 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77B0C2D72 for ; Fri, 15 Sep 2023 01:54:20 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:7135:da8b:ba1d:1a7c]) by laurent.telenet-ops.be with bizsmtp id m8uE2A0053q21w7018uEgJ; Fri, 15 Sep 2023 10:54:19 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qh4aJ-003lFx-4D; Fri, 15 Sep 2023 10:54:14 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qh4ac-00Gdam-56; Fri, 15 Sep 2023 10:54:14 +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 , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org Subject: [PATCH v4 02/41] dt-bindings: display: Add Renesas SH-Mobile LCDC bindings Date: Fri, 15 Sep 2023 10:53:17 +0200 Message-Id: <6d0a053502abd6555e9a6cbe055e1bdc3329999d.1694767208.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 15 Sep 2023 01:56:55 -0700 (PDT) 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 Reviewed-by: Rob Herring --- Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Conor Dooley Cc: devicetree@vger.kernel.org v4: - No changes, v3: - Add Reviewed-by, v2: - Add myself as co-maintainer, - Make fck clock required, - Drop ports description referring to obsolete graph.txt, - Condition ports to compatible strings, - Drop label and status from example. 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 | 130 ++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 131 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..9816c4cacc7d9a7f --- /dev/null +++ b/Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml @@ -0,0 +1,130 @@ +# 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 + - Geert Uytterhoeven + +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 + items: + - const: fck + - enum: [ media, lclk, hdmi, video ] + - enum: [ media, lclk, hdmi, video ] + - enum: [ media, lclk, hdmi, video ] + - enum: [ media, lclk, hdmi, video ] + + power-domains: + maxItems: 1 + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + 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 + +allOf: + - if: + properties: + compatible: + contains: + const: renesas,r8a7740-lcdc + then: + properties: + ports: + properties: + port@2: false + + - if: + properties: + compatible: + contains: + const: renesas,sh73a0-lcdc + then: + properties: + ports: + required: + - port@1 + - port@2 + +examples: + - | + #include + #include + + 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>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lcdc0_rgb: endpoint { + }; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 70535048b6a96d55..c6d4ea533fbc179a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7034,6 +7034,7 @@ M: Geert Uytterhoeven L: dri-devel@lists.freedesktop.org L: linux-renesas-soc@vger.kernel.org S: Supported +F: Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml F: drivers/gpu/drm/renesas/shmobile/ F: include/linux/platform_data/shmob_drm.h -- 2.34.1