Message ID | 20240104173930.13907-2-linux@fw-web.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-17053-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp5767723dyb; Thu, 4 Jan 2024 09:56:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IGn70+W3lSboj2uGZ76EjwA/FbM3e84MKs+7pGJ8CaJygQqH2MH/K95HVgPSXiSlbGpyXJ3 X-Received: by 2002:a05:651c:1a23:b0:2cc:d4cd:18a3 with SMTP id by35-20020a05651c1a2300b002ccd4cd18a3mr584633ljb.89.1704390962150; Thu, 04 Jan 2024 09:56:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704390962; cv=none; d=google.com; s=arc-20160816; b=GPkXXa3IM3gb7ywJchns4fbE+NYVF7CEiIyFF1EVGFbs/OQ4nA05Kcpy7ngcXrOt5N 18auYgjxgBlA+dysr9IbrOGW24rzBPj5DgamT89ekFby06W6xX7tLAn4AhnVa055G3Bf 1oGLhZXR4kkmGjV52lgJ2PqJ48Vd5/XXdhHtI240JoCPqv0LNfxyV1yx7dvk5fWqFn+n I0HH8uZBDOxsloaz282Wj5uhRWJYPhmQLInEuwKD2VWlypdt0fQ2g6L6EJpoAeXXW08Q q8+/BcGWdOo2l704vB98YvWcWbQpCltJmdvArloCSFvHmOPMtNPfLnaoTAkdy8pXxdVS mLlQ== ARC-Message-Signature: i=1; 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=u31vqb832iBo503aU0D4rkKh2sGRkH9JUeHiMN+G1mE=; fh=L3mDZOwNyKKHiHRMVtDJkV8iuFRPURJKz0bfZqqzP14=; b=LB2y0CKPptoHHyowBYvneR0UoJ0WBdxB+GGuCi3YAK1OUBr+CEhVmVEgU+7jhp+22c uSSEjUw3uk76Sh+nX4kX3XC4O8kfhZXw+WMUmSEZDu5EF7HbDVbfSj4N174ecsjCkrWY sKZE7NKs3hkR4+6g57ePV2Q6XHK6MAIa5J48ksiA1diCaTJuFbNQqYyqP46hDSU8P8uC mO6b3MpjmZzrad+yPHN2dLshg86L5t0/PRflFl8uxAf/elfCgpVOTI9FJL1rNSxZPIDN PZXqmTgGy70jKRnns/1Avu6XnPWlMk3w4B1JWtdZHP2uuvKKc6Q3i8czdefkP9hDWCgq MkOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=HJKUGDYh; spf=pass (google.com: domain of linux-kernel+bounces-17053-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17053-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h10-20020a50cdca000000b0055351ec4a2dsi13045046edj.386.2024.01.04.09.56.01 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 09:56:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17053-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=HJKUGDYh; spf=pass (google.com: domain of linux-kernel+bounces-17053-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17053-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7B1751F257D9 for <ouuuleilei@gmail.com>; Thu, 4 Jan 2024 17:45:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 237F328DBA; Thu, 4 Jan 2024 17:45:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="HJKUGDYh" X-Original-To: linux-kernel@vger.kernel.org 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 0F871286BB; Thu, 4 Jan 2024 17:45:36 +0000 (UTC) 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 97F7B5FF8F; Thu, 4 Jan 2024 17:39:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1704389986; 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: in-reply-to:in-reply-to:references:references; bh=u31vqb832iBo503aU0D4rkKh2sGRkH9JUeHiMN+G1mE=; b=HJKUGDYhE03OgtP34sIwOijceDMSih37DZxiGdTGjoRC6DSEuYCZJZalZv/0hv2/AF2UdM PJpPtswhQMBQwdshvoWrOxUHwgznbLGVSQCnA/bfkR9LPlrQjRjD7sgOSnZbAnVyhptJAa F26E5mR9V7cLPGIYmpgXC2RB3I/hQbc= Received: from frank-G5.. (fttx-pool-157.180.226.237.bambit.de [157.180.226.237]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id BF7BB100738; Thu, 4 Jan 2024 17:39:45 +0000 (UTC) From: Frank Wunderlich <linux@fw-web.de> To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich <frank-w@public-files.de>, 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>, 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 Subject: [PATCH 1/2] dt-bindings: reset: mediatek: add MT7988 LVTS reset ID Date: Thu, 4 Jan 2024 18:39:29 +0100 Message-Id: <20240104173930.13907-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240104173930.13907-1-linux@fw-web.de> References: <20240104173930.13907-1-linux@fw-web.de> 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: d6c2a594-df4e-40d7-80ec-fbc130c01098 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787183457525474913 X-GMAIL-MSGID: 1787183457525474913 |
Series |
Add reset controller to mt7988 infracfg
|
|
Commit Message
Frank Wunderlich
Jan. 4, 2024, 5:39 p.m. UTC
From: Frank Wunderlich <frank-w@public-files.de>
---
include/dt-bindings/reset/mediatek,mt7988-resets.h | 4 ++++
1 file changed, 4 insertions(+)
Comments
Hi Frank, On Thu, Jan 04, 2024 at 06:39:29PM +0100, Frank Wunderlich wrote: > From: Frank Wunderlich <frank-w@public-files.de> > > --- > include/dt-bindings/reset/mediatek,mt7988-resets.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/dt-bindings/reset/mediatek,mt7988-resets.h b/include/dt-bindings/reset/mediatek,mt7988-resets.h > index 493301971367..3f1e4ec07ad5 100644 > --- a/include/dt-bindings/reset/mediatek,mt7988-resets.h > +++ b/include/dt-bindings/reset/mediatek,mt7988-resets.h > @@ -10,4 +10,8 @@ > /* ETHWARP resets */ > #define MT7988_ETHWARP_RST_SWITCH 0 > > +/* INFRA resets */ > +#define MT7988_INFRA_RST0_THERM_CTRL_SWRST 9 I suppose this argument applies here as well: "IDs should start from 0 or 1 and increment by 1. If these are not IDs, then you do not need them in the bindings." https://lore.kernel.org/all/59629ec1-cc0c-4c5a-87cc-ea30d64ec191@linaro.org/ As a consequence, as what you are describing there are hardware bits rather than IDs used by the driver, you can just use a numeric constant in device tree instead of adding dt-bindings header. Or change the driver so RST0_THERM_CTRL_SWRST could be defined as 0.
On 04/01/2024 19:12, Daniel Golle wrote: > Hi Frank, > > On Thu, Jan 04, 2024 at 06:39:29PM +0100, Frank Wunderlich wrote: >> From: Frank Wunderlich <frank-w@public-files.de> >> >> --- >> include/dt-bindings/reset/mediatek,mt7988-resets.h | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/include/dt-bindings/reset/mediatek,mt7988-resets.h b/include/dt-bindings/reset/mediatek,mt7988-resets.h >> index 493301971367..3f1e4ec07ad5 100644 >> --- a/include/dt-bindings/reset/mediatek,mt7988-resets.h >> +++ b/include/dt-bindings/reset/mediatek,mt7988-resets.h >> @@ -10,4 +10,8 @@ >> /* ETHWARP resets */ >> #define MT7988_ETHWARP_RST_SWITCH 0 >> >> +/* INFRA resets */ >> +#define MT7988_INFRA_RST0_THERM_CTRL_SWRST 9 > > I suppose this argument applies here as well: > > "IDs should start from 0 or 1 and increment by 1. If these are not IDs, > then you do not need them in the bindings." > > https://lore.kernel.org/all/59629ec1-cc0c-4c5a-87cc-ea30d64ec191@linaro.org/ > > As a consequence, as what you are describing there are hardware bits If this is existing driver which already uses such pattern, then it is fine. I usually comment this on new drivers which can be changed. Best regards, Krzysztof
Hi > Gesendet: Donnerstag, 04. Januar 2024 um 20:19 Uhr > Von: "Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org> > Betreff: Re: [PATCH 1/2] dt-bindings: reset: mediatek: add MT7988 LVTS reset ID > > On 04/01/2024 19:12, Daniel Golle wrote: > > Hi Frank, > > > > On Thu, Jan 04, 2024 at 06:39:29PM +0100, Frank Wunderlich wrote: > >> From: Frank Wunderlich <frank-w@public-files.de> > >> > >> --- > >> include/dt-bindings/reset/mediatek,mt7988-resets.h | 4 ++++ > >> 1 file changed, 4 insertions(+) > >> > >> diff --git a/include/dt-bindings/reset/mediatek,mt7988-resets.h b/include/dt-bindings/reset/mediatek,mt7988-resets.h > >> index 493301971367..3f1e4ec07ad5 100644 > >> --- a/include/dt-bindings/reset/mediatek,mt7988-resets.h > >> +++ b/include/dt-bindings/reset/mediatek,mt7988-resets.h > >> @@ -10,4 +10,8 @@ > >> /* ETHWARP resets */ > >> #define MT7988_ETHWARP_RST_SWITCH 0 > >> > >> +/* INFRA resets */ > >> +#define MT7988_INFRA_RST0_THERM_CTRL_SWRST 9 > > > > I suppose this argument applies here as well: > > > > "IDs should start from 0 or 1 and increment by 1. If these are not IDs, > > then you do not need them in the bindings." > > > > https://lore.kernel.org/all/59629ec1-cc0c-4c5a-87cc-ea30d64ec191@linaro.org/ > > > > As a consequence, as what you are describing there are hardware bits > > If this is existing driver which already uses such pattern, then it is > fine. I usually comment this on new drivers which can be changed. this is a new driver so i guess i should change this like daniel suggests. As i want to use this constant in dts and driver i would like keep it as binding in the reset header, but because i use it only as index in the infra_idx_map array its value does not need to have the value needed in hardware. i kept it same to not have different values and for ordering purposes (when the other possible resets are added). so the way starting at 0 will be the preferred one for me, is this ok? regards Frank
diff --git a/include/dt-bindings/reset/mediatek,mt7988-resets.h b/include/dt-bindings/reset/mediatek,mt7988-resets.h index 493301971367..3f1e4ec07ad5 100644 --- a/include/dt-bindings/reset/mediatek,mt7988-resets.h +++ b/include/dt-bindings/reset/mediatek,mt7988-resets.h @@ -10,4 +10,8 @@ /* ETHWARP resets */ #define MT7988_ETHWARP_RST_SWITCH 0 +/* INFRA resets */ +#define MT7988_INFRA_RST0_THERM_CTRL_SWRST 9 + #endif /* _DT_BINDINGS_RESET_CONTROLLER_MT7988 */ +