UARTS in kernel 4.4: no /dev/ttO* ?

258 views
Skip to first unread message

Matt

unread,
Aug 18, 2016, 5:57:35 PM8/18/16
to BeagleBoard
Hi,

Working in kernel 4.4.16-bone-rt-r11 and am not seeing the corresponding entries in /dev/ for the enabled UARTS.

My custom DTS (BB-APA-01) enables a number of UARTS but I am not seeing the corresponding /dev/ttyO2, ttyO4, ttyO5, etc. 

Tried also loading the BB-UART2-00A0.dtbo from /lib/firmare/ as you can see below when I cat slots. 

root:~# cat /sys/devices/platform/bone_capemgr/slots
 0: PF----  -1
 1: PF----  -1
 2: PF----  -1
 3: PF----  -1
 4: P-O-L-   0 Override Board Name,00A0,Override Manuf,BB-APA-01
 5: P-O-L-   1 Override Board Name,00A0,Override Manuf,BB-ADC
 6: P-O-L-   2 Override Board Name,00A0,Override Manuf,BB-UART2


root:~# ls /dev/tty*
/dev/tty    /dev/tty19    /dev/tty3   /dev/tty40    /dev/tty51  /dev/tty62
/dev/tty0   /dev/tty2    /dev/tty30  /dev/tty41    /dev/tty52  /dev/tty63
/dev/tty1   /dev/tty20    /dev/tty31  /dev/tty42    /dev/tty53  /dev/tty7
/dev/tty10  /dev/tty21    /dev/tty32  /dev/tty43    /dev/tty54  /dev/tty8
/dev/tty11  /dev/tty22    /dev/tty33  /dev/tty44    /dev/tty55  /dev/tty9
/dev/tty12  /dev/tty23    /dev/tty34  /dev/tty45    /dev/tty56  /dev/ttyACM0
/dev/tty13  /dev/tty24    /dev/tty35  /dev/tty46    /dev/tty57  /dev/ttyS0
/dev/tty14  /dev/tty25    /dev/tty36  /dev/tty47    /dev/tty58  /dev/ttyS1
/dev/tty15  /dev/tty26    /dev/tty37  /dev/tty48    /dev/tty59  /dev/ttyS2
/dev/tty16  /dev/tty27    /dev/tty38  /dev/tty49    /dev/tty6   /dev/ttyS3
/dev/tty17  /dev/tty28    /dev/tty39  /dev/tty5    /dev/tty60  /dev/ttyS4
/dev/tty18  /dev/tty29    /dev/tty4   /dev/tty50    /dev/tty61  /dev/ttyS5


What am I missing here?  When a UART is loaded into slots should it then be labeld ttyOX in /dev just as in 3.18?

Mike

unread,
Aug 18, 2016, 6:18:43 PM8/18/16
to beagl...@googlegroups.com
On 08/18/2016 05:57 PM, Matt wrote:
> Hi,
>
> Working in kernel 4.4.16-bone-rt-r11 and am not seeing the
> corresponding entries in /dev/ for the enabled UARTS.
>
> /dev/tty13 /dev/tty24 /dev/tty35 /dev/tty46 /dev/tty57 /dev/ttyS0
> /dev/tty14 /dev/tty25 /dev/tty36 /dev/tty47 /dev/tty58 /dev/ttyS1
> /dev/tty15 /dev/tty26 /dev/tty37 /dev/tty48 /dev/tty59 /dev/ttyS2
> /dev/tty16 /dev/tty27 /dev/tty38 /dev/tty49 /dev/tty6 /dev/ttyS3
> /dev/tty17 /dev/tty28 /dev/tty39 /dev/tty5 /dev/tty60 /dev/ttyS4
> /dev/tty18 /dev/tty29 /dev/tty4 /dev/tty50 /dev/tty61 /dev/ttyS5
>
>
> What am I missing here? When a UART is loaded into slots should it
> then be labeld ttyOX in /dev just as in 3.18?
> --

/dev/ttyS?

Mike
Message has been deleted

Matt

unread,
Aug 18, 2016, 7:17:09 PM8/18/16
to BeagleBoard, belly...@gmail.com
Don't think the ttyS's are it.  I know for sure in 3.18 you use the /ttyO2 or whatever number uart you enable.

Can anyone confirm that in 4.4 the UARTS show as /ttyS*  ?

Going to check my .dts.

William Hermans

unread,
Aug 18, 2016, 7:32:42 PM8/18/16
to beagl...@googlegroups.com
william@beaglebone:~$ dmesg |grep tty
[    0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait ip        v6.disable=1
[    0.002187] console [tty0] enabled
[    0.002223] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    1.998154] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
[    2.884801] console [ttyS0] enabled
william@beaglebone:~$ clear
william@beaglebone:~$ ls /sys/devices/
armv7_cortex_a8  breakpoint  platform  soc0  software  system  tracepoint  virtual
william@beaglebone:~$ ls /sys/devices/platform/
alarmtimer    cpufreq-dt        leds  omap-pcm-audio  pm33xx.0  power      serial8250  ti-cpufreq.0
bone_capemgr  fixedregulator@0  ocp   opp_table0      pmu       reg-dummy  soc         uevent
william@beaglebone:~$ cat /sys/devices/platform/bone_capemgr/slots

 0: PF----  -1
 1: PF----  -1
 2: PF----  -1
 3: PF----  -1
william@beaglebone:~$ ls /lib/firmware/ |grep UART
BB-UART1-00A0.dtbo
BB-UART2-00A0.dtbo
BB-UART2-RTSCTS-00A0.dtbo
BB-UART3-00A0.dtbo
BB-UART4-00A0.dtbo
BB-UART4-RS485-00A0.dtbo
BB-UART5-00A0.dtbo
william@beaglebone:~$ sudo sh -c"echo 'BB-UART2' > /sys/devices/platform/bone_capemgr/slots"
[sudo] password for william:
sh: 0: Illegal option -h
william@beaglebone:~$ sudo sh -c "echo 'BB-UART2' > /sys/devices/platform/bone_capemgr/slots"
william@beaglebone:~$ cat /sys/devices/platform/bone_capemgr/slots

 0: PF----  -1
 1: PF----  -1
 2: PF----  -1
 3: PF----  -1
 4: P-O-L-   0 Override Board Name,00A0,Override Manuf,BB-UART2
william@beaglebone:~$ dmesg |grep tty
[    0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait ip        v6.disable=1
[    0.002187] console [tty0] enabled
[    0.002223] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    1.998154] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
[    2.884801] console [ttyS0] enabled
[778201.669492] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 198, base_baud = 3000000) is a 8250


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/47a3dbf5-9d09-4825-80a4-54213c54c336%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

William Hermans

unread,
Aug 18, 2016, 7:34:40 PM8/18/16
to beagl...@googlegroups.com
william@beaglebone:~$ ls /sys/devices/platform/ocp/
40300000.ocmcram          48030000.spi    48060000.mmc                   48310000.rng       53500000.aes
40302000.ocmcram_nocache  48038000.mcasp  480c8000.mailbox               49000000.edma      56000000.sgx
44e07000.gpio             4803c000.mcasp  480ca000.spinlock              49800000.tptc      driver_override
44e09000.serial           48042000.timer  4819c000.i2c                   49900000.tptc      modalias
44e0b000.i2c              48044000.timer  481a0000.spi                   49a00000.tptc      ocp:l4_wkup@44c00000
44e35000.wdt              48046000.timer  481ac000.gpio                  4a100000.ethernet  of_node
44e3e000.rtc              48048000.timer  481ae000.gpio                  4a300000.pruss     power
47400000.usb              4804a000.timer  481d8000.mmc                   4c000000.emif      subsystem
48024000.serial           4804c000.gpio   48200000.interrupt-controller  53100000.sham      uevent
william@beaglebone:~$ ls /sys/devices/platform/ocp/48024000.serial
driver  driver_override  modalias  of_node  power  subsystem  tty  uevent
william@beaglebone:~$ ls /sys/devices/platform/ocp/48024000.serial/tty
ttyS2

William Hermans

unread,
Aug 18, 2016, 7:43:14 PM8/18/16
to beagl...@googlegroups.com
william@beaglebone:~$ apt-cache search setserial
setserial - controls configuration of serial ports
william@beaglebone:~$ sudo apt-get install setserial
. . .
The following NEW packages will be installed:
  setserial
0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.
Need to get 49.9 kB of archives.
After this operation, 139 kB of additional disk space will be used.

william@beaglebone:~$ setserial -g /dev/ttyS[0-5]
/dev/ttyS0, UART: 8250, Port: 0x0000, IRQ: 158
/dev/ttyS1, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS2, UART: 8250, Port: 0x0000, IRQ: 198
/dev/ttyS3, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS5, UART: unknown, Port: 0x0000, IRQ: 0

William Hermans

unread,
Aug 18, 2016, 7:49:24 PM8/18/16
to beagl...@googlegroups.com
Anyhow, consider this horse beaten to death.

Micka

unread,
Aug 19, 2016, 9:54:12 AM8/19/16
to beagl...@googlegroups.com
ttyO* is for the omap driver. If i'm not wrong the kernel 4.4 use the driver 8250. 

You can switch back to the omap driver i' the config of the kernel. 

To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORrzz%2B5f65Mr6%2B77Wja%3Daz1w3HumY2ONF5OT78PJ3g3GnA%40mail.gmail.com.

Matt

unread,
Aug 19, 2016, 11:40:32 AM8/19/16
to BeagleBoard
Thanks for the info guys. 

Why is it that ttyS* are all listed when no BB-UART has been loaded into slots?

Work flow before was straight forward:
- Load a .dtbo
- Corresponding /ttyO* loaded.

Now I am unsure. When the BBB boots it shows all the /dev/ttyS*
Do I still have to load the corresponding .dtbo's?
Do I have to run the command
setserial -g /dev/ttyS[0-5]

to bring up UARTS after every boot?
Reply all
Reply to author
Forward
0 new messages