From patchwork Mon Jul 19 07:46:52 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: 479807 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp3866808jao; Mon, 19 Jul 2021 00:14:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwW7XnEX51hkd5oDC92+f90UIqMF1v7EADVe7QMOkQSx1o1imolWP0ln01idWP18ugfEP69 X-Received: by 2002:a05:6402:3d4:: with SMTP id t20mr32919903edw.274.1626678844508; Mon, 19 Jul 2021 00:14:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626678844; cv=pass; d=google.com; s=arc-20160816; b=L+T14yvxRH2iFsNkZqT7nXDl9zTOLZdXPNkjGTuFCKcN/KNHqoMWB26dJEoFV9cErp yAtt4kAvEqzDO9c9Ju7Tl3KOPtKJtvHioURXQ5AlGRLJfMQYTO/7bH3QRO6DCQjpmRJ3 VptM8pLLeKi/EOCPH5GsNxfNFGb9hK/k9ac3MqbBYp+mZjpJ8I18PWO7a7xf74Qmoxy2 gRVlFEQfBEeSy/Jrr4vU7bf5jaKH99FuHrAP1Oeck7A1kjHXdmMFLNhgA86iG7WV5vsO CsCzahAnjyqwUUkPH/H2UXhqZBzKHBoaJR3oc2Jrvp7DBWwqet3AOyqfz7V3bAz0CVlE Mpeg== 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=SUPVpRT1XTy5eo/3Q9qFw8baF8il1vhXjyhiFNROWhPg9GiBwMEQfTqhLzQYVz/mD8 6vCFdgzYoZ762fUEC+QEyvqbhJ5trD2L6ZGI2raQqYm8IhH7WBaDkIEattRG+5ZnSVjJ Wda2Deu9BV1rx7dYuGCekR6TUGXSBf6CwkUcVxDpy3ARSF5wpE/bgKYZj5zKsI9sEMyZ jIyyyqfIiHUZbv59lTIpmZHWN8crPL93M/HtiYFX6aCQA3OLjuttxoARc5H9UFgOs2cM lxizlrxVNGkLvYWlPkGEprRB9M/wVVO+eJ4RKr1ygyr/KqxeBLK11hGn9uJ0BGnJgImD /2Ow== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=VGVa7uyQ; 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 a12si20592812edr.3.2021.07.19.00.14.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 00:14:04 -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=VGVa7uyQ; 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 5E06682ABE; Mon, 19 Jul 2021 09:13:50 +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="VGVa7uyQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0D6DA82BB4; Mon, 19 Jul 2021 09:13:44 +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.6 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 EUR03-DB5-obe.outbound.protection.outlook.com (mail-db5eur03on062a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0a::62a]) (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 2FD4682A81 for ; Mon, 19 Jul 2021 09:13:38 +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=oQ8BhlWobZLzXAX3pYAKJLi+m0648GEh2dil0Q/JxlshnpUX7OO28HNFJXgDK33GA6UW01TSGzBF6VHEMYmbU8IwV92fIiAz09Htkm5QB0D6iFTi1R3qX3nHMkHjNv/Htg0mFTL/Q8xKTol5SICenywsaWeHcmDIKylzApVrk6uNbflN3aDKGsEaIpnt1BfDEwi8xEsKC7Hde9jiR809cNXqhoZYn9XGzSH6DQk91JnyVZypRm1MlD+MAc2HO5hYJw+FVseqZIxEihq6gcR4h/TTNxAn3VXWqqxRlsxkiMtaCvccnSeBnqroovAWIOkvUWe8JoIK7fqcpSTXU/Qq6w== 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=YlBytYjgzHF80Tn9xZ+ZcjOaJHnKH1IJNjiJaGfKDpQXcCmX5dv3Wl68nq7UYKW81WlhaaBbXo6TJUu1oN4sUh7TdZBctkufJlumogDdnyEfcUjRzA7zzhrMlngwWODIRJK4sbXDeRXnymlRELsC/IUn6Rg7MfybDFg5fdGS2F8eNRqohvrAZNLKLmYZY5Uf++OjB9irXd0m13Vta1sn77TWrVGCUFFnYovW5BUO2iFhMwuhWHXhq3bLSImySwmFTQacSBMu2dfbSDpnay5tFLzbUaaDMMAFUTxEtwnxRTzdqKRLX86uQ6oJvLD00TfJPPp06ugexH4Mh5cTwYc/jg== 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=VGVa7uyQhy4u1EG+eKtmrYO7HgCQGgAHRGXxwwVNQ96/n65SaLt6re1MR1e1+iMHJ5q5mmD5RTPhHzv/wiGcWx3jVl2gHnerT1ZmS4sMX56zn+oBpKJV6aQtpMjihhVviG26kIhKeNlUiAdRLpqG1oMaO2wNxSrAO+DvACSzZGk= 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 DB7PR04MB5242.eurprd04.prod.outlook.com (2603:10a6:10:18::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.29; Mon, 19 Jul 2021 07:13:36 +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.032; Mon, 19 Jul 2021 07:13:36 +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 V3 02/44] arm: imx: add i.MX8ULP cpu type and helper Date: Mon, 19 Jul 2021 15:46:52 +0800 Message-Id: <20210719074734.29170-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210719074734.29170-1-peng.fan@oss.nxp.com> References: <20210719074734.29170-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SGAP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::18) 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 SGAP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Mon, 19 Jul 2021 07:13:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c23bbb19-f5fb-41ac-42c6-08d94a84b9e7 X-MS-TrafficTypeDiagnostic: DB7PR04MB5242: 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: WRfL+ln5fMAG9Q39i08BUoIQka8kGu/GLhV18v9cqo3Wi74elqYJTXT4xnxV3JL0G1kRT+OHG7dn+ozLu9VLaZx/BO1dLJBxGXd7X+suCSBSoYEYnnivy9HhcHQDYemWRBflK9kmRntHM1R3qJn0YX7kzuzqa+CQShLSAwRU0FfFNQHWhoJu9Pa+QnLNNtkUr82AICyHAhbuRp19eJE0gbdvrwRGVWw+sIvgcB0uG4NBf2eM+v/YZbbjOWkuIRr9y6IHVXy3/r+grpWTWM3VNWpf5krxB3QDrc5XY9ANZUlxUUc9HWWS0Eh4t+iMM6sj9lB2/fL5V/1yjKdEq67kAgLhvCq0bvkSfauOH6uDJCCWu/XqXBE0YJPsiBjNRkwBtvEwctCCV4AgT5IkBMJI0aL28lO7CKAa3nnOvgE/RCidTDWnBbxj5XgUNyJjYuXir93V2rV/jTaRtp6T8eykqWJg8qEQLlElHQM+OjgWZjtuPr/lcj4grkfjcTSigAKfnzXld5jMrCeTXimleBQCHGM+Jk+AC53s4JeAkWJ7ZJwLfSqwE7oge5WYnUxPngdXCWLPOtDMePPAP2NarSO1WJiO+Xzq2bLUfhQUXHOv+uCgKCOmLn8QdF+RFOwG9FBDLZiWyZzcEGMZgGjOFdr/dVNcbu/ctkD4LqwGA8gLJX2jHj3vMovyk9v9R0xLRGDNl3En9u0qqsr2yoCxhg8W/w== 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)(136003)(346002)(39840400004)(396003)(376002)(26005)(6506007)(6666004)(52116002)(4326008)(8936002)(2906002)(478600001)(38350700002)(38100700002)(6512007)(66556008)(66476007)(86362001)(66946007)(8676002)(2616005)(186003)(1076003)(5660300002)(316002)(6486002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8CRpJWFe8Lnf97cHu4Eln3MGAjO88Env5jQNKo8R9OuAJXHURovVRU+7OoAYZPdjdjwdHml5sVEzcwgvi654DPcsATwVZBNckJHQ5B9/LL2OgLRuPdZg9GONmR5jyhzw4MyUlXwN8ie+5s+Ph1X+SNdvGk/I16YX3292MgJg1NGVPf57faK3XR/FVzcPkSRQQKvTeZdKU5ene/xm+vSA0fMTbepLOR7JEDOXaGU0Yo79y4mPtC+M0MfVucCFX9pakaIVez5Lhq0NcWPRnYFNAboJjkkkY1mZ7IKx6P87Y6W1V4L53Rpphna1ooi+75SxtVI7nWWrW6249v+7iPEU8ySfhD4EgFXz7drqeVtCKuNxo9qcmp0j30G9LZ5kRt/nzhUrQArlCSsa2KscdnSAAxIoyddkTk/8Tz1AU5jYFPXK37mfo2y4xk8AnmPBwH8JZgqWE0MT7xUpggXx7qHsMFhkK4QHOcezB+Nkmvv5CO9xz+X0dkhsuV1bgP07rG/aUk3i4ooklvihXiV/Ygwdn2LRsHAXvwQYT3AWZ81zfQzotr4XHUk0agSWkwjUvvZ5YBOZHSc04Qz4adt8gT3na69UCsZH5ckUfKmp6Pc2QywGzkQfGS60+63enD4XKZRedSXoxqsLCzTHGfCpxEwmubFQ/1ZumaKOii/PbmxIgvXTpfqletG9Cl8E24m1IvJU4lRE5eAQ9t3snbqHLm3n8MkfTz6kdPPsgmRXGvf6Gv45NX06+R42TB3mwikPIlLi7lqRXWrQo5w9+z/Tlf+oyZVnWFW44QPICVPh/fO5Rbb+OuXO7l0dHrrIRwdj4QDUJKocqW0WnkJHN/jpG8wJEy47SS7O02/1pbXqZlklcoqLhLD2vzMTQsoFAfb5QKu+xayLikUMGQznvjO0/J9XyKgFCiybPMJwJ+AbppD5xFovwxgCn6Dp8Rri43HvAccJfERx0bufNVUbIFFQtqw7inKfaGwRJaV0S7blm101X/eZEr6fOvkhvIKRVasjeZE4c/YjUpleD+40SCbjXRAnO3jJbHs38BnR4slBKWRmu2dBd1MqNEaEDMShaTgr8D+zYpT5BLB9nHDM7ABrYpuEgAANKPnswTyo/LWykmd5PEkCdrmwlT0wVKuMxlUJl7WeCTonw8xyqAcjt84Sc5b9ic8WBmsO4NPHBIl1S9Z3J4/JnpuW3ud3qgME7rw0+N2NtWoVq0vLymCjKmowUni5qKn2gOQ/kBYCG8Rd9c22ltyLNK4IYo4FK5ZizJBy52eAbmaz9sSm0s+rSTv08C3Lv+osBPDLgwhqjpqfLDAn6UbiIZn6ucL37zoJCUduv6Xg X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c23bbb19-f5fb-41ac-42c6-08d94a84b9e7 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2021 07:13:36.7164 (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: OZyoECY4LXOFpAktYb4tONqBnqTRVi18mIFCJyUNUhNgFQPXlc/8vu965uz+dvnSWqw9davHGaqpNjKUk0cd0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5242 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; +}