Hi , Now I’m trying to use GPIO of the gpio_can_stb but I don’t verfiy gpio_can_stb .
And I checked pin map in this link NVIDIA Jetson TX2 J21 Header Pinout - JetsonHacks
and, pinctrl driver is checking.
/kernel/kernel-4.4/drivers/pinctrl/pinctrl-tegra20.c
/kernel/kernel-4.4/drivers/pinctrl/pinctrl-tegra210.c
/kernel/kernel-4.4/drivers/pinctrl/pinctrl-tegra30.c
why gpio_can_stb is not verified???
I did fallowing things.
/***********************************************************************************
root@tegra-ubuntu: cd /sys/class/gpio/
root@tegra-ubuntu: /sys/class/gpio/echo 40 > export
bash:echo :write error : Invalid arqument
***********************************************************************************/
#define TEGRA_AON_GPIO_PORT_AA 5
mttcan@c310000
gpio_can_stb = <&tegra_aon_gpio TEGRA_AON_GPIO(AA, 0) GPIO_ACTIVE_HIGH>;
gpio_can_stb = 5x8 + 0 = 40
mttcan@c320000
gpio_can_stb = <&tegra_aon_gpio TEGRA_AON_GPIO(AA, 6) GPIO_ACTIVE_HIGH>;
gpio_can_stb = 5x8 + 6 = 46
mttcan@c310000 {
status = “okay”;
gpio_can_stb = <&tegra_aon_gpio TEGRA_AON_GPIO(AA, 0) GPIO_ACTIVE_HIGH>;
gpio_can_en = <&tegra_aon_gpio TEGRA_AON_GPIO(AA, 1) GPIO_ACTIVE_HIGH>;
mram-params = <0 16 16 8 8 8 16 16 16>;
tx-config = <8 8 0 64>;
rx-config = <64 64 64>;
};
mttcan@c320000 {
status = "okay";
gpio_can_stb = <&tegra_aon_gpio TEGRA_AON_GPIO(AA, 6) GPIO_ACTIVE_HIGH>;
gpio_can_en = <&tegra_aon_gpio TEGRA_AON_GPIO(AA, 7) GPIO_ACTIVE_HIGH>;
mram-params = <0 16 16 8 8 8 16 16 16>;
tx-config = <8 8 0 64>;
rx-config = <64 64 64>;
};