From patchwork Tue Mar 13 15:48:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 885199 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Dx5iJdOj"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 400zp13n7mz9sT4 for ; Wed, 14 Mar 2018 02:50:17 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 22860C21DEC; Tue, 13 Mar 2018 15:49:29 +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_MSPIKE_H2, 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 0A35AC21E30; Tue, 13 Mar 2018 15:48:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id ABD2FC21E08; Tue, 13 Mar 2018 15:48:27 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by lists.denx.de (Postfix) with ESMTPS id C7E75C21DCA for ; Tue, 13 Mar 2018 15:48:23 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id n12so208493wra.2 for ; Tue, 13 Mar 2018 08:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aYWGmNddoYhNWF1oLK56rUV+M/dWXKoSfjRNxyPx/Lg=; b=Dx5iJdOjNlHj5ok0ZCEhpHlQV5ym2CcYLc1cby2PYz20u6LKQOK+eSI4an1gpVMmq+ Hxbjw+R0OfZT7YZSckdTW2c/gCS8h7pySyrDteu9hB5JLP84DzWn3/sXHxCjWa8a5zhF JrfLD+Xn43XREIDbhKPqVmJUrDhUQou9GcAts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aYWGmNddoYhNWF1oLK56rUV+M/dWXKoSfjRNxyPx/Lg=; b=qLH3Dqvr1p6J1W0Q3oFAreQfho/7tVcHLNzExAUTwLGnKYOPxe56XsfyNa6oy/JGo+ N0P7zcoTyCmT+4Q8FY6MQ9Sm7eW2DM0Y/XHO4XaZyc2s5RaHoOBRwF8DGeP+NeoTQtNb yt3ptEfi/r0eecAsDOIXtWHWk7Qliedcmn6VUf+RcRGNUVVr0QML7IIyPf0FTq4f6i+d BN7bjq5MlyhD1vM7Gg3X/c3z9+OaiqsPvrci12pxnJfIBxwuCTWSQdBAWqGADt/UQE+m I9SwReHW7QBwNgyhhze9HBWFZj6hUHSRAIQKmNcU/VTywrgzqW6pDPz7Eawnw3PYrHwV pExQ== X-Gm-Message-State: AElRT7GBslCYMQJJMs7FM+8HC5S5v7eu+Ey4TNFdoZGBD+/4jjZAJTzh kBK+w84nvMcq44oELGl3aA26Ui1/r0U= X-Google-Smtp-Source: AG47ELuNdTNdjIzUJ3/JPIatsXdU3zWZYf9EaW2Ob+4KnZSUBjAGk8J5mt4bvLZLBKbI4DvtRG4e+A== X-Received: by 10.80.177.193 with SMTP id n1mr1338423edd.310.1520956103229; Tue, 13 Mar 2018 08:48:23 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id 4sm403616edx.8.2018.03.13.08.48.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Mar 2018 08:48:22 -0700 (PDT) From: Bryan O'Donoghue To: U-Boot@lists.denx.de Date: Tue, 13 Mar 2018 15:48:17 +0000 Message-Id: <1520956098-25261-3-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520956098-25261-1-git-send-email-bryan.odonoghue@linaro.org> References: <1520956098-25261-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, fabio.estevam@nxp.com Subject: [U-Boot] [PATCH v2 2/3] imx: mx7: Add comment to describe OTP TESTER registers 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The tester registers provide a unique chip-level identifier which get_board_serial() returns in a "struct tag_serialnr". This patch documents the properties of the registers; in summary. 31:0 OCOTP_TESTER0 (most significant) - FSL-wide unique, encoded LOT ID STD II/SJC CHALLENGE/ Unique ID OCOTP_TESTER1 (least significant) 31:24 - The X-coordinate of the die location on the wafer/SJC CHALLENGE/ Unique ID 23:16 - The Y-coordinate of the die location on the wafer/SJC CHALLENGE/ Unique ID 15:11 - The wafer number of the wafer on which the device was fabricated/SJC CHALLENGE/ Unique ID 10:0 - FSL-wide unique, encoded LOT ID STD II/SJC CHALLENGE/ Unique ID The 64 bits of data generate a unique serial number per-chip. Signed-off-by: Bryan O'Donoghue Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Reviewed-by: Fabio Estevam --- arch/arm/mach-imx/mx7/soc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index 1602585..fb92a26 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/arch/arm/mach-imx/mx7/soc.c @@ -202,6 +202,27 @@ int arch_misc_init(void) #endif #ifdef CONFIG_SERIAL_TAG +/* + * OCOTP_TESTER + * i.MX 7Solo Applications Processor Reference Manual, Rev. 0.1, 08/2016 + * OCOTP_TESTER describes a unique ID based on silicon wafer + * and die X/Y position + * + * OCOTOP_TESTER offset 0x410 + * 31:0 fuse 0 + * FSL-wide unique, encoded LOT ID STD II/SJC CHALLENGE/ Unique ID + * + * OCOTP_TESTER1 offset 0x420 + * 31:24 fuse 1 + * The X-coordinate of the die location on the wafer/SJC CHALLENGE/ Unique ID + * 23:16 fuse 1 + * The Y-coordinate of the die location on the wafer/SJC CHALLENGE/ Unique ID + * 15:11 fuse 1 + * The wafer number of the wafer on which the device was fabricated/SJC + * CHALLENGE/ Unique ID + * 10:0 fuse 1 + * FSL-wide unique, encoded LOT ID STD II/SJC CHALLENGE/ Unique ID + */ void get_board_serial(struct tag_serialnr *serialnr) { struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;