Hi, thank you for your time.
This are the changes that I did to the spreadsheet (yellows are working fine, greens are not working).
After this, I create the dtsi files, and the .cfg file. With the cfg file I get some errors (the ones that concern me are those related to gpio_wanX):
Some forums says, It is due to the --mandatory_pinmux_file mandatory_pinmux.txt
.
python pinmux-dts2cfg.py --pinmux addr_info.txt gpio_addr_info.txt por_val.txt --mandatory_pinmux_file mandatory_pinmux.txt \
> <my_path>/tegra18x-jetson-tx2-config-template-pinmux.dtsi \
> <my_path>/tegra18x-jetson-tx2-config-template-gpio-default.dtsi 1.0 \
> > <my_path>/tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg
ERROR: pin dap2_sclk_pc1(0x00000440) field nvidia,enable-input(0x00000040) is not matching, val = 0x01 expected = 0x00
ERROR: pin dap2_fs_pc4(0x00000440) field nvidia,enable-input(0x00000040) is not matching, val = 0x01 expected = 0x00
ERROR: pin dmic1_clk_pm1(0x00004441) field nvidia,enable-input(0x00000040) is not matching, val = 0x01 expected = 0x00
ERROR: pin dmic2_dat_pm2(0x00004441) field nvidia,enable-input(0x00000040) is not matching, val = 0x01 expected = 0x00
ERROR: pin dap4_sclk_pcc0(0x00004440) field nvidia,enable-input(0x00000040) is not matching, val = 0x01 expected = 0x00
ERROR: pin dap4_fs_pcc3(0x00004440) field nvidia,enable-input(0x00000040) is not matching, val = 0x01 expected = 0x00
ERROR: pin sdmmc4_dqs(0x00000444) field nvidia,tristate(0x00000010) is not matching, val = 0x00 expected = 0x01
ERROR: pin gpio_wan5_ph0(0x00000456) field nvidia,tristate(0x00000010) is not matching, val = 0x01 expected = 0x00
ERROR: pin gpio_wan5_ph0(0x00000456) field nvidia,enable-input(0x00000040) is not matching, val = 0x01 expected = 0x00
ERROR: pin gpio_wan6_ph1(0x00000402) field nvidia,tristate(0x00000010) is not matching, val = 0x00 expected = 0x01
ERROR: pin gpio_wan6_ph1(0x00000402) field nvidia,enable-input(0x00000040) is not matching, val = 0x00 expected = 0x01
The cfg file has the addrs/values:
...
pinmux.0x0243d018 = 0x00000456; # gpio_wan5_ph0: spi1, pull-down, tristate-enable, input-enable, lpdr-disable
pinmux.0x0243d010 = 0x00000402; # gpio_wan6_ph1: spi1, tristate-disable, input-disable, lpdr-disable
pinmux.0x0243d008 = 0x00000402; # gpio_wan7_ph2: spi1, tristate-disable, input-disable, lpdr-disable
pinmux.0x0243d000 = 0x0000040a; # gpio_wan8_ph3: spi1, pull-up, tristate-disable, input-disable, lpdr-disable
...
pinmux.0x02430038 = 0x00000056; # gpio_cam4_pn3: rsvd2, pull-down, tristate-enable, input-enable, lpdr-disable
pinmux.0x02430040 = 0x00000002; # gpio_cam5_pn4: rsvd2, tristate-disable, input-disable, lpdr-disable
pinmux.0x02430048 = 0x00000002; # gpio_cam6_pn5: rsvd2, tristate-disable, input-disable, lpdr-disable
pinmux.0x02430050 = 0x00000058; # gpio_cam7_pn6: rsvd0, pull-up, tristate-enable, input-enable, lpdr-disable
All the values in the gpio_wan
pins are similar that the gpio_cam
, but with an ‘4’ prepended (I am doing some research to check what that means).
The values with the devmem2, looks consistent with this file.
$ sudo ./read_pimux.sh
**********************************************************************
============================== 0x0243d018 : gpio_wan5 : H14
/dev/mem opened.
Memory mapped at address 0x7fa9ac3000.
Value at address 0x243D018 (0x7fa9ac3018): 0x456
============================== 0x0243d010 : gpio_wan6 : H15
/dev/mem opened.
Memory mapped at address 0x7f94942000.
Value at address 0x243D010 (0x7f94942010): 0x402
============================== 0x0243d008 : gpio_wan7 : G15
/dev/mem opened.
Memory mapped at address 0x7fa0b4b000.
Value at address 0x243D008 (0x7fa0b4b008): 0x402
============================== 0x0243d000 : gpio_wan8 : G16
/dev/mem opened.
Memory mapped at address 0x7f86d9e000.
Value at address 0x243D000 (0x7f86d9e000): 0x40A
**********************************************************************
============================== 0x02430038 : gpio_cam4 : G13
/dev/mem opened.
Memory mapped at address 0x7fa3a41000.
Value at address 0x2430038 (0x7fa3a41038): 0x56
============================== 0x02430040 : gpio_cam5 : F14
/dev/mem opened.
Memory mapped at address 0x7f92c82000.
Value at address 0x2430040 (0x7f92c82040): 0x2
============================== 0x02430048 : gpio_cam6 : F13
/dev/mem opened.
Memory mapped at address 0x7fb5083000.
Value at address 0x2430048 (0x7fb5083048): 0x2
============================== 0x02430050 : gpio_cam7 : E14
/dev/mem opened.
Memory mapped at address 0x7f9b0f8000.
Value at address 0x2430050 (0x7f9b0f8050): 0x58
But, the directions/values
echo direction: `cat /sys/class/gpio/gpioXXX/direction`
echo value : `cat /sys/class/gpio/gpioXXX/value`
Only works for the gpio_camX
pins, and the gpio_wanX pins seems to ignore the cfg direction/values.
$ sudo ./read_val.sh
**********************************************************************
====================================
376: gpio_wan5 : H14 : SPI2_CLK
direction: in
value : 0
====================================
377: gpio_wan6 : H15 : SPI2_MISO
direction: in
value : 0
====================================
378: gpio_wan7 : G15 : SPI2_MOSI
direction: in
value : 0
====================================
379: gpio_wan8: G16 : SPI2_CS0#
direction: in
value : 0
**********************************************************************
====================================
427: gpio_cam4 : G13 : SPI1_CLK
direction: in
value : 0
====================================
428: gpio_cam5 : F14 : SPI1_MISO
direction: out
value : 1
====================================
429: gpio_cam6 : F13 : SPI1_MOSI
direction: out
value : 1
====================================
430: gpio_cam7 : E14 : SPI1_CS0#
direction: in
value : 0
What can I do to work with the gpio_wan pins?
Can you give me some adavice?
Please.
Thank you very much, I appreciate your time.