mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-17 17:51:27 +01:00
Merge "ipq807x: Add SFP TX reset"
This commit is contained in:
commit
90f4f9344b
2 changed files with 17 additions and 0 deletions
|
|
@ -33,6 +33,7 @@
|
|||
switch_mac_mode1 = <0x7>;
|
||||
switch_mac_mode2 = <0x2>;
|
||||
sfp_port = <4>;
|
||||
sfp_gpio = <59>;
|
||||
aquantia_port = <5>;
|
||||
aquantia_gpio = <44>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -374,6 +374,21 @@ void napa_phy_reset_init(void)
|
|||
}
|
||||
}
|
||||
|
||||
void sfp_reset_init(void)
|
||||
{
|
||||
int sfp_gpio = -1, node;
|
||||
unsigned int *sfp_gpio_base;
|
||||
|
||||
node = fdt_path_offset(gd->fdt_blob, "/ess-switch");
|
||||
if (node >= 0)
|
||||
sfp_gpio = fdtdec_get_uint(gd->fdt_blob, node, "sfp_gpio", -1);
|
||||
|
||||
if (sfp_gpio >=0) {
|
||||
sfp_gpio_base = (unsigned int *)GPIO_CONFIG_ADDR(sfp_gpio);
|
||||
writel(0x2C1, sfp_gpio_base);
|
||||
}
|
||||
}
|
||||
|
||||
void napa_phy_reset_init_done(void)
|
||||
{
|
||||
int napa_gpio[2] = {0}, napa_gpio_cnt, i;
|
||||
|
|
@ -459,6 +474,7 @@ void eth_clock_enable(void)
|
|||
writel(0, tlmm_base + 0x4);
|
||||
aquantia_phy_reset_init();
|
||||
napa_phy_reset_init();
|
||||
sfp_reset_init();
|
||||
mdelay(500);
|
||||
writel(2, tlmm_base + 0x4);
|
||||
aquantia_phy_reset_init_done();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue