596 Commits

Author SHA1 Message Date
Thierry Reding
4bb54c2ce4 arm64: tegra: Bump CBB ranges property on Tegra194 and Tegra234
Both Xavier (Tegra194) and Orin (Tegra234) support a 40-bit address map,
so bump the CBB ranges property to cover all of the 1 TiB address space.
This fixes an issue where some of the PCIe regions could not be remapped
because of they were outside the memory specified by the CBB's ranges
property.

Reported-by: Jonathan Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-03-02 10:35:11 +01:00
Thierry Reding
682e1c498a arm64: tegra: Drop I2C iommus and dma-coherent properties
Drop the iommus and dma-coherent properties for the I2C controller
device tree nodes. These are only needed for the device tree nodes
that represent the GPC DMA controller, since that is the device
performing the direct memory accesses.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-27 17:08:58 +01:00
Mikko Perttunen
361238cdc5 arm64: tegra: Mark host1x as dma-coherent on Tegra194/234
Ensure appropriate configuration is done to make the host1x device
and context devices DMA coherent by adding the dma-coherent flag.

Fixes: b35f5b53a87b ("arm64: tegra: Add context isolation domains on Tegra234")
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-26 15:43:08 +01:00
Jon Hunter
320e0a7037 arm64: tegra: Populate the XUDC node for Tegra234
Populate the Tegra XUSB device controller (XUDC) node for Tegra234.

This is based upon a patch from Wayne Chang <waynec@nvidia.com>.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-24 14:53:10 +01:00
Jon Hunter
f19bb95dc5 arm64: tegra: Add dma-coherent property for Tegra194 XUDC
DMA operations for XUSB device controller (XUDC) are coherent for
Tegra194 and so add the 'dma-coherent' property for this device.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-24 14:51:08 +01:00
Jon Hunter
6118d57734 arm64: tegra: Populate Jetson AGX Orin EEPROMs
Populate the module and system EEPROMs on the Jetson AGX Orin platform.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-17 14:52:01 +01:00
Jon Hunter
260e8d42b1 arm64: tegra: Populate address/size cells for Tegra234 I2C
Populate the address and size cells properties for the I2C devices on
Tegra234.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-17 14:52:01 +01:00
Wayne Chang
6e505dd680 arm64: tegra: Enable XUSB host function on Jetson AGX Orin
This commit enables XUSB host and pad controller on Jetson AGX Orin.

Signed-off-by: Wayne Chang <waynec@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-17 14:52:01 +01:00
Thierry Reding
79ed18d9ec arm64: tegra: Sort nodes by unit-address, then alphabetically
Nodes in device tree should be sorted by unit-address, followed by nodes
without a unit-address, sorted alphabetically. Some exceptions are the
top-level aliases, chosen, firmware, memory and reserved-memory nodes,
which are expected to come first.

These rules apply recursively with some exceptions, such as pinmux nodes
or regulator nodes, which often follow more complicated ordering (often
by "importance").

While at it, change the name of some of the nodes to follow standard
naming conventions, which helps with the sorting order and reduces the
amount of warnings from the DT validation tools.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-17 13:55:20 +01:00
Thierry Reding
2838cfddbc arm64: tegra: Bump #address-cells and #size-cells
The #address-cells and #size-cells properties for the top-level bus were
set to 1 because that was enough to represent the register ranges of all
the IP blocks on that bus. However, most of these devices can do DMA to
a larger address space, so translation of DMA addresses needs to happen
in a 64-bit address space.

Partially this was already done by the memory controller increasing that
address space by setting #address-cells and #size-cells to 2, but a full
DMA address translation would still cause truncation when traversing to
the top-level bus.

Fix this by setting #address-cells = <2> and #size-cells = <2> on the
top-level bus and adjusting all "reg" and "ranges" properties of its
children.

While at it, also move the PCI and GPU nodes back under the top-level
bus where they belong. The were put outside of it to work around this
same problem.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-17 13:55:04 +01:00
Thierry Reding
c71e18973b arm64: tegra: Sort includes
Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-17 13:55:03 +01:00
Thierry Reding
29bcc1eaca arm64: tegra: Fix duplicate regulator on Jetson TX1
When the top-level regulators were renamed, the 1.2V camera regulator
accidentally ended up with the same DT node name as the 1.8V camera
regulator.

