Skip to contentSkip to conversation

Update the Keymile kirkwood DTS files

PATCH New Valentin Longchamp 3 participants 8 messages May 16, 2014 Device tree bindings

lore
Share & tools
lore
#0 lore raw

v2 cover Update the Keymile kirkwood DTS files

This series resynchs the Keymile Kirkwood DTS files with mainline since the boards do not boot anymore with the 3.15 rc kernels (to be honest, I have not tested the last 2-3 releases).

The changes are the addition of the PCIe controller for the 98dx4122 SoC, the explicit disabling of the SATA phys for this same SoC and finally the enabling of the PCIe controller on the Keymile Reference design.

The series introduces kirkwood-km_common.dtsi that factors the common nodes between kirkwood-km_kirkwood.dts and the new board/design below.

The series also adds a new DTS for another Keymile generic design where the mv64xxx eth interace is configured with fixed parameters to no phy but a switch (for board internal communication).

The series applies and was tested on top of Jason's mvebu/dt branch (mvebu-dt-3.16 tag).

Changes in v2:
- introduce kirkwood-km_common.dtsi to allow factoring some nodes between boards
- Take advantage of the kirkwood-km_common.dtsi file for kirkwood-km_fixedeth.dts

Valentin Longchamp (3):
ARM: dts: kirkwood: resynch 98dx4122 dtsi
ARM: dts: kirkwood: add kirkwood-km_common DTSI files
ARM: dts: kirkwood: add kirkwood-km_fixedeth DTS file

 arch/arm/boot/dts/kirkwood-98dx4122.dtsi   | 43 ++++++++++++++++++++++++++
 arch/arm/boot/dts/kirkwood-km_common.dtsi  | 48 ++++++++++++++++++++++++++++++
 arch/arm/boot/dts/kirkwood-km_fixedeth.dts | 23 ++++++++++++++
 arch/arm/boot/dts/kirkwood-km_kirkwood.dts | 38 +----------------------
 4 files changed, 115 insertions(+), 37 deletions(-)
 create mode 100644 arch/arm/boot/dts/kirkwood-km_common.dtsi
 create mode 100644 arch/arm/boot/dts/kirkwood-km_fixedeth.dts
Signature · 1 line
1.8.0.1
#1 lore raw

PATCH v2 1/3 ARM: dts: kirkwood: resynch 98dx4122 dtsi

The 98DX4122 dtsi file lacks the defintion of the PCIe controller which is present on this SoC.

The SATA phys must also be explicitely disabled since they are not present on this SoC. If they remain enabled, a hardlock occures when their clock gates are enabled.

---

Changes in v2: None

 arch/arm/boot/dts/kirkwood-98dx4122.dtsi | 43 ++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
arch/arm/boot/dts/kirkwood-98dx4122.dtsi +43 -0
index 2e8e412..9e1f741 100644
@@ -1,4 +1,39 @@
 / {
+	mbus {
+		pciec: pcie-controller {
+			compatible = "marvell,kirkwood-pcie";
+			status = "disabled";
+			device_type = "pci";
+
+			#address-cells = <3>;
+			#size-cells = <2>;
+
+			bus-range = <0x00 0xff>;
+
+			ranges =
+			       <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000
+				0x82000000 0x1 0     MBUS_ID(0x04, 0xe8) 0       1 0 /* Port 0.0 MEM */
+				0x81000000 0x1 0     MBUS_ID(0x04, 0xe0) 0       1 0 /* Port 0.0 IO  */>;
+
+			pcie0: pcie at 1,0 {
+				device_type = "pci";
+				assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>;
+				reg = <0x0800 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				#interrupt-cells = <1>;
+				ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
+					  0x81000000 0 0 0x81000000 0x1 0 1 0>;
+				interrupt-map-mask = <0 0 0 0>;
+				interrupt-map = <0 0 0 0 &intc 9>;
+				marvell,pcie-port = <0>;
+				marvell,pcie-lane = <0>;
+				clocks = <&gate_clk 2>;
+				status = "disabled";
+			};
+		};
+	};
+
 	ocp at f1000000 {
 		pinctrl: pin-controller at 10000 {
 			compatible = "marvell,98dx4122-pinctrl";
@@ -6,3 +41,11 @@
 		};
 	};
 };
+
+&sata_phy0 {
+	status = "disabled";
+};
+
+&sata_phy1 {
+	status = "disabled";
+};
Signature · 1 line
1.8.0.1
#2 lore raw

PATCH v2 2/3 ARM: dts: kirkwood: add kirkwood-km_common DTSI files

In reply to Valentin Longchamp

This file allows to factor the common parts between the various Keymile Kirkwood Designs.

kirkwood-km_common configures the peripherals that are currently common to all our Kirkwood designs: PCIe, pinctrl, bitbang I2C, NAND Flash controller.

The kirkwood-km_kirkwood file is then changed to include this common file.

---

Changes in v2:
- introduce kirkwood-km_common.dtsi to allow factoring some nodes between boards

 arch/arm/boot/dts/kirkwood-km_common.dtsi  | 48 ++++++++++++++++++++++++++++++
 arch/arm/boot/dts/kirkwood-km_kirkwood.dts | 38 +----------------------
 2 files changed, 49 insertions(+), 37 deletions(-)
 create mode 100644 arch/arm/boot/dts/kirkwood-km_common.dtsi
arch/arm/boot/dts/kirkwood-km_common.dtsi new file +48 -0
new file mode 100644
index 0000000..b241135
@@ -0,0 +1,48 @@
+/ {
+	chosen {
+		bootargs = "console=ttyS0,115200n8 earlyprintk";
+		stdout-path = &uart0;
+	};
+
+	mbus {
+		pcie-controller {
+			status = "okay";
+
+			pcie at 1,0 {
+				status = "okay";
+			};
+		};
+	};
+
+	ocp at f1000000 {
+		pinctrl: pin-controller at 10000 {
+			pinctrl-0 = < &pmx_i2c_gpio_sda &pmx_i2c_gpio_scl >;
+			pinctrl-names = "default";
+
+			pmx_i2c_gpio_sda: pmx-gpio-sda {
+				marvell,pins = "mpp8";
+				marvell,function = "gpio";
+			};
+			pmx_i2c_gpio_scl: pmx-gpio-scl {
+				marvell,pins = "mpp9";
+				marvell,function = "gpio";
+			};
+		};
+
+		serial at 12000 {
+			status = "ok";
+		};
+	};
+
+	i2c at 0 {
+		compatible = "i2c-gpio";
+		gpios = < &gpio0 8 GPIO_ACTIVE_HIGH		/* sda */
+			  &gpio0 9 GPIO_ACTIVE_HIGH>;		/* scl */
+		i2c-gpio,delay-us = <2>;	/* ~100 kHz */
+	};
+};
+
+&nand {
+	status = "okay";
+	chip-delay = <25>;
+};
arch/arm/boot/dts/kirkwood-km_kirkwood.dts +1 -37
index 61139bf..235bf38 100644
@@ -2,6 +2,7 @@
 
 #include "kirkwood.dtsi"
 #include "kirkwood-98dx4122.dtsi"
+#include "kirkwood-km_common.dtsi"
 
 / {
 	model = "Keymile Kirkwood Reference Design";
@@ -11,43 +12,6 @@
 		device_type = "memory";
 		reg = <0x00000000 0x08000000>;
 	};
-
-	chosen {
-		bootargs = "console=ttyS0,115200n8 earlyprintk";
-		stdout-path = &uart0;
-	};
-
-	ocp at f1000000 {
-		pinctrl: pin-controller at 10000 {
-			pinctrl-0 = < &pmx_i2c_gpio_sda &pmx_i2c_gpio_scl >;
-			pinctrl-names = "default";
-
-			pmx_i2c_gpio_sda: pmx-gpio-sda {
-				marvell,pins = "mpp8";
-				marvell,function = "gpio";
-			};
-			pmx_i2c_gpio_scl: pmx-gpio-scl {
-				marvell,pins = "mpp9";
-				marvell,function = "gpio";
-			};
-		};
-
-		serial at 12000 {
-			status = "ok";
-		};
-	};
-
-	i2c at 0 {
-		compatible = "i2c-gpio";
-		gpios = < &gpio0 8 GPIO_ACTIVE_HIGH		/* sda */
-			  &gpio0 9 GPIO_ACTIVE_HIGH>;		/* scl */
-		i2c-gpio,delay-us = <2>;	/* ~100 kHz */
-	};
-};
-
-&nand {
-	status = "okay";
-	chip-delay = <25>;
 };
 
 &mdio {
Signature · 1 line
1.8.0.1
#3 lore raw

PATCH v2 2/3 ARM: dts: kirkwood: add kirkwood-km_common DTSI files

Quoted 52 lines · Valentin Longchamp

This file allows to factor the common parts between the various Keymile Kirkwood Designs.

kirkwood-km_common configures the peripherals that are currently common to all our Kirkwood designs: PCIe, pinctrl, bitbang I2C, NAND Flash controller.

The kirkwood-km_kirkwood file is then changed to include this common file.

---

Changes in v2:
- introduce kirkwood-km_common.dtsi to allow factoring some nodes between boards

 arch/arm/boot/dts/kirkwood-km_common.dtsi  | 48 ++++++++++++++++++++++++++++++
 arch/arm/boot/dts/kirkwood-km_kirkwood.dts | 38 +----------------------
 2 files changed, 49 insertions(+), 37 deletions(-)
 create mode 100644 arch/arm/boot/dts/kirkwood-km_common.dtsi
arch/arm/boot/dts/kirkwood-km_common.dtsi new file +23 -0
new file mode 100644
index 0000000..b241135
@@ -0,0 +1,48 @@
+/ {
+	chosen {
+		bootargs = "console=ttyS0,115200n8 earlyprintk";
+		stdout-path = &uart0;
+	};
+
+	mbus {
+		pcie-controller {
+			status = "okay";
+
+			pcie at 1,0 {
+				status = "okay";
+			};
+		};
+	};
+
+	ocp at f1000000 {
+		pinctrl: pin-controller at 10000 {
+			pinctrl-0 = < &pmx_i2c_gpio_sda &pmx_i2c_gpio_scl >;
+			pinctrl-names = "default";
+
+			pmx_i2c_gpio_sda: pmx-gpio-sda {
+				marvell,pins = "mpp8";

arch/arm/boot/dts/kirkwood-km_common.dtsi line 33

Quoted 10 lines
arch/arm/boot/dts/kirkwood-km_common.dtsi new file +10 -0
+				marvell,function = "gpio";
+			};
+			pmx_i2c_gpio_scl: pmx-gpio-scl {
+				marvell,pins = "mpp9";
+				marvell,function = "gpio";
+			};
+		};
+
+		serial at 12000 {
+			status = "ok";

nit: This should match the other status properties and use "okay".

Quoted 44 lines
arch/arm/boot/dts/kirkwood-km_common.dtsi new file +15 -0
+		};
+	};
+
+	i2c at 0 {
+		compatible = "i2c-gpio";
+		gpios = < &gpio0 8 GPIO_ACTIVE_HIGH		/* sda */
+			  &gpio0 9 GPIO_ACTIVE_HIGH>;		/* scl */
+		i2c-gpio,delay-us = <2>;	/* ~100 kHz */
+	};
+};
+
+&nand {
+	status = "okay";
+	chip-delay = <25>;
+};
arch/arm/boot/dts/kirkwood-km_kirkwood.dts +1 -13
index 61139bf..235bf38 100644
@@ -2,6 +2,7 @@
 
 #include "kirkwood.dtsi"
 #include "kirkwood-98dx4122.dtsi"
+#include "kirkwood-km_common.dtsi"
 
 / {
 	model = "Keymile Kirkwood Reference Design";
@@ -11,43 +12,6 @@
 		device_type = "memory";
 		reg = <0x00000000 0x08000000>;
 	};
-
-	chosen {
-		bootargs = "console=ttyS0,115200n8 earlyprintk";
-		stdout-path = &uart0;
-	};
-
-	ocp at f1000000 {
-		pinctrl: pin-controller at 10000 {
-			pinctrl-0 = < &pmx_i2c_gpio_sda &pmx_i2c_gpio_scl >;
-			pinctrl-names = "default";
-
-			pmx_i2c_gpio_sda: pmx-gpio-sda {
-				marvell,pins = "mpp8";

arch/arm/boot/dts/kirkwood-km_kirkwood.dts line 36

Quoted 10 lines
arch/arm/boot/dts/kirkwood-km_kirkwood.dts +0 -10
-				marvell,function = "gpio";
-			};
-			pmx_i2c_gpio_scl: pmx-gpio-scl {
-				marvell,pins = "mpp9";
-				marvell,function = "gpio";
-			};
-		};
-
-		serial at 12000 {
-			status = "ok";

Yeah, I probably let it in in the first place :)

If that is all there is with this series, I'll fix it up when I pull it in.

thx,

Jason.

#4 lore raw

PATCH v2 2/3 ARM: dts: kirkwood: add kirkwood-km_common DTSI files

In reply to Valentin Longchamp
Quoted 52 lines · Valentin Longchamp

This file allows to factor the common parts between the various Keymile Kirkwood Designs.

kirkwood-km_common configures the peripherals that are currently common to all our Kirkwood designs: PCIe, pinctrl, bitbang I2C, NAND Flash controller.

The kirkwood-km_kirkwood file is then changed to include this common file.

---

Changes in v2:
- introduce kirkwood-km_common.dtsi to allow factoring some nodes between boards

 arch/arm/boot/dts/kirkwood-km_common.dtsi  | 48 ++++++++++++++++++++++++++++++
 arch/arm/boot/dts/kirkwood-km_kirkwood.dts | 38 +----------------------
 2 files changed, 49 insertions(+), 37 deletions(-)
 create mode 100644 arch/arm/boot/dts/kirkwood-km_common.dtsi
arch/arm/boot/dts/kirkwood-km_common.dtsi new file +23 -0
new file mode 100644
index 0000000..b241135
@@ -0,0 +1,48 @@
+/ {
+	chosen {
+		bootargs = "console=ttyS0,115200n8 earlyprintk";
+		stdout-path = &uart0;
+	};
+
+	mbus {
+		pcie-controller {
+			status = "okay";
+
+			pcie at 1,0 {
+				status = "okay";
+			};
+		};
+	};
+
+	ocp at f1000000 {
+		pinctrl: pin-controller at 10000 {
+			pinctrl-0 = < &pmx_i2c_gpio_sda &pmx_i2c_gpio_scl >;
+			pinctrl-names = "default";
+
+			pmx_i2c_gpio_sda: pmx-gpio-sda {
+				marvell,pins = "mpp8";

arch/arm/boot/dts/kirkwood-km_common.dtsi line 33

Quoted 10 lines
arch/arm/boot/dts/kirkwood-km_common.dtsi new file +10 -0
+				marvell,function = "gpio";
+			};
+			pmx_i2c_gpio_scl: pmx-gpio-scl {
+				marvell,pins = "mpp9";
+				marvell,function = "gpio";
+			};
+		};
+
+		serial at 12000 {
+			status = "ok";

nit: This should match the other status properties and use "okay".

Quoted 44 lines
arch/arm/boot/dts/kirkwood-km_common.dtsi new file +15 -0
+		};
+	};
+
+	i2c at 0 {
+		compatible = "i2c-gpio";
+		gpios = < &gpio0 8 GPIO_ACTIVE_HIGH		/* sda */
+			  &gpio0 9 GPIO_ACTIVE_HIGH>;		/* scl */
+		i2c-gpio,delay-us = <2>;	/* ~100 kHz */
+	};
+};
+
+&nand {
+	status = "okay";
+	chip-delay = <25>;
+};
arch/arm/boot/dts/kirkwood-km_kirkwood.dts +1 -13
index 61139bf..235bf38 100644
@@ -2,6 +2,7 @@
 
 #include "kirkwood.dtsi"
 #include "kirkwood-98dx4122.dtsi"
+#include "kirkwood-km_common.dtsi"
 
 / {
 	model = "Keymile Kirkwood Reference Design";
@@ -11,43 +12,6 @@
 		device_type = "memory";
 		reg = <0x00000000 0x08000000>;
 	};
-
-	chosen {
-		bootargs = "console=ttyS0,115200n8 earlyprintk";
-		stdout-path = &uart0;
-	};
-
-	ocp at f1000000 {
-		pinctrl: pin-controller at 10000 {
-			pinctrl-0 = < &pmx_i2c_gpio_sda &pmx_i2c_gpio_scl >;
-			pinctrl-names = "default";
-
-			pmx_i2c_gpio_sda: pmx-gpio-sda {
-				marvell,pins = "mpp8";

arch/arm/boot/dts/kirkwood-km_kirkwood.dts line 36

Quoted 10 lines
arch/arm/boot/dts/kirkwood-km_kirkwood.dts +0 -10
-				marvell,function = "gpio";
-			};
-			pmx_i2c_gpio_scl: pmx-gpio-scl {
-				marvell,pins = "mpp9";
-				marvell,function = "gpio";
-			};
-		};
-
-		serial at 12000 {
-			status = "ok";

Yeah, I probably let it in in the first place :)

If that is all there is with this series, I'll fix it up when I pull it in.

thx,

Jason.

#5 lore raw

PATCH v2 3/3 ARM: dts: kirkwood: add kirkwood-km_fixedeth DTS file

In reply to Valentin Longchamp

Besides our Kirkwood Reference design, there is another group of board on which the eth interface is not connected to a phy but to a switch for some board internal communication. For these designs, the memory also is raised to 256MB.

The configuration of the switch is handled by an EEPROM or by the bootloader, but on the kirkwood side, the port is always configured as 1000 Mbits, full duplex.

---

Changes in v2:
- Take advantage of the kirkwood-km_common.dtsi file for kirkwood-km_fixedeth.dts

 arch/arm/boot/dts/kirkwood-km_fixedeth.dts | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 arch/arm/boot/dts/kirkwood-km_fixedeth.dts
arch/arm/boot/dts/kirkwood-km_fixedeth.dts new file +23 -0
new file mode 100644
index 0000000..9895f2b
@@ -0,0 +1,23 @@
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-98dx4122.dtsi"
+#include "kirkwood-km_common.dtsi"
+
+/ {
+	model = "Keymile Kirkwood Fixed Eth";
+	compatible = "keymile,km_fixedeth", "marvell,kirkwood-98DX4122", "marvell,kirkwood";
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x10000000>;
+	};
+};
+
+&eth0 {
+	status = "okay";
+	ethernet0-port at 0 {
+		speed = <1000>;  /* <SPEED_1000> */
+		duplex = <1>; /* <DUPLEX_FULL> */
+	};
+};
Signature · 1 line
1.8.0.1
#6 lore raw

v2 cover Update the Keymile kirkwood DTS files

In reply to Valentin Longchamp
Quoted 9 lines · Valentin Longchamp

This series resynchs the Keymile Kirkwood DTS files with mainline since the boards do not boot anymore with the 3.15 rc kernels (to be honest, I have not tested the last 2-3 releases).

The changes are the addition of the PCIe controller for the 98dx4122 SoC, the explicit disabling of the SATA phys for this same SoC and finally the enabling of the PCIe controller on the Keymile Reference design.

Quoted 6 lines

The series introduces kirkwood-km_common.dtsi that factors the common nodes between kirkwood-km_kirkwood.dts and the new board/design below.

The series also adds a new DTS for another Keymile generic design where the mv64xxx eth interace is configured with fixed parameters to no phy but a switch (for board internal communication).

Hi Valentin

Looks good to me.

Thanks
Andrew

#7 lore raw

v2 cover Update the Keymile kirkwood DTS files

In reply to Valentin Longchamp
Quoted 30 lines · Valentin Longchamp

This series resynchs the Keymile Kirkwood DTS files with mainline since the boards do not boot anymore with the 3.15 rc kernels (to be honest, I have not tested the last 2-3 releases).

The changes are the addition of the PCIe controller for the 98dx4122 SoC, the explicit disabling of the SATA phys for this same SoC and finally the enabling of the PCIe controller on the Keymile Reference design.

The series introduces kirkwood-km_common.dtsi that factors the common nodes between kirkwood-km_kirkwood.dts and the new board/design below.

The series also adds a new DTS for another Keymile generic design where the mv64xxx eth interace is configured with fixed parameters to no phy but a switch (for board internal communication).

The series applies and was tested on top of Jason's mvebu/dt branch (mvebu-dt-3.16 tag).

Changes in v2:
- introduce kirkwood-km_common.dtsi to allow factoring some nodes between boards
- Take advantage of the kirkwood-km_common.dtsi file for kirkwood-km_fixedeth.dts

Valentin Longchamp (3):
ARM: dts: kirkwood: resynch 98dx4122 dtsi
ARM: dts: kirkwood: add kirkwood-km_common DTSI files
ARM: dts: kirkwood: add kirkwood-km_fixedeth DTS file

Quoted 7 lines
 arch/arm/boot/dts/kirkwood-98dx4122.dtsi   | 43 ++++++++++++++++++++++++++
 arch/arm/boot/dts/kirkwood-km_common.dtsi  | 48 ++++++++++++++++++++++++++++++
 arch/arm/boot/dts/kirkwood-km_fixedeth.dts | 23 ++++++++++++++
 arch/arm/boot/dts/kirkwood-km_kirkwood.dts | 38 +----------------------
 4 files changed, 115 insertions(+), 37 deletions(-)
 create mode 100644 arch/arm/boot/dts/kirkwood-km_common.dtsi
 create mode 100644 arch/arm/boot/dts/kirkwood-km_fixedeth.dts

Applied whole series to mvebu/dt with Andrew's Ack. Also, s/ok/okay/ in patch 2/3.

thx,

Jason.