Commit 7b05d3b3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'usb-ci-v4.6-rc1' of...

Merge tag 'usb-ci-v4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next

Peter writes:

- Add platform interface to choose ttctrl.ttha
- Some tiny improvements
parents 71e41bbb d3d8425a
...@@ -2,7 +2,14 @@ ...@@ -2,7 +2,14 @@
Required properties: Required properties:
- compatible: should be one of: - compatible: should be one of:
"fsl,imx23-usb"
"fsl,imx27-usb" "fsl,imx27-usb"
"fsl,imx28-usb"
"fsl,imx6q-usb"
"fsl,imx6sl-usb"
"fsl,imx6sx-usb"
"fsl,imx6ul-usb"
"fsl,imx7d-usb"
"lsi,zevio-usb" "lsi,zevio-usb"
"qcom,ci-hdrc" "qcom,ci-hdrc"
"chipidea,usb2" "chipidea,usb2"
...@@ -53,6 +60,22 @@ Optional properties: ...@@ -53,6 +60,22 @@ Optional properties:
be specified. be specified.
- phy-clkgate-delay-us: the delay time (us) between putting the PHY into - phy-clkgate-delay-us: the delay time (us) between putting the PHY into
low power mode and gating the PHY clock. low power mode and gating the PHY clock.
- non-zero-ttctrl-ttha: after setting this property, the value of register
ttctrl.ttha will be 0x7f; if not, the value will be 0x0, this is the default
value. It needs to be very carefully for setting this property, it is
recommended that consult with your IC engineer before setting this value.
On the most of chipidea platforms, the "usage_tt" flag at RTL is 0, so this
property only affects siTD.
If this property is not set, the max packet size is 1023 bytes, and if
the total of packet size for pervious transactions are more than 256 bytes,
it can't accept any transactions within this frame. The use case is single
transaction, but higher frame rate.
If this property is set, the max packet size is 188 bytes, it can handle
more transactions than above case, it can accept transactions until it
considers the left room size within frame is less than 188 bytes, software
needs to make sure it does not send more than 90%
maximum_periodic_data_per_frame. The use case is multiple transactions, but
less frame rate.
i.mx specific properties i.mx specific properties
- fsl,usbmisc: phandler of non-core register device, with one - fsl,usbmisc: phandler of non-core register device, with one
......
...@@ -28,6 +28,11 @@ struct ci_hdrc_imx_platform_flag { ...@@ -28,6 +28,11 @@ struct ci_hdrc_imx_platform_flag {
bool runtime_pm; bool runtime_pm;
}; };
static const struct ci_hdrc_imx_platform_flag imx23_usb_data = {
.flags = CI_HDRC_TURN_VBUS_EARLY_ON |
CI_HDRC_DISABLE_STREAMING,
};
static const struct ci_hdrc_imx_platform_flag imx27_usb_data = { static const struct ci_hdrc_imx_platform_flag imx27_usb_data = {
CI_HDRC_DISABLE_STREAMING, CI_HDRC_DISABLE_STREAMING,
}; };
...@@ -66,6 +71,7 @@ static const struct ci_hdrc_imx_platform_flag imx7d_usb_data = { ...@@ -66,6 +71,7 @@ static const struct ci_hdrc_imx_platform_flag imx7d_usb_data = {
}; };
static const struct of_device_id ci_hdrc_imx_dt_ids[] = { static const struct of_device_id ci_hdrc_imx_dt_ids[] = {
{ .compatible = "fsl,imx23-usb", .data = &imx23_usb_data},
{ .compatible = "fsl,imx28-usb", .data = &imx28_usb_data}, { .compatible = "fsl,imx28-usb", .data = &imx28_usb_data},
{ .compatible = "fsl,imx27-usb", .data = &imx27_usb_data}, { .compatible = "fsl,imx27-usb", .data = &imx27_usb_data},
{ .compatible = "fsl,imx6q-usb", .data = &imx6q_usb_data}, { .compatible = "fsl,imx6q-usb", .data = &imx6q_usb_data},
...@@ -244,7 +250,6 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) ...@@ -244,7 +250,6 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
struct ci_hdrc_platform_data pdata = { struct ci_hdrc_platform_data pdata = {
.name = dev_name(&pdev->dev), .name = dev_name(&pdev->dev),
.capoffset = DEF_CAPOFFSET, .capoffset = DEF_CAPOFFSET,
.flags = CI_HDRC_SET_NON_ZERO_TTHA,
}; };
int ret; int ret;
const struct of_device_id *of_id; const struct of_device_id *of_id;
...@@ -302,9 +307,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) ...@@ -302,9 +307,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
&pdata); &pdata);
if (IS_ERR(data->ci_pdev)) { if (IS_ERR(data->ci_pdev)) {
ret = PTR_ERR(data->ci_pdev); ret = PTR_ERR(data->ci_pdev);
dev_err(&pdev->dev, if (ret != -EPROBE_DEFER)
"Can't register ci_hdrc platform device, err=%d\n", dev_err(&pdev->dev,
ret); "ci_hdrc_add_device failed, err=%d\n", ret);
goto err_clk; goto err_clk;
} }
......
...@@ -721,6 +721,9 @@ static int ci_get_platdata(struct device *dev, ...@@ -721,6 +721,9 @@ static int ci_get_platdata(struct device *dev,
return ret; return ret;
} }
if (of_find_property(dev->of_node, "non-zero-ttctrl-ttha", NULL))
platdata->flags |= CI_HDRC_SET_NON_ZERO_TTHA;
ext_id = ERR_PTR(-ENODEV); ext_id = ERR_PTR(-ENODEV);
ext_vbus = ERR_PTR(-ENODEV); ext_vbus = ERR_PTR(-ENODEV);
if (of_property_read_bool(dev->of_node, "extcon")) { if (of_property_read_bool(dev->of_node, "extcon")) {
......
...@@ -819,7 +819,6 @@ static int _ep_queue(struct usb_ep *ep, struct usb_request *req, ...@@ -819,7 +819,6 @@ static int _ep_queue(struct usb_ep *ep, struct usb_request *req,
ci->ep0out : ci->ep0in; ci->ep0out : ci->ep0in;
if (!list_empty(&hwep->qh.queue)) { if (!list_empty(&hwep->qh.queue)) {
_ep_nuke(hwep); _ep_nuke(hwep);
retval = -EOVERFLOW;
dev_warn(hwep->ci->dev, "endpoint ctrl %X nuked\n", dev_warn(hwep->ci->dev, "endpoint ctrl %X nuked\n",
_usb_addr(hwep)); _usb_addr(hwep));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment