Skip to content

Commit

Permalink
Pull request torvalds#224: Dsi functional with Rpi panel on AM62L
Browse files Browse the repository at this point in the history
Merge in LCPD-PRIV-SDK/ti-linux-kernel from ~A0496624/ti-linux-kernel_lcpdpriv:dsi_functional to am62lxx-wakeup

* commit '8d360bf796d3565f55b18b5e4f1b03c67da6d01b': (22 commits)
  arm64: ti: k3-am62l: Add ranges for DSI and DPHY Tx
  arm64: dts: ti: k3-am62l: Enable I2C0
  arm64: dts: ti: k3-am62l3-evm: Add DSI RPi Panel
  arm64: defconfig: Add Rpi Panel Regulator and Bridge
  arm64: defconfig: Add cdns-dsi
  arm64: dts: ti: k3-j721e-beagleboneai64: Add DSI RPi Panel
  arm64: dts: ti: k3-j721e-main: Add DSI and DPHY-TX
  drm/panel: simple: Add VESA timings for Raspberry Pi 7" DSI panel
  dt-bindings: display: simple: Add Raspberry Pi Panel
  drm/bridge: cdns-dsi: Use pre_enable/post_disable to enable/disable
  drm/atomic-helper: Re-order bridge chain pre-enable and post-disable
  drm/atomic-helper: Separate out Encoder-Bridge enable and disable
  drm/bridge: cdns-dsi: Move DSI mode check to _atomic_check()
  drm/bridge: cdns-dsi: Support atomic bridge APIs
  drm/mipi-dsi: Add helper to find input format
  drm/bridge: cdns-dsi: Wait for Clk and Data Lanes to be ready
  drm/bridge: cdns-dsi: Check return value when getting default PHY config
  drm/bridge: cdns-dsi: Fix the clock variable for mode_valid()
  drm/bridge: cdns-dsi: Fix the link and phy init order
  drm/bridge: cdns-dsi: Fix Phy _init() and _exit()
  ...
  • Loading branch information
Devarsh Thakkar authored and r-vignesh committed Oct 22, 2024
2 parents cabc557 + 8d360bf commit c777ce9
Show file tree
Hide file tree
Showing 16 changed files with 623 additions and 115 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ properties:
- qiaodian,qd43003c0-40
# Shenzhen QiShenglong Industrialist Co., Ltd. Gopher 2b 4.3" 480(RGB)x272 TFT LCD panel
- qishenglong,gopher2b-lcd
# Raspberry Pi 7" LCD Panel
- raspberrypi,7inch-dsi
# Rocktech Displays Ltd. RK101II01D-CT 10.1" TFT 1280x800
- rocktech,rk101ii01d-ct
# Rocktech Display Ltd. RK070ER9427 800(RGB)x480 TFT LCD panel
Expand Down
12 changes: 11 additions & 1 deletion arch/arm64/boot/dts/ti/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62a7-phyboard-lyra-rdk.dtb

# Boards with AM62Lx SoC
dtb-$(CONFIG_ARCH_K3) += k3-am62l3-evm.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am62l3-evm-dsi-rpi-7inch-panel.dtbo

# Boards with AM62Px SoC
dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
Expand Down Expand Up @@ -104,6 +105,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-j7200-evm.dtb
k3-j721e-evm-dtbs := k3-j721e-common-proc-board.dtb k3-j721e-evm-quad-port-eth-exp.dtbo
dtb-$(CONFIG_ARCH_K3) += k3-j721e-beagleboneai64.dtb
dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board-infotainment.dtbo
dtb-$(CONFIG_ARCH_K3) += k3-j721e-beagleboneai64-dsi-rpi-7inch-panel.dtbo
dtb-$(CONFIG_ARCH_K3) += k3-j721e-evm.dtb
dtb-$(CONFIG_ARCH_K3) += k3-j721e-evm-gesi-exp-board.dtbo
dtb-$(CONFIG_ARCH_K3) += k3-j721e-evm-pcie0-ep.dtbo
Expand Down Expand Up @@ -193,6 +195,8 @@ k3-am69-sk-csi2-dual-imx219-dtbs := k3-am69-sk.dtb \
k3-j721e-sk-csi2-dual-imx219.dtbo
k3-j721e-common-proc-board-infotainment-dtbs := k3-j721e-common-proc-board.dtb \
k3-j721e-common-proc-board-infotainment.dtbo
k3-j721e-beagleboneai64-dsi-rpi-7inch-panel-dtbs := k3-j721e-beagleboneai64.dtb \
k3-j721e-beagleboneai64-dsi-rpi-7inch-panel.dtbo
k3-j721e-evm-pcie0-ep-dtbs := k3-j721e-common-proc-board.dtb \
k3-j721e-evm-pcie0-ep.dtbo
k3-j721e-sk-csi2-dual-imx219-dtbs := k3-j721e-sk.dtb \
Expand All @@ -205,6 +209,8 @@ k3-j784s4-evm-quad-port-eth-exp1-dtbs := k3-j784s4-evm.dtb \
k3-j784s4-evm-quad-port-eth-exp1.dtbo
k3-j784s4-evm-usxgmii-exp1-exp2-dtbs := k3-j784s4-evm.dtb \
k3-j784s4-evm-usxgmii-exp1-exp2.dtbo
k3-am62l3-evm-dsi-rpi-7inch-panel-dtbs := k3-am62l3-evm.dtb \
k3-am62l3-evm-dsi-rpi-7inch-panel.dtbo
dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
k3-am625-beagleplay-csi2-tevi-ov5640.dtb \
k3-am625-sk-csi2-imx219.dtb \
Expand All @@ -225,18 +231,21 @@ dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
k3-am68-sk-base-board-csi2-dual-imx219.dtb \
k3-am69-sk-csi2-dual-imx219.dtb \
k3-j721e-common-proc-board-infotainment.dtb \
k3-j721e-beagleboneai64-dsi-rpi-7inch-panel.dtb \
k3-j721e-evm-pcie0-ep.dtb \
k3-j721e-sk-csi2-dual-imx219.dtb \
k3-j721s2-evm-pcie1-ep.dtb \
k3-j784s4-evm-pcie0-pcie1-ep.dtb \
k3-j784s4-evm-quad-port-eth-exp1.dtb \
k3-j784s4-evm-usxgmii-exp1-exp2.dtb
k3-j784s4-evm-usxgmii-exp1-exp2.dtb \
k3-am62l3-evm-dsi-rpi-7inch-panel.dtb

# Enable support for device-tree overlays
DTC_FLAGS_k3-am625-beagleplay += -@
DTC_FLAGS_k3-am625-phyboard-lyra-rdk += -@
DTC_FLAGS_k3-am62a7-phyboard-lyra-rdk += -@
DTC_FLAGS_k3-am625-sk += -@
DTC_FLAGS_k3-am62l3-evm += -@
DTC_FLAGS_k3-am62-lp-sk += -@
DTC_FLAGS_k3-am62a7-sk += -@
DTC_FLAGS_k3-am62p5-sk += -@
Expand All @@ -246,6 +255,7 @@ DTC_FLAGS_k3-am642-tqma64xxl-mbax4xxl += -@
DTC_FLAGS_k3-am6548-iot2050-advanced-m2 += -@
DTC_FLAGS_k3-am68-sk-base-board += -@
DTC_FLAGS_k3-am69-sk += -@
DTC_FLAGS_k3-j721e-beagleboneai64 += -@
DTC_FLAGS_k3-j721e-common-proc-board += -@
DTC_FLAGS_k3-j721e-sk += -@
DTC_FLAGS_k3-j721s2-common-proc-board += -@
Expand Down
3 changes: 3 additions & 0 deletions arch/arm64/boot/dts/ti/k3-am62l.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@
<0x00 0x08000000 0x00 0x08000000 0x00 0x00200000>, /* Main CPSW */
<0x00 0x0e000000 0x00 0x0e000000 0x00 0x01d20000>, /* Second peripheral window */
<0x00 0x20000000 0x00 0x20000000 0x00 0x0a008000>, /* Third peripheral window */
<0x00 0x301C0000 0x00 0x301C0000 0x00 0x00001000>, /* DPHY-TX */
<0x00 0x30200000 0x00 0x30200000 0x00 0x00400000>, /* DSS */
<0x00 0x30270000 0x00 0x30270000 0x00 0x00010000>, /* DSI Wrapper */
<0x00 0x30500000 0x00 0x30500000 0x00 0x00100000>, /* DSI Config */
<0x00 0x31000000 0x00 0x31000000 0x00 0x00050000>, /* USB0 DWC3 Core window */
<0x00 0x31100000 0x00 0x31100000 0x00 0x00050000>, /* USB1 DWC3 Core window */
<0x00 0x3b000000 0x00 0x3b000000 0x00 0x00001000>, /* GPMC0 */
Expand Down
125 changes: 125 additions & 0 deletions arch/arm64/boot/dts/ti/k3-am62l3-evm-dsi-rpi-7inch-panel.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/**
* DT Overlay for RPi 7inch touchscreen panel interfaced with DSI on
* AM62L3 EVM.
*
* RPi DSI Panel: https://www.raspberrypi.com/products/raspberry-pi-touch-display/
*
* Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
*/

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>

#include "k3-pinctrl.h"

&{/} {
bridge_reg: bridge-regulator {
compatible = "regulator-fixed";
regulator-name = "bridge-reg";
gpio = <&display_reg 0 0>;
vin-supply = <&display_reg>;
enable-active-high;
};

panel0 {
compatible = "raspberrypi,7inch-dsi", "simple-panel";
backlight = <&display_reg>;
power-supply = <&display_reg>;
port {
panel_in: endpoint {
remote-endpoint = <&panel_bridge_out>;
};
};
};
};

&main_i2c0 {
#address-cells = <1>;
#size-cells = <0>;

display_reg: regulator@45 {
compatible = "raspberrypi,7inch-touchscreen-panel-regulator";
reg = <0x45>;
gpio-controller;
#gpio-cells = <2>;
};

touch-controller@38 {
compatible = "edt,edt-ft5406";
reg = <0x38>;

touchscreen-size-x = < 800 >;
touchscreen-size-y = < 480 >;

vcc-supply = <&display_reg>;
reset-gpio = <&display_reg 1 1>;

touchscreen-inverted-x;
touchscreen-inverted-y;
};
};

&dss_ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;

dpi_out: endpoint {
remote-endpoint = <&dsi0_in>;
};
};
};

&dsi0 {
#address-cells = <1>;
#size-cells = <0>;

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
dsi0_out: endpoint {
remote-endpoint = <&panel_bridge_in>;
};
};

port@1 {
reg = <1>;
dsi0_in: endpoint {
remote-endpoint = <&dpi_out>;
};
};
};

bridge@0 {
compatible = "toshiba,tc358762";
reg = <0>;
vddc-supply = <&bridge_reg>;
ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
panel_bridge_in: endpoint {
remote-endpoint = <&dsi0_out>;
};
};

port@1 {
reg = <1>;
panel_bridge_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
};
};
};
11 changes: 11 additions & 0 deletions arch/arm64/boot/dts/ti/k3-am62l3-evm.dts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@
};

&pinmux {
main_i2c0_pins_default: main-i2c0-default-pins {
pinctrl-single,pins = <
AM62PX_IOPAD(0x01cc, PIN_INPUT_PULLUP, 0) /* (B7) I2C0_SCL */
AM62PX_IOPAD(0x01d0, PIN_INPUT_PULLUP, 0) /* (A7) I2C0_SDA */
>;
bootph-all;
};

main_i2c1_pins_default: main-i2c1-default-pins {
pinctrl-single,pins = <
AM62PX_IOPAD(0x01d4, PIN_INPUT_PULLUP, 0) /* (D7) I2C1_SCL */
Expand Down Expand Up @@ -311,6 +319,9 @@

&main_i2c0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_i2c0_pins_default>;
clock-frequency = <400000>;
bootph-all;
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/**
* DT Overlay for RPi 7inch touchscreen panel interfaced with DSI on
* J721E based BeagleBone AI-64 (BBAI-64) platform.
*
* BBAI-64: https://www.beagleboard.org/boards/beaglebone-ai-64
* RPi DSI Panel: https://www.raspberrypi.com/products/raspberry-pi-touch-display/
*
* Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
*/

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>

#include "k3-pinctrl.h"

&{/} {
bridge_reg: bridge-regulator {
compatible = "regulator-fixed";
regulator-name = "bridge-reg";
gpio = <&display_reg 0 0>;
vin-supply = <&display_reg>;
enable-active-high;
};

panel0 {
compatible = "raspberrypi,7inch-dsi", "simple-panel";
backlight = <&display_reg>;
power-supply = <&display_reg>;
port {
panel_in: endpoint {
remote-endpoint = <&panel_bridge_out>;
};
};
};
};

&main_pmx0 {
dsi_main_i2c4_pins: dsi-main-i2c4-pins {
pinctrl-single,pins = <
J721E_IOPAD(0xa8, PIN_INPUT_PULLUP, 2) /* (AD19) PRG1_MDIO0_MDIO.I2C4_SCL */
J721E_IOPAD(0xac, PIN_INPUT_PULLUP, 2) /* (AD18) PRG1_MDIO0_MDC.I2C4_SDA */
>;
};
};

&main_i2c4 {
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&dsi_main_i2c4_pins>;
#address-cells = <1>;
#size-cells = <0>;

display_reg: regulator@45 {
compatible = "raspberrypi,7inch-touchscreen-panel-regulator";
reg = <0x45>;
gpio-controller;
#gpio-cells = <2>;
};

touch-controller@38 {
compatible = "edt,edt-ft5406";
reg = <0x38>;

touchscreen-size-x = < 800 >;
touchscreen-size-y = < 480 >;

vcc-supply = <&display_reg>;
reset-gpio = <&display_reg 1 1>;

touchscreen-inverted-x;
touchscreen-inverted-y;
};
};

&dss_ports {
#address-cells = <1>;
#size-cells = <0>;

port@2 {
reg = <2>;

dpi2_out: endpoint {
remote-endpoint = <&dsi0_in>;
};
};
};

&dphy2 {
status = "okay";
};

&dsi0 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
dsi0_out: endpoint {
remote-endpoint = <&panel_bridge_in>;
};
};

port@1 {
reg = <1>;
dsi0_in: endpoint {
remote-endpoint = <&dpi2_out>;
};
};
};

bridge@0 {
compatible = "toshiba,tc358762";
reg = <0>;
vddc-supply = <&bridge_reg>;
ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
panel_bridge_in: endpoint {
remote-endpoint = <&dsi0_out>;
};
};

port@1 {
reg = <1>;
panel_bridge_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
};
};

};
7 changes: 6 additions & 1 deletion arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,12 @@
};

&dss_ports {
port {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;

dpi0_out: endpoint {
remote-endpoint = <&dp0_in>;
};
Expand Down
Loading

0 comments on commit c777ce9

Please sign in to comment.