From nobody Thu Nov 14 17:17:04 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0A67C77B61 for ; Wed, 29 Mar 2023 16:02:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229759AbjC2QCS (ORCPT ); Wed, 29 Mar 2023 12:02:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231485AbjC2QBj (ORCPT ); Wed, 29 Mar 2023 12:01:39 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60FDF6A72; Wed, 29 Mar 2023 09:00:25 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1phYDc-0003S1-1W; Wed, 29 Mar 2023 18:00:13 +0200 Date: Wed, 29 Mar 2023 17:00:06 +0100 From: Daniel Golle To: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Sean Wang , Landen Chao , DENG Qingfang , Philipp Zabel Cc: Sam Shih , Lorenzo Bianconi , John Crispin , Felix Fietkau Subject: [RFC PATCH net-next v3 12/15] net: dsa: mt7530: add support for single-chip reset line Message-ID: <0f696278bd8d13121a500f80cfe2f806debe4da5.1680105013.git.daniel@makrotopia.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Similar to multi-chip-module MT7530 also MT7988 uses an internal reset line instead of using an optional reset GPIO like it is the case for external MT7530 and MT7531 ICs. Add support for internal but non-MCM reset line in preparation for adding support for MT7988. Signed-off-by: Daniel Golle --- drivers/net/dsa/mt7530.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index c6fad2d156160..fd55ddc2d1eb3 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -3066,6 +3066,12 @@ mt7530_probe_common(struct mt7530_priv *priv) dev_err(dev, "Couldn't get our reset line\n"); return PTR_ERR(priv->rstc); } + } else if (!priv->bus) { + priv->rstc =3D devm_reset_control_get(dev, NULL); + if (IS_ERR(priv->rstc)) { + dev_err(dev, "Couldn't get our reset line\n"); + return PTR_ERR(priv->rstc); + } } else { priv->reset =3D devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); --=20 2.39.2