Initial support for NVIDIA Tegra194
Subsystems (5)
v3 cover Initial support for NVIDIA Tegra194
Hello everyone,
this series adds initial support for the NVIDIA Tegra194 "Xavier" system-on-chip. Initially UART, I2C, SDMMC, as well as the PMIC are supported, allowing booting to a console.
The changes consist almost completely of the new device trees, however some fixes are required in the BPMP driver to support the new channel layout in Tegra194.
The series has been tested on Tegra186 (Jetson TX2) and Tegra194 (P2972).
Cheers,
Mikko
Mikko Perttunen (7):
firmware: tegra: Simplify channel management soc/tegra: Add Tegra194 SoC configuration option soc/tegra: pmc: Add Tegra194 compatibility string
dt-bindings: tegra: Add missing chips and NVIDIA boards
dt-bindings: tegra: Add documentation for nvidia,tegra194-pmc
arm64: tegra: Add Tegra194 chip device tree
arm64: tegra: Add device tree for the Tegra194 P2972-0000 board
Documentation/devicetree/bindings/arm/tegra.txt | 16 + .../bindings/arm/tegra/nvidia,tegra186-pmc.txt | 2 + arch/arm64/boot/dts/nvidia/Makefile | 1 + arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 248 ++++++++ arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 16 + arch/arm64/boot/dts/nvidia/tegra194.dtsi | 344 +++++++++++ arch/arm64/configs/defconfig | 1 + drivers/firmware/tegra/bpmp.c | 142 ++--- drivers/soc/tegra/Kconfig | 10 + drivers/soc/tegra/pmc.c | 1 + include/dt-bindings/clock/tegra194-clock.h | 653 +++++++++++++++++++++ include/dt-bindings/gpio/tegra194-gpio.h | 64 ++ include/dt-bindings/power/tegra194-powergate.h | 38 ++ include/dt-bindings/reset/tegra194-reset.h | 155 +++++ include/soc/tegra/bpmp.h | 4 +- 15 files changed, 1615 insertions(+), 80 deletions(-) create mode 100644 arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi create mode 100644 arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts create mode 100644 arch/arm64/boot/dts/nvidia/tegra194.dtsi create mode 100644 include/dt-bindings/clock/tegra194-clock.h create mode 100644 include/dt-bindings/gpio/tegra194-gpio.h create mode 100644 include/dt-bindings/power/tegra194-powergate.h create mode 100644 include/dt-bindings/reset/tegra194-reset.h
Signature · 1 line
2.16.1
PATCH v3 1/7 firmware: tegra: Simplify channel management
The Tegra194 BPMP only implements 5 channels (4 to BPMP, 1 to CCPLEX), and they are not placed contiguously in memory. The current channel management in the BPMP driver does not support this.
Simplify and refactor the channel management such that only one atomic transmit channel and one receive channel are supported, and channels are not required to be placed contiguously in memory. The same configuration also works on T186 so we end up with less code.
--- drivers/firmware/tegra/bpmp.c | 142 +++++++++++++++++++----------------------- include/soc/tegra/bpmp.h | 4 +- 2 files changed, 66 insertions(+), 80 deletions(-)
drivers/firmware/tegra/bpmp.c +64 -78
@@ -70,57 +70,20 @@ void tegra_bpmp_put(struct tegra_bpmp *bpmp) }EXPORT_SYMBOL_GPL (tegra_bpmp_put); -static int tegra_bpmp_channel_get_index (struct tegra_bpmp_channel *channel) -{ -return channel - channel->bpmp->channels; -} -static int tegra_bpmp_channel_get_thread_index (struct tegra_bpmp_channel *channel) {struct tegra_bpmp *bpmp = channel->bpmp; -unsigned int offset, count; +unsigned int count;int index; - offset = bpmp->soc->channels.thread.offset; count = bpmp->soc->channels.thread.count; - index =tegra_bpmp_channel_get_index (channel); -if (index <0 ) -return index; - -if (index < offset || index >= offset + count) + index = channel - channel->bpmp->threaded_channels; +if (index <0 || index >= count)return -EINVAL ; -return index - offset; -} - -static struct tegra_bpmp_channel * -tegra_bpmp_channel_get_thread (struct tegra_bpmp *bpmp,unsigned int index) -{ -unsigned int offset = bpmp->soc->channels.thread.offset; -unsigned int count = bpmp->soc->channels.thread.count; - -if (index >= count) -return NULL ; - -return &bpmp->channels[offset + index]; -} - -static struct tegra_bpmp_channel * -tegra_bpmp_channel_get_tx (struct tegra_bpmp *bpmp) -{ -unsigned int offset = bpmp->soc->channels.cpu_tx.offset; - -return &bpmp->channels[offset +smp_processor_id ()]; -} - -static struct tegra_bpmp_channel * -tegra_bpmp_channel_get_rx (struct tegra_bpmp *bpmp) -{ -unsigned int offset = bpmp->soc->channels.cpu_rx.offset; - -return &bpmp->channels[offset]; +return index; }static bool tegra_bpmp_message_valid (const struct tegra_bpmp_message *msg)
@@ -271,11 +234,7 @@ tegra_bpmp_write_threaded(struct tegra_bpmp *bpmp, unsigned int mrq, goto unlock; } - channel =tegra_bpmp_channel_get_thread (bpmp, index); -if (!channel) { - err = -EINVAL ; - goto unlock; - } + channel = &bpmp->threaded_channels[index];if (!tegra_bpmp_master_free (channel)) { err = -EBUSY ;
@@ -328,12 +287,18 @@ int tegra_bpmp_transfer_atomic(struct tegra_bpmp *bpmp,if (!tegra_bpmp_message_valid (msg))return -EINVAL ; - channel =tegra_bpmp_channel_get_tx (bpmp); + channel = bpmp->tx_channel; + +spin_lock (&bpmp->atomic_tx_lock); err =tegra_bpmp_channel_write (channel, msg->mrq,MSG_ACK , msg->tx.data, msg->tx.size); -if (err <0 ) +if (err <0 ) { +spin_unlock (&bpmp->atomic_tx_lock);return err; + } + +spin_unlock (&bpmp->atomic_tx_lock); err =mbox_send_message (bpmp->mbox.channel,NULL );if (err <0 )
@@ -607,7 +572,7 @@ static void tegra_bpmp_handle_rx(struct mbox_client *client, void *data)unsigned int i, count;unsigned long *busy; - channel =tegra_bpmp_channel_get_rx (bpmp); + channel = bpmp->rx_channel; count = bpmp->soc->channels.thread.count; busy = bpmp->threaded.busy;
@@ -619,9 +584,7 @@ static void tegra_bpmp_handle_rx(struct mbox_client *client, void *data)for_each_set_bit (i, busy, count) {struct tegra_bpmp_channel *channel; - channel =tegra_bpmp_channel_get_thread (bpmp, i); -if (!channel) -continue ; + channel = &bpmp->threaded_channels[i];if (tegra_bpmp_master_acked (channel)) {tegra_bpmp_channel_signal (channel);
@@ -698,7 +661,6 @@ static void tegra_bpmp_channel_cleanup(struct tegra_bpmp_channel *channel)static int tegra_bpmp_probe (struct platform_device *pdev) { -struct tegra_bpmp_channel *channel;struct tegra_bpmp *bpmp;unsigned int i;char tag[32 ];
@@ -758,24 +720,45 @@ static int tegra_bpmp_probe(struct platform_device *pdev) goto free_rx; } - bpmp->num_channels = bpmp->soc->channels.cpu_tx.count + - bpmp->soc->channels.thread.count + - bpmp->soc->channels.cpu_rx.count; +spin_lock_init (&bpmp->atomic_tx_lock); + bpmp->tx_channel =devm_kzalloc (&pdev->dev,sizeof (*bpmp->tx_channel), +GFP_KERNEL ); +if (!bpmp->tx_channel) { + err = -ENOMEM ; + goto free_rx; + } - bpmp->channels =devm_kcalloc (&pdev->dev, bpmp->num_channels, -sizeof (*channel),GFP_KERNEL ); -if (!bpmp->channels) { + bpmp->rx_channel =devm_kzalloc (&pdev->dev,sizeof (*bpmp->rx_channel), +GFP_KERNEL ); +if (!bpmp->rx_channel) { err = -ENOMEM ; goto free_rx; } -/* message channel initialization */ -for (i =0 ; i < bpmp->num_channels; i++) { -struct tegra_bpmp_channel *channel = &bpmp->channels[i]; + bpmp->threaded_channels =devm_kcalloc (&pdev->dev, bpmp->threaded.count, +sizeof (*bpmp->threaded_channels), +GFP_KERNEL ); +if (!bpmp->threaded_channels) { + err = -ENOMEM ; + goto free_rx; + } - err =tegra_bpmp_channel_init (channel, bpmp, i); + err =tegra_bpmp_channel_init (bpmp->tx_channel, bpmp, + bpmp->soc->channels.cpu_tx.offset); +if (err <0 ) + goto free_rx; + + err =tegra_bpmp_channel_init (bpmp->rx_channel, bpmp, + bpmp->soc->channels.cpu_rx.offset); +if (err <0 ) + goto cleanup_tx_channel; + +for (i =0 ; i < bpmp->threaded.count; i++) { + err =tegra_bpmp_channel_init ( + &bpmp->threaded_channels[i], bpmp, + bpmp->soc->channels.thread.offset + i);if (err <0 ) - goto cleanup_channels; + goto cleanup_threaded_channels; }/* mbox registration */
@@ -788,15 +771,14 @@ static int tegra_bpmp_probe(struct platform_device *pdev)if (IS_ERR (bpmp->mbox.channel)) { err =PTR_ERR (bpmp->mbox.channel);dev_err (&pdev->dev,"failed to get HSP mailbox: %d\n" , err); - goto cleanup_channels; + goto cleanup_threaded_channels; }/* reset message channels */ -for (i =0 ; i < bpmp->num_channels; i++) { -struct tegra_bpmp_channel *channel = &bpmp->channels[i]; - -tegra_bpmp_channel_reset (channel); - } +tegra_bpmp_channel_reset (bpmp->tx_channel); +tegra_bpmp_channel_reset (bpmp->rx_channel); +for (i =0 ; i < bpmp->threaded.count; i++) +tegra_bpmp_channel_reset (&bpmp->threaded_channels[i]); err =tegra_bpmp_request_mrq (bpmp,MRQ_PING , tegra_bpmp_mrq_handle_ping, bpmp);
@@ -845,9 +827,15 @@ static int tegra_bpmp_probe(struct platform_device *pdev)tegra_bpmp_free_mrq (bpmp,MRQ_PING , bpmp); free_mbox:mbox_free_channel (bpmp->mbox.channel); -cleanup_channels: -while (i--) -tegra_bpmp_channel_cleanup (&bpmp->channels[i]); +cleanup_threaded_channels: +for (i =0 ; i < bpmp->threaded.count; i++) { +if (bpmp->threaded_channels[i].bpmp) +tegra_bpmp_channel_cleanup (&bpmp->threaded_channels[i]); + } + +tegra_bpmp_channel_cleanup (bpmp->rx_channel); +cleanup_tx_channel: +tegra_bpmp_channel_cleanup (bpmp->tx_channel); free_rx:gen_pool_free (bpmp->rx.pool, (unsigned long )bpmp->rx.virt,4096 ); free_tx:
@@ -858,18 +846,16 @@ static int tegra_bpmp_probe(struct platform_device *pdev)static const struct tegra_bpmp_soc tegra186_soc = { .channels = { .cpu_tx = { - .offset =0 , - .count =6 , + .offset =3 , .timeout =60 *USEC_PER_SEC , }, .thread = { - .offset =6 , - .count =7 , + .offset =0 , + .count =3 , .timeout =600 *USEC_PER_SEC , }, .cpu_rx = { .offset =13 , - .count =1 , .timeout =0 , }, },
include/soc/tegra/bpmp.h +2 -2
@@ -75,8 +75,8 @@ struct tegra_bpmp {struct mbox_chan *channel; } mbox; -struct tegra_bpmp_channel *channels; -unsigned int num_channels; +spinlock_t atomic_tx_lock; +struct tegra_bpmp_channel *tx_channel, *rx_channel, *threaded_channels;struct {unsigned long *allocated;
Signature · 1 line
2.16.1
PATCH v3 2/7 soc/tegra: Add Tegra194 SoC configuration option
In reply to Mikko PerttunenAdd the configuration option to enable support for the Tegra194 system-on-chip, and enable it by default in the arm64 defconfig.
--- arch/arm64/configs/defconfig | 1 + drivers/soc/tegra/Kconfig | 10 ++++++++++ 2 files changed, 11 insertions(+)
arch/arm64/configs/defconfig +1 -0
@@ -537,6 +537,7 @@ CONFIG_ROCKCHIP_PM_DOMAINS=y CONFIG_ARCH_TEGRA_132_SOC=y CONFIG_ARCH_TEGRA_210_SOC=y CONFIG_ARCH_TEGRA_186_SOC=y +CONFIG_ARCH_TEGRA_194_SOC=y CONFIG_EXTCON_USB_GPIO=y CONFIG_IIO=y CONFIG_EXYNOS_ADC=y
drivers/soc/tegra/Kconfig +10 -0
@@ -104,6 +104,16 @@ config ARCH_TEGRA_186_SOC multi-format support, ISP for image capture processing and BPMP for power management. +config ARCH_TEGRA_194_SOC + bool "NVIDIA Tegra194 SoC" + select MAILBOX + select TEGRA_BPMP + select TEGRA_HSP_MBOX + select TEGRA_IVC + select SOC_TEGRA_PMC + help + Enable support for the NVIDIA Tegra194 SoC. + endif endif
Signature · 1 line
2.16.1
PATCH v3 3/7 soc/tegra: pmc: Add Tegra194 compatibility string
In reply to Mikko PerttunenThe Tegra194 PMC is mostly compatible with Tegra186, including in all currently supported features. As such, add a new compatibility string but point to the existing Tegra186 SoC data for now.
--- drivers/soc/tegra/pmc.c | 1 + 1 file changed, 1 insertion(+)
drivers/soc/tegra/pmc.c +1 -0
@@ -1920,6 +1920,7 @@ static const struct tegra_pmc_soc tegra186_pmc_soc = { };static const struct of_device_id tegra_pmc_match[] = { + { .compatible ="nvidia,tegra194-pmc" , .data = &tegra186_pmc_soc }, { .compatible ="nvidia,tegra186-pmc" , .data = &tegra186_pmc_soc }, { .compatible ="nvidia,tegra210-pmc" , .data = &tegra210_pmc_soc }, { .compatible ="nvidia,tegra132-pmc" , .data = &tegra124_pmc_soc },
Signature · 1 line
2.16.1
PATCH v3 4/7 dt-bindings: tegra: Add missing chips and NVIDIA boards
In reply to Mikko PerttunenAdd compatibility strings for supported but undocumented Tegra chips (Tegra114/124/132/210/186/194) and reference boards.
---
Notes:
v2:
- add patch
Documentation/devicetree/bindings/arm/tegra.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
Documentation/devicetree/bindings/arm/tegra.txt +16 -0
@@ -9,6 +9,12 @@ following compatible values: nvidia,tegra20 nvidia,tegra30 + nvidia,tegra114 + nvidia,tegra124 + nvidia,tegra132 + nvidia,tegra210 + nvidia,tegra186 + nvidia,tegra194 Boards -------------------------------------------
@@ -26,8 +32,18 @@ board-specific compatible values: nvidia,cardhu nvidia,cardhu-a02 nvidia,cardhu-a04 + nvidia,dalmore nvidia,harmony + nvidia,jetson-tk1 + nvidia,norrin + nvidia,p2371-0000 + nvidia,p2371-2180 + nvidia,p2571 + nvidia,p2771-0000 + nvidia,p2972-0000 + nvidia,roth nvidia,seaboard + nvidia,tn7 nvidia,ventana toradex,apalis_t30 toradex,apalis_t30-eval
Signature · 1 line
2.16.1
PATCH v3 5/7 dt-bindings: tegra: Add documentation for nvidia,tegra194-pmc
In reply to Mikko PerttunenThe Tegra194 power management controller has one additional register aperture to be specified in the device tree node.
--- Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.txt | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.txt +2 -0
@@ -3,6 +3,7 @@ NVIDIA Tegra Power Management Controller (PMC) Required properties: - compatible: Should contain one of the following: - "nvidia,tegra186-pmc": for Tegra186 + - "nvidia,tegra194-pmc": for Tegra194 - reg: Must contain an (offset, length) pair of the register set for each entry in reg-names. - reg-names: Must include the following entries:
@@ -10,6 +11,7 @@ Required properties: - "wake" - "aotag" - "scratch" + - "misc" (Only for Tegra194) Optional properties: - nvidia,invert-interrupt: If present, inverts the PMU interrupt signal.
Signature · 1 line
2.16.1
PATCH v3 6/7 arm64: tegra: Add Tegra194 chip device tree
In reply to Mikko PerttunenAdd the chip-level device tree, including binding headers, for the NVIDIA Tegra194 "Xavier" system-on-chip. Only a small subset of devices are initially available, enough to boot to UART console.
---
Notes:
v3:
- added hypervisor-related apertures to GIC node
- removed GPL boilerplate in favor of SPDX and harmonized copyright headers
arch/arm64/boot/dts/nvidia/tegra194.dtsi | 344 +++++++++++++ include/dt-bindings/clock/tegra194-clock.h | 653 +++++++++++++++++++++++++ include/dt-bindings/gpio/tegra194-gpio.h | 64 +++ include/dt-bindings/power/tegra194-powergate.h | 38 ++ include/dt-bindings/reset/tegra194-reset.h | 155 ++++++ 5 files changed, 1254 insertions(+) create mode 100644 arch/arm64/boot/dts/nvidia/tegra194.dtsi create mode 100644 include/dt-bindings/clock/tegra194-clock.h create mode 100644 include/dt-bindings/gpio/tegra194-gpio.h create mode 100644 include/dt-bindings/power/tegra194-powergate.h create mode 100644 include/dt-bindings/reset/tegra194-reset.h
arch/arm64/boot/dts/nvidia/tegra194.dtsi new file +344 -0
@@ -0,0 +1,344 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <dt-bindings/clock/tegra194-clock.h> +#include <dt-bindings/gpio/tegra194-gpio.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/mailbox/tegra186-hsp.h> +#include <dt-bindings/reset/tegra194-reset.h> + +/ { + compatible = "nvidia,tegra194"; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + /* control backbone */ + cbb { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x0 0x0 0x40000000>; + + uarta: serial at 3100000 { + compatible = "nvidia,tegra194-uart", "nvidia,tegra20-uart"; + reg = <0x03100000 0x40>; + reg-shift = <2>; + interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA194_CLK_UARTA>; + clock-names = "serial"; + resets = <&bpmp TEGRA194_RESET_UARTA>; + reset-names = "serial"; + status = "disabled"; + }; + + uartb: serial at 3110000 { + compatible = "nvidia,tegra194-uart", "nvidia,tegra20-uart"; + reg = <0x03110000 0x40>; + reg-shift = <2>; + interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA194_CLK_UARTB>; + clock-names = "serial"; + resets = <&bpmp TEGRA194_RESET_UARTB>; + reset-names = "serial"; + status = "disabled"; + }; + + uartd: serial at 3130000 { + compatible = "nvidia,tegra194-uart", "nvidia,tegra20-uart"; + reg = <0x03130000 0x40>; + reg-shift = <2>; + interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA194_CLK_UARTD>; + clock-names = "serial"; + resets = <&bpmp TEGRA194_RESET_UARTD>; + reset-names = "serial"; + status = "disabled"; + }; + + uarte: serial at 3140000 { + compatible = "nvidia,tegra194-uart", "nvidia,tegra20-uart"; + reg = <0x03140000 0x40>; + reg-shift = <2>; + interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA194_CLK_UARTE>; + clock-names = "serial"; + resets = <&bpmp TEGRA194_RESET_UARTE>; + reset-names = "serial"; + status = "disabled"; + }; + + uartf: serial at 3150000 { + compatible = "nvidia,tegra194-uart", "nvidia,tegra20-uart"; + reg = <0x03150000 0x40>; + reg-shift = <2>; + interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA194_CLK_UARTF>; + clock-names = "serial"; + resets = <&bpmp TEGRA194_RESET_UARTF>; + reset-names = "serial"; + status = "disabled"; + }; + + gen1_i2c: i2c at 3160000 { + compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; + reg = <0x03160000 0x10000>; + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&bpmp TEGRA194_CLK_I2C1>; + clock-names = "div-clk"; + resets = <&bpmp TEGRA194_RESET_I2C1>; + reset-names = "i2c"; + status = "disabled"; + }; + + uarth: serial at 3170000 { + compatible = "nvidia,tegra194-uart", "nvidia,tegra20-uart"; + reg = <0x03170000 0x40>; + reg-shift = <2>; + interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA194_CLK_UARTH>; + clock-names = "serial"; + resets = <&bpmp TEGRA194_RESET_UARTH>; + reset-names = "serial"; + status = "disabled"; + }; + + cam_i2c: i2c at 3180000 { + compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; + reg = <0x03180000 0x10000>; + interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&bpmp TEGRA194_CLK_I2C3>; + clock-names = "div-clk"; + resets = <&bpmp TEGRA194_RESET_I2C3>; + reset-names = "i2c"; + status = "disabled"; + }; + + /* shares pads with dpaux1 */ + dp_aux_ch1_i2c: i2c at 3190000 { + compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; + reg = <0x03190000 0x10000>; + interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&bpmp TEGRA194_CLK_I2C4>; + clock-names = "div-clk"; + resets = <&bpmp TEGRA194_RESET_I2C4>; + reset-names = "i2c"; + status = "disabled"; + }; + + /* shares pads with dpaux0 */ + dp_aux_ch0_i2c: i2c at 31b0000 { + compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; + reg = <0x031b0000 0x10000>; + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&bpmp TEGRA194_CLK_I2C6>; + clock-names = "div-clk"; + resets = <&bpmp TEGRA194_RESET_I2C6>; + reset-names = "i2c"; + status = "disabled"; + }; + + gen7_i2c: i2c at 31c0000 { + compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; + reg = <0x031c0000 0x10000>; + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&bpmp TEGRA194_CLK_I2C7>; + clock-names = "div-clk"; + resets = <&bpmp TEGRA194_RESET_I2C7>; + reset-names = "i2c"; + status = "disabled"; + }; + + gen9_i2c: i2c at 31e0000 { + compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; + reg = <0x031e0000 0x10000>; + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&bpmp TEGRA194_CLK_I2C9>; + clock-names = "div-clk"; + resets = <&bpmp TEGRA194_RESET_I2C9>; + reset-names = "i2c"; + status = "disabled"; + }; + + sdmmc1: sdhci at 3400000 { + compatible = "nvidia,tegra194-sdhci", "nvidia,tegra186-sdhci"; + reg = <0x03400000 0x10000>; + interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA194_CLK_SDMMC1>; + clock-names = "sdhci"; + resets = <&bpmp TEGRA194_RESET_SDMMC1>; + reset-names = "sdhci"; + status = "disabled"; + }; + + sdmmc3: sdhci at 3440000 { + compatible = "nvidia,tegra194-sdhci", "nvidia,tegra186-sdhci"; + reg = <0x03440000 0x10000>; + interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA194_CLK_SDMMC3>; + clock-names = "sdhci"; + resets = <&bpmp TEGRA194_RESET_SDMMC3>; + reset-names = "sdhci"; + status = "disabled"; + }; + + sdmmc4: sdhci at 3460000 { + compatible = "nvidia,tegra194-sdhci", "nvidia,tegra186-sdhci"; + reg = <0x03460000 0x10000>; + interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA194_CLK_SDMMC4>; + clock-names = "sdhci"; + resets = <&bpmp TEGRA194_RESET_SDMMC4>; + reset-names = "sdhci"; + status = "disabled"; + }; + + gic: interrupt-controller at 3881000 { + compatible = "arm,gic-400"; + #interrupt-cells = <3>; + interrupt-controller; + reg = <0x03881000 0x1000>, + <0x03882000 0x2000>, + <0x03884000 0x2000>, + <0x03886000 0x2000>; + interrupts = <GIC_PPI 9 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; + interrupt-parent = <&gic>; + }; + + hsp_top0: hsp at 3c00000 { + compatible = "nvidia,tegra186-hsp"; + reg = <0x03c00000 0xa0000>; + interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "doorbell"; + #mbox-cells = <2>; + }; + + gen2_i2c: i2c at c240000 { + compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; + reg = <0x0c240000 0x10000>; + interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&bpmp TEGRA194_CLK_I2C2>; + clock-names = "div-clk"; + resets = <&bpmp TEGRA194_RESET_I2C2>; + reset-names = "i2c"; + status = "disabled"; + }; + + gen8_i2c: i2c at c250000 { + compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; + reg = <0x0c250000 0x10000>; + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&bpmp TEGRA194_CLK_I2C8>; + clock-names = "div-clk"; + resets = <&bpmp TEGRA194_RESET_I2C8>; + reset-names = "i2c"; + status = "disabled"; + }; + + uartc: serial at c280000 { + compatible = "nvidia,tegra194-uart", "nvidia,tegra20-uart"; + reg = <0x0c280000 0x40>; + reg-shift = <2>; + interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA194_CLK_UARTC>; + clock-names = "serial"; + resets = <&bpmp TEGRA194_RESET_UARTC>; + reset-names = "serial"; + status = "disabled"; + }; + + uartg: serial at c290000 { + compatible = "nvidia,tegra194-uart", "nvidia,tegra20-uart"; + reg = <0x0c290000 0x40>; + reg-shift = <2>; + interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA194_CLK_UARTG>; + clock-names = "serial"; + resets = <&bpmp TEGRA194_RESET_UARTG>; + reset-names = "serial"; + status = "disabled"; + }; + + pmc at c360000 { + compatible = "nvidia,tegra194-pmc"; + reg = <0x0c360000 0x10000>, + <0x0c370000 0x10000>, + <0x0c380000 0x10000>, + <0x0c390000 0x10000>, + <0x0c3a0000 0x10000>; + reg-names = "pmc", "wake", "aotag", "scratch", "misc"; + }; + }; + + sysram at 40000000 { + compatible = "nvidia,tegra194-sysram", "mmio-sram"; + reg = <0x0 0x40000000 0x0 0x50000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x0 0x40000000 0x50000>; + + cpu_bpmp_tx: shmem at 4e000 { + compatible = "nvidia,tegra194-bpmp-shmem"; + reg = <0x4e000 0x1000>; + label = "cpu-bpmp-tx"; + pool; + }; + + cpu_bpmp_rx: shmem at 4f000 { + compatible = "nvidia,tegra194-bpmp-shmem"; + reg = <0x4f000 0x1000>; + label = "cpu-bpmp-rx"; + pool; + }; + }; + + bpmp: bpmp { + compatible = "nvidia,tegra186-bpmp"; + mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB + TEGRA_HSP_DB_MASTER_BPMP>; + shmem = <&cpu_bpmp_tx &cpu_bpmp_rx>; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + + bpmp_i2c: i2c { + compatible = "nvidia,tegra186-bpmp-i2c"; + nvidia,bpmp-bus-id = <5>; + #address-cells = <1>; + #size-cells = <0>; + }; + + bpmp_thermal: thermal { + compatible = "nvidia,tegra186-bpmp-thermal"; + #thermal-sensor-cells = <1>; + }; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 13 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; + interrupt-parent = <&gic>; + }; +};
include/dt-bindings/clock/tegra194-clock.h new file +653 -0
653 lines not on this page · raw message
include/dt-bindings/gpio/tegra194-gpio.h new file +64 -0
64 lines not on this page · raw message
include/dt-bindings/power/tegra194-powergate.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0 +*/ + +#ifndef __ABI_MACH_T194_POWERGATE_T194_H_ +#define __ABI_MACH_T194_POWERGATE_T194_H_ + +#define TEGRA194_POWER_DOMAIN_AUD 1 +#define TEGRA194_POWER_DOMAIN_DISP 2 +#define TEGRA194_POWER_DOMAIN_DISPB 3 +#define TEGRA194_POWER_DOMAIN_DISPC 4 +#define TEGRA194_POWER_DOMAIN_ISPA 5 +#define TEGRA194_POWER_DOMAIN_NVDECA 6 +#define TEGRA194_POWER_DOMAIN_NVJPG 7 +#define TEGRA194_POWER_DOMAIN_NVENCA 8 +#define TEGRA194_POWER_DOMAIN_NVENCB 9 +#define TEGRA194_POWER_DOMAIN_NVDECB 10 +#define TEGRA194_POWER_DOMAIN_SAX 11 +#define TEGRA194_POWER_DOMAIN_VE 12 +#define TEGRA194_POWER_DOMAIN_VIC 13 +#define TEGRA194_POWER_DOMAIN_XUSBA 14 +#define TEGRA194_POWER_DOMAIN_XUSBB 15 +#define TEGRA194_POWER_DOMAIN_XUSBC 16 +#define TEGRA194_POWER_DOMAIN_PCIEX8A 17 +#define TEGRA194_POWER_DOMAIN_PCIEX4A 18 +#define TEGRA194_POWER_DOMAIN_PCIEX1A 19 +#define TEGRA194_POWER_DOMAIN_PCIEX8B 21 +#define TEGRA194_POWER_DOMAIN_PVAA 22 +#define TEGRA194_POWER_DOMAIN_PVAB 23 +#define TEGRA194_POWER_DOMAIN_DLAA 24 +#define TEGRA194_POWER_DOMAIN_DLAB 25 +#define TEGRA194_POWER_DOMAIN_CV 26 +#define TEGRA194_POWER_DOMAIN_GPU 27 +#define TEGRA194_POWER_DOMAIN_MAX 27 + +#endif
include/dt-bindings/reset/tegra194-reset.h new file +155 -0
155 lines not on this page · raw message
Signature · 1 line
2.16.1
Re: [PATCH v3 6/7] arm64: tegra: Add Tegra194 chip device tree
Mikko,
Quoted 4 lines · Mikko Perttunen
Add the chip-level device tree, including binding headers, for the NVIDIA Tegra194 "Xavier" system-on-chip. Only a small subset of devices are initially available, enough to boot to UART console.
Quoted 8 lines
Signed-off-by Mikko Perttunen <[email protected]>---
Notes:
v3:
- added hypervisor-related apertures to GIC node
- removed GPL boilerplate in favor of SPDX and harmonized copyright headers
Thanks for this boilerplate removal! but see a few nits below.
<snip>
include/dt-bindings/clock/tegra194-clock.h line 5
Quoted 8 lines
include/dt-bindings/clock/tegra194-clock.h new file +5
-0@@ -0,0 +1,653 @@ +/* +* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0 +*/
The proper style should be this for a .h header on the first line per [1]
include/dt-bindings/clock/tegra194-clock.h line 5
Quoted 5 lines
include/dt-bindings/clock/tegra194-clock.h new file +5
-0+/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +* +*/
<snip>
include/dt-bindings/gpio/tegra194-gpio.h line 6
Quoted 9 lines
include/dt-bindings/gpio/tegra194-gpio.h new file +6
-0@@ -0,0 +1,64 @@ +/* +* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0 +*/ +
<snip>
Same as above
include/dt-bindings/power/tegra194-powergate.h line 5
Quoted 8 lines
include/dt-bindings/power/tegra194-powergate.h new file +5
-0@@ -0,0 +1,38 @@ +/* +* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0 +*/
<snip>
Same as above
include/dt-bindings/reset/tegra194-reset.h line 5
Quoted 8 lines
include/dt-bindings/reset/tegra194-reset.h new file +5
-0@@ -0,0 +1,155 @@ +/* +* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0 +*/
<snip>
Same as above
Signature · 2 lines
Cordially Philippe Ombredanne
Re: [PATCH v3 6/7] arm64: tegra: Add Tegra194 chip device tree
Quoted 20 lines · Philippe Ombredanne
Mikko,
Quoted 4 lines · Mikko Perttunen
Add the chip-level device tree, including binding headers, for the NVIDIA Tegra194 "Xavier" system-on-chip. Only a small subset of devices are initially available, enough to boot to UART console.
Quoted 8 lines
Signed-off-by Mikko Perttunen <[email protected]>---
Notes:
v3:
- added hypervisor-related apertures to GIC node
- removed GPL boilerplate in favor of SPDX and harmonized copyright headersThanks for this boilerplate removal! but see a few nits below.
<snip>
Quoted 10 lines
include/dt-bindings/clock/tegra194-clock.h line 5
Quoted 8 lines
include/dt-bindings/clock/tegra194-clock.h new file +5
-0@@ -0,0 +1,653 @@ +/* +* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0 +*/ The proper style should be this for a .h header on the first line per [1]
I see -- I'll fix this in v4 (or if there are no further issues maybe Thierry can fix this while applying?:)
Mikko
Quoted 51 lines
include/dt-bindings/clock/tegra194-clock.h line 5
Quoted 6 lines
include/dt-bindings/clock/tegra194-clock.h new file +5
-0+/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +* +*/ <snip>
include/dt-bindings/gpio/tegra194-gpio.h line 6
Quoted 9 lines
include/dt-bindings/gpio/tegra194-gpio.h new file +6
-0@@ -0,0 +1,64 @@ +/* +* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0 +*/ +<snip>
Same as above
include/dt-bindings/power/tegra194-powergate.h line 5
Quoted 8 lines
include/dt-bindings/power/tegra194-powergate.h new file +5
-0@@ -0,0 +1,38 @@ +/* +* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0 +*/ <snip>
Same as above
include/dt-bindings/reset/tegra194-reset.h line 5
Quoted 8 lines
include/dt-bindings/reset/tegra194-reset.h new file +5
-0@@ -0,0 +1,155 @@ +/* +* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0 +*/ <snip>
Same as above
PATCH v3 7/7 arm64: tegra: Add device tree for the Tegra194 P2972-0000 board
In reply to Mikko PerttunenAdd device tree files for the Tegra194 P2972-0000 development board. The board consists of the P2888 compute module and the P2822 baseboard.
--- arch/arm64/boot/dts/nvidia/Makefile | 1 + arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 248 +++++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 16 ++ 3 files changed, 265 insertions(+) create mode 100644 arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi create mode 100644 arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts
arch/arm64/boot/dts/nvidia/Makefile +1 -0
@@ -5,3 +5,4 @@ dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2371-2180.dtb dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2571.dtb dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-smaug.dtb dtb-$(CONFIG_ARCH_TEGRA_186_SOC) += tegra186-p2771-0000.dtb +dtb-$(CONFIG_ARCH_TEGRA_194_SOC) += tegra194-p2972-0000.dtb
arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi new file +248 -0
248 lines not on this page · raw message
arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts new file +16 -0
@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include "tegra194-p2888.dtsi" + +/ { + model = "NVIDIA Tegra194 P2972-0000 Development Board"; + compatible = "nvidia,p2972-0000", "nvidia,tegra194"; + + cbb { + /* SDMMC1 (SD/MMC) */ + sdhci at 3400000 { + status = "okay"; + }; + }; +};
Signature · 1 line
2.16.1