linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Samsung TM2(e): add Bluetooth support (resend)
       [not found] <CGME20181214113415eucas1p16dd61a4312d88216cb0d737887c751b7@eucas1p1.samsung.com>
@ 2018-12-14 11:34 ` Marek Szyprowski
       [not found]   ` <CGME20181214113416eucas1p2002adf7b5438c525c34ff3274ceacbd1@eucas1p2.samsung.com>
                     ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Marek Szyprowski @ 2018-12-14 11:34 UTC (permalink / raw)
  To: linux-kernel, linux-serial, linux-samsung-soc
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Beomho Seo, Seung-Woo Kim, Sylwester Nawrocki, Lee Jones,
	Greg Kroah-Hartman

Hi All

This patchset enables Bluetooth support on TM2/TM2e boards using mainline
HCI_BCM driver. It requires a few fixes to Samsung serial driver and
adding a proper node to device tree description of the mentioned boards.
Patches can be applied independently to each subsystem.

Best regards
Marek Szyprowski
Samsung R&D Institute Poland


(resend reason: added respective maintainers and lists to cc)

Patch summary:

Beomho Seo (2):
  mfd: exynos-lpass: Enable UART module support
  tty: serial: samsung: Properly set flags in autoCTS mode

Marek Szyprowski (1):
  arm64: dts: exynos: Add Bluetooth chip to TM2(e) boards

Seung-Woo Kim (1):
  tty: serial: samsung: Increase maximum baudrate

 .../boot/dts/exynos/exynos5433-tm2-common.dtsi     | 14 ++++++++++++++
 drivers/mfd/exynos-lpass.c                         |  4 +++-
 drivers/tty/serial/samsung.c                       |  5 ++++-
 3 files changed, 21 insertions(+), 2 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/4] mfd: exynos-lpass: Enable UART module support
       [not found]   ` <CGME20181214113416eucas1p2002adf7b5438c525c34ff3274ceacbd1@eucas1p2.samsung.com>
@ 2018-12-14 11:34     ` Marek Szyprowski
  2018-12-21 10:13       ` Lee Jones
  0 siblings, 1 reply; 14+ messages in thread
From: Marek Szyprowski @ 2018-12-14 11:34 UTC (permalink / raw)
  To: linux-kernel, linux-serial, linux-samsung-soc
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Beomho Seo, Seung-Woo Kim, Sylwester Nawrocki, Lee Jones,
	Greg Kroah-Hartman

From: Beomho Seo <beomho.seo@samsung.com>

This patch enables support for UART module in Exynos Audio SubSystem.
There are boards (for example TM2), which use it for communication with
bluetooth chip.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
[mszyprow: rephrased commit message, added UART reset]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
 drivers/mfd/exynos-lpass.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c
index ca829f85672f..2713de989f05 100644
--- a/drivers/mfd/exynos-lpass.c
+++ b/drivers/mfd/exynos-lpass.c
@@ -82,11 +82,13 @@ static void exynos_lpass_enable(struct exynos_lpass *lpass)
 		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S);
 
 	regmap_write(lpass->top, SFR_LPASS_INTR_CPU_MASK,
-		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S);
+		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S |
+		     LPASS_INTR_UART);
 
 	exynos_lpass_core_sw_reset(lpass, LPASS_I2S_SW_RESET);
 	exynos_lpass_core_sw_reset(lpass, LPASS_DMA_SW_RESET);
 	exynos_lpass_core_sw_reset(lpass, LPASS_MEM_SW_RESET);
+	exynos_lpass_core_sw_reset(lpass, LPASS_UART_SW_RESET);
 }
 
 static void exynos_lpass_disable(struct exynos_lpass *lpass)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/4] tty: serial: samsung: Properly set flags in autoCTS mode
       [not found]   ` <CGME20181214113417eucas1p2624705c077ae79267082bbf4628951ed@eucas1p2.samsung.com>
@ 2018-12-14 11:34     ` Marek Szyprowski
  0 siblings, 0 replies; 14+ messages in thread
From: Marek Szyprowski @ 2018-12-14 11:34 UTC (permalink / raw)
  To: linux-kernel, linux-serial, linux-samsung-soc
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Beomho Seo, Seung-Woo Kim, Sylwester Nawrocki, Lee Jones,
	Greg Kroah-Hartman

From: Beomho Seo <beomho.seo@samsung.com>

Commit 391f93f2ec9f ("serial: core: Rework hw-assited flow control support")
has changed the way the autoCTS mode is handled.

According to that change, serial drivers which enable H/W autoCTS mode must
set UPSTAT_AUTOCTS to prevent the serial core from inadvertently disabling
TX. This patch adds proper handling of UPSTAT_AUTOCTS flag.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
[mszyprow: rephrased commit message]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/tty/serial/samsung.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index da1bd4bba8a9..2a49b6d876b8 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -1365,11 +1365,14 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
 	wr_regl(port, S3C2410_ULCON, ulcon);
 	wr_regl(port, S3C2410_UBRDIV, quot);
 
+	port->status &= ~UPSTAT_AUTOCTS;
+
 	umcon = rd_regl(port, S3C2410_UMCON);
 	if (termios->c_cflag & CRTSCTS) {
 		umcon |= S3C2410_UMCOM_AFC;
 		/* Disable RTS when RX FIFO contains 63 bytes */
 		umcon &= ~S3C2412_UMCON_AFC_8;
+		port->status = UPSTAT_AUTOCTS;
 	} else {
 		umcon &= ~S3C2410_UMCOM_AFC;
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/4] tty: serial: samsung: Increase maximum baudrate
       [not found]   ` <CGME20181214113418eucas1p2bfb6f0d04010e73f6ca35c3a6664b316@eucas1p2.samsung.com>
@ 2018-12-14 11:34     ` Marek Szyprowski
  2018-12-21 10:15       ` Lee Jones
  0 siblings, 1 reply; 14+ messages in thread
From: Marek Szyprowski @ 2018-12-14 11:34 UTC (permalink / raw)
  To: linux-kernel, linux-serial, linux-samsung-soc
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Beomho Seo, Seung-Woo Kim, Sylwester Nawrocki, Lee Jones,
	Greg Kroah-Hartman

From: Seung-Woo Kim <sw0312.kim@samsung.com>

This driver can be used to communicate with Bluetooth chip in high-speed
UART mode, so increase the maximum baudrate to 3Mbps.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
[mszyprow: rephrased commit message]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/tty/serial/samsung.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index 2a49b6d876b8..9fc3559f80d9 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -1287,7 +1287,7 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
 	 * Ask the core to calculate the divisor for us.
 	 */
 
-	baud = uart_get_baud_rate(port, termios, old, 0, 115200*8);
+	baud = uart_get_baud_rate(port, termios, old, 0, 3000000);
 	quot = s3c24xx_serial_getclk(ourport, baud, &clk, &clk_sel);
 	if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST)
 		quot = port->custom_divisor;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/4] arm64: dts: exynos: Add Bluetooth chip to TM2(e) boards
       [not found]   ` <CGME20181214113419eucas1p2473172a49bf798ddd95265fa31125d96@eucas1p2.samsung.com>
@ 2018-12-14 11:34     ` Marek Szyprowski
  2018-12-17 21:23       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 14+ messages in thread
From: Marek Szyprowski @ 2018-12-14 11:34 UTC (permalink / raw)
  To: linux-kernel, linux-serial, linux-samsung-soc
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Beomho Seo, Seung-Woo Kim, Sylwester Nawrocki, Lee Jones,
	Greg Kroah-Hartman

TM2(e) boards have a Broadcom Bluetooth chip connected to 3rd UART port.
Add a device tree node describing it and its resources (control GPIO lines
and clock).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 .../boot/dts/exynos/exynos5433-tm2-common.dtsi     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
index f3ed4c078ba5..d88e2f0e179a 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
@@ -1202,6 +1202,20 @@
 	status = "okay";
 };
 
