Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp476104pxb; Thu, 24 Mar 2022 00:13:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzj3SJcIEsSB3bI5aRe49X4LGyosRdSi+YniT1d6FFA7QB2n5nUqk5YuDBYCAhXtl6w6u31 X-Received: by 2002:a63:9307:0:b0:373:a700:beaa with SMTP id b7-20020a639307000000b00373a700beaamr3052091pge.260.1648106035869; Thu, 24 Mar 2022 00:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648106035; cv=none; d=google.com; s=arc-20160816; b=XYEI1RhRNpfJsiy54r2ic6i5H3/RMI/7F1tuMybsi278EG1SacxD6mTrf8YyQiLCy/ pQWIAYNb7P4eIDL0Qu/EH2tfD2QbOYA/xptMeeQTagwKFQ/NqbkgpQtHIJswsDwW6aRj 43H/ozEt/meosZBejVGU/RpvQFx9Aiwmh12wFlSgvqTVcpvn2XC3npz9tjzzqnlkIbRC OeNMnrKwlQeVv/hbxe+Hp/ZP8JYFG7lwzjvR8KL3+AYY822+BDAb8x9MtRjdsqVYnHOJ I8nv6IBNxrDOxP+JVxlU/h2EeR3VekQFQ8t/YqHpxGR1oFu7EHTltMJHjBfIe+Jk5aGB rv0A== 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=Xv05aiR4hzSvY3jv3FGf0YL5cIGyfqch5Z4Gz9CQAc0=; b=yVsri8DrJkAN6mzExu4rFeO1gIw5DgzI/UWbgkvNH0mhukniczUcnUAxYBy3VOzK77 CVWXtfyP6Fx11754ArERNtogw77OkCWn0kE5qZ8XFlzab3u+gJow4zhv+lqxO+Gm2N/3 8MgDc3TSSqWywbvPOCsl9OaZyjfu5OApIkex8phL0Chq6dG/ZtgjYHO61Fzw9OD8xz2a N7xyOX4d0csjr7i+NE0YAWTB1gzUHRysg4v+m1tiLZz90K/LtnhybpRR9N5bkDVHeRHw dHNPd0hGXnDiib+JOuU7E6iy6LpT928esHEYzTLwrOAf/oCT+3O7hebkJlBPKOZ5YtSi HYXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UMT61C+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l19-20020a63ea53000000b003827526d429si12624676pgk.267.2022.03.24.00.13.39; Thu, 24 Mar 2022 00:13:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UMT61C+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245386AbiCWQIm (ORCPT + 99 others); Wed, 23 Mar 2022 12:08:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245380AbiCWQIk (ORCPT ); Wed, 23 Mar 2022 12:08:40 -0400 X-Greylist: delayed 22518 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 23 Mar 2022 09:07:08 PDT Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C1097C7A5; Wed, 23 Mar 2022 09:07:08 -0700 (PDT) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 408881BF209; Wed, 23 Mar 2022 16:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1648051627; 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=Xv05aiR4hzSvY3jv3FGf0YL5cIGyfqch5Z4Gz9CQAc0=; b=UMT61C+dM6p9/KXllJb5MLsiz61vMWnXa35kZYuMvcVRWfKSEd2LUr4RDm8WTyzYo83Hp0 +29PZ+fmj1cr5w8krRbEwySxZV7AI5T+au73jXJzzwKehtNuNczW42hFrFUAMkiNn+UVV1 p6xcEtkDG2iCUglRfno5luBq7xObPlafCxX1j46bBC4IGJa4SNv8udPBLEyGyeXRbwsQjV RvsWD9vxLwzal2dzMhFEN0z2izRuveywQXOQBg4p2j4zwTYJDXk0CdZycpDzPpNfgpZr+1 A0rZnruEuez3MfWg80tCSfKzrApItbhH+MYwSxbc7so2bZg0fWoMwbkKlHm/Jg== Date: Wed, 23 Mar 2022 17:05:45 +0100 From: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= To: Philipp Zabel Cc: Rob Herring , Frank Rowand , Thomas Petazzoni , Alexandre Belloni , Allan Nielsen , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 0/2] add fwnode support to reset subsystem Message-ID: <20220323170545.79810f56@fixe.home> In-Reply-To: References: <20220323095022.453708-1-clement.leger@bootlin.com> 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mar 2022 16:07:26 +0100, Philipp Zabel a =C3=A9crit : > Hi Cl=C3=A9ment, >=20 > On Mi, 2022-03-23 at 10:50 +0100, Cl=C3=A9ment L=C3=A9ger wrote: > > This series is part of a larger series which aims at adding fwnode > > support in multiple subsystems [1]. The goal of this series was to > > add support for software node in various subsystem but in a first > > time only the fwnode support had gained consensus and will be added > > to multiple subsystems. =20 >=20 > Could you explain the purpose of this a little? From the referenced > mail it looks like this would be intended allow to register reset > controllers via software node? Are there any real systems where this > would be useful? Hi Philipp and thanks for reviewing this series. As you noticed, the initial goal of the primary series was to add fwnode support in order to allow registering devices with software nodes. Since a lot of subsystem are of-centric, It was needed to modify them to use fwnode and thus accept the use of software nodes. The device I'm trying to support is a PCIe card that uses a lan9662 SoC. This card is meant to be used an ethernet switch with 2 x RJ45 ports and 2 x 10G SFPs. The lan966x SoCs can be used in two different ways: - It can run Linux by itself, on ARM64 cores included in the SoC. This use-case of the lan966x is currently being upstreamed, using a traditional Device Tree representation of the lan996x HW blocks [1] A number of drivers for the different IPs of the SoC have already been merged in upstream Linux. - It can be used as a PCIe endpoint, connected to a separate platform that acts as the PCIe root complex. In this case, all the devices that are embedded on this SoC are exposed through PCIe BARs and the ARM64 cores of the SoC are not used. Since this is a PCIe card, it can be plugged on any platform, of any architecture supporting PCIe. Appart from adding software node support, the fwnode API would also allow to add ACPI support more easily later. >=20 > > For the moment ACPI node support is excluded from the fwnode support > > to avoid creating an unspecified ACPI reset device description. =20 >=20 > Are there any plans or ongoing discussions to specify such a > description in the future? Right now I'm only aware of the ACPI _RST > method as used by this patch: >=20 > [1] https://lore.kernel.org/all/20220307135626.16673-1-kyarlagadda@nvidia= .com/ >=20 On that side, I must say I'm not really competent regarding ACPI which I do not know enough to answer you on that point. The discussions we had with Mark Brown regarding fwnode ACPI support pointed out the fact that we should not create unwanted ACPI support by using the same descriptions/specifications that exists for the device-tree. In order to avoid that, we suggested to explicitely left out ACPI with this fwnode support. This will allow to specify that support later and integrate it in the subsystem that have been converted to fwnode. > > One question raised by this series is that I'm not sure if all reset > > drivers should be modified to use the new fwnode support or keep the > > existing device-tree support. Maintainer advice on that particular > > question will be welcome. =20 >=20 > I would prefer not to have to switch all those small DT-only reset > controller drivers all over the tree from of_node to fwnode. That makes sense. > On the other hand, I think it would be good to avoid the direct of_node > assignment, possibly by letting devm_reset_controller_register() > initialize of_node or fwnode from the device for most cases, and by > adding of_reset_controller_register() and > fwnode_reset_controller_register() variants that take the node as an > argument for the rest. > That could allow to eventually get rid of the of_node pointer. Ok, I see that. Do you want this to be done in this series ? >=20 > For those drivers that provide their own .of_xlate, I'm not sure it > would make sense to force them to use .fwnode_xlate if they don't > already have a reason to use fwnode on their own. No indeed and that's why I added the fwnode_xlate -> of_xlate translation function, this will allow to keep the existing of_xlate support. >=20 > regards > Philipp Regards, --=20 Cl=C3=A9ment L=C3=A9ger, Embedded Linux and Kernel engineer at Bootlin https://bootlin.com