From patchwork Sat Aug 12 06:29:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 109928 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1844967qge; Fri, 11 Aug 2017 23:40:13 -0700 (PDT) X-Received: by 10.80.176.35 with SMTP id i32mr18011633edd.146.1502520013320; Fri, 11 Aug 2017 23:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502520013; cv=none; d=google.com; s=arc-20160816; b=IbOiH8b45vuQLG/olxNMS/GHliPhUPZdmI48CFIVi1xIvejLYOOG9JR6Plyg7PYePT Jlgs9OBshYXmmPoIWacF2OAVb6Yn3Sxms5+AO7aHvuK86822GBX8JY3JkwFMOWpEQvjZ uxALYThX2bHwC+8V6IhNCNHxP+ig7fginr78O+3Asav4tRVzZTE1LTfQPbDL/NuE4x0b kj66wFCDIl8nGWZXa0wJmKBl5UhrosdjCG0/m/IkR/CCRlKA6VoXeNIMQdOG7XzZwl4p +jpzqJ7ApSFCjtBn0RVGXJXUWr2bpRN098DIPzqA73bgaa0Bk4WDkbqQAOIzXa6cA7MK Yf7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=bJEz0isVQ5qlvuTu2We5C5pXmwuPGn7jYu3Qox199wU=; b=skJ/aujtlW8mr/xpwEbg4fGKd50FG4Ry74LAqTk8R6bw6oduXKh1JbsmCdqCLSwFA9 t7/d9Mc86SRygP6rZahdvoSBuI37gYOu6cV/vcBmb8ZWoCgcohW08EF30PwXGIHj5/zJ Yn5O6qDmy18taOa4zLsEcaGJMPHFMV8Ofz5TR5UrNVse/k5mNkJirT8XxvGkMmi4/8Zr a4msdHsraug8oF466AjRLmwomfZmHmJyQP/hxZu9v069lsBY42A5+4vHw2ZQz/bnNxj3 4fVxCaafJQBeISDtrLXhqoxOuVVr3kakwH7QV7p/XtBUVns003/p9TRoCHV9msUWx0gv L1Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=Dac/xaH3; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id x15si2275562edk.301.2017.08.11.23.40.13; Fri, 11 Aug 2017 23:40:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=Dac/xaH3; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: by lists.denx.de (Postfix, from userid 105) id DD8C9C21DB9; Sat, 12 Aug 2017 06:38:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3A0B7C21C97; Sat, 12 Aug 2017 06:37:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 76DB9C21D58; Sat, 12 Aug 2017 06:34:15 +0000 (UTC) Received: from fllnx209.ext.ti.com (fllnx209.ext.ti.com [198.47.19.16]) by lists.denx.de (Postfix) with ESMTPS id 74AE8C21E02 for ; Sat, 12 Aug 2017 06:34:10 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v7C6Xhcg004690; Sat, 12 Aug 2017 01:33:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1502519623; bh=oFjVEu/DsR494RvmCIWoeVzNphShU42j7yMHSd6jcq0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Dac/xaH3ET8HmFVf80gYonI2Orj9nN3Fb1pwZoL1j+3bQYzpNMeYPZaYFHkUV3b9d +SEaqnFCBv9DIAEgi4HysMcMpY09vN5F/UNCdOTx+84OkwVWUl+PfKALSD1X7jgJwl TS98AqEerKohoZidS7K2qly8Dxl099mkp7oECKvU= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7C6XcpO015549; Sat, 12 Aug 2017 01:33:38 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Sat, 12 Aug 2017 01:33:38 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Sat, 12 Aug 2017 01:33:38 -0500 Received: from a0131933.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7C6XSkC020085; Sat, 12 Aug 2017 01:33:36 -0500 From: Lokesh Vutla To: Tom Rini , Date: Sat, 12 Aug 2017 11:59:25 +0530 Message-ID: <20170812062933.1325-5-lokeshvutla@ti.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170812062933.1325-1-lokeshvutla@ti.com> References: <20170812062933.1325-1-lokeshvutla@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: Tero Kristo , Praneeth Bajjuri Subject: [U-Boot] [PATCH 04/12] arm: dra76: Add support for ES1.0 detection X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" From: Praneeth Bajjuri dra76 family is a high-performance, infotainment application device, based on OMAP architecture on a 28-nm technology. This contains most of the subsystems, peripherals that are available on dra74, dra72 family. This SoC mainly features Subsystems: - 2 x Cortex-A15 with max speed of 1.8GHz - 2 X DSP - 2 X Cortex-M4 IPU - ISS - CAL - DSS - VPE - VIP Connectivity peripherals: - 1 USB3.0 and 3 USB2.0 subsystems - 2 x SATA - 2 x PCI Express Gen2 - 3-port Gigabit ethernet switch - 2 x CAN - MCAN Adding CPU detection support for the dra76 ES1.0 soc and update prcm, control module, dplls data. Signed-off-by: Praneeth Bajjuri Signed-off-by: Lokesh Vutla Reviewed-by: Tom Rini --- arch/arm/include/asm/arch-omap5/omap.h | 1 + arch/arm/include/asm/omap_common.h | 8 ++++++++ arch/arm/mach-omap2/omap5/hw_data.c | 27 +++++++++++++++++++++++++++ arch/arm/mach-omap2/omap5/hwinit.c | 3 +++ 4 files changed, 39 insertions(+) diff --git a/arch/arm/include/asm/arch-omap5/omap.h b/arch/arm/include/asm/arch-omap5/omap.h index 2f005dd3ad..3e15839858 100644 --- a/arch/arm/include/asm/arch-omap5/omap.h +++ b/arch/arm/include/asm/arch-omap5/omap.h @@ -58,6 +58,7 @@ #define OMAP5430_CONTROL_ID_CODE_ES2_0 0x1B94202F #define OMAP5432_CONTROL_ID_CODE_ES1_0 0x0B99802F #define OMAP5432_CONTROL_ID_CODE_ES2_0 0x1B99802F +#define DRA762_CONTROL_ID_CODE_ES1_0 0x0BB5002F #define DRA752_CONTROL_ID_CODE_ES1_0 0x0B99002F #define DRA752_CONTROL_ID_CODE_ES1_1 0x1B99002F #define DRA752_CONTROL_ID_CODE_ES2_0 0x2B99002F diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index ef5c481349..e951b232d6 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -722,6 +722,7 @@ static inline u8 is_omap54xx(void) #define DRA7XX 0x07000000 #define DRA72X 0x07200000 +#define DRA76X 0x07600000 static inline u8 is_dra7xx(void) { @@ -734,6 +735,12 @@ static inline u8 is_dra72x(void) extern u32 *const omap_si_rev; return (*omap_si_rev & 0xFFF00000) == DRA72X; } + +static inline u8 is_dra76x(void) +{ + extern u32 *const omap_si_rev; + return ((*omap_si_rev & 0xFFF00000) == DRA76X); +} #endif /* @@ -761,6 +768,7 @@ static inline u8 is_dra72x(void) #define OMAP5432_ES2_0 0x54320200 /* DRA7XX */ +#define DRA762_ES1_0 0x07620100 #define DRA752_ES1_0 0x07520100 #define DRA752_ES1_1 0x07520110 #define DRA752_ES2_0 0x07520200 diff --git a/arch/arm/mach-omap2/omap5/hw_data.c b/arch/arm/mach-omap2/omap5/hw_data.c index a8a6b8a869..4c4e245a6e 100644 --- a/arch/arm/mach-omap2/omap5/hw_data.c +++ b/arch/arm/mach-omap2/omap5/hw_data.c @@ -113,6 +113,16 @@ static const struct dpll_params per_dpll_params_768mhz_dra7xx[NUM_SYS_CLKS] = { {10, 0, 4, 1, 3, 4, 4, 2, -1, -1, -1, -1}, /* 38.4 MHz */ }; +static const struct dpll_params per_dpll_params_768mhz_dra76x[NUM_SYS_CLKS] = { + {32, 0, 4, 1, 3, 4, 8, 2, -1, -1, -1, -1}, /* 12 MHz */ + {96, 4, 4, 1, 3, 4, 8, 2, -1, -1, -1, -1}, /* 20 MHz */ + {160, 6, 4, 1, 3, 4, 8, 2, -1, -1, -1, -1}, /* 16.8 MHz */ + {20, 0, 4, 1, 3, 4, 8, 2, -1, -1, -1, -1}, /* 19.2 MHz */ + {192, 12, 4, 1, 3, 4, 8, 2, -1, -1, -1, -1}, /* 26 MHz */ + {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, /* 27 MHz */ + {10, 0, 4, 1, 3, 4, 8, 2, -1, -1, -1, -1}, /* 38.4 MHz */ +}; + static const struct dpll_params iva_dpll_params_2330mhz[NUM_SYS_CLKS] = { {1165, 11, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1}, /* 12 MHz */ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, /* 13 MHz */ @@ -234,6 +244,17 @@ struct dplls omap5_dplls_es2 = { .ddr = NULL }; +struct dplls dra76x_dplls = { + .mpu = mpu_dpll_params_1ghz, + .core = core_dpll_params_2128mhz_dra7xx, + .per = per_dpll_params_768mhz_dra76x, + .abe = abe_dpll_params_sysclk2_361267khz, + .iva = iva_dpll_params_2330mhz_dra7xx, + .usb = usb_dpll_params_1920mhz, + .ddr = ddr_dpll_params_2664mhz, + .gmac = gmac_dpll_params_2000mhz, +}; + struct dplls dra7xx_dplls = { .mpu = mpu_dpll_params_1ghz, .core = core_dpll_params_2128mhz_dra7xx, @@ -700,6 +721,12 @@ void __weak hw_data_init(void) *ctrl = &omap5_ctrl; break; + case DRA762_ES1_0: + *prcm = &dra7xx_prcm; + *dplls_data = &dra76x_dplls; + *ctrl = &dra7xx_ctrl; + break; + case DRA752_ES1_0: case DRA752_ES1_1: case DRA752_ES2_0: diff --git a/arch/arm/mach-omap2/omap5/hwinit.c b/arch/arm/mach-omap2/omap5/hwinit.c index 2050560a37..e54547b5d9 100644 --- a/arch/arm/mach-omap2/omap5/hwinit.c +++ b/arch/arm/mach-omap2/omap5/hwinit.c @@ -362,6 +362,9 @@ void init_omap_revision(void) case OMAP5432_CONTROL_ID_CODE_ES2_0: *omap_si_rev = OMAP5432_ES2_0; break; + case DRA762_CONTROL_ID_CODE_ES1_0: + *omap_si_rev = DRA762_ES1_0; + break; case DRA752_CONTROL_ID_CODE_ES1_0: *omap_si_rev = DRA752_ES1_0; break;