Skip to content

Commit 5613f26

Browse files
authored
Merge pull request #248 from twa127/master
Add Support for Orangepi 4
2 parents c007fa1 + 7558b2b commit 5613f26

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

adafruit_platformdetect/board.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def id(self) -> Optional[str]:
138138
elif chip_id == chips.RK3308:
139139
board_id = self._rock_pi_id()
140140
elif chip_id == chips.RK3399:
141-
board_id = self._rock_pi_id()
141+
board_id = self._rock_pi_id() or self._armbian_id()
142142
elif chip_id == chips.ATOM_X5_Z8350:
143143
board_id = self._rock_pi_id()
144144
elif chip_id == chips.RK3288:
@@ -312,6 +312,10 @@ def _armbian_id(self) -> Optional[str]:
312312
board = boards.ORANGE_PI_3
313313
elif board_value == "orangepi3-lts":
314314
board = boards.ORANGE_PI_3_LTS
315+
elif board_value == "orangepi4":
316+
board = boards.ORANGE_PI_4
317+
elif board_value == "orangepi4-lts":
318+
board = boards.ORANGE_PI_4_LTS
315319
elif board_value == "bananapim2zero":
316320
board = boards.BANANA_PI_M2_ZERO
317321
elif board_value == "bananapim5":

adafruit_platformdetect/constants/boards.py

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
ORANGE_PI_ZERO_2 = "ORANGE_PI_ZERO_2"
5252
ORANGE_PI_3 = "ORANGE_PI_3"
5353
ORANGE_PI_3_LTS = "ORANGE_PI_3_LTS"
54+
ORANGE_PI_4 = "ORANGE_PI_4"
55+
ORANGE_PI_4_LTS = "ORANGE_PI_4_LTS"
5456

5557
# Nano Pi boards
5658
NANOPI_NEO_AIR = "NANOPI_NEO_AIR"
@@ -200,6 +202,8 @@
200202
ORANGE_PI_ZERO_2,
201203
ORANGE_PI_3,
202204
ORANGE_PI_3_LTS,
205+
ORANGE_PI_4,
206+
ORANGE_PI_4_LTS,
203207
)
204208

205209
# NanoPi

0 commit comments

Comments
 (0)