From patchwork Wed Jul 8 13:14:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 235108 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp431560ilg; Wed, 8 Jul 2020 06:15:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaAnb6wb70RO066aDYIi1MXvyKu3ioT3RZNPehWxKz/cV07rSM9rlAK6LG82957uLLuSNV X-Received: by 2002:a17:906:ca0e:: with SMTP id jt14mr50628348ejb.325.1594214126581; Wed, 08 Jul 2020 06:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594214126; cv=none; d=google.com; s=arc-20160816; b=LuaIU36sEG4yVk6f8M2WJglrayrugDlc03B2GMAGP3cRdG9FBzl5PxC7wMwevq/u9u p98rbt0tmbkqL9+hi0y4IfMS18Xn6IJMG2dVGECVletG+ot8mabPKrv4w44gHjqY0zCx w7nhGY7jetqkX6iVfWUGsjcMSLwK2M2jxIat2gvQ3IhiXco6jb/NMQoQyaBGKVo7lKTT i0lasolZu/YV8BfsEtHatW3w8GtsGmc5WhhFgG8Iym2gABOb4D+s+x9LReYoWzRcuibn yMFwRZsJejCP77HQFZae5akVweaTgRsVYtndAI6O0Z2GiPc0CsSdUIkIL7eY34IIBQ0O 1Stg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xeH6T0xnzW7jFBhFc0hgdvqYTZU942iahhJCQgsP6LI=; b=fm23HKwVUhNNTnjYlkuUC/fgZLBaqxsuRQTL6DNx1zAtZLhM0wW5B4BfrtlnW2LYm9 9tEc9A+BFHsmq/6/CBmDWbAdkSBinbF6OBQJDRc1XEE7lqueUGfd4aYGWsJLlgjw5lPJ ntcFUh2tGyg++ZYF8EFwrLvzXPCJtzRhFsUvacuFpa4lbkBx6MZ6PiFFZ3HFFwAGNfOn g1mCpBwE2iqxfbVqluqjcRd5f4pKqFybgEOZig9W9FbQiTyPEUFRl9eV7RDUZUasNpx0 FlK2djsnX/IVJNRRBvU12uhrI4Z5W+hEPF3Of42axvju5uA9VYMNJjFU/v++KfTJkoBS FFYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="f3XM/bkl"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jr3si17352023ejb.484.2020.07.08.06.15.26; Wed, 08 Jul 2020 06:15:26 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=@linaro.org header.s=google header.b="f3XM/bkl"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729428AbgGHNPZ (ORCPT + 6 others); Wed, 8 Jul 2020 09:15:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729145AbgGHNPZ (ORCPT ); Wed, 8 Jul 2020 09:15:25 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EA35C08E6DC for ; Wed, 8 Jul 2020 06:15:25 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id j19so14793675pgm.11 for ; Wed, 08 Jul 2020 06:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xeH6T0xnzW7jFBhFc0hgdvqYTZU942iahhJCQgsP6LI=; b=f3XM/bklDRHyh0jy9YOqLyIbbuDKBYLnr2E0gAbFagx8W98n2v9PhOLaEJjKs0zAbv I65JFuaNwWJXKh+8I9BJNN5r5ISCUxQJ47Gx4bC4jhyayyOKvbEU6bwyXlvmof3by78m xnYlbSg2l0oD/4hvCXZ+62boL1Tan34ZWIVDuxc1Du66YvmgigTPoKMUTlgqxIYnP38P PJQTw7Dz3fHvoMzc3+vAvdTxq0ZW70dWQGeQ9+FoblFV23A74Pfc3eNI8ezgBH0SIN37 KsvNzj4eO1qCNvVLARdw9ikchN4/Kbsv3EwMBYUENuRjOcZVXn3FUKdXyh36NYZON/z7 fOUQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=xeH6T0xnzW7jFBhFc0hgdvqYTZU942iahhJCQgsP6LI=; b=Ceh+GWRVzQUz2H7s5AKuYVGCEqLOQy40wuqlP066q9p7D2nTxbycKmKQXCnWd0S2iP E4g6cb7gMYobFq0CMyG1Uk22sqwXRc4XE8K7yA4GPEX36pprFjL3JNsI6MNTG3e0PMMV mMh4I0nLsWLcdB7HQdDdr1F6dyIpxrRgVMkZ1N5Z4i6JFluBNsLSRmeqU7jnPjwJ/xWe VYkv6FF69nFBVDVClbgeH31atvTylMeVvdB5E21bUBM8XCKdM6q5S/MJgtbQl2LOQcoh ZtsSuysyIMjt/z7bSsfa5IDLMm60sBalv4FIXauxxRjHCUdfFdMuTOvrptZbO9FyHXce LkIQ== X-Gm-Message-State: AOAM532uput7qdEir0MyD702ckd627BCTYIflOAkdvuWZ6hdahc40fJy FPl/1aJI2oPIlkgJJC1gtJf/zA== X-Received: by 2002:a05:6a00:845:: with SMTP id q5mr38208443pfk.247.1594214124566; Wed, 08 Jul 2020 06:15:24 -0700 (PDT) Received: from debian.flets-east.jp ([2400:2411:502:a100:c84b:19e2:9b53:48bb]) by smtp.gmail.com with ESMTPSA id y63sm4096366pgb.49.2020.07.08.06.15.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2020 06:15:23 -0700 (PDT) From: Masahisa Kojima To: linux-kernel@vger.kernel.org Cc: masahisa.kojima@linaro.org, jarkko.sakkinen@linux.intel.com, linux-arm-kernel@lists.infradead.org, ardb@kernel.org, devicetree@vger.kernel.org, linux-integrity@vger.kernel.org, peterhuewe@gmx.de, jgg@ziepe.ca Subject: [PATCH v3 1/2] tpm: tis: add support for MMIO TPM on SynQuacer Date: Wed, 8 Jul 2020 22:14:23 +0900 Message-Id: <20200708131424.18729-2-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200708131424.18729-1-masahisa.kojima@linaro.org> References: <20200708131424.18729-1-masahisa.kojima@linaro.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org When fitted, the SynQuacer platform exposes its SPI TPM via a MMIO window that is backed by the SPI command sequencer in the SPI bus controller. This arrangement has the limitation that only byte size accesses are supported, and so we'll need to provide a separate module that take this into account. Signed-off-by: Ard Biesheuvel Signed-off-by: Masahisa Kojima --- drivers/char/tpm/Kconfig | 12 ++ drivers/char/tpm/Makefile | 1 + drivers/char/tpm/tpm_tis_synquacer.c | 196 +++++++++++++++++++++++++++ 3 files changed, 209 insertions(+) create mode 100644 drivers/char/tpm/tpm_tis_synquacer.c -- 2.20.1 diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig index 58b4c573d176..a18c314da211 100644 --- a/drivers/char/tpm/Kconfig +++ b/drivers/char/tpm/Kconfig @@ -74,6 +74,18 @@ config TCG_TIS_SPI_CR50 If you have a H1 secure module running Cr50 firmware on SPI bus, say Yes and it will be accessible from within Linux. +config TCG_TIS_SYNQUACER + tristate "TPM Interface Specification 1.2 Interface / TPM 2.0 FIFO Interface (MMIO - SynQuacer)" + depends on ARCH_SYNQUACER + select TCG_TIS_CORE + help + If you have a TPM security chip that is compliant with the + TCG TIS 1.2 TPM specification (TPM1.2) or the TCG PTP FIFO + specification (TPM2.0) say Yes and it will be accessible from + within Linux on Socionext SynQuacer platform. + To compile this driver as a module, choose M here; + the module will be called tpm_tis_synquacer. + config TCG_TIS_I2C_ATMEL tristate "TPM Interface Specification 1.2 Interface (I2C - Atmel)" depends on I2C diff --git a/drivers/char/tpm/Makefile b/drivers/char/tpm/Makefile index 9567e5197f74..84db4fb3a9c9 100644 --- a/drivers/char/tpm/Makefile +++ b/drivers/char/tpm/Makefile @@ -21,6 +21,7 @@ tpm-$(CONFIG_EFI) += eventlog/efi.o tpm-$(CONFIG_OF) += eventlog/of.o obj-$(CONFIG_TCG_TIS_CORE) += tpm_tis_core.o obj-$(CONFIG_TCG_TIS) += tpm_tis.o +obj-$(CONFIG_TCG_TIS_SYNQUACER) += tpm_tis_synquacer.o obj-$(CONFIG_TCG_TIS_SPI) += tpm_tis_spi.o tpm_tis_spi-y := tpm_tis_spi_main.o diff --git a/drivers/char/tpm/tpm_tis_synquacer.c b/drivers/char/tpm/tpm_tis_synquacer.c new file mode 100644 index 000000000000..51f0aedcedcc --- /dev/null +++ b/drivers/char/tpm/tpm_tis_synquacer.c @@ -0,0 +1,196 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2020 Linaro Ltd. + * + * This device driver implements MMIO TPM on SynQuacer Platform. + */ +#include +#include +#include +#include +#include +#include +#include "tpm.h" +#include "tpm_tis_core.h" + +struct tpm_info { + struct resource res; + /* irq > 0 means: use irq $irq; + * irq = 0 means: autoprobe for an irq; + * irq = -1 means: no irq support + */ + int irq; +}; + +struct tpm_tis_tcg_phy { + struct tpm_tis_data priv; + void __iomem *iobase; +}; + +static inline struct tpm_tis_tcg_phy *to_tpm_tis_tcg_phy(struct tpm_tis_data *data) +{ + return container_of(data, struct tpm_tis_tcg_phy, priv); +} + +static int tpm_tcg_read_bytes(struct tpm_tis_data *data, u32 addr, u16 len, + u8 *result) +{ + struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data); + + while (len--) + *result++ = ioread8(phy->iobase + addr); + + return 0; +} + +static int tpm_tcg_write_bytes(struct tpm_tis_data *data, u32 addr, u16 len, + const u8 *value) +{ + struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data); + + while (len--) + iowrite8(*value++, phy->iobase + addr); + + return 0; +} + +static int tpm_tcg_read16_bw(struct tpm_tis_data *data, u32 addr, u16 *result) +{ + struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data); + + /* + * Due to the limitation of SPI controller on SynQuacer, + * 16/32 bits access must be done in byte-wise and descending order. + */ + *result = (ioread8(phy->iobase + addr + 1) << 8) | + (ioread8(phy->iobase + addr)); + + return 0; +} + +static int tpm_tcg_read32_bw(struct tpm_tis_data *data, u32 addr, u32 *result) +{ + struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data); + + /* + * Due to the limitation of SPI controller on SynQuacer, + * 16/32 bits access must be done in byte-wise and descending order. + */ + *result = (ioread8(phy->iobase + addr + 3) << 24) | + (ioread8(phy->iobase + addr + 2) << 16) | + (ioread8(phy->iobase + addr + 1) << 8) | + (ioread8(phy->iobase + addr)); + + return 0; +} + +static int tpm_tcg_write32_bw(struct tpm_tis_data *data, u32 addr, u32 value) +{ + struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data); + + /* + * Due to the limitation of SPI controller on SynQuacer, + * 16/32 bits access must be done in byte-wise and descending order. + */ + iowrite8(value >> 24, phy->iobase + addr + 3); + iowrite8(value >> 16, phy->iobase + addr + 2); + iowrite8(value >> 8, phy->iobase + addr + 1); + iowrite8(value, phy->iobase + addr); + + return 0; +} + +static const struct tpm_tis_phy_ops tpm_tcg_bw = { + .read_bytes = tpm_tcg_read_bytes, + .write_bytes = tpm_tcg_write_bytes, + .read16 = tpm_tcg_read16_bw, + .read32 = tpm_tcg_read32_bw, + .write32 = tpm_tcg_write32_bw, +}; + +static int tpm_tis_synquacer_init(struct device *dev, struct tpm_info *tpm_info) +{ + struct tpm_tis_tcg_phy *phy; + int irq = -1; + + phy = devm_kzalloc(dev, sizeof(struct tpm_tis_tcg_phy), GFP_KERNEL); + if (phy == NULL) + return -ENOMEM; + + phy->iobase = devm_ioremap_resource(dev, &tpm_info->res); + if (IS_ERR(phy->iobase)) + return PTR_ERR(phy->iobase); + + return tpm_tis_core_init(dev, &phy->priv, irq, &tpm_tcg_bw, + ACPI_HANDLE(dev)); +} + +static SIMPLE_DEV_PM_OPS(tpm_tis_synquacer_pm, tpm_pm_suspend, tpm_tis_resume); + +static int tpm_tis_synquacer_probe(struct platform_device *pdev) +{ + struct tpm_info tpm_info = {}; + struct resource *res; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (res == NULL) { + dev_err(&pdev->dev, "no memory resource defined\n"); + return -ENODEV; + } + tpm_info.res = *res; + + tpm_info.irq = -1; + + return tpm_tis_synquacer_init(&pdev->dev, &tpm_info); +} + +static int tpm_tis_synquacer_remove(struct platform_device *pdev) +{ + struct tpm_chip *chip = dev_get_drvdata(&pdev->dev); + + tpm_chip_unregister(chip); + tpm_tis_remove(chip); + + return 0; +} + +#ifdef CONFIG_OF +static const struct of_device_id tis_synquacer_of_platform_match[] = { + {.compatible = "socionext,synquacer-tpm-mmio"}, + {}, +}; +MODULE_DEVICE_TABLE(of, tis_synquacer_of_platform_match); +#endif + +static struct platform_driver tis_synquacer_drv = { + .probe = tpm_tis_synquacer_probe, + .remove = tpm_tis_synquacer_remove, + .driver = { + .name = "tpm_tis_synquacer", + .pm = &tpm_tis_synquacer_pm, + .of_match_table = of_match_ptr(tis_synquacer_of_platform_match), + }, +}; + +static int __init init_tis_synquacer(void) +{ + int rc; + + rc = platform_driver_register(&tis_synquacer_drv); + if (rc) + return rc; + + return 0; +} + +static void __exit cleanup_tis_synquacer(void) +{ + platform_driver_unregister(&tis_synquacer_drv); +} + +module_init(init_tis_synquacer); +module_exit(cleanup_tis_synquacer); +MODULE_AUTHOR("Masahisa Kojima (masahisa.kojima@linaro.org)"); +MODULE_DESCRIPTION("TPM MMIO Driver for Socionext SynQuacer platform"); +MODULE_VERSION("2.0"); +MODULE_LICENSE("GPL"); From patchwork Wed Jul 8 13:14:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 235109 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp431714ilg; Wed, 8 Jul 2020 06:15:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz29cQh2zJ1FUl3zj0bTELTwOBjIO/okpQxjxJaAY6ikj7myO7QoD411asR5qkzsdhH+rn7 X-Received: by 2002:aa7:c3d7:: with SMTP id l23mr58075769edr.18.1594214134882; Wed, 08 Jul 2020 06:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594214134; cv=none; d=google.com; s=arc-20160816; b=tla1gtDlB3on+Q3r9QDdb6G6OLpnunjSG2fYYH2gOWYb7Pzq8l6hMowC99zgetMBAl sEGWcwVk9JpMKyHyK3+5qlVNV63xMImiekXDXNgY6WowcxaPJy1T5EGKs5p84I9znf9x UWWoxtG8hbuz4QOBGdqrcWM/bzfot3aSQoYAC7B5iPgNKdzbG16GJHpCv7qY/tzlwg1p 0sz7ZWoHXdugrG26ojuhqWeNRItMehJoPQZvVrfvberPSPrSZvdbAm+XlfPDTB8qMS8s R8rQ+bOP/s9YekeInEBjeG1Kku8DjrXht/HkJm42sqUN7nD+gHJ4g6Jx8PsvcXbzXj3C rGFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TkaB98nQDQAZj54VpdleIAAukarhv3l749JNi1B5PxQ=; b=El5S0rOKAZxYgeugilM6M1jjIIF9ixkGfrSCCjP42TPYDLXJdz0t6hk87ao3jC0vTO L9UDuTIX/2r8+2SlVFG/alyRAlAN7lQBhlfamiQm7O8qqk8bHAf3tQ1kNBj7JUcOMKWU NbMFK9ezG085yzHJUIFDB1WTwinAC4AtZ5x4EWHl1th2h+RbaZGjz0mQ+nvQoNVFaRi5 A5x/FIBjRiXXO9+JUcNbEolysyhsFa3wsvuY3mL6MHYiat5kkyt37EYyBaBRwD9PtSIK yqjBhbC3p4I981+oI1w/X5qaKVNGDr/fmQvZ77Gxl32QhNAonaHsc2tKqiX+SpnR0r9l govw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MWS3+plU; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di16si15239468edb.397.2020.07.08.06.15.34; Wed, 08 Jul 2020 06:15:34 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=@linaro.org header.s=google header.b=MWS3+plU; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729455AbgGHNPe (ORCPT + 6 others); Wed, 8 Jul 2020 09:15:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729448AbgGHNPd (ORCPT ); Wed, 8 Jul 2020 09:15:33 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B24CC08E6DC for ; Wed, 8 Jul 2020 06:15:33 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id f16so1186391pjt.0 for ; Wed, 08 Jul 2020 06:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TkaB98nQDQAZj54VpdleIAAukarhv3l749JNi1B5PxQ=; b=MWS3+plUn1olq+Vl0HSnSx9XuX4+qccQPmHePb7EJ1x/+hpS5X72De+w9gp5zePmi2 uEBEj8+vpc2d0ZmfNZEu1tR3fmnZhOyjMH+CGfPikEuRleWqZSsb83T8bG1JmRTOj3PC OUlziPQqB9o29Ey6JIKiRDbMkEZU02veExKlAElj9QyWRc2DhuVCqfHXzwH4JqS1Uzv7 XVI+mgUKRw4/U7uBudtvva9dc2A9QC6hak0Shp8idznMrB8p4oHtrXgztaxFurPnbKek tx1HungF0YCw9Q6kraf4iK64nLxrK7mltzcVpd95MsBgh093XGC8AlO3r8IautX/orHp +aSg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=TkaB98nQDQAZj54VpdleIAAukarhv3l749JNi1B5PxQ=; b=olCJ8+eM06q7fB3Il5FjykLKBYcLIcunLaMjm+rddU2OGLElCCAmEwte2Tybrxm0Hh bxZtKLCl2Mt6LqDQGyOdTvcBf+eoTOwSJQ/2bHrlH3LHIfAGDJmvjZWH7ay3GHeYKUXz t3Npk3rI2p6vQt8G8fsf9ne/HF5l2ubkgFyqLohBGNjEipzAyeiNTq+t74LJjgqMryHT 4BF82sTBIKTqWoOWbsXSbwOQuIXwolr5ODfREpoSx2vAp46Qm9MOxoOxKG1JGnshGOhl FCv4fECCrg0DNBCVj1+x485OhmQtKr+d5qIfgPT++LTI4VR3YvbltlZq3TidyXABF5uD RxBQ== X-Gm-Message-State: AOAM533POJpgXQ6PKoUhdzjXeqkMxnCKNKon++uFVEsQHvEvDPiBSUdK oY3xX8CM5Cva6XCxNzAxGBRQvQ== X-Received: by 2002:a17:902:bd97:: with SMTP id q23mr46309205pls.251.1594214133211; Wed, 08 Jul 2020 06:15:33 -0700 (PDT) Received: from debian.flets-east.jp ([2400:2411:502:a100:c84b:19e2:9b53:48bb]) by smtp.gmail.com with ESMTPSA id y63sm4096366pgb.49.2020.07.08.06.15.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2020 06:15:32 -0700 (PDT) From: Masahisa Kojima To: linux-kernel@vger.kernel.org Cc: masahisa.kojima@linaro.org, jarkko.sakkinen@linux.intel.com, linux-arm-kernel@lists.infradead.org, ardb@kernel.org, devicetree@vger.kernel.org, linux-integrity@vger.kernel.org, peterhuewe@gmx.de, jgg@ziepe.ca, Rob Herring Subject: [PATCH v3 2/2] dt-bindings: Add SynQucer TPM MMIO as a trivial device Date: Wed, 8 Jul 2020 22:14:24 +0900 Message-Id: <20200708131424.18729-3-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200708131424.18729-1-masahisa.kojima@linaro.org> References: <20200708131424.18729-1-masahisa.kojima@linaro.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a compatible string for the SynQuacer TPM to the binding for a TPM exposed via a memory mapped TIS frame. The MMIO window behaves slightly differently on this hardware, so it requires its own identifier. Cc: Rob Herring Cc: Ard Biesheuvel Signed-off-by: Masahisa Kojima --- Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 Acked-by: Rob Herring diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 4165352a590a..814148939e5a 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -328,6 +328,8 @@ properties: - silabs,si7020 # Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply - skyworks,sky81452 + # Socionext SynQuacer TPM MMIO module + - socionext,synquacer-tpm-mmio # i2c serial eeprom (24cxx) - st,24c256 # Ambient Light Sensor with SMBUS/Two Wire Serial Interface