From patchwork Fri Jan 20 07:17:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 644609 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp637971pvb; Thu, 19 Jan 2023 23:18:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXtKqNiNpn8a2KByvYpfrOqZSuUsOXFFZHgdfHMleDKd0iL/4xkJHxIw0Td89fl6/u2RyQ+9 X-Received: by 2002:a05:6808:15a6:b0:363:1449:1614 with SMTP id t38-20020a05680815a600b0036314491614mr7989050oiw.2.1674199136762; Thu, 19 Jan 2023 23:18:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674199136; cv=none; d=google.com; s=arc-20160816; b=ZyAszt+FUGyuc/sZfHttOYuwJ89RQNs35Swxvnx87PdZpG91vTJhpgHdoE4152fcsU Cr7uRLkAVvYDIQUkGW4TVhKWfxa/nsWjpuEVtyEnErjEC8g7jcbiQAGzt7coNBWKqjaU OCBTVbXp/VEJmQRd5aZrRfaDrMdbXL+22mFjkcMGf45xWF3s44XtHo6Y2ozWEM1Q1Fu/ RINO/BarLZKJkLtFeJJfisQsrWBf9U9558m463c7b82PoKeK1TBVaPaiqi/H9NMdM6yW PJB2jBKgBMshqD7SB8D9qlt+kRTIobhiaL1TEPvDNVDm2CV3HuzCQXeWdOjfmocU0+Ft mAng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p4QXbhIBEYEVJTr0EjAPuGhsfyb+2nd1b+W+Go2gHcc=; b=Hc5I7N5vstXwoI18ovMfYvPE3bq2ZOXUvAUO6CUcojEJJGxcIvTLB7hNqIMAsywYhv 4dPuv5HdoSIXFxWCJrYYl/UMf0XHqkTugqOSK3wg9lEuB2RnubO8OemGgUDJ8uaos3gI TjUFQxR3F9D9315JhunFfw063XwTeJBIwd4+frNMaP0l4U/TujW+hCEbfS3UltPl6IKF /5YtSK3Kctgho1YugfCu9ifChmFSI2ZAP7E3HK/b9PyvE3psnCpV5k19yCSP79tcZPhq j7mzwwF8joWuO2f1ghM84VKyqsz2pKoBilRjFm+xEDWJdwhOSSl/XGVyNx0KiDRpH1bG A4aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wBq6DgEW; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id q24-20020a056808201800b0035b1e2b292asi40187292oiw.51.2023.01.19.23.18.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 23:18:56 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wBq6DgEW; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3F28A856B8; Fri, 20 Jan 2023 08:18:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="wBq6DgEW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 09EB085657; Fri, 20 Jan 2023 08:18:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 70686856A0 for ; Fri, 20 Jan 2023 08:17:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sumit.garg@linaro.org Received: by mail-pg1-x52d.google.com with SMTP id s67so3460538pgs.3 for ; Thu, 19 Jan 2023 23:17:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=p4QXbhIBEYEVJTr0EjAPuGhsfyb+2nd1b+W+Go2gHcc=; b=wBq6DgEW8M7bnf7E9uL1L5nt4qsOBHTZ2s4Zup5sCjh2jA4X6YXliONTtdY9R4C29u KyTcVltOt8ZnIPBSuJhTGhmU9CKFglRK7v5KhPyXIk/ZJ/auKSLaJ6UoiMGooJwgjDWa O0qIC03/WroP6xu8xObeY0gbzkVmFHn3yEvr3VqUXZPdG1p3xKF3Gt4OXV3vicUSmPtt jsLd4xE59Y3bB5R+6VJQx0MggtKTkkiWltGcoKqOTWIYiVlLBtL6l7RdThqGFTiYcdCb V64FzpL3jUhdt7MNBYByzfoAMPheHnolLAC6DDxyUmjThwbgXFTsAvyDWb4c9NrVy+v9 iaDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p4QXbhIBEYEVJTr0EjAPuGhsfyb+2nd1b+W+Go2gHcc=; b=K+6bSzyjckZ+DIu1C46wf+BhPxWKeVvoIIh6Xxbb6yN1Cgil6XwVjPhXORs6Lr2F/f XH/NcwHDMTa6bz8b23bPj3EA8WodNHxVj2TWhQxjN3UvgF1OnrcVc0EmszhK17tzGbO/ 5RuuXLLtPdsl4AuEZMmMvdFQCPjubLVNC6pUrs20UvbXRrV5oUji32vd9O2hQT4YBikQ iaXN4d1lwWf2bsqEQnaSNFwN1PxKpgnSe8AOuFzObvHAoy3WAMEnzzSwwNaRgz4b43y1 rfUra/jFMDqK6tz7qDJAamJqeKzn6DBg3JTiup6U/B29dueKmXGide9zytW6muBjQO2t 34Gg== X-Gm-Message-State: AFqh2koh7nBNqVdMdt0dU/sfqTnVsQx+jAYpDxvQUy3QMVmPnLku3zpB vT+UJVhYi2u0Sgju/EERcoSaty+lPX9hcasx X-Received: by 2002:a05:6a00:26ef:b0:58d:f20b:5f2e with SMTP id p47-20020a056a0026ef00b0058df20b5f2emr7065365pfw.1.1674199076561; Thu, 19 Jan 2023 23:17:56 -0800 (PST) Received: from sumit-X1.. ([223.178.212.120]) by smtp.gmail.com with ESMTPSA id x15-20020aa7956f000000b0058bacd6c4e8sm9797586pfq.207.2023.01.19.23.17.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 23:17:56 -0800 (PST) From: Sumit Garg To: u-boot@lists.denx.de Cc: rfried.dev@gmail.com, hs@denx.de, joe.hershberger@ni.com, stephan@gerhold.net, mworsfold@impinj.com, lgillham@impinj.com, jbrennan@impinj.com, nicolas.dechesne@linaro.org, vinod.koul@linaro.org, daniel.thompson@linaro.org, Sumit Garg Subject: [PATCH 05/14] pinctrl-snapdragon: Get rid of custom drive-strength values Date: Fri, 20 Jan 2023 12:47:10 +0530 Message-Id: <20230120071719.623661-6-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230120071719.623661-1-sumit.garg@linaro.org> References: <20230120071719.623661-1-sumit.garg@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Use standard pinconf drive-strength values from Linux DT bindings rather than ones based on custom u-boot header. These changes are in direction to make u-boot DTs for Qcom SoCs to be compatible with standard Linux DT bindings. Also, add support for pinconf bias-pull-up. Signed-off-by: Sumit Garg --- arch/arm/dts/dragonboard410c.dts | 3 +-- arch/arm/dts/dragonboard820c.dts | 3 +-- arch/arm/dts/qcom-ipq4019.dtsi | 1 - arch/arm/dts/qcs404-evb.dts | 1 - arch/arm/mach-snapdragon/pinctrl-snapdragon.c | 8 ++++++- .../dt-bindings/pinctrl/pinctrl-snapdragon.h | 22 ------------------- 6 files changed, 9 insertions(+), 29 deletions(-) delete mode 100644 include/dt-bindings/pinctrl/pinctrl-snapdragon.h diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts index 59cf45eb17..9230dd3fd9 100644 --- a/arch/arm/dts/dragonboard410c.dts +++ b/arch/arm/dts/dragonboard410c.dts @@ -9,7 +9,6 @@ #include "skeleton64.dtsi" #include -#include / { model = "Qualcomm Technologies, Inc. Dragonboard 410c"; @@ -71,7 +70,7 @@ blsp1_uart: uart { function = "blsp1_uart"; pins = "GPIO_4", "GPIO_5"; - drive-strength = ; + drive-strength = <8>; bias-disable; }; }; diff --git a/arch/arm/dts/dragonboard820c.dts b/arch/arm/dts/dragonboard820c.dts index aaca681d2e..ad201d4874 100644 --- a/arch/arm/dts/dragonboard820c.dts +++ b/arch/arm/dts/dragonboard820c.dts @@ -8,7 +8,6 @@ /dts-v1/; #include "skeleton64.dtsi" -#include / { model = "Qualcomm Technologies, Inc. DB820c"; @@ -71,7 +70,7 @@ blsp8_uart: uart { function = "blsp_uart8"; pins = "GPIO_4", "GPIO_5"; - drive-strength = ; + drive-strength = <8>; bias-disable; }; }; diff --git a/arch/arm/dts/qcom-ipq4019.dtsi b/arch/arm/dts/qcom-ipq4019.dtsi index 181732d262..6edc69da67 100644 --- a/arch/arm/dts/qcom-ipq4019.dtsi +++ b/arch/arm/dts/qcom-ipq4019.dtsi @@ -9,7 +9,6 @@ #include "skeleton.dtsi" #include -#include #include #include diff --git a/arch/arm/dts/qcs404-evb.dts b/arch/arm/dts/qcs404-evb.dts index c8bcf9f71d..cc70afa4c8 100644 --- a/arch/arm/dts/qcs404-evb.dts +++ b/arch/arm/dts/qcs404-evb.dts @@ -9,7 +9,6 @@ #include "skeleton64.dtsi" #include -#include #include / { diff --git a/arch/arm/mach-snapdragon/pinctrl-snapdragon.c b/arch/arm/mach-snapdragon/pinctrl-snapdragon.c index ab884ab6bf..826dc51486 100644 --- a/arch/arm/mach-snapdragon/pinctrl-snapdragon.c +++ b/arch/arm/mach-snapdragon/pinctrl-snapdragon.c @@ -28,8 +28,9 @@ struct msm_pinctrl_priv { #define TLMM_GPIO_DISABLE BIT(9) static const struct pinconf_param msm_conf_params[] = { - { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 3 }, + { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 2 }, { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 }, + { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 3 }, }; static int msm_get_functions_count(struct udevice *dev) @@ -89,6 +90,7 @@ static int msm_pinconf_set(struct udevice *dev, unsigned int pin_selector, switch (param) { case PIN_CONFIG_DRIVE_STRENGTH: + argument = (argument / 2) - 1; clrsetbits_le32(priv->base + GPIO_CONFIG_OFFSET(pin_selector), TLMM_DRV_STRENGTH_MASK, argument << 6); break; @@ -96,6 +98,10 @@ static int msm_pinconf_set(struct udevice *dev, unsigned int pin_selector, clrbits_le32(priv->base + GPIO_CONFIG_OFFSET(pin_selector), TLMM_GPIO_PULL_MASK); break; + case PIN_CONFIG_BIAS_PULL_UP: + clrsetbits_le32(priv->base + GPIO_CONFIG_OFFSET(pin_selector), + TLMM_GPIO_PULL_MASK, argument); + break; default: return 0; } diff --git a/include/dt-bindings/pinctrl/pinctrl-snapdragon.h b/include/dt-bindings/pinctrl/pinctrl-snapdragon.h deleted file mode 100644 index 615affb6f2..0000000000 --- a/include/dt-bindings/pinctrl/pinctrl-snapdragon.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * This header provides constants for Qualcomm Snapdragon pinctrl bindings. - * - * (C) Copyright 2018 Ramon Fried - * - */ - -#ifndef _DT_BINDINGS_PINCTRL_SNAPDRAGON_H -#define _DT_BINDINGS_PINCTRL_SNAPDRAGON_H - -/* GPIO Drive Strength */ -#define DRIVE_STRENGTH_2MA 0 -#define DRIVE_STRENGTH_4MA 1 -#define DRIVE_STRENGTH_6MA 2 -#define DRIVE_STRENGTH_8MA 3 -#define DRIVE_STRENGTH_10MA 4 -#define DRIVE_STRENGTH_12MA 5 -#define DRIVE_STRENGTH_14MA 6 -#define DRIVE_STRENGTH_16MA 7 - -#endif