From patchwork Wed Dec 18 19:10:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 931 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CD9603F08E for ; Wed, 18 Dec 2019 20:10:35 +0100 (CET) Received: by mail-il1-f199.google.com with SMTP id x2sf2538249ilk.18 for ; Wed, 18 Dec 2019 11:10:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576696235; cv=pass; d=google.com; s=arc-20160816; b=g0PHR9fG0WpV9hdoEO851QidbxzJZuHJMhuXhDYR/XdKCLkEKuNGtfjLNt0sJxSF8l JZ1b2UB2rS+NXnL6qQW1vmr2Ga6IORoV9Z+aap/5kCs4BBInUT0C5kYaaUDmZoLbcGx5 fWztKjsWinm95TcoT7+EpnOLzdOyeS1Mmv2P9QpzEPgL6OKNv8Ht+DXhzCBnB9Ooz5Pw TS1ZhBnxM7pVzGHviB0u5kdWxgM7KbXzDSwF8tPgtls6gMsMUriesb44k3xqPBr56M8f H+0x/J+cmbc3KbyQNytDwpsD3KA4qKOlF8a2IDaBUi4CTSgdFCd6+WTJVGMLHxPc6RCX 4qVA== 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=MCL7sKivI5Rs/8LVydDeE6Z6WdCykJ8eALaif5Ncmr8=; b=SAu04+BpLZhqXf5k+D2c3bw1HAcbsG6yNGmdVxA3yDFRVjkz3p6oTEtV/42rK6y/J/ mudP0WWUSPA9N2P4XqtrOP/7YLI+R/KJX4vH+YUgSsFuBMsAFdZQgRQEwOd8EaNaAGm+ rsCLu3PG2pwxHginCPmKM+xmjZMqx4zGkvAfSkCkzKJBA8P+7KgFSCc6rTrHJEWmpyQd PRSpeg2QzbYqqAQo7zUhl1NyShIYMOCYKdhYU+CFCtC3u3e6HbNRdC08Wbq07O6w/PBA u/FIAsmCfAJUSlJgDR83hV4ynoMxFXXM9pVAK+EYCceJ4/VnvEucE1/Wn1aJ0LsCBhcx MFvw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RmE2gZ71; 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=MCL7sKivI5Rs/8LVydDeE6Z6WdCykJ8eALaif5Ncmr8=; b=hbeppDUVz+DP4rSxrXMUTpKKXUoeWtEvwI0i6my1S3U7JlpKET585FKxsFeiayxURX 5lcBFclS9aHIMDJ6XrWBgnTpOdcrG3SfHR2cdv3gOcfvs2/8x8uZ43vO+mEUP4RJ6pD/ GtFBRfHZbmJFkRNuNVXcx4r1FtOJXplUMTHuA= 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=MCL7sKivI5Rs/8LVydDeE6Z6WdCykJ8eALaif5Ncmr8=; b=boGJmZ2FH5mO7nZzL3xWEwuuqs90ldyl/lauF9CMm2RD1X9XujUXh3hiisnuwdlTn0 Ynx6SeSvbRN27Gc4KqfF8qZTN+Z89GzhFq1r0KAqEHU92TVZowQ5/NBdpBxjbvXRB6Gx A5id71Ih2yIUGm/Zlq+Yze5rUHNwXLnwnQ/PVekqrWdnC2mmJ53QUZETc0RKCtDPDLfQ utNAiMJ2y1OGDMFQxM0IdT2pCdDO6xZyAUJq/W8MYsM5LKvxqxYhwXJ9QiiGWcIs6eSo eeyk7AA8Y3nHSNiwsNdKmvDaW5hBxFGPBoahaa+pL7Hps8uWrH6pRJl2qEirpdmH0PAt RkPA== X-Gm-Message-State: APjAAAV61HBkRXrE2DIbl7YnV51xTWxricmtugYr3JVJ4KkVfQT09pqQ vrD2VgzCUl5H3DN5g1TjjaCyeUw3 X-Google-Smtp-Source: APXvYqzi0ZF6P16utJ5YD7eobJxkFiL9r1CmdPNC1Vb+1QzIRsOXeDgaZmLm6FIaVkihn+zn3djtMA== X-Received: by 2002:a92:8307:: with SMTP id f7mr3410792ild.73.1576696233753; Wed, 18 Dec 2019 11:10:33 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a02:85c7:: with SMTP id d65ls235285jai.2.gmail; Wed, 18 Dec 2019 11:10:32 -0800 (PST) X-Received: by 2002:a02:b80b:: with SMTP id o11mr3772634jam.105.1576696232598; Wed, 18 Dec 2019 11:10:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576696232; cv=none; d=google.com; s=arc-20160816; b=W1SBUWGAGskpTEj749kpxNEOb0du5cZAMK5Uiimvn3J4l48KtGZJxccacB6VMpCkUP 1egJaGSeVwytkfJNLlFraCtwLonz0YrchcjFhpVUWql5dN2bqiusHmjIjosByXSgUxnJ IZ1U0R0bGkxHaXR+uq9gw5F8ZSwxj39N8MPZIpcCjFTsp6dUUADsGZh9gr8g8MelOeAM 7joAiR4m4RRSWT/OeLNsQpLM2oMmYepELnGk8i4dZWAmBLSJh2vNWbPG9B1AmqKsxi8L zTt73akuMUyNnqHXwYpsYof4jwPa2wFPBJJfW20OeR1LZbqnHc+M7yGtAj8tldt+bF+5 Hnvw== 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=GQQ92FUtanEcYYn+9KkWeYqFv+lp7/wX47LWysjUtZE=; b=I4d4Meg4MlcFpjRrz4WH7+vesl9DySNd6eUEOyRkqbg3sSorZDSwHTRbM/zlDasXu0 uHsq2R+9mMDDXv0ms7m9RJks6zkRFKjOpQKmckkF087im8sBcWOvsMMcoJ0hlnMDeXXE 2KLTKcG9LUbSfELHe//Mc8zp6FN0UIgXhqUq+n3AOchkLRcLoYFkdNPSSvM3V4OfU4zx j3JF0jt/PLTf3eIudDet5M47Nr//9oZQaQlp7igJKJvB7uiGNohgP7Z6sn82Vn11KPYk L4880hNCK/aUodh+vSM8Hy2v2YrfMYEtg/AhKDf7Gae2ldQr3yLX1vzMkcPpjitJhyCv Ivww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RmE2gZ71; 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 v11sor2231143iom.89.2019.12.18.11.10.32 for (Google Transport Security); Wed, 18 Dec 2019 11:10:32 -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:e80d:: with SMTP id s13mr4849217pgh.134.1576696232170; Wed, 18 Dec 2019 11:10:32 -0800 (PST) Received: from localhost.localdomain ([2405:201:c809:c7d5:78ea:e014:edb4:e862]) by smtp.gmail.com with ESMTPSA id q7sm3745855pjd.3.2019.12.18.11.10.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 11:10:31 -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 v13 1/7] dt-bindings: sun6i-dsi: Document A64 MIPI-DSI controller Date: Thu, 19 Dec 2019 00:40:11 +0530 Message-Id: <20191218191017.2895-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191218191017.2895-1-jagan@amarulasolutions.com> References: <20191218191017.2895-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=RmE2gZ71; 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 v13: - Add if statement for A64 with single clock .../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 Wed Dec 18 19:10:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 932 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6813A3F08E for ; Wed, 18 Dec 2019 20:10:39 +0100 (CET) Received: by mail-pj1-f70.google.com with SMTP id g12sf1729993pje.5 for ; Wed, 18 Dec 2019 11:10:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576696237; cv=pass; d=google.com; s=arc-20160816; b=yh8U9ab9+weqNcM7O6DbLfE6u+1UG4BOYeyhPVgifIpoiDMvdHt+TgOrYfM3ogb90r Qdi+FZrVwcIHbw/E88L7LnGQj4EIcTrOUl5zWRH0Og0sh45ubzySRFc3u96cIVhgLBx9 w5w1swzREYgCmAqDyjNuBiXVx5h8gFtSFJVtFaafwZPdJU17L/J1MkzJe+J9jr9eq3Na eZAqlPWdEEnU2ciM1Gau92KLd8ubom/x9cWw7FqEMd2vmf7T7woRHezTlhdutFdxHlCM El0WWlMOclWHrTkuq/roELkar8azesJbfhZX8SCFwptV6stlCPGcTAVV3S+mtdumz7Yt EwIA== 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=rJzCYJOWIYFtE4AAtQ/Mnx2MolWdatP2+JDzplsYfc4=; b=A1MhIpYceT0l8ZAODcfTMsKA13OdoNfDqNhOj+/g92R3udwb1Mwg0kgT3f7urq7kg7 8IaTmrxzhTkkY8qGLOnc5ELlHnK+J0B4OVa1ska5scTLm2G4gZEt5x6+d16lcuInz0l8 +Zb/BsLedFPOQ7rXhChAEadtadxzQAlFyiglQNEYaD39WzOuaVM8vatmBAbGXAg/7LgM cmbkQ1V8RIB0xEIzJRaoL2zQA6cbKfW2LCbXbGNGISXtcXpzQC0MTKuxF8jJrAO+UnMC xt76P28HFKlUJ3eqLD10a3ioT5gCacuVh2henOxpWmSknmT7wIAtjtIhqVjtwIdzaDEp kPjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E+8ziUEv; 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=rJzCYJOWIYFtE4AAtQ/Mnx2MolWdatP2+JDzplsYfc4=; b=lk+XL8Dmgj7X6Ymj94SMwlr+lQ7bs/kIUkSF4tm6Ac/9NUvAhnmjwYZe1xIMf0sLNo EBbwaH8p4sazBEwRqggRH7agcECx425zgd3QpmJMJBGIcilBgi8DzIP6j8LNMdKCtFJQ TBtoN9LEHI/Kf6IODAw4JYHFQcun8MKQ3pXtA= 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=rJzCYJOWIYFtE4AAtQ/Mnx2MolWdatP2+JDzplsYfc4=; b=JmeqwB/ye2ycYzkqHqI2fMb3wahBWWDe9+QJGoiceo4fiz+HhkguzeMaaiJehSfezC gIVJdVKXMEfdGam7PJNELJDJdQu8/tovJJYWpjlXtW2FPKyGXnyezIX7mF2zPoXCTJUK mg600T2g8313lE/Uataw3VviO0ABLUbGBBO56X0rJwfctwncwqO7gfVzHvVsIoGvoMrh LOj/l+siFnNkZB5NADTlvaEI0F32U3hoyJ6SdtjcWKjkeMlHnwi6wKuKc8g2S6UkgBfZ gR1mRwEPjuLDpGwn/8wxMJZDaqMFQ56V3FQJbkXlvuHi0Kz7UKl7pD3z/qLaY5B6WMpu Kdcw== X-Gm-Message-State: APjAAAWOIwN/DG1ztzOZO7qnALzn6tlbPenKO1Y6MbWpTHM08JF+RiZE Ut1akiENhWp3zENOPabdSWqANBGX X-Google-Smtp-Source: APXvYqw0JjaDQpf5feMPqY/J7eYWe6kTI+ITq/JCv046xLRiWJEe3TjSkR0or3IWNg9yrl6sGFRaBA== X-Received: by 2002:a62:cd81:: with SMTP id o123mr4944225pfg.110.1576696237512; Wed, 18 Dec 2019 11:10:37 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:84d9:: with SMTP id x25ls764317pfn.2.gmail; Wed, 18 Dec 2019 11:10:37 -0800 (PST) X-Received: by 2002:a62:342:: with SMTP id 63mr4781731pfd.19.1576696236986; Wed, 18 Dec 2019 11:10:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576696236; cv=none; d=google.com; s=arc-20160816; b=B2H4PVH5pStlrWsw/dEDM6hKrxS/KASd6w6uQnNmSfRql4IfZjATkTXJS36hhNqEHf tsYwAI7JV9hJ5Gw4u+XhCOBvl3hPwUOcyb6ioUVrxFbIjwVU8Ax9kIwhusamqo5hnrlY seM8Q6aDNqR/h+q8s8fWjezzI5hWPTLa7vGtj4PInYfnlLrW1oLy45JXrhSjtybcGIDX YWbIHXbzaJrAdEHeUYdFFsoxapPUTVhw1ZF+hAxd2G1//LB8h/XhNqD0onF/DXga/epg DadqhS5UH2TtVX0SEZJH0JMVmeA3YKUq17ccya6yqOHavEus/1ViQoCbZS9Q6mJUelzw p6uA== 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=alXkMdM6X6QySpSco6rsE8zxLS76UNqtiB5B4hqdPT4=; b=M4nkFRQTEZjk0mMRVrUUfFNZfBDSILr65MZMB3djgqOcwJfwEGijl845PfioFOHL32 P2Q0OalN83hTR15vJRCTP62y9tr8g/pqA6x9RGoJAzyND/IzOhlx8Be+E1+S7WbIhzRB sa7Lukq6br4iGO+vteg+oDHmeQxq2d2Ax9AKyqEJgD+ueOSLTgYUXAcTxEm8+brMBkdl uiEaqAqkg1V4BGPZyH1N27iSx6WvOB/okkIPjCUEM6Y4+A1dgb325fjG7b345mrpVuci 5HYQb/RfjZZUvnVG8GwcqSHHTWukKgHq7qBFbBF+tuj0Wu0kdQlq9uy6YTFzIFQlB+7i uhUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E+8ziUEv; 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 f7sor3166768pjw.18.2019.12.18.11.10.36 for (Google Transport Security); Wed, 18 Dec 2019 11:10: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:90a:d344:: with SMTP id i4mr4801276pjx.42.1576696236642; Wed, 18 Dec 2019 11:10:36 -0800 (PST) Received: from localhost.localdomain ([2405:201:c809:c7d5:78ea:e014:edb4:e862]) by smtp.gmail.com with ESMTPSA id q7sm3745855pjd.3.2019.12.18.11.10.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 11:10:36 -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 v13 2/7] dt-bindings: sun6i-dsi: Add A64 DPHY compatible (w/ A31 fallback) Date: Thu, 19 Dec 2019 00:40:12 +0530 Message-Id: <20191218191017.2895-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191218191017.2895-1-jagan@amarulasolutions.com> References: <20191218191017.2895-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=E+8ziUEv; 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 v13: - collect Rob review tag .../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 Wed Dec 18 19:10:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 933 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D7BFA3F08E for ; Wed, 18 Dec 2019 20:10:43 +0100 (CET) Received: by mail-pl1-f198.google.com with SMTP id bd7sf1663989plb.0 for ; Wed, 18 Dec 2019 11:10:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576696242; cv=pass; d=google.com; s=arc-20160816; b=kBvKw9kYNNvfVEzOFsE/Dd2RUVzqhv2whGPv7SvLAoJr970YZensoitoenCBFxwdJO Jp8jMMi6IhCtiXrWLcz2cwn0F1pE06W7ESX3JCCFkB6Do14lPYkc8CaAY6K2R6RqWpP1 3OGR62EVVy4f94N3mOIG/JHkRuFk+oFML1xzyRcGL/vPrqP7JqTfsut4ORqBbEFroXUJ 9t0FTCh2dtY2fq8LtHSBvKPD8cX+pBrTx9QAhS00wGX0CFeDiRbvRXPShscT8CuUQgOq gvIUGUfwFI02cplCra5IuFS1rcpmivZezRUPR9O1oHTWPhKJamJfv9S2QjgsZjK4MXPJ sazA== 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=luJeaO/Cg5UAyNt7ob51Zua8FEFMkY1sWoBW+VgEFeE=; b=mJllnyRbMoyjuhEnK/Wd0M/NrhTNzmCqrPzghQ02dwyZgSezspy4J1HYdILle+1LZh tbJ7vBF3XUbiVMy9or1hamwXFG37QxhM5WGZ7Qm0toyHfSlgUgW2zgNcJjJ+tw8V7eez 4US5fMANAq62WOM2sYwaeaa8jAR4ihRoPAktkEpvOF5Dcf1ep8YP6eq3q64C5GHozLIJ 6XSIHmKuq/0vMNUPVBB7v4Z9uaWmRCMrFLPSKmC6ZkUM1d/GqvnM6HrMJBVJNxT/FBO6 ZKvLVJ2REsAPlN9f1sSRu/g8pyFf6AARHxnkVRSZ2hoUgRaR7IbocYsv7aWHhL/qje3C qoyg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ahpP2VUF; 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=luJeaO/Cg5UAyNt7ob51Zua8FEFMkY1sWoBW+VgEFeE=; b=BG+jfqRm2nuMxxsRLykVGyytF9mwI7YQrFq9g77Ogz3F+sRBfKJ0EULXZuD8wcFKta VnY+sWZMGiZtI3cauNUS1p309eOi37z7H/Bej2t8vKEifcF40BLoXsrcsncgL1k9Bozi iLIWi2JaHDUpaDfuFonpJbt2QhxlHOqt068Ro= 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=luJeaO/Cg5UAyNt7ob51Zua8FEFMkY1sWoBW+VgEFeE=; b=DaxjdeLNjXAThiecZ+31DgM/egrUfBGBH8Xct1TLZFszyEfVd9K59FHJwpSqdEYhTI Vog/EBH6FgHXDnDmdniXseHx+ibTyr6p+cfpgYCVDjAg4Nc4yc3YFmE5oZPObprx/GSY qyR46vy1GFRXyqG3Nqd2ZdFDh7Rvsn4z2c3G6sbUzfFg9pBqmqAJ3gVh0zYqtDwOYuVJ 3+ABkVry6s0dkKmZD/eUXA22bWkgaNaZCP1CehvVfMqPSeAEYi5dfxgJWY+zozcvg5mm Ujeiq8Fs+oID4Vtcvi04t+MAQlkV32Xs+pykciipU/mgJMa/RqLicQjS21UH3a1igEU9 fS8w== X-Gm-Message-State: APjAAAWnRDdZG29fT2tHZpQRZmkHefov5a8SPNCB3H0Cf/ldRe4ghbKB i8bEu60GgX1CIUkThweOR8+NHW2J X-Google-Smtp-Source: APXvYqwE8oFv+otQv9Gunb0ELz/52uYdUoBc6zAcMaVfN+vYSlOkzUlJ+AeCUoi7oMTTu+CTtSyvNA== X-Received: by 2002:a63:1b47:: with SMTP id b7mr4686544pgm.446.1576696241831; Wed, 18 Dec 2019 11:10:41 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:4948:: with SMTP id q8ls705223pgs.12.gmail; Wed, 18 Dec 2019 11:10:41 -0800 (PST) X-Received: by 2002:a63:ce50:: with SMTP id r16mr4797995pgi.32.1576696241220; Wed, 18 Dec 2019 11:10:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576696241; cv=none; d=google.com; s=arc-20160816; b=eWoLIaMn5CnTFIYCf6ZSpvM0cr/YfcIGN7g/2JgYZMC+1U4X7n4B1RCMmW6wDwmGtg N+YsAFtHTD+19AO31PCUar4dPSavSEAyX4l+nIS1irJ2zSw7meKEnAYFOIHZ6So9QARD qSMDx9ihqmlFYNaZ3Tku+zXnzX+ZqKLjHo++VZhWtqnDhsojezpb8EDYFPtklDw6VIgW AxMMAdIFCoPlAo4rEtH2q80eDkVKaPTeWDFW86i1v9ldFw8zv+LldaO/XDcJBxSchhWR pYAuHPdlDy86QxsEErF8/x9YNeQ9EAGrSFabzB+qBzE6OmfndaeJGmevu3tw+LS57NE/ Kn5g== 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=Hp8TQeL3yIB1KqyuldLYK5Mau4+1RzHQTjjW58JR+LE=; b=QYpE0qDS18UgXQs1HNeCBFLXhuUsdwXGYqQLAq+iSwfFxoF6xCmG+JyhAbuM0sZrmC 6TIkkisppzNlZ0uiqv7ka5mff4qO+D7DHBE7MgVMu/0oVvfe+SSBt6sXyq9CRmhL0qw1 +O2qBBlW6UYItq/k5vg/QGEGe6xONuK3yV+8dfbopajS+s6yjhBDf0yLVgids7O2sLGs XN8ZGsIo9I1zQrkoCcWKm1NMblxxv3CQZZObAbP5jqsDMPP4ZWL+g6LYgPM7Ac8xUnYP HPgJZK7xVYqOju3SnSdZ+ahhXQ9TtT+cyEruDUAI2CpvC94LBGbdQAhZau7h+/mC1hpm cTrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ahpP2VUF; 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 w7sor3076861pjr.23.2019.12.18.11.10.41 for (Google Transport Security); Wed, 18 Dec 2019 11:10:41 -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:fb4f:: with SMTP id iq15mr4735561pjb.86.1576696240895; Wed, 18 Dec 2019 11:10:40 -0800 (PST) Received: from localhost.localdomain ([2405:201:c809:c7d5:78ea:e014:edb4:e862]) by smtp.gmail.com with ESMTPSA id q7sm3745855pjd.3.2019.12.18.11.10.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 11:10: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 v13 3/7] drm/sun4i: dsi: Get the mod clock for A31 Date: Thu, 19 Dec 2019 00:40:13 +0530 Message-Id: <20191218191017.2895-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191218191017.2895-1-jagan@amarulasolutions.com> References: <20191218191017.2895-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=ahpP2VUF; 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 v13: - Drop has_mod_clk quirk as commented by Chen-Yu 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 Wed Dec 18 19:10:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 934 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6EB363F08E for ; Wed, 18 Dec 2019 20:10:47 +0100 (CET) Received: by mail-pl1-f200.google.com with SMTP id p16sf1657674plq.10 for ; Wed, 18 Dec 2019 11:10:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576696246; cv=pass; d=google.com; s=arc-20160816; b=eU0qvFn8k8H1FSvvWLc4PdivWsasyIqMEB6spAKH46bO+tbP/kY8YgbU5jtYtwU292 sb5bm4LBnr7o7D65rzro5n4dNJzIKfWvxlNHxJ7uRdA3b64R7zLHcc1ew0qFK0dT6Kb3 FGrEcuXXVwMIXv3It9EpEXZB8EN9Ec6vCSv1+v8sV4LtSqWcy6sTJ6+FSFJXXPjMH4i9 xhrHde8/IN5k8QoJ4AjSHFKxIVKlwqL5x05jR4x9m4NI1TVzJKgLBj/DQIc038GrYaRq R8yUughNXt3dhw0rAcjVRhB+uzHNaCFU7gs1Ejq3srUiZCoqLl8Fj0JNqXJSwjAO7/v3 L4WQ== 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=Gyaf5VzGK89On9kJHXvI2AQkAmjJgZxC9JvrT2LEU08=; b=RKD6XwyJSfMs55BDZjpgFP5wi54AXHdkUqQHyuWVvQ3hi66cQ8XsGG5oX70FnoQOUD JKncHiKPSfgFRmn0g25B5HHFoR2O5dydtk8uZgqUvONEDewEpSWZ0DmCFL+6i6gEu7oR mAlVsuu4aXFIPpK1j3u/MLcSmfH1E2HHAV5SxN10rCqwE5Qs//zVUZcYw6PHtr9K8P0y 7jzMm34E77Itdk+jKPvtZkflFSdg7+f5QdALgcihyrlLoPMP1tICSAgXUWfNTs4BWuF4 iMG+AHfUEeGw0/q7XjE1X5O4MoeBrvcUWkTVsO3aQyXgpG1TCjXfMNUubB7mz/D5H6+X 1pOg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YxQafe8j; 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=Gyaf5VzGK89On9kJHXvI2AQkAmjJgZxC9JvrT2LEU08=; b=AyCYUCnoj4RMvXne5fmidM8GLHuE+ZR5SLxuPBkr3vR9oMYuOoX+NaC+cg6QBCQkMn CoPITcdB4KoAUt7LlI2GTSh1v1L9+EwWhwH1vJMbwCBTrA+6NpQegtehGORydpfj/PZf g7EXwAM9+xrJpSgw9u1X9vLZQMglLqwXAxnT0= 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=Gyaf5VzGK89On9kJHXvI2AQkAmjJgZxC9JvrT2LEU08=; b=KL7+9nzSc975XoYq6ByyCeevIzliYdhJK4ZWLRs9NO17G9hoIYfG3PXQLyJ4y4vBuj AxRqQYMfVZ1xVpzV83B5a3YBhRP02qZGet4qBG+B7ZHdu87wc1yg5+hHxgYE5w5svXRV q4lMfHe8iP1zQvxYy1+NwaLJH9oEJcs9pwx6GMxzvQVGC8qMSKHqh5uqkBCz7YFYpWE5 Kpxz1BpLsQJ4vME/tBUp9Nu1VY7bZRy62q4d5sFcbHcsD1R1GUtz780KLeGoRrP82+Sz 3GmAwmA3cMgLfluS0LNAvm0eTbI2+YKvGU4Uk9+67Eub30cmV5LXOtXaRwLT+qOJgAtl ZC/A== X-Gm-Message-State: APjAAAWE6f/XUV+gcBW6bYHTOLJ1IQTSD0OLIHtoQ3fKWAvzrEwNDQX2 LSmxf0Blb85OeE2aMoLK6cuvS1Qm X-Google-Smtp-Source: APXvYqzrxdU/LDZ1CqAzW198RJR+i5TLX9nQRffxlXSQyTMfiRsCfoDtM3d/qQspNzMsmIuBvCvoUA== X-Received: by 2002:a17:90a:d985:: with SMTP id d5mr4819299pjv.73.1576696246212; Wed, 18 Dec 2019 11:10:46 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:f8d:: with SMTP id 13ls757350pjz.0.gmail; Wed, 18 Dec 2019 11:10:45 -0800 (PST) X-Received: by 2002:a17:90a:a60c:: with SMTP id c12mr4728905pjq.61.1576696245633; Wed, 18 Dec 2019 11:10:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576696245; cv=none; d=google.com; s=arc-20160816; b=cEsUXTb3o2Bu8VfxvnAd1viFERFy9s5cw5V4Ls0Tf0OvBGIayzVI7cR/ZqC3192zau rNUQbhsOa5X37H/lBP8LNZ5n9S4eyAyzSGZZaIapqNZ+EjfpJ4HUmUX/XvJ1/Aw5AszT 5iPAQQstagdQ3ZSl1J1DZeQKj9wSfZI0ffBkCrJ5Zqr56KIcRrNZEEfDmDWYcdXE8Yag JNWUplq/1wLsuOiCyAu2O7Gcf8ZDA53CM9Yke8rjbqALHeNmI6lhdvprGOOhupKRWMR7 kjug4n4tSIZFjIMC5kUbOPkuUCpd+Gad5rQfjIazHiGXQtb9y+7eUxbMrwaso9ugAi7z emrg== 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=qISq29HsJqizQ/dr9IDqB+kkI7D+OvUtJAFPrAy/nl4=; b=ZoQfVJXfPtDCYSg0AIvspdisEvQ0bOVZd15uhnhsxARelxNGJ6L+m3jm2d25B7wkJ+ LXzR3plUo1sBTt7MhuLmyqI57nV82rzt8NT8Tmy2jadDWhDcGDk7NkcEZn4Xf9tFOoGC Jbn8B39IkOx0esfEiMcMTWy4wxW/FLkmA33KLpO3x/rPXfEvQAjQ4knWYuH7msuYiMDO sKlLvvi1K0I/L3XLDMFZ9s3c72k+VkiavjxI6cfeCpoysFEtrBOxI6wPliJbENbKDny0 v2NREVHsDoUgBIM186FB7mxUFtcDLiT5KbCbxiOSMLg8tu2sFOD80qUYktyH/GUfnu8P 4u+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YxQafe8j; 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 n16sor3181957pjc.27.2019.12.18.11.10.45 for (Google Transport Security); Wed, 18 Dec 2019 11:10: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:3747:: with SMTP id u65mr2730117pjb.25.1576696245276; Wed, 18 Dec 2019 11:10:45 -0800 (PST) Received: from localhost.localdomain ([2405:201:c809:c7d5:78ea:e014:edb4:e862]) by smtp.gmail.com with ESMTPSA id q7sm3745855pjd.3.2019.12.18.11.10.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 11:10: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 v13 4/7] drm/sun4i: dsi: Handle bus clock via regmap_mmio_attach_clk Date: Thu, 19 Dec 2019 00:40:14 +0530 Message-Id: <20191218191017.2895-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191218191017.2895-1-jagan@amarulasolutions.com> References: <20191218191017.2895-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=YxQafe8j; 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 v13: - update the changes since has_mod_clk is dropped in previous patch drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 45 +++++++++++++++++++++----- 1 file changed, 37 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..de8955fbeb00 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,36 @@ 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"); + ret = PTR_ERR(dsi->bus_clk); + goto err_regmap; + } else { + ret = regmap_mmio_attach_clk(dsi->regs, dsi->bus_clk); + if (ret) + goto err_bus_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); + ret = PTR_ERR(dsi->mod_clk); + goto err_attach_clk; } } @@ -1164,6 +1180,14 @@ 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); +err_bus_clk: + if (!IS_ERR(dsi->bus_clk)) + clk_put(dsi->bus_clk); +err_regmap: + regmap_exit(dsi->regs); return ret; } @@ -1177,6 +1201,11 @@ 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); + + regmap_exit(dsi->regs); + return 0; } From patchwork Wed Dec 18 19:10:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 935 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C317A3F08E for ; Wed, 18 Dec 2019 20:10:51 +0100 (CET) Received: by mail-pj1-f69.google.com with SMTP id ci21sf601267pjb.2 for ; Wed, 18 Dec 2019 11:10:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576696250; cv=pass; d=google.com; s=arc-20160816; b=p+5uajedhNKh+RFnqtivUoenTUy2fw+egPe+QqmBZg8WuPE28FLX7Bi9a7p92hSwE0 8Vj0V02xwJd/8o6Fjexy3h5NltDTEuyZe2v/6wl+f8dUstM40swD+zmo5a6ah33oUH55 CHZGNJHzlEdAKlfojgVfvL+WNF1lt3B6lYXbzqvgYEu6kHSCyD4UFYXs92IehbrlNKA6 z7Ku0QsxQzWQCPQVxlp7uH2Li9Y3sWKA5jy5FVQQqZc7CVfdNgqf1RdICuK63dPlJPZQ JW9sjjsTXNk0A9Z5ANx2pyEZIwZAtQxKGM3RwZ1pHvxbF5H4903HWe5VZMUu1SP7werg nTYg== 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=LbC3xDex6kLeCaXPRklt1f7R6kAk6ykEs6L4ftTbeNQ=; b=WkWGCGwle4m8u8TekbYWyULyPGh9uzlbfvgUbyp2ywaXH95S48I82g1YQLW46VHLmS mw7MS+UKGLsY3Ogcgd00gptDJysJwUNWCsoKx+tYaebyT02TduYMdttsbkTO0HkxN4ZJ bCwOCbh4VcQAqcRvaxQHBsPcykv/771M4nWawfyNmI4+ohrltOBkDJKwC61+sve13s+k nNlhypJn4slMUxSDHsPlpiTwMCH7tlrrNyCsI1yaGikODWMOF9uX+YCHnDj3JsM4YVdU g9kPQj3DaUyqAgNMG+x2Px7hrbUl20cT4YuJcIYsP3k+/xnbAFpPah1uTrgAg8cJquol lpsA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pZ8uPDUy; 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=LbC3xDex6kLeCaXPRklt1f7R6kAk6ykEs6L4ftTbeNQ=; b=CxifYg54/U5fvRU9Kx1RX9Sv3divCVVh9F+KNlHi0LC0coprzU3z2ycDzhkynsQ1It sYIkkTC6t0yq/kj/WyJ5Wna0kAD2rXzke4dB4Z81vvB8b8DPV/pXjcsfMbR2+ZXTbwvT aZtOFx5y3Cel0Mztzy5yz/ax0f/ShAvyv7jxY= 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=LbC3xDex6kLeCaXPRklt1f7R6kAk6ykEs6L4ftTbeNQ=; b=fFNAyNsulB9HQ3R7D/8fHWasbcuxvZrdJ8KCMPmjQaYFZNjaJYy6CMBHMGIyzAZXeX B5o8fVk2iS/DCssjDQW2e6aZ564JnbeJuH8SPDZLpoogrgoCM7t9NzSrupYuFpdorJ2z ieYzlsvcVp8ra3lmKJSbmVURE0lYdJzrW/v3RDEo79AHHgD5LA0OePy/kfYo+x8f/ChD cQ/3eCaIGVW6OoIX+MD4sQ3SwU1QO8GXHcOFmO8ESCd/ZFVy8rQw89zNcwRowWYcLn98 U5S19qzTb0DELGagnl0nIwwQsxb1dYkVGh7wlxS0aXSUaroY2Yo3oEIsU4KWcz4uzkj9 6VJQ== X-Gm-Message-State: APjAAAWooOIVFmlwk19RpfLeee+zTbkYFJBcXrgm0R1DxBtFsokwHIZ2 VyCjAbSFOaCFtrxAMY6jOh4lX0VG X-Google-Smtp-Source: APXvYqzNKS3Uo4PbojtLbrZtYpMhp3cbIpjJ1Ncw4CK4XQNbsVGKXS4yrZqbC4HZycw1CRhRM0lOzQ== X-Received: by 2002:a63:4503:: with SMTP id s3mr4720821pga.311.1576696250496; Wed, 18 Dec 2019 11:10:50 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:3b42:: with SMTP id t2ls753759pjf.2.gmail; Wed, 18 Dec 2019 11:10:50 -0800 (PST) X-Received: by 2002:a17:90a:d807:: with SMTP id a7mr4814400pjv.15.1576696249940; Wed, 18 Dec 2019 11:10:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576696249; cv=none; d=google.com; s=arc-20160816; b=cfIEmUWgEpLfqfBdiek4EVKnAJSlvnsmobkqgSJro54h+Ty1WpcZh7F3ZiZKXYItAf nKOBnTJxHvLCkiF1NQM3e3h6quRkBYk1bI2T5hxjkN+LlfoRykmxKLSL+Ao16wtWuCTY +/LYHLZZMXGfLUF0jhOHHyq+VNu3r0xQ3Fo/gapdL1JFiCe8JQNKZhR5UvK0IrHMiQ7k TVDURDGlpzRQCdpbfrgb7dRmQHpBqJgv7c1AvPlZd/kosiVYUtZzOEtLe5meGEWYWD10 2r8Wze3fYG9l9ilrIhAt3t3IMRBqkLwOyn7mDTXxgJ4Fu2xMwKJRYRyZFktg4US8RQUP 7LAA== 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=c+shghrwvHSuaCCAe91cOcF/cABrNe9ZFXBpEs6T1pk=; b=1GQxeukntMnMegdQ/LOIqB2ktmdKs5OaLDo/wcQrkOm3MdwbPtMNyfsYzgrv5x7sQt NjwbvbH6xHSE7DEa1P5WSUK6vsYygzSlTz+5O3mQtlBMHWu4HU/WWyRiAKZ1BODEt2u2 sQNVw4cykJV2l9aWtPa9//mMfOjPUV0XobIdIrQb5COBHszZU9MTci3MxcCrcDz/BeW6 8gw1vjFVqIC/36mWVZ9gkvTp454bBxV/+DWEtYW8BG4zVd/rAobQSXpNDIExWe+d4MTE UC14LUBPb/r88RtlG3HyHXysc+O+tKXjehzLse0n21xa1fAGKt4KuOCb4aESbQKH4pnd 8zSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pZ8uPDUy; 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 a207sor3711330pfa.20.2019.12.18.11.10.49 for (Google Transport Security); Wed, 18 Dec 2019 11:10:49 -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:c541:: with SMTP id j62mr4808803pfg.237.1576696249620; Wed, 18 Dec 2019 11:10:49 -0800 (PST) Received: from localhost.localdomain ([2405:201:c809:c7d5:78ea:e014:edb4:e862]) by smtp.gmail.com with ESMTPSA id q7sm3745855pjd.3.2019.12.18.11.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 11:10: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 v13 5/7] drm/sun4i: dsi: Add Allwinner A64 MIPI DSI support Date: Thu, 19 Dec 2019 00:40:15 +0530 Message-Id: <20191218191017.2895-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191218191017.2895-1-jagan@amarulasolutions.com> References: <20191218191017.2895-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=pZ8uPDUy; 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 v13: - update the changes since has_mod_clk is dropped in previous patch 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 de8955fbeb00..8669d5f0e744 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1264,6 +1264,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 Wed Dec 18 19:10:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 936 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 7F12C3F08E for ; Wed, 18 Dec 2019 20:10:56 +0100 (CET) Received: by mail-pf1-f198.google.com with SMTP id x6sf1890213pfx.8 for ; Wed, 18 Dec 2019 11:10:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576696254; cv=pass; d=google.com; s=arc-20160816; b=KEWhgjsG1SrWaFKrdxkU/UQLyXUR5ga5ObXTstTEGbi9+zzufZ6VWyb9v+W3l2cvkJ lNbcIjBB/U1El5Ed4eeE5hMgwojGaLQL2FIAjdheKi5SwKbAZ1ZXgYryB8O7rGgV5BB6 dxTOoC+G+RMVkD5AAstjpzY+50txEuOI+0txV1UJvwPbaPHGMzV/TerTyQjP9Nm+0UsP gY69UarQvFKedjrb1Yn+uN37YkUC00hbqx1GL6acDp7B5wVKQmM4CKPYQrcfsbz7t7GZ JmS4Y6Tmq7ZED1NzbHdzI4vysYwM8E4REK8rWEeutyi7azMLOMgnAOwXmYGNhvhHSrs8 VhmQ== 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=viH7s7I6ATG8aYZWKyh96EzfxfGEqN358pkcRlzvSEg=; b=RXeVhiIEYwdewF0kS6iJqpO/AVJ0iBH8LEqKhoicRrQ8RA1evYxOdf7I4CqOJyGYHs uFqcFsz3jC69qLmjjnytP/GXEa0mnchkc+dBzbF7QVZZbmeVYNTdLe2CdJ2tvEI8lMLK bLl/wAzagE+frcIq5wRTdw91+cAI8XHQAvXds0i8tFpQyPu3uQhEpLERWVtWCiOLQSAG wqJoSsQRLBIQGczV9CXUhfhzPKdzCPrZPj5/KQMqNpFa/8LpGMMu+cz+ZLmAxC5Wwnz9 l31EIdwf9tTHoDBWgzle62RRSfJvJGejdMRnAj3Ivj3aB9kWLzfRdA4Zbki4FTQwFa2F lhEA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qaT1g3Qm; 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=viH7s7I6ATG8aYZWKyh96EzfxfGEqN358pkcRlzvSEg=; b=jq2YdykZglmHP/a8/KVOUYpVW5x7uIC6u0ABC41qMOcAAo/IOg4p0U1u09TbkQ1m7a cP9GotSgYrDjhSAc0BJS4hiyt0YZ/ZzFjxEOKXyynWoa5AemfvKIBjoF10yNWRDv4bAN 8SpVWojUMoCNehCyliq+3YEiUmmVpsN+Jyvnc= 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=viH7s7I6ATG8aYZWKyh96EzfxfGEqN358pkcRlzvSEg=; b=hcFG7QtNWRu389QUVvkHX/kNM6q64wECMVDniPM6pC+YTW8MdHP8dW/xuB+whwwaab DF1w+tK1sLYqoA9Z1PxhBCkHYAjSSn9R9jqve0231z9lJauhhlaBr2kMuOO4Albme4y6 MoHszSTD9kug13KpBCj+88XgdePoTocJ9i/rssmo5OmxCiDMX7mbdiX5sGRiFXs6uDOj aeEXDA28N+v0eiRcDDt71McHWA31bB2ZeT+jg56ry+UPzZZctFANFWJ/7+Bq/Gna1lsA sVYunONqdyDcWecVeExnKrSrIHWDZYDAPbmsvMhebCTcuT4hpvWHPx45IIBmkFjMmNie rsWQ== X-Gm-Message-State: APjAAAXemrZQ32RUgmWu4a/6FPDED92E3QERUOzq7h7335KEwcppCSAO aq5vULw9fLU3R+JBjPmjDh9ErUnv X-Google-Smtp-Source: APXvYqwifsrF1xVbuu29grQfLbsawuEbtJ2skXv0rqxpU3plbixvTo+iR3V5ZPmgRJNCVNjahI0TVA== X-Received: by 2002:a63:4d4c:: with SMTP id n12mr4882495pgl.212.1576696254766; Wed, 18 Dec 2019 11:10:54 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:fe5:: with SMTP id 92ls751005pjz.5.canary-gmail; Wed, 18 Dec 2019 11:10:54 -0800 (PST) X-Received: by 2002:a17:902:7d94:: with SMTP id a20mr1405323plm.26.1576696254210; Wed, 18 Dec 2019 11:10:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576696254; cv=none; d=google.com; s=arc-20160816; b=RSGWELHKt+6hEFlWHj/0nuXmYiflKM37sBBvhjdjR2wxe5Vk9bPORFzvqRZp1MyB19 f2dKzxK4SUvEeRhuX/hXj1GiBM44EjaDTTEdMYgxKQPGdgkE9qLqUwWHohnPkaS5krtU 6CLKnGiKaFVF3DzwiIqLUS1pZJ4niZU7/lNqg7XW698BUs9J5JPI8qAPDEZ4xI5DVq82 NDITSIm+ZponUl19x2rKjH0KhEZTep8/0RnVouLIhxevdP+juDpBk30JElc1fGjc8o/w SwngmxE0x9AQ7Em1FshNqDq1M6LSIpWPjnd/O5H/35CZYrodQbu+BZ6NTHerD48XZGD8 46UQ== 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=Y5rz72YPbxV0B26OX0MAGWfHxZgDOqp0oOHgAxqpqbs=; b=DLQDpjjl1QeVd+NfwBeu6+VSYE324YEgnYV3oUiy2hu35b75wNp0FdYUcRSTwxgjkr 3tn8YRoGDceMqn0EYf2ulBLpCWREM3U0CXoXEw6vNsL7dO943V3QKIdpyU1gPOfKW7Af 1b3FYSPzCh4tLWRCkMbEsxwY/KdZvluHSVkdM92RwFX3k3e44Ihxj+sURP1Gck3dsNVh 1U3pZfQMtMLAjU/UEkMdKXJz76JCJuffjGecclJ2gSYPmTTX9XvxRdNNJGb76hcn2v8R 5Nm8phBLQm74qUeLD5PZ0tROXtAw1SWfqKuPBbmL1mX7TjURJwvZOizm4kFfhnHTd2WR WBaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qaT1g3Qm; 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 x15sor3145782pjt.8.2019.12.18.11.10.54 for (Google Transport Security); Wed, 18 Dec 2019 11:10:54 -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:cb08:: with SMTP id z8mr3892894pjt.86.1576696253896; Wed, 18 Dec 2019 11:10:53 -0800 (PST) Received: from localhost.localdomain ([2405:201:c809:c7d5:78ea:e014:edb4:e862]) by smtp.gmail.com with ESMTPSA id q7sm3745855pjd.3.2019.12.18.11.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 11:10:53 -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 v13 6/7] arm64: dts: allwinner: a64: Add MIPI DSI pipeline Date: Thu, 19 Dec 2019 00:40:16 +0530 Message-Id: <20191218191017.2895-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191218191017.2895-1-jagan@amarulasolutions.com> References: <20191218191017.2895-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=qaT1g3Qm; 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 v13: - 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 Wed Dec 18 19:10:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 937 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 BD0AF3F08E for ; Wed, 18 Dec 2019 20:11:00 +0100 (CET) Received: by mail-pf1-f199.google.com with SMTP id d85sf83664pfd.4 for ; Wed, 18 Dec 2019 11:11:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576696259; cv=pass; d=google.com; s=arc-20160816; b=kefczzHP/05BFyc1epeoEFzIM8gJ4+aiTrrDpgsvV7ef/isJyvXJKci22idytHAffx 28lzweJdKxQG40Fe7bxuW6qArUuJwp1AATEglkLyNpQMQSjQCZfHr8XA4GIJwhLzgXUJ 0YNf3L8g8c6jQypqzEut9G3jfygUW2rHuDxY6UCc+Rg4zoMGTHgAB/bh5u6XyHrM82yF 2qHuywuPjmz2t4qIxVoSDp/1lh7vNxhpkOHPc5T5CK4jkVR9zkRyjKv7IcX+oZtuJvZz ecxz3QgahVnL+F62c5QOs1H41genqObloQWEWxnVnjsirECJ+sjMG4POzHOCmj0cI0b/ S35A== 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=bKISItavWRJcMdD7f7lIpwKX/PGSfyVkfIXe4wqfV25dwxVprXr8ALxJOQ6B/lBxec LCBGTZg0/GTxNNJMWiZOsTAygLP7xt3l4YWGePLufLU3x2eCu4v3dnEj1rrrfzqJK85b 2aZjs05StXNAkjx2RHUG215vLMZYoqZzre6BOjTHFWtpSA3Ri1Qs0gRERA9E5CWDV1dd dtbrCoS0HtLVUTgRyCiLV9lP9/RaeTxYFDnIQBIj9OG9esH1rsB3mpaYYqs+S/rhjhzl M6yefQaerwNfju3LTbqwNNPDZNHBQmzF9S16QS4dgOKVJUqS158SKEOVDjk+G8creTk/ zRXQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XvGX60Sy; 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=o6hFgGZQ0ihZ64oUC0gexKeaByK2LBn4O/H++CgqwxL9eP7xaP8UtYCq/g04Fb+plR nkJJ0fYsiEiKwJwBLyGjNwHEstbyxhWf4Jza6YGSxbrrM2aQ0FCATXhcmILQeFZJYAh4 7cimqNZcA5OfO8jUS8+YzKkDZwolwfwVgRpso= 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=k6Xcwa3hFc4a3qDu611K9fsqrRgyQqh1tN54NNriQCMVHAY7idLOfX53OyKNsjBk0s 8WVhE326bH3z5Ner1h5emVeDIT6CbWEAaXRzVtrSRdH6MCbSTzBAYZq8NnZ6AttSDd8d /nU+z45rXrktO58ZhWRRG31zdDJGbafFJXwuXkDICJLwP9jIPaR+iSJQswbOwENTXlJ+ VKnJBIMPMDbW2dXUq9KUYwWys/mi0hGZw4EB9cKrKQVjoamldbU8Jb8RtfiO9wcN6oNl DVlmljRDHC84Xo4jOdRGd0oOHvy1b3RbLc1UAaG3BHni1FocHQwWJkZ6VUfK9CHEAKF7 dBtQ== X-Gm-Message-State: APjAAAXhwbRkbnYc1sZfRrVVxXv0ozgJk9D98lmkGCMjl7RoaCmz8IGi B99WZztjgpv8bLriiLLrUUHWBIJt X-Google-Smtp-Source: APXvYqxcPpRF6QFu8Y1vsW5rKMhDiaXgr0+WG6Sv7fKSz/u6cgkYPCf4ksI5YY/WarGoqfTZmPWnmg== X-Received: by 2002:a17:902:421:: with SMTP id 30mr4675566ple.324.1576696259475; Wed, 18 Dec 2019 11:10:59 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:e107:: with SMTP id q7ls757164pfh.15.gmail; Wed, 18 Dec 2019 11:10:59 -0800 (PST) X-Received: by 2002:a63:1d1d:: with SMTP id d29mr4511361pgd.387.1576696258716; Wed, 18 Dec 2019 11:10:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576696258; cv=none; d=google.com; s=arc-20160816; b=qIyPmclL6MdsgU6AYie4m/O6FQKhwgHqKlfuuOCWdsnZm7kkADot+tIrb3ResWDyBu fn2dZ272uFby0skWrV3i3jrJru57gIrKpTMk5DrVt9x99ZFF34EzcmfMMrsgZQkRUL0K IOkmmajnXAsmZqiBVjjNVQypErXD1ZyWJRoC+lVaPStmbEO/huYPdvyWAS8dMaWhGE1L CNUfIBF04W0+506qG0pl63hLI7HMVob4DG1EMkIQJLqM9slrMWgeqwpbxnX3N/Of+U71 /AE66D92DFhge4VZq6RiUCbvsRnlCK/aGFydTYpV9iH/Wi0QDQ6mOkNzXVShTX/qsE7O +EMg== 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=gGlHpdmBktYOudVorVkLjLFQH/M+DsAByhK/BrtYacQLZQcwzDcsqCq0Ahssqh8Fp5 CvgdKWmk7xR2viVyRdzj5uPwFlvfw7kH7yKSTh9+uhSoJTMkf4Q9O8A5+asXxiDRsf4w qfSKdpqQHXVkdmTkb6YDUsSTE6Lr2fq6tp6WXQqsxxYcRRNDQgiu/mz2kgjS22tz9rhx 01H7Lst9AX2R3Kux59ZM+kUm15PlgQSayFJbXbiH4/8Gkzw2jX5+vwrHegUx1JBB0mNE /UjholDGrChVgdFIh6bRx2QTMiwqzYAESmjQgRt2QaDQk7m9zkFqAXpU39ONc3xNaxkP hvWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XvGX60Sy; 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 s5sor3300181plp.29.2019.12.18.11.10.58 for (Google Transport Security); Wed, 18 Dec 2019 11:10:58 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:8501:: with SMTP id bj1mr4678564plb.84.1576696258260; Wed, 18 Dec 2019 11:10:58 -0800 (PST) Received: from localhost.localdomain ([2405:201:c809:c7d5:78ea:e014:edb4:e862]) by smtp.gmail.com with ESMTPSA id q7sm3745855pjd.3.2019.12.18.11.10.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 11:10:57 -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 v13 7/7] arm64: dts: allwinner: bananapi-m64: Enable Bananapi S070WV20-CT16 DSI panel Date: Thu, 19 Dec 2019 00:40:17 +0530 Message-Id: <20191218191017.2895-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191218191017.2895-1-jagan@amarulasolutions.com> References: <20191218191017.2895-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=XvGX60Sy; 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";