+&serial_3 {
+	status = "okay";
+
+	bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		max-speed = <3000000>;
+		shutdown-gpios = <&gpd4 0 GPIO_ACTIVE_HIGH>;
+		device-wakeup-gpios = <&gpr3 7 GPIO_ACTIVE_HIGH>;
+		host-wakeup-gpios = <&gpa2 2 GPIO_ACTIVE_HIGH>;
+		clocks = <&s2mps13_osc S2MPS11_CLK_BT>;
+		clock-names = "extclk";
+	};
+};
+
 &spi_1 {
 	cs-gpios = <&gpd6 3 GPIO_ACTIVE_HIGH>;
 	status = "okay";
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] arm64: dts: exynos: Add Bluetooth chip to TM2(e) boards
  2018-12-14 11:34     ` [PATCH 4/4] arm64: dts: exynos: Add Bluetooth chip to TM2(e) boards Marek Szyprowski
@ 2018-12-17 21:23       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2018-12-17 21:23 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-kernel, linux-serial, linux-samsung-soc,
	Bartlomiej Zolnierkiewicz, Beomho Seo, Seung-Woo Kim,
	Sylwester Nawrocki, Lee Jones, Greg Kroah-Hartman

On Fri, Dec 14, 2018 at 12:34:10PM +0100, Marek Szyprowski wrote:
> TM2(e) boards have a Broadcom Bluetooth chip connected to 3rd UART port.
> Add a device tree node describing it and its resources (control GPIO lines
> and clock).
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  .../boot/dts/exynos/exynos5433-tm2-common.dtsi     | 14 ++++++++++++++

Thanks, applied.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/4] mfd: exynos-lpass: Enable UART module support
  2018-12-14 11:34     ` [PATCH 1/4] mfd: exynos-lpass: Enable UART module support Marek Szyprowski
@ 2018-12-21 10:13       ` Lee Jones
  2018-12-21 10:27         ` Marek Szyprowski
  0 siblings, 1 reply; 14+ messages in thread
From: Lee Jones @ 2018-12-21 10:13 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-kernel, linux-serial, linux-samsung-soc,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Beomho Seo,
	Seung-Woo Kim, Sylwester Nawrocki, Greg Kroah-Hartman

On Fri, 14 Dec 2018, Marek Szyprowski wrote:

> From: Beomho Seo <beomho.seo@samsung.com>
> 
> This patch enables support for UART module in Exynos Audio SubSystem.
> There are boards (for example TM2), which use it for communication with
> bluetooth chip.

Does it though?  Or does it enable the interrupt and reset something?
These calls would probably benefit from some documentation by way of
comments.

> Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
> [mszyprow: rephrased commit message, added UART reset]
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
>  drivers/mfd/exynos-lpass.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c
> index ca829f85672f..2713de989f05 100644
> --- a/drivers/mfd/exynos-lpass.c
> +++ b/drivers/mfd/exynos-lpass.c
> @@ -82,11 +82,13 @@ static void exynos_lpass_enable(struct exynos_lpass *lpass)
>  		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S);
>  
>  	regmap_write(lpass->top, SFR_LPASS_INTR_CPU_MASK,
> -		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S);
> +		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S |
> +		     LPASS_INTR_UART);
>  
>  	exynos_lpass_core_sw_reset(lpass, LPASS_I2S_SW_RESET);
>  	exynos_lpass_core_sw_reset(lpass, LPASS_DMA_SW_RESET);
>  	exynos_lpass_core_sw_reset(lpass, LPASS_MEM_SW_RESET);
> +	exynos_lpass_core_sw_reset(lpass, LPASS_UART_SW_RESET);
>  }
>  
>  static void exynos_lpass_disable(struct exynos_lpass *lpass)

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] tty: serial: samsung: Increase maximum baudrate
  2018-12-14 11:34     ` [PATCH 3/4] tty: serial: samsung: Increase maximum baudrate Marek Szyprowski
@ 2018-12-21 10:15       ` Lee Jones
  2018-12-21 10:23         ` Marek Szyprowski
  0 siblings, 1 reply; 14+ messages in thread
From: Lee Jones @ 2018-12-21 10:15 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-kernel, linux-serial, linux-samsung-soc,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Beomho Seo,
	Seung-Woo Kim, Sylwester Nawrocki, Greg Kroah-Hartman

On Fri, 14 Dec 2018, Marek Szyprowski wrote:

> From: Seung-Woo Kim <sw0312.kim@samsung.com>
> 
> This driver can be used to communicate with Bluetooth chip in high-speed
> UART mode, so increase the maximum baudrate to 3Mbps.
> 
> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
> [mszyprow: rephrased commit message]
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/tty/serial/samsung.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
> index 2a49b6d876b8..9fc3559f80d9 100644
> --- a/drivers/tty/serial/samsung.c
> +++ b/drivers/tty/serial/samsung.c
> @@ -1287,7 +1287,7 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
>  	 * Ask the core to calculate the divisor for us.
>  	 */
>  
> -	baud = uart_get_baud_rate(port, termios, old, 0, 115200*8);
> +	baud = uart_get_baud_rate(port, termios, old, 0, 3000000);

Does that mean the low speed devices will stop working?  It looks like
this should be dynamically configurable based on what device is
connected to it, no?

>  	quot = s3c24xx_serial_getclk(ourport, baud, &clk, &clk_sel);
>  	if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST)
>  		quot = port->custom_divisor;

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] tty: serial: samsung: Increase maximum baudrate
  2018-12-21 10:15       ` Lee Jones
@ 2018-12-21 10:23         ` Marek Szyprowski
  2018-12-21 10:34           ` Lee Jones
  0 siblings, 1 reply; 14+ messages in thread
From: Marek Szyprowski @ 2018-12-21 10:23 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, linux-serial, linux-samsung-soc,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Beomho Seo,
	Seung-Woo Kim, Sylwester Nawrocki, Greg Kroah-Hartman

Hi

On 2018-12-21 11:15, Lee Jones wrote:
> On Fri, 14 Dec 2018, Marek Szyprowski wrote:
>> From: Seung-Woo Kim <sw0312.kim@samsung.com>
>>
>> This driver can be used to communicate with Bluetooth chip in high-speed
>> UART mode, so increase the maximum baudrate to 3Mbps.
>>
>> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
>> [mszyprow: rephrased commit message]
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>>  drivers/tty/serial/samsung.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
>> index 2a49b6d876b8..9fc3559f80d9 100644
>> --- a/drivers/tty/serial/samsung.c
>> +++ b/drivers/tty/serial/samsung.c
>> @@ -1287,7 +1287,7 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
>>  	 * Ask the core to calculate the divisor for us.
>>  	 */
>>  
>> -	baud = uart_get_baud_rate(port, termios, old, 0, 115200*8);
>> +	baud = uart_get_baud_rate(port, termios, old, 0, 3000000);
> Does that mean the low speed devices will stop working?  It looks like
> this should be dynamically configurable based on what device is
> connected to it, no?

The changed parameter is maximum supported rate, so this change doesn't
affect any low speed device.

