Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1674897rwl; Sun, 26 Mar 2023 07:10:21 -0700 (PDT) X-Google-Smtp-Source: AKy350ZKVFyuOFGNAOgpJySxEpBBHfxl5Gd13S5ISGbqX09selyzMTdAQiMcfNll+CvuXNUhSxUO X-Received: by 2002:a17:906:144a:b0:944:394:93f7 with SMTP id q10-20020a170906144a00b00944039493f7mr1948500ejc.61.1679839821295; Sun, 26 Mar 2023 07:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679839821; cv=none; d=google.com; s=arc-20160816; b=IQ2vle9Sg0cUKSvspDPT9tidNdyrMLkCZbQggSDs5071127VaLuX3vovENljHJxSnp IXAPJ6NTC9daDPq5Ed2WUGucJlDo9cVOIDIVYfPEZe7XqhY9bwxHT6VY0Ch8FmJQaQKq pN4iy96+ipKXGiqd0MTgWBkE8swtpRPteX4Aham4wo+q82NZl8xjoOSYrCpzF46gpMAF I4n2rpEtDAPFStyUov6WmHyI39sYBkJnW1D5y86abpiVcbRLansmUc6Qk/47aZY0XniO Bu1L42eDevuvPmZv5MrWdzuyQq4GprofLgBkyBLOutgEJvxia/9wCZkERtjfvrlGwDN/ P3jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gZ3M3RaLFnNGnHTnAZjnH0dZMMcYJsuKybc/E0bZ/Sg=; b=xAPFZZQ/xUPncOVkW+mMxfdN/ZAgWkG9krxTTes6jwmw8Efn+DlmD6W2FojruD+d1Z xu68TNq5Zhwcbow0wcjsBNLoTnEQLCe6lBSnLso1VuU8OMN0i8FHWpEuOLJxAMLI9LZD kTtY1AFzfnFRuVseRHA28/SOvXUmlPrj51a+Vgk2LkZRDy+odFydlKEsXiEWGir1T8iA +0R6wvXzY/fg1Fyv7z6YJM3Z9XqrxC7sG2YK6dR8B2dJHVF31YwYhMkV4LqD3j5NIXpp qDm5bcP9sYmMiTG2Kg1vIUBhTrylnZ9hqA9U1bZarPDUQHtEMxTXczjy9XC/2hZHX0B1 Wu8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PeCR9X86; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x12-20020a1709065acc00b00933acc77a33si18216521ejs.542.2023.03.26.07.09.57; Sun, 26 Mar 2023 07:10:21 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PeCR9X86; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232199AbjCZOJT (ORCPT + 99 others); Sun, 26 Mar 2023 10:09:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231877AbjCZOJC (ORCPT ); Sun, 26 Mar 2023 10:09:02 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F14015FDC; Sun, 26 Mar 2023 07:08:46 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id 59so5038502qva.11; Sun, 26 Mar 2023 07:08:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679839726; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gZ3M3RaLFnNGnHTnAZjnH0dZMMcYJsuKybc/E0bZ/Sg=; b=PeCR9X86QsaVx20aY4cZ/N/U/BGXc9v0DseOfWum4DxYo6HDHO24fXFQLN385sn7Ak ZnG+jG5QCzkpJ5OEPA4GGNujEszVt6QCOLJqDleCWpkO2MvcSaSYN9J7THCkRyhj7dy9 P7Su8HM8g/fddSiIMePJNUY8gHW02b2wpKHcIcEb+FKDaXzhdb0AdbacaM/cIeruVxsm CZu38ZsgmVurt3yKyYDFLeRrUh8iHltb17BOTd27+2wzzJfAgtws7/vAybMOAgcnFh4Z bVXqgEIdaM2bEl5swVmeZPpepIvamUtvQXclBqIfn2V7fJmLVvHsibGC3GOAiXlzSqE0 aAeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679839726; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gZ3M3RaLFnNGnHTnAZjnH0dZMMcYJsuKybc/E0bZ/Sg=; b=amkYmb+5iK4h+YWyR4xT+LbJjn88rvnNqhyQZiKwO7yB/QebncrSltp8MvHoHF9FJC +vGzyVuvWqTlEji/To8pTFz/cZUwxjXarATR3K0LlJAkqROL1mH4xoX/buSn3kQtbgZj q1GrDy6pAYveQJz6A8nat/CeNNeKKYnZFi+PnT9CCDCqYf31IacvmZa3I2YMK0ATiVrM yZtgxF1LPsyIhkCV/YAZQGLsVKVhr7LWZ4Gsv6NKau30C6KfL1lstKtibe6xYhv2d20i Ga1aklAHnZY/4DVFvIciKCSERD7mJuNDEwjAoRlUd6lsgRmIPksarLPrHAB53jhXD7DU GIEQ== X-Gm-Message-State: AAQBX9e8zKb3cmwkKTHVIfVw3oznmMv46vpj1VcDfwe/fhGrjfMdbWx4 POqe2KJ8qkd5S54Bb4qTOjs= X-Received: by 2002:a05:6214:f67:b0:5aa:d98a:8ace with SMTP id iy7-20020a0562140f6700b005aad98a8acemr17506531qvb.19.1679839725854; Sun, 26 Mar 2023 07:08:45 -0700 (PDT) Received: from arinc9-PC.lan ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id j5-20020a0ce6a5000000b005dd8b93458esm2212220qvn.38.2023.03.26.07.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 07:08:45 -0700 (PDT) From: arinc9.unal@gmail.com X-Google-Original-From: arinc.unal@arinc9.com To: Sean Wang , Landen Chao , DENG Qingfang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= Cc: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Russell King , Landen Chao , Ilya Lipnitskiy , Richard van Schagen , Richard van Schagen , Frank Wunderlich , erkin.bozoglu@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH net 4/7] net: dsa: mt7530: set both CPU port interfaces to PHY_INTERFACE_MODE_NA Date: Sun, 26 Mar 2023 17:08:15 +0300 Message-Id: <20230326140818.246575-5-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230326140818.246575-1-arinc.unal@arinc9.com> References: <20230326140818.246575-1-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, 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 From: Arınç ÜNAL Set interfaces of both CPU ports to PHY_INTERFACE_MODE_NA. Either phylink or mt7530_setup_port5() on mt7530_setup() will handle the rest. This is already being done for port 6, do it for port 5 as well. Fixes: 38f790a80560 ("net: dsa: mt7530: Add support for port 5") Tested-by: Arınç ÜNAL Signed-off-by: Arınç ÜNAL --- drivers/net/dsa/mt7530.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 6d33c1050458..3deebdcfeedf 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2203,14 +2203,18 @@ mt7530_setup(struct dsa_switch *ds) mt7530_rmw(priv, MT7530_TRGMII_RD(i), RD_TAP_MASK, RD_TAP(16)); + /* Let phylink decide the interface later. If port 5 is used for phy + * muxing, its interface will be handled without involving phylink. + */ + priv->p5_interface = PHY_INTERFACE_MODE_NA; + priv->p6_interface = PHY_INTERFACE_MODE_NA; + /* Enable port 6 */ val = mt7530_read(priv, MT7530_MHWTRAP); val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS; val |= MHWTRAP_MANUAL; mt7530_write(priv, MT7530_MHWTRAP, val); - priv->p6_interface = PHY_INTERFACE_MODE_NA; - /* Enable and reset MIB counters */ mt7530_mib_reset(ds); -- 2.37.2