On Mon, May 14, 2018 at 05:53:54PM +0800, Lin Huang wrote:
the phy config values used to fix in dp firmware, but some boards need change these values to do training and get the better eye diagram result. So support that in phy driver.
Signed-off-by: Chris Zhong zyw@rock-chips.com Signed-off-by: Lin Huang hl@rock-chips.com
Changes in v2:
- update patch following Enric suggest
Changes in v3:
- delete need_software_training variable
- add default phy config value, if dts do not define phy config value, use these value
drivers/phy/rockchip/phy-rockchip-typec.c | 305 ++++++++++++++++++++---------- include/soc/rockchip/rockchip_phy_typec.h | 63 ++++++ 2 files changed, 270 insertions(+), 98 deletions(-) create mode 100644 include/soc/rockchip/rockchip_phy_typec.h
diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c index 76a4b58..10253ad 100644 --- a/drivers/phy/rockchip/phy-rockchip-typec.c +++ b/drivers/phy/rockchip/phy-rockchip-typec.c
/snip
+/* default phy config */ +struct phy_config configs[3][4] = {
static const
Also, configs isn't a good name. How about tcphy_default_config?
- {{ 0x2a, 0x00 },
Can you please expand the assignment for all of these, ie:
{ .swing = 0x2a, .pe = 0x00 },
{ 0x1f, 0x15 },
{ 0x14, 0x22 },
{ 0x02, 0x2b } },
- {{ 0x21, 0x00 },
{ 0x12, 0x15 },
{ 0x02, 0x22 },
{ 0, 0 } },
- {{ 0x15, 0x00 },
{ 0x00, 0x15 },
{ 0, 0 },
{ 0, 0 } },
+};
/snip