From patchwork Mon Apr 12 12:12:31 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: 419536 Delivered-To: patch@linaro.org Received: by 2002:a02:c4d2:0:0:0:0:0 with SMTP id h18csp1658977jaj; Mon, 12 Apr 2021 04:42:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6dA5731Q0scz7t3ubxlts3vfi1x53Kg8VzUiRwdwFXb/tq80Na+EHmP5NigWZO/d38RmP X-Received: by 2002:a17:906:6789:: with SMTP id q9mr27605440ejp.295.1618227738728; Mon, 12 Apr 2021 04:42:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1618227738; cv=pass; d=google.com; s=arc-20160816; b=fkByRjghchydWGTyGD/Ib9AMijuq07QlXkzo6rxb1TgZ9HNkPem3r4uzh5HbBkLc7J jZXxA8qbg2N4TPT3RRlyvdPnacVl8LGF1dnlQzkym2YqaovtZopiFjDUuPZrCcOjcGjB prbEaJfs18QPR/89+rn5X1t7xZxmRGNbD+q49cJbXBDy/0UO5DtauRM1mgHysHVGm0sn 2xxsTGunBDGfiHFbm9snUgF9lREL6Gm0R4bAKEWh6+v12qUne6eRGc048w70YAycgxfJ 6gYfw2XnEi8L9nUGvySaHz7qEwM+pARh/rbCDEFKZ6A3yPeknFv29NQVnJdN+z0GmQ7c c7jQ== 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=IdDqVEp8g/W33r18iWr0CW7quArIiByLBuOPy+2YQnU=; b=jwgVgGNDac4jeo4QyKl93BtNDKR9o88a396yk2jHooeyDHFRRpvlQ6aTXOHNsv/11w 7nwj6WWIJVuI2qG6LMiHCTQd1PUSh8omyeKjZmsLSwNvvZZLnWYjMgF1F2hiWvRCEt7V LMQaZMKFNtUhnsxzJhbAE7MtMaj+bTH8EEZkX8OB3y17FZl8l5Sp7If/Yp+6FUhO+rNc ccc64o7M6BA4obJ7rGzJZ53BjsEJxsIL5e1JFtus+2Bc7Oc303XPTn79Q9iX1EciLaR8 twdPA9hQhyvvZAlxVbYpLbzAIBvij/IsxmDtvy18+VZ1CGsOjZ7Stkhe5+badPOIkoLh SMMw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=blWe4pgi; 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 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id hs11si8261656ejc.421.2021.04.12.04.42.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 04:42:18 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=blWe4pgi; 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 85.214.62.61 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 D621481F86; Mon, 12 Apr 2021 13:42:11 +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="blWe4pgi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4F67C81E81; Mon, 12 Apr 2021 13:41:43 +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=1.0 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-AM5-obe.outbound.protection.outlook.com (mail-am5eur03on060a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe08::60a]) (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 F122D81ED9 for ; Mon, 12 Apr 2021 13:41:32 +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=JNCUompymKRbyiiwJriavBhfZUPhg2co7XvRB1k7NFaH78B461dVXMU69/c5Kri2LtJhRWE4QhdjVZ2DOnNmxI8I+zHOVJauj0Ki5E7B2j8C8pf+Ix6bUVSYVPFxu0aWq0Tz8E3DX6ReMcvrtO7sl+vnjh9PqSvvu0RiBtwsT77JQ5fuA4B44H2ZChbMe+lXHxDCv9Gmj6R+gqfOtHMYipVw8Gs518Rv1yczyzilAhViLxGOqTA2kyn7IFoP5eVm4MTr/WpDzZii0HSIOm+BmOVdQ0Xd/4gmNEY7XIYN7Vs2JYusXefS0auTnJXx7Rc3p4e6njDWTJlB4JN201Fgkw== 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=IdDqVEp8g/W33r18iWr0CW7quArIiByLBuOPy+2YQnU=; b=IcKv6yoKImGCWbupul3pDEP2pGxSbXZVQtbjNddoygnIt4MKd54ubzg4yhklYr2PPA3H5Nk3UaJU9ujvncZB7N0JTIGQ+h2n6+pG7zYyLTcJ/3FznCEp5YKnefF1W7i15q4tWV/2rg5B5Ad1YNVGRjDg9cIRYiBH8kYRsOCJk/mkkY2PLLmzLOcyMMrTum7ar665D9xNEG9ok6NCZZhKp+i3XADU9Rq3TWqR41k5VG0LBjK7GwGHSWra05qHGMudClI1INWDz8c2xq6sZq6pP+7kj74cCT4ON3DWFOUPMS8iI6v7H/VLouLO3jMa5YB0puA1aZxzBW5v+/IWSrLJig== 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=IdDqVEp8g/W33r18iWr0CW7quArIiByLBuOPy+2YQnU=; b=blWe4pgiU8Qt92Ao7FtEvSIc1+t6X2sRki9XVPAsu3HVgbj0M8o0mrx2pyCyodVTEQy/Fi2iz8vmQ6oezFvV6WrKW49IAXK+9FZwfRLXvT+RlPYlyqrKHy3UbB4OBqdZRuDHIKOLhallBI5EaS34uITuPj7nng5vWFEkKogVW7w= 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 DBAPR04MB7223.eurprd04.prod.outlook.com (2603:10a6:10:1b0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17; Mon, 12 Apr 2021 11:41:31 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c57a:6964:f72c:21cf]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c57a:6964:f72c:21cf%11]) with mapi id 15.20.3999.032; Mon, 12 Apr 2021 11:41:31 +0000 From: "Peng Fan (OSS)" To: sbabic@denx.de, festevam@gmail.com Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Peng Fan Subject: [PATCH 02/37] arm: imx: add i.MX8ULP cpu type and helper Date: Mon, 12 Apr 2021 20:12:31 +0800 Message-Id: <20210412121306.11484-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210412121306.11484-1-peng.fan@oss.nxp.com> References: <20210412121306.11484-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: HK2PR0401CA0009.apcprd04.prod.outlook.com (2603:1096:202:2::19) 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 HK2PR0401CA0009.apcprd04.prod.outlook.com (2603:1096:202:2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.16 via Frontend Transport; Mon, 12 Apr 2021 11:41:30 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fdb8455f-ceb4-4541-6366-08d8fda7eafc X-MS-TrafficTypeDiagnostic: DBAPR04MB7223: 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-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BoviL1eFupuv/cCoNbr7Wr0ZnszM6MJoXZOejq6qMX9tPgYOwv34CvjSIIN2mFDhGHBaKKBX309sMYMpk6IZPBMJJ5Ea3l48TmhCWdcc6X/M4gV9di9QsO3jdHS2PZyEosHSEkyw89IAqOtcFr+ZXWx295+Aq453wO1et/VMehG1hzISQDhFN7uNgUUkRIvKoyHOU671uqEtLjaKOkUs8liSLwExq7Df7FiF03VGvrg0DYuHun5xnvhjVOz/wYapJIpRgjODq7d8EUMih9slhq7K47/AOOiGaBFm+P5qcE4kZaoqmo16iu2ksPH37gpsA7Ft7wyHxX5LaCwAYgAK1n5351sO3cV1pYFm3aODFphL99W21ZUvLkW5ZMk3maMqBoRQ6fC+9YqhKH1fBzsplni//5zvB+3yRzU2CduoMNTzE/y9xaHMYNrs1jUJYVdEU7kRQDlbjKWdp+/0zw5tuOS9OBgAspW15a0Dfu1QePSQw+yftKdA8ueJViRbWlAB5XgEds2XV+CxFHHwyvuqbJF+B9Z2dKLjLUaBaz5av6po0aPwUg0OxROJUr0cd5jeBdCcGWQ3wCu9dfUzEh9HRNm6bjA1YowjLeMzGuaICFjpGOVvLLYvqwyc+tYDF/i6Eiq1HTM8Clhj+4anz3BlU6vf6XR8rPL+9mVFQFsgOK4= 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)(346002)(396003)(376002)(136003)(366004)(39860400002)(2616005)(26005)(1076003)(956004)(4326008)(38100700002)(2906002)(5660300002)(8676002)(16526019)(186003)(86362001)(66556008)(478600001)(66946007)(66476007)(8936002)(316002)(6486002)(6512007)(38350700002)(52116002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rJgxQsaxepcFhSH/AsXHxg4UfRmOYHosVe1WFzdRJ9SOmpoM6iztd+ztZeWPeWmY5LbdhsDA3YWCtmhyWVQuYq/2sUcXMg96eisDk4Wti7G+DoS9UDiJBPUhWVDKj0l+yp1AWwMSmffrxUz3bxKQOLtKTmYuI/zZzL5CkOd3yd8neBCklYrysxYKG/uEtFxVl0HA7jB8KxDVcHmEQBBOjlkW34LeTdVSeQoUCOdCLkS9w7i+rqVpzQ4MTLoG/peKNAvgLXPfVQgPZnCuU9aKd9f59HS+kzQH6EZDD4pIOTNNicW04AU039wFZM9RkDsbW X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fdb8455f-ceb4-4541-6366-08d8fda7eafc X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2021 11:41:31.8039 (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: L1vEFcGBNygwKypYr+f4k6JCq1MK0JE5sb+mLAcZRnqz02dmVDc/TFeSmF6ocT7OaVBNwrksV2ZwjT0ZHBdgmQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7223 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.102.4 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 | 2 ++ 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, 25 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 bb13e07b66..2969d1f9f9 100644 --- a/arch/arm/include/asm/arch-imx/cpu.h +++ b/arch/arm/include/asm/arch-imx/cpu.h @@ -50,6 +50,8 @@ #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_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 c7668ffc4d..ea746ae6ee 100644 --- a/arch/arm/include/asm/mach-imx/sys_proto.h +++ b/arch/arm/include/asm/mach-imx/sys_proto.h @@ -50,6 +50,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; +}