linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Sasha Levin <sashal@kernel.org>,
	linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: [PATCH AUTOSEL 4.4 005/100] pinctrl: sh-pfc: sh7264: Fix CAN function GPIOs
Date: Fri, 14 Feb 2020 11:22:49 -0500	[thread overview]
Message-ID: <20200214162425.21071-5-sashal@kernel.org> (raw)
In-Reply-To: <20200214162425.21071-1-sashal@kernel.org>

From: Geert Uytterhoeven <geert+renesas@glider.be>

[ 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 <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20191218194812.12741-4-geert+renesas@glider.be
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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


  parent reply	other threads:[~2020-02-14 16:30 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14 16:22 [PATCH AUTOSEL 4.4 001/100] drm/gma500: Fixup fbdev stolen size usage evaluation Sasha Levin
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 002/100] nfsd4: avoid NULL deference on strange COPY compounds Sasha Levin
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 003/100] brcmfmac: Fix use after free in brcmf_sdio_readframes() Sasha Levin
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 004/100] gianfar: Fix TX timestamping with a stacked DSA driver Sasha Levin
2020-02-14 16:22 ` Sasha Levin [this message]
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 006/100] media: i2c: mt9v032: fix enum mbus codes and frame sizes Sasha Levin
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 007/100] media: sti: bdisp: fix a possible sleep-in-atomic-context bug in bdisp_device_run() Sasha Levin
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 008/100] efi/x86: Map the entire EFI vendor string before copying it Sasha Levin
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 009/100] MIPS: Loongson: Fix potential NULL dereference in loongson3_platform_init() Sasha Levin
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 010/100] uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol() Sasha Levin
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 011/100] usb: gadget: udc: fix possible sleep-in-atomic-context bugs in gr_probe() Sasha Levin
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 012/100] nfs: NFS_SWAP should depend on SWAP Sasha Levin
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 013/100] jbd2: clear JBD2_ABORT flag before journal_reset to update log tail info when load journal Sasha Levin
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 014/100] scsi: ufs: Fix ufshcd_probe_hba() reture value in case ufshcd_scsi_add_wlus() fails Sasha Levin
2020-02-14 16:22 ` [PATCH AUTOSEL 4.4 015/100] tracing: Fix very unlikely race of registering two stat tracers Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 016/100] ext4, jbd2: ensure panic when aborting with zero errno Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 017/100] libertas: don't exit from lbs_ibss_join_existing() with RCU read lock held Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 018/100] libertas: make lbs_ibss_join_existing() return error code on rates overflow Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 019/100] kconfig: fix broken dependency in randconfig-generated .config Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 020/100] clk: qcom: rcg2: Don't crash if our parent can't be found; return an error Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 021/100] drm/amdgpu: remove 4 set but not used variable in amdgpu_atombios_get_connector_info_from_object_table Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 022/100] drm/amdgpu: remove set but not used variable 'dig_connector' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 023/100] drm/amdgpu: remove set but not used variable 'dig' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 024/100] drm/amdgpu: remove always false comparison in 'amdgpu_atombios_i2c_process_i2c_ch' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 025/100] drm/amdgpu: remove set but not used variable 'mc_shared_chmap' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 026/100] drm/amdgpu: remove set but not used variable 'amdgpu_connector' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 027/100] drm/gma500: remove set but not used variable 'htotal' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 028/100] drm/gma500: remove set but not used variable 'error' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 029/100] drm/gma500: remove set but not used variable 'is_hdmi','is_crt' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 030/100] drm/gma500: remove set but not used variable 'channel_eq' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 031/100] drm/radeon: remove set but not used variable 'size', 'relocs_chunk' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 032/100] drm/radeon: remove set but not used variable 'dig_connector' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 033/100] drm/radeon: remove set but not used variable 'radeon_connector' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 034/100] drm/radeon: remove set but not used variable 'blocks' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 035/100] drm/radeon: remove set but not used variable 'tv_pll_cntl1' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 036/100] regulator: rk808: Lower log level on optional GPIOs being not available Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 037/100] NFC: port100: Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu() Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 038/100] tty: omap-serial: remove set but unused variable Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 039/100] padata: always acquire cpu_hotplug_lock before pinst->lock Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 040/100] reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 041/100] isdn: don't mark kcapi_proc_exit as __exit Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 042/100] ALSA: usx2y: Adjust indentation in snd_usX2Y_hwdep_dsp_status Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 043/100] b43legacy: Fix -Wcast-function-type Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 044/100] ipw2x00: " Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 045/100] iwlegacy: " Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 046/100] rtlwifi: rtl_pci: " Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 047/100] bcma: remove set but not used variable 'sizel' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 048/100] orinoco: avoid assertion in case of NULL pointer Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 049/100] ACPICA: Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1 Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 050/100] scsi: aic7xxx: Adjust indentation in ahc_find_syncrate Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 051/100] ARM: dts: r8a7779: Add device node for ARM global timer Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 052/100] rtc: hym8563: Return -EINVAL if the time is known to be invalid Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 053/100] x86/vdso: Provide missing include file Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 054/100] pinctrl: sh-pfc: r8a7778: Fix duplicate SDSELF_B and SD1_CLK_B Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 055/100] pinctrl: sh-pfc: sh7269: Fix CAN function GPIOs Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 056/100] ALSA: sh: Fix compile warning wrt const Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 057/100] tools lib api fs: Fix gcc9 stringop-truncation compilation error Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 058/100] drm/gma500: remove set but not used variables 'hist_reg' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 059/100] usbip: Fix unsafe unaligned pointer usage Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 060/100] soc/tegra: fuse: Correct straps' address for older Tegra124 device trees Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 061/100] ARM: dts: at91: sama5d3: fix maximum peripheral clock rates Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 062/100] ARM: dts: at91: sama5d3: define clock rate range for tcb1 Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 063/100] rcu: Use WRITE_ONCE() for assignments to ->pprev for hlist_nulls Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 064/100] Input: edt-ft5x06 - work around first register access error Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 065/100] wan: ixp4xx_hss: fix compile-testing on 64-bit Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 066/100] ASoC: atmel: fix build error with CONFIG_SND_ATMEL_SOC_DMA=m Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 067/100] PCI: Don't disable bridge BARs when assigning bus resources Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 068/100] driver core: Print device when resources present in really_probe() Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 069/100] ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 070/100] drm/nouveau: Fix copy-paste error in nouveau_fence_wait_uevent_handler Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 071/100] drm/vmwgfx: prevent memory leak in vmw_cmdbuf_res_add Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 072/100] iommu/arm-smmu-v3: Use WRITE_ONCE() when changing validity of an STE Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 073/100] scsi: iscsi: Don't destroy session if there are outstanding connections Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 074/100] ide: remove set but not used variable 'hwif' Sasha Levin
2020-02-14 16:23 ` [PATCH AUTOSEL 4.4 075/100] cmd64x: potential buffer overflow in cmd64x_program_timings() Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 076/100] ide: serverworks: potential overflow in svwks_set_pio_mode() Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 077/100] remoteproc: Initialize rproc_class before use Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 078/100] s390/ftrace: generate traced function stack frame Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 079/100] ALSA: hda - Add docking station support for Lenovo Thinkpad T420s Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 080/100] char: hpet: Use flexible-array member Sasha Levin
2020-02-14 17:43   ` Eric Biggers
2020-02-14 23:36     ` Sasha Levin
2020-02-14 23:47       ` Eric Biggers
2020-02-15  0:03       ` Greg Kroah-Hartman
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 081/100] jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 082/100] ARM: 8951/1: Fix Kexec compilation issue Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 083/100] hostap: Adjust indentation in prism2_hostapd_add_sta Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 084/100] rtlwifi: rtl8821ae: remove unused variables Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 085/100] rtlwifi: rtl8192ee: " Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 086/100] rtlwifi: rtl8723ae: " Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 087/100] iwlegacy: ensure loop counter addr does not wrap and cause an infinite loop Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 088/100] mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status() Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 089/100] mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv() Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 090/100] drm/nouveau/disp/nv50-: prevent oops when no channel method map provided Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 091/100] docs: i2c: writing-clients: properly name the stop condition Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 092/100] trigger_next should increase position index Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 093/100] radeon: insert 10ms sleep in dce5_crtc_load_lut Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 094/100] ocfs2: fix a NULL pointer dereference when call ocfs2_update_inode_fsync_trans() Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 095/100] lib/scatterlist.c: adjust indentation in __sg_alloc_table Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 096/100] reiserfs: prevent NULL pointer dereference in reiserfs_insert_item() Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 097/100] bcache: explicity type cast in bset_bkey_last() Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 098/100] irqchip/gic-v3-its: Reference to its_invall_cmd descriptor when building INVALL Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 099/100] microblaze: Prevent the overflow of the start Sasha Levin
2020-02-14 16:24 ` [PATCH AUTOSEL 4.4 100/100] brd: check and limit max_part par Sasha Levin

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=20200214162425.21071-5-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=stable@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).