MEMS mic array with beaglebone green

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mailinglist,

I currently work on a project to connect 4 MEMS microfones (ICS-52000) via TDM to a beaglebone green.
The beaglebone green boots from SD-card and it freezes at startup, so i can't check, what is going on (all 4 LEDs constantly on).

McASP must be clock master like in
https://invensense.tdk.com/wp-content/uploads/2016/05/DS-000121-ICS-52000-v1.3.pdf
Figure 9.


The device tree overlay location is given in /boot/uEnv.txt:

#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.14.71-ti-r80
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=/lib/firmware/<file0>.dtbo
#uboot_overlay_addr1=/lib/firmware/<file1>.dtbo
#uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
#uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
###
###Additional custom capes
uboot_overlay_addr4=/lib/firmware/ICS-52000-4mics-00A0.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.4.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo
###pru_rproc (4.14.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_uio (4.4.x-ti, 4.14.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###


The device tree overlay looks as follows (ICS-52000-4mics-00A0.dts):

/*
 * device tree overlay for BeagleBone Green with 4 ICS-52000 MEMS microphones
 *
 * Author:  Winfried Ritsch <ritsch@xxxxxx>
 * edited by Manuel Planton
 *
 * based on BeagleBone Black and BeagleBone Green device tree
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 
 
 * compile with
 * dtc -O dtb -o /lib/firmware/ICS-52000-4mics-00A0.dtbo -b 0 -@ ICS-52000-4mics-00A0.dts
 *
 */
/dts-v1/;
/plugin/;

/ {
    compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green";

    /* identification */
    part-number = "BB_ICS52000-4CH";
    version = "00A0", "A0";

    /* state the resources this cape uses */
    exclusive-use =
    /* audio */
    "P9.30",    /* mcasp0_axr0         audio in */
    "P9.12",    /* mcasp0_aclkr        receive bitclock */
    "P9.27",    /* mcasp0_fsr        receive frameclock */
        "mcasp0";


    fragment@0 {
        target = <&am33xx_pinmux>;
        __overlay__ {
            mcasp0_pins: pinmix_mcasp0_pins {
                pinctrl-single,pins = <
                    0x198 0x20        /* mcasp0_axr0,     MODE0 | INPUT_PULLDOWN | P9_30 */
                    0x078 0x06        /* mcasp0_aclkr,    MODE6 | OUTPUT_PULLDOWN | P9_12 */
                    0x1a4 0x00        /* mcasp0_fsr,        MODE0 | OUTPUT_PULLDOWN | P9_27 */
                >;
                  };
        };
    };


   fragment@1 {
    target = <&mcasp0>;
    __overlay__ {
        pinctrl-names = "default";
        pinctrl-0 = <&mcasp0_pins>;

        status = "okay";

        op-mode = <0>;    /* MCASP_IIS_MODE */
        tdm-slots = <4>;
        num-serializer = <16>;
            serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
                2 0 0 0
                0 0 0 0
                0 0 0 0
                0 0 0 0
            >;
            tx-num-evt = <0>;
            rx-num-evt = <32>;
        };
    };

    fragment@2 {
        target = <&ocp>;
        __overlay__ {
            ics52000: ics52000 {
                compatible = "invensense,ics52000";
            };

            codec: spdifr {
                compatible = "linux,spdif-dir";
            };
            sound {
                compatible = "simple-audio-card";
                model = "MEMSAAMA";
                simple-audio-card,name = "MEMSAAMA";
                simple-audio-card,format = "i2s";
                simple-audio-card,bitclock-master = <&sound_master>;
                simple-audio-card,frame-master = <&sound_master>;
                sound_master: simple-audio-card,cpu {
                    sound-dai = <&mcasp0>;
                    clocks = <&clk_mcasp0>;
                };
                simple-audio-card,codec {
                    sound-dai = <&none>;
                };
            };
        };
    };    
};


and the compilation of the DTO on the beaglebone outputs these warnings:

debian@beaglebone:~$ sudo dtc -O dtb -o /lib/firmware/ICS-52000-4mics-00A0.dtbo -b 0 -@ ICS-52000-4mics-00A0.dts
[sudo] password for debian:
/lib/firmware/ICS-52000-4mics-00A0.dtbo: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property
/lib/firmware/ICS-52000-4mics-00A0.dtbo: Warning (unit_address_vs_reg): Node /fragment@1 has a unit name, but no reg property
/lib/firmware/ICS-52000-4mics-00A0.dtbo: Warning (unit_address_vs_reg): Node /fragment@2 has a unit name, but no reg property

The system:
debian@beaglebone:~$ uname -a
Linux beaglebone 4.14.71-ti-r80 #1 SMP PREEMPT Fri Oct 5 23:50:11 UTC 2018 armv7l GNU/Linux


I can comment the line for the DTO in /boot/uEnv.txt on the SD-card and the BBG starts just fine.

Do you have a suggestion, what could be wrong? I'm stuck at this point without getting the BBG to boot with the device tree overlay.


Kind regards

Manuel
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux