diff mbox series

[2/2] arm: apple: Add initial Apple M2 support

Message ID 20220630220617.23530-2-j@jannau.net
State Accepted
Commit e53237aa53448fc1baed408cdad3ad5aef9bbe65
Delegated to: Tom Rini
Headers show
Series [1/2] iommu: Add M2 support to Apple DART driver | expand

Commit Message

Janne Grunau June 30, 2022, 10:06 p.m. UTC
Apple's M2 SoC very similar to the M1 and can use the same memory map.
The keyboard/trackpad on the MacBook Pro (13-inch, M2, 2022) uses
"dockchannel" as transport instead of SPI and needs a new driver.
USB, NVMe, uart, framebuffer and watchdog are working with the existing
drivers.

Signed-off-by: Janne Grunau <j@jannau.net>
---
 arch/arm/mach-apple/board.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Mark Kettenis July 10, 2022, 5:33 p.m. UTC | #1
> From: Janne Grunau <j@jannau.net>
> Date: Fri,  1 Jul 2022 00:06:17 +0200
> 
> Apple's M2 SoC very similar to the M1 and can use the same memory map.
> The keyboard/trackpad on the MacBook Pro (13-inch, M2, 2022) uses
> "dockchannel" as transport instead of SPI and needs a new driver.
> USB, NVMe, uart, framebuffer and watchdog are working with the existing
> drivers.
> 
> Signed-off-by: Janne Grunau <j@jannau.net>

Reviewed-by: Mark Kettenis <kettenis@openbsd.org>

> ---
>  arch/arm/mach-apple/board.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-apple/board.c b/arch/arm/mach-apple/board.c
> index 1525a9edee8e..16046423128c 100644
> --- a/arch/arm/mach-apple/board.c
> +++ b/arch/arm/mach-apple/board.c
> @@ -16,7 +16,7 @@
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> -/* Apple M1 */
> +/* Apple M1/M2 */
>  
>  static struct mm_region t8103_mem_map[] = {
>  	{
> @@ -376,7 +376,8 @@ void build_mem_map(void)
>  	fdt_size_t size;
>  	int i;
>  
> -	if (of_machine_is_compatible("apple,t8103"))
> +	if (of_machine_is_compatible("apple,t8103") ||
> +	    of_machine_is_compatible("apple,t8112"))
>  		mem_map = t8103_mem_map;
>  	else if (of_machine_is_compatible("apple,t6000"))
>  		mem_map = t6000_mem_map;
> -- 
> 2.35.1
> 
>
Tom Rini July 25, 2022, 9:19 p.m. UTC | #2
On Fri, Jul 01, 2022 at 12:06:17AM +0200, Janne Grunau wrote:

> Apple's M2 SoC very similar to the M1 and can use the same memory map.
> The keyboard/trackpad on the MacBook Pro (13-inch, M2, 2022) uses
> "dockchannel" as transport instead of SPI and needs a new driver.
> USB, NVMe, uart, framebuffer and watchdog are working with the existing
> drivers.
> 
> Signed-off-by: Janne Grunau <j@jannau.net>
> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/arm/mach-apple/board.c b/arch/arm/mach-apple/board.c
index 1525a9edee8e..16046423128c 100644
--- a/arch/arm/mach-apple/board.c
+++ b/arch/arm/mach-apple/board.c
@@ -16,7 +16,7 @@ 
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/* Apple M1 */
+/* Apple M1/M2 */
 
 static struct mm_region t8103_mem_map[] = {
 	{
@@ -376,7 +376,8 @@  void build_mem_map(void)
 	fdt_size_t size;
 	int i;
 
-	if (of_machine_is_compatible("apple,t8103"))
+	if (of_machine_is_compatible("apple,t8103") ||
+	    of_machine_is_compatible("apple,t8112"))
 		mem_map = t8103_mem_map;
 	else if (of_machine_is_compatible("apple,t6000"))
 		mem_map = t6000_mem_map;