Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1624863pxb; Fri, 27 Aug 2021 13:20:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyo6BqgXIoNTaOy5PIngiu5QmOo9fMJeIgjHtHQ5085tFpbK8pn3nxOveiHG/s+huqCpJ3J X-Received: by 2002:a05:6e02:1a0f:: with SMTP id s15mr8340900ild.158.1630095600244; Fri, 27 Aug 2021 13:20:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630095600; cv=none; d=google.com; s=arc-20160816; b=XmnfLFxSO5SNZTj5NC+ypDf49zRWA2Ng9vRxaPQaExRPhONvhM7vMnOyDA1dEtMoh6 S2kVBcykSfACN7okiu9JAZGBTdzZXlGq2c0LWY7kxNJf29HjPVT4Loi3Ao3DDfHoAp3z FkjwoqoCmprQdRa/uH44MzwXQX0Mq71hCfuUX78pYyHib6zru5JC71V7GVPA8dDCN4aq qgK40MUX+tLzZ0gv4X/I0PvZh2nYpImXPDuLSPgUTNivCboDMjJH2EETGR7dCOHgzDIf 1lowwCeSHufjqi9R0mVf+kxa2Nh0uWnuNPNocLyspWJZT73MKXKpoeHE9u6eUu2bcF18 5syw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=QlFCRn/KSWCrD5h4AfUl4NHe/Xvj1cJY22xR9pJx8p4=; b=XEV6OiaBm3FRvmzaUERZYDUqAE2ZItJYLyvgXQlXrcVh4nAuhMcO0zngTrWyDkDrSq BY/HFZRjQqFXC9YWfVnk4IOelEArlo0TpdUQKFtaxVhc5tFUigUjaMOFU9U3V3TuiJxD 0j+RpONhGQSB5ytwO2NZTa95iLiWTmERSsQhr7dtd3SVia9MFN4CROVz9tykOMO7yEuD ymN5tXm2pzNsuZeIKqB5A4OKkUB+QEYvx3TMn4zE7wZdOxaNOXA3cQ2twxhGvI4/BfQx NLbPJ7e6/tAPinpvTFo5w/+8lk2Ubyx3AbD7VF8ZIFeC9nPbCgVgi9TI/UiU2lpDjfR0 g6zQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r17si6872893iln.147.2021.08.27.13.19.48; Fri, 27 Aug 2021 13:20:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231601AbhH0USo (ORCPT + 99 others); Fri, 27 Aug 2021 16:18:44 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:43157 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230171AbhH0USn (ORCPT ); Fri, 27 Aug 2021 16:18:43 -0400 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id BB93B1C0003; Fri, 27 Aug 2021 20:17:49 +0000 (UTC) Date: Fri, 27 Aug 2021 22:17:45 +0200 From: Alexandre Belloni To: kavyasree.kotagiri@microchip.com Cc: nicolas.ferre@microchip.com, ludovic.desroches@microchip.com, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Manohar.Puri@microchip.com, Madhuri.Sripada@microchip.com Subject: Re: [PATCH] ARM: at91: add basic support for new SoC lan966x Message-ID: References: <20210827092623.10677-1-kavyasree.kotagiri@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210827092623.10677-1-kavyasree.kotagiri@microchip.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Kavya, Thank you for the patch and the upstreaming effort! On 27/08/2021 14:56:23+0530, kavyasree.kotagiri@microchip.com wrote: > From: Kavyasree Kotagiri > > This patch introduces Microchip LAN966X ARMv7 based SoC family > of multiport gigabit AVB/TSN-capable ethernet switches. > It supports two SKUs: 4-port LAN9662 with multiprotocol > processing support and 8-port LAN9668 switch. > > LAN966X includes copper and serial ethernet interfaces, > peripheral interfaces such as PCIe, USB, TWI, SPI, UART, QSPI, > SD/eMMC, Parallel Interface (PI) as well as synchronization > and trigger inputs/outputs. > > Signed-off-by: Kavya Sree Kotagiri > --- > arch/arm/mach-at91/Kconfig | 13 +++++++++++++ > arch/arm/mach-at91/Makefile | 1 + > arch/arm/mach-at91/lan966x.c | 31 +++++++++++++++++++++++++++++++ > 3 files changed, 45 insertions(+) > create mode 100644 arch/arm/mach-at91/lan966x.c > > diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig > index ccd7e80ce943..06cb425af761 100644 > --- a/arch/arm/mach-at91/Kconfig > +++ b/arch/arm/mach-at91/Kconfig > @@ -122,6 +122,14 @@ config SOC_SAM9X60 > help > Select this if you are using Microchip's SAM9X60 SoC > > +config SOC_LAN966X > + bool "ARMv7 based Microchip LAN966X SoC family" > + depends on ARCH_MULTI_V7 > + select SOC_LAN966 > + select DW_APB_TIMER_OF > + help > + This enables support for ARMv7 based Microchip LAN966X SoC family. > + > comment "Clocksource driver selection" > > config ATMEL_CLOCKSOURCE_PIT > @@ -188,6 +196,11 @@ config SOC_SAMA5 > select SOC_SAM_V7 > select SRAM if PM > > +config SOC_LAN966 > + bool > + select ARM_GIC > + select MEMORY > + > config ATMEL_PM > bool > > diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile > index f565490f1b70..93cfd5b4e6d4 100644 > --- a/arch/arm/mach-at91/Makefile > +++ b/arch/arm/mach-at91/Makefile > @@ -6,6 +6,7 @@ > # CPU-specific support > obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o > obj-$(CONFIG_SOC_AT91SAM9) += at91sam9.o > +obj-$(CONFIG_SOC_LAN966X) += lan966x.o > obj-$(CONFIG_SOC_SAM9X60) += sam9x60.o > obj-$(CONFIG_SOC_SAMA5) += sama5.o > obj-$(CONFIG_SOC_SAMV7) += samv7.o > diff --git a/arch/arm/mach-at91/lan966x.c b/arch/arm/mach-at91/lan966x.c > new file mode 100644 > index 000000000000..de689f854068 > --- /dev/null > +++ b/arch/arm/mach-at91/lan966x.c > @@ -0,0 +1,31 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +/* > + * Setup code for LAN966X > + * > + * Copyright (C) 2021 Microchip Technology, Inc. and its subsidiaries > + * > + */ > + > +#include > +#include > + > +#include > +#include > + > +#include "generic.h" > + > +static void __init lan966x_dt_device_init(void) > +{ > + of_platform_default_populate(NULL, NULL, NULL); Are you sure this is needed? This is a workaround that is there on the other platforms because of the at91 pinctrl driver. Ideally, you should be able to boot without that. Can you confirm? > +} > + > +static const char *const lan966x_dt_board_compat[] __initconst = { > + "microchip,lan966x", > + NULL > +}; > + > +DT_MACHINE_START(lan966x_dt, "Microchip LAN966X") > + /* Maintainer: Microchip */ > + .init_machine = lan966x_dt_device_init, > + .dt_compat = lan966x_dt_board_compat, > +MACHINE_END > -- > 2.17.1 > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com