diff options
26 files changed, 1334 insertions, 568 deletions
diff --git a/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt b/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt new file mode 100644 index 000000000000..a905c1413558 --- /dev/null +++ b/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | DesignWare HDMI bridge bindings | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: platform specific such as: | ||
| 5 | * "snps,dw-hdmi-tx" | ||
| 6 | * "fsl,imx6q-hdmi" | ||
| 7 | * "fsl,imx6dl-hdmi" | ||
| 8 | * "rockchip,rk3288-dw-hdmi" | ||
| 9 | - reg: Physical base address and length of the controller's registers. | ||
| 10 | - interrupts: The HDMI interrupt number | ||
| 11 | - clocks, clock-names : must have the phandles to the HDMI iahb and isfr clocks, | ||
| 12 | as described in Documentation/devicetree/bindings/clock/clock-bindings.txt, | ||
| 13 | the clocks are soc specific, the clock-names should be "iahb", "isfr" | ||
| 14 | -port@[X]: SoC specific port nodes with endpoint definitions as defined | ||
| 15 | in Documentation/devicetree/bindings/media/video-interfaces.txt, | ||
| 16 | please refer to the SoC specific binding document: | ||
| 17 | * Documentation/devicetree/bindings/drm/imx/hdmi.txt | ||
| 18 | * Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt | ||
| 19 | |||
| 20 | Optional properties | ||
| 21 | - reg-io-width: the width of the reg:1,4, default set to 1 if not present | ||
| 22 | - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing | ||
| 23 | - clocks, clock-names: phandle to the HDMI CEC clock, name should be "cec" | ||
| 24 | |||
| 25 | Example: | ||
| 26 | hdmi: hdmi@0120000 { | ||
| 27 | compatible = "fsl,imx6q-hdmi"; | ||
| 28 | reg = <0x00120000 0x9000>; | ||
| 29 | interrupts = <0 115 0x04>; | ||
| 30 | gpr = <&gpr>; | ||
| 31 | clocks = <&clks 123>, <&clks 124>; | ||
| 32 | clock-names = "iahb", "isfr"; | ||
| 33 | ddc-i2c-bus = <&i2c2>; | ||
| 34 | |||
| 35 | port@0 { | ||
| 36 | reg = <0>; | ||
| 37 | |||
| 38 | hdmi_mux_0: endpoint { | ||
| 39 | remote-endpoint = <&ipu1_di0_hdmi>; | ||
| 40 | }; | ||
| 41 | }; | ||
| 42 | |||
| 43 | port@1 { | ||
| 44 | reg = <1>; | ||
| 45 | |||
| 46 | hdmi_mux_1: endpoint { | ||
| 47 | remote-endpoint = <&ipu1_di1_hdmi>; | ||
| 48 | }; | ||
| 49 | }; | ||
| 50 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt b/Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt new file mode 100644 index 000000000000..668091f27674 --- /dev/null +++ b/Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | Rockchip specific extensions to the Synopsys Designware HDMI | ||
| 2 | ================================ | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible: "rockchip,rk3288-dw-hdmi"; | ||
| 6 | - reg: Physical base address and length of the controller's registers. | ||
| 7 | - clocks: phandle to hdmi iahb and isfr clocks. | ||
| 8 | - clock-names: should be "iahb" "isfr" | ||
| 9 | - rockchip,grf: this soc should set GRF regs to mux vopl/vopb. | ||
| 10 | - interrupts: HDMI interrupt number | ||
| 11 | - ports: contain a port node with endpoint definitions as defined in | ||
| 12 | Documentation/devicetree/bindings/media/video-interfaces.txt. For | ||
| 13 | vopb,set the reg = <0> and set the reg = <1> for vopl. | ||
| 14 | - reg-io-width: the width of the reg:1,4, the value should be 4 on | ||
| 15 | rk3288 platform | ||
| 16 | |||
| 17 | Optional properties | ||
| 18 | - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing | ||
| 19 | - clocks, clock-names: phandle to the HDMI CEC clock, name should be "cec" | ||
| 20 | |||
| 21 | Example: | ||
| 22 | hdmi: hdmi@ff980000 { | ||
| 23 | compatible = "rockchip,rk3288-dw-hdmi"; | ||
| 24 | reg = <0xff980000 0x20000>; | ||
| 25 | reg-io-width = <4>; | ||
| 26 | ddc-i2c-bus = <&i2c5>; | ||
| 27 | rockchip,grf = <&grf>; | ||
| 28 | interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; | ||
| 29 | clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>; | ||
| 30 | clock-names = "iahb", "isfr"; | ||
| 31 | status = "disabled"; | ||
| 32 | ports { | ||
| 33 | hdmi_in: port { | ||
| 34 | #address-cells = <1>; | ||
| 35 | #size-cells = <0>; | ||
| 36 | hdmi_in_vopb: endpoint@0 { | ||
| 37 | reg = <0>; | ||
| 38 | remote-endpoint = <&vopb_out_hdmi>; | ||
| 39 | }; | ||
| 40 | hdmi_in_vopl: endpoint@1 { | ||
| 41 | reg = <1>; | ||
| 42 | remote-endpoint = <&vopl_out_hdmi>; | ||
| 43 | }; | ||
| 44 | }; | ||
| 45 | }; | ||
| 46 | }; | ||
diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 884923f982d9..b70f3c8d4e8a 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig | |||
| @@ -3,3 +3,8 @@ config DRM_PTN3460 | |||
| 3 | depends on DRM | 3 | depends on DRM |
| 4 | select DRM_KMS_HELPER | 4 | select DRM_KMS_HELPER |
| 5 | ---help--- | 5 | ---help--- |
| 6 | |||
| 7 | config DRM_DW_HDMI | ||
| 8 | tristate | ||
| 9 | depends on DRM | ||
| 10 | select DRM_KMS_HELPER | ||
diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index b4733e1fbd2e..d8a8cfd12fbb 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ccflags-y := -Iinclude/drm | 1 | ccflags-y := -Iinclude/drm |
| 2 | 2 | ||
| 3 | obj-$(CONFIG_DRM_PTN3460) += ptn3460.o | 3 | obj-$(CONFIG_DRM_PTN3460) += ptn3460.o |
| 4 | obj-$(CONFIG_DRM_DW_HDMI) += dw_hdmi.o | ||
diff --git a/drivers/gpu/drm/imx/imx-hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index ddc53e039530..6ea000504173 100644 --- a/drivers/gpu/drm/imx/imx-hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c | |||
| @@ -6,31 +6,26 @@ | |||
| 6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
| 7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
| 8 | * | 8 | * |
| 9 | * SH-Mobile High-Definition Multimedia Interface (HDMI) driver | 9 | * Designware High-Definition Multimedia Interface (HDMI) driver |
| 10 | * for SLISHDMI13T and SLIPHDMIT IP cores | ||
| 11 | * | 10 | * |
| 12 | * Copyright (C) 2010, Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 11 | * Copyright (C) 2010, Guennadi Liakhovetski <g.liakhovetski@gmx.de> |
| 13 | */ | 12 | */ |
| 14 | 13 | #include <linux/module.h> | |
| 15 | #include <linux/component.h> | ||
| 16 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
| 17 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
| 18 | #include <linux/err.h> | 16 | #include <linux/err.h> |
| 19 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
| 20 | #include <linux/hdmi.h> | 18 | #include <linux/hdmi.h> |
| 21 | #include <linux/regmap.h> | ||
| 22 | #include <linux/mfd/syscon.h> | ||
| 23 | #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> | ||
| 24 | |||
