summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-11-08 03:41:21 -0600
committerJohn Klug <john.klug@multitech.com>2021-12-29 08:07:46 -0600
commitede46f99df89376b19f874e04cabe37694f62d49 (patch)
tree2b7173a88d94220d7d918f9be5a01d97a5f57253
parent819595176855bd8e7ff038df5c60284e6f6c742d (diff)
downloadmeta-multitech-ede46f99df89376b19f874e04cabe37694f62d49.tar.gz
meta-multitech-ede46f99df89376b19f874e04cabe37694f62d49.tar.bz2
meta-multitech-ede46f99df89376b19f874e04cabe37694f62d49.zip
mt-dt-overlay must come before mts-io for gpio-leds driver
-rwxr-xr-xrecipes-bsp/multitech/mt-dt-overlay/init5
-rw-r--r--recipes-bsp/multitech/mt-dt-overlay_1.0.4.bb16
2 files changed, 14 insertions, 7 deletions
diff --git a/recipes-bsp/multitech/mt-dt-overlay/init b/recipes-bsp/multitech/mt-dt-overlay/init
index 5114e4e..1920723 100755
--- a/recipes-bsp/multitech/mt-dt-overlay/init
+++ b/recipes-bsp/multitech/mt-dt-overlay/init
@@ -6,6 +6,7 @@
sysdir=/sys/devices/platform/mts-io
i2c=/sys/bus/i2c/devices/
+eepromPath="/sys/devices/platform/i2c-gpio-0/i2c-0/0-0056/eeprom"
DEVTREE="/sys/kernel/config/device-tree/overlays/"
SYSFS="/usr/sbin/mts-io-sysfs"
@@ -32,7 +33,9 @@ install_dtbo_dir() {
# [flag]
# [file1] [file2] [file3]
setdevtree() {
- hw=$(${SYSFS} show hw-version)
+ hwlin=$(mts-id-eeprom --in-file "$eepromPath" 2>/dev/null | grep '^hw-version:')
+ [[ $hwlin =~ hw-version:[[:space:]]*\"([^\"]+) ]]
+ hw=${BASH_REMATCH[1]}
mach=${hw/%-*}
rev=${hw/#*-/}
echo mach is $mach
diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.0.4.bb b/recipes-bsp/multitech/mt-dt-overlay_1.0.4.bb
index 93272fb..a023a4e 100644
--- a/recipes-bsp/multitech/mt-dt-overlay_1.0.4.bb
+++ b/recipes-bsp/multitech/mt-dt-overlay_1.0.4.bb
@@ -5,13 +5,16 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit update-rc.d
INITSCRIPT_NAME = "${PN}"
-INITSCRIPT_PARAMS = "start 40 S ."
-DEPENDS = "dtc-native"
+# mt-dt-overlay must start before mts-io
+# because the gpio-leds driver will not load
+# after mts-io.
+INITSCRIPT_PARAMS = "start 39 S ."
+DEPENDS = "dtc-native linux-at91"
RDEPENDS_${PN} = "bash"
# For now, just mtcap
-COMPATIBLE_MACHINE = "(mtcap|mtrv1)"
+COMPATIBLE_MACHINE = "(mtcap|mtrv1|mtcdt)"
# By using an overlay, we should be able to support multiple pinouts
# using the same image. The overlays go into /lib/dtoverlays.
@@ -22,14 +25,15 @@ COMPATIBLE_MACHINE = "(mtcap|mtrv1)"
dt_dir = "/lib/dtoverlays"
-PR = "r1"
+PR = "r2"
+# git://git.multitech.net/mt-dt-overlay.git;protocol=git
SRC_URI = " \
- git://git.multitech.net/mt-dt-overlay.git;protocol=git \
+ git://git@gitlab.multitech.net/mirrors/mt-dt-overlay.git;protocol=ssh;branch=MTCDT-0.2 \
file://init \
"
-SRCREV = "${PV}"
+SRCREV = "${AUTOREV}"
DEPENDS = "virtual/kernel u-boot-mkimage-native"