From patchwork Mon Nov 7 05:35:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 16242 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1850188wru; Sun, 6 Nov 2022 21:36:26 -0800 (PST) X-Google-Smtp-Source: AMsMyM5f548KuZBOFfbhO7ZrWmwksqhGasyV+QDXAMlWeXX76oruuFMlBkCUhVv9B0TNxvlTk1vo X-Received: by 2002:a17:90b:1c8c:b0:203:89fb:ba79 with SMTP id oo12-20020a17090b1c8c00b0020389fbba79mr67092197pjb.92.1667799386479; Sun, 06 Nov 2022 21:36:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667799386; cv=none; d=google.com; s=arc-20160816; b=o1n6jwHgU+i6l34+Z2FzuBScjeYwLaY97MLlg7FEs4hF6k1SFKe4/OqQ8Vqiq89fwR P3RGMj/vJkordcaFjRa9e+FsyTO9SWwJpOVInwX13uS4SN2JtsaZiSKcbUti7lfOkqaH PJ6U5kauRcrKU6IJzTzFgspetebiUVN4Aj5mPaZCEoUiKt2PxTwVRY/4o4NR/+xQw4dH 6pJCu17IyRmsiy7JxSRb+FKlAqXy726BSlAoNsL4sdYP2rvPyFAweYfOpDS/vQXAWHWT UnzvUT+uBej1VrNEcFzfcgK8sTYHupCMY7enZzp5RifOCb9s8pqdWMdAOWsmCHC3MjW7 5/3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=U/ywLtSrQavtT5ylYj1CEGcLt1CRHte7fNbDPyPxvAk=; b=tn6N9G5OQUNTNRdWnSlxCIOkFT1zjia3XMq6aGOLfWV6ElAkzJN/6QErUHpgdNzzFv gsYsvmRnGLsgc1G2pWnx6ryq0+Ps6drt32TrBnVkZ1QtGgL9xHcUGYoyVPs8xohHsNRS 5XUn8z8b+RBGHN0PSSC24Yz1/l58L2Q0MXUX72/rP4blDSaTW2r+F1du3puO9pnrlE91 KHd/5ck9kvUbBJ9E7SiPUsIPAymsDyfCB6Z6OwxCEAYnVuU6+VWC4AyuHUn+kAha31aM gUsCnJ+iC+no6k8jbuJyRb3CZztwN2m4e8sv2+UhA1+u6mMCHG1qNltxjPNcBsQvNAOX 6sSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=kj9zvcWv; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="MI/oacq5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s190-20020a632cc7000000b0045750bb568asi9479001pgs.15.2022.11.06.21.36.13; Sun, 06 Nov 2022 21:36:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=kj9zvcWv; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="MI/oacq5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230470AbiKGFgA (ORCPT + 99 others); Mon, 7 Nov 2022 00:36:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230237AbiKGFf5 (ORCPT ); Mon, 7 Nov 2022 00:35:57 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD242205; Sun, 6 Nov 2022 21:35:56 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 3B67E5C00E9; Mon, 7 Nov 2022 00:35:56 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 07 Nov 2022 00:35:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1667799356; x=1667885756; bh=U/ ywLtSrQavtT5ylYj1CEGcLt1CRHte7fNbDPyPxvAk=; b=kj9zvcWvXLzQX0KtSa JWQLIBtGCuKms9tsRopHUP9j6Y3ew0TqAZBnFMiTkpHWWx9IFviqpHTzo8US8wpW ivz/UIH76R1Fgq9280ALOQkIVyt+PKEHlFlhsy29+3RdBHnE9DiYl/JCZTa47SrG 3aAbedVTdqRs+xIjFCBHthcTZOmNARDe+5gCxD5IW0VipW4MYwLfHdpTeyD0mlo7 Ek/6HnW+KD7//lnfXzWx0dVq3+nnfidqoPABI0qyWJ6EIvW16jvHZcFVoiMqg2O6 1wzTv+dXAWHuBGHUHl+AQHrkx0vGaz4/rDNsTLLnQsW+NNnAlzD4ut0aRvJVZIaJ EEZw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1667799356; x=1667885756; bh=U/ywLtSrQavtT 5ylYj1CEGcLt1CRHte7fNbDPyPxvAk=; b=MI/oacq5X9xPoxAcrHyX7aHAfbAgX ZdKRERY8+WbwjFpWaXAS0ZJ5z5SNR726lYEI7S7aK+ITJj1laohrLgKoiJTpUf1w XeJIYwvsoh7kloBrW134DLCv1tO0pNaRaSqedTFhMS9+5mwzXMn12SEupVQulu4j P54gHXBdNUAb7S6e7Q+UBEygmgnB4Gc6UwQfTiIxrGmEkUvvSVcH73UPs6/JhsaR 9Hl5OfMtSsY7Bqn8NH9BaDpTx8hXV6lpePG6gQ9cOn9u7MkMxBTigfjTyKfCzOOc deQYIMiMxsdabLELYwTTHjDvEcDI+RcNxPI72dIMq8z7ZDeHbsCfyAEew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrvdejgdekhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpedukeetueduhedtleetvefguddvvdejhfefudelgfduveeggeehgfdu feeitdevteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Nov 2022 00:35:55 -0500 (EST) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec , Maxime Ripard Cc: Samuel Holland , Daniel Vetter , David Airlie , Jagan Teki , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski Subject: [PATCH v2 1/4] dt-bindings: display: sun6i-dsi: Fix clock conditional Date: Sun, 6 Nov 2022 23:35:49 -0600 Message-Id: <20221107053552.2330-2-samuel@sholland.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221107053552.2330-1-samuel@sholland.org> References: <20221107053552.2330-1-samuel@sholland.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748814409544787422?= X-GMAIL-MSGID: =?utf-8?q?1748814409544787422?= The A64 case should have limited maxItems, instead of duplicating the minItems value from the main binding. While here, simplify the binding by making this an "else" case of the two-clock conditional block. Fixes: fe5040f2843a ("dt-bindings: sun6i-dsi: Document A64 MIPI-DSI controller") Acked-by: Krzysztof Kozlowski Signed-off-by: Samuel Holland --- (no changes since v1) .../bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 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 7910831fa4b8..bf9bfe8f88ae 100644 --- a/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml +++ b/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml @@ -78,16 +78,10 @@ allOf: required: - clock-names - - if: - properties: - compatible: - contains: - const: allwinner,sun50i-a64-mipi-dsi - - then: + else: properties: clocks: - minItems: 1 + maxItems: 1 unevaluatedProperties: false From patchwork Mon Nov 7 05:35:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 16244 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1850454wru; Sun, 6 Nov 2022 21:37:29 -0800 (PST) X-Google-Smtp-Source: AMsMyM5UoRlMh5cQGx3ajT7JWTP+d0NbOLPe8sA68sBwOoXIh3MmDv985ELbYH5X4lHVDQEfd+nE X-Received: by 2002:a05:6a00:1812:b0:56d:74bf:3204 with SMTP id y18-20020a056a00181200b0056d74bf3204mr39920745pfa.39.1667799449337; Sun, 06 Nov 2022 21:37:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667799449; cv=none; d=google.com; s=arc-20160816; b=bhJIKBbJK8JHftS2kiN3LSwV1lsE3tTUsdaUdFCSeRlKg6oSMiK39JResT3mkC6GvL quJ08bl/HQMreWoU+6g/EQZHPZc3FC3cT/20eIcBdAsfYWyffD/NkIoR16PM7d1Jt9wA SgmoW/mgzqMIL5Liq3NzzMCZ5PaJfVgmXHSqyHd6SkwFt+UaN8xeJhLNGMS+2V0rC/6y zGa8lXwBZBp1fipBldy8b0dEVQrZ1B7bbUzoAZWjUqMp3miVyjqCPoDVgoGljMmnK6ly g4xYj+NF++vUFaHYjz/CPMqR2T0SAxiHccuO+cbZUF0vxTEwZ2suM4ZXU2QJscTRUaIF 2sPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=XOS3JN6XNHJjuLSX9mYtAFmUbNNKkKhsMQg7RXfIvl8=; b=lTHjz92DiXNg8pA2WeFmj4mphLRyU+MC00d4npqIhLjXKYqABGFogMaIJCL49XsGZY qYsoJ4BlCRJCPsyfr2san21W9HGGrB16uy0FY0RjQJEg+XW9sE4j/QXKd0VrNkRf/ZuS gIaST7/YQc7Y/pwyE9O4Tpy4/6JxC/Exh8x9Uf9ehbms6BJjrBVJeXHarx+Z3HkPgsVn en5iZkFYiICjehaMdKiXzVMdei7ZrdiNweU8Qwg9wsLPRzZ21+VT+xSJGcen4urYJiEC AdWEXxCnWEmDwfvWpzyGmfkYaFA/XnBLBR9ZGpu7ASRR2h0rvqy0pgZXSXr/qpVLvEh7 NadQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=lcQTpLQ2; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=dTaH4BYc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a630e06000000b0041b7a0b673fsi9023940pgl.449.2022.11.06.21.37.15; Sun, 06 Nov 2022 21:37:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=lcQTpLQ2; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=dTaH4BYc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230457AbiKGFgF (ORCPT + 99 others); Mon, 7 Nov 2022 00:36:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230394AbiKGFf6 (ORCPT ); Mon, 7 Nov 2022 00:35:58 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FA021E2; Sun, 6 Nov 2022 21:35:58 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 76AA75C00E2; Mon, 7 Nov 2022 00:35:57 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 07 Nov 2022 00:35:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1667799357; x=1667885757; bh=XO S3JN6XNHJjuLSX9mYtAFmUbNNKkKhsMQg7RXfIvl8=; b=lcQTpLQ2lKPVay2JKO AA+dZXwjhdR1FAIPE4vfd4d9H5SkVJ5RG1sZjZ4hbIB/qbggMBT66yUs3g3h4aGD uCIyTa5TQp15XO87DcuG1aQyZj9mtgZPAZPb5WjHE2Adkxx7oTLzri3i/bv1fPDm 4w51JMvyDBhCTzwoaSz0S1K6S9AQoWBnpmVKXD16c3/Vss7/Mwri0en+wnyb45Zp +Ox4xC+lOK3j0l3HtEjYrcBg2jcjFLFi1Fr4DgohYtZAsJxztVIg467KgcJa3k3s xtK0eAvhhY9XKaTOWqtFFvgrO5a4DUHGkdADBQ9qRvhM38PRpXz99xkablY3jX5O 7Byw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1667799357; x=1667885757; bh=XOS3JN6XNHJju LSX9mYtAFmUbNNKkKhsMQg7RXfIvl8=; b=dTaH4BYcqDFA+iJYWY4osHn0IA528 daRlsgfbclwP1n5+wDMzhNKMKkhieWDoEkn+RXUFDeBloKfuBLIltQ7iXfQOxTCx ukx17uWmWfLSERGJBAo2SFnWdNp6LIIS8BuLBAztOESAafBxd/Zv9yDTvmPFxK/n 5SfVTqXPdofDOZjtJ1Q4EKmrcpCZuF+DPoa7KtoQW9p+aWWj7LLcRuEcb0qdplIT E14dXws7Wn+A5ZGEbL5qBlm8TRT3TWBpA5Pa8yCADwWwTXhym6JsiOIE/ZyZxwUo PLpzGGKDv1iwVMlaQur+hanuyHV1A6h8tf/EHfXM6XbziPgzNdMGVjFug== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrvdejgdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpedukeetueduhedtleetvefguddvvdejhfefudelgfduveeggeehgfdu feeitdevteenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Nov 2022 00:35:56 -0500 (EST) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec , Maxime Ripard Cc: Samuel Holland , Daniel Vetter , David Airlie , Jagan Teki , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski Subject: [PATCH v2 2/4] dt-bindings: display: sun6i-dsi: Add the A100 variant Date: Sun, 6 Nov 2022 23:35:50 -0600 Message-Id: <20221107053552.2330-3-samuel@sholland.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221107053552.2330-1-samuel@sholland.org> References: <20221107053552.2330-1-samuel@sholland.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748814475508971865?= X-GMAIL-MSGID: =?utf-8?q?1748814475508971865?= The "40nm" MIPI DSI controller found in the A100 and D1 SoCs has the same register layout as previous SoC integrations. However, its module clock now comes from the TCON, which means it no longer runs at a fixed rate, so this needs to be distinguished in the driver. The controller also now uses pins on Port D instead of dedicated pins, so it drops the separate power domain. Acked-by: Krzysztof Kozlowski Signed-off-by: Samuel Holland --- Removal of the vcc-dsi-supply is maybe a bit questionable. Since there is no "VCC-DSI" pin anymore, it's not obvious which pin actually does power the DSI controller/PHY. Possibly power comes from VCC-PD or VCC-IO or VCC-LVDS. So far, all boards have all of these as always-on supplies, so it is hard to test. (no changes since v1) .../display/allwinner,sun6i-a31-mipi-dsi.yaml | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 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 bf9bfe8f88ae..c731fbdc2fe0 100644 --- a/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml +++ b/Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml @@ -12,9 +12,14 @@ maintainers: properties: compatible: - enum: - - allwinner,sun6i-a31-mipi-dsi - - allwinner,sun50i-a64-mipi-dsi + oneOf: + - enum: + - allwinner,sun6i-a31-mipi-dsi + - allwinner,sun50i-a64-mipi-dsi + - allwinner,sun50i-a100-mipi-dsi + - items: + - const: allwinner,sun20i-d1-mipi-dsi + - const: allwinner,sun50i-a100-mipi-dsi reg: maxItems: 1 @@ -59,7 +64,6 @@ required: - phys - phy-names - resets - - vcc-dsi-supply - port allOf: @@ -68,7 +72,9 @@ allOf: properties: compatible: contains: - const: allwinner,sun6i-a31-mipi-dsi + enum: + - allwinner,sun6i-a31-mipi-dsi + - allwinner,sun50i-a100-mipi-dsi then: properties: @@ -83,6 +89,18 @@ allOf: clocks: maxItems: 1 + - if: + properties: + compatible: + contains: + enum: + - allwinner,sun6i-a31-mipi-dsi + - allwinner,sun50i-a64-mipi-dsi + + then: + required: + - vcc-dsi-supply + unevaluatedProperties: false examples: From patchwork Mon Nov 7 05:35:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 16243 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1850297wru; Sun, 6 Nov 2022 21:36:53 -0800 (PST) X-Google-Smtp-Source: AMsMyM7ySzHEO+B6+j+JhL27cqnx/LvKfXnbzD4qgTeCjgISdOvgUek9Qfjjts5Ik41qtczDzwLu X-Received: by 2002:aa7:81cc:0:b0:563:4e53:c08b with SMTP id c12-20020aa781cc000000b005634e53c08bmr48396565pfn.19.1667799412703; Sun, 06 Nov 2022 21:36:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667799412; cv=none; d=google.com; s=arc-20160816; b=mhhTDG+0DJ1X5Dmz1hPyxSsKlhv24ZWwYxRkds4xYYxIXOKmqYXC/UE7WJTMXfIVXd QYzb1FFPaUd0UVBKd6T73Hc1oyI/XA7M1ZJDesjFKZRO/UucioLk5qURXKcS5NPSajdC GeyiqUYMGKwm1VU90p/cFf0APr1WuihcLBSq30X8UuBORoUD4kfYClzWyTOkvwrtxXOp NfUFuPB0JIzT4AuIaM3ETXkzs0ZKHKJ3Q7icuvn08gEyrxextcf+esICzlGpS77Q/qVB Zl3JTN4GscPKTd1TsED26NbJV89FjAhcocWzRJr2g984htoFT0kEXxNHoxF+exHpHKb6 jFJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=hJm3+9Icpv8Ke2FDwmS9fKVqHyT127p94CmAYBoMAhs=; b=yntwVev6nrHdPpKpmPI4Bsk/pU/h/suUODp6usgEYzY1qKui8zDtF1PQP69NpoX4PT ekbhTdhago0iol2hz6VVMQOgiQA0QXJEWtwk3iHsXkYpSupcnYBkKhnEubrE1OpX8v7f 4mIvNddMa/fXaZFFvWboEF36A0H1K9kVdgTsSvPN6y8NBmdPbrHMpzkSeMMmJX1HqV65 4sBo1dRIrcasMrp9DaHmJKR+KZYgdwyxhFClYAKS6FjLRixBoRHWlrTVdf3rW+xACAQc IC/B2PQJ9Vc45b3NceaSHePPGkOssvghfCYjjYhNFjk8CNhTFzgbn5P3VFn2ZIerbAOu 6L4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b="FgmMl/K8"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=nF+Nf6wn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x13-20020a63310d000000b004470e9c2e53si10021724pgx.591.2022.11.06.21.36.39; Sun, 06 Nov 2022 21:36:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b="FgmMl/K8"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=nF+Nf6wn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230513AbiKGFgI (ORCPT + 99 others); Mon, 7 Nov 2022 00:36:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230469AbiKGFgA (ORCPT ); Mon, 7 Nov 2022 00:36:00 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3627B1E2; Sun, 6 Nov 2022 21:35:59 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9DEF65C010C; Mon, 7 Nov 2022 00:35:58 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 07 Nov 2022 00:35:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1667799358; x=1667885758; bh=hJ m3+9Icpv8Ke2FDwmS9fKVqHyT127p94CmAYBoMAhs=; b=FgmMl/K89bVXhV0r/k Kl4jwiLC2N49AAwAKPzJ2B7OYJbfb50Waf6uzgAdDVa0X5hUTfE9PogSj9MsjC8i 8W2n07zunObPqEI6Po1QwlMnUxcGiGzrSIE1dZSOSYlB/aVrI+WzmvE+ekzyroA0 qWWc/Pi5Jd1bwhINzLq9lJ6KZgQriGZMPWZLjvQzZ0fqp8MT14VlIwejU/uek1AX 2aP5cbRb3WDH/j6CTMTCSF/QjbfOjB+oFWYo+lPiARYaKMqvhPIBnQc5FTNPrY8C YntODwk1RsbW62xNf1wDGbEDFIjtbS1dPMX8+zukK/duDE87nNkDjgUbTL+btEDc tPSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1667799358; x=1667885758; bh=hJm3+9Icpv8Ke 2FDwmS9fKVqHyT127p94CmAYBoMAhs=; b=nF+Nf6wnls2jvRTOZjaUWlED1V+aR Jy8tNu79Csij6O2mO1o3j2DL0oPJSo23W6rXcJA/DF7Cy/YI6rUl0uurLqEF/4E6 Bj3rvQQ+gfwmhGs2OotE8l42IBi9lTzCOzwGZDqzcic1OaMFI+gxKNdCaUBJNoie RUX9waLG9+AYSKd6ao4LObBV6qAj7Ivg9guaPEbi12OCNoFsZbwwDBI3R3a9wwmM zF5G6yz8hzrtYkeZRg+vo4bQA185MA2kn3HxMsBZzeFvSe5DqHHOzBPJyoskoJ6g WqZDqD+nbhM0iybCkuFBTAQsvW0t9tvSBANfUE1iih53xfnbFMNM9MgSg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrvdejgdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpedukeetueduhedtleetvefguddvvdejhfefudelgfduveeggeehgfdu feeitdevteenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Nov 2022 00:35:57 -0500 (EST) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec , Maxime Ripard Cc: Samuel Holland , Daniel Vetter , David Airlie , Jagan Teki , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH v2 3/4] drm/sun4i: dsi: Add a variant structure Date: Sun, 6 Nov 2022 23:35:51 -0600 Message-Id: <20221107053552.2330-4-samuel@sholland.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221107053552.2330-1-samuel@sholland.org> References: <20221107053552.2330-1-samuel@sholland.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748814436758878700?= X-GMAIL-MSGID: =?utf-8?q?1748814436758878700?= Replace the ad-hoc calls to of_device_is_compatible() with a structure describing the differences between variants. This is in preparation for adding more variants to the driver. Reviewed-by: Jernej Skrabec Signed-off-by: Samuel Holland --- Changes in v2: - Add the variant check to the probe error path drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 53 +++++++++++++++++--------- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 7 ++++ 2 files changed, 42 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 34234a144e87..f22c96cc8408 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1101,12 +1101,16 @@ static const struct component_ops sun6i_dsi_ops = { static int sun6i_dsi_probe(struct platform_device *pdev) { + const struct sun6i_dsi_variant *variant; struct device *dev = &pdev->dev; - const char *bus_clk_name = NULL; struct sun6i_dsi *dsi; void __iomem *base; int ret; + variant = device_get_match_data(dev); + if (!variant) + return -EINVAL; + dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL); if (!dsi) return -ENOMEM; @@ -1114,10 +1118,7 @@ static int sun6i_dsi_probe(struct platform_device *pdev) dsi->dev = dev; 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"; + dsi->variant = variant; base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) { @@ -1142,7 +1143,7 @@ static int sun6i_dsi_probe(struct platform_device *pdev) return PTR_ERR(dsi->regs); } - dsi->bus_clk = devm_clk_get(dev, bus_clk_name); + dsi->bus_clk = devm_clk_get(dev, variant->has_mod_clk ? "bus" : NULL); if (IS_ERR(dsi->bus_clk)) return dev_err_probe(dev, PTR_ERR(dsi->bus_clk), "Couldn't get the DSI bus clock\n"); @@ -1151,21 +1152,21 @@ static int sun6i_dsi_probe(struct platform_device *pdev) if (ret) return ret; - if (of_device_is_compatible(dev->of_node, - "allwinner,sun6i-a31-mipi-dsi")) { + if (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"); ret = PTR_ERR(dsi->mod_clk); goto err_attach_clk; } - } - /* - * In order to operate properly, that clock seems to be always - * set to 297MHz. - */ - clk_set_rate_exclusive(dsi->mod_clk, 297000000); + /* + * In order to operate properly, the module clock on the + * A31 variant always seems to be set to 297MHz. + */ + if (variant->set_mod_clk) + clk_set_rate_exclusive(dsi->mod_clk, 297000000); + } dsi->dphy = devm_phy_get(dev, "dphy"); if (IS_ERR(dsi->dphy)) { @@ -1191,7 +1192,8 @@ static int sun6i_dsi_probe(struct platform_device *pdev) err_remove_dsi_host: mipi_dsi_host_unregister(&dsi->host); err_unprotect_clk: - clk_rate_exclusive_put(dsi->mod_clk); + if (dsi->variant->has_mod_clk && dsi->variant->set_mod_clk) + clk_rate_exclusive_put(dsi->mod_clk); err_attach_clk: regmap_mmio_detach_clk(dsi->regs); @@ -1205,16 +1207,31 @@ static int sun6i_dsi_remove(struct platform_device *pdev) component_del(&pdev->dev, &sun6i_dsi_ops); mipi_dsi_host_unregister(&dsi->host); - clk_rate_exclusive_put(dsi->mod_clk); + if (dsi->variant->has_mod_clk && dsi->variant->set_mod_clk) + clk_rate_exclusive_put(dsi->mod_clk); regmap_mmio_detach_clk(dsi->regs); return 0; } +static const struct sun6i_dsi_variant sun6i_a31_mipi_dsi_variant = { + .has_mod_clk = true, + .set_mod_clk = true, +}; + +static const struct sun6i_dsi_variant sun50i_a64_mipi_dsi_variant = { +}; + static const struct of_device_id sun6i_dsi_of_table[] = { - { .compatible = "allwinner,sun6i-a31-mipi-dsi" }, - { .compatible = "allwinner,sun50i-a64-mipi-dsi" }, + { + .compatible = "allwinner,sun6i-a31-mipi-dsi", + .data = &sun6i_a31_mipi_dsi_variant, + }, + { + .compatible = "allwinner,sun50i-a64-mipi-dsi", + .data = &sun50i_a64_mipi_dsi_variant, + }, { } }; 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 c863900ae3b4..f1ddefe0f554 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h @@ -15,6 +15,11 @@ #define SUN6I_DSI_TCON_DIV 4 +struct sun6i_dsi_variant { + bool has_mod_clk; + bool set_mod_clk; +}; + struct sun6i_dsi { struct drm_connector connector; struct drm_encoder encoder; @@ -31,6 +36,8 @@ struct sun6i_dsi { struct mipi_dsi_device *device; struct drm_device *drm; struct drm_panel *panel; + + const struct sun6i_dsi_variant *variant; }; static inline struct sun6i_dsi *host_to_sun6i_dsi(struct mipi_dsi_host *host) From patchwork Mon Nov 7 05:35:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 16245 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1851130wru; Sun, 6 Nov 2022 21:39:39 -0800 (PST) X-Google-Smtp-Source: AMsMyM4He1FpREHU7rYmoq2vUZ1mweoqOwTpDnZbQILUL2yq7l+BF7EZIP9zyG5Pya0xrqZOl2eH X-Received: by 2002:a63:894a:0:b0:470:a5e:b185 with SMTP id v71-20020a63894a000000b004700a5eb185mr21568126pgd.585.1667799579330; Sun, 06 Nov 2022 21:39:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667799579; cv=none; d=google.com; s=arc-20160816; b=NGp+YcjavXv6HpynK+7wTXNt4tSi5A3xWndnt0pHqmr2l29OwpIrZ3a6xGFA1RQX4b tmQ8cvVgGOXwPWw6Ghtd3lHhncAO2qzPVTMFGsLkIz91XQmkQmHOIww+WjOoJQYwVmwN OTfFRjB9Hona0ZpN5RM/xq3UyTXY28WlBQnWwReeAmqYuTLEhwEFfrlz7h1phVOO7czL u5BDYYo64MYrgBFhBAXILKrmCHTVEJuoBq0iUW/OIPga1TTFQxCuC5sYaYUOJ33LATHy /jrA1naMeZpwGo1Ytlrah5iWF0bQ9iCo0FsJgzgEeq/0RfWZtFCgl5Y0P3BIVWl+uv5w 0Mbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=CTF3MeYBdYDb9QkjYMGL6Erp3oYYPDieKsIYfX3UM/o=; b=I6n169F8R/3Vut4SET2Af36a7IVTEXP45oWM0JfbJOGjYjW4Wx++B+rtXz4Ll88t8n LcLg4QpY8tjCvsQuy5lSaphCLslmQDs7SdGW7BNjYC4W3cOB4HiBhNxdrrhDC6uyR0DI +A4atfoyN+zSOWqgEq1VuRNWi+/VQkwPWum1iDE1/TvaPcpTGWxj1d+oinWBGhxOaeMi bcOsIBw5VhgPAv94KeBWrSXkcqxBL7AKFqi6Q+a1un+RdrqjZl8Zo1OerN/kvaho9k17 Xs+pu08aNP66WhorV31FKL+rpiIwbvIkUhv71Jttnkw62aYP0RAMGga6W0yVJyW/6uGs WZig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=oztyJd2D; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=hxhSlOjh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d7-20020a056a00244700b0056b01d2167bsi9905920pfj.156.2022.11.06.21.39.25; Sun, 06 Nov 2022 21:39:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=oztyJd2D; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=hxhSlOjh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230497AbiKGFgL (ORCPT + 99 others); Mon, 7 Nov 2022 00:36:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230480AbiKGFgB (ORCPT ); Mon, 7 Nov 2022 00:36:01 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A8FA6461; Sun, 6 Nov 2022 21:36:00 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C40E25C010F; Mon, 7 Nov 2022 00:35:59 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 07 Nov 2022 00:35:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1667799359; x=1667885759; bh=CT F3MeYBdYDb9QkjYMGL6Erp3oYYPDieKsIYfX3UM/o=; b=oztyJd2DwVU66oSlO4 hU2Ylwpd5r1sGPpUVIZgDeVlN1YDysjnKxtHaa5Eog5QGNexxDJUxh7iPO4WBL++ XqHRfDNfAzaXQxVPKm3KUjKI6+6/KZrzopx/A6efEm/VPPqotGYXxk7fOkpnz21o DJffO8LVzKGG26HyVWUGDtulT85+blUv8sbvW5i4AxZ4H8eA6u3Y3pJbDeEZh4FL 2MorhqWRAWmzYckreZAHD1I9x2P0aw/OWMM5GrXXcZC8iD4eNNDUFshOHDzJ1qoz 6JIdDlbRFkVRc6Z+sMAU85kJ2/wBNQYH+5vLeWqhRgVnUo9xbuOWCnPq0oGGvv8d +8UQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1667799359; x=1667885759; bh=CTF3MeYBdYDb9 QkjYMGL6Erp3oYYPDieKsIYfX3UM/o=; b=hxhSlOjhW0zlCMgveB+jr7nbj6mHp ziNeGtdMV4fuZHTiLUT2y7+ZOy4/61VkkNcvW3yR8+JV1nihEsL083adPxSosn/j 4MjY6vOxJ4vFEiUfnENhtsW0WDEa9M1PQUZ4iuF+JODFtDb6BxHCVrM1AHEEHiRh cZpNuxlL8pllUnjBAnu+1ioeKJJOkfKcxPjxXtLcXMmlXYsIG5iBENAK3AePEJ7b HeZo6N7bRMfqxii0x+3KL2x2xG97kT/dUa5Fhgdx42bFJZGzSvVHvugyv0vnk6oC XGwg1Eo0w7VuMRrnc+ltGbazO46gLhWDz0ZvmpgxayWgTD9Yn3VlNag4Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrvdejgdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpedukeetueduhedtleetvefguddvvdejhfefudelgfduveeggeehgfdu feeitdevteenucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Nov 2022 00:35:58 -0500 (EST) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec , Maxime Ripard Cc: Samuel Holland , Daniel Vetter , David Airlie , Jagan Teki , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH v2 4/4] drm/sun4i: dsi: Add the A100 variant Date: Sun, 6 Nov 2022 23:35:52 -0600 Message-Id: <20221107053552.2330-5-samuel@sholland.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221107053552.2330-1-samuel@sholland.org> References: <20221107053552.2330-1-samuel@sholland.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748814611637306558?= X-GMAIL-MSGID: =?utf-8?q?1748814611637306558?= The A100 variant of the MIPI DSI controller now gets its module clock from the TCON via the TCON TOP, so the clock rate cannot be set to a fixed value. Otherwise, it appears to be the same as the A31 variant. Reviewed-by: Jernej Skrabec Signed-off-by: Samuel Holland --- (no changes since v1) drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index f22c96cc8408..760ff05eabf4 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1223,6 +1223,10 @@ static const struct sun6i_dsi_variant sun6i_a31_mipi_dsi_variant = { static const struct sun6i_dsi_variant sun50i_a64_mipi_dsi_variant = { }; +static const struct sun6i_dsi_variant sun50i_a100_mipi_dsi_variant = { + .has_mod_clk = true, +}; + static const struct of_device_id sun6i_dsi_of_table[] = { { .compatible = "allwinner,sun6i-a31-mipi-dsi", @@ -1232,6 +1236,10 @@ static const struct of_device_id sun6i_dsi_of_table[] = { .compatible = "allwinner,sun50i-a64-mipi-dsi", .data = &sun50i_a64_mipi_dsi_variant, }, + { + .compatible = "allwinner,sun50i-a100-mipi-dsi", + .data = &sun50i_a100_mipi_dsi_variant, + }, { } }; MODULE_DEVICE_TABLE(of, sun6i_dsi_of_table);