dt-bindings: usb: mtk-xhci: add compatible for mt8195
Subsystems (5)
Chunfeng Yun
maintainerRFC PATCH v2 1/3 dt-bindings: usb: mtk-xhci: add compatible for mt8195
There are 4 USB controllers on MT8195, the controllers (IP1~IP3, exclude IP0) have a wrong default SOF/ITP interval which is calculated from the frame counter clock 24Mhz by default, but in fact, the frame counter clock is 48Mhz, so we should set the accurate interval according to 48Mhz. Here add a new compatible for MT8195, it's also supported in driver. But the first controller (IP0) has no such issue, we prefer to use generic compatible, e.g. mt8192's compatible.
---
v2: no changes
--- Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt +1 -0
@@ -16,6 +16,7 @@ Required properties: "mediatek,mtk-xhci" compatible string, you need SoC specific ones in addition, one of: - "mediatek,mt8173-xhci" + - "mediatek,mt8195-xhci" - reg : specifies physical base address and size of the registers - reg-names: should be "mac" for xHCI MAC and "ippc" for IP port control - interrupts : interrupt used by the controller
Signature · 5 lines
2.18.0 _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
Chunfeng Yun
maintainerRFC PATCH v2 2/3 usb: xhci-mtk: modify the SOF/ITP interval for mt8195
There are 4 USB controllers on MT8195, the controllers (IP1~IP3, exclude IP0) have a wrong default SOF/ITP interval which is calculated from the frame counter clock 24Mhz by default, but in fact, the frame counter clock is 48Mhz, so we should set the accurate interval according to 48Mhz for those controllers.
Note: the first controller no need set it.
---
v2: fix typo of comaptible
--- drivers/usb/host/xhci-mtk.c | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+)
drivers/usb/host/xhci-mtk.c +63 -0
@@ -68,11 +68,71 @@#define SSC_IP_SLEEP_EN BIT(4)#define SSC_SPM_INT_EN BIT(1) +/* xHCI csr */ +#define LS_EOF 0x930 +#define LS_EOF_OFFSET 0x89 + +#define FS_EOF 0x934 +#define FS_EOF_OFFSET 0x2e + +#define SS_GEN1_EOF 0x93c +#define SS_GEN1_EOF_OFFSET 0x78 + +#define HFCNTR_CFG 0x944 +#define ITP_DELTA_CLK (0xa << 1) +#define ITP_DELTA_CLK_MASK GENMASK(5, 1) +#define FRMCNT_LEV1_RANG (0x12b << 8) +#define FRMCNT_LEV1_RANG_MASK GENMASK(19, 8) + +#define SS_GEN2_EOF 0x990 +#define SS_GEN2_EOF_OFFSET 0x3c +#define EOF_OFFSET_MASK GENMASK(11, 0) +enum ssusb_uwk_vers {SSUSB_UWK_V1 =1 ,SSUSB_UWK_V2 , }; +/* +* MT8195 has 4 controllers, the controller1~3's default SOF/ITP interval +* is calculated from the frame counter clock 24M, but in fact, the clock +* is 48M, so need change the interval. +*/ +static void xhci_mtk_set_frame_interval (struct xhci_hcd_mtk *mtk) +{ +struct device *dev = mtk->dev; +struct usb_hcd *hcd = mtk->hcd; +u32 value; + +if (!of_device_is_compatible (dev->of_node,"mediatek,mt8195-xhci" )) +return ; + + value =readl (hcd->regs +HFCNTR_CFG ); + value &= ~(ITP_DELTA_CLK_MASK |FRMCNT_LEV1_RANG_MASK ); + value |= (ITP_DELTA_CLK |FRMCNT_LEV1_RANG ); +writel (value, hcd->regs +HFCNTR_CFG ); + + value =readl (hcd->regs +LS_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=LS_EOF_OFFSET ; +writel (value, hcd->regs +LS_EOF ); + + value =readl (hcd->regs +FS_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=FS_EOF_OFFSET ; +writel (value, hcd->regs +FS_EOF ); + + value =readl (hcd->regs +SS_GEN1_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=SS_GEN1_EOF_OFFSET ; +writel (value, hcd->regs +SS_GEN1_EOF ); + + value =readl (hcd->regs +SS_GEN2_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=SS_GEN2_EOF_OFFSET ; +writel (value, hcd->regs +SS_GEN2_EOF ); +} +static int xhci_mtk_host_enable (struct xhci_hcd_mtk *mtk) {struct mu3c_ippc_regs __iomem *ippc = mtk->ippc_regs;
@@ -407,6 +467,8 @@ static int xhci_mtk_setup(struct usb_hcd *hcd) ret =xhci_mtk_ssusb_config (mtk);if (ret)return ret; + +xhci_mtk_set_frame_interval (mtk); } ret =xhci_gen_setup (hcd, xhci_mtk_quirks);
@@ -655,6 +717,7 @@ static const struct dev_pm_ops xhci_mtk_pm_ops = {#ifdef CONFIG_OF static const struct of_device_id mtk_xhci_of_match[] = { { .compatible ="mediatek,mt8173-xhci" }, + { .compatible ="mediatek,mt8195-xhci" }, { .compatible ="mediatek,mtk-xhci" }, { }, };
Signature · 5 lines
2.18.0 _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
Chunfeng Yun
maintainerRe: [RFC PATCH v2 2/3] usb: xhci-mtk: modify the SOF/ITP interval for mt8195
Hi Mathias,
Quoted 19 lines · Chunfeng Yun
There are 4 USB controllers on MT8195, the controllers (IP1~IP3, exclude IP0) have a wrong default SOF/ITP interval which is calculated from the frame counter clock 24Mhz by default, but in fact, the frame counter clock is 48Mhz, so we should set the accurate interval according to 48Mhz for those controllers.
Note: the first controller no need set it.Signed-off-by Chunfeng Yun <[email protected]>---
v2: fix typo of comaptible--- drivers/usb/host/xhci-mtk.c | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+)drivers/usb/host/xhci-mtk.c +0
-0
drivers/usb/host/xhci-mtk.c line 70
Quoted 3 lines
drivers/usb/host/xhci-mtk.c +0
-0@@ -68,11 +68,71 @@#define SSC_IP_SLEEP_EN BIT(4)#define SSC_SPM_INT_EN BIT(1)
Can I Read/Write the following xHCI controller's registers in xhci-mtk.c?
Ideally, xhci-mtk.c should not access them, because xhci-mtk is only a glue driver used to initialize clocks/power and IPPC registers which don't belong to xHCI controller.
Thanks
Quoted 78 lines
drivers/usb/host/xhci-mtk.c +62
-0+/* xHCI csr */ +#define LS_EOF 0x930 +#define LS_EOF_OFFSET 0x89 + +#define FS_EOF 0x934 +#define FS_EOF_OFFSET 0x2e + +#define SS_GEN1_EOF 0x93c +#define SS_GEN1_EOF_OFFSET 0x78 + +#define HFCNTR_CFG 0x944 +#define ITP_DELTA_CLK (0xa << 1) +#define ITP_DELTA_CLK_MASK GENMASK(5, 1) +#define FRMCNT_LEV1_RANG (0x12b << 8) +#define FRMCNT_LEV1_RANG_MASK GENMASK(19, 8) + +#define SS_GEN2_EOF 0x990 +#define SS_GEN2_EOF_OFFSET 0x3c +#define EOF_OFFSET_MASK GENMASK(11, 0) +enum ssusb_uwk_vers {SSUSB_UWK_V1 =1 ,SSUSB_UWK_V2 , }; +/* +* MT8195 has 4 controllers, the controller1~3's default SOF/ITP interval +* is calculated from the frame counter clock 24M, but in fact, the clock +* is 48M, so need change the interval. +*/ +static void xhci_mtk_set_frame_interval (struct xhci_hcd_mtk *mtk) +{ +struct device *dev = mtk->dev; +struct usb_hcd *hcd = mtk->hcd; +u32 value; + +if (!of_device_is_compatible (dev->of_node,"mediatek,mt8195-xhci" )) +return ; + + value =readl (hcd->regs +HFCNTR_CFG ); + value &= ~(ITP_DELTA_CLK_MASK |FRMCNT_LEV1_RANG_MASK ); + value |= (ITP_DELTA_CLK |FRMCNT_LEV1_RANG ); +writel (value, hcd->regs +HFCNTR_CFG ); + + value =readl (hcd->regs +LS_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=LS_EOF_OFFSET ; +writel (value, hcd->regs +LS_EOF ); + + value =readl (hcd->regs +FS_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=FS_EOF_OFFSET ; +writel (value, hcd->regs +FS_EOF ); + + value =readl (hcd->regs +SS_GEN1_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=SS_GEN1_EOF_OFFSET ; +writel (value, hcd->regs +SS_GEN1_EOF ); + + value =readl (hcd->regs +SS_GEN2_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=SS_GEN2_EOF_OFFSET ; +writel (value, hcd->regs +SS_GEN2_EOF ); +} +static int xhci_mtk_host_enable (struct xhci_hcd_mtk *mtk) {struct mu3c_ippc_regs __iomem *ippc = mtk->ippc_regs;@@ -407,6 +467,8 @@ static int xhci_mtk_setup(struct usb_hcd *hcd) ret =xhci_mtk_ssusb_config (mtk);if (ret)return ret; + +xhci_mtk_set_frame_interval (mtk); } ret =xhci_gen_setup (hcd, xhci_mtk_quirks);
drivers/usb/host/xhci-mtk.c static const struct dev_pm_ops xhci_mtk_pm_ops = { · line 723
Quoted 7 lines
drivers/usb/host/xhci-mtk.c +1
-0@@ -655,6 +717,7 @@ static const struct dev_pm_ops xhci_mtk_pm_ops = {#ifdef CONFIG_OF static const struct of_device_id mtk_xhci_of_match[] = { { .compatible ="mediatek,mt8173-xhci" }, + { .compatible ="mediatek,mt8195-xhci" }, { .compatible ="mediatek,mtk-xhci" }, { }, };
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Re: [RFC PATCH v2 2/3] usb: xhci-mtk: modify the SOF/ITP interval for mt8195
Quoted 28 lines · Chunfeng Yun
Hi Mathias,
Quoted 19 lines · Chunfeng Yun
There are 4 USB controllers on MT8195, the controllers (IP1~IP3, exclude IP0) have a wrong default SOF/ITP interval which is calculated from the frame counter clock 24Mhz by default, but in fact, the frame counter clock is 48Mhz, so we should set the accurate interval according to 48Mhz for those controllers.
Note: the first controller no need set it.Signed-off-by Chunfeng Yun <[email protected]>---
v2: fix typo of comaptible--- drivers/usb/host/xhci-mtk.c | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+)drivers/usb/host/xhci-mtk.c +0
-0drivers/usb/host/xhci-mtk.c line 70
Quoted 3 lines
drivers/usb/host/xhci-mtk.c +0
-0@@ -68,11 +68,71 @@#define SSC_IP_SLEEP_EN BIT(4)#define SSC_SPM_INT_EN BIT(1)Can I Read/Write the following xHCI controller's registers in
xhci-mtk.c?
Quoted 4 lines
Ideally,
xhci-mtk.cshould not access them, because xhci-mtk is only a glue driver used to initialize clocks/power and IPPC registers which don't belong to xHCI controller.
These *_EOF registers look like they are Mediatek vendor specific registers and not part of public xHCI register-level spec.
So I think accessing them from xhci-mtk.c makes sense.
If those register offsets are hardcoded like this in the Mediatek spec then this is fine, but if those offsets are found from a vendor specific xHCI extended capability entry (see xhci spec section 7) then we should dig them out from there.
Quoted 55 lines
Quoted 55 lines
drivers/usb/host/xhci-mtk.c +50
-0+/* xHCI csr */ +#define LS_EOF 0x930 +#define LS_EOF_OFFSET 0x89 + +#define FS_EOF 0x934 +#define FS_EOF_OFFSET 0x2e + +#define SS_GEN1_EOF 0x93c +#define SS_GEN1_EOF_OFFSET 0x78 + +#define HFCNTR_CFG 0x944 +#define ITP_DELTA_CLK (0xa << 1) +#define ITP_DELTA_CLK_MASK GENMASK(5, 1) +#define FRMCNT_LEV1_RANG (0x12b << 8) +#define FRMCNT_LEV1_RANG_MASK GENMASK(19, 8) + +#define SS_GEN2_EOF 0x990 +#define SS_GEN2_EOF_OFFSET 0x3c +#define EOF_OFFSET_MASK GENMASK(11, 0) +enum ssusb_uwk_vers {SSUSB_UWK_V1 =1 ,SSUSB_UWK_V2 , }; +/* +* MT8195 has 4 controllers, the controller1~3's default SOF/ITP interval +* is calculated from the frame counter clock 24M, but in fact, the clock +* is 48M, so need change the interval. +*/ +static void xhci_mtk_set_frame_interval (struct xhci_hcd_mtk *mtk) +{ +struct device *dev = mtk->dev; +struct usb_hcd *hcd = mtk->hcd; +u32 value; + +if (!of_device_is_compatible (dev->of_node,"mediatek,mt8195-xhci" )) +return ; + + value =readl (hcd->regs +HFCNTR_CFG ); + value &= ~(ITP_DELTA_CLK_MASK |FRMCNT_LEV1_RANG_MASK ); + value |= (ITP_DELTA_CLK |FRMCNT_LEV1_RANG ); +writel (value, hcd->regs +HFCNTR_CFG ); + + value =readl (hcd->regs +LS_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=LS_EOF_OFFSET ; +writel (value, hcd->regs +LS_EOF ); + + value =readl (hcd->regs +FS_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=FS_EOF_OFFSET ; +writel (value, hcd->regs +FS_EOF ); + + value =readl (hcd->regs +SS_GEN1_EOF );
Quoted 8 lines
drivers/usb/host/xhci-mtk.c line 133
Quoted 8 lines
drivers/usb/host/xhci-mtk.c +8
-0+ value &= ~EOF_OFFSET_MASK ; + value |=SS_GEN1_EOF_OFFSET ; +writel (value, hcd->regs +SS_GEN1_EOF ); + + value =readl (hcd->regs +SS_GEN2_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=SS_GEN2_EOF_OFFSET ; +writel (value, hcd->regs +SS_GEN2_EOF );
Minor nit about names,
Register offsets from MMIO start are named *_EOF while clock multipliers? are named *_EOF_OFFSET. This was a bit confusing
Thanks
-Mathias
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Chunfeng Yun
maintainerRe: [RFC PATCH v2 2/3] usb: xhci-mtk: modify the SOF/ITP interval for mt8195
Quoted 34 lines · Mathias Nyman
Quoted 28 lines · Chunfeng Yun
Hi Mathias,
Quoted 19 lines · Chunfeng Yun
There are 4 USB controllers on MT8195, the controllers (IP1~IP3, exclude IP0) have a wrong default SOF/ITP interval which is calculated from the frame counter clock 24Mhz by default, but in fact, the frame counter clock is 48Mhz, so we should set the accurate interval according to 48Mhz for those controllers.
Note: the first controller no need set it.Signed-off-by Chunfeng Yun <[email protected]>---
v2: fix typo of comaptible--- drivers/usb/host/xhci-mtk.c | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+)drivers/usb/host/xhci-mtk.c +0
-0drivers/usb/host/xhci-mtk.c line 70
Quoted 3 lines
drivers/usb/host/xhci-mtk.c +0
-0@@ -68,11 +68,71 @@#define SSC_IP_SLEEP_EN BIT(4)#define SSC_SPM_INT_EN BIT(1)Can I Read/Write the following xHCI controller's registers in
xhci-mtk.c?Quoted 4 lines
Ideally,
xhci-mtk.cshould not access them, because xhci-mtk is only a glue driver used to initialize clocks/power and IPPC registers which don't belong to xHCI controller.
Quoted 6 lines
These
*_EOFregisters look like they are Mediatek vendor specific registers and not part of public xHCI register-level spec.
So I think accessing them fromxhci-mtk.cmakes sense.If those register offsets are hardcoded like this in the Mediatek spec then this is fine,
Check it with our DE, it's this case.
Quoted 62 lines
but if those offsets are found from a vendor specific xHCI extended capability entry (see xhci spec section 7) then we should dig them out from there.
Quoted 59 lines
Quoted 59 lines
drivers/usb/host/xhci-mtk.c +54
-0+/* xHCI csr */ +#define LS_EOF 0x930 +#define LS_EOF_OFFSET 0x89 + +#define FS_EOF 0x934 +#define FS_EOF_OFFSET 0x2e + +#define SS_GEN1_EOF 0x93c +#define SS_GEN1_EOF_OFFSET 0x78 + +#define HFCNTR_CFG 0x944 +#define ITP_DELTA_CLK (0xa << 1) +#define ITP_DELTA_CLK_MASK GENMASK(5, 1) +#define FRMCNT_LEV1_RANG (0x12b << 8) +#define FRMCNT_LEV1_RANG_MASK GENMASK(19, 8) + +#define SS_GEN2_EOF 0x990 +#define SS_GEN2_EOF_OFFSET 0x3c +#define EOF_OFFSET_MASK GENMASK(11, 0) +enum ssusb_uwk_vers {SSUSB_UWK_V1 =1 ,SSUSB_UWK_V2 , }; +/* +* MT8195 has 4 controllers, the controller1~3's default SOF/ITP interval +* is calculated from the frame counter clock 24M, but in fact, the clock +* is 48M, so need change the interval. +*/ +static void xhci_mtk_set_frame_interval (struct xhci_hcd_mtk *mtk) +{ +struct device *dev = mtk->dev; +struct usb_hcd *hcd = mtk->hcd; +u32 value; + +if (!of_device_is_compatible (dev->of_node,"mediatek,mt8195-xhci" )) +return ; + + value =readl (hcd->regs +HFCNTR_CFG ); + value &= ~(ITP_DELTA_CLK_MASK |FRMCNT_LEV1_RANG_MASK ); + value |= (ITP_DELTA_CLK |FRMCNT_LEV1_RANG ); +writel (value, hcd->regs +HFCNTR_CFG ); + + value =readl (hcd->regs +LS_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=LS_EOF_OFFSET ; +writel (value, hcd->regs +LS_EOF ); + + value =readl (hcd->regs +FS_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=FS_EOF_OFFSET ; +writel (value, hcd->regs +FS_EOF ); + + value =readl (hcd->regs +SS_GEN1_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=SS_GEN1_EOF_OFFSET ; +writel (value, hcd->regs +SS_GEN1_EOF ); +
Quoted 8 lines
Quoted 4 lines
drivers/usb/host/xhci-mtk.c line 133
Quoted 4 lines
drivers/usb/host/xhci-mtk.c +4
-0+ value =readl (hcd->regs +SS_GEN2_EOF ); + value &= ~EOF_OFFSET_MASK ; + value |=SS_GEN2_EOF_OFFSET ; +writel (value, hcd->regs +SS_GEN2_EOF );Minor nit about names,
Register offsets from MMIO start are named*_EOFwhile clock multipliers? are named*_EOF_OFFSET. This was a bit confusing
Good point, the names come from register map docs, I'll modify it, thanks a lot
Quoted 3 lines
Thanks
-Mathias
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Chunfeng Yun
maintainerRFC PATCH v2 3/3 arm64: dts: mt8195: add USB related nodes
In reply to Chunfeng YunAdd USB nodes, PHY nodes and some fixed regulator nodes. We prefer to use mt8192's compatible for the first USB controller (port0), there is no wrong with the SOF/ITP interval; but for other controllers (port1~port3) should use mt8195's one due to the wrong default setting of SOF/ITP interval which should be calculated from 48M, but not 24M by default.
---
v2: no changes
--- arch/arm64/boot/dts/mediatek/mt8195-evb.dts | 70 +++++++++ arch/arm64/boot/dts/mediatek/mt8195.dtsi | 163 ++++++++++++++++++++ 2 files changed, 233 insertions(+)
arch/arm64/boot/dts/mediatek/mt8195-evb.dts +70 -0
@@ -6,6 +6,7 @@ /dts-v1/; #include "mt8195.dtsi" #include "mt6359.dtsi" +#include <dt-bindings/gpio/gpio.h> / { model = "MediaTek MT8195 evaluation board";
@@ -49,6 +50,36 @@ enable-active-high; regulator-always-on; }; + + usb_p0_vbus: regulator@2 { + compatible = "regulator-fixed"; + gpio = <&pio 129 GPIO_ACTIVE_HIGH>; + regulator-name = "vbus0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + regulator-always-on; + }; + + usb_p2_vbus: regulator@3 { + compatible = "regulator-fixed"; + gpio = <&pio 131 GPIO_ACTIVE_HIGH>; + regulator-name = "vbus2"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + regulator-always-on; + }; + + usb_p3_vbus: regulator@4 { + compatible = "regulator-fixed"; + gpio = <&pio 5 GPIO_ACTIVE_HIGH>; + regulator-name = "vbus3"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + regulator-always-on; + }; }; &pmic {
@@ -156,6 +187,22 @@ status = "okay"; }; +&u3phy0 { + status="okay"; +}; + +&u3phy1 { + status = "okay"; +}; + +&u3phy2 { + status="okay"; +}; + +&u3phy3 { + status="okay"; +}; + &pio { nor_pins_default: nordefault { pins0 {
@@ -311,3 +358,26 @@ }; }; + +&xhci0 { + vusb33-supply = <&mt6359_vusb_ldo_reg>; + vbus-supply = <&usb_p0_vbus>; + status = "okay"; +}; + +&xhci1 { + vusb33-supply = <&mt6359_vusb_ldo_reg>; + status = "okay"; +}; + +&xhci2 { + vusb33-supply = <&mt6359_vusb_ldo_reg>; + vbus-supply = <&usb_p2_vbus>; + status = "okay"; +}; + +&xhci3 { + vusb33-supply = <&mt6359_vusb_ldo_reg>; + vbus-supply = <&usb_p3_vbus>; + status = "okay"; +};
arch/arm64/boot/dts/mediatek/mt8195.dtsi +163 -0
187 lines not on this page · raw message
Signature · 5 lines
2.18.0 _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
Greg Kroah-Hartman
maintainerQuoted 9 lines · Chunfeng Yun
There are 4 USB controllers on MT8195, the controllers (IP1~IP3, exclude IP0) have a wrong default SOF/ITP interval which is calculated from the frame counter clock 24Mhz by default, but in fact, the frame counter clock is 48Mhz, so we should set the accurate interval according to 48Mhz. Here add a new compatible for MT8195, it's also supported in driver. But the first controller (IP0) has no such issue, we prefer to use generic compatible, e.g. mt8192's compatible.
Quoted 3 lines
Signed-off-by Chunfeng Yun <[email protected]>---
v2: no changes
Note, I do not apply patches with "RFC" as obviously you do not think they are worthy of being applied. I don't see what you are asking to be done with this set of patches, please explain?
thanks,
greg k-h
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Chunfeng Yun
maintainerQuoted 10 lines · Greg Kroah-Hartman
Quoted 9 lines · Chunfeng Yun
There are 4 USB controllers on MT8195, the controllers (IP1~IP3, exclude IP0) have a wrong default SOF/ITP interval which is calculated from the frame counter clock 24Mhz by default, but in fact, the frame counter clock is 48Mhz, so we should set the accurate interval according to 48Mhz. Here add a new compatible for MT8195, it's also supported in driver. But the first controller (IP0) has no such issue, we prefer to use generic compatible, e.g. mt8192's compatible.
Quoted 7 lines
Quoted 3 lines
Signed-off-by Chunfeng Yun <[email protected]>---
v2: no changesNote, I do not apply patches with "RFC" as obviously you do not think they are worthy of being applied. I don't see what you are asking to be done with this set of patches, please explain?
The DTS patch [2/3] in the series will cause merge conflict, due to the dependent patches are not upstreamed.
Another problem is that I wander to know whether the compatible usage as following is allowed:
arch/arm64/boot/dts/mediatek/mt8195.dtsi
usb@11200000 { // ip0
compatible = "mediatek,mt8192-xhci", // here use mt8192's
compatible, avoid changing SOF/ITP interval for ip0, because it's default value is ok."mediatek,mt8192-xhci" is not supported in driver, so finally will use generic copatible "mediatek,mtk-xhci".
"mediatek,mtk-xhci";
....
};usb@11290000 { // ip1
compatible = "mediatek,mt8195-xhci", // here use mt8195's
compatible, used to change SOF/ITP interval, due the the wrong default
value.
"mediatek,mtk-xhci";};
usb@112a0000 { // ip2
compatible = "mediatek,mt8195-xhci", // same as ip1
"mediatek,mtk-xhci";
};Thank you
Quoted 4 lines
thanks,
greg k-h
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Greg Kroah-Hartman
maintainerQuoted 9 lines · Chunfeng Yun
There are 4 USB controllers on MT8195, the controllers (IP1~IP3, exclude IP0) have a wrong default SOF/ITP interval which is calculated from the frame counter clock 24Mhz by default, but in fact, the frame counter clock is 48Mhz, so we should set the accurate interval according to 48Mhz. Here add a new compatible for MT8195, it's also supported in driver. But the first controller (IP0) has no such issue, we prefer to use generic compatible, e.g. mt8192's compatible.
Quoted 3 lines
Signed-off-by Chunfeng Yun <[email protected]>---
v2: no changes
Note, I do not apply patches that have "RFC" as that means you do not feel comfortable with them being applied.
Please resend without that when you feel they are ready to be merged.
thanks,
greg k-h
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Quoted 9 lines · Chunfeng Yun
There are 4 USB controllers on MT8195, the controllers (IP1~IP3, exclude IP0) have a wrong default SOF/ITP interval which is calculated from the frame counter clock 24Mhz by default, but in fact, the frame counter clock is 48Mhz, so we should set the accurate interval according to 48Mhz. Here add a new compatible for MT8195, it's also supported in driver. But the first controller (IP0) has no such issue, we prefer to use generic compatible, e.g. mt8192's compatible.
Quoted 7 lines
Signed-off-by Chunfeng Yun <[email protected]>---
v2: no changes--- Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 1 + 1 file changed, 1 insertion(+)
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek