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: 131355 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3113822lja; Sun, 11 Mar 2018 06:54:26 -0700 (PDT) X-Google-Smtp-Source: AG47ELtINUiazlzjap3dHscnxN+gv1ObI0LjbgLe2x8ZN+ZdBVjNPnzVsTtM5Bm6eV3VWTGruKH0 X-Received: by 2002:a17:902:bc04:: with SMTP id n4-v6mr1750531pls.97.1520776466682; Sun, 11 Mar 2018 06:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520776466; cv=none; d=google.com; s=arc-20160816; b=zCNJcNISySVtGFNsVWIxviD3BIexw2tbqrz74q2pSwJzZXJqt7Aemxk3dWylxGo2R5 6kQFDeNQg5ocBrei9cNhIU1sNaN0gc30j4qSYc2LP9hH1kiRL0WpQdBuiPo/YX7lvADr T1RNiORoB1cUWc9O3AvSHjSQ6yVFDqttw1T0Eg/Kt0R7wxsanMTpWM8F6S+95HEK0YD5 cQt1N6fNy9YoKY7Q0yP+VHsjatW9mP0q6W+ALmYk4jPSNzOt3DcNWlmiHI1K2jG2LARF cJslwF/xQDezpjrYdu1lxsojV6Ban1g2rANqkPYqMMAB7JZGHp0oXupIX9KD5nyzIaV8 E0gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=545jHabB2myfhUb5kib8S4LABnemM92JgXoto9WaTT4=; b=QQ17DBtrUC0OK9b28Gk/zV05ihmUHs5uf/stSVYGoxVrRVdqQ2TCCqOUrYubJN77VN rtl44hlMSUy0yte4wQOGADm1u4kVCZwi8fxGvcBuj7CGu73Am/Sp1ofa3nD8fauqYrEs 0x7GwwEiIotZ+NtvVbfOF2Y2ZC3shVIDoqQFxOwSShQdjEa3LE5uofXxHwREeqhc7tCC Ayhu1onS2U5l6Qlc2M1mDrGiOocsjliR9DjmVPUw/GaTX01uTcDatNgdECNLiNUHwFs8 fEcFrYQBergZm5RN8v7671bE+4EDk6eUI4qYW8Q+ieDKyhSDkwBTUSwUJnVhvrDEFdrY /sRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YQSCsfWZ; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id g9-v6si71822plp.265.2018.03.11.06.54.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Mar 2018 06:54:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YQSCsfWZ; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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" 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 {