Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3945292ybz; Tue, 28 Apr 2020 03:06:42 -0700 (PDT) X-Google-Smtp-Source: APiQypIT4Hcm0fCX7+Z9ix3nQiThRrjNNh5xO5TfUPiCEW3I8Yvc+SFiivJkveX6GkwncUQiVq6V X-Received: by 2002:aa7:d5d4:: with SMTP id d20mr22378425eds.369.1588068402601; Tue, 28 Apr 2020 03:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588068402; cv=none; d=google.com; s=arc-20160816; b=BjrQXZ+RM3A7nGtAAB4XwyNPjE4YQxGJmke+7RKScWG9SCWBC8wpDvWrmc8KU5B9ZA DImIjHr/uYtDGrcbUMgSfa5TPSZee1c3ZnuBnBSsd8EWwVEOPjf4AUvoLnwgyihkuMp8 W9lkEAT9OhBcCiH0QaVE2hI7NXQP3DHIeIx3XJUQi4tq2wBib563FaR0djmRoL7+ZjW1 nxiMznC9gNqXOFmum8Xtw/NRjUQQY+GZbFylgb1CWLDV2SnNtMdCQMI+fx2mXkO7uHi9 z6tIOnZTTGxBzVEVGMN6d3lx/n8f6oa4T2LcZ/7M9TNQCX46OtUh/JwS4ksn/i/cBd3J k0uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=I5394PwBsVJb7lJB/9Bi0o+hNax5qj8oJu6TxPt4shs=; b=m3MpSthICUpQhuWRZbDg/mKGzDpXb56ROFLo35ffxEp1gyYf8c68yrIt3tykEdqSKt QjM3eDCmbAnIxy/kSkIq21icq6D4FzY3at/9DtE1fDUX21U/HEV2rDVwX5u4WecDbOHj D68DGXAAFRwm6AEHNC0KtsWtD9fi5ounAkvzXRkgmPpo+LaE4geydq7rzlWZiFfx/K2Q d3YhS1fRvqkBc3uqppzwRFRC5JYUnZRjwK+8Z3HHv7/mZkJCYEaSR8MBFiEzrQMqRz2k zMyxjOiyG1xLKssNuUuFQRnc+FmVlwqLvybOrXIjksmJLrrl9eOXJtR9HSl4BUC4MkG/ dLLQ== ARC-Authentication-Results: i=1; mx.google.com; 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 co17si1410839edb.218.2020.04.28.03.06.18; Tue, 28 Apr 2020 03:06:42 -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; 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 S1727855AbgD1KEi (ORCPT + 99 others); Tue, 28 Apr 2020 06:04:38 -0400 Received: from lnfm1.sai.msu.ru ([93.180.26.255]:49917 "EHLO lnfm1.sai.msu.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727107AbgD1KEh (ORCPT ); Tue, 28 Apr 2020 06:04:37 -0400 Received: from dragon.sai.msu.ru (dragon.sai.msu.ru [93.180.26.172]) by lnfm1.sai.msu.ru (8.14.1/8.12.8) with ESMTP id 03SA3tiw019532; Tue, 28 Apr 2020 13:04:00 +0300 Received: from oak.local (unknown [188.123.231.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by dragon.sai.msu.ru (Postfix) with ESMTPSA id 1C034EB39; Tue, 28 Apr 2020 13:03:56 +0300 (MSK) From: "Matwey V. Kornilov" To: Rob Herring , Michal Simek , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/ZYNQ ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Cc: matwey.kornilov@gmail.com, "Matwey V. Kornilov" , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/ZYNQ ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2] ARM: dts: zynq: Fix ethernet PHY for v5 schematics Date: Tue, 28 Apr 2020 13:03:49 +0300 Message-Id: <20200428100350.12699-1-matwey@sai.msu.ru> X-Mailer: git-send-email 2.25.0 In-Reply-To: <752db40d-5aed-4a97-a050-bc1376547f87@xilinx.com> References: <752db40d-5aed-4a97-a050-bc1376547f87@xilinx.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are at least two different versions existing for MYIR Zturn: * v4 schematics has Atheros AR8035 PHY at 0b000 http://www.myirtech.com/download/Zynq7000/Z-TURNBOARD_schematic.pdf * v5 schematics has Micrel KSZ9031 PHY at 0b011 v5 schematics available at DVD disk supplied with the board Specify both PHYs to make ethernet interface working for any board revision. This commit relies on of_mdiobus_register() behavior. When phy-handle is missed, every nested PHY node is considered, while ENODEVs are ignored. Before the patch: [ 28.295002] macb e000b000.ethernet eth0: Could not attach PHY (-19) After the patch: [ 28.257365] macb e000b000.ethernet eth0: PHY [e000b000.ethernet-ffffffff:00] driver [Micrel KSZ9031 Gigabit PHY] (irq=POLL) [ 28.257384] macb e000b000.ethernet eth0: configuring for phy/rgmii-id link mode Signed-off-by: Matwey V. Kornilov --- Changes since v1: - reworded commit message arch/arm/boot/dts/zynq-zturn.dts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/zynq-zturn.dts b/arch/arm/boot/dts/zynq-zturn.dts index 5ec616ebca08..07da9cf60d02 100644 --- a/arch/arm/boot/dts/zynq-zturn.dts +++ b/arch/arm/boot/dts/zynq-zturn.dts @@ -67,10 +67,17 @@ &gem0 { status = "okay"; phy-mode = "rgmii-id"; - phy-handle = <ðernet_phy>; - ethernet_phy: ethernet-phy@0 { - reg = <0x0>; + ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + max-speed = <1000>; + }; + + ethernet-phy@3 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <3>; + max-speed = <1000>; }; }; -- 2.16.4