Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/bridge/thead,th1520-dw-hdmi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: T-Head TH1520 DesignWare HDMI TX Encoder

maintainers:
- Icenowy Zheng <uwu@icenowy.me>

description:
The HDMI transmitter is a Synopsys DesignWare HDMI TX controller
paired with a DesignWare HDMI Gen2 TX PHY.

allOf:
- $ref: /schemas/display/bridge/synopsys,dw-hdmi.yaml#

properties:
compatible:
enum:
- thead,th1520-dw-hdmi

reg-io-width:
const: 4

clocks:
maxItems: 4

clock-names:
items:
- const: iahb
- const: isfr
- const: cec
- const: pix

resets:
items:
- description: Main reset
- description: Configuration APB reset

reset-names:
items:
- const: main
- const: apb

ports:
$ref: /schemas/graph.yaml#/properties/ports

properties:
port@0:
$ref: /schemas/graph.yaml#/properties/port
description: Input port connected to DC8200 DPU "DP" output

port@1:
$ref: /schemas/graph.yaml#/properties/port
description: HDMI output port

required:
- port@0
- port@1

required:
- compatible
- reg
- reg-io-width
- clocks
- clock-names
- resets
- reset-names
- interrupts
- ports

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/thead,th1520-clk-ap.h>
#include <dt-bindings/reset/thead,th1520-reset.h>

soc {
#address-cells = <2>;
#size-cells = <2>;

hdmi@ffef540000 {
compatible = "thead,th1520-dw-hdmi";
reg = <0xff 0xef540000 0x0 0x40000>;
reg-io-width = <4>;
interrupts = <111 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_vo CLK_HDMI_PCLK>,
<&clk_vo CLK_HDMI_SFR>,
<&clk_vo CLK_HDMI_CEC>,
<&clk_vo CLK_HDMI_PIXCLK>;
clock-names = "iahb", "isfr", "cec", "pix";
resets = <&rst_vo TH1520_RESET_ID_HDMI>,
<&rst_vo TH1520_RESET_ID_HDMI_APB>;
reset-names = "main", "apb";

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

hdmi_in: endpoint {
remote-endpoint = <&dpu_out_dp1>;
};
};

port@1 {
reg = <1>;

hdmi_out_conn: endpoint {
remote-endpoint = <&hdmi_conn_in>;
};
};
};
};
};
127 changes: 127 additions & 0 deletions Documentation/devicetree/bindings/display/verisilicon,dc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/verisilicon,dc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Verisilicon DC-series display controllers

maintainers:
- Icenowy Zheng <uwu@icenowy.me>

properties:
$nodename:
pattern: "^display@[0-9a-f]+$"

compatible:
const: verisilicon,dc

reg:
maxItems: 1

interrupts:
maxItems: 1

clocks:
items:
- description: DC Core clock
- description: DMA AXI bus clock
- description: Configuration AHB bus clock
- description: Pixel clock of output 0
- description: Pixel clock of output 1
minItems: 4

clock-names:
items:
- const: core
- const: axi
- const: ahb
- const: pix0
- const: pix1
minItems: 4

resets:
items:
- description: DC Core reset
- description: DMA AXI bus reset
- description: Configuration AHB bus reset

reset-names:
items:
- const: core
- const: axi
- const: ahb

ports:
$ref: /schemas/graph.yaml#/properties/ports

properties:
port@0:
$ref: /schemas/graph.yaml#/properties/port
description: The first output channel, endpoint 0 should be
used for DPI format output and endpoint 1 should be used
for DP format output.

port@1:
$ref: /schemas/graph.yaml#/properties/port
description: The second output channel if the DC variant
supports and used. Follow the same endpoint addressing
rule with the first port.

required:
- port@0

required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- ports

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/thead,th1520-clk-ap.h>
#include <dt-bindings/reset/thead,th1520-reset.h>
soc {
#address-cells = <2>;
#size-cells = <2>;

display@ffef600000 {
compatible = "verisilicon,dc";
reg = <0xff 0xef600000 0x0 0x100000>;
interrupts = <93 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_vo CLK_DPU_CCLK>,
<&clk_vo CLK_DPU_ACLK>,
<&clk_vo CLK_DPU_HCLK>,
<&clk_vo CLK_DPU_PIXELCLK0>,
<&clk_vo CLK_DPU_PIXELCLK1>;
clock-names = "core", "axi", "ahb", "pix0", "pix1";
resets = <&rst TH1520_RESET_ID_DPU_CORE>,
<&rst TH1520_RESET_ID_DPU_AXI>,
<&rst TH1520_RESET_ID_DPU_AHB>;
reset-names = "core", "axi", "ahb";

ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
};

port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;

dpu_out_dp1: endpoint@1 {
reg = <1>;
remote-endpoint = <&hdmi_in>;
};
};
};
};
};
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/vendor-prefixes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,8 @@ patternProperties:
description: Variscite Ltd.
"^vdl,.*":
description: Van der Laan b.v.
"^verisilicon,.*":
description: VeriSilicon Microelectronics (Shanghai) Co., Ltd.
"^vertexcom,.*":
description: Vertexcom Technologies, Inc.
"^via,.*":
Expand Down
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -8385,6 +8385,13 @@ F: Documentation/devicetree/bindings/display/brcm,bcm2835-*.yaml
F: drivers/gpu/drm/vc4/
F: include/uapi/drm/vc4_drm.h

DRM DRIVERS FOR VERISILICON DISPLAY CONTROLLER IP
M: Icenowy Zheng <uwu@icenowy.me>
L: dri-devel@lists.freedesktop.org
S: Maintained
F: Documentation/devicetree/bindings/display/verisilicon,dc.yaml
F: drivers/gpu/drm/verisilicon/

DRM DRIVERS FOR VIVANTE GPU IP
M: Lucas Stach <l.stach@pengutronix.de>
R: Russell King <linux+etnaviv@armlinux.org.uk>
Expand Down Expand Up @@ -21728,6 +21735,7 @@ F: Documentation/devicetree/bindings/reset/thead,th1520-reset.yaml
F: arch/riscv/boot/dts/thead/
F: drivers/clk/thead/clk-th1520-ap.c
F: drivers/firmware/thead,th1520-aon.c
F: drivers/gpu/drm/bridge/th1520-dw-hdmi.c
F: drivers/mailbox/mailbox-th1520.c
F: drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c
F: drivers/pinctrl/pinctrl-th1520.c
Expand Down
25 changes: 25 additions & 0 deletions arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@
chosen {
stdout-path = "serial0:115200n8";
};

hdmi-connector {
compatible = "hdmi-connector";
type = "a";

port {
hdmi_con_in: endpoint {
remote-endpoint = <&hdmi_out_con>;
};
};
};
};

&padctrl0_apsys {
Expand All @@ -54,6 +65,20 @@
};
};

&dpu {
status = "okay";
};

&hdmi {
status = "okay";
};

&hdmi_out_port {
hdmi_out_con: endpoint {
remote-endpoint = <&hdmi_con_in>;
};
};

&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
Expand Down
70 changes: 70 additions & 0 deletions arch/riscv/boot/dts/thead/th1520.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,76 @@
#clock-cells = <1>;
};

hdmi: hdmi@ffef540000 {
compatible = "thead,th1520-dw-hdmi";
reg = <0xff 0xef540000 0x0 0x40000>;
reg-io-width = <4>;
interrupts = <111 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_vo CLK_HDMI_PCLK>,
<&clk_vo CLK_HDMI_SFR>,
<&clk_vo CLK_HDMI_CEC>,
<&clk_vo CLK_HDMI_PIXCLK>;
clock-names = "iahb", "isfr", "cec", "pix";
resets = <&rst TH1520_RESET_ID_HDMI>,
<&rst TH1520_RESET_ID_HDMI_APB>;
reset-names = "main", "apb";
status = "disabled";

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

port@0 {
reg = <0>;

hdmi_in: endpoint {
remote-endpoint = <&dpu_out_dp1>;
};
};

hdmi_out_port: port@1 {
reg = <1>;
};
};
};

dpu: display@ffef600000 {
compatible = "verisilicon,dc";
reg = <0xff 0xef600000 0x0 0x100000>;
interrupts = <93 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_vo CLK_DPU_CCLK>,
<&clk_vo CLK_DPU_ACLK>,
<&clk_vo CLK_DPU_HCLK>,
<&clk_vo CLK_DPU_PIXELCLK0>,
<&clk_vo CLK_DPU_PIXELCLK1>;
clock-names = "core", "axi", "ahb", "pix0", "pix1";
resets = <&rst TH1520_RESET_ID_DPU_CORE>,
<&rst TH1520_RESET_ID_DPU_AXI>,
<&rst TH1520_RESET_ID_DPU_AHB>;
reset-names = "core", "axi", "ahb";
status = "disabled";

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

dpu_port0: port@0 {
reg = <0>;
};

dpu_port1: port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;

dpu_out_dp1: endpoint@1 {
reg = <1>;
remote-endpoint = <&hdmi_in>;
};
};
};
};

dmac0: dma-controller@ffefc00000 {
compatible = "snps,axi-dma-1.01a";
reg = <0xff 0xefc00000 0x0 0x1000>;
Expand Down
Loading
Loading