From patchwork Wed Apr 24 20:26:06 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: 10915719 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 36F311390 for ; Wed, 24 Apr 2019 20:27:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2339428816 for ; Wed, 24 Apr 2019 20:27:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 132BA28A00; Wed, 24 Apr 2019 20:27:03 +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 B770928816 for ; Wed, 24 Apr 2019 20:27:02 +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=0mIlog2PI2BGKywdNN0pOy+sB25ldCt1gkN0fpR3mfk=; b=LtwTIBAiN+Xn3Z xU237NaaOUfQWbBES9i8d/Px5imNsI7onUmn2WTm6TqeIy3Ze5ssS7G/oHYxfIXJhtuK2vHwf8ZUP Hjtm0yi3yE1lRfuIxzSGkcKIDLD6gIGbUiqPZUKaQVnx4hG6eUM5pBZWYemLeQgodOCbOX0VtXtIj 5XRD69ZI41jM3k4fj716X3MaeZUApEtdfdhaN0i55swd7qStWPNC7WTu81Xzo/dWeD6s065Jaitrb Tu3ksxKHC/f2UDZmfK9c8PZc7uIOWLm1Ii53EMvdl6a8X6jEMzcCpIexBipW1v4XowQeA5rI2qwVD wgsY9WY0JzVtYUwhpLmg==; 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 1hJOTs-0002RW-O6; Wed, 24 Apr 2019 20:27:00 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJOTA-0001aR-Gj for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2019 20:26:18 +0000 Received: by mail-ed1-x541.google.com with SMTP id d55so17150705ede.0 for ; Wed, 24 Apr 2019 13:26:16 -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=S3Rfsn/VhYp7SibeRUUqFYaOACHNw/HZ5nPnK0GXbmo=; b=cilao8C0SMsOcrqWpsENsA0u2ivO8+Rq/HjhnGuC6j/P2VImAm5fFg9QxiHa54vYHd LHN7XeTvVsqjPryHVA18EVyYxEWI7eXu7PzEccbTfCtqD1iXPlyZQjZP99H5vaUf1iQl CwGjH7YcPVLDs+84FlnKZNSBQ1ldg4oP34yvDy/OU1D9VQm1fBlhn8Pk1OYmFOtt6AQ7 edSU4UWvtmxAm/SrGguIOzz8hm8LQM6tRMQtYxFoi5GaV6v9sTpOCtiroP34ResY5PDz ianKY3S8KZVcG/QOKjgVEuKX6fvVYAhUbocZFzi5EIHd+J63qRzn7WchQpFQaUQNk193 BScQ== 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=S3Rfsn/VhYp7SibeRUUqFYaOACHNw/HZ5nPnK0GXbmo=; b=QNaIlXh7u7qWSGMxVhGEJcceYM+zVCPkRB7IXiH6Bn7bTMebP8JVzgF5vVOIq5rAXM hus3Ah2hgm3n0i0Q+c87OjmpHNpd73mcvjhwKXc99lzjLPIKaLf8OSSBgWkWFKvAPpM0 ZQDIpq9fXJeci01T1bMsCcTIDA0LLw3HCpNxZI5kDKACAEjJO/S5xoJaunR3BWjYtRtN etbfL8IAwx6InNGveY7ZLNMFBKwl1c+P0TgOZjaXJSFYUT+rypqJk5e2ltsA6/+8JxzJ Dc26aaFtr9g0wDcVFAb/gAfjOOb2tiT1gPHI/WkaU/9yi3aQfFuaPEtg5oi6iHTdPlW7 aU1Q== X-Gm-Message-State: APjAAAXbi6j+0RKOEHy2bX9e0/PSQDqugocv0ofEbSZFRx8NQrvstdUC eGgsWRiV1jcgrnA1pJCKli3Z8g== X-Google-Smtp-Source: APXvYqzcBS6iLe3FksZxVVlWsuXKaYd8nRyiZmLSC777Z9UOH6XPdzQ7z5vrSeeRFP/WXeWZFr48sQ== X-Received: by 2002:a50:b1f9:: with SMTP id n54mr21044382edd.198.1556137575306; Wed, 24 Apr 2019 13:26:15 -0700 (PDT) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id c26sm3728988eja.86.2019.04.24.13.26.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 13:26:14 -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 v5 4/5] nvmem: imx-ocotp: Add i.MX8MM support Date: Wed, 24 Apr 2019 21:26:06 +0100 Message-Id: <20190424202607.23522-5-pure.logic@nexus-software.ie> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190424202607.23522-1-pure.logic@nexus-software.ie> References: <20190424202607.23522-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-20190424_132616_553013_22AB1B29 X-CRM114-Status: GOOD ( 10.47 ) 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 826812d3332f..e8d3dcada6c6 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);