Skip to content

Commit

Permalink
JetHome: Update JetHub family
Browse files Browse the repository at this point in the history
Signed-off-by: Viacheslav Bocharov <[email protected]>
  • Loading branch information
adeepn authored and igorpecovnik committed Jul 3, 2024
1 parent b63446e commit 654d208
Show file tree
Hide file tree
Showing 17 changed files with 1,040 additions and 916 deletions.
10 changes: 10 additions & 0 deletions config/boards/jethubj200.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Amlogic S905X3 quad core 4GB RAM SoC eMMC GBE USB2 SPI-NOR
BOARD_NAME="JetHub D2"
BOARDFAMILY="jethub"
BOARD_MAINTAINER="adeepn"
BOOTCONFIG="jethub_j200_defconfig"
KERNEL_TARGET="current,edge"
MODULES_BLACKLIST="simpledrm" # SimpleDRM conflicts with Panfrost
FULL_DESKTOP="yes"
SERIALCON="ttyAML0"
#BOOT_LOGO="desktop"
20 changes: 0 additions & 20 deletions config/boards/jethubj200.wip

This file was deleted.

4 changes: 2 additions & 2 deletions config/sources/families/jethub.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ elif [[ "$BOARD" == "jethubj200" ]]; then
ASOUND_STATE="${ASOUND_STATE:-"asound.state.meson64"}"
CPUMIN=667000
CPUMAX=2100000
BOOTBRANCH="tag:v2024.01"
BOOTPATCHDIR="v2024.01"
BOOTBRANCH="tag:v2024.07"
BOOTPATCHDIR="v2024.07"
fi

########
Expand Down
6 changes: 3 additions & 3 deletions packages/bsp/jethub/jethub-init
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ unexport_sysfs()
{
for i in /sys/class/gpio/gpio* ; do
if ! echo "$i" | grep -q chip ; then
ii=$(echo "${i##*/}"| tr -d -c 0-9)
echo "$ii" > /sys/class/gpio/unexport
fi
ii=$(echo "${i##*/}"| tr -d -c 0-9)
echo "$ii" > /sys/class/gpio/unexport
fi
done
}

Expand Down
1 change: 1 addition & 0 deletions packages/bsp/jethub/jethub_get_cmdline_arg.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <fstream>
#include <vector>
#include <tuple>
#include <cstdint>

std::string loadFileAsLine(const std::string& path) {
std::string result;
Expand Down
46 changes: 40 additions & 6 deletions packages/bsp/jethub/jethubj200/libjethubconfig.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
#!/bin/bash
# shellcheck disable=SC2034

#TODO: empty now

GPIOCHIPNUMBER=0

GPIO_DIRECTION_OUTPUT=0
GPIO_DIRECTION_INPUT=1

GPIO_ACTIVE_LOW=0
GPIO_ACTIVE_HIGH=1

GPIOS=(
# Discrete inputs: 1, 2, 3
"2 8 ${GPIO_DIRECTION_INPUT} ${GPIO_ACTIVE_HIGH}"
"2 9 ${GPIO_DIRECTION_INPUT} ${GPIO_ACTIVE_HIGH}"
"2 10 ${GPIO_DIRECTION_INPUT} ${GPIO_ACTIVE_HIGH}"
# Relays: 1, 2
"2 0 ${GPIO_DIRECTION_OUTPUT} ${GPIO_ACTIVE_HIGH}"
"2 1 ${GPIO_DIRECTION_OUTPUT} ${GPIO_ACTIVE_HIGH}"
# UXM1 module: RESET, BOOT
"2 4 ${GPIO_DIRECTION_OUTPUT} ${GPIO_ACTIVE_HIGH}"
"2 5 ${GPIO_DIRECTION_OUTPUT} ${GPIO_ACTIVE_HIGH}"
# UXM2 module: RESET, BOOT
"2 6 ${GPIO_DIRECTION_OUTPUT} ${GPIO_ACTIVE_HIGH}"
"2 7 ${GPIO_DIRECTION_OUTPUT} ${GPIO_ACTIVE_HIGH}"
# Button
"1 10 ${GPIO_DIRECTION_INPUT} ${GPIO_ACTIVE_LOW}"
)


Expand All @@ -20,5 +31,28 @@ LEDS=(
)



ADDITIONALFUNC=""
reset_uxm1() {
echo "${0}: Reset UXM1 module ..."
gpio_set 2 5 1 ${GPIO_ACTIVE_HIGH}
gpio_set 2 6 1 ${GPIO_ACTIVE_HIGH}
sleep 1
gpio_set 2 6 0 ${GPIO_ACTIVE_HIGH}
}

reset_uxm2() {
echo "${0}: Reset UXM2 module ..."
gpio_set 2 7 1 ${GPIO_ACTIVE_HIGH}
gpio_set 2 6 1 ${GPIO_ACTIVE_HIGH}
sleep 1
gpio_set 2 6 0 ${GPIO_ACTIVE_HIGH}
}

config_1wire() {
echo "${0}: Configure 1-Wire ..."
if ! modprobe ds2482; then
echo "${0}: *** Error: Failed to load DS2482 kernel module"
exit 1
fi
}

ADDITIONALFUNC="reset_uxm1 reset_uxm2 config_1wire"
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ index c2d22b00c1cd..6a5664d908d5 100644
+&i2c_AO {
+ /* EEPROM on base board */
+ eeprompd: eeprom@56 {
+ compatible = "atmel,24c64";
+ reg = <0x56>;
+ pagesize = <0x20>;
+ compatible = "atmel,24c64";
+ reg = <0x56>;
+ pagesize = <0x20>;
+ label = "eeprompd";
+ address-width = <0x10>;
+ vcc-supply = <&vddao_3v3>;
+ };
+ vcc-supply = <&vddao_3v3>;
+ };
+};
--
2.34.1
Expand Down
Loading

0 comments on commit 654d208

Please sign in to comment.