From: Roja Rani Yarubandi <rojay@codeaurora.org>
To: akashast@codeaurora.org, msavaliy@qti.qualcomm.com,
mgautam@codeaurora.org, Andy Gross <agross@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Roja Rani Yarubandi <rojay@codeaurora.org>
Subject: [PATCH 1/1] tty: serial: qcom_geni_serial: Configure UART_IO_MACRO_CTRL register
Date: Thu, 23 Jan 2020 14:11:32 +0530 [thread overview]
Message-ID: <20200123084132.11802-2-rojay@codeaurora.org> (raw)
In-Reply-To: <20200123084132.11802-1-rojay@codeaurora.org>
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
next prev parent reply other threads:[~2020-01-23 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2020-01-23 9:30 ` [PATCH 1/1] " Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2020-01-23 12:41 [PATCH 0/1] " Roja Rani Yarubandi
2020-01-23 12:41 ` [PATCH 1/1] " Roja Rani Yarubandi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200123084132.11802-2-rojay@codeaurora.org \
--to=rojay@codeaurora.org \
--cc=agross@kernel.org \
--cc=akashast@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mgautam@codeaurora.org \
--cc=msavaliy@qti.qualcomm.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.