[PATCH v2 0/2] Disable debug UART for Apple M1

Now that we support the M1 Pro/Max SoCs we need to disable the debug UART as the base address is different on the new SoC. This now includes an update to the board documentation with details on how to enable the debug UART.
Mark Kettenis (2): arm: apple: Disable debug UART doc: board: apple: Update Apple M1 documentation
configs/apple_m1_defconfig | 1 - doc/board/apple/m1.rst | 32 +++++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-)

The address of the debug UART varies differs between the M1 and the M1 Pro/Max SoCs. So we have to disable it to make a single U-Boot binary that works on all SoC generations. Leave the settings for the base address and clock rate of the M1 in place to make it easier to re-enable the debug UART when needed.
Signed-off-by: Mark Kettenis kettenis@openbsd.org --- configs/apple_m1_defconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/configs/apple_m1_defconfig b/configs/apple_m1_defconfig index ef5b7ffd1a..396fe63114 100644 --- a/configs/apple_m1_defconfig +++ b/configs/apple_m1_defconfig @@ -3,7 +3,6 @@ CONFIG_ARCH_APPLE=y CONFIG_DEFAULT_DEVICE_TREE="t8103-j274" CONFIG_DEBUG_UART_BASE=0x235200000 CONFIG_DEBUG_UART_CLOCK=24000000 -CONFIG_DEBUG_UART=y CONFIG_SYS_LOAD_ADDR=0x0 CONFIG_USE_PREBOOT=y # CONFIG_DISPLAY_CPUINFO is not set

On Mon, Feb 14, 2022 at 10:09:25PM +0100, Mark Kettenis wrote:
The address of the debug UART varies differs between the M1 and the M1 Pro/Max SoCs. So we have to disable it to make a single U-Boot binary that works on all SoC generations. Leave the settings for the base address and clock rate of the M1 in place to make it easier to re-enable the debug UART when needed.
Signed-off-by: Mark Kettenis kettenis@openbsd.org
Applied to u-boot/master, thanks!

U-Boot now supports NVMe storage and on the laptop models, the SPI keyboard. Since we now disable the debug console by default provide instructions on how the enable the debug console including a table listing the appropriate UART base address for each of the supported SoCs.
Signed-off-by: Mark Kettenis kettenis@openbsd.org --- doc/board/apple/m1.rst | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-)
diff --git a/doc/board/apple/m1.rst b/doc/board/apple/m1.rst index 9fa21767c9..083bfb0a1a 100644 --- a/doc/board/apple/m1.rst +++ b/doc/board/apple/m1.rst @@ -7,18 +7,21 @@ Allows Apple Silicon Macs to boot U-Boot via the m1n1 bootloader developed by the Asahi Linux project. At this point the machines with the following SoCs work:
- - Apple M1 SoC + - Apple M1 SoC (t8103) + - Apple M1 Pro SoC (t6000) + - Apple M1 Max SoC (t6001)
On these SoCs the following hardware is supported:
- S5L serial port + - SPI keyboard (on laptops) - Framebuffer + - NVMe storage - USB 3.1 Type-C ports
-Device trees are currently provided for the M1 Mac mini (2020, J274) -and M1 MacBook Pro 13" (2020, J293). The M1 MacBook Air (2020) is -expected to work with the J293 device tree. The M1 iMac (2021) may -work with the J274 device tree. +Device trees are currently provided for the M1 Mac mini (2020, J274), +M1 MacBook Pro 13" (2020, J293), M1 MacBook Air (2020, J313) and M1 +iMac (2021, J456/J457).
Building U-Boot --------------- @@ -57,3 +60,23 @@ Instructions on how to install U-Boot on your Mac can be found at: https://github.com/AsahiLinux/docs/wiki/Developer-Quickstart
Just replace ``m1n1.macho`` with ``u-boot.macho`` in the instructions. + +Debug UART +---------- + +Since the base address of the UART is SoC-dependent, the debug UART is +not enabled by default. To enable the debug UART the base address +needs to be adjusted and the CONFIG_DEBUG_UART option needs to be +enabled. The table below gives the correct base address for the +supported SoCs. + +.. list-table:: + :widths: 32 16 + :header-rows: 1 + + * - SoC + - Base Address + * - M1 (t8103) + - 0x235200000 + * - M1 Pro/Max (t6000/t6001) + - 0x39b200000

On Mon, Feb 14, 2022 at 10:09:26PM +0100, Mark Kettenis wrote:
U-Boot now supports NVMe storage and on the laptop models, the SPI keyboard. Since we now disable the debug console by default provide instructions on how the enable the debug console including a table listing the appropriate UART base address for each of the supported SoCs.
Signed-off-by: Mark Kettenis kettenis@openbsd.org
Applied to u-boot/master, thanks!
participants (2)
-
Mark Kettenis
-
Tom Rini