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

Commit 9eb61f47 authored by Andrew Lunn's avatar Andrew Lunn
Browse files

ARM: Kirkwood: Add basic device tree support for QNAP TS219.



The two different variants of QNAP TS devices, varying by SoC, put the
GPIO keys on different GPIO lines. Hence we need two different DT
board descriptions, which share the same board-ts219.c file.

Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Acked-by: default avatarJason Cooper <jason@lakedaemon.net>
parent 97b414e1
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
/dts-v1/;

/include/ "kirkwood-ts219.dtsi"

/ {
	gpio_keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;
		button@1 {
			label = "USB Copy";
			linux,code = <133>;
			gpios = <&gpio0 15 1>;
		};
		button@2 {
			label = "Reset";
			linux,code = <0x198>;
			gpios = <&gpio0 16 1>;
		};
	};
};
 No newline at end of file
+21 −0
Original line number Diff line number Diff line
/dts-v1/;

/include/ "kirkwood-ts219.dtsi"

/ {
	gpio_keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;
		button@1 {
			label = "USB Copy";
			linux,code = <133>;
			gpios = <&gpio1 11 1>;
		};
		button@2 {
			label = "Reset";
			linux,code = <0x198>;
			gpios = <&gpio1 5 1>;
		};
	};
};
 No newline at end of file
+74 −0
Original line number Diff line number Diff line
/include/ "kirkwood.dtsi"

/ {
	model = "QNAP TS219 family";
	compatible = "qnap,ts219", "mrvl,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x20000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200n8";
	};

	ocp@f1000000 {
		i2c@11000 {
			status = "okay";
			clock-frequency = <400000>;

			s35390a: s35390a@30 {
				compatible = "s35390a";
				reg = <0x30>;
			};
		};
		serial@12000 {
			clock-frequency = <200000000>;
			status = "okay";
		};
		serial@12100 {
			clock-frequency = <200000000>;
			status = "okay";
		};
		spi@10600 {
			status = "okay";

			m25p128@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "m25p128";
				reg = <0>;
				spi-max-frequency = <20000000>;
				mode = <0>;

				partition@0000000 {
					reg = <0x00000000 0x00080000>;
					label = "U-Boot";
				};

				partition@00200000 {
					reg = <0x00200000 0x00200000>;
					label = "Kernel";
				};

				partition@00400000 {
					reg = <0x00400000 0x00900000>;
					label = "RootFS1";
				};
				partition@00d00000 {
					reg = <0x00d00000 0x00300000>;
					label = "RootFS2";
				};
				partition@00040000 {
					reg = <0x00080000 0x00040000>;
					label = "U-Boot Config";
				};
				partition@000c0000 {
					reg = <0x000c0000 0x00140000>;
					label = "NAS Config";
				};
			};
		};
	};
};
+14 −0
Original line number Diff line number Diff line
@@ -80,6 +80,20 @@ config MACH_IB62X0_DT
	  RaidSonic IB-NAS6210 & IB-NAS6220 devices, using
	  Flattened Device Tree.

config MACH_TS219_DT
	bool "Device Tree for QNAP TS-11X, TS-21X NAS"
	select ARCH_KIRKWOOD_DT
	select ARM_APPENDED_DTB
	select ARM_ATAG_DTB_COMPAT
	help
	  Say 'Y' here if you want your kernel to support the QNAP
	  TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and
	  TS-219P+ Turbo NAS devices using Fattened Device Tree.
	  There are two different Device Tree descriptions, depending
	  on if the device is based on an if the board uses the MV6281
	  or MV6282. If you have the wrong one, the buttons will not
	  work.

config MACH_TS219
	bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
	help
+1 −0
Original line number Diff line number Diff line
@@ -25,3 +25,4 @@ obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o
obj-$(CONFIG_MACH_ICONNECT_DT)		+= board-iconnect.o
obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT)	+= board-dnskw.o
obj-$(CONFIG_MACH_IB62X0_DT)		+= board-ib62x0.o
obj-$(CONFIG_MACH_TS219_DT)		+= board-ts219.o tsx1x-common.o
Loading