Skip to content

Commit

Permalink
firmware: arm_dt: Move UART remap call earlier, make it unconditional
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Apr 11, 2016
1 parent e968a4e commit d8c7424
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 0 deletions.
Binary file modified boot/fixup_db.dat
Binary file not shown.
Binary file modified boot/fixup_x.dat
Binary file not shown.
Binary file modified boot/start.elf
Binary file not shown.
Binary file modified boot/start_cd.elf
Binary file not shown.
Binary file modified boot/start_db.elf
Binary file not shown.
Binary file modified boot/start_x.elf
Binary file not shown.

18 comments on commit d8c7424

@clivem
Copy link

@clivem clivem commented on d8c7424 Apr 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still appears to be broken, with either "dtoverlay=hifiberry-dacplus" or "dtoverlay=iqaudio-dacplus". Reverted back to 0a96f63 again.

@pelwell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More information please. What do you see? Does it boot? Unexpected dmesg output? sudo vcdbg log msg? You know the drill.

@clivem
Copy link

@clivem clivem commented on d8c7424 Apr 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It boots OK, but dtoverlay=iqaudio-dacplus is either ignored or the kernel is just not loading the modules.

$ sudo vcdbg log msg
Unable to determine the value of __LOG_START
Unable to read logging_header from 0x00000000

@clivem
Copy link

@clivem clivem commented on d8c7424 Apr 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, gpu_mem=16, which is what I use on all headless players, results in no vcdbg logging....

Here is successful log from working 0a96f63 firmware. I'll reboot with latest firmware again and get a "broken" log.

001140.650: *** Restart logging
001152.739: Read command line from file 'cmdline.txt'
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p3 ro rootfstype=ext4 rootwait nortc consoleblank=0 elevator=bfq
001170.580: Loading 'kernel7.img' from SD card
001420.979: Kernel trailer DTOK property says yes
001421.003: Kernel trailer DDTK property says yes
001421.109: Loading 'bcm2710-rpi-3-b.dtb' from SD card
001497.093: dtparam: uart0_clkrate=48000000
001511.305: dtparam: audio=on
001536.976: Loaded overlay 'i2s-mmap'
001566.352: Loaded overlay 'i2s-prefer-mash2'
001595.568: Loaded overlay 'i2s-prefer-mash3'
001631.262: Loaded overlay 'iqaudio-dacplus'
001631.574: dtparam: watchdog=on
001637.749: dtparam: random=on
001744.130: dtparam: arm_freq=1200000000
001783.489: dtparam: core_freq=250000000
001793.819: dtparam: cache_line_size=64
001819.488: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
003322.761: vchiq_core: vchiq_init_state: slot_zero = 0xfa880000, is_master = 1
003327.229: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead

@clivem
Copy link

@clivem clivem commented on d8c7424 Apr 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firmware a32be14 ....

001152.450: Read command line from file 'cmdline.txt'
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p3 ro rootfstype=ext4 rootwait nortc consoleblank=0 elevator=bfq
001480.551: Loading 'kernel7.img' to 0x8000 size 0x404f7c
001524.182: Kernel trailer DTOK property says yes
001524.198: Kernel trailer DDTK property says yes
001527.919: Loading 'bcm2710-rpi-3-b.dtb' to 0x40cf7c size 0x3b55
001601.137: dtparam: uart0_clkrate=48000000
001615.698: dtparam: audio=on
001675.229: Failed to load overlay 'i2s-mmap'
001729.642: Failed to load overlay 'i2s-prefer-mash2'
001783.868: Failed to load overlay 'i2s-prefer-mash3'
001838.149: Failed to load overlay 'iqaudio-dacplus'
001838.458: dtparam: watchdog=on
001844.499: dtparam: random=on
001922.446: dtparam: arm_freq=1200000000
001961.287: dtparam: core_freq=250000000
001971.314: dtparam: cache_line_size=64
001996.589: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
003499.976: vchiq_core: vchiq_init_state: slot_zero = 0xfac80000, is_master = 1
003504.466: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead

@pelwell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which kernel version are you running, and what do you get from ls -l /boot/overlays/i2s*?

@clivem
Copy link

@clivem clivem commented on d8c7424 Apr 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rpi-4.4.y HEAD from last Friday..... 5fe9c7b

$ ls -l /boot/overlays/i2s*
-rwxr-xr-x 1 root root 263 Apr 9 05:20 /boot/overlays/i2s-mmap.dtbo
-rwxr-xr-x 1 root root 264 Apr 9 05:20 /boot/overlays/i2s-prefer-mash2.dtbo
-rwxr-xr-x 1 root root 264 Apr 9 05:20 /boot/overlays/i2s-prefer-mash3.dtbo

