From patchwork Wed Jan 18 03:15:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TW91ZHkgSG8gKOS9leWul+WOnyk=?= X-Patchwork-Id: 44950 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2119670wrn; Tue, 17 Jan 2023 19:26:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXtNw/ogXp/Q3gOcky9KMMqJgiuog+AI/H+zrHIubmdhg73lC0AWMnEnpsdb2j76Ql2NfRK6 X-Received: by 2002:a17:907:6e2a:b0:871:e9a0:eba7 with SMTP id sd42-20020a1709076e2a00b00871e9a0eba7mr6715854ejc.57.1674012382164; Tue, 17 Jan 2023 19:26:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674012382; cv=none; d=google.com; s=arc-20160816; b=ImlN1Z8VpMNcbou5YR/B52BvoLgFlFcDsXIaYfjl+eVz8RjXf1tqpju4p+gEuBCpQW ZS3/y7lD5zGGiutvPlweyKjw9VAaXCQ4OW725wBAX+rt4Rnxg6CCC6yv/yH7/+BctZOg NjS0Khbf1W8EUpa1DcpbNuYR19QkOvjdX3MVXdGSv5LxPFnfP63OjkGjegRBordbhOFB xVgIdl15UrVtjacTcT70hV14AuJnrR+ybZHh+IGFE6BqeZCxXaAr0nBVGX8JoAXIRMoA dVRr9GdE231KTpDFCALQsw4mK8VrKKrewCwjP0Hr8xQvARub+jEvRXahHhHn6LNvvyJU HBwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xBHaGgi41TaUh6BdqsOGpW7S+XnuKs5NkQrgXCGRHoE=; b=UvOkMJZzLJg0WDR4pEAQ1+c1/JThnhR5ZsEzii4CAlGLaJD/ycADWCBEYjYATLvMRs OvZQwqnoPnda7X3b8+dBSROW7yOtobbvW57S+C6C1YcOgLqMP5ZxdNuwDDaUgdneZRbJ Sgw9LksImdUbw1Db5AOIkN6ttoeUL05NVv0l45rgnTt4YEl8uinhJjtDRZuKRDo7xMOu WqIQyIgD5r/WNDh7/W1ltQPmta+XbbM56+by1WWqdxgMZ0ASBI4iDihgq1j97/uQ4SGj Q1LHPvGhllrtVxu4yFgg3y1ei78kdg2bv/ILncSDMFgIc2VOxUB8Mjq0PNRu6I6SlYVx fgoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=qpZQSTxK; 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 u5-20020a170906654500b0084c950a7956si26872506ejn.144.2023.01.17.19.25.58; Tue, 17 Jan 2023 19:26:22 -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=qpZQSTxK; 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 S229548AbjARDPg (ORCPT + 99 others); Tue, 17 Jan 2023 22:15:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229670AbjARDP0 (ORCPT ); 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 8368550844; Tue, 17 Jan 2023 19:15:19 -0800 (PST) X-UUID: 51b5737696de11eda06fc9ecc4dadd91-20230118 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=xBHaGgi41TaUh6BdqsOGpW7S+XnuKs5NkQrgXCGRHoE=; b=qpZQSTxKFq9nDFZDWxzTXtYdJClU3VFrqmzRf6onBEnW8FFFG69zzOrBRcI5D8v7+xv63Vy//1FJHVTA2ARtVXH2iKj9Xshl1/h45Uvxs+xsObQPnx5MW1vhigx/EKJH0+dhpdUYphTCSajG2UCwK6dIGw57yZ1OPJo8NF2b+iM=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.18,REQID:6da75002-214c-4c64-9db7-46ef55501094,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:95 X-CID-INFO: VERSION:1.1.18,REQID:6da75002-214c-4c64-9db7-46ef55501094,IP:0,URL :0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTION :quarantine,TS:95 X-CID-META: VersionHash:3ca2d6b,CLOUDID:6ceb1ff6-ff42-4fb0-b929-626456a83c14,B ulkID:230118111512GL1RKDAU,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OS I:0,OSA:0 X-CID-BVR: 0,NGT X-UUID: 51b5737696de11eda06fc9ecc4dadd91-20230118 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1181643374; Wed, 18 Jan 2023 11:15:11 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) 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 To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Michael Turquette , Stephen Boyd CC: , , , , , , Moudy Ho Subject: [PATCH v6 1/4] dt-bindings: arm: mediatek: migrate MT8195 vppsys0/1 to mtk-mmsys driver Date: Wed, 18 Jan 2023 11:15:06 +0800 Message-ID: <20230118031509.29834-2-moudy.ho@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230118031509.29834-1-moudy.ho@mediatek.com> References: <20230118031509.29834-1-moudy.ho@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,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755329207278461780?= X-GMAIL-MSGID: =?utf-8?q?1755329207278461780?= MT8195 VPPSYS 0/1 should be probed from mtk-mmsys driver to populate device by platform_device_register_data then start its own clock driver. Signed-off-by: Moudy Ho Acked-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger --- .../arm/mediatek/mediatek,mt8195-clock.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8195-clock.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8195-clock.yaml index 17fcbb45d121..d62d60181147 100644 --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8195-clock.yaml +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8195-clock.yaml @@ -28,11 +28,9 @@ properties: - mediatek,mt8195-imp_iic_wrap_s - mediatek,mt8195-imp_iic_wrap_w - mediatek,mt8195-mfgcfg - - mediatek,mt8195-vppsys0 - mediatek,mt8195-wpesys - mediatek,mt8195-wpesys_vpp0 - mediatek,mt8195-wpesys_vpp1 - - mediatek,mt8195-vppsys1 - mediatek,mt8195-imgsys - mediatek,mt8195-imgsys1_dip_top - mediatek,mt8195-imgsys1_dip_nr @@ -92,13 +90,6 @@ examples: #clock-cells = <1>; }; - - | - vppsys0: clock-controller@14000000 { - compatible = "mediatek,mt8195-vppsys0"; - reg = <0x14000000 0x1000>; - #clock-cells = <1>; - }; - - | wpesys: clock-controller@14e00000 { compatible = "mediatek,mt8195-wpesys"; @@ -120,13 +111,6 @@ examples: #clock-cells = <1>; }; - - | - vppsys1: clock-controller@14f00000 { - compatible = "mediatek,mt8195-vppsys1"; - reg = <0x14f00000 0x1000>; - #clock-cells = <1>; - }; - - | imgsys: clock-controller@15000000 { compatible = "mediatek,mt8195-imgsys"; From patchwork Wed Jan 18 03:15:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TW91ZHkgSG8gKOS9leWul+WOnyk=?= X-Patchwork-Id: 44946 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2117735wrn; Tue, 17 Jan 2023 19:19:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXsiBlTaM7nIABYSi4NEUjcu+1IPkGwZuGTAznve6hpddzai6vGBCAuyA7ES/I7LCdhjxxJN X-Received: by 2002:a17:902:bb8f:b0:194:751d:978 with SMTP id m15-20020a170902bb8f00b00194751d0978mr5620860pls.61.1674011989101; Tue, 17 Jan 2023 19:19:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674011989; cv=none; d=google.com; s=arc-20160816; b=NIeiQSeXuSLDCJc6iURk/J6zYTf0KwGQi2FvMr5QfqDbIj4pQXBmBifc8i1uyCcXVl /q0ZsRyT8+RgGz31zwHb2MIMVQa7DL6+mNVKojgD1fktSJG0HOkZUgXHVqM8U/bhQ9eW WX0IuXc91pa2354aw6x94/hokL00kJWrhxbLCmWd328sgR5wlZKOm3syHCyRIfO+sMwQ nRJAfYhAtK4MIqTzY+/lc/3j+BlBB7VZQN/3uqMQ40GH/yfmsFN1siNdmsg+7qHrQbF1 ml6aFoSl9gt4KNWkPJCtfkRB32ITqjU5nk9l7it0IAbWMpQFZHdNRbdobtgXslDHEWZW tAdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ifg38jsHZ5BkXiCbGKdBNAbLJn5lRjxgR90wcI2X0zY=; b=EoQxittmH4Vpcxh0vkQb1AYCj26XFVMwtSMchNRIiM9sopm4rHrmk0MPY2gH1zm2hw /pjx7ASeifXUk+wNkBd33brcrZmBpVB1l5TwRV/5+uKdivXPc+0CFgUKaYE5unJlskWr 8VZXMt/lupMes5TTKXX8Zcu4AIxhifm+9CdntUvdWb+alKHDBqUMs+Mfle4Bj3fSk/4q aNe+Yfzenx8i/DveRP5cGrMLmVRyxEiOrJni1DCa5yKE2SyJ57y4CuLZ2p2uLpM+cN43 7m9FLGJBDNDVS6DQhAHPJ/8aHrzojBs8QfqXH+YYbMAlzqfBVIGT7PkOe/1Z3xjJBlS+ z+fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=gVyKJzQ6; 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 b2-20020a170903228200b001929101a655si36867301plh.248.2023.01.17.19.19.36; Tue, 17 Jan 2023 19:19:49 -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=gVyKJzQ6; 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 S229696AbjARDP2 (ORCPT + 99 others); Tue, 17 Jan 2023 22:15:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbjARDPZ (ORCPT ); Tue, 17 Jan 2023 22:15:25 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F9B94FCEB; Tue, 17 Jan 2023 19:15:18 -0800 (PST) X-UUID: 51b713a296de11eda06fc9ecc4dadd91-20230118 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=ifg38jsHZ5BkXiCbGKdBNAbLJn5lRjxgR90wcI2X0zY=; b=gVyKJzQ6yZaNhrDszApX3UEKyk5IEBgOxgqzqgDHA4D7VcyoCQymngO8iKQH141yeSLlyrv64PwY5Sl2QScFGxbP2GyCKDL0okHFHv8Uv3MB7gjnTuB+6IyDSbDI/OlJcH68KJdd7DRhjFpZf9O/y0cbNhG7/vGDyE/6Vkf/tns=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.18,REQID:c68d75f6-d1b3-4523-9323-e348d2727961,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:95 X-CID-INFO: VERSION:1.1.18,REQID:c68d75f6-d1b3-4523-9323-e348d2727961,IP:0,URL :0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTION :quarantine,TS:95 X-CID-META: VersionHash:3ca2d6b,CLOUDID:771bf654-dd49-462e-a4be-2143a3ddc739,B ulkID:230118111512RE1WU1ND,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OS I:0,OSA:0 X-CID-BVR: 0 X-UUID: 51b713a296de11eda06fc9ecc4dadd91-20230118 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1841336925; Wed, 18 Jan 2023 11:15:11 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) 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 To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Michael Turquette , Stephen Boyd CC: , , , , , , Moudy Ho Subject: [PATCH v6 2/4] dt-bindings: arm: mediatek: mmsys: Add support for MT8195 VPPSYS Date: Wed, 18 Jan 2023 11:15:07 +0800 Message-ID: <20230118031509.29834-3-moudy.ho@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230118031509.29834-1-moudy.ho@mediatek.com> References: <20230118031509.29834-1-moudy.ho@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY autolearn=no 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?1755328795523514086?= X-GMAIL-MSGID: =?utf-8?q?1755328795523514086?= For MT8195, VPPSYS0 and VPPSYS1 are 2 display pipes with hardware differences in power domains, clocks and subsystem counts, which should be determined by compatible names. Signed-off-by: Moudy Ho Acked-by: Krzysztof Kozlowski --- .../devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml index 84de12709323..b08ae7405b1a 100644 --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml @@ -33,6 +33,8 @@ properties: - mediatek,mt8186-mmsys - mediatek,mt8188-vdosys0 - mediatek,mt8192-mmsys + - mediatek,mt8195-vppsys0 + - mediatek,mt8195-vppsys1 - mediatek,mt8365-mmsys - const: syscon From patchwork Wed Jan 18 03:15:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TW91ZHkgSG8gKOS9leWul+WOnyk=?= X-Patchwork-Id: 44948 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2118716wrn; Tue, 17 Jan 2023 19:23:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXuXCSgXBfh7yHUqVxzVm4C6xJgvx9sWuwy8I6qtx02UKQnBOi51USYMDrBtQl/Tm0nGFKk9 X-Received: by 2002:aa7:cc8f:0:b0:492:8207:f2ba with SMTP id p15-20020aa7cc8f000000b004928207f2bamr15843146edt.1.1674012185472; Tue, 17 Jan 2023 19:23:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674012185; cv=none; d=google.com; s=arc-20160816; b=TjaGFLT442B0hKuS5aJz4A1d3VWYB2AuMM48MMvWN94KIJfZW9EaHynN93ge1MQM+0 UVbGEvGB8W+mRkfxYiNVQ+Jaj6VUe5gUoP3cMFeBHwcLM61+vQeppqYOsLjlEJ+Zoosa jvCLk+4LKjum+XkyN6fVeKXbC6Lgq4Quto0Rk82Ub/yA+2AKn7YGgOkaZnIoqnG6WJAk I8CADpYAC4ggwzhjJFGlgvKTfmGGuecQNkIj1etQYu9IFVk7StoYAeR3qDftrk0/QgmC I3JllGnGE+aonxdtX1WAIG33U0zWjb25Wc79zAWbw3SdYC/u0vK9CDiXBx+4lwhL7Jgw zqlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=VQIyMUF35KzZzjYbaN4jibaebhkaoD3I1UFKe4hNees=; b=D3nYm66nxJK8OYQMnTjh7QYtCrC5QQM8kNzjUZtZ8++wq6kkYPunzwtqDS0dc7iSL6 LocNKDJgCORdMSfiv+h81ikcnSiUGWqMxtdu4XHcxEV6mHtvrj/MF+4hSI2q833CTXHM Kbr7jduFtL8Nz5cwTdtzjX9SQgtb2gxA6GEv5+VOUCHO9QN6Jl/wd01BimOKh+tTE3Bj Q9S8+mq/n0kBBk43dswW8Q9SmN1rFweV14NgCJ6RKJaLf6jEWb8jPEgh+s5whMbx1BdV iOx0KdqyX/7XZp0OwzFqt8UcjPaTFmGPKWsg9uRc2P3hyrDtGcL2yb7Qp9ar895v8IFo RaGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=XqS693LQ; 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 s9-20020a056402520900b0049e425460a7si2673246edd.241.2023.01.17.19.22.41; Tue, 17 Jan 2023 19:23:05 -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=XqS693LQ; 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 S229657AbjARDPo (ORCPT + 99 others); Tue, 17 Jan 2023 22:15:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbjARDP0 (ORCPT ); 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 8633A50854; Tue, 17 Jan 2023 19:15:20 -0800 (PST) X-UUID: 51e0c74296de11eda06fc9ecc4dadd91-20230118 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=VQIyMUF35KzZzjYbaN4jibaebhkaoD3I1UFKe4hNees=; b=XqS693LQ6/yoqqNGAZnhnSmmBB8kJM1BKQThYtJiGrF/trc2hlE36V/uOg3cwsaKunqHdBOxtV+Y4Y4OEgO6u6LvOOnLVNAJD740kcVbsmzkqyENT/x1plZaJ4JK0nGEtMeTd50FhPN93zhZcvProZkWW+m6sIOkACLxzjol2uI=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.18,REQID:1f1912d1-28b5-4a37-999d-c9fab1faf868,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:3ca2d6b,CLOUDID:781bf654-dd49-462e-a4be-2143a3ddc739,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0 X-CID-BVR: 0,NGT X-UUID: 51e0c74296de11eda06fc9ecc4dadd91-20230118 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 715122075; Wed, 18 Jan 2023 11:15:11 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) 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.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 To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Michael Turquette , Stephen Boyd CC: , , , , , , Moudy Ho Subject: [PATCH v6 3/4] clk: mediatek: remove MT8195 vppsys/0/1 simple_probe Date: Wed, 18 Jan 2023 11:15:08 +0800 Message-ID: <20230118031509.29834-4-moudy.ho@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230118031509.29834-1-moudy.ho@mediatek.com> References: <20230118031509.29834-1-moudy.ho@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,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755329000992678031?= X-GMAIL-MSGID: =?utf-8?q?1755329000992678031?= MT8195 VPPSYS0/1 will be probed by the compatible name in the mtk-mmsys driver and then probe its own clock driver as a platform driver. Signed-off-by: Moudy Ho Reviewed-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno --- drivers/clk/mediatek/clk-mt8195-vpp0.c | 58 +++++++++++++++++++------- drivers/clk/mediatek/clk-mt8195-vpp1.c | 58 +++++++++++++++++++------- 2 files changed, 86 insertions(+), 30 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt8195-vpp0.c b/drivers/clk/mediatek/clk-mt8195-vpp0.c index bf2939c3a023..6d5800f69f6c 100644 --- a/drivers/clk/mediatek/clk-mt8195-vpp0.c +++ b/drivers/clk/mediatek/clk-mt8195-vpp0.c @@ -86,26 +86,54 @@ static const struct mtk_gate vpp0_clks[] = { GATE_VPP0_2(CLK_VPP0_WARP1_MDP_DL_ASYNC, "vpp0_warp1_mdp_dl_async", "top_wpe_vpp", 3), }; -static const struct mtk_clk_desc vpp0_desc = { - .clks = vpp0_clks, - .num_clks = ARRAY_SIZE(vpp0_clks), -}; +static int clk_mt8195_vpp0_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct device_node *node = dev->parent->of_node; + struct clk_onecell_data *clk_data; + int r; -static const struct of_device_id of_match_clk_mt8195_vpp0[] = { - { - .compatible = "mediatek,mt8195-vppsys0", - .data = &vpp0_desc, - }, { - /* sentinel */ - } -}; + clk_data = mtk_alloc_clk_data(CLK_VPP0_NR_CLK); + if (!clk_data) + return -ENOMEM; + + r = mtk_clk_register_gates(node, vpp0_clks, ARRAY_SIZE(vpp0_clks), clk_data); + if (r) + goto free_vpp0_data; + + r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); + if (r) + goto unregister_gates; + + platform_set_drvdata(pdev, clk_data); + + return r; + +unregister_gates: + mtk_clk_unregister_gates(vpp0_clks, ARRAY_SIZE(vpp0_clks), clk_data); +free_vpp0_data: + mtk_free_clk_data(clk_data); + return r; +} + +static int clk_mt8195_vpp0_remove(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct device_node *node = dev->parent->of_node; + struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); + + of_clk_del_provider(node); + mtk_clk_unregister_gates(vpp0_clks, ARRAY_SIZE(vpp0_clks), clk_data); + mtk_free_clk_data(clk_data); + + return 0; +} static struct platform_driver clk_mt8195_vpp0_drv = { - .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .probe = clk_mt8195_vpp0_probe, + .remove = clk_mt8195_vpp0_remove, .driver = { .name = "clk-mt8195-vpp0", - .of_match_table = of_match_clk_mt8195_vpp0, }, }; builtin_platform_driver(clk_mt8195_vpp0_drv); diff --git a/drivers/clk/mediatek/clk-mt8195-vpp1.c b/drivers/clk/mediatek/clk-mt8195-vpp1.c index ffd52c762890..3b88c69e96c9 100644 --- a/drivers/clk/mediatek/clk-mt8195-vpp1.c +++ b/drivers/clk/mediatek/clk-mt8195-vpp1.c @@ -84,26 +84,54 @@ static const struct mtk_gate vpp1_clks[] = { GATE_VPP1_1(CLK_VPP1_VPP_SPLIT_26M, "vpp1_vpp_split_26m", "clk26m", 26), }; -static const struct mtk_clk_desc vpp1_desc = { - .clks = vpp1_clks, - .num_clks = ARRAY_SIZE(vpp1_clks), -}; +static int clk_mt8195_vpp1_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct device_node *node = dev->parent->of_node; + struct clk_onecell_data *clk_data; + int r; -static const struct of_device_id of_match_clk_mt8195_vpp1[] = { - { - .compatible = "mediatek,mt8195-vppsys1", - .data = &vpp1_desc, - }, { - /* sentinel */ - } -}; + clk_data = mtk_alloc_clk_data(CLK_VPP1_NR_CLK); + if (!clk_data) + return -ENOMEM; + + r = mtk_clk_register_gates(node, vpp1_clks, ARRAY_SIZE(vpp1_clks), clk_data); + if (r) + goto free_vpp1_data; + + r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); + if (r) + goto unregister_gates; + + platform_set_drvdata(pdev, clk_data); + + return r; + +unregister_gates: + mtk_clk_unregister_gates(vpp1_clks, ARRAY_SIZE(vpp1_clks), clk_data); +free_vpp1_data: + mtk_free_clk_data(clk_data); + return r; +} + +static int clk_mt8195_vpp1_remove(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct device_node *node = dev->parent->of_node; + struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); + + of_clk_del_provider(node); + mtk_clk_unregister_gates(vpp1_clks, ARRAY_SIZE(vpp1_clks), clk_data); + mtk_free_clk_data(clk_data); + + return 0; +} static struct platform_driver clk_mt8195_vpp1_drv = { - .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .probe = clk_mt8195_vpp1_probe, + .remove = clk_mt8195_vpp1_remove, .driver = { .name = "clk-mt8195-vpp1", - .of_match_table = of_match_clk_mt8195_vpp1, }, }; builtin_platform_driver(clk_mt8195_vpp1_drv);