From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4648C433EF for ; Sat, 25 Sep 2021 01:20:55 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D132760F41 for ; Sat, 25 Sep 2021 01:20:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D132760F41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6D06683223; Sat, 25 Sep 2021 03:20:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="BkavPNyo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3896E83221; Sat, 25 Sep 2021 03:20:50 +0200 (CEST) Received: from mail-vs1-xe2f.google.com (mail-vs1-xe2f.google.com [IPv6:2607:f8b0:4864:20::e2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 96EC383223 for ; Sat, 25 Sep 2021 03:20:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-vs1-xe2f.google.com with SMTP id u8so11954987vsp.1 for ; Fri, 24 Sep 2021 18:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Kj7nUC8GrQ7Qs7hhMrgdY+dDOg61dSITqIPHkw2lTxE=; b=BkavPNyovnVyYJxW2OrDn+GfD+oXFUCLZJUsnRmPysVpVnUKRlhY10l1Gr2QrgCN0E zVAtpELdu+Kh8NAcsnUh3wmHy4Lb2Tc8vhhA6lDZ5oWgQ83I2+xGsQw2ZV00hDt+FYXg FymuZYjMR6Hcs9ClbtYwdCmPMayoJovJT69Jw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Kj7nUC8GrQ7Qs7hhMrgdY+dDOg61dSITqIPHkw2lTxE=; b=1h0iGpDjS5P7/E2LVtbrf7PtSBcNSpMXNEByWkP1A+8N5rP63L+09ddASy2fU/rata 4O9PcY2TaSD99qyskuXyQc2dzorjnQnSdd+V2/ibm2MeKnEFClMMZeXBZ/acyWneqeVy BUplpvosT5VBKHEeq45U6RXePYu5nim9PXA8ai5gV7s8l12brYW+dd5rm3/g/gBasL7E Y4+FdY9lRcEm6sYmuFmpJlAjnLTP5RBWfeDD5SoVMywWCLCt6N2O0Jg8SlIxH8o7pvGT KvcV4FR6kikhe1WpCw0rweKBvDzMm66Ad82Dx8FJxWN1WSFPhNjBjLBsAf31PkC2Y/Ej A8qw== X-Gm-Message-State: AOAM530VdMDT9M8W3Up+IPloC9QDfXUaAVCV2UFeAASjb9csdcPsqkIr IvZnVbEiMMt7zNU3i4/5T2/OHoFkT+v9CVeDUivD9g== X-Google-Smtp-Source: ABdhPJxkCr2Dxwkp1kPlZH/vBxUgape46yVwLRW+VsB7SB81TwdchXCYq0gRYw8DQfggdwepV79hOKMf6k14sVaL9g0= X-Received: by 2002:a05:6102:3a59:: with SMTP id c25mr12280138vsu.15.1632532843976; Fri, 24 Sep 2021 18:20:43 -0700 (PDT) MIME-Version: 1.0 References: <20210918135437.36667-1-kettenis@openbsd.org> In-Reply-To: <20210918135437.36667-1-kettenis@openbsd.org> From: Simon Glass Date: Fri, 24 Sep 2021 19:20:32 -0600 Message-ID: Subject: Re: [PATCH 0/5] Apple M1 Support To: Mark Kettenis Cc: U-Boot Mailing List , Oliver Graute , Michael Walle , Anup Patel , Jonathan Balkind , Tianrui Wei , Padmarao Begari , Kishon Vijay Abraham I , Stephan Gerhold , Heinrich Schuchardt , Bin Meng , Asherah Connor , Michal Simek , Wasim Khan , Ye Li , Igor Opaniuk , Stefan Roese , Minkyu Kang , AKASHI Takahiro , Weijie Gao , Vabhav Sharma , Andy Shevchenko , Pratyush Yadav Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Mark, On Sat, 18 Sept 2021 at 07:54, Mark Kettenis wrote: > > This series adds basic support for Apple's M1 SoC to U-Boot. > This builds a basic U-Boot that can be used as a payload > for the m1n1 boot loader being developed by the Asahi Linux > project. > > The goal here is to privide an UEFI interface on these machines that provide > allows booting various open source OSes. This initial series provides > support for the serial port, framebuffer and the USB 3.1 Type-C ports. > It can boot a support OS (e.g. OpenBSD/arm64) from a USB disk. > > Mark Kettenis (5): > arm: apple: Add initial support for Apple's M1 SoC > serial: s5p: Add Apple M1 support > misc: Add Apple DART driver > arm: dts: apple: Add preliminary device trees > doc: board: apple: Add Apple M1 documentation > > arch/arm/Kconfig | 22 + > arch/arm/Makefile | 1 + > arch/arm/dts/t8103-j274.dts | 135 +++++ > arch/arm/dts/t8103-j293.dts | 97 ++++ > arch/arm/dts/t8103.dtsi | 506 ++++++++++++++++++ > arch/arm/include/asm/arch-m1/clk.h | 11 + > arch/arm/include/asm/arch-m1/uart.h | 41 ++ > arch/arm/mach-apple/Kconfig | 18 + > arch/arm/mach-apple/Makefile | 4 + > arch/arm/mach-apple/board.c | 163 ++++++ > arch/arm/mach-apple/lowlevel_init.S | 16 + > configs/apple_m1_defconfig | 14 + > doc/board/apple/index.rst | 9 + > doc/board/apple/m1.rst | 54 ++ > doc/board/index.rst | 1 + > drivers/misc/Kconfig | 7 + > drivers/misc/Makefile | 1 + > drivers/misc/apple_dart.c | 171 ++++++ > drivers/serial/Kconfig | 2 +- > drivers/serial/serial_s5p.c | 22 + > include/configs/apple.h | 38 ++ > .../interrupt-controller/apple-aic.h | 15 + > include/dt-bindings/pinctrl/apple.h | 13 + > include/dt-bindings/spmi/spmi.h | 10 + > 24 files changed, 1370 insertions(+), 1 deletion(-) > create mode 100644 arch/arm/dts/t8103-j274.dts > create mode 100644 arch/arm/dts/t8103-j293.dts > create mode 100644 arch/arm/dts/t8103.dtsi > create mode 100644 arch/arm/include/asm/arch-m1/clk.h > create mode 100644 arch/arm/include/asm/arch-m1/uart.h > create mode 100644 arch/arm/mach-apple/Kconfig > create mode 100644 arch/arm/mach-apple/Makefile > create mode 100644 arch/arm/mach-apple/board.c > create mode 100644 arch/arm/mach-apple/lowlevel_init.S > create mode 100644 configs/apple_m1_defconfig > create mode 100644 doc/board/apple/index.rst > create mode 100644 doc/board/apple/m1.rst > create mode 100644 drivers/misc/apple_dart.c > create mode 100644 include/configs/apple.h > create mode 100644 include/dt-bindings/interrupt-controller/apple-aic.h > create mode 100644 include/dt-bindings/pinctrl/apple.h > create mode 100644 include/dt-bindings/spmi/spmi.h > > -- > 2.33.0 > I gave this a whirl on a Macbook Air A2337 and needed the patch below to build the devicetree files. Sorry the formatting is broken. Also when booting I get this: ... Preparing to boot kernel at 0x808200000 with fdt at 0x8082e8000 Valid payload found Preparing to run next stage at 0x808200000... MMU: shutting down... MMU: shutdown successful, clearing caches Then the display clears and it hangs. If I try the J274 devicetree it just reboots at that point. What should I expect? I was hoping for console output as I don't have serial connected. I don't have a suitable serial cable, and the USB gadget mode did not result in a ttyACM0 device appearing. Regards, Simon Subject: [PATCH] Fix up devicetree Get these building. Signed-off-by: Simon Glass --- arch/arm/dts/Makefile | 2 ++ configs/apple_m1_defconfig | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index fc16a57e60b..0c40947cc33 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -1130,6 +1130,8 @@ dtb-$(CONFIG_TARGET_IMX8MM_CL_IOT_GATE) += imx8mm-cl-iot-gate.dtb dtb-$(CONFIG_TARGET_EA_LPC3250DEVKITV2) += lpc3250-ea3250.dtb +dtb-$(CONFIG_ARCH_APPLE) += t8103-j274.dtb t8103-j293.dtb + targets += $(dtb-y) # Add any required device tree compiler flags here diff --git a/configs/apple_m1_defconfig b/configs/apple_m1_defconfig index a7ae15576bf..7712a0bac52 100644 --- a/configs/apple_m1_defconfig +++ b/configs/apple_m1_defconfig @@ -1,14 +1,13 @@ CONFIG_ARM=y CONFIG_ARCH_APPLE=y +CONFIG_DEFAULT_DEVICE_TREE="t8103-j293" +CONFIG_USE_PREBOOT=y # CONFIG_DISPLAY_CPUINFO is not set -# CONFIG_MMC is not set -# CONFIG_NET is not set -CONFIG_VIDEO_SIMPLE=y CONFIG_DISPLAY_BOARDINFO_LATE=y +# CONFIG_NET is not set +# CONFIG_MMC is not set CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_KEYBOARD=y -CONFIG_USB_STORAGE=y -CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="usb start" +CONFIG_VIDEO_SIMPLE=y # CONFIG_GENERATE_SMBIOS_TABLE is not set -- 2.25.1