Skip to contentSkip to conversation

arm: dts: bcm283x: Add minimal smbios information

PATCH Superseded matthias.bgg at kernel.org 2 participants 5 messages Apr 9, 2021 – Apr 12, 2021

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm: dts: bcm283x: Add minimal smbios information

From: Matthias Brugger <[email protected]>

At present SMBIOS tables are emtpy, which breaks some use-cases that rely on that. Add some minimal information to fullfill this.

---

 arch/arm/dts/bcm283x-u-boot.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/dts/bcm283x-u-boot.dtsi +20 -0
index 68d03627f4..f5235cb083 100644
@@ -6,6 +6,26 @@
  * (C) Copyright 2016 Fabian Vogt <[email protected]>
  */
 
+/ {
+	smbios {
+		compatible = "u-boot,sysinfo-smbios";
+		smbios {
+			system {
+				manufacturer = "raspberrypi";
+				product = "rpi";
+			};
+			baseboard {
+				manufacturer = "raspberrypi";
+				product = "rpi";
+			};
+			chassis {
+				manufacturer = "raspberrypi";
+				product = "rpi";
+			};
+		};
+	};
+};
+
 &uart0 {
 	skip-init;
 	u-boot,dm-pre-reloc;
Signature · 1 line
2.30.2
#1 lore raw

PATCH 2/2 configs: rpi: Enable SMBIOS sysinfo driver

From: Matthias Brugger <[email protected]>

Enalbe this driver to allow U-Boot to get SMBIOS table information from a device tree node.

---

 configs/rpi_0_w_defconfig      | 2 ++
 configs/rpi_2_defconfig        | 2 ++
 configs/rpi_3_32b_defconfig    | 2 ++
 configs/rpi_3_b_plus_defconfig | 2 ++
 configs/rpi_3_defconfig        | 2 ++
 configs/rpi_4_32b_defconfig    | 2 ++
 configs/rpi_4_defconfig        | 2 ++
 configs/rpi_arm64_defconfig    | 2 ++
 configs/rpi_defconfig          | 2 ++
 9 files changed, 18 insertions(+)
configs/rpi_0_w_defconfig +2 -0
index c0a9b6c788..206be1590c 100644
@@ -28,6 +28,8 @@ CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
configs/rpi_2_defconfig +2 -0
index 33e0ef6989..d3d62f3028 100644
@@ -28,6 +28,8 @@ CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
configs/rpi_3_32b_defconfig +2 -0
index 15c62adc69..b69bc05833 100644
@@ -30,6 +30,8 @@ CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
configs/rpi_3_b_plus_defconfig +2 -0
index ebab0b4f86..8316a43116 100644
@@ -30,6 +30,8 @@ CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
configs/rpi_3_defconfig +2 -0
index daeb6d1b64..bdfac3f31a 100644
@@ -30,6 +30,8 @@ CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
configs/rpi_4_32b_defconfig +2 -0
index 0cbdd5fee1..7a10d4b0d4 100644
@@ -39,6 +39,8 @@ CONFIG_DM_RESET=y
 CONFIG_DM_RNG=y
 CONFIG_RNG_IPROC200=y
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_DM_USB_GADGET=y
configs/rpi_4_defconfig +2 -0
index 3f21f99edb..5d889df794 100644
@@ -39,6 +39,8 @@ CONFIG_DM_RESET=y
 CONFIG_DM_RNG=y
 CONFIG_RNG_IPROC200=y
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_DM_USB_GADGET=y
configs/rpi_arm64_defconfig +2 -0
index d282d509ce..af45178962 100644
@@ -36,6 +36,8 @@ CONFIG_DM_RESET=y
 CONFIG_DM_RNG=y
 CONFIG_RNG_IPROC200=y
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
configs/rpi_defconfig +2 -0
index 06b390d907..af084c8505 100644
@@ -28,6 +28,8 @@ CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
Signature · 1 line
2.30.2
#2 lore raw

PATCH 2/2 configs: rpi: Enable SMBIOS sysinfo driver

Am Freitag, 9. April 2021, 14:35:11 CEST schrieb matthias.bgg at kernel.org:

Quoted 3 lines

From: Matthias Brugger <[email protected]>

Enalbe this driver to allow U-Boot to get SMBIOS table information from

^ typo

Other than that,

Cheers,
Fabian

Quoted 135 lines

a device tree node.

---

 configs/rpi_0_w_defconfig      | 2 ++
 configs/rpi_2_defconfig        | 2 ++
 configs/rpi_3_32b_defconfig    | 2 ++
 configs/rpi_3_b_plus_defconfig | 2 ++
 configs/rpi_3_defconfig        | 2 ++
 configs/rpi_4_32b_defconfig    | 2 ++
 configs/rpi_4_defconfig        | 2 ++
 configs/rpi_arm64_defconfig    | 2 ++
 configs/rpi_defconfig          | 2 ++
 9 files changed, 18 insertions(+)
configs/rpi_0_w_defconfig +2 -0
index c0a9b6c788..206be1590c 100644
@@ -28,6 +28,8 @@ CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
configs/rpi_2_defconfig +2 -0
index 33e0ef6989..d3d62f3028 100644
@@ -28,6 +28,8 @@ CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
configs/rpi_3_32b_defconfig +2 -0
index 15c62adc69..b69bc05833 100644
@@ -30,6 +30,8 @@ CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
configs/rpi_3_b_plus_defconfig +2 -0
index ebab0b4f86..8316a43116 100644
@@ -30,6 +30,8 @@ CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
configs/rpi_3_defconfig +2 -0
index daeb6d1b64..bdfac3f31a 100644
@@ -30,6 +30,8 @@ CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
configs/rpi_4_32b_defconfig +2 -0
index 0cbdd5fee1..7a10d4b0d4 100644
@@ -39,6 +39,8 @@ CONFIG_DM_RESET=y
 CONFIG_DM_RNG=y
 CONFIG_RNG_IPROC200=y
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_DM_USB_GADGET=y
configs/rpi_4_defconfig +2 -0
index 3f21f99edb..5d889df794 100644
@@ -39,6 +39,8 @@ CONFIG_DM_RESET=y
 CONFIG_DM_RNG=y
 CONFIG_RNG_IPROC200=y
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_DM_USB_GADGET=y
configs/rpi_arm64_defconfig +2 -0
index d282d509ce..af45178962 100644
@@ -36,6 +36,8 @@ CONFIG_DM_RESET=y
 CONFIG_DM_RNG=y
 CONFIG_RNG_IPROC200=y
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
configs/rpi_defconfig +2 -0
index 06b390d907..af084c8505 100644
@@ -28,6 +28,8 @@ CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
#3 lore raw

PATCH 1/2 arm: dts: bcm283x: Add minimal smbios information

In reply to matthias.bgg at kernel.org

Am Freitag, 9. April 2021, 14:35:10 CEST schrieb matthias.bgg at kernel.org:

Quoted 3 lines

From: Matthias Brugger <[email protected]>

At present SMBIOS tables are emtpy,

^ typo

Quoted 1 line

which breaks some use-cases that rely on that.

Can you give an example?

Quoted 1 line

Add some minimal information to

Isn't it possible to get the complete information from the firmware here? That would allow to have the correct product and serial at least. If that's not possible or too complex, then I suggest to use the proper strings, e.g. "Raspberry Pi", as those are user visible.

Quoted 1 line

fullfill this.

^ typo

Quoted 19 lines

---

 arch/arm/dts/bcm283x-u-boot.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/dts/bcm283x-u-boot.dtsi +5 -0
index 68d03627f4..f5235cb083 100644
@@ -6,6 +6,26 @@
  * (C) Copyright 2016 Fabian Vogt <[email protected]>
  */
 
+/ {
+	smbios {
+		compatible = "u-boot,sysinfo-smbios";
+		smbios {
+			system {

arch/arm/dts/bcm283x-u-boot.dtsi line 23

Quoted 10 lines
arch/arm/dts/bcm283x-u-boot.dtsi +10 -0
+				manufacturer = "raspberrypi";
+				product = "rpi";
+			};
+			baseboard {
+				manufacturer = "raspberrypi";
+				product = "rpi";
+			};
+			chassis {
+				manufacturer = "raspberrypi";
+				product = "rpi";

According to doc/device-tree-bindings/sysinfo/smbios.txt, "chassis" doesn't have a "product".

Cheers,
Fabian

Quoted 9 lines
arch/arm/dts/bcm283x-u-boot.dtsi +5 -0
+			};
+		};
+	};
+};
+
 &uart0 {
 	skip-init;
 	u-boot,dm-pre-reloc;
#4 lore raw

PATCH 1/2 arm: dts: bcm283x: Add minimal smbios information

Quoted 8 lines · Fabian Vogt

Am Freitag, 9. April 2021, 14:35:10 CEST schrieb matthias.bgg at kernel.org:

Quoted 3 lines

From: Matthias Brugger <[email protected]>

At present SMBIOS tables are emtpy,

^ typo

Quoted 1 line

which breaks some use-cases that rely on that.

Can you give an example?

Management software that want's to know what HW a node is based on.

Quoted 4 lines
Quoted 2 lines

Add some minimal information to

Isn't it possible to get the complete information from the firmware here? That would allow to have the correct product and serial at least.

That's the plan for the long run.

Quoted 2 lines

If that's not possible or too complex, then I suggest to use the proper strings, e.g. "Raspberry Pi", as those are user visible.

I'd like to stay backwards compatible to older U-Boot versions for now.

Quoted 28 lines
Quoted 2 lines

fullfill this.

^ typo

Quoted 24 lines

---

 arch/arm/dts/bcm283x-u-boot.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/dts/bcm283x-u-boot.dtsi +10 -0
index 68d03627f4..f5235cb083 100644
@@ -6,6 +6,26 @@
  * (C) Copyright 2016 Fabian Vogt <[email protected]>
  */
 
+/ {
+	smbios {
+		compatible = "u-boot,sysinfo-smbios";
+		smbios {
+			system {
+				manufacturer = "raspberrypi";
+				product = "rpi";
+			};
+			baseboard {
+				manufacturer = "raspberrypi";
Quoted 9 lines

arch/arm/dts/bcm283x-u-boot.dtsi line 23

Quoted 5 lines
arch/arm/dts/bcm283x-u-boot.dtsi +5 -0
+				product = "rpi";
+			};
+			chassis {
+				manufacturer = "raspberrypi";
+				product = "rpi";

According to doc/device-tree-bindings/sysinfo/smbios.txt, "chassis" doesn't have a "product".

You are correct. I'll fix the typos and this in the next version.

Regards,
Matthias

Quoted 13 lines

Cheers,
Fabian

Quoted 9 lines
arch/arm/dts/bcm283x-u-boot.dtsi +5 -0
+			};
+		};
+	};
+};
+
 &uart0 {
 	skip-init;
 	u-boot,dm-pre-reloc;