>>  	quot = s3c24xx_serial_getclk(ourport, baud, &clk, &clk_sel);
>>  	if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST)
>>  		quot = port->custom_divisor;

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/4] mfd: exynos-lpass: Enable UART module support
  2018-12-21 10:13       ` Lee Jones
@ 2018-12-21 10:27         ` Marek Szyprowski
  2018-12-21 10:39           ` Lee Jones
  0 siblings, 1 reply; 14+ messages in thread
From: Marek Szyprowski @ 2018-12-21 10:27 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, linux-serial, linux-samsung-soc,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Beomho Seo,
	Seung-Woo Kim, Sylwester Nawrocki, Greg Kroah-Hartman

Hi

On 2018-12-21 11:13, Lee Jones wrote:
> On Fri, 14 Dec 2018, Marek Szyprowski wrote:
>
>> From: Beomho Seo <beomho.seo@samsung.com>
>>
>> This patch enables support for UART module in Exynos Audio SubSystem.
>> There are boards (for example TM2), which use it for communication with
>> bluetooth chip.
> Does it though?  Or does it enable the interrupt and reset something?
> These calls would probably benefit from some documentation by way of
> comments.

It only enables routing interrupts out of LPASS HW module. This is
completely transparent for the rest of the system (UART and CPU/GIC).
UART driver will get them via standard ARM/GIC interrupt controller and
UART driver will enable/mask/handle it by itself via standard methods.

>> Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
>> [mszyprow: rephrased commit message, added UART reset]
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>> ---
>>  drivers/mfd/exynos-lpass.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c
>> index ca829f85672f..2713de989f05 100644
>> --- a/drivers/mfd/exynos-lpass.c
>> +++ b/drivers/mfd/exynos-lpass.c
>> @@ -82,11 +82,13 @@ static void exynos_lpass_enable(struct exynos_lpass *lpass)
>>  		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S);
>>  
>>  	regmap_write(lpass->top, SFR_LPASS_INTR_CPU_MASK,
>> -		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S);
>> +		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S |
>> +		     LPASS_INTR_UART);
>>  
>>  	exynos_lpass_core_sw_reset(lpass, LPASS_I2S_SW_RESET);
>>  	exynos_lpass_core_sw_reset(lpass, LPASS_DMA_SW_RESET);
>>  	exynos_lpass_core_sw_reset(lpass, LPASS_MEM_SW_RESET);
>> +	exynos_lpass_core_sw_reset(lpass, LPASS_UART_SW_RESET);
>>  }
>>  
>>  static void exynos_lpass_disable(struct exynos_lpass *lpass)

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] tty: serial: samsung: Increase maximum baudrate
  2018-12-21 10:23         ` Marek Szyprowski
@ 2018-12-21 10:34           ` Lee Jones
  0 siblings, 0 replies; 14+ messages in thread
From: Lee Jones @ 2018-12-21 10:34 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-kernel, linux-serial, linux-samsung-soc,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Beomho Seo,
	Seung-Woo Kim, Sylwester Nawrocki, Greg Kroah-Hartman

On Fri, 21 Dec 2018, Marek Szyprowski wrote:
> On 2018-12-21 11:15, Lee Jones wrote:
> > On Fri, 14 Dec 2018, Marek Szyprowski wrote:
> >> From: Seung-Woo Kim <sw0312.kim@samsung.com>
> >>
> >> This driver can be used to communicate with Bluetooth chip in high-speed
> >> UART mode, so increase the maximum baudrate to 3Mbps.
> >>
> >> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
> >> [mszyprow: rephrased commit message]
> >> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> >> ---
> >>  drivers/tty/serial/samsung.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
> >> index 2a49b6d876b8..9fc3559f80d9 100644
> >> --- a/drivers/tty/serial/samsung.c
> >> +++ b/drivers/tty/serial/samsung.c
> >> @@ -1287,7 +1287,7 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
> >>  	 * Ask the core to calculate the divisor for us.
> >>  	 */
> >>  
> >> -	baud = uart_get_baud_rate(port, termios, old, 0, 115200*8);
> >> +	baud = uart_get_baud_rate(port, termios, old, 0, 3000000);
> > Does that mean the low speed devices will stop working?  It looks like
> > this should be dynamically configurable based on what device is
> > connected to it, no?
> 
> The changed parameter is maximum supported rate, so this change doesn't
> affect any low speed device.

Understood.  Thanks for the explanation.

> >>  	quot = s3c24xx_serial_getclk(ourport, baud, &clk, &clk_sel);
> >>  	if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST)
> >>  		quot = port->custom_divisor;
> 
> Best regards

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/4] mfd: exynos-lpass: Enable UART module support
  2018-12-21 10:27         ` Marek Szyprowski
@ 2018-12-21 10:39           ` Lee Jones
       [not found]             ` <CGME20181221143250eucas1p120b2d4dbcb990c5893e0fa4c6a7dd861@eucas1p1.samsung.com>
  0 siblings, 1 reply; 14+ messages in thread
