From patchwork Thu Sep 27 11:48:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10617897 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 900F014BD for ; Thu, 27 Sep 2018 11:55:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E37C2793A for ; Thu, 27 Sep 2018 11:55:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 718272785D; Thu, 27 Sep 2018 11:55:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 964A52785D for ; Thu, 27 Sep 2018 11:55:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=o65MgPFZVFE7ub7wEGq8xjNVUyOKDamb9tqNdyMjw8k=; b=P5hzhyu+Bzwh78 /ELtfNQHW/fgtSMB6oZg88lOgRPifpis4o5KgV+nMAlmk/imJU+JQ42snpZWXKEuhCiN3Ut7/HBas 9L+upJiGoSHmp/1Cb+xxGoPmhRO5jIBN23LHCjZTdmVUnmylTHBLLOLjE4SyOOfNVsW+Q7XcGW3xi I7dzpfdKVAcdjCHxHRQh8MFbopXK9rp7HuKI7ihIN/tGbkpF24JUAeEyV2Ayc4Z3s1TW9xVKS5AHf oU5Abv9epKtMUizTAgG7f5e7xMwOm6bKsf+VoZrNkYvgenw7AHF5MNYaBXRiYWHvXBU1PmpIjJcyU vvm2K9L3KjbzFy4FnT/g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5UtU-0007Yo-3J; Thu, 27 Sep 2018 11:55:44 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5Unh-0002ii-Jb for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2018 11:50:20 +0000 Received: by mail-pf1-x443.google.com with SMTP id d8-v6so1716177pfo.13 for ; Thu, 27 Sep 2018 04:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rLT1GifvrqLqDc26F7zMlTRS3INNzOgCgNw2mNmNj04=; b=TdBx1pDQyyeHVrK31tunjMcjPQT/5inOT28qYX7tBrDNOvhX73XmqM+1hI3WBRWReo vjBu+YlQ744mFL7gQa6Ls1FFsC8qhjyXIqdUizMoJJEgQN2Q+sSFtiJQsCpQPPRLywpg 2usYZzKtxRZrTtjbtklXjZbZ4yco2kfDFg7Ic= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rLT1GifvrqLqDc26F7zMlTRS3INNzOgCgNw2mNmNj04=; b=aCwYhDNuwLA5beY0CYsrywraWABjMdp4JbgLn79zJUP3MJ+GXMZVkOGZ+xGMBKxufg d70Vhcgg08PRvCbrJcl1gC+IoDIGNurc6R1KpNtEXv+o7DAlFfKjYJ/I1X2laMiQEY3l Rn9hlhV6UbKQG5GX88sk1fRm/hw+Fni9tgWtqldC994SpTjQLJplioH/ah5dAD2bp3mf DLcnIswbm/V5imWSuG8HdvXHdPMqIiWGSUUXq/YouqOE8V34k1LUTKMtKGWm58vB5Imb Ni086kvcEjOU7xIU6Uohm+/gjz0a1DgzokWAy4fpvQKwd/mUYubsoBJvJ7vcIcCReQ67 O2gg== X-Gm-Message-State: ABuFfojVwUwRcspmxD3Qw5EHhKDrWRpRKiStDct7S3VNMJqyrsHTApMm YBDpDY+xwC5wHQCQ1V5lk1XiFg== X-Google-Smtp-Source: ACcGV615Klfjg0ZeS+7PTDM26zxgDigtBYfLaaLQeqlGQzeGVRDg30jhXyUaG3IBTXXDx1dHAdKpVQ== X-Received: by 2002:a17:902:6848:: with SMTP id f8-v6mr574090pln.27.1538048961935; Thu, 27 Sep 2018 04:49:21 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.49.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:49:21 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 01/12] clk: sunxi-ng: a64: Fix gate bit of DSI DPHY Date: Thu, 27 Sep 2018 17:18:39 +0530 Message-Id: <20180927114850.24565-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_044946_143865_068F2650 X-CRM114-Status: GOOD ( 14.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP DSI DPHY gate bit on MIPI DSI clock register is bit 15 not bit 30. Signed-off-by: Jagan Teki --- drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c index 5f80eb018014..b639e79641df 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c @@ -581,7 +581,7 @@ static const char * const dsi_dphy_parents[] = { "pll-video0", "pll-periph0" }; static const u8 dsi_dphy_table[] = { 0, 2, }; static SUNXI_CCU_M_WITH_MUX_TABLE_GATE(dsi_dphy_clk, "dsi-dphy", dsi_dphy_parents, dsi_dphy_table, - 0x168, 0, 4, 8, 2, BIT(31), CLK_SET_RATE_PARENT); + 0x168, 0, 4, 8, 2, BIT(15), CLK_SET_RATE_PARENT); static SUNXI_CCU_M_WITH_GATE(gpu_clk, "gpu", "pll-gpu", 0x1a0, 0, 3, BIT(31), CLK_SET_RATE_PARENT); From patchwork Thu Sep 27 11:48:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10617907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D6AE14BD for ; Thu, 27 Sep 2018 11:57:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77E092B1F3 for ; Thu, 27 Sep 2018 11:57:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B4B72B212; Thu, 27 Sep 2018 11:57:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A94012B1F3 for ; Thu, 27 Sep 2018 11:57:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hE7MJ9XMEcLSlbZLAd/lD8nZOX1hnJo3jMIQ3lPerw8=; b=LJ90q25R74Kgqd bKiIhp2AnsYQeBeyPP34u4iBERxbOLS3qhS21uEl5iwmukkwYitrwwHERF4PEDkme820TzjmOZz4c DgXr+IMlI7fko6j/F2V66dp2CU9RUP1FPydaolINWGhjnfBqss2ndNiw+ZTYBbmNu7Mena2ZMiXwZ Su09/pxH3Qb35FBqZjqn/ajnXegci+q1yQrJhzylWir4Tp4+oe42lRFZ2ZO1CtyqgaIEJ5mtOvE2E QT/bQT8+/8y59A+XWWHAawRq8/JQCHAEbuy7PD+st3p/PlY7x3Vwbb6taGE7gS1Tdqqtqi88mFkgs GhGJpFXh4j4NiSpQWuPw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5UvC-0000Tk-GL; Thu, 27 Sep 2018 11:57:30 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5Unv-0002oN-5f for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2018 11:50:32 +0000 Received: by mail-pg1-x542.google.com with SMTP id r77-v6so1785670pgr.5 for ; Thu, 27 Sep 2018 04:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iYGRkzf4+6zOjspNDTNAh8YqUnkbAeXA9VKCNPaxO7I=; b=mFORqcIVKnosXrLVjutZvQd9SuSDg3nDO5pbcWJ5Ja6IvYXUz95VgvvEYHGyhs5zgF KBH2jz5vgX0IS9+AGSCEEIOFzOGMTSaoWUuWjRu5GLFz0CLTCdcm1VGfVbmdXEbLgioH Kqbn2f/kbxrCkOUfharCPhkVUmh34ZzOmbeDE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iYGRkzf4+6zOjspNDTNAh8YqUnkbAeXA9VKCNPaxO7I=; b=WoZkTveIUeDNvF8U1dKC+cjGt8gczmOgC8WlqPGh90LF781XcifYE89oSr+prcjje+ j0ejRA4eX5gfAQc14vKUBUm0MnubzgqqupgZykhzM7HlTlZxWigt9Y/zGJzvGLmHrjD3 bgXdAFsfP8edgLCdKq3QIXvv7paeZmj7R+Jebh50AKCiKeVrnh1w6f1FVMX+OhX61Zr1 YneLQj5G/2U1CbETe/i0Z4FgPNn2LlQ9i2zvZ29aY9usfEsaYOKcc/o12DiSe/caB6jx 6/jyguwBbWojIkC2bblphrnwfKYNvlqRIriwe693+wVQ8nTlR66xBqt9IzA4ZvUSES9u ORrQ== X-Gm-Message-State: ABuFfojwhyaEyZXr2QZTEo3WygnCNwGcbf/vXQ4RGvZSLEcJ674BSZf3 m7SsTkPbBDsIppdOzw2ByokAZg== X-Google-Smtp-Source: ACcGV63xUmKNMXP37KqQrxSgKic6kedqWZ5HvQC66CXRLDRGtr116JOH2HSb8Sn2Sjx6IOhIWjLLMA== X-Received: by 2002:a63:66c3:: with SMTP id a186-v6mr662234pgc.330.1538048969300; Thu, 27 Sep 2018 04:49:29 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.49.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:49:28 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 02/12] drm/sun4i: sun6i_mipi_dsi: Add Allwinner A64 MIPI DSI support Date: Thu, 27 Sep 2018 17:18:40 +0530 Message-Id: <20180927114850.24565-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_044959_250914_0D0B530A X-CRM114-Status: GOOD ( 19.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The MIPI DSI controller on Allwinner A64 is similar to Allwinner A31 without support of DSI mod clock(CLK_DSI_SCLK) So, alter has_mod_clk bool via driver data for respective SoC's compatible. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 47 ++++++++++++++++++++------ drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 5 +++ 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index e3b34a345546..8e9c76febca2 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -981,6 +982,8 @@ static int sun6i_dsi_probe(struct platform_device *pdev) dsi->host.ops = &sun6i_dsi_host_ops; dsi->host.dev = dev; + dsi->variant = of_device_get_match_data(dev); + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_ioremap_resource(dev, res); if (IS_ERR(base)) { @@ -1001,17 +1004,20 @@ static int sun6i_dsi_probe(struct platform_device *pdev) return PTR_ERR(dsi->reset); } - dsi->mod_clk = devm_clk_get(dev, "mod"); - if (IS_ERR(dsi->mod_clk)) { - dev_err(dev, "Couldn't get the DSI mod clock\n"); - return PTR_ERR(dsi->mod_clk); + if (dsi->variant->has_mod_clk) { + dsi->mod_clk = devm_clk_get(dev, "mod"); + if (IS_ERR(dsi->mod_clk)) { + dev_err(dev, "Couldn't get the DSI mod clock\n"); + return PTR_ERR(dsi->mod_clk); + } } /* * In order to operate properly, that clock seems to be always * set to 297MHz. */ - clk_set_rate_exclusive(dsi->mod_clk, 297000000); + if (dsi->variant->has_mod_clk) + clk_set_rate_exclusive(dsi->mod_clk, 297000000); dphy_node = of_parse_phandle(dev->of_node, "phys", 0); ret = sun6i_dphy_probe(dsi, dphy_node); @@ -1043,7 +1049,8 @@ static int sun6i_dsi_probe(struct platform_device *pdev) pm_runtime_disable(dev); sun6i_dphy_remove(dsi); err_unprotect_clk: - clk_rate_exclusive_put(dsi->mod_clk); + if (dsi->variant->has_mod_clk) + clk_rate_exclusive_put(dsi->mod_clk); return ret; } @@ -1056,7 +1063,8 @@ static int sun6i_dsi_remove(struct platform_device *pdev) mipi_dsi_host_unregister(&dsi->host); pm_runtime_disable(dev); sun6i_dphy_remove(dsi); - clk_rate_exclusive_put(dsi->mod_clk); + if (dsi->variant->has_mod_clk) + clk_rate_exclusive_put(dsi->mod_clk); return 0; } @@ -1066,7 +1074,8 @@ static int __maybe_unused sun6i_dsi_runtime_resume(struct device *dev) struct sun6i_dsi *dsi = dev_get_drvdata(dev); reset_control_deassert(dsi->reset); - clk_prepare_enable(dsi->mod_clk); + if (dsi->variant->has_mod_clk) + clk_prepare_enable(dsi->mod_clk); /* * Enable the DSI block. @@ -1094,7 +1103,8 @@ static int __maybe_unused sun6i_dsi_runtime_suspend(struct device *dev) { struct sun6i_dsi *dsi = dev_get_drvdata(dev); - clk_disable_unprepare(dsi->mod_clk); + if (dsi->variant->has_mod_clk) + clk_disable_unprepare(dsi->mod_clk); reset_control_assert(dsi->reset); return 0; @@ -1106,9 +1116,24 @@ static const struct dev_pm_ops sun6i_dsi_pm_ops = { NULL) }; +static const struct sun6i_dsi_variant sun6i_a31_dsi = { + .has_mod_clk = true, +}; + +static const struct sun6i_dsi_variant sun50i_a64_dsi = { + .has_mod_clk = false, +}; + static const struct of_device_id sun6i_dsi_of_table[] = { - { .compatible = "allwinner,sun6i-a31-mipi-dsi" }, - { } + { + .compatible = "allwinner,sun6i-a31-mipi-dsi", + .data = &sun6i_a31_dsi, + }, + { + .compatible = "allwinner,sun50i-a64-mipi-dsi", + .data = &sun50i_a64_dsi, + }, + { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, sun6i_dsi_of_table); diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h index dbbc5b3ecbda..597b62227019 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h @@ -20,6 +20,10 @@ struct sun6i_dphy { struct reset_control *reset; }; +struct sun6i_dsi_variant { + bool has_mod_clk; +}; + struct sun6i_dsi { struct drm_connector connector; struct drm_encoder encoder; @@ -35,6 +39,7 @@ struct sun6i_dsi { struct sun4i_drv *drv; struct mipi_dsi_device *device; struct drm_panel *panel; + const struct sun6i_dsi_variant *variant; }; static inline struct sun6i_dsi *host_to_sun6i_dsi(struct mipi_dsi_host *host) From patchwork Thu Sep 27 11:48:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10617945 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96A77913 for ; Thu, 27 Sep 2018 12:15:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84DA82B24A for ; Thu, 27 Sep 2018 12:15:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7803C2B25E; Thu, 27 Sep 2018 12:15:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AC3E92B24A for ; Thu, 27 Sep 2018 12:15:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Qb27AWuTdpCq45WuwdK0Lkikxw6XX6TpHV9Tk9iWmG0=; b=Uy/J96DMRfEfjC 6vU7ZIG1sBrO4tZmgIGbBE+sPGRaopkModOFUdhqOgGy+ypJy7f55xeQ8qJIR/NxblL2NsJ485uUP XpEvXlfXvfZxChwlarf8rB16LebondjND/p/vQnyZngekZc/S1B6yIBZEKyg587Z6+Eg8O8TSoR7f ZDQnGnrvoV+tYBmFIkVUwkZfft5b8GDlIFmJX2xrM4oyMzgqbYYwLnZnQSKMpyms+srTM/9AbPXvz cNylTYkI43iDrUjX1RNfSj7xvtGaXms28vLh+38k7h6LyEKqkRt3g6Aflf42Qo1EC/7IzICt62twT 0xrGAh4A9bErvxVzC7+g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5VCM-0008DP-Ch; Thu, 27 Sep 2018 12:15:14 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5VBz-00080i-11 for linux-arm-kernel@bombadil.infradead.org; Thu, 27 Sep 2018 12:14:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=micJN1AyYSAo0SUFv6AD/9lj2AyYhuAPTyWQrFvkpuw=; b=rVc6uas6UZJi7V9s5x2EJoIcR4 ik8G8/EWvFvn2Rlly1kwoxhbL4j79nOL/b6LI64RFqkilOD5omTvRRbwpaGccaJMnswYOGY2iIkjM 0GMyTKnCtG4Ts9LpB9zMY0c1a5ncp8GpkykdHwzTGoADpENKT96hzFVOgSLuvNfB3QRJUH/i2fHbA LzBazumW8xILhgrF+bm4lYUHGJkBxI5b1J9CFSMIM1vFG8nnPN6qAzvOgRrIUoYyk+OtU900xxVLg 7ZWpaCFbmBDf4mqcbigGoI2S4L30t+1Nk4MzA1k8qDdWab8cx3y0krxC5ohsBgvR59ST6e7NvZBgE fkQAraCA==; Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5Unv-0004HO-Jb for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2018 11:50:01 +0000 Received: by mail-pf1-x442.google.com with SMTP id l9-v6so1726477pff.9 for ; Thu, 27 Sep 2018 04:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=micJN1AyYSAo0SUFv6AD/9lj2AyYhuAPTyWQrFvkpuw=; b=Gu7vifzS0HvT6gK5gqIothHuVrNi3vKlOYNqFimdXQRQvK9V+V6hGsXqh5K0qxiRC9 nv/2ttPbBpWxh6NDSN1DHsDgfKa5qa2Ll8kQSne7Xu3hdiM06HTRRHxG5geHOIwwePlm s9eRIwQ4N62ODY3WBtWlzvI8LFneN2/RSRtH8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=micJN1AyYSAo0SUFv6AD/9lj2AyYhuAPTyWQrFvkpuw=; b=i6u6h9NurI5M8lkiu734pF/V0EqIKyNxIYno0ftQ4cjj7gs+vp/bfjljWwA8KqxDyk f59dkpP/5tXI+AlOxc1BqOfenjNTvDeyc1O5DhZeGhr1nEy6/sNgWWdkkJ7JG2dd8f9z WCbvBPT6Rof3aU0z35FCmYyrSJFl80sPCkSUqvRil84ml0fkqd7p2hH9uMudZLEDpUCE G15A6ieoa7iG+IvZ/YWtRo7LrT/jHVMa8/iG+COf7zVU3Q43au5YQc6hBx8emOoEN1ue xkeXvrmmzMc24iQuHhS42hBODaCGnooFTPVnaYq3wsa+l6AMduqRzutB8zX1WcXoV4iA y0Vw== X-Gm-Message-State: ABuFfoi4HVMq0QKk7QfEILEpYNRjlQI5kR4rbsRxUJ6/ZuJ7m9Xd8K28 dXZtgjD93GRWS+QF6jD5PgIZAA== X-Google-Smtp-Source: ACcGV60mG0x7EHQM7tmxVvAmr+qm7id0HJ/WqlRDvS0tFoSWnrULe/+M7XH/ouv6Desdq+cdWDR0lA== X-Received: by 2002:a62:b09:: with SMTP id t9-v6mr4861259pfi.36.1538048976869; Thu, 27 Sep 2018 04:49:36 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.49.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:49:36 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 03/12] dt-bindings: sun6i-dsi: Add compatible for A64 MIPI DSI Date: Thu, 27 Sep 2018 17:18:41 +0530 Message-Id: <20180927114850.24565-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_124959_633878_669EE33C X-CRM114-Status: GOOD ( 15.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The MIPI DSI controller on Allwinner A64 is similar to Allwinner A31 without support of DSI mod clock. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt b/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt index 6a6cf5de08b0..9fa6e7a758ad 100644 --- a/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt +++ b/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt @@ -12,6 +12,7 @@ The DSI Encoder generates the DSI signal from the TCON's. Required properties: - compatible: value must be one of: * allwinner,sun6i-a31-mipi-dsi + * allwinner,sun50i-a64-mipi-dsi - reg: base address and size of memory-mapped region - interrupts: interrupt associated to this IP - clocks: phandles to the clocks feeding the DSI encoder From patchwork Thu Sep 27 11:48:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10617905 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 362AE14BD for ; Thu, 27 Sep 2018 11:56:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23A472785D for ; Thu, 27 Sep 2018 11:56:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15B812B205; Thu, 27 Sep 2018 11:56:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3FEB22B1F3 for ; Thu, 27 Sep 2018 11:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZorwgDtIlkPhIjySNvFp8vdt+deRf6T2mfjbBtR7Amc=; b=saJHg9vizA7Ifk ipqp+A0ypsR/jcZdKOQ0Y2H7q7MtzD77Ze2nyc+WUDowrINR3ROT4nAQDyH/ZS0ALcsGi1B/02Br7 nK5mwId1G6NcSSYXlSai0xpqSH7YT0x2NvHAn3Ir+VR4tFyUnOIYfgbb7+ML/6OEKZtArnG2o3u9U iNPEb9Ob9lLOGNEb5sKh6sbfA/EfZWc99SKqysR5BQi2VFHUVs2uz5EidoZFBsPE/X9Qfn14INebF RIVJZCN79Ejq1RubJFg+32+kDMrLx0/mwEGV0eqLLW+LfWyCdPf5eTm49KJTXxRh0vEwxxxGaFVXz CHx1Fcr4IY48u/Fi52Gg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5UuM-0008WC-RJ; Thu, 27 Sep 2018 11:56:38 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5UoH-0004Bc-6C for linux-arm-kernel@bombadil.infradead.org; Thu, 27 Sep 2018 11:50:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=evIzUViMtSitn37dGrQoWQvRjD//VkqNrRvm4lXczmM=; b=RX/Z/Wy4/aobdSXjER1pPPpNoI IsV9GwRGAWstsJMO9Lsqj6U9XKcXxgZfIJz488d0XwTJ27t7e3sH89QU5GUd6T/qO0Tf3gFWBPeil r+nUeGsWf/9TnX8TNyQfiriPuSjnij1r3friHOSr9/+ebZgnXeZqsM7gjILBZb47n8N248OJ+Rn9l WpGJkt+s1rhlJhfrVB6BodGmyI/UgFB/HSf/1hjaRRp0vjY8MH9DETs5n2VixVdkhr1vbAL86SAds qQOvgDaZHHkXIVpemy2VSZVVJNkm7cwmENEwaecJGAgHHzN9bif5I8dGRRglpoYzQbMAarcmDlj6o vKVMIPyQ==; Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5UoE-0006r1-Lm for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2018 11:50:19 +0000 Received: by mail-pf1-x441.google.com with SMTP id p12-v6so1754302pfh.2 for ; Thu, 27 Sep 2018 04:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=evIzUViMtSitn37dGrQoWQvRjD//VkqNrRvm4lXczmM=; b=NNPTAF1U4bEogAjUdNiqrIQHZg8GLgBKsga6evkO5zcEw2gwBz2qF0pt0Fe+Rx4gm0 dnZt7VSEI1m0A0yX79IL1dV5jnvpQF80lmWVqJisCd6Wzpuh6yYphE+O3xLxMN330Ycr +z+cHLXgV3x13uVBhj0/6hXXMbwAghtwrjDo4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=evIzUViMtSitn37dGrQoWQvRjD//VkqNrRvm4lXczmM=; b=gnd/8WLIk31hhCwcphRzXGuV8VM5d/wJLIsRJ8aIAkKyn7KrqhTXUdKae7kIihbnHi LmcUKg+d5h3FCAgrku9OVs4cxApC/CKHWrNi4Vv/4URvY09bN5Ag9/vzibHbOfNMT1ph KNJ5KAV/UzacIfjE8LU7puMJQAh5awWSejX8XJPGYApGiOyDqACM5fodUHo3rIyvTwot Pig5phDeJ9T7SA7lzG+T8ldkGIJwGWtO7+o6gpedSmX6k3lGsa/XqOB2//qN86BgG+Ji z/frZ4dYcjV8X2rp/wQrdkigK1RUJm6wU8UT2u6N2qwQ6aDMk1HbT2KCX/NanAO914YL FPcw== X-Gm-Message-State: ABuFfoiME+Jz2cZmpDH0PUJdRgh2BTLcle0kUR5n1Nj317UHw5cAaLzf 50tNz+P4QZCoZCxdPkMvTH2bEg== X-Google-Smtp-Source: ACcGV62ZFmQwjQws/+ouyXzbnrxyyZGVERygjSkmC5OOlNytyjL5JB3pypWcGjIxaP09zerRD1ysyA== X-Received: by 2002:a63:d646:: with SMTP id d6-v6mr667310pgj.450.1538048983513; Thu, 27 Sep 2018 04:49:43 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.49.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:49:42 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 04/12] drm/sun4i: sun6i_mipi_dsi: Enable missing DSI bus clock Date: Thu, 27 Sep 2018 17:18:42 +0530 Message-Id: <20180927114850.24565-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_075018_715294_B8985F54 X-CRM114-Status: GOOD ( 17.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP DSI bus_clk is already available in sun6i_dsi but missed to get the clk and process for enable/disable. This patch add support for it. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 8e9c76febca2..156b371243c6 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1004,6 +1004,12 @@ static int sun6i_dsi_probe(struct platform_device *pdev) return PTR_ERR(dsi->reset); } + dsi->bus_clk = devm_clk_get(dev, "bus"); + if (IS_ERR(dsi->bus_clk)) { + dev_err(dev, "Couldn't get the DSI bus clock\n"); + return PTR_ERR(dsi->bus_clk); + } + if (dsi->variant->has_mod_clk) { dsi->mod_clk = devm_clk_get(dev, "mod"); if (IS_ERR(dsi->mod_clk)) { @@ -1012,6 +1018,7 @@ static int sun6i_dsi_probe(struct platform_device *pdev) } } + clk_prepare_enable(dsi->bus_clk); /* * In order to operate properly, that clock seems to be always * set to 297MHz. @@ -1065,6 +1072,7 @@ static int sun6i_dsi_remove(struct platform_device *pdev) sun6i_dphy_remove(dsi); if (dsi->variant->has_mod_clk) clk_rate_exclusive_put(dsi->mod_clk); + clk_disable_unprepare(dsi->bus_clk); return 0; } From patchwork Thu Sep 27 11:48:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10617913 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2A4A014BD for ; Thu, 27 Sep 2018 11:59:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18AD32B0AF for ; Thu, 27 Sep 2018 11:59:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BEDB2B0CF; Thu, 27 Sep 2018 11:59:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 216152B0AF for ; Thu, 27 Sep 2018 11:59:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=l6myioVkaWs5qzn1KnghhI/JbXcV8nlvkIzyWSioBWw=; b=uecW3r0v3Gev31 TPgYDiVxDJA34FuDwoy7Gcjc79/1EAADy4uoBlYFfSX7CJNKaOVbQog6DEa3y73ajmo3/WgkehXk0 cuHKs7uC9RpizskbtGtfW9PFHeWriHCEzUw34LWt7mCWj5MySc3liKioR22O0Tuh6VHp0SygAh5CE kSOAXrZY4iwrhra38XCdfk+lDhRMtUdAzT/UPAnBOSduOgspF1XVRNfveOvsMdmh1A3PDGNbfGcZq kvk+CAVdcFgq1E8fTC6nvL+QAeosoWV7XHokkgO3Whop5ihWXVNFCbES8+pV0sIn7WM7ne/u9vTHn fYAuKRJ6tB9TmTp2awPg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5Uww-00012c-Ht; Thu, 27 Sep 2018 11:59:18 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5UoH-000343-59 for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2018 11:51:23 +0000 Received: by mail-pg1-x543.google.com with SMTP id g2-v6so1764929pgu.11 for ; Thu, 27 Sep 2018 04:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zrFpat5SwIdegq1NOT/FqyMYxxQkp+FdL7Qi1lHha3A=; b=Z0oF4OD/xPjfnwHbof7mvGPMGhxlEan1hfyrqRq7JENuXZC9h4LjOoTiqlRxUWdUxN p8SDzPUJ2sJMbEpKcW97Zhls0ty7T/ToGdsGIJQ7iB/wjFe21Pe+e2f6flCx5MDX5Shv RvSzdDCL2YTArUSciF0JSiu7AGPza5ThoV4UY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zrFpat5SwIdegq1NOT/FqyMYxxQkp+FdL7Qi1lHha3A=; b=rFfibBziYWLHAlh35DjlTpf5l6ISiYMXLTxrlz/GUnfAOZeXOkTf8KWLJNE9fZVwd+ xLnQ0HT1qEn2jvU971yPp6yGorBQjSccwIwJ9EPOrxTbx4zWFKGbzWcf5UrIn4kwYXEU RY88JNS/dhyCCubDrNImCSQHDZwpwo3YlV8GaB+hnB35OFqvGBFRiln3I3EIzThFK7dX iAeB0ndvdahAcT/rup8gwKtMDVQO0lUTcJ5a1sWhtpGFPHZ3qzgvIOBC3D00P+cn6NCV VJeUXFE6tbRTdVTtgva0W3NQbw9EEf3zXOnj/frvRZg9snbZ/kR68tlk+ClNGFK6OjKl vuaw== X-Gm-Message-State: ABuFfohBg+3G8lKu+ZMJNvWZkErHofPQI7I3F1LoG2GSxcqp+jW+j+4w VxjgjuTKdiisqIyMePJr5iLAlw== X-Google-Smtp-Source: ACcGV626P/nIK+nl+dkDoqQjr+hcyM7N1R7kYzYQ5ARGgoyJI2iLlyCEw7XW8Yt5xZz+B6o7DvvjKQ== X-Received: by 2002:a65:5304:: with SMTP id m4-v6mr10083218pgq.250.1538048990484; Thu, 27 Sep 2018 04:49:50 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.49.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:49:49 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 05/12] drm/sun4i: sun6i_mipi_dsi: Add DSI Generic short write 2 param transfer Date: Thu, 27 Sep 2018 17:18:43 +0530 Message-Id: <20180927114850.24565-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_045021_357398_587EB1B8 X-CRM114-Status: GOOD ( 12.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Short transfer write support for DCS and Generic transfer types share similar way to process command sequence in DSI block so add generic write 2 param transfer type macro so-that the panels which are requesting similar transfer type may process properly. Also added error check for unsupporting transfer types this make debugging easy for new transfer types. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 156b371243c6..1c7e42015645 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -869,6 +869,7 @@ static ssize_t sun6i_dsi_transfer(struct mipi_dsi_host *host, SUN6I_DSI_CMD_CTL_TX_FLAG); switch (msg->type) { + case MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM: case MIPI_DSI_DCS_SHORT_WRITE: case MIPI_DSI_DCS_SHORT_WRITE_PARAM: ret = sun6i_dsi_dcs_write_short(dsi, msg); @@ -885,6 +886,8 @@ static ssize_t sun6i_dsi_transfer(struct mipi_dsi_host *host, } default: + dev_err(dsi->dev, "unsupported message type 0x%02x\n", + msg->type); ret = -EINVAL; } From patchwork Thu Sep 27 11:48:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10617909 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D39F913 for ; Thu, 27 Sep 2018 11:58:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 465322B0AD for ; Thu, 27 Sep 2018 11:58:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37A8E2B0B8; Thu, 27 Sep 2018 11:58:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6C55B2B0AD for ; Thu, 27 Sep 2018 11:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gWhl9qY27IENDLnVQ7N5evDBYoE7fWiHu5RZOYBp57w=; b=nsryLcVuqdKIdl q/ochchuxMzshdTIhKmS2hvpxdWH9JM0uAQd3eeL22yR+vKzXB4xBg+PhcwGhbmfCnE30i4WGTD3e 4kI7IXdZc1paDmAitoaxonL8qdd/xP49d1cViwY55r5UliIpT7iENrbJHG2C8dBstycAVXtZgvz0o QPBohfSe6URfYjN6k2I9WnsdnUC6v79pJy7JMH25/IL7K/+YjFz23BYBIg5i8X+HOfNu9Ppu5zW2Y rYJnYxZDXXTgaEa1D+fkSqkbF+Bb7jrfhQjI52aehgp2+4YuEDZZfrB576AkcWs6zp9zEYq0+7I+e Polid5FIZil8SmPfIxqw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5Uw3-0000lM-UG; Thu, 27 Sep 2018 11:58:23 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5UoH-00034G-51 for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2018 11:51:23 +0000 Received: by mail-pg1-x543.google.com with SMTP id z3-v6so1774052pgv.8 for ; Thu, 27 Sep 2018 04:49:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FM12r1PqeZ0UEqfU8rhB/PQ8rkjshYJl/wf5YHK4Yz4=; b=RTJd4fD+eMmL4P/QjE5qS6xoksq8acj/sVh0lIYy72C06IpsjttQ4YPpBLPIhYlS5+ nW39V7kznbYTdrU4rXkyvm0U+KKQnlSphKbW7ijALohmc7xeaJImfGf8IzH+pTyLdtxb 14o0zwvqEhHY8PYxCpmGaY3Y0WZJ90upAzShA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FM12r1PqeZ0UEqfU8rhB/PQ8rkjshYJl/wf5YHK4Yz4=; b=WdjFk1k7YvSZ4LyqNgrisrbMigXgl/r1Kt64POb8egVu+HsnAA7CRLZ7TfoZ0JgEzx vcTnPjSOn5Nj+W/wSUk507C9rOwGo0tRCmhI4erb3pLRAwTay/GhgLq0Rg4a0A/ue1/L 2yoEEt5MyqmhjoQs7NLxIOMjkNuQe7NW3BLTJ9wE+Mjn1+B4wpNVC/5tCVFDUyw6TyjE RlXIyi50jQpDyYJzBPV5q0snJO6Q7TmINZqe25rfdtOsOzT+x5TsSb/YzQsGZcGt8cpD zqSjSwNQU6wEiXBt01VgVsO4xM85KydUtnQXk2VVwRmVrEyJCNUihfVP7Hbvgs28tcGh qFBQ== X-Gm-Message-State: ABuFfohMDbrPjWomM4CD1Ov4gCBHkhco4J+myQENy4CiGT9zqZdoGPYr KzwxY0D1kAlbbmCTI0n/27bLiA== X-Google-Smtp-Source: ACcGV60olxErzia9r7PJhIrOBpwIbFEa2glfR4hi9Kn4gxZi5wR7V0lzZVKjzt3HhxIFgqug0WcIiQ== X-Received: by 2002:a63:e14a:: with SMTP id h10-v6mr9847345pgk.358.1538048997135; Thu, 27 Sep 2018 04:49:57 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.49.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:49:56 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 06/12] drm/sun4i: sun6i_mipi_dsi: Fix VBP size calculation Date: Thu, 27 Sep 2018 17:18:44 +0530 Message-Id: <20180927114850.24565-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_045021_357259_CED3E175 X-CRM114-Status: GOOD ( 13.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP According to horizontal and vertical timings are defined per the diagram from include/drm/drm_modes.h Back porch = [hv]total - [hv]sync_end So, update SUN6I_DSI_BASIC_SIZE0_VBP calculation as mode->vtotal - mode->vsync_end Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 1c7e42015645..599284971ab6 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -526,8 +526,8 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, regmap_write(dsi->regs, SUN6I_DSI_BASIC_SIZE0_REG, SUN6I_DSI_BASIC_SIZE0_VSA(mode->vsync_end - mode->vsync_start) | - SUN6I_DSI_BASIC_SIZE0_VBP(mode->vsync_start - - mode->vdisplay)); + SUN6I_DSI_BASIC_SIZE0_VBP(mode->vtotal - + mode->vsync_end)); regmap_write(dsi->regs, SUN6I_DSI_BASIC_SIZE1_REG, SUN6I_DSI_BASIC_SIZE1_VACT(mode->vdisplay) | From patchwork Thu Sep 27 11:48:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10617917 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6721914BD for ; Thu, 27 Sep 2018 12:01:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54D562B244 for ; Thu, 27 Sep 2018 12:01:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47EFE2B252; Thu, 27 Sep 2018 12:01:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4E48F2B24D for ; Thu, 27 Sep 2018 12:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AQLBjcXNZ1jlfFVRXvBoEJvkNVsTOf0e95aTnfKivx8=; b=DNsvNLPF507+Ld jo+nO7mKErRvoBhUVB+vnkhYNheattoo116hQTt7dr0sD1adsGVaH5vnpVzoL5hxgafIBFSvKmAP4 8b5q75MSzT0aSoTmwNoXo3Zdu2HfhXiRPdK0FFy+bU8Wq1kcvkXMyRKDhn/EkCVUGhYW3qy2iQ7nY elrwFq53PTbLAP8nVO9LxtgdLIGgtnp9J9eycKwE+SQDFKDy5cecYKENY6AxMqlNIc0wzzkwLXaz9 G5Lcszwk0M/ZtnoO2WGpiXXqZ4Oive+GbUxo2L/4K7a30+4kgDsWVj9SP2iVVA7jDHMSWrSlgfe7y RBfjORZIiw77DBoxzpJg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5Uz7-0002yq-DT; Thu, 27 Sep 2018 12:01:33 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5UoV-0003CQ-PB for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2018 11:51:27 +0000 Received: by mail-pf1-x441.google.com with SMTP id d8-v6so1717476pfo.13 for ; Thu, 27 Sep 2018 04:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=h7PHMbYpuEXpp+8XgIFSEXt+FJJ3QcGp+T82lkpHAH4=; b=bJb2hqzNxsJ4M9UVqML0qhncsnI2R9K8AIwYoU9+qM0IcYtmlASU/nCLCNOBUUNQ/m wGWuz7FnvhfOHv1mYzjJB4TzZ2ydF/2fDLKOdeoUI7Eb5pMeEdk6Ce3sU2KV8mgYjIna Sliro/d0zM+nc9oQS+3Qm5mxL2HYih09bwbe4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=h7PHMbYpuEXpp+8XgIFSEXt+FJJ3QcGp+T82lkpHAH4=; b=pLG1crv6yzk3TL0kLLwPraJbDtCD+xb6FuahW9o3rtrDiOGIUyv2w9WwgcRrnf9B/N N4ILYnxyTVPIkGjAsvPi261A7xZm/l8JXjtxqTH2tKXCpBG8WlpW/0AZaaq5OnggFlfM ALrCW5XPsfeFOuIUaX5qQ5dcvAQLE4b9geMEECpTI7b9chQqLTXJvajtD4LnV06QnOvK fNE3oTvpH28JC8ognEk/aH063xZKqHW5g+5aRXxAOV4IoKDEFKjEY9vaEfyGmvb5Zlh6 OEfUaD2dBc+JQmGzMfFfUECYQjPQJmM50mvSTUAcwbR1eNjZdphIQjjF1PcZ3CGBHzzj oYOw== X-Gm-Message-State: ABuFfojkg2ml+cuJtYWLWG4eHf8x/Uctmn35rE5IX9ovzH3HSarJB4IK C8JMc/dTGIy9uoDwDDyasYXgRg== X-Google-Smtp-Source: ACcGV63oiscJEiP9nlZ/hvm2ilMa/7Ju7fl+feJ0Sd/gTtC1VKv0GWKXIM/Le/43UYW07D20gIaPcw== X-Received: by 2002:a63:7107:: with SMTP id m7-v6mr9830760pgc.73.1538049004209; Thu, 27 Sep 2018 04:50:04 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.49.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:50:03 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 07/12] drm/sun4i: sun6i_mipi_dsi: Fix TCON DRQ set bits Date: Thu, 27 Sep 2018 17:18:45 +0530 Message-Id: <20180927114850.24565-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_045035_864894_54CF0345 X-CRM114-Status: GOOD ( 15.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP TCON DRQ set bits for non-burst DSI mode can computed via horizontal front porch instead of front porch + sync timings. Since there no documentation for TCON_DRQ_REG(0x7c) register this change is taken as reference from BPI-M64-bsp. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 599284971ab6..9918fdb990ff 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -367,9 +367,9 @@ static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi, struct mipi_dsi_device *device = dsi->device; u32 val = 0; - if ((mode->hsync_end - mode->hdisplay) > 20) { + if ((mode->hsync_start - mode->hdisplay) > 20) { /* Maaaaaagic */ - u16 drq = (mode->hsync_end - mode->hdisplay) - 20; + u16 drq = (mode->hsync_start - mode->hdisplay) - 20; drq *= mipi_dsi_pixel_format_to_bpp(device->format); drq /= 32; From patchwork Thu Sep 27 11:48:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10617915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7B5814BD for ; Thu, 27 Sep 2018 12:00:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9698C2B27E for ; Thu, 27 Sep 2018 12:00:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87D6E2B289; Thu, 27 Sep 2018 12:00:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AA9092B1A9 for ; Thu, 27 Sep 2018 12:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LBoO8/19d6eVNkEgP4vlHGWt9mGc4sJXgZpT62OIaCc=; b=U+p74mMdJgodtE 4plHVlilZ6Q5pEYZvX5WvRd5N3iy/pGuCAaGcnA4SvXmsfYrCv4OzZejMicQPDZoUQrmhZrK0IGRN lvKigfcfiw9NbGmoLiLqoyEn1TAVngQ9TSYm80srqfYev0avowG5NLqlmmflNFi88yBJ5IIQ/lQsP JijsMxRlD7ImpVmc7yD3bh8LJigQqPPAf9M90na10pqPqrwadhRnsVTs4P9QaFY7vjG+lcpqgVA24 lXYFpsCuHf4UUsMoyRxHBjLcJWv/xX8Hw0c/Bk8F97jUM8YUqm2U2sB82e1vdLy28FpuV3zrmmOxD 5MEeFfMfnuQawE7kFWww==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5UyI-0002fH-3E; Thu, 27 Sep 2018 12:00:42 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5UoV-0003bJ-P8 for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2018 11:51:26 +0000 Received: by mail-pg1-x543.google.com with SMTP id 85-v6so1781984pge.6 for ; Thu, 27 Sep 2018 04:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V0R68Y/KzwdIumM6zfyEnPevd749hoDtm4cNpSj8lHM=; b=UrQt3Oh+h3lHXl9yq+YbsI4BIj37f6E/418FWFbw2leiym7BkzqO0wDW7L66LC8hQH dMw3mR4yfjL0UttZBbUvKBghOkokwFcBlP/r9iRVIVqgQOD+sU9RiBOJc0oZH2Foweny Tf7Ckqitg+pcY9xhvI1zuRPmP4SQxg3XEpeu4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V0R68Y/KzwdIumM6zfyEnPevd749hoDtm4cNpSj8lHM=; b=sHFp5gDYQZJDw3DE5wW2FPqCMoYNvO8JWelBy27ChGeW6lXMtuYXksKw4mKR7qXrci NKm+n6thZqCLks6ekYmHjBI19ubK+y5X5UurE3P61ZnwHECd71rAdnAdDN5q08JY0PR6 xcZc0p2c+pzetTkagVqMptEQeGP6/95i46ykYSoU6iXxauxq08NJtqbdo32qnZr/jpzu r5a7cRRZ0yOB7AoKEYglLuDQpuGoJmSp5ROY1LT8K0RF1ArK8bfDLQFasewSN7PUHFXd ON5bFZxN5DXlNlg3KuYw51aetOKc7RIWpBeUC31hXZDVDGAZLtmJZkZJKMLYlIkRvjCC 5/XA== X-Gm-Message-State: ABuFfoi1QadQNd2ixMzovd0IYMjUKqQVYOdxC9kUhccxOEu9TsGUTljQ sr3Zsh/ROTcB//AYgTMOFj0J7Q== X-Google-Smtp-Source: ACcGV62iZgr6a1wPuCr8fIWrr0mf1eoTyBfPRoHo5BLUU2Swc38AUSdthHx5XNtUnk+Nngsr4XPO7g== X-Received: by 2002:a62:8145:: with SMTP id t66-v6mr10902156pfd.192.1538049011667; Thu, 27 Sep 2018 04:50:11 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.50.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:50:10 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 08/12] drm/sun4i: sun6i_mipi_dsi: Refactor vertical video start delay Date: Thu, 27 Sep 2018 17:18:46 +0530 Message-Id: <20180927114850.24565-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_045035_848727_9D6E84BB X-CRM114-Status: GOOD ( 15.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Accordingly to BPI-M64-bsp DE DSI code Video start delay can be computed by subtracting total vertical timing with front porch timing and with adding 1 delay line for TCON. This patch simply add the start_delay logic from BPI-M64-bsp, w/o this new computation, the DSI on A64 encounter vblank time out. [CRTC:36:crtc-0] vblank wait timed out Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 9918fdb990ff..217db74c6dc3 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -358,7 +358,17 @@ static void sun6i_dsi_inst_init(struct sun6i_dsi *dsi, static u16 sun6i_dsi_get_video_start_delay(struct sun6i_dsi *dsi, struct drm_display_mode *mode) { - return mode->vtotal - (mode->vsync_end - mode->vdisplay) + 1; + u32 vfp = mode->vsync_start - mode->vdisplay; + u32 start_delay; + + start_delay = mode->vtotal - vfp + 1; + if (start_delay > mode->vtotal) + start_delay -= mode->vtotal; + + if (!start_delay) + start_delay = 1; + + return start_delay; } static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi, From patchwork Thu Sep 27 11:48:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10617919 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5429F14BD for ; Thu, 27 Sep 2018 12:02:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 422C32B244 for ; Thu, 27 Sep 2018 12:02:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 367322B24D; Thu, 27 Sep 2018 12:02:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 578E22B244 for ; Thu, 27 Sep 2018 12:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bQhHbJakCrS9GU1wpmnIg+Lu2fPQoctnAziCA/CIlAA=; b=M521HGj4dkPAJp qEwMSTiVutPwRcaEalZ5R2ZioQSH0p6+lyn2BMhS68kLMsLsPf/NZ5auBhfVsbOigglVuCqqe800H mfNnvJ/lerncQCm1nvHGZC074b2PQMMCCD/LJjlN+d56Nldn3pWtrKezi6fDkpsEjFszlfkCpHo/b Xaea5khjCUC3mu33yxyun9fJGp26BmHWG52QHTjKnhhll5MjP9xvjUz4qw2pgVbLh2BM/P2vE0UvL 3UII/nA0i6lwGNa3B6HGabBZr53mo6cfs+qLkma1cRTvbf+zEiEdYABLf3ySgyVjR0/PG5AHSvxan GiLAlgFlg0HVtu8OrRug==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5Uzv-0003Fy-J8; Thu, 27 Sep 2018 12:02:23 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5Uok-0004AL-TY for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2018 11:51:42 +0000 Received: by mail-pf1-x442.google.com with SMTP id k21-v6so1723361pff.11 for ; Thu, 27 Sep 2018 04:50:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mkh8JJna+rFqognYZHFz3DRcgzLcGu1+fY41Hy8qrpw=; b=PbjR4KQv278yn6tIoN3/UxyFcBTGR6EhU58tPxm99ztmRy+8b7lwqHnSjqgZkyZW55 ThgjqV0+/G+uyHRsslyTnSI9CFQ/Qib1NZnjwEuO+D/Rg12g8HFe8TOPmKgBH0YVBWwL LmGV+Azj29nFbqThY1BwcF16/bz6x1xR0qPM8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mkh8JJna+rFqognYZHFz3DRcgzLcGu1+fY41Hy8qrpw=; b=gtIvkdssFq/8a0XTWh2fKRZa2siM2o0ytSokeXTlkAitCImp5JUOUm8w6qSwSp+Xd1 Edr4uADwhdpQDOqCNQzctI6L7jx7itP+xypc8yKGBRa0QPevdmrYsdMh9GPSkzob3dJG 8Ri4741o4lmvOZnoq7naaNfVH8v8j2AEGngI8Tvrupr74E9D2D3QacTY9YPcbbpLiddb tIgrZOaGLsSO1uvhYvGqGUufEQJ21mKJMSC2GSbSo4N3a6tW5uit05LiVvi5rycwb7Lw LxWKqNS221jUJE44JtoQnZ9oppv2/KUtp7wFM+I4LPJ9ELXi24UkB/6HAChcGgsCO79F 1ACA== X-Gm-Message-State: ABuFfojpzVoYQ10QSvLyAblhHCHg3aFN//xEzSt/oXyQZEd7KtZHuTPb lgBHPaztLVEsUMFkW84lDqSpsw== X-Google-Smtp-Source: ACcGV60bLPZdblOC8fzTH/0IpFLn86HNJg+N6Up5oAb3AZpOuyCezCuas754jeIQiT6nwku3nimuJQ== X-Received: by 2002:a63:7c1d:: with SMTP id x29-v6mr9872440pgc.273.1538049019101; Thu, 27 Sep 2018 04:50:19 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.50.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:50:18 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 09/12] dt-bindings: panel: Add Bananapi S070WV20-CT16 MIPI-DSI panel bindings Date: Thu, 27 Sep 2018 17:18:47 +0530 Message-Id: <20180927114850.24565-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_045050_997459_9E0F3300 X-CRM114-Status: GOOD ( 14.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Bananapi S070WV20-CT16 is 800x480, 4-lane MIPI-DSI panel, the same panel PCB comes with parallel RBG which is supported via panel-simple with "bananapi,s070wv20-ct16" compatible. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring --- .../panel/bananapi,s070wv20-ct16-dsi.txt | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt diff --git a/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt b/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt new file mode 100644 index 000000000000..c477163f7999 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt @@ -0,0 +1,21 @@ +Bananapi S070WV20 CT16 MIPI-DSI panel + +Required properties: +- compatible: must be "bananapi,s070wv20-ct16-dsi" +- reg: DSI virtual channel used by that screen +- avdd-supply: analog regulator dc1 switch +- dvdd-supply: 3v3 digital regulator +- reset-gpios: a GPIO phandle for the reset pin + +Optional properties: +- backlight: phandle for the backlight control. + +Example: +panel@0 { + compatible = "bananapi,s070wv20-ct16-dsi"; + reg = <0>; + avdd-supply = <®_dc1sw>; + dvdd-supply = <®_dldo1>; + reset-gpios = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ + backlight = <&backlight_dsi>; +}; From patchwork Thu Sep 27 11:48:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10617921 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E5F6414BD for ; Thu, 27 Sep 2018 12:03:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D20CC2858F for ; Thu, 27 Sep 2018 12:03:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C56C920000; Thu, 27 Sep 2018 12:03:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EE22A20000 for ; Thu, 27 Sep 2018 12:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ifmLj9YA3F14B/PqC9XiQHM8gaFtLuqetShxqG6w5KQ=; b=uzHlKQ1Djjdbrm XFpNRfzeUmCDEpMFGTXuWPR1U+H4Sb9UO/rDea73sUXe6SaTVe5H0oQpRNnNDCoOXQkcHcCnr8rJe aithlObMvSPw3+wPEalDeC68CcCrg3Zq2BOCNbcjAZWt4zSV97I+SeDZhxhlzT+b95vKfsHpdvXty lR+C09pLDdbDiUxQO4W4LyAHSmzdkmYepcFe/04gv+ufepJGEp2Fj6hSzZBgWpXDUxc1ShLC2I6cB lBWaBKZnRx+Gx7b/3k+Dfh5sU6Yf/4Er1/BAOsp3VyjiU6dL2wFfAzPkdcmCTStjib3pvhhk9FO3d hHd/EYCBckwdvmO3fGcA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5V0i-0003X4-HT; Thu, 27 Sep 2018 12:03:12 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5Uoj-0004Z2-QJ for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2018 11:51:41 +0000 Received: by mail-pf1-x444.google.com with SMTP id b7-v6so1754618pfo.3 for ; Thu, 27 Sep 2018 04:50:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ye3BHTYw3hsX6SekIxERfAK/2gCXXkytVmCv8lGdJeU=; b=XS4jskXBa6ajaQ6Il3cCLChRb7VXVD+mm/EDyGLYuw4MaVHLPdCrz79nLMcneWSHQB LTAmX4vTqcMT1pZCiJYiJE2PeMBqYAzIPdnvDuu8b0CluQsqECs+boqTgicqWA7mAu9W VN+ftSoRx21asn2ibRUiWo2tRoNyAAmaoegoA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ye3BHTYw3hsX6SekIxERfAK/2gCXXkytVmCv8lGdJeU=; b=qC4xu4JZVGfI2RJUIGzikXDSRIl0aTe5LGTBZPcPwWP9isiClgbOg9HHoV+VzRjO8C NApnivmO5Q75ktDY9CF/kdgf6dRIM34o6gXShXO8vEGP0mSxGJPhCd+OZgYCJyStkDNh FOv2CNCDidnV5if21JPu7Z8cXDXUm8eyNBpr0nKb/r3W+BaH8aTuGRpX9LxmbPMNcxr2 uf5eOp7hLQDKYDOICYXVtEm7kHQKhbVYnNVONtya5ctZ8vUwzUL0u/7Fw2j7aR5BlwPR ESYlvPldV+SeGsBZII22pIAGJWl1y7tmn41EP9GCbrsPgmWfbcSxU/PgyMD5NL4bnCEB f0Vw== X-Gm-Message-State: ABuFfohw6zocdO7n/HqT2Qmo95dygliHAq4v0BPsOQRGpPCJ5/XskRdR 3FUMg2u2uEXff7HxgoQPHWwRyA== X-Google-Smtp-Source: ACcGV61C3MWQhpiVTDjjDZ8O2Uk9bssNx1bPcNKn7qNA6iiwc3rX4chyQUYNmPTm2Uk15BHR5skNBQ== X-Received: by 2002:a17:902:7001:: with SMTP id y1-v6mr10780813plk.259.1538049026262; Thu, 27 Sep 2018 04:50:26 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.50.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:50:25 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 10/12] drm/panel: Add Bananapi S070WV20-CT16 MIPI-DSI panel driver Date: Thu, 27 Sep 2018 17:18:48 +0530 Message-Id: <20180927114850.24565-11-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_045049_919972_DA61B74B X-CRM114-Status: GOOD ( 21.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Bananapi S070WV20-CT16 is 800x480, 4-lane MIPI-DSI panel which can be used to connect via BPI-M64 board, so add a driver for it. The same panel PCB comes with parallel RBG which is supported via panel-simple driver with "bananapi,s070wv20-ct16" compatible. Signed-off-by: Jagan Teki --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-bananapi-s070wv20.c | 336 ++++++++++++++++++ 3 files changed, 346 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-bananapi-s070wv20.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 6020c30a33b3..d25960a63b10 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -17,6 +17,15 @@ config DRM_PANEL_ARM_VERSATILE reference designs. The panel is detected using special registers in the Versatile family syscon registers. +config DRM_PANEL_BANANAPI_S070WV20 + tristate "Bananapi S070WV20-CT16 MIPI-DSI panel driver" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Bananapi S070WV20-CT16 MIPI-DSI controller. + config DRM_PANEL_LVDS tristate "Generic LVDS panel driver" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 5ccaaa9d13af..345b6475d3a4 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o +obj-$(CONFIG_DRM_PANEL_BANANAPI_S070WV20) += panel-bananapi-s070wv20.o obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o diff --git a/drivers/gpu/drm/panel/panel-bananapi-s070wv20.c b/drivers/gpu/drm/panel/panel-bananapi-s070wv20.c new file mode 100644 index 000000000000..6c9adbec6dd8 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-bananapi-s070wv20.c @@ -0,0 +1,336 @@ +// SPDX-License-Identifier: (GPL-2.0+ or MIT) +/* + * Copyright (C) 2018 Amarula Solutions + * Author: Jagan Teki + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include