From owner-svn-src-all@freebsd.org Tue Feb 28 22:49:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92F2ACF219A; Tue, 28 Feb 2017 22:49:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5243A1F6; Tue, 28 Feb 2017 22:49:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SMnjpD080021; Tue, 28 Feb 2017 22:49:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1SMnjuO080020; Tue, 28 Feb 2017 22:49:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702282249.v1SMnjuO080020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 28 Feb 2017 22:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314428 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 22:49:46 -0000 Author: imp Date: Tue Feb 28 22:49:45 2017 New Revision: 314428 URL: https://svnweb.freebsd.org/changeset/base/314428 Log: Add Ubiquiti Rocket M support Updated to use geom_uzip Submitted by: Michael Vale Pull Request: https://github.com/freebsd/freebsd/pull/16 Added: head/sys/mips/conf/ROCKET_M2HP (contents, props changed) head/sys/mips/conf/ROCKET_M2HP.hints (contents, props changed) Added: head/sys/mips/conf/ROCKET_M2HP ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/ROCKET_M2HP Tue Feb 28 22:49:45 2017 (r314428) @@ -0,0 +1,70 @@ +# +# Specific board setup for the Rocket M2 HP board. +# +# This board has the following hardware: +# +# + AR7241 CPU SoC +# + AR9287 Wifi +# + Integrated switch (XXX speed?) +# + 8MB flash +# + 32MB RAM +# + uboot environment + +# $FreeBSD$ + +#NO_UNIVERSE + +include "AR724X_BASE" +ident "ROCKET_M2HP" +hints "ROCKET_M2HP.hints" + +options AR71XX_REALMEM=32*1024*1024 + +options AR71XX_ENV_UBOOT + +# Limit inlines +makeoptions INLINE_LIMIT=768 + +# We bite the performance overhead for now; the kernel won't +# fit if the mutexes are inlined. +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options SX_NOINLINE + +# There's no need to enable swapping on this platform. +options NO_SWAPPING + +# For DOS - enable if required +# options MSDOSFS + +# uncompress - to boot read-only lzma natively from flash +device geom_uzip +options GEOM_UZIP +options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\" + +# Not enough space for these.. +nooptions INVARIANTS +nooptions INVARIANT_SUPPORT +nooptions WITNESS +nooptions WITNESS_SKIPSPIN +nooptions DEBUG_REDZONE +nooptions DEBUG_MEMGUARD + +# Used for the static uboot partition map +device geom_map + +# Options needed for the EEPROM based calibration/PCI configuration data. +options AR71XX_ATH_EEPROM # Fetch EEPROM/PCI config from flash +options ATH_EEPROM_FIRMWARE # Use EEPROM from flash +device firmware # Used by the above + +# Options required for miiproxy and mdiobus +options ARGE_MDIO # Export an MDIO bus separate from arge +device miiproxy # MDIO bus <-> MII PHY rendezvous + +device etherswitch +device arswitch + +# Enable GPIO +device gpio +device gpioled Added: head/sys/mips/conf/ROCKET_M2HP.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/ROCKET_M2HP.hints Tue Feb 28 22:49:45 2017 (r314428) @@ -0,0 +1,103 @@ +# $FreeBSD$ + +# arge1 MDIO bus +hint.argemdio.0.at="nexus0" +hint.argemdio.0.maddr=0x1a000000 +hint.argemdio.0.msize=0x1000 +hint.argemdio.0.order=0 + +# Override MAC Address with the one on EEPROM +hint.arge.0.eeprommac=0x1fff0000 + +# arge0: dedicated switch port; RMII; dedicated PHY 4 on switch, connected +# via internal switch MDIO bus. +hint.arge.0.media=100 # Map to 100/full +hint.arge.0.fduplex=1 # +hint.arge.0.phymask=0x10 # PHY4 +hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus + +# arge1: nail to 1000/full, RMII - connected to the switch +hint.arge.1.media=1000 # Map to 1000/full +hint.arge.1.fduplex=1 # +hint.arge.1.phymask=0x0 # no directly mapped PHYs + +# +# AR7240 switch config +# +hint.arswitch.0.at="mdio0" +hint.arswitch.0.is_7240=1 # We need to be explicitly told this +hint.arswitch.0.numphys=4 # 4 active switch PHYs (PHY 0 -> 3) +hint.arswitch.0.phy4cpu=1 # Yes, PHY 4 == dedicated PHY +hint.arswitch.0.is_rgmii=0 # No, not RGMII +hint.arswitch.0.is_gmii=0 # No, not GMII + +# ath0 hint - pcie slot 0 +hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1fff1000 +hint.pcib.0.bus.0.0.0.ath_fixup_size=4096 + +# ath +hint.ath.0.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware" + +# GPIO pins +# Pin 0: red led (sig1) +# Pin 1: yellow led (sig2) +# Pin 11: green len (sig3) +# Pin 7: green len (sig4) +# Pin 12: Reset switch +hint.gpio.0.pinmask=0x1883 + +# Signal leds +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.name="sig1" +hint.gpioled.0.pins=0x0001 # pin 0 +hint.gpioled.1.at="gpiobus0" +hint.gpioled.1.name="sig2" +hint.gpioled.1.pins=0x0002 # pin 1 +hint.gpioled.2.at="gpiobus0" +hint.gpioled.2.name="sig3" +hint.gpioled.2.pins=0x0800 # pin 11 +hint.gpioled.3.at="gpiobus0" +hint.gpioled.3.name="sig4" +hint.gpioled.3.pins=0x0080 # pin 7 + +# GEOM_MAP +# +# Rocket M2 HP +# +# mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),6528k(rootfs),256k(cfg),64k(EEPROM) + +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x00040000 # 256k u-boot +hint.map.0.name="u-boot" +hint.map.0.readonly=1 + +hint.map.1.at="flash/spi0" +hint.map.1.start=0x00040000 +hint.map.1.end=0x00050000 # 64k u-boot-env +hint.map.1.name="u-boot-env" +hint.map.1.readonly=1 + +hint.map.2.at="flash/spi0" +hint.map.2.start=0x00050000 +hint.map.2.end="search:0x00100000:0x10000:.!/bin/sh" +hint.map.2.name="kernel" +hint.map.2.readonly=1 + +hint.map.3.at="flash/spi0" +hint.map.3.start="search:0x00100000:0x10000:.!/bin/sh" +hint.map.3.end=0x007b0000 +hint.map.3.name="rootfs" +hint.map.3.readonly=0 + +hint.map.4.at="flash/spi0" +hint.map.4.start=0x007b0000 +hint.map.4.end=0x007f0000 # 256k cfg +hint.map.4.name="cfg" +hint.map.4.readonly=0 + +hint.map.5.at="flash/spi0" +hint.map.5.start=0x007f0000 +hint.map.5.end=0x00800000 # 64k EEPROM +hint.map.5.name="eeprom" +hint.map.5.readonly=1