All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings
@ 2026-07-08 19:48 Frank.Li
  2026-07-08 19:48 ` [PATCH 1/3] dt-bindings: mfd: st,stmpe: add deprecated properties Frank.Li
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Frank.Li @ 2026-07-08 19:48 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Maxime Coquelin, Alexandre Torgue, Linus Walleij, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel, imx,
	Frank Li

cleanup st,stmpe touch screen related CHECK_DTB warings.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Frank Li (3):
      dt-bindings: mfd: st,stmpe: add deprecated properties
      dt-bindings: mfd: st,stmpe: let interrupt property optional
      ARM: dts: imx: remove undocument properties of st,stmpe*

 .../devicetree/bindings/mfd/st,stmpe.yaml          | 25 +++++++++++++++++++++-
 arch/arm/boot/dts/nxp/imx/imx6q-novena.dts         |  3 ---
 arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi      |  3 ---
 3 files changed, 24 insertions(+), 7 deletions(-)
---
base-commit: 6c94b38b83a04c43ea49004275f0391404051093
change-id: 20260708-dts-stmpe-98597a66fab1

Best regards,
--  
Frank Li <Frank.Li@nxp.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] dt-bindings: mfd: st,stmpe: add deprecated properties
  2026-07-08 19:48 [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings Frank.Li
@ 2026-07-08 19:48 ` Frank.Li
  2026-07-09 10:32   ` Lee Jones
  2026-07-08 19:48 ` [PATCH 2/3] dt-bindings: mfd: st,stmpe: let interrupt property optional Frank.Li
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Frank.Li @ 2026-07-08 19:48 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Maxime Coquelin, Alexandre Torgue, Linus Walleij, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel, imx,
	Frank Li

From: Frank Li <Frank.Li@nxp.com>

Add deprecated properties st,sample-time, st,sample-time, st,mod-12b and
st,ref-sel. The both driver drivers/mfd/stmpe.c and
drivers/input/touchscreen/stmpe-ts.c parse these information. Some dts
put these properties under mfd, but some put these under child node
sample_ts.

Allow these properties put under sample_ts and mark as deprecated to fix
below CHECK_DTBS warnings:
  arch/arm/boot/dts/nxp/imx/imx6q-novena.dtb: stmpe811@44 (st,stmpe811): touchscreen: Unevaluated properties are not allowed ('st,adc-freq', 'st,mod-12b', 'st,ref-sel', 'st,sample-time' were unexpected)
        from schema $id: http://devicetree.org/schemas/mfd/st,stmpe.yaml

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 .../devicetree/bindings/mfd/st,stmpe.yaml          | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/st,stmpe.yaml b/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
index 4bb05d544901c..56aa2570def83 100644
--- a/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
+++ b/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
@@ -141,6 +141,30 @@ properties:
       compatible:
         const: st,stmpe-ts
 
