Skip to content

Instantly share code, notes, and snippets.

@sergev
Last active January 12, 2019 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergev/09726b0a0716377d7d89daeebcec6739 to your computer and use it in GitHub Desktop.
Save sergev/09726b0a0716377d7d89daeebcec6739 to your computer and use it in GitHub Desktop.
Device Tree of Linux MIPS64 on QEMU

Here you can see a device tree of Linux MIPS64 running on virtual QEMU Malta board:

# dtc -I fs -O dts /proc/device-tree
Warning (unit_address_vs_reg): Node /isa has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /interrupt-controller@20 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name
/dts-v1/;

/ {
	compatible = "mti,malta";
	#address-cells = <0x1>;
	#size-cells = <0x1>;

	isa {
		compatible = "isa";
		ranges = <0x1 0x0 0x0 0x1000>;
		#address-cells = <0x2>;
		#size-cells = <0x1>;

		rtc@70 {
			compatible = "motorola,mc146818";
			interrupt-parent = <0x4>;
			interrupts = <0x8>;
			reg = <0x1 0x70 0x8>;
		};
	};

	system-controller@1f000000 {
		compatible = "mti,malta-fpga", "syscon", "simple-mfd";
		phandle = <0x3>;
		reg = <0x1f000000 0x1000>;
		linux,phandle = <0x3>;
		native-endian;

		reboot {
			compatible = "syscon-reboot";
			mask = <0x42>;
			offset = <0x500>;
			regmap = <0x3>;
		};
	};

	interrupt-controller@20 {
		compatible = "intel,i8259";
		#interrupt-cells = <0x1>;
		interrupt-parent = <0x1>;
		interrupts = <0x2>;
		phandle = <0x4>;
		linux,phandle = <0x4>;
		interrupt-controller;
	};

	flash@1e000000 {
		compatible = "intel,dt28f160", "cfi-flash";
		#address-cells = <0x1>;
		bank-width = <0x4>;
		#size-cells = <0x1>;
		reg = <0x1e000000 0x400000>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <0x1>;
			#size-cells = <0x1>;

			yamon@0 {
				read-only;
				label = "YAMON";
				reg = <0x0 0x100000>;
			};

			user-fs@100000 {
				label = "User FS";
				reg = <0x100000 0x2e0000>;
			};

			board-config@3e0000 {
				read-only;
				label = "Board Config";
				reg = <0x3e0000 0x20000>;
			};
		};
	};

	memory {
		device_type = "memory";
		linux,usable-memory = <0x0 0x10000000 0x90000000 0x70000000>;
		reg = <0x0 0x10000000 0x90000000 0x70000000>;
	};

	interrupt-controller {
		compatible = "mti,cpu-interrupt-controller";
		#interrupt-cells = <0x1>;
		phandle = <0x1>;
		linux,phandle = <0x1>;
		interrupt-controller;
	};
};

See debian-mips64el-on-qemu for details about installing Debian MIPS64 on QEMU.

See protocol-debian-mips64el for a protocol of booting the resulting system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment