From patchwork Sun Aug 20 10:05:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 110474 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp14922qge; Sun, 20 Aug 2017 03:06:20 -0700 (PDT) X-Received: by 10.84.213.16 with SMTP id f16mr16067450pli.158.1503223580429; Sun, 20 Aug 2017 03:06:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503223580; cv=none; d=google.com; s=arc-20160816; b=AIX1QyU1FUFaYmGRCeI3GcjWOp6374Q7SQFm8apDUYlDMIAsoBA/pI3AmXiKyv5PE2 t6Ych4qrgmDDvED76Gvi0I31BWklC0yoKlfTQGlWtDOl7JpBHfKl8DClItPA93DTRMCr wh7Oaa2SzZUouO0XnqI9IrtfB3CNy5dtSWMLZkvirFLdmfGUOJUL6gEirokPZ19+IAvN MqHuImcqDWBTZeYMWhQR//QtiiT7Rx35Ea54lvFBfk+8tHv+hzJmQBJofaRySbI7p+Mv 7WGsv8k7pPen69V8r7K8BCv4k/MPvb9iWsQRxAqm209NEtk8Kc6s5a/lPTXQDsKb1WMm mbAg== 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=n/6Ytzp+oV2EBvmhOaQSxU3uvWvdMGUXyh4gWDlEpWU=; b=egqtUIAUZqaju0HHpn41T2v8+wJRtmBs8naSKPSexXS95gRvEvwG9WjhDStizKaJRX 9N9YGvhO5jf9bKTeMhwx1u5QB2GVLdFxLKsXqjPDN6xis5ApCfmzFTw/pPpJj8lxADfs 2LYY1RIjMHQVDvGGH0P/QCynT4cgbfdjYvUycIYwXfQXzpZ4gpDKWwm3AmeJyeU9xSec TL897JcvM/dwWqNM38E4/TpQJLwxW+gwM3EXt6RCDhx2plQ0LWYhCxW4oQM2WuU5QNOb 6J6+g+lLITFYJcyImKYkcNIi4r5orPjDQ/l/SgqCBhdVkRHLqNAV+yy/8453OZjMbhlZ qKxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OyXre6mz; 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 i21si5969706pfi.394.2017.08.20.03.06.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Aug 2017 03:06:20 -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=OyXre6mz; 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 7AC446E17A; Sun, 20 Aug 2017 10:06:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::22f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2144C6E17A for ; Sun, 20 Aug 2017 10:06:17 +0000 (UTC) Received: by mail-lf0-x22f.google.com with SMTP id f7so36937909lfg.4 for ; Sun, 20 Aug 2017 03:06:17 -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=pfur9IbMH++WWaUIijemP/IPBxxFHKlhCJBS7CPC0Mg=; b=OyXre6mz4swi+BfkYQmm+LNXbCYURfz2jjH0mqeWIvF5WFAq1eBpStUAtfh/RhlMEk 3wCXdeyj/pOcYL+L1oKTrWJVR5YEeyALM79+OdatLYhsM5sw0ai7/LKvnZYqgtif2EUA vHsAZcxSf06O9/HEf0PXH8EeuTM1z4SWNzaks= 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=pfur9IbMH++WWaUIijemP/IPBxxFHKlhCJBS7CPC0Mg=; b=s0UfQURXgYNQJ8F/mI54VC4OfmfvW3sgpeb/I6J8cJuQEMlPRgW2UJXeimFVWgwzQx tgpN1PyOw36tER2hKpqW4auHy5AMBCeSoX+ngr389RzrEDR/zIUChC/fHqUuIh87NI5h yymYY1HzgeBcCghIxYnduo2dtyxBhbfaghHdFr1nFn9IN/Q6T481eA6E8e2ksh+RDXvk 1baM9YXvY64eJjX8fOf+zQsnDduuu6SHkCXj/VG6AlcBLta+JNxYFYP8j9xzesO4WNJU tyk6Ht4G5a+Lps4OC+Q7iZhKzVh76NuDyL9Bwo5JIKhNPnQf5tHlZeBnki6x+QWNuGLd CqTQ== X-Gm-Message-State: AHYfb5iVQETq64yhXHrHMT4DK0a1kyZXXRlNszZ48lO1E+GYTwMhCz6S AXbKH0vlwCA2yMVkyvvRTw== X-Received: by 10.46.84.81 with SMTP id y17mr4559698ljd.133.1503223575220; Sun, 20 Aug 2017 03:06:15 -0700 (PDT) Received: from fabina.bredbandsbolaget.se (c-437f71d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.127.67]) by smtp.gmail.com with ESMTPSA id q11sm2127985lfi.24.2017.08.20.03.06.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Aug 2017 03:06:14 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Eric Anholt , Daniel Vetter , Jani Nikula , Sean Paul Subject: [PATCH 4/4 v2] ARM: dts: Add TVE/TVC and ILI9322 panel to DIR-685 Date: Sun, 20 Aug 2017 12:05:57 +0200 Message-Id: <20170820100557.24991-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170820100557.24991-1-linus.walleij@linaro.org> References: <20170820100557.24991-1-linus.walleij@linaro.org> Cc: linux-arm-kernel@lists.infradead.org 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. Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rename node from "tvc" to "display-controller" 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 | 75 +++++++++++++++++++++++++++++- 1 file changed, 74 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 094a29624b8d..8e4037597a2c 100644 --- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts +++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts @@ -46,6 +46,59 @@ }; }; + 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 = "ilitek,ili9322"; + reg = <0>; + /* 50 ns min period = 20 MHz */ + spi-max-frequency = <20000000>; + spi-cpol; /* Clock active low */ + + /* Panel LM918A01-1A SY-B4-091116-E0199 */ + width-mm = <65>; + height-mm = <50>; + ilitek,entry-mode = <11>; + ilitek,vreg1out-microvolt = <4600>; + ilitek,vcom-high-percent = <91>; + ilitek,vcom-amplitude-percent = <114>; + ilitek,gamma-correction-neg = <0xa>, <0x5>, <0x7>, + <0x7>, <0x7>, <0x5>, <0x1>, <0x6>; + ilitek,gamma-correction-pos = <0x7>, <0x7>, <0x3>, + <0x2>, <0x3>, <0x5>, <0x7>, <0x2>; + vcc-supply = <&vdisp>; + iovcc-supply = <&vdisp>; + vci-supply = <&vdisp>; + + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; + }; + }; + leds { compatible = "gpio-leds"; led@7 { @@ -114,7 +167,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>; @@ -241,5 +303,16 @@ ata@63000000 { status = "okay"; }; + + display-controller@6a000000 { + status = "okay"; + + port@0 { + reg = <0>; + display_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; }; };