Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: NI 169445 board support

Support the National Instruments 169445 board.

Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
Acked-by: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/16782/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Nathan Sullivan and committed by
Ralf Baechle
7aacf86b 0c4037b9

+173
+7
Documentation/devicetree/bindings/mips/ni.txt
··· 1 + National Instruments MIPS platforms 2 + 3 + required root node properties: 4 + - compatible: must be "ni,169445" 5 + 6 + CPU Nodes 7 + - compatible: must be "mti,mips14KEc"
+1
arch/mips/boot/dts/Makefile
··· 5 5 dts-dirs += lantiq 6 6 dts-dirs += mti 7 7 dts-dirs += netlogic 8 + dts-dirs += ni 8 9 dts-dirs += pic32 9 10 dts-dirs += qca 10 11 dts-dirs += ralink
+100
arch/mips/boot/dts/ni/169445.dts
··· 1 + /dts-v1/; 2 + 3 + / { 4 + #address-cells = <1>; 5 + #size-cells = <1>; 6 + compatible = "ni,169445"; 7 + 8 + cpus { 9 + #address-cells = <1>; 10 + #size-cells = <0>; 11 + cpu@0 { 12 + device_type = "cpu"; 13 + compatible = "mti,mips14KEc"; 14 + clocks = <&baseclk>; 15 + reg = <0>; 16 + }; 17 + }; 18 + 19 + memory@0 { 20 + device_type = "memory"; 21 + reg = <0x0 0x10000000>; 22 + }; 23 + 24 + baseclk: baseclock { 25 + compatible = "fixed-clock"; 26 + #clock-cells = <0>; 27 + clock-frequency = <50000000>; 28 + }; 29 + 30 + cpu_intc: interrupt-controller { 31 + #address-cells = <0>; 32 + compatible = "mti,cpu-interrupt-controller"; 33 + interrupt-controller; 34 + #interrupt-cells = <1>; 35 + }; 36 + 37 + ahb@1f300000 { 38 + compatible = "simple-bus"; 39 + #address-cells = <1>; 40 + #size-cells = <1>; 41 + ranges = <0x0 0x1f300000 0x80FFF>; 42 + 43 + gpio1: gpio@10 { 44 + compatible = "ni,169445-nand-gpio"; 45 + reg = <0x10 0x4>; 46 + reg-names = "dat"; 47 + gpio-controller; 48 + #gpio-cells = <2>; 49 + }; 50 + 51 + gpio2: gpio@14 { 52 + compatible = "ni,169445-nand-gpio"; 53 + reg = <0x14 0x4>; 54 + reg-names = "dat"; 55 + gpio-controller; 56 + #gpio-cells = <2>; 57 + no-output; 58 + }; 59 + 60 + nand@0 { 61 + compatible = "gpio-control-nand"; 62 + nand-on-flash-bbt; 63 + nand-ecc-mode = "soft_bch"; 64 + nand-ecc-step-size = <512>; 65 + nand-ecc-strength = <4>; 66 + reg = <0x0 4>; 67 + gpios = <&gpio2 0 0>, /* rdy */ 68 + <&gpio1 1 0>, /* nce */ 69 + <&gpio1 2 0>, /* ale */ 70 + <&gpio1 3 0>, /* cle */ 71 + <&gpio1 4 0>; /* nwp */ 72 + }; 73 + 74 + serial@80000 { 75 + compatible = "ns16550a"; 76 + reg = <0x80000 0x1000>; 77 + interrupt-parent = <&cpu_intc>; 78 + interrupts = <6>; 79 + clocks = <&baseclk>; 80 + reg-shift = <0>; 81 + }; 82 + 83 + ethernet@40000 { 84 + compatible = "snps,dwmac-4.10a"; 85 + interrupt-parent = <&cpu_intc>; 86 + interrupts = <5>; 87 + interrupt-names = "macirq"; 88 + reg = <0x40000 0x2000>; 89 + clock-names = "stmmaceth", "pclk"; 90 + clocks = <&baseclk>, <&baseclk>; 91 + 92 + phy-mode = "rgmii"; 93 + 94 + fixed-link { 95 + speed = <1000>; 96 + full-duplex; 97 + }; 98 + }; 99 + }; 100 + };
+7
arch/mips/boot/dts/ni/Makefile
··· 1 + dtb-$(CONFIG_FIT_IMAGE_FDT_NI169445) += 169445.dtb 2 + 3 + # Force kbuild to make empty built-in.o if necessary 4 + obj- += dummy.o 5 + 6 + always := $(dtb-y) 7 + clean-files := *.dtb *.dtb.S
+27
arch/mips/configs/generic/board-ni169445.config
··· 1 + CONFIG_FIT_IMAGE_FDT_NI169445=y 2 + 3 + CONFIG_SERIAL_8250=y 4 + CONFIG_SERIAL_8250_CONSOLE=y 5 + CONFIG_SERIAL_OF_PLATFORM=y 6 + 7 + CONFIG_GPIOLIB=y 8 + CONFIG_GPIO_SYSFS=y 9 + CONFIG_GPIO_GENERIC_PLATFORM=y 10 + 11 + CONFIG_MTD=y 12 + CONFIG_MTD_BLOCK=y 13 + CONFIG_MTD_CMDLINE_PARTS=y 14 + 15 + CONFIG_MTD_NAND_ECC=y 16 + CONFIG_MTD_NAND_ECC_BCH=y 17 + CONFIG_MTD_NAND=y 18 + CONFIG_MTD_NAND_GPIO=y 19 + CONFIG_MTD_NAND_IDS=y 20 + 21 + CONFIG_MTD_UBI=y 22 + CONFIG_MTD_UBI_BLOCK=y 23 + 24 + CONFIG_NETDEVICES=y 25 + CONFIG_STMMAC_ETH=y 26 + CONFIG_STMMAC_PLATFORM=y 27 + CONFIG_DWMAC_GENERIC=y
+6
arch/mips/generic/Kconfig
··· 36 36 enable this if you wish to boot on a MIPS Boston board, as it is 37 37 expected by the bootloader. 38 38 39 + config FIT_IMAGE_FDT_NI169445 40 + bool "Include FDT for NI 169445" 41 + help 42 + Enable this to include the FDT for the 169445 platform from 43 + National Instruments in the FIT kernel image. 44 + 39 45 endif
+25
arch/mips/generic/vmlinux.its.S
··· 54 54 }; 55 55 }; 56 56 #endif /* CONFIG_FIT_IMAGE_FDT_BOSTON */ 57 + 58 + #ifdef CONFIG_FIT_IMAGE_FDT_NI169445 59 + / { 60 + images { 61 + fdt@ni169445 { 62 + description = "NI 169445 device tree"; 63 + data = /incbin/("boot/dts/ni/169445.dtb"); 64 + type = "flat_dt"; 65 + arch = "mips"; 66 + compression = "none"; 67 + hash@0 { 68 + algo = "sha1"; 69 + }; 70 + }; 71 + }; 72 + 73 + configurations { 74 + conf@ni169445 { 75 + description = "NI 169445 Linux Kernel"; 76 + kernel = "kernel@0"; 77 + fdt = "fdt@ni169445"; 78 + }; 79 + }; 80 + }; 81 + #endif /* CONFIG_FIT_IMAGE_FDT_NI169445 */