Is BLSP12(blsp2_uart5) tested for UART transfers?

I have used uart@075b4000, with all mentioned configurations,

  1. reg = <0x075b4000 0x1000>;
  2. clock_gcc_blsp2_uart6_apps_clk and blsp2_ahb_clk

still I fail to boot the board with this log:

Thanks in advance for any help …

In the driver tty/serial/msm_serial.c I have added new port :
msm_uart_ports[] are on : line0,line1,line2,line3

And in dts aliases defined :
serial0,serial1,serial2,serial3

But the Board goes to ramdump mode as :

[ 0.653603] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.657897] SuperH (H)SCI(F) driver initialized
[ 0.659170] msm_serial 7570000.serial: msm_serial: detected port #2
[ 0.659256] msm_serial 7570000.serial: uartclk = 19200000
[ 0.659355] 7570000.serial: ttyMSM2 at MMIO 0x7570000 (irq = 9, base_baud = 1200000) is a MSM
[ 0.659691] serial serial0: tty port ttyMSM2 registered
[ 0.660096] msm_serial 75b0000.serial: msm_serial: detected port #0
[ 0.660193] msm_serial 75b0000.serial: uartclk = 7372800
[ 0.660289] 75b0000.serial: ttyMSM0 at MMIO 0x75b0000 (irq = 12, base_baud = 460800) is a MSM
[ 0.660348] msm_serial: console setup on port #0
[ 2.142649] console [ttyMSM0] enabled
[ 2.148742] msm_serial 75b4000.uart: msm_serial: detected port #3
[ 2.150996] msm_serial 75b4000.uart: uartclk = 19200000
[ 2.157066] 75b4000.uart: ttyMSM3 at MMIO 0x75b4000 (irq = 63, base_baud = 1200000) is a MSM

Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.XF.1.0-00301
S - IMAGE_VARIANT_STRING=M8996LAB
S - OEM_IMAGE_VERSION_STRING=crm-ubuntu68
S - Boot Interface: UFS
S - Secure Boot: Off
S - Boot Config @ 0x00076044 = 0x000001c9
S - JTAG ID @ 0x000760f4 = 0x100640e1
S - OEM ID @ 0x000760f8 = 0x00000000
S - Serial Number @ 0x00074138 = 0x9e999481
S - OEM Config Row 0 @ 0x00074188 = 0x0000000000000000
S - OEM Config Row 1 @ 0x00074190 = 0x0000000000000000
S - Feature Config Row 0 @ 0x000741a0 = 0x0050000010000100
S - Feature Config Row 1 @ 0x000741a8 = 0x00fff00001ffffff
S - Core 0 Frequency, 1228 MHz
B - 0 - PBL, Start
B - 10411 - bootable_media_detect_entry, Start
B - 49772 - bootable_media_detect_success, Start
B - 49772 - elf_loader_entry, Start
B - 50797 - auth_hash_seg_entry, Start
B - 50899 - auth_hash_seg_exit, Start
B - 82815 - elf_segs_hash_verify_entry, Start
B - 85314 - PBL, End
B - 87352 - SBL1, Start
B - 183366 - usb: hs_phy_nondrive_start
B - 183701 - usb: PLL lock success - 0x3
B - 186690 - usb: hs_phy_nondrive_finish
B - 190838 - boot_flash_init, Start
D - 0 - boot_flash_init, Delta
B - 197945 - sbl1_ddr_set_default_params, Start
D - 0 - sbl1_ddr_set_default_params, Delta
B - 205936 - boot_config_data_table_init, Start
D - 95160 - boot_config_data_table_init, Delta - (60 Bytes)
B - 305610 - CDT Version:3,Platform ID:8,Major ID:1,Minor ID:0,Subtype:0
B - 310307 - Image Load, Start
D - 22326 - PMIC Image Loaded, Delta - (37272 Bytes)
B - 332663 - pm_device_init, Start
B - 338428 - PON REASON:PM0:0x200020021 PM1:0x200020021
B - 374784 - PM_SET_VAL:Skip
D - 40016 - pm_device_init, Delta
B - 376705 - pm_driver_init, Start
D - 2928 - pm_driver_init, Delta
B - 383293 - pm_sbl_chg_init, Start
B - 386923 - BOOTUP: Battery is GOOD
D - 3477 - pm_sbl_chg_init, Delta
B - 393877 - vsense_init, Start
D - 0 - vsense_init, Delta
B - 401380 - Pre_DDR_clock_init, Start
D - 396 - Pre_DDR_clock_init, Delta
B - 407236 - ddr_initialize_device, Start
B - 410926 - 8996 Pro v1.x detected, Max frequency = 1.8 GHz
B - 418521 - ddr_initialize_device, Delta
B - 420869 - Basic DDR tests done
B - 1983659 - clock_init, Start
D - 244 - clock_init, Delta
B - 1985672 - Image Load, Start
D - 6222 - QSEE Dev Config Image Loaded, Delta - (46008 Bytes)
B - 1992351 - Image Load, Start
D - 5460 - APDP Image Loaded, Delta - (0 Bytes)
B - 2022028 - usb: fedl, vbus_low
B - 2022089 - Image Load, Start
D - 10705 - XBLRamDump Image Loaded, Delta - (342782 Bytes)
B - 2087359 - usb: init start
B - 2089158 - usb: PLL lock success , 0x2
B - 2427739 - usb: HIGH , 0x900e
B - 2507832 - usb: HIGH , 0x900e
B - 2612294 - usb: ENUM success

