sgtl5000 not found on mx6q

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

sgtl5000 not found on mx6q

Jump to solution
2,478 Views
xiaoqiangyang
Contributor III

Hi all,

Now I am working on new designed i.MX6Q board.The BSP is L3.0.35_4.1.0_130816.

We added codec SGTL5000 and the code is ported from sabrelite.But the chip can

not be probed by kernel.MCLK is indeed 24Mhz,and VDDA-3.3V,VDDIO-3.3V,VDDA-1.8V.

Kernel config:

CONFIG_SND_SOC_IMX_SGTL5000=y

CONFIG_SND_SOC_SGTL5000=y

During boot up my oscilloscope can not get the i2c(i2c1 bus) signal.Under linux,

I use i2cdetect tool,only the PFUZE100(08) can be found,like this:

root@linaro-ubuntu-desktop:~# ./i2cdetect -y 0

0 1 2 3 4 5 6 7 8 9 a b c d e f

00: -- -- -- -- -- 08 -- UU -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

70: -- -- -- -- -- -- -- --

But if I deleted the code for i2c information :

static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {

{

I2C_BOARD_INFO("sgtl5000", 0x0a),

},

}

After entering linux,i2cdetect tool can find it-->

0 1 2 3 4 5 6 7 8 9 a b c d e f

00: -- -- -- -- -- 08 -- 0a -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

70: -- -- -- -- -- -- -- --

So strange, why it can be probed if I don't register it?

Any advice will be appreciated.

Best Regards

Xiaoqiang

1 Solution
1,592 Views
sinanakman
Senior Contributor III

Hi Xiaoqiang

I see the following error message in the boot log :

imx-hdmi-soc-dai imx-hdmi-soc-dai.0: Failed: Load HDMI-video first.

It seems as if you enabled hdmi but not sgtl5000 as your sound card.

I suggest, you take a look at your kernel config and make sure

sgtl5000 is enabled and hdmi is disabled under the list of sound

cards. Likewise, add some debug printks in the probe function

of the driver and see if it is called at all.

Hope this helps

Regards

Sinan Akman

View solution in original post

5 Replies
1,592 Views
sinanakman
Senior Contributor III

Hi Xiaoqiang

I think your codec chip is properly registered and

I believe this is why you are seeing UU under

0xa0.

You mentioned that the chip can not be probed

by the kernel. How do you see this ? What are

the related kernel messages ?

In any case, the best way to debug your chip

is to check the mclk, frame clock and data

using an oscilloscope.

Include here the kernel messages if you see

any error during the probe. Likewise, you might

want to add more debug printk's to see what

is failing.

Hope this helps

Regards

Sinan Akman

0 Kudos
Reply
1,592 Views
xiaoqiangyang
Contributor III

Hi Sinan,

Thanks for your reply.Because I can't see any message of sgtl5000 during boot up,

and I use aplay -l command it shows :

aplay: device_list:240: no soundcards found...

cat /proc/asound/card:

--- no soundcards ---

this is my boot log --->

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Linux version 3.0.35-2666-gbdde708 (root@Ubuntu) (gcc version 4.6.2 20110630 (pr

erelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) ) #283

SMP PREEMPT Fri Jan 30 11:39:11 CST 2015

CPU: ARMv7 Processor revision 10 (ARMv7), cr=10c53c7d

CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache

Machine: Freescale i.MX 6Quad/DualLite/Solo Sabre-SD Board

Ignoring unrecognised tag 0x54410008

Memory policy: ECC disabled, Data cache writealloc

CPU identified as i.MX6Q, silicon rev 1.2

PERCPU: Embedded 7 pages/cpu @8c80e000 s5440 r8192 d15040 u32768

Built 1 zonelists in Zone order, mobility grouping on. Total pages: 454656

Kernel command line: console=ttymxc0,115200 ip=dhcp root=/dev/mmcblk0p1 rootwait

rw video=mxcfb0:dev=LDB,LDB-XGA,if=RGB24

PID hash table entries: 4096 (order: 2, 16384 bytes)

Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)

Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)

Memory: 512MB 1280MB = 1792MB total

Memory: 1805356k/1805356k available, 291796k reserved, 360448K highmem

Virtual kernel memory layout:

vector : 0xffff0000 - 0xffff1000 ( 4 kB)

fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)

DMA : 0xf4600000 - 0xffe00000 ( 184 MB)

vmalloc : 0xea800000 - 0xf2000000 ( 120 MB)

lowmem : 0x80000000 - 0xea000000 (1696 MB)

pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)

modules : 0x7f000000 - 0x7fe00000 ( 14 MB)

.init : 0x80008000 - 0x8003b000 ( 204 kB)

.text : 0x8003b000 - 0x80a8e894 (10575 kB)

.data : 0x80a90000 - 0x80af3320 ( 397 kB)

.bss : 0x80af3344 - 0x80b4128c ( 312 kB)

SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1

Preemptible hierarchical RCU implementation.

NR_IRQS:624

MXC GPIO hardware

sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms

arm_max_freq=800MHz

MXC_Early serial console at MMIO 0x2020000 (options '115200')

bootconsole enabled

Console: colour dummy device 80x30

Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available

CPU1: Booted secondary processor

CPU2: Booted secondary processor

CPU3: Booted secondary processor

Brought up 4 CPUs

SMP: Total of 4 processors activated (6324.22 BogoMIPS).

print_constraints: dummy:

NET: Registered protocol family 16

print_constraints: vddpu: 725 at 0

mxs-dma mxs-dma-apbh: initialized

print_constraints: VDDA: 3300 mV

print_constraints: VDDIO: 3300 mV

print_constraints: VDDD: 1800 mV

print_constraints: vmmc: 3300 mV

SCSI subsystem initialized

spi_imx imx6q-ecspi.0: probed

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

Freescale USB OTG Driver loaded, $Revision: 1.55 $

imx-ipuv3 imx-ipuv3.0: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)

MIPI CSI2 driver module loaded

Advanced Linux Sound Architecture Driver Version 1.0.24.

Bluetooth: Core ver 2.16

NET: Registered protocol family 31

Bluetooth: HCI device and connection manager initialized

Bluetooth: HCI socket layer initialized

Bluetooth: L2CAP socket layer initialized

Bluetooth: SCO socket layer initialized

cfg80211: Calling CRDA to update world regulatory domain

i2c-core: driver using legacy suspend method

i2c-core: driver using legacy resume method

Switching to clocksource mxc_timer1

NET: Registered protocol family 2

IP route cache hash table entries: 65536 (order: 6, 262144 bytes)

TCP established hash table entries: 262144 (order: 9, 2097152 bytes)

TCP bind hash table entries: 65536 (order: 7, 786432 bytes)

TCP: Hash tables configured (established 262144 bind 65536)

TCP reno registered

UDP hash table entries: 1024 (order: 3, 32768 bytes)

UDP-Lite hash table entries: 1024 (order: 3, 32768 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.

PMU: registered new PMU device of type 0

Static Power Management for Freescale i.MX6

wait mode is enabled for i.MX6

cpaddr = ea880000 suspend_iram_base=ea858000

PM driver module loaded

IMX usb wakeup probe

add wake up source irq 75

IMX usb wakeup probe

cpu regulator mode:ldo_enable

i.MXC CPU frequency driver

highmem bounce pool size: 64 pages

JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.

msgmni has been set to 2822

alg: No test for stdrng (krng)

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

MIPI DSI driver module loaded

mxc_sdc_fb mxc_sdc_fb.0: register mxc display driver LDB

mxc_sdc_fb mxc_sdc_fb.0: NO mxc display driver found!

mxc_sdc_fb mxc_sdc_fb.1: register mxc display driver ldb

regulatorget: get() with no identifier

Console: switching to colour frame buffer device 128x48

imx-sdma imx-sdma: loaded firmware 1.1

imx-sdma imx-sdma: initialized

Serial: IMX driver

imx-uart.2: ttymxc2 at MMIO 0x21ec000 (irq = 60) is a IMX

imx-uart.0: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX

console enabled, bootconsole disabled

console enabled, bootconsole disabled

loop: module loaded

No sata disk.

m25p80 spi0.0: found m25p32, expected sst25vf016b

m25p80 spi0.0: m25p32 (4096 Kbytes)

Creating 2 MTD partitions on "m25p80":

0x000000000000-0x000000100000 : "bootloader"

0x000000100000-0x000000400000 : "kernel"

GPMI NAND driver registered. (IMX)

vcan: Virtual CAN interface driver

CAN device driver interface

flexcan netdevice driver

flexcan imx6q-flexcan.0: device registered (reg_base=ea9a0000, irq=142)

FEC Ethernet Driver

fec_enet_mii_bus: probed

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1

fsl-ehci fsl-ehci.0: irq 75, io base 0x02184000

fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

add wake up source irq 72

fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2

fsl-ehci fsl-ehci.1: irq 72, io base 0x02184200

fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 1 port detected

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

ARC USBOTG Device Controller driver (1 August 2005)

mousedev: PS/2 mouse device common for all mice

i2c-core: driver using legacy suspend method

i2c-core: driver using legacy resume method

snvs_rtc snvs_rtc.0: rtc core: registered snvs_rtc as rtc0

i2c /dev entries driver

Linux video capture interface: v2.00

mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video16

mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video17

i2c-core: driver using legacy suspend method

i2c-core: driver using legacy resume method

imx2-wdt imx2-wdt.0: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=1)

