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 E91A8C433EF for ; Sun, 3 Oct 2021 18:34:43 +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 B9C61619E9 for ; Sun, 3 Oct 2021 18:34:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B9C61619E9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=openbsd.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 5277F82EE0; Sun, 3 Oct 2021 20:34:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=openbsd.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 3763383423; Sun, 3 Oct 2021 20:31:16 +0200 (CEST) Received: from lb2-smtp-cloud7.xs4all.net (lb2-smtp-cloud7.xs4all.net [194.109.24.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D301782EE0 for ; Sun, 3 Oct 2021 20:31:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=openbsd.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=kettenis@openbsd.org Received: from cust-df1d398c ([IPv6:fc0c:c1f5:9ac0:c45f:1583:5c5b:91fa:2436]) by smtp-cloud7.xs4all.net with ESMTPA id X6GJmiwcM3tiGX6GMmelMO; Sun, 03 Oct 2021 20:31:11 +0200 From: Mark Kettenis To: u-boot@lists.denx.de Cc: Mark Kettenis , Bharat Gooty , Rayagonda Kokatanur , Simon Glass , Andre Przywara , Fabio Estevam , Jagan Teki , Kever Yang , Priyanka Jain , Peter Robinson , Tim Harvey , Konstantin Porotchkin , Heiko Schocher , Lokesh Vutla , Dario Binacchi , Bin Meng , Nandor Han , Neil Armstrong , Sean Anderson , Nicolas Saenz Julienne , Claudiu Manoil , Jean-Jacques Hiblot , Michael Walle , Patrick Delaunay , Wasim Khan , Rasmus Villemoes , AKASHI Takahiro , Alexandru Gagniuc , Steffen Jaeckel , Heinrich Schuchardt , Asherah Connor , Oliver Graute , Anup Patel , Stephan Gerhold , Padmarao Begari , Masami Hiramatsu , Kishon Vijay Abraham I , Tianrui Wei , Pratyush Yadav , Kunihiko Hayashi , Philippe Reynes , Jaehoon Chung , Ye Li , Stefan Roese , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Patrick Wildt , Weijie Gao , Vabhav Sharma , Michal Simek , Andy Shevchenko Subject: [PATCH v2 0/7] Apple M1 Support Date: Sun, 3 Oct 2021 20:30:26 +0200 Message-Id: <20211003183050.67925-1-kettenis@openbsd.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfNZtfrIn7wb47iZquuN+L7oCkfIc2n4D5G+EiBjsqQp+7ZoyJprBN4wYiM0DQTaIXgHPfI19IaSUNiFkXigKwhr4abcOMf7gTUTlScdC734h33XD+JF6 /MCrTEKy2pA7hDjNN8onLih1+yxz6RQHuupZmhaQuiiEbr5IBCMq4MIZxtLL2ANQrF+OTPvrerIj12SDMf2YirWbKqOZ6sCjt/p3GtH62DxofmXN+pnbF6Bm BlfpHyAIcfozh9VUytgQwEcRPfZImSgkcm8WNFaCBCTA8/Wol/R0q2xUrvJUjt40DDz/ZCGR4EUK4NL79FEdifrmHLvz8u3+eiCFfgOp4PnB8Lp+q6VQm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93uJOJfUmxMKc jkGyMteC/ltUBryjZs23+C4T4O1jOfYYEKL5Bo0Gqp9fHT1M2NK0kD40hDIM9OOx9AvjiYmmPXMIBSy2Ek4cRWhKaH7Dt0GoIflbezvVjGFH2ppsQNU2tPEn 06+hkPha7B5UM5FXGjB2h/lQBSy3IbbivrQMMSRz6heIIBuDIHMnFKw21a/SRaEgLAjigDw4BnhF1yBDMt0VHKI6DpPlEGaCEXj+jbAYSRvT5GWgUE1Rv5Lm +0JTdEfMv0Kk0ZfIQAVc/BqWYwmA4yz+0DIsxlY7QcaeOjjmq91LGP9nf794IlaP8iWdIYdMenMj1NdI1gHSUbiCs3GCnBJdZqlxaxs9q1rzBSJ3R3zwnIvj P2evpT+uUxZrwHV5ohIZbTXrgH2a6Pr5xGtGRXksOcsKv8ME4oaOrwOxBMU4UkCEj+6fRP6dHoJoJ4JURtoVKA6TqYHyy/ndd9YAhHgj X-Mailman-Approved-At: Sun, 03 Oct 2021 20:34:39 +0200 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 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 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. This version attempts to address most comments. It doesn't add a proper WDT/sysreset driver yet since I prefer to do that once the device tree bindings for that have been ironed out. ChangeLog: v2: - Add IOMMU uclass and use it for the DART driver - Cut back DART driver to only support bypass mode - Rework the S5P serial support to use more DT stuff - Update preliminary device trees Mark Kettenis (7): iommu: Add IOMMU uclass test: Add tests for IOMMU uclass arm: apple: Add initial support for Apple's M1 SoC serial: s5p: Add Apple M1 support iommu: Add Apple DART driver arm: dts: apple: Add preliminary device trees doc: board: apple: Add Apple M1 documentation arch/arm/Kconfig | 23 + arch/arm/Makefile | 1 + arch/arm/dts/Makefile | 4 + arch/arm/dts/t8103-j274.dts | 135 +++++ arch/arm/dts/t8103-j293.dts | 97 +++ arch/arm/dts/t8103.dtsi | 560 ++++++++++++++++++ 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 | 161 +++++ arch/arm/mach-apple/lowlevel_init.S | 17 + arch/sandbox/dts/test.dts | 6 + configs/apple_m1_defconfig | 19 + configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig | 1 + configs/sandbox_flattree_defconfig | 1 + configs/sandbox_noinst_defconfig | 1 + configs/sandbox_spl_defconfig | 1 + doc/board/apple/index.rst | 9 + doc/board/apple/m1.rst | 56 ++ doc/board/index.rst | 1 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/core/device.c | 8 + drivers/iommu/Kconfig | 23 + drivers/iommu/Makefile | 6 + drivers/iommu/apple_dart.c | 59 ++ drivers/iommu/iommu-uclass.c | 45 ++ drivers/iommu/sandbox_iommu.c | 18 + drivers/serial/Kconfig | 4 +- drivers/serial/serial_s5p.c | 104 +++- include/configs/apple.h | 38 ++ include/dm/uclass-id.h | 1 + .../interrupt-controller/apple-aic.h | 15 + include/dt-bindings/pinctrl/apple.h | 13 + include/dt-bindings/spmi/spmi.h | 10 + include/iommu.h | 16 + test/dm/Makefile | 1 + test/dm/iommu.c | 28 + 39 files changed, 1525 insertions(+), 24 deletions(-) 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/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/iommu/Kconfig create mode 100644 drivers/iommu/Makefile create mode 100644 drivers/iommu/apple_dart.c create mode 100644 drivers/iommu/iommu-uclass.c create mode 100644 drivers/iommu/sandbox_iommu.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 create mode 100644 include/iommu.h create mode 100644 test/dm/iommu.c -- 2.33.0