Add MediaTek USB3 DRD Driver
Subsystems (8)
Chunfeng Yun
maintainerQuoted 1 line
From
5e3e992dc3c02eda12f5cf984a18a57f0207333dMon Sep 17 00:00:00 2001
From: Chunfeng Yun <[email protected]>
Date: Tue, 10 May 2016 16:04:25 +0800
Subject: [PATCH 0/6] Add MediaTek USB3 DRD Driver
These patches introduce the MediaTek USB3 dual-role controller driver.
The driver can be configured as Dual-Role Device (DRD), Peripheral Only and Host Only (xHCI) modes. It works well with Mass Storage, RNDIS and g_zero on FS/HS and SS. And it is tested on MT8173 platform which only contains USB2.0 device IP, and on MT6290 platform which contains USB3.0 device IP.
Chunfeng Yun (6):
dt-bindings: mt8173-xhci: support host side of dual-role mode
usb: xhci-mtk: make IPPC register optional
dt-bindings: mtu3: add devicetree bindings
usb: Add MediaTek USB3 DRD Driver
arm64: dts: mediatek: add USB3 DRD driver
pinctrl: mt8173: set GPIO16 to usb iddig mode
.../devicetree/bindings/usb/mt8173-xhci.txt | 48 ++ Documentation/devicetree/bindings/usb/mtu3.txt | 86 ++ arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 46 +- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 28 +- drivers/pinctrl/mediatek/pinctrl-mtk-mt8173.h | 2 +- drivers/usb/Kconfig | 2 + drivers/usb/Makefile | 1 + drivers/usb/host/xhci-mtk.c | 32 +- drivers/usb/mtu3/Kconfig | 47 ++ drivers/usb/mtu3/Makefile | 20 + drivers/usb/mtu3/mtu3.h | 422 ++++++++++ drivers/usb/mtu3/mtu3_core.c | 877 +++++++++++++++++++ drivers/usb/mtu3/mtu3_dr.c | 353 ++++++++ drivers/usb/mtu3/mtu3_dr.h | 108 +++ drivers/usb/mtu3/mtu3_gadget.c | 735 ++++++++++++++++ drivers/usb/mtu3/mtu3_gadget_ep0.c | 889 ++++++++++++++++++++ drivers/usb/mtu3/mtu3_host.c | 294 +++++++ drivers/usb/mtu3/mtu3_hw_regs.h | 474 +++++++++++ drivers/usb/mtu3/mtu3_plat.c | 496 +++++++++++ drivers/usb/mtu3/mtu3_qmu.c | 599 +++++++++++++ drivers/usb/mtu3/mtu3_qmu.h | 43 + 21 files changed, 5587 insertions(+), 15 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/mtu3.txt create mode 100644 drivers/usb/mtu3/Kconfig create mode 100644 drivers/usb/mtu3/Makefile create mode 100644 drivers/usb/mtu3/mtu3.h create mode 100644 drivers/usb/mtu3/mtu3_core.c create mode 100644 drivers/usb/mtu3/mtu3_dr.c create mode 100644 drivers/usb/mtu3/mtu3_dr.h create mode 100644 drivers/usb/mtu3/mtu3_gadget.c create mode 100644 drivers/usb/mtu3/mtu3_gadget_ep0.c create mode 100644 drivers/usb/mtu3/mtu3_host.c create mode 100644 drivers/usb/mtu3/mtu3_hw_regs.h create mode 100644 drivers/usb/mtu3/mtu3_plat.c create mode 100644 drivers/usb/mtu3/mtu3_qmu.c create mode 100644 drivers/usb/mtu3/mtu3_qmu.h
Signature · 1 line
1.7.9.5
Chunfeng Yun
maintainerPATCH 1/6 dt-bindings: mt8173-xhci: support host side of dual-role mode
Some resources, such as IPPC register etc, shared with device driver are moved into common glue layer when xHCI driver is the host side of dual-role mode and they should be changed as optional properties if they are required ones before. For clarity, add a new part of binding to support host side of dual-role mode.
Additionally add optional properties of pinctrl for host only mode
--- .../devicetree/bindings/usb/mt8173-xhci.txt | 48 ++++++++++++++++++++ 1 file changed, 48 insertions(+)
Documentation/devicetree/bindings/usb/mt8173-xhci.txt +48 -0
@@ -2,6 +2,14 @@ MT8173 xHCI The device node for Mediatek SOC USB3.0 host controller +There are two scenarios: the first one only supports xHCI driver; +the second one supports dual-role mode, and the host is based on xHCI +driver. Take account of backward compatibility, we divide bindings +into two parts. + +1st: only supports xHCI driver +------------------------------------------------------------------------ + Required properties: - compatible : should contain "mediatek,mt8173-xhci" - reg : specifies physical base address and size of the registers,
@@ -27,6 +35,9 @@ Optional properties: control register, it depends on "mediatek,wakeup-src". - vbus-supply : reference to the VBUS regulator; - usb3-lpm-capable : supports USB3.0 LPM + - pinctl-names : a pinctrl state named "default" must be defined + - pinctrl-0 : pin control group + See: Documentation/devicetree/bindings/pinctrl/pinctrl-binding.txt Example: usb30: usb at 11270000 {
@@ -49,3 +60,40 @@ usb30: usb at 11270000 { mediatek,syscon-wakeup = <&pericfg>; mediatek,wakeup-src = <1>; }; + +2nd: dual-role mode with xHCI driver +------------------------------------------------------------------------ + +In the case, xhci is added as subnode to mtu3. An example and the DT binding +details of mtu3 can be found in: +Documentation/devicetree/bindings/usb/mtu3.txt + +Required properties: + - compatible : should contain "mediatek,mt8173-xhci" + - reg : specifies physical base address and size of the registers, + should be only for xHCI IP registers + - interrupts : interrupt used by the host controller + - power-domains : a phandle to USB power domain node to control USB's + mtcmos + - vusb33-supply : regulator of USB avdd3.3v + + - 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 + +Optional properties: + - vbus-supply : reference to the VBUS regulator; + - usb3-lpm-capable : supports USB3.0 LPM + +Example: +usb30: usb at 11270000 { + compatible = "mediatek,mt8173-xhci"; + reg = <0 0x11270000 0 0x1000>; + interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>; + power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>; + clocks = <&topckgen CLK_TOP_USB30_SEL>; + clock-names = "sys_ck"; + vusb33-supply = <&mt6397_vusb_reg>; + usb3-lpm-capable; +};
Signature · 1 line
1.7.9.5
Chunfeng Yun
maintainerPATCH 2/6 usb: xhci-mtk: make IPPC register optional
In reply to Chunfeng YunMake IPPC register optional to support host side of dual-role mode, due to it is moved into common glue layer for simplification.
--- drivers/usb/host/xhci-mtk.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-)
drivers/usb/host/xhci-mtk.c +27 -5
@@ -94,6 +94,9 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)int ret;int i; +if (ippc ==NULL ) +return 0 ; +/* power on host ip */ value =readl (&ippc->ip_pw_ctr1); value &= ~CTRL1_IP_HOST_PDN ;
@@ -139,6 +142,9 @@ static int xhci_mtk_host_disable(struct xhci_hcd_mtk *mtk)int ret;int i; +if (ippc ==NULL ) +return 0 ; +/* power down all u3 ports */ for (i =0 ; i < mtk->num_u3_ports; i++) { value =readl (&ippc->u3_ctrl_p[i]);
@@ -173,6 +179,9 @@ static int xhci_mtk_ssusb_config(struct xhci_hcd_mtk *mtk)struct mu3c_ippc_regs __iomem *ippc = mtk->ippc_regs;u32 value; +if (ippc ==NULL ) +return 0 ; +/* reset whole ip */ value =readl (&ippc->ip_pw_ctr0); value |=CTRL0_IP_SW_RST ;
@@ -475,6 +484,7 @@ 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;
@@ -482,12 +492,21 @@ static int xhci_mtk_setup(struct usb_hcd *hcd) ret =xhci_mtk_ssusb_config (mtk);if (ret)return ret; + } + + ret =xhci_gen_setup (hcd, xhci_mtk_quirks); +if (ret) +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; } -return xhci_gen_setup (hcd, xhci_mtk_quirks); +return ret; }static int xhci_mtk_probe (struct platform_device *pdev)
@@ -595,11 +614,14 @@ static int xhci_mtk_probe(struct platform_device *pdev) hcd->rsrc_start = res->start; hcd->rsrc_len =resource_size (res); + mtk->ippc_regs =NULL ; res =platform_get_resource (pdev,IORESOURCE_MEM ,1 ); - mtk->ippc_regs =devm_ioremap_resource (dev, res); -if (IS_ERR (mtk->ippc_regs)) { - ret =PTR_ERR (mtk->ippc_regs); - goto put_usb2_hcd; +if (res) {/* ippc register is optional */ + mtk->ippc_regs =devm_ioremap_resource (dev, res); +if (IS_ERR (mtk->ippc_regs)) { + ret =PTR_ERR (mtk->ippc_regs); + goto put_usb2_hcd; + } }for (phy_num =0 ; phy_num < mtk->num_phys; phy_num++) {
Signature · 1 line
1.7.9.5
Chunfeng Yun
maintainerPATCH 3/6 dt-bindings: mtu3: add devicetree bindings
In reply to Chunfeng Yunadd a DT binding doc for MediaTek USB3 DRD driver
--- Documentation/devicetree/bindings/usb/mtu3.txt | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/mtu3.txt
Documentation/devicetree/bindings/usb/mtu3.txt new file +86 -0
@@ -0,0 +1,86 @@ +The device node for Mediatek USB3.0 DRD controller + +Required properties: + - compatible : should be "mediatek,mt8173-mtu3" + - reg : specifies physical base address and size of the registers + - reg-names: should be "mac" for device IP and "ippc" for IP port control + - interrupts : interrupt used by the device IP + - power-domains : a phandle to USB power domain node to control USB's + mtcmos + - vusb33-supply : regulator of USB avdd3.3v + - clocks : a list of phandle + clock-specifier pairs, one for each + entry in clock-names + - clock-names : must contain "sys_ck" for clock of controller; + "wakeup_deb_p0" and "wakeup_deb_p1" are optional, they are + depends on "mediatek,enable-wakeup" + - phys : a list of phandle + phy specifier pairs + - dr_mode : should be one of "host", "peripheral" or "otg", + refer to usb/generic.txt + +Optional properties: + - #address-cells, #size-cells : should be '2' if the device has sub-nodes + with 'reg' property + - ranges : allows valid 1:1 translation between child's address space and + parent's address space + - extcon : external connector for vbus and idpin changes detection, needed + when supports dual-role mode. + - vbus-supply : reference to the VBUS regulator, needed when supports + dual-role mode. + - pinctl-names : a pinctrl state named "default" must be defined, + "id_float" and "id_ground" are optinal which depends on + "mediatek,enable-manual-drd" + - pinctrl-0 : pin control group + See: Documentation/devicetree/bindings/pinctrl/pinctrl-binding.txt + + - maximum-speed : valid arguments are "super-speed", "high-speed" and + "full-speed"; refer to usb/generic.txt + - mediatek,enable-wakeup : supports ip sleep wakeup used by host mode + - mediatek,syscon-wakeup : phandle to syscon used to access USB wakeup + control register, it depends on "mediatek,enable-wakeup". + - mediatek,enable-manual-drd : supports manual dual-role switch by sysfs + interface; only used when receptacle is TYPE-A and also wants to support + dual-role mode. + +Sub-nodes: +The xhci should be added as subnode to mtu3 as shown in the following example +if host mode is enabled. The DT binding details of xhci can be found in: +Documentation/devicetree/bindings/usb/mt8173-xhci.txt + +Example: +ssusb: usb at 11271000 { + compatible = "mediatek,mt8173-mtu3"; + reg = <0 0x11271000 0 0x3000>, + <0 0x11280700 0 0x0100>; + reg-names = "mac", "ippc"; + interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_LOW>; + phys = <&phy_port0 PHY_TYPE_USB3>, + <&phy_port1 PHY_TYPE_USB2>; + power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>; + clocks = <&topckgen CLK_TOP_USB30_SEL>, + <&pericfg CLK_PERI_USB0>, + <&pericfg CLK_PERI_USB1>; + clock-names = "sys_ck", + "wakeup_deb_p0", + "wakeup_deb_p1"; + vusb33-supply = <&mt6397_vusb_reg>; + vbus-supply = <&usb_p0_vbus>; + extcon = <&extcon_usb>; + dr_mode = "otg"; + mediatek,enable-wakeup; + mediatek,syscon-wakeup = <&pericfg>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + status = "disabled"; + + usb_host: xhci at 11270000 { + compatible = "mediatek,mt8173-xhci"; + reg = <0 0x11270000 0 0x1000>; + interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>; + power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>; + clocks = <&topckgen CLK_TOP_USB30_SEL>; + clock-names = "sys_ck"; + vusb33-supply = <&mt6397_vusb_reg>; + status = "disabled"; + }; +};
Signature · 1 line
1.7.9.5
Chunfeng Yun
maintainerPATCH 4/6 usb: Add MediaTek USB3 DRD Driver
In reply to Chunfeng YunThis patch adds support for the MediaTek USB3 controller integrated into MT8173. It can be configured as Dual-Role Device (DRD), Peripheral Only and Host Only (xHCI) modes.
--- drivers/usb/Kconfig | 2 + drivers/usb/Makefile | 1 + drivers/usb/mtu3/Kconfig | 47 ++ drivers/usb/mtu3/Makefile | 20 + drivers/usb/mtu3/mtu3.h | 422 +++++++++++++++++ drivers/usb/mtu3/mtu3_core.c | 877 +++++++++++++++++++++++++++++++++++ drivers/usb/mtu3/mtu3_dr.c | 353 ++++++++++++++ drivers/usb/mtu3/mtu3_dr.h | 108 +++++ drivers/usb/mtu3/mtu3_gadget.c | 735 +++++++++++++++++++++++++++++ drivers/usb/mtu3/mtu3_gadget_ep0.c | 889 ++++++++++++++++++++++++++++++++++++ drivers/usb/mtu3/mtu3_host.c | 294 ++++++++++++ drivers/usb/mtu3/mtu3_hw_regs.h | 474 +++++++++++++++++++ drivers/usb/mtu3/mtu3_plat.c | 496 ++++++++++++++++++++ drivers/usb/mtu3/mtu3_qmu.c | 599 ++++++++++++++++++++++++ drivers/usb/mtu3/mtu3_qmu.h | 43 ++ 15 files changed, 5360 insertions(+) create mode 100644 drivers/usb/mtu3/Kconfig create mode 100644 drivers/usb/mtu3/Makefile create mode 100644 drivers/usb/mtu3/mtu3.h create mode 100644 drivers/usb/mtu3/mtu3_core.c create mode 100644 drivers/usb/mtu3/mtu3_dr.c create mode 100644 drivers/usb/mtu3/mtu3_dr.h create mode 100644 drivers/usb/mtu3/mtu3_gadget.c create mode 100644 drivers/usb/mtu3/mtu3_gadget_ep0.c create mode 100644 drivers/usb/mtu3/mtu3_host.c create mode 100644 drivers/usb/mtu3/mtu3_hw_regs.h create mode 100644 drivers/usb/mtu3/mtu3_plat.c create mode 100644 drivers/usb/mtu3/mtu3_qmu.c create mode 100644 drivers/usb/mtu3/mtu3_qmu.h
drivers/usb/Kconfig +2 -0
@@ -96,6 +96,8 @@ source "drivers/usb/usbip/Kconfig" endif +source "drivers/usb/mtu3/Kconfig" + source "drivers/usb/musb/Kconfig" source "drivers/usb/dwc3/Kconfig"
drivers/usb/Makefile +1 -0
@@ -12,6 +12,7 @@ obj-$(CONFIG_USB_DWC2) += dwc2/ obj-$(CONFIG_USB_ISP1760) += isp1760/ obj-$(CONFIG_USB_MON) += mon/ +obj-$(CONFIG_USB_MTU3) += mtu3/ obj-$(CONFIG_PCI) += host/ obj-$(CONFIG_USB_EHCI_HCD) += host/
drivers/usb/mtu3/Kconfig new file +47 -0
47 lines not on this page · raw message
drivers/usb/mtu3/Makefile new file +20 -0
@@ -0,0 +1,20 @@ + +#ifeq ($(CONFIG_USB_DEBUG),y) + ccflags-y += -DDEBUG +#endif + +obj-$(CONFIG_USB_MTU3) += mtu3.o + +mtu3-y := mtu3_plat.o + +ifneq ($(filter y,$(CONFIG_USB_MTU3_HOST) $(CONFIG_USB_MTU3_DUAL_ROLE)),) + mtu3-y += mtu3_host.o +endif + +ifneq ($(filter y,$(CONFIG_USB_MTU3_GADGET) $(CONFIG_USB_MTU3_DUAL_ROLE)),) + mtu3-y += mtu3_core.o mtu3_gadget_ep0.o mtu3_gadget.o mtu3_qmu.o +endif + +ifneq ($(CONFIG_USB_MTU3_DUAL_ROLE),) + mtu3-y += mtu3_dr.o +endif
drivers/usb/mtu3/mtu3.h new file +422 -0
422 lines not on this page · raw message
drivers/usb/mtu3/mtu3_core.c new file +877 -0
877 lines not on this page · raw message
drivers/usb/mtu3/mtu3_dr.c new file +353 -0
353 lines not on this page · raw message
drivers/usb/mtu3/mtu3_dr.h new file +108 -0
108 lines not on this page · raw message
drivers/usb/mtu3/mtu3_gadget.c new file +735 -0
735 lines not on this page · raw message
drivers/usb/mtu3/mtu3_gadget_ep0.c new file +889 -0
422 lines not on this page · raw message
drivers/usb/mtu3/mtu3_host.c new file +294 -0
294 lines not on this page · raw message
drivers/usb/mtu3/mtu3_hw_regs.h new file +474 -0
474 lines not on this page · raw message
drivers/usb/mtu3/mtu3_plat.c new file +496 -0
496 lines not on this page · raw message
drivers/usb/mtu3/mtu3_qmu.c new file +599 -0
599 lines not on this page · raw message
drivers/usb/mtu3/mtu3_qmu.h new file +43 -0
43 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.9.5
Part of the diff is not shown here. View the raw message.
Chunfeng Yun
maintainerPATCH 5/6 arm64: dts: mediatek: add USB3 DRD driver
In reply to Chunfeng YunUSB3 DRD driver is added for MT8173-EVB, and xHCI driver becomes its subnode
--- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 46 +++++++++++++++++++++++++-- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 28 ++++++++++++---- 2 files changed, 65 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/mediatek/mt8173-evb.dts +44 -2
@@ -34,6 +34,11 @@ chosen { }; + extcon_usb: extcon_iddig { + compatible = "linux,extcon-usb-gpio"; + id-gpio = <&pio 16 GPIO_ACTIVE_HIGH>; + }; + usb_p1_vbus: regulator at 0 { compatible = "regulator-fixed"; regulator-name = "usb_vbus";
@@ -42,6 +47,16 @@ gpio = <&pio 130 GPIO_ACTIVE_HIGH>; enable-active-high; }; + + usb_p0_vbus: regulator at 1 { + compatible = "regulator-fixed"; + regulator-name = "vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&pio 9 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + }; &i2c1 {
@@ -205,6 +220,20 @@ bias-pull-down = <MTK_PUPD_SET_R1R0_10>; }; }; + + usb_id_pins_float: usb_iddig_pull_up { + pins_iddig { + pinmux = <MT8173_PIN_16_IDDIG__FUNC_IDDIG>; + bias-pull-up; + }; + }; + + usb_id_pins_ground: usb_iddig_pull_down { + pins_iddig { + pinmux = <MT8173_PIN_16_IDDIG__FUNC_IDDIG>; + bias-pull-down; + }; + }; }; &pwm0 {
@@ -431,12 +460,25 @@ status = "okay"; }; +&ssusb { + vusb33-supply = <&mt6397_vusb_reg>; + vbus-supply = <&usb_p0_vbus>; + extcon = <&extcon_usb>; + dr_mode = "otg"; + mediatek,enable-wakeup; + pinctrl-names = "default", "id_float", "id_ground"; + pinctrl-0 = <&usb_id_pins_float>; + pinctrl-1 = <&usb_id_pins_float>; + pinctrl-2 = <&usb_id_pins_ground>; + status = "okay"; +}; + &uart0 { status = "okay"; }; -&usb30 { +&usb_host { vusb33-supply = <&mt6397_vusb_reg>; vbus-supply = <&usb_p1_vbus>; - mediatek,wakeup-src = <1>; + status = "okay"; };
arch/arm64/boot/dts/mediatek/mt8173.dtsi +21 -7
@@ -548,11 +548,14 @@ status = "disabled"; }; - usb30: usb at 11270000 { - compatible = "mediatek,mt8173-xhci"; - reg = <0 0x11270000 0 0x1000>, + ssusb: usb at 11271000 { + compatible = "mediatek,mt8173-mtu3"; + reg = <0 0x11271000 0 0x3000>, <0 0x11280700 0 0x0100>; - interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>; + reg-names = "mac", "ippc"; + interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_LOW>; + phys = <&phy_port0 PHY_TYPE_USB3>, + <&phy_port1 PHY_TYPE_USB2>; power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>; clocks = <&topckgen CLK_TOP_USB30_SEL>, <&pericfg CLK_PERI_USB0>,
@@ -560,10 +563,21 @@ clock-names = "sys_ck", "wakeup_deb_p0", "wakeup_deb_p1"; - phys = <&phy_port0 PHY_TYPE_USB3>, - <&phy_port1 PHY_TYPE_USB2>; mediatek,syscon-wakeup = <&pericfg>; - status = "okay"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + status = "disabled"; + + usb_host: xhci at 11270000 { + compatible = "mediatek,mt8173-xhci"; + reg = <0 0x11270000 0 0x1000>; + interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>; + power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>; + clocks = <&topckgen CLK_TOP_USB30_SEL>; + clock-names = "sys_ck"; + status = "disabled"; + }; }; u3phy: usb-phy at 11290000 {
Signature · 1 line
1.7.9.5
Chunfeng Yun
maintainerPATCH 6/6 pinctrl: mt8173: set GPIO16 to usb iddig mode
In reply to Chunfeng Yunthe default mode of GPIO16 pin is gpio, when set EINT16 to IRQ_TYPE_LEVEL_HIGH, no interrupt is triggered, it can be fixed when set its default mode as usb iddig.
--- drivers/pinctrl/mediatek/pinctrl-mtk-mt8173.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/mediatek/pinctrl-mtk-mt8173.h +1 -1
@@ -201,7 +201,7 @@ static const struct mtk_desc_pin mtk_pins_mt8173[] = { MTK_PIN( PINCTRL_PIN(16, "IDDIG"), NULL, "mt8173", - MTK_EINT_FUNCTION(0, 16), + MTK_EINT_FUNCTION(1, 16), MTK_FUNCTION(0, "GPIO16"), MTK_FUNCTION(1, "IDDIG"), MTK_FUNCTION(2, "CMFLASH"),
Signature · 1 line
1.7.9.5
Re: [PATCH 6/6] pinctrl: mt8173: set GPIO16 to usb iddig mode
Quoted 5 lines · Chunfeng Yun
the default mode of GPIO16 pin is gpio, when set EINT16 to
IRQ_TYPE_LEVEL_HIGH, no interrupt is triggered, it can be fixed when set its default mode as usb iddig.Signed-off-by Chunfeng Yun <[email protected]>
This looks like it can be merged orthogonally to all the other patches, but I don't understand the patch or if it is correct.
Hongzhou/Yingjoe, can either of you review this patch?
Yours,
Linus Walleij
Rob Herring
maintainerRe: [PATCH 3/6] dt-bindings: mtu3: add devicetree bindings
In reply to Chunfeng YunQuoted 20 lines · Chunfeng Yun
add a DT binding doc for MediaTek USB3 DRD driver
Signed-off-by Chunfeng Yun <[email protected]>--- Documentation/devicetree/bindings/usb/mtu3.txt | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/mtu3.txtDocumentation/devicetree/bindings/usb/mtu3.txt new file +6
-0@@ -0,0 +1,86 @@ +The device node for Mediatek USB3.0 DRD controller + +Required properties: + - compatible : should be "mediatek,mt8173-mtu3" + - reg : specifies physical base address and size of the registers + - reg-names: should be "mac" for device IP and "ippc" for IP port control
Documentation/devicetree/bindings/usb/mtu3.txt line 16
Quoted 10 lines
Documentation/devicetree/bindings/usb/mtu3.txt new file +10
-0+ - interrupts : interrupt used by the device IP + - power-domains : a phandle to USB power domain node to control USB's + mtcmos + - vusb33-supply : regulator of USB avdd3.3v + - clocks : a list of phandle + clock-specifier pairs, one for each + entry in clock-names + - clock-names : must contain "sys_ck" for clock of controller; + "wakeup_deb_p0" and "wakeup_deb_p1" are optional, they are + depends on "mediatek,enable-wakeup" + - phys : a list of phandle + phy specifier pairs
How many?
Quoted 13 lines
Documentation/devicetree/bindings/usb/mtu3.txt new file +13
-0+ - dr_mode : should be one of "host", "peripheral" or "otg", + refer to usb/generic.txt + +Optional properties: + - #address-cells, #size-cells : should be '2' if the device has sub-nodes + with 'reg' property + - ranges : allows valid 1:1 translation between child's address space and + parent's address space + - extcon : external connector for vbus and idpin changes detection, needed + when supports dual-role mode. + - vbus-supply : reference to the VBUS regulator, needed when supports + dual-role mode. + - pinctl-names : a pinctrl state named "default" must be defined,
Documentation/devicetree/bindings/usb/mtu3.txt line 39
Quoted 10 lines
Documentation/devicetree/bindings/usb/mtu3.txt new file +10
-0+ "id_float" and "id_ground" are optinal which depends on + "mediatek,enable-manual-drd" + - pinctrl-0 : pin control group + See: Documentation/devicetree/bindings/pinctrl/pinctrl-binding.txt + + - maximum-speed : valid arguments are "super-speed", "high-speed" and + "full-speed"; refer to usb/generic.txt + - mediatek,enable-wakeup : supports ip sleep wakeup used by host mode + - mediatek,syscon-wakeup : phandle to syscon used to access USB wakeup + control register, it depends on "mediatek,enable-wakeup".
There is a standard wake-up source binding. That assumes asserting the device's irq (or one of the irqs) will cause wake-up.
The syscon-wakeup should probably get implemented as a stacked irqdomain.
Documentation/devicetree/bindings/usb/mtu3.txt line 42
Quoted 3 lines
Documentation/devicetree/bindings/usb/mtu3.txt new file +3
-0+ - mediatek,enable-manual-drd : supports manual dual-role switch by sysfs + interface; only used when receptacle is TYPE-A and also wants to support + dual-role mode.
sysfs is a Linux detail that doesn't apply to the binding. Does the property mean "the IP block supports or doesn't support switching" or "I want to enable switching feature". Only the former belongs in DT.
As far as the sysfs interface, it should be generic, not Mediatek specific.
Documentation/devicetree/bindings/usb/mtu3.txt line 47
Quoted 5 lines
Documentation/devicetree/bindings/usb/mtu3.txt new file +5
-0+ +Sub-nodes: +The xhci should be added as subnode to mtu3 as shown in the following example +if host mode is enabled. The DT binding details of xhci can be found in: +Documentation/devicetree/bindings/usb/mt8173-xhci.txt
Is XHCI really a sub-block? It seems mostly independent.
Quoted 42 lines
Documentation/devicetree/bindings/usb/mtu3.txt new file +39
-0+ +Example: +ssusb: usb at 11271000 { + compatible = "mediatek,mt8173-mtu3"; + reg = <0 0x11271000 0 0x3000>, + <0 0x11280700 0 0x0100>; + reg-names = "mac", "ippc"; + interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_LOW>; + phys = <&phy_port0 PHY_TYPE_USB3>, + <&phy_port1 PHY_TYPE_USB2>; + power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>; + clocks = <&topckgen CLK_TOP_USB30_SEL>, + <&pericfg CLK_PERI_USB0>, + <&pericfg CLK_PERI_USB1>; + clock-names = "sys_ck", + "wakeup_deb_p0", + "wakeup_deb_p1"; + vusb33-supply = <&mt6397_vusb_reg>; + vbus-supply = <&usb_p0_vbus>; + extcon = <&extcon_usb>; + dr_mode = "otg"; + mediatek,enable-wakeup; + mediatek,syscon-wakeup = <&pericfg>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + status = "disabled"; + + usb_host: xhci at 11270000 { + compatible = "mediatek,mt8173-xhci"; + reg = <0 0x11270000 0 0x1000>; + interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>; + power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>; + clocks = <&topckgen CLK_TOP_USB30_SEL>; + clock-names = "sys_ck"; + vusb33-supply = <&mt6397_vusb_reg>; + status = "disabled"; + }; +};Signature · 1 line
1.7.9.5
Re: [PATCH 6/6] pinctrl: mt8173: set GPIO16 to usb iddig mode
In reply to Linus WalleijQuoted 9 lines · Linus Walleij
Quoted 5 lines · Chunfeng Yun
the default mode of GPIO16 pin is gpio, when set EINT16 to
IRQ_TYPE_LEVEL_HIGH, no interrupt is triggered, it can be fixed when set its default mode as usb iddig.Signed-off-by Chunfeng Yun <[email protected]>
Chunfeng, GPIO16 can be used as EINT16 mode, but the pinmux should be 0. If you want to set its default mode to iddig, you should set it in dts.
Yours,
Hongzhou
chunfeng yun
maintainerRe: [PATCH 6/6] pinctrl: mt8173: set GPIO16 to usb iddig mode
Hi,
Quoted 8 lines · Hongzhou Yang
Quoted 7 lines · Linus Walleij
Quoted 4 lines · Chunfeng Yun
the default mode of GPIO16 pin is gpio, when set EINT16 to
IRQ_TYPE_LEVEL_HIGH, no interrupt is triggered, it can be fixed when set its default mode as usb iddig.
Quoted 6 lines
Quoted 2 lines
Quoted 1 line
Signed-off-by Chunfeng Yun <[email protected]>Chunfeng, GPIO16 can be used as EINT16 mode, but the pinmux should be 0. If you want to set its default mode to iddig, you should set it in dts.
I set it in DTS, but it didn't work, because when usb driver requested IRQ, pinmux was switched back to default mode set by MTK_EINT_FUNCTION().
Quoted 3 lines
Yours,
Hongzhou
Hongzhou Yang
Acked-byRe: [PATCH 6/6] pinctrl: mt8173: set GPIO16 to usb iddig mode
Quoted 14 lines · chunfeng yun
Hi,
Quoted 11 lines · Hongzhou Yang
Quoted 9 lines · Linus Walleij
Quoted 5 lines · Chunfeng Yun
the default mode of GPIO16 pin is gpio, when set EINT16 to
IRQ_TYPE_LEVEL_HIGH, no interrupt is triggered, it can be fixed when set its default mode as usb iddig.Signed-off-by Chunfeng Yun <[email protected]>
Quoted 7 lines
Quoted 3 lines
Chunfeng, GPIO16 can be used as EINT16 mode, but the pinmux should be 0. If you want to set its default mode to iddig, you should set it in dts.
I set it in DTS, but it didn't work, because when usb driver requested IRQ, pinmux was switched back to default mode set by
MTK_EINT_FUNCTION().
After confirmed, there are something wrong with data sheet and pinmux table, and GPIO16 can only receive interrupt by mode 1. So
Yours,
Hongzhou
Re: [PATCH 6/6] pinctrl: mt8173: set GPIO16 to usb iddig mode
Quoted 23 lines · Hongzhou Yang
Quoted 14 lines · chunfeng yun
Hi,
Quoted 11 lines · Hongzhou Yang
Quoted 9 lines · Linus Walleij
Quoted 5 lines · Chunfeng Yun
the default mode of GPIO16 pin is gpio, when set EINT16 to
IRQ_TYPE_LEVEL_HIGH, no interrupt is triggered, it can be fixed when set its default mode as usb iddig.Signed-off-by Chunfeng Yun <[email protected]>Quoted 7 lines
Quoted 3 lines
Chunfeng, GPIO16 can be used as EINT16 mode, but the pinmux should be 0. If you want to set its default mode to iddig, you should set it in dts.
I set it in DTS, but it didn't work, because when usb driver requested IRQ, pinmux was switched back to default mode set by
MTK_EINT_FUNCTION().
Quoted 5 lines
After confirmed, there are something wrong with data sheet and pinmux table, and GPIO16 can only receive interrupt by mode 1. So
Acked-by Hongzhou Yang <[email protected]>
Linus,
We find there are some other pins still have the same problem, so please hold on it. Sorry for so much noise.
Thanks,
Hongzhou
chunfeng yun
maintainerRe: [PATCH 3/6] dt-bindings: mtu3: add devicetree bindings
In reply to Rob HerringHi,
Quoted 25 lines · Rob Herring
Quoted 24 lines · Chunfeng Yun
add a DT binding doc for MediaTek USB3 DRD driver
Signed-off-by Chunfeng Yun <[email protected]>--- Documentation/devicetree/bindings/usb/mtu3.txt | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/mtu3.txtDocumentation/devicetree/bindings/usb/mtu3.txt new file +10
-0@@ -0,0 +1,86 @@ +The device node for Mediatek USB3.0 DRD controller + +Required properties: + - compatible : should be "mediatek,mt8173-mtu3" + - reg : specifies physical base address and size of the registers + - reg-names: should be "mac" for device IP and "ippc" for IP port control + - interrupts : interrupt used by the device IP + - power-domains : a phandle to USB power domain node to control USB's + mtcmos + - vusb33-supply : regulator of USB avdd3.3v
Quoted 8 lines
Documentation/devicetree/bindings/usb/mtu3.txt line 16
Quoted 6 lines
Documentation/devicetree/bindings/usb/mtu3.txt new file +6
-0+ - clocks : a list of phandle + clock-specifier pairs, one for each + entry in clock-names + - clock-names : must contain "sys_ck" for clock of controller; + "wakeup_deb_p0" and "wakeup_deb_p1" are optional, they are + depends on "mediatek,enable-wakeup" + - phys : a list of phandle + phy specifier pairsHow many?
It depends on implementation; there are two phys on mt8173 platform
Quoted 28 lines
Quoted 14 lines
Documentation/devicetree/bindings/usb/mtu3.txt new file +13
-0+ - dr_mode : should be one of "host", "peripheral" or "otg", + refer to usb/generic.txt + +Optional properties: + - #address-cells, #size-cells : should be '2' if the device has sub-nodes + with 'reg' property + - ranges : allows valid 1:1 translation between child's address space and + parent's address space + - extcon : external connector for vbus and idpin changes detection, needed + when supports dual-role mode. + - vbus-supply : reference to the VBUS regulator, needed when supports + dual-role mode. + - pinctl-names : a pinctrl state named "default" must be defined,Documentation/devicetree/bindings/usb/mtu3.txt line 39
Quoted 10 lines
Documentation/devicetree/bindings/usb/mtu3.txt new file +10
-0+ "id_float" and "id_ground" are optinal which depends on + "mediatek,enable-manual-drd" + - pinctrl-0 : pin control group + See: Documentation/devicetree/bindings/pinctrl/pinctrl-binding.txt + + - maximum-speed : valid arguments are "super-speed", "high-speed" and + "full-speed"; refer to usb/generic.txt + - mediatek,enable-wakeup : supports ip sleep wakeup used by host mode + - mediatek,syscon-wakeup : phandle to syscon used to access USB wakeup + control register, it depends on "mediatek,enable-wakeup".There is a standard wake-up source binding. That assumes asserting the device's irq (or one of the irqs) will cause wake-up.
Quoted 3 lines
The syscon-wakeup should probably get implemented as a stacked irqdomain.
Syscon-wakeup is used to control which usb wakeup mode we want to use, such as ip sleep(usb suspend/resume signal), or line state(changes of D +/-). And it doesn't trigger device's interrupt, so can't implement device's irq to wake up system.
Quoted 8 lines
Documentation/devicetree/bindings/usb/mtu3.txt line 42
Quoted 3 lines
Documentation/devicetree/bindings/usb/mtu3.txt new file +3
-0+ - mediatek,enable-manual-drd : supports manual dual-role switch by sysfs + interface; only used when receptacle is TYPE-A and also wants to support + dual-role mode.sysfs is a Linux detail that doesn't apply to the binding. Does the property mean "the IP block supports or doesn't support switching" or "I want to enable switching feature". Only the former belongs in DT.
It is the former case, and has little relation with sysfs interface. I will modify it later, sorry for my unclear description.
Quoted 10 lines
As far as the sysfs interface, it should be generic, not Mediatek specific.
Documentation/devicetree/bindings/usb/mtu3.txt line 47
Quoted 5 lines
Documentation/devicetree/bindings/usb/mtu3.txt new file +5
-0+ +Sub-nodes: +The xhci should be added as subnode to mtu3 as shown in the following example +if host mode is enabled. The DT binding details of xhci can be found in: +Documentation/devicetree/bindings/usb/mt8173-xhci.txtIs XHCI really a sub-block? It seems mostly independent.
Yes, the mtk's usb3 controller contains three parts: mu3d IP, xHCI IP and IPPC (IP power and control).
Quoted 43 lines
Quoted 43 lines
Documentation/devicetree/bindings/usb/mtu3.txt new file +39
-0+ +Example: +ssusb: usb at 11271000 { + compatible = "mediatek,mt8173-mtu3"; + reg = <0 0x11271000 0 0x3000>, + <0 0x11280700 0 0x0100>; + reg-names = "mac", "ippc"; + interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_LOW>; + phys = <&phy_port0 PHY_TYPE_USB3>, + <&phy_port1 PHY_TYPE_USB2>; + power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>; + clocks = <&topckgen CLK_TOP_USB30_SEL>, + <&pericfg CLK_PERI_USB0>, + <&pericfg CLK_PERI_USB1>; + clock-names = "sys_ck", + "wakeup_deb_p0", + "wakeup_deb_p1"; + vusb33-supply = <&mt6397_vusb_reg>; + vbus-supply = <&usb_p0_vbus>; + extcon = <&extcon_usb>; + dr_mode = "otg"; + mediatek,enable-wakeup; + mediatek,syscon-wakeup = <&pericfg>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + status = "disabled"; + + usb_host: xhci at 11270000 { + compatible = "mediatek,mt8173-xhci"; + reg = <0 0x11270000 0 0x1000>; + interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>; + power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>; + clocks = <&topckgen CLK_TOP_USB30_SEL>; + clock-names = "sys_ck"; + vusb33-supply = <&mt6397_vusb_reg>; + status = "disabled"; + }; +};Signature · 1 line
1.7.9.5
Re: [PATCH 3/6] dt-bindings: mtu3: add devicetree bindings
Quoted 10 lines · chunfeng yun
Quoted 8 lines
Documentation/devicetree/bindings/usb/mtu3.txt line 42
Quoted 3 lines
+ - mediatek,enable-manual-drd : supports manual dual-role switch by sysfs
Documentation/devicetree/bindings/usb/mtu3.txt new file +2
-0+ interface; only used when receptacle is TYPE-A and also wants to support + dual-role mode.sysfs is a Linux detail that doesn't apply to the binding. Does the property mean "the IP block supports or doesn't support switching" or "I want to enable switching feature". Only the former belongs in DT.
It is the former case, and has little relation with sysfs interface. I will modify it later, sorry for my unclear description.
Could the property name be just "enable-manual-drd" instead of "mediatek,enable-manual-drd"? I expect to have to add this functionality to our USB driver in the near future.
chunfeng yun
maintainerRe: [PATCH 3/6] dt-bindings: mtu3: add devicetree bindings
Hi,
Quoted 9 lines · Alan Cooper
Quoted 8 lines · chunfeng yun
Quoted 8 lines
Documentation/devicetree/bindings/usb/mtu3.txt line 42
Quoted 3 lines
+ - mediatek,enable-manual-drd : supports manual dual-role switch by sysfs
Documentation/devicetree/bindings/usb/mtu3.txt new file +2
-0+ interface; only used when receptacle is TYPE-A and also wants to support + dual-role mode.sysfs is a Linux detail that doesn't apply to the binding. Does the property mean "the IP block supports or doesn't support switching" or "I want to enable switching feature". Only the former belongs in DT.
Quoted 6 lines
Quoted 2 lines
It is the former case, and has little relation with sysfs interface. I will modify it later, sorry for my unclear description.
Could the property name be just "enable-manual-drd" instead of "mediatek,enable-manual-drd"? I expect to have to add this functionality to our USB driver in the near future.
Do you mean provide some APIs to in common USB driver?
Rob Herring
maintainerRe: [PATCH 3/6] dt-bindings: mtu3: add devicetree bindings
Quoted 12 lines · chunfeng yun
Hi,
Quoted 9 lines · Alan Cooper
Quoted 8 lines · chunfeng yun
Quoted 8 lines
Documentation/devicetree/bindings/usb/mtu3.txt line 42
Quoted 3 lines
+ - mediatek,enable-manual-drd : supports manual dual-role switch by sysfs
Documentation/devicetree/bindings/usb/mtu3.txt new file +2
-0+ interface; only used when receptacle is TYPE-A and also wants to support + dual-role mode.sysfs is a Linux detail that doesn't apply to the binding. Does the property mean "the IP block supports or doesn't support switching" or "I want to enable switching feature". Only the former belongs in DT.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
It is the former case, and has little relation with sysfs interface. I will modify it later, sorry for my unclear description.
Could the property name be just "enable-manual-drd" instead of "mediatek,enable-manual-drd"? I expect to have to add this functionality to our USB driver in the near future.
Do you mean provide some APIs to in common USB driver?
Probably, but first just put the property in a common binding doc.
Rob
chunfeng yun
maintainerRe: [PATCH 3/6] dt-bindings: mtu3: add devicetree bindings
Quoted 16 lines · Rob Herring
Quoted 15 lines · chunfeng yun
Hi,
Quoted 12 lines · Alan Cooper
Quoted 10 lines · chunfeng yun
Quoted 8 lines
Documentation/devicetree/bindings/usb/mtu3.txt line 42
Quoted 3 lines
+ - mediatek,enable-manual-drd : supports manual dual-role switch by sysfs
Documentation/devicetree/bindings/usb/mtu3.txt new file +2
-0+ interface; only used when receptacle is TYPE-A and also wants to support + dual-role mode.sysfs is a Linux detail that doesn't apply to the binding. Does the property mean "the IP block supports or doesn't support switching" or "I want to enable switching feature". Only the former belongs in DT.
It is the former case, and has little relation with sysfs interface. I will modify it later, sorry for my unclear description.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Could the property name be just "enable-manual-drd" instead of "mediatek,enable-manual-drd"? I expect to have to add this functionality to our USB driver in the near future.
Do you mean provide some APIs to in common USB driver?
Probably, but first just put the property in a common binding doc.
Ok, I modify it later
Thanks.
Quoted 1 line
Rob
Re: [PATCH 6/6] pinctrl: mt8173: set GPIO16 to usb iddig mode
In reply to Hongzhou YangQuoted 2 lines · Hongzhou Yang
We find there are some other pins still have the same problem, so please hold on it. Sorry for so much noise.
It's OK. Get me a big patch fixing it all when you're combed through things and we can apply it for fixes/stable.
Yours,
Linus Walleij
Matthias Brugger
maintainerRe: [PATCH 6/6] pinctrl: mt8173: set GPIO16 to usb iddig mode
In reply to Hongzhou YangHi Hongzhou,
Quoted 27 lines · Hongzhou Yang
Quoted 26 lines · Hongzhou Yang
Quoted 14 lines · chunfeng yun
Hi,
Quoted 11 lines · Hongzhou Yang
Quoted 9 lines · Linus Walleij
Quoted 5 lines · Chunfeng Yun
the default mode of GPIO16 pin is gpio, when set EINT16 to
IRQ_TYPE_LEVEL_HIGH, no interrupt is triggered, it can be fixed when set its default mode as usb iddig.Signed-off-by Chunfeng Yun <[email protected]>Quoted 7 lines
Quoted 3 lines
Chunfeng, GPIO16 can be used as EINT16 mode, but the pinmux should be 0. If you want to set its default mode to iddig, you should set it in dts.
I set it in DTS, but it didn't work, because when usb driver requested IRQ, pinmux was switched back to default mode set by
MTK_EINT_FUNCTION().After confirmed, there are something wrong with data sheet and pinmux table, and GPIO16 can only receive interrupt by mode 1. So
Quoted 8 lines
Quoted 2 lines
Acked-by Hongzhou Yang <[email protected]>Linus,
We find there are some other pins still have the same problem, so please hold on it. Sorry for so much noise.
Did you made any progress on this? I didn't see any patch on the mailing list.
Regards,
Matthias
Re: [PATCH 6/6] pinctrl: mt8173: set GPIO16 to usb iddig mode
Quoted 39 lines · Matthias Brugger
Hi Hongzhou,
Quoted 27 lines · Hongzhou Yang
Quoted 26 lines · Hongzhou Yang
Quoted 14 lines · chunfeng yun
Hi,
Quoted 11 lines · Hongzhou Yang
Quoted 9 lines · Linus Walleij
Quoted 5 lines · Chunfeng Yun
the default mode of GPIO16 pin is gpio, when set EINT16 to
IRQ_TYPE_LEVEL_HIGH, no interrupt is triggered, it can be fixed when set its default mode as usb iddig.Signed-off-by Chunfeng Yun <[email protected]>Quoted 7 lines
Quoted 3 lines
Chunfeng, GPIO16 can be used as EINT16 mode, but the pinmux should be 0. If you want to set its default mode to iddig, you should set it in dts.
I set it in DTS, but it didn't work, because when usb driver requested IRQ, pinmux was switched back to default mode set by
MTK_EINT_FUNCTION().After confirmed, there are something wrong with data sheet and pinmux table, and GPIO16 can only receive interrupt by mode 1. So
Quoted 8 lines
Quoted 2 lines
Acked-by Hongzhou Yang <[email protected]>Linus,
We find there are some other pins still have the same problem, so please hold on it. Sorry for so much noise.
Quoted 5 lines
Did you made any progress on this? I didn't see any patch on the mailing list.
Regards,
Matthias
Hi Matthias,
Sorry for the late reply.
I have double confirmed with HW designer, other special EINTs are built-in and they are using internal signal, they are not triggered by GPIO, only GPIO16 should set to mode 1.
And, Chunfeng already re-sent this patch.
Thank you very much.
Yours,
Hongzhou