Skip to contentSkip to conversation

FAILED: patch "[PATCH] dt-bindings: serial: 8250: move a constraint" failed to apply to 6.16-stable tree

PATCH In review [email protected] 3 participants 5 messages Sep 17, 2025 – Sep 19, 2025

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.16-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.16.y
git checkout FETCH_HEAD
git cherry-pick -x 387d00028cccee7575f6416953bef62f849d83e3
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025091759-buddy-verdict-96be@gregkh' --subject-prefix 'PATCH 6.16.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 387d00028cccee7575f6416953bef62f849d83e3 Mon Sep 17 00:00:00 2001
From: Alex Elder <[email protected]>
Date: Tue, 12 Aug 2025 22:21:50 -0500
Subject: [PATCH] dt-bindings: serial: 8250: move a constraint

A block that required a "spacemit,k1-uart" compatible node to specify two clocks was placed in the wrong spot in the binding. Conor Dooley pointed out it belongs earlier in the file, as part of the initial "allOf".

Documentation/devicetree/bindings/serial/8250.yaml +22 -24
index e46bee8d25bf..f59c0b37e8eb 100644
@@ -48,7 +48,6 @@ allOf:
       oneOf:
         - required: [ clock-frequency ]
         - required: [ clocks ]
-
   - if:
       properties:
         compatible:
@@ -66,6 +65,28 @@ allOf:
           items:
             - const: core
             - const: bus
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - spacemit,k1-uart
+              - nxp,lpc1850-uart
+    then:
+      required:
+        - clocks
+        - clock-names
+      properties:
+        clocks:
+          minItems: 2
+        clock-names:
+          minItems: 2
+    else:
+      properties:
+        clocks:
+          maxItems: 1
+        clock-names:
+          maxItems: 1
 
 properties:
   compatible:
@@ -264,29 +285,6 @@ required:
   - reg
   - interrupts
 
-if:
-  properties:
-    compatible:
-      contains:
-        enum:
-          - spacemit,k1-uart
-          - nxp,lpc1850-uart
-then:
-  required:
-    - clocks
-    - clock-names
-  properties:
-    clocks:
-      minItems: 2
-    clock-names:
-      minItems: 2
-else:
-  properties:
-    clocks:
-      maxItems: 1
-    clock-names:
-      maxItems: 1
-
 unevaluatedProperties: false
 
 examples:
maintainer
#1 lore raw

PATCH 1/3 dt-bindings: serial: 8250: allow clock 'uartclk' and 'reg' for nxp,lpc1850-uart

From: Frank Li <[email protected]>

[ Upstream commit d2db0d78154442fb89165edf8836bf2644c6c58d ]

Allow clock 'uartclk' and 'reg' for nxp,lpc1850-uart to align existed driver and dts. It is really old platform. Keep the same restriction for others.

Allow dmas and dma-names property, which allow maxItems 4 because very old platform (arch/arm/boot/dts/nxp/lpc/lpc18xx.dtsi) use duplicate "tx", "rx", "tx", "rx" as dma-names.

Fix below CHECK_DTB warnings:
arch/arm/boot/dts/nxp/lpc/lpc4337-ciaa.dtb: serial@40081000 (nxp,lpc1850-uart): clock-names: ['uartclk', 'reg'] is too long

Stable-dep-of: 387d00028ccc ("dt-bindings: serial: 8250: move a constraint")

---
 .../devicetree/bindings/serial/8250.yaml      | 41 +++++++++++++++++--
 1 file changed, 37 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/serial/8250.yaml +37 -4
index c6bc27709bf72..2766bb6ff2d1b 100644
@@ -49,6 +49,24 @@ allOf:
         - required: [ clock-frequency ]
         - required: [ clocks ]
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: nxp,lpc1850-uart
+    then:
+      properties:
+        clock-names:
+          items:
+            - const: uartclk
+            - const: reg
+    else:
+      properties:
+        clock-names:
+          items:
+            - const: core
+            - const: bus
+
 properties:
   compatible:
     oneOf:
@@ -142,9 +160,22 @@ properties:
 
   clock-names:
     minItems: 1
-    items:
-      - const: core
-      - const: bus
+    maxItems: 2
+    oneOf:
+      - items:
+          - const: core
+          - const: bus
+      - items:
+          - const: uartclk
+          - const: reg
+
+  dmas:
+    minItems: 1
+    maxItems: 4
+
+  dma-names:
+    minItems: 1
+    maxItems: 4
 
   resets:
     maxItems: 1
@@ -237,7 +268,9 @@ if:
   properties:
     compatible:
       contains:
-        const: spacemit,k1-uart
+        enum:
+          - spacemit,k1-uart
+          - nxp,lpc1850-uart
 then:
   required: [clock-names]
   properties:
Signature · 1 line
2.51.0
maintainer
#2 lore raw

PATCH 2/3 dt-bindings: serial: 8250: spacemit: set clocks property as required

From: Yixun Lan <[email protected]>

