From patchwork Fri Aug 18 03:02:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 136016 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp1411342vqi; Fri, 18 Aug 2023 06:44:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHM1ywXlxdiCRtZ9fj/hFB/v0e+4+nqGCo07tTpEBq0j318dmln1Sfvpa5Wem15ej6UeAml X-Received: by 2002:a17:907:2cf8:b0:99b:b398:53b6 with SMTP id hz24-20020a1709072cf800b0099bb39853b6mr2656393ejc.34.1692366273214; Fri, 18 Aug 2023 06:44:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692366273; cv=none; d=google.com; s=arc-20160816; b=E5j1wbXfe6yTBFAhb45vgycF8zI2fGoZhPzIOm3jEkFsMBJnw6wpO+yT6lBmU4rSpw sxIErScIaZuc9bvaq4L/AsvL+64LB9ckbUgJvM2wAi59pig8b86hQ9u+Eus9thAqzhTi BS5dnIMYefLm0GeUJS3e+kpBVtCNjMnFTEejkmAa25cs6HlsGtNiiz3rbtC87Dihb1L6 SDhxJ+5fghBJyDsLmlrToAy2wgKGZ8TDQDzJP4quZn+jdeaOPIZYRtlI9p6QuOgAaX4e 0807ZdGVu3F7Od/ajK8H4EpWaL/I+C2UzqzC2xqi2LbAzQdEJCMzgjS3/mXT++W5GQFE HHdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date; bh=rRlvJ5KnBw82Ez6ZObxQ/fi0qUYDg/3/Trtj2+sNPy0=; fh=tWeqWIsbm0e/8mGzwD3pXapiwAuZ9aDf8aQJX4popdU=; b=cC2wHSR36CmUFJyoDjEHh0aENhyNVzQTo8aZmLevC/k3WC3lSOr3YEqTS+wOdRBwv8 d/++/V9BKMzYBoBEukbcxSNuoDt2bXMzuuPDfypy1zuWDiVNMDvBPCTQj8oAn/gm6SZx nmhZYkaJ6IVbpYizk7iHhSsiDMNDlFGL0vuAz7fkEiBeRXnuwZfAviZxeY4UduFjHYiB PJ5dWXH/w4+XJlgdlyOEcCUi5iiwBhKRcnvJOBvGtKOmWZAFdci4jyX/FJ2eGZy9/Jl/ G8gpJg8D6cIscJnsukfWxU0IM63ssMd3JNsUXhEsU4fnC2ZF9FrMOTJAvifAoJ5zUoA0 NbOA== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i3-20020a170906264300b0099b56bacec3si1416549ejc.955.2023.08.18.06.44.09; Fri, 18 Aug 2023 06:44:33 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357417AbjHRDDY (ORCPT + 99 others); Thu, 17 Aug 2023 23:03:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357384AbjHRDC7 (ORCPT ); Thu, 17 Aug 2023 23:02:59 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 857C41BB; Thu, 17 Aug 2023 20:02:58 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1qWpl3-00054P-1n; Fri, 18 Aug 2023 03:02:41 +0000 Date: Fri, 18 Aug 2023 04:02:35 +0100 From: Daniel Golle To: Sean Wang , Linus Walleij , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Daniel Golle , Sam Shih , Frank Wunderlich , linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] pinctrl: mediatek: fix pull_type data for MT7981 Message-ID: <7bcc8ead25dbfabc7f5a85d066224a926fbb4941.1692327317.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,UPPERCASE_50_75 autolearn=no 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774574657476558101 X-GMAIL-MSGID: 1774574657476558101 MediaTek has released pull_type data for MT7981 in their SDK. Use it and set functions to configure pin bias. Fixes: 6c83b2d94fcc ("pinctrl: add mt7981 pinctrl driver") Signed-off-by: Daniel Golle --- drivers/pinctrl/mediatek/pinctrl-mt7981.c | 44 +++++++---------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7981.c b/drivers/pinctrl/mediatek/pinctrl-mt7981.c index 18abc57800111..0fd2c0c451f95 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c @@ -457,37 +457,15 @@ static const unsigned int mt7981_pull_type[] = { MTK_PULL_PUPD_R1R0_TYPE,/*34*/ MTK_PULL_PUPD_R1R0_TYPE,/*35*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K_PULL_PU_PD_TYPE,/*50*/ MTK_PULL_PU_PD_TYPE,/*51*/ + MTK_PULL_PU_PD_TYPE,/*52*/ MTK_PULL_PU_PD_TYPE,/*53*/ + MTK_PULL_PU_PD_TYPE,/*54*/ MTK_PULL_PU_PD_TYPE,/*55*/ + MTK_PULL_PU_PD_TYPE,/*56*/ }; static const struct mtk_pin_reg_calc mt7981_reg_cals[] = { @@ -1014,6 +992,10 @@ static struct mtk_pin_soc mt7981_data = { .ies_present = false, .base_names = mt7981_pinctrl_register_base_names, .nbase_names = ARRAY_SIZE(mt7981_pinctrl_register_base_names), + .bias_disable_set = mtk_pinconf_bias_disable_set, + .bias_disable_get = mtk_pinconf_bias_disable_get, + .bias_set = mtk_pinconf_bias_set, + .bias_get = mtk_pinconf_bias_get, .pull_type = mt7981_pull_type, .bias_set_combo = mtk_pinconf_bias_set_combo, .bias_get_combo = mtk_pinconf_bias_get_combo, From patchwork Fri Aug 18 03:03:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 136043 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp1553209vqi; Fri, 18 Aug 2023 10:12:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBgHHOlEOMoTZWyzgABdFKOmMTU8FfW1dFQSvSllI5cx7fA0HjaW8cliPcpuZb1nRmC5Aj X-Received: by 2002:a17:902:bc4b:b0:1bd:d718:5833 with SMTP id t11-20020a170902bc4b00b001bdd7185833mr2857378plz.18.1692378771922; Fri, 18 Aug 2023 10:12:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692378771; cv=none; d=google.com; s=arc-20160816; b=I+3RnSIvOLyXKxP3hQYRtkMjY15epiRZVAtVQd6/gpKNNGryHhIgb13hNKjwRF2zm6 8kIX6e5wJk8Ji2Vxqhd/qAQEpNiMHMj+3ufdzc8R+Gp37AMwnpRPgfIMnYknSfyTZ9zl SN/TRBctuyJXzAda+JwheqUDHqdJPQXAWlAsfkaaOSKpeFusLLGbkF7kMGaCzY3fEKLI me57kTCzg5UAXhII+P2SaSiQU/s6SGMOgtegoVEHijlwOBqTa2F7iQJvECedDdnbW6/I oXmM7YWsYkS8LNJbE1l9j2Qayo6g4G4XaERMUFC8fzDcKiMqNfadA8Tl9vqHn2Zp/4hF 8scA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=xtAooPrGWw8l/ElcP2FJkfG3sR0J/hj6J+n8VpenXbE=; fh=tWeqWIsbm0e/8mGzwD3pXapiwAuZ9aDf8aQJX4popdU=; b=ZpT1pZ3UlnYzNwem6AvX3yuAWkiBFx9cVOfkbWCYrC9vnnP1ZhvicS53Y9ahJK4cRj yIk/pRTGBdfuKYWkiD2G/FlQqC0/g14Fuh03z/0VnghGfNyLGg3pWXbt4jTnzPvbYqK9 r0GvnxSHhOB1B1XrJVPz9wOgi+X+DQGRISsKW5iAbM/gbLTiyjmCxwkFuQy4SpLHepj8 8nREeBAnpBj4hPbNuaQZiFK7XMMJtN2wRcClBA1qk9sN8/b3mkCdWEEDgcHe6n7SPzSg trqnc528YL4yDok3IfWMLel0C0Fy3u+QehUQLC2UcLmyqCh7EKuuYVmxuxT51pY0RwVw r7jA== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020a170902d2c800b001bc028375aasi1811133plc.538.2023.08.18.10.12.36; Fri, 18 Aug 2023 10:12:51 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357423AbjHRDDw (ORCPT + 99 others); Thu, 17 Aug 2023 23:03:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357420AbjHRDDl (ORCPT ); Thu, 17 Aug 2023 23:03:41 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8571E2D56; Thu, 17 Aug 2023 20:03:40 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1qWpls-000559-2k; Fri, 18 Aug 2023 03:03:33 +0000 Date: Fri, 18 Aug 2023 04:03:26 +0100 From: Daniel Golle To: Sean Wang , Linus Walleij , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Daniel Golle , Sam Shih , Frank Wunderlich , linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] pinctrl: mediatek: assign functions to configure pin bias on MT7986 Message-ID: <47f72372354312a839b9337e09476aadcc206e8b.1692327317.git.daniel@makrotopia.org> References: <7bcc8ead25dbfabc7f5a85d066224a926fbb4941.1692327317.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7bcc8ead25dbfabc7f5a85d066224a926fbb4941.1692327317.git.daniel@makrotopia.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774587762779002773 X-GMAIL-MSGID: 1774587762779002773 Assign bias_disable_get/set and bias_get/set functions to allow configuring pin bias on MT7986. Fixes: 2c58d8dc9cd0 ("pinctrl: mediatek: add pull_type attribute for mediatek MT7986 SoC") Signed-off-by: Daniel Golle --- drivers/pinctrl/mediatek/pinctrl-mt7986.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7986.c b/drivers/pinctrl/mediatek/pinctrl-mt7986.c index aa0ccd67f4f4e..acaac9b38aa8a 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt7986.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt7986.c @@ -922,6 +922,10 @@ static struct mtk_pin_soc mt7986a_data = { .ies_present = false, .base_names = mt7986_pinctrl_register_base_names, .nbase_names = ARRAY_SIZE(mt7986_pinctrl_register_base_names), + .bias_disable_set = mtk_pinconf_bias_disable_set, + .bias_disable_get = mtk_pinconf_bias_disable_get, + .bias_set = mtk_pinconf_bias_set, + .bias_get = mtk_pinconf_bias_get, .pull_type = mt7986_pull_type, .bias_set_combo = mtk_pinconf_bias_set_combo, .bias_get_combo = mtk_pinconf_bias_get_combo, @@ -944,6 +948,10 @@ static struct mtk_pin_soc mt7986b_data = { .ies_present = false, .base_names = mt7986_pinctrl_register_base_names, .nbase_names = ARRAY_SIZE(mt7986_pinctrl_register_base_names), + .bias_disable_set = mtk_pinconf_bias_disable_set, + .bias_disable_get = mtk_pinconf_bias_disable_get, + .bias_set = mtk_pinconf_bias_set, + .bias_get = mtk_pinconf_bias_get, .pull_type = mt7986_pull_type, .bias_set_combo = mtk_pinconf_bias_set_combo, .bias_get_combo = mtk_pinconf_bias_get_combo,