Mainline Linux kernel on OpenTAC

4.3 rc6 https://github.com/codehelp/linux-1/tree/opentac - multi_v7_defconfig, opentac branch for the opentac DTB.

Most recent kernel config

Linux tcwgblack02 4.3.0-rc6-00118-gf1581af #3 SMP Sun Oct 25 16:06:06 GMT 2015 armv7l armv7l armv7l GNU/Linux

Notes on Power

Pinmux tables

http://uk.mathworks.com/help/supportpkg/beagleboneio/ug/use-the-beaglebone-black-i2c-interface-to-connect-to-a-device.html

http://www.embedded-things.com/wp-content/uploads/2013/08/P9.png

http://www.embedded-things.com/wp-content/uploads/2013/08/P8.png

Status LEDs

Red (fault indication)

echo 1 > /sys/devices/platform/opentac_leds/leds/opentac:red/brightness
echo 0 > /sys/devices/platform/opentac_leds/leds/opentac:red/brightness

Green (success indication)

echo 1 > /sys/devices/platform/opentac_leds/leds/opentac:green/brightness
echo 0 > /sys/devices/platform/opentac_leds/leds/opentac:green/brightness

I2C

Bus 1

i2cdetect -y -r 1

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- 4c 4d 4e 4f 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --       

Bus 2

i2cdetect -y -r 2

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: UU UU UU -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                        

Enabling USB serial

Currently, enabling USB serial converters (on bus 1) involves enabling GPIO27:

echo 27 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio27/direction
echo 1 > /sys/class/gpio/gpio27/active_low
echo 1 > /sys/class/gpio/gpio27/value
echo 0 > /sys/class/gpio/gpio27/value

i2cdetect -y -r 1

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- 18 19 1a 1b -- -- -- -- 
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- 4c 4d 4e 4f 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

Compare with default state above.

Once this is done, the I2C commands are similar, except on bus 1:

For each USB serial converter, 0x18, 0x19, 0x1a and 0x1b:

i2cset -y 1 0x18 0x03 0x00 b
i2cset -y 1 0x18 0x01 0x80 b
i2cset -y 1 0x18 0x01 0x81 b
i2cset -y 1 0x18 0x01 0x83 b

USB Serial

USB serial does work with the mainline kernel, there are a range of modules which need to be enabled. OpenTACUsefullNotes

We have, initially, created an opentac defconfig which enables the relevant modules. We'll also look at which modules are already available in the Debian ARMMP kernel and which may need to be enabled.

[   41.774704] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[   41.904908] usb 1-1: New USB device found, idVendor=0424, idProduct=2514
[   41.911992] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   41.924874] hub 1-1:1.0: USB hub found
[   41.929233] hub 1-1:1.0: 4 ports detected
[   42.219704] usb 1-1.1: new high-speed USB device number 3 using musb-hdrc
[   42.324935] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514
[   42.332201] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   42.345094] hub 1-1.1:1.0: USB hub found
[   42.350781] hub 1-1.1:1.0: 4 ports detected
[   42.454716] usb 1-1.2: new high-speed USB device number 4 using musb-hdrc
[   42.559914] usb 1-1.2: New USB device found, idVendor=0424, idProduct=2514
[   42.567180] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   42.580064] hub 1-1.2:1.0: USB hub found
[   42.586186] hub 1-1.2:1.0: 4 ports detected

[   48.949705] usb 1-1.1.1: new full-speed USB device number 5 using musb-hdrc
[   49.061168] usb 1-1.1.1: New USB device found, idVendor=0403, idProduct=6015
[   49.068614] usb 1-1.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   49.076509] usb 1-1.1.1: Product: FT231X USB UART
[   49.081462] usb 1-1.1.1: Manufacturer: FTDI
[   49.085868] usb 1-1.1.1: SerialNumber: DJ004JAS
[   49.099929] ftdi_sio 1-1.1.1:1.0: FTDI USB Serial Device converter detected
[   49.107468] usb 1-1.1.1: Detected FT-X
[   49.115068] usb 1-1.1.1: FTDI USB Serial Device converter now attached to ttyUSB0

