From patchwork Tue Dec 18 12:37:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 154135 Delivered-To: patches@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3657740ljp; Tue, 18 Dec 2018 04:37:54 -0800 (PST) X-Received: by 2002:a62:fb07:: with SMTP id x7mr16361619pfm.71.1545136674778; Tue, 18 Dec 2018 04:37:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545136674; cv=none; d=google.com; s=arc-20160816; b=OP05ZcSByfxfPqwpbGr1jl9D2EQxDSkRQiLjfSOV7VWwG2ua5IwetUkhoEA5cIDqjc NyySVHnssuOYZFWSE4CaSkX133noDWpbgtoLH6B+64j4OEx1MqdOEE0PYpNLoc+8eTBQ PA0mDRqKOYB+S1DHk1Z6SZ29K9UdWxZjzYZoUv0sje+K+ZZyvtEp4ZSZ/NiDGt6QxHIn 3WyO40pTS1MZj+DnzU5QOogvAUcaPQojSP1Vm7aKx5ylhLza8EXR9PHffoEa9qHYDucU 0axEEUqur3z/JcTi/47ZiJ6Uwgd7xscCFtbwk103t/dFz75Wa6RTMvg4lZUwJCbdvwBM CyGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=GS4wYsXAQY3zYaVbKEAG5eqnEUAsO1r3c4iXBJKGB7A=; b=p28/rPqjPcDp7yuYZUcHaxls1bchpbfs1c09Ay+SiZoMkfZPZMhLOGB3BTzFaGc4Vi Iy8Jw9pMpTLJEb3HTfspkdgozyHuPdobWmQZPK4xr8++KhgBM7ts2lJ6/d8Git1suxvx KfPgcx/TIJh3YTj2CUV4d274gjvtgzXmaM3DrmXyihhOIN0+zwR0304w64S/KqYqoRaR Y1ugoGSwGVNkL7Buxov6hbR2Vo9R3jqFhVAGNkJSkmfF+iMLjWv99kf5KZpk8dcIaP2v 6F5g9XfbQBHwaGM6XXQR+RvhJow5v+ZKGjIgEAUO/R4dQq++70wFBiuV8k9TAut645K+ g7wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OvzaSxma; spf=pass (google.com: domain of sumit.garg@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=sumit.garg@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id j193sor25296210pge.29.2018.12.18.04.37.54 for (Google Transport Security); Tue, 18 Dec 2018 04:37:54 -0800 (PST) Received-SPF: pass (google.com: domain of sumit.garg@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OvzaSxma; spf=pass (google.com: domain of sumit.garg@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=sumit.garg@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=GS4wYsXAQY3zYaVbKEAG5eqnEUAsO1r3c4iXBJKGB7A=; b=OvzaSxmawsYpjWrY+sB6ymIvLDc7VZXZzDRQs6MsY8osruNCMiC3/W+flFd1juthjm AUcdEFFcdTob9UY2yIvFHBP3TpDfROyOg7Wbrd90K1yEVOGvS6aPVCGAMzGuzqp/5VNA Y7QWLpCCcPoM0bs/YTkakfzwIHYliD3gKkgpM= 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; bh=GS4wYsXAQY3zYaVbKEAG5eqnEUAsO1r3c4iXBJKGB7A=; b=QHEHzutrktcXPtIrEMIoJzbVPuz8jFb6GCkCdbbRvO20cwiCHdrR8XPdpACpvP/MKg 65qbkXizTykqqx7r1rf+G9d5Pt9rrQkxEEyDNC15IYuhhMd16JqYIDUr6L325nvwDMP3 0PZYZZ4rxPA9sQ1obAjjU6GWqujbgjNIHT/3O29hcCO8NGXRiV1JPE62dsdAiJN8rDb5 Sa2vK8HfyyMbH/wGnMRWsR34JnXRJ0qD5o6YvRz5bAZS2VLoDQqs04L6gvc/8+2C/AFN 8rZT/+/WHyXjlQNGMUIwcETIT4JtY1j4N7+WXrW4kR5NkzowVn0kiF3sqlsr2XuLhYBR RAAQ== X-Gm-Message-State: AA+aEWafYRrzO9bnvVDxcTFnvHF+Bsuh9SS7DnExLdSVVNue/TGrDyC9 Ivf1Rb67AGiLqfTxlr22BoF6RGjx X-Google-Smtp-Source: AFSGD/XZMKH0dgCSXESGirb4G4Fdl8eHmmy3iFZGSaBtv85a3MaYZEtE6mtqq+XBRjzHw+qDIa/xPw== X-Received: by 2002:a63:fb15:: with SMTP id o21mr15511580pgh.211.1545136673894; Tue, 18 Dec 2018 04:37:53 -0800 (PST) Return-Path: Received: from localhost.localdomain ([117.196.232.175]) by smtp.gmail.com with ESMTPSA id a15sm21880529pgb.1.2018.12.18.04.37.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Dec 2018 04:37:53 -0800 (PST) From: Sumit Garg To: daniel.thompson@linaro.org Cc: patches@linaro.org, Sumit Garg Subject: [PATCH 0/2] Add OP-TEE based hwrng driver Date: Tue, 18 Dec 2018 18:07:29 +0530 Message-Id: <1545136651-25776-1-git-send-email-sumit.garg@linaro.org> X-Mailer: git-send-email 2.7.4 On ARM SoC's with TrustZone enabled, peripherals like entropy sources might not be accessible to normal world (linux in this case) and rather accessible to secure world (OP-TEE in this case) only. So this driver aims to provides a generic interface to OP-TEE based random number generator service. Example case is Developerbox based on Socionext's Synquacer SoC [1] which provides 7 thermal sensors accessible from secure world only which could be used as entropy sources (thermal/measurement noise). [1] https://www.96boards.org/product/developerbox/ Sumit Garg (2): dt/bindings: add bindings for optional optee hw-rng node hwrng: add OP-TEE based rng driver .../bindings/arm/firmware/linaro,optee-tz.txt | 16 ++ MAINTAINERS | 5 + drivers/char/hw_random/Kconfig | 15 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/optee-rng.c | 236 +++++++++++++++++++++ 5 files changed, 273 insertions(+) create mode 100644 drivers/char/hw_random/optee-rng.c -- 2.7.4