Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
f1a69b8c
U
U-Boot.Mirror
项目概览
OS
/
U-Boot.Mirror
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
U-Boot.Mirror
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f1a69b8c
编写于
6月 03, 2020
作者:
T
Tom Rini
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi
- H6 emac support - USB PHY H6 logic alignment
上级
49c8c91c
1e7d00ae
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
18 deletion
+27
-18
arch/arm/mach-sunxi/dram_sunxi_dw.c
arch/arm/mach-sunxi/dram_sunxi_dw.c
+9
-9
configs/pine_h64_defconfig
configs/pine_h64_defconfig
+1
-0
drivers/net/sun8i_emac.c
drivers/net/sun8i_emac.c
+13
-7
drivers/phy/allwinner/phy-sun4i-usb.c
drivers/phy/allwinner/phy-sun4i-usb.c
+4
-2
未找到文件。
arch/arm/mach-sunxi/dram_sunxi_dw.c
浏览文件 @
f1a69b8c
...
@@ -79,15 +79,15 @@ enum {
...
@@ -79,15 +79,15 @@ enum {
MBUS_QOS_HIGHEST
MBUS_QOS_HIGHEST
};
};
inline
void
mbus_configure_port
(
u8
port
,
static
inline
void
mbus_configure_port
(
u8
port
,
bool
bwlimit
,
bool
bwlimit
,
bool
priority
,
bool
priority
,
u8
qos
,
/* MBUS_QOS_LOWEST .. MBUS_QOS_HIGEST */
u8
qos
,
/* MBUS_QOS_LOWEST .. MBUS_QOS_HIGEST */
u8
waittime
,
/* 0 .. 0xf */
u8
waittime
,
/* 0 .. 0xf */
u8
acs
,
/* 0 .. 0xff */
u8
acs
,
/* 0 .. 0xff */
u16
bwl0
,
/* 0 .. 0xffff, bandwidth limit in MB/s */
u16
bwl0
,
/* 0 .. 0xffff, bandwidth limit in MB/s */
u16
bwl1
,
u16
bwl1
,
u16
bwl2
)
u16
bwl2
)
{
{
struct
sunxi_mctl_com_reg
*
const
mctl_com
=
struct
sunxi_mctl_com_reg
*
const
mctl_com
=
(
struct
sunxi_mctl_com_reg
*
)
SUNXI_DRAM_COM_BASE
;
(
struct
sunxi_mctl_com_reg
*
)
SUNXI_DRAM_COM_BASE
;
...
...
configs/pine_h64_defconfig
浏览文件 @
f1a69b8c
...
@@ -10,5 +10,6 @@ CONFIG_SPL_SPI_SUNXI=y
...
@@ -10,5 +10,6 @@ CONFIG_SPL_SPI_SUNXI=y
# CONFIG_PSCI_RESET is not set
# CONFIG_PSCI_RESET is not set
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-pine-h64"
CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-pine-h64"
CONFIG_SUN8I_EMAC=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
drivers/net/sun8i_emac.c
浏览文件 @
f1a69b8c
...
@@ -111,6 +111,7 @@ enum emac_variant {
...
@@ -111,6 +111,7 @@ enum emac_variant {
H3_EMAC
,
H3_EMAC
,
A64_EMAC
,
A64_EMAC
,
R40_GMAC
,
R40_GMAC
,
H6_EMAC
,
};
};
struct
emac_dma_desc
{
struct
emac_dma_desc
{
...
@@ -300,9 +301,9 @@ static int sun8i_emac_set_syscon(struct sun8i_eth_pdata *pdata,
...
@@ -300,9 +301,9 @@ static int sun8i_emac_set_syscon(struct sun8i_eth_pdata *pdata,
if
(
priv
->
variant
==
R40_GMAC
)
{
if
(
priv
->
variant
==
R40_GMAC
)
{
/* Select RGMII for R40 */
/* Select RGMII for R40 */
reg
=
readl
(
priv
->
sysctl_reg
+
0x164
);
reg
=
readl
(
priv
->
sysctl_reg
+
0x164
);
reg
|=
CCM_GMAC_CTRL_TX_CLK_SRC_INT_R
GMII
|
reg
|=
SC_ETCS_INT_
GMII
|
CCM_GMAC_CTRL_GPIT_RGMII
|
SC_EPIT
|
CCM_GMAC_CTRL_TX_CLK_DELAY
(
CONFIG_GMAC_TX_DELAY
);
(
CONFIG_GMAC_TX_DELAY
<<
SC_ETXDC_OFFSET
);
writel
(
reg
,
priv
->
sysctl_reg
+
0x164
);
writel
(
reg
,
priv
->
sysctl_reg
+
0x164
);
return
0
;
return
0
;
...
@@ -310,14 +311,16 @@ static int sun8i_emac_set_syscon(struct sun8i_eth_pdata *pdata,
...
@@ -310,14 +311,16 @@ static int sun8i_emac_set_syscon(struct sun8i_eth_pdata *pdata,
reg
=
readl
(
priv
->
sysctl_reg
+
0x30
);
reg
=
readl
(
priv
->
sysctl_reg
+
0x30
);
if
(
priv
->
variant
==
H3_EMAC
)
{
if
(
priv
->
variant
==
H3_EMAC
||
priv
->
variant
==
H6_EMAC
)
{
ret
=
sun8i_emac_set_syscon_ephy
(
priv
,
&
reg
);
ret
=
sun8i_emac_set_syscon_ephy
(
priv
,
&
reg
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
}
}
reg
&=
~
(
SC_ETCS_MASK
|
SC_EPIT
);
reg
&=
~
(
SC_ETCS_MASK
|
SC_EPIT
);
if
(
priv
->
variant
==
H3_EMAC
||
priv
->
variant
==
A64_EMAC
)
if
(
priv
->
variant
==
H3_EMAC
||
priv
->
variant
==
A64_EMAC
||
priv
->
variant
==
H6_EMAC
)
reg
&=
~
SC_RMII_EN
;
reg
&=
~
SC_RMII_EN
;
switch
(
priv
->
interface
)
{
switch
(
priv
->
interface
)
{
...
@@ -329,7 +332,8 @@ static int sun8i_emac_set_syscon(struct sun8i_eth_pdata *pdata,
...
@@ -329,7 +332,8 @@ static int sun8i_emac_set_syscon(struct sun8i_eth_pdata *pdata,
break
;
break
;
case
PHY_INTERFACE_MODE_RMII
:
case
PHY_INTERFACE_MODE_RMII
:
if
(
priv
->
variant
==
H3_EMAC
||
if
(
priv
->
variant
==
H3_EMAC
||
priv
->
variant
==
A64_EMAC
)
{
priv
->
variant
==
A64_EMAC
||
priv
->
variant
==
H6_EMAC
)
{
reg
|=
SC_RMII_EN
|
SC_ETCS_EXT_GMII
;
reg
|=
SC_RMII_EN
|
SC_ETCS_EXT_GMII
;
break
;
break
;
}
}
...
@@ -535,7 +539,7 @@ static int parse_phy_pins(struct udevice *dev)
...
@@ -535,7 +539,7 @@ static int parse_phy_pins(struct udevice *dev)
if
(
priv
->
variant
==
H3_EMAC
)
if
(
priv
->
variant
==
H3_EMAC
)
sunxi_gpio_set_cfgpin
(
pin
,
SUN8I_IOMUX_H3
);
sunxi_gpio_set_cfgpin
(
pin
,
SUN8I_IOMUX_H3
);
else
if
(
priv
->
variant
==
R40_GMAC
)
else
if
(
priv
->
variant
==
R40_GMAC
||
priv
->
variant
==
H6_EMAC
)
sunxi_gpio_set_cfgpin
(
pin
,
SUN8I_IOMUX_R40
);
sunxi_gpio_set_cfgpin
(
pin
,
SUN8I_IOMUX_R40
);
else
else
sunxi_gpio_set_cfgpin
(
pin
,
SUN8I_IOMUX
);
sunxi_gpio_set_cfgpin
(
pin
,
SUN8I_IOMUX
);
...
@@ -1032,6 +1036,8 @@ static const struct udevice_id sun8i_emac_eth_ids[] = {
...
@@ -1032,6 +1036,8 @@ static const struct udevice_id sun8i_emac_eth_ids[] = {
.
data
=
(
uintptr_t
)
A83T_EMAC
},
.
data
=
(
uintptr_t
)
A83T_EMAC
},
{.
compatible
=
"allwinner,sun8i-r40-gmac"
,
{.
compatible
=
"allwinner,sun8i-r40-gmac"
,
.
data
=
(
uintptr_t
)
R40_GMAC
},
.
data
=
(
uintptr_t
)
R40_GMAC
},
{.
compatible
=
"allwinner,sun50i-h6-emac"
,
.
data
=
(
uintptr_t
)
H6_EMAC
},
{
}
{
}
};
};
...
...
drivers/phy/allwinner/phy-sun4i-usb.c
浏览文件 @
f1a69b8c
...
@@ -282,7 +282,8 @@ static int sun4i_usb_phy_init(struct phy *phy)
...
@@ -282,7 +282,8 @@ static int sun4i_usb_phy_init(struct phy *phy)
return
ret
;
return
ret
;
}
}
if
(
data
->
cfg
->
type
==
sun8i_a83t_phy
)
{
if
(
data
->
cfg
->
type
==
sun8i_a83t_phy
||
data
->
cfg
->
type
==
sun50i_h6_phy
)
{
if
(
phy
->
id
==
0
)
{
if
(
phy
->
id
==
0
)
{
val
=
readl
(
data
->
base
+
data
->
cfg
->
phyctl_offset
);
val
=
readl
(
data
->
base
+
data
->
cfg
->
phyctl_offset
);
val
|=
PHY_CTL_VBUSVLDEXT
;
val
|=
PHY_CTL_VBUSVLDEXT
;
...
@@ -324,7 +325,8 @@ static int sun4i_usb_phy_exit(struct phy *phy)
...
@@ -324,7 +325,8 @@ static int sun4i_usb_phy_exit(struct phy *phy)
int
ret
;
int
ret
;
if
(
phy
->
id
==
0
)
{
if
(
phy
->
id
==
0
)
{
if
(
data
->
cfg
->
type
==
sun8i_a83t_phy
)
{
if
(
data
->
cfg
->
type
==
sun8i_a83t_phy
||
data
->
cfg
->
type
==
sun50i_h6_phy
)
{
void
__iomem
*
phyctl
=
data
->
base
+
void
__iomem
*
phyctl
=
data
->
base
+
data
->
cfg
->
phyctl_offset
;
data
->
cfg
->
phyctl_offset
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录