From patchwork Thu Dec 20 10:16:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 154325 Delivered-To: patches@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5976034ljp; Thu, 20 Dec 2018 02:16:56 -0800 (PST) X-Received: by 2002:a62:7086:: with SMTP id l128mr23660444pfc.68.1545301016317; Thu, 20 Dec 2018 02:16:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545301016; cv=none; d=google.com; s=arc-20160816; b=CC0v0hlO5PqBIuuwdFEK+sX4M6jYt2ToYgq6oY6nMgGirZQ/e5V89IXBPLph16l9mH MOvFl+TgpJHkkBGu1tyZ1MnPauoIRpDTPTQ81CB21HqNqZ5nvt0FGqD0rhOZJhi8Lqoa j+VxSrGkECZDwZfGGQsMM0ud6CXjCFxzwNUM5HGQ6vCZH8KoNLxng16eFa2wklOghH/8 EVqXT1WQCnRHnhXwMr8iEoGPzezCKtz41x9RanE48QTgGWPHQsemk1qk7RGowOARYvJu S338WsGMno7ZS6oRY5hzp4MEGWckRahPtcodHlO70JjCAzbuwxcM56eLHYlWsXM3aXKv wD4Q== 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=j6VwNqEnF+Qn3xHwJa6KkWo0QJlisZzfSo6asSLcYMo=; b=RNndICNGEdauSv5FOx57842KlGyIX8K56UWIZR4iH2kMp9wWc3WQMnBHCjuvFDWVSx LSycS8s6CKXw1bgzJOeO2RB+grFfYzH+X80ABadwq8XpZLDaCgcgo3ydp3lpV4gK8Y9s +LiayVDobVbcTvflW0bLT26qo+dCeMM+svF+y0UKxDRGwqk6GQPgitfa77oG2F5s7SGs Ums8Z/gXKrFwE46oNuP6LC/HvMz6DgyUgdulTWVAz6u6Z+BB/4ylD/m6ldkcu9FfoxUD +OUrJbFXN0k9R2TPJGepr1M6D15lhY1CkwMh/ZHhV+d9rDvmu8+z8/GsslFOZbsvqQQw zIEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gIQ4AkUy; 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 g5sor33643739pgl.1.2018.12.20.02.16.55 for (Google Transport Security); Thu, 20 Dec 2018 02:16:56 -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=gIQ4AkUy; 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=j6VwNqEnF+Qn3xHwJa6KkWo0QJlisZzfSo6asSLcYMo=; b=gIQ4AkUy0yRHaHJYAlrh9sGpRvy7FU+7VxwTIUG0ZIwW6v8xXFbhrNNdrw7T2Zl+qq GJ+lGTBo4xX+DbjFzVSwG9DL1lTEUVprwohI1oK0hQQ4JMEGF1r7yY14TGhvSTtxahbA vHL4Pq5rZ37aqwHKrdUsoBmEtiPfc+D3j8LVU= 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=j6VwNqEnF+Qn3xHwJa6KkWo0QJlisZzfSo6asSLcYMo=; b=foGoenW3ze8KyYvciVaGKqPSPWJE8q79Sa0OBmmuEI7skNfFe1aptYLlLLZP1S8CbK 6/v7Wu4LVc6vskx+X9mItJOgJVEoKYXufdTu2fGITWiKyC3OucJodNGbSPWkd29U9HK4 152MONUleXppmNp4kzwm3Du5ANUGh2rW1FSNF+y3PBc+Huid485jAo3FRSOIc1QRplfx ndBh1+C2CkGrAxwykJvyCVavuvOMz6PksnyTRrVjkiCQ2fyW7S332N6/gGzKT8JTiIIA WWXEAj8h640VADTiOLkx4WL31cQJqy56ililkrmYjzXU13eKHMPnCu/LijUcvhOluMwv wYEg== X-Gm-Message-State: AA+aEWY3GqZy07vF2bkpr+Ilmt5iXtCNkODIAWqM8sKFc+tQAFvFpXEz /4fQacmelgH+gLsN0dW8qEOxsYo6 X-Google-Smtp-Source: AFSGD/XHxpfHGnkfMxIpMTkE5+2vCPAxwaWILSiUPSqD3D/ZZjMbFj4LlAvzS/7TFRGI0UW/VWmF+g== X-Received: by 2002:a63:c10f:: with SMTP id w15mr22332167pgf.199.1545301015169; Thu, 20 Dec 2018 02:16:55 -0800 (PST) Return-Path: Received: from localhost.localdomain ([117.196.232.175]) by smtp.gmail.com with ESMTPSA id f67sm44097089pff.29.2018.12.20.02.16.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Dec 2018 02:16:54 -0800 (PST) From: Sumit Garg To: daniel.thompson@linaro.org Cc: patches@linaro.org, Sumit Garg Subject: [PATCH v2 0/2] Add OP-TEE based hwrng driver Date: Thu, 20 Dec 2018 15:46:36 +0530 Message-Id: <1545300998-10069-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/ Changes in v2: Instead of device tree, fetch rng infomation like data-rate and quality from op-tee rng service itself. Sumit Garg (2): dt/bindings: add bindings for optional optee rng-uuid property hwrng: add OP-TEE based rng driver .../bindings/arm/firmware/linaro,optee-tz.txt | 4 + MAINTAINERS | 5 + drivers/char/hw_random/Kconfig | 15 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/optee-rng.c | 280 +++++++++++++++++++++ 5 files changed, 305 insertions(+) create mode 100644 drivers/char/hw_random/optee-rng.c -- 2.7.4