Changes between Initial Version and Version 1 of laguna/peripherals


Ignore:
Timestamp:
10/24/2017 04:37:41 AM (5 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • laguna/peripherals

    v1 v1  
     1{{{#!html
     2          <div id="wikipage" class="trac-content"><h1 id="ListofonboardPeripheralsandassociatedDrivers">List <b style="color:#000;background:#ffcc99">of onboard Peripherals and associated</b> Drivers</h1>
     3<h3 id="a32MBFlash">32MB Flash</h3>
     4<p>
     5<strong>Memory Technology Device (MTD)</strong><br />
     6</p>
     7<ul><li>drivers/mtd
     8</li></ul><h3 id="a8KbitsSerialEEPROM">8Kbits Serial EEPROM</h3>
     9<p>
     10<strong>I2C EEPROMs from most vendors</strong><br />
     11</p>
     12<ul><li>drivers/misc/eeprom/at24.c
     13</li></ul><h3 id="a2Port10100100EthernetSwitch">2 Port 10/100/100 Ethernet Switch</h3>
     14<p>
     15<strong>Cavium CNS3xxx Ethernet support</strong><br />
     16</p>
     17<ul><li>drivers/net/cns3xxx_eth.c
     18</li></ul><h3 id="RTC">RTC</h3>
     19<p>
     20<strong><a class="missing wiki">Dallas/Maxim?</a> DS1672</strong><br />
     21</p>
     22<ul><li>drivers/rtc/rtc-ds1672.c
     23</li></ul><h3 id="HWMON">HWMON</h3>
     24<p>
     25<strong>Gateworks System Peripheral</strong><br />
     26</p>
     27<ul><li>drivers/hwmon/gsp.c
     28</li></ul><h3 id="USB">USB</h3>
     29<p>
     30<strong>Cavium CNS3XXX EHCI Module</strong><br />
     31</p>
     32<ul><li>drivers/usb/host/ehci-cns3xxx.c<br />
     33</li><li>drivers/usb/host/ohci-cns3xxx.c<br />
     34</li></ul><p>
     35<strong>Cavium CNS3XXX OTG Module</strong><br />
     36</p>
     37<ul><li>drivers/usb/otg
     38</li></ul><h3 id="GPS">GPS</h3>
     39<ul><li>Uses a builtin serial port
     40</li></ul><h3 id="GPIO">GPIO</h3>
     41<p>
     42Emulates a TI 16-bit i2c Digital-IO: <a class="ext-link" href="http://focus.ti.com/lit/ds/symlink/pca9555.pdf"><span class="icon">​</span>pca9555</a>:
     43</p>
     44<pre class="wiki">J9.1 - gpio108
     45J9.3 - gpio109
     46J9.5 - gpio110
     47J9.7 - gpio111
     48J9.9 - gpio112
     49</pre><p>
     50Modern kernels use gpiolib to access gpio from userspace.  By default these are not exported in the <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> kernels, but you can do so in userspace such as:
     51</p>
     52<pre class="wiki">echo 108 &gt; /sys/class/gpio/export
     53echo 109 &gt; /sys/class/gpio/export
     54echo 110 &gt; /sys/class/gpio/export
     55echo 111 &gt; /sys/class/gpio/export
     56echo 112 &gt; /sys/class/gpio/export
     57echo in &gt; /sys/class/gpio/gpio108/direction
     58echo in &gt; /sys/class/gpio/gpio109/direction
     59echo in &gt; /sys/class/gpio/gpio110/direction
     60echo in &gt; /sys/class/gpio/gpio111/direction
     61echo in &gt; /sys/class/gpio/gpio112/direction
     62</pre><p>
     63to see the value of an input/output:
     64</p>
     65<pre class="wiki">cat /sys/class/gpio/gpio112/value
     66</pre><p>
     67to set the value of an output
     68</p>
     69<pre class="wiki">echo out &gt; /sys/class/gpio/gpio122/direction  ;# set as output
     70echo 1 &gt;/sys/class/gpio/gpio112/value ;# set hi
     71echo 0 &gt;/sys/class/gpio/gpio112/value ;# set low
     72</pre><p>
     73to see all gpio status (assuming you have debugfs mounted):
     74</p>
     75<pre class="wiki">cat /sys/kernel/debug/gpio
     76</pre
     77}}}