forked from kdave/btrfs-devel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: stmmac: Enable SERDES power up/down sequence
This patch is to enable Intel SERDES power up/down sequence. The SERDES converts 8/10 bits data to SGMII signal. Below is an example of HW configuration for SGMII mode. The SERDES is located in the PHY IF in the diagram below. <-----------------GBE Controller---------->|<--External PHY chip--> +----------+ +----+ +---+ +----------+ | EQoS | <-GMII->| DW | < ------ > |PHY| <-SGMII-> | External | | MAC | |xPCS| |IF | | PHY | +----------+ +----+ +---+ +----------+ ^ ^ ^ ^ | | | | +---------------------MDIO-------------------------+ PHY IF configuration and status registers are accessible through mdio address 0x15 which is defined as mdio_adhoc_addr. During D0, The driver will need to power up PHY IF by changing the power state to P0. Likewise, for D3, the driver sets PHY IF power state to P3. Signed-off-by: Voon Weifeng <[email protected]> Signed-off-by: Ong Boon Leong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information
Showing
4 changed files
with
237 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* Copyright (c) 2020, Intel Corporation | ||
* DWMAC Intel header file | ||
*/ | ||
|
||
#ifndef __DWMAC_INTEL_H__ | ||
#define __DWMAC_INTEL_H__ | ||
|
||
#define POLL_DELAY_US 8 | ||
|
||
/* SERDES Register */ | ||
#define SERDES_GSR0 0x5 /* Global Status Reg0 */ | ||
#define SERDES_GCR0 0xb /* Global Configuration Reg0 */ | ||
|
||
/* SERDES defines */ | ||
#define SERDES_PLL_CLK BIT(0) /* PLL clk valid signal */ | ||
#define SERDES_RST BIT(2) /* Serdes Reset */ | ||
#define SERDES_PWR_ST_MASK GENMASK(6, 4) /* Serdes Power state*/ | ||
#define SERDES_PWR_ST_SHIFT 4 | ||
#define SERDES_PWR_ST_P0 0x0 | ||
#define SERDES_PWR_ST_P3 0x3 | ||
|
||
#endif /* __DWMAC_INTEL_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters