Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp24215lqp; Tue, 11 Jun 2024 13:14:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX331V0SC3BBLycrOWr5r4TkESFFtkJMjsmovQGXPff5BwwyHRf30bE+Fh561nB75hfipHzGHbXpJ21kcTq8XggZuXpWOL6Kll/jCHKAQ== X-Google-Smtp-Source: AGHT+IGeB90vCdeHSQ+kQ7iqsWjeUdXrFqOmLBhMrhiv650zQmuzqaq4qbmjSjDc0czPad//JC/p X-Received: by 2002:a17:906:a16:b0:a6f:2ea0:b013 with SMTP id a640c23a62f3a-a6f2ea0b0b8mr300370066b.43.1718136864220; Tue, 11 Jun 2024 13:14:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718136864; cv=pass; d=google.com; s=arc-20160816; b=XjL6kAbVJ1/diO1RfqvRpBDhUgbM2LMU0VnZenVqzoKOuWbK3HaTbwOc56lWfjaoPj uIaj7weIZjuhopgukzxXA9e9KvFKrKSgCW3Gefw+XZW62k9VDaM+6WF+fKtRLRvNNwzR Ja6/+EiBg3H7k3tADiT5P/QV7TDQI9oiLfJpt3Kn+88Y3hlvXlZyNfPeJRTw+QH/XQL7 M0RYpTHCPV6DMzcpfp43639toh/5mnWbmRaijN0GaFz5MvQpWyeITdMLLTcFP0rtcXuj HLE3XhXuUyoaF7yYWm4UJE1eUYn8vrkmUCJwzZqOlWiydI0ozHzunPGFGrjbLGyJTIhx pT4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kHAoa/OJkPqP/DFn6fqwfpyDNzhM8R9ekFcSQK7Rigg=; fh=huU1TwnuiRqf7Cm5GjfH81HdOq1hyHTafgI/dCwn8go=; b=UbKPaHEYEP3xUVOHxLXCkBEFUb2HovQVIfcqhrdzKYeHeGwJWPpkXuv5mnzW44vnR8 0SOqPx6AQlxEOj3vX/tI3OPJwdx9IhJxNRnmrQxiN9kPhwxp2Cpq0b1FKaXQ8rmA2V+H BJaDP4yMMXR6UX1ZxyqAfnw3GxGZPINc1Vf8bMD6QGZLjUcSwhRNbSXiWEosPyB2EHTU 3WJVHsZBJf0svDQ9I/eKaMrx5j+Skn0B9/WvTeVqpTHfq/L1u/9WWMG5FP1OzA7wZW18 ABTPzPaEUi8ukz2I2/OioRPVoqA9A6YzigmPDO7oMonW2WT3SdrhZOPaoGMQTXssj5z8 rZSQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=APCG1fyL; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-210566-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210566-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f1f4b7637si224108766b.960.2024.06.11.13.14.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 13:14:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210566-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=APCG1fyL; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-210566-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210566-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C44F91F2185E for ; Tue, 11 Jun 2024 20:14:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E014C153509; Tue, 11 Jun 2024 20:13:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="APCG1fyL" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB7CC14AD3F; Tue, 11 Jun 2024 20:13:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718136784; cv=none; b=DFR6tehXGeK5DO3OPF75Fq5/kYO7UOyDgJYTCEcWecOcIXWOEC+miiWwAsvRpBuTND/oE7lK6n5h6GhC9PYk5IDTK+uEGMj5cbum3kCtj09IrS8H86EBRNTXoAAHwuM6740VYq7xmVodE0TPJL3utfyNL7PDJbKvAwrzTbTl2Rk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718136784; c=relaxed/simple; bh=N3W/a4Lfz3f8B3FxigKAG79YiP/qLpQxtg00dXAXt08=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KQRuN3LiftcwDhYCtGm8Yuceb1I+Anw4oBMpy0g5bXLoIno3k6BrZnrsA+Mm2SX7FGYOHo9cF0jZGev4kkBm3iduB4xOkL+iRxUYYBzpaFZcUsV+YAhpAO0KXkrdYN9C3Z7X5E1rvyYQSEOtDaW7UwZs14KljskfQ5/Qx4BjOjs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=APCG1fyL; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=kHAoa/OJkPqP/DFn6fqwfpyDNzhM8R9ekFcSQK7Rigg=; b=APCG1fyLIzuIMJ28F/4ZogT/Ru kOr3vmBpRa6ef0QB73z87iuA6sx5qCC8ZWSfhHYIsu8JkfIB9d4MfJzcOwmxNabgH7S6wAHSqlTNS K0ti0luqp568pq8jnF+i4ZHuu0eYNrUw6XTAirNwFYV6fHECzxtKZk4Rs11j9H9fcICs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sH7rI-00HQBb-VF; Tue, 11 Jun 2024 22:12:44 +0200 Date: Tue, 11 Jun 2024 22:12:44 +0200 From: Andrew Lunn To: Stefan Wahren Cc: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , linux-pci@vger.kernel.org, Dave Ertman , Lizhi Hou , clement.leger@bootlin.com, Jeremy Linton Subject: Re: Raspberry Pi5 - RP1 driver - RFC Message-ID: <73e05c77-6d53-4aae-95ac-415456ff0ae4@lunn.ch> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jun 11, 2024 at 09:05:24PM +0200, Stefan Wahren wrote: > Hi Andrea, > > i added Jeremy, because AFAIK he was deeply involved in ACPI > implementation of the RPi 4. > > Am 11.06.24 um 17:39 schrieb Andrea della Porta: > > Hi, > > I'm on the verge of reworking the RP1 driver from downstream in order for it to be > > in good shape for upstream inclusion. > > RP1 is an MFD chipset that acts as a south-bridge PCIe endpoint sporting a pletora > > of subdevices (i.e. Ethernet, USB host controller, I2C, PWM, etc.) whose registers > > are all reachable starting from an offset from the BAR address. > > The main point here is that while the RP1 as an endpoint itself is discoverable via > > usual PCI enumeraiton, the devices it contains are not discoverable and must be > > declared e.g. via the devicetree. This is an RFC about the correct approach to use > > in integrating the driver and registering the subdevices. > > > I cannot provide much input into the technical discussion, but i would > prefer an approach which works good with DT and ACPI. There is a small and slowly growing interest in using DT overlays on ACPI systems. It makes a lot of sense when you have an already working set of drivers based on DT, and then need to make them work on ACPI systems. The Microchip LAN996x is an ARM SoC with lots of peripherals and an Ethernet switch. There is a full DT description of it and drivers. However, it also has a PCIe interface which allows access to all the peripherals and the Ethernet switch. Bootlin are adding patches to allow any host with a PCIe bus use all the existing drivers and a DT overlay to glue it all together. https://patchwork.kernel.org/project/linux-pci/cover/20240527161450.326615-1-herve.codina@bootlin.com/ ACPI and DT should not be considered mutually exclusive. Andrew