Commit Graph

20728 Commits

Author SHA1 Message Date
Otavio Salvador
74b82475d8 mx25pdk: Change root to use a single partition layout
This allow for use of wic images as generated by the wic tool inside
the OpenEmbedded.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2020-04-02 14:15:19 -03:00
Fabio Estevam
d6d0c0e0e8 mx6sabre_common: Dynamically change the video output
Use the 'hdmidetect' command in U-boot to load the appropriate
video arguments. If HDMI is connected during boot then make HDMI
as the primary framebuffer, otherwise let LVDS be the primary framebuffer.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2020-04-02 14:15:19 -03:00
Nikolay Dimitrov
4bcfe85083 mx6sabresd: Enable video interfaces in bootargs
Generate kernel video bootargs for sabresd, based on a list of needed video
interfaces ("video_interfaces" U-Boot env-var). The order of initialization
and video settings can be fully customized.

Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2020-04-02 14:15:19 -03:00
Otavio Salvador
be77716aca mx6sabresd: Use LDO dtb file until LDO bypass support is added
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2020-04-02 14:15:19 -03:00
Otavio Salvador
c8b64b06db mx6slevk: Use LDO dtb file until LDO bypass support is added
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2020-04-02 14:15:19 -03:00
Simon Glass
72188f5462 image: Use constants for 'required' and 'key-name-hint'
These are used in multiple places so update them to use a shared #define.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
2020-04-01 07:45:09 -06:00
Simon Glass
390b26dc27 image: Correct comment for fit_conf_get_node()
This should mention that conf_uname can be NULL and should be in the
header file. Fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-01 07:45:09 -06:00
Tom Rini
1104dde6e8 Pull request for UEFI sub-system for efi-2020-04-rc5
This series fixes:
 
 * UEFI Python tests CONFIG_OF_CONTROL=y.
 * int to pointer cast warning for cmd/efidebug.c
 * memory reservation even if fdt node is disabled
 
 Now that the Python test is fixed reintroduce the reverted patch for
 vexpress_ca9x4 to enable EFI_LOADER and define the dtb file name.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl6C31oACgkQxIHbvCwF
 GsSE0g/9Fr+tLqLtTKs4U98YOsspaUFDUJh6o+HkU3CGKVVV2V0hTWqtpYsdMCLv
 fZ1ixzW5nObdzZ6MgnuZrnIGbfWSxFQrwi5XtmXonyc3aB4ikztmXpzn16m8GQKH
 dvHcvYwdER0OeinXkqp/ao06kZSSLVFk7Jp8+yZuw72QKFUsqne+AjZipqQivwro
 PCU0Bi2PXMQ11/g6aYrK2TjEmdDKR3qQmf0TiDfITmgN1QuintqTmjLUFiyqhfDZ
 sY4DqaqTtt3+V6qEi9yX16LVg/obgEPkpSm4zYDkKzj8hc9cm71QyZXrrWPTPWgn
 j0ymBIPzSU7Y3NlpIDpI8Fz9enES1AOuwFI/xuy00B+EPbT41oHCvSDtqsmDo+30
 af68VDIT9alwARJovRd3YxyeWi/lWwksuIHb8eYd9K+MYwxYW5i7V8Pot9VU120C
 m+1oAJUg6EUFIp8yRtvJoqrBGGrF6zH650tPUsV73P2MxPgSafqU7ZlmHUGe5zlv
 W3qp+A9nEprDJa7DYAHW7oMLQ75Q+UAIpbn4BwGS+4JPZox1uWYUlTDx3YvPDf7r
 BvgE57y83fVjSVwB1PnsI6Y326IMGT3W8UriP5Wn0cBD6vrGCVe9hVBX2clWjBRk
 8Rv2bOCWNfuxP5K8nQy4ILM2CrdXg7W/SDLP0rkZcPtKTRaspHQ=
 =Cgg0
 -----END PGP SIGNATURE-----

Merge tag 'efi-2020-04-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-04-rc5

This series fixes:

* UEFI Python tests CONFIG_OF_CONTROL=y.
* int to pointer cast warning for cmd/efidebug.c
* memory reservation even if fdt node is disabled

Now that the Python test is fixed reintroduce the reverted patch for
vexpress_ca9x4 to enable EFI_LOADER and define the dtb file name.
2020-03-31 10:05:57 -04:00
Ley Foon Tan
4f17f2966a configs: socfpga: Change to use SOCFPGA_PHYS_OCRAM_SIZE macro
Change to use SOCFPGA_PHYS_OCRAM_SIZE macro for onchip RAM size.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2020-03-31 02:52:38 +02:00
Kuldeep Singh
b9804c35a8 configs: lx2160a: Access flash memory as per spi-mem
MC_INIT and BOOT command currently access spi-nor flash memory directly.
As per spi-mem framework, flash memory access via absolute addresses is
no more possible. Use flash APIs to access memory instead of directly
using it.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:12:13 +05:30
Biwen Li
1d0bb1b9d2 configs: ls1012afrwy: adjust env kernel_addr_r
Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:12:13 +05:30
Alison Wang
f1573d842c configs: ls1021a: Append othbootargs to bootargs
This patch appends othbootargs to bootargs for LS1021ATWR board.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:12:13 +05:30
Biwen Li
bb1165f900 dm: arm64: ls1046a: add i2c DM support
This supports i2c DM and enables CONFIG_DM_I2C
for SoC LS1046A

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:12:13 +05:30
Biwen Li
fefac937fb dm: arm64: ls1043a: add i2c DM support
This supports i2c DM and enables CONFIG_DM_I2C
for SoC LS1043A

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:12:13 +05:30
Biwen Li
c8a7cadc81 configs: ls1012afrwy: fix wrong env of board
Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:12:13 +05:30
Yuantian Tang
a023c3c2c8 armv8: ls1028a: clean up the environment variables
Move the environment variables from command head file to
ls1028ardb specific head file so that they will not mess
up with ls1028aqds board.
Also updated some variable slightly.
There is no function change by this patch.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:12:13 +05:30
Yuantian Tang
40ef9d1697 armv8: ls1028aqds: add some environments
Add sd and emmc bootcmd environments to facilitate
the boot process.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:12:13 +05:30
Biwen Li
1a9ce6e0df configs: ls2080aqds: support distro boot
Add support of distro boot for ls2080aqds

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:12:13 +05:30
Biwen Li
472dfe546c configs: ls1088aqds: support distro boot
Add support of distro boot for ls1088aqds

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:12:13 +05:30
Biwen Li
095b6be41e include/configs: ls1012afrwy: fix load address of itb with bootm command
The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Meenakshi Aggarwal
c5076a021e lx2160a: Add dhcp in boot_targets
Add dhcp in supported boot_targets for lx2160.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Yuantian Tang
81d9e55097 armv8: ls1028a: add dhcp boot target device
Add DHCP boot target device to enable command bootcmd_dhcp.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Meenakshi Aggarwal
224899d273 lx2160a : Remove default VID setting
Set VID to 800 mV for Rev1 and set VID as per switch settings
for Rev2.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Priyanka Singh
160e2b88df armv8: ls1028a: Update secure boot headers offset
Update the secure boot headers offsets of Kernel and other
    firmware images for SD and XSPI boot sources used by
    esbc_validate command.

Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Meenakshi Aggarwal
b7e7a46e10 lx2160a : Add emmc in boot_targets environment variable
Add emmc in supported boot_targets and
Add bootcmd environment variable for emmc boot.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Yuantian Tang
e9d9c2e573 arm64: ls1046a: remove fdt_high environment variable
Setting fdt_high and initrd_high to 0xffffffffffffffff leads to
various difficulty to resolve bugs.
Remove them and use bootm_size instead to safely contain a kernel,
device tree and initrd for relocation.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Yuantian Tang
395b52127a arm64: ls1028a: remove fdt_high environment variable
Setting fdt_high and initrd_high to 0xffffffffffffffff leads to
various difficulty to resolve bugs.
Remove them and use bootm_size instead to safely contain a kernel,
device tree and initrd for relocation.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:51 +05:30
Alison Wang
c463eeb4b6 ls1021a: Set CONFIG_SYS_BOOTMAPSZ to the memory for relocation
This patch sets CONFIG_SYS_BOOTMAPSZ to the amount of memory available
to safely contain a kernel, device tree and initrd for relocation. The
way to set fdt_high as 0xffffffff to disable device tree relocation is
removed.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:51 +05:30
Kristian Amlie
d4babee087 vexpress_ca9x4: Enable use of correct DTB file and restore EFI loader.
EFI was disabled in f95b8a4b5f because of the missing DTB file,
and indeed, the DTB file is required to load recent versions of GRUB
(2.04) correctly.

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
2020-03-28 11:11:32 +01:00
Tom Rini
39984d2213 Revert "vexpress_ca9x4: Enable use of correct DTB file and restore EFI loader."
Currently this causes failures of the platform when running the EFI
loader tests, so disable it for now.

This reverts commit af827140e5.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-03-27 11:47:04 -04:00
Tom Rini
fa041198a8 Merge tag 'u-boot-rockchip-20200327' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- Fixed for rv1108 and elgin-rv1108 board
- Fix the keyboard from USB instead of CrOS EC
2020-03-26 21:39:59 -04:00
Peter Robinson
23cb61761b rockchip: Change keyboard input from CrOS EC keyboard to a USB keyboard
These boards aren't ChromeOS devices so won't have a cros-ec-keyb
input as it's the keyboard available via the ChromeOS Embedded
Controller. Update them to use a USB keyboard which would actually
be available. Also enable the usb keyboard option for those devices
that don't have it enabled already.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-03-26 22:58:46 +08:00
Kristian Amlie
af827140e5 vexpress_ca9x4: Enable use of correct DTB file and restore EFI loader.
EFI was disabled in f95b8a4b5f because of the missing DTB file,
and indeed, the DTB file is required to load recent versions of GRUB
(2.04) correctly.

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
2020-03-23 16:11:46 -04:00
Heinrich Schuchardt
7a4e717b9c efi_loader: definition of GetNextVariableName()
'vendor' is both an input and an output parameter. So it cannot be
constant.

Fixes: 0bda81bfdc ("efi_loader: use const efi_guid_t * for variable services")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-03-22 18:38:02 +01:00
AKASHI Takahiro
74b4487535 efi_loader: correct a definition of struct efi_capsule_header
See UEFI specification, section 8.5.3.
In addition, the structure, efi_capsule_header, should be "packed"
as it is a serialized binary format in a capsule file.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2020-03-17 08:29:52 +01:00
AKASHI Takahiro
b51ec63978 efi_loader: export a couple of protocol related functions
This is a preparatory patch.
Those functions will be used in an implementation of UEFI firmware
management protocol as part of my capsule update patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2020-03-17 08:29:52 +01:00
AKASHI Takahiro
b74d568d83 efi_loader: define System Resource Table macros
Some of those values will be used in an implementation of UEFI firmware
management protocol as part of my capsule update patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2020-03-17 08:29:52 +01:00
AKASHI Takahiro
7cceef7bde efi_loader: define OsIndicationsSupported flags
These flags are expected to be set in OsIndicationsSupported variable
if corresponding features are supported. See UEFI specification,
section 8.5.4.

In particular, capsule-related flags will be used in my capsule
update patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>

Fix misspelled EFI_OS_INDICATIONS_BOOT_TO_FW_UI.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-03-17 08:29:52 +01:00
Walter Lozano
ed666fb129 watchdog: Use dev_read only if OF_PLATDATA is not enabled
Currently watchdog tries to use dev_read_u32_default to get timeout
configuration in case OF_CONTROL is enabled. However, if SPL is
built with OF_PLATDATA this has no sense as there is no device tree.

This patch fixes this issue by only use dev_read_u32_default if OF_CONTROL
is enabled but OF_PLATDATA is not.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-03-16 11:25:12 +01:00
Tom Rini
36bdcf7f3b Merge tag 'mmc-2020-3-9' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
- DM support for CAxxxx SoCs
- eMMC board for presidio-asic
- Add defer probe for mmc sdhci
- TI SoCs mmc misc update
2020-03-10 21:13:26 -04:00
Tom Rini
3a1cb95308 Fixes for 2020.04
-----------------
 
 - DM : mx6sabresd
 - mx6ul_14x14_evk: fix video
 - mx8qxp; fix console for booting
 - sync DTS with kernel (imx6sx)
 - drop obsolete woodburn (mx35)
 
 Travis: https://travis-ci.org/sbabic/u-boot-imx/builds/660550811
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQS2TmnA27QKhpKSZe309WXkmmjvpgUCXme08A8cc2JhYmljQGRl
 bnguZGUACgkQ9PVl5Jpo76b41QCdFJlz/cPf27UtVZo5OXrZ9ADd/ecAnileL1GL
 zyFoQYCs8dE4DpusOnML
 =llSt
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-imx-20200310' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

Fixes for 2020.04
-----------------

- DM : mx6sabresd
- mx6ul_14x14_evk: fix video
- mx8qxp; fix console for booting
- sync DTS with kernel (imx6sx)
- drop obsolete woodburn (mx35)

Travis: https://travis-ci.org/sbabic/u-boot-imx/builds/660550811
2020-03-10 13:13:08 -04:00
Tom Rini
b62cd97654 First set of u-boot-atmel fixes for 2020.04 cycle
-----BEGIN PGP SIGNATURE-----
 
 iQFQBAABCgA6FiEEqxhEmNJ6d7ZdeFLIHrMeAg6sL8gFAl5nWr8cHGV1Z2VuLmhy
 aXN0ZXZAbWljcm9jaGlwLmNvbQAKCRAesx4CDqwvyGaOCACkavhqX4EP1FeRDX7m
 Uujnacekt0y0uC54aGqBZ2u8Y+iwFza7rd4RcWOAx1pHq1QggAF+h5So8cOfSjpD
 6Uad4ql0EOYuH5xcFYCzmEmOMj25DrIZ0F+nPnxhdK0novBrUO8QD2v4r8TgrcWs
 dFxe7RCvop4I54Bq14LzZsCozlYEqHaf5E3fSas2LVeDIBrkzGh6pYhWM62FFRuy
 71kIC+y9pfRPXaeiOSDp1ZqPkzQA8xw5AWAx4TCmTZ1DjLLBAoRbe0Iv9fseHct0
 BFGD4+G1g0GfrNrjAG2OPAePDXq+6fmoAZFbkDGeoFwGnZXhxEnVnN4w5t+Hl0H4
 82tF
 =eO+8
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-atmel-fixes-2020.04-a' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel

First set of u-boot-atmel fixes for 2020.04 cycle:
- Includes two small configuration fixes that will solve the SPL booting
  on sama5d3_xplained board.
2020-03-10 13:12:21 -04:00
Pedro Jardim
9f656fbee3 mx6slevk: Convert to DM_ETH
This fixes the following warning:

===================== WARNING ======================
This board does not use CONFIG_DM_ETH (Driver Model
for Ethernet drivers). Please update the board to use
CONFIG_DM_ETH before the v2020.07 release. Failure to
update by the deadline may result in board removal.
See doc/driver-model/migration.rst for more info.
====================================================

Signed-off-by: Pedro Jardim <jardim.c.pedro@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-03-10 10:59:08 +01:00
Pedro Jardim
905dbe23b9 mx6sabreauto: Convert to DM_ETH
This fixes the following warning:

===================== WARNING ======================
This board does not use CONFIG_DM_ETH (Driver Model
for Ethernet drivers). Please update the board to use
CONFIG_DM_ETH before the v2020.07 release. Failure to
update by the deadline may result in board removal.
See doc/driver-model/migration.rst for more info.
====================================================

Signed-off-by: Pedro Jardim <jardim.c.pedro@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-03-10 10:59:08 +01:00
Oliver Graute
182716371b imx: imx8qm: enable relocation of fdt and initrd
Set CONFIG_SYS_BOOTMAPSZ to the amount of memory available which is needed
to relocate the kernel, device tree and initrd.

Remove 'fdt_high' and 'initrd_high' environment variables from default
environment which prevents relocation of FDT and initrd.

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Ye Li <ye.li@nxp.com>
Cc: uboot-imx <uboot-imx@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-03-10 10:59:08 +01:00
Alifer Moraes
02ee7a4aa5 mx6sabresd: Convert ethernet to driver model
Convert imx6sabresd ethernet to driver model to fix the following warning:

===================== WARNING ======================
This board does not use CONFIG_DM_ETH (Driver Model
for Ethernet drivers). Please update the board to use
CONFIG_DM_ETH before the v2020.07 release. Failure to
update by the deadline may result in board removal.
See doc/driver-model/migration.rst for more info.
====================================================

Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-03-10 10:59:08 +01:00
Fabien Lehoussel
df1cf775ff board: sama5d3_xplained: Fix uboot size when loaded from NAND by SPL
Uboot size is incorrect.
Uboot SPL use CONFIG_SYS_MONITOR_LEN to read uboot from NAND : 0x80000
With sama5d3_xplained_nandflash_defconfig : u-boot.bin size is ~800Ko 0xC0000

So I increased size to 1MB : 0x100000

Signed-off-by: Fabien Lehoussel <fabien.lehoussel@medianesysteme.com>
2020-03-10 11:01:08 +02:00
Alex Marginean
9810489ca8 net: phy: add XFI, USXGMII types to is_10g_interface() helper
The helper is used to reset PHYs on connect and it determines the clause
to use (C22/C45) based on interface type.  This fixes 'PHY reset timed out'
warnings in console for USXGMII/XFI PHYs.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2020-03-09 18:11:25 -05:00
Samuel Mendoza-Jonas
e2ffeaa162 phy: Include NC-SI in phy setup
Add NC-SI to the usual phy handling. This makes two notable changes:
- Somewhat similar to a fixed phy, phy_connect() will create an NC-SI
phy if CONFIG_PHY_NCSI is defined.
- An early return is added to phy_read() and phy_write() to handle a
case like the NC-SI phy which does not define a bus.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2020-03-09 18:11:23 -05:00
Samuel Mendoza-Jonas
f641a8ac93 phy: Add support for the NC-SI protocol
This introduces support for the NC-SI protocol, modelled as a phy driver
for other ethernet drivers to consume.

NC-SI (Network Controller Sideband Interface) is a protocol to manage a
sideband connection to a proper network interface, for example a BMC
(Baseboard Management Controller) sharing the NIC of the host system.
Probing and configuration occurs by communicating with the "remote" NIC
via NC-SI control frames (Ethernet header 0x88f8).

This implementation is roughly based on the upstream Linux
implementation[0], with a reduced feature set and an emphasis on getting
a link up as fast as possible rather than probing the full possible
topology of the bus.
The current phy model relies on the network being "up", sending NC-SI
command frames via net_send_packet() and receiving them from the
net_loop() loop (added in a following patch).

The ncsi-pkt.h header[1] is copied from the Linux kernel for consistent
field definitions.

[0]: https://github.com/torvalds/linux/tree/master/net/ncsi
[1]: https://github.com/torvalds/linux/blob/master/net/ncsi/ncsi-pkt.h

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2020-03-09 18:11:23 -05:00