Message ID | 20230118031509.29834-1-moudy.ho@mediatek.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2119071wrn; Tue, 17 Jan 2023 19:24:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXtLGuRWIs+/5MN3SPrZRVDAIHdnkzTMCV0ftxCWpWEidotfPqhydBy2izI1hUtUlIBZtGYv X-Received: by 2002:a05:6402:3906:b0:49b:c516:72ee with SMTP id fe6-20020a056402390600b0049bc51672eemr6004356edb.41.1674012258822; Tue, 17 Jan 2023 19:24:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674012258; cv=none; d=google.com; s=arc-20160816; b=zd00+Cc/w4fn5kw699L8Hk1dtiXFEsSmEpUC6Tq6vQ3finffYZsdXIRpHcYsZIVIDF az4l7wpJp1OC+jHSWvaNo4kE9uwAs7sYxQN60nr/oa1xdx7BkQpp5J7QgX3yK7LdFwgr qOFqdup/vZjWnZvbsmj4njgYmEmCQYSi0VRn6jDceaOxijYv84u/xK3FS/bUPoLoGYeq z8OjegVyLXVJ9NZU6M9ONMhLqOAPh8/ENEAXF2tCAIubmwwVxww29dAxCJFINScegMg7 G9VWY2J/0fiFupi0e4vS6+zmNAZhwMFxxzONrE45VIO0ODvmjIcjRtwJg6+L9bJf+EAs 0YrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=VYyGa98n/lDxtXIVrq/pkqd0oUm89Hudm4lrrG5jFYc=; b=EQppbZCVOEox61kStczrmNSojqycCBHEmFuUn6pUjRtHnFmNgRDQGNzaNAGxLJo3lz aew9E23rihawcQ/BfyMogQGXapmWGDG4o1hym8l6lZfAE1Fo3nAjiTebTXhpHvnFSTLO OXlZD+oKEqkR+bk1vw3A6G2m4416leeqtx2EkhoSEtgSYwZVFKQJw0m5XGj4xlPwhJQR wS94yi4uX9ptsGb7TxlFGq0nlUddaDYhXfK16keio07nLbluYi0uzIQoQhnf1z43ZX2X 8MIttuqGVAabPnQ63OYTminYRPcrV3ubYka0f2CWFXTArX0NIGREc6TAqqH2PuaN1Hxs 2s7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=tpekYALE; 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 f14-20020a056402194e00b00499e52b07d0si12385557edz.65.2023.01.17.19.23.55; Tue, 17 Jan 2023 19:24:18 -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=@mediatek.com header.s=dk header.b=tpekYALE; 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 S229703AbjARDPc (ORCPT <rfc822;pfffrao@gmail.com> + 99 others); Tue, 17 Jan 2023 22:15:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbjARDP0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 17 Jan 2023 22:15:26 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F2244FCD8; Tue, 17 Jan 2023 19:15:18 -0800 (PST) X-UUID: 517e419496de11eda06fc9ecc4dadd91-20230118 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=VYyGa98n/lDxtXIVrq/pkqd0oUm89Hudm4lrrG5jFYc=; b=tpekYALEOL5rkAc8cDUde3O3hZm5be/DqVQV5BceKbkgopGlSWNbG1PbvYzQmVCQeGG8TnaPDd3dkP7lGFGS4jZCjcEpb88dxoGCLBkP9DbTQiqEF5xX6fjJ0o0HpRo/dVAZCAo4ewPkeLgm4SZhAE68o+SJ0zGSuMod0t+Cyro=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.18,REQID:56a4447a-bb4a-44c8-afb2-34260f8966f9,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:3ca2d6b,CLOUDID:6deb1ff6-ff42-4fb0-b929-626456a83c14,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0 X-CID-BVR: 0 X-UUID: 517e419496de11eda06fc9ecc4dadd91-20230118 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from <moudy.ho@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 503731731; Wed, 18 Jan 2023 11:15:11 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) 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.792.15; Wed, 18 Jan 2023 11:15:10 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Wed, 18 Jan 2023 11:15:10 +0800 From: Moudy Ho <moudy.ho@mediatek.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Matthias Brugger <matthias.bgg@gmail.com>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org> CC: <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <linux-clk@vger.kernel.org>, <Project_Global_Chrome_Upstream_Group@mediatek.com>, Moudy Ho <moudy.ho@mediatek.com> Subject: [PATCH v6 0/4] Migrate MT8195 VPPSYS 0/1 to mtk-mmsys driver Date: Wed, 18 Jan 2023 11:15:05 +0800 Message-ID: <20230118031509.29834-1-moudy.ho@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain 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,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755329078143424561?= X-GMAIL-MSGID: =?utf-8?q?1755329078143424561?= |
Series |
Migrate MT8195 VPPSYS 0/1 to mtk-mmsys driver
|
|
Message
Moudy Ho (何宗原)
Jan. 18, 2023, 3:15 a.m. UTC
Change since v5: - Rebase on linux-next. - Correct the compatible enumeration order in "mediatek,mmsys.yaml". Hi, This series splits patches from the original mailing list below: https://patchwork.kernel.org/project/linux-mediatek/list/?series=711592 Refer to the comments of 0/8 and 1/8 in the following series: https://patchwork.kernel.org/project/linux-mediatek/list/?series=702518 All about the MT8195 VPPSYS 0/1 should be probed from the "mtk-mmsys" driver, which then starts its own clock driver as the platform driver. Moudy Ho (3): dt-bindings: arm: mediatek: migrate MT8195 vppsys0/1 to mtk-mmsys driver dt-bindings: arm: mediatek: mmsys: Add support for MT8195 VPPSYS clk: mediatek: remove MT8195 vppsys/0/1 simple_probe Roy-CW.Yeh (1): soc: mediatek: mmsys: add support for MT8195 VPPSYS .../bindings/arm/mediatek/mediatek,mmsys.yaml | 2 + .../arm/mediatek/mediatek,mt8195-clock.yaml | 16 ----- drivers/clk/mediatek/clk-mt8195-vpp0.c | 58 ++++++++++++++----- drivers/clk/mediatek/clk-mt8195-vpp1.c | 58 ++++++++++++++----- drivers/soc/mediatek/mtk-mmsys.c | 22 +++++++ drivers/soc/mediatek/mtk-mmsys.h | 1 + 6 files changed, 111 insertions(+), 46 deletions(-)
Comments
On 18/01/2023 04:15, Moudy Ho wrote: > From: "Roy-CW.Yeh" <roy-cw.yeh@mediatek.com> > > Add MT8195 VPPSYS0 and VPPSYS1 driver data. > > Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com> > Signed-off-by: Moudy Ho <moudy.ho@mediatek.com> > Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Applied, thanks > --- > drivers/soc/mediatek/mtk-mmsys.c | 22 ++++++++++++++++++++++ > drivers/soc/mediatek/mtk-mmsys.h | 1 + > 2 files changed, 23 insertions(+) > > diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c > index 38f1dd92e7c6..176fdc866e22 100644 > --- a/drivers/soc/mediatek/mtk-mmsys.c > +++ b/drivers/soc/mediatek/mtk-mmsys.c > @@ -88,6 +88,16 @@ static const struct mtk_mmsys_driver_data mt8195_vdosys0_driver_data = { > .num_routes = ARRAY_SIZE(mmsys_mt8195_routing_table), > }; > > +static const struct mtk_mmsys_driver_data mt8195_vppsys0_driver_data = { > + .clk_driver = "clk-mt8195-vpp0", > + .is_vppsys = true, > +}; > + > +static const struct mtk_mmsys_driver_data mt8195_vppsys1_driver_data = { > + .clk_driver = "clk-mt8195-vpp1", > + .is_vppsys = true, > +}; > + > static const struct mtk_mmsys_driver_data mt8365_mmsys_driver_data = { > .clk_driver = "clk-mt8365-mm", > .routes = mt8365_mmsys_routing_table, > @@ -264,6 +274,9 @@ static int mtk_mmsys_probe(struct platform_device *pdev) > if (IS_ERR(clks)) > return PTR_ERR(clks); > > + if (mmsys->data->is_vppsys) > + goto out_probe_done; > + > drm = platform_device_register_data(&pdev->dev, "mediatek-drm", > PLATFORM_DEVID_AUTO, NULL, 0); > if (IS_ERR(drm)) { > @@ -271,6 +284,7 @@ static int mtk_mmsys_probe(struct platform_device *pdev) > return PTR_ERR(drm); > } > > +out_probe_done: > return 0; > } > > @@ -323,6 +337,14 @@ static const struct of_device_id of_match_mtk_mmsys[] = { > .compatible = "mediatek,mt8195-vdosys0", > .data = &mt8195_vdosys0_driver_data, > }, > + { > + .compatible = "mediatek,mt8195-vppsys0", > + .data = &mt8195_vppsys0_driver_data, > + }, > + { > + .compatible = "mediatek,mt8195-vppsys1", > + .data = &mt8195_vppsys1_driver_data, > + }, > { > .compatible = "mediatek,mt8365-mmsys", > .data = &mt8365_mmsys_driver_data, > diff --git a/drivers/soc/mediatek/mtk-mmsys.h b/drivers/soc/mediatek/mtk-mmsys.h > index 77f37f8c715b..54a96b83afb4 100644 > --- a/drivers/soc/mediatek/mtk-mmsys.h > +++ b/drivers/soc/mediatek/mtk-mmsys.h > @@ -91,6 +91,7 @@ struct mtk_mmsys_driver_data { > const struct mtk_mmsys_routes *routes; > const unsigned int num_routes; > const u16 sw0_rst_offset; > + const bool is_vppsys; > }; > > /*