diff --git a/recipes-bsp/sob-odu/files/gsmk-owhw/gpio_usb2514 b/recipes-bsp/sob-odu/files/gsmk-owhw/gpio_usb2514 new file mode 100644 index 0000000..1d92c26 --- /dev/null +++ b/recipes-bsp/sob-odu/files/gsmk-owhw/gpio_usb2514 @@ -0,0 +1,75 @@ +#!/bin/sh + +SYSGPIO=/sys/class/gpio +DEVGPIO=/dev/gpio + +[ -d "$DEVGPIO " ] || mkdir "$DEVGPIO" + +export_gpio() +{ + NUM="$1" + DIR="$2" + + GPIOPATH="$SYSGPIO/gpio$NUM" + + [ -d "$GPIOPATH" ] || echo $1 > "$SYSGPIO/export" + echo $2 > "$GPIOPATH/direction" +} + +export_gpio_out() +{ + NUM="$1" + NAME="$2" + VAL="$3" + INV="$4" + + GPIOPATH="$SYSGPIO/gpio$NUM" + + export_gpio $NUM out + ln -sfn "$GPIOPATH" "$DEVGPIO/$NAME" + + if [ "x$INV" != "x" ]; then + echo 1 > "$GPIOPATH/active_low" + else + echo 0 > "$GPIOPATH/active_low" + fi + + echo $VAL > "$GPIOPATH/value" +} + +export_gpio_in() +{ + NUM="$1" + NAME="$2" + INV="$3" + + GPIOPATH="$SYSGPIO/gpio$NUM" + + export_gpio $NUM in + ln -sfn "$GPIOPATH" "$DEVGPIO/$NAME" + + if [ "x$INV" != "x" ]; then + echo 1 > "$GPIOPATH/active_low" + else + echo 0 > "$GPIOPATH/active_low" + fi +} + + +export_gpio_out 48 pse_i2c_buf_en 0 active_low +export_gpio_in 52 pse_int active_low +export_gpio_out 23 connect_st_usim1 0 +export_gpio_out 27 connect_st_usim2 0 +export_gpio_out 26 mdm1_rst 0 +export_gpio_out 59 mdm1_on 1 +export_gpio_out 58 mdm_ldo_en 1 +#export_gpio_in 57 button active_low +export_gpio_out 55 mdm2_rst 0 +#export_gpio_out 54 system_led active_low 1 +export_gpio_out 51 eeprom_wp 0 +export_gpio_out 50 mdm2_on 1 +export_gpio_out 113 simtrace_erase 0 +export_gpio_out 115 simtrace_bootloader 0 +export_gpio_out 114 simtrace_reset 0 +export_gpio_in 104 acc_int active_low +export_gpio_out 62 hub_reset active_low 1 diff --git a/recipes-bsp/sob-odu/files/usb2514.c b/recipes-bsp/sob-odu/files/usb2514.c index d096323..7d06cb0 100644 --- a/recipes-bsp/sob-odu/files/usb2514.c +++ b/recipes-bsp/sob-odu/files/usb2514.c @@ -117,8 +117,8 @@ static const struct usb2514_board owhw_boards[] = { .i2c_addr = 0x2C, .board_version_op = EQUAL, .ports_swap = 0x10, /* swap only DN4 */ - .reset_gpio_path = "/sys/devices/platform/sob-odu.0/gpio_hub_reset/value", - .reset_low_active = 1, + .reset_gpio_path = "/dev/gpio/hub_reset/value", + .reset_low_active = 0, }, };