Commit Graph

273 Commits

Author SHA1 Message Date
Sowjanya Komatineni
47b4e12915 arm64: tegra: Add Jetson Nano SC7 timings
Add platform specific SC7 timing configuration to the Jetson Nano device
tree.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:09 +01:00
Sowjanya Komatineni
106f7a06fb arm64: tegra: Add Jetson TX1 SC7 timings
Add platform specific SC7 timing configuration to the Jetson TX1 device
tree.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:09 +01:00
Sowjanya Komatineni
d13c13f4cd arm64: tegra: Enable wake from deep sleep on RTC alarm
This patch updates device tree for RTC and PMC to allow system wake
from deep sleep on RTC alarm.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:08 +01:00
Thierry Reding
264064ab0b arm64: tegra: Add PMU on Tegra210
The NVIDIA Tegra210 contains an ARM PMU v3 that can be used to gather
statistics about the processors and their memory system. Add a device
tree node so that this functionality can be exposed.

Reported-by: William Cohen <giantklein@gmail.com>
Tested-by: William Cohen <giantklein@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:08 +01:00
Thierry Reding
24fc33633e arm64: tegra: Add blank lines for better readability
Separate the individual thermal zones by a blank line for improved
readability.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:08 +01:00
Thierry Reding
614d063f89 arm64: tegra: Enable DisplayPort on Jetson AGX Xavier
Enable both USB-C/DP ports on Jetson AGX Xavier and wire up the power
supplies for the SORs that drive these outputs.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:08 +01:00
Thierry Reding
c90b8f15df arm64: tegra: p2888: Rename regulators for consistency
Some of the PMIC regulators had names that don't match the schematics.
Rename them so that it is easier to cross-reference with the hardware
documentation.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:08 +01:00
Thierry Reding
3fdfaf8718 arm64: tegra: Enable DP support on Jetson TX2
If equipped with an E3320 display module, Jetson TX2 can support
DisplayPort.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:07 +01:00
Thierry Reding
d46d1eb30c arm64: tegra: Fix compatible for SOR1
It turns out that both SORs on Tegra186 are the same, so there's no need
to distinguish between them in the compatible string.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:07 +01:00
Thierry Reding
35cbf655eb arm64: tegra: Enable DP support on Jetson Nano
Add the AVDD_IO_EDP_1V05 and enable the SOR and DPAUX hardware blocks
that are used to drive DisplayPort on Jetson Nano.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:07 +01:00
Thierry Reding
ed93a666bb arm64: tegra: Add SOR0_OUT clock on Tegra210
This clock was not previously used because it is a fixed clock. However,
adding it here allows operating systems to deal with SOR0 the same way
as SOR1.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:07 +01:00
Vidya Sagar
b7450f161f arm64: tegra: Assume no CLKREQ presence by default
Although Tegra194 has support for CLKREQ sideband signal and P2972
has routing of the same till the slot, it is the case most of the time
that the connected device doesn't have CLKREQ support. Hence, it makes
sense to assume that there is no CLKREQ support by default and it can
be enabled on need basis when a card with CLKREQ support is connected.

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:07 +01:00
Thierry Reding
29ef1f4dac arm64: tegra: Enable SMMU for VIC on Tegra186
Enable address translation for VIC via the SMMU on Tegra186.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:07 +01:00
Nagarjuna Kristam
488a04d4bb arm64: tegra: Enable XUSB host controller on Jetson TX2
This enables the use of the USB ports found on the Jetson TX2 for input
or external storage, for example.

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:06 +01:00
Nagarjuna Kristam
05705c7215 arm64: tegra: Enable SMMU for XUSB host on Tegra186
Enabling the SMMU for XUSB host allows buffers to be mapped through the
ARM SMMU, which helps protecting the system from rogue memory accesses
by the XUSB host.

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:06 +01:00
Nagarjuna Kristam
ca2b8ee457 arm64: tegra: Enable XUSB pad controller on Jetson TX2
The XUSB pad controller is a prerequisite for enabling XUSB support.

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:06 +01:00
Thierry Reding
2b6b3940e8 arm64: tegra: Add ethernet alias on Jetson AGX Xavier
The Tegra194 EQOS controller is used as primary Ethernet interface.
Set the ethernet0 alias to reflect that.

Generic bootloader code can use this to find the primary Ethernet device
and set the MAC address, for example.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:06 +01:00
Thierry Reding
19dc772a94 arm64: tegra: Fix compatible string for EQOS on Tegra194
The EQOS Ethernet controller found on Tegra194 is compatible with its
predecessor or Tegra186. However, it is an established practice to add
a compatible string for the most recent generation of the SoC as well,
just in case some incompatibilities or bugs are later discovered.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:06 +01:00
Thierry Reding
44ff822c58 arm64: tegra: Hook up edp interrupt on Tegra210 SOCTHERM
For some reason this was never hooked up. Do it now so that over-current
interrupts can be logged.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:06 +01:00
Thierry Reding
939e7430de arm64: tegra: Fix base address for SOR1 on Tegra194
The SOR1 hardware block's registers start at physical address 0x15b40000
as correctly specified by the unit-address, but the reg property lists a
wrong value, likely because it was copy-and-pasted from SOR0 but not
correctly updated.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:05 +01:00
Thierry Reding
1aaa769867 arm64: tegra: Add unit-address for ACONNECT on Tegra194
The ACONNECT complex starts at physical address 0x2900000, so give it a
unit-address to comply with standard naming practices checked for by the
device tree compiler.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:05 +01:00
Thierry Reding
eef97c2a77 arm64: tegra: Add unit-address for CBB on Tegra194
The control back-bone (CBB) starts at physical address 0, so give it a
unit-address to comply with standard naming practices checked for by the
device tree compiler.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:05 +01:00
Thierry Reding
b45d322c2c arm64: tegra: Add CPU and cache topology for Tegra194
Tegra194 has four CPU clusters, each with their own cache hierarchy.
This patch creates the CPU map for these clusters and adds the second-
and third-level caches and associates them with the CPUs.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:05 +01:00
Jon Hunter
d440538e5f arm64: tegra: Fix 'active-low' warning for Jetson Xavier regulator
Commit 4fdbfd60a3a2 ("arm64: tegra: Add PCIe slot supply information
in p2972-0000 platform") added regulators for the PCIe slot on the
Jetson Xavier platform. One of these regulators has an active-low enable
and this commit incorrectly added an active-low specifier for the GPIO
which causes the following warning to occur on boot ...

 WARNING KERN regulator@3 GPIO handle specifies active low - ignored

The fixed-regulator binding does not use the active-low flag from the
gpio specifier and purely relies of the presence of the
'enable-active-high' property to determine if it is active high or low
(if this property is omitted). Fix this warning by setting the GPIO
to active-high in the GPIO specifier. Finally, remove the
'enable-active-low' as this is not a valid property.

Fixes: 4fdbfd60a3a2 ("arm64: tegra: Add PCIe slot supply information in p2972-0000 platform")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:05 +01:00
Jon Hunter
1e5e929c00 arm64: tegra: Fix 'active-low' warning for Jetson TX1 regulator
Commit 3499359418 ("arm64: tegra: Enable HDMI on Jetson TX1")
added a regulator for HDMI on the Jetson TX1 platform. This regulator
has an active high enable, but the GPIO specifier for enabling the
regulator incorrectly defines it as active-low. This causes the
following warning to occur on boot ...

 WARNING KERN regulator@10 GPIO handle specifies active low - ignored

The fixed-regulator binding does not use the active-low flag from the
gpio specifier and purely relies of the presence of the
'enable-active-high' property to determine if it is active high or low
(if this property is omitted). Fix this warning by setting the GPIO
to active-high in the GPIO specifier which aligns with the presense of
the 'enable-active-high' property.

Fixes: 3499359418 ("arm64: tegra: Enable HDMI on Jetson TX1")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:04 +01:00
Vidya Sagar
09a0774a18 arm64: tegra: Add PCIe slot supply information in p2972-0000 platform
Add 3.3V and 12V supplies regulators information of x16 PCIe slot in
p2972-0000 platform which is owned by C5 controller and also enable C5
controller.

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>
2019-09-20 14:24:35 -05:00
Vidya Sagar
dbb72e2c30 arm64: tegra: Add configuration for PCIe C5 sideband signals
Add support to configure PCIe C5's sideband signals PERST# and CLKREQ#
as output and bi-directional signals respectively which unlike other
PCIe controllers sideband signals are not configured by default.

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>
2019-09-20 14:24:34 -05:00
Vidya Sagar
a586c88eab arm64: tegra: Enable PCIe slots in P2972-0000 board
Enable PCIe controller nodes to enable respective PCIe slots on
P2972-0000 board. Following is the ownership of slots by different
PCIe controllers.
Controller-0 : M.2 Key-M slot
Controller-1 : On-board Marvell eSATA controller
Controller-3 : M.2 Key-E slot

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-21 16:06:00 +02:00
Vidya Sagar
2602c32f15 arm64: tegra: Add P2U and PCIe controller nodes to Tegra194 DT
Add P2U (PIPE to UPHY) and PCIe controller nodes to device tree.
The Tegra194 SoC contains six PCIe controllers and twenty P2U instances
grouped into two different PHY bricks namely High-Speed IO (HSIO-12 P2Us)
and NVIDIA High Speed (NVHS-8 P2Us) respectively.

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-21 16:04:53 +02:00
Manikanta Maddireddy
871be845df arm64: tegra: Add PEX DPD states as pinctrl properties
Add PEX deep power down states as pinctrl properties to set in PCIe driver.
In Tegra210, BIAS pads are not in power down mode when clamps are applied.
To set the pads in DPD, pass the PEX DPD states as pinctrl properties to
PCIe driver.

Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-21 16:04:52 +02:00
Sameer Pujar
9a182db457 arm64: tegra: Enable ACONNECT, ADMA and AGIC
Enable ACONNECT, ADMA and AGIC devices on Jetson TX2 and Jetson AGX
Xavier.

Verified driver probe path and devices get registered fine.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-21 16:04:52 +02:00
Sameer Pujar
5d2249dda0 arm64: tegra: Add ACONNECT, ADMA and AGIC nodes
Add device tree nodes for the ACONNECT, ADMA and AGIC devices on
Tegra186 and Tegra194.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-21 16:04:36 +02:00
Thierry Reding
541d7c4406 arm64: tegra: Sort device tree nodes alphabetically
Device tree nodes without unit-address are to be sorted alphabetically.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-20 11:33:05 +02:00
Jon Hunter
434e8aedea arm64: tegra: Fix Jetson Nano GPU regulator
There are a few issues with the GPU regulator defined for Jetson Nano
which are:

1. The GPU regulator is a PWM based regulator and not a fixed voltage
   regulator.
2. The output voltages for the GPU regulator are not correct.
3. The regulator enable ramp delay is too short for the regulator and
   needs to be increased. 2ms should be sufficient.
4. This is the same regulator used on Jetson TX1 and so make the ramp
   delay and settling time the same as Jetson TX1.

Cc: stable@vger.kernel.org
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Fixes: 6772cd0eac ("arm64: tegra: Add NVIDIA Jetson Nano Developer Kit support")
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-20 11:18:30 +02:00
Jon Hunter
ece6031ece arm64: tegra: Update Jetson TX1 GPU regulator timings
The GPU regulator enable ramp delay for Jetson TX1 is set to 1ms which
not sufficient because the enable ramp delay has been measured to be
greater than 1ms. Furthermore, the downstream kernels released by NVIDIA
for Jetson TX1 are using a enable ramp delay 2ms and a settling delay of
160us. Update the GPU regulator enable ramp delay for Jetson TX1 to be
2ms and add a settling delay of 160us.

Cc: stable@vger.kernel.org
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Fixes: 5e6b9a89af ("arm64: tegra: Add VDD_GPU regulator to Jetson TX1")
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-20 11:17:03 +02:00
Jon Hunter
ba24eee668 arm64: tegra: Fix AGIC register range
The Tegra AGIC interrupt controller is an ARM GIC400 interrupt
controller. Per the ARM GIC device-tree binding, the first address
region is for the GIC distributor registers and the second address
region is for the GIC CPU interface registers. The address space for
the distributor registers is 4kB, but currently this is incorrectly
defined as 8kB for the Tegra AGIC and overlaps with the CPU interface
registers. Correct the address space for the distributor to be 4kB.

Cc: stable@vger.kernel.org
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Fixes: bcdbde4335 ("arm64: tegra: Add AGIC node for Tegra210")
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-20 11:17:03 +02:00
Nicolin Chen
08c7c74b09 arm64: tegra: Add INA3221 channel info for Jetson TX2
There are four INA3221 chips on the Jetson TX2 (p3310 + p2771).
And each INA3221 chip has three input channels to monitor power.

So this patch adds these 12 channels to the DT of Jetson TX2, by
following the DT binding of INA3221 and official documents from
https://developer.nvidia.com/embedded/downloads

tegra186-p3310:
https://developer.nvidia.com/embedded/dlc/jetson-tx2-series-modules-oem-product-design-guide

tegra186-p2771-0000:
http://developer.nvidia.com/embedded/dlc/jetson-tx1-tx2-developer-kit-carrier-board-spec-20180618

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-20 11:17:02 +02:00
Thierry Reding
d87764daed arm64: tegra: Enable PWM on Jetson Nano
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-20 11:17:02 +02:00
Thierry Reding
e57cf057c5 arm64: tegra: Enable CPU sleep on Jetson Nano
Jetson Nano implements CPU sleep via PSCI, much like any of the other
Tegra X1 platforms. Enable the sleep states to allow the CPU to go into
lower power states when idle.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-19 17:51:43 +02:00
Thierry Reding
8300a70e65 arm64: tegra: Add ID EEPROMs on Jetson Nano
The Jetson Nano has two ID EEPROMs, one for the module and another for
the carrier board. Add both to the device tree so that they can be read
from at runtime.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-19 17:51:42 +02:00
Thierry Reding
5205abd283 arm64: tegra: Add ID EEPROM for Jetson TX2 Developer Kit
There is an ID EEPROM on the Jetson TX2 carrier board, part of the
Jetson TX2 Developer Kit, that exposes information that can be used to
identify the carrier board. Add the device tree node so that operating
systems can access this EEPROM.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-19 17:51:40 +02:00
Thierry Reding
a4ff413b71 arm64: tegra: Add ID EEPROM for Jetson TX2 module
There is an ID EEPROM in the Jetson TX2 module that stores various bits
of information to indentify the module. Add the device tree node so that
operating systems can access this EEPROM.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-19 17:51:37 +02:00
Thierry Reding
3492d0a155 arm64: tegra: Add ID EEPROM for Jetson TX1 Developer Kit
There is an ID EEPROM on the Jetson TX1 carrier board, part of the
Jetson TX1 Developer Kit, that exposes information that can be used to
identify the carrier board. Add the device tree node so that operating
systems can access this EEPROM.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-19 17:51:34 +02:00
Thierry Reding
a5b6b67364 arm64: tegra: Add ID EEPROM for Jetson TX1 module
There is an ID EEPROM in the Jetson TX1 module that stores various bits
of information to indentify the module. Add the device tree node so that
operating systems can access this EEPROM.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-19 17:50:57 +02:00
Thierry Reding
6b9e263b44 arm64: tegra: Don't use architected timer for suspend on Tegra210
Due to an integration issue the architected timer on Tegra210 does not
remain on during system suspend (a.k.a. SC7). Mark it accordingly so
that it isn't considered as a means to track suspend time.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-14 17:56:53 +02:00
Thierry Reding
b30be6734e arm64: tegra: Mark architected timer as always on
The architected timer on Tegra186 and Tegra194 is in an always on power
partition and its reference clock will always run, so mark the timer as
always on.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-14 17:56:53 +02:00
Thierry Reding
846137c6a1 arm64: tegra: Add pin control states for I2C on Tegra186
Two of the Tegra I2C controllers share pads with the DPAUX controllers.
In order for the I2C controllers to use these pads, they have to be set
into I2C mode. Use the I2C and off pin control states defined in the DT
nodes for DPAUX as "default" and "idle" states, respectively. This
ensures that the I2C controller driver can properly configure the pins
when it needs to perform I2C transactions.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-05 10:18:56 +02:00
Joseph Lo
5298166d47 arm64: tegra: Add CPU cache topology for Tegra186
Tegra186 has two CPU clusters with its own cache hierarchy. This patch
adds them with the cache information of each of the CPUs.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-05 10:18:56 +02:00
Thierry Reding
c4502cc3a1 arm64: tegra: Add VCC supply for GPIO expanders on Jetson TX2
The GPIO expanders on Jetson TX2 are powered by the VDD_1V8 and
VDD_3V3_SYS supplies, respectively. Model this in device tree so that
the correct supplies are referenced.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-06-05 10:18:53 +02:00
Thierry Reding
9c536ccdd5 arm64: tegra: Make DT model property consistent
Jetson Nano, Jetson TX1 and Jetson TX2 all are named "Developer Kit" and
Jetson AGX Xavier is the odd one out. It's officially also called the
"Developer Kit", not "Development Kit", so make it consistent with the
rest.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-05-22 16:17:16 +02:00