From patchwork Fri Oct 25 17:56:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 881 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 2CC6E3F0E1 for ; Fri, 25 Oct 2019 19:56:51 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id m185sf2483513pfb.11 for ; Fri, 25 Oct 2019 10:56:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1572026210; cv=pass; d=google.com; s=arc-20160816; b=uD1I2qDj42W0vOk4M0OwAL7QnyLTdjlJxBBGDDzNbs0cbVdYjo1GPFXYtNMfWOaXPG X2AUTuh+b7wv0n4ba4D3AeTV39STQJr/dyGCc8YKZixf6Q66ltPBjvtNxCiSfAVJHRpu IjtQgOgJrjKDV7Gegwy27Cy3OiOc0Z5rlXsbIjtlGy1xURhu85XenB7KCjEcHiDws78b diHzyt4F6hUxkVNzdaJK+JZ/j7mO+7k6DtCQfWDLhZFIBjGXLCUnoCxaZIXgU39i+2mn i0B28ZnpgtH4quLKdA5VmxXTf2fAgZ4+YChfV5r/z0QLWnGC1IqkI88K1+Z9DPEs1xmv O//Q== 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=88vfdHTg0PYWio/ykO0Co6SWWjM03sOBWkJsEq4CWqk=; b=MQGsxXq2nDqnRPOz0RO7qOktU3Cb4FR+9+tCJYfCHrFxtrLOW2p1TreXfIG+y9yBSp tfjNIILuv5zu6R7TPznKL9ph9TdEZkGDLrlhUs4W89sDUMfNDVoqjoKV8uq9x5EXDOCV r8st9voFm54WFy3Lt6mi3iRsvTMJKhQKLogUzz6DA4YRK+bEdNmO15zdIKcYfLbuUFXS vRjqqz5NMwEm8DXS0+ny9l+v25OYISf9XX7jV6NDv/Zxi0lJymy+Tv+QuKgfF3YPAZEx RyMgRiXk8A8fi0rFMxOz7TiX2S+DpMYwsghQcOKvCdPPlvwMYGHGP3ziqJFEpd4Ecjx+ fTjw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=I4XfFKf3; 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=88vfdHTg0PYWio/ykO0Co6SWWjM03sOBWkJsEq4CWqk=; b=oPoHa8v5XAJXxtc65Hg8h+FjIcMUMIvnDB8ywnU/PIS4AWylNVbG4tvphxSproFT9A JKg1qkSj8nPkEvnXz+FafLg+CB+EJYF1u/+pxnuoL334YG9hWP1xNEIhrx5C8mrRjd3E Snfulzr2fQrc6g5/+6PdMzCM6OcFInCHJsdWU= 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=88vfdHTg0PYWio/ykO0Co6SWWjM03sOBWkJsEq4CWqk=; b=RVS3FpsHfpyPlxtVF3HtvCVZtcDtIJazu8FWA+dzr7d6sqofOUTJnUHuJu/A2dC6VV 7TThkhlm/DWS3WPX2CEjxVQ4a5dZ516iAV+bSLwd3evZ8MQeLz6XMO42tGPJhkJ6pGVR 8BTC/0sWmhP7s8ueYnRL/3SBL1IeR5Offp0jFkOj+VLneOvnoO6AYVTrY4F6LmC6iF69 QNQadSaaTwOenZvz+dKaQEm7pka1QmZPV9IjdoWXBZNlR09O0jqzJiNO227B99WzRoVc qup7pIPd7134EtutE1EYg+Zdb54wK6LilP8IMJEKEz+K4gfa2j8Bu2DQFGkVUsu1PaHx 1Bfw== X-Gm-Message-State: APjAAAUe8OPMszDvH0/TCFIIgr7Zh2VqjsQLzipOTX2G1o5ej1ggs/BH LpatgJStQDRW8vc+/iA3XYX+aURb X-Google-Smtp-Source: APXvYqzKyfzqYCYaZp6W1I2oTRjPrzIxZ1327GVPN/Y9zlc71+4ZHFje3IeDkfiQPXeV5+sxCB5t4Q== X-Received: by 2002:a17:90a:e001:: with SMTP id u1mr5787513pjy.102.1572026209800; Fri, 25 Oct 2019 10:56:49 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:5107:: with SMTP id f7ls3062645pfb.2.gmail; Fri, 25 Oct 2019 10:56:49 -0700 (PDT) X-Received: by 2002:a63:dd11:: with SMTP id t17mr5942446pgg.242.1572026209276; Fri, 25 Oct 2019 10:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572026209; cv=none; d=google.com; s=arc-20160816; b=Cq7dmgb5UgliITrAtQ4uVjmNp6PwkToeccdY+EQ/14qvNqT6SFoi3eKqPzGS+0MczR BpnrNYzbAZ4vsFzDrFrzVrChlUVY+xAVct1GwmcQxKymbHVmyDWiBtHb1cVNcqiLgPhw j4CFqfTlhobPSLT5S9WP2BjZ/kt1sx5I2WtbRYa7GVzU/eAtE2yan2I3blBmoMoVCI0I YiED111iRq2TRcymSGbf3wteM2WLJcktiApzwx7da+5h+poHutPqOH2wWM6gPlkZi4g3 R3ULPGSBnZoZGPctG8MKV+7m3vYUETtSkU6sbIf6oXz9eenezVSkL8uSPmYaupm+spO7 M9qw== 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=SvO1A1WodzP09Lr/d61c8nwX2ky0IL4uKfdfDnxUPmw=; b=IcsF3lmeqTyhRzo/Bm+WBh2MHPe2yS0KYe7FS3LyOGQuWQLEkolGQDWBBbi2PftoAv 7demjdbw/f14iWCCXtVQiKPpWlzeIrY+6rAvTOS1w24SxBzLNFO4JdRrsWy38BwyXfmI se508uhS/ud3qyuMM6vwXquEJnxHUZREB8xnttdHJOWnpHmgKmtGSM/MSeuJ2WYD0KQH iBbJvEu/XjsZCmmankszwTteQMdfYNpYQTPktcWbMAQ2avHlC6TegCz5NPe5eOPiFFL3 473/AZBNOxJiYBk3wk3FjDDiaXUcOo9sk4+J2osSqeVByAgiofY8awbBoqhFjM+LJSUs 3s0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=I4XfFKf3; 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 cu9sor3341808pjb.25.2019.10.25.10.56.49 for (Google Transport Security); Fri, 25 Oct 2019 10:56:49 -0700 (PDT) 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:fc93:: with SMTP id ci19mr5849047pjb.34.1572026208821; Fri, 25 Oct 2019 10:56:48 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.31]) by smtp.gmail.com with ESMTPSA id n15sm2926580pfq.146.2019.10.25.10.56.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 10:56:48 -0700 (PDT) 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 v11 1/7] dt-bindings: sun6i-dsi: Document A64 MIPI-DSI controller Date: Fri, 25 Oct 2019 23:26:19 +0530 Message-Id: <20191025175625.8011-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191025175625.8011-1-jagan@amarulasolutions.com> References: <20191025175625.8011-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=I4XfFKf3; 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. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring --- .../display/allwinner,sun6i-a31-mipi-dsi.yaml | 20 +++++++++++++++++-- 1 file changed, 18 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..2b7016ca382c 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 + oneOf: + - const: allwinner,sun6i-a31-mipi-dsi + - const: 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,25 @@ 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 + additionalProperties: false examples: From patchwork Fri Oct 25 17:56:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 882 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 BC4033F0E1 for ; Fri, 25 Oct 2019 19:56:57 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id o9sf1979067plk.13 for ; Fri, 25 Oct 2019 10:56:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1572026215; cv=pass; d=google.com; s=arc-20160816; b=CZ0FUJvDR9ZdcMdSd74+WqgIYT85oTU7dh0Gdi2D7Rxn0RBjaA8y29FbvcBG+2CLOo dLIleTqcsQLH6lFwbjCKwOaLbvZs41pM/bbhUUyZJr2rRQfZ/wc1uRKDvi+uSmvzpIdW 28CW+CaIgsStC3mXJONnYZ0n/IX0HJVdhqL/GLKYZnwXRg60tfD3axwYP3v1AJY/oOoH vaIIuPW4lPI/ZBQN8rXnWRyqDmR8/e33gywU9/dLJji8pN3LLvxLj9Z+wbGj6fhMp9E5 R7KEZJNj00reRABZBzFBNXvJHEeiM3T3fY1srL10XhqXcXOyJr1Zsy2gynmKr2244ZTY fBAA== 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=9utlkIh3HfqJiZLPRy2np51GkY7a/M9jIChdmzUQIPU=; b=OdZmOWTVcdXJdUl+GG1cCyvJmvTQlk4z2ZWSl7w+WFkk4FnAxqe7XaVQYN3mAT5q7U hSCXB7GiCrt87Kvls3So/UQp4FZyg4lcaumH1Ke2Y75sF07aBGa5VaN5jMx3FK3a0UMr NC7lcR1axZNK2VEYPw/Zb1twqCE4jfPVdLuK4UJNy81ZR05eGZ3nrPPx9awHBs76HDi8 Ssi8yqKvdNAYpKMYgjDHlDJgT9d9IByWFdtej94yd9g2TA4pB7Z5QuaJRfLsf0zITN6/ dGs7xXeP9qEv2gE3K55WSsG+Y0cptLyO8eUvIveC9ad9Mtbe9KRMWLOz1rLodm5fxMqH Lx6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nzR3p0+H; 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=9utlkIh3HfqJiZLPRy2np51GkY7a/M9jIChdmzUQIPU=; b=jB0ongU2CFkRd+omH0jfT9rbHrHeKkcDZzvHHEBq5JlvPkjcqzPt1gXMKmJe7fCArV u2DTcluNibkhVxSCqPfixt0/KUzPtYA3T7AHXUsjkBMrJuvyD9gqVUY1c8LyZz6E9/QW rXlVNkwDvkIlDL4lTuceGqrYDI60kO1qMYxoA= 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=9utlkIh3HfqJiZLPRy2np51GkY7a/M9jIChdmzUQIPU=; b=L9kn6JX7ZCg5XEwxqL64n9Ali7WAAY0jyNZnHX6Z0Y4Su0PQIRyHqzkrqtlBl0Pcrq /gWOpW2Ho/7nBZxPpjfog6DPPsur6zeHW1aaHUtaVnXAeeoB7/X4xP61oWU/0P2zp8VR F0xz9/FuG+NsPCJ3GnVzosi5dt3ArDJwPsDUjZbUn0xI9Xa0zU+pfEfTy7kcVVziSe0y dhUjxSEEAU9K8iR0skpxZjMLAEhGes+AoCbYsXntWZdOx5nK4zmy+dV1tfcKQRtxg/7T xKtHVT7NLXsQl6DVVJ9aDa8WUc9xfjiS5aFtDPdWTz7CLSaLwipNcuHouxL9D8NobC3z FonA== X-Gm-Message-State: APjAAAWH63Ls8H5VdNfUO3GSZvQ1PNGvcMwOS2NcPX2jLh5E17yKgTi/ apV4XzVb0ar9SIat/WKkPm+Vhl2p X-Google-Smtp-Source: APXvYqzHfqogjqvx7uhmaV/CvQiHP3ZwhK15K3k4HCT0JpR7zeXy2X/FN+iaEcCNRTTBwVs0XECkAQ== X-Received: by 2002:a65:5cc8:: with SMTP id b8mr5558723pgt.38.1572026215786; Fri, 25 Oct 2019 10:56:55 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:454d:: with SMTP id x13ls2960552pgr.12.gmail; Fri, 25 Oct 2019 10:56:55 -0700 (PDT) X-Received: by 2002:a63:5909:: with SMTP id n9mr6074117pgb.101.1572026215259; Fri, 25 Oct 2019 10:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572026215; cv=none; d=google.com; s=arc-20160816; b=uTQOqQTqWU99/OlKFgpExb6Spa/KNhEoIGddjy1huecgOj+//GuoUyLBmQ2e1ekgEY 01t7Ik0wDhEPU2C3OK6ZhMTG1FrfW4/4JbnkAseZU+gS4HgV/8/FWOETRsNKf9UDLByw 8O1CTdyXErp7rILbOlhjIhYFZJQ8xa53hMXH3UvJDfQ+avpTKW4dxksGlKk/f2oLOTAR 742jOWV4BYOlSwcNZXZIntwLREExqiWErDRZCPPMGdUfFXSWi/SWfoA8oCijlHpj1MKx vjoQA/fNHQ1z7AyYyfuMd9GfZLMIMsTXiJhto2BXLVNpt+e3kJmrYbvUu92Bea19QPwl LG6Q== 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=lLu60EjnRBnW4wz32/fkJTOsgD5cNWvT5qBN+RYNBTg=; b=hYXHd70uLMCsbx980NkhMm0NSg79xsBcWOqHYPUyE2kf28O+U6R/j9CeqhTWf1ihZ1 ywxD/edt65MarQxCYhB7jioAFrRHKXV6jEenQbRELTZJdTsmLHGBjvdKbzW9w5MOwqfw VoEsCPGyO/ogpZmlVSJYBm4GgTNPxT1IQXr++9UDy8LzoImZabQhsGO/4TPRWV+NubCy TJzFgmvNnSYogF+B9tTcyeMZd84LxOFrEj/88zkKNMjjF0h7xe/E60voZmMakLFAqOY4 7PvkmXs0nMuQZFdKcYBarB+/ndR+ttAc9dRcAwcYsD9knCotHzUbCh4j+NjnPvwrbLuo OMlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nzR3p0+H; 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 x15sor3839282pll.70.2019.10.25.10.56.55 for (Google Transport Security); Fri, 25 Oct 2019 10:56:55 -0700 (PDT) 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:304:: with SMTP id 4mr5342476pld.106.1572026214910; Fri, 25 Oct 2019 10:56:54 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.31]) by smtp.gmail.com with ESMTPSA id n15sm2926580pfq.146.2019.10.25.10.56.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 10:56:54 -0700 (PDT) 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 v11 2/7] dt-bindings: sun6i-dsi: Add A64 DPHY compatible (w/ A31 fallback) Date: Fri, 25 Oct 2019 23:26:20 +0530 Message-Id: <20191025175625.8011-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191025175625.8011-1-jagan@amarulasolutions.com> References: <20191025175625.8011-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=nzR3p0+H; 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. Signed-off-by: Jagan Teki --- .../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 Fri Oct 25 17:56:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 883 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A76323F0E1 for ; Fri, 25 Oct 2019 19:57:03 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id 196sf2318646pge.14 for ; Fri, 25 Oct 2019 10:57:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1572026222; cv=pass; d=google.com; s=arc-20160816; b=NUywG+kLg6/ZXTjRvFCGbjFVVnwDP5LPBedaKvEwvkFm4YjByGYYAUP5naizA96NPr uYlhP7Wx4qMDAhqUvyiCrB1XRCD02xKAWWHA6l8KvvGwzR1R+IVP+y1QuOAhW0J/Nx7p uE1wn3K40X7ezpGGoAakYG6M04X3amGyffjuB6+0zV/HrJDH+dXVeloCXgb1z8C3PJ3K 5bw46NPRyTIeOCEKFl1WaiFU7rRlr+/iZcaRD6n6sflqGBaeEG2VwGRnvAyBXAtKlw3+ xTAoVE3TgyK6FFot9WDCqa6foTP+KydfJUBRNRBgKYpJfkIdoAjh0FjzjGeh+vwMi5+0 hzGw== 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=a1S90qWy1QPWq/RUSeVXjod6PmK3fV6TEX/PWOMcJck=; b=cT8lkdBSEF/9l1Z/60Y4naEBIYdVKZOljBGJuM36OGu6BbV4OmQqpHHhZfn3OFhpy0 g66cX4ZCYoXL1BT2gBZWt68Kgv6S5D5vKmZLXNMflvCkp7RXkaKk0H2zC9c9m376VGS2 JzB9kG7sL+viX9bpnID+6WOX2PeXr09UZ+zge7tjxzCMUUDn3wtTcfIYm3Pg/H5v9fhP ioO1bJb4gJI8vKd14DfFayCFtjyExpJttBacojh4vEbxOcA5l6SNBDunP1azDaQyWa84 Mb/O8PKor5qx7YxKzNU3PXgKsqvBIZXdwh7ZHSH0FEL2InpkMqjzCmEndNWfFeqlq49z TYAw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mhoVW4q3; 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=a1S90qWy1QPWq/RUSeVXjod6PmK3fV6TEX/PWOMcJck=; b=hpWI0vKewLXYNlDNizauv1pNsY8dPaK8Z1AkQ83thhC5vgn5aba8droOXv1OxegD/z Y2d1idcL5j2dUnUXeEpAMSZZoG4s0iYWH75KKVJuMRsoUJRQbjcPMQHXA8Eyjnmii5iC qRbV17AbIeHCjcYdIpYzyz3YEFCVshrdfpYzo= 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=a1S90qWy1QPWq/RUSeVXjod6PmK3fV6TEX/PWOMcJck=; b=h4OzBjIV4j1coCBFBhY3HCfcCRUgOBdoor7y7kHNuQqUxTr2ERfaFaFxh1ZrWDzIv4 WmLZd1R5/j4Iv32pKHUGsfuZ/oWEzAwCHdoDCJ17En2bgiy+QDCp+YiZugxKJpES0/YS tZMbm6/pDlx90HG+c6z7cCLzNbFlg9npSiP+/PFwEBe60GWdtuKenTzHMcD0SD5/EQVM nlAZGQgrc+KOZWhn40Ta3DGFIDuZUsISjPdeXFy9sDgakvKtAKlGAtkq4dCHNUVZzS2G WMDqEd28NjgwOfK4il/0ENc1RVHi/Vnc/Mhhmi8m1SrCCFpQEDh0syMndpj/88Kko86O 08Ew== X-Gm-Message-State: APjAAAWMCtguiJNLYXbiu4mvy98i1OJb1vhMiznUgkdPfPAsHmPzDeoO B8YOvPUgMYLp/bHObjyyFBoTbxmk X-Google-Smtp-Source: APXvYqyWpGHBCqWL2am7xpiKVVFHzmwsF2VLzR/8est7wajBvqe4igAOt2WmlksT/8B9FrcQcWRSdQ== X-Received: by 2002:a17:902:768a:: with SMTP id m10mr5221781pll.343.1572026222065; Fri, 25 Oct 2019 10:57:02 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:2c1:: with SMTP id 184ls888409pfc.7.gmail; Fri, 25 Oct 2019 10:57:01 -0700 (PDT) X-Received: by 2002:a63:cc4a:: with SMTP id q10mr5957231pgi.221.1572026221458; Fri, 25 Oct 2019 10:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572026221; cv=none; d=google.com; s=arc-20160816; b=y968zK4kVoKyowJEfGEIEUty998ZcqOLfydzUc+ADcDBc8hXszvnoUpaax4+szzOIj DAAcasIN3MWcgo8QkRpCIzMNeCYAAnuAkQswO9lXjOvz2ziHT5ZVXYYLxcfRxp1C/L3b ht50+T93+UwHCHZAr7RnZm5UG8JTCJxgFVh/D5cXYsTMqkX6YDGtlGIsIZBtxhhOSDBn lxO9BWAymqskY1alrDmCwALwj0CG2fGPGL5lnvEgVaRq4RJNwZpN/DyEZgDWYVSWn0Pa jGZUdKCCIQYZBmsYTrU3GhADzfIdxfJpQimtB9SN25Dp8UMk8fM3FTyGB0rOGsoD4drj wE6w== 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=oNviLkxeRT2QWy07lD/cdFtoGXA9IjHjIMTuJSUpyNM=; b=VL5bYIgfdNC9uRHYx/QstQT00/eu5g439TFTJz1acj/9FUI5JHjlTgoOAsKLD/yfp+ QF8Nn/qbzXOwS4LDLshmf7Lu+g9EnY+mCDqSsTeMt0arcp/tUEu+ec5NhFcm//D6X9ZO 6zie/9hRfDyDHitFQ16L6E4hKZLqA2tN4M9nnq0z8LGr5tcGI+8DnATijjZsWNCS3OiH cGwEbLTPyOu4+lCt+LK/800ZgEQ0+cAMiDPK8rO1t1O2Tn1byQ3Cf5/plCX6BOhXyJsj PtqCkG9G9f+37gImjRuwRNUoa1NJkoUqcehawzOxDIXCUX8xQQlBHduTNdBWNbvddpzf je+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mhoVW4q3; 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 s73sor3436750pjc.6.2019.10.25.10.57.01 for (Google Transport Security); Fri, 25 Oct 2019 10:57:01 -0700 (PDT) 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:b285:: with SMTP id c5mr5667166pjr.123.1572026221036; Fri, 25 Oct 2019 10:57:01 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.31]) by smtp.gmail.com with ESMTPSA id n15sm2926580pfq.146.2019.10.25.10.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 10:57:00 -0700 (PDT) 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 v11 3/7] drm/sun4i: dsi: Add has_mod_clk quirk Date: Fri, 25 Oct 2019 23:26:21 +0530 Message-Id: <20191025175625.8011-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191025175625.8011-1-jagan@amarulasolutions.com> References: <20191025175625.8011-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=mhoVW4q3; 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 has_mod_clk quirk and process the mod clk accordingly. Tested-by: Merlijn Wajer Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 38 ++++++++++++++++++-------- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 5 ++++ 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index c958ca9bae63..8c4c541224dd 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -1093,6 +1094,7 @@ static int sun6i_dsi_probe(struct platform_device *pdev) dsi->dev = dev; dsi->host.ops = &sun6i_dsi_host_ops; dsi->host.dev = dev; + dsi->variant = of_device_get_match_data(dev); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_ioremap_resource(dev, res); @@ -1120,17 +1122,20 @@ static int sun6i_dsi_probe(struct platform_device *pdev) return PTR_ERR(dsi->reset); } - dsi->mod_clk = devm_clk_get(dev, "mod"); - if (IS_ERR(dsi->mod_clk)) { - dev_err(dev, "Couldn't get the DSI mod clock\n"); - return PTR_ERR(dsi->mod_clk); + if (dsi->variant->has_mod_clk) { + dsi->mod_clk = devm_clk_get(dev, "mod"); + if (IS_ERR(dsi->mod_clk)) { + dev_err(dev, "Couldn't get the DSI mod clock\n"); + return PTR_ERR(dsi->mod_clk); + } } /* * In order to operate properly, that clock seems to be always * set to 297MHz. */ - clk_set_rate_exclusive(dsi->mod_clk, 297000000); + if (dsi->variant->has_mod_clk) + clk_set_rate_exclusive(dsi->mod_clk, 297000000); dsi->dphy = devm_phy_get(dev, "dphy"); if (IS_ERR(dsi->dphy)) { @@ -1160,7 +1165,8 @@ static int sun6i_dsi_probe(struct platform_device *pdev) err_pm_disable: pm_runtime_disable(dev); err_unprotect_clk: - clk_rate_exclusive_put(dsi->mod_clk); + if (dsi->variant->has_mod_clk) + clk_rate_exclusive_put(dsi->mod_clk); return ret; } @@ -1172,7 +1178,8 @@ static int sun6i_dsi_remove(struct platform_device *pdev) component_del(&pdev->dev, &sun6i_dsi_ops); mipi_dsi_host_unregister(&dsi->host); pm_runtime_disable(dev); - clk_rate_exclusive_put(dsi->mod_clk); + if (dsi->variant->has_mod_clk) + clk_rate_exclusive_put(dsi->mod_clk); return 0; } @@ -1189,7 +1196,8 @@ static int __maybe_unused sun6i_dsi_runtime_resume(struct device *dev) } reset_control_deassert(dsi->reset); - clk_prepare_enable(dsi->mod_clk); + if (dsi->variant->has_mod_clk) + clk_prepare_enable(dsi->mod_clk); /* * Enable the DSI block. @@ -1217,7 +1225,8 @@ static int __maybe_unused sun6i_dsi_runtime_suspend(struct device *dev) { struct sun6i_dsi *dsi = dev_get_drvdata(dev); - clk_disable_unprepare(dsi->mod_clk); + if (dsi->variant->has_mod_clk) + clk_disable_unprepare(dsi->mod_clk); reset_control_assert(dsi->reset); regulator_disable(dsi->regulator); @@ -1230,9 +1239,16 @@ static const struct dev_pm_ops sun6i_dsi_pm_ops = { NULL) }; +static const struct sun6i_dsi_variant sun6i_a31_mipi_dsi = { + .has_mod_clk = true, +}; + static const struct of_device_id sun6i_dsi_of_table[] = { - { .compatible = "allwinner,sun6i-a31-mipi-dsi" }, - { } + { + .compatible = "allwinner,sun6i-a31-mipi-dsi", + .data = &sun6i_a31_mipi_dsi, + }, + { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, sun6i_dsi_of_table); diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h index 3f4846f581ef..d791c9f6fccf 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h @@ -15,6 +15,10 @@ #define SUN6I_DSI_TCON_DIV 4 +struct sun6i_dsi_variant { + bool has_mod_clk; +}; + struct sun6i_dsi { struct drm_connector connector; struct drm_encoder encoder; @@ -31,6 +35,7 @@ struct sun6i_dsi { struct sun4i_drv *drv; struct mipi_dsi_device *device; struct drm_panel *panel; + const struct sun6i_dsi_variant *variant; }; static inline struct sun6i_dsi *host_to_sun6i_dsi(struct mipi_dsi_host *host) From patchwork Fri Oct 25 17:56:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 884 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 480343F0E1 for ; Fri, 25 Oct 2019 19:57:09 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id y2sf1971718plk.19 for ; Fri, 25 Oct 2019 10:57:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1572026228; cv=pass; d=google.com; s=arc-20160816; b=znFiT0MyAaHGwRvvsZGXkmFuZ9PW7SJvLzG0StMsl1fAlbVNuvAzmy+vVvOa08ZsYA ZIsxbwPE5S0zBb53asM5mCqvU6/QId0igvTI6fb/xjrmDEMsozACHALEUc/F+EDfS9Fe jSOM8gSm0p0s1bHvAs+1Ug/O3ycepqnB31q9R57/xe9CbFujZCQiad9vogqcPYbt6wWD s840eXsxHRndjO0qZoTuTNJFx9iydsgOsiUTesSstFHkRabOxy/Eaghu/Ig9Bvg5hwxD sakoj28olsPwXwMCWXTPrspkk7AuOBkLUnC2fjj2fJj85nlv1iGAWr2YVt0MCAOuqCQk vaCg== 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=qBt4iQX3pL+NEvmUmlVQMc6eMqHVC8ugc4L7U8DmT4E=; b=isEApXSMW+34zzVmTYQZyjs4xD4KaBezUu4huBAlE5svlmz6OolLreOprXNY5h43HD 2IX85uo3VzB8xJaCqpW2k7hNZl7KDyJQhSpZgk3D9acuBsB3BUuE+0YWL94DAyoVAr8y O4GBUO/zmxloS7PAKr9POEGKXnK+BYFISyfcaY2BpYdJRBmZtyfjvzEWSfRaPhsDzMv3 6hXxnhLR9A2Lz86sFNY24ZFDBAM4U5d1cfvxr2OccL5ym7/8krh91Y2gtWW3WaDIEbBy GCX3sf8UDqOgjq4hYop1aGGT8uiAcrYbIb3moxrqzftrjisc4Ovwjk3Z4AqIAPF3AQA0 xWZg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=i3MIHeuY; 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=qBt4iQX3pL+NEvmUmlVQMc6eMqHVC8ugc4L7U8DmT4E=; b=Nd7FtD1pLvNc7pOQqTToVr2AMZGX2LfHWnS43i9+fItwxpK/H7VeMKfE89vf8RbD7y nbTdcqiNjMosvrSKF8E6jlVqiabalFikoylg4icXcA/NlH4wcRKtcOSflwHtDIjYfRsg 46HeSKhkzWNVnhjL0DMJc7Bt48wNF/EaJEl58= 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=qBt4iQX3pL+NEvmUmlVQMc6eMqHVC8ugc4L7U8DmT4E=; b=h/qTY3wr4IfnH7YJgBxlR1sUrAdnCiyYa3xBVaE1Ev6CfDSwEGelYcXBGa3+xAt5nw kB9e7FjHrzkMdZuAnjlXCkaTvHOKW7DGphdbIaM3NCVmEgzv3nDCe7lyRA6dd5P7PHft FmjoZ/iXv7nuLxksI9fRiy7MQ/XOYdQ86OoKwwNUFhWiC+nBSXWMphknNIoi0ajdNFDN JnG+GEf3ubMx/6cLRk083Q4kxk5YsVXsrcoW9PSbduq+BZK8tcM5jArUTCsm5tCWREQG gZJ+PWsnIuRA+vWR1QHxMlbp91HFAGKc8K/hUn6RJpBX0VrvudKYzdA/JzOJNd9FxhUW 0vrA== X-Gm-Message-State: APjAAAUKf2xMHsdeCQrX6i8cgQTmgg6wYVVw0LqfKTkSAI3Zbq7LHahi tiHBGlRgMSjvucW6zrLv3vwXu6O5 X-Google-Smtp-Source: APXvYqx/DoMdpOAmg+62HyJQr/XyPTDwqXtcCKoe1w9zwHhubJPmU5GwUqHF7llMavl7d6jtXmFZvg== X-Received: by 2002:a63:471b:: with SMTP id u27mr5792000pga.96.1572026227957; Fri, 25 Oct 2019 10:57:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:6307:: with SMTP id x7ls3065633pfb.0.gmail; Fri, 25 Oct 2019 10:57:07 -0700 (PDT) X-Received: by 2002:a62:e90d:: with SMTP id j13mr5892784pfh.237.1572026227414; Fri, 25 Oct 2019 10:57:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572026227; cv=none; d=google.com; s=arc-20160816; b=fJo13RBCmri8E18vE6uTggoa5sLQtsqajNcGSJ94Z5vzXtqNV68NCYit5ft3ycSk31 C1NgAMSS+6ErNzAJiKEa3vtKRAmaSblcnofVgYvSdvZ0ZZOEZaOPE5HjnIqr3hc8ANVm i+FhpTSUsxAQATI1iLyYLsC2i/GUPoiti/UH8v5bqCi2i7ZoL7tlJYBeSHDaABd1IgMq A3kvUPVySYrIuxk4oPwrCOF7bV8igwRsc/iy4yDElJ7Ie6lo/ALf9hmJFxK9Ugp6UUtr pdlOeCm1TK+dk0lUM78FYFKhp+qS2NrzWPlwVWtftQGG5rsQVsX/4F+rHOVl90s13ujo LFow== 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=P3Mki6uub+NAK80E3ntfBcsFK0xNEI4Pl6xkUsSgIeM=; b=PO1cIE6IhOp50hrU/H3AB6z5W8NfiHuhwbwHh13qVV8c1bY1T4jRCoK0UvYpQb/vn5 a9Xk1jL7XzDAxF6jszIK+nX+zC+PeMHyRSBz4NNT/N6yc1jhn2wWqxvVrxkjJytl/die dyOYShW/IKlMAEhMOZZgZto2rSJFIW3o6lAQw66HTo+KyzmETDIAkj+jZiDJZV7jVg/d YG48I2z88mskxVGGD20rGSBcKzf6qCx/TVFr8O2SRKqACv5+oUSAuFfz4Ask0oGNIrhN 3BIHNlbKBOFh8T4fFEf6xnA33ZSUisxpnanbtx6vGPrfxzdfO4z03NGAvA0YOmFV8w7T sUQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=i3MIHeuY; 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 g8sor3068540pfk.3.2019.10.25.10.57.07 for (Google Transport Security); Fri, 25 Oct 2019 10:57:07 -0700 (PDT) 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:58c2:: with SMTP id m185mr6044311pfb.10.1572026227045; Fri, 25 Oct 2019 10:57:07 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.31]) by smtp.gmail.com with ESMTPSA id n15sm2926580pfq.146.2019.10.25.10.57.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 10:57:06 -0700 (PDT) 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 v11 4/7] =?utf-8?q?drm/sun4i=3A_dsi=3A_Handle_bus_clock_ex?= =?utf-8?q?plicitly=C2=A0?= Date: Fri, 25 Oct 2019 23:26:22 +0530 Message-Id: <20191025175625.8011-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191025175625.8011-1-jagan@amarulasolutions.com> References: <20191025175625.8011-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=i3MIHeuY; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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. To support this kind of clocking structure variants in the same dsi driver, explicit handling of common clock would require since the A64 doesn't need to mention the clock-names explicitly in dts since it support only one bus clock. Also pass clk_id NULL instead "bus" to regmap clock init function since the single clock variants no need to mention clock-names explicitly. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 8c4c541224dd..eacdfcff64ad 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1109,7 +1109,7 @@ static int sun6i_dsi_probe(struct platform_device *pdev) return PTR_ERR(dsi->regulator); } - dsi->regs = devm_regmap_init_mmio_clk(dev, "bus", base, + dsi->regs = devm_regmap_init_mmio_clk(dev, NULL, base, &sun6i_dsi_regmap_config); if (IS_ERR(dsi->regs)) { dev_err(dev, "Couldn't create the DSI encoder regmap\n"); @@ -1122,6 +1122,12 @@ static int sun6i_dsi_probe(struct platform_device *pdev) return PTR_ERR(dsi->reset); } + dsi->bus_clk = devm_clk_get(dev, NULL); + if (IS_ERR(dsi->bus_clk)) { + dev_err(dev, "Couldn't get the DSI bus clock\n"); + return PTR_ERR(dsi->bus_clk); + } + if (dsi->variant->has_mod_clk) { dsi->mod_clk = devm_clk_get(dev, "mod"); if (IS_ERR(dsi->mod_clk)) { @@ -1196,6 +1202,7 @@ static int __maybe_unused sun6i_dsi_runtime_resume(struct device *dev) } reset_control_deassert(dsi->reset); + clk_prepare_enable(dsi->bus_clk); if (dsi->variant->has_mod_clk) clk_prepare_enable(dsi->mod_clk); @@ -1227,6 +1234,7 @@ static int __maybe_unused sun6i_dsi_runtime_suspend(struct device *dev) if (dsi->variant->has_mod_clk) clk_disable_unprepare(dsi->mod_clk); + clk_disable_unprepare(dsi->bus_clk); reset_control_assert(dsi->reset); regulator_disable(dsi->regulator); From patchwork Fri Oct 25 17:56: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: 885 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 956C73F0E1 for ; Fri, 25 Oct 2019 19:57:15 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id c8sf1973819pll.12 for ; Fri, 25 Oct 2019 10:57:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1572026234; cv=pass; d=google.com; s=arc-20160816; b=vZrx2UuPfk86oBFI8oBnn8rwbtel5m1FQpg5UPHAOT7V3EP1esmBy05wlGt54XoR4/ TR2FnFcD3P2sapOyS70WUqnqiJKBt4Vi6Rved0tnaKTL3CdKPy2qwi7pIQr3t/IWGm3u 7pask4BS4l28xxa6zc8iCgebyUFG7zqhLeX3nHVzgO1shEDCvVKMtewKdqN0HiPj0DBH kLvn2iHSMM5FnwHohZURM8piA+1ASrU+MUqDdjdJ5MK/DQ0no9OuUE4p/twIVfIPkg9V ixoPnNKP85kHCVKKLJmg9du+DHzRxCsAOV3AE5S+rfY99KoeYxI3GAX+Y0KOYPuWcBXP 8kCg== 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=1b96Ru4YUeEI5TmnQScaAW0Gtc+pm4TYnUoiOTMgC9Q=; b=jXe9xx2XF1GZZWIkmhUTguz17PXyqKJNNLtVjTvtVZh4C3Oj2BnxubCwqGrk5V5thC ILoH1VF/N2MlXSKZoSSlhPuzx5iFAV8FfdZZYPBtYuzhDwZzW3wxis3iHWlmr3Ou7qnP PR9L5bOUym+ZZXMYcHPR2YNtgComxMUO0SUamd6MfhKzx2SnJwHeyqVTJS+xv8XzFILt rWcY3UgD1tovGUdASeUhn9HrNv+jE9Zi1z4dFf3fmj9XVWZXBV16clJCItIfmsYQP6+z JjKhzoxeJi/erauLlXwqDMtXcUbJGO4fqt7qjgh7dvblkZF6li6O1uDNBAATSwvyRzEZ 32jw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GCFIrxMG; 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=1b96Ru4YUeEI5TmnQScaAW0Gtc+pm4TYnUoiOTMgC9Q=; b=SmpfPM9qPRf8zHgaCiKwvoNNtBhaH+kFbfQOP0GgMeVMU0YtAFNl/gMlW1fKcWQi54 mxXD4Av0TzgMYIZncIWqWKB+W6GY4Y9vWLW1YY9UEhBss6cqFJ4kC04kXtWojTIVc/qa t2NV9yNJQF3dvm7Vpkp/tLqba4bYddOA18TTY= 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=1b96Ru4YUeEI5TmnQScaAW0Gtc+pm4TYnUoiOTMgC9Q=; b=beCmOSd8UNcZdhNuAEslRq/tYhyEENfq3EMC7wJp2BlXsnYOFO1RFAhpxMOsuX9Y1R /gsIds4XF6dzUFu9y0nYhcAXuKzDZqU/tf/rz2zOU3kxRmViSN5P3sbT2URIFLpkX787 VVnlRJcG6jxB5sHblR58Np1qNO6sjs8VM5uqMte74RizR/l/55eVIddQDQbOK/q/io3v CsNDGoVdHmMGH71/qEd3HOICcJodx2pkm5uG9InG4xoODQjAKpHvdwoTsX4MSs8AslzC tmGyGV1dOHR8XfB42um0SaOK8YygdEBFZNkabU7KGzABdLaWcD4jN2JwmIwGbcf/fVJR V6yQ== X-Gm-Message-State: APjAAAVTcVppMp9WoMq3rENYwZAX4V7bQQb82jR0mEmtlMZKlmCj+ehE 7wLwFr26yEbEK90YYXTEEmAiGHCp X-Google-Smtp-Source: APXvYqwzmAfrp3duEK9Gmhq7TxszMGj5YxhVoSGeNP7snjQUmCkbP0qHIs6KTK7pnvFnTl8Tqgukcw== X-Received: by 2002:a63:f050:: with SMTP id s16mr5880155pgj.261.1572026234298; Fri, 25 Oct 2019 10:57:14 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:454d:: with SMTP id x13ls2960675pgr.12.gmail; Fri, 25 Oct 2019 10:57:14 -0700 (PDT) X-Received: by 2002:a65:67d9:: with SMTP id b25mr5827488pgs.88.1572026233779; Fri, 25 Oct 2019 10:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572026233; cv=none; d=google.com; s=arc-20160816; b=QekTnC8w3BTkpKaa45Z5LMC2DtLdFEmxVyjkvC8Y9qCbNgZqkWBg8OA9yfL7JdcLBQ PbkUp+oDZ8jrSRBp66aQwU15nqeJAOoqZL0GqBknpwstF2OvwzbvwAIZxr8JWZJuH68X AEoJGCNFqsgk0vSI9f6NkFWvbUjdTvNlOzWMA6XOvlYktskxScqAkcxKt2lZUq/gx30+ 8Zb6U2tyQD0jjq169724aclkZ852yrz+ZxsM8n0AH2thVIe7ZDZo57kv/oQ/YiQwXSBy XdeUwO5XjPCnWTK1pJVqQtlO3DljydUbZVPS1TNXEv+Eqzk6t/gYtbTqZcKawGqA7zU6 wpoQ== 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=P+ShWs2FSM+vAO8pDJrhjeu0D2BHwDqE1SNacXjaIBI=; b=QoOQlnyfYrq7bPlt2La1dUOqvi+J9qzl2SqydL/12CuwgCxDgbc79aGiICuChNgZfD xExCKfznuZUuvkQaerNSiJQGdJJ+kDC4M7J4wVgkKuFk35Kp0UUzbY83B1x2jWbuTlOb 5Rv8UK2sPwBwJFKtPolcBdMbRVJT3BPWkB0KzVU1cGWz38mJ5rk46AsvqBNOtuSHf41s qZYA8xd0hR8cdnoOr3LyImCrxOlc8FWmvqhGs6yvRUf+XKVQ2j01Emz41SoYtbFW02iT 0n2bDjSf2cvZ/Lndc3E063XvwKvQKIW4gzo0Y9sra20Wstz8E/x37NFu+loGhXp+Uias koDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GCFIrxMG; 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 g12sor3872054plj.52.2019.10.25.10.57.13 for (Google Transport Security); Fri, 25 Oct 2019 10:57:13 -0700 (PDT) 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:6b45:: with SMTP id g5mr5151240plt.336.1572026233355; Fri, 25 Oct 2019 10:57:13 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.31]) by smtp.gmail.com with ESMTPSA id n15sm2926580pfq.146.2019.10.25.10.57.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 10:57:12 -0700 (PDT) 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 v11 5/7] drm/sun4i: dsi: Add Allwinner A64 MIPI DSI support Date: Fri, 25 Oct 2019 23:26:23 +0530 Message-Id: <20191025175625.8011-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191025175625.8011-1-jagan@amarulasolutions.com> References: <20191025175625.8011-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=GCFIrxMG; 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 --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index eacdfcff64ad..4dda96e0febd 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1251,11 +1251,18 @@ static const struct sun6i_dsi_variant sun6i_a31_mipi_dsi = { .has_mod_clk = true, }; +static const struct sun6i_dsi_variant sun50i_a64_mipi_dsi = { +}; + static const struct of_device_id sun6i_dsi_of_table[] = { { .compatible = "allwinner,sun6i-a31-mipi-dsi", .data = &sun6i_a31_mipi_dsi, }, + { + .compatible = "allwinner,sun50i-a64-mipi-dsi", + .data = &sun50i_a64_mipi_dsi, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, sun6i_dsi_of_table); From patchwork Fri Oct 25 17:56: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: 886 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2633E3F0E1 for ; Fri, 25 Oct 2019 19:57:22 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id i4sf2327407pgh.10 for ; Fri, 25 Oct 2019 10:57:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1572026241; cv=pass; d=google.com; s=arc-20160816; b=XkyFgYzR0Uq4xfCJ/0GbqD9RPwNeT9mxXeZeKToBPp8Tt3ddZd7YpXVnwUk6wyeu9D P3teqH5qpW7ZJoUPROna2TskI3j0ehneblQRtwiorrHqtgrvmQaY605Y7Y3bABRRxCjW jn5A5tBLe3JAn9qoghs7172QOA93LV32ihBhcr6+N42q7+mlqeSa/AzYj1rHCpAOFJjh B4LvpTXNk86MFHUZ6/lL5KXi9Mw3wx/x+gck6OM+1H7HYuP/F8jTqmfVorBFxA5B2DkW HWtW2OrHJ/a+WZ4qru5hRxXS70JPlS/pTGSctmOoB5gMyiSxUpExsMlNo/pfHuqVnDfi mreA== 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=gB6oJVd3RvRUuQ1cem3WA4dDy6oWY+t+86J926J9zKM=; b=bCdZ0T8fXgwRc/UtbHald4yWxbfPJngC8ky1lEMmRxufQOgSNUXLcQYxY9SgKicDg8 BWaLLr8uWhO2Im6tTLjAXj3kXrg7oXfWbQG7jBgctjjNPJxK3Sw/TwHwmm2rHbmXKU0I B1iPlu85zfSrkd5/vM+/Vh/W0dHA+C4yHwQNcAhAJWKr+YYcA5UDadyjQ54KL/cjtf3F ofsnhOLGnloeQmOalGkBb1X63KwDZcULVF4lyw6VMSOaF8DH2WQciVArpT5FliHu6Ub9 qEx12o69LfXXeot19CioUPOtWJnrIegmChXEVUXXwmU+ZrpQRc8AvtGD+hs59E7+vHv4 XwtQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SkOqSdCS; 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=gB6oJVd3RvRUuQ1cem3WA4dDy6oWY+t+86J926J9zKM=; b=aJxrxmnDw7YdqmiH7C6AILeNPF4zmJaoqVIuZG2eDS76DZbRv9/nydN3LDMZST9RcV jZa10pngq2BUM+bhj7Zw3XhNpt5RnrIPaCF+eGV1mhHGo5EjSD96cW7K6JiogzrBv8Us v0KcY+UYU/INmy/Bg7+2rcqIhjhITeqDvCmJY= 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=gB6oJVd3RvRUuQ1cem3WA4dDy6oWY+t+86J926J9zKM=; b=N7TEFyiQNK6jRl0OZjLLDyEVR2boUJCcPf8FWG2t/bSuzpggDgE1p3ghads5CitQmT K4Ph/YPEbKvwFAXXBAqMtqw4O7cuWHo5O3CVT71yv6PnJy4I21EJ61eSa9uICusHuEKw MFBlEESaXVAHqEEkdeKiktSaas08FwfJwUgFGI/p8Ph8F2bfvMVSZvour9rJKyQf0wuJ nahUB/e0r7rcAlRzRDFonklfhYmV8uEu5ktQu/FTyFsaOcfNv4wXChLuWwfNGIUeK6ic bvjbokh2WODZpAk7MsFwA9TeXzkf6yAXeeUJG95R5cnWTZ9/rLCOzEmYsPK4XnrGMsvE wYkA== X-Gm-Message-State: APjAAAWNYs+mlGTCJlA5cVgdGFNqRNpDLwiAeDobTm9RsFXaWZUt+j9p Ss+ln/rWpGOOYPU+Q9XWspu4hlQQ X-Google-Smtp-Source: APXvYqyRoo7JOwXxbr/0qPVXLEg5Tl+Xy/scPc/NP3SSDOSh2VBbD7YZrK8wlXpdMWMCouuXh2hEAA== X-Received: by 2002:a65:5503:: with SMTP id f3mr5920007pgr.351.1572026240876; Fri, 25 Oct 2019 10:57:20 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a611:: with SMTP id u17ls1612375plq.8.gmail; Fri, 25 Oct 2019 10:57:20 -0700 (PDT) X-Received: by 2002:a17:90a:19c1:: with SMTP id 1mr5778472pjj.52.1572026240440; Fri, 25 Oct 2019 10:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572026240; cv=none; d=google.com; s=arc-20160816; b=hu+AISnyAyX7glmztmqR7IFh66Gwa50aBPpd/tyFgqH2bKoi6a8BIIcS5hZsZgkThx 7I2kKkJPTOxZE04yGY4+bHh3prT+1KFuQKZJPi6x39wZshfl0rEbILwFwvDCp3Sq8U8k sKl/1vYqTNVv1XJvlLLbgw1jJ8mhYkpgjGrK0CIZx6kLQZAcYaaXlP+aCenoVf24yRtz RLblI14nWndKnKZsRBPb0DgyKeoHGsXLAgIwIlpMh6PMHDPdBeQHOHLipKzQqU5hdlka MAFNRY6MPAYuiE1MaBrmvzdTKpdE4OiPE1Hi8vWaBTn9U5vPMc63Ondiwcd/bUirsFL8 Ktgw== 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=hB0pIIBATDj7XQ4Wbz8E3uJD/S6VmCRjrZ4dOAWqf50=; b=xEAD7+ymk+sNbbnvOExJRnQaprfvezVGOl+imn8gkoxE8+tP6hDGO+ktqj+KFtYJ4p 3UwC5Y19NiDWn+Vmq2xOg5lwGvDOhgAO+XDbdfhwnKInOQXRgDYhxI11DrGU73yAhWbU P6/sfRE2FndERNGqgOisU7INJgmRm3Be3jeyWf2nXysdyb6XfaH3LE7z8JrgZnttMcSv gKTy/RwqzDaqtDozZzSzsBlJnCfZAc7iK0vNjyvDfmFaufIYBXqVHfHQcOSH1MKmasrj jLeuQGim9imivqH2YxAXQEj1fzVU/4CLU/7JwCvblxbG3kpWSNXB78dj0tFx+/mr7Sxd gXng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SkOqSdCS; 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 a30sor2817837pgb.48.2019.10.25.10.57.20 for (Google Transport Security); Fri, 25 Oct 2019 10:57:20 -0700 (PDT) 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:5949:: with SMTP id j9mr5883267pgm.371.1572026240010; Fri, 25 Oct 2019 10:57:20 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.31]) by smtp.gmail.com with ESMTPSA id n15sm2926580pfq.146.2019.10.25.10.57.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 10:57:19 -0700 (PDT) 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 v11 6/7] arm64: dts: allwinner: a64: Add MIPI DSI pipeline Date: Fri, 25 Oct 2019 23:26:24 +0530 Message-Id: <20191025175625.8011-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191025175625.8011-1-jagan@amarulasolutions.com> References: <20191025175625.8011-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=SkOqSdCS; 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 --- 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 69128a6dfc46..a52dfa98ac5e 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>; + }; }; }; }; @@ -1003,6 +1009,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 Fri Oct 25 17:56: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: 887 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 E726E3F0E1 for ; Fri, 25 Oct 2019 19:57:27 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id x8sf1971908plo.17 for ; Fri, 25 Oct 2019 10:57:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1572026246; cv=pass; d=google.com; s=arc-20160816; b=jVRxnAEBoAUZ5uHUV9os4hsz09cqp+Aq40Gg10YpcDrRJRHCXiO5RQ/QmiVUj0o9lg PGugf8erslh6bQsu4PGUl/6oO0K3frmTfoGDVrLGrIs9l1L4+7g89YLDkKnV3zB6xkNz 3x7kZ/siJPjarZJz6mTa+2+3IaNCU6kfw69Jgrq1IJ6Z7rDQHgRzsOOc5jWVy2tEj6w8 J/YXaE1jkDuAVNWfC6fhyr1kQPjCgvfK10ZiBBid1q45C9clZ0q3W9kCszzzEDkqfEFK HSaevFT4mlhdZ6t5/RpXiUrLAdyUThvhclFcD4go/aTnHT88XMcwxQUOGNe9dnSPPzz5 99Og== 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=FghdHRUaEn73EmTlEGw0J8ubkxbq1janRDvfGT6tSIXtiQ2/XvlCJ5j62fYSBSIwPf sOBXeuVmU0yu4qtge91yDQupvcsprw/jOFgYA/UB4gcREGbMqgw1BDShyWBqnpR4q3xD 7+unbp1Eya9rTtPtiSaoOqNBqXH/oFCacrbHcrCPPgeXuo4G8FZEBr7eWLJL7Dunt+4F 7qwzxJhcop2A6Cld6MvPdFLXSRB/ogyYlppTVU8nRcB12p8CfTVU/lJTORCm15RYXoAG JyC8TOLfhPhBbSHinZB87nTxmIURBGCPVB6TSfiX9gRtBhdAARhXTMwws5CWeVBAOja2 o1Og== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gweTI0Ly; 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=AbrzonVDLqa/qHB1Q/DYZnklbSlXZ4nepgsG+ORd3zL/jBHC2wyTJ63TVw78pZb/ez +kQVsRep+S4Dif9WYBEbDhJNjdH3LqXhKqjkflfZibuKhAeHZMbUGTvgwoe+2YCVdjNn VkEYwNX3zo/sLZh6vJkRMadEvrp2ZLbkJtvow= 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=SigI37qYrEEs2ZaeRyF0PUcneOZ/TFGl6az/LaXJ/ors8YVtrcnZQqmuyIczzQKgW1 ajex/ccdwSN1K9xVSWoazdrhFfdLUUEMu7kZ5rblVPwy4zp7ZTkdvEFvJZ1oBHRjZwy9 a/2S/ZSB+6dOTbiDZmJN9iid6C1RX/G/5y2/G3Y/0lCeL5AyzdTLFOTlGpb7gwkUwKWe mrkj9qsAcT8egxrtsgfmK8uGfzqqR+MY/qLls51IsK2RbSfIVGGprs4UW8LkMSWbSKXp DjyjdlCvA+AfhZiC36vVQDi+dGj2dlo7DhpaAdIlgcMKZNT4y/5uYW+LM5MuENnbm1gD xPYA== X-Gm-Message-State: APjAAAV1k7gR+ilc4O4nadxJQt69ogIrbFL7T1CJ0Zs07ZC7g0M2xzUO FOVPulmVtVKjgH0aN3WYlTZVmU99 X-Google-Smtp-Source: APXvYqwS7ZK8GkuekBn53+kjUK2sLDXwlmrZoN65d0UQRgRWB6rsXJXvBdiQMYQ+NIFdadBFycnlEA== X-Received: by 2002:a17:902:47:: with SMTP id 65mr5236941pla.81.1572026246721; Fri, 25 Oct 2019 10:57:26 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a611:: with SMTP id u17ls1612422plq.8.gmail; Fri, 25 Oct 2019 10:57:26 -0700 (PDT) X-Received: by 2002:a17:902:d70b:: with SMTP id w11mr5389657ply.128.1572026246324; Fri, 25 Oct 2019 10:57:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572026246; cv=none; d=google.com; s=arc-20160816; b=cVx/vnbaKZymqyYnMk/MU2lYPFRlvLMIGlhzCxaCnTGCoepunPEMVtM4SfVkZ2OzGM mUOsY5p6oFau3XPRoCVj6QNK4BYSOFrEYXtuQrbdw/NkdvtTipsDxmGwZaF6e0cYdxKG QUd8+MlJg8WaV1VUe4cHakrPL3+6PzQ1e2jxailfadMnJD96FvXIaOQ4jWaL2XD86PL+ 9lnOkufsHJgm4xkaOGFihdppeHI+8qz/sZcCN7tgjUTKhu1Sl4R8gQyY6IT/Fzz+eVwz Td3CsPZ0SSEcFnoQtaoF7cwFHFWmBwsQ3+WPZBsW+1tkZd+eyVla7c6m/aEdBBSZUk4r rRBQ== 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=gJa1p1UfTvHJi6FK+J6wsoIF1zD05EaBJUWl7XuiFBLgiBQxm7mrYqnvWnxED2yFlY g1twruhppZBzMX+YcqZqf2dzvfN3nMwHsbwUNfwrQpA+LRq7ug2/cJBuyxph8S9c7BUy IjOVB5+PDpdal64dudc6Ou8bx6pwaJ/LhxapZMp1kn3WHPF7dGMpzxe1BMS+fdrqAMFa ibqaPIbgvQpFR4XdVnZ/pT4XwInpskbUHpH9fKeeu90vNBK4OLvQC7XBiDj7sypMd5QK +p/9BE35k0QHhfW0FaPYBf5cG+7uwSRdFcm4RdnxVwgTKkY39tJBUpxAWty2UCJYig/U 4JXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gweTI0Ly; 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 g8sor2729820pgn.77.2019.10.25.10.57.26 for (Google Transport Security); Fri, 25 Oct 2019 10:57:26 -0700 (PDT) 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:9d47:: with SMTP id i68mr5939677pgd.28.1572026245814; Fri, 25 Oct 2019 10:57:25 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.31]) by smtp.gmail.com with ESMTPSA id n15sm2926580pfq.146.2019.10.25.10.57.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 10:57:25 -0700 (PDT) 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 v11 7/7] arm64: dts: allwinner: bananapi-m64: Enable Bananapi S070WV20-CT16 DSI panel Date: Fri, 25 Oct 2019 23:26:25 +0530 Message-Id: <20191025175625.8011-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191025175625.8011-1-jagan@amarulasolutions.com> References: <20191025175625.8011-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=gweTI0Ly; 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";