PHY-API in Linux environment T1040 fsl-sdk-v2.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PHY-API in Linux environment T1040 fsl-sdk-v2.0

Jump to solution
5,044 Views
jhering_ruegen
Contributor II

Hallo NXP Team,
we have designed and built a board with a NXP T1040 processor with following physical network configuration.

- 2 RGMII via VSC8502 phy (FMAN4/5)
- 1 SGMII via VSC8211 phy (FMAN3)
- l2switch (QSGMII) via 2 VSC8514 phy's (FMAN1/2)

I adapted  the Phy-API for the u-boot source (vitesse.c) for VSC8502 (RX_DELAY/TX_DELAY ...) the VSC8514 and VS8211 was already implemented.
the networking work properly in U-Boot environment.

then I adapted the Phy-API for the Linux kernel. Now I wondering the Phy-API in Linux has no effect.
Only the L2switch working properly. It's looks like the Phy-API newer called by FMAN-driver.
But we need additionally initializations  for the RGMII phy's. This issue is referenced with fsl-sdk-v2.0 and
fsl-sdk-v2.0-1609. My kernel config file is adapted like T1040RDB and my DTS see below:

Any ideas to solve this issue? Its looks like a little bit to the Stefan Lange issue "T1042 Device Tree Fman RGMII-ID"
But Stefan's (dirty workaround) not matched with fsl-sdk-v2.0.

thank you for hints and solutions
and
greetings from Germany biggest island Rügen

Jörg Hering


snip  ....

CONFIG_FSL_PQ_MDIO=y
CONFIG_FSL_XGMAC_MDIO=y
CONFIG_FSL_SDK_DPAA_ETH=y
CONFIG_FMAN_V3L=y
CONFIG_E1000E=y
CONFIG_REALTEK_PHY=y
CONFIG_VITESSE_PHY=y
CONFIG_FIXED_PHY=y
 
snip  ....

and part of my DTS

snip  ....
    aliases {
        phy_rgmii_0 = &phy_rgmii_0;
        phy_rgmii_1 = &phy_rgmii_1;
        phy_sgmii_2 = &phy_sgmii_2;
    };
    soc: soc@ffe000000 {
        ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
        reg = <0xf 0xfe000000 0 0x00001000>;
        fman0: fman@400000 {
            rcpm-wakeup = <&rcpm 0x00000008>;

            enet0: ethernet@e0000 {
                fixed-link = <30 1 1000 0 0>;
                phy-connection-type = "sgmii";
                rcpm-wakeup = <&rcpm 0x80000000>;
            };

            enet1: ethernet@e2000 {
                fixed-link = <31 1 1000 0 0>;
                phy-connection-type = "sgmii";
                rcpm-wakeup = <&rcpm 0x40000000>;
            };

            enet2: ethernet@e4000 {
                phy-handle = <&phy_sgmii_2>;
                phy-connection-type = "sgmii";
                rcpm-wakeup = <&rcpm 0x20000000>;
            };

            enet3: ethernet@e6000 {
                phy-handle = <&phy_rgmii_0>;
                phy-connection-type = "rgmii-id";
                rcpm-wakeup = <&rcpm 0x10000000>;
            };

            enet4: ethernet@e8000 {
                phy-handle = <&phy_rgmii_1>;
                phy-connection-type = "rgmii-id";
                rcpm-wakeup = <&rcpm 0x08000000>;
            };

            mdio0: mdio@fc000 {
                compatible = "fsl,fman-mdio";
                phy_sgmii_2: ethernet-phy@01 {
                    compatible = "vitesse,vsc8211";
                    device_type = "ethernet-phy";
                    reg = <0x01>;
                };
                phy_rgmii_0: ethernet-phy@04 {
                    compatible = "vitesse,vsc8502";
                    device_type = "ethernet-phy";
                    reg = <0x02>;
/* zb. Register init                    
                    vitesse,vsc8502-reg-init = <3 0x10 0 0x5777>,
                    <3 0x11 0 0x00aa>,
                    <3 0x12 0 0x4105>,
                    <3 0x13 0 0x0a60>;
*/                    
                };
                phy_rgmii_1: ethernet-phy@05 {
                    compatible = "vitesse,vsc8502";
                    device_type = "ethernet-phy";
                    reg = <0x03>;
                };
                phy_qsgmii_0: ethernet-phy@08 {
                    compatible = "vitesse,vsc8514";
                    device_type = "ethernet-phy";
                    reg = <0x08>;
                    interrupts = <0 1 0 0>;
                };
                phy_qsgmii_1: ethernet-phy@09 {
                    compatible = "vitesse,vsc8514";
                    device_type = "ethernet-phy";
                    reg = <0x09>;
                    interrupts = <0 1 0 0>;
                };
                phy_qsgmii_2: ethernet-phy@0a {
                    compatible = "vitesse,vsc8514";
                    device_type = "ethernet-phy";
                    reg = <0x0a>;
                    interrupts = <0 1 0 0>;
                };
                phy_qsgmii_3: ethernet-phy@0b {
                    compatible = "vitesse,vsc8514";
                    device_type = "ethernet-phy";
                    reg = <0x0b>;
                    interrupts = <0 1 0 0>;
                };
                phy_qsgmii_4: ethernet-phy@0c {
                    compatible = "vitesse,vsc8514";
                    device_type = "ethernet-phy";
                    reg = <0x0c>;
                    interrupts = <0 1 0 0>;
                };
                phy_qsgmii_5: ethernet-phy@0d {
                    compatible = "vitesse,vsc8514";
                    device_type = "ethernet-phy";
                    reg = <0x0d>;
                    interrupts = <0 1 0 0>;
                };
                phy_qsgmii_6: ethernet-phy@0e {
                    compatible = "vitesse,vsc8514";
                    device_type = "ethernet-phy";
                    reg = <0x0e>;
                    interrupts = <0 1 0 0>;
                };
                phy_qsgmii_7: ethernet-phy@0f {
                    compatible = "vitesse,vsc8514";
                    device_type = "ethernet-phy";
                    reg = <0x0f>;
                    interrupts = <0 1 0 0>;
                };
            };
        };

snip  ....


 

Labels (1)
0 Kudos
1 Solution
2,628 Views
jhering_ruegen
Contributor II

Hallo Yiping,

your hint's bring not the solution yet. But some observations bring news.

I remove CONFIG_FIXED_PHY=y in the kernel config file and now the phy VSC8502 will be init, but fman0 and fman1 failed. after booting, the kernel produce a mass of messages. It's looks like as an issue in combination  fixed-phy and 

libphy: Freescale XGMAC MDIO Bus

ideas ?

Greetings Jörg

see here

the boot  log:

---------

fsl_espi ffe110000.spi: cs=0, init_csmode=0x100008
fsl_espi ffe110000.spi: cs=1, init_csmode=0x100008
fsl_espi ffe110000.spi: cs=2, init_csmode=0x100008
fsl_espi ffe110000.spi: cs=3, init_csmode=0x100008
m25p80 spi32766.0: unrecognized JEDEC id bytes: 90, 5d, 10
fsl_espi ffe110000.spi: at 0x800008008093e000 (irq = 53)
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
Freescale FM module, FMD API version 21.1.0
Freescale FM Ports module
fsl_mac: fsl_mac: FSL FMan MAC API based driver
fsl_mac ffe4e0000.ethernet: Wrong PHY information of mac node /soc@ffe000000/fman@400000/ethernet@e0000
fsl_mac ffe4e2000.ethernet: Wrong PHY information of mac node /soc@ffe000000/fman@400000/ethernet@e2000
fsl_mac ffe4e4000.ethernet: FMan MEMAC
fsl_mac ffe4e4000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:02
fsl_mac ffe4e6000.ethernet: FMan MEMAC
fsl_mac ffe4e6000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:03
fsl_mac ffe4e8000.ethernet: FMan MEMAC
fsl_mac ffe4e8000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:04
fsl_dpa: FSL DPAA Ethernet driver
fsl_dpa fsl,dpaa:ethernet@0: dev_get_drvdata(ffe4e0000.ethernet) failed
fsl_dpa: probe of fsl,dpaa:ethernet@0 failed with error -22
fsl_dpa fsl,dpaa:ethernet@1: dev_get_drvdata(ffe4e2000.ethernet) failed
fsl_dpa: probe of fsl,dpaa:ethernet@1 failed with error -22
fsl_dpa: fsl_dpa: Probed interface eth0
fsl_dpa: fsl_dpa: Probed interface eth1
fsl_dpa: fsl_dpa: Probed interface eth2
fsl_advanced: FSL DPAA Advanced drivers:
fsl_proxy: FSL DPAA Proxy initialization driver
fsl_dpa_shared: FSL DPAA Shared Ethernet driver
fsl_dpa_macless: FSL DPAA MACless Ethernet driver
fsl_oh: FSL FMan Offline Parsing port driver
fsl-of-dma ffe100300.dma: dma channel dma-uio0-0 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-1 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-2 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-3 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-4 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-5 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-6 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-7 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-0 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-1 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-2 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-3 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-4 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-5 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-6 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-7 initialized
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 44, io mem 0xffe210000
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2
fsl-ehci fsl-ehci.1: irq 45, io mem 0xffe211000
fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
i2c /dev entries driver
mpc-i2c ffe118000.i2c: timeout 1000000 us
rtc-ds1307 0-0068: rtc core: registered ds3231 as rtc0
at24 0-0051: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
mpc-i2c ffe118100.i2c: timeout 1000000 us
at24 1-0056: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
mpc-i2c ffe119100.i2c: timeout 1000000 us
mpc-i2c ffe119000.i2c: timeout 1000000 us
Freescale(R) MPC85xx EDAC driver, (C) 2006 Montavista Software
EDAC MC0: Giving out device to module MPC85xx_edac controller mpc85xx_mc_err: DEV mpc85xx_mc_err (INTERRUPT)
MPC85xx_edac acquired irq 490 for MC
MPC85xx_edac MC err registered
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
/soc@ffe000000/sdhc@114000: voltage-ranges unspecified
sdhci-esdhc ffe114000.sdhc: No vmmc regulator found
sdhci-esdhc ffe114000.sdhc: No vqmmc regulator found
ata2: No Device OR PHYRDY change,Hstatus = 0x80000000
ata1: Signature Update detected @ 504 msecs
ata2: SATA link down (SStatus 10 SControl 300)
mmc0: SDHCI controller on ffe114000.sdhc [ffe114000.sdhc] using ADMA 64-bit
platform caam_qi.0: Linux CAAM Queue I/F driver initialised
caam ffe300000.crypto: Instantiated RNG4 SH1
caam ffe300000.crypto: device ID = 0x0a12040000000000 (Era 6)
caam ffe300000.crypto: job rings = 4, qi = 1
caam algorithms registered in /proc/crypto
platform caam_qi.0: fsl,sec-v5.0 algorithms registered in /proc/crypto
caam_jr ffe301000.jr: registering rng-caam
caam ffe300000.crypto: fsl,sec-v5.0 algorithms registered in /proc/crypto
Freescale USDPAA process driver
Freescale USDPAA process IRQ driver
dce_sys_init done!
No fsl,dce node
fsl-pme ffe316000.pme: ver: 0x00100202
Freescale pme2 db driver
Freescale pme2 scan driver
fsl-pme2-scan: device pme_scan registered
DPA Classifier Driver initialized.
DPA IPSec Driver initialized.
DPA Stats Driver initialized.
ipip: IPv4 over IPv4 tunneling driver
ip_tables: (C) 2000-2006 Netfilter Core Team
Initializing XFRM netlink socket
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
fsl_generic: FSL DPAA Generic Ethernet driver
rtc-ds1307 0-0068: setting system clock to 2016-09-29 08:43:40 UTC (1475138620)
usb 1-1: new full-speed USB device number 2 using fsl-ehci
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.00: ATA-9: SAMSUNG MZ7WD960HAGP-00003, DXM8DW3Q, max UDMA/133
ata1.00: 1875385008 sectors, multi 16: LBA48 NCQ (depth 16/32)
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access ATA SAMSUNG MZ7WD960 DW3Q PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 1875385008 512-byte logical blocks: (960 GB/894 GiB)
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI disk
Freeing unused kernel memory: 340K (c000000000c18000 - c000000000c6d000)
mount: mounting /dev/mmcblk0p2 on /mnt/emmc-overlay failed: No such file or directory
mount: mounting /dev/mmcblk0p3 on /mnt/emmc-params failed: No such file or directory
mount: mounting /dev/mmcblk0p4 on /mnt/emmc-user failed: No such file or directory
Starting overlay: OK
Starting logging: OK
Populating /dev using udev: udevd[1561]: starting version 3.2
random: udevd urandom read with 5 bits of entropy available
udevd[1562]: starting eudev-3.2
input: BurrBrown from Texas Instruments USB AUDIO CODEC as /devices/platform/ffe000000.soc/ffe210000.usb/fsl-ehci.0/usb1/1-1/1-1:1.3/0003:08BB:29C6.0001/input/input0
seville ffe800000.l2switch: Found Seville Switch, UIO device - IRQ 26, id 0x099530e9.
mmc0: MAN_BKOPS_EN bit is not set
mmc0: new high speed MMC card at address 0001
mmcblk0: mmc0:0001 MMC16G 7.30 GiB
mmcblk0boot0: mmc0:0001 MMC16G partition 1 16.0 MiB
mmcblk0boot1: mmc0:0001 MMC16G partition 2 16.0 MiB
mmcblk0rpmb: mmc0:0001 MMC16G partition 3 128 KiB
hid-generic 0003:08BB:29C6.0001: input: USB HID v1.00 Device [BurrBrown from Texas Instruments USB AUDIO CODEC] on usb-fsl-ehci.0-1/input3
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
mmcblk0: p1 p2 p3 p4
usbcore: registered new interface driver snd-usb-audio
tpm_i2c_infineon 0-0020: could not request locality
done
Initializing random number generator... done.
Starting rpcbind: OK
Starting network: ifup: ignoring unknown interface eth1
vsc8502: reg=0017, reg=3000
vsc8502: genphy_config_init(phydev) = 0,type=7
vsc8502: reg=0014, val=0044
udhcpc: started, v1.25.0
udhcpc: sending discover
PHY Address 0
PR0: 0xffff
PR1: 0xffff
PR2: 0xffff
PR3: 0xffff
PR4: 0xffff
PR5: 0xffff
PR6: 0xffff
PR7: 0xffff
PR8: 0xffff
PR9: 0xffff
PR10: 0xffff
PR11: 0xffff
PR12: 0xffff
PR13: 0xffff
PR14: 0xffff
PR15: 0xffff
PR16: 0xffff
PR17: 0xffff
PR18: 0xffff
PR19: 0xffff
PR20: 0xffff
PR21: 0xffff
PR22: 0xffff
PR23: 0xffff
PR24: 0xffff
PR25: 0xffff
PR26: 0xffff
PR27: 0xffff
PR28: 0xffff
PR29: 0xffff
PR30: 0xffff
PR31: 0xffff

PHY Address 1
PR0: 0x1040
PR1: 0x7949
PR2: 0xf
PR3: 0xc4b1
PR4: 0xd41
PR5: 0x4001
PR6: 0x6
PR7: 0x2001
PR8: 0x0
PR9: 0x200
PR10: 0x4000
PR11: 0x0
PR12: 0x0
PR13: 0x0
PR14: 0x0
PR15: 0x3000
PR16: 0x0
PR17: 0x0
PR18: 0x9
PR19: 0x0
PR20: 0x0
PR21: 0x0
PR22: 0x3200
PR23: 0x0
PR24: 0xe240
PR25: 0x0
PR26: 0x0
PR27: 0x0
PR28: 0x4
PR29: 0x0
PR30: 0x1
PR31: 0x0

PHY Address 2
PR0: 0x1040
PR1: 0x796d
PR2: 0x7
PR3: 0x631
PR4: 0x1e1
PR5: 0xcde1
PR6: 0xf
PR7: 0x2001
PR8: 0x40af
PR9: 0x600
PR10: 0x7c00
PR11: 0x0
PR12: 0x0
PR13: 0x0
PR14: 0x0
PR15: 0x3000
PR16: 0x0
PR17: 0x9000
PR18: 0x88
PR19: 0x0
PR20: 0x0
PR21: 0x0
PR22: 0x3200
PR23: 0x3000
PR24: 0x0
PR25: 0x0
PR26: 0x0
PR27: 0x0
PR28: 0x8035
PR29: 0x8021
PR30: 0x400
PR31: 0x0

PHY Address 3
PR0: 0x1040
PR1: 0x7949
PR2: 0x7
PR3: 0x631
PR4: 0xde1
PR5: 0x0
PR6: 0x4
PR7: 0x2001
PR8: 0x0
PR9: 0x600
PR10: 0x4000
PR11: 0x0
PR12: 0x0
PR13: 0x0
PR14: 0x0
PR15: 0x3000
PR16: 0x0
PR17: 0x0
PR18: 0x88
PR19: 0x0
PR20: 0x0
PR21: 0x0
PR22: 0x3200
PR23: 0x3000
PR24: 0x0
PR25: 0x0
PR26: 0x0
PR27: 0x0
PR28: 0x4
PR29: 0x8021
PR30: 0x400
PR31: 0x0

PHY Address 4
PR0: 0x1040
PR1: 0x7949
PR2: 0x7
PR3: 0x670
PR4: 0x1e1
PR5: 0x0
PR6: 0x4
PR7: 0x2001
PR8: 0x0
PR9: 0x600
PR10: 0x4000
PR11: 0x0
PR12: 0x0
PR13: 0x0
PR14: 0x0
PR15: 0x3000
PR16: 0x0
PR17: 0x0
PR18: 0x88
PR19: 0x0
PR20: 0x0
PR21: 0x0
PR22: 0x3200
PR23: 0x4
PR24: 0x0
PR25: 0x0
PR26: 0x0
PR27: 0x0
PR28: 0x2004
PR29: 0x8021
PR30: 0x400
PR31: 0x0

---------

and here the DTS file

/*
 * MDP-T1040 Device Tree Source
 *
 * Copyright 2016 Interschalt maritime systems
 * Joerg Hering
 *
 */

/* include CPU */
/include/ "t104xsi-pre.dtsi"

/ {
    model = "maritime data processor MDP-T1040";
    compatible = "jh,MDP-T1040";
    #address-cells = <2>;
    #size-cells = <2>;
    interrupt-parent = <&mpic>;

    aliases {
        phy_rgmii_0 = &phy_rgmii_0;
        phy_rgmii_1 = &phy_rgmii_1;
        phy_sgmii_2 = &phy_sgmii_2;
    };
    soc: soc@ffe000000 {
        ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
        reg = <0xf 0xfe000000 0 0x00001000>;
        fman0: fman@400000 {
            rcpm-wakeup = <&rcpm 0x00000008>;

            enet0: ethernet@e0000 {
                fixed-link = <30 1 1000 0 0>;
                phy-connection-type = "sgmii";
                rcpm-wakeup = <&rcpm 0x80000000>;
            };

            enet1: ethernet@e2000 {
                fixed-link = <31 1 1000 0 0>;
                phy-connection-type = "sgmii";
                rcpm-wakeup = <&rcpm 0x40000000>;
            };

            enet2: ethernet@e4000 {
                phy-handle = <&phy_sgmii_2>;
                phy-connection-type = "sgmii";
                rcpm-wakeup = <&rcpm 0x20000000>;
            };

            enet3: ethernet@e6000 {
                phy-handle = <&phy_rgmii_0>;
                phy-connection-type = "rgmii-id";
                rcpm-wakeup = <&rcpm 0x10000000>;
            };

            enet4: ethernet@e8000 {
                phy-handle = <&phy_rgmii_1>;
                phy-connection-type = "rgmii-id";
                rcpm-wakeup = <&rcpm 0x08000000>;
            };

            mdio0: mdio@fc000 {
                compatible = "fsl,fman-mdio";
                phy_sgmii_2: ethernet-phy@01 {
                    compatible = "ethernet-phy-id000f.c4b1";
                    reg = <0x01>;
                };
                phy_rgmii_0: ethernet-phy@02 {
                    compatible = "ethernet-phy-id0007.0631";
                    reg = <0x02>;
/* zb. Register init                    
                    vitesse,vsc8502-reg-init = <3 0x10 0 0x5777>,
                    <3 0x11 0 0x00aa>,
                    <3 0x12 0 0x4105>,
                    <3 0x13 0 0x0a60>;
*/                    
                };
                phy_rgmii_1: ethernet-phy@03 {
                    compatible = "ethernet-phy-id0007.0631";
                    reg = <0x03>;
                };
                phy_qsgmii_0: ethernet-phy@08 {
                    reg = <0x08>;
                };
                phy_qsgmii_1: ethernet-phy@09 {
                    reg = <0x09>;
                };
                phy_qsgmii_2: ethernet-phy@0a {
                    reg = <0x0a>;
                };
                phy_qsgmii_3: ethernet-phy@0b {
                    reg = <0x0b>;
                };
                phy_qsgmii_4: ethernet-phy@0c {
                    reg = <0x0c>;
                };
                phy_qsgmii_5: ethernet-phy@0d {
                    reg = <0x0d>;
                };
                phy_qsgmii_6: ethernet-phy@0e {
                    reg = <0x0e>;
                };
                phy_qsgmii_7: ethernet-phy@0f {
                    reg = <0x0f>;
                };
            };
        };
        spi@110000 {
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            compatible = "fsl,mpc8536-espi";
            reg = <0x110000 0x1000>;
            fsl,espi-num-chipselects = <0x4>;
            flash@0 {
                #address-cells = <0x1>;
                #size-cells = <0x1>;
                compatible = "micron,n25q00", "jedec,spi-nor";
                reg = <0x0>;
                spi-max-frequency = <0x989680>;
                partition@u-boot {
                    reg = <0x0 0x100000>;
                    label = "SPI-NOR U-Boot Image";
                    read-only;
                };
                partition@u-bootenv {
                    reg = <0x100000 0x10000>;
                    label = "SPI-NOR U-Boot Env";
                };
                partition@fman {
                    reg = <0x110000 0x10000>;
                    label = "SPI-NOR FMAN Firmware";
                };
                partition@kernel {
                    label = "Linux Kernel";
                    reg = <0x100000 0x500000>;
                    read-only;
                };

                partition@dtb {
                    label = "Linux DTB";
                    reg = <0x600000 0x100000>;
                    read-only;
                };

                partition@fs {
                    label = "Linux FS";
                    reg = <0x700000 0x900000>;
                };
                
            };    
            fpga@1 {
                compatible = "spidev";
                reg = <0x1>;
                spi-max-frequency = <0x1e8480>;
            };
            cs@2 {
                compatible = "spidev";
                reg = <0x2>;
                spi-max-frequency = <0x1e8480>;
            };
            cs@3 {
                compatible = "spidev";
                reg = <0x3>;
                spi-max-frequency = <0x1e8480>;
            };
        };
        i2c@118000 {
            rtc@68 {
                compatible = "dallas,ds3231";
                reg = <0x68>;
            };
            eeprom@51 {
                compatible = "at24,24c256";
                reg = <0x51>;
            };
            tpm@20 {
                compatible = "infineon,slb9645tt";
                reg = <0x20>;
            };
        };
        i2c@118100 {
            eeprom@56 {
                compatible = "at24,24c256";
                reg = <0x56>;
            };
            hwmon@2e {
                compatible = "national,lm85";
                reg = <0x2e>;
            };
            battery@77 {
                compatible = "ti,bq2060";
                reg = <0x77>;
            };
        };
        i2c@119100 {
            pca9539@74 {
                compatible = "nxp,pca9539";
                reg = <0x74>;
                gpio-controller;
                #gpio-cells = <0x2>;
            };
        };
    };
    fsl,dpaa {
        compatible = "fsl,t1040-dpaa", "fsl,dpaa";
        ethernet@0 {
            compatible = "fsl,t1040-dpa-ethernet","fsl,dpa-ethernet";
            fsl,fman-mac = <&enet0>;
        };
        ethernet@1 {
            compatible = "fsl,t1040-dpa-ethernet","fsl,dpa-ethernet";
            fsl,fman-mac = <&enet1>;
        };
        ethernet@2 {
            compatible = "fsl,t1040-dpa-ethernet","fsl,dpa-ethernet";
            fsl,fman-mac = <&enet2>;
        };
        ethernet@3 {
            compatible = "fsl,t1040-dpa-ethernet","fsl,dpa-ethernet";
            fsl,fman-mac = <&enet3>;
        };
        ethernet@4 {
            compatible = "fsl,t1040-dpa-ethernet","fsl,dpa-ethernet";
            fsl,fman-mac = <&enet4>;
        };
    };
    pci0: pcie@ffe240000 {
        reg = <0xf 0xfe240000 0 0x10000>;
        ranges = <0x02000000 0 0xe0000000 0xc 0x0 0x0 0x10000000
              0x01000000 0 0x0 0xf 0xf8000000 0x0 0x00010000>;
        pcie@0 {
            ranges = <0x02000000 0 0xe0000000
                  0x02000000 0 0xe0000000
                  0 0x10000000

                  0x01000000 0 0x00000000
                  0x01000000 0 0x00000000
                  0 0x00010000>;
        };
    };

    pci1: pcie@ffe250000 {
        reg = <0xf 0xfe250000 0 0x10000>;
        ranges = <0x02000000 0 0xe0000000 0xc 0x10000000 0 0x10000000
              0x01000000 0 0 0xf 0xf8010000 0 0x00010000>;
        pcie@0 {
            ranges = <0x02000000 0 0xe0000000
                  0x02000000 0 0xe0000000
                  0 0x10000000

                  0x01000000 0 0x00000000
                  0x01000000 0 0x00000000
                  0 0x00010000>;
        };
    };

    pci2: pcie@ffe260000 {
        reg = <0xf 0xfe260000 0 0x10000>;
        ranges = <0x02000000 0 0xe0000000 0xc 0x20000000 0 0x10000000
              0x01000000 0 0x00000000 0xf 0xf8020000 0 0x00010000>;
        pcie@0 {
            ranges = <0x02000000 0 0xe0000000
                  0x02000000 0 0xe0000000
                  0 0x10000000

                  0x01000000 0 0x00000000
                  0x01000000 0 0x00000000
                  0 0x00010000>;
        };
    };

    pci3: pcie@ffe270000 {
        reg = <0xf 0xfe270000 0 0x10000>;
        ranges = <0x02000000 0 0xe0000000 0xc 0x30000000 0 0x10000000
              0x01000000 0 0x00000000 0xf 0xf8030000 0 0x00010000>;
        pcie@0 {
            ranges = <0x02000000 0 0xe0000000
                  0x02000000 0 0xe0000000
                  0 0x10000000

                  0x01000000 0 0x00000000
                  0x01000000 0 0x00000000
                  0 0x00010000>;
        };
    };
    qe: qe@ffe140000 {
        ranges = <0x0 0xf 0xfe140000 0x40000>;
        reg = <0xf 0xfe140000 0 0x480>;
        brg-frequency = <0>;
        bus-frequency = <0>;

        si1: si@700 {
            #address-cells = <1>;
            #size-cells = <0>;
            compatible = "fsl,qe-si";
            reg = <0x700 0x80>;
        };

        siram1: siram@1000 {
            #address-cells = <1>;
            #size-cells = <1>;
            compatible = "fsl,qe-siram";
            reg = <0x1000 0x800>;
        };

        ucc_hdlc: ucc@2000 {
            compatible = "fsl,ucc_hdlc";
            rx-clock-name = "clk8";
            tx-clock-name = "clk9";
            fsl,rx-sync-clock = "rsync_pin";
            fsl,tx-sync-clock = "tsync_pin";
            fsl,tx-timeslot = <0xfffffffe>;
            fsl,rx-timeslot = <0xfffffffe>;
            fsl,tdm-framer-type = "e1";
            fsl,tdm-mode = "normal";
            fsl,tdm-id = <0>;
            fsl,siram-entry-id = <0>;
            fsl,tdm-interface;
        };

        ucc_serial: ucc@2200 {
            device_type = "serial";
            compatible = "ucc_uart";
            port-number = <0>;
            rx-clock-name = "brg2";
            tx-clock-name = "brg2";
        };
    };
    reserved-memory {
        #address-cells = <2>;
        #size-cells = <2>;
        ranges;

        bman_fbpr: bman-fbpr {
            size = <0 0x1000000>;
            alignment = <0 0x1000000>;
        };
        qman_fqd: qman-fqd {
            size = <0 0x800000>;
            alignment = <0 0x800000>;
        };
        qman_pfdr: qman-pfdr {
            size = <0 0x2000000>;
            alignment = <0 0x2000000>;
        };
        pme_pdsr: pme-pdsr {
            compatible = "fsl,pme-pdsr";
            alloc-ranges = <0 0 0x10000 0>;
            size = <0 0x1000000>;
            alignment = <0 0x1000000>;
        };
        pme_sre: pme-sre {
             compatible = "fsl,pme-sre";
             alloc-ranges = <0 0 0x10000 0>;
             size = <0 0xa00000>;
             alignment = <0 0xa00000>;
        };
        usdpaa_mem: usdpaa_mem {
            compatible = "fsl,usdpaa-mem";
            alloc-ranges = <0 0 0x10000 0>;
            size = <0 0x10000000>;
            alignment = <0 0x10000000>;
        };
        
    };
    ifc: localbus@ffe124000 {
        reg = <0xf 0xfe124000 0 0x2000>;
        ranges = <0 0 0xf 0xe8000000 0x08000000
              2 0 0xf 0xff800000 0x00010000
              3 0 0xf 0xffdf0000 0x00008000>;
    };

    memory {
        device_type = "memory";
    };

    dcsr: dcsr@f00000000 {
        ranges = <0x00000000 0xf 0x00000000 0x01072000>;
    };

    bportals: bman-portals@ff4000000 {
        ranges = <0x0 0xf 0xf4000000 0x2000000>;
    };

    qportals: qman-portals@ff6000000 {
        #address-cells = <1>;
        ranges = <0x0 0xf 0xf6000000 0x2000000>;
    };
};

#include "t1040si-post.dtsi"
/include/ "qoriq-dpaa-res3.dtsi"

View solution in original post

0 Kudos
5 Replies
2,628 Views
jhering_ruegen
Contributor II

Hallo Yiping,

addendum to post before.

the kernel errormessages  are my mistake

---

PHY Address 0
PR0: 0xffff
PR1: 0xffff

---

after i reinclude the fixed-phy in the kernel following results.

the fmandriver not initialised the phy, but after a manual ifconfig

the phy was correct init and work.

at first i have a workaround (but not nice)

thank you for your assistance

and greetings from germany

Jörg Hering

# ifconfig eth3 172.21.241.11
vsc8502: reg=0017, reg=3000
vsc8502: genphy_config_init(phydev)=0, addr=2, type=7
# ping 172.21.1.1
PING 172.21.1.1 (172.21.1.1): 56 data bytes
64 bytes from 172.21.1.1: seq=0 ttl=64 time=0.985 ms
64 bytes from 172.21.1.1: seq=1 ttl=64 time=0.702 ms
64 bytes from 172.21.1.1: seq=2 ttl=64 time=0.710 ms
^C
--- 172.21.1.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.702/0.799/0.985 ms
# ethtool eth3
Settings for eth3:
    Supported ports: [ MII ]
    Supported link modes:   10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Full
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Full
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                         100baseT/Half 100baseT/Full
                                         1000baseT/Half 1000baseT/Full
    Link partner advertised pause frame use: Symmetric Receive-only
    Link partner advertised auto-negotiation: Yes
    Speed: 1000Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 2
    Transceiver: external
    Auto-negotiation: on
    Supports Wake-on: d
    Wake-on: d
    Current message level: 0xffffffff (-1)
                   drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol 0xffff8000
    Link detected: yes
#

0 Kudos
2,629 Views
jhering_ruegen
Contributor II

Hallo Yiping,

your hint's bring not the solution yet. But some observations bring news.

I remove CONFIG_FIXED_PHY=y in the kernel config file and now the phy VSC8502 will be init, but fman0 and fman1 failed. after booting, the kernel produce a mass of messages. It's looks like as an issue in combination  fixed-phy and 

libphy: Freescale XGMAC MDIO Bus

ideas ?

Greetings Jörg

see here

the boot  log:

---------

fsl_espi ffe110000.spi: cs=0, init_csmode=0x100008
fsl_espi ffe110000.spi: cs=1, init_csmode=0x100008
fsl_espi ffe110000.spi: cs=2, init_csmode=0x100008
fsl_espi ffe110000.spi: cs=3, init_csmode=0x100008
m25p80 spi32766.0: unrecognized JEDEC id bytes: 90, 5d, 10
fsl_espi ffe110000.spi: at 0x800008008093e000 (irq = 53)
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
Freescale FM module, FMD API version 21.1.0
Freescale FM Ports module
fsl_mac: fsl_mac: FSL FMan MAC API based driver
fsl_mac ffe4e0000.ethernet: Wrong PHY information of mac node /soc@ffe000000/fman@400000/ethernet@e0000
fsl_mac ffe4e2000.ethernet: Wrong PHY information of mac node /soc@ffe000000/fman@400000/ethernet@e2000
fsl_mac ffe4e4000.ethernet: FMan MEMAC
fsl_mac ffe4e4000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:02
fsl_mac ffe4e6000.ethernet: FMan MEMAC
fsl_mac ffe4e6000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:03
fsl_mac ffe4e8000.ethernet: FMan MEMAC
fsl_mac ffe4e8000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:04
fsl_dpa: FSL DPAA Ethernet driver
fsl_dpa fsl,dpaa:ethernet@0: dev_get_drvdata(ffe4e0000.ethernet) failed
fsl_dpa: probe of fsl,dpaa:ethernet@0 failed with error -22
fsl_dpa fsl,dpaa:ethernet@1: dev_get_drvdata(ffe4e2000.ethernet) failed
fsl_dpa: probe of fsl,dpaa:ethernet@1 failed with error -22
fsl_dpa: fsl_dpa: Probed interface eth0
fsl_dpa: fsl_dpa: Probed interface eth1
fsl_dpa: fsl_dpa: Probed interface eth2
fsl_advanced: FSL DPAA Advanced drivers:
fsl_proxy: FSL DPAA Proxy initialization driver
fsl_dpa_shared: FSL DPAA Shared Ethernet driver
fsl_dpa_macless: FSL DPAA MACless Ethernet driver
fsl_oh: FSL FMan Offline Parsing port driver
fsl-of-dma ffe100300.dma: dma channel dma-uio0-0 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-1 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-2 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-3 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-4 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-5 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-6 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-7 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-0 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-1 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-2 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-3 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-4 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-5 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-6 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-7 initialized
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 44, io mem 0xffe210000
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2
fsl-ehci fsl-ehci.1: irq 45, io mem 0xffe211000
fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
i2c /dev entries driver
mpc-i2c ffe118000.i2c: timeout 1000000 us
rtc-ds1307 0-0068: rtc core: registered ds3231 as rtc0
at24 0-0051: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
mpc-i2c ffe118100.i2c: timeout 1000000 us
at24 1-0056: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
mpc-i2c ffe119100.i2c: timeout 1000000 us
mpc-i2c ffe119000.i2c: timeout 1000000 us
Freescale(R) MPC85xx EDAC driver, (C) 2006 Montavista Software
EDAC MC0: Giving out device to module MPC85xx_edac controller mpc85xx_mc_err: DEV mpc85xx_mc_err (INTERRUPT)
MPC85xx_edac acquired irq 490 for MC
MPC85xx_edac MC err registered
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
/soc@ffe000000/sdhc@114000: voltage-ranges unspecified
sdhci-esdhc ffe114000.sdhc: No vmmc regulator found
sdhci-esdhc ffe114000.sdhc: No vqmmc regulator found
ata2: No Device OR PHYRDY change,Hstatus = 0x80000000
ata1: Signature Update detected @ 504 msecs
ata2: SATA link down (SStatus 10 SControl 300)
mmc0: SDHCI controller on ffe114000.sdhc [ffe114000.sdhc] using ADMA 64-bit
platform caam_qi.0: Linux CAAM Queue I/F driver initialised
caam ffe300000.crypto: Instantiated RNG4 SH1
caam ffe300000.crypto: device ID = 0x0a12040000000000 (Era 6)
caam ffe300000.crypto: job rings = 4, qi = 1
caam algorithms registered in /proc/crypto
platform caam_qi.0: fsl,sec-v5.0 algorithms registered in /proc/crypto
caam_jr ffe301000.jr: registering rng-caam
caam ffe300000.crypto: fsl,sec-v5.0 algorithms registered in /proc/crypto
Freescale USDPAA process driver
Freescale USDPAA process IRQ driver
dce_sys_init done!
No fsl,dce node
fsl-pme ffe316000.pme: ver: 0x00100202
Freescale pme2 db driver
Freescale pme2 scan driver
fsl-pme2-scan: device pme_scan registered
DPA Classifier Driver initialized.
DPA IPSec Driver initialized.
DPA Stats Driver initialized.
ipip: IPv4 over IPv4 tunneling driver
ip_tables: (C) 2000-2006 Netfilter Core Team
Initializing XFRM netlink socket
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
fsl_generic: FSL DPAA Generic Ethernet driver
rtc-ds1307 0-0068: setting system clock to 2016-09-29 08:43:40 UTC (1475138620)
usb 1-1: new full-speed USB device number 2 using fsl-ehci
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.00: ATA-9: SAMSUNG MZ7WD960HAGP-00003, DXM8DW3Q, max UDMA/133
ata1.00: 1875385008 sectors, multi 16: LBA48 NCQ (depth 16/32)
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access ATA SAMSUNG MZ7WD960 DW3Q PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 1875385008 512-byte logical blocks: (960 GB/894 GiB)
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI disk
Freeing unused kernel memory: 340K (c000000000c18000 - c000000000c6d000)
mount: mounting /dev/mmcblk0p2 on /mnt/emmc-overlay failed: No such file or directory
mount: mounting /dev/mmcblk0p3 on /mnt/emmc-params failed: No such file or directory
mount: mounting /dev/mmcblk0p4 on /mnt/emmc-user failed: No such file or directory
Starting overlay: OK
Starting logging: OK
Populating /dev using udev: udevd[1561]: starting version 3.2
random: udevd urandom read with 5 bits of entropy available
udevd[1562]: starting eudev-3.2
input: BurrBrown from Texas Instruments USB AUDIO CODEC as /devices/platform/ffe000000.soc/ffe210000.usb/fsl-ehci.0/usb1/1-1/1-1:1.3/0003:08BB:29C6.0001/input/input0
seville ffe800000.l2switch: Found Seville Switch, UIO device - IRQ 26, id 0x099530e9.
mmc0: MAN_BKOPS_EN bit is not set
mmc0: new high speed MMC card at address 0001
mmcblk0: mmc0:0001 MMC16G 7.30 GiB
mmcblk0boot0: mmc0:0001 MMC16G partition 1 16.0 MiB
mmcblk0boot1: mmc0:0001 MMC16G partition 2 16.0 MiB
mmcblk0rpmb: mmc0:0001 MMC16G partition 3 128 KiB
hid-generic 0003:08BB:29C6.0001: input: USB HID v1.00 Device [BurrBrown from Texas Instruments USB AUDIO CODEC] on usb-fsl-ehci.0-1/input3
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
mmcblk0: p1 p2 p3 p4
usbcore: registered new interface driver snd-usb-audio
tpm_i2c_infineon 0-0020: could not request locality
done
Initializing random number generator... done.
Starting rpcbind: OK
Starting network: ifup: ignoring unknown interface eth1
vsc8502: reg=0017, reg=3000
vsc8502: genphy_config_init(phydev) = 0,type=7
vsc8502: reg=0014, val=0044
udhcpc: started, v1.25.0
udhcpc: sending discover
PHY Address 0
PR0: 0xffff
PR1: 0xffff
PR2: 0xffff
PR3: 0xffff
PR4: 0xffff
PR5: 0xffff
PR6: 0xffff
PR7: 0xffff
PR8: 0xffff
PR9: 0xffff
PR10: 0xffff
PR11: 0xffff
PR12: 0xffff
PR13: 0xffff
PR14: 0xffff
PR15: 0xffff
PR16: 0xffff
PR17: 0xffff
PR18: 0xffff
PR19: 0xffff
PR20: 0xffff
PR21: 0xffff
PR22: 0xffff
PR23: 0xffff
PR24: 0xffff
PR25: 0xffff
PR26: 0xffff
PR27: 0xffff
PR28: 0xffff
PR29: 0xffff
PR30: 0xffff
PR31: 0xffff

PHY Address 1
PR0: 0x1040
PR1: 0x7949
PR2: 0xf
PR3: 0xc4b1
PR4: 0xd41
PR5: 0x4001
PR6: 0x6
PR7: 0x2001
PR8: 0x0
PR9: 0x200
PR10: 0x4000
PR11: 0x0
PR12: 0x0
PR13: 0x0
PR14: 0x0
PR15: 0x3000
PR16: 0x0
PR17: 0x0
PR18: 0x9
PR19: 0x0
PR20: 0x0
PR21: 0x0
PR22: 0x3200
PR23: 0x0
PR24: 0xe240
PR25: 0x0
PR26: 0x0
PR27: 0x0
PR28: 0x4
PR29: 0x0
PR30: 0x1
PR31: 0x0

PHY Address 2
PR0: 0x1040
PR1: 0x796d
PR2: 0x7
PR3: 0x631
PR4: 0x1e1
PR5: 0xcde1
PR6: 0xf
PR7: 0x2001
PR8: 0x40af
PR9: 0x600
PR10: 0x7c00
PR11: 0x0
PR12: 0x0
PR13: 0x0
PR14: 0x0
PR15: 0x3000
PR16: 0x0
PR17: 0x9000
PR18: 0x88
PR19: 0x0
PR20: 0x0
PR21: 0x0
PR22: 0x3200
PR23: 0x3000
PR24: 0x0
PR25: 0x0
PR26: 0x0
PR27: 0x0
PR28: 0x8035
PR29: 0x8021
PR30: 0x400
PR31: 0x0

PHY Address 3
PR0: 0x1040
PR1: 0x7949
PR2: 0x7
PR3: 0x631
PR4: 0xde1
PR5: 0x0
PR6: 0x4
PR7: 0x2001
PR8: 0x0
PR9: 0x600
PR10: 0x4000
PR11: 0x0
PR12: 0x0
PR13: 0x0
PR14: 0x0
PR15: 0x3000
PR16: 0x0
PR17: 0x0
PR18: 0x88
PR19: 0x0
PR20: 0x0
PR21: 0x0
PR22: 0x3200
PR23: 0x3000
PR24: 0x0
PR25: 0x0
PR26: 0x0
PR27: 0x0
PR28: 0x4
PR29: 0x8021
PR30: 0x400
PR31: 0x0

PHY Address 4
PR0: 0x1040
PR1: 0x7949
PR2: 0x7
PR3: 0x670
PR4: 0x1e1
PR5: 0x0
PR6: 0x4
PR7: 0x2001
PR8: 0x0
PR9: 0x600
PR10: 0x4000
PR11: 0x0
PR12: 0x0
PR13: 0x0
PR14: 0x0
PR15: 0x3000
PR16: 0x0
PR17: 0x0
PR18: 0x88
PR19: 0x0
PR20: 0x0
PR21: 0x0
PR22: 0x3200
PR23: 0x4
PR24: 0x0
PR25: 0x0
PR26: 0x0
PR27: 0x0
PR28: 0x2004
PR29: 0x8021
PR30: 0x400
PR31: 0x0

---------

and here the DTS file

/*
 * MDP-T1040 Device Tree Source
 *
 * Copyright 2016 Interschalt maritime systems
 * Joerg Hering
 *
 */

/* include CPU */
/include/ "t104xsi-pre.dtsi"

/ {
    model = "maritime data processor MDP-T1040";
    compatible = "jh,MDP-T1040";
    #address-cells = <2>;
    #size-cells = <2>;
    interrupt-parent = <&mpic>;

    aliases {
        phy_rgmii_0 = &phy_rgmii_0;
        phy_rgmii_1 = &phy_rgmii_1;
        phy_sgmii_2 = &phy_sgmii_2;
    };
    soc: soc@ffe000000 {
        ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
        reg = <0xf 0xfe000000 0 0x00001000>;
        fman0: fman@400000 {
            rcpm-wakeup = <&rcpm 0x00000008>;

            enet0: ethernet@e0000 {
                fixed-link = <30 1 1000 0 0>;
                phy-connection-type = "sgmii";
                rcpm-wakeup = <&rcpm 0x80000000>;
            };

            enet1: ethernet@e2000 {
                fixed-link = <31 1 1000 0 0>;
                phy-connection-type = "sgmii";
                rcpm-wakeup = <&rcpm 0x40000000>;
            };

            enet2: ethernet@e4000 {
                phy-handle = <&phy_sgmii_2>;
                phy-connection-type = "sgmii";
                rcpm-wakeup = <&rcpm 0x20000000>;
            };

            enet3: ethernet@e6000 {
                phy-handle = <&phy_rgmii_0>;
                phy-connection-type = "rgmii-id";
                rcpm-wakeup = <&rcpm 0x10000000>;
            };

            enet4: ethernet@e8000 {
                phy-handle = <&phy_rgmii_1>;
                phy-connection-type = "rgmii-id";
                rcpm-wakeup = <&rcpm 0x08000000>;
            };

            mdio0: mdio@fc000 {
                compatible = "fsl,fman-mdio";
                phy_sgmii_2: ethernet-phy@01 {
                    compatible = "ethernet-phy-id000f.c4b1";
                    reg = <0x01>;
                };
                phy_rgmii_0: ethernet-phy@02 {
                    compatible = "ethernet-phy-id0007.0631";
                    reg = <0x02>;
/* zb. Register init                    
                    vitesse,vsc8502-reg-init = <3 0x10 0 0x5777>,
                    <3 0x11 0 0x00aa>,
                    <3 0x12 0 0x4105>,
                    <3 0x13 0 0x0a60>;
*/                    
                };
                phy_rgmii_1: ethernet-phy@03 {
                    compatible = "ethernet-phy-id0007.0631";
                    reg = <0x03>;
                };
                phy_qsgmii_0: ethernet-phy@08 {
                    reg = <0x08>;
                };
                phy_qsgmii_1: ethernet-phy@09 {
                    reg = <0x09>;
                };
                phy_qsgmii_2: ethernet-phy@0a {
                    reg = <0x0a>;
                };
                phy_qsgmii_3: ethernet-phy@0b {
                    reg = <0x0b>;
                };
                phy_qsgmii_4: ethernet-phy@0c {
                    reg = <0x0c>;
                };
                phy_qsgmii_5: ethernet-phy@0d {
                    reg = <0x0d>;
                };
                phy_qsgmii_6: ethernet-phy@0e {
                    reg = <0x0e>;
                };
                phy_qsgmii_7: ethernet-phy@0f {
                    reg = <0x0f>;
                };
            };
        };
        spi@110000 {
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            compatible = "fsl,mpc8536-espi";
            reg = <0x110000 0x1000>;
            fsl,espi-num-chipselects = <0x4>;
            flash@0 {
                #address-cells = <0x1>;
                #size-cells = <0x1>;
                compatible = "micron,n25q00", "jedec,spi-nor";
                reg = <0x0>;
                spi-max-frequency = <0x989680>;
                partition@u-boot {
                    reg = <0x0 0x100000>;
                    label = "SPI-NOR U-Boot Image";
                    read-only;
                };
                partition@u-bootenv {
                    reg = <0x100000 0x10000>;
                    label = "SPI-NOR U-Boot Env";
                };
                partition@fman {
                    reg = <0x110000 0x10000>;
                    label = "SPI-NOR FMAN Firmware";
                };
                partition@kernel {
                    label = "Linux Kernel";
                    reg = <0x100000 0x500000>;
                    read-only;
                };

                partition@dtb {
                    label = "Linux DTB";
                    reg = <0x600000 0x100000>;
                    read-only;
                };

                partition@fs {
                    label = "Linux FS";
                    reg = <0x700000 0x900000>;
                };
                
            };    
            fpga@1 {
                compatible = "spidev";
                reg = <0x1>;
                spi-max-frequency = <0x1e8480>;
            };
            cs@2 {
                compatible = "spidev";
                reg = <0x2>;
                spi-max-frequency = <0x1e8480>;
            };
            cs@3 {
                compatible = "spidev";
                reg = <0x3>;
                spi-max-frequency = <0x1e8480>;
            };
        };
        i2c@118000 {
            rtc@68 {
                compatible = "dallas,ds3231";
                reg = <0x68>;
            };
            eeprom@51 {
                compatible = "at24,24c256";
                reg = <0x51>;
            };
            tpm@20 {
                compatible = "infineon,slb9645tt";
                reg = <0x20>;
            };
        };
        i2c@118100 {
            eeprom@56 {
                compatible = "at24,24c256";
                reg = <0x56>;
            };
            hwmon@2e {
                compatible = "national,lm85";
                reg = <0x2e>;
            };
            battery@77 {
                compatible = "ti,bq2060";
                reg = <0x77>;
            };
        };
        i2c@119100 {
            pca9539@74 {
                compatible = "nxp,pca9539";
                reg = <0x74>;
                gpio-controller;
                #gpio-cells = <0x2>;
            };
        };
    };
    fsl,dpaa {
        compatible = "fsl,t1040-dpaa", "fsl,dpaa";
        ethernet@0 {
            compatible = "fsl,t1040-dpa-ethernet","fsl,dpa-ethernet";
            fsl,fman-mac = <&enet0>;
        };
        ethernet@1 {
            compatible = "fsl,t1040-dpa-ethernet","fsl,dpa-ethernet";
            fsl,fman-mac = <&enet1>;
        };
        ethernet@2 {
            compatible = "fsl,t1040-dpa-ethernet","fsl,dpa-ethernet";
            fsl,fman-mac = <&enet2>;
        };
        ethernet@3 {
            compatible = "fsl,t1040-dpa-ethernet","fsl,dpa-ethernet";
            fsl,fman-mac = <&enet3>;
        };
        ethernet@4 {
            compatible = "fsl,t1040-dpa-ethernet","fsl,dpa-ethernet";
            fsl,fman-mac = <&enet4>;
        };
    };
    pci0: pcie@ffe240000 {
        reg = <0xf 0xfe240000 0 0x10000>;
        ranges = <0x02000000 0 0xe0000000 0xc 0x0 0x0 0x10000000
              0x01000000 0 0x0 0xf 0xf8000000 0x0 0x00010000>;
        pcie@0 {
            ranges = <0x02000000 0 0xe0000000
                  0x02000000 0 0xe0000000
                  0 0x10000000

                  0x01000000 0 0x00000000
                  0x01000000 0 0x00000000
                  0 0x00010000>;
        };
    };

    pci1: pcie@ffe250000 {
        reg = <0xf 0xfe250000 0 0x10000>;
        ranges = <0x02000000 0 0xe0000000 0xc 0x10000000 0 0x10000000
              0x01000000 0 0 0xf 0xf8010000 0 0x00010000>;
        pcie@0 {
            ranges = <0x02000000 0 0xe0000000
                  0x02000000 0 0xe0000000
                  0 0x10000000

                  0x01000000 0 0x00000000
                  0x01000000 0 0x00000000
                  0 0x00010000>;
        };
    };

    pci2: pcie@ffe260000 {
        reg = <0xf 0xfe260000 0 0x10000>;
        ranges = <0x02000000 0 0xe0000000 0xc 0x20000000 0 0x10000000
              0x01000000 0 0x00000000 0xf 0xf8020000 0 0x00010000>;
        pcie@0 {
            ranges = <0x02000000 0 0xe0000000
                  0x02000000 0 0xe0000000
                  0 0x10000000

                  0x01000000 0 0x00000000
                  0x01000000 0 0x00000000
                  0 0x00010000>;
        };
    };

    pci3: pcie@ffe270000 {
        reg = <0xf 0xfe270000 0 0x10000>;
        ranges = <0x02000000 0 0xe0000000 0xc 0x30000000 0 0x10000000
              0x01000000 0 0x00000000 0xf 0xf8030000 0 0x00010000>;
        pcie@0 {
            ranges = <0x02000000 0 0xe0000000
                  0x02000000 0 0xe0000000
                  0 0x10000000

                  0x01000000 0 0x00000000
                  0x01000000 0 0x00000000
                  0 0x00010000>;
        };
    };
    qe: qe@ffe140000 {
        ranges = <0x0 0xf 0xfe140000 0x40000>;
        reg = <0xf 0xfe140000 0 0x480>;
        brg-frequency = <0>;
        bus-frequency = <0>;

        si1: si@700 {
            #address-cells = <1>;
            #size-cells = <0>;
            compatible = "fsl,qe-si";
            reg = <0x700 0x80>;
        };

        siram1: siram@1000 {
            #address-cells = <1>;
            #size-cells = <1>;
            compatible = "fsl,qe-siram";
            reg = <0x1000 0x800>;
        };

        ucc_hdlc: ucc@2000 {
            compatible = "fsl,ucc_hdlc";
            rx-clock-name = "clk8";
            tx-clock-name = "clk9";
            fsl,rx-sync-clock = "rsync_pin";
            fsl,tx-sync-clock = "tsync_pin";
            fsl,tx-timeslot = <0xfffffffe>;
            fsl,rx-timeslot = <0xfffffffe>;
            fsl,tdm-framer-type = "e1";
            fsl,tdm-mode = "normal";
            fsl,tdm-id = <0>;
            fsl,siram-entry-id = <0>;
            fsl,tdm-interface;
        };

        ucc_serial: ucc@2200 {
            device_type = "serial";
            compatible = "ucc_uart";
            port-number = <0>;
            rx-clock-name = "brg2";
            tx-clock-name = "brg2";
        };
    };
    reserved-memory {
        #address-cells = <2>;
        #size-cells = <2>;
        ranges;

        bman_fbpr: bman-fbpr {
            size = <0 0x1000000>;
            alignment = <0 0x1000000>;
        };
        qman_fqd: qman-fqd {
            size = <0 0x800000>;
            alignment = <0 0x800000>;
        };
        qman_pfdr: qman-pfdr {
            size = <0 0x2000000>;
            alignment = <0 0x2000000>;
        };
        pme_pdsr: pme-pdsr {
            compatible = "fsl,pme-pdsr";
            alloc-ranges = <0 0 0x10000 0>;
            size = <0 0x1000000>;
            alignment = <0 0x1000000>;
        };
        pme_sre: pme-sre {
             compatible = "fsl,pme-sre";
             alloc-ranges = <0 0 0x10000 0>;
             size = <0 0xa00000>;
             alignment = <0 0xa00000>;
        };
        usdpaa_mem: usdpaa_mem {
            compatible = "fsl,usdpaa-mem";
            alloc-ranges = <0 0 0x10000 0>;
            size = <0 0x10000000>;
            alignment = <0 0x10000000>;
        };
        
    };
    ifc: localbus@ffe124000 {
        reg = <0xf 0xfe124000 0 0x2000>;
        ranges = <0 0 0xf 0xe8000000 0x08000000
              2 0 0xf 0xff800000 0x00010000
              3 0 0xf 0xffdf0000 0x00008000>;
    };

    memory {
        device_type = "memory";
    };

    dcsr: dcsr@f00000000 {
        ranges = <0x00000000 0xf 0x00000000 0x01072000>;
    };

    bportals: bman-portals@ff4000000 {
        ranges = <0x0 0xf 0xf4000000 0x2000000>;
    };

    qportals: qman-portals@ff6000000 {
        #address-cells = <1>;
        ranges = <0x0 0xf 0xf6000000 0x2000000>;
    };
};

#include "t1040si-post.dtsi"
/include/ "qoriq-dpaa-res3.dtsi"

0 Kudos
2,627 Views
jhering_ruegen
Contributor II

Hello Yiping,

thank you for your reaction.

The networking in U-Boot environment is possible, but in Linux-World for the RGMII Interfaces not.

It's looks like the phy's will not initialisized. In my VSC8502 phy-api i insert some printk messsages and 

expected this nearly printk here .

...

ibphy: Fixed MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
ucc_geth_driver: QE UCC Gigabit Ethernet Controller
Freescale FM module, FMD API version 21.1.0
Freescale FM Ports module
fsl_mac: fsl_mac: FSL FMan MAC API based driver
fsl_mac ffe4e0000.ethernet: FMan MEMAC
fsl_mac ffe4e0000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:00
fsl_mac ffe4e2000.ethernet: FMan MEMAC
fsl_mac ffe4e2000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:01
fsl_mac ffe4e4000.ethernet: FMan MEMAC
fsl_mac ffe4e4000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:02
fsl_mac ffe4e6000.ethernet: FMan MEMAC
fsl_mac ffe4e6000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:03
fsl_mac ffe4e8000.ethernet: FMan MEMAC
fsl_mac ffe4e8000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:04
fsl_dpa: FSL DPAA Ethernet driver
fsl_dpa: fsl_dpa: Probed interface eth0
fsl_dpa: fsl_dpa: Probed interface eth1
fsl_dpa: fsl_dpa: Probed interface eth2
fsl_dpa: fsl_dpa: Probed interface eth3
fsl_dpa: fsl_dpa: Probed interface eth4

....

some ideas ?

Greetings Jörg Hering

now the requested informations:

U-Boot:

----------------------

Initializing....using SPD
2 GiB left unmapped
Loading second stage boot loader .................................................................................................

U-Boot 2016.01 (Nov 17 2016 - 11:34:02 +0100)

CPU0:  T1040E, Version: 1.1, (0x85280011)
Core:  e5500, Version: 2.1, (0x80241021)
Clock Configuration:
       CPU0:1400 MHz, CPU1:1400 MHz, CPU2:1400 MHz, CPU3:1400 MHz,
       CCB:600  MHz,
       DDR:800  MHz (1600 MT/s data rate) (Asynchronous), IFC:150  MHz
       QE:300  MHz
       FMAN1: 600 MHz
       QMAN:  300 MHz
       PME:   300 MHz
L1:    D-cache 32 KiB enabled
       I-cache 32 KiB enabled
Reset Configuration Word (RCW):
       00000000: 0c18000e 0e000000 00000000 00000000
       00000010: 66000002 80000002 58106000 01000000
       00000020: 00000000 00000000 00000000 00038810
       00000030: 00000000 80165005 00000000 00000000
I2C:   ready
Board: MDP-T1040
Clock: single
Boot:  SPI-NOR Flash
SPI:   ready
DRAM:  Detected UDIMM 18KSF51272AZ-1G6K1
4 GiB (DDR3, 64-bit, CL=11, ECC on)
       DDR Chip-Select Interleaving Mode: CS0+CS1
Flash: 0 Bytes
L2:    256 KiB enabled
Corenet Platform Cache: 256 KiB enabled
Using SERDES1 Protocol: 102 (0x66)
SEC0: RNG instantiated
MMC:   FSL_SDHC: 0
SF: Detected N25Q1024 with page size 256 Bytes, erase size 4 KiB, total 128 MiB
EEPROM: NXID v1
PCIe1: Root Complex, no link, regs @ 0xfe240000
PCIe1: Bus 00 - 00
PCIe2: Root Complex, x1 gen1, regs @ 0xfe250000
  02:00.0     - 13a8:0358 - Simple comm. controller
PCIe2: Bus 01 - 02
PCIe3: Root Complex, no link, regs @ 0xfe260000
PCIe3: Bus 03 - 03
PCIe4: Root Complex, no link, regs @ 0xfe270000
PCIe4: Bus 04 - 04
In:    serial
Out:   serial
Err:   serial
Voltage Monitor: VPhy= 0.99 V, V2.5=2.52 V, V3.3=3.31 V, V5.0=5.7 V, V24=25.13 V
Temperature Monitor: CPU=52 C, ENV=43 C, PCB=36 C
Net:   Initializing Fman
SF: Detected N25Q1024 with page size 256 Bytes, erase size 4 KiB, total 128 MiB
Fman1: Uploading microcode version 106.4.18
VSC9953 L2 switch initialized
FM1@DTSEC1 [PRIME], FM1@DTSEC2, FM1@DTSEC3, FM1@DTSEC4, FM1@DTSEC5
Hit any key to stop autoboot:  0
=> mdio list
FSL_MDIO0:
1 - Vitesse VSC8211 <--> FM1@DTSEC3
2 - Vitesse VSC8502 <--> FM1@DTSEC4
3 - Vitesse VSC8502 <--> FM1@DTSEC5
4 - Vitesse VSC8514 <--> SW@PORT0
5 - Vitesse VSC8514 <--> SW@PORT1
6 - Vitesse VSC8514 <--> SW@PORT2
7 - Vitesse VSC8514 <--> SW@PORT3
8 - Vitesse VSC8514 <--> SW@PORT4
9 - Vitesse VSC8514 <--> SW@PORT5
10 - Vitesse VSC8514 <--> SW@PORT6
11 - Vitesse VSC8514 <--> SW@PORT7

=> mii info
PHY 0x01: OUI = 0x03F1, Model = 0x0B, Rev = 0x01, 1000baseX, HDX
PHY 0x02: OUI = 0x01C1, Model = 0x23, Rev = 0x01, 1000baseT, FDX
PHY 0x03: OUI = 0x01C1, Model = 0x23, Rev = 0x01,  10baseT, HDX
PHY 0x04: OUI = 0x01C1, Model = 0x27, Rev = 0x00,  10baseT, HDX
PHY 0x05: OUI = 0x01C1, Model = 0x27, Rev = 0x00,  10baseT, HDX
PHY 0x06: OUI = 0x01C1, Model = 0x27, Rev = 0x00,  10baseT, HDX
PHY 0x07: OUI = 0x01C1, Model = 0x27, Rev = 0x00, 1000baseT, FDX
PHY 0x08: OUI = 0x01C1, Model = 0x27, Rev = 0x00,  10baseT, HDX
PHY 0x09: OUI = 0x01C1, Model = 0x27, Rev = 0x00,  10baseT, HDX
PHY 0x0A: OUI = 0x01C1, Model = 0x27, Rev = 0x00,  10baseT, HDX
PHY 0x0B: OUI = 0x01C1, Model = 0x27, Rev = 0x00,  10baseT, HDX

=> ping 172.21.1.1         
Using FM1@DTSEC4 device
host 172.21.1.1 is alive
=>

----------------------

Linux:

## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   Linux-4.1.30-rt34
   Created:      2016-11-21  14:40:10 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    5668075 Bytes = 5.4 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02000000 ...
   Image Name:   
   Created:      2016-11-21  14:40:30 UTC
   Image Type:   PowerPC Linux RAMDisk Image (uncompressed)
   Data Size:    84713472 Bytes = 80.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 00e00000
   Booting using the fdt blob at 0xe00000
   Uncompressing Kernel Image ... OK
   Loading Ramdisk to 2af36000, end 30000000 ... OK
   Loading Device Tree to 03fe4000, end 03fff6c9 ... OK
uspdaa_mem argument is depracated
Reserved memory: initialized node bman-fbpr, compatible id fsl,bman-fbpr
Reserved memory: initialized node qman-fqd, compatible id fsl,qman-fqd
Reserved memory: initialized node qman-pfdr, compatible id fsl,qman-pfdr
Reserved memory: initialized node pme-pdsr, compatible id fsl,pme-pdsr
Reserved memory: initialized node pme-sre, compatible id fsl,pme-sre
Using CoreNet Generic machine description
MMU: Supported page sizes
         4 KB as direct
      4096 KB as direct
     16384 KB as direct
     65536 KB as direct
    262144 KB as direct
   1048576 KB as direct
MMU: Book3E HW tablewalk not supported
Found initrd at 0xc00000002af36000:0xc000000030000000
bootconsole [udbg0] enabled
CPU maps initialized for 1 thread per core
Starting Linux PPC64 #1 SMP Mon Nov 21 15:40:01 CET 2016
-----------------------------------------------------
ppc64_pft_size    = 0x0
phys_mem_size     = 0x100000000
dcache_line_size  = 0x40
icache_line_size  = 0x40
cpu_features      = 0x00180400581802c0
  possible        = 0x00180480581802c0
  always          = 0x00180400581802c0
cpu_user_features = 0xcc008000 0x08000000
mmu_features      = 0x000a0010
firmware_features = 0x0000000000000000
-----------------------------------------------------
 <- setup_system()
Linux version 4.1.30-rt34 (jhering@05-johe-pc) (gcc version 4.9.4 (Buildroot 2016.08.1) ) #1 SMP Mon Nov 21 15:40:01 CET 2016
CoreNet Generic board
Zone ranges:
  DMA      [mem 0x0000000000000000-0x000000007fffffff]
  DMA32    empty
  Normal   [mem 0x0000000080000000-0x00000000ffffffff]
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000000000-0x00000000ffffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x00000000ffffffff]
MMU: Allocated 2112 bytes of context maps for 255 contexts
PERCPU: Embedded 17 pages/cpu @c0000000ffe00000 s30104 r0 d39528 u262144
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 1034240
Kernel command line: root=/dev/ram rw rootdelay=2 ramdisk_size=50ca040 console=ttyS0,115200 usdpaa_mem=256M
log_buf_len individual max cpu contribution: 4096 bytes
log_buf_len total cpu_extra contributions: 12288 bytes
log_buf_len min size: 16384 bytes
log_buf_len: 32768 bytes
early log buf free: 12036(73%)
PID hash table entries: 4096 (order: 3, 32768 bytes)
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
Sorting __ex_table...
Memory: 3881460K/4194304K available (9232K kernel code, 1172K rwdata, 3208K rodata, 344K init, 797K bss, 312844K reserved, 0K cma-reserved)
Hierarchical RCU implementation.
    Additional per-CPU info printed with stalls.
NR_IRQS:512 nr_irqs:512 16
mpic: Setting up MPIC " OpenPIC  " version 1.2 at ffe040000, max 4 CPUs
mpic: ISU size: 512, shift: 9, mask: 1ff
mpic: Initializing for 512 sources
clocksource timebase: mask: 0xffffffffffffffff max_cycles: 0x8a60dd6a9, max_idle_ns: 440795204056 ns
clocksource: timebase mult[1aaaaaab] shift[24] registered
Console: colour dummy device 80x25
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
e500 family performance monitor hardware support registered
Brought up 4 CPUs
devtmpfs: initialized
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
NET: Registered protocol family 16
Bman ver:0a02,02,01
qman-fqd addr 0xff000000 size 0x800000
qman-pfdr addr 0xfc000000 size 0x2000000
Qman ver:0a01,03,01,03
Found FSL PCI host bridge at 0x0000000ffe240000. Firmware bus number: 0->0
PCI host bridge /pcie@ffe240000  ranges:
 MEM 0x0000000c00000000..0x0000000c0fffffff -> 0x00000000e0000000
  IO 0x0000000ff8000000..0x0000000ff800ffff -> 0x0000000000000000
/pcie@ffe240000: PCICSRBAR @ 0xff000000
setup_pci_atmu: end of DRAM 100000000
/pcie@ffe240000: Setup 64-bit PCI DMA window
/pcie@ffe240000: WARNING: Outbound window cfg leaves gaps in memory map. Adjusting the memory map could reduce unnecessary bounce buffering.
/pcie@ffe240000: DMA window size is 0xe0000000
EDAC PCI0: Giving out device to module MPC85xx_edac controller mpc85xx_pci_err: DEV ffe240000.pcie (INTERRUPT)
MPC85xx_edac acquired irq 20 for PCI Err
MPC85xx_edac PCI err registered
Found FSL PCI host bridge at 0x0000000ffe250000. Firmware bus number: 0->1
PCI host bridge /pcie@ffe250000  ranges:
 MEM 0x0000000c10000000..0x0000000c1fffffff -> 0x00000000e0000000
  IO 0x0000000ff8010000..0x0000000ff801ffff -> 0x0000000000000000
