Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: SignKirigami <prcups@krgm.moe>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: pinctrl: Add Qualcomm Netrani TLMM
Date: Tue, 24 Nov 2026 11:02:57 +0000	[thread overview]
Message-ID: <sashiko-outbox-231014@kernel.org> (raw)
In-Reply-To: <20261124-netrani-tlmm-v1-v1-1-0f84fa251b89@krgm.moe>

Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [Low] dt-bindings: pinctrl: qcom,netrani-tlmm: minItems/maxItems under
  pins.items
- [Low] dt-bindings: pinctrl: qcom,netrani-tlmm: inconsistent GPIO
  counts in schema
- [Low] dt-bindings: pinctrl: qcom,netrani-tlmm: top-level
  additionalProperties false
- [Low] dt-bindings: pinctrl: qcom,netrani-tlmm: unconsolidated function
  names
--

commit e2f036cf198020ec46f2156c3d6bb3823fad96ba
Author: SignKirigami <prcups@krgm.moe>

dt-bindings: pinctrl: Add Qualcomm Netrani TLMM

This commit adds the Device Tree binding schema for the Top Level Mode
Multiplexer (TLMM) pin controller on the Qualcomm Netrani SoC.

> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,netrani-tlmm.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,netrani-tlmm.yaml
> new file mode 100644
> index 0000000000000..f9af05dc86aea
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,netrani-tlmm.yaml
> @@ -0,0 +1,190 @@
[ ... ]
> +allOf:
> +  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
> +
> +properties:
> +  compatible:
> +    const: qcom,netrani-tlmm
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts: true
> +  interrupt-controller: true
> +  "#interrupt-cells": true
> +  gpio-controller: true
> +
> +  gpio-reserved-ranges:
> +    minItems: 1
> +    maxItems: 68
> +
> +  gpio-line-names:
> +    maxItems: 142

[Severity: Low]
Are the maxItems bounds for gpio-reserved-ranges and gpio-line-names
consistent with the 141 GPIOs (gpio0 through gpio140) matched by the pins
pattern below?

With 141 general-purpose GPIOs, the maximum number of discontiguous
reserved ranges is ceil(141 / 2) = 71 rather than 68 (which corresponds to
136 GPIOs), and sibling Qualcomm TLMM bindings with a dedicated ufs_reset
pin set gpio-line-names maxItems to the general-purpose GPIO count (141)
rather than including ufs_reset (142).

> +
> +  "#gpio-cells": true
> +  gpio-ranges: true
> +  wakeup-parent: true
[ ... ]
> +    properties:
> +      pins:
> +        description:
> +          List of gpio pins affected by the properties specified in this
> +          subnode.
> +        items:
> +          oneOf:
> +            - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-3][0-9]|140)$"
> +            - enum: [ sdc1_clk, sdc1_cmd, sdc1_data, sdc1_rclk, sdc2_clk, sdc2_cmd, sdc2_data, ufs_reset ]
> +          minItems: 1
> +          maxItems: 36

[Severity: Low]
Should minItems and maxItems be indented under pins rather than under
items?

Placing them inside items applies them to the per-element string subschema
instead of the pins string array, leaving the number of entries in pins
unconstrained during dt_binding_check validation.

[ ... ]
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false

[Severity: Low]
Does using additionalProperties: false at the top level reject properties
and child nodes inherited from qcom,tlmm-common.yaml, such as GPIO hog
subnodes matching -hog(-[0-9]+)?$ and pinctrl client properties?

Using unevaluatedProperties: false allows the definitions inherited via
allOf, makes the re-declarations of interrupt-controller, #interrupt-cells,
gpio-controller, #gpio-cells, gpio-ranges, and wakeup-parent redundant, and
interrupts can then be constrained to maxItems: 1 instead of interrupts:
true.

> +
> +examples:
> +  - |
[ ... ]
> +        uart-w-state {
> +            rx-pins {
> +                pins = "gpio23";
> +                function = "qup1_se2_l0";
> +                bias-pull-up;
> +            };
> +
> +            tx-pins {
> +                pins = "gpio22";
> +                function = "qup1_se2_l0";
> +                bias-disable;
> +            };
> +        };
> +    };
> +...

[Severity: Low]
Should the function enum and example use consolidated function group names
(such as qup1_se2, phase_flag, and qdss_gpio) instead of raw per-lane and
per-index signal names (such as qup1_se2_l0..l4, phase_flag_status0..31,
and qdss_gpio_tracedata0..15)?

In addition, uart-w-state assigns qup1_se2_l0 to both rx-pins (gpio23) and
tx-pins (gpio22), whereas a two-pin UART cannot mux both RX and TX to lane
0, and in the accompanying driver gpio22 and gpio23 only support
qup0_se3_l2 and qup0_se3_l3 while qup1_se2 is on gpio18..gpio21.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261124-netrani-tlmm-v1-v1-0-0f84fa251b89@krgm.moe?part=1

  reply	other threads:[~2026-11-24 11:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 10:47 [PATCH 0/2] Add Qualcomm Netrani TLMM support SignKirigami
2026-11-24 10:47 ` [PATCH 1/2] dt-bindings: pinctrl: Add Qualcomm Netrani TLMM SignKirigami
2026-11-24 11:02   ` sashiko-bot [this message]
2026-11-24 10:47 ` [PATCH 2/2] pinctrl: qcom: Add Netrani TLMM support SignKirigami
2026-11-24 11:04   ` sashiko-bot

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=sashiko-outbox-231014@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=prcups@krgm.moe \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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