[   60.589709] usb 1-1.1.2: new full-speed USB device number 6 using musb-hdrc
[   60.701167] usb 1-1.1.2: New USB device found, idVendor=0403, idProduct=6015
[   60.708616] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   60.716510] usb 1-1.1.2: Product: FT231X USB UART
[   60.721466] usb 1-1.1.2: Manufacturer: FTDI
[   60.725871] usb 1-1.1.2: SerialNumber: DJ004VLP
[   60.739905] ftdi_sio 1-1.1.2:1.0: FTDI USB Serial Device converter detected
[   60.747448] usb 1-1.1.2: Detected FT-X
[   60.755018] usb 1-1.1.2: FTDI USB Serial Device converter now attached to ttyUSB1

[   64.429705] usb 1-1.1.3: new full-speed USB device number 7 using musb-hdrc
[   64.541198] usb 1-1.1.3: New USB device found, idVendor=0403, idProduct=6015
[   64.548645] usb 1-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   64.556535] usb 1-1.1.3: Product: FT231X USB UART
[   64.561488] usb 1-1.1.3: Manufacturer: FTDI
[   64.565893] usb 1-1.1.3: SerialNumber: DJ004JCG
[   64.579578] ftdi_sio 1-1.1.3:1.0: FTDI USB Serial Device converter detected
[   64.587179] usb 1-1.1.3: Detected FT-X
[   64.594561] usb 1-1.1.3: FTDI USB Serial Device converter now attached to ttyUSB2

[   66.989706] usb 1-1.1.4: new full-speed USB device number 8 using musb-hdrc
[   67.101162] usb 1-1.1.4: New USB device found, idVendor=0403, idProduct=6015
[   67.108607] usb 1-1.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   67.116496] usb 1-1.1.4: Product: FT231X USB UART
[   67.121451] usb 1-1.1.4: Manufacturer: FTDI
[   67.125855] usb 1-1.1.4: SerialNumber: DJ00510S
[   67.139789] ftdi_sio 1-1.1.4:1.0: FTDI USB Serial Device converter detected
[   67.147310] usb 1-1.1.4: Detected FT-X
[   67.154473] usb 1-1.1.4: FTDI USB Serial Device converter now attached to ttyUSB3

pca953x

If the gpio_expander on i2c1 is set as status = "okay", the pca953x driver tries to poll and fails. Current opentac branch dts disables the gpio_expander on i2c1 and gives a clean report form pca953x.

[    1.605402] pca953x 1-0018: failed reading register
[    1.610583] pca953x: probe of 1-0018 failed with error -121
[    1.616895] mmc0: new high speed SDHC card at address aaaa
[    1.623262] pca953x 1-0019: failed reading register
[    1.628443] pca953x: probe of 1-0019 failed with error -121
[    1.634713] mmcblk0: mmc0:aaaa SU16G 14.8 GiB 
[    1.640113] pca953x 1-001a: failed reading register
[    1.645327] pca953x: probe of 1-001a failed with error -121
[    1.651670]  mmcblk0: p1 p2
[    1.655510] pca953x 1-001b: failed reading register
[    1.660758] pca953x: probe of 1-001b failed with error -121

Needs investigation - the gpio_expander on i2c1 does not need to be enabled at boot.

Fans

pwmchips

/sys/devices/platform/ocp/48300000.epwmss/48300200.ehrpwm/pwm/pwmchip0 -> EPWM0

EPWM0 is not connected externally.

/sys/devices/platform/ocp/48302000.epwmss/48302200.ehrpwm/pwm/pwmchip2 -> EPWM1

/sys/devices/platform/ocp/48304000.epwmss/48304200.ehrpwm/pwm/pwmchip4 -> EPWM2

J8      PWM1    EHRPWM1A        BB P9.14        U14     EHRPWM1A 0x048 mode6 ehrpwm1A GPIO1_18 GPMC_AD2 CONF_GPMC_AD2   0x808 GPIO50
J9      PWM2    EHRPWM1B        BB P9.16        T14     EHRPWM1B 0x04C mode6 ehrpwm1b GPIO1_19 GPMC_AD3 CONF_GPMC_AD3   0x80C GPIO51
J10     PWM3    EHRPWM2A        BB P8.19        U10     EHRPWM2A 0x020 mode4 ehrpwm2A GPIO0_22 GPMC_AD8 CONF_GPMC_AD8   0x820 GPIO22
J11     PWM4    EHRPWM2B        BB P8.13        T10     EHRPWM2B 0x024 mode4 ehrpwm2B GPIO0_23 GPMC_AD9 CONF_GPMC_AD9   0x824 GPIO23

Note for Andy: 1 > value is not enough to turn the transistor off, leaves 1.8V

VeroApparatus: OpenTACMainline (last edited 2016-05-09 19:06:51 by NeilWilliams)