mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
AU_LINUX_QSDK_DATE_4.4_TARGET_ALL.12.0.4904
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAl8HhIkACgkQoUgPZYCpAfEExgCgkS2GM23Vz4HMEYwISNAAd7PD 9GMAmwddMoajYK9Be7KAu9oLhg4GPhBH =eO/w -----END PGP SIGNATURE----- Merge AU_LINUX_QSDK_DATE_4.4_TARGET_ALL.12.0.4904 on remote branch Change-Id: I5033d14f828d09e35b93bc27516b6601d758b253 Signed-off-by: Linux Build Service Account <lnxbuild@localhost>
This commit is contained in:
commit
52edeea840
8 changed files with 57 additions and 15 deletions
|
|
@ -121,6 +121,7 @@
|
|||
};
|
||||
|
||||
gmac_cfg {
|
||||
ext_mdio_gpio = <36 37>;
|
||||
gephy_led = <46>;
|
||||
|
||||
gmac1_cfg {
|
||||
|
|
@ -129,5 +130,12 @@
|
|||
phy_address = <7>;
|
||||
phy_name = "IPQ MDIO0";
|
||||
};
|
||||
gmac2_cfg {
|
||||
unit = <1>;
|
||||
base = <0x39D00000>;
|
||||
phy_address = <0x1c>;
|
||||
napa_gpio = <39>;
|
||||
phy_name = "IPQ MDIO1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@
|
|||
};
|
||||
|
||||
gmac_cfg {
|
||||
ext_mdio_gpio = <36 37>;
|
||||
gephy_led = <46>;
|
||||
|
||||
gmac1_cfg {
|
||||
|
|
@ -135,6 +136,14 @@
|
|||
phy_address = <7>;
|
||||
phy_name = "IPQ MDIO0";
|
||||
};
|
||||
gmac2_cfg {
|
||||
unit = <1>;
|
||||
base = <0x39D00000>;
|
||||
phy_address = <0x1c>;
|
||||
napa_gpio = <39>;
|
||||
phy_name = "IPQ MDIO1";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -173,6 +173,7 @@
|
|||
#define OP_SECOND_FRAME (1 << 2)
|
||||
|
||||
/* GMAC config definitions */
|
||||
#define FES_PORT_SPEED (1 << 14)
|
||||
#define MII_PORT_SELECT (1 << 15)
|
||||
#define SGMII_PORT_SELECT (0 << 15)
|
||||
#define FRAME_BURST_ENABLE (1 << 21)
|
||||
|
|
|
|||
|
|
@ -640,7 +640,7 @@ static void set_ext_mdio_gpio(int node)
|
|||
}
|
||||
}
|
||||
|
||||
static void set_napa_phy_gpio(int gpio)
|
||||
static void reset_napa_phy_gpio(int gpio)
|
||||
{
|
||||
unsigned int *napa_gpio_base;
|
||||
|
||||
|
|
@ -648,7 +648,7 @@ static void set_napa_phy_gpio(int gpio)
|
|||
writel(0x203, napa_gpio_base);
|
||||
writel(0x0, GPIO_IN_OUT_ADDR(gpio));
|
||||
mdelay(500);
|
||||
writel(0x1, GPIO_IN_OUT_ADDR(gpio));
|
||||
writel(0x2, GPIO_IN_OUT_ADDR(gpio));
|
||||
}
|
||||
|
||||
static void reset_s17c_switch_gpio(int gpio)
|
||||
|
|
@ -1015,7 +1015,7 @@ int board_eth_init(bd_t *bis)
|
|||
gmac_cfg[loop].phy_napa_gpio = fdtdec_get_uint(gd->fdt_blob,
|
||||
offset, "napa_gpio", 0);
|
||||
if (gmac_cfg[loop].phy_napa_gpio){
|
||||
set_napa_phy_gpio(gmac_cfg[loop].phy_napa_gpio);
|
||||
reset_napa_phy_gpio(gmac_cfg[loop].phy_napa_gpio);
|
||||
}
|
||||
switch_gpio = fdtdec_get_uint(gd->fdt_blob, offset, "switch_gpio", 0);
|
||||
if (switch_gpio) {
|
||||
|
|
@ -1069,6 +1069,13 @@ void board_usb_deinit(int id)
|
|||
{
|
||||
int nodeoff, ssphy;
|
||||
char node_name[8];
|
||||
|
||||
if(readl(EUD_EUD_EN2))
|
||||
/*
|
||||
* Eud enable skipping deinit part
|
||||
*/
|
||||
return;
|
||||
|
||||
snprintf(node_name, sizeof(node_name), "usb%d", id);
|
||||
nodeoff = fdt_path_offset(gd->fdt_blob, node_name);
|
||||
if (fdtdec_get_int(gd->fdt_blob, nodeoff, "qcom,emulation", 0))
|
||||
|
|
@ -1236,12 +1243,17 @@ int ipq_board_usb_init(void)
|
|||
int i, nodeoff, ssphy;
|
||||
char node_name[8];
|
||||
|
||||
if(readl(EUD_EUD_EN2)) {
|
||||
printf("USB: EUD Enable, skipping initialization\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i=0; i<CONFIG_USB_MAX_CONTROLLER_COUNT; i++) {
|
||||
snprintf(node_name, sizeof(node_name), "usb%d", i);
|
||||
nodeoff = fdt_path_offset(gd->fdt_blob, node_name);
|
||||
if (nodeoff < 0){
|
||||
printf("USB: Node Not found, skipping initialization\n");
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ssphy = fdtdec_get_int(gd->fdt_blob, nodeoff, "ssphy", 0);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@
|
|||
#include <asm/arch-qca-common/qca_common.h>
|
||||
#include "phy.h"
|
||||
|
||||
/*
|
||||
* Eud register
|
||||
*/
|
||||
#define EUD_EUD_EN2 0x0005A000
|
||||
|
||||
#define MSM_SDC1_BASE 0x7800000
|
||||
#define MSM_SDC1_SDHCI_BASE 0x7804000
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,12 @@ CONFIG_CMD_SETEXPR=y
|
|||
#
|
||||
# Network commands
|
||||
#
|
||||
|
||||
#
|
||||
# Network PHY
|
||||
#
|
||||
CONFIG_QCA8081_PHY=y
|
||||
|
||||
CONFIG_CMD_NET=y
|
||||
# CONFIG_CMD_TFTPPUT is not set
|
||||
# CONFIG_CMD_TFTPSRV is not set
|
||||
|
|
|
|||
|
|
@ -82,16 +82,18 @@ static void ipq_eth_mac_cfg(struct eth_device *dev)
|
|||
{
|
||||
struct ipq_eth_dev *priv = dev->priv;
|
||||
struct eth_mac_regs *mac_reg = (struct eth_mac_regs *)priv->mac_regs_p;
|
||||
|
||||
uint speed = 0;
|
||||
uint ipq_mac_cfg = 0;
|
||||
|
||||
uint ipq_mac_framefilter = 0;
|
||||
|
||||
ipq_mac_framefilter = PROMISCUOUS_MODE_ON;
|
||||
|
||||
if (priv->mac_unit) {
|
||||
if (priv->phy_type == QCA8081_1_1_PHY|| priv->phy_type == QCA8033_PHY)
|
||||
speed = priv->speed;
|
||||
|
||||
ipq_mac_cfg |= (FRAME_BURST_ENABLE | JUMBO_FRAME_ENABLE | JABBER_DISABLE |
|
||||
TX_ENABLE | RX_ENABLE | FULL_DUPLEX_ENABLE);
|
||||
TX_ENABLE | RX_ENABLE | FULL_DUPLEX_ENABLE | speed);
|
||||
|
||||
writel(ipq_mac_cfg, &mac_reg->conf);
|
||||
} else {
|
||||
|
|
@ -345,6 +347,7 @@ static int ipq5018_phy_link_update(struct eth_device *dev)
|
|||
char *lstatus[] = {"up", "Down"};
|
||||
char *dp[] = {"Half", "Full"};
|
||||
int speed_clock1 = 0, speed_clock2 = 0;
|
||||
int mode = PORT_WRAPPER_SGMII0_RGMII4;
|
||||
|
||||
if (priv->ipq_swith == 0) {
|
||||
phy_get_ops = priv->ops;
|
||||
|
|
@ -380,7 +383,7 @@ static int ipq5018_phy_link_update(struct eth_device *dev)
|
|||
dp[duplex]);
|
||||
break;
|
||||
case FAL_SPEED_100:
|
||||
priv->speed = MII_PORT_SELECT;
|
||||
priv->speed = MII_PORT_SELECT | FES_PORT_SPEED;
|
||||
speed_clock1 = 9;
|
||||
speed_clock2 = 0;
|
||||
printf ("eth%d %s Speed :%d %s duplex\n",
|
||||
|
|
@ -399,6 +402,7 @@ static int ipq5018_phy_link_update(struct eth_device *dev)
|
|||
break;
|
||||
case FAL_SPEED_2500:
|
||||
priv->speed = SGMII_PORT_SELECT;
|
||||
mode = PORT_WRAPPER_SGMII_PLUS;
|
||||
speed_clock1 = 1;
|
||||
speed_clock2 = 0;
|
||||
printf ("eth%d %s Speed :%d %s duplex\n",
|
||||
|
|
@ -418,11 +422,7 @@ static int ipq5018_phy_link_update(struct eth_device *dev)
|
|||
}
|
||||
|
||||
if (priv->mac_unit){
|
||||
if (priv->phy_type == QCA8081_PHY_TYPE ||
|
||||
priv->phy_type == QCA8081_1_1_PHY)
|
||||
ppe_uniphy_mode_set(PORT_WRAPPER_SGMII_PLUS);
|
||||
else
|
||||
ppe_uniphy_mode_set(PORT_WRAPPER_SGMII0_RGMII4);
|
||||
ppe_uniphy_mode_set(mode);
|
||||
} else {
|
||||
ipq5018_enable_gephy();
|
||||
}
|
||||
|
|
@ -727,16 +727,18 @@ int ipq_gmac_init(ipq_gmac_board_cfg_t *gmac_cfg)
|
|||
}
|
||||
|
||||
switch(phy_chip_id) {
|
||||
#ifdef CONFIG_QCA8081_PHY
|
||||
/*
|
||||
* NAPA PHY For GMAC1
|
||||
*/
|
||||
case QCA8081_PHY:
|
||||
case QCA8081_1_1_PHY:
|
||||
ipq_gmac_macs[i]->phy_type = QCA8081_PHY;
|
||||
ipq_gmac_macs[i]->phy_type = QCA8081_1_1_PHY;
|
||||
ipq_qca8081_phy_init(
|
||||
&ipq_gmac_macs[i]->ops,
|
||||
ipq_gmac_macs[i]->phy_address);
|
||||
break;
|
||||
#endif
|
||||
/*
|
||||
* Internel GEPHY only for GMAC0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -246,7 +246,6 @@ extern loff_t board_env_size;
|
|||
*/
|
||||
#define CONFIG_GEPHY
|
||||
#define CONFIG_QCA8033_PHY
|
||||
#define CONFIG_QCA8081_PHY
|
||||
|
||||
/*
|
||||
* USB Support
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue