Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Aug 2012 13:32:03 -0600
From:      Ian Lepore <freebsd@damnhippie.dyndns.org>
To:        freebsd-arm@freebsd.org
Subject:   Proposed patchset to support DreamPlug on freebsd 9 and 10.
Message-ID:  <1344108723.1128.80.camel@revolution.hippie.lan>

next in thread | raw e-mail | index | archive | help

--=-uPnEGGxJav7oGPCIWDeR
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

After exchanging a few emails with Richard yesterday we realized why I
had to put some tweaks on top of the patches he had posted... there are
two different flavors of a DreamPlug v10.  One of my co-workers has a
unit marked "1001" and it has NOR SPI flash, as does Richard's.  My unit
is marked "1001N" and has NAND flash (which makes it a bit like an
expanded GuruPlug).

This is going to drive the need for two separate .dts files and two
separate kernel configs.  I reworked the patchset I've been using for
9-stable and -current to move in this direction, and I'm attaching what
I've got so far as a proposal for handling this difference.

The attached patches don't include Hiroki's led driver, this is just
minimal dreamplug support on top of a fresh checkout of 9 or 10.  

I've also heard there are differences in the v0901 dreamplug units, but
I don't know what the differences are.  That might require yet another
set of config.

I broke the kernel config into 3 pieces... a DREAMPLUG-BASE that has
config for things that are dreamplug-specific and common to all
dreamplugs, and notably is not a GENERIC or kitchen-sink type config
file.  Then there are DREAMPLUG-1001 and -1001N config files that
include the -BASE file, and add other options to make a more fully
usable system.  I think there's plenty of room for changes and additions
to these -1001[N] files, such as IPFW and other things that you might
want right out of the box -- I do mainly embedded systems work, so I
don't know what most folks might want.

The config for the 1001N needs more work, notably more support for the
NAND flash in the .dts and kernel configs.  Since the whole reason I'm
playing with a dreamplug is to get some experience using nand flash,
I'll be working on that in the days to come.  I just wanted to get this
out there and see if folks think this is a workable direction for
supporting different dreamplug flavors.  

-- Ian


--=-uPnEGGxJav7oGPCIWDeR
Content-Disposition: attachment; filename="dreamplug_nandnor_head.diff"
Content-Type: text/x-patch; name="dreamplug_nandnor_head.diff";
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Add support for DreamPlug versions 1001 and 1001N (the latter has NAND flash
instead of NOR flash).  The pin assignements are different depending on the
type of flash, so separate .dts files are needed, which then drives the need
for separate kernel configs to include the different .dts files.

diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/conf/DREAMPLUG-1001
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ sys/arm/conf/DREAMPLUG-1001	Sat Aug 04 11:39:50 2012 -0600
@@ -0,0 +1,44 @@
+#
+# Kernel config for GlobalScale Technologies DreamPlug version 1001.
+#
+# This is for units that are version 10, revision 01, with NOR SPI flash.
+# These units are identified with the number "1001" on the S/N label.
+#
+# $FreeBSD:$
+#
+
+ident		DREAMPLUG-1001
+
+include		DREAMPLUG-BASE
+
+makeoptions	FDT_DTS_FILE=dreamplug-1001.dts
+
+makeoptions	MODULES_OVERRIDE=""
+
+# Enable these options for nfs root configured via BOOTP.
+options 	NFSCL			#Network Filesystem Client
+options 	NFSLOCKD		#Network Lock Manager
+options 	NFS_ROOT		#NFS usable as /, requires NFSCLIENT
+options 	BOOTP
+options 	BOOTP_NFSROOT
+options 	BOOTP_NFSV3
+options 	BOOTP_WIRED_TO=mge0
+
+# If not using BOOTP, use something like one of these...
+#options 	ROOTDEVNAME=\"ufs:/dev/da0a\"
+#options 	ROOTDEVNAME=\"ufs:/dev/da0s1a\"
+#options 	ROOTDEVNAME=\"ufs:/dev/da0p10\"
+#options 	ROOTDEVNAME=\"nfs:192.168.0.254/dreamplug\"
+
+# Debugging
+options 	BREAK_TO_DEBUGGER
+options 	ALT_BREAK_TO_DEBUGGER
+options 	DDB
+options 	KDB
+options 	DIAGNOSTIC
+options 	INVARIANTS		#Enable calls of extra sanity checking
+options 	INVARIANT_SUPPORT	#Extra sanity checks of internal structures, required by INVARIANTS
+#options 	WITNESS			#Enable checks to detect deadlocks and cycles
+#options 	WITNESS_SKIPSPIN	#Don't run witness on spinlocks for speed
+#options 	WITNESS_KDB
+
diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/conf/DREAMPLUG-1001N
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ sys/arm/conf/DREAMPLUG-1001N	Sat Aug 04 11:39:50 2012 -0600
@@ -0,0 +1,44 @@
+#
+# Kernel config for GlobalScale Technologies DreamPlug version 1001N.
+#
+# This is for units that are version 10, revision 01, with NAND flash.
+# These units are identified with the number "1001N" on the S/N label.
+#
+# $FreeBSD:$
+#
+
+ident		DREAMPLUG-1001N
+
+include		DREAMPLUG-BASE
+
+makeoptions	FDT_DTS_FILE=dreamplug-1001N.dts
+
+makeoptions	MODULES_OVERRIDE=""
+
+# Enable these options for nfs root configured via BOOTP.
+options 	NFSCL			#Network Filesystem Client
+options 	NFSLOCKD		#Network Lock Manager
+options 	NFS_ROOT		#NFS usable as /, requires NFSCLIENT
+options 	BOOTP
+options 	BOOTP_NFSROOT
+options 	BOOTP_NFSV3
+options 	BOOTP_WIRED_TO=mge0
+
+# If not using BOOTP, use something like one of these...
+#options 	ROOTDEVNAME=\"ufs:/dev/da0a\"
+#options 	ROOTDEVNAME=\"ufs:/dev/da0s1a\"
+#options 	ROOTDEVNAME=\"ufs:/dev/da0p10\"
+#options 	ROOTDEVNAME=\"nfs:192.168.0.254/dreamplug\"
+
+# Debugging
+options 	BREAK_TO_DEBUGGER
+options 	ALT_BREAK_TO_DEBUGGER
+options 	DDB
+options 	KDB
+options 	DIAGNOSTIC
+options 	INVARIANTS		#Enable calls of extra sanity checking
+options 	INVARIANT_SUPPORT	#Extra sanity checks of internal structures, required by INVARIANTS
+#options 	WITNESS			#Enable checks to detect deadlocks and cycles
+#options 	WITNESS_SKIPSPIN	#Don't run witness on spinlocks for speed
+#options 	WITNESS_KDB
+
diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/conf/DREAMPLUG-BASE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ sys/arm/conf/DREAMPLUG-BASE	Sat Aug 04 11:39:50 2012 -0600
@@ -0,0 +1,70 @@
+#
+# Kernel config common to all versions of GlobalScale Technologies DreamPlug.
+#
+# $FreeBSD: $
+#
+
+include		"../mv/kirkwood/std.dreamplug"
+
+options 	SOC_MV_KIRKWOOD
+
+options 	SCHED_4BSD		#4BSD scheduler
+options 	INET			#InterNETworking
+options 	INET6			#IPv6 communications protocols
+options 	FFS			#Berkeley Fast Filesystem
+options 	SYSVSHM			#SYSV-style shared memory
+options 	SYSVMSG			#SYSV-style message queues
+options 	SYSVSEM			#SYSV-style semaphores
+options 	_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
+options 	NO_SWAPPING
+options 	GEOM_PART_GPT
+options 	GEOM_PART_MBR
+
+# Flattened Device Tree
+device		fdt
+options 	FDT
+options 	FDT_DTB_STATIC
+
+# Pseudo devices
+device		loop
+device		md
+device		pty
+device		random
+
+# cam support for umass and ahci
+device		scbus
+device		pass
+device		da
+
+# Onboard hardware from here down...
+
+#device		pci	# Chipset has pci, but DreamPlug doesn't expose it.
+
+# Serial ports
+device		uart
+
+# Networking
+device		ether
+device		mge			# Marvell Gigabit Ethernet controller
+device		mii
+device		e1000phy
+device		bpf
+
+# USB
+device		usb
+device		ehci
+device		umass
+device		uhid
+
+# I2C (TWSI)
+device		iic
+device		iicbus
+
+# SATA
+device		mvs
+device		ahci
+
+# Sound
+device 		sound
+device 		snd_uaudio
+
diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/mv/kirkwood/dreamplug.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ sys/arm/mv/kirkwood/dreamplug.c	Sat Aug 04 11:39:50 2012 -0600
@@ -0,0 +1,45 @@
+/*-
+ * Copyright (c) 2010 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * This software was developed by Semihalf under sponsorship from
+ * the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD:$");
+
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+
+#include <machine/fdt.h>
+
+int
+fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, 
+    vm_offset_t io_va, vm_offset_t mem_va)
+{
+
+	return (0);
+}
+
diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/mv/kirkwood/files.dreamplug
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ sys/arm/mv/kirkwood/files.dreamplug	Sat Aug 04 11:39:50 2012 -0600
@@ -0,0 +1,4 @@
+# $FreeBSD:$
+
+include "arm/mv/kirkwood/files.kirkwood"
+arm/mv/kirkwood/dreamplug.c	standard
diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/mv/kirkwood/std.dreamplug
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ sys/arm/mv/kirkwood/std.dreamplug	Sat Aug 04 11:39:50 2012 -0600
@@ -0,0 +1,5 @@
+# $FreeBSD:$
+
+include	"../mv/std.mv"
+include "../mv/kirkwood/std.kirkwood"
+files	"../mv/kirkwood/files.dreamplug"
diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/mv/mvwin.h
--- sys/arm/mv/mvwin.h	Fri Aug 03 13:40:29 2012 -0600
+++ sys/arm/mv/mvwin.h	Sat Aug 04 11:39:50 2012 -0600
@@ -133,8 +133,8 @@
 #define MV_WIN_CESA_ATTR		0
 #endif
 
-#define MV_WIN_USB_CTRL(n)		(0x10 * (n) + 0x0)
-#define MV_WIN_USB_BASE(n)		(0x10 * (n) + 0x4)
+#define MV_WIN_USB_CTRL(n)		(0x10 * (n) + 0x320)
+#define MV_WIN_USB_BASE(n)		(0x10 * (n) + 0x324)
 #define MV_WIN_USB_MAX			4
 
 #define MV_WIN_ETH_BASE(n)		(0x8 * (n) + 0x200)
diff -r c6cae9d38404 -r 44bec77dc670 sys/boot/fdt/dts/dreamplug-1001.dts
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ sys/boot/fdt/dts/dreamplug-1001.dts	Sat Aug 04 11:39:50 2012 -0600
@@ -0,0 +1,325 @@
+/*
+ * Copyright (c) 2010 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * This software was developed by Semihalf under sponsorship from
+ * the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * GlobalScale Technologies DreamPlug Device Tree Source.
+ *
+ * This source is for version 10 revision 01 units with NOR SPI flash.
+ * These units are marked "1001" on the serial number label.
+ *
+ * $FreeBSD$
+ */
+
+/dts-v1/;
+
+/ {
+	model = "GlobalScale Technologies Dreamplug";
+	compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	aliases {
+		ethernet0 = &enet0;
+		ethernet1 = &enet1;
+		mpp = &MPP;
+		serial0 = &serial0;
+		serial1 = &serial1;
+		soc = &SOC;
+		sram = &SRAM;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "ARM,88FR131";
+			reg = <0x0>;
+			d-cache-line-size = <32>;	// 32 bytes
+			i-cache-line-size = <32>;	// 32 bytes
+			d-cache-size = <0x4000>;	// L1, 16K
+			i-cache-size = <0x4000>;	// L1, 16K
+			timebase-frequency = <0>;
+			bus-frequency = <0>;
+			clock-frequency = <0>;
+		};
+
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x0 0x20000000>;		// 512M at 0x0
+	};
+
+	localbus@f1000000 {
+		#address-cells = <2>;
+		#size-cells = <1>;
+		compatible = "mrvl,lbc";
+
+		/* This reflects CPU decode windows setup. */
+		ranges = <0x0 0x0f 0xf9300000 0x00100000
+			  0x1 0x1e 0xfa000000 0x00100000
+			  0x2 0x1d 0xfa100000 0x02000000
+			  0x3 0x1b 0xfc100000 0x00000400>;
+
+		nor@0,0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "cfi-flash";
+			reg = <0x0 0x0 0x00100000>;
+			bank-width = <2>;
+			device-width = <1>;
+		};
+
+		led@1,0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "led";
+			reg = <0x1 0x0 0x00100000>;
+		};
+
+		nor@2,0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "cfi-flash";
+			reg = <0x2 0x0 0x02000000>;
+			bank-width = <2>;
+			device-width = <1>;
+		};
+	};
+
+	SOC: soc88f6281@f1000000 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "simple-bus";
+		ranges = <0x0 0xf1000000 0x00100000>;
+		bus-frequency = <0>;
+
+		PIC: pic@20200 {
+			interrupt-controller;
+			#address-cells = <0>;
+			#interrupt-cells = <1>;
+			reg = <0x20200 0x3c>;
+			compatible = "mrvl,pic";
+		};
+
+		timer@20300 {
+			compatible = "mrvl,timer";
+			reg = <0x20300 0x30>;
+			interrupts = <1>;
+			interrupt-parent = <&PIC>;
+			mrvl,has-wdt;
+		};
+
+		MPP: mpp@10000 {
+			#pin-cells = <2>;
+			compatible = "mrvl,mpp";
+			reg = <0x10000 0x34>;
+			pin-count = <50>;
+			pin-map = <
+				0  2		/* MPP[0]:  SPI_SCn */
+				1  2		/* MPP[1]:  SPI_MOSI */
+				2  2		/* MPP[2]:  SPI_SCK */
+				3  2		/* MPP[3]:  SPI_MISO */
+				6  1		/* MPP[6]:  SYSRST_OUTn */
+				8  2		/* MPP[8]:  UA0_RTS */
+				9  2		/* MPP[9]:  UA0_CTS */
+				10 3		/* MPP[10]: UA0_TXD */
+				11 3		/* MPP[11]: UA0_RXD */
+				12 1		/* MPP[12]: SD_CLK */
+				13 1		/* MPP[13]: SD_CMD */
+				14 1		/* MPP[14]: SD_D[0] */
+				15 1		/* MPP[17]: SD_D[1] */
+				20 3		/* MPP[20]: GE1[ 0] */
+				21 3		/* MPP[21]: GE1[ 1] */
+				22 3		/* MPP[22]: GE1[ 2] */
+				23 3		/* MPP[23]: GE1[ 3] */
+				24 3		/* MPP[24]: GE1[ 4] */
+				25 3		/* MPP[25]: GE1[ 5] */
+				26 3		/* MPP[26]: GE1[ 6] */
+				27 3		/* MPP[27]: GE1[ 7] */
+				28 3		/* MPP[28]: GE1[ 8] */
+				29 3		/* MPP[29]: GE1[ 9] */
+				30 3		/* MPP[30]: GE1[10] */
+				31 3		/* MPP[31]: GE1[11] */
+				32 3		/* MPP[32]: GE1[12] */
+				33 3		/* MPP[33]: GE1[13] */
+				34 3		/* MPP[34]: GE1[14] */
+				35 3		/* MPP[35]: GE1[15] */
+				37 4		/* MPP[37]: AU_SPDIFO */
+				38 4		/* MPP[38]: AU_SPDOFRMCLK */
+				39 4		/* MPP[39]: AU_I2SBCLK */
+				40 4		/* MPP[40]: AU_I2SDO */
+				41 4		/* MPP[41]: AU_I2SLRCLK */
+				42 4		/* MPP[42]: AU_I2SMCLK */
+				43 4		/* MPP[43]: AU_I2SDI */
+				44 4		/* MPP[44]: AU_EXTCLK */
+				47 0		/* MPP[47]: GPIO[47] BT LED */
+				48 0		/* MPP[48]: GPIO[48] WLAN LED */
+				49 0>;		/* MPP[49]: GPIO[49] WLAN AP */
+		};
+
+		GPIO: gpio@10100 {
+			#gpio-cells = <3>;
+			compatible = "mrvl,gpio";
+			reg = <0x10100 0x20>;
+			gpio-controller;
+			interrupts = <35 36 37 38 39 40 41>;
+			interrupt-parent = <&PIC>;
+			pin-count = <50>;
+		};
+
+		gpioled@0 {
+			compatible = "mrvl,gpioled";
+
+			gpios = <&GPIO 47 2 0	/* GPIO[47] BT LED: OUT */
+				 &GPIO 48 2 0	/* GPIO[48] WLAN LED: OUT */
+				 &GPIO 49 2 0>;	/* GPIO[49] WLAN AP LED: OUT */
+		};
+
+		rtc@10300 {
+			compatible = "mrvl,rtc";
+			reg = <0x10300 0x08>;
+		};
+
+		twsi@11000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "mrvl,twsi";
+			reg = <0x11000 0x20>;
+			interrupts = <43>;
+			interrupt-parent = <&PIC>;
+		};
+
+		enet0: ethernet@72000 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			model = "V2";
+			compatible = "mrvl,ge";
+			reg = <0x72000 0x2000>;
+			ranges = <0x0 0x72000 0x2000>;
+			local-mac-address = [ 00 00 00 00 00 00 ];
+			interrupts = <12 13 14 11 46>;
+			interrupt-parent = <&PIC>;
+			phy-handle = <&phy0>;
+
+			mdio@0 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "mrvl,mdio";
+
+				phy0: ethernet-phy@0 {
+					reg = <0x0>;
+				};
+
+				phy1: ethernet-phy@1 {
+					reg = <0x1>;
+				};
+			};
+		};
+
+		enet1: ethernet@76000 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			model = "V2";
+			compatible = "mrvl,ge";
+			reg = <0x76000 0x02000>;
+			ranges = <0x0 0x76000 0x2000>;
+			local-mac-address = [ 00 00 00 00 00 00 ];
+			interrupts = <16 17 18 15 47>;
+			interrupt-parent = <&PIC>;
+			phy-handle = <&phy1>;
+		};
+
+		serial0: serial@12000 {
+			compatible = "ns16550";
+			reg = <0x12000 0x20>;
+			reg-shift = <2>;
+			clock-frequency = <0>;
+			interrupts = <33>;
+			interrupt-parent = <&PIC>;
+		};
+
+		serial1: serial@12100 {
+			compatible = "ns16550";
+			reg = <0x12100 0x20>;
+			reg-shift = <2>;
+			clock-frequency = <0>;
+			interrupts = <34>;
+			interrupt-parent = <&PIC>;
+		};
+
+		crypto@30000 {
+			compatible = "mrvl,cesa";
+			reg = <0x30000 0x10000>;
+			interrupts = <22>;
+			interrupt-parent = <&PIC>;
+
+			sram-handle = <&SRAM>;
+		};
+
+		usb@50000 {
+			compatible = "mrvl,usb-ehci", "usb-ehci";
+			reg = <0x50000 0x1000>;
+			interrupts = <48 19>;
+			interrupt-parent = <&PIC>;
+		};
+
+		xor@60000 {
+			compatible = "mrvl,xor";
+			reg = <0x60000 0x1000>;
+			interrupts = <5 6 7 8>;
+			interrupt-parent = <&PIC>;
+		};
+
+		sata@80000 {
+			compatible = "mrvl,sata";
+			reg = <0x80000 0x6000>;
+			interrupts = <21>;
+			interrupt-parent = <&PIC>;
+		};
+
+		sdio@90000 {
+			compatible = "mrvl,sdio";
+			reg = <0x90000 0x134>;
+			interrupts = <28>;
+			interrupt-parent = <&PIC>;
+		};
+	};
+
+	SRAM: sram@fd000000 {
+		compatible = "mrvl,cesa-sram";
+		reg = <0xfd000000 0x00100000>;
+	};
+
+	chosen {
+		stdin = "serial0";
+		stdout = "serial0";
+	};
+
+};
diff -r c6cae9d38404 -r 44bec77dc670 sys/boot/fdt/dts/dreamplug-1001N.dts
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ sys/boot/fdt/dts/dreamplug-1001N.dts	Sat Aug 04 11:39:50 2012 -0600
@@ -0,0 +1,336 @@
+/*
+ * Copyright (c) 2010 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * This software was developed by Semihalf under sponsorship from
+ * the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * GlobalScale Technologies DreamPlug Device Tree Source.
+ *
+ * This source is for version 10 revision 01 units with NAND flash.
+ * These units are marked "1001N" on the serial number label.
+ *
+ * $FreeBSD$
+ */
+
+/dts-v1/;
+
+/ {
+	model = "GlobalScale Technologies Dreamplug v1001N";
+	compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	aliases {
+		ethernet0 = &enet0;
+		ethernet1 = &enet1;
+		mpp = &MPP;
+		serial0 = &serial0;
+		serial1 = &serial1;
+		soc = &SOC;
+		sram = &SRAM;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "ARM,88FR131";
+			reg = <0x0>;
+			d-cache-line-size = <32>;	// 32 bytes
+			i-cache-line-size = <32>;	// 32 bytes
+			d-cache-size = <0x4000>;	// L1, 16K
+			i-cache-size = <0x4000>;	// L1, 16K
+			timebase-frequency = <0>;
+			bus-frequency = <0>;
+			clock-frequency = <0>;
+		};
+
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x0 0x20000000>;		// 512M at 0x0
+	};
+
+	localbus@f1000000 {
+		#address-cells = <2>;
+		#size-cells = <1>;
+		compatible = "mrvl,lbc";
+
+		/* This reflects CPU decode windows setup. */
+		ranges = <0x0 0x0f 0xf9300000 0x00100000
+			  0x1 0x1e 0xfa000000 0x00100000
+			  0x2 0x1d 0xfa100000 0x02000000
+			  0x3 0x1b 0xfc100000 0x00000400>;
+
+		nor@0,0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "cfi-flash";
+			reg = <0x0 0x0 0x00100000>;
+			bank-width = <2>;
+			device-width = <1>;
+		};
+
+		led@1,0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "led";
+			reg = <0x1 0x0 0x00100000>;
+		};
+
+		nor@2,0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "cfi-flash";
+			reg = <0x2 0x0 0x02000000>;
+			bank-width = <2>;
+			device-width = <1>;
+		};
+	};
+
+	SOC: soc88f6281@f1000000 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "simple-bus";
+		ranges = <0x0 0xf1000000 0x00100000>;
+		bus-frequency = <0>;
+
+		PIC: pic@20200 {
+			interrupt-controller;
+			#address-cells = <0>;
+			#interrupt-cells = <1>;
+			reg = <0x20200 0x3c>;
+			compatible = "mrvl,pic";
+		};
+
+		timer@20300 {
+			compatible = "mrvl,timer";
+			reg = <0x20300 0x30>;
+			interrupts = <1>;
+			interrupt-parent = <&PIC>;
+			mrvl,has-wdt;
+		};
+
+		MPP: mpp@10000 {
+			#pin-cells = <2>;
+			compatible = "mrvl,mpp";
+			reg = <0x10000 0x34>;
+			pin-count = <50>;
+			pin-map = <
+				 0 1		/* MPP[ 0]: NF_IO[2] */
+				 1 1		/* MPP[ 1]: NF_IO[3] */
+				 2 1		/* MPP[ 2]: NF_IO[4] */
+				 3 1		/* MPP[ 3]: NF_IO[5] */
+				 4 1		/* MPP[ 4]: NF_IO[6] */
+				 5 1		/* MPP[ 5]: NF_IO[7] */
+				 6 1		/* MPP[ 6]: SYSRST_OUTn */
+				 7 0		/* MPP[ 7]: GPO[7] */
+				 8 1		/* MPP[ 8]: TW_SDA */
+				 9 1		/* MPP[ 9]: TW_SCK */
+				10 3		/* MPP[10]: UA0_TXD */
+				11 3		/* MPP[11]: US0_RXD */
+				12 1		/* MPP[12]: SD_CLK */
+				13 1		/* MPP[13]: SD_CMD */
+				14 1		/* MPP[14]: SD_D[0] */
+				15 1		/* MPP[15]: SD_D[1] */
+				16 1		/* MPP[16]: SD_D[2] */
+				17 1		/* MPP[17]: SD_D[3] */
+				18 1		/* MPP[18]: NF_IO[0] */
+				19 1		/* MPP[19]: NF_IO[1] */
+				20 3		/* MPP[20]: GE1[ 0] */
+				21 3		/* MPP[21]: GE1[ 1] */
+				22 3		/* MPP[22]: GE1[ 2] */
+				23 3		/* MPP[23]: GE1[ 3] */
+				24 3		/* MPP[24]: GE1[ 4] */
+				25 3		/* MPP[25]: GE1[ 5] */
+				26 3		/* MPP[26]: GE1[ 6] */
+				27 3		/* MPP[27]: GE1[ 7] */
+				28 3		/* MPP[28]: GE1[ 8] */
+				29 3		/* MPP[29]: GE1[ 9] */
+				30 3		/* MPP[30]: GE1[10] */
+				31 3		/* MPP[31]: GE1[11] */
+				32 3		/* MPP[32]: GE1[12] */
+				33 3		/* MPP[33]: GE1[13] */
+				34 3		/* MPP[34]: GE1[14] */
+				35 3		/* MPP[35]: GE1[15] */
+				36 0		/* MPP[36]: GPIO[36] */
+				37 0		/* MPP[37]: GPIO[37] */
+				38 0		/* MPP[38]: GPIO[38] */
+				39 0		/* MPP[39]: GPIO[39] */
+				40 2		/* MPP[40]: TDM_SPI_SCK */
+				41 2		/* MPP[41]: TDM_SPI_MISO */
+				42 2		/* MPP[42]: TDM_SPI_MOSI */
+				43 0		/* MPP[43]: GPIO[43] */
+				44 0		/* MPP[44]: GPIO[44] */
+				45 0		/* MPP[45]: GPIO[45] */
+				46 0		/* MPP[46]: GPIO[46] */
+				47 0		/* MPP[47]: GPIO[47] */
+				48 0		/* MPP[48]: GPIO[48] */
+				49 0		/* MPP[49]: GPIO[49] */
+				>;
+		};
+
+		GPIO: gpio@10100 {
+			#gpio-cells = <3>;
+			compatible = "mrvl,gpio";
+			reg = <0x10100 0x20>;
+			gpio-controller;
+			interrupts = <35 36 37 38 39 40 41>;
+			interrupt-parent = <&PIC>;
+			pin-count = <50>;
+		};
+
+		gpioled@0 {
+			compatible = "mrvl,gpioled";
+
+			gpios = <&GPIO 47 2 0	/* GPIO[47] BT LED: OUT */
+				 &GPIO 48 2 0	/* GPIO[48] WLAN LED: OUT */
+				 &GPIO 49 2 0>;	/* GPIO[49] WLAN AP LED: OUT */
+		};
+
+		rtc@10300 {
+			compatible = "mrvl,rtc";
+			reg = <0x10300 0x08>;
+		};
+
+		twsi@11000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "mrvl,twsi";
+			reg = <0x11000 0x20>;
+			interrupts = <43>;
+			interrupt-parent = <&PIC>;
+		};
+
+		enet0: ethernet@72000 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			model = "V2";
+			compatible = "mrvl,ge";
+			reg = <0x72000 0x2000>;
+			ranges = <0x0 0x72000 0x2000>;
+			local-mac-address = [ 00 00 00 00 00 00 ];
+			interrupts = <12 13 14 11 46>;
+			interrupt-parent = <&PIC>;
+			phy-handle = <&phy0>;
+
+			mdio@0 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "mrvl,mdio";
+
+				phy0: ethernet-phy@0 {
+					reg = <0x0>;
+				};
+
+				phy1: ethernet-phy@1 {
+					reg = <0x1>;
+				};
+			};
+		};
+
+		enet1: ethernet@76000 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			model = "V2";
+			compatible = "mrvl,ge";
+			reg = <0x76000 0x02000>;
+			ranges = <0x0 0x76000 0x2000>;
+			local-mac-address = [ 00 00 00 00 00 00 ];
+			interrupts = <16 17 18 15 47>;
+			interrupt-parent = <&PIC>;
+			phy-handle = <&phy1>;
+		};
+
+		serial0: serial@12000 {
+			compatible = "ns16550";
+			reg = <0x12000 0x20>;
+			reg-shift = <2>;
+			clock-frequency = <0>;
+			interrupts = <33>;
+			interrupt-parent = <&PIC>;
+		};
+
+		serial1: serial@12100 {
+			compatible = "ns16550";
+			reg = <0x12100 0x20>;
+			reg-shift = <2>;
+			clock-frequency = <0>;
+			interrupts = <34>;
+			interrupt-parent = <&PIC>;
+		};
+
+		crypto@30000 {
+			compatible = "mrvl,cesa";
+			reg = <0x30000 0x10000>;
+			interrupts = <22>;
+			interrupt-parent = <&PIC>;
+
+			sram-handle = <&SRAM>;
+		};
+
+		usb@50000 {
+			compatible = "mrvl,usb-ehci", "usb-ehci";
+			reg = <0x50000 0x1000>;
+			interrupts = <48 19>;
+			interrupt-parent = <&PIC>;
+		};
+
+		xor@60000 {
+			compatible = "mrvl,xor";
+			reg = <0x60000 0x1000>;
+			interrupts = <5 6 7 8>;
+			interrupt-parent = <&PIC>;
+		};
+
+		sata@80000 {
+			compatible = "mrvl,sata";
+			reg = <0x80000 0x6000>;
+			interrupts = <21>;
+			interrupt-parent = <&PIC>;
+		};
+
+		sdio@90000 {
+			compatible = "mrvl,sdio";
+			reg = <0x90000 0x134>;
+			interrupts = <28>;
+			interrupt-parent = <&PIC>;
+		};
+	};
+
+	SRAM: sram@fd000000 {
+		compatible = "mrvl,cesa-sram";
+		reg = <0xfd000000 0x00100000>;
+	};
+
+	chosen {
+		stdin = "serial0";
+		stdout = "serial0";
+	};
+
+};

--=-uPnEGGxJav7oGPCIWDeR--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1344108723.1128.80.camel>