Skip to contentSkip to conversation

arm: mvebu: Fix compatible string for nand controller

PATCH In review Pali Rohár 3 participants 21 messages Jul 27, 2022 – Jul 29, 2022

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

PATCH 1/4 arm: mvebu: Fix compatible string for nand controller

Linux kernel uses compatible string "marvell,armada370-nand-controller" for nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand".

So unify it and use just Linux kernel compatible string.

---
 arch/arm/dts/armada-370-xp.dtsi                  | 2 +-
 arch/arm/dts/armada-375.dtsi                     | 2 +-
 arch/arm/dts/armada-38x.dtsi                     | 2 +-
 arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 2 +-
 drivers/mtd/nand/raw/pxa3xx_nand.c               | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/dts/armada-370-xp.dtsi +1 -1
index 50fc0be9f73b..4cd168c95784 100644
@@ -246,7 +246,7 @@
 			};
 
 			nand@d0000 {
-				compatible = "marvell,armada370-nand";
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
 				#size-cells = <1>;
arch/arm/dts/armada-375.dtsi +1 -1
index ff0ad7a9c7fd..fcb9245fd496 100644
@@ -541,7 +541,7 @@
 			};
 
 			nand@d0000 {
-				compatible = "marvell,armada370-nand";
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
 				#size-cells = <1>;
arch/arm/dts/armada-38x.dtsi +1 -1
index 061bd7852081..6979c0c50584 100644
@@ -555,7 +555,7 @@
 			};
 
 			nand_controller: nand-controller@d0000 {
-				compatible = "marvell,armada370-nand","marvell,mvebu-pxa3xx-nand";
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
 				#size-cells = <0>;
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +1 -1
index 90cad85506d0..fdbe168a8734 100644
@@ -5,7 +5,7 @@
 };
 
 &nand_controller {
-	compatible="marvell,mvebu-pxa3xx-nand";
+	compatible="marvell,armada370-nand-controller";
 	status = "okay";
 	label = "pxa3xx_nand-0";
 	nand-rb = <0>;
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -1
index 20d1aee7b3e1..9c29e8a6c214 100644
@@ -429,7 +429,7 @@ static struct nand_ecclayout ecc_layout_8KB_bch8bit = {
 
 static const struct udevice_id pxa3xx_nand_dt_ids[] = {
 	{
-		.compatible = "marvell,mvebu-pxa3xx-nand",
+		.compatible = "marvell,armada370-nand-controller",
 		.data = PXA3XX_NAND_VARIANT_ARMADA370,
 	},
 	{
Signature · 1 line
2.20.1
#4 lore raw

PATCH 3/4 arm: mvebu: Synchronize armada-385.dtsi with Linux v5.20

* Define PCIe interrupts

---
 arch/arm/dts/armada-385.dtsi | 52 ++++++++++++++++++++++++++++++------
 1 file changed, 44 insertions(+), 8 deletions(-)
arch/arm/dts/armada-385.dtsi +44 -8
index 581a7d9beac3..48072fc7fd4a 100644
@@ -69,17 +69,26 @@
 				reg = <0x0800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
+				interrupt-names = "intx";
+				interrupts-extended = <&gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
 				#interrupt-cells = <1>;
 				ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
 					  0x81000000 0 0 0x81000000 0x1 0 1 0>;
 				bus-range = <0x00 0xff>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0 0 0 7>;
+				interrupt-map = <0 0 0 1 &pcie1_intc 0>,
+						<0 0 0 2 &pcie1_intc 1>,
+						<0 0 0 3 &pcie1_intc 2>,
+						<0 0 0 4 &pcie1_intc 3>;
 				marvell,pcie-port = <0>;
 				marvell,pcie-lane = <0>;
 				clocks = <&gateclk 8>;
 				resets = <&systemc 0 0>;
 				status = "disabled";
+				pcie1_intc: interrupt-controller {
+					interrupt-controller;
+					#interrupt-cells = <1>;
+				};
 			};
 
 			/* x1 port */
@@ -89,17 +98,26 @@
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
+				interrupt-names = "intx";
+				interrupts-extended = <&gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
 				#interrupt-cells = <1>;
 				ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
 					  0x81000000 0 0 0x81000000 0x2 0 1 0>;
 				bus-range = <0x00 0xff>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0 0 0 7>;
+				interrupt-map = <0 0 0 1 &pcie2_intc 0>,
+						<0 0 0 2 &pcie2_intc 1>,
+						<0 0 0 3 &pcie2_intc 2>,
+						<0 0 0 4 &pcie2_intc 3>;
 				marvell,pcie-port = <1>;
 				marvell,pcie-lane = <0>;
 				clocks = <&gateclk 5>;
 				resets = <&systemc 0 1>;
 				status = "disabled";
+				pcie2_intc: interrupt-controller {
+					interrupt-controller;
+					#interrupt-cells = <1>;
+				};
 			};
 
 			/* x1 port */
@@ -109,17 +127,26 @@
 				reg = <0x1800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
+				interrupt-names = "intx";
+				interrupts-extended = <&gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
 				#interrupt-cells = <1>;
 				ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0
 					  0x81000000 0 0 0x81000000 0x3 0 1 0>;
 				bus-range = <0x00 0xff>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0 0 0 7>;
+				interrupt-map = <0 0 0 1 &pcie3_intc 0>,
+						<0 0 0 2 &pcie3_intc 1>,
+						<0 0 0 3 &pcie3_intc 2>,
+						<0 0 0 4 &pcie3_intc 3>;
 				marvell,pcie-port = <2>;
 				marvell,pcie-lane = <0>;
 				clocks = <&gateclk 6>;
 				resets = <&systemc 0 2>;
 				status = "disabled";
+				pcie3_intc: interrupt-controller {
+					interrupt-controller;
+					#interrupt-cells = <1>;
+				};
 			};
 
 			/*
@@ -132,17 +159,26 @@
 				reg = <0x2000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
+				interrupt-names = "intx";
+				interrupts-extended = <&gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
 				#interrupt-cells = <1>;
 				ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0
 					  0x81000000 0 0 0x81000000 0x4 0 1 0>;
 				bus-range = <0x00 0xff>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0 0 0 7>;
+				interrupt-map = <0 0 0 1 &pcie4_intc 0>,
+						<0 0 0 2 &pcie4_intc 1>,
+						<0 0 0 3 &pcie4_intc 2>,
+						<0 0 0 4 &pcie4_intc 3>;
 				marvell,pcie-port = <3>;
 				marvell,pcie-lane = <0>;
 				clocks = <&gateclk 7>;
 				resets = <&systemc 0 3>;
 				status = "disabled";
+				pcie4_intc: interrupt-controller {
+					interrupt-controller;
+					#interrupt-cells = <1>;
+				};
 			};
 		};
 	};
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/4 arm: mvebu: Synchronize armada-38x.dtsi with Linux v5.20

In reply to Pali Rohár

* Replace skeleton.dtsi by explicit #address-cells / #size-cells
* Add sdramc@1400 and phy@18300 nodes
* Remove (unused) timeout-ms i2c properties
* Fix compatible string for UARTs
* Add interrupts properties for watchdog

---
 arch/arm/dts/armada-38x.dtsi | 55 ++++++++++++++++++++++++++++++++----
 1 file changed, 50 insertions(+), 5 deletions(-)
arch/arm/dts/armada-38x.dtsi +50 -5
index 6979c0c50584..7731a205698e 100644
@@ -9,13 +9,15 @@
  * Thomas Petazzoni <[email protected]>
  */
 
-#include "skeleton.dtsi"
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 
 #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
 
 / {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
 	model = "Marvell Armada 38x family SoC";
 	compatible = "marvell,armada380";
 
@@ -103,6 +105,11 @@
 			#size-cells = <1>;
 			ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;
 
+			sdramc: sdramc@1400 {
+				compatible = "marvell,armada-xp-sdram-controller";
+				reg = <0x1400 0x500>;
+			};
+
 			L2: cache-controller@8000 {
 				compatible = "arm,pl310-cache";
 				reg = <0x8000 0x1000>;
@@ -148,7 +155,6 @@
 				#address-cells = <1>;
 				#size-cells = <0>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-				timeout-ms = <1000>;
 				clocks = <&coreclk 0>;
 				status = "disabled";
 			};
@@ -159,13 +165,12 @@
 				#address-cells = <1>;
 				#size-cells = <0>;
 				interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
-				timeout-ms = <1000>;
 				clocks = <&coreclk 0>;
 				status = "disabled";
 			};
 
 			uart0: serial@12000 {
-				compatible = "snps,dw-apb-uart";
+				compatible = "marvell,armada-38x-uart", "ns16550a";
 				reg = <0x12000 0x100>;
 				reg-shift = <2>;
 				interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
@@ -175,7 +180,7 @@
 			};
 
 			uart1: serial@12100 {
-				compatible = "snps,dw-apb-uart";
+				compatible = "marvell,armada-38x-uart", "ns16550a";
 				reg = <0x12100 0x100>;
 				reg-shift = <2>;
 				interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
@@ -338,6 +343,44 @@
 				#clock-cells = <1>;
 			};
 
+			comphy: phy@18300 {
+				compatible = "marvell,armada-380-comphy";
+				reg-names = "comphy", "conf";
+				reg = <0x18300 0x100>, <0x18460 4>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				comphy0: phy@0 {
+					reg = <0>;
+					#phy-cells = <1>;
+				};
+
+				comphy1: phy@1 {
+					reg = <1>;
+					#phy-cells = <1>;
+				};
+
+				comphy2: phy@2 {
+					reg = <2>;
+					#phy-cells = <1>;
+				};
+
+				comphy3: phy@3 {
+					reg = <3>;
+					#phy-cells = <1>;
+				};
+
+				comphy4: phy@4 {
+					reg = <4>;
+					#phy-cells = <1>;
+				};
+
+				comphy5: phy@5 {
+					reg = <5>;
+					#phy-cells = <1>;
+				};
+			};
+
 			coreclk: mvebu-sar@18600 {
 				compatible = "marvell,armada-380-core-clock";
 				reg = <0x18600 0x04>;
@@ -379,6 +422,8 @@
 				reg = <0x20300 0x34>, <0x20704 0x4>, <0x18260 0x4>;
 				clocks = <&coreclk 2>, <&refclk>;
 				clock-names = "nbclk", "fixed";
+				interrupts-extended = <&gic GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
+						      <&gic GIC_SPI  9 IRQ_TYPE_LEVEL_HIGH>;
 			};
 
 			cpurst: cpurst@20800 {
Signature · 1 line
2.20.1
#7 lore raw

PATCH 4/4 arm: mvebu: Synchronize armada-385-turris-omnia with Linux v5.20

In reply to Pali Rohár

* Add SPDX-License-Identifier
* Add SFP and LED nodes
* Fix PHY nad NOR nodes
* Remove duplicates from u-boot.dtsi file

---
 .../dts/armada-385-turris-omnia-u-boot.dtsi   |   5 +-
 arch/arm/dts/armada-385-turris-omnia.dts      | 228 ++++++++++++++----
 2 files changed, 183 insertions(+), 50 deletions(-)
arch/arm/dts/armada-385-turris-omnia-u-boot.dtsi +1 -4
index 5a22cc64a1a5..ec12298fd40c 100644
@@ -28,11 +28,8 @@
 		i2c@5 {
 			u-boot,dm-pre-reloc;
 
-			/* ATSHA204A at address 0x64 */
 			crypto@64 {
 				u-boot,dm-pre-reloc;
-				compatible = "atmel,atsha204a";
-				reg = <0x64>;
 			};
 		};
 	};
@@ -42,7 +39,7 @@
 &spi0 {
 	u-boot,dm-pre-reloc;
 
-	spi-nor@0 {
+	flash@0 {
 		u-boot,dm-pre-reloc;
 
 		partitions {
arch/arm/dts/armada-385-turris-omnia.dts +182 -46

345 lines not on this page · raw message

Signature · 1 line
2.20.1
#10 lore raw
In reply to Pali Rohár

Hi Pali

Quoted 73 lines · Pali Rohár

Linux kernel uses compatible string "marvell,armada370-nand-controller" for nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand".

So unify it and use just Linux kernel compatible string.

---
 arch/arm/dts/armada-370-xp.dtsi                  | 2 +-
 arch/arm/dts/armada-375.dtsi                     | 2 +-
 arch/arm/dts/armada-38x.dtsi                     | 2 +-
 arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 2 +-
 drivers/mtd/nand/raw/pxa3xx_nand.c               | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/dts/armada-370-xp.dtsi +1 -1
index 50fc0be9f73b..4cd168c95784 100644
@@ -246,7 +246,7 @@
                        };
 
                        nand@d0000 {
-                               compatible = "marvell,armada370-nand";
+                               compatible = "marvell,armada370-nand-controller";
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <1>;
arch/arm/dts/armada-375.dtsi +1 -1
index ff0ad7a9c7fd..fcb9245fd496 100644
@@ -541,7 +541,7 @@
                        };
 
                        nand@d0000 {
-                               compatible = "marvell,armada370-nand";
+                               compatible = "marvell,armada370-nand-controller";
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <1>;
arch/arm/dts/armada-38x.dtsi +1 -1
index 061bd7852081..6979c0c50584 100644
@@ -555,7 +555,7 @@
                        };
 
                        nand_controller: nand-controller@d0000 {
-                               compatible = "marvell,armada370-nand","marvell,mvebu-pxa3xx-nand";
+                               compatible = "marvell,armada370-nand-controller";
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <0>;
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +1 -1
index 90cad85506d0..fdbe168a8734 100644
@@ -5,7 +5,7 @@
 };
 
 &nand_controller {
-       compatible="marvell,mvebu-pxa3xx-nand";
+       compatible="marvell,armada370-nand-controller";
        status = "okay";
        label = "pxa3xx_nand-0";
        nand-rb = <0>;
drivers/mtd/nand/raw/pxa3xx_nand.c +0 -0
index 20d1aee7b3e1..9c29e8a6c214 100644

drivers/mtd/nand/raw/pxa3xx_nand.c static struct nand_ecclayout ecc_layout_8KB_bch8bit = {

Quoted 9 lines
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -2
@@ -429,7 +429,7 @@ static struct nand_ecclayout ecc_layout_8KB_bch8bit = {
 
 static const struct udevice_id pxa3xx_nand_dt_ids[] = {
        {
-               .compatible = "marvell,mvebu-pxa3xx-nand",
+               .compatible = "marvell,armada370-nand-controller",
                .data = PXA3XX_NAND_VARIANT_ARMADA370,
        },
        {
--

I prefer that adding compatible go in a different patch

Michael

Quoted 2 lines

2.20.1

#11 lore raw
Quoted 77 lines · On Wednesday 27 July 2022 14:55:51 Michael Nazzareno Trimarchi wrote:

Hi Pali

Quoted 74 lines · Pali Rohár

Linux kernel uses compatible string "marvell,armada370-nand-controller" for nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand".

So unify it and use just Linux kernel compatible string.

---
 arch/arm/dts/armada-370-xp.dtsi                  | 2 +-
 arch/arm/dts/armada-375.dtsi                     | 2 +-
 arch/arm/dts/armada-38x.dtsi                     | 2 +-
 arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 2 +-
 drivers/mtd/nand/raw/pxa3xx_nand.c               | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/dts/armada-370-xp.dtsi +1 -1
index 50fc0be9f73b..4cd168c95784 100644
@@ -246,7 +246,7 @@
                        };
 
                        nand@d0000 {
-                               compatible = "marvell,armada370-nand";
+                               compatible = "marvell,armada370-nand-controller";
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <1>;
arch/arm/dts/armada-375.dtsi +1 -1
index ff0ad7a9c7fd..fcb9245fd496 100644
@@ -541,7 +541,7 @@
                        };
 
                        nand@d0000 {
-                               compatible = "marvell,armada370-nand";
+                               compatible = "marvell,armada370-nand-controller";
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <1>;
arch/arm/dts/armada-38x.dtsi +1 -1
index 061bd7852081..6979c0c50584 100644
@@ -555,7 +555,7 @@
                        };
 
                        nand_controller: nand-controller@d0000 {
-                               compatible = "marvell,armada370-nand","marvell,mvebu-pxa3xx-nand";
+                               compatible = "marvell,armada370-nand-controller";
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <0>;
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +1 -1
index 90cad85506d0..fdbe168a8734 100644
@@ -5,7 +5,7 @@
 };
 
 &nand_controller {
-       compatible="marvell,mvebu-pxa3xx-nand";
+       compatible="marvell,armada370-nand-controller";
        status = "okay";
        label = "pxa3xx_nand-0";
        nand-rb = <0>;
drivers/mtd/nand/raw/pxa3xx_nand.c +0 -0
index 20d1aee7b3e1..9c29e8a6c214 100644
@@ -429,7 +429,7 @@ static struct nand_ecclayout ecc_layout_8KB_bch8bit = {
 
Quoted 10 lines

drivers/mtd/nand/raw/pxa3xx_nand.c static struct nand_ecclayout ecc_layout_8KB_bch8bit = {

Quoted 8 lines
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -2
 static const struct udevice_id pxa3xx_nand_dt_ids[] = {
        {
-               .compatible = "marvell,mvebu-pxa3xx-nand",
+               .compatible = "marvell,armada370-nand-controller",
                .data = PXA3XX_NAND_VARIANT_ARMADA370,
        },
        {
--

I prefer that adding compatible go in a different patch

Hello! All this are fixes for Armada DTS files, so I put it into series which updates Armada 38x DTS files. But to do not introduce a build or runtime error, it is needed to fix compatible string also in pxa3xx_nand driver in the same patch. Meaning, it has to be atomic change.

Quoted 5 lines

Michael

Quoted 2 lines

2.20.1

#12 lore raw

Hi

Il mer 27 lug 2022, 20:40 Pali Rohár <[email protected]> ha scritto:

Quoted 98 lines · On Wednesday 27 July 2022 14:55:51 Michael Nazzareno Trimarchi wrote:
Quoted 5 lines

Hi Pali

Quoted 2 lines · Pali Rohár

Linux kernel uses compatible string

"marvell,armada370-nand-controller" for

Quoted 14 lines
Quoted 14 lines

nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand".

So unify it and use just Linux kernel compatible string.

---
 arch/arm/dts/armada-370-xp.dtsi                  | 2 +-
 arch/arm/dts/armada-375.dtsi                     | 2 +-
 arch/arm/dts/armada-38x.dtsi                     | 2 +-
 arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 2 +-
 drivers/mtd/nand/raw/pxa3xx_nand.c               | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/dts/armada-370-xp.dtsi

Quoted 9 lines

arch/arm/dts/armada-370-xp.dtsi line 249

Quoted 9 lines

index 50fc0be9f73b..4cd168c95784 100644

arch/arm/dts/armada-370-xp.dtsi +1 -1
@@ -246,7 +246,7 @@
                        };
 
                        nand@d0000 {
-                               compatible = "marvell,armada370-nand";
+                               compatible =

"marvell,armada370-nand-controller";

Quoted 4 lines

Review

Quoted 4 lines
arch/arm/dts/armada-370-xp.dtsi +0 -0
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <1>;
(quoted diff) +0 -0

b/arch/arm/dts/armada-375.dtsi

Quoted 9 lines

arch/arm/dts/armada-375.dtsi line 544

Quoted 9 lines

index ff0ad7a9c7fd..fcb9245fd496 100644

arch/arm/dts/armada-375.dtsi +1 -1
@@ -541,7 +541,7 @@
                        };
 
                        nand@d0000 {
-                               compatible = "marvell,armada370-nand";
+                               compatible =

"marvell,armada370-nand-controller";

Quoted 4 lines

Review

Quoted 4 lines
arch/arm/dts/armada-375.dtsi +0 -0
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <1>;
(quoted diff) +0 -0

b/arch/arm/dts/armada-38x.dtsi

Quoted 8 lines

arch/arm/dts/armada-38x.dtsi line 558

Quoted 8 lines

index 061bd7852081..6979c0c50584 100644

arch/arm/dts/armada-38x.dtsi +0 -1
@@ -555,7 +555,7 @@
                        };
 
                        nand_controller: nand-controller@d0000 {
-                               compatible =

"marvell,armada370-nand","marvell,mvebu-pxa3xx-nand";

Quoted 1 line

arch/arm/dts/armada-38x.dtsi line 558

Quoted 1 line
arch/arm/dts/armada-38x.dtsi +1 -0
+                               compatible =

"marvell,armada370-nand-controller";

Quoted 4 lines

Review

Quoted 4 lines
arch/arm/dts/armada-38x.dtsi +0 -0
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <0>;
(quoted diff) +0 -0

b/arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi

Quoted 6 lines
Quoted 6 lines

index 90cad85506d0..fdbe168a8734 100644

arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +0 -0
@@ -5,7 +5,7 @@
 };
 
Quoted 7 lines

Review

Quoted 7 lines
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +1 -1
 &nand_controller {
-       compatible="marvell,mvebu-pxa3xx-nand";
+       compatible="marvell,armada370-nand-controller";
        status = "okay";
        label = "pxa3xx_nand-0";
        nand-rb = <0>;
(quoted diff) +0 -0

b/drivers/mtd/nand/raw/pxa3xx_nand.c

Quoted 4 lines

drivers/mtd/nand/raw/pxa3xx_nand.c static struct nand_ecclayout

Quoted 4 lines

index 20d1aee7b3e1..9c29e8a6c214 100644

drivers/mtd/nand/raw/pxa3xx_nand.c +0 -0
@@ -429,7 +429,7 @@ static struct nand_ecclayout

ecc_layout_8KB_bch8bit = {

Quoted 10 lines
Quoted 9 lines
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -2
 static const struct udevice_id pxa3xx_nand_dt_ids[] = {
        {
-               .compatible = "marvell,mvebu-pxa3xx-nand",
+               .compatible = "marvell,armada370-nand-controller",
                .data = PXA3XX_NAND_VARIANT_ARMADA370,
        },
        {
--
Quoted 8 lines
Quoted 1 line

I prefer that adding compatible go in a different patch

Hello! All this are fixes for Armada DTS files, so I put it into series which updates Armada 38x DTS files. But to do not introduce a build or runtime error, it is needed to fix compatible string also in pxa3xx_nand driver in the same patch. Meaning, it has to be atomic change.

If you add the compatible before all the patches you don't break anything. Just queue before the others

Michael

Quoted 7 lines
Quoted 6 lines

Michael

Quoted 2 lines

2.20.1

#13 lore raw
Quoted 111 lines · On Wednesday 27 July 2022 20:41:51 Michael Nazzareno Trimarchi wrote:

Hi

Il mer 27 lug 2022, 20:40 Pali Rohár <[email protected]> ha scritto:

Quoted 98 lines · On Wednesday 27 July 2022 14:55:51 Michael Nazzareno Trimarchi wrote:
Quoted 5 lines

Hi Pali

Quoted 2 lines · Pali Rohár

Linux kernel uses compatible string

"marvell,armada370-nand-controller" for

Quoted 14 lines
Quoted 14 lines

nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand".

So unify it and use just Linux kernel compatible string.

---
 arch/arm/dts/armada-370-xp.dtsi                  | 2 +-
 arch/arm/dts/armada-375.dtsi                     | 2 +-
 arch/arm/dts/armada-38x.dtsi                     | 2 +-
 arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 2 +-
 drivers/mtd/nand/raw/pxa3xx_nand.c               | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/dts/armada-370-xp.dtsi

Quoted 9 lines

arch/arm/dts/armada-370-xp.dtsi line 249

Quoted 9 lines

index 50fc0be9f73b..4cd168c95784 100644

arch/arm/dts/armada-370-xp.dtsi +1 -1
@@ -246,7 +246,7 @@
                        };
 
                        nand@d0000 {
-                               compatible = "marvell,armada370-nand";
+                               compatible =

"marvell,armada370-nand-controller";

Quoted 4 lines

Review

Quoted 4 lines
arch/arm/dts/armada-370-xp.dtsi +0 -0
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <1>;
(quoted diff) +0 -0

b/arch/arm/dts/armada-375.dtsi

Quoted 9 lines

arch/arm/dts/armada-375.dtsi line 544

Quoted 9 lines

index ff0ad7a9c7fd..fcb9245fd496 100644

arch/arm/dts/armada-375.dtsi +1 -1
@@ -541,7 +541,7 @@
                        };
 
                        nand@d0000 {
-                               compatible = "marvell,armada370-nand";
+                               compatible =

"marvell,armada370-nand-controller";

Quoted 4 lines

Review

Quoted 4 lines
arch/arm/dts/armada-375.dtsi +0 -0
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <1>;
(quoted diff) +0 -0

b/arch/arm/dts/armada-38x.dtsi

Quoted 8 lines

arch/arm/dts/armada-38x.dtsi line 558

Quoted 8 lines

index 061bd7852081..6979c0c50584 100644

arch/arm/dts/armada-38x.dtsi +0 -1
@@ -555,7 +555,7 @@
                        };
 
                        nand_controller: nand-controller@d0000 {
-                               compatible =

"marvell,armada370-nand","marvell,mvebu-pxa3xx-nand";

Quoted 1 line

arch/arm/dts/armada-38x.dtsi line 558

Quoted 1 line
arch/arm/dts/armada-38x.dtsi +1 -0
+                               compatible =

"marvell,armada370-nand-controller";

Quoted 4 lines

Review

Quoted 4 lines
arch/arm/dts/armada-38x.dtsi +0 -0
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <0>;
(quoted diff) +0 -0

b/arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi

Quoted 6 lines
Quoted 6 lines

index 90cad85506d0..fdbe168a8734 100644

arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +0 -0
@@ -5,7 +5,7 @@
 };
 
Quoted 7 lines

Review

Quoted 7 lines
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +1 -1
 &nand_controller {
-       compatible="marvell,mvebu-pxa3xx-nand";
+       compatible="marvell,armada370-nand-controller";
        status = "okay";
        label = "pxa3xx_nand-0";
        nand-rb = <0>;
(quoted diff) +0 -0

b/drivers/mtd/nand/raw/pxa3xx_nand.c

Quoted 4 lines

drivers/mtd/nand/raw/pxa3xx_nand.c static struct nand_ecclayout

Quoted 4 lines

index 20d1aee7b3e1..9c29e8a6c214 100644

drivers/mtd/nand/raw/pxa3xx_nand.c +0 -0
@@ -429,7 +429,7 @@ static struct nand_ecclayout

ecc_layout_8KB_bch8bit = {

Quoted 10 lines
Quoted 9 lines
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -2
 static const struct udevice_id pxa3xx_nand_dt_ids[] = {
        {
-               .compatible = "marvell,mvebu-pxa3xx-nand",
+               .compatible = "marvell,armada370-nand-controller",
                .data = PXA3XX_NAND_VARIANT_ARMADA370,
        },
        {
--
Quoted 8 lines
Quoted 1 line

I prefer that adding compatible go in a different patch

Hello! All this are fixes for Armada DTS files, so I put it into series which updates Armada 38x DTS files. But to do not introduce a build or runtime error, it is needed to fix compatible string also in pxa3xx_nand driver in the same patch. Meaning, it has to be atomic change.

Quoted 2 lines

If you add the compatible before all the patches you don't break anything. Just queue before the others

The issue is that this change does not add compatible. It replaces existing compatible by the correct one.

Quoted 9 lines

Michael

Quoted 7 lines
Quoted 6 lines

Michael

Quoted 2 lines

2.20.1

#14 lore raw

Hi

Il mer 27 lug 2022, 20:43 Pali Rohár <[email protected]> ha scritto:

Quoted 114 lines · On Wednesday 27 July 2022 20:41:51 Michael Nazzareno Trimarchi wrote:
Quoted 27 lines

Hi

Il mer 27 lug 2022, 20:40 Pali Rohár <[email protected]> ha scritto:

Quoted 23 lines · On Wednesday 27 July 2022 14:55:51 Michael Nazzareno Trimarchi wrote:
Quoted 5 lines

Hi Pali

Quoted 2 lines · Pali Rohár

Linux kernel uses compatible string

"marvell,armada370-nand-controller" for

Quoted 14 lines
Quoted 14 lines

nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand".

So unify it and use just Linux kernel compatible string.

---
 arch/arm/dts/armada-370-xp.dtsi                  | 2 +-
 arch/arm/dts/armada-375.dtsi                     | 2 +-
 arch/arm/dts/armada-38x.dtsi                     | 2 +-
 arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 2 +-
 drivers/mtd/nand/raw/pxa3xx_nand.c               | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/dts/armada-370-xp.dtsi

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

arch/arm/dts/armada-370-xp.dtsi line 249

Quoted 8 lines

index 50fc0be9f73b..4cd168c95784 100644

arch/arm/dts/armada-370-xp.dtsi +0 -1
@@ -246,7 +246,7 @@
                        };
 
                        nand@d0000 {
-                               compatible =

"marvell,armada370-nand";

Quoted 7 lines
Quoted 7 lines
Quoted 1 line

arch/arm/dts/armada-370-xp.dtsi line 249

Quoted 1 line
arch/arm/dts/armada-370-xp.dtsi +1 -0
+                               compatible =

"marvell,armada370-nand-controller";

Quoted 4 lines

Review

Quoted 4 lines
arch/arm/dts/armada-370-xp.dtsi +0 -0
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <1>;
(quoted diff) +0 -0

b/arch/arm/dts/armada-375.dtsi

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

arch/arm/dts/armada-375.dtsi line 544

Quoted 8 lines

index ff0ad7a9c7fd..fcb9245fd496 100644

arch/arm/dts/armada-375.dtsi +0 -1
@@ -541,7 +541,7 @@
                        };
 
                        nand@d0000 {
-                               compatible =

"marvell,armada370-nand";

Quoted 61 lines
Quoted 60 lines
Quoted 1 line

arch/arm/dts/armada-375.dtsi line 544

Quoted 1 line
arch/arm/dts/armada-375.dtsi +1 -0
+                               compatible =

"marvell,armada370-nand-controller";

Quoted 4 lines

Review

Quoted 4 lines
arch/arm/dts/armada-375.dtsi +0 -0
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <1>;
(quoted diff) +0 -0

b/arch/arm/dts/armada-38x.dtsi

Quoted 8 lines

arch/arm/dts/armada-38x.dtsi line 558

Quoted 8 lines

index 061bd7852081..6979c0c50584 100644

arch/arm/dts/armada-38x.dtsi +0 -1
@@ -555,7 +555,7 @@
                        };
 
                        nand_controller: nand-controller@d0000 {
-                               compatible =

"marvell,armada370-nand","marvell,mvebu-pxa3xx-nand";

Quoted 1 line

arch/arm/dts/armada-38x.dtsi line 558

Quoted 1 line
arch/arm/dts/armada-38x.dtsi +1 -0
+                               compatible =

"marvell,armada370-nand-controller";

Quoted 4 lines

Review

Quoted 4 lines
arch/arm/dts/armada-38x.dtsi +0 -0
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
                                #size-cells = <0>;
(quoted diff) +0 -0

b/arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi

Quoted 6 lines
Quoted 6 lines

index 90cad85506d0..fdbe168a8734 100644

arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +0 -0
@@ -5,7 +5,7 @@
 };
 
Quoted 7 lines

Review

Quoted 7 lines
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +1 -1
 &nand_controller {
-       compatible="marvell,mvebu-pxa3xx-nand";
+       compatible="marvell,armada370-nand-controller";
        status = "okay";
        label = "pxa3xx_nand-0";
        nand-rb = <0>;
(quoted diff) +0 -0

b/drivers/mtd/nand/raw/pxa3xx_nand.c

Quoted 4 lines

drivers/mtd/nand/raw/pxa3xx_nand.c static struct nand_ecclayout

Quoted 4 lines

index 20d1aee7b3e1..9c29e8a6c214 100644

drivers/mtd/nand/raw/pxa3xx_nand.c +0 -0
@@ -429,7 +429,7 @@ static struct nand_ecclayout

ecc_layout_8KB_bch8bit = {

Quoted 11 lines

drivers/mtd/nand/raw/pxa3xx_nand.c static struct nand_ecclayout ecc_layout_8KB_bch8bit = {

Quoted 9 lines
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -2
 static const struct udevice_id pxa3xx_nand_dt_ids[] = {
        {
-               .compatible = "marvell,mvebu-pxa3xx-nand",
+               .compatible = "marvell,armada370-nand-controller",
                .data = PXA3XX_NAND_VARIANT_ARMADA370,
        },
        {
--

I prefer that adding compatible go in a different patch

Hello! All this are fixes for Armada DTS files, so I put it into series which updates Armada 38x DTS files. But to do not introduce a build or runtime error, it is needed to fix compatible string also in pxa3xx_nand driver in the same patch. Meaning, it has to be atomic change.

Quoted 7 lines
Quoted 1 line

If you add the compatible before all the patches you don't break

anything.

Quoted 1 line

Just queue before the others

The issue is that this change does not add compatible. It replaces existing compatible by the correct one.

Yes, ok you are scared about not working more that not building.

Don't like to much but ok, your intention is clear.

Michael

Quoted 10 lines
Quoted 9 lines

Michael

Quoted 7 lines
Quoted 6 lines

Michael

Quoted 2 lines

2.20.1

#15 lore raw
In reply to Pali Rohár
Quoted 89 lines · Pali Rohár
Quoted 77 lines · On Wednesday 27 July 2022 14:55:51 Michael Nazzareno Trimarchi wrote:

Hi Pali

Quoted 74 lines · Pali Rohár

Linux kernel uses compatible string "marvell,armada370-nand-controller" for nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand".

So unify it and use just Linux kernel compatible string.

---
  arch/arm/dts/armada-370-xp.dtsi                  | 2 +-
  arch/arm/dts/armada-375.dtsi                     | 2 +-
  arch/arm/dts/armada-38x.dtsi                     | 2 +-
  arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 2 +-
  drivers/mtd/nand/raw/pxa3xx_nand.c               | 2 +-
  5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/dts/armada-370-xp.dtsi +1 -1
index 50fc0be9f73b..4cd168c95784 100644
@@ -246,7 +246,7 @@
                         };
 
                         nand@d0000 {
-                               compatible = "marvell,armada370-nand";
+                               compatible = "marvell,armada370-nand-controller";
                                 reg = <0xd0000 0x54>;
                                 #address-cells = <1>;
                                 #size-cells = <1>;
arch/arm/dts/armada-375.dtsi +1 -1
index ff0ad7a9c7fd..fcb9245fd496 100644
@@ -541,7 +541,7 @@
                         };
 
                         nand@d0000 {
-                               compatible = "marvell,armada370-nand";
+                               compatible = "marvell,armada370-nand-controller";
                                 reg = <0xd0000 0x54>;
                                 #address-cells = <1>;
                                 #size-cells = <1>;
arch/arm/dts/armada-38x.dtsi +1 -1
index 061bd7852081..6979c0c50584 100644
@@ -555,7 +555,7 @@
                         };
 
                         nand_controller: nand-controller@d0000 {
-                               compatible = "marvell,armada370-nand","marvell,mvebu-pxa3xx-nand";
+                               compatible = "marvell,armada370-nand-controller";
                                 reg = <0xd0000 0x54>;
                                 #address-cells = <1>;
                                 #size-cells = <0>;
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +1 -1
index 90cad85506d0..fdbe168a8734 100644
@@ -5,7 +5,7 @@
  };
 
  &nand_controller {
-       compatible="marvell,mvebu-pxa3xx-nand";
+       compatible="marvell,armada370-nand-controller";
         status = "okay";
         label = "pxa3xx_nand-0";
         nand-rb = <0>;
drivers/mtd/nand/raw/pxa3xx_nand.c +0 -0
index 20d1aee7b3e1..9c29e8a6c214 100644
@@ -429,7 +429,7 @@ static struct nand_ecclayout ecc_layout_8KB_bch8bit = {
 
Quoted 10 lines

drivers/mtd/nand/raw/pxa3xx_nand.c static struct nand_ecclayout ecc_layout_8KB_bch8bit = {

Quoted 8 lines
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -2
  static const struct udevice_id pxa3xx_nand_dt_ids[] = {
         {
-               .compatible = "marvell,mvebu-pxa3xx-nand",
+               .compatible = "marvell,armada370-nand-controller",
                 .data = PXA3XX_NAND_VARIANT_ARMADA370,
         },
         {
--

I prefer that adding compatible go in a different patch

Quoted 5 lines

Hello! All this are fixes for Armada DTS files, so I put it into series which updates Armada 38x DTS files. But to do not introduce a build or runtime error, it is needed to fix compatible string also in pxa3xx_nand driver in the same patch. Meaning, it has to be atomic change.

I personally have no issues with this approach and frankly would have done it also in one atomic change.

Thanks,
Stefan

Reviewed-by on v1 1/4
#16 lore raw
In reply to Pali Rohár
Quoted 7 lines · Pali Rohár

Linux kernel uses compatible string "marvell,armada370-nand-controller" for nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand".

So unify it and use just Linux kernel compatible string.

Thanks,
Stefan

Quoted 65 lines
---
  arch/arm/dts/armada-370-xp.dtsi                  | 2 +-
  arch/arm/dts/armada-375.dtsi                     | 2 +-
  arch/arm/dts/armada-38x.dtsi                     | 2 +-
  arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 2 +-
  drivers/mtd/nand/raw/pxa3xx_nand.c               | 2 +-
  5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/dts/armada-370-xp.dtsi +1 -1
index 50fc0be9f73b..4cd168c95784 100644
@@ -246,7 +246,7 @@
  			};
 
  			nand@d0000 {
-				compatible = "marvell,armada370-nand";
+				compatible = "marvell,armada370-nand-controller";
  				reg = <0xd0000 0x54>;
  				#address-cells = <1>;
  				#size-cells = <1>;
arch/arm/dts/armada-375.dtsi +1 -1
index ff0ad7a9c7fd..fcb9245fd496 100644
@@ -541,7 +541,7 @@
  			};
 
  			nand@d0000 {
-				compatible = "marvell,armada370-nand";
+				compatible = "marvell,armada370-nand-controller";
  				reg = <0xd0000 0x54>;
  				#address-cells = <1>;
  				#size-cells = <1>;
arch/arm/dts/armada-38x.dtsi +1 -1
index 061bd7852081..6979c0c50584 100644
@@ -555,7 +555,7 @@
  			};
 
  			nand_controller: nand-controller@d0000 {
-				compatible = "marvell,armada370-nand","marvell,mvebu-pxa3xx-nand";
+				compatible = "marvell,armada370-nand-controller";
  				reg = <0xd0000 0x54>;
  				#address-cells = <1>;
  				#size-cells = <0>;
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +1 -1
index 90cad85506d0..fdbe168a8734 100644
@@ -5,7 +5,7 @@
  };
 
  &nand_controller {
-	compatible="marvell,mvebu-pxa3xx-nand";
+	compatible="marvell,armada370-nand-controller";
  	status = "okay";
  	label = "pxa3xx_nand-0";
  	nand-rb = <0>;
drivers/mtd/nand/raw/pxa3xx_nand.c +0 -0
index 20d1aee7b3e1..9c29e8a6c214 100644

drivers/mtd/nand/raw/pxa3xx_nand.c static struct nand_ecclayout ecc_layout_8KB_bch8bit = { · line 435

Quoted 8 lines
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -1
@@ -429,7 +429,7 @@ static struct nand_ecclayout ecc_layout_8KB_bch8bit = {
 
  static const struct udevice_id pxa3xx_nand_dt_ids[] = {
  	{
-		.compatible = "marvell,mvebu-pxa3xx-nand",
+		.compatible = "marvell,armada370-nand-controller",
  		.data = PXA3XX_NAND_VARIANT_ARMADA370,
  	},
  	{

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Reviewed-by on v1 2/4
#2 lore raw

Re: [PATCH 2/4] arm: mvebu: Synchronize armada-38x.dtsi with Linux v5.20

In reply to Pali Rohár
Quoted 7 lines · Pali Rohár

* Replace skeleton.dtsi by explicit #address-cells / #size-cells
* Add sdramc@1400 and phy@18300 nodes
* Remove (unused) timeout-ms i2c properties
* Fix compatible string for UARTs
* Add interrupts properties for watchdog

Thanks,
Stefan

Quoted 115 lines
---
  arch/arm/dts/armada-38x.dtsi | 55 ++++++++++++++++++++++++++++++++----
  1 file changed, 50 insertions(+), 5 deletions(-)
arch/arm/dts/armada-38x.dtsi +48 -5
index 6979c0c50584..7731a205698e 100644
@@ -9,13 +9,15 @@
   * Thomas Petazzoni <[email protected]>
   */
 
-#include "skeleton.dtsi"
  #include <dt-bindings/interrupt-controller/arm-gic.h>
  #include <dt-bindings/interrupt-controller/irq.h>
 
  #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
 
  / {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
  	model = "Marvell Armada 38x family SoC";
  	compatible = "marvell,armada380";
 
@@ -103,6 +105,11 @@
  			#size-cells = <1>;
  			ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;
 
+			sdramc: sdramc@1400 {
+				compatible = "marvell,armada-xp-sdram-controller";
+				reg = <0x1400 0x500>;
+			};
+
  			L2: cache-controller@8000 {
  				compatible = "arm,pl310-cache";
  				reg = <0x8000 0x1000>;
@@ -148,7 +155,6 @@
  				#address-cells = <1>;
  				#size-cells = <0>;
  				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-				timeout-ms = <1000>;
  				clocks = <&coreclk 0>;
  				status = "disabled";
  			};
@@ -159,13 +165,12 @@
  				#address-cells = <1>;
  				#size-cells = <0>;
  				interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
-				timeout-ms = <1000>;
  				clocks = <&coreclk 0>;
  				status = "disabled";
  			};
 
  			uart0: serial@12000 {
-				compatible = "snps,dw-apb-uart";
+				compatible = "marvell,armada-38x-uart", "ns16550a";
  				reg = <0x12000 0x100>;
  				reg-shift = <2>;
  				interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
@@ -175,7 +180,7 @@
  			};
 
  			uart1: serial@12100 {
-				compatible = "snps,dw-apb-uart";
+				compatible = "marvell,armada-38x-uart", "ns16550a";
  				reg = <0x12100 0x100>;
  				reg-shift = <2>;
  				interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
@@ -338,6 +343,44 @@
  				#clock-cells = <1>;
  			};
 
+			comphy: phy@18300 {
+				compatible = "marvell,armada-380-comphy";
+				reg-names = "comphy", "conf";
+				reg = <0x18300 0x100>, <0x18460 4>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				comphy0: phy@0 {
+					reg = <0>;
+					#phy-cells = <1>;
+				};
+
+				comphy1: phy@1 {
+					reg = <1>;
+					#phy-cells = <1>;
+				};
+
+				comphy2: phy@2 {
+					reg = <2>;
+					#phy-cells = <1>;
+				};
+
+				comphy3: phy@3 {
+					reg = <3>;
+					#phy-cells = <1>;
+				};
+
+				comphy4: phy@4 {
+					reg = <4>;
+					#phy-cells = <1>;
+				};
+
+				comphy5: phy@5 {
+					reg = <5>;
+					#phy-cells = <1>;
+				};
+			};
+
  			coreclk: mvebu-sar@18600 {
  				compatible = "marvell,armada-380-core-clock";
  				reg = <0x18600 0x04>;

arch/arm/dts/armada-38x.dtsi line 429

Quoted 8 lines
arch/arm/dts/armada-38x.dtsi +2 -0
@@ -379,6 +422,8 @@
  				reg = <0x20300 0x34>, <0x20704 0x4>, <0x18260 0x4>;
  				clocks = <&coreclk 2>, <&refclk>;
  				clock-names = "nbclk", "fixed";
+				interrupts-extended = <&gic GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
+						      <&gic GIC_SPI  9 IRQ_TYPE_LEVEL_HIGH>;
  			};
 
  			cpurst: cpurst@20800 {

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Reviewed-by on v1 3/4
#5 lore raw

Re: [PATCH 3/4] arm: mvebu: Synchronize armada-385.dtsi with Linux v5.20

In reply to Pali Rohár
Quoted 3 lines · Pali Rohár

* Define PCIe interrupts

Thanks,
Stefan

Quoted 114 lines
---
  arch/arm/dts/armada-385.dtsi | 52 ++++++++++++++++++++++++++++++------
  1 file changed, 44 insertions(+), 8 deletions(-)
arch/arm/dts/armada-385.dtsi +40 -8
index 581a7d9beac3..48072fc7fd4a 100644
@@ -69,17 +69,26 @@
  				reg = <0x0800 0 0 0 0>;
  				#address-cells = <3>;
  				#size-cells = <2>;
+				interrupt-names = "intx";
+				interrupts-extended = <&gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
  				#interrupt-cells = <1>;
  				ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
  					  0x81000000 0 0 0x81000000 0x1 0 1 0>;
  				bus-range = <0x00 0xff>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0 0 0 7>;
+				interrupt-map = <0 0 0 1 &pcie1_intc 0>,
+						<0 0 0 2 &pcie1_intc 1>,
+						<0 0 0 3 &pcie1_intc 2>,
+						<0 0 0 4 &pcie1_intc 3>;
  				marvell,pcie-port = <0>;
  				marvell,pcie-lane = <0>;
  				clocks = <&gateclk 8>;
  				resets = <&systemc 0 0>;
  				status = "disabled";
+				pcie1_intc: interrupt-controller {
+					interrupt-controller;
+					#interrupt-cells = <1>;
+				};
  			};
 
  			/* x1 port */
@@ -89,17 +98,26 @@
  				reg = <0x1000 0 0 0 0>;
  				#address-cells = <3>;
  				#size-cells = <2>;
+				interrupt-names = "intx";
+				interrupts-extended = <&gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
  				#interrupt-cells = <1>;
  				ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
  					  0x81000000 0 0 0x81000000 0x2 0 1 0>;
  				bus-range = <0x00 0xff>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0 0 0 7>;
+				interrupt-map = <0 0 0 1 &pcie2_intc 0>,
+						<0 0 0 2 &pcie2_intc 1>,
+						<0 0 0 3 &pcie2_intc 2>,
+						<0 0 0 4 &pcie2_intc 3>;
  				marvell,pcie-port = <1>;
  				marvell,pcie-lane = <0>;
  				clocks = <&gateclk 5>;
  				resets = <&systemc 0 1>;
  				status = "disabled";
+				pcie2_intc: interrupt-controller {
+					interrupt-controller;
+					#interrupt-cells = <1>;
+				};
  			};
 
  			/* x1 port */
@@ -109,17 +127,26 @@
  				reg = <0x1800 0 0 0 0>;
  				#address-cells = <3>;
  				#size-cells = <2>;
+				interrupt-names = "intx";
+				interrupts-extended = <&gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
  				#interrupt-cells = <1>;
  				ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0
  					  0x81000000 0 0 0x81000000 0x3 0 1 0>;
  				bus-range = <0x00 0xff>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0 0 0 7>;
+				interrupt-map = <0 0 0 1 &pcie3_intc 0>,
+						<0 0 0 2 &pcie3_intc 1>,
+						<0 0 0 3 &pcie3_intc 2>,
+						<0 0 0 4 &pcie3_intc 3>;
  				marvell,pcie-port = <2>;
  				marvell,pcie-lane = <0>;
  				clocks = <&gateclk 6>;
  				resets = <&systemc 0 2>;
  				status = "disabled";
+				pcie3_intc: interrupt-controller {
+					interrupt-controller;
+					#interrupt-cells = <1>;
+				};
  			};
 
  			/*
@@ -132,17 +159,26 @@
  				reg = <0x2000 0 0 0 0>;
  				#address-cells = <3>;
  				#size-cells = <2>;
+				interrupt-names = "intx";
+				interrupts-extended = <&gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
  				#interrupt-cells = <1>;
  				ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0
  					  0x81000000 0 0 0x81000000 0x4 0 1 0>;
  				bus-range = <0x00 0xff>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0 0 0 7>;
+				interrupt-map = <0 0 0 1 &pcie4_intc 0>,
+						<0 0 0 2 &pcie4_intc 1>,
+						<0 0 0 3 &pcie4_intc 2>,
+						<0 0 0 4 &pcie4_intc 3>;
  				marvell,pcie-port = <3>;
  				marvell,pcie-lane = <0>;

arch/arm/dts/armada-385.dtsi line 184

Quoted 10 lines
arch/arm/dts/armada-385.dtsi +4 -0
  				clocks = <&gateclk 7>;
  				resets = <&systemc 0 3>;
  				status = "disabled";
+				pcie4_intc: interrupt-controller {
+					interrupt-controller;
+					#interrupt-cells = <1>;
+				};
  			};
  		};
  	};

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Reviewed-by on v1 4/4
#8 lore raw

Re: [PATCH 4/4] arm: mvebu: Synchronize armada-385-turris-omnia with Linux v5.20

In reply to Pali Rohár
Quoted 6 lines · Pali Rohár

* Add SPDX-License-Identifier
* Add SFP and LED nodes
* Fix PHY nad NOR nodes
* Remove duplicates from u-boot.dtsi file

Thanks,
Stefan

Quoted 385 lines
---
  .../dts/armada-385-turris-omnia-u-boot.dtsi   |   5 +-
  arch/arm/dts/armada-385-turris-omnia.dts      | 228 ++++++++++++++----
  2 files changed, 183 insertions(+), 50 deletions(-)
arch/arm/dts/armada-385-turris-omnia-u-boot.dtsi +1 -4
index 5a22cc64a1a5..ec12298fd40c 100644
@@ -28,11 +28,8 @@
  		i2c@5 {
  			u-boot,dm-pre-reloc;
 
-			/* ATSHA204A at address 0x64 */
  			crypto@64 {
  				u-boot,dm-pre-reloc;
-				compatible = "atmel,atsha204a";
-				reg = <0x64>;
  			};
  		};
  	};
@@ -42,7 +39,7 @@
  &spi0 {
  	u-boot,dm-pre-reloc;
 
-	spi-nor@0 {
+	flash@0 {
  		u-boot,dm-pre-reloc;
 
  		partitions {
arch/arm/dts/armada-385-turris-omnia.dts +181 -45
index fe5c0b1b5915..e213c64dca4f 100644
@@ -1,43 +1,10 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
  /*
   * Device Tree file for the Turris Omnia
   *
   * Copyright (C) 2016 Uwe Kleine-König <[email protected]>
   * Copyright (C) 2016 Tomas Hlavacek <[email protected]>
   *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is licensed under the terms of the GNU General Public
- *     License version 2.  This program is licensed "as is" without
- *     any warranty of any kind, whether express or implied.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
   * Schematic available at https://www.turris.cz/doc/_media/rtrom01-schema.pdf
   */
 
@@ -45,6 +12,7 @@
 
  #include <dt-bindings/gpio/gpio.h>
  #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
  #include "armada-385.dtsi"
 
  / {
@@ -70,7 +38,8 @@
  		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
  			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
  			  MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
-			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>;
+			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
+			  MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
 
  		internal-regs {
 
@@ -108,19 +77,48 @@
  			pcie@1,0 {
  				/* Port 0, Lane 0 */
  				status = "okay";
+				slot-power-limit-milliwatt = <10000>;
  			};
 
  			pcie@2,0 {
  				/* Port 1, Lane 0 */
  				status = "okay";
+				slot-power-limit-milliwatt = <10000>;
  			};
 
  			pcie@3,0 {
  				/* Port 2, Lane 0 */
  				status = "okay";
+				slot-power-limit-milliwatt = <10000>;
  			};
  		};
  	};
+
+	sfp: sfp {
+		compatible = "sff,sfp";
+		i2c-bus = <&sfp_i2c>;
+		tx-fault-gpios = <&pcawan 0 GPIO_ACTIVE_HIGH>;
+		tx-disable-gpios = <&pcawan 1 GPIO_ACTIVE_HIGH>;
+		rate-select0-gpios = <&pcawan 2 GPIO_ACTIVE_HIGH>;
+		los-gpios = <&pcawan 3 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpios = <&pcawan 4 GPIO_ACTIVE_LOW>;
+		maximum-power-milliwatt = <3000>;
+
+		/*
+		 * For now this has to be enabled at boot time by U-Boot when
+		 * a SFP module is present. Read more in the comment in the
+		 * eth2 node below.
+		 */
+		status = "disabled";
+	};
+};
+
+&bm {
+	status = "okay";
+};
+
+&bm_bppi {
+	status = "okay";
  };
 
  /* Connected to 88E6176 switch, port 6 */
@@ -129,6 +127,9 @@
  	pinctrl-0 = <&ge0_rgmii_pins>;
  	status = "okay";
  	phy-mode = "rgmii";
+	buffer-manager = <&bm>;
+	bm,pool-long = <0>;
+	bm,pool-short = <3>;
 
  	fixed-link {
  		speed = <1000>;
@@ -142,6 +143,9 @@
  	pinctrl-0 = <&ge1_rgmii_pins>;
  	status = "okay";
  	phy-mode = "rgmii";
+	buffer-manager = <&bm>;
+	bm,pool-long = <1>;
+	bm,pool-short = <3>;
 
  	fixed-link {
  		speed = <1000>;
@@ -151,9 +155,23 @@
 
  /* WAN port */
  &eth2 {
+	/*
+	 * eth2 is connected via a multiplexor to both the SFP cage and to
+	 * ethernet-phy@1. The multiplexor switches the signal to SFP cage when
+	 * a SFP module is present, as determined by the mode-def0 GPIO.
+	 *
+	 * Until kernel supports this configuration properly, in case SFP module
+	 * is present, U-Boot has to enable the sfp node above, remove phy
+	 * handle and add managed = "in-band-status" property.
+	 */
  	status = "okay";
  	phy-mode = "sgmii";
-	phy = <&phy1>;
+	phy-handle = <&phy1>;
+	phys = <&comphy5 2>;
+	sfp = <&sfp>;
+	buffer-manager = <&bm>;
+	bm,pool-long = <2>;
+	bm,pool-short = <3>;
  };
 
  &i2c0 {
@@ -166,7 +184,6 @@
  		#address-cells = <1>;
  		#size-cells = <0>;
  		reg = <0x70>;
-		status = "okay";
 
  		i2c@0 {
  			#address-cells = <1>;
@@ -180,10 +197,114 @@
  				gpio-controller;
  			};
 
-			/* leds device (in STM32F0) at address 0x2b */
+			led-controller@2b {
+				compatible = "cznic,turris-omnia-leds";
+				reg = <0x2b>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				status = "okay";
+
+				/*
+				 * LEDs are controlled by MCU (STM32F0) at
+				 * address 0x2b.
+				 *
+				 * LED functions are not stable yet:
+				 * - there are 3 LEDs connected via MCU to PCIe
+				 *   ports. One of these ports supports mSATA.
+				 *   There is no mSATA nor PCIe function.
+				 *   For now we use LED_FUNCTION_WLAN, since
+				 *   in most cases users have wifi cards in
+				 *   these slots
+				 * - there are 2 LEDs dedicated for user: A and
+				 *   B. Again there is no such function defined.
+				 *   For now we use LED_FUNCTION_INDICATOR
+				 */
+
+				multi-led@0 {
+					reg = <0x0>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_INDICATOR;
+					function-enumerator = <2>;
+				};
+
+				multi-led@1 {
+					reg = <0x1>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_INDICATOR;
+					function-enumerator = <1>;
+				};
+
+				multi-led@2 {
+					reg = <0x2>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_WLAN;
+					function-enumerator = <3>;
+				};
+
+				multi-led@3 {
+					reg = <0x3>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_WLAN;
+					function-enumerator = <2>;
+				};
+
+				multi-led@4 {
+					reg = <0x4>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_WLAN;
+					function-enumerator = <1>;
+				};
+
+				multi-led@5 {
+					reg = <0x5>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_WAN;
+				};
+
+				multi-led@6 {
+					reg = <0x6>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_LAN;
+					function-enumerator = <4>;
+				};
+
+				multi-led@7 {
+					reg = <0x7>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_LAN;
+					function-enumerator = <3>;
+				};
+
+				multi-led@8 {
+					reg = <0x8>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_LAN;
+					function-enumerator = <2>;
+				};
+
+				multi-led@9 {
+					reg = <0x9>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_LAN;
+					function-enumerator = <1>;
+				};
+
+				multi-led@a {
+					reg = <0xa>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_LAN;
+					function-enumerator = <0>;
+				};
+
+				multi-led@b {
+					reg = <0xb>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_POWER;
+				};
+			};
 
  			eeprom@54 {
-				compatible = "at,24c64";
+				compatible = "atmel,24c64";
  				reg = <0x54>;
 
  				/* The EEPROM contains data for bootloader.
@@ -222,7 +343,7 @@
  			/* routed to PCIe2 connector (CN62A) */
  		};
 
-		i2c@4 {
+		sfp_i2c: i2c@4 {
  			#address-cells = <1>;
  			#size-cells = <0>;
  			reg = <4>;
@@ -235,7 +356,11 @@
  			#size-cells = <0>;
  			reg = <5>;
 
-			/* ATSHA204A at address 0x64 */
+			/* ATSHA204A-MAHDA-T crypto module */
+			crypto@64 {
+				compatible = "atmel,atsha204a";
+				reg = <0x64>;
+			};
  		};
 
  		i2c@6 {
@@ -277,23 +402,29 @@
  	pinctrl-0 = <&mdio_pins>;
  	status = "okay";
 
-	phy1: phy@1 {
-		status = "okay";
-		compatible = "ethernet-phy-id0141.0DD1", "ethernet-phy-ieee802.3-c22";
+	phy1: ethernet-phy@1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
  		reg = <1>;
+		marvell,reg-init = <3 18 0 0x4985>,
+				   <3 16 0xfff0 0x0001>;
 
  		/* irq is connected to &pcawan pin 7 */
  	};
 
  	/* Switch MV88E6176 at address 0x10 */
  	switch@10 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&swint_pins>;
  		compatible = "marvell,mv88e6085";
  		#address-cells = <1>;
  		#size-cells = <0>;
-		dsa,member = <0 0>;
 
+		dsa,member = <0 0>;
  		reg = <0x10>;
 
+		interrupt-parent = <&gpio1>;
+		interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
+
  		ports {
  			#address-cells = <1>;
  			#size-cells = <0>;
@@ -346,6 +477,11 @@
  		marvell,function = "gpio";
  	};
 
+	swint_pins: swint-pins {
+		marvell,pins = "mpp45";
+		marvell,function = "gpio";
+	};
+
  	spi0cs0_pins: spi0cs0-pins {
  		marvell,pins = "mpp25";
  		marvell,function = "spi0";

arch/arm/dts/armada-385-turris-omnia.dts line 504

Quoted 8 lines
arch/arm/dts/armada-385-turris-omnia.dts +1 -1
@@ -362,7 +498,7 @@
  	pinctrl-0 = <&spi0_pins &spi0cs0_pins>;
  	status = "okay";
 
-	spi-nor@0 {
+	flash@0 {
  		compatible = "spansion,s25fl164k", "jedec,spi-nor";
  		#address-cells = <1>;
  		#size-cells = <1>;

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#17 lore raw
In reply to Stefan Roese

Hi

Quoted 6 lines · Stefan Roese
Quoted 4 lines · Pali Rohár

Linux kernel uses compatible string "marvell,armada370-nand-controller" for nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand".

Quoted 6 lines
Quoted 3 lines

So unify it and use just Linux kernel compatible string.

Michael

Quoted 84 lines

Thanks,
Stefan

Quoted 65 lines
---
  arch/arm/dts/armada-370-xp.dtsi                  | 2 +-
  arch/arm/dts/armada-375.dtsi                     | 2 +-
  arch/arm/dts/armada-38x.dtsi                     | 2 +-
  arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 2 +-
  drivers/mtd/nand/raw/pxa3xx_nand.c               | 2 +-
  5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/dts/armada-370-xp.dtsi +1 -1
index 50fc0be9f73b..4cd168c95784 100644
@@ -246,7 +246,7 @@
                      };
 
                      nand@d0000 {
-                             compatible = "marvell,armada370-nand";
+                             compatible = "marvell,armada370-nand-controller";
                              reg = <0xd0000 0x54>;
                              #address-cells = <1>;
                              #size-cells = <1>;
arch/arm/dts/armada-375.dtsi +1 -1
index ff0ad7a9c7fd..fcb9245fd496 100644
@@ -541,7 +541,7 @@
                      };
 
                      nand@d0000 {
-                             compatible = "marvell,armada370-nand";
+                             compatible = "marvell,armada370-nand-controller";
                              reg = <0xd0000 0x54>;
                              #address-cells = <1>;
                              #size-cells = <1>;
arch/arm/dts/armada-38x.dtsi +1 -1
index 061bd7852081..6979c0c50584 100644
@@ -555,7 +555,7 @@
                      };
 
                      nand_controller: nand-controller@d0000 {
-                             compatible = "marvell,armada370-nand","marvell,mvebu-pxa3xx-nand";
+                             compatible = "marvell,armada370-nand-controller";
                              reg = <0xd0000 0x54>;
                              #address-cells = <1>;
                              #size-cells = <0>;
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +1 -1
index 90cad85506d0..fdbe168a8734 100644
@@ -5,7 +5,7 @@
  };
 
  &nand_controller {
-     compatible="marvell,mvebu-pxa3xx-nand";
+     compatible="marvell,armada370-nand-controller";
      status = "okay";
      label = "pxa3xx_nand-0";
      nand-rb = <0>;
drivers/mtd/nand/raw/pxa3xx_nand.c +0 -0
index 20d1aee7b3e1..9c29e8a6c214 100644

drivers/mtd/nand/raw/pxa3xx_nand.c static struct nand_ecclayout ecc_layout_8KB_bch8bit = { · line 435

Quoted 8 lines
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -1
@@ -429,7 +429,7 @@ static struct nand_ecclayout ecc_layout_8KB_bch8bit = {
 
  static const struct udevice_id pxa3xx_nand_dt_ids[] = {
      {
-             .compatible = "marvell,mvebu-pxa3xx-nand",
+             .compatible = "marvell,armada370-nand-controller",
              .data = PXA3XX_NAND_VARIANT_ARMADA370,
      },
      {

Viele Grüße,
Stefan Roese

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]

Signature · 11 lines
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com
#18 lore raw

Hi Stefan

Quoted 10 lines · Michael Nazzareno Trimarchi

Hi

Quoted 6 lines · Stefan Roese
Quoted 4 lines · Pali Rohár

Linux kernel uses compatible string "marvell,armada370-nand-controller" for nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand".

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

So unify it and use just Linux kernel compatible string.

Are you going to queue them?

Michael

Quoted 101 lines

Michael

Quoted 80 lines

Thanks,
Stefan

Quoted 65 lines
---
  arch/arm/dts/armada-370-xp.dtsi                  | 2 +-
  arch/arm/dts/armada-375.dtsi                     | 2 +-
  arch/arm/dts/armada-38x.dtsi                     | 2 +-
  arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 2 +-
  drivers/mtd/nand/raw/pxa3xx_nand.c               | 2 +-
  5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/dts/armada-370-xp.dtsi +1 -1
index 50fc0be9f73b..4cd168c95784 100644
@@ -246,7 +246,7 @@
                      };
 
                      nand@d0000 {
-                             compatible = "marvell,armada370-nand";
+                             compatible = "marvell,armada370-nand-controller";
                              reg = <0xd0000 0x54>;
                              #address-cells = <1>;
                              #size-cells = <1>;
arch/arm/dts/armada-375.dtsi +1 -1
index ff0ad7a9c7fd..fcb9245fd496 100644
@@ -541,7 +541,7 @@
                      };
 
                      nand@d0000 {
-                             compatible = "marvell,armada370-nand";
+                             compatible = "marvell,armada370-nand-controller";
                              reg = <0xd0000 0x54>;
                              #address-cells = <1>;
                              #size-cells = <1>;
arch/arm/dts/armada-38x.dtsi +1 -1
index 061bd7852081..6979c0c50584 100644
@@ -555,7 +555,7 @@
                      };
 
                      nand_controller: nand-controller@d0000 {
-                             compatible = "marvell,armada370-nand","marvell,mvebu-pxa3xx-nand";
+                             compatible = "marvell,armada370-nand-controller";
                              reg = <0xd0000 0x54>;
                              #address-cells = <1>;
                              #size-cells = <0>;
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +1 -1
index 90cad85506d0..fdbe168a8734 100644
@@ -5,7 +5,7 @@
  };
 
  &nand_controller {
-     compatible="marvell,mvebu-pxa3xx-nand";
+     compatible="marvell,armada370-nand-controller";
      status = "okay";
      label = "pxa3xx_nand-0";
      nand-rb = <0>;
drivers/mtd/nand/raw/pxa3xx_nand.c +0 -0
index 20d1aee7b3e1..9c29e8a6c214 100644

drivers/mtd/nand/raw/pxa3xx_nand.c static struct nand_ecclayout ecc_layout_8KB_bch8bit = { · line 435

Quoted 8 lines
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -1
@@ -429,7 +429,7 @@ static struct nand_ecclayout ecc_layout_8KB_bch8bit = {
 
  static const struct udevice_id pxa3xx_nand_dt_ids[] = {
      {
-             .compatible = "marvell,mvebu-pxa3xx-nand",
+             .compatible = "marvell,armada370-nand-controller",
              .data = PXA3XX_NAND_VARIANT_ARMADA370,
      },
      {

Viele Grüße,
Stefan Roese

Quoted 4 lines

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]

--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com

Signature · 11 lines
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com
#19 lore raw
Quoted 18 lines · Michael Nazzareno Trimarchi

Hi Stefan

Quoted 14 lines · Michael Nazzareno Trimarchi

Hi

Quoted 10 lines · Stefan Roese
Quoted 7 lines · Pali Rohár

Linux kernel uses compatible string "marvell,armada370-nand-controller" for nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand".

So unify it and use just Linux kernel compatible string.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Are you going to queue them?

Yes. Is this okay with you?

Thanks,
Stefan

Quoted 106 lines

Michael

Quoted 101 lines

Michael

Quoted 80 lines

Thanks,
Stefan

Quoted 65 lines
---
   arch/arm/dts/armada-370-xp.dtsi                  | 2 +-
   arch/arm/dts/armada-375.dtsi                     | 2 +-
   arch/arm/dts/armada-38x.dtsi                     | 2 +-
   arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 2 +-
   drivers/mtd/nand/raw/pxa3xx_nand.c               | 2 +-
   5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/dts/armada-370-xp.dtsi +1 -1
index 50fc0be9f73b..4cd168c95784 100644
@@ -246,7 +246,7 @@
                       };
 
                       nand@d0000 {
-                             compatible = "marvell,armada370-nand";
+                             compatible = "marvell,armada370-nand-controller";
                               reg = <0xd0000 0x54>;
                               #address-cells = <1>;
                               #size-cells = <1>;
arch/arm/dts/armada-375.dtsi +1 -1
index ff0ad7a9c7fd..fcb9245fd496 100644
@@ -541,7 +541,7 @@
                       };
 
                       nand@d0000 {
-                             compatible = "marvell,armada370-nand";
+                             compatible = "marvell,armada370-nand-controller";
                               reg = <0xd0000 0x54>;
                               #address-cells = <1>;
                               #size-cells = <1>;
arch/arm/dts/armada-38x.dtsi +1 -1
index 061bd7852081..6979c0c50584 100644
@@ -555,7 +555,7 @@
                       };
 
                       nand_controller: nand-controller@d0000 {
-                             compatible = "marvell,armada370-nand","marvell,mvebu-pxa3xx-nand";
+                             compatible = "marvell,armada370-nand-controller";
                               reg = <0xd0000 0x54>;
                               #address-cells = <1>;
                               #size-cells = <0>;
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +1 -1
index 90cad85506d0..fdbe168a8734 100644
@@ -5,7 +5,7 @@
   };
 
   &nand_controller {
-     compatible="marvell,mvebu-pxa3xx-nand";
+     compatible="marvell,armada370-nand-controller";
       status = "okay";
       label = "pxa3xx_nand-0";
       nand-rb = <0>;
drivers/mtd/nand/raw/pxa3xx_nand.c +0 -0
index 20d1aee7b3e1..9c29e8a6c214 100644

drivers/mtd/nand/raw/pxa3xx_nand.c static struct nand_ecclayout ecc_layout_8KB_bch8bit = { · line 435

Quoted 8 lines
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -1
@@ -429,7 +429,7 @@ static struct nand_ecclayout ecc_layout_8KB_bch8bit = {
 
   static const struct udevice_id pxa3xx_nand_dt_ids[] = {
       {
-             .compatible = "marvell,mvebu-pxa3xx-nand",
+             .compatible = "marvell,armada370-nand-controller",
               .data = PXA3XX_NAND_VARIANT_ARMADA370,
       },
       {

Viele Grüße,
Stefan Roese

Quoted 4 lines

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]

--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#20 lore raw
In reply to Pali Rohár
Quoted 7 lines · Pali Rohár

Linux kernel uses compatible string "marvell,armada370-nand-controller" for nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand".

So unify it and use just Linux kernel compatible string.

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 65 lines
---
  arch/arm/dts/armada-370-xp.dtsi                  | 2 +-
  arch/arm/dts/armada-375.dtsi                     | 2 +-
  arch/arm/dts/armada-38x.dtsi                     | 2 +-
  arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 2 +-
  drivers/mtd/nand/raw/pxa3xx_nand.c               | 2 +-
  5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/dts/armada-370-xp.dtsi +1 -1
index 50fc0be9f73b..4cd168c95784 100644
@@ -246,7 +246,7 @@
  			};
 
  			nand@d0000 {
-				compatible = "marvell,armada370-nand";
+				compatible = "marvell,armada370-nand-controller";
  				reg = <0xd0000 0x54>;
  				#address-cells = <1>;
  				#size-cells = <1>;
arch/arm/dts/armada-375.dtsi +1 -1
index ff0ad7a9c7fd..fcb9245fd496 100644
@@ -541,7 +541,7 @@
  			};
 
  			nand@d0000 {
-				compatible = "marvell,armada370-nand";
+				compatible = "marvell,armada370-nand-controller";
  				reg = <0xd0000 0x54>;
  				#address-cells = <1>;
  				#size-cells = <1>;
arch/arm/dts/armada-38x.dtsi +1 -1
index 061bd7852081..6979c0c50584 100644
@@ -555,7 +555,7 @@
  			};
 
  			nand_controller: nand-controller@d0000 {
-				compatible = "marvell,armada370-nand","marvell,mvebu-pxa3xx-nand";
+				compatible = "marvell,armada370-nand-controller";
  				reg = <0xd0000 0x54>;
  				#address-cells = <1>;
  				#size-cells = <0>;
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +1 -1
index 90cad85506d0..fdbe168a8734 100644
@@ -5,7 +5,7 @@
  };
 
  &nand_controller {
-	compatible="marvell,mvebu-pxa3xx-nand";
+	compatible="marvell,armada370-nand-controller";
  	status = "okay";
  	label = "pxa3xx_nand-0";
  	nand-rb = <0>;
drivers/mtd/nand/raw/pxa3xx_nand.c +0 -0
index 20d1aee7b3e1..9c29e8a6c214 100644

drivers/mtd/nand/raw/pxa3xx_nand.c static struct nand_ecclayout ecc_layout_8KB_bch8bit = { · line 435

Quoted 8 lines
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -1
@@ -429,7 +429,7 @@ static struct nand_ecclayout ecc_layout_8KB_bch8bit = {
 
  static const struct udevice_id pxa3xx_nand_dt_ids[] = {
  	{
-		.compatible = "marvell,mvebu-pxa3xx-nand",
+		.compatible = "marvell,armada370-nand-controller",
  		.data = PXA3XX_NAND_VARIANT_ARMADA370,
  	},
  	{

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#6 lore raw

Re: [PATCH 3/4] arm: mvebu: Synchronize armada-385.dtsi with Linux v5.20

In reply to Pali Rohár
Quoted 3 lines · Pali Rohár

* Define PCIe interrupts

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 114 lines
---
  arch/arm/dts/armada-385.dtsi | 52 ++++++++++++++++++++++++++++++------
  1 file changed, 44 insertions(+), 8 deletions(-)
arch/arm/dts/armada-385.dtsi +40 -8
index 581a7d9beac3..48072fc7fd4a 100644
@@ -69,17 +69,26 @@
  				reg = <0x0800 0 0 0 0>;
  				#address-cells = <3>;
  				#size-cells = <2>;
+				interrupt-names = "intx";
+				interrupts-extended = <&gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
  				#interrupt-cells = <1>;
  				ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
  					  0x81000000 0 0 0x81000000 0x1 0 1 0>;
  				bus-range = <0x00 0xff>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0 0 0 7>;
+				interrupt-map = <0 0 0 1 &pcie1_intc 0>,
+						<0 0 0 2 &pcie1_intc 1>,
+						<0 0 0 3 &pcie1_intc 2>,
+						<0 0 0 4 &pcie1_intc 3>;
  				marvell,pcie-port = <0>;
  				marvell,pcie-lane = <0>;
  				clocks = <&gateclk 8>;
  				resets = <&systemc 0 0>;
  				status = "disabled";
+				pcie1_intc: interrupt-controller {
+					interrupt-controller;
+					#interrupt-cells = <1>;
+				};
  			};
 
  			/* x1 port */
@@ -89,17 +98,26 @@
  				reg = <0x1000 0 0 0 0>;
  				#address-cells = <3>;
  				#size-cells = <2>;
+				interrupt-names = "intx";
+				interrupts-extended = <&gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
  				#interrupt-cells = <1>;
  				ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
  					  0x81000000 0 0 0x81000000 0x2 0 1 0>;
  				bus-range = <0x00 0xff>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0 0 0 7>;
+				interrupt-map = <0 0 0 1 &pcie2_intc 0>,
+						<0 0 0 2 &pcie2_intc 1>,
+						<0 0 0 3 &pcie2_intc 2>,
+						<0 0 0 4 &pcie2_intc 3>;
  				marvell,pcie-port = <1>;
  				marvell,pcie-lane = <0>;
  				clocks = <&gateclk 5>;
  				resets = <&systemc 0 1>;
  				status = "disabled";
+				pcie2_intc: interrupt-controller {
+					interrupt-controller;
+					#interrupt-cells = <1>;
+				};
  			};
 
  			/* x1 port */
@@ -109,17 +127,26 @@
  				reg = <0x1800 0 0 0 0>;
  				#address-cells = <3>;
  				#size-cells = <2>;
+				interrupt-names = "intx";
+				interrupts-extended = <&gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
  				#interrupt-cells = <1>;
  				ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0
  					  0x81000000 0 0 0x81000000 0x3 0 1 0>;
  				bus-range = <0x00 0xff>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0 0 0 7>;
+				interrupt-map = <0 0 0 1 &pcie3_intc 0>,
+						<0 0 0 2 &pcie3_intc 1>,
+						<0 0 0 3 &pcie3_intc 2>,
+						<0 0 0 4 &pcie3_intc 3>;
  				marvell,pcie-port = <2>;
  				marvell,pcie-lane = <0>;
  				clocks = <&gateclk 6>;
  				resets = <&systemc 0 2>;
  				status = "disabled";
+				pcie3_intc: interrupt-controller {
+					interrupt-controller;
+					#interrupt-cells = <1>;
+				};
  			};
 
  			/*
@@ -132,17 +159,26 @@
  				reg = <0x2000 0 0 0 0>;
  				#address-cells = <3>;
  				#size-cells = <2>;
+				interrupt-names = "intx";
+				interrupts-extended = <&gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
  				#interrupt-cells = <1>;
  				ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0
  					  0x81000000 0 0 0x81000000 0x4 0 1 0>;
  				bus-range = <0x00 0xff>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0 0 0 7>;
+				interrupt-map = <0 0 0 1 &pcie4_intc 0>,
+						<0 0 0 2 &pcie4_intc 1>,
+						<0 0 0 3 &pcie4_intc 2>,
+						<0 0 0 4 &pcie4_intc 3>;
  				marvell,pcie-port = <3>;
  				marvell,pcie-lane = <0>;

arch/arm/dts/armada-385.dtsi line 184

Quoted 10 lines
arch/arm/dts/armada-385.dtsi +4 -0
  				clocks = <&gateclk 7>;
  				resets = <&systemc 0 3>;
  				status = "disabled";
+				pcie4_intc: interrupt-controller {
+					interrupt-controller;
+					#interrupt-cells = <1>;
+				};
  			};
  		};
  	};

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#3 lore raw

Re: [PATCH 2/4] arm: mvebu: Synchronize armada-38x.dtsi with Linux v5.20

In reply to Pali Rohár
Quoted 7 lines · Pali Rohár

* Replace skeleton.dtsi by explicit #address-cells / #size-cells
* Add sdramc@1400 and phy@18300 nodes
* Remove (unused) timeout-ms i2c properties
* Fix compatible string for UARTs
* Add interrupts properties for watchdog

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 115 lines
---
  arch/arm/dts/armada-38x.dtsi | 55 ++++++++++++++++++++++++++++++++----
  1 file changed, 50 insertions(+), 5 deletions(-)
arch/arm/dts/armada-38x.dtsi +48 -5
index 6979c0c50584..7731a205698e 100644
@@ -9,13 +9,15 @@
   * Thomas Petazzoni <[email protected]>
   */
 
-#include "skeleton.dtsi"
  #include <dt-bindings/interrupt-controller/arm-gic.h>
  #include <dt-bindings/interrupt-controller/irq.h>
 
  #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
 
  / {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
  	model = "Marvell Armada 38x family SoC";
  	compatible = "marvell,armada380";
 
@@ -103,6 +105,11 @@
  			#size-cells = <1>;
  			ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;
 
+			sdramc: sdramc@1400 {
+				compatible = "marvell,armada-xp-sdram-controller";
+				reg = <0x1400 0x500>;
+			};
+
  			L2: cache-controller@8000 {
  				compatible = "arm,pl310-cache";
  				reg = <0x8000 0x1000>;
@@ -148,7 +155,6 @@
  				#address-cells = <1>;
  				#size-cells = <0>;
  				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-				timeout-ms = <1000>;
  				clocks = <&coreclk 0>;
  				status = "disabled";
  			};
@@ -159,13 +165,12 @@
  				#address-cells = <1>;
  				#size-cells = <0>;
  				interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
-				timeout-ms = <1000>;
  				clocks = <&coreclk 0>;
  				status = "disabled";
  			};
 
  			uart0: serial@12000 {
-				compatible = "snps,dw-apb-uart";
+				compatible = "marvell,armada-38x-uart", "ns16550a";
  				reg = <0x12000 0x100>;
  				reg-shift = <2>;
  				interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
@@ -175,7 +180,7 @@
  			};
 
  			uart1: serial@12100 {
-				compatible = "snps,dw-apb-uart";
+				compatible = "marvell,armada-38x-uart", "ns16550a";
  				reg = <0x12100 0x100>;
  				reg-shift = <2>;
  				interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
@@ -338,6 +343,44 @@
  				#clock-cells = <1>;
  			};
 
+			comphy: phy@18300 {
+				compatible = "marvell,armada-380-comphy";
+				reg-names = "comphy", "conf";
+				reg = <0x18300 0x100>, <0x18460 4>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				comphy0: phy@0 {
+					reg = <0>;
+					#phy-cells = <1>;
+				};
+
+				comphy1: phy@1 {
+					reg = <1>;
+					#phy-cells = <1>;
+				};
+
+				comphy2: phy@2 {
+					reg = <2>;
+					#phy-cells = <1>;
+				};
+
+				comphy3: phy@3 {
+					reg = <3>;
+					#phy-cells = <1>;
+				};
+
+				comphy4: phy@4 {
+					reg = <4>;
+					#phy-cells = <1>;
+				};
+
+				comphy5: phy@5 {
+					reg = <5>;
+					#phy-cells = <1>;
+				};
+			};
+
  			coreclk: mvebu-sar@18600 {
  				compatible = "marvell,armada-380-core-clock";
  				reg = <0x18600 0x04>;

arch/arm/dts/armada-38x.dtsi line 429

Quoted 8 lines
arch/arm/dts/armada-38x.dtsi +2 -0
@@ -379,6 +422,8 @@
  				reg = <0x20300 0x34>, <0x20704 0x4>, <0x18260 0x4>;
  				clocks = <&coreclk 2>, <&refclk>;
  				clock-names = "nbclk", "fixed";
+				interrupts-extended = <&gic GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
+						      <&gic GIC_SPI  9 IRQ_TYPE_LEVEL_HIGH>;
  			};
 
  			cpurst: cpurst@20800 {

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#9 lore raw

Re: [PATCH 4/4] arm: mvebu: Synchronize armada-385-turris-omnia with Linux v5.20

In reply to Pali Rohár
Quoted 6 lines · Pali Rohár

* Add SPDX-License-Identifier
* Add SFP and LED nodes
* Fix PHY nad NOR nodes
* Remove duplicates from u-boot.dtsi file

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 385 lines
---
  .../dts/armada-385-turris-omnia-u-boot.dtsi   |   5 +-
  arch/arm/dts/armada-385-turris-omnia.dts      | 228 ++++++++++++++----
  2 files changed, 183 insertions(+), 50 deletions(-)
arch/arm/dts/armada-385-turris-omnia-u-boot.dtsi +1 -4
index 5a22cc64a1a5..ec12298fd40c 100644
@@ -28,11 +28,8 @@
  		i2c@5 {
  			u-boot,dm-pre-reloc;
 
-			/* ATSHA204A at address 0x64 */
  			crypto@64 {
  				u-boot,dm-pre-reloc;
-				compatible = "atmel,atsha204a";
-				reg = <0x64>;
  			};
  		};
  	};
@@ -42,7 +39,7 @@
  &spi0 {
  	u-boot,dm-pre-reloc;
 
-	spi-nor@0 {
+	flash@0 {
  		u-boot,dm-pre-reloc;
 
  		partitions {
arch/arm/dts/armada-385-turris-omnia.dts +181 -45
index fe5c0b1b5915..e213c64dca4f 100644
@@ -1,43 +1,10 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
  /*
   * Device Tree file for the Turris Omnia
   *
   * Copyright (C) 2016 Uwe Kleine-König <[email protected]>
   * Copyright (C) 2016 Tomas Hlavacek <[email protected]>
   *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is licensed under the terms of the GNU General Public
- *     License version 2.  This program is licensed "as is" without
- *     any warranty of any kind, whether express or implied.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
   * Schematic available at https://www.turris.cz/doc/_media/rtrom01-schema.pdf
   */
 
@@ -45,6 +12,7 @@
 
  #include <dt-bindings/gpio/gpio.h>
  #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
  #include "armada-385.dtsi"
 
  / {
@@ -70,7 +38,8 @@
  		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
  			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
  			  MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
-			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>;
+			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
+			  MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
 
  		internal-regs {
 
@@ -108,19 +77,48 @@
  			pcie@1,0 {
  				/* Port 0, Lane 0 */
  				status = "okay";
+				slot-power-limit-milliwatt = <10000>;
  			};
 
  			pcie@2,0 {
  				/* Port 1, Lane 0 */
  				status = "okay";
+				slot-power-limit-milliwatt = <10000>;
  			};
 
  			pcie@3,0 {
  				/* Port 2, Lane 0 */
  				status = "okay";
+				slot-power-limit-milliwatt = <10000>;
  			};
  		};
  	};
+
+	sfp: sfp {
+		compatible = "sff,sfp";
+		i2c-bus = <&sfp_i2c>;
+		tx-fault-gpios = <&pcawan 0 GPIO_ACTIVE_HIGH>;
+		tx-disable-gpios = <&pcawan 1 GPIO_ACTIVE_HIGH>;
+		rate-select0-gpios = <&pcawan 2 GPIO_ACTIVE_HIGH>;
+		los-gpios = <&pcawan 3 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpios = <&pcawan 4 GPIO_ACTIVE_LOW>;
+		maximum-power-milliwatt = <3000>;
+
+		/*
+		 * For now this has to be enabled at boot time by U-Boot when
+		 * a SFP module is present. Read more in the comment in the
+		 * eth2 node below.
+		 */
+		status = "disabled";
+	};
+};
+
+&bm {
+	status = "okay";
+};
+
+&bm_bppi {
+	status = "okay";
  };
 
  /* Connected to 88E6176 switch, port 6 */
@@ -129,6 +127,9 @@
  	pinctrl-0 = <&ge0_rgmii_pins>;
  	status = "okay";
  	phy-mode = "rgmii";
+	buffer-manager = <&bm>;
+	bm,pool-long = <0>;
+	bm,pool-short = <3>;
 
  	fixed-link {
  		speed = <1000>;
@@ -142,6 +143,9 @@
  	pinctrl-0 = <&ge1_rgmii_pins>;
  	status = "okay";
  	phy-mode = "rgmii";
+	buffer-manager = <&bm>;
+	bm,pool-long = <1>;
+	bm,pool-short = <3>;
 
  	fixed-link {
  		speed = <1000>;
@@ -151,9 +155,23 @@
 
  /* WAN port */
  &eth2 {
+	/*
+	 * eth2 is connected via a multiplexor to both the SFP cage and to
+	 * ethernet-phy@1. The multiplexor switches the signal to SFP cage when
+	 * a SFP module is present, as determined by the mode-def0 GPIO.
+	 *
+	 * Until kernel supports this configuration properly, in case SFP module
+	 * is present, U-Boot has to enable the sfp node above, remove phy
+	 * handle and add managed = "in-band-status" property.
+	 */
  	status = "okay";
  	phy-mode = "sgmii";
-	phy = <&phy1>;
+	phy-handle = <&phy1>;
+	phys = <&comphy5 2>;
+	sfp = <&sfp>;
+	buffer-manager = <&bm>;
+	bm,pool-long = <2>;
+	bm,pool-short = <3>;
  };
 
  &i2c0 {
@@ -166,7 +184,6 @@
  		#address-cells = <1>;
  		#size-cells = <0>;
  		reg = <0x70>;
-		status = "okay";
 
  		i2c@0 {
  			#address-cells = <1>;
@@ -180,10 +197,114 @@
  				gpio-controller;
  			};
 
-			/* leds device (in STM32F0) at address 0x2b */
+			led-controller@2b {
+				compatible = "cznic,turris-omnia-leds";
+				reg = <0x2b>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				status = "okay";
+
+				/*
+				 * LEDs are controlled by MCU (STM32F0) at
+				 * address 0x2b.
+				 *
+				 * LED functions are not stable yet:
+				 * - there are 3 LEDs connected via MCU to PCIe
+				 *   ports. One of these ports supports mSATA.
+				 *   There is no mSATA nor PCIe function.
+				 *   For now we use LED_FUNCTION_WLAN, since
+				 *   in most cases users have wifi cards in
+				 *   these slots
+				 * - there are 2 LEDs dedicated for user: A and
+				 *   B. Again there is no such function defined.
+				 *   For now we use LED_FUNCTION_INDICATOR
+				 */
+
+				multi-led@0 {
+					reg = <0x0>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_INDICATOR;
+					function-enumerator = <2>;
+				};
+
+				multi-led@1 {
+					reg = <0x1>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_INDICATOR;
+					function-enumerator = <1>;
+				};
+
+				multi-led@2 {
+					reg = <0x2>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_WLAN;
+					function-enumerator = <3>;
+				};
+
+				multi-led@3 {
+					reg = <0x3>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_WLAN;
+					function-enumerator = <2>;
+				};
+
+				multi-led@4 {
+					reg = <0x4>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_WLAN;
+					function-enumerator = <1>;
+				};
+
+				multi-led@5 {
+					reg = <0x5>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_WAN;
+				};
+
+				multi-led@6 {
+					reg = <0x6>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_LAN;
+					function-enumerator = <4>;
+				};
+
+				multi-led@7 {
+					reg = <0x7>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_LAN;
+					function-enumerator = <3>;
+				};
+
+				multi-led@8 {
+					reg = <0x8>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_LAN;
+					function-enumerator = <2>;
+				};
+
+				multi-led@9 {
+					reg = <0x9>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_LAN;
+					function-enumerator = <1>;
+				};
+
+				multi-led@a {
+					reg = <0xa>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_LAN;
+					function-enumerator = <0>;
+				};
+
+				multi-led@b {
+					reg = <0xb>;
+					color = <LED_COLOR_ID_RGB>;
+					function = LED_FUNCTION_POWER;
+				};
+			};
 
  			eeprom@54 {
-				compatible = "at,24c64";
+				compatible = "atmel,24c64";
  				reg = <0x54>;
 
  				/* The EEPROM contains data for bootloader.
@@ -222,7 +343,7 @@
  			/* routed to PCIe2 connector (CN62A) */
  		};
 
-		i2c@4 {
+		sfp_i2c: i2c@4 {
  			#address-cells = <1>;
  			#size-cells = <0>;
  			reg = <4>;
@@ -235,7 +356,11 @@
  			#size-cells = <0>;
  			reg = <5>;
 
-			/* ATSHA204A at address 0x64 */
+			/* ATSHA204A-MAHDA-T crypto module */
+			crypto@64 {
+				compatible = "atmel,atsha204a";
+				reg = <0x64>;
+			};
  		};
 
  		i2c@6 {
@@ -277,23 +402,29 @@
  	pinctrl-0 = <&mdio_pins>;
  	status = "okay";
 
-	phy1: phy@1 {
-		status = "okay";
-		compatible = "ethernet-phy-id0141.0DD1", "ethernet-phy-ieee802.3-c22";
+	phy1: ethernet-phy@1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
  		reg = <1>;
+		marvell,reg-init = <3 18 0 0x4985>,
+				   <3 16 0xfff0 0x0001>;
 
  		/* irq is connected to &pcawan pin 7 */
  	};
 
  	/* Switch MV88E6176 at address 0x10 */
  	switch@10 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&swint_pins>;
  		compatible = "marvell,mv88e6085";
  		#address-cells = <1>;
  		#size-cells = <0>;
-		dsa,member = <0 0>;
 
+		dsa,member = <0 0>;
  		reg = <0x10>;
 
+		interrupt-parent = <&gpio1>;
+		interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
+
  		ports {
  			#address-cells = <1>;
  			#size-cells = <0>;
@@ -346,6 +477,11 @@
  		marvell,function = "gpio";
  	};
 
+	swint_pins: swint-pins {
+		marvell,pins = "mpp45";
+		marvell,function = "gpio";
+	};
+
  	spi0cs0_pins: spi0cs0-pins {
  		marvell,pins = "mpp25";
  		marvell,function = "spi0";

arch/arm/dts/armada-385-turris-omnia.dts line 504

Quoted 8 lines
arch/arm/dts/armada-385-turris-omnia.dts +1 -1
@@ -362,7 +498,7 @@
  	pinctrl-0 = <&spi0_pins &spi0cs0_pins>;
  	status = "okay";
 
-	spi-nor@0 {
+	flash@0 {
  		compatible = "spansion,s25fl164k", "jedec,spi-nor";
  		#address-cells = <1>;
  		#size-cells = <1>;

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]