u-boot/include/configs/apple.h
Mark Kettenis d42f107425 input: apple: Add support for Apple SPI keyboard
This driver adds support for the keyboard on Apple Silicon laptops.
The controller for this keyboard sits on an SPI bus and uses an
Apple-specific HID over SPI protocol. The packets sent by this
controller for key presses and key releases are fairly simple and
are decoded directly by the code in this driver and converted into
standard Linux keycodes. The same controller handles the touchpad
found on these laptops.  Packets for touchpad events are simply
ignored.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested on: Macbook Air M1
Tested-by: Simon Glass <sjg@chromium.org>
2022-02-10 16:44:23 -05:00

39 lines
786 B
C

#ifndef __CONFIG_H
#define __CONFIG_H
#include <linux/sizes.h>
/* Environment */
#define ENV_DEVICE_SETTINGS \
"stdin=serial,usbkbd,spikbd\0" \
"stdout=serial,vidconsole\0" \
"stderr=serial,vidconsole\0"
#define ENV_MEM_LAYOUT_SETTINGS \
"fdt_addr_r=0x960100000\0" \
"kernel_addr_r=0x960200000\0"
#if CONFIG_IS_ENABLED(CMD_NVME)
#define BOOT_TARGET_NVME(func) func(NVME, nvme, 0)
#else
#define BOOT_TARGET_NVME(func)
#endif
#if CONFIG_IS_ENABLED(CMD_USB)
#define BOOT_TARGET_USB(func) func(USB, usb, 0)
#else
#define BOOT_TARGET_USB(func)
#endif
#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_NVME(func) \
BOOT_TARGET_USB(func)
#include <config_distro_bootcmd.h>
#define CONFIG_EXTRA_ENV_SETTINGS \
ENV_DEVICE_SETTINGS \
ENV_MEM_LAYOUT_SETTINGS \
BOOTENV
#endif