Caleb Connolly | 94bb340 | 2024-02-26 17:26:29 +0000 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | .. sectionauthor:: Caleb Connolly <caleb.connolly@linaro.org> |
| 3 | |
| 4 | Qualcomm debugging |
| 5 | ================== |
| 6 | |
| 7 | About this |
| 8 | ---------- |
| 9 | |
| 10 | This page describes how to enable early UART and other debugging techniques |
| 11 | for Qualcomm boards. |
| 12 | |
| 13 | Enable debug UART |
| 14 | ----------------- |
| 15 | |
| 16 | Newer boards (SDM845 and newer, those with GENI SE UART) |
| 17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 18 | |
| 19 | Open ``configs/qcom_defconfig`` and add the following snippet to the bottom: |
| 20 | |
| 21 | CONFIG_BAUDRATE=115200 |
| 22 | |
| 23 | # Uncomment to enable UART pre-relocation |
| 24 | CONFIG_DEBUG_UART=y |
| 25 | CONFIG_DEBUG_UART_ANNOUNCE=y |
| 26 | # This is the address of the debug-uart peripheral |
| 27 | # The value here is for SDM845, other platforms will vary |
| 28 | CONFIG_DEBUG_UART_BASE=0xa84000 |
| 29 | # Boards older than ~2018 pre-date the GENI driver and unfortunately |
| 30 | # aren't supported here |
| 31 | CONFIG_DEBUG_UART_MSM_GENI=y |
| 32 | # For sdm845 this is the UART clock rate |
| 33 | CONFIG_DEBUG_UART_CLOCK=7372800 |
| 34 | # Most newer boards have an oversampling value of 16 instead |
| 35 | # of 32, they need the clock rate to be doubled |
| 36 | #CONFIG_DEBUG_UART_CLOCK=14745600 |
| 37 | |
| 38 | Then build as normal (don't forget to ``make qcom_defconfig``` again). |
| 39 | |
| 40 | Older boards (db410c and db820c) |
| 41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 42 | |
| 43 | Open ``configs/dragonboard<BOARD>_defconfig`` |
| 44 | |
| 45 | CONFIG_BAUDRATE=115200 |
| 46 | CONFIG_DEBUG_UART=y |
| 47 | CONFIG_DEBUG_UART_ANNOUNCE=y |
| 48 | # db410c - 0x78b0000 |
| 49 | # db820c - 0x75b0000 |
| 50 | CONFIG_DEBUG_UART_BASE=0x75b0000 |
| 51 | CONFIG_DEBUG_UART_MSM=y |
| 52 | CONFIG_DEBUG_UART_CLOCK=7372800 |
| 53 | #CONFIG_DEBUG_UART_SKIP_INIT=y |
| 54 | |
| 55 | CONFIG_LOG=y |
| 56 | CONFIG_HEXDUMP=y |
| 57 | CONFIG_CMD_LOG=y |
| 58 | CONFIG_LOG_MAX_LEVEL=9 |
| 59 | CONFIG_LOG_DEFAULT_LEVEL=9 |
| 60 | CONFIG_LOGLEVEL=9 |
| 61 | |