Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4500854pxb; Tue, 31 Aug 2021 06:46:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+lUjp3faeKfKHWf/4wqpiZu6d+buyfxS+mDDm1GreTzoP+nWIxRJY387cnr/ynmNzhjgG X-Received: by 2002:a17:906:681:: with SMTP id u1mr375852ejb.499.1630417596118; Tue, 31 Aug 2021 06:46:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630417596; cv=none; d=google.com; s=arc-20160816; b=qiHPuZTaTeRQ3UFlfCyGNShGsQDIMGf3VLw0zOuWhIZ8ShORo3wU6BWn7lfywH0mN5 sqdh8NCx+hSGavk5nK2qUjebjSd04V5w7CV+J+CGqKu0bUt/BR13bElkiHOSS7C63IOs FOD4HkUlz1XBA5j46l3fs20hDKGC192A5dwkAN0ipL3EkHgJSMH4RVgBY8fnFu8cUgOW eCWRHleMvUAjqM2Ul7AbGqyxa8DMjlTjYUu1qm6j/wfTsTXfb+nVXu6p0ZkEvnh6G4kQ B5UvkLLMgwbidHDFI+Gvrz490J0QCn55UENbEN014O1SscgFlBXpVrwTzVcKGIMt1HwU 2uYw== 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=3Sz7aymJxB3vkUE84pcXTX7Xc0dvSN8CarSdMJ0aOKk=; b=bL46Sgmu/tzCOsGbo0MjBLJTo9giAVPCV4uvj7JpO1URKobS/PyeAbCoI85MrHg3pV kkVjHg3eh8svPPP7ADW9xWfiBbhKmfzJHhodkwSNxObHLNbJ6uvA+ejcYLwbSjnqnSSd Ag/rURhvX3BYjcsmBV2JTo1MDU/ydzwnNYgPsXXybwnJL94ZSRnAB2mtxmcYiqjIC5Yy 8FjnUYrceLpUk36nGOfgMWES6ds2ZGJqVy/AWM9bxXGnrCCUvEAigggy5Ymkxmjy6MEM 576Q4XdsqMBWqvSoHw1eoD/fstjmFIiXSbIPg2m747bpzms0vzwYXtjNfSOMI1FdgSHZ fZYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=WeflOgYT; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si17899184ejc.71.2021.08.31.06.45.59; Tue, 31 Aug 2021 06:46:36 -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=@walle.cc header.s=mail2016061301 header.b=WeflOgYT; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239509AbhHaNl3 (ORCPT + 99 others); Tue, 31 Aug 2021 09:41:29 -0400 Received: from ssl.serverraum.org ([176.9.125.105]:36151 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239072AbhHaNlX (ORCPT ); Tue, 31 Aug 2021 09:41:23 -0400 Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id C124D22234; Tue, 31 Aug 2021 15:40:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1630417226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3Sz7aymJxB3vkUE84pcXTX7Xc0dvSN8CarSdMJ0aOKk=; b=WeflOgYTp+Q6I1DDfg7gPmMn3hspAzGEywGV/wLyw15lvxXZPV/QatYS1GZrCzs8+NdMGO bq6H6v735JnZJ/e0ElvJwLQqM0VIEuER/IVTiVVKolGzblRtVe9x9WJs5CwWSTOiHMFmBe O2fBgG7Is277iIF4DocUtkiiagFzACs= From: Michael Walle To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Shawn Guo , Li Yang , Rob Herring , Vladimir Oltean , Michael Walle Subject: [PATCH 6/7] arm64: dts: ls1028a: move PHY nodes to MDIO controller Date: Tue, 31 Aug 2021 15:40:12 +0200 Message-Id: <20210831134013.1625527-7-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210831134013.1625527-1-michael@walle.cc> References: <20210831134013.1625527-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move the PHY nodes from the network controller to the dedicated MDIO controller. According to Vladimir Oltean direct MDIO access via the PF, that is when the PHY is put under the "mdio" subnode, is defeatured and in fact the latest reference manual isn't mentioning it anymore. Suggested-by: Vladimir Oltean Signed-off-by: Michael Walle --- .../fsl-ls1028a-kontron-sl28-var1.dts | 58 +++++++++---------- .../fsl-ls1028a-kontron-sl28-var2.dts | 17 ++---- .../fsl-ls1028a-kontron-sl28-var4.dts | 49 ++++++++-------- .../freescale/fsl-ls1028a-kontron-sl28.dts | 21 +++---- .../boot/dts/freescale/fsl-ls1028a-rdb.dts | 12 ++-- 5 files changed, 67 insertions(+), 90 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dts index e8d31279b7a3..836a9b7d8263 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dts @@ -8,7 +8,7 @@ * None of the four SerDes lanes are used by the module, instead they are * all led out to the carrier for customer use. * - * Copyright (C) 2020 Michael Walle + * Copyright (C) 2021 Michael Walle * */ @@ -21,43 +21,39 @@ / { compatible = "kontron,sl28-var1", "kontron,sl28", "fsl,ls1028a"; }; +&enetc_mdio_pf3 { + /* Delete unused phy node */ + /delete-node/ ethernet-phy@5; + + phy0: ethernet-phy@4 { + reg = <0x4>; + eee-broken-1000t; + eee-broken-100tx; + qca,clk-out-frequency = <125000000>; + qca,clk-out-strength = ; + qca,keep-pll-enabled; + vddio-supply = <&vddio>; + + vddio: vddio-regulator { + regulator-name = "VDDIO"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vddh: vddh-regulator { + regulator-name = "VDDH"; + }; + }; +}; + &enetc_port0 { status = "disabled"; - /* - * Delete both the phy-handle to the old phy0 label as well as - * the mdio node with the old phy node with the old phy0 label. - */ + /* Delete the phy-handle to the old phy0 label */ /delete-property/ phy-handle; - /delete-node/ mdio; }; &enetc_port1 { phy-handle = <&phy0>; phy-connection-type = "rgmii-id"; status = "okay"; - - mdio { - #address-cells = <1>; - #size-cells = <0>; - - phy0: ethernet-phy@4 { - reg = <0x4>; - eee-broken-1000t; - eee-broken-100tx; - qca,clk-out-frequency = <125000000>; - qca,clk-out-strength = ; - qca,keep-pll-enabled; - vddio-supply = <&vddio>; - - vddio: vddio-regulator { - regulator-name = "VDDIO"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - vddh: vddh-regulator { - regulator-name = "VDDH"; - }; - }; - }; }; diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var2.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var2.dts index f6a79c8080d1..330e34f933a3 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var2.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var2.dts @@ -5,7 +5,7 @@ * This is for the network variant 2 which has two ethernet ports. These * ports are connected to the internal switch. * - * Copyright (C) 2020 Michael Walle + * Copyright (C) 2021 Michael Walle * */ @@ -18,12 +18,6 @@ / { }; &enetc_mdio_pf3 { - phy0: ethernet-phy@5 { - reg = <0x5>; - eee-broken-1000t; - eee-broken-100tx; - }; - phy1: ethernet-phy@4 { reg = <0x4>; eee-broken-1000t; @@ -34,14 +28,11 @@ phy1: ethernet-phy@4 { &enetc_port0 { status = "disabled"; /* - * In the base device tree the PHY was registered in the mdio - * subnode as it is PHY for this port. On this module this PHY - * is connected to a switch port instead and registered above. - * Therefore, delete the mdio subnode as well as the phy-handle - * property here. + * In the base device tree the PHY at address 5 was assigned for + * this port. On this module this PHY is connected to a switch + * port instead. Therefore, delete the phy-handle property here. */ /delete-property/ phy-handle; - /delete-node/ mdio; }; &enetc_port2 { diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var4.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var4.dts index e65d1c477e2c..77ed0ebd2c75 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var4.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var4.dts @@ -5,7 +5,7 @@ * This is for the network variant 4 which has two ethernet ports. It * extends the base and provides one more port connected via RGMII. * - * Copyright (C) 2019 Michael Walle + * Copyright (C) 2021 Michael Walle * */ @@ -18,33 +18,30 @@ / { compatible = "kontron,sl28-var4", "kontron,sl28", "fsl,ls1028a"; }; -&enetc_port1 { - phy-handle = <&phy1>; - phy-connection-type = "rgmii-id"; - status = "okay"; +&enetc_mdio_pf3 { + phy1: ethernet-phy@4 { + reg = <0x4>; + eee-broken-1000t; + eee-broken-100tx; + qca,clk-out-frequency = <125000000>; + qca,clk-out-strength = ; + qca,keep-pll-enabled; + vddio-supply = <&vddio>; - mdio { - #address-cells = <1>; - #size-cells = <0>; - - phy1: ethernet-phy@4 { - reg = <0x4>; - eee-broken-1000t; - eee-broken-100tx; - qca,clk-out-frequency = <125000000>; - qca,clk-out-strength = ; - qca,keep-pll-enabled; - vddio-supply = <&vddio>; - - vddio: vddio-regulator { - regulator-name = "VDDIO"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; + vddio: vddio-regulator { + regulator-name = "VDDIO"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; - vddh: vddh-regulator { - regulator-name = "VDDH"; - }; + vddh: vddh-regulator { + regulator-name = "VDDH"; }; }; }; + +&enetc_port1 { + phy-handle = <&phy1>; + phy-connection-type = "rgmii-id"; + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts index 2c6266991c38..b3e9c499e8b0 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts @@ -2,7 +2,7 @@ /* * Device Tree file for the Kontron SMARC-sAL28 board. * - * Copyright (C) 2019 Michael Walle + * Copyright (C) 2021 Michael Walle * */ @@ -80,22 +80,19 @@ &duart1 { status = "okay"; }; +&enetc_mdio_pf3 { + phy0: ethernet-phy@5 { + reg = <0x5>; + eee-broken-1000t; + eee-broken-100tx; + }; +}; + &enetc_port0 { phy-handle = <&phy0>; phy-connection-type = "sgmii"; managed = "in-band-status"; status = "okay"; - - mdio { - #address-cells = <1>; - #size-cells = <0>; - - phy0: ethernet-phy@5 { - reg = <0x5>; - eee-broken-1000t; - eee-broken-100tx; - }; - }; }; &esdhc { diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts index b0967b987f8a..ea11b1eb01f8 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts @@ -197,6 +197,10 @@ &duart1 { }; &enetc_mdio_pf3 { + sgmii_phy0: ethernet-phy@2 { + reg = <0x2>; + }; + /* VSC8514 QSGMII quad PHY */ qsgmii_phy0: ethernet-phy@10 { reg = <0x10>; @@ -220,14 +224,6 @@ &enetc_port0 { phy-connection-type = "sgmii"; managed = "in-band-status"; status = "okay"; - - mdio { - #address-cells = <1>; - #size-cells = <0>; - sgmii_phy0: ethernet-phy@2 { - reg = <0x2>; - }; - }; }; &enetc_port2 { -- 2.30.2