Skip to contentSkip to conversation

ARM: dts: aspeed: restore labels of the flash modules

PATCH In review Cédric Le Goater 2 participants 2 messages Nov 28, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: aspeed: restore labels of the flash modules

commit e62c7f111755 ("ARM: dts: aspeed: fix flash module device nodes") removed the 'label' property under the flash module device nodes because of the lack of support in mainline. This change broke a number of OpenBMC user space tools. let's revert the label change.

---

Joel, I will add a proposal patch to extend the 'jedec,spi-nor' binding with a 'label' property in the next version of the Aspeed SMC controller patchset.

 Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt | 2 ++
 arch/arm/boot/dts/aspeed-ast2500-evb.dts                | 3 ++-
 arch/arm/boot/dts/aspeed-bmc-opp-barreleye.dts          | 3 ++-
 arch/arm/boot/dts/aspeed-bmc-opp-firestone.dts          | 3 ++-
 arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi      | 1 +
 arch/arm/boot/dts/aspeed-bmc-opp-garrison.dts           | 3 ++-
 arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts           | 3 ++-
 arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts            | 4 +++-
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts        | 4 +++-
 arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts              | 3 ++-
 arch/arm/boot/dts/aspeed-g5.dtsi                        | 4 ++--
 11 files changed, 23 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt +2 -0
index 2c91c03e7eb0..b7cd02a3ebe8 100644
@@ -65,6 +65,7 @@ Optional properties:
                    all chips and support for it can not be detected at runtime.
                    Refer to your chips' datasheet to check if this is supported
                    by your chip.
+- label : name to assign to mtd. If omitted, the label is the MTD device name.
 
 Example:
 
@@ -75,4 +76,5 @@ Example:
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 		m25p,fast-read;
+		label = "System-firmware";
 	};
arch/arm/boot/dts/aspeed-ast2500-evb.dts +2 -1
index fe8fc7a801f6..9d88f3aadbc6 100644
@@ -33,8 +33,9 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_spi1_default>;
 
-	pnor@0 {
+	flash@0 {
 		status = "okay";
+		label = "pnor";
 	};
 };
 
arch/arm/boot/dts/aspeed-bmc-opp-barreleye.dts +2 -1
index 802ce9557836..bedff97fb9b9 100644
@@ -40,9 +40,10 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			compatible = "aspeed,ast2400-smc";
-			pnor@0 {
+			flash@0 {
 				reg = < 0 >;
 				compatible = "jedec,spi-nor" ;
+				label = "pnor";
 			};
 		};
 	};
arch/arm/boot/dts/aspeed-bmc-opp-firestone.dts +2 -1
index 005ff89e0c10..bbe09fc85b1e 100644
@@ -61,9 +61,10 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			compatible = "aspeed,ast2400-smc";
-			pnor@0 {
+			flash@0 {
 				reg = < 0 >;
 				compatible = "jedec,spi-nor" ;
+				label = "pnor";
 			};
 		};
 	};
arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi +1 -0
index 6cfadb42368f..65095a40a203 100644
@@ -1,3 +1,4 @@
+		label = "bmc";
 		partitions {
 				#address-cells = < 1 >;
 				#size-cells = < 1 >;
arch/arm/boot/dts/aspeed-bmc-opp-garrison.dts +2 -1
index 92b29d1c665b..7737c09aa20e 100644
@@ -41,9 +41,10 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			compatible = "aspeed,ast2400-smc";
-			pnor@0 {
+			flash@0 {
 				reg = < 0 >;
 				compatible = "jedec,spi-nor" ;
+				label = "pnor";
 				/* spi-max-frequency = <>; */
 				/* m25p,fast-read; */
 			};
arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts +2 -1
index ed3c4a9e3d9d..f018074f6bb1 100644
@@ -58,9 +58,10 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			compatible = "aspeed,ast2400-smc";
-			pnor@0 {
+			flash {
 				reg = < 0 >;
 				compatible = "jedec,spi-nor" ;
+				label = "pnor";
 			};
 		};
 	};
arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts +3 -1
index 9845e6ca0de9..c23627ec5e84 100644
@@ -29,6 +29,7 @@
 	};
 	flash@1 {
 		status = "okay";
+		label = "alt";
 	};
 };
 
@@ -37,8 +38,9 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_spi1_default>;
 
-	pnor@0 {
+	flash@0 {
 		status = "okay";
+		label = "pnor";
 	};
 };
 
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +3 -1
index 5c463f4112f6..9badf3e94599 100644
@@ -29,6 +29,7 @@
 	};
 	flash@1 {
 		status = "okay";
+		label = "alt";
 	};
 };
 
@@ -37,8 +38,9 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_spi1_default>;
 
-	pnor@0 {
+	flash@0 {
 		status = "okay";
+		label = "pnor";
 	};
 };
 
arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts +2 -1
index 8ef4ecec17cc..673bab8006e7 100644
@@ -58,8 +58,9 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_spi1_default>;
 
-	pnor@0 {
+	flash@0 {
 		status = "okay";
+		label = "pnor";
 	};
 };
 
arch/arm/boot/dts/aspeed-g5.dtsi +2 -2
index 433461bce607..d6ff41ee6c58 100644
@@ -58,12 +58,12 @@
 			#size-cells = <0>;
 			compatible = "aspeed,ast2500-smc";
 			status = "disabled";
-			pnor@0 {
+			flash@0 {
 				reg = < 0 >;
 				compatible = "jedec,spi-nor";
 				status = "disabled";
 			};
-			pnor@1 {
+			flash@1 {
 				reg = < 1 >;
 				compatible = "jedec,spi-nor";
 				status = "disabled";
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 11 lines · Cédric Le Goater

commit e62c7f111755 ("ARM: dts: aspeed: fix flash module device nodes") removed the 'label' property under the flash module device nodes because of the lack of support in mainline. This change broke a number of OpenBMC user space tools. let's revert the label change.

---

Joel, I will add a proposal patch to extend the 'jedec,spi-nor' binding with a 'label' property in the next version of the Aspeed SMC controller patchset.

Cool, thanks for sending this. I've applied it to dev-4.7 as of b278d67c.

Ideally we would get upstream to ack it first but given we've been asked to fix this asap, we can carry it our tree for now. Hopefully upstream have no issues and we will be all good.

Cheers,

Joel

Quoted 203 lines
 Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt | 2 ++
 arch/arm/boot/dts/aspeed-ast2500-evb.dts                | 3 ++-
 arch/arm/boot/dts/aspeed-bmc-opp-barreleye.dts          | 3 ++-
 arch/arm/boot/dts/aspeed-bmc-opp-firestone.dts          | 3 ++-
 arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi      | 1 +
 arch/arm/boot/dts/aspeed-bmc-opp-garrison.dts           | 3 ++-
 arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts           | 3 ++-
 arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts            | 4 +++-
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts        | 4 +++-
 arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts              | 3 ++-
 arch/arm/boot/dts/aspeed-g5.dtsi                        | 4 ++--
 11 files changed, 23 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt +2 -0
index 2c91c03e7eb0..b7cd02a3ebe8 100644
@@ -65,6 +65,7 @@ Optional properties:
                    all chips and support for it can not be detected at runtime.
                    Refer to your chips' datasheet to check if this is supported
                    by your chip.
+- label : name to assign to mtd. If omitted, the label is the MTD device name.
 
 Example:
 
@@ -75,4 +76,5 @@ Example:
                reg = <0>;
                spi-max-frequency = <40000000>;
                m25p,fast-read;
+               label = "System-firmware";
        };
arch/arm/boot/dts/aspeed-ast2500-evb.dts +2 -1
index fe8fc7a801f6..9d88f3aadbc6 100644
@@ -33,8 +33,9 @@
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_spi1_default>;
 
-       pnor@0 {
+       flash@0 {
                status = "okay";
+               label = "pnor";
        };
 };
 
arch/arm/boot/dts/aspeed-bmc-opp-barreleye.dts +2 -1
index 802ce9557836..bedff97fb9b9 100644
@@ -40,9 +40,10 @@
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "aspeed,ast2400-smc";
-                       pnor@0 {
+                       flash@0 {
                                reg = < 0 >;
                                compatible = "jedec,spi-nor" ;
+                               label = "pnor";
                        };
                };
        };
arch/arm/boot/dts/aspeed-bmc-opp-firestone.dts +2 -1
index 005ff89e0c10..bbe09fc85b1e 100644
@@ -61,9 +61,10 @@
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "aspeed,ast2400-smc";
-                       pnor@0 {
+                       flash@0 {
                                reg = < 0 >;
                                compatible = "jedec,spi-nor" ;
+                               label = "pnor";
                        };
                };
        };
arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi +1 -0
index 6cfadb42368f..65095a40a203 100644
@@ -1,3 +1,4 @@
+               label = "bmc";
                partitions {
                                #address-cells = < 1 >;
                                #size-cells = < 1 >;
arch/arm/boot/dts/aspeed-bmc-opp-garrison.dts +2 -1
index 92b29d1c665b..7737c09aa20e 100644
@@ -41,9 +41,10 @@
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "aspeed,ast2400-smc";
-                       pnor@0 {
+                       flash@0 {
                                reg = < 0 >;
                                compatible = "jedec,spi-nor" ;
+                               label = "pnor";
                                /* spi-max-frequency = <>; */
                                /* m25p,fast-read; */
                        };
arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts +2 -1
index ed3c4a9e3d9d..f018074f6bb1 100644
@@ -58,9 +58,10 @@
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "aspeed,ast2400-smc";
-                       pnor@0 {
+                       flash {
                                reg = < 0 >;
                                compatible = "jedec,spi-nor" ;
+                               label = "pnor";
                        };
                };
        };
arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts +3 -1
index 9845e6ca0de9..c23627ec5e84 100644
@@ -29,6 +29,7 @@
        };
        flash@1 {
                status = "okay";
+               label = "alt";
        };
 };
 
@@ -37,8 +38,9 @@
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_spi1_default>;
 
-       pnor@0 {
+       flash@0 {
                status = "okay";
+               label = "pnor";
        };
 };
 
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +3 -1
index 5c463f4112f6..9badf3e94599 100644
@@ -29,6 +29,7 @@
        };
        flash@1 {
                status = "okay";
+               label = "alt";
        };
 };
 
@@ -37,8 +38,9 @@
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_spi1_default>;
 
-       pnor@0 {
+       flash@0 {
                status = "okay";
+               label = "pnor";
        };
 };
 
arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts +2 -1
index 8ef4ecec17cc..673bab8006e7 100644
@@ -58,8 +58,9 @@
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_spi1_default>;
 
-       pnor@0 {
+       flash@0 {
                status = "okay";
+               label = "pnor";
        };
 };
 
arch/arm/boot/dts/aspeed-g5.dtsi +2 -3
index 433461bce607..d6ff41ee6c58 100644
@@ -58,12 +58,12 @@
                        #size-cells = <0>;
                        compatible = "aspeed,ast2500-smc";
                        status = "disabled";
-                       pnor@0 {
+                       flash@0 {
                                reg = < 0 >;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };
-                       pnor@1 {
+                       flash@1 {
                                reg = < 1 >;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
--

2.7.4