From patchwork Tue Dec 5 15:10:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120675 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5864772qgn; Tue, 5 Dec 2017 07:11:13 -0800 (PST) X-Google-Smtp-Source: AGs4zMbsPPK6C3Bt8vCKz9qIBSgFBE7ZV5Nj9191BIx8bx+CRG3hR4pWbbWBAtqo2Jf4yVJhSHRx X-Received: by 10.84.232.202 with SMTP id x10mr10494365plm.389.1512486673063; Tue, 05 Dec 2017 07:11:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512486673; cv=none; d=google.com; s=arc-20160816; b=AO8SPp2jGc8AN8mwYcWj9Cu8YhRN4hbglHEevvNVaiwyi+ZXhw//ohVpPzIP+7tcRW TT3hw4oscQUnDr1ntbJ8d5KAhy4rJN64RPPGv3E8Z10femdHZYousM2eqo9zBzgt3Gjh wjENvdEw9BPv9FucM1YNDg5A9MlZ/Wvk+LAIKYtH14ObEAkfbzxQQa/hLd1YdFTYOIpW isHdcr/KHdJ77z6s67jx5g1YS3RxYFbTz4cKwN3+hL3lcJc2zX/5dykIomtcH/bDzKZe OMF5g4S2Dmjmymypzcxe2g1EweLO7mSXrla/x7gRt5nKy/3kVOrrSAhNfUieUmAIOsD0 pVZQ== 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=MXoE/hde2h0XZDEOUAUYQLmbmdYTH6XOD5x3sd/Cc4U=; b=D6Is9h5G63HH62wC2f5UsyzeEg21d19RV/D3BfIVEHPBq5gLEFFISwUKWHqwEsZ7P3 SgN9dEriJGKeIcWI6KQu5nsER4Ye9QnMdBlRpEFV8GLCfr4QcveWV7Jx2Nr5X2tLSV5X mVl8XbnY9OXZbNeFuIpEDj45PzaIzLVUZT7NiVxo+ssAOw6O/4HMFRh+oEEU1GsUoYAx RDq3kJQuOK/Kj8Dt0TEmWpBznupZyb87xAzvNbD2+Rv5uu28ozXWB0tFLVwWAOGVDFPn PymeaeKuHi1ItRvXLVmyaBfmB72FF8t5XTBWd5g1XvXEf+rvaYQuyDdr8dHM2/g6C4eL zH1Q== 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 n7si187248pgd.755.2017.12.05.07.11.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 07:11:13 -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 BAB416E587; Tue, 5 Dec 2017 15:10:39 +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 EE94E6E09A for ; Tue, 5 Dec 2017 15:10:37 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id B7B502073A; Tue, 5 Dec 2017 16:10:36 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 86CEF203A2; Tue, 5 Dec 2017 16:10:36 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v3 01/15] dt-bindings: panel: lvds: Document power-supply property Date: Tue, 5 Dec 2017 16:10:13 +0100 Message-Id: <97ebf0615821d79e8d7718594fe3a542a743a05f.1512486553.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 , 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 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 Tue Dec 5 15:10:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120672 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5864131qgn; Tue, 5 Dec 2017 07:10:44 -0800 (PST) X-Google-Smtp-Source: AGs4zMYivATYStFg1UxguvTWp8sxumu1iCDcMhyJ0gT4QQf5gJtRoJkyOhhWCXUUD0ZClHMbFFdc X-Received: by 10.159.216.150 with SMTP id s22mr18526073plp.158.1512486644762; Tue, 05 Dec 2017 07:10:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512486644; cv=none; d=google.com; s=arc-20160816; b=iF9Rgk+kMtLs1j6V8hu9lOxjR3+56kE/0o1DL0FNoXXlMSsLcmmv81f+45h/738vs9 6ksFm6nMo7Z3x74COf99o/qR7BKYJllin+8fAUM35l7clul8USrtsy6WwHCo7UbUj54U lN3vK00BYxOPBLHUYFamBSuMT38g1/Irqgg+TzaTtZn8QQOKIPuGu1G/fz76+ig8/Uxs CzR8Z52KCLPP7YhYY2/FOMvltOZGx7Rj1neKh12m9W+6eKKlfoeRzuJJVKQZFK1Qi9+c o+33NjgZPpkkU6mdo6RH9IptvghNeOkizqy2d3RNvXEJwwRwKfJXk3gF0GbPfcKfqLWj MU6w== 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=CPli5CkQXct2RFqJF8Cq7KPjAGDHxdSSWRwRefxrQyzIpTs1G2qZPTbgsHOqi9cvFx MnM5Sl95x1prWDH3Nx+ORBgbDkNWUFXqPM8k7t+W0uAirYB5l+PmRUZ6uJ8yd8ALjMpU 8R+88oAJMdZXazfLv+qldb83FAfLtBkGJV73QBIbhlscI1YnJNz/c9QxU8zlvvRSbNfK hErShB8v6UVsPtJQukSmM5H//nOjPAuk/X3HgqRwSU0MBXhQD7BwHfPSr19XD/xtgtT9 AyFhWl7KX9vmdfO/UL2SmxZSc6/S3Jcf37Aj9YAA90zsm5+YGCV20/JQs3wvVznxBxrW uLSQ== 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 z14si204362pgz.208.2017.12.05.07.10.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 07:10:44 -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 622CF6E0FF; Tue, 5 Dec 2017 15:10:40 +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 85DD06E0FF for ; Tue, 5 Dec 2017 15:10:38 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 5473B20741; Tue, 5 Dec 2017 16:10:37 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 22341203A2; Tue, 5 Dec 2017 16:10:37 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v3 02/15] drm/panel: lvds: Add support for the power-supply property Date: Tue, 5 Dec 2017 16:10:14 +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 , 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 Tue Dec 5 15:10:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120682 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5865439qgn; Tue, 5 Dec 2017 07:11:41 -0800 (PST) X-Google-Smtp-Source: AGs4zMZTxjIUpUoxo1ZqBqU1nZREIdyeb8Pp8lsGRp+3+u5mgLyYnNG+D+d2OqL0TPzxRrA5KHZG X-Received: by 10.84.129.132 with SMTP id b4mr6580896plb.326.1512486701059; Tue, 05 Dec 2017 07:11:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512486701; cv=none; d=google.com; s=arc-20160816; b=R8qxskjXs7Em3w4zBxUibTgCDO12WyM5k/xZkgnVMaAk6bNeUJJm3y5vM17fZsfcF0 Sb51f7Q+p9ceFqYwEKJo56Sm71J7cfyoOJm43IzeKPFJZpRZSapusVxnBCZ40c5iw8dL SNDh5zNRtkwFiwzmKTvWgd9nywp+ejWMHv4nRjvQSvPR3NegpeG1a5jtxe8Tjq5MxCKQ M/jLZwlQxVt6ji8tll9R6gEdy+u253Q+bYW7IFK/tENF7db5eltSyN4tzaEtOSi1dTMi PZYR1k8OfuwjBxvVv+bEyxfJO074NIk/pu/qEHz50YJ+HDgCy8PKS9lHyH5Hlu/chykV i8Lw== 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=Y/kSmRJF6z4Q0mHR5uNLlqzN9eYGwIU7qqBfFRE4B+I=; b=OsuOhfS/nThXC/Dens0z7hOP5h4kBAw8sCbJs8YDtwrYhnA1Irt60TSC4F/KpXJzER bQlUa/LWh1Rw19PVTVuraYKV4eUOIu2OxbGThKF+TTcoDvOfRw9s9FJuPgb9ReqG+1ew 4hXXEHEn9ST9wvdYS11telEwpCWymBdP5NSDx2xL6ediavQLybf4JOQfD2jGlhnro3WN 888zM6YY5OY2GequoRcP6qQqsnJr8xPZcPBooNvKO441kaGXJMZssGn/iXXaiO0cQ3iH wKcysfXdXy9npplotwMktNusA+W6J/YkPGHk1wwkTzSaI2AUb+ThVeGN7tqmYBY2x2QA dk+Q== 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 i65si188119pgd.828.2017.12.05.07.11.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 07:11:41 -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 1C2756E594; Tue, 5 Dec 2017 15:10:45 +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 73B606E0FF for ; Tue, 5 Dec 2017 15:10:39 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 8B31B20750; Tue, 5 Dec 2017 16:10:38 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 4DEA9203A2; Tue, 5 Dec 2017 16:10:38 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v3 04/15] dt-bindings: display: sun4i-drm: Add A83T pipeline Date: Tue, 5 Dec 2017 16:10:16 +0100 Message-Id: <3762a8428aaf207e80ae86d4db2e50473576bb6d.1512486553.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 , 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. 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 d4259a4f5171..338cb6bbf25c 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 @@ -224,6 +225,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 @@ -253,6 +255,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 Tue Dec 5 15:10:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120678 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5865092qgn; Tue, 5 Dec 2017 07:11:26 -0800 (PST) X-Google-Smtp-Source: AGs4zMZUUVpLU803zLN1X1cVS4XXrqMqM7AVWQKpYCYrMvEhiKiEQ605MAfJC0QMFPII+QHrUer4 X-Received: by 10.159.194.203 with SMTP id u11mr8626319plz.271.1512486686528; Tue, 05 Dec 2017 07:11:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512486686; cv=none; d=google.com; s=arc-20160816; b=Rz/VpH5D9euu3nQwdpzWCnoY+QqjMhVR2r1VSN+aOmEH5lnKt0//jW5vz1oDOQzTa+ IBE/lq7e1cEkQuLD5uthrsjiiIPJkcC4b1pnQQhdpVMRCoQDiJvrLdbpREC5y7QAqgxh WRjF6i4GPu2ZBucbDYC7rmpy/2yQrBbdpLohYKMx/hvZaEiTscx9Se3oY1qx1xgX/pkr X/y2ilZ0TXEVFPAw2IqnqwlMz0Pn3dhUnSJi2QFsXkgv7LrE190PHcg6z3jdX8sNZ69s BtNRX9D14WStcs0zNqA/Z+wKSu3wJmdMeA3FUPToXEP3bDByXPpVF0jR0VeCEeMlgLWq JJYQ== 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=VhPCQEequ3gdrnon38U1McQsMPjxhgBrfnJK00tOV3c=; b=03K4Fx2FN6eNIeAzMU7sMPleb90rMmMERUkudwCefFkUT7h6YMNjQiSJZlPExDsexr hTbm4LelapySsiFEwYLyWymSGc3CBi2fTsjleg5rbYejPDoc/6oETJ2U93hH6AI7aQo8 COEcSSLM3DAZ9Rn/fw9FVdZnJrpFqG9bWta2K08xrsSCzVuhSjOXdw12ehdTZUbXkRcg hxqr4HMGDhq96qwG/gMChg/wuShr+weKM2pcdnggt+BlBW1RenBg3Cy66giZ5p+hMWme /xg4by3XV2KFJyQlGvt3TUlYKBQIlfyJBEY07DNIyrkgDCzeEJAMbqWYPrWaeecLXuza WCog== 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 q29si186949pgc.795.2017.12.05.07.11.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 07:11:26 -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 8B69A6E591; Tue, 5 Dec 2017 15:10:44 +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 14E776E0FF for ; Tue, 5 Dec 2017 15:10:40 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 2C04420758; Tue, 5 Dec 2017 16:10:39 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id F13C8203A2; Tue, 5 Dec 2017 16:10:38 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v3 05/15] drm/sun4i: Fix error path handling Date: Tue, 5 Dec 2017 16:10:17 +0100 Message-Id: <1f2443c41082fc6e086570da38d20744c52fe636.1512486553.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 , 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") Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai --- 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 Tue Dec 5 15:10:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120683 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5865482qgn; Tue, 5 Dec 2017 07:11:43 -0800 (PST) X-Google-Smtp-Source: AGs4zMYhqktDFqiCuNRoYN9vpi4BkdCxTKlzABO/0xq6Tv70t6WQRSkLkFnVbUTB6NOXQQ3jctQT X-Received: by 10.84.210.137 with SMTP id a9mr18822581pli.17.1512486703479; Tue, 05 Dec 2017 07:11:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512486703; cv=none; d=google.com; s=arc-20160816; b=HRHMcLVo1BUGrak4YGnGD2SK8hU0WfzVDIEEBkgAuikxo4boGU+tuMPPzncAXWkjyE 4VfLQxMFmCuDkNZAuQ0UmqTuk7R71+N/3h6pGvdFwpD1cBAomyfqV2jqGPMDfxlkFJcN vuUn6LdshbshZX4obgB/vnAYI7mcb5hrigclooZnjflMYP6h3kRIGDdGoi86sNmTKK48 VIwrMzKHywS+rt52PnVSNBVwsgvPuj2R+wrrNBzrC7Glw66+RVJzakyl9q1yMgy7Hae3 NS8/lvt9yF+AU37BZdaoyPoeooavri/PYsuRPCXtjYQzv06FsBr2adSbXn9/rMMhkLw/ MsDA== 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=txuQ0QRqhQopVlaKhHOP/5Rg+JlM6U2rZDdpnQOglJnublCwGMZqytZsPEDZ2eY8W9 4/GEHKPD9uZt+5YrprPjcxF/VDYKsISY4lAq0Sx7mWCF6Dc/z9LjGQpmemiLASJwJsZC CFlakmga6iyp9gFrTMMj1VaOzHsXPNtiflrdwe1GeD2XY3ggaB2CTHwXR5Bp665jrZmf Ubv3fhze8pTMn9L8fWT0gkcqe5u2FPay/9ScMyxMo9cK0b+zShTERvJQLn7PlZUbBYpy 5P9FJSAIRYhmHS9Gw4fziGcRQVis/9AxbH1rYYv6eYjaU5fwX9fbxB72foERz4AUsi0C hx1g== 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 bf3si209199plb.105.2017.12.05.07.11.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 07:11:43 -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 9FCDC6E596; Tue, 5 Dec 2017 15:10:45 +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 EA4536E58C for ; Tue, 5 Dec 2017 15:10:40 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id B4B1820976; Tue, 5 Dec 2017 16:10:39 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 865B5206F1; Tue, 5 Dec 2017 16:10:39 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v3 06/15] drm/sun4i: Force the mixer rate at 150MHz Date: Tue, 5 Dec 2017 16:10:18 +0100 Message-Id: <12a1d9cbd06783e06a29dade490edd299c6aed78.1512486553.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 , 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 Tue Dec 5 15:10:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120676 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5864994qgn; Tue, 5 Dec 2017 07:11:21 -0800 (PST) X-Google-Smtp-Source: AGs4zMZevn6o3TTOenj2FVP9qpj4qP+m4aB2SiV7LA7s0N/TVshv5xEVOrpVS6bjC8TJNS+6o5MK X-Received: by 10.159.207.138 with SMTP id z10mr18791404plo.259.1512486681498; Tue, 05 Dec 2017 07:11:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512486681; cv=none; d=google.com; s=arc-20160816; b=epgtLHx2jJP1m2ceLCSF1HSD638wA9oExjC1tRQytrAeNkqyjT8rPQ9RFcABYWHn3l I738Pr7nHhaaLAUN6liUa6C3umfxTfXakfe/9AiGVJC5p5tRRWPGQ8Jf7a1VGXmjZ+kC 3lHEQK5lMFNQiWyf0wn7SrbcgWQDCXs6vtqzjND089JgKG7SWkC5g/VfEqjs10rD25rt oC2ckpdti3U4Wr9zr2wfq8Z/R3uhjfJIllijI4POa+RCufNNA7dlckKfFR4FTuQ6XuXz glArIg3hmkmMdFVj9MmztbC1Ex8WdrpJi6aYC2C3nUUGCapD1oVh0uYLjeGfmb9gJ6N3 tU9w== 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=tkc3V9uuZFSHeVgYict9H2TCIk0JXykAG8dZMJYeZi8=; b=gubjdq9eOIItfdwE265+1YXYJcPgqTlrQigk1QdUAPDHTV/or3XisfXLYeNp7mM28M 8E3DMZ9leyw4mq7YzfUZBQYdciUkp4R/GPuC8HVwss9qrD0jHZVjFquQTzTUylfPySK7 mTi5gzrFHFMmndluxyS3DEaLF2gbcVoFCHvogGoU5h+M6S69GWXUBd8bZ0JAHvOLvsv0 sPG4aUDrGIQSaSm6irEQpNxGXyHlMclevVAD8C5tBgNoRjTX+Vhlb9vYYsEICDdoysnw MleaqEmEeQQBkTxhMRhIOWRDHQFxghJazc+t3x//JhovbojLLPwP0cTKfE63tguj2+xt jjFA== 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 y14si225663pfi.164.2017.12.05.07.11.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 07:11:21 -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 F01AF6E58A; Tue, 5 Dec 2017 15:10:42 +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 74D276E58C for ; Tue, 5 Dec 2017 15:10:41 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 40B8F2097F; Tue, 5 Dec 2017 16:10:40 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 0F2E1206F1; Tue, 5 Dec 2017 16:10:40 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v3 07/15] drm/sun4i: Create minimal multipliers and dividers Date: Tue, 5 Dec 2017 16:10:19 +0100 Message-Id: <42424895bd242dceeeeacf3f83e1c24aa03fb60f.1512486553.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 , 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 various outputs the TCON can provide have different constraints on the dotclock divider. Let's make them configurable by the various mode_set functions. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_dotclock.c | 10 +++++++--- drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 ++ drivers/gpu/drm/sun4i/sun4i_tcon.h | 2 ++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_dotclock.c b/drivers/gpu/drm/sun4i/sun4i_dotclock.c index d401156490f3..023f39bda633 100644 --- a/drivers/gpu/drm/sun4i/sun4i_dotclock.c +++ b/drivers/gpu/drm/sun4i/sun4i_dotclock.c @@ -17,8 +17,9 @@ #include "sun4i_dotclock.h" struct sun4i_dclk { - struct clk_hw hw; - struct regmap *regmap; + struct clk_hw hw; + struct regmap *regmap; + struct sun4i_tcon *tcon; }; static inline struct sun4i_dclk *hw_to_dclk(struct clk_hw *hw) @@ -73,11 +74,13 @@ static unsigned long sun4i_dclk_recalc_rate(struct clk_hw *hw, static long sun4i_dclk_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate) { + struct sun4i_dclk *dclk = hw_to_dclk(hw); + struct sun4i_tcon *tcon = dclk->tcon; unsigned long best_parent = 0; u8 best_div = 1; int i; - for (i = 6; i <= 127; i++) { + for (i = tcon->dclk_min_div; i <= tcon->dclk_max_div; i++) { unsigned long ideal = rate * i; unsigned long rounded; @@ -167,6 +170,7 @@ int sun4i_dclk_create(struct device *dev, struct sun4i_tcon *tcon) dclk = devm_kzalloc(dev, sizeof(*dclk), GFP_KERNEL); if (!dclk) return -ENOMEM; + dclk->tcon = tcon; init.name = clk_name; init.ops = &sun4i_dclk_ops; diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index ea056a3d2131..46e28ca1f676 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -177,6 +177,8 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, u8 clk_delay; u32 val = 0; + tcon->dclk_min_div = 6; + tcon->dclk_max_div = 127; sun4i_tcon0_mode_set_common(tcon, mode); /* Adjust clock delay */ diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.h b/drivers/gpu/drm/sun4i/sun4i_tcon.h index 839266a38505..bd3ad7684870 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.h +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h @@ -169,6 +169,8 @@ struct sun4i_tcon { /* Pixel clock */ struct clk *dclk; + u8 dclk_max_div; + u8 dclk_min_div; /* Reset control */ struct reset_control *lcd_rst; From patchwork Tue Dec 5 15:10:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120684 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5865631qgn; Tue, 5 Dec 2017 07:11:50 -0800 (PST) X-Google-Smtp-Source: AGs4zMZETE7FBC1Tl6Cxez1tNhA3kk0Jydu4BebmoOiJ89b11DzNagPnPwyk4T4qayZN+OfuQA/4 X-Received: by 10.84.169.67 with SMTP id g61mr18513086plb.152.1512486710654; Tue, 05 Dec 2017 07:11:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512486710; cv=none; d=google.com; s=arc-20160816; b=o772gk4tN8LzeC1cKNw6b9QdnN5dv9wEutU5uWsFjbooKoSk210l3YEwXl6Zv0iRaX BGUrEJHQ5hjsf3+Hqi0Ywlmp8IOTerM10eDNvsU9jlYiriF9EphlddNsB9YB1mTxPj6Z fPaUP8bVI8r9jg9r0cWk3ZOiAxA/pCK2N7uhPFw4JWRpVoTu+j/RGYUMpaDPbs0uPlzv MHOJfWAmqr65WjE4lNS6Mj3hlu9PHnIW+1jrnc6x2SOGYrRWHhOfaYS8SZrkdOZKU22z TfQuMH0aPxMCZizqwjcCkc7DnwhUQFZq2Yh776DnzPHG/D/YFPMEIFue7xVzT/Ng1JJ/ 9juw== 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=9Vbom2SGSsvlW8e/mArq0wjZhD28Grs0tj/E+AcUfDg=; b=oj8Im6Rti4tMuSffQLMbgcd/L/7iPYR0BhXVJ9KtesyD9U1Nknfs1y5hACB1hbiCiz 0ZSfT/FKNGo7RubqNlHvgPIFb58l/LNQmmqklPkclBYXCHtJwphNdjPFYC8Vuxj5tZa8 T18HfRsv9kvovnzxNcitXibhRVIuVsChpPfpf17qzk1VHdu5+eU4Wgfmlzjyl1m+gte+ jxhk0QcyeCEPgFqemAS51wZWKa2XdlMEjFmAEPacC4qBAptukSEc5EZkP/+XWT5u2FaB Kj7Nfn2FW7ywzyai7DKXdcliyUmBBUFOkX97A/ISYRiC9GNti9eLHT+vq7oR5a9zOl9F f20Q== 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 1si207967plz.262.2017.12.05.07.11.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 07:11: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 61DBA6E59B; Tue, 5 Dec 2017 15:10:47 +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 BA2156E591 for ; Tue, 5 Dec 2017 15:10:43 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 87300209BB; Tue, 5 Dec 2017 16:10:42 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 3A593207B1; Tue, 5 Dec 2017 16:10:42 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v3 09/15] drm/sun4i: Add A83T support Date: Tue, 5 Dec 2017 16:10:21 +0100 Message-Id: <0f8137abb37de936db82c1251556ee84fb23c7fe.1512486553.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 , 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" Add support for the A83T display pipeline. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + drivers/gpu/drm/sun4i/sun4i_tcon.c | 5 +++++ drivers/gpu/drm/sun4i/sun8i_mixer.c | 9 +++++++++ 3 files changed, 15 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index 49215d91c853..6f5e721b545e 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -347,6 +347,7 @@ static const struct of_device_id sun4i_drv_of_table[] = { { .compatible = "allwinner,sun6i-a31s-display-engine" }, { .compatible = "allwinner,sun7i-a20-display-engine" }, { .compatible = "allwinner,sun8i-a33-display-engine" }, + { .compatible = "allwinner,sun8i-a83t-display-engine" }, { .compatible = "allwinner,sun8i-v3s-display-engine" }, { } }; diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 92f4738101e6..9b757450555f 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -1132,6 +1132,10 @@ static const struct sun4i_tcon_quirks sun8i_a33_quirks = { .has_lvds_pll = true, }; +static const struct sun4i_tcon_quirks sun8i_a83t_lcd_quirks = { + /* nothing is supported */ +}; + static const struct sun4i_tcon_quirks sun8i_v3s_quirks = { /* nothing is supported */ }; @@ -1144,6 +1148,7 @@ const struct of_device_id sun4i_tcon_of_table[] = { { .compatible = "allwinner,sun6i-a31s-tcon", .data = &sun6i_a31s_quirks }, { .compatible = "allwinner,sun7i-a20-tcon", .data = &sun7i_a20_quirks }, { .compatible = "allwinner,sun8i-a33-tcon", .data = &sun8i_a33_quirks }, + { .compatible = "allwinner,sun8i-a83t-tcon-lcd", .data = &sun8i_a83t_lcd_quirks }, { .compatible = "allwinner,sun8i-v3s-tcon", .data = &sun8i_v3s_quirks }, { } }; diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c index ff235e3228ce..6829bec4ba68 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c @@ -477,6 +477,11 @@ static int sun8i_mixer_remove(struct platform_device *pdev) return 0; } +static const struct sun8i_mixer_cfg sun8i_a83t_mixer_cfg = { + .vi_num = 1, + .ui_num = 3, +}; + static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = { .vi_num = 2, .ui_num = 1, @@ -487,6 +492,10 @@ static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = { static const struct of_device_id sun8i_mixer_of_table[] = { { + .compatible = "allwinner,sun8i-a83t-de2-mixer-0", + .data = &sun8i_a83t_mixer_cfg, + }, + { .compatible = "allwinner,sun8i-v3s-de2-mixer", .data = &sun8i_v3s_mixer_cfg, }, From patchwork Tue Dec 5 15:10:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120679 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5865143qgn; Tue, 5 Dec 2017 07:11:29 -0800 (PST) X-Google-Smtp-Source: AGs4zMZzCGleMaz71iQ3EKaodSdUqYK4Z7vED22dAC9dsHfOoAuwRcmKatuHes4EQBxDuLkRIwNi X-Received: by 10.99.94.71 with SMTP id s68mr17957431pgb.242.1512486689469; Tue, 05 Dec 2017 07:11:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512486689; cv=none; d=google.com; s=arc-20160816; b=Sn99FCZRqEpyxYcsRa4FLEPNFjKuNQmM7JVFC3jsMmwLVKA2x9D4CLkRS+mrG5iRs/ DL53KwLYMGqVYCITHjUYwOGiCfi8YS8wQLxf/vWaaEkZ8hQIa0Fec+bvi2trDydrAmAv Jvv98Z+bbmWWZuanLdtVWa7tNDoMyu/2r7Q7ypoKqi2j/WXSMEDvm27/TnvBEHc6YQNL JkhibMNPtQvvlMqTsIeKORirVsDNBIG2GbZ4mFAyMZ3bCVxETH3unmsMM+uc1THkAuYm aw8+M/fqQ0tDJbcz1mfEL33rK8nIbEIBrNNOzbWcIGDhwbiZ2CkA9u+FQBN3w/cBO/po lZSw== 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=HR9asRn/bsvOwEZAvXp9skoE/gjhPvUhmnQRaJLhJVtdZd/66UU7MuGOKKwwD9tGDy qoIfk/7CRoPeTPPuYGnmoDPNuBGRpOIFFHioik22E3LcZSrSthcBPJJrR85DpXGnFFOZ I0YeUqd2enDa/wm9YxnaW+JVUQwJY9yorto9N9XIEQr8NxByGtx3aHVQlsZrsGNTYuFq lulVv+RQOIn+ePmJ0gqoSyd8XDKLCSgd0o1ujZCqS/uxPUbnsgttvQsikLd8HboHESXj jPWdYuej6nO/z9lP85afOYNepzOQUojeAmnzzQfjJjRenQnUmFnpJwVJhQP2ECqlEHmU gB2g== 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 a3si205748pgw.130.2017.12.05.07.11.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 07:11:29 -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 E6B1F6E5A4; Tue, 5 Dec 2017 15:10:49 +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 EE75F6E59B for ; Tue, 5 Dec 2017 15:10:46 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id BE620209E1; Tue, 5 Dec 2017 16:10:45 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 90519203A2; Tue, 5 Dec 2017 16:10:45 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v3 11/15] ARM: dts: sun8i: a83t: Enable the PWM Date: Tue, 5 Dec 2017 16:10:23 +0100 Message-Id: <016ca4fc16ab5c7c03cc79aaccae946b14b02194.1512486553.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 , 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 Tue Dec 5 15:10:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120685 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5865972qgn; Tue, 5 Dec 2017 07:12:06 -0800 (PST) X-Google-Smtp-Source: AGs4zMa+rYsibFBifSlv0XRgE1XBT86ElY99bbQ9E5f+JIy+DRpqRcxyiD48zrti3kDk/en7Yhkn X-Received: by 10.99.3.195 with SMTP id 186mr18258545pgd.103.1512486726261; Tue, 05 Dec 2017 07:12:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512486726; cv=none; d=google.com; s=arc-20160816; b=p2r3VgVLJwmh0BXDFQaWD2ISjxMpik/xLpWxyIn/UB1rxkS6/U6Uv0jLA1MmAGx8SG EbvcjBFddWbWubzRXOhqgkbiw+VwRtZF0Gab9mlMHFzV1I1ThAr2rW2p+7OP/vQtPaug 3cM5HClnaPSb7WeGZ0hod15qiEHxhEXgKyz9fS4jYXPHmMb5Fep7p4vW2xjz0ZHqFfyf Pm7OrEmNDCCpNP9al6coBvm0VMo2PJ0waJ8kXhZxKQFHbXhF0h33RxJKYpsV7flEvvb0 kibC/HNItzIUohuK7Gy2o2ENuarduiVr7ht3wtICHJC1XcxkKcFghzrbwkIsPiTdRMp2 4/Vg== 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=I/3S0V0fP3IRCXFUTNhtz3ZhLX6P+MgZ7lDdbNTduyIdYBFxPh6l32jIUJZuADMLip UyCUzY/dXiZqjkP39k0vLM0f+j4fTQH/1GlIircCP8xjNcEp/KjdWn87rIIG2VaE+65e 78Lfw19V88HvA1mawiTbrefp0Q1Np3qN//rmLj67F0NoWCTFnYR6/Jd+qyJgNzyFAIFQ CXMhrvNwt/VH9vW/MjygH7dX4aGnoS2AcQPHNDE/UwZR9Kis85CruYH/eMAfT0nk/y+1 DFH/FbOigirS24dPMa7D8giEOU0CNd81X+PP3E/m073XuHa2dpc2hI9T16DmZ4KwWDQX MkWw== 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 v4si193209plb.791.2017.12.05.07.12.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 07:12:06 -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 5A12A6E5A7; Tue, 5 Dec 2017 15:10:50 +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 5944F6E595 for ; Tue, 5 Dec 2017 15:10:45 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 266FE209DC; Tue, 5 Dec 2017 16:10:44 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id E40F7206F1; Tue, 5 Dec 2017 16:10:43 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v3 12/15] ARM: dts: sun8i: a83t: Add LVDS pins group Date: Tue, 5 Dec 2017 16:10:24 +0100 Message-Id: <2fc5348028da2eeb0d878796593f39265569e929.1512486553.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 , 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 Tue Dec 5 15:10:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120677 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5865066qgn; Tue, 5 Dec 2017 07:11:24 -0800 (PST) X-Google-Smtp-Source: AGs4zMajGdX8TnqIAB7SX2Tyi3dep7MngbGZLM4v6kEB8Yt4tfSKJCu4T+2vuKAdFc5qEUDAojLj X-Received: by 10.98.153.221 with SMTP id t90mr23466601pfk.210.1512486684693; Tue, 05 Dec 2017 07:11:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512486684; cv=none; d=google.com; s=arc-20160816; b=XyhV/uy0qJWIA+RIzNCNl+25hxsZuiYoyEcy5/RQr6ONAdVoIKnFuy6usHeuESIuLk KmHq//ACMkxPYRxkPWNzorFKnFkDhyn6lbXXr0qLLYaKIN4tpft6Fh2NDB3YyblK20sS +yPO7mP4uoqu7PLCoD5QQ2+owHu0dw1u80SKR2C2Usdq9iPeR0reF9tq5Kw4HpHmikqn iyPoE/bj1pucUY8L5YZWaGFXy5Oh0PJ/wdI3dcDO6pKCe6954PEj6/TRXmzNY2VPi9f1 QPryaupgy/FjfA7iWIsUh7O9IEKaNnpkFFlLVBQnVYfZa/vzWhjtvRzrlq7G4BSJAmwi e1YQ== 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=aMPEAmRO4OHAnHay+alKcrPK2fqCapOGStc0JbFB2Wg=; b=FCdQb9p1y5xRmC1oBhjEG2UCsnY9uHFCnZA9SgViRiO37IN3LrxrZEkLQLMwzYYeyc yt+JsMmNqfX8wpL81WcBxcHOlQujuR2x6v1wT0NTDe8q4CJfSkWmZaccY5QrQ9oQSJkZ fNaCl73Us3K7jfXwbUSPDnSXWPVeH3ld42ZO39nQH3gLtwwswGf/ewRtBAFZpSvSSq5m Zk0ixnXKVi+vaqm82/5xu5ET6mw4+lLaayJ76bi7JnsC73NM8o0vkvbA0im5C5uRj07w hjZZeln3oUgMT2MrQXm4NnnHgFTyS5ZpwgORb0PA/D+6BCenh8lE0X1hqOtwzlzRJbOD TS8A== 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 v3si208107plk.128.2017.12.05.07.11.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 07:11: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 E7CB46E5A2; Tue, 5 Dec 2017 15:10:47 +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 E18E36E598 for ; Tue, 5 Dec 2017 15:10:45 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id B0786209E5; Tue, 5 Dec 2017 16:10:44 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 7D497209B2; Tue, 5 Dec 2017 16:10:44 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v3 13/15] ARM: dts: sun8i: a83t: Add the PWM pin group Date: Tue, 5 Dec 2017 16:10:25 +0100 Message-Id: <9d640f746ff4dbc968cdd46438874685f58dc2ba.1512486553.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 , 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 a PWM that can be output from the SoC. Let's add a pinctrl group for it. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a83t.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi index e200df5a9058..a37517d4472a 100644 --- a/arch/arm/boot/dts/sun8i-a83t.dtsi +++ b/arch/arm/boot/dts/sun8i-a83t.dtsi @@ -446,6 +446,11 @@ bias-pull-up; }; + pwm_pin: pwm-pin { + pins = "PD28"; + function = "pwm"; + }; + spdif_tx_pin: spdif-tx-pin { pins = "PE18"; function = "spdif";