Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3846785ybi; Mon, 10 Jun 2019 18:30:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4sL7Gb7IdCnWPxad6X2gg9rgihFVAnrIDhgvtPivtCRBdZO/6HIdbKHi/bY96kkzdjPnr X-Received: by 2002:a62:f20b:: with SMTP id m11mr25096050pfh.125.1560216656554; Mon, 10 Jun 2019 18:30:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560216656; cv=none; d=google.com; s=arc-20160816; b=hUmxTKKvZt1PLVWmpYO9HQLEJ838xjkB3i/nRcDUuYcW0FTb4jlGmzhVGgk6JyG2RN ykExr0nxdXLOmUhV0UNzMGiRndLc/yWLHkF1it7WNCD3wLFifEBHwNusXBXDFF43CL1I NBy22eora0FH0kZTFCMq0Bnr1tDOc0gLL7OfTPoLGldPCxs91oy1cqGxd7F9VHkX3p64 7ujwSTVwjddh7vOcM8x+NF+zoQbCA1G59FdMpAN0ttkFY6YsM+pnqFVG6XZG7/MT7Ub0 kQEhvfgeX55sr0cKjs3Ws1K3ifQXzXr48iY8aicSMY/FITscy7cuU8Wgq5dcYwNDVSNM qEaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=EKpYoUpE5sI5OUTOXNawRaZQ/w5vbyG/EuZsz8rEB+Q=; b=Myj2wFOqNKLG/ed7ndoCVELLiLIYC269cAnzEkQ8ag/0W1xj8/aMFcySrYf8ICGwYZ drhkQ8WXc4CCUUbmodchJSreK/CVgYzsXcPWq2D45lTIZAZEnstc9GfMjfkghgNMxWwx riqFmIgPN7KmG7rA3gmeTZzJiZmj7w77Oc3g+Uv8/TGMDIVRjUzLtPQvN5JVQzclLJ1m XxZf8cvzEcZn9VNHJsW3tjtY1kJv6Y8FCCuq7R2sV6ySL3aZuPf/N511MbPkMQol2r8b hPKE1VFtEnLjY6liR2Sp+Q+SWsSGvZzpDv4zmx94qsCZw6m/h+j9aN2Gws7ogDfvGa3L 7JDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g18si7757019pgk.477.2019.06.10.18.30.40; Mon, 10 Jun 2019 18:30:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390575AbfFKB3u (ORCPT + 99 others); Mon, 10 Jun 2019 21:29:50 -0400 Received: from inva020.nxp.com ([92.121.34.13]:34648 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390349AbfFKB3u (ORCPT ); Mon, 10 Jun 2019 21:29:50 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2E2A61A098E; Tue, 11 Jun 2019 03:29:48 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A3BA01A0990; Tue, 11 Jun 2019 03:29:43 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id CA9EB402DD; Tue, 11 Jun 2019 09:29:37 +0800 (SGT) From: Anson.Huang@nxp.com To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, leonard.crestez@nxp.com, viresh.kumar@linaro.org, abel.vesa@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] soc: imx: Add i.MX8MN SoC driver support Date: Tue, 11 Jun 2019 09:31:25 +0800 Message-Id: <20190611013125.3434-1-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anson Huang This patch adds i.MX8MN SoC driver support: root@imx8mnevk:~# cat /sys/devices/soc0/family Freescale i.MX root@imx8mnevk:~# cat /sys/devices/soc0/machine NXP i.MX8MNano DDR4 EVK board root@imx8mnevk:~# cat /sys/devices/soc0/soc_id i.MX8MN root@imx8mnevk:~# cat /sys/devices/soc0/revision 1.0 Signed-off-by: Anson Huang --- drivers/soc/imx/soc-imx8.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/soc/imx/soc-imx8.c b/drivers/soc/imx/soc-imx8.c index 3842d09..02309a2 100644 --- a/drivers/soc/imx/soc-imx8.c +++ b/drivers/soc/imx/soc-imx8.c @@ -55,7 +55,12 @@ static u32 __init imx8mm_soc_revision(void) void __iomem *anatop_base; u32 rev; - np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-anatop"); + if (of_machine_is_compatible("fsl,imx8mm")) + np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-anatop"); + else if (of_machine_is_compatible("fsl,imx8mn")) + np = of_find_compatible_node(NULL, NULL, "fsl,imx8mn-anatop"); + else + np = NULL; if (!np) return 0; @@ -79,9 +84,15 @@ static const struct imx8_soc_data imx8mm_soc_data = { .soc_revision = imx8mm_soc_revision, }; +static const struct imx8_soc_data imx8mn_soc_data = { + .name = "i.MX8MN", + .soc_revision = imx8mm_soc_revision, +}; + static const struct of_device_id imx8_soc_match[] = { { .compatible = "fsl,imx8mq", .data = &imx8mq_soc_data, }, { .compatible = "fsl,imx8mm", .data = &imx8mm_soc_data, }, + { .compatible = "fsl,imx8mn", .data = &imx8mn_soc_data, }, { } }; -- 2.7.4