Browse Source

Add chip detection for Allwinner A10 and A20

pull/251/head
Ryan L 2 years ago
parent
commit
b2f14b8351
2 changed files with 11 additions and 0 deletions
  1. +1
    -0
      .gitignore
  2. +10
    -0
      adafruit_platformdetect/chip.py

+ 1
- 0
.gitignore View File

@ -6,6 +6,7 @@
.idea
__pycache__
_build
build
*.pyc
.env
bundles


+ 10
- 0
adafruit_platformdetect/chip.py View File

@ -167,6 +167,12 @@ class Chip:
# pylint: disable=too-many-return-statements
"""Attempt to detect the CPU on a computer running the Linux kernel."""
if self.detector.check_dt_compatible_value("sun4i-a10"):
return chips.A10
if self.detector.check_dt_compatible_value("sun7i-a20"):
return chips.A20
if self.detector.check_dt_compatible_value("sun8i-h3"):
return chips.H3
@ -313,6 +319,10 @@ class Chip:
linux_id = chips.AM33XX
elif "DRA74X" in hardware:
linux_id = chips.DRA74X
elif "sun4i" in hardware:
linux_id = chips.A10
elif "sun7i" in hardware:
linux_id = chips.A20
elif "sun8i" in hardware:
linux_id = chips.SUN8I
elif "ODROIDC" in hardware:


|||||||
x
 
000:0
Loading…
Cancel
Save