Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp117896ybj; Wed, 6 May 2020 12:59:58 -0700 (PDT) X-Google-Smtp-Source: APiQypICod4VDe0ad9WtAhZvDFdACuQTmvBXV6qJ/jmbE9xTBLKGgb5G/5e9l47I+5UG7Mdm79NW X-Received: by 2002:a17:906:400a:: with SMTP id v10mr8731412ejj.300.1588795198242; Wed, 06 May 2020 12:59:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588795198; cv=none; d=google.com; s=arc-20160816; b=lUi9qXWXFzC7q9wLiH+6NOo25VBIFcCLcm5jKNVfaQnc67Kaux74TqVGMEFniGETay tu9AJ+AI3HbChMX4Q99fWztevco2/IhkFXsLuierRMS3eSAq4levWmd+0PhE+dvVvTTM q9lAiMQZ/P7TxXrostDkNKHUbGLLrThnnQymVpoP1LVjO5s/5pjXYSPtSTmqgP8Co5sb wQmZqpwSJ7VPoVl5NDCoKvUL4owKe0uDXNGpRiEOYZ5rdI5OYAhDmYZhGrHO/Bf14rkL mWGPsJNeQ6uMjtiSG2VOfqRtqaLMSEcxYLrnnR6bD2Io4j4aAhi5gwBWqZ3OSsfjeWcF 6wxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Yqg0FR03ICsngX2rB2sb2xuYkFg82NaW1zU2YIloR8Y=; b=ZtNkvHQ1RhxZrfjcZ26DHyc0hSF+GtDKFQin8tU/fBfsbm2KzQWEp/qFcxGgkLRlAE QCxgUl3JQaYMBNrfY2drI+74SW9ouAq15Z86sXD2IC9bpYaADXG5Jx69mY4y4Pevdbdr 3xj1n5lmxlUwaadeFtIQ3++kc1ceQ7VWWScroWaoio26XPjd/XZvhLcM53cXN3sx+ioF Nr9oRJ0tSA5rbtPlrYBu8yLDGU/jUxDm+DtdsVnpIK1CNIGWhi+03UxxfV44//Ncr+7j qrfpIonVjNCrJBoKjGxOSOXzssY7HQvJAmq2ubkACDGIJZZ/naB1VnDcoBp8UB2Ky9Et ioSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bflTPGqs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ld23si1725323ejb.242.2020.05.06.12.59.34; Wed, 06 May 2020 12:59:58 -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; dkim=pass header.i=@kernel.org header.s=default header.b=bflTPGqs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727777AbgEFTDL (ORCPT + 99 others); Wed, 6 May 2020 15:03:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:60740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbgEFTDK (ORCPT ); Wed, 6 May 2020 15:03:10 -0400 Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2539520A8B; Wed, 6 May 2020 19:03:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588791790; bh=Yqg0FR03ICsngX2rB2sb2xuYkFg82NaW1zU2YIloR8Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bflTPGqsgd+C46NDp/kwSeS28/ILDYVhFL2jv6BZuKjpMUR/ktwXLjhxxhqV4DNxw BdV11rDjdoML/1GZLEggZCBW3Rv5+aD1y+3mF+n45ozmDuANoOdC0IriusDb27jvo9 q1hg6eJ4AJRQ26qvWHRcDAwDx1PTrIFvQ0txMZVk= Received: by mail-ot1-f43.google.com with SMTP id i27so2269092ota.7; Wed, 06 May 2020 12:03:10 -0700 (PDT) X-Gm-Message-State: AGi0PuZEh5UQxYharW/JZCj4jfLCggDzrUz/geGqhTsr1EzUkIr8Vxo1 KmI4Uxy3tiSQbG9DLSvOB1Gbilms3QdG7gAbiQ== X-Received: by 2002:a9d:1441:: with SMTP id h59mr7763912oth.192.1588791789287; Wed, 06 May 2020 12:03:09 -0700 (PDT) MIME-Version: 1.0 References: <20200427124931.115697-1-amirmizi6@gmail.com> <20200427124931.115697-7-amirmizi6@gmail.com> <20200505161226.GA555@bogus> In-Reply-To: From: Rob Herring Date: Wed, 6 May 2020 14:02:57 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 6/7] tpm: Add YAML schema for TPM TIS I2C options To: Amir Mizinski Cc: Eyal.Cohen@nuvoton.com, Jarkko Sakkinen , Oshri Alkobi , Alexander Steffen , Mark Rutland , Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , benoit.houyere@st.com, Eddie James , Joel Stanley , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , linux-integrity@vger.kernel.org, IS20 Oshri Alkoby , Tomer Maimon , gcwilson@us.ibm.com, kgoldman@us.ibm.com, IS30 Dan Morav , oren.tanami@nuvoton.com, shmulik.hager@nuvoton.com, amir.mizinski@nuvoton.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 6, 2020 at 10:20 AM Amir Mizinski wrote: > > > On 2020-05-05 16:12, Rob Herring wrote: > > On Mon, Apr 27, 2020 at 03:49:30PM +0300, amirmizi6@gmail.com wrote: > >> From: Amir Mizinski > >> > >> Added a YAML schema to support tpm tis i2c related dt-bindings for the I2c > >> PTP based physical layer. > >> > >> This patch adds the documentation for corresponding device tree bindings of > >> I2C based Physical TPM. > >> Refer to the 'I2C Interface Definition' section in > >> 'TCG PC Client PlatformTPMProfile(PTP) Specification' publication > >> for specification. > > > > Again, DT bindings describe h/w devices, not just a protocol. A device > > is more than just a protocol interface. There's clocks, power rails, > > resets, interrupts, firmware, etc. > > > > Unless there's something special about TPM chips that makes none of this > > applicable and no chip will ever have any quirks (or extensions) in > > their protocol to work-around, then you need compatible string(s) that > > are specific to the TPM chip. You can have tcg,tpm-tis-i2c as a > > fallback, but you need specific compatible to handle any quirks. > > > > Rob > > Hello Rob, currently yes. All TPM chip are implemented according to the TGC specs and should use the same properties for this I2C driver. > I can't say for sure that it will be the case in the future. Exactly. That's the issue. If you have just "tcg,tpm-tis-i2c" and need to handle some difference in the future, then you can't without updating the DT. You must be able to handle future issues without updating the DT. > Shouldn't we use the standard "tcg,tpm-tis-i2c" compatible, and if a specific TPM chip will deviate from the specs, the vendor should add an additional compatible string for it? Name something where multiple vendors have implemented a spec and there's no deviation. It simply doesn't exist. How would you know? Does the TPM spec define all the things I listed above outside of just the I2C protocol? Also, what version of the spec is "tcg,tpm-tis-i2c"? Few specs have only 1 version. Rob