All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v2 0/8] MIPS: CI20: add HDMI out support
@ 2020-02-28 18:19 ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: dri-devel, devicetree, linux-kernel, linux-mips, linux-gpio,
	letux-kernel, kernel

* Converted .txt bindings to .yaml (by Sam Ravnborg <sam@ravnborg.org> - 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 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 <paul@boddie.org.uk>
* Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>


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

Sam Ravnborg (2):
  dt-bindings: display: add ingenic-jz4780-lcd DT Schema
  dt-bindings: display: add ingenic-jz4780-hdmi DT Schema

 .../bindings/display/ingenic-jz4780-hdmi.yaml |  83 ++++++++++++
 .../bindings/display/ingenic-jz4780-lcd.yaml  |  78 ++++++++++++
 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, 398 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
 create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
 create mode 100644 drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c

-- 
2.23.0


^ permalink raw reply	[flat|nested] 51+ messages in thread

* [RFC v2 0/8] MIPS: CI20: add HDMI out support
@ 2020-02-28 18:19 ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: devicetree, linux-kernel, dri-devel, linux-mips, linux-gpio,
	kernel, letux-kernel

* Converted .txt bindings to .yaml (by Sam Ravnborg <sam@ravnborg.org> - 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 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 <paul@boddie.org.uk>
* Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>


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

Sam Ravnborg (2):
  dt-bindings: display: add ingenic-jz4780-lcd DT Schema
  dt-bindings: display: add ingenic-jz4780-hdmi DT Schema

 .../bindings/display/ingenic-jz4780-hdmi.yaml |  83 ++++++++++++
 .../bindings/display/ingenic-jz4780-lcd.yaml  |  78 ++++++++++++
 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, 398 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
 create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
 create mode 100644 drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c

-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [RFC v2 1/8] dt-bindings: display: add ingenic-jz4780-lcd DT Schema
  2020-02-28 18:19 ` H. Nikolaus Schaller
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: dri-devel, devicetree, linux-kernel, linux-mips, linux-gpio,
	letux-kernel, kernel, Sam Ravnborg, Zubair Lutfullah Kakakhel,
	Rob Herring

From: Sam Ravnborg <sam@ravnborg.org>

Add DT bindings for the LCD controller on the jz4780 SoC
Based on .txt binding from Zubair Lutfullah Kakakhel

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: H. Nikolaus Schaller <hns@goldelico.com>
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
---
 .../bindings/display/ingenic-jz4780-lcd.yaml  | 78 +++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml

diff --git a/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
new file mode 100644
index 000000000000..c71415a3a342
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
@@ -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 <Zubair.Kakakhel@imgtec.com>
+  - H. Nikolaus Schaller <hns@goldelico.com>
+
+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>;
+            };
+        };
+    };
+
+...
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 1/8] dt-bindings: display: add ingenic-jz4780-lcd DT Schema
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: devicetree, Zubair Lutfullah Kakakhel, linux-kernel, dri-devel,
	linux-mips, linux-gpio, kernel, letux-kernel, Sam Ravnborg

From: Sam Ravnborg <sam@ravnborg.org>

Add DT bindings for the LCD controller on the jz4780 SoC
Based on .txt binding from Zubair Lutfullah Kakakhel

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: H. Nikolaus Schaller <hns@goldelico.com>
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
---
 .../bindings/display/ingenic-jz4780-lcd.yaml  | 78 +++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml

diff --git a/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
new file mode 100644
index 000000000000..c71415a3a342
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
@@ -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 <Zubair.Kakakhel@imgtec.com>
+  - H. Nikolaus Schaller <hns@goldelico.com>
+
+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>;
+            };
+        };
+    };
+
+...
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 2/8] dt-bindings: display: add ingenic-jz4780-hdmi DT Schema
  2020-02-28 18:19 ` H. Nikolaus Schaller
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: dri-devel, devicetree, linux-kernel, linux-mips, linux-gpio,
	letux-kernel, kernel, Sam Ravnborg, Zubair Lutfullah Kakakhel,
	Rob Herring

From: Sam Ravnborg <sam@ravnborg.org>

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 <sam@ravnborg.org>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: H. Nikolaus Schaller <hns@goldelico.com>
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
---
 .../bindings/display/ingenic-jz4780-hdmi.yaml | 83 +++++++++++++++++++
 1 file changed, 83 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml

diff --git a/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml b/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
new file mode 100644
index 000000000000..9b71c427bd69
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
@@ -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 <Zubair.Kakakhel@imgtec.com>
+  - H. Nikolaus Schaller <hns@goldelico.com>
+
+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>;
+                };
+            };
+        };
+    };
+
+...
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 2/8] dt-bindings: display: add ingenic-jz4780-hdmi DT Schema
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: devicetree, Zubair Lutfullah Kakakhel, linux-kernel, dri-devel,
	linux-mips, linux-gpio, kernel, letux-kernel, Sam Ravnborg

From: Sam Ravnborg <sam@ravnborg.org>

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 <sam@ravnborg.org>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: H. Nikolaus Schaller <hns@goldelico.com>
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
---
 .../bindings/display/ingenic-jz4780-hdmi.yaml | 83 +++++++++++++++++++
 1 file changed, 83 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml

diff --git a/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml b/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
new file mode 100644
index 000000000000..9b71c427bd69
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
@@ -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 <Zubair.Kakakhel@imgtec.com>
+  - H. Nikolaus Schaller <hns@goldelico.com>
+
+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>;
+                };
+            };
+        };
+    };
+
+...
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 3/8] drm: ingenic-drm: add MODULE_DEVICE_TABLE
  2020-02-28 18:19 ` H. Nikolaus Schaller
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: dri-devel, devicetree, linux-kernel, linux-mips, linux-gpio,
	letux-kernel, kernel

so that the driver can load by matching the device tree
if compiled as module.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 drivers/gpu/drm/ingenic/ingenic-drm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c
index 6d47ef7b148c..d8617096dd8e 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
@@ -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",
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 3/8] drm: ingenic-drm: add MODULE_DEVICE_TABLE
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: devicetree, linux-kernel, dri-devel, linux-mips, linux-gpio,
	kernel, letux-kernel

so that the driver can load by matching the device tree
if compiled as module.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 drivers/gpu/drm/ingenic/ingenic-drm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c
index 6d47ef7b148c..d8617096dd8e 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
@@ -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",
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 4/8] drm: ingenic: add jz4780 Synopsys HDMI driver.
  2020-02-28 18:19 ` H. Nikolaus Schaller
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: dri-devel, devicetree, linux-kernel, linux-mips, linux-gpio,
	letux-kernel, kernel

From: Paul Boddie <paul@boddie.org.uk>

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.

Signed-off-by: Paul Boddie <paul@boddie.org.uk>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 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

diff --git a/drivers/gpu/drm/ingenic/Kconfig b/drivers/gpu/drm/ingenic/Kconfig
index d82c3d37ec9c..44bfd0d35af1 100644
--- a/drivers/gpu/drm/ingenic/Kconfig
+++ b/drivers/gpu/drm/ingenic/Kconfig
@@ -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.
diff --git a/drivers/gpu/drm/ingenic/Makefile b/drivers/gpu/drm/ingenic/Makefile
index 11cac42ce0bb..238383de63c7 100644
--- a/drivers/gpu/drm/ingenic/Makefile
+++ b/drivers/gpu/drm/ingenic/Makefile
@@ -1 +1,2 @@
 obj-$(CONFIG_DRM_INGENIC) += ingenic-drm.o
+obj-$(CONFIG_DRM_DW_HDMI_JZ4780) += dw_hdmi-jz4780.o
diff --git a/drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c b/drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c
new file mode 100644
index 000000000000..fa379e337263
--- /dev/null
+++ b/drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c
@@ -0,0 +1,120 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright (C) 2011-2013 Freescale Semiconductor, Inc.
+ * Copyright (C) 2019 Paul Boddie <paul@boddie.org.uk>
+ *
+ * Derived from dw_hdmi-imx.c with i.MX portions removed.
+ * Probe and remove operations derived from rcar_dw_hdmi.c.
+ */
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+
+#include <drm/bridge/dw_hdmi.h>
+#include <drm/drm_of.h>
+
+static const struct dw_hdmi_mpll_config jz4780_mpll_cfg[] = {
+	{ 45250000,  { { 0x01e0, 0x0000 },
+		       { 0x21e1, 0x0000 },
+		       { 0x41e2, 0x0000 } } },
+	{ 92500000,  { { 0x0140, 0x0005 },
+		       { 0x2141, 0x0005 },
+		       { 0x4142, 0x0005 } } },
+	{ 148500000, { { 0x00a0, 0x000a },
+		       { 0x20a1, 0x000a },
+		       { 0x40a2, 0x000a } } },
+	{ 216000000, { { 0x00a0, 0x000a },
+		       { 0x2001, 0x000f },
+		       { 0x4002, 0x000f } } },
+	{ ~0UL,      { { 0x0000, 0x0000 },
+		       { 0x0000, 0x0000 },
+		       { 0x0000, 0x0000 } } }
+};
+
+static const struct dw_hdmi_curr_ctrl jz4780_cur_ctr[] = {
+	/*pixelclk     bpp8    bpp10   bpp12 */
+	{ 54000000,  { 0x091c, 0x091c, 0x06dc } },
+	{ 58400000,  { 0x091c, 0x06dc, 0x06dc } },
+	{ 72000000,  { 0x06dc, 0x06dc, 0x091c } },
+	{ 74250000,  { 0x06dc, 0x0b5c, 0x091c } },
+	{ 118800000, { 0x091c, 0x091c, 0x06dc } },
+	{ 216000000, { 0x06dc, 0x0b5c, 0x091c } },
+	{ ~0UL,      { 0x0000, 0x0000, 0x0000 } },
+};
+
+/*
+ * Resistance term 133Ohm Cfg
+ * PREEMP config 0.00
+ * TX/CK level 10
+ */
+static const struct dw_hdmi_phy_config jz4780_phy_config[] = {
+	/*pixelclk   symbol   term   vlev */
+	{ 216000000, 0x800d, 0x0005, 0x01ad},
+	{ ~0UL,      0x0000, 0x0000, 0x0000}
+};
+
+static enum drm_mode_status
+jz4780_hdmi_mode_valid(struct drm_connector *con,
+		       const struct drm_display_mode *mode)
+{
+	if (mode->clock < 13500)
+		return MODE_CLOCK_LOW;
+	/* FIXME: Hardware is capable of 270MHz, but setup data is missing. */
+	if (mode->clock > 216000)
+		return MODE_CLOCK_HIGH;
+
+	return MODE_OK;
+}
+
+static struct dw_hdmi_plat_data jz4780_dw_hdmi_plat_data = {
+	.mpll_cfg   = jz4780_mpll_cfg,
+	.cur_ctr    = jz4780_cur_ctr,
+	.phy_config = jz4780_phy_config,
+	.mode_valid = jz4780_hdmi_mode_valid,
+};
+
+static const struct of_device_id jz4780_dw_hdmi_dt_ids[] = {
+	{ .compatible = "ingenic,jz4780-dw-hdmi" },
+	{ /* Sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, jz4780_dw_hdmi_dt_ids);
+
+static int jz4780_dw_hdmi_probe(struct platform_device *pdev)
+{
+	struct dw_hdmi *hdmi;
+
+	hdmi = dw_hdmi_probe(pdev, &jz4780_dw_hdmi_plat_data);
+	if (IS_ERR(hdmi))
+		return PTR_ERR(hdmi);
+
+	platform_set_drvdata(pdev, hdmi);
+
+	return 0;
+}
+
+static int jz4780_dw_hdmi_remove(struct platform_device *pdev)
+{
+	struct dw_hdmi *hdmi = platform_get_drvdata(pdev);
+
+	dw_hdmi_remove(hdmi);
+
+	return 0;
+}
+
+static struct platform_driver jz4780_dw_hdmi_platform_driver = {
+	.probe  = jz4780_dw_hdmi_probe,
+	.remove = jz4780_dw_hdmi_remove,
+	.driver = {
+		.name = "dw-hdmi-jz4780",
+		.of_match_table = jz4780_dw_hdmi_dt_ids,
+	},
+};
+
+module_platform_driver(jz4780_dw_hdmi_platform_driver);
+
+MODULE_AUTHOR("Andy Yan <andy.yan@rock-chips.com>");
+MODULE_AUTHOR("Yakir Yang <ykk@rock-chips.com>");
+MODULE_AUTHOR("Paul Boddie <paul@boddie.org.uk>");
+MODULE_DESCRIPTION("Ingenic JZ4780 DW-HDMI Driver Extension");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:dw-hdmi-jz4780");
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 4/8] drm: ingenic: add jz4780 Synopsys HDMI driver.
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: devicetree, linux-kernel, dri-devel, linux-mips, linux-gpio,
	kernel, letux-kernel

From: Paul Boddie <paul@boddie.org.uk>

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.

Signed-off-by: Paul Boddie <paul@boddie.org.uk>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 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

diff --git a/drivers/gpu/drm/ingenic/Kconfig b/drivers/gpu/drm/ingenic/Kconfig
index d82c3d37ec9c..44bfd0d35af1 100644
--- a/drivers/gpu/drm/ingenic/Kconfig
+++ b/drivers/gpu/drm/ingenic/Kconfig
@@ -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.
diff --git a/drivers/gpu/drm/ingenic/Makefile b/drivers/gpu/drm/ingenic/Makefile
index 11cac42ce0bb..238383de63c7 100644
--- a/drivers/gpu/drm/ingenic/Makefile
+++ b/drivers/gpu/drm/ingenic/Makefile
@@ -1 +1,2 @@
 obj-$(CONFIG_DRM_INGENIC) += ingenic-drm.o
+obj-$(CONFIG_DRM_DW_HDMI_JZ4780) += dw_hdmi-jz4780.o
diff --git a/drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c b/drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c
new file mode 100644
index 000000000000..fa379e337263
--- /dev/null
+++ b/drivers/gpu/drm/ingenic/dw_hdmi-jz4780.c
@@ -0,0 +1,120 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright (C) 2011-2013 Freescale Semiconductor, Inc.
+ * Copyright (C) 2019 Paul Boddie <paul@boddie.org.uk>
+ *
+ * Derived from dw_hdmi-imx.c with i.MX portions removed.
+ * Probe and remove operations derived from rcar_dw_hdmi.c.
+ */
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+
+#include <drm/bridge/dw_hdmi.h>
+#include <drm/drm_of.h>
+
+static const struct dw_hdmi_mpll_config jz4780_mpll_cfg[] = {
+	{ 45250000,  { { 0x01e0, 0x0000 },
+		       { 0x21e1, 0x0000 },
+		       { 0x41e2, 0x0000 } } },
+	{ 92500000,  { { 0x0140, 0x0005 },
+		       { 0x2141, 0x0005 },
+		       { 0x4142, 0x0005 } } },
+	{ 148500000, { { 0x00a0, 0x000a },
+		       { 0x20a1, 0x000a },
+		       { 0x40a2, 0x000a } } },
+	{ 216000000, { { 0x00a0, 0x000a },
+		       { 0x2001, 0x000f },
+		       { 0x4002, 0x000f } } },
+	{ ~0UL,      { { 0x0000, 0x0000 },
+		       { 0x0000, 0x0000 },
+		       { 0x0000, 0x0000 } } }
+};
+
+static const struct dw_hdmi_curr_ctrl jz4780_cur_ctr[] = {
+	/*pixelclk     bpp8    bpp10   bpp12 */
+	{ 54000000,  { 0x091c, 0x091c, 0x06dc } },
+	{ 58400000,  { 0x091c, 0x06dc, 0x06dc } },
+	{ 72000000,  { 0x06dc, 0x06dc, 0x091c } },
+	{ 74250000,  { 0x06dc, 0x0b5c, 0x091c } },
+	{ 118800000, { 0x091c, 0x091c, 0x06dc } },
+	{ 216000000, { 0x06dc, 0x0b5c, 0x091c } },
+	{ ~0UL,      { 0x0000, 0x0000, 0x0000 } },
+};
+
+/*
+ * Resistance term 133Ohm Cfg
+ * PREEMP config 0.00
+ * TX/CK level 10
+ */
+static const struct dw_hdmi_phy_config jz4780_phy_config[] = {
+	/*pixelclk   symbol   term   vlev */
+	{ 216000000, 0x800d, 0x0005, 0x01ad},
+	{ ~0UL,      0x0000, 0x0000, 0x0000}
+};
+
+static enum drm_mode_status
+jz4780_hdmi_mode_valid(struct drm_connector *con,
+		       const struct drm_display_mode *mode)
+{
+	if (mode->clock < 13500)
+		return MODE_CLOCK_LOW;
+	/* FIXME: Hardware is capable of 270MHz, but setup data is missing. */
+	if (mode->clock > 216000)
+		return MODE_CLOCK_HIGH;
+
+	return MODE_OK;
+}
+
+static struct dw_hdmi_plat_data jz4780_dw_hdmi_plat_data = {
+	.mpll_cfg   = jz4780_mpll_cfg,
+	.cur_ctr    = jz4780_cur_ctr,
+	.phy_config = jz4780_phy_config,
+	.mode_valid = jz4780_hdmi_mode_valid,
+};
+
+static const struct of_device_id jz4780_dw_hdmi_dt_ids[] = {
+	{ .compatible = "ingenic,jz4780-dw-hdmi" },
+	{ /* Sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, jz4780_dw_hdmi_dt_ids);
+
+static int jz4780_dw_hdmi_probe(struct platform_device *pdev)
+{
+	struct dw_hdmi *hdmi;
+
+	hdmi = dw_hdmi_probe(pdev, &jz4780_dw_hdmi_plat_data);
+	if (IS_ERR(hdmi))
+		return PTR_ERR(hdmi);
+
+	platform_set_drvdata(pdev, hdmi);
+
+	return 0;
+}
+
+static int jz4780_dw_hdmi_remove(struct platform_device *pdev)
+{
+	struct dw_hdmi *hdmi = platform_get_drvdata(pdev);
+
+	dw_hdmi_remove(hdmi);
+
+	return 0;
+}
+
+static struct platform_driver jz4780_dw_hdmi_platform_driver = {
+	.probe  = jz4780_dw_hdmi_probe,
+	.remove = jz4780_dw_hdmi_remove,
+	.driver = {
+		.name = "dw-hdmi-jz4780",
+		.of_match_table = jz4780_dw_hdmi_dt_ids,
+	},
+};
+
+module_platform_driver(jz4780_dw_hdmi_platform_driver);
+
+MODULE_AUTHOR("Andy Yan <andy.yan@rock-chips.com>");
+MODULE_AUTHOR("Yakir Yang <ykk@rock-chips.com>");
+MODULE_AUTHOR("Paul Boddie <paul@boddie.org.uk>");
+MODULE_DESCRIPTION("Ingenic JZ4780 DW-HDMI Driver Extension");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:dw-hdmi-jz4780");
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 5/8] pinctrl: ingenic: add hdmi-ddc pin control group
  2020-02-28 18:19 ` H. Nikolaus Schaller
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: dri-devel, devicetree, linux-kernel, linux-mips, linux-gpio,
	letux-kernel, kernel

From: Paul Boddie <paul@boddie.org.uk>

Signed-off-by: Paul Boddie <paul@boddie.org.uk>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 drivers/pinctrl/pinctrl-ingenic.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
index 96f04d121ebd..1599a003c31f 100644
--- a/drivers/pinctrl/pinctrl-ingenic.c
+++ b/drivers/pinctrl/pinctrl-ingenic.c
@@ -4,6 +4,7 @@
  *
  * Copyright (c) 2017 Paul Cercueil <paul@crapouillou.net>
  * Copyright (c) 2019 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
+ * Copyright (c) 2017, 2019 Paul Boddie <paul@boddie.org.uk>
  */
 
 #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 = {
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 5/8] pinctrl: ingenic: add hdmi-ddc pin control group
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: devicetree, linux-kernel, dri-devel, linux-mips, linux-gpio,
	kernel, letux-kernel

From: Paul Boddie <paul@boddie.org.uk>

Signed-off-by: Paul Boddie <paul@boddie.org.uk>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 drivers/pinctrl/pinctrl-ingenic.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
index 96f04d121ebd..1599a003c31f 100644
--- a/drivers/pinctrl/pinctrl-ingenic.c
+++ b/drivers/pinctrl/pinctrl-ingenic.c
@@ -4,6 +4,7 @@
  *
  * Copyright (c) 2017 Paul Cercueil <paul@crapouillou.net>
  * Copyright (c) 2019 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
+ * Copyright (c) 2017, 2019 Paul Boddie <paul@boddie.org.uk>
  */
 
 #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 = {
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
  2020-02-28 18:19 ` H. Nikolaus Schaller
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: dri-devel, devicetree, linux-kernel, linux-mips, linux-gpio,
	letux-kernel, kernel

From: Paul Boddie <paul@boddie.org.uk>

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.

Signed-off-by: Paul Boddie <paul@boddie.org.uk>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 ++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
index f928329b034b..391d4e1efd35 100644
--- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
+++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
@@ -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";
+	};
 };
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: devicetree, linux-kernel, dri-devel, linux-mips, linux-gpio,
	kernel, letux-kernel

From: Paul Boddie <paul@boddie.org.uk>

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.

Signed-off-by: Paul Boddie <paul@boddie.org.uk>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 ++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
index f928329b034b..391d4e1efd35 100644
--- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
+++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
@@ -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";
+	};
 };
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 7/8] MIPS: DTS: CI20: add HDMI setup
  2020-02-28 18:19 ` H. Nikolaus Schaller
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: dri-devel, devicetree, linux-kernel, linux-mips, linux-gpio,
	letux-kernel, kernel

From: Paul Boddie <paul@boddie.org.uk>

We need to hook up
* HDMI power regulator
* HDMI connector
* DDC pinmux
* HDMI and LCD endpoint connections

Signed-off-by: Paul Boddie <paul@boddie.org.uk>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 arch/mips/boot/dts/ingenic/ci20.dts | 64 +++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts
index 37b93166bf22..efa8270afbba 100644
--- a/arch/mips/boot/dts/ingenic/ci20.dts
+++ b/arch/mips/boot/dts/ingenic/ci20.dts
@@ -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>;
+		};
+	};
+};
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 7/8] MIPS: DTS: CI20: add HDMI setup
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: devicetree, linux-kernel, dri-devel, linux-mips, linux-gpio,
	kernel, letux-kernel

From: Paul Boddie <paul@boddie.org.uk>

We need to hook up
* HDMI power regulator
* HDMI connector
* DDC pinmux
* HDMI and LCD endpoint connections

Signed-off-by: Paul Boddie <paul@boddie.org.uk>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 arch/mips/boot/dts/ingenic/ci20.dts | 64 +++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts
index 37b93166bf22..efa8270afbba 100644
--- a/arch/mips/boot/dts/ingenic/ci20.dts
+++ b/arch/mips/boot/dts/ingenic/ci20.dts
@@ -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>;
+		};
+	};
+};
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 8/8] MIPS: CI20: defconfig: configure for DRM_DW_HDMI_JZ4780
  2020-02-28 18:19 ` H. Nikolaus Schaller
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: dri-devel, devicetree, linux-kernel, linux-mips, linux-gpio,
	letux-kernel, kernel

We configure them as loadable modules by default.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 arch/mips/configs/ci20_defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig
index be41df2a81fb..3f733a555cb2 100644
--- a/arch/mips/configs/ci20_defconfig
+++ b/arch/mips/configs/ci20_defconfig
@@ -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
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [RFC v2 8/8] MIPS: CI20: defconfig: configure for DRM_DW_HDMI_JZ4780
@ 2020-02-28 18:19   ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:19 UTC (permalink / raw)
  To: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal
  Cc: devicetree, linux-kernel, dri-devel, linux-mips, linux-gpio,
	kernel, letux-kernel

We configure them as loadable modules by default.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 arch/mips/configs/ci20_defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig
index be41df2a81fb..3f733a555cb2 100644
--- a/arch/mips/configs/ci20_defconfig
+++ b/arch/mips/configs/ci20_defconfig
@@ -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
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* Re: [RFC v2 1/8] dt-bindings: display: add ingenic-jz4780-lcd DT Schema
  2020-02-28 18:19   ` H. Nikolaus Schaller
@ 2020-02-28 18:42     ` Sam Ravnborg
  -1 siblings, 0 replies; 51+ messages in thread
From: Sam Ravnborg @ 2020-02-28 18:42 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton,
	Linus Walleij, Andi Kleen, Krzysztof Kozlowski,
	Geert Uytterhoeven, Eric W. Biederman, Miquel Raynal, dri-devel,
	devicetree, linux-kernel, linux-mips, linux-gpio, letux-kernel,
	kernel, Zubair Lutfullah Kakakhel, Rob Herring

Hi Nikolaus.

On Fri, Feb 28, 2020 at 07:19:26PM +0100, H. Nikolaus Schaller wrote:
> From: Sam Ravnborg <sam@ravnborg.org>
> 
> Add DT bindings for the LCD controller on the jz4780 SoC
> Based on .txt binding from Zubair Lutfullah Kakakhel
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Cc: H. Nikolaus Schaller <hns@goldelico.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: devicetree@vger.kernel.org

As this patch was sent to you and you forward it you need to
testify that this is OK.
To do so follow the rules of the Developemnt Certificate of Origin
as can be found in SubmittingPatches.rst.

In other words - you need to add your Signed-off-by: xxx <mail>
to the patch.
In the end we want to be able to see the patch the patch has taken
reading the Signed-off-by: lines from top to bottom.

Please check other patches in this series for the same issue.

	Sam

> ---
>  .../bindings/display/ingenic-jz4780-lcd.yaml  | 78 +++++++++++++++++++
>  1 file changed, 78 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> new file mode 100644
> index 000000000000..c71415a3a342
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> @@ -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 <Zubair.Kakakhel@imgtec.com>
> +  - H. Nikolaus Schaller <hns@goldelico.com>
> +
> +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>;
> +            };
> +        };
> +    };
> +
> +...
> -- 
> 2.23.0

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 1/8] dt-bindings: display: add ingenic-jz4780-lcd DT Schema
@ 2020-02-28 18:42     ` Sam Ravnborg
  0 siblings, 0 replies; 51+ messages in thread
From: Sam Ravnborg @ 2020-02-28 18:42 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Mark Rutland, Paul Boddie, Geert Uytterhoeven, David Airlie,
	dri-devel, linux-mips, Paul Cercueil, Miquel Raynal, Andi Kleen,
	Paul Burton, Krzysztof Kozlowski, devicetree,
	Zubair Lutfullah Kakakhel, linux-gpio, Rob Herring, letux-kernel,
	linux-kernel, Ralf Baechle, Eric W. Biederman, kernel

Hi Nikolaus.

On Fri, Feb 28, 2020 at 07:19:26PM +0100, H. Nikolaus Schaller wrote:
> From: Sam Ravnborg <sam@ravnborg.org>
> 
> Add DT bindings for the LCD controller on the jz4780 SoC
> Based on .txt binding from Zubair Lutfullah Kakakhel
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Cc: H. Nikolaus Schaller <hns@goldelico.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: devicetree@vger.kernel.org

As this patch was sent to you and you forward it you need to
testify that this is OK.
To do so follow the rules of the Developemnt Certificate of Origin
as can be found in SubmittingPatches.rst.

In other words - you need to add your Signed-off-by: xxx <mail>
to the patch.
In the end we want to be able to see the patch the patch has taken
reading the Signed-off-by: lines from top to bottom.

Please check other patches in this series for the same issue.

	Sam

> ---
>  .../bindings/display/ingenic-jz4780-lcd.yaml  | 78 +++++++++++++++++++
>  1 file changed, 78 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> new file mode 100644
> index 000000000000..c71415a3a342
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> @@ -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 <Zubair.Kakakhel@imgtec.com>
> +  - H. Nikolaus Schaller <hns@goldelico.com>
> +
> +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>;
> +            };
> +        };
> +    };
> +
> +...
> -- 
> 2.23.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 1/8] dt-bindings: display: add ingenic-jz4780-lcd DT Schema
  2020-02-28 18:42     ` Sam Ravnborg
  (?)
@ 2020-02-28 18:51     ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-28 18:51 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Mark Rutland, Paul Boddie, Geert Uytterhoeven, David Airlie,
	dri-devel, linux-mips, Paul Cercueil, Miquel Raynal, Andi Kleen,
	Paul Burton, Krzysztof Kozlowski, devicetree,
	Zubair Lutfullah Kakakhel, linux-gpio, Rob Herring, letux-kernel,
	linux-kernel, Ralf Baechle, Eric W. Biederman, kernel


[-- Attachment #1.1: Type: text/plain, Size: 5119 bytes --]

Hi Sam,

> Am 28.02.2020 um 19:42 schrieb Sam Ravnborg <sam@ravnborg.org>:
> 
> Hi Nikolaus.
> 
> On Fri, Feb 28, 2020 at 07:19:26PM +0100, H. Nikolaus Schaller wrote:
>> From: Sam Ravnborg <sam@ravnborg.org>
>> 
>> Add DT bindings for the LCD controller on the jz4780 SoC
>> Based on .txt binding from Zubair Lutfullah Kakakhel
>> 
>> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
>> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>> Cc: H. Nikolaus Schaller <hns@goldelico.com>
>> Cc: Rob Herring <robh@kernel.org>
>> Cc: devicetree@vger.kernel.org
> 
> As this patch was sent to you and you forward it you need to
> testify that this is OK.
> To do so follow the rules of the Developemnt Certificate of Origin
> as can be found in SubmittingPatches.rst.
> 
> In other words - you need to add your Signed-off-by: xxx <mail>
> to the patch.
> In the end we want to be able to see the patch the patch has taken
> reading the Signed-off-by: lines from top to bottom.

Ok, never someone explained this as precise as you did. Thanks!

> Please check other patches in this series for the same issue.

Ok.

BR and thanks,
Nikolaus

> 
> 	Sam
> 
>> ---
>> .../bindings/display/ingenic-jz4780-lcd.yaml  | 78 +++++++++++++++++++
>> 1 file changed, 78 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
>> 
>> diff --git a/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
>> new file mode 100644
>> index 000000000000..c71415a3a342
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
>> @@ -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 <Zubair.Kakakhel@imgtec.com>
>> +  - H. Nikolaus Schaller <hns@goldelico.com>
>> +
>> +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>;
>> +            };
>> +        };
>> +    };
>> +
>> +...
>> -- 
>> 2.23.0




Dr. Nikolaus Schaller
Geschäftsführer / Managing Director

Modiblast Pharma GmbH
Buchenstraße 3
82041 Oberhaching

Tel. +49-89-1226-4666 
Mail     nikolaus.schaller@modiblast.com

Der Inhalt dieser E-Mail (einschliesslich etwaiger beigefuegter Dateien) ist vertraulich und nur für den Empfaenger bestimmt. Sollten Sie nicht der bestimmungsgemaesse Empfaenger sein, ist Ihnen jegliche Offenlegung, Vervielfaeltigung, Weitergabe oder Nutzung des Inhalts untersagt. Bitte informieren Sie in diesem Fall unverzueglich den Absender und loeschen Sie die E-Mail (einschliesslich etwaiger beigefuegter Dateien) von Ihrem System.    
Vielen Dank.

The contents of this e-mail (including any attachments) are confidential and may be legally privileged. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system.
Thank you.

HRB 254854 (Amtsgericht München)
Geschäftsführer: Prof. Dr. Helga Schmetzer, Dr. Octavian Schatz, Dr. Nikolaus Schaller
www.modiblast.com


[-- Attachment #1.2.1: Type: text/html, Size: 8794 bytes --]

[-- Attachment #1.2.2: clip_image001.png --]
[-- Type: image/png, Size: 62661 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 5/8] pinctrl: ingenic: add hdmi-ddc pin control group
  2020-02-28 18:19   ` H. Nikolaus Schaller
@ 2020-02-28 22:05     ` Linus Walleij
  -1 siblings, 0 replies; 51+ messages in thread
From: Linus Walleij @ 2020-02-28 22:05 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton, Andi Kleen,
	Krzysztof Kozlowski, Geert Uytterhoeven, Eric W. Biederman,
	Miquel Raynal, open list:DRM PANEL DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, linux-mips, open list:GPIO SUBSYSTEM,
	Discussions about the Letux Kernel, kernel

On Fri, Feb 28, 2020 at 7:19 PM H. Nikolaus Schaller <hns@goldelico.com> wrote:

> From: Paul Boddie <paul@boddie.org.uk>
>
> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>

This looks good, can I just apply this to the pinctrl tree?

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 5/8] pinctrl: ingenic: add hdmi-ddc pin control group
@ 2020-02-28 22:05     ` Linus Walleij
  0 siblings, 0 replies; 51+ messages in thread
From: Linus Walleij @ 2020-02-28 22:05 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Paul Boddie, Geert Uytterhoeven, Paul Burton,
	open list:GPIO SUBSYSTEM, David Airlie,
	open list:DRM PANEL DRIVERS, kernel, linux-kernel, Ralf Baechle,
	linux-mips, Paul Cercueil, Andi Kleen, Rob Herring,
	Krzysztof Kozlowski, Miquel Raynal,
	Discussions about the Letux Kernel, Eric W. Biederman

On Fri, Feb 28, 2020 at 7:19 PM H. Nikolaus Schaller <hns@goldelico.com> wrote:

> From: Paul Boddie <paul@boddie.org.uk>
>
> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>

This looks good, can I just apply this to the pinctrl tree?

Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 5/8] pinctrl: ingenic: add hdmi-ddc pin control group
  2020-02-28 22:05     ` Linus Walleij
@ 2020-02-29  6:41       ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-29  6:41 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton, Andi Kleen,
	Krzysztof Kozlowski, Geert Uytterhoeven, Eric W. Biederman,
	Miquel Raynal, open list:DRM PANEL DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, linux-mips, open list:GPIO SUBSYSTEM,
	Discussions about the Letux Kernel, kernel


> Am 28.02.2020 um 23:05 schrieb Linus Walleij <linus.walleij@linaro.org>:
> 
> On Fri, Feb 28, 2020 at 7:19 PM H. Nikolaus Schaller <hns@goldelico.com> wrote:
> 
>> From: Paul Boddie <paul@boddie.org.uk>
>> 
>> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> 
> This looks good, can I just apply this to the pinctrl tree?

Yes. It is more or less a base commit for the others.

> 
> Yours,
> Linus Walleij

BR and thanks,
Nikolaus


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 5/8] pinctrl: ingenic: add hdmi-ddc pin control group
@ 2020-02-29  6:41       ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-02-29  6:41 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Paul Boddie, Geert Uytterhoeven, Paul Burton,
	open list:GPIO SUBSYSTEM, David Airlie,
	open list:DRM PANEL DRIVERS, kernel, linux-kernel, Ralf Baechle,
	linux-mips, Paul Cercueil, Andi Kleen, Rob Herring,
	Krzysztof Kozlowski, Miquel Raynal,
	Discussions about the Letux Kernel, Eric W. Biederman


> Am 28.02.2020 um 23:05 schrieb Linus Walleij <linus.walleij@linaro.org>:
> 
> On Fri, Feb 28, 2020 at 7:19 PM H. Nikolaus Schaller <hns@goldelico.com> wrote:
> 
>> From: Paul Boddie <paul@boddie.org.uk>
>> 
>> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> 
> This looks good, can I just apply this to the pinctrl tree?

Yes. It is more or less a base commit for the others.

> 
> Yours,
> Linus Walleij

BR and thanks,
Nikolaus

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 5/8] pinctrl: ingenic: add hdmi-ddc pin control group
  2020-02-28 18:19   ` H. Nikolaus Schaller
@ 2020-03-02  8:42     ` Linus Walleij
  -1 siblings, 0 replies; 51+ messages in thread
From: Linus Walleij @ 2020-03-02  8:42 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Ralf Baechle, Paul Burton, Andi Kleen,
	Krzysztof Kozlowski, Geert Uytterhoeven, Eric W. Biederman,
	Miquel Raynal, open list:DRM PANEL DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, linux-mips, open list:GPIO SUBSYSTEM,
	Discussions about the Letux Kernel, kernel

On Fri, Feb 28, 2020 at 7:19 PM H. Nikolaus Schaller <hns@goldelico.com> wrote:

> From: Paul Boddie <paul@boddie.org.uk>
>
> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>

Patch applied to the pinctrl tree, it should be fine to merge the rest
of the patches in another tree since there are no compile-time
dependencies.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 5/8] pinctrl: ingenic: add hdmi-ddc pin control group
@ 2020-03-02  8:42     ` Linus Walleij
  0 siblings, 0 replies; 51+ messages in thread
From: Linus Walleij @ 2020-03-02  8:42 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Paul Boddie, Geert Uytterhoeven, Paul Burton,
	open list:GPIO SUBSYSTEM, David Airlie,
	open list:DRM PANEL DRIVERS, kernel, linux-kernel, Ralf Baechle,
	linux-mips, Paul Cercueil, Andi Kleen, Rob Herring,
	Krzysztof Kozlowski, Miquel Raynal,
	Discussions about the Letux Kernel, Eric W. Biederman

On Fri, Feb 28, 2020 at 7:19 PM H. Nikolaus Schaller <hns@goldelico.com> wrote:

> From: Paul Boddie <paul@boddie.org.uk>
>
> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>

Patch applied to the pinctrl tree, it should be fine to merge the rest
of the patches in another tree since there are no compile-time
dependencies.

Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 1/8] dt-bindings: display: add ingenic-jz4780-lcd DT Schema
  2020-02-28 18:19   ` H. Nikolaus Schaller
@ 2020-03-02 18:55     ` Rob Herring
  -1 siblings, 0 replies; 51+ messages in thread
From: Rob Herring @ 2020-03-02 18:55 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Paul Cercueil, Paul Boddie, David Airlie, Daniel Vetter,
	Geert Uytterhoeven, Eric W. Biederman, H. Nikolaus Schaller,
	Miquel Raynal, dri-devel, devicetree, linux-kernel, linux-mips,
	linux-gpio, letux-kernel, kernel, Sam Ravnborg,
	Zubair Lutfullah Kakakhel

On Fri, 28 Feb 2020 19:19:26 +0100, "H. Nikolaus Schaller" wrote:
> From: Sam Ravnborg <sam@ravnborg.org>
> 
> Add DT bindings for the LCD controller on the jz4780 SoC
> Based on .txt binding from Zubair Lutfullah Kakakhel
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Cc: H. Nikolaus Schaller <hns@goldelico.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: devicetree@vger.kernel.org
> ---
>  .../bindings/display/ingenic-jz4780-lcd.yaml  | 78 +++++++++++++++++++
>  1 file changed, 78 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.example.dt.yaml: example-0: 'jz4780-lcdk@0x13050000' does not match any of the regexes: '.*-names$', '.*-supply$', '^#.*-cells$', '^#[a-zA-Z0-9,+\\-._]{0,63}$', '^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}$', '^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+(,[0-9a-fA-F]+)*$', '^__.*__$', 'pinctrl-[0-9]+'

See https://patchwork.ozlabs.org/patch/1246780
Please check and re-submit.

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 1/8] dt-bindings: display: add ingenic-jz4780-lcd DT Schema
@ 2020-03-02 18:55     ` Rob Herring
  0 siblings, 0 replies; 51+ messages in thread
From: Rob Herring @ 2020-03-02 18:55 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: devicetree, Paul Boddie, Zubair Lutfullah Kakakhel,
	Geert Uytterhoeven, David Airlie, H. Nikolaus Schaller, kernel,
	linux-kernel, dri-devel, linux-mips, Paul Cercueil, linux-gpio,
	Eric W. Biederman, Miquel Raynal, letux-kernel, Sam Ravnborg

On Fri, 28 Feb 2020 19:19:26 +0100, "H. Nikolaus Schaller" wrote:
> From: Sam Ravnborg <sam@ravnborg.org>
> 
> Add DT bindings for the LCD controller on the jz4780 SoC
> Based on .txt binding from Zubair Lutfullah Kakakhel
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Cc: H. Nikolaus Schaller <hns@goldelico.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: devicetree@vger.kernel.org
> ---
>  .../bindings/display/ingenic-jz4780-lcd.yaml  | 78 +++++++++++++++++++
>  1 file changed, 78 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.example.dt.yaml: example-0: 'jz4780-lcdk@0x13050000' does not match any of the regexes: '.*-names$', '.*-supply$', '^#.*-cells$', '^#[a-zA-Z0-9,+\\-._]{0,63}$', '^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}$', '^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+(,[0-9a-fA-F]+)*$', '^__.*__$', 'pinctrl-[0-9]+'

See https://patchwork.ozlabs.org/patch/1246780
Please check and re-submit.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 1/8] dt-bindings: display: add ingenic-jz4780-lcd DT Schema
  2020-02-28 18:19   ` H. Nikolaus Schaller
@ 2020-03-02 19:10     ` Paul Cercueil
  -1 siblings, 0 replies; 51+ messages in thread
From: Paul Cercueil @ 2020-03-02 19:10 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Paul Boddie, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Ralf Baechle, Paul Burton, Linus Walleij,
	Andi Kleen, Krzysztof Kozlowski, Geert Uytterhoeven,
	Eric W. Biederman, Miquel Raynal, dri-devel, devicetree,
	linux-kernel, linux-mips, linux-gpio, letux-kernel, kernel,
	Sam Ravnborg, Zubair Lutfullah Kakakhel, Rob Herring

Hi Nikolaus,


Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller 
<hns@goldelico.com> a écrit :
> From: Sam Ravnborg <sam@ravnborg.org>
> 
> Add DT bindings for the LCD controller on the jz4780 SoC
> Based on .txt binding from Zubair Lutfullah Kakakhel

If you mean Documentation/devicetree/bindings/display/ingenic,lcd.txt 
then it was written by me.

> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Cc: H. Nikolaus Schaller <hns@goldelico.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: devicetree@vger.kernel.org
> ---
>  .../bindings/display/ingenic-jz4780-lcd.yaml  | 78 
> +++++++++++++++++++
>  1 file changed, 78 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml 
> b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> new file mode 100644
> index 000000000000..c71415a3a342
> --- /dev/null
> +++ 
> b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> @@ -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 <Zubair.Kakakhel@imgtec.com>
> +  - H. Nikolaus Schaller <hns@goldelico.com>

I'm the author of the driver, please put me here; and remove Zubair, 
which 1. didn't touch the DRM driver at all, and 2. isn't working at 
ImgTec anymore. Also, no need to put yourself here, unless you maintain 
the Ingenic DRM/KMS driver.

> +
> +description: |
> +  LCD Controller is the Display Controller for the Ingenic JZ4780 SoC
> +
> +properties:

You should add a '$nodename' property.

> +  compatible:
> +    items:
> +      - const: ingenic,jz4780-lcd

The .txt lists more compatible strings. Please add them all.

> +
> +  reg:
> +    maxItems: 1
> +    description: the address & size of the LCD controller registers

Drop the description here,

> +
> +  interrupts:
> +    maxItems: 1
> +    description: Specifies the interrupt provided by parent

and here.

> +
> +  clocks:
> +    maxItems: 2
> +    description: Clock specifiers for the JZ4780_CLK_TVE 
> JZ4780_CLK_LCD0PIXCLK

Add one 'description:' per item.

> +
> +  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 {

The node name does not comply with the DT spec, it should be 
'lcd-controller'.

Cheers,
-Paul

> +        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>;
> +            };
> +        };
> +    };
> +
> +...
> --
> 2.23.0
> 



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 1/8] dt-bindings: display: add ingenic-jz4780-lcd DT Schema
@ 2020-03-02 19:10     ` Paul Cercueil
  0 siblings, 0 replies; 51+ messages in thread
From: Paul Cercueil @ 2020-03-02 19:10 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Mark Rutland, Paul Boddie, Geert Uytterhoeven, David Airlie,
	dri-devel, linux-mips, Miquel Raynal, Sam Ravnborg, Andi Kleen,
	Paul Burton, Krzysztof Kozlowski, devicetree,
	Zubair Lutfullah Kakakhel, linux-gpio, Rob Herring, letux-kernel,
	linux-kernel, Ralf Baechle, Eric W. Biederman, kernel

Hi Nikolaus,


Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller 
<hns@goldelico.com> a écrit :
> From: Sam Ravnborg <sam@ravnborg.org>
> 
> Add DT bindings for the LCD controller on the jz4780 SoC
> Based on .txt binding from Zubair Lutfullah Kakakhel

If you mean Documentation/devicetree/bindings/display/ingenic,lcd.txt 
then it was written by me.

> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Cc: H. Nikolaus Schaller <hns@goldelico.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: devicetree@vger.kernel.org
> ---
>  .../bindings/display/ingenic-jz4780-lcd.yaml  | 78 
> +++++++++++++++++++
>  1 file changed, 78 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml 
> b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> new file mode 100644
> index 000000000000..c71415a3a342
> --- /dev/null
> +++ 
> b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
> @@ -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 <Zubair.Kakakhel@imgtec.com>
> +  - H. Nikolaus Schaller <hns@goldelico.com>

I'm the author of the driver, please put me here; and remove Zubair, 
which 1. didn't touch the DRM driver at all, and 2. isn't working at 
ImgTec anymore. Also, no need to put yourself here, unless you maintain 
the Ingenic DRM/KMS driver.

> +
> +description: |
> +  LCD Controller is the Display Controller for the Ingenic JZ4780 SoC
> +
> +properties:

You should add a '$nodename' property.

> +  compatible:
> +    items:
> +      - const: ingenic,jz4780-lcd

The .txt lists more compatible strings. Please add them all.

> +
> +  reg:
> +    maxItems: 1
> +    description: the address & size of the LCD controller registers

Drop the description here,

> +
> +  interrupts:
> +    maxItems: 1
> +    description: Specifies the interrupt provided by parent

and here.

> +
> +  clocks:
> +    maxItems: 2
> +    description: Clock specifiers for the JZ4780_CLK_TVE 
> JZ4780_CLK_LCD0PIXCLK

Add one 'description:' per item.

> +
> +  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 {

The node name does not comply with the DT spec, it should be 
'lcd-controller'.

Cheers,
-Paul

> +        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>;
> +            };
> +        };
> +    };
> +
> +...
> --
> 2.23.0
> 


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 2/8] dt-bindings: display: add ingenic-jz4780-hdmi DT Schema
  2020-02-28 18:19   ` H. Nikolaus Schaller
@ 2020-03-02 19:19     ` Paul Cercueil
  -1 siblings, 0 replies; 51+ messages in thread
From: Paul Cercueil @ 2020-03-02 19:19 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Paul Boddie, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Ralf Baechle, Paul Burton, Linus Walleij,
	Andi Kleen, Krzysztof Kozlowski, Geert Uytterhoeven,
	Eric W. Biederman, Miquel Raynal, dri-devel, devicetree,
	linux-kernel, linux-mips, linux-gpio, letux-kernel, kernel,
	Sam Ravnborg, Zubair Lutfullah Kakakhel, Rob Herring

Hi Nikolaus,


Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller 
<hns@goldelico.com> a écrit :
> From: Sam Ravnborg <sam@ravnborg.org>
> 
> 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 <sam@ravnborg.org>
> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Cc: H. Nikolaus Schaller <hns@goldelico.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: devicetree@vger.kernel.org
> ---
>  .../bindings/display/ingenic-jz4780-hdmi.yaml | 83 
> +++++++++++++++++++
>  1 file changed, 83 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml 
> b/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
> new file mode 100644
> index 000000000000..9b71c427bd69
> --- /dev/null
> +++ 
> b/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
> @@ -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 <Zubair.Kakakhel@imgtec.com>
> +  - H. Nikolaus Schaller <hns@goldelico.com>

Did Zubair write this glue driver? He's been MIA for a while, doesn't 
work at ImgTec anymore, and this email doesn't work.

> +
> +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

Remove the description here,

> +
> +  reg-io-width:
> +    const: 4
> +
> +  interrupts:
> +    maxItems: 1
> +    description: Specifies the interrupt provided by parent

and here.

The rule is that if there is only one "reg", "interrupts" or "clocks" 
entry then a description is not needed as it's pretty obvious what it's 
for.

> +
> +  clocks:
> +    maxItems: 2
> +    description: Clock specifiers for isrf and iahb clocks

You need two 'description:' like this:

clocks:
  items:
    - description: ISRF clock
    - description: IAHB clock

Cheers,
-Paul

> +
> +  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>;
> +                };
> +            };
> +        };
> +    };
> +
> +...
> --
> 2.23.0
> 



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 2/8] dt-bindings: display: add ingenic-jz4780-hdmi DT Schema
@ 2020-03-02 19:19     ` Paul Cercueil
  0 siblings, 0 replies; 51+ messages in thread
From: Paul Cercueil @ 2020-03-02 19:19 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Mark Rutland, Paul Boddie, Geert Uytterhoeven, David Airlie,
	dri-devel, linux-mips, Miquel Raynal, Sam Ravnborg, Andi Kleen,
	Paul Burton, Krzysztof Kozlowski, devicetree,
	Zubair Lutfullah Kakakhel, linux-gpio, Rob Herring, letux-kernel,
	linux-kernel, Ralf Baechle, Eric W. Biederman, kernel

Hi Nikolaus,


Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller 
<hns@goldelico.com> a écrit :
> From: Sam Ravnborg <sam@ravnborg.org>
> 
> 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 <sam@ravnborg.org>
> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Cc: H. Nikolaus Schaller <hns@goldelico.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: devicetree@vger.kernel.org
> ---
>  .../bindings/display/ingenic-jz4780-hdmi.yaml | 83 
> +++++++++++++++++++
>  1 file changed, 83 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml 
> b/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
> new file mode 100644
> index 000000000000..9b71c427bd69
> --- /dev/null
> +++ 
> b/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
> @@ -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 <Zubair.Kakakhel@imgtec.com>
> +  - H. Nikolaus Schaller <hns@goldelico.com>

Did Zubair write this glue driver? He's been MIA for a while, doesn't 
work at ImgTec anymore, and this email doesn't work.

> +
> +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

Remove the description here,

> +
> +  reg-io-width:
> +    const: 4
> +
> +  interrupts:
> +    maxItems: 1
> +    description: Specifies the interrupt provided by parent

and here.

The rule is that if there is only one "reg", "interrupts" or "clocks" 
entry then a description is not needed as it's pretty obvious what it's 
for.

> +
> +  clocks:
> +    maxItems: 2
> +    description: Clock specifiers for isrf and iahb clocks

You need two 'description:' like this:

clocks:
  items:
    - description: ISRF clock
    - description: IAHB clock

Cheers,
-Paul

> +
> +  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>;
> +                };
> +            };
> +        };
> +    };
> +
> +...
> --
> 2.23.0
> 


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 3/8] drm: ingenic-drm: add MODULE_DEVICE_TABLE
  2020-02-28 18:19   ` H. Nikolaus Schaller
@ 2020-03-02 19:21     ` Paul Cercueil
  -1 siblings, 0 replies; 51+ messages in thread
From: Paul Cercueil @ 2020-03-02 19:21 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Paul Boddie, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Ralf Baechle, Paul Burton, Linus Walleij,
	Andi Kleen, Krzysztof Kozlowski, Geert Uytterhoeven,
	Eric W. Biederman, Miquel Raynal, dri-devel, devicetree,
	linux-kernel, linux-mips, linux-gpio, letux-kernel, kernel

Hi Nikolaus,


Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller 
<hns@goldelico.com> a écrit :
> so that the driver can load by matching the device tree
> if compiled as module.
> 
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>  drivers/gpu/drm/ingenic/ingenic-drm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c 
> b/drivers/gpu/drm/ingenic/ingenic-drm.c
> index 6d47ef7b148c..d8617096dd8e 100644
> --- a/drivers/gpu/drm/ingenic/ingenic-drm.c
> +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
> @@ -844,6 +844,8 @@ static const struct of_device_id 
> ingenic_drm_of_match[] = {
>  	{ /* sentinel */ },
>  };
> 
> +MODULE_DEVICE_TABLE(of, ingenic_drm_of_match);

Please remove the blank line above the MODULE_DEVICE_TABLE() macro.

-Paul

> +
>  static struct platform_driver ingenic_drm_driver = {
>  	.driver = {
>  		.name = "ingenic-drm",
> --
> 2.23.0
> 



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 3/8] drm: ingenic-drm: add MODULE_DEVICE_TABLE
@ 2020-03-02 19:21     ` Paul Cercueil
  0 siblings, 0 replies; 51+ messages in thread
From: Paul Cercueil @ 2020-03-02 19:21 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Mark Rutland, devicetree, Paul Boddie, Geert Uytterhoeven,
	Paul Burton, linux-gpio, David Airlie, kernel, dri-devel,
	linux-kernel, Ralf Baechle, linux-mips, Andi Kleen, Rob Herring,
	Krzysztof Kozlowski, Miquel Raynal, letux-kernel,
	Eric W. Biederman

Hi Nikolaus,


Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller 
<hns@goldelico.com> a écrit :
> so that the driver can load by matching the device tree
> if compiled as module.
> 
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>  drivers/gpu/drm/ingenic/ingenic-drm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c 
> b/drivers/gpu/drm/ingenic/ingenic-drm.c
> index 6d47ef7b148c..d8617096dd8e 100644
> --- a/drivers/gpu/drm/ingenic/ingenic-drm.c
> +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
> @@ -844,6 +844,8 @@ static const struct of_device_id 
> ingenic_drm_of_match[] = {
>  	{ /* sentinel */ },
>  };
> 
> +MODULE_DEVICE_TABLE(of, ingenic_drm_of_match);

Please remove the blank line above the MODULE_DEVICE_TABLE() macro.

-Paul

> +
>  static struct platform_driver ingenic_drm_driver = {
>  	.driver = {
>  		.name = "ingenic-drm",
> --
> 2.23.0
> 


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
  2020-02-28 18:19   ` H. Nikolaus Schaller
@ 2020-03-02 19:27     ` Paul Cercueil
  -1 siblings, 0 replies; 51+ messages in thread
From: Paul Cercueil @ 2020-03-02 19:27 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Paul Boddie, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Ralf Baechle, Paul Burton, Linus Walleij,
	Andi Kleen, Krzysztof Kozlowski, Geert Uytterhoeven,
	Eric W. Biederman, Miquel Raynal, dri-devel, devicetree,
	linux-kernel, linux-mips, linux-gpio, letux-kernel, kernel

Hi Nikolaus,


Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller 
<hns@goldelico.com> a écrit :
> From: Paul Boddie <paul@boddie.org.uk>
> 
> 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.
> 
> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>  arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 
> ++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi 
> b/arch/mips/boot/dts/ingenic/jz4780.dtsi
> index f928329b034b..391d4e1efd35 100644
> --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
> +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
> @@ -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>;

I *think* this should go to the board file.

> +
> +		interrupt-parent = <&intc>;
> +		interrupts = <3>;
> +
> +		/* ddc-i2c-bus = <&i2c4>; */
> +
> +		status = "disabled";
> +	};
> +
> +	lcd: lcd@13050000 {

The node name should be 'lcd-controller'.

> +		compatible = "ingenic,jz4740-lcd";

The JZ4780's LCD controller is much newer than the JZ4740 one, so even 
if it works with the "ingenic,jz4740-lcd" compatible string, you want 
it as a fallback.
So this should be: compatible = "ingenic,jz4780-lcd", 
"ingenic,jz4740-lcd".

That means the YAML should be updated too.

-Paul

> +		reg = <0x13050000 0x1800>;
> +
> +		clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>;
> +		clock-names = "lcd", "lcd_pclk";
> +
> +		interrupt-parent = <&intc>;
> +		interrupts = <31>;
> +
> +		status = "disabled";
> +	};
>  };
> --
> 2.23.0
> 



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
@ 2020-03-02 19:27     ` Paul Cercueil
  0 siblings, 0 replies; 51+ messages in thread
From: Paul Cercueil @ 2020-03-02 19:27 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Mark Rutland, devicetree, Paul Boddie, Geert Uytterhoeven,
	Paul Burton, linux-gpio, David Airlie, kernel, dri-devel,
	linux-kernel, Ralf Baechle, linux-mips, Andi Kleen, Rob Herring,
	Krzysztof Kozlowski, Miquel Raynal, letux-kernel,
	Eric W. Biederman

Hi Nikolaus,


Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller 
<hns@goldelico.com> a écrit :
> From: Paul Boddie <paul@boddie.org.uk>
> 
> 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.
> 
> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>  arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 
> ++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi 
> b/arch/mips/boot/dts/ingenic/jz4780.dtsi
> index f928329b034b..391d4e1efd35 100644
> --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
> +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
> @@ -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>;

I *think* this should go to the board file.

> +
> +		interrupt-parent = <&intc>;
> +		interrupts = <3>;
> +
> +		/* ddc-i2c-bus = <&i2c4>; */
> +
> +		status = "disabled";
> +	};
> +
> +	lcd: lcd@13050000 {

The node name should be 'lcd-controller'.

> +		compatible = "ingenic,jz4740-lcd";

The JZ4780's LCD controller is much newer than the JZ4740 one, so even 
if it works with the "ingenic,jz4740-lcd" compatible string, you want 
it as a fallback.
So this should be: compatible = "ingenic,jz4780-lcd", 
"ingenic,jz4740-lcd".

That means the YAML should be updated too.

-Paul

> +		reg = <0x13050000 0x1800>;
> +
> +		clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>;
> +		clock-names = "lcd", "lcd_pclk";
> +
> +		interrupt-parent = <&intc>;
> +		interrupts = <31>;
> +
> +		status = "disabled";
> +	};
>  };
> --
> 2.23.0
> 


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 1/8] dt-bindings: display: add ingenic-jz4780-lcd DT Schema
  2020-03-02 19:10     ` Paul Cercueil
@ 2020-03-03  7:21       ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-03-03  7:21 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Paul Boddie, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Ralf Baechle, Paul Burton, Linus Walleij,
	Andi Kleen, Krzysztof Kozlowski, Geert Uytterhoeven,
	Eric W. Biederman, Miquel Raynal, open list:DRM PANEL DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, linux-mips, open list:GPIO SUBSYSTEM,
	Discussions about the Letux Kernel, Sam Ravnborg,
	Zubair Lutfullah Kakakhel, Rob Herring

Hi Paul,

> Am 02.03.2020 um 20:10 schrieb Paul Cercueil <paul@crapouillou.net>:
> 
> Hi Nikolaus,
> 
> 
> Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>> From: Sam Ravnborg <sam@ravnborg.org>
>> Add DT bindings for the LCD controller on the jz4780 SoC
>> Based on .txt binding from Zubair Lutfullah Kakakhel
> 
> If you mean Documentation/devicetree/bindings/display/ingenic,lcd.txt then it was written by me.

Ah, ok. We didn't recognise this before. 6 eyes see more than 4...

I just did cherry-pick this old 4.0 patch from 2015 by Zubair
and it created a ingenic-jz4780-lcd.txt:

https://lore.kernel.org/patchwork/patch/547872/

and Sam was so kind to convert it to yaml.

> 
>> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
>> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>> Cc: H. Nikolaus Schaller <hns@goldelico.com>
>> Cc: Rob Herring <robh@kernel.org>
>> Cc: devicetree@vger.kernel.org
>> ---
>> .../bindings/display/ingenic-jz4780-lcd.yaml  | 78 +++++++++++++++++++
>> 1 file changed, 78 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
>> diff --git a/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
>> new file mode 100644
>> index 000000000000..c71415a3a342
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
>> @@ -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 <Zubair.Kakakhel@imgtec.com>
>> +  - H. Nikolaus Schaller <hns@goldelico.com>
> 
> I'm the author of the driver, please put me here; and remove Zubair, which 1. didn't touch the DRM driver at all, and 2. isn't working at ImgTec anymore.

Yes that is true.

> Also, no need to put yourself here, unless you maintain the Ingenic DRM/KMS driver.

Agreed. That was suggested by Sam.

> 
>> +
>> +description: |
>> +  LCD Controller is the Display Controller for the Ingenic JZ4780 SoC
>> +
>> +properties:
> 
> You should add a '$nodename' property.
> 
>> +  compatible:
>> +    items:
>> +      - const: ingenic,jz4780-lcd
> 
> The .txt lists more compatible strings. Please add them all.
> 
>> +
>> +  reg:
>> +    maxItems: 1
>> +    description: the address & size of the LCD controller registers
> 
> Drop the description here,
> 
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +    description: Specifies the interrupt provided by parent
> 
> and here.
> 
>> +
>> +  clocks:
>> +    maxItems: 2
>> +    description: Clock specifiers for the JZ4780_CLK_TVE JZ4780_CLK_LCD0PIXCLK
> 
> Add one 'description:' per item.
> 
>> +
>> +  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 {
> 
> The node name does not comply with the DT spec, it should be 'lcd-controller'.

Ok, I think I'll review all so that it does match/replace
Documentation/devicetree/bindings/display/ingenic,lcd.txt
and no information is lost.
 
> 
> Cheers,
> -Paul

BR and thanks,
Nikolaus


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 1/8] dt-bindings: display: add ingenic-jz4780-lcd DT Schema
@ 2020-03-03  7:21       ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-03-03  7:21 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Mark Rutland, Paul Boddie, Geert Uytterhoeven, David Airlie,
	open list:DRM PANEL DRIVERS, linux-mips, Miquel Raynal,
	Sam Ravnborg, Andi Kleen, Paul Burton, Krzysztof Kozlowski,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Zubair Lutfullah Kakakhel, open list:GPIO SUBSYSTEM, Rob Herring,
	Discussions about the Letux Kernel, Linux Kernel Mailing List,
	Ralf Baechle, Eric W. Biederman

Hi Paul,

> Am 02.03.2020 um 20:10 schrieb Paul Cercueil <paul@crapouillou.net>:
> 
> Hi Nikolaus,
> 
> 
> Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>> From: Sam Ravnborg <sam@ravnborg.org>
>> Add DT bindings for the LCD controller on the jz4780 SoC
>> Based on .txt binding from Zubair Lutfullah Kakakhel
> 
> If you mean Documentation/devicetree/bindings/display/ingenic,lcd.txt then it was written by me.

Ah, ok. We didn't recognise this before. 6 eyes see more than 4...

I just did cherry-pick this old 4.0 patch from 2015 by Zubair
and it created a ingenic-jz4780-lcd.txt:

https://lore.kernel.org/patchwork/patch/547872/

and Sam was so kind to convert it to yaml.

> 
>> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
>> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>> Cc: H. Nikolaus Schaller <hns@goldelico.com>
>> Cc: Rob Herring <robh@kernel.org>
>> Cc: devicetree@vger.kernel.org
>> ---
>> .../bindings/display/ingenic-jz4780-lcd.yaml  | 78 +++++++++++++++++++
>> 1 file changed, 78 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
>> diff --git a/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
>> new file mode 100644
>> index 000000000000..c71415a3a342
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/display/ingenic-jz4780-lcd.yaml
>> @@ -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 <Zubair.Kakakhel@imgtec.com>
>> +  - H. Nikolaus Schaller <hns@goldelico.com>
> 
> I'm the author of the driver, please put me here; and remove Zubair, which 1. didn't touch the DRM driver at all, and 2. isn't working at ImgTec anymore.

Yes that is true.

> Also, no need to put yourself here, unless you maintain the Ingenic DRM/KMS driver.

Agreed. That was suggested by Sam.

> 
>> +
>> +description: |
>> +  LCD Controller is the Display Controller for the Ingenic JZ4780 SoC
>> +
>> +properties:
> 
> You should add a '$nodename' property.
> 
>> +  compatible:
>> +    items:
>> +      - const: ingenic,jz4780-lcd
> 
> The .txt lists more compatible strings. Please add them all.
> 
>> +
>> +  reg:
>> +    maxItems: 1
>> +    description: the address & size of the LCD controller registers
> 
> Drop the description here,
> 
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +    description: Specifies the interrupt provided by parent
> 
> and here.
> 
>> +
>> +  clocks:
>> +    maxItems: 2
>> +    description: Clock specifiers for the JZ4780_CLK_TVE JZ4780_CLK_LCD0PIXCLK
> 
> Add one 'description:' per item.
> 
>> +
>> +  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 {
> 
> The node name does not comply with the DT spec, it should be 'lcd-controller'.

Ok, I think I'll review all so that it does match/replace
Documentation/devicetree/bindings/display/ingenic,lcd.txt
and no information is lost.
 
> 
> Cheers,
> -Paul

BR and thanks,
Nikolaus

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 2/8] dt-bindings: display: add ingenic-jz4780-hdmi DT Schema
  2020-03-02 19:19     ` Paul Cercueil
  (?)
@ 2020-03-03  7:22     ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-03-03  7:22 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Mark Rutland, Paul Boddie, Geert Uytterhoeven, David Airlie,
	open list:DRM PANEL DRIVERS, linux-mips, Miquel Raynal,
	Sam Ravnborg, Andi Kleen, Paul Burton, Krzysztof Kozlowski,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Zubair Lutfullah Kakakhel, open list:GPIO SUBSYSTEM, Rob Herring,
	Discussions about the Letux Kernel, Linux Kernel Mailing List,
	Ralf Baechle, Eric W. Biederman


> Am 02.03.2020 um 20:19 schrieb Paul Cercueil <paul@crapouillou.net>:
> 
> Hi Nikolaus,
> 
> 
> Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>> From: Sam Ravnborg <sam@ravnborg.org>
>> 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 <sam@ravnborg.org>
>> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>> Cc: H. Nikolaus Schaller <hns@goldelico.com>
>> Cc: Rob Herring <robh@kernel.org>
>> Cc: devicetree@vger.kernel.org
>> ---
>> .../bindings/display/ingenic-jz4780-hdmi.yaml | 83 +++++++++++++++++++
>> 1 file changed, 83 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
>> diff --git a/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml b/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
>> new file mode 100644
>> index 000000000000..9b71c427bd69
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/display/ingenic-jz4780-hdmi.yaml
>> @@ -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 <Zubair.Kakakhel@imgtec.com>
>> +  - H. Nikolaus Schaller <hns@goldelico.com>
> 
> Did Zubair write this glue driver? He's been MIA for a while, doesn't work at ImgTec anymore, and this email doesn't work.

He did write the original .txt version of [RFC v1 2/8] and Sam simply added him.

> 
>> +
>> +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
> 
> Remove the description here,
> 
>> +
>> +  reg-io-width:
>> +    const: 4
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +    description: Specifies the interrupt provided by parent
> 
> and here.
> 
> The rule is that if there is only one "reg", "interrupts" or "clocks" entry then a description is not needed as it's pretty obvious what it's for.
> 
>> +
>> +  clocks:
>> +    maxItems: 2
>> +    description: Clock specifiers for isrf and iahb clocks
> 
> You need two 'description:' like this:
> 
> clocks:
> items:
>   - description: ISRF clock
>   - description: IAHB clock

Ok.

BR and thanks,
Nikolaus

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 3/8] drm: ingenic-drm: add MODULE_DEVICE_TABLE
  2020-03-02 19:21     ` Paul Cercueil
  (?)
@ 2020-03-03  7:22     ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-03-03  7:22 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Paul Boddie, Geert Uytterhoeven, Paul Burton,
	open list:GPIO SUBSYSTEM, David Airlie,
	open list:DRM PANEL DRIVERS, Linux Kernel Mailing List,
	Ralf Baechle, linux-mips, Andi Kleen, Rob Herring,
	Krzysztof Kozlowski, Miquel Raynal,
	Discussions about the Letux Kernel, Eric W. Biederman


> Am 02.03.2020 um 20:21 schrieb Paul Cercueil <paul@crapouillou.net>:
> 
> Hi Nikolaus,
> 
> 
> Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>> so that the driver can load by matching the device tree
>> if compiled as module.
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> ---
>> drivers/gpu/drm/ingenic/ingenic-drm.c | 2 ++
>> 1 file changed, 2 insertions(+)
>> diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c
>> index 6d47ef7b148c..d8617096dd8e 100644
>> --- a/drivers/gpu/drm/ingenic/ingenic-drm.c
>> +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
>> @@ -844,6 +844,8 @@ static const struct of_device_id ingenic_drm_of_match[] = {
>> 	{ /* sentinel */ },
>> };
>> +MODULE_DEVICE_TABLE(of, ingenic_drm_of_match);
> 
> Please remove the blank line above the MODULE_DEVICE_TABLE() macro.

Ok.

> 
> -Paul
> 
>> +
>> static struct platform_driver ingenic_drm_driver = {
>> 	.driver = {
>> 		.name = "ingenic-drm",
>> --
>> 2.23.0
> 
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
  2020-03-02 19:27     ` Paul Cercueil
  (?)
@ 2020-03-03  7:24     ` H. Nikolaus Schaller
  -1 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-03-03  7:24 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Paul Boddie, Geert Uytterhoeven, Paul Burton,
	open list:GPIO SUBSYSTEM, David Airlie,
	open list:DRM PANEL DRIVERS, Linux Kernel Mailing List,
	Ralf Baechle, linux-mips, Andi Kleen, Rob Herring,
	Krzysztof Kozlowski, Miquel Raynal,
	Discussions about the Letux Kernel, Eric W. Biederman

Hi Paul,

> Am 02.03.2020 um 20:27 schrieb Paul Cercueil <paul@crapouillou.net>:
> 
> Hi Nikolaus,
> 
> 
> Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>> From: Paul Boddie <paul@boddie.org.uk>
>> 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.
>> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> ---
>> arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 ++++++++++++++++++++++++++
>> 1 file changed, 32 insertions(+)
>> diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> index f928329b034b..391d4e1efd35 100644
>> --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> @@ -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>;
> 
> I *think* this should go to the board file.

Hm. I am not sure.

Can there be differences in HDMI between different boards so
that it needs to be defined there?

IMHO the HDMI subsystem is completely sitting on the jz4780 SoC
and clocked by the master clock. So boards should only differ in the
ESD protection and mechanical connector... 

And status = "ok".

> 
>> +
>> +		interrupt-parent = <&intc>;
>> +		interrupts = <3>;
>> +
>> +		/* ddc-i2c-bus = <&i2c4>; */
>> +
>> +		status = "disabled";
>> +	};
>> +
>> +	lcd: lcd@13050000 {
> 
> The node name should be 'lcd-controller'.
> 
>> +		compatible = "ingenic,jz4740-lcd";
> 
> The JZ4780's LCD controller is much newer than the JZ4740 one, so even if it works with the "ingenic,jz4740-lcd" compatible string, you want it as a fallback.
> So this should be: compatible = "ingenic,jz4780-lcd", "ingenic,jz4740-lcd".

Ah, that is an interesting detail.

It could be the reason why the HDMI does not show an output signal yet.
If the jz4740-lcd and jz4780-lcd are not really 100% compatible.
I'll give it try asap.

If it does not help to get output signals, we need community members who
can test (i.e. own an CI20 board) and can help to identify the bug(s).

> 
> That means the YAML should be updated too.

Ok.

BR,
Nikolaus

> 
> -Paul
> 
>> +		reg = <0x13050000 0x1800>;
>> +
>> +		clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>;
>> +		clock-names = "lcd", "lcd_pclk";
>> +
>> +		interrupt-parent = <&intc>;
>> +		interrupts = <31>;
>> +
>> +		status = "disabled";
>> +	};
>> };
>> --
>> 2.23.0
> 
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
@ 2020-03-11 12:43       ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-03-11 12:43 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Paul Boddie, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Ralf Baechle, Paul Burton, Linus Walleij,
	Andi Kleen, Krzysztof Kozlowski, Geert Uytterhoeven,
	Eric W. Biederman, Miquel Raynal, open list:DRM PANEL DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, linux-mips, open list:GPIO SUBSYSTEM,
	Discussions about the Letux Kernel,
	MIPS Creator CI20 Development

Hi Paul,

> Am 02.03.2020 um 20:27 schrieb Paul Cercueil <paul@crapouillou.net>:
> 
> Hi Nikolaus,
> 
> 
> Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>> From: Paul Boddie <paul@boddie.org.uk>
>> 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.
>> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> ---
>> arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 ++++++++++++++++++++++++++
>> 1 file changed, 32 insertions(+)
>> diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> index f928329b034b..391d4e1efd35 100644
>> --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> @@ -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>;
> 
> I *think* this should go to the board file.
> 
>> +
>> +		interrupt-parent = <&intc>;
>> +		interrupts = <3>;
>> +
>> +		/* ddc-i2c-bus = <&i2c4>; */
>> +
>> +		status = "disabled";
>> +	};
>> +
>> +	lcd: lcd@13050000 {
> 
> The node name should be 'lcd-controller'.
> 
>> +		compatible = "ingenic,jz4740-lcd";
> 
> The JZ4780's LCD controller is much newer than the JZ4740 one, so even if it works with the "ingenic,jz4740-lcd" compatible string, you want it as a fallback.
> So this should be: compatible = "ingenic,jz4780-lcd", "ingenic,jz4740-lcd".
> 
> That means the YAML should be updated too.

I have started to look into jz4780 HDMI setup again.

Well, there is no driver compatible to "ingenic,jz4780-lcd" so far
and it is questionalbe if we need a different one.

I think we should rather make the driver also compatible
than adding a fallback to ingenic,jz4740-lcdto the DTS.

The reason why this is better even if both LCDC are almost
compatible is that the jz4780 allows for much bigger displays
and therefore should have its own jz_soc_info with 4k x 2k
as maximum.

Next I tried to find out if the LCDC are really compatible.

Well the jz4780 has two lcdc instances but they are separated
by the reg addr. Next, there are unique features (like picture in
picture with alpha blending) but those are probably disabled
if not programmed from reset state. This may become a reason
to separate or augment the driver for the jz4780 but at the
moment we can ignore that.

There are also subtly different bit definitions and register
widths (e.g. 24 bit in addition to 16/18 bit modes or more bits
for the sync position) but it looks as if the ingenic_drm
driver already handles this.

Then I tried to read back the registers. Strangely they
are all 0x00000000. So there is no programming of the
lcd-controller in our DT setup with HDMI at all!

I also checked that ingenic_drm_probe() is called and
returns successfully 0. It also reports that a /dev/fb
has been created:

[    7.908830] ingenic-drm 13050000.lcd-controller: fb0: ingenic-drmdrmf frame buffer device

But for example ingenic_drm_encoder_atomic_mode_set() is
never called which should write some registers of the LCDC.

I only did see some calls to ingenic_drm_encoder_atomic_check().

This of course explains why we have no HDMI signals despite
proper HPD and a /dev/fb0. Because the LCDC is not being
programmed.

Any ideas / hints how to check or improve?

BR and thanks,
Nikolaus


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
@ 2020-03-11 12:43       ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-03-11 12:43 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Paul Boddie, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Ralf Baechle, Paul Burton, Linus Walleij,
	Andi Kleen, Krzysztof Kozlowski, Geert Uytterhoeven,
	Eric W. Biederman, Miquel Raynal, open list:DRM PANEL DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, linux-mips, open list:GPIO SUBSYSTEM,
	Discussions about the Letux Kernel,
	MIPS Creator CI20 Development

Hi Paul,

> Am 02.03.2020 um 20:27 schrieb Paul Cercueil <paul@crapouillou.net>:
> 
> Hi Nikolaus,
> 
> 
> Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>> From: Paul Boddie <paul@boddie.org.uk>
>> 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.
>> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> ---
>> arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 ++++++++++++++++++++++++++
>> 1 file changed, 32 insertions(+)
>> diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> index f928329b034b..391d4e1efd35 100644
>> --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> @@ -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>;
> 
> I *think* this should go to the board file.
> 
>> +
>> +		interrupt-parent = <&intc>;
>> +		interrupts = <3>;
>> +
>> +		/* ddc-i2c-bus = <&i2c4>; */
>> +
>> +		status = "disabled";
>> +	};
>> +
>> +	lcd: lcd@13050000 {
> 
> The node name should be 'lcd-controller'.
> 
>> +		compatible = "ingenic,jz4740-lcd";
> 
> The JZ4780's LCD controller is much newer than the JZ4740 one, so even if it works with the "ingenic,jz4740-lcd" compatible string, you want it as a fallback.
> So this should be: compatible = "ingenic,jz4780-lcd", "ingenic,jz4740-lcd".
> 
> That means the YAML should be updated too.

I have started to look into jz4780 HDMI setup again.

Well, there is no driver compatible to "ingenic,jz4780-lcd" so far
and it is questionalbe if we need a different one.

I think we should rather make the driver also compatible
than adding a fallback to ingenic,jz4740-lcdto the DTS.

The reason why this is better even if both LCDC are almost
compatible is that the jz4780 allows for much bigger displays
and therefore should have its own jz_soc_info with 4k x 2k
as maximum.

Next I tried to find out if the LCDC are really compatible.

Well the jz4780 has two lcdc instances but they are separated
by the reg addr. Next, there are unique features (like picture in
picture with alpha blending) but those are probably disabled
if not programmed from reset state. This may become a reason
to separate or augment the driver for the jz4780 but at the
moment we can ignore that.

There are also subtly different bit definitions and register
widths (e.g. 24 bit in addition to 16/18 bit modes or more bits
for the sync position) but it looks as if the ingenic_drm
driver already handles this.

Then I tried to read back the registers. Strangely they
are all 0x00000000. So there is no programming of the
lcd-controller in our DT setup with HDMI at all!

I also checked that ingenic_drm_probe() is called and
returns successfully 0. It also reports that a /dev/fb
has been created:

[    7.908830] ingenic-drm 13050000.lcd-controller: fb0: ingenic-drmdrmf frame buffer device

But for example ingenic_drm_encoder_atomic_mode_set() is
never called which should write some registers of the LCDC.

I only did see some calls to ingenic_drm_encoder_atomic_check().

This of course explains why we have no HDMI signals despite
proper HPD and a /dev/fb0. Because the LCDC is not being
programmed.

Any ideas / hints how to check or improve?

BR and thanks,
Nikolaus


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
@ 2020-03-11 12:43       ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-03-11 12:43 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Paul Boddie, Geert Uytterhoeven, Paul Burton,
	open list:GPIO SUBSYSTEM, David Airlie,
	MIPS Creator CI20 Development, open list:DRM PANEL DRIVERS,
	Linux Kernel Mailing List, Ralf Baechle, linux-mips, Andi Kleen,
	Rob Herring, Krzysztof Kozlowski, Miquel Raynal,
	Discussions about the Letux Kernel, Eric W. Biederman

Hi Paul,

> Am 02.03.2020 um 20:27 schrieb Paul Cercueil <paul@crapouillou.net>:
> 
> Hi Nikolaus,
> 
> 
> Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>> From: Paul Boddie <paul@boddie.org.uk>
>> 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.
>> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> ---
>> arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 ++++++++++++++++++++++++++
>> 1 file changed, 32 insertions(+)
>> diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> index f928329b034b..391d4e1efd35 100644
>> --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> @@ -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>;
> 
> I *think* this should go to the board file.
> 
>> +
>> +		interrupt-parent = <&intc>;
>> +		interrupts = <3>;
>> +
>> +		/* ddc-i2c-bus = <&i2c4>; */
>> +
>> +		status = "disabled";
>> +	};
>> +
>> +	lcd: lcd@13050000 {
> 
> The node name should be 'lcd-controller'.
> 
>> +		compatible = "ingenic,jz4740-lcd";
> 
> The JZ4780's LCD controller is much newer than the JZ4740 one, so even if it works with the "ingenic,jz4740-lcd" compatible string, you want it as a fallback.
> So this should be: compatible = "ingenic,jz4780-lcd", "ingenic,jz4740-lcd".
> 
> That means the YAML should be updated too.

I have started to look into jz4780 HDMI setup again.

Well, there is no driver compatible to "ingenic,jz4780-lcd" so far
and it is questionalbe if we need a different one.

I think we should rather make the driver also compatible
than adding a fallback to ingenic,jz4740-lcdto the DTS.

The reason why this is better even if both LCDC are almost
compatible is that the jz4780 allows for much bigger displays
and therefore should have its own jz_soc_info with 4k x 2k
as maximum.

Next I tried to find out if the LCDC are really compatible.

Well the jz4780 has two lcdc instances but they are separated
by the reg addr. Next, there are unique features (like picture in
picture with alpha blending) but those are probably disabled
if not programmed from reset state. This may become a reason
to separate or augment the driver for the jz4780 but at the
moment we can ignore that.

There are also subtly different bit definitions and register
widths (e.g. 24 bit in addition to 16/18 bit modes or more bits
for the sync position) but it looks as if the ingenic_drm
driver already handles this.

Then I tried to read back the registers. Strangely they
are all 0x00000000. So there is no programming of the
lcd-controller in our DT setup with HDMI at all!

I also checked that ingenic_drm_probe() is called and
returns successfully 0. It also reports that a /dev/fb
has been created:

[    7.908830] ingenic-drm 13050000.lcd-controller: fb0: ingenic-drmdrmf frame buffer device

But for example ingenic_drm_encoder_atomic_mode_set() is
never called which should write some registers of the LCDC.

I only did see some calls to ingenic_drm_encoder_atomic_check().

This of course explains why we have no HDMI signals despite
proper HPD and a /dev/fb0. Because the LCDC is not being
programmed.

Any ideas / hints how to check or improve?

BR and thanks,
Nikolaus

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
@ 2020-03-11 13:20         ` Paul Cercueil
  0 siblings, 0 replies; 51+ messages in thread
From: Paul Cercueil @ 2020-03-11 13:20 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Paul Boddie, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Ralf Baechle, Paul Burton, Linus Walleij,
	Andi Kleen, Krzysztof Kozlowski, Geert Uytterhoeven,
	Eric W. Biederman, Miquel Raynal, open list:DRM PANEL DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, linux-mips, open list:GPIO SUBSYSTEM,
	Discussions about the Letux Kernel,
	MIPS Creator CI20 Development

Hi Nikolaus,


Le mer., mars 11, 2020 at 13:43, H. Nikolaus Schaller 
<hns@goldelico.com> a écrit :
> Hi Paul,
> 
>>  Am 02.03.2020 um 20:27 schrieb Paul Cercueil <paul@crapouillou.net>:
>> 
>>  Hi Nikolaus,
>> 
>> 
>>  Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller 
>> <hns@goldelico.com> a écrit :
>>>  From: Paul Boddie <paul@boddie.org.uk>
>>>  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.
>>>  Signed-off-by: Paul Boddie <paul@boddie.org.uk>
>>>  Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>>>  ---
>>>  arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 
>>> ++++++++++++++++++++++++++
>>>  1 file changed, 32 insertions(+)
>>>  diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi 
>>> b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>>>  index f928329b034b..391d4e1efd35 100644
>>>  --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
>>>  +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>>>  @@ -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>;
>> 
>>  I *think* this should go to the board file.
>> 
>>>  +
>>>  +		interrupt-parent = <&intc>;
>>>  +		interrupts = <3>;
>>>  +
>>>  +		/* ddc-i2c-bus = <&i2c4>; */
>>>  +
>>>  +		status = "disabled";
>>>  +	};
>>>  +
>>>  +	lcd: lcd@13050000 {
>> 
>>  The node name should be 'lcd-controller'.
>> 
>>>  +		compatible = "ingenic,jz4740-lcd";
>> 
>>  The JZ4780's LCD controller is much newer than the JZ4740 one, so 
>> even if it works with the "ingenic,jz4740-lcd" compatible string, 
>> you want it as a fallback.
>>  So this should be: compatible = "ingenic,jz4780-lcd", 
>> "ingenic,jz4740-lcd".
>> 
>>  That means the YAML should be updated too.
> 
> I have started to look into jz4780 HDMI setup again.
> 
> Well, there is no driver compatible to "ingenic,jz4780-lcd" so far
> and it is questionalbe if we need a different one.
> 
> I think we should rather make the driver also compatible
> than adding a fallback to ingenic,jz4740-lcdto the DTS.
> 
> The reason why this is better even if both LCDC are almost
> compatible is that the jz4780 allows for much bigger displays
> and therefore should have its own jz_soc_info with 4k x 2k
> as maximum.

Sure, feel free to extend the driver.

> Next I tried to find out if the LCDC are really compatible.
> 
> Well the jz4780 has two lcdc instances but they are separated
> by the reg addr. Next, there are unique features (like picture in
> picture with alpha blending) but those are probably disabled
> if not programmed from reset state. This may become a reason
> to separate or augment the driver for the jz4780 but at the
> moment we can ignore that.

Two LCDC instances -> two lcd-controller@... nodes. It's that simple.

The other features you listed are outside the LCDC, so outside the 
scope of this driver.

> There are also subtly different bit definitions and register
> widths (e.g. 24 bit in addition to 16/18 bit modes or more bits
> for the sync position) but it looks as if the ingenic_drm
> driver already handles this.
> 
> Then I tried to read back the registers. Strangely they
> are all 0x00000000. So there is no programming of the
> lcd-controller in our DT setup with HDMI at all!

How did you read them?
Do it from the regmap: should be "cat 
/sys/kernel/debug/regmap/13050000.lcd-controller/registers" (not sure 
about the path)

> I also checked that ingenic_drm_probe() is called and
> returns successfully 0. It also reports that a /dev/fb
> has been created:
> 
> [    7.908830] ingenic-drm 13050000.lcd-controller: fb0: 
> ingenic-drmdrmf frame buffer device
> 
> But for example ingenic_drm_encoder_atomic_mode_set() is
> never called which should write some registers of the LCDC.
> 
> I only did see some calls to ingenic_drm_encoder_atomic_check().
> 
> This of course explains why we have no HDMI signals despite
> proper HPD and a /dev/fb0. Because the LCDC is not being
> programmed.

It won't be called until the HDMI driver says that the cable is 
plugged, and there's a client application (e.g. fbdev emulation) 
running. So the problem is most likely within the HDMI driver.

Cheers,
-Paul

> Any ideas / hints how to check or improve?
> 
> BR and thanks,
> Nikolaus
> 



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
@ 2020-03-11 13:20         ` Paul Cercueil
  0 siblings, 0 replies; 51+ messages in thread
From: Paul Cercueil @ 2020-03-11 13:20 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Paul Boddie, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Ralf Baechle, Paul Burton, Linus Walleij,
	Andi Kleen, Krzysztof Kozlowski, Geert Uytterhoeven,
	Eric W. Biederman, Miquel Raynal, open list:DRM PANEL DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, linux-mips, open list:GPIO SUBSYSTEM,
	Discussions about the Letux Kernel,
	MIPS Creator CI20 Development

Hi Nikolaus,


Le mer., mars 11, 2020 at 13:43, H. Nikolaus Schaller 
<hns@goldelico.com> a écrit :
> Hi Paul,
> 
>>  Am 02.03.2020 um 20:27 schrieb Paul Cercueil <paul@crapouillou.net>:
>> 
>>  Hi Nikolaus,
>> 
>> 
>>  Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller 
>> <hns@goldelico.com> a écrit :
>>>  From: Paul Boddie <paul@boddie.org.uk>
>>>  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.
>>>  Signed-off-by: Paul Boddie <paul@boddie.org.uk>
>>>  Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>>>  ---
>>>  arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 
>>> ++++++++++++++++++++++++++
>>>  1 file changed, 32 insertions(+)
>>>  diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi 
>>> b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>>>  index f928329b034b..391d4e1efd35 100644
>>>  --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
>>>  +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>>>  @@ -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>;
>> 
>>  I *think* this should go to the board file.
>> 
>>>  +
>>>  +		interrupt-parent = <&intc>;
>>>  +		interrupts = <3>;
>>>  +
>>>  +		/* ddc-i2c-bus = <&i2c4>; */
>>>  +
>>>  +		status = "disabled";
>>>  +	};
>>>  +
>>>  +	lcd: lcd@13050000 {
>> 
>>  The node name should be 'lcd-controller'.
>> 
>>>  +		compatible = "ingenic,jz4740-lcd";
>> 
>>  The JZ4780's LCD controller is much newer than the JZ4740 one, so 
>> even if it works with the "ingenic,jz4740-lcd" compatible string, 
>> you want it as a fallback.
>>  So this should be: compatible = "ingenic,jz4780-lcd", 
>> "ingenic,jz4740-lcd".
>> 
>>  That means the YAML should be updated too.
> 
> I have started to look into jz4780 HDMI setup again.
> 
> Well, there is no driver compatible to "ingenic,jz4780-lcd" so far
> and it is questionalbe if we need a different one.
> 
> I think we should rather make the driver also compatible
> than adding a fallback to ingenic,jz4740-lcdto the DTS.
> 
> The reason why this is better even if both LCDC are almost
> compatible is that the jz4780 allows for much bigger displays
> and therefore should have its own jz_soc_info with 4k x 2k
> as maximum.

Sure, feel free to extend the driver.

> Next I tried to find out if the LCDC are really compatible.
> 
> Well the jz4780 has two lcdc instances but they are separated
> by the reg addr. Next, there are unique features (like picture in
> picture with alpha blending) but those are probably disabled
> if not programmed from reset state. This may become a reason
> to separate or augment the driver for the jz4780 but at the
> moment we can ignore that.

Two LCDC instances -> two lcd-controller@... nodes. It's that simple.

The other features you listed are outside the LCDC, so outside the 
scope of this driver.

> There are also subtly different bit definitions and register
> widths (e.g. 24 bit in addition to 16/18 bit modes or more bits
> for the sync position) but it looks as if the ingenic_drm
> driver already handles this.
> 
> Then I tried to read back the registers. Strangely they
> are all 0x00000000. So there is no programming of the
> lcd-controller in our DT setup with HDMI at all!

How did you read them?
Do it from the regmap: should be "cat 
/sys/kernel/debug/regmap/13050000.lcd-controller/registers" (not sure 
about the path)

> I also checked that ingenic_drm_probe() is called and
> returns successfully 0. It also reports that a /dev/fb
> has been created:
> 
> [    7.908830] ingenic-drm 13050000.lcd-controller: fb0: 
> ingenic-drmdrmf frame buffer device
> 
> But for example ingenic_drm_encoder_atomic_mode_set() is
> never called which should write some registers of the LCDC.
> 
> I only did see some calls to ingenic_drm_encoder_atomic_check().
> 
> This of course explains why we have no HDMI signals despite
> proper HPD and a /dev/fb0. Because the LCDC is not being
> programmed.

It won't be called until the HDMI driver says that the cable is 
plugged, and there's a client application (e.g. fbdev emulation) 
running. So the problem is most likely within the HDMI driver.

Cheers,
-Paul

> Any ideas / hints how to check or improve?
> 
> BR and thanks,
> Nikolaus
> 



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
@ 2020-03-11 13:20         ` Paul Cercueil
  0 siblings, 0 replies; 51+ messages in thread
From: Paul Cercueil @ 2020-03-11 13:20 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Paul Boddie, Geert Uytterhoeven, Paul Burton,
	open list:GPIO SUBSYSTEM, David Airlie,
	MIPS Creator CI20 Development, open list:DRM PANEL DRIVERS,
	Linux Kernel Mailing List, Ralf Baechle, linux-mips, Andi Kleen,
	Rob Herring, Krzysztof Kozlowski, Miquel Raynal,
	Discussions about the Letux Kernel, Eric W. Biederman

Hi Nikolaus,


Le mer., mars 11, 2020 at 13:43, H. Nikolaus Schaller 
<hns@goldelico.com> a écrit :
> Hi Paul,
> 
>>  Am 02.03.2020 um 20:27 schrieb Paul Cercueil <paul@crapouillou.net>:
>> 
>>  Hi Nikolaus,
>> 
>> 
>>  Le ven., févr. 28, 2020 at 19:19, H. Nikolaus Schaller 
>> <hns@goldelico.com> a écrit :
>>>  From: Paul Boddie <paul@boddie.org.uk>
>>>  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.
>>>  Signed-off-by: Paul Boddie <paul@boddie.org.uk>
>>>  Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>>>  ---
>>>  arch/mips/boot/dts/ingenic/jz4780.dtsi | 32 
>>> ++++++++++++++++++++++++++
>>>  1 file changed, 32 insertions(+)
>>>  diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi 
>>> b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>>>  index f928329b034b..391d4e1efd35 100644
>>>  --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
>>>  +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>>>  @@ -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>;
>> 
>>  I *think* this should go to the board file.
>> 
>>>  +
>>>  +		interrupt-parent = <&intc>;
>>>  +		interrupts = <3>;
>>>  +
>>>  +		/* ddc-i2c-bus = <&i2c4>; */
>>>  +
>>>  +		status = "disabled";
>>>  +	};
>>>  +
>>>  +	lcd: lcd@13050000 {
>> 
>>  The node name should be 'lcd-controller'.
>> 
>>>  +		compatible = "ingenic,jz4740-lcd";
>> 
>>  The JZ4780's LCD controller is much newer than the JZ4740 one, so 
>> even if it works with the "ingenic,jz4740-lcd" compatible string, 
>> you want it as a fallback.
>>  So this should be: compatible = "ingenic,jz4780-lcd", 
>> "ingenic,jz4740-lcd".
>> 
>>  That means the YAML should be updated too.
> 
> I have started to look into jz4780 HDMI setup again.
> 
> Well, there is no driver compatible to "ingenic,jz4780-lcd" so far
> and it is questionalbe if we need a different one.
> 
> I think we should rather make the driver also compatible
> than adding a fallback to ingenic,jz4740-lcdto the DTS.
> 
> The reason why this is better even if both LCDC are almost
> compatible is that the jz4780 allows for much bigger displays
> and therefore should have its own jz_soc_info with 4k x 2k
> as maximum.

Sure, feel free to extend the driver.

> Next I tried to find out if the LCDC are really compatible.
> 
> Well the jz4780 has two lcdc instances but they are separated
> by the reg addr. Next, there are unique features (like picture in
> picture with alpha blending) but those are probably disabled
> if not programmed from reset state. This may become a reason
> to separate or augment the driver for the jz4780 but at the
> moment we can ignore that.

Two LCDC instances -> two lcd-controller@... nodes. It's that simple.

The other features you listed are outside the LCDC, so outside the 
scope of this driver.

> There are also subtly different bit definitions and register
> widths (e.g. 24 bit in addition to 16/18 bit modes or more bits
> for the sync position) but it looks as if the ingenic_drm
> driver already handles this.
> 
> Then I tried to read back the registers. Strangely they
> are all 0x00000000. So there is no programming of the
> lcd-controller in our DT setup with HDMI at all!

How did you read them?
Do it from the regmap: should be "cat 
/sys/kernel/debug/regmap/13050000.lcd-controller/registers" (not sure 
about the path)

> I also checked that ingenic_drm_probe() is called and
> returns successfully 0. It also reports that a /dev/fb
> has been created:
> 
> [    7.908830] ingenic-drm 13050000.lcd-controller: fb0: 
> ingenic-drmdrmf frame buffer device
> 
> But for example ingenic_drm_encoder_atomic_mode_set() is
> never called which should write some registers of the LCDC.
> 
> I only did see some calls to ingenic_drm_encoder_atomic_check().
> 
> This of course explains why we have no HDMI signals despite
> proper HPD and a /dev/fb0. Because the LCDC is not being
> programmed.

It won't be called until the HDMI driver says that the cable is 
plugged, and there's a client application (e.g. fbdev emulation) 
running. So the problem is most likely within the HDMI driver.

Cheers,
-Paul

> Any ideas / hints how to check or improve?
> 
> BR and thanks,
> Nikolaus
> 


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
@ 2020-03-11 13:30           ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-03-11 13:30 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Paul Boddie, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Ralf Baechle, Paul Burton, Linus Walleij,
	Andi Kleen, Krzysztof Kozlowski, Geert Uytterhoeven,
	Eric W. Biederman, Miquel Raynal, open list:DRM PANEL DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, linux-mips, open list:GPIO SUBSYSTEM,
	Discussions about the Letux Kernel,
	MIPS Creator CI20 Development

Hi Paul,

> Am 11.03.2020 um 14:20 schrieb Paul Cercueil <paul@crapouillou.net>:
> 
> Hi Nikolaus,
> 
> 
> Le mer., mars 11, 2020 at 13:43, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>> Hi Paul,
>>> The JZ4780's LCD controller is much newer than the JZ4740 one, so even if it works with the "ingenic,jz4740-lcd" compatible string, you want it as a fallback.
>>> So this should be: compatible = "ingenic,jz4780-lcd", "ingenic,jz4740-lcd".
>>> That means the YAML should be updated too.
>> I have started to look into jz4780 HDMI setup again.
>> Well, there is no driver compatible to "ingenic,jz4780-lcd" so far
>> and it is questionalbe if we need a different one.
>> I think we should rather make the driver also compatible
>> than adding a fallback to ingenic,jz4740-lcdto the DTS.
>> The reason why this is better even if both LCDC are almost
>> compatible is that the jz4780 allows for much bigger displays
>> and therefore should have its own jz_soc_info with 4k x 2k
>> as maximum.
> 
> Sure, feel free to extend the driver.
> 
>> Next I tried to find out if the LCDC are really compatible.
>> Well the jz4780 has two lcdc instances but they are separated
>> by the reg addr. Next, there are unique features (like picture in
>> picture with alpha blending) but those are probably disabled
>> if not programmed from reset state. This may become a reason
>> to separate or augment the driver for the jz4780 but at the
>> moment we can ignore that.
> 
> Two LCDC instances -> two lcd-controller@... nodes. It's that simple.

Indeed :)

> 
> The other features you listed are outside the LCDC, so outside the scope of this driver.

Well, in the description they are mixed but I think we do not have
to care about now.
> 
>> There are also subtly different bit definitions and register
>> widths (e.g. 24 bit in addition to 16/18 bit modes or more bits
>> for the sync position) but it looks as if the ingenic_drm
>> driver already handles this.
>> Then I tried to read back the registers. Strangely they
>> are all 0x00000000. So there is no programming of the
>> lcd-controller in our DT setup with HDMI at all!
> 
> How did you read them?

I used devmem2 (may be an omap tool I have recompiled for MIPS - it uses /dev/mem).

> Do it from the regmap: should be "cat /sys/kernel/debug/regmap/13050000.lcd-controller/registers" (not sure about the path)

Well seems to give the same result:

root@letux:~# cat /sys/kernel/debug/regmap/13050000.lcd-controller/registers
00: 00000000
04: 00000000
08: 00000000
0c: 00000000
10: 00000000
14: 00000000
18: 00000000
1c: 00000000
20: 00000000
24: 00000000
28: 00000000
2c: 00000000
30: 00000000
34: 00000000
38: 00000000
3c: 00000000
40: 00000000
44: 00000000
48: 00000000
4c: 00000000
50: 00000000
54: 00000000
58: 00000000
5c: 00000000
root@letux:~# 

> 
>> I also checked that ingenic_drm_probe() is called and
>> returns successfully 0. It also reports that a /dev/fb
>> has been created:
>> [    7.908830] ingenic-drm 13050000.lcd-controller: fb0: ingenic-drmdrmf frame buffer device
>> But for example ingenic_drm_encoder_atomic_mode_set() is
>> never called which should write some registers of the LCDC.
>> I only did see some calls to ingenic_drm_encoder_atomic_check().
>> This of course explains why we have no HDMI signals despite
>> proper HPD and a /dev/fb0. Because the LCDC is not being
>> programmed.
> 
> It won't be called until the HDMI driver says that the cable is plugged, and there's a client application (e.g. fbdev emulation) running. So the problem is most likely within the HDMI driver.

Ok!

The HDMI subsystem says (with some printk inserted) on cable unplug/replug:

root@letux:~# [ 3894.370706] dw_hdmi_update_power
[ 3894.373984] dw_hdmi_update_power: hdmi->force=0
[ 3894.378759] dw_hdmi_update_power: hdmi->disabled=0
[ 3894.383756] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.388947] dw_hdmi_update_power: hdmi->rxsense=1
[ 3894.393831] dw_hdmi_update_power: force=2
[ 3894.397895] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.403200] dw_hdmi_phy_update_hpd
[ 3894.406784] dw_hdmi_update_power
[ 3894.410054] dw_hdmi_update_power: hdmi->force=0
[ 3894.414766] dw_hdmi_update_power: hdmi->disabled=0
[ 3894.419611] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.424928] dw_hdmi_update_power: hdmi->rxsense=1
[ 3894.429699] dw_hdmi_update_power: force=2
[ 3894.433876] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.439068] dw_hdmi_phy_update_hpd
[ 3894.452316] dw_hdmi_update_power
[ 3894.455596] dw_hdmi_update_power: hdmi->force=0
[ 3894.460150] dw_hdmi_update_power: hdmi->disabled=0
[ 3894.464967] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.470131] dw_hdmi_update_power: hdmi->rxsense=1
[ 3894.475051] dw_hdmi_update_power: force=2
[ 3894.479111] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.484423] dw_hdmi_phy_update_hpd
[ 3894.488007] dw_hdmi_update_power
[ 3894.491278] dw_hdmi_update_power: hdmi->force=0
[ 3894.495982] dw_hdmi_update_power: hdmi->disabled=0
[ 3894.500823] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.506139] dw_hdmi_update_power: hdmi->rxsense=0
[ 3894.510895] dw_hdmi_update_power: force=1
[ 3894.515063] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.520252] dw_hdmi_poweroff
[ 3894.523284] dw_hdmi_phy_disable
[ 3894.526480] dw_hdmi_phy_power_off
[ 3894.529823] dw_hdmi_phy_gen2_txpwron
[ 3894.533567] dw-hdmi-jz4780 10180000.hdmi: PHY powered down in 0 iterations
[ 3894.540496] dw_hdmi_phy_gen2_pddq
[ 3894.543966] dw_hdmi_phy_update_hpd
[ 3894.547435] dw-hdmi-jz4780 10180000.hdmi: EVENT=plugout
[ 3897.079560] dw_hdmi_update_power
[ 3897.082840] dw_hdmi_update_power: hdmi->force=0
[ 3897.087394] dw_hdmi_update_power: hdmi->disabled=0
[ 3897.092207] dw_hdmi_update_power: hdmi->bridge_is_on=0
[ 3897.097370] dw_hdmi_update_power: hdmi->rxsense=1
[ 3897.102316] dw_hdmi_update_power: force=2
[ 3897.106380] dw_hdmi_update_power: hdmi->bridge_is_on=0
[ 3897.111667] dw_hdmi_poweron
[ 3897.114518] dw_hdmi_setup
[ 3897.117163] hdmi_disable_overflow_interrupts
[ 3897.121478] dw-hdmi-jz4780 10180000.hdmi: Non-CEA mode used in HDMI
[ 3897.127930] hdmi_av_composer
[ 3897.130848] dw-hdmi-jz4780 10180000.hdmi: final pixclk = 0
[ 3897.136506] dw_hdmi_phy_init
[ 3897.139440] dw_hdmi_phy_sel_data_en_pol
[ 3897.143428] dw_hdmi_phy_sel_interface_control
[ 3897.147840] hdmi_phy_configure
[ 3897.150922] dw_hdmi_phy_power_off
[ 3897.154415] dw_hdmi_phy_gen2_txpwron
[ 3897.158043] dw-hdmi-jz4780 10180000.hdmi: PHY powered down in 0 iterations
[ 3897.165094] dw_hdmi_phy_gen2_pddq
[ 3897.168468] dw_hdmi_set_high_tmds_clock_ratio
[ 3897.173002] hdmi_phy_configure_dwc_hdmi_3d_tx
[ 3897.186578] dw_hdmi_phy_power_on
[ 3897.189847] dw_hdmi_phy_gen2_txpwron
[ 3897.193586] dw_hdmi_phy_gen2_pddq
[ 3897.217640] dw-hdmi-jz4780 10180000.hdmi: PHY PLL locked 1 iterations
[ 3897.224226] dw_hdmi_phy_sel_data_en_pol
[ 3897.228107] dw_hdmi_phy_sel_interface_control
[ 3897.232631] hdmi_phy_configure
[ 3897.235739] dw_hdmi_phy_power_off
[ 3897.239082] dw_hdmi_phy_gen2_txpwron
[ 3897.242826] dw-hdmi-jz4780 10180000.hdmi: PHY powered down in 0 iterations
[ 3897.249754] dw_hdmi_phy_gen2_pddq
[ 3897.253239] dw_hdmi_set_high_tmds_clock_ratio
[ 3897.257658] hdmi_phy_configure_dwc_hdmi_3d_tx
[ 3897.271264] dw_hdmi_phy_power_on
[ 3897.274659] dw_hdmi_phy_gen2_txpwron
[ 3897.278292] dw_hdmi_phy_gen2_pddq
[ 3897.283840] dw-hdmi-jz4780 10180000.hdmi: PHY PLL locked 1 iterations
[ 3897.290346] dw_hdmi_enable_video_path
[ 3897.294240] dw-hdmi-jz4780 10180000.hdmi: sink has audio support
[ 3897.300324] dw-hdmi-jz4780 10180000.hdmi: dw_hdmi_setup HDMI mode
[ 3897.306596] hdmi_config_AVI
[ 3897.309467] hdmi_config_vendor_specific_infoframe
[ 3897.314336] hdmi_config_drm_infoframe
[ 3897.318096] hdmi_tx_hdcp_config
[ 3897.321270] dw_hdmi_clear_overflow
[ 3897.324831] dw_hdmi_phy_update_hpd
[ 3897.328298] dw-hdmi-jz4780 10180000.hdmi: EVENT=plugin
[ 3897.333704] dw_hdmi_update_power
[ 3897.336990] dw_hdmi_update_power: hdmi->force=0
[ 3897.341551] dw_hdmi_update_power: hdmi->disabled=0
[ 3897.346528] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3897.351858] dw_hdmi_update_power: hdmi->rxsense=1
[ 3897.356615] dw_hdmi_update_power: force=2
[ 3897.360655] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3897.365980] dw_hdmi_phy_update_hpd

So the plugout/plugin events are not processed further.

One thing looks strange:

[ 3897.127930] hdmi_av_composer
[ 3897.130848] dw-hdmi-jz4780 10180000.hdmi: final pixclk = 0

But I have no idea if this is the reason or the consequence
of the uninitialized lcdc.

So we need some DRM specialist to take a look on it.

BR and thanks,
Nikolaus


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
@ 2020-03-11 13:30           ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-03-11 13:30 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Paul Boddie, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Ralf Baechle, Paul Burton, Linus Walleij,
	Andi Kleen, Krzysztof Kozlowski, Geert Uytterhoeven,
	Eric W. Biederman, Miquel Raynal, open list:DRM PANEL DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, linux-mips, open list:GPIO SUBSYSTEM,
	Discussions about the Letux Kernel,
	MIPS Creator CI20 Development

Hi Paul,

> Am 11.03.2020 um 14:20 schrieb Paul Cercueil <paul@crapouillou.net>:
> 
> Hi Nikolaus,
> 
> 
> Le mer., mars 11, 2020 at 13:43, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>> Hi Paul,
>>> The JZ4780's LCD controller is much newer than the JZ4740 one, so even if it works with the "ingenic,jz4740-lcd" compatible string, you want it as a fallback.
>>> So this should be: compatible = "ingenic,jz4780-lcd", "ingenic,jz4740-lcd".
>>> That means the YAML should be updated too.
>> I have started to look into jz4780 HDMI setup again.
>> Well, there is no driver compatible to "ingenic,jz4780-lcd" so far
>> and it is questionalbe if we need a different one.
>> I think we should rather make the driver also compatible
>> than adding a fallback to ingenic,jz4740-lcdto the DTS.
>> The reason why this is better even if both LCDC are almost
>> compatible is that the jz4780 allows for much bigger displays
>> and therefore should have its own jz_soc_info with 4k x 2k
>> as maximum.
> 
> Sure, feel free to extend the driver.
> 
>> Next I tried to find out if the LCDC are really compatible.
>> Well the jz4780 has two lcdc instances but they are separated
>> by the reg addr. Next, there are unique features (like picture in
>> picture with alpha blending) but those are probably disabled
>> if not programmed from reset state. This may become a reason
>> to separate or augment the driver for the jz4780 but at the
>> moment we can ignore that.
> 
> Two LCDC instances -> two lcd-controller@... nodes. It's that simple.

Indeed :)

> 
> The other features you listed are outside the LCDC, so outside the scope of this driver.

Well, in the description they are mixed but I think we do not have
to care about now.
> 
>> There are also subtly different bit definitions and register
>> widths (e.g. 24 bit in addition to 16/18 bit modes or more bits
>> for the sync position) but it looks as if the ingenic_drm
>> driver already handles this.
>> Then I tried to read back the registers. Strangely they
>> are all 0x00000000. So there is no programming of the
>> lcd-controller in our DT setup with HDMI at all!
> 
> How did you read them?

I used devmem2 (may be an omap tool I have recompiled for MIPS - it uses /dev/mem).

> Do it from the regmap: should be "cat /sys/kernel/debug/regmap/13050000.lcd-controller/registers" (not sure about the path)

Well seems to give the same result:

root@letux:~# cat /sys/kernel/debug/regmap/13050000.lcd-controller/registers
00: 00000000
04: 00000000
08: 00000000
0c: 00000000
10: 00000000
14: 00000000
18: 00000000
1c: 00000000
20: 00000000
24: 00000000
28: 00000000
2c: 00000000
30: 00000000
34: 00000000
38: 00000000
3c: 00000000
40: 00000000
44: 00000000
48: 00000000
4c: 00000000
50: 00000000
54: 00000000
58: 00000000
5c: 00000000
root@letux:~# 

> 
>> I also checked that ingenic_drm_probe() is called and
>> returns successfully 0. It also reports that a /dev/fb
>> has been created:
>> [    7.908830] ingenic-drm 13050000.lcd-controller: fb0: ingenic-drmdrmf frame buffer device
>> But for example ingenic_drm_encoder_atomic_mode_set() is
>> never called which should write some registers of the LCDC.
>> I only did see some calls to ingenic_drm_encoder_atomic_check().
>> This of course explains why we have no HDMI signals despite
>> proper HPD and a /dev/fb0. Because the LCDC is not being
>> programmed.
> 
> It won't be called until the HDMI driver says that the cable is plugged, and there's a client application (e.g. fbdev emulation) running. So the problem is most likely within the HDMI driver.

Ok!

The HDMI subsystem says (with some printk inserted) on cable unplug/replug:

root@letux:~# [ 3894.370706] dw_hdmi_update_power
[ 3894.373984] dw_hdmi_update_power: hdmi->force=0
[ 3894.378759] dw_hdmi_update_power: hdmi->disabled=0
[ 3894.383756] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.388947] dw_hdmi_update_power: hdmi->rxsense=1
[ 3894.393831] dw_hdmi_update_power: force=2
[ 3894.397895] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.403200] dw_hdmi_phy_update_hpd
[ 3894.406784] dw_hdmi_update_power
[ 3894.410054] dw_hdmi_update_power: hdmi->force=0
[ 3894.414766] dw_hdmi_update_power: hdmi->disabled=0
[ 3894.419611] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.424928] dw_hdmi_update_power: hdmi->rxsense=1
[ 3894.429699] dw_hdmi_update_power: force=2
[ 3894.433876] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.439068] dw_hdmi_phy_update_hpd
[ 3894.452316] dw_hdmi_update_power
[ 3894.455596] dw_hdmi_update_power: hdmi->force=0
[ 3894.460150] dw_hdmi_update_power: hdmi->disabled=0
[ 3894.464967] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.470131] dw_hdmi_update_power: hdmi->rxsense=1
[ 3894.475051] dw_hdmi_update_power: force=2
[ 3894.479111] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.484423] dw_hdmi_phy_update_hpd
[ 3894.488007] dw_hdmi_update_power
[ 3894.491278] dw_hdmi_update_power: hdmi->force=0
[ 3894.495982] dw_hdmi_update_power: hdmi->disabled=0
[ 3894.500823] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.506139] dw_hdmi_update_power: hdmi->rxsense=0
[ 3894.510895] dw_hdmi_update_power: force=1
[ 3894.515063] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.520252] dw_hdmi_poweroff
[ 3894.523284] dw_hdmi_phy_disable
[ 3894.526480] dw_hdmi_phy_power_off
[ 3894.529823] dw_hdmi_phy_gen2_txpwron
[ 3894.533567] dw-hdmi-jz4780 10180000.hdmi: PHY powered down in 0 iterations
[ 3894.540496] dw_hdmi_phy_gen2_pddq
[ 3894.543966] dw_hdmi_phy_update_hpd
[ 3894.547435] dw-hdmi-jz4780 10180000.hdmi: EVENT=plugout
[ 3897.079560] dw_hdmi_update_power
[ 3897.082840] dw_hdmi_update_power: hdmi->force=0
[ 3897.087394] dw_hdmi_update_power: hdmi->disabled=0
[ 3897.092207] dw_hdmi_update_power: hdmi->bridge_is_on=0
[ 3897.097370] dw_hdmi_update_power: hdmi->rxsense=1
[ 3897.102316] dw_hdmi_update_power: force=2
[ 3897.106380] dw_hdmi_update_power: hdmi->bridge_is_on=0
[ 3897.111667] dw_hdmi_poweron
[ 3897.114518] dw_hdmi_setup
[ 3897.117163] hdmi_disable_overflow_interrupts
[ 3897.121478] dw-hdmi-jz4780 10180000.hdmi: Non-CEA mode used in HDMI
[ 3897.127930] hdmi_av_composer
[ 3897.130848] dw-hdmi-jz4780 10180000.hdmi: final pixclk = 0
[ 3897.136506] dw_hdmi_phy_init
[ 3897.139440] dw_hdmi_phy_sel_data_en_pol
[ 3897.143428] dw_hdmi_phy_sel_interface_control
[ 3897.147840] hdmi_phy_configure
[ 3897.150922] dw_hdmi_phy_power_off
[ 3897.154415] dw_hdmi_phy_gen2_txpwron
[ 3897.158043] dw-hdmi-jz4780 10180000.hdmi: PHY powered down in 0 iterations
[ 3897.165094] dw_hdmi_phy_gen2_pddq
[ 3897.168468] dw_hdmi_set_high_tmds_clock_ratio
[ 3897.173002] hdmi_phy_configure_dwc_hdmi_3d_tx
[ 3897.186578] dw_hdmi_phy_power_on
[ 3897.189847] dw_hdmi_phy_gen2_txpwron
[ 3897.193586] dw_hdmi_phy_gen2_pddq
[ 3897.217640] dw-hdmi-jz4780 10180000.hdmi: PHY PLL locked 1 iterations
[ 3897.224226] dw_hdmi_phy_sel_data_en_pol
[ 3897.228107] dw_hdmi_phy_sel_interface_control
[ 3897.232631] hdmi_phy_configure
[ 3897.235739] dw_hdmi_phy_power_off
[ 3897.239082] dw_hdmi_phy_gen2_txpwron
[ 3897.242826] dw-hdmi-jz4780 10180000.hdmi: PHY powered down in 0 iterations
[ 3897.249754] dw_hdmi_phy_gen2_pddq
[ 3897.253239] dw_hdmi_set_high_tmds_clock_ratio
[ 3897.257658] hdmi_phy_configure_dwc_hdmi_3d_tx
[ 3897.271264] dw_hdmi_phy_power_on
[ 3897.274659] dw_hdmi_phy_gen2_txpwron
[ 3897.278292] dw_hdmi_phy_gen2_pddq
[ 3897.283840] dw-hdmi-jz4780 10180000.hdmi: PHY PLL locked 1 iterations
[ 3897.290346] dw_hdmi_enable_video_path
[ 3897.294240] dw-hdmi-jz4780 10180000.hdmi: sink has audio support
[ 3897.300324] dw-hdmi-jz4780 10180000.hdmi: dw_hdmi_setup HDMI mode
[ 3897.306596] hdmi_config_AVI
[ 3897.309467] hdmi_config_vendor_specific_infoframe
[ 3897.314336] hdmi_config_drm_infoframe
[ 3897.318096] hdmi_tx_hdcp_config
[ 3897.321270] dw_hdmi_clear_overflow
[ 3897.324831] dw_hdmi_phy_update_hpd
[ 3897.328298] dw-hdmi-jz4780 10180000.hdmi: EVENT=plugin
[ 3897.333704] dw_hdmi_update_power
[ 3897.336990] dw_hdmi_update_power: hdmi->force=0
[ 3897.341551] dw_hdmi_update_power: hdmi->disabled=0
[ 3897.346528] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3897.351858] dw_hdmi_update_power: hdmi->rxsense=1
[ 3897.356615] dw_hdmi_update_power: force=2
[ 3897.360655] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3897.365980] dw_hdmi_phy_update_hpd

So the plugout/plugin events are not processed further.

One thing looks strange:

[ 3897.127930] hdmi_av_composer
[ 3897.130848] dw-hdmi-jz4780 10180000.hdmi: final pixclk = 0

But I have no idea if this is the reason or the consequence
of the uninitialized lcdc.

So we need some DRM specialist to take a look on it.

BR and thanks,
Nikolaus


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller
@ 2020-03-11 13:30           ` H. Nikolaus Schaller
  0 siblings, 0 replies; 51+ messages in thread
From: H. Nikolaus Schaller @ 2020-03-11 13:30 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Paul Boddie, Geert Uytterhoeven, Paul Burton,
	open list:GPIO SUBSYSTEM, David Airlie,
	MIPS Creator CI20 Development, open list:DRM PANEL DRIVERS,
	Linux Kernel Mailing List, Ralf Baechle, linux-mips, Andi Kleen,
	Rob Herring, Krzysztof Kozlowski, Miquel Raynal,
	Discussions about the Letux Kernel, Eric W. Biederman

Hi Paul,

> Am 11.03.2020 um 14:20 schrieb Paul Cercueil <paul@crapouillou.net>:
> 
> Hi Nikolaus,
> 
> 
> Le mer., mars 11, 2020 at 13:43, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>> Hi Paul,
>>> The JZ4780's LCD controller is much newer than the JZ4740 one, so even if it works with the "ingenic,jz4740-lcd" compatible string, you want it as a fallback.
>>> So this should be: compatible = "ingenic,jz4780-lcd", "ingenic,jz4740-lcd".
>>> That means the YAML should be updated too.
>> I have started to look into jz4780 HDMI setup again.
>> Well, there is no driver compatible to "ingenic,jz4780-lcd" so far
>> and it is questionalbe if we need a different one.
>> I think we should rather make the driver also compatible
>> than adding a fallback to ingenic,jz4740-lcdto the DTS.
>> The reason why this is better even if both LCDC are almost
>> compatible is that the jz4780 allows for much bigger displays
>> and therefore should have its own jz_soc_info with 4k x 2k
>> as maximum.
> 
> Sure, feel free to extend the driver.
> 
>> Next I tried to find out if the LCDC are really compatible.
>> Well the jz4780 has two lcdc instances but they are separated
>> by the reg addr. Next, there are unique features (like picture in
>> picture with alpha blending) but those are probably disabled
>> if not programmed from reset state. This may become a reason
>> to separate or augment the driver for the jz4780 but at the
>> moment we can ignore that.
> 
> Two LCDC instances -> two lcd-controller@... nodes. It's that simple.

Indeed :)

> 
> The other features you listed are outside the LCDC, so outside the scope of this driver.

Well, in the description they are mixed but I think we do not have
to care about now.
> 
>> There are also subtly different bit definitions and register
>> widths (e.g. 24 bit in addition to 16/18 bit modes or more bits
>> for the sync position) but it looks as if the ingenic_drm
>> driver already handles this.
>> Then I tried to read back the registers. Strangely they
>> are all 0x00000000. So there is no programming of the
>> lcd-controller in our DT setup with HDMI at all!
> 
> How did you read them?

I used devmem2 (may be an omap tool I have recompiled for MIPS - it uses /dev/mem).

> Do it from the regmap: should be "cat /sys/kernel/debug/regmap/13050000.lcd-controller/registers" (not sure about the path)

Well seems to give the same result:

root@letux:~# cat /sys/kernel/debug/regmap/13050000.lcd-controller/registers
00: 00000000
04: 00000000
08: 00000000
0c: 00000000
10: 00000000
14: 00000000
18: 00000000
1c: 00000000
20: 00000000
24: 00000000
28: 00000000
2c: 00000000
30: 00000000
34: 00000000
38: 00000000
3c: 00000000
40: 00000000
44: 00000000
48: 00000000
4c: 00000000
50: 00000000
54: 00000000
58: 00000000
5c: 00000000
root@letux:~# 

> 
>> I also checked that ingenic_drm_probe() is called and
>> returns successfully 0. It also reports that a /dev/fb
>> has been created:
>> [    7.908830] ingenic-drm 13050000.lcd-controller: fb0: ingenic-drmdrmf frame buffer device
>> But for example ingenic_drm_encoder_atomic_mode_set() is
>> never called which should write some registers of the LCDC.
>> I only did see some calls to ingenic_drm_encoder_atomic_check().
>> This of course explains why we have no HDMI signals despite
>> proper HPD and a /dev/fb0. Because the LCDC is not being
>> programmed.
> 
> It won't be called until the HDMI driver says that the cable is plugged, and there's a client application (e.g. fbdev emulation) running. So the problem is most likely within the HDMI driver.

Ok!

The HDMI subsystem says (with some printk inserted) on cable unplug/replug:

root@letux:~# [ 3894.370706] dw_hdmi_update_power
[ 3894.373984] dw_hdmi_update_power: hdmi->force=0
[ 3894.378759] dw_hdmi_update_power: hdmi->disabled=0
[ 3894.383756] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.388947] dw_hdmi_update_power: hdmi->rxsense=1
[ 3894.393831] dw_hdmi_update_power: force=2
[ 3894.397895] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.403200] dw_hdmi_phy_update_hpd
[ 3894.406784] dw_hdmi_update_power
[ 3894.410054] dw_hdmi_update_power: hdmi->force=0
[ 3894.414766] dw_hdmi_update_power: hdmi->disabled=0
[ 3894.419611] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.424928] dw_hdmi_update_power: hdmi->rxsense=1
[ 3894.429699] dw_hdmi_update_power: force=2
[ 3894.433876] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.439068] dw_hdmi_phy_update_hpd
[ 3894.452316] dw_hdmi_update_power
[ 3894.455596] dw_hdmi_update_power: hdmi->force=0
[ 3894.460150] dw_hdmi_update_power: hdmi->disabled=0
[ 3894.464967] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.470131] dw_hdmi_update_power: hdmi->rxsense=1
[ 3894.475051] dw_hdmi_update_power: force=2
[ 3894.479111] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.484423] dw_hdmi_phy_update_hpd
[ 3894.488007] dw_hdmi_update_power
[ 3894.491278] dw_hdmi_update_power: hdmi->force=0
[ 3894.495982] dw_hdmi_update_power: hdmi->disabled=0
[ 3894.500823] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.506139] dw_hdmi_update_power: hdmi->rxsense=0
[ 3894.510895] dw_hdmi_update_power: force=1
[ 3894.515063] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3894.520252] dw_hdmi_poweroff
[ 3894.523284] dw_hdmi_phy_disable
[ 3894.526480] dw_hdmi_phy_power_off
[ 3894.529823] dw_hdmi_phy_gen2_txpwron
[ 3894.533567] dw-hdmi-jz4780 10180000.hdmi: PHY powered down in 0 iterations
[ 3894.540496] dw_hdmi_phy_gen2_pddq
[ 3894.543966] dw_hdmi_phy_update_hpd
[ 3894.547435] dw-hdmi-jz4780 10180000.hdmi: EVENT=plugout
[ 3897.079560] dw_hdmi_update_power
[ 3897.082840] dw_hdmi_update_power: hdmi->force=0
[ 3897.087394] dw_hdmi_update_power: hdmi->disabled=0
[ 3897.092207] dw_hdmi_update_power: hdmi->bridge_is_on=0
[ 3897.097370] dw_hdmi_update_power: hdmi->rxsense=1
[ 3897.102316] dw_hdmi_update_power: force=2
[ 3897.106380] dw_hdmi_update_power: hdmi->bridge_is_on=0
[ 3897.111667] dw_hdmi_poweron
[ 3897.114518] dw_hdmi_setup
[ 3897.117163] hdmi_disable_overflow_interrupts
[ 3897.121478] dw-hdmi-jz4780 10180000.hdmi: Non-CEA mode used in HDMI
[ 3897.127930] hdmi_av_composer
[ 3897.130848] dw-hdmi-jz4780 10180000.hdmi: final pixclk = 0
[ 3897.136506] dw_hdmi_phy_init
[ 3897.139440] dw_hdmi_phy_sel_data_en_pol
[ 3897.143428] dw_hdmi_phy_sel_interface_control
[ 3897.147840] hdmi_phy_configure
[ 3897.150922] dw_hdmi_phy_power_off
[ 3897.154415] dw_hdmi_phy_gen2_txpwron
[ 3897.158043] dw-hdmi-jz4780 10180000.hdmi: PHY powered down in 0 iterations
[ 3897.165094] dw_hdmi_phy_gen2_pddq
[ 3897.168468] dw_hdmi_set_high_tmds_clock_ratio
[ 3897.173002] hdmi_phy_configure_dwc_hdmi_3d_tx
[ 3897.186578] dw_hdmi_phy_power_on
[ 3897.189847] dw_hdmi_phy_gen2_txpwron
[ 3897.193586] dw_hdmi_phy_gen2_pddq
[ 3897.217640] dw-hdmi-jz4780 10180000.hdmi: PHY PLL locked 1 iterations
[ 3897.224226] dw_hdmi_phy_sel_data_en_pol
[ 3897.228107] dw_hdmi_phy_sel_interface_control
[ 3897.232631] hdmi_phy_configure
[ 3897.235739] dw_hdmi_phy_power_off
[ 3897.239082] dw_hdmi_phy_gen2_txpwron
[ 3897.242826] dw-hdmi-jz4780 10180000.hdmi: PHY powered down in 0 iterations
[ 3897.249754] dw_hdmi_phy_gen2_pddq
[ 3897.253239] dw_hdmi_set_high_tmds_clock_ratio
[ 3897.257658] hdmi_phy_configure_dwc_hdmi_3d_tx
[ 3897.271264] dw_hdmi_phy_power_on
[ 3897.274659] dw_hdmi_phy_gen2_txpwron
[ 3897.278292] dw_hdmi_phy_gen2_pddq
[ 3897.283840] dw-hdmi-jz4780 10180000.hdmi: PHY PLL locked 1 iterations
[ 3897.290346] dw_hdmi_enable_video_path
[ 3897.294240] dw-hdmi-jz4780 10180000.hdmi: sink has audio support
[ 3897.300324] dw-hdmi-jz4780 10180000.hdmi: dw_hdmi_setup HDMI mode
[ 3897.306596] hdmi_config_AVI
[ 3897.309467] hdmi_config_vendor_specific_infoframe
[ 3897.314336] hdmi_config_drm_infoframe
[ 3897.318096] hdmi_tx_hdcp_config
[ 3897.321270] dw_hdmi_clear_overflow
[ 3897.324831] dw_hdmi_phy_update_hpd
[ 3897.328298] dw-hdmi-jz4780 10180000.hdmi: EVENT=plugin
[ 3897.333704] dw_hdmi_update_power
[ 3897.336990] dw_hdmi_update_power: hdmi->force=0
[ 3897.341551] dw_hdmi_update_power: hdmi->disabled=0
[ 3897.346528] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3897.351858] dw_hdmi_update_power: hdmi->rxsense=1
[ 3897.356615] dw_hdmi_update_power: force=2
[ 3897.360655] dw_hdmi_update_power: hdmi->bridge_is_on=1
[ 3897.365980] dw_hdmi_phy_update_hpd

So the plugout/plugin events are not processed further.

One thing looks strange:

[ 3897.127930] hdmi_av_composer
[ 3897.130848] dw-hdmi-jz4780 10180000.hdmi: final pixclk = 0

But I have no idea if this is the reason or the consequence
of the uninitialized lcdc.

So we need some DRM specialist to take a look on it.

BR and thanks,
Nikolaus

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2020-03-12  8:09 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-28 18:19 [RFC v2 0/8] MIPS: CI20: add HDMI out support H. Nikolaus Schaller
2020-02-28 18:19 ` H. Nikolaus Schaller
2020-02-28 18:19 ` [RFC v2 1/8] dt-bindings: display: add ingenic-jz4780-lcd DT Schema H. Nikolaus Schaller
2020-02-28 18:19   ` H. Nikolaus Schaller
2020-02-28 18:42   ` Sam Ravnborg
2020-02-28 18:42     ` Sam Ravnborg
2020-02-28 18:51     ` H. Nikolaus Schaller
2020-03-02 18:55   ` Rob Herring
2020-03-02 18:55     ` Rob Herring
2020-03-02 19:10   ` Paul Cercueil
2020-03-02 19:10     ` Paul Cercueil
2020-03-03  7:21     ` H. Nikolaus Schaller
2020-03-03  7:21       ` H. Nikolaus Schaller
2020-02-28 18:19 ` [RFC v2 2/8] dt-bindings: display: add ingenic-jz4780-hdmi " H. Nikolaus Schaller
2020-02-28 18:19   ` H. Nikolaus Schaller
2020-03-02 19:19   ` Paul Cercueil
2020-03-02 19:19     ` Paul Cercueil
2020-03-03  7:22     ` H. Nikolaus Schaller
2020-02-28 18:19 ` [RFC v2 3/8] drm: ingenic-drm: add MODULE_DEVICE_TABLE H. Nikolaus Schaller
2020-02-28 18:19   ` H. Nikolaus Schaller
2020-03-02 19:21   ` Paul Cercueil
2020-03-02 19:21     ` Paul Cercueil
2020-03-03  7:22     ` H. Nikolaus Schaller
2020-02-28 18:19 ` [RFC v2 4/8] drm: ingenic: add jz4780 Synopsys HDMI driver H. Nikolaus Schaller
2020-02-28 18:19   ` H. Nikolaus Schaller
2020-02-28 18:19 ` [RFC v2 5/8] pinctrl: ingenic: add hdmi-ddc pin control group H. Nikolaus Schaller
2020-02-28 18:19   ` H. Nikolaus Schaller
2020-02-28 22:05   ` Linus Walleij
2020-02-28 22:05     ` Linus Walleij
2020-02-29  6:41     ` H. Nikolaus Schaller
2020-02-29  6:41       ` H. Nikolaus Schaller
2020-03-02  8:42   ` Linus Walleij
2020-03-02  8:42     ` Linus Walleij
2020-02-28 18:19 ` [RFC v2 6/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller H. Nikolaus Schaller
2020-02-28 18:19   ` H. Nikolaus Schaller
2020-03-02 19:27   ` Paul Cercueil
2020-03-02 19:27     ` Paul Cercueil
2020-03-03  7:24     ` H. Nikolaus Schaller
2020-03-11 12:43     ` H. Nikolaus Schaller
2020-03-11 12:43       ` H. Nikolaus Schaller
2020-03-11 12:43       ` H. Nikolaus Schaller
2020-03-11 13:20       ` Paul Cercueil
2020-03-11 13:20         ` Paul Cercueil
2020-03-11 13:20         ` Paul Cercueil
2020-03-11 13:30         ` H. Nikolaus Schaller
2020-03-11 13:30           ` H. Nikolaus Schaller
2020-03-11 13:30           ` H. Nikolaus Schaller
2020-02-28 18:19 ` [RFC v2 7/8] MIPS: DTS: CI20: add HDMI setup H. Nikolaus Schaller
2020-02-28 18:19   ` H. Nikolaus Schaller
2020-02-28 18:19 ` [RFC v2 8/8] MIPS: CI20: defconfig: configure for DRM_DW_HDMI_JZ4780 H. Nikolaus Schaller
2020-02-28 18:19   ` H. Nikolaus Schaller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.