public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [PATCH v2 4/4] smbios: Add documentation and devicetree binding
Date: Fri, 2 Oct 2020 16:57:15 +0200	[thread overview]
Message-ID: <eff1cd44-e960-dcd3-9ef5-27f9dc664f0f@gmx.de> (raw)
In-Reply-To: <20201002142347.2907638-4-sjg@chromium.org>

On 02.10.20 16:23, Simon Glass wrote:
> Add information about how to set SMBIOS properties using the devicetree.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> (no changes since v1)
>
>  doc/arch/x86.rst                             |  8 +++++
>  doc/device-tree-bindings/board/board_x86.txt | 36 ++++++++++++++++++++
>  2 files changed, 44 insertions(+)
>  create mode 100644 doc/device-tree-bindings/board/board_x86.txt
>
> diff --git a/doc/arch/x86.rst b/doc/arch/x86.rst
> index c6b70ce61a3..45f9ba308c7 100644
> --- a/doc/arch/x86.rst
> +++ b/doc/arch/x86.rst
> @@ -740,6 +740,14 @@ Note that this is a development feature only. It is not intended for use in
>  production environments. Also it is not currently part of the automated tests
>  so may break in the future.
>
> +SMBIOS tables
> +-------------
> +
> +To generate SMBIOS tables in U-Boot, for use by the OS, enable the
> +CONFIG_GENERATE_SMBIOS_TABLE option. The easiest way to provide the values to
> +use is via the device tree. For details see
> +device-tree-bindings/board/board_x86.txt
> +
>  TODO List
>  ---------
>  - Audio
> diff --git a/doc/device-tree-bindings/board/board_x86.txt b/doc/device-tree-bindings/board/board_x86.txt
> new file mode 100644
> index 00000000000..3766751896a
> --- /dev/null
> +++ b/doc/device-tree-bindings/board/board_x86.txt
> @@ -0,0 +1,36 @@
> +x86 board driver
> +================
> +
> +This driver allows providing board-specific features such as power control
> +GPIOs. In addition, the SMBIOS values can be specified in the device tree,
> +as below:
> +
> +An optional 'smbios' subnode can be used to provide these properties.
> +
> +Optional properties:
> +  - manufacturer: Product manufacturer for system / baseboard
> +  - product:      Product name
> +  - version:      Product version string
> +  - serial:       Serial number for system (note that this can be overridden by
> +                      the serial# environment variable)
> +  - sku:          Product SKU (Stock-Keeping Unit)
> +  - family:       Product family
> +  - asset-tag:    Asset tag for the motherboard, sometimes used in organisations
> +                      to track devices
> +
> +
> +Example:
> +
> +	board {
> +		compatible = "google,coral";
> +
> +		smbios {

I think board is the wrong place for the new node.

SMBIOS also includes chassis, processor and other information. We may
opt to provide non-board information in future via the device-tree.

If this is for U-Boot internal only usage, we should indicate this in
the label name.

So it could be like:

/u-boot-smbios {
   bios {};
   system {};
   board {
      manufacturer = "Hardkernel Co., Ltd.";
      product = "ODROID-C2";
      ...
   };
   chassis {};
   processor {};
   boot {};
};

> +			manufacturer = "Google";
> +			product = "Coral";
> +			version = "rev2";
> +			serial = "123456789";
> +			sku = "sku3";
> +			family = "Google_Coral";
> +			asset-tag = "ABC123";
> +		};
> +	};
>

SMBIOS is not x86 specific. On ARM we are also passing an SMBIOS table.

On my Odroid C2 dmidecode shows the information provided by U-Boot:

....
Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Hardkernel Co., Ltd.
        Product Name: ODROID-C2
        Version: Not Specified
...
        Wake-up Type: Reserved
        SKU Number: Not Specified
        Family: Not Specified
....


So doc/device-tree-bindings/board/board_x86.txt is the wrong place to
document the new device tree node.

Why not create a document doc/device-tree-bindings/smbios.rst for it?

Best regards

Heinrich

  reply	other threads:[~2020-10-02 14:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 14:23 [PATCH v2 0/4] x86: Updates to SMBIOS Simon Glass
2020-10-02 14:23 ` [PATCH v2 1/4] x86: Pass an ofnode into each SMBIOS function Simon Glass
2020-10-02 14:23 ` [PATCH v2 2/4] smbios: Allow properties to come from the device tree Simon Glass
2020-10-02 14:23 ` [PATCH v2 3/4] smbios: Add more properties Simon Glass
2020-10-02 14:23 ` [PATCH v2 4/4] smbios: Add documentation and devicetree binding Simon Glass
2020-10-02 14:57   ` Heinrich Schuchardt [this message]
2020-10-03 15:40     ` Simon Glass
2020-10-03 17:54       ` Heinrich Schuchardt
2020-10-03 20:51         ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eff1cd44-e960-dcd3-9ef5-27f9dc664f0f@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox