Skip to contentSkip to conversation

dt-bindings: Add Xuantie Semiconductor Co., Ltd.

PATCH Superseded Guo Ren 4 participants 9 messages Aug 15 – Aug 17

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Guo Ren

author
#0 lore raw

cover dt-bindings: Add Xuantie Semiconductor Co., Ltd.

From: "GUO Ren (XuanTie)" <[email protected]>

The RISC-V CPU bindings currently describe the XuanTie C906, C908, C910 and C920 processors using the historical thead vendor prefix.

Add xuantie as the vendor prefix for Shanghai Xuantie Semiconductor Technology Co., Ltd., and add corresponding xuantie,* compatible strings for these processors.

The existing thead,* compatible strings are retained to preserve the Device Tree ABI and compatibility with existing device trees.

The vendor information is available from the Xuantie declaration page [1].

[1] https://www.xrvm.com/declaration

GUO Ren (XuanTie) (2):
dt-bindings: vendor-prefixes: Add Xuantie Semiconductor
dt-bindings: riscv: Add Xuantie C906/C908/C910/C920 compatibles

 Documentation/devicetree/bindings/riscv/cpus.yaml      | 4 ++++
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 2 files changed, 6 insertions(+)
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH 1/2 dt-bindings: vendor-prefixes: Add Xuantie Semiconductor

From: "GUO Ren (XuanTie)" <[email protected]>

Add the xuantie vendor prefix for Shanghai Xuantie Semiconductor Technology Co., Ltd., which provides the XuanTie processor IP.

The vendor information is available from the Xuantie declaration pagei [1].

[1]: https://www.xrvm.com/declaration

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 396044f368e7..89391cb467d5 100644
@@ -1905,6 +1905,8 @@ patternProperties:
     description: Xilinx
   "^xnano,.*":
     description: Xnano
+  "^xuantie,.*":
+    description: Shanghai Xuantie Semiconductor Technology Co., Ltd.
   "^xunlong,.*":
     description: Shenzhen Xunlong Software CO.,Limited
   "^xylon,.*":
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH 1/2] dt-bindings: vendor-prefixes: Add Xuantie Semiconductor

Quoted 5 lines · Guo Ren

From: "GUO Ren (XuanTie)" <[email protected]>

Add the xuantie vendor prefix for Shanghai Xuantie Semiconductor Technology Co., Ltd., which provides the XuanTie processor IP.

Quoted 7 lines

The vendor information is available from the Xuantie declaration pagei [1].

[1]: https://www.xrvm.com/declaration

Cc Rob Herring <[email protected]>
Cc devicetree <[email protected]>

Please drop the autogenerated scripts/get_maintainer.pl CC-entries from commit msg. There is no single need to store automated output of get_maintainers.pl in the git log. It can be easily re-created at any given time, thus its presence in the git history is redundant and obfuscates the log.

If you need it for your own patch management purposes, keep it under the --- separator.

Quoted 3 lines
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++

Anyway odd cc-list.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC (and consider --no-git-fallback argument, so you will not CC people just because they made one commit years ago). It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

Tools like b4 or scripts/get_maintainer.pl provide you proper list of people, so fix your workflow. Tools might also fail if you work on some ancient tree (don't, instead use mainline) or work on fork of kernel (don't, instead use mainline). Just use b4 and everything should be fine, although remember about b4 prep --auto-to-cc if you added new patches to the patchset.

Best regards,
Krzysztof

author
#3 lore raw

Re: [PATCH 1/2] dt-bindings: vendor-prefixes: Add Xuantie Semiconductor

Quoted 12 lines · Krzysztof Kozlowski
Quoted 10 lines · Guo Ren

From: "GUO Ren (XuanTie)" <[email protected]>

Add the xuantie vendor prefix for Shanghai Xuantie Semiconductor Technology Co., Ltd., which provides the XuanTie processor IP.

The vendor information is available from the Xuantie declaration pagei [1].

[1]: https://www.xrvm.com/declaration

Quoted 8 lines
Quoted 2 lines
Cc Rob Herring <[email protected]>
Cc devicetree <[email protected]>

Please drop the autogenerated scripts/get_maintainer.pl CC-entries from commit msg. There is no single need to store automated output of get_maintainers.pl in the git log. It can be easily re-created at any given time, thus its presence in the git history is redundant and obfuscates the log.

Thanks for pointing that out; I would drop the autogenerated scripts/get_maintainer.pl CC entries.

Quoted 18 lines

If you need it for your own patch management purposes, keep it under the --- separator.

Quoted 3 lines
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++

Anyway odd cc-list.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC (and consider --no-git-fallback argument, so you will not CC people just because they made one commit years ago). It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

Quoted 6 lines

Tools like b4 or scripts/get_maintainer.pl provide you proper list of people, so fix your workflow. Tools might also fail if you work on some ancient tree (don't, instead use mainline) or work on fork of kernel (don't, instead use mainline). Just use b4 and everything should be fine, although remember about b4 prep --auto-to-cc if you added new patches to the patchset.

Okay, I'll try that.

--
Best Regards
Guo Ren

author
#4 lore raw

PATCH 2/2 dt-bindings: riscv: Add Xuantie C906/C908/C910/C920 compatibles

In reply to Guo Ren

From: "GUO Ren (XuanTie)" <[email protected]>

The RISC-V CPU bindings currently use the historical thead vendor prefix for the XuanTie C906, C908, C910 and C920 processors.

Add equivalent compatibles using the newly defined xuantie vendor prefix. Keep the existing thead compatibles to preserve compatibility with existing device trees.

Cc Conor Dooley <[email protected]>
Cc Rob Herring <[email protected]>
Cc devicetree <[email protected]>
---
 Documentation/devicetree/bindings/riscv/cpus.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/riscv/cpus.yaml +4 -0
