ARM: tegra: lg_x3: upgrade video bindings
Upgrade LG P895 and P880 device tree bindings according to preliminary
upstream Linux tree. Once Linux catches up, LG X3 can be switched to
OF_UPSTREAM without regressions.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
diff --git a/arch/arm/dts/tegra30-lg-p880.dts b/arch/arm/dts/tegra30-lg-p880.dts
index 1d5ca14..ab59931 100644
--- a/arch/arm/dts/tegra30-lg-p880.dts
+++ b/arch/arm/dts/tegra30-lg-p880.dts
@@ -101,6 +101,31 @@
};
};
+ spi@7000dc00 {
+ bridge-spi@2 {
+ /*
+ * JDI 4.57" 720x1280 DX12D100VM0EAA MIPI DSI panel
+ */
+ panel@0 {
+ compatible = "jdi,dx12d100vm0eaa";
+ reg = <0>;
+
+ reset-gpios = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_LOW>;
+
+ vdd-supply = <&vcc_3v0_lcd>;
+ vddio-supply = <&iovcc_1v8_lcd>;
+
+ backlight = <&backlight>;
+
+ port {
+ panel_input: endpoint {
+ remote-endpoint = <&bridge_output>;
+ };
+ };
+ };
+ };
+ };
+
sdmmc3: sdhci@78000400 {
status = "okay";
bus-width = <4>;
@@ -118,13 +143,4 @@
linux,code = <KEY_UP>;
};
};
-
- panel: panel {
- compatible = "jdi,dx12d100vm0eaa";
-
- enable-gpios = <&gpio TEGRA_GPIO(Y, 0) GPIO_ACTIVE_HIGH>;
- reset-gpios = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_HIGH>;
-
- backlight = <&backlight>;
- };
};
diff --git a/arch/arm/dts/tegra30-lg-p895.dts b/arch/arm/dts/tegra30-lg-p895.dts
index 43bb373..988e772 100644
--- a/arch/arm/dts/tegra30-lg-p895.dts
+++ b/arch/arm/dts/tegra30-lg-p895.dts
@@ -108,36 +108,37 @@
};
};
- panel: panel {
- compatible = "hitachi,tx13d100vm0eaa";
+ 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_HIGH>;
+ reset-gpios = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_LOW>;
- renesas,gamma = <3>;
- renesas,inversion;
- renesas,contrast;
+ renesas,gamma = <3>;
+ renesas,inversion;
+ renesas,contrast;
- vcc-supply = <&vcc_3v0_lcd>;
- iovcc-supply = <&iovcc_1v8_lcd>;
+ vcc-supply = <&vcc_3v0_lcd>;
+ iovcc-supply = <&iovcc_1v8_lcd>;
- backlight = <&backlight>;
- };
+ backlight = <&backlight>;
- vcc_3v0_lcd: regulator-lcd {
- compatible = "regulator-fixed";
- regulator-name = "vcc_3v0_lcd";
- regulator-min-microvolt = <3000000>;
- regulator-max-microvolt = <3000000>;
- gpio = <&gpio TEGRA_GPIO(BB, 0) GPIO_ACTIVE_HIGH>;
- enable-active-high;
+ port {
+ panel_input: endpoint {
+ remote-endpoint = <&bridge_output>;
+ };
+ };
+ };
+ };
};
- iovcc_1v8_lcd: regulator-lcdvio {
- compatible = "regulator-fixed";
- regulator-name = "iovcc_1v8_lcd";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- gpio = <&gpio TEGRA_GPIO(Y, 0) GPIO_ACTIVE_HIGH>;
+ regulator-lcd3v {
+ gpio = <&gpio TEGRA_GPIO(BB, 0) GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
diff --git a/arch/arm/dts/tegra30-lg-x3.dtsi b/arch/arm/dts/tegra30-lg-x3.dtsi
index 30d6dcb..40b0ee0 100644
--- a/arch/arm/dts/tegra30-lg-x3.dtsi
+++ b/arch/arm/dts/tegra30-lg-x3.dtsi
@@ -32,7 +32,12 @@
rgb {
status = "okay";
- nvidia,panel = <&bridge>;
+ port {
+ dpi_output: endpoint {
+ remote-endpoint = <&bridge_input>;
+ bus-width = <24>;
+ };
+ };
};
};
};
@@ -890,12 +895,22 @@
status = "okay";
clock-frequency = <400000>;
- backlight: lm3533@36 {
+ backlight: led-controller@36 {
compatible = "ti,lm3533";
reg = <0x36>;
enable-gpios = <&gpio TEGRA_GPIO(N, 6) GPIO_ACTIVE_HIGH>;
- default-brightness-level = <128>;
+
+ ti,boost-ovp-microvolt = <24000000>;
+ ti,boost-freq-hz = <500000>;
+
+ backlight-0 {
+ compatible = "ti,lm3533-backlight";
+
+ ti,max-current-microamp = <23400>;
+ ti,linear-mapping-mode;
+ ti,hardware-controlled;
+ };
};
muic@44 {
@@ -969,18 +984,46 @@
compatible = "solomon,ssd2825";
reg = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
spi-cpol;
spi-cpha;
spi-max-frequency = <1000000>;
- power-gpios = <&gpio TEGRA_GPIO(B, 1) GPIO_ACTIVE_HIGH>;
- reset-gpios = <&gpio TEGRA_GPIO(O, 2) GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio TEGRA_GPIO(O, 2) GPIO_ACTIVE_LOW>;
+
+ dvdd-supply = <&vdd_1v2_rgb>;
+ avdd-supply = <&vdd_1v2_rgb>;
+ vddio-supply = <&vdd_1v8_vio>;
+
+ solomon,hs-zero-delay-ns = <300>;
+ solomon,hs-prep-delay-ns = <65>;
clocks = <&ssd2825_refclk>;
- clock-names = "tx_clk";
- panel = <&panel>;
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ bridge_input: endpoint {
+ remote-endpoint = <&dpi_output>;
+ bus-width = <24>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ bridge_output: endpoint {
+ remote-endpoint = <&panel_input>;
+ };
+ };
+ };
};
};
@@ -1036,4 +1079,29 @@
linux,code = <KEY_DOWN>;
};
};
+
+ vdd_1v2_rgb: regulator-rgb1v2 {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd_1v2_rgb";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ gpio = <&gpio TEGRA_GPIO(B, 1) GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ vcc_3v0_lcd: regulator-lcd3v {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_3v0_lcd";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ };
+
+ iovcc_1v8_lcd: regulator-lcd1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "iovcc_1v8_lcd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ gpio = <&gpio TEGRA_GPIO(Y, 0) GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
};
diff --git a/configs/x3_t30_defconfig b/configs/x3_t30_defconfig
index 2d72a3b..d032635 100644
--- a/configs/x3_t30_defconfig
+++ b/configs/x3_t30_defconfig
@@ -82,6 +82,7 @@
CONFIG_USB_GADGET_PRODUCT_NUM=0x7100
CONFIG_CI_UDC=y
CONFIG_VIDEO=y
+CONFIG_VIDEO_BRIDGE=y
# CONFIG_VIDEO_LOGO is not set
CONFIG_BACKLIGHT_LM3533=y
CONFIG_VIDEO_BRIDGE_SOLOMON_SSD2825=y