Bluetooth: Virtual HCI driver ver 1.3

Bluetooth: HCI UART driver ver 2.2

Bluetooth: HCIATH3K protocol initialized

Bluetooth: Generic Bluetooth USB driver ver 0.6

usbcore: registered new interface driver btusb

sdhci: Secure Digital Host Controller Interface driver

sdhci: Copyright(c) Pierre Ossman

sdhci sdhci-esdhc-imx.2: no card-detect pin available!

mmc0: SDHCI controller on platform using DMA

mxc_vdoa mxc_vdoa: i.MX Video Data Order Adapter(VDOA) driver probed

VPU initialized

mxc_asrc registered

Galcore version 4.6.9.6622

Thermal calibration data is 0x5624df69

Thermal sensor with ratio = 177

Anatop Thermal registered as thermal_zone0

anatop_thermal_probe: default cooling device is cpufreq!

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

usbcore: registered new interface driver snd-usb-audio

mxc_hdmi_soc mxc_hdmi_soc.0: MXC HDMI Audio

Cirrus Logic CS42888 ALSA SoC Codec Driver

i2c-core: driver using legacy suspend method

i2c-core: driver using legacy resume method

imx-hdmi-soc-dai imx-hdmi-soc-dai.0: Failed: Load HDMI-video first.

imx_3stack asoc driver

Initialize HDMI-audio failed. Load HDMI-video first!

ALSA device list:

No soundcards found.

NET: Registered protocol family 26

TCP cubic registered

NET: Registered protocol family 17

can: controller area network core (rev 20090105 abi 8)

NET: Registered protocol family 29

can: raw protocol (rev 20090105)

can: broadcast manager protocol (rev 20090105 t)

Bluetooth: RFCOMM TTY layer initialized

Bluetooth: RFCOMM socket layer initialized

Bluetooth: RFCOMM ver 1.11

Bluetooth: BNEP (Ethernet Emulation) ver 1.3

Bluetooth: BNEP filters: protocol multicast

Bluetooth: HIDP (Human Interface Emulation) ver 1.2

lib80211: common routines for IEEE802.11 drivers

VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4

Bus freq driver module loaded

Bus freq driver Enabled

mxc_dvfs_core_probe

usb 2-1: new high speed USB device number 2 using fsl-ehci

DVFS driver module loaded

regulator_init_complete: VDDD: incomplete constraints, leaving on

regulator_init_complete: VDDIO: incomplete constraints, leaving on

regulator_init_complete: VDDA: incomplete constraints, leaving on

snvs_rtc snvs_rtc.0: setting system clock to 1970-01-01 00:00:00 UTC (0)

eth0: Freescale FEC PHY driver (mii_bus:phy_addr=1:00, irq=-1)

hub 2-1:1.0: USB hub found

hub 2-1:1.0: 4 ports detected

mmc0: new high speed DDR MMC card at address 0001

mmcblk0: mmc0:0001 MMC08G 7.26 GiB

mmcblk0boot0: mmc0:0001 MMC08G partition 1 16.0 MiB

