All of lore.kernel.org
 help / color / mirror / Atom feed
* [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M
@ 2019-09-16 15:50 Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 01/32] dt-bindings: PCI: rcar: Add device tree support for r8a774a1 Fabrizio Castro
                   ` (32 more replies)
  0 siblings, 33 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

Dear All,

this series adds HDMI and PCIe support for the HiHope RZ/G2M board.

Thanks,
Fab

Biju Das (14):
  dt-bindings: PCI: rcar: Add device tree support for r8a774a1
  dt-bindings: display: renesas: du: Document the r8a774a1 bindings
  dt-bindings: display: renesas: lvds: Document r8a774a1 bindings
  drm: rcar-du: Add R8A774A1 support
  drm: rcar-du: lvds: Add r8a774a1 support
  arm64: dts: renesas: r8a774a1: Add PCIe device nodes
  arm64: dts: renesas: hihope-common: Declare pcie bus clock
  arm64: dts: renesas: hihope-rzg2-ex: Enable PCIe support
  arm64: dts: renesas: r8a774a1: Add VSP instances
  arm64: dts: renesas: r8a774a1: Add DU device to DT
  arm64: dts: renesas: r8a774a1: Add FDP1 instance
  arm64: dts: renesas: r8a774a1: Tie SYS-DMAC to IPMMU-DS0/1
  arm64: dts: renesas: r8a774a1: Tie Audio-DMAC to IPMMU-MP
  arm64: dts: renesas: r8a774a1: Connect Ethernet-AVB to IPMMU-DS0

Fabrizio Castro (3):
  dt-bindings: display: renesas: Add r8a774a1 support
  arm64: dts: renesas: r8a774a1: Add HDMI encoder instance
  arm64: dts: renesas: hihope-common: Add HDMI support

Jacopo Mondi (1):
  drm: rcar-du: Rename and document dpll_ch field

Kieran Bingham (3):
  drm: rcar-du: Refactor Feature and Quirk definitions
  drm: rcar-du: Add interlaced feature flag
  drm: rcar-du: Support interlaced video output through vsp1

Koji Matsuoka (1):
  drm: rcar-du: Add support for missing pixel formats

Laurent Pinchart (6):
  drm: rcar-du: dw-hdmi: Reject modes with a too high clock frequency
  drm: rcar-du: Cache DSYSR value to ensure known initial value
  drm: rcar-du: Don't use TV sync mode when not supported by the
    hardware
  drm: rcar-du: Rework clock configuration based on hardware limits
  drm: rcar-du: Store V4L2 fourcc in rcar_du_format_info structure
  drm: rcar-du: Update framebuffer pitch and alignment limits for Gen3

Marek Vasut (3):
  PCI: rcar: Replace unsigned long with u32/unsigned int in register
    accessors
  PCI: rcar: Replace various variable types with unsigned ones for
    register values
  PCI: rcar: Clean up debug messages

Wolfram Sang (1):
  PCI: rcar: Do not shadow the 'irq' variable

 .../bindings/display/bridge/renesas,dw-hdmi.txt    |   4 +-
 .../bindings/display/bridge/renesas,lvds.txt       |   1 +
 .../devicetree/bindings/display/renesas,du.txt     |   2 +
 Documentation/devicetree/bindings/pci/rcar-pci.txt |   1 +
 arch/arm64/boot/dts/renesas/hihope-common.dtsi     |  65 ++++++
 arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi    |   8 +
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi          | 255 +++++++++++++++++++++
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c             | 168 ++++++++------
 drivers/gpu/drm/rcar-du/rcar_du_crtc.h             |   5 +
 drivers/gpu/drm/rcar-du/rcar_du_drv.c              |  79 +++++--
 drivers/gpu/drm/rcar-du/rcar_du_drv.h              |  13 +-
 drivers/gpu/drm/rcar-du/rcar_du_group.c            |   7 +-
 drivers/gpu/drm/rcar-du/rcar_du_kms.c              |  92 +++++++-
 drivers/gpu/drm/rcar-du/rcar_du_kms.h              |   1 +
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c              |  46 +---
 drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c             |  15 ++
 drivers/gpu/drm/rcar-du/rcar_lvds.c                |   1 +
 drivers/pci/controller/pcie-rcar.c                 |  40 ++--
 18 files changed, 641 insertions(+), 162 deletions(-)

-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 01/32] dt-bindings: PCI: rcar: Add device tree support for r8a774a1
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 02/32] dt-bindings: display: renesas: du: Document the r8a774a1 bindings Fabrizio Castro
                   ` (31 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit 69bc586518e0902493c42b77652fa712fae3480f upstream.

Add PCIe support for the RZ/G2M (a.k.a. R8A774A1).

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 Documentation/devicetree/bindings/pci/rcar-pci.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/pci/rcar-pci.txt b/Documentation/devicetree/bindings/pci/rcar-pci.txt
index fac07a4..7920d30 100644
--- a/Documentation/devicetree/bindings/pci/rcar-pci.txt
+++ b/Documentation/devicetree/bindings/pci/rcar-pci.txt
@@ -2,6 +2,7 @@
 
 Required properties:
 compatible: "renesas,pcie-r8a7743" for the R8A7743 SoC;
+	    "renesas,pcie-r8a774a1" for the R8A774A1 SoC;
 	    "renesas,pcie-r8a774c0" for the R8A774C0 SoC;
 	    "renesas,pcie-r8a7779" for the R8A7779 SoC;
 	    "renesas,pcie-r8a7790" for the R8A7790 SoC;
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 02/32] dt-bindings: display: renesas: du: Document the r8a774a1 bindings
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 01/32] dt-bindings: PCI: rcar: Add device tree support for r8a774a1 Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 03/32] dt-bindings: display: renesas: lvds: Document " Fabrizio Castro
                   ` (30 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit 2acd1d1f219946e292aa85a9e3dff35e4bb78237 upstream.

Document the RZ/G2M (R8A774A1) SoC in the R-Car DU bindings.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt
index ec9d34be..e01acc6 100644
--- a/Documentation/devicetree/bindings/display/renesas,du.txt
+++ b/Documentation/devicetree/bindings/display/renesas,du.txt
@@ -5,6 +5,7 @@ Required Properties:
   - compatible: must be one of the following.
     - "renesas,du-r8a7743" for R8A7743 (RZ/G1M) compatible DU
     - "renesas,du-r8a7745" for R8A7745 (RZ/G1E) compatible DU
+    - "renesas,du-r8a774a1" for R8A774A1 (RZ/G2M) compatible DU
     - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU
     - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU
     - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU
@@ -51,6 +52,7 @@ corresponding to each DU output.
 -----------------------------------------------------------------------------
  R8A7743 (RZ/G1M)       DPAD 0         LVDS 0         -              -
  R8A7745 (RZ/G1E)       DPAD 0         DPAD 1         -              -
+ R8A774A1 (RZ/G2M)      DPAD 0         HDMI 0         LVDS 0         -
  R8A7779 (R-Car H1)     DPAD 0         DPAD 1         -              -
  R8A7790 (R-Car H2)     DPAD 0         LVDS 0         LVDS 1         -
  R8A7791 (R-Car M2-W)   DPAD 0         LVDS 0         -              -
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 03/32] dt-bindings: display: renesas: lvds: Document r8a774a1 bindings
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 01/32] dt-bindings: PCI: rcar: Add device tree support for r8a774a1 Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 02/32] dt-bindings: display: renesas: du: Document the r8a774a1 bindings Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 04/32] dt-bindings: display: renesas: Add r8a774a1 support Fabrizio Castro
                   ` (29 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit 07c7c6bfbe03192263cc5c9550199a189cabd558 upstream.

Document the RZ/G2M (R8A774A1) LVDS bindings.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
index 4f0ab3e..3ede032 100644
--- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
+++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
@@ -8,6 +8,7 @@ Required properties:
 
 - compatible : Shall contain one of
   - "renesas,r8a7743-lvds" for R8A7743 (RZ/G1M) compatible LVDS encoders
+  - "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders
   - "renesas,r8a7790-lvds" for R8A7790 (R-Car H2) compatible LVDS encoders
   - "renesas,r8a7791-lvds" for R8A7791 (R-Car M2-W) compatible LVDS encoders
   - "renesas,r8a7793-lvds" for R8A7793 (R-Car M2-N) compatible LVDS encoders
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 04/32] dt-bindings: display: renesas: Add r8a774a1 support
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (2 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 03/32] dt-bindings: display: renesas: lvds: Document " Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 05/32] PCI: rcar: Replace unsigned long with u32/unsigned int in register accessors Fabrizio Castro
                   ` (28 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

commit 74a22e8f4350a9e096c84fc9e88cf72abf71887c upstream.

Document RZ/G2M (R8A774A1) SoC bindings.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt b/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt
index a41d280..db68041 100644
--- a/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt
+++ b/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt
@@ -12,10 +12,12 @@ following device-specific properties.
 Required properties:
 
 - compatible : Shall contain one or more of
+  - "renesas,r8a774a1-hdmi" for R8A774A1 (RZ/G2M) compatible HDMI TX
   - "renesas,r8a7795-hdmi" for R8A7795 (R-Car H3) compatible HDMI TX
   - "renesas,r8a7796-hdmi" for R8A7796 (R-Car M3-W) compatible HDMI TX
   - "renesas,r8a77965-hdmi" for R8A77965 (R-Car M3-N) compatible HDMI TX
-  - "renesas,rcar-gen3-hdmi" for the generic R-Car Gen3 compatible HDMI TX
+  - "renesas,rcar-gen3-hdmi" for the generic R-Car Gen3 and RZ/G2 compatible
+			     HDMI TX
 
     When compatible with generic versions, nodes must list the SoC-specific
     version corresponding to the platform first, followed by the
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 05/32] PCI: rcar: Replace unsigned long with u32/unsigned int in register accessors
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (3 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 04/32] dt-bindings: display: renesas: Add r8a774a1 support Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 06/32] PCI: rcar: Replace various variable types with unsigned ones for register values Fabrizio Castro
                   ` (27 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Marek Vasut <marek.vasut+renesas@gmail.com>

commit 7dc13a7939e09caa20ed3a0a8417f23b4ec4e6e2 upstream.

Replace unsigned long with u32 and unsigned int in register accessor
functions, since they access 32bit registers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc at vger.kernel.org
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/pci/controller/pcie-rcar.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 9b9c677..0665892 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -154,14 +154,13 @@ struct rcar_pcie {
 	struct			rcar_msi msi;
 };
 
-static void rcar_pci_write_reg(struct rcar_pcie *pcie, unsigned long val,
-			       unsigned long reg)
+static void rcar_pci_write_reg(struct rcar_pcie *pcie, u32 val,
+			       unsigned int reg)
 {
 	writel(val, pcie->base + reg);
 }
 
-static unsigned long rcar_pci_read_reg(struct rcar_pcie *pcie,
-				       unsigned long reg)
+static u32 rcar_pci_read_reg(struct rcar_pcie *pcie, unsigned int reg)
 {
 	return readl(pcie->base + reg);
 }
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 06/32] PCI: rcar: Replace various variable types with unsigned ones for register values
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (4 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 05/32] PCI: rcar: Replace unsigned long with u32/unsigned int in register accessors Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 07/32] PCI: rcar: Clean up debug messages Fabrizio Castro
                   ` (26 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Marek Vasut <marek.vasut+renesas@gmail.com>

commit d8fa26609b91394f9f2d17ae6956a2c3e3632fbb upstream.

Replace various variable types with u32 or unsigned int type for
variables holding register values, since the registers are 32bit.
Note that rcar_pcie_msi_irq() still uses various variable types
because both find_first_bit() and __fls() require various variable
types as an argument.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc at vger.kernel.org
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/pci/controller/pcie-rcar.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 0665892..f602c0d 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -172,7 +172,7 @@ enum {
 
 static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data)
 {
-	int shift = 8 * (where & 3);
+	unsigned int shift = 8 * (where & 3);
 	u32 val = rcar_pci_read_reg(pcie, where & ~3);
 
 	val &= ~(mask << shift);
@@ -182,7 +182,7 @@ static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data)
 
 static u32 rcar_read_conf(struct rcar_pcie *pcie, int where)
 {
-	int shift = 8 * (where & 3);
+	unsigned int shift = 8 * (where & 3);
 	u32 val = rcar_pci_read_reg(pcie, where & ~3);
 
 	return val >> shift;
@@ -193,7 +193,7 @@ static int rcar_pcie_config_access(struct rcar_pcie *pcie,
 		unsigned char access_type, struct pci_bus *bus,
 		unsigned int devfn, int where, u32 *data)
 {
-	int dev, func, reg, index;
+	unsigned int dev, func, reg, index;
 
 	dev = PCI_SLOT(devfn);
 	func = PCI_FUNC(devfn);
@@ -297,8 +297,9 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
 				int where, int size, u32 val)
 {
 	struct rcar_pcie *pcie = bus->sysdata;
-	int shift, ret;
+	unsigned int shift;
 	u32 data;
+	int ret;
 
 	ret = rcar_pcie_config_access(pcie, RCAR_PCI_ACCESS_READ,
 				      bus, devfn, where, &data);
@@ -508,10 +509,10 @@ static int phy_wait_for_ack(struct rcar_pcie *pcie)
 }
 
 static void phy_write_reg(struct rcar_pcie *pcie,
-				 unsigned int rate, unsigned int addr,
-				 unsigned int lane, unsigned int data)
+			  unsigned int rate, u32 addr,
+			  unsigned int lane, u32 data)
 {
-	unsigned long phyaddr;
+	u32 phyaddr;
 
 	phyaddr = WRITE_CMD |
 		((rate & 1) << RATE_POS) |
@@ -1123,7 +1124,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct rcar_pcie *pcie;
-	unsigned int data;
+	u32 data;
 	int err;
 	int (*phy_init_fn)(struct rcar_pcie *);
 	struct pci_host_bridge *bridge;
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 07/32] PCI: rcar: Clean up debug messages
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (5 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 06/32] PCI: rcar: Replace various variable types with unsigned ones for register values Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 08/32] PCI: rcar: Do not shadow the 'irq' variable Fabrizio Castro
                   ` (25 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Marek Vasut <marek.vasut+renesas@gmail.com>

commit 42a58f73e9ea4002692732d45a6ea1a0df9e125b upstream.

Drop useless casts from debug messages, they are no longer needed
due to the data type cleanup.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc at vger.kernel.org
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/pci/controller/pcie-rcar.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index f602c0d..6f4bad1 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -286,8 +286,8 @@ static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn,
 	else if (size == 2)
 		*val = (*val >> (8 * (where & 2))) & 0xffff;
 
-	dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08lx\n",
-		bus->number, devfn, where, size, (unsigned long)*val);
+	dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08x\n",
+		bus->number, devfn, where, size, *val);
 
 	return ret;
 }
