I want to change Jetson-Nano-emmc model pinmux R32.6.1

I want to change Jetson-Nano-emmc model pinmux,to enable audio-mclk and I2C1 I2C2 ,what need I to do?
the pin correspondence is :
AUDIO_MCLK—PIN211----GPIO3_PBB.00
I2C1_SCL-------PIN189----GPIO3_PJ.02
I2C1_SDA-------PIN191----GPIO3_PJ.03
I2C2_SCL-------PIN232----GPIO3_PF.00
I2C2_SDA-------PIN234----GPIO3_PF.01

hello CN_MKLS_YUAN,

here’re roughly steps to use pinmux spreadsheet for board configuration.

  1. download the pinmux spreadsheets to have customization, you should update [Customer Usage] fields and using the top-right button to create *.dtsi files.
  2. please include those *.dtsi file to L4T Driver Package (BSP) Sources, you should re-compile the kernel to generate *.dtb binary.
  3. please replace the DTB binary and re-flash the DTB partition, check Flashing a Specific Partition for sample command-line.
  4. please also refer to developer guide, Pinmux Changes for reference.

HI JerryChang
I followed the DOC and requested the following changes:
1,pinmux table



Then two files were generated, I replaced the files in the sources folder
tegra210-porg-gpio-p3448-0002-b00.dtsi (2.0 KB)
tegra210-porg-pinmux-p3448-0002-b00.dtsi (38.2 KB)

The path to the sources folder is :sources/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms

and then I make the dts and flash

on nano board I use’d the command :sudo grep “Name:|J:|BB:” /sys/kernel/debug/tegra_gpio
The response I received is Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
J: 2:1 f0 00 00 00 00 00 000000
BB: 6:3 01 00 00 00 00 00 000000
So what did I do wrong?

hello CN_MKLS_YUAN,

so, you would like to configure GPIO3_PJ.04, 05, 06, 07 to I2S.
please check [Table 17 Audio Pin Descriptions] in Jetson Nano Module Data Sheet. I2S0 pins on the SOM map to I2S4/DAP4 on the chip. you should also see the updates to change it from rsvd1 to i2s4b.

nvidia,function = "i2s4b";

it might be the issue that pinmux changes done in DTSI doesn’t take affect.
could you please also apply the changes as below. pinmux-config-p3450-porg.h
this should enable AUD_MCLK and I2S4 via 40 pin header.
for example,

diff --git a/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h b/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h
index 49df131..bd1bf08 100644
--- a/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h
+++ b/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h
@@ -52,10 +52,6 @@
 	GPIO_INIT(I,    0,   OUT0),
 	GPIO_INIT(I,    1,   OUT1),
 	GPIO_INIT(I,    2,   OUT0),
-	GPIO_INIT(J,    4,   IN),
-	GPIO_INIT(J,    5,   IN),
-	GPIO_INIT(J,    6,   IN),
-	GPIO_INIT(J,    7,   IN),
 	GPIO_INIT(S,    5,   IN),
 	GPIO_INIT(S,    7,   OUT0),
 	GPIO_INIT(T,    0,   OUT0),
@@ -70,7 +66,6 @@
 	GPIO_INIT(Z,    0,   IN),
 	GPIO_INIT(Z,    2,   IN),
 	GPIO_INIT(Z,    3,   OUT0),
-	GPIO_INIT(BB,   0,   IN),
 	GPIO_INIT(CC,   4,   IN),
 	GPIO_INIT(CC,   7,   OUT1),
 	GPIO_INIT(DD,   0,   IN),
@@ -148,6 +143,10 @@
 	PINCFG(GEN1_I2C_SCL_PJ1,     I2C1,       NORMAL, NORMAL,   INPUT,   DISABLE, HIGH),
 	PINCFG(GEN2_I2C_SCL_PJ2,     I2C2,       NORMAL, NORMAL,   INPUT,   DISABLE, HIGH),
 	PINCFG(GEN2_I2C_SDA_PJ3,     I2C2,       NORMAL, NORMAL,   INPUT,   DISABLE, HIGH),
+	PINCFG(DAP4_FS_PJ4,          I2S4B,      DOWN,   NORMAL,   INPUT,   DISABLE, DEFAULT),
+	PINCFG(DAP4_DIN_PJ5,         I2S4B,      DOWN,   NORMAL,   INPUT,   DISABLE, DEFAULT),
+	PINCFG(DAP4_DOUT_PJ6,        I2S4B,      DOWN,   NORMAL,   OUTPUT,  DISABLE, DEFAULT),
+	PINCFG(DAP4_SCLK_PJ7,        I2S4B,      DOWN,   NORMAL,   INPUT,   DISABLE, DEFAULT),
 	PINCFG(PK0,                  RSVD2,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(PK1,                  RSVD2,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(PK2,                  RSVD2,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
@@ -216,7 +215,7 @@
 	PINCFG(DAP2_SCLK_PAA1,       I2S2,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
 	PINCFG(DAP2_DIN_PAA2,        I2S2,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
 	PINCFG(DAP2_DOUT_PAA3,       I2S2,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
-	PINCFG(AUD_MCLK_PBB0,        DEFAULT,    UP,     NORMAL,   INPUT,   DISABLE, DEFAULT),
+	PINCFG(AUD_MCLK_PBB0,        AUD,        UP,     NORMAL,   OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(DVFS_PWM_PBB1,        CLDVFS,     NORMAL, TRISTATE, OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(DVFS_CLK_PBB2,        RSVD0,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(GPIO_X1_AUD_PBB3,     RSVD0,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),

Hi JerryChang
I did not find pinmux-config-p3450-porg.h in the sources folder. Where is this file stored?

may I know which JetPack release version you’re currently working on.

# R32 (release), REVISION: 6.1, GCID: 27863751, BOARD: t210ref, EABI: aarch64, DATE: Mon Jul 26 19:20:30 UTC 2021

Jetpack 4.6.2

hello CN_MKLS_YUAN,

it used to be u-boot to have this definition, but it’s now removed for the recently release.
could you please share the dtsi file you’re using for reference, thanks

Of course, the following is the dts I am using now, if you need others, please let me know
tegra210-p3448-0002-p3449-0000-b00.dts (3.6 KB)
tegra210-porg-gpio-p3448-0002-b00.dtsi (2.0 KB)
tegra210-porg-p3448-common.dtsi (21.8 KB)
tegra210-porg-pinmux-p3448-0002-b00.dtsi (38.2 KB)
tegra210-porg-plugin-manager.dtsi (5.2 KB)

In fact, I want to control the RT5640(ALC5640) audio chip through I2S0 and I2C1. I know that if you want to control the chip, you first need to modify pinmux and enable I2C1 and audio_mclk. I2S0 is enabled by default, but after consulting a lot of information, there is no A detailed description of how the jetson-nano-emmc module should enable audio_mclk and I2C1 in the jetpack4.6 version, so, does anyone have experience?

hello CN_MKLS_YUAN,

may I also know what’s your Nano’s SKU. is it A01 , A02, or B00 series?
it’s AUD_MCLK goes to 40-pin header, and, I2S3 goes to M.2.Key E.
but, there’s difference.

  • A01:
    • I2S1 goes to 40 Pin Header for Codec Playback/Capture.
  • A02:
  • B00:
    • I2S4 goes to 40 Pin Header for Codec Playback/Capture.

my nano model is b00 (jetson-nano-emmc)

please check Topic 181631 for reference, thanks

Hi:JerryChang
The method used by Topci 181631 is the method I used at the beginning. I have modified the device tree file and rewritten it into NANO, but I2S does not work. Therefore, for the jstson-nano-emmc module, Is there any other way to modify the pin configuration in Jstpack 4.6 version?

hello CN_MKLS_YUAN,

could you please access to developer guide, please check ASoC Driver for Jetson Products for reference,
please also check ASoC Machine Driver for the DT files to modify for audio codec integration on 40-pin header.

please check I2S Internal Loopback.
could you please also test with loopback mode, you may running with amixer for verification.
for example, amixer -c <cardname> cset name="I2S4 Loopback" "on"
thanks

JerryChang:
After I use the command, the feedback is this information:

mkls@mkls-desktop:~$ amixer -c tegrasndt210ref cset name=“I2S4 Loopback” “on”
numid=492,iface=MIXER,name=‘I2S4 Loopback’
; type=BOOLEAN,access=rw------,values=1
: values=on
and I use this command:sudo grep “Name:|J:|BB:” /sys/kernel/debug/tegra_gpio
Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
J: 2:1 00 00 00 00 00 00 000000
BB: 6:3 00 00 00 00 00 00 000000

the audio_mclk pin have 12.8M clock signal,now,what need i do to drive RT5640?