All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Allwinner A64 DE2 CCU support with dedicated DE2 bus driver
@ 2018-03-16 17:53 ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-clk,
	linux-sunxi, Icenowy Zheng

This patchset tries to implement the Allwinner A64 DE2 as a bus driver,
in order to model the fact that the SRAM claim controls the access to
the whole DE2 memory space.

PATCH 1 and PATCH 4 are for the CCU part.

PATCH 2 is the device tree binding for the A64 DE2 bus, and PATCH 3
implements the bus driver.

PATCH 5 is a modified version of A64 DE2 CCU patch, which uses the A64
DE2 bus.

PATCH 6 and 7 are just the simplefb patches for A64.

Icenowy Zheng (7):
  dt-bindings: add compatible string for the A64 DE2 CCU
  dt-bindings: add binding for the Allwinner A64 DE2 bus
  bus: add bus driver for accessing Allwinner A64 DE2
  clk: sunxi-ng: add A64 compatible string
  arm64: allwinner: a64: add DE2 CCU related device tree nodes
  arm64: allwinner: a64: add simplefb for A64 SoC
  arm64: allwinner: a64: add HDMI regulator to all DTs' simplefb_hdmi

 .../devicetree/bindings/bus/sun50i-de2-bus.txt     | 37 ++++++++++++
 .../devicetree/bindings/clock/sun8i-de2.txt        |  1 +
 .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts |  4 ++
 .../boot/dts/allwinner/sun50i-a64-nanopi-a64.dts   |  4 ++
 .../boot/dts/allwinner/sun50i-a64-olinuxino.dts    |  4 ++
 .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts |  4 ++
 .../arm64/boot/dts/allwinner/sun50i-a64-pine64.dts |  4 ++
 .../dts/allwinner/sun50i-a64-sopine-baseboard.dts  |  4 ++
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi      | 68 ++++++++++++++++++++++
 drivers/bus/Kconfig                                | 10 ++++
 drivers/bus/Makefile                               |  1 +
 drivers/bus/sun50i-de2.c                           | 49 ++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun8i-de2.c               | 11 ++--
 13 files changed, 194 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt
 create mode 100644 drivers/bus/sun50i-de2.c

-- 
2.15.1

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

* [PATCH 0/7] Allwinner A64 DE2 CCU support with dedicated DE2 bus driver
@ 2018-03-16 17:53 ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

This patchset tries to implement the Allwinner A64 DE2 as a bus driver,
in order to model the fact that the SRAM claim controls the access to
the whole DE2 memory space.

PATCH 1 and PATCH 4 are for the CCU part.

PATCH 2 is the device tree binding for the A64 DE2 bus, and PATCH 3
implements the bus driver.

PATCH 5 is a modified version of A64 DE2 CCU patch, which uses the A64
DE2 bus.

PATCH 6 and 7 are just the simplefb patches for A64.

Icenowy Zheng (7):
  dt-bindings: add compatible string for the A64 DE2 CCU
  dt-bindings: add binding for the Allwinner A64 DE2 bus
  bus: add bus driver for accessing Allwinner A64 DE2
  clk: sunxi-ng: add A64 compatible string
  arm64: allwinner: a64: add DE2 CCU related device tree nodes
  arm64: allwinner: a64: add simplefb for A64 SoC
  arm64: allwinner: a64: add HDMI regulator to all DTs' simplefb_hdmi

 .../devicetree/bindings/bus/sun50i-de2-bus.txt     | 37 ++++++++++++
 .../devicetree/bindings/clock/sun8i-de2.txt        |  1 +
 .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts |  4 ++
 .../boot/dts/allwinner/sun50i-a64-nanopi-a64.dts   |  4 ++
 .../boot/dts/allwinner/sun50i-a64-olinuxino.dts    |  4 ++
 .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts |  4 ++
 .../arm64/boot/dts/allwinner/sun50i-a64-pine64.dts |  4 ++
 .../dts/allwinner/sun50i-a64-sopine-baseboard.dts  |  4 ++
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi      | 68 ++++++++++++++++++++++
 drivers/bus/Kconfig                                | 10 ++++
 drivers/bus/Makefile                               |  1 +
 drivers/bus/sun50i-de2.c                           | 49 ++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun8i-de2.c               | 11 ++--
 13 files changed, 194 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt
 create mode 100644 drivers/bus/sun50i-de2.c

-- 
2.15.1

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

* [PATCH 0/7] Allwinner A64 DE2 CCU support with dedicated DE2 bus driver
@ 2018-03-16 17:53 ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

This patchset tries to implement the Allwinner A64 DE2 as a bus driver,
in order to model the fact that the SRAM claim controls the access to
the whole DE2 memory space.

PATCH 1 and PATCH 4 are for the CCU part.

PATCH 2 is the device tree binding for the A64 DE2 bus, and PATCH 3
implements the bus driver.

PATCH 5 is a modified version of A64 DE2 CCU patch, which uses the A64
DE2 bus.

PATCH 6 and 7 are just the simplefb patches for A64.

Icenowy Zheng (7):
  dt-bindings: add compatible string for the A64 DE2 CCU
  dt-bindings: add binding for the Allwinner A64 DE2 bus
  bus: add bus driver for accessing Allwinner A64 DE2
  clk: sunxi-ng: add A64 compatible string
  arm64: allwinner: a64: add DE2 CCU related device tree nodes
  arm64: allwinner: a64: add simplefb for A64 SoC
  arm64: allwinner: a64: add HDMI regulator to all DTs' simplefb_hdmi

 .../devicetree/bindings/bus/sun50i-de2-bus.txt     | 37 ++++++++++++
 .../devicetree/bindings/clock/sun8i-de2.txt        |  1 +
 .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts |  4 ++
 .../boot/dts/allwinner/sun50i-a64-nanopi-a64.dts   |  4 ++
 .../boot/dts/allwinner/sun50i-a64-olinuxino.dts    |  4 ++
 .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts |  4 ++
 .../arm64/boot/dts/allwinner/sun50i-a64-pine64.dts |  4 ++
 .../dts/allwinner/sun50i-a64-sopine-baseboard.dts  |  4 ++
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi      | 68 ++++++++++++++++++++++
 drivers/bus/Kconfig                                | 10 ++++
 drivers/bus/Makefile                               |  1 +
 drivers/bus/sun50i-de2.c                           | 49 ++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun8i-de2.c               | 11 ++--
 13 files changed, 194 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt
 create mode 100644 drivers/bus/sun50i-de2.c

-- 
2.15.1

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

* [PATCH 1/7] dt-bindings: add compatible string for the A64 DE2 CCU
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-clk,
	linux-sunxi, Icenowy Zheng

The Allwinner A64 SoC has a DE2 CCU like the one in the DE2 of Allwinner
H5 SoC.

Add a compatible string for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 Documentation/devicetree/bindings/clock/sun8i-de2.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/clock/sun8i-de2.txt b/Documentation/devicetree/bindings/clock/sun8i-de2.txt
index f2fa87c4765c..e94582e8b8a9 100644
--- a/Documentation/devicetree/bindings/clock/sun8i-de2.txt
+++ b/Documentation/devicetree/bindings/clock/sun8i-de2.txt
@@ -6,6 +6,7 @@ Required properties :
 		- "allwinner,sun8i-a83t-de2-clk"
 		- "allwinner,sun8i-h3-de2-clk"
 		- "allwinner,sun8i-v3s-de2-clk"
+		- "allwinner,sun50i-a64-de2-clk"
 		- "allwinner,sun50i-h5-de2-clk"
 
 - reg: Must contain the registers base address and length
-- 
2.15.1

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

* [PATCH 1/7] dt-bindings: add compatible string for the A64 DE2 CCU
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

The Allwinner A64 SoC has a DE2 CCU like the one in the DE2 of Allwinner
H5 SoC.

Add a compatible string for it.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
 Documentation/devicetree/bindings/clock/sun8i-de2.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/clock/sun8i-de2.txt b/Documentation/devicetree/bindings/clock/sun8i-de2.txt
index f2fa87c4765c..e94582e8b8a9 100644
--- a/Documentation/devicetree/bindings/clock/sun8i-de2.txt
+++ b/Documentation/devicetree/bindings/clock/sun8i-de2.txt
@@ -6,6 +6,7 @@ Required properties :
 		- "allwinner,sun8i-a83t-de2-clk"
 		- "allwinner,sun8i-h3-de2-clk"
 		- "allwinner,sun8i-v3s-de2-clk"
+		- "allwinner,sun50i-a64-de2-clk"
 		- "allwinner,sun50i-h5-de2-clk"
 
 - reg: Must contain the registers base address and length
-- 
2.15.1

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

* [PATCH 1/7] dt-bindings: add compatible string for the A64 DE2 CCU
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

The Allwinner A64 SoC has a DE2 CCU like the one in the DE2 of Allwinner
H5 SoC.

Add a compatible string for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 Documentation/devicetree/bindings/clock/sun8i-de2.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/clock/sun8i-de2.txt b/Documentation/devicetree/bindings/clock/sun8i-de2.txt
index f2fa87c4765c..e94582e8b8a9 100644
--- a/Documentation/devicetree/bindings/clock/sun8i-de2.txt
+++ b/Documentation/devicetree/bindings/clock/sun8i-de2.txt
@@ -6,6 +6,7 @@ Required properties :
 		- "allwinner,sun8i-a83t-de2-clk"
 		- "allwinner,sun8i-h3-de2-clk"
 		- "allwinner,sun8i-v3s-de2-clk"
+		- "allwinner,sun50i-a64-de2-clk"
 		- "allwinner,sun50i-h5-de2-clk"
 
 - reg: Must contain the registers base address and length
-- 
2.15.1

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

