* [PATCH v3 0/2] serial: 8250: add support for MediaTek BTIF controller @ 2017-08-20 17:17 sean.wang [not found] ` <cover.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> 2017-08-20 17:17 ` [PATCH v3 2/2] serial: 8250: of: Add new port type for MediaTek BTIF controller on MT7622/23 SoC sean.wang 0 siblings, 2 replies; 5+ messages in thread From: sean.wang @ 2017-08-20 17:17 UTC (permalink / raw) To: robh+dt, gregkh, jslaby, andriy.shevchenko, robert.jarzmik, arnd, p.zabel, joel, david, jan.kiszka, heikki.krogerus, hpeter, vigneshr, matthias.bgg, tthayer Cc: devicetree, linux-mediatek, linux-serial, linux-arm-kernel, linux-kernel, Sean Wang From: Sean Wang <sean.wang@mediatek.com> Since v3: - enhancing the definition of the compatible strings in dt-bindings Since v2: - reusing 8250_of since the original driver has almost the same logic This patchset introduces the support for MediaTek BTIF controller. MediaTek BTIF controller is the serial interface similar to UART but it works only as the digital device which is mainly used to communicate with the connectivity module also called CONNSYS inside the SoC which could be mostly found on those MediaTek SoCs with Bluetooth feature. And the controller is made as being compatible with the 8250 register layout so it tends to be integrated with existing 8250 core driver and have no requirement for the modem configuration additionally such as the baud rate calculation and assignment. Sean Wang (2): dt-bindings: serial: 8250: Add MediaTek BTIF controller bindings serial: 8250: of: Add new port type for MediaTek BTIF controller on MT7622/23 SoC Documentation/devicetree/bindings/serial/8250.txt | 2 ++ drivers/tty/serial/8250/8250_of.c | 2 ++ drivers/tty/serial/8250/8250_port.c | 8 ++++++++ include/uapi/linux/serial_core.h | 3 +++ 4 files changed, 15 insertions(+) -- 2.7.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <cover.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>]
* [PATCH v3 1/2] dt-bindings: serial: 8250: Add MediaTek BTIF controller bindings [not found] ` <cover.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> @ 2017-08-20 17:17 ` sean.wang-NuS5LvNUpcJWk0Htik3J/w [not found] ` <0bce3e724939bcab681f280e5a1f7026266e4fb5.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: sean.wang-NuS5LvNUpcJWk0Htik3J/w @ 2017-08-20 17:17 UTC (permalink / raw) To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, jslaby-IBi9RG/b67k, andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA, robert.jarzmik-GANU6spQydw, arnd-r2nGTMty4D4, p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ, joel-U3u1mxZcP9KHXe+LvDLADg, david-nq/r/kbU++upp/zk7JDF2g, jan.kiszka-kv7WeFo6aLtBDgjK7y7TUQ, heikki.krogerus-VuQAYsv1563Yd54FQh9/CA, hpeter-Re5JQEeQqe8AvxtiuMwx3w, vigneshr-l0cyMroinI0, matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w, tthayer-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-serial-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Sean Wang From: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> Document the devicetree bindings in 8250.txt for MediaTek BTIF controller which could be found on MT7622 and MT7623 SoC. Signed-off-by: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> --- Documentation/devicetree/bindings/serial/8250.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/8250.txt b/Documentation/devicetree/bindings/serial/8250.txt index 419ff6c..dad3b2e 100644 --- a/Documentation/devicetree/bindings/serial/8250.txt +++ b/Documentation/devicetree/bindings/serial/8250.txt @@ -14,6 +14,8 @@ Required properties: tegra132, or tegra210. - "nxp,lpc3220-uart" - "ralink,rt2880-uart" + - For MediaTek BTIF, must contain '"mediatek,<chip>-btif", + "mediatek,mtk-btif"' where <chip> is mt7622, mt7623. - "altr,16550-FIFO32" - "altr,16550-FIFO64" - "altr,16550-FIFO128" -- 2.7.4 -- 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 related [flat|nested] 5+ messages in thread
[parent not found: <0bce3e724939bcab681f280e5a1f7026266e4fb5.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>]
* Re: [PATCH v3 1/2] dt-bindings: serial: 8250: Add MediaTek BTIF controller bindings [not found] ` <0bce3e724939bcab681f280e5a1f7026266e4fb5.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> @ 2017-08-23 0:34 ` Rob Herring 0 siblings, 0 replies; 5+ messages in thread From: Rob Herring @ 2017-08-23 0:34 UTC (permalink / raw) To: sean.wang-NuS5LvNUpcJWk0Htik3J/w Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, jslaby-IBi9RG/b67k, andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA, robert.jarzmik-GANU6spQydw, arnd-r2nGTMty4D4, p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ, joel-U3u1mxZcP9KHXe+LvDLADg, david-nq/r/kbU++upp/zk7JDF2g, jan.kiszka-kv7WeFo6aLtBDgjK7y7TUQ, heikki.krogerus-VuQAYsv1563Yd54FQh9/CA, hpeter-Re5JQEeQqe8AvxtiuMwx3w, vigneshr-l0cyMroinI0, matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w, tthayer-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-serial-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA On Mon, Aug 21, 2017 at 01:17:55AM +0800, sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org wrote: > From: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> > > Document the devicetree bindings in 8250.txt for MediaTek BTIF > controller which could be found on MT7622 and MT7623 SoC. > > Signed-off-by: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> > --- > Documentation/devicetree/bindings/serial/8250.txt | 2 ++ > 1 file changed, 2 insertions(+) Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@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] 5+ messages in thread
* [PATCH v3 2/2] serial: 8250: of: Add new port type for MediaTek BTIF controller on MT7622/23 SoC 2017-08-20 17:17 [PATCH v3 0/2] serial: 8250: add support for MediaTek BTIF controller sean.wang [not found] ` <cover.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> @ 2017-08-20 17:17 ` sean.wang [not found] ` <f773843daf6844be7b942185bafcb91304b75f7f.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: sean.wang @ 2017-08-20 17:17 UTC (permalink / raw) To: robh+dt, gregkh, jslaby, andriy.shevchenko, robert.jarzmik, arnd, p.zabel, joel, david, jan.kiszka, heikki.krogerus, hpeter, vigneshr, matthias.bgg, tthayer Cc: devicetree, linux-mediatek, linux-serial, linux-arm-kernel, linux-kernel, Sean Wang From: Sean Wang <sean.wang@mediatek.com> MediaTek BTIF controller is the serial interface similar to UART but it works only as the digital device which is mainly used to communicate with the connectivity module called CONNSYS inside the SoC which could be mostly found on those MediaTek SoCs with Bluetooth feature such as MT7622 and MT7623 SoCs. And the controller is made as being compatible with the 8250 register layout with extra registers such as DMA enablement so it tends to be integrated with reusing 8250 OF driver. However, DMA mode is not being supported yet in the current driver. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/tty/serial/8250/8250_of.c | 2 ++ drivers/tty/serial/8250/8250_port.c | 8 ++++++++ include/uapi/linux/serial_core.h | 3 +++ 3 files changed, 13 insertions(+) diff --git a/drivers/tty/serial/8250/8250_of.c b/drivers/tty/serial/8250/8250_of.c index 6c5a8ca..be1c5e75 100644 --- a/drivers/tty/serial/8250/8250_of.c +++ b/drivers/tty/serial/8250/8250_of.c @@ -300,6 +300,8 @@ static const struct of_device_id of_platform_serial_table[] = { .data = (void *)PORT_ALTR_16550_F64, }, { .compatible = "altr,16550-FIFO128", .data = (void *)PORT_ALTR_16550_F128, }, + { .compatible = "mediatek,mtk-btif", + .data = (void *)PORT_MTK_BTIF, }, { .compatible = "mrvl,mmp-uart", .data = (void *)PORT_XSCALE, }, { .compatible = "ti,da830-uart", .data = (void *)PORT_DA830, }, diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index 25aae66..053bb38 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -289,6 +289,14 @@ static const struct serial8250_config uart_config[] = { .rxtrig_bytes = {1, 4, 8, 14}, .flags = UART_CAP_FIFO | UART_CAP_AFE, }, + [PORT_MTK_BTIF] = { + .name = "MediaTek BTIF", + .fifo_size = 16, + .tx_loadsz = 16, + .fcr = UART_FCR_ENABLE_FIFO | + UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT, + .flags = UART_CAP_FIFO, + }, }; /* Uart divisor latch read */ diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h index 38bea32..cfc07a5 100644 --- a/include/uapi/linux/serial_core.h +++ b/include/uapi/linux/serial_core.h @@ -272,4 +272,7 @@ /* MPS2 UART */ #define PORT_MPS2UART 116 +/* MediaTek BTIF */ +#define PORT_MTK_BTIF 117 + #endif /* _UAPILINUX_SERIAL_CORE_H */ -- 2.7.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <f773843daf6844be7b942185bafcb91304b75f7f.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>]
* Re: [PATCH v3 2/2] serial: 8250: of: Add new port type for MediaTek BTIF controller on MT7622/23 SoC [not found] ` <f773843daf6844be7b942185bafcb91304b75f7f.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> @ 2017-08-21 9:50 ` Arnd Bergmann 0 siblings, 0 replies; 5+ messages in thread From: Arnd Bergmann @ 2017-08-21 9:50 UTC (permalink / raw) To: Sean Wang Cc: Rob Herring, gregkh, Jiri Slaby, Andy Shevchenko, Robert Jarzmik, Philipp Zabel, Joel Stanley, david-nq/r/kbU++upp/zk7JDF2g, jan.kiszka-kv7WeFo6aLtBDgjK7y7TUQ, Heikki Krogerus, hpeter-Re5JQEeQqe8AvxtiuMwx3w, vigneshr-l0cyMroinI0, Matthias Brugger, tthayer-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx, devicetree-u79uwXL29TY76Z2rM5mHXA, moderated list:ARM/Mediatek SoC..., linux-serial-u79uwXL29TY76Z2rM5mHXA, Linux ARM, Linux Kernel Mailing List On Sun, Aug 20, 2017 at 7:17 PM, <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> wrote: > From: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> > > MediaTek BTIF controller is the serial interface similar to UART but it > works only as the digital device which is mainly used to communicate with > the connectivity module called CONNSYS inside the SoC which could be mostly > found on those MediaTek SoCs with Bluetooth feature such as MT7622 and > MT7623 SoCs. > > And the controller is made as being compatible with the 8250 register > layout with extra registers such as DMA enablement so it tends to be > integrated with reusing 8250 OF driver. However, DMA mode is not being > supported yet in the current driver. > > Signed-off-by: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> > Suggested-by: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> Acked-by: Arnd Bergmann <arnd-r2nGTMty4D4@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] 5+ messages in thread
end of thread, other threads:[~2017-08-23 0:34 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-08-20 17:17 [PATCH v3 0/2] serial: 8250: add support for MediaTek BTIF controller sean.wang [not found] ` <cover.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> 2017-08-20 17:17 ` [PATCH v3 1/2] dt-bindings: serial: 8250: Add MediaTek BTIF controller bindings sean.wang-NuS5LvNUpcJWk0Htik3J/w [not found] ` <0bce3e724939bcab681f280e5a1f7026266e4fb5.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> 2017-08-23 0:34 ` Rob Herring 2017-08-20 17:17 ` [PATCH v3 2/2] serial: 8250: of: Add new port type for MediaTek BTIF controller on MT7622/23 SoC sean.wang [not found] ` <f773843daf6844be7b942185bafcb91304b75f7f.1503248851.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> 2017-08-21 9:50 ` Arnd Bergmann
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).