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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 130DDC433EF for ; Sun, 23 Jan 2022 15:48:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7CA7681DD0; Sun, 23 Jan 2022 16:48:32 +0100 (CET) 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 Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=kpnmail.nl header.i=@kpnmail.nl header.b="iLSdqJFO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 167FA82FC8; Sun, 23 Jan 2022 16:48:31 +0100 (CET) Received: from ewsoutbound.kpnmail.nl (ewsoutbound.kpnmail.nl [195.121.94.169]) (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 4992F811DF for ; Sun, 23 Jan 2022 16:48:28 +0100 (CET) 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 X-KPN-MessageId: e1118442-7c63-11ec-bb40-005056abad63 Received: from smtp.kpnmail.nl (unknown [10.31.155.37]) by ewsoutbound.so.kpn.org (Halon) with ESMTPS id e1118442-7c63-11ec-bb40-005056abad63; Sun, 23 Jan 2022 16:48:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kpnmail.nl; s=kpnmail01; h=mime-version:message-id:date:subject:to:from; bh=i6w6Q97sER1QVv9cF1WSRoj+QAedeejr3ImQLHNlw7c=; b=iLSdqJFOViLzc32fywx/fv4/Ch2Bd0J/mX5a4NkYehrQ4bE2+zRrFPfK/8A5hF5RQZstH7CbklRCM 9LHQjDkAd67p0g82OEXUTTe85vCg7+I6mxWV1JS/TKHuO/Il5eR2rHa6KKioNdTLYcq5qonf3RdKyf dxOAZYWfAWr7Mj1U= X-KPN-VerifiedSender: No X-CMASSUN: 33|COS54Pe6IYq8PoaYv2AgZLruua4SbszrvJN6YKQoZk19tCSUEVOwN3ql0tyKw7h OYqccadQWKMK5MMlQkBo+sw== X-Originating-IP: 83.163.83.176 Received: from copland.sibelius.xs4all.nl (sibelius.xs4all.nl [83.163.83.176]) by smtp.xs4all.nl (Halon) with ESMTPSA id e77953ae-7c63-11ec-9812-005056ab1411; Sun, 23 Jan 2022 16:48:27 +0100 (CET) From: Mark Kettenis To: u-boot@lists.denx.de Cc: jagan@amarulasolutions.com, marcan@marcan.st, sjg@chromium.org, trini@konsulko.com, Mark Kettenis Subject: [PATCH v2 0/2] Apple M1 laptop keyboard support Date: Sun, 23 Jan 2022 16:48:11 +0100 Message-Id: <20220123154813.54672-1-kettenis@openbsd.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean This short series implements support for the laptop keyboards on the Apple Silicon Mac laptops. These keyboards are connected to an SPI bus, so this adds a driver for the SPI controller integrated on the SoC, as well as the driver for the keyboard itself. This makes it possible to interact with U-Boot and EFI applications without the need for an external USB keyboard. ChangeLog: v2: - Drop delay after enabling controller - Check for errors in spi calls - Add comments Mark Kettenis (2): spi: apple: Add driver for Apple SPI controller input: apple: Add support for Apple SPI keyboard arch/arm/Kconfig | 2 + configs/apple_m1_defconfig | 1 + drivers/input/Kconfig | 8 + drivers/input/Makefile | 1 + drivers/input/apple_spi_kbd.c | 271 ++++++++++++++++++++++++++++++++ drivers/spi/Kconfig | 7 + drivers/spi/Makefile | 1 + drivers/spi/apple_spi.c | 285 ++++++++++++++++++++++++++++++++++ include/configs/apple.h | 2 +- 9 files changed, 577 insertions(+), 1 deletion(-) create mode 100644 drivers/input/apple_spi_kbd.c create mode 100644 drivers/spi/apple_spi.c -- 2.34.1