GPIO configuration error on J106 board

I wanna control the six cameras using J106 carrier board.And I followed the steps in the wiki http://developer.ridgerun.com/wiki/index.php?title=Getting_started_guide_for_Auvidea_J106_board
the frist step:

GPIO = 148
DIRECTION = out
VALUE = 1
sudo su
echo $GPIO > /sys/class/gpio/export
echo DIRECTION > /sys/class/gpio/gpio$GPIO/direction
echo VALUE > /sys/class/gpio/gpio$GPIO/value

But when I run echo 148 > /sys/class/gpio/export, I got the error :echo:write error: Invalid argument.
Does anyone konw what’s the matter? I wonder if the GPIO number is 148 on TX2,because the wiki is for TX1.
Regards.

hello BradleyY,

please refer to below code to know the GPIO numbers for TX2,
r28.1_sources/kernel/t18x/drivers/pinctrl/pinctrl-tegra186.c

Hi JerryChang
Thanks for your reply. Do you know the path of the file which describes the GPIO numbers for TX1?

here you are, r28.1_sources/kernel/kernel-4.4/drivers/pinctrl/pinctrl-tegra210.c

I find in TX1 pinctrl file the GPIO148 is defind:

#define TEGRA_PIN_CAM_RST_PS4 _GPIO(148)

In TX2 pinctrl file:

#define TEGRA_PIN_VCOMP_ALERT_PS4 _GPIO(148)

I didn’t find the defination which contained the key word CAM_RST in TX2 pinctrl file.So I wonder if there is no need to do the step 1 in the wiki http://developer.ridgerun.com/wiki/index.php?title=Getting_started_guide_for_Auvidea_J106_board So I go to the next step:run the command

sudo i2cdetect -y -r 0

I get:

0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: UU UU -- -- -- -- -- -- 48 -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- —

As the wiki says ,I should detected the address 0x64 or 0x12,because I use the raspberry pi camera v2.1.
So I wonder if there is no need to do the configuration for TX2 GPIO.If the configuration is needed ,which pin should I run echo command ?
Or is there some configurations I havn’t done for using the camera on J106 board on TX2?
Thanks.