Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1137500ybf; Thu, 27 Feb 2020 05:44:39 -0800 (PST) X-Google-Smtp-Source: APXvYqzTnL+FSBbu46qZE9G8oqH26HIC7np4Oy9vkL5zLvjoYWxnhZvrxR2ZtjMc7u7NvTgA4EGV X-Received: by 2002:aca:1204:: with SMTP id 4mr3383102ois.143.1582811079579; Thu, 27 Feb 2020 05:44:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582811079; cv=none; d=google.com; s=arc-20160816; b=q/opAnjS97ZEX1GVQabouN3+Olgnt17q2kwYkcwiNnVLnjgoJeHElarShXtG40OCwr djBQHeJbn/csz+uuB3PJCe0Xxg7k9YjTYnPzkt4Skf9wnNEWtm/oNVlAQ7VIUtnf8EdD 3BKmjiNW0GlQSk/Fxf/mukFDEoMkO0Ten7YXGRO3/HprH/WpT2loYQGoUl2sKAaf9YTy F4/f7e2zIti1VubPb83r26RBA1F/0zYfedWHqMieDeLePZjGuZaOPe0aCzUnr4glszhk b8FJm5ffj+I7xbKxGjOX+en6DB+GaXKM1TiG3xX+tfnV7KVJGzGOhujjDlGkqLzS8tWx kKIg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mBqB9jerHsA7nAxnbHxtOrLKmNzYI44wW3NjExHSpO0=; b=ViP14RbKRBmjt55Z7nf405FPXLjfmnSNzNEHA8yqIKjLFp4ZC3q3142FATo+Qb4TwL gKX6z7hFtCweH+4a1+Awgno80KRk9euHGyEHoZSoVgQhFqIliewVp3ixIp7WerflotNv 9oeBFeRD0F3Q+4ZeMeh4W4jWzBM8l8XOHi+SVXjpmGxl3S8421i2iimRemKMHCvpyQab JWfMgNuQqsR6ARMy3F43jmrI0QK5QeL7ZZGOkT2NMnXRV2hBs/wC3RbUMWfN4QIHG/gZ zzn+DzufEFEPRYH8gF4e46Q8H4X7knDukn4qb9cI08XKka4mJv7Xxd+01Sebyvb9Tvjo c0Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JsNJ94Q+; 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 v26si1683310otj.0.2020.02.27.05.44.27; Thu, 27 Feb 2020 05:44:39 -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; dkim=pass header.i=@kernel.org header.s=default header.b=JsNJ94Q+; 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 S1729521AbgB0Nmk (ORCPT + 99 others); Thu, 27 Feb 2020 08:42:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:37582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729402AbgB0Nme (ORCPT ); Thu, 27 Feb 2020 08:42:34 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DDF6220578; Thu, 27 Feb 2020 13:42:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582810953; bh=ZXhnpMrj5CaWrpKLVqIdetget1X44xH0z5FU1tXfW64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JsNJ94Q+Cklzh4cjk+N3G4o4MKNhJe2yh91wRuRYN7LHw8ejdM8xaNm28pOriudJ5 kmN0T4skscn60Ke+yN/a87vfq9zwY94s82aicPs4K3K7lH/jIYqV2ZIAGBQH6XDRO/ UWso1yUmd+m6lhidlS2y8d8odUFGEGqedIrTQnO0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Sasha Levin Subject: [PATCH 4.4 022/113] pinctrl: sh-pfc: sh7264: Fix CAN function GPIOs Date: Thu, 27 Feb 2020 14:35:38 +0100 Message-Id: <20200227132215.221512390@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227132211.791484803@linuxfoundation.org> References: <20200227132211.791484803@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geert Uytterhoeven [ Upstream commit 55b1cb1f03ad5eea39897d0c74035e02deddcff2 ] pinmux_func_gpios[] contains a hole due to the missing function GPIO definition for the "CTX0&CTX1" signal, which is the logical "AND" of the two CAN outputs. Fix this by: - Renaming CRX0_CRX1_MARK to CTX0_CTX1_MARK, as PJ2MD[2:0]=010 configures the combined "CTX0&CTX1" output signal, - Renaming CRX0X1_MARK to CRX0_CRX1_MARK, as PJ3MD[1:0]=10 configures the shared "CRX0/CRX1" input signal, which is fed to both CAN inputs, - Adding the missing function GPIO definition for "CTX0&CTX1" to pinmux_func_gpios[], - Moving all CAN enums next to each other. See SH7262 Group, SH7264 Group User's Manual: Hardware, Rev. 4.00: [1] Figure 1.2 (3) (Pin Assignment for the SH7264 Group (1-Mbyte Version), [2] Figure 1.2 (4) Pin Assignment for the SH7264 Group (640-Kbyte Version, [3] Table 1.4 List of Pins, [4] Figure 20.29 Connection Example when Using This Module as 1-Channel Module (64 Mailboxes x 1 Channel), [5] Table 32.10 Multiplexed Pins (Port J), [6] Section 32.2.30 (3) Port J Control Register 0 (PJCR0). Note that the last 2 disagree about PJ2MD[2:0], which is probably the root cause of this bug. But considering [4], "CTx0&CTx1" in [5] must be correct, and "CRx0&CRx1" in [6] must be wrong. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191218194812.12741-4-geert+renesas@glider.be Signed-off-by: Sasha Levin --- drivers/pinctrl/sh-pfc/pfc-sh7264.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7264.c b/drivers/pinctrl/sh-pfc/pfc-sh7264.c index e1c34e19222ee..3ddb9565ed804 100644 --- a/drivers/pinctrl/sh-pfc/pfc-sh7264.c +++ b/drivers/pinctrl/sh-pfc/pfc-sh7264.c @@ -500,17 +500,15 @@ enum { SD_WP_MARK, SD_CLK_MARK, SD_CMD_MARK, CRX0_MARK, CRX1_MARK, CTX0_MARK, CTX1_MARK, + CRX0_CRX1_MARK, CTX0_CTX1_MARK, PWM1A_MARK, PWM1B_MARK, PWM1C_MARK, PWM1D_MARK, PWM1E_MARK, PWM1F_MARK, PWM1G_MARK, PWM1H_MARK, PWM2A_MARK, PWM2B_MARK, PWM2C_MARK, PWM2D_MARK, PWM2E_MARK, PWM2F_MARK, PWM2G_MARK, PWM2H_MARK, IERXD_MARK, IETXD_MARK, - CRX0_CRX1_MARK, WDTOVF_MARK, - CRX0X1_MARK, - /* DMAC */ TEND0_MARK, DACK0_MARK, DREQ0_MARK, TEND1_MARK, DACK1_MARK, DREQ1_MARK, @@ -998,12 +996,12 @@ static const u16 pinmux_data[] = { PINMUX_DATA(PJ3_DATA, PJ3MD_00), PINMUX_DATA(CRX1_MARK, PJ3MD_01), - PINMUX_DATA(CRX0X1_MARK, PJ3MD_10), + PINMUX_DATA(CRX0_CRX1_MARK, PJ3MD_10), PINMUX_DATA(IRQ1_PJ_MARK, PJ3MD_11), PINMUX_DATA(PJ2_DATA, PJ2MD_000), PINMUX_DATA(CTX1_MARK, PJ2MD_001), - PINMUX_DATA(CRX0_CRX1_MARK, PJ2MD_010), + PINMUX_DATA(CTX0_CTX1_MARK, PJ2MD_010), PINMUX_DATA(CS2_MARK, PJ2MD_011), PINMUX_DATA(SCK0_MARK, PJ2MD_100), PINMUX_DATA(LCD_M_DISP_MARK, PJ2MD_101), @@ -1248,6 +1246,7 @@ static const struct pinmux_func pinmux_func_gpios[] = { GPIO_FN(CTX1), GPIO_FN(CRX1), GPIO_FN(CTX0), + GPIO_FN(CTX0_CTX1), GPIO_FN(CRX0), GPIO_FN(CRX0_CRX1), -- 2.20.1