Writing to peripheral register from uboot using 'mw' command fails in TX2

[i][i]Hi,

I was trying to configure several setting from uboot by writing directly to registers
from uboot(from L4T 27.1) using mw command in Jetson TX2.

Write did not give any error prints, but read back shows some invalid value.[/i]

The below logs shows, how I tried to write to a padctrl register after a coldboot from uboot.[/i]

Tegra186 (P2771-0000-500) # md.l 0x3520084 1
03520084: dead1009 …
Tegra186 (P2771-0000-500) # mw.l 0x3520084 0x0 0x1
Tegra186 (P2771-0000-500) # md.l 0x3520084 1
03520084: dead1009 …
Tegra186 (P2771-0000-500) #

[i]I was getting same result after writing to SPI and I2C (0x3190004) controllers as well.

Is there any special settings to be done before accessing those registers.
anything like enabling power gating, or clocks or something like that?

Thanks in advance :-)
Chivas.[/i]

Yes, the HW requires that to access the registers for a particular module:

  • The module not be powergated
  • The module’s clock be enabled
  • The module not be held in reset

These requirements aren’t specific to U-Boot or mr/mw, but are generally applicable to any SW that directly accesses registers.