From patchwork Mon Mar 26 14:27:31 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: 890992 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="eNel178q"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 408xLs2x3zz9s33 for ; Tue, 27 Mar 2018 01:27:47 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id F2BACC21F68; Mon, 26 Mar 2018 14:27:41 +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, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 A23EAC21E90; Mon, 26 Mar 2018 14:27:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CDA82C21E2B; Mon, 26 Mar 2018 14:27:37 +0000 (UTC) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by lists.denx.de (Postfix) with ESMTPS id 74CF6C21CB6 for ; Mon, 26 Mar 2018 14:27:37 +0000 (UTC) Received: by mail-wm0-f52.google.com with SMTP id x4so3534826wmh.5 for ; Mon, 26 Mar 2018 07:27:37 -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; bh=CEqhpRbiyeg8URcA+bOGxeuAZJfxJoEmvjoQcD/frxk=; b=eNel178qGOhIRec0AVsgYO6W3KeSqtcGorVuLMHLvZJPv6x5cbInSHOKjBcSFcoeSy 0IOSwXvDtlvzX89yd2q5Hy2cEuyamuoXgB6gEr4AnBhTTmheiepdAJwH4Cz2jLwrmzP6 zMSSXFUrsmqXLfpL3e1GE3h8/IC5rWcKDn8kA= 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; bh=CEqhpRbiyeg8URcA+bOGxeuAZJfxJoEmvjoQcD/frxk=; b=TeDMAZSnoRCeLxxnV4X71dwiNSQSttpxB0Kzh/d9iqUcWWhnSLSD83Fb3cZZefc8r+ +Q6iOej94HTtkx9GeXh2tExuqTqQ/HIugAXhfsXWFNYAcpFkpjg9z3sF0bNx/kSMAZ6G Sld1sSItNtYxgeDHAO5E/SVk+EWzNEqtSZJom2n+b5yZtEXnM26qyloAVoeE1fXBRsUy 0U8EX3+X+a98qp3iG5YKcRJh45KRMOWSmfFrMAKUHomPcTZy2KM2vwJ+MCby1yecjgqZ bEoCGtepuKfZY3ZqXdDV5zA3USv8AM8uyLM2Pdp/hbtEu3HWJOxyrQ6ENN4pMTrfd+ig YrEA== X-Gm-Message-State: AElRT7EoIxVBXu80XKR74mZioTiAfjxjyU/IgGmV3/wShZ8RTXf1xVnE duhW4XalfMSbRZ3lDw1K0oDnVK3c3Z4= X-Google-Smtp-Source: AG47ELsNAGMcDmu4/uK0rICq/EQPW27JchYpBSPPY+jGJjATwCJ+AU+EOHj5Ckxz2bs84Iw6aY15/g== X-Received: by 10.80.137.80 with SMTP id f16mr39371860edf.206.1522074456724; Mon, 26 Mar 2018 07:27:36 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id a88sm10338634edf.64.2018.03.26.07.27.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Mar 2018 07:27:36 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Mon, 26 Mar 2018 15:27:31 +0100 Message-Id: <1522074454-16643-1-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 Cc: rui.silva@linaro.org Subject: [U-Boot] [PATCH v3 0/3] NXP WaARP7 set serial# from OTP fuses for USB iSerial 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" V3: - Add RB-tag from Fabio V2: - Fix compilation path for CONFIG_SERIAL_TAG Currently this is broken for imx7 - Add description of tester registers to arch/arm/mach-imx/mx7/soc.c - Utilise existing get_board_serial() instead of my previous patch ("warp7: usb: Introduce a get method for serial number") V1: Greetings. These two patches add support for automatic setting of the serial# environment variable based on OTP fuse settings. Once the serial# field is set then subsequent USB gadget mode instances of WaARP7 will export the serial number based on the OTP fuse settings. This feature gives a handy output like this: usb 1-1.1.1: new high-speed USB device number 17 using xhci_hcd usb 1-1.1.1: New USB device found, idVendor=0525, idProduct=a4a5 usb 1-1.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1.1.1: Product: USB download gadget usb 1-1.1.1: Manufacturer: FSL usb 1-1.1.1: SerialNumber: WaRP7-0xf42400d3000001d4 The 64 bit value post-fixed to the WaARP7 string is based on OTP fuses which provide a unique serial number for each NXP i.MX7 SoC. We make use of this feature when discerning a unique identifier for WaARP7 boards in our automated LAVA testing environment, hopefully its useful and acceptable to others. Bryan O'Donoghue (3): imx: mx7: Fix CONFIG_SERIAL_TAG compilation imx: mx7: Add comment to describe OTP TESTER registers warp7: Set u-boot serial# based on OTP value arch/arm/mach-imx/mx7/soc.c | 22 ++++++++++++++++++++++ board/warp7/warp7.c | 14 ++++++++++++++ include/configs/warp7.h | 3 +++ 3 files changed, 39 insertions(+)