From patchwork Mon Dec 10 16:17:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 73 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f69.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id E852A2E54A3 for ; Mon, 10 Dec 2018 17:17:46 +0100 (CET) Received: by mail-wr1-f69.google.com with SMTP id q18sf3730231wrx.0 for ; Mon, 10 Dec 2018 08:17:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458666; cv=pass; d=google.com; s=arc-20160816; b=U58AaSmVUGDXPXwoAAhg5fYqU5EPvnIvo7+je841yzE6HuN/I8d0U2CxmSIxzhBBb+ 4g4I4Y80dp5bks6ezkykL7axfTqrrm18R9bU23QEmtUgyET9CJRo0sHQWxht0N25EmD1 +ZUzMSm4GgtlJg8/xYQUr3WUBJ+0gESTbZqO6zEBGk/HF+Dnwv3nYB9Em/gKsTTunf3c KFA53EquyWGULTq0dAHUQvgk5aar6zGkLbhIlHHRpB322/MlB/ELtI71zeWT0SatA/9A BWzqTrkLanrIcnZRRBk/3vYiLo1IobhXoR/AohVr29R33IkTqJWuSg17UuBTeCK6z+rB HvjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EEGBFedCv0eGIwFBpPqp7aDi2x6OUg3hp3DvnJn01c8=; b=PqXerrnzu3J3/e8/L9GyVQHfAEYPUR9q9qSJ6bDPzVYmYT9McYlu7aZNfx5EoQFVZz gO5Jfdgdj40g3ZnaDTk/rkOHdKVq913W4lFDZV6/O3yaNOWDXU7G9JmGCp4QTH16oYFm K9Z/GgiHODzDB5umAfGM2unh9bDUY0ASZB/MUgfTIrhcAFiwU9IdiDeS5Ii/PpNmjun/ cENjlXvqOj6yLtTOKZYwb66Q5SeQP7H7B7ZccqvOo0C/jLGFdGmpLis0Ez3UIWv8mpV1 eA04HIOgnAJfmRjM2uVGHnvbB2ESUsrWD1BDwbJHcSPV8H141lwf5kBciir1N+PWOgiB aCTg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=c6YjHI+8; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=EEGBFedCv0eGIwFBpPqp7aDi2x6OUg3hp3DvnJn01c8=; b=hyE2df2OxYnBYMIkyznjGVe824uCUo1uylnFOuoy8uh7dK22arS7rkwasbyZKgg8Dr c+ERUuEuOLP9P1L/bV7GMthbcB9RswG3OZJNmclGSK6pAjI9e0Mjp+c1XMIiQGVX1RLw PuuUuRK430KUvFklCs1PUU0SRnTou2QdryKNo= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=EEGBFedCv0eGIwFBpPqp7aDi2x6OUg3hp3DvnJn01c8=; b=Lz1E78XtD180GCVV6qc5BBrZgwnyQwcjuH6+IUdpHtWZ4LfTz+TMSJpNvqcO4k2Mhy L36dgShSB+pB6bOtoe82SH38NA+59hqhyAUN+/IYpPT7l5n0ooQZuwwMu/EaCrxqOslQ U0JDV4lRtuWWFa5oMv6InZ85sno/lhLVuJgbmHIZhXZANm6tNnSMvNaOKYiEuKgVllJo ZY+TD5aCUhI58iOTgRVKQCfAmDXcN7YhH3/oWC1R25Y0AcLFL797eVFR20l6Ac3S3oxu u0iH68fC9+MKtqzSeUANAJ6GDZ9oe9Wg9Bclo2g2f2iPP6MOOzPZNPaTx0xzfs6paz9N c0pg== X-Gm-Message-State: AA+aEWZSzosWBl80TqH9m6kEd8s90YlURzeqBqRR3yVcL8ObeeShkM9+ OmhwV1t3ZNBmkh2o+KjTqCGOrb8j X-Google-Smtp-Source: AFSGD/X5bz98NYgj0aiJh9LfiJygG7FzztnMRSFzkLOeTpG1RjCX0wKgfjRdnsCmmsA8XlLKmIAkyQ== X-Received: by 2002:a1c:7d03:: with SMTP id y3mr1385866wmc.8.1544458666542; Mon, 10 Dec 2018 08:17:46 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:1f41:: with SMTP id f62ls1322873wmf.14.canary-gmail; Mon, 10 Dec 2018 08:17:46 -0800 (PST) X-Received: by 2002:a1c:1b86:: with SMTP id b128mr10842810wmb.30.1544458666116; Mon, 10 Dec 2018 08:17:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458666; cv=none; d=google.com; s=arc-20160816; b=vKAnG6V7GZfpcr5Lxeh0qdWkHv1/U1TzIyibxVw4wiZilT0UCL9/i5ra0613haRH+2 l6JlnKbPyCkkBENRAgUvUENT+HJYu7+e9u0SdJ3I31qmDSGKknVQcfcAZsjixl9fwSXf Uu40nDvs1dQUboIUL6R1xRRcrQjGkRTsM8XrNw4/P8SqZLrXKEM06ruH9veTgzeueDoN 7FnsVA/dLr4RBjXHFUnIssswcsvG8IaWTFiFsFvbp603uSpm0cOk1g7rmzS2atm12icr 3cjE3qhcaGw5takPPMT/7tFwkSFr5iXSC5VNu5gxhP0FVOVVDJDny4bgtXLGEdSyAHbd RsZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=EEGBFedCv0eGIwFBpPqp7aDi2x6OUg3hp3DvnJn01c8=; b=fbnbw8CrnfXD1aoyu5TVZ0sZxigkOEdJtwRfop0cnBJ3VJ5sejIdXM53OEIoVDVmAv Z1FATb+pzf/ICVXGYdmWJvCmBNBVVNjwCrbphZ3E7WFgs2dX0XbCag0B3XpAmTfKJckC 43t/y8xxkVi7crvYjLijaViTEmE9MPNY+NF9K0bjxL4w6jxyBQrfcd469xl8anSkTm4O DPN3Ii3Mp2SoggkFLh2jd/OBqfX3eQukiGeYqBAPJf/xXSnD88d23NkJU6DJ7h1uylxo XzFJG14cKHyN3usQbsrSyfewVBHYVAmaPXvOX5i9nIydW3xcidRc8PrJOBeAsFnsA2bK eBYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=c6YjHI+8; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id o10sor7866984wmf.29.2018.12.10.08.17.46 for (Google Transport Security); Mon, 10 Dec 2018 08:17:46 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:16ce:: with SMTP id 197mr10900332wmw.126.1544458665729; Mon, 10 Dec 2018 08:17:45 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.17.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:17:45 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 01/17] clk: sunxi-ng: Add check for minimal rate to NKM PLLs Date: Mon, 10 Dec 2018 21:47:13 +0530 Message-Id: <20181210161729.29720-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=c6YjHI+8; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Some NKM PLLs doesn't work well when their output clock rate is set below certain rate. So, add support for minimal rate for relevant PLLs. Signed-off-by: Jagan Teki Acked-by: Stephen Boyd --- drivers/clk/sunxi-ng/ccu_nkm.c | 5 +++++ drivers/clk/sunxi-ng/ccu_nkm.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/clk/sunxi-ng/ccu_nkm.c b/drivers/clk/sunxi-ng/ccu_nkm.c index 841840e35e61..096ff4f4839a 100644 --- a/drivers/clk/sunxi-ng/ccu_nkm.c +++ b/drivers/clk/sunxi-ng/ccu_nkm.c @@ -125,6 +125,11 @@ static unsigned long ccu_nkm_round_rate(struct ccu_mux_internal *mux, if (nkm->common.features & CCU_FEATURE_FIXED_POSTDIV) rate *= nkm->fixed_post_div; + if (rate < nkm->min_rate) { + rate = nkm->min_rate; + return rate; + } + ccu_nkm_find_best(*parent_rate, rate, &_nkm); rate = *parent_rate * _nkm.n * _nkm.k / _nkm.m; diff --git a/drivers/clk/sunxi-ng/ccu_nkm.h b/drivers/clk/sunxi-ng/ccu_nkm.h index cc6efb70a102..ff5bd00f429f 100644 --- a/drivers/clk/sunxi-ng/ccu_nkm.h +++ b/drivers/clk/sunxi-ng/ccu_nkm.h @@ -35,6 +35,7 @@ struct ccu_nkm { struct ccu_mux_internal mux; unsigned int fixed_post_div; + unsigned int min_rate; struct ccu_common common; }; From patchwork Mon Dec 10 16:17:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 74 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f69.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id D5FC92E5487 for ; Mon, 10 Dec 2018 17:17:48 +0100 (CET) Received: by mail-wr1-f69.google.com with SMTP id x3sf3585416wru.22 for ; Mon, 10 Dec 2018 08:17:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458668; cv=pass; d=google.com; s=arc-20160816; b=KpWc252nZCrtR/sXhZmX0zNlpg+9rI7ti1ce2Aj1desScwbIUR1/vMOfeAHEbM4oWx y9V9ZvlW15+Tv9GxxVJ6HFI3udLxRlQiik0GR1MxGaKd0Q1gsFPp98v79wGSJ0dPuM43 bD//b9qOcA45xBh7DM8Nqrj0v5EodMbBeSKx/9yMe8Jp0DSKjyHnonmvYdI9hQwL5HbB fPlMbmkEFzWEC4sa/MywWyjykXTDSY/7cWhY899Dtsy7Ylu93EfbCfh9E8Ekq/LdYRse LSxd1RiJzKhOTLJWQfLt1wfj4a7S6YvmY8KQ4qfCohxAu01AHLPef1va0A7TBGfsk9WZ kXGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rlpTqVyJlpHFfIEuYuSfPKgTjg+EAGEL37BZe3O0asI=; b=MF4imGxZQRBIj/Tq127fGBN38EzMPeyvlDtpTdxcWLDJTq63gq1zWwaSmp0M3WOTZ8 b2i5fhoj834gSJIHaYDGzeqQb1Y5o0tyyt4jPquio3WBI5PLjc6bN3EXe7i//kbGsKc2 cgoBuGcRoKWb5csDfhi/rZiLBdjqzLkz8ZmP7Sld8ag0Wag5KCIbeJBmt2F/kiT2HiUW xSmwMZpTu+k+BSMAcxkQzCsjAeynVDUF9L5QDNX3o3Fn0UEMB+VpX12bYOJdvpn7Gy8H 75pGzU/iT36ThIZ84iYFPcBuq6Rr9dB5ZWIZH+J64hdHobdZV6R2Kk1/17GoF13C2KN6 9snw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kNb5POBI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=rlpTqVyJlpHFfIEuYuSfPKgTjg+EAGEL37BZe3O0asI=; b=HtfMUn+OMa1nNxKkhvPq34ug9Q4P16DqLiInAUTMh8WjCJsaFHxpKqqIJA/wxava0j /D49B00i8I2bZ2IPlqBnLaGjzC5+9u2BeH9Tmyzvi4ksMX/EzQOXeTxj8vkbiMYs9Mka kEYEQLdWIGjDjfZ8ojpcEtnGO1OkolLsMfGPs= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=rlpTqVyJlpHFfIEuYuSfPKgTjg+EAGEL37BZe3O0asI=; b=XljBNzbXr3PatE7LL6J7ckbMk7gtzzb6HWKRKO0Eu8AQwN/mqdejN33OZ2YKDcK1cI 8DM+wYaKzMEavSznwzGMpObjawG4PqCye+lBqiV3B5WLM3NVrxa7h7Mn/5hicZwgCQYw z07ouWQtYIyymOdKVJEauz2Q1eoL/+ch/hcKhZPAApRTOgKKvNeVtBFXZbNLqSqzDIWt zAmzd4qUULAOhPUxdjeRp0sErxaT8SC+8pXEyjXzlJ+6t6llD86vu1ZOGnCstd56qi58 A+UXtVSdKEx8cgCW9WpqCn9rXTVj3RwTyJAV2Lm1iyDzM2Ynu/hyijsI6POIJJrppSE2 ebqw== X-Gm-Message-State: AA+aEWZ7NmwJVGvFPv2ZzjPKaUf+70qDNzU6ldrHzM5uyHuPVfkWKowt ckDDN2xAkvPNk08rrECbZNe4GFqt X-Google-Smtp-Source: AFSGD/XHbeakWfqCdhYpwnkLmOi9LIVYwpYgBBCuHZfe081AW/iTguQoUqvuVEKdNIGExTiSzwAOfg== X-Received: by 2002:a1c:b4c3:: with SMTP id d186mr1324954wmf.15.1544458668499; Mon, 10 Dec 2018 08:17:48 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:b6ac:: with SMTP id j44ls2285654wre.13.gmail; Mon, 10 Dec 2018 08:17:48 -0800 (PST) X-Received: by 2002:adf:9205:: with SMTP id 5mr10435608wrj.189.1544458668071; Mon, 10 Dec 2018 08:17:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458668; cv=none; d=google.com; s=arc-20160816; b=u5niYoyxVpWQXoun076VHmt/c77Pozb0IRS42yjKa8pz/1RYFSux0RgCOMI2gkCwOt PGHUxLXV+G8p055XpxSLeHQAKRAROKOlKknODPwOjhSebFOs+uBrXLjiunmsWmLR/JJ8 9phSC3+jhHM1HL0Pxvjd/p8eOG+MbAXGh5oi58HGV2jb/D0dhrfZ6Tgb9cEhpFi/kfLn lAuSD92lpHnvJRhZ+bS4Q46xtWm/+tPrJGfyEb45SVmafjuT0khhMEZ397mcwHQWBiUb bk7gwlQq9+8h88X+stgCbR0g+BjH/c29Edu2kQu73GQc7dfFRumttZWVnc7mCoCl/anW d0UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=rlpTqVyJlpHFfIEuYuSfPKgTjg+EAGEL37BZe3O0asI=; b=jGn0Nps+DD6ZJ5HVQKckuqVZneP+4k5Kq7+DU4b8WiQgw3iaBST0QYvWm6xHj/rfh4 9afDRcjP26NmSuPTrETXEH/dIxJpi1IgtwcYHZzxmYB2cts7p52gftVu/ysO7UUErx5l LTkDZYsWQ449UtNOx0fhdtNEqUck+MiMxO6DsHtc7EoqpiwQyIckdhikylXH8l+CYEOA ILFGnHVpfulv2ctY7YfbYQGFV2EvrNxuebofR6Nkw7vGU/vg5HSLENJKjCnhwM5BleRH yaRCrLPib1IvQkgzgNJkcHxe4a8RFMTPaMLd+zpwuG81J5vh8jsjfa2SpusBcxSneWpx evgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kNb5POBI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id b5sor4558244wmc.5.2018.12.10.08.17.48 for (Google Transport Security); Mon, 10 Dec 2018 08:17:48 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:18c:: with SMTP id 134mr10850811wmb.88.1544458667726; Mon, 10 Dec 2018 08:17:47 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.17.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:17:47 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 02/17] drm/sun4i: sun6i_mipi_dsi: Add has_mod_clk quirk Date: Mon, 10 Dec 2018 21:47:14 +0530 Message-Id: <20181210161729.29720-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kNb5POBI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Mod clock is not mandatory for all Allwinner MIPI DSI controllers, it is connected as CLK_DSI_SCLK for A31 and not available in A64. So add has_mod_clk quirk and process the clk accordingly. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 39 ++++++++++++++++++-------- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 5 ++++ 2 files changed, 33 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..561de393ea23 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,16 @@ 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 of_device_id sun6i_dsi_of_table[] = { - { .compatible = "allwinner,sun6i-a31-mipi-dsi" }, - { } + { + .compatible = "allwinner,sun6i-a31-mipi-dsi", + .data = &sun6i_a31_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 Mon Dec 10 16:17:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 75 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id CE9D72E54A3 for ; Mon, 10 Dec 2018 17:17:50 +0100 (CET) Received: by mail-wm1-f72.google.com with SMTP id o63-v6sf4860360wma.2 for ; Mon, 10 Dec 2018 08:17:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458670; cv=pass; d=google.com; s=arc-20160816; b=PhWNe6k5OHDOqM9MzmPq1K6sh5kDWQDyMfv5OTT/sWelsPribml2xMzCBH/2N2GyN5 cSySTF4xNG4lqTdNdLJWT4bDQtdzCrW/FMkcrgZGtfHwP75ic81CbAsDKniSeAQnWx7c a7BITO8aw3feavXIgUxdejoU+AwQXNh2iFh4cJ08L9XP7A5pdZ+rC7Gy6GmgpCGNkc18 6yCHes7xCnH+vjNkBtIjJoyipYw5twnhrkByR9QfSRwnt6Qs3Sdj+kUTihlj4+M4n9gn /08Q/7nVLbjSwA0WuyYPNyVVIep0HU9ERWa2kp0C7SP3THTVYy1c9GdfzWZYVVHycXrz dy0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XHVyHtVc0G3Kpp5cjsZwGbecU0Xlg/ozATiwaeVvdoQ=; b=P6pS8Ln+ZqCMxTXqSyisO0CzKw0Xv1tgrxlZvGjRfwtuMw9r3ksoPR1cTtVTq5v0tq 8OYrphuQnPITlAbSvG51ylzzX2YqwqBtIRWcwrt6EugUP7CgWK6uH6g5d8IaMgddGHjU OiT8LNUX0HQoCgvRRhc9RH0zVnm+FpMq2Nx9ZY96evCLkjLDBf5gd3XHsX5o4MOuSRpV FwrBL/oK4DWo0D90NodD8SYZdIkLOXWJlXqM0WZMYWIsu3iw/wExcc8Kd/iLO8OJ2XKr 2+o2onNaSXx5NLziX7YbrGtGneoP3qhFdGqRslsxGEA7y9zLxsvPGMQEk5WXwkBc/2G1 xr+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZE9ajIXq; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=XHVyHtVc0G3Kpp5cjsZwGbecU0Xlg/ozATiwaeVvdoQ=; b=phlRkyrXrMCkl1pPkmC2yX3d2lNkyumbkF1R1TfmvVkGbVgCzwQrLm3zcLCXAb9nxH gEnwaMc5iiZTRmxBZQUKUd7ZJ2CudMRbMfQbLC284/NSntJV9Oc6WKWxaX4iNp9aWgLL IS0G1GFGFs6rM6qbt4X3rceP6i55nCJiwr6x4= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=XHVyHtVc0G3Kpp5cjsZwGbecU0Xlg/ozATiwaeVvdoQ=; b=PMmOzlyyPUkxJqUu5Ap5TPQmVp1koeVGNv2Rahd24D2lnI1Y7oT1b0J6MUubxcjkdf /+dUv0zBgtWgHKFt6dttlMXFmlmExxtwb0rTFex2oqos1yQ4erVQP6NoEgPIhvAXeujB dl2wY8MqgSdIzfpOobLd39nOxdttcN34w9BF7LGqaxHUrHnWp6tuYy60Mz89KUiBLOFv VNZeMhnIW6Pk3LQW+JCiCqoAZooaqKBrNXJNv3Y0bJ0pTqJbH6Ygimah8tFBpd5NOvCp glS447cCa2OU86CgTIXHp2HfK6r97hCzQwMxzvWCU/MtB6iVs41+ogx+fG5Rhd5jHhOX X3XQ== X-Gm-Message-State: AA+aEWZmwnn9UA5EG/V8Q68BBSlB59Ch1+A+1FyVQIQBXyIaRN1gUevV 1FmCtBmq+TIWWfoLc0dYz07CtM5v X-Google-Smtp-Source: AFSGD/VJvL+6eC8PNgXfwP+WoPymP3YMnhbt5LPlRFnGDCrimbt5nWD/BsPcde10aVklsbUeZraViA== X-Received: by 2002:a7b:ce08:: with SMTP id m8mr1447014wmc.22.1544458670551; Mon, 10 Dec 2018 08:17:50 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:da4d:: with SMTP id r74ls1847977wmg.2.gmail; Mon, 10 Dec 2018 08:17:50 -0800 (PST) X-Received: by 2002:a1c:ab87:: with SMTP id u129mr11169976wme.104.1544458670153; Mon, 10 Dec 2018 08:17:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458670; cv=none; d=google.com; s=arc-20160816; b=PsEY53RlxMRWzbA+hBJ2OoJCEBmILWHqFfOTgBo4aRNqhrmDCDRe7a7BgKmkE2gpuJ F8vDU+bgHMqPbE04Qh5UrG/kIR9osHMJCtOd8EvrjhWbIbLalGPrHyAoIDzfR2y9wJFb jldg2rRI3uwSEYRZSgnhayCdI15JsKtVnl43Rlj4w/EUpzIucSav7nTj/ZepyyXxTOt8 lLdk5hfFYDnmiluUVaEDYutjOswFM3q0j46kMhMvcwJ7QeMqGP92dxa9Cabe02Z3/rmg 6LJuGwBMowy8KVQverMaEEphEtwahZolHGBK0uGnT0vjHR24uLbgY17tBKARFppjlSOB AT1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=XHVyHtVc0G3Kpp5cjsZwGbecU0Xlg/ozATiwaeVvdoQ=; b=yj6ekE/U7ndpM0varmsPNyPBn5cyOfnnFnBW4bB9wQU9lKm6dGhYTgwOGDkGyBgQdo Obk0aqoQw3u9PduP5O3/rwDtzRBNal2MofAo4ebYEaDg9qwEp0tlBKPUEBsgJqPwYaBY l9Y9PKOg9g6Yr5QkeClPjpDd1tpLkOWvo0vGH7GRxYk3G2Jpzu7hMNmHhR/DMEgtHB84 CJdL2vcp7xL80V8/NdvCLZvNFc0p0bt/DBJWr8VhNiXXFUd0WWL0eVO4S60IsKuacf7r RkqqIqfeowsH06Nw3Vkj2lpz6yT1SQOApadH0vvxTnqaJ4OEXyKTAF02W+5nB6uRske4 jdZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZE9ajIXq; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id i1sor8171002wmb.11.2018.12.10.08.17.50 for (Google Transport Security); Mon, 10 Dec 2018 08:17:50 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:a6d7:: with SMTP id p206mr10662383wme.143.1544458669864; Mon, 10 Dec 2018 08:17:49 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.17.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:17:48 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 03/17] drm/sun4i: sun6i_mipi_dsi: Add Allwinner A64 MIPI DSI support Date: Mon, 10 Dec 2018 21:47:15 +0530 Message-Id: <20181210161729.29720-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZE9ajIXq; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 561de393ea23..50f535ae57e9 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1120,11 +1120,18 @@ static const struct sun6i_dsi_variant sun6i_a31_dsi = { .has_mod_clk = true, }; +static const struct sun6i_dsi_variant sun50i_a64_dsi = { +}; + static const struct of_device_id sun6i_dsi_of_table[] = { { .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); From patchwork Mon Dec 10 16:17:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 76 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 5A5262E5487 for ; Mon, 10 Dec 2018 17:17:52 +0100 (CET) Received: by mail-wm1-f70.google.com with SMTP id l73sf3762071wmb.1 for ; Mon, 10 Dec 2018 08:17:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458672; cv=pass; d=google.com; s=arc-20160816; b=EsqSNw7fhT9qyRlck/i2Q8/FMzXgkUPTXQsCchHRlDreDRMijFuZsTLQj0INKhjYo9 kRHKQE5TdlbZ0+H9TzVTcFJjCoa/KLpZA/5Pt/SG38BTG8Wa1qa+3oql0P7D9EXRoIr4 FU/08P4w3ek7btjOu33iTItnSlF5GXQdG6a2C06pj5UZRhP0ofVIOFs6m8+7u6RFIaM6 SMaCdfKUunBPF2CqB13MJSeBCvPMKmyxQUK2HoO3seHThdmkZoHP5D31mTAJfE6RZSqQ M//mPYjkTA6PzBxWpkIdZGhtgfj2VRMc4tuN+6yQQg91LTIRoBfiGarpAGMt/UGuQoA+ 8Dww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/FobAdk1F/zKxxqm1vIJo/CC8EUNzQ/B2arqE/fLkis=; b=rWsnAYhJHI15C0yV6AvbB05+rhuXShROPhZz9S7TFhhnvHxbPa1DH77qLGl2UBUuck M9E6XLHiYrliutCZjB+uRFWRlCac/6XoSipT0vx2OQPbn2CbpjMYKfdz7LaLXYkHQz9g tWfAFv8lYAI1Gn8KxOi/JGsqEVqXViwn+Dlc9Xlp9sbSkJmTJjMnDdCXexf9L5fUP3y6 FfoWIpn0la1sxUVadJ+iMEcMtT6cA6iF3smvhUZyH0XeXWrfdmNiHA0dGIxppRwwnrnQ HO3qwqd+p/wzUGDz2Pz8axaUi/yt8e65I9tdCxsQQkE1BAaoyIhfRdUTCWKKt738Zwqa jzHg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="O+e/8jGe"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=/FobAdk1F/zKxxqm1vIJo/CC8EUNzQ/B2arqE/fLkis=; b=qTYl36rrRDTmyk0hiJRJ6yrozXYWOAjDghHFo6Ox0B6RJDbYDB0t61ujBuBW1phhnY p/zeIchBh/ItHY55y2L++1xqzqXjc4SOFR0pL1ipGwVGSTqjl0KGm8cxlU250r1uAgsY QGTlgMZ5WUA2EnfHHJnhireecI9xYA95D+SJU= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=/FobAdk1F/zKxxqm1vIJo/CC8EUNzQ/B2arqE/fLkis=; b=mb/licq+TCO2vBxsvj+piLrP7jv6GaF7gZ2n7nVJt9T3MZifFFoLVT4SY+/OMH8JmZ Ud0fdZo/xrhfTkZmJRsvfGsvQlmg8YvATj7ic4L8y5cx2WRz8yzJ17rg+uooj6S6Bqfv 9QnmhMD/xz9BzrutkwBpcLRf82VHBGQjnDXEQrwf2AbvR6kPzfl0jAHaJTDF5EW+s4EE WlbC3vGRF3nQMAykF6apy6YROOVw9yy4PQDPidDlE4G8iWXIZ5671btDl3Rkvc08VQOU UH7xAdKqjWHvypUgVu0vvwPIf32EmCAGqi2lK6Km2ANurt6dkuNElWbgU/WCKyxQHX0A Q+xw== X-Gm-Message-State: AA+aEWbTN1Tco78CG8zJtp3eJgcDOETP7f8+epOwqOvg73/+y0PC/XIY d+RP2oNyKdJfIECETzIL3gVBQH3I X-Google-Smtp-Source: AFSGD/X72grzVxPISmjvUzOffsDOOexq10FLrHw6PDxGFasbE9H6cB69VNEWfugK8ikAtwnObH+fkQ== X-Received: by 2002:a7b:c414:: with SMTP id k20mr1390865wmi.8.1544458672069; Mon, 10 Dec 2018 08:17:52 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:a949:: with SMTP id s70ls1830972wme.4.gmail; Mon, 10 Dec 2018 08:17:51 -0800 (PST) X-Received: by 2002:a1c:30b:: with SMTP id 11mr5401110wmd.110.1544458671636; Mon, 10 Dec 2018 08:17:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458671; cv=none; d=google.com; s=arc-20160816; b=pbMjCaYodkEuOUPp5UmwCny8YP5S1nnI4A9dwxx0MZ64LSbDYQHdit5zJFuNMeHC+m +T8D8C3KebFe8Ak0Mj8mjI0UoOSgLfddgJzKUEMzNqm+VCaabe5ig0E1o7CfpOIdtS/R rS0ZC++SRXA8Anq0bR6QcnOsjIL/en3sSCzlMD8y79N56CMuP8537CIjfPmSyQdWkSUT 6NsIF5Zgj3ayjuSIoykMpkQSCnuYIVXhi9+KkDBr4+B8E9fuMx0tNyBY8ofHfquwe99Q EtblRlGmyVjf26FMukldTIUH4a2rH6G+mj9KKkDR2ACxPXyjCccfxqQQ/sa6+5B7pVMv j4fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=/FobAdk1F/zKxxqm1vIJo/CC8EUNzQ/B2arqE/fLkis=; b=0HwCNQ30QFfB+WRi64prX5hH9pmiW86MsnLm1ZW2w0/j2w2cpqI2y22DZP0uw8GInn yuYJ4SotuIJI5QLAw2EsXeOYiLFdqAR31CzaUQOigSFGPTQ2VtH4h9QF652YsRqaecfE 7rVdCzrA3pzUMr0gX2DWG7f1lm8skN1mOHRMpfdHjy8m/ep8LWSgY2v/emjWSOMaA027 TfZJEcV51NmgyYqXKx5jEJiwFwd13tTBdFZIr2MZ9vkfIgiABSdCAia8LL7zLPLZcY+K ou2uvPBp/dljUlYn5MsB0kvYjmxWIeBhIf8H6d/WWWjU8xmp/P/I+f8JlHtODI01P841 Y9zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="O+e/8jGe"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id x189sor8044373wmg.16.2018.12.10.08.17.51 for (Google Transport Security); Mon, 10 Dec 2018 08:17:51 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:2787:: with SMTP id n129mr11580381wmn.128.1544458671352; Mon, 10 Dec 2018 08:17:51 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.17.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:17:50 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 04/17] dt-bindings: sun6i-dsi: Add compatible for A64 MIPI DSI Date: Mon, 10 Dec 2018 21:47:16 +0530 Message-Id: <20181210161729.29720-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="O+e/8jGe"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Mon Dec 10 16:17:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 77 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 3BC1E2E54A3 for ; Mon, 10 Dec 2018 17:17:54 +0100 (CET) Received: by mail-wm1-f72.google.com with SMTP id g184sf4772320wmd.4 for ; Mon, 10 Dec 2018 08:17:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458674; cv=pass; d=google.com; s=arc-20160816; b=CKhenlleIYh3bWd7ZOWrrS6dSvRAOL9eiDDRj3jxBj9DIthR2p49n/V55C8PvgbEiD EpeFTIl7uC5G1e4gHxSCcAcsU40Sqwk9U7hgZDP+Yjt4AB+ZMPwsKr2baxkpJpjRYbug RhlhfZ6VdDOPvbZHgxGrX3Nr/gsXeR4gUkWtU63Y2dA7Uq0/bHUV4m5g2wo0ZsynYkkj kBfH5fq0RDhGnrchte4cxZClIJUW45h6AtBcCH3HUI929FEjhzmDYCVIxebnmzro3u7G lbeXwDWMrRBrJ0ICP3YarqJ9Vmf4/ii0VQFOxI7aEoF+7/uaDEGBeCxG91iiLalx14Hl Yipw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0G2Cm6yl0hA4By0n3opJjvWD4CEYft0z/6JnEL+u5rs=; b=VDEtJ3R+mSGiMaiBlMOivEQ5b2W67FSnSNJWstvM+fds8CF0OQB4XOTQv+/P5d2wn3 JzHpeX8P8JE/+ZZTp1cFF4UkrqArtmjATnbPUnouNQNzZfZgwrvLJhKtEM+7Tgc8ywrd p1wf8l5KaZvkluKb8UTEkFZ9i21+UXsOFd7Dm1yNCCVfsfEcaPpYDlu7+0J3NUYKofaE nUq06JNzgHCSy11WpoV1e1wYNM2kKmpagSroxuUO+wWl7gbaETUVf0CeZKQBFuGSkDfL 27KypcCsoumKOwu/mMEH7+ZVpIyR6+pXBKcyWRKBnfAUTp/nR/x/3YB50zPh9i9HqWP3 tKrg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=iUDo70yl; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=0G2Cm6yl0hA4By0n3opJjvWD4CEYft0z/6JnEL+u5rs=; b=Ru9YMp0KJCpQXAHVCpqXH74ckUPgXexf6KfmkqnDDLfFpE87W86rokDL2XS2xJNSMC lrqXr+hvo2lc4A/R3b8VYQ6jlYY5PugdbD3eiSenolKblFtE0kIKRI/tCrVVOwJCy8qA 8LGJ0xzLx/GF/jZc5wGirk/ihFEf4gd2MXvkA= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=0G2Cm6yl0hA4By0n3opJjvWD4CEYft0z/6JnEL+u5rs=; b=C71nmFeDINzTk5ee8ANfFNjz8EaOQTnI+ssa4kQPQj97G7n5aOjKgWcRjCSUA8OBEx siUUl1zN7fEYKQq1j2nfSvMO0iwG8lToJpaXSZQ5pLC5LKBedQ3cEqqIOp+X1Wpw7ocJ OnjP0X2mFnMRRQrqHH0IiFVUj1S2uU4vCuxjQbz5vXfuhbb5qzRqGI1sJSt8ndnJnWAA aKf0s6H+qzT+nqWm0WB2UklLPsha/el8Zh7Cw4r5mWxTNS7BZTCB4feIKh70nZc9JniR LiyC1DATjgG20WEaYtufjUhOzdJrK99RElWu1DThJ3Qm2/xzpUeUTmMlDbWYMSQ2KU+t 5P1A== X-Gm-Message-State: AA+aEWZqVvyXDPyVJGy1CP/TRH0DtndrZewSiHq4/LJnGXV2CbZqqRF0 8XnHtP5lK4H325VChE/V1CdiTgqM X-Google-Smtp-Source: AFSGD/U94OcaIyPyd7UnE8Hl+Qin+Xl/ZqJybfElK0sHCM8pDagQ8LSdfamtzQNH5Z1N4RjyNRyFDQ== X-Received: by 2002:a5d:5003:: with SMTP id e3mr979123wrt.14.1544458673964; Mon, 10 Dec 2018 08:17:53 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:788:: with SMTP id 130ls1886101wmh.6.canary-gmail; Mon, 10 Dec 2018 08:17:53 -0800 (PST) X-Received: by 2002:a7b:c095:: with SMTP id r21mr11483468wmh.118.1544458673496; Mon, 10 Dec 2018 08:17:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458673; cv=none; d=google.com; s=arc-20160816; b=u+AVJ4KUcdS2Srqz+dWzCIrjXJcVfRPBQF5wp6TzCkxJQkNCeecuAtlt5wi3ZrRnIb BsFPXA+Mem6I0UBtlx1Tm/iGhbA68F9u/I8sEIHBSODp22QidDLuoJ8X/OIIKfyN7+HX oFg2K1WVdAYMVWcwgV1xYga6lCNp2HnQOO1kIaiuJzU4nEcJQqpVGpUwSVs97tcSV4WG L2TNbGIOB4fKXnh7DJpna361nEKjSGTaQzEBwQX0cEu3nloK3AQqI9QgZ1UIBuhlNjRv YwFvl4qXlsi4jFLAtp09Axk8l12BMztWTi8FoZXO26bGk95wk5SWpYCOH1I6scqV7f9k ynAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0G2Cm6yl0hA4By0n3opJjvWD4CEYft0z/6JnEL+u5rs=; b=dwyckkSSi/9qKjrLRVStAubrpSYs0IPvMjId7IfO8sqIVY7YRB9qX2unBZWEaDetL2 fiLJMPBhisvVcjN8b80Bh6DPloooRJyZ6mLoVm//qwuvYMKI1qwTy5RKgT/VwvazqVk8 fcflInguvKaNS1gyHJQPZWCP4BHtDHGOFL0rba1EbgyTx6CmZwgCvOIO1SL7tDrDVTbb gJe3e8sreBFH9heRckdAGEeK4dsfSAbS/8G3B4HO2hYsjwqOouuwd0lk48tP3WQLVRF3 qYLlztnqyu+9Y8kBWfHHqh/986MQjTk5ufWPFcfUXdTyO4iv+AbG1QEOd8USdMd0ZxwL CoCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=iUDo70yl; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y197sor8060581wmd.29.2018.12.10.08.17.53 for (Google Transport Security); Mon, 10 Dec 2018 08:17:53 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:990c:: with SMTP id b12mr11709720wme.106.1544458673231; Mon, 10 Dec 2018 08:17:53 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.17.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:17:52 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 05/17] drm/sun4i: sun6i_mipi_dsi: Add DSI Generic short write 2 param transfer Date: Mon, 10 Dec 2018 21:47:17 +0530 Message-Id: <20181210161729.29720-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=iUDo70yl; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 50f535ae57e9..cdd44a1307b3 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -871,6 +871,7 @@ static ssize_t sun6i_dsi_transfer(struct mipi_dsi_host *host, switch (msg->type) { case MIPI_DSI_DCS_SHORT_WRITE: case MIPI_DSI_DCS_SHORT_WRITE_PARAM: + case MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM: ret = sun6i_dsi_dcs_write_short(dsi, msg); break; From patchwork Mon Dec 10 16:17:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 78 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id BBF2C2E5487 for ; Mon, 10 Dec 2018 17:17:55 +0100 (CET) Received: by mail-wm1-f72.google.com with SMTP id r11sf4873839wmg.1 for ; Mon, 10 Dec 2018 08:17:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458675; cv=pass; d=google.com; s=arc-20160816; b=o8Cp3r/UG2OtDzjltjtUzjgXkZlT/U8+WmIcSC/oCih0QP2DKV5irvCDsGOc4WjrxH 7v8VhE10QSFOXSTim0Ogy4PXBQXpiJYt4bUpTN2DXhnOPsMVYtmchNug8H/mhB9PCm7x Ww+Z6KwgYIaf2YgFlAKdOzHk0zQNWQHfQERADkCZCCrbs3g+A2au2P4mBmko1o2Dv4IC JAMuAQ9vkCVi+cjW9ITs+LDKtSOyk06ybJl9ty7bpsGqJXo81RASQiL/akC5rCFSiReh 1WG0LgfkY8ASo7zfiV/N3zmwvKNeD2AovnoW2vloVibRGoUdS2I2jIG0oMpGNfYdFLnv l9qw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1E70xeoJgFDlzIA3oUYjw8e22CRq5X3bSrjLQMHtvYQ=; b=qdv+SK7XZyL9ycV8q43BMsQqPciRNKphEDEYShi/Aa36LhTCGvZX8iMwcrSr9joctx B7pMS5luxdwVBIYZpCXRHqiDZWHEsXXiHz80ZOzITVa/SWu3hFrcUs2Kig7w0mUJ0IH8 wwM9oKOlaFXuvE1hv5Ph/NK5j4SIHdSWnj9K/A4j6o+X4YiZGa5/mE4LdR769u4SUj11 s34vRikQLmezJrsdz2FOWALN+ov8Aod+/1a3syPBy6exM1UVfYp8EhBCvjLXsa8B5QKN a61kAYDKupbxKmm/1F0+nXZB8pcJDZYwaJ/Ujz7HFcQyNZcllisMocN5hk/A8YulrnsB UzGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mN9suXNq; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=1E70xeoJgFDlzIA3oUYjw8e22CRq5X3bSrjLQMHtvYQ=; b=M4KH4XhRnM3kvtfoZwvlykeRwRj6Bs6BOkSXR/u8HKhr5YGw1nQpuwwV0oyhrtcyLM HnEiPQoXXlKnwGC5EavY2xpifKWMxDNdgR+vUmfthciuecZpfC6wq0+73zZppdJy/vgB sqByp4PA+toOz+9bl4JEmim4TFwR6Jo/QTU6U= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=1E70xeoJgFDlzIA3oUYjw8e22CRq5X3bSrjLQMHtvYQ=; b=GJqCGQBJL4JEYKTMN4WefEXaWPluaQK/2IpGKjfXfYp1hAHZlKFAje3/59Qe67E4bw 3UJF46lUMS8X7s25WTflD+jJc5w+b+XUgplAAaRJP8pGxWxB0CVytpk0WUJi4wNV/dfr EDUsTBCnq6+Ple46IS8IRfgUkZA6W/hSwu7lZUa5EaKtGCUb5edPrPk2pKN2dnCJujR3 hRhlHWhPpxjdJm4XzktPwLoLLDiFgGwqe7zth/KSW1OjU6AwrpHS/e7zB8As9sK1xU7k KkZWauO9Lcmdu7+caj/avVUZL2E6ZaNdyP1KRXOeGhZ+JzVRSWWgZ12xhGeErH2iTl5l SEnw== X-Gm-Message-State: AA+aEWZ0fePZkwoWCYCefBsvKQNtFpPrUPP6FRNJZ7bsoqnMBSjBaF5o 1ATePYI2e3pb3dDGN/WHF/UI8UsO X-Google-Smtp-Source: AFSGD/Wm1D2ZATClgQ/RVS+t20wnlOadrTvVVRCqfWs1XpUcjnFMfVPbEnHyYSdxVNxHnFFkJkcJpQ== X-Received: by 2002:a1c:5706:: with SMTP id l6mr1495866wmb.2.1544458675388; Mon, 10 Dec 2018 08:17:55 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:b6ac:: with SMTP id j44ls2285748wre.13.gmail; Mon, 10 Dec 2018 08:17:55 -0800 (PST) X-Received: by 2002:adf:9bda:: with SMTP id e26mr9941918wrc.295.1544458675106; Mon, 10 Dec 2018 08:17:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458675; cv=none; d=google.com; s=arc-20160816; b=wapp7n/NxoDvV7alD5WkE5uCd0F78cjWqqLtqC6NVOXcouqWx7baGifN0feG1p4Ctb T/YZMeIlE6MEAEdHYzLhbQLKPZzY9YJH/K3c+FDm8mEtEbO+Tkv6UC6l5t8AtBrD/ob7 Ab4BcQm5M2wjGAlGaPDyfVPr4XLrJoxfyh+RaylNaGJppMa4VYn6YXXRSaHdJPxcRYeA Y+fq6IwJec7QWx3H2hodh1EmgYsFEhONzJ0nRlQejO4xtXrhHSjyANoVdH0RXbL08Crf Gl77a4VXdzOdnwM77H+Au9/NppVLdtZNAbW4fs7tzouj67mVJ8escVAOHwnUkg4lDwjw jP1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=1E70xeoJgFDlzIA3oUYjw8e22CRq5X3bSrjLQMHtvYQ=; b=xmz5h1pzysRaxSCNZF6T0V9rwoA0v86gssI4WjyJDwQVPyZ1tdNJRxmBB+FjJIUC3y +GeOSieDPZiBhpgudbm3ha/QLvPZ/VnSlx27BuJbGh7XKYh38ulg1qb4VvW5DuVSnRjV yUgTAZbrqVc4WUVQ/ToM7hJfuJFJrEOoT9byfIE3A57ApqTEWpzIm66yjzXXROJ1R4jq cNmMxQJGilDYl2wjo7eAQAfgd0sSG52x632zFk23bU05BCHpmcxKS2eh/b5KGjsqhs7D jigJgCudF1rHgwwR4VAAtzBbw06T4XJxzV4wrkxopq6yV0l6DbGNLID3hckbtKxtxC0P lYeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mN9suXNq; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id l1sor7356983wrx.26.2018.12.10.08.17.55 for (Google Transport Security); Mon, 10 Dec 2018 08:17:55 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:adf:9361:: with SMTP id 88mr9946323wro.204.1544458674818; Mon, 10 Dec 2018 08:17:54 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.17.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:17:54 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 06/17] drm/sun4i: sun6i_mipi_dsi: Fix TCON DRQ set bits Date: Mon, 10 Dec 2018 21:47:18 +0530 Message-Id: <20181210161729.29720-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mN9suXNq; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , TCON DRQ set bits for non-burst DSI mode can computed via horizontal front porch instead of front porch + sync timings. BSP code form BPI-M64-bsp is computing TCON DRQ set bits for non-burts as (from linux-sunxi/ drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) => panel->lcd_ht - panel->lcd_x - panel->lcd_hbp => (timmings->hor_front_porch + panel->lcd_hbp + panel->lcd_x) - panel->lcd_x - panel->hbp => timmings->hor_front_porch => mode->hsync_start - mode->hdisplay So, update the DRQ set bits accordingly. 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 cdd44a1307b3..c9b0222ebcd4 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 Mon Dec 10 16:17:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 79 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 4D6C12E54AF for ; Mon, 10 Dec 2018 17:17:57 +0100 (CET) Received: by mail-wm1-f70.google.com with SMTP id r11sf4873854wmg.1 for ; Mon, 10 Dec 2018 08:17:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458677; cv=pass; d=google.com; s=arc-20160816; b=sA7MSKELfeuuIOHsEXRTZIj8hPVj5yh3/NTp6RoK/ci/mDiLXOhjdKVlgCbi651Ny/ iPAb8vY3HhMTXlFXRnvIc2tJuwr0vATUXn0xnYnyUjJ3aO+PgFTQOfExivFRDrAnkTA7 eyny13o1AhWOwX4z6ybKT3YR+O+WcOgeVYrRBGlUfTd6kATZaxlYDkblUYwcw07nbftT nOxPePlRsO3BOwFjsJ4WlZaTvBiaZpSDNIXKiVwd8TTcVt/SsmR8NOozAKNyOdpXySdL ChEpCqbsq9oa0da152m6DrqP81kTV1aVfhlOW4vZ3gxkpxhhwcOVS0F5gYlw4wjnsIvt IFqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TxNgORGPoSCn3Oq9HEn9GoMFiwahxDYqmWRf1K3P8O8=; b=wJpmjytatzWJ9FrWDQbjptozVgMBcpWXwurHsn+1Fv8FXoUY28ltLs4SVmD2YhKO2w 7lRDhwEYbZcPg4hVxESAiZEECgL80PkENKO6fuWj341/QOMtV2c0a/1gC5sUZfigGcTi 4CX3JfbSbEQ2ZiSQ116ozMLPLoJzEEfZL2Nrf2e8vHLzvJRErenisXBQ6VYVWMtJPiK7 MGR2sxMm0K2/looBEDlHS4jRDiwFMBOH2yIQFLjgYzYlTq4qFmoc2IZGmioNheDxmxM4 4ejjtP7KwD2ugR5y49pVFQ4dbfkdqQJJx7/zjRfvpiXpznUSzQSGrbicf6unP8mUT5Ic O+xg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lvquzrG0; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=TxNgORGPoSCn3Oq9HEn9GoMFiwahxDYqmWRf1K3P8O8=; b=Ro2SH/CqHvzbmayQbercyqqrf016K9xq7GI8kP0zPopoQKz999moX+8MkJzmyE5H+d s8M9sOV2Y0PLJRohlgKELxzn3mfQvvcY5aXTzo7eTp1/TJCl9f79D2rf19JJ+lLYg0m6 R9fPjRZ+p3Zg7fwBkeVeBGvQhWd9z8FlCC9i4= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=TxNgORGPoSCn3Oq9HEn9GoMFiwahxDYqmWRf1K3P8O8=; b=DLyj3SumunDHBe9dwkNyJwlktj23O8G5Chvfz6xv1+v4/3czpxqvMSz618CJQa8BKi DfxNnNepm8gCteXcHZVncaHmFV9UyU84DiysRYwCUAR9bfB8nphDhBNxYzz2/I01lICm vB4B0g6Tinaf/PQA6nw+UJENqNA6qNJ9wLk7fDRsbsxnmCA4r4/BZ3OyMEmW1FHARFBj X+8qRd3dqY9Drw/PH9ru6KLHm6bl9QlaLO5vBckCbOK3x3gF45Gvv0z28errM5lm3wcT COQYz0HCYkBruuozavgp164bpokvK0bxLikXRqoa+RUPkJc/zojAH7Yebt2WUGU5b4JK 0uJA== X-Gm-Message-State: AA+aEWZ9/YYyCvg+jXlknvCwbt0I7/ouo3KOwBXVgtK/eIyB1StUIa9K KLXFF/zydmbpYIXkDpKN4jxhfg/4 X-Google-Smtp-Source: AFSGD/V2BzqC09QJLMHyjF7wc3s2vVEl0MDQuueXKSjRQv99X8P7c+dhp4GmzUwPrBnm+bd7bXnnWw== X-Received: by 2002:a7b:cc04:: with SMTP id f4mr1401940wmh.16.1544458677060; Mon, 10 Dec 2018 08:17:57 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:c7cc:: with SMTP id x195ls1855657wmf.4.canary-gmail; Mon, 10 Dec 2018 08:17:56 -0800 (PST) X-Received: by 2002:a1c:a485:: with SMTP id n127mr11531152wme.15.1544458676650; Mon, 10 Dec 2018 08:17:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458676; cv=none; d=google.com; s=arc-20160816; b=ntp2CLwxH0l4VgPs/JqhudopkRfgu4BteuCDB/CdVFRA5MVlDoF/gFO+dLPPKbjfRT d5krrdHlzOHMs2wMW2KViBkMrwWk+RZ9oKBF2NMt869qdxBE3rzf7szJ5q45MSh5z6k+ KbQT+62q3ytD5cXFxuPAAlpR0c7iirei7etteYzIjP1LXS8BUdP9kkiJwOCRurFt8nrz lwc6nxinMbunAtxYmyhV8OKCuYdfGK8Q7yuvRykD6oiGukae3HD2DXZkSXU+1RobEHG7 EEF+1ouVNFQF51BL6AHEg00G2s2iOzPzyMGwbBZLUMJ4bdcExTUfFebKwwwrb3D7Rntd fG2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=TxNgORGPoSCn3Oq9HEn9GoMFiwahxDYqmWRf1K3P8O8=; b=wQEP4Qun8588VQ+Isy4plGfHFlrSiVBRCKdqcx0mwDF86d/qDYdFaasx5QkdVHvWvP pAH/iRbSYr2tggiLuRZLLrB49uRoNUYyvfW7kDg1CJg7IyUz+DiPn2cE/E7SlTO/Sljq O/I/JNlZYhsmLgMG96owc/ZnAiJ1MxYpeo9g2EG+cknzboSR2XF/1Jkd4TysDnASKjIW lEJ1x+r8c0tx36HkMu10lPryyZCAltbkArreznDMp4jc39a64k7DQnUb/EtQY7tUW+Jb SndBp//OkNrifaiFbAdz4KRambfQlmKoP/v8Th/N7XB1SRSp0V9685zvMb43hovI0w3n 9V3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lvquzrG0; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id o4sor7564439wrj.2.2018.12.10.08.17.56 for (Google Transport Security); Mon, 10 Dec 2018 08:17:56 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a5d:4c8a:: with SMTP id z10mr10124004wrs.75.1544458676335; Mon, 10 Dec 2018 08:17:56 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.17.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:17:55 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 07/17] drm/sun4i: sun6i_mipi_dsi: Refactor vertical video start delay Date: Mon, 10 Dec 2018 21:47:19 +0530 Message-Id: <20181210161729.29720-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lvquzrG0; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Video start delay can be computed by subtracting total vertical timing with front porch timing and with adding 1 delay line for TCON. BSP code form BPI-M64-bsp is computing video start delay as (from linux-sunxi/ drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) u32 vfp = panel->lcd_vt - panel->lcd_y - panel->lcd_vbp; => (panel->lcd_vt) - panel->lcd_y - (panel->lcd_vbp) => (timmings->ver_front_porch + panel->lcd_vbp + panel->lcd_y) - panel->lcd_y - (panel->lcd_vbp) => timmings->ver_front_porch + panel->lcd_vbp + panel->lcd_y - panel->lcd_y - panel->lcd_vbp => timmings->ver_front_porch So, update the start delay computation accordingly. 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 c9b0222ebcd4..cb41fea4f3ee 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 Mon Dec 10 16:17:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 80 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id C9F502E54A3 for ; Mon, 10 Dec 2018 17:17:58 +0100 (CET) Received: by mail-wr1-f72.google.com with SMTP id j30sf3638854wre.16 for ; Mon, 10 Dec 2018 08:17:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458678; cv=pass; d=google.com; s=arc-20160816; b=ZuviMpbgMs7BdLkc5HtzHwS7e/oCkSsG90nkCwG1J4bW82uXA9FvUQ31X3dhBQZH/7 Tj1vXudSJTrInnnGjupQ2Rg8O9XtMCnrREsKii7lFbbRDjvBfjcP3+A/1y6oixxp8gc6 B0wMK8iR1Ew8oPqvCoaSKc69wLfpUFAJW0of0iVoX8ZntxnwFY6tlYoOOj009euhFIxg JkXSPSPCTyIRMlwelpA/a1ef9H4HU9UaAAOB1K9YQtgXRheVataXBrqvdvky8oo8+lRn crJwkeZk4gUfgkjUlVVYFoPu9sLE2zshejXsPvDqqX/LRR8n+SglySooCYRfqlEwyU66 NCkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=htHh1EHvwq+E445n98FFCiPzlmj0F1X/K1ZswWL2Ewo=; b=j+2xZVCTFe/dHW53phOmbr14tpPOyezi5axcHU0RsR8fC5q13ljRP/Ke5laxR2Fs/R Acbjlx8vZ7ocKg2skwDdejaRIA6JBx3yeD0Nn8rezW/nb5czX9uSchkydF70CT+muJC0 APT/nmkT8iZ5NzGAc1E4XfJhC3TbpnvBqaKggz/ijjM/CjxYRj7/hpJSkQPC94Kt2+0P v4aW4ClySxyzBot9tIiJ0PWB8uQ5mkJiPJX4Yo0o5lkrSzDycvvfU4/4e+PW3fmgf/BS Uy4/ixMaYxIeVdhAhrVqT32PfAqh6972aotEAI49blHzpfbrFeAdsE8D3HpNCt1dgf4k xHUw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZED3XNr2; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=htHh1EHvwq+E445n98FFCiPzlmj0F1X/K1ZswWL2Ewo=; b=gKDZu5UCSdlHFsBvDfJlmyd4TFl+3NVnlQTuwODw689YSlzLE4tFBVc8E6PP/4ajvV no7dAJQZPw/D96Q81EIXFimaXDRtaHbECecJ6AeaFp4kDc2hkRhqT2d/MhRA8I4r88Dm ve2hgsHX9fl6v209i+gQEbmsqTDigzaINieEE= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=htHh1EHvwq+E445n98FFCiPzlmj0F1X/K1ZswWL2Ewo=; b=f4Piq/nm7UQzHE1bZgQ6ETjn0shwwEigeb1CbITPfDHTf7CDxEwztgnZQUV4AlnJP5 vlHmP5OAeyW9kEtykv7pEc+CNHFq/0aB7jjXZS5gL60rzcW6k6kBJkkx7pXVpn7M7ZoK 9bcbY07vZyrUtbUBKz3djYencfjI8okx0h0pmE0QmKMmoWZ46NlQrGSKu3Mj3z/6GaiR k59xlO3M3ZYx/cKqShVosAyoMqkogZYgjF9vyeQQJLusxADpsFIz4iIm5SgWc1IFAn+p OAqjEc9DKwm6+Bqb5LdlrEWX0LJQCMmEzdOJb+I7Vznu0BqyrBp2rz2hWo56tA+dALY6 uOfQ== X-Gm-Message-State: AA+aEWYmuggou5ZSISXvA6biiQiKO9VRdqt5kh7nZvJBSR7n+ba2nX+b 30V7t6xBlY6vAX5IRq5/50/nC7+c X-Google-Smtp-Source: AFSGD/XcWvaxHtb+R3lRnEMfAg9hYzx2WkHP2jPcwBUoKc8aVHDWhJq4ug1B+EMKcp6ymz9rg5kR4w== X-Received: by 2002:adf:d14e:: with SMTP id b14mr937538wri.16.1544458678563; Mon, 10 Dec 2018 08:17:58 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:9d28:: with SMTP id k40ls2255328wre.12.gmail; Mon, 10 Dec 2018 08:17:58 -0800 (PST) X-Received: by 2002:adf:9323:: with SMTP id 32mr10282427wro.213.1544458678146; Mon, 10 Dec 2018 08:17:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458678; cv=none; d=google.com; s=arc-20160816; b=QC61V86JkZbMw4BPyW5pgkk+lI5PJtp4bbwW+AM/17b3lNvtesHSshRYsznv218Es2 Z/vdvKyn26C8dDuQHr54dCVesEGk4K3RQomYuBKs8APmAr0j7wch6/4vKhq5KDoCxkZH cH4qCu0Do8wRy4rj5SINqAUVU+7OIMxDpmSpnuZQUevA7Vh6uX/oj3PG8AkMD+vKEz4m u9EWJoPryI2U8qMBb0fOILntowJy2TCfKfdpugbTzdX2ROCp7NyHll3z0j0Muouh5akE 1YIldM5GWJemtYen3cKRiB/MXlxtZ9fd91v+6p/3jeNew09XhXBVqMFyvyWZK8gqxdk+ uoGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=htHh1EHvwq+E445n98FFCiPzlmj0F1X/K1ZswWL2Ewo=; b=Y52IvLB3FR+MW/+js9IBP7ZE4SGjSS2JzoQ9uDPEhPEzsruql20wBUvIBtfVLmXdq5 BmjJakR+5YntWU3MGU5NIqeHayRopSx8K0Zi1Yp46tJypGB1u0GCXCqriSmG1bI4qPTK KgJR4CBBEq2nuT+Com6xhHefk3gIjk723lk8Ng2vijbtiLqOB4XAx4NejTmFnJ4bma4h mcYGRRudUXMyLHxW1XnIBquKDgbsH7TRFdDaIBJl/U0bi2/PRC8SaNZKjLviB250EbAs BKA+W8+f33MUN5p8Oj7oCeBMS+Ia9tO1bPEEKALY5xQZYby5ai6MvEOfGwtLxUN8nnfL GQaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZED3XNr2; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id v18sor7513672wrn.45.2018.12.10.08.17.58 for (Google Transport Security); Mon, 10 Dec 2018 08:17:58 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a05:6000:110f:: with SMTP id z15mr10003279wrw.136.1544458677841; Mon, 10 Dec 2018 08:17:57 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.17.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:17:57 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 08/17] drm/sun4i: sun6i_mipi_dsi: Fix DSI hbp timing value Date: Mon, 10 Dec 2018 21:47:20 +0530 Message-Id: <20181210161729.29720-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZED3XNr2; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Current driver is calculating hbp maximum value by subtracting hsync_start with hdisplay which is front porch value, but the hbp refers to back porch. Back porch value is calculating by subtracting htotal with hsync_end as per drm_mode timings, and BSP code from BPI-M64-bsp is eventually following the same. BPI-M64-bsp is computing hbp as (in drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) dsi_hbp = (hbp-hspw)*dsi_pixel_bits[format]/8 - (4+2); => (panel->lcd_hbp - timmings->hor_sync_time) => (timmings->hor_back_porch + timmings->hor_sync_time - timmings->hor_sync_time) => timmings->hor_back_porch => mode->htotal - mode->hsync_end So, update the MIPI-DSI hbp value accordingly. Tested on 2-lane, 4-lane DSI LCD panels. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index cb41fea4f3ee..81151d7633f9 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -482,7 +482,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, */ #define HBP_PACKET_OVERHEAD 6 hbp = max((unsigned int)HBP_PACKET_OVERHEAD, - (mode->hsync_start - mode->hdisplay) * Bpp - HBP_PACKET_OVERHEAD); + (mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD); /* * The frontporch is set using a blanking packet (4 bytes + From patchwork Mon Dec 10 16:17:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 81 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f70.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id C714A2E5487 for ; Mon, 10 Dec 2018 17:18:00 +0100 (CET) Received: by mail-wr1-f70.google.com with SMTP id y7sf3592785wrr.12 for ; Mon, 10 Dec 2018 08:18:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458680; cv=pass; d=google.com; s=arc-20160816; b=w7JA2vH9iTOsioIaXUYIzrQNd/oHwwi99NoyH1d5emVLPVYP4WyzTvVPswHToNzFzG evIjRIJIpfoMsKmOzxEauNB9lV90IeJ4aE9doanpHKl1bYFjnIUbzy7RT7E8QLVhUurg NTD291sghseSrfFo6hEXZbRx0yl91i/yrf+h26jMDXezvojRX/JLxJUAC04UcVe0ftHy nQlR+6qdVDAKcIvbYqXd5EXafmPJNShaEiW+gcrCGFeYlE2z7nrkr1Qr3Bh8c1Foj37N re2UWRnl9gIOApYi0k+QJResK78ugOBzHJt4lrAbDq+2tz1ylouwHBH9+APQvZ6DE5sl oMoQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oiAA/cUEr092LynkAnVQtsmpFwj1u/ZrP8Y7/2WzfF0=; b=Ethw8Fswk7Cx28Z9aCkrcl1COKFWGXj1qWjhCFHgjKRori4uoQJgJa/jIG7RlOao4I NC4gsJCctgubuf1ol5l8JL8KLid/sdEay/oaB3U1l5nuKcMp0yiZFI9qdPwHvTbx+VNn ACAQ1av0YfKgG4YfZWo1bM7OnnWmTF8v0Wk/5snimgi4FbeYz6IjVm6R14x0vwIdT3OQ eUeQ8Mc+qZ5XQJmQHZDi7chjiiLCVlH/r5UPqXhWh3+yp8S2evTeDwCjJ8iAagCYi422 13pOx79A2VTlMWRVITEnz97FgZLc8TPMJ17UQ8V+OeSZQIDUXjMzr7vX4+3F/k3X2NpK FMDg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Fby41GOV; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=oiAA/cUEr092LynkAnVQtsmpFwj1u/ZrP8Y7/2WzfF0=; b=C97vd3JxR5HW0gWapRsri/SstwJb+A0ffj4bTcAzuthjkNvo+2tXJV8wmERibPYpfJ OlxllqkxvRpWYNGBHmWDp8jGvhUyoPrybzZ2ivrQh1u6xfuT1u5nHc82MpSpdNN9vj2V VUKdVKdkgO6nqCiPK3I6aq7oXeE6HJFl4/nF8= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=oiAA/cUEr092LynkAnVQtsmpFwj1u/ZrP8Y7/2WzfF0=; b=UWL3Kru38C+lEh3BgyB/D0UL8P4Ht2yangHK0yKDfEpQG7Gdmsm55EcptX3NIG+fwC a2TXj8bsF1limB/MxaICEq5kz3TTuVp65Xx+li+cpIRU4fS95CaIzMKU7EJw8Ph81EjK 4EJV2tZLOFC5Be61ByQyuLb4c09S7BtTUm8pVGh1a+mYnic3kjI9kNh0bRlukiCoEjc9 v2gJ+ZJZt3BApjum19H9taAEJ4hE7dijx1qlizFfXQ2dTaP/QtMwkjfUJ5rygyGxU+Lg nAo3AJz0PK+CeYooi+nMFIvaiSO2EK+kKFKNUzq/sDSkdRBCXikIvqQ9ZvvH+UoOKM/+ tg8w== X-Gm-Message-State: AA+aEWZ49X07WVHsrPd5evmG/lfk4f6ERWG1aFTFxOtZgDVrpvlKanCc du71hVa//2lU2NzH47QFhrG1BUTX X-Google-Smtp-Source: AFSGD/WRg3YQeeQQ1jNFJ7vzZCI0kG2Rk17LcYXBWcof0aCA4slNRr1tnQG1+VNk1XN2qoJz9+3hYg== X-Received: by 2002:adf:f248:: with SMTP id b8mr997305wrp.9.1544458680510; Mon, 10 Dec 2018 08:18:00 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:5148:: with SMTP id u8ls2256218wrt.17.gmail; Mon, 10 Dec 2018 08:18:00 -0800 (PST) X-Received: by 2002:adf:ebd0:: with SMTP id v16mr11060179wrn.109.1544458680101; Mon, 10 Dec 2018 08:18:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458680; cv=none; d=google.com; s=arc-20160816; b=zCCAbEP7uHIwodpyK1rEGaukFhJGwzBbcSquJfz2yTjXc01DgXSZsCsmEHVysWFdYy z+ZRlmMToqTTpxMVWVE+iPvAEqASyN627iskMQ/G8MbYFdxa30EjbLrX61nLHMShKmpN IPDEs3sBNiztioIH6HafoTZ57ih4+ALDGqT2E12Fu8PRW+N0piEvGgIWVZzXKAVQ7Ymo HQL8/zPMKUox3HAPTV4ElvB+VOCqlvyS6kLoBienxXsedH5T9bPm0/E6DiTP0JIlYZGe 2FD05096X6YoFC2fqxhRrDjtVlA0sbVuDN6vvNBson4cKH06komTDgy1nzwHEuM3yHLJ 2TMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=oiAA/cUEr092LynkAnVQtsmpFwj1u/ZrP8Y7/2WzfF0=; b=iFljqNJuVFj0YZWsXnRImbShGEWLTPz/5mwPNsmgZRMbTn9fvcmSN+pQomv78JsWNV EuCT4tT5sV2Z6lDVbDHbyyoMWIFU9S4GrcmjlP/W0RkWFcRJojgt0OkaRP3HlyDplWBl eOkdCpZKIlVzLpjmpaV9+sSLh4gdHQ+AFTnOti6lGTzNa0kSLTL565GbGwi2DakqpFQ1 9IqYqZqchDZF5jz11I2w63NdTT+/BF/ab2GM1DOUAxFJKnzPfQkcSYd4KbIAco2RWDs2 bSeE5DgfysbjE3UTxwWr8gKABXdAhxUm3MwnYz0j3/iUqNBjbDZx+Zl22IqWjsoy6e9n j49Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Fby41GOV; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id w136sor8055142wme.22.2018.12.10.08.18.00 for (Google Transport Security); Mon, 10 Dec 2018 08:18:00 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:de57:: with SMTP id v84mr10923097wmg.55.1544458679797; Mon, 10 Dec 2018 08:17:59 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.17.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:17:58 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 09/17] drm/sun4i: sun6i_mipi_dsi: Fix DSI hblk timing calculation Date: Mon, 10 Dec 2018 21:47:21 +0530 Message-Id: <20181210161729.29720-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Fby41GOV; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , hblk is adding line with all porch timing values, or timings values from htotal without sync time. Current driver is subtracting htotal with hsa, but the hsa is bounded with packet overhead. For real hblk calculation needed by subtracting htotal with back and front porch values and BSP code BPI-M64-bsp is eventually following the same. BPI-M64-bsp is computing hbp as (from linux-sunxi/ drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) dsi_hblk = (ht-hspw)*dsi_pixel_bits[format]/8-(4+4+2); => (timmings->hor_total_time - timmings->hor_sync_time) => (mode->htotal - (mode->hsync_end - mode->hsync_start)) So, update the DSI hblk timing accordingly. Tested on 2-lane, 4-lane MIPI-DSI LCD panels. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 81151d7633f9..4c95b3384ed9 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -495,7 +495,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, /* * hblk seems to be the line + porches length. */ - hblk = mode->htotal * Bpp - hsa; + hblk = (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp; /* * And I'm not entirely sure what vblk is about. The driver in From patchwork Mon Dec 10 16:17:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 82 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 6C4612E54AF for ; Mon, 10 Dec 2018 17:18:02 +0100 (CET) Received: by mail-wm1-f72.google.com with SMTP id p16sf4861507wmc.5 for ; Mon, 10 Dec 2018 08:18:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458682; cv=pass; d=google.com; s=arc-20160816; b=bfY2O3b88t7qJL4ToeSc4PTD2caVZ18NpmW6LJuq+5jj7Y1yHHRuz2UMrrHl9MzEK9 TQ63WaPSbpHk2pnDP4htmyBdZQE4PwtBbwOZH/wTO7ZuYpr4xj5pbLrK4MKpCTPLotuS HBuyNHyqTXHiwNO/G78XNEWZXpjMb5UARD/+IS/jmfdsGkbLyu9wgHvGHMG4kz0SvXyy CJ5W9lTmRDdQeFyybJjObYFdTttsks2Ul5SAD9MFsoosmyKBhaTHHANTOjvJ+CpkEuEd V/a8qRN3xlkQDG2sUXFf2JhSoQNS9mE3qXF2MCQA1op1kzMLT2ugBFayZIY9eUmAwZTp iQ5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7B7/bFXR+1ggUu89xO8Gq2xSzsCKM6R16uBfSc/xhAo=; b=wFMiTRH8Oapj69ws6Mx/5/WX4hAdGl1y2xHu11+mZZ6wB2ux33ZFtD1hP3vP4/oo5C bcX5Ix1FcoA+Cpak8IeyUPVSkbMCBz5fZ5JtOq13Uoq7ee8G3DgBEqFoXNJ7LA2MwVIb CJxpH02O0IlXUQuHBy+dQWb4sx4PtY6KMOLCiPjpnJ/ovX8SpnI8cd6mIojCUuPFgPK/ LBS2sVcenzCs+u7ircZ8nW4r4Ikd+CXP3SfVmhPqRBWqS8tkNoWam1Rm6nS/cUZdvO7j rt3onBqlacYP1ExrQCdqE9XUSzEC8IU2vFXvZCbDDT/FI1BhhLYQM9kjLJ0eKZcDPja+ 1Y6A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j64vC5c9; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=7B7/bFXR+1ggUu89xO8Gq2xSzsCKM6R16uBfSc/xhAo=; b=qoCO0KpsRPkulLOkpaEXKwl/2a6JPier4a2U1nnbF5uqFFnNiMAevGDwJdk7IZkEVW uEUWfOY71VVCtyc+Z1qezsteafPxoMfmAuYBrKyR7tAWKWYnaTptG2ao2R9aRZ/wHV1c 3D3ITiVQuikFPLgLcosT0Q7CtvjkRWcOfti1E= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=7B7/bFXR+1ggUu89xO8Gq2xSzsCKM6R16uBfSc/xhAo=; b=rXeyy5r5xuqyoJnJpchIja68wrjfjfAlrBQtQPozLXvR4WlDX7P1cy5+c836Iuife5 IvcXgvV0dBWAhGDV9/AVEUzeMckc4qVq6AHzRSBSqhLj0xkx1D0jQ47VgTI17D04C72E Y455DWkgUzl5JkL4Q3vprvi3MFAeDxsF6EsDuK4VAUwLLo2m677E3bLocHFpB1FLWNPm xdUT28KIMo/ZKwrXw+gr0TcqxCPvEv72dueStKb7z7R1sQJYhLJe8uP5DHiXVvGzoAq5 +fe93YCmfWsUu0WXkjsLZVd3F40nXkLw41CHr/nYAOAiE5bXvWzmjcEuoEcRNNwBnVMv oA3w== X-Gm-Message-State: AA+aEWZiFadbOnLHkP6MMHqErWVmWE+SLD1YjPlbrS50Fc8M0jT5qBey J75AYvBAn8pNYnGei+urvuxNwPy8 X-Google-Smtp-Source: AFSGD/UkP02urXd7DBLePWrLVZxLFIsrlA2iNHMMqhLPhkf9Fg7vXEXma/IDS0C1fsSV1y9vp0fDxw== X-Received: by 2002:a1c:7e45:: with SMTP id z66mr1336914wmc.12.1544458682129; Mon, 10 Dec 2018 08:18:02 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:b584:: with SMTP id e126ls1885571wmf.11.canary-gmail; Mon, 10 Dec 2018 08:18:01 -0800 (PST) X-Received: by 2002:a1c:ae15:: with SMTP id x21mr5550471wme.146.1544458681732; Mon, 10 Dec 2018 08:18:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458681; cv=none; d=google.com; s=arc-20160816; b=kuC1Znz28vb6HY9rRZ3bxCGflEMgSaeFEOMCiJJ22CnjvRwuYlNp2PO1v5I3WT45rG gJvO4ld49taj3NA3d/6e6Q0gDbeHRrUQnGHvmokXUqKmi47W9VrVzzG5dhjfMXsCPvkg Trnyddqf8j9GFXZG4M6W/EuzI/XXYCkkAMuggq2Mb9ZGoSCE19rKvwCw1zgzWC0GymFE rcO0pmq75xL3A1QG0fq4g0D757xWuqy6byGCI/7/uzrB/f68QfUJFMtO+e1BoQR5Dvds NTP2Hl2FiD4eneEUICNECMs+3LIK4RC4hvs24RQFdMuQEpJirNDev+hJ7rFpCU/OjE6U Mdiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=7B7/bFXR+1ggUu89xO8Gq2xSzsCKM6R16uBfSc/xhAo=; b=0+RgdpVnEwTpJ9NdSufjgkqA90SYneFOzxiHJ2uSOT1afrGAf4m8y5eNoPMwyDqeIV l4ApVeo1HJhGZ7qhzpk+NW8p0wcB2cwjs/0FeNs79BHT70R3KRphuGu2x+U6oDyQLtzx 9k1Kb64e25zOiurwiLMXP+gt1CfvH+LZ8BT3sEMicuiE0GQLguVx7bPmm33wyLqpEcbJ oqEwnPG+Cy30um+2pLwSZ4W8HD2pPpSIpvVgcmBXj4mQnqd9pJQewls4XS706xjULAHp HTsPE8PpFXp++8Bq4LmnyVo8xJ8SEB1yPgfYtgjjzB4USzM5RIqJ72scdWx8IJ+0vm0l oqGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j64vC5c9; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id c190sor7642312wma.21.2018.12.10.08.18.01 for (Google Transport Security); Mon, 10 Dec 2018 08:18:01 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:d7d3:: with SMTP id o202mr11936226wmg.135.1544458681432; Mon, 10 Dec 2018 08:18:01 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.17.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:18:00 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 10/17] drm/sun4i: sun6i_mipi_dsi: Add DSI hblk packet overhead Date: Mon, 10 Dec 2018 21:47:22 +0530 Message-Id: <20181210161729.29720-11-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j64vC5c9; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add 10 bytes packet overhead for hblk where blank is set using a blanking packet like (4 bytes + 4 bytes + payload + 2 bytes) This is according to BSP code from BPI-M64-bsp (from linux-sunxi/ drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) dsi_hblk = (ht-hspw)*dsi_pixel_bits[format]/8-(4+4+2); So, add 10 bytes packet overhead for DSI hblk. Tested on 2-lane, 4-lane MIPI-DSI LCD panels. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 4c95b3384ed9..07eba9ec469b 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -494,8 +494,13 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, /* * hblk seems to be the line + porches length. + * The blank is set using a blanking packet (4 bytes + 4 bytes + + * payload + 2 bytes). So minimal size is 10 bytes */ - hblk = (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp; +#define HBLK_PACKET_OVERHEAD 10 + hblk = max((unsigned int)HBLK_PACKET_OVERHEAD, + (mode->htotal - (mode->hsync_end - mode->hsync_start)) * + Bpp - HBLK_PACKET_OVERHEAD); /* * And I'm not entirely sure what vblk is about. The driver in From patchwork Mon Dec 10 16:17:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 83 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 532C42E5487 for ; Mon, 10 Dec 2018 17:18:04 +0100 (CET) Received: by mail-wr1-f72.google.com with SMTP id j10sf3606709wrt.11 for ; Mon, 10 Dec 2018 08:18:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458684; cv=pass; d=google.com; s=arc-20160816; b=KIT7Nbr5pTA0Ha6JqZGXlRJP/F1IA9mAbl12hjJ4a2IwK1o2Q1T0UvQvsvLNTAr601 cq+eQjBUGDuob27ly0neZV4xVcIJt/uxkHp0P6b1SoV6vk/1s/lE8gAACux6grHKs5Oj bUW1jxbk1/YRBpNIKLHasyb0BSTvJkNmQoPYuNjO9y4Y5LmdDL8gJVEi+SlaQ7XcIaqz p5Q++dyC9NyaAqvy70a8uUrhLbefkBQE8bPid/qJXqmY3XaVjb3m+g5MQyLfABDVA1NN LtH13Clpq1LWZQD09GrzEbVbA79EUosZ2ZVu2LEElEYu68B9FHgCs1bmqCOsqvwWbY5d rzAA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iu6bo30lI7sS+xNVJvtG33E9f/2Ed96R3LMOZkklEQk=; b=Z/vaNrUzUhnT4tcIt+mGs39IKW32feCKYTgdE6w6QcM5owuFFLSqFhcfcTm4j6VMf7 8OniETi1IfmOKUvJCYiiqzkBMl8vF9E8Z+ujqmN4jJMy4MB2Woxe14ajR8WcDEYu11rf mwMI3afD1G5SgqY85DeEh3MVuPtJaaH8NA99QjLLlaZ9bBNPchewNYsrFg7H1wB4laWx H2fLQrDWNWUMlXyAatusL1NpW+/iJMN9Uncqt9Ev6j5pK5e75KjStXFm3sLILLK9JCWh j7MWk98+JSeJ0HUM+o516IqCUrNr3JO4pOR+jHf4AMB/Nu+KX5Xe1jCA/9jiOhyoVIvn NhbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="V/ScvD53"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=iu6bo30lI7sS+xNVJvtG33E9f/2Ed96R3LMOZkklEQk=; b=qYDqilpAB88zPJS9qkaIpxAArV2i7RdjpLCjcF3wHpKwo2Ayh7rTMlrEZUiuJz/Fz4 5M+gPWnK98e3/1z3mgmaqQmpHBEzv4lLxav1J2SsCCEZzfKG9bt+fhZpZ2OW+7OiIBOW p8pzbn2EhKNl0Q1pY7mBxGerl0q13g4zewHo8= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=iu6bo30lI7sS+xNVJvtG33E9f/2Ed96R3LMOZkklEQk=; b=tAqvVamINofY26/JciyXI2BHLpDZT+nlc/FIlpiFUAzCfiYRhvCN3FYA8w2UjLp4Ve FBonrZF1MSPoiRrHqFoNw6gl7G0bCwx588XwQChfh/CuM9UvJJx2L9pJaoi+B65O4sDo EbhzXf9srpUo8jVMAm14plijL948Tm+1Yp0KwGhAlHFMrh7ge72mj9KBhIwLRY0hzlC+ iQam4VpCXAfegno3zpiN2JZn8VcPxjLTZ1RbRT4j15akX0Xt7sltTQx35riLbp4FAoET BXqtuKOKG2nJZaOP9XsbpyXyTnYQOIXs6b6HpVXnESfzgLxnf6uWsjqmqtgf1kMMqGmE EkOA== X-Gm-Message-State: AA+aEWbaBv26XfEmqmUcKR9S8fcixLVBmfwa44BjWMpY7ETkqlRzrQSK ov7SM+fK3KkdSju36S7fyQKTJicR X-Google-Smtp-Source: AFSGD/Wa6N0PfeLiH4WqNDHUYZcTsW3gYZjRQepPkEfKS/tpsNtjbUEHGEh986Lpr6kOo2ysT7nW4w== X-Received: by 2002:a1c:8794:: with SMTP id j142mr504219wmd.3.1544458684029; Mon, 10 Dec 2018 08:18:04 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:8186:: with SMTP id 6ls2258685wra.9.gmail; Mon, 10 Dec 2018 08:18:03 -0800 (PST) X-Received: by 2002:a5d:44d1:: with SMTP id z17mr10107611wrr.271.1544458683570; Mon, 10 Dec 2018 08:18:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458683; cv=none; d=google.com; s=arc-20160816; b=wNK3BD/ehMXipwuchH71ARkhP1AB4F3pvkzo2Cptp51BZYpClq7m5ypryu/ILo9l+8 WY2jQaOsuA1ngJPMt1BQXN3Y8UtiW8o1BB4z8QmiSdqL1XxaATGfdELCXxbh7GFJWcZk aLrkzTi0gP/KQmR2W7tKhI/mqHvlpzVQ/X28aTKzdf3mHolUIFWvKPZRuc2XDxGNHW6e cwN/QmBZI4uMR6vCCeYG45ESODcVD3ixQODpXeqE884s9fTwtrEsqSZbhkdO2IxDgNRG 2DOVMsU+xjIEtPHjtZi44XIDuRLeTHlFsJ3xS5aE2toBBnJs+zKe2moPEcJudNoPnVUQ VhqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=iu6bo30lI7sS+xNVJvtG33E9f/2Ed96R3LMOZkklEQk=; b=g5u4R9+GHLAy2QFvM9fdSI4QMs8N18aVJ2xDqMvFOTJNUKkeNGvILtsKjIAq+dwa9Z 5QjXVYHkYq+8rDen7tQ03iVG0druzcR/8acnkHN+PcL21mf+XN4n1N3kqqvqhLtLqkFr quUUJ4dIjAg3iTzhNXPZVn+dmt8GOYuQHf07eoA6s5kyRFsy7D63iMCKwxKsjjuqav7/ Pahv1efBDRmgb0wlGqYFLk0lzoRwgUkmXhbqhjrjFBLcTgBdDe/jhIuymFPh+EfRzAW2 KMo6zQ9oam7OYj5AiZeSZ/eNnKMrwn431jWqdKUDmIpjcpk3f14RmfGL/45SRG1XAcz/ I2zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="V/ScvD53"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id h76sor7752610wma.28.2018.12.10.08.18.03 for (Google Transport Security); Mon, 10 Dec 2018 08:18:03 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:e3d7:: with SMTP id a206mr10879717wmh.77.1544458683263; Mon, 10 Dec 2018 08:18:03 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.18.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:18:02 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 11/17] drm/sun4i: sun6i_mipi_dsi: Fix DSI hfp timing value Date: Mon, 10 Dec 2018 21:47:23 +0530 Message-Id: <20181210161729.29720-12-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="V/ScvD53"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Current driver is calculating hfp maximum value by subtracting htotal with hsync_end which is front back value, but the hpp refers to front porch. Front porch value is calculating by subtracting hsync_start with hdisplay as per drm_mode timings, and BSP code from BPI-M64-bsp is eventually following the same. BPI-M64-bsp is computing hfp as (from linux-sunxi/ drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) dsi_hbp = (hbp-hspw)*dsi_pixel_bits[format]/8 - (4+2); dsi_hact = x * dsi_pixel_bits[format]/8; dsi_hblk = (ht-hspw)*dsi_pixel_bits[format]/8-(4+4+2); dsi_hfp = dsi_hblk - (4+dsi_hact+2) - (4+dsi_hbp+2); Example, u32 fmt = dsi_pixel_bits[format]/8; => ((ht-hspw)*fmt - 10) - (6 + x * fmt) - (6 + (hbp-hspw)*fmt - 6) => (ht - hspw - x - (hbp - hspw)) * fmt - 16 => (ht - x - hbp) * fmt - 16 => (ht - x - (timmings->hor_total_time - timmings->hor_front_porch - x) * fmt - 16 => (timmings->hor_total_time - x - timmings->hor_total_time + timmings->hor_front_porch + x) * fmt - 16 => timmings->hor_front_porch * fmt - 16 So, update the DSI hfp timing accordingly. Tested on 2-lane, 4-lane MIPI-DSI LCD panels. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 07eba9ec469b..d8947be92f9d 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -490,7 +490,8 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, */ #define HFP_PACKET_OVERHEAD 6 hfp = max((unsigned int)HFP_PACKET_OVERHEAD, - (mode->htotal - mode->hsync_end) * Bpp - HFP_PACKET_OVERHEAD); + (mode->hsync_start - mode->hdisplay) * Bpp - + HFP_PACKET_OVERHEAD); /* * hblk seems to be the line + porches length. From patchwork Mon Dec 10 16:17:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 84 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 617852E54A3 for ; Mon, 10 Dec 2018 17:18:06 +0100 (CET) Received: by mail-wm1-f70.google.com with SMTP id y74sf3762605wmc.0 for ; Mon, 10 Dec 2018 08:18:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458686; cv=pass; d=google.com; s=arc-20160816; b=TGcwZ5BGirkIYKPNxk2rrlHSS2KnWLmKah5etKbx42PRlmCD6WlPdYK0TypMGkylKS JStwvZpmnt+HUNFMfswt+SyhHD07zeLfesjrS45emTT1kTCJW03vbnUVzsKZcmXJysun rfPIisUGoe9GMKldV40fNWQS386q+lrRkzK/Sc+dNVW6ptOTjU/7tYiV8iwiLEWNpkT0 M17nf+qG5OadQqLSmf0PKiX72u3Iu1vDGGNPu7dmkwH3eWJdFaFmEZGIK1RVkr0b2Dfz SbtOAEKxLEpZw6n0UkPlt1TGIapd6vFilAUJnCTEPscyDackiR8d8CJ7jFw74dqRbbmE ZTRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DaE2bcL6r+p/M15eQzTefkij1Q0qgITroLCaQhT54ts=; b=sFqZRdpDH//kzBkZtKGCOfbf//qiVEFjR8Oe6Dd/MOYSK12cOYS2EYKUgceF0cIVJz wMDe1ebTZTlgx+3uDd/KKj+VYzVXW11723ZnTxeG0mwLim89w80yLdWOfFYUeAjtuog1 ZvfVkkS90ihVadrfIwe52sltR6OyPegkgJN9Z9rDknxebhaDF1B9p7C5M1LaZKNRrpRY +fYulkTd2lSDn91nfyOnVJ6EMzcxNAHtN28NAIs8aBlvS8OM/JRLf64ce1HWHoaYZF2R iuYZn356DZvyw1AOY1Zn5xUoZA9cCSPKwpB2AF2sjZehu4NcTtvTvbYwc0ToIIXStxnd ygAg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=S6PS8uPD; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=DaE2bcL6r+p/M15eQzTefkij1Q0qgITroLCaQhT54ts=; b=gPKTFP86uPbzIWEYoLRD1RASZBvTHZhFzqymnv2RqMhnfHgd2wKy5TYLobODh/guOI H0l0J+qjRooFGP4gh6GvHC3h6ayd/mzo8Tc/LJsc10B4a3NCjsJjTAGTDvGW+UHnN+FB dUslgly8/+QRfeYZKGQko+Up6lXGzeQdjPBuA= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=DaE2bcL6r+p/M15eQzTefkij1Q0qgITroLCaQhT54ts=; b=nNAiLcXkjmJsQzmlvM8r/Y8wakLxCHU8EscBP5/WZLSVWgcxcpdj/YZROsmKB098cW Eh5S167fjRAGHeez5hyS7M545TAhVyVPrtdpV2Ows+0W83nL0qrQ3fCzBgwXeRwRdjD5 F/htQMDuDLAFATAFUT9hqYFNtelFVRVOrk59XX9mh96H0YBmvRXqZ333zmypk45AdkbJ RhupiXpWqj3HpmY4M0fn7UW6j8q/cYrBlNtKlZsyTEwy2H90EI0rKIvfjSKNDPi7SbUR 4CFOUNxcblcJauYkAyuAa9rSTYWq0u6DXG/Xt3B3XFralvGnsgi65gZt3QqAldMs87C0 C5Ww== X-Gm-Message-State: AA+aEWZ6lzQQAKn6TvJ/bHOh1z7WMLXwHeQ6lImGILvZXNjXBBrdL/go UqGLDOXTkDZtcpikyqnDbBsahKyZ X-Google-Smtp-Source: AFSGD/XzN4uM2yujHRmQVLZtFVfghvI9hc4zXgIKBG3esbDEveqlqsiLxF0GNWmTZIkvPVbHF8aRJQ== X-Received: by 2002:a1c:8850:: with SMTP id k77mr1309242wmd.15.1544458686084; Mon, 10 Dec 2018 08:18:06 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:788:: with SMTP id 130ls1886228wmh.6.canary-gmail; Mon, 10 Dec 2018 08:18:05 -0800 (PST) X-Received: by 2002:a1c:bbd6:: with SMTP id l205mr10498940wmf.97.1544458685262; Mon, 10 Dec 2018 08:18:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458685; cv=none; d=google.com; s=arc-20160816; b=AB+rty/1pTkEOEueTX5YeMiQ5bD0yfCDuVzm2Dc+kfuo5jgCGWCAfEjZkLXA9QOjL9 uLfO9Cp+CXTGujRJfgmYmRfNZVJu/k9GSTrz5wqq6CdSDtGLZP//i7/42U6WgQK0mQI4 dv80thCG0NH7bNgnGz1Hr03Z3onE7tEIDLVkm/IqfJznSMi8h3OEM7OMzm1ty/UZto74 n1J5CVhyj/7FbB8xciYpRP0PuSpTidJRF0UFstaUNL5BuBr/9JRK7YI18c9QdoZ3uNC7 83gNGfkulPLxRco0Y5IxL2atnzZB9GazKwJwz6msJcQAC+cFivb2M8c1KVu7m+zhsHDF MMLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DaE2bcL6r+p/M15eQzTefkij1Q0qgITroLCaQhT54ts=; b=T3N4PG7vUuhJ4HgQucDoZciO66uXRIv1kNQtHkyuTZdmDQcxXfe7k8EJFlN0cFt7yh NSzA84DVAde4zaBdQD1Cs+7cP8cGh7lyQpvZVhUYh4NYOHoxpeL3HoeLSPQLdHWeZ4N9 nStOZ64OEWvdOqr4A3HFUMQmpAYARB+NVVE6Z5inefIQgEiCI9trNGnsM+oci+FJJyVi zeSdN00yLCbgzvQqrQD4fXoQxf+qKDwen99ZU769vb7XpInuKtWhStCFCv4jBmhrrcFw HMNJjFlKdng+EH7mr+/2acjpL6u8YScrLAoa6plGryOjepEmLMbeJoJdUapb1DUytsCA Pbow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=S6PS8uPD; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id b5sor4558834wmc.5.2018.12.10.08.18.05 for (Google Transport Security); Mon, 10 Dec 2018 08:18:05 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:9dcc:: with SMTP id g195mr10789931wme.153.1544458684950; Mon, 10 Dec 2018 08:18:04 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.18.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:18:04 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 12/17] drm/sun4i: sun6i_mipi_dsi: Set proper vblk timing calculation Date: Mon, 10 Dec 2018 21:47:24 +0530 Message-Id: <20181210161729.29720-13-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=S6PS8uPD; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Unlike hblk, the vblk timings should follow an equation to compute the desired value for lane 4 devices and rest of devices it would be 0. BSP code from BPI-M64-bsp is computing vblk as for 4-lane devices (from linux-sunxi drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) tmp = (ht*dsi_pixel_bits[format]/8)*vt-(4+dsi_hblk+2); dsi_vblk = (lane-tmp%lane); So, update the vblk timing calculation accordingly. Tested on 2-lane, 4-lane MIPI-DSI LCD panels. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 29 +++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index d8947be92f9d..cbcef7bf7681 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -355,6 +355,27 @@ static void sun6i_dsi_inst_init(struct sun6i_dsi *dsi, SUN6I_DSI_INST_JUMP_CFG_NUM(1)); }; +static u16 sun6i_dsi_get_timings_vblk(struct sun6i_dsi *dsi, + struct drm_display_mode *mode, u16 hblk) +{ + struct mipi_dsi_device *device = dsi->device; + unsigned int Bpp = mipi_dsi_pixel_format_to_bpp(device->format) / 8; + int tmp; + + if (device->lanes != 4) + return 0; + + /* + * The vertical blank is set using a blanking packet (4 bytes + + * payload + 2 bytes). Its minimal size is therefore 6 bytes + */ +#define VBLK_PACKET_OVERHEAD 6 + tmp = (mode->htotal * Bpp) * mode->vtotal - + (hblk + VBLK_PACKET_OVERHEAD); + + return (device->lanes - tmp % device->lanes); +} + static u16 sun6i_dsi_get_video_start_delay(struct sun6i_dsi *dsi, struct drm_display_mode *mode) { @@ -503,13 +524,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp - HBLK_PACKET_OVERHEAD); - /* - * And I'm not entirely sure what vblk is about. The driver in - * Allwinner BSP is using a rather convoluted calculation - * there only for 4 lanes. However, using 0 (the !4 lanes - * case) even with a 4 lanes screen seems to work... - */ - vblk = 0; + vblk = sun6i_dsi_get_timings_vblk(dsi, mode, hblk); /* How many bytes do we need to send all payloads? */ bytes = max_t(size_t, max(max(hfp, hblk), max(hsa, hbp)), vblk); From patchwork Mon Dec 10 16:17:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 85 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id CA14D2E5487 for ; Mon, 10 Dec 2018 17:18:07 +0100 (CET) Received: by mail-wr1-f72.google.com with SMTP id e17sf3714324wrw.13 for ; Mon, 10 Dec 2018 08:18:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458687; cv=pass; d=google.com; s=arc-20160816; b=djymyncgoXkbtyJdJg3m4R6F4mra3u1p4pHez+2r9SUxIM66eVyqNV7cd88kpSvGTJ g84d0SfeaZ/1teByTM9NBkFfUsuu2sp9h0/6yR1B5y5bKRO5/xg9p94Z8mSZlDgxq76Z WJrCxj+sxm612YKmhCSXyPz6l08yvGohIaEII78Z5XZI1CYU6dORcbGY06Yd2dpkzn9r hOp5gzUAuwHp4K/SeHhy+QSL14vWTxYGfmACUe31ge/YbEpVp32aFegIXDj8If3t+u5m tGQoKnKgyo/BWxuVhrWl3yiX+o2/x+EoH4Sc1/hGpap88bgKaTWMn04IQkkTHmYTEoOG ChFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=00q3XfiQq5Un+1gbOZybpEVXgQFaLUYl4K2oxVIJvfo=; b=ypba48C4jZahndweZ2sTfPAR2lcYo29EPxBqN5QKOzmpCWyvAKf3gFMdW9g/v/hQ+9 ZM5UWv6JRVuMekF7ky86/08VRnbwOL6b4iZavOJG8NR2sC/bEqjzOjJEHB1LJB9+/s9/ i5Np/BJ42PyiXTHGvvtG51QPvvA4oGD1FGIxn3ncny8fU6tguDauOfeQffRNFg1vG0Te jp00JbIuUFbDxTtI7Zkpt8lIhJzaRyty9VPSz25JmoEN/bdqPNGqmq9W+1SEWnEP6FGA jb46/YoABraipzB9PO/B4MapVCEDYZb12LdO/H4kj6SvwfkCuPO4TKRZAZxGYua53KLx 9RTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bdtJzKSo; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=00q3XfiQq5Un+1gbOZybpEVXgQFaLUYl4K2oxVIJvfo=; b=I+FEu3JaYQEkneOIEf0C45r4O6f8ly/nhJ89mgwQhlnyzRs0nK2OGrgKRKqrRHFFWv Lmp4ZchkIgAd3nZ2JoYtkwYay/YOb++sLCwoAsmCf5iR1iU5KCD68tktJ6dNpjPUdTHI 5dPa4fFjh4C8AG/HPexv/KWHupco8yC50Norc= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=00q3XfiQq5Un+1gbOZybpEVXgQFaLUYl4K2oxVIJvfo=; b=D5erUyVzubLUYxWuJvIIWD2VkqP0q9nj8ljV54xC3W3HAi9MO7fFvozyra/Fda8A9P KT+Ehalgvx+LgottxQ/hZ7hfKdG+5qN7AVFAUNUksQSG3J+k7S+06ucJajofqr+lPdx4 ztHomdm5kQDdk19oatSEp2uCWnRBYJDMp2oZAWD5OMmnVUgtjV58FouChfcrNua+x+W+ FlNuakaa31Tr7S2GFkRp+shlCwbU3xPqvu6fClX2sLRDJYP8aVaTuei7PTcwW0VfJ5iY q86XbtxNgkhcOERGnvmnrBTRWZI+NidyB9I5Afhy5q31rkUinwL4LBVwuzfgRa9E1PFN szYQ== X-Gm-Message-State: AA+aEWazA8CWbNE1bTs47O6O1lM4SUj35mD8S7Ss+8GFiVlCNECYAXvu NPUwRi4zgzWiFo/VQXI0V13rYrzd X-Google-Smtp-Source: AFSGD/X4Xuy776g9o/XhdVOoCEbtFZpaCaCooW1Sh2B9OkQ8vyquGysERpL4M29Zfb62ESdTrtEeMA== X-Received: by 2002:a7b:cd0b:: with SMTP id f11mr987001wmj.18.1544458687561; Mon, 10 Dec 2018 08:18:07 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:8274:: with SMTP id 107ls2256482wrb.10.gmail; Mon, 10 Dec 2018 08:18:07 -0800 (PST) X-Received: by 2002:adf:9c01:: with SMTP id f1mr10877143wrc.286.1544458687143; Mon, 10 Dec 2018 08:18:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458687; cv=none; d=google.com; s=arc-20160816; b=kQXM14FNyi9qY+CoXh3IOYr//RnCbHioJEVTmFF78Ewtqkc9sGU8F48OBggB3gNSNm GOinLLrEUNNPBTxgb5tneqoNl61SWfcfTOjPW+lqJaP4fKDzOFaS6sG5eeE7J3mvuUib IvM5SGNIgkPCXCMNDeAeyh+AG/NZKEDwdiK6onJI+SI2t/bWWvk1ckj0s7+3eV1q8wk6 2nmbuE84WGXqAGKiaST0nuEK8jseI3ZAL3YgwXVy2HTxQYCO37NCyNAoYIo01LjISykm scLaTW8NkZJyxGjnkkiMSL+dm38B1RCy/uSCpqSE7MIWheNkKCLdibLkhVik+wWZlPCZ rX8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=00q3XfiQq5Un+1gbOZybpEVXgQFaLUYl4K2oxVIJvfo=; b=lfwgIXCM1P3Te3LdoSdBcbbAGpW8hh5BCl83mS1G13+C4YOMHJCaC6SsG1DSIxldVV 6AFC2l85TcQW0IqM0dPJ+eupL8lDtB+4Clrnt/Azq0N1piK/7XIsPFFm6O65qHfnOdgK DLMagY++SJdIyaiuTY26CrCkcs8NTeue0T2jydxxRK8LBWIUo6dkmolrrYIMcuM3Q8KA IK9qHYsyEr64z4UGeZzqmd5vDpY1k8v+k7OOO7esf4xhZi1B7m3rtY/w33q4flEVaf4w sRJcS3TQ0inxCokG3Zj5ySZFurbk8wU7hiAJEFEbW+aYqokcrLXdDnrKulcLx5+Trkw/ 4KbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bdtJzKSo; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id b6sor7679645wrx.31.2018.12.10.08.18.07 for (Google Transport Security); Mon, 10 Dec 2018 08:18:07 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:adf:a28d:: with SMTP id s13mr11073625wra.100.1544458686730; Mon, 10 Dec 2018 08:18:06 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.18.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:18:05 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 13/17] drm/sun4i: sun6i_mipi_dsi: Add support for VCC-DSI voltage regulator Date: Mon, 10 Dec 2018 21:47:25 +0530 Message-Id: <20181210161729.29720-14-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bdtJzKSo; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Some boards have VCC-DSI pin connected to voltage regulator which may not be turned on by default. Add support for such boards by adding voltage regulator handling code to MIPI DSI driver. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 14 ++++++++++++++ drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index cbcef7bf7681..a87b65fff0e0 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1023,6 +1023,12 @@ static int sun6i_dsi_probe(struct platform_device *pdev) return PTR_ERR(base); } + dsi->regulator = devm_regulator_get(dev, "vcc-dsi"); + if (IS_ERR(dsi->regulator)) { + dev_err(dev, "Couldn't get VCC-DSI supply\n"); + return PTR_ERR(dsi->regulator); + } + dsi->regs = devm_regmap_init_mmio_clk(dev, "bus", base, &sun6i_dsi_regmap_config); if (IS_ERR(dsi->regs)) { @@ -1104,6 +1110,13 @@ static int sun6i_dsi_remove(struct platform_device *pdev) static int __maybe_unused sun6i_dsi_runtime_resume(struct device *dev) { struct sun6i_dsi *dsi = dev_get_drvdata(dev); + int err; + + err = regulator_enable(dsi->regulator); + if (err) { + dev_err(dsi->dev, "failed to enable VCC-DSI supply: %d\n", err); + return err; + } reset_control_deassert(dsi->reset); if (dsi->variant->has_mod_clk) @@ -1138,6 +1151,7 @@ static int __maybe_unused sun6i_dsi_runtime_suspend(struct device *dev) if (dsi->variant->has_mod_clk) clk_disable_unprepare(dsi->mod_clk); reset_control_assert(dsi->reset); + regulator_disable(dsi->regulator); return 0; } diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h index 597b62227019..0df60f84bab3 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h @@ -13,6 +13,8 @@ #include #include +#include + struct sun6i_dphy { struct clk *bus_clk; struct clk *mod_clk; @@ -32,6 +34,7 @@ struct sun6i_dsi { struct clk *bus_clk; struct clk *mod_clk; struct regmap *regs; + struct regulator *regulator; struct reset_control *reset; struct sun6i_dphy *dphy; From patchwork Mon Dec 10 16:17:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 86 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f70.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 586642E54AF for ; Mon, 10 Dec 2018 17:18:09 +0100 (CET) Received: by mail-wr1-f70.google.com with SMTP id f18sf3097122wrt.1 for ; Mon, 10 Dec 2018 08:18:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458689; cv=pass; d=google.com; s=arc-20160816; b=SWcH97FJpmu9xUgwqJNlpv7/9VNMeRGi0N/W6bnFThKEp2v/Mr/vGXXIJ2y4lS0KGe 31VJ8llamVYAfn8Cr9Wpj9AhI8ZCKWV27TOgWkw11rwWsTXYgESScHHnrShOV9X1ihLF gGiq2LbTj+CmYGWbXB1gWlFV1w0N4f0z9gG0FuEBM9zoliOK8MkpyGI5Opr3OUMWEdQD MoqeoYO9ds0ea4eV0CgJuauMxU2bw+oDqhrTTHlCXfWarzVL/mqr6qvVxgdcwOKdTlyt 6IMKUstz5qCZSEo4jr+yYLm3ponmEhAnc/cmQ5utr7On6ZL282liUMcPv1ZO8ZzmzprI SocA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0A16quYt+swrquBMzw4Px8WMyAYxU03soI2v/Bfgb1A=; b=tQnmjOvS2klMXQ6zSIOeHgsQMbvrMIxGUkeWqFGLs95+V0OD39u0okl37bcOkYJX6j xFSJvNCc5ph+DN6LCK0NQhfHrDAJf7rpKv2FbLXjRfB3mhcEtkvXTcyq2xJhlp1DabFw pUvRxE74Y2akmt+9tZM4E8OFIrXl61VvMYB4v4xQ6LPzVGJAsFBykc6f9Ki0ntItdgtY dM9pjtcnSuTYRSruv4oxy+rAQdKMqiFb5xeXzyrQnekpmvcII/Ya4Z48eca/MgckiR/Y ysMCI/joHcLlFKcPjW2HKw7MjfLClGLzO2vn+/z5TOQalpcnXjsyLF9AnpeuzK4o7K2c L4BQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YF3sJk2r; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=0A16quYt+swrquBMzw4Px8WMyAYxU03soI2v/Bfgb1A=; b=n3t4zhtfLngRyMtXKE3jAsn38QnCD8diIaFFlS0GkTMLg781D3ZnJ0KYv0UJQj7nN0 5SrOIuhvafTVuXOvNbv0XV+oKjNU4bh4xrhzYXKKOr2230xUzUZllJinOJPhvIuL867O o/h3RtbbtLePL5tVjBF/9CtmxzYrRKStvWwHA= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=0A16quYt+swrquBMzw4Px8WMyAYxU03soI2v/Bfgb1A=; b=K+E41VRSzsjhluCGf+dG/Q4JrQpeRiYuATuH8qWdQnKFUC1GrXlaMOtDU+tJHIx5Ge q2JMS4tuBxSW/0lKeXZflqqbhGkuwI4MPIBFCP/Pi7lypbw7U/MXjKvESmzw6AuQXI8p 34atsPS9h8G0/Lp166tScSiP3H2+tqsOKHvU+RPqffyn+2xaeuKSI1M29m6+zMoPk/iH ueiXsHHrNfzXNNKhqe8KmPWM7SVHw7z3UI66zF6KzgzPf+IKrTqbqEbK+4AuWZs61/lY fLUmF+GwYQAi3AiNxZE29jBROvXjRiXHZNuTaIFbAeXHyvnP0yGUugP8vQmQsnegDFkV pa7g== X-Gm-Message-State: AA+aEWau6SvIaJIpVTY91CEcJe0fsY0K9t+Q+QYoEfO1G5HCIX+jCD/a quUdRCgeCglyjVA0BXdTK+cwEReF X-Google-Smtp-Source: AFSGD/Upf/ckucGe7eXWpNQbfMd4148dW4OXFma9+QdccrlE/tuynV6w5fzW4z+2kgt3Gl26SZUfNQ== X-Received: by 2002:a1c:bd1:: with SMTP id 200mr1396222wml.25.1544458689096; Mon, 10 Dec 2018 08:18:09 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:35c6:: with SMTP id c189ls1825684wma.13.canary-gmail; Mon, 10 Dec 2018 08:18:08 -0800 (PST) X-Received: by 2002:a1c:570d:: with SMTP id l13mr11750465wmb.139.1544458688523; Mon, 10 Dec 2018 08:18:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458688; cv=none; d=google.com; s=arc-20160816; b=Nr7MLjLCCFIumSIGQZV+/rhXZATtSwWxxROw2d8sLbwRtaapKD5VBc++HPRqKk3rAL cFabcaVi8rYubo/rp/xe68WdKvpFEKN9a/9h+p/GbgJYjKtTmCvcREDy273MEUtjcWcv Hjc0e0tsMFsoAoKLiL+e2EcvYZan/sUdR61sda+zq9uziBu78gHjk5GrHK2piMhxTdm+ pg5pTSHJ8UEn0+7Jd0MAmTmjZsAa+u4xvoQDsphfz51gjWnWmXpN2j1WkSVNZ1poq4hQ b52/kWq0eI2q5b3ViCvFH8TT4nkXcm0rfrP2t+yoYH8aD3JHP+tOGctfJ+xoTEk48YN4 8Wvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0A16quYt+swrquBMzw4Px8WMyAYxU03soI2v/Bfgb1A=; b=wSctT7v6moJXeKlKtQx1Z5k+4lp0gfPiT2WSmOj4lkbAcD2E/gGxGwMQ6pp/+2MQRM jcD0VDv7+RWgXJujs5zlXZx2tI+qmxfn7kaiSNKWo/Z8bioL1vl4cKGH9CVFqEyFdJve ERQYsacFYpJCKNN+4mbeB3hai2JGkeizYUaDTjfEKmOHYvwIVSzJdckpPaFnJs7AdHbb EiDBkkH0Oy8VAGfP1BSH0wiBnaJXkMOMbyK1kFWfo/er0T4B11lX09V4yuLvaicfODo2 PKJ1vvVRbAIxojIwh7V7AGbM3+fHzIcucSzTlGBNYaq592kRInuYn2/3oH1MCdGOwz13 Mlgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YF3sJk2r; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id c71sor8135604wmh.10.2018.12.10.08.18.08 for (Google Transport Security); Mon, 10 Dec 2018 08:18:08 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:1707:: with SMTP id 7mr11448132wmx.150.1544458688215; Mon, 10 Dec 2018 08:18:08 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.18.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:18:07 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 14/17] dt-bindings: sun6i-dsi: Add VCC-DSI supply property Date: Mon, 10 Dec 2018 21:47:26 +0530 Message-Id: <20181210161729.29720-15-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YF3sJk2r; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Most of the Allwinner MIPI DSI controllers are supply with VCC-DSI pin. which need to supply for some of the boards to trigger the power. So, document the supply property so-that the required board can eable it via device tree. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt b/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt index 9fa6e7a758ad..adc7cdf129dd 100644 --- a/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt +++ b/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt @@ -28,6 +28,9 @@ Required properties: first port should be the input endpoint, usually coming from the associated TCON. +Optional properties: + - vcc-dsi-supply: the VCC-DSI power supply of the DSI encoder + Any MIPI-DSI device attached to this should be described according to the bindings defined in ../mipi-dsi-bus.txt From patchwork Mon Dec 10 16:17:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 87 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 33F5A2E54A3 for ; Mon, 10 Dec 2018 17:18:11 +0100 (CET) Received: by mail-wm1-f71.google.com with SMTP id t199sf4772580wmd.3 for ; Mon, 10 Dec 2018 08:18:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458691; cv=pass; d=google.com; s=arc-20160816; b=NQ5Z8Frb7N2QVOvHhQCgsLmT1bfFHnYJkN81W6DJ1y01XEybTFJMMmVfsPI2CpENCf AxoZSAzX37S5kZxHZ70Z+jyZ0KfZTzGCBjsFcymnap9dhgazLv3MzEbIfhDXBsMS4Nsb BNOERUE9tuTmAO2Djct8n414ch4NvdtTfTbx4iHUme+ZkbiWJpNMAMjVG+mdMFAgQRa7 iZADN1luFgZ3Ar1CI3BGt66gB5mTTxmRME/H0Ok7RlG5l2dvUO1X2yk4gbX2VbobRjQj ezQMs6l0r1BsXDF8slw9f3u+acVBmgcgRHUiqpTreWuF2PPdR2kLCTj6AfCAV8BFscJu g1VQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SS22PqBK8tWsdyn/FHAwZUavV4dNBBIV2/QUJd77h4k=; b=g7wrZ7e3cHOSuoCfH5tFNvmUTfuMwnvB7ZAxfM0bMQvkCEbcYzgm9LcUMWFY7/yJza GmWG9JNghkwuI8Xe0gufNCylXDVedfeJ5sp7mBBIOj+z0UNbElUF2K9fl6dFveZZznpM dFsqZgP/e3ITvmiU3EH1qWmDetsK6K5ZGWow/e5AsiXlDr7pDphn670suXdLdl/21ygR b10SweNco7Spvo4pf7tAyqFfLbgk833fBmfLFTCks62hOpxQyArCLGa2mK4iReFL1VB+ lPXLkSUwnE6c3OW4F3qX6+r4qdgQM3Var9XiULyWJdOslFY7SeX4+Zp2AkZ215Ne7mTa /m4g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oMpl0ALA; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=SS22PqBK8tWsdyn/FHAwZUavV4dNBBIV2/QUJd77h4k=; b=hO5goWy7hk/q6wIh4uaz0iaNUFaWrwCl1j1o47gh65f44gWK93r1fHGp343CnbV4eg DgeP0WlB76POOmJm+yPu7Y0bl9c4NoLfc4fOgm0WeKw6v5j4DKGVdaRzBl4aLearoEBH UlHwxZCTCSQE/UDXsBcIIpamGKnQm5JheMAwU= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=SS22PqBK8tWsdyn/FHAwZUavV4dNBBIV2/QUJd77h4k=; b=BtE7GFJr8P8T1MW6nNWMQ0aES3EpiNkOMew/2YFDcH4GwEi3Ol0u8F5diVt56xdnOh aEv7GsyeM2VIbKxZuIdpMNgCVVCybZu9eJGkQSc3QLjC0XsDYNdgQjqYbhtxai9KzM19 OSYcUDTK5Ujjo2rMcqaGzG1BYjWQ15bATizcbkE34jeRIrLOhkTY5wxVSjENwBvRfZum WrsiS/5DWPs7K0ST1XDe2wdNI4M4SoMPWhqHq/w5yiJh9K1rWYFVoMrDdauwPRj4ZGR+ DlgmAlL/kwRX26o1NMEO9FIy5mxxcUcmJSwO/wPfjxee7boZt3VMk8F5V9HeZhsq2YHx 4eHQ== X-Gm-Message-State: AA+aEWb4IJq1Ruj/dttfjdkxNTiuKC/1evuhN5mJAvMOfZ7hTTOPOqPD aFREXjexfXCEEuQ8kk+erWzV5YSY X-Google-Smtp-Source: AFSGD/XA4+rGSCfdSx0xnD1gkwhXP1qp9BHAL6RGtJBDV7PcncSRYYOIa1UZ0k+rDTV5r+upI4pRyQ== X-Received: by 2002:a1c:3ad3:: with SMTP id h202mr1383990wma.25.1544458690901; Mon, 10 Dec 2018 08:18:10 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:788:: with SMTP id 130ls1886269wmh.6.canary-gmail; Mon, 10 Dec 2018 08:18:10 -0800 (PST) X-Received: by 2002:a1c:1593:: with SMTP id 141mr5010631wmv.85.1544458690558; Mon, 10 Dec 2018 08:18:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458690; cv=none; d=google.com; s=arc-20160816; b=NzCTNvs/fZHwzRoEb6rEryZkU7sBbGMBKP1RXTP43CNnbkuxnxsyo6WfYuBJtjNjF/ nCkJOYuNeSBum7fc4HSzhdeYRrzsoav4cTKOZaUgbBfLE4jL22VGmSnu0D/UoJoVPaSq yOURP4zBX5brXvQH4m+WrZBbzl9ft7SiL12E4z8xZotogFMKJnqQzj1Y8A8kX8HjPLgI SXJd7pw5dq0aMnU3KTm3Io2qO0SQo3rzG3u9WLrKHH9abZ/Jt4h7zE/Uma8bg5t6+WyF SciXjyWxUz6wLEbWz1TiOFsUQdpn8ZdgHpWk5Gp4I9XF5QiOZT83YqEDo+uwPl4aIvqp hs3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=SS22PqBK8tWsdyn/FHAwZUavV4dNBBIV2/QUJd77h4k=; b=BASnU+XyXDkQKWeNgafGehoFVGN0C0ORch8J7culGxe458xWwG8y63+rlx7Fpzwkuo 21ouDo8WJrPT6cmmu6WkcCmsRRy20tyFDKgbQKgkkAv0gS0XAtzdmgm+l1yToA1jH0By HfpIA4EfGmuSbYjm9fPyyC6s8CEI7JapXV4TFtvPkzBVuOvnPmAK96gBf6b0rux+NB0e hgz2CutADkMV8uZ3Uvi4SkJ0Ox9fa2xnCdAdiy9Ya/n0cPvtqPfWGLkbmjD/Mhf0xW+N jmfj01Q8ZLT3n9NKjF+0TLWZHIG1GVRt106YnM2bannCOrd8D13FjFRgsDbuYeVoV7qD +C8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oMpl0ALA; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id b125sor7765565wmd.19.2018.12.10.08.18.10 for (Google Transport Security); Mon, 10 Dec 2018 08:18:10 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:990c:: with SMTP id b12mr11710901wme.106.1544458690275; Mon, 10 Dec 2018 08:18:10 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.18.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:18:09 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 15/17] clk: sunxi-ng: a64: Add minimum rate for PLL_MIPI Date: Mon, 10 Dec 2018 21:47:27 +0530 Message-Id: <20181210161729.29720-16-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oMpl0ALA; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Minimum PLL used for MIPI is 500MHz, as per manual, but lowering the min rate by 300MHz can result proper working nkms divider with the help of desired dclock rate from panel driver. Signed-off-by: Jagan Teki Acked-by: Stephen Boyd --- drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c index 181b599dc163..b623c8150b4f 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c @@ -183,6 +183,7 @@ static struct ccu_nkm pll_mipi_clk = { .n = _SUNXI_CCU_MULT(8, 4), .k = _SUNXI_CCU_MULT_MIN(4, 2, 2), .m = _SUNXI_CCU_DIV(0, 4), + .min_rate = 300000000, /* Actual rate is 500MHz */ .common = { .reg = 0x040, .hw.init = CLK_HW_INIT("pll-mipi", "pll-video0", From patchwork Mon Dec 10 16:17:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 88 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id B6C6B2E5487 for ; Mon, 10 Dec 2018 17:18:12 +0100 (CET) Received: by mail-wm1-f71.google.com with SMTP id e1sf4780161wmg.0 for ; Mon, 10 Dec 2018 08:18:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458692; cv=pass; d=google.com; s=arc-20160816; b=GbU8dcFB9z/bzCmH9glEazGsEoNnBmem/O1wb2X1HKkYIE7eCH8z2FaZhCX5pjwPIx hd8IupFTyUrjg20DX0tSr9AGa6JztNsA/KLu+DNk3T8k4+xe5G6kCWgWjw+3HeBwaumV HA9Vmm9el2FQsfp/Cfseed2WddP50nTQL98S3icbT1DLY6A+WJ9d8VADac9ilpqOqiIb QgwBVem31+tuW1ZvKusE8tpSx50YhqePT0WhZvSuJd6JOimAy/TpK28FuFEaG1lBOYx2 bW5G3jEYWjIh1YGmrPWWsLaOSmFuDB4IMBuBG3DUY0VutETCJ0OnHrGTFfr6UvKIyU2B 8I7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zSLZfhqj5LlgFfpYLOueILNrvF0k+OKE5voNHu/WFJA=; b=klok1JvXvbs2tnB1GrD5j4dtXGs4mh73X9fDJQ09zZbKENhc+pJq5D74cnyzDFtpjQ 5eOOFXtnRnuQnLMb5TDmSMl9UZEuGutY8zGMNRyj+NT4jzbTL7INT6fGsHNMGa3T8Yt+ 9ZWUnKGkfaPEHtuH7pEDKs1u8LlBaRGrBdAJzXQ4FRR2oU5bvJ+cDoxDnftegM6nL5H2 k7RjR9ZkujjRna27tIlVu8jOHlAFPD6XbYsiGd4l9l+9gVritTBLBShoTFDNuMAuxnxC zRw+/NraBCAXdbra8ULIDhJNIaXevk9TmtMWGf4r6xExvVr/td5dreWBkd/gOyfaextn hiMQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=i9fLMhyM; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=zSLZfhqj5LlgFfpYLOueILNrvF0k+OKE5voNHu/WFJA=; b=ZNIxoo8jMtmI15b4b78ZDt4AkOsih1yOZjyLEwSC3tHFqjiPnkmbgvrqbDvAz7+o3e 9lBDA0LaovUknjoqjQ6pC4mGduKBZ+KqMcW5wlc5J/XmII+GWTuGQuyqWW7EzuPe3jw/ CfRHmc7rIRonA54nOyxAjwNy3vV04mP7fLvjc= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=zSLZfhqj5LlgFfpYLOueILNrvF0k+OKE5voNHu/WFJA=; b=ccFM69lb6yVqgF4OuXZQSV5QLKoCPhpYb+qtdJwTmsCMHSE9et8xYiNx65ffEPBEBR OhPgJwTmhurdzqpGjhlz8doXXTybYocXQ/OLE4CRc1sUCqom2vBytawBH2Ror8La98fv BebU+aQN8ic00LBKLsMbd6bGq6MApWVmv0ybNUftGk2/t0VtTA1ddBBInw6YI2LfkD8C Ec0CL6/hNx/nm/T/bo12b6e766LiibQ/a0iF6JyzkYDM4CJ08bcjE3kXo9yW8QawqGo5 9LLcoNYJjbW4vymTykbz/gDA6g3JCLyGcwGCAgep4KIQtqRJ2VXwCKvZqO+ttAEeKl7F ntNw== X-Gm-Message-State: AA+aEWbc96Z62FgUvoe2hEhsdtvFyltS+DCAF5/xNkcCMT/KGMdRuUx0 ky8dFWqfrSPdOrJcHnBj59+9o9uF X-Google-Smtp-Source: AFSGD/WHAsaXwe7Ka5Pqkc6C3aoxA1ZgTELs7zTblQuQBuo6lg5l94m84EPdjM/b2vgaspyKW4EK+w== X-Received: by 2002:a5d:5003:: with SMTP id e3mr979224wrt.14.1544458692406; Mon, 10 Dec 2018 08:18:12 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:950d:: with SMTP id x13ls940140wmd.7.canary-gmail; Mon, 10 Dec 2018 08:18:12 -0800 (PST) X-Received: by 2002:a1c:30b:: with SMTP id 11mr5402407wmd.110.1544458691991; Mon, 10 Dec 2018 08:18:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458691; cv=none; d=google.com; s=arc-20160816; b=DTMBnkI0C0Dp/REHYYmY0uIyWoSsmbSpKNY1/9+3g6rnM+ngiYBrovYJ527HQoRKyr Q8WqsYaDO80VqfJqYBz/P6kFL7tR7QsN71xE5SquvMNgfnomJ7Q8kt6erNvn0slXS23q FwvSsqxIUiziqKmCijJkiwY0A8M9G5RIyIVPplpVnY6hb+iB/y+2E+1Z+zmBKz7n0uuL PcooJGuNUMB7oJwCTxNqvvLmK1VhsSCCjvoSzfq9dJWA1tcvO99ONtcLRdlp91crE/rz GHPTCs/Q0zBlFv0ddEKVN+QC/ZbRwBF566RxRFJQdQLxFFrqgQfUqicFrCk/j3NveHVo uYgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zSLZfhqj5LlgFfpYLOueILNrvF0k+OKE5voNHu/WFJA=; b=Mxzut+/QIHE0qHvHFUAc5QLU4HWDxGY4uipY+8CAg6SRdPoh64xGpKwSrfBGq9A33j waDJspCPiRLHYEttXm/XMNBxxVgDDNY2xOfrBuNd2jvsijkWGOeDexxqunzksigz/ffg QUPFm4qDcFlTYmmsHjShcqfYqihUjCUxoSS5fNRuRsO28b5lhaJNo15ATt7WdqKfxayI GCA/rIFYQYSkcoH+KQg9qxE4LySzRmrd7BZlr3tryj+ghvSu3O5apwl+IHD245+Mbfdj 4WhtrRmDPfz7F8T4/XKrtFmpY3LZeatpl/Jk2+S4HOkR3bG6Jp5A/JiipiuFBmMfVd+6 Sr+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=i9fLMhyM; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id s10sor7378576wrm.5.2018.12.10.08.18.11 for (Google Transport Security); Mon, 10 Dec 2018 08:18:11 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a5d:570c:: with SMTP id a12mr9992101wrv.161.1544458691718; Mon, 10 Dec 2018 08:18:11 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.18.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:18:11 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 16/17] dt-bindings: sun6i-dsi: Add A64 DPHY compatible (w/ A31 fallback) Date: Mon, 10 Dec 2018 21:47:28 +0530 Message-Id: <20181210161729.29720-17-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=i9fLMhyM; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The MIPI DSI PHY HDMI controller on Allwinner A64 is similar on the one on A31. Add A64 compatible and append A31 compatible as fallback. 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 adc7cdf129dd..08f1f57abff5 100644 --- a/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt +++ b/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt @@ -40,6 +40,7 @@ D-PHY Required properties: - compatible: value must be one of: * allwinner,sun6i-a31-mipi-dphy + * "allwinner,sun50i-a64-mipi-dphy", "allwinner,sun6i-a31-mipi-dphy" - reg: base address and size of memory-mapped region - clocks: phandles to the clocks feeding the DSI encoder * bus: the DSI interface clock From patchwork Mon Dec 10 16:17:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 89 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f69.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 2D3362E54AF for ; Mon, 10 Dec 2018 17:18:14 +0100 (CET) Received: by mail-wm1-f69.google.com with SMTP id y74sf3762743wmc.0 for ; Mon, 10 Dec 2018 08:18:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458694; cv=pass; d=google.com; s=arc-20160816; b=fkHIZJdcnOIHQ8s5AEw5J1FpmsixeOIcdwcoKrytCHCllr1lwewQO0bNorGSH5+0qo NJ75D5PO0md+Q1i5SKHh4nQ9CJf0YJgPw/cKA0zVLOGai2iXKgQk9eVayTr1/tfF336S O9rkBxzPOHzu/b3AVxlpsMil1CPSVX40XHlW+YBT60Cca5QUdOl5q53qAGbJSTJz37Bm hByIWKYM5Z6PT9OZzCKVRuNI3tsstiV90JVhFtgTox2F+Op3rw0cwDSy8lrapiFPKaUN GyB5OFbe0k9Dj2j5PkFbbWRQaCBn5SHnmwBCnsh2/nDQ2VVf06ETAPSPxaa/KXHGgH35 /67w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FjGhPpG8sG9uBklMCJSskhFh/huEKC/N4BLQs4vEQZ4=; b=fnyJiRpeL0vl7+DTd1LLR7hIe2d9eOWOfA8OmL1Y9HsumWeCXTEGXIlZZ3nnWM39yP U/eoaI1hDOl0mp+EbNbeUrM61VWAUAKWy3rFAh1U4srVIrn5KnUk+6FeSyXNJi29Pj7N mNhg+/2rzyHRLybHGLBD5UBNa/pq7e2F1JGiKBni3VvSV/uQfVAaPAEHp8GFwlQJ8Pqn l2vrAc3XUNf6pMFgg6jMuqfoF/QdtYICZWuEm8WKVQOWQkZCa/QVTWefXe+OeXPgWF1R Zyur2/bEvTRcYOMyoiGeZqLdIuzCQN9BQBl2YK1CfwOBLiGxGxr8Vx9sxN0QI/nZobF7 dtWg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aqPbNxfJ; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=FjGhPpG8sG9uBklMCJSskhFh/huEKC/N4BLQs4vEQZ4=; b=Heff17As8TvMxWW1jXT9rBFFlCNKiQFXtnwOfOhzRSJSQ6Yi8Z4bfa6w8KONCuPsOF ccdhbVN8gREd0YL/PSjK5OW2qd/sb7WvmyT8JH+GC9cWU/qoyFyWXn1Qpbb13fxSjGl3 aathqH6cOdGtkNrp9KVTckrk17kWhWq+aePjk= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=FjGhPpG8sG9uBklMCJSskhFh/huEKC/N4BLQs4vEQZ4=; b=CZlN57CSJ8d1HJ3KpmxixeVc0R95NAqFpZlnOKFmctRncxkB57dsqk2vcTNK/TffuF VIJMoxtP4pvAndtv0pSouZqIQq48ZG2nmZy1uvhsryrQbheKdE0Zqbn+EI/JgM+uCNtH ZToR49drOETwxGuaGSuKUdsF5tnBgsBfgv2dajcHg1eN3blts8Iq8lf7sMhykE2fSNIb m6wBzvvCDmr387KUOh9ZkQ4fOE+HwF3nt9nEg7Se7eBENljlntKUZV1/J1n8iC6fWiHZ 5ZHhHwAXGOhdHg8YymdfO0wGCJ8eFa2/cUkroDEu3ab1QL9vAmltUwx+LCV4PnvAB1/5 +3vg== X-Gm-Message-State: AA+aEWZhd7PUM3+ewAmeCKCcSaPla+vmeGr3FtTKMmbGRlRIDpTi3viT JMmRzTDyDa+RmS5fIE+gd13T6HXX X-Google-Smtp-Source: AFSGD/UCKmHVXGVbVhcBNXY4yFpMNoVOZl8UcDskWEwz5HdEsTKza0j7rjD1vgTIu7gMoeZEk7uHNg== X-Received: by 2002:a1c:8389:: with SMTP id f131mr1279848wmd.21.1544458693890; Mon, 10 Dec 2018 08:18:13 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:35c6:: with SMTP id c189ls1825738wma.13.canary-gmail; Mon, 10 Dec 2018 08:18:13 -0800 (PST) X-Received: by 2002:a1c:f8f:: with SMTP id 137mr11015266wmp.96.1544458693491; Mon, 10 Dec 2018 08:18:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458693; cv=none; d=google.com; s=arc-20160816; b=UG0qEgegwj00MzBK47F5JDDlXzVlE6sFTOFNKTUusG/C8jpJWzjLHqrTGolrTbcqZU ReKdc7pGplKH2OefqbOaxkmBWDhPZPkgkk1d1Ac18TyrHXy8o9kS2QI/odz/5XY/5Jcg 10ORe+wTZQNlVOCeLkUtVcI3czgVpqkMaqsIj7ck6RnlZ6OZizB31F4q4X7C4ZxjB7rL pCs4DmKAcdrmEUZq8oKhMKFF06fktBx3h5JYE4dJKSMnQMePFy/P9S+7CmCKFEJZmiKu TQeHhPxT/D5T2FMHdW5kQnD0QB4wTAS8Sbp/PLGMhMuNFkqkK4+8/GZlgnqfZfS1hol7 Ku/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=FjGhPpG8sG9uBklMCJSskhFh/huEKC/N4BLQs4vEQZ4=; b=uxrTIEr6Q/STaLwUZ60932DAXOv9dXYTmZNyBjhTfgjby/F9gOssETmA2kaDWTJTde aDQGH7CqtaoL8H3/zLBTvHCY62s4PQ3Rp6n4gBQs3CwFO7XwEWd4MddM7FZf3+mjCo54 FKFQKSYy4Jln9pVi6pg2IM+bjNyF28e8vNehQVU5IeDCB6/p+5iGJx5QJdPBIaZeSjDQ fSZNA9OJinwrFmTBQOa4fe9+0sYfx/Hb6q95LjryKUrZnx1T9XZ36qZ5D4oNmr5E6/mr eOAasKeBa4SnJbXAYF5++vnk8gQrT94WvYAIHoxLjZBrT3h5joEbc1SzFejhTJLL23vK x1EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aqPbNxfJ; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id j78sor8085286wmd.27.2018.12.10.08.18.13 for (Google Transport Security); Mon, 10 Dec 2018 08:18:13 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:de57:: with SMTP id v84mr10923948wmg.55.1544458693211; Mon, 10 Dec 2018 08:18:13 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.18.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:18:12 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi , linux-sunxi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 17/17] arm64: dts: allwinner: a64: Add DSI pipeline Date: Mon, 10 Dec 2018 21:47:29 +0530 Message-Id: <20181210161729.29720-18-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aqPbNxfJ; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The A64 has a MIPI-DSI block which is similar to A31 without mod clock. So, add dsi node with A64 compatible, dphy node with A31 compatible and finally connect dsi to tcon0 to make proper DSI pipeline. Signed-off-by: Jagan Teki --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index dd5740bc3fc9..dd5c7ad55149 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -344,6 +344,12 @@ #address-cells = <1>; #size-cells = <0>; reg = <1>; + + tcon0_out_dsi: endpoint@1 { + reg = <1>; + remote-endpoint = <&dsi_in_tcon0>; + allwinner,tcon-channel = <1>; + }; }; }; }; @@ -910,6 +916,45 @@ status = "disabled"; }; + dsi: dsi@1ca0000 { + compatible = "allwinner,sun50i-a64-mipi-dsi"; + reg = <0x01ca0000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_MIPI_DSI>; + clock-names = "bus"; + resets = <&ccu RST_BUS_MIPI_DSI>; + phys = <&dphy>; + phy-names = "dphy"; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + dsi_in_tcon0: endpoint { + remote-endpoint = <&tcon0_out_dsi>; + }; + }; + }; + }; + + dphy: d-phy@1ca1000 { + compatible = "allwinner,sun50i-a64-mipi-dphy", + "allwinner,sun6i-a31-mipi-dphy"; + reg = <0x01ca1000 0x1000>; + clocks = <&ccu CLK_BUS_MIPI_DSI>, + <&ccu CLK_DSI_DPHY>; + clock-names = "bus", "mod"; + resets = <&ccu RST_BUS_MIPI_DSI>; + status = "disabled"; + #phy-cells = <0>; + }; + csi: csi@1cb0000 { compatible = "allwinner,sun50i-a64-csi"; reg = <0x01cb0000 0x1000>;