From patchwork Tue Dec 15 08:35:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Alice Guo (OSS)" X-Patchwork-Id: 11974227 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77B6EC4361B for ; Tue, 15 Dec 2020 08:39:28 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E3F320855 for ; Tue, 15 Dec 2020 08:39:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E3F320855 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=tcqj1Wy0KdQv0DC9TBGiyJd6gc75l+ZLDzcUVPHOJP4=; b=JHBysAEnm1aux/zs1AkcT4M/Y HnQqM7413xdNusYtqaZQ4oHvYWzw8aM0xQxnr+YrMho9Hf7dxhkearYKdSuNm9MHEnb+oOLnTAylb Dz3PiTIg/oxNHwX42UyI17rv9eiCkFPDHyXQbJgtTwKDBLklk64CQzVNpy2/Puyejs3nkPSd0JJn3 e7FOHrBZ7yYBsn7EWBRsIrmQBvZGld4jpGXn8f8Hbl+MCSBe3GC+73MeXWw6svkf+6Nd9wrBMAYEb 7iRuX6k1x8zE9bfbYf231vm89mkQunwKWSznN/syor7hD5nxGzrx9kPxgcRwI9UVd506bdtMHj+10 OSQirzHCg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kp5qW-0001zX-3A; Tue, 15 Dec 2020 08:38:12 +0000 Received: from mail-eopbgr140071.outbound.protection.outlook.com ([40.107.14.71] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kp5qS-0001wh-KD for linux-arm-kernel@lists.infradead.org; Tue, 15 Dec 2020 08:38:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E1UAerOzd5Ir010y7AT20sOw+ta1dbNxQDSqF+Y3UQAtGfYmaudkRL0MGfphkQamviiCb2O3Oaf2z6WFiBTrHbqweSqlNGOLLWrjATfxVJ+PHnzhz2oEu2L5ZO1KIuP1V81TEB4+QkCGmdMFZHLWrDd37o2VMOzIf4b3fMgJWJhHmO1/PzsHiQNiFSLHFya2tK3HjXYdHlUDguZ/C7SLMAZPzHjwsFk6hgIVn+fgX0yn4R91Y6YkZfTeGHaM3z5zPUXyrmpcd6lXSCcc1egtBGNXEG0ieSIaP/kmc3klxwwu5pSjEloLRhaA/eRuPI/w4mSQvjkOaPOngXf1LLw2Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qCKi3w2kSLf60DaMObFPJH0RcGwUYPgITeLbiN1+W4c=; b=NlX/dUaFtiKFdMai9NMGMgVsrtDmDPa2HFnyEmj8V61hNGmjXbh6CJYUfS72WCT7+rI7k1VlwkCcByWN420zYERLEP0XPWrV5O7P3e5mB3fCWFPT8LuyJ/mwRI10uvw8nyKxWj6Izwj0PdM9uvm2o3TDG0ekoqTDtBanKvZd/+1IPJNKNYZEgjxYlCsfLZVjcVUshq4M1DPqToJjAbYcsnNK/mcOThxmUYjDvQ5iat4wPSHhsaJX9GtWwUWoAI6WB92cB3k9gD6cvnnnuVwfZCH97UYbHmV3Ehpx8fAfFWQjGoaRBreWKUdQn6PZT8UxR/Ue1N/Mr8c/EGBBsyt3sg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qCKi3w2kSLf60DaMObFPJH0RcGwUYPgITeLbiN1+W4c=; b=HnJyPljXw7s4JGzy6gKwv1T9sWZ9bfJtk9G1/pzDw2L77WPq2GQPD3o/j4Wiw0jkgmQkB4VnGWcXiNjSPFMCKK2P0n85H+ESw7xbBVDIW4jPFs1a69bw+sZLpMbtjAllR+iqfeOV4J8/I2oDH1zOb6AnAQ9KOHEypd9LuC3U5/Y= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from AM6PR04MB6053.eurprd04.prod.outlook.com (2603:10a6:20b:b9::10) by AM7PR04MB6807.eurprd04.prod.outlook.com (2603:10a6:20b:104::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.14; Tue, 15 Dec 2020 08:38:04 +0000 Received: from AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::78fe:9b7a:a2ac:9631]) by AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::78fe:9b7a:a2ac:9631%7]) with mapi id 15.20.3654.025; Tue, 15 Dec 2020 08:38:04 +0000 From: "Alice Guo (OSS)" To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, krzk@kernel.org Subject: [PATCH v7 3/4] arm64: dts: imx8m: add NVMEM provider and consumer to read soc unique ID Date: Tue, 15 Dec 2020 16:35:50 +0800 Message-Id: <20201215083551.6067-3-alice.guo@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201215083551.6067-1-alice.guo@oss.nxp.com> References: <20201215083551.6067-1-alice.guo@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0250.apcprd06.prod.outlook.com (2603:1096:4:ac::34) To AM6PR04MB6053.eurprd04.prod.outlook.com (2603:10a6:20b:b9::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from nxf55104-OptiPlex-7060.ap.freescale.net (119.31.174.71) by SG2PR06CA0250.apcprd06.prod.outlook.com (2603:1096:4:ac::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Tue, 15 Dec 2020 08:38:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 979a4ad3-8c98-4ba9-389b-08d8a0d4bd66 X-MS-TrafficTypeDiagnostic: AM7PR04MB6807: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:506; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: muSDhqtWbm7n8foT1Vs48kX7UtSBXsfIQkc8uXLITKigAdvALaT+t/IFeDr1+sY5w7gwzUSiRoKSrcrxI8y3oCnhZ96Q+AIqAsieXiJfvvfkuJM/r+8rsSkxtD4zENzH6UJkYu6PNDv/i2LPDvI/MRrSDZaX93zIu+LVlb/iKgrqqHWq4llwT5YJShYuL4vka4UvHqglnLkrrc6UNllZkGaNur4uI2XYDLcE3/xIN1yA+rRoeafWGKpFyLmQdskSzF9IPpUp9GCvbL03XV7A8nItiEncuMQWSNIqSQjOr7FamLzd5pXAKleeHlamuZqtQXc3PZMnI05IcqKbGJmB3YBo8ILo3vsBS7a3DrCfLhJWcPf4S2QKQV0yjjx4COC1 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6053.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(346002)(366004)(396003)(39860400002)(83380400001)(6666004)(16526019)(186003)(66476007)(86362001)(26005)(8676002)(5660300002)(6486002)(8936002)(316002)(66556008)(66946007)(2906002)(4326008)(1076003)(6512007)(478600001)(2616005)(956004)(52116002)(6506007)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: /8zjayraom9RFXwrGLCm29XTWw0yVSkctY5SrgoCNAyYyaPeLkdxWvepXwhfE3E6FroUYP61xE9c1KXh48b8OFDyqTsq1YvMAapSCfpBGjLZfUbfxyIX7I2JWNpf2cnovxncsDNlmIKC6pyxsrC3XV4N5dcmPYtnG8tM+inVkcgXQL+qryUEB6WxB1TEIGJ7+08TSFWzaNF2WC4XjIEKDLN0v3ZjyK6R1YT/zunJPU7XfGhvc9ue+qTYbOsKDfwcH0jGzWI8TkHaRiMHhDggobCTES4H5Wf1+cyLUlFAOvhOvvYjN2pi+jmo3iiVzCp2btoe7DeW6Js0mfo/AMVElU5fSTbX+gNWKKMz1Dy8RoOPEnNY2ib7Kr705leMk/1Xov5SSsAhfAxhJWDlVU1rVrYKr+b3lCCqKk3dwlWORRSH2/0beQHWb3GBJFL7nUD8Q/1YNovtc5wW1klMZZFF78R85vlBUUvUwpgSfpGoDpOXdnha2KtLHR3F5SgMwCZrmJePRqz4naG2jJwH/GoXATn0LR7VadZj9vhbDFA64BDF5jDa8gBeS1RIhgpiQEHrOv2fq4HDGTprlxEmATcDjWBELvRm7WMA13BETW+qa2YSyDkY7AoSA7z6quVa61h7swTnYPuftgcLsCsmfBwl09bQWKFC+Lpbky9HIn2pjC7lf4HgCi51MIKjGf7u3LhimgGEb3WnswFRl8WkHFMfl7vwSZ3ceTDOQNu3Epb0TVoxKX189z0kGPhxo1gI6CU6b6Syjg+aaYdJed9rZykoimjmuvwbUnKbLE/FZZQ24qS9NPFKq5qHnPf7a2DiU2KMUf3lzfCNTC/EsohznCwR5mbC5ObshpjMUNhX0tzgDabNd9O8Ab7Owk5oIq8oWyw3rJKLJrLmz2ub1cxR/RMx/5AcDCfm+Rfz4loJLtIBQe8IZ5/zae4/6yAt0rRLAteXYIHTC0iInxG+civ5JUB7b9/FpP8ndqfR59nhQk35EQE0uYelbtHYo7rVtwQzGFqn X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6053.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2020 08:38:04.2759 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 979a4ad3-8c98-4ba9-389b-08d8a0d4bd66 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rJIIZTWygxFSZusKIVtGUppAYxe9so+lfEug/3/CDxU5UnNrMxcQ67PReolFz98Ija6gPTsw87jB1ePyOKQ7gA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6807 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201215_033808_710191_1CEC2718 X-CRM114-Status: GOOD ( 13.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Alice Guo In order to be able to use NVMEM APIs to read soc unique ID, add the nvmem data cell and name for nvmem-cells to the "soc" node, and add a nvmem node which provides soc unique ID to efuse@30350000. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alice Guo --- Changes for v7: - add Reviewed-by Changes for v6: - leave only the changelog under '---' Changes for v5: - change underscore of device node to hyphen Changes for v4: - delete "stuff" in subject and commit message - add detailed description Changes for v3: - convert register addresses and sizes to hex Changes for v2: - remove the subject prefix "LF-2571-3" arch/arm64/boot/dts/freescale/imx8mm.dtsi | 6 ++++++ arch/arm64/boot/dts/freescale/imx8mn.dtsi | 6 ++++++ arch/arm64/boot/dts/freescale/imx8mp.dtsi | 6 ++++++ arch/arm64/boot/dts/freescale/imx8mq.dtsi | 6 ++++++ 4 files changed, 24 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index d457ce815e68..9bee6f1889a4 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -261,6 +261,8 @@ #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x0 0x3e000000>; + nvmem-cells = <&imx8mm_uid>; + nvmem-cell-names = "soc_unique_id"; aips1: bus@30000000 { compatible = "fsl,aips-bus", "simple-bus"; @@ -518,6 +520,10 @@ #address-cells = <1>; #size-cells = <1>; + imx8mm_uid: unique-id@410 { + reg = <0x4 0x8>; + }; + cpu_speed_grade: speed-grade@10 { reg = <0x10 4>; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi index db50e6e01ac5..b344fdc16534 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi @@ -245,6 +245,8 @@ #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x0 0x3e000000>; + nvmem-cells = <&imx8mn_uid>; + nvmem-cell-names = "soc_unique_id"; aips1: bus@30000000 { compatible = "fsl,aips-bus", "simple-bus"; @@ -531,6 +533,10 @@ #address-cells = <1>; #size-cells = <1>; + imx8mn_uid: unique-id@410 { + reg = <0x4 0x8>; + }; + cpu_speed_grade: speed-grade@10 { reg = <0x10 4>; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index ec6ac523ecfc..9401e92f1c84 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -222,6 +222,8 @@ #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x0 0x3e000000>; + nvmem-cells = <&imx8mp_uid>; + nvmem-cell-names = "soc_unique_id"; aips1: bus@30000000 { compatible = "fsl,aips-bus", "simple-bus"; @@ -328,6 +330,10 @@ #address-cells = <1>; #size-cells = <1>; + imx8mp_uid: unique-id@420 { + reg = <0x8 0x8>; + }; + cpu_speed_grade: speed-grade@10 { reg = <0x10 4>; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi index 9b6d9307e5d7..a2a885f1a07a 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi @@ -291,6 +291,8 @@ #size-cells = <1>; ranges = <0x0 0x0 0x0 0x3e000000>; dma-ranges = <0x40000000 0x0 0x40000000 0xc0000000>; + nvmem-cells = <&imx8mq_uid>; + nvmem-cell-names = "soc_unique_id"; bus@30000000 { /* AIPS1 */ compatible = "fsl,aips-bus", "simple-bus"; @@ -555,6 +557,10 @@ #address-cells = <1>; #size-cells = <1>; + imx8mq_uid: soc-uid@410 { + reg = <0x4 0x8>; + }; + cpu_speed_grade: speed-grade@10 { reg = <0x10 4>; };