From patchwork Wed Jun 14 07:31:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?U2hhd24gU3VuZyAo5a6L5a2d6KyZKQ==?= X-Patchwork-Id: 13279660 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 C35EBEB64DA for ; Wed, 14 Jun 2023 07:32:57 +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=Kv/v7Q7K6BRUAQEtSC8oHEj1DP7cYbwDm3buY8PDDmU=; b=PRp8vxvCWqAsAy CNdwX5kGS5p8PNickoxGLll8Ea2V4PtjcmaPDqyxAs4IQOg0NwYdLtELLg6XPGKZgmsA7wl/fUZoY +IdDM0Rmc856AWBpgiR4gqFzeUrcrIXlMSHRD8dmR+g2ah3UKeJIZYq4n2rOdscPyudm371OkqfGd bPqI/LaejUl9sLo5mrt3dTpNKO8iITobQdN9u3y7eCHeYtZpEmK4H3eIVSdXE/9oJ4moCXkz/CAGL /qIYnIrqwDlTYbv57ejTqao2huWpeQSvP8PUFFBBdeK6MgmMSX4hUnjoINCb7fchjc4CQ3vTuG7Gx PqrQap7lcbfMald9UFBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9Kzf-00AgxG-1T; Wed, 14 Jun 2023 07:32:39 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9KzX-00AgqC-1X; Wed, 14 Jun 2023 07:32:32 +0000 X-UUID: 99f19ec40a8511ee83ed1395ce914268-20230614 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=hpLRJmYKhPB0QTpDN7lvpJRPpLMjx1ofzANUNwQ3SyY=; b=I9g5i/M/4UHoc9dnIEnMG7D5RzmmmYxz/PvDu0Sb3plf1qlNPs3omhDFGrTsbU7S0dZpafDKaXx0bgTgaASo1FilC8cUGUHqHTCMXc2r3K4u3ZsyL/UBK4JF7HuaqokYwTBoX/s2J488Lk9q89ZuV70nY6+cHbSpcT6vXEuhwZA=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.26,REQID:1b9c177c-8c39-42e6-accc-e92d9f54889f,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:cb9a4e1,CLOUDID:5a0f076f-2f20-4998-991c-3b78627e4938,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,AV:0,LES:1,SPR:NO X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 99f19ec40a8511ee83ed1395ce914268-20230614 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1011626944; Wed, 14 Jun 2023 00:32:22 -0700 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) 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.1118.26; Wed, 14 Jun 2023 15:31:45 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 14 Jun 2023 15:31:45 +0800 From: Hsiao Chien Sung To: Chun-Kuang Hu , Matthias Brugger , AngeloGioacchino Del Regno , Philipp Zabel , Rob Herring , "Krzysztof Kozlowski" CC: , , , , , Singo Chang , Nancy Lin , Jason-JH Lin , Shawn Sung Subject: [PATCH v2 11/15] soc: mediatek: Add MT8188 VDO0 reset bit map Date: Wed, 14 Jun 2023 15:31:21 +0800 Message-ID: <20230614073125.17958-12-shawn.sung@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230614073125.17958-1-shawn.sung@mediatek.com> References: <20230614073125.17958-1-shawn.sung@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-20230614_003231_521548_9986DA41 X-CRM114-Status: GOOD ( 11.45 ) 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 Add MT8188 VDO0 reset bit map. Signed-off-by: Hsiao Chien Sung Reviewed-by: AngeloGioacchino Del Regno --- drivers/soc/mediatek/mt8188-mmsys.h | 26 ++++++++++++++++++++++++++ drivers/soc/mediatek/mtk-mmsys.c | 3 +++ 2 files changed, 29 insertions(+) -- 2.18.0 diff --git a/drivers/soc/mediatek/mt8188-mmsys.h b/drivers/soc/mediatek/mt8188-mmsys.h index 447afb72d95f..c3e3c5cfe931 100644 --- a/drivers/soc/mediatek/mt8188-mmsys.h +++ b/drivers/soc/mediatek/mt8188-mmsys.h @@ -3,6 +3,10 @@ #ifndef __SOC_MEDIATEK_MT8188_MMSYS_H #define __SOC_MEDIATEK_MT8188_MMSYS_H +#include + +#define MT8188_VDO0_SW0_RST_B 0x190 + #define MT8188_VDO0_OVL_MOUT_EN 0xf14 #define MT8188_MOUT_DISP_OVL0_TO_DISP_RDMA0 BIT(0) #define MT8188_MOUT_DISP_OVL0_TO_DISP_WDMA0 BIT(1) @@ -118,6 +122,28 @@ #define MT8188_MIXER_SOUT_SEL_IN_FROM_DISP_MIXER 0 #define MT8188_VDO1_MIXER_VSYNC_LEN 0xd5c +static const u8 mmsys_mt8188_vdo0_rst_tb[] = { + [MT8188_VDO0_RST_DISP_OVL0] = 0, + [MT8188_VDO0_RST_FAKE_ENG0] = 2, + [MT8188_VDO0_RST_DISP_CCORR0] = 4, + [MT8188_VDO0_RST_DISP_MUTEX0] = 6, + [MT8188_VDO0_RST_DISP_GAMMA0] = 8, + [MT8188_VDO0_RST_DISP_DITHER0] = 10, + [MT8188_VDO0_RST_DISP_WDMA0] = 17, + [MT8188_VDO0_RST_DISP_RDMA0] = 19, + [MT8188_VDO0_RST_DSI0] = 21, + [MT8188_VDO0_RST_DSI1] = 22, + [MT8188_VDO0_RST_DSC_WRAP0] = 23, + [MT8188_VDO0_RST_VPP_MERGE0] = 24, + [MT8188_VDO0_RST_DP_INTF0] = 25, + [MT8188_VDO0_RST_DISP_AAL0] = 26, + [MT8188_VDO0_RST_INLINEROT0] = 27, + [MT8188_VDO0_RST_APB_BUS] = 28, + [MT8188_VDO0_RST_DISP_COLOR0] = 29, + [MT8188_VDO0_RST_MDP_WROT0] = 30, + [MT8188_VDO0_RST_DISP_RSZ0] = 31, +}; + static const struct mtk_mmsys_routes mmsys_mt8188_routing_table[] = { { DDP_COMPONENT_OVL0, DDP_COMPONENT_RDMA0, diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c index 13249658721f..88029500ed4d 100644 --- a/drivers/soc/mediatek/mtk-mmsys.c +++ b/drivers/soc/mediatek/mtk-mmsys.c @@ -87,6 +87,9 @@ static const struct mtk_mmsys_driver_data mt8188_vdosys0_driver_data = { .clk_driver = "clk-mt8188-vdo0", .routes = mmsys_mt8188_routing_table, .num_routes = ARRAY_SIZE(mmsys_mt8188_routing_table), + .sw0_rst_offset = MT8188_VDO0_SW0_RST_B, + .rst_tb = mmsys_mt8188_vdo0_rst_tb, + .num_resets = ARRAY_SIZE(mmsys_mt8188_vdo0_rst_tb), }; static const struct mtk_mmsys_driver_data mt8188_vdosys1_driver_data = {