From patchwork Thu Apr 25 13:34:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 10917097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A3F514C0 for ; Thu, 25 Apr 2019 13:35:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 791BA28AC8 for ; Thu, 25 Apr 2019 13:35:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D0BE28AD0; Thu, 25 Apr 2019 13:35:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 12F8628AC8 for ; Thu, 25 Apr 2019 13:35:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e2kCHpyqA1Vg7Z/0Nb8DniA6lgAEVYWKSWa7AVQAElA=; b=YOGiitQcN3pgA9 l7M/pL9VP5AWfhBDhoaEgw1nqnEWx4gspC/CKPG88gXIra7t9pav43gOP8fi1Nw/T8+AVYjdrfx2x m1tv955ZNKmGt1siDX7KvEobfqG4ZYpC5HA/efo2qU28rg/xMveZZd0tX92PhA6YzDMYOGQsxTmJD S8xaFlgIiaO2aI/2VmGR8wyPfVDAh9NhtaOhoinP6gDzMgiTyIhEk608LCn4aIPrnSRE9eB5u7oXF CRTaOAh4+5f/xMDrfuDCW1KH0WGXlHcURA8eXAtCrrjRSY/wrPLgcOo7KPgcRGJuXWYpBifpFseLf Gn/XsNi174F+BYPYR7RQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJeX7-00006P-9a; Thu, 25 Apr 2019 13:35:25 +0000 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJeWK-0006Sh-KT for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2019 13:34:38 +0000 Received: by mail-ed1-x544.google.com with SMTP id u57so19204854edm.3 for ; Thu, 25 Apr 2019 06:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexus-software-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4ri/YVZIE592kymXrGXMr5tXymQFGJmjgqui5bgmAf0=; b=xBvJVHkfi2ZechSMfMV0zZqTa6l+qC0Um89jxp78/GUmnk9Qfa3Fa+OngHm9ZAe2nU FfZp/VP0W5t7NBIJoefA0B2kb1FE+8YW2OAbWDOdNZVdGvKuzWKDn7G1noB4sJUy5e4p Fq+jlS77Ilv0boWvYZtHKmo3WGmqFLfW/+yVM+GiXgpLoLLW8X7FhwQtNqadmiUYObyt 6GJmwMCCpheoT98O4kR2QCSwrbarWiXQSAKSOs2vSHbYfLvZTagzpnZtzAj91KBTCIxI q5TAxqR26Ia8a30cRLoSmtkA06wcTLh7McBcq9UOCUbKbQbf1IFrpLhoOWCnIWTyjAsK H3SQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=4ri/YVZIE592kymXrGXMr5tXymQFGJmjgqui5bgmAf0=; b=Nrsrs72psQWdf9l5RClbLnX/IZ6PKM3wRkN4V7eWXIZmDIWd4BTZsWOwpNZtNugB0S 18UGJM2axDv2c/VaedJDYKpFGCcI7xU3CaSETUqDcMSJhq7bBkHr2VYN9vCsIfGSjdD+ ea58tHFJBqfKEjcoSHj1TiUIdC/gtA4YWj0GTXbo69JdL41HB8cUW+oVI39VrWLgaHnb atZgKBK3aT6SbC71DG9/FXDEd+PrbI/3+mh//EZs8mQ8nJc8rNLa2pDd07IN5shHr7vH ueWE/INZEpx7QZEl+ARq8rgCzbUdGdXFY2OHIyIb2oolonRymSbECGBICbsixkNtdLrg GQBA== X-Gm-Message-State: APjAAAW/jBdEVHZdufSgT9wJ9EG+I1babAz2ljWWH7r3kRjTm+Rif0nw cUOJWUfeSq0G8oHrBc4s6KBxvA== X-Google-Smtp-Source: APXvYqwjomyMkuHQng/ufGY94bf25AFs2P6uNytElwDtF+Cd8bcNCuDyfKkYWtJZ/BXhRHj34raNpA== X-Received: by 2002:a17:906:66cb:: with SMTP id k11mr19076647ejp.10.1556199275380; Thu, 25 Apr 2019 06:34:35 -0700 (PDT) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id k20sm4027084edb.9.2019.04.25.06.34.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Apr 2019 06:34:34 -0700 (PDT) From: Bryan O'Donoghue To: l.stach@pengutronix.de, peng.fan@nxp.com, shawnguo@kernel.org, srinivas.kandagatla@linaro.org, leonard.crestez@nxp.com Subject: [PATCH v6 4/5] nvmem: imx-ocotp: Add i.MX8MM support Date: Thu, 25 Apr 2019 14:34:26 +0100 Message-Id: <20190425133427.30648-5-pure.logic@nexus-software.ie> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190425133427.30648-1-pure.logic@nexus-software.ie> References: <20190425133427.30648-1-pure.logic@nexus-software.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190425_063436_725284_6EFE83F9 X-CRM114-Status: GOOD ( 10.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aisheng.dong@nxp.com, abel.vesa@nxp.com, anson.huang@nxp.com, linux-imx@nxp.com, kernel@pengutronix.de, fabio.estevam@nxp.com, Bryan O'Donoghue , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds support to burn the fuses on the i.MX8MM. https://www.nxp.com/webapp/Download?colCode=IMX8MMRM The i.MX8MM is similar to i.MX6 processors in terms of addressing and clock setup. The documentation specifies 60 discreet OTP registers but, the fusemap address space encompasses up to 256 registers. We map the entire putative 256 OTP registers. Signed-off-by: Bryan O'Donoghue --- drivers/nvmem/imx-ocotp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index 2c5009691dd6..189fd5f334f4 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -479,6 +479,12 @@ static const struct ocotp_params imx8mq_params = { .set_timing = imx_ocotp_set_imx7_timing, }; +static const struct ocotp_params imx8mm_params = { + .nregs = 256, + .bank_address_words = 0, + .set_timing = imx_ocotp_set_imx6_timing, +}; + static const struct of_device_id imx_ocotp_dt_ids[] = { { .compatible = "fsl,imx6q-ocotp", .data = &imx6q_params }, { .compatible = "fsl,imx6sl-ocotp", .data = &imx6sl_params }, @@ -489,6 +495,7 @@ static const struct of_device_id imx_ocotp_dt_ids[] = { { .compatible = "fsl,imx6sll-ocotp", .data = &imx6sll_params }, { .compatible = "fsl,imx7ulp-ocotp", .data = &imx7ulp_params }, { .compatible = "fsl,imx8mq-ocotp", .data = &imx8mq_params }, + { .compatible = "fsl,imx8mm-ocotp", .data = &imx8mm_params }, { }, }; MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids);