From patchwork Sun Mar 11 13:53:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10274751 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CB73F60211 for ; Sun, 11 Mar 2018 13:53:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB5EA28DE3 for ; Sun, 11 Mar 2018 13:53:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFEB828DEB; Sun, 11 Mar 2018 13:53:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 35BD928DE3 for ; Sun, 11 Mar 2018 13:53:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F50E6E3F7; Sun, 11 Mar 2018 13:53:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl0-x244.google.com (mail-pl0-x244.google.com [IPv6:2607:f8b0:400e:c01::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0A3646E3F7 for ; Sun, 11 Mar 2018 13:53:50 +0000 (UTC) Received: by mail-pl0-x244.google.com with SMTP id w22-v6so7860632pll.2 for ; Sun, 11 Mar 2018 06:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZAtU1b12TtStTJ0kSbWJyzTw3lYq0HbfZa/gH8Ujhho=; b=YQSCsfWZIqX2IO/v3Sa1k3ifS7BLsMaMieB+FwA61ql4I6d56s2681ZPsRGm+Ci5fY dzKWFdSWhteVQ70H3brjNJNV1AwlbBF4iIt0TUo3rKkCiyKM3h9/y+vRcfXJsBPTgAbH nEks1JvZu/9BB0IhCWPVaIRmkphEg0Ohx1J14= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZAtU1b12TtStTJ0kSbWJyzTw3lYq0HbfZa/gH8Ujhho=; b=l5xJjAQ75RoYQFb6lt+/o2BB2NwOF11j+8Wj4fScuaNc+3uZzw30m0mydkUnUZvYXI EuJK0Mw0Xzmw+V9zUfP13gEDjZmslcoEPB/vy17cBZ6DffEtmfo7pvjsJ3YkjteSZRLj c5z7UXEtpopE90uNBRK8WPzkSYHEbgGvwQ3QS2m9ZAbHnWoywukkzJeDyeKzzhuiVHsn HY+E1DvAkj/vUv783TkgSy8mVqcbZ1CVALZwajOUWoYBlXOZXNOTgmTQFB6b44L0Mdb3 EUQUN2BFzRdNoUV0A921Pe0rKXTW4F59Yed8n4hAem5D3Yq9WfWR0QmT9tVEMgGQqqY0 3kig== X-Gm-Message-State: AElRT7HN9wvUhSFhHX5XWXJftZ5pQOnkDrg9Rl6xjIBBwKQyqwuv7/wW 4VlSLYnGyKekUzwQxXigdClcbA== X-Google-Smtp-Source: AG47ELtODvX+QiIjgk6ByrNVx2yX7HlMKfVxYDACKPosjR/HsQnJ64PM3MMEGG6uvyhAVS5GcgvKLg== X-Received: by 2002:a17:902:6b:: with SMTP id 98-v6mr4845618pla.403.1520776430490; Sun, 11 Mar 2018 06:53:50 -0700 (PDT) Received: from localhost.localdomain ([183.78.63.160]) by smtp.gmail.com with ESMTPSA id t16sm12318721pfm.69.2018.03.11.06.53.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Mar 2018 06:53:49 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 06/10] ARM: dts: Augment panel setting for Versatile Date: Sun, 11 Mar 2018 14:53:03 +0100 Message-Id: <20180311135307.6271-7-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180311135307.6271-1-linus.walleij@linaro.org> References: <20180311135307.6271-1-linus.walleij@linaro.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liviu Dudau , dri-devel@lists.freedesktop.org, Mali DP Maintainers MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This adds the actual VGA DAC bridge that is used in the Versatile AB, and sets the mode to 640x480 VGA. The "clcd" clock was incorrectly named, the proper name (from bindings) is "clcdclk". So far drivers survived by just getting the first clock, but future drivers will use named clocks. We add the panel connector to the "arm,versatile-tft-panel" as well, the signals actually fork on the board, reaching both the VGA DAC and the display connector. Cc: Liviu Dudau Cc: Mali DP Maintainers Signed-off-by: Linus Walleij Reviewed-by: Liviu Dudau --- arch/arm/boot/dts/versatile-ab.dts | 83 +++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/versatile-ab.dts b/arch/arm/boot/dts/versatile-ab.dts index 4a51612996bc..5f61d3609027 100644 --- a/arch/arm/boot/dts/versatile-ab.dts +++ b/arch/arm/boot/dts/versatile-ab.dts @@ -30,6 +30,43 @@ clock-frequency = <24000000>; }; + bridge { + compatible = "ti,ths8134b", "ti,ths8134"; + #address-cells = <1>; + #size-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + vga_bridge_in: endpoint { + remote-endpoint = <&clcd_pads_vga_dac>; + }; + }; + + port@1 { + reg = <1>; + + vga_bridge_out: endpoint { + remote-endpoint = <&vga_con_in>; + }; + }; + }; + }; + + vga { + compatible = "vga-connector"; + + port { + vga_con_in: endpoint { + remote-endpoint = <&vga_bridge_out>; + }; + }; + }; + core-module@10000000 { compatible = "arm,core-module-versatile", "syscon", "simple-mfd"; reg = <0x10000000 0x200>; @@ -230,7 +267,39 @@ reg = <0x10120000 0x1000>; interrupts = <16>; clocks = <&osc1>, <&pclk>; - clock-names = "clcd", "apb_pclk"; + clock-names = "clcdclk", "apb_pclk"; + /* 800x600 16bpp @ 36MHz works fine */ + max-memory-bandwidth = <54000000>; + + /* + * This port is routed through a PLD (Programmable + * Logic Device) that routes the output from the CLCD + * (after transformations) to the VGA DAC and also an + * external panel connector. The PLD is essential for + * supporting RGB565/BGR565. + * + * The signals from the port thus reaches two endpoints. + * The PLD is managed through a few special bits in the + * FPGA "sysreg". + * + * This arrangement can be clearly seen in + * ARM DUI 0225D, page 3-41, figure 3-19. + */ + port@0 { + #address-cells = <1>; + #size-cells = <0>; + + clcd_pads_panel: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_in>; + arm,pl11x,tft-r0g0b0-pads = <0 8 16>; + }; + clcd_pads_vga_dac: endpoint@1 { + reg = <1>; + remote-endpoint = <&vga_bridge_in>; + arm,pl11x,tft-r0g0b0-pads = <0 8 16>; + }; + }; }; sctl@101e0000 { @@ -319,8 +388,18 @@ ranges = <0 0x10000000 0x10000>; sysreg@0 { - compatible = "arm,versatile-sysreg", "syscon"; + compatible = "arm,versatile-sysreg", "syscon", "simple-mfd"; reg = <0x00000 0x1000>; + + panel: display@0 { + compatible = "arm,versatile-tft-panel"; + + port { + panel_in: endpoint { + remote-endpoint = <&clcd_pads_panel>; + }; + }; + }; }; aaci@4000 {