From patchwork Fri Jan 13 10:44:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TmFuY3kgTGluICjmnpfmrKPonqIp?= X-Patchwork-Id: 13100491 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30CDEC61DB3 for ; Fri, 13 Jan 2023 10:48:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Q1MWty/Nv2Pn96i8dfwiBu3pEyprK5YdCBg1r63+mO0=; b=Gizf8j9dYtPAfY O4wU+Xt159LyZmwxbB9N8cr3R5iQOAGkJjFzQGodaQUndycB1E8RUByfkQeSWtEq+T4NqlednIzhG 9C7LRnyueea3j5ho/IoPCEG3RRzZ2e0eSL6qVGE+Zp06VfaMdsUs95YIVNnX3LXrEDpMrxefxDr6f gcaE2vlOGQgNVKUAgsHUXFmQagPrN7rOGtz4gNf+Lsg9KMOhmVgGS/hYxmAfO51GI+0fE2OLTyh1K nWqftFYpTlQM2nk3Dh72N3DLTmTKe8qlIcrNlmmFCca6BI1ATAXZmqluRtXXsbiN5MKQFIjCzIoAe CsXiAvm/q5NqQwUshyeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGHa6-001rXB-4M; Fri, 13 Jan 2023 10:46:42 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGHZJ-001rAp-UI; Fri, 13 Jan 2023 10:45:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=V+tfsJRtn1bxoH0qbbWmxpPnmzaI1vNuVtj6ZgDvN+U=; b=JakMqrUGywCgpJfMf5xRGs17Yi pu9hzBq6jRI+5oonSTebi0IjOsn/ud98O9PfV3M+6itg4umZlohpciZt8YCicfFKSm1b0gTlCAAVX npmoPS8C6cK9b1UrtlrQV6MFyDsOvoSk7R+vdW1e7J+uSSyi4NtDt52g14vUD0Isq5jiCHdrbuvVt Ey5BsbTtIeRjOE+8pDf3/CbiTGKeV1UtbaktIx1Dahel6ZR9lfgOtmwY41b/fsf8NjcSExs2RFhoe AXdEIpTzYQTqwJTkx8LWj/QVMgWOTeDXslpf6LHF6dLRWGrSnuxlvYZaKjd/ke58+3iJW2O+Wyu1y okCKKn5Q==; Received: from mailgw02.mediatek.com ([216.200.240.185]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pGHZ7-004K8j-2q; Fri, 13 Jan 2023 10:45:44 +0000 X-UUID: 6dd4924c932f11eda08d4d6090ec5a5c-20230113 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=V+tfsJRtn1bxoH0qbbWmxpPnmzaI1vNuVtj6ZgDvN+U=; b=J91oFWfPJO7P/AS6W1meNf6ceELplBTZvLXoIppq8dhYcOB25gck2ufLlHl/IMjzOK0guI0INKMaeHgEG/Ate5Bgy0+X8FnKR1olrs47nUDrC7kFZPCjUOOn7E3X9Gl1brI5xAm8SkKCZQmNsrMewViWwaPV6wJi2+t//0UIHiM=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.17,REQID:05b24809-623e-4758-af61-72391f7ea502,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:543e81c,CLOUDID:595a2e8c-8530-4eff-9f77-222cf6e2895b,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 X-CID-BVR: 0 X-UUID: 6dd4924c932f11eda08d4d6090ec5a5c-20230113 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1698150934; Fri, 13 Jan 2023 03:45:43 -0700 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Fri, 13 Jan 2023 18:44:37 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Fri, 13 Jan 2023 18:44:37 +0800 From: Nancy.Lin To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Philipp Zabel , CK Hu CC: Nathan Chancellor , Nick Desaulniers , Tom Rix , AngeloGioacchino Del Regno , "Jason-JH . Lin" , "Nancy . Lin" , Nathan Lu , Rex-BC Chen , Xinlei Lee , , , , , , , Subject: [PATCH v30 09/11] soc: mediatek: mmsys: add reset control for MT8195 vdosys1 Date: Fri, 13 Jan 2023 18:44:32 +0800 Message-ID: <20230113104434.28023-10-nancy.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230113104434.28023-1-nancy.lin@mediatek.com> References: <20230113104434.28023-1-nancy.lin@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230113_104542_367229_797B6D2C X-CRM114-Status: GOOD ( 10.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org MT8195 vdosys1 has more than 32 reset bits and a different reset base than other chips. Add the number of reset bits and reset base in mmsys private data. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen --- drivers/soc/mediatek/mt8195-mmsys.h | 1 + drivers/soc/mediatek/mtk-mmsys.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/soc/mediatek/mt8195-mmsys.h b/drivers/soc/mediatek/mt8195-mmsys.h index 454944a9409c..a6652ae63431 100644 --- a/drivers/soc/mediatek/mt8195-mmsys.h +++ b/drivers/soc/mediatek/mt8195-mmsys.h @@ -75,6 +75,7 @@ #define MT8195_SOUT_DSC_WRAP1_OUT_TO_SINA_VIRTUAL0 (2 << 16) #define MT8195_SOUT_DSC_WRAP1_OUT_TO_VPP_MERGE (3 << 16) +#define MT8195_VDO1_SW0_RST_B 0x1d0 #define MT8195_VDO1_MERGE0_ASYNC_CFG_WD 0xe30 #define MT8195_VDO1_HDRBE_ASYNC_CFG_WD 0xe70 #define MT8195_VDO1_HDR_TOP_CFG 0xd00 diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c index 32b17c56c44a..297c810440f4 100644 --- a/drivers/soc/mediatek/mtk-mmsys.c +++ b/drivers/soc/mediatek/mtk-mmsys.c @@ -98,6 +98,8 @@ static const struct mtk_mmsys_driver_data mt8195_vdosys1_driver_data = { .clk_driver = "clk-mt8195-vdo1", .routes = mmsys_mt8195_vdo1_routing_table, .num_routes = ARRAY_SIZE(mmsys_mt8195_vdo1_routing_table), + .sw0_rst_offset = MT8195_VDO1_SW0_RST_B, + .num_resets = 64, }; static const struct mtk_mmsys_driver_data mt8365_mmsys_driver_data = {