blob: 88e1126ff2d906860781d5650beefce9998124b4 [file] [log] [blame]
Sivas SRR81037942017-01-26 06:48:20 -06001*** Settings ***
2Documentation This suite is for Verifying BMC device tree.
3
George Keishingd8004f82022-03-29 08:56:11 -05004Resource ../lib/utils.robot
5Resource ../lib/openbmc_ffdc.robot
6Resource ../lib/ipmi_client.robot
Sivas SRR81037942017-01-26 06:48:20 -06007Library String
8
George Keishing06a8ee82023-10-17 15:54:15 +05309Test Setup Open Connection And Log In
10Test Teardown Run Keywords Close All Connections AND FFDC On Test Case Fail
Sivas SRR81037942017-01-26 06:48:20 -060011
Sridevi Ramesh89666172025-09-28 04:15:29 -050012Test Tags Test_BMC_Devicetree
13
Sivas SRR81037942017-01-26 06:48:20 -060014*** Variables ***
15${devicetree_base} /sys/firmware/devicetree/base/
16
17*** Test Cases ***
18Check BMC Model Property Is Set
Sivas SRR81037942017-01-26 06:48:20 -060019 [Documentation] Verify if the BMC Model is populated in the device tree.
20 [Tags] Check_BMC_Model_Property_Is_Set
21 [Template] Template Check Property
22
Sivas SRR81037942017-01-26 06:48:20 -060023 #Property
George Keishing5abfe602018-07-05 11:54:37 -050024 model
25
26
George Keishing5abfe602018-07-05 11:54:37 -050027Check BMC Compatible Property Is Set
Sivas SRR81037942017-01-26 06:48:20 -060028 [Documentation] Verify if the BMC compatible property is populated.
29 [Tags] Check_BMC_Compatible_Property_Is_Set
30 [Template] Template Check Property
31
Sivas SRR81037942017-01-26 06:48:20 -060032 #Property
George Keishing5abfe602018-07-05 11:54:37 -050033 compatible
34
35
36Check BMC CPU Name Property Is Set
Sivas SRR81037942017-01-26 06:48:20 -060037 [Documentation] Verify if the BMC CPU name property is populated.
38 [Tags] Check_BMC_CPU_Name_Property_Is_Set
39 [Template] Template Check Property
40
Sivas SRR81037942017-01-26 06:48:20 -060041 #Property
George Keishing5abfe602018-07-05 11:54:37 -050042 cpus/name
43
44
45Check BMC CPU Compatible Property Is Set
Sivas SRR81037942017-01-26 06:48:20 -060046 [Documentation] Verify if the BMC CPU compatible property is populated.
47 [Tags] Check_BMC_CPU_Compatible_Property_Is_Set
48 [Template] Template Check Property
49
Sivas SRR81037942017-01-26 06:48:20 -060050 #Property
George Keishing5abfe602018-07-05 11:54:37 -050051 cpus/cpu@0/compatible
52
53
54Check BMC Memory Name Property Is Set
Sivas SRR81037942017-01-26 06:48:20 -060055 [Documentation] Verify if the BMC Memory name property is populated.
56 [Tags] Check_BMC_Memory_Name_Property_Is_Set
57 [Template] Template Check Property
58
Sivas SRR81037942017-01-26 06:48:20 -060059 #Property
Sivas SRRd3b515b2019-01-15 23:31:35 -060060 memory@80000000/name
George Keishing5abfe602018-07-05 11:54:37 -050061
62
63Check BMC Memory Device Type Property Is Set
Sivas SRR81037942017-01-26 06:48:20 -060064 [Documentation] Verify if the BMC Memory Device Type property is
65 ... populated.
66 [Tags] Check_BMC_Memory_Device_Type_Property_Is_Set
67 [Template] Template Check Property
68
Sivas SRR81037942017-01-26 06:48:20 -060069 #Property
Sivas SRRd3b515b2019-01-15 23:31:35 -060070 memory@80000000/device_type
George Keishing5abfe602018-07-05 11:54:37 -050071
72
73Check BMC FSI Name Property Is Set
Sivas SRR81037942017-01-26 06:48:20 -060074 [Documentation] Verify if the BMC FSI name property is populated.
75 [Tags] Check_BMC_FSI_Name_Property_Is_Set
76 [Template] Template Check Property
77
Sivas SRR81037942017-01-26 06:48:20 -060078 #Property
Sivas SRR37f93112019-06-19 03:18:07 -050079 gpio-fsi/name
George Keishing5abfe602018-07-05 11:54:37 -050080
81
82Check BMC FSI Compatible Property Is Set
Sivas SRR81037942017-01-26 06:48:20 -060083 [Documentation] Verify if the BMC FSI compatible property is populated.
84 [Tags] Check_BMC_FSI_Compatible_Property_Is_Set
85 [Template] Template Check Property
86
Sivas SRR01c7dc32017-06-24 02:24:23 -050087 #Property
Sivas SRR37f93112019-06-19 03:18:07 -050088 gpio-fsi/compatible
George Keishing5abfe602018-07-05 11:54:37 -050089
90
George Keishing5236ec52022-01-31 12:07:58 -060091Check BMC GPIO FSI Name Property Is Set
Sivas SRR01c7dc32017-06-24 02:24:23 -050092 [Documentation] Verify if the BMC GPIO-FSI name property is populated.
93 [Tags] Check_BMC_GPIO_FSI_Name_Property_Is_Set
94 [Template] Template Check Property
95
Sivas SRR01c7dc32017-06-24 02:24:23 -050096 #Property
George Keishing5abfe602018-07-05 11:54:37 -050097 gpio-fsi/name
98
99
George Keishing5236ec52022-01-31 12:07:58 -0600100Check BMC GPIO FSI Compatible Property Is Set
Sivas SRR01c7dc32017-06-24 02:24:23 -0500101 [Documentation] Verify if the BMC GPIO-FSI compatible property is populated.
102 [Tags] Check_BMC_GPIO_FSI_Compatible_Property_Is_Set
103 [Template] Template Check Property
104
Sivas SRRfbe34dd2017-06-29 11:03:12 -0500105 #Property
George Keishing5abfe602018-07-05 11:54:37 -0500106 gpio-fsi/compatible
107
108
George Keishing5236ec52022-01-31 12:07:58 -0600109Check BMC GPIO Keys Name Property Is Set
Sivas SRRfbe34dd2017-06-29 11:03:12 -0500110 [Documentation] Verify if the BMC GPIO-keys name property is
111 ... populated.
George Keishing5236ec52022-01-31 12:07:58 -0600112 [Tags] Check_BMC_GPIO_Keys_Name_Property_Is_Set
Sivas SRRfbe34dd2017-06-29 11:03:12 -0500113 [Template] Template Check Property
114
Sivas SRRfbe34dd2017-06-29 11:03:12 -0500115 #Property
George Keishing5abfe602018-07-05 11:54:37 -0500116 gpio-keys/name
117
118
George Keishing5236ec52022-01-31 12:07:58 -0600119Check BMC GPIO Keys Compatible Property Is Set
Sivas SRRfbe34dd2017-06-29 11:03:12 -0500120 [Documentation] Verify if the BMC GPIO-keys compatible property is
121 ... populated.
George Keishing5236ec52022-01-31 12:07:58 -0600122 [Tags] Check_BMC_GPIO_Keys_Compatible_Property_Is_Set
Sivas SRRfbe34dd2017-06-29 11:03:12 -0500123 [Template] Template Check Property
124
Sivas SRRfbe34dd2017-06-29 11:03:12 -0500125 #Property
George Keishing5abfe602018-07-05 11:54:37 -0500126 gpio-keys/compatible
127
128
129Check BMC IIO-HWMON Name Property Is Set
Sivas SRRf4f533b2017-07-30 11:42:12 -0500130 [Documentation] Verify if the BMC IIO-HWMON-DPS310 name property is
Sivas SRRfbe34dd2017-06-29 11:03:12 -0500131 ... populated.
132 [Tags] Check_BMC_IIO-HWMON_Name_Property_Is_Set
133 [Template] Template Check Property
134
Sivas SRRfbe34dd2017-06-29 11:03:12 -0500135 #Property
George Keishing5abfe602018-07-05 11:54:37 -0500136 iio-hwmon-dps310/name
137
138
139Check BMC IIO-HWMON Compatible Property Is Set
Sivas SRRf4f533b2017-07-30 11:42:12 -0500140 [Documentation] Verify if the BMC IIO-HWMON-DPS310 compatible property is
Sivas SRRfbe34dd2017-06-29 11:03:12 -0500141 ... populated.
142 [Tags] Check_BMC_IIO-HWMON_Compatible_Property_Is_Set
143 [Template] Template Check Property
144
Sivas SRR81037942017-01-26 06:48:20 -0600145 #Property
George Keishing5abfe602018-07-05 11:54:37 -0500146 iio-hwmon-dps310/compatible
147
148
149Check BMC LED Name Property Is Set
Sivas SRR81037942017-01-26 06:48:20 -0600150 [Documentation] Verify if the BMC LED name property is populated.
151 [Tags] Check_BMC_LED_Name_Property_Is_Set
152 [Template] Template Check Property
153
Sivas SRR81037942017-01-26 06:48:20 -0600154 #Property
George Keishing5abfe602018-07-05 11:54:37 -0500155 leds/name
156
157
158Check BMC LED Compatible Property Is Set
Sivas SRR81037942017-01-26 06:48:20 -0600159 [Documentation] Verify if the BMC LED compatible property is populated.
160 [Tags] Check_BMC_LED_Compatible_Property_Is_Set
161 [Template] Template Check Property
162
Sivas SRR81037942017-01-26 06:48:20 -0600163 #Property
George Keishing5abfe602018-07-05 11:54:37 -0500164 leds/compatible
165
166
Sivas SRR81037942017-01-26 06:48:20 -0600167*** Keywords ***
168
169Template Check Property
170 [Documentation] Check for the existence of a property in the device tree.
171 [Arguments] ${property}
172 #property: Value of Property
173
174 ${devicetree_path}= Catenate SEPARATOR=
175 ... ${devicetree_base} ${property}
176 ${output} ${stderr}= Execute Command cat ${devicetree_path}
177 ... return_stderr=True
178 Should Be Empty ${stderr}
179 ${length}= Get Length ${output}
180 Should Be True ${length} > 1
Rahul Maheshwari06174f22017-03-06 03:17:09 -0600181