Re:[PATCH 1/1] [Add support Mediatek mt7921U]

2021-01-23 Thread sean.wang
From: Sean Wang Hi Mark >From: "mark-yw.chen" > Please use the appropirate version and prefix for the subject such as [PATCH v4] Bluetooth: btusb: Add protocol support for MediaTek MT7921U USB devices > >This patch adds the support of enableing MT7921U, it's USB-based Bluetooth >function. >

[PATCH net-next] net: Update MAINTAINERS for MediaTek switch driver

2020-09-21 Thread sean.wang
From: Sean Wang Update maintainers for MediaTek switch driver with Landen Chao who is familiar with MediaTek MT753x switch devices and will help maintenance from the vendor side. Cc: Steven Liu Signed-off-by: Sean Wang Signed-off-by: Landen Chao --- MAINTAINERS | 1 + 1 file changed, 1 inser

[PATCH v5] tty: serial: don't do termios for BTIF

2020-07-07 Thread sean.wang
From: Sean Wang Bluetooth Interface (BTIF) is designed dedicatedly for MediaTek SOC with BT in order to be instead of the UART interface between BT module and Host CPU, and not exported to user space to access. As the UART design, BTIF will be an APB slave and can transmit or receive data by MCU

Re: [PATCH 1/3] mt76: mt7663u: fix memory leak in set key

2020-06-30 Thread sean.wang
From: Sean Wang Thanks, I'll have the next version to remove the unneeded kfree. > >> + >> +return err; >> } >> >> void mt7663u_wtbl_work(struct work_struct *work)

Re: [PATCH v2 1/2] Bluetooth: btusb: fix up firmware download sequence

2020-06-22 Thread sean.wang
From: Sean Wang >Hi Sean, > >> From: Sean Wang >> >> Data RAM on the device have to be powered on before starting to >> download the firmware. >> >> v1->v2: >> rebased to bluetooth-next >> >> Fixes: a1c49c434e15 ("Bluetooth: btusb: Add protocol support for >> MediaTek MT7668U USB devices")

[PATCH v4] tty: serial: don't do termios for BTIF

2020-06-19 Thread sean.wang
From: Sean Wang Bluetooth Interface (BTIF) is designed dedicatedly for MediaTek SOC with BT in order to be instead of the UART interface between BT module and Host CPU, and not exported to user space to access. As the UART design, BTIF will be an APB slave and can transmit or receive data by MCU

[PATCH v2 1/2] Bluetooth: btusb: fix up firmware download sequence

2020-06-19 Thread sean.wang
From: Sean Wang Data RAM on the device have to be powered on before starting to download the firmware. v1->v2: rebased to bluetooth-next Fixes: a1c49c434e15 ("Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices") Co-developed-by: Mark Chen Signed-off-by: Mark Chen

[PATCH v2 2/2] Bluetooth: btmtksdio: fix up firmware download sequence

2020-06-19 Thread sean.wang
From: Sean Wang Data RAM on the device have to be powered on before starting to download the firmware. v1->v2: rebased to bluetooth-next Fixes: 9aebfd4a2200 ("Bluetooth: mediatek: add support for MediaTek MT7663S and MT7668S SDIO devices") Co-developed-by: Mark Chen Signed-off-by: Mar

[PATCH 1/2] Bluetooth: btusb: fix up firmware download sequence

2020-06-18 Thread sean.wang
From: Sean Wang Data RAM on the device have to be powered on before starting to download the firmware. Fixes: a1c49c434e15 ("Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices") Co-developed-by: Mark Chen Signed-off-by: Mark Chen Signed-off-by: Sean Wang --- drivers/blu

[PATCH 2/2] Bluetooth: btmtksdio: fix up firmware download sequence

2020-06-18 Thread sean.wang
From: Sean Wang Data RAM on the device have to be powered on before starting to download the firmware. Fixes: 9aebfd4a2200 ("Bluetooth: mediatek: add support for MediaTek MT7663S and MT7668S SDIO devices") Co-developed-by: Mark Chen Signed-off-by: Mark Chen Signed-off-by: Sean Wang --- driv

Re: [PATCH v3] tty: serial: don't do termios for BTIF

2020-06-16 Thread sean.wang
From: Sean Wang >> >> From: Sean Wang >> >> Bluetooth Interface (BTIF) is designed dedicatedly for MediaTek SOC >> with BT in order to be instead of the UART interface between BT module >> and Host CPU, and not exported to user space to access. >> >> As the UART design, BTIF will be an APB slave

Re: [PATCH v3] tty: serial: don't do termios for BTIF

2020-06-16 Thread sean.wang
From: Sean Wang >On Thu, Apr 23, 2020 at 02:02:08AM +0800, sean.w...@mediatek.com wrote: >> From: Sean Wang >> >> Bluetooth Interface (BTIF) is designed dedicatedly for MediaTek SOC >> with BT in order to be instead of the UART interface between BT module >> and Host CPU, and not exported to use

[PATCH net-next] net: Update address for MediaTek ethernet driver in MAINTAINERS

2019-10-16 Thread sean.wang
From: Sean Wang Update maintainers for MediaTek ethernet driver with Mark Lee. He is familiar with MediaTek mt762x series ethernet devices and will keep following maintenance from the vendor side. Signed-off-by: Sean Wang Signed-off-by: Mark Lee --- MAINTAINERS | 2 +- 1 file changed, 1 inser

[PATCH net v1] net: ethernet: mediatek: Fixed several errors caused by undefined symbols

2019-06-04 Thread sean.wang
From: Sean Wang Fixed several errors caused by undefined symbols catched by kbuild test robot. ERROR: "mtk_sgmii_init" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined! ERROR: "mtk_setup_hw_path" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined! ERROR: "mtk_sgmii_setup_mode_for

[PATCH v1 3/4] Bluetooth: btmtkuart: add an implementation for boot-gpios property

2019-06-01 Thread sean.wang
From: Sean Wang Not every platform has the pinctrl device integrates the GPIO the function such as MT7621 whose pinctrl and GPIO are separate hardware so the driver adds additional boot-gpios to let the MT766[3,8]U can enter the proper boot mode by gpiod for such platform. Signed-off-by: Sean Wa

[PATCH v1 1/4] dt-bindings: net: bluetooth: add boot-gpios property to UART-based device

2019-06-01 Thread sean.wang
From: Sean Wang Not every platform has the pinctrl device integrates the GPIO the function such as MT7621 whose pinctrl and GPIO are separate hardware so adding an additional boot-gpios property for such platform allows them to bring up the device. Signed-off-by: Sean Wang --- .../devicetree/b

[PATCH v1 2/4] dt-bindings: net: bluetooth: add clock property to UART-based device

2019-06-01 Thread sean.wang
From: Sean Wang Some board requires explicitily control external osscilator via GPIO. So, add a clock property for an external oscillator for the device. Signed-off-by: Sean Wang --- Documentation/devicetree/bindings/net/mediatek-bluetooth.txt | 4 1 file changed, 4 insertions(+) diff --

[PATCH v1 4/4] Bluetooth: btmtkuart: add an implementation for clock osc property

2019-06-01 Thread sean.wang
From: Sean Wang Some board requires explicitily control external osscilator via GPIO. So, add an implementation of a clock property for an external oscillator to the device. Signed-off-by: Sean Wang --- drivers/bluetooth/btmtkuart.c | 21 ++--- 1 file changed, 18 insertions(+),

[PATCH v1 0/4] add boot-gpios and clock property to btmtkuart

2019-06-01 Thread sean.wang
From: Sean Wang Update dt-binding and the corresponding implmentation of boot-gpios and clock property to btmtkuart. Sean Wang (4): dt-bindings: net: bluetooth: add boot-gpios property to UART-based device dt-bindings: net: bluetooth: add clock property to UART-based device Bluetooth:

[PATCH v7 0/2] Bluetooth: btusb: Add protocol support for MediaTek USB devices

2019-06-01 Thread sean.wang
From: Sean Wang v7: * rebase to latest code base. v6: * fix drivers/bluetooth/btusb.c:2683:2-3: Unneeded semicolon based reported by [1] * update power-on sequence with adding neccesary tci sleep comand to set up low-power environmnet and a delay to wait the device to be stable. * sort variab

[PATCH v7 1/2] Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices

2019-06-01 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7668U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.00 C

[PATCH v7 2/2] Bluetooth: btusb: Add protocol support for MediaTek MT7663U USB devices

2019-06-01 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7663U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=5000 MxCh= 0 D: Ver= 3.00 C

[PATCH net v1 1/2] net: ethernet: mediatek: Use hw_feature to judge if HWLRO is supported

2019-05-31 Thread sean.wang
From: Sean Wang Should hw_feature as hardware capability flags to check if hardware LRO got support. Signed-off-by: Mark Lee Signed-off-by: Sean Wang --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/et

[PATCH net v1 2/2] net: ethernet: mediatek: Use NET_IP_ALIGN to judge if HW RX_2BYTE_OFFSET is enabled

2019-05-31 Thread sean.wang
From: Sean Wang Should only enable HW RX_2BYTE_OFFSET function in the case NET_IP_ALIGN equals to 2. Signed-off-by: Mark Lee Signed-off-by: Sean Wang --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/medi

[PATCH net-next v1 4/6] net: ethernet: mediatek: Integrate hardware path from GMAC to PHY variants

2019-05-31 Thread sean.wang
From: Sean Wang All path route on various SoCs all would be managed in common function mtk_setup_hw_path that is determined by the both applied devicetree regarding the path between GMAC and the target PHY or switch by the capability of target SoC in the runtime. Signed-off-by: Sean Wang --- d

[PATCH net-next v1 1/6] dt-bindings: clock: mediatek: Add an extra required property to sgmiisys

2019-05-31 Thread sean.wang
From: Sean Wang add an extra required property "mediatek,physpeed" to sgmiisys to determine link speed to match up the capability of the target PHY. Signed-off-by: Sean Wang --- .../devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH net-next v1 6/6] arm64: dts: mt7622: Enlarge the SGMII register range

2019-05-31 Thread sean.wang
From: Sean Wang Enlarge the SGMII register range and using 2.5G force mode on default. Signed-off-by: Sean Wang --- arch/arm64/boot/dts/mediatek/mt7622.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/med

[PATCH net-next v1 0/6] Add MT7629 ethernet support

2019-05-31 Thread sean.wang
From: Sean Wang MT7629 inlcudes two sets of SGMIIs used for external switch or PHY, and embedded switch (ESW) via GDM1, GePHY via GMAC2, so add several patches in the series to make the code base common with the old SoCs. The patch 1, 3 and 6, adds extension for SGMII to have the hardware config

[PATCH net-next v1 2/6] dt-bindings: net: mediatek: Add support for MediaTek MT7629 SoC

2019-05-31 Thread sean.wang
From: Sean Wang Add binding document for the ethernet on MT7629 SoC. Signed-off-by: Sean Wang --- .../devicetree/bindings/net/mediatek-net.txt | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/mediatek-net.txt b/Doc

[PATCH net-next v1 5/6] net: ethernet: mediatek: Add MT7629 ethernet support

2019-05-31 Thread sean.wang
From: Sean Wang Add ethernet support to MT7629 SoC Signed-off-by: Sean Wang --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 14 -- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 19 +++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/drivers/net/eth

[PATCH net-next v1 3/6] net: ethernet: mediatek: Extend SGMII related functions

2019-05-31 Thread sean.wang
From: Sean Wang Add SGMII related logic into a separate file, and also provides options for forcing 1G, 2.5, AN mode for the target PHY, that can be determined from SGMII node in DTS. Signed-off-by: Sean Wang --- drivers/net/ethernet/mediatek/Makefile | 2 +- drivers/net/ethernet/mediat

[PATCH v1 2/4] Bluetooth: btmtksdio: Add a bit definition for CHLPCR

2019-04-18 Thread sean.wang
From: Sean Wang Add a register bit definition about CHLPCR bit 8 because the bit is quite different in the meaning between reading and writing that bit. The patch adds a definition particularly for the bit read to avoid the confusion about using write definition to read the bit. Signed-off-by:

[PATCH v1 0/4] Add a couple of enhancements to btmtksdio

2019-04-18 Thread sean.wang
From: Sean Wang First three are all minor changes and the final one adds a runtime pm support to enter a lower power state for decreasing power dissipation when there is idle traffic in SDIO transport for a while. Sean Wang (4): Bluetooth: btmtksdio: Drop newline with bt_dev logging macros B

[PATCH v1 1/4] Bluetooth: btmtksdio: Drop newline with bt_dev logging macros

2019-04-18 Thread sean.wang
From: Sean Wang bt_dev logging macros already include a newline at each output so drop these unnecessary additional newlines in the driver. Signed-off-by: Sean Wang --- drivers/bluetooth/btmtksdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/bluetooth/btm

[PATCH v1 3/4] Bluetooth: btmtksdio: Fix hdev->stat.byte_rx accumulation

2019-04-18 Thread sean.wang
From: Sean Wang Accumulate hdev->stat.byte_rx only for valid packets as btmtkuart doing. Signed-off-by: Sean Wang --- drivers/bluetooth/btmtksdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c index 9c123a

[PATCH v1 4/4] Bluetooth: btmtksdio: Add runtime PM support to SDIO based Bluetooth

2019-04-18 Thread sean.wang
From: Sean Wang Add runtime PM support to btmtksdio. With this way, there will be the benefit of the device entering the more power saving state once it is been a while data traffic is idle. Signed-off-by: Sean Wang --- drivers/bluetooth/btmtksdio.c | 144 ++ 1

[PATCH v2] Bluetooth: btmtksdio: fix uninitialized symbol errors in btmtksdio_rx_packet

