From patchwork Fri Jun 12 15:17:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Thomsen X-Patchwork-Id: 1308348 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ixY+TKhU; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49k49H1hFSz9sSS for ; Sat, 13 Jun 2020 01:17:55 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 56362819B7; Fri, 12 Jun 2020 17:17:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ixY+TKhU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DBE2181C80; Fri, 12 Jun 2020 17:17:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 07320819B7 for ; Fri, 12 Jun 2020 17:17:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bruno.thomsen@gmail.com Received: by mail-ej1-x641.google.com with SMTP id l27so10496495ejc.1 for ; Fri, 12 Jun 2020 08:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DkvdNnO0SVl7+nI5HCY27e8rQl57zeOlhmXMdiDbszU=; b=ixY+TKhU8nv7Qys9VGfXYNhJE6u6VChMwC+olzltv1KaO4iLkU16Zle890cZTFozyP J39QNiYFMG8flSrKnu+99ZlItTTndPTDeHusnQHjpBvMQ0eKQ0cDYgmCJi9bbLt/gc9s OS9tkzIUzu5UOH+U6TWpfJgn4FSJq74BeE8KcFg62raEyt4jjB+GuhDLHHjkxfgCkmdt RMlFwSYo2ujQlVHEHaoePa+efeGxOl0SdPTdRWLjJQ45tncS7G+6dAbIPrGsxVKHOcbI SdOYfCD+PQJIb7vOp+U1j+OzaKcsKAOSDmQD5eSmNiEPYFB53+DqyoNWjRyr4At4meQF URmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DkvdNnO0SVl7+nI5HCY27e8rQl57zeOlhmXMdiDbszU=; b=OvCHihrrjgIgOzNyC1lERs6F/4P9hubuNwVS+fD8FSU+FL/uyAvrOcTvfOSB+rEam6 S5I3W2R/Yj+wKTHsCQf7k1A66usHTAoypLzKbtCADVHIwadCe2z036om0P1pbsB7YJaX K5dnGVAIX4jl4V3CSpEEW85vQlruI/47G01p2yCdCeOIT+bU9p+1k4Gz7u/q4tQDBqi1 6u199z7BIqXVwG29sKukzWiSKJFDMa41PYQo4U2unsDxR2IKUTvSMUT0jtJBgSvR/1wX is2hi7YJfEj1pI4v1enKT7s+NgiqnIVHxZszo6sRuN6XHe/CtOgPnj3OZPixwsHWC/aH tSag== X-Gm-Message-State: AOAM531bTLyaWlcjkEEgkH0eVOPa6D4oyO77zlsfZ95eHpeVv6vCmhMZ OtB0o0FSuL7BECLrovLo0EvS8oCpYgg= X-Google-Smtp-Source: ABdhPJwnPc4RxsWWRWTYth34RgfIID6FX3bXAXZSUwR241RA/zI+yApZZAzULe/0pmRbHXBJuQHCLg== X-Received: by 2002:a17:906:1c4a:: with SMTP id l10mr12838322ejg.499.1591975064376; Fri, 12 Jun 2020 08:17:44 -0700 (PDT) Received: from xps13.lan (3e6b1cc1.rev.stofanet.dk. [62.107.28.193]) by smtp.googlemail.com with ESMTPSA id i15sm3302403edy.80.2020.06.12.08.17.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 08:17:43 -0700 (PDT) From: Bruno Thomsen To: u-boot@lists.denx.de Cc: Tom Rini , bth@kamstrup.com, Bruno Thomsen , Simon Glass , Kayla Theil , Roman Kapl , Bin Meng Subject: [PATCH v2] tpm2: tis_spi: add linux compatible fallback string Date: Fri, 12 Jun 2020 17:17:33 +0200 Message-Id: <20200612151733.14364-1-bruno.thomsen@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This solves a compatibility issue with Linux device trees that contain TPMv2.x hardware. So it's easier to import DTS from upstream kernel when migrating board init from C code to DTS. The issue is that fallback binding is different between Linux and u-Boot. Linux: "tcg,tpm_tis-spi" U-Boot: "tis,tpm2-spi" As there are currently no in-tree users of the U-Boot binding, it makes sense to use Linux fallback binding. Signed-off-by: Bruno Thomsen Reviewed-by: Tom Rini --- v2: Only use Linux compatible fallback binding. --- doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt | 4 ++-- drivers/tpm/tpm2_tis_spi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt b/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt index b48a15112d..3a2ee4bd17 100644 --- a/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt +++ b/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt @@ -2,7 +2,7 @@ ST33TPHF20 SPI TPMv2.0 bindings ------------------------------- Required properties: -- compatible : Should be "tis,tpm2-spi" +- compatible : Should be "tcg,tpm_tis-spi" - reg : SPI Chip select Optional properties: @@ -12,7 +12,7 @@ Optional properties: Example: tpm@1 { - compatible = "tis,tpm2-spi"; + compatible = "tcg,tpm_tis-spi"; reg = <1>; spi-max-frequency = <10000000>; }; diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c index 36016de4a6..9a8145e6ba 100644 --- a/drivers/tpm/tpm2_tis_spi.c +++ b/drivers/tpm/tpm2_tis_spi.c @@ -676,7 +676,7 @@ static const struct tpm_tis_chip_data tpm_tis_std_chip_data = { static const struct udevice_id tpm_tis_spi_ids[] = { { - .compatible = "tis,tpm2-spi", + .compatible = "tcg,tpm_tis-spi", .data = (ulong)&tpm_tis_std_chip_data, }, { }