From patchwork Fri Apr 19 10:03:22 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: 10908743 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 EC21F14DB for ; Fri, 19 Apr 2019 10:03:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D929B28D60 for ; Fri, 19 Apr 2019 10:03:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB75628D64; Fri, 19 Apr 2019 10:03:57 +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 6657028D60 for ; Fri, 19 Apr 2019 10:03:57 +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=gJZhGvwU4GDw3Q6KibxMvXIkuC1Ny+xH1pytDtsgGbw=; b=Vpfk0vVjnClnd3 WG7pUogpmZ69YrmajQlnN+w3OJtdwlVAOCHJiOal3LZ0GdtWLugScbOk7G1L/HUKL4XYRfcySzPUp j3vEH2tirsy0UXXv1ghIewzFH5wBkueihRRLvyct9D/jREYRHNdDZ4ji+K8WU0czGfLz2bjOWvJAs BAD+CSNLamWHDb0qsw8LpT09q4zgT/9WNPy59pKpo90m3FBx/IOYNlmluK9tdIn/mbnjWhVYc5Q+R 9W5Rz/twc1hnxUpsh9dj2c0SDiUSxnbXfiwy0tN18Eax8QhUZuE3c+7I0phCU62W+wAfY8dPbe9UH 5fRpoIF/Qxj7/LqjyzwA==; 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 1hHQN6-0008AW-2k; Fri, 19 Apr 2019 10:03:52 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQMp-0007tO-2Z for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2019 10:03:36 +0000 Received: by mail-ed1-x542.google.com with SMTP id d13so4066893edr.5 for ; Fri, 19 Apr 2019 03:03:33 -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=uyWLuzxsw9CsCxkwi2GO0lcaBRKjpOufaOHITA+goCY=; b=cxFuXDbD8/UXS278KHaKEe11Tr29z+FAHb0PuFTK0do9u+0Axk1iQzZFw4du3kd2G4 ySDQ773uzLltlz0KVlzvYQZl/U+P1tJ4FSK0iu9hqIrlKZPsr8EEmjc4OlzXF7NI5Adj kwPHVz8xQgeVY0LP/TbfNH5CTuK+IvxcY7p5Lo2ky+qQv/xjEjKZf95GQINCoKBwUQx1 52R5B21wKfUCWSO6bhIWWSaOiBjUscrik//brnWPmbhAy4MNl8rlpCfnTAnMrss9bfqb AybS926/9F93TDDtTBmMn/+D0PE6pyOVytF92t8uv9JRZuVVX/91r9yXminNw5qtfWUf I8Qw== 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=uyWLuzxsw9CsCxkwi2GO0lcaBRKjpOufaOHITA+goCY=; b=LTQKSTbAkqYqHzJHYg7zsUsgqe3OqJ2KxljcS7wHtvOFlOdgks1YKvYJAIMFsGvmEY jLOO3koOdEKfQJvnj10Uv7Gzn6YIMUIy9/GcCoysrzMJ1lKxRe/3O/+frlF3esGjATKZ 1UzFMaVersS14yeVIcrf0/HoudB3aCik+IZC8bCi+cNIjCk5PvpnvgtNVkB00ZpEEg72 exQJYxbp9LfzXfzWDIjeMGslZWhRmTL3WUWqWJ7CU+rwZPiHGvTxtIXiCx6DuNG43f0e KZ2GPNbJRUlouxVRdpBTTkVyYlyIKViG58GWzzyqL5xwQNMng1x1a1SE8wBJFnHR7EOu 6/vw== X-Gm-Message-State: APjAAAWPUWrs/nVY7BJfAMnJw/kFvPwKye+xO5qWV6D4vITyNFT2xZSH d4TailTrp8GFy7e04UNM4VU6OvgcjO0= X-Google-Smtp-Source: APXvYqzfc/TOmciyGRNmM3ZqAyqVP59+DzpIdvMySzayhD8kNYPZd8DiNFivuCvCMonxBE1fV8HFEg== X-Received: by 2002:a17:906:32c7:: with SMTP id k7mr1606647ejk.42.1555668212460; Fri, 19 Apr 2019 03:03:32 -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.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 03:03:31 -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 1/6] nvmem: imx-ocotp: Allow selection of OCOTP for imx8 processors Date: Fri, 19 Apr 2019 11:03:22 +0100 Message-Id: <20190419100327.31483-2-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_030335_115780_A89C7564 X-CRM114-Status: GOOD ( 13.26 ) 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 allows switching on of the i.MX OCTOP driver when building for i.MX8 processors. Signed-off-by: Bryan O'Donoghue --- drivers/nvmem/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig index 530d570724c9..4d1c8778c064 100644 --- a/drivers/nvmem/Kconfig +++ b/drivers/nvmem/Kconfig @@ -26,7 +26,7 @@ config NVMEM_IMX_IIM config NVMEM_IMX_OCOTP tristate "i.MX6 On-Chip OTP Controller support" - depends on SOC_IMX6 || SOC_IMX7D || COMPILE_TEST + depends on SOC_IMX6 || SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST depends on HAS_IOMEM help This is a driver for the On-Chip OTP Controller (OCOTP) available on From patchwork Fri Apr 19 10:03:23 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: 10908745 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 C868E17E0 for ; Fri, 19 Apr 2019 10:04:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B71FA28D60 for ; Fri, 19 Apr 2019 10:04:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB00A28D64; Fri, 19 Apr 2019 10:04:04 +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 5F36D28D60 for ; Fri, 19 Apr 2019 10:04:04 +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=EMWyftdnXLnkvyIlPUeCLWvco+hBi7pyc42Q/dgHbCI=; b=az/KSACW43CzE0 BRPeiBrberEK7z38M7g6fzlmRErszJX3fq4l+YF4wyxxjR8ABCSWp0aBaoCIoJp1Qd7LOXdlCTRLP VtxLkDoS1vS7sXwdZhmPErIJ6mQle1fg5jZBIBe4Shjca4vRmODEeI+QC+zWZMNpHojtzJADWxMu9 bmxB68CBDndeU8Tldg0dZO3HQt/6bMzhm3799/oLh0wfshFPVTYZ3Rw9JPXhjRvMdrIJP+p5x34lZ Ca4Q04bekTS+Aqw8TIikoRxiil2thArdfTLSi4jMo7FIotrFmZs2FThgb9BGHUJMZKAa3TcvdsoIx SI3dKOG+ELFY+0/ABWUA==; 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 1hHQNE-0008MW-2f; Fri, 19 Apr 2019 10:04:00 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQMq-0007tY-EA for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2019 10:03:37 +0000 Received: by mail-ed1-x543.google.com with SMTP id d46so4059748eda.7 for ; Fri, 19 Apr 2019 03:03:34 -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=fxQTln/5gYKWyp3lX042A2YsybSmDsn578d0hMLecGE=; b=j3bmNoKsXKrdqExlwp21lv8SQWVTCYQjnkNZrQji5lSR5dtmgGdy71EZBczmOpQSoR u7L6zljiUXXhgE42ajIegFn9ZDpAubgSAN4Kd6X6XnX3H+c5zBzxZxjW3YAVe0QAPHeS hS4PjXlBThtkbYarYbvW3mGC0TmxhEdu8JYaAXKSA9q3g3g9AHSedRVdxTSoSlt2twfQ KfLcHXr7m4EAUl/7keHBWitiI+RV0cGMFfd8G3xkP8meCWqRb+PBT3eC9p+Qt+KkSMr5 Qre/vCYTozfT2IquBGd7IvpLS4Q+6dvle9rq4T/7w8pQ2qdWWcF7subnw7x9ZWEPRANf huKg== 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=fxQTln/5gYKWyp3lX042A2YsybSmDsn578d0hMLecGE=; b=r+s37EXogHy9eq/y0SaPDGICKAWMUcMT4EDyq8zpfIW9A7/TWsVH+8UXZFKubFmEnu VTz8368T5rmiy5zK2f2Zbz1OqIS+kWft8IJHebzINeL7dY1/U30SixPUfNBPs54YVAaD SioHSihRQPnoWfliJLxtXeG4YED2+0OSoQsv3lBTTty0NQvyylmWXrQiaH8lC0w6LpNj IoNxcJQM1nK3yScJjNUZuA98HHFT8/oNU/qxK/PhKdPsBstnkMtxektAbDRVTernoINO 7XnatO3nHg1vcBD7zbjK2R7uLrJqTGfNTPOzpaogcASZwlmbg7G+RIktnKg1SnwFHIBs PyqA== X-Gm-Message-State: APjAAAW5qE4dsT3L+ZownwGQubR1NVQC/D1WqJyrmEC0AnCS1LM5zOon dI7koj8w36YLUiCVGTojsih3PA== X-Google-Smtp-Source: APXvYqzo4+1PVxCC/lFkwfjphUkCzEqPWDQfyPikTJKhDMfdntvr2hoHv20ayq7BZpr4VhnplPjMuQ== X-Received: by 2002:a50:a4c3:: with SMTP id x3mr1954934edb.190.1555668213531; Fri, 19 Apr 2019 03:03:33 -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.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 03:03:33 -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 2/6] nvmem: imx-ocotp: Fix i.MX OC-OTP naming prompt Date: Fri, 19 Apr 2019 11:03:23 +0100 Message-Id: <20190419100327.31483-3-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_473387_C64E6B88 X-CRM114-Status: GOOD ( 12.14 ) 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 The imx-ocotp driver supports i.MX6, i.MX7 and i.MX8 but, the Kconfig prompt only specifies i.MX6, which is pretty confusing. Add the two absent processor types to the prompt to make driver selection easier to understand. Signed-off-by: Bryan O'Donoghue --- drivers/nvmem/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig index 4d1c8778c064..ebd1ba649aad 100644 --- a/drivers/nvmem/Kconfig +++ b/drivers/nvmem/Kconfig @@ -25,7 +25,7 @@ config NVMEM_IMX_IIM will be called nvmem-imx-iim. config NVMEM_IMX_OCOTP - tristate "i.MX6 On-Chip OTP Controller support" + tristate "i.MX6/i.MX7/i.MX8 On-Chip OTP Controller support" depends on SOC_IMX6 || SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST depends on HAS_IOMEM help 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); From patchwork Fri Apr 19 10:03:25 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: 10908749 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 8C80F17E0 for ; Fri, 19 Apr 2019 10:04:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B57C28B0D for ; Fri, 19 Apr 2019 10:04:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F6CE28D64; Fri, 19 Apr 2019 10:04:26 +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 E8ACA28D60 for ; Fri, 19 Apr 2019 10:04:25 +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=VT+mLiPHBUEa9R/EPUPOHJzjVXuqnLPBzQMIb02Ianw=; b=rg54OivDMvfZGC kOXw3Gcbxsw0E4bprqFdvJpVWfN6Yv7chkeH1o90BAMC938k9/Y9wIJG0CqrAPYvNCTJ7zgz6K4PL GLG+Uy4gxdNIQa1fhY8k0Y9g4CpVtCqX92cWY5MTnCT0f/F6ZZ0k2K2l1IhRYeTzIYipLLXs/c/RE xHQHjQhKF4jlzOBTPns3FowT0sgKEDArXabA7UUKmk7Ne5lisdL4xZkZMiw/NPN+NZmOG7cJ/oGRi wV2P3izKon1qMFxH8kaHbC432SZ8kbI1+GudxwywGApIA5Vz7EIrdesn015Jsr/pEeodWk0zIEffW h5WiJ3nqrm9i+u/c37WA==; 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 1hHQNZ-0000Ol-Uc; Fri, 19 Apr 2019 10:04:21 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQMr-0007uW-0o for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2019 10:03:40 +0000 Received: by mail-ed1-x543.google.com with SMTP id d1so4030152edd.13 for ; Fri, 19 Apr 2019 03:03: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=4HBSGC20hf20NnPa5hdNzen9fskrVCaGqlWtn9J3Z1s=; b=cYTWf9hAGb+llE+oTmm7p/gQ5NI0q4AYY4lZ3sLJbdlY7rNc38TmSWaz5+8JpUB11M HEJeVdjf1K9HV02NBECevFqsT1rofs10USbqUntAYRViLDn468FI6zkrRHbwKDrd2nCT AQQ9xOx4z+IEvp1MeN95zPn7gL/h0uxuQ6Da5TSDkuFHY8TGVtYRqi1cTX+2KlqsL3C8 u4bH2VkZikaeknpqWEmQvRyELydzNLJapA0x2WQ6HgIkuEEzk7PAWPnxpVDsqli3WnJl 2jRKvFhmeq9H6O9A8r/6Bs5wMOVYbdUVaSr1SlRVrwM8Yo0pPvCOfDrdT8p+omqQGcdN 2rVQ== 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=4HBSGC20hf20NnPa5hdNzen9fskrVCaGqlWtn9J3Z1s=; b=NP7pt1Md0EsIuE88qL79eewQGNjHLPI8P22OMJkZnjGLf8xWssQHWIzhpH29UEQZKD xajFotmiruVLDtCdq6oc2jSx+pbXA1wfbMKHGQIubeCFX5gxAT0a8OD47OD6orin1eUz 2E3V9PTy+ua0gjWH6aq2sllo1spIYmyfgCrLU3xU1YDylKVRuilPwRx+ozxlwNA3AD8p T+GIgzuGcw64PNf14Cl3OC065A2I4xNq7/jY6XexiSktBIQoBgXH/4fl2pY99tWinMBa EuRSr5PMFWYxXIk7JepLYWLQBgQxVINqbEPkpFcHhURd0sQ7dqm0fMXAVF/O+eqRCwZD C/lQ== X-Gm-Message-State: APjAAAW6Oh2Q56y3jNMnWSK/KOef1pX9AAWDrTY3KZcNhoJzoavstg36 gO2+y/tHlemLM6E7zsXHPr4naQ== X-Google-Smtp-Source: APXvYqw2zNUCtL8WTN458AIlk8l4ZsWrEvmoNZl/RJUXocY+XnKDTBly3LVfEZfWt2EncYckK7lvtA== X-Received: by 2002:a17:906:8159:: with SMTP id z25mr1576759ejw.286.1555668215727; Fri, 19 Apr 2019 03:03:35 -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.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 03:03:35 -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 4/6] nvmem: imx-ocotp: Ensure WAIT bits are preserved when setting timing Date: Fri, 19 Apr 2019 11:03:25 +0100 Message-Id: <20190419100327.31483-5-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_030337_303845_18FF1C73 X-CRM114-Status: GOOD ( 13.09 ) 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 The i.MX6 and i.MX8 both have a bit-field spanning bits 27:22 called the WAIT field. The WAIT field according to the documentation for both parts "specifies time interval between auto read and write access in one time program. It is given in number of ipg_clk periods." This patch ensures that the relevant field is read and written back to the timing register. Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support") Signed-off-by: Bryan O'Donoghue --- drivers/nvmem/imx-ocotp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index b6e71c34a393..840d939f792b 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -194,7 +194,8 @@ static void imx_ocotp_set_imx6_timing(struct ocotp_priv *priv) strobe_prog = clk_rate / (1000000000 / 10000) + 2 * (DEF_RELAX + 1) - 1; strobe_read = clk_rate / (1000000000 / 40) + 2 * (DEF_RELAX + 1) - 1; - timing = strobe_prog & 0x00000FFF; + timing = readl(priv->base + IMX_OCOTP_ADDR_TIMING) & 0x0FC00000; + timing |= strobe_prog & 0x00000FFF; timing |= (relax << 12) & 0x0000F000; timing |= (strobe_read << 16) & 0x003F0000; From patchwork Fri Apr 19 10:03: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: 10908751 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 EC90717E0 for ; Fri, 19 Apr 2019 10:04:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D987328D60 for ; Fri, 19 Apr 2019 10:04:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CBED828D65; Fri, 19 Apr 2019 10:04:35 +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 7F3BF28D60 for ; Fri, 19 Apr 2019 10:04:35 +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=2EgNHKU1qwtSYNkpb0uwUeo3McgTqyLeomj08CZwl/c=; b=Ho6ptaRcvyyPlk qMN12ZFpdHVkTVRewiGLRbHbbBBa18kvd3bAjRSqR5ISUlFlCdfm+jDA873g4Ar0L19bWqdlM/qpF zfDFOTaldySJUuYUhXeYpjgGQXb9hLiFFQAZldu49BJvxetnQ1URfKhqulVAKQuLWOGznjU6if89f MkFuyrjtiNUNlO0BSmIOqwmk1k9Gg57XBgVppFPHpMBQrvW4nI6KbS8EgPJSJIjCf+iX+rm3WY+MB q7GRQ+BS6tq51zO2o1mrhEQJxKdArdVlyAnB/4rZxHjcUkXOnPsQeTq6VomvUFEbY147vbgnxo/Eq MYjyAfoKTCpnEvzVEf4w==; 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 1hHQNl-0000dL-KU; Fri, 19 Apr 2019 10:04:33 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQMs-0007vQ-3v for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2019 10:03:41 +0000 Received: by mail-ed1-x543.google.com with SMTP id g6so4051933edc.8 for ; Fri, 19 Apr 2019 03:03:38 -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=sLZX32upRunX2OKroEkYmtK5TWRafmOA71FpDJNzJ7I=; b=pB3Q9SMn5ImOTjG8FGb5OY5H2odnh+ttr4vJIqPHpAHHyhIoReKhykE9qq/YOJw5Zs pPjXFxwxh5DI3dBCceRMTOM3ZbZpdh9pNaLoZgXiRHeo2Vszh7urlPtPYhhbKbnepL4D xnCoQ+/q+EB+wqcsJbeqdTZkChabPAJOkkR5GNNmjFPkfukrDWM7nMzil3A2sIxf+CCq r6z76YJZ3huqDI9+lz1yT66X3jaSLMvzZGVKVSoYNvwGMKPV/eTpjYRwrr+6jGnZJvq0 Q8EXS9mi+99D3pJE9a96Ict5U8p8faJlGC9Y0aiK6gk2wk1bhl2RdnUwE+uQlZE0DsNE YVng== 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=sLZX32upRunX2OKroEkYmtK5TWRafmOA71FpDJNzJ7I=; b=fFiK+/J+ho3An3+70yNEEuyL0iyDr3zhmM6P0VmsUU14hNbdirsUUukqGAhMdsphyO qJ/z4clzvH5SAJaoCflRZsykiGVD0VmXSj71PTVm/FqQH5m0scMb6JBZ6FdHzGdC/6mN 0C+uZ8Raa9sUlrr7W/fx8ef1OKm4bGNN1kOtOcosmsiaG4A7FGSf66X26QU1C9E7juXF 4m83WhfPGgciX6gwauwehihPZuWp0v9Yctk5sSRPgzrYki8vKMJoV5+5E9XK2GI5YZMi a+LzKVDDAob1cHkQ1DzU1YomuD3TggY3wFt7nBhpAOA5osOWCwuynw0pjiPmKc+KValC x10w== X-Gm-Message-State: APjAAAXaFHJ1QrqQDKmZyabFPyH7fTvaqtV9x9NggaKJ0k7puuQ/dj5P QvEcwY/k51v5/b5xycci34nMEw== X-Google-Smtp-Source: APXvYqy7ZaQWEzlgNw1KJPnTEof/Cs8pvkIhIW5lVRm6dJFqND2jAZ4VpcuhHV6apS1LZ/Z5iJLi/w== X-Received: by 2002:a05:6402:169a:: with SMTP id a26mr1956639edv.26.1555668216855; Fri, 19 Apr 2019 03:03:36 -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.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 03:03:36 -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 5/6] nvmem: imx-ocotp: Ensure the RELAX field is non-zero Date: Fri, 19 Apr 2019 11:03:26 +0100 Message-Id: <20190419100327.31483-6-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_030338_625288_A3C569E3 X-CRM114-Status: GOOD ( 13.79 ) 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 The RELAX field of the OCOTP block quote "specifies the time to add to all default timing parameters other than the Tpgm and Trd. It is given in number of ipg_clk periods". On the i.MX8MM the calculation for the RELAX value is turning out to be zero which is not a problem for programming OTP values but, does subsequently mess up reloading the OTP shadow registers. This patch ensures the RELAX field is at least one ipg_clk cycle, which seems like a pretty obvious floor to place on a value such as this. Signed-off-by: Bryan O'Donoghue --- drivers/nvmem/imx-ocotp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index 840d939f792b..458586295518 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -191,6 +191,8 @@ static void imx_ocotp_set_imx6_timing(struct ocotp_priv *priv) clk_rate = clk_get_rate(priv->clk); relax = clk_rate / (1000000000 / DEF_RELAX) - 1; + if (!relax) + relax = 1; strobe_prog = clk_rate / (1000000000 / 10000) + 2 * (DEF_RELAX + 1) - 1; strobe_read = clk_rate / (1000000000 / 40) + 2 * (DEF_RELAX + 1) - 1; From patchwork Fri Apr 19 10:03:27 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: 10908753 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 5F4BD922 for ; Fri, 19 Apr 2019 10:04:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CAC1288DD for ; Fri, 19 Apr 2019 10:04:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E14628944; Fri, 19 Apr 2019 10:04:48 +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 DBC64288DD for ; Fri, 19 Apr 2019 10:04:47 +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=MOdtJZuxkd6zRgg8gO3y0nMzsJswBBsx53p1qacPWkY=; b=jlmfZWgyOEGwlH 3mGZ41uatyokP9SK6G9k1+opN5X7VZmvY1EdPyO0VFz8QUsFEMf9F2GW0SYC+CLywuzja6/+C5vLO eAaKec44VlfhNcgWU+3vcwThCzMHkjH0EKCDjB5FNIUGj1YpgHKU2ZVcUg78dFZ5pOm/bgasiK2my TTO+cBXqulC2Le/rEoHHUgAhBSbU29GDmzmGzQG0akI8D+7HarfFLGkLVCEdPdbHNyzB4P9DgFs1x SUWvXMtkwjjqRktLIcZkO136bbyU90YkjlVPt8vg8G9eaw8wYOQDhxC6clmcZpEhZemI1+3g1IDX7 PGxHBdH79ahQ1YaluARw==; 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 1hHQNv-0000qs-9G; Fri, 19 Apr 2019 10:04:43 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQMt-0007wm-9R for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2019 10:03:42 +0000 Received: by mail-ed1-x543.google.com with SMTP id f53so4075068ede.4 for ; Fri, 19 Apr 2019 03:03:39 -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=OwYkKNb9Eixwgqmb4kAHw5jYNGBUD6/Yu2dGeXPD+0g=; b=TJVLMk8HSbudgf/bdgy/TEgneCIIwuC43pAnKlxPsM4F0+AzBo++A8z2J523cayCjC ZKgKzbwSINJAT2u6R2S0J/5/+XrVZ0ADdhqHI1bw2yz3jOjGZwz00PYNymtdWuAEkoQF VxQJ8qKF8uApzNm2vgdfegyymFfR2OkBB+tWZGd7FzbrIGLVqB4m1CMGgNzJ/1pGQMDa PWz2pY8dxm39mM/0+vdAm427RiPviM5n+v4A3iwfYsqPDx820KrDNdP/12drPp63CKtV uU6C1Is/N013ljmN75tQGwiNfGVT1Ss+ZqmL4ANeRUThsGFV6dOHs/lxbzIGpWgZqSjA 7wUQ== 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=OwYkKNb9Eixwgqmb4kAHw5jYNGBUD6/Yu2dGeXPD+0g=; b=fLgaArcMpNAmh2gaXkHoqKL+u+NfMHO6m+/gscZMwaUNXpcwx5sWLDBwR/GcxdqgEm KVl9BuPk7x6OPhsN5LxOqGP8KQP+I0HOj9pYf6UybV2Q8EA4zQ7kv7cvCxarrxnBy2Aw V+KACJ8OPkuP9H6cl0R+/pqtNxLIHcwePUDuByg0r9xZGzBCyZUOnZAzhvSveaoZ9DG0 uf/P3TQNd8dAZ5iCbq9TYCgaw7lDPrx2mWbBpEuet4ZAHkFaJ0taI0nbBwItvr7pF4j4 bykuvSjg0WPlp74ewhf7UtFv/RQjJGGGs4Z8E/FnwXj9jemS3AtA3UC2MIWdNwUAb4XO 0a2A== X-Gm-Message-State: APjAAAUQ3wfXoUwBCcAa9ZJEeTUnMsG0kElQgKHz2syEZFyMpFqGHaZF CQBAH339Ik/f0YUYN8YtKHsy1A== X-Google-Smtp-Source: APXvYqycZYp/kA+U/GhhUHKKOhuUZobHWYMdCNHl+SJJnuvFiydx8RrFA207AiClv3dpzWRWTiobGg== X-Received: by 2002:a50:8ecb:: with SMTP id x11mr1882129edx.88.1555668217930; Fri, 19 Apr 2019 03:03:37 -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.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 03:03:37 -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 6/6] dt-bindings: imx-ocotp: Add i.MX8MM support Date: Fri, 19 Apr 2019 11:03:27 +0100 Message-Id: <20190419100327.31483-7-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_030339_712546_DFEEC9BA X-CRM114-Status: GOOD ( 10.54 ) 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 Signed-off-by: Bryan O'Donoghue --- Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt index 7a999a135e56..f3aa5935fe6d 100644 --- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt +++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt @@ -13,6 +13,7 @@ Required properties: "fsl,imx7d-ocotp" (i.MX7D/S), "fsl,imx6sll-ocotp" (i.MX6SLL), "fsl,imx7ulp-ocotp" (i.MX7ULP), + "fsl,imx8mm-ocotp" (i.MX8MM), followed by "syscon". - #address-cells : Should be 1 - #size-cells : Should be 1