From patchwork Mon Apr 22 15:04:59 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: 10911167 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 0C09C922 for ; Mon, 22 Apr 2019 15:06:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0F6128553 for ; Mon, 22 Apr 2019 15:06:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4A8E28595; Mon, 22 Apr 2019 15:06:05 +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 9073D28553 for ; Mon, 22 Apr 2019 15:06:05 +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=yY2lqDe00cZPDd5o3kf3Drg8fUV3cbJirR4+VbCb7pg=; b=gdSRa0lW1jjDwL /dHB9sTZONyqxmJoaa+Ow220qIMUPaX8EMQGb2C0H2QS4KnyCgeCmvJua5NMsDmR+pBw/9+GBGOQ/ qyzlf/qBKNyQWQUELy7TD0zMiRdsOVBaoTML/Cs9TLfSHNlUggfWemYR88yZdmowJRCAlLMUQ2Dfd LcpZlNso2kG3kSXBFu3S+uNo0MuSNQm84T0Oz6hax77KMD4VDpiBznhQvgWu8khnm3cpfv5DRXx6D tlkG9BpeJAjlTb5em2ohMsSNZXDBeo06a8XYZbcSmX1cTYv7gKe+BOtFMncJFyDo1xfMxZm79GwHU iGJgFMLvVyIHPymkExDQ==; 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 1hIaW7-0006bC-S4; Mon, 22 Apr 2019 15:05:59 +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 1hIaVR-0005g9-4l for linux-arm-kernel@lists.infradead.org; Mon, 22 Apr 2019 15:05:21 +0000 Received: by mail-ed1-x541.google.com with SMTP id c1so3732210edk.5 for ; Mon, 22 Apr 2019 08:05:17 -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=/rh2RwbgCmJdifYQXQMZFjmQEy18Pfkxthmmd2uU2oI=; b=NVS4vLjtdA3D7dMCj3A3dolHqYECcmcryzvsMaBGHH5vRr3rbkU5ZYcW70II+uRIu+ Bm8Jri0zXk3jCe6AP3lP3BsO037gOuDOXpGiO1dz9moz6V90uz/pDbAJO2i59ToBwIcD O+yYtW1Xh8GxtvGSYk9Gjozoh/gLRe9bTnnmNsO5LzoYHj3LR1XYl0YtFsY6zIQn9LH8 +Vax9Za/pBCe1WRX3FcTXWTTzCaz0ZdkMSl7t2nKufwAcp1aDdSTIr8CS1e4sOPVJC97 xRF4U3GrgOB9+aAgMpBrOLSSlA94JgcOz2JNU5EEVnxoe9R58xQi6YwysnuIt/Ikul6F Ox8g== 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=/rh2RwbgCmJdifYQXQMZFjmQEy18Pfkxthmmd2uU2oI=; b=Uk7X+OOeojWFSRkDTZRUAgWQTjubmJJXw5EX1DjkY9nwkJiOeiIAQD5jmH23ByYlIQ i4tdz8Ux2ACM4m9BaBhgj169Ti5KotbJ1rT0QW0kB9jJWA7mjqPXHcbg+rrDBqZKA0O/ rzhThXgPuQ1InwZ+/MSEk1DJJ3tLIKLMkEQa3VxoJCnOCpNM+TXyKiTkslpcSX+ZlDZE xP0A7YFsRiozCDk5NiQ6fnDLN6OpNyblmiUYpmha7C1sCpy+iysKTm5OrwJJSNsyDByY WIuyoL/5VZROBkjQQHT1AV3aHl/TBGybgy3CtIQhJE6XTjQwHTIi16KjSrYPpK+uMScb pLYg== X-Gm-Message-State: APjAAAUZv7TDUZf0OmN6ww27jfozbvLpvTRYSBwFaMt68iYquD1ljPR2 Ec9oh8j8KQEDwOtNN04TdZei0w== X-Google-Smtp-Source: APXvYqw0o+hXhS6k96YWekW7DKLaloRsFPFWl6hAki9SNVYg9M4YCG17+3XuElOhfhwmj5QvlCXcoQ== X-Received: by 2002:a17:906:3153:: with SMTP id e19mr9943889eje.47.1555945515802; Mon, 22 Apr 2019 08:05:15 -0700 (PDT) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id f27sm3712688edb.77.2019.04.22.08.05.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Apr 2019 08:05:15 -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 v4 4/5] nvmem: imx-ocotp: Add i.MX8MM support Date: Mon, 22 Apr 2019 16:04:59 +0100 Message-Id: <20190422150500.11082-5-pure.logic@nexus-software.ie> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190422150500.11082-1-pure.logic@nexus-software.ie> References: <20190422150500.11082-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-20190422_080517_822784_E5FEEC81 X-CRM114-Status: GOOD ( 10.81 ) 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 Reviewed-by: Leonard Crestez --- 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 2fa45d1d17eb..cb056765551b 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -451,6 +451,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 }, @@ -461,6 +467,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);