From patchwork Sun Dec 22 13:22:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 951 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 416B13F042 for ; Sun, 22 Dec 2019 14:29:33 +0100 (CET) Received: by mail-pf1-f198.google.com with SMTP id z19sf7190856pfn.18 for ; Sun, 22 Dec 2019 05:29:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577021372; cv=pass; d=google.com; s=arc-20160816; b=MWEkz/F7wOTs+LX3v5FtsrA4e7XTN+obZyHqKcC3yZjkoGM7tphv6k/uFecwRMAFGB I3sU5dqv2fb8JCfiz3/DtaAS2Gilkpx5msQLQuCsJezEHtv+wJauG9bnSRKP86WiRD6K rV1o4dW99B9MG0OomBiIoynULtiEugB4oWqHrFK671Nca7ENQxnTAjziU+WE3kZGDmr5 qLLJHkXmzocZRobYbfF42ZSe59lUZOjhXBk+2ME/4/uctEPfXXrthMmyrSvvrrejlYSF 232PjCqxXSmZXKRdzVu3fqM62UX7sBEt1Rhg55IRyklBkZpNrt7SNGMz63dUxoWsuR43 jWEw== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=uANYhzE33RxmbhZkEPF/vgG9uoHWxhnr6DTX92ERI2o=; b=hx0Mqz/3H81/u1+4uYd6VeQsmuUfyU5N4givvfX+8y26/30oHioeFLrp7JTiPmVplO mCWaCGiOiOsNEN+0K9OM2ZM6MKERZcSZQbdVRAvG+SIpeYvoNHQjVNVNEmQUh6ek79Sh DbRWO7YnI/iZI4lkAB/cX3tPx1STqxwy0iAW/QZvcSTKABmDVaDz1K5aVSlD2F0m2MXz IXSvDghkiYuyxUst3TRwnee2S2T7cjyqYvohSOErrYkztPXCx2Q0nkUFrrAWvWTJpZi0 4P8dq6YuiEfUR9MjYPWlinK5RTez8UsRdsZTIHmKErsCHjmeC/Q6R1qMZk1v1cQL1sqW xuRA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="CrIi6L/+"; 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=uANYhzE33RxmbhZkEPF/vgG9uoHWxhnr6DTX92ERI2o=; b=kl1yCb3zwnVoZUj4rx7jpMLVxHPb2f3mjudLziBTGHFZ4UwzsE+RtexVMwUnNB4yw8 4tr1brb09Ed5jEKvhaGWFF5512X8BxqwctcguXuvqgrPoaQTfvjHzpK6M2G75LxZkK1p humcaY0TeAlavchzZgFvwtBL23A/0AoSK/n34= 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: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=uANYhzE33RxmbhZkEPF/vgG9uoHWxhnr6DTX92ERI2o=; b=qTGOfXfmxx3PySAfqufyWGIrrAcQke3Gy10z/0slbSD1+mxVc1tD9R8mNAuqh+4S6s E2chkm674QS8S9fTThbIzHhEjqfHGPqXKa9wwcORfZAZ5zLKis7DzPq35h8JggQoYji8 5iRpg1WAdXr06Lev8Gi3MB1cQq4GRtWXKnMsUDfhQkT6tkgL4IfVUXaem2SS7pfkDMM2 vE1twRTCz/CKr/amw/DtezZo7Ea7teyxRYwuuE23vGk/T/OtVf2Nfw1Jyhces+FO7sTV 3rXEs1WbC70oJmo6lTnBpEt+HxsNMvoEZgTLIXxuFGTnLyAA9V7EboG0oIQ/2IoIpIkl 2uuw== X-Gm-Message-State: APjAAAUuEniLWjIiWDxAD1YRfSDw9YSmXc6pQ8qbDJM8uC5PuEIdEzpj C+2uWAPUl9FRbY8v+tNbtZw6H3iH X-Google-Smtp-Source: APXvYqz6lAgo8OLr5Pe96yAXFF19P3IoViC4UEa5aTiEV9hckBM4ZaRmXNTn26c/BtY97kpvG+M4Gg== X-Received: by 2002:a65:4203:: with SMTP id c3mr25840012pgq.368.1577021371718; Sun, 22 Dec 2019 05:29:31 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:6791:: with SMTP id e17ls3283745pgr.14.gmail; Sun, 22 Dec 2019 05:29:31 -0800 (PST) X-Received: by 2002:a62:258:: with SMTP id 85mr28577741pfc.254.1577021371245; Sun, 22 Dec 2019 05:29:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577021371; cv=none; d=google.com; s=arc-20160816; b=QVeqW7jDv3+XueHbQzeoKwhlHMiX1E7ha4fOnSGbB5ye7+Fw2fV2hp1gzSa9TvRdfd lB061tzX1d4MF7uqffTHKTOKbCaFbyFRg0AkvZqbN/zQNyWGooH8wuct1uc4wrwQKchW Id8+se7oz3Rdrcq92pOBdiUNd3wdv80dtXTX7M9zRtA4zaGcU5MCtU7/0MhXMJr3x5vx aqNdWEKcCo/UNww/Sj1dqZhi6Ds4Y4/lMIbzZ1GA3KG8yypFogb/gxyKDnfRvH+7YxXE pDYnK7ZTAx7Rc7Zm8j+HfVtlKKN6bjob5v0Yfvr2X4Xd4fbX/nmzM6D62odZsMseQ6FL Vh7w== 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=yZ8n1dFGNqx9MjMWepdptN60E7TYxz6HFWUIoiztPpA=; b=XPJwDQ11alS8dogRKbR/47AUXV/JTFF/0AEpt26hLXUQEGCzNP1R9EKffer8ylvE+F TXzdTLSpIX7JkDu/3sBzsfpsdZlv/527HKZRjE/2Aao/80ELUjAKFxlFmYR6ONpo+Roj qAd1qZUEUctqiLCmNU7b/V7RzYpmKA1xTvBhFwAkh53TZQdzMCB3zedTYEN0v+lgn9sN +SQwSUWE2TkzAU5nYqBChOnvULKnECY6aTW+J3qGS+pYlqTQ+PV9Vx0QywsjgCzDt7Pl axUQlVBsVUPWv2pkX+USkXMEdKBl9nzmIp51O2z/btXYL3rZYzCV5S1j43cSlUhm1KXU zgNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="CrIi6L/+"; 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 2sor17153426pld.70.2019.12.22.05.29.31 for (Google Transport Security); Sun, 22 Dec 2019 05:29: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:a17:90a:9c1:: with SMTP id 59mr28516972pjo.65.1577021370933; Sun, 22 Dec 2019 05:29:30 -0800 (PST) Received: from localhost.localdomain ([49.206.202.16]) by smtp.gmail.com with ESMTPSA id o2sm12073058pjo.26.2019.12.22.05.29.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2019 05:29:30 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: michael@amarulasolutions.com, Icenowy Zheng , linux-sunxi , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v14 1/7] dt-bindings: sun6i-dsi: Document A64 MIPI-DSI controller Date: Sun, 22 Dec 2019 18:52:23 +0530 Message-Id: <20191222132229.30276-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191222132229.30276-1-jagan@amarulasolutions.com> References: <20191222132229.30276-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="CrIi6L/+"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" 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 in Allwinner A64 is similar to A33. But unlike A33, A64 doesn't have DSI_SCLK gating so it is valid to have separate compatible for A64 on the same driver. DSI_SCLK uses mod clock-names on dt-bindings, so the same is not required for A64. On that note - A64 require minimum of 1 clock like the bus clock - A33 require minimum of 2 clocks like both bus, mod clocks So, update dt-bindings so-that it can document both A33, A64 bindings requirements. Reviewed-by: Rob Herring Signed-off-by: Jagan Teki --- Changes for v14: - none .../display/allwinner,sun6i-a31-mipi-dsi.yaml | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml b/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml index dafc0980c4fa..d41ecb5e7f7c 100644 --- a/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml +++ b/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml @@ -15,7 +15,9 @@ properties: "#size-cells": true compatible: - const: allwinner,sun6i-a31-mipi-dsi + enum: + - allwinner,sun6i-a31-mipi-dsi + - allwinner,sun50i-a64-mipi-dsi reg: maxItems: 1 @@ -24,6 +26,8 @@ properties: maxItems: 1 clocks: + minItems: 1 + maxItems: 2 items: - description: Bus Clock - description: Module Clock @@ -63,13 +67,38 @@ required: - reg - interrupts - clocks - - clock-names - phys - phy-names - resets - vcc-dsi-supply - port +allOf: + - if: + properties: + compatible: + contains: + const: allwinner,sun6i-a31-mipi-dsi + + then: + properties: + clocks: + minItems: 2 + + required: + - clock-names + + - if: + properties: + compatible: + contains: + const: allwinner,sun50i-a64-mipi-dsi + + then: + properties: + clocks: + minItems: 1 + additionalProperties: false examples: From patchwork Sun Dec 22 13:22:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 952 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1791B3F042 for ; Sun, 22 Dec 2019 14:29:38 +0100 (CET) Received: by mail-pg1-f198.google.com with SMTP id x24sf7531486pgl.0 for ; Sun, 22 Dec 2019 05:29:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577021376; cv=pass; d=google.com; s=arc-20160816; b=nBDVLddjN2XHi7WO15eGerUA3i9TrQN3PgltaQRi6znX+XV0bSa3MOeQXar1qlJa2e 95nLueBsebTZGAlDbJN3PI1XISzr/WD2adfGIUxAyJY8ETimaRXKvjq0YS0yzjoLPIRi wGLdpnLNP/A7DhN/XKwaMDI7Bl9Ij9myXBxsNCuc9NhOlXtKaujV3qXJv+LM/0J3P4a2 y0Q8IrCHPeqJzp0JrtgN4kEWN+aOteEETxTHuZanVmWbYpc/NGgT31x7nxyQ77/7PGEY nALzovfJ2/JkTJJbmTkQHRo4dJLnp/PcDBsjJapscp3oWFrGujnpDJQ90ZWzXuKOGC2o SCOA== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=4iGqfbz+CFSa6ueglErvPMP8CjPpP/Y82LNOoC+C4qo=; b=LNV7/4IL3Rdjtl88ASkYa0qqwKCGvr2rxMBXaCjthqUa+wGsl0+MI35LhL6Z+guF// ZLjWw6E6mvsNUtaV5lARSa4jRPZJVaVcXCT0sSFgJ1TLWCHyHA7zw8tzFpJ1JSgCSPGQ 7/G+rgQutPCcJI4f5QzoZmqKZCqAnZFPPDhn1PodnFTn5TIOci+sJnkslWXoSbu1ViVf CJnpIevgAofhG8DnihUAn6oB7QxwMuNgLC3RYQGgAnZw5YSvHX0Hq0FnqUrcwjONTpdf QewT7zWmJBCtXPz0Ce6Tl4GtU61qPkbNGfe9bgnjmdqlhv65K89yOfluswTQlDaV8nZR fAFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lB4V4tgg; 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=4iGqfbz+CFSa6ueglErvPMP8CjPpP/Y82LNOoC+C4qo=; b=VIiwSgUuddQEoN5borcKX9aJgEvSd6hSUAzao93N4X5n7E2wdIv74ZR0eaN/mHZm4f 1BisNmDwVnWfILw4Es7FUACVyLvssmCpuqwkNaeGDfS0DXoH7HmoKAcUVCKNjSYOqWzt mjtUg0hU1CNtp4xQ6ygIeIJ/BL/tJ3VGzJX0w= 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: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=4iGqfbz+CFSa6ueglErvPMP8CjPpP/Y82LNOoC+C4qo=; b=UT40f9kquRnx5fEZ2eiExtmvqIi4tucWU0ol31z8xPAEsIoW9lRXC2TPNSkx3oSxKj J4sA2yruvM+KobSy4Aq0TeruS+/fuDUtJ8UR2jMMR/KpdmM34zZV1kWSFhNiBNjcMoeX zLPnm0f5IOA4VIjt5gR/pYPtj8V7kE59JWLklHKO8V2Q0eDMm5FqssyXRyKmEafp2X5y I+PAYgtfVAS4qwrbtGRVCgHVl//KTaMCVATufZXAzdwMUEzj2tFzdbwN6iiagbao8DJ8 XC9aMFAQpsDJ4zXYoL5V7VYmtHv3UIjsDsYB7f2dg80o8DPujJ5RRRcKQ1p33La9gVU6 SlPA== X-Gm-Message-State: APjAAAXACdGLi4b6RuyrBr+aLywTDebxwYLBh7uoF2LJplDUxwOoZDIw 4rHdBRUglCkpfFsEET1EEzEmBwST X-Google-Smtp-Source: APXvYqxhFLbhDn5z5zEbzW/yzhf2qx4Xtq/3Y704Y/sxSz+PXCeZk4qPt32rn248jCnOaG/P+PZ0Jg== X-Received: by 2002:a17:902:6501:: with SMTP id b1mr14352251plk.121.1577021376496; Sun, 22 Dec 2019 05:29:36 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:fe5:: with SMTP id 92ls3925455pjz.5.canary-gmail; Sun, 22 Dec 2019 05:29:36 -0800 (PST) X-Received: by 2002:a17:90a:fb4f:: with SMTP id iq15mr28802916pjb.86.1577021376042; Sun, 22 Dec 2019 05:29:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577021376; cv=none; d=google.com; s=arc-20160816; b=oYihPvn3iMbH9UMd2cMCADhHlJtTTNSaf4W9cbSkLvf0JzLRoiRU3X4XVJ+PSJNOiA /A4COHv5CC9gqavpkNpI2vzOP6VjJCMT/959sQGR7/ZWgvTh2ByycDVPow7tCMponeix U6OdtpelzWrRvWpb8b1c0SAS+ox0t+/+BJdMOm2iLtpAqZ3QMohzU0nFqla4yHZZS9fk 8Pbc3gbRm5l75MBfhnnoYHci53XIMhvkUYIeqopkW4Jw+1HoCIcL11VQj/ujBQHw5zKZ 0WmsL8XQRV9X50fUtye8LuskHVM69Pd65h+gnwMIwFxyPb1CHkJa33pHt79QC/L6atZ+ ENjw== 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=KhD44eBjciixBbXS0jbewwrbs2b2OiqLmvbXkaKHo00=; b=WQtpw4z+aCGy3ZgvWkRdl3Y5Rlgiz9WAdyppXeiL0uUXk6AtI05alKgPtty/TIlX+Z +lTKom5e94MQ+q3EEIWei+XmzEh9DqP00paszD9Dd9mjqj/GK9zTGobamOHYBDhr138x HuCT2JnPchHrD8pc9HOe+ZrbJWiD3AaeRQRLR7XRJb5VPDJH1WSg9WQLxQ1GgpbPR6ps mOs1ZeqQHQR84hfZVOizdLAWATutHWABz7Oh8N7ksnq3nuzsBlYpe6U1TEjLErde7nqk c2ruBFHBI3GI/la9beOyBzZMMclrRWBpWT0Pmf34udFxWxKYgADes/yyn3gFJ/GgIGFK Gh0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lB4V4tgg; 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 p15sor16997724plo.24.2019.12.22.05.29.36 for (Google Transport Security); Sun, 22 Dec 2019 05:29:36 -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:74cb:: with SMTP id f11mr24895957plt.139.1577021375724; Sun, 22 Dec 2019 05:29:35 -0800 (PST) Received: from localhost.localdomain ([49.206.202.16]) by smtp.gmail.com with ESMTPSA id o2sm12073058pjo.26.2019.12.22.05.29.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2019 05:29:35 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: michael@amarulasolutions.com, Icenowy Zheng , linux-sunxi , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v14 2/7] dt-bindings: sun6i-dsi: Add A64 DPHY compatible (w/ A31 fallback) Date: Sun, 22 Dec 2019 18:52:24 +0530 Message-Id: <20191222132229.30276-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191222132229.30276-1-jagan@amarulasolutions.com> References: <20191222132229.30276-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=lB4V4tgg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The MIPI DSI PHY controller on Allwinner A64 is similar on the one on A31. Add A64 compatible and append A31 compatible as fallback. Reviewed-by: Rob Herring Signed-off-by: Jagan Teki --- Changes for v14: - none .../bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml index fa46670de299..8841938050b2 100644 --- a/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml +++ b/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml @@ -15,7 +15,11 @@ properties: const: 0 compatible: - const: allwinner,sun6i-a31-mipi-dphy + oneOf: + - const: allwinner,sun6i-a31-mipi-dphy + - items: + - const: allwinner,sun50i-a64-mipi-dphy + - const: allwinner,sun6i-a31-mipi-dphy reg: maxItems: 1 From patchwork Sun Dec 22 13:22:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 953 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A1CB33F042 for ; Sun, 22 Dec 2019 14:29:42 +0100 (CET) Received: by mail-pg1-f197.google.com with SMTP id i8sf8659648pgs.3 for ; Sun, 22 Dec 2019 05:29:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577021381; cv=pass; d=google.com; s=arc-20160816; b=KciXNYoEhX46LBsHbSyXtVApkeHY91C7gdJrwEvGEfX0+gflTCS1eXRLgCdU/yacVB mbBR1+E3IrRK21PwWI5wqZ+7Xval93IV0SzZXQ3CDlVCZpYkuNQ+J2MqLrn48IwKToWd HwxxNJavyevyYHyrZT5Z19euzNQETNrvG+jt4k+bTae0qO68zQoIKouu2WEueFVKsn4n Lmwkl+8kHqbCPEFHKLgBr4xNUfVDv0Ha1CL+chgV4Q6OQVr1+Gqzg4RrhxmcTJ0v9Ro4 E9fdKb6NlP41uIZLZAoljF1p+i1hy9ck47Jo8ucFN0usO52OkJIXk0Hqn4lEYcC+/Elf 8Yig== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=idyllTPLxWLWQ2TIxNgVLFN6u1zw9e+o6TD3sj4p9ZM=; b=YRcO0UOtYtdZVUvG//FdexpfDviMkIICN4Lh56qhJhqUPLRmSAhB5gDARHWbyitaM0 YrKxMcjgbt8BEug0X4fPGvQ1rkqCrwwYXiymrbS7bNGhKbBm8cyaH6ycRFUsaefXUVDP +97fgXKuq0AB8kf00mxPwfGJLKv7qOstNjdj77ievPCtJ+qCSuDsyHJWFyp17LPQYlzW BSmh0usxaoqABBuLc2g9iKQUWZ+NAjA6VLuLg1tt0VSDAVlradhwR4ru5cH/cWaQyKP/ pHxGz6dKJNyvblslCdqwIDb6HDzZdieDKwY2fW5XO/ZeGBbUQHTQPfvAnECcXJCsqxQ7 rv3g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dNOsofgd; 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=idyllTPLxWLWQ2TIxNgVLFN6u1zw9e+o6TD3sj4p9ZM=; b=DXoF+qfp0ansUMdkMOogufZ5Kd/R7XFl2pgV7F6zR+xCftIqURu8jrKpMOnAB1zwW5 RNAj12In3wtKOa910FDFEIwpUgW2M5YRk5kgB9wBwIDFAEww7Dc6fEvsWo3Z9M8JeYbx 0Gmht/3vjJ+ome0AIu+gQVgye2TlpJvc0ye3M= 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: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=idyllTPLxWLWQ2TIxNgVLFN6u1zw9e+o6TD3sj4p9ZM=; b=RLpbuf120BQjUIgjUsAzBLsBLnNR5dpw2fbkVcvqLPjHIJU0pGkCyeLA4iKbKCsQHp Fk5YxQ0fEJfphVD8GL85JBILzw25hn1RkINgm+6lkLw97d1NROV4tJBbyGLvxUW9yvcx d5DJk0mfktluJHwrgeTqcrgIgBbbQtrSxeFdQpEPqNcF+eNfw00EOaNAjcJ7x91Bs+4E khcgDi90Ag1gHiS45HFEILq0nEE1akZCryfcrbGewJEdvqtIzNPPbFtAbcmPCAXNjvR7 Fydn1mwmu+koyL6O2HfcMLy3INJ7skOUhC0WjfB3P96fKi9TpCtaySL8VTOSZKhBraK0 gfGg== X-Gm-Message-State: APjAAAWI8co664+b4ksoqjjWuwB+yc0s310AWjjDYDvZj9cxMD8NKcqy CII5UQ73rqRO+WNeQXDJL4RifSGO X-Google-Smtp-Source: APXvYqx9J/ZOkaT/Xfc8vHv/MA+SQcr9gw8wt9sZsUoCfiSViFVYTL+Vdu1Y6rCrOYRgxdjqU1/Y1g== X-Received: by 2002:a63:2d44:: with SMTP id t65mr27511193pgt.112.1577021381446; Sun, 22 Dec 2019 05:29:41 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:f8d:: with SMTP id 13ls3932404pjz.0.gmail; Sun, 22 Dec 2019 05:29:41 -0800 (PST) X-Received: by 2002:a17:902:8a8c:: with SMTP id p12mr12138472plo.6.1577021380867; Sun, 22 Dec 2019 05:29:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577021380; cv=none; d=google.com; s=arc-20160816; b=Hwa3idIaaeBbIPl/Lx/BXrHb2K5Tt3ibcOmUP+22WdNCtzNdMwRJRpHbzJePL8yD1x V2clUfR6vxOX42euZMw4YVVRHWpimBjljTSE5vIMGtpRfNauBooPSzOoTz0a6bblfODW YzIDHiOffHDvzAHwB9OMcPlbJGgcCGrUEYpmdRPY3CUOKo/pVI3lIO0xq1NJPd3EXUvF EmT7uji2flYQw4VIQrXJRAe/wT3CpQ8/eim6k91S10oOrvckpQe9ZsnMy5dh7U/bUR4I tabLSJNko3ZjQpqkmyJN/zRBTf29Qxm8KJAPwJTAjDZ1635GpUw/xT+VOtS/ge8be+sk g/GA== 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=NRAz4ZoqKI0Nd9TLnyy5Bof8VE4wzHjzOviJFUDWFYU=; b=EnnG3mu+IovS0J9rpJq4Lk+VlE9BJxEOt+1SktxFFDwmdvXGG9GHsYSlI2ghZhzDQr ZHQXml1pFNAaIEUVFTNQ4MLBYwjEDYwdL8BVcTcJFq71Kachi9cDwwRb2ZjnBGqACoyv x4kLQfpwqLR20TGdOYumyR5EQu248aMdcNak2Z0iitye+bdQ0aiAHNrQU6NrvESUODtF kC4sUjiwq+PDk/mFrgWoXhgMzHozgFObFlH6arOy+AbdCaylGlHdcNnnmb82tT7NkC6W hYRIm0C2KtFCWF6pG2gmUFK/v0R1cVWBbtlJRcNPLrLX3jtbtRuX2Yh0yi1e04QqbmzJ c6qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dNOsofgd; 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 31sor17151548plf.52.2019.12.22.05.29.40 for (Google Transport Security); Sun, 22 Dec 2019 05:29: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:a17:90a:a4c4:: with SMTP id l4mr27148361pjw.48.1577021380573; Sun, 22 Dec 2019 05:29:40 -0800 (PST) Received: from localhost.localdomain ([49.206.202.16]) by smtp.gmail.com with ESMTPSA id o2sm12073058pjo.26.2019.12.22.05.29.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2019 05:29:40 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: michael@amarulasolutions.com, Icenowy Zheng , linux-sunxi , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v14 3/7] drm/sun4i: dsi: Get the mod clock for A31 Date: Sun, 22 Dec 2019 18:52:25 +0530 Message-Id: <20191222132229.30276-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191222132229.30276-1-jagan@amarulasolutions.com> References: <20191222132229.30276-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=dNOsofgd; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" 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: , As per the user manual, look like mod clock is not mandatory for all Allwinner MIPI DSI controllers, it is connected to CLK_DSI_SCLK for A31 and not available in A64. So, add compatible check for A31 and get mod clock accordingly. Tested-by: Merlijn Wajer Signed-off-by: Jagan Teki --- Changes for v14: - none drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index c958ca9bae63..68b88a3dc4c5 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1120,10 +1120,13 @@ 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 (of_device_is_compatible(dev->of_node, + "allwinner,sun6i-a31-mipi-dsi")) { + 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); + } } /* From patchwork Sun Dec 22 13:22:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 954 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E5C9D3F042 for ; Sun, 22 Dec 2019 14:29:47 +0100 (CET) Received: by mail-pl1-f197.google.com with SMTP id c11sf2901674plz.8 for ; Sun, 22 Dec 2019 05:29:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577021386; cv=pass; d=google.com; s=arc-20160816; b=tP+n9on8TlsBFPCRm7MxoKmC1SF1XY4CIRQLHXCdksMPSC5m2m6HNlq03N+2eNdwZ+ zE4XsCSv2V89dXgnVs/yZxxZ0y2F9xrUoQgB5vZpYJJZqieNYdcbNthXkE9xOcjeACfb 3inKU+MUziTlSOTZkyPdGGLMvP5ALrukbAxCavle5sqmwF3/+X83jlzGUS55PL8Hruyq x7Ea2CWp1Gj7DakZnj1KwiN9kh64z7ou+N5FBFBC5Ai7T3SGwOcyb/eViU8NemoEdTwX gOSP9+vFz7T7Oc3do0BNn6kEb9pHpl3ZXOsmARv0jADdLuePJq7O3p66DGeDflo3Mvj7 Dvfg== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zL3W63uLIAumVnvvlfF/M0UBax4HZOTKJTvkc2HsLHU=; b=mIOE5oomQnHHPoHXUl0onWDzRcztOmNfzn7/QjSGQ/A6r60MTukU2FWhTKdydVpnj8 Cndfh2BuLlqboGf2S2O6Ak6OqnxxXzyzp3b7siy33oh87niqqqiFfNCnLnzGrBSu0ShV MUn6m9k8uyqtjk35PUyUkUTb1lvZqRII9oJsjwjLhMdQJSyQs5DY4jhUd+XSbtEaMDXQ B0ujEoaHV44EOnKE93Dgi7UqGBkWe6YS+NDWIvKgvq8v3kjYXF6w0XZBJSR+7gwEMGnD WDfeYm0HN8VG8sTUsG+DDB/QdjXV4U8Oh8G73k0FBzVNbRjG6LXa/9/J/jRkAMxeWqDs RbsA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=elp3iMXt; 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=zL3W63uLIAumVnvvlfF/M0UBax4HZOTKJTvkc2HsLHU=; b=aC3ira8IyWuy9vjBtA1z9RvblV1GMGdXCQGzy7gPdnqkAECY3oT/h80k5Vk3odwTvY 3ETAMJ+PpSm7QXr5xumqDpEtF5l3RXuuVpDUARJ1i/6TxRr0FgYD2Bv7L1YDQCiBZ7j6 IVqe0TBnzYl8vwqu/E8N/KEdge87lzlo6+eE8= 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: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=zL3W63uLIAumVnvvlfF/M0UBax4HZOTKJTvkc2HsLHU=; b=Te9sXPmfRwU31aEvGCtkAr7GoLXfZ8hDZXilcsNCO3ix556Zy1yGPSYRYL0+hAYVEe YPCFC+2S6CLBMd2zmzL5/Svsf6Tl+1CoVR6c2ehEfhTbuJ/fDPHm/A58FRFqK6UwDQl7 bhAX/SmUU5VOr8C5SyMxpntOyxYg40zTMLISy2a3wvaX8fO5uz+3Kp1MVpBqKPJtKEF2 Ii4C1hC3Wq4IK8i79cd9enSGbfBsemtE7pIRVUAmkk2MZznqIW0rWUF5rzNBDtWgMJyM sJ1iZm/ovCouwIVDnF95c/xQRqzFGVD8LHqPvcTfo46NaFAh9aOjOZXuKP+OUmstSoiX Bk6w== X-Gm-Message-State: APjAAAUIE1fmLc1kJt44dBfA7Zk0FKIMynz1Wk2XKMYaNd3Bko87e33w 0WQHlfO1KZCRT92PuS2Y8oaYLSEc X-Google-Smtp-Source: APXvYqzHRa/GTrv25qNMGv+7RHHGBmNriu7XaS8hQu+GhE4DRCsLmYAOTq5qpXtAlqxS9KBJFRw/wg== X-Received: by 2002:a65:4106:: with SMTP id w6mr26286051pgp.347.1577021386194; Sun, 22 Dec 2019 05:29:46 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:c244:: with SMTP id l4ls707836pgg.2.gmail; Sun, 22 Dec 2019 05:29:45 -0800 (PST) X-Received: by 2002:aa7:991e:: with SMTP id z30mr26746384pff.259.1577021385657; Sun, 22 Dec 2019 05:29:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577021385; cv=none; d=google.com; s=arc-20160816; b=HkvkgUErlJJCucJg9DQerSljU8YA/z9Zcrxfc3bzqUv/Wyhqjjwpa7hnyKlWZS0pJT 2KsRMpJj6A+hkEnt10+XG71opACV69sOm/8/Y6K7W7ayCza9CbIh/NNVp80ZgTZWBPaa L+LTr1VYRjqOhU6qnZQuPCb+umnMC2atCDmar2v10ZPFkFatDR1+2YixG0uuHAz2QLbT Q45D06Evf0E2DEcn8YckaEDcQ1wIwc09oK3/GXmBGOGQeW+s4nVultNV/4VuzepbTOOP VwrJo6/t45S7X1Etm5Vo5JnHn1pBrOGrxfjAOBMxjdQ3uEu45QJqleIX7dXaWMCjW4rv gsdw== 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=9EK74rOb2z7EDUkpcZJ+pjm2y3iAMcEo48mh6FOoxhw=; b=tuEGLf9O04BwxkrbfCPaMzdM2f3LYvRRR7Ql/ejXAN/0h1Txr2twYwPW2bbgKD88nC WJzkXH8Xo+wrtvwHPvgQa9nZCih03n6w0yMpCJnUlLtTs1+5vRAt28U+iXsS+AiIxFih CIyFA6oNJRrxoZmHlKOe+YlGNwYQojdNkfReedrtlfjGuYR/rGr0SfbqWHkyUu4mQ/ur 6UEKmqrqO3PSJVn2YzlCkltZypkCkaNEEWhsl2n/+ATT9nTR0OMdNp9FfuQUnRixmZeX cXxkQaXOMnZNhUm8XW3XqjCy2bQ9pDHPuPA5o3FG+win000uwsOCuBEaLatU3BUT+EOu YiXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=elp3iMXt; 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 a1sor16793839pjh.7.2019.12.22.05.29.45 for (Google Transport Security); Sun, 22 Dec 2019 05:29:45 -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:90a:db48:: with SMTP id u8mr7360374pjx.54.1577021385351; Sun, 22 Dec 2019 05:29:45 -0800 (PST) Received: from localhost.localdomain ([49.206.202.16]) by smtp.gmail.com with ESMTPSA id o2sm12073058pjo.26.2019.12.22.05.29.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2019 05:29:44 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: michael@amarulasolutions.com, Icenowy Zheng , linux-sunxi , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v14 4/7] drm/sun4i: dsi: Handle bus clock via regmap_mmio_attach_clk Date: Sun, 22 Dec 2019 18:52:26 +0530 Message-Id: <20191222132229.30276-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191222132229.30276-1-jagan@amarulasolutions.com> References: <20191222132229.30276-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=elp3iMXt; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" 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: , regmap has special API to enable the controller bus clock while initializing register space, and current driver is using devm_regmap_init_mmio_clk which require to specify bus clk_id argument as "bus" But, the usage of clocks are varies between different Allwinner DSI controllers. Clocking in A33 would need bus and mod clocks where as A64 would need only bus clock. Since A64 support only single bus clock, it is optional to specify the clock-names on the controller device tree node. So using NULL on clk_id would get the attached clock. To support clk_id as "bus" and "NULL" during clock enablement between controllers, this patch add generic code to handle the bus clock using regmap_mmio_attach_clk with associated regmap APIs. Signed-off-by: Jagan Teki --- Changes for v14: - drop regmap_exit, clk_put drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 37 ++++++++++++++++++++------ 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 68b88a3dc4c5..2577b237d06a 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1081,6 +1081,7 @@ static const struct component_ops sun6i_dsi_ops = { static int sun6i_dsi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; + const char *bus_clk_name = NULL; struct sun6i_dsi *dsi; struct resource *res; void __iomem *base; @@ -1094,6 +1095,10 @@ static int sun6i_dsi_probe(struct platform_device *pdev) dsi->host.ops = &sun6i_dsi_host_ops; dsi->host.dev = dev; + if (of_device_is_compatible(dev->of_node, + "allwinner,sun6i-a31-mipi-dsi")) + bus_clk_name = "bus"; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_ioremap_resource(dev, res); if (IS_ERR(base)) { @@ -1107,25 +1112,35 @@ static int sun6i_dsi_probe(struct platform_device *pdev) return PTR_ERR(dsi->regulator); } - dsi->regs = devm_regmap_init_mmio_clk(dev, "bus", base, - &sun6i_dsi_regmap_config); - if (IS_ERR(dsi->regs)) { - dev_err(dev, "Couldn't create the DSI encoder regmap\n"); - return PTR_ERR(dsi->regs); - } - dsi->reset = devm_reset_control_get_shared(dev, NULL); if (IS_ERR(dsi->reset)) { dev_err(dev, "Couldn't get our reset line\n"); return PTR_ERR(dsi->reset); } + dsi->regs = devm_regmap_init_mmio(dev, base, &sun6i_dsi_regmap_config); + if (IS_ERR(dsi->regs)) { + dev_err(dev, "Couldn't init regmap\n"); + return PTR_ERR(dsi->regs); + } + + dsi->bus_clk = devm_clk_get(dev, bus_clk_name); + if (IS_ERR(dsi->bus_clk)) { + dev_err(dev, "Couldn't get the DSI bus clock\n"); + return PTR_ERR(dsi->bus_clk); + } else { + ret = regmap_mmio_attach_clk(dsi->regs, dsi->bus_clk); + if (ret) + return ret; + } + if (of_device_is_compatible(dev->of_node, "allwinner,sun6i-a31-mipi-dsi")) { 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); + ret = PTR_ERR(dsi->mod_clk); + goto err_attach_clk; } } @@ -1164,6 +1179,9 @@ static int sun6i_dsi_probe(struct platform_device *pdev) pm_runtime_disable(dev); err_unprotect_clk: clk_rate_exclusive_put(dsi->mod_clk); +err_attach_clk: + if (!IS_ERR(dsi->bus_clk)) + regmap_mmio_detach_clk(dsi->regs); return ret; } @@ -1177,6 +1195,9 @@ static int sun6i_dsi_remove(struct platform_device *pdev) pm_runtime_disable(dev); clk_rate_exclusive_put(dsi->mod_clk); + if (!IS_ERR(dsi->bus_clk)) + regmap_mmio_detach_clk(dsi->regs); + return 0; } From patchwork Sun Dec 22 13:22:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 955 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 584023F042 for ; Sun, 22 Dec 2019 14:29:52 +0100 (CET) Received: by mail-pf1-f200.google.com with SMTP id c72sf9889254pfc.0 for ; Sun, 22 Dec 2019 05:29:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577021391; cv=pass; d=google.com; s=arc-20160816; b=o+7rfN5Ydnw9rF3cULEqHc149Lwhu//VgKiR71ooQ+NCU+LjzdRy3cDT5E29c76D4V kIy3Y9SeylRjtup8iFxqQUyQo0R72+QA7sYhc6gYIhZr0zorJ0lm99GMAKharfNEwcFn ocMHEnj6ki93eEY8alaoe6/XOvDbJLE+978+pG0E1jIVGDqoMiuF8Irr3fOspFACDlIB 6ap9ZLgss/FvFqvf5phAT8RIibQ2w7L11OKKPP0xjR9K9u9cSysEW0gf+bmoFAnamhiD uz/aeHbcuo3Wlr9RqnDMGgSgKqWa58/Yq39q6gA/rOf2QF8JxR/y/hckv0E1SE31u4ZT OAzg== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=+SbqdDryEEoKERmdEUHjqk6kTycyNs+RJ/zhv0HTfoc=; b=dfLfaDHbPoufxrgUyUNgow1aoU7OSyx6tKUleE/g3k2JNqgHf2544s6wYK7Fu+/uO8 yRXE2dH3QCEJkLGku0/d9BhsJcZWGK4ATmBVuugSHnovHqPu4+CVq7ZGUtPrubsuUkqa Ce08Epn9apfvIWPGJpxf7V9iX23XYalUH3dJheehucLU6QSBa80UtKTIstKofyp9m0h+ 938HWleATRCj1cI2wXtelluq4w9o0pF6x06662j/i9cJ7b2phCO7E8njLLaQC1rGA013 9G/P2fwV4H93yPwPd4jkiwen7hfysba9gPZXDqLjQaKszeghjE8cmB8icgIUljcidqCM C0Ww== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=I3PQ33U1; 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=+SbqdDryEEoKERmdEUHjqk6kTycyNs+RJ/zhv0HTfoc=; b=MEGppV6Ng+r5j4vBP9qSxVP30sLtBgyDF/q4dDR6XmVObx15gkS6XI2Xx1wQ7iXrRR RMskbhlRRShp6AI6nOx9er0A1WhePY3dLTULZ3rBYhLuymCOOwXTO8Md4m6PnIdf414K q6KpXIK7y080iOMnbu2jGrLwfjMe8GinaxXNY= 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: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=+SbqdDryEEoKERmdEUHjqk6kTycyNs+RJ/zhv0HTfoc=; b=VBQ8Y8GGcNzzgvU7WBUDGxY5YpX3tvlt/fyXI3tR8jxHPYeBWKyLo3jKCV8khW+yAL HmhoWhpMZNnP8SFBYpW6DauwPTgxToWC8RkAxfsVkqojSiV2vyRR8xianbOJfHkNZHaE 3NqdGGJGEIEXQox/FyLejYBWVB4iMGIFTTfY0IAKTTww1jWDPlNuVJeE3dtJ2iCFfnee Fj8c/EUpgPVOf7F4Od3yqv2Qix61t8CRfhIaFC5TErkohtdCVPhJKiUC8y0xccN8i+v4 IElDWD3Wm0BNcpfToatx/lOMQySz4z2M+WXxssQr9ph32cbFFArLpCUA+8HuAsvX2yqp 4AaQ== X-Gm-Message-State: APjAAAX1/Np18B0uRhbk5dy7j7tp+SFAMsMBl96cmOQe4gXZTqcKEBiR 0FJLFewv0hntSuDLLdgrlkAfg5Ul X-Google-Smtp-Source: APXvYqzG5LWsyimw0bBX7AHMlWQanF2r5JrH4KKM1QxrMAD1afPDcaFL3d83Pc+JUCHhZe2xmzJlCw== X-Received: by 2002:a17:90a:8d84:: with SMTP id d4mr13997794pjo.114.1577021391168; Sun, 22 Dec 2019 05:29:51 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:d352:: with SMTP id i18ls3644184pjx.4.canary-gmail; Sun, 22 Dec 2019 05:29:50 -0800 (PST) X-Received: by 2002:a17:902:9348:: with SMTP id g8mr26745292plp.323.1577021390633; Sun, 22 Dec 2019 05:29:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577021390; cv=none; d=google.com; s=arc-20160816; b=Nt7u7EP1LazbcPOAl60hrLRi9G/cdLgiDM4Sk+WsVWvN7yDWptNzc9oRpElmJAwt7z gs3h560Kqi0EIEMl0DbK7kriwZK0FhbZO2gk4CqoH62/UHj8Xo0hIpiTfRfjBJEVpHVl a7CEVGYkkmqHbOQqq3Pdv6T2q+8mIWG58B51fl5VzN+hubB4crDTXaggRV1sYWOvJLHg PTfwgKA1ftNDgh9jbcjVO5Rr1i1oW8bKlsVYjmnqGWZljuTU6buwNHxlYuJJIOrxZbcd gJHRtWtxuRllmp3c9zbO7uQYMtw/QZS9ppkUTfOT+ksBGEzzJXHqjfdEZWvGyKFwRQRt RZNg== 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=ZXOcwXSpTDZpb+/TcTbfTiplV6hYObjzRW1vf2xFZRA=; b=dQNRXY3wKoNpqWzr/lHJZq9ZGw1sCfBUUXK5EwwsrcX7CLdBFJpDSK7btJrxtNTqXJ 24HcCf/I4lg30WsrUWY/gDmjYROJR/zTzmYVX9A1bhLFhF5vKmi6ChKJ2XQUqh81Z/GF H+Q+MwbW6V1KGWJdeGtx2M8zfwtCqdTbj+49Mc20ExG88VF/YoNzFL8hyf70+nppSqe3 a4SW19vfmclYjNQxXp/+GUkWQeyljR1BL6/ljUkuz7fqVC52lNTQKF+4IHtjTcFkMVkl FIPrg039MSwlfjS0ovQSNeM2aKrNiMr5qsZIb1VpWit2npydOu8geTle7NVO6j9AJC1y k8yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=I3PQ33U1; 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 z18sor16918699plo.50.2019.12.22.05.29.50 for (Google Transport Security); Sun, 22 Dec 2019 05:29: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:a17:902:48:: with SMTP id 66mr25655198pla.182.1577021390160; Sun, 22 Dec 2019 05:29:50 -0800 (PST) Received: from localhost.localdomain ([49.206.202.16]) by smtp.gmail.com with ESMTPSA id o2sm12073058pjo.26.2019.12.22.05.29.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2019 05:29:49 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: michael@amarulasolutions.com, Icenowy Zheng , linux-sunxi , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v14 5/7] drm/sun4i: dsi: Add Allwinner A64 MIPI DSI support Date: Sun, 22 Dec 2019 18:52:27 +0530 Message-Id: <20191222132229.30276-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191222132229.30276-1-jagan@amarulasolutions.com> References: <20191222132229.30276-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=I3PQ33U1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" 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 in Allwinner A64 is similar to A33. But unlike A33, A64 doesn't have DSI_SCLK gating so add compatible for Allwinner A64 with uninitialized has_mod_clk driver. Signed-off-by: Jagan Teki Tested-by: Merlijn Wajer --- Changes for v14: - none 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 2577b237d06a..4a024951aa11 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1256,6 +1256,7 @@ static const struct dev_pm_ops sun6i_dsi_pm_ops = { static const struct of_device_id sun6i_dsi_of_table[] = { { .compatible = "allwinner,sun6i-a31-mipi-dsi" }, + { .compatible = "allwinner,sun50i-a64-mipi-dsi" }, { } }; MODULE_DEVICE_TABLE(of, sun6i_dsi_of_table); From patchwork Sun Dec 22 13:22:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 956 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 28F503F042 for ; Sun, 22 Dec 2019 14:29:57 +0100 (CET) Received: by mail-pf1-f199.google.com with SMTP id g69sf9893454pfb.17 for ; Sun, 22 Dec 2019 05:29:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577021396; cv=pass; d=google.com; s=arc-20160816; b=LiEiWokTXPIe5KJ4w8IT6I83UtKmELAvqCk9IoS0nT2mBDbVZ3oRoEvJ1GYW0GCgoI wRUzpbEA4Ez3wJDp2Mmf71UYCdCAJZFOmHNqKtkDc9FRmdlO1dIeWJNmyNpl53b69Mx6 pxPI8Ikp+MPGt88L+UpyQ1/folLgIoXP9FP4aYCzEOlcNiAB428RjjaYX+urPT45IMgi 0nNSgq8l7E1jfAXWi2XtiDx8/492dy2BmofqtJk4IjSbD8vzSH2us+E3TiZKBizIkYcy 8M+jw6Smct7GRpw1SMQTd5kfKiV2glAAdkA+Z5dc1oH1gYWKCySHLuTTq0cTH72YcWBx gxyQ== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=+RCwcWGbVEIVyAFcMCMuga/dSDTXkTo0tIPB/a9t+Z0=; b=mfwiKHb4wv2/9XQhBilhPJ9Ui47lAOeg6Wfl1cKdfPKOA+T5rmddIhKdbhEZNLgsPa VDIEB959UHykMOVG2dNiI4onDI4d671NDRlOqXy7H2axkDuAeSTozLIpz+XugmIc3h+1 Z/2/Jasx2G7zea8LMYV4BFG3ZKpCyRfU2T5RuAepxduwqS8EnqigtpNfr5LIOt9PnRfH gHqW4IB7zT26mHoWLTUuSoIpZfiQqnzLpQ3HpOsfvG3LsE+fmN/Jo5CzeEzKpfkG5JKV L5McI8VOBkBuAnRRclIiY/CzbHI3HVXCIDlH0cEzNucfP5vL/GQJdQJyrBX/B3kKbThk eiUQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="aN/z+SvO"; 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=+RCwcWGbVEIVyAFcMCMuga/dSDTXkTo0tIPB/a9t+Z0=; b=XxRDCesaqoa3Fg3LsPTXUtsWxh+gD8yo00Rmo/ePZwKeFzZukiJso+aGytHmTxrCKB FHtt2dvJcYqxPESrDJGEkELBNoOy91ceC8i2+ny+qSOvLnzX3xLGrGDs3XRNHsG0pbAe QuFvbB8KDmYaMVVlMxFvYyV+XfjtNKTDWEhSo= 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: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=+RCwcWGbVEIVyAFcMCMuga/dSDTXkTo0tIPB/a9t+Z0=; b=ZdgQkGZ2wwkajl+5zaxzxRtan5v1Liu4Hz0JVswxaTJZTcChqoRO5icY/s6GiV6TH6 z4hjevYofx3bPfcQWjF/aOqqraVY9WSE7eKrBhHnKGPE3IQBgrDlP7BOnqbPPwWS6I5X swRaqWcK8YEh6I4RCiuagJ1dynWNqac3Cg3zxUyVe2XSAOJQdKGbtsL7zIraiHGiRLkT dhmvC5xjJ5W+/VzOLxKog2sipUhVddM0VxenbovZDrw3801jZeWcn5CgscVm8NbDGzn7 19po+bd04CW/TWKYbbshHNMLaXv/6MnmC7J09GGJ3HggRaiZXXiUMCK4DHLPQBnk/nyK 4e6A== X-Gm-Message-State: APjAAAV9Xh0cd97ECzYXMuP80jiqSw8C97sL0kp1rZvec7jTh5iO+AiQ 62P9e6ZsC34D1IvaUhm6ldXgQqDI X-Google-Smtp-Source: APXvYqzcQYJI4pBatTfO/lOvyXBdJLLYzjJvgdOVNualw0f2sZGGCBwkYrJf1ayCQP+7HefsbkzJQQ== X-Received: by 2002:a17:902:ac88:: with SMTP id h8mr25470574plr.131.1577021395892; Sun, 22 Dec 2019 05:29:55 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b606:: with SMTP id b6ls3548058pls.11.gmail; Sun, 22 Dec 2019 05:29:55 -0800 (PST) X-Received: by 2002:a17:90a:3244:: with SMTP id k62mr16152385pjb.43.1577021395444; Sun, 22 Dec 2019 05:29:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577021395; cv=none; d=google.com; s=arc-20160816; b=ATca3dM8AbVESOAuM6upYbPK2fwm85Mj1Zn1mD7oNDHgMhKyfoEtwuwE3bpCfO1dgB hCnPn0Q86YGbQKXlefvZ2DhA7OGDha/ceiNZT1q5vPndkywpQmli6oqQg67GQIPd0mtx dt/RxyV21GwhcXUOmU0JcG2XDg+Q5Tq0JicFBt4TZ3U8G5ENFUCTiTnojA1zuO+goap7 o9dSrJ28vD4HMM9zv4/ACYG+iyWLueMCX+/SJimIf9GZ0dr0IR4FjoSNu/VUz34ut+A9 jmDGYowoGIDAmotYidw3FFhTaMNOUB5MMJuK9V/vR+LRl6Za/ZgbVVCfIhQf6oHtfyWu kKuw== 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=xq2qov66+ZKQzbRfM2Ia41hD0OqHDHdZrt8IUGMciys=; b=xCUKxSr99FhmWzbERXcWRASl4YTMRMAEXsT2fLYrBQGf6WkqyRIF7iE8741ieIYPep /N+Q4GYhSvRf8Fbkl6IUrnxRDsrkS/ebT4F/59Kxq3lcS6Q+jjxa+Gxd/iT6A9l8eaTB pQE3+81bc25etUKg0T4Xa06p1KJvMKLFf6of9BYAzEji+vLk9SNZOMKg7bxy01Id4DB+ XWGbPFoZTyXfvnrIaP4//UNitQig6i4TMVKF0pA7dsFGoExcwLLxJDeHIhYUrZpXNWuk l4awi1nbfJw8kLuNxB0dIGfnwB3b3ZHxzO6szUzd7aLUvEB2dnENE9UR9SwoY8kFTqu5 yo2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="aN/z+SvO"; 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 x28sor15277036pga.74.2019.12.22.05.29.55 for (Google Transport Security); Sun, 22 Dec 2019 05:29:55 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:e911:: with SMTP id i17mr26186191pgh.42.1577021395126; Sun, 22 Dec 2019 05:29:55 -0800 (PST) Received: from localhost.localdomain ([49.206.202.16]) by smtp.gmail.com with ESMTPSA id o2sm12073058pjo.26.2019.12.22.05.29.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2019 05:29:54 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: michael@amarulasolutions.com, Icenowy Zheng , linux-sunxi , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v14 6/7] arm64: dts: allwinner: a64: Add MIPI DSI pipeline Date: Sun, 22 Dec 2019 18:52:28 +0530 Message-Id: <20191222132229.30276-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191222132229.30276-1-jagan@amarulasolutions.com> References: <20191222132229.30276-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="aN/z+SvO"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" 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 MIPI DSI pipeline for Allwinner A64. - dsi node, with A64 compatible since it doesn't support DSI_SCLK gating unlike A33 - dphy node, with A64 compatible with A33 fallback since DPHY on A64 and A33 is similar - finally, attach the dsi_in to tcon0 for complete MIPI DSI Signed-off-by: Jagan Teki Tested-by: Merlijn Wajer --- Changes for v14: - none arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 27e48234f1c2..1db8378f59a4 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -382,6 +382,12 @@ #address-cells = <1>; #size-cells = <0>; reg = <1>; + + tcon0_out_dsi: endpoint@1 { + reg = <1>; + remote-endpoint = <&dsi_in_tcon0>; + allwinner,tcon-channel = <1>; + }; }; }; }; @@ -1014,6 +1020,37 @@ status = "disabled"; }; + dsi: dsi@1ca0000 { + compatible = "allwinner,sun50i-a64-mipi-dsi"; + reg = <0x01ca0000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_MIPI_DSI>; + resets = <&ccu RST_BUS_MIPI_DSI>; + phys = <&dphy>; + phy-names = "dphy"; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + + port { + dsi_in_tcon0: endpoint { + remote-endpoint = <&tcon0_out_dsi>; + }; + }; + }; + + dphy: d-phy@1ca1000 { + compatible = "allwinner,sun50i-a64-mipi-dphy", + "allwinner,sun6i-a31-mipi-dphy"; + reg = <0x01ca1000 0x1000>; + clocks = <&ccu CLK_BUS_MIPI_DSI>, + <&ccu CLK_DSI_DPHY>; + clock-names = "bus", "mod"; + resets = <&ccu RST_BUS_MIPI_DSI>; + status = "disabled"; + #phy-cells = <0>; + }; + hdmi: hdmi@1ee0000 { compatible = "allwinner,sun50i-a64-dw-hdmi", "allwinner,sun8i-a83t-dw-hdmi"; From patchwork Sun Dec 22 13:22:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 957 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id F01F43F042 for ; Sun, 22 Dec 2019 14:30:01 +0100 (CET) Received: by mail-pg1-f199.google.com with SMTP id w21sf3924221pgf.19 for ; Sun, 22 Dec 2019 05:30:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577021400; cv=pass; d=google.com; s=arc-20160816; b=pY6gDU+Q4JZz9KyQWdWW2qLfJDMtVF0LQ83UY/d3U569YWUJIH95hVWdRtHYfB3Nqq skHMU79biPIQiOU/6gk4r+gY8QhiLFJ9QM5feaw3Qq3MBl+QlEMr60TvW/mTkMEpr5MN Fg8+qr8WcyCH8tWctG7zoDLtBZSeiuWHdF26+A8nQLlAeLb8Oh/epucDyiVe6AtojJbn jJau/5Irx+s30yZp3htdhR9S0OQcu602pLTeUJksyAAkfPD5zacToFdEIc/6r7YjNCTy Vg6Sd92xJruWyLMNsdS7oxJB+SU3e4xeuGb/oz/aNN9cu8L4nufnsxn5PedaAiyGTBur By3g== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=AbVVcOca1oaXxCGpbAE2TpKbiWLPgWIfwfify4nmDlE=; b=yvfVqIGVE8a76TdIUSHRhkwvR/1WqVP46ldKhT+ynDcPAqzGZEnjJNwbcR7qYfDNeU X7HR0pYRkwjBbzizb60IRD0skf1FG8+VrSSrDruG+tW7W/mjRpDAyhXXCZ4TncH+q8PM 9EAY/i/iKMDpxA+AkgFvdMfRpCk2lxqP/WgdQy6QoXTwl2a5+gPIphkrpxQncA1pRwq7 5u1jtNzEuvPSvfW+0O820q5fCXa0irudryf06+r5rgV/IhmoDt/PcOguVqxrGciJlH/X 9KW0PkKbwb+Bof13FpwUa3KI+JFBQT4RAB10hxKBMYDCoudErn0RfLAky1Hb+1dq7UVb 511g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ko7Ge9z6; 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=AbVVcOca1oaXxCGpbAE2TpKbiWLPgWIfwfify4nmDlE=; b=q/d7mwz//C5Zpt3DF+H0Nlp652YHbZH+XRLURu5N4O02jh2aCkFykxAn3f0497CiQS kQiIjjFJNKvnYzM4+sfIq92v2XOJw+w00ZOWVXaLJcZJuhWWcmAF0GAvkvunQI8fV44x N7/hAe534ogyKJNOLitE8rh5chN/gEFuy1kjQ= 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: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=AbVVcOca1oaXxCGpbAE2TpKbiWLPgWIfwfify4nmDlE=; b=UyCJFuFOZLzoi0/BxZByIMcjWWJ0g1JTxa/tHOQf+rkeaJhwmOMnZreeem5c6tG7lx 8LHDUy70NDcJMsfuIXuVggvp2facYGL/Ls8oX/lR8fJ/ns3IHhSwCeH7emaXGusMRjaA k/M4kmZAJvdt8faCUUgIQPKpfSRcKFMdbTDxHS+mOmrO+4ZM5qqljhfaK9icmY82KldS paSQgKeC6Qid7FV7uGm0LAXGBx/aV2OYfAfjL8wDk2Ue+J0rxQ/3Nv9qRoWwIOttb+y/ mVtNCLJB2711DBXDJyaFikI7gUDOCT/Z3DNZ+95ZBRg5rk69nz51T5E9C4hUgOUXH87E 2kXQ== X-Gm-Message-State: APjAAAXkYJL1POqG1fq9tS6RhWvRf7n8A2chB/ke78lHCbZXi7rKkr8d sM1XF0c8C8FyXgZdSvPk7jVwsKhZ X-Google-Smtp-Source: APXvYqzRUXHF6oA98QDSwHiiEjg6E8oKUgRWAWiGmhCha5W1RApMPmgQfnyudDq4o2LVLJu4dgPKwg== X-Received: by 2002:a17:90a:e2ce:: with SMTP id fr14mr27712119pjb.99.1577021400762; Sun, 22 Dec 2019 05:30:00 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:aa97:: with SMTP id d23ls3544330plr.12.gmail; Sun, 22 Dec 2019 05:30:00 -0800 (PST) X-Received: by 2002:a17:90b:30c8:: with SMTP id hi8mr706015pjb.73.1577021400304; Sun, 22 Dec 2019 05:30:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577021400; cv=none; d=google.com; s=arc-20160816; b=MuBWQwCphP/cJKDc/6I4cBOTlugzllJPj6nvoKQCfqYXWycUHByiCyd0S/uqk4+zku HSxFATY70c/1vmEn8uuL5cGtlNPVlKKKI3w1X21w1DzhebRDELFpQOs6B/scfSQ6B1hW XI4WCCn95m81fsHu/p/rKhNFSOnW0a2uEcMhf+/j5psriW0kIlZ9W94TVgid7QilKdSs gNBhsm2mcXubMTeZWwdO1bjgN9Ts2R5EdK/CpRtWa2Ot51fSA5BhCNA9hh6GhUOVKal/ In4Zz1NTg7TuHkOfYAEFkwLm4n2oqKUVmhu8txWnSFU25q8ijMh3bVCdGMsJuJlniQMv eSMw== 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=mkXpYcbeC0bnNO0q+6BYbbUdKRmj3eZu6k2PkyZZ+20=; b=VRie2BW8e1woE8a4Tk6L9o6VpxeHqyuQGmTpSl41wLrr3fXFDDySCK/G9RpCIhrJkZ /8E+A4fSKxJL5aI9NWnh2jME7XNfP9ueJy2+tEQTQ9KkMMyjtPOZszHZn5+k2pnNA2zU cAi/U1ZwCw5LpCa2nYMsoigcpBGNNJ2jjrdoa2Iq7An9ispkbXskxEybfmTSaleliYzh lakwo5k4i4gLgAx9P4Svvu7WOvYk7zQR0EkbzjrAT5bfzIrGnDTDkgCra0S7cbv+OUPP kdn+g92Y2XbOYM4hKqH/PuXFgotw/V1FqBtz4j6bTaimU1Wd5CJoLDLFfxRkl9433APq NmEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ko7Ge9z6; 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 l12sor17576744pff.55.2019.12.22.05.30.00 for (Google Transport Security); Sun, 22 Dec 2019 05:30:00 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:201d:: with SMTP id g29mr26867710pgg.427.1577021399945; Sun, 22 Dec 2019 05:29:59 -0800 (PST) Received: from localhost.localdomain ([49.206.202.16]) by smtp.gmail.com with ESMTPSA id o2sm12073058pjo.26.2019.12.22.05.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2019 05:29:59 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: michael@amarulasolutions.com, Icenowy Zheng , linux-sunxi , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [DO NOT MERGE] [PATCH v14 7/7] arm64: dts: allwinner: bananapi-m64: Enable Bananapi S070WV20-CT16 DSI panel Date: Sun, 22 Dec 2019 18:52:29 +0530 Message-Id: <20191222132229.30276-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191222132229.30276-1-jagan@amarulasolutions.com> References: <20191222132229.30276-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=Ko7Ge9z6; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" 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: , This patch add support for Bananapi S070WV20-CT16 DSI panel to BPI-M64 board. DSI panel connected via board DSI port with, - DLDO1 as VCC-DSI supply - DCDC1 as VDD supply - PD7 gpio for lcd enable pin - PD6 gpio for lcd reset pin - PD5 gpio for backlight enable pin Signed-off-by: Jagan Teki --- .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts index 208373efee49..6beaecdd802a 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts @@ -45,6 +45,7 @@ #include "sun50i-a64.dtsi" #include +#include / { model = "BananaPi-M64"; @@ -56,6 +57,14 @@ serial1 = &uart1; }; + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>; + brightness-levels = <1 2 4 8 16 32 64 128 255>; + default-brightness-level = <2>; + enable-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* LCD-BL-EN: PD5 */ + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -116,6 +125,24 @@ status = "okay"; }; +&dphy { + status = "okay"; +}; + +&dsi { + vcc-dsi-supply = <®_dldo1>; /* VCC3V3-DSI */ + status = "okay"; + + panel@0 { + compatible = "bananapi,s070wv20-ct16-icn6211"; + reg = <0>; + enable-gpios = <&pio 3 7 GPIO_ACTIVE_HIGH>; /* LCD-PWR-EN: PD7 */ + reset-gpios = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* LCD-RST: PD6 */ + vdd-supply = <®_dcdc1>; + backlight = <&backlight>; + }; +}; + &ehci0 { status = "okay"; }; @@ -206,6 +233,10 @@ status = "okay"; }; +&r_pwm { + status = "okay"; +}; + &r_rsb { status = "okay";