Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3541348ybi; Mon, 27 May 2019 01:40:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwfwfcNxGo8XE9EAgsHqqYc0jkKUM55BqGizD4p1/o9WPx3gwxACNVZkQO65cEKwCBa1Fy X-Received: by 2002:a63:cc4e:: with SMTP id q14mr121818036pgi.84.1558946409433; Mon, 27 May 2019 01:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558946409; cv=none; d=google.com; s=arc-20160816; b=AfaiCEFFPZuhQ5+fmUNZH+WE3UGAUrM233B2mUUk2D3y2tDYAZDPRfFS4xyHRgUEfJ ct2WMoTt8pcdHwNYM3SlUwGI4m73P9N/zJ+pge9qVJnJ7gNn5H8xKVtaK/HiCsX1CplI Sujra0EIAzTHSLXKryHfPYM2iC8whhqjsLsdXObRF0Sxwf76l8+GvYxONvPKdlI/o3y1 V7GowRvzhzab29o9xYiuyNrA9cb9LgGAEtdm1uxQH1kEG/RgbwV0h3dlwjsmnmGPoIQK pDzH2mnoXpnY3xrRg39TUQNMlemgqEo/4s5Ko5xchQoBPjpKcsc4eIv17bpYs83JNuQq BMrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=01TwNNx2GhOcVVOd72J/RIJlvgCAYs6mjrLOLymaQzo=; b=JaZ4rinFC8QLVoPCGhHzpmLZF+H01aJEePk3q5aID0xBY67ziiBRPhROl6ii4NWBY/ jvayJ2P0KIutU7SKjNNsRJqW+w6KWBq/tsxqOU9carks/o2YqCLGRziYkq21XP43Kz4M 7/KWgOcGrhWboYo757CzX/2HdM0LzzZqAbf0uXdpJf0bnBOL1YE0R3wafUdyFOEjeJfJ OCROwOFOe2VlHc5WjCmDkzm6RaPEI3lnJirPYDq7cnFDfAlZvneXKuNFJ6csVxLbIK2S 6JZQloAkn/n9fcFrWd8H5yOey57wBb822Iuf5mDnJeMk5V+xFPojJNJVkVDCSep8xDXv iDLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j37si17298829pje.15.2019.05.27.01.39.55; Mon, 27 May 2019 01:40:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbfE0Ij1 (ORCPT + 99 others); Mon, 27 May 2019 04:39:27 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:30690 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725869AbfE0Ij1 (ORCPT ); Mon, 27 May 2019 04:39:27 -0400 X-UUID: 82d828f1785c4f68b51bf35d6d3c0b4a-20190527 X-UUID: 82d828f1785c4f68b51bf35d6d3c0b4a-20190527 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1990578935; Mon, 27 May 2019 16:39:15 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 27 May 2019 16:39:07 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 27 May 2019 16:39:07 +0800 From: Neal Liu To: Matt Mackall , Herbert Xu , Rob Herring , Mark Rutland , Matthias Brugger , Sean Wang CC: Neal Liu , , , , , lkml , , Crystal Guo Subject: [PATCH v2 0/3] MediaTek Security random number generator support Date: Mon, 27 May 2019 16:38:43 +0800 Message-ID: <1558946326-13630-1-git-send-email-neal.liu@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 230D15169F03B83C7C0D95C59BE03E1101255BC24DBD91EF7AD4844FB1453F612000:8 X-MTK: N Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org These patch series introduce a generic rng driver for Trustzone based kernel driver which would like to communicate with ATF SIP services. Patch #1 initials SMC fid table for MediaTek SIP interfaces and adds HWRNG related SMC call. Patch #2..3 adds mtk-sec-rng kernel driver for Trustzone based SoCs. For MediaTek SoCs on ARMv8 with TrustZone enabled, peripherals like entropy sources is not accessible from normal world (linux) and rather accessible from secure world (ATF/TEE) only. This driver aims to provide a generic interface to ATF rng service. changes since v2: - rename mt67xx-rng to mtk-sec-rng since all MediaTek ARMv8 SoCs can reuse this driver. - refine coding style and unnecessary check. Neal Liu (3): soc: mediatek: add SMC fid table for SIP interface dt-bindings: rng: update bindings for MediaTek ARMv8 SoCs hwrng: add mtk-sec-rng driver .../devicetree/bindings/rng/mtk-rng.txt | 13 ++- drivers/char/hw_random/Kconfig | 16 +++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/mtk-sec-rng.c | 97 +++++++++++++++++++ include/linux/soc/mediatek/mtk_sip_svc.h | 51 ++++++++++ 5 files changed, 175 insertions(+), 3 deletions(-) create mode 100644 drivers/char/hw_random/mtk-sec-rng.c create mode 100644 include/linux/soc/mediatek/mtk_sip_svc.h -- 2.18.0