Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1540411ybk; Sat, 16 May 2020 14:52:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcsL/Fe93h/TyE/Qi7aJOKa64v0KoZfBrtTch20gns3TakhDsBZJclQsS2xZ5/SfTEkbEV X-Received: by 2002:a17:906:51b:: with SMTP id j27mr8679972eja.246.1589665977932; Sat, 16 May 2020 14:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589665977; cv=none; d=google.com; s=arc-20160816; b=nZoFw8CqhEdLcEuKLjPx8JAeuFJoeRGIvxik3e7C9UDJU3DJVh/5Ku7Ye9Bt1PkV2x Mss++mEjD/HPHOSchKjRQixAUAUc6K+2QSq9D7KBPyjTncJjjb5+ihRD9Eg8t4QjmZ1B FitTwoySRJCljgjwlHmnOPOGWSyVdxh3Py9TyWIJWdQ13H+1UFrLWlgWG78jLykM1CTb 4umWbDB+Lu76iGruSCZwDYNcHtdVr6ZBl8iPnOayIZQEV+usroFqWVHtmrdssIH1toak XoSSaB7t64CEBcSIPF1TsFY7TwZB8nJFsd/fBftK3ZMQNC5PnT3TN6rXGFt2aiF+fS5f u6bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5SyDoAnJh3TR4R1jXoQ5QMao8Ex6ekqDC2tln1yT54g=; b=vwzV3CaeduHH3MpxPnU0Gr/D7E51KXlkvk8YOqlQWBrCRTxyIXutPrzamw+l5MYLdv A9v6IgLjRM0Bor1qgeMaFz4oQM0ViHqBbkCwLu8vJBV4MUZnPG1ighsUwsV9amkoL64Z kuQjOPBbkjf9/rroDrqgi6mqZSu0+0oOZFv1gMR2JaRR3ZxKd1DvMk152NkMTcBsC4ad h1d3P5GjwSEXN1DJWiWoBBR73WeCtIZ4qunKCrBM5ZHQ9/UDNx7ZGgprzI8mAJhR14gd VZw6YAhP29l7rg/VJWXhN9FmZdCfkzg6ufUvSHgCAct94qkIJYyMDc1cJy8RGRfs3EoA ViNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=spQCczGU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si3514932eja.287.2020.05.16.14.52.34; Sat, 16 May 2020 14:52:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=spQCczGU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726779AbgEPVvM (ORCPT + 99 others); Sat, 16 May 2020 17:51:12 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:46304 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726660AbgEPVvL (ORCPT ); Sat, 16 May 2020 17:51:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1589665868; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=5SyDoAnJh3TR4R1jXoQ5QMao8Ex6ekqDC2tln1yT54g=; b=spQCczGUgdzEHPcMHvzTRPgPHwkhp18+zlLZ/znfl1FPLsrTtlk9rSGPnDcu0vaZHGv632 Elr97Y3gNrJNUENA3nw5L8r3xE9FQKFozn0plVh2hoQAwEctPJfPFd+ztmyrLsgPB/0sRk fqFHigS8/pUTsiK5aL5inZlEbPttalE= From: Paul Cercueil To: David Airlie , Daniel Vetter , Rob Herring , Greg Kroah-Hartman , "Rafael J . Wysocki" Cc: od@zcrc.me, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH 01/12] dt-bindings: display: Convert ingenic,lcd.txt to YAML Date: Sat, 16 May 2020 23:50:46 +0200 Message-Id: <20200516215057.392609-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the ingenic,lcd.txt to a new ingenic,lcd.yaml file. In the process, the new ingenic,jz4780-lcd compatible string has been added. Signed-off-by: Paul Cercueil --- Notes: This patch comes from a different patchset so it's effectively a V2. Changes were: - lcd_pclk and lcd clocks are in the correct order now, - Add 'port' and 'ports' properties, and document the valid ports. .../bindings/display/ingenic,lcd.txt | 45 ------- .../bindings/display/ingenic,lcd.yaml | 126 ++++++++++++++++++ 2 files changed, 126 insertions(+), 45 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/ingenic,lcd.txt create mode 100644 Documentation/devicetree/bindings/display/ingenic,lcd.yaml diff --git a/Documentation/devicetree/bindings/display/ingenic,lcd.txt b/Documentation/devicetree/bindings/display/ingenic,lcd.txt deleted file mode 100644 index 01e3261defb6..000000000000 --- a/Documentation/devicetree/bindings/display/ingenic,lcd.txt +++ /dev/null @@ -1,45 +0,0 @@ -Ingenic JZ47xx LCD driver - -Required properties: -- compatible: one of: - * ingenic,jz4740-lcd - * ingenic,jz4725b-lcd - * ingenic,jz4770-lcd -- reg: LCD registers location and length -- clocks: LCD pixclock and device clock specifiers. - The device clock is only required on the JZ4740. -- clock-names: "lcd_pclk" and "lcd" -- interrupts: Specifies the interrupt line the LCD controller is connected to. - -Example: - -panel { - compatible = "sharp,ls020b1dd01d"; - - backlight = <&backlight>; - power-supply = <&vcc>; - - port { - panel_input: endpoint { - remote-endpoint = <&panel_output>; - }; - }; -}; - - -lcd: lcd-controller@13050000 { - compatible = "ingenic,jz4725b-lcd"; - reg = <0x13050000 0x1000>; - - interrupt-parent = <&intc>; - interrupts = <31>; - - clocks = <&cgu JZ4725B_CLK_LCD>; - clock-names = "lcd"; - - port { - panel_output: endpoint { - remote-endpoint = <&panel_input>; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/display/ingenic,lcd.yaml b/Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file mode 100644 index 000000000000..d56db1802fad --- /dev/null +++ b/Documentation/devicetree/bindings/display/ingenic,lcd.yaml @@ -0,0 +1,126 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/ingenic,lcd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ingenic SoCs LCD controller devicetree bindings + +maintainers: + - Paul Cercueil + +properties: + $nodename: + pattern: "^lcd-controller@[0-9a-f]+$" + + compatible: + enum: + - ingenic,jz4740-lcd + - ingenic,jz4725b-lcd + - ingenic,jz4770-lcd + - ingenic,jz4780-lcd + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: Pixel clock + - description: Module clock + minItems: 1 + + clock-names: + items: + - const: lcd_pclk + - const: lcd + minItems: 1 + + port: + description: OF graph bindings (specified in bindings/graph.txt). + + ports: + description: OF graph bindings (specified in bindings/graph.txt). + type: object + properties: + port@0: + type: object + description: DPI output, to interface with TFT panels. + + port@8: + type: object + description: Link to the Image Processing Unit (IPU). + (See ingenic,ipu.yaml). + + required: + - port@0 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +if: + properties: + compatible: + contains: + enum: + - ingenic,jz4740-lcd + - ingenic,jz4780-lcd +then: + properties: + clocks: + minItems: 2 + clock-names: + minItems: 2 +else: + properties: + clocks: + maxItems: 1 + clock-names: + maxItems: 1 + +additionalProperties: false + +examples: + - | + #include + lcd-controller@13050000 { + compatible = "ingenic,jz4740-lcd"; + reg = <0x13050000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <30>; + + clocks = <&cgu JZ4740_CLK_LCD_PCLK>, <&cgu JZ4740_CLK_LCD>; + clock-names = "lcd_pclk", "lcd"; + + port { + endpoint { + remote-endpoint = <&panel_input>; + }; + }; + }; + + - | + #include + lcd-controller@13050000 { + compatible = "ingenic,jz4725b-lcd"; + reg = <0x13050000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <31>; + + clocks = <&cgu JZ4725B_CLK_LCD>; + clock-names = "lcd_pclk"; + + port { + endpoint { + remote-endpoint = <&panel_input>; + }; + }; + }; -- 2.26.2