From patchwork Fri Apr 19 10:03:24 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: 10908747 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 B569317E0 for ; Fri, 19 Apr 2019 10:04:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A414828D60 for ; Fri, 19 Apr 2019 10:04:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 97EE028D64; Fri, 19 Apr 2019 10:04:18 +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 2859F28D60 for ; Fri, 19 Apr 2019 10:04:18 +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=BjtsJLLem5mF0w24/6WRvxiKIs6NW531bEHkidArHW4=; b=UkMtz8YMSFlcjT bBQ01YIYmIiDbSPTvWK31XujkH4t8skreTy7IxW76DW3DH1y8lWqclhSPbNDmRLHDOTsWtUE7RzY4 n9C+nv2R/VBewoXhTDSJO6/v26nuIVwdmlqb8MulniOhBgX82td9lnYUZz9ayauXlq5JrHO3yH+O7 ni0QijSYxaHOz1OC4FbQLdbm8jqSDdkXAIgRcHaLFRTiqR87jcHlLQ3xvJI4HrNeytal4dgVpLYvs IJGh3QtaQ9ek+XfGFuhWQJ9y9cBtI+q0lRxFfI/WkR0ZA7WDPeNT0WgXdt4qJF1TDcuo690bKengl g7pq6u5e3VE8pk4IOxQw==; 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 1hHQNP-00009I-Ng; Fri, 19 Apr 2019 10:04:11 +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 1hHQMq-0007tz-05 for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2019 10:03:37 +0000 Received: by mail-ed1-x544.google.com with SMTP id j20so4046146edq.10 for ; Fri, 19 Apr 2019 03:03:35 -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=P8axtnXtXhMC1F8g/L5KbaVyvGMbul0HSgYrI4wo5rY=; b=N8Y/2Eid8bJ1sc5CLcs4vObSTr8UdyCOlgJlHJDxaBjNrWCIwbMbd2xvH1qlXMsMWz fe2/KSEEkfcuD8tP2jDUwk4EHhSyjzCXWaZ1/IsYetFsdRX3aVH0kdCSjHrggK4bojMC px8jUOA5P+Q4LHdhJewDw5376JOPNPLdqqeC5mFDmT9Y6nVIIBntqyWyqjbNqHa9h972 tvFDXDnzibZFBPs9j5NW8uFRMcUUJkZ7DiMNZZw03FwgBqrz3IY+l7ItOdFf4gsVk0sm 1tjMoC7WGp3AoDivKDqQpJCwOlW61qpdEx6FZ/5Mf2+LOBZzY7Un7cKazgagjOwO6TTq Lriw== 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=P8axtnXtXhMC1F8g/L5KbaVyvGMbul0HSgYrI4wo5rY=; b=l68ppCFhIPTIx9KKZ5sOrBTJ7z6YTDAJx2HN2GlVk8huLC1+1nqPAzYyCdu6AhdMvz KfrvXJU3OOwrnRfwjld6feHYHuAPVBxniPcIfM5nJOvrwipgOiovb3bJ/TYYxC8b7Ykh xRw/oDCOOKL2w9doYW5Wy/2DxLVHj9bBbS+Gufk3faZFpNAkZOaWoLDt9ihjzXG5UVbz UhRqb06goOGuFbfTFHEgbQeerlhGVzGuCIgznM/tpd69wLNpSEemNraLug2jIEvBHavW 5gvSopxongxeGitf7ea4DuHiJCoN1Sf5PIjfUcWT/m/yII7Okh2qri1u0oIem5bTw2Wq oaMQ== X-Gm-Message-State: APjAAAXKedYMDU0nBJzc27iqExM3Vc7LP/d9raN13ZiuNv3+uaDcYOVt GhzhlrLz8Hy3AyeaLe5U/wTYGw== X-Google-Smtp-Source: APXvYqyIvvBXsEm+kv8l5jklDjLIhj/HTZsgko8fzXUpSTcIvhBl6KXIQXCycmg4Ry3Jix2X6kGPSQ== X-Received: by 2002:a17:906:f14b:: with SMTP id gw11mr1571780ejb.59.1555668214612; Fri, 19 Apr 2019 03:03:34 -0700 (PDT) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id b11sm1254512edm.5.2019.04.19.03.03.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 03:03: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 3/6] nvmem: imx-ocotp: Add i.MX8MM support Date: Fri, 19 Apr 2019 11:03:24 +0100 Message-Id: <20190419100327.31483-4-pure.logic@nexus-software.ie> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190419100327.31483-1-pure.logic@nexus-software.ie> References: <20190419100327.31483-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-20190419_030336_035877_7F56CFCF X-CRM114-Status: GOOD ( 11.76 ) 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. Signed-off-by: Bryan O'Donoghue --- drivers/nvmem/imx-ocotp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index 08a9b1ef8ae4..b6e71c34a393 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -45,7 +45,12 @@ #define IMX_OCOTP_ADDR_DATA2 0x0040 #define IMX_OCOTP_ADDR_DATA3 0x0050 +#if defined(CONFIG_ARCH_MXC) +#define IMX_OCOTP_BM_CTRL_ADDR 0x000000FF +#else #define IMX_OCOTP_BM_CTRL_ADDR 0x0000007F +#endif /* ARCH_MXC */ + #define IMX_OCOTP_BM_CTRL_BUSY 0x00000100 #define IMX_OCOTP_BM_CTRL_ERROR 0x00000200 #define IMX_OCOTP_BM_CTRL_REL_SHADOWS 0x00000400 @@ -444,6 +449,12 @@ static const struct ocotp_params imx7ulp_params = { .bank_address_words = 0, }; +static const struct ocotp_params imx8mm_params = { + .nregs = 64, + .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 }, @@ -453,6 +464,7 @@ static const struct of_device_id imx_ocotp_dt_ids[] = { { .compatible = "fsl,imx7d-ocotp", .data = &imx7d_params }, { .compatible = "fsl,imx6sll-ocotp", .data = &imx6sll_params }, { .compatible = "fsl,imx7ulp-ocotp", .data = &imx7ulp_params }, + { .compatible = "fsl,imx8mm-ocotp", .data = &imx8mm_params }, { }, }; MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids);