From: Kane-Chen-AS <kane_chen@aspeedtech.com>
Extend the AST2700 test suite to verify I2C connectivity on AST1700
IO expanders using the DCSCM image. This validates the new bus-label
naming scheme by testing communication on both primary and
expander-attached I2C buses.
Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
---
.../functional/aarch64/test_aspeed_ast2700.py | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tests/functional/aarch64/test_aspeed_ast2700.py b/tests/functional/aarch64/test_aspeed_ast2700.py
index 438f7eb37c..f2bdac5177 100755
--- a/tests/functional/aarch64/test_aspeed_ast2700.py
+++ b/tests/functional/aarch64/test_aspeed_ast2700.py
@@ -50,10 +50,21 @@ def verify_openbmc_boot_and_login(self, name):
exec_command_and_wait_for_pattern(self, 'root', 'Password:')
exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#')
+ def bring_up_ast1700_and_login(self, name):
+ wait_for_console_pattern(self, 'Hit any key to stop autoboot')
+ exec_command_and_wait_for_pattern(self, '0', '=>')
+ exec_command_and_wait_for_pattern(self, 'cp.b 100420000 403000000 800000; bootm 403000000#conf-ast2700-dcscm_ast1700-evb.dtb', f'{name} login:')
+ exec_command_and_wait_for_pattern(self, 'root', 'Password:')
+ exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#')
+
ASSET_SDK_V908_AST2700A1 = Asset(
'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.08/ast2700-default-obmc.tar.gz',
'eac3dc409b7ea3cd4b03d4792d3cebd469792ad893cb51e1d15f0fc20bd1e2cd')
+ ASSET_SDK_V908_AST2700A1_DCSCM = Asset(
+ 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.08/ast2700-dcscm-obmc.tar.gz',
+ '59dc1282db886087342419824edf91806bb4f83febf916ec5350238aa5613268')
+
def do_ast2700_i2c_test(self, bus_id):
bus_str = str(bus_id)
exec_command_and_wait_for_pattern(self,
@@ -148,5 +159,18 @@ def test_aarch64_ast2700a1_evb_sdk_vbootrom_v09_08(self):
self.verify_vbootrom_firmware_flow()
self.verify_openbmc_boot_start()
+ def test_aarch64_ast2700a1_evb_ioexp_v09_08(self):
+ self.set_machine('ast2700a1-evb')
+ self.require_netdev('user')
+
+ self.archive_extract(self.ASSET_SDK_V908_AST2700A1_DCSCM)
+ self.vm.set_machine('ast2700a1-evb,fmc-model=w25q512jv')
+ self.vm.add_args('-device',
+ 'tmp105,bus=ioexp0.0,address=0x4d,id=tmp-test-16')
+ self.start_ast2700_test_vbootrom('ast2700-dcscm', 8)
+ self.bring_up_ast1700_and_login('ast2700-dcscm')
+ self.do_ast2700_i2c_test(8)
+ self.do_ast2700_i2c_test(16)
+
if __name__ == '__main__':
QemuSystemTest.main()
--
2.43.0