Commit Graph

16155 Commits

Author SHA1 Message Date
Simon Glass
c656731901 video: Avoid using #ifdef in console_rotate.c
This code does not really need to use #ifdef. We can use if() instead and
gain build coverage without impacting code size.

Change the #ifdefs to use IS_ENABLED() instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-02 16:25:25 +01:00
Simon Glass
46421197d5 video: Avoid using #ifdef in video blitting code
This code does not really need to use #ifdef. We can use if() instead and
gain build coverage without impacting code size.

Change the #ifdefs to use IS_ENABLED() instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-02 16:25:25 +01:00
Simon Glass
512563ba0b video: x86: Enable 32-bit graphics by default
Most x86 boards that use video make use of 32bpp graphics. Enable this by
default. This fixes missing graphics output on some x86 boards.

Also remove the unnecessary 'default n' while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-02 16:25:25 +01:00
Tom Rini
6cb87cbb14 Fixes for 2020.01
-----------------
 - Fixes for Nitrogen6x
 - Fix corruption for mx51evk
 - colibri i.MX6: fix broken ESDHC conversion
 - mx6sxsabresd: fix broken mmcdev
 - imx6q_logic: cleanup boot sequence
 - update ATF for imx8mq_evk
 - pfuze: fix pmic_get()
 
 Travis CI: https://travis-ci.org/sbabic/u-boot-imx/builds/630007464
 -----BEGIN PGP SIGNATURE-----
 
 iQHDBAABCgAtFiEEiZClFGvhzbUNsmAvKMTY0yrV63cFAl4HLywPHHNiYWJpY0Bk
 ZW54LmRlAAoJECjE2NMq1et3cB0L/jRElnVFGaZC6Bii7jVS9u/oJ03yYM73Qp4M
 AWlITWIHQtB6PAGBVYz+Ts17grkYWT5fwuV3TqE+yfOeeD76cfo37L9iSePIQ7mC
 SYWfId3E3xz++2/64HM1PETWmPXi76QxeJ4GMP9amZMLW+huS6sWi1tfVEURedl0
 LXddxpa4DkjMeU4sKLgrGLv3+wIu5P6ELcpQXrBQs7uVQxiwvWh3rrldHlLzacHm
 o2DUE4rDrtN5K2khT/Gq9wf7eG1vCbIKFvDTTFjgkg5nlfeeiiEHXqAKiLN/hPmq
 BrrxBXucPqUj9V/tozcBMrQ6bFfGkaGaBUVT8AqBWe/CUKaicrcxZLh1Ef18fo0y
 yxh3RfnW6kYIokRxP4uf9kRXxip7hYciqlvhHdO7pY6TkwweuzFVvUmlKD6dCS9z
 iulDyZfAXNXYxtEFqBBO7A2bQo5u9MqR7xYjNc3aALOeXt8H+wcM7BQZ1ga72d2X
 nNw1XHR84Kjr/lc5PJRVp/Nz9s4VVw==
 =GLWM
 -----END PGP SIGNATURE-----

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

Fixes for 2020.01
-----------------
- Fixes for Nitrogen6x
- Fix corruption for mx51evk
- colibri i.MX6: fix broken ESDHC conversion
- mx6sxsabresd: fix broken mmcdev
- imx6q_logic: cleanup boot sequence
- update ATF for imx8mq_evk
- pfuze: fix pmic_get()

Travis CI: https://travis-ci.org/sbabic/u-boot-imx/builds/630007464
2019-12-28 08:07:16 -05:00
Tom Rini
1058bc5ccc Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi
- rk spi transfer limit fix
- Gigadevice, gd25q128 support
- spi-nor-core warnings
2019-12-27 16:46:15 -05:00
Robert Beckett
fff7b33ce5 rtc: rx8010js: add compatible string
Add compatible string used by Linux.
Allows for simpler syncing of device trees.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2019-12-27 14:34:29 +01:00
Robert Beckett
0ba121668c rtc: s35392a: add compatible strings
Add compatible strings used by Linux.
Allows for simpler syncing of device trees.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2019-12-27 14:34:03 +01:00
Robert Beckett
a00b1f9d7a rtc: rx8010sj: fix DM initialization
pass the udevice by reference instead of double ref

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2019-12-27 14:33:11 +01:00
Jagan Teki
dbbdc81c60 spi: rk: Limit transfers to (64K - 1) bytes
The Rockchip SPI controller's length register only supports 16-bits,
yielding a maximum length of 64KiB (the CTRLR1 register holds "length -
1"). Trying to transfer more than that (e.g., with a large SPI flash
read) will cause the driver to hang.

Now, it seems that while theoretically we should be able to program
CTRLR1 with 0xffff, and get a 64KiB transfer, but that also seems to
cause the core to choke, so stick with a maximum of 64K - 1 bytes --
i.e., 0xffff.

Note, that the size is further divided into 'minus 1' while writing
into CTRLR1.

This change fixed two different read issues,

1. sf read failure when with > 0x10000

2. Boot from SPI flash failed during spi_flash_read call in
   common/spl/spl_spi.c

Observed and Tested in
- Rockpro64 with Gigadevice flash
- ROC-RK3399-PC with Winbond flash

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-27 17:47:26 +05:30
Vignesh Raghavendra
cb56caacf8 mtd: spi-nor-core: Fix static checker warnings
Static checker warns 'ret' variable may be used uninitialized in
spi_nor_erase() and spi_nor_write() in case of zero length requests.
Fix these warnings by checking for zero length requests and returning
early.

Reported-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2019-12-27 17:47:26 +05:30
Fabio Estevam
0d3bc81391 imx8m: ddr_init: Move ddr_init() messages to debug level
Currently inside ddr_init() there is a mix of printf() and debug()
level messages.

Since this type of information is useful for debug purposes,
convert all of them to debug level for consistency.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-12-27 12:14:25 +01:00
Roger Quadros
305a5d840e phy: ti-pipe3: Fix SATA & USB PHY power up sequence
As per "Table 26-7. SATA PHY Subsystem Low-Level Programming Sequence"
in TRM [1] we need to turn on SATA_PHY_TX before SATA_PHY_RX.

[1] DRA75x, DRA74x TRM - http://www.ti.com/lit/ug/sprui30f/sprui30f.pdf

Signed-off-by: Roger Quadros <rogerq@ti.com>
2019-12-26 09:06:54 -05:00
Roger Quadros
277d5d1f9b phy: ti-pipe3: improve DPLL stability for SATA & USB
For increased DPLL stability use the settings recommended in
the TRM [1] for PHY_RX registers for SATA and USB.

For SATA we need to use spread spectrum settings even
though we don't have spread spectrum enabled. The
suggested non-spread spectrum settings don't work.

[1] DRA75x, DRA74x TRM - http://www.ti.com/lit/ug/sprui30f/sprui30f.pdf

Signed-off-by: Roger Quadros <rogerq@ti.com>
2019-12-26 09:06:54 -05:00
Roger Quadros
53df65a9d2 phy: ti-pipe3: Introduce mode property in driver data
Introduce a mode property in the driver data so that
we don't have to keep using "of_device_is_compatible()"
throughtout the driver.

No functional change.

Signed-off-by: Roger Quadros <rogerq@ti.com>
2019-12-26 09:06:54 -05:00
Roger Quadros
b055e67f96 phy: ti-pipe3: Use TRM recommended settings for SATA DPLL
The AM572x Technical Reference Manual, SPRUHZ6H,
Revised November 2016 [1], shows recommended settings for the
SATA DPLL in Table 26-8. DPLL CLKDCOLDO Recommended Settings.

Use those settings in the driver. The TRM does not show
a value for 20MHz SYS_CLK so we use something close to the
26MHz setting.

[1] - http://www.ti.com/lit/ug/spruhz6h/spruhz6h.pdf

Signed-off-by: Roger Quadros <rogerq@ti.com>
2019-12-26 09:06:54 -05:00
Tom Rini
d792b63feb Merge branch 'master' of git://git.denx.de/u-boot-usb
- dwc3 and cdns3 bug fixes
2019-12-22 09:14:35 -05:00
Jagan Teki
5c207282f5 usb: dwc3: Fix UTMI/UTMIW phy interface initialization
DWC3 support phy interfaces like 8/16-bit UTMI+. phy interface
initialization code would handle them properly along with UNKNOWN
type by default if none of the user/board doesn't need to use the
phy interfaces at all.

The current code is masking the 8/16-bit UTMI+ interface bits globally
which indeed effect the UNKNOWN cases, therefore it effects the platforms
which are not using phy interfaces at all.

So, handle the phy masking bits accordingly on respective interface
type cases.

Fixes: 6b7ebff001 ("usb: dwc3: Add phy interface for dwc3_uboot")
Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2019-12-21 20:35:16 +01:00
Vignesh Raghavendra
bdf30e8490 usb: cdns3: ep0: Fix build warnings related to cache ops
Since, commit 62f9b65447 ("common: Move older CPU functions to their own header")
cache ops functions are declared in a separate header. Include the same
to avoid build warnings.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2019-12-21 20:35:16 +01:00
Alex Marginean
1785d8c3a5 drivers: net: bcm-sf2: pass -1 to phy_connect()
Passing 0 to PHY connect used to trigger a MDIO scan due to a bug fixed in
the meantime.  It's unclear if bcm-sf2 wants to connect to PHY @ addr 0 or
is scanning the bus, passing -1 here should keep it functional either way.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Cc: Jiandong Zheng <jdzheng@broadcom.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-20 10:02:23 -06:00
Marek Vasut
a9447c022d net: dwc_eth_qos: Pass -1 to phy_connect() to scan for all PHYs
PHY address 0 is a valid PHY address, to scan for all PHYs, pass -1 to
phy_connect(). Passing 0 used to work before be accident, but does no
longer.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-20 10:02:12 -06:00
Peter Robinson
864d66431a mtd: spi-nor: ids: Add GigaDevice gd25q128
Add gd25q128 128Mbit chip to spi-nor id table.

Tested on Pinebook Pro

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Vignesh Raghavendra <vigneshr@ti.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> # roc-rk3399-pc
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-12-18 20:05:40 +05:30
Rasmus Villemoes
875669da3b sysreset_mpc83xx: fix mcp83xx -> mpc83xx typo
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2019-12-13 13:01:53 -05:00
Tom Rini
3031cdede1 Merge tag 'fix-for-2020.01' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
i2c bugfixes for 2020.01
- i2c: i2c_cdns: fix write timeout on fifo boundary
  fixes timout issue when writting number of bytes is multiple
  of the FIFO depth.
2019-12-11 08:17:19 -05:00
Tom Rini
addb1d9f5d First set of u-boot-atmel fixes for 2020.01 cycle
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJd77jyAAoJEB6zHgIOrC/IyYUH/iAUH4wo5qnOBiQU+MJluaiu
 D8tMiJH13eW4gWnAqdGrOE9Q763asHIMshQpLK+4eXe4f4mZQ7re4CRNcYJrULeY
 2StsJzl4sn/H4P5EiRuUWjkB7wnGRDD6ArH3j1uMJN4lpwCB0ZbqMQZpjt3wI2H4
 KuE42d/ll08Aj0AvwdusffLIxlw5M1Z94uQSHoC3UTkPYN4VD5zXgdxv5eH6PZWe
 paWmHQ0g7fL4UnYGWa0Jpx10SZpcut06dTeVGpsGiEOhaJHvpjYd4JAs/TTUxhFx
 d5ZRjo1fStYmBXQIblhPNlJQkW4cqa/B+81f5aZbN/1yCijJWS2G8anGtY2ikPs=
 =f0dF
 -----END PGP SIGNATURE-----

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

- First set of u-boot-atmel fixes for 2020.01 cycle:
  This set includes a small fix for gpio bank names, one for removing
  unused headers (also touches some other boards), and a fix for the QSPI
  env read on one of the boards.
2019-12-11 08:16:16 -05:00
Michael Auchter
3104162a8b i2c: i2c_cdns: fix write timeout on fifo boundary
This fixes an issue that would cause I2C writes to timeout when the
number of bytes is a multiple of the FIFO depth (i.e. 16 bytes).

Within the transfer loop, after writing the data register with a new
byte to transfer, if the transfer size equals the FIFO depth, the loop
pauses until the INTERRUPT_COMP bit asserts to indicate data has been
sent. This same check is performed after the loop as well to ensure data
has been transferred prior to returning.

In the case where the amount of data to be written is a multiple of the
FIFO depth, the transfer loop would wait for the INTERRUPT_COMP bit to
assert after writing the final byte, and then wait for this bit to
assert once more. However, since the transfer has finished at this
point, no new data has been written to the data register, and hence
INTERRUPT_COMP will never assert.

Fix this by only waiting for INTERRUPT_COMP in the transfer loop if
there's still data to be written.

Signed-off-by: Michael Auchter <michael.auchter@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-12-11 06:25:13 +01:00
Tom Rini
fd4b8f813f - fix crash and board reset when drawing RLE8 bitmaps
bigger than the framebuffer resolution
 - reduce dead code in video and console uclass routines
   (tested on mx53cx9020, sama5d2_xplained, stm32mp157c-ev1,
    stm32f746-disco, stm32f769-disco and wandboard)
 -----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCXe//LA4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXOqBAJ9N6oTID0v092duxoUoO5xAeqIKxgCfS/YvgGx4
 KGgiPWQv0V1bGxXyYNA=
 =PoNP
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-2020.01' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

- fix crash and board reset when drawing RLE8 bitmaps
  bigger than the framebuffer resolution
- reduce dead code in video and console uclass routines
  (tested on mx53cx9020, sama5d2_xplained, stm32mp157c-ev1,
   stm32f746-disco, stm32f769-disco and wandboard)
2019-12-10 15:41:15 -05:00
Tom Rini
520f955902 Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-riscv
- Increase stack size to avoid a stack overflow during distro boot.
- Add hifive-unleashed-a00.dts for SIFIVE FU540.
- Add OF_SEPARATE support for SIFIVE FU540.
- Add SPL support for Andes AX25 AE350.
- Improve U-Boot SPL / OpenSBI smp boot flow for RISC-V.
2019-12-09 21:53:23 -05:00
Rick Chen
31dae22faa spl: cache: Allow cache drivers in SPL
When ax25-ae350 try to enable v5l2 cache
driver in SPL configuration, it need this
option for cache support in SPL.

Signed-off-by: Rick Chen <rick@andestech.com>
Cc: KC Lin <kclin@andestech.com>
Cc: Alan Kao <alankao@andestech.com>
2019-12-10 08:23:10 +08:00
Tom Rini
ac1ca99926 Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-net 2019-12-09 13:48:22 -05:00
Vignesh Raghavendra
382c0c629e net: ti: am65-cpsw-nuss: Add new compatible for J721e
Add new compatible to handle J721e SoC

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
2019-12-09 09:47:43 -06:00
Vignesh Raghavendra
461a290c5a net: ti: am65-cpsw-nuss: Rework RX flow ID handling
Get flow ID information for RX DMA channel using dma_get_cfg() interface
instead of reading from DT. This is required in order to avoid DT update
whenever there is change in the range of flow ID allocated to the host.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
2019-12-09 09:47:43 -06:00
Vignesh Raghavendra
5e6d9ccde9 dma: ti: k3-udma: Implement dma_get_cfg() interface
Implement dma_get_cfg() interface to pass flow id information for DMA
clients to use. This is needed because on K3 SoCs, CPSW (ethernet) and
UDMA (DMA provider) support "flows" within a given RX DMA channel. This
allows different network packets to be segregated while using same RX
DMA channel. In order for basic ethernet to work, CPSW slave must be
aware of the flow ID allocated for the RX channel by the DMA driver.
This interface allows CPSW to query flow ID from DMA provider and
configure it in CPSW HW.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
2019-12-09 09:47:43 -06:00
Vignesh Raghavendra
b8a4dd28f3 dma: Introduce dma_get_cfg() interface
Sometimes, there would be a need to exchange data between DMA provider
and DMA client which are very specific to DMA driver of the SoC/platform
and are not generic enough to be put into struct dma. Therefore, introduce
dma_get_cfg() interface to get DMA provider specific data from client
device. Clients can use unique configuration ID flags to get different
configuration data from DMA driver.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
2019-12-09 09:47:43 -06:00
Cédric Le Goater
08b3e90a01 net: ftgmac100: align RX/TX descriptors on ARCH_DMA_MINALIGN
Fixes: e766849713 ("net: ftgmac100: convert the RX/TX descriptor arrays")
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:43 -06:00
Alex Marginean
1e354cb393 drivers: net: fsl_enetc: register internal MDIO bus
This bus is used to access internal SoC PHYs.  These PHYs are configured
by the ENETC driver directly, but it's useful to have command line access
to this MDIO to debug the system especially when using new external PHYs.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:43 -06:00
Alex Marginean
6c96446859 drivers: net: fsl_enetc_mdio: return with time-out if HW is stuck
On some boards MDIO may get stuck if it detects echo on the line.  This is
a know hardware issue, there is a board fix for it.  In case we're running
on a board that doesn't have the fix, we don't want to loop here forever
and freeze U-Boot.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:43 -06:00
Alex Marginean
a931f78307 drivers: net: fsl_enetc: move PCS and PHY config to probe
This reduces the time needed to establish a link as we don't reset the link
each time the interface is used.  Our Link capabilities do not change at
run-time so there is no need to re-apply PHY configuration each time.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:43 -06:00
Alex Marginean
307f8a6d1f drivers: net: fsl_enetc: Add 2.5Gbps to supported link speeds
The original code enabled link speeds up to 1Gbps, but the interface can
go up to 2.5G, enable that speed to in PHY AN mask.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:43 -06:00
Alex Marginean
17bd7eae72 drivers: net: fsl_enetc: use the new MDIO DM helper functions
Uses the new dm_eth_phy_connect helper to connect to the PHY to simplify
the code.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:43 -06:00
Alex Marginean
e22e3aff92 drivers: net: fsl_enetc: use XFI, USXGMII interface type macros
Apply 10G PCS init for USXGMII, XFI interface types.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:43 -06:00
Alex Marginean
6d9bc2043a drivers: net: aquantia: check system interface too when checking for link up
In some cases the link on the system interface of the aquantia PHY comes up
after the link on line interface.  The link state loop only checks the line
side, which may result in first packet sent being lost.
Use aquantia_link_is_up instead, which checks both system and line side on
gen 2/3 PHYs to avoid losing the 1st packet.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:43 -06:00
Alex Marginean
05f86070c0 drivers: net: aquantia: set SMBus addr based on DT property
Aquantia PHYs have a SMBus interface mostly used for debug.  The addresses
on this interface are normally set up by PHY firmware, but depending on the
board they may end up not being unique.  Add an optional DT property used
to change SMBus address if needed.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:43 -06:00
Alex Marginean
7552ee9a01 drivers: net: aquantia: set MDI reversal based on DT property
MDI pins up to the RJ45 connector may be reversed on the board and the
default PHY configuration applied by firmware may or may not match that.
Add an optional DT property to configure MDI reversal for this case.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:43 -06:00
Alex Marginean
a301ec7a5a drivers: net: aquantia: set up SI protocol based on interface type
If PHY is not ready for data by the time _config is called, reconfigure the
PHY system interface to use the proper protocol based on phydev->interface,
just in case the defaults set by PHY firmware don't match current
configuration.

Signed-off-by: Florin Laurentiu Chiculita <florinlaurentiu.chiculita@nxp.com>
Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:42 -06:00
Alex Marginean
5fe861b8b2 drivers: net: aquantia: add PHY generation information
Uses the data field in phy_driver structure to identify the PHY generation.
This is useful for custom configuration as non-generic PHY registers are
not 100% compatible between generations.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:42 -06:00
Alex Marginean
8a141d6e9c drivers: net: aquantia: use XFI, USXGMII interface types
The PHY supports XFI and USXGMII, the notable difference being that USX AN
is enabled for USXGMII.  Legacy code uses XGMII for any 10G proto and
detects whether USX AN should be enabled or not using a PHY status
register.  Keep that functionality too, so we don't break existing drivers.

Signed-off-by: Razvan Ionut Cirjan <razvanionut.cirjan@nxp.com>
Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:42 -06:00
Anatolij Gustschin
389488df92 net: phy: fix switch vendor name
Fix vendor name in MV88E61xx option description.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:42 -06:00
Anatolij Gustschin
5bcb4b8ff6 net: phy: mv88e61xx: register phy_driver struct for 88E6071
Support probing and init for 88E6071 switch.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:42 -06:00
Anatolij Gustschin
41820c4baa net: phy: mv88E61xx: fix ENERGY_DET init for mv88E6071
On mv88E6071 the 'EDet' field offset, width and sense control
bits are different, adjust the driver to init the PHY control
register as needed. This fixes not working link detection and
tftp transfers.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:42 -06:00
Anatolij Gustschin
4aa05f6cf3 net: phy: mv88e61xx: add CPU port parameter init for 88E6071
On 88E6071 chip the port status register bit field offsets
for duplex and link bits differ. Extend the driver to use
88E6071 specific offset values. The width of bit fields for
speed status differ, too. Adapt for proper port speed
detection on 88E6071.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:42 -06:00