summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2022-03-06 16:12:46 +0200
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2022-03-06 16:12:46 +0200
commitd1a5bc4ea36ba9cd56fd9951870e4dc8db0e4c80 (patch)
tree7bda730a3a37e8adcea6d1f89da2e0fabf162522
parent309117e7ff1663eb2b1cb3dba0073e9ef6d67282 (diff)
parent2000a04054bebf674357de12365853b58ec9137e (diff)
downloadmeta-multitech-d1a5bc4ea36ba9cd56fd9951870e4dc8db0e4c80.tar.gz
meta-multitech-d1a5bc4ea36ba9cd56fd9951870e4dc8db0e4c80.tar.bz2
meta-multitech-d1a5bc4ea36ba9cd56fd9951870e4dc8db0e4c80.zip
Merge remote-tracking branch 'origin/6' into mpower-dev-nxp
-rwxr-xr-xrecipes-bsp/multitech/mt-dt-overlay/init63
-rw-r--r--recipes-bsp/multitech/mt-dt-overlay_1.2.0.bb (renamed from recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb)2
-rw-r--r--recipes-bsp/multitech/mtac-eth_2.0.0.bb (renamed from recipes-bsp/multitech/mtac-eth_1.1.1.bb)0
-rw-r--r--recipes-bsp/multitech/mtac-gpiob_2.0.0.bb (renamed from recipes-bsp/multitech/mtac-gpiob_1.3.0.bb)0
-rw-r--r--recipes-bsp/multitech/mtac-lora_1.1.12.bb2
-rw-r--r--recipes-bsp/multitech/mtac-mfser_2.0.0.bb (renamed from recipes-bsp/multitech/mtac-mfser_1.2.0.bb)0
-rw-r--r--recipes-bsp/multitech/mtac-pulse_2.0.0.bb (renamed from recipes-bsp/multitech/mtac-pulse_1.1.1.bb)0
-rw-r--r--recipes-bsp/multitech/mtac-xdot_2.0.0.bb (renamed from recipes-bsp/multitech/mtac-xdot_1.1.1.bb)0
-rw-r--r--recipes-bsp/multitech/mts-io-sysfs_0.2.0.bb3
-rw-r--r--recipes-bsp/multitech/mts-io.inc3
-rw-r--r--recipes-bsp/multitech/mts-io/mts-io.mtcap.init4
11 files changed, 46 insertions, 31 deletions
diff --git a/recipes-bsp/multitech/mt-dt-overlay/init b/recipes-bsp/multitech/mt-dt-overlay/init
index 00af9f8..4c82e12 100755
--- a/recipes-bsp/multitech/mt-dt-overlay/init
+++ b/recipes-bsp/multitech/mt-dt-overlay/init
@@ -5,41 +5,54 @@
# device tree.
sysdir=/sys/devices/platform/mts-io
-i2c=/sys/bus/i2c/devices/
-eepromPath="/sys/bus/i2c/devices/0-0056/eeprom"
+I2CDIR="/sys/bus/i2c/devices"
+eepromPath="${I2CDIR}/0-0056/eeprom"
DEVTREE="/sys/kernel/config/device-tree/overlays/"
SYSFS="/usr/sbin/mts-io-sysfs"
-I2CDIR="/sys/bus/i2c/devices"
-AP1_EEPROM=$I2CDIR"/1-0050/eeprom"
-AP2_EEPROM=$I2CDIR"/1-0052/eeprom"
+AP1_EEPROM=${I2CDIR}"/1-0050/eeprom"
+AP2_EEPROM=${I2CDIR}"/1-0052/eeprom"
+
+install_all_dtbo() {
+ for f in *.dtbo ; do
+ if ! [[ -f $f ]] ; then
+ continue
+ fi
+ # f2 is the extracted device name
+ base=$(basename $f .dtbo)
+ /bin/mkdir ${DEVTREE}/$base || true
+ /bin/cat $f >${DEVTREE}/$base/dtbo
+ done
+}
install_dtbo_dir() {
if ! [[ -d ${DEVTREE} ]] ; then
mount configfs
fi
- if ([ -f "$AP1_EEPROM" ] && grep -q GPIOB "$AP1_EEPROM") || ([ -f "$AP2_EEPROM" ] && grep -q GPIOB "$AP2_EEPROM"); then
- for f in *gpiob.dtbo ; do
- if ! [[ -f $f ]] ; then
- continue
- fi
- # f2 is the extracted device name
- base=$(basename $f .dtbo)
- /bin/mkdir ${DEVTREE}/$base || true
- /bin/cat $f >${DEVTREE}/$base/dtbo
- done
- modprobe mt_ac_gpiob
+ install_all_dtbo
+ gpiob1=0
+ gpiob2=0
+ if [[ -f $AP1_EEPROM ]] ; then
+ eeprom1=$(mts-id-eeprom --accessory-card --in-file "$AP1_EEPROM" 2>/dev/null)
+ if [[ $eeprom1 =~ [[:space:]]hw-version:[[:space:]]*\"MTAC-GPIOB- ]] ; then
+ gpiob1=1
+ fi
+ fi
+ if [[ -f $AP2_EEPROM ]] ; then
+ eeprom2=$(mts-id-eeprom --accessory-card --in-file "$AP2_EEPROM" 2>/dev/null)
+ if [[ $eeprom2 =~ [[:space:]]hw-version:[[:space:]]*\"MTAC-GPIOB- ]] ; then
+ gpiob2=1
+ fi
+ fi
+
+ if ((gpiob1 == 1)) || ((gpiob2 == 1)) ; then
+ /usr/bin/logger -t "mts-io" -p daemon.info -s 'Loading MTAC-GPIOB Device Tree'
+ cd gpiob
else
- for f in *.dtbo ; do
- if ! [[ -f $f ]] ; then
- continue
- fi
- # f2 is the extracted device name
- base=$(basename $f .dtbo)
- /bin/mkdir ${DEVTREE}/$base || true
- /bin/cat $f >${DEVTREE}/$base/dtbo
- done
+ /usr/bin/logger -t "mts-io" -p daemon.info -s 'Loading standard SPI Device Tree'
+ cd lora
fi
+ install_all_dtbo
}
# Device tree format:
diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb b/recipes-bsp/multitech/mt-dt-overlay_1.2.0.bb
index 98fb5e4..8062f53 100644
--- a/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb
+++ b/recipes-bsp/multitech/mt-dt-overlay_1.2.0.bb
@@ -24,7 +24,7 @@ COMPATIBLE_MACHINE = "(mtcap|mtrv1|mtcdt)"
dt_dir = "/lib/dtoverlays"
-PR = "r4"
+PR = "r1"
SRC_URI = " \
git://git.multitech.net/mt-dt-overlay.git;protocol=git \
diff --git a/recipes-bsp/multitech/mtac-eth_1.1.1.bb b/recipes-bsp/multitech/mtac-eth_2.0.0.bb
index b833f75..b833f75 100644
--- a/recipes-bsp/multitech/mtac-eth_1.1.1.bb
+++ b/recipes-bsp/multitech/mtac-eth_2.0.0.bb
diff --git a/recipes-bsp/multitech/mtac-gpiob_1.3.0.bb b/recipes-bsp/multitech/mtac-gpiob_2.0.0.bb
index 17a4962..17a4962 100644
--- a/recipes-bsp/multitech/mtac-gpiob_1.3.0.bb
+++ b/recipes-bsp/multitech/mtac-gpiob_2.0.0.bb
diff --git a/recipes-bsp/multitech/mtac-lora_1.1.12.bb b/recipes-bsp/multitech/mtac-lora_1.1.12.bb
index 601c82d..49e658f 100644
--- a/recipes-bsp/multitech/mtac-lora_1.1.12.bb
+++ b/recipes-bsp/multitech/mtac-lora_1.1.12.bb
@@ -17,7 +17,7 @@ PR = "${INC_PR}.1"
PKGR = "${PR}${KERNEL_MODULE_PACKAGE_SUFFIX}${EXTENDPRAUTO}"
SRC_URI = " \
- git://git.multitech.net/mtac-lora.git;protocol=git;branch=master \
+ git://git.multitech.net/mtac-lora.git;protocol=git;branch=master \
"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/multitech/mtac-mfser_1.2.0.bb b/recipes-bsp/multitech/mtac-mfser_2.0.0.bb
index 4598beb..4598beb 100644
--- a/recipes-bsp/multitech/mtac-mfser_1.2.0.bb
+++ b/recipes-bsp/multitech/mtac-mfser_2.0.0.bb
diff --git a/recipes-bsp/multitech/mtac-pulse_1.1.1.bb b/recipes-bsp/multitech/mtac-pulse_2.0.0.bb
index 1fefdba..1fefdba 100644
--- a/recipes-bsp/multitech/mtac-pulse_1.1.1.bb
+++ b/recipes-bsp/multitech/mtac-pulse_2.0.0.bb
diff --git a/recipes-bsp/multitech/mtac-xdot_1.1.1.bb b/recipes-bsp/multitech/mtac-xdot_2.0.0.bb
index dc12bba..dc12bba 100644
--- a/recipes-bsp/multitech/mtac-xdot_1.1.1.bb
+++ b/recipes-bsp/multitech/mtac-xdot_2.0.0.bb
diff --git a/recipes-bsp/multitech/mts-io-sysfs_0.2.0.bb b/recipes-bsp/multitech/mts-io-sysfs_0.2.0.bb
index c054d28..a489468 100644
--- a/recipes-bsp/multitech/mts-io-sysfs_0.2.0.bb
+++ b/recipes-bsp/multitech/mts-io-sysfs_0.2.0.bb
@@ -37,9 +37,6 @@ INITSCRIPT_NAME = "eeprom-config"
# Must start after MTS-IO to read the accessory cards.
INITSCRIPT_PARAMS = "start 40 S ."
-
-PACKAGES = "${PN}"
-
FILES_${PN} += "${libdir}/mts-io-sysfs*"
FILES_${PN} += "${sbindir}/mts-io-sysfs"
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc
index 94a52c6..62b0f0a 100644
--- a/recipes-bsp/multitech/mts-io.inc
+++ b/recipes-bsp/multitech/mts-io.inc
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://io-module/COPYING;md5=94d55d512a9ba36caa9b7df079bae19
file://io-tool/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
"
do_fetch[depends] += "virtual/kernel:do_shared_workdir"
-INC_PR = "r2"
+INC_PR = "r1"
SRCREV = "${PV}"
PR = "${INC_PR}.0"
@@ -18,6 +18,7 @@ RPROVIDES_kernel-module-${PN} = "mts-io"
RDEPENDS_${PN}-noarch_append = " mts-io-sysfs"
RDEPENDS_${PN}-noarch_append_mtcap = " mts-io-sysfs i2c-tools"
+
SRC_URI = " \
git://git@gitlab.multitech.net/mirrors/mts-io;protocol=ssh;branch=master \
file://led-status_heartbeat_trigger \
diff --git a/recipes-bsp/multitech/mts-io/mts-io.mtcap.init b/recipes-bsp/multitech/mts-io/mts-io.mtcap.init
index f8e611f..7b444a1 100644
--- a/recipes-bsp/multitech/mts-io/mts-io.mtcap.init
+++ b/recipes-bsp/multitech/mts-io/mts-io.mtcap.init
@@ -107,6 +107,10 @@ gettime() {
echo ${BASH_REMATCH[1]}
}
wait_for_supercap() {
+ if ! [[ -f ${sysdir}/capability/supercap ]] ; then
+ # Driver not loaded, maybe EEPROM not set
+ return
+ fi
supercap=$(mts-io-sysfs show capability/supercap 2>/dev/null)
if ((supercap != 1)) ; then
return