ORIN NX GP_PWM7 throwing dmesg Error

Hi,

When bringing up the Orin-NX on a custom carrier, GPIO07 Pin 206 (PWM_7) has been throwing the following dmesg error when attempting to enable (I receive no output):
[ 831.552390] CPU:0, Error: cbb-fabric@0x13a00000, irq=24
[ 831.557787] **************************************
[ 831.562717] CPU:0, Error:cbb-fabric, Errmon:2
[ 831.567206] Error Code : FIREWALL_ERR

[ 831.572872] Error Code : FIREWALL_ERR
[ 831.576999] MASTER_ID : CCPLEX
[ 831.580499] Address : 0x32e0000
[ 831.584090] Cache : 0x1 – Bufferable
[ 831.588390] Protection : 0x2 – Unprivileged, Non-Secure, Data Access
[ 831.595377] Access_Type : Write
[ 831.598963] Access_ID : 0x2
[ 831.598966] Fabric : cbb-fabric
[ 831.605774] Slave_Id : 0x35
[ 831.609007] Burst_length : 0x0
[ 831.612499] Burst_type : 0x1
[ 831.615817] Beat_size : 0x2
[ 831.619045] VQC : 0x0
[ 831.621831] GRPSEC : 0x7e
[ 831.624883] FALCONSEC : 0x0
[ 831.628117] **************************************
[ 831.633152] ------------[ cut here ]------------
[ 831.633167] WARNING: CPU: 0 PID: 0 at drivers/soc/tegra/cbb/tegra234-cbb.c:577 tegra234_cbb_isr+0x130/0x170
[ 831.643195] Modules linked in: nvidia_modeset(OE) fuse lzo_rle lzo_compress zram ramoops reed_solomon loop nvgpu aes_ce_blk crypto_simd cryptd r8168 aes_ce_cipher ghash_ce sha2_ce sha256_arm64 sha1_ce pwm_fan nct1008 ina3221 tegra_bpmp_thermal r8169 spi_tegra114 realtek nvidia(OE) binfmt_misc nvmap ip_tables x_tables [last unloaded: mtd]
[ 831.643281] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G OE 5.10.104-tegra #1
[ 831.643284] Hardware name: Unknown NVIDIA Orin NX/NVIDIA Orin NX, BIOS 2.1-32413640 01/24/2023
[ 831.643290] pstate: 60400089 (nZCv daIf +PAN -UAO -TCO BTYPE=–)
[ 831.643294] pc : tegra234_cbb_isr+0x130/0x170
[ 831.643298] lr : tegra234_cbb_isr+0x10c/0x170
[ 831.643300] sp : ffff800010003e10
[ 831.643303] x29: ffff800010003e10 x28: ffffa4a3d6ca2680
[ 831.643309] x27: 0000000000000001 x26: 0000000000000080
[ 831.643315] x25: ffffa4a3d66a9d88 x24: ffffa4a3d700ce18
[ 831.643321] x23: ffffa4a3d6997000 x22: 0000000000000018
[ 831.643327] x21: ffffa4a3d6e2ec70 x20: 0000000000000002
[ 831.643332] x19: ffffa4a3d6e2ec60 x18: 0000000000000010
[ 831.643337] x17: 0000000000000000 x16: ffffa4a3d4fe2d90
[ 831.643343] x15: ffffa4a3d6ca2bf0 x14: ffffffffffffffff
[ 831.643348] x13: ffff800090003917 x12: ffff80001000391f
[ 831.643353] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f
[ 831.643359] x9 : ffff800010003c30 x8 : 2a2a2a2a2a2a2a2a
[ 831.643364] x7 : 2a2a2a2a2a2a2a09 x6 : c0000000ffffefff
[ 831.643370] x5 : ffff21b42ed21958 x4 : ffffa4a3d6cb7968
[ 831.643375] x3 : 0000000000000001 x2 : ffffa4a3d5177460
[ 831.643381] x1 : ffffa4a3d6ca2680 x0 : 0000000100010001
[ 831.643387] Call trace:
[ 831.643392] tegra234_cbb_isr+0x130/0x170
[ 831.643401] __handle_irq_event_percpu+0x60/0x2a0
[ 831.643406] handle_irq_event_percpu+0x3c/0xa0
[ 831.643412] handle_irq_event+0x4c/0xf0
[ 831.643416] handle_fasteoi_irq+0xbc/0x170
[ 831.643421] generic_handle_irq+0x3c/0x60
[ 831.643426] __handle_domain_irq+0x6c/0xc0
[ 831.643431] gic_handle_irq+0x64/0x130
[ 831.643435] el1_irq+0xd0/0x180
[ 831.643443] cpuidle_enter_state+0xb4/0x400
[ 831.643447] cpuidle_enter+0x3c/0x50
[ 831.643452] call_cpuidle+0x40/0x70
[ 831.643455] do_idle+0x1fc/0x260
[ 831.643459] cpu_startup_entry+0x2c/0x70
[ 831.643465] rest_init+0xd8/0xe4
[ 831.643472] arch_call_rest_init+0x14/0x1c
[ 831.643476] start_kernel+0x50c/0x540
[ 831.643479] —[ end trace dbd0cf984fc51040 ]—
[ 831.648941] CPU:0, Error: cbb-fabric@0x13a00000, irq=24
[ 831.654310] **************************************
[ 831.659228] CPU:0, Error:cbb-fabric, Errmon:2
[ 831.663698] Error Code : FIREWALL_ERR
[ 831.667810] Overflow : Multiple FIREWALL_ERR

[ 831.674080] Error Code : FIREWALL_ERR
[ 831.678193] MASTER_ID : CCPLEX
[ 831.681682] Address : 0x32e0000
[ 831.685263] Cache : 0x1 – Bufferable
[ 831.689551] Protection : 0x2 – Unprivileged, Non-Secure, Data Access
[ 831.696526] Access_Type : Read
[ 831.700015] Access_ID : 0x16
[ 831.700016] Fabric : cbb-fabric
[ 831.706911] Slave_Id : 0x35
[ 831.710131] Burst_length : 0x0
[ 831.713618] Burst_type : 0x1
[ 831.716931] Beat_size : 0x2
[ 831.720150] VQC : 0x0
[ 831.722932] GRPSEC : 0x7e
[ 831.725980] FALCONSEC : 0x0
[ 831.729199] **************************************
[ 831.734222] ------------[ cut here ]------------
[ 831.734229] WARNING: CPU: 0 PID: 2433 at drivers/soc/tegra/cbb/tegra234-cbb.c:577 tegra234_cbb_isr+0x130/0x170
[ 831.744518] Modules linked in: nvidia_modeset(OE) fuse lzo_rle lzo_compress zram ramoops reed_solomon loop nvgpu aes_ce_blk crypto_simd cryptd r8168 aes_ce_cipher ghash_ce sha2_ce sha256_arm64 sha1_ce pwm_fan nct1008 ina3221 tegra_bpmp_thermal r8169 spi_tegra114 realtek nvidia(OE) binfmt_misc nvmap ip_tables x_tables [last unloaded: mtd]
[ 831.744558] CPU: 0 PID: 2433 Comm: dmesg Tainted: G W OE 5.10.104-tegra #1
[ 831.744559] Hardware name: Unknown NVIDIA Orin NX/NVIDIA Orin NX, BIOS 2.1-32413640 01/24/2023
[ 831.744561] pstate: 60400089 (nZCv daIf +PAN -UAO -TCO BTYPE=–)
[ 831.744563] pc : tegra234_cbb_isr+0x130/0x170
[ 831.744564] lr : tegra234_cbb_isr+0x10c/0x170
[ 831.744565] sp : ffff800010003e10
[ 831.744567] x29: ffff800010003e10 x28: ffff21b1329bd700
[ 831.744569] x27: 0000000000000001 x26: 0000000000000080
[ 831.744572] x25: ffffa4a3d66a9d88 x24: ffffa4a3d700ce18
[ 831.744574] x23: ffffa4a3d6997000 x22: 0000000000000018
[ 831.744576] x21: ffffa4a3d6e2ec70 x20: 0000000000000002
[ 831.744579] x19: ffffa4a3d6e2ec60 x18: 0000000000000010
[ 831.744581] x17: 0000000000000000 x16: ffffa4a3d4fe2d90
[ 831.744584] x15: ffff21b1329bdc70 x14: ffffffffffffffff
[ 831.744586] x13: ffff800090003917 x12: ffff80001000391f
[ 831.744589] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f
[ 831.744591] x9 : ffff800010003c30 x8 : 2a2a2a2a2a2a2a2a
[ 831.744594] x7 : 2a2a2a2a2a2a2a09 x6 : c0000000ffffefff
[ 831.744596] x5 : ffff21b42ed21958 x4 : ffffa4a3d6cb7968
[ 831.744599] x3 : 0000000000000001 x2 : ffffa4a3d5177460
[ 831.744601] x1 : ffff21b1329bd700 x0 : 0000000100010001
[ 831.744604] Call trace:
[ 831.744605] tegra234_cbb_isr+0x130/0x170
[ 831.744610] __handle_irq_event_percpu+0x60/0x2a0
[ 831.744613] handle_irq_event_percpu+0x3c/0xa0
[ 831.744615] handle_irq_event+0x4c/0xf0
[ 831.744617] handle_fasteoi_irq+0xbc/0x170
[ 831.744619] generic_handle_irq+0x3c/0x60
[ 831.744621] __handle_domain_irq+0x6c/0xc0
[ 831.744624] gic_handle_irq+0x64/0x130
[ 831.744625] el1_irq+0xd0/0x180
[ 831.744629] _raw_spin_unlock_irqrestore+0x34/0x70
[ 831.744632] pty_write+0x84/0xb0
[ 831.744634] n_tty_write+0x120/0x470
[ 831.744637] file_tty_write.isra.0+0x13c/0x280
[ 831.744639] tty_write+0x28/0x40
[ 831.744642] new_sync_write+0xf8/0x1a0
[ 831.744644] vfs_write+0x254/0x390
[ 831.744645] ksys_write+0x78/0x100
[ 831.744647] __arm64_sys_write+0x24/0x30
[ 831.744650] el0_svc_common.constprop.0+0x7c/0x1c0
[ 831.744652] do_el0_svc+0x34/0xa0
[ 831.744654] el0_svc+0x1c/0x30
[ 831.744656] el0_sync_handler+0xa8/0xb0
[ 831.744658] el0_sync+0x16c/0x180
[ 831.744659] —[ end trace dbd0cf984fc51041 ]—

Tegra_pwm7 address:
image

My dtb PWM entry:
image

My decompiled device tree:
image

My pinmux dts entry:

soc_gpio19_pg6 setting during runtime from /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups:
image

My pwm procedure:
Finding pwmchip based off of address…

Finding pwmchip based on GP_PWM# (hw-instance-id+1)

Procedure for setting/enabling GP_PWM7 at 50% duty cycle:

Note that I have already implemented a PWM at GPIO12 (pin218) (GP_PWM1) using the parameters in my pinmux dts, and board dts and that PWM is working fine.

Note that I can still control this pin as a gpio at runtime.

Do you know what is going on, or how I should proceed?

Thanks,

Matt

hello mfischer,

this is known issue for Orin NX, which has no read/write permission in CCPLEX so cannot control PWM7.
could you please moving to Jetpack-5.1/l4t-r35.2.1 release version.
please modify device tree to enable pwm7 node since it’s default mark as disabled.

+++ b/cvb/tegra234-p3768-0000-a0.dtsi
@@ -253,6 +253,10 @@
                status = "disabled";
        };
 
+       pwm@32e0000 {/* PWM7 - 40pin header, pin 32 */
+               status = "okay";
+       };
+

and…
please modify firewall config, tegra234-mb2-bct-scr-p3767-0000.dts for adding below.
you’ll need to re-flash the target to apply those settings.

diff --git a/firewall/tegra234-mb2-bct-scr-p3767-0000.dts b/firewall/tegra234-mb2-bct-scr-p3767-0000.dts
index 247c821..921b09e 100644
--- a/firewall/tegra234-mb2-bct-scr-p3767-0000.dts
+++ b/firewall/tegra234-mb2-bct-scr-p3767-0000.dts
@@ -2540,6 +2540,17 @@
             exclusion-info = <0>;
             value = <0x80030000>;
         };
+
+        reg@5126 { /* CBB_CENTRAL_CBB_FIREWALL_PWM7_BLF, READ_CTL */
+            exclusion-info = <2>;
+            value = <0x0010000a>;
+        };
+
+        reg@5127 { /* CBB_CENTRAL_CBB_FIREWALL_PWM7_BLF, WRITE_CTL */
+            exclusion-info = <2>;
+            value = <0x0010000a>;
+        };
+
         /* ARF Section */
         reg@5837 { /* FSI_FABRIC, FSI_CHSM_CPU_T_FIREWALL_ARF_0, ARF_SIZE */
1 Like

Hi Jerry,

Thanks alot,

This worked!

-Matt

FYI, you may see-also Jetson Software Roadmap for 2023
we’re now having code review process. this fix did not catch the release plan, please expect next public release (i.e. Jetpack-5.1.1) might having the same issue.

hence,
please refer to comment #3 to update these files to enable pwm7 node in the kernel and give CCPLEX access to pwm7 registers to enable pwm7.

2 Likes

Thanks for the info

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.