File tree Expand file tree Collapse file tree 3 files changed +43
-20
lines changed Expand file tree Collapse file tree 3 files changed +43
-20
lines changed Original file line number Diff line number Diff line change @@ -204,17 +204,14 @@ def _imx8mx_id(self):
204
204
205
205
def _tegra_id (self ):
206
206
"""Try to detect the id of aarch64 board."""
207
- board_value = self .detector .get_device_model ()
208
- board = None
209
- if 'tx1' in board_value .lower ():
210
- board = boards .JETSON_TX1
211
- elif 'quill' in board_value or "storm" in board_value or "lightning" in board_value :
212
- board = boards .JETSON_TX2
213
- elif 'xavier' in board_value .lower () or 'agx' in board_value .lower ():
214
- board = boards .JETSON_XAVIER
215
- elif 'nano' in board_value .lower ():
216
- board = boards .JETSON_NANO
217
- return board
207
+ compatible = self .detector .get_device_compatible ()
208
+ if not compatible :
209
+ return None
210
+ compats = compatible .split ('\x00 ' )
211
+ for board_id , board_compats in boards ._JETSON_IDS .items ():
212
+ if any (v in compats for v in board_compats ):
213
+ return board_id
214
+ return None
218
215
219
216
def _sifive_id (self ):
220
217
"""Try to detect the id for Sifive RISCV64 board."""
Original file line number Diff line number Diff line change @@ -74,11 +74,12 @@ def _linux_id(self): # pylint: disable=too-many-branches,too-many-statements
74
74
75
75
compatible = self .detector .get_device_compatible ()
76
76
if compatible and 'tegra' in compatible :
77
- if 'cv' in compatible or 'nano' in compatible :
77
+ compats = compatible .split ('\x00 ' )
78
+ if 'nvidia,tegra210' in compats :
78
79
linux_id = chips .T210
79
- elif 'quill ' in compatible :
80
+ elif 'nvidia,tegra186 ' in compats :
80
81
linux_id = chips .T186
81
- elif 'xavier ' in compatible :
82
+ elif 'nvidia,tegra194 ' in compats :
82
83
linux_id = chips .T194
83
84
if compatible and 'imx8m' in compatible :
84
85
linux_id = chips .IMX8MX
Original file line number Diff line number Diff line change 38
38
JETSON_TX2 = 'JETSON_TX2'
39
39
JETSON_XAVIER = 'JETSON_XAVIER'
40
40
JETSON_NANO = 'JETSON_NANO'
41
+ JETSON_NX = 'JETSON_NX'
41
42
42
43
# Google Coral dev board
43
44
CORAL_EDGE_TPU_DEV = "CORAL_EDGE_TPU_DEV"
97
98
CORAL_EDGE_TPU_DEV ,
98
99
)
99
100
100
- _JETSON_IDS = (
101
- JETSON_TX1 ,
102
- JETSON_TX2 ,
103
- JETSON_XAVIER ,
104
- JETSON_NANO
105
- )
101
+ _JETSON_IDS = {
102
+ JETSON_TX1 : (
103
+ 'nvidia,p2371-2180' ,
104
+ 'nvidia,jetson-cv' ,
105
+ ),
106
+ JETSON_TX2 : (
107
+ 'nvidia,p2771-0000' ,
108
+ 'nvidia,p2771-0888' ,
109
+ 'nvidia,p3489-0000' ,
110
+ 'nvidia,lightning' ,
111
+ 'nvidia,quill' ,
112
+ 'nvidia,storm' ,
113
+ ),
114
+ JETSON_XAVIER : (
115
+ 'nvidia,p2972-0000' ,
116
+ 'nvidia,p2972-0006' ,
117
+ 'nvidia,jetson-xavier' ,
118
+ ),
119
+ JETSON_NANO : (
120
+ 'nvidia,p3450-0000' ,
121
+ 'nvidia,p3450-0002' ,
122
+ 'nvidia,jetson-nano' ,
123
+ ),
124
+ JETSON_NX : (
125
+ 'nvidia,p3509-0000+p3668-0000' ,
126
+ 'nvidia,p3509-0000+p3668-0001' ,
127
+ 'nvidia,p3449-0000+p3668-0000' ,
128
+ 'nvidia,p3449-0000+p3668-0001' ,
129
+ ),
130
+ }
106
131
107
132
_RASPBERRY_PI_40_PIN_IDS = (
108
133
RASPBERRY_PI_B_PLUS ,
You can’t perform that action at this time.
0 commit comments