bytedance: g220a: Enable ipmb
Tested : we can see /dev/ipmb-4 on g220a
Use `busctl call xyz.openbmc_project.Ipmi.Channel.Ipmb \
"/xyz/openbmc_project/Ipmi/Channel/Ipmb" org.openbmc.Ipmb \
sendRequest yyyyay 0x01 0x0a 0x00 0x48 0`
to get ME time correctly
Signed-off-by: Lotus Xu <xuxiaohan@bytrdance.com>
Change-Id: I96cb9ca236cd73b40929eae37ed1d5337a25886b
diff --git a/meta-g220a/recipes-kernel/linux/linux-aspeed/0001-bytedance-g220a-Enable-ipmb.patch b/meta-g220a/recipes-kernel/linux/linux-aspeed/0001-bytedance-g220a-Enable-ipmb.patch
new file mode 100644
index 0000000..de9f2a3
--- /dev/null
+++ b/meta-g220a/recipes-kernel/linux/linux-aspeed/0001-bytedance-g220a-Enable-ipmb.patch
@@ -0,0 +1,30 @@
+From 0604e82e69c673c3ce75fa1d856a54ab10611015 Mon Sep 17 00:00:00 2001
+From: Lotus Xu <xuxiaohan@bytrdance.com>
+Date: Wed, 21 Oct 2020 12:42:45 +0800
+Subject: [PATCH] bytedance: g220a:Enable ipmb
+
+Signed-off-by: Lotus Xu <xuxiaohan@bytrdance.com>
+---
+ arch/arm/boot/dts/aspeed-bmc-bytedance-g220a.dts | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/aspeed-bmc-bytedance-g220a.dts b/arch/arm/boot/dts/aspeed-bmc-bytedance-g220a.dts
+index b66854fa9ade..124b885b03ec 100644
+--- a/arch/arm/boot/dts/aspeed-bmc-bytedance-g220a.dts
++++ b/arch/arm/boot/dts/aspeed-bmc-bytedance-g220a.dts
+@@ -453,7 +453,11 @@ channel_3_3: i2c@3 {
+
+ &i2c4 {
+ status = "okay";
+-
++ ipmb0@10 {
++ compatible = "ipmb-dev";
++ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
++ i2c-protocol;
++ };
+ };
+
+ &i2c5 {
+--
+2.25.1
+
diff --git a/meta-g220a/recipes-kernel/linux/linux-aspeed/g220a.cfg b/meta-g220a/recipes-kernel/linux/linux-aspeed/g220a.cfg
index 479d751..7efe900 100644
--- a/meta-g220a/recipes-kernel/linux/linux-aspeed/g220a.cfg
+++ b/meta-g220a/recipes-kernel/linux/linux-aspeed/g220a.cfg
@@ -7,3 +7,4 @@
CONFIG_SENSORS_PECI_DIMMTEMP=y
CONFIG_SENSORS_PECI_CPUPOWER=y
CONFIG_SENSORS_PECI_DIMMPOWER=y
+CONFIG_IPMB_DEVICE_INTERFACE=y
diff --git a/meta-g220a/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-g220a/recipes-kernel/linux/linux-aspeed_%.bbappend
index 0df63c8..db7f7f7 100644
--- a/meta-g220a/recipes-kernel/linux/linux-aspeed_%.bbappend
+++ b/meta-g220a/recipes-kernel/linux/linux-aspeed_%.bbappend
@@ -4,4 +4,5 @@
file://0003-misc-aspeed-Add-Aspeed-UART-routing-control-driver.patch \
file://0004-ARM-dts-aspeed-Add-uart-routing-node.patch \
file://0005-ARM-dts-aspeed-Enable-g220a-uart-route.patch \
+ file://0001-bytedance-g220a-Enable-ipmb.patch \
"