Difference between revisions of "Beagleboard:BeagleBone cape interface spec"

From eLinux.org
Jump to: navigation, search
(/dev/bone/spi/2.0)
 
(25 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
= I2C =
 
= I2C =
 +
=== /dev/bone/i2c/0 ===
 +
AM3358 I2C0<br>
 +
AM5729 I2C1
 +
* On-board peripherals
 +
 
=== /dev/bone/i2c/1 ===
 
=== /dev/bone/i2c/1 ===
 
AM3358 I2C1<br>
 
AM3358 I2C1<br>
Line 20: Line 25:
 
* P9.26 - SDA
 
* P9.26 - SDA
  
 +
<!--
 
=== /dev/bone/i2c/4 ===
 
=== /dev/bone/i2c/4 ===
 
AM3358 I2C2<br>
 
AM3358 I2C2<br>
Line 43: Line 49:
 
* P8.37 - SCL
 
* P8.37 - SCL
 
* P8.38 - SDA
 
* P8.38 - SDA
 +
-->
  
 
= SPI =
 
= SPI =
== /dev/bone/spi/1.''x'' ==
+
== /dev/bone/spi/0.''x'' ==
AM335x SPI0<br>
+
AM3358 SPI0<br>
 
AM5729 SPI2
 
AM5729 SPI2
 
* P9.18 - MOSI
 
* P9.18 - MOSI
Line 52: Line 59:
 
* P9.22 - CLK
 
* P9.22 - CLK
  
=== /dev/bone/spi/1.0 ===
+
=== /dev/bone/spi/0.0 ===
AM335x SPI0 CS0<br>
+
AM3358 SPI0 CS0<br>
 
AM5729 SPI2 CS0
 
AM5729 SPI2 CS0
 
* P9.17 - CS
 
* P9.17 - CS
  
=== /dev/bone/spi/1.1 ===
+
== /dev/bone/spi/1.''x'' ==
AM335x SPI0 CS1<br>
+
AM3358 SPI1<br>
AM5729 SPI2 GPIO4_18
 
* P9.42 - CS
 
 
 
== /dev/bone/spi/2.''x'' ==
 
AM335x SPI1<br>
 
 
AM5729 SPI3
 
AM5729 SPI3
 
* P9.30 - MOSI
 
* P9.30 - MOSI
Line 69: Line 71:
 
* P9.31 - CLK
 
* P9.31 - CLK
  
== /dev/bone/spi/2.0 ==
+
=== /dev/bone/spi/1.0 ===
AM335x SPI1 CS0<br>
+
AM3358 SPI1 CS0<br>
 
AM5729 SPI3 CS0  
 
AM5729 SPI3 CS0  
 
* P9.28 - CS
 
* P9.28 - CS
  
== /dev/bone/spi/2.1 ==
+
=== /dev/bone/spi/1.1 ===
AM335x SPI1 CS1<br>
+
AM3358 SPI1 CS1<br>
 
AM5729 SPI3 CS1  
 
AM5729 SPI3 CS1  
 
* P9.42 - CS
 
* P9.42 - CS
  
== /dev/bone/spi/2.1 ==
+
=== /dev/bone/spi/1.2 ===
AM335x SPI1 CS1<br>
+
AM3358 SPI1 GPIO1_17<br>
AM5729 SPx
+
AM5729 SPI3 GPIO7_11
* P9.19 - CS
+
* P9.23 - CS
* P9.30 - MOSI
 
* P9.29 - MISO
 
* P9.31 - CLK
 
  
 
= UART =
 
= UART =
 +
=== /dev/bone/uart/0 ===
 +
AM3358 UART0<br>
 +
AM5729 UART1
 +
* console debug header pins
 +
 +
=== /dev/bone/uart/1 ===
 +
AM3358 UART1<br>
 +
AM5729 UART10
 +
* P9.24 - TX
 +
* P9.26 - RX
 +
 +
=== /dev/bone/uart/2 ===
 +
AM3358 UART2<br>
 +
AM5729 UART3
 +
* P9.21 - TX
 +
* P9.22 - RX
 +
 +
=== /dev/bone/uart/3 ===
 +
AM3358 UART3<br>
 +
AM5729 ''N/A''
 +
* P9.42 - TX
 +
 +
=== /dev/bone/uart/4 ===
 +
AM3358 UART4<br>
 +
AM5729 UART5
 +
* P9.13 - TX
 +
* P9.11 - RX
 +
 +
=== /dev/bone/uart/5 ===
 +
AM3358 UART5<br>
 +
AM5729 UART8
 +
* P8.37 - TX
 +
* P8.38 - RX
  
 
= CAN =
 
= CAN =
 +
=== /dev/bone/can/0 ===
 +
AM3358 CAN0<br>
 +
AM5729 N/A
 +
* P9.19 - RX
 +
* P9.20 - TX
 +
 +
=== /dev/bone/can/1 ===
 +
AM3358 CAN1<br>
 +
AM5729 CAN2
 +
* P9.24 - RX
 +
* P9.26 - TX
 +
 +
= ADC =
 +
=== /dev/bone/adc/0 ===
 +
* AIN0 - AM3358 in_voltage0_raw, AM5729 in_voltage0_raw
 +
* AIN1 - AM3358 in_voltage1_raw, AM5729 in_voltage1_raw
 +
* AIN2 - AM3358 in_voltage2_raw, AM5729 in_voltage3_raw
 +
* AIN3 - AM3358 in_voltage3_raw, AM5729 in_voltage2_raw
 +
* AIN4 - AM3358 in_voltage4_raw, AM5729 in_voltage7_raw
 +
* AIN5 - AM3358 in_voltage5_raw, AM5729 in_voltage6_raw
 +
* AIN6 - AM3358 in_voltage6_raw, AM5729 in_voltage4_raw
 +
 +
= PWM/TIMER =
 +
=== /dev/bone/timer/0 ===
 +
AM3358 TIMER4<br>
 +
AM5729 TIMER11
 +
* P8.7
 +
 +
=== /dev/bone/timer/1 ===
 +
AM3358 TIMER5<br>
 +
AM5729 TIMER14
 +
* P8.9
 +
 +
=== /dev/bone/timer/2 ===
 +
AM3358 TIMER6<br>
 +
AM5729 TIMER10
 +
* P8.10
 +
 +
=== /dev/bone/timer/3 ===
 +
AM3358 TIMER7<br>
 +
AM5729 TIMER12
 +
* P8.8
 +
 +
= MMC =
 +
=== /dev/bone/mmc/2 ===
 +
AM3358 MMC2<br>
 +
AM5729 MMC3
 +
* P8.21 - CLK
 +
* P8.20 - CMD
 +
* P8.25 - DAT0
 +
* P8.24 - DAT1
 +
* P8.5 - DAT2
 +
* P8.6 - DAT3
 +
* P8.23 - DAT4
 +
* P8.22 - DAT5
 +
* P8.4 - DAT7
 +
* P8.3 - DAT6
 +
 +
= LCD =
 +
 +
= eQEP =
 +
=== /dev/bone/eqep/0 ===
 +
AM3358 eQEP0<br>
 +
AM5729 eQEP3
 +
* P9.42 - A
 +
* P9.27 - B
 +
* P9.25 - STROBE (AM3358-only)
 +
 +
=== /dev/bone/eqep/1 ===
 +
AM3358 eQEP1<br>
 +
AM5729 eQEP1
 +
* P8.34 - A
 +
* P8.36 - B
 +
 +
=== /dev/bone/eqep/2 ===
 +
AM3358 eQEP2<br>
 +
AM5729 eQEP2
 +
* P8.12 - A
 +
* P8.11 - B
 +
 +
= McASP =
 +
 +
= Methodology =
 +
 +
== udev rules ==
 +
 +
===[https://github.com/rcn-ee/repos/blob/master/bb-customizations/suite/stretch/debian/10-of-symlink.rules 10-of-symlink.rules]===
 +
<pre>
 +
#From: https://github.com/mvduin/py-uio/blob/master/etc/udev/rules.d/10-of-symlink.rules
 +
# allow declaring a symlink for a device in DT
 +
ATTR{device/of_node/symlink}!="", \
 +
ENV{OF_SYMLINK}="%s{device/of_node/symlink}"
 +
 +
ENV{OF_SYMLINK}!="", ENV{DEVNAME}!="", \
 +
SYMLINK+="%E{OF_SYMLINK}", \
 +
TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/dev/%E{OF_SYMLINK}"
 +
</pre>
  
= PWM =
+
===TBD===
 +
<pre>
 +
#Also courtesy of mvduin
 +
# create symlinks for gpios exported to sysfs by DT
 +
SUBSYSTEM=="gpio", ACTION=="add", TEST=="value", ATTR{label}!="sysfs", \
 +
        RUN+="/bin/mkdir -p /dev/gpio", \
 +
        RUN+="/bin/ln -sT '/sys/class/gpio/%k' /dev/gpio/%s{label}"
 +
</pre>

Latest revision as of 08:35, 1 August 2019

This is a list of symlink interfaces based on BeagleBone Cape header pins.

I2C

/dev/bone/i2c/0

AM3358 I2C0
AM5729 I2C1

  • On-board peripherals

/dev/bone/i2c/1

AM3358 I2C1
AM5729 I2C5

  • P9.17 - SCL
  • P9.18 - SDA

/dev/bone/i2c/2

AM3358 I2C2
AM5729 I2C4

  • P9.19 - SCL
  • P9.20 - SDA

/dev/bone/i2c/3

AM3358 I2C1
AM5729 I2C3

  • P9.24 - SCL
  • P9.26 - SDA


SPI

/dev/bone/spi/0.x

AM3358 SPI0
AM5729 SPI2

  • P9.18 - MOSI
  • P9.21 - MISO
  • P9.22 - CLK

/dev/bone/spi/0.0

AM3358 SPI0 CS0
AM5729 SPI2 CS0

  • P9.17 - CS

/dev/bone/spi/1.x

AM3358 SPI1
AM5729 SPI3

  • P9.30 - MOSI
  • P9.29 - MISO
  • P9.31 - CLK

/dev/bone/spi/1.0

AM3358 SPI1 CS0
AM5729 SPI3 CS0

  • P9.28 - CS

/dev/bone/spi/1.1

AM3358 SPI1 CS1
AM5729 SPI3 CS1

  • P9.42 - CS

/dev/bone/spi/1.2

AM3358 SPI1 GPIO1_17
AM5729 SPI3 GPIO7_11

  • P9.23 - CS

UART

/dev/bone/uart/0

AM3358 UART0
AM5729 UART1

  • console debug header pins

/dev/bone/uart/1

AM3358 UART1
AM5729 UART10

  • P9.24 - TX
  • P9.26 - RX

/dev/bone/uart/2

AM3358 UART2
AM5729 UART3

  • P9.21 - TX
  • P9.22 - RX

/dev/bone/uart/3

AM3358 UART3
AM5729 N/A

  • P9.42 - TX

/dev/bone/uart/4

AM3358 UART4
AM5729 UART5

  • P9.13 - TX
  • P9.11 - RX

/dev/bone/uart/5

AM3358 UART5
AM5729 UART8

  • P8.37 - TX
  • P8.38 - RX

CAN

/dev/bone/can/0

AM3358 CAN0
AM5729 N/A

  • P9.19 - RX
  • P9.20 - TX

/dev/bone/can/1

AM3358 CAN1
AM5729 CAN2

  • P9.24 - RX
  • P9.26 - TX

ADC

/dev/bone/adc/0

  • AIN0 - AM3358 in_voltage0_raw, AM5729 in_voltage0_raw
  • AIN1 - AM3358 in_voltage1_raw, AM5729 in_voltage1_raw
  • AIN2 - AM3358 in_voltage2_raw, AM5729 in_voltage3_raw
  • AIN3 - AM3358 in_voltage3_raw, AM5729 in_voltage2_raw
  • AIN4 - AM3358 in_voltage4_raw, AM5729 in_voltage7_raw
  • AIN5 - AM3358 in_voltage5_raw, AM5729 in_voltage6_raw
  • AIN6 - AM3358 in_voltage6_raw, AM5729 in_voltage4_raw

PWM/TIMER

/dev/bone/timer/0

AM3358 TIMER4
AM5729 TIMER11

  • P8.7

/dev/bone/timer/1

AM3358 TIMER5
AM5729 TIMER14

  • P8.9

/dev/bone/timer/2

AM3358 TIMER6
AM5729 TIMER10

  • P8.10

/dev/bone/timer/3

AM3358 TIMER7
AM5729 TIMER12

  • P8.8

MMC

/dev/bone/mmc/2

AM3358 MMC2
AM5729 MMC3

  • P8.21 - CLK
  • P8.20 - CMD
  • P8.25 - DAT0
  • P8.24 - DAT1
  • P8.5 - DAT2
  • P8.6 - DAT3
  • P8.23 - DAT4
  • P8.22 - DAT5
  • P8.4 - DAT7
  • P8.3 - DAT6

LCD

eQEP

/dev/bone/eqep/0

AM3358 eQEP0
AM5729 eQEP3

  • P9.42 - A
  • P9.27 - B
  • P9.25 - STROBE (AM3358-only)

/dev/bone/eqep/1

AM3358 eQEP1
AM5729 eQEP1

  • P8.34 - A
  • P8.36 - B

/dev/bone/eqep/2

AM3358 eQEP2
AM5729 eQEP2

  • P8.12 - A
  • P8.11 - B

McASP

Methodology

udev rules

10-of-symlink.rules

#From: https://github.com/mvduin/py-uio/blob/master/etc/udev/rules.d/10-of-symlink.rules
# allow declaring a symlink for a device in DT
ATTR{device/of_node/symlink}!="", \
	ENV{OF_SYMLINK}="%s{device/of_node/symlink}"

ENV{OF_SYMLINK}!="", ENV{DEVNAME}!="", \
	SYMLINK+="%E{OF_SYMLINK}", \
	TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/dev/%E{OF_SYMLINK}"

TBD

#Also courtesy of mvduin
# create symlinks for gpios exported to sysfs by DT
SUBSYSTEM=="gpio", ACTION=="add", TEST=="value", ATTR{label}!="sysfs", \
        RUN+="/bin/mkdir -p /dev/gpio", \
        RUN+="/bin/ln -sT '/sys/class/gpio/%k' /dev/gpio/%s{label}"