mmcblk0boot1: mmc0:0001 MMC08G partition 2 16.0 MiB

mmcblk0: p1

mmcblk0boot1: unknown partition table

mmcblk0boot0: unknown partition table

PHY: 1:00 - Link is Up - 100/Full

Sending DHCP requests ., OK

IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.2.113

IP-Config: Complete:

device=eth0, addr=192.168.2.113, mask=255.255.255.0, gw=192.168.2.1,

host=192.168.2.113, domain=, nis-domain=(none),

bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=

EXT3-fs: barriers not enabled

kjournald starting. Commit interval 5 seconds

EXT3-fs (mmcblk0p1): warning: maximal mount count reached, running e2fsck is rec

ommended

EXT3-fs (mmcblk0p1): using internal journal

EXT3-fs (mmcblk0p1): recovery complete

EXT3-fs (mmcblk0p1): mounted filesystem with writeback data mode

VFS: Mounted root (ext3 filesystem) on device 179:1.

Freeing init memory: 204K

Last login:

Welcome to Linaro 11.10 (development branch) (GNU/Linux 3.0.35-2666-gbdde708 a

rmv7l)

root@linaro-ubuntu-desktop:~# cat /sys/bus/i2c/devices/0-000a/name

sgtl5000

May be sgtl5000 has been registered but it can be recognized as a sound card.

I can't access sgtl5000 by i2ctool--->

root@linaro-ubuntu-desktop:~# ./i2cget -y imx-i2c 0x0a 0

Error: Could not set address to 0x0a: Device or resource busy

but PFUZE100 is OK--->

root@linaro-ubuntu-desktop:~# ./i2cget -y imx-i2c 0x08 0

0x10

0x10 is device ID of PFUZE100 .

Any advice?

Best Regards

Xiaoqiang

From: Sinan Akman

Date: 2015-01-30 11:32

To: Xiaoqiang Yang

Subject: Re: - sgtl5000 not found on mx6q

sgtl5000 not found on mx6q

reply from Sinan Akman in i.MX Community - View the full discussion

Hi Xiaoqiang

I think your codec chip is properly registered and

I believe this is why you are seeing UU under

0xa0.

You mentioned that the chip can not be probed

by the kernel. How do you see this ? What are

the related kernel messages ?

In any case, the best way to debug your chip

is to check the mclk, frame clock and data

using an oscilloscope.

Include here the kernel messages if you see

any error during the probe. Likewise, you might

want to add more debug printk's to see what

is failing.

Hope this helps

Regards

Sinan Akman

Did your question get answered?

If so, say thanks by clicking Correct Answer in the community thread!

Reply to this message by replying to this email, or go to the message on Freescale Community

Start a new discussion in i.MX Community by email or at Freescale Community

Following sgtl5000 not found on mx6q in these streams: Inbox

0 Kudos
Reply
1,593 Views
sinanakman
Senior Contributor III

Hi Xiaoqiang

I see the following error message in the boot log :

imx-hdmi-soc-dai imx-hdmi-soc-dai.0: Failed: Load HDMI-video first.

It seems as if you enabled hdmi but not sgtl5000 as your sound card.

I suggest, you take a look at your kernel config and make sure

sgtl5000 is enabled and hdmi is disabled under the list of sound

cards. Likewise, add some debug printks in the probe function

of the driver and see if it is called at all.

Hope this helps

Regards

Sinan Akman

1,592 Views
xiaoqiangyang
Contributor III

Hi Sinan,

My problem has been solved. It is in imx-sgtl5000.c...>

if (machine_is_mx35_3ds() || machine_is_mx6q_sabrelite())

        imx_sgtl5000_dai[0].codec_name = "sgtl5000.0-000a";

else

        imx_sgtl5000_dai[0].codec_name = "sgtl5000.1-000a";

Becsuce my machine is mx6q_sabresd, so sgtl5000 is on bus 1 defaut, my sgtl5000 is on bus 0 ,so I changed it to sgtl5000.1-000a and now it works well.

Thanks a lot!

1,592 Views
gusarambula
NXP TechSupport
NXP TechSupport

Thanks for confirming the solution to this problem! I'm sure it will help other community users!

0 Kudos
Reply