MIPS: CI20: add HDMI out support
Subsystems (6)
v3 cover MIPS: CI20: add HDMI out support
+++ help is needed: driver is not completely working and shows no output signal on the HDMI data and clock lanes +++ HPD is working and /dev/fb0 does appear
+++ but there is no trigger to initialize the lcdc
* add definition for second jz4780-lcdc
* diverse fixes for yaml schema
* make ingenic-drm driver compatible to ingenic,jz4780-lcd
* converted existing ingenic,lcd.txt to ingenic,lcd.yaml - suggested by Paul Cercueil <[email protected]>
* removed blank line before MODULE_DEVICE_TABLE() macro - Paul Cercueil <[email protected]>
* added some missing Signed-off:
* removed Zubair Lutfullah Kakakhel <[email protected]> from the
recipients list and Cc: since the address is no longer available.
* removed "pinctrl: ingenic: add hdmi-ddc pin control group" from this patch
series since it is already applied elsewhere (by Linus Walleij <[email protected]>)
RFC V2 2020-02-28 19:19:40:
* Converted .txt bindings to .yaml (by Sam Ravnborg <[email protected]> - big THANKS)
RFC V1 2020-02-26 20:13:06:
This patch series adds HDMI output to the jz4780/CI20 board.
It is based on taking the old 3.18 vendor kernel as well as an earlier submission from 2015:
https://lore.kernel.org/patchwork/patch/547872/
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.
Original authors of most patches are
* Paul Boddie <[email protected]>
* Zubair Lutfullah Kakakhel <[email protected]>
H. Nikolaus Schaller (4):
dt-bindings: display: convert ingenic,lcd.txt to ingenic,lcd.yaml
drm: ingenic-drm: add MODULE_DEVICE_TABLE
drm: ingenic-drm: add support for ingenic,jz4780-lcd
MIPS: CI20: defconfig: configure for DRM_DW_HDMI_JZ4780
Paul Boddie (3):
drm: ingenic: add jz4780 Synopsys HDMI driver
MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
MIPS: DTS: CI20: add HDMI setup
Sam Ravnborg (1):
dt-bindings: display: add ingenic-jz4780-hdmi DT Schema
.../bindings/display/ingenic,lcd.txt | 45 ------ .../bindings/display/ingenic,lcd.yaml | 128 ++++++++++++++++++ .../bindings/display/ingenic-jz4780-hdmi.yaml | 82 +++++++++++ arch/mips/boot/dts/ingenic/ci20.dts | 64 +++++++++ arch/mips/boot/dts/ingenic/jz4780.dtsi | 46 +++++++ 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 | 8 ++ 10 files changed, 460 insertions(+), 45 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/ingenic,lcd.txt create mode 100644 Documentation/devicetree/bindings/display/ingenic,lcd.yaml create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml create mode 100644 drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c
Signature · 1 line
2.25.1
RFC v3 1/8 dt-bindings: display: convert ingenic,lcd.txt to ingenic,lcd.yaml
and add compatible: jz4780-lcd, including an example how to configure both lcd controllers.
Also fix the clock names and examples.
Based on work by Paul Cercueil <[email protected]> and Sam Ravnborg <[email protected]>
--- .../bindings/display/ingenic,lcd.txt | 45 ------ .../bindings/display/ingenic,lcd.yaml | 128 ++++++++++++++++++ 2 files changed, 128 insertions(+), 45 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/ingenic,lcd.txt create mode 100644 Documentation/devicetree/bindings/display/ingenic,lcd.yaml
Documentation/devicetree/bindings/display/ingenic,lcd.txt deleted +0 -45
@@ -1,45 +0,0 @@ -Ingenic JZ47xx LCD driver - -Required properties: -- compatible: one of: - * ingenic,jz4740-lcd - * ingenic,jz4725b-lcd - * ingenic,jz4770-lcd -- reg: LCD registers location and length -- clocks: LCD pixclock and device clock specifiers. - The device clock is only required on the JZ4740. -- clock-names: "lcd_pclk" and "lcd" -- interrupts: Specifies the interrupt line the LCD controller is connected to. - -Example: - -panel { - compatible = "sharp,ls020b1dd01d"; - - backlight = <&backlight>; - power-supply = <&vcc>; - - port { - panel_input: endpoint { - remote-endpoint = <&panel_output>; - }; - }; -}; - - -lcd: lcd-controller@13050000 { - compatible = "ingenic,jz4725b-lcd"; - reg = <0x13050000 0x1000>; - - interrupt-parent = <&intc>; - interrupts = <31>; - - clocks = <&cgu JZ4725B_CLK_LCD>; - clock-names = "lcd"; - - port { - panel_output: endpoint { - remote-endpoint = <&panel_input>; - }; - }; -};
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +128 -0
128 lines not on this page · raw message
Signature · 1 line
2.25.1
Rob Herring
maintainerRe: [RFC v3 1/8] dt-bindings: display: convert ingenic,lcd.txt to ingenic,lcd.yaml
Quoted 11 lines · H. Nikolaus Schaller
and add compatible: jz4780-lcd, including an example how to configure both lcd controllers.
Also fix the clock names and examples.
Based on work by Paul Cercueil <[email protected]> and Sam Ravnborg <[email protected]>
Signed-off-by H. Nikolaus Schaller <[email protected]>Cc Rob Herring <[email protected]>
Quoted 7 lines
--- .../bindings/display/ingenic,lcd.txt | 45 ------ .../bindings/display/ingenic,lcd.yaml | 128 ++++++++++++++++++ 2 files changed, 128 insertions(+), 45 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/ingenic,lcd.txt create mode 100644 Documentation/devicetree/bindings/display/ingenic,lcd.yaml
My bot found errors running 'make dt_binding_check' on your patch:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/ingenic,lcd.example.dt.yaml: lcd-controller@13050000: clocks: [[4294967295, 9]] is too short
See https://patchwork.ozlabs.org/patch/1263508
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date:
pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
Please check and re-submit.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [RFC v3 1/8] dt-bindings: display: convert ingenic,lcd.txt to ingenic,lcd.yaml
Hi Paul,
Quoted 22 lines
Am 30.03.2020 um 17:42 schrieb Rob Herring <[email protected]>:
Quoted 11 lines · H. Nikolaus Schaller
and add compatible: jz4780-lcd, including an example how to configure both lcd controllers.
Also fix the clock names and examples.
Based on work by Paul Cercueil <[email protected]> and Sam Ravnborg <[email protected]>
Signed-off-by H. Nikolaus Schaller <[email protected]>Cc Rob Herring <[email protected]>Quoted 7 lines
---
.../bindings/display/ingenic,lcd.txt| 45 ------.../bindings/display/ingenic,lcd.yaml| 128 ++++++++++++++++++2 files changed, 128 insertions(+), 45 deletions(-)delete mode 100644
Documentation/devicetree/bindings/display/ingenic,lcd.txtcreate mode 100644Documentation/devicetree/bindings/display/ingenic,lcd.yaml
Quoted 5 lines
My bot found errors running 'make
dt_binding_check' on your patch:/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/ingenic,lcd.example.dt.yaml: lcd-controller@13050000: clocks: [[4294967295, 9]] is too short
If I read the message correctly, I think there should be 2 clocks specified in the jz4725b-lcd example and not just
clocks = <&cgu JZ4725B_CLK_LCD>;
Unfortunately the jz4725b.dtsi does not seem to be upstream or in linux-next so I don't know if it works without lcd_pclk or not.
If there is really just one clock, we need to modify the clocks and clock-names schema and add minItems: 1 and maxItems: 2 to allow for this flexibility.
Otherwise we have to fix the example. Do you have some git with an up-to-date jz4725b.dtsi to look at?
Quoted 5 lines
If you already ran 'make
dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date:pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
+++ :)
Quoted 2 lines
Please check and re-submit.
Sure, since it is a RFC.
BR and thanks,
Nikolaus
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [RFC v3 1/8] dt-bindings: display: convert ingenic,lcd.txt to ingenic,lcd.yaml
Hi Paul,
Quoted 31 lines
Am 30.03.2020 um 19:07 schrieb Paul Cercueil <[email protected]>:
Quoted 26 lines · H. Nikolaus Schaller
Quoted 26 lines
Am 30.03.2020 um 18:43 schrieb Paul Cercueil <[email protected]>:
Hi Nikolaus,Quoted 23 lines · H. Nikolaus Schaller
Hi Paul,
Quoted 16 lines
Am 30.03.2020 um 17:42 schrieb Rob Herring <[email protected]>:
Quoted 8 lines · H. Nikolaus Schaller
and add compatible: jz4780-lcd, including an example how to configure both lcd controllers.
Also fix the clock names and examples.
Based on work by Paul Cercueil <[email protected]> and Sam Ravnborg <[email protected]>Signed-off-by H. Nikolaus Schaller <[email protected]>Cc Rob Herring <[email protected]>Quoted 6 lines
---
.../bindings/display/ingenic,lcd.txt| 45 ------.../bindings/display/ingenic,lcd.yaml| 128 ++++++++++++++++++2 files changed, 128 insertions(+), 45 deletions(-)delete mode 100644
Documentation/devicetree/bindings/display/ingenic,lcd.txtcreate mode 100644Documentation/devicetree/bindings/display/ingenic,lcd.yamlQuoted 3 lines
My bot found errors running 'make
dt_binding_check' on your patch:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/ingenic,lcd.example.dt.yaml: lcd-controller@13050000: clocks: [[4294967295, 9]] is too short See https://patchwork.ozlabs.org/patch/1263508If I read the message correctly, I think there should be 2 clocks specified in the jz4725b-lcd example and not just
clocks = <&cgu JZ4725B_CLK_LCD>;
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
You get this message because that's what the YAML says. There is only one clock on JZ4725B so the yaml should reflect that.
That was the missing piece of information that there is only one clock on the jz4780. Anyways, is there some example? Does some
jz4725b.dtsiexist somewhere? It is difficult to write correct yaml for a device that is not upstream.https://github.com/OpenDingux/linux/blob/jz-5.5-rs90/arch/mips/boot/dts/ingenic/jz4725b.dtsi#L331
Great!
Ah, it only requires the "lcd_pclk" (and not the "lcd" clock) which means the original ingenic,lcd.txt wasn't perfect in this case either.
I'll queue it for the next RFC version.
So the next important thing for this series is that we find help for making the CI20 HDMI work...
BR and thanks,
Nikolaus
Quoted 21 lines
-Paul
Quoted 18 lines
Otherwise I'd propose to drop the jz4725b and use the jz4740 as example. BR and thanks,
NikolausQuoted 15 lines
-Paul
Quoted 14 lines
Unfortunately the
jz4725b.dtsidoes not seem to be upstream or in linux-next so I don't know if it works withoutlcd_pclkor not.
If there is really just one clock, we need to modify the clocks and clock-names schema and add minItems: 1 and maxItems: 2 to allow for this flexibility. Otherwise we have to fix the example. Do you have some git with an up-to-datejz4725b.dtsito look at?Quoted 3 lines
If you already ran 'make
dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date:
pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade+++ :)
Quoted 1 line
Please check and re-submit.
Sure, since it is a RFC.
BR and thanks,
Nikolaus
Re: [RFC v3 1/8] dt-bindings: display: convert ingenic, lcd.txt to ingenic, lcd.yaml
In reply to H. Nikolaus SchallerHi Nikolaus
Some comments below that will result in a simplee binding that passes the checks.
Thanks for pushing this.
Sam
Quoted 137 lines · H. Nikolaus Schaller
and add compatible: jz4780-lcd, including an example how to configure both lcd controllers.
Also fix the clock names and examples.
Based on work by Paul Cercueil <[email protected]> and Sam Ravnborg <[email protected]>
Signed-off-by H. Nikolaus Schaller <[email protected]>Cc Rob Herring <[email protected]>--- .../bindings/display/ingenic,lcd.txt | 45 ------ .../bindings/display/ingenic,lcd.yaml | 128 ++++++++++++++++++ 2 files changed, 128 insertions(+), 45 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/ingenic,lcd.txt create mode 100644 Documentation/devicetree/bindings/display/ingenic,lcd.yamlDocumentation/devicetree/bindings/display/ingenic,lcd.txt deleted +0
-45@@ -1,45 +0,0 @@ -Ingenic JZ47xx LCD driver - -Required properties: -- compatible: one of: - * ingenic,jz4740-lcd - * ingenic,jz4725b-lcd - * ingenic,jz4770-lcd -- reg: LCD registers location and length -- clocks: LCD pixclock and device clock specifiers. - The device clock is only required on the JZ4740. -- clock-names: "lcd_pclk" and "lcd" -- interrupts: Specifies the interrupt line the LCD controller is connected to. - -Example: - -panel { - compatible = "sharp,ls020b1dd01d"; - - backlight = <&backlight>; - power-supply = <&vcc>; - - port { - panel_input: endpoint { - remote-endpoint = <&panel_output>; - }; - }; -}; - - -lcd: lcd-controller@13050000 { - compatible = "ingenic,jz4725b-lcd"; - reg = <0x13050000 0x1000>; - - interrupt-parent = <&intc>; - interrupts = <31>; - - clocks = <&cgu JZ4725B_CLK_LCD>; - clock-names = "lcd"; - - port { - panel_output: endpoint { - remote-endpoint = <&panel_input>; - }; - }; -};Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +62
-0@@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/ingenic,lcd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bindings for Ingenic JZ4780 LCD Controller + +maintainers: + - Paul Cercueil <[email protected]> + +description: | + LCD Controller is the Display Controller for the Ingenic JZ47xx SoC + +properties: + compatible: + oneOf: + - const: ingenic,jz4725b-lcd + - const: ingenic,jz4740-lcd + - const: ingenic,jz4770-lcd + - const: ingenic,jz4780-lcd + + reg: + maxItems: 1 + description: LCD registers location and length + + interrupts: + maxItems: 1 + description: Specifies the interrupt provided by parent + + clocks: + maxItems: 2 + description: Clock specifiers for LCD pixclock and device clock. + The device clock is only required on the JZ4740 and JZ4780 + + clock-names: + items: + - const: lcd + - const: lcd_pclk + + 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/jz4725b-cgu.h> + + panel { + compatible = "sharp,ls020b1dd01d";
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 72
Quoted 10 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +10
-0+ + backlight = <&backlight>; + power-supply = <&vcc>; + + port { + panel_input: endpoint { + remote-endpoint = <&panel_output>; + }; + }; + };
The panel part is not needed - better to drop it.
Quoted 7 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +7
-0+ + lcd: lcd-controller@13050000 { + compatible = "ingenic,jz4725b-lcd"; + reg = <0x13050000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <31>;
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 89
Quoted 10 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +10
-0+ + clocks = <&cgu JZ4725B_CLK_LCD>; + clock-names = "lcd", "lcd_pclk"; + + port { + panel_output: endpoint { + remote-endpoint = <&panel_input>; + }; + }; + };
We know this example will not pass the check, as there is only one clock specified.
I suggest to drop this example.
If it later turns out that jz4725b only have one clock, then the binding needs to be updated. But the best guess is that the example is wrong.
The example below for jz4780-lcd cover all relevant parts - so just keep it as the only example.
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 94
Quoted 5 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +5
-0+ + - | + #include <dt-bindings/clock/jz4780-cgu.h> + + lcdc0: lcdc0@13050000 {
Name this lcdc
And drop "lcdc0@13050000" as this is not relevant for this example.
Remember - the examples exist to explain the binding. They are just examples.
Quoted 10 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +10
-0+ compatible = "ingenic,jz4780-lcd"; + reg = <0x13050000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>; + clock-names = "lcd", "lcd_pclk"; + + interrupt-parent = <&intc>; + interrupts = <31>; + + jz4780_lcd_out: port {
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 114
Quoted 10 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +10
-0+ #address-cells = <1>; + #size-cells = <0>; + + jz4780_out_hdmi: endpoint@0 { + reg = <0>; + remote-endpoint = <&hdmi_in_lcd>; + }; + }; + }; +
And drop this as it does not add anything extra.
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 126
Quoted 12 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +12
-0+ lcdc1: lcdc1@130a0000 { + compatible = "ingenic,jz4780-lcd"; + reg = <0x130a0000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD1PIXCLK>; + clock-names = "lcd", "lcd_pclk"; + + interrupt-parent = <&intc>; + interrupts = <31>; + + status = "disabled"; + };
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [RFC v3 1/8] dt-bindings: display: convert ingenic, lcd.txt to ingenic, lcd.yaml
Hi Sam,
Quoted 152 lines
Am 09.04.2020 um 09:25 schrieb Sam Ravnborg <[email protected]>:
Hi Nikolaus
Some comments below that will result in a simplee binding that passes the checks.
Thanks for pushing this.Sam
Quoted 140 lines · H. Nikolaus Schaller
and add compatible: jz4780-lcd, including an example how to configure both lcd controllers.
Also fix the clock names and examples.
Based on work by Paul Cercueil <[email protected]> and Sam Ravnborg <[email protected]>
Signed-off-by H. Nikolaus Schaller <[email protected]>Cc Rob Herring <[email protected]>---
.../bindings/display/ingenic,lcd.txt| 45 ------.../bindings/display/ingenic,lcd.yaml| 128 ++++++++++++++++++2 files changed, 128 insertions(+), 45 deletions(-)delete mode 100644
Documentation/devicetree/bindings/display/ingenic,lcd.txtcreate mode 100644Documentation/devicetree/bindings/display/ingenic,lcd.yamlDocumentation/devicetree/bindings/display/ingenic,lcd.txt deleted +0
-45@@ -1,45 +0,0 @@ -Ingenic JZ47xx LCD driver - -Required properties: -- compatible: one of: - * ingenic,jz4740-lcd - * ingenic,jz4725b-lcd - * ingenic,jz4770-lcd -- reg: LCD registers location and length -- clocks: LCD pixclock and device clock specifiers. - The device clock is only required on the JZ4740. -- clock-names: "lcd_pclk" and "lcd" -- interrupts: Specifies the interrupt line the LCD controller is connected to. - -Example: - -panel { - compatible = "sharp,ls020b1dd01d"; - - backlight = <&backlight>; - power-supply = <&vcc>; - - port { - panel_input: endpoint { - remote-endpoint = <&panel_output>; - }; - }; -}; - - -lcd: lcd-controller@13050000 { - compatible = "ingenic,jz4725b-lcd"; - reg = <0x13050000 0x1000>; - - interrupt-parent = <&intc>; - interrupts = <31>; - - clocks = <&cgu JZ4725B_CLK_LCD>; - clock-names = "lcd"; - - port { - panel_output: endpoint { - remote-endpoint = <&panel_input>; - }; - }; -};Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +65
-0@@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/ingenic,lcd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bindings for Ingenic JZ4780 LCD Controller + +maintainers: + - Paul Cercueil <[email protected]> + +description: | + LCD Controller is the Display Controller for the Ingenic JZ47xx SoC + +properties: + compatible: + oneOf: + - const: ingenic,jz4725b-lcd + - const: ingenic,jz4740-lcd + - const: ingenic,jz4770-lcd + - const: ingenic,jz4780-lcd + + reg: + maxItems: 1 + description: LCD registers location and length + + interrupts: + maxItems: 1 + description: Specifies the interrupt provided by parent + + clocks: + maxItems: 2 + description: Clock specifiers for LCD pixclock and device clock. + The device clock is only required on the JZ4740 and JZ4780 + + clock-names: + items: + - const: lcd + - const: lcd_pclk + + 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/jz4725b-cgu.h> + + panel { + compatible = "sharp,ls020b1dd01d"; + + backlight = <&backlight>; + power-supply = <&vcc>;
Quoted 8 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 72
Quoted 7 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +7
-0+ + port { + panel_input: endpoint { + remote-endpoint = <&panel_output>; + }; + }; + };The panel part is not needed - better to drop it.
Well, it is needed to fulfill the remote-endpoint below.
Quoted 15 lines
Quoted 15 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +13
-0+ + lcd: lcd-controller@13050000 { + compatible = "ingenic,jz4725b-lcd"; + reg = <0x13050000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <31>; + + clocks = <&cgu JZ4725B_CLK_LCD>; + clock-names = "lcd", "lcd_pclk"; + + port { + panel_output: endpoint {
Quoted 8 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 89
Quoted 4 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +4
-0+ remote-endpoint = <&panel_input>; + }; + }; + };We know this example will not pass the check, as there is only one clock specified.
I suggest to drop this example.
If it later turns out that jz4725b only have one clock,
Paul already reported that it only wants to see one clock.
Quoted 2 lines
then the binding
needs to be updated.
Yes, I have that on my to-do list to update the binding to reflect this minItems/maxItems thing but I am not yet sure about how to handle the clock-names in that case. I.e. make "lcd" optional and enforce "lcd_pclk" only.
Quoted 30 lines
But the best guess is that the example is wrong.
The example below for jz4780-lcd cover all relevant parts - so just keep it as the only example.
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 94
Quoted 5 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +5
-0+ + - | + #include <dt-bindings/clock/jz4780-cgu.h> + + lcdc0: lcdc0@13050000 {Name this lcdc
And drop "lcdc0@13050000" as this is not relevant for this example.Remember - the examples exist to explain the binding. They are just examples.
Quoted 14 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +14
-0+ compatible = "ingenic,jz4780-lcd"; + reg = <0x13050000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>; + clock-names = "lcd", "lcd_pclk"; + + interrupt-parent = <&intc>; + interrupts = <31>; + + jz4780_lcd_out: port { + #address-cells = <1>; + #size-cells = <0>; + + jz4780_out_hdmi: endpoint@0 {
Quoted 8 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 114
Quoted 6 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +6
-0+ reg = <0>; + remote-endpoint = <&hdmi_in_lcd>; + }; + }; + }; +And drop this as it does not add anything extra.
Well, it demonstrates how to add a second lcdc which is disabled.
Showing that it is possible to do so is IMHO the most important part of the example because it is not at all obvious.
I have also added both SoC to show how differently they can and should be.
Quoted 6 lines
Quoted 6 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +6
-0+ lcdc1: lcdc1@130a0000 { + compatible = "ingenic,jz4780-lcd"; + reg = <0x130a0000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD1PIXCLK>; + clock-names = "lcd", "lcd_pclk";
Quoted 8 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 126
Quoted 6 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +6
-0+ + interrupt-parent = <&intc>; + interrupts = <31>; + + status = "disabled"; + };Sam
BR and thanks,
Nikolaus
Re: [RFC v3 1/8] dt-bindings: display: convert ingenic, lcd.txt to ingenic, lcd.yaml
Hi Nikolaus.
Quoted 19 lines
Quoted 10 lines
Quoted 10 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +10
-0+ +examples: + - | + #include <dt-bindings/clock/jz4725b-cgu.h> + + panel { + compatible = "sharp,ls020b1dd01d"; + + backlight = <&backlight>; + power-supply = <&vcc>;Quoted 8 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 72
Quoted 7 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +7
-0+ + port { + panel_input: endpoint { + remote-endpoint = <&panel_output>; + }; + }; + };The panel part is not needed - better to drop it.
Quoted 1 line
Well, it is needed to fulfill the remote-endpoint below.
Examples may have phandle that are not defined.
So the example will work fine without it.
See other similar examples.
Quoted 27 lines
Quoted 16 lines
Quoted 16 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +13
-0+ + lcd: lcd-controller@13050000 { + compatible = "ingenic,jz4725b-lcd"; + reg = <0x13050000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <31>; + + clocks = <&cgu JZ4725B_CLK_LCD>; + clock-names = "lcd", "lcd_pclk"; + + port { + panel_output: endpoint {Quoted 8 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 89
Quoted 4 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +4
-0+ remote-endpoint = <&panel_input>; + }; + }; + };We know this example will not pass the check, as there is only one clock specified.
I suggest to drop this example.
If it later turns out that jz4725b only have one clock,Paul already reported that it only wants to see one clock.
Quoted 7 lines
Quoted 2 lines
then the binding
needs to be updated.Yes, I have that on my to-do list to update the binding to reflect this minItems/maxItems thing but I am not yet sure about how to handle the clock-names in that case. I.e. make "lcd" optional and enforce "
lcd_pclk" only.
Look forward to next version.
Quoted 40 lines
Quoted 31 lines
But the best guess is that the example is wrong.
The example below for jz4780-lcd cover all relevant parts - so just keep it as the only example.
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 94
Quoted 5 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +5
-0+ + - | + #include <dt-bindings/clock/jz4780-cgu.h> + + lcdc0: lcdc0@13050000 {Name this lcdc
And drop "lcdc0@13050000" as this is not relevant for this example.Remember - the examples exist to explain the binding. They are just examples.
Quoted 14 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +14
-0+ compatible = "ingenic,jz4780-lcd"; + reg = <0x13050000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>; + clock-names = "lcd", "lcd_pclk"; + + interrupt-parent = <&intc>; + interrupts = <31>; + + jz4780_lcd_out: port { + #address-cells = <1>; + #size-cells = <0>; + + jz4780_out_hdmi: endpoint@0 {Quoted 8 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 114
Quoted 6 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +6
-0+ reg = <0>; + remote-endpoint = <&hdmi_in_lcd>; + }; + }; + }; +And drop this as it does not add anything extra.
Quoted 1 line
Well, it demonstrates how to add a second lcdc which is disabled.
The purpose of the example is to show an example of the binding specified in this file.
Adding a second disabled lcdc is a general thing, and not something we want in all the individual examples.
Also the actual content, for example register values can be random as they are not part of the binding.
This is not a documentation of the HW but a binding example.
Sam
Quoted 22 lines
Showing that it is possible to do so is IMHO the most important part of the example because it is not at all obvious.
I have also added both SoC to show how differently they can and should be.
Quoted 6 lines
Quoted 6 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +6
-0+ lcdc1: lcdc1@130a0000 { + compatible = "ingenic,jz4780-lcd"; + reg = <0x130a0000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD1PIXCLK>; + clock-names = "lcd", "lcd_pclk";Quoted 8 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 126
Quoted 6 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +6
-0+ + interrupt-parent = <&intc>; + interrupts = <31>; + + status = "disabled"; + };Sam
Quoted 3 lines
BR and thanks,
Nikolaus
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [RFC v3 1/8] dt-bindings: display: convert ingenic, lcd.txt to ingenic, lcd.yaml
Hi Sam,
Quoted 23 lines
Am 09.04.2020 um 14:20 schrieb Sam Ravnborg <[email protected]>:
Hi Nikolaus.
Quoted 19 lines
Quoted 18 lines
Quoted 7 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +7
-0+ +examples: + - | + #include <dt-bindings/clock/jz4725b-cgu.h> + + panel { + compatible = "sharp,ls020b1dd01d";Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 72
Quoted 10 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +10
-0+ + backlight = <&backlight>; + power-supply = <&vcc>; + + port { + panel_input: endpoint { + remote-endpoint = <&panel_output>; + }; + }; + };The panel part is not needed - better to drop it.
Quoted 5 lines
Quoted 1 line
Well, it is needed to fulfill the remote-endpoint below.
Examples may have phandle that are not defined.
So the example will work fine without it.
See other similar examples.
Ok.
Quoted 77 lines
Quoted 28 lines
Quoted 17 lines
Quoted 17 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +13
-0+ + lcd: lcd-controller@13050000 { + compatible = "ingenic,jz4725b-lcd"; + reg = <0x13050000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <31>; + + clocks = <&cgu JZ4725B_CLK_LCD>; + clock-names = "lcd", "lcd_pclk"; + + port { + panel_output: endpoint {Quoted 8 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 89
Quoted 4 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +4
-0+ remote-endpoint = <&panel_input>; + }; + }; + };We know this example will not pass the check, as there is only one clock specified.
I suggest to drop this example.
If it later turns out that jz4725b only have one clock,Paul already reported that it only wants to see one clock.
Quoted 7 lines
Quoted 2 lines
then the binding
needs to be updated.Yes, I have that on my to-do list to update the binding to reflect this minItems/maxItems thing but I am not yet sure about how to handle the clock-names in that case. I.e. make "lcd" optional and enforce "
lcd_pclk" only.Look forward to next version.
Quoted 40 lines
Quoted 39 lines
But the best guess is that the example is wrong.
The example below for jz4780-lcd cover all relevant parts - so just keep it as the only example.
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 94
Quoted 5 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +5
-0+ + - | + #include <dt-bindings/clock/jz4780-cgu.h> + + lcdc0: lcdc0@13050000 {Name this lcdc
And drop "lcdc0@13050000" as this is not relevant for this example.Remember - the examples exist to explain the binding. They are just examples.
Quoted 10 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +10
-0+ compatible = "ingenic,jz4780-lcd"; + reg = <0x13050000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>; + clock-names = "lcd", "lcd_pclk"; + + interrupt-parent = <&intc>; + interrupts = <31>; + + jz4780_lcd_out: port {Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 114
Quoted 10 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +10
-0+ #address-cells = <1>; + #size-cells = <0>; + + jz4780_out_hdmi: endpoint@0 { + reg = <0>; + remote-endpoint = <&hdmi_in_lcd>; + }; + }; + }; +And drop this as it does not add anything extra.
Quoted 5 lines
Quoted 1 line
Well, it demonstrates how to add a second lcdc which is disabled.
The purpose of the example is to show an example of the binding specified in this file.
Adding a second disabled lcdc is a general thing, and not something we want in all the individual examples.
This is contrary to what I have expected. My assumption is that the example is some piece of code that you (and me and other readers of the bindings documentation) can easily understand and even copy&paste into a DTS. Like an example in a training book. This is how I always have used the .txt bindings when writing new DTS. This ease of use is lost if the examples are incomplete and show only part of what is needed to get a working DTS. If not here, where can one get the required information from?
Or do you see this as unit-test-cases for the formal bindings definitions? Then, it should IMHO not be named "example".
Quoted 3 lines
Also the actual content, for example register values can be random as they are not part of the binding.
This is not a documentation of the HW but a binding example.
Here it is the bindings for a very specific SoC and the register values are well defined and there is no choice at all.
So I'll simplify it for v4 although I don't like the concept behind.
BR and thanks,
Nikolaus
Quoted 28 lines
Sam
Quoted 25 lines
Showing that it is possible to do so is IMHO the most important part of the example because it is not at all obvious.
I have also added both SoC to show how differently they can and should be.
Quoted 6 lines
Quoted 6 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +6
-0+ lcdc1: lcdc1@130a0000 { + compatible = "ingenic,jz4780-lcd"; + reg = <0x130a0000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD1PIXCLK>; + clock-names = "lcd", "lcd_pclk";Quoted 8 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml line 126
Quoted 6 lines
Documentation/devicetree/bindings/display/ingenic,lcd.yaml new file +6
-0+ + interrupt-parent = <&intc>; + interrupts = <31>; + + status = "disabled"; + };Sam
BR and thanks,
Nikolaus
RFC v3 2/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 | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/ingenic/ingenic-drm.c +1 -0
@@ -843,6 +843,7 @@ static const struct of_device_id ingenic_drm_of_match[] = { { .compatible = "ingenic,jz4770-lcd", .data = &jz4770_soc_info }, { /* sentinel */ }, }; +MODULE_DEVICE_TABLE (of, ingenic_drm_of_match);static struct platform_driver ingenic_drm_driver = { .driver = {
Signature · 1 line
2.25.1
Paul Cercueil
maintainerRe: [RFC v3 2/8] drm: ingenic-drm: add MODULE_DEVICE_TABLE
Hi Nikolaus,
Quoted 4 lines · H. Nikolaus Schaller
so that the driver can load by matching the device tree if compiled as module.
Signed-off-by H. Nikolaus Schaller <[email protected]>
Please add:
And re-send this patch alone, then I can merge it ASAP.
Cheers,
-Paul
Quoted 20 lines
--- drivers/gpu/drm/ingenic/ingenic-drm.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/ingenic/ingenic-drm.c +1
-0@@ -843,6 +843,7 @@ static const struct of_device_id ingenic_drm_of_match[] = { { .compatible ="ingenic,jz4770-lcd" , .data = &jz4770_soc_info }, {/* sentinel */ }, }; +MODULE_DEVICE_TABLE (of, ingenic_drm_of_match); static struct platform_driver ingenic_drm_driver = {.driver = {
--
2.25.1
RFC v3 3/8 drm: ingenic-drm: add support for ingenic,jz4780-lcd
In reply to H. Nikolaus SchallerThis adds jz_soc_info and a compatible string for the jz4780 lcd controller.
Note that the jz4780 lcdc is a superset of the jz4740 lcdc and the additional functions are not used if they stay uninitialized.
--- drivers/gpu/drm/ingenic/ingenic-drm.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/ingenic/ingenic-drm.c +7 -0
@@ -837,10 +837,17 @@ static const struct jz_soc_info jz4770_soc_info = { .max_height = 720, }; +static const struct jz_soc_info jz4780_soc_info = { + .needs_dev_clk = true, + .max_width =4096 , + .max_height =2048 , +}; +static const struct of_device_id ingenic_drm_of_match[] = { { .compatible ="ingenic,jz4740-lcd" , .data = &jz4740_soc_info }, { .compatible ="ingenic,jz4725b-lcd" , .data = &jz4725b_soc_info }, { .compatible ="ingenic,jz4770-lcd" , .data = &jz4770_soc_info }, + { .compatible ="ingenic,jz4780-lcd" , .data = &jz4780_soc_info }, {/* sentinel */ }, };MODULE_DEVICE_TABLE (of, ingenic_drm_of_match);
Signature · 1 line
2.25.1
RFC v3 4/8 dt-bindings: display: add ingenic-jz4780-hdmi DT Schema
In reply to H. Nikolaus SchallerFrom: Sam Ravnborg <[email protected]>
Add DT bindings for the hdmi driver for the Ingenic JZ4780 SoC. Based on .txt binding from Zubair Lutfullah Kakakhel
--- .../bindings/display/ingenic-jz4780-hdmi.yaml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml new file +82 -0
@@ -0,0 +1,82 @@ +# 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: + - 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.25.1
Re: [RFC v3 4/8] dt-bindings: display: add ingenic-jz4780-hdmi DT Schema
Hi Nikolaus.
Quoted 9 lines · H. Nikolaus Schaller
From: Sam Ravnborg <[email protected]>
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]>Signed-off-by H. Nikolaus Schaller <[email protected]>Cc Rob Herring <[email protected]>
There is a few mistakes that originate from my original patch - sorry.
Quoted 18 lines
--- .../bindings/display/ingenic-jz4780-hdmi.yaml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yamlDocumentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml new file +7
-0@@ -0,0 +1,82 @@ +# 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
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml new file +10
-0+ +maintainers: + - 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#
panel-common is only supposed to be used by panels. There is a few users in display/ but this is bindings that are candidates to be moved to panel/ - and this binding describes a display controller and not a panel.
Quoted 18 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml new file +18
-0+ +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:
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml line 45
Quoted 10 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml new file +10
-0+ maxItems: 2 + description: Clock specifiers for isrf and iahb clocks + + clock-names: + items: + - const: isfr + - const: iahb + + ddc-i2c-bus: true + ports: true
As we no longer rely on panel-common this needs to be fully specified - for example like this:
ddc-i2c-bus:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the I2C bus that is connected to DDC
ports:
type: object
description: |
A ports node with endpoint definitions as defined in Documentation/devicetree/bindings/media/video-interfaces.txt.
Thanks for taking care of this binding.
Sam
Quoted 44 lines
Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml new file +37
-0+ +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 · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
RFC v3 5/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.25.1
RFC v3 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 | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+)
arch/mips/boot/dts/ingenic/jz4780.dtsi +46 -0
@@ -434,4 +434,50 @@ bch: bch@134d0000 { 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"; + }; + + lcdc0: lcdc0@13050000 { + compatible = "ingenic,jz4780-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"; + }; + + lcdc1: lcdc1@130a0000 { + compatible = "ingenic,jz4780-lcd"; + reg = <0x130a0000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD1PIXCLK>; + clock-names = "lcd", "lcd_pclk"; + + interrupt-parent = <&intc>; + interrupts = <31>; + + status = "disabled"; + }; + };
Signature · 1 line
2.25.1
RFC v3 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
@@ -62,6 +62,28 @@ eth0_power: fixedregulator@0 { 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";
@@ -435,6 +457,12 @@ pins_i2c4: i2c4 { 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";
@@ -471,3 +499,39 @@ &tcu { 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>; + }; + }; + }; +}; + +&lcdc0 { + status = "okay"; + + port { + lcd_out: endpoint { + remote-endpoint = <&dw_hdmi_in>; + }; + }; +};
Signature · 1 line
2.25.1
RFC v3 8/8 MIPS: CI20: defconfig: configure for DRM_DW_HDMI_JZ4780
In reply to H. Nikolaus SchallerWe configure them as loadable modules by default.
--- 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.25.1