From: Nathan Sullivan <nathan.sullivan@ni.com> To: <linus.walleij@linaro.org>, <gnurou@gmail.com>, <mark.rutland@arm.com>, <devicetree@vger.kernel.org>, <robh+dt@kernel.org>, <ralf@linux-mips.org> Cc: <linux-kernel@vger.kernel.org>, <linux-gpio@vger.kernel.org>, <linux-mips@linux-mips.org>, Nathan Sullivan <nathan.sullivan@ni.com> Subject: [PATCH 2/2] MIPS: NI 169445 board support Date: Tue, 14 Mar 2017 11:13:23 -0500 [thread overview] Message-ID: <1489508003-25288-3-git-send-email-nathan.sullivan@ni.com> (raw) In-Reply-To: <1489508003-25288-1-git-send-email-nathan.sullivan@ni.com> Support the National Instruments 169445 board. Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com> --- 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 diff --git a/Documentation/devicetree/bindings/mips/ni.txt b/Documentation/devicetree/bindings/mips/ni.txt new file mode 100644 index 0000000..722bf2d --- /dev/null +++ b/Documentation/devicetree/bindings/mips/ni.txt @@ -0,0 +1,7 @@ +National Instruments MIPS platforms + +required root node properties: + - compatible: must be "ni,169445" + +CPU Nodes + - compatible: must be "mti,mips14KEc" diff --git a/MAINTAINERS b/MAINTAINERS index c265a5f..b72f059 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8887,6 +8887,14 @@ F: include/linux/sunrpc/ F: include/uapi/linux/nfs* F: include/uapi/linux/sunrpc/ +NI169445 MIPS ARCHITECTURE +M: Nathan Sullivan <nathan.sullivan@ni.com> +L: linux-mips@linux-mips.org +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 <konishi.ryusuke@lab.ntt.co.jp> L: linux-nilfs@vger.kernel.org diff --git a/arch/mips/boot/dts/Makefile b/arch/mips/boot/dts/Makefile index b9db492..27b0f37 100644 --- a/arch/mips/boot/dts/Makefile +++ b/arch/mips/boot/dts/Makefile @@ -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 diff --git a/arch/mips/boot/dts/ni/169445.dts b/arch/mips/boot/dts/ni/169445.dts new file mode 100644 index 0000000..9746576 --- /dev/null +++ b/arch/mips/boot/dts/ni/169445.dts @@ -0,0 +1,100 @@ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "ni,169445"; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + cpu@0 { + device_type = "cpu"; + compatible = "mti,mips14KEc"; + clocks = <&baseclk>; + reg = <0>; + }; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x10000000>; + }; + + baseclk: baseclock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <50000000>; + }; + + cpu_intc: cpu_intc { + #address-cells = <0>; + compatible = "mti,cpu-interrupt-controller"; + interrupt-controller; + #interrupt-cells = <1>; + }; + + ahb@0 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x1f300000 0x80FFF>; + + gpio1:gpio-controller@1f300010 { + compatible = "ni,169445-nand-gpio"; + reg = <0x10 0x4>; + reg-names = "dat"; + gpio-controller; + #gpio-cells = <2>; + }; + + gpio2:gpio-controller@1f300014 { + compatible = "ni,169445-nand-gpio"; + reg = <0x14 0x4>; + reg-names = "dat"; + gpio-controller; + #gpio-cells = <2>; + no-output; + }; + + nand@1f300000 { + compatible = "gpio-control-nand"; + nand-on-flash-bbt; + nand-ecc-mode = "soft_bch"; + nand-ecc-step-size = <512>; + nand-ecc-strength = <4>; + reg = <0x0 4>; + gpios = <&gpio2 0 0>, /* rdy */ + <&gpio1 1 0>, /* nce */ + <&gpio1 2 0>, /* ale */ + <&gpio1 3 0>, /* cle */ + <&gpio1 4 0>; /* nwp */ + }; + + serial@1f380000 { + compatible = "ns16550a"; + reg = <0x80000 0x1000>; + interrupt-parent = <&cpu_intc>; + interrupts = <6>; + clocks = <&baseclk>; + reg-shift = <0>; + }; + + ethernet@1f340000 { + compatible = "snps,dwmac-4.10a"; + interrupt-parent = <&cpu_intc>; + interrupts = <5>; + interrupt-names = "macirq"; + reg = <0x40000 0x2000>; + clock-names = "stmmaceth", "pclk"; + clocks = <&baseclk>, <&baseclk>; + + phy-mode = "rgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; diff --git a/arch/mips/boot/dts/ni/Makefile b/arch/mips/boot/dts/ni/Makefile new file mode 100644 index 0000000..66cfdff --- /dev/null +++ b/arch/mips/boot/dts/ni/Makefile @@ -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 diff --git a/arch/mips/configs/generic/board-ni169445.config b/arch/mips/configs/generic/board-ni169445.config new file mode 100644 index 0000000..0bae1f8 --- /dev/null +++ b/arch/mips/configs/generic/board-ni169445.config @@ -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 diff --git a/arch/mips/generic/Kconfig b/arch/mips/generic/Kconfig index a606b3f..fbf0813 100644 --- a/arch/mips/generic/Kconfig +++ b/arch/mips/generic/Kconfig @@ -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 diff --git a/arch/mips/generic/vmlinux.its.S b/arch/mips/generic/vmlinux.its.S index f67fbf1..de851f7 100644 --- a/arch/mips/generic/vmlinux.its.S +++ b/arch/mips/generic/vmlinux.its.S @@ -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 -- 2.1.4
WARNING: multiple messages have this Message-ID (diff)
From: Nathan Sullivan <nathan.sullivan@ni.com> To: linus.walleij@linaro.org, gnurou@gmail.com, mark.rutland@arm.com, devicetree@vger.kernel.org, robh+dt@kernel.org, ralf@linux-mips.org Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-mips@linux-mips.org, Nathan Sullivan <nathan.sullivan@ni.com> Subject: [PATCH 2/2] MIPS: NI 169445 board support Date: Tue, 14 Mar 2017 11:13:23 -0500 [thread overview] Message-ID: <1489508003-25288-3-git-send-email-nathan.sullivan@ni.com> (raw) Message-ID: <20170314161323.2L3xJ4XezFxUv_IwbHxjWUpqcYpJhVWZSe1teuKSp9E@z> (raw) In-Reply-To: <1489508003-25288-1-git-send-email-nathan.sullivan@ni.com> Support the National Instruments 169445 board. Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com> --- 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 diff --git a/Documentation/devicetree/bindings/mips/ni.txt b/Documentation/devicetree/bindings/mips/ni.txt new file mode 100644 index 0000000..722bf2d --- /dev/null +++ b/Documentation/devicetree/bindings/mips/ni.txt @@ -0,0 +1,7 @@ +National Instruments MIPS platforms + +required root node properties: + - compatible: must be "ni,169445" + +CPU Nodes + - compatible: must be "mti,mips14KEc" diff --git a/MAINTAINERS b/MAINTAINERS index c265a5f..b72f059 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8887,6 +8887,14 @@ F: include/linux/sunrpc/ F: include/uapi/linux/nfs* F: include/uapi/linux/sunrpc/ +NI169445 MIPS ARCHITECTURE +M: Nathan Sullivan <nathan.sullivan@ni.com> +L: linux-mips@linux-mips.org +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 <konishi.ryusuke@lab.ntt.co.jp> L: linux-nilfs@vger.kernel.org diff --git a/arch/mips/boot/dts/Makefile b/arch/mips/boot/dts/Makefile index b9db492..27b0f37 100644 --- a/arch/mips/boot/dts/Makefile +++ b/arch/mips/boot/dts/Makefile @@ -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 diff --git a/arch/mips/boot/dts/ni/169445.dts b/arch/mips/boot/dts/ni/169445.dts new file mode 100644 index 0000000..9746576 --- /dev/null +++ b/arch/mips/boot/dts/ni/169445.dts @@ -0,0 +1,100 @@ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "ni,169445"; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + cpu@0 { + device_type = "cpu"; + compatible = "mti,mips14KEc"; + clocks = <&baseclk>; + reg = <0>; + }; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x10000000>; + }; + + baseclk: baseclock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <50000000>; + }; + + cpu_intc: cpu_intc { + #address-cells = <0>; + compatible = "mti,cpu-interrupt-controller"; + interrupt-controller; + #interrupt-cells = <1>; + }; + + ahb@0 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x1f300000 0x80FFF>; + + gpio1:gpio-controller@1f300010 { + compatible = "ni,169445-nand-gpio"; + reg = <0x10 0x4>; + reg-names = "dat"; + gpio-controller; + #gpio-cells = <2>; + }; + + gpio2:gpio-controller@1f300014 { + compatible = "ni,169445-nand-gpio"; + reg = <0x14 0x4>; + reg-names = "dat"; + gpio-controller; + #gpio-cells = <2>; + no-output; + }; + + nand@1f300000 { + compatible = "gpio-control-nand"; + nand-on-flash-bbt; + nand-ecc-mode = "soft_bch"; + nand-ecc-step-size = <512>; + nand-ecc-strength = <4>; + reg = <0x0 4>; + gpios = <&gpio2 0 0>, /* rdy */ + <&gpio1 1 0>, /* nce */ + <&gpio1 2 0>, /* ale */ + <&gpio1 3 0>, /* cle */ + <&gpio1 4 0>; /* nwp */ + }; + + serial@1f380000 { + compatible = "ns16550a"; + reg = <0x80000 0x1000>; + interrupt-parent = <&cpu_intc>; + interrupts = <6>; + clocks = <&baseclk>; + reg-shift = <0>; + }; + + ethernet@1f340000 { + compatible = "snps,dwmac-4.10a"; + interrupt-parent = <&cpu_intc>; + interrupts = <5>; + interrupt-names = "macirq"; + reg = <0x40000 0x2000>; + clock-names = "stmmaceth", "pclk"; + clocks = <&baseclk>, <&baseclk>; + + phy-mode = "rgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; diff --git a/arch/mips/boot/dts/ni/Makefile b/arch/mips/boot/dts/ni/Makefile new file mode 100644 index 0000000..66cfdff --- /dev/null +++ b/arch/mips/boot/dts/ni/Makefile @@ -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 diff --git a/arch/mips/configs/generic/board-ni169445.config b/arch/mips/configs/generic/board-ni169445.config new file mode 100644 index 0000000..0bae1f8 --- /dev/null +++ b/arch/mips/configs/generic/board-ni169445.config @@ -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 diff --git a/arch/mips/generic/Kconfig b/arch/mips/generic/Kconfig index a606b3f..fbf0813 100644 --- a/arch/mips/generic/Kconfig +++ b/arch/mips/generic/Kconfig @@ -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 diff --git a/arch/mips/generic/vmlinux.its.S b/arch/mips/generic/vmlinux.its.S index f67fbf1..de851f7 100644 --- a/arch/mips/generic/vmlinux.its.S +++ b/arch/mips/generic/vmlinux.its.S @@ -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 -- 2.1.4
next prev parent reply other threads:[~2017-03-14 16:14 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-03-14 16:13 [PATCH v4] NI 169445 board support Nathan Sullivan 2017-03-14 16:13 ` Nathan Sullivan 2017-03-14 16:13 ` [PATCH 1/2] gpio: mmio: add support for NI 169445 NAND GPIO Nathan Sullivan 2017-03-14 16:13 ` Nathan Sullivan 2017-03-23 8:49 ` Linus Walleij 2017-03-14 16:13 ` Nathan Sullivan [this message] 2017-03-14 16:13 ` [PATCH 2/2] MIPS: NI 169445 board support Nathan Sullivan 2017-03-23 22:29 ` Rob Herring 2017-03-24 14:46 ` Nathan Sullivan 2017-03-24 14:46 ` Nathan Sullivan -- strict thread matches above, loose matches on Subject: below -- 2017-03-08 19:35 [PATCH v3] " Nathan Sullivan 2017-03-08 19:35 ` [PATCH 2/2] MIPS: " Nathan Sullivan 2017-03-08 19:35 ` Nathan Sullivan 2017-03-06 20:05 [PATCH v2] " Nathan Sullivan 2017-03-06 20:06 ` [PATCH 2/2] " Nathan Sullivan 2017-03-06 20:06 ` Nathan Sullivan 2017-03-06 23:04 ` James Hogan 2017-03-06 23:04 ` James Hogan 2017-03-06 23:14 ` Nathan Sullivan 2017-03-06 23:14 ` Nathan Sullivan 2017-03-15 9:37 ` Linus Walleij
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1489508003-25288-3-git-send-email-nathan.sullivan@ni.com \ --to=nathan.sullivan@ni.com \ --cc=devicetree@vger.kernel.org \ --cc=gnurou@gmail.com \ --cc=linus.walleij@linaro.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mips@linux-mips.org \ --cc=mark.rutland@arm.com \ --cc=ralf@linux-mips.org \ --cc=robh+dt@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).