From patchwork Fri Jun 16 07:36:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuijing Li X-Patchwork-Id: 108912 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1155601vqr; Fri, 16 Jun 2023 00:50:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4JmPALGHOA+kjMKq9Blpu96N8TOE8qFqsiIgjBccPe6v2h/JeCehMKflHp91oHcflsbhQP X-Received: by 2002:a17:902:82c1:b0:1b1:b0ec:462d with SMTP id u1-20020a17090282c100b001b1b0ec462dmr1107675plz.39.1686901800702; Fri, 16 Jun 2023 00:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686901800; cv=none; d=google.com; s=arc-20160816; b=k0DGS6OTBwu5LzC3aqffuk1NhO3r6PUS9KbE6QYXTc7Roy7dTgQ7mXpixicyv4i7a3 B4amU72j3AyaJ3aLA+ARfFSLREForBhsK3j3qRHdICdZWVywMHluA+QnJv9LEj1Gc739 NRpg0/x/H0/TppUJdShB5idKIzScIsItRbX9gOkNTfIx+VTZ9qqfGJWr99O5sthpB5xr Hile/EXtiqDKIgFMamSf74dInf35vUrz9rDQzLZnRCwkGFASh4Mzfj08kXI5t6GSkHZ2 f1tt/j47AV/iEyUFW7x2O57BFVuvJLr7/QH76Wkny/VkI4Lvo4rZB5fZr+vSsjjLisJl kX+Q== 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 :dkim-signature; bh=wUb2/l7uxGweZcWNTtDK9wWcO4mCWXR5e1Pi3hwu3aQ=; b=muOejWmqqrrf9TaJEUrdIgUwJlFl3vcQlugH+ywYahWeJhM7PwduFPC2UvHkHAKlqh 7sDhhCQpzcHzFOGEQZS0LeIr2Uc+pn0DfosyCYnbhdAovVYSrRlD/YR7aB/j3yQ2isB7 DMhYN/4jOlFqZG7ML3asTR9X3jva278SUIbhHAq9u4hT7xhdXrb98sPCjV7rsOft3PQp I1dmSnor3+Wcqo16gKg+jU0rBL75Pud8XOG8evUCGBeTFI6Ms1+f2TfQvindRycoeNBF qBp7/EFOMZpgabZiDWyOhtyggzMfnkpJ4yIeHAolQye4tP6vTrrN5F+RJKdrGL61yphZ QpeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=sEo0IrKZ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id km7-20020a17090327c700b0019e57f5a5aesi3590501plb.567.2023.06.16.00.49.45; Fri, 16 Jun 2023 00:50:00 -0700 (PDT) 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=@mediatek.com header.s=dk header.b=sEo0IrKZ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245219AbjFPHg6 (ORCPT + 99 others); Fri, 16 Jun 2023 03:36:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245173AbjFPHgw (ORCPT ); Fri, 16 Jun 2023 03:36:52 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7390B2110; Fri, 16 Jun 2023 00:36:45 -0700 (PDT) X-UUID: 883ef62e0c1811eeb20a276fd37b9834-20230616 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=wUb2/l7uxGweZcWNTtDK9wWcO4mCWXR5e1Pi3hwu3aQ=; b=sEo0IrKZ8mwPn7eqx0qAfGqTfQy2aHXAJo7hKxdGFmcqPLdqqs+Of+/tzVKxtDtil18HXr25r0nb77uXkz31sCcoPi/oTudsu0LuVCdlBrHPRxdI1q95wH8bXgn821ZPseDxk82Mti4jzqQq9Xc/Tv9VINxM1/o9OiqcVjv+ExI=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.26,REQID:2a518d37-2f38-4ca4-b39e-b9706ea569dc,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:cb9a4e1,CLOUDID:4b3bd23e-7aa7-41f3-a6bd-0433bee822f3,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR: NO X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULN X-UUID: 883ef62e0c1811eeb20a276fd37b9834-20230616 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1100924905; Fri, 16 Jun 2023 15:36:39 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 16 Jun 2023 15:36:38 +0800 Received: from mszsdhlt06.gcn.mediatek.inc (10.16.6.206) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 16 Jun 2023 15:36:38 +0800 From: Shuijing Li To: , , , , , , , , CC: , , , , , , , Shuijing Li , Krzysztof Kozlowski Subject: [PATCH v2,1/3] dt-bindings: display: mediatek: dsi: Add compatible for MediaTek MT8188 Date: Fri, 16 Jun 2023 15:36:57 +0800 Message-ID: <20230616073659.26536-2-shuijing.li@mediatek.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230616073659.26536-1-shuijing.li@mediatek.com> References: <20230616073659.26536-1-shuijing.li@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,URIBL_BLOCKED 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?1768844742611511700?= X-GMAIL-MSGID: =?utf-8?q?1768844742611511700?= Add dt-binding documentation of dsi for MediaTek MT8188 SoC. Signed-off-by: Shuijing Li Signed-off-by: Jitao Shi Acked-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger --- .../devicetree/bindings/display/mediatek/mediatek,dsi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml index 4707b60238b0..13fa76299254 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml @@ -29,6 +29,7 @@ properties: - mediatek,mt8173-dsi - mediatek,mt8183-dsi - mediatek,mt8186-dsi + - mediatek,mt8188-dsi reg: maxItems: 1 From patchwork Fri Jun 16 07:36:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuijing Li X-Patchwork-Id: 108906 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1154714vqr; Fri, 16 Jun 2023 00:47:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4/mK549BuS42x2TP7XRXA3SViv0y+H6dW0PdM7HdOJWtkRiOO76yBU9dplf//v0wF+GZON X-Received: by 2002:a05:6a21:3810:b0:101:4e04:cef1 with SMTP id yi16-20020a056a21381000b001014e04cef1mr1508327pzb.27.1686901651264; Fri, 16 Jun 2023 00:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686901651; cv=none; d=google.com; s=arc-20160816; b=XPRdrDRs2b7fUsHWL8sHXs6ikzEM2o5mRq7rvUahPcVGCaCLeTFjWmTSonUCgzRIy0 TE8avK5QBInR/wXkLdBEQEYAjEy2qgRNqoQfBBVbrKy+HaZT4gJnHDez0Oz9qIrRW8Ga pib8F/GRSPnql9Wjx747tGuY+geLxhzRnFgkyR210Sbmj+zSqHSaz//V7dV88nlDysCu ir00td63FVfHlU+2Q7lJBM2XhO7KV7fPjpEXfIQ2V+jmGq+oMkrxcOBxrmOagScPa4L6 LTOP9nImKdv5cC73dImz75rgWvpSKmN5w7orD02t5Zha1gcZoodwp6ELDeT34KFG8YGV irOg== 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 :dkim-signature; bh=NxnEBQwkRhC30OSvz13RBHmSVv8KkGyGLWkMchMmH/w=; b=Q3UYLC5sxj0mg55E4qPxy5NCWw5T9+Fv58RUUsAAhsVJdE4gn6EEq1CCgyKhg4hmgO Klon62wkegy1pQ3bKaL99wgOuZ3BEaS9RgrMA+wZEcrkAUODJB1dfAQ7aZiBRQs+Eav9 +SlHniq8ZvSZ+FCimWqWclALcCuENnCrD+g+VHLI3odKzlDVM8bkshIn+hv5MTg6X8nK 2gq0rNeJQaxW/dmk1Hkyn+awRHDxFbjKDeJepfWpC1PY5niyCIyB8X155cCx7BlkRZSs 1k75B6dP7PfmyHvcKoVSW9ZJ3u78FpEV7izhk5wMqbCW9zUCzcmN4tX56Kt+udTGQt4b sU0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="SOYW/bam"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ky3-20020a170902f98300b001b06038e1b2si8104351plb.546.2023.06.16.00.47.16; Fri, 16 Jun 2023 00:47:31 -0700 (PDT) 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=@mediatek.com header.s=dk header.b="SOYW/bam"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245211AbjFPHgy (ORCPT + 99 others); Fri, 16 Jun 2023 03:36:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245121AbjFPHgu (ORCPT ); Fri, 16 Jun 2023 03:36:50 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31A281FE2; Fri, 16 Jun 2023 00:36:43 -0700 (PDT) X-UUID: 887ea5080c1811ee9cb5633481061a41-20230616 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=NxnEBQwkRhC30OSvz13RBHmSVv8KkGyGLWkMchMmH/w=; b=SOYW/bamjr8uqTSv4bDXayg7TfHRJOfM5TXJjwkHYVMpDPMWI2wfRMwY01FPma3YjwLOC5ZMk6rIlq5SITijpc6pkWzKeVhjpz+pkYnqOq4N0Pxv2WU+EshCiBgWdoT5u2MLPX7WA9X+Mi/zHZN5uPxtr+/oQUdqIhDDVCKa+7o=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.26,REQID:d98d734b-e290-4a66-86ae-e8d63f1c6bab,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:90 X-CID-INFO: VERSION:1.1.26,REQID:d98d734b-e290-4a66-86ae-e8d63f1c6bab,IP:0,URL :0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTIO N:quarantine,TS:90 X-CID-META: VersionHash:cb9a4e1,CLOUDID:553bd23e-7aa7-41f3-a6bd-0433bee822f3,B ulkID:230616153641FV2FJW8E,BulkQuantity:0,Recheck:0,SF:29|28|17|19|48|38,T C:nil,Content:0,EDM:-3,IP:nil,URL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,CO L:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_SDM,TF_CID_SPAM_ASC,TF_CID_SPAM_FAS, TF_CID_SPAM_FSD,TF_CID_SPAM_ULN X-UUID: 887ea5080c1811ee9cb5633481061a41-20230616 Received: from mtkmbs13n1.mediatek.inc [(172.21.101.193)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1037265942; Fri, 16 Jun 2023 15:36:40 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 16 Jun 2023 15:36:39 +0800 Received: from mszsdhlt06.gcn.mediatek.inc (10.16.6.206) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 16 Jun 2023 15:36:38 +0800 From: Shuijing Li To: , , , , , , , , CC: , , , , , , , Shuijing Li Subject: [PATCH v2,2/3] drm/mediatek: Add mt8188 dsi compatible to mtk_dsi.c Date: Fri, 16 Jun 2023 15:36:58 +0800 Message-ID: <20230616073659.26536-3-shuijing.li@mediatek.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230616073659.26536-1-shuijing.li@mediatek.com> References: <20230616073659.26536-1-shuijing.li@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR,UNPARSEABLE_RELAY,URIBL_BLOCKED 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?1768844585673338139?= X-GMAIL-MSGID: =?utf-8?q?1768844585673338139?= Add the compatible because there are different definitions for cmdq register bit control in mt8188. Signed-off-by: Shuijing Li Signed-off-by: Jitao Shi Reviewed-by: Matthias Brugger --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 ++ drivers/gpu/drm/mediatek/mtk_dsi.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 6dcb4ba2466c..0070894d0148 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -764,6 +764,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = { .data = (void *)MTK_DSI }, { .compatible = "mediatek,mt8186-dsi", .data = (void *)MTK_DSI }, + { .compatible = "mediatek,mt8188-dsi", + .data = (void *)MTK_DSI }, { } }; diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 7d5250351193..500a3054282d 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -1208,6 +1208,12 @@ static const struct mtk_dsi_driver_data mt8186_dsi_driver_data = { .has_size_ctl = true, }; +static const struct mtk_dsi_driver_data mt8188_dsi_driver_data = { + .reg_cmdq_off = 0xd00, + .has_shadow_ctl = true, + .has_size_ctl = true, +}; + static const struct of_device_id mtk_dsi_of_match[] = { { .compatible = "mediatek,mt2701-dsi", .data = &mt2701_dsi_driver_data }, @@ -1217,6 +1223,8 @@ static const struct of_device_id mtk_dsi_of_match[] = { .data = &mt8183_dsi_driver_data }, { .compatible = "mediatek,mt8186-dsi", .data = &mt8186_dsi_driver_data }, + { .compatible = "mediatek,mt8188-dsi", + .data = &mt8188_dsi_driver_data }, { }, }; MODULE_DEVICE_TABLE(of, mtk_dsi_of_match); From patchwork Fri Jun 16 07:36:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuijing Li X-Patchwork-Id: 108909 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1155076vqr; Fri, 16 Jun 2023 00:48:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ64lhImfhCR0xrTuI5BPcPdYoxO5RWQrgmkHoIXxmHClXM4E3aiQ4N8S1UVoxfavZ+FqaJA X-Received: by 2002:a17:90a:408d:b0:25b:abe4:fef4 with SMTP id l13-20020a17090a408d00b0025babe4fef4mr1413700pjg.18.1686901707061; Fri, 16 Jun 2023 00:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686901707; cv=none; d=google.com; s=arc-20160816; b=D4WcbQXUSVdnBCh3EzPEdtzsGiPq5yc0KmTMBBWOJUv1+aRppo/rNLQhPXm6gLl5F7 Vt6EoplCL1hHTuTGFdbS1+PRCcQ4nGqvCnAT9A/Lan7AqXCTXwBdRe0EgT65RnmYCRSi mJY2OJaj32EG0KuEtjBeM5sOluCMdRBbU1/uYMQMV1SgAUJbZoUbRSfhlH7Oqu6LLpXf NeYrPDumRiRtpaFqtAdeOOOOpf5UUygBiovqDgULWuyAsyQaE7hPMK1htpIJUhDyv3Ci 1aKe9UY2bTWRQKPrWTSW+glgg4w42IeOhsRWIKLsUQ7H+ZSFDQCjhb6j14/sWu/wNO3k aZUg== 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 :dkim-signature; bh=hSlQPaorM1P9B2NSyWEK4oYVFDuqaVKAFs4EBFP55OY=; b=MCgewl0eaL16emqCms7YM85YkGvyX6TrKC9/T32KQQgwwRhqAdEln+yaX2UFxbNGns qsXqadC+RpQ6UQDTrUIHhrSbGgY9lzy0pnaHaWORbpVtp3vBRYMY2cnck1T+6m9qnNkV JI+TI9n7VabJVw28Hbxw3Qhg89MldENBMjqhJJfkQkomOXxMXc2G/1dcwFOK6BU7f5ek pIMtp1XMkF2fgfvlQ/yA8eKPyInuuQ5nZB7BKjgvu2e1OiPys6r9qymyanZU+87+SwRI LBV4o74U0ufmk0q2264UdEvnmtbQvScP9M/+4I8xqy7Xt4WcGeI8adzsD3dsrViflBCN RSPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=WTiJcthb; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a17090adb9000b00256bc4aee2fsi1002673pjv.179.2023.06.16.00.48.12; Fri, 16 Jun 2023 00:48:27 -0700 (PDT) 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=@mediatek.com header.s=dk header.b=WTiJcthb; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245121AbjFPHhB (ORCPT + 99 others); Fri, 16 Jun 2023 03:37:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245170AbjFPHgw (ORCPT ); Fri, 16 Jun 2023 03:36:52 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAC83268C; Fri, 16 Jun 2023 00:36:46 -0700 (PDT) X-UUID: 890ab7b40c1811ee9cb5633481061a41-20230616 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=hSlQPaorM1P9B2NSyWEK4oYVFDuqaVKAFs4EBFP55OY=; b=WTiJcthb1wuxnUUmdcBos7MH5qSWiv/HKk60YvQ7FhzYKpCCrzELa0ppzL2+f99pDOZWuyWqo2kQB3XbNXCaf55FAC3VbFhImieDhxlrywsXPsbqfE+6n6vbU7vHK4aZPS7huNRgy73la5jmZdnOLHPdKPfmNmseAEe4YOYjgKw=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.26,REQID:1e526910-c1cb-48a2-8fd4-91d9423821ca,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:cb9a4e1,CLOUDID:ba3bd23e-7aa7-41f3-a6bd-0433bee822f3,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR: NO X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULN X-UUID: 890ab7b40c1811ee9cb5633481061a41-20230616 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 78709751; Fri, 16 Jun 2023 15:36:41 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 16 Jun 2023 15:36:40 +0800 Received: from mszsdhlt06.gcn.mediatek.inc (10.16.6.206) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 16 Jun 2023 15:36:39 +0800 From: Shuijing Li To: , , , , , , , , CC: , , , , , , , Shuijing Li Subject: [PATCH v2,3/3] drm/mediatek: dsi: Add dsi cmdq_ctl to send panel initial code Date: Fri, 16 Jun 2023 15:36:59 +0800 Message-ID: <20230616073659.26536-4-shuijing.li@mediatek.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230616073659.26536-1-shuijing.li@mediatek.com> References: <20230616073659.26536-1-shuijing.li@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,URIBL_BLOCKED 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?1768844644110502061?= X-GMAIL-MSGID: =?utf-8?q?1768844644110502061?= For mt8188, add dsi cmdq reg control to send long packets to panel initialization. Signed-off-by: Shuijing Li Signed-off-by: Jitao Shi Reviewed-by: Matthias Brugger --- Changes in v2: use mtk_dsi_mask(dsi, DSI_CMDQ_SIZE, CMDQ_SIZE_SEL, CMDQ_SIZE_SEL); directly, per suggestion from the previous thread: https://lore.kernel.org/lkml/015f4c60-ed77-9e1f-8a6b-cda6e4f6ac93@gmail.com/ --- drivers/gpu/drm/mediatek/mtk_dsi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 500a3054282d..8b43d9f48178 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -86,6 +86,7 @@ #define DSI_CMDQ_SIZE 0x60 #define CMDQ_SIZE 0x3f +#define CMDQ_SIZE_SEL BIT(15) #define DSI_HSTX_CKL_WC 0x64 @@ -178,6 +179,7 @@ struct mtk_dsi_driver_data { const u32 reg_cmdq_off; bool has_shadow_ctl; bool has_size_ctl; + bool cmdq_long_packet_ctl; }; struct mtk_dsi { @@ -996,6 +998,8 @@ static void mtk_dsi_cmdq(struct mtk_dsi *dsi, const struct mipi_dsi_msg *msg) mtk_dsi_mask(dsi, reg_cmdq_off, cmdq_mask, reg_val); mtk_dsi_mask(dsi, DSI_CMDQ_SIZE, CMDQ_SIZE, cmdq_size); + if (dsi->driver_data->cmdq_long_packet_ctl) + mtk_dsi_mask(dsi, DSI_CMDQ_SIZE, CMDQ_SIZE_SEL, CMDQ_SIZE_SEL); } static ssize_t mtk_dsi_host_send_cmd(struct mtk_dsi *dsi, @@ -1200,18 +1204,21 @@ static const struct mtk_dsi_driver_data mt8183_dsi_driver_data = { .reg_cmdq_off = 0x200, .has_shadow_ctl = true, .has_size_ctl = true, + .cmdq_long_packet_ctl = false, }; static const struct mtk_dsi_driver_data mt8186_dsi_driver_data = { .reg_cmdq_off = 0xd00, .has_shadow_ctl = true, .has_size_ctl = true, + .cmdq_long_packet_ctl = false, }; static const struct mtk_dsi_driver_data mt8188_dsi_driver_data = { .reg_cmdq_off = 0xd00, .has_shadow_ctl = true, .has_size_ctl = true, + .cmdq_long_packet_ctl = true, }; static const struct of_device_id mtk_dsi_of_match[] = {