From: Lee Jones @ 2018-12-21 10:39 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-kernel, linux-serial, linux-samsung-soc,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Beomho Seo,
	Seung-Woo Kim, Sylwester Nawrocki, Greg Kroah-Hartman

On Fri, 21 Dec 2018, Marek Szyprowski wrote:

> Hi
> 
> On 2018-12-21 11:13, Lee Jones wrote:
> > On Fri, 14 Dec 2018, Marek Szyprowski wrote:
> >
> >> From: Beomho Seo <beomho.seo@samsung.com>
> >>
> >> This patch enables support for UART module in Exynos Audio SubSystem.
> >> There are boards (for example TM2), which use it for communication with
> >> bluetooth chip.
> > Does it though?  Or does it enable the interrupt and reset something?
> > These calls would probably benefit from some documentation by way of
> > comments.
> 
> It only enables routing interrupts out of LPASS HW module. This is
> completely transparent for the rest of the system (UART and CPU/GIC).
> UART driver will get them via standard ARM/GIC interrupt controller and
> UART driver will enable/mask/handle it by itself via standard methods.

Sounds fine.  But that is not what the commit message says.

> >> Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
> >> [mszyprow: rephrased commit message, added UART reset]
> >> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> >> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> >> ---
> >>  drivers/mfd/exynos-lpass.c | 4 +++-
> >>  1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c
> >> index ca829f85672f..2713de989f05 100644
> >> --- a/drivers/mfd/exynos-lpass.c
> >> +++ b/drivers/mfd/exynos-lpass.c
> >> @@ -82,11 +82,13 @@ static void exynos_lpass_enable(struct exynos_lpass *lpass)
> >>  		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S);
> >>  
> >>  	regmap_write(lpass->top, SFR_LPASS_INTR_CPU_MASK,
> >> -		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S);
> >> +		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S |
> >> +		     LPASS_INTR_UART);
> >>  
> >>  	exynos_lpass_core_sw_reset(lpass, LPASS_I2S_SW_RESET);
> >>  	exynos_lpass_core_sw_reset(lpass, LPASS_DMA_SW_RESET);
> >>  	exynos_lpass_core_sw_reset(lpass, LPASS_MEM_SW_RESET);
> >> +	exynos_lpass_core_sw_reset(lpass, LPASS_UART_SW_RESET);
> >>  }
> >>  
> >>  static void exynos_lpass_disable(struct exynos_lpass *lpass)
> 
> Best regards

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2 1/4] mfd: exynos-lpass: Enable UART module support
       [not found]             ` <CGME20181221143250eucas1p120b2d4dbcb990c5893e0fa4c6a7dd861@eucas1p1.samsung.com>
@ 2018-12-21 14:32               ` Marek Szyprowski
  2018-12-21 14:56                 ` Lee Jones
  0 siblings, 1 reply; 14+ messages in thread
From: Marek Szyprowski @ 2018-12-21 14:32 UTC (permalink / raw)
  To: linux-kernel, linux-serial, linux-samsung-soc
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Beomho Seo, Seung-Woo Kim, Sylwester Nawrocki, Lee Jones,
	Greg Kroah-Hartman

From: Beomho Seo <beomho.seo@samsung.com>

This patch enables proper interrupts routing between UART module
in Exynos Audio SubSystem and the rest of the SoC. This routing is
completely transparent for UART device and CPU/GIC. UART driver requests
interrupts from the respective controller and enables/masks/handles it
by itself via standard methods.

There are boards (for example TM2), which use UART module in Exynos Audio
SubStem for communication with BlueTooth chip.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
[mszyprow: rephrased commit message, added UART reset]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
Changelog
v2:
- rephrased and extended commit message
---
 drivers/mfd/exynos-lpass.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c
index ca829f85672f..2713de989f05 100644
--- a/drivers/mfd/exynos-lpass.c
+++ b/drivers/mfd/exynos-lpass.c
@@ -82,11 +82,13 @@ static void exynos_lpass_enable(struct exynos_lpass *lpass)
 		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S);
 
 	regmap_write(lpass->top, SFR_LPASS_INTR_CPU_MASK,
-		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S);
+		     LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S |
+		     LPASS_INTR_UART);
 
 	exynos_lpass_core_sw_reset(lpass, LPASS_I2S_SW_RESET);
 	exynos_lpass_core_sw_reset(lpass, LPASS_DMA_SW_RESET);
 	exynos_lpass_core_sw_reset(lpass, LPASS_MEM_SW_RESET);
+	exynos_lpass_core_sw_reset(lpass, LPASS_UART_SW_RESET);
 }
 
 static void exynos_lpass_disable(struct exynos_lpass *lpass)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/4] mfd: exynos-lpass: Enable UART module support
  2018-12-21 14:32               ` [PATCH v2 " Marek Szyprowski
@ 2018-12-21 14:56                 ` Lee Jones
  0 siblings, 0 replies; 14+ messages in thread
From: Lee Jones @ 2018-12-21 14:56 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-kernel, linux-serial, linux-samsung-soc,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Beomho Seo,
	Seung-Woo Kim, Sylwester Nawrocki, Greg Kroah-Hartman

On Fri, 21 Dec 2018, Marek Szyprowski wrote:

> From: Beomho Seo <beomho.seo@samsung.com>
> 
> This patch enables proper interrupts routing between UART module
> in Exynos Audio SubSystem and the rest of the SoC. This routing is
> completely transparent for UART device and CPU/GIC. UART driver requests
> interrupts from the respective controller and enables/masks/handles it
> by itself via standard methods.
> 
> There are boards (for example TM2), which use UART module in Exynos Audio
> SubStem for communication with BlueTooth chip.
> 
> Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
> [mszyprow: rephrased commit message, added UART reset]
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
> Changelog
> v2:
> - rephrased and extended commit message
> ---
>  drivers/mfd/exynos-lpass.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-12-21 14:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20181214113415eucas1p16dd61a4312d88216cb0d737887c751b7@eucas1p1.samsung.com>
2018-12-14 11:34 ` [PATCH 0/4] Samsung TM2(e): add Bluetooth support (resend) Marek Szyprowski
     [not found]   ` <CGME20181214113416eucas1p2002adf7b5438c525c34ff3274ceacbd1@eucas1p2.samsung.com>
2018-12-14 11:34     ` [PATCH 1/4] mfd: exynos-lpass: Enable UART module support Marek Szyprowski
2018-12-21 10:13       ` Lee Jones
2018-12-21 10:27         ` Marek Szyprowski
2018-12-21 10:39           ` Lee Jones
     [not found]             ` <CGME20181221143250eucas1p120b2d4dbcb990c5893e0fa4c6a7dd861@eucas1p1.samsung.com>
2018-12-21 14:32               ` [PATCH v2 " Marek Szyprowski
2018-12-21 14:56                 ` Lee Jones
     [not found]   ` <CGME20181214113417eucas1p2624705c077ae79267082bbf4628951ed@eucas1p2.samsung.com>
2018-12-14 11:34     ` [PATCH 2/4] tty: serial: samsung: Properly set flags in autoCTS mode Marek Szyprowski
     [not found]   ` <CGME20181214113418eucas1p2bfb6f0d04010e73f6ca35c3a6664b316@eucas1p2.samsung.com>
2018-12-14 11:34     ` [PATCH 3/4] tty: serial: samsung: Increase maximum baudrate Marek Szyprowski
2018-12-21 10:15       ` Lee Jones
2018-12-21 10:23         ` Marek Szyprowski
2018-12-21 10:34           ` Lee Jones
     [not found]   ` <CGME20181214113419eucas1p2473172a49bf798ddd95265fa31125d96@eucas1p2.samsung.com>
2018-12-14 11:34     ` [PATCH 4/4] arm64: dts: exynos: Add Bluetooth chip to TM2(e) boards Marek Szyprowski
2018-12-17 21:23       ` Krzysztof Kozlowski

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).