Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jan 2017 22:56:20 +0000 (UTC)
From:      Michael Zhilin <mizhka@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r312203 - head/sys/mips/conf
Message-ID:  <201701142256.v0EMuKBp010400@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mizhka
Date: Sat Jan 14 22:56:20 2017
New Revision: 312203
URL: https://svnweb.freebsd.org/changeset/base/312203

Log:
  [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

Modified:
  head/sys/mips/conf/ONIONOMEGA.hints

Modified: head/sys/mips/conf/ONIONOMEGA.hints
==============================================================================
--- head/sys/mips/conf/ONIONOMEGA.hints	Sat Jan 14 22:27:31 2017	(r312202)
+++ head/sys/mips/conf/ONIONOMEGA.hints	Sat Jan 14 22:56:20 2017	(r312203)
@@ -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
+



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