From patchwork Fri Feb 23 09:14:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dharma Balasubiramani X-Patchwork-Id: 205238 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp468875dyb; Fri, 23 Feb 2024 01:16:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUvOmjMWD/VOWqXjZt/d7od5GhFwZjnw3XuN4czVUCKu3N2EftLRE+e0a1uKYYxgPTyswiCJ89XNuoqbBkFhVKeyLy0w== X-Google-Smtp-Source: AGHT+IHHicFCZ2WQAjG7lK6TBpVAQwQVPVyhDga9E4cYJJSm9mkLqlfqgauohyBl2svr8WsRmRYC X-Received: by 2002:a1f:e681:0:b0:4ca:72f5:fffb with SMTP id d123-20020a1fe681000000b004ca72f5fffbmr1257897vkh.14.1708679799516; Fri, 23 Feb 2024 01:16:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708679799; cv=pass; d=google.com; s=arc-20160816; b=u9VKQ2ZnmDYd5921PixLcWGpXMXh87j2fNLgEC2T5ysqNBO1CAqUHrpeLxWs2I1X0d YYJ8gy9YKE18svFh3mcWgzhnxTbLuWrArxVvq1O2ouQHzmQfdjXi103HJ177O7nwx516 +ausjAHhyv2xBnlcYKGWTF/whAXazh98ajCiMTKNQvcMWWkre7uW7kOLLk3TRug8ce0l m9XoqaAmQIxyU3fDX4Y6i1lrSL2Mk9NNj+CLQs93uUeEFOiBHKpckH8VdDl2VH2UuvEz ArsG9OeQDewoKRWyvKrZikOMQ3waTjNpe8bnLaC0pIhoi9GOrK9WRT/bynuuqHd0vBup lu/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=A4Op3d8sJZTnNDaCisL9tHKp17iYdBWkuCaRHbDQWdE=; fh=0eAgIQocGvUXvqV0gTXZ2lX/ZVLrSnTxrNWOGKfEfZI=; b=ivLnirfz+k5VL3ssrebuoxw0jXyadym3GaWoOb/1QKwNv/lK2xmq/marrEUuxAcJjY fcukAmXnaSQQG+bA/bvSgWUvLeoppiUQQgumISteH/HPWYCFwgKQ5+ofDbGOEJykr+CU yiZm/sE3ri7LR8aIxfdWcr3cdWB7jTtetGgDr5ZDHgB1um+IkbtIjZ9AEnh2VcseCU4l nlDKf9wjno2e0DYYl5URAtc5O9OnTLcuWbWBXiIPwNw6iQrYEEXfRBepH5QqktOwsJUZ k1fyoQDRiAeDebJX+hUXtkRLFnlAYggLaOOvGnBNg4xzbAAjynXn8XiN5yxH1iVtxkQw wQ8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=oZc5npPj; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-77987-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77987-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q4-20020ad45ca4000000b0068f72fd2a17si10733384qvh.352.2024.02.23.01.16.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 01:16:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77987-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=oZc5npPj; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-77987-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77987-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EF3A61C21B62 for ; Fri, 23 Feb 2024 09:16:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D36359174; Fri, 23 Feb 2024 09:16:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="oZc5npPj" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AB6F1642C; Fri, 23 Feb 2024 09:16:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708679775; cv=none; b=Av7jkpJR2HjOMia3iUFzT8DvI5t2b1uG+g9Gq1jRL6MirfLdOCnDvv+XOMGQyU3znC+MjLl/bE09itqkuSc8ascKU+Wahq2BGHUffkJGqaCLZriJ4RPRMDYDjTEWz+4RT/FcqqEtsYFoTXIbPiMF8P48n5ZIQZSPMX8uTHWVfmw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708679775; c=relaxed/simple; bh=9Vu1VRNAWtniGY/jtoOfNnxYyiQmtWAxgcCmBslvTO0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:To:CC; b=s7U4SpY53zKOvnSN4pUGRCBBI2vosoE9ecy1ED02fMe/12iFjKpBdFRL6MXT7FStzY03FCkOynef7ixToLu5YIkj6LhmoVJyljg8X3nbvmn0eayuRW9oVusPjuBaHEe32/ArhgOG0XePwl6hJSJNhD703mRTRJ+M0j41JPPCEnc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=oZc5npPj; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1708679773; x=1740215773; h=from:date:subject:mime-version:content-transfer-encoding: message-id:to:cc; bh=9Vu1VRNAWtniGY/jtoOfNnxYyiQmtWAxgcCmBslvTO0=; b=oZc5npPjDu9L56qk1dnX/kPzmov+9ubLbyZigyqlyBU8c23FTUH/lQXt 4D6DZtew9cBobqCu28egHTW4kQAQV82ZKXXZkZ8h8Fuq94/dHbalxGHpI snSKNWfbRtG83sqyZ/daXGDamuYc0NXoVzQEAs5tTMoiYKRkh4HfgImYc 6YteLhTLH52+lR0ZhzHLaFRfZjcyTZ5OBJOYWd2TyfXxZ8b3ZzaVlLKNx M+WFCsVUElmYAn0JJlI0GDR4x5l3sZKMKjE3zYelcF5z6h3KUIik78N7x 7sna0bRTCQ7hE7TZz+q1RFBTT//h+0sOQ7coBbmfBFY8HUoFrnBPqReox g==; X-CSE-ConnectionGUID: xzqCRm/2QM6BAc1jATjzJA== X-CSE-MsgGUID: Zfo9vPMnSfmdi3vZldUFCA== X-IronPort-AV: E=Sophos;i="6.06,179,1705388400"; d="scan'208";a="17247390" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Feb 2024 02:16:06 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 23 Feb 2024 02:15:09 -0700 Received: from che-lt-i70843lx.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Fri, 23 Feb 2024 02:15:04 -0700 From: Dharma Balasubiramani Date: Fri, 23 Feb 2024 14:44:48 +0530 Subject: [PATCH] dt-bindings: display: atmel,lcdc: convert to dtschema Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20240223-lcdc-fb-v1-1-4c64cb6277df@microchip.com> X-B4-Tracking: v=1; b=H4sIAAdi2GUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDIyNj3ZzklGTdtCTdJIsUo1SjNONkS0MTJaDqgqLUtMwKsEnRsbW1AF8 WmF1ZAAAA To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea CC: , , , , Dharma Balasubiramani X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708679703; l=7368; i=dharma.b@microchip.com; s=20240209; h=from:subject:message-id; bh=9Vu1VRNAWtniGY/jtoOfNnxYyiQmtWAxgcCmBslvTO0=; b=WtHfIsVvFXuF0Iwjp/BdSegvujxE26RubKhGI3LA7nPOdb2Pl02iAfiQEkXCy/LMwMP+U6Pup HUtmfMFt7gsB69GYwXblwVmJtzMI/hOvC2egN9xf9xlrCue/NQWzuuE X-Developer-Key: i=dharma.b@microchip.com; a=ed25519; pk=kCq31LcpLAe9HDfIz9ZJ1U7T+osjOi7OZSbe0gqtyQ4= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791680629242122459 X-GMAIL-MSGID: 1791680629242122459 Convert the atmel,lcdc bindings to DT schema. Changes during conversion: add missing clocks and clock-names properties. Signed-off-by: Dharma Balasubiramani --- .../devicetree/bindings/display/atmel,lcdc.txt | 87 -------------- .../devicetree/bindings/display/atmel,lcdc.yaml | 133 +++++++++++++++++++++ 2 files changed, 133 insertions(+), 87 deletions(-) --- base-commit: ffd2cb6b718e189e7e2d5d0c19c25611f92e061a change-id: 20240223-lcdc-fb-b8d2e2f3c914 Best regards, diff --git a/Documentation/devicetree/bindings/display/atmel,lcdc.txt b/Documentation/devicetree/bindings/display/atmel,lcdc.txt deleted file mode 100644 index b5e355ada2fa..000000000000 --- a/Documentation/devicetree/bindings/display/atmel,lcdc.txt +++ /dev/null @@ -1,87 +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" , -- 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..4a1de5a8d64b --- /dev/null +++ b/Documentation/devicetree/bindings/display/atmel,lcdc.yaml @@ -0,0 +1,133 @@ +# SPDX-License-Identifier: (GPL-2.0 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: Microchip's LCDC Framebuffer + +maintainers: + - Nicolas Ferre + - Dharma Balasubiramani + +description: + The LCDC works with a framebuffer, which is a section of memory that contains + a complete frame of data representing pixel values for the display. The LCDC + reads the pixel data from the framebuffer and sends it to the LCD panel to + render the image. + +properties: + compatible: + enum: + - atmel,at91sam9261-lcdc + - atmel,at91sam9263-lcdc + - atmel,at91sam9g10-lcdc + - atmel,at91sam9g45-lcdc + - atmel,at91sam9g45es-lcdc + - atmel,at91sam9rl-lcdc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 2 + + clock-names: + items: + - const: hclk + - const: lcdc_clk + + display: + $ref: /schemas/types.yaml#/definitions/phandle + description: A phandle pointing to the display node. + + 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: + $ref: /schemas/types.yaml#/definitions/flag + description: enable backlight + + atmel,lcdcon-backlight-inverted: + $ref: /schemas/types.yaml#/definitions/flag + description: invert backlight PWM polarity + + atmel,lcd-wiring-mode: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: lcd wiring mode "RGB" or "BRG" + + atmel,power-control-gpio: + description: gpio to power on or off the LCD (as many as needed) + + required: + - atmel,dmacon + - atmel,lcdcon2 + - atmel,guard-time + - bits-per-pixel + + additionalProperties: false + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - display + +additionalProperties: false + +examples: + - | + #include + fb@500000 { + compatible = "atmel,at91sam9g45-lcdc"; + reg = <0x00500000 0x1000>; + interrupts = <23 3 0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_fb>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 23>, <&pmc PMC_TYPE_PERIPHERAL 23>; + clock-names = "hclk", "lcdc_clk"; + display = <&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>; + }; + }; + };