From patchwork Thu Apr 18 21:42:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10908081 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 D751014DB for ; Thu, 18 Apr 2019 21:43:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB0EA28D2A for ; Thu, 18 Apr 2019 21:43:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEDD128D81; Thu, 18 Apr 2019 21:43:01 +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 2653928D2A for ; Thu, 18 Apr 2019 21:43:00 +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: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:In-Reply-To:References: List-Owner; bh=wcGPoxhyMt/Wx1oY+tTAhF2ynnh32calinhLAvJOHRg=; b=tsLFOGExhqjCLw Zx4JOIdqMiVi50GHy9j2NqzbTaijbE6NQWNQKjqWN3vvoHZDyGO9RGh+Cclv73ti8tMRCkwCAW2rM WZ4goSRPVyM8Kufoy+klc7SoDXoTKVKwFDgw9nByj3/2xR3tccuys9UkfEMcHyB+C8VAgl8OFU6hB FHME+grzn9YIkXBBZDl1PuaUKvmJsvV05mI087fws3ocKVaWZb1AbYh2n6zGMOC2lz2REv5KjFVBm zpjg9/ktX5nhgmn546y993yiEbnQVqhmZ7EjqVnNsEwQLn2/Yy7nEneUXjMk+Q5+wAQdilI0shP+X Qs6xCaJ/tmWAe7eBJrHw==; 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 1hHEo4-0005Sl-Tq; Thu, 18 Apr 2019 21:42:56 +0000 Received: from mail-eopbgr20042.outbound.protection.outlook.com ([40.107.2.42] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHEo1-0005Rw-FK for linux-arm-kernel@lists.infradead.org; Thu, 18 Apr 2019 21:42:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g3hW9SHGD496U5VI02tj4XXb5IS1tdGSBDb6uHNf6Qk=; b=Xd30GAzbHySyicTvXzqhiPCUvOCooQi31pISAyKdR0BrO/+VvjxMeE4mEoA5Pd/TLRqcVibUF4S+etMUeqphGN4hhBa2FtqTUmfw4Xi1pDA3s6F9lJZuWSisZqVXJ2XKNCPO4gJbUHCYTa4+IgSB1fFtsQEbuscnOVR0jDGtcQE= Received: from VI1PR04MB5533.eurprd04.prod.outlook.com (20.178.122.159) by VI1PR04MB4335.eurprd04.prod.outlook.com (52.134.122.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.14; Thu, 18 Apr 2019 21:42:48 +0000 Received: from VI1PR04MB5533.eurprd04.prod.outlook.com ([fe80::cca7:43cf:dc13:a822]) by VI1PR04MB5533.eurprd04.prod.outlook.com ([fe80::cca7:43cf:dc13:a822%4]) with mapi id 15.20.1813.011; Thu, 18 Apr 2019 21:42:48 +0000 From: Leonard Crestez To: Lucas Stach , Peng Fan , Shawn Guo , Srinivas Kandagatla Subject: [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7 Thread-Topic: [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7 Thread-Index: AQHU9i+q5xGRZD4TQkmS8oULiZ/5GA== Date: Thu, 18 Apr 2019 21:42:47 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [212.146.100.6] x-mailer: git-send-email 2.17.1 x-clientproxiedby: VI1PR0502CA0011.eurprd05.prod.outlook.com (2603:10a6:803:1::24) To VI1PR04MB5533.eurprd04.prod.outlook.com (2603:10a6:803:d2::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ba8eec8e-6947-4bc9-3ce1-08d6c446cc72 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600141)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1PR04MB4335; x-ms-traffictypediagnostic: VI1PR04MB4335: x-microsoft-antispam-prvs: x-forefront-prvs: 0011612A55 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(396003)(376002)(346002)(136003)(189003)(199004)(6506007)(316002)(81166006)(81156014)(26005)(8676002)(97736004)(118296001)(476003)(486006)(50226002)(86362001)(6512007)(53936002)(66066001)(6436002)(256004)(71190400001)(71200400001)(36756003)(52116002)(6116002)(102836004)(68736007)(4326008)(25786009)(54906003)(6486002)(7736002)(2616005)(305945005)(5660300002)(478600001)(110136005)(44832011)(8936002)(186003)(3846002)(66556008)(14454004)(99286004)(2906002)(64756008)(66446008)(66476007)(386003)(73956011)(66946007)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4335; H:VI1PR04MB5533.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: C4f5Oxf1jEr/MJZDktqUng0xASuH23SOZdLCxeStedkYrGdgCQayQ0atS/M/AQgSWxJe8CUsjopnOnKQIxATxZ1uRGuezIugLNKsu5DRDjIL195kVfqrUX/xh8LoakQ5Og7jZqxCUKXlPACDlrdxUdgXFtzZynP0eE5daP6DhCWvOLG5e0/Uh0e8VMpkgo0VY9+WOcXjC56IHdDBoBivauCfJyg5Gsmi0K3jdBoAMgYdiOQpS0em4A25r0Lo/mKM+m6K1UJlr6mbcld77z04XlhKu+PaTvM06jPYkvcHXSaglGugmaifLlmFSciitlA/YJ33hRcTz/eGMQ/K5oEp1W85Q8LitZqvQMBFIaAijyTgxf6bNHl7WNdUqVMvWSnkDaMspUYg1JslTP+5Ap/ZUUw7pyFis13bPIVYv9acZbo= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba8eec8e-6947-4bc9-3ce1-08d6c446cc72 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2019 21:42:47.9389 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4335 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190418_144253_588040_BBA9C7CF X-CRM114-Status: GOOD ( 12.91 ) 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 , Abel Vesa , Anson Huang , dl-linux-imx , "kernel@pengutronix.de" , Fabio Estevam , "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 According to NXP Reference Manuals and uboot/atf sources the OCOTP block on imx8m behaves more like imx6 than imx7. - Fuses can be read/written 32bits at a time (no imx7-like banking) - The OCOTP_HW_OCOTP_TIMING register is like imx6 not imx7 Since nvmem doesn't support uboot-style "sense" and "override" this issue only affected "write" which is very rarely used. Fixes: 163c0dbd0cb1 ("nvmem: imx-ocotp: add support for imx8mq") Signed-off-by: Leonard Crestez Reviewed-by: Peng Fan --- drivers/nvmem/imx-ocotp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index 4cf7b61e4bf5..c3e1d9d8a537 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -444,12 +444,12 @@ static const struct ocotp_params imx7ulp_params = { .bank_address_words = 0, }; static const struct ocotp_params imx8mq_params = { .nregs = 256, - .bank_address_words = 4, - .set_timing = imx_ocotp_set_imx7_timing, + .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 }, From patchwork Thu Apr 18 21:42:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10908083 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 0BB6514DB for ; Thu, 18 Apr 2019 21:43:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E448528D2A for ; Thu, 18 Apr 2019 21:43:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D829E28D81; Thu, 18 Apr 2019 21:43:10 +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 9311128D2A for ; Thu, 18 Apr 2019 21:43:10 +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:In-Reply-To:References: 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=t5gHX5lZRwG448pYi5HqdPeY/Hbk0+YxBs/OAIoEzTs=; b=stCjUTfErNqHgr hLzvfr/m5z0vGpl4GwiMe1dkz7joPqocjRI6OUPptttcyEIWYff9phf4x8m5tQYcdg2bccpJ7Gebt Zq+Hy6qnFSJBPo8FGUKQoiUt8WOKK+bqHRk4ViglIrsZ9jPeKwqBjcUN4N3kdop4H/CNKx5hVeB7G vDhPlBo0wkOy0UYmHaxN+82nxgM79gUiydtiROIQeYBZVve1qDYe5vTpElOqpLA64OLNiAOXE+QJk zqvWf1WQSXfd4boxz2gdshG1Y0OllZ59AmfalHoJr5VPdwmnAolOuK9+s0A/jeD8Ub9Hqsoau/DeR 88nlNm+vXLz40Faq27Ig==; 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 1hHEoE-0005eC-RB; Thu, 18 Apr 2019 21:43:06 +0000 Received: from mail-eopbgr20042.outbound.protection.outlook.com ([40.107.2.42] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHEo3-0005Rw-H4 for linux-arm-kernel@lists.infradead.org; Thu, 18 Apr 2019 21:42:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pROwa7R+bw45xnhIFLZciOqKrYe2r7pZPe7LrvrI80k=; b=ihER0/iLxcxmY0q4VSF910ADrSqGH0QrlaZMMLCc6d6w3ze3/x6BtTIq0NQ/F+9I2xcuFWxkdIfyt+mrRwK514j5E2afBF5rCrcoy8rfRLaj6sc6weoYsZ1tiwcarbZTmQyTWiiq/pS6bAgzF5Vgtd4R3FRzP4BjhQj0e8gpHXA= Received: from VI1PR04MB5533.eurprd04.prod.outlook.com (20.178.122.159) by VI1PR04MB4335.eurprd04.prod.outlook.com (52.134.122.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.14; Thu, 18 Apr 2019 21:42:48 +0000 Received: from VI1PR04MB5533.eurprd04.prod.outlook.com ([fe80::cca7:43cf:dc13:a822]) by VI1PR04MB5533.eurprd04.prod.outlook.com ([fe80::cca7:43cf:dc13:a822%4]) with mapi id 15.20.1813.011; Thu, 18 Apr 2019 21:42:48 +0000 From: Leonard Crestez To: Lucas Stach , Peng Fan , Shawn Guo , Srinivas Kandagatla Subject: [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m Thread-Topic: [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m Thread-Index: AQHU9i+qxY12lJxNoUmkeP7k2EKl/w== Date: Thu, 18 Apr 2019 21:42:48 +0000 Message-ID: <1d5445bb8a2e63da681073107ee78d423c84bbb1.1555623532.git.leonard.crestez@nxp.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [212.146.100.6] x-mailer: git-send-email 2.17.1 x-clientproxiedby: VI1PR0502CA0011.eurprd05.prod.outlook.com (2603:10a6:803:1::24) To VI1PR04MB5533.eurprd04.prod.outlook.com (2603:10a6:803:d2::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dbfb4dc5-c8f2-4142-be87-08d6c446cce6 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600141)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1PR04MB4335; x-ms-traffictypediagnostic: VI1PR04MB4335: x-microsoft-antispam-prvs: x-forefront-prvs: 0011612A55 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(396003)(376002)(346002)(136003)(189003)(199004)(6506007)(446003)(4744005)(316002)(81166006)(81156014)(26005)(8676002)(97736004)(11346002)(118296001)(476003)(486006)(50226002)(86362001)(6512007)(53936002)(76176011)(66066001)(6436002)(256004)(14444005)(71190400001)(71200400001)(36756003)(52116002)(6116002)(102836004)(68736007)(4326008)(25786009)(54906003)(6486002)(7736002)(2616005)(305945005)(5660300002)(478600001)(110136005)(44832011)(8936002)(186003)(3846002)(66556008)(14454004)(99286004)(2906002)(64756008)(66446008)(66476007)(386003)(73956011)(66946007)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4335; H:VI1PR04MB5533.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: JDDrfQFBGEauHX5cPD0AXSlhwKUQNrgAiJLc1Lvewfc/oe4o+gjj+WAB/4yZz5F82un65x3pBZl05z1Yo0LU0mrF4r6VFB8tHH3VnskTZ3hch6EcThJYJLhoFH+SxsGYJFRKAFBDv0Ud+/EH70WzdkuwSP94uUAV0mOKufcIHs0Js4AVi/IHcU+sAqHU0non1fPzlWdJbZj6cbx7z+p90yn7oFn417VgNrc6xDA0c3cqJVzHBVx/lxZtwly+DBfqFKZOo1GLM7uVqWm3BvnkMv0Et8w0t0DvyMWPdoDd6rC75GC6ZkRDd418g5QQLTo9LDOzr2dkOpR3nIxl/Gc4fKyrycRi/E+3hiXUtjXiL88q5qgUnmA5ALMFaSk5KCYdH+oMY8AUNE9oaLmGEVEsGBHba0g0ohwzNRsB24bcL04= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbfb4dc5-c8f2-4142-be87-08d6c446cce6 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2019 21:42:48.7755 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4335 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190418_144255_563237_8221930E X-CRM114-Status: GOOD ( 10.66 ) 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 , Abel Vesa , Anson Huang , dl-linux-imx , "kernel@pengutronix.de" , Fabio Estevam , "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 Enable imx-ocotp nvmem driver for fuse access on imx8m family. Tested on imx8mm-evk. Signed-off-by: Leonard Crestez Reviewed-by: Peng Fan --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 483d0e251f37..a308869ecdf4 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -745,10 +745,11 @@ CONFIG_PHY_UNIPHIER_USB2=y CONFIG_PHY_UNIPHIER_USB3=y CONFIG_PHY_TEGRA_XUSB=y CONFIG_HISI_PMU=y CONFIG_QCOM_L2_PMU=y CONFIG_QCOM_L3_PMU=y +CONFIG_NVMEM_IMX_OCOTP=y CONFIG_QCOM_QFPROM=y CONFIG_ROCKCHIP_EFUSE=y CONFIG_UNIPHIER_EFUSE=y CONFIG_MESON_EFUSE=m CONFIG_TEE=y