Skip to contentSkip to conversation

MIPS: NI 169445 board support

PATCH Applied Nathan Sullivan 4 participants 6 messages Jul 18, 2017 – Aug 7, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 MIPS: NI 169445 board support

Support the National Instruments 169445 board.

---
Changes since v5:

- make device tree addresses on the internal bus relative, and compile with W=2 to be sure they are in the right format.

 Documentation/devicetree/bindings/mips/ni.txt   |   7 ++
 MAINTAINERS                                     |   8 ++
 arch/mips/boot/dts/Makefile                     |   1 +
 arch/mips/boot/dts/ni/169445.dts                | 100 ++++++++++++++++++++++++
 arch/mips/boot/dts/ni/Makefile                  |   7 ++
 arch/mips/configs/generic/board-ni169445.config |  27 +++++++
 arch/mips/generic/Kconfig                       |   6 ++
 arch/mips/generic/vmlinux.its.S                 |  25 ++++++
 8 files changed, 181 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mips/ni.txt
 create mode 100644 arch/mips/boot/dts/ni/169445.dts
 create mode 100644 arch/mips/boot/dts/ni/Makefile
 create mode 100644 arch/mips/configs/generic/board-ni169445.config
Documentation/devicetree/bindings/mips/ni.txt new file +7 -0
new file mode 100644
index 0000000..722bf2d
@@ -0,0 +1,7 @@
+National Instruments MIPS platforms
+
+required root node properties:
+	- compatible: must be "ni,169445"
+
+CPU Nodes
+	- compatible: must be "mti,mips14KEc"
MAINTAINERS +8 -0
index 7d9bd4a..73fa2e0 100644
@@ -9294,6 +9294,14 @@ F:	include/linux/sunrpc/
 F:	include/uapi/linux/nfs*
 F:	include/uapi/linux/sunrpc/
 
+NI169445 MIPS ARCHITECTURE
+M:	Nathan Sullivan <[email protected]>
+L:	linux-mips-6z/[email protected]
+S:	Maintained
+F:	arch/mips/boot/dts/ni/
+F:	arch/mips/configs/generic/board-ni169445.config
+F:	Documentation/devicetree/bindings/mips/ni.txt
+
 NILFS2 FILESYSTEM
 M:	Ryusuke Konishi <[email protected]>
 L:	[email protected]
arch/mips/boot/dts/Makefile +1 -0
index b9db492..27b0f37 100644
@@ -4,6 +4,7 @@ dts-dirs	+= img
 dts-dirs	+= ingenic
 dts-dirs	+= lantiq
 dts-dirs	+= mti
+dts-dirs	+= ni
 dts-dirs	+= netlogic
 dts-dirs	+= pic32
 dts-dirs	+= qca
arch/mips/boot/dts/ni/169445.dts new file +100 -0

100 lines not on this page · raw message

arch/mips/boot/dts/ni/Makefile new file +7 -0
new file mode 100644
index 0000000..66cfdff
@@ -0,0 +1,7 @@
+dtb-$(CONFIG_FIT_IMAGE_FDT_NI169445)	+= 169445.dtb
+
+# Force kbuild to make empty built-in.o if necessary
+obj-					+= dummy.o
+
+always					:= $(dtb-y)
+clean-files				:= *.dtb *.dtb.S
arch/mips/configs/generic/board-ni169445.config new file +27 -0
new file mode 100644
index 0000000..0bae1f8
@@ -0,0 +1,27 @@
+CONFIG_FIT_IMAGE_FDT_NI169445=y
+
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
+
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
+
+CONFIG_MTD=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_CMDLINE_PARTS=y
+
+CONFIG_MTD_NAND_ECC=y
+CONFIG_MTD_NAND_ECC_BCH=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_GPIO=y
+CONFIG_MTD_NAND_IDS=y
+
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BLOCK=y
+
+CONFIG_NETDEVICES=y
+CONFIG_STMMAC_ETH=y
+CONFIG_STMMAC_PLATFORM=y
+CONFIG_DWMAC_GENERIC=y
arch/mips/generic/Kconfig +6 -0
index a606b3f..fbf0813 100644
@@ -16,4 +16,10 @@ config LEGACY_BOARD_SEAD3
 	  Enable this to include support for booting on MIPS SEAD-3 FPGA-based
 	  development boards, which boot using a legacy boot protocol.
 
+config FIT_IMAGE_FDT_NI169445
+	bool "Include FDT for NI 169445"
+	help
+	  Enable this to include the FDT for the 169445 platform from
+	  National Instruments in the FIT kernel image.
+
 endif
arch/mips/generic/vmlinux.its.S +25 -0
index f67fbf1..de851f7 100644
@@ -29,3 +29,28 @@
 		};
 	};
 };
