Lines Matching +full:otp +full:- +full:1
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Nintendo Wii and Wii U OTP driver
5 * This is a driver exposing the OTP of a Nintendo Wii or Wii U console.
7 * This memory contains common and per-console keys, signatures and
10 * Based on reversed documentation from https://wiiubrew.org/wiki/Hardware/OTP
19 #include <linux/nvmem-provider.h>
39 .name = "wii-otp",
40 .num_banks = 1,
44 .name = "wiiu-otp",
56 while (words--) { in nintendo_otp_reg_read()
59 iowrite32be(OTP_READ | bank | addr, priv->regs + HW_OTPCMD); in nintendo_otp_reg_read()
60 *val++ = ioread32be(priv->regs + HW_OTPDATA); in nintendo_otp_reg_read()
68 { .compatible = "nintendo,hollywood-otp", .data = &hollywood_otp_data },
69 { .compatible = "nintendo,latte-otp", .data = &latte_otp_data },
76 struct device *dev = &pdev->dev; in nintendo_otp_probe()
92 return -ENOMEM; in nintendo_otp_probe()
94 priv->regs = devm_platform_ioremap_resource(pdev, 0); in nintendo_otp_probe()
95 if (IS_ERR(priv->regs)) in nintendo_otp_probe()
96 return PTR_ERR(priv->regs); in nintendo_otp_probe()
98 if (of_id->data) { in nintendo_otp_probe()
99 const struct nintendo_otp_devtype_data *data = of_id->data; in nintendo_otp_probe()
100 config.name = data->name; in nintendo_otp_probe()
101 config.size = data->num_banks * BANK_SIZE; in nintendo_otp_probe()
115 .name = "nintendo-otp",
121 MODULE_DESCRIPTION("Nintendo Wii and Wii U OTP driver");