* [PATCH v2 1/9] usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function
@ 2017-10-13 8:26 Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 2/9] usb: xhci-mtk: use ports count from xhci in xhci_mtk_sch_init() Chunfeng Yun
` (4 more replies)
0 siblings, 5 replies; 17+ messages in thread
From: Chunfeng Yun @ 2017-10-13 8:26 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi, Rob Herring
Cc: Matthias Brugger, Mark Rutland, Ian Campbell, Chunfeng Yun,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
This patch uses the simpler dma_set_mask_and_coherent() instead of
doing these as separate steps
Signed-off-by: Chunfeng Yun <chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
---
drivers/usb/host/xhci-mtk.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 8fb6065..c197a6d 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -606,15 +606,10 @@ static int xhci_mtk_probe(struct platform_device *pdev)
}
/* Initialize dma_mask and coherent_dma_mask to 32-bits */
- ret = dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
+ ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
if (ret)
goto disable_clk;
- if (!dev->dma_mask)
- dev->dma_mask = &dev->coherent_dma_mask;
- else
- dma_set_mask(dev, DMA_BIT_MASK(32));
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 2/9] usb: xhci-mtk: use ports count from xhci in xhci_mtk_sch_init()
2017-10-13 8:26 [PATCH v2 1/9] usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function Chunfeng Yun
@ 2017-10-13 8:26 ` Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 3/9] usb: xhci-mtk: check clock stability of U3_MAC Chunfeng Yun
` (3 subsequent siblings)
4 siblings, 0 replies; 17+ messages in thread
From: Chunfeng Yun @ 2017-10-13 8:26 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi, Rob Herring
Cc: Matthias Brugger, Mark Rutland, Ian Campbell, Chunfeng Yun,
linux-kernel, linux-arm-kernel, linux-usb, linux-mediatek,
devicetree
Make use of ports count from xhci but not from ippc in
xhci_mtk_sch_init()
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/host/xhci-mtk-sch.c | 3 ++-
drivers/usb/host/xhci-mtk.c | 3 ---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c
index 6e7ddf6..bfc51bc 100644
--- a/drivers/usb/host/xhci-mtk-sch.c
+++ b/drivers/usb/host/xhci-mtk-sch.c
@@ -287,12 +287,13 @@ static bool need_bw_sch(struct usb_host_endpoint *ep,
int xhci_mtk_sch_init(struct xhci_hcd_mtk *mtk)
{
+ struct xhci_hcd *xhci = hcd_to_xhci(mtk->hcd);
struct mu3h_sch_bw_info *sch_array;
int num_usb_bus;
int i;
/* ss IN and OUT are separated */
- num_usb_bus = mtk->num_u3_ports * 2 + mtk->num_u2_ports;
+ num_usb_bus = xhci->num_usb3_ports * 2 + xhci->num_usb2_ports;
sch_array = kcalloc(num_usb_bus, sizeof(*sch_array), GFP_KERNEL);
if (sch_array == NULL)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index c197a6d..9502ca4 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -492,7 +492,6 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci)
/* called during probe() after chip reset completes */
static int xhci_mtk_setup(struct usb_hcd *hcd)
{
- struct xhci_hcd *xhci = hcd_to_xhci(hcd);
struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd);
int ret;
@@ -507,8 +506,6 @@ static int xhci_mtk_setup(struct usb_hcd *hcd)
return ret;
if (usb_hcd_is_primary_hcd(hcd)) {
- mtk->num_u3_ports = xhci->num_usb3_ports;
- mtk->num_u2_ports = xhci->num_usb2_ports;
ret = xhci_mtk_sch_init(mtk);
if (ret)
return ret;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 3/9] usb: xhci-mtk: check clock stability of U3_MAC
2017-10-13 8:26 [PATCH v2 1/9] usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 2/9] usb: xhci-mtk: use ports count from xhci in xhci_mtk_sch_init() Chunfeng Yun
@ 2017-10-13 8:26 ` Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 5/9] usb: xhci-mtk: remove dummy wakeup debounce clocks Chunfeng Yun
` (2 subsequent siblings)
4 siblings, 0 replies; 17+ messages in thread
From: Chunfeng Yun @ 2017-10-13 8:26 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi, Rob Herring
Cc: Matthias Brugger, Mark Rutland, Ian Campbell, Chunfeng Yun,
linux-kernel, linux-arm-kernel, linux-usb, linux-mediatek,
devicetree
This is useful to find out the root cause when the Super Speed doesn't
work. Such as when the T-PHY is switched to PCIe or SATA, and affects
Super Speed function, the check will fail.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/host/xhci-mtk.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 9502ca4..7a92bb7 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -43,6 +43,7 @@
/* ip_pw_sts1 register */
#define STS1_IP_SLEEP_STS BIT(30)
+#define STS1_U3_MAC_RST BIT(16)
#define STS1_XHCI_RST BIT(11)
#define STS1_SYS125_RST BIT(10)
#define STS1_REF_RST BIT(8)
@@ -125,6 +126,9 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
check_val = STS1_SYSPLL_STABLE | STS1_REF_RST |
STS1_SYS125_RST | STS1_XHCI_RST;
+ if (mtk->num_u3_ports)
+ check_val |= STS1_U3_MAC_RST;
+
ret = readl_poll_timeout(&ippc->ip_pw_sts1, value,
(check_val == (value & check_val)), 100, 20000);
if (ret) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 4/9] usb: xhci-mtk: support option to disable usb3 ports
[not found] ` <994382d16d6bdc0f3d7c11b22f1710252e056e34.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
@ 2017-10-13 8:26 ` Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 6/9] usb: xhci-mtk: add optional mcu and dma bus clocks Chunfeng Yun
` (2 subsequent siblings)
3 siblings, 0 replies; 17+ messages in thread
From: Chunfeng Yun @ 2017-10-13 8:26 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi, Rob Herring
Cc: Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, Ian Campbell,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Chunfeng Yun,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Matthias Brugger,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Add support to disable specific usb3 ports, it's useful when
usb3 phy is shared with PCIe or SATA, because we should disable
the corresponding usb3 port if the phy is used by PCIe or SATA.
Sometimes it's helpful to analyse and solve problems.
Signed-off-by: Chunfeng Yun <chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
---
drivers/usb/host/xhci-mtk.c | 18 +++++++++++++++---
drivers/usb/host/xhci-mtk.h | 1 +
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 7a92bb7..97ba51e 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -92,6 +92,7 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
{
struct mu3c_ippc_regs __iomem *ippc = mtk->ippc_regs;
u32 value, check_val;
+ int u3_ports_disabed = 0;
int ret;
int i;
@@ -103,8 +104,13 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
value &= ~CTRL1_IP_HOST_PDN;
writel(value, &ippc->ip_pw_ctr1);
- /* power on and enable all u3 ports */
+ /* power on and enable u3 ports except skipped ones */
for (i = 0; i < mtk->num_u3_ports; i++) {
+ if ((0x1 << i) & mtk->u3p_dis_msk) {
+ u3_ports_disabed++;
+ continue;
+ }
+
value = readl(&ippc->u3_ctrl_p[i]);
value &= ~(CTRL_U3_PORT_PDN | CTRL_U3_PORT_DIS);
value |= CTRL_U3_PORT_HOST_SEL;
@@ -126,7 +132,7 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
check_val = STS1_SYSPLL_STABLE | STS1_REF_RST |
STS1_SYS125_RST | STS1_XHCI_RST;
- if (mtk->num_u3_ports)
+ if (mtk->num_u3_ports > u3_ports_disabed)
check_val |= STS1_U3_MAC_RST;
ret = readl_poll_timeout(&ippc->ip_pw_sts1, value,
@@ -149,8 +155,11 @@ static int xhci_mtk_host_disable(struct xhci_hcd_mtk *mtk)
if (!mtk->has_ippc)
return 0;
- /* power down all u3 ports */
+ /* power down u3 ports except skipped ones */
for (i = 0; i < mtk->num_u3_ports; i++) {
+ if ((0x1 << i) & mtk->u3p_dis_msk)
+ continue;
+
value = readl(&ippc->u3_ctrl_p[i]);
value |= CTRL_U3_PORT_PDN;
writel(value, &ippc->u3_ctrl_p[i]);
@@ -573,6 +582,9 @@ static int xhci_mtk_probe(struct platform_device *pdev)
}
mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable");
+ /* optional property, ignore the error if it does not exist */
+ of_property_read_u32(node, "mediatek,u3p-dis-msk",
+ &mtk->u3p_dis_msk);
ret = usb_wakeup_of_property_parse(mtk, node);
if (ret)
diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
index 3aa5e1d..db55a12 100644
--- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h
@@ -121,6 +121,7 @@ struct xhci_hcd_mtk {
bool has_ippc;
int num_u2_ports;
int num_u3_ports;
+ int u3p_dis_msk;
struct regulator *vusb33;
struct regulator *vbus;
struct clk *sys_clk; /* sys and mac clock */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 5/9] usb: xhci-mtk: remove dummy wakeup debounce clocks
2017-10-13 8:26 [PATCH v2 1/9] usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 2/9] usb: xhci-mtk: use ports count from xhci in xhci_mtk_sch_init() Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 3/9] usb: xhci-mtk: check clock stability of U3_MAC Chunfeng Yun
@ 2017-10-13 8:26 ` Chunfeng Yun
[not found] ` <ff9ee49a872084b4fc8c7fbabddc820058acb9b7.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-10-13 8:26 ` [PATCH v2 7/9] usb: host: modify description for MTK xHCI config Chunfeng Yun
[not found] ` <994382d16d6bdc0f3d7c11b22f1710252e056e34.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
4 siblings, 1 reply; 17+ messages in thread
From: Chunfeng Yun @ 2017-10-13 8:26 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi, Rob Herring
Cc: Matthias Brugger, Mark Rutland, Ian Campbell, Chunfeng Yun,
linux-kernel, linux-arm-kernel, linux-usb, linux-mediatek,
devicetree
The wakeup debounce clocks for each ports in fact are not
needed, so remove them.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/host/xhci-mtk.c | 33 ---------------------------------
drivers/usb/host/xhci-mtk.h | 2 --
2 files changed, 35 deletions(-)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 97ba51e..d60463c 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -237,25 +237,8 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
goto sys_clk_err;
}
- if (mtk->wakeup_src) {
- ret = clk_prepare_enable(mtk->wk_deb_p0);
- if (ret) {
- dev_err(mtk->dev, "failed to enable wk_deb_p0\n");
- goto usb_p0_err;
- }
-
- ret = clk_prepare_enable(mtk->wk_deb_p1);
- if (ret) {
- dev_err(mtk->dev, "failed to enable wk_deb_p1\n");
- goto usb_p1_err;
- }
- }
return 0;
-usb_p1_err:
- clk_disable_unprepare(mtk->wk_deb_p0);
-usb_p0_err:
- clk_disable_unprepare(mtk->sys_clk);
sys_clk_err:
clk_disable_unprepare(mtk->ref_clk);
ref_clk_err:
@@ -264,10 +247,6 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk)
{
- if (mtk->wakeup_src) {
- clk_disable_unprepare(mtk->wk_deb_p1);
- clk_disable_unprepare(mtk->wk_deb_p0);
- }
clk_disable_unprepare(mtk->sys_clk);
clk_disable_unprepare(mtk->ref_clk);
}
@@ -371,18 +350,6 @@ static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
if (!mtk->wakeup_src)
return 0;
- mtk->wk_deb_p0 = devm_clk_get(dev, "wakeup_deb_p0");
- if (IS_ERR(mtk->wk_deb_p0)) {
- dev_err(dev, "fail to get wakeup_deb_p0\n");
- return PTR_ERR(mtk->wk_deb_p0);
- }
-
- mtk->wk_deb_p1 = devm_clk_get(dev, "wakeup_deb_p1");
- if (IS_ERR(mtk->wk_deb_p1)) {
- dev_err(dev, "fail to get wakeup_deb_p1\n");
- return PTR_ERR(mtk->wk_deb_p1);
- }
-
mtk->pericfg = syscon_regmap_lookup_by_phandle(dn,
"mediatek,syscon-wakeup");
if (IS_ERR(mtk->pericfg)) {
diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
index db55a12..67783a7 100644
--- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h
@@ -126,8 +126,6 @@ struct xhci_hcd_mtk {
struct regulator *vbus;
struct clk *sys_clk; /* sys and mac clock */
struct clk *ref_clk;
- struct clk *wk_deb_p0; /* port0's wakeup debounce clock */
- struct clk *wk_deb_p1;
struct regmap *pericfg;
struct phy **phys;
int num_phys;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 6/9] usb: xhci-mtk: add optional mcu and dma bus clocks
[not found] ` <994382d16d6bdc0f3d7c11b22f1710252e056e34.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-10-13 8:26 ` [PATCH v2 4/9] usb: xhci-mtk: support option to disable usb3 ports Chunfeng Yun
@ 2017-10-13 8:26 ` Chunfeng Yun
2017-10-13 13:55 ` Matthias Brugger
2017-10-13 8:26 ` [PATCH v2 8/9] dt-bindings: usb: mtk-xhci: add a optional property to disable u3ports Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 9/9] dt-bindings: usb: mtk-xhci: remove dummy clocks and add optional ones Chunfeng Yun
3 siblings, 1 reply; 17+ messages in thread
From: Chunfeng Yun @ 2017-10-13 8:26 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi, Rob Herring
Cc: Matthias Brugger, Mark Rutland, Ian Campbell, Chunfeng Yun,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
There are mcu_bus and dma_bus clocks needed to be controlled by
driver on some SoCs, so add them as optional ones
Signed-off-by: Chunfeng Yun <chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
---
drivers/usb/host/xhci-mtk.c | 79 ++++++++++++++++++++++++++++++++-----------
drivers/usb/host/xhci-mtk.h | 2 ++
2 files changed, 62 insertions(+), 19 deletions(-)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index d60463c..e5caabe 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -221,6 +221,44 @@ static int xhci_mtk_ssusb_config(struct xhci_hcd_mtk *mtk)
return xhci_mtk_host_enable(mtk);
}
+/* ignore the error if the clock does not exist */
+static struct clk *optional_clk_get(struct device *dev, const char *id)
+{
+ struct clk *opt_clk;
+
+ opt_clk = devm_clk_get(dev, id);
+ /* ignore error number except EPROBE_DEFER */
+ if (IS_ERR(opt_clk) && (PTR_ERR(opt_clk) != -EPROBE_DEFER))
+ opt_clk = NULL;
+
+ return opt_clk;
+}
+
+static int xhci_mtk_clks_get(struct xhci_hcd_mtk *mtk)
+{
+ struct device *dev = mtk->dev;
+
+ mtk->sys_clk = devm_clk_get(dev, "sys_ck");
+ if (IS_ERR(mtk->sys_clk)) {
+ dev_err(dev, "fail to get sys_ck\n");
+ return PTR_ERR(mtk->sys_clk);
+ }
+
+ mtk->ref_clk = optional_clk_get(dev, "ref_ck");
+ if (IS_ERR(mtk->ref_clk))
+ return PTR_ERR(mtk->ref_clk);
+
+ mtk->mcu_clk = optional_clk_get(dev, "mcu_ck");
+ if (IS_ERR(mtk->mcu_clk))
+ return PTR_ERR(mtk->mcu_clk);
+
+ mtk->dma_clk = optional_clk_get(dev, "dma_ck");
+ if (IS_ERR(mtk->dma_clk))
+ return PTR_ERR(mtk->dma_clk);
+
+ return 0;
+}
+
static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
{
int ret;
@@ -237,16 +275,34 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
goto sys_clk_err;
}
+ ret = clk_prepare_enable(mtk->mcu_clk);
+ if (ret) {
+ dev_err(mtk->dev, "failed to enable mcu_clk\n");
+ goto mcu_clk_err;
+ }
+
+ ret = clk_prepare_enable(mtk->dma_clk);
+ if (ret) {
+ dev_err(mtk->dev, "failed to enable dma_clk\n");
+ goto dma_clk_err;
+ }
+
return 0;
+dma_clk_err:
+ clk_disable_unprepare(mtk->mcu_clk);
+mcu_clk_err:
+ clk_disable_unprepare(mtk->sys_clk);
sys_clk_err:
clk_disable_unprepare(mtk->ref_clk);
ref_clk_err:
- return -EINVAL;
+ return ret;
}
static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk)
{
+ clk_disable_unprepare(mtk->dma_clk);
+ clk_disable_unprepare(mtk->mcu_clk);
clk_disable_unprepare(mtk->sys_clk);
clk_disable_unprepare(mtk->ref_clk);
}
@@ -529,24 +585,9 @@ static int xhci_mtk_probe(struct platform_device *pdev)
return PTR_ERR(mtk->vusb33);
}
- mtk->sys_clk = devm_clk_get(dev, "sys_ck");
- if (IS_ERR(mtk->sys_clk)) {
- dev_err(dev, "fail to get sys_ck\n");
- return PTR_ERR(mtk->sys_clk);
- }
-
- /*
- * reference clock is usually a "fixed-clock", make it optional
- * for backward compatibility and ignore the error if it does
- * not exist.
- */
- mtk->ref_clk = devm_clk_get(dev, "ref_ck");
- if (IS_ERR(mtk->ref_clk)) {
- if (PTR_ERR(mtk->ref_clk) == -EPROBE_DEFER)
- return -EPROBE_DEFER;
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 7/9] usb: host: modify description for MTK xHCI config
2017-10-13 8:26 [PATCH v2 1/9] usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function Chunfeng Yun
` (2 preceding siblings ...)
2017-10-13 8:26 ` [PATCH v2 5/9] usb: xhci-mtk: remove dummy wakeup debounce clocks Chunfeng Yun
@ 2017-10-13 8:26 ` Chunfeng Yun
2017-10-13 10:32 ` Mathias Nyman
[not found] ` <994382d16d6bdc0f3d7c11b22f1710252e056e34.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
4 siblings, 1 reply; 17+ messages in thread
From: Chunfeng Yun @ 2017-10-13 8:26 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi, Rob Herring
Cc: Matthias Brugger, Mark Rutland, Ian Campbell, Chunfeng Yun,
linux-kernel, linux-arm-kernel, linux-usb, linux-mediatek,
devicetree
Due to all MediaTek SoCs with xHCI host controller use this
driver, remove limitation for specific SoCs
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/host/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index fa5692d..bc09a2e 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -45,12 +45,12 @@ config USB_XHCI_PLATFORM
If unsure, say N.
config USB_XHCI_MTK
- tristate "xHCI support for Mediatek MT65xx/MT7621"
+ tristate "xHCI support for MediaTek SoCs"
select MFD_SYSCON
depends on (MIPS && SOC_MT7621) || ARCH_MEDIATEK || COMPILE_TEST
---help---
Say 'Y' to enable the support for the xHCI host controller
- found in Mediatek MT65xx SoCs.
+ found in MediaTek SoCs.
If unsure, say N.
config USB_XHCI_MVEBU
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 8/9] dt-bindings: usb: mtk-xhci: add a optional property to disable u3ports
[not found] ` <994382d16d6bdc0f3d7c11b22f1710252e056e34.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-10-13 8:26 ` [PATCH v2 4/9] usb: xhci-mtk: support option to disable usb3 ports Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 6/9] usb: xhci-mtk: add optional mcu and dma bus clocks Chunfeng Yun
@ 2017-10-13 8:26 ` Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 9/9] dt-bindings: usb: mtk-xhci: remove dummy clocks and add optional ones Chunfeng Yun
3 siblings, 0 replies; 17+ messages in thread
From: Chunfeng Yun @ 2017-10-13 8:26 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi, Rob Herring
Cc: Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, Ian Campbell,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Chunfeng Yun,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Matthias Brugger,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Add a new optional property to disable u3ports
Signed-off-by: Chunfeng Yun <chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
---
.../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
index 5611a2e..2d9b459 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -38,6 +38,8 @@ Optional properties:
mode;
- mediatek,syscon-wakeup : phandle to syscon used to access USB wakeup
control register, it depends on "mediatek,wakeup-src".
+ - mediatek,u3p-dis-msk : mask to disable u3ports, bit0 for u3port0,
+ bit1 for u3port1, ... etc;
- vbus-supply : reference to the VBUS regulator;
- usb3-lpm-capable : supports USB3.0 LPM
- pinctrl-names : a pinctrl state named "default" must be defined
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 9/9] dt-bindings: usb: mtk-xhci: remove dummy clocks and add optional ones
[not found] ` <994382d16d6bdc0f3d7c11b22f1710252e056e34.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
` (2 preceding siblings ...)
2017-10-13 8:26 ` [PATCH v2 8/9] dt-bindings: usb: mtk-xhci: add a optional property to disable u3ports Chunfeng Yun
@ 2017-10-13 8:26 ` Chunfeng Yun
[not found] ` <6a5d01f35d7df6a49d0442c8326c3daa9bcda9d3.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
3 siblings, 1 reply; 17+ messages in thread
From: Chunfeng Yun @ 2017-10-13 8:26 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi, Rob Herring
Cc: Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, Ian Campbell,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Chunfeng Yun,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Matthias Brugger,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Remove dummy clocks for usb wakeup and add optional ones for
MCU_BUS_CK and DMA_BUS_CK.
Signed-off-by: Chunfeng Yun <chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
.../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
index 2d9b459..3059596 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -26,10 +26,11 @@ Required properties:
- clocks : a list of phandle + clock-specifier pairs, one for each
entry in clock-names
- clock-names : must contain
- "sys_ck": for clock of xHCI MAC
- "ref_ck": for reference clock of xHCI MAC
- "wakeup_deb_p0": for USB wakeup debounce clock of port0
- "wakeup_deb_p1": for USB wakeup debounce clock of port1
+ "sys_ck": controller clock used by normal mode,
+ the following ones are optional:
+ "ref_ck": reference clock used by low power mode etc,
+ "mcu_ck": mcu_bus clock for register access,
+ "dma_ck": dma_bus clock for data transfer by DMA
- phys : a list of phandle + phy specifier pairs
@@ -57,9 +58,7 @@ usb30: usb@11270000 {
clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>,
<&pericfg CLK_PERI_USB0>,
<&pericfg CLK_PERI_USB1>;
- clock-names = "sys_ck", "ref_ck",
- "wakeup_deb_p0",
- "wakeup_deb_p1";
+ clock-names = "sys_ck", "ref_ck";
phys = <&phy_port0 PHY_TYPE_USB3>,
<&phy_port1 PHY_TYPE_USB2>;
vusb33-supply = <&mt6397_vusb_reg>;
@@ -91,9 +90,8 @@ Required properties:
- clocks : a list of phandle + clock-specifier pairs, one for each
entry in clock-names
- - clock-names : must be
- "sys_ck": for clock of xHCI MAC
- "ref_ck": for reference clock of xHCI MAC
+ - clock-names : must contain "sys_ck", and the following ones are optional:
+ "ref_ck", "mcu_ck" and "dma_ck"
Optional properties:
- vbus-supply : reference to the VBUS regulator;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 7/9] usb: host: modify description for MTK xHCI config
2017-10-13 8:26 ` [PATCH v2 7/9] usb: host: modify description for MTK xHCI config Chunfeng Yun
@ 2017-10-13 10:32 ` Mathias Nyman
2017-10-16 3:25 ` Chunfeng Yun
2017-10-17 10:20 ` Greg Kroah-Hartman
0 siblings, 2 replies; 17+ messages in thread
From: Mathias Nyman @ 2017-10-13 10:32 UTC (permalink / raw)
To: Chunfeng Yun, Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi,
Rob Herring
Cc: Matthias Brugger, Mark Rutland, Ian Campbell, linux-kernel,
linux-arm-kernel, linux-usb, linux-mediatek, devicetree
On 13.10.2017 11:26, Chunfeng Yun wrote:
> Due to all MediaTek SoCs with xHCI host controller use this
> driver, remove limitation for specific SoCs
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
xHCI parts of series look good to me, If Rob Herring agrees with the
dt changes I can send it forward
-Mathias
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 5/9] usb: xhci-mtk: remove dummy wakeup debounce clocks
[not found] ` <ff9ee49a872084b4fc8c7fbabddc820058acb9b7.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
@ 2017-10-13 13:49 ` Matthias Brugger
0 siblings, 0 replies; 17+ messages in thread
From: Matthias Brugger @ 2017-10-13 13:49 UTC (permalink / raw)
To: Chunfeng Yun, Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi,
Rob Herring
Cc: Mark Rutland, Ian Campbell, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
On 10/13/2017 10:26 AM, Chunfeng Yun wrote:
> The wakeup debounce clocks for each ports in fact are not
> needed, so remove them.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> ---
Reviewed-by: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> drivers/usb/host/xhci-mtk.c | 33 ---------------------------------
> drivers/usb/host/xhci-mtk.h | 2 --
> 2 files changed, 35 deletions(-)
>
> diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
> index 97ba51e..d60463c 100644
> --- a/drivers/usb/host/xhci-mtk.c
> +++ b/drivers/usb/host/xhci-mtk.c
> @@ -237,25 +237,8 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
> goto sys_clk_err;
> }
>
> - if (mtk->wakeup_src) {
> - ret = clk_prepare_enable(mtk->wk_deb_p0);
> - if (ret) {
> - dev_err(mtk->dev, "failed to enable wk_deb_p0\n");
> - goto usb_p0_err;
> - }
> -
> - ret = clk_prepare_enable(mtk->wk_deb_p1);
> - if (ret) {
> - dev_err(mtk->dev, "failed to enable wk_deb_p1\n");
> - goto usb_p1_err;
> - }
> - }
> return 0;
>
> -usb_p1_err:
> - clk_disable_unprepare(mtk->wk_deb_p0);
> -usb_p0_err:
> - clk_disable_unprepare(mtk->sys_clk);
> sys_clk_err:
> clk_disable_unprepare(mtk->ref_clk);
> ref_clk_err:
> @@ -264,10 +247,6 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
>
> static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk)
> {
> - if (mtk->wakeup_src) {
> - clk_disable_unprepare(mtk->wk_deb_p1);
> - clk_disable_unprepare(mtk->wk_deb_p0);
> - }
> clk_disable_unprepare(mtk->sys_clk);
> clk_disable_unprepare(mtk->ref_clk);
> }
> @@ -371,18 +350,6 @@ static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
> if (!mtk->wakeup_src)
> return 0;
>
> - mtk->wk_deb_p0 = devm_clk_get(dev, "wakeup_deb_p0");
> - if (IS_ERR(mtk->wk_deb_p0)) {
> - dev_err(dev, "fail to get wakeup_deb_p0\n");
> - return PTR_ERR(mtk->wk_deb_p0);
> - }
> -
> - mtk->wk_deb_p1 = devm_clk_get(dev, "wakeup_deb_p1");
> - if (IS_ERR(mtk->wk_deb_p1)) {
> - dev_err(dev, "fail to get wakeup_deb_p1\n");
> - return PTR_ERR(mtk->wk_deb_p1);
> - }
> -
> mtk->pericfg = syscon_regmap_lookup_by_phandle(dn,
> "mediatek,syscon-wakeup");
> if (IS_ERR(mtk->pericfg)) {
> diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
> index db55a12..67783a7 100644
> --- a/drivers/usb/host/xhci-mtk.h
> +++ b/drivers/usb/host/xhci-mtk.h
> @@ -126,8 +126,6 @@ struct xhci_hcd_mtk {
> struct regulator *vbus;
> struct clk *sys_clk; /* sys and mac clock */
> struct clk *ref_clk;
> - struct clk *wk_deb_p0; /* port0's wakeup debounce clock */
> - struct clk *wk_deb_p1;
> struct regmap *pericfg;
> struct phy **phys;
> int num_phys;
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 6/9] usb: xhci-mtk: add optional mcu and dma bus clocks
2017-10-13 8:26 ` [PATCH v2 6/9] usb: xhci-mtk: add optional mcu and dma bus clocks Chunfeng Yun
@ 2017-10-13 13:55 ` Matthias Brugger
0 siblings, 0 replies; 17+ messages in thread
From: Matthias Brugger @ 2017-10-13 13:55 UTC (permalink / raw)
To: Chunfeng Yun, Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi,
Rob Herring
Cc: Mark Rutland, Ian Campbell, linux-kernel, linux-arm-kernel,
linux-usb, linux-mediatek, devicetree
On 10/13/2017 10:26 AM, Chunfeng Yun wrote:
> There are mcu_bus and dma_bus clocks needed to be controlled by
> driver on some SoCs, so add them as optional ones
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> drivers/usb/host/xhci-mtk.c | 79 ++++++++++++++++++++++++++++++++-----------
> drivers/usb/host/xhci-mtk.h | 2 ++
> 2 files changed, 62 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
> index d60463c..e5caabe 100644
> --- a/drivers/usb/host/xhci-mtk.c
> +++ b/drivers/usb/host/xhci-mtk.c
> @@ -221,6 +221,44 @@ static int xhci_mtk_ssusb_config(struct xhci_hcd_mtk *mtk)
> return xhci_mtk_host_enable(mtk);
> }
>
> +/* ignore the error if the clock does not exist */
> +static struct clk *optional_clk_get(struct device *dev, const char *id)
> +{
> + struct clk *opt_clk;
> +
> + opt_clk = devm_clk_get(dev, id);
> + /* ignore error number except EPROBE_DEFER */
> + if (IS_ERR(opt_clk) && (PTR_ERR(opt_clk) != -EPROBE_DEFER))
> + opt_clk = NULL;
> +
> + return opt_clk;
> +}
> +
> +static int xhci_mtk_clks_get(struct xhci_hcd_mtk *mtk)
> +{
> + struct device *dev = mtk->dev;
> +
> + mtk->sys_clk = devm_clk_get(dev, "sys_ck");
> + if (IS_ERR(mtk->sys_clk)) {
> + dev_err(dev, "fail to get sys_ck\n");
> + return PTR_ERR(mtk->sys_clk);
> + }
> +
> + mtk->ref_clk = optional_clk_get(dev, "ref_ck");
> + if (IS_ERR(mtk->ref_clk))
> + return PTR_ERR(mtk->ref_clk);
> +
> + mtk->mcu_clk = optional_clk_get(dev, "mcu_ck");
> + if (IS_ERR(mtk->mcu_clk))
> + return PTR_ERR(mtk->mcu_clk);
> +
> + mtk->dma_clk = optional_clk_get(dev, "dma_ck");
> + if (IS_ERR(mtk->dma_clk))
> + return PTR_ERR(mtk->dma_clk);
> +
> + return 0;
> +}
> +
> static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
> {
> int ret;
> @@ -237,16 +275,34 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
> goto sys_clk_err;
> }
>
> + ret = clk_prepare_enable(mtk->mcu_clk);
> + if (ret) {
> + dev_err(mtk->dev, "failed to enable mcu_clk\n");
> + goto mcu_clk_err;
> + }
> +
> + ret = clk_prepare_enable(mtk->dma_clk);
> + if (ret) {
> + dev_err(mtk->dev, "failed to enable dma_clk\n");
> + goto dma_clk_err;
> + }
> +
> return 0;
>
> +dma_clk_err:
> + clk_disable_unprepare(mtk->mcu_clk);
> +mcu_clk_err:
> + clk_disable_unprepare(mtk->sys_clk);
> sys_clk_err:
> clk_disable_unprepare(mtk->ref_clk);
> ref_clk_err:
> - return -EINVAL;
> + return ret;
> }
>
> static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk)
> {
> + clk_disable_unprepare(mtk->dma_clk);
> + clk_disable_unprepare(mtk->mcu_clk);
> clk_disable_unprepare(mtk->sys_clk);
> clk_disable_unprepare(mtk->ref_clk);
> }
> @@ -529,24 +585,9 @@ static int xhci_mtk_probe(struct platform_device *pdev)
> return PTR_ERR(mtk->vusb33);
> }
>
> - mtk->sys_clk = devm_clk_get(dev, "sys_ck");
> - if (IS_ERR(mtk->sys_clk)) {
> - dev_err(dev, "fail to get sys_ck\n");
> - return PTR_ERR(mtk->sys_clk);
> - }
> -
> - /*
> - * reference clock is usually a "fixed-clock", make it optional
> - * for backward compatibility and ignore the error if it does
> - * not exist.
> - */
> - mtk->ref_clk = devm_clk_get(dev, "ref_ck");
> - if (IS_ERR(mtk->ref_clk)) {
> - if (PTR_ERR(mtk->ref_clk) == -EPROBE_DEFER)
> - return -EPROBE_DEFER;
> -
> - mtk->ref_clk = NULL;
> - }
> + ret = xhci_mtk_clks_get(mtk);
> + if (ret)
> + return ret;
>
> mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable");
> /* optional property, ignore the error if it does not exist */
> diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
> index 67783a7..45ff5c6 100644
> --- a/drivers/usb/host/xhci-mtk.h
> +++ b/drivers/usb/host/xhci-mtk.h
> @@ -126,6 +126,8 @@ struct xhci_hcd_mtk {
> struct regulator *vbus;
> struct clk *sys_clk; /* sys and mac clock */
> struct clk *ref_clk;
> + struct clk *mcu_clk;
> + struct clk *dma_clk;
> struct regmap *pericfg;
> struct phy **phys;
> int num_phys;
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 9/9] dt-bindings: usb: mtk-xhci: remove dummy clocks and add optional ones
[not found] ` <6a5d01f35d7df6a49d0442c8326c3daa9bcda9d3.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
@ 2017-10-13 13:56 ` Matthias Brugger
0 siblings, 0 replies; 17+ messages in thread
From: Matthias Brugger @ 2017-10-13 13:56 UTC (permalink / raw)
To: Chunfeng Yun, Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi,
Rob Herring
Cc: Mark Rutland, Ian Campbell, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
On 10/13/2017 10:26 AM, Chunfeng Yun wrote:
> Remove dummy clocks for usb wakeup and add optional ones for
> MCU_BUS_CK and DMA_BUS_CK.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
Reviewed-by: <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> .../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 18 ++++++++----------
> 1 file changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
> index 2d9b459..3059596 100644
> --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
> +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
> @@ -26,10 +26,11 @@ Required properties:
> - clocks : a list of phandle + clock-specifier pairs, one for each
> entry in clock-names
> - clock-names : must contain
> - "sys_ck": for clock of xHCI MAC
> - "ref_ck": for reference clock of xHCI MAC
> - "wakeup_deb_p0": for USB wakeup debounce clock of port0
> - "wakeup_deb_p1": for USB wakeup debounce clock of port1
> + "sys_ck": controller clock used by normal mode,
> + the following ones are optional:
> + "ref_ck": reference clock used by low power mode etc,
> + "mcu_ck": mcu_bus clock for register access,
> + "dma_ck": dma_bus clock for data transfer by DMA
>
> - phys : a list of phandle + phy specifier pairs
>
> @@ -57,9 +58,7 @@ usb30: usb@11270000 {
> clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>,
> <&pericfg CLK_PERI_USB0>,
> <&pericfg CLK_PERI_USB1>;
> - clock-names = "sys_ck", "ref_ck",
> - "wakeup_deb_p0",
> - "wakeup_deb_p1";
> + clock-names = "sys_ck", "ref_ck";
> phys = <&phy_port0 PHY_TYPE_USB3>,
> <&phy_port1 PHY_TYPE_USB2>;
> vusb33-supply = <&mt6397_vusb_reg>;
> @@ -91,9 +90,8 @@ Required properties:
>
> - clocks : a list of phandle + clock-specifier pairs, one for each
> entry in clock-names
> - - clock-names : must be
> - "sys_ck": for clock of xHCI MAC
> - "ref_ck": for reference clock of xHCI MAC
> + - clock-names : must contain "sys_ck", and the following ones are optional:
> + "ref_ck", "mcu_ck" and "dma_ck"
>
> Optional properties:
> - vbus-supply : reference to the VBUS regulator;
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 7/9] usb: host: modify description for MTK xHCI config
2017-10-13 10:32 ` Mathias Nyman
@ 2017-10-16 3:25 ` Chunfeng Yun
2017-10-17 10:20 ` Greg Kroah-Hartman
1 sibling, 0 replies; 17+ messages in thread
From: Chunfeng Yun @ 2017-10-16 3:25 UTC (permalink / raw)
To: Mathias Nyman
Cc: Mathias Nyman, Greg Kroah-Hartman, Felipe Balbi, Rob Herring,
Matthias Brugger, Mark Rutland, Ian Campbell, linux-kernel,
linux-arm-kernel, linux-usb, linux-mediatek, devicetree
On Fri, 2017-10-13 at 13:32 +0300, Mathias Nyman wrote:
> On 13.10.2017 11:26, Chunfeng Yun wrote:
> > Due to all MediaTek SoCs with xHCI host controller use this
> > driver, remove limitation for specific SoCs
> >
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
>
> xHCI parts of series look good to me, If Rob Herring agrees with the
> dt changes I can send it forward
Thanks a lot
>
> -Mathias
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 7/9] usb: host: modify description for MTK xHCI config
2017-10-13 10:32 ` Mathias Nyman
2017-10-16 3:25 ` Chunfeng Yun
@ 2017-10-17 10:20 ` Greg Kroah-Hartman
2017-10-17 10:42 ` Mathias Nyman
1 sibling, 1 reply; 17+ messages in thread
From: Greg Kroah-Hartman @ 2017-10-17 10:20 UTC (permalink / raw)
To: Mathias Nyman
Cc: Chunfeng Yun, Mathias Nyman, Felipe Balbi, Rob Herring,
Matthias Brugger, Mark Rutland, Ian Campbell, linux-kernel,
linux-arm-kernel, linux-usb, linux-mediatek, devicetree
On Fri, Oct 13, 2017 at 01:32:14PM +0300, Mathias Nyman wrote:
> On 13.10.2017 11:26, Chunfeng Yun wrote:
> > Due to all MediaTek SoCs with xHCI host controller use this
> > driver, remove limitation for specific SoCs
> >
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
>
> xHCI parts of series look good to me, If Rob Herring agrees with the
> dt changes I can send it forward
If you ack them, I can just take the whole series as-is.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 7/9] usb: host: modify description for MTK xHCI config
2017-10-17 10:20 ` Greg Kroah-Hartman
@ 2017-10-17 10:42 ` Mathias Nyman
[not found] ` <59E5DE7F.1040601-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Mathias Nyman @ 2017-10-17 10:42 UTC (permalink / raw)
To: Greg Kroah-Hartman, Mathias Nyman
Cc: Chunfeng Yun, Felipe Balbi, Rob Herring, Matthias Brugger,
Mark Rutland, Ian Campbell, linux-kernel, linux-arm-kernel,
linux-usb, linux-mediatek, devicetree
On 17.10.2017 13:20, Greg Kroah-Hartman wrote:
> On Fri, Oct 13, 2017 at 01:32:14PM +0300, Mathias Nyman wrote:
>> On 13.10.2017 11:26, Chunfeng Yun wrote:
>>> Due to all MediaTek SoCs with xHCI host controller use this
>>> driver, remove limitation for specific SoCs
>>>
>>> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
>>> ---
>>
>> xHCI parts of series look good to me, If Rob Herring agrees with the
>> dt changes I can send it forward
>
> If you ack them, I can just take the whole series as-is.
>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 7/9] usb: host: modify description for MTK xHCI config
[not found] ` <59E5DE7F.1040601-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2017-10-22 3:31 ` Chunfeng Yun
0 siblings, 0 replies; 17+ messages in thread
From: Chunfeng Yun @ 2017-10-22 3:31 UTC (permalink / raw)
Cc: Greg Kroah-Hartman, Mathias Nyman, Felipe Balbi, Rob Herring,
Matthias Brugger, Mark Rutland, Ian Campbell,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
Hi, Greg
On Tue, 2017-10-17 at 13:42 +0300, Mathias Nyman wrote:
> On 17.10.2017 13:20, Greg Kroah-Hartman wrote:
> > On Fri, Oct 13, 2017 at 01:32:14PM +0300, Mathias Nyman wrote:
> >> On 13.10.2017 11:26, Chunfeng Yun wrote:
> >>> Due to all MediaTek SoCs with xHCI host controller use this
> >>> driver, remove limitation for specific SoCs
> >>>
> >>> Signed-off-by: Chunfeng Yun <chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> >>> ---
> >>
> >> xHCI parts of series look good to me, If Rob Herring agrees with the
> >> dt changes I can send it forward
> >
> > If you ack them, I can just take the whole series as-is.
> >
It would be great if you could take this series when you have time.
Thanks a lot
>
> Acked-by: Mathias Nyman <mathias.nyman-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2017-10-22 3:31 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-13 8:26 [PATCH v2 1/9] usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 2/9] usb: xhci-mtk: use ports count from xhci in xhci_mtk_sch_init() Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 3/9] usb: xhci-mtk: check clock stability of U3_MAC Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 5/9] usb: xhci-mtk: remove dummy wakeup debounce clocks Chunfeng Yun
[not found] ` <ff9ee49a872084b4fc8c7fbabddc820058acb9b7.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-10-13 13:49 ` Matthias Brugger
2017-10-13 8:26 ` [PATCH v2 7/9] usb: host: modify description for MTK xHCI config Chunfeng Yun
2017-10-13 10:32 ` Mathias Nyman
2017-10-16 3:25 ` Chunfeng Yun
2017-10-17 10:20 ` Greg Kroah-Hartman
2017-10-17 10:42 ` Mathias Nyman
[not found] ` <59E5DE7F.1040601-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-10-22 3:31 ` Chunfeng Yun
[not found] ` <994382d16d6bdc0f3d7c11b22f1710252e056e34.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-10-13 8:26 ` [PATCH v2 4/9] usb: xhci-mtk: support option to disable usb3 ports Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 6/9] usb: xhci-mtk: add optional mcu and dma bus clocks Chunfeng Yun
2017-10-13 13:55 ` Matthias Brugger
2017-10-13 8:26 ` [PATCH v2 8/9] dt-bindings: usb: mtk-xhci: add a optional property to disable u3ports Chunfeng Yun
2017-10-13 8:26 ` [PATCH v2 9/9] dt-bindings: usb: mtk-xhci: remove dummy clocks and add optional ones Chunfeng Yun
[not found] ` <6a5d01f35d7df6a49d0442c8326c3daa9bcda9d3.1507882470.git.chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-10-13 13:56 ` Matthias Brugger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).