/pcie@ffe250000: PCICSRBAR @ 0xff000000
setup_pci_atmu: end of DRAM 100000000
/pcie@ffe250000: Setup 64-bit PCI DMA window
/pcie@ffe250000: WARNING: Outbound window cfg leaves gaps in memory map. Adjusting the memory map could reduce unnecessary bounce buffering.
/pcie@ffe250000: DMA window size is 0xe0000000
EDAC PCI1: Giving out device to module MPC85xx_edac controller mpc85xx_pci_err: DEV ffe250000.pcie (INTERRUPT)
MPC85xx_edac acquired irq 21 for PCI Err
MPC85xx_edac PCI err registered
Found FSL PCI host bridge at 0x0000000ffe260000. Firmware bus number: 0->0
PCI host bridge /pcie@ffe260000  ranges:
 MEM 0x0000000c20000000..0x0000000c2fffffff -> 0x00000000e0000000
  IO 0x0000000ff8020000..0x0000000ff802ffff -> 0x0000000000000000
/pcie@ffe260000: PCICSRBAR @ 0xff000000
setup_pci_atmu: end of DRAM 100000000
/pcie@ffe260000: Setup 64-bit PCI DMA window
/pcie@ffe260000: WARNING: Outbound window cfg leaves gaps in memory map. Adjusting the memory map could reduce unnecessary bounce buffering.
/pcie@ffe260000: DMA window size is 0xe0000000
EDAC PCI2: Giving out device to module MPC85xx_edac controller mpc85xx_pci_err: DEV ffe260000.pcie (INTERRUPT)
MPC85xx_edac acquired irq 22 for PCI Err
MPC85xx_edac PCI err registered
Found FSL PCI host bridge at 0x0000000ffe270000. Firmware bus number: 0->0
PCI host bridge /pcie@ffe270000  ranges:
 MEM 0x0000000c30000000..0x0000000c3fffffff -> 0x00000000e0000000
  IO 0x0000000ff8030000..0x0000000ff803ffff -> 0x0000000000000000