Any idea on this issue ??
Thanks in advance

Hi

I am also facing the similar issue, the GPS module is connected to BLSP_UART1. After loading the msm modules the board is going to the ramdom mode.

I have attched the error logs [ 0.649510] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled[ 0.6 - Pastebin.com .

Can you suggest some pointers to fix this issue ?

Regards,
Ajith.

Look like one of the port you try to use is not available from non secure world, causing the reboot on register access. You can not easily change that since the config is probably done in the bootloader.

Hi @Loic
Thanks for your response.

Does this imply that the gpio used for configuring the UART is already used in trustzone area ?
Is there an option to connect the UART port on some other BLSP or any other hardware modification to solve the issue ?.

Regards,
Ajith.

Hi @Ajith_Kumaresh

The driver modifcation I followed was:
drivers/tty/serial/msm_serial.c +1563

.uart = {
.iotype = UPIO_MEM,
.ops = &msm_uart_pops,
.flags = UPF_FIXED_PORT,
.fifosize = 64,
.line = 3,
},

I have /dev/ttyMSM3, but the “.flags” property needs a re-check, with .flags=UPF_BOOT_AUTOCONF, the board went to ramdump.

  • @Loic Any information to debug further is thankful… :slight_smile:

I had the same boot fail problem (ram dump on serial registration) with configuring UART (serial3) for BLSP11 on 820db and using UPF_FIXED_PORT instead of UPF_BOOT_AUTOCONF worked.

I can now see UART in /dev/ttyMSM3. Haven’t tested the actual serial communication yet. The only weird thing i noticed is when looking through kernel messages is the missing 75b3000.serial: line in

[16:06:54:032] [    2.585493] msm_serial 7570000.serial: msm_serial: detected port #2␍␊
[16:06:54:032] [    2.585561] msm_serial 7570000.serial: uartclk = 19200000␍␊
[16:06:54:032] [    2.585655] 7570000.serial: ttyMSM2 at MMIO 0x7570000 (irq = 9, base_baud = 1200000) is a MSM␍␊
[16:06:54:032] [    2.585979] serial serial0: tty port ttyMSM2 registered␍␊
[16:06:54:032] [    2.586498] msm_serial 75b3000.serial: msm_serial: detected port #3␍␊
[16:06:54:032] [    2.586573] msm_serial 75b3000.serial: uartclk = 19200000␍␊
[16:06:54:075] [    2.587477] msm_serial 75b0000.serial: msm_serial: detected port #0␍␊
[16:06:54:075] [    2.587545] msm_serial 75b0000.serial: uartclk = 7372800␍␊
[16:06:54:075] [    2.587632] 75b0000.serial: ttyMSM0 at MMIO 0x75b0000 (irq = 14, base_baud = 460800) is a MSM␍␊
[16:06:54:075] [    2.587671] msm_serial: console setup on port #0␍␊
[16:06:54:075] [    4.030367] console [ttyMSM0] enabled␍␊
[16:06:54:075] [    4.035930] msm_serial: driver initialized␍␊

and missing fields tx and rx when doing cat /proc/tty/driver/msm_serial as i get:

3: uart:MSM mmio:0x075B3000 irq:12

Is this ok or did I just managed to avoid boot crash by not actually registering the serial port?

If the serial is configured for trustzone by the firmwate/bootloader, there is no way to access it. AFAIU removng UPF_BOOT_AUTOCONF, just prevent the uart to be configured at boot time and so avoid the startup crash, but it does not mean the uart will be functional.

Yeah you are probably right, I’ll have to wait for the support and their trustzone proprietary code… Thanks!