/dts-v1/;

/memreserve/	0x0000000080000000 0x0000000000010000;
/ {
	compatible = "phytium,pe2204";
	interrupt-parent = <0x01>;
	#address-cells = <0x02>;
	#size-cells = <0x02>;
	model = "Phytium Pi Board";

	// memory@01 {
	// 	device_type = "memory";
	// 	reg = <0x20 0x00 0x00 0x80000000>;
	// 	numa-node-id = <0x00>;
	// };

	aliases {
		serial1 = "/soc/uart@2800d000";
	};

	psci {
		compatible = "arm,psci-1.0";
		method = "smc";
		cpu_suspend = <0xc4000001>;
		cpu_off = <0x84000002>;
		cpu_on = <0xc4000003>;
		sys_poweroff = <0x84000008>;
		sys_reset = <0x84000009>;
	};

	cpus {
		#address-cells = <0x02>;
		#size-cells = <0x00>;

		cpu-map {

			// cluster0 {

			// 	core0 {
			// 		cpu = <0x05>;
			// 	};
			// };

			cluster1 {

				core0 {
					cpu = <0x06>;
				};
			};

			cluster2 {

				// core0 {
				// 	cpu = <0x07>;
				// };

				core1 {
					cpu = <0x08>;
				};
			};
		};

		// cpu@0 {
		// 	device_type = "cpu";
		// 	compatible = "phytium,ftc310\0arm,armv8";
		// 	reg = <0x00 0x200>;
		// 	enable-method = "psci";
		// 	clocks = <0x09 0x02>;
		// 	capacity-dmips-mhz = <0xb22>;
		// 	phandle = <0x07>;
		// };

		cpu@1 {
			device_type = "cpu";
			compatible = "phytium,ftc310\0arm,armv8";
			reg = <0x00 0x201>;
			enable-method = "psci";
			clocks = <0x09 0x02>;
			capacity-dmips-mhz = <0xb22>;
			phandle = <0x08>;
		};

		// cpu@100 {
		// 	device_type = "cpu";
		// 	compatible = "phytium,ftc664\0arm,armv8";
		// 	reg = <0x00 0x00>;
		// 	enable-method = "psci";
		// 	clocks = <0x09 0x00>;
		// 	capacity-dmips-mhz = <0x161c>;
		// 	phandle = <0x05>;
		// };

		cpu@101 {
			device_type = "cpu";
			compatible = "phytium,ftc664\0arm,armv8";
			reg = <0x00 0x100>;
			enable-method = "psci";
			clocks = <0x09 0x01>;
			capacity-dmips-mhz = <0x161c>;
			phandle = <0x06>;
		};
	};

	interrupt-controller@30800000 {
		compatible = "arm,gic-v3";
		#interrupt-cells = <0x03>;
		#address-cells = <0x02>;
		#size-cells = <0x02>;
		ranges;
		interrupt-controller;
		reg = <0x00 0x30800000 0x00 0x20000 0x00 0x30880000 0x00 0x80000 0x00 0x30840000 0x00 0x10000 0x00 0x30850000 0x00 0x10000 0x00 0x30860000 0x00 0x10000>;
		interrupts = <0x01 0x09 0x08>;
		phandle = <0x01>;

		gic-its@30820000 {
			compatible = "arm,gic-v3-its";
			msi-controller;
			reg = <0x00 0x30820000 0x00 0x20000>;
			phandle = <0x0f>;
		};
	};

	timer {
		compatible = "arm,armv8-timer";
		interrupts = <0x01 0x0d 0x08 0x01 0x0e 0x08 0x01 0x0b 0x08 0x01 0x0a 0x08>;
		clock-frequency = <0x2faf080>;
	};

	soc {
		compatible = "simple-bus";
		#address-cells = <0x02>;
		#size-cells = <0x02>;
		dma-coherent;
		ranges;

		uart@2800d000 {
			compatible = "arm,pl011\0arm,primecell";
			reg = <0x00 0x2800d000 0x00 0x1000>;
			interrupts = <0x00 0x54 0x04>;
			clocks = <0x0c 0x0c>;
			clock-names = "uartclk\0apb_pclk";
			status = "okay";
		};
	};

	chosen {
		bootargs = "console=ttyAMA1,115200 earlycon=pl011,0x2800d000 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait  rw cma=256m ;";
		stdout-path = "serial1:115200n8";
	};

	memory@00 {
		device_type = "memory";
		reg = <0x20 0x20000000 0x00 0x20000000>;
	};
};
