From patchwork Fri Dec 22 08:51:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 852260 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="inGumkQe"; dkim-atps=neutral Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3z32PC4LF0z9s74 for ; Fri, 22 Dec 2017 19:54:06 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 2AC29B80DC6; Fri, 22 Dec 2017 09:54:01 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Fri, 22 Dec 2017 09:54:01 +0100 (CET) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 9F87DB800A0 for ; Fri, 22 Dec 2017 09:53:59 +0100 (CET) X-policyd-weight: using cached result; rate: -7 Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Fri, 22 Dec 2017 09:53:58 +0100 (CET) Received: by mail-lf0-f67.google.com with SMTP id m20so17607252lfi.6 for ; Fri, 22 Dec 2017 00:53:58 -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; bh=rmgnNIZRv8ZwZ2fHoTSJwjVekAcl1tUK+HuBbeW8N60=; b=inGumkQe+mar9BM9Yll0+vjr84lPzeDg2kMioCFXM54/6+qrEsyjP81W2tV7EIgoYO m83REdYi1/i0THfK/3u7hAsVhAbGLJXMiZEF90ESG/Ef1JzY3y9IjjNnGKwasA+kJAEL d25yg/QJDkaztvikCXksWcL8IwJHi91zMi95Q= 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; bh=rmgnNIZRv8ZwZ2fHoTSJwjVekAcl1tUK+HuBbeW8N60=; b=Ccx2+VhQrOXBe1HEeFZvdzl6A8SlQHB+eoeHG7MVRWx2RX6SeJTDL27EGNJ/aVDcCr ierza+9gvwZT3XlE4TtBVKfZHPCOOc8qxRBy5wpppifKnS/vtbX3OxZxGd9rMMrVP5QL fq8ogDMsNidANK5xpqjXCcDf6VlwpOTmMYJBQzHSmSdTj7+DbbcPNLxGWZAekPv7VmFu 39RPlAVJ4ymE7wb9KC0Ajz/eikabduex0++NEh0NX7pRXtcrn6lcBoQZC8SCsLR637DB XQiZQu2h0tNhnnJ9c+ud71bsNn59sk8zZAI3f1lb7CeU6EyeSeY90iMwabdxvXUf4gwq drhA== X-Gm-Message-State: AKGB3mIw0JT19COEAwMNfPD5XzqkAKytiHl1M1UQxoFzdPo71J6wcltD tW6dz3L/UjV+d/uT1Z2OiRDbqw== X-Google-Smtp-Source: ACJfBovnGbIqY6KvUdfzX3aAy9QdyVdWXWBiWiOKOr4pQ5dCXy5JM9KnczkvBLfLi4xubpCILAI7IQ== X-Received: by 10.25.141.74 with SMTP id p71mr8621988lfd.10.1513932837633; Fri, 22 Dec 2017 00:53:57 -0800 (PST) Received: from localhost.localdomain (c-cb7471d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.116.203]) by smtp.gmail.com with ESMTPSA id x10sm4460958lje.47.2017.12.22.00.53.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Dec 2017 00:53:56 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Hans Ulli Kroll , Florian Fainelli Date: Fri, 22 Dec 2017 09:51:51 +0100 Message-Id: <20171222085151.17635-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 Subject: [OpenWrt-Devel] [PATCH v2] ARM: dts: Add TVE/TVC and ILI9322 panel to DIR-685 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Lechner , Paulius Zaleckas , Ben Dooks , Janos Laube , openwrt-devel@lists.openwrt.org, Stefano Babic MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-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. --- 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>; + }; + }; + }; }; };