From patchwork Fri Dec 1 16:16:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 120354 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1343111qgn; Fri, 1 Dec 2017 08:19:48 -0800 (PST) X-Google-Smtp-Source: AGs4zMZl+5cZmANwnVnr3UKHEkuOKWM4OsAHYsmQDRo4lc2KR5Yhq308Kd/bH3pouotYd0zTmbEF X-Received: by 10.99.97.200 with SMTP id v191mr6121049pgb.300.1512145187948; Fri, 01 Dec 2017 08:19:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512145187; cv=none; d=google.com; s=arc-20160816; b=P72dEuuk4MlyUSby7qZi7x94lqqtKu8pIkGxc3uQe5o5MojYYUQZDO5lSdr2aPfouU eKLUB9CnHYFgihxQuNpOSTwGU07KVMGDpPAD0t5lZ9KOt1bri0/ni8E1MFI9z0SH+R4v DxUKCgpXT9CjC6JZ4NKMvSNeYX9IMaxThBA/e1k1s841qEiOSx8Y+fzDpYEPRcTXC+el DdhAmArDJ8/YBlKwiHoR1L2/kpr1BIFEBf/xycPFVVrrp13wTpqrjVUU9unYRRNxiiUx QjXF0a9TNoC1zrghSHBZghOAdC5kRnTc9XGGklV/26scVDE47ORD9emnmS61mYjCEKXH mYvA== 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 :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to :arc-authentication-results; bh=I0xDFz92R//vIyTWbkpcgQ4f81EF0VhChtfQ1nxIlkQ=; b=tTMgDaDGwtd8v6I8USe7Ha/AQYiRvqnPvYHyEACqkUiTRE+qkNJWGPqiTyKQlH6MTg NaSmMxetSL0OK9U9qpCuaJP7zwOTTAIBH46q+hn5ipPv8Bi/ZxsX+yK+EikJXazIZVvi cnhra3V8Me3hxvN9PS4F1nXWHS5p0ZDJZi9qF+FFlSoTnRuJAXBMUhgqLczsWirDfekW ZmqNj7HReBmTGens/Mg3K+RAzMI+ILzuKfkZfigyQFxwVDgjzfycAT4K4C2W7WCFrumM OUnfL7BAIX+UAgQeiveandqQsRlcNNVF3Kdt9Lf93TC4dMBhsj7Lk7Unu+0AkTwAGX+R +KBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZPA/pyl8; 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 i4si5038558pgr.266.2017.12.01.08.19.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Dec 2017 08:19:47 -0800 (PST) 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=ZPA/pyl8; 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 A0A536ED94; Fri, 1 Dec 2017 16:19:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x243.google.com (mail-lf0-x243.google.com [IPv6:2a00:1450:4010:c07::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id D3EC46ED93 for ; Fri, 1 Dec 2017 16:19:15 +0000 (UTC) Received: by mail-lf0-x243.google.com with SMTP id t197so12294459lfe.7 for ; Fri, 01 Dec 2017 08:19:15 -0800 (PST) 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=FCwnlEF8hurnLUOK8TdsQg1llf7SMblTneYnoU0DjJg=; b=ZPA/pyl8M7s4u3XXlpZqNhNi5jUxE4dnmAgQXCwjf33z2uIE+fRQU+/siVW+cG8gyn IKgftFp92tK59MpMd2ykEEGBfsmG1rXDYS+qITSN7mMUxkN9/dC1b0GdrkEtmyutcxMA bu82hVfgMrUMVZetWC5FtnbNnjrLCUpdX1Rk4= 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=FCwnlEF8hurnLUOK8TdsQg1llf7SMblTneYnoU0DjJg=; b=SMajTUFH8IkibxxIxEygCVrK42jsQi8fIPA4ixPlD8anFRtjBp9k3s8D4cVlQjaSGg O21/RCj9M76xfwY+UjRFka7UOWH8i9q3O/G5Q9lCfYQQ6n2LCSC3MRL4DhXE7qGGVoEd Oe1imDLIIt1qj9CNJIJQzJ7h5Jyy0TIqelpDtE0pR0sihR1oXMfGsixaeO0bAkvqbIvD zT5hTz8Gyr8GHFhRl927ryNFcpLVK2F1Zi7lTM4Oht/eqLJncE1tAvjVoEulm6XTWRaO hm9Hj9s/jngAnpH4iLdoNNDjUG1GFcFhIqD9pW+hw1XmIGv8h8RdyioosnOU9Wl7YsNs KLkQ== X-Gm-Message-State: AJaThX7AT/ktdq9iSuRozGNR5huF1AIZbzI0rzRkd5jVJXPob3HRKvoz Q5DL6F+jvzppT5CVrYXbJ3Abkg== X-Received: by 10.25.158.193 with SMTP id h184mr4390945lfe.117.1512145154106; Fri, 01 Dec 2017 08:19:14 -0800 (PST) Received: from localhost.localdomain (c-567171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.86]) by smtp.gmail.com with ESMTPSA id t16sm1374814lje.81.2017.12.01.08.19.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Dec 2017 08:19:13 -0800 (PST) From: Linus Walleij To: Thierry Reding , dri-devel@lists.freedesktop.org Subject: [PATCH 3/3] ARM: dts: Add TVE/TVC and ILI9322 panel to DIR-685 Date: Fri, 1 Dec 2017 17:16:59 +0100 Message-Id: <20171201161659.9588-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171201161659.9588-1-linus.walleij@linaro.org> References: <20171201161659.9588-1-linus.walleij@linaro.org> Cc: Ben Dooks , David Lechner , Stefano Babic X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This adds the TVE200/TVC TV-encoder and the Ilitek ILI9322 panel to the DIR-685 device tree. This brings graphics to this funky router and it is possible to even run a console on its tiny screen. Incidentally this requires us to disable the access to the parallel (NOR) flash, as the communication pins to the panel are shared with the flash memory. To access the flash, a separate kernel with the panel disabled and the flash enabled should be booted. The pin control selecting whether to use the lines cannot be altered at runtime due to hardware constraints. Cc: David Lechner Cc: Stefano Babic Cc: Ben Dooks Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rename node from "tvc" to "display-controller" - Drop all the surplus device tree config that we are now instead open coding in the driver, as per the request of the DT maintainers. - Tested on the D-Link DIR-685. DRM developers: I will merge this patch through the ARM SoC tree. It is only included in this series for completion. --- arch/arm/boot/dts/gemini-dlink-dir-685.dts | 63 +++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/gemini-dlink-dir-685.dts b/arch/arm/boot/dts/gemini-dlink-dir-685.dts index e75e2d44371c..0a86b784cf7f 100644 --- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts +++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts @@ -45,6 +45,47 @@ }; }; + vdisp: regulator { + compatible = "regulator-fixed"; + regulator-name = "display-power"; + regulator-min-microvolt = <3600000>; + regulator-max-microvolt = <3600000>; + /* Collides with LCD E */ + gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + spi { + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>; + + /* Collides with IDE pins, that's cool (we do not use them) */ + gpio-sck = <&gpio1 5 GPIO_ACTIVE_HIGH>; + gpio-miso = <&gpio1 8 GPIO_ACTIVE_HIGH>; + gpio-mosi = <&gpio1 7 GPIO_ACTIVE_HIGH>; + /* Collides with pflash CE1, not so cool */ + cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; + num-chipselects = <1>; + + panel: display@0 { + compatible = "dlink,dir-685-panel", "ilitek,ili9322"; + reg = <0>; + /* 50 ns min period = 20 MHz */ + spi-max-frequency = <20000000>; + spi-cpol; /* Clock active low */ + vcc-supply = <&vdisp>; + iovcc-supply = <&vdisp>; + vci-supply = <&vdisp>; + + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; + }; + }; + leds { compatible = "gpio-leds"; led-wps { @@ -115,7 +156,16 @@ soc { flash@30000000 { - status = "okay"; + /* + * Flash access is by default disabled, because it + * collides with the Chip Enable signal for the display + * panel, that reuse the parallel flash Chip Select 1 + * (CS1). Enabling flash makes graphics stop working. + * + * We might be able to hack around this by letting + * GPIO poke around in the flash controller registers. + */ + /* status = "okay"; */ /* 32MB of flash */ reg = <0x30000000 0x02000000>; @@ -242,5 +292,16 @@ ata@63000000 { status = "okay"; }; + + display-controller@6a000000 { + status = "okay"; + + port@0 { + reg = <0>; + display_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; }; };