[PATCH v4 08/13] rockchip: Use devicetree for SMBIOS settings

Simon Glass sjg at chromium.org
Thu Oct 22 16:19:43 CEST 2020


Add settings and enable the default sysinfo driver so that these can come
from the device tree.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 arch/arm/dts/rk3328-roc-cc-u-boot.dtsi    | 21 +++++++++++++++++++++
 arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi | 23 +++++++++++++++++++++++
 arch/arm/dts/rk3328-rock64-u-boot.dtsi    | 21 +++++++++++++++++++++
 arch/arm/dts/rk3368-lion-u-boot.dtsi      | 20 ++++++++++++++++++++
 configs/lion-rk3368_defconfig             |  4 ++--
 configs/roc-cc-rk3328_defconfig           |  4 ++--
 configs/rock-pi-e-rk3328_defconfig        |  4 ++--
 configs/rock64-rk3328_defconfig           |  4 ++--
 8 files changed, 93 insertions(+), 8 deletions(-)

diff --git a/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi b/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi
index e929d86e306..08806dfc0f9 100644
--- a/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi
@@ -9,6 +9,27 @@
 	chosen {
 		u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc;
 	};
+
+	smbios {
+		compatible = "u-boot,sysinfo-smbios";
+
+		smbios {
+			system {
+				manufacturer = "firefly";
+				product = "roc-rk3328-cc";
+			};
+
+			baseboard {
+				manufacturer = "firefly";
+				product = "roc-rk3328-cc";
+			};
+
+			chassis {
+				manufacturer = "firefly";
+				product = "roc-rk3328-cc";
+			};
+		};
+	};
 };
 
 &gpio0 {
diff --git a/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi b/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi
index bf5b1f3adcb..4fc055eacb7 100644
--- a/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi
@@ -6,6 +6,29 @@
 #include "rk3328-u-boot.dtsi"
 #include "rk3328-sdram-ddr3-666.dtsi"
 
+/ {
+	smbios {
+		compatible = "u-boot,sysinfo-smbios";
+
+		smbios {
+			system {
+				manufacturer = "radxa";
+				product = "rock-pi-e_rk3328";
+			};
+
+			baseboard {
+				manufacturer = "radxa";
+				product = "rock-pi-e_rk3328";
+			};
+
+			chassis {
+				manufacturer = "radxa";
+				product = "rock-pi-e_rk3328";
+			};
+		};
+	};
+};
+
 &gpio0 {
 	u-boot,dm-spl;
 };
diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
index 7340ef95f1d..2af32aea05a 100644
--- a/arch/arm/dts/rk3328-rock64-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
@@ -9,6 +9,27 @@
 	chosen {
 		u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc;
 	};
+
+	smbios {
+		compatible = "u-boot,sysinfo-smbios";
+
+		smbios {
+			system {
+				manufacturer = "pine64";
+				product = "rock64_rk3328";
+			};
+
+			baseboard {
+				manufacturer = "pine64";
+				product = "rock64_rk3328";
+			};
+
+			chassis {
+				manufacturer = "pine64";
+				product = "rock64_rk3328";
+			};
+		};
+	};
 };
 
 &gpio0 {
diff --git a/arch/arm/dts/rk3368-lion-u-boot.dtsi b/arch/arm/dts/rk3368-lion-u-boot.dtsi
index edc93e438f9..6d54214de9c 100644
--- a/arch/arm/dts/rk3368-lion-u-boot.dtsi
+++ b/arch/arm/dts/rk3368-lion-u-boot.dtsi
@@ -14,6 +14,26 @@
 		u-boot,spl-boot-order = &emmc, &sdmmc;
 	};
 
+	smbios {
+		compatible = "u-boot,sysinfo-smbios";
+
+		smbios {
+			system {
+				manufacturer = "rockchip";
+				product = "sheep_rk3368";
+			};
+
+			baseboard {
+				manufacturer = "rockchip";
+				product = "sheep_rk3368";
+			};
+
+			chassis {
+				manufacturer = "rockchip";
+				product = "sheep_rk3368";
+			};
+		};
+	};
 };
 
 &pinctrl {
diff --git a/configs/lion-rk3368_defconfig b/configs/lion-rk3368_defconfig
index b5b7a0b2daa..3287bd1c05e 100644
--- a/configs/lion-rk3368_defconfig
+++ b/configs/lion-rk3368_defconfig
@@ -16,7 +16,6 @@ CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="rk3368-lion"
-CONFIG_SMBIOS_PRODUCT_NAME="sheep_rk3368"
 CONFIG_DEBUG_UART=y
 CONFIG_ANDROID_BOOT_IMAGE=y
 CONFIG_FIT=y
@@ -89,4 +88,5 @@ CONFIG_SYSRESET=y
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_LZO=y
 CONFIG_ERRNO_STR=y
-CONFIG_SMBIOS_MANUFACTURER="rockchip"
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
diff --git a/configs/roc-cc-rk3328_defconfig b/configs/roc-cc-rk3328_defconfig
index 98b11af2d9f..946a007a798 100644
--- a/configs/roc-cc-rk3328_defconfig
+++ b/configs/roc-cc-rk3328_defconfig
@@ -13,7 +13,6 @@ CONFIG_SPL_STACK_R_ADDR=0x600000
 CONFIG_DEBUG_UART_BASE=0xFF130000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_DEFAULT_DEVICE_TREE="rk3328-roc-cc"
-CONFIG_SMBIOS_PRODUCT_NAME="roc-rk3328-cc"
 CONFIG_DEBUG_UART=y
 CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
 # CONFIG_ANDROID_BOOT_IMAGE is not set
@@ -100,4 +99,5 @@ CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_TPL_TINY_MEMSET=y
 CONFIG_ERRNO_STR=y
-CONFIG_SMBIOS_MANUFACTURER="firefly"
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
diff --git a/configs/rock-pi-e-rk3328_defconfig b/configs/rock-pi-e-rk3328_defconfig
index 5267691732c..fae9a50c818 100644
--- a/configs/rock-pi-e-rk3328_defconfig
+++ b/configs/rock-pi-e-rk3328_defconfig
@@ -14,7 +14,6 @@ CONFIG_SPL_SYS_MALLOC_F_LEN=0x4000
 CONFIG_DEBUG_UART_BASE=0xFF130000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_DEFAULT_DEVICE_TREE="rk3328-rock-pi-e"
-CONFIG_SMBIOS_PRODUCT_NAME="rock-pi-e_rk3328"
 CONFIG_DEBUG_UART=y
 CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
 # CONFIG_ANDROID_BOOT_IMAGE is not set
@@ -102,4 +101,5 @@ CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_TPL_TINY_MEMSET=y
 CONFIG_ERRNO_STR=y
-CONFIG_SMBIOS_MANUFACTURER="radxa"
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index d6074adb04d..c625a47dc7d 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -13,7 +13,6 @@ CONFIG_SPL_STACK_R_ADDR=0x600000
 CONFIG_DEBUG_UART_BASE=0xFF130000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_DEFAULT_DEVICE_TREE="rk3328-rock64"
-CONFIG_SMBIOS_PRODUCT_NAME="rock64_rk3328"
 CONFIG_DEBUG_UART=y
 CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
 # CONFIG_ANDROID_BOOT_IMAGE is not set
@@ -99,4 +98,5 @@ CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_TPL_TINY_MEMSET=y
 CONFIG_ERRNO_STR=y
-CONFIG_SMBIOS_MANUFACTURER="pine64"
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
-- 
2.29.0.rc1.297.gfa9743e501-goog



More information about the U-Boot mailing list