From 3a8ee3df836614b68881f5b84d3197305ee1b08e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 5 Nov 2020 06:32:05 -0700 Subject: board: Rename uclass to sysinfo This uclass is intended to provide a way to obtain information about a U-Boot board. But the concept of a U-Boot 'board' is the whole system, not just one circuit board, meaning that 'board' is something of a misnomer for this uclass. In addition, the name 'board' is a bit overused in U-Boot and we want to use the same uclass to provide SMBIOS information. The obvious name is 'system' but that is so vague as to be meaningless. Use 'sysinfo' instead, since this uclass is aimed at providing information on the system. Rename everything accordingly. Note: Due to the patch delta caused by the symbol renames, this patch shows some renamed files as being deleted in one place and created in another. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- .../board/gdsys,board_gazerbeam.txt | 46 ---------------------- .../sysinfo/gdsys,sysinfo_gazerbeam.txt | 46 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 46 deletions(-) delete mode 100644 doc/device-tree-bindings/board/gdsys,board_gazerbeam.txt create mode 100644 doc/device-tree-bindings/sysinfo/gdsys,sysinfo_gazerbeam.txt (limited to 'doc') diff --git a/doc/device-tree-bindings/board/gdsys,board_gazerbeam.txt b/doc/device-tree-bindings/board/gdsys,board_gazerbeam.txt deleted file mode 100644 index 28c1080d90..0000000000 --- a/doc/device-tree-bindings/board/gdsys,board_gazerbeam.txt +++ /dev/null @@ -1,46 +0,0 @@ -gdsys Gazerbeam board driver - -This driver provides capabilities to access the gdsys Gazerbeam board's device -information. Furthermore, phandles to some internal devices are provided for -the board files. - -Required properties: -- compatible: should be "gdsys,board_gazerbeam" -- csb: phandle to the board's coherent system bus (CSB) device node -- rxaui[0-3]: phandles to the rxaui control device nodes -- fpga[0-1]: phandles to the board's gdsys FPGA device nodes -- ioep[0-1]: phandles to the board's IO endpoint device nodes -- ver-gpios: GPIO list to read the hardware version from -- var-gpios: GPIO list to read the hardware variant information from -- reset-gpios: GPIO list for the board's reset GPIOs - -Example: - - -board { - compatible = "gdsys,board_gazerbeam"; - csb = <&board_soc>; - serdes = <&SERDES>; - rxaui0 = <&RXAUI0>; - rxaui1 = <&RXAUI1>; - rxaui2 = <&RXAUI2>; - rxaui3 = <&RXAUI3>; - fpga0 = <&FPGA0>; - fpga1 = <&FPGA1>; - ioep0 = <&IOEP0>; - ioep1 = <&IOEP1>; - - ver-gpios = <&PPCPCA 12 0 - &PPCPCA 13 0 - &PPCPCA 14 0 - &PPCPCA 15 0>; - - /* MC2/SC-Board */ - var-gpios-mc2 = <&GPIO_VB0 0 0 /* VAR-MC_SC */ - &GPIO_VB0 11 0>; /* VAR-CON */ - /* MC4-Board */ - var-gpios-mc4 = <&GPIO_VB1 0 0 /* VAR-MC_SC */ - &GPIO_VB1 11 0>; /* VAR-CON */ - - reset-gpios = <&gpio0 1 0 &gpio0 2 1>; -}; diff --git a/doc/device-tree-bindings/sysinfo/gdsys,sysinfo_gazerbeam.txt b/doc/device-tree-bindings/sysinfo/gdsys,sysinfo_gazerbeam.txt new file mode 100644 index 0000000000..f70652d3c4 --- /dev/null +++ b/doc/device-tree-bindings/sysinfo/gdsys,sysinfo_gazerbeam.txt @@ -0,0 +1,46 @@ +gdsys Gazerbeam sysinfo driver + +This driver provides capabilities to access the gdsys Gazerbeam board's device +information. Furthermore, phandles to some internal devices are provided for +the board files. + +Required properties: +- compatible: should be "gdsys,sysinfo-gazerbeam" +- csb: phandle to the board's coherent system bus (CSB) device node +- rxaui[0-3]: phandles to the rxaui control device nodes +- fpga[0-1]: phandles to the board's gdsys FPGA device nodes +- ioep[0-1]: phandles to the board's IO endpoint device nodes +- ver-gpios: GPIO list to read the hardware version from +- var-gpios: GPIO list to read the hardware variant information from +- reset-gpios: GPIO list for the board's reset GPIOs + +Example: + + +sysinfo { + compatible = "gdsys,sysinfo-gazerbeam"; + csb = <&board_soc>; + serdes = <&SERDES>; + rxaui0 = <&RXAUI0>; + rxaui1 = <&RXAUI1>; + rxaui2 = <&RXAUI2>; + rxaui3 = <&RXAUI3>; + fpga0 = <&FPGA0>; + fpga1 = <&FPGA1>; + ioep0 = <&IOEP0>; + ioep1 = <&IOEP1>; + + ver-gpios = <&PPCPCA 12 0 + &PPCPCA 13 0 + &PPCPCA 14 0 + &PPCPCA 15 0>; + + /* MC2/SC-Board */ + var-gpios-mc2 = <&GPIO_VB0 0 0 /* VAR-MC_SC */ + &GPIO_VB0 11 0>; /* VAR-CON */ + /* MC4-Board */ + var-gpios-mc4 = <&GPIO_VB1 0 0 /* VAR-MC_SC */ + &GPIO_VB1 11 0>; /* VAR-CON */ + + reset-gpios = <&gpio0 1 0 &gpio0 2 1>; +}; -- cgit v1.2.3 From 49337238effdd86e5863b14a52c1ecc08867bb01 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 5 Nov 2020 06:32:06 -0700 Subject: doc: Add a binding for sysinfo Add a simple binding file for this, so that it is clear what this binding directory is for. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- doc/device-tree-bindings/sysinfo/sysinfo.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/device-tree-bindings/sysinfo/sysinfo.txt (limited to 'doc') diff --git a/doc/device-tree-bindings/sysinfo/sysinfo.txt b/doc/device-tree-bindings/sysinfo/sysinfo.txt new file mode 100644 index 0000000000..9445031b18 --- /dev/null +++ b/doc/device-tree-bindings/sysinfo/sysinfo.txt @@ -0,0 +1,19 @@ +Sysinfo +======= + +This provides capabilities to access information about a board/system, for +use by drivers. + +Required properties: + + - compatible: any suitable string where the driver is in the UCLASS_SYSINFO + class + +See also smbios.txt + + +Example + +sysinfo { + compatible = "sandbox,sysinfo-sandbox"; +}; -- cgit v1.2.3 From f96965315489fcb7fc9df8fe4da0137150bb3826 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 5 Nov 2020 06:32:10 -0700 Subject: smbios: Add documentation and devicetree binding Add information about how to set SMBIOS properties using the devicetree. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- doc/arch/x86.rst | 8 +++ doc/device-tree-bindings/sysinfo/smbios.txt | 77 +++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 doc/device-tree-bindings/sysinfo/smbios.txt (limited to 'doc') diff --git a/doc/arch/x86.rst b/doc/arch/x86.rst index c6b70ce61a..cc307aa8d5 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/sysinfo/smbios.txt + TODO List --------- - Audio diff --git a/doc/device-tree-bindings/sysinfo/smbios.txt b/doc/device-tree-bindings/sysinfo/smbios.txt new file mode 100644 index 0000000000..b522322802 --- /dev/null +++ b/doc/device-tree-bindings/sysinfo/smbios.txt @@ -0,0 +1,77 @@ +SMBIOS sysinfo information +========================== + +This binding allows the values for the SMBIOS tables to be specified in the +devicetree, as below. + +Required properties: + + - compatible: "u-boot,smbios" or any other string depending on your board + +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. Within +that, the properties are broken down by table type, as in the System Management +BIOS (Basic Input/Output System) Specification. + +Available subnodes for each table type are: + + - 1 : system + - 2 : baseboard + - 3 : chassis + +Within each subnode the following tables are recognised: + +"system" subnode optional properties: + + - manufacturer: Product manufacturer for system + - 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 + +"baseboard" subnode optional properties: + + - manufacturer: Product manufacturer for baseboard + - product: Product name + - asset-tag: Asset tag for the motherboard, sometimes used in organisations + to track devices + +"chassis" subnode optional properties: + + - manufacturer: Product manufacturer for chassis + + +Example: + +sysinfo { + compatible = "sandbox,sysinfo-sandbox"; + + smbios { + /* Type 1 table */ + system { + manufacturer = "Google"; + product = "Coral"; + version = "rev2"; + serial = "123456789"; + sku = "sku3"; + family = "Google_Coral"; + }; + + /* Type 2 table */ + baseboard { + manufacturer = "Google"; + product = "Coral"; + asset-tag = "ABC123"; + }; + + /* Type 3 table */ + chassis { + manufacturer = "Google"; + }; + }; +}; -- cgit v1.2.3