[ Upstream commit 48f9034e024a4c6e279b0d040e1f5589bb544806 ]

In SpacemiT's K1 SoC, the clocks for UART are mandatory needed, so for DT, both clocks and clock-names property should be set as required.

Fixes 2c0594f9f062 ("dt-bindings: serial: 8250: support an optional second clock")

Stable-dep-of: 387d00028ccc ("dt-bindings: serial: 8250: move a constraint")

---
 Documentation/devicetree/bindings/serial/8250.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/serial/8250.yaml +3 -1
index 2766bb6ff2d1b..e46bee8d25bf0 100644
@@ -272,7 +272,9 @@ if:
           - spacemit,k1-uart
           - nxp,lpc1850-uart
 then:
-  required: [clock-names]
+  required:
+    - clocks
+    - clock-names
   properties:
     clocks:
       minItems: 2
Signature · 1 line
2.51.0
maintainer
#3 lore raw

PATCH 3/3 dt-bindings: serial: 8250: move a constraint

In reply to Sasha Levin

From: Alex Elder <[email protected]>

[ Upstream commit 387d00028cccee7575f6416953bef62f849d83e3 ]

A block that required a "spacemit,k1-uart" compatible node to specify two clocks was placed in the wrong spot in the binding. Conor Dooley pointed out it belongs earlier in the file, as part of the initial "allOf".

---
 .../devicetree/bindings/serial/8250.yaml      | 46 +++++++++----------
 1 file changed, 22 insertions(+), 24 deletions(-)
Documentation/devicetree/bindings/serial/8250.yaml +22 -24
index e46bee8d25bf0..f59c0b37e8ebb 100644
@@ -48,7 +48,6 @@ allOf:
       oneOf:
         - required: [ clock-frequency ]
         - required: [ clocks ]
-
   - if:
       properties:
         compatible:
@@ -66,6 +65,28 @@ allOf:
           items:
             - const: core
             - const: bus
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - spacemit,k1-uart
+              - nxp,lpc1850-uart
+    then:
+      required:
+        - clocks
+        - clock-names
+      properties:
+        clocks:
+          minItems: 2
+        clock-names:
+          minItems: 2
+    else:
+      properties:
+        clocks:
+          maxItems: 1
+        clock-names:
+          maxItems: 1
 
 properties:
   compatible:
@@ -264,29 +285,6 @@ required:
   - reg
   - interrupts
 
-if:
-  properties:
-    compatible:
-      contains:
-        enum:
-          - spacemit,k1-uart
-          - nxp,lpc1850-uart
-then:
-  required:
-    - clocks
-    - clock-names
-  properties:
-    clocks:
-      minItems: 2
-    clock-names:
-      minItems: 2
-else:
-  properties:
-    clocks:
-      maxItems: 1
-    clock-names:
-      maxItems: 1
-
 unevaluatedProperties: false
 
 examples:
Signature · 1 line
2.51.0
Acked-by on v1 3/3
#4 lore raw

Re: [PATCH 6.16.y 3/3] dt-bindings: serial: 8250: move a constraint

Quoted 9 lines · Sasha Levin

From: Alex Elder <[email protected]>

[ Upstream commit 387d00028cccee7575f6416953bef62f849d83e3 ]

A block that required a "spacemit,k1-uart" compatible node to specify two clocks was placed in the wrong spot in the binding. Conor Dooley pointed out it belongs earlier in the file, as part of the initial "allOf".

Quoted 9 lines

Thank you Sasha, this fix looks good.

Quoted 75 lines
---
  .../devicetree/bindings/serial/8250.yaml      | 46 +++++++++----------
  1 file changed, 22 insertions(+), 24 deletions(-)
Documentation/devicetree/bindings/serial/8250.yaml +22 -24
index e46bee8d25bf0..f59c0b37e8ebb 100644
@@ -48,7 +48,6 @@ allOf:
        oneOf:
          - required: [ clock-frequency ]
          - required: [ clocks ]
-
    - if:
        properties:
          compatible:
@@ -66,6 +65,28 @@ allOf:
            items:
              - const: core
              - const: bus
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - spacemit,k1-uart
+              - nxp,lpc1850-uart
+    then:
+      required:
+        - clocks
+        - clock-names
+      properties:
+        clocks:
+          minItems: 2
+        clock-names:
+          minItems: 2
+    else:
+      properties:
+        clocks:
+          maxItems: 1
+        clock-names:
+          maxItems: 1
 
  properties:
    compatible:
@@ -264,29 +285,6 @@ required:
    - reg
    - interrupts
 
-if:
-  properties:
-    compatible:
-      contains:
-        enum:
-          - spacemit,k1-uart
-          - nxp,lpc1850-uart
-then:
-  required:
-    - clocks
-    - clock-names
-  properties:
-    clocks:
-      minItems: 2
-    clock-names:
-      minItems: 2
-else:
-  properties:
-    clocks:
-      maxItems: 1
-    clock-names:
-      maxItems: 1
-
  unevaluatedProperties: false
 
  examples: