Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 433683a6 authored by Pawel Moll's avatar Pawel Moll
Browse files

ARM: vexpress: Remove motherboard dependencies in the DTS files



The way the VE motherboard Device Trees were constructed
enforced naming and structure of daughterboard files. This
patch makes it possible to simply include the motherboard
description anywhere in the main Device Tree and retires
the "arm,v2m-timer" alias - any of the motherboard SP804
timers will be used instead.

Signed-off-by: default avatarPawel Moll <pawel.moll@arm.com>
parent 38669e04
Loading
Loading
Loading
Loading
+22 −10
Original line number Original line Diff line number Diff line
@@ -141,14 +141,19 @@ can be used to obtain required phandle in the tile's "aliases" node:
- SP804 timers:
- SP804 timers:
	v2m_timer01 and v2m_timer23
	v2m_timer01 and v2m_timer23


Current Linux implementation requires a "arm,v2m_timer" alias
The tile description should define a "smb" node, describing the
pointing at one of the motherboard's SP804 timers, if it is to be
Static Memory Bus between the tile and motherboard. It must define
used as the system timer. This alias should be defined in the
the following properties:
motherboard files.
- "simple-bus" compatible value (to ensure creation of the children)

	compatible = "simple-bus";
The tile description must define "ranges", "interrupt-map-mask" and
- mapping of the SMB CS/offset addresses into main address space:
"interrupt-map" properties to translate the motherboard's address
	#address-cells = <2>;
and interrupt space into one used by the tile's processor.
	#size-cells = <1>;
	ranges = <...>;
- interrupts mapping:
	#interrupt-cells = <1>;
	interrupt-map-mask = <0 0 63>;
	interrupt-map = <...>;




Example of a VE tile description (simplified)
Example of a VE tile description (simplified)
@@ -200,13 +205,20 @@ Example of a VE tile description (simplified)
		};
		};
	};
	};


	motherboard {
	smb {
		compatible = "simple-bus";

		#address-cells = <2>;
		#size-cells = <1>;
		/* CS0 is visible at 0x08000000 */
		/* CS0 is visible at 0x08000000 */
		ranges = <0 0 0x08000000 0x04000000>;
		ranges = <0 0 0x08000000 0x04000000>;

		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 63>;
		interrupt-map-mask = <0 0 63>;
		/* Active high IRQ 0 is connected to GIC's SPI0 */
		/* Active high IRQ 0 is connected to GIC's SPI0 */
		interrupt-map = <0 0 0 &gic 0 0 4>;
		interrupt-map = <0 0 0 &gic 0 0 4>;

		/include/ "vexpress-v2m-rs1.dtsi"
	};
	};
};
};
/include/ "vexpress-v2m-rs1.dtsi"
+4 −7
Original line number Original line Diff line number Diff line
@@ -17,18 +17,16 @@
 * CHANGES TO vexpress-v2m.dtsi!
 * CHANGES TO vexpress-v2m.dtsi!
 */
 */


/ {
	aliases {
		arm,v2m_timer = &v2m_timer01;
	};

	motherboard {
	motherboard {
		compatible = "simple-bus";
		model = "V2M-P1";
		arm,hbi = <0x190>;
		arm,vexpress,site = <0>;
		arm,vexpress,site = <0>;
		arm,v2m-memory-map = "rs1";
		arm,v2m-memory-map = "rs1";
		compatible = "arm,vexpress,v2m-p1", "simple-bus";
		#address-cells = <2>; /* SMB chipselect number and offset */
		#address-cells = <2>; /* SMB chipselect number and offset */
		#size-cells = <1>;
		#size-cells = <1>;
		#interrupt-cells = <1>;
		#interrupt-cells = <1>;
		ranges;


		flash@0,00000000 {
		flash@0,00000000 {
			compatible = "arm,vexpress-flash", "cfi-flash";
			compatible = "arm,vexpress-flash", "cfi-flash";
@@ -340,4 +338,3 @@
			};
			};
		};
		};
	};
	};
};
+4 −7
Original line number Original line Diff line number Diff line
@@ -17,17 +17,15 @@
 * CHANGES TO vexpress-v2m-rs1.dtsi!
 * CHANGES TO vexpress-v2m-rs1.dtsi!
 */
 */


/ {
	aliases {
		arm,v2m_timer = &v2m_timer01;
	};

	motherboard {
	motherboard {
		compatible = "simple-bus";
		model = "V2M-P1";
		arm,hbi = <0x190>;
		arm,vexpress,site = <0>;
		arm,vexpress,site = <0>;
		compatible = "arm,vexpress,v2m-p1", "simple-bus";
		#address-cells = <2>; /* SMB chipselect number and offset */
		#address-cells = <2>; /* SMB chipselect number and offset */
		#size-cells = <1>;
		#size-cells = <1>;
		#interrupt-cells = <1>;
		#interrupt-cells = <1>;
		ranges;


		flash@0,00000000 {
		flash@0,00000000 {
			compatible = "arm,vexpress-flash", "cfi-flash";
			compatible = "arm,vexpress-flash", "cfi-flash";
@@ -339,4 +337,3 @@
			};
			};
		};
		};
	};
	};
};
+8 −3
Original line number Original line Diff line number Diff line
@@ -220,7 +220,11 @@
		};
		};
	};
	};


	motherboard {
	smb {
		compatible = "simple-bus";

		#address-cells = <2>;
		#size-cells = <1>;
		ranges = <0 0 0 0x08000000 0x04000000>,
		ranges = <0 0 0 0x08000000 0x04000000>,
			 <1 0 0 0x14000000 0x04000000>,
			 <1 0 0 0x14000000 0x04000000>,
			 <2 0 0 0x18000000 0x04000000>,
			 <2 0 0 0x18000000 0x04000000>,
@@ -228,6 +232,7 @@
			 <4 0 0 0x0c000000 0x04000000>,
			 <4 0 0 0x0c000000 0x04000000>,
			 <5 0 0 0x10000000 0x04000000>;
			 <5 0 0 0x10000000 0x04000000>;


		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 63>;
		interrupt-map-mask = <0 0 63>;
		interrupt-map = <0 0  0 &gic 0  0 4>,
		interrupt-map = <0 0  0 &gic 0  0 4>,
				<0 0  1 &gic 0  1 4>,
				<0 0  1 &gic 0  1 4>,
@@ -272,7 +277,7 @@
				<0 0 40 &gic 0 40 4>,
				<0 0 40 &gic 0 40 4>,
				<0 0 41 &gic 0 41 4>,
				<0 0 41 &gic 0 41 4>,
				<0 0 42 &gic 0 42 4>;
				<0 0 42 &gic 0 42 4>;
	};
};


		/include/ "vexpress-v2m-rs1.dtsi"
		/include/ "vexpress-v2m-rs1.dtsi"
	};
};
+8 −3
Original line number Original line Diff line number Diff line
@@ -305,7 +305,11 @@
		};
		};
	};
	};


	motherboard {
	smb {
		compatible = "simple-bus";

		#address-cells = <2>;
		#size-cells = <1>;
		ranges = <0 0 0 0x08000000 0x04000000>,
		ranges = <0 0 0 0x08000000 0x04000000>,
			 <1 0 0 0x14000000 0x04000000>,
			 <1 0 0 0x14000000 0x04000000>,
			 <2 0 0 0x18000000 0x04000000>,
			 <2 0 0 0x18000000 0x04000000>,
@@ -313,6 +317,7 @@
			 <4 0 0 0x0c000000 0x04000000>,
			 <4 0 0 0x0c000000 0x04000000>,
			 <5 0 0 0x10000000 0x04000000>;
			 <5 0 0 0x10000000 0x04000000>;


		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 63>;
		interrupt-map-mask = <0 0 63>;
		interrupt-map = <0 0  0 &gic 0  0 4>,
		interrupt-map = <0 0  0 &gic 0  0 4>,
				<0 0  1 &gic 0  1 4>,
				<0 0  1 &gic 0  1 4>,
@@ -357,7 +362,7 @@
				<0 0 40 &gic 0 40 4>,
				<0 0 40 &gic 0 40 4>,
				<0 0 41 &gic 0 41 4>,
				<0 0 41 &gic 0 41 4>,
				<0 0 42 &gic 0 42 4>;
				<0 0 42 &gic 0 42 4>;
	};
};


		/include/ "vexpress-v2m-rs1.dtsi"
		/include/ "vexpress-v2m-rs1.dtsi"
	};
};
Loading