Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jul 2012 11:29:11 -0400
From:      Richard E Neese <r.neese@gmail.com>
To:        freebsd-arm@FreeBSD.org
Subject:   updated diff with dreamplug basic files
Message-ID:  <5002E1C7.7090605@gmail.com>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------040705030004020802050801
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

these are the needed dreamplug parts for building arm for the dreamplug.


gonzo and I are working to patch the base to fix a usb issue. That
currently breaks dreamplug/sheevaplug/dockstar builds on 9.x and current .

patches to follow

--------------040705030004020802050801
Content-Type: text/plain; charset=windows-1252;
	name="freebsd-svn-head-dreamplug-071412-2314.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="freebsd-svn-head-dreamplug-071412-2314.diff"

Index: sys/boot/fdt/dts/dreamplug.dts
===================================================================
--- sys/boot/fdt/dts/dreamplug.dts	(revision 0)
+++ sys/boot/fdt/dts/dreamplug.dts	(working copy)
@@ -0,0 +1,292 @@
+/*
+ * 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.
+ *
+ * Marvell DreamPlug Device Tree Source.
+ *
+ * $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>;
+		};
+	};
+
+	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] */
+				21 5            /* MPP[21]: SATA0_AC */
+                                23 5            /* MPP[23]: SATA0_PR */
+				28 0		/* MPP[28]: GPIO[28] */
+				29 1		/* MPP[29]: TSMP[9] */
+				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] Bluetooth LED */
+				48 0		/* MPP[48]: GPIO[48] Wifi LED */
+				49 0>;		/* MPP[49]: GPIO[49] Wifi AP LED */
+		};
+
+		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>;
+		};
+
+		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>;
+			gpios = <&GPIO 29 1 0x00030000   /* GPIO[29]:  IN_POL_LOW, IRQ (edge) */
+			         &GPIO 34 2 0x00000000>; /* GPIO[34]:  OUT */
+		};
+
+		sdio@90000 {
+			compatible = "mrvl,sdio";
+			reg = <0x90000 0x134>;
+			interrupts = <28>;
+			interrupt-parent = <&PIC>;
+		
+			gpios = <&GPIO 29 1 0x00030000   /* GPIO[29]:  IN_POL_LOW, IRQ (edge) */
+			         &GPIO 34 2 0x00000000>; /* GPIO[34]:  OUT */
+		
+		};
+	};
+
+	SRAM: sram@fd000000 {
+		compatible = "mrvl,cesa-sram";
+		reg = <0xfd000000 0x00100000>;
+	};
+
+	chosen {
+		stdin = "serial0";
+		stdout = "serial0";
+	};
+
+};
Index: sys/arm/mv/kirkwood/files.dreamplug
===================================================================
--- sys/arm/mv/kirkwood/files.dreamplug	(revision 0)
+++ sys/arm/mv/kirkwood/files.dreamplug	(working copy)
@@ -0,0 +1,4 @@
+# $FreeBSD:$
+
+include "arm/mv/kirkwood/files.kirkwood"
+arm/mv/kirkwood/dreamplug.c	standard
Index: sys/arm/mv/kirkwood/dreamplug.c
===================================================================
--- sys/arm/mv/kirkwood/dreamplug.c	(revision 0)
+++ sys/arm/mv/kirkwood/dreamplug.c	(working copy)
@@ -0,0 +1,44 @@
+/*-
+ * 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);
+}
Index: sys/arm/mv/kirkwood/std.dreamplug
===================================================================
--- sys/arm/mv/kirkwood/std.dreamplug	(revision 0)
+++ sys/arm/mv/kirkwood/std.dreamplug	(working copy)
@@ -0,0 +1,5 @@
+# $FreeBSD:$
+
+include	"../mv/std.mv"
+include "../mv/kirkwood/std.kirkwood"
+files	"../mv/kirkwood/files.dreamplug"
Index: sys/arm/conf/DREAMPLUG
===================================================================
--- sys/arm/conf/DREAMPLUG	(revision 0)
+++ sys/arm/conf/DREAMPLUG	(working copy)
@@ -0,0 +1,245 @@
+#
+# Custom kernel for Marvell DreamPlug devices.
+# 
+# $FreeBSD:$
+#
+
+ident		DREAMPLUG
+include		"../mv/kirkwood/std.dreamplug"
+
+options 	SOC_MV_KIRKWOOD
+makeoptions	MODULES_OVERRIDE=""
+
+#makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols
+makeoptions	WERROR="-Werror"
+
+options 	SCHED_4BSD		#4BSD scheduler
+options 	INET			#InterNETworking
+options 	INET6			#IPv6 communications protocols
+options 	FFS			#Berkeley Fast Filesystem
+options		MD_ROOT			# MD is a potential root device
+options 	NFSCL			#New Network Filesystem Client
+options 	NFSLOCKD		#Network Lock Manager
+options 	NFS_ROOT		#NFS usable as /, requires NFSCL
+
+#bootp/dhcp for remote booting
+#options 	BOOTP
+#options 	BOOTP_NFSROOT
+#options 	BOOTP_NFSV3
+#options 	BOOTP_WIRED_TO=mge0
+
+# Root fs on USB device
+options     ROOTDEVNAME=\"ufs:/dev/da2s2\" 
+
+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 	MUTEX_NOINLINE
+options 	RWLOCK_NOINLINE
+options 	NO_FFS_SNAPSHOT
+options 	NO_SWAPPING
+
+
+# Debugging
+#options 	ALT_BREAK_TO_DEBUGGER
+options		BREAK_TO_DEBUGGER
+options 	DDB
+#options 	DEADLKRES		#Enable the deadlock resolver
+#options 	DIAGNOSTIC
+#options 	INVARIANTS		#Enable calls of extra sanity checking
+#options 	INVARIANT_SUPPORT	#Extra sanity checks of internal structures, required by INVARIANTS
+options 	KDB
+#options 	WITNESS			#Enable checks to detect deadlocks and cycles
+#options 	WITNESS_SKIPSPIN	#Don't run witness on spinlocks for speed
+#options 	WITNESS_KDB
+#options		DEBUG
+
+# Serial ports
+device		uart
+
+#ata devices
+device          ata             #base ata driver
+options         ATA_CAM         # Handle legacy controllers with CAM
+options         ATA_STATIC_ID   # Static device numbering
+
+# SCSI 
+options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
+device		scbus        # SCSI bus (required for SCSI) 
+device		da           # Direct Access (disks) 
+device		sa
+device		cd           # CD 
+device		pass 
+
+# SATA
+device		mvs	#Marvell Sata driver
+device          ahci    # AHCI-compatible SATA controllers
+
+# Partition support
+options 	GEOM_PART_GPT
+options 	GEOM_LABEL
+options		GEOM_ELI
+
+# UFS
+options 	UFS_ACL
+options 	UFS_DIRHASH
+options		UFS_GJOURNAL 
+options 	SOFTUPDATES
+
+# FAT support
+options 	MSDOSFS
+
+# Misc FSs
+options 	PROCFS
+options		EXT2FS 
+device		mem
+options		PSEUDOFS        #Pseudo-filesystem framework 
+options		CD9660            #ISO 9660 filesystem
+options		VFS_AIO
+options		CD9660_ICONV
+
+# Sound
+device 		sound
+device 		snd_uaudio
+
+# Networking
+device		ether
+device		mge			# Marvell Gigabit Ethernet controller
+device		mii
+device		miibus
+device		e1000phy
+device		bpf
+options		HZ=1000
+options		DEVICE_POLLING
+device		vlan
+
+#Misc Extra Netwroking
+options         NETATALK	#Appletalk communications protocols
+options         NETSMB		#SMB/CIFS requester
+options         SMBFS		#SMB/CIFS filesystem
+options         VFS_AIO
+
+# Pseudo devices.
+device		loop		# Network loopback
+device		random		# Entropy device
+device		ether		# Ethernet support
+device		vlan		# 802.1Q VLAN support
+device		tun		# Packet tunnel.
+device		pty		# BSD-style compatibility pseudo ttys
+device		md		# Memory "disks"
+device		gif		# IPv6 and IPv4 tunneling
+device		faith		# IPv6-to-IPv4 relaying (translation)
+device		firmware	# firmware assist module
+
+#crypto
+device		cesa			# Marvell security engine
+device		crypto
+device		cryptodev
+
+#Wireless Networking
+device          wlan
+options         IEEE80211_DEBUG # enable debug msgs
+options         IEEE80211_SUPPORT_MESH  # enable 802.11s draft support
+device          wlan_wep        # 802.11 WEP support
+device          wlan_ccmp       # 802.11 CCMP support
+device          wlan_tkip       # 802.11 TKIP support
+device          wlan_amrr       # AMRR transmit rate control algorithm
+
+# USB DEBUG
+#options 	USB_DEBUG	# enable debug msgs
+#options		USB_REQ_DEBUG
+
+# USB support
+device		usb		# USB Bus (required)
+device		ehci		# EHCI PCI->USB interface (USB 2.0)
+device		umass		# Disks/Mass storage - Requires scbus and da
+device		usfs
+device		uhid
+device		ums
+
+#USB WIFI
+device          rum             # Ralink Technology RT2501USB wireless NICs
+device          uath            # Atheros AR5523 wireless NICs
+device          ural            # Ralink Technology RT2500USB wireless NICs
+device          zyd             # ZyDAS zb1211/zb1211b wireless NICs
+device          urtw		# Realtek RTL8187B/L USB
+device          upgt		# Conexant/Intersil PrismGT SoftMAC USB
+
+# USB Serial devices
+device		u3g		# USB-based 3G modems (Option, Huawei, Sierra)
+#options         U3G_DEBUG
+
+#USB Over Ethernet
+device          cdce          # Generic USB over Ethernet
+
+# MMC/SD (Currently not supported)
+#device          mv_sdio
+#device          mmc
+#device          mmcsd
+#device          sdhci          
+
+#BLUETOOTH
+
+# I2C (TWSI)
+device		iic
+device		iicbus
+device		icee 
+
+options		LIBICONV 
+options		LIBMCHAIN 
+
+# Flattened Device Tree
+options 	FDT
+options		FDT_DTB_STATIC
+makeoptions	FDT_DTS_FILE=dreamplug.dts
+
+#FireWall
+device		if_bridge 
+
+# Encapsulating Interface
+device		enc
+
+# IPSec
+options		IPSEC
+options 	IPSEC_NAT_T
+options 	TCP_SIGNATURE		#include support for RFC 2385
+
+# IPFW support
+options 	IPFIREWALL
+options 	IPFIREWALL_DEFAULT_TO_ACCEPT
+options 	IPFIREWALL_FORWARD
+options 	IPFIREWALL_VERBOSE
+options 	IPFIREWALL_VERBOSE_LIMIT=100
+options 	DUMMYNET
+options 	IPDIVERT
+
+# altq(9). Enable the base part of the hooks with the ALTQ option.
+# Individual disciplines must be built into the base system and can not be
+# loaded as modules at this point. ALTQ requires a stable TSC so if yours is
+# broken or changes with CPU throttling then you must also have the ALTQ_NOPCC
+# option.
+options 	ALTQ
+options 	ALTQ_CBQ	# Class Based Queueing
+options 	ALTQ_RED	# Random Early Detection
+options 	ALTQ_RIO	# RED In/Out
+options 	ALTQ_HFSC	# Hierarchical Packet Scheduler
+options 	ALTQ_CDNR	# Traffic conditioner
+options 	ALTQ_PRIQ	# Priority Queueing
+options 	ALTQ_NOPCC	# Required if the TSC is unusable
+#options 	ALTQ_DEBUG
+
+# MROUTING enables the kernel multicast packet forwarder, which works
+# with mrouted and XORP.
+options 	MROUTING		# Multicast routing
+
+# Add multiple route table support
+options		ROUTETABLES=16
+
+# eliminating data copies on socket reads and writes.
+# man 9 zero_copy
+options		ZERO_COPY_SOCKETS
+
+#PF 
+device          pf
+device          pflog
+device          pfsync

 

--------------040705030004020802050801--



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