alistair23-linux/arch/arm/boot/dts/tegra114-tn7.dts
Jon Hunter 0a10e85b6c ARM: tegra: Correct polarity for Tegra114 PMIC interrupt
The ARM GIC only supports interrupts with either level-high or
rising-edge types for SPIs. The interrupt type for the Palmas PMIC used
for Tegra114 boards is specified as level-low which is invalid for the
GIC. This has gone undetected because until recently, failures to set
the interrupt type when the interrupts are mapped via firmware (such as
device-tree) have not been reported. Since commits 4b357daed6
("genirq: Look-up trigger type if not specified by caller") and
1e2a7d7849 ("irqdomain: Don't set type when mapping an IRQ"), failure
to set the interrupt type will cause the requesting of the interrupt to
fail and exposing incorrectly configured interrupts.

Please note that although the interrupt type was never being set for the
Palmas PMIC, it was still working fine, because the default type setting
for the interrupt, 'level-high', happen to match the correct type for
the interrupt.

Finally, it should be noted that the Palmas interrupt from the PMIC is
actually 'level-low', however, this interrupt signal is inverted by the
Tegra PMC and so the GIC actually sees a 'level-high' interrupt which is
what should be specified in the device-tree interrupt specifier.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2016-08-25 17:31:30 -07:00

352 lines
7.4 KiB
Plaintext

/dts-v1/;
#include <dt-bindings/input/input.h>
#include "tegra114.dtsi"
/ {
model = "Tegra Note 7";
compatible = "nvidia,tn7", "nvidia,tegra114";
chosen {
/* TN7's bootloader's arguments need to be overridden */
bootargs = "console=ttyS0,115200n8 console=tty1 gpt fbcon=rotate:2";
/* TN7's bootloader will place initrd at this address */
linux,initrd-start = <0x82000000>;
linux,initrd-end = <0x82800000>;
};
aliases {
serial0 = &uartd;
};
firmware {
trusted-foundations {
compatible = "tlm,trusted-foundations";
tlm,version-major = <2>;
tlm,version-minor = <8>;
};
};
memory {
/* memory >= 0x37e00000 is reserved for firmware usage */
reg = <0x80000000 0x37e00000>;
};
host1x@50000000 {
dsi@54300000 {
status = "okay";
vdd-supply = <&vdd_1v2_ap>;
panel@0 {
compatible = "lg,ld070wx3-sl01";
reg = <0>;
power-supply = <&vdd_lcd>;
backlight = <&backlight>;
};
};
};
serial@70006300 {
status = "okay";
};
pwm@7000a000 {
status = "okay";
};
i2c@7000d000 {
status = "okay";
clock-frequency = <400000>;
palmas: pmic@58 {
compatible = "ti,palmas";
reg = <0x58>;
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
#interrupt-cells = <2>;
interrupt-controller;
ti,system-power-controller;
palmas_gpio: gpio {
compatible = "ti,palmas-gpio";
gpio-controller;
#gpio-cells = <2>;
};
pmic {
compatible = "ti,tps65913-pmic", "ti,palmas-pmic";
ldoln-in-supply = <&vdd_smps10_out2>;
regulators {
smps123 {
regulator-name = "vd-cpu";
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>;
regulator-always-on;
regulator-boot-on;
};
smps45 {
regulator-name = "vd-soc";
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
regulator-always-on;
regulator-boot-on;
};
smps6 {
regulator-name = "va-lcd-hv";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-always-on;
regulator-boot-on;
};
smps7 {
regulator-name = "vd-ddr";
regulator-min-microvolt = <1350000>;
regulator-max-microvolt = <1350000>;
regulator-always-on;
regulator-boot-on;
};
vdd_1v8: smps8 {
regulator-name = "vs-pmu-1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
};
vdd_2v9_sys: smps9 {
regulator-name = "vs-sys-2v9";
regulator-min-microvolt = <2900000>;
regulator-max-microvolt = <2900000>;
regulator-always-on;
regulator-boot-on;
};
vdd_smps10_out1: smps10_out1 {
regulator-name = "vd-smps10-out1";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
regulator-boot-on;
};
vdd_smps10_out2: smps10_out2 {
regulator-name = "vd-smps10-out2";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
regulator-boot-on;
};
ldo1 {
regulator-name = "va-pllx";
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
regulator-always-on;
regulator-boot-on;
};
vdd_1v2_ap: ldo2 {
regulator-name = "va-ap-1v2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-always-on;
regulator-boot-on;
};
ldo3 {
regulator-name = "vd-fuse";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
};
ldo4 {
regulator-name = "vd-ts-hv";
regulator-min-microvolt = <3200000>;
regulator-max-microvolt = <3200000>;
regulator-always-on;
regulator-boot-on;
};
ldo5 {
regulator-name = "va-cam2-hv";
regulator-min-microvolt = <2700000>;
regulator-max-microvolt = <2700000>;
};
ldo6 {
regulator-name = "va-sns-hv";
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2850000>;
};
ldo7 {
regulator-name = "va-cam1-hv";
regulator-min-microvolt = <2700000>;
regulator-max-microvolt = <2700000>;
};
ldo8 {
regulator-name = "va-ap-rtc";
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
ti,enable-ldo8-tracking;
regulator-always-on;
regulator-boot-on;
};
ldo9 {
regulator-name = "vi-sdcard";
regulator-min-microvolt = <2900000>;
regulator-max-microvolt = <2900000>;
};
ldousb {
regulator-name = "avdd-usb";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
regulator-boot-on;
};
ldoln {
regulator-name = "va-hdmi";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
};
};
rtc {
compatible = "ti,palmas-rtc";
interrupt-parent = <&palmas>;
interrupts = <8 0>;
};
};
};
pmc@7000e400 {
nvidia,invert-interrupt;
};
/* eMMC */
sdhci@78000600 {
status = "okay";
bus-width = <8>;
non-removable;
};
usb@7d000000 {
status = "okay";
};
usb-phy@7d000000 {
status = "okay";
nvidia,xcvr-setup = <7>;
nvidia,xcvr-lsfslew = <2>;
nvidia,xcvr-lsrslew = <2>;
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
/* Should be changed to "otg" once we have vbus_supply */
/* As of now, USB devices need to be powered externally */
dr_mode = "host";
};
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm 1 40000>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
power-supply = <&lcd_bl_en>;
};
clocks {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;
clk32k_in: clock@0 {
compatible = "fixed-clock";
reg = <0>;
#clock-cells = <0>;
clock-frequency = <32768>;
};
};
gpio-keys {
compatible = "gpio-keys";
power {
label = "Power";
gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
volume_down {
label = "Volume Down";
gpios = <&gpio TEGRA_GPIO(Q, 2) GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
volume_up {
label = "Volume Up";
gpios = <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
};
regulators {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;
/* FIXME: output of BQ24192 */
vs_sys: regulator@0 {
compatible = "regulator-fixed";
reg = <0>;
regulator-name = "VS_SYS";
regulator-min-microvolt = <4200000>;
regulator-max-microvolt = <4200000>;
regulator-always-on;
regulator-boot-on;
};
lcd_bl_en: regulator@1 {
compatible = "regulator-fixed";
reg = <1>;
regulator-name = "VDD_LCD_BL";
regulator-min-microvolt = <16500000>;
regulator-max-microvolt = <16500000>;
gpio = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
enable-active-high;
vin-supply = <&vs_sys>;
regulator-boot-on;
};
vdd_lcd: regulator@2 {
compatible = "regulator-fixed";
reg = <2>;
regulator-name = "VD_LCD_1V8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
gpio = <&palmas_gpio 4 GPIO_ACTIVE_HIGH>;
enable-active-high;
vin-supply = <&vdd_1v8>;
regulator-boot-on;
};
};
};