From patchwork Tue Jan 23 10:29:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wadim Egorov X-Patchwork-Id: 190836 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp240457dyi; Tue, 23 Jan 2024 02:30:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHcVf88PDtqEzHmM4lBD+15nfrPK6EKo6YWFe0qLww+DJmlJM6MxRLbJXH/l5cU6xlwDV7x X-Received: by 2002:a17:906:349a:b0:a30:498c:a3ed with SMTP id g26-20020a170906349a00b00a30498ca3edmr1789063ejb.34.1706005809584; Tue, 23 Jan 2024 02:30:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706005809; cv=pass; d=google.com; s=arc-20160816; b=kqMLg6KFMwTHI6I9VPX571NLSnjnF7GAzetYOfjCl959RSqPMjMNs3qbAcLCrs3iH4 MlctdMH+1yrZrw+d9ZYriJhODAFrBYeiqnuWE/t8UwNaY6lHeOnJTII6R7g42Jz6VeCP wUe5PAVigWlY3Kx4ykDX8/egR9is3g3sFGenu8EKNEk9pGvUzueOp+pe83m96L20rz8g 2FOi08Vf6FJCC3pFuFMzcsvznCbySdl2Pzal2kPrd/zqTXmHI8NIClV7Z5sO7c/NcjKI F291j13BfdGxvLriHN334NST/KGffqxn8GoYGlx6HDtHPG9JcmAZuig3G5q/o8XAFssy x/AA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=FYVYaZk69UNwUKgQ1E4MqQZOvB3E7CwBW3BXAJLfUOo=; fh=q+RHURjwAfsfm9Zm1fZ1D3a3iaaILNfsc9UMPKeFCRk=; b=ZLwD1x/MsUQutqKClaBtqMEZSrWhViyk6tfrjfcm1SE6i4EQG9LPBYol34PB1yiWze N0GE9DfQo3YlG0Qnyfgj6iegNpHdq4vJj+Z0B5/YXX4PfTBM6rziCBcqRf2P5RYWAWwA 0zEXgMkTh4hkyTDqtbTccP9WxgXh1QILXLgD+v8fpHFlHxTx+6PuiZC30w5CHCWn+8Gf CqX6XHwC/JiatgILD9whHxW4/g3PFU7fNbvEXXmlNS+Gj/+78m3uFVOFoBv1tPkBiJqr rlA2FuvjWMuJFeFnwijad0yD4laF+XyLs00Pm6o0TPMyAj0awA7DMlDGCQSC2X8Q6P43 FxIw== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@phytec.de header.s=a4 header.b=KVSg1o47; arc=pass (i=1 spf=pass spfdomain=phytec.de dkim=pass dkdomain=phytec.de); spf=pass (google.com: domain of linux-kernel+bounces-35091-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35091-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s17-20020a170906a19100b00a2a399a9bd1si11739511ejy.714.2024.01.23.02.30.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 02:30:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35091-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=fail header.i=@phytec.de header.s=a4 header.b=KVSg1o47; arc=pass (i=1 spf=pass spfdomain=phytec.de dkim=pass dkdomain=phytec.de); spf=pass (google.com: domain of linux-kernel+bounces-35091-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35091-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 394A01F236DD for ; Tue, 23 Jan 2024 10:30:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 774F95C8E7; Tue, 23 Jan 2024 10:29:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=phytec.de header.i=@phytec.de header.b="KVSg1o47" Received: from mickerik.phytec.de (mickerik.phytec.de [91.26.50.163]) (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 251805A784 for ; Tue, 23 Jan 2024 10:29:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.26.50.163 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706005782; cv=none; b=ca72zCD3yRnjM0hXaKcWfNTTKlBz7f6s01ptBLbepieqkoH8G4UYnJDohsf0ovU6uD6tD8tQSMJc864Syqf9ORjL/xc0NUdKKlRApupluBDHW23+apXd86QB394RXSUrHt0qtsU7xokhOPJj2WLa8bZbgsyeXnAi+f+U/sxpczo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706005782; c=relaxed/simple; bh=3528Bh1w1ePwVQXdFUJM6DTyJtAszP7ZqPeAoExHN4A=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=J0i6bub9LoJQlTRCt7Bwyq67GEPe2b33E19at3mme6EMZicVL11lNPL9fKCIDH9zbUvcdSXVWHEMsHnCMfEnBKUBoxebnIA31ejHz2scQxZheeKJ/JXyeDVnwMughGNjzS/+pUtL8qMzm/TUmK7Il/oxQ6RrVld1tx/FM4DCyBM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=phytec.de; spf=pass smtp.mailfrom=phytec.de; dkim=pass (1024-bit key) header.d=phytec.de header.i=@phytec.de header.b=KVSg1o47; arc=none smtp.client-ip=91.26.50.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=phytec.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=phytec.de DKIM-Signature: v=1; a=rsa-sha256; d=phytec.de; s=a4; c=relaxed/simple; q=dns/txt; i=@phytec.de; t=1706005776; x=1708597776; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3528Bh1w1ePwVQXdFUJM6DTyJtAszP7ZqPeAoExHN4A=; b=KVSg1o47nZMwLABH1P8l2bJgdO3nZzJtzG0izWjSPacER8bgcaLR6Johmg1GeCVU 7rnFmiQwwbvq4gabidP3HkRImN69jl1wHGEcyz0FtNc2z8UuCtyDYgbhp6CTiUD6 qAZ4HB3XcE00hRDO2V4LrBApfQCJpRVSDaqBOOPlElk=; X-AuditID: ac14000a-fadff7000000290d-4d-65af95104432 Received: from berlix.phytec.de (Unknown_Domain [172.25.0.12]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mickerik.phytec.de (PHYTEC Mail Gateway) with SMTP id CE.4A.10509.0159FA56; Tue, 23 Jan 2024 11:29:36 +0100 (CET) Received: from augenblix2.phytec.de (172.25.0.11) by Berlix.phytec.de (172.25.0.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.6; Tue, 23 Jan 2024 11:29:36 +0100 From: Wadim Egorov To: , , , , , CC: , , , Subject: [PATCH] arm64: dts: ti: k3-am642-phyboard-electra: Add TPM support Date: Tue, 23 Jan 2024 11:29:21 +0100 Message-ID: <20240123102921.1348777-1-w.egorov@phytec.de> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: Florix.phytec.de (172.25.0.13) To Berlix.phytec.de (172.25.0.12) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHLMWRmVeSWpSXmKPExsWyRpKBR1dg6vpUg2VLJC3W7D3HZDH/yDlW i+WfZ7Nb9L14yGyx6fE1VovLu+awWbz5cZbJonXvEXaL7nfqFv/PfmB34PLYtKqTzePOtT1s HpuX1Hv0d7ewehy/sZ3J4/MmuQC2KC6blNSczLLUIn27BK6M7otf2Ase8FR0/t/A3MB4lquL kZNDQsBEYtfX7+xdjFwcQgKLmST2tZxhhXAeM0o8v3iZBaSKTUBd4s6Gb2AJEYFuRomTB5Yx gzjMAm2MEk8eHmAGqRIW8JaYtuAOK4jNIqAqcf3xE6C5HBy8ApYSy+YHQqyTl5h5CWQdJ1BY UOLkzCdgC5iB4s1bZzND2BISB1+8ALOFgOIvLi1ngemddu41M4QdKnFk02qmCYwCs5CMmoVk 1CwkoxYwMq9iFMrNTM5OLcrM1ivIqCxJTdZLSd3ECIoDEQauHYx9czwOMTJxMB5ilOBgVhLh vSG5LlWINyWxsiq1KD++qDQntfgQozQHi5I47+qO4FQhgfTEktTs1NSC1CKYLBMHp1QDo6eQ 7b+2P1qHjSuYG9R1Pq0wt7jttzYw4sKd0K1RB9LkLrwueaP/xnXT5s0Zk+30ZEL/HnLTexf2 8eucqsp7O/TPJ/pK/3tXoLpMKOL/tyDDTUesj8oW2dZcsOQ9VpE25eAen6OLVE/2bUtiufXz QOBCPkPRhlvzVG9H9l05mDp5u4cQ778HHkosxRmJhlrMRcWJADj06iRxAgAA X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788876747470831819 X-GMAIL-MSGID: 1788876747470831819 The phyBOARD-Electra populates a TPM module on SPI0 bus. Add support for the Infineon SLB9670 TPM module. Signed-off-by: Wadim Egorov --- .../dts/ti/k3-am642-phyboard-electra-rdk.dts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts b/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts index 53b64e55413f..8a518a86abc2 100644 --- a/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts +++ b/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts @@ -159,6 +159,15 @@ AM64X_IOPAD(0x0298, PIN_INPUT_PULLUP, 0) /* (D19) MMC1_SDCD */ >; }; + main_spi0_pins_default: main-spi0-default-pins { + pinctrl-single,pins = < + AM64X_IOPAD(0x020c, PIN_OUTPUT, 7) /* (C13) SPI0_CS1.GPIO1_43 */ + AM64X_IOPAD(0x0210, PIN_INPUT, 0) /* (D13) SPI0_CLK */ + AM64X_IOPAD(0x0214, PIN_OUTPUT, 0) /* (A13) SPI0_D0 */ + AM64X_IOPAD(0x0218, PIN_INPUT, 0) /* (A14) SPI0_D1 */ + >; + }; + main_uart0_pins_default: main-uart0-default-pins { pinctrl-single,pins = < AM64X_IOPAD(0x0230, PIN_INPUT, 0) /* (D15) UART0_RXD */ @@ -248,6 +257,20 @@ &main_mcan1 { phys = <&can_tc2>; }; +&main_spi0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&main_spi0_pins_default>; + cs-gpios = <0>, <&main_gpio1 43 GPIO_ACTIVE_LOW>; + ti,pindir-d0-out-d1-in; + + tpm@1 { + compatible = "infineon,slb9670", "tcg,tpm_tis-spi"; + reg = <1>; + spi-max-frequency = <10000000>; + }; +}; + &main_uart0 { status = "okay"; pinctrl-names = "default";