dt-bindings: mtd: microchip,mchp23k256: convert to DT schema
Subsystems (2)
PATCH 1/1 dt-bindings: mtd: microchip,mchp23k256: convert to DT schema
Convert Microchip 23K256 SPI SRAM MTD driver binding to YAML format.
--- .../bindings/mtd/microchip,mchp23k256.txt | 18 ------- .../bindings/mtd/microchip,mchp23k256.yaml | 58 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 18 deletions(-)
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.txt deleted +0 -18
@@ -1,18 +0,0 @@ -* MTD SPI driver for Microchip 23K256 (and similar) serial SRAM - -Required properties: -- #address-cells, #size-cells : Must be present if the device has sub-nodes - representing partitions. -- compatible : Must be one of "microchip,mchp23k256" or "microchip,mchp23lcv1024" -- reg : Chip-Select number -- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at - -Example: - - spi-sram@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "microchip,mchp23k256"; - reg = <0>; - spi-max-frequency = <20000000>; - };
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +58 -0
58 lines not on this page · raw message
---
base-commit: cc3aa43b44bdb43dfbac0fcb51c56594a11338a8
change-id: 20251229-nxp-526e29da9f29
Best regards,
Signature · 1 line
Akhila YS <[email protected]>
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 7
Quoted 5 lines · Akhila YS
+---
+$id: http://devicetree.org/schemas/mtd/microchip,mchp23k256.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +2
-0+ +title: Microchip 23K256 (and similar) SPI SRAM MTD driver
driver? Bindings are for hardware.
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 12
Quoted 5 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +5
-0+ +maintainers: + - Richard Weinberger <[email protected]> + +description: |
Do not need '|' unless you need to preserve formatting.
Quoted 1 line
+ Driver for Microchip 23K256 and compatible (e.g. 23LCV1024) serial SRAM devices
Don't describe drivers...
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 15
Quoted 2 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +2
-0+ accessed via SPI. The device exposes the SRAM as an MTD device and supports + optional partitioning via child nodes.
nor DTS, but the hardware.
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 19
Quoted 4 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +4
-0+ +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# +
If this is SRAM, then it should go to sram directory. But maybe it is MTD, so NOR or NAND? If so you would be missing here refs to NAND chips.
Although docs are saying it is SRAM, so just place it there.
Quoted 4 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +4
-0+properties: + compatible: + enum: + - microchip,mchp23k256
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 33
Quoted 10 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +10
-0+ - microchip,mchp23lcv1024 + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1
Pretty incomplete. Old binding and above cells claim there can be child nodes, so please add them and test. Works? No. Shall work? Yes... so either old binding was incorrect or new binding is incomplete. I did not check the driver, though.
Quoted 9 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +9
-0+ +required: + - reg + - compatible + - "#address-cells" + - "#size-cells" + - spi-max-frequency + +unevaluatedProperties: false
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 52
Quoted 10 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +10
-0+ +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + sram@0 { + #address-cells = <1>; + #size-cells = <1>;
They are redundant. Where are children?
Quoted 15 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +6
-1+ compatible = "microchip,mchp23k256"; + reg = <0>; + spi-max-frequency = <20000000>; + }; + }; +... ---base-commit:
cc3aa43b44bdb43dfbac0fcb51c56594a11338a8
change-id: 20251229-nxp-526e29da9f29Best regards,
Signature · 1 line
Akhila YS <[email protected]>
Quoted 108 lines · Akhila YS
Quoted 7 lines · Krzysztof Kozlowski
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 7
Quoted 5 lines · Akhila YS
+---
+$id: http://devicetree.org/schemas/mtd/microchip,mchp23k256.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +2
-0+ +title: Microchip 23K256 (and similar) SPI SRAM MTD driverdriver? Bindings are for hardware.
Sure, I will fix it.
Quoted 6 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 12
Quoted 5 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +5
-0+ +maintainers: + - Richard Weinberger <[email protected]> + +description: |Do not need '|' unless you need to preserve formatting.
Ok.
Quoted 6 lines
Quoted 1 line
+ Driver for Microchip 23K256 and compatible (e.g. 23LCV1024) serial SRAM devices
Don't describe drivers...
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 15
Quoted 2 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +2
-0+ accessed via SPI. The device exposes the SRAM as an MTD device and supports + optional partitioning via child nodes.nor DTS, but the hardware.
OK, I will change it.
Quoted 9 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 19
Quoted 4 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +4
-0+ +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# +If this is SRAM, then it should go to sram directory. But maybe it is MTD, so NOR or NAND? If so you would be missing here refs to NAND chips.
Although docs are saying it is SRAM, so just place it there.
This SRAM is not generic MMIO SRAM, it's an SPI peripheral exposing memory via the MTD subsystem. Also i tried Yaml from sram directory it doesn't work with it.
Quoted 10 lines
Quoted 10 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +10
-0+properties: + compatible: + enum: + - microchip,mchp23k256 + - microchip,mchp23lcv1024 + + reg: + maxItems: 1 + + "#address-cells":Quoted 8 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 33
Quoted 4 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +4
-0+ const: 1 + + "#size-cells": + const: 1Pretty incomplete. Old binding and above cells claim there can be child nodes, so please add them and test. Works? No. Shall work? Yes... so either old binding was incorrect or new binding is incomplete. I did not check the driver, though.
Size cells and Address cells are not required as there is no child node and I tried to define child node , Included SRAM.Yaml as a reference file and tested it. It doesn't work.
Quoted 12 lines
Quoted 12 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +12
-0+ +required: + - reg + - compatible + - "#address-cells" + - "#size-cells" + - spi-max-frequency + +unevaluatedProperties: false + +examples: + - |Quoted 8 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 52
Quoted 7 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +7
-0+ spi { + #address-cells = <1>; + #size-cells = <0>; + + sram@0 { + #address-cells = <1>; + #size-cells = <1>;They are redundant. Where are children?
They are redundant, There is no child node and i will remove it.
Quoted 15 lines
Quoted 15 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +6
-1+ compatible = "microchip,mchp23k256"; + reg = <0>; + spi-max-frequency = <20000000>; + }; + }; +... ---base-commit:
cc3aa43b44bdb43dfbac0fcb51c56594a11338a8
change-id: 20251229-nxp-526e29da9f29Best regards,
Signature · 1 line
Akhila YS <[email protected]>
Signature · 2 lines
Best Regards, Akhila.
Quoted 20 lines · Akhila YS
Quoted 10 lines
Quoted 10 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +10
-0+properties: + compatible: + enum: + - microchip,mchp23k256 + - microchip,mchp23lcv1024 + + reg: + maxItems: 1 + + "#address-cells":Quoted 8 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 33
Quoted 4 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +4
-0+ const: 1 + + "#size-cells": + const: 1Pretty incomplete. Old binding and above cells claim there can be child nodes, so please add them and test. Works? No. Shall work? Yes... so either old binding was incorrect or new binding is incomplete. I did not check the driver, though.
Quoted 1 line
Size cells and Address cells are not required as there is no child node
Then what is the point of address/size cells if you do not have children?
Anyway, read carefully old binding and the driver code.
Best regards,
Krzysztof
Quoted 14 lines · Akhila YS
Quoted 12 lines · Akhila YS
Quoted 7 lines · Krzysztof Kozlowski
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 7
Quoted 5 lines · Akhila YS
+---
+$id: http://devicetree.org/schemas/mtd/microchip,mchp23k256.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +2
-0+ +title: Microchip 23K256 (and similar) SPI SRAM MTD driverdriver? Bindings are for hardware.
Quoted 1 line
Quoted 1 line
Sure, I will fix it.
I don't know what's this - empty email.
Please kindly trim the replies from unnecessary context. It makes it much easier to find new content.
Best regards,
Krzysztof
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Akhila YS
Quoted 18 lines
Quoted 4 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +4
-0+properties: + compatible: + enum: + - microchip,mchp23k256Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml line 33
Quoted 10 lines
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml new file +10
-0+ - microchip,mchp23lcv1024 + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1Pretty incomplete. Old binding and above cells claim there can be child nodes, so please add them and test. Works? No. Shall work? Yes... so either old binding was incorrect or new binding is incomplete. I did not check the driver, though.
Quoted 4 lines
Quoted 1 line
Size cells and Address cells are not required as there is no child node
Then what is the point of address/size cells if you do not have children?
Anyway, read carefully old binding and the driver code.
Yes, I will remove the above cells in the next revision.
Quoted 3 lines
Best regards,
Krzysztof
Signature · 2 lines
Best Regards, Akhila.