完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,第一件事:
我已经搜索过了,但我没有找到任何有用的东西,所以如果这个问题已经解决,我想道歉,在这种情况下,如果你们能指出我正确的帖子,我很乐意关闭这个帖子并标记它解决了。 我们公司正在开发基于 imx8mm SOC 的开发板(目前我们正在开发 Kontron 开发板)。 我们的目标之一是拥有一个至少有 4 个输入和 4 个输出(32 位样本)的 ALSA 音频设备,所以我正在尝试创建一个设备树并生成所有必要的内核补丁。 与此同时,我们正在使用 Kontron 开发板和 Yocto BSP 来创建操作系统,现在我被正确编译的设备树困住了,但我看不到我的 ALSA 简单声卡。 我们计划使用的 SAI 设备是 SAI3,将 imx8mm 设置为主时钟(我不知道是否是这种情况——我对此表示怀疑——但我们的开发板没有暴露我们制作 TDM 音频所需的 SAI 引脚,所以我可以执行的唯一测试是在 ALSA 下查看 TDM 设备并尝试使用它)。 我们正在尝试使用内核 V5.10,这是自定义设备树文件 /* * imx8mm custom board device tree file */ /dts-v1/; #include "imx8mm-kontron-n801x-som.dtsi" #include / { model = "Custom Kontron i.MX8MM board"; compatible = "kontron,imx8mm-n801x-s", "kontron,imx8mm-n801x-som", "kontron,kontron-mx8mm", "fsl,imx8mm"; aliases { ethernet1 = &usbnet; }; /* fixed crystal dedicated to mcp2515 */ osc_can: clock-osc-can { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <16000000>; clock-output-names = "osc-can"; }; leds { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_led>; led1 { label = "led1"; gpios = <&gpio4 17 GPIO_ACTIVE_LOW>; linux,default-trigger = "heartbeat"; }; led2 { label = "led2"; gpios = <&gpio4 19 GPIO_ACTIVE_LOW>; }; led3 { label = "led3"; gpios = <&gpio4 18 GPIO_ACTIVE_LOW>; }; led4 { label = "led4"; gpios = <&gpio4 8 GPIO_ACTIVE_LOW>; }; led5 { label = "led5"; gpios = <&gpio4 9 GPIO_ACTIVE_LOW>; }; led6 { label = "led6"; gpios = <&gpio4 7 GPIO_ACTIVE_LOW>; }; }; reg_rst_eth2: regulator-rst-eth2 { compatible = "regulator-fixed"; regulator-name = "rst-usb-eth2"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb_eth2>; gpio = <&gpio3 2 GPIO_ACTIVE_HIGH>; enable-active-high; regulator-always-on; }; reg_vdd_5v: regulator-5v { compatible = "regulator-fixed"; regulator-name = "vdd-5v"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-always-on; }; codec_dummy: codec_dummy { compatible = "linux,snd-soc-dummy"; #sound-dai-cells = <0>; status = "okay"; }; sound-sai3sound { compatible = "simple-audio-card"; simple-audio-card,name = "I2S Audio"; simple-audio-card,format = "i2s"; simple-audio-card,bitclock-master = <&snd_cpu>; simple-audio-card,frame-master = <&snd_cpu>; status = "okay"; snd_cpu: simple-audio-card,cpu { sound-dai = <&sai3 0>; dai-tdm-slot-num = <8>; dai-tdm-slot-width = <32>; }; snd_codec: simple-audio-card,codec { sound-dai = <&codec_dummy>; }; }; }; &fec1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-connection-type = "rgmii-rxid"; phy-handle = <ðphy>; status = "okay"; mdio { #address-cells = <1>; #size-cells = <0>; ethphy: ethernet-phy@0 { compatible = "ethernet-phy-id0007.0570"; reg = <0>; reset-assert-us = <100>; reset-deassert-us = <100>; reset-gpios = <&gpio4 27 GPIO_ACTIVE_LOW>; vsc8531,led-0-mode = vsc8531,led-1-mode = vsc8531,led-0-combine-disable; }; }; }; &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; uart-has-rtscts; status = "okay"; }; // &uart2 { // pinctrl-names = "default"; // pinctrl-0 = <&pinctrl_uart2>; // linux,rs485-enabled-at-boot-time; // uart-has-rtscts; // status = "okay"; // }; &usbotg1 { dr_mode = "otg"; over-current-active-low; status = "okay"; }; &usbotg2 { dr_mode = "host"; disable-over-current; #address-cells = <1>; #size-cells = <0>; status = "okay"; usb1@1 { compatible = "usb424,9514"; reg = <1>; #address-cells = <1>; #size-cells = <0>; usbnet: usbether@1 { compatible = "usb424,ec00"; reg = <1>; local-mac-address = [ 00 00 00 00 00 00 ]; }; }; }; &usdhc2 { pinctrl-names = "default", "state_100mhz", "state_200mhz"; pinctrl-0 = <&pinctrl_usdhc2>; pinctrl-1 = <&pinctrl_usdhc2_100mhz>; pinctrl-2 = <&pinctrl_usdhc2_200mhz>; vmmc-supply = <®_vdd_3v3>; vqmmc-supply = <®_nvcc_sd>; cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; status = "okay"; }; &iomuxc { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio>; pinctrl_adv7535: adv7535grp { fsl,pins = < MX8MM_IOMUXC_SAI1_TXD4_GPIO4_IO16 0x19 >; }; pinctrl_can: cangrp { fsl,pins = < MX8MM_IOMUXC_SAI3_RXFS_GPIO4_IO28 0x19 >; }; pinctrl_dsi_sel: dsiselgrp { fsl,pins = < MX8MM_IOMUXC_SAI1_TXD2_GPIO4_IO14 0x19 >; }; pinctrl_dsi_oe: dsioegrp { fsl,pins = < MX8MM_IOMUXC_SAI1_TXD3_GPIO4_IO15 0x19 >; }; pinctrl_ecspi2: ecspi2grp { fsl,pins = < MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x82 MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x82 MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x82 MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x19 >; }; pinctrl_ecspi3: ecspi3grp { fsl,pins = < MX8MM_IOMUXC_UART2_RXD_ECSPI3_MISO 0x82 MX8MM_IOMUXC_UART1_TXD_ECSPI3_MOSI 0x82 MX8MM_IOMUXC_UART1_RXD_ECSPI3_SCLK 0x82 MX8MM_IOMUXC_UART2_TXD_GPIO5_IO25 0x19 >; }; pinctrl_enet: enetgrp { fsl,pins = < MX8MM_IOMUXC_ENET_MDC_ENET1_MDC 0x3 MX8MM_IOMUXC_ENET_MDIO_ENET1_MDIO 0x3 MX8MM_IOMUXC_ENET_TD3_ENET1_RGMII_TD3 0x1f MX8MM_IOMUXC_ENET_TD2_ENET1_RGMII_TD2 0x1f MX8MM_IOMUXC_ENET_TD1_ENET1_RGMII_TD1 0x1f MX8MM_IOMUXC_ENET_TD0_ENET1_RGMII_TD0 0x1f MX8MM_IOMUXC_ENET_RD3_ENET1_RGMII_RD3 0x91 MX8MM_IOMUXC_ENET_RD2_ENET1_RGMII_RD2 0x91 MX8MM_IOMUXC_ENET_RD1_ENET1_RGMII_RD1 0x91 MX8MM_IOMUXC_ENET_RD0_ENET1_RGMII_RD0 0x91 MX8MM_IOMUXC_ENET_TXC_ENET1_RGMII_TXC 0x1f MX8MM_IOMUXC_ENET_RXC_ENET1_RGMII_RXC 0x91 MX8MM_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x91 MX8MM_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x1f MX8MM_IOMUXC_SAI2_MCLK_GPIO4_IO27 0x19 /* PHY RST */ MX8MM_IOMUXC_SAI2_TXC_GPIO4_IO25 0x19 /* ETH IRQ */ >; }; pinctrl_gpio_led: gpioledgrp { fsl,pins = < MX8MM_IOMUXC_NAND_READY_B_GPIO3_IO16 0x19 MX8MM_IOMUXC_SAI1_RXD5_GPIO4_IO7 0x19 MX8MM_IOMUXC_SAI1_RXD6_GPIO4_IO8 0x19 MX8MM_IOMUXC_SAI1_RXD7_GPIO4_IO9 0x19 MX8MM_IOMUXC_SAI1_TXD5_GPIO4_IO17 0x19 MX8MM_IOMUXC_SAI1_TXD6_GPIO4_IO18 0x19 MX8MM_IOMUXC_SAI1_TXD7_GPIO4_IO19 0x19 >; }; pinctrl_gpio: gpiogrp { fsl,pins = < MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x19 MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x19 MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x19 MX8MM_IOMUXC_GPIO1_IO11_GPIO1_IO11 0x19 MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x19 MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8 0x19 MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10 0x19 MX8MM_IOMUXC_SAI3_MCLK_GPIO5_IO2 0x19 >; }; pinctrl_i2c3: i2c3grp { fsl,pins = < MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c3 MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3 >; }; pinctrl_i2c4: i2c4grp { fsl,pins = < MX8MM_IOMUXC_I2C4_SCL_I2C4_SCL 0x400001c3 MX8MM_IOMUXC_I2C4_SDA_I2C4_SDA 0x400001c3 >; }; pinctrl_pwm2: pwm2grp { fsl,pins = < MX8MM_IOMUXC_SPDIF_RX_PWM2_OUT 0x19 >; }; pinctrl_sn65dsi84: sn65dsi84grp { fsl,pins = < MX8MM_IOMUXC_SAI2_TXD0_GPIO4_IO26 0x19 MX8MM_IOMUXC_SD2_WP_GPIO2_IO20 0x19 >; }; pinctrl_uart1: uart1grp { fsl,pins = < MX8MM_IOMUXC_SAI2_RXC_UART1_DCE_RX 0x140 MX8MM_IOMUXC_SAI2_RXFS_UART1_DCE_TX 0x140 MX8MM_IOMUXC_SAI2_RXD0_UART1_DCE_RTS_B 0x140 MX8MM_IOMUXC_SAI2_TXFS_UART1_DCE_CTS_B 0x140 >; }; // pinctrl_uart2: uart2grp { // fsl,pins = < // MX8MM_IOMUXC_SAI3_TXFS_UART2_DCE_RX 0x140 // MX8MM_IOMUXC_SAI3_TXC_UART2_DCE_TX 0x140 // MX8MM_IOMUXC_SAI3_RXD_UART2_DCE_RTS_B 0x140 // MX8MM_IOMUXC_SAI3_RXC_UART2_DCE_CTS_B 0x140 // >; // }; pinctrl_usb_eth2: usbeth2grp { fsl,pins = < MX8MM_IOMUXC_NAND_CE1_B_GPIO3_IO2 0x19 >; }; pinctrl_usdhc2: usdhc2grp { fsl,pins = < MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d0 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d0 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0 MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019 >; }; pinctrl_usdhc2_100mhz: usdhc2grp100mhz { fsl,pins = < MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4 MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019 >; }; pinctrl_usdhc2_200mhz: usdhc2grp200mhz { fsl,pins = < MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6 MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019 >; }; pinctrl_sai3: sai3grp { fsl,pins = < MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6 MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6 MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6 MX8MM_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6 >; }; }; &sai3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai3>; assigned-clocks = <&clk IMX8MM_CLK_SAI3>; assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>; assigned-clock-rates = <24576000>; fsl,sai-mclk-direction-output; status = "okay"; }; 该设备树文件是在 BSP 和其他有用资源上查阅此论坛/示例后的结果 我还修改了内核配置(使用 bitbake 和 menuconfig),创建了一个片段并附加到 yocto 内核配方 CONFIG_SND_DMAENGINE_PCM=y CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y CONFIG_SND_SOC_FSL_ESAI=y CONFIG_SND_SOC=y CONFIG_SND=y ########################### # CONFIG_SND_VERBOSE_PRINTK=y # CONFIG_SND_PCI is not set # CONFIG_SND_SPI is not set # CONFIG_SND_USB is not set CONFIG_SND_SOC_FSL_AUDMIX=y # # SoC Audio support for Freescale i.MX boards: # CONFIG_NETWORK_FILESYSTEMS is not set ### CONFIG_SND_DEBUG=y CONFIG_SND_DEBUG_VERBOSE=y # CONFIG_SND_PCM_XRUN_DEBUG is not set # CONFIG_SND_CTL_VALIDATION is not set CONFIG_SND_SOC_FSL_Asrc=y CONFIG_SND_SOC_FSL_SAI=y # CONFIG_SND_SOC_FSL_MQS is not set CONFIG_SND_SOC_FSL_SSI=y CONFIG_SND_SOC_FSL_EAsrc=y CONFIG_SND_SOC_IMX_PCM_DMA=y CONFIG_SND_SOC_IMX_AUDMUX=y CONFIG_SND_IMX_SOC=y # SoC Audio support for Freescale i.MX boards: # # CONFIG_SND_SOC_IMX_ES8328 is not set # CONFIG_SND_SOC_IMX_SGTL5000 is not set # CONFIG_SND_SOC_IMX_SPDIF is not set CONFIG_SND_SOC_FSL_ASOC_CARD=y # CONFIG_SND_SOC_IMX_AUDMIX is not set CONFIG_SND_SIMPLE_CARD_UTILS=y CONFIG_SND_SIMPLE_CARD=y CONFIG_SND_AUDIO_GRAPH_CARD=y 我知道的事情: - 设备树由 yocto 正确编译并由 linux 内核使用,事实上这是唯一的板载设备树加上如果我在 /proc 下捕获设备树模型这就是结果 root@70820e12a37e:~# cat /proc/device-tree/model Custom Kontron i.MX8MM board - 在 /proc/device-tree 下我可以看到我的设备 root@70820e12a37e:/proc/device-tree# ls -alh total 0 -r--r--r-- 1 root root 4 Jan 4 15:36 #address-cells -r--r--r-- 1 root root 4 Jan 4 15:36 #size-cells drwxr-xr-x 27 root root 0 Jan 1 1970 . drwxr-xr-x 3 root root 0 Jan 1 1970 .. drwxr-xr-x 2 root root 0 Jan 4 15:36 aliases drwxr-xr-x 2 root root 0 Jan 4 15:36 chosen drwxr-xr-x 2 root root 0 Jan 4 15:36 clock-ext1 drwxr-xr-x 2 root root 0 Jan 4 15:36 clock-ext2 drwxr-xr-x 2 root root 0 Jan 4 15:36 clock-ext3 drwxr-xr-x 2 root root 0 Jan 4 15:36 clock-ext4 drwxr-xr-x 2 root root 0 Jan 4 15:36 clock-osc-24m drwxr-xr-x 2 root root 0 Jan 4 15:36 clock-osc-32k drwxr-xr-x 2 root root 0 Jan 4 15:36 clock-osc-can drwxr-xr-x 2 root root 0 Jan 4 15:36 codec_dummy -r--r--r-- 1 root root 81 Jan 4 15:36 compatible drwxr-xr-x 8 root root 0 Jan 4 15:36 cpus -r--r--r-- 1 root root 4 Jan 4 15:36 interrupt-parent drwxr-xr-x 8 root root 0 Jan 4 15:36 leds drwxr-xr-x 2 root root 0 Jan 4 15:36 memory@40000000 drwxr-xr-x 2 root root 0 Jan 4 15:36 mipi-video-phy -r--r--r-- 1 root root 37 Jan 4 15:34 model -r--r--r-- 1 root root 1 Jan 4 15:36 name drwxr-xr-x 5 root root 0 Jan 4 15:36 opp-table drwxr-xr-x 2 root root 0 Jan 4 15:36 pmu drwxr-xr-x 2 root root 0 Jan 4 15:36 psci drwxr-xr-x 2 root root 0 Jan 4 15:36 regulator-5v drwxr-xr-x 2 root root 0 Jan 4 15:36 regulator-rst-eth2 drwxr-xr-x 14 root root 0 Jan 4 15:36 soc@0 drwxr-xr-x 4 root root 0 Jan 4 15:36 sound-sai3sound drwxr-xr-x 3 root root 0 Jan 4 15:36 thermal-zones drwxr-xr-x 2 root root 0 Jan 4 15:36 timer drwxr-xr-x 2 root root 0 Jan 4 15:36 usbphynop1 drwxr-xr-x 2 root root 0 Jan 4 15:36 usbphynop2 ALSA 设备仍然丢失 root@70820e12a37e:/proc/device-tree# aplay -l aplay: device_list:272: no soundcards found... 此外,内核日志不显示错误,我尝试启用 ALSA 日志调试级别,但在启动期间没有显示任何内容(没有错误,没有声卡,没有警告......只有“找不到声卡......”) . 我真的很难做到这一点,至少在经过大量的试验/错误之后我已经正确地编译了设备树所以我开始思考......我错过了什么吗?是否还有其他一些我需要做的事情,我需要在内核中启用其他一些选项,或者 alsa 设置...感谢每个提示 |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
1932个成员聚集在这个小组
加入小组我的项目我做主,使用GN+Ninja来完成构建系统(VSCode开发RT106X)
36421 浏览 0 评论
NXP IMX8应用处理器快速入门必备:技巧、使用、设计指南
4867 浏览 1 评论
6108 浏览 1 评论
6818 浏览 0 评论
NXP i.MX6UL开发板(linux系统烧录+规格+硬件+模块移植)使用手册
4249 浏览 0 评论
647浏览 2评论
求助,S32G上Core M启动后如何让Core A在Flash指定位置加载uboot?
644浏览 2评论
ESP32-WROVER-IE + LAN8720以太网,GPIO0电压只有1.6v,无法正常进入spi flash boot模式如何解决?
645浏览 2评论
求分享适用于PN7160 Android的NFC工厂测试应用程序
729浏览 2评论
844浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-24 01:34 , Processed in 1.151144 second(s), Total 76, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号