Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4799407iob; Mon, 9 May 2022 01:46:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx814A49TVP+SMlte8dJD1U8f+IW1hq0yxxc37rGJ+hVrxiwnAKzsZG5RIMYLmzsIb3oDSR X-Received: by 2002:a17:902:ecc8:b0:15e:b5d3:2687 with SMTP id a8-20020a170902ecc800b0015eb5d32687mr14798263plh.164.1652086011570; Mon, 09 May 2022 01:46:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652086011; cv=none; d=google.com; s=arc-20160816; b=EySA1QR6967/q4BMYUujgm0eGFOI8qgomjWr3od3BWNdXEOkUfj2L4+vuiNDTKrv6w 8XbMU/H2TWK8bwY1G66kCrSLzFFs9rbmbvqniccnHkZsCn9NlHqJYf/NM36rSTGAQ325 LkJKobavRlmFR0PBm7UKX7qDSpTRTm3dnS4ve45MdvxIPDInRsG6rvU8O5wYn9s32nfM LBERQGsfSK0SSpWHaKmoiEl62HqdEA45CntM1YvJA2e6sRg25bNTn1wWf3B0x+cX6Mgv cbMKR8cf30vSJQgYIQHX9zMcyWV6C3OGnTst0MnJCWMvcILXkNqbFvK71UcdRUlAJoYD qDjg== 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=+fG7jMD331ye5ptTOrRkO7KwjkrxaqK0LMnj5ZArcOA=; b=YzrCikLvgZL2XtSM0uyjGVSaI1541WUNclAOXv3E7TmORzVODZZaBgkgruyJ6SFEHi ePqSJnJdTmTy3mohxMCdXS2WR94A3ro9MYB+PHhzsjrmKqZeJlGY6VPLlLYgEmQRPMUs ObZghwOJHGVZzUEcefcaAF5PvasXAyqtxsUBeoASn6UQ0/Vu7am34PSx0ZuPH7t01izH tFP+WVghCx/rSkVUfES1mjdy0yu62ANVQc1/hSIR1AldJzgdxUlHp13X+6mkC6LNxAoh LByMw73xbi+6+0a/Gp4JjPTQuQRWikdMN01sThzt4itFK23CtyIfb2yyQ4JTMxcMePsZ oveg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bqJG6Rl3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y10-20020a170903010a00b0015ecd6af9d8si9624836plc.266.2022.05.09.01.46.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 01:46:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bqJG6Rl3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 50A9B1737DE; Mon, 9 May 2022 01:31:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355260AbiEDRHS (ORCPT + 99 others); Wed, 4 May 2022 13:07:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355297AbiEDQ7w (ORCPT ); Wed, 4 May 2022 12:59:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D5B2496AD; Wed, 4 May 2022 09:51:29 -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 dfw.source.kernel.org (Postfix) with ESMTPS id EF957617E7; Wed, 4 May 2022 16:51:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45BB8C385A5; Wed, 4 May 2022 16:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683085; bh=1NXmhjDJG8sVMXeuR7P7595+33BQJhz9J+Aca7pXwWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bqJG6Rl3LrJzhG/CRDPc4E2jhUKvt/FSyjSD/a6tDtA71mL697TsILmw7qKwZGi8C lj/gK4wJz3smLx5ea9HEA10vBVjpiO1x43mK4xCM/rvUt2ZbO5u6bCT+dAW+m2jPLc 9q173br2Y5JEpm/oLlKdg7DmbRSY+fTnXmpslBwc= 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.10 066/129] pinctrl: rockchip: fix RK3308 pinmux bits Date: Wed, 4 May 2022 18:44:18 +0200 Message-Id: <20220504153026.508369870@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153021.299025455@linuxfoundation.org> References: <20220504153021.299025455@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=-2.6 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: 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 9df48e0cf4cb..07b1204174bf 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -663,95 +663,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