Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ettore Chimenti" <ettore.chimenti@linaro.org>
Cc: devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 03/10] ARM: dts: omap: dm816x: use dedicated SoC pinctrl
Date: Fri, 16 Oct 2026 14:49:04 +0000	[thread overview]
Message-ID: <sashiko-outbox-174489@kernel.org> (raw)
In-Reply-To: <20261016-patch-ektor5-dm8168-dts-v1-3-b4ce30217028@linaro.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] pinctrl: dm816x API provides broken PIN_INPUT/PIN_OUTPUT macros and omits DT fixes
--

commit 8bc3ab0228d1fbf7757bd0740351d9face4c0e7c
Author: Ettore Chimenti <ettore.chimenti@linaro.org>

ARM: dts: omap: dm816x: use dedicated SoC pinctrl

In the TI Sitara DM816x SoCs, the pinctrl configuration macros are not
identical to OMAP2/3. They are actually inverted between Pullup/down
enabled and disabled (third bit in pinctrl registers). Using dedicated
DM816x pinctrl header to differentiate between the SoC families.

> diff --git a/arch/arm/boot/dts/ti/omap/dm816x.dtsi b/arch/arm/boot/dts/ti/omap/dm816x.dtsi
> index ee0090f7aa64e..de4d48babf778 100644
> --- a/arch/arm/boot/dts/ti/omap/dm816x.dtsi
> +++ b/arch/arm/boot/dts/ti/omap/dm816x.dtsi
> @@ -3,7 +3,7 @@
>  #include <dt-bindings/bus/ti-sysc.h>
>  #include <dt-bindings/clock/dm816.h>
>  #include <dt-bindings/gpio/gpio.h>
> -#include <dt-bindings/pinctrl/omap.h>
> +#include <dt-bindings/pinctrl/dm816x.h>

[Severity: Medium]
Since dm816x.h inherits macros from omap.h, will using PIN_INPUT or
PIN_OUTPUT unintentionally enable an active pull-down on DM816x?

include/dt-bindings/pinctrl/omap.h defines:
#define PIN_INPUT        INPUT_EN
#define PIN_OUTPUT       0

Because neither includes bit 3 (so it remains 0), and DM816x has inverted
logic where bit 3=0 enables the pull resistor, these macros now actively turn
on pull-downs. Should dm816x.h #undef and redefine PIN_INPUT and PIN_OUTPUT
to include PULL_DIS?

Similarly, does this inclusion leak inapplicable off-mode macros like
PIN_OFF_OUTPUT_HIGH into the DM816x namespace, where they might write garbage
to inapplicable padconf bits if used?

Additionally, while this commit changes the header to allow fixing the pull
logic, does this leave pins in arch/arm/boot/dts/ti/omap/dm8168-evm.dts with
unintended pull-downs?

For example, SPI_SCLK is defined without a pull flag:

arch/arm/boot/dts/ti/omap/dm8168-evm.dts:mcspi1_pins() {
    ...
    DM816X_IOPAD(0x0a94, MUX_MODE0)    /* SPI_SCLK */
    ...
}

Under the old OMAP rules, omitting PULL_ENA disabled the pull. But with the
new DM816x rules, omitting PULL_DIS leaves bit 3=0, which enables the pull.

While follow-up patches in the series fix the SD card pins, do other pins
like SPI_SCLK and SPI_SCS0 need to be updated to explicitly include PULL_DIS?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261016-patch-ektor5-dm8168-dts-v1-0-b4ce30217028@linaro.org?part=3

  reply	other threads:[~2026-10-16 14:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 14:41 [PATCH 00/10] ARM: dts: dm816x: fixes and peripheral updates for DM8168 SoC Ettore Chimenti
2026-10-16 14:41 ` [PATCH 01/10] ARM: ti81xx: Prevent USB being put into idle Ettore Chimenti
2026-10-16 14:41 ` [PATCH 02/10] dt-bindings: pinctrl: Add devicetree bindings for DM816x SoC Pinctrl Ettore Chimenti
2026-10-16 14:45   ` sashiko-bot
2026-10-16 14:51   ` Krzysztof Kozlowski
2026-10-16 15:07     ` Ettore Chimenti
2026-10-16 14:41 ` [PATCH 03/10] ARM: dts: omap: dm816x: use dedicated SoC pinctrl Ettore Chimenti
2026-10-16 14:49   ` sashiko-bot [this message]
2026-10-16 14:41 ` [PATCH 04/10] ARM: dts: omap: dm816x: Fix pinctrl range Ettore Chimenti
2026-10-16 14:41 ` [PATCH 05/10] ARM: dts: omap: dm816x: refactor and align MMC node Ettore Chimenti
2026-10-16 14:41 ` [PATCH 06/10] ARM: dts: omap: dm816x: Update USB node Ettore Chimenti
2026-10-16 14:54   ` sashiko-bot
2026-10-16 14:41 ` [PATCH 07/10] ARM: omap: dm816x: Match up capability flags for USB Ettore Chimenti
2026-10-16 14:41 ` [PATCH 08/10] ARM: dts: omap: dm816x: Correct speed for sysclk5 Ettore Chimenti
2026-10-16 14:53   ` sashiko-bot
2026-10-16 14:41 ` [PATCH 09/10] ARM: dts: omap: dm8168-evm: Correct SD card pinmux Ettore Chimenti
2026-10-16 14:41 ` [PATCH 10/10] ARM: dts: omap: dm8168-evm: enable MUSB multipoint support Ettore Chimenti

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-174489@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ettore.chimenti@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --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