From e1f21017a38bee1b1f4340e1aa0f6bb7d6400010 Mon Sep 17 00:00:00 2001 From: Michael Zhilin Date: Sat, 14 Jan 2017 22:56:20 +0000 Subject: [PATCH] [mips/onionomega] WiFi & gpio kernel configuration bits This patch adds missing hints for ath0 (eepromaddr) and GPIO (mask & leds). ath0 doesn't work without eeprom hints, so this commit should make wifi works on Onion Omega. GPIO mask is required if you want to use gpiobus and GPIO pins on your board. Onion Omega has several leds connected to gpio pins (one on board, one color on dock). This commit adds mask for gpiobus and allow you to turn off/on leds via /dev/leds/{board,blue,green,red} (on by default). Tested on Onion Omega 1. Reviewed by: adrian Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D9107 --- sys/mips/conf/ONIONOMEGA.hints | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/sys/mips/conf/ONIONOMEGA.hints b/sys/mips/conf/ONIONOMEGA.hints index d3a68695d72..9ce136ba082 100644 --- a/sys/mips/conf/ONIONOMEGA.hints +++ b/sys/mips/conf/ONIONOMEGA.hints @@ -31,6 +31,10 @@ hint.arge.1.media=1000 hint.arge.1.fduplex=1 hint.arge.1.eeprommac=0x1fff0006 +# ath0 +hint.ath.0.eepromaddr=0x1fff0000 +hint.ath.0.eepromsize=16384 + # 16MB flash layout: # [ 0.510000] 5 tp-link partitions found on MTD device spi0.0 # [ 0.510000] Creating 5 MTD partitions on "spi0.0": @@ -92,3 +96,30 @@ hint.map.6.start=0x00ff0000 hint.map.6.end=0x01000000 hint.map.6.name="ART" hint.map.6.readonly=1 + +# GPIO +hint.gpio.0.pinmask=0x0c8ff1c3 + +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.pins=0x08000000 +hint.gpioled.0.name="board" +hint.gpioled.0.invert=0 + +#Red +hint.gpioled.1.at="gpiobus0" +hint.gpioled.1.pins=0x00020000 +hint.gpioled.1.name="red" +hint.gpioled.1.invert=0 + +#Green +hint.gpioled.2.at="gpiobus0" +hint.gpioled.2.pins=0x00010000 +hint.gpioled.2.name="green" +hint.gpioled.2.invert=0 + +#Blue +hint.gpioled.3.at="gpiobus0" +hint.gpioled.3.pins=0x00008000 +hint.gpioled.3.name="blue" +hint.gpioled.3.invert=0 +