+      st,sample-time:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [ 0, 1, 2, 3, 4, 5, 6 ]
+        deprecated: true
+        description: See top layer st,sample-time.
+
+      st,mod-12b:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [ 0, 1 ]
+        deprecated: true
+        description: See top layer st,mod-12b
+
+      st,ref-sel:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [ 0, 1 ]
+        deprecated: true
+        description: See top layer st,ref-sel
+
+      st,adc-freq:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [ 0, 1, 2, 3 ]
+        deprecated: true
+        description: See top layer st,adc-freq
+
       st,ave-ctrl:
         $ref: /schemas/types.yaml#/definitions/uint32
         enum: [ 0, 1, 2, 3 ]

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] dt-bindings: mfd: st,stmpe: let interrupt property optional
  2026-07-08 19:48 [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings Frank.Li
  2026-07-08 19:48 ` [PATCH 1/3] dt-bindings: mfd: st,stmpe: add deprecated properties Frank.Li
@ 2026-07-08 19:48 ` Frank.Li
  2026-07-08 19:58   ` sashiko-bot
  2026-07-08 19:48 ` [PATCH 3/3] ARM: dts: imx: remove undocument properties of st,stmpe* Frank.Li
  2026-07-08 23:09 ` [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings Linus Walleij
  3 siblings, 1 reply; 8+ messages in thread
From: Frank.Li @ 2026-07-08 19:48 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Maxime Coquelin, Alexandre Torgue, Linus Walleij, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel, imx,
	Frank Li

From: Frank Li <Frank.Li@nxp.com>

Not all boards connect irq lines. So mark interrupt property optional.

Fix below CHECK_DTBS warnings:
  arch/arm/boot/dts/nxp/imx/imx6dl-phytec-pbab01.dtb: stmpe@41 (st,stmpe811): 'oneOf' conditional failed, one must be fixed:
        'interrupts' is a required property
        'interrupts-extended' is a required property

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 Documentation/devicetree/bindings/mfd/st,stmpe.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/st,stmpe.yaml b/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
index 56aa2570def83..c1a4fd0dc8089 100644
--- a/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
+++ b/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
@@ -225,7 +225,6 @@ additionalProperties: false
 required:
   - compatible
   - reg
-  - interrupts
 
 examples:
   - |

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] ARM: dts: imx: remove undocument properties of st,stmpe*
  2026-07-08 19:48 [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings Frank.Li
  2026-07-08 19:48 ` [PATCH 1/3] dt-bindings: mfd: st,stmpe: add deprecated properties Frank.Li
  2026-07-08 19:48 ` [PATCH 2/3] dt-bindings: mfd: st,stmpe: let interrupt property optional Frank.Li
@ 2026-07-08 19:48 ` Frank.Li
  2026-07-08 23:09 ` [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings Linus Walleij
  3 siblings, 0 replies; 8+ messages in thread
From: Frank.Li @ 2026-07-08 19:48 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Maxime Coquelin, Alexandre Torgue, Linus Walleij, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel, imx,
	Frank Li

From: Frank Li <Frank.Li@nxp.com>

Remove undocument properties irq-trigger, id, blocks of st,stmp* to fix
below CHECK_DTBS warnings:
  arch/arm/boot/dts/nxp/imx/imx6q-apalis-eval.dtb: stmpe811@41 (st,stmpe811): 'blocks', 'id', 'irq-trigger' do not match any of the regexes: '^pinctrl-[0-9]+$'
        from schema $id: http://devicetree.org/schemas/mfd/st,stmpe.yaml

Known other user (uboot) doesn't support this touch screen device.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 arch/arm/boot/dts/nxp/imx/imx6q-novena.dts    | 3 ---
 arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/arch/arm/boot/dts/nxp/imx/imx6q-novena.dts b/arch/arm/boot/dts/nxp/imx/imx6q-novena.dts
index cd9a050fa906e..9938a63b5110c 100644
--- a/arch/arm/boot/dts/nxp/imx/imx6q-novena.dts
+++ b/arch/arm/boot/dts/nxp/imx/imx6q-novena.dts
@@ -281,9 +281,6 @@ touch: stmpe811@44 {
 		compatible = "st,stmpe811";
 		reg = <0x44>;
 		irq-gpio = <&gpio5 13 GPIO_ACTIVE_HIGH>;
-		id = <0>;
-		blocks = <0x5>;
-		irq-trigger = <0x1>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_stmpe_novena>;
 		vio-supply = <&reg_3p3v>;
diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi
index 5fcd7cdb7001f..af038ac472261 100644
--- a/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi
@@ -631,11 +631,8 @@ codec: sgtl5000@a {
 	/* STMPE811 touch screen controller */
 	stmpe811@41 {
 		compatible = "st,stmpe811";
-		blocks = <0x5>;
-		id = <0>;
 		interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
 		interrupt-parent = <&gpio4>;
-		irq-trigger = <0x1>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_touch_int>;
 		reg = <0x41>;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] dt-bindings: mfd: st,stmpe: let interrupt property optional
  2026-07-08 19:48 ` [PATCH 2/3] dt-bindings: mfd: st,stmpe: let interrupt property optional Frank.Li
@ 2026-07-08 19:58   ` sashiko-bot
  0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-07-08 19:58 UTC (permalink / raw)
  To: Frank.Li; +Cc: Frank.Li, imx, devicetree, conor+dt, robh

Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider:

New issues:
- [Medium] The commit makes the `interrupts` property optional to fix a DT warning, but fails to add the corresponding driver support, leaving the device unusable in Linux.
- [Medium] Making the parent's `interrupts` property optional creates a schema contradiction with the `gpio` subnode, which unconditionally requires `interrupt-controller`.
- [Low] The commit message description is not capitalized, violating the MFD subsystem guidelines.

Pre-existing issues:
- [High] Regulator enable counts are leaked on multiple probe error paths.
- [High] The IRQ domain is not removed on probe error paths, causing a dangling pointer and UAF vulnerability.
--

--- Patch [2]: [PATCH 2/3] dt-bindings: mfd: st,stmpe: let interrupt property optional ---
commit 4dfb528c2761ff56029b1d565357b3fc0352b520
Author: Frank Li <Frank.Li@nxp.com>

> dt-bindings: mfd: st,stmpe: let interrupt property optional

[Severity: Low]
This isn't a bug introduced by this patch, but the MFD subsystem guidelines
require the commit description to be capitalized after the subsystem prefix.
Could this be updated to "dt-bindings: mfd: st,stmpe: Let interrupt property
optional"?

This patch marks the interrupt property as optional to fix CHECK_DTBS
warnings on boards that do not connect IRQ lines to the STMPE811 device.

> diff --git a/Documentation/devicetree/bindings/mfd/st,stmpe.yaml b/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
> index 32ccaafe91df9..8a6abc2f5b310 100644
> --- a/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
> +++ b/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
> @@ -221,7 +221,6 @@ additionalProperties: false
>  required:
>    - compatible
>    - reg
> -  - interrupts

[Severity: Medium]
Making the interrupts property optional creates a schema contradiction with
the gpio subnode. 

The child binding in Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml
unconditionally requires interrupt-controller. If the parent lacks an
interrupt, how can it satisfy the child's requirement?

[Severity: Medium]
Does the driver currently support probing the STMPE811 without an interrupt?

Looking at the driver, it explicitly rejects the STMPE811 when configured
without an interrupt:

drivers/mfd/stmpe.c:stmpe_probe() {
    ...
    if (!stmpe_noirq_variant_info[stmpe->partnum]) {
        dev_err(stmpe->dev,
                "%s does not support no-irq mode!\n",
                stmpe->variant->name);
        return -ENODEV;
    }
    ...
}

Could this leave the device unusable in Linux when the device tree omits
the interrupt property?

[Severity: High]
This is a pre-existing issue, but I noticed regulator enable counts might be
leaking on probe error paths. 

If devm_gpiod_get_optional() defers or fails, do we leak the enable count
for the vcc regulator?

drivers/mfd/stmpe.c:stmpe_probe() {
    ...
    stmpe->vcc = devm_regulator_get_optional(ci->dev, "vcc");
    if (!IS_ERR(stmpe->vcc)) {
        ret = regulator_enable(stmpe->vcc);
        ...
    }
    ...
    irq_gpio = devm_gpiod_get_optional(ci->dev, "irq", GPIOD_ASIS);
    ret = PTR_ERR_OR_ZERO(irq_gpio);
    if (ret) {
        ...
        return ret;
    }
    ...
}

[Severity: High]
This is a pre-existing issue, but does the probe error path leave a dangling
pointer in the IRQ domain? 

If a failure occurs after stmpe_irq_init(), like during the IRQ request:

drivers/mfd/stmpe.c:stmpe_probe() {
    ...
    ret = devm_request_threaded_irq(ci->dev, stmpe->irq, NULL,
            stmpe_irq, pdata->irq_trigger | IRQF_ONESHOT,
            "stmpe", stmpe);
    if (ret) {
        dev_err(stmpe->dev, "failed to request IRQ: %d\n", ret);
        return ret;
    }
    ...
}

Since irq_domain_create_simple() isn't devres-managed, could this leave the
globally registered IRQ domain with a dangling host_data pointer when the
stmpe struct is freed?

>  
>  examples:
>    - |

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260708-dts-stmpe-v1-0-1f51d15bb358@nxp.com?part=2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings
  2026-07-08 19:48 [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings Frank.Li
                   ` (2 preceding siblings ...)
  2026-07-08 19:48 ` [PATCH 3/3] ARM: dts: imx: remove undocument properties of st,stmpe* Frank.Li
@ 2026-07-08 23:09 ` Linus Walleij
  3 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2026-07-08 23:09 UTC (permalink / raw)
  To: Frank.Li
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Maxime Coquelin, Alexandre Torgue, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, imx, Frank Li

On Wed, Jul 8, 2026 at 9:49 PM <Frank.Li@oss.nxp.com> wrote:

> cleanup st,stmpe touch screen related CHECK_DTB warings.
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> Frank Li (3):
>       dt-bindings: mfd: st,stmpe: add deprecated properties
>       dt-bindings: mfd: st,stmpe: let interrupt property optional
>       ARM: dts: imx: remove undocument properties of st,stmpe*

Those look OK I think:
Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] dt-bindings: mfd: st,stmpe: add deprecated properties
  2026-07-08 19:48 ` [PATCH 1/3] dt-bindings: mfd: st,stmpe: add deprecated properties Frank.Li
@ 2026-07-09 10:32   ` Lee Jones
  2026-07-09 15:01     ` Frank Li
  0 siblings, 1 reply; 8+ messages in thread
From: Lee Jones @ 2026-07-09 10:32 UTC (permalink / raw)
  To: Frank.Li
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Linus Walleij, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, imx, Frank Li

On Wed, 08 Jul 2026, Frank.Li@oss.nxp.com wrote:

> From: Frank Li <Frank.Li@nxp.com>
> 
> Add deprecated properties st,sample-time, st,sample-time, st,mod-12b and
> st,ref-sel. The both driver drivers/mfd/stmpe.c and
> drivers/input/touchscreen/stmpe-ts.c parse these information. Some dts
> put these properties under mfd, but some put these under child node
> sample_ts.
> 
> Allow these properties put under sample_ts and mark as deprecated to fix
> below CHECK_DTBS warnings:
>   arch/arm/boot/dts/nxp/imx/imx6q-novena.dtb: stmpe811@44 (st,stmpe811): touchscreen: Unevaluated properties are not allowed ('st,adc-freq', 'st,mod-12b', 'st,ref-sel', 'st,sample-time' were unexpected)
>         from schema $id: http://devicetree.org/schemas/mfd/st,stmpe.yaml
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  .../devicetree/bindings/mfd/st,stmpe.yaml          | 24 ++++++++++++++++++++++
>  1 file changed, 24 insertions(+)

Why is this attached to submission:

  [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings

And where are the other 2 patches?

Pleas send new patches as a new thread.

Never attach a new patch to an existing thread.

-- 
Lee Jones

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] dt-bindings: mfd: st,stmpe: add deprecated properties
  2026-07-09 10:32   ` Lee Jones
@ 2026-07-09 15:01     ` Frank Li
  0 siblings, 0 replies; 8+ messages in thread
From: Frank Li @ 2026-07-09 15:01 UTC (permalink / raw)
  To: Lee Jones
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Linus Walleij, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, imx, Frank Li

On Thu, Jul 09, 2026 at 11:32:37AM +0100, Lee Jones wrote:
> On Wed, 08 Jul 2026, Frank.Li@oss.nxp.com wrote:
>
> > From: Frank Li <Frank.Li@nxp.com>
> >
> > Add deprecated properties st,sample-time, st,sample-time, st,mod-12b and
> > st,ref-sel. The both driver drivers/mfd/stmpe.c and
> > drivers/input/touchscreen/stmpe-ts.c parse these information. Some dts
> > put these properties under mfd, but some put these under child node
> > sample_ts.
> >
> > Allow these properties put under sample_ts and mark as deprecated to fix
> > below CHECK_DTBS warnings:
> >   arch/arm/boot/dts/nxp/imx/imx6q-novena.dtb: stmpe811@44 (st,stmpe811): touchscreen: Unevaluated properties are not allowed ('st,adc-freq', 'st,mod-12b', 'st,ref-sel', 'st,sample-time' were unexpected)
> >         from schema $id: http://devicetree.org/schemas/mfd/st,stmpe.yaml
> >
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > ---
> >  .../devicetree/bindings/mfd/st,stmpe.yaml          | 24 ++++++++++++++++++++++
> >  1 file changed, 24 insertions(+)
>
> Why is this attached to submission:
>
>   [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings
>
> And where are the other 2 patches?

whole thread should be here
https://lore.kernel.org/imx/CAD++jL=tBRFXzqa6gXNnZ3-DRUMvs=waSdDvq5h5MPHAQoheqw@mail.gmail.com/T/#m08252cde5cb39f897cf06926d87bf782ceafc7ca

I use b4 send, you should be in to list for whole patches.

>
> Pleas send new patches as a new thread.
>
> Never attach a new patch to an existing thread.

Maybe your system has problem, which merge similar email to one thread.
I meet similar issue before, mutt wrong merge two thread.

Frank

>
> --
> Lee Jones

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-07-09 15:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 19:48 [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings Frank.Li
2026-07-08 19:48 ` [PATCH 1/3] dt-bindings: mfd: st,stmpe: add deprecated properties Frank.Li
2026-07-09 10:32   ` Lee Jones
2026-07-09 15:01     ` Frank Li
2026-07-08 19:48 ` [PATCH 2/3] dt-bindings: mfd: st,stmpe: let interrupt property optional Frank.Li
2026-07-08 19:58   ` sashiko-bot
2026-07-08 19:48 ` [PATCH 3/3] ARM: dts: imx: remove undocument properties of st,stmpe* Frank.Li
2026-07-08 23:09 ` [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.