diff options
author | Jason Reiss <jreiss@multitech.com> | 2021-10-29 12:23:13 -0500 |
---|---|---|
committer | Jason Reiss <jreiss@multitech.com> | 2021-10-29 12:23:13 -0500 |
commit | 87760c2314a16675a263f2199d88b94e11771784 (patch) | |
tree | 86a1a80e6c2587f9bcc448413c0b9150ef610a40 | |
parent | 5ec3c59dd16c42c4bade24ee75773a8764fcb01e (diff) | |
download | meta-multitech-87760c2314a16675a263f2199d88b94e11771784.tar.gz meta-multitech-87760c2314a16675a263f2199d88b94e11771784.tar.bz2 meta-multitech-87760c2314a16675a263f2199d88b94e11771784.zip |
Revert "Revert "Added support for mtac-003""
This reverts commit 5ec3c59dd16c42c4bade24ee75773a8764fcb01e.
-rwxr-xr-x | recipes-bsp/multitech/mt-dt-overlay/init | 44 | ||||
-rw-r--r-- | recipes-bsp/multitech/mt-dt-overlay_1.0.5.bb (renamed from recipes-bsp/multitech/mt-dt-overlay_1.0.4.bb) | 2 | ||||
-rw-r--r-- | recipes-bsp/multitech/mtac-gpiob_1.1.4.bb | 4 | ||||
-rw-r--r-- | recipes-bsp/multitech/mtac_4.0.9.bb (renamed from recipes-bsp/multitech/mtac_4.0.7.bb) | 4 | ||||
-rwxr-xr-x | recipes-bsp/multitech/mts-io/mts-io.init | 11 |
5 files changed, 38 insertions, 27 deletions
diff --git a/recipes-bsp/multitech/mt-dt-overlay/init b/recipes-bsp/multitech/mt-dt-overlay/init index 5114e4e..5bd8523 100755 --- a/recipes-bsp/multitech/mt-dt-overlay/init +++ b/recipes-bsp/multitech/mt-dt-overlay/init @@ -5,24 +5,39 @@ # device tree. sysdir=/sys/devices/platform/mts-io -i2c=/sys/bus/i2c/devices/ 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" install_dtbo_dir() { - for f in *.dtbo ; do - if ! [[ -f $f ]] ; then - continue - fi - if ! [[ -d ${DEVTREE} ]] ; then - mount configfs - fi - # f2 is the extracted device name - base=$(basename $f .dtbo) - /bin/mkdir ${DEVTREE}/$base || true - /bin/cat $f >${DEVTREE}/$base/dtbo - done + 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 + else + for f in *lora.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 + fi } # Device tree format: @@ -57,7 +72,7 @@ setdevtree() { done if [[ $best == -1 ]] ; then # No overlay found - exit 0 + exit 0 fi cd $best install_dtbo_dir @@ -93,3 +108,4 @@ case $1 in exit 2 ;; esac + diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.0.4.bb b/recipes-bsp/multitech/mt-dt-overlay_1.0.5.bb index 97635c9..5727e14 100644 --- a/recipes-bsp/multitech/mt-dt-overlay_1.0.4.bb +++ b/recipes-bsp/multitech/mt-dt-overlay_1.0.5.bb @@ -24,7 +24,7 @@ dt_dir = "/lib/dtoverlays" PR = "r1" SRC_URI = " \ - git://git.multitech.net/mt-dt-overlay.git;protocol=git \ + git://git.multitech.net/mt-dt-overlay.git;protocol=git \ file://init \ " diff --git a/recipes-bsp/multitech/mtac-gpiob_1.1.4.bb b/recipes-bsp/multitech/mtac-gpiob_1.1.4.bb index ecc1fb2..f004cec 100644 --- a/recipes-bsp/multitech/mtac-gpiob_1.1.4.bb +++ b/recipes-bsp/multitech/mtac-gpiob_1.1.4.bb @@ -49,12 +49,12 @@ do_compile () { PACKAGES = "kernel-module-${PN}" -FILES_kernel-module-${PN} = "${base_libdir}/modules/${KERNEL_VERSION}/extra/mtac_gpiob.ko" +FILES_kernel-module-${PN} = "${base_libdir}/modules/${KERNEL_VERSION}/extra/mt_ac_gpiob.ko" PARALLEL_MAKE = "" fakeroot do_install () { install -m 0755 -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra # use cp instead of install so the driver doesn't get stripped - cp ${S}/mtac_gpiob.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra + cp ${S}/mtac_gpiob.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra/mt_ac_gpiob.ko } diff --git a/recipes-bsp/multitech/mtac_4.0.7.bb b/recipes-bsp/multitech/mtac_4.0.9.bb index ebe091a..ecabcb3 100644 --- a/recipes-bsp/multitech/mtac_4.0.7.bb +++ b/recipes-bsp/multitech/mtac_4.0.9.bb @@ -9,7 +9,7 @@ DEPENDS = "virtual/kernel mts-io" INC_PR = "r0" COMPATIBLE_MACHINE = "(mtcdt|mtcpmhs)" -SRCREV = "${PV}" +SRCREV = "${AUTOREV}" # AUTOREV breaks mLinux source tarballs in Thud # SRCREV = "${AUTOREV}" @@ -22,7 +22,7 @@ PR = "${INC_PR}.1" PKGR = "${PR}${KERNEL_MODULE_PACKAGE_SUFFIX}${EXTENDPRAUTO}" SRC_URI = " \ - git://git.multitech.net/mtac.git;protocol=git;branch=master \ + git://git@gitlab.multitech.net/mirrors/mtac;protocol=ssh;branch=master \ " S = "${WORKDIR}/git" diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init index ed0475e..a75ceb9 100755 --- a/recipes-bsp/multitech/mts-io/mts-io.init +++ b/recipes-bsp/multitech/mts-io/mts-io.init @@ -210,18 +210,13 @@ read_card_info() { return 0 fi - if [ -d $port1 ] && [[ $(cat $port1/hw-version) = $lora_hw ]]; then - modprobe spidev - ln -sf /dev/spidev32766.2 /dev/spidev0.0 - elif [ -d $port2 ] && [[ $(cat $port2/hw-version) = $lora_hw ]]; then - modprobe spidev - ln -sf /dev/spidev32765.2 /dev/spidev0.0 - elif [[ ${hw_name} == MTCAP ]]; then + + if [[ ${hw_name} == MTCAP ]] || [[ ${hw_name} == MTCDT ]]; then modprobe spidev elif [[ ${hw_name} == MTCDTIPHP ]]; then modprobe spidev ln -sf /dev/spidev32766.2 /dev/spidev0.0 - fi + fi } mfser_init() { |