+
+#ifdef CONFIG_FIT_IMAGE_FDT_NI169445
+/ {
+	images {
+		fdt@ni169445 {
+			description = "NI 169445 device tree";
+			data = /incbin/("boot/dts/ni/169445.dtb");
+			type = "flat_dt";
+			arch = "mips";
+			compression = "none";
+			hash@0 {
+				algo = "sha1";
+			};
+		};
+	};
+
+	configurations {
+		conf@ni169445 {
+			description = "NI 169445 Linux Kernel";
+			kernel = "kernel@0";
+			fdt = "fdt@ni169445";
+		};
+	};
+};
+#endif
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Acked-by on v6 1/1
#1 lore raw
Quoted 9 lines · Nathan Sullivan

Support the National Instruments 169445 board.

---
Changes since v5:

- make device tree addresses on the internal bus relative, and compile with W=2 to be sure they are in the right format.

Quoted 13 lines
 Documentation/devicetree/bindings/mips/ni.txt   |   7 ++
 MAINTAINERS                                     |   8 ++
 arch/mips/boot/dts/Makefile                     |   1 +
 arch/mips/boot/dts/ni/169445.dts                | 100 ++++++++++++++++++++++++
 arch/mips/boot/dts/ni/Makefile                  |   7 ++
 arch/mips/configs/generic/board-ni169445.config |  27 +++++++
 arch/mips/generic/Kconfig                       |   6 ++
 arch/mips/generic/vmlinux.its.S                 |  25 ++++++
 8 files changed, 181 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mips/ni.txt
 create mode 100644 arch/mips/boot/dts/ni/169445.dts
 create mode 100644 arch/mips/boot/dts/ni/Makefile
 create mode 100644 arch/mips/configs/generic/board-ni169445.config

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Applied
#2 lore raw
In reply to Nathan Sullivan
Quoted 1 line · Nathan Sullivan

Support the National Instruments 169445 board.

Thanks, applied with minor changes:

arch/mips/boot/dts/Makefile dts-dirs += img · line 10

Quoted 10 lines
arch/mips/boot/dts/Makefile +1 -0
@@ -4,6 +4,7 @@ dts-dirs	+= img
 dts-dirs	+= ingenic
 dts-dirs	+= lantiq
 dts-dirs	+= mti
+dts-dirs	+= ni
 dts-dirs	+= netlogic
 dts-dirs	+= pic32
 dts-dirs	+= qca

Keep things in alphabetical order, so ni should go after netlogic.

Quoted 12 lines
arch/mips/generic/vmlinux.its.S +4 -0
index f67fbf1..de851f7 100644
@@ -29,3 +29,28 @@
 		};
 	};
 };
+
+#ifdef CONFIG_FIT_IMAGE_FDT_NI169445
+/ {
+	images {

[...]

arch/mips/generic/vmlinux.its.S line 56

Quoted 3 lines
arch/mips/generic/vmlinux.its.S +3 -0
+	};
+};
+#endif

There's been a reject on this file because of a Boston #ifdefed section. I've fixed that up but we need a cleaner solution. Paul, any suggestions?

Ralf
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 7 lines · Ralf Baechle
Quoted 1 line · Nathan Sullivan

Support the National Instruments 169445 board.

Thanks, applied with minor changes:

Ralf

Thank you for your patience!

Nathan

#4 lore raw
In reply to Ralf Baechle

Hi Ralf,

Quoted 20 lines · On Monday, 7 August 2017 08:26:48 PDT Ralf Baechle wrote:
Quoted 16 lines · Nathan Sullivan
(quoted diff) +0 -0

b/arch/mips/generic/vmlinux.its.S index f67fbf1..de851f7 100644

arch/mips/generic/vmlinux.its.S +4 -0
@@ -29,3 +29,28 @@
 
 		};
 
 	};
 
 };
 
+
+#ifdef CONFIG_FIT_IMAGE_FDT_NI169445
+/ {
+	images {

[...]

Quoted 8 lines

arch/mips/generic/vmlinux.its.S line 56

Quoted 3 lines
arch/mips/generic/vmlinux.its.S +3 -0
+	};
+};
+#endif

There's been a reject on this file because of a Boston #ifdefed section. I've fixed that up but we need a cleaner solution. Paul, any suggestions?

Ralf

One possibility would be for us to split the board portions of vmlinux.its.S out into a file per-board, perhaps board-boston.its.S, board-ni169445.its.S etc. The build process would then have to concatenate the right files to generate the full image tree source.

Does that sound good to you?

Thanks,
Paul

#5 lore raw
Quoted 6 lines · Paul Burton

One possibility would be for us to split the board portions of vmlinux.its.S out into a file per-board, perhaps board-boston.its.S, board-ni169445.its.S etc. The build process would then have to concatenate the right files to generate the full image tree source.

Does that sound good to you?

Yes, that sounds good.

Ralf
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html