Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1144201iob; Wed, 4 May 2022 15:52:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzd+IyYKgYyH8lCLCMo1Zl4ek79BPdQJ3pXiSb5ya5zYASPx4GF7gxSYfYTnZGAb+Txhd25 X-Received: by 2002:a17:907:86a5:b0:6f4:3f3:33d3 with SMTP id qa37-20020a17090786a500b006f403f333d3mr22833298ejc.642.1651704752352; Wed, 04 May 2022 15:52:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651704752; cv=none; d=google.com; s=arc-20160816; b=SLhJkghvPmoxAA4wSTRco3GZryrHxT5v+ZEfDy3Dh7PcggHPVHurXxWIFPtigjBdWd KJUWTkZIS50HkzvVqof7W9JRl8C8YExgHo+rI6xCY9y87E3CkN200R36V3Q+u1bVyopo gCk4/PA7Epcn88ai/irv7W6XfgpRSUvPDlBXzpY35Bzv16hOLLaaWY3cAKuO++gj7hLG KHPUtan3bdfwtDMV0zg8xBAQowBEnC2xDjaFgIVNQHJNiQ09ags4/bnklS0WzaYxex+/ llXye1F+zDln+10i220VrosoHuP2MqQ9BlcKNPOmFiRS51ub7I5BeTh3g03AjDq9Lw1B UwJA== 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=EyMq8X9mnk6zjkaPcD2VWMeEKx1HCKY3r6KRfC0aTcQ=; b=GIzB+ampLiXo6ApaR/etJd2S6N/DI4muOjSQyV0QerZduZvqGV8CXgxKOBBYQLDfON DmhxImLDHiEfYcE8yC8DwtNhipyOoi7FFQLLEDlem39EVxgo59Mkwlugs9Brtia6SYGr zx+XfXTx7X8YiH0Z+XBVuYTfIg/RdmXj4u2HLWr2MUIBEiuOz6SuKYFZDoTG8dMPvRXJ rP4lTM6CV5aRsoW/9h3Tpj54Zb1DPuxMgTN/MWFNJQ0JiB/DU4Y5dU9dWIEpIB1EMvGv WEdg2IhpxjFYHZ7BrgD/KD6jNF/dm0jTWOIV/uljq1sTgxnkrXdm8IBJOBDrJg37rnyN p69w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UFe++QmY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gk20-20020a17090790d400b006f38e90d86fsi227170ejb.256.2022.05.04.15.52.09; Wed, 04 May 2022 15:52:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UFe++QmY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357420AbiEDRdr (ORCPT + 99 others); Wed, 4 May 2022 13:33:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357039AbiEDRJx (ORCPT ); Wed, 4 May 2022 13:09:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46AB0488B2; Wed, 4 May 2022 09:57:01 -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 F1F50B8279C; Wed, 4 May 2022 16:57:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6F76C385AF; Wed, 4 May 2022 16:56:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683419; bh=bb87NXccFjNGXVz0LjQzmsRxE/zwFSQhn2e5pASPlBY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UFe++QmYxEgOdzvJmCPs5Y5/JENx8e6DY+S8LZfn6tXDXLX9O4rN8Vngn6avw9wIb PkAHUBNEO8OnJ2RPjnPaAdWvoCHn0vHUpdaNyFKlZJORg2+vmQYN531aHRmz0WyA6N hyO9wyZk2wtUX9nlgRrvbOlOeVUGKeH1HZBFkxNM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luca Ceresoli , Heiko Stuebner , Linus Walleij , Sasha Levin Subject: [PATCH 5.17 104/225] pinctrl: rockchip: fix RK3308 pinmux bits Date: Wed, 4 May 2022 18:45:42 +0200 Message-Id: <20220504153119.962530496@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153110.096069935@linuxfoundation.org> References: <20220504153110.096069935@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=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: Luca Ceresoli [ Upstream commit 1f3e25a068832f8892a5ff71467622d012f5bc9f ] Some of the pinmuxing bits described in rk3308_mux_recalced_data are wrong, pointing to non-existing registers. Fix the entire table. Also add a comment in front of each entry with the same string that appears in the datasheet to make the table easier to compare with the docs. This fix has been tested on real hardware for the gpio3b3_sel entry. Fixes: 7825aeb7b208 ("pinctrl: rockchip: add rk3308 SoC support") Signed-off-by: Luca Ceresoli Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20220420142432.248565-1-luca.ceresoli@bootlin.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/pinctrl-rockchip.c | 45 ++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index a1b598b86aa9..65fa305b5f59 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -457,95 +457,110 @@ static struct rockchip_mux_recalced_data rk3128_mux_recalced_data[] = { static struct rockchip_mux_recalced_data rk3308_mux_recalced_data[] = { { + /* gpio1b6_sel */ .num = 1, .pin = 14, .reg = 0x28, .bit = 12, .mask = 0xf }, { + /* gpio1b7_sel */ .num = 1, .pin = 15, .reg = 0x2c, .bit = 0, .mask = 0x3 }, { + /* gpio1c2_sel */ .num = 1, .pin = 18, .reg = 0x30, .bit = 4, .mask = 0xf }, { + /* gpio1c3_sel */ .num = 1, .pin = 19, .reg = 0x30, .bit = 8, .mask = 0xf }, { + /* gpio1c4_sel */ .num = 1, .pin = 20, .reg = 0x30, .bit = 12, .mask = 0xf }, { + /* gpio1c5_sel */ .num = 1, .pin = 21, .reg = 0x34, .bit = 0, .mask = 0xf }, { + /* gpio1c6_sel */ .num = 1, .pin = 22, .reg = 0x34, .bit = 4, .mask = 0xf }, { + /* gpio1c7_sel */ .num = 1, .pin = 23, .reg = 0x34, .bit = 8, .mask = 0xf }, { + /* gpio3b4_sel */ .num = 3, .pin = 12, .reg = 0x68, .bit = 8, .mask = 0xf }, { + /* gpio3b5_sel */ .num = 3, .pin = 13, .reg = 0x68, .bit = 12, .mask = 0xf }, { + /* gpio2a2_sel */ .num = 2, .pin = 2, - .reg = 0x608, - .bit = 0, - .mask = 0x7 + .reg = 0x40, + .bit = 4, + .mask = 0x3 }, { + /* gpio2a3_sel */ .num = 2, .pin = 3, - .reg = 0x608, - .bit = 4, - .mask = 0x7 + .reg = 0x40, + .bit = 6, + .mask = 0x3 }, { + /* gpio2c0_sel */ .num = 2, .pin = 16, - .reg = 0x610, - .bit = 8, - .mask = 0x7 + .reg = 0x50, + .bit = 0, + .mask = 0x3 }, { + /* gpio3b2_sel */ .num = 3, .pin = 10, - .reg = 0x610, - .bit = 0, - .mask = 0x7 + .reg = 0x68, + .bit = 4, + .mask = 0x3 }, { + /* gpio3b3_sel */ .num = 3, .pin = 11, - .reg = 0x610, - .bit = 4, - .mask = 0x7 + .reg = 0x68, + .bit = 6, + .mask = 0x3 }, }; -- 2.35.1