From 11136c6222e6095a123e1e7ae0949d0ca3612b17 Mon Sep 17 00:00:00 2001 From: Markus Gothe <markus.gothe@genexis.eu> Date: Tue, 4 May 2021 14:33:26 +0200 Subject: [PATCH] Use sysfs GPIO API instead of 'brcm_fw_tool'. 'brcm_fw_tool' cannot be used for controlling GPIOs in IOP6. In IOP5 we used 'brcm_fw_tool' to setup the GPIOs for the laser interfaces on the Panther platform. Because of this the Panther hardware doesn't get a fiber uplink in IOP6. --- .../panther/base-files/etc/init.d/hw_setup | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/iopsys-brcm63xx-arm/panther/base-files/etc/init.d/hw_setup b/iopsys-brcm63xx-arm/panther/base-files/etc/init.d/hw_setup index c75a7184d..3e0a3689b 100755 --- a/iopsys-brcm63xx-arm/panther/base-files/etc/init.d/hw_setup +++ b/iopsys-brcm63xx-arm/panther/base-files/etc/init.d/hw_setup @@ -7,11 +7,15 @@ boot() { # set static gpios # one for gpio in $(db -q get hw.board.gpio_one); do - brcm_fw_tool set -x $gpio -p 1 >/dev/null + echo "$gpio" > "/sys/class/gpio/export" + echo out > "/sys/class/gpio/gpio${gpio}/direction" + echo 1 > "/sys/class/gpio/gpio${gpio}/value" done # zero for gpio in $(db -q get hw.board.gpio_zero); do - brcm_fw_tool set -x $gpio -p 0 >/dev/null + echo "$gpio" > "/sys/class/gpio/export" + echo out > "/sys/class/gpio/gpio${gpio}/direction" + echo 0 > "/sys/class/gpio/gpio${gpio}/value" done } -- GitLab