From patchwork Wed Jun 24 19:39:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 242899 List-Id: U-Boot discussion From: festevam at gmail.com (Fabio Estevam) Date: Wed, 24 Jun 2020 16:39:44 -0300 Subject: U-Boot atheros PHY support and cubox ethernet In-Reply-To: References: <20200616205108.GB24893@bill-the-cat> <20200616205812.GC24893@bill-the-cat> <20200616223005.GB27801@bill-the-cat> <20200617190020.GF27801@bill-the-cat> <20200617213036.GJ27801@bill-the-cat> <20200618133938.GM27801@bill-the-cat> Message-ID: Hi Soeren, On Wed, Jun 24, 2020 at 4:20 PM Soeren Moch wrote: > I tested current master (v2020.07-rc5 + imx fixes) on tbs2910 (imx6q + > atheros PHY). > Unfortunately ethernet is broken now, while it used to work well on > u-boot version v2020.04. Ethernet support was copied from imx6q-sabresd, > the recently for sabresd fixed phy-mode already is rgmii-id for tbs2910. > > Any ideas what could be wrong? I just tested mainline U-Boot and Ethernet works fine on a imx6qp sabresd board: U-Boot SPL 2020.07-rc5-00052-g922c6d5d00 (Jun 24 2020 - 16:21:27 -0300) Trying to boot from MMC1 U-Boot 2020.07-rc5-00052-g922c6d5d00 (Jun 24 2020 - 16:21:27 -0300) CPU: Freescale i.MX6QP rev1.0 996 MHz (running at 792 MHz) CPU: Automotive temperature grade (-40C to 125C) at 30C Reset cause: POR Model: Freescale i.MX6 Quad Plus SABRE Smart Device Board Board: MX6-SabreSD I2C: ready DRAM: 1 GiB PMIC: PFUZE100 ID=0x10 MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 3 Loading Environment from MMC... OK No panel detected: default to Hannstar-XGA Display: Hannstar-XGA (1024x768) In: serial Out: serial Err: serial Net: eth0: ethernet at 2188000 Hit any key to stop autoboot: 0 => dhcp zImage BOOTP broadcast 1 DHCP client bound to address 192.168.0.24 (50 ms) Using ethernet at 2188000 device TFTP from server 192.168.0.12; our IP address is 192.168.0.24 Filename 'zImage'. Load address: 0x12000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ############################################################# 1.3 MiB/s done Bytes transferred = 9468928 (907c00 hex) => mdio list FEC0: 1 - AR8031/AR8033 <--> ethernet at 2188000 => What is the exact failure you see? Is the Ethernet PHY found at the correct address and probed? On tbs2910 does the AR8031 generate a 125MHz clock to the i.MX6Q Ethernet? If so, does the change below help (I am assuming the PHY is located at address 1, if not, please adjust the @ and reg accordingly)? with me offline so I can try to understand the failure. --- a/arch/arm/dts/imx6q-tbs2910.dts +++ b/arch/arm/dts/imx6q-tbs2910.dts @@ -108,6 +108,16 @@ phy-mode = "rgmii-id"; phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; status = "okay"; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + phy: ethernet-phy at 1 { + reg = <1>; + qca,clk-out-frequency = <125000000>; + }; + }; }; In case you still have issues, please share the tbs2910 schematics