Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D24AAC433FE for ; Mon, 21 Feb 2022 16:49:06 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4C30683A51; Mon, 21 Feb 2022 17:49:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1645462145; bh=To8ljBlHR860Xmp20nZBxuQYGCXCpxAs+JAuPQ27tQM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ThcdJ5ZsyZA0PR3fGz2SjTNqvYCgtOybMrimUovXZvgCeI8E7ZRa04Do+D6+J/Rtv RaopBCq28+WSdgXFh7Fkzrt1M7nAMggZRVLGR6lJoE1VLDpAw+I8XPAFMFvkaPPD8J dtIF+V0PzIokvo7SWxtTZeVK4WanIlxiqW+Hl9dPM0Ca0E3qzjaOjRMTtnf1J2ZF9m /eueG0MzPO1EGPJZFt6AsVjoL0e74fvzTv5Ktu5oF5kD8GTwbrwBG2HsNLiZXEcVKM 0h0JGdGh+SY/c0v9UGuICdQMeB7b/hD/s2mcPpgPiZrAgkGLGAIzB9IKqVszxxkfYB VU1oxAjlaKHJQ== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 127A7802D6; Mon, 21 Feb 2022 17:49:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1645462141; bh=To8ljBlHR860Xmp20nZBxuQYGCXCpxAs+JAuPQ27tQM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=pr71Zax6wGIJRM02ZUZ+bnsPqrkxZ5bUT7IE3Yio2triktKKM727L2ilnpg2Bq5fW x9UB6Uz2obeWkcg/SDAP4BnAQlp5VOBGrf+ZJp0b8ENGdjrUJXTGixs+GWjZ/EYnmc xirFiPBJGw8x7tW/BstDcKHYxkcz9qcOQiD3pNzioG/w1OQQFq3XKOswJR5NjM+ZPV 0CAtD2mAAIiF6NXtyuOXT0ceWLAnVH2Td9v46x6G2H79ARjwqoIBVfHP/C4dQ/WSDa ppjlujUHsMXe1Bw2YgfNP3ptVYBi/xQRTcBjRC11/KmktvVMD62+/DuS6f4n1YkzQp vluEa/sZB6NUA== Message-ID: Date: Mon, 21 Feb 2022 17:49:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH v2] ARM: imx: imx8mn-ddr4-evk: Add ethernet support Content-Language: en-US To: Michael Walle Cc: festevam@gmail.com, peng.fan@nxp.com, sbabic@denx.de, u-boot@lists.denx.de References: <20220219161354.63523-1-marex@denx.de> <20220221101023.1458769-1-michael@walle.cc> From: Marek Vasut In-Reply-To: <20220221101023.1458769-1-michael@walle.cc> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 2/21/22 11:10, Michael Walle wrote: Hi, >> +int board_phy_config(struct phy_device *phydev) >> +{ >> + /* enable rgmii rxc skew and phy mode select to RGMII copper */ >> + phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x1f); >> + phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x8); >> + >> + phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x00); >> + phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x82ee); >> + phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05); >> + phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x100); > > This is a AR8031, correct? Is there a reason why you don't use the > device tree binding to set RGMII voltage, and RX and tx delays? I quickly cobbled this together from another board, since I needed ethernet to do other tests with this board and the ethernet support was missing. If you can send subsequent patch to flip this to DT-only setup, I can test the patch on the board. PHY should be AR8031, yes.