Thanks Wayne and sorry but I got caught up in the bush fires here in Oz.
For the GPIO stuff I am ok with for now. It happened to be a bad script that was not unexporting the GPIO when an error occurred.
So back to the PinMux. It seems that whatever I do, the pinmux registers are not written to. The GPIO_CNF registers for port c still have values for Gpio and not sfio as per my debug output below.
Below are my DTS entries. I am thinking that since R32.3.1 that maybe the pinmux registers are not set by the DTB file when the module boots. Maybe we are being forced to do it via an overlay DTBO file in the /boot directory. I guess that is the real question here, can we set custom pinmux values the main DTB file, or do we need to do it in the overlay???
I have not tried the Jetson-io tool because I am not using devkit but my own custom carrier board and so the jetson-io tool has all sorts of drama because of naming etc. I do not want to use the jetson-io tool. I want this done on the host side and not the target.
pinmux@700008d4 {
spi1_mosi_pc0 {
nvidia,pins = "spi1_mosi_pc0";
nvidia,function = "spi1";
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
spi1_miso_pc1 {
nvidia,pins = "spi1_miso_pc1";
nvidia,function = "spi1";
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
spi1_sck_pc2 {
nvidia,pins = "spi1_sck_pc2";
nvidia,function = "spi1";
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
spi1_cs0_pc3 {
nvidia,pins = "spi1_cs0_pc3";
nvidia,function = "spi1";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
};
Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
A: 0:0 64 40 40 24 00 00 000000
B: 0:1 f0 50 00 20 00 00 000000
C: 0:2 1f 00 00 18 00 00 000000
D: 0:3 00 00 00 00 00 00 000000
E: 1:0 40 40 00 00 00 00 000000
F: 1:1 00 00 00 00 00 00 000000
G: 1:2 0c 04 04 04 00 00 000000
H: 1:3 fd 99 00 60 00 00 000000
I: 2:0 07 07 03 00 00 00 000000
J: 2:1 f0 00 00 00 00 00 000000
K: 2:2 00 00 00 00 00 00 000000
L: 2:3 00 00 00 00 00 00 000000
M: 3:0 00 00 00 00 00 00 000000
N: 3:1 00 00 00 00 00 00 000000
O: 3:2 00 00 00 00 00 00 000000
P: 3:3 00 00 00 00 00 00 000000
Q: 4:0 00 00 00 00 00 00 000000
R: 4:1 00 00 00 00 00 00 000000
S: 4:2 a0 a0 00 00 00 00 000000
T: 4:3 01 01 01 00 00 00 000000
U: 5:0 00 00 00 00 00 00 000000
V: 5:1 03 01 01 03 00 00 000000
W: 5:2 00 00 00 00 00 00 000000
X: 5:3 78 08 08 30 00 60 606000
Y: 6:0 06 00 00 06 00 00 000000
Z: 6:1 0f 09 00 00 00 04 000400
AA: 6:2 00 00 00 00 00 00 000000
BB: 6:3 01 00 00 01 00 00 000000
CC: 7:0 92 80 80 10 00 12 121200
DD: 7:1 01 00 00 00 00 00 000000
EE: 7:2 00 00 00 00 00 00 000000
FF: 7:3 00 00 00 00 00 00 000000
Thanks.