From patchwork Wed Jul 21 14:16:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 483285 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp6208895jao; Wed, 21 Jul 2021 06:43:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaiUdgYUfCjJshGgnFEFntjecjq5q6DVSUnC7U2SI3gm7VfnysK43GyMujAIrW7OIGrwa6 X-Received: by 2002:a17:907:1b06:: with SMTP id mp6mr39048573ejc.188.1626875033792; Wed, 21 Jul 2021 06:43:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626875033; cv=pass; d=google.com; s=arc-20160816; b=PtZppylr3nXZQg8ZQFrKw+rdq1pJosVmyf1UVTs2tcVeGMb3AUF44cHEgkKOmCtUe4 fvUWjXhORAFCbBAj7O01/5quTlxWbR/ByJOO+Ir3X7nRxkjcLff1fQDyNsJXPTbL6zjs OFOL8gXIMAA4rujZ1u7+Cg59bqNKDBS/YzjOmlmJ5PWV9t+QBFEIs2FVX0RmeWnaRqZ4 wrfeYFyOYWGn+c1p3dYe4ANcsyAZ2/dczFVJqs7257IgLvXo95j6ReXkqJXusAoouIB7 aUounv8MZb725yAZ9da9hWKZbC1Ld6t+qP/CnWxBE8oEquKmCuOleEnFxZ6km/cgYCEG iQ9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=nLPNCQf05qo5oajyeByhpEPz1JejFhT6x3aaIXolwak=; b=Xj6x9E+khY7oWSK7Lx6vyAxYzd+VwRXzaTEwkt7Uoc8CtCDnNdrLHF+nUvFuQzeQoh FO25DC/RCHrRAUX11Yc7t+jxiw/ZvfipyGwY+SrA7r/5Tn+NWsnPcX//94FkV2IZVgJe h3RfoBQdmzjYofO7nK8Mq16O/WlfgzfRsxkITcjlZflvJTnH+96Og3mT6Vchs2/3Qn7D izTLR0q2x4/Gfj4UrLMfN3akxlvnYQII2nv+HXsNqahnNlL6kGlSNX9K9hOIfFemPShb Buop2Bnal2In1LZ8So+jnr1tKZOszT+O5rla1mxgHOWQtLmu/ueiNIucRZ+XwXPh2q5r X8Tg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=KyPcV2Cr; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 7si30004148ejh.506.2021.07.21.06.43.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 06:43:53 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=KyPcV2Cr; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 41D5682C46; Wed, 21 Jul 2021 15:43:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="KyPcV2Cr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 929E682BC7; Wed, 21 Jul 2021 15:43:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02on0611.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe06::611]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EA774829B9 for ; Wed, 21 Jul 2021 15:43:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@oss.nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ACvju8v96XGz0kHI1drztngupquHgKBcez7soyu5aL4jDPeAM0SSkRCHltLMPFbfCig8SQ/RPl+851VzCXSPgPruEGeaPwMc485HEQb3Y1AafxNJl8AX1hdcZldVRQFWA/iZa2YGiCmwBc/x2fNJnIb+o3Px/63HCBkG697h79x4DmwcJeMXDPOUZbD5g3pjmaKchrvIjFkP9QtSg4EQ13JsDp8lD9NZ99VqdEL8rFFBpwy9fN2Z5Tn7yMyJfLiWoWFNA0RHP5KY7DviI5kfW7VkWOryGRHjxeQy1tsnwQaw+xhtOtlNltUGTtF8/ovfB3/mMqRdLHGaSB4pzdBecQ== 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=nLPNCQf05qo5oajyeByhpEPz1JejFhT6x3aaIXolwak=; b=JjyXKAbLrm0TNiAjKfqQXz44s/2I8CEcyC2NUk1tbY+8WJFsgeg/WAVkqJFqB2Fx2pK+YLV0LsRxAW/hKQ/u8CxhUdYoELhkYcgD/+VbIFLQLqgLl5SwuuFVwGgs/jZhquuEeRP1TnytZh/L2Bbaq/3b1qenmElRuKRfEpZIPUu+LoWNDtV8CXY1NQ1McvmYCK6VYmvew1LNRFAuBkojV2uem5rByrKsbB9LF4NiGhgiSozTWnjqdAzh2rdpK9IHa86fO2il1xRY0Df+290Q4LUlmKQ1JbX0SvTajQYiuOXYaH7UViC71gO3qlHA5GVhCoqipqnzgKOfEMFKZRInWw== 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=nLPNCQf05qo5oajyeByhpEPz1JejFhT6x3aaIXolwak=; b=KyPcV2CrEwkWlMeuglTGfqyby2OcpkR2tEqLJXZ33k2fgX+RJHigCcq0PuKHOEc1qwZFsu/vv5eKNLzCi2nmzk9wqSRjfoAj+heC9p1kfaJ69mWriW8jNpfySEE8aDy1Kz4yoRyzeqD8e//26WT6go23VYsABKMazd+dAbhtEu4= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none; denx.de; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB5802.eurprd04.prod.outlook.com (2603:10a6:10:a4::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.24; Wed, 21 Jul 2021 13:43:21 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c445:d742:eb76:86dd]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c445:d742:eb76:86dd%9]) with mapi id 15.20.4331.034; Wed, 21 Jul 2021 13:43:21 +0000 From: "Peng Fan (OSS)" To: sbabic@denx.de, festevam@gmail.com Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Peng Fan Subject: [PATCH V4 02/44] arm: imx: add i.MX8ULP cpu type and helper Date: Wed, 21 Jul 2021 22:16:43 +0800 Message-Id: <20210721141725.23346-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210721141725.23346-1-peng.fan@oss.nxp.com> References: <20210721141725.23346-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR0401CA0015.apcprd04.prod.outlook.com (2603:1096:3:1::25) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR0401CA0015.apcprd04.prod.outlook.com (2603:1096:3:1::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Wed, 21 Jul 2021 13:43:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bc15eb4c-4d26-4cb3-07f4-08d94c4d80f3 X-MS-TrafficTypeDiagnostic: DB8PR04MB5802: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:243; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9R785qzDCh4nzdVA41uPovW5JgJE/bIEiLOL6BJL7VO0vngReGl5t65P/SvPsjd3uWc6t1kPuIjT4SidP5kHHzeIPoCdZZY2CnEk/E0tVBamLcGgoUoUP7t+J03jupHDoY/Ol3hnagUxEsRRBjUTevUI3ACrP8Ff43zCux0buB77Uqr663Dx3QuIwzJwcQrYQz3R7Nb9aqKpJqu4MgnWxFv6hCJXjvTumysnH6PThrig5rOFZKlqgbsPtrOXNXzMwFDVm+eiesf4J92cwBy5OGlx0t3AnCjtU12WVbkhhTiySpwzZSiX4pAutraZkko17CgCs8iQoEuyYWS5FCF7uBd8pDTyF6kp/RcFouvlLXrFLRxZhmNjyiuz2QOgjILF5fHo2I0LxpwkSgHDpYdxJw7kg8I5U6V4N4NTvf9ht1Sv5TYyK7Q1I16/89DIyEqMf4IDtG1t19EIkF8GZ3EREz0jVPvhkmGcskFUBhaCvk2SQpCmxxAm2uztBsvp2S4dtOIZb0qKFREcjEAikDhN2H/j7AlbAml38j1Uv1U/+z/r/2reqJVFPGAXYxsy/LRpWOJoTxv8qGZ5MIMb4kyDWTu/I7+7YNsDB9bxBBGI9snwW+JaqZs0rh+I+3oKVjdG7JWI/R37xVLCkACBKX5I/CvSHvwuM+CWC89OIYf8yLXyjFHGELNXSqjjGMeAyGLesfIIePhQ/rN8nAqtRJ6jrw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(39860400002)(396003)(346002)(136003)(6666004)(8936002)(6512007)(4326008)(5660300002)(8676002)(2906002)(1076003)(38350700002)(38100700002)(956004)(66556008)(66476007)(66946007)(316002)(86362001)(6486002)(26005)(52116002)(2616005)(186003)(6506007)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VprcaMB/pDapQSrPDPcsISQDufEMrLV6tFz7gz6l7sV151/rJVGJX2vpBNxHc/vkAcdc2dc3Xbg96A2hKNE7P33MRG8VikwzJp5hNjFItc/N0eW73J4FB3UZr5O5Ero46yTURW3uYi6MJRj6D1HZx8bWqXrTA9NamkXiGpdzksao5Lj0luh4nzRkU7sRY6jk6bIHezrMjcTM56WzWDARD365xM9BZh7ghwGz5W+a0K5a9XC7wLgMZt9Pm9p4YdFZMy4AKvQqm40SkLpe1cGStIPkdupJbwLGUz0VsqA7Fmsf2oOuvzuCIdxQO4GNW89aljS363xK/m3iXjt2h28FDpmwgyUGYR76tqZ0maMX6+7DetJMxt5oXNoPgd+Kvv/AXVPfvYFwV5Xg6YX14y3/dTZeIDEShoYwDz7Peo/BHqUbgfOkJsgBaCLlCgTTffbatzsv4zmHrdlttYFhBYCe9gj/4wW6Rcq10Eef7nr4FD3ptMcxezwBn/tuE+jQyBxG4PUNlLYWruux5zw3F5pP9ZGnNiYcei4QoY+h1AxTAYPD8QAcOYVii3WJAzTngx3y3Y0ht/cWqZYozGRk/LtjX6T+FTFhWRdtJqmR1aoobFjefD7J4TqAt9m1cgIRUV8zX4e9H+cOXxDCff2/EzbxUWAAlQ1S7TxI51Mlrc/PBnuG2DWP8dLwowLREpQ5QLKyaO/Fc7QBeLMsAHpYXQvVC/NTKqKua2re+Pm3yHrPHRArFQy+S78zlEBtXmnda8ycN91dpuhgUxzvfNTLE3rkxuDfeQJocrSsitlvyUj6SSIUx2Ndd2WoMVsz29srSkBn7/fKPIntPfhde52dIQCTcWo2MOrGb3yf3qNlFZ2BAvWn4gsbb2TM8E88uHS9PLIiOmInuJhtzydgJIcrBLRfuMF/iWUPmFwVtmBzsOFmM6Yl1VejvSWz/CYIJ5g64vd3hHzZ231sWNBI22CaxB0s558HEZmR6921w8N1F+VrucEG4NvE8hAv6xjbm7LYWib5nHxJG3VY+2YHWb6ibaJXKus0Mn+DodQVi1o9zk7OyZD6/uB9oMispGmIKh5atuvSvr211+FRF9P/9Xwk80Ap0DuGvmzPs8yEocH8bZkksd5gAyZ5czVYh0C6vtRmPDK7zMBvMJH0MuHEFaTJSnDX08QSkbVJlMvdToZfonEacqwIClDl37hOiqjkiLlfwUp0cVHTib2rGiM4rgpA1LlsUyG6m/d7/X8+dU/lbqkw1akTC/alxLIyhRNc8bE59VbjpnH7NclYashGWGddJLAKoLuYfHxWIAj6wuPkq66k1Zqhl6Usg/N0brieDp+Vtxf9 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc15eb4c-4d26-4cb3-07f4-08d94c4d80f3 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2021 13:43:21.1378 (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: ko/D9Hkm/S73LyGlHVHhyMX/y/CXbuWV06TOrblLWvpJgTBFq+/HmnPSMoLRzqYOzGBMju2+xY5BtukfKmx4nw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5802 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean From: Peng Fan Add i.MX8ULP cpu type and helpers. Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx/cpu.h | 4 ++++ arch/arm/include/asm/arch-imx8ulp/sys_proto.h | 11 +++++++++++ arch/arm/include/asm/mach-imx/sys_proto.h | 1 + arch/arm/mach-imx/imx8ulp/soc.c | 11 +++++++++++ 4 files changed, 27 insertions(+) create mode 100644 arch/arm/include/asm/arch-imx8ulp/sys_proto.h create mode 100644 arch/arm/mach-imx/imx8ulp/soc.c -- 2.30.0 diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx/cpu.h index 267a094e5a..fe96378971 100644 --- a/arch/arm/include/asm/arch-imx/cpu.h +++ b/arch/arm/include/asm/arch-imx/cpu.h @@ -50,8 +50,12 @@ #define MXC_CPU_IMX8QXP_A0 0x90 /* dummy ID */ #define MXC_CPU_IMX8QM 0x91 /* dummy ID */ #define MXC_CPU_IMX8QXP 0x92 /* dummy ID */ + +#define MXC_CPU_IMX8ULP 0xA1 /* dummy ID */ + #define MXC_CPU_IMXRT1020 0xB4 /* dummy ID */ #define MXC_CPU_IMXRT1050 0xB6 /* dummy ID */ + #define MXC_CPU_MX7ULP 0xE1 /* Temporally hard code */ #define MXC_CPU_VF610 0xF6 /* dummy ID */ diff --git a/arch/arm/include/asm/arch-imx8ulp/sys_proto.h b/arch/arm/include/asm/arch-imx8ulp/sys_proto.h new file mode 100644 index 0000000000..cab12c218e --- /dev/null +++ b/arch/arm/include/asm/arch-imx8ulp/sys_proto.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2021 NXP + */ + +#ifndef __ARCH_IMX8ULP_SYS_PROTO_H +#define __ARCH_NMX8ULP_SYS_PROTO_H + +#include + +#endif diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h index b612189849..ad446940ff 100644 --- a/arch/arm/include/asm/mach-imx/sys_proto.h +++ b/arch/arm/include/asm/mach-imx/sys_proto.h @@ -51,6 +51,7 @@ struct bd_info; #define is_imx8md() (is_cpu_type(MXC_CPU_IMX8MD)) #define is_imx8mql() (is_cpu_type(MXC_CPU_IMX8MQL)) #define is_imx8qm() (is_cpu_type(MXC_CPU_IMX8QM)) +#define is_imx8ulp() (is_cpu_type(MXC_CPU_IMX8ULP)) #define is_imx8mm() (is_cpu_type(MXC_CPU_IMX8MM) || is_cpu_type(MXC_CPU_IMX8MML) ||\ is_cpu_type(MXC_CPU_IMX8MMD) || is_cpu_type(MXC_CPU_IMX8MMDL) || \ is_cpu_type(MXC_CPU_IMX8MMS) || is_cpu_type(MXC_CPU_IMX8MMSL)) diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c new file mode 100644 index 0000000000..b3679aefcb --- /dev/null +++ b/arch/arm/mach-imx/imx8ulp/soc.c @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2021 NXP + */ + +#include + +u32 get_cpu_rev(void) +{ + return (MXC_CPU_IMX8ULP << 12) | CHIP_REV_1_0; +}