From patchwork Fri Dec 18 08:37:25 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: 11981583 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 5F087C4361B for ; Fri, 18 Dec 2020 08:39:26 +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 0749322D72 for ; Fri, 18 Dec 2020 08:39:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0749322D72 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=5sIr/eVCO8GmM/Zc4QTjP8IIe4MQ0ywl7LSmjNZgunQ=; b=zRM+uykh8OYD3/8IwOcIObxp/ iXwfJlZWgAM44yJkhzKLgIDBUdAdnW/sGLOu8/BJv9plFmHr+BmhxzpNEfIrHTcYXIq4Vi0500R9y LeirdXIG73YLJi9kBY/c9NggtCVpILYbqznPr3Z/f5LE8ENqrxvv3xy006/ggs0nv/21eOxGBSptu ohoNRynVxucqAV+BMcpTRm+596/2/LWBQNmaGdspFFG9GY268FKyTDDRm8nfsQuZ00pkjzAmgEAEa 0vb/NPP5oqSvGrLgZNfLtsVEAvokoEMP7jlQhicTsylsuRlIj5v796jGmVW+Mg1BsEHqnRC6xqMNU ch9kWEyXg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kqBH4-0006Kb-EM; Fri, 18 Dec 2020 08:38:06 +0000 Received: from mail-eopbgr60080.outbound.protection.outlook.com ([40.107.6.80] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kqBH0-0006Jt-Sn for linux-arm-kernel@lists.infradead.org; Fri, 18 Dec 2020 08:38:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F/NU9G2ZZ0E3QbtjyE2KXnnyIVQvtufVEAxq7JMQTRQQI7g/l5yirnXlPvL77jiuHm1hOjQ6UciQzfcaVQHcfzbo+A5ywgjuBqvaM4ICchJzHUuaoC0GAHvCHb0T0Q3VbH9VtrXLhbBoD5TngvthGMfFGirhSZOdvvZfJYu5zC5vOgVECibGe7QG6twkbK7HLaLbGV592kgy6jAdGgCUDURGv/8Z0Df6zsoPEEnhbb8pnLOUBts9TVjOXHhI8mboZfLqUgBZw4cUU4v/jxn8J8OJ1+1eHdgCjT4oqQs1WSJTjRPG/csGnpOpWb80gDs4NALX3sGsu2LSB8pAMYVpog== 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=j8SYH+NbNYy61rFBwzHoAsIFaktYavvqqxII6NS2/j8=; b=Bmqdh89SM98E5xfybOTUbKBr6VvqAw8mmw4cWf4uxpQonOMmqnDregzHiN+VrldwxBu7Yac35c1nb0HIyZlAletrj7vSKlQxAq00VhfK4LdqOSWraA4KjHesRjgrigsMhI+XwRFAKJhb5eWqwxkwyjEGvfLjJyvGLx0RDqwphEfvGkK2P1i4O3HgTH575Q2QpwwReYy06dluGwFZiBTwpEoNUHyNKjquZjFulw7MDcuYrZzG7tXzSFR9Outf/M92d56VC4O1Om1S2Amo8odIV1ByKReFZcGuRYJa0X4jZyxE6gwEIX+B1tBIkTGf9XYLsNwwMvsKkE6EOOt6/zrcZw== 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=j8SYH+NbNYy61rFBwzHoAsIFaktYavvqqxII6NS2/j8=; b=RUUaX97qMybJNkqlSyHx53Q9S0mTSdRj5bDpeBzNwSiMcFRkw60GWOiMdJ2gK0c4AuD31egx3P+e14xoX2gD9XqKsuCn2yC5wbAjJqXuQMsmzhI0Dty0A3vNVfKa0pjVkQ3eruS0U4TQLOtGC4Yj+qk3luTlKQ+u8mwNdpYYKx8= 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 AM7PR04MB7096.eurprd04.prod.outlook.com (2603:10a6:20b:113::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.25; Fri, 18 Dec 2020 08:37:59 +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.3676.025; Fri, 18 Dec 2020 08:37:59 +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 v8 3/4] arm64: dts: imx8m: add NVMEM provider and consumer to read soc unique ID Date: Fri, 18 Dec 2020 16:37:25 +0800 Message-Id: <20201218083726.16427-3-alice.guo@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201218083726.16427-1-alice.guo@oss.nxp.com> References: <20201218083726.16427-1-alice.guo@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: AM0P190CA0030.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::40) 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 AM0P190CA0030.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Fri, 18 Dec 2020 08:37:54 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f1eb7cb9-b10e-47ef-499e-08d8a330397b X-MS-TrafficTypeDiagnostic: AM7PR04MB7096: 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: EwChF78tYrYKhhzdPMKOvPSQSSWjKqS7KFa6f5xWvPF5u1YfJXik9n/nEtkxlNpooRyMMimelGBv2dDjUVTabvAmtOP+irDwAcoScp4PfDbW0LJW0w+5Tsv65MuwjCgJtXqzNg9f5Br4Ta1RYaLZ6jji6p3+wgj1B8NCOSSp6h8il0GHPAGX5g6uuUAWqqbxX0rS/rBX+2EOu3GN8caOmRrYLOGqVrHsKwwnRyUlT7X9tAPnlXGJmXjm5Lb7EHA0LEWjB8lrcSx5rtZtmwMPWMO8n+zcjyROOTQTek97iY0tzZ4SRSZrMbuh3jfUys85GC82q19rjM9i/sKDYhPhketPGI9+KecpF3dVOPXgq1Xt2RYwJ47jxUIM6Gct73dLQk0W2rRqnVNWKbVBfnZE5rzPsvbe65yt6QHun4cLbfgjybI601bmK5EqKTRXXpWw 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)(4326008)(86362001)(6506007)(6666004)(316002)(6486002)(6512007)(1076003)(186003)(26005)(5660300002)(16526019)(52116002)(956004)(478600001)(66946007)(2906002)(66556008)(2616005)(66476007)(8676002)(8936002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: nNEfsrLwbMIenmWwAnTYMEaeeqreSSsb4T3CSM/mDyI+2JZG3rZQBluqn0jc7rWaoFl+pUph1Kvf3b+ZIaH+3LxhGYipDkFxNxXIfV7W/5+3AMGBj/ig+TTn3+FSa97XqbYkoIVm3suvOwZd08CVVY/TMQPkWDxeVGyHdVd3TDLK/LaI69LzxQKr9tyLb/ylqhKefUuZD+xYBCQFhfAgO2HXS/txShD+r0/UC6+qDv9Y2fdxe86YBg5UszRoKlqffCFGCE3QkXLbl1PKB6nkaAPmH5qa6Q/tAc9Qi6VOE7TC2C/osPczz1DEJ7ik1HhLnxkEYx7Ii+jaMubrMOsX2kRTUSAfmWER+JkS7Mf2J5BRgfN2FMXxI3qS6dS8Db3yAp8y85Mx/SGf42Ee54uaICygCg0OA5FHP5fd/9j3J32i8L1Sh5ErmfwosXzGgmXNpH57hnQf7dJNoayxosfEA2OX72WKNJTIDt+F8b/dfGZ/A9U5JSoMw6D3TfKKV8Y5hw43WRjpODPuWC1Fs5U5ofI/Ab5MhaeGiw5cxFNxrkchQapR8JP4cuNoP28qM1HZTJEJHRlJc5D+oqi/YidyfFVWt/7aEd4YX8OBZGaj+BEu8XzyTZfOckiOoqq2HWiqWPI6HcTSSb4C3TDXLEsJ/dW8XE+wYg0yaGOI6iF9yaSm4iv3MSHhMi4wqjNNjKTA/5LshgE1smRF7/zp/OhCmCa9iQtZgjw9SC23mxSxldgMbGFACsB0N57o73fQLc7YQmz6Kq7jtrvMdT2dIasfHvxMYTT5ZBZFtfwAHDK3RSeGeVI0Ie/qkRJ+Wnkv6QM0Um8V/WMws40yOb1nGmAYkR1N2mPXZyzJHpvruQhZXEVIQ2is8UHbZy33LgILKs0t3hFjUNUzagNGxfkEsbvpxsbF0IBFV++A/waG8QWMA7D1bZhcJFZkIQmqh4JuhVm+XtMe8O/5QeMQAIA3L+SNSyfhTPmpi2S+9qkgGLs9I6l2QbswARqDyue7TCF7L53G 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: 18 Dec 2020 08:37:59.0664 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: f1eb7cb9-b10e-47ef-499e-08d8a330397b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Jtj34GAQ04iP66dH9prsWbCfKzyR1NDlO4On65inVTvlMIitBvGuVIfVz51AfYhagsAFi1lXBQed2ai+XZra9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB7096 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201218_033803_016440_CB0E0757 X-CRM114-Status: GOOD ( 13.57 ) 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. Signed-off-by: Alice Guo --- Changes for v8: - none 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>; };