From bd67cdefd3f5c920c5f22ac282fd4eecb2f12bc9 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 24 Jan 2022 17:27:35 -0600 Subject: Add USB Hub GPIOs to mts-io --- recipes-bsp/multitech/mts-io_4.8.3.bb | 2 -- recipes-bsp/multitech/mts-io_4.8.4.bb | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 recipes-bsp/multitech/mts-io_4.8.3.bb create mode 100644 recipes-bsp/multitech/mts-io_4.8.4.bb diff --git a/recipes-bsp/multitech/mts-io_4.8.3.bb b/recipes-bsp/multitech/mts-io_4.8.3.bb deleted file mode 100644 index ee4fcfa..0000000 --- a/recipes-bsp/multitech/mts-io_4.8.3.bb +++ /dev/null @@ -1,2 +0,0 @@ -require mts-io.inc - diff --git a/recipes-bsp/multitech/mts-io_4.8.4.bb b/recipes-bsp/multitech/mts-io_4.8.4.bb new file mode 100644 index 0000000..ee4fcfa --- /dev/null +++ b/recipes-bsp/multitech/mts-io_4.8.4.bb @@ -0,0 +1,2 @@ +require mts-io.inc + -- cgit v1.2.3 From 7926376469a060506e124172612d0c68ac463d9e Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 27 Jan 2022 14:33:22 -0600 Subject: Fix the mt-dt-overlay path to the EEPROM for MTCAP --- recipes-bsp/multitech/mt-dt-overlay/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/multitech/mt-dt-overlay/init b/recipes-bsp/multitech/mt-dt-overlay/init index c2d9716..2112edc 100755 --- a/recipes-bsp/multitech/mt-dt-overlay/init +++ b/recipes-bsp/multitech/mt-dt-overlay/init @@ -6,7 +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" +eepromPath="/sys/bus/i2c/devices/0-0056/eeprom" DEVTREE="/sys/kernel/config/device-tree/overlays/" SYSFS="/usr/sbin/mts-io-sysfs" -- cgit v1.2.3 From 45eed7d6952c19e586b3d71d7f3789f0132bd278 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 2 Feb 2022 19:24:16 -0600 Subject: Fix GPS on MTCDTIP2 --- recipes-bsp/multitech/mt-dt-overlay/init | 26 ++++++++++++++------------ recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/recipes-bsp/multitech/mt-dt-overlay/init b/recipes-bsp/multitech/mt-dt-overlay/init index 2112edc..00af9f8 100755 --- a/recipes-bsp/multitech/mt-dt-overlay/init +++ b/recipes-bsp/multitech/mt-dt-overlay/init @@ -49,14 +49,17 @@ install_dtbo_dir() { # [flag] # [file1] [file2] [file3] setdevtree() { - hwlin=$(mts-id-eeprom --in-file "$eepromPath" 2>/dev/null | grep '^hw-version:') - [[ $hwlin =~ hw-version:[[:space:]]*\"([^\"]+) ]] + eeprom=$(mts-id-eeprom --in-file "$eepromPath" 2>/dev/null) + [[ $eeprom =~ [[:space:]]hw-version:[[:space:]]*\"([^\"]+) ]] hw=${BASH_REMATCH[1]} mach=${hw/%-*} rev=${hw/#*-/} echo mach is $mach echo rev is $rev - capd="${sysdir}/capability" + + regx='capa-(.*):[[:space:]]*true' + capflags=$(echo "$eeprom" | egrep "$regx" | sed -e 's/capa-//g' -e 's/: true//') + capflags=" ${capflags} " # add device tree overlays, if they exist. [[ -d /lib/dtoverlays ]] || return 1 @@ -83,15 +86,14 @@ setdevtree() { if [[ -d capability ]] ; then cd capability for d in * ; do - if [[ -f ${capd}/$d ]] ; then - if (($(cat ${capd}/$d) == 1)) ; then - echo "This device has capabilithy $d" - ( - cd $d - install_dtbo_dir - ) - fi # Install dtbo files for a capability - fi # Does a given capability flag exist in the mts-io platform + echo "We have found overlay capability directory $d" + if [[ ${capflags} =~ [[:space:]]${d}[[:space:]] ]] ; then + echo "This device has capabilithy $d so install the overlay" + ( + cd $d + install_dtbo_dir + ) + fi # Does a given capability flag exist in the EEPROM done # Loop over all capabilities for this machine and version overlays fi # Is there a capability directory to be installed? ) diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb b/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb index 09c8f4a..98fb5e4 100644 --- a/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb +++ b/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb @@ -24,7 +24,7 @@ COMPATIBLE_MACHINE = "(mtcap|mtrv1|mtcdt)" dt_dir = "/lib/dtoverlays" -PR = "r3" +PR = "r4" SRC_URI = " \ git://git.multitech.net/mt-dt-overlay.git;protocol=git \ -- cgit v1.2.3 From 374ba433f7573702ab3d58581ce62192a345fc90 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Fri, 4 Feb 2022 16:22:53 -0600 Subject: Add MTCDTIP case to call modprobe spidev in mts-io.init --- recipes-bsp/multitech/mts-io/mts-io.init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init index b62bcb1..f4bc6ed 100755 --- a/recipes-bsp/multitech/mts-io/mts-io.init +++ b/recipes-bsp/multitech/mts-io/mts-io.init @@ -209,11 +209,11 @@ read_card_info() { lora_hw=$(${SYSFS} show lora/hw-version 2> /dev/null) if [[ $hw_name == MTCDT3 ]] ; then - # SYM Link and spidev module is not needed in MTCDT3. + # spidev module is not needed in MTCDT3. return 0 fi - if [[ ${hw_name} == MTCAP ]] || [[ ${hw_name} == MTCDT ]]; then + if [[ ${hw_name} == MTCAP ]] || [[ ${hw_name} == MTCDT ]] || [[ ${hw_name} == MTCDTIP ]]; then modprobe spidev elif [[ ${hw_name} == MTCDTIPHP ]]; then modprobe spidev -- cgit v1.2.3