From patchwork Tue Nov 13 11:16:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 9 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 9EC172E0834 for ; Tue, 13 Nov 2018 12:16:58 +0100 (CET) Received: by mail-pf1-f197.google.com with SMTP id i19-v6sf10094263pfi.21 for ; Tue, 13 Nov 2018 03:16:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107817; cv=pass; d=google.com; s=arc-20160816; b=EzvlJj6iSz/Gkrt2PbBW8uYCVj7RjHEIcsaAVESKKNX/TGq+RoGvV4Ct9P62Q2R8P0 4UgHxXpjLkIKrtYPpKRxG+N+wCRoh0HF+gUunACR4aSmig9Hm0fopVpZ/a1QZlavoaDa oXiWFePbkSv/YxvZkzKR2mTGnutbd9/kBPfowecjjf1fQj/7KrZ7qWwDcKXA3dTHR3nE 3PDFbHjdaUjoq+ePPzivULeZFA+QQ4tPMP9oZfvczzWYuFDZJ0CxhTnYUbRX/GuSgpkk X+qQRqVBuEa6G5AVt6Q+MKuNQnBXcFk2ffBVU3CE+lDaUKWI9QvInKJKqXOWU+GkSkOL vzEA== 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=8ES0cZhisRcmV8a8D5yir4UWuJgGe2haJZaAh1WF1HU=; b=a1ETEvDcwgLEo8ZhkOw5nMO44Gn6FtBky5A1lXCjw7XQCBHFSeNMH9p9CkEbzpMLkH eecc32u9Yef0cxSmBJH+KB9ow5tLYvaKTm2blHH/fKiTvqaBiPguSZUtdhA3V6XjzDRY UlsSMcyql/ao5LSBxN1NJERTEbWPlxxbA0tets7v0dfW6+g4WkbD94SwXcKgnE1tbR0T 8ybsInPhsOhxqu3QEsepDlPujysVGPiOaM2SNra5NEu69dXGszHgas/4u2oBPZpTVoiA Q8SroOIz6lkQKVmfzrxgK1VM5Ogg3YEuGHD7rfwVwR/4gf9f9OF7DyZq9Cd2AuujB7K2 Df2g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Gc15ndhF; 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=8ES0cZhisRcmV8a8D5yir4UWuJgGe2haJZaAh1WF1HU=; b=WSnyplajxUVGJXmgn2WpM9ws+i3i9tQT8TTN0USqo85MNsvdbBCLcnmHsN/UGlUhUd j7JHdr6h9q1tok2l3olb3dZIRgsy7HOtcExqVmIEGLkpIGLNqHFfH0Yp+W/hI5G9NuBH t+3H9V0+TyB9FuqbZfLvetj/1hAo9NQVSTgIE= 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=8ES0cZhisRcmV8a8D5yir4UWuJgGe2haJZaAh1WF1HU=; b=cBFDjt1mPN/OyT6TKh+8oKGtOds2poC/4znEqNQ7ZL3lnL1nndljzR2ccg/TCGiuy0 HCTBDBV49PUuf/z8lpGc+kNi7FErtLDW5zniq51kfcfQjCMZ3Ri4tEShCpqbroJqw5YW lm+3EPSMk1Q6lANzU1Z10l70B5S6JsmZYMBLlQl2buA2orpHPQog38iHFB4p+YrIqZNo MM6I6ZOr1jIXTx2W6UsLOVYHPe10FW2FNLFxQzelXHHhMSi1mMfDnRIxMEP+Mk7vNag1 uRNTe5eFxns9X8XqMxkbqRjH+eaBq4dhkZiwvnsoB6icRQep+Bzia7yyfndzsS7kM2Sc Prig== X-Gm-Message-State: AGRZ1gJhosSAu8k6LSDzgjL8doW5VoLd6LFz7J15gTFR99U6mGeiF/gk uo8URB+q5TJkcFqyp8tiLl33yFUY X-Google-Smtp-Source: AJdET5fRV9xtGHE+SwMCV0hoqvB35eGtmTqR+zVJHwvmhG+fiytqFuihuYFlYpkTCyjjZZdDSSqtcA== X-Received: by 2002:a62:f5d7:: with SMTP id b84-v6mr2022361pfm.114.1542107817177; Tue, 13 Nov 2018 03:16:57 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8bca:: with SMTP id r10-v6ls4306495plo.9.gmail; Tue, 13 Nov 2018 03:16:56 -0800 (PST) X-Received: by 2002:a17:902:4025:: with SMTP id b34-v6mr4718559pld.318.1542107816893; Tue, 13 Nov 2018 03:16:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107816; cv=none; d=google.com; s=arc-20160816; b=c4LNr4bVhL/lDAYZTdsebmV5HqbmUL/BGzbMQItC5fBr2OUZagt5GWGFSILAEHAiZ6 ndvBsxoO2GpB5y/opuX1zk4XOre5fBH4BEYzjoKLqDqEZWzO9Me9MG+JgAvtotMuJfgP 6VlwslE2g2hKl7Can1S8mw6p9rV3EMXUg7yTUoSurRxNOFTMBizE4FzkN+dH8QQuhVQe BUGg2XBoKy8iXNQuUSUJZEbF6RYTp5yFbnwXXO6ZFBTAjk4M2ZsAtekE40e0mPNrcfmG xUfwK3OpUfw8KQ9IEhyeb2oxEEQQLVLXXnqWeqprzWJhRBDxXOEckMQQJz36nk2KpGIu 726A== 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=8ES0cZhisRcmV8a8D5yir4UWuJgGe2haJZaAh1WF1HU=; b=CANiaoNtsmq5eJtGn2W/HpVThSD6AGsAHV+cw/F4GgXw/oP+FWFGyHJL3Bm+6s8hKM SV+FOFCokdlHoaRyP2kEbZ2aiySIN0Hp8oTcpioFQ0e+eaDdT0vi1Slx5jCoW9sn+ZNc RCUADiY1QYa1d4ypCMmJgD53WCQ/NtroF+oHCyFbnC2hYrTZ47zkdnC9vC0OP4brItKj CsB0L7eYudOz1hqEFA0kbSS/Eaag/pHhCA4HjnAbGnh6bfRgeuqDAhZy4UAKfl1KNjZi eGfCOEPNlSRgUjyacDTMwaA2bi+9fjHq2uyn8nsOJXjtv/4u5omXsX6s/y2Au8tt5EUg Wmyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Gc15ndhF; 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 98-v6sor23160818pls.67.2018.11.13.03.16.56 for (Google Transport Security); Tue, 13 Nov 2018 03:16: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:a17:902:d24:: with SMTP id 33-v6mr4725603plu.319.1542107816601; Tue, 13 Nov 2018 03:16:56 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.16.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:16:56 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 01/26] clk: sunxi-ng: a64: Fix gate bit of DSI DPHY Date: Tue, 13 Nov 2018 16:46:08 +0530 Message-Id: <20181113111633.20189-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=Gc15ndhF; 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: , DSI DPHY gate bit on MIPI DSI clock register is bit 15 not bit 30. Signed-off-by: Jagan Teki Acked-by: Stephen Boyd --- drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c index f7d297368eb2..019d67bf97c4 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c @@ -581,7 +581,7 @@ static const char * const dsi_dphy_parents[] = { "pll-video0", "pll-periph0" }; static const u8 dsi_dphy_table[] = { 0, 2, }; static SUNXI_CCU_M_WITH_MUX_TABLE_GATE(dsi_dphy_clk, "dsi-dphy", dsi_dphy_parents, dsi_dphy_table, - 0x168, 0, 4, 8, 2, BIT(31), CLK_SET_RATE_PARENT); + 0x168, 0, 4, 8, 2, BIT(15), CLK_SET_RATE_PARENT); static SUNXI_CCU_M_WITH_GATE(gpu_clk, "gpu", "pll-gpu", 0x1a0, 0, 3, BIT(31), CLK_SET_RATE_PARENT); From patchwork Tue Nov 13 11:16:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id B7D082E0834 for ; Tue, 13 Nov 2018 12:17:04 +0100 (CET) Received: by mail-pf1-f198.google.com with SMTP id 190-v6sf10086473pfd.7 for ; Tue, 13 Nov 2018 03:17:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107823; cv=pass; d=google.com; s=arc-20160816; b=IiRo9pR2d8scU/5vRSEYEMFABsdxnRyWZo8bwKNkVux4PAESddoMNnSBIT9ruub06G b0kXIRDpSeB6WW8U4qrtN3nBj97d0XLJ3VmvMsybTy54DndzTS1mRpp41egeYbKsWIYQ GuLcag/oMsb+L1fSNy6mzBVh0N5jVrcgDIBUbJRsTfND6BLQKDSkh+GBEeIfm+KLqIe2 AIAAJWkJv+BEqo9b7hvQ2Yzw0wqXhAWIQBMjupD4reW8OYVbbxXXCifaiTg+7YA3dUex PrnoT1lFFm1ZI+a+fzmnb2/Doat9PTC8gocuc2o0B/rW3mgTBLkalQIH8OnlTNLaf9x2 W4Iw== 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=yqEP2BzZ2jXeAZHhd1kTnxj7Hp6aFHA67iUShP1YZAg=; b=gUAEmJutXCPBfWPXOGlRd6g0+ElEGdS90UtBOgMhG9I+NQFAIkqveGQ4NshkZn0GBN tGwVyv/XraaFDZO48dTWWOcOCnCTjmxlXoUib8cqiOwFnUbSHh2rvC1u4AmlCgr9Mr1Z 7JysVWX0ITKNHAQHBdjq4h3nwcOsP/W6nSbYZZeJwoa3FFPnOTL8LwmisrmDmZowEUhX GalG4O55J7QsYh850nxPMYVaa4lLknc7KhCLESE8wcTBXFqIBRb0ATVzJIlZQZHIwXC6 QuqU3Fk0QwomOnJodTkE9ZYcAWDxv8HRM/kqsh3BFiynnqo3lf84oX/VyfzZWiiF4hu2 rQBg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CT5tzK3F; 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=yqEP2BzZ2jXeAZHhd1kTnxj7Hp6aFHA67iUShP1YZAg=; b=pFZNrfuZFb4BJ9kqq5eILidrf3Xqe3YPHfCMgigolARd0gla1fp02FsJfp9+GLqgQV KGu1BuQpoV9ItijK24oHbPGYYSyO+uHv+D4eLJ9GV0ysTneBd5xZGGtHW7SdrpJiEbgM IbXTkh8VNrelH0ufuYY7xw5GbWZH3eNsqcs1w= 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=yqEP2BzZ2jXeAZHhd1kTnxj7Hp6aFHA67iUShP1YZAg=; b=NG/uB8w6+ju3jax26L9W54S+fOx4RAvRvNL4Cj8vQrSgOLMCChP+ufRAEL5TK3atyk GM+GtDglo/vO+sovER/2sH1RGXCouY0j8zfQac837JGNqVpNI+voWEixSuklRJYgqhN8 xz0DL6XZpjsctQ+C/Dv6J8C7zfIfXUu2LVBftMcn+GUr/HQEi0x4trmBXhC/Dx0DZ2US UH+uMqIk8d+BL4qZNCjPtFC5io5PHYViGG1EwROV/uUzzwG6ilS4uMoeTw1Qha35XipB kFxKuxm3egj117x+nKez1ePI/XQp9PmVhyIHqJ3Maw2MoGkQB0azboKrMg31v5Rs26cJ XVIQ== X-Gm-Message-State: AGRZ1gIhogPVVwJ0ico4gDemRl/cGzcI/aJSKSGxLbqQut3c97BAl0WX eWl9jkD+/ewY6n4FDtAb4oVatiDA X-Google-Smtp-Source: AJdET5dO4FFOUeGUhpc8HGb0m/ahMF5qrfYVEfY2oTF5U2O+bBCOP8D9etTu6gBItJq2QrVIgsDzAA== X-Received: by 2002:a62:f803:: with SMTP id d3-v6mr1320624pfh.88.1542107823453; Tue, 13 Nov 2018 03:17:03 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:9687:: with SMTP id n7-v6ls4305180plp.10.gmail; Tue, 13 Nov 2018 03:17:03 -0800 (PST) X-Received: by 2002:a17:902:d206:: with SMTP id t6mr4727522ply.193.1542107823140; Tue, 13 Nov 2018 03:17:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107823; cv=none; d=google.com; s=arc-20160816; b=VpQx/+R7jQh2Ur6Kns1HmZrZeNItP35ikfTJTuakmQryuyvA6LETxy41E5N2T6YPzA NROIUHZkxHoiFzo4xr73sYJRc/edLh6hgKZRmvsgwIR0gwu2qviWTeDltvhfcPNLvhnq EcO6YHybxAh+G7LeWCoIGV6aalYKsMlUZTs91vVaMeZxcI8tNqWYF1/SMFNWOhkFzO1p 4ikUiBCfCY7iRVw/rYJ1FBvNq3NcELABI8lN3cvtpuNa30iHgH7uSDgc2v3+5gIArvo5 B1lUW98+8EYzCeSKCyNffV/4QvwcHKMiIwzkKM3YZBLOMa6FH20UcRcoL6wXCu9jvFN0 rQ0g== 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=yqEP2BzZ2jXeAZHhd1kTnxj7Hp6aFHA67iUShP1YZAg=; b=wD2UGW2Ut1AbK8ofRg2aHCt2oDEF22nAe0hY2f3qFHNFgutb0zGxCM4Whf2swcGP7a STu9yHbChcVpIEzfa1h0MSCm0K6zoJfS+mhWObiQXpobdiYNsQ7FN7MblO7odHT+Hflu Jn8DPa42l+Lrzr0ShW0RcxA/3tnyaGG/b6XTAqfvzcse4QZMW/j7bPB253/HleIk69A2 9NBDaHb1h8VjGiLcOPEMAynNHyVO4RToom0sVLkrgd2mirezaAdikqbWKJ1eKz9/Utwx I22n/fd6DPdvYntprfDfcTt8OdZjKX4f0vzA44rFAvluteK003a3NtBiJrGF1amXlmel 6qdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CT5tzK3F; 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 s17-v6sor24133901pfi.2.2018.11.13.03.17.03 for (Google Transport Security); Tue, 13 Nov 2018 03:17: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:a62:1709:: with SMTP id 9mr3422529pfx.249.1542107822825; Tue, 13 Nov 2018 03:17:02 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.16.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:17:02 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 02/26] clk: sunxi-ng: Add check for minimal rate to NKM PLLs Date: Tue, 13 Nov 2018 16:46:09 +0530 Message-Id: <20181113111633.20189-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=CT5tzK3F; 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 | 3 +++ drivers/clk/sunxi-ng/ccu_nkm.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/clk/sunxi-ng/ccu_nkm.c b/drivers/clk/sunxi-ng/ccu_nkm.c index 841840e35e61..6b5ad990f802 100644 --- a/drivers/clk/sunxi-ng/ccu_nkm.c +++ b/drivers/clk/sunxi-ng/ccu_nkm.c @@ -125,6 +125,9 @@ 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) + return nkm->min_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 Tue Nov 13 11:16:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id DBCC02E5422 for ; Tue, 13 Nov 2018 12:17:10 +0100 (CET) Received: by mail-pl1-f199.google.com with SMTP id 34-v6sf9269870plf.6 for ; Tue, 13 Nov 2018 03:17:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107829; cv=pass; d=google.com; s=arc-20160816; b=yWllG9Ebad2WBvLeOIuMQs7QsxLwhJi9gZTg4XvzdiMGdzl3s3SQtu2zKAHFJcvLKb YmNnY0qM5e3EwUMxLG9AHtv9WJ6T1WP8oin2BiKqOX0XqtHXdEV0mZj5VblTgXKoWg8y elbh0wBa4AnybeLaNiuBD0AbL9UPoomiZIeX58NXx/GCXryljH4Zum7/Ry0DR0K+d9bZ 8FNSJksuws07N6S1ulKdiA6l2h04mkDX0lCXKLZsaoEfFklxwMwtXajf7bTR7ysnfAQv gbhkoAutaO2ANKHFj7GwtSUuJQSHFtoXBVpEe1F6LKNxKkhcyQ411esLMmpmVPQ6GQSH Rh9Q== 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=Qbm/NIYuuBGisaoOf8xEjZz2GqJiY+po/xAr8VTc9Ho=; b=A0taRxVkSufR3M5iB3XGMhob9rd41jDrdcV4m9KLQyXBQd79DstoDJcgWtwDBhpwHW /HVOUjr7v6QOEE6iC/pdkh2pEpOHUY3Q076OLSwLLX/CYGTpFmUA30hbMjTh9su3qdEG xIXWnHn4Tm9s7eAG9ZKQhfUm22ZoYmJYzfUIgzxuSj4Ov4WD7kD0CIgzM4U5XymL3jFh jQ2SzF9YwJSTIT1gAbM8MQLyLR20Zjd6R116xSdmFgvxWJqeS6imsWZGH90r6Om+AWIZ zEOb3cHYnAUHz6yyjEzFGbvVeFnPfzQpa4sJwM3Nji8ckgUiSQ0vpXu/W0TMR9kEaLeD chyw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ToJirpXf; 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=Qbm/NIYuuBGisaoOf8xEjZz2GqJiY+po/xAr8VTc9Ho=; b=QQTcBWHR4RzKUQ0A6UpOWDyUr1dPRXqp2XIxsO02hu6TIITnHRCLn21UXiFqHoH5B7 phCKj5LQMaowgiasUcmI6JFB3J35iDNf8r6eBbamFEnqtWNymL8HaH0BXJSKJbhjTKHb 9R1IGsSqpWUWrtM3wouuvTAl1Ud4wjsesOAzI= 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=Qbm/NIYuuBGisaoOf8xEjZz2GqJiY+po/xAr8VTc9Ho=; b=SbHaDHXknysm0ODThTu2H12MYPY7rgejHA7PuRv2MWzuM0ijDHrTmdP6wXKsDxlSor j30Kzegp5xCrZXfKcEhNGQuT57xt8EucXLYmrN2Nh5Ki3vrFjL4SLNHoBxDQWHmP6oY6 7WwPzwaEh15RWaiNkM5hF5VxwxmZGCo3Uk6QmkwKd14+7FfWA4/g6C66kWkpwGxFM5zb N1XgB7T08qqKGDcg0mo0fgkqFAL/Q3maTZf4lCZ4F2HJeY/LWDQEfAslQM7TCneI2G3T Bq9RV+5ym/SPzGsiBogLTd8JR08FbUV9MT/WNxvCQqg5y8ryoMWfygQlSxlkGL+Q/QqS M8tg== X-Gm-Message-State: AGRZ1gLNFNeIkJlWxI6gYSi3CMJKa7naA0N5C8pu1utxABJSQUV45dtu G4kI6hmE0pCwRaPkvjWt2u6oWG4C X-Google-Smtp-Source: AJdET5cB0xxdjhf1WLu2zr7TkpUZOv/oOmmiNFb8h3Ar7cRjF7Q3P3UjsISsKnaML/nSVw727DpFJw== X-Received: by 2002:a17:902:2901:: with SMTP id g1-v6mr1292502plb.0.1542107829572; Tue, 13 Nov 2018 03:17:09 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a7:: with SMTP id a36-v6ls4310343pla.6.gmail; Tue, 13 Nov 2018 03:17:09 -0800 (PST) X-Received: by 2002:a17:902:1123:: with SMTP id d32-v6mr4662618pla.62.1542107829285; Tue, 13 Nov 2018 03:17:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107829; cv=none; d=google.com; s=arc-20160816; b=N3TOdYF0YQZjpqXHDutFn98ZDvdhiN2/ZXhSzr5H5dCgC8rZr5FISrPZxTnyGTpdFw IeBAILtMOqtvw4uglNnmJ/JKk7QwRI2I+UyKejeX6lGPnSyohk4a25GKbMgMt+EgazBJ jh8LCjUeMhDS9Sj/Vb87B5jRmfMdybQ3ZlOKAzYumM3AEu2YpD8wMIo9yyiTEF/vnBJH XRjZh3ZIJvkMZgodEB8I/UlQZhiYCU5e9RR1Owp2Mtj92NMfsnYrbEKjY7ivlmEOieSm XS7SKvMjihRF4cIe8KhwcnsNqykPAhwI1hLQW9E5amcH8t7JSC3BhfmRo1Y7YzdgeAlm UwEw== 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=Qbm/NIYuuBGisaoOf8xEjZz2GqJiY+po/xAr8VTc9Ho=; b=T/5eIG+vkxGyFCZWm4+ZYmuvJOguVAUL27akKTjNutdvyMPhyU0gKdPkQN6E/ZHl+j u5VOuTuAgAZnhJ8iq69FtU5Nxz8emUvhJO0ZY0XAeyGYn2Zgefg0FrWXMfR+nND28TKW oUqAntTk5cIRW2KOsRUIfIaSOcu+z/JhBWlDvD4EzbgQLp3pSnKVkCzoHI757D++/vC/ /7A5EiC5wQlMNMNf+gOhARbKAZOumjDJcEjVdv9DSVvlWYQGAyTuBNBZdn6wgAoJ7eb9 GM4XUfElDerd9kQnIt3H0yObAzfpABntYtzJWsVTbl54O07xLbrdqkzxoSu4ULSAm9Tl lpEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ToJirpXf; 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 m61-v6sor23173609plb.2.2018.11.13.03.17.09 for (Google Transport Security); Tue, 13 Nov 2018 03:17:09 -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:a17:902:3103:: with SMTP id w3-v6mr4770500plb.18.1542107828971; Tue, 13 Nov 2018 03:17:08 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.17.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:17:08 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 03/26] clk: sunxi-ng: Add check for maximum rate to NKM PLLs Date: Tue, 13 Nov 2018 16:46:10 +0530 Message-Id: <20181113111633.20189-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=ToJirpXf; 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, frequency can be set above PLL working range. Add a constraint for maximum supported rate. This way, drivers can specify which is maximum allowed rate for PLL. Signed-off-by: Jagan Teki Acked-by: Stephen Boyd --- drivers/clk/sunxi-ng/ccu_nkm.c | 3 +++ drivers/clk/sunxi-ng/ccu_nkm.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/clk/sunxi-ng/ccu_nkm.c b/drivers/clk/sunxi-ng/ccu_nkm.c index 6b5ad990f802..b8b66cdd30bf 100644 --- a/drivers/clk/sunxi-ng/ccu_nkm.c +++ b/drivers/clk/sunxi-ng/ccu_nkm.c @@ -128,6 +128,9 @@ static unsigned long ccu_nkm_round_rate(struct ccu_mux_internal *mux, if (rate < nkm->min_rate) return nkm->min_rate; + if (nkm->max_rate && rate > nkm->max_rate) + return nkm->max_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 ff5bd00f429f..c82590481188 100644 --- a/drivers/clk/sunxi-ng/ccu_nkm.h +++ b/drivers/clk/sunxi-ng/ccu_nkm.h @@ -36,6 +36,7 @@ struct ccu_nkm { unsigned int fixed_post_div; unsigned int min_rate; + unsigned int max_rate; struct ccu_common common; }; From patchwork Tue Nov 13 11:16:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 12 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 5214A2E5422 for ; Tue, 13 Nov 2018 12:17:17 +0100 (CET) Received: by mail-pf1-f198.google.com with SMTP id z22-v6sf9324764pfi.0 for ; Tue, 13 Nov 2018 03:17:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107836; cv=pass; d=google.com; s=arc-20160816; b=lNhngwWVakGjZyiKwyzIsJr7SH+bf6AJB84h6YGCAD2XitqDQWSZ3mMX/0DmVCT3rA TuwP14/KVxbCMNulpRz9Ptq8Uig5Ioo6bfk0hvA/EDWxtCT83ydauwCMwTM5XG0sX67E jYoMmeKZGIu1TCn3ZCdr8vYBw6K4GNg/ubjev+S9gfwLlw643eYHblV44PLUfntWHTC+ L6HNfJtCaSGYf0PICvyUqWLrI1Oa8vz+nNl9A7iMdcKt3sBydzJzPpQN3Gf8Kl97H2Rb mcdxk9Ju9KqRcONIDcjv4UFKH8ntEU07DovMsvgWih4zXfm8OXhjIabMO/qxCvb3OICQ sQIA== 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=YfB4Wxo8zYhLRoFI6pKvAfSiHqHClDBz4RR353IQ7MVww8ehRIQTzohBjSPsfUkUWb 1I+kN8/IBX6ztnnVFehq3FhGtlEx6bn8hAVi5JIK4RVIMS4iTRPQ+8ZTZTXENtnDrbIs c3dY/Bof4aOMLFRYpMSeFMqspHWUIvo5dJiHoPklUVUytig8h5uSigd3PWtuWF2U7zJ0 SkNKnPCTyJ1Koorhj2tsAw1yvtgP2j/fL8hBSLAaUyCwMMTqi3kwtze3XUvTccIC3w2f PbRnXKy6DOVhI1Y61yQl4qDhT29dcdODypcLiyecaFDx8UpnewiARrrE4qP1SSGiOKiM qaVg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Tvk0A1rd; 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=mq3c50Ypy14j4pv/IGlmt2fJDbZ4M/UueZLLdXLDNLuDxNG5+1/Rkbc8oURuiFe2qB vPnGXHJaYva3ilhMUk1MGIHfl2w2bljZZoxoOc3ozBS/8S0Yn+pm6Scq7ik1B6ebG/GR oUFa7ebDVKLibOD5Vbe5UUTNgwhdMpLUXWuBo= 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=M91miz16Lz/XsZnT/T595BE7xxTx59l8C/M0bT05fYW9I/uCe+XOqgnEEBIJkx2jL5 uGcRp89Q7Rq9rBXdtWZOJ5EEtrbCTQPKpvG1HYJbLqCDEGHDN7FP6w6DhQKviAgaKbKu vG2HmO8E/dPk8LZVXCFFHW1f/S0AGxvbjUR8FiQtXOH2UcvVChFj4ahQiqhNyFYsG/8p SAgWV9TMmQaSrwBQC2cdDlXPo/kPGjsMfsG3IbBBJYVXCv5XehhObbm0Uy88TVk2yqTd vokuTeYF89tQ+xABLg6Dw+68HvsI1MV49v+4f15r2ub5YwNQj55C+bAMfSwbMJ5jNmGn x+Sw== X-Gm-Message-State: AGRZ1gJWHJUomV1MtkupKG1/Ue+S7fv029Mzbk6EwjPEyIcHnpsdMJW/ F0EgG+5h9W5plw19FQo/lhyVkbiT X-Google-Smtp-Source: AJdET5f4HCCUZSFi1PmpRcvHnB44Fa15tHt7Ulbn2F4p9R8bXjOd18g974J6Img0Q0MJ3GEiLy4WJQ== X-Received: by 2002:a62:45d0:: with SMTP id n77mr1971074pfi.78.1542107836029; Tue, 13 Nov 2018 03:17:16 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:ca97:: with SMTP id y23-v6ls4171663pfk.7.gmail; Tue, 13 Nov 2018 03:17:15 -0800 (PST) X-Received: by 2002:a62:7a92:: with SMTP id v140-v6mr4728046pfc.46.1542107835707; Tue, 13 Nov 2018 03:17:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107835; cv=none; d=google.com; s=arc-20160816; b=HHkk5y2OSna20zon5HzIcAPodl2zhR0QbfJ2DcXc55+XCWiZ2pD9aGQdkqLhHaSIgU 3TYKKV1hcclOYusP1FSBT1tikeLkNJO2B5JbsSi5bPFKtS/BwB5qlxrXwp5IDhrYFRql knu0i+Qdv/N9EZKpBP4Kd9iY8lF97JewT+SLfiBue9JAYkiNue5FhurblPQiHWXCF72D ozFtwwhO+3zUPbgGdUez321E4gn8WhV0+QPP5HyN6kVgsogCIt0f73wrDcbKMIzxteaD c2vlSKw2iFHeLCrdkmRN3/Qde/HLN+sy3KeQPdHDSlbS/LWb3D6lPTgTV+dfu/etpDX8 C5pw== 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=jDqMRiXYA6kwNEMyrRsBJuySclpAqBr/qupQVP1oeD+sAAC+ppasJTMv1f5I8VGrUs vnJIHJcrws8k4y3/nzzfHWo9Sv5WtedseFsxGKrJe0XRsjkl2QoVs3UJ24syuOwLZlhv HQIrJoxnN2ljtFI8ZpZd3RXnf6uqUZ5yFnmSm62OQHR8F3KA3hymIlLSy59sPe6fn9I9 ClTLbauNOF2tOdxqOVLXn98xKGWPbgi4ofNG5u1wkq2E2OGqmVk9XV//rI7vp/mNHK5m t92jGf/8Vv6h1/XqicRFyYM82hvriYQ0xTj/ID4MxJUQ/raNf3mrNLCROmWMNz0/BtTa fOkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Tvk0A1rd; 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 z20-v6sor21589910pgv.46.2018.11.13.03.17.15 for (Google Transport Security); Tue, 13 Nov 2018 03:17:15 -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:a63:65c7:: with SMTP id z190mr4375174pgb.249.1542107835284; Tue, 13 Nov 2018 03:17:15 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.17.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:17:14 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 04/26] drm/sun4i: sun6i_mipi_dsi: Add has_mod_clk quirk Date: Tue, 13 Nov 2018 16:46:11 +0530 Message-Id: <20181113111633.20189-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=Tvk0A1rd; 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 Tue Nov 13 11:16:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 13 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 739B22E5422 for ; Tue, 13 Nov 2018 12:17:23 +0100 (CET) Received: by mail-pl1-f200.google.com with SMTP id e97-v6sf9263133plb.10 for ; Tue, 13 Nov 2018 03:17:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107842; cv=pass; d=google.com; s=arc-20160816; b=koXDD47meyuiqJsBepH/lcGo8webkGpuNRSNNJybZj7UKZtMRevR8xQrWQulgHecCM 08zSlq4jxfSGL3JtQV4UHAqYAATNlq5jlYUH5mX5Fnm51Ck+ocQOOqDRSYXk/yqywjgo Lz3MIpmVNY4wSm4VmJB1+sttugvf4wr0FiQiXNIrbuP6FECQ9+lo+DS0Ahd/N4GUlBR4 lfjjmjq14NrBKRJ88UB9Asj9ZsrIj9exH4tt694mmFDQZuXa9W+qqI4eXLr8mMuwIwt7 PudIA+xcIYuEU6a321i1fhmwtwlLwE5OuV8sJyT1ELXha+Y3MdnfCDidzaPjgzTrmCn3 EP1Q== 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=ApZWPImHu2e5kIQ/lZRTI9q9deZXPU/lg4XTfo09uPOvA2VmRrEtPvFD1xuxsRkWjV 65+/i1jdWsUV390F9nBzyX7tqTj1yix6Boo1Ag/zZZ6c4QKVTqB0DfsqhUgCedNeykdt PFmnGaQP2R2orDnopQcFaoFiwNTk2UbALA8/A3dPotcE5Ryk8AKsSAOthQHH1/h8GWJE cckenAchvjb53b8rxdQY6EkG5rdN2dxdgLQwPrKnJNvqKg5LuO/m3O8RUJyDc2j41wPE zSNbLdpsrWdCGV8xeeGgzk0fwE/XZn+a/6zn79BWnNSxanGvbld94R6CCnAC9SMd5cmX UxdQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VFv7Hyja; 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=CFb9NbqG6FxYxZCv0YH59mtEHpdzkT0tKAvHDN2gYeTJfC49i8G1aJP/tEDfHYdu/Q eUQYKt+/VjydDxFWut8T8dVLcrcYqlIxvVQxxCUGZNINJI8Mo2zYQxNzNsB9TmeIEDBn pphpMnqyVti3Ae8jYKpl1EvVwSJtIL5wA3vWs= 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=r/uvsIVGu+zvIdTFUbbzyrcaRxy57eoYqOg+AJXnRvfRSheuE7ut+oZ5ANwuiQi6Av Gh40YgI8K/Epp5Tbu8Zz/tn0k/aHtYqkFmOpkQWFwLLVnOC6yRn7KyXMjO+RNOF/o4kQ zhYq82HlvoEUaiBJxKeAVxJpD55Ay6vb2m51fmRoQU9lpAkZKA8phpT9Dj77bMT69cB+ qyKK5uEgo+VBC/udC6LtWKxZ/hi1NsWnt4vQeIPr1gTcJyWZ1iwQqYxcAp81CwiR91fV jn4pctk/mZUAcLQ/MNIjOXqFTxX/jU/+7vg24LXCrJ11uF+NopTdNmzseRfiuf49Cgs8 Anvw== X-Gm-Message-State: AGRZ1gLTHiBCRRaOFGW58Up1Z3wqeN/NtcZEP9WV2aKexpJoRjgvYUoX kA5Ax6KkCd/y/jcPIy5I+Z1Bp9N7 X-Google-Smtp-Source: AJdET5ecprHGNBXGhOb09AsDDmM7+6VOTpyPUYUzX8DKVX6+S0f5kHEko7wgftGHlTBoq1E6urECQQ== X-Received: by 2002:aa7:8310:: with SMTP id t16-v6mr1088845pfm.34.1542107842179; Tue, 13 Nov 2018 03:17:22 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:938b:: with SMTP id r11-v6ls4173130pfk.12.gmail; Tue, 13 Nov 2018 03:17:21 -0800 (PST) X-Received: by 2002:a63:5664:: with SMTP id g36mr4317008pgm.313.1542107841873; Tue, 13 Nov 2018 03:17:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107841; cv=none; d=google.com; s=arc-20160816; b=RRXGdxb4h5ev/bOJwxF0de+1q5+ZL4ESmkis70eYfcWZCgGygmW5MA/IwbSUkeRSJn pDaIuvvJ5Siv0UdiqC8x54NFwfMSvTsiO4VOFcpcM7Lq2Xi9VsKxDlbp3zqctfv9bX7j eD9KgLbf9QqVLnhcaUrWdnIGZ5g5D9hzGSkp7Mzwy1cvpwpi5IMb4Lkvqp17dwD49aG/ mtDMqjGPL/j6ozg5otAZhoPfNhT8Q0MJo7ZYZt0j1teD942PtApuh8bGc1IjM2qezrrl p/KnMr29rlZUHBmo8t9XaFJoMnn1irotzRZFKXf53u2w8A+2Hu+DotVONUKK8rIqsSTv dd2w== 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=DhcDXXJZzUUxJQcnkeGxWd76PTUDOALrj6AuG/D/mmYusUSGFl+a1WH80WxN0OhXiq iysn0JJYTIYILVIMrmyCPs9/Ru6OJD4sIn5vpNCQPoIXPRANd5X3mMh3D5j6t2h5mvSY SXIx3qqGFGITBNzvlYvnBCXo5IhSusvlGsDYqNh2OVUqRmgGH26YSxz+qK/7ksP6HZGY oBEUBEcCzqrbRKqtYiTR7PTLMlMJLQpUqyHxOzmr0FUn0Z1Za4JC6zkY2T/oNlg8a/IQ Ncu/f57m6ntUqBt539xxJ3XZ2zyhRnyq5KEWqwwPzFmSsxmYPyYhmotEO/O1Huyks5PX Ut4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VFv7Hyja; 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 w10-v6sor22655982plp.31.2018.11.13.03.17.21 for (Google Transport Security); Tue, 13 Nov 2018 03:17:21 -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:a17:902:bf03:: with SMTP id bi3-v6mr4742841plb.288.1542107841544; Tue, 13 Nov 2018 03:17:21 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.17.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:17:20 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 05/26] drm/sun4i: sun6i_mipi_dsi: Add Allwinner A64 MIPI DSI support Date: Tue, 13 Nov 2018 16:46:12 +0530 Message-Id: <20181113111633.20189-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=VFv7Hyja; 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 Tue Nov 13 11:16: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: 14 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 8FBA62E5422 for ; Tue, 13 Nov 2018 12:17:29 +0100 (CET) Received: by mail-pf1-f200.google.com with SMTP id z22-v6sf9325050pfi.0 for ; Tue, 13 Nov 2018 03:17:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107848; cv=pass; d=google.com; s=arc-20160816; b=iTvadliGaL3IrzENvriEvzIyR8N55nI6rCeqKOVAgxQjd30y4OqRQ9IxxBbNqt3d/z uJv66s0mciBpeLSwGlx59my0du9mnsBozP/0o48r5NhbbdhnFkWNfUMNptLtANbtxk0C E51DHxJKeEDGTo6/2CPw3TW+N0if9v9PRAFYO97mp+zBTa/cHR6X73IHAoeS8mnNkFFJ 7pkifMYRz4OXFW9KRNu81oKr7UDIlGIMWgTetq/fcq4xlGer/AcNSgNgip3nVNq8AVG/ BfPb2Ju/29pduU52MgSLtYxOD4MBPL7Shhjb3nN+jCykxCjF3Egxkckpj4aK7ysddUm4 T3EA== 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=CN/sPz29mPfMlfrH3kvk+O4v7QI44hZ/eOBLQuME8vj1ItWVYMyJOwL4N8C11v/Dyv RsPaDi+wPVRX6GwmfFt+4+Fd1gfzR5iJ6GQ2Hrtx7qxq9flsF9sevT2xt2G54eRDAFd8 ndj6TNfa5Jfp7LSI1xxOqcVx48L72zAQjh+FjtnJojxpBck+Ohe6w8EDHw2KAC3guwGl yFutm2fXWD58YqJiB0sxNZi1N6VIzbtr1HnpoWLYAriOdCiZdwuYYnAqwDuU9z/Qg0f2 +M8DCFxKu9OihHwTn2+1fVsUTnULnLGI61EGcT6JmtpfI7LfwKG3aeCJ9KhLkvzs4OAk iB3w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Lp6RzImk; 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=f8vtLx5XZ8ls2c/HFwgCem7oAOR/ils/5snLweHP+HmtzC2jLztH4Ha6MAZMDjykvl O1USRmqpTn93hsCAA2xoCmQNhVdDD+alOaKAuJZ6ZwCHYF0h92jKGMsT96Jqf48wr/WO jXAEHLJFTiaunuVAZNCxqz5gZ33K/rPZWOQLM= 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=PuDB+Z5OQGF3mRi+wSRQ5m3v7xSnnBQlt9GKUyLgjnnp9QMqi/vbNSfimBbqssXzBc L5OB2JxnjwEHU8+buqknbWdiVmRyMpALHWZOODH6bt8eOpRV3W9lMjRd7PY9ynsyJ+vz M9oo2BbusSxI4tfDaIwhv5ZLXLLpuIVI5J4dih2UsUhxh2jdj4W2q5Ro5osQ63qGC9yO K8/76IR3BD3p46CFtdP5npf/6wZLFJZ/QnrTh9rZmsrTF1ebGAomljukE9WvCV+Nnkt/ TvfWikCBy1np1/Y7vXyPQYAnfWI0idpetIaWklKQpY107OD9YlWV8G7vBtOnqy22uaEK 0z4g== X-Gm-Message-State: AGRZ1gI9+b5ygoOF7+8AhsHRCiMMLz69U/hxwSJaNmNljGrbUqankQrx aL05stqtTWkliuBcjouTIZgk8NXI X-Google-Smtp-Source: AJdET5c8HhY7SLmLDtk0mFEcVt3kIc10XkTLVIuZ4QLJyxpO96MV3ZGP1V9PMiVF35C5fsF4QGj/tg== X-Received: by 2002:a62:c6d5:: with SMTP id x82-v6mr1989876pfk.65.1542107848279; Tue, 13 Nov 2018 03:17:28 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:69c5:: with SMTP id e188ls1775835pgc.19.gmail; Tue, 13 Nov 2018 03:17:28 -0800 (PST) X-Received: by 2002:a62:571b:: with SMTP id l27-v6mr4744686pfb.209.1542107847979; Tue, 13 Nov 2018 03:17:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107847; cv=none; d=google.com; s=arc-20160816; b=MxhzRLd2bnUzqkBWVY/cADahQFxcXK7GK33wXritYc7OcemsVHHqLMF7OkO7gKzlou KROTrvQea8tjEi4cSFlJPaI0LAheeSZtf9nUO1LF+URvH570TrAqZi9p6/5uWnA8wagP BGyara4ZMT/e1GxqR9qeeY5HDvzAdKr8KEMVW1o8pENWR8mjVdy+AIgcl5zNSu01av6D KA2/4if23uYKkGiop458MVMeO9VzoeER/8k8rsy9mAIoik83was8aCoWlAPiq8GW1/yw 439DBcv2HkcIDCLT4gv1KLQ2+DkBnSq1+niqM8nIRhs2NlWLybwTYJbfTiG0kTFctBfX 4daA== 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=RV7S6gForjk8aWxTDzvDt2tZA4kR0wizh1azQxmHNVNEuwuFosOwWnORt5kVZOTD6p mc0CXoZBEfsQE80GARwi+Hy+lAmSkCPZOXQknZVdmbj3gegGz4pWbEcBMjqu9TGp/Ytq LsQbARVHlN9N96+iAk5GzM3bDaRyOO9i2b9+afK5RnaKkpDIqs659te+gyKvZ10y63OO UV2RNfQ3v6iiYNB8PTYGY3v5LvqVxGo10HpOhF6urrPzYOO2TPE+6bNhliuoLt9mqWJc hsC0Uh9Vwwf1RndCqri+yV3GUouoAbvNbq4zlSGT7tu0h/q03Pzy7+lMeoDyWOhKCyxJ E4ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Lp6RzImk; 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 g6-v6sor22694112plp.8.2018.11.13.03.17.27 for (Google Transport Security); Tue, 13 Nov 2018 03:17:27 -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:a17:902:c5:: with SMTP id a63-v6mr4683490pla.201.1542107847654; Tue, 13 Nov 2018 03:17:27 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.17.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:17:27 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 06/26] dt-bindings: sun6i-dsi: Add compatible for A64 MIPI DSI Date: Tue, 13 Nov 2018 16:46:13 +0530 Message-Id: <20181113111633.20189-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=Lp6RzImk; 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 Tue Nov 13 11:16: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: 15 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id E80B52E5422 for ; Tue, 13 Nov 2018 12:17:35 +0100 (CET) Received: by mail-pg1-f199.google.com with SMTP id a18sf7830263pga.16 for ; Tue, 13 Nov 2018 03:17:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107854; cv=pass; d=google.com; s=arc-20160816; b=bg3x7vne5BsNOoa/PZPREIX5PYesmXv5gPLRhXDymk0SvrgzK/FhFFr58oT7TxAuT4 HeXQDo9QEU85C8BbmuZsLilCY+lBELvB5UF2MVMnvuApk05Z477DriflD9rJsydTJyUP u3OAVRWmIrE8CFAsnCF13XWEVkT9YloCmTKrw3+gqr6EhpjvNIdMyZrlBgqM3hX1Sonk B63uy9YVgEcmVzMc1KeGmusCkJdtubK7ZuEMJj0A5TJPSnhNKHfpH9MVXQmCLviD5bxK c60BpFiONsvpyWtpeFX4Oy42OAsRYFs6AM9iqz9s4FbjXZjRZGuqyqdr5r5St8Ix1cs3 8/Yg== 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=CjzCZX12zL0zbNtONUaDcvy9FmehzyQjWt210U6GJPwf8sSYG7QeO8x3VSvMMTVWjl aNQNCn9iEFkdc9ZUg/XGAd6R+67DsXvSV7TVVfONvgtTqIJX09nsJwfdDBhmlCQxtJMU 8ntcN0DgtaxoxPb+tMMsJ1rLRptFBLsbxHHw/YjssZ5kZhPFbskw6MYYrAUcXfbKkhul 4UhwDF5gU8eMvfg64AoqmCApy8Zu0AcJP8rZIi98vZ6i/xUYQoLMIcUVuAtUFFqtnE7L rWmEc9UnBmf8cWDNX0KNL59zswNP/jb9ei0/j2q/GkALxuzEk3P48H09irvXsVr7pykz SXDA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aSMmA108; 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=bRUddU9wwqzHcHcKbDwJCMSEGi/Yl3/tcvFQCnUN748LvBYsMLtkTBg0OJ3lWT7uqX Bq8lVx64nTwkkMT7d7aHMf1v9Lqj8RziUxwG2vJSleSlFZWc0K+jgUJPj+PBtLLRFv99 xI5/7DNdtcefUwm+5gFoIvcRSHqsOteKWhDzg= 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=BNOnmd24uaTlovLqowQIiqb10j3194IW4I4K1OE3nVi0efZVKpe5eWVlyzsCOwFkYz 3mg/gaJadxb74Ysql6RPUD05IqOH6C4eNQiGtlZPuwge/vW+2ATqbxq3/PHBx1mNhOF0 Q3oLQF9tjYQnJu+DfqKt6WgmoYIlO44CmW5UjwhimTvetbI8QKaE2FfggGFTjdhNzP1G Tur5c3EWUSvEVkoMZP2UIR+GnruRC/nTa2+9vEBTecF+Ng+HEhnCTIRHSFLDrMKwz5hP Hm9Z0rqiK+Xqa17b6JBRgFCjrLxoYWcDTYOxZW1nVWH+0Z1Q0Gx4q+H6fye/avJnCgY3 YAMw== X-Gm-Message-State: AGRZ1gIGsgy3sfhC98AO3Y7QdXRpdNKmyl7IhQLjymV/dd5ZKydqzBb4 DGudbKzPT/EyP1FFdvcG8QO13oEy X-Google-Smtp-Source: AJdET5dLhbmrkMGkFRWAMpAyLi3Ytil18oWVGYgpru0Ta9+NeQLaQ8zq8ncFWqx1jJa/ZjFMK7xMMw== X-Received: by 2002:a17:902:1c5:: with SMTP id b63-v6mr1765734plb.48.1542107854651; Tue, 13 Nov 2018 03:17:34 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:1007:: with SMTP id y7-v6ls4176807pfi.0.gmail; Tue, 13 Nov 2018 03:17:34 -0800 (PST) X-Received: by 2002:a63:d301:: with SMTP id b1mr4404169pgg.61.1542107854367; Tue, 13 Nov 2018 03:17:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107854; cv=none; d=google.com; s=arc-20160816; b=TQ9mq5zXBQ/E7CQKhHC6LCQNLmAisSQpLyVdvXGIlpiNTpMTJsAFsPh6C6Je3rI3Gc GOOjvLv9yPUJSx2DR83EJGLSHKUmg+CUPJgYUlzTFanVbW48tQkQ+U5r5rweMsFjmApw WZHd2SQTYPicGl3ZO4+Lgc3nRZvjwYzpm0/xtYm6MsYa9dZWjv6eKy6jDols38uk5rP+ 2UEJvoEzTe5YchF9lu8nkUT1HQIRWTVKuxW5z6FskuBC3WoqalT+x6nPkC56JaDsfMF4 xmkmWSUBh3ENfNgJW8Ghv5gGzdi0j+esAhgjwmv+ppv182jGj8nreXMfDXF6urE7P2jO XibA== 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=vbne9y/WCnWtr+KGrMzYiBqTSkxNyoQn8l846bwRnsQ6YujkN50QjFHPyp2bjM6NZL Y+xQfmclEMRzruOar7ULnGngU9jLNRjw7bb0rFcM2TOIULF3EucnbPbOnGoasph7mg0W CFfRoql5Pk6j1BVMExYCh/MZwNK+2MncG7XsSqKvikjCv3FzlfkTTKRVGDF5d5rm4L7t /vVKOTk/PvLJs+HyjlMW0RFeePzHu7rMT1iuB867R59IlR/lhU9BH8DayRbKnWcMVIww fGbH3QggMiEUoXSwo0SGT/99xsKqMH7JTsuKS1J7U7owsH6cIKUHSKzXY8yb58Pe+cqD 56kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aSMmA108; 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 z9-v6sor24072635pfd.58.2018.11.13.03.17.34 for (Google Transport Security); Tue, 13 Nov 2018 03:17:34 -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:a62:3101:: with SMTP id x1-v6mr4852009pfx.204.1542107854069; Tue, 13 Nov 2018 03:17:34 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.17.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:17:33 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 07/26] drm/sun4i: sun6i_mipi_dsi: Add DSI Generic short write 2 param transfer Date: Tue, 13 Nov 2018 16:46:14 +0530 Message-Id: <20181113111633.20189-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=aSMmA108; 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 Tue Nov 13 11:16: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: 16 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 5C5392E5422 for ; Tue, 13 Nov 2018 12:17:42 +0100 (CET) Received: by mail-pg1-f198.google.com with SMTP id 202sf7249202pgb.6 for ; Tue, 13 Nov 2018 03:17:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107861; cv=pass; d=google.com; s=arc-20160816; b=to6oCHXLK+HwFwY1ltx4+bZ/ue7lu1bqxE75Tr7Llfkr676moM5bofnZ8pGJnsBuYA McsBAUnT2q/XazP4ic7pRJfCl7+uV84pix02hGkwXICHEVWtk3ndLRHFqxso0z8hxasS niIdPYhSWh/uYYuEmvlUmXDXWiTlHHsNV6bpJ1mEE/Ip9YINYqYcoLoOmvf20v19nLdf tYVJ54i+mcSoeho+4KPd0YM1cZxoDCfykB/o/QcMlZaB6sub/wR/HJWAr3D6VcW19GV5 W9nSJxAnOeR7tSmXJsxXJCrFmMNC98+0WLY7u7NqMkEDnt9X/3uCe2RYfur30xTJlVZc bdGQ== 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=rCYzhNJFb/CoGYAKzI3iqrtOUmQxW0PESvSyXzaqWC0=; b=WFjSMNPSO5o/fgsDYhGCCarCIKM9Y4c2rCGPWKKfzKM8hprwUzMGdD1O+3x+U0kFCJ WC2cN9O02WDiNYsWnOCuW5wE9TcfPIUK5c9nYyA17BYR3QB0X2J7Zog1xVReGTOi1VwQ UNIOl9rjBpmj+k6jFmNURDZpkrTA2kClqOhtYA85BG6nbMDBeZLflXl0VCHVeo/zVrEi 3xXbJZqnNfi6WU0L5ZQxILvnSE6y97cj3K0RnPo4q2N8qRIeyd09KIlrBImfJXGF8OiG +KJtxfVZWyIpFTgQYptFkRWx0KWHRq4Nhfe7elaNiOsh10hineryaco7+OLbcfGwPmMy 4noQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=etDac7bq; 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=rCYzhNJFb/CoGYAKzI3iqrtOUmQxW0PESvSyXzaqWC0=; b=Dpt+VRtuIjPS137bbj1uFpqtl3JXE7s82C5Z1ssl8kjCYKzrnZkwlg46CuN4r7jt9G D1hRUw3r1igLIH8+WE50ZJ0svegugp6NfmKCBySolLOUoART1rJrosAIq89UiwZF351F C3YqH0qtfHlaxIvwdWCBKfevndxIXFhFwWncs= 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=rCYzhNJFb/CoGYAKzI3iqrtOUmQxW0PESvSyXzaqWC0=; b=gxugTo1lovNWxmQcgDN1Q2trI1oFWDtwZHoXQyvRP/mkKLVkJWpumcbMis/3syF7fz ku20YkqvQ3/w0vI9J5gzb352AuE/jbd7TCow+OUYSOUKDnB25y7Touy313mfYWgvHI4H fJqjFb8F+VbqmCRjs9pVScoJHt9/iYhNhHl5JM2uM37HJDhrY2ASOI8+VWXgZeGOSVum X0WNGdwz3deVBvll9mnUE9dwWGlYvSMaAfpk7wfmhfE/ddrqJdaPQQ7Xy2ZwUTwNBOyp k2ljrG8PEZ2kIC9cErtG+ow0yXlCYrcuimoWU7lmF++IkGv2m92h/GakQXT1cIpKueK9 wOlg== X-Gm-Message-State: AGRZ1gJnIwUsGTZqM/iVnZdjNaKtmUFL43Sum6E5NF2OUs2Q48nESpjA FcSD9LA5RglconUU/EhyvQWSeAFO X-Google-Smtp-Source: AJdET5ccVdRkPjCXQjpDpvX/J03Wch6bCWt3bEDsZ8svHs7M/HqgY5FLwVxJVoJb8wc4rcFNYm0JYw== X-Received: by 2002:a17:902:ac1:: with SMTP id 59-v6mr1274794plp.66.1542107861063; Tue, 13 Nov 2018 03:17:41 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b483:: with SMTP id y3-v6ls4319740plr.3.gmail; Tue, 13 Nov 2018 03:17:40 -0800 (PST) X-Received: by 2002:a17:902:6e17:: with SMTP id u23-v6mr4756186plk.127.1542107860779; Tue, 13 Nov 2018 03:17:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107860; cv=none; d=google.com; s=arc-20160816; b=vhsEHLheRs0Dt+9HlVXgI2p0cZ3hCfMeEkb4HWQIZCOK0vwMXG7k7mSHbllJS1E6zp GV2oKZYufl8TzL/8rh4gyRZNEczklLiCTyvAa+2tbNaDmJA6nN1/WG0fJOhMZQ2kCsXU edhOKsL2Bjy1SftfubhhDK8BQFi16iUTVcy4yT/p+c8cEZN6m6irn4ZRC4D6NmqRTKjJ jkyL/Dl/HWjiO9Dw8mG07ELPxBBLcusRt4TMwlFg7kO63rHSloQ6aSkQibFTbp8riUqP f1oUmxj7Rn+et8Huldr/sVkBtLoWQCp/DYmJeV7Zrr+KwEmZufTgt3skR6O69h/0EQPz z+sw== 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=rCYzhNJFb/CoGYAKzI3iqrtOUmQxW0PESvSyXzaqWC0=; b=wUXIeoVKgTCIv/y9rO/ALIw0kVFzuTooaFuH9zAm4/+6S3A6Huqnu+QjJjkGL2iiIX v6YA5LmbQVV3u7NvES+6D5cS73GSwqOTlo6/lQb+sk4uRz0JX8/6R08H/sSYX1+GxtCy oUYRgg21Q7FVxgi0HMzz1pbXj1Anibw65rwhwOAZwXQjR1j+NKmjIpwyVuK7d+7HKLrN gUb4ahX3Uub7NhZiseiaXNjclcWukYXUUIrv1zjZQuQDsRzvUeAKiV6r4QmOERMJ142a EpDkVFsdOZ4dsd5Qv7jsf8G5XCTby2+pDiyVxZbCGhWQoqrGX7OOgWM0rt7O8e6d+UfD Va1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=etDac7bq; 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 p72-v6sor23499228pfk.73.2018.11.13.03.17.40 for (Google Transport Security); Tue, 13 Nov 2018 03:17:40 -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:a62:380e:: with SMTP id f14-v6mr4662628pfa.203.1542107860438; Tue, 13 Nov 2018 03:17:40 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.17.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:17:39 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 08/26] drm/sun4i: sun6i_mipi_dsi: Fix VBP size calculation Date: Tue, 13 Nov 2018 16:46:15 +0530 Message-Id: <20181113111633.20189-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=etDac7bq; 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 horizontal and vertical back porch calculation in BSP code is simply following the Linux drm comment diagram, in include/drm/drm_modes.h which is [hv]back porch = [hv]total - [hv]sync_end BSP code form BPI-M64-bsp is calculating vertical back porch as (from linux-sunxi/drivers/video/sunxi/disp2/disp/de/disp_lcd.c) timmings->ver_sync_time= panel_info->lcd_vspw; timmings->ver_back_porch= panel_info->lcd_vbp-panel_info->lcd_vspw; vbp = panel->lcd_vbp; vspw = panel->lcd_vspw; dsi_dev[sel]->dsi_basic_size0.bits.vbp = vbp-vspw; dsi_dev[sel]->dsi_basic_size0.bits.vbp = panel->lcd_vbp - panel->lcd_vspw; => timmings->ver_back_porch + panel_info->lcd_vspw - panel_info->lcd_vspw => timmings->ver_back_porch => mode->vtotal - mode->end Which evatually same as mode->vtotal - mode->vsync_end so update the same in SUN6I_DSI_BASIC_SIZE0_VBP On the information note, existing SUN6I_DSI_BASIC_SIZE0_VSA is proper value. 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..eeea977604ac 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -526,8 +526,8 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, regmap_write(dsi->regs, SUN6I_DSI_BASIC_SIZE0_REG, SUN6I_DSI_BASIC_SIZE0_VSA(mode->vsync_end - mode->vsync_start) | - SUN6I_DSI_BASIC_SIZE0_VBP(mode->vsync_start - - mode->vdisplay)); + SUN6I_DSI_BASIC_SIZE0_VBP(mode->vtotal - + mode->vsync_end)); regmap_write(dsi->regs, SUN6I_DSI_BASIC_SIZE1_REG, SUN6I_DSI_BASIC_SIZE1_VACT(mode->vdisplay) | From patchwork Tue Nov 13 11:16: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: 17 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 92AFA2E5422 for ; Tue, 13 Nov 2018 12:17:48 +0100 (CET) Received: by mail-pl1-f198.google.com with SMTP id d23sf4586796plj.22 for ; Tue, 13 Nov 2018 03:17:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107867; cv=pass; d=google.com; s=arc-20160816; b=faJrlTkcxuyoVZ1ZbkVAht7E8O9b32oDHTM1S8q2uqCfD5dOOeebv8U5E2i9wR7jLc MDI8VSZzTaI213vVYvUkXc+ZYJL/1o7LeBLT57+yMmgKE8TV56QwXA+tdfk+i/Pbhkif Xw67D1CQ2HQx3AInvvFkvEmlKQlymMu1EYXWZay9dE2cBQCfDACdGXfWFxZhx0mRKBUS tuU6P+LUvqeG4hWoRCp52ElhtONUY8LhbdFrqoODBUk+EgfmAzSCMZZ2zscgxrnyv2cS FPSRdKmchkPdQuvbWtymScEZxzBjE3UMIzhkqCaV4O/JQFuM60tikSdydG7HbGka85IZ 0/6w== 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=P7xZtqhtyLeCo2JvRyz6iw0Lru8qOAi+ZigmyrveCcU=; b=djf+IowHaLBd4UNqag9yQha4+yqvfHmwX28hSQcbIOXALcYWqMuo5WaVbH39fhQu2I zsPau2icTHQb5QMDaPvxKuasbJM/m2Dh6Zb9szELsdTY4xkcpij/57Z4hBmbcDEfLHsY ZwM816FRI3T1HH7ZyN5/lnCu5UZYnNZfZatYcR7kOzEQfA3yK6rxi6WjTQiyfdyyVtLg +jMKRvMgYJAasgC7+ufnQhjrVhrB4gNbqT2LPOsdLSbqz/OOTThj3caOsOVfXu1VrGqp KvOel60mWrdsY0GW/QrM/6d1mKPF+UrLOI6APdmKIDK0u+L0y2VOLKMLo/IrMQcBtLla KWIg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=NdohmiLl; 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=P7xZtqhtyLeCo2JvRyz6iw0Lru8qOAi+ZigmyrveCcU=; b=NCYjRUSfrs2fWl6jcCrxNgPPk0WX4l5XLLCnTnc5yPKuLFXaoRFstZ6ZmTK7NLWa5k cqbUFZIfYDP4Vlq/1i0zgZhufu5XlymZ2H47FM9iEutDw9ts3rZmo9n3hB+1OA0/XYHj o53jzzrGoyqY6qJcNF8COrXMa9p3UWkJdDRgk= 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=P7xZtqhtyLeCo2JvRyz6iw0Lru8qOAi+ZigmyrveCcU=; b=Ujj+AaufQrdbPDqAl59O8FHxoaSlDXPAogr5SyjerI9ZhIU5HjpcMLH7ZBFVkc0zmV 24GNaR9UrxEjmwJsvOf1XhUtMI2wsGucSITagLGNDM1O14NzFRphWOdOUmmEu06iVjjq 62eATgNESp4Tt97z0gy+vFLSqZaK5TokXQ4p32zGniwQrQHd9MXbXvr5c1kbu/0Lf/8K 4txy/8aYTUCnmuZzw84b088z0OUhvFN8XBt+0wwuCj7KLc4ERVflAaI0nUA6N+k4eafq L+GukcLJsBPL/xMOmPhRzr+i7Lq+N2ikotktirTsWZOU1LMUAyVIVojS0iAi91MF5RjD 5D9g== X-Gm-Message-State: AGRZ1gLnTCjr9wuzZHh+iUjdYwLQeYmXwgNyt2oDhSNhHkOIe9ec3kls C7z8t0Waayws1X46fdy/FgTdTvll X-Google-Smtp-Source: AJdET5dGJwZuruLr4TJPGhMb13KLMWvM9pzsDUb5MrsHx+GfDtj950TVRQp96L/2356QhDuLaNkDYQ== X-Received: by 2002:a17:902:a403:: with SMTP id p3-v6mr1126480plq.8.1542107867292; Tue, 13 Nov 2018 03:17:47 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:8adb:: with SMTP id o88-v6ls4172452pfk.6.gmail; Tue, 13 Nov 2018 03:17:47 -0800 (PST) X-Received: by 2002:a63:2b01:: with SMTP id r1mr4314515pgr.432.1542107866987; Tue, 13 Nov 2018 03:17:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107866; cv=none; d=google.com; s=arc-20160816; b=axoGEumhaax23wE3Xtp9Ns8ZKxQp1djooWu3JwRQtiBDdso52nafE6/X4YD93nn9mh JjyHumu2xjxjFi9Py/anWQyVKvrZSx2huTSCTzDpT9pVvpzw/jw7pPGIIIZVQySp9LGO mumMFlDOGXBzWSZ9GdZLksK3tcxgz2nj42ayQhQtyIfi4sCNyi6UlAGrD09Kr0pXkWCW E/Kld5YjXq8JlD0DGN1S7NjrtzVtSCEKPNqqz8woPUIeOrtTE+YztA7xccTMpDA/174D 1HUS20+AzqOH+Uu8eZC2MVKG1iBYz7RE7XpMhaPHwUwzuqH28iZGlbFezWtCtkRrC0uU yMjA== 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=P7xZtqhtyLeCo2JvRyz6iw0Lru8qOAi+ZigmyrveCcU=; b=UZR6Bs8IUsJxBHlcMvhZnXcjzMRu27/0sX0nAQCA9aD/NbXSDBgKOKLvMZgJPSw60O mcFfZwfDdJwIWCsiyMS8QxYQkVhqBlI8je1tsXmD5Jmyfc2i/gUEAWJGp6gSnNW6jt88 FkQACfl7qB3AqUeOwID4ckkOEK2Q4+A2ud6wKRz0yPxR/u1ALgq48kETXyRndMDZdH1x Kn+zticicv1yKG/XGOxy8dD6EW9iQi/E99g/IzPEmL2F76/DgLzyaYtAYOv6yrDRng41 Bbh7nWDaS3uOF0XRGEWUVfdvY597vhwKEbEedeSqkF0erzoPtTUrItCwCBVEBq3eViX8 MdsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=NdohmiLl; 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 q79-v6sor14814197pfa.57.2018.11.13.03.17.46 for (Google Transport Security); Tue, 13 Nov 2018 03: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:a62:9f42:: with SMTP id g63-v6mr4692347pfe.144.1542107866653; Tue, 13 Nov 2018 03:17:46 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.17.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:17:46 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 09/26] drm/sun4i: sun6i_mipi_dsi: Fix TCON DRQ set bits Date: Tue, 13 Nov 2018 16:46:16 +0530 Message-Id: <20181113111633.20189-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=NdohmiLl; 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 eeea977604ac..fc4252d96c38 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 Tue Nov 13 11:16: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: 18 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id F16602E5422 for ; Tue, 13 Nov 2018 12:17:54 +0100 (CET) Received: by mail-pg1-f197.google.com with SMTP id v72sf7846391pgb.10 for ; Tue, 13 Nov 2018 03:17:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107873; cv=pass; d=google.com; s=arc-20160816; b=vryztDCWnVyvgP2be1MyaZBbkYmvoYH+PM+TKJcRz7w+xeqUDJQGiDlQEk2zFPuLOv HfSkf3EQqv+oxohJXSc2BGx5eP5Z2spl6KZwBsXVqWc5jBDdsxcUAc0tNs1cVzXXt+fm 0dX+Lbr7qBh/28LLPhPNT8+WBsyJbSv+rFDjsFIgFMqBZxrjWga7LkPKc9i680P1UCcQ fg10/crEBqDdrblK66tdEXpBEF69jIdtcRfd4luyIEgjyv2xXX/IwEIq3r+RRg/ivCF8 jiA/sRd0Jp1Kh+YByoz1G1OFFWRNhw00eRCveIWFhqWAcHuisqVpjp0aDIo9quJ7HVOY nkXw== 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=2wK0OObhLhsS0pPHJTLpMNcuasLFqviyg6C5I9uXCbM=; b=UQBjfRPr5FoFOBdO5nSLMc9Yt2q4exS1/PfcmoSbGjSl1Szxyc4PYoeDMXBY/HePsv TPtqfFQxYkePje+YDM9CN31sJgfH8mIPeN9t9Z+YfYiwvSD96ogn7cydJZoI7CzJK9Dt JKtYAR0VBqpIG2MUKzGTe5HCt8F5ZJD7YtdcL1nYOWGv00pFdXqQ2mMVqWCP3wmL57HV QEjAaB6WrgQYPJ4IUau32J+RiMi9vBNOOmNlD/B9iEsOgTyxdYbi21nQ17iC2PkxW5gq Bq4jkTAQ59j0J5qSP825iRtVkEmECuI3yLaEEEJvvAoesGFhu1GHOlyXt0HTwekl8LxJ 84Pg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BB0oFzby; 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=2wK0OObhLhsS0pPHJTLpMNcuasLFqviyg6C5I9uXCbM=; b=dJWnmXIw8VwyGVzJU166fOe+UpqNMm4v+9IsyS3bvEin3KJ9pR+wteUwEVcavTytDd SR52McG8DMPKUvGUcdkus7Lw5/ZRDH5MnByYBUMVzh853NfZBAOrnpfr7QKflc6hYalG e110VFYCywWYJ4SYNFl/H56AlLV0hmZw/qUTU= 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=2wK0OObhLhsS0pPHJTLpMNcuasLFqviyg6C5I9uXCbM=; b=r40GcMgEy9XZuX86WwOxkWoShfKsIlXkgsVuOptEn0ZTItvQYotj20zrQREp6aGjGO 8Z/d4fHU0QJFtzqwzDUYYZbVHD1vNghd+9njr09y9IF4wlD/DdQfAkhHMCL4wOOokGUS dBcHEqS+GWOJAE7b4Ry+pUdCoKxKktsQZHyhmL9rSpHA+atzauVeVuZ+aNuKDxMO+KDX UG/Crh+0JDJigX3v5FgtH8bvkjHeeS/PsmkmR8OVq5ouLjYD/lyJgHLmMPKpjnw8iFY6 VfuHHUUPmoFSSEEtjSjj5hSJ36o3gzT41I9ee6SVV14VfphJj+rI3g3Tfuxagpsrf6Rf aWvA== X-Gm-Message-State: AGRZ1gKwVNlH6/HfxCHzndhkxDFfP7A3D/0Wqh6Tyo6pL7BsBr+6ePak hb7FV+nCTPWsK9pjaY7Oh/phzHR5 X-Google-Smtp-Source: AJdET5fTx6ufyvuHGoArZoRLwl01Scbsbx9NePQaP/ijQ7vwfJ1geHnJt8+06D+1KkUUtLi1BJ0fJw== X-Received: by 2002:aa7:8157:: with SMTP id d23-v6mr1519206pfn.136.1542107873690; Tue, 13 Nov 2018 03:17:53 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:6a0a:: with SMTP id f10ls956259pgc.0.gmail; Tue, 13 Nov 2018 03:17:53 -0800 (PST) X-Received: by 2002:a62:8742:: with SMTP id i63-v6mr788931pfe.41.1542107873398; Tue, 13 Nov 2018 03:17:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107873; cv=none; d=google.com; s=arc-20160816; b=Y+sYV31oLYOIzns3Na0FzXI3avr7F6SBFdFdvJdv8EyxZrIzPqyYJU07g2Hd4iDW+x GFwITasno3r89opLf7sf8aSSMOz7ypLMs0P+dip0PmetDmvctfQcn+jQN9jjkYlXHAKD FHqZddv6IubMw88Rg1Argppg3m77Ths73vnIps0K+TfrXlwLuJbbYD/GUV9qS+hoSiH8 aqoAlOeLMKLVXS9RklgwKgza9nA4uanAgA1myznLlaWvMlRccd/btB76pXOP08TxlAMS uGQZuYNFmwtWCdTKhWSS/Jn8UuAPXc8bvkDc9yqYyKdMZwBVX1RuxZlr2C2N+3co2pXj fiyQ== 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=2wK0OObhLhsS0pPHJTLpMNcuasLFqviyg6C5I9uXCbM=; b=R2SZ1ZzyEaI4n4PSPpBhGVGY4XmFYM5XpWY8G5l7jR+yROy1knCA3hwOi3NtNNn0IZ obsEo1o18zUk/2xG2O+cwmSEz+/lRTe3+C/sCEteIkRBLCvTB4JKNedc+rWVOic/T8+C XQGwTvOO6L//oMMIVCAASLF8QIh0lCxOpyTm6PQvw/Iv8cXiqAV4LrSm6UD+KvFVfu9l ksCFrfnBvaLKXI3SfJw9O4uJ9blAyRYOCxBGJafnYH72lDKfZs8NCltpIpigI7Ak0w2r Qo7Ts9UBRo5973HKDu1T14ZhKLxQJM8AbxL0rCvaHnIlyFarLeoDabF17wrhG4w4eALR o1tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BB0oFzby; 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 a10-v6sor23172298pla.29.2018.11.13.03.17.53 for (Google Transport Security); Tue, 13 Nov 2018 03: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:a17:902:b689:: with SMTP id c9-v6mr4796087pls.306.1542107873098; Tue, 13 Nov 2018 03:17:53 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.17.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:17:52 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 10/26] drm/sun4i: sun6i_mipi_dsi: Refactor vertical video start delay Date: Tue, 13 Nov 2018 16:46:17 +0530 Message-Id: <20181113111633.20189-11-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=BB0oFzby; 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 fc4252d96c38..f6e3df8d2490 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 Tue Nov 13 11:16: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: 19 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id BC84B2E5422 for ; Tue, 13 Nov 2018 12:18:01 +0100 (CET) Received: by mail-pg1-f199.google.com with SMTP id r16sf7839352pgr.15 for ; Tue, 13 Nov 2018 03:18:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107880; cv=pass; d=google.com; s=arc-20160816; b=V5rzic2ngqAUle2kdWGQcNvw6vwt4O7gIfkwMtDxnyoHo+M1HYt326RYo58uHQyhsM hUtJ5Vg8JmWXaf9N/uZ0DfYzCeNWE4pbznPJW78VMMYR9yRfEO3vweNvS70SbTD2GBGw HV12Y/Lva6QR1fviJkqlUGWD2MdXWA2p1RExT9c+Eby+IqtIZMRq9CnK8TNxZshBfpra UraGqqt7M0gOcjRkvUXIHLdUqwR3gPDp5CR/vPfBJ/GNNH2zOpzbPikLYDMjQGv6KWme ZIatjvbLSh2Y7jKl+rUkzEGTaLBCWISXgaHBQcGCW5a6SmJPDl0+9U2GBVZIKuBHItI9 oSBg== 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=D5aorguBzgFaeno0vSryYlUmgZEQ0xASVydW10sQ7HQ=; b=HtVGeGXxB91rdvm5nl9Ha515fmyhTQhl8B1Kl2KJ/BNMxM1kINBpDLNCVYdXqAHTNo TAb5XzIXbIO5VwTwJSdfLn1TCPQAXODMUbygdCviI6Pn6e/ZpwPDM4exGf+c+f6berxp qovDY6ZPL6uZm8jkbUNC9ebaVXis1MKM/vFYbTZjWsVa2nNBiWeN5xWwJMFfhFJ+70Wy BuXe2cUCAxr88O3jUkFDmQnugfsbUqkiBJ0+BZ3U2L5lkDJiCdtdkTflST7sycBYG062 OK9NqTYw1Xd4162mc/ssjGiLkGrIjzN26xCv3I3E5ncnl617yP0A8YGbpQl6G+W2WnU3 c2Cg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=H+CM64Jc; 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=D5aorguBzgFaeno0vSryYlUmgZEQ0xASVydW10sQ7HQ=; b=JIgIFHdrLTzCr+7wrUKjgSnSKjhWyB+aqenb1MhkWdT8oC6dtkqEPC5dcI7PQtWOCS 0jDRVuZZim6wfIAqHGXOwugBsFwCkSIo1oiuuiVwXQDTHsEipA+EraMzN2aA4c8LjcPX gste/f9NDlFYZ3OYn2DNeztGG7IAZyuuQCXD0= 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=D5aorguBzgFaeno0vSryYlUmgZEQ0xASVydW10sQ7HQ=; b=G6CSl8c5mXunrLUOLS4CxxKQeC0ruMGDrcj5FS4f1yC6GF0e4JXe2qWOB8zC3SjFRE xWnpq/QTUXIUSEGv9a+BKbcT/eS0H+MZXTvmF7+mabCg97NDDb6iS0o7hsqy/iehs9x1 29DQKu92WZWquSLQ/mr47ov+alO0tF8YqIvjUcN+NxiNprhGfcaQNd+eDEteUzfLQfdA gQGSyan1LBgUbLUQ2IMinZWY8fyipEvONcgB0HZyR8INo/KKu37RV6sAnB5KQpeDDmvQ M16cEHJHkjRTxWwpnoveKua7JQP7J3YII+Cv3+nYQAzqi28Y5OSeJQ0oXRR6SZ4Ec0sn xt5A== X-Gm-Message-State: AGRZ1gIPdC7PEii82x1VoCOcdDCM6Yyqopp088vuNfUYUGaTpQuPHvy3 DRbZg7j950ufc4dUHJqPl6ljUQjv X-Google-Smtp-Source: AJdET5fTTt8mpQ2k0Vfhy1Yir7/VW9IEymlP6TnUCnZ4BQzoSDJUY9psZtdzWb5tTl5XUGhdYLThvw== X-Received: by 2002:a63:d849:: with SMTP id k9mr2013648pgj.16.1542107879986; Tue, 13 Nov 2018 03:17:59 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:6255:: with SMTP id q21-v6ls2787365pgv.8.gmail; Tue, 13 Nov 2018 03:17:59 -0800 (PST) X-Received: by 2002:a62:3687:: with SMTP id d129-v6mr4757592pfa.56.1542107879656; Tue, 13 Nov 2018 03:17:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107879; cv=none; d=google.com; s=arc-20160816; b=onuRy4etE0KoS3os06gBU+Q1KafpKBZSlKfOIrxSH3oKUZjpHBn75mjGAPs4yhFm5B xFhuPMagWzzTOZikewL/0wtcnGPhC4ChlypwMqDQmOoUj63UGfsm3kD1KpBtBAjEdRtY /OlY2wlFF9h5CgfI+dYOpDJOtit7lt3UWQCyJRz9y7z3c+lIq66He/yFgHfky58fVMS9 mSIkHUe9ig1Oty/zqwfPUQYa9E1yQ7y7SLv0JLrxSa0DnHio9sAyF0KJjF856rH4lPkv HD0opkhvZe9pJJeEV/hPa5RedNn82kGNTf7gNd+V66enykCt3ZDgBp32IxExD9MUlsyp K2jQ== 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=D5aorguBzgFaeno0vSryYlUmgZEQ0xASVydW10sQ7HQ=; b=WcoRTgBi3vgTGPcwXMj5HYLdJcknEgOoLLXlgGgfDjPc6Tj7hWQF1tRLxOg0jcbEE0 bDzRSIz+MbVjV+nNct21vGmRBY1DuRx+IPe8M8F94YoEHCN2j5/rw8/90VVwxsM/y9yP QxwHNwpDAXlRNAuAyfmFODcVAYESSoQM71/K4q7k7T6/snV7PAuOV0ww0hDesV+EWLzW ViHMj7fE8xn8v06PRPSZoqZrAcjboDEffYD4hqrdj6n6VklBtdJdNWCPResDzxVrp2IZ FclYf9rWXeGiHTLlFxIcEfIzb6LnQgJ6jQiMZUQllIrI8CNFo3iYp9WPGHDXNtR8inPL fBxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=H+CM64Jc; 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 k33-v6sor22594354pld.54.2018.11.13.03.17.59 for (Google Transport Security); Tue, 13 Nov 2018 03:17:59 -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:a17:902:8a88:: with SMTP id p8-v6mr4582115plo.94.1542107879320; Tue, 13 Nov 2018 03:17:59 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.17.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:17:58 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 11/26] drm/sun4i: sun6i_mipi_dsi: Fix DSI hbp timing value Date: Tue, 13 Nov 2018 16:46:18 +0530 Message-Id: <20181113111633.20189-12-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=H+CM64Jc; 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 f6e3df8d2490..de0992052a90 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 Tue Nov 13 11:16: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: 20 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 6F72F2E5422 for ; Tue, 13 Nov 2018 12:18:07 +0100 (CET) Received: by mail-pg1-f198.google.com with SMTP id a18sf7830873pga.16 for ; Tue, 13 Nov 2018 03:18:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107886; cv=pass; d=google.com; s=arc-20160816; b=q/n3k6YtWJlNLg9AMhIO6q8w3Plp7DMJeCC39Jx3Nn1P3JWxmnYRXWKRoYcgRDl3xB +v/sJlTDggSw2PlQ5m29TLTk87bvBnNr39uieL5idCEum8TRhy4NKU543WkZorwpkPip BEAQL2kmkm6m/kJ4hcjch41U/bzYnaCyfCka/HwhSnYxPhluilmHRk6+c4P84LbSLKrp e3GEebNIknz0p25xvVytwGpacLjwV3fu7KJMQTC5zXUv51dlp7W9mmpwMovc/dhsgXq0 newMSgTlteM33gxXP9zT8B24m2yzHix/15JBim1OBnzvHpx5bnMj+MB5t1BBePogK04i OojQ== 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=WXeHiI0jTSc5wEU3J9SBtYcSgw6GuTxHUVUlo5pmyKk=; b=KS3MxVTeZccE8kLWjwboTkZWpEAdYQglBzKRDq4r+y7hT9EARWgrt8segXlIJ4Z638 pd80GHt49XFckUdvOiN954rcp4N3iktSd5asMvqb/eM9NZoAkOkzrLO+1lRIlvi78spm M9ugvM23G7uxPF5h2QzFtyfToMMr9R8pG37js3qz4j1D2sWnfzKUHGpLTrB5J9HIobDh 3ul5UQ2pERAGv83mpJzUn4i1kDmDt24YXDrpf6r6zoxgDOQL6nxhRH8nu458deT0//ey 6oJ+fGomPjjbReotG8Mp61XSLbCuvXu77D4vO2R2pEX3dpt8mbyBy9bHFQ4RtFDWTb6I 8+ZA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="p3/0IBrO"; 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=WXeHiI0jTSc5wEU3J9SBtYcSgw6GuTxHUVUlo5pmyKk=; b=KQEo3sZyQXlqUaOv8Mj3l9TSXxpMnCeJoZHLRYr9DKKdyWEG9DxZpupKuZpV88I4pO CbooLYrd6IcQAdk5BkTOBmvT/1ApTiu0pdywQhAOoYjZ/gZpMuXi/eFoqIqGSwBAVZ3i vxFZAPmWueeDFD3QzKe+ceGErQmUBjpMXfUbM= 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=WXeHiI0jTSc5wEU3J9SBtYcSgw6GuTxHUVUlo5pmyKk=; b=BTRxilnscRS+8Phbw3H2x3E8YCA2q9fZjI2XPuNCoaq2P0q+1mYNKYukTCgeQF/AgG 3lqTMZPDMd8UNfSgoyVTnDU+F8ArYmdSyoORYYESuuY9oWY8ANtcy+BibBUpfXsqtGDJ oAYJkr2+pRWNFNRze7ZxA0zbHz5gKEu04/kLkQmpgUxIEQ5xOFkIu3vkWsALHb29dX+p T4m4tLqAXEf8RBldzY76Wp4v0HPT6qgbmZEgC2ZuK6msDcgvDnm7FCRizRiZWKXrzz/p asqY89Z7Io8nz+b7q2lToEcXmmlhvRwT4YoRMJ3HQWJ6lafTySSwG+i5E/c/9Zu9wm6L L98g== X-Gm-Message-State: AGRZ1gI0x4eIf40TY9oMTMVqFwmcuH9s7Z3+h20SjN0VzQKrXnJ5Vp+H tY/ZfF9qM9PRU/W+DPZMMzegENZo X-Google-Smtp-Source: AJdET5dCzDfjXrsYgg62wIWBVRfKz7jOZRY7/RmTH9kiUOiVpeisflp5/qWLf9uHqBBx0h56O1hhOw== X-Received: by 2002:a62:4e88:: with SMTP id c130-v6mr1946523pfb.55.1542107886149; Tue, 13 Nov 2018 03:18:06 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:69c5:: with SMTP id e188ls1776120pgc.19.gmail; Tue, 13 Nov 2018 03:18:06 -0800 (PST) X-Received: by 2002:a63:374e:: with SMTP id g14mr4461193pgn.59.1542107885929; Tue, 13 Nov 2018 03:18:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107885; cv=none; d=google.com; s=arc-20160816; b=0Q5OmbJLm69ZNuB6y63Y/wA1h6gjmNrVaNvjQbTPkmn43nZRfaDEDig74ELvGRHdu0 l+WDA0B+Og6FRo5gbN9tXQip8vSVL3H0+i4U/n3wtt2nlbUHDOOkbVvaVzyysLDHmwQD /YVak5kgevWA2EM2r2aBAWACQp7xEmyvqxF8GRUcAcdXSllmokUYhKqeYZUdzshAkcPR gRRtH5CAKxkOpyW7F7pSF4wWgoG2vSbCIQyvckjN77d/umuE+bo0EGskLLTg5iKj7NjB Zx2C8ECNscOgoJTsLUWTGFiGsrOTwZSJJJTcGoSP7f68UOTuIGsk6vQ6mFQrGINKbC6i y4cw== 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=WXeHiI0jTSc5wEU3J9SBtYcSgw6GuTxHUVUlo5pmyKk=; b=E6fJ1gqIWjFNfTucXU7v9HLSEf1ijmpMQGWN4uWM4d3W/J2FjVfwbfQF3SquZm6P3r gMoLOlcALbu08EC2qh8rye07E/Z9qVTWN2SIz9I0s0ruMSwPi5n3+WHPeu/FMjDFo/8I AaW31h9rGzGgUtMbHGExG5uRzFQf93dY51sEnyyJjl4z9aphaz1nWZgbfsudAMT2MYX8 ASaSB/hUfz+0U1JwAzPXbfzTr11IdQFSIk3+kmB0joIe/FqLzPAiPT+A7MjxxlmsohQr Jf1NArNIgEFCuSvuK0msPHfFxdKVcPvDaoVsYqZ9G5WPSYPEKecB8D3MHOoHrE7ArXDT 9EfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="p3/0IBrO"; 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 j38sor13229187pgm.3.2018.11.13.03.18.05 for (Google Transport Security); Tue, 13 Nov 2018 03: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:a63:a16:: with SMTP id 22mr4382852pgk.318.1542107885602; Tue, 13 Nov 2018 03:18:05 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.17.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:18:05 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 12/26] drm/sun4i: sun6i_mipi_dsi: Fix DSI hblk timing calculation Date: Tue, 13 Nov 2018 16:46:19 +0530 Message-Id: <20181113111633.20189-13-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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="p3/0IBrO"; 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 de0992052a90..cd657ac4bdae 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 Tue Nov 13 11:16: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: 21 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id E0CE62E5422 for ; Tue, 13 Nov 2018 12:18:13 +0100 (CET) Received: by mail-pf1-f197.google.com with SMTP id o28-v6sf6890341pfk.10 for ; Tue, 13 Nov 2018 03:18:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107892; cv=pass; d=google.com; s=arc-20160816; b=HcdEdame5yB0reVAvrtWxKI/3nDaA6pJqXH0xsAXdgGTJAj8EA+2OD3iQIl0FmFeSj ToB0po4yf+LtVIxA7T6WQmvgv5BFV/phSHS/BYyMwKwazePLhfTW82XRYBmvJ/gFZyPa E0x1bDgH65tuz+76i2Y72uc4Xms9AstDjPnBG+a0sZx3xUCIQ7wri8ct9iXxS6PyUmMw 8TRFETtSylbm873KBcr3645GscI14zZIEmylr0AN8NGAmDVuLrXXVlXO/PIjnYMeCyaG aJq3ZThfOxNO8r7Et6i+yX9+zsXTyq8EFyMnlfaw5wWmsZn6ymDfmvsVRl/LymmpPES7 VH+w== 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=jROG6UOjt8ak5A6N/TCD5RGHneXG5PcbkfCte5OCDJE=; b=rOSCsq4LZGuwYvTDwK9y8IGURP/G9r2FFyCRxNlUxy4jvoFhGYtbo3K3IxKt4h1lb3 kzgSYjTQ0xsR7z1pXD4bITl0KEbVOmf2JHDAdtwndu+W1EhRPv2calYE2HOwOkhQkxxS l04PP+n1ioFIoEGpG5Ln7ZGn9/sWnmfqU9qhWEeu5TVS34Z0uMoV0Ip1VU5j2Jwmt2E5 JswWSmhYLyd/4GBMwiVqWTBq5EzYyZONI9CF53LeTC3NqKtlll0PQJsS4bmgz0/uUw8f yZ09KhwyNXv0uLeFULRMGMNfWIO6EpTnGDrQW3stHapQR/6eKaAyMqn0R1/fALOY/lI+ hwcQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LXQiTYVf; 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=jROG6UOjt8ak5A6N/TCD5RGHneXG5PcbkfCte5OCDJE=; b=UgAAvcORtxYw8TQmzr6klojeSK+Xx4zC1pe30yLs9ujcsiMgwVeYJ9srG6UCtjlVSZ LgcqsaRlyfdJl7mNHfXcg5/bTnt9TxRRRgvEITPoobB+A6daS236gCiet8Nm+Ru07YHK EF6fn4r39KM8KvTNaevP5NGQXVPs8s2kCAKEs= 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=jROG6UOjt8ak5A6N/TCD5RGHneXG5PcbkfCte5OCDJE=; b=ArM7QsQdeqACxi6Hj2bXqP5PpqR3vda2EfWEHs161XaqpcNCegSbCJUNnv03eYRPVU NmWhyAGqSE2NVtga/xDOPuAxVRCLdbf3/t2LKhfeIlMFAjry6hhuC6LjqcRachT00Nde dgSedDictDN5lFU4E9b8aW4rbvRrv/BI7/1o9Y4jk7BxClpi/6uhqRqMOVkzWbqew3ZH xpXy11M0iuoSi6MKnjIUW2uJ/I6Wg5+dA5V3x/naIHrfI1FxH06aHV1KcM0ORGAPnv7O uxF716xE75efR9R4RSGbwBpRv9auI0oRvL3RJMnwo5cwaV+28XQYBhMvwSjL5WdVOA33 KlTA== X-Gm-Message-State: AGRZ1gJAy6c6JygSujYAOc1oGVs/pr6N7p55WE2UNtCi8Ygl1j1mi1Z9 kok/GVv889UDcvgUaepEy1tedvG4 X-Google-Smtp-Source: AJdET5cg/5Pm9OrM1/Zslx/5Gcs48WFFUSq4Te74ND2LdbKDoZjunkd2tguG+Fp05KF8pKMmaglRVA== X-Received: by 2002:a65:43c8:: with SMTP id n8-v6mr880189pgp.63.1542107892598; Tue, 13 Nov 2018 03:18:12 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:60c9:: with SMTP id r9-v6ls2781444pgv.12.gmail; Tue, 13 Nov 2018 03:18:12 -0800 (PST) X-Received: by 2002:a63:81c7:: with SMTP id t190mr4403963pgd.393.1542107892216; Tue, 13 Nov 2018 03:18:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107892; cv=none; d=google.com; s=arc-20160816; b=RiUy6qo/W2+OQxm9i3hKJLFS4xafsWsL7O28aka2tXzJCEdlQvb53A/41zDOW9ffW0 GCLbyfPhQpaVD0w+lyu9tTYCHNxgzJjTT5wPJPrUfmI4hsbZRz1my9rdX/8n29Pu9jEb 7aP9TbrxY54vKluVYZzxq5oMs43BNN+SwQxSOE26Yf+pbFTr1gXA2ZFgqytFVq9JM6ny ZYpkLU9011jyD56AG8cSkArHbl4ILLn9pEpVcQgr87Yv7wzDIzA9EP7bsZEmAHS/Gm97 mc9E0CwrQssQ0C+s7lwzHhou8ZjHUuUvdLu9QB58J1gEHzvExzA85QnY/kFsi2ugS6bM RPWw== 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=jROG6UOjt8ak5A6N/TCD5RGHneXG5PcbkfCte5OCDJE=; b=zmKVdzhGVIet56zh4/ssA/4Fv6oKqitodsF1jQkf4qeAClbtaz3SuQL3JWDMSSwvLd Qv19b4stILHY84BKhs4sXZWCGWyU7THni5k7vJJk5RYHm9JBxh+plg0B/mAJHy4XSbrb dL6Hq3m2ZGybv8ZgQ7lLhqnENmnAWV90bTMfKfh9OIgjpQUGUcO2H7Ba71zavopl2YQD 72lg8cdKWnD2N2H1TgkM2G2IREXk7+TDUJR3t46VDKRbORDzooFLE7DN3E0OtYi1uVvv ye07IXiVFQIMA2lZfulP+1weEMuhEHU6Aj2OdHMEm27y00A2VxcX6dPCHDsKif0OByDg kXCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LXQiTYVf; 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 i128sor17956319pgc.75.2018.11.13.03.18.12 for (Google Transport Security); Tue, 13 Nov 2018 03:18:12 -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:a62:9f42:: with SMTP id g63-v6mr4693848pfe.144.1542107891914; Tue, 13 Nov 2018 03:18:11 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.18.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:18:11 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 13/26] drm/sun4i: sun6i_mipi_dsi: Add DSI hblk packet overhead Date: Tue, 13 Nov 2018 16:46:20 +0530 Message-Id: <20181113111633.20189-14-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=LXQiTYVf; 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 cd657ac4bdae..1a3cdd5b72a0 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 Tue Nov 13 11:16: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: 22 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 2B6602E5422 for ; Tue, 13 Nov 2018 12:18:20 +0100 (CET) Received: by mail-pl1-f200.google.com with SMTP id b8-v6sf9219641pls.11 for ; Tue, 13 Nov 2018 03:18:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107898; cv=pass; d=google.com; s=arc-20160816; b=kiAgYeYODQJziXGXxRHAQ0tB68PJmXND3wCwoLTWwlkunNN8+IVRuamnetrp57887p kmmXHHlPNqn8UvY1fN/2UQugkzuWULeWjbnDTscJOctg1JcdoXrSgTM6c8nS8sspDfFj W5kq7zlKfSqlQPbiDVanxkPJuU8cpA2zowtdRW0RXjUdnCETDxUKKNHMH5yySDcV8M5P /3nWqe02riZLVcR1u72JcJkmq5yVlC6B1+KHqdBzdP8s3hSth2aWQK5YAlFYOZzMQCd5 2UeLuKf/Mx+hGyunmpLTrMrebG0UgDumiz97McIpbqC8OkmgZjortM+dP6W7Rs1ql61j Si3Q== 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=y5PF+ZGgoffIRFFiAIPy5mU3TbDRA/z2eo11P9T0YNI=; b=YltzAyEKL2ON3P5aooZtlm6f8I+zeluBZlwmnkFqcuDedt+zHZG4SRdk8zBa5NS9X+ MaG3LpHgxEwV9cdqY3bkemB90B7dYkUWZnLtu+DLR3FTP5sas2vshmcbVwLd6am2dIsc p/fD3khOKGtKSIaoB4KZb35VHT2qpsyQ/1TM4flQ8Vd1OiKAdxpfNtNxPkgmqCgQrljt au8lERbpqAqK4+FbG6wBNO+APEnRmtvmgThFFjgk4xwPcaG80jxTFFBUtTcVBEqO5H83 LrY5sjV+FljU6+CME83xmTsoNnO/vpjzPhCcbao4DqSY+/hphstXwpwKVlszLIgf3aXv B0Qw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jneNIuEv; 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=y5PF+ZGgoffIRFFiAIPy5mU3TbDRA/z2eo11P9T0YNI=; b=SG/do5rTASmVZpf/M1TGXufTb+u3PwOMhMsAw4BsK2AM2ThsgBsJjT+ZrPmV9p9CRs YX/7D2Dh8vpjwTXAIuAXgMExhGCUNXEra5i2EQr0H4poiyRJVP3YK1QBt23P085MFw4D ux3oIKcTt5UumgH315WqhGVwVDupjS7UqtPRw= 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=y5PF+ZGgoffIRFFiAIPy5mU3TbDRA/z2eo11P9T0YNI=; b=S1iT8BtZKG1Kq1Y/oFeHHEO0Q/aDhr/3IX9sSY/ZgY0vLfvtFZeiduL7k+LMpCb5yQ 9YjiAE8L3a6OYHbX9tm24hnNAueb26kEWm7kvKX56aOJW70v5rvhGm7BDQttdHPB9vxU fSzax0rwR9u/1HJ+dIZwPU/Nga3Lh1wF61xfJCGc8w3M+UMxwTPAluhtyjWNyeAWBl44 Hvw23VDB6shi5C6GnqFsD9eV1VhdmtXUO7CZSTelj8LSJ4GBiykgR60AgX6dqN3FtaIA IoY+z2wNWPHPu9Un4Uj4UlfVks4MJTLIFFzzQuQSdwKsSmBq0Paa/DusaY3IvkI5QwDe o8VA== X-Gm-Message-State: AGRZ1gIqCMy01ybAr81snf7ODLvrrhx6ZncUbZ6NJ8J0TP3mM0ZHOL3z 7Lc2ZI8k+2qlQ3cRmivfG7GFafdv X-Google-Smtp-Source: AJdET5cmppMU13uK7VZZFLE/DBFCEfqGLcbW4MAtdYgYa3B1OX3229scMolJeBranBvpMC/IUIu5Xg== X-Received: by 2002:a65:638c:: with SMTP id h12mr1353938pgv.106.1542107898858; Tue, 13 Nov 2018 03:18:18 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:4494:: with SMTP id m20-v6ls4171153pfi.10.gmail; Tue, 13 Nov 2018 03:18:18 -0800 (PST) X-Received: by 2002:a63:bd51:: with SMTP id d17mr4430367pgp.443.1542107898528; Tue, 13 Nov 2018 03:18:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107898; cv=none; d=google.com; s=arc-20160816; b=eWZ2A3ELLokb+xpbVUcwBrY3phlXt+tUSuTmYrTcDm32TdaidAhNvd0s69FiTBAkna SrfA/16tUOzOT5GCJYSyJztOFOVjrcVrMGv/ZIiInajD5v6c+QWMHC9kAWGWr9A3IkgZ Gi7UGy3UoqiLMiYvUTgyoNJAMEAby64Yj7EQBXtasrtP/SJEoRqTyrfSfCMloJ1eJep9 wsf/RROAyimTCnE+twi2PX0jfm9gM5McEFv/9kDIYJQZmIWzdr8YWZi2JSUlA3ElFraS aYcX21vYyWL7BzHbK/H3YZ1nDMoQUhT0chEjKQ2opa6X0G3M2shOPeiO3wNrzxGzoqrR tmEQ== 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=y5PF+ZGgoffIRFFiAIPy5mU3TbDRA/z2eo11P9T0YNI=; b=mje0VkoEBoUGqjUXUNYmWROUR7dnnBaJZnl4NInNLte/jMSQi/r9tclUSd5QQNtnOS aBdo1XKZguY0kv+wrORWD/6Fs8zfemdlmUTcF0c/695qUoHKCHDYUxiVy50kDxumppdY 6PnE8ujeOYcIP3+tJxtjhfbQXWqoUu4qROCX9lu6PGZD5/m7s4WFmPOFv29jiiWICzfX c7ayEoXMnTLF2zZ8iIaxTLCFsh98tsnGNv9fTUdbAZ42zA6ZmqIUGiCzDEEdeBbw16BG IP8qo0SAKyKH27ZSf3T01O0eKkyJahZB6Dqmp7Rcc83MDaustFamA2LiufpnjwACt4T7 T5bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jneNIuEv; 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 x14-v6sor15661819plr.68.2018.11.13.03.18.18 for (Google Transport Security); Tue, 13 Nov 2018 03:18:18 -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:a17:902:9681:: with SMTP id n1-v6mr4660594plp.126.1542107898182; Tue, 13 Nov 2018 03:18:18 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.18.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:18:17 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 14/26] drm/sun4i: sun6i_mipi_dsi: Fix DSI hfp timing value Date: Tue, 13 Nov 2018 16:46:21 +0530 Message-Id: <20181113111633.20189-15-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=jneNIuEv; 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 1a3cdd5b72a0..63b924b89bd7 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 Tue Nov 13 11:16: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: 23 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 875C92E5422 for ; Tue, 13 Nov 2018 12:18:26 +0100 (CET) Received: by mail-pl1-f200.google.com with SMTP id v11sf4423104ply.4 for ; Tue, 13 Nov 2018 03:18:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107905; cv=pass; d=google.com; s=arc-20160816; b=kgJ5ma0x/nkB287YbohCnAY6JM5Xja3vbr0bjHc616mlhDxTWZetDVdh7o6AHc1sX/ crsLBn/8HE2ZN0hmYodj/p0e6N+KRTWrJb5tIdzkFsneY7ns8Kzvz81PU7jJIiz95J/m 76Ci+tv7wRO/l8xjNi6Uo3FCS2kd1cKQPSyHOMwVEeO1iKdiguBBqT2Kj3ICcrZntbD6 0iX6c7yD8g3BfkiYxw5YZ1Pagh/CzbkNe7cfMJgacigUC8Q9MHOTkGNmg4/X+e+lx+He dQYi/IoOR8iRPR/FDGg+db9571TjOybnBeV6XRBEasPLEtE8ctcaebTivuKYd4gJoNZb yx0A== 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=KiNNAL5FNd2IGkoW7kve11vnz/CEWnCQcGVfDy5CmDU=; b=ziGYjvZ7hrzHil3Jz64kMD1BxSqAKQM1mFhwy4e7PHpmZu627hkfOlkqvWws01YE0t CqSRBR1iO8kiwgqqJfVKT2GwLXVLYr+ehyBxaxkb9QKi2+mld5a/O4L4m7EeQ1a5pxSN P4cEIlKTlOhtsRF4kH98k9CnR+UrjMQGjGhoJc2zPsxEwe8ynCSOI1a0C+gR0QKPn1d1 27f40RSfQvDjqBVI87gJx9Oft1iklH6pN1R/fPiDxYv45QnYF/lX0KL7irBqKW5Q+DJb JkDiBuvGUDmkgBKIMTwff9AyXNhANiusZAtwBcHJ6i7fV0qEs7d4jrkmj22Vv+cDx6SG cMJg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="oqoD/W7v"; 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=KiNNAL5FNd2IGkoW7kve11vnz/CEWnCQcGVfDy5CmDU=; b=n7pMKxDEO0hYTeHlkNJnkzupUkSrSGCglVQspmrBAfwel61LOy3ylyrnkkiI9Bqd2n ucB4kjt0z7Ur9JJST5rGngiOWc9tuPRSoBlIESm3czDaHOUTo56o9Asl7c0CuaQ9734w Tk0iQyJIwfSWI/eLyZo27yuwIsINdeNGqBKhw= 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=KiNNAL5FNd2IGkoW7kve11vnz/CEWnCQcGVfDy5CmDU=; b=CGJ4+IA5TuIpP2q/EQ0y2tUIucvbiVZ03rYIZRFoTZZgyaokby7aYDYmsPcotEGhyH rWdGfp3lfBCf12vVsdZG+acHfH37SiwNP6dcwSPQQnPJvA04zrVvNrh6ZhRNjH6FXN2e 4NQ4BekbEn9KlucOo2KHrgRjcGGrSu1OX6mgcvhzLYyfNDlG9+pPu5I+eo92/cp+5Tk6 NGGz5Qu1WcLB5AT/Oc+D3lhoDO1LUTO7upmY9oQe1Z6URFewrTo/DzN3HPqPOclqvjE7 y23NU/YMyCk+ltzn0Mmo8piCLshRF/Xyr/8giQvQqQ13P7z3PDVIP0wTItrj2l2xLtLJ KLYA== X-Gm-Message-State: AGRZ1gKilTrlUekB4/chrgVIqyBn/Mu5zfARJYjCngHUOjsz3d1T6wNc 1+3RK+z/qvyUf9lNxxQzuERGVRmk X-Google-Smtp-Source: AJdET5eAhBLPlsbpAZuLHIpwtNlM8kmLRazk+tIjqoBzz8uFepYsKCWPYEW69cSRSR+/3ScpNjDDpg== X-Received: by 2002:a17:902:9b85:: with SMTP id y5-v6mr1147201plp.110.1542107905250; Tue, 13 Nov 2018 03:18:25 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:cd1:: with SMTP id 78ls126468pfm.14.gmail; Tue, 13 Nov 2018 03:18:25 -0800 (PST) X-Received: by 2002:a63:1848:: with SMTP id 8mr4330110pgy.81.1542107904958; Tue, 13 Nov 2018 03:18:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107904; cv=none; d=google.com; s=arc-20160816; b=UZxzdDjlWV3zbmmfIhuJaReHsbYxztecN1gSc9FUfRhctQEpi08bMIRbvzVg2TFtSu XJ2wSX369dwmLA8GWB3o2NTaduzJ6SXNBaulydrWdbRQiCinSNeDpQwXq+v1RggCd2YR m4DIuzu6Zr+3SqWJcWq4wsFdQKSUfJG8vOM/+U+9raaMH9wWeYzbcBo1VyTQA620Hvzb pMQtfByzRrg4ZcYHh3NfOiXOsPg17hbhc4hx20o9w9dHh8HO82fpL08h2DM0qsogwgdv DVmyzg35hyGCs8MhMoTgtWjeAOjQCLcucf9J8kSQdg8hfOUYNVuYOf9KGOTBkd7dbhpM KBtQ== 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=KiNNAL5FNd2IGkoW7kve11vnz/CEWnCQcGVfDy5CmDU=; b=NT+PcE52r/uAF4Yvc8++2/BWoPFqf4TgF74bJ771WksBhlsmRCgof/cj8ECqnmOTGQ /fYxsO44pFo67e13WJArk5pb5oaUDMKKR/c4cO5m0LC+RR7mbytAu/Pj/G4KisOz69ss GSiQ/NpNatfKk7k37fBWEtYNwC4atRitEHhZAe67SNrevG0xFav3mFRUoIwvwZs/6qqX CGBaWLYqdKAkAkyYqAAAo2fTRt6El23VzIck6sLEGstv9okGO4xvpHUcekzBFYaQpNcF Ufzh51z8zJxKiP2DFfBgLoO2NP+Wx60v7EJbETFoFCN2gRSiqvUgk/zx4fUsM0yuS+Jg YgHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="oqoD/W7v"; 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 q79-v6sor14815838pfa.57.2018.11.13.03.18.24 for (Google Transport Security); Tue, 13 Nov 2018 03:18:24 -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:a62:8647:: with SMTP id x68-v6mr4951565pfd.252.1542107904617; Tue, 13 Nov 2018 03:18:24 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.18.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:18:24 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 15/26] drm/sun4i: sun6i_mipi_dsi: Set proper vblk timing calculation Date: Tue, 13 Nov 2018 16:46:22 +0530 Message-Id: <20181113111633.20189-16-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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="oqoD/W7v"; 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 | 32 ++++++++++++++++++++------ 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 63b924b89bd7..703722f7c81b 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -355,6 +355,30 @@ 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; + u16 vblk = 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 + if (device->lanes == 4) { + unsigned int Bpp; + int tmp; + + Bpp = mipi_dsi_pixel_format_to_bpp(device->format) / 8; + tmp = (mode->htotal * Bpp) * mode->vtotal - + (hblk + VBLK_PACKET_OVERHEAD); + vblk = (device->lanes - tmp % device->lanes); + } + + return vblk; +} + static u16 sun6i_dsi_get_video_start_delay(struct sun6i_dsi *dsi, struct drm_display_mode *mode) { @@ -503,13 +527,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 Tue Nov 13 11:16: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: 24 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id D11072E5422 for ; Tue, 13 Nov 2018 12:18:32 +0100 (CET) Received: by mail-pf1-f200.google.com with SMTP id x5-v6sf10056491pfn.22 for ; Tue, 13 Nov 2018 03:18:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107911; cv=pass; d=google.com; s=arc-20160816; b=S+2zRW35VQZoZBBp81E/iRusCjtkjSculVc2Ei+EP37Rg+Iom8Z82c/J+VeFcOuNJl lB/m4IsGMD6gsTSVjMQu6lKME8dS4F6UevcoPK5H/ZvA9hmRmbfhQ+sb+BdNXHWA0Q20 brvbrNVhfwzbROeUVZXprObd9wgxx/fxkzIgxo2WUtdF9HJLmTVGY+JN2annpfAt7tKA hk3AdZw+hWk2bIyEhQwsJGfUlns8KIO2m7g44R2n5EgugUWpoCUs8fNCVt7WwMWVper5 w2ZmCg4zHHBo0C8X1fkChCXDHAJ3UDv7WSGkG53QOyqz5qEXadvW4/0s5GnWCZAWJHFZ RPUw== 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=OkLnvoOX4ZeeFgDP21cZlyAYt8eoNNgptp85ozSuxkM=; b=04enkfzj+ILF/fXJE1HkEvuYQyb45b0TUQEkU8gzAuthT3TUGSE6Q0q4scQ1vNiVRI QHr2GJg8bGFjaJQOp4kkiJY1aWQ/EbezzQZrh54tEw+O8V+hjihhGjUpKLB8qQi5lUcw n2xXrpBQcz7jng9vcyvEBqhwHOCeRzTqCnnbahms80DZ6J1ojefB5hK3hZHoQLzeCRSY J7vnr4/5G0vKa4Gwh5l9Hmx0f0mZmUCF8zdU86CIG0/4h2JSRbCrXm7olMKb4erOpvuR inCWGlAJKbolb1XC8Ax5IO6uOaWOpm9ombJNAO6C9I/FGO/YEAbjUxurhBPPK72qBt/I a6yg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hIlJQVhV; 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=OkLnvoOX4ZeeFgDP21cZlyAYt8eoNNgptp85ozSuxkM=; b=L4k0aX7R9whFG07FLW0oMa+07lC+tZsR3Q4XSnsK+0j+KQ81EiEDkDOW8iKJ6EddKw qNVz5Ias/4NCMFN2vE7aMRgc5wJKQAfZnhQGOyUFrdG60bAYOSwOJQxKawbVxn308/Hh Um3HsRSofFXvg5Wgbk6xUFoVUE1gDCINwAAL4= 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=OkLnvoOX4ZeeFgDP21cZlyAYt8eoNNgptp85ozSuxkM=; b=CIetFrVGdK/Pit3jW0pOSbJCeGtpevcdmryTdgNEJET906+e8qo3ywD+4c1Q1NwFiX MZ6ri2wdr2P2DMcxO0I1+pY2zUYGzm8o0sc1wV8Nt2Fzl7QUsdrEVfb+pwurN6bbYZRC dFfPOAEmmNcS7cUSYD+hQ7cTqvxqup3Wo7px2/qYaQmdx2lYsT9GPEXxGsPLnDyfX/xR iYNu6jrwX/0xGsJiJFROWISnZO0eEWK/OMcs47lsNjrwPCsxWxMzAgCjEA6Ct35NqThH niBD+Ld1hgMk2xWGlGL9H6Re61B/nOvDL+F2m57WtbuCQPWZhwuvpWlFUuvCAmwF49G9 zWWA== X-Gm-Message-State: AGRZ1gI9b5MaXUopp/oP20NnaFNtcyCYB80gNFsMhevHhMNCRkj/r1rh ki/E882Ohq1SO7OnxHrszCBpJcEB X-Google-Smtp-Source: AJdET5d0o4H0uSWFD9KFQkwihAmePN0k13oFZSDR7IX25OKekmBa0gxAG6IrlKysbjbyMAKS54P15g== X-Received: by 2002:a63:2841:: with SMTP id o62mr1553288pgo.93.1542107911548; Tue, 13 Nov 2018 03:18:31 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:4494:: with SMTP id m20-v6ls4171272pfi.10.gmail; Tue, 13 Nov 2018 03:18:31 -0800 (PST) X-Received: by 2002:a63:f006:: with SMTP id k6mr4371801pgh.259.1542107911290; Tue, 13 Nov 2018 03:18:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107911; cv=none; d=google.com; s=arc-20160816; b=Co7C6uyy63k1+NqGVSspNQXquKb8S4EOmrDJ/jtWXIgdxkX7mGDqXUmoazlOPvniQd eIpPl8SnURiJYyNg2+6KGtiA0V+DHkOVwe+p/hoTqknG6r8QAc6rZ4gbHDMQFO15wpfq 0G+lbYh17XuBmu9HfkU49OWChmnhsryXcxrSd+36Cac/ZPh4AiglJ0P164t3ueL/9X1F SqYoKhM8QlsBkeUzYLaXGceOB9RlkGrf7TKD72FeEbxNqNVpFPii782EU57qofkwCMfP TB/ryYIeAUrgfXMGtTxYeSoRgj7eIObvGUpw50G4jsPtcTMTQ07KkqksFRpQuPkUZ6lK l7gA== 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=OkLnvoOX4ZeeFgDP21cZlyAYt8eoNNgptp85ozSuxkM=; b=0kdKwg3+TFefwz0KbPKBVc+JfHZtiNYdiyK9vGkv4zGWUdKYi28zFHCxmcdFQfOLBq aQz807Eq03IB93H2QDQv2+EgcilyFxLM2eQqD+iGzTqyKJv0yUkw5dakP4Xuyzigb7fQ dMANt5OZT9LiCVMWXUeEzIzBzKTOfry4pzBdUeAV9UfflssMdrrhWkxm/WCX3yKJFgpA vQmgzXTp5Osdbhd2Cz1UlMfXjnUm7JjfMj6N5kwg+mkC/nUHhxmVAlOoqNgFGX2Ni2/2 s37FqL/TG/5sKFcsyDVMDzaAjqlD079wwL2NbLyLlQPonOp+rdbCXxetPt+kLt/vJLiM NbTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hIlJQVhV; 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 z20-v6sor21592887pgv.46.2018.11.13.03.18.31 for (Google Transport Security); Tue, 13 Nov 2018 03:18:31 -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:a63:dd55:: with SMTP id g21mr4294702pgj.86.1542107910969; Tue, 13 Nov 2018 03:18:30 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.18.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:18:30 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 16/26] drm/sun4i: sun6i_mipi_dsi: Add support for VCC-DSI voltage regulator Date: Tue, 13 Nov 2018 16:46:23 +0530 Message-Id: <20181113111633.20189-17-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=hIlJQVhV; 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 703722f7c81b..2ea33db61ae1 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1026,6 +1026,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)) { @@ -1107,6 +1113,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) @@ -1141,6 +1154,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 Tue Nov 13 11:16: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: 25 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 538C92E5422 for ; Tue, 13 Nov 2018 12:18:39 +0100 (CET) Received: by mail-pg1-f197.google.com with SMTP id l131sf7854504pga.2 for ; Tue, 13 Nov 2018 03:18:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107918; cv=pass; d=google.com; s=arc-20160816; b=SCDY/7dRFzQStVOua4VoAAE07PI5XwAdNukfPycTturz8IPVpU4U5cK62j+ZcfcEAW uM0ZwHzBPcQqJrxUYvz8UxJyt8P0G2x/LE20XR9QFlVS3WTDPe47WkypXHQPVYjOlja5 URK1ucr224F7PQSf5+Q9NKTuncAKxej8nVRjO8fmasWGGnNNaloc1W6AlI7jRfn+aviw +ODzE9Z6NGOG53bSvZrTc/lh2RnMPKBtwxEsuUoF9bsCLgU4RR4XT1T93p36i2YbRzeo bWsbCz67ouYPMAIN90OyYJABNstHQor1Gm76UluMU2A+olp4zxjA4mi3C/8JCE/ci87V yZuQ== 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=zfLa7sOo1lPPoVacUZ5Wanit4VpAlBcSuHBOx71Xco4=; b=v8bovShANVMUUUKhhiKRwFTwHszJaiaILa4A1wasOGX8eshdurAOiS+ixAlo+tCnqq vbvLi/zoEGr4Syh3DzMT6fRS7upDw/knWKcoX3ggrgaZ5hoFOQl+avTjb0wB4u3quWuh u3x8EYkg2BshncHZIZAHSfo4H9wEuaQiaramy0dPn8GYIiaOqJW1OeQAaY88W716zvpf tFsh6tKGHIW8IF7OsyteoXWs2bPOi+aeuRO9dGmvrKI2stDM1J5lxOvNvJdnry1ldVA1 U/dm8j2nT5WvR/D6XsgqNr3RIX9zuVimboZpo/eSPR3+GNklJ2Mt17w7L4hBG6Q3P5+t B/aA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Rs6xvWDN; 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=zfLa7sOo1lPPoVacUZ5Wanit4VpAlBcSuHBOx71Xco4=; b=OKurbEdVwVBNcrBucPGCkup3phNiENSZAM/+5hHJNLvPo2tDT5yK1C8nfTMZERPRBL hmVz49483PWEqH1lp4bmxWipwAPXVPHdI9u5H/8RLqGgZcdND+pwntWe5/8mvq5nEAIA Rm19LDO2IPk2C4HK9AaBelkBSRV79Y+KLn/YQ= 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=zfLa7sOo1lPPoVacUZ5Wanit4VpAlBcSuHBOx71Xco4=; b=lC2fQ7SWQBr8VvAqV3bmQQi5CV3XZxg9nBhG73zF//pfPRhHEV383ArW5sYSJnEoyE 2Kk0QLHMCfSH8/LaupQNOOHEWq4vdLFLRvVLMUR7ebgmYxRTCBQZ/jAG+qBF76hpX0ET baRwuSZ6D/ubTSYPHDe99JUFlPgzzteFLtzgkSRlh/qrQFuLdpqDkuWpJW1dqUYpShPO Iv2NOxChYmwhvU97IHidu5wH+dKEtujBD+qJu0v3EdI55GU7t989RryCeB1coOhLpI4S DI4kznGTkkyPKmYp3MBemdsU2ip+ZRdyq91B9g4OlhZceYLJv/x28b5R2uKH55B/8qW4 LPAQ== X-Gm-Message-State: AGRZ1gJBGkhsd3g/nKde/XNVgS6x/tE23TOXSWWhK5rDUou7utbZrlms K/rO8YBUVKlBEGCuANH1RgRgutpx X-Google-Smtp-Source: AJdET5ccpr9As3sN3tdwCOSatFen+96CeMB2d67KhVBg/0jfXEAEwiH92QOmuDEQqlIJA51ULkGHCA== X-Received: by 2002:a63:9409:: with SMTP id m9mr1719906pge.65.1542107918038; Tue, 13 Nov 2018 03:18:38 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:6a0a:: with SMTP id f10ls956590pgc.0.gmail; Tue, 13 Nov 2018 03:18:37 -0800 (PST) X-Received: by 2002:a63:6445:: with SMTP id y66mr4485176pgb.250.1542107917817; Tue, 13 Nov 2018 03:18:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107917; cv=none; d=google.com; s=arc-20160816; b=NBuydqk7EWHp7oxesXIMMtIj4TFBDU7W4Vm1TcvtekBInQt3NH2x196Suvlr8XLxXW q2IkMw1ubQHzw4/zm40pJC+LUO/MIqeeUE4SvzkXID/NDZn+fK/SaX4eX+7WXY+7qgeS Aj+Kxvc7+WSNKXj9dZLsY9wi7FUAF0nyBIsPtRf3GEqiQZ3ZCHnyCuCjfAzDiZ8WAADf cpSrZBoIp0JIPiZEb4yfLcuU2ZeU+liQp5PH96UijWLfhyf7D8SrwIF7fLT2+YZMxnj4 rMOUtgpitSO2LwnVRhATxN8Jw0Hw/IL9oouVYtjBekwTYSg9Gb/A24prBzOoqUv7Dusw zwgQ== 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=zfLa7sOo1lPPoVacUZ5Wanit4VpAlBcSuHBOx71Xco4=; b=Br6Gl2C5xm9j/Zt2LuhGa0cwaHgEV8k9/Caw54IzpXjICtJDvvhNcHtjj2Q3nfMii4 B2axmKSMKGy1+KyB7tK6HJx0LUYt9/BDNdiEVItjnTovxZ8R/RzQL85KsInxpPVZONcj 94nYsgEhVUfSrL5kOg2GHNhNktyfXv0RT7vhKE2GofwS2Jnh0QqEoq71Uy5/QJUt8FoG Io8xD1AIxPuf/ttrwFIFNU1x5MgV9CnmhBnErAQ2gv/dQRcllQMySpHe0n936+TS7hp5 /4s9mwGXe9jMiZau0ASJ4ha14zl7cAvN+IhU4O7SUQYWmUoSMKcy5+4efb51z0PA75qJ CvRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Rs6xvWDN; 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 q3-v6sor22625139plb.60.2018.11.13.03.18.37 for (Google Transport Security); Tue, 13 Nov 2018 03:18:37 -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:a17:902:7d89:: with SMTP id a9mr4191221plm.242.1542107917482; Tue, 13 Nov 2018 03:18:37 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.18.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:18:36 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 17/26] dt-bindings: sun6i-dsi: Add VCC-DSI supply property Date: Tue, 13 Nov 2018 16:46:24 +0530 Message-Id: <20181113111633.20189-18-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=Rs6xvWDN; 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 Tue Nov 13 11:16: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: 26 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id A7E342E5422 for ; Tue, 13 Nov 2018 12:18:45 +0100 (CET) Received: by mail-pl1-f198.google.com with SMTP id w19-v6sf9286971plq.1 for ; Tue, 13 Nov 2018 03:18:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107924; cv=pass; d=google.com; s=arc-20160816; b=Gavaj1oPr5DFO2NjEUAyKkfwNyOMQC7vUNkkhEkgQuxSbSTg0tIK3usarDYbDkwlS2 G9yxOu/sfSh10ygA/h+TnhHPs9Oswgq+LIAbf72xHlf/8hCTfQNn8WdkWnqSIhSjAOf8 hJR2uWTzbpeFJaztOHTFTAm4K56y5hOAkUYNxANx8ASAGc1kNzzVqXVbIYxGwBHYRKJ+ MhFMvEx88+9b2CjhwadZqPn4PGrB2qRf/S0TlBA/7zB9Ku+9evBXEPUZN+MPGeAIJUfu QOfiF/uVYfPSNdsiAp/iNRxtU/0VrbO/Zb7dg5xbNeFoST2hq/ClGkpXEWb6INRa/EQX hzzg== 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=Bezu7kJZ0Njo2tp9TTb/Vi97QjlcQqipnPzN/MWROLI=; b=FFla8r/fYem/NA6n2WcDgKACVchftE1ln3HkxSEzsI5/ZGiXhB+cIFUQROvLrNFU+f 3fTP9qXSbXQ+VG9mjfc9hnUcboOwBUhj3ipY1DAvASC3nk9Ib+t1vkKs9RbXPgDl6VKi iz3zziTm44iswsTqdwHKSCc+SrRFX9gOdR2dfw82Io+pUjVn/E1XJqJYbJuroGwUCW2e 581sga8Bt6W1cXDcJ+NPEDUEhRqDE//L8tb/vBriEI/WX/Bdg7hGQDUG+G0fjdc6Yn7i 9yYBTDoJIDh9x/eAgGOBHMQi9T1UCb7OaO7B1v8UX/WtZ6YnZmkPXyntTASsNdbYFhkE BsBg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dAqS7a6o; 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=Bezu7kJZ0Njo2tp9TTb/Vi97QjlcQqipnPzN/MWROLI=; b=HXtRRPBRUU88ybEcEjQQ/ZV96ehXcNEc/pyqaJm9d4wz4s7tOX3PExyDRu9g6VSiwx 6Sb6M0d2DtTZdweWMVGYQ260+dvtuCSGTYoOXKB8ydxTr9HFdDQs6DLhGy6/6CzStaui nrLWVcMvb5NS7HlliNK2yoYMMErTE4O/w3Ih0= 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=Bezu7kJZ0Njo2tp9TTb/Vi97QjlcQqipnPzN/MWROLI=; b=DWRidB1cgFsjNRQz2A81Mc8CxUJXtfCYbPGQcKWF5Hp0wi5NXEbHXBmdS7FXHNyCM3 87YvAoEvDNJVuDTti8PYx+Ry2D9FYJgTMj7Ez6SDMHOPFc62XH46Gw0IyqUatMgcYFht DAZ1MRAPC/hVjoxNEiJqdwxSF/12JLuQdsvtVg7gAsTKW6dy9pWAW6Ri/MpoCgTkh5Te 4iY/nNu53bkTrrPzl60yKUht7MZ4uk8oghdmlDAUSUblzsczSO68kqr7DKcajA8VAhnl Wq7xPLhbZNhEqFEpN7GarbWo4TH4WmO/tdJ/fG51zPt9SrwaHcAgmLpy5CBi5Xkoj4Qw Xmxw== X-Gm-Message-State: AGRZ1gJ2MhLr3nSwbcW4tSJhY0mrdpLyjPOtz7NzaWJui/NrIxxbq+M2 ITo+trDJ1H3qxPBYhDKW2FkbqMHC X-Google-Smtp-Source: AJdET5f3lJ8uR8l1d7ieeiAjjqFrbsBzfj/JVpjhPWDMK1j1qZn480DUzj5hI5GtcEvvLJYWEXAl5A== X-Received: by 2002:a62:1809:: with SMTP id 9-v6mr2021588pfy.4.1542107924378; Tue, 13 Nov 2018 03:18:44 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:bd43:: with SMTP id b3ls968880plx.5.gmail; Tue, 13 Nov 2018 03:18:44 -0800 (PST) X-Received: by 2002:a17:902:8e8a:: with SMTP id bg10-v6mr4699439plb.214.1542107924070; Tue, 13 Nov 2018 03:18:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107924; cv=none; d=google.com; s=arc-20160816; b=mHqKY6kBIVsDCF7WODAvaLgEwcsB/uj/ZLLBogTEqjVgBPwtvhzUrRWDICChSYQ5pm XLMTz7jTdMgmD///RSu/vVeYC5tcvghZH5K3tuJr4RkQYfz4TXK5kBSvrKcLHdaQ5FAw 0KDx6aX0KmDBqdG03um/KxDTjrgS6w8P5XqWEFqEKy8ls86CxKn0DbJyBXUM/bs5QFO7 EGdzYAZb+fjWRsL9JaQRoEqZYe0Rk+3UptMwnyVTTdKt6ztdLNURrxS6Kxm3MhROOQXT PdhJe4CCIctwSbsTnPfzu2yXsi2/lV2r55rd8KUC46kdv7Bbwbu5bW97JeQ1M+ADZfJU 1KDA== 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=Bezu7kJZ0Njo2tp9TTb/Vi97QjlcQqipnPzN/MWROLI=; b=sI5Jpe/IUojW2qde9PzP/O5h4M8QzKX/UCOGCHO7KO2ObKViZJlkSleJPhCHdgSvyn KA5Ihah8QT61yedSIPGgrAwnzAMjk0bWVbK+Jx9K7mf/h8545B22OuvXjInBuh1tSpsN EBHmVfjUQSgRJR0qrFCjtJ6CkokYWZZ1cO3bUpzwMbJxGyGxLQXsb+ZKQCWGNP8UYYkV 3UUI2iDomYuG30bsfK2YnygODVd3vXQRJKJWQ5giK8loeGElvtAQXeRB0pggQJSWOcTP xoHdmlfco/v/G23TpTVHW8HxqUYoGFHaveU6KjUqQv6FI0pBxdUp8pLfOnOZyh1AvJ4B Ovlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dAqS7a6o; 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 q129-v6sor21557990pga.31.2018.11.13.03.18.44 for (Google Transport Security); Tue, 13 Nov 2018 03:18:44 -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:a63:310:: with SMTP id 16mr4255308pgd.79.1542107923736; Tue, 13 Nov 2018 03:18:43 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.18.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:18:43 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 18/26] dt-bindings: panel: Add Bananapi S070WV20-CT16 ICN6211 MIPI-DSI to RGB bridge Date: Tue, 13 Nov 2018 16:46:25 +0530 Message-Id: <20181113111633.20189-19-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=dAqS7a6o; 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: , Bananapi S070WV20-CT16 ICN6211 is 800x480, 4-lane MIPI-DSI to RGB bridge panel, which is available on same PCB with 24-bit RGB interface. So, this patch adds DSI specific binding details on existing dt-bindings file. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring --- .../display/panel/bananapi,s070wv20-ct16.txt | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.txt b/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.txt index 35bc0c839f49..b7855dc7c66f 100644 --- a/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.txt +++ b/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.txt @@ -1,12 +1,39 @@ Banana Pi 7" (S070WV20-CT16) TFT LCD Panel +S070WV20-CT16 is 7" 800x480 panel connected through a 24-bit RGB interface. + +Depending on the variant, the PCB attached to the panel module either +supports DSI, or DSI + 24-bit RGB. DSI is converted to 24-bit RGB via +an onboard ICN6211 MIPI DSI - RGB bridge chip, then fed to the panel +itself + Required properties: -- compatible: should be "bananapi,s070wv20-ct16" +- compatible: + for 24-bit RGB interface, use "bananapi,s070wv20-ct16" + for ICN6211 MIPI-DSI to RGB bridge, use "bananapi,s070wv20-ct16-icn6211" + +Required properties for RGB: - power-supply: see ./panel-common.txt +Required properties for MIPI-DSI to RGB: +- reg: for DSI virtual channel used by that screen +- avdd-supply: analog regulator dc1 switch +- dvdd-supply: 3v3 digital regulator +- reset-gpios: a GPIO phandle for the reset pin + Optional properties: -- enable-gpios: see ./simple-panel.txt +- enable-gpios: see ./simple-panel.txt(not available in MIPI-DSI to RGB bridge) - backlight: see ./simple-panel.txt This binding is compatible with the simple-panel binding, which is specified in ./simple-panel.txt. + +Example: +panel@0 { + compatible = "bananapi,s070wv20-ct16-icn6211"; + reg = <0>; + avdd-supply = <®_dc1sw>; + dvdd-supply = <®_dldo1>; + reset-gpios = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ + backlight = <&backlight_dsi>; +}; From patchwork Tue Nov 13 11:16: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: 27 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 2A34F2E5422 for ; Tue, 13 Nov 2018 12:18:52 +0100 (CET) Received: by mail-pl1-f200.google.com with SMTP id d23sf4588066plj.22 for ; Tue, 13 Nov 2018 03:18:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107930; cv=pass; d=google.com; s=arc-20160816; b=YZ1K1/+JaLvVBU9l/8tB1Km6PrRSNguvL36bGmNl1UTqVzPTmBSXPB0NZ1DrvMGA1R tEliK5AH/KdHnc0I5boaYLIsx0McUaYwV8x+hfzKCHFsVSd3asGWj8HhEAyv9b+jETH3 a5DNSAf4LgZ5cBSgDIJckiD0OQ/Xp9qVyVTeBlaI2OWTI9ieaNxkH+UUiEF+HFkQrvNY O3DkU9Ll0voUNMR9O1bxv1oK01HKLJlFNOxuIJ+XRNapfrEAUbiN0yXfIgUeN9V+6NiR O5Nqdwa/4SM4/fssmdCSiBvJwdbTH/sJDLDBMgXoPno1fxSJR7Fa22Hrs6O2CvcA0i6U K/kQ== 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=uqavFIRIxYiGdmCcvcWKFKbD5Oh0DSLWrDMSyCnH8ME=; b=Bdu/FhKIR1ZmoAoyRG7pf9dFNKTJ2sK/1iUmZvcLRF1tT7K6rRmhVoJfz8mIXrfYBc ZASuwaRJMB4CKw7XAI/fSqY5SiZaN54QoR3POxmHPm1qG1JYn2VJitED/jlTgJoaWkXj 4SuUhwBQoOh5/IGysxJhzTr77LAlv76Tq+qhmvtMs78ZyToshX3LI0o3aOi//1ZGY4bw ixfiWma9xnKQlEqQW1fvNsOfvZjD51w7HLVPDABZmNGCvAvD7eULfrQCmZmJpw6ID5Dp SERxHpiyVqzkl3zUQfJt4xodfeM8/VMcyoLah/sAXGjfAi8U0uQaL/A5XyML4snlIwTZ EmGQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=D87dF98T; 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=uqavFIRIxYiGdmCcvcWKFKbD5Oh0DSLWrDMSyCnH8ME=; b=Fmxi5RtgeCltWO7LLBNV2lYToVHswCUmFLNKO04CGNTCEkCiA6orlC3p/pbq4qMo2D mUsi5RISFXdm8DpnWOq3kSLV12Fma3qnIMOlgMRdNLQc0SotEqvSPY1qNz5XMwgIEjmZ k6kT+9B1VZh5JY3dkLwAj/xpMXV8LYtazZpwA= 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=uqavFIRIxYiGdmCcvcWKFKbD5Oh0DSLWrDMSyCnH8ME=; b=oMNhK4KYiD3D2NeqezLsCCWIhXvPZFQ1a5ZVzJE6oBTIJPnJ/V7fsnWdJjazncuFCh jrIy9EYKjUSYvKcqG677KNwOM1RnwPO0G8oZYpAyQECWDanZF8H2Lt0F782bgv13+ZO/ Pa7lgCryNhoeGADYKmDZCLU9fDldl5Ti6qGRmY/Bl0xaTDjjng4bnejQUSzMwZhJ7Ykr a/+2d/mVgJ/TPqbXbx2bXdD9JIQCrsp7NM8qcMcJ9GALjUCjX8qrOEIXSEdlElDBYxyz 0337BHUCsQffnP4Q9si4MqXN2UrMjUqw7/v4e6ytHZX06vXQyTQTBC8PJtwjbNr0on1+ eswg== X-Gm-Message-State: AGRZ1gIWu+qkUcyd4K9q+et351Ui2fkE+T5VO9GX7u+jGLPO5Aae4Nys j/7d4qyhz8lZnK3LLctI0CRoQ0lq X-Google-Smtp-Source: AJdET5fpgjzvr/NdXAEFqGJacKkVU0lWUaUJLIC+FGbqUQ2gwtgLisU871guXjaZ1KmkiPd3DuP12Q== X-Received: by 2002:a63:2a82:: with SMTP id q124mr2003560pgq.57.1542107930823; Tue, 13 Nov 2018 03:18:50 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:2b8b:: with SMTP id r133ls2782250pgr.17.gmail; Tue, 13 Nov 2018 03:18:50 -0800 (PST) X-Received: by 2002:a63:4b60:: with SMTP id k32mr4318718pgl.186.1542107930465; Tue, 13 Nov 2018 03:18:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107930; cv=none; d=google.com; s=arc-20160816; b=sBtPgyI+qw0+ogH/ZE05QYVDIS7+5Y2CFdaIv7ZulkuZrlqkSLvODh9rCViLD9aMbY AtC3QgPp7rCbxot1JGSW2kyW7KOfCMAymB3Y6Yea51GcUmLkxMF9pZJ++Mxrn5/KmcNw CvkY+u9P1tEec1fPwtuwuwdcBCVDaeexjKleY6RcgJ0f2Oov9NPasRo4aIPllybiYJZK FRh3yrrK0rJFyQK7lMQxhN5FGUvMg8t5jZlMOjC7mNPCRWVZVjHL9kIBHWCBRU/LBRfQ U9Mk9s/acyqzvAr+qWhNnu2cl7gZ1624sfai1PNqf5+VILV73zbWzgsDKRoqAun8t+1v nFOA== 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=uqavFIRIxYiGdmCcvcWKFKbD5Oh0DSLWrDMSyCnH8ME=; b=L2TfVlBSqIcaNK0BC8CWJYeW4lFrcCp8W7Vk6LE/nDIGFaEDrUMNm3XAVqRAvLeKnE Botqw1wgXcHN1n0B80P5BuTDtX84qlP+IMSjigiNvMXvQ7HzpdQAmHxFohXWJhsfuTiE uTvaphzsoaC2+iT9LhSJeZZBMiHQCTdK1TtMj6D+GLNhVeGIMd4n1rau8mMgNMg58dS/ 0KMn8SAlNyXNCPm0j86uQYklwzXug+sUQ89Hb+8cyTpX6BdAcVrMdoonoUzCZ+8aq8/C 1Za/7mQlOlQjAgAns+NVsBVmpj5z4ZNvB5+B3iif5Or2JGJdk/JdzC+D1DZhRAKNBVtw cE0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=D87dF98T; 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 u67sor2382111pgc.55.2018.11.13.03.18.50 for (Google Transport Security); Tue, 13 Nov 2018 03:18: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:a65:6542:: with SMTP id a2mr4342538pgw.389.1542107930065; Tue, 13 Nov 2018 03:18:50 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.18.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:18:49 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 19/26] drm/panel: Add Bananapi S070WV20-CT16 ICN6211 MIPI-DSI to RGB bridge Date: Tue, 13 Nov 2018 16:46:26 +0530 Message-Id: <20181113111633.20189-20-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=D87dF98T; 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: , Bananapi S070WV20-CT16 ICN6211 is 800x480, 4-lane MIPI-DSI to RGB bridge panel which can be used to connect via DSI port on BPI-M64 board, so add a driver for it. The same panel PCB comes with parallel RBG which is supported via panel-simple driver with "bananapi,s070wv20-ct16" compatible. BSP dclock of 30MHz is not working with existing sunxi-ng and sun4i sun4i_dclk_recalc, so updated to 55MHz can result proper working nkm dividers. Signed-off-by: Jagan Teki --- MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../panel/panel-bananapi-s070wv20-icn6211.c | 298 ++++++++++++++++++ 4 files changed, 314 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-bananapi-s070wv20-icn6211.c diff --git a/MAINTAINERS b/MAINTAINERS index a25549205cc1..f5bb2ffa1089 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4601,6 +4601,12 @@ M: Dave Airlie S: Odd Fixes F: drivers/gpu/drm/ast/ +DRM DRIVER FOR BANANAPI S070WV20-CT16 ICN6211 MIPI-DSI TO RGB PANELS +M: Jagan Teki +S: Maintained +F: drivers/gpu/drm/panel/panel-bananapi-s070wv20-icn6211.c +F: Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.txt + DRM DRIVER FOR BOCHS VIRTUAL GPU M: Gerd Hoffmann L: virtualization@lists.linux-foundation.org diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 6020c30a33b3..20b88c275421 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -17,6 +17,15 @@ config DRM_PANEL_ARM_VERSATILE reference designs. The panel is detected using special registers in the Versatile family syscon registers. +config DRM_PANEL_BANANAPI_S070WV20_ICN6211 + tristate "Bananapi S070WV20-CT16 ICN6211 MIPI-DSI to RGB bridge panel driver" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Bananapi S070WV20-CT16 MIPI-DSI controller. + config DRM_PANEL_LVDS tristate "Generic LVDS panel driver" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 5ccaaa9d13af..04696bb85218 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o +obj-$(CONFIG_DRM_PANEL_BANANAPI_S070WV20_ICN6211) += panel-bananapi-s070wv20-icn6211.o obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o diff --git a/drivers/gpu/drm/panel/panel-bananapi-s070wv20-icn6211.c b/drivers/gpu/drm/panel/panel-bananapi-s070wv20-icn6211.c new file mode 100644 index 000000000000..10174495a6c8 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-bananapi-s070wv20-icn6211.c @@ -0,0 +1,298 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2018 Amarula Solutions + * Author: Jagan Teki + */ + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +struct s070wv20 { + struct drm_panel panel; + struct mipi_dsi_device *dsi; + + struct backlight_device *backlight; + struct regulator *dvdd; + struct regulator *avdd; + struct gpio_desc *reset; +}; + +static inline struct s070wv20 *panel_to_s070wv20(struct drm_panel *panel) +{ + return container_of(panel, struct s070wv20, panel); +} + +struct s070wv20_init_cmd { + size_t len; + const char *data; +}; + +#define S070WV20_INIT_CMD(...) { \ + .len = sizeof((char[]){__VA_ARGS__}), \ + .data = (char[]){__VA_ARGS__} } + +static const struct s070wv20_init_cmd s070wv20_init_cmds[] = { + S070WV20_INIT_CMD(0x7A, 0xC1), + S070WV20_INIT_CMD(0x20, 0x20), + S070WV20_INIT_CMD(0x21, 0xE0), + S070WV20_INIT_CMD(0x22, 0x13), + S070WV20_INIT_CMD(0x23, 0x28), + S070WV20_INIT_CMD(0x24, 0x30), + S070WV20_INIT_CMD(0x25, 0x28), + S070WV20_INIT_CMD(0x26, 0x00), + S070WV20_INIT_CMD(0x27, 0x0D), + S070WV20_INIT_CMD(0x28, 0x03), + S070WV20_INIT_CMD(0x29, 0x1D), + S070WV20_INIT_CMD(0x34, 0x80), + S070WV20_INIT_CMD(0x36, 0x28), + S070WV20_INIT_CMD(0xB5, 0xA0), + S070WV20_INIT_CMD(0x5C, 0xFF), + S070WV20_INIT_CMD(0x2A, 0x01), + S070WV20_INIT_CMD(0x56, 0x92), + S070WV20_INIT_CMD(0x6B, 0x71), + S070WV20_INIT_CMD(0x69, 0x2B), + S070WV20_INIT_CMD(0x10, 0x40), + S070WV20_INIT_CMD(0x11, 0x98), + S070WV20_INIT_CMD(0xB6, 0x20), + S070WV20_INIT_CMD(0x51, 0x20), + S070WV20_INIT_CMD(0x09, 0x10), +}; + +static int s070wv20_prepare(struct drm_panel *panel) +{ + struct s070wv20 *ctx = panel_to_s070wv20(panel); + struct mipi_dsi_device *dsi = ctx->dsi; + unsigned int i; + int ret; + + msleep(50); + + gpiod_set_value(ctx->reset, 1); + msleep(50); + + gpiod_set_value(ctx->reset, 0); + msleep(50); + + gpiod_set_value(ctx->reset, 1); + msleep(20); + + for (i = 0; i < ARRAY_SIZE(s070wv20_init_cmds); i++) { + const struct s070wv20_init_cmd *cmd = &s070wv20_init_cmds[i]; + + ret = mipi_dsi_generic_write(dsi, cmd->data, cmd->len); + if (ret < 0) + return ret; + + msleep(10); + } + + return 0; +} + +static int s070wv20_enable(struct drm_panel *panel) +{ + struct s070wv20 *ctx = panel_to_s070wv20(panel); + + msleep(120); + + mipi_dsi_dcs_set_display_on(ctx->dsi); + backlight_enable(ctx->backlight); + + return 0; +} + +static int s070wv20_disable(struct drm_panel *panel) +{ + struct s070wv20 *ctx = panel_to_s070wv20(panel); + + backlight_disable(ctx->backlight); + return mipi_dsi_dcs_set_display_on(ctx->dsi); +} + +static int s070wv20_unprepare(struct drm_panel *panel) +{ + struct s070wv20 *ctx = panel_to_s070wv20(panel); + int ret; + + ret = mipi_dsi_dcs_set_display_off(ctx->dsi); + if (ret < 0) + dev_err(panel->dev, "failed to set display off: %d\n", ret); + + ret = mipi_dsi_dcs_enter_sleep_mode(ctx->dsi); + if (ret < 0) + dev_err(panel->dev, "failed to enter sleep mode: %d\n", ret); + + msleep(100); + + regulator_disable(ctx->avdd); + + regulator_disable(ctx->dvdd); + + gpiod_set_value(ctx->reset, 0); + + gpiod_set_value(ctx->reset, 1); + + gpiod_set_value(ctx->reset, 0); + + return 0; +} + +static const struct drm_display_mode s070wv20_default_mode = { + .clock = 55000, + .vrefresh = 60, + + .hdisplay = 800, + .hsync_start = 800 + 40, + .hsync_end = 800 + 40 + 48, + .htotal = 800 + 40 + 48 + 40, + + .vdisplay = 480, + .vsync_start = 480 + 13, + .vsync_end = 480 + 13 + 3, + .vtotal = 480 + 13 + 3 + 29, + + .width_mm = 86, + .height_mm = 154, +}; + +static int s070wv20_get_modes(struct drm_panel *panel) +{ + struct drm_connector *connector = panel->connector; + struct s070wv20 *ctx = panel_to_s070wv20(panel); + struct drm_display_mode *mode; + + mode = drm_mode_duplicate(panel->drm, &s070wv20_default_mode); + if (!mode) { + dev_err(&ctx->dsi->dev, "failed to add mode %ux%ux@%u\n", + s070wv20_default_mode.hdisplay, + s070wv20_default_mode.vdisplay, + s070wv20_default_mode.vrefresh); + return -ENOMEM; + } + + drm_mode_set_name(mode); + + mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; + drm_mode_probed_add(connector, mode); + + panel->connector->display_info.width_mm = mode->width_mm; + panel->connector->display_info.height_mm = mode->height_mm; + + return 1; +} + +static const struct drm_panel_funcs s070wv20_funcs = { + .disable = s070wv20_disable, + .unprepare = s070wv20_unprepare, + .prepare = s070wv20_prepare, + .enable = s070wv20_enable, + .get_modes = s070wv20_get_modes, +}; + +static int s070wv20_dsi_probe(struct mipi_dsi_device *dsi) +{ + struct device_node *np; + struct s070wv20 *ctx; + int ret; + + ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL); + if (!ctx) + return -ENOMEM; + mipi_dsi_set_drvdata(dsi, ctx); + ctx->dsi = dsi; + + drm_panel_init(&ctx->panel); + ctx->panel.dev = &dsi->dev; + ctx->panel.funcs = &s070wv20_funcs; + + ctx->dvdd = devm_regulator_get(&dsi->dev, "dvdd"); + if (IS_ERR(ctx->dvdd)) { + dev_err(&dsi->dev, "Couldn't get dvdd regulator\n"); + return PTR_ERR(ctx->dvdd); + } + + ctx->avdd = devm_regulator_get(&dsi->dev, "avdd"); + if (IS_ERR(ctx->avdd)) { + dev_err(&dsi->dev, "Couldn't get avdd regulator\n"); + return PTR_ERR(ctx->avdd); + } + + ret = regulator_enable(ctx->dvdd); + if (ret) + return ret; + + msleep(5); + + ret = regulator_enable(ctx->avdd); + if (ret) + return ret; + + msleep(5); + + ctx->reset = devm_gpiod_get(&dsi->dev, "reset", GPIOD_OUT_LOW); + if (IS_ERR(ctx->reset)) { + dev_err(&dsi->dev, "Couldn't get our reset GPIO\n"); + return PTR_ERR(ctx->reset); + } + + np = of_parse_phandle(dsi->dev.of_node, "backlight", 0); + if (np) { + ctx->backlight = of_find_backlight_by_node(np); + of_node_put(np); + + if (!ctx->backlight) + return -EPROBE_DEFER; + } + + ret = drm_panel_add(&ctx->panel); + if (ret < 0) + return ret; + + dsi->mode_flags = MIPI_DSI_MODE_VIDEO_SYNC_PULSE; + dsi->format = MIPI_DSI_FMT_RGB888; + dsi->lanes = 4; + + return mipi_dsi_attach(dsi); +} + +static int s070wv20_dsi_remove(struct mipi_dsi_device *dsi) +{ + struct s070wv20 *ctx = mipi_dsi_get_drvdata(dsi); + + mipi_dsi_detach(dsi); + drm_panel_remove(&ctx->panel); + + if (ctx->backlight) + put_device(&ctx->backlight->dev); + + return 0; +} + +static const struct of_device_id s070wv20_of_match[] = { + { .compatible = "bananapi,s070wv20-ct16-icn6211", }, + { } +}; +MODULE_DEVICE_TABLE(of, s070wv20_of_match); + +static struct mipi_dsi_driver s070wv20_driver = { + .probe = s070wv20_dsi_probe, + .remove = s070wv20_dsi_remove, + .driver = { + .name = "bananapi-s070wv20-ct16-icn6211", + .of_match_table = s070wv20_of_match, + }, +}; +module_mipi_dsi_driver(s070wv20_driver); + +MODULE_AUTHOR("Jagan Teki "); +MODULE_DESCRIPTION("Bananapi S070WV20-CT16 ICN6211 MIPI-DSI to RGB"); +MODULE_LICENSE("GPL v2"); From patchwork Tue Nov 13 11:16: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: 28 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id EF70F2E5422 for ; Tue, 13 Nov 2018 12:18:57 +0100 (CET) Received: by mail-pl1-f200.google.com with SMTP id c15-v6sf9251425pls.15 for ; Tue, 13 Nov 2018 03:18:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107936; cv=pass; d=google.com; s=arc-20160816; b=zXIs72eMospkaJWWqkFWSQ09FM/UnPbJ+UjP0opv//Lqp2b94s2hjdph11TzvqcB0t l8t7nthrmgzF6/XeSUf0EsgvP7XCcoZzMIDHxf02gpCgdV3l9al4jaz2Ny3TmJ2Gh8EQ Uk0ksdSSWpi4fr1xe+LXUWdKK8QGnG27zmCTAay5SEwn7C2hoEcJE2zC/x2Anxr84gun AWZuJcLiPmgyn/ZMO6d3+6tIoX0oBP/mbzoa/PJS8Vfr+1ARDhjehpn1ZOVnMKbsAYlJ Igm23wPa57m5zQityAwlboatJSmYTkzDiI58iGpXYtrWGptnLlIHww87wuPY0eLxezLa em4w== 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=ARbx+KiDqhCi74+cAhwo58RvKAVcTpf7hF3ar2UJsU4=; b=H0A7GjsH2zVl9TRopxKvOedRjIgHlG4IInHrH7hmIOktwB15+c+kqIHJ9VjZ8vqm83 QUowjBkQGN33u+Xeg301a45VrTqEbSfUb3GzIFumxT9djtbAzEma0Wm20B0VtfIgVn6a j4b8r8VBO4EaDr1do9dCMksDS2fAgik/zZWyJL8N1JDezdH/HjCoB89QqT82EQXIHyV3 rqmR/yhxFFUtXdgsOl14ru0GQUuyVqqAl7n7ZMqutT2QXll1B0cZdeAb5rrceblt81PQ vDXZ0NJ5lUNcG7B3WZzDiK32yP+BQsvpGvrvxWugsA85I2zHPWDtY2oSg5g3GLSSYMiX h4ig== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JHQCKb3o; 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=ARbx+KiDqhCi74+cAhwo58RvKAVcTpf7hF3ar2UJsU4=; b=gl6UODuElNgZ+eCTe4MKc3KltvWdncAxc75n7gxxae4NW58MDS6H14fqQAO5oVNWib 6SIqLxsm/28qMAqp62DzSQiKCB67XgTOduKO5GK6R9RxEdhTzLTlErupKdITUYNgKMEQ fV6QOvRqorptqfagD/oWJi80Ghj9m22qiVXGs= 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=ARbx+KiDqhCi74+cAhwo58RvKAVcTpf7hF3ar2UJsU4=; b=seSfZg0AbtD+a5UxvPwjQdnMMLMlSIPxPzdnGNMdD1emrxf/TFsSqpchh2cw/ryzhn OQ9UdjwUksr8AGy6FHe4hwexWcJ4bzBVtdAGTXlA2zevICo2av7p03CyOaoXBxk1a1cl /Rpk5e2qiFqsQ3ST5U0R7ep1JbUgt0mQFdMJ3dn2Qq+aHF/GdHhTCD7mYmABzgjbcIcu 1X1WItIIOWj7DDEe/i9c6+60cVSNXmPNZGS4u1DZu4H1zRN/ESD4M8xLJIzKK6upH4ln IX84u2yQWyIOpmWngty1EfoMtjeUwNQDShbxaoNt3oVH8WWZg55O+Xzw/7oIhN07zGfn jIYg== X-Gm-Message-State: AGRZ1gL4PzFLw5SpziCF6xsco2N8i7AlCKJ95Gh5WBNCcenjwsi42boE lvxLGGeDezcqNlLH5JoHxlUKcaNS X-Google-Smtp-Source: AJdET5cx2SQe5CYntSe/hlkvk+QCSMn6y3yi7/hrr/hBLonXr7776F4qQzHXTXFmTSZ1CgDK3kgBwg== X-Received: by 2002:a62:45d0:: with SMTP id n77mr1972926pfi.78.1542107936675; Tue, 13 Nov 2018 03:18:56 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:ca97:: with SMTP id y23-v6ls4172829pfk.7.gmail; Tue, 13 Nov 2018 03:18:56 -0800 (PST) X-Received: by 2002:a62:2681:: with SMTP id m123-v6mr4657663pfm.131.1542107936454; Tue, 13 Nov 2018 03:18:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107936; cv=none; d=google.com; s=arc-20160816; b=m4tE0fgdmauCVBOu9ezbv2ECWalChs6yBBdfxW/HwWs4h1hjdqsHBmsXDalizUuHpK jMWLcTdmcknrG/7QjKgz3Gymb7YUejdjMFE0VgfL2pjGw2Gcn4bztbAshibH+jWbsFFh G73OVYn1lWXJJvuE0T7QcnYbyqr/9SBo3q+/pSEAxdYAnArxuE80OZUv/jxBIpCyF6ag NJF3G7uRL+o5GA7+r1/b6IRzb9WY2bAT1U79Mj2tEi3grzI7rk7MS8FKxBngW38BnsKx YCYF4RVif2wx43k2On9wopnqIgDvcZx0zbKY1R25ke8hARpAhaKVbeBDStJBVL8vsD0t foKg== 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=ARbx+KiDqhCi74+cAhwo58RvKAVcTpf7hF3ar2UJsU4=; b=XJQPs2NP/5Y8BjvbL1hImjNx+542YsNNOKCSR8qOHrkUBsz70wBc0s7MLbw0YmKrEq YIRx+txoUokrDKhjyJWqLfitQ8pfuhPdY4SGSFAmPYH4j03aJPjhCWQszCJPs1pPS5gS 7TGjjZHbL/xPtPYv9KH3HssNpzL9IJ12d320J8OaIMTgcs+aGxqTJnHplrFN/Uw0xmJb yn5Mka1hJx9ib/qli0T/e2+aYHYRlmEYLkTe36LA4lxPUWy1jILpKAjKrZ3+0tbFmGk3 qfVlFTw7Lq237EFNrQXO1vN9z8Yb1IR152r11UmV8Lt5S3W+gkCtFlNqA47gECWZM6vc pFKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JHQCKb3o; 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 d4sor6027779pls.69.2018.11.13.03.18.56 for (Google Transport Security); Tue, 13 Nov 2018 03:18: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:a17:902:b18c:: with SMTP id s12-v6mr4589153plr.16.1542107936124; Tue, 13 Nov 2018 03:18:56 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.18.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:18:55 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 20/26] dt-bindings: panel: Add Techstar TS8550B MIPI-DSI panel Date: Tue, 13 Nov 2018 16:46:27 +0530 Message-Id: <20181113111633.20189-21-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=JHQCKb3o; 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: , Techstar TS8550B MIPI DSI panel is 480x854, 2-lane MIPI DSI LCD panel. Add dt-bingings for it. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring --- .../display/panel/techstar,ts8550b.txt | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/techstar,ts8550b.txt diff --git a/Documentation/devicetree/bindings/display/panel/techstar,ts8550b.txt b/Documentation/devicetree/bindings/display/panel/techstar,ts8550b.txt new file mode 100644 index 000000000000..9d3056dd8bf9 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/techstar,ts8550b.txt @@ -0,0 +1,22 @@ +Techstar TS8550B MIPI-DSI LCD Panel + +Techstar TS8550B MIPI DSI panel is 480x854, 2-lane MIPI DSI LCD panel. + +Required properties: +- compatible: must be "techstar,ts8550b" +- reg: DSI virtual channel used by that screen +- avdd-supply: analog regulator dc1 switch +- dvdd-supply: 3v3 digital regulator +- reset-gpios: a GPIO phandle for the reset pin + +Optional properties: +- backlight: phandle for the backlight control. + +panel@0 { + compatible = "techstar,ts8550b"; + reg = <0>; + avdd-supply = <®_dc1sw>; + dvdd-supply = <®_dldo2>; + reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */ + backlight = <&backlight>; +}; From patchwork Tue Nov 13 11:16: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: 29 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 965982E5422 for ; Tue, 13 Nov 2018 12:19:04 +0100 (CET) Received: by mail-pf1-f197.google.com with SMTP id r65-v6sf5191188pfa.8 for ; Tue, 13 Nov 2018 03:19:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107943; cv=pass; d=google.com; s=arc-20160816; b=bKgniSZ8cvOuXSHcyaJN9eK30TLKWOw1ARBB1XXHgZDSzYuVTSKxbatTkmpdcLOL8b H+nxBF/m/BnIn5Qvn52+hfKEoXLb+d8kIszn3it9Fdc+7dT2lUwSAGGpWzEFMTmh/Ubr 7bien/6NUntq2rLObLCmF83QJe7OBdHL9nrcz+Q1mi9q5p3d53nZv2nI7vM3BsnVI70t 2rXxvO8Ga/2PRIDvY2Pb7cvAhfcpIIjt49H7djVRx2OUhWEgJqfNoLrkxJ/l6tdCnhXq +rJEr9NDXrHUDaiOh0BvdPH9HyVFcIcu95QzGnySJJ9gJkuwxrzrPC8xWqQB2+Y33d+V JrdQ== 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=1ffbMwrT3Fv3KeJlLSZWFa/jJG9NP1xOyiBOskUUsgI=; b=oLkYZoShVlm4lU0s5+xfLDid12qqon74TDJfgn+mS9z/b3NIW9mkq7eZJwHIcaBaGm 6Ptc5Sq8t7dSxmv94BZJIWAoqK/4cPRsUTWZ5icSM1Pk8/XCc5cf8mmX8akOPRW+BR/U 3HYWJB2qXfR78RpCJwKkpoDR5EUUcfJoKsqltcVCD9aQ1FilH4mApbSkGYzkD3rMPfmy uEURZ50E0bC28eXOGgTGLPLuDKuUDUeNi6GHWCa9ujW9GJluLhY40tn6SedNje5n2x5B TqWr3a5X/be8gY7eMAy0fF9hVDWuQ9E73GTj+xEY42aexQAZNgAk+7FpClwy+6CUvxXy 6RDw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fuO6h+ix; 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=1ffbMwrT3Fv3KeJlLSZWFa/jJG9NP1xOyiBOskUUsgI=; b=HSovBj8oVH0H+ovX4uFUK1BEYhINZiUAve11aUswQUDtk6Yv0UHzpNDsyJ4bd1Qqx3 BnE3IXK+WPk7xrUa8zsmyWviknN2p+U5dL+ZMRKqpzyTRppE6M1i5eEqvw5s8pYrdFyu FtJOHPSdTOLHoe9aUUqG2YO5p0CkFAcgsBHMw= 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=1ffbMwrT3Fv3KeJlLSZWFa/jJG9NP1xOyiBOskUUsgI=; b=jb7R171IMMZ8tE0KMfEo16SsJ7pQeFnZayYNXyn9LVy1d4KJpGH85z6jLTPFiNEkqS 752/3fNqlzrYreE335uQfn8aSkgMlb3K7tY7fU7ARf/l/T4iNOMpQRACSVyGFiygbAop alM11h7OYIPfrN/rOL2NbV3o4NJiR3VsHISUKNwfCD/WA9sliovB8JlharRFNEw0oBqw gXYnU5idPX6P8TDKZDkjsI1fLhOzpG//6XUuWPCu9zZ8JF46D3qjSJfCdtf/ygYAiBps aZXvqrOXGLWSN4P3sYiN5kFQ5OqBrE7qi0js783PaGF/Py2SQ6p+t0Ma0iVJbp6QAiGH bO/w== X-Gm-Message-State: AGRZ1gKLziAoDEM6mKmifrf75S208CBaEaF//bBIIUx/J665VE8wgz+r Wru8ET8zUc0sL/QHenNuUQQNleQi X-Google-Smtp-Source: AJdET5ffstakQam3iRwbHCy1MSCiPtWCzYLmegJO+LR3azNssBy1Qk9DspAGXCX3vtHlh7kCUlQuqQ== X-Received: by 2002:a63:8ec8:: with SMTP id k191mr2021640pge.47.1542107943251; Tue, 13 Nov 2018 03:19:03 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:ab96:: with SMTP id f22-v6ls4324975plr.1.gmail; Tue, 13 Nov 2018 03:19:03 -0800 (PST) X-Received: by 2002:a17:902:ab81:: with SMTP id f1-v6mr4739782plr.103.1542107942911; Tue, 13 Nov 2018 03:19:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107942; cv=none; d=google.com; s=arc-20160816; b=c6qs6EAfbEX7xXg1fTudLzeU9lPjqQTmJ2vDODd7bOXfgd7WtGbqnJDHUgTRKGGoia tlPJb/cIIsLEdYIwbMPQd09lW+6huLNJUudth8kbSctWKHJsELJZD+9DKuhYpssBKqk4 A64+Gc3v499aT72ubxLbwzKkd3YqmdsZPyhC6MJuO2lBHWN+iYu/gIM7uTZ+2QEk8BzO 9BJtqVtgGkf3DWiAVPIY+YI81zzentcB5mSNhK3tFIjkmvFAfgN+dWJ130Ts+1F+C1il pLrsCKM5dDVaCitcY4roGk2Hp5IRiHbXBynv8CnDmnjNCW3lHKVRcAgvOQoB+BdeydJm uEvQ== 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=1ffbMwrT3Fv3KeJlLSZWFa/jJG9NP1xOyiBOskUUsgI=; b=uZ7J8VA3KAccF/UZPBngZsa523rIFuT/LV3tHpYMnEyHsKpuZnGV9Tv9SO/KtZXCNW KcNR+s72Y1mKaCBoQ99RCdabTXIUJTld0Q+22RhJ2MrVtEghJCn/EKRncVNyQY3FGAuV C5nN9dq5q5ZC31DIJ1Jf2bJFjgrPoLOBcaw+9y1XNCz1dc4bbXR2DbkvdoyPwRxifFnx /F5WXclFnegdhEn4uZa+bwLC2KlkxM2y6vCAgmfG7O0M0ZwqprXk7yJNHziFzOZ1DHwG 6mxFXZt+Zh4Uu69uFLFd2TKtgkZwogUIH8scr47OPPPip6/G33R4rD6BoUuc2oWnDUQ6 6xdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fuO6h+ix; 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 v90-v6sor8737278pfd.71.2018.11.13.03.19.02 for (Google Transport Security); Tue, 13 Nov 2018 03:19:02 -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:a62:3101:: with SMTP id x1-v6mr4857394pfx.204.1542107942470; Tue, 13 Nov 2018 03:19:02 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.18.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:19:01 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v4 21/26] drm/panel: Add Techstar TS8550B MIPI-DSI LCD panel Date: Tue, 13 Nov 2018 16:46:28 +0530 Message-Id: <20181113111633.20189-22-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-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=fuO6h+ix; 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: , Techstar TS8550B MIPI DSI panel is 480x854, 2-lane MIPI DSI LCD panel. Add panel driver for it. Signed-off-by: Jagan Teki --- MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-techstar-ts8550b.c | 324 ++++++++++++++++++ 4 files changed, 340 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-techstar-ts8550b.c diff --git a/MAINTAINERS b/MAINTAINERS index f5bb2ffa1089..3dac08d0b3cb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4718,6 +4718,12 @@ S: Maintained F: drivers/gpu/drm/tinydrm/st7735r.c F: Documentation/devicetree/bindings/display/sitronix,st7735r.txt +DRM DRIVER FOR TECHSTAR TS8550B MIPI-DSI LCD PANELS +M: Jagan Teki +S: Maintained +F: drivers/gpu/drm/panel/panel-techstar-ts8550b.c +F: Documentation/devicetree/bindings/display/panel/techstar,ts8550b.txt + DRM DRIVER FOR TDFX VIDEO CARDS S: Orphan / Obsolete F: drivers/gpu/drm/tdfx/ diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 20b88c275421..d0d4e60f5153 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -195,4 +195,13 @@ config DRM_PANEL_SITRONIX_ST7789V Say Y here if you want to enable support for the Sitronix ST7789V controller for 240x320 LCD panels +config DRM_PANEL_TECHSTAR_TS8550B + tristate "Techstar TS8550B MIPI-DSI panel driver" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Techstar TS8550B MIPI-DSI interface. + endmenu diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 04696bb85218..88011f06edb8 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -20,3 +20,4 @@ obj-$(CONFIG_DRM_PANEL_SEIKO_43WVF1G) += panel-seiko-43wvf1g.o obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) += panel-sharp-ls043t1le01.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o +obj-$(CONFIG_DRM_PANEL_TECHSTAR_TS8550B) += panel-techstar-ts8550b.o diff --git a/drivers/gpu/drm/panel/panel-techstar-ts8550b.c b/drivers/gpu/drm/panel/panel-techstar-ts8550b.c new file mode 100644 index 000000000000..70a5f8ec6908 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-techstar-ts8550b.c @@ -0,0 +1,324 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019, Amarula Solutions. + * Author: Jagan Teki + */ + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include