Skip to contentSkip to conversation

FAILED: patch "[PATCH] dt-bindings: serial: 8250: allow "main" and "uart" as clock" failed to apply to 6.16-stable tree

PATCH In review [email protected] 3 participants 4 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 a1b51534b532dd4f0499907865553ee9251bebc3
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025091753-raider-wake-9e9d@gregkh' --subject-prefix 'PATCH 6.16.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

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

From a1b51534b532dd4f0499907865553ee9251bebc3 Mon Sep 17 00:00:00 2001
From: Alex Elder <[email protected]>
Date: Tue, 12 Aug 2025 22:13:35 -0500
Subject: [PATCH] dt-bindings: serial: 8250: allow "main" and "uart" as clock
names

There are two compatible strings defined in "8250.yaml" that require two clocks to be specified, along with their names:
- "spacemit,k1-uart", used in "spacemit/k1.dtsi"
- "nxp,lpc1850-uart", used in "lpc/lpc18xx.dtsi"

When only one clock is used, the name is not required. However there are two places that do specify a name:
- In "mediatek/mt7623.dtsi", the clock for the "mediatek,mtk-btif" compatible serial device is named "main"
- In "qca/ar9132.dtsi", the clock for the "ns8250" compatible serial device is named "uart"

In commit d2db0d7815444 ("dt-bindings: serial: 8250: allow clock 'uartclk' and 'reg' for nxp,lpc1850-uart"), Frank Li added the restriction that two named clocks be used for the NXP platform mentioned above.

Change that logic, so that an additional condition for (only) the SpacemiT platform similarly restricts the two clocks to have the names "core" and "bus".

Finally, add "main" and "uart" as allowed names when a single clock is specified.

Documentation/devicetree/bindings/serial/8250.yaml +9 -1
index f59c0b37e8eb..b243afa69a1a 100644
@@ -59,7 +59,12 @@ allOf:
           items:
             - const: uartclk
             - const: reg
-    else:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: spacemit,k1-uart
+    then:
       properties:
         clock-names:
           items:
@@ -183,6 +188,9 @@ properties:
     minItems: 1
     maxItems: 2
     oneOf:
+      - enum:
+          - main
+          - uart
       - items:
           - const: core
           - const: bus
maintainer
#1 lore raw

PATCH 1/2 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: a1b51534b532 ("dt-bindings: serial: 8250: allow "main" and "uart" as clock names")

---
 .../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/2 dt-bindings: serial: 8250: allow "main" and "uart" as clock names

From: Alex Elder <[email protected]>

[ Upstream commit a1b51534b532dd4f0499907865553ee9251bebc3 ]

There are two compatible strings defined in "8250.yaml" that require two clocks to be specified, along with their names:
- "spacemit,k1-uart", used in "spacemit/k1.dtsi"
- "nxp,lpc1850-uart", used in "lpc/lpc18xx.dtsi"

When only one clock is used, the name is not required. However there are two places that do specify a name:
- In "mediatek/mt7623.dtsi", the clock for the "mediatek,mtk-btif" compatible serial device is named "main"
- In "qca/ar9132.dtsi", the clock for the "ns8250" compatible serial device is named "uart"

In commit d2db0d7815444 ("dt-bindings: serial: 8250: allow clock 'uartclk' and 'reg' for nxp,lpc1850-uart"), Frank Li added the restriction that two named clocks be used for the NXP platform mentioned above.

Change that logic, so that an additional condition for (only) the SpacemiT platform similarly restricts the two clocks to have the names "core" and "bus".

Finally, add "main" and "uart" as allowed names when a single clock is specified.

---
 Documentation/devicetree/bindings/serial/8250.yaml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/serial/8250.yaml +9 -1
index 2766bb6ff2d1b..c1c8bd8e8dde6 100644
@@ -60,7 +60,12 @@ allOf:
           items:
             - const: uartclk
             - const: reg
-    else:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: spacemit,k1-uart
+    then:
       properties:
         clock-names:
           items:
@@ -162,6 +167,9 @@ properties:
     minItems: 1
     maxItems: 2
     oneOf:
+      - enum:
+          - main
+          - uart
       - items:
           - const: core
           - const: bus
Signature · 1 line
2.51.0
Acked-by on v1 2/2
#3 lore raw

Re: [PATCH 6.16.y 2/2] dt-bindings: serial: 8250: allow "main" and "uart" as clock names

Quoted 28 lines · Sasha Levin

From: Alex Elder <[email protected]>

[ Upstream commit a1b51534b532dd4f0499907865553ee9251bebc3 ]

There are two compatible strings defined in "8250.yaml" that require two clocks to be specified, along with their names:
- "spacemit,k1-uart", used in "spacemit/k1.dtsi"
- "nxp,lpc1850-uart", used in "lpc/lpc18xx.dtsi"

When only one clock is used, the name is not required. However there are two places that do specify a name:
- In "mediatek/mt7623.dtsi", the clock for the "mediatek,mtk-btif" compatible serial device is named "main"
- In "qca/ar9132.dtsi", the clock for the "ns8250" compatible serial device is named "uart"

In commit d2db0d7815444 ("dt-bindings: serial: 8250: allow clock 'uartclk' and 'reg' for nxp,lpc1850-uart"), Frank Li added the restriction that two named clocks be used for the NXP platform mentioned above.

Change that logic, so that an additional condition for (only) the SpacemiT platform similarly restricts the two clocks to have the names "core" and "bus".

Finally, add "main" and "uart" as allowed names when a single clock is specified.

Quoted 9 lines

This fix looks good.

Quoted 32 lines
---
  Documentation/devicetree/bindings/serial/8250.yaml | 10 +++++++++-
  1 file changed, 9 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/serial/8250.yaml +9 -1
index 2766bb6ff2d1b..c1c8bd8e8dde6 100644
@@ -60,7 +60,12 @@ allOf:
            items:
              - const: uartclk
              - const: reg
-    else:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: spacemit,k1-uart
+    then:
        properties:
          clock-names:
            items:
@@ -162,6 +167,9 @@ properties:
      minItems: 1
      maxItems: 2
      oneOf:
+      - enum:
+          - main
+          - uart
        - items:
            - const: core
            - const: bus