From patchwork Tue Mar 13 15:48:15 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: 885196 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="GxDUUW3e"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 400znD61Gbz9sTK for ; Wed, 14 Mar 2018 02:49:36 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 5A651C21DAF; Tue, 13 Mar 2018 15:48:39 +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 27084C21E13; Tue, 13 Mar 2018 15:48:32 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7F72EC21E13; Tue, 13 Mar 2018 15:48:25 +0000 (UTC) Received: from mail-wr0-f178.google.com (mail-wr0-f178.google.com [209.85.128.178]) by lists.denx.de (Postfix) with ESMTPS id 590E9C21DEC for ; Tue, 13 Mar 2018 15:48:21 +0000 (UTC) Received: by mail-wr0-f178.google.com with SMTP id m4so165953wrb.7 for ; Tue, 13 Mar 2018 08:48:21 -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=SuRL2PDi+4aLEdJw8e0TsPXHXYHOw6r0BLNYEes8/rM=; b=GxDUUW3eaJkILKWxkKg4S0sKTnmSTbK3F5+JF6ZM9CduxBrGEIwICPm8i6U/V0c/Xl 4BPIv2pWDae+LV2+R+o1a9R8xnUK8qnb/GVPMI+tuKlfZiE7Glbh0ojDL3uFFqpIoteg NZQhlzVsyiDiAbl+AOXSkiJbjPmp1i2q+HWkc= 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=SuRL2PDi+4aLEdJw8e0TsPXHXYHOw6r0BLNYEes8/rM=; b=mGTzKVdwH96IgozInogm2VrMwpRktXN+0os+4EJjHrcgDmFj46q/k1GVw+S62/ekOQ MMqL2IlYo84eEtCZPpDkXsecfwdMhO0DaAto0PLpjp3S17f6NqLkA04JYbNQWpEBZnrP vSeEao6PsX5JhlqiGIIe5QM8DyN/eTW4b24No5xVN/mwhmUXLAis3mU2+gqSc2mVyq9R x5BCld/ybwTgrgtS6F3/kUbCXr+oDgnD3FHxOtp5i84BPhvRBnBv+wlEHHqI6cs8NRin un/AiItpcipFtbAkH8Yyxga96Z+91aDcwz3enQ6N3mFprU0RCjsuEBtr9q5ER7/Exd+S ukMA== X-Gm-Message-State: AElRT7E6Q3FJ76u8AaiqWl7kgBvQ2cvcNKZYRMt9LJq8CUapXHP7FerH PgagXTDgIhtA449ZqDuLPxmThYFn+N8= X-Google-Smtp-Source: AG47ELvR/rgm4RuIRTY0XeSz/jUzUkKFJbKj8mVd5oyvQKqp3E1/cgMGVDgd3lUEVdBtZrFUUH5dpA== X-Received: by 10.80.136.85 with SMTP id c21mr1356388edc.259.1520956100826; Tue, 13 Mar 2018 08:48:20 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id 4sm403616edx.8.2018.03.13.08.48.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Mar 2018 08:48:20 -0700 (PDT) From: Bryan O'Donoghue To: U-Boot@lists.denx.de Date: Tue, 13 Mar 2018 15:48:15 +0000 Message-Id: <1520956098-25261-1-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 Cc: fabio.estevam@nxp.com, rui.silva@linaro.org Subject: [U-Boot] [PATCH v2 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" 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(+)