(I'll comment those non-upstream prefer-mash overlays until this is resolved.)

@pelwell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the contents of the overlays can be causing this - the only code path that generates those messages and no others is the one followed when the overlay file cannot by read. Because you have the 4.4 kernel with Dynamic DT enabled it will be looking for i2s-mmap.dtbo (to pick one). Your listing shows that the file exists, but is it possible that the /boot directory as written by rpi-update isn't the root of the VFAT partition on the SD card?

And to give me a few more straws to clutch at, what is in your config.txt? You can skip comments and blank lines.

@clivem
Copy link

@clivem clivem commented on d8c7424 Apr 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, something has changed, post 0a96f63 in start/fixup firmware, IMHO..... Anyway.....

$ fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 7.4 GiB, 7969177600 bytes, 15564800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x35a18b9f

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 1001471 999424 488M c W95 FAT32 (LBA)
/dev/mmcblk0p2 1001472 1587199 585728 286M 82 Linux swap / Solaris
/dev/mmcblk0p3 1587200 14585855 12998656 6.2G 83 Linux

$ blkid /dev/mmcblk0p1
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="_/boot" UUID="3609-198E" TYPE="vfat" PARTUUID="35a18b9f-01"

$ cat /etc/fstab | grep vfat
UUID=3609-198E /boot vfat defaults 0 0

$ cat /boot/config.txt
sdtv_mode=0
sdtv_aspect=1
overscan_left=15
overscan_right=15
overscan_top=15
overscan_bottom=15
hdmi_drive=2
disable_audio_dither=1
max_usb_current=1
dtparam=audio=on
dtoverlay=i2s-mmap
dtoverlay=i2s-prefer-mash2
dtoverlay=i2s-prefer-mash3
dtoverlay=iqaudio-dacplus
dtparam=watchdog=on
dtparam=random=on
enable_uart=1

$ ls -l /boot/overlays/{i2s*,iq*}
-rwxr-xr-x 1 root root 263 Apr 11 20:46 /boot/overlays/i2s-mmap.dtbo
-rwxr-xr-x 1 root root 264 Apr 11 20:46 /boot/overlays/i2s-prefer-mash2.dtbo
-rwxr-xr-x 1 root root 264 Apr 11 20:46 /boot/overlays/i2s-prefer-mash3.dtbo
-rwxr-xr-x 1 root root 775 Apr 11 20:46 /boot/overlays/iqaudio-dac.dtbo
-rwxr-xr-x 1 root root 1015 Apr 11 20:46 /boot/overlays/iqaudio-dacplus.dtbo

I've just updated my kernel builds to 4.4.y HEAD.
$ uname -r
4.4.6-521.20160411git3b10471.fc23.armv7hl.bcm2709

Last working firmware for loading overlays here....
$ vcgencmd version
Apr 6 2016 18:38:39
Copyright (c) 2012 Broadcom
version b7da52ec944a9e1691745036966b3b2a48b19e8b (clean) (release)

@kukabu
Copy link

@kukabu kukabu commented on d8c7424 Apr 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pelwell I also have this issue :(
https://gist.github.com/kukabu/3655a1c07c37ffe3a8abb0e4d77e23ce
and what is "Unknown dtparam 'arm_freq' - ignored"?

@pelwell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kukabu The Pi1 DTB doesn't implement the arm_freq parameter - that is expected.

What can you tell me about your installation? Which version of firmware are you running (see /boot/.firmware_revision)? What is your upgrade sequence? Anything else?

@kukabu
Copy link

@kukabu kukabu commented on d8c7424 Apr 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pelwell last working FW

# vcgencmd version
Apr  6 2016 18:38:39 
Copyright (c) 2012 Broadcom
version b7da52ec944a9e1691745036966b3b2a48b19e8b (clean) (release)

@pelwell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but I guessed that bit.

@clivem
Copy link

@clivem clivem commented on d8c7424 Apr 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pelwell

$ vcgencmd version
Apr 6 2016 18:38:39
Copyright (c) 2012 Broadcom
version b7da52ec944a9e1691745036966b3b2a48b19e8b (clean) (release)
$ sudo vcdbg log msg 2>&1 | grep overlay
001543.925: Loaded overlay 'i2s-mmap'
001586.061: Loaded overlay 'iqaudio-dacplus'

$ vcgencmd version
Apr 8 2016 20:12:23
Copyright (c) 2012 Broadcom
version e3bfc49ea56050dbe545ec3acfa5637b25464d5b (clean) (release)
$ sudo vcdbg log msg 2>&1 | grep overlay
001689.788: Failed to load overlay 'i2s-mmap'
001758.134: Failed to load overlay 'iqaudio-dacplus'

$ vcgencmd version
Apr 11 2016 14:15:10
Copyright (c) 2012 Broadcom
version 8f80a7c11b30b431d58c31c5be931c2d393f9a63 (clean) (release)
$ sudo vcdbg log msg 2>&1 | grep overlay
001675.167: Failed to load overlay 'i2s-mmap'
001727.635: Failed to load overlay 'iqaudio-dacplus'

$ vcgencmd version
Apr 11 2016 16:53:03
Copyright (c) 2012 Broadcom
version 22ef06961dd19553edd9a70e69d7b317652d5c46 (clean) (release)
$ sudo vcdbg log msg 2>&1 | grep overlay
001684.934: Failed to load overlay 'i2s-mmap'
001739.232: Failed to load overlay 'iqaudio-dacplus'

@pelwell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I've found the culprit. I'll take opportunity to improve the error and debug messages surrounding overlay loading to make any future diagnosis easier.

@pelwell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New firmware is pushed.

@kukabu
Copy link

@kukabu kukabu commented on d8c7424 Apr 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apr 12 2016 12:02:21 
Copyright (c) 2012 Broadcom
version 13a4a93c822461206ca64d3d777db36f04fd9194 (clean) (release)

Works for me. Thanks.

@clivem
Copy link

@clivem clivem commented on d8c7424 Apr 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pelwell OK, for me as well.

$ vcgencmd version
Apr 12 2016 12:02:21
Copyright (c) 2012 Broadcom
version 13a4a93c822461206ca64d3d777db36f04fd9194 (clean) (release)
$ sudo vcdbg log msg 2>&1 | grep overlay
001651.229: Loaded overlay 'i2s-mmap'
001687.742: Loaded overlay 'iqaudio-dacplus'

Please sign in to comment.