From patchwork Thu Mar 24 12:44:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Palmer X-Patchwork-Id: 12790661 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3DDF7C433F5 for ; Thu, 24 Mar 2022 12:46:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5FPWyNlDL9f2JxNb8LJs5aBSSsjwNytMdKfeeSjpSCo=; b=17tnYRd5zSA97m ApsS3ecNZ4QULZCznkUr/2+qaAQc48tDCyoznlEP6MzFKEhsSvJK4lEjZGvohelFdKdvhw7X2we63 Wq03At1LYEU52u2rEvZt3oJwK4xwFlq+Tup4l7EW+Oywac4Ow+NI/u0PJ6qFc5xnsWnAznvZf7Kg3 bw2r8ov067IMpTFzhL2dBbunYoHUAQRE2pBbIg9Yhay6+w5RSWStMAbIuUWcU5XPz92LK24Vdy/yT eZ8sVmnfe8oDXnefp795INOxcRyXuPZ1kLzDz4QQBnQ0hwemJ4f8QS4FFmm4gB9nVXkITTS6qhmWW dYQUrioYvO+1DQL0hAfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nXMpg-00Gc4l-R5; Thu, 24 Mar 2022 12:44:53 +0000 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nXMpI-00Gbwi-8r for linux-arm-kernel@lists.infradead.org; Thu, 24 Mar 2022 12:44:29 +0000 Received: by mail-pg1-x534.google.com with SMTP id s72so3732307pgc.5 for ; Thu, 24 Mar 2022 05:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ek2lZBtUjkC3pnGqt+RBhxkpe48kew374lr6zTExP6Q=; b=VBtLwBophOkXYa3sjzk54y3KqNxAuQ229WfiaEN1R1te9C9LR6qu145jvFeTUWrYVk KVpm88luvBK2bpn4sG/eUBfnGu/cxGM1941ufMCcDo/0I8+X0QF2cFQWv9L1UkU201m5 7T/Ui6EdP3+zuWnw7pWXVyNUjpjlc8wOUEWMI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ek2lZBtUjkC3pnGqt+RBhxkpe48kew374lr6zTExP6Q=; b=dgqoOhau5ABVcqXBRIDJfT7BJx5LQR6cj0amsATXBRZ29tbQF+Bwz0GbgKogJ7osq9 Mos5OqKO1zZF4kac0f9UiuRaArcWbyCWlZ7Vy6lFpnDtN43oSu6Q11ccYctoIx7/JI9Z CHMJ4gcEtxJ9uxKbnrWXyK7clyBdg+P/OWp5dXD30JW9ELdagmgFsNYmFvLkWdrVaVVI buXRnqp9lcLIfFfxL50LzIwwGth2d7+Prh97++Q5QDiNXp0jUf0nRvEdRpL10gMtgk0e MQ4z0h9GkCsJzvIXD9XDcGYirxGjzIc9ChGerZvOfNsS0Rxp+zX/oDW6VDNseAy1sZ/J ER4Q== X-Gm-Message-State: AOAM532yOq7FnsprAnS26jUJmq2UXeQcO1ooe3SE84j1jX80qgWYosJa fQTyjqPQgf14cAqCG3UjXEsO3w== X-Google-Smtp-Source: ABdhPJxE9rk71v/iZm8H2lR14hvHWEvXaS7otrzLAMDM+Yy8zoArKBz8EzsuScDPwRmORi2z7rJgeA== X-Received: by 2002:a05:6a00:2310:b0:4fa:7eb1:e855 with SMTP id h16-20020a056a00231000b004fa7eb1e855mr5055729pfh.14.1648125867265; Thu, 24 Mar 2022 05:44:27 -0700 (PDT) Received: from shiro.work ([2400:4162:2428:2f01:7285:c2ff:fe8e:66d7]) by smtp.googlemail.com with ESMTPSA id t10-20020a056a00138a00b004fa9c9fda44sm3786924pfg.89.2022.03.24.05.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Mar 2022 05:44:27 -0700 (PDT) From: Daniel Palmer To: devicetree@vger.kernel.org, linux-serial@vger.kernel.org, robh+dt@kernel.org, andriy.shevchenko@linux.intel.com, jirislaby@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, romain.perier@gmail.com, Daniel Palmer Subject: [PATCH 2/4] serial: 8250_dw: Add MStar MSC313 quirk Date: Thu, 24 Mar 2022 21:44:00 +0900 Message-Id: <20220324124402.3631379-3-daniel@0x0f.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220324124402.3631379-1-daniel@0x0f.com> References: <20220324124402.3631379-1-daniel@0x0f.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220324_054428_385021_61DA548D X-CRM114-Status: GOOD ( 14.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The version of the IP used on the MStar MSC313 and later MStar and SigmaStar SoCs has the USR register at a different location. Add a quirk for this. Signed-off-by: Daniel Palmer --- drivers/tty/serial/8250/8250_dw.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 1769808031c5..01737e5706a5 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -416,6 +416,10 @@ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data) p->serial_out = dw8250_serial_out38x; if (of_device_is_compatible(np, "starfive,jh7100-uart")) p->set_termios = dw8250_do_set_termios; + if (of_device_is_compatible(np, "mstar,msc313-uart")) { + data->usr_reg = 0x7; + data->skip_autocfg = true; + } } else if (acpi_dev_present("APMC0D08", NULL, -1)) { p->iotype = UPIO_MEM32; @@ -699,6 +703,7 @@ static const struct of_device_id dw8250_of_match[] = { { .compatible = "marvell,armada-38x-uart" }, { .compatible = "renesas,rzn1-uart" }, { .compatible = "starfive,jh7100-uart" }, + { .compatible = "mstar,msc313-uart" }, { /* Sentinel */ } }; MODULE_DEVICE_TABLE(of, dw8250_of_match);