1255659Ssbruno# $FreeBSD$ 2255659Ssbruno 3255659Ssbruno# arge0 is connected to the LAN side of the switch PHY. 4255659Ssbruno# arge1 is connected to the single port WAN side of the switch PHY. 5255659Ssbruno 6255659Ssbruno# arge1 MDIO bus 7255659Ssbrunohint.argemdio.0.at="nexus0" 8255659Ssbrunohint.argemdio.0.maddr=0x1a000000 9255659Ssbrunohint.argemdio.0.msize=0x1000 10255659Ssbrunohint.argemdio.0.order=0 11255659Ssbruno 12255659Ssbrunohint.arge.0.phymask=0x0 13255659Ssbrunohint.arge.0.media=1000 14255659Ssbrunohint.arge.0.fduplex=1 15255659Ssbrunohint.arge.0.eeprommac=0x1f05120c 16255659Ssbrunohint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus 17255659Ssbruno 18255659Ssbruno 19255659Ssbruno# arge1: nail to 1000/full, RMII - connected to the switch 20255659Ssbrunohint.arge.1.media=1000 # Map to 1000/full 21255659Ssbrunohint.arge.1.fduplex=1 # 22255659Ssbrunohint.arge.1.phymask=0x0 # no directly mapped PHYs 23255659Ssbruno 24255659Ssbruno# 25255659Ssbruno# AR7240 switch config 26255659Ssbruno# 27255659Ssbrunohint.arswitch.0.at="mdio0" 28255659Ssbrunohint.arswitch.0.is_7240=1 # We need to be explicitly told this 29255659Ssbrunohint.arswitch.0.numphys=4 # 4 active switch PHYs (PHY 0 -> 3) 30255659Ssbrunohint.arswitch.0.phy4cpu=1 # Yes, PHY 4 == dedicated PHY 31255659Ssbrunohint.arswitch.0.is_rgmii=0 # No, not RGMII 32255659Ssbrunohint.arswitch.0.is_gmii=0 # No, not GMII 33255659Ssbruno 34255659Ssbruno# ath0 - slot 0 35255659Ssbrunohint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1f051000 36255659Ssbrunohint.pcib.0.bus.0.0.0.ath_fixup_size=4096 37255659Ssbruno 38255659Ssbruno# .. and now, telling each ath(4) NIC where to find the firmware 39255659Ssbruno# image. 40255659Ssbrunohint.ath.0.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware" 41255659Ssbruno 42255659Ssbruno# Inherited from AR724X_BASE.hints 43255659Ssbruno#hint.mx25l.0.at="spibus0" 44255659Ssbruno#hint.mx25l.0.cs=0 45255659Ssbruno# This board has two 16 MB flash devices on difference Chip Select pins 46255659Ssbrunohint.mx25l.1.at="spibus0" 47255659Ssbrunohint.mx25l.1.cs=1 48255659Ssbruno 49255659Ssbruno 50255659Ssbruno# Geom MAP 51255659Ssbruno 52255659Ssbruno# The WRZ-300HP has 2 16MB flash part - HOWEVER, the 64k caldata isn't 53255659Ssbruno# at the end of the flash. It's ~ 328KB into the flash image. 54255659Ssbruno 55255659Ssbruno# mtdparts=ar7240-nor0: 56255659Ssbruno# 256k(u-boot) 57255659Ssbruno# 64k(u-boot-env) 58255659Ssbruno# 64k@320k(ART) 59255659Ssbruno# 1152k@384k(uImage) 60255659Ssbruno# 6592k@1536k(rootfs) 61255659Ssbruno# 64k@8128k(properties) 62255659Ssbruno 63255659Ssbruno# Uboot lies like a lying liar. OpenWRT does this: 64255659Ssbruno# [ 0.570000] Concatenating MTD devices: 65255659Ssbruno# [ 0.570000] (0): "spi0.0" 66255659Ssbruno# [ 0.570000] (1): "spi0.1" 67255659Ssbruno# [ 0.580000] into device "flash" 68255659Ssbruno# [ 0.580000] Creating 7 MTD partitions on "flash": 69255659Ssbruno# [ 0.590000] 0x000000000000-0x000000040000 : "u-boot" 70255659Ssbruno# [ 0.600000] 0x000000040000-0x000000050000 : "u-boot-env" 71255659Ssbruno# [ 0.600000] 0x000000050000-0x000000060000 : "art" 72255659Ssbruno# [ 0.610000] 0x000000060000-0x000000160000 : "kernel" 73255659Ssbruno# [ 0.620000] 0x000000160000-0x000001ff0000 : "rootfs" 74255659Ssbruno# [ 0.620000] mtd: partition "rootfs" set to be root filesystem 75255659Ssbruno# [ 0.630000] mtd: partition "rootfs_data" created automatically, ofs=330000, len=1CC0000 76255659Ssbruno# [ 0.640000] 0x000000330000-0x000001ff0000 : "rootfs_data" 77255659Ssbruno# [ 0.650000] 0x000001ff0000-0x000002000000 : "user_property" 78255659Ssbruno# [ 0.650000] 0x000000060000-0x000001ff0000 : "firmware" 79255659Ssbruno 80255659Ssbrunohint.map.0.at="flash/spi0" 81255659Ssbrunohint.map.0.start=0x00000000 82255659Ssbrunohint.map.0.end= 0x00040000 83255659Ssbrunohint.map.0.name="uboot" 84255659Ssbrunohint.map.0.readonly=1 85255659Ssbruno 86255659Ssbrunohint.map.1.at="flash/spi0" 87255659Ssbrunohint.map.1.start=0x00040000 88255659Ssbrunohint.map.1.end= 0x00050000 # 64k u-boot-env 89255659Ssbrunohint.map.1.name="u-boot-env" 90255659Ssbrunohint.map.1.readonly=1 91255659Ssbruno 92255659Ssbrunohint.map.2.at="flash/spi0" 93255659Ssbrunohint.map.2.start=0x00050000 94255659Ssbrunohint.map.2.end= 0x00060000 # 64k ART 95255659Ssbrunohint.map.2.name="ART" 96255659Ssbrunohint.map.2.readonly=1 97255659Ssbruno 98255659Ssbrunohint.map.3.at="flash/spi0" 99255659Ssbrunohint.map.3.start=0x00060000 100255659Ssbrunohint.map.3.end= 0x00160000 101255659Ssbrunohint.map.3.name="kernel" 102255659Ssbrunohint.map.3.readonly=1 103255659Ssbruno 104255659Ssbrunohint.map.4.at="flash/spi0" 105255659Ssbrunohint.map.4.start=0x00160000 106255659Ssbrunohint.map.4.end= 0x00FF0000 107255659Ssbrunohint.map.4.name="rootfs" 108255659Ssbrunohint.map.4.readonly=1 109255659Ssbruno 110255659Ssbruno#hint.map.5.at="flash/spi1" 111255659Ssbrunohint.map.5.at="flash/spi0" 112255659Ssbrunohint.map.5.start=0x00FF0000 113255659Ssbrunohint.map.5.end= 0x01000000 114255659Ssbrunohint.map.5.name="cfg" 115255659Ssbrunohint.map.5.readonly=0 116255659Ssbruno 117255659Ssbruno# GPIO specific configuration block 118255659Ssbruno 119255659Ssbruno#define GPIO_PIN_INPUT 0x0001 /* input direction */ 120255659Ssbruno#define GPIO_PIN_OUTPUT 0x0002 /* output direction */ 121255659Ssbruno#define GPIO_PIN_OPENDRAIN 0x0004 /* open-drain output */ 122255659Ssbruno#define GPIO_PIN_PUSHPULL 0x0008 /* push-pull output */ 123255659Ssbruno#define GPIO_PIN_TRISTATE 0x0010 /* output disabled */ 124255659Ssbruno#define GPIO_PIN_PULLUP 0x0020 /* internal pull-up enabled */ 125255659Ssbruno#define GPIO_PIN_PULLDOWN 0x0040 /* internal pull-down enabled */ 126255659Ssbruno#define GPIO_PIN_INVIN 0x0080 /* invert input */ 127255659Ssbruno#define GPIO_PIN_INVOUT 0x0100 /* invert output */ 128255659Ssbruno#define GPIO_PIN_PULSATE 0x0200 /* pulsate in hardware */ 129255659Ssbruno 130255659Ssbruno# Pin 1 - SCK 131255659Ssbruno# Pin 2 - SDA 132255659Ssbruno# Pin 3 - test 2 133255659Ssbruno# Pin 4 - test 3 134255659Ssbruno# Pin 5 - USB (LED Blue) 135255659Ssbruno# Pin 6 - test a 136255659Ssbruno# Pin 7 - Security (LED Orange) 137255659Ssbruno# Pin 8 - Router (LED Green) 138255659Ssbruno# Pin 9 - Movie Engine On (LED Blue) 139255659Ssbruno# Pin 10 - Movie Engine Off (LED Blue) 140255659Ssbruno# Pin 11 - test a 141255659Ssbruno# Pin 12 - test a 142255659Ssbruno# Pin 13 - test a 143255659Ssbruno# Pin 14 - USB Power (turn on by default) 144255659Ssbruno# Pin 15 - test a 145255659Ssbruno# Pin 16 - test a 146255659Ssbruno# Pin 17 - diag (LED red) 147255659Ssbruno 148255659Ssbruno# Don't flip on anything that isn't already enabled. 149255659Ssbruno# Force on USB power pin 14 150255659Ssbruno#hint.gpio.0.function_set=0x00000000 151255659Ssbruno#hint.gpio.0.function_clear=0x00000000 152255659Ssbruno 153255659Ssbruno# These are the GPIO LEDs and buttons which can be software controlled. 154255659Ssbrunohint.gpio.0.pinmask=0x000103D0 155255659Ssbruno 156255659Ssbrunohint.gpio.0.pinon=0x00000000 157255659Ssbruno 158255659Ssbrunohint.gpioiic.0.at="gpiobus0" 159255659Ssbrunohint.gpioiic.0.pins=0x0003 160255659Ssbrunohint.gpioiic.0.sda=0 161255659Ssbrunohint.gpioiic.0.scl=1 162255659Ssbruno 163255659Ssbruno# LEDs are configured separately and driven by the LED device 164255659Ssbruno# usb tested good 165255659Ssbrunohint.gpioled.0.at="gpiobus0" 166255659Ssbrunohint.gpioled.0.name="blue-usb" 167255659Ssbrunohint.gpioled.0.pins=0x00000010 168255659Ssbruno 169255659Ssbrunohint.gpioled.1.at="gpiobus0" 170255659Ssbrunohint.gpioled.1.name="orange-security" 171255659Ssbrunohint.gpioled.1.pins=0x00000040 172255659Ssbruno 173255659Ssbrunohint.gpioled.2.at="gpiobus0" 174255659Ssbrunohint.gpioled.2.name="green-router" 175255659Ssbrunohint.gpioled.2.pins=0x00000080 176255659Ssbruno 177255659Ssbrunohint.gpioled.3.at="gpiobus0" 178255659Ssbrunohint.gpioled.3.name="blue-movie-engine-on" 179255659Ssbrunohint.gpioled.3.pins=0x00000100 180255659Ssbruno 181255659Ssbrunohint.gpioled.4.at="gpiobus0" 182255659Ssbrunohint.gpioled.4.name="blue-movie-engine-off" 183255659Ssbrunohint.gpioled.4.pins=0x00000200 184255659Ssbruno 185255659Ssbrunohint.gpioled.5.at="gpiobus0" 186255659Ssbrunohint.gpioled.5.name="red-diag" 187255659Ssbrunohint.gpioled.5.pins=0x00010000 188