* [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-clk,
	linux-sunxi, Icenowy Zheng

All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64 SoC to
be claimed, otherwise the whole DE2 space is inaccessible.

Add a device tree binding of the DE2 part as a sub-bus.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 .../devicetree/bindings/bus/sun50i-de2-bus.txt     | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt

diff --git a/Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt b/Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt
new file mode 100644
index 000000000000..87dfb33fb3be
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt
@@ -0,0 +1,37 @@
+Device tree bindings for Allwinner A64 DE2 bus
+
+The Allwinner A64 DE2 is on a special bus, which needs a SRAM region (SRAM C)
+to be claimed for enabling the access.
+
+Required properties:
+
+ - compatible:		Should contain "allwinner,sun50i-a64-de2"
+ - reg:			A resource specifier for the register space
+ - #address-cells:	Must be set to 1
+ - #size-cells:		Must be set to 1
+ - ranges:		Must be set up to map the address space inside the
+			DE2, for the sub-blocks of DE2.
+ - allwinner,sram:	the SRAM that needs to be claimed
+
+Example:
+
+	de2@1000000 {
+		compatible = "allwinner,sun50i-a64-de2";
+		reg = <0x1000000 0x400000>;
+		allwinner,sram = <&de2_sram 1>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0x1000000 0x400000>;
+
+		display_clocks: clock@0 {
+			compatible = "allwinner,sun50i-a64-de2-clk";
+			reg = <0x0 0x100000>;
+			clocks = <&ccu CLK_DE>,
+				 <&ccu CLK_BUS_DE>;
+			clock-names = "mod",
+				      "bus";
+			resets = <&ccu RST_BUS_DE>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+	};
-- 
2.15.1

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

* [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64 SoC to
be claimed, otherwise the whole DE2 space is inaccessible.

Add a device tree binding of the DE2 part as a sub-bus.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
 .../devicetree/bindings/bus/sun50i-de2-bus.txt     | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt

diff --git a/Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt b/Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt
new file mode 100644
index 000000000000..87dfb33fb3be
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt
@@ -0,0 +1,37 @@
+Device tree bindings for Allwinner A64 DE2 bus
+
+The Allwinner A64 DE2 is on a special bus, which needs a SRAM region (SRAM C)
+to be claimed for enabling the access.
+
+Required properties:
+
+ - compatible:		Should contain "allwinner,sun50i-a64-de2"
+ - reg:			A resource specifier for the register space
+ - #address-cells:	Must be set to 1
+ - #size-cells:		Must be set to 1
+ - ranges:		Must be set up to map the address space inside the
+			DE2, for the sub-blocks of DE2.
+ - allwinner,sram:	the SRAM that needs to be claimed
+
+Example:
+
+	de2@1000000 {
+		compatible = "allwinner,sun50i-a64-de2";
+		reg = <0x1000000 0x400000>;
+		allwinner,sram = <&de2_sram 1>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0x1000000 0x400000>;
+
+		display_clocks: clock@0 {
+			compatible = "allwinner,sun50i-a64-de2-clk";
+			reg = <0x0 0x100000>;
+			clocks = <&ccu CLK_DE>,
+				 <&ccu CLK_BUS_DE>;
+			clock-names = "mod",
+				      "bus";
+			resets = <&ccu RST_BUS_DE>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+	};
-- 
2.15.1

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

* [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64 SoC to
be claimed, otherwise the whole DE2 space is inaccessible.

Add a device tree binding of the DE2 part as a sub-bus.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 .../devicetree/bindings/bus/sun50i-de2-bus.txt     | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt

diff --git a/Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt b/Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt
new file mode 100644
index 000000000000..87dfb33fb3be
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt
@@ -0,0 +1,37 @@
+Device tree bindings for Allwinner A64 DE2 bus
+
+The Allwinner A64 DE2 is on a special bus, which needs a SRAM region (SRAM C)
+to be claimed for enabling the access.
+
+Required properties:
+
+ - compatible:		Should contain "allwinner,sun50i-a64-de2"
+ - reg:			A resource specifier for the register space
+ - #address-cells:	Must be set to 1
+ - #size-cells:		Must be set to 1
+ - ranges:		Must be set up to map the address space inside the
+			DE2, for the sub-blocks of DE2.
+ - allwinner,sram:	the SRAM that needs to be claimed
+
+Example:
+
+	de2 at 1000000 {
+		compatible = "allwinner,sun50i-a64-de2";
+		reg = <0x1000000 0x400000>;
+		allwinner,sram = <&de2_sram 1>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0x1000000 0x400000>;
+
+		display_clocks: clock at 0 {
+			compatible = "allwinner,sun50i-a64-de2-clk";
+			reg = <0x0 0x100000>;
+			clocks = <&ccu CLK_DE>,
+				 <&ccu CLK_BUS_DE>;
+			clock-names = "mod",
+				      "bus";
+			resets = <&ccu RST_BUS_DE>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+	};
-- 
2.15.1

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

* [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-clk,
	linux-sunxi, Icenowy Zheng

The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 SoC
is different from the ones on other Allwinner SoCs. It requires a SRAM
region to be claimed, otherwise all DE2 subblocks won't be accessible.

Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM
region when probing.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 drivers/bus/Kconfig      | 10 ++++++++++
 drivers/bus/Makefile     |  1 +
 drivers/bus/sun50i-de2.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 60 insertions(+)
 create mode 100644 drivers/bus/sun50i-de2.c

diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index ff70850031c5..cc8e4b4b6b59 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -95,6 +95,16 @@ config SIMPLE_PM_BUS
 	  Controller (BSC, sometimes called "LBSC within Bus Bridge", or
 	  "External Bus Interface") as found on several Renesas ARM SoCs.
 
+config SUN50I_DE2_BUS
+	bool "Allwinner A64 DE2 Bus Driver"
+	  default ARM64
+	  depends on ARCH_SUNXI
+	  select SUNXI_SRAM
+	  help
+	  Say y here to enable support for Allwinner A64 DE2 bus driver. It's
+	  mostly transparent, but a SRAM region needs to be claimed in the SRAM
+	  controller to make the all blocks in the DE2 part accessible.
+
 config SUNXI_RSB
 	tristate "Allwinner sunXi Reduced Serial Bus Driver"
 	  default MACH_SUN8I || MACH_SUN9I || ARM64
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index 3d473b8adeac..746ff0cebe10 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_OMAP_INTERCONNECT)	+= omap_l3_smx.o omap_l3_noc.o
 
 obj-$(CONFIG_OMAP_OCP2SCP)	+= omap-ocp2scp.o
 obj-$(CONFIG_QCOM_EBI2)		+= qcom-ebi2.o
+obj-$(CONFIG_SUN50I_DE2_BUS)	+= sun50i-de2.o
 obj-$(CONFIG_SUNXI_RSB)		+= sunxi-rsb.o
 obj-$(CONFIG_SIMPLE_PM_BUS)	+= simple-pm-bus.o
 obj-$(CONFIG_TEGRA_ACONNECT)	+= tegra-aconnect.o
diff --git a/drivers/bus/sun50i-de2.c b/drivers/bus/sun50i-de2.c
new file mode 100644
index 000000000000..836828ef96d5
--- /dev/null
+++ b/drivers/bus/sun50i-de2.c
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Allwinner A64 Display Engine 2.0 Bus Driver
+ *
+ * Copyright (C) 2018 Icenowy Zheng <icenowy@aosc.io>
+ */
+
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+#include <linux/soc/sunxi/sunxi_sram.h>
+
+static int sun50i_de2_bus_probe(struct platform_device *pdev)
+{
+	struct device_node *np = pdev->dev.of_node;
+	int ret;
+
+	ret = sunxi_sram_claim(&pdev->dev);
+	if (ret) {
+		dev_err(&pdev->dev, "Error couldn't map SRAM to device\n");
+		return ret;
+	}
+
+	if (np)
+		of_platform_populate(np, NULL, NULL, &pdev->dev);
+
+	return 0;
+}
+
+static int sun50i_de2_bus_remove(struct platform_device *pdev)
+{
+	sunxi_sram_release(&pdev->dev);
+	return 0;
+}
+
+static const struct of_device_id sun50i_de2_bus_of_match[] = {
+	{ .compatible = "allwinner,sun50i-a64-de2", },
+	{ /* sentinel */ }
+};
+
+static struct platform_driver sun50i_de2_bus_driver = {
+	.probe = sun50i_de2_bus_probe,
+	.remove = sun50i_de2_bus_remove,
+	.driver = {
+		.name = "sun50i-de2-bus",
+		.of_match_table = sun50i_de2_bus_of_match,
+	},
+};
+
+builtin_platform_driver(sun50i_de2_bus_driver);
-- 
2.15.1

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

* [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 SoC
is different from the ones on other Allwinner SoCs. It requires a SRAM
region to be claimed, otherwise all DE2 subblocks won't be accessible.

Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM
region when probing.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
 drivers/bus/Kconfig      | 10 ++++++++++
 drivers/bus/Makefile     |  1 +
 drivers/bus/sun50i-de2.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 60 insertions(+)
 create mode 100644 drivers/bus/sun50i-de2.c

diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index ff70850031c5..cc8e4b4b6b59 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -95,6 +95,16 @@ config SIMPLE_PM_BUS
 	  Controller (BSC, sometimes called "LBSC within Bus Bridge", or
 	  "External Bus Interface") as found on several Renesas ARM SoCs.
 
+config SUN50I_DE2_BUS
+	bool "Allwinner A64 DE2 Bus Driver"
+	  default ARM64
+	  depends on ARCH_SUNXI
+	  select SUNXI_SRAM
+	  help
+	  Say y here to enable support for Allwinner A64 DE2 bus driver. It's
+	  mostly transparent, but a SRAM region needs to be claimed in the SRAM
+	  controller to make the all blocks in the DE2 part accessible.
+
 config SUNXI_RSB
 	tristate "Allwinner sunXi Reduced Serial Bus Driver"
 	  default MACH_SUN8I || MACH_SUN9I || ARM64
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index 3d473b8adeac..746ff0cebe10 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_OMAP_INTERCONNECT)	+= omap_l3_smx.o omap_l3_noc.o
 
 obj-$(CONFIG_OMAP_OCP2SCP)	+= omap-ocp2scp.o
 obj-$(CONFIG_QCOM_EBI2)		+= qcom-ebi2.o
+obj-$(CONFIG_SUN50I_DE2_BUS)	+= sun50i-de2.o
 obj-$(CONFIG_SUNXI_RSB)		+= sunxi-rsb.o
 obj-$(CONFIG_SIMPLE_PM_BUS)	+= simple-pm-bus.o
 obj-$(CONFIG_TEGRA_ACONNECT)	+= tegra-aconnect.o
diff --git a/drivers/bus/sun50i-de2.c b/drivers/bus/sun50i-de2.c
new file mode 100644
index 000000000000..836828ef96d5
--- /dev/null
+++ b/drivers/bus/sun50i-de2.c
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Allwinner A64 Display Engine 2.0 Bus Driver
+ *
+ * Copyright (C) 2018 Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
+ */
+
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+#include <linux/soc/sunxi/sunxi_sram.h>
+
+static int sun50i_de2_bus_probe(struct platform_device *pdev)
+{
+	struct device_node *np = pdev->dev.of_node;
+	int ret;
+
+	ret = sunxi_sram_claim(&pdev->dev);
+	if (ret) {
+		dev_err(&pdev->dev, "Error couldn't map SRAM to device\n");
+		return ret;
+	}
+
+	if (np)
+		of_platform_populate(np, NULL, NULL, &pdev->dev);
+
+	return 0;
+}
+
+static int sun50i_de2_bus_remove(struct platform_device *pdev)
+{
+	sunxi_sram_release(&pdev->dev);
+	return 0;
+}
+
+static const struct of_device_id sun50i_de2_bus_of_match[] = {
+	{ .compatible = "allwinner,sun50i-a64-de2", },
+	{ /* sentinel */ }
+};
+
+static struct platform_driver sun50i_de2_bus_driver = {
+	.probe = sun50i_de2_bus_probe,
+	.remove = sun50i_de2_bus_remove,
+	.driver = {
+		.name = "sun50i-de2-bus",
+		.of_match_table = sun50i_de2_bus_of_match,
+	},
+};
+
+builtin_platform_driver(sun50i_de2_bus_driver);
-- 
2.15.1

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

* [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 SoC
is different from the ones on other Allwinner SoCs. It requires a SRAM
region to be claimed, otherwise all DE2 subblocks won't be accessible.

Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM
region when probing.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 drivers/bus/Kconfig      | 10 ++++++++++
 drivers/bus/Makefile     |  1 +
 drivers/bus/sun50i-de2.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 60 insertions(+)
 create mode 100644 drivers/bus/sun50i-de2.c

diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index ff70850031c5..cc8e4b4b6b59 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -95,6 +95,16 @@ config SIMPLE_PM_BUS
 	  Controller (BSC, sometimes called "LBSC within Bus Bridge", or
 	  "External Bus Interface") as found on several Renesas ARM SoCs.
 
+config SUN50I_DE2_BUS
+	bool "Allwinner A64 DE2 Bus Driver"
+	  default ARM64
+	  depends on ARCH_SUNXI
+	  select SUNXI_SRAM
+	  help
+	  Say y here to enable support for Allwinner A64 DE2 bus driver. It's
+	  mostly transparent, but a SRAM region needs to be claimed in the SRAM
+	  controller to make the all blocks in the DE2 part accessible.
+
 config SUNXI_RSB
 	tristate "Allwinner sunXi Reduced Serial Bus Driver"
 	  default MACH_SUN8I || MACH_SUN9I || ARM64
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index 3d473b8adeac..746ff0cebe10 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_OMAP_INTERCONNECT)	+= omap_l3_smx.o omap_l3_noc.o
 
 obj-$(CONFIG_OMAP_OCP2SCP)	+= omap-ocp2scp.o
 obj-$(CONFIG_QCOM_EBI2)		+= qcom-ebi2.o
+obj-$(CONFIG_SUN50I_DE2_BUS)	+= sun50i-de2.o
 obj-$(CONFIG_SUNXI_RSB)		+= sunxi-rsb.o
 obj-$(CONFIG_SIMPLE_PM_BUS)	+= simple-pm-bus.o
 obj-$(CONFIG_TEGRA_ACONNECT)	+= tegra-aconnect.o
diff --git a/drivers/bus/sun50i-de2.c b/drivers/bus/sun50i-de2.c
new file mode 100644
index 000000000000..836828ef96d5
--- /dev/null
+++ b/drivers/bus/sun50i-de2.c
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Allwinner A64 Display Engine 2.0 Bus Driver
+ *
+ * Copyright (C) 2018 Icenowy Zheng <icenowy@aosc.io>
+ */
+
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+#include <linux/soc/sunxi/sunxi_sram.h>
+
+static int sun50i_de2_bus_probe(struct platform_device *pdev)
+{
+	struct device_node *np = pdev->dev.of_node;
+	int ret;
+
+	ret = sunxi_sram_claim(&pdev->dev);
+	if (ret) {
+		dev_err(&pdev->dev, "Error couldn't map SRAM to device\n");
+		return ret;
+	}
+
+	if (np)
+		of_platform_populate(np, NULL, NULL, &pdev->dev);
+
+	return 0;
+}
+
+static int sun50i_de2_bus_remove(struct platform_device *pdev)
+{
+	sunxi_sram_release(&pdev->dev);
+	return 0;
+}
+
+static const struct of_device_id sun50i_de2_bus_of_match[] = {
+	{ .compatible = "allwinner,sun50i-a64-de2", },
+	{ /* sentinel */ }
+};
+
+static struct platform_driver sun50i_de2_bus_driver = {
+	.probe = sun50i_de2_bus_probe,
+	.remove = sun50i_de2_bus_remove,
+	.driver = {
+		.name = "sun50i-de2-bus",
+		.of_match_table = sun50i_de2_bus_of_match,
+	},
+};
+
+builtin_platform_driver(sun50i_de2_bus_driver);
-- 
2.15.1

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

* [PATCH 4/7] clk: sunxi-ng: add A64 compatible string
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-clk,
	linux-sunxi, Icenowy Zheng

As claiming Allwinner A64 SRAM C is a prerequisite for all sub-blocks of
the A64 DE2, not only the CCU sub-block, a bus driver is then written for
enabling the access to the whole DE2 part by claiming the SRAM.

In this situation, the A64 compatible string will be just added with no
other requirments, as they're processed by the parent bus driver.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 drivers/clk/sunxi-ng/ccu-sun8i-de2.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-de2.c b/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
index 468d1abaf0ee..8df7cd93453e 100644
--- a/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
+++ b/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
@@ -292,13 +292,10 @@ static const struct of_device_id sunxi_de2_clk_ids[] = {
 		.compatible = "allwinner,sun50i-h5-de2-clk",
 		.data = &sun50i_a64_de2_clk_desc,
 	},
-	/*
-	 * The Allwinner A64 SoC needs some bit to be poke in syscon to make
-	 * DE2 really working.
-	 * So there's currently no A64 compatible here.
-	 * H5 shares the same reset line with A64, so here H5 is using the
-	 * clock description of A64.
-	 */
+	{
+		.compatible = "allwinner,sun50i-a64-de2-clk",
+		.data = &sun50i_a64_de2_clk_desc,
+	},
 	{ }
 };
 
-- 
2.15.1

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

* [PATCH 4/7] clk: sunxi-ng: add A64 compatible string
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

As claiming Allwinner A64 SRAM C is a prerequisite for all sub-blocks of
the A64 DE2, not only the CCU sub-block, a bus driver is then written for
enabling the access to the whole DE2 part by claiming the SRAM.

In this situation, the A64 compatible string will be just added with no
other requirments, as they're processed by the parent bus driver.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
 drivers/clk/sunxi-ng/ccu-sun8i-de2.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-de2.c b/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
index 468d1abaf0ee..8df7cd93453e 100644
--- a/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
+++ b/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
@@ -292,13 +292,10 @@ static const struct of_device_id sunxi_de2_clk_ids[] = {
 		.compatible = "allwinner,sun50i-h5-de2-clk",
 		.data = &sun50i_a64_de2_clk_desc,
 	},
-	/*
-	 * The Allwinner A64 SoC needs some bit to be poke in syscon to make
-	 * DE2 really working.
-	 * So there's currently no A64 compatible here.
-	 * H5 shares the same reset line with A64, so here H5 is using the
-	 * clock description of A64.
-	 */
+	{
+		.compatible = "allwinner,sun50i-a64-de2-clk",
+		.data = &sun50i_a64_de2_clk_desc,
+	},
 	{ }
 };
 
-- 
2.15.1

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

* [PATCH 4/7] clk: sunxi-ng: add A64 compatible string
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

As claiming Allwinner A64 SRAM C is a prerequisite for all sub-blocks of
the A64 DE2, not only the CCU sub-block, a bus driver is then written for
enabling the access to the whole DE2 part by claiming the SRAM.

In this situation, the A64 compatible string will be just added with no
other requirments, as they're processed by the parent bus driver.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 drivers/clk/sunxi-ng/ccu-sun8i-de2.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-de2.c b/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
index 468d1abaf0ee..8df7cd93453e 100644
--- a/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
+++ b/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
@@ -292,13 +292,10 @@ static const struct of_device_id sunxi_de2_clk_ids[] = {
 		.compatible = "allwinner,sun50i-h5-de2-clk",
 		.data = &sun50i_a64_de2_clk_desc,
 	},
-	/*
-	 * The Allwinner A64 SoC needs some bit to be poke in syscon to make
-	 * DE2 really working.
-	 * So there's currently no A64 compatible here.
-	 * H5 shares the same reset line with A64, so here H5 is using the
-	 * clock description of A64.
-	 */
+	{
+		.compatible = "allwinner,sun50i-a64-de2-clk",
+		.data = &sun50i_a64_de2_clk_desc,
+	},
 	{ }
 };
 
-- 
2.15.1

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

* [PATCH 5/7] arm64: allwinner: a64: add DE2 CCU related device tree nodes
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-clk,
	linux-sunxi, Icenowy Zheng

As we have all necessary parts to enable the DE2 CCU on the Allwinner
A64 SoC, add the needed device tree nodes, including the SRAM controller
node, SRAM C node, DE2 bus node and DE2 CCU node.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 42 +++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 1b6dc31e7d91..1f92015503ea 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -148,6 +148,48 @@
 		#size-cells = <1>;
 		ranges;
 
+		de2@1000000 {
+			compatible = "allwinner,sun50i-a64-de2";
+			reg = <0x1000000 0x400000>;
+			allwinner,sram = <&de2_sram 1>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x1000000 0x400000>;
+
+			display_clocks: clock@0 {
+				compatible = "allwinner,sun50i-a64-de2-clk";
+				reg = <0x0 0x100000>;
+				clocks = <&ccu CLK_DE>,
+					 <&ccu CLK_BUS_DE>;
+				clock-names = "mod",
+					      "bus";
+				resets = <&ccu RST_BUS_DE>;
+				#clock-cells = <1>;
+				#reset-cells = <1>;
+			};
+		};
+
+		sram-controller@1c00000 {
+			compatible = "allwinner,sun50i-a64-sram-controller";
+			reg = <0x01c00000 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			sram_c: sram@18000 {
+				compatible = "mmio-sram";
+				reg = <0x00018000 0x28000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges = <0 0x00018000 0x28000>;
+
+				de2_sram: sram-section@0 {
+					compatible = "allwinner,sun50i-a64-sram-c";
+					reg = <0x0000 0x28000>;
+				};
+			};
+		};
+
 		syscon: syscon@1c00000 {
 			compatible = "allwinner,sun50i-a64-system-controller",
 				"syscon";
-- 
2.15.1

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

* [PATCH 5/7] arm64: allwinner: a64: add DE2 CCU related device tree nodes
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

As we have all necessary parts to enable the DE2 CCU on the Allwinner
A64 SoC, add the needed device tree nodes, including the SRAM controller
node, SRAM C node, DE2 bus node and DE2 CCU node.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 42 +++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 1b6dc31e7d91..1f92015503ea 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -148,6 +148,48 @@
 		#size-cells = <1>;
 		ranges;
 
+		de2@1000000 {
+			compatible = "allwinner,sun50i-a64-de2";
+			reg = <0x1000000 0x400000>;
+			allwinner,sram = <&de2_sram 1>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x1000000 0x400000>;
+
+			display_clocks: clock@0 {
+				compatible = "allwinner,sun50i-a64-de2-clk";
+				reg = <0x0 0x100000>;
+				clocks = <&ccu CLK_DE>,
+					 <&ccu CLK_BUS_DE>;
+				clock-names = "mod",
+					      "bus";
+				resets = <&ccu RST_BUS_DE>;
+				#clock-cells = <1>;
+				#reset-cells = <1>;
+			};
+		};
+
+		sram-controller@1c00000 {
+			compatible = "allwinner,sun50i-a64-sram-controller";
+			reg = <0x01c00000 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			sram_c: sram@18000 {
+				compatible = "mmio-sram";
+				reg = <0x00018000 0x28000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges = <0 0x00018000 0x28000>;
+
+				de2_sram: sram-section@0 {
+					compatible = "allwinner,sun50i-a64-sram-c";
+					reg = <0x0000 0x28000>;
+				};
+			};
+		};
+
 		syscon: syscon@1c00000 {
 			compatible = "allwinner,sun50i-a64-system-controller",
 				"syscon";
-- 
2.15.1

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

* [PATCH 5/7] arm64: allwinner: a64: add DE2 CCU related device tree nodes
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

As we have all necessary parts to enable the DE2 CCU on the Allwinner
A64 SoC, add the needed device tree nodes, including the SRAM controller
node, SRAM C node, DE2 bus node and DE2 CCU node.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 42 +++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 1b6dc31e7d91..1f92015503ea 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -148,6 +148,48 @@
 		#size-cells = <1>;
 		ranges;
 
+		de2 at 1000000 {
+			compatible = "allwinner,sun50i-a64-de2";
+			reg = <0x1000000 0x400000>;
+			allwinner,sram = <&de2_sram 1>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x1000000 0x400000>;
+
+			display_clocks: clock at 0 {
+				compatible = "allwinner,sun50i-a64-de2-clk";
+				reg = <0x0 0x100000>;
+				clocks = <&ccu CLK_DE>,
+					 <&ccu CLK_BUS_DE>;
+				clock-names = "mod",
+					      "bus";
+				resets = <&ccu RST_BUS_DE>;
+				#clock-cells = <1>;
+				#reset-cells = <1>;
+			};
+		};
+
+		sram-controller at 1c00000 {
+			compatible = "allwinner,sun50i-a64-sram-controller";
+			reg = <0x01c00000 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			sram_c: sram at 18000 {
+				compatible = "mmio-sram";
+				reg = <0x00018000 0x28000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges = <0 0x00018000 0x28000>;
+
+				de2_sram: sram-section at 0 {
+					compatible = "allwinner,sun50i-a64-sram-c";
+					reg = <0x0000 0x28000>;
+				};
+			};
+		};
+
 		syscon: syscon at 1c00000 {
 			compatible = "allwinner,sun50i-a64-system-controller",
 				"syscon";
-- 
2.15.1

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

* [PATCH 6/7] arm64: allwinner: a64: add simplefb for A64 SoC
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-clk,
	linux-sunxi, Icenowy Zheng

The A64 SoC features two display pipelines, one has a LCD output, the
other has a HDMI output.

Add support for simplefb for these pipelines on A64 SoC.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 1f92015503ea..7767d0761b2e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -42,9 +42,11 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <dt-bindings/clock/sun8i-de2.h>
 #include <dt-bindings/clock/sun50i-a64-ccu.h>
 #include <dt-bindings/clock/sun8i-r-ccu.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/sun8i-de2.h>
 #include <dt-bindings/reset/sun50i-a64-ccu.h>
 
 / {
@@ -52,6 +54,30 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
+	chosen {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		simplefb_lcd: framebuffer-lcd {
+			compatible = "allwinner,simple-framebuffer",
+				     "simple-framebuffer";
+			allwinner,pipeline = "mixer0-lcd0";
+			clocks = <&display_clocks CLK_MIXER0>,
+				 <&ccu CLK_TCON0>;
+			status = "disabled";
+		};
+
+		simplefb_hdmi: framebuffer-hdmi {
+			compatible = "allwinner,simple-framebuffer",
+				     "simple-framebuffer";
+			allwinner,pipeline = "mixer1-lcd1-hdmi";
+			clocks = <&display_clocks CLK_MIXER1>,
+				 <&ccu CLK_TCON1>, <&ccu CLK_HDMI>;
+			status = "disabled";
+		};
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
-- 
2.15.1

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

* [PATCH 6/7] arm64: allwinner: a64: add simplefb for A64 SoC
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

The A64 SoC features two display pipelines, one has a LCD output, the
other has a HDMI output.

Add support for simplefb for these pipelines on A64 SoC.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 1f92015503ea..7767d0761b2e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -42,9 +42,11 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <dt-bindings/clock/sun8i-de2.h>
 #include <dt-bindings/clock/sun50i-a64-ccu.h>
 #include <dt-bindings/clock/sun8i-r-ccu.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/sun8i-de2.h>
 #include <dt-bindings/reset/sun50i-a64-ccu.h>
 
 / {
@@ -52,6 +54,30 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
+	chosen {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		simplefb_lcd: framebuffer-lcd {
+			compatible = "allwinner,simple-framebuffer",
+				     "simple-framebuffer";
+			allwinner,pipeline = "mixer0-lcd0";
+			clocks = <&display_clocks CLK_MIXER0>,
+				 <&ccu CLK_TCON0>;
+			status = "disabled";
+		};
+
+		simplefb_hdmi: framebuffer-hdmi {
+			compatible = "allwinner,simple-framebuffer",
+				     "simple-framebuffer";
+			allwinner,pipeline = "mixer1-lcd1-hdmi";
+			clocks = <&display_clocks CLK_MIXER1>,
+				 <&ccu CLK_TCON1>, <&ccu CLK_HDMI>;
+			status = "disabled";
+		};
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
-- 
2.15.1

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

* [PATCH 6/7] arm64: allwinner: a64: add simplefb for A64 SoC
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

The A64 SoC features two display pipelines, one has a LCD output, the
other has a HDMI output.

Add support for simplefb for these pipelines on A64 SoC.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 1f92015503ea..7767d0761b2e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -42,9 +42,11 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <dt-bindings/clock/sun8i-de2.h>
 #include <dt-bindings/clock/sun50i-a64-ccu.h>
 #include <dt-bindings/clock/sun8i-r-ccu.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/sun8i-de2.h>
 #include <dt-bindings/reset/sun50i-a64-ccu.h>
 
 / {
@@ -52,6 +54,30 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
+	chosen {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		simplefb_lcd: framebuffer-lcd {
+			compatible = "allwinner,simple-framebuffer",
+				     "simple-framebuffer";
+			allwinner,pipeline = "mixer0-lcd0";
+			clocks = <&display_clocks CLK_MIXER0>,
+				 <&ccu CLK_TCON0>;
+			status = "disabled";
+		};
+
+		simplefb_hdmi: framebuffer-hdmi {
+			compatible = "allwinner,simple-framebuffer",
+				     "simple-framebuffer";
+			allwinner,pipeline = "mixer1-lcd1-hdmi";
+			clocks = <&display_clocks CLK_MIXER1>,
+				 <&ccu CLK_TCON1>, <&ccu CLK_HDMI>;
+			status = "disabled";
+		};
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
-- 
2.15.1

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

* [PATCH 7/7] arm64: allwinner: a64: add HDMI regulator to all DTs' simplefb_hdmi
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-clk,
	linux-sunxi, Icenowy Zheng

On usual A64 board design the power of HDMI controller is connected to
DLDO1 of the AXP803 PMIC. If this regulator is shut down, the HDMI
output will be blank. Therefore the simplefb driver should keep this
regulator on.

Add the regulator to all currently available A64 boards' simplefb_hdmi
device node.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts     | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts       | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts        | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts     | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts           | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 4 ++++
 6 files changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index 2250dec9974c..2fd343512d41 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -282,6 +282,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
index e2dce48fa29a..98dbff19f5cc 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
@@ -195,6 +195,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index 3b3081b10ecb..3f531393eaee 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -214,6 +214,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
index bf42690a3361..1221764f5719 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -191,6 +191,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index a75825798a71..1b9b92e541d2 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -229,6 +229,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 /* On Euler connector */
 &spdif {
 	status = "disabled";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index abe179de35d7..c21f2331add6 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -134,6 +134,10 @@
 	regulator-name = "vcc-wifi";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
-- 
2.15.1

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

* [PATCH 7/7] arm64: allwinner: a64: add HDMI regulator to all DTs' simplefb_hdmi
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

On usual A64 board design the power of HDMI controller is connected to
DLDO1 of the AXP803 PMIC. If this regulator is shut down, the HDMI
output will be blank. Therefore the simplefb driver should keep this
regulator on.

Add the regulator to all currently available A64 boards' simplefb_hdmi
device node.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts     | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts       | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts        | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts     | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts           | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 4 ++++
 6 files changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index 2250dec9974c..2fd343512d41 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -282,6 +282,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
index e2dce48fa29a..98dbff19f5cc 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
@@ -195,6 +195,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index 3b3081b10ecb..3f531393eaee 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -214,6 +214,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
index bf42690a3361..1221764f5719 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -191,6 +191,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index a75825798a71..1b9b92e541d2 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -229,6 +229,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 /* On Euler connector */
 &spdif {
 	status = "disabled";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index abe179de35d7..c21f2331add6 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -134,6 +134,10 @@
 	regulator-name = "vcc-wifi";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
-- 
2.15.1

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

* [PATCH 7/7] arm64: allwinner: a64: add HDMI regulator to all DTs' simplefb_hdmi
@ 2018-03-16 17:53   ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-16 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

On usual A64 board design the power of HDMI controller is connected to
DLDO1 of the AXP803 PMIC. If this regulator is shut down, the HDMI
output will be blank. Therefore the simplefb driver should keep this
regulator on.

Add the regulator to all currently available A64 boards' simplefb_hdmi
device node.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts     | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts       | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts        | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts     | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts           | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 4 ++++
 6 files changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index 2250dec9974c..2fd343512d41 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -282,6 +282,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
index e2dce48fa29a..98dbff19f5cc 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
@@ -195,6 +195,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index 3b3081b10ecb..3f531393eaee 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -214,6 +214,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
index bf42690a3361..1221764f5719 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -191,6 +191,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index a75825798a71..1b9b92e541d2 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -229,6 +229,10 @@
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 /* On Euler connector */
 &spdif {
 	status = "disabled";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index abe179de35d7..c21f2331add6 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -134,6 +134,10 @@
 	regulator-name = "vcc-wifi";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
-- 
2.15.1

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

* Re: [PATCH 1/7] dt-bindings: add compatible string for the A64 DE2 CCU
  2018-03-16 17:53   ` Icenowy Zheng
  (?)
@ 2018-03-19 22:00     ` Stephen Boyd
  -1 siblings, 0 replies; 60+ messages in thread
From: Stephen Boyd @ 2018-03-19 22:00 UTC (permalink / raw)
  To: Chen-Yu Tsai, Icenowy Zheng, Maxime Ripard, Rob Herring
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-clk,
	linux-sunxi, Icenowy Zheng

Quoting Icenowy Zheng (2018-03-16 10:53:48)
> The Allwinner A64 SoC has a DE2 CCU like the one in the DE2 of Allwinner
> H5 SoC.
> 
> Add a compatible string for it.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

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

* Re: [PATCH 1/7] dt-bindings: add compatible string for the A64 DE2 CCU
@ 2018-03-19 22:00     ` Stephen Boyd
  0 siblings, 0 replies; 60+ messages in thread
From: Stephen Boyd @ 2018-03-19 22:00 UTC (permalink / raw)
  To: Chen-Yu Tsai, Maxime Ripard, Rob Herring
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-clk,
	linux-sunxi, Icenowy Zheng

Quoting Icenowy Zheng (2018-03-16 10:53:48)
> The Allwinner A64 SoC has a DE2 CCU like the one in the DE2 of Allwinner
> H5 SoC.
> 
> Add a compatible string for it.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

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

* [PATCH 1/7] dt-bindings: add compatible string for the A64 DE2 CCU
@ 2018-03-19 22:00     ` Stephen Boyd
  0 siblings, 0 replies; 60+ messages in thread
From: Stephen Boyd @ 2018-03-19 22:00 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting Icenowy Zheng (2018-03-16 10:53:48)
> The Allwinner A64 SoC has a DE2 CCU like the one in the DE2 of Allwinner
> H5 SoC.
> 
> Add a compatible string for it.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

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

* Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
  2018-03-16 17:53   ` Icenowy Zheng
@ 2018-03-20 18:46     ` Maxime Ripard
  -1 siblings, 0 replies; 60+ messages in thread
From: Maxime Ripard @ 2018-03-20 18:46 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Rob Herring, Chen-Yu Tsai, devicetree, linux-arm-kernel,
	linux-kernel, linux-clk, linux-sunxi

On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64 SoC to
> be claimed, otherwise the whole DE2 space is inaccessible.
> 
> Add a device tree binding of the DE2 part as a sub-bus.

Where did you get the info that it was a bus?

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-20 18:46     ` Maxime Ripard
  0 siblings, 0 replies; 60+ messages in thread
From: Maxime Ripard @ 2018-03-20 18:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64 SoC to
> be claimed, otherwise the whole DE2 space is inaccessible.
> 
> Add a device tree binding of the DE2 part as a sub-bus.

Where did you get the info that it was a bus?

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [PATCH 5/7] arm64: allwinner: a64: add DE2 CCU related device tree nodes
  2018-03-16 17:53   ` Icenowy Zheng
@ 2018-03-20 18:47     ` Maxime Ripard
  -1 siblings, 0 replies; 60+ messages in thread
From: Maxime Ripard @ 2018-03-20 18:47 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Rob Herring, Chen-Yu Tsai, devicetree, linux-arm-kernel,
	linux-kernel, linux-clk, linux-sunxi

On Sat, Mar 17, 2018 at 01:53:52AM +0800, Icenowy Zheng wrote:
> +		sram-controller@1c00000 {
> +			compatible = "allwinner,sun50i-a64-sram-controller";
> +			reg = <0x01c00000 0x1000>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges;
> +
> +			sram_c: sram@18000 {
> +				compatible = "mmio-sram";
> +				reg = <0x00018000 0x28000>;
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges = <0 0x00018000 0x28000>;
> +
> +				de2_sram: sram-section@0 {
> +					compatible = "allwinner,sun50i-a64-sram-c";
> +					reg = <0x0000 0x28000>;
> +				};
> +			};
> +		};
> +
>  		syscon: syscon@1c00000 {
>  			compatible = "allwinner,sun50i-a64-system-controller",
>  				"syscon";

Isn't that the same device than the sram controller node you just added?

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [PATCH 5/7] arm64: allwinner: a64: add DE2 CCU related device tree nodes
@ 2018-03-20 18:47     ` Maxime Ripard
  0 siblings, 0 replies; 60+ messages in thread
From: Maxime Ripard @ 2018-03-20 18:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Mar 17, 2018 at 01:53:52AM +0800, Icenowy Zheng wrote:
> +		sram-controller at 1c00000 {
> +			compatible = "allwinner,sun50i-a64-sram-controller";
> +			reg = <0x01c00000 0x1000>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges;
> +
> +			sram_c: sram at 18000 {
> +				compatible = "mmio-sram";
> +				reg = <0x00018000 0x28000>;
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges = <0 0x00018000 0x28000>;
> +
> +				de2_sram: sram-section at 0 {
> +					compatible = "allwinner,sun50i-a64-sram-c";
> +					reg = <0x0000 0x28000>;
> +				};
> +			};
> +		};
> +
>  		syscon: syscon at 1c00000 {
>  			compatible = "allwinner,sun50i-a64-system-controller",
>  				"syscon";

Isn't that the same device than the sram controller node you just added?

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
  2018-03-20 18:46     ` Maxime Ripard
  (?)
@ 2018-03-21  2:18       ` Icenowy Zheng
  -1 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-21  2:18 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Rob Herring, Chen-Yu Tsai, devicetree, linux-arm-kernel,
	linux-kernel, linux-clk, linux-sunxi



于 2018年3月21日 GMT+08:00 上午2:46:46, Maxime Ripard <maxime.ripard@bootlin.com> 写到:
>On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
>> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64 SoC
>to
>> be claimed, otherwise the whole DE2 space is inaccessible.
>> 
>> Add a device tree binding of the DE2 part as a sub-bus.
>
>Where did you get the info that it was a bus?

There's no direct evidence, just some guess.

The DE2 is a whole part that is just allocated a memory
space at the user manual, and the SRAM controls the
access to all modules in the DE2.

So it might be a bus.

Implement it as a bus is a clear representation on A64.

>
>Maxime

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

* Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-21  2:18       ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-21  2:18 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Rob Herring, Chen-Yu Tsai, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw



于 2018年3月21日 GMT+08:00 上午2:46:46, Maxime Ripard <maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org> 写到:
>On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
>> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64 SoC
>to
>> be claimed, otherwise the whole DE2 space is inaccessible.
>> 
>> Add a device tree binding of the DE2 part as a sub-bus.
>
>Where did you get the info that it was a bus?

There's no direct evidence, just some guess.

The DE2 is a whole part that is just allocated a memory
space at the user manual, and the SRAM controls the
access to all modules in the DE2.

So it might be a bus.

Implement it as a bus is a clear representation on A64.

>
>Maxime

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

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

* [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-21  2:18       ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-21  2:18 UTC (permalink / raw)
  To: linux-arm-kernel



? 2018?3?21? GMT+08:00 ??2:46:46, Maxime Ripard <maxime.ripard@bootlin.com> ??:
>On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
>> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64 SoC
>to
>> be claimed, otherwise the whole DE2 space is inaccessible.
>> 
>> Add a device tree binding of the DE2 part as a sub-bus.
>
>Where did you get the info that it was a bus?

There's no direct evidence, just some guess.

The DE2 is a whole part that is just allocated a memory
space at the user manual, and the SRAM controls the
access to all modules in the DE2.

So it might be a bus.

Implement it as a bus is a clear representation on A64.

>
>Maxime

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

* Re: [linux-sunxi] Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
  2018-03-21  2:18       ` Icenowy Zheng
@ 2018-03-21 17:13         ` Jernej Škrabec
  -1 siblings, 0 replies; 60+ messages in thread
From: Jernej Škrabec @ 2018-03-21 17:13 UTC (permalink / raw)
  To: linux-sunxi, icenowy
  Cc: Maxime Ripard, Rob Herring, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel, linux-clk

Hi all,

Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng napisal(a):
> 于 2018年3月21日 GMT+08:00 上午2:46:46, Maxime Ripard <maxime.ripard@bootlin.com> 
写到:
> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64 SoC
> >
> >to
> >
> >> be claimed, otherwise the whole DE2 space is inaccessible.
> >> 
> >> Add a device tree binding of the DE2 part as a sub-bus.
> >
> >Where did you get the info that it was a bus?
> 
> There's no direct evidence, just some guess.
> 
> The DE2 is a whole part that is just allocated a memory
> space at the user manual, and the SRAM controls the
> access to all modules in the DE2.
> 
> So it might be a bus.
> 
> Implement it as a bus is a clear representation on A64.

Since there is already syscon for same mmio region, we migh as well use it 
when loading ccu-sun8i-de2 driver on A64.

Other options, like SRAM driver or bus driver, might better represent HW, but 
then we would have two DT nodes covering same mmio region, which I think is 
not really acceptable.

Any suggestions?

BTW, H6 has same design in this regard.

Best regards,
Jernej

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

* [linux-sunxi] Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-21 17:13         ` Jernej Škrabec
  0 siblings, 0 replies; 60+ messages in thread
From: Jernej Škrabec @ 2018-03-21 17:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng napisal(a):
> ? 2018?3?21? GMT+08:00 ??2:46:46, Maxime Ripard <maxime.ripard@bootlin.com> 
??:
> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64 SoC
> >
> >to
> >
> >> be claimed, otherwise the whole DE2 space is inaccessible.
> >> 
> >> Add a device tree binding of the DE2 part as a sub-bus.
> >
> >Where did you get the info that it was a bus?
> 
> There's no direct evidence, just some guess.
> 
> The DE2 is a whole part that is just allocated a memory
> space at the user manual, and the SRAM controls the
> access to all modules in the DE2.
> 
> So it might be a bus.
> 
> Implement it as a bus is a clear representation on A64.

Since there is already syscon for same mmio region, we migh as well use it 
when loading ccu-sun8i-de2 driver on A64.

Other options, like SRAM driver or bus driver, might better represent HW, but 
then we would have two DT nodes covering same mmio region, which I think is 
not really acceptable.

Any suggestions?

BTW, H6 has same design in this regard.

Best regards,
Jernej

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

* Re: [linux-sunxi] Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
  2018-03-21 17:13         ` Jernej Škrabec
  (?)
@ 2018-03-22  6:08           ` Icenowy Zheng
  -1 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-22  6:08 UTC (permalink / raw)
  To: jernej.skrabec, Jernej Škrabec, linux-sunxi
  Cc: Maxime Ripard, Rob Herring, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel, linux-clk



于 2018年3月22日 GMT+08:00 上午1:13:42, "Jernej Škrabec" <jernej.skrabec@siol.net> 写到:
>Hi all,
>
>Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng napisal(a):
>> 于 2018年3月21日 GMT+08:00 上午2:46:46, Maxime Ripard
><maxime.ripard@bootlin.com> 
>写到:
>> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
>> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64
>SoC
>> >
>> >to
>> >
>> >> be claimed, otherwise the whole DE2 space is inaccessible.
>> >> 
>> >> Add a device tree binding of the DE2 part as a sub-bus.
>> >
>> >Where did you get the info that it was a bus?
>> 
>> There's no direct evidence, just some guess.
>> 
>> The DE2 is a whole part that is just allocated a memory
>> space at the user manual, and the SRAM controls the
>> access to all modules in the DE2.
>> 
>> So it might be a bus.
>> 
>> Implement it as a bus is a clear representation on A64.
>
>Since there is already syscon for same mmio region, we migh as well use
>it 
>when loading ccu-sun8i-de2 driver on A64.
>
>Other options, like SRAM driver or bus driver, might better represent
>HW, but 

I think the device tree should properly represent the HW,
it's a basic requirment.

>then we would have two DT nodes covering same mmio region, which I
>think is 
>not really acceptable.

It's acceptable, and DE2 is not the only user of SRAM controller so far.

VE will also need a SRAM region to be claimed.

>
>Any suggestions?
>
>BTW, H6 has same design in this regard.
>
>Best regards,
>Jernej

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

* Re: Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-22  6:08           ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-22  6:08 UTC (permalink / raw)
  To: jernej.skrabec-gGgVlfcn5nU
  Cc: Maxime Ripard, Rob Herring, Chen-Yu Tsai,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA



于 2018年3月22日 GMT+08:00 上午1:13:42, "Jernej Škrabec" <jernej.skrabec-gGgVlfcn5nU@public.gmane.org> 写到:
>Hi all,
>
>Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng napisal(a):
>> 于 2018年3月21日 GMT+08:00 上午2:46:46, Maxime Ripard
><maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org> 
>写到:
>> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
>> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64
>SoC
>> >
>> >to
>> >
>> >> be claimed, otherwise the whole DE2 space is inaccessible.
>> >> 
>> >> Add a device tree binding of the DE2 part as a sub-bus.
>> >
>> >Where did you get the info that it was a bus?
>> 
>> There's no direct evidence, just some guess.
>> 
>> The DE2 is a whole part that is just allocated a memory
>> space at the user manual, and the SRAM controls the
>> access to all modules in the DE2.
>> 
>> So it might be a bus.
>> 
>> Implement it as a bus is a clear representation on A64.
>
>Since there is already syscon for same mmio region, we migh as well use
>it 
>when loading ccu-sun8i-de2 driver on A64.
>
>Other options, like SRAM driver or bus driver, might better represent
>HW, but 

I think the device tree should properly represent the HW,
it's a basic requirment.

>then we would have two DT nodes covering same mmio region, which I
>think is 
>not really acceptable.

It's acceptable, and DE2 is not the only user of SRAM controller so far.

VE will also need a SRAM region to be claimed.

>
>Any suggestions?
>
>BTW, H6 has same design in this regard.
>
>Best regards,
>Jernej

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

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

* [linux-sunxi] Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-22  6:08           ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-22  6:08 UTC (permalink / raw)
  To: linux-arm-kernel



? 2018?3?22? GMT+08:00 ??1:13:42, "Jernej ?krabec" <jernej.skrabec@siol.net> ??:
>Hi all,
>
>Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng napisal(a):
>> ? 2018?3?21? GMT+08:00 ??2:46:46, Maxime Ripard
><maxime.ripard@bootlin.com> 
>??:
>> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
>> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64
>SoC
>> >
>> >to
>> >
>> >> be claimed, otherwise the whole DE2 space is inaccessible.
>> >> 
>> >> Add a device tree binding of the DE2 part as a sub-bus.
>> >
>> >Where did you get the info that it was a bus?
>> 
>> There's no direct evidence, just some guess.
>> 
>> The DE2 is a whole part that is just allocated a memory
>> space at the user manual, and the SRAM controls the
>> access to all modules in the DE2.
>> 
>> So it might be a bus.
>> 
>> Implement it as a bus is a clear representation on A64.
>
>Since there is already syscon for same mmio region, we migh as well use
>it 
>when loading ccu-sun8i-de2 driver on A64.
>
>Other options, like SRAM driver or bus driver, might better represent
>HW, but 

I think the device tree should properly represent the HW,
it's a basic requirment.

>then we would have two DT nodes covering same mmio region, which I
>think is 
>not really acceptable.

It's acceptable, and DE2 is not the only user of SRAM controller so far.

VE will also need a SRAM region to be claimed.

>
>Any suggestions?
>
>BTW, H6 has same design in this regard.
>
>Best regards,
>Jernej

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

* Re: [PATCH 1/7] dt-bindings: add compatible string for the A64 DE2 CCU
@ 2018-03-26 22:22     ` Rob Herring
  0 siblings, 0 replies; 60+ messages in thread
From: Rob Herring @ 2018-03-26 22:22 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Maxime Ripard, Chen-Yu Tsai, devicetree, linux-arm-kernel,
	linux-kernel, linux-clk, linux-sunxi

On Sat, Mar 17, 2018 at 01:53:48AM +0800, Icenowy Zheng wrote:
> The Allwinner A64 SoC has a DE2 CCU like the one in the DE2 of Allwinner
> H5 SoC.
> 
> Add a compatible string for it.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
>  Documentation/devicetree/bindings/clock/sun8i-de2.txt | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 1/7] dt-bindings: add compatible string for the A64 DE2 CCU
@ 2018-03-26 22:22     ` Rob Herring
  0 siblings, 0 replies; 60+ messages in thread
From: Rob Herring @ 2018-03-26 22:22 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Maxime Ripard, Chen-Yu Tsai, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

On Sat, Mar 17, 2018 at 01:53:48AM +0800, Icenowy Zheng wrote:
> The Allwinner A64 SoC has a DE2 CCU like the one in the DE2 of Allwinner
> H5 SoC.
> 
> Add a compatible string for it.
> 
> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/clock/sun8i-de2.txt | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

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

* Re: [PATCH 1/7] dt-bindings: add compatible string for the A64 DE2 CCU
@ 2018-03-26 22:22     ` Rob Herring
  0 siblings, 0 replies; 60+ messages in thread
From: Rob Herring @ 2018-03-26 22:22 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: devicetree, Maxime Ripard, linux-sunxi, linux-kernel,
	Chen-Yu Tsai, linux-clk, linux-arm-kernel

On Sat, Mar 17, 2018 at 01:53:48AM +0800, Icenowy Zheng wrote:
> The Allwinner A64 SoC has a DE2 CCU like the one in the DE2 of Allwinner
> H5 SoC.
> 
> Add a compatible string for it.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
>  Documentation/devicetree/bindings/clock/sun8i-de2.txt | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Rob Herring <robh@kernel.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/7] dt-bindings: add compatible string for the A64 DE2 CCU
@ 2018-03-26 22:22     ` Rob Herring
  0 siblings, 0 replies; 60+ messages in thread
From: Rob Herring @ 2018-03-26 22:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Mar 17, 2018 at 01:53:48AM +0800, Icenowy Zheng wrote:
> The Allwinner A64 SoC has a DE2 CCU like the one in the DE2 of Allwinner
> H5 SoC.
> 
> Add a compatible string for it.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
>  Documentation/devicetree/bindings/clock/sun8i-de2.txt | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [linux-sunxi] Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-26 22:22             ` Rob Herring
  0 siblings, 0 replies; 60+ messages in thread
From: Rob Herring @ 2018-03-26 22:22 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: jernej.skrabec, linux-sunxi, Maxime Ripard, Chen-Yu Tsai,
	devicetree, linux-arm-kernel, linux-kernel, linux-clk

On Thu, Mar 22, 2018 at 02:08:43PM +0800, Icenowy Zheng wrote:
> 
> 
> 于 2018年3月22日 GMT+08:00 上午1:13:42, "Jernej Škrabec" <jernej.skrabec@siol.net> 写到:
> >Hi all,
> >
> >Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng napisal(a):
> >> 于 2018年3月21日 GMT+08:00 上午2:46:46, Maxime Ripard
> ><maxime.ripard@bootlin.com> 
> >写到:
> >> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
> >> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64
> >SoC
> >> >
> >> >to
> >> >
> >> >> be claimed, otherwise the whole DE2 space is inaccessible.
> >> >> 
> >> >> Add a device tree binding of the DE2 part as a sub-bus.
> >> >
> >> >Where did you get the info that it was a bus?
> >> 
> >> There's no direct evidence, just some guess.
> >> 
> >> The DE2 is a whole part that is just allocated a memory
> >> space at the user manual, and the SRAM controls the
> >> access to all modules in the DE2.
> >> 
> >> So it might be a bus.
> >> 
> >> Implement it as a bus is a clear representation on A64.
> >
> >Since there is already syscon for same mmio region, we migh as well use
> >it 
> >when loading ccu-sun8i-de2 driver on A64.
> >
> >Other options, like SRAM driver or bus driver, might better represent
> >HW, but 
> 
> I think the device tree should properly represent the HW,
> it's a basic requirment.
> 
> >then we would have two DT nodes covering same mmio region, which I
> >think is 
> >not really acceptable.
> 
> It's acceptable, and DE2 is not the only user of SRAM controller so far.

No, it's not acceptable. Don't create overlapping mmio regions in DT.

> 
> VE will also need a SRAM region to be claimed.
> 
> >
> >Any suggestions?
> >
> >BTW, H6 has same design in this regard.
> >
> >Best regards,
> >Jernej
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-26 22:22             ` Rob Herring
  0 siblings, 0 replies; 60+ messages in thread
From: Rob Herring @ 2018-03-26 22:22 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: jernej.skrabec-gGgVlfcn5nU, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	Maxime Ripard, Chen-Yu Tsai, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA

On Thu, Mar 22, 2018 at 02:08:43PM +0800, Icenowy Zheng wrote:
> 
> 
> 于 2018年3月22日 GMT+08:00 上午1:13:42, "Jernej Škrabec" <jernej.skrabec-gGgVlfcn5nU@public.gmane.org> 写到:
> >Hi all,
> >
> >Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng napisal(a):
> >> 于 2018年3月21日 GMT+08:00 上午2:46:46, Maxime Ripard
> ><maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org> 
> >写到:
> >> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
> >> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64
> >SoC
> >> >
> >> >to
> >> >
> >> >> be claimed, otherwise the whole DE2 space is inaccessible.
> >> >> 
> >> >> Add a device tree binding of the DE2 part as a sub-bus.
> >> >
> >> >Where did you get the info that it was a bus?
> >> 
> >> There's no direct evidence, just some guess.
> >> 
> >> The DE2 is a whole part that is just allocated a memory
> >> space at the user manual, and the SRAM controls the
> >> access to all modules in the DE2.
> >> 
> >> So it might be a bus.
> >> 
> >> Implement it as a bus is a clear representation on A64.
> >
> >Since there is already syscon for same mmio region, we migh as well use
> >it 
> >when loading ccu-sun8i-de2 driver on A64.
> >
> >Other options, like SRAM driver or bus driver, might better represent
> >HW, but 
> 
> I think the device tree should properly represent the HW,
> it's a basic requirment.
> 
> >then we would have two DT nodes covering same mmio region, which I
> >think is 
> >not really acceptable.
> 
> It's acceptable, and DE2 is not the only user of SRAM controller so far.

No, it's not acceptable. Don't create overlapping mmio regions in DT.

> 
> VE will also need a SRAM region to be claimed.
> 
> >
> >Any suggestions?
> >
> >BTW, H6 has same design in this regard.
> >
> >Best regards,
> >Jernej
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

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

* [linux-sunxi] Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-26 22:22             ` Rob Herring
  0 siblings, 0 replies; 60+ messages in thread
From: Rob Herring @ 2018-03-26 22:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 22, 2018 at 02:08:43PM +0800, Icenowy Zheng wrote:
> 
> 
> ? 2018?3?22? GMT+08:00 ??1:13:42, "Jernej ?krabec" <jernej.skrabec@siol.net> ??:
> >Hi all,
> >
> >Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng napisal(a):
> >> ? 2018?3?21? GMT+08:00 ??2:46:46, Maxime Ripard
> ><maxime.ripard@bootlin.com> 
> >??:
> >> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
> >> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64
> >SoC
> >> >
> >> >to
> >> >
> >> >> be claimed, otherwise the whole DE2 space is inaccessible.
> >> >> 
> >> >> Add a device tree binding of the DE2 part as a sub-bus.
> >> >
> >> >Where did you get the info that it was a bus?
> >> 
> >> There's no direct evidence, just some guess.
> >> 
> >> The DE2 is a whole part that is just allocated a memory
> >> space at the user manual, and the SRAM controls the
> >> access to all modules in the DE2.
> >> 
> >> So it might be a bus.
> >> 
> >> Implement it as a bus is a clear representation on A64.
> >
> >Since there is already syscon for same mmio region, we migh as well use
> >it 
> >when loading ccu-sun8i-de2 driver on A64.
> >
> >Other options, like SRAM driver or bus driver, might better represent
> >HW, but 
> 
> I think the device tree should properly represent the HW,
> it's a basic requirment.
> 
> >then we would have two DT nodes covering same mmio region, which I
> >think is 
> >not really acceptable.
> 
> It's acceptable, and DE2 is not the only user of SRAM controller so far.

No, it's not acceptable. Don't create overlapping mmio regions in DT.

> 
> VE will also need a SRAM region to be claimed.
> 
> >
> >Any suggestions?
> >
> >BTW, H6 has same design in this regard.
> >
> >Best regards,
> >Jernej
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [linux-sunxi] Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
  2018-03-26 22:22             ` Rob Herring
  (?)
@ 2018-03-26 23:31               ` Icenowy Zheng
  -1 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-26 23:31 UTC (permalink / raw)
  To: linux-arm-kernel, Rob Herring
  Cc: devicetree, jernej.skrabec, Maxime Ripard, linux-sunxi,
	linux-kernel, Chen-Yu Tsai, linux-clk



于 2018年3月27日 GMT+08:00 上午6:22:58, Rob Herring <robh@kernel.org> 写到:
>On Thu, Mar 22, 2018 at 02:08:43PM +0800, Icenowy Zheng wrote:
>> 
>> 
>> 于 2018年3月22日 GMT+08:00 上午1:13:42, "Jernej Škrabec"
><jernej.skrabec@siol.net> 写到:
>> >Hi all,
>> >
>> >Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng
>napisal(a):
>> >> 于 2018年3月21日 GMT+08:00 上午2:46:46, Maxime Ripard
>> ><maxime.ripard@bootlin.com> 
>> >写到:
>> >> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
>> >> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64
>> >SoC
>> >> >
>> >> >to
>> >> >
>> >> >> be claimed, otherwise the whole DE2 space is inaccessible.
>> >> >> 
>> >> >> Add a device tree binding of the DE2 part as a sub-bus.
>> >> >
>> >> >Where did you get the info that it was a bus?
>> >> 
>> >> There's no direct evidence, just some guess.
>> >> 
>> >> The DE2 is a whole part that is just allocated a memory
>> >> space at the user manual, and the SRAM controls the
>> >> access to all modules in the DE2.
>> >> 
>> >> So it might be a bus.
>> >> 
>> >> Implement it as a bus is a clear representation on A64.
>> >
>> >Since there is already syscon for same mmio region, we migh as well
>use
>> >it 
>> >when loading ccu-sun8i-de2 driver on A64.
>> >
>> >Other options, like SRAM driver or bus driver, might better
>represent
>> >HW, but 
>> 
>> I think the device tree should properly represent the HW,
>> it's a basic requirment.
>> 
>> >then we would have two DT nodes covering same mmio region, which I
>> >think is 
>> >not really acceptable.
>> 
>> It's acceptable, and DE2 is not the only user of SRAM controller so
>far.
>
>No, it's not acceptable. Don't create overlapping mmio regions in DT.

Then should the SRAM controller driver be configured to take the syscon?

>
>> 
>> VE will also need a SRAM region to be claimed.
>> 
>> >
>> >Any suggestions?
>> >
>> >BTW, H6 has same design in this regard.
>> >
>> >Best regards,
>> >Jernej
>> --
>> To unsubscribe from this list: send the line "unsubscribe devicetree"
>in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>_______________________________________________
>linux-arm-kernel mailing list
>linux-arm-kernel@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-26 23:31               ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-26 23:31 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, jernej.skrabec-gGgVlfcn5nU,
	Maxime Ripard, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Chen-Yu Tsai,
	linux-clk-u79uwXL29TY76Z2rM5mHXA



于 2018年3月27日 GMT+08:00 上午6:22:58, Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> 写到:
>On Thu, Mar 22, 2018 at 02:08:43PM +0800, Icenowy Zheng wrote:
>> 
>> 
>> 于 2018年3月22日 GMT+08:00 上午1:13:42, "Jernej Škrabec"
><jernej.skrabec-gGgVlfcn5nU@public.gmane.org> 写到:
>> >Hi all,
>> >
>> >Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng
>napisal(a):
>> >> 于 2018年3月21日 GMT+08:00 上午2:46:46, Maxime Ripard
>> ><maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org> 
>> >写到:
>> >> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
>> >> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64
>> >SoC
>> >> >
>> >> >to
>> >> >
>> >> >> be claimed, otherwise the whole DE2 space is inaccessible.
>> >> >> 
>> >> >> Add a device tree binding of the DE2 part as a sub-bus.
>> >> >
>> >> >Where did you get the info that it was a bus?
>> >> 
>> >> There's no direct evidence, just some guess.
>> >> 
>> >> The DE2 is a whole part that is just allocated a memory
>> >> space at the user manual, and the SRAM controls the
>> >> access to all modules in the DE2.
>> >> 
>> >> So it might be a bus.
>> >> 
>> >> Implement it as a bus is a clear representation on A64.
>> >
>> >Since there is already syscon for same mmio region, we migh as well
>use
>> >it 
>> >when loading ccu-sun8i-de2 driver on A64.
>> >
>> >Other options, like SRAM driver or bus driver, might better
>represent
>> >HW, but 
>> 
>> I think the device tree should properly represent the HW,
>> it's a basic requirment.
>> 
>> >then we would have two DT nodes covering same mmio region, which I
>> >think is 
>> >not really acceptable.
>> 
>> It's acceptable, and DE2 is not the only user of SRAM controller so
>far.
>
>No, it's not acceptable. Don't create overlapping mmio regions in DT.

Then should the SRAM controller driver be configured to take the syscon?

>
>> 
>> VE will also need a SRAM region to be claimed.
>> 
>> >
>> >Any suggestions?
>> >
>> >BTW, H6 has same design in this regard.
>> >
>> >Best regards,
>> >Jernej
>> --
>> To unsubscribe from this list: send the line "unsubscribe devicetree"
>in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>_______________________________________________
>linux-arm-kernel mailing list
>linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
>http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

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

* [linux-sunxi] Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-26 23:31               ` Icenowy Zheng
  0 siblings, 0 replies; 60+ messages in thread
From: Icenowy Zheng @ 2018-03-26 23:31 UTC (permalink / raw)
  To: linux-arm-kernel



? 2018?3?27? GMT+08:00 ??6:22:58, Rob Herring <robh@kernel.org> ??:
>On Thu, Mar 22, 2018 at 02:08:43PM +0800, Icenowy Zheng wrote:
>> 
>> 
>> ? 2018?3?22? GMT+08:00 ??1:13:42, "Jernej ?krabec"
><jernej.skrabec@siol.net> ??:
>> >Hi all,
>> >
>> >Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng
>napisal(a):
>> >> ? 2018?3?21? GMT+08:00 ??2:46:46, Maxime Ripard
>> ><maxime.ripard@bootlin.com> 
>> >??:
>> >> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
>> >> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64
>> >SoC
>> >> >
>> >> >to
>> >> >
>> >> >> be claimed, otherwise the whole DE2 space is inaccessible.
>> >> >> 
>> >> >> Add a device tree binding of the DE2 part as a sub-bus.
>> >> >
>> >> >Where did you get the info that it was a bus?
>> >> 
>> >> There's no direct evidence, just some guess.
>> >> 
>> >> The DE2 is a whole part that is just allocated a memory
>> >> space at the user manual, and the SRAM controls the
>> >> access to all modules in the DE2.
>> >> 
>> >> So it might be a bus.
>> >> 
>> >> Implement it as a bus is a clear representation on A64.
>> >
>> >Since there is already syscon for same mmio region, we migh as well
>use
>> >it 
>> >when loading ccu-sun8i-de2 driver on A64.
>> >
>> >Other options, like SRAM driver or bus driver, might better
>represent
>> >HW, but 
>> 
>> I think the device tree should properly represent the HW,
>> it's a basic requirment.
>> 
>> >then we would have two DT nodes covering same mmio region, which I
>> >think is 
>> >not really acceptable.
>> 
>> It's acceptable, and DE2 is not the only user of SRAM controller so
>far.
>
>No, it's not acceptable. Don't create overlapping mmio regions in DT.

Then should the SRAM controller driver be configured to take the syscon?

>
>> 
>> VE will also need a SRAM region to be claimed.
>> 
>> >
>> >Any suggestions?
>> >
>> >BTW, H6 has same design in this regard.
>> >
>> >Best regards,
>> >Jernej
>> --
>> To unsubscribe from this list: send the line "unsubscribe devicetree"
>in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>_______________________________________________
>linux-arm-kernel mailing list
>linux-arm-kernel at lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [linux-sunxi] Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
  2018-03-26 23:31               ` Icenowy Zheng
@ 2018-03-27  8:11                 ` Maxime Ripard
  -1 siblings, 0 replies; 60+ messages in thread
From: Maxime Ripard @ 2018-03-27  8:11 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: linux-arm-kernel, Rob Herring, devicetree, jernej.skrabec,
	linux-sunxi, linux-kernel, Chen-Yu Tsai, linux-clk

[-- Attachment #1: Type: text/plain, Size: 2418 bytes --]

On Tue, Mar 27, 2018 at 07:31:18AM +0800, Icenowy Zheng wrote:
> 
> 
> 于 2018年3月27日 GMT+08:00 上午6:22:58, Rob Herring <robh@kernel.org> 写到:
> >On Thu, Mar 22, 2018 at 02:08:43PM +0800, Icenowy Zheng wrote:
> >> 
> >> 
> >> 于 2018年3月22日 GMT+08:00 上午1:13:42, "Jernej Škrabec"
> ><jernej.skrabec@siol.net> 写到:
> >> >Hi all,
> >> >
> >> >Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng
> >napisal(a):
> >> >> 于 2018年3月21日 GMT+08:00 上午2:46:46, Maxime Ripard
> >> ><maxime.ripard@bootlin.com> 
> >> >写到:
> >> >> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
> >> >> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64
> >> >SoC
> >> >> >
> >> >> >to
> >> >> >
> >> >> >> be claimed, otherwise the whole DE2 space is inaccessible.
> >> >> >> 
> >> >> >> Add a device tree binding of the DE2 part as a sub-bus.
> >> >> >
> >> >> >Where did you get the info that it was a bus?
> >> >> 
> >> >> There's no direct evidence, just some guess.
> >> >> 
> >> >> The DE2 is a whole part that is just allocated a memory
> >> >> space at the user manual, and the SRAM controls the
> >> >> access to all modules in the DE2.
> >> >> 
> >> >> So it might be a bus.
> >> >> 
> >> >> Implement it as a bus is a clear representation on A64.
> >> >
> >> >Since there is already syscon for same mmio region, we migh as well
> >use
> >> >it 
> >> >when loading ccu-sun8i-de2 driver on A64.
> >> >
> >> >Other options, like SRAM driver or bus driver, might better
> >represent
> >> >HW, but 
> >> 
> >> I think the device tree should properly represent the HW,
> >> it's a basic requirment.
> >> 
> >> >then we would have two DT nodes covering same mmio region, which I
> >> >think is 
> >> >not really acceptable.
> >> 
> >> It's acceptable, and DE2 is not the only user of SRAM controller so
> >far.
> >
> >No, it's not acceptable. Don't create overlapping mmio regions in DT.
> 
> Then should the SRAM controller driver be configured to take the syscon?

We could have a single DT node that would export a syscon yes, just
like you did for the R40 ethernet case.

I'm not sure the SRAM controller itself needs to take the syscon, it
just can export its own.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [linux-sunxi] Re: [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus
@ 2018-03-27  8:11                 ` Maxime Ripard
  0 siblings, 0 replies; 60+ messages in thread
From: Maxime Ripard @ 2018-03-27  8:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Mar 27, 2018 at 07:31:18AM +0800, Icenowy Zheng wrote:
> 
> 
> ? 2018?3?27? GMT+08:00 ??6:22:58, Rob Herring <robh@kernel.org> ??:
> >On Thu, Mar 22, 2018 at 02:08:43PM +0800, Icenowy Zheng wrote:
> >> 
> >> 
> >> ? 2018?3?22? GMT+08:00 ??1:13:42, "Jernej ?krabec"
> ><jernej.skrabec@siol.net> ??:
> >> >Hi all,
> >> >
> >> >Dne sreda, 21. marec 2018 ob 03:18:13 CET je Icenowy Zheng
> >napisal(a):
> >> >> ? 2018?3?21? GMT+08:00 ??2:46:46, Maxime Ripard
> >> ><maxime.ripard@bootlin.com> 
> >> >??:
> >> >> >On Sat, Mar 17, 2018 at 01:53:49AM +0800, Icenowy Zheng wrote:
> >> >> >> All the sub-blocks of Allwinner A64 DE2 needs the SRAM C on A64
> >> >SoC
> >> >> >
> >> >> >to
> >> >> >
> >> >> >> be claimed, otherwise the whole DE2 space is inaccessible.
> >> >> >> 
> >> >> >> Add a device tree binding of the DE2 part as a sub-bus.
> >> >> >
> >> >> >Where did you get the info that it was a bus?
> >> >> 
> >> >> There's no direct evidence, just some guess.
> >> >> 
> >> >> The DE2 is a whole part that is just allocated a memory
> >> >> space at the user manual, and the SRAM controls the
> >> >> access to all modules in the DE2.
> >> >> 
> >> >> So it might be a bus.
> >> >> 
> >> >> Implement it as a bus is a clear representation on A64.
> >> >
> >> >Since there is already syscon for same mmio region, we migh as well
> >use
> >> >it 
> >> >when loading ccu-sun8i-de2 driver on A64.
> >> >
> >> >Other options, like SRAM driver or bus driver, might better
> >represent
> >> >HW, but 
> >> 
> >> I think the device tree should properly represent the HW,
> >> it's a basic requirment.
> >> 
> >> >then we would have two DT nodes covering same mmio region, which I
> >> >think is 
> >> >not really acceptable.
> >> 
> >> It's acceptable, and DE2 is not the only user of SRAM controller so
> >far.
> >
> >No, it's not acceptable. Don't create overlapping mmio regions in DT.
> 
> Then should the SRAM controller driver be configured to take the syscon?

We could have a single DT node that would export a syscon yes, just
like you did for the R40 ethernet case.

I'm not sure the SRAM controller itself needs to take the syscon, it
just can export its own.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180327/d40921bc/attachment-0001.sig>

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

* Re: [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2
  2018-03-16 17:53   ` Icenowy Zheng
@ 2018-04-14 10:25     ` Jagan Teki
  -1 siblings, 0 replies; 60+ messages in thread
From: Jagan Teki @ 2018-04-14 10:25 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Rob Herring, Maxime Ripard, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel, linux-clk, linux-sunxi

On Fri, Mar 16, 2018 at 11:23 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
> The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 SoC
> is different from the ones on other Allwinner SoCs. It requires a SRAM
> region to be claimed, otherwise all DE2 subblocks won't be accessible.
>
> Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM
> region when probing.

Along with this bus driver, we also need
drivers/gpu/drm/sun4i/sun4i_drv.c which can usually drive the
pipelines like mixer0 and 1 are the cases for A64?

Jagan.

-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

* [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2
@ 2018-04-14 10:25     ` Jagan Teki
  0 siblings, 0 replies; 60+ messages in thread
From: Jagan Teki @ 2018-04-14 10:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Mar 16, 2018 at 11:23 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
> The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 SoC
> is different from the ones on other Allwinner SoCs. It requires a SRAM
> region to be claimed, otherwise all DE2 subblocks won't be accessible.
>
> Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM
> region when probing.

Along with this bus driver, we also need
drivers/gpu/drm/sun4i/sun4i_drv.c which can usually drive the
pipelines like mixer0 and 1 are the cases for A64?

Jagan.

-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

* Re: [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2
@ 2018-04-14 10:30       ` Chen-Yu Tsai
  0 siblings, 0 replies; 60+ messages in thread
From: Chen-Yu Tsai @ 2018-04-14 10:30 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Icenowy Zheng, Rob Herring, Maxime Ripard, devicetree,
	linux-arm-kernel, linux-kernel, linux-clk, linux-sunxi

On Sat, Apr 14, 2018 at 6:25 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
> On Fri, Mar 16, 2018 at 11:23 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>> The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 SoC
>> is different from the ones on other Allwinner SoCs. It requires a SRAM
>> region to be claimed, otherwise all DE2 subblocks won't be accessible.
>>
>> Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM
>> region when probing.
>
> Along with this bus driver, we also need
> drivers/gpu/drm/sun4i/sun4i_drv.c which can usually drive the
> pipelines like mixer0 and 1 are the cases for A64?

I imagine that's the next part to be sent out, after the hardware
representation in the device tree has been decided on.

ChenYu

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

* Re: [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2
@ 2018-04-14 10:30       ` Chen-Yu Tsai
  0 siblings, 0 replies; 60+ messages in thread
From: Chen-Yu Tsai @ 2018-04-14 10:30 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Icenowy Zheng, Rob Herring, Maxime Ripard, devicetree,
	linux-arm-kernel, linux-kernel, linux-clk, linux-sunxi

On Sat, Apr 14, 2018 at 6:25 PM, Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
> On Fri, Mar 16, 2018 at 11:23 PM, Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> wrote:
>> The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 SoC
>> is different from the ones on other Allwinner SoCs. It requires a SRAM
>> region to be claimed, otherwise all DE2 subblocks won't be accessible.
>>
>> Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM
>> region when probing.
>
> Along with this bus driver, we also need
> drivers/gpu/drm/sun4i/sun4i_drv.c which can usually drive the
> pipelines like mixer0 and 1 are the cases for A64?

I imagine that's the next part to be sent out, after the hardware
representation in the device tree has been decided on.

ChenYu

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

* [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2
@ 2018-04-14 10:30       ` Chen-Yu Tsai
  0 siblings, 0 replies; 60+ messages in thread
From: Chen-Yu Tsai @ 2018-04-14 10:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 14, 2018 at 6:25 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
> On Fri, Mar 16, 2018 at 11:23 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>> The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 SoC
>> is different from the ones on other Allwinner SoCs. It requires a SRAM
>> region to be claimed, otherwise all DE2 subblocks won't be accessible.
>>
>> Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM
>> region when probing.
>
> Along with this bus driver, we also need
> drivers/gpu/drm/sun4i/sun4i_drv.c which can usually drive the
> pipelines like mixer0 and 1 are the cases for A64?

I imagine that's the next part to be sent out, after the hardware
representation in the device tree has been decided on.

ChenYu

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

* Re: [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2
  2018-04-14 10:30       ` Chen-Yu Tsai
@ 2018-04-14 10:46         ` Jagan Teki
  -1 siblings, 0 replies; 60+ messages in thread
From: Jagan Teki @ 2018-04-14 10:46 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Icenowy Zheng, Rob Herring, Maxime Ripard, devicetree,
	linux-arm-kernel, linux-kernel, linux-clk, linux-sunxi

On Sat, Apr 14, 2018 at 4:00 PM, Chen-Yu Tsai <wens@csie.org> wrote:
> On Sat, Apr 14, 2018 at 6:25 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
>> On Fri, Mar 16, 2018 at 11:23 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>>> The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 SoC
>>> is different from the ones on other Allwinner SoCs. It requires a SRAM
>>> region to be claimed, otherwise all DE2 subblocks won't be accessible.
>>>
>>> Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM
>>> region when probing.
>>
>> Along with this bus driver, we also need
>> drivers/gpu/drm/sun4i/sun4i_drv.c which can usually drive the
>> pipelines like mixer0 and 1 are the cases for A64?
>
> I imagine that's the next part to be sent out, after the hardware
> representation in the device tree has been decided on.

Yeah, this hardware representation along with separate bus driver
going like in another direction especially if we add pipelines support
to it, may be we can add sram stuff to platdata of existinf
sun4i_drv.c

Jagan.

-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

* [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2
@ 2018-04-14 10:46         ` Jagan Teki
  0 siblings, 0 replies; 60+ messages in thread
From: Jagan Teki @ 2018-04-14 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 14, 2018 at 4:00 PM, Chen-Yu Tsai <wens@csie.org> wrote:
> On Sat, Apr 14, 2018 at 6:25 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
>> On Fri, Mar 16, 2018 at 11:23 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>>> The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 SoC
>>> is different from the ones on other Allwinner SoCs. It requires a SRAM
>>> region to be claimed, otherwise all DE2 subblocks won't be accessible.
>>>
>>> Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM
>>> region when probing.
>>
>> Along with this bus driver, we also need
>> drivers/gpu/drm/sun4i/sun4i_drv.c which can usually drive the
>> pipelines like mixer0 and 1 are the cases for A64?
>
> I imagine that's the next part to be sent out, after the hardware
> representation in the device tree has been decided on.

Yeah, this hardware representation along with separate bus driver
going like in another direction especially if we add pipelines support
to it, may be we can add sram stuff to platdata of existinf
sun4i_drv.c

Jagan.

-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

* Re: [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2
  2018-04-14 10:46         ` Jagan Teki
@ 2018-04-19  6:35           ` Jagan Teki
  -1 siblings, 0 replies; 60+ messages in thread
From: Jagan Teki @ 2018-04-19  6:35 UTC (permalink / raw)
  To: Chen-Yu Tsai, Icenowy Zheng
  Cc: Rob Herring, Maxime Ripard, devicetree, linux-arm-kernel,
	linux-kernel, linux-clk, linux-sunxi

On Sat, Apr 14, 2018 at 4:16 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
> On Sat, Apr 14, 2018 at 4:00 PM, Chen-Yu Tsai <wens@csie.org> wrote:
>> On Sat, Apr 14, 2018 at 6:25 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
>>> On Fri, Mar 16, 2018 at 11:23 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>>>> The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 SoC
>>>> is different from the ones on other Allwinner SoCs. It requires a SRAM
>>>> region to be claimed, otherwise all DE2 subblocks won't be accessible.
>>>>
>>>> Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM
>>>> region when probing.
>>>
>>> Along with this bus driver, we also need
>>> drivers/gpu/drm/sun4i/sun4i_drv.c which can usually drive the
>>> pipelines like mixer0 and 1 are the cases for A64?
>>
>> I imagine that's the next part to be sent out, after the hardware
>> representation in the device tree has been decided on.
>
> Yeah, this hardware representation along with separate bus driver
> going like in another direction especially if we add pipelines support
> to it, may be we can add sram stuff to platdata of existinf
> sun4i_drv.c

Look like SRAM init during sun4i_drv is unable to claim or map the
memory? do we have any suggestion on adding 'allwinner,pipelines' ? is
it ok to add one more de which is compatible with sun4i_drv.c like
this.

de: display-engine {
                compatible = "allwinner,sun8i-a64-display-engine",
"allwinner,sun8i-h3-display-engine";
                allwinner,pipelines = <&mixer0>;
};

Jagan.

-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

* [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2
@ 2018-04-19  6:35           ` Jagan Teki
  0 siblings, 0 replies; 60+ messages in thread
From: Jagan Teki @ 2018-04-19  6:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 14, 2018 at 4:16 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
> On Sat, Apr 14, 2018 at 4:00 PM, Chen-Yu Tsai <wens@csie.org> wrote:
>> On Sat, Apr 14, 2018 at 6:25 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
>>> On Fri, Mar 16, 2018 at 11:23 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>>>> The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 SoC
>>>> is different from the ones on other Allwinner SoCs. It requires a SRAM
>>>> region to be claimed, otherwise all DE2 subblocks won't be accessible.
>>>>
>>>> Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM
>>>> region when probing.
>>>
>>> Along with this bus driver, we also need
>>> drivers/gpu/drm/sun4i/sun4i_drv.c which can usually drive the
>>> pipelines like mixer0 and 1 are the cases for A64?
>>
>> I imagine that's the next part to be sent out, after the hardware
>> representation in the device tree has been decided on.
>
> Yeah, this hardware representation along with separate bus driver
> going like in another direction especially if we add pipelines support
> to it, may be we can add sram stuff to platdata of existinf
> sun4i_drv.c

Look like SRAM init during sun4i_drv is unable to claim or map the
memory? do we have any suggestion on adding 'allwinner,pipelines' ? is
it ok to add one more de which is compatible with sun4i_drv.c like
this.

de: display-engine {
                compatible = "allwinner,sun8i-a64-display-engine",
"allwinner,sun8i-h3-display-engine";
                allwinner,pipelines = <&mixer0>;
};

Jagan.

-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

end of thread, other threads:[~2018-04-19  6:35 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-16 17:53 [PATCH 0/7] Allwinner A64 DE2 CCU support with dedicated DE2 bus driver Icenowy Zheng
2018-03-16 17:53 ` Icenowy Zheng
2018-03-16 17:53 ` Icenowy Zheng
2018-03-16 17:53 ` [PATCH 1/7] dt-bindings: add compatible string for the A64 DE2 CCU Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-03-19 22:00   ` Stephen Boyd
2018-03-19 22:00     ` Stephen Boyd
2018-03-19 22:00     ` Stephen Boyd
2018-03-26 22:22   ` Rob Herring
2018-03-26 22:22     ` Rob Herring
2018-03-26 22:22     ` Rob Herring
2018-03-26 22:22     ` Rob Herring
2018-03-16 17:53 ` [PATCH 2/7] dt-bindings: add binding for the Allwinner A64 DE2 bus Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-03-20 18:46   ` Maxime Ripard
2018-03-20 18:46     ` Maxime Ripard
2018-03-21  2:18     ` Icenowy Zheng
2018-03-21  2:18       ` Icenowy Zheng
2018-03-21  2:18       ` Icenowy Zheng
2018-03-21 17:13       ` [linux-sunxi] " Jernej Škrabec
2018-03-21 17:13         ` Jernej Škrabec
2018-03-22  6:08         ` Icenowy Zheng
2018-03-22  6:08           ` Icenowy Zheng
2018-03-22  6:08           ` Icenowy Zheng
2018-03-26 22:22           ` [linux-sunxi] " Rob Herring
2018-03-26 22:22             ` Rob Herring
2018-03-26 22:22             ` Rob Herring
2018-03-26 23:31             ` [linux-sunxi] " Icenowy Zheng
2018-03-26 23:31               ` Icenowy Zheng
2018-03-26 23:31               ` Icenowy Zheng
2018-03-27  8:11               ` [linux-sunxi] " Maxime Ripard
2018-03-27  8:11                 ` Maxime Ripard
2018-03-16 17:53 ` [PATCH 3/7] bus: add bus driver for accessing Allwinner A64 DE2 Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-04-14 10:25   ` Jagan Teki
2018-04-14 10:25     ` Jagan Teki
2018-04-14 10:30     ` Chen-Yu Tsai
2018-04-14 10:30       ` Chen-Yu Tsai
2018-04-14 10:30       ` Chen-Yu Tsai
2018-04-14 10:46       ` Jagan Teki
2018-04-14 10:46         ` Jagan Teki
2018-04-19  6:35         ` Jagan Teki
2018-04-19  6:35           ` Jagan Teki
2018-03-16 17:53 ` [PATCH 4/7] clk: sunxi-ng: add A64 compatible string Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-03-16 17:53 ` [PATCH 5/7] arm64: allwinner: a64: add DE2 CCU related device tree nodes Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-03-20 18:47   ` Maxime Ripard
2018-03-20 18:47     ` Maxime Ripard
2018-03-16 17:53 ` [PATCH 6/7] arm64: allwinner: a64: add simplefb for A64 SoC Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-03-16 17:53 ` [PATCH 7/7] arm64: allwinner: a64: add HDMI regulator to all DTs' simplefb_hdmi Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng
2018-03-16 17:53   ` Icenowy Zheng

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.