U-Boot atheros PHY support and cubox ethernet

Soeren Moch smoch at web.de
Wed Jun 24 22:13:38 CEST 2020


Hi Fabio

On 24.06.20 21:39, Fabio Estevam wrote:
> Hi Soeren,
>
> On Wed, Jun 24, 2020 at 4:20 PM Soeren Moch <smoch at web.de> 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?
From what I see nothing is obviously wrong, just no ethernet connection:

U-Boot 2020.07-rc5-00039-g4ff63383e3-dirty (Jun 24 2020 - 21:48:31
+0200)      
                                                                               

CPU:   Freescale i.MX6Q rev1.2 at
792MHz                                       
CPU:   Commercial temperature grade (0C to 95C) at
42C                         
Reset cause:
POR                                                               
Model: TBS2910 Matrix ARM mini
PC                                              
DRAM:  2
GiB                                                                   
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC:
2                                   
Loading Environment from MMC...
OK                                             
No panel detected: default to
HDMI                                             
Display: HDMI
(1024x768)                                                       
In:   
serial                                                                  
Out:  
vga                                                                     
Err:  
vga                                                                     
Net:   eth0:
ethernet at 2188000                                                  
PCI:                                                                           

PCI:   pcie phy link never came
up                                             
No such
bus                                                                    
starting
USB...                                                                
Bus usb at 2184000: usb dr_mode not
found                                         
Bus usb at 2184200: USB EHCI
1.00                                                 
scanning bus usb at 2184000 for devices... 1 USB Device(s)
found                  
scanning bus usb at 2184200 for devices... 4 USB Device(s)
found                  
       scanning usb for storage devices... 0 Storage Device(s)
found           
Hit any key to stop autoboot: 
0                                               
Matrix U-Boot>
dhcp                                                            
BOOTP broadcast
1                                                              
BOOTP broadcast
2                                                              
BOOTP broadcast
3                                                              
BOOTP broadcast
4                                                              
BOOTP broadcast
5                                                              
BOOTP broadcast
6                                                              
BOOTP broadcast
7                                                              
BOOTP broadcast
8                                                              
BOOTP broadcast
9                                                              
BOOTP broadcast
10                                                             
BOOTP broadcast
11                                                             
BOOTP broadcast
12                                                             
BOOTP broadcast
13                                                             
BOOTP broadcast
14                                                             
BOOTP broadcast
15                                                             
BOOTP broadcast
16                                                             
BOOTP broadcast
17                                                             
                                                                               

Retry time exceeded; starting
again                                            
Matrix U-Boot> mdio
list                                                       
FEC0:                                                                          

4 - AR8035 <-->
ethernet at 2188000                                               
Matrix U-Boot>
> 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)?
>
> --- 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>;
> +               };
> +       };
>  };
I used this patch with address 4 (that's why the -dirty in the u-boot
version), no luck.
It seems I have a AR8035 PHY.
>
> In case you still have issues, please share the tbs2910 schematics
> with me offline so I can try to understand the failure.
Schematics are at
https://www.tbsdtv.com/download/document/tbs2910/TBS2910-Matrix-ARM-mini-PC-SCH_rev2.1.pdf

Thanks for your help,
Soeren


More information about the U-Boot mailing list