Fixes: 097e01c61015 ("arm64: tegra: Rename top-level regulators")
Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-17 13:55:03 +01:00
Thierry Reding
979ac5ef58 arm64: tegra: Fix typo in gpio-ranges property
The gpio-ranges property name was missing a terminating "s", causing it
to not be parsed and fail DT validation as well.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-17 13:55:03 +01:00
Thierry Reding
1002a36112 arm64: tegra: Remove unneeded clock-names for Tegra132 PWM
There's only a single clock for this IP block, so it doesn't need a
clock-names property.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:16 +01:00
Thierry Reding
132b552cba arm64: tegra: Fix up compatible string for SDMMC1 on Tegra234
The compatible string list for SDHCI on Tegra234 should be
"nvidia,tegra234-sdhci", followed by the "nvidia,tegra186-sdhci"
fallback. Use that consistently for all SDHCI controllers.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:15 +01:00
Thierry Reding
d8e194786a arm64: tegra: Remove unused reset-names for QSPI
The Tegra QSPI controller uses a single reset line, so there's no need
for a reset-names property. Remove such properties.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:15 +01:00
Thierry Reding
efe499d885 arm64: tegra: Fixup pinmux node names
Pinmux node names should have a pinmux- prefix and not use underscores.
Fix up some cases that didn't follow those rules.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:15 +01:00
Thierry Reding
e9ddebc3a2 arm64: tegra: Remove reset-names for QSPI
The Tegra QSPI controllers use a single reset control, so reset-names is
not necessary and therefore not specified in the DT bindings. Drop the
property from device tree files to avoid validation warnings.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:15 +01:00
Thierry Reding
b2fbcbe1ae arm64: tegra: Use correct compatible string for Tegra234 HDA
The Tegra234 HDA controller is not backwards-compatible with Tegra30, so
drop the corresponding compatible string from the list.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:15 +01:00
Thierry Reding
7f0ea5acfc arm64: tegra: Use correct compatible string for Tegra194 HDA
The Tegra194 HDA controller is not backwards-compatible with Tegra30, so
drop the corresponding compatible string from the list.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:14 +01:00
Thierry Reding
3d5d63e96a arm64: tegra: Use vbus-gpios property
Instead of using the deprecated vbus-gpio property, switch to using the
more standard vbus-gpios property.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:14 +01:00
Thierry Reding
85ab13c184 arm64: tegra: Restructure Tegra210 PMC pinmux nodes
The PMC pinmux configuration nodes need to be part of a top-level pinmux
node. Add that new "pinmux" node and move the configuration nodes into
it.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:14 +01:00
Pierre Gondois
27f1568b1d arm64: tegra: Update cache properties
The DeviceTree Specification v0.3 specifies that the cache node
'compatible' and 'cache-level' properties are 'required'. Cf.
s3.8 Multi-level and Shared Cache Nodes
The 'cache-unified' property should be present if one of the
properties for unified cache is present ('cache-size', ...).

Update the Device Trees accordingly.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:14 +01:00
Fabio Estevam
14910d6871 arm64: tegra: Remove 'enable-active-low'
The 'enable-active-low' property is not a valid one.

Only 'enable-active-high' is valid, and when this property is absent
the gpio regulator will act as active low by default.

Remove the invalid 'enable-active-low' property.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:14 +01:00
Akhil R
dd0be8278a arm64: tegra: Add dma-channel-mask in GPCDMA node
Add dma-channel-mask property in Tegra GPCDMA device tree node.

The property would help to specify the channels to be used in
kernel and reserve few for the firmware. This was previously
achieved by limiting the channel number to 31 in the driver.
This is wrong and does not align with the hardware. Correct this
and update the interrupts property to list all 32 interrupts.

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:13 +01:00
Vidya Sagar
47a2f35d9e arm64: tegra: Fix non-prefetchable aperture of PCIe C3 controller
Fix the starting address of the non-prefetchable aperture of PCIe C3
controller.

Fixes: ec142c44b026 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra234 DT")
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:13 +01:00
Thierry Reding
b8f44643d6 arm64: tegra: Add missing compatible string to Ethernet USB device
According to the DT schema in usb-device.yaml, each USB device node
needs a compatible string, so add one for the built-in USB Ethernet
device on Jetson TX1.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:13 +01:00
Thierry Reding
6f380a4ec0 arm64: tegra: Separate AON pinmux from main pinmux on Tegra194
The registers for the AON pinmux reside in a partition different from
the registers for the main pinmux. Instead of treating them as one and
the same device, split them up so that they are each their own devices.
Also add gpio-ranges properties to the corresponding GPIO controllers
such that the pinmux and GPIO controllers can be paired up properly.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:13 +01:00
Vidya Sagar
794b834d4c arm64: tegra: Add ECAM aperture info for all the PCIe controllers
Add the ECAM aperture information for all the PCIe controllers of
Tegra234.

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:13 +01:00
Thierry Reding
b6e097df67 arm64: tegra: Remove clock-names from PWM nodes
The Tegra PWFM controllers use a single clock, so there's no need for a
clock-names property.

Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:12 +01:00
Dipen Patel
8fbd2d1189 arm64: tegra: Enable GTE nodes
Add and enable AON and LIC GTE nodes by default.

Signed-off-by: Dipen Patel <dipenp@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:12 +01:00
Jon Hunter
501c9e7ca6 arm64: tegra: Update console for Jetson Xavier and Orin
The Tegra Combined UART (TCU) is the default serial interface for Jetson
Xavier and Orin platforms and so update the bootargs for these platforms
to use the TCU.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:12 +01:00
Sandipan Patra
daf9259976 arm64: tegra: Enable PWM users on Jetson AGX Orin
Enable additional PWM controllers in device tree so that the PWM pins on
the Jetson AGX Orin Developer Kit 40-pin header can be used.

Signed-off-by: Sandipan Patra <spatra@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:12 +01:00
Thierry Reding
58bf48a25a arm64: tegra: Add missing whitespace
The unit-address of a node should be separated from the opening brace by
a space.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:11 +01:00
Thierry Reding
7815954203 arm64: tegra: Sort nodes by unit-address
The P2U nodes that were recently added were not added in the correct
order. Sort them in the right place by unit-address.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:11 +01:00
Prathamesh Shete
d71b893a11 arm64: tegra: Add Tegra234 SDMMC1 device tree node
Add device tree node for Tegra234 SDMMC1 instance.
Add and enable SD card instance in device tree.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:11 +01:00
Jon Hunter
1bbba854bc arm64: tegra: Add SBSA UART for Tegra234
Populate the SBSA UART for Tegra234 and enable this UART for Jetson AGX
Orin.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:11 +01:00
Jon Hunter
7a2c613bdb arm64: tegra: Add PWM fan for Jetson AGX Orin
Add the PWM fan node for the Tegra234 Jetson AGX Orin platform.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:11 +01:00
Jon Hunter
2566d28c40 arm64: tegra: Populate Tegra234 PWMs
Populate all the PWM devices for Tegra234. Finally, update the
compatible string for the existing 'pwm1' node to just be 'tegra194-pwm'
and remove the fallback to 'tegra186-pwm', which aligns with the
binding documentation.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:11 +01:00
Jon Hunter
04491207d2 arm64: tegra: Remove unused property for I2C
Commit 156af9de0932 ("arm64: tegra: Add Tegra234 I2C devicetree nodes")
populated the I2C device nodes for Tegra234. One of these nodes
contains the property 'nvidia,hw-instance-id' which is neither
documented or used. Remove this unused property.

Fixes: 156af9de0932 ("arm64: tegra: Add Tegra234 I2C devicetree nodes")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:10 +01:00
Vidya Sagar
248400656b arm64: tegra: Fix Prefetchable aperture ranges of Tegra234 PCIe controllers
commit edf408b946d3 ("PCI: dwc: Validate iATU outbound mappings against
hardware constraints") exposes an issue with the existing partitioning of
the aperture space where the Prefetchable apertures of controllers
C5, C7 and C9 in Tegra234 cross the 32GB boundary hardware constraint.
This patch makes sure that the Prefetchable region doesn't spill over
the 32GB boundary.

Fixes: ec142c44b026 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra234 DT")
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:10 +01:00
Mikko Perttunen
68c31ad011 arm64: tegra: Add NVDEC on Tegra234
Add a device tree node for NVDEC on Tegra234.

Booting the firmware requires some information regarding offsets
within the firmware binary. These are passed through the device
tree, but since the values vary depending on the firmware version,
and the firmware itself is not available to the OS, the flasher is
expected to provide a device tree overlay with values corresponding
to the firmware it is flashing. The overlay then replaces the
placeholder values here.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:10 +01:00
Mikko Perttunen
e25770feb6 arm64: tegra: Fix ranges for host1x nodes
The currently specified 'ranges' properties don't actually include
all devices under the host1x bus on Tegra194 and Tegra234. Expand
them appropriately.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-11-21 13:30:10 +01:00
Akhil R
8e4428051d arm64: tegra: Add GPCDMA support for Tegra I2C
Add dma properties to support GPCDMA for I2C in Tegra 186 and later
chips

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-09-15 21:30:38 +02:00
Mohan Kumar
af4c27738c arm64: tegra: Add iommus for HDA on Tegra234
Add the iommus property to the HDA node on Tegra234.

Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-09-15 21:30:38 +02:00
Mohan Kumar
0a4fa25042 arm64: tegra: Enable HDA node for Jetson AGX Orin
Enable HDA node for the Jetson AGX Orin platform.

Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-09-15 21:30:38 +02:00
Mikko Perttunen
b35f5b53a8 arm64: tegra: Add context isolation domains on Tegra234
Add Host1x context isolation domains on Tegra234. On Tegra234 we have
two IOMMUs that are connected to Host1x-channel programmed engines,
so we have to include domains for each of them.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-09-15 21:30:38 +02:00
Thierry Reding
b0c1a994f6 arm64: tegra: Fixup iommu-map property formatting
Make sure that each phandle-array is enclosed in a set of angular
brackets and properly indent each entry.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-09-15 21:30:37 +02:00
Diogo Ivo
a1e3de6ea5 arm64: dts: tegra: smaug: Add Wi-Fi node
The Google Pixel C contains a BRCM4354 Wi-Fi + BT module.
Add a DT node for its Wi-Fi functionality. Tested on Pixel C.

Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-09-15 21:30:37 +02:00
Diogo Ivo
a63c0cd837 arm64: dts: tegra: smaug: Add Bluetooth node
The Google Pixel C contains a BRCM4354 Wi-Fi + BT module.
Add a DT node for its BT functionality. Tested on Pixel C.

Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-09-15 21:30:37 +02:00