Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1286238rdb; Sat, 23 Dec 2023 00:36:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBbwoi/fTLvEp0SvUpIYcsgj+JUo5Pk165i3KMnLwmaSK9bi1uckqBu3yLQnS3P31WBvUY X-Received: by 2002:aa7:88d1:0:b0:6d8:6032:a73d with SMTP id k17-20020aa788d1000000b006d86032a73dmr3324868pff.52.1703320603798; Sat, 23 Dec 2023 00:36:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703320603; cv=none; d=google.com; s=arc-20160816; b=NiccHsD+vmWZ7XYGuvY/6XrZc1HTSweLclylgIuL1yiWZMPsFUAuIf1K/o3V8+1VX5 196xGKcda+iS0nuilqtu/YOYYxrB+5T3CW/TG2+AMoxpnbcrTy0vC4qbW7FPyE5FmSPk Ee3f2R18gdSRavhPX1qeRGnyGY06T050u5vLFan+PFsOqwcwn/ygdj3KLgH9/xWctZPW JsqeF8//TNZtT1rtyQKWF9AsGfKsPCdlmCGaQFcLt2t9/bhOYVzu31YJdlOQ9bd8x4ID Q0hYBj0QJi4h9sJOA6RzvtSXUalGM0t5QC2GlQ64EX51HZOk76ET6Biyeo4qmiVZdbSn INig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=14qRNntJCGM4WoXqmyRnVK1c8/fHAyp08Wei+brD2IQ=; fh=GIj4IfhPyZQxXXW6jmj24V6o/aD/Y91rTdDKQ5rlHRU=; b=LqtryK+DRZBVsX00C0fZO3XFw8g1JAvb/HvsPmH3KFXxsRZ97ZlnF2JixLMAQ5dEpP yv4rSUKtFEukjNMaObQ814XrTb2FlukO89tgqwbRGejBzM99Cne+tA+Lj+rv4GjRfYvg gTtcAruJtzXJaipSKI3KEZ6jVbYmD42j2AUzMAgU6wPv7gbwKZNhxJIFawdfK29ne+mh wEalA04q88XhucphnKQxe6hm1SWkQzJmLtq/c4oCkduM2ngYS1hMI3us/BospT+Jgj5B p7RilDE9g8QjNDqh835oLkuCUn0mMZ4+xOHUMDbWqco8gkGWQ5U6SfrtYE7XL7SQrM3w KikQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10348-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10348-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u30-20020a056a00099e00b006d591245201si4718593pfg.342.2023.12.23.00.36.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 00:36:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10348-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10348-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10348-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 73590284770 for ; Sat, 23 Dec 2023 08:36:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D0608F4E; Sat, 23 Dec 2023 08:36:36 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from bmailout3.hostsharing.net (bmailout3.hostsharing.net [176.9.242.62]) (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 1647F8BEA; Sat, 23 Dec 2023 08:36:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=h08.hostsharing.net Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 19E69100D9414; Sat, 23 Dec 2023 09:36:24 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id DBDE35119; Sat, 23 Dec 2023 09:36:23 +0100 (CET) Date: Sat, 23 Dec 2023 09:36:23 +0100 From: Lukas Wunner To: Patrick Williams Cc: Howard Chiu , robh+dt@kernel.org, joel@jms.id.au, andrew@aj.id.au, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, potin.lai@quantatw.com, Howard Chiu , linux-integrity@vger.kernel.org Subject: Re: [PATCH v8] ARM: dts: aspeed: Adding Facebook Bletchley BMC Message-ID: <20231223083623.GA17734@wunner.de> References: <20231220080733.GA30641@wunner.de> <20231220170012.GA10387@wunner.de> 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: User-Agent: Mutt/1.10.1 (2018-07-13) On Fri, Dec 22, 2023 at 04:38:12PM -0600, Patrick Williams wrote: > On Wed, Dec 20, 2023 at 06:00:12PM +0100, Lukas Wunner wrote: > > If chips are dual-sourced or triple-sourced, as you say, and they > > behave identically, then I think it is fine to specify all of their > > compatible strings plus the generic compatible. > > This has explicitly been rejected before; having multiple incompatible > chips listed in the same compatible. I've tried to search lore but I > can't find a reference unfortunately. I'll let devicetree maintainers comment on that. > Furthermore, what you're suggesting does not jive with what is in the > devicetree binding documentation for tpm_tis-spi [2]: > > - compatible: should be **one** of the following (emphasis mine) That's superseded by: https://lore.kernel.org/all/cover.1702806810.git.lukas@wunner.de/ I don't really have a dog in this fight, I merely stepped up to convert TPM DT bindings to YAML. There have been multiple attempts to convert them in the past but none of them have been pursued into mainline. I looked at compatible string usage in arch/arm{,64}/boot/dts and was under the impression that the majority of devicetrees use a combo matching this pattern: "vendor,chip", "tcg,tpm[_-]tis-{spi,i2c,mmio}" So that's what I went for in the conversion. It would be inconsistent to enforce a generic compatible for i2c and mmio, but not for spi. I ran the validator against all arm/arm64 devicetrees and there are four devicetrees which only use a generic compatible and not a "vendor,chip" compatible: arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-bletchley.dts arch/arm/boot/dts/ast2600-facebook-netbmc-common.dtsi arch/arm/boot/dts/aspeed-bmc-facebook-wedge400.dts arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi So, three Aspeed Facebook and one Moxa. There's a fifth case (phyTEC) but the devicetree author clarified it's an Infineon SLB9670. The authors of the other four devicetrees listed above did not respond. Patches to fix up schema violations are here: https://github.com/l1k/linux/commit/7813a455ed15393df7d9d353173635b98ae23387 https://github.com/l1k/linux/commit/a958be44952b1de170100be1007780a72ce7d861 > As I said, > these are pluggable modules and not simply second-source builds. There > are a collection of modules that can all be plugged into the same header. > They might not even be shipped with the device... If those TPM modules might not even be plugged in or are interchangeable, I think they ought to be represented as DT overlays. Honestly I'm wondering how common the scenario you're describing is. If it's an edge case, it might not be worth holding up the YAML conversion because of it. The missing YAML conversion is a constant cause of pain for a lot of people. Thanks, Lukas