Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp969218rdh; Fri, 27 Oct 2023 00:17:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwBRpzweOQY8LoQk2jzKh1nT7DTO8F2XqNhdglpc+HU3GejanPJvfEUGzk7irHqQm5o8G7 X-Received: by 2002:a05:6902:541:b0:d9a:b67f:94e3 with SMTP id z1-20020a056902054100b00d9ab67f94e3mr1703264ybs.52.1698391050600; Fri, 27 Oct 2023 00:17:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698391050; cv=none; d=google.com; s=arc-20160816; b=v3HbVZa/1jfJWtbgkx1DUaq5nNv31aqb4EDra3tjSWoyCqun8aPFaWwNeJQhuD1bfX TSavgw9i3HZKxzKotyrevfP/+cGPdcDDrpIjOqZF8R5AzuIeVHzV3Oj9nFrpalPwjx9C +9LXRAcjxyU4nfdSVI4Xa9ohV/OGc+BKsdnRwjCboIp6ARkX17TxmNAqjI47eLV2jxzp FVR+YeWeouffaw4dgRC+kBJD0EddiXQBakgczPgC7RiDcBseEYokDidrgFwiLWi/0Bu3 6au+EeJNwFgets9H+kDGgKq6xLBkea3FUtbVmacl8n5256Rk9rgbobApGlfjxrMlgpCC GWBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=l7ca/wMn6QfV2eqhw/iohso0IYybkDnyAwrGIGl3ajk=; fh=8fAFyFmOyqu536u901Eez8r3VqG3E27QOxhWT2Nd7u0=; b=epjDZKv3rN440TzmzaBgwHoymsJDBIZMc+wXdiQVhzZc/4KxtrxmQj+Rj1orooAXQ3 PokuUI3PnSEh3DkcfqxQZ5cB/MbE6quDr0Ru7wLNl1w6yyEn4FXtryyB2WdKKMF6plEE a/1CZb7PcbNLCn/prTiCXBcAe0RHAar2TPQK+EBv7xWFREsnZzSlnF2j/m/ANxdH8CZO L5VsrOijRh5Go9KBQu7GNCzeVucyQMzLe8Xr4yRYM15AV9PpbkiyidD4yuJ/VtwhX/f+ zaUkRzxWos8cZHWwMVI9hn0QxwaYlYT0B5fHqxWwpS7Cz8zRcp5L4AACUAz0XoWX+gi3 qmDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id n75-20020a25404e000000b00d9ad315e257si1609589yba.160.2023.10.27.00.17.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 00:17:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id E19CC81F4701; Fri, 27 Oct 2023 00:17:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345490AbjJ0HQd (ORCPT + 99 others); Fri, 27 Oct 2023 03:16:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345427AbjJ0HQ1 (ORCPT ); Fri, 27 Oct 2023 03:16:27 -0400 Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29706D6A for ; Fri, 27 Oct 2023 00:16:17 -0700 (PDT) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 39R7ElfU002781; Fri, 27 Oct 2023 15:14:47 +0800 (+08) (envelope-from linhua.xu@unisoc.com) Received: from SHDLP.spreadtrum.com (shmbx04.spreadtrum.com [10.0.1.214]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4SGv211H9Jz2L6pVh; Fri, 27 Oct 2023 15:10:17 +0800 (CST) Received: from xm9614pcu.spreadtrum.com (10.13.2.29) by shmbx04.spreadtrum.com (10.0.1.214) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 27 Oct 2023 15:14:46 +0800 From: Linhua Xu To: Linus Walleij CC: Orson Zhai , Baolin Wang , Chunyan Zhang , , , Andy Shevchenko , lh xu , Linhua Xu , Zhirong Qiu , Xiongpeng Wu Subject: [PATCH V3 1/6] pinctrl: sprd: Modify pull-up parameters Date: Fri, 27 Oct 2023 15:14:21 +0800 Message-ID: <20231027071426.17724-2-Linhua.xu@unisoc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231027071426.17724-1-Linhua.xu@unisoc.com> References: <20231027071426.17724-1-Linhua.xu@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.13.2.29] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To shmbx04.spreadtrum.com (10.0.1.214) X-MAIL: SHSQR01.spreadtrum.com 39R7ElfU002781 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 27 Oct 2023 00:17:28 -0700 (PDT) From: Linhua Xu For UNISOC pin controller, there are three different configurations of pull-up drive current. Modify the 20K pull-up resistor configuration and add the 1.8K pull-up resistor configuration. Fixes:<1fb4b907e808> ("pinctrl: sprd: Add Spreadtrum pin control driver") Signed-off-by: Linhua Xu --- drivers/pinctrl/sprd/pinctrl-sprd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/sprd/pinctrl-sprd.c b/drivers/pinctrl/sprd/pinctrl-sprd.c index ca9659f4e4b1..74d8f8c3b9b6 100644 --- a/drivers/pinctrl/sprd/pinctrl-sprd.c +++ b/drivers/pinctrl/sprd/pinctrl-sprd.c @@ -71,7 +71,8 @@ #define SLEEP_PULL_UP_MASK 0x1 #define SLEEP_PULL_UP_SHIFT 3 -#define PULL_UP_4_7K (BIT(12) | BIT(7)) +#define PULL_UP_1_8K (BIT(12) | BIT(7)) +#define PULL_UP_4_7K BIT(12) #define PULL_UP_20K BIT(7) #define PULL_UP_MASK 0x21 #define PULL_UP_SHIFT 7 @@ -497,7 +498,7 @@ static int sprd_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin_id, break; case PIN_CONFIG_BIAS_DISABLE: if ((reg & (SLEEP_PULL_DOWN | SLEEP_PULL_UP)) || - (reg & (PULL_DOWN | PULL_UP_4_7K | PULL_UP_20K))) + (reg & (PULL_DOWN | PULL_UP_4_7K | PULL_UP_20K | PULL_UP_1_8K))) return -EINVAL; arg = 1; @@ -699,6 +700,8 @@ static int sprd_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin_id, val |= PULL_UP_20K; else if (arg == 4700) val |= PULL_UP_4_7K; + else if (arg == 1800) + val |= PULL_UP_1_8K; mask = PULL_UP_MASK; shift = PULL_UP_SHIFT; @@ -711,7 +714,7 @@ static int sprd_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin_id, } else { val = shift = 0; mask = PULL_DOWN | PULL_UP_20K | - PULL_UP_4_7K; + PULL_UP_4_7K | PULL_UP_1_8K; } break; case PIN_CONFIG_SLEEP_HARDWARE_STATE: -- 2.17.1