About RGMII mode setting of MAC0
Andrew Jeffery
andrew at aj.id.au
Sun Apr 19 14:30:42 AEST 2020
Hi Harley
On Sat, 18 Apr 2020, at 20:44, zhouyuanqing8 at outlook.com wrote:
>
> Hi,
>
> My name is Harley, I am currently developing an openbmc project based
> on the AST2500 chip. There are a few questions that need to be
> consulted. Please help me to answer them. Thank you very much!
>
> 1、About RGMII mode setting of MAC0
> The current openbmc project and uboot code support 2 modes: MAC0 uses
> NCSI, MAC2 uses RGMII, but my board uses MAC0 RGMII. How can I simply
> configure this to complete this work, or do I have to modify
> aspeednic.c and add the new patch file under the directory
> meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files ?
The way to select NCSI vs PHY is via the u-boot config files. Here are some
examples of different platforms selecting between different configs:
```
$ git grep 'UBOOT_MACHINE =' | head
meta-aspeed/conf/machine/evb-ast2500.conf:UBOOT_MACHINE = "ast_g5_phy_config"
meta-aspeed/conf/machine/evb-ast2600.conf:UBOOT_MACHINE = "ast2600_openbmc_defconfig"
meta-evb/meta-evb-aspeed/meta-evb-ast2500/conf/machine/evb-ast2500.conf:UBOOT_MACHINE = "ast_g5_phy_config"
meta-evb/meta-evb-enclustra/meta-evb-zx3-pm3/conf/machine/evb-zx3-pm3.conf:UBOOT_MACHINE = "zynq_zc702_config"
meta-facebook/meta-tiogapass/conf/machine/tiogapass.conf:UBOOT_MACHINE = "ast_g5_ncsi_config"
meta-facebook/meta-yosemitev2/conf/machine/yosemitev2.conf:UBOOT_MACHINE = "ast_g5_ncsi_config"
```
Essentially, you want to configure your platform (i.e. in ${MACHINE}.conf) with:
```
UBOOT_MACHINE = "ast_g5_phy_config"
```
>
> 2、There are lot of recipes under directory meta-phosphor, How does
> bitbake choose specific recipes? I read the manual of bitbake and the
> project of openbmc, and I didn't find a way to choose. openbmc has many
> recipes, we can't use them all。
This is handled by variously by packagegroups, DISTRO_FEATURES,
MACHINE_FEATURES and IMAGE_INSTALL. Additionally if we look at
e.g. meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf, we find:
```
require conf/machine/include/ast2500.inc
require conf/machine/include/obmc-bsp-common.inc
require conf/machine/include/openpower.inc
require conf/machine/include/p9.inc
```
If we drill down through these files we find things like
meta-aspeed/conf/machine/include/aspeed.inc:
MACHINE_EXTRA_RRECOMMENDS += "udev-aspeed-vuart udev-aspeed-mtd-partitions"
So if recommended packages are to be installed, then these two packages
will be installed on ASPEED-based images.
The hierarchy of `require` directives helps build up the set of packages to be
installed in the image via at least the variables I mentioned above.
>
> 3、There are many common recipes under openbmc / meta-phosphor, is
> there any documentation about the architecture and detailed
> implementation principles of each recipe? For example, chassis power
> control.
Less so documentation of the recipes themselves, but you'll find design
discussions, cheatsheets and guides in the docs repository:
https://github.com/openbmc/docs/
Hope that helps.
Andrew
More information about the openbmc
mailing list