Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp837071rwl; Wed, 29 Mar 2023 09:05:16 -0700 (PDT) X-Google-Smtp-Source: AKy350ZRg7X+fMCnDHDQ/93RDWjfqmj0xBduUZ2rjABpFOIM5IE1M8p7Y3+VM2goqECCDqnccYN+ X-Received: by 2002:aa7:94bb:0:b0:626:2901:8987 with SMTP id a27-20020aa794bb000000b0062629018987mr17115316pfl.18.1680105916415; Wed, 29 Mar 2023 09:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680105916; cv=none; d=google.com; s=arc-20160816; b=LlzwreKpR6oCwdj8EcLbgF3vxERgqd9M8arONGcBrMbbMi6A0nqrK6oWt0KINqr3wg PLHnlu8iaovuEMjNOBjG9+GSJoxVMNVSzQfKtLGi5u7KK5+RcnB1w5vZeAm37YIc999E 7lZkcgJmcprb4i5haO3tM7yw4OX1wc7Qh06AP8IXhRlmhmv1miNzf3oW5eqcTvl55Oq5 s3DlBhTR/yFmMTqSbyNdLXcEnV3Iu+0TZN7DzBECVTgFbng4Iwd9JPq03K7FGfcN/1xU az+eBkom71eWya6wf2MDUuyXAybM70P1RVQ91QjznYbI5kuwXzjsWzsKnBhSxZjNhPAn vngg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=aqizc6/ZjAWz90A3jk7+7u+bSaPAPILOhNROkch9Cc4=; b=sT2+vZYK6NMNilcEhwGjH/ej4PlMNdrWMNsoag0J02/m4sJOSGAgFx1FlLGfPatKdD lZSXWni5K3IQ5ydKVhLlnrZ+3e5LlXGHI6hmR19ll8HLvEZ8lYUAAe8jNd+QeN/MhJIY TaVTjbPCAY3QVSezNMQFGekDIQK/CXnU+JGpSnq3Pi0EcUkB6iG9X8Hvw/efJu4l7zM7 ss47+DtTePejJHMpMXoBxJOt4FsEHR7PFVt8PFDn4T3p3cTZXZigevSh1vicMZV7XJth TVKK7Z0tKbMLygw6Hz3awJ/ktcnB46uFarYhy2RLiWrYq9B6rMn/nGBzzOZHIH10Tv8w evWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs67-20020a632846000000b0051323b97e32si12587322pgb.835.2023.03.29.09.04.55; Wed, 29 Mar 2023 09:05:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229838AbjC2QCQ (ORCPT + 99 others); Wed, 29 Mar 2023 12:02:16 -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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = 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 = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); -- 2.39.2