Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3419996ybi; Tue, 18 Jun 2019 00:06:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/x247J8maMPFgqXgFy619iLoEmQnYLLcZhC2Ic9+CqLYWKTt4rmkfRPfDPdtHcrmjiKUe X-Received: by 2002:a63:1657:: with SMTP id 23mr1209071pgw.98.1560841573610; Tue, 18 Jun 2019 00:06:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560841573; cv=none; d=google.com; s=arc-20160816; b=HXg0zGjSu/P65hndIM0OAjOpsK7WNci1yu468mKOcj3P2Op2FnCoigz+eKQ6HewUKp IX0SXIej+iI5gEV1mgCFqWgRoG4cv9GMjo3Gloq6i5OAllXKod8Wq1cXhY4EbdXKXVNF NcNBo7UdEhSr6If/MtPo6JIYqFiVy5uLljfbUeeGLUZDI1gNvL6i5ap/oTo8mpZSH3mC Sq8MWota/FuzEkqze5Lx9ZBIP2iyff9svIcRAGd2tV8TZleLzzo1py6n+9gnw2uEjhZa bUQGDnm/XPX/YrSU5a79JMZw8kkuP9TWiO5YGWWbT2r6neJHEXOlAzHJ1QxaWwq5aGjJ HxiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DBWgAjbViKCe8VqGQqd896BsAbDTa/xeD8VhzLnhdIE=; b=v1v+230Gmt688RZRaEQiltqrjMUSLdcaNmImWCLggjk9VmT11qs9vQKrK8afZxyVz5 i/ph3egokpOYEHMOO8aPR2emtNFihTnwx/D3eEy+Rptlpa4zSKURoPmWCRuUETZdrqit vkcHEHtlgTwjEXhrEEYzahgBCZQYZEsktF/QHKGG157hdYut97RzQ77FRbtpcG8iT6ox re1zECAVpgenAXJTf2USvmd0xecgTg0YMi2yumO7NpwEHMT1trXSBnLhGuPJ78QmSnRW Hp8ZrenQmdKcBjIU11IS805cFxFIDR8IbK3gMG2M4Cu+AVRO2Q2CPyWb8JlC/wIbl26E TJGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="t5Cp/sFZ"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a90si12666525plc.284.2019.06.18.00.05.58; Tue, 18 Jun 2019 00:06:13 -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; dkim=pass header.i=@kernel.org header.s=default header.b="t5Cp/sFZ"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727584AbfFRHE1 (ORCPT + 99 others); Tue, 18 Jun 2019 03:04:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:34414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbfFRHE0 (ORCPT ); Tue, 18 Jun 2019 03:04:26 -0400 Received: from dragon (li1322-146.members.linode.com [45.79.223.146]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8711B20665; Tue, 18 Jun 2019 07:04:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560841465; bh=bm2DKq2EIZtKPTiAVRzsCQniXdUMQeaYWYo40ocVKd0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t5Cp/sFZYyd4zhxGNyiMT4RVBJ5dQioW+ujYpGLtOqgTXmP3MlE8ATBKOkjUQH+V0 AuhyNNvZtXrsMJYnjJ8dT1b6ddzRNmKMq6YzBez9UJhI50EBiUIKZ+FFBWyjHXNHan 8FTc4VYvIv/V38X1206XO6H3Sl+vS3TL7Sw2jO7o= Date: Tue, 18 Jun 2019 15:03:35 +0800 From: Shawn Guo To: Anson.Huang@nxp.com Cc: 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, Linux-imx@nxp.com Subject: Re: [PATCH] soc: imx: Add i.MX8MN SoC driver support Message-ID: <20190618070334.GD29881@dragon> References: <20190611013125.3434-1-Anson.Huang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190611013125.3434-1-Anson.Huang@nxp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 11, 2019 at 09:31:25AM +0800, Anson.Huang@nxp.com wrote: > 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"); Can we have this anatop compatible in imx8_soc_data, so that we may save the call to of_machine_is_compatible()? Shawn > + 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 >