// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "tegra30-lg-x3.dtsi"

/ {
	model = "LG Optimus Vu";
	compatible = "lge,p895", "nvidia,tegra30";

	gpio-keys {
		key-volume-up {
			label = "Volume Up";
			gpios = <&gpio TEGRA_GPIO(I, 6) GPIO_ACTIVE_LOW>;
			linux,code = <KEY_UP>;
		};
	};

	pinmux@70000868 {
		state_default: pinmux {
			/* GNSS UART-B pinmux */
			uartb_cts_rxd {
				nvidia,pins = "uart2_cts_n_pj5",
						"uart2_rxd_pc3";
				nvidia,function = "uartb";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
			};
			uartb_rts_txd {
				nvidia,pins = "uart2_rts_n_pj6",
						"uart2_txd_pc2";
				nvidia,function = "uartb";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
			};
			gps_reset {
				nvidia,pins = "spdif_out_pk5";
				nvidia,function = "spdif";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
			};

			/* GPIO keys pinmux */
			volume_up {
				nvidia,pins = "gmi_cs7_n_pi6";
				nvidia,function = "gmi";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
			};
			memo_key {
				nvidia,pins = "sdmmc3_dat1_pb6";
				nvidia,function = "rsvd1";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
			};

			/* Sensors pinmux */
			current_alert_irq {
				nvidia,pins = "spi1_cs0_n_px6";
				nvidia,function = "gmi";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
			};

			/* Panel pinmux */
			panel_vdd {
				nvidia,pins = "pbb0";
				nvidia,function = "rsvd2";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
			};

			/* AUDIO pinmux */
			sub_mic_ldo {
				nvidia,pins = "gmi_dqs_pi2";
				nvidia,function = "gmi";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
			};

			/* Modem pinmux */
			usim_detect {
				nvidia,pins = "clk2_out_pw5";
				nvidia,function = "rsvd2";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
			};

			/* GPIO power/drive control */
			drive_sdmmc4 {
				nvidia,pins = "drive_gma",
						"drive_gmb",
						"drive_gmc",
						"drive_gmd";
				nvidia,pull-down-strength = <9>;
				nvidia,pull-up-strength = <9>;
				nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_SLOWEST>;
				nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_SLOWEST>;
			};
		};
	};

	spi@7000dc00 {
		bridge-spi@2 {
			/*
			 * HITACHI/KOE 5" 768x1024 TX13D100VM0EAA MIPI DSI panel
			 */
			panel@0 {
				compatible = "koe,tx13d100vm0eaa";
				reg = <0>;

				reset-gpios = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_LOW>;

				renesas,gamma = <3>;
				renesas,column-inversion;
				renesas,contrast;

				vcc-supply = <&vcc_3v0_lcd>;
				iovcc-supply = <&iovcc_1v8_lcd>;

				backlight = <&backlight>;

				port {
					panel_input: endpoint {
						remote-endpoint = <&bridge_output>;
					};
				};
			};
		};
	};

	regulator-lcd3v {
		gpio = <&gpio TEGRA_GPIO(BB, 0) GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};
};