@@ -306,8 +306,8 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
 	if (ret != PCIBIOS_SUCCESSFUL)
 		return ret;
 
-	dev_dbg(&bus->dev, "pcie-config-write: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08lx\n",
-		bus->number, devfn, where, size, (unsigned long)val);
+	dev_dbg(&bus->dev, "pcie-config-write: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08x\n",
+		bus->number, devfn, where, size, val);
 
 	if (size == 1) {
 		shift = 8 * (where & 3);
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 08/32] PCI: rcar: Do not shadow the 'irq' variable
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (6 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 07/32] PCI: rcar: Clean up debug messages Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 09/32] drm: rcar-du: Add R8A774A1 support Fabrizio Castro
                   ` (24 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Wolfram Sang <wsa+renesas@sang-engineering.com>

commit a27beb5820d1a52b1e2863a4ae5545a1dd4ab35a upstream.

The sparse tool rightfully detects:
drivers/pci/controller/pcie-rcar.c:741:30: warning: symbol 'irq' shadows an earlier one

Fix it now to avoid future surprises and for good coding style.

No functional change intended.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[lorenzo.pieralisi at arm.com: commit log refactoring]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/pci/controller/pcie-rcar.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 6f4bad1..174be37 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -740,15 +740,15 @@ static irqreturn_t rcar_pcie_msi_irq(int irq, void *data)
 
 	while (reg) {
 		unsigned int index = find_first_bit(&reg, 32);
-		unsigned int irq;
+		unsigned int msi_irq;
 
 		/* clear the interrupt */
 		rcar_pci_write_reg(pcie, 1 << index, PCIEMSIFR);
 
-		irq = irq_find_mapping(msi->domain, index);
-		if (irq) {
+		msi_irq = irq_find_mapping(msi->domain, index);
+		if (msi_irq) {
 			if (test_bit(index, msi->used))
-				generic_handle_irq(irq);
+				generic_handle_irq(msi_irq);
 			else
 				dev_info(dev, "unhandled MSI\n");
 		} else {
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 09/32] drm: rcar-du: Add R8A774A1 support
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (7 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 08/32] PCI: rcar: Do not shadow the 'irq' variable Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 10/32] drm: rcar-du: lvds: Add r8a774a1 support Fabrizio Castro
                   ` (23 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit d31349a50415adee26486fbec90a08cc954d0082 upstream.

Add support for the R8A774A1 DU (which is very similar to the R8A7796 DU
except that it lacks TCON and CMM); it has one RGB output, one LVDS output
and one HDMI output.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index 02aee6c..dfa09cf 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -77,6 +77,35 @@ static const struct rcar_du_device_info rzg1_du_r8a7745_info = {
 	},
 };
 
+static const struct rcar_du_device_info rcar_du_r8a774a1_info = {
+	.gen = 3,
+	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
+		  | RCAR_DU_FEATURE_VSP1_SOURCE
+		  | RCAR_DU_FEATURE_INTERLACED
+		  | RCAR_DU_FEATURE_TVM_SYNC,
+	.channels_mask = BIT(2) | BIT(1) | BIT(0),
+	.routes = {
+		/*
+		 * R8A774A1 has one RGB output, one LVDS output and one HDMI
+		 * output.
+		 */
+		[RCAR_DU_OUTPUT_DPAD0] = {
+			.possible_crtcs = BIT(2),
+			.port = 0,
+		},
+		[RCAR_DU_OUTPUT_HDMI0] = {
+			.possible_crtcs = BIT(1),
+			.port = 1,
+		},
+		[RCAR_DU_OUTPUT_LVDS0] = {
+			.possible_crtcs = BIT(0),
+			.port = 2,
+		},
+	},
+	.num_lvds = 1,
+	.dpll_mask =  BIT(1),
+};
+
 static const struct rcar_du_device_info rcar_du_r8a7779_info = {
 	.gen = 2,
 	.features = 0,
@@ -297,6 +326,7 @@ static const struct rcar_du_device_info rcar_du_r8a77970_info = {
 static const struct of_device_id rcar_du_of_table[] = {
 	{ .compatible = "renesas,du-r8a7743", .data = &rzg1_du_r8a7743_info },
 	{ .compatible = "renesas,du-r8a7745", .data = &rzg1_du_r8a7745_info },
+	{ .compatible = "renesas,du-r8a774a1", .data = &rcar_du_r8a774a1_info },
 	{ .compatible = "renesas,du-r8a7779", .data = &rcar_du_r8a7779_info },
 	{ .compatible = "renesas,du-r8a7790", .data = &rcar_du_r8a7790_info },
 	{ .compatible = "renesas,du-r8a7791", .data = &rcar_du_r8a7791_info },
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 10/32] drm: rcar-du: lvds: Add r8a774a1 support
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (8 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 09/32] drm: rcar-du: Add R8A774A1 support Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 11/32] drm: rcar-du: dw-hdmi: Reject modes with a too high clock frequency Fabrizio Castro
                   ` (22 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit 62e2da682a0a3874291bc7874d7e5a043f99cf6d upstream.

The LVDS encoders on RZ/G2M SoC is similar to R-Car M3-W. Add support for
RZ/G2M (R8A774A1) SoC to the LVDS encoder driver.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c
index 4c39de3..61a1dc2 100644
--- a/drivers/gpu/drm/rcar-du/rcar_lvds.c
+++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c
@@ -516,6 +516,7 @@ static const struct rcar_lvds_device_info rcar_lvds_r8a77970_info = {
 
 static const struct of_device_id rcar_lvds_of_table[] = {
 	{ .compatible = "renesas,r8a7743-lvds", .data = &rcar_lvds_gen2_info },
+	{ .compatible = "renesas,r8a774a1-lvds", .data = &rcar_lvds_gen3_info },
 	{ .compatible = "renesas,r8a7790-lvds", .data = &rcar_lvds_r8a7790_info },
 	{ .compatible = "renesas,r8a7791-lvds", .data = &rcar_lvds_gen2_info },
 	{ .compatible = "renesas,r8a7793-lvds", .data = &rcar_lvds_gen2_info },
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 11/32] drm: rcar-du: dw-hdmi: Reject modes with a too high clock frequency
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (9 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 10/32] drm: rcar-du: lvds: Add r8a774a1 support Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 12/32] drm: rcar-du: Refactor Feature and Quirk definitions Fabrizio Castro
                   ` (21 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

commit f41cb153e6faf0d1f4bbe0b0f15aa20de1e43e90 upstream.

Implement a .mode_valid() handler in the R-Car glue layer to reject
modes with an unsupported clock frequency.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c
index 76210ae..8e6abe8 100644
--- a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c
+++ b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c
@@ -39,6 +39,20 @@ static const struct rcar_hdmi_phy_params rcar_hdmi_phy_params[] = {
 	{ ~0UL,      0x0000, 0x0000, 0x0000 },
 };
 
+static enum drm_mode_status
+rcar_hdmi_mode_valid(struct drm_connector *connector,
+		     const struct drm_display_mode *mode)
+{
+	/*
+	 * The maximum supported clock frequency is 297 MHz, as shown in the PHY
+	 * parameters table.
+	 */
+	if (mode->clock > 297000)
+		return MODE_CLOCK_HIGH;
+
+	return MODE_OK;
+}
+
 static int rcar_hdmi_phy_configure(struct dw_hdmi *hdmi,
 				   const struct dw_hdmi_plat_data *pdata,
 				   unsigned long mpixelclock)
@@ -63,6 +77,7 @@ static int rcar_hdmi_phy_configure(struct dw_hdmi *hdmi,
 }
 
 static const struct dw_hdmi_plat_data rcar_dw_hdmi_plat_data = {
+	.mode_valid = rcar_hdmi_mode_valid,
 	.configure_phy	= rcar_hdmi_phy_configure,
 };
 
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 12/32] drm: rcar-du: Refactor Feature and Quirk definitions
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (10 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 11/32] drm: rcar-du: dw-hdmi: Reject modes with a too high clock frequency Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 13/32] drm: rcar-du: Add interlaced feature flag Fabrizio Castro
                   ` (20 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

commit c14f63abebb3e393eede4fff2b0c448d42b085e9 upstream.

These flags are represented by bit fields. To make this clear, utilise
the BIT() macro.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_drv.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.h b/drivers/gpu/drm/rcar-du/rcar_du_drv.h
index b3a25e8..78ea20a 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.h
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.h
@@ -27,11 +27,11 @@ struct drm_device;
 struct drm_fbdev_cma;
 struct rcar_du_device;
 
-#define RCAR_DU_FEATURE_CRTC_IRQ_CLOCK	(1 << 0)	/* Per-CRTC IRQ and clock */
-#define RCAR_DU_FEATURE_EXT_CTRL_REGS	(1 << 1)	/* Has extended control registers */
-#define RCAR_DU_FEATURE_VSP1_SOURCE	(1 << 2)	/* Has inputs from VSP1 */
+#define RCAR_DU_FEATURE_CRTC_IRQ_CLOCK	BIT(0)	/* Per-CRTC IRQ and clock */
+#define RCAR_DU_FEATURE_EXT_CTRL_REGS	BIT(1)	/* Has extended control registers */
+#define RCAR_DU_FEATURE_VSP1_SOURCE	BIT(2)	/* Has inputs from VSP1 */
 
-#define RCAR_DU_QUIRK_ALIGN_128B	(1 << 0)	/* Align pitches to 128 bytes */
+#define RCAR_DU_QUIRK_ALIGN_128B	BIT(0)	/* Align pitches to 128 bytes */
 
 /*
  * struct rcar_du_output_routing - Output routing specification
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 13/32] drm: rcar-du: Add interlaced feature flag
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (11 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 12/32] drm: rcar-du: Refactor Feature and Quirk definitions Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 14/32] drm: rcar-du: Cache DSYSR value to ensure known initial value Fabrizio Castro
                   ` (19 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

commit c6e3194a3b55a9365e40c3a25f8e31afa154c26c upstream.

Upcoming implementations of the R-Car DU have removed support for
interlaced display pipelines. Provide a means to determine this based on
the feature flags of the hardware configuration structs.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 14 ++++++++++++++
 drivers/gpu/drm/rcar-du/rcar_du_drv.c  | 32 +++++++++++++++++++++-----------
 drivers/gpu/drm/rcar-du/rcar_du_drv.h  |  1 +
 3 files changed, 36 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
index 15dc9ca..4b43d83 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
@@ -684,11 +684,25 @@ static void rcar_du_crtc_atomic_flush(struct drm_crtc *crtc,
 		rcar_du_vsp_atomic_flush(rcrtc);
 }
 
+enum drm_mode_status rcar_du_crtc_mode_valid(struct drm_crtc *crtc,
+				   const struct drm_display_mode *mode)
+{
+	struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc);
+	struct rcar_du_device *rcdu = rcrtc->group->dev;
+	bool interlaced = mode->flags & DRM_MODE_FLAG_INTERLACE;
+
+	if (interlaced && !rcar_du_has(rcdu, RCAR_DU_FEATURE_INTERLACED))
+		return MODE_NO_INTERLACE;
+
+	return MODE_OK;
+}
+
 static const struct drm_crtc_helper_funcs crtc_helper_funcs = {
 	.atomic_begin = rcar_du_crtc_atomic_begin,
 	.atomic_flush = rcar_du_crtc_atomic_flush,
 	.atomic_enable = rcar_du_crtc_atomic_enable,
 	.atomic_disable = rcar_du_crtc_atomic_disable,
+	.mode_valid = rcar_du_crtc_mode_valid,
 };
 
 static struct drm_crtc_state *
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index dfa09cf..3f0cbc4 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -39,7 +39,8 @@
 static const struct rcar_du_device_info rzg1_du_r8a7743_info = {
 	.gen = 2,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
-		  | RCAR_DU_FEATURE_EXT_CTRL_REGS,
+		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
+		  | RCAR_DU_FEATURE_INTERLACED,
 	.channels_mask = BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -60,7 +61,8 @@ static const struct rcar_du_device_info rzg1_du_r8a7743_info = {
 static const struct rcar_du_device_info rzg1_du_r8a7745_info = {
 	.gen = 2,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
-		  | RCAR_DU_FEATURE_EXT_CTRL_REGS,
+		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
+		  | RCAR_DU_FEATURE_INTERLACED,
 	.channels_mask = BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -108,7 +110,7 @@ static const struct rcar_du_device_info rcar_du_r8a774a1_info = {
 
 static const struct rcar_du_device_info rcar_du_r8a7779_info = {
 	.gen = 2,
-	.features = 0,
+	.features = RCAR_DU_FEATURE_INTERLACED,
 	.channels_mask = BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -129,7 +131,8 @@ static const struct rcar_du_device_info rcar_du_r8a7779_info = {
 static const struct rcar_du_device_info rcar_du_r8a7790_info = {
 	.gen = 2,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
-		  | RCAR_DU_FEATURE_EXT_CTRL_REGS,
+		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
+		  | RCAR_DU_FEATURE_INTERLACED,
 	.quirks = RCAR_DU_QUIRK_ALIGN_128B,
 	.channels_mask = BIT(2) | BIT(1) | BIT(0),
 	.routes = {
@@ -157,7 +160,8 @@ static const struct rcar_du_device_info rcar_du_r8a7790_info = {
 static const struct rcar_du_device_info rcar_du_r8a7791_info = {
 	.gen = 2,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
-		  | RCAR_DU_FEATURE_EXT_CTRL_REGS,
+		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
+		  | RCAR_DU_FEATURE_INTERLACED,
 	.channels_mask = BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -179,7 +183,8 @@ static const struct rcar_du_device_info rcar_du_r8a7791_info = {
 static const struct rcar_du_device_info rcar_du_r8a7792_info = {
 	.gen = 2,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
-		  | RCAR_DU_FEATURE_EXT_CTRL_REGS,
+		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
+		  | RCAR_DU_FEATURE_INTERLACED,
 	.channels_mask = BIT(1) | BIT(0),
 	.routes = {
 		/* R8A7792 has two RGB outputs. */
@@ -197,7 +202,8 @@ static const struct rcar_du_device_info rcar_du_r8a7792_info = {
 static const struct rcar_du_device_info rcar_du_r8a7794_info = {
 	.gen = 2,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
-		  | RCAR_DU_FEATURE_EXT_CTRL_REGS,
+		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
+		  | RCAR_DU_FEATURE_INTERLACED,
 	.channels_mask = BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -219,7 +225,8 @@ static const struct rcar_du_device_info rcar_du_r8a7795_info = {
 	.gen = 3,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
-		  | RCAR_DU_FEATURE_VSP1_SOURCE,
+		  | RCAR_DU_FEATURE_VSP1_SOURCE
+		  | RCAR_DU_FEATURE_INTERLACED,
 	.channels_mask = BIT(3) | BIT(2) | BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -251,7 +258,8 @@ static const struct rcar_du_device_info rcar_du_r8a7796_info = {
 	.gen = 3,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
-		  | RCAR_DU_FEATURE_VSP1_SOURCE,
+		  | RCAR_DU_FEATURE_VSP1_SOURCE
+		  | RCAR_DU_FEATURE_INTERLACED,
 	.channels_mask = BIT(2) | BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -279,7 +287,8 @@ static const struct rcar_du_device_info rcar_du_r8a77965_info = {
 	.gen = 3,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
-		  | RCAR_DU_FEATURE_VSP1_SOURCE,
+		  | RCAR_DU_FEATURE_VSP1_SOURCE
+		  | RCAR_DU_FEATURE_INTERLACED,
 	.channels_mask = BIT(3) | BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -307,7 +316,8 @@ static const struct rcar_du_device_info rcar_du_r8a77970_info = {
 	.gen = 3,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
-		  | RCAR_DU_FEATURE_VSP1_SOURCE,
+		  | RCAR_DU_FEATURE_VSP1_SOURCE
+		  | RCAR_DU_FEATURE_INTERLACED,
 	.channels_mask = BIT(0),
 	.routes = {
 		/* R8A77970 has one RGB output and one LVDS output. */
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.h b/drivers/gpu/drm/rcar-du/rcar_du_drv.h
index 78ea20a..c4a6613 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.h
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.h
@@ -30,6 +30,7 @@ struct rcar_du_device;
 #define RCAR_DU_FEATURE_CRTC_IRQ_CLOCK	BIT(0)	/* Per-CRTC IRQ and clock */
 #define RCAR_DU_FEATURE_EXT_CTRL_REGS	BIT(1)	/* Has extended control registers */
 #define RCAR_DU_FEATURE_VSP1_SOURCE	BIT(2)	/* Has inputs from VSP1 */
+#define RCAR_DU_FEATURE_INTERLACED	BIT(3)	/* HW supports interlaced */
 
 #define RCAR_DU_QUIRK_ALIGN_128B	BIT(0)	/* Align pitches to 128 bytes */
 
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 14/32] drm: rcar-du: Cache DSYSR value to ensure known initial value
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (12 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 13/32] drm: rcar-du: Add interlaced feature flag Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 15/32] drm: rcar-du: Don't use TV sync mode when not supported by the hardware Fabrizio Castro
                   ` (18 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

commit 9144adc5e5a99577bce0d4ee2ca3615f53b9d296 upstream.

DSYSR is a DU channel register that also contains group fields. It is
thus written to by both the group and CRTC code, using read-update-write
sequences. As the register isn't initialized explicitly at startup time,
this can lead to invalid or otherwise unexpected values being written to
some of the fields if they have been modified by the firmware or just
not reset properly.

To fix this we can write a fully known value to the DSYSR register when
turning a channel's functional clock on. However, the mix of group and
channel fields complicate this. A simpler solution is to cache the
register and initialize the cached value to the desired hardware
defaults.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c  | 16 ++++++++--------
 drivers/gpu/drm/rcar-du/rcar_du_crtc.h  |  5 +++++
 drivers/gpu/drm/rcar-du/rcar_du_group.c |  7 ++++---
 3 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
index 4b43d83..f2f6322 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
@@ -61,13 +61,12 @@ static void rcar_du_crtc_set(struct rcar_du_crtc *rcrtc, u32 reg, u32 set)
 		      rcar_du_read(rcdu, rcrtc->mmio_offset + reg) | set);
 }
 
-static void rcar_du_crtc_clr_set(struct rcar_du_crtc *rcrtc, u32 reg,
-				 u32 clr, u32 set)
+void rcar_du_crtc_dsysr_clr_set(struct rcar_du_crtc *rcrtc, u32 clr, u32 set)
 {
 	struct rcar_du_device *rcdu = rcrtc->group->dev;
-	u32 value = rcar_du_read(rcdu, rcrtc->mmio_offset + reg);
 
-	rcar_du_write(rcdu, rcrtc->mmio_offset + reg, (value & ~clr) | set);
+	rcrtc->dsysr = (rcrtc->dsysr & ~clr) | set;
+	rcar_du_write(rcdu, rcrtc->mmio_offset + DSYSR, rcrtc->dsysr);
 }
 
 static int rcar_du_crtc_get(struct rcar_du_crtc *rcrtc)
@@ -525,9 +524,9 @@ static void rcar_du_crtc_start(struct rcar_du_crtc *rcrtc)
 	 * actively driven).
 	 */
 	interlaced = rcrtc->crtc.mode.flags & DRM_MODE_FLAG_INTERLACE;
-	rcar_du_crtc_clr_set(rcrtc, DSYSR, DSYSR_TVM_MASK | DSYSR_SCM_MASK,
-			     (interlaced ? DSYSR_SCM_INT_VIDEO : 0) |
-			     DSYSR_TVM_MASTER);
+	rcar_du_crtc_dsysr_clr_set(rcrtc, DSYSR_TVM_MASK | DSYSR_SCM_MASK,
+				   (interlaced ? DSYSR_SCM_INT_VIDEO : 0) |
+				   DSYSR_TVM_MASTER);
 
 	rcar_du_group_start_stop(rcrtc->group, true);
 }
@@ -594,7 +593,7 @@ static void rcar_du_crtc_stop(struct rcar_du_crtc *rcrtc)
 	 * Select switch sync mode. This stops display operation and configures
 	 * the HSYNC and VSYNC signals as inputs.
 	 */
-	rcar_du_crtc_clr_set(rcrtc, DSYSR, DSYSR_TVM_MASK, DSYSR_TVM_SWITCH);
+	rcar_du_crtc_dsysr_clr_set(rcrtc, DSYSR_TVM_MASK, DSYSR_TVM_SWITCH);
 
 	rcar_du_group_start_stop(rcrtc->group, false);
 }
@@ -972,6 +971,7 @@ int rcar_du_crtc_create(struct rcar_du_group *rgrp, unsigned int swindex,
 	rcrtc->group = rgrp;
 	rcrtc->mmio_offset = mmio_offsets[hwindex];
 	rcrtc->index = hwindex;
+	rcrtc->dsysr = (rcrtc->index % 2 ? 0 : DSYSR_DRES) | DSYSR_TVM_TVSYNC;
 
 	if (rcar_du_has(rcdu, RCAR_DU_FEATURE_VSP1_SOURCE))
 		primary = &rcrtc->vsp->planes[rcrtc->vsp_pipe].plane;
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.h b/drivers/gpu/drm/rcar-du/rcar_du_crtc.h
index 7680cb2..2c1eaa3 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.h
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.h
@@ -34,6 +34,7 @@ struct rcar_du_vsp;
  * @mmio_offset: offset of the CRTC registers in the DU MMIO block
  * @index: CRTC software and hardware index
  * @initialized: whether the CRTC has been initialized and clocks enabled
+ * @dsysr: cached value of the DSYSR register
  * @vblank_enable: whether vblank events are enabled on this CRTC
  * @event: event to post when the pending page flip completes
  * @flip_wait: wait queue used to signal page flip completion
@@ -54,6 +55,8 @@ struct rcar_du_crtc {
 	unsigned int index;
 	bool initialized;
 
+	u32 dsysr;
+
 	bool vblank_enable;
 	struct drm_pending_vblank_event *event;
 	wait_queue_head_t flip_wait;
@@ -104,4 +107,6 @@ void rcar_du_crtc_route_output(struct drm_crtc *crtc,
 			       enum rcar_du_output output);
 void rcar_du_crtc_finish_page_flip(struct rcar_du_crtc *rcrtc);
 
+void rcar_du_crtc_dsysr_clr_set(struct rcar_du_crtc *rcrtc, u32 clr, u32 set);
+
 #endif /* __RCAR_DU_CRTC_H__ */
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_group.c b/drivers/gpu/drm/rcar-du/rcar_du_group.c
index d539cb2..5966d94 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_group.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_group.c
@@ -177,9 +177,10 @@ void rcar_du_group_put(struct rcar_du_group *rgrp)
 
 static void __rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start)
 {
-	rcar_du_group_write(rgrp, DSYSR,
-		(rcar_du_group_read(rgrp, DSYSR) & ~(DSYSR_DRES | DSYSR_DEN)) |
-		(start ? DSYSR_DEN : DSYSR_DRES));
+	struct rcar_du_crtc *rcrtc = &rgrp->dev->crtcs[rgrp->index * 2];
+
+	rcar_du_crtc_dsysr_clr_set(rcrtc, DSYSR_DRES | DSYSR_DEN,
+				   start ? DSYSR_DEN : DSYSR_DRES);
 }
 
 void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start)
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 15/32] drm: rcar-du: Don't use TV sync mode when not supported by the hardware
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (13 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 14/32] drm: rcar-du: Cache DSYSR value to ensure known initial value Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 16/32] drm: rcar-du: Support interlaced video output through vsp1 Fabrizio Castro
                   ` (17 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

commit ffd15c3e7898cfb6d2a986b2aa8014ad7dc9e333 upstream.

The official way to stop the display is to clear the display enable
(DEN) bit in the DSYSR register, but that operates at a group level and
affects the two channels in the group. To disable channels selectively,
the driver uses TV sync mode that stops display operation on the channel
and turns output signals into inputs.

While TV sync mode is available in all DU models currently supported,
the D3 and E3 DUs don't support it. We will thus need to find an
alternative way to turn channels off.

In the meantime, condition the switch to TV sync mode to the
availability of the feature, to avoid writing an invalid value to the
DSYSR register. When the feature is unavailable the display output will
turn blank as all planes are disabled when stopping the CRTC.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c |  7 ++++++-
 drivers/gpu/drm/rcar-du/rcar_du_drv.c  | 33 ++++++++++++++++++++++-----------
 drivers/gpu/drm/rcar-du/rcar_du_drv.h  |  1 +
 3 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
index f2f6322..9e5d00a 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
@@ -592,8 +592,13 @@ static void rcar_du_crtc_stop(struct rcar_du_crtc *rcrtc)
 	/*
 	 * Select switch sync mode. This stops display operation and configures
 	 * the HSYNC and VSYNC signals as inputs.
+	 *
+	 * TODO: Find another way to stop the display for DUs that don't support
+	 * TVM sync.
 	 */
-	rcar_du_crtc_dsysr_clr_set(rcrtc, DSYSR_TVM_MASK, DSYSR_TVM_SWITCH);
+	if (rcar_du_has(rcrtc->group->dev, RCAR_DU_FEATURE_TVM_SYNC))
+		rcar_du_crtc_dsysr_clr_set(rcrtc, DSYSR_TVM_MASK,
+					   DSYSR_TVM_SWITCH);
 
 	rcar_du_group_start_stop(rcrtc->group, false);
 }
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index 3f0cbc4..ba360e4 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -40,7 +40,8 @@ static const struct rcar_du_device_info rzg1_du_r8a7743_info = {
 	.gen = 2,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
-		  | RCAR_DU_FEATURE_INTERLACED,
+		  | RCAR_DU_FEATURE_INTERLACED
+		  | RCAR_DU_FEATURE_TVM_SYNC,
 	.channels_mask = BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -62,7 +63,8 @@ static const struct rcar_du_device_info rzg1_du_r8a7745_info = {
 	.gen = 2,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
-		  | RCAR_DU_FEATURE_INTERLACED,
+		  | RCAR_DU_FEATURE_INTERLACED
+		  | RCAR_DU_FEATURE_TVM_SYNC,
 	.channels_mask = BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -110,7 +112,8 @@ static const struct rcar_du_device_info rcar_du_r8a774a1_info = {
 
 static const struct rcar_du_device_info rcar_du_r8a7779_info = {
 	.gen = 2,
-	.features = RCAR_DU_FEATURE_INTERLACED,
+	.features = RCAR_DU_FEATURE_INTERLACED
+		  | RCAR_DU_FEATURE_TVM_SYNC,
 	.channels_mask = BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -132,7 +135,8 @@ static const struct rcar_du_device_info rcar_du_r8a7790_info = {
 	.gen = 2,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
-		  | RCAR_DU_FEATURE_INTERLACED,
+		  | RCAR_DU_FEATURE_INTERLACED
+		  | RCAR_DU_FEATURE_TVM_SYNC,
 	.quirks = RCAR_DU_QUIRK_ALIGN_128B,
 	.channels_mask = BIT(2) | BIT(1) | BIT(0),
 	.routes = {
@@ -161,7 +165,8 @@ static const struct rcar_du_device_info rcar_du_r8a7791_info = {
 	.gen = 2,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
-		  | RCAR_DU_FEATURE_INTERLACED,
+		  | RCAR_DU_FEATURE_INTERLACED
+		  | RCAR_DU_FEATURE_TVM_SYNC,
 	.channels_mask = BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -184,7 +189,8 @@ static const struct rcar_du_device_info rcar_du_r8a7792_info = {
 	.gen = 2,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
-		  | RCAR_DU_FEATURE_INTERLACED,
+		  | RCAR_DU_FEATURE_INTERLACED
+		  | RCAR_DU_FEATURE_TVM_SYNC,
 	.channels_mask = BIT(1) | BIT(0),
 	.routes = {
 		/* R8A7792 has two RGB outputs. */
@@ -203,7 +209,8 @@ static const struct rcar_du_device_info rcar_du_r8a7794_info = {
 	.gen = 2,
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
-		  | RCAR_DU_FEATURE_INTERLACED,
+		  | RCAR_DU_FEATURE_INTERLACED
+		  | RCAR_DU_FEATURE_TVM_SYNC,
 	.channels_mask = BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -226,7 +233,8 @@ static const struct rcar_du_device_info rcar_du_r8a7795_info = {
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
 		  | RCAR_DU_FEATURE_VSP1_SOURCE
-		  | RCAR_DU_FEATURE_INTERLACED,
+		  | RCAR_DU_FEATURE_INTERLACED
+		  | RCAR_DU_FEATURE_TVM_SYNC,
 	.channels_mask = BIT(3) | BIT(2) | BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -259,7 +267,8 @@ static const struct rcar_du_device_info rcar_du_r8a7796_info = {
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
 		  | RCAR_DU_FEATURE_VSP1_SOURCE
-		  | RCAR_DU_FEATURE_INTERLACED,
+		  | RCAR_DU_FEATURE_INTERLACED
+		  | RCAR_DU_FEATURE_TVM_SYNC,
 	.channels_mask = BIT(2) | BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -288,7 +297,8 @@ static const struct rcar_du_device_info rcar_du_r8a77965_info = {
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
 		  | RCAR_DU_FEATURE_VSP1_SOURCE
-		  | RCAR_DU_FEATURE_INTERLACED,
+		  | RCAR_DU_FEATURE_INTERLACED
+		  | RCAR_DU_FEATURE_TVM_SYNC,
 	.channels_mask = BIT(3) | BIT(1) | BIT(0),
 	.routes = {
 		/*
@@ -317,7 +327,8 @@ static const struct rcar_du_device_info rcar_du_r8a77970_info = {
 	.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
 		  | RCAR_DU_FEATURE_EXT_CTRL_REGS
 		  | RCAR_DU_FEATURE_VSP1_SOURCE
-		  | RCAR_DU_FEATURE_INTERLACED,
+		  | RCAR_DU_FEATURE_INTERLACED
+		  | RCAR_DU_FEATURE_TVM_SYNC,
 	.channels_mask = BIT(0),
 	.routes = {
 		/* R8A77970 has one RGB output and one LVDS output. */
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.h b/drivers/gpu/drm/rcar-du/rcar_du_drv.h
index c4a6613..970c077 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.h
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.h
@@ -31,6 +31,7 @@ struct rcar_du_device;
 #define RCAR_DU_FEATURE_EXT_CTRL_REGS	BIT(1)	/* Has extended control registers */
 #define RCAR_DU_FEATURE_VSP1_SOURCE	BIT(2)	/* Has inputs from VSP1 */
 #define RCAR_DU_FEATURE_INTERLACED	BIT(3)	/* HW supports interlaced */
+#define RCAR_DU_FEATURE_TVM_SYNC	BIT(4)	/* Has TV switch/sync modes */
 
 #define RCAR_DU_QUIRK_ALIGN_128B	BIT(0)	/* Align pitches to 128 bytes */
 
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 16/32] drm: rcar-du: Support interlaced video output through vsp1
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (14 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 15/32] drm: rcar-du: Don't use TV sync mode when not supported by the hardware Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 17/32] drm: rcar-du: Rework clock configuration based on hardware limits Fabrizio Castro
                   ` (16 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

commit 4e86c208ddf2da6683a0ee6f8696a9f1b4444018 upstream.

Use the newly exposed VSP1 interface to enable interlaced frame support
through the VSP1 LIF pipelines.

The DSMR register is updated to set the ODEV flag on interlaced
pipelines, thus defining an interlaced stream as having the ODD field
located in the second half (BOTTOM) of the frame buffer.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 1 +
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
index 9e5d00a..5441d5a 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
@@ -288,6 +288,7 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
 	/* Signal polarities */
 	value = ((mode->flags & DRM_MODE_FLAG_PVSYNC) ? DSMR_VSL : 0)
 	      | ((mode->flags & DRM_MODE_FLAG_PHSYNC) ? DSMR_HSL : 0)
+	      | ((mode->flags & DRM_MODE_FLAG_INTERLACE) ? DSMR_ODEV : 0)
 	      | DSMR_DIPM_DISP | DSMR_CSPM;
 	rcar_du_crtc_write(rcrtc, DSMR, value);
 
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
index 72eebed..a042f11 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
@@ -52,6 +52,7 @@ void rcar_du_vsp_enable(struct rcar_du_crtc *crtc)
 	struct vsp1_du_lif_config cfg = {
 		.width = mode->hdisplay,
 		.height = mode->vdisplay,
+		.interlaced = mode->flags & DRM_MODE_FLAG_INTERLACE,
 		.callback = rcar_du_vsp_complete,
 		.callback_data = crtc,
 	};
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 17/32] drm: rcar-du: Rework clock configuration based on hardware limits
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (15 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 16/32] drm: rcar-du: Support interlaced video output through vsp1 Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 18/32] drm: rcar-du: Rename and document dpll_ch field Fabrizio Castro
                   ` (15 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

commit 7281e6c6a5bdbde9cae6eb3c6d2bf2706b94807d upstream.

The DU channels that have a display PLL (DPLL) can only use external
clock sources, and don't have an internal clock divider (with the
exception of H3 ES1.x where the post-divider is present and needs to be
used as a workaround for a DPLL silicon issue).

Rework the clock configuration to take this into account, avoiding
selection of non-existing clock sources or usage of a missing
post-divider.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 134 ++++++++++++++++++---------------
 1 file changed, 73 insertions(+), 61 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
index 5441d5a..342519c 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
@@ -207,78 +207,90 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
 	const struct drm_display_mode *mode = &rcrtc->crtc.state->adjusted_mode;
 	struct rcar_du_device *rcdu = rcrtc->group->dev;
 	unsigned long mode_clock = mode->clock * 1000;
-	unsigned long clk;
-	u32 value;
+	u32 dsmr;
 	u32 escr;
-	u32 div;
 
-	/*
-	 * Compute the clock divisor and select the internal or external dot
-	 * clock based on the requested frequency.
-	 */
-	clk = clk_get_rate(rcrtc->clock);
-	div = DIV_ROUND_CLOSEST(clk, mode_clock);
-	div = clamp(div, 1U, 64U) - 1;
-	escr = div | ESCR_DCLKSEL_CLKS;
-
-	if (rcrtc->extclock) {
+	if (rcdu->info->dpll_ch & (1 << rcrtc->index)) {
+		unsigned long target = mode_clock;
 		struct dpll_info dpll = { 0 };
 		unsigned long extclk;
-		unsigned long extrate;
-		unsigned long rate;
-		u32 extdiv;
+		u32 dpllcr;
+		u32 div = 0;
 
-		extclk = clk_get_rate(rcrtc->extclock);
-		if (rcdu->info->dpll_ch & (1 << rcrtc->index)) {
-			unsigned long target = mode_clock;
+		/*
+		 * DU channels that have a display PLL can't use the internal
+		 * system clock, and have no internal clock divider.
+		 */
 
-			/*
-			 * The H3 ES1.x exhibits dot clock duty cycle stability
-			 * issues. We can work around them by configuring the
-			 * DPLL to twice the desired frequency, coupled with a
-			 * /2 post-divider. This isn't needed on other SoCs and
-			 * breaks HDMI output on M3-W for a currently unknown
-			 * reason, so restrict the workaround to H3 ES1.x.
-			 */
-			if (soc_device_match(rcar_du_r8a7795_es1))
-				target *= 2;
+		if (WARN_ON(!rcrtc->extclock))
+			return;
 
-			rcar_du_dpll_divider(rcrtc, &dpll, extclk, target);
-			extclk = dpll.output;
+		/*
+		 * The H3 ES1.x exhibits dot clock duty cycle stability issues.
+		 * We can work around them by configuring the DPLL to twice the
+		 * desired frequency, coupled with a /2 post-divider. Restrict
+		 * the workaround to H3 ES1.x as ES2.0 and all other SoCs have
+		 * no post-divider when a display PLL is present (as shown by
+		 * the workaround breaking HDMI output on M3-W during testing).
+		 */
+		if (soc_device_match(rcar_du_r8a7795_es1)) {
+			target *= 2;
+			div = 1;
 		}
 
-		extdiv = DIV_ROUND_CLOSEST(extclk, mode_clock);
-		extdiv = clamp(extdiv, 1U, 64U) - 1;
+		extclk = clk_get_rate(rcrtc->extclock);
+		rcar_du_dpll_divider(rcrtc, &dpll, extclk, target);
 
-		rate = clk / (div + 1);
-		extrate = extclk / (extdiv + 1);
+		dpllcr = DPLLCR_CODE | DPLLCR_CLKE
+		       | DPLLCR_FDPLL(dpll.fdpll)
+		       | DPLLCR_N(dpll.n) | DPLLCR_M(dpll.m)
+		       | DPLLCR_STBY;
 
-		if (abs((long)extrate - (long)mode_clock) <
-		    abs((long)rate - (long)mode_clock)) {
+		if (rcrtc->index == 1)
+			dpllcr |= DPLLCR_PLCS1
+			       |  DPLLCR_INCS_DOTCLKIN1;
+		else
+			dpllcr |= DPLLCR_PLCS0
+			       |  DPLLCR_INCS_DOTCLKIN0;
 
-			if (rcdu->info->dpll_ch & (1 << rcrtc->index)) {
-				u32 dpllcr = DPLLCR_CODE | DPLLCR_CLKE
-					   | DPLLCR_FDPLL(dpll.fdpll)
-					   | DPLLCR_N(dpll.n) | DPLLCR_M(dpll.m)
-					   | DPLLCR_STBY;
+		rcar_du_group_write(rcrtc->group, DPLLCR, dpllcr);
 
-				if (rcrtc->index == 1)
-					dpllcr |= DPLLCR_PLCS1
-					       |  DPLLCR_INCS_DOTCLKIN1;
-				else
-					dpllcr |= DPLLCR_PLCS0
-					       |  DPLLCR_INCS_DOTCLKIN0;
+		escr = ESCR_DCLKSEL_DCLKIN | div;
+	} else {
+		unsigned long clk;
+		u32 div;
 
-				rcar_du_group_write(rcrtc->group, DPLLCR,
-						    dpllcr);
-			}
+		/*
+		 * Compute the clock divisor and select the internal or external
+		 * dot clock based on the requested frequency.
+		 */
+		clk = clk_get_rate(rcrtc->clock);
+		div = DIV_ROUND_CLOSEST(clk, mode_clock);
+		div = clamp(div, 1U, 64U) - 1;
 
-			escr = ESCR_DCLKSEL_DCLKIN | extdiv;
-		}
+		escr = ESCR_DCLKSEL_CLKS | div;
 
-		dev_dbg(rcrtc->group->dev->dev,
-			"mode clock %lu extrate %lu rate %lu ESCR 0x%08x\n",
-			mode_clock, extrate, rate, escr);
+		if (rcrtc->extclock) {
+			unsigned long extclk;
+			unsigned long extrate;
+			unsigned long rate;
+			u32 extdiv;
+
+			extclk = clk_get_rate(rcrtc->extclock);
+			extdiv = DIV_ROUND_CLOSEST(extclk, mode_clock);
+			extdiv = clamp(extdiv, 1U, 64U) - 1;
+
+			extrate = extclk / (extdiv + 1);
+			rate = clk / (div + 1);
+
+			if (abs((long)extrate - (long)mode_clock) <
+			    abs((long)rate - (long)mode_clock))
+				escr = ESCR_DCLKSEL_DCLKIN | extdiv;
+
+			dev_dbg(rcrtc->group->dev->dev,
+				"mode clock %lu extrate %lu rate %lu ESCR 0x%08x\n",
+				mode_clock, extrate, rate, escr);
+		}
 	}
 
 	rcar_du_group_write(rcrtc->group, rcrtc->index % 2 ? ESCR2 : ESCR,
@@ -286,11 +298,11 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
 	rcar_du_group_write(rcrtc->group, rcrtc->index % 2 ? OTAR2 : OTAR, 0);
 
 	/* Signal polarities */
-	value = ((mode->flags & DRM_MODE_FLAG_PVSYNC) ? DSMR_VSL : 0)
-	      | ((mode->flags & DRM_MODE_FLAG_PHSYNC) ? DSMR_HSL : 0)
-	      | ((mode->flags & DRM_MODE_FLAG_INTERLACE) ? DSMR_ODEV : 0)
-	      | DSMR_DIPM_DISP | DSMR_CSPM;
-	rcar_du_crtc_write(rcrtc, DSMR, value);
+	dsmr = ((mode->flags & DRM_MODE_FLAG_PVSYNC) ? DSMR_VSL : 0)
+	     | ((mode->flags & DRM_MODE_FLAG_PHSYNC) ? DSMR_HSL : 0)
+	     | ((mode->flags & DRM_MODE_FLAG_INTERLACE) ? DSMR_ODEV : 0)
+	     | DSMR_DIPM_DISP | DSMR_CSPM;
+	rcar_du_crtc_write(rcrtc, DSMR, dsmr);
 
 	/* Display timings */
 	rcar_du_crtc_write(rcrtc, HDSR, mode->htotal - mode->hsync_start - 19);
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 18/32] drm: rcar-du: Rename and document dpll_ch field
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (16 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 17/32] drm: rcar-du: Rework clock configuration based on hardware limits Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 19/32] drm: rcar-du: Add support for missing pixel formats Fabrizio Castro
                   ` (14 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Jacopo Mondi <jacopo+renesas@jmondi.org>

commit 9fe50e64fac7a7301f82e31dbd87a4145384005e upstream.

Document and re-name the 'dpll_ch' field to a more precise 'dpll_mask' for
consistency with the 'channels_mask' field defined in 'struct
rcar_du_device_info'.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 2 +-
 drivers/gpu/drm/rcar-du/rcar_du_drv.c  | 6 +++---
 drivers/gpu/drm/rcar-du/rcar_du_drv.h  | 3 ++-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
index 342519c..107cbf2 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
@@ -210,7 +210,7 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
 	u32 dsmr;
 	u32 escr;
 
-	if (rcdu->info->dpll_ch & (1 << rcrtc->index)) {
+	if (rcdu->info->dpll_mask & (1 << rcrtc->index)) {
 		unsigned long target = mode_clock;
 		struct dpll_info dpll = { 0 };
 		unsigned long extclk;
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index ba360e4..5380f0e 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -259,7 +259,7 @@ static const struct rcar_du_device_info rcar_du_r8a7795_info = {
 		},
 	},
 	.num_lvds = 1,
-	.dpll_ch =  BIT(2) | BIT(1),
+	.dpll_mask =  BIT(2) | BIT(1),
 };
 
 static const struct rcar_du_device_info rcar_du_r8a7796_info = {
@@ -289,7 +289,7 @@ static const struct rcar_du_device_info rcar_du_r8a7796_info = {
 		},
 	},
 	.num_lvds = 1,
-	.dpll_ch =  BIT(1),
+	.dpll_mask =  BIT(1),
 };
 
 static const struct rcar_du_device_info rcar_du_r8a77965_info = {
@@ -319,7 +319,7 @@ static const struct rcar_du_device_info rcar_du_r8a77965_info = {
 		},
 	},
 	.num_lvds = 1,
-	.dpll_ch =  BIT(1),
+	.dpll_mask =  BIT(1),
 };
 
 static const struct rcar_du_device_info rcar_du_r8a77970_info = {
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.h b/drivers/gpu/drm/rcar-du/rcar_du_drv.h
index 970c077..a6e6316 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.h
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.h
@@ -57,6 +57,7 @@ struct rcar_du_output_routing {
  * @channels_mask: bit mask of available DU channels
  * @routes: array of CRTC to output routes, indexed by output (RCAR_DU_OUTPUT_*)
  * @num_lvds: number of internal LVDS encoders
+ * @dpll_mask: bit mask of DU channels equipped with a DPLL
  */
 struct rcar_du_device_info {
 	unsigned int gen;
@@ -65,7 +66,7 @@ struct rcar_du_device_info {
 	unsigned int channels_mask;
 	struct rcar_du_output_routing routes[RCAR_DU_OUTPUT_MAX];
 	unsigned int num_lvds;
-	unsigned int dpll_ch;
+	unsigned int dpll_mask;
 };
 
 #define RCAR_DU_MAX_CRTCS		4
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 19/32] drm: rcar-du: Add support for missing pixel formats
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (17 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 18/32] drm: rcar-du: Rename and document dpll_ch field Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 20/32] drm: rcar-du: Store V4L2 fourcc in rcar_du_format_info structure Fabrizio Castro
                   ` (13 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Koji Matsuoka <koji.matsuoka.xm@renesas.com>

commit 0f35b25b87923394cd9048a199d05e994fbf8bae upstream.

This patch supports pixel format of RGB332, ARGB4444, XRGB4444,
BGR888, RGB888, BGRA8888, BGRX8888 and YVYU.
VYUY pixel format is not supported by H/W specification.

Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[Reordered formats with RGB first]
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_kms.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
index 0386b45..c5428c3 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
@@ -101,6 +101,38 @@ static const struct rcar_du_format_info rcar_du_format_infos[] = {
 	 * associated .pnmr or .edf settings.
 	 */
 	{
+		.fourcc = DRM_FORMAT_RGB332,
+		.bpp = 8,
+		.planes = 1,
+	}, {
+		.fourcc = DRM_FORMAT_ARGB4444,
+		.bpp = 16,
+		.planes = 1,
+	}, {
+		.fourcc = DRM_FORMAT_XRGB4444,
+		.bpp = 16,
+		.planes = 1,
+	}, {
+		.fourcc = DRM_FORMAT_BGR888,
+		.bpp = 24,
+		.planes = 1,
+	}, {
+		.fourcc = DRM_FORMAT_RGB888,
+		.bpp = 24,
+		.planes = 1,
+	}, {
+		.fourcc = DRM_FORMAT_BGRA8888,
+		.bpp = 32,
+		.planes = 1,
+	}, {
+		.fourcc = DRM_FORMAT_BGRX8888,
+		.bpp = 32,
+		.planes = 1,
+	}, {
+		.fourcc = DRM_FORMAT_YVYU,
+		.bpp = 16,
+		.planes = 1,
+	}, {
 		.fourcc = DRM_FORMAT_NV61,
 		.bpp = 16,
 		.planes = 2,
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 20/32] drm: rcar-du: Store V4L2 fourcc in rcar_du_format_info structure
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (18 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 19/32] drm: rcar-du: Add support for missing pixel formats Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 21/32] drm: rcar-du: Update framebuffer pitch and alignment limits for Gen3 Fabrizio Castro
                   ` (12 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

commit d8a4ef2542cddfd843896662a624494a01ee59a7 upstream.

The mapping between DRM and V4L2 fourcc's is stored in two separate
tables in rcar_du_vsp.c. In order to make it reusable to implement
writeback support, move it to the rcar_du_format_info structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_kms.c | 25 +++++++++++++++++++
 drivers/gpu/drm/rcar-du/rcar_du_kms.h |  1 +
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 45 +++++------------------------------
 3 files changed, 32 insertions(+), 39 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
index c5428c3..d2094ae 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
@@ -37,60 +37,70 @@
 static const struct rcar_du_format_info rcar_du_format_infos[] = {
 	{
 		.fourcc = DRM_FORMAT_RGB565,
+		.v4l2 = V4L2_PIX_FMT_RGB565,
 		.bpp = 16,
 		.planes = 1,
 		.pnmr = PnMR_SPIM_TP | PnMR_DDDF_16BPP,
 		.edf = PnDDCR4_EDF_NONE,
 	}, {
 		.fourcc = DRM_FORMAT_ARGB1555,
+		.v4l2 = V4L2_PIX_FMT_ARGB555,
 		.bpp = 16,
 		.planes = 1,
 		.pnmr = PnMR_SPIM_ALP | PnMR_DDDF_ARGB,
 		.edf = PnDDCR4_EDF_NONE,
 	}, {
 		.fourcc = DRM_FORMAT_XRGB1555,
+		.v4l2 = V4L2_PIX_FMT_XRGB555,
 		.bpp = 16,
 		.planes = 1,
 		.pnmr = PnMR_SPIM_ALP | PnMR_DDDF_ARGB,
 		.edf = PnDDCR4_EDF_NONE,
 	}, {
 		.fourcc = DRM_FORMAT_XRGB8888,
+		.v4l2 = V4L2_PIX_FMT_XBGR32,
 		.bpp = 32,
 		.planes = 1,
 		.pnmr = PnMR_SPIM_TP | PnMR_DDDF_16BPP,
 		.edf = PnDDCR4_EDF_RGB888,
 	}, {
 		.fourcc = DRM_FORMAT_ARGB8888,
+		.v4l2 = V4L2_PIX_FMT_ABGR32,
 		.bpp = 32,
 		.planes = 1,
 		.pnmr = PnMR_SPIM_ALP | PnMR_DDDF_16BPP,
 		.edf = PnDDCR4_EDF_ARGB8888,
 	}, {
 		.fourcc = DRM_FORMAT_UYVY,
+		.v4l2 = V4L2_PIX_FMT_UYVY,
 		.bpp = 16,
 		.planes = 1,
 		.pnmr = PnMR_SPIM_TP_OFF | PnMR_DDDF_YC,
 		.edf = PnDDCR4_EDF_NONE,
 	}, {
 		.fourcc = DRM_FORMAT_YUYV,
+		.v4l2 = V4L2_PIX_FMT_YUYV,
 		.bpp = 16,
 		.planes = 1,
 		.pnmr = PnMR_SPIM_TP_OFF | PnMR_DDDF_YC,
 		.edf = PnDDCR4_EDF_NONE,
 	}, {
 		.fourcc = DRM_FORMAT_NV12,
+		.v4l2 = V4L2_PIX_FMT_NV12M,
 		.bpp = 12,
 		.planes = 2,
 		.pnmr = PnMR_SPIM_TP_OFF | PnMR_DDDF_YC,
 		.edf = PnDDCR4_EDF_NONE,
 	}, {
 		.fourcc = DRM_FORMAT_NV21,
+		.v4l2 = V4L2_PIX_FMT_NV21M,
 		.bpp = 12,
 		.planes = 2,
 		.pnmr = PnMR_SPIM_TP_OFF | PnMR_DDDF_YC,
 		.edf = PnDDCR4_EDF_NONE,
 	}, {
 		.fourcc = DRM_FORMAT_NV16,
+		.v4l2 = V4L2_PIX_FMT_NV16M,
 		.bpp = 16,
 		.planes = 2,
 		.pnmr = PnMR_SPIM_TP_OFF | PnMR_DDDF_YC,
@@ -102,62 +112,77 @@ static const struct rcar_du_format_info rcar_du_format_infos[] = {
 	 */
 	{
 		.fourcc = DRM_FORMAT_RGB332,
+		.v4l2 = V4L2_PIX_FMT_RGB332,
 		.bpp = 8,
 		.planes = 1,
 	}, {
 		.fourcc = DRM_FORMAT_ARGB4444,
+		.v4l2 = V4L2_PIX_FMT_ARGB444,
 		.bpp = 16,
 		.planes = 1,
 	}, {
 		.fourcc = DRM_FORMAT_XRGB4444,
+		.v4l2 = V4L2_PIX_FMT_XRGB444,
 		.bpp = 16,
 		.planes = 1,
 	}, {
 		.fourcc = DRM_FORMAT_BGR888,
+		.v4l2 = V4L2_PIX_FMT_RGB24,
 		.bpp = 24,
 		.planes = 1,
 	}, {
 		.fourcc = DRM_FORMAT_RGB888,
+		.v4l2 = V4L2_PIX_FMT_BGR24,
 		.bpp = 24,
 		.planes = 1,
 	}, {
 		.fourcc = DRM_FORMAT_BGRA8888,
+		.v4l2 = V4L2_PIX_FMT_ARGB32,
 		.bpp = 32,
 		.planes = 1,
 	}, {
 		.fourcc = DRM_FORMAT_BGRX8888,
+		.v4l2 = V4L2_PIX_FMT_XRGB32,
 		.bpp = 32,
 		.planes = 1,
 	}, {
 		.fourcc = DRM_FORMAT_YVYU,
+		.v4l2 = V4L2_PIX_FMT_YVYU,
 		.bpp = 16,
 		.planes = 1,
 	}, {
 		.fourcc = DRM_FORMAT_NV61,
+		.v4l2 = V4L2_PIX_FMT_NV61M,
 		.bpp = 16,
 		.planes = 2,
 	}, {
 		.fourcc = DRM_FORMAT_YUV420,
+		.v4l2 = V4L2_PIX_FMT_YUV420M,
 		.bpp = 12,
 		.planes = 3,
 	}, {
 		.fourcc = DRM_FORMAT_YVU420,
+		.v4l2 = V4L2_PIX_FMT_YVU420M,
 		.bpp = 12,
 		.planes = 3,
 	}, {
 		.fourcc = DRM_FORMAT_YUV422,
+		.v4l2 = V4L2_PIX_FMT_YUV422M,
 		.bpp = 16,
 		.planes = 3,
 	}, {
 		.fourcc = DRM_FORMAT_YVU422,
+		.v4l2 = V4L2_PIX_FMT_YVU422M,
 		.bpp = 16,
 		.planes = 3,
 	}, {
 		.fourcc = DRM_FORMAT_YUV444,
+		.v4l2 = V4L2_PIX_FMT_YUV444M,
 		.bpp = 24,
 		.planes = 3,
 	}, {
 		.fourcc = DRM_FORMAT_YVU444,
+		.v4l2 = V4L2_PIX_FMT_YVU444M,
 		.bpp = 24,
 		.planes = 3,
 	},
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.h b/drivers/gpu/drm/rcar-du/rcar_du_kms.h
index 07951d5..d0134b2 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_kms.h
+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.h
@@ -23,6 +23,7 @@ struct rcar_du_device;
 
 struct rcar_du_format_info {
 	u32 fourcc;
+	u32 v4l2;
 	unsigned int bpp;
 	unsigned int planes;
 	unsigned int pnmr;
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
index a042f11..e325c965 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
@@ -115,8 +115,7 @@ void rcar_du_vsp_atomic_flush(struct rcar_du_crtc *crtc)
 	vsp1_du_atomic_flush(crtc->vsp->vsp, crtc->vsp_pipe, &cfg);
 }
 
-/* Keep the two tables in sync. */
-static const u32 formats_kms[] = {
+static const u32 rcar_du_vsp_formats[] = {
 	DRM_FORMAT_RGB332,
 	DRM_FORMAT_ARGB4444,
 	DRM_FORMAT_XRGB4444,
@@ -145,41 +144,13 @@ static const u32 formats_kms[] = {
 	DRM_FORMAT_YVU444,
 };
 
-static const u32 formats_v4l2[] = {
-	V4L2_PIX_FMT_RGB332,
-	V4L2_PIX_FMT_ARGB444,
-	V4L2_PIX_FMT_XRGB444,
-	V4L2_PIX_FMT_ARGB555,
-	V4L2_PIX_FMT_XRGB555,
-	V4L2_PIX_FMT_RGB565,
-	V4L2_PIX_FMT_RGB24,
-	V4L2_PIX_FMT_BGR24,
-	V4L2_PIX_FMT_ARGB32,
-	V4L2_PIX_FMT_XRGB32,
-	V4L2_PIX_FMT_ABGR32,
-	V4L2_PIX_FMT_XBGR32,
-	V4L2_PIX_FMT_UYVY,
-	V4L2_PIX_FMT_VYUY,
-	V4L2_PIX_FMT_YUYV,
-	V4L2_PIX_FMT_YVYU,
-	V4L2_PIX_FMT_NV12M,
-	V4L2_PIX_FMT_NV21M,
-	V4L2_PIX_FMT_NV16M,
-	V4L2_PIX_FMT_NV61M,
-	V4L2_PIX_FMT_YUV420M,
-	V4L2_PIX_FMT_YVU420M,
-	V4L2_PIX_FMT_YUV422M,
-	V4L2_PIX_FMT_YVU422M,
-	V4L2_PIX_FMT_YUV444M,
-	V4L2_PIX_FMT_YVU444M,
-};
-
 static void rcar_du_vsp_plane_setup(struct rcar_du_vsp_plane *plane)
 {
 	struct rcar_du_vsp_plane_state *state =
 		to_rcar_vsp_plane_state(plane->plane.state);
 	struct rcar_du_crtc *crtc = to_rcar_crtc(state->state.crtc);
 	struct drm_framebuffer *fb = plane->plane.state->fb;
+	const struct rcar_du_format_info *format;
 	struct vsp1_du_atomic_config cfg = {
 		.pixelformat = 0,
 		.pitch = fb->pitches[0],
@@ -202,12 +173,8 @@ static void rcar_du_vsp_plane_setup(struct rcar_du_vsp_plane *plane)
 		cfg.mem[i] = sg_dma_address(state->sg_tables[i].sgl)
 			   + fb->offsets[i];
 
-	for (i = 0; i < ARRAY_SIZE(formats_kms); ++i) {
-		if (formats_kms[i] == state->format->fourcc) {
-			cfg.pixelformat = formats_v4l2[i];
-			break;
-		}
-	}
+	format = rcar_du_format_info(state->format->fourcc);
+	cfg.pixelformat = format->v4l2;
 
 	vsp1_du_atomic_update(plane->vsp->vsp, crtc->vsp_pipe,
 			      plane->index, &cfg);
@@ -405,8 +372,8 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np,
 
 		ret = drm_universal_plane_init(rcdu->ddev, &plane->plane, crtcs,
 					       &rcar_du_vsp_plane_funcs,
-					       formats_kms,
-					       ARRAY_SIZE(formats_kms),
+					       rcar_du_vsp_formats,
+					       ARRAY_SIZE(rcar_du_vsp_formats),
 					       NULL, type, NULL);
 		if (ret < 0)
 			return ret;
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 21/32] drm: rcar-du: Update framebuffer pitch and alignment limits for Gen3
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (19 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 20/32] drm: rcar-du: Store V4L2 fourcc in rcar_du_format_info structure Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 22/32] arm64: dts: renesas: r8a774a1: Add PCIe device nodes Fabrizio Castro
                   ` (11 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

commit f09e5b5d776debc2761e8d9330d60b8dcd8cb9dd upstream.

The framebuffer pitch and alignment constraints reflect the limitations
of the Gen2 DU hardware. On Gen3, the DU has no memory interface and
thus doesn't impose any constraint. The limitations come instead from
the VSP that has a limit of 65535 bytes for the pitch and no alignment
constraint. Update the checks accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_kms.c | 35 +++++++++++++++++++++++------------
 1 file changed, 23 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
index d2094ae..27783f6 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
@@ -233,7 +233,6 @@ rcar_du_fb_create(struct drm_device *dev, struct drm_file *file_priv,
 	const struct rcar_du_format_info *format;
 	unsigned int max_pitch;
 	unsigned int align;
-	unsigned int bpp;
 	unsigned int i;
 
 	format = rcar_du_format_info(mode_cmd->pixel_format);
@@ -243,20 +242,32 @@ rcar_du_fb_create(struct drm_device *dev, struct drm_file *file_priv,
 		return ERR_PTR(-EINVAL);
 	}
 
-	/*
-	 * The pitch and alignment constraints are expressed in pixels on the
-	 * hardware side and in bytes in the DRM API.
-	 */
-	bpp = format->planes == 1 ? format->bpp / 8 : 1;
-	max_pitch =  4096 * bpp;
+	if (rcdu->info->gen < 3) {
+		/*
+		 * On Gen2 the DU limits the pitch to 4095 pixels and requires
+		 * buffers to be aligned to a 16 pixels boundary (or 128 bytes
+		 * on some platforms).
+		 */
+		unsigned int bpp = format->planes == 1 ? format->bpp / 8 : 1;
 
-	if (rcar_du_needs(rcdu, RCAR_DU_QUIRK_ALIGN_128B))
-		align = 128;
-	else
-		align = 16 * bpp;
+		max_pitch = 4095 * bpp;
+
+		if (rcar_du_needs(rcdu, RCAR_DU_QUIRK_ALIGN_128B))
+			align = 128;
+		else
+			align = 16 * bpp;
+	} else {
+		/*
+		 * On Gen3 the memory interface is handled by the VSP that
+		 * limits the pitch to 65535 bytes and has no alignment
+		 * constraint.
+		 */
+		max_pitch = 65535;
+		align = 1;
+	}
 
 	if (mode_cmd->pitches[0] & (align - 1) ||
-	    mode_cmd->pitches[0] >= max_pitch) {
+	    mode_cmd->pitches[0] > max_pitch) {
 		dev_dbg(dev->dev, "invalid pitch value %u\n",
 			mode_cmd->pitches[0]);
 		return ERR_PTR(-EINVAL);
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 22/32] arm64: dts: renesas: r8a774a1: Add PCIe device nodes
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (20 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 21/32] drm: rcar-du: Update framebuffer pitch and alignment limits for Gen3 Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 23/32] arm64: dts: renesas: hihope-common: Declare pcie bus clock Fabrizio Castro
                   ` (10 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit a5a41d50ffe77d250655f767eb192dbbc387edd7 upstream.

This patch adds PCIe{0,1} device nodes for R8A774A1 SoC.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 54 +++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
index bdf4292..048377c 100644
--- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
@@ -1789,6 +1789,60 @@
 			resets = <&cpg 408>;
 		};
 
+		pciec0: pcie at fe000000 {
+			compatible = "renesas,pcie-r8a774a1",
+				     "renesas,pcie-rcar-gen3";
+			reg = <0 0xfe000000 0 0x80000>;
+			#address-cells = <3>;
+			#size-cells = <2>;
+			bus-range = <0x00 0xff>;
+			device_type = "pci";
+			ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
+				0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
+				0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
+				0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+			/* Map all possible DDR as inbound ranges */
+			dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
+			interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0 0 0 0>;
+			interrupt-map = <0 0 0 0 &gic GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 319>, <&pcie_bus_clk>;
+			clock-names = "pcie", "pcie_bus";
+			power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
+			resets = <&cpg 319>;
+			status = "disabled";
+		};
+
+		pciec1: pcie at ee800000 {
+			compatible = "renesas,pcie-r8a774a1",
+				     "renesas,pcie-rcar-gen3";
+			reg = <0 0xee800000 0 0x80000>;
+			#address-cells = <3>;
+			#size-cells = <2>;
+			bus-range = <0x00 0xff>;
+			device_type = "pci";
+			ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000
+				0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000
+				0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000
+				0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
+			/* Map all possible DDR as inbound ranges */
+			dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
+			interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>;
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0 0 0 0>;
+			interrupt-map = <0 0 0 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 318>, <&pcie_bus_clk>;
+			clock-names = "pcie", "pcie_bus";
+			power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
+			resets = <&cpg 318>;
+			status = "disabled";
+		};
+
 		fcpf0: fcp at fe950000 {
 			compatible = "renesas,fcpf";
 			reg = <0 0xfe950000 0 0x200>;
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 23/32] arm64: dts: renesas: hihope-common: Declare pcie bus clock
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (21 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 22/32] arm64: dts: renesas: r8a774a1: Add PCIe device nodes Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-17 12:36   ` nobuhiro1.iwamatsu at toshiba.co.jp
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 24/32] arm64: dts: renesas: hihope-rzg2-ex: Enable PCIe support Fabrizio Castro
                   ` (9 subsequent siblings)
  32 siblings, 1 reply; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit 61e0505b162a3974663cc6d1dbec30268a7a03ea upstream.

Declare pcie bus clock, since it is generated on the HiHope RZ/G2M main
board.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/hihope-common.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
index 77d183a..2a49bf1 100644
--- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
@@ -77,6 +77,10 @@
 	clock-frequency = <32768>;
 };
 
+&pcie_bus_clk {
+	clock-frequency = <100000000>;
+};
+
 &pfc {
 	pinctrl-0 = <&scif_clk_pins>;
 	pinctrl-names = "default";
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 24/32] arm64: dts: renesas: hihope-rzg2-ex: Enable PCIe support
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (22 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 23/32] arm64: dts: renesas: hihope-common: Declare pcie bus clock Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 25/32] arm64: dts: renesas: r8a774a1: Add VSP instances Fabrizio Castro
                   ` (8 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit 3c3ca5f746d850f9d4c4b1b7aee986f1114178aa upstream.

This patch enables PCIEC[01] PCI express controller on the sub board.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
index b1e45944..07a6eea 100644
--- a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
+++ b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
@@ -31,6 +31,14 @@
 	};
 };
 
+&pciec0 {
+	status = "okay";
+};
+
+&pciec1 {
+	status = "okay";
+};
+
 &pfc {
 	pinctrl-0 = <&scif_clk_pins>;
 	pinctrl-names = "default";
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 25/32] arm64: dts: renesas: r8a774a1: Add VSP instances
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (23 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 24/32] arm64: dts: renesas: hihope-rzg2-ex: Enable PCIe support Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 26/32] arm64: dts: renesas: r8a774a1: Add DU device to DT Fabrizio Castro
                   ` (7 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit 391dca2105c435a2003c3c19f2d0b68742f43434 upstream.

The r8a774a1 soc has 5 VSP instances similar to r8a7796.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 55 +++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
index 048377c..8a56027 100644
--- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
@@ -1895,6 +1895,61 @@
 			iommus = <&ipmmu_vc0 19>;
 		};
 
+		vspb: vsp at fe960000 {
+			compatible = "renesas,vsp2";
+			reg = <0 0xfe960000 0 0x8000>;
+			interrupts = <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 626>;
+			power-domains = <&sysc R8A774A1_PD_A3VC>;
+			resets = <&cpg 626>;
+
+			renesas,fcp = <&fcpvb0>;
+		};
+
+		vspd0: vsp at fea20000 {
+			compatible = "renesas,vsp2";
+			reg = <0 0xfea20000 0 0x5000>;
+			interrupts = <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 623>;
+			power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
+			resets = <&cpg 623>;
+
+			renesas,fcp = <&fcpvd0>;
+		};
+
+		vspd1: vsp at fea28000 {
+			compatible = "renesas,vsp2";
+			reg = <0 0xfea28000 0 0x5000>;
+			interrupts = <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 622>;
+			power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
+			resets = <&cpg 622>;
+
+			renesas,fcp = <&fcpvd1>;
+		};
+
+		vspd2: vsp at fea30000 {
+			compatible = "renesas,vsp2";
+			reg = <0 0xfea30000 0 0x5000>;
+			interrupts = <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 621>;
+			power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
+			resets = <&cpg 621>;
+
+			renesas,fcp = <&fcpvd2>;
+		};
+
+		vspi0: vsp at fe9a0000 {
+			compatible = "renesas,vsp2";
+			reg = <0 0xfe9a0000 0 0x8000>;
+			interrupts = <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 631>;
+			power-domains = <&sysc R8A774A1_PD_A3VC>;
+			resets = <&cpg 631>;
+
+			renesas,fcp = <&fcpvi0>;
+		};
+
 		prr: chipid at fff00044 {
 			compatible = "renesas,prr";
 			reg = <0 0xfff00044 0 4>;
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 26/32] arm64: dts: renesas: r8a774a1: Add DU device to DT
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (24 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 25/32] arm64: dts: renesas: r8a774a1: Add VSP instances Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 27/32] arm64: dts: renesas: r8a774a1: Add FDP1 instance Fabrizio Castro
                   ` (6 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit c4f223b419ba3fe44822d3180d3b9e5e6cb33c2e upstream.

Add the DU device to r8a774a1.dtsi in a disabled state.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 63 +++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
index 8a56027..da3230b 100644
--- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
@@ -1950,6 +1950,69 @@
 			renesas,fcp = <&fcpvi0>;
 		};
 
+		du: display at feb00000 {
+			compatible = "renesas,du-r8a774a1";
+			reg = <0 0xfeb00000 0 0x70000>;
+			interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 724>,
+				 <&cpg CPG_MOD 723>,
+				 <&cpg CPG_MOD 722>;
+			clock-names = "du.0", "du.1", "du.2";
+			status = "disabled";
+
+			vsps = <&vspd0 &vspd1 &vspd2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					du_out_rgb: endpoint {
+					};
+				};
+				port at 1 {
+					reg = <1>;
+					du_out_hdmi0: endpoint {
+					};
+				};
+				port at 2 {
+					reg = <2>;
+					du_out_lvds0: endpoint {
+						remote-endpoint = <&lvds0_in>;
+					};
+				};
+			};
+		};
+
+		lvds0: lvds at feb90000 {
+			compatible = "renesas,r8a774a1-lvds";
+			reg = <0 0xfeb90000 0 0x14>;
+			clocks = <&cpg CPG_MOD 727>;
+			power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
+			resets = <&cpg 727>;
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					lvds0_in: endpoint {
+						remote-endpoint = <&du_out_lvds0>;
+					};
+				};
+				port at 1 {
+					reg = <1>;
+					lvds0_out: endpoint {
+					};
+				};
+			};
+		};
+
 		prr: chipid at fff00044 {
 			compatible = "renesas,prr";
 			reg = <0 0xfff00044 0 4>;
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 27/32] arm64: dts: renesas: r8a774a1: Add FDP1 instance
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (25 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 26/32] arm64: dts: renesas: r8a774a1: Add DU device to DT Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 28/32] arm64: dts: renesas: r8a774a1: Tie SYS-DMAC to IPMMU-DS0/1 Fabrizio Castro
                   ` (5 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit 466f475f63d1889c192c751f53ab1030e4dd829c upstream.

The r8a774a1 has a single FDP1 instance similar to r8a7796.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
index da3230b..ceff224 100644
--- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
@@ -1843,6 +1843,16 @@
 			status = "disabled";
 		};
 
+		fdp1 at fe940000 {
+			compatible = "renesas,fdp1";
+			reg = <0 0xfe940000 0 0x2400>;
+			interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 119>;
+			power-domains = <&sysc R8A774A1_PD_A3VC>;
+			resets = <&cpg 119>;
+			renesas,fcp = <&fcpf0>;
+		};
+
 		fcpf0: fcp at fe950000 {
 			compatible = "renesas,fcpf";
 			reg = <0 0xfe950000 0 0x200>;
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 28/32] arm64: dts: renesas: r8a774a1: Tie SYS-DMAC to IPMMU-DS0/1
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (26 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 27/32] arm64: dts: renesas: r8a774a1: Add FDP1 instance Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 29/32] arm64: dts: renesas: r8a774a1: Tie Audio-DMAC to IPMMU-MP Fabrizio Castro
                   ` (4 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit c3362a74d977f2509b5523afddc9887b3831279f upstream.

Hook up r8a774a1 DMAC nodes to the IPMMUs. In particular SYS-DMAC0
gets tied to IPMMU-DS0, and SYS-DMAC1 and SYS-DMAC2 get tied to IPMMU-DS1.

Based on work for the r8a7796 by Magnus Damm.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
index ceff224..533598e 100644
--- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
@@ -906,6 +906,14 @@
 			resets = <&cpg 219>;
 			#dma-cells = <1>;
 			dma-channels = <16>;
+			iommus = <&ipmmu_ds0 0>, <&ipmmu_ds0 1>,
+			       <&ipmmu_ds0 2>, <&ipmmu_ds0 3>,
+			       <&ipmmu_ds0 4>, <&ipmmu_ds0 5>,
+			       <&ipmmu_ds0 6>, <&ipmmu_ds0 7>,
+			       <&ipmmu_ds0 8>, <&ipmmu_ds0 9>,
+			       <&ipmmu_ds0 10>, <&ipmmu_ds0 11>,
+			       <&ipmmu_ds0 12>, <&ipmmu_ds0 13>,
+			       <&ipmmu_ds0 14>, <&ipmmu_ds0 15>;
 		};
 
 		dmac1: dma-controller at e7300000 {
@@ -940,6 +948,14 @@
 			resets = <&cpg 218>;
 			#dma-cells = <1>;
 			dma-channels = <16>;
+			iommus = <&ipmmu_ds1 0>, <&ipmmu_ds1 1>,
+			       <&ipmmu_ds1 2>, <&ipmmu_ds1 3>,
+			       <&ipmmu_ds1 4>, <&ipmmu_ds1 5>,
+			       <&ipmmu_ds1 6>, <&ipmmu_ds1 7>,
+			       <&ipmmu_ds1 8>, <&ipmmu_ds1 9>,
+			       <&ipmmu_ds1 10>, <&ipmmu_ds1 11>,
+			       <&ipmmu_ds1 12>, <&ipmmu_ds1 13>,
+			       <&ipmmu_ds1 14>, <&ipmmu_ds1 15>;
 		};
 
 		dmac2: dma-controller at e7310000 {
@@ -974,6 +990,14 @@
 			resets = <&cpg 217>;
 			#dma-cells = <1>;
 			dma-channels = <16>;
+			iommus = <&ipmmu_ds1 16>, <&ipmmu_ds1 17>,
+			       <&ipmmu_ds1 18>, <&ipmmu_ds1 19>,
+			       <&ipmmu_ds1 20>, <&ipmmu_ds1 21>,
+			       <&ipmmu_ds1 22>, <&ipmmu_ds1 23>,
+			       <&ipmmu_ds1 24>, <&ipmmu_ds1 25>,
+			       <&ipmmu_ds1 26>, <&ipmmu_ds1 27>,
+			       <&ipmmu_ds1 28>, <&ipmmu_ds1 29>,
+			       <&ipmmu_ds1 30>, <&ipmmu_ds1 31>;
 		};
 
 		ipmmu_ds0: mmu at e6740000 {
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 29/32] arm64: dts: renesas: r8a774a1: Tie Audio-DMAC to IPMMU-MP
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (27 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 28/32] arm64: dts: renesas: r8a774a1: Tie SYS-DMAC to IPMMU-DS0/1 Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 30/32] arm64: dts: renesas: r8a774a1: Connect Ethernet-AVB to IPMMU-DS0 Fabrizio Castro
                   ` (3 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit 01712eaa0d969cc347a5146c6efd0a1ec67a6372 upstream.

Hook up r8a774a1 Audio-DMAC nodes to the IPMMU-MP.

Based on work for the r8a7795 by Magnus Damm.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
index 533598e..6e84181 100644
--- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
@@ -1617,6 +1617,14 @@
 			resets = <&cpg 502>;
 			#dma-cells = <1>;
 			dma-channels = <16>;
+			iommus = <&ipmmu_mp 0>, <&ipmmu_mp 1>,
+			       <&ipmmu_mp 2>, <&ipmmu_mp 3>,
+			       <&ipmmu_mp 4>, <&ipmmu_mp 5>,
+			       <&ipmmu_mp 6>, <&ipmmu_mp 7>,
+			       <&ipmmu_mp 8>, <&ipmmu_mp 9>,
+			       <&ipmmu_mp 10>, <&ipmmu_mp 11>,
+			       <&ipmmu_mp 12>, <&ipmmu_mp 13>,
+			       <&ipmmu_mp 14>, <&ipmmu_mp 15>;
 		};
 
 		audma1: dma-controller at ec720000 {
@@ -1651,6 +1659,14 @@
 			resets = <&cpg 501>;
 			#dma-cells = <1>;
 			dma-channels = <16>;
+			iommus = <&ipmmu_mp 16>, <&ipmmu_mp 17>,
+			       <&ipmmu_mp 18>, <&ipmmu_mp 19>,
+			       <&ipmmu_mp 20>, <&ipmmu_mp 21>,
+			       <&ipmmu_mp 22>, <&ipmmu_mp 23>,
+			       <&ipmmu_mp 24>, <&ipmmu_mp 25>,
+			       <&ipmmu_mp 26>, <&ipmmu_mp 27>,
+			       <&ipmmu_mp 28>, <&ipmmu_mp 29>,
+			       <&ipmmu_mp 30>, <&ipmmu_mp 31>;
 		};
 
 		xhci0: usb at ee000000 {
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 30/32] arm64: dts: renesas: r8a774a1: Connect Ethernet-AVB to IPMMU-DS0
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (28 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 29/32] arm64: dts: renesas: r8a774a1: Tie Audio-DMAC to IPMMU-MP Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 31/32] arm64: dts: renesas: r8a774a1: Add HDMI encoder instance Fabrizio Castro
                   ` (2 subsequent siblings)
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

From: Biju Das <biju.das@bp.renesas.com>

commit 57cfa7314697cafecc1d0f79af72014bd02f8ce5 upstream.

Add IPMMU-DS0 to the Ethernet-AVB device node.

Based on work by Magnus Damm for the r8a7795.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
index 6e84181..011874a 100644
--- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
@@ -1113,6 +1113,7 @@
 			power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
+			iommus = <&ipmmu_ds0 16>;
 			#address-cells = <1>;
 			#size-cells = <0>;
 			status = "disabled";
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 31/32] arm64: dts: renesas: r8a774a1: Add HDMI encoder instance
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (29 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 30/32] arm64: dts: renesas: r8a774a1: Connect Ethernet-AVB to IPMMU-DS0 Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 32/32] arm64: dts: renesas: hihope-common: Add HDMI support Fabrizio Castro
  2019-09-17  1:06 ` [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M nobuhiro1.iwamatsu at toshiba.co.jp
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

commit 8c965642354950cd17d1edff57fd5ca965040517 upstream.

Add the HDMI encoder to the R8A774A1 DT in disabled state.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 32 +++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
index 011874a..928066c 100644
--- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
@@ -2001,6 +2001,37 @@
 			renesas,fcp = <&fcpvi0>;
 		};
 
+		hdmi0: hdmi at fead0000 {
+			compatible = "renesas,r8a774a1-hdmi",
+				     "renesas,rcar-gen3-hdmi";
+			reg = <0 0xfead0000 0 0x10000>;
+			interrupts = <GIC_SPI 389 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 729>,
+				 <&cpg CPG_CORE R8A774A1_CLK_HDMI>;
+			clock-names = "iahb", "isfr";
+			power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
+			resets = <&cpg 729>;
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				port at 0 {
+					reg = <0>;
+					dw_hdmi0_in: endpoint {
+						remote-endpoint = <&du_out_hdmi0>;
+					};
+				};
+				port at 1 {
+					reg = <1>;
+				};
+				port at 2 {
+					/* HDMI sound */
+					reg = <2>;
+				};
+			};
+		};
+
 		du: display at feb00000 {
 			compatible = "renesas,du-r8a774a1";
 			reg = <0 0xfeb00000 0 0x70000>;
@@ -2027,6 +2058,7 @@
 				port at 1 {
 					reg = <1>;
 					du_out_hdmi0: endpoint {
+						remote-endpoint = <&dw_hdmi0_in>;
 					};
 				};
 				port at 2 {
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 32/32] arm64: dts: renesas: hihope-common: Add HDMI support
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (30 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 31/32] arm64: dts: renesas: r8a774a1: Add HDMI encoder instance Fabrizio Castro
@ 2019-09-16 15:50 ` Fabrizio Castro
  2019-09-17  1:06 ` [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M nobuhiro1.iwamatsu at toshiba.co.jp
  32 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-16 15:50 UTC (permalink / raw)
  To: cip-dev

commit 89d6adc63f859b45eb961d86a451e38b679143a5 upstream.

Add HDMI support to the HiHope RZ/G2[MN] mother board common
dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm64/boot/dts/renesas/hihope-common.dtsi | 61 ++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
index 2a49bf1..646d830 100644
--- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
@@ -17,6 +17,17 @@
 		stdout-path = "serial0:115200n8";
 	};
 
+	hdmi0-out {
+		compatible = "hdmi-connector";
+		type = "a";
+
+		port {
+			hdmi0_con: endpoint {
+				remote-endpoint = <&rcar_dw_hdmi0_out>;
+			};
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -67,6 +78,30 @@
 		states = <3300000 1
 			  1800000 0>;
 	};
+
+	x302_clk: x302-clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <33000000>;
+	};
+
+	x304_clk: x304-clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <25000000>;
+	};
+};
+
+&du {
+	clocks = <&cpg CPG_MOD 724>,
+		 <&cpg CPG_MOD 723>,
+		 <&cpg CPG_MOD 722>,
+		 <&versaclock5 1>,
+		 <&x302_clk>,
+		 <&versaclock5 2>;
+	clock-names = "du.0", "du.1", "du.2",
+		      "dclkin.0", "dclkin.1", "dclkin.2";
+	status = "okay";
 };
 
 &extal_clk {
@@ -77,6 +112,32 @@
 	clock-frequency = <32768>;
 };
 
+&hdmi0 {
+	status = "okay";
+
+	ports {
+		port at 1 {
+			reg = <1>;
+			rcar_dw_hdmi0_out: endpoint {
+				remote-endpoint = <&hdmi0_con>;
+			};
+		};
+	};
+};
+
+&i2c4 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	versaclock5: clock-generator at 6a {
+		compatible = "idt,5p49v5923";
+		reg = <0x6a>;
+		#clock-cells = <1>;
+		clocks = <&x304_clk>;
+		clock-names = "xin";
+	};
+};
+
 &pcie_bus_clk {
 	clock-frequency = <100000000>;
 };
-- 
2.7.4

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

* [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M
  2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
                   ` (31 preceding siblings ...)
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 32/32] arm64: dts: renesas: hihope-common: Add HDMI support Fabrizio Castro
@ 2019-09-17  1:06 ` nobuhiro1.iwamatsu at toshiba.co.jp
  2019-09-17  9:38   ` Pavel Machek
  32 siblings, 1 reply; 38+ messages in thread
From: nobuhiro1.iwamatsu at toshiba.co.jp @ 2019-09-17  1:06 UTC (permalink / raw)
  To: cip-dev

Hi Fabrizio,

> -----Original Message-----
> From: Fabrizio Castro [mailto:fabrizio.castro at bp.renesas.com]
> Sent: Tuesday, September 17, 2019 12:50 AM
> To: cip-dev at lists.cip-project.org
> Cc: iwamatsu nobuhiro(?? ?? ????????)
> <nobuhiro1.iwamatsu@toshiba.co.jp>; pavel at denx.de; Chris Paterson
> <Chris.Paterson2@renesas.com>; Biju Das <biju.das@bp.renesas.com>;
> Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Subject: [cip-dev][PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to
> HiHope RZ/G2M
> 
> Dear All,
> 
> this series adds HDMI and PCIe support for the HiHope RZ/G2M board.
> 

OK, I start checking this series.

> Thanks,
> Fab

Best regards,
  Nobuhiro

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

* [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M
  2019-09-17  1:06 ` [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M nobuhiro1.iwamatsu at toshiba.co.jp
@ 2019-09-17  9:38   ` Pavel Machek
  2019-09-18  5:25     ` nobuhiro1.iwamatsu at toshiba.co.jp
  0 siblings, 1 reply; 38+ messages in thread
From: Pavel Machek @ 2019-09-17  9:38 UTC (permalink / raw)
  To: cip-dev

On Tue 2019-09-17 01:06:42, nobuhiro1.iwamatsu at toshiba.co.jp wrote:
> Hi Fabrizio,
> 
> > -----Original Message-----
> > From: Fabrizio Castro [mailto:fabrizio.castro at bp.renesas.com]
> > Sent: Tuesday, September 17, 2019 12:50 AM
> > To: cip-dev at lists.cip-project.org
> > Cc: iwamatsu nobuhiro(?? ?? ????????)
> > <nobuhiro1.iwamatsu@toshiba.co.jp>; pavel at denx.de; Chris Paterson
> > <Chris.Paterson2@renesas.com>; Biju Das <biju.das@bp.renesas.com>;
> > Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Subject: [cip-dev][PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to
> > HiHope RZ/G2M
> > 
> > Dear All,
> > 
> > this series adds HDMI and PCIe support for the HiHope RZ/G2M board.
> > 
> 
> OK, I start checking this series.

I quickly went through the series, and don't see anything obviously
wrong.

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20190917/56d3051a/attachment.sig>

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

* [cip-dev] [PATCH 4.19.y-cip 23/32] arm64: dts: renesas: hihope-common: Declare pcie bus clock
  2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 23/32] arm64: dts: renesas: hihope-common: Declare pcie bus clock Fabrizio Castro
@ 2019-09-17 12:36   ` nobuhiro1.iwamatsu at toshiba.co.jp
  2019-09-17 13:06     ` Fabrizio Castro
  0 siblings, 1 reply; 38+ messages in thread
From: nobuhiro1.iwamatsu at toshiba.co.jp @ 2019-09-17 12:36 UTC (permalink / raw)
  To: cip-dev

Hi,

I can not merge this patch.

> -----Original Message-----
> From: Fabrizio Castro [mailto:fabrizio.castro at bp.renesas.com]
> Sent: Tuesday, September 17, 2019 12:51 AM
> To: cip-dev at lists.cip-project.org
> Cc: iwamatsu nobuhiro(?? ?? ????????)
> <nobuhiro1.iwamatsu@toshiba.co.jp>; pavel at denx.de; Chris Paterson
> <Chris.Paterson2@renesas.com>; Biju Das <biju.das@bp.renesas.com>;
> Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Subject: [cip-dev][PATCH 4.19.y-cip 23/32] arm64: dts: renesas:
> hihope-common: Declare pcie bus clock
> 
> From: Biju Das <biju.das@bp.renesas.com>
> 
> commit 61e0505b162a3974663cc6d1dbec30268a7a03ea upstream.
> 
> Declare pcie bus clock, since it is generated on the HiHope RZ/G2M main
> board.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> ---
>  arch/arm64/boot/dts/renesas/hihope-common.dtsi | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> index 77d183a..2a49bf1 100644
> --- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> +++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> @@ -77,6 +77,10 @@
>  	clock-frequency = <32768>;
>  };
> 
> +&pcie_bus_clk {
> +	clock-frequency = <100000000>;
> +};
> +
>  &pfc {
>  	pinctrl-0 = <&scif_clk_pins>;
>  	pinctrl-names = "default";

Please see:
  https://gitlab.com/cip-project/cip-kernel/linux-cip/blob/linux-4.19.y-cip/arch/arm64/boot/dts/renesas/hihope-common.dtsi#L95

Please rebase from linux-4.19.y-cip/HEAD and resend this series.

Best regards,
  Nobuhiro

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

* [cip-dev] [PATCH 4.19.y-cip 23/32] arm64: dts: renesas: hihope-common: Declare pcie bus clock
  2019-09-17 12:36   ` nobuhiro1.iwamatsu at toshiba.co.jp
@ 2019-09-17 13:06     ` Fabrizio Castro
  0 siblings, 0 replies; 38+ messages in thread
From: Fabrizio Castro @ 2019-09-17 13:06 UTC (permalink / raw)
  To: cip-dev

Hi,

> From: nobuhiro1.iwamatsu at toshiba.co.jp <nobuhiro1.iwamatsu@toshiba.co.jp>
> Sent: 17 September 2019 13:37
> Subject: RE: [cip-dev][PATCH 4.19.y-cip 23/32] arm64: dts: renesas: hihope-common: Declare pcie bus clock
> 
> Hi,
> 
> I can not merge this patch.
> 
> > -----Original Message-----
> > From: Fabrizio Castro [mailto:fabrizio.castro at bp.renesas.com]
> > Sent: Tuesday, September 17, 2019 12:51 AM
> > To: cip-dev at lists.cip-project.org
> > Cc: iwamatsu nobuhiro(?? ?? ????????)
> > <nobuhiro1.iwamatsu@toshiba.co.jp>; pavel at denx.de; Chris Paterson
> > <Chris.Paterson2@renesas.com>; Biju Das <biju.das@bp.renesas.com>;
> > Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Subject: [cip-dev][PATCH 4.19.y-cip 23/32] arm64: dts: renesas:
> > hihope-common: Declare pcie bus clock
> >
> > From: Biju Das <biju.das@bp.renesas.com>
> >
> > commit 61e0505b162a3974663cc6d1dbec30268a7a03ea upstream.
> >
> > Declare pcie bus clock, since it is generated on the HiHope RZ/G2M main
> > board.
> >
> > Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > ---
> >  arch/arm64/boot/dts/renesas/hihope-common.dtsi | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > index 77d183a..2a49bf1 100644
> > --- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > @@ -77,6 +77,10 @@
> >  	clock-frequency = <32768>;
> >  };
> >
> > +&pcie_bus_clk {
> > +	clock-frequency = <100000000>;
> > +};
> > +
> >  &pfc {
> >  	pinctrl-0 = <&scif_clk_pins>;
> >  	pinctrl-names = "default";
> 
> Please see:
>   https://gitlab.com/cip-project/cip-kernel/linux-cip/blob/linux-4.19.y-cip/arch/arm64/boot/dts/renesas/hihope-common.dtsi#L95
> 
> Please rebase from linux-4.19.y-cip/HEAD and resend this series.

Will do.

Thanks,
Fab

> 
> Best regards,
>   Nobuhiro

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

* [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M
  2019-09-17  9:38   ` Pavel Machek
@ 2019-09-18  5:25     ` nobuhiro1.iwamatsu at toshiba.co.jp
  0 siblings, 0 replies; 38+ messages in thread
From: nobuhiro1.iwamatsu at toshiba.co.jp @ 2019-09-18  5:25 UTC (permalink / raw)
  To: cip-dev

Hi Pavel,

> -----Original Message-----
> From: Pavel Machek [mailto:pavel at denx.de]
> Sent: Tuesday, September 17, 2019 6:39 PM
> To: iwamatsu nobuhiro(?? ?? ????????)
> <nobuhiro1.iwamatsu@toshiba.co.jp>
> Cc: fabrizio.castro at bp.renesas.com; cip-dev at lists.cip-project.org;
> pavel at denx.de; Chris.Paterson2 at renesas.com; biju.das at bp.renesas.com
> Subject: Re: [cip-dev][PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support
> to HiHope RZ/G2M
> 
> On Tue 2019-09-17 01:06:42, nobuhiro1.iwamatsu at toshiba.co.jp wrote:
> > Hi Fabrizio,
> >
> > > -----Original Message-----
> > > From: Fabrizio Castro [mailto:fabrizio.castro at bp.renesas.com]
> > > Sent: Tuesday, September 17, 2019 12:50 AM
> > > To: cip-dev at lists.cip-project.org
> > > Cc: iwamatsu nobuhiro(?? ?? ????????)
> > > <nobuhiro1.iwamatsu@toshiba.co.jp>; pavel at denx.de; Chris Paterson
> > > <Chris.Paterson2@renesas.com>; Biju Das <biju.das@bp.renesas.com>;
> > > Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > > Subject: [cip-dev][PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support
> > > to HiHope RZ/G2M
> > >
> > > Dear All,
> > >
> > > this series adds HDMI and PCIe support for the HiHope RZ/G2M board.
> > >
> >
> > OK, I start checking this series.
> 
> I quickly went through the series, and don't see anything obviously wrong.
> 

Thanks for your review!

Best regards,
  Nobuhiro

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

end of thread, other threads:[~2019-09-18  5:25 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16 15:50 [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 01/32] dt-bindings: PCI: rcar: Add device tree support for r8a774a1 Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 02/32] dt-bindings: display: renesas: du: Document the r8a774a1 bindings Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 03/32] dt-bindings: display: renesas: lvds: Document " Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 04/32] dt-bindings: display: renesas: Add r8a774a1 support Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 05/32] PCI: rcar: Replace unsigned long with u32/unsigned int in register accessors Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 06/32] PCI: rcar: Replace various variable types with unsigned ones for register values Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 07/32] PCI: rcar: Clean up debug messages Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 08/32] PCI: rcar: Do not shadow the 'irq' variable Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 09/32] drm: rcar-du: Add R8A774A1 support Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 10/32] drm: rcar-du: lvds: Add r8a774a1 support Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 11/32] drm: rcar-du: dw-hdmi: Reject modes with a too high clock frequency Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 12/32] drm: rcar-du: Refactor Feature and Quirk definitions Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 13/32] drm: rcar-du: Add interlaced feature flag Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 14/32] drm: rcar-du: Cache DSYSR value to ensure known initial value Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 15/32] drm: rcar-du: Don't use TV sync mode when not supported by the hardware Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 16/32] drm: rcar-du: Support interlaced video output through vsp1 Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 17/32] drm: rcar-du: Rework clock configuration based on hardware limits Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 18/32] drm: rcar-du: Rename and document dpll_ch field Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 19/32] drm: rcar-du: Add support for missing pixel formats Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 20/32] drm: rcar-du: Store V4L2 fourcc in rcar_du_format_info structure Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 21/32] drm: rcar-du: Update framebuffer pitch and alignment limits for Gen3 Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 22/32] arm64: dts: renesas: r8a774a1: Add PCIe device nodes Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 23/32] arm64: dts: renesas: hihope-common: Declare pcie bus clock Fabrizio Castro
2019-09-17 12:36   ` nobuhiro1.iwamatsu at toshiba.co.jp
2019-09-17 13:06     ` Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 24/32] arm64: dts: renesas: hihope-rzg2-ex: Enable PCIe support Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 25/32] arm64: dts: renesas: r8a774a1: Add VSP instances Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 26/32] arm64: dts: renesas: r8a774a1: Add DU device to DT Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 27/32] arm64: dts: renesas: r8a774a1: Add FDP1 instance Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 28/32] arm64: dts: renesas: r8a774a1: Tie SYS-DMAC to IPMMU-DS0/1 Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 29/32] arm64: dts: renesas: r8a774a1: Tie Audio-DMAC to IPMMU-MP Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 30/32] arm64: dts: renesas: r8a774a1: Connect Ethernet-AVB to IPMMU-DS0 Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 31/32] arm64: dts: renesas: r8a774a1: Add HDMI encoder instance Fabrizio Castro
2019-09-16 15:50 ` [cip-dev] [PATCH 4.19.y-cip 32/32] arm64: dts: renesas: hihope-common: Add HDMI support Fabrizio Castro
2019-09-17  1:06 ` [cip-dev] [PATCH 4.19.y-cip 00/32] Add PCIe and HDMI support to HiHope RZ/G2M nobuhiro1.iwamatsu at toshiba.co.jp
2019-09-17  9:38   ` Pavel Machek
2019-09-18  5:25     ` nobuhiro1.iwamatsu at toshiba.co.jp

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.