Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5440930ybi; Tue, 28 May 2019 13:10:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAuOgnj0yMHriOASH30byXkytb2l0NKKEiTj9iPoaoqLVuMNjQTIQlbtpnKV5QVbzhabgg X-Received: by 2002:a17:902:9b85:: with SMTP id y5mr18664874plp.313.1559074200877; Tue, 28 May 2019 13:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559074200; cv=none; d=google.com; s=arc-20160816; b=BVUIULkqq/Q6hqDsisdezuGJcOea4FIm6mM+OVbIKwXi2y+tvEH60nZ+0BGZ4neUPx sWytu7oEorW/RVI5a0l7CiJRmqFOO6xI7E/LdH8+uIJ9l2J3uvSfwW6PUdiXwkxoVvpW ixLOzwuxJa6CT+RxOVl+isw/mcXGOnJsIR+3lHteEOGhf0TRoqfpKdTg0qZ6U+WlQtIo NwaL1EvOH/ejt0RvsNwzy4QihrGOos7Ah3wmTys/B90/WwpFR+hUMDU1EemnUggvKEqM Z8anj2KPIWk2EF86G3sL3WebKFIW6baK9VJDD1G+cevA2nPL0ErCOYPqOeDKMj734iHY ptLA== 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:message-id:date :subject:cc:to:from; bh=uqWNur9uh0bkYt3Yh/PYnSE9toPIFMVmOjU/wQ/D6eE=; b=dDbdPur4wnP8q0Ge29BhxREkobaT+0g0C6UGUsgOUoZrfq4wCvdO8dgOucZuGdZ1v5 iz7cDxs1h6yAOSYfGJxrKAFc/vk2R3C2J9Oao7xnD89u9DkcGkwv38LqNhvt3Kgu1wjn pLuDjmnQwQiJZopoW3AuJroAT7pDZ7FHp/u10drbxvGJSarB2+UwkMMI5IPhram4RGIG cF2n2PzCxZOiB3XmNIMRbPvhm3SKkCdeWm4KNu3akHz0WpiwMLybTjd613nG8eoZaNE1 CT7vapH+8l9/u9C8dX4dNGc469WiBz8eLN2RMDELs0RGPT7WgEVq45rpakwKTCxejnEq Szww== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a20si4531691pju.92.2019.05.28.13.09.45; Tue, 28 May 2019 13:10:00 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727752AbfE1UIe (ORCPT + 99 others); Tue, 28 May 2019 16:08:34 -0400 Received: from mga17.intel.com ([192.55.52.151]:48366 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727728AbfE1UId (ORCPT ); Tue, 28 May 2019 16:08:33 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2019 13:08:32 -0700 X-ExtLoop1: 1 Received: from marshy.an.intel.com ([10.122.105.159]) by fmsmga006.fm.intel.com with ESMTP; 28 May 2019 13:08:30 -0700 From: richard.gong@linux.intel.com To: gregkh@linuxfoundation.org, robh+dt@kernel.org, mark.rutland@arm.com, dinguyen@kernel.org, atull@kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, sen.li@intel.com, richard.gong@linux.intel.com, Richard Gong Subject: [PATCHv4 3/4] firmware: rsu: document sysfs interface Date: Tue, 28 May 2019 15:20:32 -0500 Message-Id: <1559074833-1325-4-git-send-email-richard.gong@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559074833-1325-1-git-send-email-richard.gong@linux.intel.com> References: <1559074833-1325-1-git-send-email-richard.gong@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Richard Gong Describe Intel Stratix10 Remote System Update (RSU) device attributes Signed-off-by: Richard Gong Reviewed-by: Alan Tull --- v2: changed to use tab everywhere and wrap lines at 72 colums s/soc:firmware:svc:rsu/stratix10-rsu.0 added for watchdog v3: s/KernelVersion:5.2/KernelVersion:5.3 v4: replaced /sys/devices/platform/stratix10-rsu.0/ with /sys/devices/.../stratix10-rsu.0/driver/ removed spaces --- .../testing/sysfs-devices-platform-stratix10-rsu | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-stratix10-rsu diff --git a/Documentation/ABI/testing/sysfs-devices-platform-stratix10-rsu b/Documentation/ABI/testing/sysfs-devices-platform-stratix10-rsu new file mode 100644 index 0000000..29ae1c7 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-platform-stratix10-rsu @@ -0,0 +1,100 @@ + Intel Stratix10 Remote System Update (RSU) device attributes + +What: /sys/devices/.../stratix10-rsu.0/driver/current_image +Date: May 2019 +KernelVersion: 5.3 +Contact: Richard Gong +Description: + (RO) the address of image currently running in flash. + +What: /sys/devices/.../stratix10-rsu.0/driver/fail_image +Date: May 2019 +KernelVersion: 5.3 +Contact: Richard Gong +Description: + (RO) the address of failed image in flash. + +What: /sys/devices/.../stratix10-rsu.0/driver/state +Date: May 2019 +KernelVersion: 5.3 +Contact: Richard Gong +Description: + (RO) the state of RSU system. + The state field has two parts: major error code in upper 16 bits and + minor error code in lower 16 bits. + + Major error code: + 0xF001 bitstream error + 0xF002 hardware access failure + 0xF003 bitstream corruption + 0xF004 internal error + 0xF005 device error + 0xF006 CPU watchdog timeout + 0xF007 internal unknown error + Minor error code: + Currently used only when major error is 0xF006 + (CPU watchdog timeout), in which case the minor + error code is the value reported by CPU to + firmware through the RSU notify command before + the watchdog timeout occurs. + +What: /sys/devices/.../stratix10-rsu.0/driver/fail_image +Date: May 2019 +KernelVersion: 5.3 +Contact: Richard Gong +Description: + (RO) the version number of RSU firmware. + +What: /sys/devices/.../stratix10-rsu.0/driver/error_location +Date: May 2019 +KernelVersion: 5.3 +Contact: Richard Gong +Description: + (RO) the error offset inside the image that failed. + +What: /sys/devices/.../stratix10-rsu.0/driver/error_details +Date: May 2019 +KernelVersion: 5.3 +Contact: Richard Gong +Description: + (RO) error code. + +What: /sys/devices/.../stratix10-rsu.0/driver/reboot_image +Date: May 2019 +KernelVersion: 5.3 +Contact: Richard Gong +Description: + (WO) the address of image to be loaded on next reboot command. + +What: /sys/devices/.../stratix10-rsu.0/driver/notify +Date: May 2019 +KernelVersion: 5.3 +Contact: Richard Gong +Description: + (WO) inform firmware that the current software state as + a 16-bit numerical value below: + 0 is for the first stage bootloader didn't run + or didn't reach the point of launching second + stage bootloader. + 1 is for failed in second bootloader or didn't + get to the point of launching the operating + system. + 2 is for both first and second stage bootloader + ran and the operating system launch was + attempted. + +What: /sys/devices/.../stratix10-rsu.0/driver/watchdog +Date: May 2019 +KernelVersion: 5.3 +Contact: Richard Gong +Description: + (WO) instruct firmware what to do when rebooting due to + a watchdog timer expiration. The attribute takes a + 32 bits word as the parameter indicating the action for + firmware to take: + + b[0] is set to 0, the firmware should reboot + with the normal RSU flow. + b[0] is set to 1, the firmware shall always + reboot with the current running image. + b[31:1] reserved. -- 2.7.4