提交 f427eb64 编写于 作者: K Kuninori Morimoto 提交者: Felipe Balbi

usb: gadget: renesas_usbhs: support otg pin control

some renesas_usbhs device is supporting OTG external device interface.
In that device, it is necessary to control PWEN/EXTLP on DVSTCTR.
This patch support it.
But renesas_usbhs driver doesn't have OTG support for now.
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 6ff5d09b
......@@ -808,6 +808,7 @@ static struct usbhs_private usbhs1_private = {
},
.driver_param = {
.buswait_bwait = 4,
.has_otg = 1,
.pipe_type = usbhs1_pipe_cfg,
.pipe_size = ARRAY_SIZE(usbhs1_pipe_cfg),
},
......
......@@ -114,6 +114,10 @@ void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable)
{
u16 mask = DCFM | DRPD | DPRPU;
u16 val = DCFM | DRPD;
int has_otg = usbhs_get_dparam(priv, has_otg);
if (has_otg)
usbhs_bset(priv, DVSTCTR, (EXTLP | PWEN), (EXTLP | PWEN));
/*
* if enable
......
......@@ -136,6 +136,11 @@ struct renesas_usbhs_driver_param {
* pio <--> dma border.
*/
int pio_dma_border; /* default is 64byte */
/*
* option:
*/
u32 has_otg:1; /* for controlling PWEN/EXTLP */
};
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册