Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2014 21:31:41 +0100
From:      Milan Obuch <freebsd-mips@dino.sk>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        freebsd-mips@freebsd.org
Subject:   Re: I (think) the AR8327 switch support now works
Message-ID:  <20140310213141.04637d63@zeta.dino.sk>
In-Reply-To: <CAJ-VmokqvYmHw8JGUFDfb4PnGsuuu_3DT=sZDBCqPkvE_Riygg@mail.gmail.com>
References:  <CAJ-Vmok0cVLnH9DQh%2Bz6XF-NQmPKy_Ez37kLtuCSRThwjQHTJQ@mail.gmail.com> <20140301231239.023b8733@zeta.dino.sk> <CAJ-VmoknT-SWVmcDX-Cx8StUVuZNX%2BqNPzLcMBdLxN7qwssNoA@mail.gmail.com> <20140307140432.0a460da1@zeta.dino.sk> <CAJ-Vmok-nF4QdVmUMGJxt4tX=X%2Bvc4_-G100ZPRnQ-2aWyNCog@mail.gmail.com> <20140307204230.3c86b9b1@zeta.dino.sk> <CAJ-Vmo=B0CG1FSCKYeaCmORJuWbJ24g=%2BQkHV7WC8DTV9m1zKA@mail.gmail.com> <20140308140901.19782009@zeta.dino.sk> <CAJ-VmokM5mPxMbbVyaSpyDcn-Fs32g4heWMPZF7n2OpnFK31oA@mail.gmail.com> <20140308173642.0a48d2c2@zeta.dino.sk> <CAJ-VmomnycSYbhf4aKaiK%2BUL%2B-aWXy_tXioRUjMVO62r%2BDpEUA@mail.gmail.com> <20140308234129.76800b5c@zeta.dino.sk> <CAJ-Vmok6gEG0rMSdAccQZkD-McTY8y7LktE1xQsXy7MNODxP2g@mail.gmail.com> <20140309083919.2810fa97@zeta.dino.sk> <CAJ-VmomEzc=PNkTCS-OfJB9U6zO%2B2ZYisd22aq8fYPvks%2BOpAg@mail.gmail.com> <20140309231254.639f3820@zeta.dino.sk> <CAJ-VmokqvYmHw8JGUFDfb4PnGsuuu_3DT=sZDBCqPkvE_Riygg@mail.gmail.com>

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

[-- Attachment #1 --]
On Sun, 9 Mar 2014 20:16:17 -0700
Adrian Chadd <adrian@freebsd.org> wrote:

> Yeah, I can't really help more than this at the moment. It feels like
> some kind of timing thing.
> 
> What's the kernel config file that you're using?
> 
> Thanks,
> 
> 
> -a
> 

See attachments, bot kernel config and hints file.

Milan

[-- Attachment #2 --]
#
# Routerboard 2011
#
# $FreeBSD$
#

machine         mips mips
ident		"RB2011"
cpu		CPU_MIPS74KC
makeoptions	KERNLOADADDR=0x80050000
options 	HZ=1000

files		"../atheros/files.ar71xx"
hints		"RB2011.hints"

makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols
makeoptions	MODULES_OVERRIDE=""

options 	DDB
options 	KDB
options 	ALQ

options 	SCHED_4BSD		# 4BSD scheduler
options 	INET			# InterNETworking
options 	PSEUDOFS		# Pseudo-filesystem framework
options 	_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions

options 	FFS                     # Berkeley Fast Filesystem
options 	NO_FFS_SNAPSHOT		# We don't require snapshot support

options 	AR71XX_REALMEM=128*1024*1024

# Don't include the SCSI/CAM strings in the default build
options 	SCSI_NO_SENSE_STRINGS
options 	SCSI_NO_OP_STRINGS

# .. And no sysctl strings
options 	NO_SYSCTL_DESCR

# Limit IO size
options 	NBUF=128

device		mii
device		arge
options 	ARGE_DEBUG

# For etherswitch support
options 	ARGE_MDIO
device		miiproxy
device		etherswitch
device		arswitch

device		usb
options 	USB_EHCI_BIG_ENDIAN_DESC        # handle big-endian byte order
options 	USB_DEBUG
options 	USB_HOST_ALIGN=32		# AR71XX (MIPS in general?) requires this
device		ehci

device		scbus
device		umass
device		da

device		spibus
device		ar71xx_spi
device		mx25l
device		ar71xx_wdog

device		uart
device		uart_ar71xx

device		loop
device		ether
device		md
device		bpf
device		random
#device		if_bridge
#device		gpio
#device		gpioled

options		ROOTDEVNAME=\"ufs:da0\"

options 	NFSCL		# Network Filesystem Client
options 	NFS_ROOT	# NFS usable as /, requires NFSCL

options		BOOTVERBOSE=1

#options 	BOOTP
#options 	BOOTP_NFSROOT
#options 	BOOTP_NFSV3
#options 	BOOTP_WIRED_TO=arge1
#options 	BOOTP_COMPAT

#options 	ROOTDEVNAME=\"nfs:192.168.16.11:/data/mips/nfsroot\"

# GEOM modules
#device		geom_uzip	# compressed in-memory filesystem hackery!
#options 	GEOM_UZIP

# Boot from the first MFS uzip
#options 	ROOTDEVNAME=\"ufs:md0.uzip\"

#options 	MD_ROOT
#options 	MD_ROOT_SIZE="6144"

[-- Attachment #3 --]
hint.apb.0.at="nexus0"
hint.apb.0.irq=4

# uart0
hint.uart.0.at="apb0"
# NB: This isn't an ns8250 UART
hint.uart.0.maddr=0x18020003
hint.uart.0.msize=0x18
hint.uart.0.irq=3

#ehci - note the 0x100 offset for the AR913x/AR724x
hint.ehci.0.at="nexus0"
hint.ehci.0.maddr=0x1b000100
hint.ehci.0.msize=0x00001000
hint.ehci.0.irq=1

# SPI flash
hint.spi.0.at="nexus0"
hint.spi.0.maddr=0x1f000000
hint.spi.0.msize=0x10

hint.mx25l.0.at="spibus0"
hint.mx25l.0.cs=0

# Watchdog
hint.ar71xx_wdog.0.at="nexus0"

# The GPIO function and pin mask is configured per-board
hint.gpio.0.at="apb0"
hint.gpio.0.maddr=0x18040000
hint.gpio.0.msize=0x1000
hint.gpio.0.irq=2

hint.arge.0.at="nexus0"
hint.arge.0.maddr=0x19000000
hint.arge.0.msize=0x1000
hint.arge.0.irq=4

hint.arge.0.phymask=0x0
hint.arge.0.media=1000
hint.arge.0.fduplex=1
hint.arge.0.miimode=3		# RGMII
hint.arge.0.pll_1000=0x06000000
hint.arge.0.mdio=mdioproxy0

hint.argemdio.0.at="nexus0"
hint.argemdio.0.maddr=0x19000000
hint.argemdio.0.msize=0x1000
hint.argemdio.0.order=0
#hint.argemdio.0.mdio_freq=6250000

# GMAC configuration
# + AR934X_ETH_CFG_RGMII_GMAC0              (1 << 0)
# + AR934X_ETH_CFG_SW_ONLY_MODE             (1 << 6)
hint.ar934x_gmac.0.gmac_cfg=0x41

# GMAC0 here - connected to an AR8327
hint.arswitch.0.at="mdio0"
hint.arswitch.0.is_7240=0
hint.arswitch.0.is_8327=1	# does not probe well right now, so override
hint.arswitch.0.is_9340=0
hint.arswitch.0.numphys=5
hint.arswitch.0.phy4cpu=0
hint.arswitch.0.is_rgmii=1
hint.arswitch.0.is_gmii=0

# Other AR8327 configuration parameters

# AR8327_PAD_MAC_RGMII
hint.arswitch.0.pad.0.mode=6
hint.arswitch.0.pad.0.txclk_delay_en=1
hint.arswitch.0.pad.0.rxclk_delay_en=1
# AR8327_CLK_DELAY_SEL1
hint.arswitch.0.pad.0.txclk_delay_sel=1
# AR8327_CLK_DELAY_SEL2
hint.arswitch.0.pad.0.rxclk_delay_sel=2

# XXX there's no LED management just yet!
hint.arswitch.0.led.ctrl0=0x00000000
hint.arswitch.0.led.ctrl1=0xc737c737
hint.arswitch.0.led.ctrl2=0x00000000
hint.arswitch.0.led.ctrl3=0x00c30c00
hint.arswitch.0.led.open_drain=1

# force_link=1 is required for the rest of the parameters
# to be configured.
hint.arswitch.0.port.0.force_link=1
hint.arswitch.0.port.0.speed=1000
hint.arswitch.0.port.0.duplex=1
hint.arswitch.0.port.0.txpause=1
hint.arswitch.0.port.0.rxpause=1

hint.arge.1.at="nexus0"
hint.arge.1.maddr=0x1a000000
hint.arge.1.msize=0x1000
hint.arge.1.irq=3

hint.arge.1.phymask=0x0
hint.arge.1.media=1000
hint.arge.1.fduplex=1
hint.arge.1.miimode=1           # GMII
#hint.arge.1.mdio=mdioproxy1

hint.argemdio.1.at="nexus0"
hint.argemdio.1.maddr=0x1a000000
hint.argemdio.1.msize=0x1000
hint.argemdio.1.order=0
#hint.argemdio.1.mdio_freq=6250000

hint.arswitch.1.at="mdio1"
hint.arswitch.1.is_7240=0
hint.arswitch.1.is_9340=1
hint.arswitch.1.numphys=6
hint.arswitch.1.phy4cpu=0
hint.arswitch.1.is_rgmii=0
hint.arswitch.1.is_gmii=1

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