Linux-Serial Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/1] tty: serial: qcom_geni_serial: Configure UART_IO_MACRO_CTRL register 
@ 2020-01-23  8:41 Roja Rani Yarubandi
  2020-01-23  8:41 ` [PATCH 1/1] " Roja Rani Yarubandi
  0 siblings, 1 reply; 4+ messages in thread
From: Roja Rani Yarubandi @ 2020-01-23  8:41 UTC (permalink / raw)
  To: akashast, msavaliy, mgautam, Andy Gross, Rob Herring,
	Mark Rutland, Greg Kroah-Hartman, Jiri Slaby
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-serial,
	Roja Rani Yarubandi

Configure UART_IO_MACRO_CTRL register if UART lines are swapped.

Roja Rani Yarubandi (1):
  tty: serial: qcom_geni_serial: Configure UART_IO_MACRO_CTRL register

 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 1 +
 drivers/tty/serial/qcom_geni_serial.c        | 6 ++++++
 2 files changed, 7 insertions(+)

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of the Code Aurora Forum, hosted by The Linux Foundation


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

* [PATCH 1/1] tty: serial: qcom_geni_serial: Configure UART_IO_MACRO_CTRL register
  2020-01-23  8:41 [PATCH 0/1] tty: serial: qcom_geni_serial: Configure UART_IO_MACRO_CTRL register Roja Rani Yarubandi
@ 2020-01-23  8:41 ` " Roja Rani Yarubandi
  2020-01-23  9:30   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Roja Rani Yarubandi @ 2020-01-23  8:41 UTC (permalink / raw)
  To: akashast, msavaliy, mgautam, Andy Gross, Rob Herring,
	Mark Rutland, Greg Kroah-Hartman, Jiri Slaby
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-serial,
	Roja Rani Yarubandi

Configure UART_IO_MACRO_CTRL register if UART lines are swapped.

Change-Id: I8e82c2395bf4cdc51b3677c3c54f5be3f390a888
Signed-off-by: Roja Rani Yarubandi <rojay@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 1 +
 drivers/tty/serial/qcom_geni_serial.c        | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
index 7143cb2dbc05..8a8497ca0ec0 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
@@ -675,6 +675,7 @@ ap_spi_fp: &spi10 {
 
 &uart3 {
 	status = "okay";
+	qcom,pin_inverse = <0x4643>;
 
 	bluetooth: bluetooth {
 		compatible = "qcom,wcn3991-bt";
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index e1767359cc64..939592ca437c 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -25,6 +25,7 @@
 
 /* UART specific GENI registers */
 #define SE_UART_LOOPBACK_CFG		0x22c
+#define SE_UART_IO_MACRO_CTRL		0x240
 #define SE_UART_TX_TRANS_CFG		0x25c
 #define SE_UART_TX_WORD_LEN		0x268
 #define SE_UART_TX_STOP_BIT_LEN		0x26c
@@ -1240,6 +1241,7 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
 	int irq;
 	bool console = false;
 	struct uart_driver *drv;
+	u32 val;
 
 	if (of_device_is_compatible(pdev->dev.of_node, "qcom,geni-debug-uart"))
 		console = true;
@@ -1313,6 +1315,10 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
+	ret = of_property_read_u32(pdev->dev.of_node, "qcom,pin_inverse", &val);
+	if (!ret)
+		writel(val, uport->membase + SE_UART_IO_MACRO_CTRL);
+
 	irq_set_status_flags(uport->irq, IRQ_NOAUTOEN);
 	ret = devm_request_irq(uport->dev, uport->irq, qcom_geni_serial_isr,
 			IRQF_TRIGGER_HIGH, port->name, uport);
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of the Code Aurora Forum, hosted by The Linux Foundation


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

* Re: [PATCH 1/1] tty: serial: qcom_geni_serial: Configure UART_IO_MACRO_CTRL register
  2020-01-23  8:41 ` [PATCH 1/1] " Roja Rani Yarubandi
@ 2020-01-23  9:30   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2020-01-23  9:30 UTC (permalink / raw)
  To: Roja Rani Yarubandi
  Cc: akashast, msavaliy, mgautam, Andy Gross, Rob Herring,
	Mark Rutland, Jiri Slaby, linux-arm-msm, devicetree,
	linux-kernel, linux-serial

On Thu, Jan 23, 2020 at 02:11:32PM +0530, Roja Rani Yarubandi wrote:
> Configure UART_IO_MACRO_CTRL register if UART lines are swapped.
> 
> Change-Id: I8e82c2395bf4cdc51b3677c3c54f5be3f390a888
> Signed-off-by: Roja Rani Yarubandi <rojay@codeaurora.org>

Always run checkpatch.pl on your patches so you do not get a grumpy
maintainer asking you to run checkpatc.pl on your patches.

:)

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

* [PATCH 0/1] tty: serial: qcom_geni_serial: Configure UART_IO_MACRO_CTRL register
@ 2020-01-23 12:41 " Roja Rani Yarubandi
  0 siblings, 0 replies; 4+ messages in thread
From: Roja Rani Yarubandi @ 2020-01-23 12:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: akashast, msavaliy, mgautam, skakit, Andy Gross, Bjorn Andersson,
	Jiri Slaby, linux-arm-msm, linux-serial, linux-kernel,
	Roja Rani Yarubandi

Configure UART_IO_MACRO_CTRL register if UART lines are swapped.

Roja Rani Yarubandi (1):
  tty: serial: qcom_geni_serial: Configure UART_IO_MACRO_CTRL register

 drivers/tty/serial/qcom_geni_serial.c | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of the Code Aurora Forum, hosted by The Linux Foundation


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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23  8:41 [PATCH 0/1] tty: serial: qcom_geni_serial: Configure UART_IO_MACRO_CTRL register Roja Rani Yarubandi
2020-01-23  8:41 ` [PATCH 1/1] " Roja Rani Yarubandi
2020-01-23  9:30   ` Greg Kroah-Hartman
2020-01-23 12:41 [PATCH 0/1] " Roja Rani Yarubandi

Linux-Serial Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-serial/0 linux-serial/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-serial linux-serial/ https://lore.kernel.org/linux-serial \
		linux-serial@vger.kernel.org
	public-inbox-index linux-serial

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-serial


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git