Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp413475ybl; Thu, 23 Jan 2020 00:44:13 -0800 (PST) X-Google-Smtp-Source: APXvYqx5EVjfmid7LR+z240fk1wzdnlwUs92yFeW/Lp1r+Zp+Lo5yszfUJ/S6WAfcXMoFmCSag7b X-Received: by 2002:aca:2207:: with SMTP id b7mr9901778oic.109.1579769053466; Thu, 23 Jan 2020 00:44:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579769053; cv=none; d=google.com; s=arc-20160816; b=r7mSyINhgSOmO8SoHzCcCqyWwsytYDyyWXNSEJ1ZA65ASn6XZUEdPR1gEamoV+Tilj kX0JR6QaFlk/0JcCn6P2MX9+KXSOwInaX/NfxGJWHnOkQ1hO10Kf2RKBtAMqZ4bcJauR PNmy9kR46DqyoOA6V/61PKjM6DEmtjK4x4wvAHKh/m50ESIfdalz1hl3xj+ZhKA+rBLQ Oiss+1beG3aeThBP2OocMOuyFbsaWkiKFxecfAk2NGwHltmv7qfgIWvlST7YA6sPdHfn xpxKLg1XirOhbmz2DK6AlE9rbppSz5mCmvGGNX9ri2OnSnnbWzEZVggz3ZSVPVFummq9 w+xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=u/1UWSf7fY+cJ0kY2hAppWIeTsNIQx5YI7zCmub/P0s=; b=WTTMszQAbZkM0kJ22JWts1wFDOi3/VjNHC39c/nriUKrJ7xFLB8GTykBDzl/Ap9hRh jY2b3vyjQMZ+7pxYozsQTzIkH4wBMQR9UgWXiek3FeVyETBiDGHt78BwfdAUvsgCFy/v Jge6rAc7iVfFdlVQi8Yta6Px0fv+uFjPaY+OKTr65HQINm3IXxJiCKV2RCIOVUK2jacv UVVu0VMMlM7j9rAxYlOEdDZB/prpEGmxU6JDr5aBE/RsGhasDlG+yhplGgK7VKRn8uT/ Z2v5Kc1Wi5DoQgFa6KIO+ODVFuyBSY6phFVjApJUY2PGRkUYiOpJio5bf8Kt7+z+t6wf rWSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m13si833819otq.1.2020.01.23.00.44.01; Thu, 23 Jan 2020 00:44:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727453AbgAWImz (ORCPT + 99 others); Thu, 23 Jan 2020 03:42:55 -0500 Received: from alexa-out-blr-01.qualcomm.com ([103.229.18.197]:47000 "EHLO alexa-out-blr-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726061AbgAWImy (ORCPT ); Thu, 23 Jan 2020 03:42:54 -0500 Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 23 Jan 2020 14:12:02 +0530 Received: from c-rojay-linux.qualcomm.com ([10.206.21.80]) by ironmsg01-blr.qualcomm.com with ESMTP; 23 Jan 2020 14:11:40 +0530 Received: by c-rojay-linux.qualcomm.com (Postfix, from userid 88981) id 3D99C26E5; Thu, 23 Jan 2020 14:11:40 +0530 (IST) From: Roja Rani Yarubandi To: akashast@codeaurora.org, msavaliy@qti.qualcomm.com, mgautam@codeaurora.org, Andy Gross , Rob Herring , Mark Rutland , Greg Kroah-Hartman , Jiri Slaby Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Roja Rani Yarubandi Subject: [PATCH 1/1] tty: serial: qcom_geni_serial: Configure UART_IO_MACRO_CTRL register Date: Thu, 23 Jan 2020 14:11:32 +0530 Message-Id: <20200123084132.11802-2-rojay@codeaurora.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200123084132.11802-1-rojay@codeaurora.org> References: <20200123084132.11802-1-rojay@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Configure UART_IO_MACRO_CTRL register if UART lines are swapped. Change-Id: I8e82c2395bf4cdc51b3677c3c54f5be3f390a888 Signed-off-by: Roja Rani Yarubandi --- 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