2019-03-18 Thread sean.wang
From: Sean Wang Fixed all the below warnings. They would probably cause the following error handling path would use the uninitialized value and then produce unexpected behavior. drivers/bluetooth/btmtksdio.c:470:2: warning: ‘old_len’ may be used uninitialized in this function [-Wmaybe-uninitiali

[PATCH v1 1/3] mmc: sdio: Add helper macro for sdio_driver boilerplate

2019-03-13 Thread sean.wang
From: Sean Wang This patch introduces the module_sdio_driver macro which is a convenience macro for SDIO driver modules similar to module_usb_driver. It is intended to be used by drivers which init/exit section does nothing but register/ unregister the SDIO driver. By using this macro it is possi

[PATCH v1 3/3] Bluetooth: btsdio: Use module_sdio_driver helper

2019-03-13 Thread sean.wang
From: Sean Wang Macro module_sdio_driver is used for drivers whose init and exit paths only register and unregister to SDIO API. So remove boilerplate code to make code simpler by using module_sdio_driver. Cc: Marcel Holtmann Cc: Ulf Hansson Signed-off-by: Sean Wang --- drivers/bluetooth/bts

[PATCH v1 0/3] add module_sdio_driver and enable a few users

2019-03-13 Thread sean.wang
From: Sean Wang Add module_sdio_driver exactly like the function module_usb_drivear offers to and enable a few users to eliminate a few lines of boilerplate code per SDIO driver. Sean Wang (3): mmc: sdio: Add helper macro for sdio_driver boilerplate Bluetooth: mediatek: Use module_sdio_drive

[PATCH v1 2/3] Bluetooth: mediatek: Use module_sdio_driver helper

2019-03-13 Thread sean.wang
From: Sean Wang Macro module_sdio_driver is used for drivers whose init and exit paths only register and unregister to SDIO API. So remove boilerplate code to make code simpler by using module_sdio_driver. Cc: Ulf Hansson Suggested-by: Marcel Holtmann Signed-off-by: Sean Wang --- drivers/blu

[PATCH] Bluetooth: mediatek: fix uninitialized symbol errors in btmtksdio_rx_packet

2019-03-13 Thread sean.wang
From: Sean Wang Fixed all the below warnings. They would probably cause the following error handling path would use the uninitialized value and then produce unexpected behavior. drivers/bluetooth/btmtksdio.c:470:2: warning: ‘old_len’ may be used uninitialized in this function [-Wmaybe-uninitiali

[PATCH v1 1/2] mmc: add SDIO identifiers for MediaTek Bluetooth devices

2019-03-07 Thread sean.wang
From: Sean Wang The SDIO identifier for MediaTek Bluetooth devices were defined in the MediaTek Bluetooth driver. Moving the definitions in MMC header file seems common sense. Signed-off-by: Sean Wang --- include/linux/mmc/sdio_ids.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includ

[PATCH v1 0/2] Bluetooth: mediatek: add support for MediaTek MT7663S and MT7668S SDIO devices

2019-03-07 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7663S and MT7668S SDIO-based Bluetooth function. patch 1: add MediaTek SDIO identifiers patch 2: add support for MediaTek MT7663S and MT7668S SDIO devices Sean Wang (2): mmc: add SDIO identifiers for MediaTek Bluetooth devices Bluetooth:

[PATCH v1 2/2] Bluetooth: mediatek: add support for MediaTek MT7663S and MT7668S SDIO devices

2019-03-07 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7663S and MT7668S SDIO-based Bluetooth function. There are quite many differences between MT766[3,8]S and standard Bluetooth SDIO devices such as Type-A and Type-B devices. For example, MT766[3,8]S have its own SDIO registers layout, definition

[PATCH] Bluetooth: mediatek: Fixed incorrect type in assignment

2019-03-04 Thread sean.wang
From: Sean Wang Fixed warning: incorrect type in assignment reported by kbuild test robot. The detailed warning is shown as below. make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' All warnings (new ones prefixed by >>): btmtkuart.c:671:18: sparse:warning:

[PATCH RESEND v2] Bluetooth: mediatek: add support for MediaTek MT7663U and MT7668U UART devices

2019-03-02 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7663U and MT7668U Bluetooth function running on the top of btmtkuart driver. There are a few differences between MT766[3,8]U and MT7622 where MT766[3,8]U are standalone devices based on UART transport while MT7622 bluetooth is a built-in device

[PATCH v2 1/2] dt-bindings: net: bluetooth: add support for MediaTek MT7663U and MT7668U UART devices

2019-02-28 Thread sean.wang
From: Sean Wang Update binding document with adding support of MT7663U and MT7668U UART devices to mediatek-bluetooth. Reviewed-by: Rob Herring Signed-off-by: Sean Wang --- .../bindings/net/mediatek-bluetooth.txt | 64 +++ 1 file changed, 64 insertions(+) diff --git a/D

[PATCH v2 2/2] Bluetooth: mediatek: add support for MediaTek MT7663U and MT7668U UART devices

2019-02-28 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7663U and MT7668U Bluetooth function running on the top of btmtkuart driver. There are a few differences between MT766[3,8]U and MT7622 where MT766[3,8]U are standalone devices based on UART transport while MT7622 bluetooth is a built-in device

[PATCH v2 0/2] Bluetooth: mediatek: add support for MediaTek MT7663U and MT7668U UART devices

2019-02-28 Thread sean.wang
From: Sean Wang v2: changes since v1 - add Rob's review tag - removed these merged patches This adds the support of enabling MT7668U and MT7663U UART based Bluetooth function running on the top of btmtkuart driver. We are through several patches to reach the goal and also wish applied the same

[PATCH 0/6]Bluetooth: mediatek: add support for MediaTek MT7663U and MT7668U UART devices

2019-02-14 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7668U and MT7663U UART based Bluetooth function running on the top of btmtkuart driver. We are through several patches to reach the goal and also wish applied the same flow in MediaTek btusb [1] for the transport independence. Once [1] and the

[PATCH 6/6] Bluetooth: mediatek: add support for MediaTek MT7663U and MT7668U UART devices

2019-02-14 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7663U and MT7668U Bluetooth function running on the top of btmtkuart driver. There are a few differences between MT766[3,8]U and MT7622 where MT766[3,8]U are standalone devices based on UART transport while MT7622 bluetooth is a built-in device

[PATCH 2/6] Bluetooth: mediatek: trivial typo fix

2019-02-14 Thread sean.wang
From: Sean Wang add a trivial typo fix from speicfic to specific Fixes: 7237c4c9ec92 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices") Signed-off-by: Sean Wang --- drivers/bluetooth/btmtkuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 3/6] Bluetooth: mediatek: fix up an error path to restore bdev->tx_state

2019-02-14 Thread sean.wang
From: Sean Wang Restore bdev->tx_state with clearing bit BTMTKUART_TX_WAIT_VND_EVT when there is an error on waiting for the corresponding event. Fixes: 7237c4c9ec92 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices") Signed-off-by: Sean Wang --- drivers/bluetooth/btmtku

[PATCH 5/6] Bluetooth: mediatek: update the common setup between MT7622 and other devices

2019-02-14 Thread sean.wang
From: Sean Wang Update the setup sequence on MT7622 to apply the same flow with MT7663U and MT7668U USB [1] as much as possible. These additional commands are required to parse the corresponding event to determine what current state the Bluetooth device is on and thus it's necessary to extend mtk

[PATCH 1/6] dt-bindings: net: bluetooth: add support for MediaTek MT7663U and MT7668U UART devices

2019-02-14 Thread sean.wang
From: Sean Wang Update binding document with adding support of MT7663U and MT7668U UART devices to mediatek-bluetooth. Signed-off-by: Sean Wang --- .../bindings/net/mediatek-bluetooth.txt | 64 +++ 1 file changed, 64 insertions(+) diff --git a/Documentation/devicetree/bi

[PATCH 4/6] Bluetooth: mediatek: pass a pointer to mtk_hci_wmt_sync

2019-02-14 Thread sean.wang
From: Sean Wang Pass a structure pointer to mtk_hci_wmt_sync rather than several arguments to avoid take up additional stack area and be better to read the code. Signed-off-by: Sean Wang --- drivers/bluetooth/btmtkuart.c | 63 ++- 1 file changed, 48 insertions(+

[PATCH v6 1/2] Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices

2019-01-24 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7668U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.00 C

[PATCH v6 0/2] Bluetooth: btusb: Add protocol support for MediaTek USB devices

2019-01-24 Thread sean.wang
From: Sean Wang v6: * fix drivers/bluetooth/btusb.c:2683:2-3: Unneeded semicolon based reported by [1] * update power-on sequence with adding neccesary tci sleep comand to set up low-power environmnet and a delay to wait the device to be stable. * sort variables declarations in reverse xmas or

[PATCH v6 2/2] Bluetooth: btusb: Add protocol support for MediaTek MT7663U USB devices

2019-01-24 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7663U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=5000 MxCh= 0 D: Ver= 3.00 C

[PATCH v5 2/2] Bluetooth: btusb: Add protocol support for MediaTek MT7663U USB devices

2019-01-18 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7663U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=5000 MxCh= 0 D: Ver= 3.00 C

[PATCH v5 0/2] Bluetooth: btusb: Add protocol support for MediaTek USB devices

2019-01-18 Thread sean.wang
From: Sean Wang v5: * rebase to the latest code base. * change the subject prefix. * change the place the firmware located at. v4: * use new BTUSB_TX_WAIT_VND_EVT instead of BTMTKUSB_TX_WAIT_VND_EVT to avoid definition conflict and to fix bulk data transfer fails. * use the bluetooth-next as t

[PATCH v5 1/2] Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices

2019-01-18 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7668U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.00 C

[PATCH] MAINTAINERS: update entry for Mediatek pin controller

2018-10-04 Thread sean.wang
From: Sean Wang Add all source files under drivers/pinctrl/mediatek for the entry and change the address to a permanent one since I have a personal leave over the next few months and the address would be suspended for a while. Cc: Linus Walleij Signed-off-by: Sean Wang Signed-off-by: Sean Wang

[PATCH 2/4] pinctrl: mediatek: add no eint function for pin define

2018-09-20 Thread sean.wang
From: Mars Cheng Add NO_EINT_SUPPORT back to pinctrl-mtk-common-v2.h as the alias of EINT_NA to indicate that some pin not capable of being controlled as eint and that is required by pinctrl-paris based driver as old pinctrl-mtk-common.h already had. Signed-off-by: Mars Cheng Signed-off-by: Sea

[PATCH 1/4] pinctrl: mediatek: fix static checker warning caused by EINT_NA

2018-09-20 Thread sean.wang
From: Sean Wang EINT_NA is an u16 number, so it should be U16_MAX instead of -1 to fix up drivers/pinctrl/mediatek/pinctrl-paris.c:732 mtk_gpio_to_irq() warn: impossible condition (desc->eint.eint_n == -1) => (0-u16max == (-1)) Also happens in drivers/pinctrl/mediatek/pinctrl-paris.c:749 mtk_gpi

[PATCH 3/4] pinctrl: mediatek: add MT6765 pinctrl driver

2018-09-20 Thread sean.wang
From: ZH Chen Add MT6765 pinctrl driver based on MediaTek pinctrl-paris core. Signed-off-by: Mars Cheng Signed-off-by: ZH Chen Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/Kconfig |7 + drivers/pinctrl/mediatek/Makefile |1 + drivers/pinctrl/mediatek

[PATCH 4/4] pinctrl: mediatek: add eint support to MT6765 pinctrl driver

2018-09-20 Thread sean.wang
From: Mars Cheng Just add eint support to MT6765 pinctrl driver as usual as happens on the other SoCs. Signed-off-by: Mars Cheng Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-mt6765.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/pinctrl/mediatek/pinctrl-

[PATCH v2 15/22] pinctrl: mediatek: adjust error code and message when some register not supported is found

2018-09-08 Thread sean.wang
From: Sean Wang It's usual and not an error for there's some register not supported by a certain SoC or a pin so that in the case we have to adjust the message to print and the error code to get rid of unnecessary false alarm. Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-mtk-c

[PATCH v2 03/22] pinctrl: mediatek: extend struct mtk_pin_field_calc to pinctrl-mtk-common-v2.c

2018-09-08 Thread sean.wang
From: Sean Wang This patch adds members sz_reg fixed in struct mtk_pin_field_calc - The 'fixed' is used to represent the consecutive pins share the same bits within the same register with the 1st pin so that it can largely reduce the entry size a bit. - The 'sz_reg' is used to indicate the rang

[PATCH v2 22/22] pinctrl: mediatek: add eint support to MT8183 pinctrl driver

2018-09-08 Thread sean.wang
From: Sean Wang Just add eint support to MT8183 pinctrl driver as usual as happens on the other SoCs. Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-mt8183.c | 8 drivers/pinctrl/mediatek/pinctrl-paris.c | 22 ++ 2 files changed, 30 insertions(+)

[PATCH v2 13/22] pinctrl: mediatek: use pin descriptor all in pinctrl-mtk-common-v2.c

2018-09-08 Thread sean.wang
From: Sean Wang all use pin descriptor instead in pinctrl-mtk-common-v2.c for the consistency and extensibility. Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-moore.c | 66 +--- drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 76 +-

[PATCH v2 16/22] pinctrl: mediatek: extend struct mtk_pin_desc which per-pin driver depends on

2018-09-08 Thread sean.wang
From: Sean Wang Because the pincrl-mtk-common.c is an implementation for per-pin binding, its pin descriptor includes more information than pinctrl-mtk-common-v2 so far can support. So, we complement these data before writing a driver using pincrl-mtk-common-v2.c for per-pin binding. By the way,

[PATCH v2 12/22] pinctrl: mediatek: add MT7623 pinctrl driver based on generic pinctrl binding

2018-09-08 Thread sean.wang
From: Sean Wang Adding MT7623 pinctrl driver based on generic pinctrl binding, that is good example and demonstrates how to port any other MediaTek SoCs pinctrl-moore core when people really would like to use the generic pinctrl binding to support these MediaTek SoCs. Signed-off-by: Ryder Lee S

[PATCH v2 18/22] pinctrl: mediatek: add MT8183 pinctrl driver

2018-09-08 Thread sean.wang
From: Zhiyong Tao Add MT8183 pinctrl driver based on MediaTek pinctrl-paris core. Signed-off-by: Zhiyong Tao Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/Kconfig |7 + drivers/pinctrl/mediatek/Makefile |1 + drivers/pinctrl/mediatek/pinctrl-mt8183.c

[PATCH v2 20/22] pintcrl: mediatek: add pull tweaks for I2C related pins on MT8183

2018-09-08 Thread sean.wang
From: Zhiyong Tao This patch provides the advanced pull for I2C used pins on MT8183. Signed-off-by: Zhiyong Tao Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-mt8183.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/pinctrl/mediatek/pinctrl

[PATCH v2 00/22] Unify MediaTek pinctrl in preparation for MT8183 and MT6765

2018-09-08 Thread sean.wang
From: Sean Wang v2 and changes since v1: add new patches * Add additional patch 17 to 22 to support MT8183 SoC update the existing patches * Patch 2: Removed unnecessary blank line and headers included. * Patch 4: Extended the size eint number can hold since it's possible more than 254 pins in

[PATCH v2 17/22] pinctrl: mediatek: add pinctrl-paris that implements the vendor dt-bindings

2018-09-08 Thread sean.wang
From: Zhiyong Tao Add pinctrl-paris core that implements vendor dt-binding which MediaTek tablet, box and smartphone-based SoCs such as MT81xx, MT27xx, and MT67xx SoCs really want to depend on. The driver is just completely rewritten according to pinctrl-mtk-common.c but uses the new logic from p

[PATCH v2 21/22] pinctrl: mediatek: extend eint build to pinctrl-mtk-common-v2.c

2018-09-08 Thread sean.wang
From: Sean Wang Almost all MediaTek SoCs apply the exact same logic to build eint, so move the common functions into pinctrl-mtk-common-v2.c to allow each new pinctrl driver to reuse them. Also, add a protection checker on hw->soc->eint_hw to avoid invalid memory access when there's certain SoC n

[PATCH v2 19/22] pinctrl: mediatek: extend advanced pull support in pinctrl-mtk-common-v2.c

2018-09-08 Thread sean.wang
From: Sean Wang Extend the advanced pull based on the legacy bias plus additional r0 and r1 to tweak the resistor level. Signed-off-by: Zhiyong Tao Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 37 1 file changed, 32 insertions(+), 5

[PATCH v2 14/22] pinctrl: mediatek: add multiple register bases support to pinctrl-mtk-common-v2.c

2018-09-08 Thread sean.wang
From: Sean Wang Certain SoC own multiple register base for accessing each pin groups, it's easy to be done with extend struct mtk_pin_field_calc to support the kind of SoC such as MT8183. Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-moore.c | 30 +++- d

[PATCH v4 2/2] Bluetooth: mediatek: Add protocol support for MediaTek MT7663U USB devices

2018-09-03 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7663U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=5000 MxCh= 0 D: Ver= 3.00 C

[PATCH v4 1/2] Bluetooth: mediatek: Add protocol support for MediaTek MT7668U USB devices

2018-09-03 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7668U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.00 C

[PATCH v4 0/2] Bluetooth: mediatek: Add protocol support for MediaTek USB devices

2018-09-03 Thread sean.wang
From: Sean Wang v4: * use new BTUSB_TX_WAIT_VND_EVT instead of BTMTKUSB_TX_WAIT_VND_EVT to avoid definition conflict and to fix bulk data transfer fails. * use the bluetooth-next as the base v3: add fixes and enhancements based on [1] * reuse flags and evt_skb btusb already had * add ctrl_anch

[PATCH v3 0/2] Bluetooth: mediatek: Add protocol support for MediaTek USB devices

2018-09-03 Thread sean.wang
From: Sean Wang v3: add fixes and enhancements based on [1] * reuse flags and evt_skb btusb already had * add ctrl_anchor and the corresponding handling * apply mtk specific recv function * add more comments explaining wmt ctrl urbs behavior. [1] http://lists.infradead.org/pipermail/linux-mediat

[PATCH v3 1/2] Bluetooth: mediatek: Add protocol support for MediaTek MT7668U USB devices

2018-09-03 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7668U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.00 C

[PATCH v3 2/2] Bluetooth: mediatek: Add protocol support for MediaTek MT7663U USB devices

2018-09-03 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7663U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=5000 MxCh= 0 D: Ver= 3.00 C

[PATCH 14/16] pinctrl: mediatek: add multiple register bases support to pinctrl-mtk-common-v2.c

2018-08-27 Thread sean.wang
From: Sean Wang Certain SoC own multiple register base for accessing each pin groups, it's easy to be done with extend struct mtk_pin_field_calc to support the kind of SoC such as MT8183. Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-moore.c | 30 +++- d

[PATCH 13/16] pinctrl: mediatek: use pin descriptor all in pinctrl-mtk-common-v2.c

2018-08-27 Thread sean.wang
From: Sean Wang all use pin descriptor instead in pinctrl-mtk-common-v2.c for the consistency and extensibility. Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-moore.c | 66 +--- drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 76 +-

[PATCH 12/16] pinctrl: mediatek: add MT7623 pinctrl driver based on generic pinctrl binding

2018-08-27 Thread sean.wang
From: Sean Wang Adding MT7623 pinctrl driver based on generic pinctrl binding, that is good example and demonstrates how to port any other MediaTek SoCs pinctrl-moore core when people really would like to use the generic pinctrl binding to support these MediaTek SoCs. Signed-off-by: Ryder Lee S

[PATCH 00/16] Unify MediaTek pinctrl in preparation for MT8183 and MT6765

2018-08-27 Thread sean.wang
From: Sean Wang Irregular register arrangement and their logic access from various MediaTek SoCs being introduced already causes pinctrl-mtk-common to bloat and became really hard to maintain so that the patch creates pinctrl-mtk-common-v2 based on the core of mt7622 pinctrl to try make the regis

[PATCH 15/16] pinctrl: mediatek: adjust error code and message when some register not supported is found

2018-08-27 Thread sean.wang
From: Sean Wang It's usual and not an error for there's some register not supported by a certain SoC or a pin so that in the case we have to adjust the message to print and the error code to get rid of unnecessary false alarm. Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-mtk-c

[PATCH 16/16] pinctrl: mediatek: extend struct mtk_pin_desc which per-pin driver depends on

2018-08-27 Thread sean.wang
From: Sean Wang Because the pincrl-mtk-common.c is an implementation for per-pin binding, its pin descriptor includes more information than pinctrl-mtk-common-v2 so far can support. So, we complement these data before writing a driver using pincrl-mtk-common-v2.c for per-pin binding. By the way,

[PATCH 03/16] pinctrl: mediatek: extend struct mtk_pin_field_calc to pinctrl-mtk-common-v2.c

2018-08-27 Thread sean.wang
From: Sean Wang This patch adds members sz_reg fixed in struct mtk_pin_field_calc - The 'fixed' is used to represent the consecutive pins share the same bits within the same register with the 1st pin so that it can largely reduce the entry size a bit. - The 'sz_reg' is used to indicate the rang

[PATCH v2 0/2] Bluetooth: mediatek: Add protocol support for MediaTek USB devices

2018-08-20 Thread sean.wang
From: Sean Wang v2: add fixes and enhancements based on [1] * include /sys/kernel/debug/usb/devices portion in the commit message. * turn default into n for config BT_HCIBTUSB_MTK in Kconfig * only add MediaTek support to btusb.c * drop cmd_sync callback usage * use __hci_cmd_send to send WMT co

[PATCH v2 1/2] Bluetooth: mediatek: Add protocol support for MediaTek MT7668U USB devices

2018-08-20 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7668U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.00 C

[PATCH v2 2/2] Bluetooth: mediatek: Add protocol support for MediaTek MT7663U USB devices

2018-08-20 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7663U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=5000 MxCh= 0 D: Ver= 3.00 C

[PATCH v1 0/2] Bluetooth: mediatek: Add protocol support for MediaTek USB devices

2018-08-12 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7668U and MT7663U Bluetooth function running on the top of btusb driver. The patch also adds a newly created file mtkbt.c able to be reused independently from the transport type such as UART, USB and SDIO. Sean Wang (2): Bluetooth: mediatek:

[PATCH v1 2/2] Bluetooth: mediatek: Add protocol support for MediaTek MT7663U USB devices

2018-08-12 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7663U Bluetooth function running on the top of btusb driver. Signed-off-by: Sean Wang --- drivers/bluetooth/btmtk.c | 1 + drivers/bluetooth/btmtk.h | 1 + drivers/bluetooth/btusb.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/driv

[PATCH v1 1/2] Bluetooth: mediatek: Add protocol support for MediaTek MT7668U USB devices

2018-08-12 Thread sean.wang
From: Sean Wang This adds the support of enabling MT7668U Bluetooth function running on the top of btusb driver. The patch also adds a newly created file mtkbt.c able to be reused independently from the transport type such as UART, USB and SDIO. Signed-off-by: Sean Wang --- drivers/bluetooth/K

  1   2   3   4   5   6   7   8   >