u-boot/board/traverse/ten64/eth_ten64.c
Mathew McBride a1d2fd3874 board: traverse: add initial Ten64 support
The Ten64 is a networking-oriented MiniITX board
using the NXP LS1088A SoC.

This patch provides the bare minimum to support
Ten64 boards under U-Boot for distroboot.

Some related drivers have not yet been submitted
and this basic support lacks some of the
opinionated defaults provided by our firmware
distribution.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2022-02-01 15:04:24 +05:30

48 lines
1.1 KiB
C

// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2017 NXP
* Copyright 2019-2021 Traverse Technologies Australia
*/
#include <common.h>
#include <command.h>
#include <netdev.h>
#include <malloc.h>
#include <fsl_mdio.h>
#include <miiphy.h>
#include <phy.h>
#include <fm_eth.h>
#include <asm/io.h>
#include <exports.h>
#include <asm/arch/fsl_serdes.h>
#include <fsl-mc/fsl_mc.h>
#include <fsl-mc/ldpaa_wriop.h>
void reset_phy(void)
{
mc_env_boot();
}
int board_phy_config(struct phy_device *phydev)
{
/* These settings only apply to VSC8514 */
if (phydev->phy_id == 0x70670) {
/* First, ensure LEDs are driven to rails (not tristate)
* This is in the extended page 0x0010
*/
phy_write(phydev, MDIO_DEVAD_NONE, 0x1F, 0x0010);
phy_write(phydev, MDIO_DEVAD_NONE, 0x0E, 0x2000);
/* Restore to page 0 */
phy_write(phydev, MDIO_DEVAD_NONE, 0x1F, 0x0000);
/* Disable blink on the left LEDs, and make the activity LEDs blink faster */
phy_write(phydev, MDIO_DEVAD_NONE, 0x1E, 0xC03);
phy_write(phydev, MDIO_DEVAD_NONE, 0x1D, 0x3421);
}
if (phydev->drv->config)
phydev->drv->config(phydev);
return 0;
}