From patchwork Tue May 28 08:31:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 799447 Delivered-To: patch@linaro.org Received: by 2002:adf:e110:0:b0:35b:5a80:51b4 with SMTP id t16csp126148wrz; Tue, 28 May 2024 01:32:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXuetq6Tk7+aGmjTI/4DwrMIaCQK3VRAadJypf2dduZfGKiMZWc1rjBMxzCR3NnpgISMFVDFBoPaSWITZfUceM9 X-Google-Smtp-Source: AGHT+IGaqmOyg6xdpFVsnFXQCPOHUzMEox9mvHaVqfKHOwu+QZw5dlkclW7GPhyfqepQYltSABwe X-Received: by 2002:a2e:968a:0:b0:2e1:c448:d61e with SMTP id 38308e7fff4ca-2e95b096f52mr87214181fa.15.1716885133699; Tue, 28 May 2024 01:32:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716885133; cv=none; d=google.com; s=arc-20160816; b=07SuPfBUN4tWFZiooboh3YuBmFrqDzra7ALveKJ+AHS3Vx/pmpghSfa5t9pcKR48ia Vk5kk1Xtbtx7kR8fS3YOcD2WAaf309aVz7ho1FPqPVLenkW4joL1L8A1yz32Gd0I2xis 9dvhsVxzuKlXf04PxNxWatdYikxyY8KEtIxmityUZYiMp7n+Jty0O29ma2yfZ5EtXXh9 bKqnfu5WvCa9xmEH3fu0G7gW0XwwzIEtI2YUpWJh4RwNDJgwFKHxUTrWAWYH4W1XKiiI nr9nFsUVi0yLoSAuxQRGh3RV6VwW2ZR0X39u10vroJYgELk5jNi1WbnXftcpu+BZSI+a 1xcA== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=WjM3JlERCtWo665sqxgg6ZomFIPb21Rxi8wtDzJVGYI=; fh=ju/Yan6u/w2utJXtq4FFB9YB8Bi7p2Ty6U7ZqwDKMRg=; b=zpTVMJVkoILLUEv6bHvWZdlhq/RJ+AydB4Z0PwnM3Fl1H421yFYigibWCQvWS26dyr ZlrsfYEewpXRyzZNI2LorIHQRFbULaaHRLlwgV8opyB6O5PQmIwydkcLBK4rf/tZp5sa ClcZZQPsKYjLPtOlaL/Uy+iEJPooe/LB0Jh/souHmV5e0RQRuOH3cv4v45jlr/UazwLU YxJ08PNL4kP9Y6oYHbz4qlqKVXzxu9crYQ7OfIFsFA+sBBLOJ6rX5z3D7EOdWXCOg4ni 4jMrdWkbbfwiYX2OQQbb20E2mWV1Kvx3OQwRa9ziMqMBuHBXWLIas9L29P47F4iXdPjA RVOQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="o/tm7f74"; 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 a640c23a62f3a-a626cc36dcesi481115166b.356.2024.05.28.01.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 01:32:13 -0700 (PDT) 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="o/tm7f74"; 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 7B71E88418; Tue, 28 May 2024 10:32:05 +0200 (CEST) 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="o/tm7f74"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8042288445; Tue, 28 May 2024 10:32:03 +0200 (CEST) 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 9242D8841D for ; Tue, 28 May 2024 10:32:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-354f51ac110so569404f8f.0 for ; Tue, 28 May 2024 01:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716885121; x=1717489921; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WjM3JlERCtWo665sqxgg6ZomFIPb21Rxi8wtDzJVGYI=; b=o/tm7f74zpMvHRMrH+/lMJGihY4k977tkL4Stp0Z7LuOHqNywLCmEuhEnCfncU3j/8 5g65pJKqNAQVtLLCa3cr5aAgqCph0/TXbNIBGlZLP7OxjW1VgCWM24OMfKv9x6KUn/5y v3JO3/s3KP8KypynSnYC+OoJFWclTnlYvce8HIkoBX/2ppgul/GyWQINwO4JzKDOc9en tJdv57e3H+wNO+0eXIGL7JxjnuLfKvPeXOunwZpB5pmj10EQvR0UO3Fk5i7TwPaZ+Ivu 9lYDz7XBNpsVdUTu9BzbyETrlroztWJbLc2vTYQto4Zl5LL6ZcxAkcIQKVeAqhZiJpdC Yn3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716885121; x=1717489921; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WjM3JlERCtWo665sqxgg6ZomFIPb21Rxi8wtDzJVGYI=; b=rKrHkUoTTsvWoUorRllZb4NdMORLsYP0+ig9auD1JKH5euOg7iN2POe+3Eq0xVuSuj vt6sr/lfvwI99+CYrssF6ia/5ddtefQxbeRkgxovHenTsyFNW/QMTjW9XZyUEcmqPIeU 8A/5i8Qs7HpvTN92OmN29bLa36CgcyN5b40Zj6gfJ1P0FJwlSXu/i3aU6Vwe2ZRfpp2S U9cAexrJfjMJY/V6TzfrG3EaSRahXcs0oNfEWfBx/bbLeNv9fwYVYQs3Vn96rt58vBt8 rH8K1Gpui8Umx/tyM9cWOG6bNdeQN4bQKi3VmtWPw9IiR8AsP5LGR1PJeOlpGeJ1SEg1 FaOQ== X-Forwarded-Encrypted: i=1; AJvYcCXGiTwgoms2GZsdo+YcNyNfRNqyfuwFapPOorN58vobHGzLK7YYN+2Uzw2W4sNkIw0cElTSBkMPFJcBW3ZO8FaMSgLFRQ== X-Gm-Message-State: AOJu0YzuKRgdjcgcfLw1dJ/RindhIPMwMyfIu9EVZvV34DnMVkj76TGJ HBiy2JoyfdGzbzPkyMqx8Yr3IcgYQT/RTWmtYChcMm5zGUFPXKQfP6IxazBD1eo= X-Received: by 2002:adf:e681:0:b0:34c:b80a:233c with SMTP id ffacd0b85a97d-3552f4fd1b5mr9599297f8f.15.1716885120941; Tue, 28 May 2024 01:32:00 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100ee7f1dsm167122035e9.7.2024.05.28.01.32.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 01:32:00 -0700 (PDT) From: Neil Armstrong Date: Tue, 28 May 2024 10:31:53 +0200 Subject: [PATCH 1/5] pinctrl: qcom: add support for bias-pull-down MIME-Version: 1.0 Message-Id: <20240528-topic-sm8x50-pinctrl-pinconf-v1-1-54d1e9ad7dfa@linaro.org> References: <20240528-topic-sm8x50-pinctrl-pinconf-v1-0-54d1e9ad7dfa@linaro.org> In-Reply-To: <20240528-topic-sm8x50-pinctrl-pinconf-v1-0-54d1e9ad7dfa@linaro.org> To: Caleb Connolly , Sumit Garg , Tom Rini Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=817; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=GfDI4Yxwh7BhOxD+nmN4/U4x9gi7NnI+ngQWnJCB5wY=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmVZZ9mrQn/yi7yGaUSXnyktqbTrifppAUHaRQAOJr fcHdy2eJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZlWWfQAKCRB33NvayMhJ0XFSD/ 9X2A05I+fCuxuqMANhND13tPh6x8z7wi1lXHwM68bDI2JBFx8PgwxIfBl5RKaseUn9uzjejI0gVI1A SHQFAhXOmAA0dRTjm6F6bny359W07cL4ZTZS/a7YSWL597NLgFKZCaHyZql0s4exIvDskZziUXwCLz 798Vq8Eg63O3AAFOl/pDBpFg7QGireq0YBYg2ZCyc73J99GQ2v5lxmwLgYImzIaR7M86+YCQ0BBAIK OvI0D3PPNcBzWsBygAI+FaCUoqYoPJU+rx6mCgBmCOXWYKY4Twoc8x4bC0rZOBwCWmHMe13elrq8Km DForycIGrmNjFhT0DC+dB9sSAS2dsrlrea2xyR7xVvwIgPqe1n5ZSnz5C3LjxbE8gIyH7SzjKbn4uH SKOHV7uWU1dKbuSrLIdM/16Jn2Rc1h5feA+Q6AITvYvX9O9WkfjBGuMiLwwDsBTU+SZgyMmxT/NV/r afIXfqzEmNgcBmaEGylJ0edIKmelIeixrNx5xnLJiDOaPPhFW43fGVhJcN4SzcjNFXheZu2AHi8V33 6taz1CkxrTRkLOOCx4eKMe0MYwhVk+04Aq6DycjJgCzg+N236XUQ6jUPDxI5GFR/S+mByGOY1WSlFy CU0kE5FW+o2OTekI8ELJ+OJSDewYeLm8xGZttJFyGNB8Z9TNUGKLDlnrHR/g== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE 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.8 at phobos.denx.de X-Virus-Status: Clean Add support for bias-pull-down as an alternate of bias-pull-up. Signed-off-by: Neil Armstrong --- drivers/pinctrl/qcom/pinctrl-qcom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/qcom/pinctrl-qcom.c b/drivers/pinctrl/qcom/pinctrl-qcom.c index 3c3336e7635..4f4e9a83949 100644 --- a/drivers/pinctrl/qcom/pinctrl-qcom.c +++ b/drivers/pinctrl/qcom/pinctrl-qcom.c @@ -44,6 +44,7 @@ static const struct pinconf_param msm_conf_params[] = { { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 2 }, { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 }, { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 3 }, + { "bias-pull-down", PIN_CONFIG_BIAS_PULL_UP, 1 }, { "output-high", PIN_CONFIG_OUTPUT, 1, }, { "output-low", PIN_CONFIG_OUTPUT, 0, }, }; From patchwork Tue May 28 08:31:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 799448 Delivered-To: patch@linaro.org Received: by 2002:adf:e110:0:b0:35b:5a80:51b4 with SMTP id t16csp126179wrz; Tue, 28 May 2024 01:32:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWtkBmTWRo7dQ4iusBKg1Vqr2dg8oumxMwpeuebPWF0E/FsvBcQb55KGsOnwCys9wbSIVbHPYItNejsxGDqgYpp X-Google-Smtp-Source: AGHT+IFcBuf0tVqwP9S/x1C2zqHRNM6E9UFP+5LC0fh+Rqq/cedk9cik5vsr2OOTtKHrMuRA2r9x X-Received: by 2002:a17:907:94cb:b0:a62:eab9:4be2 with SMTP id a640c23a62f3a-a62eab94d52mr394970166b.44.1716885142810; Tue, 28 May 2024 01:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716885142; cv=none; d=google.com; s=arc-20160816; b=s2HEH4m88HJK2eHkgSclAL8OP4PW6eciNuG3BMztWIdzg90tpDM5jrLjMnPNndhR4R +OAPJLjGOxdCHwCdst8D16tqBbgeEfTJ1Or1xLtyViTqqNM5RFeDGVaR/WBjmp7i8GDk EDFUZtWm0Vt47BGt6aQ2y1asDfWvAbv2tFZdeOv6IsR3di62DsWXEoapQhEqk84+CbO4 oODBO1Q/jw35NyzF7QnhlrDp8lRopbppEDe7BfR0pw2iMRclqnU9yUhakrPovoG4G1Bq usviRL3HyMumt/esPyDm7X5w+cvFJPk0+sZhxJwBYq6N9GE6bYOCt8i+4KpByYF5wgAQ AN7Q== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=ls49B4+5tvTEi6VVvn1gKRbdfX9kUtVC689eYq/FhUM=; fh=TT5K4omqFy7xQYEg56KYrrRjS/6sWtquspffY/hCVPY=; b=T5FXUEmNg0IumtgHKQH9tzuKq4ICyZbZY4iUeZmicN1fZ9y2qk4EiStxEfPhlY2rAf 5VR3LnNjJcMy21E00W4afj1ZVkB2cGV3icmoxbsE6EkWk7/V9lELSnzdteIeOn0WfrE3 l9EVVJidl43DWHQmMB7pPKopw83CIkcoHZkdmlYCfbHUboeLKaQq5QSuZpj965GsymAz 2E3eqGQVyDBhZAf04E24BOhp9IopFcCN7T1tz2VGpl0SdCAPFMFHD3uCejRVsGznAEsH cLDK2pqNzOlv3YGfVW83X9YO0i+w+cgc1FySU9q5qd0EHQGJkDv8pkWF2Ej5L99ANY13 0GOQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u5H6rRdE; 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 a640c23a62f3a-a6342a597a5si54043266b.1039.2024.05.28.01.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 01:32:22 -0700 (PDT) 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=u5H6rRdE; 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 B20E988445; Tue, 28 May 2024 10:32:06 +0200 (CEST) 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="u5H6rRdE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E8D8A8845C; Tue, 28 May 2024 10:32:04 +0200 (CEST) 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (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 7337788440 for ; Tue, 28 May 2024 10:32:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4211a86f124so4320255e9.0 for ; Tue, 28 May 2024 01:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716885122; x=1717489922; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ls49B4+5tvTEi6VVvn1gKRbdfX9kUtVC689eYq/FhUM=; b=u5H6rRdEg2B/v45Dk+1ze0y1oTUPvyN6Aizku9EdMo5eWi6Pkixa/bn4WVFGBRl8t0 3rjRx095ByuZKaW0wFjGAkaXddnQuf+bZ/f6xNolpNvb3Mj7KEgp5/x/ea5YdIX0+n1y lVcnjubRCwWDN56UwRXCSXRzP8PeNz0EVNBtJVTzqiiVhXY58wC4SsEW/GWr85WlQGzw vcF2ZgViKWuekxASUNeCAKHb/vEhPT1jr0e075DaNqXBW1T9M9NFtUl/qIR4RwAhveAD p8PFYNohdEzG7MHE6EGUZ34RoYN4vb5lt56ad/HASKF0RBMrPiWjWf4BVcfpmkO/9faS iLBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716885122; x=1717489922; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ls49B4+5tvTEi6VVvn1gKRbdfX9kUtVC689eYq/FhUM=; b=ha/5f+6jwaVGlKcr5mwkFKBRtNyL9BJuhvtWUJaJAQCfRtnfn2s3sVoaMJLyvh5K3+ fV+5YEvYA7N8vw8jPuwHIFN7fHHqabIzX6xOGtJxJ719D3tMfMOVkjUUVbjJX3CkbULy vNeJ4JmA2Q37sxcrDDPXL9Ds9R2xeKi6mD5UGUxVcOV4giBzQJf5CJmUg5FwVnH/rs2Q g9DzbHi1ZqC0kUN0jbq9OHQyM3YvN8kQ6hBrahNyLoYWeRKKaSCCFLGE5Tg/42bfi5QQ NNcXcCKF+tX6eQINpfGypQFTz2HviYy36gRYe27LgUPulsfxIil5ZjQhM5z+miNGJg2U LC6g== X-Forwarded-Encrypted: i=1; AJvYcCXZxGHuAJ3RXmvrr6kjUR5UYIzUsXfBMZ3OvvfCOukzBJvL0aX3Et7kLf258SJ9wqavhZDOs//fUIXtSn7XTxN3XoiOEw== X-Gm-Message-State: AOJu0Yz/edoHeRrPThnDcfkTpRAangY17o49WoMUCyaxvYcXwqOMX9Sa tuf4EC4OAB6x/T7/KzEdTwp9pK1XrE7ouwApWb2gt5ByzPGk4vUMe2KHcu71lDs= X-Received: by 2002:a05:600c:3145:b0:419:f9ae:e50 with SMTP id 5b1f17b1804b1-42108a2145bmr86154985e9.37.1716885121705; Tue, 28 May 2024 01:32:01 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100ee7f1dsm167122035e9.7.2024.05.28.01.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 01:32:01 -0700 (PDT) From: Neil Armstrong Date: Tue, 28 May 2024 10:31:54 +0200 Subject: [PATCH 2/5] arm: mach-snapdragon: gpio: introduce msm_special_pin_data MIME-Version: 1.0 Message-Id: <20240528-topic-sm8x50-pinctrl-pinconf-v1-2-54d1e9ad7dfa@linaro.org> References: <20240528-topic-sm8x50-pinctrl-pinconf-v1-0-54d1e9ad7dfa@linaro.org> In-Reply-To: <20240528-topic-sm8x50-pinctrl-pinconf-v1-0-54d1e9ad7dfa@linaro.org> To: Caleb Connolly , Sumit Garg , Tom Rini Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1356; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=peCV0h8P6z0PbDEmT1d31btpJwWRLaTftm13hTAtKBc=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmVZZ94yuS1jPMOKsy3dcWoKZhC16CLRzt6YL+LlZh xsDVLneJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZlWWfQAKCRB33NvayMhJ0aTREA CBGrzeOpeqyGxzpN3Y4JG7tVj9yBPxO/xNFTRSpfomTUy1YAEnvKK1nPXtizMuwuXaq9YHkYB9CTQG xDVz/vbwV6GnWhl576R9tV0r75LDAtFhLK2vO2Mo9IyHoBpcGJD7/pEUwqsw8IeOhKZ1LdsNisnuHb 3yyOGm0fLe2jFzAgphjyI9p5BbsMENJR3YYCBAdY73e6pZzRr8Oi0dzXPc/QO8PU7oNVVZfDzb72gf 81I0TmgwnJrbfpmsl/lX549jNowNPu6res6e7pqfkm21Q43aWx11AxbtccqlFr/qxi+DYUCheNIAzm sdaYxpUcFH8BdrfroCJQlOPXk10kzEWOZamm7QQRl7n2jeZ4w3SKlMMu8tCl842gCTCIzglYCm7PVJ N6jWoGyHiPUaMJXdubxTOPJSYEuJ4t7qWZ20ntY68tdlAP5PC7QJsXBj20uOQM/k/RwNigl2NLZEo4 EmCkFPQMdk4l0KlYSAUG6/OAseukVc/OTMZu63ogdV0TimTTazFTnBZleeVspQ3QCVmzQgftSu8Cmf t9Z/DlUR5JgWEEb2upjYx0Bqd6upYIASU66pCmmIaShc6XD0LecgBPQUUqF1yH2fneA1y5MG4xeIB0 hQm3pGjfA6BXjqJCIn2SZK6hL9l9ZaHwVN64N77TzYl7mVtkmwK/6ZJbWTNQ== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE 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.8 at phobos.denx.de X-Virus-Status: Clean In order to help setup pin configuration for special pins (UFS, SDCard), introduce the msm_special_pin_data struct largely inspired from the Linux conterpart but with only U-Boot required fields. This struct is added to the pins_data to allow specifying the special pins data for each SoC. Signed-off-by: Neil Armstrong Reviewed-by: Sumit Garg --- arch/arm/mach-snapdragon/include/mach/gpio.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-snapdragon/include/mach/gpio.h b/arch/arm/mach-snapdragon/include/mach/gpio.h index 53c6ae06490..cc8f405e20b 100644 --- a/arch/arm/mach-snapdragon/include/mach/gpio.h +++ b/arch/arm/mach-snapdragon/include/mach/gpio.h @@ -10,11 +10,25 @@ #include #include +struct msm_special_pin_data { + char *name; + + u32 ctl_reg; + u32 io_reg; + + unsigned pull_bit:5; + unsigned drv_bit:5; + + unsigned oe_bit:5; + unsigned in_bit:5; + unsigned out_bit:5; +}; + struct msm_pin_data { int pin_count; const unsigned int *pin_offsets; - /* Index of first special pin, these are ignored for now */ unsigned int special_pins_start; + const struct msm_special_pin_data *special_pins_data; }; static inline u32 qcom_pin_offset(const unsigned int *offs, unsigned int selector) From patchwork Tue May 28 08:31:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 799449 Delivered-To: patch@linaro.org Received: by 2002:adf:e110:0:b0:35b:5a80:51b4 with SMTP id t16csp126241wrz; Tue, 28 May 2024 01:32:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU9kkHwzr6w4IrwH37d4cRhV/LEvct5UzpU9WPdI2GWOGUr0n5ULE23JzEbrK1/fEXrOdtiv3vmoWU3A/3Dn/Om X-Google-Smtp-Source: AGHT+IEbEN3xjj04B+eK+9SNvCvHeHIOFKbEH31YUdfx0nhar3ZxSoo0sKys3QXb7JCsYQGS8Zd/ X-Received: by 2002:a17:906:66c7:b0:a58:e3d9:e2d6 with SMTP id a640c23a62f3a-a6264f030c3mr977591866b.56.1716885152929; Tue, 28 May 2024 01:32:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716885152; cv=none; d=google.com; s=arc-20160816; b=qmY1Kh5j3zQ8u0mw3xlnLc7uOXNARI3oJmF63vEHDUd7WddkynzV/3p/R/6hT/YufS PbdweRiBCheCv5eJ6jU3ACqLD3o5ODLhis2P0hGeRLzxzhfMmZt7Z5hVb9Aq7I7CblWW lsz3cs6LdmZ5xl0dsT+sh0Mr5TelVHDqFknI5FlZepI/njMVKpHt3pbGU0iujxnsBqOP al806Ar3Kz6RaD+ssbyai+V6NskqsvmEeKzlQEMnqEQzENlFhsbGWXhbwCI/gdEeizja ++n7yBolrnaXZIo0DodlM3TeZ0FxfQgpALlmoPterkhmYmQpf9QhRtoXuRuZU+dzTBV1 vaAQ== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=KCIP0Gs6++BTUw1xvrVqee19gMALZn3da7WEmnh7Zeg=; fh=5NWGXQ5j5H8yjsiBaNHejnhN8+REHq4krzeyxJtla8Q=; b=Fp3FmtsNupllHwOAR/vFmaktNH9fcSNwUe3zcbPRlX8LeTamZAWUbyhHmRydBvEbcK Jua38F40YgxMSe6SbGZ2UpeDPD1hdSkorp9t5hX31mWW7wk1JpzTdQklcF6BA8vk3bpW gX5Wo6ILmQ+Lg7LJqIs7qTcaVe1LCSwShNdaOkL+Sob86Sd7xMVZApSBF3waztmApQaS 5O4zu6i0oynr7JFoIDM0e488cKfnzTbE4BY+LZZU1V14niQHZc1b2Q9jkxo+l/a6tAWz FzjaMraTbPD6FzWcXm9rSi7J9lQnciW7+S+cG41d0LrFH97QSKOxD1wJudzYj3ZKOtNQ lCEg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CXrWUglu; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c8007f9si479171766b.90.2024.05.28.01.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 01:32:32 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CXrWUglu; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 182638845D; Tue, 28 May 2024 10:32:07 +0200 (CEST) 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="CXrWUglu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5491A88440; Tue, 28 May 2024 10:32:05 +0200 (CEST) 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (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 4EAED88402 for ; Tue, 28 May 2024 10:32:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-52965199234so607576e87.2 for ; Tue, 28 May 2024 01:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716885122; x=1717489922; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=KCIP0Gs6++BTUw1xvrVqee19gMALZn3da7WEmnh7Zeg=; b=CXrWUgluAM8EhxEQiynek0uA6FwViGjy6iD3ZKpRRfEBeH86nFKrwqYFYIbB16TGYW olrd+aVknKno5blbV6QbsMPaoXoCXWhmVix/QxsnbWxPZ8g0pgMzkxusal+bfzudbxU4 sbhkwg47nbmnzygimy+2P0R3HM1D+VMLJVHmYhx5DhnzteLZcHal9apVOhtlCTlEeu+o juzTqyGGMDw4XhqqBQDeMMfDbTlWZuAwQ14ihJnRAzjK7PNWuILbm98Tuwe0bgACxKhA wkSThLD7Ep4tuAkgXPdNVoFfJ2kPbx2cCAWcfE6bdelX12z0bj+alq12rt+nNPefRgMt L5zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716885122; x=1717489922; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KCIP0Gs6++BTUw1xvrVqee19gMALZn3da7WEmnh7Zeg=; b=PHPdBibTRHa1fsUz2ln5MaXpkjQE1PDDdzVX+URWxWwDhKdz9GZwYFnx0yEeDnwo3q pRoe1rl30fmwQ7z0e0CiS30OoDijVdamiLwFEgOFPaGjlBS/BB5Prkvs9Ilz8hg70OJQ 0MwT7dG/+NkXhVWjmLeM0ev/D0QxR0shzq9Ah4SPoFBWC6wJW4Xvo82q4Mpg4XWYr2tp jx0csFmsKWyXdULI3oGVDaRFdww3bcWKnaQB4PHp+DzA7qhvlyHorWJVyHLjdD80LvUI FVqHmUxbV/mp+HH8s0Lu1eSuSPPFbV1k/MWaHZiwoeibVGX77srCRr4JzFxBKteNuy4G 7+ZA== X-Forwarded-Encrypted: i=1; AJvYcCU6dhMq5u4NZ0eiqyqAZyfRb5PybLnkvbYP9Cx9KxKhPS6OCjL+mcWDKw5dswYxuj04bJJ2ZamsEoAL34x9rluT6bHbDQ== X-Gm-Message-State: AOJu0Ywp5y3tKr1YnQ8eBfR1U4aDJewYsQrCJtjLRTOxHWa4tb+G7g7g Xs9aAASSpymcUxVq4ulkKbM61+tWjBqwUdBWwJ46FS+nZqfhmlYssCKQCRuyX8E= X-Received: by 2002:ac2:4206:0:b0:520:f419:272b with SMTP id 2adb3069b0e04-529644ebeadmr7044692e87.5.1716885122423; Tue, 28 May 2024 01:32:02 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100ee7f1dsm167122035e9.7.2024.05.28.01.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 01:32:02 -0700 (PDT) From: Neil Armstrong Date: Tue, 28 May 2024 10:31:55 +0200 Subject: [PATCH 3/5] pinctrl: qcom: add support setting pin configuration for special pins MIME-Version: 1.0 Message-Id: <20240528-topic-sm8x50-pinctrl-pinconf-v1-3-54d1e9ad7dfa@linaro.org> References: <20240528-topic-sm8x50-pinctrl-pinconf-v1-0-54d1e9ad7dfa@linaro.org> In-Reply-To: <20240528-topic-sm8x50-pinctrl-pinconf-v1-0-54d1e9ad7dfa@linaro.org> To: Caleb Connolly , Sumit Garg , Tom Rini Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2105; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=t0JY5Z1xwZbceiy2/eEC28IVIyPnjXNY/kQlrmTeXbQ=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmVZZ+vXHqOVZLfbntpN7NpF7jZMAIcetO9i5z66vw 3iDo8VCJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZlWWfgAKCRB33NvayMhJ0eA4D/ 9dFIsy2BbMi7GocpP3u31+c963Fpk/TrCO0qmiN6iYd3VfRWtxUzRcfP2fTQMQD+M6JHf09/2XwwEA W4szTSIV/BbwfugypheOsOk5b5aBoDhnzTN+60WxpYFAKB/Ql+PC54E7MKnml58PdixNN6EtczmKRy TJEBdgTN42zvO/ptgjdP5I4VlYATCdml8iRhnNmN/QfcO04h6WteMkZwI+sf9L9LLHZcBYPr21e0UM xj/D/3h1i9hPG4Pxge3JOESqTa7NgrEcR1LrUEktmhdkftdOhDlordHwAkcNrtXI+EZz1guwepGYhc rOhJGpyZhqizTshKSFtXnz+g/FqSSZXCr1fgqrXuYgxwGDniexRSFK+rnYLx+tgVEWtYjkXVVOMmOr +YkswnU2oL/G2xeX6QZX+i5xX9zZUxHm6ZFgYZglgBGuHa7UqMHod9psMzhUEW+al6c128IMP/CoXT VrI9Htk32dKTiD6OVUAXjmhxH1tfvCH0dpVZVLoPqpXnuA+yF9HrmUt35qFQTTMdlTBwQP4DGaFYiO CO7YbVHZY5kzyZvDjVXQyZOIVILYLnSMsk76eSU8YfFZ/3SQ2Rl+tDgQpHhbBwUhL9YtpWjkydKlnk Ak97lKss90gIZHw9QLY6uzLbOPlS14nw3nYbj2w17QiifBIKBXUHmDXUa7+A== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE 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.8 at phobos.denx.de X-Virus-Status: Clean Use the previously introduced msm_special_pin_data to setup the special pins configuration if the SoC driver have them specified. Signed-off-by: Neil Armstrong Reviewed-by: Sumit Garg --- drivers/pinctrl/qcom/pinctrl-qcom.c | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-qcom.c b/drivers/pinctrl/qcom/pinctrl-qcom.c index 4f4e9a83949..26a3fba194a 100644 --- a/drivers/pinctrl/qcom/pinctrl-qcom.c +++ b/drivers/pinctrl/qcom/pinctrl-qcom.c @@ -103,14 +103,47 @@ static int msm_pinmux_set(struct udevice *dev, unsigned int pin_selector, return 0; } +static int msm_pinconf_set_special(struct msm_pinctrl_priv *priv, unsigned int pin_selector, + unsigned int param, unsigned int argument) +{ + unsigned int offset = pin_selector - priv->data->pin_data.special_pins_start; + const struct msm_special_pin_data *data; + + if (!priv->data->pin_data.special_pins_data) + return 0; + + data = &priv->data->pin_data.special_pins_data[offset]; + + switch (param) { + case PIN_CONFIG_DRIVE_STRENGTH: + argument = (argument / 2) - 1; + clrsetbits_le32(priv->base + data->ctl_reg, + GENMASK(2, 0) << data->drv_bit, + argument << data->drv_bit); + break; + case PIN_CONFIG_BIAS_DISABLE: + clrbits_le32(priv->base + data->ctl_reg, + TLMM_GPIO_PULL_MASK << data->pull_bit); + break; + case PIN_CONFIG_BIAS_PULL_UP: + clrsetbits_le32(priv->base + data->ctl_reg, + TLMM_GPIO_PULL_MASK << data->pull_bit, + argument << data->pull_bit); + break; + default: + return 0; + } + + return 0; +} + static int msm_pinconf_set(struct udevice *dev, unsigned int pin_selector, unsigned int param, unsigned int argument) { struct msm_pinctrl_priv *priv = dev_get_priv(dev); - /* Always NOP for special pins */ if (qcom_is_special_pin(&priv->data->pin_data, pin_selector)) - return 0; + return msm_pinconf_set_special(priv, pin_selector, param, argument); switch (param) { case PIN_CONFIG_DRIVE_STRENGTH: From patchwork Tue May 28 08:31:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 799450 Delivered-To: patch@linaro.org Received: by 2002:adf:e110:0:b0:35b:5a80:51b4 with SMTP id t16csp126281wrz; Tue, 28 May 2024 01:32:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV15PB8n485YkQcvfPR6Pn0S9oe64kOukD7iFR34mKYzz+iFYrm3fbaVA4qP/cDtxrd1toRX9Unz5ivTLuHH/EE X-Google-Smtp-Source: AGHT+IF8TPNWXRRLpiBjS47SKRoW6wFWzqX98sqUo/wWOUPTJ0hPLtU44Rnv84tS63+cMBOAwE76 X-Received: by 2002:a17:906:37d6:b0:a61:3dc6:3063 with SMTP id a640c23a62f3a-a6265118d27mr687461766b.69.1716885163615; Tue, 28 May 2024 01:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716885163; cv=none; d=google.com; s=arc-20160816; b=bdBLynvJhXzu/EAOEUD35dY56N+5Uc1E/d4joJJtRA8G2DxBwm5kW4OJnYDSzcViQF 2vs6AgO/10i/zk9hJjzn+sjgWOYBQlaHQmWQf/utgkmy4V3kYkTZLHLfVQ8sjJUvKXi2 l7v/Ww4jakVMIx71DBSitBP91lHou+P4pGmHeG5hmeu36su9IHM7c4YE17FQjJBhnMxv CrJ5X+P/knWs1r8skZxpx/nHztq4uJGsba97PGlSwp0JqAsji8hAWbXP4OpEwU58sCf+ pDhahXHlwjEpy7AxlZi1XI7OWsWKEzg75PLWSPUhzehl+71V2uPE1ek1yt0DZAlB941O h61Q== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=CVtRuMH7l26GoYmBK+IZ2kjg3Vz0LD7oKprQ1i3TIBs=; fh=s8YUSc6HTEIRxbVBCget4c9+Ny3xVS3EJDu32P63O4E=; b=Zt6+93MW+zcNSbW3ApDcCYrIHTC6ZxMYg1F0S3h/Oo35RRq/GZuJjnnergd7XQW5wd lbNLaeCLJ6e4Mcff9bbi7EuxGJMIriwTSxKf9JykSBHfTGf0W5rJPh99VrCcchQyHMwI sYKhDumOMrA0rgQXgPu8EQWVX3n9l33XBBJoTbVKg/Go7++d/f1cseRwsg07hIVLPt/d QZDMPzHFvS5WLiYtv7X7EUHTZXCMAnI+O6B+EvCmX98WymOElgl7Q6A6MPWufkp5YiUL c0rxTgrHmcTy/vGFhu1xbjKDdAd0ReUds6WAK7H/PAX+2nFmbke2xwD0tFAB2lWsaDkm yAlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ja7WjS6u; 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 a640c23a62f3a-a626cd918a0si475457566b.745.2024.05.28.01.32.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 01:32:43 -0700 (PDT) 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=Ja7WjS6u; 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 75A6388470; Tue, 28 May 2024 10:32:09 +0200 (CEST) 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="Ja7WjS6u"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D64AE88440; Tue, 28 May 2024 10:32:05 +0200 (CEST) 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (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 CAE298841D for ; Tue, 28 May 2024 10:32:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-42101a2ac2cso4003905e9.0 for ; Tue, 28 May 2024 01:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716885123; x=1717489923; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CVtRuMH7l26GoYmBK+IZ2kjg3Vz0LD7oKprQ1i3TIBs=; b=Ja7WjS6uFGtcsdFMDIuV8mLVQhfBWChuoLqMzAiXOKLzAJ4Dx+fBvbxg7F1MAV92V0 UXrPTKEDXSI7l20oxBDNZGHnhpJ0l3nmFoTIjlulbAdsbFpw3CY7EXAA1i4WPg94W3KQ Iu345pehhN/P5eKN/r06IwAqoMi3IVJRNhQfXK5DUhpGqmoErBfPi1GKu8INPzd8U2SY dtUvP7+kTlxKZI3fEyr33iu3RhYbukk02DDkQ79XlaI66al4aRzPIvIpCz57rU0sownQ Ka5K3uyx4XzeFSu+iLGuUNYoDwLONlQP129aefkHJi6mXzLEFpLK7U4j888HLgYDHoch jPJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716885123; x=1717489923; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CVtRuMH7l26GoYmBK+IZ2kjg3Vz0LD7oKprQ1i3TIBs=; b=NqFoLpI88IihxneuNyHx81yRmtCprTyzT94OyvYW4O/7CSYhhuFNakSdXcCOilvDlQ v/TvsM2eKZIsnwt/Ga0Qv6OF3dGIpWVk1+5QTVYLibc4XgLvU5Cu3azV45all/w4xT08 SjzJC7WL373b6o0x79cnC9hW7LfALLkFYKjPs13mJvmX2NLqiWw3iPH03/87IKSGWGkV 1UCFnpQUnov1Xb4Gvfw1Cvi/mdcCnGoMw4bZS3kn+odVLkhP1TuLKHmO9HnAKfa/dq2c QiBLVd9t39m7KZPQ/I9KZjX7dW+ge/jIc6A7rsgnLFH2L0LITVT1BkFFkLvn8jyBuTNw ptTQ== X-Forwarded-Encrypted: i=1; AJvYcCWn9CUF1AhcF5szKiD5yTl3E6ZE0/UZfyQWF8/s8fuADgH45PBTNyMPbbPfpIw5tVNJy2cCSnMzW+lkFmnSUxyGWqLdAA== X-Gm-Message-State: AOJu0Ywk1ktmY0DjSlXVzvOtaSdgSQvk79yXHCbnVx+TQn9i/ekCsM8O SdTcpUt4tIDDN8SlFY9oX0ZfZMwEzGG6GB+/RzOrHd/5+npHcXPBflh7qjfR9fkreh0DxBnMkmU 9 X-Received: by 2002:a05:600c:5104:b0:420:151e:b205 with SMTP id 5b1f17b1804b1-42108a0d2a3mr77799645e9.39.1716885123147; Tue, 28 May 2024 01:32:03 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100ee7f1dsm167122035e9.7.2024.05.28.01.32.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 01:32:02 -0700 (PDT) From: Neil Armstrong Date: Tue, 28 May 2024 10:31:56 +0200 Subject: [PATCH 4/5] pinctrl: qcom: sm8550: add special pins pins configuration data MIME-Version: 1.0 Message-Id: <20240528-topic-sm8x50-pinctrl-pinconf-v1-4-54d1e9ad7dfa@linaro.org> References: <20240528-topic-sm8x50-pinctrl-pinconf-v1-0-54d1e9ad7dfa@linaro.org> In-Reply-To: <20240528-topic-sm8x50-pinctrl-pinconf-v1-0-54d1e9ad7dfa@linaro.org> To: Caleb Connolly , Sumit Garg , Tom Rini Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2477; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=mCqdxYvyviBa+gYtwAdJ8kvTST3CqJK+05M0NWeGtiE=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmVZZ+B3guskyzsLYaJKsg+lzGm6J/IOVgPhRWSXi1 h4CmoM6JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZlWWfgAKCRB33NvayMhJ0Z0PEA DQhlihuHMdQh9iwwrp4bun45Yh/zEtZ3sisGygLEYlLhclOZ4hDHfgCAD8pzluQdXTT3irWWWDqHvJ H9xRIHXB3EJYxiK5jR6LUZtJFrHn4k3MUpuVCsH6bope78p3Ws32Gortc86PVJaMPMgYmEiEPsFzVJ xNybmU7XbQ9oVSV8nk7ictpmprs2fUwvjPPASTpLfBL4h0+G+1y1V0a6VtuVKVU2FChP1WNUtGwbGq KM9U8GTBI+St3pzxJ7EkBRK+8zU8ulSL0p44/4/Vi26ZeRu5uGRQEyp7zRZqSlXC0kwFKMe44CKb/i qVhj7/rt1Oplz4MTwIMzYDzOqUx/lMdM39va50Jx/QtAqCvLGhr0QtYj7j0QrPQACHG7FiFQQD11Hd fBd9AQi/hjwpwEqPlnBnCSZ1HGE3dSYlp8t4LLlHjizl6Np1LHWxLORas87KbKET7eK1XllbLKQJcn C4l1gMz7ZpPRUWSh3oPNr8ZOZHPvry2UDkTdqeYmmdOTCLmCexdRU0M2TaxoiSexPEFRtAkprNF8CM GLasjbzDaOZ4RHotWE78xElWaMw6aBPn8AjOogad4uK/B//TeVNwQ1Eh4ClfHmygmMZNuou5m/ITM9 CYx3fF3IzpW56n2K98nFavxS2DoARkmk+5RwQILKSI8ZvpjIXgWDm5MDyC4Q== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE 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.8 at phobos.denx.de X-Virus-Status: Clean Add the special pins configuration data to allow setup the bias of the UFS and SDCard pins on the SM8550 SoC. Signed-off-by: Neil Armstrong Reviewed-by: Sumit Garg --- drivers/pinctrl/qcom/pinctrl-sm8550.c | 42 ++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-sm8550.c b/drivers/pinctrl/qcom/pinctrl-sm8550.c index 7265cb73404..c65dfe0435e 100644 --- a/drivers/pinctrl/qcom/pinctrl-sm8550.c +++ b/drivers/pinctrl/qcom/pinctrl-sm8550.c @@ -18,6 +18,37 @@ static const struct pinctrl_function msm_pinctrl_functions[] = { {"gpio", 0}, }; +#define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv) \ + { \ + .name = pg_name, \ + .ctl_reg = ctl, \ + .io_reg = 0, \ + .pull_bit = pull, \ + .drv_bit = drv, \ + .oe_bit = -1, \ + .in_bit = -1, \ + .out_bit = -1, \ + } + +#define UFS_RESET(pg_name, ctl, io) \ + { \ + .name = pg_name, \ + .ctl_reg = ctl, \ + .io_reg = io, \ + .pull_bit = 3, \ + .drv_bit = 0, \ + .oe_bit = -1, \ + .in_bit = -1, \ + .out_bit = 0, \ + } + +static const struct msm_special_pin_data msm_special_pins_data[] = { + [0] = UFS_RESET("ufs_reset", 0xde000, 0xde004), + [1] = SDC_QDSD_PINGROUP("sdc2_clk", 0xd6000, 14, 6), + [2] = SDC_QDSD_PINGROUP("sdc2_cmd", 0xd6000, 11, 3), + [3] = SDC_QDSD_PINGROUP("sdc2_data", 0xd6000, 9, 0), +}; + static const char *sm8550_get_function_name(struct udevice *dev, unsigned int selector) { @@ -27,15 +58,9 @@ static const char *sm8550_get_function_name(struct udevice *dev, static const char *sm8550_get_pin_name(struct udevice *dev, unsigned int selector) { - static const char *special_pins_names[] = { - "ufs_reset", - "sdc2_clk", - "sdc2_cmd", - "sdc2_data", - }; - if (selector >= 210 && selector <= 213) - snprintf(pin_name, MAX_PIN_NAME_LEN, special_pins_names[selector - 210]); + snprintf(pin_name, MAX_PIN_NAME_LEN, + msm_special_pins_data[selector - 210].name); else snprintf(pin_name, MAX_PIN_NAME_LEN, "gpio%u", selector); @@ -52,6 +77,7 @@ static struct msm_pinctrl_data sm8550_data = { .pin_data = { .pin_count = 214, .special_pins_start = 210, + .special_pins_data = msm_special_pins_data, }, .functions_count = ARRAY_SIZE(msm_pinctrl_functions), .get_function_name = sm8550_get_function_name, From patchwork Tue May 28 08:31:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 799451 Delivered-To: patch@linaro.org Received: by 2002:adf:e110:0:b0:35b:5a80:51b4 with SMTP id t16csp126311wrz; Tue, 28 May 2024 01:32:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVxMJrDPDi2KeTB5lxCFX890MKoyPPaLCILQ5jH2coJSqg0RplJ8PWoWb/DMBFw6c0Oa7SN0WqpPqhKwdLsKMi3 X-Google-Smtp-Source: AGHT+IH44RE6muEOcVekX3X/5W/t0PsCp826MGIFfkPwj4wsgylnQ9dkXzbDdn/6d5IqSsMXbicX X-Received: by 2002:a50:9f6a:0:b0:579:a956:76fd with SMTP id 4fb4d7f45d1cf-579a95677d4mr8382380a12.8.1716885173147; Tue, 28 May 2024 01:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716885173; cv=none; d=google.com; s=arc-20160816; b=cskrBT+VeuXMiYpk38kCT4AAHZgEW8XHYZZ6nte5lZrMWlz5gzjNygvTg7Jygff9tm e4zkYQuIcaip7RKIzxBOTVi47mLtXPknL53b7TvgRlnYPETDXT1C2lWqhOxfD4iU998P 22fXLGZkMnvVHFAXmYLMekoQjdcLb02bxPzcYJVMldRPLZDKOsq2VxNCZtfdnu52KcFJ NYVy0kqAroN47Tp9PpEronJkDgCGZQoEUUW9Qhakx3q+1jliQBx4aKs/vzX6F3lqpiTl jw/9WOjt1xp2OhbWaQrwNUUSakeQSDYMV7gtYf99vSoJ85k/vh6RsJk28qWMG00ncP8N Mw0g== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=CD/V2oiNsUpOHKjezbUTUwiLCQwPADw8OLXT/uFcZdg=; fh=pdEgtvoy28FFPTIxMdIH3MinB4FHH1LiiYk036Iiv48=; b=s+7lcPTkHKPUh3Geg3Ci644/Lz1mcfrzkNfPw4LpZrTJfIZo4IA+OalHnsst6ualtl P3a9G7qR9ezBKqqGztup23FYOFr1lrkEv89wlftqQJXCqmR+gAyVwfce4DkhobVVuSpz 77up8M3gxzbTypkviDXix+PZonDLN3bip57WyRzHZD06gVlkhGy4/wpu04PS7ei3s23x abev+NYihvYfcvUdLTjzsaMdFlfiMmH82a5T5c2PCxgWTQ68Pt9L/Ub4Ec3P7V/zrMHl B5xsNCZ6MQIYteSbk/QvC+CAm1oDDxsv+EgvtYSFeoyW0/6nHK39iTOtfDEbH9sfQk2e CSMw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zVPPUJOF; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5785f8a6175si4399636a12.189.2024.05.28.01.32.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 01:32:53 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zVPPUJOF; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 CD8878848A; Tue, 28 May 2024 10:32:09 +0200 (CEST) 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="zVPPUJOF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DEE1488460; Tue, 28 May 2024 10:32:06 +0200 (CEST) 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (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 B58B788458 for ; Tue, 28 May 2024 10:32:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2e95a1eff78so6509301fa.0 for ; Tue, 28 May 2024 01:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716885124; x=1717489924; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CD/V2oiNsUpOHKjezbUTUwiLCQwPADw8OLXT/uFcZdg=; b=zVPPUJOFJ1gpbfxPLGBLW16bWE2c3hAkNL/wi04cXXEKNGHltYFKXzd+mV2IRjcM61 QrialesXJH4GoMyPmtd01hBBNBtt8FzGDgt0BvaLTgPL9Z8mcbFszC6ETH+ZxAf3oQf5 60MnX6g6I8CQdpn8vncsTEnkwI6KQvLfyw780B1fSB+PJHvjYv/+GxSZZCeBlDDnq4QG 1QPYm1ed1ucLGxm/bWH95+Gl78CHGZl5EPgQ9W5WkIvTBFk1L+mjKxOz3fm4i23B8DOJ mNQn9w+U9uWUZnm21q5FqgNUjzqxXZG47SRnxwjo/PxFdOxSaiWSZ9SJKiPocIkflZEi 47Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716885124; x=1717489924; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CD/V2oiNsUpOHKjezbUTUwiLCQwPADw8OLXT/uFcZdg=; b=UnozMUV4ahEe1lo4ML2T9FuHPK7qUfQfUNsxCt/0lOdUA7ldqg2DVJRRGDejZcNsuE d43SEEzxWYcrM2zNDj2M/6psZ82dFX9CClYrbKh7Gf/cmuI6qSGZiDkyz5UE+mZG4a09 SaRTPCjXgzxPGxckyPejoqF3saLdcmNAtVZ+5QKFbwf4oXr84X7E56CX/mMTFowXif29 PXI2NIYs8YzYgk1KD+Puyk+PFDVIAgcF5+FOgCKtobgG+fB1+SgeQGT58zMr465QK0hK gGDNGJEFUPYefhp8rDzxmqMWxBiCyyMvNcSfd48IuIh/zLWrV6CqYaKF/pV4wgBuyrjF uY+Q== X-Forwarded-Encrypted: i=1; AJvYcCXVXFFWSgGG5qH8zWgO+s+eTo5DvP1U+fU17dsliDXrPnalhTcZ5D8wB0N6bePBJZyXskn/9kUxR/U7jmiUMNnMZ4y8PQ== X-Gm-Message-State: AOJu0YwRN2GZoUGUoSyBeLhaBySX22JvJfPg8AHYq6i0Akbs7cjrFVf6 1RBMH0c/fEd4+t8aE26q+vUUJB5BU69aPjg1o/LNDEQw7u4/e6xPqbt+FQChiG+VIOTAHpg2srn X X-Received: by 2002:a05:651c:b0d:b0:2e9:6d4f:e57 with SMTP id 38308e7fff4ca-2e96d4f143dmr81983071fa.11.1716885123927; Tue, 28 May 2024 01:32:03 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100ee7f1dsm167122035e9.7.2024.05.28.01.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 01:32:03 -0700 (PDT) From: Neil Armstrong Date: Tue, 28 May 2024 10:31:57 +0200 Subject: [PATCH 5/5] pinctrl: qcom: sm8650: add special pins pins configuration data MIME-Version: 1.0 Message-Id: <20240528-topic-sm8x50-pinctrl-pinconf-v1-5-54d1e9ad7dfa@linaro.org> References: <20240528-topic-sm8x50-pinctrl-pinconf-v1-0-54d1e9ad7dfa@linaro.org> In-Reply-To: <20240528-topic-sm8x50-pinctrl-pinconf-v1-0-54d1e9ad7dfa@linaro.org> To: Caleb Connolly , Sumit Garg , Tom Rini Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2477; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=GyUjNQLaqtuAEqtoXOgHoCzKRLac7lezt88J6C48HlY=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmVZZ/KaGNcurp8h6y6q4kHq2KXkvONLxxwaPCgkU6 ZspyKx+JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZlWWfwAKCRB33NvayMhJ0aN0D/ 9j5PbFmfggnEsJTnoDwWdxQGVfsmAGTyxTIYncgDGB9c3HOhllR7APPTJvC3mmoX3Y59R8dRo8V7k4 ZW2BJJfdM0l3YjJcMpBKEck5qi8m4sXyv3Q0WRG36QiXP1QPx8qrN05qtLqh00TVSWuH6bVVUBV1+d QC1ixwy5CuxnZKdTCM0tZsw9NmP4qt/pHEdTgUrSU1OtiFU8Kb3FAD1bsEDUFQoCZ0A3r1K7CQ6wFf hFf17OQCmrIt07kZL7qHIcIZ/1CSqeXMq21+DKZIZqmVlR7lbfOs56Iw4u52ZnYCznbdp0zROc3OCt DzsDNP3j2YJ7b289N/7ht0lc9+5NmKsfTIF3D0PSccK9wrIkr+THF/DtfeB3/AdxlousEjE71lK9Zi 1mOVHRwcW68dpLNzlsWVLvPHwVbyEXynZ07GDt40F9MOaCgKDZnuGCqmrZPevfqQwOTVwKuQFMLOTe Qf+vCucIdHO9btGEh+uWXGZKeidGC67qFwRZwOoesAOLInh7a/Natgy7BY4KdmXaRAjPPzVj/6oDXn 3O6jXgpEPl+mJzVqkClATcoc6uZ1wcr3SX9pRp1Fukry4mqv9uyg1FUdDdoJOyK3JXFNN2sqUjoQja 379jy02tBulXN/WUsArD50Q4esEeAF6MrGyFEo2HYoOZGdWC7PgJ8ssW534A== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE 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.8 at phobos.denx.de X-Virus-Status: Clean Add the special pins configuration data to allow setup the bias of the UFS and SDCard pins on the SM8650 SoC. Signed-off-by: Neil Armstrong Reviewed-by: Sumit Garg --- drivers/pinctrl/qcom/pinctrl-sm8650.c | 42 ++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-sm8650.c b/drivers/pinctrl/qcom/pinctrl-sm8650.c index d6cc1bbdda8..58fc94e71ac 100644 --- a/drivers/pinctrl/qcom/pinctrl-sm8650.c +++ b/drivers/pinctrl/qcom/pinctrl-sm8650.c @@ -18,6 +18,37 @@ static const struct pinctrl_function msm_pinctrl_functions[] = { {"gpio", 0}, }; +#define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv) \ + { \ + .name = pg_name, \ + .ctl_reg = ctl, \ + .io_reg = 0, \ + .pull_bit = pull, \ + .drv_bit = drv, \ + .oe_bit = -1, \ + .in_bit = -1, \ + .out_bit = -1, \ + } + +#define UFS_RESET(pg_name, ctl, io) \ + { \ + .name = pg_name, \ + .ctl_reg = ctl, \ + .io_reg = io, \ + .pull_bit = 3, \ + .drv_bit = 0, \ + .oe_bit = -1, \ + .in_bit = -1, \ + .out_bit = 0, \ + } + +static const struct msm_special_pin_data msm_special_pins_data[] = { + [0] = UFS_RESET("ufs_reset", 0xde004, 0xdf000), + [1] = SDC_QDSD_PINGROUP("sdc2_clk", 0xd6000, 14, 6), + [2] = SDC_QDSD_PINGROUP("sdc2_cmd", 0xd6000, 11, 3), + [3] = SDC_QDSD_PINGROUP("sdc2_data", 0xd6000, 9, 0), +}; + static const char *sm8650_get_function_name(struct udevice *dev, unsigned int selector) { @@ -27,15 +58,9 @@ static const char *sm8650_get_function_name(struct udevice *dev, static const char *sm8650_get_pin_name(struct udevice *dev, unsigned int selector) { - static const char *special_pins_names[] = { - "ufs_reset", - "sdc2_clk", - "sdc2_cmd", - "sdc2_data", - }; - if (selector >= 210 && selector <= 213) - snprintf(pin_name, MAX_PIN_NAME_LEN, special_pins_names[selector - 210]); + snprintf(pin_name, MAX_PIN_NAME_LEN, + msm_special_pins_data[selector - 210].name); else snprintf(pin_name, MAX_PIN_NAME_LEN, "gpio%u", selector); @@ -52,6 +77,7 @@ static struct msm_pinctrl_data sm8650_data = { .pin_data = { .pin_count = 214, .special_pins_start = 210, + .special_pins_data = msm_special_pins_data, }, .functions_count = ARRAY_SIZE(msm_pinctrl_functions), .get_function_name = sm8650_get_function_name,