Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1547198lkv; Wed, 19 May 2021 12:28:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEKvFGJr/UXqXlVvhQA3qScFhk3Rmfx7Db+lHcKTTpORl8Eg34z+YSed7wSK9O4uZqFNo8 X-Received: by 2002:a17:907:2da0:: with SMTP id gt32mr794106ejc.136.1621452530158; Wed, 19 May 2021 12:28:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452530; cv=none; d=google.com; s=arc-20160816; b=lq3iKEMCTamQUcFv43gtGUEf42auv21U7EPk6LcH4TlQt+GZquSQm46hSA/fRDqKZJ +bbcSP1qIbWGbaPP8bVns3Oo3vk0egTdhAh8yJbINkkxPfeuKTa9+xecKBpYTWGw/fz/ knB9rzsAmb2AJ151azXFtTrt1Ps142Iss43ZeyvSPKE917kx46oWGwwMgzutfT4iBhM9 BL8kysm4UmWiC+ZkuUYjtmACrcbeRtCEThL3DT+Q1SYZiImrxNRUENEF+VtdfnYBz0MH u6lr6MikYcxVQPrjTjKtp0Zhj6njowa28WEcu5dexu8oqMuzvzOZDClMyvHDXfbXAx/Y lmdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=BkQAsKCQpxwg7hSBf6euo6TDB0ew+1tFBONyEU/5MJM=; b=fha8C/XAbJF6w/LhvYP+lrt/EAWytXNkt0lWNr37NmJKeKmFfymu6sB1WyQOUCenDL sah5P9V3TPNfZlHpwDnHLbCFSYamERGxFsCHycidfHPwBdZDhbqn9Du3aCXh54ivPtDk Y5EFqXi8is/UJkXLwdmxTXmnc8RxPOHBqxMjFc0lV6K/P5EJI/yrzNdxf7rI766C3pnY WNodtNL5N75nvDgLaOz14BKSes/RPG5fX65V631zY+M+fedlseVplvUH8YzkZr4xYahI jlq+HIj4SYK6/TQs4MzTQj+PVbCZTolyO4J9/K4v5VN7O5P2tJkwKK7ysb0UUlBVIjl2 VQAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y15si85325ede.450.2021.05.19.12.28.24; Wed, 19 May 2021 12:28:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233742AbhESJwT (ORCPT + 99 others); Wed, 19 May 2021 05:52:19 -0400 Received: from 82-65-109-163.subs.proxad.net ([82.65.109.163]:41936 "EHLO luna.linkmauve.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241573AbhESJwL (ORCPT ); Wed, 19 May 2021 05:52:11 -0400 Received: by luna.linkmauve.fr (Postfix, from userid 1000) id 3896BF40627; Wed, 19 May 2021 11:50:46 +0200 (CEST) From: Emmanuel Gil Peyrot To: Srinivas Kandagatla , linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org Cc: Emmanuel Gil Peyrot , Ash Logan , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Rob Herring , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linux-kernel@vger.kernel.org Subject: [PATCH v2 0/4] nvmem: nintendo-otp: Add new driver for the Wii and Wii U OTP Date: Wed, 19 May 2021 11:50:40 +0200 Message-Id: <20210519095044.4109-1-linkmauve@linkmauve.fr> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The OTP is a read-only memory area which contains various keys and signatures used to decrypt, encrypt or verify various pieces of storage. Its size depends on the console, it is 128 bytes on the Wii and 1024 bytes on the Wii U (split into eight 128 bytes banks). It can be used directly by writing into one register and reading from the other one, without any additional synchronisation. This series has only been tested on the Wii U so far, using the downstream 4.19 branch from linux-wiiu[1], but it should also work on the Wii on mainline. [1] https://gitlab.com/linux-wiiu/linux-wiiu Changes since v1: - Fixed the commit messages so they can be accepted by other email servers, sorry about that. Emmanuel Gil Peyrot (4): nvmem: nintendo-otp: Add new driver for the Wii and Wii U OTP dt-bindings: nintendo-otp: Document the Wii and Wii U OTP support powerpc: wii.dts: Expose the OTP on this platform powerpc: wii_defconfig: Enable OTP by default .../bindings/nvmem/nintendo-otp.txt | 14 +++ arch/powerpc/boot/dts/wii.dts | 5 + arch/powerpc/configs/wii_defconfig | 1 + drivers/nvmem/Kconfig | 11 ++ drivers/nvmem/Makefile | 2 + drivers/nvmem/nintendo-otp.c | 115 ++++++++++++++++++ 6 files changed, 148 insertions(+) create mode 100644 Documentation/devicetree/bindings/nvmem/nintendo-otp.txt create mode 100644 drivers/nvmem/nintendo-otp.c -- 2.31.1