Message ID | 20240117184111.62371-1-linux@fw-web.de |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-29329-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:30f:b0:101:a8e8:374 with SMTP id ia15csp107452dyb; Wed, 17 Jan 2024 10:41:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEoCkvjKd6hzKKhdcal/u6XZxaBwjQuJZBcHaAMEYzw7l0dpei0wHtWY7ohrr+6n3fwHnm X-Received: by 2002:a05:622a:44d:b0:429:c9c6:763d with SMTP id o13-20020a05622a044d00b00429c9c6763dmr11243872qtx.105.1705516903925; Wed, 17 Jan 2024 10:41:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705516903; cv=pass; d=google.com; s=arc-20160816; b=vpNVSL8JTyktwix85vp2MfSVjyRwbe4rZKXZrdg51tBv36FeRQ+Ml52wD4mVsfQj52 iYifpDH+oOMjzKtXbVukAzaZ/Y8XknNK/p9Yj3Ur2jtESu7z0vP3c2tYR9C7I/XBIswt PFaDT2bhzuZbTlIP0GVUiFCiYyF3M2zltzTGZBcCnf5cdKlu+In3QEivuzkuhEfSxMqF pQpF4uucGbfQkAPVpkmIlhULSP2XAKidZYF3KMNhoK2jAjgRb7J967PP9LCr3OTwBSvj hTRuWFQqCcEeXpSyWzM8Wz/fWxMlrBBfs2Zg2pWK1Cy5T/AKJV3x2MLB5Nk0xiAsl752 LapA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=faaWm9kKMcck2ImmwhnetGgTDP4WHiKRSvb4Y2er2NM=; fh=LUzJhCHXByutVbZY6Go/tqbqcJ6i1wxNrBhOCG2u75w=; b=maSWGpoeU59K3r6HNBBaZuSwCdEQHakSiwiW6Wabteabo4ZxdGFgH0MDVa/JX9+dzw Jqyjo4biw5k/BjalbJpZY5Hem2wb4DubPG2y8rbMSfbo4/0SSho8a9IIDLDwYDsbFrg7 EZsYNAmsI5eQJ3/u9rco8hV4PB+rXCkX0Q9U9DiDD2oslbpngBHQFSbaw9Q8AfBXPc58 b0r39MuR28Nw5dunLe8Qq8uRTY9tvONBZy7Tcd6AMnw1zXl4bd+q1j7nX7Yhl0gcluTX WD66DyhndS3k+PcSL1gmszmVKEF7Desahmn/p85k5BpG51tN0Qcg1Atwg85DeNqTRqA+ lFYg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=XZlpggnU; arc=pass (i=1 spf=pass spfdomain=fw-web.de dkim=pass dkdomain=mailerdienst.de); spf=pass (google.com: domain of linux-kernel+bounces-29329-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29329-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q4-20020a05620a0d8400b0078179944afbsi12892462qkl.154.2024.01.17.10.41.43 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 10:41:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29329-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=XZlpggnU; arc=pass (i=1 spf=pass spfdomain=fw-web.de dkim=pass dkdomain=mailerdienst.de); spf=pass (google.com: domain of linux-kernel+bounces-29329-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29329-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B5EC71C209FB for <ouuuleilei@gmail.com>; Wed, 17 Jan 2024 18:41:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75C53241EA; Wed, 17 Jan 2024 18:41:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="XZlpggnU" Received: from mxout2.routing.net (mxout2.routing.net [134.0.28.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA9532376E; Wed, 17 Jan 2024 18:41:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705516878; cv=none; b=NKLc7Rjc0/FXrVNa7WukjqRTGPdD30uong3oPBtw3Z/Xu6tFgHKf10wz0fgor3kM2kUrnkow7ZbYVotHfZVEWvF7sFaUDKBWRD4hZE7kQ3ISKv37oXKD3fZWPtebpt7K2S3jlauHIXekPYSWFHiznkQeF0hAyvh4dBEP/kzbpR4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705516878; c=relaxed/simple; bh=3VdOjc3X148qsKr0xLzhVrZ+WN/d9jtjGD8XrGEuK1E=; h=Received:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-Id:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-Mail-ID; b=IhYkXi8Oj3PrgAmXrMeXL2MdA+2qvWNPx1AI07wZtB1v+Dx3Lr9FhAJBrHkRkm1fTST1P7zy9jsoXSyhYc8beMhAV+B+lufUiZtaL9IoMgipjdt9dg3xkhF5QbH1E0m5ZINml8SSYaO1r/79ZjkFX1an4JgW9ig2kXZUCYSCPGM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=XZlpggnU; arc=none smtp.client-ip=134.0.28.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout2.routing.net (Postfix) with ESMTP id F23E660C47; Wed, 17 Jan 2024 18:41:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1705516875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=faaWm9kKMcck2ImmwhnetGgTDP4WHiKRSvb4Y2er2NM=; b=XZlpggnUqZvsTF9Yb7WvggZQdzQgKsu8sQYTSEpcJaUqmgnXUOTkpnbPGTFBUxel0cL3C2 SoDBk19pNESWo8LZ2YmZlXGQqkVa2y1ovU//PeXdBCo+dGY2/sp8CGoanWLm7P38b0f6KQ 7JmyZfC9//F0qGEHISoVA78HT8TliwU= Received: from frank-G5.. (fttx-pool-217.61.151.254.bambit.de [217.61.151.254]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id CCDEC10022F; Wed, 17 Jan 2024 18:41:13 +0000 (UTC) From: Frank Wunderlich <linux@fw-web.de> To: Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Philipp Zabel <p.zabel@pengutronix.de>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org> Cc: Frank Wunderlich <frank-w@public-files.de>, Sam Shih <sam.shih@mediatek.com>, Daniel Golle <daniel@makrotopia.org>, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v3 0/2] Add reset controller to mt7988 infracfg Date: Wed, 17 Jan 2024 19:41:09 +0100 Message-Id: <20240117184111.62371-1-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mail-ID: df2cc20f-ff88-4040-bb30-13fca5955db2 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788362897202177333 X-GMAIL-MSGID: 1788364092710482650 |
Series |
Add reset controller to mt7988 infracfg
|
|
Message
Frank Wunderlich
Jan. 17, 2024, 6:41 p.m. UTC
From: Frank Wunderlich <frank-w@public-files.de>
Infracfg on mt7988 supports reset controller function which is
needed to get lvts thermal working.
Patches are based on clk-next due to recently added mt7988 clock driver:
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git
changes:
v3:
- start resets on RST0 offset (LVTS is RST1)
- rename offset constants with MT7988 prefix (else collision with reset.h)
v2:
- change value of constant to 0 from 9
- add missing SoB and commit-message for binding-patch
Frank Wunderlich (2):
dt-bindings: reset: mediatek: add MT7988 reset IDs
clk: mediatek: add infracfg reset controller for mt7988
drivers/clk/mediatek/clk-mt7988-infracfg.c | 23 +++++++++++++++++++
.../reset/mediatek,mt7988-resets.h | 6 +++++
2 files changed, 29 insertions(+)
Comments
On Wed, Jan 17, 2024 at 07:41:10PM +0100, Frank Wunderlich wrote: > From: Frank Wunderlich <frank-w@public-files.de> > > Add reset constants for using as index in driver and dts. > > Signed-off-by: Frank Wunderlich <frank-w@public-files.de> > --- > v3: > - add pcie reset id as suggested by angelo > > v2: > - add missing commit message and SoB > - change value of infrareset to 0 > --- > include/dt-bindings/reset/mediatek,mt7988-resets.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/include/dt-bindings/reset/mediatek,mt7988-resets.h b/include/dt-bindings/reset/mediatek,mt7988-resets.h > index 493301971367..0eb152889a89 100644 > --- a/include/dt-bindings/reset/mediatek,mt7988-resets.h > +++ b/include/dt-bindings/reset/mediatek,mt7988-resets.h > @@ -10,4 +10,10 @@ > /* ETHWARP resets */ > #define MT7988_ETHWARP_RST_SWITCH 0 > > +/* INFRA resets */ > +#define MT7988_INFRA_RST0_PEXTP_MAC_SWRST 0 > +#define MT7988_INFRA_RST1_THERM_CTRL_SWRST 1 These are just "random" numbers, why not continue the numbering from the ETHWARP? > + > + > #endif /* _DT_BINDINGS_RESET_CONTROLLER_MT7988 */ > + > -- > 2.34.1 >
On Fri, Jan 19, 2024 at 10:28:30AM +0100, AngeloGioacchino Del Regno wrote: > Il 18/01/24 23:00, Frank Wunderlich ha scritto: > > > Gesendet: Donnerstag, 18. Januar 2024 um 17:49 Uhr > > > Von: "Conor Dooley" <conor@kernel.org> > > > On Wed, Jan 17, 2024 at 07:41:10PM +0100, Frank Wunderlich wrote: > > > > From: Frank Wunderlich <frank-w@public-files.de> > > > > > > > > Add reset constants for using as index in driver and dts. > > > > > > > > Signed-off-by: Frank Wunderlich <frank-w@public-files.de> > > > > --- > > > > v3: > > > > - add pcie reset id as suggested by angelo > > > > > > > > v2: > > > > - add missing commit message and SoB > > > > - change value of infrareset to 0 > > > > --- > > > > include/dt-bindings/reset/mediatek,mt7988-resets.h | 6 ++++++ > > > > 1 file changed, 6 insertions(+) > > > > > > > > diff --git a/include/dt-bindings/reset/mediatek,mt7988-resets.h b/include/dt-bindings/reset/mediatek,mt7988-resets.h > > > > index 493301971367..0eb152889a89 100644 > > > > --- a/include/dt-bindings/reset/mediatek,mt7988-resets.h > > > > +++ b/include/dt-bindings/reset/mediatek,mt7988-resets.h > > > > @@ -10,4 +10,10 @@ > > > > /* ETHWARP resets */ > > > > #define MT7988_ETHWARP_RST_SWITCH 0 > > > > > > > > +/* INFRA resets */ > > > > +#define MT7988_INFRA_RST0_PEXTP_MAC_SWRST 0 > > > > +#define MT7988_INFRA_RST1_THERM_CTRL_SWRST 1 > > > > > > These are just "random" numbers, why not continue the numbering from the > > > ETHWARP? > > > > i can do...basicly these consts are used in DTS and driver only as index. > > > > @angelo what do you think? I though also in leaving some space to allow grouping RST0 and RST1 > > when more consts are added, else the numbers are mixed up. > > > > so e.g. let RST0 start at 20 and RST1 at 40 (or even higher, because RST0 and RST1 can have up to 32 resets). > > That will allow adding more reset constants between my values and having raising numbers. > > The resets are organized on a per-reset-controller basis, so, the ETHWARP > reset controller's first reset is RST_SWITCH, the second one is RST_something_else, > etc. while the first reset of the INFRA reset controller is PEXTP_MAC_SWRST. > > That's why ETHWARP has a reset index 0 and INFRA also starts at 0. > I think that the numbering is good as it is, and having one driver start at index 5 > while the other starts at index 12 would only overcomplicate registering the resets > in each driver, or waste bytes by making unnecessarily large arrays, for (imo) no > good reason. > > This is one header, but it should "in theory" be more than one... so we would have > one for each hardware block - but that'd make the reset directory over-crowded, as > other MediaTek SoCs have got even more resets in even more hardware blocks than the > MT7988. That'd be something like ~4 reset headers per SoC (and will increase with > newer ones)... > ...and this is why we have one binding header for resets. That's okay. The commit message leaves me, who clearly isn't a mediatek guy, with no information as to why these are not one contiguous set. IMO being for different reset controllers entirely is fine. > On the topic of leaving space to allow grouping RST0/RST1: -> No. <- > The indices have to start from zero and have to be sequential, with no holes. Agreed.
Am 19. Januar 2024 18:04:36 MEZ schrieb Conor Dooley <conor@kernel.org>: >On Fri, Jan 19, 2024 at 10:28:30AM +0100, AngeloGioacchino Del Regno wrote: >> >> The resets are organized on a per-reset-controller basis, so, the ETHWARP >> reset controller's first reset is RST_SWITCH, the second one is RST_something_else, >> etc. while the first reset of the INFRA reset controller is PEXTP_MAC_SWRST. >> >> That's why ETHWARP has a reset index 0 and INFRA also starts at 0. >> I think that the numbering is good as it is, and having one driver start at index 5 >> while the other starts at index 12 would only overcomplicate registering the resets >> in each driver, or waste bytes by making unnecessarily large arrays, for (imo) no >> good reason. >> >> This is one header, but it should "in theory" be more than one... so we would have >> one for each hardware block - but that'd make the reset directory over-crowded, as >> other MediaTek SoCs have got even more resets in even more hardware blocks than the >> MT7988. That'd be something like ~4 reset headers per SoC (and will increase with >> newer ones)... >> ...and this is why we have one binding header for resets. > >That's okay. The commit message leaves me, who clearly isn't a mediatek >guy, with no information as to why these are not one contiguous set. >IMO being for different reset controllers entirely is fine. > >> On the topic of leaving space to allow grouping RST0/RST1: -> No. <- >> The indices have to start from zero and have to be sequential, with no holes. > >Agreed. Hi, Just a friendly reminder. As far as i understood, Patches are fine so far and do not need any rework,right? But i have not seen them picked up yet in linux-next. regards Frank
On Thu, Feb 01, 2024 at 12:40:17PM +0100, Frank Wunderlich wrote: > Am 19. Januar 2024 18:04:36 MEZ schrieb Conor Dooley <conor@kernel.org>: > >On Fri, Jan 19, 2024 at 10:28:30AM +0100, AngeloGioacchino Del Regno wrote: > >> > >> The resets are organized on a per-reset-controller basis, so, the ETHWARP > >> reset controller's first reset is RST_SWITCH, the second one is RST_something_else, > >> etc. while the first reset of the INFRA reset controller is PEXTP_MAC_SWRST. > >> > >> That's why ETHWARP has a reset index 0 and INFRA also starts at 0. > >> I think that the numbering is good as it is, and having one driver start at index 5 > >> while the other starts at index 12 would only overcomplicate registering the resets > >> in each driver, or waste bytes by making unnecessarily large arrays, for (imo) no > >> good reason. > >> > >> This is one header, but it should "in theory" be more than one... so we would have > >> one for each hardware block - but that'd make the reset directory over-crowded, as > >> other MediaTek SoCs have got even more resets in even more hardware blocks than the > >> MT7988. That'd be something like ~4 reset headers per SoC (and will increase with > >> newer ones)... > >> ...and this is why we have one binding header for resets. > > > >That's okay. The commit message leaves me, who clearly isn't a mediatek > >guy, with no information as to why these are not one contiguous set. > >IMO being for different reset controllers entirely is fine. > > > >> On the topic of leaving space to allow grouping RST0/RST1: -> No. <- > >> The indices have to start from zero and have to be sequential, with no holes. > > > >Agreed. > > Hi, > > Just a friendly reminder. > > As far as i understood, Patches are fine so far and do not need any rework,right? I suspect I was asking for a commit message that explains why these numbers don't continue in sequence. With that, Acked-by: Conor Dooley <conor.dooley@microchip.com> Cheers, Conor. > > But i have not seen them picked up yet in linux-next. > regards Frank
On Thu, Feb 01, 2024 at 03:23:03PM +0100, Frank Wunderlich wrote: > > Gesendet: Donnerstag, 01. Februar 2024 um 14:11 Uhr > > Von: "Conor Dooley" <conor.dooley@microchip.com> > > I suspect I was asking for a commit message that explains why these > > numbers don't continue in sequence. With that, > > Acked-by: Conor Dooley <conor.dooley@microchip.com> > > > > Cheers, > > Conor. > > OK, i would add this to commit message: > > "Value is starting again from 0 because resets are used in another driver > than existing constants." s/driver/device/ and sure.