/pcie@ffe270000: PCICSRBAR @ 0xff000000
setup_pci_atmu: end of DRAM 100000000
/pcie@ffe270000: Setup 64-bit PCI DMA window
/pcie@ffe270000: WARNING: Outbound window cfg leaves gaps in memory map. Adjusting the memory map could reduce unnecessary bounce buffering.
/pcie@ffe270000: DMA window size is 0xe0000000
EDAC PCI3: Giving out device to module MPC85xx_edac controller mpc85xx_pci_err: DEV ffe270000.pcie (INTERRUPT)
MPC85xx_edac acquired irq 23 for PCI Err
MPC85xx_edac PCI err registered
software IO TLB [mem 0xf2e00000-0xf6e00000] (64MB) mapped at [c0000000f2e00000-c0000000f6dfffff]
PCI: Probing PCI hardware
fsl-pci ffe240000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x10000-0x1ffff] (bus address [0x0000-0xffff])
pci_bus 0000:00: root bus resource [mem 0xc00000000-0xc0fffffff] (bus address [0xe0000000-0xefffffff])
pci_bus 0000:00: root bus resource [bus 00]
pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
fsl-pci ffe250000.pcie: PCI host bridge to bus 0001:00
pci_bus 0001:00: root bus resource [io  0x21000-0x30fff] (bus address [0x0000-0xffff])
pci_bus 0001:00: root bus resource [mem 0xc10000000-0xc1fffffff] (bus address [0xe0000000-0xefffffff])
pci_bus 0001:00: root bus resource [bus 00-01]
pci 0001:00:00.0: PCI bridge to [bus 01-ff]
fsl-pci ffe260000.pcie: PCI host bridge to bus 0002:00
pci_bus 0002:00: root bus resource [io  0x32000-0x41fff] (bus address [0x0000-0xffff])
pci_bus 0002:00: root bus resource [mem 0xc20000000-0xc2fffffff] (bus address [0xe0000000-0xefffffff])
pci_bus 0002:00: root bus resource [bus 00]
pci 0002:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0002:00:00.0: PCI bridge to [bus 01-ff]
fsl-pci ffe270000.pcie: PCI host bridge to bus 0003:00
pci_bus 0003:00: root bus resource [io  0x43000-0x52fff] (bus address [0x0000-0xffff])
pci_bus 0003:00: root bus resource [mem 0xc30000000-0xc3fffffff] (bus address [0xe0000000-0xefffffff])
pci_bus 0003:00: root bus resource [bus 00]
pci 0003:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0003:00:00.0: PCI bridge to [bus 01-ff]
PCI: Cannot allocate resource region 0 of device 0000:00:00.0, will remap
PCI: Cannot allocate resource region 0 of device 0001:00:00.0, will remap
PCI: Cannot allocate resource region 0 of device 0002:00:00.0, will remap
PCI: Cannot allocate resource region 0 of device 0003:00:00.0, will remap
pci 0000:00:00.0: BAR 0: no space for [mem size 0x01000000]
pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x01000000]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0:   bridge window [io  0x10000-0x1ffff]
pci 0000:00:00.0:   bridge window [mem 0xc00000000-0xc0fffffff]
pci_bus 0000:00: Some PCI device resources are unassigned, try booting with pci=realloc
pci 0001:00:00.0: BAR 0: no space for [mem size 0x01000000]
pci 0001:00:00.0: BAR 0: failed to assign [mem size 0x01000000]
pci 0001:00:00.0: PCI bridge to [bus 01]
pci 0001:00:00.0:   bridge window [io  0x21000-0x30fff]
pci 0001:00:00.0:   bridge window [mem 0xc10000000-0xc1fffffff]
pci_bus 0001:00: Some PCI device resources are unassigned, try booting with pci=realloc
pci 0002:00:00.0: BAR 0: no space for [mem size 0x01000000]
pci 0002:00:00.0: BAR 0: failed to assign [mem size 0x01000000]
pci 0002:00:00.0: PCI bridge to [bus 01]
pci 0002:00:00.0:   bridge window [io  0x32000-0x41fff]
pci 0002:00:00.0:   bridge window [mem 0xc20000000-0xc2fffffff]
pci_bus 0002:00: Some PCI device resources are unassigned, try booting with pci=realloc
pci 0003:00:00.0: BAR 0: no space for [mem size 0x01000000]
pci 0003:00:00.0: BAR 0: failed to assign [mem size 0x01000000]
pci 0003:00:00.0: PCI bridge to [bus 01]
pci 0003:00:00.0:   bridge window [io  0x43000-0x52fff]
pci 0003:00:00.0:   bridge window [mem 0xc30000000-0xc3fffffff]
pci_bus 0003:00: Some PCI device resources are unassigned, try booting with pci=realloc
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
bman-fbpr addr 0xfe000000 size 0x1000000
Bman err interrupt handler present
Bman portal initialised, cpu 0
Bman portal initialised, cpu 1
Bman portal initialised, cpu 2
Bman portal initialised, cpu 3
Bman portals initialised
Qman err interrupt handler present
QMan: Allocated lookup table at 8000000000002000, entry count 131073
Qman portal initialised, cpu 0
Qman portal initialised, cpu 1
Qman portal initialised, cpu 2
Qman portal initialised, cpu 3
Qman portals initialised
Bman: BPID allocator includes range 32:32
Qman: FQID allocator includes range 256:512
Qman: FQID allocator includes range 32768:32768
Qman: CGRID allocator includes range 0:256
Qman: pool channel allocator includes range 1025:15
No USDPAA memory, no 'fsl,usdpaa-mem' in device-tree
Switched to clocksource timebase
NET: Registered protocol family 2
TCP established hash table entries: 32768 (order: 6, 262144 bytes)
TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 32768 bind 32768)
UDP hash table entries: 2048 (order: 4, 65536 bytes)
UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 82728K (c00000002af36000 - c000000030000000)
futex hash table entries: 1024 (order: 4, 65536 bytes)
HugeTLB registered 4 MB page size, pre-allocated 0 pages
HugeTLB registered 16 MB page size, pre-allocated 0 pages
HugeTLB registered 64 MB page size, pre-allocated 0 pages
HugeTLB registered 256 MB page size, pre-allocated 0 pages
HugeTLB registered 1 GB page size, pre-allocated 0 pages
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
pcieport 0000:00:00.0: Signaling PME through PCIe PME interrupt
pcieport 0001:00:00.0: Signaling PME through PCIe PME interrupt
pci 0001:01:00.0: Signaling PME through PCIe PME interrupt
pcieport 0002:00:00.0: Signaling PME through PCIe PME interrupt
pcieport 0003:00:00.0: Signaling PME through PCIe PME interrupt
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
Serial: 8250/16550 driver, 12 ports, IRQ sharing enabled
console [ttyS0] disabled
serial8250.0: ttyS0 at MMIO 0xffe11c500 (irq = 36, base_baud = 18750000) is a 16550A_FSL64
console [ttyS0] enabled
console [ttyS0] enabled
bootconsole [udbg0] disabled
bootconsole [udbg0] disabled
serial8250.0: ttyS1 at MMIO 0xffe11c600 (irq = 36, base_baud = 18750000) is a 16550A_FSL64
serial8250.0: ttyS2 at MMIO 0xffe11d500 (irq = 37, base_baud = 18750000) is a 16550A_FSL64
serial8250.0: ttyS3 at MMIO 0xffe11d600 (irq = 37, base_baud = 18750000) is a 16550A_FSL64
0001:01:00.0: ttyS4 at MMIO 0xc10000000 (irq = 41, base_baud = 7812500) is a XR17V35X
0001:01:00.0: ttyS5 at MMIO 0xc10000400 (irq = 41, base_baud = 7812500) is a XR17V35X
0001:01:00.0: ttyS6 at MMIO 0xc10000800 (irq = 41, base_baud = 7812500) is a XR17V35X
0001:01:00.0: ttyS7 at MMIO 0xc10000c00 (irq = 41, base_baud = 7812500) is a XR17V35X
0001:01:00.0: ttyS8 at MMIO 0xc10001000 (irq = 41, base_baud = 7812500) is a XR17V35X
0001:01:00.0: ttyS9 at MMIO 0xc10001400 (irq = 41, base_baud = 7812500) is a XR17V35X
0001:01:00.0: ttyS10 at MMIO 0xc10001800 (irq = 41, base_baud = 7812500) is a XR17V35X
0001:01:00.0: ttyS11 at MMIO 0xc10001c00 (irq = 41, base_baud = 7812500) is a XR17V35X
ePAPR hypervisor byte channel driver
brd: module loaded
loop: module loaded
fsl-sata ffe220000.sata: Sata FSL Platform/CSB Driver init
scsi host0: sata_fsl
ata1: SATA max UDMA/133 irq 68
fsl_espi ffe110000.spi: cs=0, init_csmode=0x100008
fsl_espi ffe110000.spi: cs=1, init_csmode=0x100008
fsl_espi ffe110000.spi: cs=2, init_csmode=0x100008
fsl_espi ffe110000.spi: cs=3, init_csmode=0x100008
m25p80 spi32766.0: unrecognized JEDEC id bytes: 90, 5d, 10
fsl_espi ffe110000.spi: at 0x8000080080936000 (irq = 53)
libphy: Fixed MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
ucc_geth_driver: QE UCC Gigabit Ethernet Controller
Freescale FM module, FMD API version 21.1.0
Freescale FM Ports module
fsl_mac: fsl_mac: FSL FMan MAC API based driver
fsl_mac ffe4e0000.ethernet: FMan MEMAC
fsl_mac ffe4e0000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:00
fsl_mac ffe4e2000.ethernet: FMan MEMAC
fsl_mac ffe4e2000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:01
fsl_mac ffe4e4000.ethernet: FMan MEMAC
fsl_mac ffe4e4000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:02
fsl_mac ffe4e6000.ethernet: FMan MEMAC
fsl_mac ffe4e6000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:03
fsl_mac ffe4e8000.ethernet: FMan MEMAC
fsl_mac ffe4e8000.ethernet: FMan MAC address: 00:1a:8d:ff:fe:04
fsl_dpa: FSL DPAA Ethernet driver
fsl_dpa: fsl_dpa: Probed interface eth0
fsl_dpa: fsl_dpa: Probed interface eth1
fsl_dpa: fsl_dpa: Probed interface eth2
fsl_dpa: fsl_dpa: Probed interface eth3
fsl_dpa: fsl_dpa: Probed interface eth4
fsl_dpa: FSL DPAA CEETM qdisc
fsl_advanced: FSL DPAA Advanced drivers:
fsl_proxy: FSL DPAA Proxy initialization driver
fsl_dpa_shared: FSL DPAA Shared Ethernet driver
fsl_dpa_macless: FSL DPAA MACless Ethernet driver
fsl_oh: FSL FMan Offline Parsing port driver
fsl-of-dma ffe100300.dma: dma channel dma-uio0-0 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-1 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-2 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-3 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-4 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-5 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-6 initialized
fsl-of-dma ffe100300.dma: dma channel dma-uio0-7 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-0 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-1 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-2 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-3 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-4 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-5 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-6 initialized
fsl-of-dma ffe101300.dma: dma channel dma-uio1-7 initialized
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 44, io mem 0xffe210000
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2
fsl-ehci fsl-ehci.1: irq 45, io mem 0xffe211000
fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
i2c /dev entries driver
mpc-i2c ffe118000.i2c: timeout 1000000 us
rtc-ds1307 0-0068: rtc core: registered ds3231 as rtc0
at24 0-0051: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
mpc-i2c ffe118100.i2c: timeout 1000000 us
at24 1-0056: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
mpc-i2c ffe119000.i2c: timeout 1000000 us
mpc-i2c ffe119100.i2c: timeout 1000000 us
Freescale(R) MPC85xx EDAC driver, (C) 2006 Montavista Software
EDAC MC0: Giving out device to module MPC85xx_edac controller mpc85xx_mc_err: DEV mpc85xx_mc_err (INTERRUPT)
MPC85xx_edac acquired irq 490 for MC
MPC85xx_edac MC err registered
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
/soc@ffe000000/sdhc@114000: voltage-ranges unspecified
ata1: Signature Update detected @ 508 msecs
sdhci-esdhc ffe114000.sdhc: No vmmc regulator found
sdhci-esdhc ffe114000.sdhc: No vqmmc regulator found
mmc0: SDHCI controller on ffe114000.sdhc [ffe114000.sdhc] using ADMA 64-bit
platform caam_qi.0: Linux CAAM Queue I/F driver initialised
caam ffe300000.crypto: Instantiated RNG4 SH1
caam ffe300000.crypto: device ID = 0x0a12040000000000 (Era 6)
caam ffe300000.crypto: job rings = 4, qi = 1
caam algorithms registered in /proc/crypto
platform caam_qi.0: fsl,sec-v5.0 algorithms registered in /proc/crypto
caam_jr ffe301000.jr: registering rng-caam
caam ffe300000.crypto: fsl,sec-v5.0 algorithms registered in /proc/crypto
Freescale USDPAA process driver
fsl-usdpaa: no region found
Freescale USDPAA process IRQ driver
dce_sys_init done!
No fsl,dce node
fsl-pme ffe316000.pme: ver: 0x00100202
Freescale pme2 db driver
Freescale pme2 scan driver
fsl-pme2-scan: device pme_scan registered
DPA Classifier Driver initialized.
DPA IPSec Driver initialized.
DPA Stats Driver initialized.
mmc0: MAN_BKOPS_EN bit is not set
ipip: IPv4 over IPv4 tunneling driver
ip_tables: (C) 2000-2006 Netfilter Core Team
Initializing XFRM netlink socket
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
fsl_generic: FSL DPAA Generic Ethernet driver
rtc-ds1307 0-0068: setting system clock to 2016-09-28 04:52:41 UTC (1475038361)
mmc0: new high speed MMC card at address 0001
mmcblk0: mmc0:0001 MMC16G 7.30 GiB
mmcblk0boot0: mmc0:0001 MMC16G partition 1 16.0 MiB
mmcblk0boot1: mmc0:0001 MMC16G partition 2 16.0 MiB
usb 1-1: new full-speed USB device number 2 using fsl-ehci
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.00: ATA-9: SAMSUNG MZ7WD960HAGP-00003, DXM8DW3Q, max UDMA/133
ata1.00: 1875385008 sectors, multi 16: LBA48 NCQ (depth 16/32)
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG MZ7WD960 DW3Q PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 1875385008 512-byte logical blocks: (960 GB/894 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: Attached scsi generic sg0 type 0
 sda: sda1
sd 0:0:0:0: [sda] Attached SCSI disk
Freeing unused kernel memory: 344K (c000000000c2d000 - c000000000c83000)
mmcblk0rpmb: mmc0:0001 MMC16G partition 3 128 KiB
 mmcblk0: p1 p2 p3 p4
EXT4-fs (mmcblk0p2): recovery complete
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: (null)
Starting overlay: OK
Starting logging: OK
Populating /dev using udev: udevd[1696]: starting version 3.2
random: udevd urandom read with 6 bits of entropy available
udevd[1697]: starting eudev-3.2
input: BurrBrown from Texas Instruments USB AUDIO  CODEC as /devices/platform/ffe000000.soc/ffe210000.usb/fsl-ehci.0/usb1/1-1/1-1:1.3/0003:08BB:29C6.0001/input/input0
seville ffe800000.l2switch: Found Seville Switch, UIO device - IRQ 26, id 0x099530e9.
hid-generic 0003:08BB:29C6.0001: input: USB HID v1.00 Device [BurrBrown from Texas Instruments USB AUDIO  CODEC] on usb-fsl-ehci.0-1/input3
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usbcore: registered new interface driver snd-usb-audio
tpm_i2c_infineon 0-0020: could not request locality
done
Initializing random number generator... done.
Starting rpcbind: OK
Starting network: ifup: ignoring unknown interface eth1
udhcpc: started, v1.25.0
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: no lease, failing
ifup: ignoring unknown interface eth3
ifup: ignoring unknown interface eth4
FAIL
Created /var/log/l2switch
l2switch: Started L2 Switch demo app version 0.5.0
Build Date: Nov 21 2016 15:05:50
GIT Version: local
map serial devices to /dev/ser??: OK
Starting system message bus: done
Starting dropbear sshd: OK
Starting lighttpd: OK
Starting ProFTPD: capability: warning: `proftpd' uses 32-bit capabilities (legacy support in use)
done

Welcome to Maritime Data Processor ...
MDP-T1040 login: root
Password:
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1A:8D:FF:FE:00  
          inet addr:172.21.240.11  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::21a:8dff:feff:fe00/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:648 (648.0 B)
          Memory:ffe4e0000-ffe4e0fff

eth2      Link encap:Ethernet  HWaddr 00:1A:8D:FF:FE:02  
          inet addr:192.168.94.205  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::21a:8dff:feff:fe02/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:850 (850.0 B)
          Memory:ffe4e4000-ffe4e4fff

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# lshw
mdp-t1040                   
    description: Computer
    product: maritime data processor MDP-T1040
    width: 64 bits
    capabilities: smp
  *-core
       description: Motherboard
       physical id: 0
     *-cpu:0
          description: CPU
          product: e5500
          physical id: 1
          bus info: cpu@0
          version: 2.1 (pvr 8024 1021)
          size: 1400MHz
          clock: 600MHz
        *-cache
             description: L1 Cache
             physical id: 0
             size: 32KiB
     *-cpu:1
          description: CPU
          product: e5500
          physical id: 2
          bus info: cpu@1
          version: 2.1 (pvr 8024 1021)
          size: 1400MHz
          clock: 600MHz
        *-cache
             description: L1 Cache
             physical id: 0
             size: 32KiB
     *-cpu:2
          description: CPU
          product: e5500
          physical id: 3
          bus info: cpu@2
          version: 2.1 (pvr 8024 1021)
          size: 1400MHz
          clock: 600MHz
        *-cache
             description: L1 Cache
             physical id: 0
             size: 32KiB
     *-cpu:3
          description: CPU
          product: e5500
          physical id: 4
          bus info: cpu@3
          version: 2.1 (pvr 8024 1021)
          size: 1400MHz
          clock: 600MHz
        *-cache
             description: L1 Cache
             physical id: 0
             size: 32KiB
     *-memory
          description: System memory
          physical id: 5
          size: 3871MiB
     *-processor:0
          description: Power PC
          product: Freescale Semiconductor Inc
          vendor: Freescale Semiconductor Inc
          physical id: 6
          bus info: pci@0000:00:00.0
          version: 11
          width: 32 bits
          clock: 33MHz
          capabilities: pm pciexpress bus_master cap_list
          configuration: driver=pcieport latency=0
          resources: irq:20 ioport:0(size=65536) memory:c00000000-c0fffffff
     *-processor:1
          description: Power PC
          product: Freescale Semiconductor Inc
          vendor: Freescale Semiconductor Inc
          physical id: 7
          bus info: pci@0001:00:00.0
          version: 11
          width: 32 bits
          clock: 33MHz
          capabilities: pm pciexpress bus_master cap_list
          configuration: driver=pcieport latency=0
          resources: irq:21 ioport:0(size=65536) memory:c10000000-c1fffffff
     *-communication
          description: Serial controller
          product: Exar Corp.
          vendor: Exar Corp.
          physical id: 8
          bus info: pci@0001:01:00.0
          version: 03
          width: 32 bits
          clock: 33MHz
          capabilities: msi pm pciexpress 16550 bus_master cap_list
          configuration: driver=serial latency=0
          resources: irq:41 memory:c10000000-c10003fff
     *-processor:2
          description: Power PC
          product: Freescale Semiconductor Inc
          vendor: Freescale Semiconductor Inc
          physical id: 9
          bus info: pci@0002:00:00.0
          version: 11
          width: 32 bits
          clock: 33MHz
          capabilities: pm pciexpress bus_master cap_list
          configuration: driver=pcieport latency=0
          resources: irq:22 ioport:0(size=65536) memory:c20000000-c2fffffff
     *-processor:3
          description: Power PC
          product: Freescale Semiconductor Inc
          vendor: Freescale Semiconductor Inc
          physical id: 0
          bus info: pci@0003:00:00.0
          version: 11
          width: 32 bits
          clock: 33MHz
          capabilities: pm pciexpress bus_master cap_list
          configuration: driver=pcieport latency=0
          resources: irq:23 ioport:0(size=65536) memory:c30000000-c3fffffff
     *-scsi
          physical id: a
          logical name: scsi0
          capabilities: emulated
        *-disk
             description: ATA Disk
             product: SAMSUNG MZ7WD960
             vendor: Western Digital
             physical id: 0.0.0
             bus info: scsi@0:0.0.0
             logical name: /dev/sda
             version: DW3Q
             serial: S186NEADC14528
             size: 894GiB (960GB)
             capabilities: partitioned partitioned:dos
             configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512
           *-volume
                description: Linux filesystem partition
                vendor: Linux
                physical id: 1
                bus info: scsi@0:0.0.0,1
                logical name: /dev/sda1
                version: 1.0
                serial: b8119ba1-0042-4d8a-ac17-6f4e95bfe899
                size: 894GiB
                capacity: 894GiB
                capabilities: primary extended_attributes large_files ext2 initialized
                configuration: filesystem=ext2 modified=2016-09-22 09:01:18 state=unknown
  *-network:0 DISABLED
       description: Ethernet interface
       physical id: 1
       logical name: eth3
       serial: 00:1a:8d:ff:fe:03
       capabilities: ethernet physical
       configuration: autonegotiation=off broadcast=yes driver=fsl_dpa duplex=half firmware=0 link=no multicast=yes port=twisted pair
  *-network:1
       description: Ethernet interface
       physical id: 2
       logical name: eth2
       serial: 00:1a:8d:ff:fe:02
       size: 10Mbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical mii 10bt-fd 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=fsl_dpa duplex=half firmware=0 ip=192.168.94.205 link=no multicast=yes port=MII speed=10Mbit/s
  *-network:2 DISABLED
       description: Ethernet interface
       physical id: 3
       logical name: eth1
       serial: 00:1a:8d:ff:fe:01
       capabilities: ethernet physical
       configuration: autonegotiation=off broadcast=yes driver=fsl_dpa duplex=half firmware=0 link=no multicast=yes port=twisted pair
  *-network:3 DISABLED
       description: Ethernet interface
       physical id: 4
       logical name: dummy0
       serial: e6:bb:b0:1d:fd:ac
       capabilities: ethernet physical
       configuration: broadcast=yes driver=dummy driverversion=1.0
  *-network:4
       description: Ethernet interface
       physical id: 5
       logical name: eth0
       serial: 00:1a:8d:ff:fe:00
       capacity: 1Gbit/s
       capabilities: ethernet physical mii 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=fsl_dpa firmware=0 ip=172.21.240.11 link=yes multicast=yes port=MII
  *-network:5 DISABLED
       description: Ethernet interface
       physical id: 6
       logical name: eth4
       serial: 00:1a:8d:ff:fe:04
       capabilities: ethernet physical
       configuration: autonegotiation=off broadcast=yes driver=fsl_dpa duplex=half firmware=0 link=no multicast=yes port=twisted pair
#
# ifconfig -a
dummy0    Link encap:Ethernet  HWaddr E6:BB:B0:1D:FD:AC  
          BROADCAST NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 00:1A:8D:FF:FE:00  
          inet addr:172.21.240.11  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::21a:8dff:feff:fe00/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:648 (648.0 B)
          Memory:ffe4e0000-ffe4e0fff

eth1      Link encap:Ethernet  HWaddr 00:1A:8D:FF:FE:01  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:ffe4e2000-ffe4e2fff

eth2      Link encap:Ethernet  HWaddr 00:1A:8D:FF:FE:02  
          inet addr:192.168.94.205  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::21a:8dff:feff:fe02/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:850 (850.0 B)
          Memory:ffe4e4000-ffe4e4fff

eth3      Link encap:Ethernet  HWaddr 00:1A:8D:FF:FE:03  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:ffe4e6000-ffe4e6fff

eth4      Link encap:Ethernet  HWaddr 00:1A:8D:FF:FE:04  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:ffe4e8000-ffe4e8fff

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tunl0     Link encap:UNSPEC  HWaddr 00-00-00-00-F3-B0-00-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

#

----------------------

patch for U-Boot phy-api (VSC8502):

diff -uNr a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
--- a/drivers/net/phy/vitesse.c    2016-09-08 08:58:22.000000000 +0200
+++ b/drivers/net/phy/vitesse.c    2016-11-01 14:09:32.781195522 +0100
@@ -65,7 +65,13 @@
 #define MIIM_VSC8664_EPHY_CON        0x17
 #define MIIM_VSC8664_LED_CON        0x1E
 
-#define PHY_EXT_PAGE_ACCESS_EXTENDED    0x0001
+/* Vitesse VSC8502 control register */
+#define MIIM_VSC8502_EXTENDED20E2    0x14
+#define MIIM_VSC8502_23                0x17
+
+#define PHY_EXT_PAGE_ACCESS_EXTENDED    0x0001 /* Extended reg - page 1 */
+#define PHY_EXT_PAGE_ACCESS_EXTENDED2   0x0002 /* Extended reg - page 2 */
+
 
 /* CIS8201 */
 static int vitesse_config(struct phy_device *phydev)
@@ -112,10 +118,12 @@
 
 static int vitesse_startup(struct phy_device *phydev)
 {
-    genphy_update_link(phydev);
-    vitesse_parse_status(phydev);
+    int ret;
 
-    return 0;
+    ret = genphy_update_link(phydev);
+    if (ret)
+        return ret;
+    return vitesse_parse_status(phydev);
 }
 
 static int cis8204_config(struct phy_device *phydev)
@@ -287,6 +295,52 @@
     return 0;
 }
 
+static int vsc8502_config(struct phy_device *phydev)
+{
+    u32 val;
+    int timeout = 1000000;
+
+    /* configure register to access 23 */
+    phy_write(phydev,MDIO_DEVAD_NONE,PHY_EXT_PAGE_ACCESS,0);
+    if(phydev->interface==PHY_INTERFACE_MODE_RGMII)
+     {
+      val = phy_read(phydev,MDIO_DEVAD_NONE,MIIM_VSC8502_23);
+      /* set bit 12 '1' for RGMII mode */
+      val |= (1<<12);
+      phy_write(phydev,MDIO_DEVAD_NONE,MIIM_VSC8502_23,val);
+      }
+
+    phy_write(phydev,MDIO_DEVAD_NONE,PHY_EXT_PAGE_ACCESS,0);
+    val=phy_read(phydev,MDIO_DEVAD_NONE, MII_BMCR);
+    val|=BMCR_RESET;
+    phy_write(phydev,MDIO_DEVAD_NONE,MII_BMCR,val);
+    /* When bit 15 is cleared the command has completed */
+    while((val&BMCR_RESET)&&timeout--)
+        val=phy_read(phydev,MDIO_DEVAD_NONE,MII_BMCR);
+
+    if(0==timeout)
+     {
+      printf("PHY 8502 config failed\n");
+      return(-1);
+     }
+    mdelay(10);
+    /* configure register to access 20E2 */
+    phy_write(phydev,MDIO_DEVAD_NONE,PHY_EXT_PAGE_ACCESS,
+              PHY_EXT_PAGE_ACCESS_EXTENDED2);
+    if(phydev->interface==PHY_INTERFACE_MODE_RGMII)
+     {
+      /* set tx 2,0 ns rx2,0 ns delay for RGMII mode, Normal RX_CLK behavior  */
+      val= (1<<2) | (1<<6);
+      /* set jeweils 1.7 ns delay for RGMII mode, Normal RX_CLK behavior  */
+      /*val=(1<<0) | (1<<1) | (1<<4) | (1<<5);*/
+
+      phy_write(phydev,MDIO_DEVAD_NONE,MIIM_VSC8502_EXTENDED20E2,val);
+      }
+    phy_write(phydev,MDIO_DEVAD_NONE,PHY_EXT_PAGE_ACCESS,0);
+    genphy_config_aneg(phydev);
+    return 0;
+}
+
 static struct phy_driver VSC8211_driver = {
     .name    = "Vitesse VSC8211",
     .uid    = 0xfc4b0,
@@ -418,6 +472,17 @@
     .shutdown = &genphy_shutdown,
 };
 
+static struct phy_driver VSC8502_driver = {
+    .name = "Vitesse VSC8502",
+    .uid = 0x70630,
+    .mask = 0xffff0,
+    .features = PHY_GBIT_FEATURES,
+    .config = &vsc8502_config,
+    .startup = &vitesse_startup,
+    .shutdown = &genphy_shutdown,
+};
+
+
 int phy_vitesse_init(void)
 {
     phy_register(&VSC8641_driver);
@@ -433,6 +498,6 @@
     phy_register(&VSC8664_driver);
     phy_register(&cis8201_driver);
     phy_register(&cis8204_driver);
-
+    phy_register(&VSC8502_driver);
     return 0;
 }

----------------------

linux phy-api (VSC8502):

/*
 * Driver for Vitesse PHY VSC8502
 *
 * Author: Joerg Hering
 *
 * Copyright Interschalt maritime systems , JH
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General  Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.
 *
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/phy.h>
#include <linux/of.h>

MODULE_DESCRIPTION("Vitesse PHY VSC8502 driver");
MODULE_AUTHOR("Joerg Hering");
MODULE_LICENSE("GPL");

/* Vitesse VSC8502 control register */
#define PHY_ID_VSC8502                    0x70630
#define MIIM_VSC8502_EXTENDED20E2        0x14
#define MIIM_VSC8502_23                    0x17

#define PHY_EXT_PAGE_ACCESS                0x1f
#define PHY_EXT_PAGE_ACCESS_EXTENDED    0x0001 /* Extended reg - page 1 */
#define PHY_EXT_PAGE_ACCESS_EXTENDED2   0x0002 /* Extended reg - page 2 */
/* Vitesse Interrupt Mask Register */
#define MII_VSC8502_IMASK                0x19
#define MII_VSC8502_ISTAT                0x1a
#define MII_VSC8502_IMASK_MASK            0xf000
/*-----------------------------------------------------------------------------*/
#ifdef CONFIG_OF_MDIO
/*
 * Set and/or override some configuration registers based on the
 * vitesse,vsc8502-reg-init property stored in the of_node for the phydev.
 *
 * vitesse,vsc8502-reg-init = <reg-page reg mask value>,...;
 *
 * There may be one or more sets of <reg-page reg mask value>:
 *
 * reg-page: which register bank to use.
 * reg: the register.
 * mask: if non-zero, ANDed with existing register value.
 * value: ORed with the masked value and written to the regiser.
 *
 */
static int vsc8502_of_reg_init(struct phy_device *phydev)
{
    const __be32 *paddr;
    int len, i, saved_page, current_page, page_changed, ret;

    if (!phydev->dev.of_node)
        return 0;

    paddr = of_get_property(phydev->dev.of_node, "vitesse,vsc8502-reg-init", &len);
    if (!paddr || len < (4 * sizeof(*paddr)))
        return 0;

    saved_page = phy_read(phydev,PHY_EXT_PAGE_ACCESS);
    if (saved_page < 0)
        return saved_page;
    page_changed = 0;
    current_page = saved_page;

    ret = 0;
    len /= sizeof(*paddr);
    for (i = 0; i < len - 3; i += 4) {
        u16 reg_page = be32_to_cpup(paddr + i);
        u16 reg = be32_to_cpup(paddr + i + 1);
        u16 mask = be32_to_cpup(paddr + i + 2);
        u16 val_bits = be32_to_cpup(paddr + i + 3);
        int val;

        if (reg_page != current_page) {
            current_page = reg_page;
            page_changed = 1;
            ret = phy_write(phydev,PHY_EXT_PAGE_ACCESS, reg_page);
            if (ret < 0)
                goto err;
        }

        val = 0;
        if (mask) {
            val = phy_read(phydev, reg);
            if (val < 0) {
                ret = val;
                goto err;
            }
            val &= mask;
        }
        val |= val_bits;

        ret = phy_write(phydev, reg, val);
        if (ret < 0)
            goto err;

    }
err:
    if (page_changed) {
        i = phy_write(phydev,PHY_EXT_PAGE_ACCESS, saved_page);
        if (ret == 0)
            ret = i;
    }
    return ret;
}
#else
static int vsc8502_of_reg_init(struct phy_device *phydev)
{
    return 0;
}
#endif /* CONFIG_OF_MDIO */
/*-----------------------------------------------------------------------------*/
static int vsc8502_config_init(struct phy_device *phydev)
{
int ret;
u16 reg;
    reg=phy_read(phydev,MIIM_VSC8502_23);
printk(KERN_INFO "vsc8502: reg=%04X, reg=%04X\n",MIIM_VSC8502_23,reg);
    ret=genphy_config_init(phydev);
printk(KERN_INFO "vsc8502: genphy_config_init(phydev) = %d,type=%d\n",ret,phydev->interface);
    if(ret<0)
      return(ret);
    if(phydev->interface==PHY_INTERFACE_MODE_RGMII)
     {
/* configure register to access 20E2 */
/* set tx 2,0 ns rx2,0 ns delay for RGMII mode, Normal RX_CLK behavior  */
      phy_write(phydev,PHY_EXT_PAGE_ACCESS,PHY_EXT_PAGE_ACCESS_EXTENDED2);
      reg=phy_read(phydev,MIIM_VSC8502_EXTENDED20E2);
printk(KERN_INFO "vsc8502: reg=%04X, val=%04X\n",MIIM_VSC8502_EXTENDED20E2,reg);
      reg=(1<<2)|(1<<6);
      phy_write(phydev,MIIM_VSC8502_EXTENDED20E2,reg);
      ret=phy_write(phydev,PHY_EXT_PAGE_ACCESS,0x0);
    }
   return(ret);
}
/*-----------------------------------------------------------------------------*/
static int vsc8502_ack_interrupt(struct phy_device *phydev)
{
    int err = 0;

    /* Don't bother to ACK the interrupts if interrupts
     * are disabled.  The 824x cannot clear the interrupts
     * if they are disabled.
     */

    if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
        err = phy_read(phydev, MII_VSC8502_ISTAT);
    return (err < 0) ? err : 0;
}
/*-----------------------------------------------------------------------------*/
static int vsc8502_config_intr(struct phy_device *phydev)
{
    int err;

    if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
        err = phy_write(phydev, MII_VSC8502_IMASK,MII_VSC8502_IMASK_MASK);
    else {
        /* The Vitesse PHY cannot clear the interrupt
         * once it has disabled them, so we clear them first
         */

        err = phy_read(phydev, MII_VSC8502_ISTAT);

        if (err < 0)
            return err;

        err = phy_write(phydev, MII_VSC8502_IMASK, 0);
    }
    return err;
}
/*-----------------------------------------------------------------------------*/
static int vsc8502_read_status(struct phy_device *phydev)
{
    int i, j = 0;
    u32 old_phy_addr = phydev->addr;
    while (j < 32) {
        phydev->addr = j;
        printk(KERN_INFO "PHY Address %d\n", j);
        for (i = 0; i < 32; i++) {
            printk(KERN_INFO " PR%d: 0x%x\n", i, phy_read(phydev, i));
        }
        j++;
        printk(KERN_INFO "\n");
    }
    printk(KERN_INFO "\n");
    phydev->addr = old_phy_addr;
    genphy_read_status(phydev);
    return 0;
}
/*-----------------------------------------------------------------------------*/
/* Vitesse 8502 */
static struct phy_driver vsc8502_driver[] = {
{
    .phy_id         = PHY_ID_VSC8502,
    .name           = "Vitesse VSC8502",
    .phy_id_mask    = 0x000ffff0,
    .features       = PHY_GBIT_FEATURES,
    .flags          = PHY_HAS_INTERRUPT,
    .config_init    = &vsc8502_config_init,
    .config_aneg    = &genphy_config_aneg,
    .read_status    = &vsc8502_read_status,
    .ack_interrupt  = &vsc8502_ack_interrupt,
    .config_intr    = &vsc8502_config_intr,
    .driver         = { .owner = THIS_MODULE,},
} };

module_phy_driver(vsc8502_driver);

static struct mdio_device_id __maybe_unused vsc8502_tbl[] = {
    {PHY_ID_VSC8502,0x000ffff0},
    {}
};

MODULE_DEVICE_TABLE(mdio,vsc8502_tbl);

----------------------

0 Kudos
2,628 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Jörg Hering,

Please try the following phy device node definition in the dts file, and let me know the result.
                phy_rgmii_0: ethernet-phy@02 {
                    compatible = "vitesse,vsc8502";
                    device_type = "ethernet-phy";
                    reg = <0x02>;

                phy_rgmii_1: ethernet-phy@03 {
                    compatible = "vitesse,vsc8502";
                    device_type = "ethernet-phy";
                    reg = <0x03>;
                };

In addition, as normal the FMAN Ethernet ports should be recognized as fm*-gb* in Linux, I didn't find this renaming in your Linux Kernel boot log.

I suspect you used MAC-LESS or Shared-MAC dts file, if so please don't use it, please use the normal dts file to do verification.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
2,628 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Jörg Hering,

Under u-boot prompt "=>", would you please use "mdio list" command to display MDIO PHYs information and paste the result here?

In addition, would you please provide your Linux Kernel boot up log?


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos