Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

montblanc: uboot: mdio configure phy chip #226

Closed
wants to merge 1 commit into from

Conversation

Scott8440
Copy link
Contributor

Summary:

Description

  • initial configure Marvell PHY chip mode at u-boot start

Motivation

  • enable ethernet be used in u-boot, without need configure in OpenBMC once

X-link: https://github.com/facebookexternal/openbmc.celestica/pull/1572

Test Plan:

  • use "wedge_power.sh reset -s" command to cold-reset, start the unit from power-off
  • stop boot process in u-boot
  • use "dhcp" command to validate u-boot able to get IP and able to get file
root@bmc-oob:~# wedge_power.sh reset -s
Power reset the whole system ...

U-Boot 2019.04 montblanc-10a0fe30934-CLS_main (Jun 08 2023 - 07:27:48 +0000)

SOC: AST2620-A3
RST: Power On
eSPI Mode: SIO:Enable : SuperIO-2e
Eth: MAC0: RMII/NCSI, MAC1: RMII/NCSI, MAC2: RMII/NCSI, MAC3: RMII/NCSI
Model: Aspeed BMC
DRAM:  1.8 GiB (capacity:2048 MiB, VGA:0 MiB, ECC:on, ECC size:1820 MiB)
MMC:   emmc_slot0@100: 0
Loading Environment from SPI Flash... SF: Detected mx66l1g45g with page size 256 Bytes, erase size 64 *** Warning - bad CRC, using default environment

Saving Environment to SPI Flash... SF: Detected mx66l1g45g with page size 256 Bytes, erase size 64 KiBErasing SPI flash...Writing to SPI flash...done
OK
In:    serial
Out:   serial
Err:   serial
Model: Aspeed BMC
Net:   No MDIO found.

Warning: ftgmac@1e690000 (eth0) using random MAC address - fa:6f:d6:79:7d:b8
eth0: ftgmac@1e690000
autoboot in 3 seconds (stop with 'Delete' key)...
montblanc-boot=> dhcp
ftgmac@1e690000: link up, 1000 Mbps full-duplex mac:fa:6f:d6:79:7d:b8
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.10.58 (1030 ms)
*** Warning: no boot file name; using 'C0A80A3A.img'
Using ftgmac@1e690000 device
TFTP from server 192.168.10.50; our IP address is 192.168.10.58
Filename 'C0A80A3A.img'.
Load address: 0x83000000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
montblanc-boot=> bootp 0x83000000 192.168.10.50:flash-montblanc
ftgmac@1e690000: link up, 1000 Mbps full-duplex mac:fa:6f:d6:79:7d:b8
BOOTP broadcast 1
DHCP client bound to address 192.168.10.58 (22 ms)
Using ftgmac@1e690000 device
TFTP from server 192.168.10.50; our IP address is 192.168.10.58
Filename 'flash-montblanc'.
Load address: 0x83000000
Loading: #################################################################
         #################################################################
...
         #################################################################
         ###############################################
8.1 MiB/s
done
Bytes transferred = 29315666 (1bf5252 hex)
montblanc-boot=>

Differential Revision: D46591989

Reviewed By: ssinprem

Summary:
# Description
- initial configure Marvell PHY chip mode at u-boot start

# Motivation
- enable ethernet be used in u-boot, without need configure in OpenBMC once

X-link: facebookexternal/openbmc.celestica#1572

Test Plan:
- use "wedge_power.sh reset -s" command to cold-reset, start the unit from power-off
- stop boot process in u-boot
- use "dhcp" command to validate u-boot able to get IP and able to get file
```
root@bmc-oob:~# wedge_power.sh reset -s
Power reset the whole system ...

U-Boot 2019.04 montblanc-10a0fe30934-CLS_main (Jun 08 2023 - 07:27:48 +0000)

SOC: AST2620-A3
RST: Power On
eSPI Mode: SIO:Enable : SuperIO-2e
Eth: MAC0: RMII/NCSI, MAC1: RMII/NCSI, MAC2: RMII/NCSI, MAC3: RMII/NCSI
Model: Aspeed BMC
DRAM:  1.8 GiB (capacity:2048 MiB, VGA:0 MiB, ECC:on, ECC size:1820 MiB)
MMC:   emmc_slot0@100: 0
Loading Environment from SPI Flash... SF: Detected mx66l1g45g with page size 256 Bytes, erase size 64 *** Warning - bad CRC, using default environment

Saving Environment to SPI Flash... SF: Detected mx66l1g45g with page size 256 Bytes, erase size 64 KiBErasing SPI flash...Writing to SPI flash...done
OK
In:    serial
Out:   serial
Err:   serial
Model: Aspeed BMC
Net:   No MDIO found.

Warning: ftgmac@1e690000 (eth0) using random MAC address - fa:6f:d6:79:7d:b8
eth0: ftgmac@1e690000
autoboot in 3 seconds (stop with 'Delete' key)...
montblanc-boot=> dhcp
ftgmac@1e690000: link up, 1000 Mbps full-duplex mac:fa:6f:d6:79:7d:b8
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.10.58 (1030 ms)
*** Warning: no boot file name; using 'C0A80A3A.img'
Using ftgmac@1e690000 device
TFTP from server 192.168.10.50; our IP address is 192.168.10.58
Filename 'C0A80A3A.img'.
Load address: 0x83000000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
montblanc-boot=> bootp 0x83000000 192.168.10.50:flash-montblanc
ftgmac@1e690000: link up, 1000 Mbps full-duplex mac:fa:6f:d6:79:7d:b8
BOOTP broadcast 1
DHCP client bound to address 192.168.10.58 (22 ms)
Using ftgmac@1e690000 device
TFTP from server 192.168.10.50; our IP address is 192.168.10.58
Filename 'flash-montblanc'.
Load address: 0x83000000
Loading: #################################################################
         #################################################################
...
         #################################################################
         ###############################################
8.1 MiB/s
done
Bytes transferred = 29315666 (1bf5252 hex)
montblanc-boot=>
```

Differential Revision: D46591989

Reviewed By: ssinprem

fbshipit-source-id: 18693b6b1a6a9c58f00c20da1ac5c51cf37c0e96
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D46591989

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3986f2c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants