MIPS: CI20: add HDMI out support
Subsystems (7)
cover MIPS: CI20: add HDMI out support
This patch series adds HDMI output to the jz4780/CI20 board.
It is based on taking the old 3.18 vendor kernel and trying to achieve the same with modern DTS setup and new/modified drivers.
Unfortunately, in this first RFC, only EDID and creation of /dev/fb0 are working. Also, HDMI hot plugging is detected.
But there is no HDMI output signal. So some tiny piece seems to be missing to enable/configure the Synposys HDMI controller.
We need help from the community to fix this.
Note: device tree bindings are from 2015 and still seem to fit - except they are not in yaml format.
Original authors of most patches are
* Paul Boddie <[email protected]>
* Zubair Lutfullah Kakakhel <[email protected]>
H. Nikolaus Schaller (2):
drm: ingenic-drm: add MODULE_DEVICE_TABLE
MIPS: CI20: defconfig: configure for DRM_DW_HDMI_JZ4780
Paul Boddie (4):
drm: ingenic: add jz4780 Synopsys HDMI driver.
pinctrl: ingenic: add hdmi-ddc pin control group
MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
MIPS: DTS: CI20: add HDMI setup
Zubair Lutfullah Kakakhel (2):
dt-bindings: video: Add jz4780-lcd binding
dt-bindings: video: Add jz4780-hdmi binding
.../bindings/display/ingenic-jz4780-hdmi.txt | 41 ++++++ .../bindings/display/ingenic-jz4780-lcd.txt | 39 ++++++ arch/mips/boot/dts/ingenic/ci20.dts | 64 ++++++++++ arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 +++++ arch/mips/configs/ci20_defconfig | 3 + drivers/gpu/drm/ingenic/Kconfig | 8 ++ drivers/gpu/drm/ingenic/Makefile | 1 + drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c | 120 ++++++++++++++++++ drivers/gpu/drm/ingenic/ingenic-drm.c | 2 + drivers/pinctrl/pinctrl-ingenic.c | 7 + 10 files changed, 317 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.txt create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.txt create mode 100644 drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c
Signature · 1 line
2.23.0
RFC 1/8 dt-bindings: video: Add jz4780-lcd binding
From: Zubair Lutfullah Kakakhel <[email protected]>
Add DT bindings for the LCD controller on the jz4780 SoC
--- .../bindings/display/ingenic-jz4780-lcd.txt | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.txt
Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.txt new file +39 -0
@@ -0,0 +1,39 @@ +Bindings for Ingenic JZ4780 LCD Controller + +LCD Controller is the Display Controller for the Ingenic JZ4780 SoC + +Required properties: +- compatible: should be "ingenic,jz4780-lcd" +- reg: Should contain the address & size of the LCD controller registers. +- interrupts: Should specify the interrupt provided by parent. +- clocks: Should contain two clock specifiers for the JZ4780_CLK_TVE JZ4780_CLK_LCD0PIXCLK. +- clock-names : Must be "lcd_clk", "lcd_pixclk"; +- port: A port node with endpoint definitions as defined in + Documentation/devicetree/bindings/media/video-interfaces.txt. + +Optional properties: +- interrupt-parent: phandle to parent interrupt controller + +Example: + +lcd: jz4780-lcdk@0x13050000 { + compatible = "ingenic,jz4780-lcd"; + reg = <0x13050000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>; + clock-names = "lcd_clk", "lcd_pixclk"; + + interrupt-parent = <&intc>; + interrupts = <31>; + + jz4780_lcd_out: port { + #address-cells = <1>; + #size-cells = <0>; + + jz4780_out_hdmi: endpoint@0 { + reg = <0>; + remote-endpoint = <&hdmi_in_lcd>; + }; + }; + +};
Signature · 1 line
2.23.0
Rob Herring
maintainerRe: [RFC 1/8] dt-bindings: video: Add jz4780-lcd binding
Quoted 21 lines · H. Nikolaus Schaller
From: Zubair Lutfullah Kakakhel <[email protected]>
Add DT bindings for the LCD controller on the jz4780 SoC
Signed-off-by Zubair Lutfullah Kakakhel <[email protected]>--- .../bindings/display/ingenic-jz4780-lcd.txt | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.txtDocumentation/devicetree/bindings/display/ingenic-jz4780-lcd.txt new file +5
-0@@ -0,0 +1,39 @@ +Bindings for Ingenic JZ4780 LCD Controller + +LCD Controller is the Display Controller for the Ingenic JZ4780 SoC + +Required properties:
Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.txt line 15
Quoted 10 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.txt new file +10
-0+- compatible: should be "ingenic,jz4780-lcd" +- reg: Should contain the address & size of the LCD controller registers. +- interrupts: Should specify the interrupt provided by parent. +- clocks: Should contain two clock specifiers for the JZ4780_CLK_TVE JZ4780_CLK_LCD0PIXCLK. +- clock-names : Must be "lcd_clk", "lcd_pixclk"; +- port: A port node with endpoint definitions as defined in + Documentation/devicetree/bindings/media/video-interfaces.txt. + +Optional properties: +- interrupt-parent: phandle to parent interrupt controller
Drop this. 'interrupt-parent' is always valid and could be in a parent node.
Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.txt line 19
Quoted 4 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.txt new file +4
-0+ +Example: + +lcd: jz4780-lcdk@0x13050000 {
Drop the '0x'.
Quoted 5 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.txt new file +5
-0+ compatible = "ingenic,jz4780-lcd"; + reg = <0x13050000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>; + clock-names = "lcd_clk", "lcd_pixclk";
Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.txt line 34
Quoted 10 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.txt new file +10
-0+ + interrupt-parent = <&intc>; + interrupts = <31>; + + jz4780_lcd_out: port { + #address-cells = <1>; + #size-cells = <0>; + + jz4780_out_hdmi: endpoint@0 { + reg = <0>;
Don't need an address as there's only 1 endpoint.
Quoted 8 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.txt new file +5
-0+ remote-endpoint = <&hdmi_in_lcd>; + }; + }; + +};Signature · 1 line
2.23.0
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
RFC 2/8 dt-bindings: video: Add jz4780-hdmi binding
In reply to H. Nikolaus SchallerFrom: Zubair Lutfullah Kakakhel <[email protected]>
Add DT bindings for the hdmi driver for the Ingenic JZ4780 SoC.
--- .../bindings/display/ingenic-jz4780-hdmi.txt | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.txt
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.txt new file +41 -0
@@ -0,0 +1,41 @@ +Device-Tree bindings for Ingenic JZ4780 HDMI Transmitter + +The HDMI Transmitter in the Ingenic JZ4780 is a Synopsys DesignWare HDMI 1.4 +TX controller IP with accompanying PHY IP. + +Required properties: + - #address-cells : should be <1> + - #size-cells : should be <0> + - compatible : should be "ingenic,jz4780-hdmi" + - reg-io-width: must be <4> + - clocks: phandle to isrf and iahb clocks + - clock-names : must be "isrf" and "iahb" + - ports: Port nodes with endpoint definitions as defined in + Documentation/devicetree/bindings/media/video-interfaces.txt, + +Optional properties: + - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing + +example: + +hdmi: hdmi@10180000 { + compatible = "ingenic,jz4780-hdmi"; + reg = <0x10180000 0x8000>; + reg-io-width = <4>; + ddc-i2c-bus = <&i2c4>; + interrupt-parent = <&intc>; + interrupts = <3>; + clocks = <&cgu JZ4780_CLK_HDMI>, <&cgu JZ4780_CLK_AHB0>; + clock-names = "isfr", "iahb"; + + ports { + hdmi_in: port { + #address-cells = <1>; + #size-cells = <0>; + hdmi_in_lcd: endpoint@0 { + reg = <0>; + remote-endpoint = <&jz4780_out_hdmi>; + }; + }; + }; +};
Signature · 1 line
2.23.0
Rob Herring
maintainerRe: [RFC 2/8] dt-bindings: video: Add jz4780-hdmi binding
Quoted 16 lines · H. Nikolaus Schaller
From: Zubair Lutfullah Kakakhel <[email protected]>
Add DT bindings for the hdmi driver for the Ingenic JZ4780 SoC.
Signed-off-by Zubair Lutfullah Kakakhel <[email protected]>--- .../bindings/display/ingenic-jz4780-hdmi.txt | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.txtDocumentation/devicetree/bindings/display/ingenic-jz4780-hdmi.txt new file +0
-0
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.txt line 8
Quoted 8 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.txt new file +8
-0@@ -0,0 +1,41 @@ +Device-Tree bindings for Ingenic JZ4780 HDMI Transmitter + +The HDMI Transmitter in the Ingenic JZ4780 is a Synopsys DesignWare HDMI 1.4 +TX controller IP with accompanying PHY IP. + +Required properties: + - #address-cells : should be <1> + - #size-cells : should be <0>
These aren't in the example.
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.txt line 10
Quoted 2 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.txt new file +2
-0+ - compatible : should be "ingenic,jz4780-hdmi" + - reg-io-width: must be <4>
If it can only be 4, then you can just assume that from the compatible.
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.txt line 17
Quoted 7 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.txt new file +7
-0+ - clocks: phandle to isrf and iahb clocks + - clock-names : must be "isrf" and "iahb" + - ports: Port nodes with endpoint definitions as defined in + Documentation/devicetree/bindings/media/video-interfaces.txt, + +Optional properties: + - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
This goes in a connector node. It's not part of the HDMI block.
That also means you need an out port to the connector.
Quoted 27 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.txt new file +24
-0+ +example: + +hdmi: hdmi@10180000 { + compatible = "ingenic,jz4780-hdmi"; + reg = <0x10180000 0x8000>; + reg-io-width = <4>; + ddc-i2c-bus = <&i2c4>; + interrupt-parent = <&intc>; + interrupts = <3>; + clocks = <&cgu JZ4780_CLK_HDMI>, <&cgu JZ4780_CLK_AHB0>; + clock-names = "isfr", "iahb"; + + ports { + hdmi_in: port { + #address-cells = <1>; + #size-cells = <0>; + hdmi_in_lcd: endpoint@0 { + reg = <0>; + remote-endpoint = <&jz4780_out_hdmi>; + }; + }; + }; +};Signature · 1 line
2.23.0
RFC 3/8 drm: ingenic-drm: add MODULE_DEVICE_TABLE
In reply to H. Nikolaus Schallerso that the driver can load by matching the device tree if compiled as module.
--- drivers/gpu/drm/ingenic/ingenic-drm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/ingenic/ingenic-drm.c +2 -0
@@ -844,6 +844,8 @@ static const struct of_device_id ingenic_drm_of_match[] = { { /* sentinel */ }, }; +MODULE_DEVICE_TABLE (of, ingenic_drm_of_match); +static struct platform_driver ingenic_drm_driver = { .driver = { .name ="ingenic-drm" ,
Signature · 1 line
2.23.0
RFC 4/8 drm: ingenic: add jz4780 Synopsys HDMI driver.
In reply to H. Nikolaus SchallerFrom: Paul Boddie <[email protected]>
A specialisation of the generic Synopsys HDMI driver is employed for JZ4780 HDMI support. This requires a new driver, plus device tree and configuration modifications.
--- drivers/gpu/drm/ingenic/Kconfig | 8 ++ drivers/gpu/drm/ingenic/Makefile | 1 + drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c | 120 +++++++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100644 drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c
drivers/gpu/drm/ingenic/Kconfig +8 -0
@@ -14,3 +14,11 @@ config DRM_INGENIC Choose this option for DRM support for the Ingenic SoCs. If M is selected the module will be called ingenic-drm. + +config DRM_DW_HDMI_JZ4780 + tristate "HDMI Support for Ingenic JZ4780" + depends on DRM_INGENIC + depends on OF + select DRM_DW_HDMI + help + Choose this option for HDMI output from the Ingenic JZ4780.
drivers/gpu/drm/ingenic/Makefile +1 -0
@@ -1 +1,2 @@ obj-$(CONFIG_DRM_INGENIC) += ingenic-drm.o +obj-$(CONFIG_DRM_DW_HDMI_JZ4780) += dw_hdmi-jz4780.o
drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c new file +120 -0
120 lines not on this page · raw message
Signature · 1 line
2.23.0
RFC 5/8 pinctrl: ingenic: add hdmi-ddc pin control group
In reply to H. Nikolaus SchallerFrom: Paul Boddie <[email protected]>
--- drivers/pinctrl/pinctrl-ingenic.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/pinctrl/pinctrl-ingenic.c +7 -0
@@ -4,6 +4,7 @@* * Copyright (c) 2017 Paul Cercueil <[email protected]> * Copyright (c) 2019 周琰杰 (Zhou Yanjie) <[email protected]> +* Copyright (c) 2017, 2019 Paul Boddie <[email protected]> */ #include <linux/compiler.h>
@@ -900,6 +901,7 @@ static int jz4780_mmc0_8bit_a_pins[] = { 0x04, 0x05, 0x06, 0x07, 0x18, };static int jz4780_i2c3_pins[] = {0x6a ,0x6b , };static int jz4780_i2c4_e_pins[] = {0x8c ,0x8d , };static int jz4780_i2c4_f_pins[] = {0xb9 ,0xb8 , }; +static int jz4780_hdmi_ddc_pins[] = {0xb9 ,0xb8 , };static int jz4780_uart2_data_funcs[] = {1 ,1 , };static int jz4780_uart2_hwflow_funcs[] = {1 ,1 , };
@@ -908,6 +910,7 @@ static int jz4780_mmc0_8bit_a_funcs[] = { 1, 1, 1, 1, 1, };static int jz4780_i2c3_funcs[] = {1 ,1 , };static int jz4780_i2c4_e_funcs[] = {1 ,1 , };static int jz4780_i2c4_f_funcs[] = {1 ,1 , }; +static int jz4780_hdmi_ddc_funcs[] = {0 ,0 , };static const struct group_desc jz4780_groups[] = {INGENIC_PIN_GROUP ("uart0-data" , jz4770_uart0_data),
@@ -950,6 +953,7 @@ static const struct group_desc jz4780_groups[] = {INGENIC_PIN_GROUP ("i2c3-data" , jz4780_i2c3),INGENIC_PIN_GROUP ("i2c4-data-e" , jz4780_i2c4_e),INGENIC_PIN_GROUP ("i2c4-data-f" , jz4780_i2c4_f), +INGENIC_PIN_GROUP ("hdmi-ddc" , jz4780_hdmi_ddc),INGENIC_PIN_GROUP ("cim-data" , jz4770_cim_8bit),INGENIC_PIN_GROUP ("lcd-24bit" , jz4770_lcd_24bit), { "lcd-no-pins", },
@@ -982,6 +986,7 @@ static const char *jz4780_nemc_groups[] = {static const char *jz4780_i2c3_groups[] = {"i2c3-data" , };static const char *jz4780_i2c4_groups[] = {"i2c4-data-e" ,"i2c4-data-f" , };static const char *jz4780_cim_groups[] = {"cim-data" , }; +static const char *jz4780_hdmi_ddc_groups[] = {"hdmi-ddc" , };static const struct function_desc jz4780_functions[] = { {"uart0" , jz4770_uart0_groups,ARRAY_SIZE (jz4770_uart0_groups), },
@@ -1014,6 +1019,8 @@ static const struct function_desc jz4780_functions[] = { { "pwm5", jz4770_pwm5_groups, ARRAY_SIZE(jz4770_pwm5_groups), }, { "pwm6", jz4770_pwm6_groups, ARRAY_SIZE(jz4770_pwm6_groups), }, { "pwm7", jz4770_pwm7_groups, ARRAY_SIZE(jz4770_pwm7_groups), }, + { "hdmi-ddc", jz4780_hdmi_ddc_groups, + ARRAY_SIZE(jz4780_hdmi_ddc_groups), }, }; static const struct ingenic_chip_info jz4780_chip_info = {
Signature · 1 line
2.23.0
RFC 6/8 MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
In reply to H. Nikolaus SchallerFrom: Paul Boddie <[email protected]>
A specialisation of the generic Synopsys HDMI driver is employed for JZ4780 HDMI support. This requires a new driver, plus device tree and configuration modifications.
--- arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
arch/mips/boot/dts/ingenic/jz4780.dtsi +32 -0
@@ -433,4 +433,36 @@ status = "disabled"; }; + + hdmi: hdmi@10180000 { + compatible = "ingenic,jz4780-dw-hdmi"; + reg = <0x10180000 0x8000>; + reg-io-width = <4>; + + clocks = <&cgu JZ4780_CLK_HDMI>, <&cgu JZ4780_CLK_AHB0>; + clock-names = "isfr" , "iahb"; + + assigned-clocks = <&cgu JZ4780_CLK_HDMI>; + assigned-clock-rates = <27000000>; + + interrupt-parent = <&intc>; + interrupts = <3>; + + /* ddc-i2c-bus = <&i2c4>; */ + + status = "disabled"; + }; + + lcd: lcd@13050000 { + compatible = "ingenic,jz4740-lcd"; + reg = <0x13050000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>; + clock-names = "lcd", "lcd_pclk"; + + interrupt-parent = <&intc>; + interrupts = <31>; + + status = "disabled"; + }; };
Signature · 1 line
2.23.0
RFC 7/8 MIPS: DTS: CI20: add HDMI setup
In reply to H. Nikolaus SchallerFrom: Paul Boddie <[email protected]>
We need to hook up
* HDMI power regulator
* HDMI connector
* DDC pinmux
* HDMI and LCD endpoint connections
--- arch/mips/boot/dts/ingenic/ci20.dts | 64 +++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+)
arch/mips/boot/dts/ingenic/ci20.dts +64 -0
@@ -60,6 +60,28 @@ enable-active-high; }; + hdmi_power: fixedregulator@2 { + compatible = "regulator-fixed"; + regulator-name = "hdmi_power"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpa 25 GPIO_ACTIVE_LOW>; + enable-active-high; + regulator-always-on; + }; + + hdmi_out: connector { + compatible = "hdmi-connector"; + label = "HDMI OUT"; + type = "a"; + + port { + hdmi_con: endpoint { + remote-endpoint = <&dw_hdmi_out>; + }; + }; + }; + wlan0_power: fixedregulator@1 { compatible = "regulator-fixed"; regulator-name = "wlan0_power";
@@ -423,6 +445,12 @@ bias-disable; }; + pins_hdmi_ddc: hdmi_ddc { + function = "hdmi-ddc"; + groups = "hdmi-ddc"; + bias-disable; + }; + pins_nemc: nemc { function = "nemc"; groups = "nemc-data", "nemc-cle-ale", "nemc-rd-we", "nemc-frd-fwe";
@@ -459,3 +487,39 @@ assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>; assigned-clock-rates = <3000000>, <3000000>; }; + +&hdmi { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_hdmi_ddc>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dw_hdmi_in: endpoint { + remote-endpoint = <&lcd_out>; + }; + }; + + port@1 { + reg = <1>; + dw_hdmi_out: endpoint { + remote-endpoint = <&hdmi_con>; + }; + }; + }; +}; + +&lcd { + status = "okay"; + + port { + lcd_out: endpoint { + remote-endpoint = <&dw_hdmi_in>; + }; + }; +};
Signature · 1 line
2.23.0
RFC 8/8 MIPS: CI20: defconfig: configure for DRM_DW_HDMI_JZ4780
In reply to H. Nikolaus Schaller--- arch/mips/configs/ci20_defconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/mips/configs/ci20_defconfig +3 -0
@@ -103,6 +103,9 @@ CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_JZ4740=y CONFIG_DMADEVICES=y CONFIG_DMA_JZ4780=y +CONFIG_DRM=m +CONFIG_DRM_DW_HDMI_JZ4780=m +CONFIG_DRM_DW_HDMI=m # CONFIG_IOMMU_SUPPORT is not set CONFIG_MEMORY=y CONFIG_EXT4_FS=y
Signature · 1 line
2.23.0
Hi Nikolaus.
Quoted 32 lines · H. Nikolaus Schaller
This patch series adds HDMI output to the jz4780/CI20 board.
It is based on taking the old 3.18 vendor kernel and trying to achieve the same with modern DTS setup and new/modified drivers.
Unfortunately, in this first RFC, only EDID and creation of
/dev/fb0are working. Also, HDMI hot plugging is detected.But there is no HDMI output signal. So some tiny piece seems to be missing to enable/configure the Synposys HDMI controller.
We need help from the community to fix this.
Note: device tree bindings are from 2015 and still seem to fit - except they are not in yaml format.
Original authors of most patches are
* Paul Boddie <[email protected]>
* Zubair Lutfullah Kakakhel <[email protected]>H. Nikolaus Schaller (2):
drm: ingenic-drm: addMODULE_DEVICE_TABLE
MIPS: CI20: defconfig: configure forDRM_DW_HDMI_JZ4780Paul Boddie (4):
drm: ingenic: add jz4780 Synopsys HDMI driver.
pinctrl: ingenic: add hdmi-ddc pin control group
MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
MIPS: DTS: CI20: add HDMI setup
Quoted 6 lines
Zubair Lutfullah Kakakhel (2):
dt-bindings: video: Add jz4780-lcd binding
dt-bindings: video: Add jz4780-hdmi binding.../bindings/display/ingenic-jz4780-hdmi.txt | 41 ++++++ .../bindings/display/ingenic-jz4780-lcd.txt | 39 ++++++
New bindings in DT Schema format please...
We want to have then in a formal launguage so we can use these to verify the DT files.
Sam
Hi Sam,
Quoted 41 lines
Am 27.02.2020 um 13:23 schrieb Sam Ravnborg <[email protected]>:
Hi Nikolaus.
Quoted 36 lines · H. Nikolaus Schaller
This patch series adds HDMI output to the jz4780/CI20 board.
It is based on taking the old 3.18 vendor kernel and trying to achieve the same with modern DTS setup and new/modified drivers.
Unfortunately, in this first RFC, only EDID and creation of
/dev/fb0are working. Also, HDMI hot plugging is detected.But there is no HDMI output signal. So some tiny piece seems to be missing to enable/configure the Synposys HDMI controller.
We need help from the community to fix this.
Note: device tree bindings are from 2015 and still seem to fit - except they are not in yaml format.
Original authors of most patches are
* Paul Boddie <[email protected]>
* Zubair Lutfullah Kakakhel <[email protected]>H. Nikolaus Schaller (2):
drm: ingenic-drm: addMODULE_DEVICE_TABLE
MIPS: CI20: defconfig: configure forDRM_DW_HDMI_JZ4780Paul Boddie (4):
drm: ingenic: add jz4780 Synopsys HDMI driver.
pinctrl: ingenic: add hdmi-ddc pin control group
MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
MIPS: DTS: CI20: add HDMI setupZubair Lutfullah Kakakhel (2):
dt-bindings: video: Add jz4780-lcd binding
dt-bindings: video: Add jz4780-hdmi binding
Quoted 5 lines
Quoted 2 lines
.../bindings/display/ingenic-jz4780-hdmi.txt | 41 ++++++ .../bindings/display/ingenic-jz4780-lcd.txt | 39 ++++++New bindings in DT Schema format please...
We want to have then in a formal launguage so we can use these to verify the DT files.
Yes, I know. And I fully support the goal.
But I personally do not have the time to learn the (IMHO brain-twisting) way the Schema format is working. Especially, I am not interested in becoming volunteer translator for .txt based schemas developed by someone else.
So I hope that someone from the community can and is willing to do that.
Or that there will appear good tools soon. E.g. some GUI based editor tool would be very helpful so that you don't have to fight with the yaml indentation rules. Like there are XML and DTD editors. And even HTML is rarely written manually any more.
IMHO such tools should have been developed and in place *before* the rule to provide DT schemata is enforced.
Anyways, I have requested for comments (and did expect this one).
BR and thanks,
Nikolaus
Hi Nikolaus.
Quoted 12 lines
Quoted 9 lines
Quoted 6 lines
Zubair Lutfullah Kakakhel (2):
dt-bindings: video: Add jz4780-lcd binding
dt-bindings: video: Add jz4780-hdmi binding.../bindings/display/ingenic-jz4780-hdmi.txt | 41 ++++++ .../bindings/display/ingenic-jz4780-lcd.txt | 39 ++++++New bindings in DT Schema format please...
We want to have then in a formal launguage so we can use these to verify the DT files.Yes, I know. And I fully support the goal.
Quoted 7 lines
But I personally do not have the time to learn the (IMHO brain-twisting) way the Schema format is working. Especially, I am not interested in becoming volunteer translator for .txt based schemas developed by someone else.
So I hope that someone from the community can and is willing to do that.
I went ahead and typed them - please review and use these if OK.
Sam
From 6fee276807dfe4a502ff760e7c7840480d275052 Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <[email protected]>
Date: Thu, 27 Feb 2020 17:18:29 +0100
Subject: [PATCH 1/2] dt-bindings: display: add ingenic-jz4780-lcd DT Schema
Add DT bindings for the LCD controller on the jz4780 SoC Based on .txt binding from Zubair Lutfullah Kakakhel
--- .../bindings/display/ingenic-jz4780-lcd.yaml | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml new file +78 -0
@@ -0,0 +1,78 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/ingenic-jz4780-lcd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bindings for Ingenic JZ4780 LCD Controller + +maintainers: + - Zubair Lutfullah Kakakhel <[email protected]> + - H. Nikolaus Schaller <[email protected]> + +description: | + LCD Controller is the Display Controller for the Ingenic JZ4780 SoC + +properties: + compatible: + items: + - const: ingenic,jz4780-lcd + + reg: + maxItems: 1 + description: the address & size of the LCD controller registers + + interrupts: + maxItems: 1 + description: Specifies the interrupt provided by parent + + clocks: + maxItems: 2 + description: Clock specifiers for the JZ4780_CLK_TVE JZ4780_CLK_LCD0PIXCLK + + clock-names: + items: + - const: lcd_clk + - const: lcd_pixclk + + port: + type: object + description: | + A port node with endpoint definitions as defined in + Documentation/devicetree/bindings/media/video-interfaces.txt + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - port + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/jz4780-cgu.h> + lcd: jz4780-lcdk@0x13050000 { + compatible = "ingenic,jz4780-lcd"; + reg = <0x13050000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>; + clock-names = "lcd_clk", "lcd_pixclk"; + + interrupt-parent = <&intc>; + interrupts = <31>; + + jz4780_lcd_out: port { + #address-cells = <1>; + #size-cells = <0>; + + jz4780_out_hdmi: endpoint@0 { + reg = <0>; + remote-endpoint = <&hdmi_in_lcd>; + }; + }; + }; + +...
Signature · 19 lines
2.20.1 From f4d01a657e07d468eb0bc811ed8edae0b58d66d7 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg <[email protected]> Date: Thu, 27 Feb 2020 17:52:34 +0100 Subject: [PATCH 2/2] dt-bindings: display: add ingenic-jz4780-ihdmi DT Schema Add DT bindings for the hdmi driver for the Ingenic JZ4780 SoC. Based on .txt binding from Zubair Lutfullah Kakakhel Signed-off-by: Sam Ravnborg <[email protected]> Cc: Zubair Lutfullah Kakakhel <[email protected]> Cc: H. Nikolaus Schaller <[email protected]> Cc: Rob Herring <[email protected]> Cc: [email protected] --- .../bindings/display/ingenic-jz4780-hdmi.yaml | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml new file +83 -0
83 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Sam,
great. Thank you very much!
Quoted 243 lines
Am 27.02.2020 um 17:57 schrieb Sam Ravnborg <[email protected]>:
Hi Nikolaus.
Quoted 12 lines
Quoted 9 lines
Quoted 6 lines
Zubair Lutfullah Kakakhel (2):
dt-bindings: video: Add jz4780-lcd binding
dt-bindings: video: Add jz4780-hdmi binding.../bindings/display/ingenic-jz4780-hdmi.txt | 41 ++++++ .../bindings/display/ingenic-jz4780-lcd.txt | 39 ++++++New bindings in DT Schema format please...
We want to have then in a formal launguage so we can use these to verify the DT files.Yes, I know. And I fully support the goal.
Quoted 7 lines
But I personally do not have the time to learn the (IMHO brain-twisting) way the Schema format is working. Especially, I am not interested in becoming volunteer translator for .txt based schemas developed by someone else.
So I hope that someone from the community can and is willing to do that.
I went ahead and typed them - please review and use these if OK.
Sam
From
6fee276807dfe4a502ff760e7c7840480d275052Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <[email protected]>
Date: Thu, 27 Feb 2020 17:18:29 +0100
Subject: [PATCH 1/2] dt-bindings: display: add ingenic-jz4780-lcd DT SchemaAdd DT bindings for the LCD controller on the jz4780 SoC Based on .txt binding from Zubair Lutfullah Kakakhel
Signed-off-by Sam Ravnborg <[email protected]>Cc Zubair Lutfullah Kakakhel <[email protected]>Cc H. Nikolaus Schaller <[email protected]>Cc Rob Herring <[email protected]>---
.../bindings/display/ingenic-jz4780-lcd.yaml| 78 +++++++++++++++++++1 file changed, 78 insertions(+)create mode 100644
Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yamlDocumentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml new file +78
-0@@ -0,0 +1,78 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/ingenic-jz4780-lcd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bindings for Ingenic JZ4780 LCD Controller + +maintainers: + - Zubair Lutfullah Kakakhel <[email protected]> + - H. Nikolaus Schaller <[email protected]> + +description: | + LCD Controller is the Display Controller for the Ingenic JZ4780 SoC + +properties: + compatible: + items: + - const: ingenic,jz4780-lcd + + reg: + maxItems: 1 + description: the address & size of the LCD controller registers + + interrupts: + maxItems: 1 + description: Specifies the interrupt provided by parent + + clocks: + maxItems: 2 + description: Clock specifiers for the JZ4780_CLK_TVE JZ4780_CLK_LCD0PIXCLK + + clock-names: + items: + - const: lcd_clk + - const: lcd_pixclk + + port: + type: object + description: | + A port node with endpoint definitions as defined in + Documentation/devicetree/bindings/media/video-interfaces.txt + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - port + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/jz4780-cgu.h> + lcd: jz4780-lcdk@0x13050000 { + compatible = "ingenic,jz4780-lcd"; + reg = <0x13050000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>; + clock-names = "lcd_clk", "lcd_pixclk"; + + interrupt-parent = <&intc>; + interrupts = <31>; + + jz4780_lcd_out: port { + #address-cells = <1>; + #size-cells = <0>; + + jz4780_out_hdmi: endpoint@0 { + reg = <0>; + remote-endpoint = <&hdmi_in_lcd>; + }; + }; + }; + +...Signature · 19 lines
2.20.1 From f4d01a657e07d468eb0bc811ed8edae0b58d66d7 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg <[email protected]> Date: Thu, 27 Feb 2020 17:52:34 +0100 Subject: [PATCH 2/2] dt-bindings: display: add ingenic-jz4780-ihdmi DT Schema Add DT bindings for the hdmi driver for the Ingenic JZ4780 SoC. Based on .txt binding from Zubair Lutfullah Kakakhel Signed-off-by: Sam Ravnborg <[email protected]> Cc: Zubair Lutfullah Kakakhel <[email protected]> Cc: H. Nikolaus Schaller <[email protected]> Cc: Rob Herring <[email protected]> Cc: [email protected] --- .../bindings/display/ingenic-jz4780-hdmi.yaml | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yamlDocumentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml new file +83
-0@@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/ingenic-jz4780-hdmi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bindings for Ingenic JZ4780 HDMI Transmitter + +maintainers: + - Zubair Lutfullah Kakakhel <[email protected]> + - H. Nikolaus Schaller <[email protected]> + +description: | + The HDMI Transmitter in the Ingenic JZ4780 is a Synopsys DesignWare HDMI 1.4 + TX controller IP with accompanying PHY IP. + +allOf: + - $ref: panel/panel-common.yaml# + +properties: + compatible: + items: + - const: ingenic,jz4780-hdmi + + reg: + maxItems: 1 + description: the address & size of the LCD controller registers + + reg-io-width: + const: 4 + + interrupts: + maxItems: 1 + description: Specifies the interrupt provided by parent + + clocks: + maxItems: 2 + description: Clock specifiers for isrf and iahb clocks + + clock-names: + items: + - const: isfr + - const: iahb + + ddc-i2c-bus: true + ports: true + +required: + - compatible + - clocks + - clock-names + - ports + - reg-io-width + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/jz4780-cgu.h> + + hdmi: hdmi@10180000 { + compatible = "ingenic,jz4780-hdmi"; + reg = <0x10180000 0x8000>; + reg-io-width = <4>; + ddc-i2c-bus = <&i2c4>; + interrupt-parent = <&intc>; + interrupts = <3>; + clocks = <&cgu JZ4780_CLK_HDMI>, <&cgu JZ4780_CLK_AHB0>; + clock-names = "isfr", "iahb"; + + ports { + hdmi_in: port { + #address-cells = <1>; + #size-cells = <0>; + hdmi_in_lcd: endpoint@0 { + reg = <0>; + remote-endpoint = <&jz4780_out_hdmi>; + }; + }; + }; + }; + +...Signature · 1 line
2.20.1
I'll integrate into v2.
Now we need to make the HDMI output show something...
BR,
Nikolaus
Rob Herring
maintainerQuoted 59 lines · H. Nikolaus Schaller
Hi Sam,
Quoted 41 lines
Am 27.02.2020 um 13:23 schrieb Sam Ravnborg <[email protected]>:
Hi Nikolaus.
Quoted 36 lines · H. Nikolaus Schaller
This patch series adds HDMI output to the jz4780/CI20 board.
It is based on taking the old 3.18 vendor kernel and trying to achieve the same with modern DTS setup and new/modified drivers.
Unfortunately, in this first RFC, only EDID and creation of
/dev/fb0are working. Also, HDMI hot plugging is detected.But there is no HDMI output signal. So some tiny piece seems to be missing to enable/configure the Synposys HDMI controller.
We need help from the community to fix this.
Note: device tree bindings are from 2015 and still seem to fit - except they are not in yaml format.
Original authors of most patches are
* Paul Boddie <[email protected]>
* Zubair Lutfullah Kakakhel <[email protected]>H. Nikolaus Schaller (2):
drm: ingenic-drm: addMODULE_DEVICE_TABLE
MIPS: CI20: defconfig: configure forDRM_DW_HDMI_JZ4780Paul Boddie (4):
drm: ingenic: add jz4780 Synopsys HDMI driver.
pinctrl: ingenic: add hdmi-ddc pin control group
MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
MIPS: DTS: CI20: add HDMI setupZubair Lutfullah Kakakhel (2):
dt-bindings: video: Add jz4780-lcd binding
dt-bindings: video: Add jz4780-hdmi bindingQuoted 5 lines
Quoted 2 lines
.../bindings/display/ingenic-jz4780-hdmi.txt | 41 ++++++ .../bindings/display/ingenic-jz4780-lcd.txt | 39 ++++++New bindings in DT Schema format please...
We want to have then in a formal launguage so we can use these to verify the DT files.Yes, I know. And I fully support the goal.
But I personally do not have the time to learn the (IMHO brain-twisting) way the Schema format is working. Especially, I am not interested in becoming volunteer translator for .txt based schemas developed by someone else.
So I hope that someone from the community can and is willing to do that.
Quoted 7 lines
Or that there will appear good tools soon. E.g. some GUI based editor tool would be very helpful so that you don't have to fight with the yaml indentation rules. Like there are XML and DTD editors. And even HTML is rarely written manually any more.
IMHO such tools should have been developed and in place *before* the rule to provide DT schemata is enforced.
You mean tools like what is discussed here:
https://www.redhat.com/sysadmin/yaml-tips
There's also yaml-format in the dtschema repo which will reformat a file to the desired formatting. It is just a wrapper around ruamel yaml library.
Rob
Hi Rob,
Quoted 14 lines
Am 03.03.2020 um 15:58 schrieb Rob Herring <[email protected]>:
Quoted 10 lines · H. Nikolaus Schaller
Hi Sam,
Or that there will appear good tools soon. E.g. some GUI based editor tool would be very helpful so that you don't have to fight with the yaml indentation rules. Like there are XML and DTD editors. And even HTML is rarely written manually any more.
IMHO such tools should have been developed and in place *before* the rule to provide DT schemata is enforced.
Quoted 7 lines
You mean tools like what is discussed here:
https://www.redhat.com/sysadmin/yaml-tips
There's also yaml-format in the dtschema repo which will reformat a file to the desired formatting. It is just a wrapper around ruamel yaml library.
What I dream of is a higher level higher abstraction than a YAML editor because the problems I face are not only YAML syntax but that I don't know what should be where in a scheme file and why.
So I'd like to have a Schema editor. I.e. some editor where I can edit a list of properties and can e.g. checkmark "required". And simply type a description into some text field.
And the editor knows where to place the keywords -item -enum -oneOf -description etc. when doing a Save operation.
Basically what I dream of is more like MarkDown where you write text, titles paragraphs etc. and that gets magically translated into valid HTML. Or even better analogy: OpenOffice where you just write and format your text and one does not have to edit PostScript printer commands.
But it is likely to stay a dream.
BR and thanks,
Nikolaus