This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux: Unable to use UART in DSP core with interrupts

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

Tool/software: Linux

Hi there, I have got the basic IPC example working on the OMAPL138 LCDK.

The SDK is v4.0.0.4 and Linux is 4.9.28

When I add UART0 in the Hwi using TI-SYSBIOS  app.cfg and reboot Linux...

It does load DSP core from remoteProc but get stuck... When I remove the UART defination from the Hwi app.cfg file all seems to work fine... 

Not sure if EDMA and UART from Linux and overlapped with the DSP core EDMA and Serial comms.

I have added the patch 9794077 and 9694375 based on different posts but still made no difference.. 

I will upload the logs in my next post. 

Please, let me know if I need to disable edma core from DTSI in Linux for this to work.. 

One more think, when I added "systemctl disable serial-getty@ttyS2.service" again based on different post.. I can get the EDMA UART IF on DSP to work but then get loads of errors:

edma 1c00000.edma: dma_ccerr_handler: Error interrupt without error event!
edma 1c00000.edma: dma_ccerr_handler: Error interrupt without error event!
edma 1c00000.edma: dma_ccerr_handler: Error interrupt without error event!
edma 1c00000.edma: dma_ccerr_handler: Error interrupt without error event!
edma 1c00000.edma: dma_ccerr_handler: Error interrupt without error event!
edma 1c00000.edma: dma_ccerr_handler: Error interrupt without error event!

edma 1c00000.edma: dma_ccerr_handler: Error interrupt without error event!

edma 1c00000.edma: dma_ccerr_handler: Error interrupt without error event!
edma 1c00000.edma: dma_ccerr_handler: Error interrupt without error event!
edma 1c00000.edma: dma_ccerr_handler: Error interrupt without error event!
systemd-journald[70]: /dev/kmsg buffer overrun, some messages lost.
virtio_rpmsg_bus virtio0: msg received with no recipient

  • Linux Boot log Attached.

    LinucBootLog13_4_18.txt
    -Boot SPL 2017.01-00319-g9e3097f-dirty (Sep 15 2017 - 14:25:12)
    Trying to boot from NAND
    
    
    U-Boot 2017.01-00319-g9e3097f-dirty (Sep 15 2017 - 14:25:12 +0100)
    
    I2C:   ready
    DRAM:  128 MiB
    WARNING: Caches not enabled
    NAND:  512 MiB
    MMC:   davinci: 0
    In:    serial
    Out:   serial
    Err:   serial
    Invalid MAC address read.
    Net:   DaVinci-EMAC
    Warning: DaVinci-EMAC (eth0) using random MAC address - 22:c8:4b:1d:2c:a8
    
    Hit any key to stop autoboot:  0
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading boot.scr
    ** Unable to read file boot.scr **
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    2377864 bytes read in 2719 ms (853.5 KiB/s)
    11901 bytes read in 54 ms (214.8 KiB/s)
    ## Flattened Device Tree blob at c0600000
       Booting using the fdt blob at 0xc0600000
       Loading Device Tree to c7e23000, end c7e28e7c ... OK
    
    Starting kernel ...
    
    Uncompressing Linux... done, booting the kernel.
    Booting Linux on physical CPU 0x0
    Linux version 4.9.28-geed43d1050 (root@ubuntu) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #2 PREEMPT Fri Apr 13 15:53:27 BST 2018
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
    CPU: VIVT data cache, VIVT instruction cache
    OF: fdt:Machine model: DA850/AM1808/OMAP-L138 LCDK
    Reserved memory: created CMA memory pool at 0xc3000000, size 32 MiB
    OF: reserved mem: initialized node dsp_cma@c3000000, compatible id shared-dma-pool
    cma: Reserved 16 MiB at 0xc6c00000
    Memory policy: Data cache writethrough
    DaVinci da850/omap-l138/am18x variant 0x1
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32480
    Kernel command line: console=ttyS2,115200n8 root=PARTUUID=38cb5733-02 rw rootfstype=ext4 rootwait
    PID hash table entries: 512 (order: -1, 2048 bytes)
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Memory: 73732K/131072K available (4554K kernel code, 309K rwdata, 1452K rodata, 228K init, 162K bss, 8188K reserved, 49152K cma-reserved)
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
        vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
        lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
        modules : 0xbf000000 - 0xc0000000   (  16 MB)
          .text : 0xc0008000 - 0xc047ae98   (4556 kB)
          .init : 0xc05e7000 - 0xc0620000   ( 228 kB)
          .data : 0xc0620000 - 0xc066d628   ( 310 kB)
           .bss : 0xc066d628 - 0xc0696170   ( 163 kB)
    SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Preemptible hierarchical RCU implementation.
            Build-time adjustment of leaf fanout to 32.
    NR_IRQS:245
    clocksource: timer0_1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    Console: colour dummy device 80x30
    Calibrating delay loop... 227.32 BogoMIPS (lpj=1136640)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    CPU: Testing write buffer coherency: ok
    Setting up static identity map for 0xc0008400 - 0xc0008458
    devtmpfs: initialized
    VFP support v0.3: not present
    clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    futex hash table entries: 256 (order: -1, 3072 bytes)
    pinctrl core: initialized pinctrl subsystem
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    cpuidle: using governor ladder
    cpuidle: using governor menu
    mux: initialized RTC_ALARM
    mux: Setting register RTC_ALARM
    mux:    PINMUX0 (0x00000000) = 0x44080000 -> 0x24080000
    No ATAGs?
    edma 1c00000.edma: memcpy is disabled
    edma 1c00000.edma: TI EDMA DMA engine driver
    edma 1e30000.edma: memcpy is disabled
    edma 1e30000.edma: TI EDMA DMA engine driver
    i2c_davinci i2c_davinci.1: could not find pctldev for node /soc@1c00000/pinmux@14120/pinmux_i2c0_pins, deferring probe
    pps_core: LinuxPPS API ver. 1 registered
    pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    PTP clock support registered
    clocksource: Switched to clocksource timer0_1
    NET: Registered protocol family 2
    TCP established hash table entries: 1024 (order: 0, 4096 bytes)
    TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
    TCP: Hash tables configured (established 1024 bind 1024)
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    RPC: Registered named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    workingset: timestamp_bits=14 max_order=15 bucket_order=1
    Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
    io scheduler noop registered (default)
    pinctrl-single 1c14120.pinmux: please update dts to use #pinctrl-cells = <2>
    pinctrl-single 1c14120.pinmux: 160 pins at pa fec14120 size 80
    Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    console [ttyS2] disabled
    serial8250.2: ttyS2 at MMIO 0x1d0d000 (irq = 61, base_baud = 8250000) is a TI DA8xx/66AK2x
    console [ttyS2] enabled
    brd: module loaded
    libphy: Fixed MDIO Bus: probed
    davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
    davinci_mdio davinci_mdio.0: detected phy mask fffffffd
    libphy: davinci_mdio.0: probed
    davinci_mdio davinci_mdio.0: phy[1]: device davinci_mdio.0:01, driver NatSemi DP83640
    i2c /dev entries driver
    davinci_mmc da830-mmc.0: Got CD GPIO
    davinci_mmc da830-mmc.0: Using DMA, 4-bit mode
    NET: Registered protocol family 10
    sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    NET: Registered protocol family 17
    console [netcon0] enabled
    netconsole: network logging started
    davinci_emac davinci_emac.1: incompatible machine/device type for reading mac address
    davinci_emac davinci_emac.1: using random MAC addr: 96:1f:c3:0c:67:0d
    mmc0: host does not support reading read-only switch, assuming write-enable
    input: gpio-keys as /devices/platform/gpio-keys/input/input0
    mmc0: new high speed SDHC card at address 0007
    mmcblk0: mmc0:0007 SD32G 29.8 GiB
     mmcblk0: p1 p2 p3
    hctosys: unable to open rtc device (rtc0)
    random: fast init done
    EXT4-fs (mmcblk0p2): recovery complete
    EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    VFS: Mounted root (ext4 filesystem) on device 179:2.
    devtmpfs: mounted
    Freeing unused kernel memory: 228K (c05e7000 - c0620000)
    This architecture does not have kernel memory protection.
    systemd[1]: System time before build time, advancing clock.
    systemd[1]: systemd 230 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
    systemd[1]: Detected architecture arm.
    
    Welcome to Arago 2017.05!
    
    systemd[1]: Set hostname to <omapl138-lcdk>.
    systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [  OK  ] Started Forward Password Requests to Wall Directory Watch.
    systemd[1]: Reached target Swap.
    [  OK  ] Reached target Swap.
    systemd[1]: Created slice User and Session Slice.
    [  OK  ] Created slice User and Session Slice.
    systemd[1]: Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on Journal Socket (/dev/log).
    systemd[1]: Reached target Remote File Systems.
    [  OK  ] Reached target Remote File Systems.
    systemd[1]: Listening on Network Service Netlink Socket.
    [  OK  ] Listening on Network Service Netlink Socket.
    systemd[1]: Listening on Journal Socket.
    [  OK  ] Listening on Journal Socket.
    [  OK  ] Listening on Syslog Socket.
    [  OK  ] Listening on udev Control Socket.
    [  OK  ] Started Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Reached target Paths.
    [  OK  ] Listening on udev Kernel Socket.
    [  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
    [  OK  ] Created slice System Slice.
    [  OK  ] Created slice system-serial\x2dgetty.slice.
             Mounting POSIX Message Queue File System...
             Mounting Debug File System...
             Mounting Temporary Directory...
             Starting Journal Service...
             Starting Setup Virtual Console...
             Starting Create list of required st... nodes for the current kernel...
    [  OK  ] Created slice system-getty.slice.
             Starting Load Kernel Modules...
    [  OK  ] Reached target Slices.
             Starting Remount Root and Kernel File Systems...
    cryptodev: loading out-of-tree module taints kernel.
    cryptodev: driver 1.8 loaded.
    [  OK  ] Mounted POSIXEXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
     Message Queue File System.
    [  OK  ] Mounted Debug File System.
    [  OK  ] Mounted Temporary Directory.
    [  OK  ] Started Setup Virtual Console.
    [  OK  ] Started Create list of required sta...ce nodes for the current kernel.
    [  OK  ] Started Load Kernel Modules.
    [  OK  ] Started Remount Root and Kernel File Systems.
    [  OK  ] Started Journal Service.
             Starting Flush Journal to Persistent Storage...
             Starting udev Coldplug all Devices...
             Starting Apply Kernel Variables...
             Starting Create Static Device Nodes in /dev...
    [  OK  ] Started Apply Kernel Variables.
    [  OK  ] Started Create Static Device Nodes in /dev.
    systemd-journald[59]: Received request to flush runtime journal from PID 1
             Starting udev Kernel Device Manager...
    [  OK  ] Reached target Local File Systems (Pre).
             Mounting /var/volatile...
             Mounting /media/ram...
    [  OK  ] Mounted /var/volatile.
    [  OK  ] Mounted /media/ram.
    [  OK  ] Started udev Kernel Device Manager.
    [  OK  ] Started Flush Journal to Persistent Storage.
    [  OK  ] Reached target Local File Systems.
             Starting Create Volatile Files and Directories...
             Starting Load/Save Random Seed...
    [  OK  ] Started Load/Save Random Seed.
    [  OK  ] Started Create Volatile Files and Directories.
             Starting Update UTMP about System Boot/Shutdown...
             Starting Network Time Synchronization...
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Started Network Time Synchronization.
             Starting Synchronize System and HW clocks...
    [  OK  ] Reached target System Time Synchronized.
    [FAILED] Failed to start Synchronize System and HW clocks.
    See 'systemctl status sync-clocks.service' for details.
    davinci-rproc davinci-rproc.0: assigned reserved memory node dsp_cma@c3000000
    remoteproc remoteproc0: dsp is available
    remoteproc remoteproc0: powering up dsp
    remoteproc remoteproc0: Booting fw image rproc-dsp-fw, size 6300960
    davinci-wdt davinci-wdt: heartbeat 60 sec
    [remoteproc remoteproc0: registered virtio0 (type 7)
      OK  ] Started udev Coldplug all Devices.
    remoteproc remoteproc0: remote processor dsp is now up
    Using stored F280 System Settings
    Linux video capture interface: v2.00
    OF: /sound/simple-audio-card,cpu: could not get #sound-dai-cells for /soc@1c00000/mcasp@100000
    0-0018 supply IOVDD not found, using dummy regulator
    0-0018 supply DVDD not found, using dummy regulator
    0-0018 supply AVDD not found, using dummy regulator
    0-0018 supply DRVDD not found, using dummy regulator
    asoc-simple-card sound: parse error -22
    asoc-simple-card: probe of sound failed with error -22
    tvp514x 0-005d: Write: retry ... 0
    EXT4-fs (mmcblk0p3): mounting ext3 file system using the ext4 subsystem
    EXT4-fs (mmcblk0p3): recovery complete
    EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
    FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    virtio_rpmsg_bus virtio0: rpmsg host is online
    virtio_rpmsg_bus virtio0: creating channel rpmsg-proto addr 0x3d
    tvp514x 0-005d: Write: retry ... 1
    tvp514x 0-005d: Write: retry ... 2
    tvp514x 0-005d: Write: retry ... 3
    tvp514x 0-005d: Write: retry ... 4
    tvp514x 0-005d: Write: retry ... 5
    tvp514x 0-005d: tvp514x 0-005d decoder driver registered !!
    vpif_capture vpif_capture: registered sub device tvp514x-0
    tvp514x 0-005d: Write: retry ... 0
    tvp514x 0-005d: Write: retry ... 1
    tvp514x 0-005d: Write: retry ... 2
    nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xcc
    nand: Micron MT29F4G16ABADAH4
    nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    Bad block table not found for chip 0
    Bad block table not found for chip 0
    Scanning device for bad blocks
    tvp514x 0-005d: Write: retry ... 3
    tvp514x 0-005d: Write: retry ... 4
    tvp514x 0-005d: Write: retry ... 5
    [  OK  ] Found device /dev/ttyS2.
    NET: Registered protocol family 43
    Bad block table written to 0x00001ffe0000, version 0x01
    Bad block table written to 0x00001ffc0000, version 0x01
    3 ofpart partitions found on MTD device davinci-nand.0
    Creating 3 MTD partitions on "davinci-nand.0":
    0x000000000000-0x000000020000 : "u-boot env"
    0x000000020000-0x0000000a0000 : "u-boot"
    0x0000000a0000-0x000020000000 : "free space"
    davinci_nand davinci-nand.0: controller rev. 2.5
    [  OK  ] Reached target System Initialization.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Listening on RPCbind Server Activation Socket.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timers.
    [  OK  ] Listening on dropbear.socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Reached target Basic System.
             Starting Ethernet Bridge Filtering Tables...
             Starting Print notice about GPLv3 packages...
    [  OK  ] Started System Logging Service.
             Starting telnetd.service...
             Starting tiipclad-daemon.service...
             Starting Login Service...
    [  OK  ] Started System Logger Daemon.
    [  OK  ] Started Kernel Logging Service.
    [  OK  ] Started D-Bus System Message Bus.
             Starting Network Service...
    [  OK  ] Started Ethernet Bridge Filtering Tables.
    [  OK  ] Started telnetd.service.
    [  OK  ] Started tiipclad-daemon.service.
             Starting thttpd.service...
    [  OK  ] Started Login Service.
    [  OK  ] Started Network Service.
    [  OK  ] Reached target Network.
             Starting Network Name Resolution...
    davinci_mdio davinci_mdio.0: resetting idled controller
    NatSemi DP83640 davinci_mdio.0:01: attached PHY driver [NatSemi DP83640] (mii_bus:phy_addr=davinci_mdio.0:01, irq=-1)
             Starting Lightning Fast Webserver With Light SysIPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    tem Requirements...
             Starting Permit User Sessions...
             Starting Simple Network Management Protocol (SNMP) Daemon....
    [  OK  ] Started Vsftpd ftp daemon.
    [  OK  ] Started strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf.
    [  OK  ] Started thttpd.service.
    [  OK  ] Started Lightning Fast Webserver With Light System Requirements.
    [  OK  ] Started Permit User Sessions.
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Started Serial Getty on ttyS2.
    davinci_emac davinci_emac.1 eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [  OK  ] Started Getty on tty1.
    [  OK  ] Reached target Login Prompts.
             Starting rng-tools.service...
    [  OK  ] Started rng-tools.service.
    random: crng init done
             Starting SYSV: The kdump script provides the support:...
    [FAILED] Failed to start SYSV: The kdump script provides the support:.
    See 'systemctl status kdump.service' for details.
             Starting matrix-gui-2.0.service...
    [FAILED] Failed to start matrix-gui-2.0.service.
    See 'systemctl status matrix-gui-2.0.service' for details.
             Starting thermal-zone-init.service...
    
     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|
    
    Arago Project http://arago-project.org omapl138-lcdk ttyS2
    
    Arago 2017.05 omapl138-lcdk ttyS2
    
    omapl138-lcdk login: *******************************

  • Hi Mitesh,

    I have added the patch 9794077 and 9694375 based on different posts but still made no difference..

    Can you share these patches or the e2e post from which you got them?

    I suggest you check which edma channel that you use in your dsp app. Linux kernel uses serial2 for debug console (which corresponds to uart2), so UART0 is not in use by linux kernel (ARM core).
    Maybe also try to remove the following definition from arch/arm/boot/dts/da850.dtsi:
    serial0: serial@42000 {
    compatible = "ti,da830-uart", "ns16550a";
    reg = <0x42000 0x100>;
    reg-io-width = <4>;
    reg-shift = <2>;
    interrupts = <25>;
    status = "disabled";
    };

    Best Regards,
    Yordan
  • Hi Yordan, here is the link from e2e forum. 

    I want to use EDMA for all the serial ports in DSP app. I will remove the definition of serial0 and check if that makes any difference. Thanks. 

  • Thanks for the link, I'll look into it.

    I want to use EDMA for all the serial ports in DSP app

    What I meant was which EDMA events/channels do you use? Maybe they overlap with the ones used by linux kernel. See the da850-lcdk.dts to make sure you utilize the unused edma events.

    Best Regards,
    Yordan
  • Hi Yordan,
    Oh Okay, I will check, but can I just disabled the EDMA usage in Linux?
    thanks.
  • HI Yordan,

    When I enable just the UART2 in interrupt mode, I get the following log on the serial port:

    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading boot.scr
    ** Unable to read file boot.scr **
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    2378024 bytes read in 2720 ms (853.5 KiB/s)
    11901 bytes read in 54 ms (214.8 KiB/s)
    ## Flattened Device Tree blob at c0600000
    Booting using the fdt blob at 0xc0600000
    Loading Device Tree to c7e23000, end c7e28e7c ... OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    ¢ÍÁÌñ@ìß@¢ÍÃÍÑîÍ@Žbp`@ãñãìÍÝ@žÍï@ƒßÞÎÑÏíâÁìÑßÞ@£ÍììÑÞÏã

    However, as you can see.. the last line is printed using DSP Core and for some reason it always prints like this.. i's using the same baudrate of 115200 and same start and stop bits.. but always prints as if the baudrate is changes...

    I am currently using DSP core at 300MHz and I guess Linux boots DSp up with the same clock of 300MHz..

    At this stage: I have disabled all the EDMA in DSP and also disabled UART0 and UART1..
    I think, there is something between the Linux boot and DSP app run changing the clock or serial IO .
  • Hi Yordan, I think the DSP/ARM clock is not set to 300MHz.. that might be the problem.. What is the default clock rate set when using Linux remoteProc to boot DSP app. Cheers.
  • Hi,

    Let me check this and I will update the thread.

    Best Regards,
    Yordan
  • Hi Yordan, it looks like the PLL confing in the Linux is not as I expected.. the UART clock was 132MHz and I am tryignto see how can I change it to standard 150MHz. And also trying to change this in the DSP end.

    Let me know, what you find out. Cheers.
  • Hi Yordan,
    is there a way to read PLL configuration or what is the current clock outputs of the PLLs in Linux OS.
    Thanks
  • Hi,

    See Figure 8-1. PLLC Structure and Table 8-1. System PLLC Output Clocks.

    According to these the SYSCLK1 (clock to DSP) and SYSCLK6 (clock to ARM) should have the same value. I've verified this on my OMAP-L138 LCDK:
    root@omapl138-lcdk:~# devmem2 0x01C11118
    /dev/mem opened.
    Memory mapped at address 0xb6f2a000.
    Read at address 0x01C11118 (0xb6f2a118): 0x00008000
    root@omapl138-lcdk:~# devmem2 0x01C11168
    /dev/mem opened.
    Memory mapped at address 0xb6f74000.
    Read at address 0x01C11168 (0xb6f74168): 0x00008000

    root@omapl138-lcdk:~#

    Best Regards,
    Yordan

  • Hi Yordan, just checked and yes, they are same ;)
  • Okay, then the problem might be that you want to run the DSP at 300MHz in your dsp app.
    I think you should check the DSP initialization (and UART initialization respectively) in your dsp firmware, which I see is custom.

    Best Regards,
    Yordan
  • Hi Yordan, the problem was I am using PLL0 config function from one of the pdk/startware bootloader example design and in that div2 was assigned based on div1... Looking at the pll config in the GEL file, div2 is also an input to the function. After fixing this. I can run the DSP at 456MHz but would like to verify somehow at the Linux side.. Can we read the current CPU freq?

    And in regards with the UART not workingin interrupt mode, is still that case when I use INT#5 for UART interrupts.. Not sure why I can't use INT5. Any ideas on this, please?

    Regards,
    Mitesh
  • Hi Mitesh,

    They should be running as expected.

    If you absolutely need to check this, this might be possible if you follow the steps bellow:
    1. Enable the cpufreq for omap-l138, see:
    e2e.ti.com/.../2267309

    2. Then you can check the current frequency of arm, through user space (through /sys/devices/system/cpu/cpu0/cpufreq/).
    3. After that as long as the PLLDIV1 and PLLDIV6 are the same, use devmem, as I mentioned in my previous post, then ARM & DSP run at the same frequency.

    Best Regards,
    Yordan
  • Hi Yordan, thanks for the info. Will try to add that next time I rebuild the Kernel.

    I am still not able to use UART0 in interrupt mode at DSP INT5. Cant see why? I can use it at INT9
  • Hi,

    Check your irq configurations in the kernel (dts file).. Also see Table 3-1. DSP Interrupt Map and Table 12-1. AINTC System Interrupt Assignments to verify the default interrupt mappings in the device.

    Best Regards,
    Yordan
  • Hi Yordan,
    I will double check again. But this is what I got from Linux Interrupts config:
    root@omapl138-lcdk:~# cat /proc/interrupts
    CPU0
    11: 2205 cp_intc 11 Edge 1c00000.edma_ccint
    12: 1 cp_intc 12 Edge 1c00000.edma_ccerrint
    15: 28 cp_intc 15 Edge i2c_davinci.1
    16: 6630 cp_intc 16 Edge mmc0
    21: 15281 cp_intc 21 Edge clockevent
    22: 3 cp_intc 22 Edge free-run counter
    28: 932 cp_intc 28 Edge da8xx-remoteproc
    33: 0 cp_intc 33 Edge eth0
    34: 3161 cp_intc 34 Edge eth0
    35: 1220 cp_intc 35 Edge eth0
    36: 0 cp_intc 36 Edge eth0
    92: 0 cp_intc 92 Edge vpif_capture, vpif_capture
    93: 0 cp_intc 93 Edge 1e30000.edma_ccint
    94: 0 cp_intc 94 Edge 1e30000.edma_ccerrint
    137: 0 GPIO 36 Edge -davinci_gpio GPIO Key USER1
    138: 0 GPIO 37 Edge -davinci_gpio GPIO Key USER2
    166: 0 GPIO 65 Edge -davinci_gpio da830-mmc.0 cd
    Err: 0


    Any idea what interrupt number is used by "da8xx-remoteproc" this reason I ask is:
    - I am able to use UART0 interrupt at INT4 and INT8, etc.. But just not INT5...
  • The interrupt is used by remoteproc is listed in the above log. It is also stated in da850.dtsi:
    dsp: dsp@11800000 {
    compatible = "ti,da850-dsp";
    ............
    interrupt-parent = <&intc>;
    interrupts = <28>;
    status = "disabled";
    };
    Which results in the following line from cat /proc/interrupts:
    28: 932 cp_intc 28 Edge da8xx-remoteproc

    Best Regards,
    Yordan
  • Hi Yordan,
    That's true, but how to know which INT# is it using after the Interrupts MUX logic?
    Out of the 15 Interrupts based on the IER register, can we find out which one is da8xx-remoteproc interrupt using?
  • Hi Yordan, found out why INT5 can't be used for UART0 interrupt. It's because the IPC core is using INT5 for Event 5. Need to see if that would be straight forward to change in the IPC core. Would you know by any chance where would be the source file for the IPC interrupts?

    Thanks for your support. Cheers
  • Hi Mitesh,

    From kernel side the driver for communication between cores is remoteproc, see drivers/remoteprotc/da85xx_remoteproc.c and remoteproc_core.c. On DSP firmware side the IPC sources are located in Processor SDK RTOS.

    Best Regards,
    Yordan
  • Thanks for the support on this Yordan. Cheers.