mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 17:52:07 +02:00
board: mscc: jr2: Update MSCC Jaguar2 boards
In Jaguar2 SoC family there are 3 different pcb. Each of this needs to configure the phys in different ways. Therefore implement the function board_phy_config and based on pcb configure them accordingly. Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
This commit is contained in:
committed by
Daniel Schwierzeck
parent
5e1d417bec
commit
6aa50ae22c
@@ -6,6 +6,7 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <led.h>
|
#include <led.h>
|
||||||
|
#include <miiphy.h>
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
BOARD_TYPE_PCB110 = 0xAABBCE00,
|
BOARD_TYPE_PCB110 = 0xAABBCE00,
|
||||||
@@ -64,6 +65,28 @@ static void vcoreiii_gpio_set_alternate(int gpio, int mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int board_phy_config(struct phy_device *phydev)
|
||||||
|
{
|
||||||
|
if (gd->board_type == BOARD_TYPE_PCB110 ||
|
||||||
|
gd->board_type == BOARD_TYPE_PCB112) {
|
||||||
|
phy_write(phydev, 0, 31, 0x10);
|
||||||
|
phy_write(phydev, 0, 18, 0x80F0);
|
||||||
|
while (phy_read(phydev, 0, 18) & 0x8000)
|
||||||
|
;
|
||||||
|
phy_write(phydev, 0, 31, 0);
|
||||||
|
}
|
||||||
|
if (gd->board_type == BOARD_TYPE_PCB111) {
|
||||||
|
phy_write(phydev, 0, 31, 0x10);
|
||||||
|
phy_write(phydev, 0, 18, 0x80A0);
|
||||||
|
while (phy_read(phydev, 0, 18) & 0x8000)
|
||||||
|
;
|
||||||
|
phy_write(phydev, 0, 14, 0x800);
|
||||||
|
phy_write(phydev, 0, 31, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void board_debug_uart_init(void)
|
void board_debug_uart_init(void)
|
||||||
{
|
{
|
||||||
/* too early for the pinctrl driver, so configure the UART pins here */
|
/* too early for the pinctrl driver, so configure the UART pins here */
|
||||||
|
Reference in New Issue
Block a user