Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4464590ybp; Mon, 7 Oct 2019 08:50:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhG6ulmScVKuVAe/bTdroQOyXJtAZe7d+bdlktOZ+IvVmkzL8yGFSWe7B4Ci8S9YzRDkdi X-Received: by 2002:a50:f152:: with SMTP id z18mr28962446edl.141.1570463409449; Mon, 07 Oct 2019 08:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570463409; cv=none; d=google.com; s=arc-20160816; b=PHu8MekffS7BHF8u66fubbGKc/ZbsYqa7PxrLR0O4Px9WparqGdGq9YAKPHPRAGkr5 CWQS77MoNWo8eA/H85qxVMLBvMXS1I8C19PI2T1fAY03VGreUiH3AQbAVytMZq0fZYVk 09IiC+8gxGmKlUbcWogOrlFY/ECiG8EelkkcROoFRTs6t6fJAZ9GgztZbOXXAeWQOFeN ls6zE4y0NrcezymiR/zrcQD6RUTKSwRitPZo6vMPhLZAgfVaBVgBLYDZSp0FC+00rRTm 3mksVZTVIeKwmirNAeO1e6vVe7k0VYI3bc+7zYjZoxcbHCA/m+1xHZbvOJeOf0Rpv5Tx AkCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from; bh=oYfEEo0MURXGhmXnEBMcVrseJs7NQ0Y8IhxO6/MeCOg=; b=f2WqLjuwU3s8vDNDjbkEPIy0NpGMobqaDpFhdpecTn18bV2HaDcsdPQDtmrG5iUK/r E85GLRbQp2gXdtFZWLezRhr7HQxfhzSNnJ4MPZ7fx11lCsl4B8bmOyumyIEYBOcevJes T71tOrFpAqQ/2D1W/hyHjJIekv52vnv02Lr0DbkZ2IZvDfEJyyZJDaBnOQM/4/QoFPzX HBBSf5IPGavML81mJw/hOgJWbqGbtnjE5NIpltGI1ut2XZ7UIBNINOqPcCdVdcnMnnuO K3zP/NWLt6UHKTeQiJiPpWTV7K2moY3W5YcxNgkLYRiQOkevCjSWnmseOs1zAsMufvU/ 32EQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gz11si7442845ejb.341.2019.10.07.08.49.45; Mon, 07 Oct 2019 08:50:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729145AbfJGPtM (ORCPT + 99 others); Mon, 7 Oct 2019 11:49:12 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:57640 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728553AbfJGPtL (ORCPT ); Mon, 7 Oct 2019 11:49:11 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from lsun@mellanox.com) with ESMTPS (AES256-SHA encrypted); 7 Oct 2019 17:49:05 +0200 Received: from farm-0002.mtbu.labs.mlnx (farm-0002.mtbu.labs.mlnx [10.15.2.32]) by mtbu-labmailer.labs.mlnx (8.14.4/8.14.4) with ESMTP id x97Fn43U000955; Mon, 7 Oct 2019 11:49:04 -0400 Received: (from lsun@localhost) by farm-0002.mtbu.labs.mlnx (8.14.7/8.13.8/Submit) id x97Fn3lR032584; Mon, 7 Oct 2019 11:49:03 -0400 From: Liming Sun To: Andy Shevchenko , Darren Hart , Vadim Pasternak , David Woods , Mark Rutland Cc: Liming Sun , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Jonathan Cameron , Nicolas Ferre , "Paul E. McKenney" Subject: [PATCH v6 2/2] platform/mellanox/mlxbf-bootctl: Add the ABI definitions Date: Mon, 7 Oct 2019 11:48:47 -0400 Message-Id: <1570463327-32541-2-git-send-email-lsun@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1570463327-32541-1-git-send-email-lsun@mellanox.com> References: <1570463327-32541-1-git-send-email-lsun@mellanox.com> In-Reply-To: <0b74e9ad12360b56bc0a3c2ca972798c424f2610.1548790896.git.lsun@mellanox.com> References: <0b74e9ad12360b56bc0a3c2ca972798c424f2610.1548790896.git.lsun@mellanox.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit adds the ABI definitions exposed to userspace for the platform/mellanox/mlxbf-bootctl driver. Reviewed-by: Vadim Pasternak Signed-off-by: Liming Sun --- v5->v6: Fixes for comments from Mark: - Changed to use device attributes (DEVICE_ATTR_xx) instead of driver attributes (DRIVER_ATTR_xx) for the exported sysfs attributes. --- .../ABI/testing/sysfs-platform-mellanox-bootctl | 58 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 59 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-platform-mellanox-bootctl diff --git a/Documentation/ABI/testing/sysfs-platform-mellanox-bootctl b/Documentation/ABI/testing/sysfs-platform-mellanox-bootctl new file mode 100644 index 0000000..b60a46e --- /dev/null +++ b/Documentation/ABI/testing/sysfs-platform-mellanox-bootctl @@ -0,0 +1,58 @@ +What: /sys/bus/platform/devices/MLNXBF04:00/driver/lifecycle_state +Date: Oct 2019 +KernelVersion: 5.4 +Contact: "Liming Sun " +Description: + The Life-cycle state of the SoC, which could be one of the + following values. + Production - Production state and can be updated to secure + GA Secured - Secure chip and not able to change state + GA Non-Secured - Non-Secure chip and not able to change state + RMA - Return Merchandise Authorization + +What: /sys/bus/platform/devices/MLNXBF04:00/driver/post_reset_wdog +Date: Oct 2019 +KernelVersion: 5.4 +Contact: "Liming Sun " +Description: + The watchdog setting in seconds for the next booting. It's used + to reboot the chip and recover it to the old state if the new + boot partition fails. + +What: /sys/bus/platform/devices/MLNXBF04:00/driver/reset_action +Date: Oct 2019 +KernelVersion: 5.4 +Contact: "Liming Sun " +Description: + The source of the boot stream for the next reset. It could be + one of the following values. + external - boot from external source (USB or PCIe) + emmc - boot from the onchip eMMC + emmc_legacy - boot from the onchip eMMC in legacy (slow) mode + +What: /sys/bus/platform/devices/MLNXBF04:00/driver/second_reset_action +Date: Oct 2019 +KernelVersion: 5.4 +Contact: "Liming Sun " +Description: + Update the source of the boot stream after next reset. It could + be one of the following values and will be applied after next + reset. + external - boot from external source (USB or PCIe) + emmc - boot from the onchip eMMC + emmc_legacy - boot from the onchip eMMC in legacy (slow) mode + swap_emmc - swap the primary / secondary boot partition + none - cancel the action + +What: /sys/bus/platform/devices/MLNXBF04:00/driver/secure_boot_fuse_state +Date: Oct 2019 +KernelVersion: 5.4 +Contact: "Liming Sun " +Description: + The state of eFuse versions with the following values. + InUse - burnt, valid and currently in use + Used - burnt and valid + Free - not burnt and free to use + Skipped - not burnt but not free (skipped) + Wasted - burnt and invalid + Invalid - not burnt but marked as valid (error state). diff --git a/MAINTAINERS b/MAINTAINERS index 55199ef..c2ff283 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10435,6 +10435,7 @@ M: Darren Hart M: Vadim Pasternak L: platform-driver-x86@vger.kernel.org S: Supported +F: Documentation/ABI/testing/sysfs-platform-mellanox-bootctl F: drivers/platform/mellanox/ F: include/linux/platform_data/mlxreg.h -- 1.8.3.1