index 5feeb2203050..5aba1e8ed195 100644
@@ -67,6 +67,10 @@ properties:
               - thead,c908
               - thead,c910
               - thead,c920
+              - xuantie,c906
+              - xuantie,c908
+              - xuantie,c910
+              - xuantie,c920
           - const: riscv
       - items:
           - enum:
Signature · 1 line
2.43.0
#5 lore raw

Re: [PATCH 2/2] dt-bindings: riscv: Add Xuantie C906/C908/C910/C920 compatibles

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The newly added `xuantie` equivalent compatible strings were omitted from the `allOf`…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly added xuantie equivalent compatible strings were omitted from the allOf conditional block that restricts the thead,vlenb property, causing valid device trees to fail schema validation. --

--- Patch [2]: [PATCH 2/2] dt-bindings: riscv: Add Xuantie C906/C908/C910/C920 compatibles --- commit 8fd8dd2156e30474207bea785ee6877565dc1eff
Author: GUO Ren (XuanTie) <[email protected]>

dt-bindings: riscv: Add Xuantie C906/C908/C910/C920 compatibles

The RISC-V CPU bindings currently use the historical thead vendor prefix for the XuanTie C906, C908, C910 and C920 processors. This patch adds equivalent compatibles using the newly defined xuantie vendor prefix. It keeps the existing thead compatibles to preserve compatibility with existing device trees.

Documentation/devicetree/bindings/riscv/cpus.yaml properties: · line 73

Quoted 12 lines
Documentation/devicetree/bindings/riscv/cpus.yaml +4 -0
index 5feeb2203050a..5aba1e8ed1952 100644
@@ -67,6 +67,10 @@ properties:
               - thead,c908
               - thead,c910
               - thead,c920
+              - xuantie,c906
+              - xuantie,c908
+              - xuantie,c910
+              - xuantie,c920

[Severity: Medium]
Since these new compatible strings are equivalents to the existing "thead,*" compatibles, shouldn't they also be added to the allOf conditional block that governs the "thead,vlenb" property?

Earlier in this file, the schema restricts the property like this:

allOf:
- $ref: /schemas/cpu.yaml#
- $ref: extensions.yaml
- if:
not:
properties:
compatible:
contains:
enum:
- thead,c906
- thead,c910
- thead,c920
then:
properties:
thead,vlenb: false

If a device tree node is defined with compatible = "xuantie,c906" and includes the "thead,vlenb" property, won't the allOf block evaluate true and incorrectly enforce "thead,vlenb: false", causing schema validation to fail?

Quoted 3 lines
Documentation/devicetree/bindings/riscv/cpus.yaml +0 -0
           - const: riscv
       - items:
           - enum:
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#6 lore raw

Re: [PATCH 2/2] dt-bindings: riscv: Add Xuantie C906/C908/C910/C920 compatibles

In reply to Guo Ren

Can't we just replace all existing dts' thead to xuantie? So we can remove thead here.

Quoted 27 lines

Add equivalent compatibles using the newly defined xuantie vendor prefix. Keep the existing thead compatibles to preserve compatibility with existing device trees.

Cc Conor Dooley <[email protected]>
Cc Rob Herring <[email protected]>
Cc devicetree <[email protected]>
---
  Documentation/devicetree/bindings/riscv/cpus.yaml | 4 ++++
  1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/riscv/cpus.yaml +4 -0
index 5feeb2203050..5aba1e8ed195 100644
@@ -67,6 +67,10 @@ properties:
                - thead,c908
                - thead,c910
                - thead,c920
+              - xuantie,c906
+              - xuantie,c908
+              - xuantie,c910
+              - xuantie,c920
            - const: riscv
        - items:
            - enum:
author
#7 lore raw

Re: [PATCH 2/2] dt-bindings: riscv: Add Xuantie C906/C908/C910/C920 compatibles

Quoted 3 lines · Shengyu Qu

Can't we just replace all existing dts' thead to xuantie? So we can remove thead here.

Good advice, I'll try that in the next version. Thx.

Quoted 29 lines
Quoted 28 lines

Add equivalent compatibles using the newly defined xuantie vendor prefix. Keep the existing thead compatibles to preserve compatibility with existing device trees.

Cc Conor Dooley <[email protected]>
Cc Rob Herring <[email protected]>
Cc devicetree <[email protected]>
---
  Documentation/devicetree/bindings/riscv/cpus.yaml | 4 ++++
  1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/riscv/cpus.yaml +4 -0
index 5feeb2203050..5aba1e8ed195 100644
@@ -67,6 +67,10 @@ properties:
                - thead,c908
                - thead,c910
                - thead,c920
+              - xuantie,c906
+              - xuantie,c908
+              - xuantie,c910
+              - xuantie,c920
            - const: riscv
        - items:
            - enum:
Signature · 2 lines
Best Regards
 Guo Ren
#8 lore raw

Re: [PATCH 2/2] dt-bindings: riscv: Add Xuantie C906/C908/C910/C920 compatibles

In reply to Guo Ren
Quoted 8 lines · Guo Ren

From: "GUO Ren (XuanTie)" <[email protected]>

The RISC-V CPU bindings currently use the historical thead vendor prefix for the XuanTie C906, C908, C910 and C920 processors.

Add equivalent compatibles using the newly defined xuantie vendor prefix. Keep the existing thead compatibles to preserve compatibility with existing device trees.

No, you already received feedback - you were on Cc, you replied, you got answers.

https://lore.kernel.org/all/20251121-able-terrestrial-spaniel-90c3cf@kuoka/

NAK

Best regards,
Krzysztof