Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1072737pxm; Wed, 23 Feb 2022 17:24:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYlpzR+rE2o7OXEZoL2Pb0bO92a8Osliui3Dn+xjKwBvdX9OHB2JmR2EUmL8yjC68Bn+13 X-Received: by 2002:a17:903:1c8:b0:150:12cd:a02d with SMTP id e8-20020a17090301c800b0015012cda02dmr225006plh.174.1645665859111; Wed, 23 Feb 2022 17:24:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645665859; cv=none; d=google.com; s=arc-20160816; b=F++ekf3at5NCzsjTKW/IkpAzpwm+Thf4mH3gCrBZ6FKfJ+e3mmk38YTBurEybBEqKg HW5zykLPo2DjWB1M2+C5Uhu4Am5nwzX53T1W9cSNRr3m6cDiidXlNVoN9/PNFN0n/6kp 4sC/Ot9hnTQAp4iNK+0DHS/0MBBlALx882GTjJNfpLJ38Gh+aOIywTMo4z99H78mymGb xMvIkV1J2JokR+TCEtJi+hRkuz7xM0SEZoo5cAWjlGMynH3q8Rw7duHEaRtJGa4+h7ri /P4G0/MGlfS1JazfKBqhGTxC/o4QUrpVcrkZX/SKKlgYCCrlFv2eSTT828tuSmTf7zqn 6gVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=SIImQW6Wz47dS7gZcpaHZzfA86jdmHRDoD5Bd/gJF4A=; b=OeJVf+a2iUfOvwRMXQo7q/HSylErtkJlT6tiAqao5BnxzmH/ttSHfdcis//imV+N5e b5ZKKXmk0+4TpIr6UGUrdU1DDgG0J8NrKmTswVTR8g7oW46mMUh+QRDPQn4Xh2Q1Xc5H H242dMPB23mvqgNjDAKVPNoRj5r9hzyxs4XJJxtawammgwPKHqLNPh7iBMBvqZI0+yBA GRBNwAoylwZ9h3TKGMGpdHuyowlMcn7IDy1e9giqP437pWmQVSDxxiPQBuYEues98Tza z7Ev4Z2HIbYJgMjSU6a+ZfXnz/J+gn36gV3oVyhjOn/da1t8ESrN5qntWgcwc+7KXUxY YxEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gIZpZpEm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c22-20020a17090aa61600b001b917aaa14asi3686999pjq.105.2022.02.23.17.24.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 17:24:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gIZpZpEm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B2D5123BDC; Wed, 23 Feb 2022 17:06:33 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242227AbiBWPkk (ORCPT + 99 others); Wed, 23 Feb 2022 10:40:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242225AbiBWPkf (ORCPT ); Wed, 23 Feb 2022 10:40:35 -0500 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4DCCBD896; Wed, 23 Feb 2022 07:40:04 -0800 (PST) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 89B7AC000D; Wed, 23 Feb 2022 15:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1645630803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SIImQW6Wz47dS7gZcpaHZzfA86jdmHRDoD5Bd/gJF4A=; b=gIZpZpEmH+0XGOppwuovDbnnlfAWy1UVi32GSrfrYn2T5xalCQSYQpt2C/uYQndCGPW1tJ Ey5mcCnRKG2xmE+pWETCoASGM5HM4b+qHYOoJsB+tTwUR2Me2c4X1pr+yppYT3fKQxbQZG pPsuhvBc265xwJAsP67JAxzPCL2KPQM888flzeJVgcFUUro8RvceNHNN3QF+INkrKoMG4n /0Ig84edaifDW0zLIzhZvQkAslUVbaXM4QjvMXftQWUb5Mkh8qfiajkjoeLUrmTLM8xbc2 1FzHNY997E409FvkDhcovNNg9Te5W7HpxPmquj2xe59uR75XSV5mt0QkTCVOoQ== Date: Wed, 23 Feb 2022 16:38:40 +0100 From: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= To: Andrew Lunn Cc: Hans de Goede , "Russell King (Oracle)" , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J . Wysocki" , Wolfram Sang , Peter Rosin , Heiner Kallweit , "David S . Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-i2c@vger.kernel.org, netdev@vger.kernel.org, Thomas Petazzoni , Alexandre Belloni Subject: Re: [RFC 10/10] net: sfp: add support for fwnode Message-ID: <20220223163840.444f84fd@fixe.home> In-Reply-To: References: <20220221162652.103834-1-clement.leger@bootlin.com> <20220221162652.103834-11-clement.leger@bootlin.com> <20220222142513.026ad98c@fixe.home> <888f9f1a-ca5a-1250-1423-6c012ec773e2@redhat.com> <4d611fe8-b82a-1709-507a-56be94263688@redhat.com> <20220223151436.4798e5ad@fixe.home> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le Wed, 23 Feb 2022 16:23:46 +0100, Andrew Lunn a =C3=A9crit : > > As Russell asked, I'm also really interested if someone has a solution > > to reuse device-tree description (overlays ?) to describe such > > hardware. However, the fact that CONFIG_OF isn't enabled on x86 config > > seems a bit complicated on this side. =20 >=20 > It does work, intel even used it for one of there tiny x86 SoCs. Maybe > it was Newton? If you search around you can find maybe a Linux > Plumbers presentation about DT and x86. Oh yes, I know it works and I tried loading an overlay using CONFIG_OF on a x86. Currently it does not works and generate a oops due to the fact that the lack of "/" node is not handled and that the error path has probably not been thoroughly tested. Adress remapping for PCI and lack of PCI bus description might also be a bit cumbersome but maybe this is the way to go. I was saying a "bit complicated" as it is not often used and it would require enabling CONFIG_OF to support this feature as well as allowing loading overlays without any root node. But this is probably something that is also achievable. >=20 > You can probably use a udev rule, triggered by the PCIe device ID to > load the DT overlay. Or maybe load the overlay from the PCIe driver ? This would also allow to introduce some remapping of addresses (see below) inside the driver maybe. >=20 > Do you actually need anything from the host other than PCIe? It sounds > like this card is pretty self contained, so you won't need phandles > pointing to the host i2c bus, or the hosts GPIOs? You only need > phandles to your own i2c bus, your own GPIOs? That will make the > overlay much simpler. Yes, the device is almost self contained, only the IRQ needs to be chained with the MSI. >=20 > Andrew --=20 Cl=C3=A9ment L=C3=A9ger, Embedded Linux and Kernel engineer at Bootlin https://bootlin.com