From patchwork Fri Nov 20 10:11:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alice Guo X-Patchwork-Id: 11919999 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 AC100C5519F for ; Fri, 20 Nov 2020 10:12:37 +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 2F59822254 for ; Fri, 20 Nov 2020 10:12:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hM3bXFpa"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="PvUaXfih" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F59822254 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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: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=2u2oje91Pzogh9oK5/ZEmTt9GEsx1Mo7iQP8d3dhhQs=; b=hM3bXFparNQU/EG/SU0k1rU9Hn YoDNG+nVps4bwKhUIAvY9aK4IoTbzN54TpgoZVSlM37wov/d80J+fgWbWJ9U4vGvAZTfKOWlXB4tA gjmMH4H4o4yH6wkZUNZ1e1aqD2Y1B5hRypbwjgwEyksBe+oFEGnrgNXH+x3lxoVzFYsJdVzmsb0lC qr18reSMhfMWv38DHc9rJD2gx0XbSYn0pv/FjcNnaHddm74uLHOUMysfjSP7Q5wDSTFo7+FU2ZxnZ MudOXNql3XuH2/UN7ZtjZjq6HUwgYOwy3TFKmP9PPqwAhIMlNeAXGNdHLoizZBRwLs3ZsgwwEd/Mz jfJ2OVkw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg3No-0005SB-8g; Fri, 20 Nov 2020 10:11:12 +0000 Received: from mail-eopbgr60040.outbound.protection.outlook.com ([40.107.6.40] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg3Nh-0005PV-Kf for linux-arm-kernel@lists.infradead.org; Fri, 20 Nov 2020 10:11:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gPmJargvccRpdlLV8FGW32AB3t8R0g+m6b79EkMCD1hLZCZpAFZ3qYr8Kw/nFyAi4yaJEq4HV7+GRzsiZ0Prj+LK3c4qMmBNRcEPY6to1B8V0eXrp/bvJny6cKiX7H7wHY7LweeMlKQGBthjo+3BmLiKi+TrCSfklZhL7uEouQRrp0TEP+s/IaWg9kN2Ylo2pHrS/pM3zvtRlhC5pJfmZ7VkDE1yHFIwmlDru/BYP4gN5opKnNr2Xy9dFS/DH8wew3kuMU3y+WhylMiLFuKI2z3YCb+2ogU2EK3KXaMGLpeT3UuZdH9QHplP6S9ll4L8bkRzxM/CkEArq6fzA3B6Sw== 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=9TOvxZAeISpFsyzycAXHdvb34Ev0MuXwiVuCWS3/Q8U=; b=ftLSq4PsGu3tbHrkMqeivzl92mB6qOXqU3tRgOEtFFskg+sqMG7qBy8pAHWlqlrkzntPhU8ej8T9ndFkKI3r/hYLN85Dq8smj3jX/v8X62YAp8d1RW1ZAcG8GwWIVh+rnxjbaDlkpYB/BOLfopRYYcCmnctyPVC4lAnpIYY/j/rdoxkbPfY58xkML/WLzrK1i5eeu6gqN41ZVbWtshj8+EBbxqRQZlIuWVmPtPV5HiYM0VY9QtE1y6CB04clvFdM3wSK1QhhtPbArLJvE+3LavYoT35ht61OmE3QrlZ7KxFmxZM2wEkdd8kpieyW2h6SFgciK/FG+xm4C9Y9ONeT3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9TOvxZAeISpFsyzycAXHdvb34Ev0MuXwiVuCWS3/Q8U=; b=PvUaXfihDxuNUOfqnw74x86lXQLo4aG2mKwQiZ+znKFLsyuosbfI/DSf9YQKlaYa7uqUfVz01PlCLeBZ91cAVsmwAv/juHmeDdc/woDa903i1HXB5Bjk2gCWQcL6hvV8nFV29aKhVqv2TD1tt6wfXJudn+j73CuJbFIK1oTodD4= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6053.eurprd04.prod.outlook.com (2603:10a6:20b:b9::10) by AS8PR04MB7799.eurprd04.prod.outlook.com (2603:10a6:20b:2a4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20; Fri, 20 Nov 2020 10:11:03 +0000 Received: from AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::a968:d7c0:c9f8:b4db]) by AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::a968:d7c0:c9f8:b4db%7]) with mapi id 15.20.3564.034; Fri, 20 Nov 2020 10:11:03 +0000 From: Alice Guo To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, krzk@kernel.org Subject: [PATCH v4 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID Date: Fri, 20 Nov 2020 18:11:09 +0800 Message-Id: <20201120101112.31819-1-alice.guo@nxp.com> X-Mailer: git-send-email 2.17.1 X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: AM0PR10CA0096.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::49) 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 AM0PR10CA0096.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.21 via Frontend Transport; Fri, 20 Nov 2020 10:11:00 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 610de259-5c70-4866-a8ac-08d88d3c95fd X-MS-TrafficTypeDiagnostic: AS8PR04MB7799: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LI8CtxZQK9YPPR3Ir1QnXCxg5gthietWAVkYA7pm9Orf8Atr2TI9iIEqPy7brfGGUEJU2ssQa9sQOE/A8UXgarDEBLFe3nxxpqv0E8ae31jpJNnqgVC3TgZAKQkllkM96Egp7Bdn1AR+6DSlG04mVsnCgxIZO9nYfpUcMddR0a28HQLpZ2zVMM3+hX+F8dLd5WiOPCC+U4vWreC57bts4srHPG1hqTZo/j6DmEle9HdXQAKzAVsg/Rg19mD2Eepds+rtjKXsJ241yyh/dJIAM09F1e0r9NFfa9ovmQ5EbhFSWONZI1q49XbuiGlpAv8n4ftY4KUgJSPk5XGocPH0TOGZKgTCWdANVvMJceeCwNimPnsymNbcpQE+xCmEK6nR 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)(346002)(39860400002)(396003)(366004)(376002)(136003)(2906002)(66946007)(1076003)(5660300002)(6512007)(66556008)(52116002)(16526019)(26005)(6486002)(86362001)(186003)(66476007)(6506007)(316002)(36756003)(956004)(4326008)(478600001)(44832011)(2616005)(8676002)(8936002)(83380400001)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: qTKeXJRhMJ3J4cMXP5nj5hLHAiYHH8IhT67bjUEAtrCv/rQVmoapFq7xGAFD/zIV14s3n6DdAjdf6rX1k5IdYhzaFY+OY23vhCoMUBiKG5SZmKUZdw06ZXt0oWLVyIx0i/mAgu6k2vdo+cpU0Xj4VV0W8/0KeX/mpWzLBA3XbgxbKXZRcQWWhmFXsq39Bs2ba8phBqTMqb5hsrR+QhYDzTUVCx99bbJim59yNlFkE9k5o3Bv4r3dgwZPYw9t2+U7+g+h3gaEeYQOAPn+OhxPGuX0QfJHaQ96h2TKad/Zvh1iHid/6lekzHPAuSzphVxBtROrNX2g+E4/39+upDY/bDOJYB4cDXDUo9TeLsy/ia3PeNVd/cQZxOcntC+k6xsKAEujCbo6LwR6TAEXMZbKRAlr0CVnxtxkjIY4D49IKcfU39s710xwTodmFNMexwEMrm6EdWm1EHSFNA6o/fLL+4SkD8NdnjgGNnRCBn7gU7G6Z3aHjzfnslZZG3yD6caXa4/S/FnLhVenpDS516jPWUEn2O7Udc9NKKi8i+WF4PJsd40BB4BN+3mKtjiwRi8vryAC/zOLyH6ZAvbPTilz/X7DRlbD6emQynjuVUwuWvqlsTLdsMxJ2DvbdtCj7486uddRfxXeuVy4wRdc9JHk8y7G9Hpl8dCyZZRNds9t67HhdAerF4LBQh0AhpN9L+205vB81gfCkJN+RhfEOc+x+0cI9dTRfkooFGVPcMfmopXiY6VMrPuWhz75vaCdNobZpDnjuMNiW/KkRNOk4Attwf5WQS/wrUq3PbuLXIpWdARUKR86newH+Kcz6ezcFi788YLCA8+S/Pzj31JFa2ioLadLZxlcmUM7DIYpDx1zDJ4cV/QvxpxkDvz+klt11Ko5K8gdhgXsTkUqtkKZd8vvEA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 610de259-5c70-4866-a8ac-08d88d3c95fd X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6053.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2020 10:11:03.1055 (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-CrossTenant-UserPrincipalName: rx+7TG2bAEa69HVEA5BcnfByEUujDyRDQ5gQcNeE4Ab5opkX9BicL8GMCHTBTDKr03MVwVvissuv5YspJlFOTA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7799 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_051105_753808_C6657216 X-CRM114-Status: GOOD ( 12.12 ) 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, peng.fan@nxp.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add DT Binding doc for the Unique ID of i.MX 8M series. v2: remove the subject prefix "LF-2571-1" v3: put it into Documentation/devicetree/bindings/arm/fsl.yaml modify the description of nvmem-cells use "make ARCH=arm64 dtbs_check" to test it and fix errors v4: use allOf to limit new version DTS files for i.MX8M to include "fsl,imx8mm/n/p/q-soc", nvmem-cells and nvmem-cells-names Signed-off-by: Alice Guo --- .../devicetree/bindings/arm/fsl.yaml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) -- 2.17.1 diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml index 67980dcef66d..d8048323a290 100644 --- a/Documentation/devicetree/bindings/arm/fsl.yaml +++ b/Documentation/devicetree/bindings/arm/fsl.yaml @@ -918,6 +918,57 @@ properties: - fsl,s32v234-evb # S32V234-EVB2 Customer Evaluation Board - const: fsl,s32v234 + soc: + type: object + properties: + compatible: + oneOf: + - description: new version compatible for i.MX8M SoCs + items: + - enum: + - fsl,imx8mm-soc + - fsl,imx8mn-soc + - fsl,imx8mp-soc + - fsl,imx8mq-soc + - const: simple-bus + + - description: old version compatible for i.MX8M SoCs + items: + - const: simple-bus + + nvmem-cells: + maxItems: 1 + description: Phandle to the SOC Unique ID provided by a nvmem node + + nvmem-cells-names: + const: soc_unique_id + + allOf: + - if: + properties: + compatible: + contains: + enum: + - fsl,imx8mm + - fsl,imx8mn + - fsl,imx8mp + - fsl,imx8mq + + then: + properties: + compatible: + items: + - enum: + - fsl,imx8mm-soc + - fsl,imx8mn-soc + - fsl,imx8mp-soc + - fsl,imx8mq-soc + - const: simple-bus + + required: + - nvmem-cells + - nvmem-cells-names + additionalProperties: true ... From patchwork Fri Nov 20 10:11:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alice Guo X-Patchwork-Id: 11920001 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 242D3C56202 for ; Fri, 20 Nov 2020 10:12:55 +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 8EEA522254 for ; Fri, 20 Nov 2020 10:12:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AGxsq2Jf"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Al27E+G4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EEA522254 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=S1R63aRJMXr6CGPtZqZdRf8K8pEvf9tY7/jm1m9Q3zM=; b=AGxsq2JfZ1iXfIOhQKe7o+P7h iZ17w4IMLlbWqU4JZO9lM+CgUraQMvNkm/nDEdq+xodR1Q/1wU08Fhp7C0R4Er1Cb/6Ytfl5+WOoq T3U6lzHCgYIdp0VM/cMNu2fTQu0kIkDOVh2O4Xit3pK1dUjU2+g2LDD5eTBLfDg2Wn3J2WLgUkhz2 7d0vNgo0rOCvJRe8fiNQxU+iShKkYJSTo1j++W0RYvjzV44ZWuiydm2K7DTfD2bPMFqmcqBVeCYRk BdtCEdij5BebxUIypndhdC3VGGXH29pdfRvYcx5/GyoHsVT72wO1CdhWhytBIhwXZ/4e/PiDlq6qH 9teX1I3KQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg3O7-0005ZB-Tg; Fri, 20 Nov 2020 10:11:31 +0000 Received: from mail-vi1eur05on2050.outbound.protection.outlook.com ([40.107.21.50] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg3O5-0005XJ-9z for linux-arm-kernel@lists.infradead.org; Fri, 20 Nov 2020 10:11:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IsPYtqmvcbnPDxyH4ADxurRkiVGW3wfvj64QjCy6kwFo/KYPtdcuRZ8Cj4CcDC8SlaghZLKO01dHnIr5I+jDGmMOxRuudm2doHy/AxS9OCqY1MhEN0sPNrnXPJUzWlZ2lRBS7LQBTJlECj8fkJImh4chht9Mlo0Yg5J1WqscAizCRwpDFY4sTuAJD3yYisDyOWckAw4b4EjdtnlOf3I+PbKhIjJ4gRxGJ39gjMlN6BREZUDB8Rjktx99hj0IXNw+Kz0kzG3wjmiDbtIuS0zSOSEvG73+mYM/TZmd5AaGiAo2YhWb9TW2wq575d47Ed/+uHc/Amby53qEedeo0HBjtQ== 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=RLQbDZbRRTmyeMNqxR6YW7DuY22M2naWY7ShStkjDUc=; b=nxIqgfLLvPb/Ff0gKbwWhgummI6IqqRd5g87xXV0LxEnbFQCRCR+s9ASj1+Ais4I/d1GUwXsO71mzqIA/teXl5vmjrg3fBDRsBaZrgmBDDNWYhC5xsgt/JAC3R34JAkNgTppM2ttzFpD2jBKA7kOdbCEucawkuh3VIzN3qNOE5zODJXh37kXvhNhFaIiyUhvrOHIaFGg3GM3vUMB1NiPTOidqP6BCqW69L9Z/AzP7GURtxMetNpOpboOVboyrDfX7jdW/iXze/a6sa7FJBbryapRKZCs0yB5Lxf09QSqi6JIZpLZOlRk/aca1UX51OSEKAXhfVq5u6up3G+vsfR/3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RLQbDZbRRTmyeMNqxR6YW7DuY22M2naWY7ShStkjDUc=; b=Al27E+G4Woti6qOEfUKG04cXgVg5gJKtl/cbxTfkAg3hcudgkftDtIktzf/RtQTvBaskQ0O+ru8ShZkCD27ClbEshJ99CsLkCn8uxt08ABhAShz7rNq2ZyH0LnTSr1VzGVfqdAp7PhIjsU9prbgwjOsfUO5FHFpYa6i9nFE1oYo= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6053.eurprd04.prod.outlook.com (2603:10a6:20b:b9::10) by AS8PR04MB7799.eurprd04.prod.outlook.com (2603:10a6:20b:2a4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20; Fri, 20 Nov 2020 10:11:25 +0000 Received: from AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::a968:d7c0:c9f8:b4db]) by AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::a968:d7c0:c9f8:b4db%7]) with mapi id 15.20.3564.034; Fri, 20 Nov 2020 10:11:25 +0000 From: Alice Guo To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, krzk@kernel.org Subject: [PATCH v4 2/4] arm64: dts: imx8m: add SoC ID compatible Date: Fri, 20 Nov 2020 18:11:10 +0800 Message-Id: <20201120101112.31819-2-alice.guo@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201120101112.31819-1-alice.guo@nxp.com> References: <20201120101112.31819-1-alice.guo@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: AM0PR10CA0096.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::49) 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 AM0PR10CA0096.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.21 via Frontend Transport; Fri, 20 Nov 2020 10:11:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 192fcac6-b8b9-4793-6d06-08d88d3ca320 X-MS-TrafficTypeDiagnostic: AS8PR04MB7799: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:291; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7BGGeMU18gyPr6AjQWgOEsXXzn/NA+7Y7QkTnzWg2IE2euSN97j7tJCeQSDrOIPUm7sl4D46EWHHZRvWePqA8UJ48E3gfpITdt64emcyUU0riV3BkpAMFLJFgyRJ4gDi5zxBiRpmc4tY9SSBj4nLHH3dD3WTzzPS7h3rFUi9boUrwPdLP29lh38YOaUF3MkAp9lPHjb357LC9U0HnmVSPS4m7UTWZpqIWs4c+YkyY6hRcJ40Ac16cQcdFXwM9LrXau3eGiMc0RnN/xdsTO8jzk8pCxO0xLJSG88tSlTv9bMUfHtulLwsefw5P3pvLbQl6OE/1kGvn+f91H2BecgsgPFmQaSZqpkS0DzWrWL1d8qgzTw0vVaW7F9ndO/oepoI 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)(346002)(39860400002)(396003)(366004)(376002)(136003)(2906002)(6666004)(66946007)(1076003)(5660300002)(6512007)(66556008)(52116002)(16526019)(26005)(6486002)(86362001)(186003)(66476007)(6506007)(316002)(36756003)(956004)(4326008)(478600001)(44832011)(2616005)(8676002)(8936002)(83380400001)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: V/KDZVfWlbBdpjzH222kigK0FshNwmQyg90YZi2s5klzbDHnf7ceqvZnM904orIWZdhZ7/rjvQykWAYtkcEamkMHqbcssILcu9eMlwuiD+P0px2exUyNwnpfUf3u5xUei//42vlay98K3fn2wLnwZDQ2GbSCWooAXJe9lHcl4Uxp3EIvjyFRv6IQwD+Fv5xDFzFPwTJN3xLREPS3lNGa/OMwuQ9wXXi2gYa3ccMLj0l03fCZoORPy0zsDAfaQ85L5t5YP+emL734qMnznW7HOFnzYPVL/5Pj6BX5q4W2IAk6I/x8q8M4cfNKbZZ4vcy9/BGXt+kJzYTdNenbGgDFNnbi0OBih3aPOHKxQ433I5xl2STDVbPAMnUikODJxV3x0AAkO9MxSfTwiZshoRd+mS+ihrOqEz7GpES/5TS831x8CRXy1NOcYClxHKKSIkHPDUKmRBrlX66YNCYFK98FFSa/gukNX7otqD23Mzx6PhsKQfVEFjMCvc+4WEAbGLe3SwkC6SPVXKR6XkfDnfTX95Q40ZBZJfLc1GSWmMWmtTvbp/wbTA7mBPsdX9KxqXswFMQ/YNf6PUrGZx8aUMAQ2f5leQkKgc6szpx4l0AYhyvMLyXL4mTIHlkZOw1jU5zMZ1Q8Epd59Wdd/ad9hjXC9IPN3PK0k7aQ4bspZuoww534rqIm//zDSpf9TvrWL09nCt+vdSIwg0pPARAsmfkoGGSPpZqEiHIJ4mHiHju7qH9L4jBP/9M6TA6AK5Q7Secvzw2LYCczM67yVzp4+UN2/9YTvvPiOyDXjT4Hrj8bKwm8nbXfytTV/jKW9Rh+YeoGeT7Sz7f301ve5swnsnYjEmCGHWW3JHoPA4LbH3fWYEV4pe/hsHZDPAO5wioT68I34MN1OItUwB1CoKO2ay6bDg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 192fcac6-b8b9-4793-6d06-08d88d3ca320 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6053.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2020 10:11:25.2537 (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-CrossTenant-UserPrincipalName: Swt3mPw5eDAa+X5egPr8a1t4/0+ktCZwcwrzcnbKnSKC55/9ZU1lN1G/FkH48vx3K/9cuj8/xSI5Yr3uGdIIBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7799 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_051129_414288_05250D78 X-CRM114-Status: GOOD ( 12.86 ) 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, peng.fan@nxp.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add compatible string to .dtsi files for binding of imx8_soc_info and device. v2: remove the subject prefix "LF-2571-2" v3: none v4: change subject and commit message, add Reviewed-by Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alice Guo --- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mn.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index c824f2615fe8..d457ce815e68 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -257,7 +257,7 @@ }; soc@0 { - compatible = "simple-bus"; + compatible = "fsl,imx8mm-soc", "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x0 0x3e000000>; diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi index a06d2a6268e6..6d3a809a00fd 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi @@ -241,7 +241,7 @@ }; soc@0 { - compatible = "simple-bus"; + compatible = "fsl,imx8mn-soc", "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x0 0x3e000000>; diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index ecccfbb4f5ad..ec6ac523ecfc 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -218,7 +218,7 @@ }; soc@0 { - compatible = "simple-bus"; + compatible = "fsl,imx8mp-soc", "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x0 0x3e000000>; diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi index a841a023e8e0..9b6d9307e5d7 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi @@ -286,7 +286,7 @@ }; soc@0 { - compatible = "simple-bus"; + compatible = "fsl,imx8mq-soc", "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x0 0x3e000000>; From patchwork Fri Nov 20 10:11:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alice Guo X-Patchwork-Id: 11920003 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 1C65BC56202 for ; Fri, 20 Nov 2020 10:12:59 +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 936AF22254 for ; Fri, 20 Nov 2020 10:12:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Z+XNNjze"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="n+J3onnE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 936AF22254 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=h1rJ2XQZI2kgkv8uoGS+W3dIwHipNxwA2JnL/8fHJbY=; b=Z+XNNjzeTmcycWB20nYK/2Fa5 DxMvGDcpCIoP7RHfsu5/ZzdwDO+oWuP68xWI/GBiyYJ1q0EnG8LzRjNMfGfY/mhXCV2Ka70kZldbK WS7yFKt7fg8ow7VxqGU93bJB5MpARq44PXNGcO2WW5sZpb0WKWEVURAS6sohj8wfMQ5o58UU7M6Kr EfLKe6cFiZ+XhirbYcNeznl0QuUvL2a+iCQNL8qv86NSvTKnlKRIyz9iB02kR9HgFo8WszX27UF8l eps3NDsWwty9nvqJk30NbJLl/BkcnuHiXfnSy6w4SF62XX9/nEAppioeIvvF1DdzhqC7W/0ACuRK2 wNK3GV/vg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg3OF-0005bh-74; Fri, 20 Nov 2020 10:11:39 +0000 Received: from mail-vi1eur05on2050.outbound.protection.outlook.com ([40.107.21.50] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg3O8-0005ZC-EC for linux-arm-kernel@lists.infradead.org; Fri, 20 Nov 2020 10:11:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oMMYBS53lY6GKpCLh5K2tDN2GNybg1U0UqlwKRi321bZF+MaGUq1DOOAeswvGCUctV/QJiTtKsVB3LfvWj0982AWM10LSUIafJd0pHolPjXQWnlrDhvw64r7CHx3ZQu9AJN3oGuhJ4OydGly6XobNgfPkBT7dA01Juj1ttWbOa0csI2526Oc8OpLS0xp5pVkYXxAjN/4c1vxzxY/cimwXnYEljYFV/8HQ1CdsH10XH9Bsam0BMichfOvlJt3f7EK3ZR0uiYkcefj4XAOEPQG1p9cdqL2puVeoKnhEjjqOCVsy/jkYlt8bnAFQQnER2qAknb69LuSLcZB8i04wd4QYA== 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=GOYv62s1mJhxxG7AYBWyBsaBnmSSipp7aSH7NVYTt4I=; b=BnSeifzVoyblPRY2FwWrUnyAOB25CE6AuwAkMZmiz2uO9/iIPrJvFDWLUiTk6DJu2OOQ+zf5L77iu2oPvP3sp5x6ViDan3jn7rfv68vyUVdkbamD0/QAQKRDza5PkMAJBOyV0EAvgw7jy66qWzF9U5fXxq0g8dGcg13hxaseEI3gPPMQyY7hWn/kENoQPMF3wF0ZzI/zTpFMBrvzhDhvIlO1GEJljkouNgq1ZguG8fJWA8egpBdEbkn5UkJNWZXvn6SdGT9Bqun+1tCrWbOZinOkiw6PfRIbFEDYZeaTFrkodmywenzt2T2F8zM8xN6MPG6FiwUF+C2resmN8BL/Eg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GOYv62s1mJhxxG7AYBWyBsaBnmSSipp7aSH7NVYTt4I=; b=n+J3onnE6ycuR/zvskx4j/BYm4ntHyLxH15TVnoGzyGk496CdTzK2uZBAUhcSfiZ0I5EMAswDKIijRsYs/02P96/aOtxfVWAtkhyo3/MFdjRgNBEcVYQWp6dqZE5qCDQnz3LpYD+sBBEfLzBVTT6swB4ZlM72RRBApoApAPer2c= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6053.eurprd04.prod.outlook.com (2603:10a6:20b:b9::10) by AS8PR04MB7799.eurprd04.prod.outlook.com (2603:10a6:20b:2a4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20; Fri, 20 Nov 2020 10:11:30 +0000 Received: from AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::a968:d7c0:c9f8:b4db]) by AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::a968:d7c0:c9f8:b4db%7]) with mapi id 15.20.3564.034; Fri, 20 Nov 2020 10:11:30 +0000 From: Alice Guo To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, krzk@kernel.org Subject: [PATCH v4 3/4] arm64: dts: imx8m: add NVMEM provider and consumer to read soc unique ID Date: Fri, 20 Nov 2020 18:11:11 +0800 Message-Id: <20201120101112.31819-3-alice.guo@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201120101112.31819-1-alice.guo@nxp.com> References: <20201120101112.31819-1-alice.guo@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: AM0PR10CA0096.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::49) 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 AM0PR10CA0096.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.21 via Frontend Transport; Fri, 20 Nov 2020 10:11:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 011e38f9-56cb-46b5-f5fd-08d88d3ca64a X-MS-TrafficTypeDiagnostic: AS8PR04MB7799: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:462; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EI3fgCBgX83y7G1XaL1/33N7GWoNCtiKCUU5cKKEMvyzHiEbk5bUjnEyftjMt/eku7Xr2E+6111MiHfirThfPgi1F5y6tyeKS7Q7kdfjf1IGSXjyXhRg4rtuq6z3SrRKatdxtHKwTSeFQEMF7Iyugu8WEnua7Vcwz5rJJuf6WwRmDP/rX7Vpd5waLdzhKU32X32oa9xgS4Ao1XfMTmxoh0UuEF1O8vSYnXhGmQMnHp//R8MyrFVeXhVIdM5YxYBbtLAlctAuvqo/YnUu6DXEd8x8ninEN0rXMb7R+pLFn1FrKQtqGOgMDV4ej0PdzUrCOtXUWvIsZ+fyZYKGauqVe++DF7lGCY9N7UJuDbAb+Ca5TJ/uZxhfxumveqLqROKE 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)(346002)(39860400002)(396003)(366004)(376002)(136003)(2906002)(6666004)(66946007)(1076003)(5660300002)(6512007)(66556008)(52116002)(16526019)(26005)(6486002)(86362001)(186003)(66476007)(6506007)(316002)(36756003)(956004)(4326008)(478600001)(44832011)(2616005)(8676002)(8936002)(83380400001)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: lTr2pZGNl+ROzkJqkZNiOmre5KTvbfVnVKJOmRw15Se+XAO6LG3DXhJ7vuRlJ/VtuDbL9IU1r7/pbGYNChDSPThL49Npjhj5+SQcjUU0F3SddeQywI7XoD7WevTbnDQcd7Q5u34OCc4BXa3zfEnEFdG/A7cFHM/U1pm1xk9TR8WygP6MXVHvPNlrc266k4QJU4JvRf/mWm4Nx9FUKcLDSpXKBUGZJNWpZlQOohsJ2dAr4G3ogo5kWBPf0ICj5ncd3+W1dS0iHB8yThGblEctTeUIK7+VVzK+wAjnWpo6BJ0NzyRMbFXjv6EWlKdrBNjsTlPtW33rLAi24eDvpfDILRQ5GWU0uFqTvSchDBtEY+WTLamqQQDfv90Bq/CfqmFFPhqM8TVYy9yA1OnrU5IE7RlEae8WXpMSG9bM71OgosNAEIz+DYTFEeVVaeeNcTRIfZBbs+xGPYMSfT2YB2UQHnZzSugsWnjuvixbX8sFenpQBM+BpSlX9EERGymXx16LIM/lM+Gdn6fz9CEhlniGegQL/K5QRuN74rZWPCb4lUtYDimLohs1etIpka2ZDoLMv5gSUO76ocrAte8Ue58Yk5DWXmQD4j8EPYjcLqUsMIAi1Utynjx36B5X7qBjDoPSBbz9YAizOLgHHMD37mL4tA3zdkSRGHcFJWbzTavAVwSVpGBRVg5SWd7NEkIV/hEc8sY9Oj50wKARWIbdz4akl9LXIIdiq4CCat8KUZ3ri0AOIEcGmCLMvhJRduijoYEn5aaNI0nechJ1NBpuX/KqwWuz2thfhF5GXbgPcClFgxdthFwDB+vyW/Ro+pK2we04DbdlmHaH3kZI1hCFc6SqT9pcEEtJ5G7yV+UZUUK2MI/IorKAnuOPYGcaed/4rFxzASqlHYpe8QzdMxxrvCZPnA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 011e38f9-56cb-46b5-f5fd-08d88d3ca64a X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6053.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2020 10:11:30.5137 (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-CrossTenant-UserPrincipalName: DwwMrleDDrpd22frq9ybgvL4xtGK1xvGL5PZUZdfzDWSpNNsWdzW8ZULAi6KCMh0HXUbTTBdV1ij0LOiP6X1tA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7799 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_051132_550785_D29608E1 X-CRM114-Status: GOOD ( 12.66 ) 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, peng.fan@nxp.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. v2: remove the subject prefix "LF-2571-3" v3: convert register addresses and sizes to hex v4: delete "stuff" in subject and commit message, add detailed description Signed-off-by: Alice Guo --- 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..0e0edd5db07b 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 6d3a809a00fd..ff12194b60a1 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"; @@ -388,6 +390,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..8fbcded6a091 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..6db5cba9c07d 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>; }; From patchwork Fri Nov 20 10:11:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alice Guo X-Patchwork-Id: 11920005 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 D3487C5519F for ; Fri, 20 Nov 2020 10:13:25 +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 3248620709 for ; Fri, 20 Nov 2020 10:13:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="T75VLZEv"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="TTEnlS8k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3248620709 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=Sl2Dt8grZVzhc5MmpR1ctF7L9y5MSYY3dW2gFuPa1/Y=; b=T75VLZEvPfWmFo0fMRZBBr0lX Zs70dkCcMWRCNqPZIqO0j2vzND8SB0+ji+rOTKPBHClTsfL6SBgRxF9Jp1typB/RFBU8Hrq2KzMG5 t8ZzB90wLX7LtoB/6cml8/Y+h5naGSBc/gyfHHPUqUfk+cVR+J5nqeCfJeURrM78ec9K71rGTCR+D xJvkAGrj+0+rUcwwnbOjBdbuzuvmcJY0sV8r1VWkaXP+Y+4Mhpu7b3Hx0SPp0MCHyQ771E2+2dHLR rfyerX5nEkKfi/YcOG+I1/xyQYvts9f4mI1zye+G18kWCzG6zTG7+F5+n9UpHOTWoDVJee9qgzF1Q zaks23Ekg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg3Oh-0005kN-AY; Fri, 20 Nov 2020 10:12:07 +0000 Received: from mail-vi1eur05on2057.outbound.protection.outlook.com ([40.107.21.57] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg3OR-0005av-5c for linux-arm-kernel@lists.infradead.org; Fri, 20 Nov 2020 10:11:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CsHIyIYGwgkTrUmtMYezYr9z5hb9Qasr7bJ8Oo0V6/7sc/3ptZeL4z3YSi1e536aKP326185H/XuJF8m48ZkyN7FBQ8WorIyAu66gu/riWATjqn9p2Px8NQc08AVLq66N4eJYJmwXTcMKD+/yrYNTE15oHQzf9PxDb2t3YGY+CMtM8FTk8kVT8ZbZgx2e5KN3SnZ2gs4ndVvD2JWxkU6yCRYu8N74JYLaRhzHnAvbzxA7+LAFMS6ysRnFFKZUEwJclPFifyQG0BPjwa0M529nI7fTmmBgJpWKukQwIq2KiE21QA0tjHPolJO8vf75T/s96B7TGr3APKBKDik3E8kJw== 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=+NpueG1GYEh/LweyOKA2IyVxHDkhUyTD+9OsEfdGdQg=; b=WW393AZZi6iitSQ+B8oY5ROHGjRZfYKgEvdxfv93scaO4F/KfPbHFzhKTUTrs6awGCYm6MPN7S98I3iMXtXk44WWu8py0+vBTo59qR5eHyfAVmYJP8LaU7WNTWkgq3CRBHSD3Fmcyhd80wwBC3Hom8C035ex6EaJpOwwpz/o2GCdkeT2IEbk8IFaEkHnNEk64QGug/YaTSo1iUcaZaOyoxvNV3NnNL2Mz7ArvXl7svui9CoTmjA+9r8a9/LJBQ0dFIvxPI8mhFu2WywLEzS5ymQGQjg4iONP+nQXSvxYTYXmFZbRwqipKoHy7SRpcw2xXw+kvjhyeROjYVDuj4iVtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+NpueG1GYEh/LweyOKA2IyVxHDkhUyTD+9OsEfdGdQg=; b=TTEnlS8k0QYzA/+UYK4QeHMeFp1MRHe/xFdWp3L9WLTCBVR98NBOyRWPY1QwWZo6nTT5CV9ILsfwclkKmoYKVLRkoJGRQvOno9kTIt9L8A8bx99eDLcfW3+Efwz93ayGvGrqRrZDKhu8BIlHENz+QvJBAt9J3l2b28MmM2XgkIE= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6053.eurprd04.prod.outlook.com (2603:10a6:20b:b9::10) by AS8PR04MB7799.eurprd04.prod.outlook.com (2603:10a6:20b:2a4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20; Fri, 20 Nov 2020 10:11:35 +0000 Received: from AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::a968:d7c0:c9f8:b4db]) by AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::a968:d7c0:c9f8:b4db%7]) with mapi id 15.20.3564.034; Fri, 20 Nov 2020 10:11:35 +0000 From: Alice Guo To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, krzk@kernel.org Subject: [PATCH v4 4/4] soc: imx8m: change to use platform driver Date: Fri, 20 Nov 2020 18:11:12 +0800 Message-Id: <20201120101112.31819-4-alice.guo@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201120101112.31819-1-alice.guo@nxp.com> References: <20201120101112.31819-1-alice.guo@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: AM0PR10CA0096.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::49) 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 AM0PR10CA0096.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.21 via Frontend Transport; Fri, 20 Nov 2020 10:11:32 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a3186edb-4966-4529-cd1e-08d88d3ca8fb X-MS-TrafficTypeDiagnostic: AS8PR04MB7799: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rw01iP7SvF7Yo/4NfLEAGD8Zc5WRUlgIKpZ42RnuP1FbKLkWS7OtwZBHsQEtXlQCFQ6JhHAz+X/dnWYsMx9diaI+EpEj+SwNEy8PcURxslcARvQTU90GZsv6CAzl5K5KcsgAtFuZAlbbxIwN/o14qU9az7SeZJxrm8KgOhizhBhmC9idP20mvnj1RfKx7AX5LWp9+Yb5qhkbFyGqoh/bTP6r1km9+UvPv3WAF7wXI7Jh3TwC3DVLHH8kAIAl4vjnOWT9BlWMase7amETXd5uVeIyn71PMIDlKd9ifvhWDGF2n+zkAh2/8mXzwtb10y127F9lTxjpLv3fNuy38rbDGlL0/QOWWwKT0furudUJTlVLFmf9arfLIPnVDj9fJ9p3 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)(346002)(39860400002)(396003)(366004)(376002)(136003)(2906002)(6666004)(66946007)(1076003)(5660300002)(6512007)(66556008)(52116002)(16526019)(26005)(6486002)(86362001)(186003)(66476007)(6506007)(316002)(36756003)(956004)(4326008)(478600001)(44832011)(2616005)(8676002)(8936002)(83380400001)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: IB9UgLmp4FVJD8KJSjSWyjnehxkBHolMTWW3yAe2Vj/HTZ4EoHgTik1IFRDVp7mVDl0kNwGsOPWwGCNqvPwsLcnV/v4biPfaom5mlOxnYiKm/ShALYFuZ+mmpqM405OHl5Q8hyIXKFpnorcdCp8fYVb71vINcHJFZeGzt6dN99xKBX4uQkOwf9Lr/14xLtX+uHUYKT3ICP49mqkZx3yd6sIIfe2c3dlL7BiG0IN9dPQin+NzIEYu/OhB+ju5X17ExGP5R6v9UIQGPyY+1cUsFNuE9IDgyOHf0V/2doAnoWptwWcQH6NL3IfyuFV7UUDet2zE5pHn7xncgwmRnX3hyYjnMk5lc8Q0bsNMsj1Hq02u5euiIdwkRrsLvLpUk7pjs+U277Wh7vD99ArbEhl8K8x7zsLhAmm5Nv1NRXJ6xAnO/3di8h76lH5zHGe45O35fBP/K+utJlymzNsxsIr505a/UFRLMhd/2JY3sgt9YeleDQxPHUeYh0bD0axTC7BVe6oJVXsoJqpEaWtWe2hUL/XaFEqUCXVB66EU+jnQJUkSn3blt//S+cJCkTIYFO8Fn1ECEp7gbIGJ+9K/EV3RkU4+Ts8WvmuP7utel84xwOENFOGvEKsZ4kXLKyN92Q5vGKO8Lfves7UZ6FHVHV2HTVu6ZHqPFP7It4WYokM/1+8SVMPt8CGLOzfuoH+9wW9n1upoDxdEPRJsRhDr+YeWkJqPqhZhQJ0H4uP8Ut1t3CDX+bdI42lcmTf/09X08mbsv0iOsEPQvLf+lEUT91Ukq1G5AoXMEFazA7q8xL5mZG14Z6/urU3sysbpMRLKn9sJckrMRWHNzA8OUPXyiz2XTibF7BoSD7r9DkWU3Lghto+F263Jv11qB1HzRtS2EuNJfaSYEqb6LOKGVB2PRxRTkg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3186edb-4966-4529-cd1e-08d88d3ca8fb X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6053.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2020 10:11:34.9561 (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-CrossTenant-UserPrincipalName: E6Qg75d1WczAk+BrEm4qk7di4/eQeJYFOWoKhjKEOFNAhdiqi1Q3RtUfKsToJpAopTMRRBzf4RE/tgM7R8gb6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7799 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_051151_316388_3CFED2D4 X-CRM114-Status: GOOD ( 25.96 ) 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, peng.fan@nxp.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Directly reading ocotp register depends on that bootloader enables ocotp clk, which is not always effective, so change to use nvmem API. Using nvmem API requires to support driver defer probe and thus change soc-imx8m.c to use platform driver. The other reason is that directly reading ocotp register causes kexec kernel hang because the 1st kernel running will disable unused clks after kernel boots up, and then ocotp clk will be disabled even if bootloader enables it. When kexec kernel, ocotp clk needs to be enabled before reading ocotp registers, and nvmem API with platform driver supported can accomplish this. v2: remove the subject prefix "LF-2571-4" v3: Keep the original way which uses device_initcall to read soc unique ID, and add the other way which uses module_platform_driver and nvmem API, so that it will not break the old version DTBs. v4: delete "__maybe_unused" delete MODULE_DEVICE_TABLE(of, imx8m_soc_match); rename match table, "fsl,imx8mm/n/q/p" is actually a machine compabile and "fsl,imx8mm/n/q/p-soc" is a compabile of soc@0 delete "flag" and change to determine whether the pointer is NULL ues of_find_matching_node_and_match() delete of_match_ptr() Signed-off-by: Alice Guo --- drivers/soc/imx/soc-imx8m.c | 85 +++++++++++++++++++++++++++++++------ 1 file changed, 73 insertions(+), 12 deletions(-) -- 2.17.1 diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c index cc57a384d74d..1b0a34e545ae 100644 --- a/drivers/soc/imx/soc-imx8m.c +++ b/drivers/soc/imx/soc-imx8m.c @@ -5,6 +5,8 @@ #include #include +#include +#include #include #include #include @@ -29,7 +31,7 @@ struct imx8_soc_data { char *name; - u32 (*soc_revision)(void); + u32 (*soc_revision)(struct device *dev); }; static u64 soc_uid; @@ -50,7 +52,7 @@ static u32 imx8mq_soc_revision_from_atf(void) static inline u32 imx8mq_soc_revision_from_atf(void) { return 0; }; #endif -static u32 __init imx8mq_soc_revision(void) +static u32 __init imx8mq_soc_revision(struct device *dev) { struct device_node *np; void __iomem *ocotp_base; @@ -75,9 +77,19 @@ static u32 __init imx8mq_soc_revision(void) rev = REV_B1; } - soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH); - soc_uid <<= 32; - soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW); + if (dev) { + int ret = 0; + + ret = nvmem_cell_read_u64(dev, "soc_unique_id", &soc_uid); + if (ret) { + iounmap(ocotp_base); + return ret; + } + } else { + soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH); + soc_uid <<= 32; + soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW); + } iounmap(ocotp_base); of_node_put(np); @@ -107,7 +119,7 @@ static void __init imx8mm_soc_uid(void) of_node_put(np); } -static u32 __init imx8mm_soc_revision(void) +static u32 __init imx8mm_soc_revision(struct device *dev) { struct device_node *np; void __iomem *anatop_base; @@ -125,7 +137,15 @@ static u32 __init imx8mm_soc_revision(void) iounmap(anatop_base); of_node_put(np); - imx8mm_soc_uid(); + if (dev) { + int ret = 0; + + ret = nvmem_cell_read_u64(dev, "soc_unique_id", &soc_uid); + if (ret) + return ret; + } else { + imx8mm_soc_uid(); + } return rev; } @@ -150,7 +170,7 @@ static const struct imx8_soc_data imx8mp_soc_data = { .soc_revision = imx8mm_soc_revision, }; -static __maybe_unused const struct of_device_id imx8_soc_match[] = { +static const struct of_device_id imx8_machine_match[] = { { .compatible = "fsl,imx8mq", .data = &imx8mq_soc_data, }, { .compatible = "fsl,imx8mm", .data = &imx8mm_soc_data, }, { .compatible = "fsl,imx8mn", .data = &imx8mn_soc_data, }, @@ -158,12 +178,20 @@ static __maybe_unused const struct of_device_id imx8_soc_match[] = { { } }; +static const struct of_device_id imx8_soc_match[] = { + { .compatible = "fsl,imx8mq-soc", .data = &imx8mq_soc_data, }, + { .compatible = "fsl,imx8mm-soc", .data = &imx8mm_soc_data, }, + { .compatible = "fsl,imx8mn-soc", .data = &imx8mn_soc_data, }, + { .compatible = "fsl,imx8mp-soc", .data = &imx8mp_soc_data, }, + { } +}; + #define imx8_revision(soc_rev) \ soc_rev ? \ kasprintf(GFP_KERNEL, "%d.%d", (soc_rev >> 4) & 0xf, soc_rev & 0xf) : \ "unknown" -static int __init imx8_soc_init(void) +static int imx8_soc_info(struct platform_device *pdev) { struct soc_device_attribute *soc_dev_attr; struct soc_device *soc_dev; @@ -182,7 +210,10 @@ static int __init imx8_soc_init(void) if (ret) goto free_soc; - id = of_match_node(imx8_soc_match, of_root); + if (pdev) + id = of_match_node(imx8_soc_match, pdev->dev.of_node); + else + id = of_match_node(imx8_machine_match, of_root); if (!id) { ret = -ENODEV; goto free_soc; @@ -191,8 +222,16 @@ static int __init imx8_soc_init(void) data = id->data; if (data) { soc_dev_attr->soc_id = data->name; - if (data->soc_revision) - soc_rev = data->soc_revision(); + if (data->soc_revision) { + if (pdev) { + soc_rev = data->soc_revision(&pdev->dev); + ret = soc_rev; + if (ret < 0) + goto free_soc; + } else { + soc_rev = data->soc_revision(NULL); + } + } } soc_dev_attr->revision = imx8_revision(soc_rev); @@ -230,4 +269,26 @@ static int __init imx8_soc_init(void) kfree(soc_dev_attr); return ret; } + +static int __init imx8_soc_init(void) +{ + int ret = 0; + + if (of_find_matching_node_and_match(NULL, imx8_soc_match, NULL)) + return 0; + + ret = imx8_soc_info(NULL); + return ret; +} device_initcall(imx8_soc_init); + +static struct platform_driver imx8_soc_info_driver = { + .probe = imx8_soc_info, + .driver = { + .name = "imx8_soc_info", + .of_match_table = imx8_soc_match, + }, +}; + +module_platform_driver(imx8_soc_info_driver); +MODULE_LICENSE("GPL v2");