From patchwork Wed Nov 20 06:36:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?RnJpZGF5IFlhbmcgKOadqOmYsyk=?= X-Patchwork-Id: 13880743 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 4A82AD6E2C9 for ; Wed, 20 Nov 2024 06:39:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version: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:In-Reply-To:References:List-Owner; bh=I3TGAr8UNpOKrZxR5qC575V/3UsZbqaqa70mKIYt9K8=; b=shzxpa5b+crWLZiFlyfAdrkjcN 0RjPsPIjIWilsWOSksND0JMYOVRxAnYrwgRP5VPn9vb0HfPocpRLOvpbcztBAewYa2j0iWWiJNrDr RXmsVs1fxeOwVkiTJte8TERQuGOcyzJnjk45Gj74eoaQKbxZ3p49Q97NCSsSEepVsfK+UwmWY4PBd O9PRREiEa7JpFO1YaIEJUivNPzQyS5q8XLwub/E/qe3z7Wi97WrFeaoKgU7oYBdA5ZU4CJRrcdGDy SDpP9RdtRSxNqvoMv6GF9mukrEs5I0Y+tfw8gdOFfNCDJZQwy8G8BfZ5CVHpiwbvG8qkgu8/Zxlw2 5tegkhsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tDeMm-0000000EWho-1yBf; Wed, 20 Nov 2024 06:39:08 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tDeKu-0000000EVsP-1V16; Wed, 20 Nov 2024 06:37:13 +0000 X-UUID: dbf53c78a70911ef9048ed6ed365623b-20241119 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:Message-ID:Date:Subject:CC:To:From; bh=I3TGAr8UNpOKrZxR5qC575V/3UsZbqaqa70mKIYt9K8=; b=gOTPkY0qQA5wF+LXuYNf9svVtTxKLIF00fH2Sv6tOL1fPGlXDdeF1BFmdmy6nOU7AJoGxTch3wxSWwC85KA0Yz+PdTOJ40PaMnDkTo5vb3dJsXWUioOlDUBgGePWmqt5s7yabBLUw00vDVP3A+qPOtHSMSS9dUibi2kxR9CFr58=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.44,REQID:85985acf-571e-4c84-91db-93f16aa71e6f,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:464815b,CLOUDID:09f218b9-596a-4e31-81f2-cae532fa1b81,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:1,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULS X-UUID: dbf53c78a70911ef9048ed6ed365623b-20241119 Received: from mtkmbs09n1.mediatek.inc [(172.21.101.35)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 136264560; Tue, 19 Nov 2024 23:37:05 -0700 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.1118.26; Wed, 20 Nov 2024 14:37:03 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 20 Nov 2024 14:37:02 +0800 From: Friday Yang To: Yong Wu , Krzysztof Kozlowski , Rob Herring , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Philipp Zabel CC: , , , , , Friday Yang Subject: [PATCH v2 0/2] Add SMI clamp in MediaTek SMI driver Date: Wed, 20 Nov 2024 14:36:37 +0800 Message-ID: <20241120063701.8194-1-friday.yang@mediatek.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241119_223712_405681_18A884AC X-CRM114-Status: GOOD ( 15.48 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Based on tag: next-20241119, linux-next/master Refer to the discussion in the following link: https://lore.kernel.org/all/CAFGrd9qZhObQXvm2_abqaX83xMLqxjQETB2=wXpobDWU1CnvkA@mail.gmail.com/ https://lore.kernel.org/all/CAPDyKFpokXV2gJDgowbixTvOH_5VL3B5H8eyhP+KJ5Fasm2rFg@mail.gmail.com/ SMI clamp and reset operations should be implemented in SMI driver instead of PM driver. When we enable/disable power domain, the SMI LARBs linked to this power domain could be affected by the bus glitch. To avoid this issue, SMI need to apply clamp and reset opereations. This patch mainly add these functions: 1) Register genpd callback for SMI LARBs and handle this power domain status change in SMI driver. 2) Add bindings to support SMI Sub Common for MT8188. 3) Add bindings to support SMI larbs reset opearation Changes v2: - According to previous discussions in v1, divided these four patches into two topic separately - Modify the description for 'resets' in binding - Add const value 'larb' for 'reset-names' in binding - Modify requirement for 'resets' and 'reset-names' in binding - Delete 'mediatek,smi-sub-comm' in binding - Delete 'mediatek,smi-sub-comm-in-portid' in binding - Modify the example in binding - Add 'mtk_smi_larb_clamp_port_mt8188' definition in SMI driver - Change the way to parse the 'resets' in driver - Change label from 'err_pm_disable' to 'err_link_remove' v1: https://patchwork.kernel.org/project/linux-mediatek/patch/20240821082845.11792-3-friday.yang@mediatek.com/ https://patchwork.kernel.org/project/linux-mediatek/patch/20240821082845.11792-4-friday.yang@mediatek.com/ friday.yang (2): dt-bindings: reset: mediatek: Add mt8188 SMI reset control binding reset: mediatek: Add reset control driver for SMI .../bindings/reset/mediatek,smi-reset.yaml | 53 ++++++ drivers/reset/Kconfig | 9 + drivers/reset/Makefile | 1 + drivers/reset/reset-mediatek-smi.c | 156 ++++++++++++++++++ include/dt-bindings/reset/mt8188-resets.h | 11 ++ 5 files changed, 230 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/mediatek,smi-reset.yaml create mode 100644 drivers/reset/reset-mediatek-smi.c --- 2.46.0