Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2196339iof; Tue, 7 Jun 2022 22:53:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGN129MhEky/C3agDX6MMlMlVtJXNhSHzWu7scFkehxEWzQpExvuo3CgNLADN7Arb4A4VV X-Received: by 2002:a65:4506:0:b0:3db:48b1:9ff5 with SMTP id n6-20020a654506000000b003db48b19ff5mr29301874pgq.89.1654667637833; Tue, 07 Jun 2022 22:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667637; cv=none; d=google.com; s=arc-20160816; b=dtCGxPMXKZYv2bWiCa70Y1ajI7/lE7P9UfyB1sY1DOccatOj7QT9R7eQMeHEWvVtoV BjD1ZHb5q50y/VkkcQrLeysBe9za1jf3XSNAMRwZLNKiPU/yaKoUmTpjZNhI8HW7rPmT B6iPMgoEaVdvRBG2u9BHJeddtJt10Z5yWxCR+rYRPR5j9CZENuogqXoTukb7CRkvZEVQ fSudUDkatjPdcxLJPIIXSm+AsKKy9zGhI3av8XYmAvKd+V2GUw3XQkqEkqxuucfBupIW qFFikZJc8JpBmE+61zj0USiTlTyAEsAsXzLUC9L+iRfGlk1Pzc+zVIosbQSdRsOCkTUD sC4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5XRKMkj5GHpHmCHgVtqtrkoyBY4Egre/HM+eHJFaySQ=; b=hIIyR5+TyHVwCxsQDi2QqlzoRSRuEMzNa2pCqGFirMBR/YjqhCdQ12pXYNdaPeTBBQ Yroi6AOUh0MRcFrdF7r+SBVmaM/vOUu7gYccI2UMkYi0eIu7xI+BXP7cVcNECOvManDV O0iO86t9na1/iIZ73l9TnJ9Iuc6snSVSVZu5zDdXdsFhCragnskYheM9hdmLvMr8ncEf FRc9ZM9lDcm7re01OXpktFXrWAJK+Dn/YHHJCB9kwRklekQxNb8+DJVgxFNS8KG4gtaQ 8Qqy0doP6Op/pTImq7qCEKeA0PAL0a6huW4rI/pE3+9ciDT8kXStk5R1bjeou9PzacH/ DI8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oHP2O4rU; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z1-20020aa79901000000b005180f2b05b4si24225986pff.102.2022.06.07.22.53.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:53:57 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oHP2O4rU; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 07F244AADC0; Tue, 7 Jun 2022 22:20:38 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1392272AbiFHAwH (ORCPT + 99 others); Tue, 7 Jun 2022 20:52:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384272AbiFGVyY (ORCPT ); Tue, 7 Jun 2022 17:54:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6956124A1F6; Tue, 7 Jun 2022 12:13:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 823D8B823AE; Tue, 7 Jun 2022 19:13:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0B95C385A5; Tue, 7 Jun 2022 19:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629197; bh=Pz1kTw9rpUe1+33wr4J6yxpE185CiEZoGR2AYZS4OiE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oHP2O4rU1p5FH9+6SEdzpEnh3hxsvaMmHN2cQxnUgnGCKG5oyTk2hU/KO+6HG67qY aYWdrEh9nSPcSeCDwiUZ28IXyu1BWJHbp3O+9jtIio4LmBbRqUA5JhfKu5U/fRY/b8 uZcN3g0dgUaIE0qqj5mkqct2Br0775wXrHcSh8SI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Sasha Levin Subject: [PATCH 5.18 605/879] pinctrl: renesas: r8a779f0: Fix GPIO function on I2C-capable pins Date: Tue, 7 Jun 2022 19:02:03 +0200 Message-Id: <20220607165020.412368442@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geert Uytterhoeven [ Upstream commit 8bdd369dba7ff2f89cfd723ca3a26602aae4e498 ] Unlike on R-Car Gen3 SoCs, setting a bit to zero in a GPIO / Peripheral Function Select Register (GPSRn) on R-Car S4-8 is not always sufficient to configure a pin for GPIO. For I2C-capable pins, the I2C function must also be explicitly disabled in the corresponding Module Select Register (MODSELn). Add the missing FN_SEL_I2Ci_0 function enums to the pinmux_data[] array by temporarily overriding the GP_1_j_FN function enum to expand to two enums: the original GP_1_j_FN enum to configure the GPSR register bits, and the missing FN_SEL_I2Ci_0 enum to configure the MODSEL register bits. Fixes: 030ac6d7eeff81e3 ("pinctrl: renesas: Initial R8A779F0 PFC support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/c12c60ec1058140a37f03650043ab73f730f104f.1650610471.git.geert+renesas@glider.be Signed-off-by: Sasha Levin --- drivers/pinctrl/renesas/pfc-r8a779f0.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/pinctrl/renesas/pfc-r8a779f0.c b/drivers/pinctrl/renesas/pfc-r8a779f0.c index 91860608242c..3b4ca9622bbe 100644 --- a/drivers/pinctrl/renesas/pfc-r8a779f0.c +++ b/drivers/pinctrl/renesas/pfc-r8a779f0.c @@ -257,7 +257,28 @@ enum { }; static const u16 pinmux_data[] = { +/* Using GP_1_[0-9] requires disabling I2C in MOD_SEL1 */ +#define GP_1_0_FN GP_1_0_FN, FN_SEL_I2C0_0 +#define GP_1_1_FN GP_1_1_FN, FN_SEL_I2C0_0 +#define GP_1_2_FN GP_1_2_FN, FN_SEL_I2C1_0 +#define GP_1_3_FN GP_1_3_FN, FN_SEL_I2C1_0 +#define GP_1_4_FN GP_1_4_FN, FN_SEL_I2C2_0 +#define GP_1_5_FN GP_1_5_FN, FN_SEL_I2C2_0 +#define GP_1_6_FN GP_1_6_FN, FN_SEL_I2C3_0 +#define GP_1_7_FN GP_1_7_FN, FN_SEL_I2C3_0 +#define GP_1_8_FN GP_1_8_FN, FN_SEL_I2C4_0 +#define GP_1_9_FN GP_1_9_FN, FN_SEL_I2C4_0 PINMUX_DATA_GP_ALL(), +#undef GP_1_0_FN +#undef GP_1_1_FN +#undef GP_1_2_FN +#undef GP_1_3_FN +#undef GP_1_4_FN +#undef GP_1_5_FN +#undef GP_1_6_FN +#undef GP_1_7_FN +#undef GP_1_8_FN +#undef GP_1_9_FN PINMUX_SINGLE(SD_WP), PINMUX_SINGLE(SD_CD), -- 2.35.1