Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1013946pxb; Thu, 9 Sep 2021 18:01:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4rbePX7uXX5yONnETj3+wjCjmGmfwifEU+9jnFx+fk6XOacKuIvZRYD3zDzTCxE1G46mz X-Received: by 2002:a5e:da01:: with SMTP id x1mr5114597ioj.43.1631235698851; Thu, 09 Sep 2021 18:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631235698; cv=none; d=google.com; s=arc-20160816; b=r1m8g7/o7CR8eomfn+f3+ipZ+Ujk3dYtKfr2auOgAXXoDLPckMD1gO7RNDM7ElImMz UAc21fKnNOLtzxmFlw/Vt9ppsvILmKqiJiKKawOmKh0fyHAByAnkuvKtVOVCuVnnDoSV 0Va9qDLnpeQzsIhvv+a10VPnjPgUuMbMZq4dbrjnUTFEzuUTurrKbFMrZYx4O8ahOe9W +1pPEFgP08RQKsRXZhxumdx8hoAGd85fJLs5xwac5KKtiwZXK0c2bvguQfJiKuTtZHly f2YPHFHHAObbdwEDvZCvSa/oinAGSzS4P/Bk3awLGtiVhOXIU5k8lafpsAXOv0w/A855 6vHw== 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=Hkg6PFidr3sJsdPiN/7MXmcnDKMgOVzkwnbloGeAIeo=; b=D99F9A3vNJaXEgbJIRQb48XNHGZYvdVKgidLxcAXyz7MEQ+Bdh+Cklll7f7gXAvKxP OHpILb12hJoNg+iYtgZtf0hj4/pOM5xABXcDa05ePc4b6eW82TpTD7ntrBHlVJDCt3P4 TgPWPTOE8dcQHoh4pkWR8TecHDYz+7qx3n5DCuWpQafz9/v4g0fBop/eYJsswWlgYUqs egXFqKVdBz7l5QQEszsDPx+oygMnVbY5cwtgrwXtoP7LJbX1OqMInQBykCe72cBjRgO+ gCGV/JMxjQ85INBj1SqalNWbLZGQNQwCRYGbskrMBOzvy3kDkEM5RmKndj/dlLnt6ohu yBaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OZRiGW60; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si3593696iow.113.2021.09.09.18.01.27; Thu, 09 Sep 2021 18:01:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OZRiGW60; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244980AbhIJBAU (ORCPT + 99 others); Thu, 9 Sep 2021 21:00:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:48856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234458AbhIJAXX (ORCPT ); Thu, 9 Sep 2021 20:23:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 466CC60FC0; Fri, 10 Sep 2021 00:22:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233333; bh=0qoPz0XxPfXHdEYRMLp8Eu5l/yKnCJEtPrEdBPPsYCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OZRiGW60AyTQbjGw9XCJ+nc6o9Ad1Va58IBU3QX88Nx+PD63MWpjKPUFvS4VViI74 Acp9vokF+qdxKXwLtvMCfmfzyrXYp261YJdndTcuLX7wM2GlUjSJaoFnMp5zbffSq0 mzrWgo3VZVxG0huyDnauz9UqLnR0WPgtFgvD2cRnO0SbN0ZvQxW2ZaWJUbLRv9NiMV RHLIQp2085vM5f4JxkGt1rR4OBDqFWUOmAAeMRnSABO544X3qlfJMEo/N7GFKLHnT3 ApJEWeuXHBA9tncVV9bP+hC6T1I5fpRdLmCc1gdZLjyJwXoZxLf9heWo/fnCTHklGC 8MeTKLmxt6ZBw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Vladimir Oltean , Thomas Bogendoerfer , Sasha Levin , linux-mips@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 22/37] MIPS: mscc: ocelot: mark the phy-mode for internal PHY ports Date: Thu, 9 Sep 2021 20:21:27 -0400 Message-Id: <20210910002143.175731-22-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002143.175731-1-sashal@kernel.org> References: <20210910002143.175731-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Oltean [ Upstream commit eba54cbb92d28b4f6dc1ed5f73f5187b09d82c08 ] The ocelot driver was converted to phylink, and that expects a valid phy_interface_t. Without a phy-mode, of_get_phy_mode returns PHY_INTERFACE_MODE_NA, which is not ideal because phylink rejects that. The ocelot driver was patched to treat PHY_INTERFACE_MODE_NA as PHY_INTERFACE_MODE_INTERNAL to work with the broken DT blobs, but we should fix the device trees and specify the phy-mode too. Signed-off-by: Vladimir Oltean Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/boot/dts/mscc/ocelot_pcb120.dts | 4 ++++ arch/mips/boot/dts/mscc/ocelot_pcb123.dts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/arch/mips/boot/dts/mscc/ocelot_pcb120.dts b/arch/mips/boot/dts/mscc/ocelot_pcb120.dts index 7da9ed2da248..8555fe3e9517 100644 --- a/arch/mips/boot/dts/mscc/ocelot_pcb120.dts +++ b/arch/mips/boot/dts/mscc/ocelot_pcb120.dts @@ -61,21 +61,25 @@ phy4: ethernet-phy@3 { &port0 { status = "okay"; phy-handle = <&phy0>; + phy-mode = "internal"; }; &port1 { status = "okay"; phy-handle = <&phy1>; + phy-mode = "internal"; }; &port2 { status = "okay"; phy-handle = <&phy2>; + phy-mode = "internal"; }; &port3 { status = "okay"; phy-handle = <&phy3>; + phy-mode = "internal"; }; &port4 { diff --git a/arch/mips/boot/dts/mscc/ocelot_pcb123.dts b/arch/mips/boot/dts/mscc/ocelot_pcb123.dts index 7d7e638791dd..0185045c7630 100644 --- a/arch/mips/boot/dts/mscc/ocelot_pcb123.dts +++ b/arch/mips/boot/dts/mscc/ocelot_pcb123.dts @@ -49,19 +49,23 @@ &mdio0 { &port0 { status = "okay"; phy-handle = <&phy0>; + phy-mode = "internal"; }; &port1 { status = "okay"; phy-handle = <&phy1>; + phy-mode = "internal"; }; &port2 { status = "okay"; phy-handle = <&phy2>; + phy-mode = "internal"; }; &port3 { status = "okay"; phy-handle = <&phy3>; + phy-mode = "internal"; }; -- 2.30.2