From patchwork Thu Dec 7 15:58:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 121003 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8533910qgn; Thu, 7 Dec 2017 08:00:00 -0800 (PST) X-Google-Smtp-Source: AGs4zMZua9DQPmcmAtrkI/VXykwHKfGBtU9v1AsBcBfYN0PBnM/irED/8EKKmAyUFRoa3eIP5Ztu X-Received: by 10.99.127.70 with SMTP id p6mr25302505pgn.418.1512662400481; Thu, 07 Dec 2017 08:00:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512662400; cv=none; d=google.com; s=arc-20160816; b=orfywjcZbQA7hdreuHuGrTsTKXMLE9jM3jHV8tZGDf2hqmtD+BFQJdDudfwEnhx1r5 T5t6idibJG1BWPx/w5GOEjDiZorV4kngPXARDGaOds3lg6DnytO1TF6Jp89AO3gQR+oM xL3z0BXZt8MBBrrlC7kyEg2PUj0BugWffyv+jAnhAQrk2JYl1sTRf4lwtGmWDrNx2FGd m65SY3m74iduOR4ADW7s1FWER0H0njI/DXRuVI3A35g5xdSHSAvNIzmYQnJD/PmADKQ+ BsmSBTx4FTPH02BtpNfAZgcL3UvkyeSM9AHF7a69IRKCXM0qqyx3Yc9GiQT3lXcy8ZYa +mjw== 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:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=PGPrlvJMowfoECLbU+owFsj6DbrmbEGgNWH06kQcALk=; b=UiW41GpY4/ivbHnznFHsBPruDu3oZQni5Ng0saFGFtEsEVK9vLbe7qX8CK+hUAmzO1 B+YzM8ExGvN78ANoiKD7EY9VUePavB7zOzLpYh3ZAkAGWZhQ5AanMtDfHelFN0sbEd4C /uljksDoBaj9oH/UEhGor+drFSCKMuAm3WYytweuWC/8WF6jeLJS4mnHiCH6w4Umg5Lq rsTcxUKKhskEc+nJh8P8APE5vQaIAD+VsTLlj8qxKiEwlxL5jKOgSIRY8YRyEDdY3Bwc YC1XPOq80vf45iarzQ9iz5hVOMG1NE9r2UPMp+ZRhU14OORyHIF2J2GN/dA/N/pqk2JL OCbw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id 13si4259335pfm.342.2017.12.07.08.00.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 08:00:00 -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; 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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 687416E840; Thu, 7 Dec 2017 15:59:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A4096E831 for ; Thu, 7 Dec 2017 15:59:25 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 1C25420E1C; Thu, 7 Dec 2017 16:59:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [185.94.189.187]) by mail.free-electrons.com (Postfix) with ESMTPSA id D928D20CA3; Thu, 7 Dec 2017 16:59:13 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 01/15] dt-bindings: panel: lvds: Document power-supply property Date: Thu, 7 Dec 2017 16:58:46 +0100 Message-Id: <10bad1055cf009e0f61e5779dd3d34d1b83c43f5.1512662253.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Mark Rutland , Thomas Petazzoni , jernej.skrabec@siol.net, plaes@plaes.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , thierry.reding@gmail.com, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io 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" The power-supply property is used by a vast majority of panels, including panel-simple. Let's document it as a common property Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/display/panel/panel-common.txt | 6 ++++++ Documentation/devicetree/bindings/display/panel/panel-lvds.txt | 1 + Documentation/devicetree/bindings/display/panel/simple-panel.txt | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.txt b/Documentation/devicetree/bindings/display/panel/panel-common.txt index ec52c472c845..125ea68052af 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-common.txt +++ b/Documentation/devicetree/bindings/display/panel/panel-common.txt @@ -78,6 +78,12 @@ used for panels that implement compatible control signals. while active. Active high reset signals can be supported by inverting the GPIO specifier polarity flag. +Power +----- + +- power-supply: many display panels need an additional power supply in + order to be fully powered-up. For such panels, power-supply contains + a phandle to the regulator powering the panel. Backlight --------- diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.txt b/Documentation/devicetree/bindings/display/panel/panel-lvds.txt index b938269f841e..250850a2150b 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-lvds.txt +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.txt @@ -32,6 +32,7 @@ Optional properties: - label: See panel-common.txt. - gpios: See panel-common.txt. - backlight: See panel-common.txt. +- power-supply: See panel-common.txt. - data-mirror: If set, reverse the bit order described in the data mappings below on all data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6. diff --git a/Documentation/devicetree/bindings/display/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt index 1341bbf4aa3d..16d8ff088b7d 100644 --- a/Documentation/devicetree/bindings/display/panel/simple-panel.txt +++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt @@ -1,7 +1,7 @@ Simple display panel Required properties: -- power-supply: regulator to provide the supply voltage +- power-supply: See panel-common.txt Optional properties: - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing From patchwork Thu Dec 7 15:58:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 121008 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8534494qgn; Thu, 7 Dec 2017 08:00:24 -0800 (PST) X-Google-Smtp-Source: AGs4zMbBrQ8+ExspGwjsVhVGLmcYKyXWBCj3TV3GUMQlWTb2snqPa3LapFAlQmUQ9QdpUjv2DX75 X-Received: by 10.99.44.14 with SMTP id s14mr25499566pgs.4.1512662424307; Thu, 07 Dec 2017 08:00:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512662424; cv=none; d=google.com; s=arc-20160816; b=aNxLq+nnRWvPTPjrXavuwsbatqvCg+qv6Lf0MltNk4ah1Tk005lIt9ZkDtB1Ll1XQe 7g6ZmP1NIbzyhmicSFgA6Js3WqG5UK4F/CdOeA5hXuUQ7ifkOuYxcY3uQFRc/xx2Gp1P QW76+0SEqXi/pHevnXlKrxLUxEE1pdWzIhFECYNP2UcUPJoA5SC1XN1WgYTPSAfynOZ8 6BpfK997kpURvhwi+HT2UIjE9zlfbmCMxjO+I3wyOBzH7pwK3+THRtmtLgpIP30hGKo4 yYsHgQDVfktD6OOfxDTTN65xEsrvl2Ocpt/HcoUX71/lJyPLd6QH2l2k6/kca1ZtLNcr HRsA== 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:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=9k9SmHQGMnEn6X8ToPfkkxOR1OorG/UOt3sKZ6f/14Y=; b=CgXsH94RTao453DhttoBnJ3lkKfczwu2BBj66MyuTxs7dG/X+eCueQmLKkUFYl7Cig RWRmE6AAVU/NBeojHmBAlNc52OZHiN1HIxI9VeNSFsg8nobVvoDiP7tAE6gVpzeQ4VoM 6P36W0K2cAFd/OdEBf7zQoFeJ8MZ7+RcE0a9hb6f8V/+SezWOeRzdC4BHil0Un6ofA87 CTbFOcLQGl/1txjI3Yl6tggvx0FWoM/S34D/9F4mp2XjEla0D7arCGAR7xNE+aQ9iNyy UTlp58ORlyp5nuVglIvNSBJhDb0zijgqRrjGuADbTXl562F2Nv3CzpVhnTA/5EvFGQoM N8pg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id d21si3852646pll.224.2017.12.07.08.00.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 08:00:24 -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; 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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8EB996E83C; Thu, 7 Dec 2017 15:59:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 264946E836 for ; Thu, 7 Dec 2017 15:59:26 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id E1DF520CA3; Thu, 7 Dec 2017 16:59:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [185.94.189.187]) by mail.free-electrons.com (Postfix) with ESMTPSA id A1B3420CC2; Thu, 7 Dec 2017 16:59:14 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 02/15] drm/panel: lvds: Add support for the power-supply property Date: Thu, 7 Dec 2017 16:58:47 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Mark Rutland , Thomas Petazzoni , jernej.skrabec@siol.net, plaes@plaes.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , thierry.reding@gmail.com, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io 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" A significant number of panels need to power up a regulator in order to operate properly. Add support for the power-supply property to enable and disable such a regulator whenever needed. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- drivers/gpu/drm/panel/panel-lvds.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c index e2d57c01200b..57e38a9e7ab4 100644 --- a/drivers/gpu/drm/panel/panel-lvds.c +++ b/drivers/gpu/drm/panel/panel-lvds.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -39,6 +40,7 @@ struct panel_lvds { bool data_mirror; struct backlight_device *backlight; + struct regulator *supply; struct gpio_desc *enable_gpio; struct gpio_desc *reset_gpio; @@ -69,6 +71,9 @@ static int panel_lvds_unprepare(struct drm_panel *panel) if (lvds->enable_gpio) gpiod_set_value_cansleep(lvds->enable_gpio, 0); + if (lvds->supply) + regulator_disable(lvds->supply); + return 0; } @@ -76,6 +81,17 @@ static int panel_lvds_prepare(struct drm_panel *panel) { struct panel_lvds *lvds = to_panel_lvds(panel); + if (lvds->supply) { + int err; + + err = regulator_enable(lvds->supply); + if (err < 0) { + dev_err(lvds->dev, "failed to enable supply: %d\n", + err); + return err; + } + } + if (lvds->enable_gpio) gpiod_set_value_cansleep(lvds->enable_gpio, 1); @@ -196,6 +212,13 @@ static int panel_lvds_probe(struct platform_device *pdev) if (ret < 0) return ret; + lvds->supply = devm_regulator_get_optional(lvds->dev, "power"); + if (IS_ERR(lvds->supply)) { + ret = PTR_ERR(lvds->supply); + dev_err(lvds->dev, "failed to request regulator: %d\n", ret); + return ret; + } + /* Get GPIOs and backlight controller. */ lvds->enable_gpio = devm_gpiod_get_optional(lvds->dev, "enable", GPIOD_OUT_LOW); From patchwork Thu Dec 7 15:58:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 121009 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8534749qgn; Thu, 7 Dec 2017 08:00:34 -0800 (PST) X-Google-Smtp-Source: AGs4zMa0+yo0r37OKO/qAVWWelfnIomcXCOdr9WMmbkXngNWn8WlzUHYEzgbQr55Pz2tIOhPyZRu X-Received: by 10.99.7.143 with SMTP id 137mr25238653pgh.158.1512662434544; Thu, 07 Dec 2017 08:00:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512662434; cv=none; d=google.com; s=arc-20160816; b=k6gAiopc8M5I7hmVsUVohEVqixFfnHjXV5nop2ochCEtcVn14OMYAEgXPyW7WOkOXq ugf+tAu/ttKsBGaZPYGCvNvjfZ/+gVWdLrjjF8t1MGGYoE2MTwtmqSLQixK0XeNkHjXE /UQnCrY5JI3hAmqIG4ohk9eYsgggguF0O9Wv2MVtgNNpc66oYubRfSGCWzHDEpO2SnF5 /1phCNVVH/sjDXFC0dc2SyVSlfmeagy0qGxP+ddNoCJ3p3PDqkiW6qGOEfSd7QKhKfH0 2rgqHcJF6fbKRNZq9A/6gXyAuNs3BS2sWkgH0Z40HiCwgMxTnyDNEL4B8m3m6R9zLoht vNPA== 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:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=7pzuPYkPzeqia9I/2Qq86oIfVyFcYSUvcYEXiflehmg=; b=H1+I1fnDbmoN1oDzXXfFeB1BgQWRSAco5J8hyvOsj5DRRj8WtLPGPcUq9pHISNwX9a HxZL12OOknH61DikCoSXFi0QM1Y1/X8Vm92K6oUPDEDVuD3RC985Cmq2rvUPb7lkHP6a NwK42nzxlmk4vLaULenGV0PNX4FwQ7dKZ/CrfRaP3Vf1FDdWuqCXbhVWitxOMnYWMMhl AXzhwNSZ00euPhDcxjxP9GgELxIP6qKFY+KbGsa9VIR+ZV56ARwPJsTcuJOpD3U+F13S LvIWZR2Nq9A4lRQzD1ckPzTYkFiGnIPRNr0zC5EOGALCn8hbJ9fYVn+HRA88xBkWn+sB HrjA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id g3si3915419pld.709.2017.12.07.08.00.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 08:00:34 -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; 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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BE7DB6E844; Thu, 7 Dec 2017 15:59:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F0E96E83D for ; Thu, 7 Dec 2017 15:59:27 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 68F4020D19; Thu, 7 Dec 2017 16:59:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [185.94.189.187]) by mail.free-electrons.com (Postfix) with ESMTPSA id 23BD120D1F; Thu, 7 Dec 2017 16:59:16 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 04/15] dt-bindings: display: sun4i-drm: Add A83T pipeline Date: Thu, 7 Dec 2017 16:58:49 +0100 Message-Id: <4ceba537249abbfd5f8aa2d82afb93f84dc20359.1512662253.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Mark Rutland , Thomas Petazzoni , jernej.skrabec@siol.net, plaes@plaes.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , thierry.reding@gmail.com, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io 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" The A83T has two video pipelines in parallel that looks quite similar to the other SoCs. The video planes are handled through a controller called the mixer, and the video signal is then passed to the timing controller (TCON). And while there is two instances of the mixers and TCONs, they have a significant number of differences. The TCONs are quite easy to deal with, one is supposed to generate TV (in the broader term, so including things like HDMI) signals, the other one LCD (so RGB, LVDS, DSI) signals. And while they are called TCON0 and TCON1 in the A83t datasheet, newer SoCs call them TCON-TV and TCON-LCD, which seems more appropriate. However, the mixers differ mostly by their capabilities, with some features being available only in the first one, or the number of planes they expose, but also through their register layout. And while the capabilities could be represented as properties, the register layout differences would need to express all the registers offsets as properties, which is usually quite bad. Especially since documentation on that hardware block is close to non-existant and we don't even have the list of all those registers in the first place. So let's call them mixer 0 and 1 in our compatibles, even though the name is pretty bad... At the moment, we only have tested the code on a board that has a single display output, so we're leaving the tcon-tv and mixer1 out. Reviewed-by: Rob Herring Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt index 1e21cfaac9e2..9f073af4c711 100644 --- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt +++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt @@ -93,6 +93,7 @@ Required properties: * allwinner,sun6i-a31s-tcon * allwinner,sun7i-a20-tcon * allwinner,sun8i-a33-tcon + * allwinner,sun8i-a83t-tcon-lcd * allwinner,sun8i-v3s-tcon - reg: base address and size of memory-mapped region - interrupts: interrupt associated to this IP @@ -225,6 +226,7 @@ supported. Required properties: - compatible: value must be one of: + * allwinner,sun8i-a83t-de2-mixer-0 * allwinner,sun8i-v3s-de2-mixer - reg: base address and size of the memory-mapped region. - clocks: phandles to the clocks feeding the mixer @@ -254,6 +256,7 @@ Required properties: * allwinner,sun6i-a31s-display-engine * allwinner,sun7i-a20-display-engine * allwinner,sun8i-a33-display-engine + * allwinner,sun8i-a83t-display-engine * allwinner,sun8i-v3s-display-engine - allwinner,pipelines: list of phandle to the display engine From patchwork Thu Dec 7 15:58:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 121010 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8535215qgn; Thu, 7 Dec 2017 08:00:50 -0800 (PST) X-Google-Smtp-Source: AGs4zMYfvnrAupV5uA0wKg7q1V4MNx7SU3jAU92lHxnLA4jaMKTP2QpXwjX+867HBSIbPnpTlVSF X-Received: by 10.84.252.139 with SMTP id y11mr2533677pll.389.1512662450627; Thu, 07 Dec 2017 08:00:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512662450; cv=none; d=google.com; s=arc-20160816; b=1JGkkXOkuBR0mWH3e0Kmd42NSRmW4RqzMe7fpkdp5kPe4PRluyvQuxIEwwTmCyec8n 0HaovPZUOO0Z+/USdrBWAwbFKyNyUWr8pgHGX/pHfCJhBChYWw3GiUXCOyRAggU0ulLO 2nkow/73nwXipTKi6trx+DBsjQLZEa3dWigZNWb83LbuadJDP6uVFh4Wxj00zO0WV2kF xX8LgeMD15Mieyy4tPdg/khd+Wj+wCrthELnRUlq33I7OM+Y9h4nCqhBEfz8b/3mN7y9 L5Rp02dAnN0XPOOaDEiKJVGCU8+Gy6oHnxRy0DM53iBKIhFFnYxYMsu+9gM59jNRnuH0 vzpQ== 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:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=XYDYiB/95pFcxzgfxrSM6bKohU2sMy84SDefx+3s0vk=; b=bmQXhsTGQGtyUsec8op9tg01S9m269MOQgdv2SlFBNXsJaUMRci9n3iG86vQqEpCND XItIDqSodPgQn13tMrBxAkWPJ0iX7xz+yFikdVQPTF60oX8MjCjOohKuHh9b7WsMI4Cp Et7ReeNi6LRzRj4oVvDOfCP4/FYV8b49xAWhY1DfTNzBnh7xXhhx9rep2oi/ydBwMhVY cm5RJjvc8ZvBTpouw1GXqo9bpkWfJEDrE8YU7UJQ1ZR6lluSa+ufNH6MI/uJzzKTieyK 4r7+wJ2AR1+lOc/aahtI6FCqW2Rc90siF3g6lQTON8BqsUvpE3ay0VdveCpB6P1C7SCe oSAg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id x5si3907582pge.830.2017.12.07.08.00.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 08:00:50 -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; 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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 981846E848; Thu, 7 Dec 2017 15:59:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 607316E83D for ; Thu, 7 Dec 2017 15:59:28 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 2898720E57; Thu, 7 Dec 2017 16:59:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [185.94.189.187]) by mail.free-electrons.com (Postfix) with ESMTPSA id D831820D84; Thu, 7 Dec 2017 16:59:16 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 05/15] drm/sun4i: Fix error path handling Date: Thu, 7 Dec 2017 16:58:50 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Mark Rutland , Thomas Petazzoni , jernej.skrabec@siol.net, plaes@plaes.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , thierry.reding@gmail.com, stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io 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" The commit 4c7f16d14a33 ("drm/sun4i: Fix TCON clock and regmap initialization sequence") moved a bunch of logic around, but forgot to update the gotos after the introduction of the err_free_dotclock label. It means that if we fail later that the one introduced in that commit, we'll just to the old label which isn't free the clock we created. This will result in a breakage as soon as someone tries to do something with that clock, since its resources will have been long reclaimed. Cc: Fixes: 4c7f16d14a33 ("drm/sun4i: Fix TCON clock and regmap initialization sequence") Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index a1ed462c2430..ea056a3d2131 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -724,12 +724,12 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master, if (IS_ERR(tcon->crtc)) { dev_err(dev, "Couldn't create our CRTC\n"); ret = PTR_ERR(tcon->crtc); - goto err_free_clocks; + goto err_free_dotclock; } ret = sun4i_rgb_init(drm, tcon); if (ret < 0) - goto err_free_clocks; + goto err_free_dotclock; if (tcon->quirks->needs_de_be_mux) { /* From patchwork Thu Dec 7 15:58:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 121006 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8534106qgn; Thu, 7 Dec 2017 08:00:08 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ0kEXYfzpYXiBfj7GUR6Em8+6y6neiU5BfmqyAqNZK9BKjR2pzzu9DqzX3OwzeTQqkj95w X-Received: by 10.99.123.90 with SMTP id k26mr25944902pgn.33.1512662408676; Thu, 07 Dec 2017 08:00:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512662408; cv=none; d=google.com; s=arc-20160816; b=HTD5IHQ6YDQ9QJNGe84y5FPOi5+HI1I5koStgE6/ACYyv6AOkUA4Kf8/c4OQrc1sW9 6440T2z1tAPt2bBJTaUNVU0IByn+XNNXPZJELkyq2pmDiFXjeSVaqk1xV4+nTVnslqw8 Ivj811rD678YC4GmNmwNBW/O2ELoTlZTWINjDC31u+QF2s6N0VVcRTGAGbyCltniPsud xbLJhkVGcynew/WRMNQTcdwyplZ33Se7O5vrNGM8ZfXQ3y9wyoWvhKE20TuJeEOdB+eF oaMDomw5mFeoc/xUNSaMJ56HaFiKD3vaDNbuhhnkhjSf1zO+KcmyMKRhCcWnddtYwS/4 aoMA== 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:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=3qBa8P91rmWb3Vl9Fin/TfJEyF9WRHex731YQQ+f/uI=; b=1Jfoi14E9TVMXxcMcTqJZ+odTndcLiKTNEIfUk9WXkOdZFgRj0d9v4dpM0z49V3h63 nDGSGUZ6/x0Rx4GgBfZhXTiH8xsIv0HJ7El7O5yEYgYcYQ5tu9o1qh6+1DDt5UuXTz5h VUz5zxgT8roEYSQBmZiaRfOUbGWwHvRRM/zkDdrtsVg1L503BVDHW18kgBFfj7B8zUUV C2ExPRm0IRFh+AZJuQy6Av3hBIiG6tHjte0B2tBYDAlEDH8Jee268irN0nHHt95EP+ue MiwLiCcIJnJROJgphlp0JbAGgyQKaJ++cfP04VMMucFhaTjwCegrKI7/Tsmb+tFaGmau p8DA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id r27si3856548pgn.85.2017.12.07.08.00.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 08:00:08 -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; 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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 54C866E814; Thu, 7 Dec 2017 15:59:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id D2B3A6E847 for ; Thu, 7 Dec 2017 15:59:29 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 9C5D420D84; Thu, 7 Dec 2017 16:59:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [185.94.189.187]) by mail.free-electrons.com (Postfix) with ESMTPSA id 9B2A420D96; Thu, 7 Dec 2017 16:59:17 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 06/15] drm/sun4i: Force the mixer rate at 150MHz Date: Thu, 7 Dec 2017 16:58:51 +0100 Message-Id: <34f2c9d5c9ab48ead94253144a8e829cccfa4653.1512662253.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Mark Rutland , Thomas Petazzoni , jernej.skrabec@siol.net, plaes@plaes.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , thierry.reding@gmail.com, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io 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" It seems like the mixer can only run properly when clocked at 150MHz. In order to have something more robust than simply a fire-and-forget assigned-clocks-rate, let's put that in the code. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun8i_mixer.c | 9 +++++++++ drivers/gpu/drm/sun4i/sun8i_mixer.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c index 29ceeb016d72..ff235e3228ce 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c @@ -400,6 +400,14 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master, } clk_prepare_enable(mixer->mod_clk); + /* + * It seems that we need to enforce that rate for whatever + * reason for the mixer to be functional. Make sure it's the + * case. + */ + if (mixer->cfg->mod_rate) + clk_set_rate(mixer->mod_clk, mixer->cfg->mod_rate); + list_add_tail(&mixer->engine.list, &drv->engine_list); /* Reset the registers */ @@ -474,6 +482,7 @@ static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = { .ui_num = 1, .scaler_mask = 0x3, .ccsc = 0, + .mod_rate = 150000000, }; static const struct of_device_id sun8i_mixer_of_table[] = { diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.h b/drivers/gpu/drm/sun4i/sun8i_mixer.h index bc58040a88f9..f34e70c42adf 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.h +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.h @@ -121,12 +121,15 @@ struct de2_fmt_info { * Set value to 0 if this is first mixer or second mixer with VEP support. * Set value to 1 if this is second mixer without VEP support. Other values * are invalid. + * @mod_rate: module clock rate that needs to be set in order to have + * a functional block. */ struct sun8i_mixer_cfg { int vi_num; int ui_num; int scaler_mask; int ccsc; + unsigned long mod_rate; }; struct sun8i_mixer { From patchwork Thu Dec 7 15:58:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 121000 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8533787qgn; Thu, 7 Dec 2017 07:59:53 -0800 (PST) X-Google-Smtp-Source: AGs4zMZMq2ETwR84ETMq9c3q5gpT8XvOGpDOdE6qSSwr4rAok+JLw5/uA0HBEehrcw4tiVjhRSE/ X-Received: by 10.101.99.140 with SMTP id h12mr25332989pgv.80.1512662393745; Thu, 07 Dec 2017 07:59:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512662393; cv=none; d=google.com; s=arc-20160816; b=cFnQcJ3Ge0IR0c+Ce3JiEudp8saGx4H2DkvVI5cEoUWDwVm6Oj9xn2GLnex9V9bFBN axHsyy8qq+1eRQhfoQ2RdNEpDbzQ1fD0GKdQiTV5BBhOvT5U3R3VMVBxe1grJw6l4aJI MIlQ5tbc83lcg221INO1JjdIEirPl5yLQ1DkB9v/zLh7YyZ/m71AD7KFblnYJaqpl2z1 LohscJNUTj/wVhGaaIL1zP8k4YVin6gdb08Sr2P8l//YlxgwWa0G/lZwFI1MIvd9C8Mx 9sDBxmqtOidGlvzdpQ1vMoBzLceqJxRYI+oekVfmuH4HSK6oq7A/qIFj+hb7Qo2SKjX4 +Yig== 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:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=whs27aOwaT2f9hmHLSiTIgSVcxWkBUI1xMIyPhvAzco=; b=ecy+e353t6r9wh04A6CHmdo5X4DbaJgdz5ALMk1di4cDCecJdEO0O567wvT0un+s7M ydKrWRQfxlj44IE0S2Tniao8H0vmZw6h5y/7K82wykkK4tcYPiVFhWLQndpyzf2NavVF K/MDer94rSfRs60PppvzqlFhfaKu0iAMokkMdkw/N0WaLba1x7mMjPqU2qja4kkTdK5H +/Xexp45pYPHL9on7QWcYF44JKgVeC8IaVGjR+5WqMaJs/zuwQOI2mJaPosK7LkSnlkD BwELqdSEBEl9yvX35jIVmC/UnRzd7BSvxKElatQYXYU7MQMZT/ISMLJ0xolsaMNQ3N6M 0VOQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id n128si3879935pga.72.2017.12.07.07.59.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 07:59:53 -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; 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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1AE0B6E232; Thu, 7 Dec 2017 15:59:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id D07916E232 for ; Thu, 7 Dec 2017 15:59:20 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 943FD20DB0; Thu, 7 Dec 2017 16:59:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [185.94.189.187]) by mail.free-electrons.com (Postfix) with ESMTPSA id 4F894209A0; Thu, 7 Dec 2017 16:59:09 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 10/15] ARM: dts: sun8i: a83t: Add display pipeline Date: Thu, 7 Dec 2017 16:58:55 +0100 Message-Id: <66bcfdad37cb5ed6e4629bea6874e5e192f0ba01.1512662253.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Mark Rutland , Thomas Petazzoni , jernej.skrabec@siol.net, plaes@plaes.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , thierry.reding@gmail.com, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io 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" The display pipeline on the A83T is mainly composed of the mixers and TCONs, plus various encoders. Let's add the first mixer and TCON to the DTSI since the only board I have can use only the LVDS output on the first TCON. The other parts will be added eventually. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a83t.dtsi | 79 ++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi index 19acae1b4089..e4db38c717d9 100644 --- a/arch/arm/boot/dts/sun8i-a83t.dtsi +++ b/arch/arm/boot/dts/sun8i-a83t.dtsi @@ -45,8 +45,10 @@ #include #include +#include #include #include +#include #include / { @@ -151,6 +153,12 @@ }; }; + de: display-engine { + compatible = "allwinner,sun8i-a83t-display-engine"; + allwinner,pipelines = <&mixer0>; + status = "disabled"; + }; + memory { reg = <0x40000000 0x80000000>; device_type = "memory"; @@ -162,6 +170,44 @@ #size-cells = <1>; ranges; + display_clocks: clock@1000000 { + compatible = "allwinner,sun8i-a83t-de2-clk"; + reg = <0x01000000 0x100000>; + clocks = <&ccu CLK_PLL_DE>, + <&ccu CLK_BUS_DE>; + clock-names = "mod", + "bus"; + resets = <&ccu RST_BUS_DE>; + #clock-cells = <1>; + #reset-cells = <1>; + }; + + mixer0: mixer@1100000 { + compatible = "allwinner,sun8i-a83t-de2-mixer-0"; + reg = <0x01100000 0x100000>; + clocks = <&display_clocks CLK_BUS_MIXER0>, + <&display_clocks CLK_MIXER0>; + clock-names = "bus", + "mod"; + resets = <&display_clocks RST_MIXER0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + mixer0_out: port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + mixer0_out_tcon0: endpoint@0 { + reg = <0>; + remote-endpoint = <&tcon0_in_mixer0>; + }; + }; + }; + }; + syscon: syscon@1c00000 { compatible = "allwinner,sun8i-a83t-system-controller", "syscon"; @@ -177,6 +223,39 @@ #dma-cells = <1>; }; + tcon0: lcd-controller@1c0c000 { + compatible = "allwinner,sun8i-a83t-tcon-lcd"; + reg = <0x01c0c000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>; + clock-names = "ahb", "tcon-ch0"; + clock-output-names = "tcon-pixel-clock"; + resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>; + reset-names = "lcd", "lvds"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + tcon0_in: port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + tcon0_in_mixer0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mixer0_out_tcon0>; + }; + }; + + tcon0_out: port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + }; + }; + mmc0: mmc@1c0f000 { compatible = "allwinner,sun8i-a83t-mmc", "allwinner,sun7i-a20-mmc"; From patchwork Thu Dec 7 15:58:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120996 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8533302qgn; Thu, 7 Dec 2017 07:59:27 -0800 (PST) X-Google-Smtp-Source: AGs4zMY0932XsF+S6dr4/V0hNy3Sd1YNAIn2eXWIAo51KbvoX8o95BGXMXgo6IilmejaLu0d+qiB X-Received: by 10.101.90.8 with SMTP id y8mr25671124pgs.21.1512662367227; Thu, 07 Dec 2017 07:59:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512662367; cv=none; d=google.com; s=arc-20160816; b=ezRLEXS/BsfesQM6btJtRJUTdUZTYTr3NpdK408yU6zE2eGD01uY0+rA1AsDE3FxCu Dzkc5AZNBvLXtlHbl5boz7AGe1IgCcG7RyZyyU8lTPw/YgcCJjEeBPqpiNCUrZb70II5 nf1hxvpRCaYVoMz++gcrG/o+CBT5tKihuRVA+wAdl2hwXM0iWRzq+xFY0DEE+Aeh8nPy lTu72ekbeKEJ/IllmhU8cEGQo8zPDV2KrgNvKFnnBEsVvxhfQ8lrrFnOjHdaf86JmeUq 1btNOUEvnkX6vnBRKD/XF1iARn86X6EZgbgm0RkUrk2ZFMjSxjuOGviwzHNpAzSfCAxD y3og== 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:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=CitszxNLD56G7MlJO4m2Ae9iawO+A/VluixhqC9T34g=; b=hLo3S979ohULpe6eNt2fd0YeRQdfW5wGDDhsa3pZgsLqGtpPIFMlqFjxlAjZnBl+vV ZRtRQ0W2jXwK+EZj/Fw0bUu1Gz+Gc+NgHneFkXJyjx5pzQQwpIlzI9KUnGyA+uG84JyY hkp19rb/+lS7iXE860//Yrog4F6BKoxXaR74oT3f9l8ivwpkecb08a7PEZIiiALQ7FcC x80l5vR8YAp6F8fs1xdgw/b4djuTzktpxG7nP8aA45pT7OEtWBhFAAyzbQjHFKthtdko 2MJC4vA3WEK8q61TNnwAm8xelnlD+B1nEwnfwfzUJszHPcCbO5SdPbPFzI/KKAXyt0nz Mk0g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id q3si3905187pgp.97.2017.12.07.07.59.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 07:59:27 -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; 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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E64916E82F; Thu, 7 Dec 2017 15:59:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 8BAEE6E232 for ; Thu, 7 Dec 2017 15:59:21 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 4DB7620DAB; Thu, 7 Dec 2017 16:59:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [185.94.189.187]) by mail.free-electrons.com (Postfix) with ESMTPSA id 1103A20C1C; Thu, 7 Dec 2017 16:59:10 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 11/15] ARM: dts: sun8i: a83t: Enable the PWM Date: Thu, 7 Dec 2017 16:58:56 +0100 Message-Id: <0ba30615a45a4dbbde0403b19ec3dd70ee7a8f4b.1512662253.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Mark Rutland , Thomas Petazzoni , jernej.skrabec@siol.net, plaes@plaes.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , thierry.reding@gmail.com, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io 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" The A83T has the same PWM block than the H3. Add it to our DT. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a83t.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi index e4db38c717d9..7a49b9f085eb 100644 --- a/arch/arm/boot/dts/sun8i-a83t.dtsi +++ b/arch/arm/boot/dts/sun8i-a83t.dtsi @@ -497,6 +497,15 @@ status = "disabled"; }; + pwm: pwm@1c21400 { + compatible = "allwinner,sun8i-a83t-pwm", + "allwinner,sun8i-h3-pwm"; + reg = <0x01c21400 0x400>; + clocks = <&osc24M>; + #pwm-cells = <3>; + status = "disabled"; + }; + uart0: serial@1c28000 { compatible = "snps,dw-apb-uart"; reg = <0x01c28000 0x400>; From patchwork Thu Dec 7 15:58:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 121001 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8533810qgn; Thu, 7 Dec 2017 07:59:55 -0800 (PST) X-Google-Smtp-Source: AGs4zMbu2ScMnn+513n5XRd9HVQss+c7y6klFxok1xke6hYJJdEOMAKcMYPqlELTHTgCrmiEcQIF X-Received: by 10.99.145.199 with SMTP id l190mr25626728pge.132.1512662395483; Thu, 07 Dec 2017 07:59:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512662395; cv=none; d=google.com; s=arc-20160816; b=0+1E2yQHYxYIaI/Tm3Yx/LUesvoJ3Eeh6mEk755Sd+Dq2hZGOt0YqphpXJ6a/BZ1zy oSH62BXcUDio+O6Z7SfFAL54hAkZXtBC/sDyAl+bk91JmaZHjsJG3OgJjOk5M1Tgos/P 4LDSo8y5UReYILr2ZCPyWipDBBo22y27VzMnCNBWDWpvuPaDi7FZzBsSk5U/RzdE/ZZu EEHhfub5Q+wn27zLBWkv3v8+636UALMQgiF78oVb2d8kqj9WqRH+QoYaWUq+g/Xwte/H 724o0Wcxz1xAzYikmxogyH8ExBhboOdSii0i7ac82To7hQZ7w1pIj9Dx+trI8prBM96T 4tSg== 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:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=KFScKE/dtBfdt+1fcgMBMmPpKEzI2Hlh9McGCTtoD0I=; b=hW88qrQd4PA4DTzmpL6RBjh+CSDiBUmbvHBWI/vZAxaecX2kB8OMoIJQ8WgB1U5Ywa zoioa+CPQb/ibgK1FLLxlq355kNu2AccPvTP7lGOAdWFSjWnvi4wI9HNqVVkPjluDzS9 YNsRelfMRq+madUcsGKrX0+YgsliK9p4A+OAAW2Y3zpom4MyxsCDyIDQlAACuM/vAm85 j/mbZ7NtuCRZN6NVm5jBzBpnbtmwhqNK51WzbfmDGS6rk5SOR3CxsOr3sPBmP0L0tD66 U3zRf4GHqfI0/AH5IBbDQevpCrHpxXIm/QSj+gJtF8lDOpYp4sxxs16Kv2GTxPrcnn02 9yoA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id o3si3912797pld.65.2017.12.07.07.59.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 07:59:55 -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; 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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3EFE06E82C; Thu, 7 Dec 2017 15:59:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 526A46E828 for ; Thu, 7 Dec 2017 15:59:22 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 1BF9320DB3; Thu, 7 Dec 2017 16:59:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [185.94.189.187]) by mail.free-electrons.com (Postfix) with ESMTPSA id CE96D20C3A; Thu, 7 Dec 2017 16:59:10 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 12/15] ARM: dts: sun8i: a83t: Add LVDS pins group Date: Thu, 7 Dec 2017 16:58:57 +0100 Message-Id: <1621056ff45c1305dd3baabe680866517874a4d9.1512662253.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Mark Rutland , Thomas Petazzoni , jernej.skrabec@siol.net, plaes@plaes.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , thierry.reding@gmail.com, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io 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" The A83T has an LVDS bus that can be connected to a panel or a bridge. Add the pinctrl group for it. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a83t.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi index 7a49b9f085eb..e200df5a9058 100644 --- a/arch/arm/boot/dts/sun8i-a83t.dtsi +++ b/arch/arm/boot/dts/sun8i-a83t.dtsi @@ -415,6 +415,12 @@ #interrupt-cells = <3>; #gpio-cells = <3>; + lcd_lvds_pins: lcd-lvds-pins { + pins = "PD18", "PD19", "PD20", "PD21", "PD22", + "PD23", "PD24", "PD25", "PD26", "PD27"; + function = "lvds0"; + }; + mmc0_pins: mmc0-pins { pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; From patchwork Thu Dec 7 15:58:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 121002 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8533907qgn; Thu, 7 Dec 2017 08:00:00 -0800 (PST) X-Google-Smtp-Source: AGs4zMa4OecgLLmZEmubotJ3iUUZnReRhn6wiqc8izS7IWMKaPkUrXdvrdBOE4HmzWAvm+h/UfKn X-Received: by 10.84.128.226 with SMTP id a89mr26610254pla.150.1512662400286; Thu, 07 Dec 2017 08:00:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512662400; cv=none; d=google.com; s=arc-20160816; b=GQ+xT3/QDJiQ1xalK72TvIlZPHd643iax2SMDug7/LvcqUJDpeuJ8zqg+1SIm825O3 pX6Bvlzk1F9WdLWXPaqXIfxFuZQA5IPyO2nc+rnXlzn1csMlPOKwYLxRWFOhTwlRFqVa 8yU7Nvxg3wizQTPKPgYmi0xo7w9ILvOuYYqsQUn/fDABkdQjMKojxPwfx0Rfwp1Xn1OZ osc6vaoP/O/fLEKhrboSd9xWl5vug6yLV0Mu/7XU/y6bTuwT+ogp1WD/a1TeFJq/u2xt lO/XTGp0eMtyHi+lGGhCdZuVWdD8ZJ4D3BZmWPWO4MjhZpH3/bBW+SP9oVirwJdTyNgy vy9A== 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:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=xLVb2QkFFf4LaOn/RuPp/Uy3aF24Lz4KF5A8Gb/svc4=; b=B1BgKr+S5AgfbRinUXAu14RqKqIoQ0VP8c9qg4JKFHA0YpDReH94YFdOGuJmSWf/1H 1DyFvZIMGgKTAuCqBW96bzkfTB1O7lf3tnOW7ZuuF4IeoM71T1tqX2Aksj1BsHkHH1at oM5vuLJmQzKYIBHn/xit/a8Z9EGZyqToIM3nMlG5TT92QZq91BJJyoSb/edjpeadmZsI bQi8WYFAJQJ7N1d1XhDQsh0tEotXWbS+5DKbaz0BNR7gQxQ9QYDrf/1mWPpNMgqzUen7 dJXX7cR/GLQqXIJcD9liI+pffYF5wr+H8MHhb3ZA1m5XsCHedpHQYRQzmz5FrkBN8D31 0k9A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id x3si3992407pll.256.2017.12.07.08.00.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 08:00:00 -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; 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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC60A6E832; Thu, 7 Dec 2017 15:59:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id CF6F96E82E for ; Thu, 7 Dec 2017 15:59:23 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 99C1E20C3C; Thu, 7 Dec 2017 16:59:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [185.94.189.187]) by mail.free-electrons.com (Postfix) with ESMTPSA id 5CDE320C53; Thu, 7 Dec 2017 16:59:12 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 14/15] ARM: dts: sun8i: a711: Reinstate the PMIC compatible Date: Thu, 7 Dec 2017 16:58:59 +0100 Message-Id: <80711a93a5e49166a26ade747687d8ba4ef7a6f3.1512662253.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Mark Rutland , Thomas Petazzoni , jernej.skrabec@siol.net, plaes@plaes.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , thierry.reding@gmail.com, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io 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" When we added the regulator support in commit 90c5d7cdae64 ("ARM: dts: sun8i: a711: Add regulator support"), we also dropped the PMIC's compatible. Since it's not in the PMIC DTSI, unlike most other PMIC DTSI, it obviously wasn't probing anymore. Re-add it so that everything works again. Fixes: 90c5d7cdae64 ("ARM: dts: sun8i: a711: Add regulator support") Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts index 98715538932f..a021ee6da396 100644 --- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts @@ -146,6 +146,7 @@ status = "okay"; axp81x: pmic@3a3 { + compatible = "x-powers,axp813"; reg = <0x3a3>; interrupt-parent = <&r_intc>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; From patchwork Thu Dec 7 15:59:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 121005 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8533980qgn; Thu, 7 Dec 2017 08:00:04 -0800 (PST) X-Google-Smtp-Source: AGs4zMY/5AY3yV+bE5EzerD3q+G3FMfnMTU3xSxoFI7ihzcFIpo50Tp9Fh14IMM7RvfRG8EZ3zm3 X-Received: by 10.99.106.4 with SMTP id f4mr22825667pgc.162.1512662404217; Thu, 07 Dec 2017 08:00:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512662404; cv=none; d=google.com; s=arc-20160816; b=W1DvNsWfLUnJKY14g9R2gkfFE/aRkawGTGr4iNbU86KQMTg8ghaZPSwdbqqIk8VjSh yaKuKtsdOeHzJf1pY8VcKI5CkdgGlZWcF7PyWPjlx3z+GDjSodz6TD1qjck1A0P+CaoI 3qPTbeVtMImYvOi/cSU3YlWKtSC6nzAdK34flPQczgKSgDKIhHsHjH6R36e9dIjHBOsB H7nNHxdBlZPzldpD81MkGaPr5F4YQfA4AFsDg3pHjEjH450UhdUPG7JbtS3/gQCx8jfQ qaVNQCOjCs2uN+pPfUwH8cHC8dGrP41JxrSO+iBcCiIwZP4f9pEXd+LFrffuvEll7+1h zbvg== 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:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=yOtOkkc6awb2NsC5bNUzcnUStPGdnuJt7GN2PktHH3E=; b=qJZhKngZzkZDhVuPwLT5POPWXzPQat0Myv1Dp5/9zUIlcg0hrMDVI49IVqzURR63kN +M8imZtgi7g3JECSwjcQ7wfluD2/7tlmNPlfKB2QVmW27KGhl/itrif5nPgCfV7j2DHI duNXTZUCeuenzsxrcDn3Q586xuCfqnDzQ07DnHvTBtLHC4xwGJLtFre8ZsDGlGTchjtH RC+ete9bE7M2Ypxnmv5kRw1WvehKKsyW7tUX/W6LPVuniMG7QGEJgqLZz9yW2Unlzn9F FdC+y7fMwW9XoEiJdmS35gQy+zYs0OQFwQvRLrTArIFYcVWufC5WRwOlAZ0JcE+qGmlR BwxA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id e61si3844104plb.758.2017.12.07.08.00.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 08:00:04 -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; 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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CEC906E837; Thu, 7 Dec 2017 15:59:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E4776E831 for ; Thu, 7 Dec 2017 15:59:24 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 5674420C53; Thu, 7 Dec 2017 16:59:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [185.94.189.187]) by mail.free-electrons.com (Postfix) with ESMTPSA id 1D4FC20C89; Thu, 7 Dec 2017 16:59:13 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 15/15] ARM: dts: sun8i: a711: Enable the LCD Date: Thu, 7 Dec 2017 16:59:00 +0100 Message-Id: <190e169fb62cbc75ac786ecaa3c63cdcb1b5b209.1512662253.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Mark Rutland , Thomas Petazzoni , jernej.skrabec@siol.net, plaes@plaes.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , thierry.reding@gmail.com, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io 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" The A711 has 1024x600 LVDS panel, with a PWM-based backlight. Add it to our DT. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 61 ++++++++++++++++++++++++- 1 file changed, 61 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts index a021ee6da396..511fca491fe8 100644 --- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts @@ -45,6 +45,7 @@ #include "sun8i-a83t.dtsi" #include +#include / { model = "TBS A711 Tablet"; @@ -59,6 +60,44 @@ stdout-path = "serial0:115200n8"; }; + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; + enable-gpios = <&pio 3 29 GPIO_ACTIVE_HIGH>; + + brightness-levels = <0 1 2 4 8 16 32 64 128 255>; + default-brightness-level = <9>; + }; + + panel { + compatible = "tbs,a711-panel", "panel-lvds"; + backlight = <&backlight>; + power-supply = <®_sw>; + + width-mm = <153>; + height-mm = <90>; + data-mapping = "vesa-24"; + + panel-timing { + /* 1024x600 @60Hz */ + clock-frequency = <52000000>; + hactive = <1024>; + vactive = <600>; + hsync-len = <20>; + hfront-porch = <180>; + hback-porch = <160>; + vfront-porch = <12>; + vback-porch = <23>; + vsync-len = <5>; + }; + + port { + panel_input: endpoint { + remote-endpoint = <&tcon0_out_lcd>; + }; + }; + }; + reg_vbat: reg-vbat { compatible = "regulator-fixed"; regulator-name = "vbat"; @@ -89,6 +128,10 @@ }; }; +&de { + status = "okay"; +}; + /* * An USB-2 hub is connected here, which also means we don't need to * enable the OHCI controller. @@ -142,6 +185,12 @@ status = "okay"; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm_pin>; + status = "okay"; +}; + &r_rsb { status = "okay"; @@ -323,6 +372,18 @@ regulator-name = "vcc-lcd"; }; +&tcon0 { + pinctrl-names = "default"; + pinctrl-0 = <&lcd_lvds_pins>; +}; + +&tcon0_out { + tcon0_out_lcd: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pb_pins>;