Bring in configuration for Buffalo Airstation WZR-300HP, Atheros based
wireless home router. Notable things: 2x 16 MB flash devices Atheros Wireless Atheros Switching Many thanks to adrian@ for his guidance on this and keeping the drivers in the base system up to date Approved by: re (delphij)
This commit is contained in:
parent
9fdb497cd0
commit
7995e29931
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255659
57
sys/mips/conf/WZR-300HP
Normal file
57
sys/mips/conf/WZR-300HP
Normal file
@ -0,0 +1,57 @@
|
||||
#
|
||||
# Specific board setup for the Buffalo Airstation WZR-300HP
|
||||
#
|
||||
# The WZR-300HP has the following hardware:
|
||||
#
|
||||
# + AR7242 CPU SoC
|
||||
# + AR9280 5GHz 11n
|
||||
# + AR8136 Gigabit switch
|
||||
# + 2 m25ll128 based 16MB flash
|
||||
# + 64MB RAM
|
||||
# + uboot environment
|
||||
|
||||
# $FreeBSD$
|
||||
|
||||
include "AR724X_BASE"
|
||||
ident "WZR-300HP"
|
||||
hints "WZR-300HP.hints"
|
||||
|
||||
options AR71XX_REALMEM=64*1024*1024
|
||||
|
||||
options AR71XX_ENV_UBOOT
|
||||
|
||||
options BOOTVERBOSE
|
||||
# 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
|
||||
|
||||
# GEOM modules
|
||||
device geom_map # to get access to the SPI flash partitions
|
||||
device geom_uncompress # compressed in-memory filesystem hackery!
|
||||
|
||||
options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\"
|
||||
|
||||
# options MD_ROOT
|
||||
# options MD_ROOT_SIZE="6144"
|
||||
|
||||
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
|
||||
|
||||
# hwpmc
|
||||
device hwpmc_mips24k
|
||||
device hwpmc
|
187
sys/mips/conf/WZR-300HP.hints
Normal file
187
sys/mips/conf/WZR-300HP.hints
Normal file
@ -0,0 +1,187 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# arge0 is connected to the LAN side of the switch PHY.
|
||||
# arge1 is connected to the single port WAN side of the switch PHY.
|
||||
|
||||
# arge1 MDIO bus
|
||||
hint.argemdio.0.at="nexus0"
|
||||
hint.argemdio.0.maddr=0x1a000000
|
||||
hint.argemdio.0.msize=0x1000
|
||||
hint.argemdio.0.order=0
|
||||
|
||||
hint.arge.0.phymask=0x0
|
||||
hint.arge.0.media=1000
|
||||
hint.arge.0.fduplex=1
|
||||
hint.arge.0.eeprommac=0x1f05120c
|
||||
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 - slot 0
|
||||
hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1f051000
|
||||
hint.pcib.0.bus.0.0.0.ath_fixup_size=4096
|
||||
|
||||
# .. and now, telling each ath(4) NIC where to find the firmware
|
||||
# image.
|
||||
hint.ath.0.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware"
|
||||
|
||||
# Inherited from AR724X_BASE.hints
|
||||
#hint.mx25l.0.at="spibus0"
|
||||
#hint.mx25l.0.cs=0
|
||||
# This board has two 16 MB flash devices on difference Chip Select pins
|
||||
hint.mx25l.1.at="spibus0"
|
||||
hint.mx25l.1.cs=1
|
||||
|
||||
|
||||
# Geom MAP
|
||||
|
||||
# The WRZ-300HP has 2 16MB flash part - HOWEVER, the 64k caldata isn't
|
||||
# at the end of the flash. It's ~ 328KB into the flash image.
|
||||
|
||||
# mtdparts=ar7240-nor0:
|
||||
# 256k(u-boot)
|
||||
# 64k(u-boot-env)
|
||||
# 64k@320k(ART)
|
||||
# 1152k@384k(uImage)
|
||||
# 6592k@1536k(rootfs)
|
||||
# 64k@8128k(properties)
|
||||
|
||||
# Uboot lies like a lying liar. OpenWRT does this:
|
||||
# [ 0.570000] Concatenating MTD devices:
|
||||
# [ 0.570000] (0): "spi0.0"
|
||||
# [ 0.570000] (1): "spi0.1"
|
||||
# [ 0.580000] into device "flash"
|
||||
# [ 0.580000] Creating 7 MTD partitions on "flash":
|
||||
# [ 0.590000] 0x000000000000-0x000000040000 : "u-boot"
|
||||
# [ 0.600000] 0x000000040000-0x000000050000 : "u-boot-env"
|
||||
# [ 0.600000] 0x000000050000-0x000000060000 : "art"
|
||||
# [ 0.610000] 0x000000060000-0x000000160000 : "kernel"
|
||||
# [ 0.620000] 0x000000160000-0x000001ff0000 : "rootfs"
|
||||
# [ 0.620000] mtd: partition "rootfs" set to be root filesystem
|
||||
# [ 0.630000] mtd: partition "rootfs_data" created automatically, ofs=330000, len=1CC0000
|
||||
# [ 0.640000] 0x000000330000-0x000001ff0000 : "rootfs_data"
|
||||
# [ 0.650000] 0x000001ff0000-0x000002000000 : "user_property"
|
||||
# [ 0.650000] 0x000000060000-0x000001ff0000 : "firmware"
|
||||
|
||||
hint.map.0.at="flash/spi0"
|
||||
hint.map.0.start=0x00000000
|
||||
hint.map.0.end= 0x00040000
|
||||
hint.map.0.name="uboot"
|
||||
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= 0x00060000 # 64k ART
|
||||
hint.map.2.name="ART"
|
||||
hint.map.2.readonly=1
|
||||
|
||||
hint.map.3.at="flash/spi0"
|
||||
hint.map.3.start=0x00060000
|
||||
hint.map.3.end= 0x00160000
|
||||
hint.map.3.name="kernel"
|
||||
hint.map.3.readonly=1
|
||||
|
||||
hint.map.4.at="flash/spi0"
|
||||
hint.map.4.start=0x00160000
|
||||
hint.map.4.end= 0x00FF0000
|
||||
hint.map.4.name="rootfs"
|
||||
hint.map.4.readonly=1
|
||||
|
||||
#hint.map.5.at="flash/spi1"
|
||||
hint.map.5.at="flash/spi0"
|
||||
hint.map.5.start=0x00FF0000
|
||||
hint.map.5.end= 0x01000000
|
||||
hint.map.5.name="cfg"
|
||||
hint.map.5.readonly=0
|
||||
|
||||
# GPIO specific configuration block
|
||||
|
||||
#define GPIO_PIN_INPUT 0x0001 /* input direction */
|
||||
#define GPIO_PIN_OUTPUT 0x0002 /* output direction */
|
||||
#define GPIO_PIN_OPENDRAIN 0x0004 /* open-drain output */
|
||||
#define GPIO_PIN_PUSHPULL 0x0008 /* push-pull output */
|
||||
#define GPIO_PIN_TRISTATE 0x0010 /* output disabled */
|
||||
#define GPIO_PIN_PULLUP 0x0020 /* internal pull-up enabled */
|
||||
#define GPIO_PIN_PULLDOWN 0x0040 /* internal pull-down enabled */
|
||||
#define GPIO_PIN_INVIN 0x0080 /* invert input */
|
||||
#define GPIO_PIN_INVOUT 0x0100 /* invert output */
|
||||
#define GPIO_PIN_PULSATE 0x0200 /* pulsate in hardware */
|
||||
|
||||
# Pin 1 - SCK
|
||||
# Pin 2 - SDA
|
||||
# Pin 3 - test 2
|
||||
# Pin 4 - test 3
|
||||
# Pin 5 - USB (LED Blue)
|
||||
# Pin 6 - test a
|
||||
# Pin 7 - Security (LED Orange)
|
||||
# Pin 8 - Router (LED Green)
|
||||
# Pin 9 - Movie Engine On (LED Blue)
|
||||
# Pin 10 - Movie Engine Off (LED Blue)
|
||||
# Pin 11 - test a
|
||||
# Pin 12 - test a
|
||||
# Pin 13 - test a
|
||||
# Pin 14 - USB Power (turn on by default)
|
||||
# Pin 15 - test a
|
||||
# Pin 16 - test a
|
||||
# Pin 17 - diag (LED red)
|
||||
|
||||
# Don't flip on anything that isn't already enabled.
|
||||
# Force on USB power pin 14
|
||||
#hint.gpio.0.function_set=0x00000000
|
||||
#hint.gpio.0.function_clear=0x00000000
|
||||
|
||||
# These are the GPIO LEDs and buttons which can be software controlled.
|
||||
hint.gpio.0.pinmask=0x000103D0
|
||||
|
||||
hint.gpio.0.pinon=0x00000000
|
||||
|
||||
hint.gpioiic.0.at="gpiobus0"
|
||||
hint.gpioiic.0.pins=0x0003
|
||||
hint.gpioiic.0.sda=0
|
||||
hint.gpioiic.0.scl=1
|
||||
|
||||
# LEDs are configured separately and driven by the LED device
|
||||
# usb tested good
|
||||
hint.gpioled.0.at="gpiobus0"
|
||||
hint.gpioled.0.name="blue-usb"
|
||||
hint.gpioled.0.pins=0x00000010
|
||||
|
||||
hint.gpioled.1.at="gpiobus0"
|
||||
hint.gpioled.1.name="orange-security"
|
||||
hint.gpioled.1.pins=0x00000040
|
||||
|
||||
hint.gpioled.2.at="gpiobus0"
|
||||
hint.gpioled.2.name="green-router"
|
||||
hint.gpioled.2.pins=0x00000080
|
||||
|
||||
hint.gpioled.3.at="gpiobus0"
|
||||
hint.gpioled.3.name="blue-movie-engine-on"
|
||||
hint.gpioled.3.pins=0x00000100
|
||||
|
||||
hint.gpioled.4.at="gpiobus0"
|
||||
hint.gpioled.4.name="blue-movie-engine-off"
|
||||
hint.gpioled.4.pins=0x00000200
|
||||
|
||||
hint.gpioled.5.at="gpiobus0"
|
||||
hint.gpioled.5.name="red-diag"
|
||||
hint.gpioled.5.pins=0x00010000
|
Loading…
Reference in New Issue
Block a user