Skip to contentSkip to conversation

devicetree: move nvmem-cells users to nvmem-layout

PATCH Superseded Rosen Penev 2 participants 7 messages Oct 3, 2024

Subsystems (9)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover devicetree: move nvmem-cells users to nvmem-layout

The former has been soft deprecated by the latter. Move all users to the latter to avoid having nvmem-cells as an example.

Rosen Penev (5):
ARM: dts: qcom: ipq4019: use nvmem-layout
arm64: dts: bcm4908: nvmem-layout conversion
arm64: dts: armada-3720-gl-mv1000: use nvmem-layout
arm64: dts: mediatek: 7886cax: use nvmem-layout
documentation: use nvmem-layout in examples

 .../mtd/partitions/qcom,smem-part.yaml        | 19 +++++++-----
 .../bindings/net/marvell,aquantia.yaml        | 13 ++++----
 .../boot/dts/qcom/qcom-ipq4018-ap120c-ac.dtsi | 19 +++++++-----
 .../bcmbca/bcm4906-netgear-r8000p.dts         | 14 +++++----
 .../dts/marvell/armada-3720-gl-mv1000.dts     | 30 +++++++++----------
 .../mediatek/mt7986a-acelink-ew-7886cax.dts   |  1 -
 6 files changed, 53 insertions(+), 43 deletions(-)
Signature · 1 line
2.46.2
#1 lore raw

PATCH 1/5 ARM: dts: qcom: ipq4019: use nvmem-layout

nvmem-layout is a more flexible replacement for nvmem-cells.

---
 .../boot/dts/qcom/qcom-ipq4018-ap120c-ac.dtsi | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dtsi +11 -8
index 0d23c03fae33..a6d4390efa7c 100644
@@ -166,16 +166,19 @@ partition@170000 {
 				label = "ART";
 				reg = <0x00170000 0x00010000>;
 				read-only;
-				compatible = "nvmem-cells";
-				#address-cells = <1>;
-				#size-cells = <1>;
 
-				precal_art_1000: precal@1000 {
-					reg = <0x1000 0x2f20>;
-				};
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					precal_art_1000: precal@1000 {
+						reg = <0x1000 0x2f20>;
+					};
 
-				precal_art_5000: precal@5000 {
-					reg = <0x5000 0x2f20>;
+					precal_art_5000: precal@5000 {
+						reg = <0x5000 0x2f20>;
+					};
 				};
 			};
 
Signature · 1 line
2.46.2
#2 lore raw

PATCH 2/5 arm64: dts: bcm4908: nvmem-layout conversion

In reply to Rosen Penev

nvmem-layout is a more flexible replacement for nvmem-cells.

---
 .../dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts +8 -6
index 999d93730240..df47fc75fa3a 100644
@@ -144,16 +144,18 @@ partitions {
 		#size-cells = <1>;
 
 		partition@0 {
-			compatible = "nvmem-cells";
 			label = "cferom";
 			reg = <0x0 0x100000>;
-
-			#address-cells = <1>;
-			#size-cells = <1>;
 			ranges = <0 0x0 0x100000>;
 
-			base_mac_addr: mac@106a0 {
-				reg = <0x106a0 0x6>;
+			nvmem-layout {
+				compatible = "fixed-layout";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				base_mac_addr: mac@106a0 {
+					reg = <0x106a0 0x6>;
+				};
 			};
 		};
 
Signature · 1 line
2.46.2
#3 lore raw

PATCH 3/5 arm64: dts: armada-3720-gl-mv1000: use nvmem-layout

In reply to Rosen Penev

nvmem-layout is a more flexible replacement for nvmem-cells.

---
 .../dts/marvell/armada-3720-gl-mv1000.dts     | 30 +++++++++----------
 1 file changed, 15 insertions(+), 15 deletions(-)
arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts +15 -15
index 56930f2ce481..7b801b60862d 100644
@@ -98,10 +98,24 @@ partition@f0000 {
 				reg = <0xf0000 0x8000>;
 			};
 
-			factory: partition@f8000 {
+			partition@f8000 {
 				label = "factory";
 				reg = <0xf8000 0x8000>;
 				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_factory_0: macaddr@0 {
+						reg = <0x0 0x6>;
+					};
+
+					macaddr_factory_6: macaddr@6 {
+						reg = <0x6 0x6>;
+					};
+				};
 			};
 
 			partition@100000 {
@@ -221,17 +235,3 @@ fixed-link {
 		full-duplex;
 	};
 };
-
-&factory {
-	compatible = "nvmem-cells";
-	#address-cells = <1>;
-	#size-cells = <1>;
-
-	macaddr_factory_0: macaddr@0 {
-		reg = <0x0 0x6>;
-	};
-
-	macaddr_factory_6: macaddr@6 {
-		reg = <0x6 0x6>;
-	};
-};
Signature · 1 line
2.46.2
#4 lore raw

PATCH 4/5 arm64: dts: mediatek: 7886cax: use nvmem-layout

In reply to Rosen Penev

nvmem-layout is a more flexible replacement for nvmem-cells.

---
 arch/arm64/boot/dts/mediatek/mt7986a-acelink-ew-7886cax.dts | 1 -
 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt7986a-acelink-ew-7886cax.dts +0 -1
index 08b3b0827436..9a6625d8660f 100644
@@ -121,7 +121,6 @@ partition@100000 {
 			};
 
 			partition@180000 {
-				compatible = "nvmem-cells";
 				reg = <0x180000 0x200000>;
 				label = "factory";
 				read-only;
Signature · 1 line
2.46.2
#5 lore raw

PATCH 5/5 documentation: use nvmem-layout in examples

In reply to Rosen Penev

nvmem-cells are deprecated and replaced with nvmem-layout. For these examples, replace. They're not relevant to the main point of the document anyway.

---
 .../mtd/partitions/qcom,smem-part.yaml        | 19 +++++++++++--------
 .../bindings/net/marvell,aquantia.yaml        | 13 ++++++++-----
 2 files changed, 19 insertions(+), 13 deletions(-)
Documentation/devicetree/bindings/mtd/partitions/qcom,smem-part.yaml +11 -8
index 1c2b4e780ca9..8ae149534b23 100644
@@ -45,17 +45,20 @@ examples:
             compatible = "qcom,smem-part";
 
             partition-art {
-                compatible = "nvmem-cells";
-                #address-cells = <1>;
-                #size-cells = <1>;
                 label = "0:art";
 
-                macaddr_art_0: macaddr@0 {
-                    reg = <0x0 0x6>;
-                };
+                nvmem-layout {
+                    compatible = "fixed-layout";
+                    #address-cells = <1>;
+                    #size-cells = <1>;
+
+                    macaddr_art_0: macaddr@0 {
+                        reg = <0x0 0x6>;
+                    };
 
-                macaddr_art_6: macaddr@6 {
-                    reg = <0x6 0x6>;
+                    macaddr_art_6: macaddr@6 {
+                        reg = <0x6 0x6>;
+                    };
                 };
             };
         };
Documentation/devicetree/bindings/net/marvell,aquantia.yaml +8 -5
index 9854fab4c4db..f57a6e7d0049 100644
@@ -98,15 +98,18 @@ examples:
             /* ... */
 
             partition@650000 {
-                compatible = "nvmem-cells";
                 label = "0:ethphyfw";
                 reg = <0x650000 0x80000>;
                 read-only;
-                #address-cells = <1>;
-                #size-cells = <1>;
 
-                aqr_fw: aqr_fw@0 {
-                    reg = <0x0 0x5f42a>;
+                nvmem-layout {
+                    compatible = "fixed-layout"
+                    #address-cells = <1>;
+                    #size-cells = <1>;
+
+                    aqr_fw: aqr_fw@0 {
+                        reg = <0x0 0x5f42a>;
+                    };
                 };
             };
 
Signature · 1 line
2.46.2
#6 lore raw

Re: [PATCH 5/5] documentation: use nvmem-layout in examples

Quoted 10 lines · Rosen Penev

nvmem-cells are deprecated and replaced with nvmem-layout. For these examples, replace. They're not relevant to the main point of the document anyway.

---
 .../mtd/partitions/qcom,smem-part.yaml        | 19 +++++++++++--------
 .../bindings/net/marvell,aquantia.yaml        | 13 ++++++++-----
 2 files changed, 19 insertions(+), 13 deletions(-)

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/net/marvell,aquantia.example.dts:59.25-26 syntax error FATAL ERROR: Unable to parse input tree
make[2]: *** [scripts/Makefile.dtbs:129: Documentation/devicetree/bindings/net/marvell,aquantia.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1442: dt_binding_check] Error 2
make: *** [Makefile:224: __sub-make] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.