[U-Boot] [PATCH v2 13/13] configs: ls1012a: add pfe configuration for LS1012A

Joe Hershberger joe.hershberger at ni.com
Tue Feb 27 20:16:52 UTC 2018


On Thu, Feb 15, 2018 at 8:17 AM, Calvin Johnson <calvin.johnson at nxp.com> wrote:
> Add configurations for PFE.
>
> Signed-off-by: Calvin Johnson <calvin.johnson at nxp.com>
> Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi at nxp.com>
> ---
> Changes in v2:
> -Moved SYS_LS_PFE_FW_ADDR from pfe Kconfig to board Kconfigs
> -Add "pfe stop" to ls1012a rdb, frdm and 2g5rdb config files
> ---
>  configs/ls1012a2g5rdb_qspi_defconfig |  2 ++
>  configs/ls1012afrdm_qspi_defconfig   |  2 ++
>  configs/ls1012aqds_qspi_defconfig    |  2 ++
>  configs/ls1012ardb_qspi_defconfig    |  2 ++
>  drivers/net/Kconfig                  |  1 +
>  drivers/net/Makefile                 |  1 +
>  drivers/net/pfe_eth/Kconfig          | 17 +++++++++++++++++
>  drivers/net/pfe_eth/Makefile         | 12 ++++++++++++
>  include/configs/ls1012a2g5rdb.h      |  2 +-
>  include/configs/ls1012a_common.h     |  6 +++---
>  include/configs/ls1012afrdm.h        |  9 ++++++++-
>  include/configs/ls1012aqds.h         | 14 ++++++++++++++
>  include/configs/ls1012ardb.h         | 10 +++++++++-
>  13 files changed, 74 insertions(+), 6 deletions(-)
>  create mode 100644 drivers/net/pfe_eth/Kconfig
>  create mode 100644 drivers/net/pfe_eth/Makefile
>
> diff --git a/configs/ls1012a2g5rdb_qspi_defconfig b/configs/ls1012a2g5rdb_qspi_defconfig
> index 140a4e1..a979211 100644
> --- a/configs/ls1012a2g5rdb_qspi_defconfig
> +++ b/configs/ls1012a2g5rdb_qspi_defconfig
> @@ -30,7 +30,9 @@ CONFIG_DM=y
>  CONFIG_DM_MMC=y
>  CONFIG_DM_SPI_FLASH=y
>  CONFIG_SPI_FLASH=y
> +CONFIG_DM_ETH=y
>  CONFIG_NETDEVICES=y
> +CONFIG_FSL_PFE=y
>  CONFIG_SYS_NS16550=y
>  CONFIG_DM_SPI=y
>  CONFIG_USB=y
> diff --git a/configs/ls1012afrdm_qspi_defconfig b/configs/ls1012afrdm_qspi_defconfig
> index 060f073..d0bf081 100644
> --- a/configs/ls1012afrdm_qspi_defconfig
> +++ b/configs/ls1012afrdm_qspi_defconfig
> @@ -28,8 +28,10 @@ CONFIG_DM=y
>  # CONFIG_MMC is not set
>  CONFIG_DM_SPI_FLASH=y
>  CONFIG_SPI_FLASH=y
> +CONFIG_DM_ETH=y
>  CONFIG_NETDEVICES=y
>  CONFIG_E1000=y
> +CONFIG_FSL_PFE=y
>  CONFIG_PCI=y
>  CONFIG_DM_PCI=y
>  CONFIG_DM_PCI_COMPAT=y
> diff --git a/configs/ls1012aqds_qspi_defconfig b/configs/ls1012aqds_qspi_defconfig
> index 0435d51..40fbdd8 100644
> --- a/configs/ls1012aqds_qspi_defconfig
> +++ b/configs/ls1012aqds_qspi_defconfig
> @@ -39,8 +39,10 @@ CONFIG_SCSI_AHCI=y
>  CONFIG_DM_MMC=y
>  CONFIG_DM_SPI_FLASH=y
>  CONFIG_SPI_FLASH=y
> +CONFIG_DM_ETH=y
>  CONFIG_NETDEVICES=y
>  CONFIG_E1000=y
> +CONFIG_FSL_PFE=y
>  CONFIG_PCI=y
>  CONFIG_DM_PCI=y
>  CONFIG_DM_PCI_COMPAT=y
> diff --git a/configs/ls1012ardb_qspi_defconfig b/configs/ls1012ardb_qspi_defconfig
> index ea28953..6262351 100644
> --- a/configs/ls1012ardb_qspi_defconfig
> +++ b/configs/ls1012ardb_qspi_defconfig
> @@ -31,8 +31,10 @@ CONFIG_DM=y
>  CONFIG_DM_MMC=y
>  CONFIG_DM_SPI_FLASH=y
>  CONFIG_SPI_FLASH=y
> +CONFIG_DM_ETH=y
>  CONFIG_NETDEVICES=y
>  CONFIG_E1000=y
> +CONFIG_FSL_PFE=y
>  CONFIG_PCI=y
>  CONFIG_DM_PCI=y
>  CONFIG_DM_PCI_COMPAT=y
> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index de1947c..f589978 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -1,4 +1,5 @@
>  source "drivers/net/phy/Kconfig"
> +source "drivers/net/pfe_eth/Kconfig"
>
>  config DM_ETH
>         bool "Enable Driver Model for Ethernet drivers"
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index ac5443c..102e65a 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -75,3 +75,4 @@ obj-$(CONFIG_FSL_MEMAC) += fm/memac_phy.o
>  obj-$(CONFIG_VSC9953) += vsc9953.o
>  obj-$(CONFIG_PIC32_ETH) += pic32_mdio.o pic32_eth.o
>  obj-$(CONFIG_DWC_ETH_QOS) += dwc_eth_qos.o
> +obj-$(CONFIG_FSL_PFE) += pfe_eth/
> diff --git a/drivers/net/pfe_eth/Kconfig b/drivers/net/pfe_eth/Kconfig
> new file mode 100644
> index 0000000..6f99710
> --- /dev/null
> +++ b/drivers/net/pfe_eth/Kconfig
> @@ -0,0 +1,17 @@
> +menuconfig FSL_PFE
> +       bool "Freescale PFE driver"

Is NXP more appropriate at this point? Or Qualcomm? Or Broadcom? :D

Seriously, though, maybe it should include "Ethernet driver".

> +       help
> +         This driver provides support for Freescale PFE.

It probably makes sense here to spell out the acronym.

> +
> +if FSL_PFE
> +
> +config UTIL_PE_DISABLED
> +       bool
> +       help
> +         Disable UTIL processor engine of PFE
> +
> +config SYS_FSL_PFE_ADDR
> +       hex "PFE base address"
> +       default 0x04000000
> +
> +endif
> diff --git a/drivers/net/pfe_eth/Makefile b/drivers/net/pfe_eth/Makefile
> new file mode 100644
> index 0000000..6b5248f
> --- /dev/null
> +++ b/drivers/net/pfe_eth/Makefile
> @@ -0,0 +1,12 @@
> +# Copyright 2015-2016 Freescale Semiconductor, Inc.
> +# Copyright 2017 NXP
> +#
> +# SPDX-License-Identifier:GPL-2.0+
> +
> +# Layerscape PFE driver
> +obj-y += pfe_cmd.o     \
> +        pfe_driver.o   \
> +        pfe_eth.o      \
> +        pfe_firmware.o \
> +        pfe_hw.o       \
> +        pfe_mdio.o
> diff --git a/include/configs/ls1012a2g5rdb.h b/include/configs/ls1012a2g5rdb.h
> index 25df103..2d18f3c 100644
> --- a/include/configs/ls1012a2g5rdb.h
> +++ b/include/configs/ls1012a2g5rdb.h
> @@ -110,7 +110,7 @@
>
>  #undef CONFIG_BOOTCOMMAND
>  #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
> -#define CONFIG_BOOTCOMMAND "run distro_bootcmd; run qspi_bootcmd; " \
> +#define CONFIG_BOOTCOMMAND "pfe stop;run distro_bootcmd; run qspi_bootcmd; " \
>                            "env exists secureboot && esbc_halt;"
>  #endif
>
> diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h
> index 7dbe231..b590d7a 100644
> --- a/include/configs/ls1012a_common.h
> +++ b/include/configs/ls1012a_common.h
> @@ -118,9 +118,9 @@
>         "kernel_size=0x2800000\0"               \
>
>  #undef CONFIG_BOOTCOMMAND
> -#define CONFIG_BOOTCOMMAND             "sf probe 0:0; sf read $kernel_load "\
> -                                       "$kernel_start $kernel_size && "\
> -                                       "bootm $kernel_load"
> +#define CONFIG_BOOTCOMMAND     "pfe stop; sf probe 0:0; sf read $kernel_load "\
> +                               "$kernel_start $kernel_size && "\
> +                               "bootm $kernel_load"
>
>  /* Monitor Command Prompt */
>  #define CONFIG_SYS_CBSIZE              512     /* Console I/O Buffer Size */
> diff --git a/include/configs/ls1012afrdm.h b/include/configs/ls1012afrdm.h
> index 297c057..f54021e 100644
> --- a/include/configs/ls1012afrdm.h
> +++ b/include/configs/ls1012afrdm.h
> @@ -9,6 +9,13 @@
>
>  #include "ls1012a_common.h"
>
> +#ifdef CONFIG_FSL_PFE
> +#define EMAC1_PHY_ADDR          0x2
> +#define EMAC2_PHY_ADDR          0x1
> +#define CONFIG_PHYLIB
> +#define CONFIG_PHY_REALTEK
> +#endif
> +
>  /* DDR */
>  #define CONFIG_DIMM_SLOTS_PER_CTLR     1
>  #define CONFIG_CHIP_SELECTS_PER_CTRL   1
> @@ -68,7 +75,7 @@
>                 "$kernel_addr $kernel_size && bootm $load_addr#$board\0"
>
>  #undef CONFIG_BOOTCOMMAND
> -#define CONFIG_BOOTCOMMAND "run distro_bootcmd;run qspi_bootcmd"
> +#define CONFIG_BOOTCOMMAND "pfe stop;run distro_bootcmd;run qspi_bootcmd"
>
>  #define CONFIG_CMD_MEMINFO
>  #define CONFIG_CMD_MEMTEST
> diff --git a/include/configs/ls1012aqds.h b/include/configs/ls1012aqds.h
> index e1767ef..f6c2650 100644
> --- a/include/configs/ls1012aqds.h
> +++ b/include/configs/ls1012aqds.h
> @@ -9,6 +9,20 @@
>
>  #include "ls1012a_common.h"
>
> +/* PFE Ethernet */
> +#ifdef CONFIG_FSL_PFE
> +#define EMAC1_PHY_ADDR          0x1e
> +#define EMAC2_PHY_ADDR          0x1
> +#define        SGMII_2500_PHY1_ADDR    0x1
> +#define        SGMII_2500_PHY2_ADDR    0x2

Seems like these 4 could move to Kconfig for PFE, maybe prefixed with PFE.

> +#define CONFIG_PHYLIB

This is Kconfig. Select it.

> +#define CONFIG_PHY_VITESSE
> +#define CONFIG_PHY_REALTEK
> +#define        CONFIG_PHY_AQUANTIA
> +#define        CONFIG_PHYLIB_10G

These are all in Kconfig. Imply them?

> +#define RGMII_RESET_WA
> +#endif
> +
>  /* DDR */
>  #define CONFIG_DIMM_SLOTS_PER_CTLR     1
>  #define CONFIG_CHIP_SELECTS_PER_CTRL   1
> diff --git a/include/configs/ls1012ardb.h b/include/configs/ls1012ardb.h
> index ced6c5e..3054ba1 100644
> --- a/include/configs/ls1012ardb.h
> +++ b/include/configs/ls1012ardb.h
> @@ -9,6 +9,14 @@
>
>  #include "ls1012a_common.h"
>
> +/* PFE Ethernet */
> +#ifdef CONFIG_FSL_PFE
> +#define EMAC1_PHY_ADDR          0x2
> +#define EMAC2_PHY_ADDR          0x1
> +#define CONFIG_PHYLIB
> +#define CONFIG_PHY_REALTEK
> +#endif
> +
>  /* DDR */
>  #define CONFIG_DIMM_SLOTS_PER_CTLR     1
>  #define CONFIG_CHIP_SELECTS_PER_CTRL   1
> @@ -102,7 +110,7 @@
>                 "$kernel_addr $kernel_size && bootm $load_addr#$board\0"
>
>  #undef CONFIG_BOOTCOMMAND
> -#define CONFIG_BOOTCOMMAND "run distro_bootcmd;run qspi_bootcmd"
> +#define CONFIG_BOOTCOMMAND "pfe stop; run distro_bootcmd;run qspi_bootcmd"
>
>  #include <asm/fsl_secure_boot.h>
>
> --
> 2.7.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list