public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <andersson@kernel.org>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: Linus Walleij <linusw@kernel.org>, Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Richard Cochran <richardcochran@gmail.com>,
	Bartosz Golaszewski <brgl@kernel.org>,
	 Shawn Guo <shengchao.guo@oss.qualcomm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-arm-msm@vger.kernel.org,  linux-gpio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] pinctrl: qcom: add the TLMM driver for the Nord platforms
Date: Sun, 5 Apr 2026 14:22:16 -0500	[thread overview]
Message-ID: <adKz2wirCJ5n3OpK@baldur> (raw)
In-Reply-To: <20260403-nord-tlmm-v1-2-4864f400c700@oss.qualcomm.com>

On Fri, Apr 03, 2026 at 03:27:56PM +0200, Bartosz Golaszewski wrote:
[..]
> diff --git a/drivers/pinctrl/qcom/pinctrl-nord.c b/drivers/pinctrl/qcom/pinctrl-nord.c
[..]
> +enum nord_functions {
> +	msm_mux_gpio,
> +	msm_mux_aoss_cti,
> +	msm_mux_atest_char0,
> +	msm_mux_atest_char1,
> +	msm_mux_atest_char2,
> +	msm_mux_atest_char3,
> +	msm_mux_atest_char_start,
> +	msm_mux_atest_usb20,
> +	msm_mux_atest_usb21,
> +	msm_mux_aud_intfc0_clk,
> +	msm_mux_aud_intfc0_data0,
> +	msm_mux_aud_intfc0_data1,
> +	msm_mux_aud_intfc0_data2,
> +	msm_mux_aud_intfc0_data3,
> +	msm_mux_aud_intfc0_data4,
> +	msm_mux_aud_intfc0_data5,
> +	msm_mux_aud_intfc0_data6,
> +	msm_mux_aud_intfc0_data7,

Keeping functions like this split per pin forces the DT author to
write per-pin states. We avoid this by dropping/adjusting the function
suffix.

The only case where we want to see a suffix for a given endpoint is when
it's necessary to allow us to select some secondary function of that pin
(e.g. we've seen QUP SE instances that spread their 4 pins pair-wise
across only two pins, with two different functions).

[..]
> +	msm_mux_qup3_se0_l0_mira,
> +	msm_mux_qup3_se0_l0_mirb,
> +	msm_mux_qup3_se0_l1_mira,
> +	msm_mux_qup3_se0_l1_mirb,

Here's such example, where the first two pins of qup3_se0 have two
different mappings on gpio 102/103 (for some reason). So, we somehow
need two functions for these.

> +	msm_mux_qup3_se0_l2,
> +	msm_mux_qup3_se0_l3,
> +	msm_mux_qup3_se0_l4,
> +	msm_mux_qup3_se0_l5,
> +	msm_mux_qup3_se0_l6,

But in order to select qup3_se0 muxing on pins 102-108 the DT author
need to write 6 different pinctrl states; where 1-2 should suffice.

[..]
> +static const struct msm_pingroup nord_groups[] = {
[..]
> +	[102] = PINGROUP(102, qspi0, qup3_se0_l0_mira, qup3_se0_l1_mirb, _, _, _, _, _, _, _, _),
> +	[103] = PINGROUP(103, qspi1, qup3_se0_l1_mira, qup3_se0_l0_mirb, _, _, _, _, _, _, _, _),
> +	[104] = PINGROUP(104, qspi_clk, qup3_se0_l2, _, _, _, _, _, _, _, _, _),
> +	[105] = PINGROUP(105, qspi_cs0_n, qup3_se0_l3, gcc_gp5_clk, _, _, _, _, _, _, _, _),
> +	[106] = PINGROUP(106, qspi2, qup3_se0_l4, gcc_gp6_clk, _, _, _, _, _, _, _, _),
> +	[107] = PINGROUP(107, qspi3, qup3_se0_l5, _, _, _, _, _, _, _, _, _),
> +	[108] = PINGROUP(108, qspi_cs1_n, qup3_se0_l6, qdss_gpio, _, _, _, _, _, _, _, _),

Regards,
Bjorn

  parent reply	other threads:[~2026-04-05 19:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03 13:27 [PATCH 0/3] pinctrl: qcom: add support for the TLMM controller on Nord platforms Bartosz Golaszewski
2026-04-03 13:27 ` [PATCH 1/3] dt-bindings: pinctrl: describe the TLMM controller on Qualcomm " Bartosz Golaszewski
2026-04-05  7:38   ` Krzysztof Kozlowski
2026-04-03 13:27 ` [PATCH 2/3] pinctrl: qcom: add the TLMM driver for the " Bartosz Golaszewski
2026-04-03 19:57   ` Dmitry Baryshkov
2026-04-05  7:41   ` Krzysztof Kozlowski
2026-04-05 17:43   ` Maulik Shah (mkshah)
2026-04-05 19:22   ` Bjorn Andersson [this message]
2026-04-03 13:27 ` [PATCH 3/3] arm64: defconfig: enable the Qualcomm Nord TLMM driver Bartosz Golaszewski
2026-04-03 19:57   ` Dmitry Baryshkov
2026-04-05  7:39   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adKz2wirCJ5n3OpK@baldur \
    --to=andersson@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=shengchao.guo@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox