Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2800761lqt; Tue, 23 Apr 2024 01:49:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVbe0VPzcc3GqUvAFeGR5uMFkbPWUWfsPFc6oAlUTdej63zULBe17v9r6/gBCKteYssxDeH4E+WePJCgYiKb2OZyDBJUvvsK3Y3jbuS2w== X-Google-Smtp-Source: AGHT+IEUnwyVBLm1EU/wzMVdcUjv7DOas0CCUYx/uMbircUHORvhHSrWjNo273OUXqfPfCZN0eZT X-Received: by 2002:a0c:e20d:0:b0:69b:6fc5:ce4d with SMTP id q13-20020a0ce20d000000b0069b6fc5ce4dmr14925786qvl.2.1713862142803; Tue, 23 Apr 2024 01:49:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713862142; cv=pass; d=google.com; s=arc-20160816; b=nfSWhSMkUo4XapBZFJy+s1GgcG784Z7vEGhgmZ1Fv4C/LMOoRd59pPvABvDCuJPHqW PD8a1Q1ui1qi+z8HXaIdH9zm5XhfO/CJgQczcxhOqJapMAvNi8ztIkhgFWah28W2mOGQ ClVE9woqXp784q23hNmISs88kL3w0ieeAoT1ENIPweGEWzQhTujLdxq6MiL6RxxX3Hyf NzqYtDWwVFjy0yiJaKOxOmCHYserykXVm6/qR1UW1O54o3p9ojFZ2GOtUVkQg49DYiso BzsILVnXc+DRjCPtdSeHMVZoL6c+4lwd65e156gC8SvKsfZDw8DV28ZEKnvqIlQtSruY UdaA== 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=izBQf8prT76mBbNRBNj+F/z8bHoPWICC5dVB8vaXVtM=; fh=+p5sS7B5iKcwkycQh0h5VaLEvZz1hwuLv2y6vlvRXlE=; b=CnbIbDXvSUVokg78o0PW1YCuA6cYKTYe+nlAo3jdSFOCWivxeBqc14k5kqntkuHbCd 2fNm15/uP81qAVIor5jwNJe/o2Wrp3N3sqLgqiSezTB5Rs0/LLE30CqFSREr6GI3shXu Ta28UM2QtVplWpdZlS8YUvI7kEGhKo7+errefhRPg3R2KTsal+/I6G+DsFjKpeCC8KSq WJ7IttzGhS7GBXs7BY5YXuOoVlcY3cbWYfL9ZotZmTkwaZPR/mX1LgMZOJ8Cgrtjo8nz e+NJtNC8Wr9gBAsmjCCanQDDXZDHadIW1u5kKz8XvuzqbOaRxpK2pw4+PjFye2k6ofpU m7/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VIII61E+; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-154727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gs9-20020a056214226900b0069b77150c11si12158598qvb.169.2024.04.23.01.49.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 01:49:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154727-linux.lists.archive=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=@ti.com header.s=ti-com-17Q1 header.b=VIII61E+; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-154727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com 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 886BD1C215D4 for ; Tue, 23 Apr 2024 08:49:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0794556446; Tue, 23 Apr 2024 08:48:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="VIII61E+" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 8899654FAE; Tue, 23 Apr 2024 08:48:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713862133; cv=none; b=exmu+O0G0LqlSZRPRT2aYHBBUA4o/bgSu7+l1VAMLW+hxiiXBPfP8glhmqBmUhYOBCvwUkcrZEh3+8eTkT3ZLbZjFY8mCgFvjyb/1x/tQrOKVZREJYGMDLIwNa8E+uau3ZFs1nb7VZzAk9Vt6L93ZREANqDrft04VS9jZKxSxT4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713862133; c=relaxed/simple; bh=Cq8DsZzwx0gUO/0lV/NY2e6qQt/0n/otAXdUhqCixM0=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=U8g5otnYUpIQo9lFewQVMdXzVAd1M3cyTZdt3bJUrg91DGRxzljFPFaIbQ6EudCD1VxbbiTdXvRiM9yDFMjT8l63J7lfkS5YZnreFI+3vLKsZ1K1PhqO9LHaKd02ndKLqi7QddjQ0UeEFqLEM5/+q2t/bAST8f1Rv+hW7DAMZrw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=VIII61E+; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 43N8mYv0102865; Tue, 23 Apr 2024 03:48:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1713862114; bh=izBQf8prT76mBbNRBNj+F/z8bHoPWICC5dVB8vaXVtM=; h=From:To:CC:Subject:Date; b=VIII61E+5vcBkTOEEyscEbswwz/uuKZ8jjezilBEc4an9hcmjqrcU/oo/kr5EfHAV 4QENQD6fgfQDsPzgcDapSCLbuBSNf2NrrwKwYPrVQ+nW0UFEXAe65GyhIoJZse1/SM vSf5Gi+IWmqhEeFFjJ3OwJvjXGOncK+xtB67ECNc= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 43N8mYCH049178 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 23 Apr 2024 03:48:34 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 23 Apr 2024 03:48:33 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 23 Apr 2024 03:48:33 -0500 Received: from fllv0122.itg.ti.com (fllv0122.itg.ti.com [10.247.120.72]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 43N8mXWC071849; Tue, 23 Apr 2024 03:48:33 -0500 Received: from localhost (danish-tpc.dhcp.ti.com [10.24.69.25]) by fllv0122.itg.ti.com (8.14.7/8.14.7) with ESMTP id 43N8mW3t021108; Tue, 23 Apr 2024 03:48:33 -0500 From: MD Danish Anwar To: Siddharth Vadapalli , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Russell King , Heiner Kallweit , Andrew Lunn CC: , , , Vignesh Raghavendra , , Roger Quadros , MD Danish Anwar Subject: [PATCH net] net: phy: dp83869: Fix MII mode failure Date: Tue, 23 Apr 2024 14:18:28 +0530 Message-ID: <20240423084828.1309294-1-danishanwar@ti.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 The DP83869 driver sets the MII bit (needed for PHY to work in MII mode) only if the op-mode is either DP83869_100M_MEDIA_CONVERT or DP83869_RGMII_100_BASE. Some drivers i.e. ICSSG support MII mode with op-mode as DP83869_RGMII_COPPER_ETHERNET for which the MII bit is not set in dp83869 driver. As a result MII mode on ICSSG doesn't work and below log is seen. TI DP83869 300b2400.mdio:0f: selected op-mode is not valid with MII mode icssg-prueth icssg1-eth: couldn't connect to phy ethernet-phy@0 icssg-prueth icssg1-eth: can't phy connect port MII0 Fix this by setting MII bit for DP83869_RGMII_COPPER_ETHERNET op-mode as well. Fixes: 94e86ef1b801 ("net: phy: dp83869: support mii mode when rgmii strap cfg is used") Signed-off-by: MD Danish Anwar --- NOTE: This patch is needed for MII mode to work for ICSSG Ethernet driver. I will post the device tree patch for MII mode and mark that as dependent on this patch. drivers/net/phy/dp83869.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/dp83869.c b/drivers/net/phy/dp83869.c index fa8c6fdcf301..d7aaefb5226b 100644 --- a/drivers/net/phy/dp83869.c +++ b/drivers/net/phy/dp83869.c @@ -695,7 +695,8 @@ static int dp83869_configure_mode(struct phy_device *phydev, phy_ctrl_val = dp83869->mode; if (phydev->interface == PHY_INTERFACE_MODE_MII) { if (dp83869->mode == DP83869_100M_MEDIA_CONVERT || - dp83869->mode == DP83869_RGMII_100_BASE) { + dp83869->mode == DP83869_RGMII_100_BASE || + dp83869->mode == DP83869_RGMII_COPPER_ETHERNET) { phy_ctrl_val |= DP83869_OP_MODE_MII; } else { phydev_err(phydev, "selected op-mode is not valid with MII mode\n"); base-commit: 6bea4f03c6a4e973ef369e15aac88f37981db49e -- 2.34.1