All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Switch Versatile and RealView to DRM
@ 2018-03-11 13:52 ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:52 UTC (permalink / raw)
  To: linux-arm-kernel

The ARM Versatile and RealView platforms have enough support
merged for v4.17/next that we can fully switch them all over to
using the DRM PL111 driver instead of the old fbdev driver.

Integrator and Versatile Express will follow.

The device trees are augmented with the proper VGA bridges
instead of "panels" that were never correct, the maximum
memory bandwidth is augmented and these platforms can now
in many cases support 1024x768 in 16bpp instead of only
640x480 with 32bpp.

If the board has the IB1 or IB2 daughterboard
mounted, the daughterboard display will take precedence
over the VGA connector. The IB1 daughterboard which connects
a number of various displays does not need any separate device
tree: it will be autodetected.

For the Versatile CP with the IB2 daughterboard we need to
add a new device tree, as it has a system controller we need
to access and a few other features we may want to make use of
in the future. (It already has proper device tree bindings
in place.)

This has been tested on:

- RealView PM11MPCore
- RealView PB1176
- Versatile AB with and without the IB2 daughterboard
- All applicable QEMU models: RealView EB, RealView PBA8,
  RealView PBX-A9 and Versatile AB.

I'm planning to send this as two pull requests: one for the
DTS changes and one for the defconfig changes.

Linus Walleij (10):
  ARM: dts: Augment VGA connector bridge on PB11MPcore
  ARM: dts: Augment VGA connector bridge on PB1176
  ARM: dts: Augment VGA connector bridge on Realview EB
  ARM: dts: Augment VGA connector bridge on Realview PBX
  ARM: dts: Add Versatile IB2 device tree
  ARM: dts: Augment panel setting for Versatile
  ARM: defconfig: Update RealView defconfig
  ARM: defconfig: Switch RealView boards to use P111 DRM
  ARM: defconfig: Update Versatile defconfig
  ARM: defconfig: Configure Versatile boards to use PL111 DRM

 arch/arm/boot/dts/Makefile                |  1 +
 arch/arm/boot/dts/arm-realview-eb.dtsi    | 64 +++++++++++++++---------
 arch/arm/boot/dts/arm-realview-pb1176.dts | 66 ++++++++++++++----------
 arch/arm/boot/dts/arm-realview-pb11mp.dts | 78 +++++++++++++++++++----------
 arch/arm/boot/dts/arm-realview-pbx.dtsi   | 82 ++++++++++++++++++++----------
 arch/arm/boot/dts/versatile-ab-ib2.dts    | 26 ++++++++++
 arch/arm/boot/dts/versatile-ab.dts        | 83 ++++++++++++++++++++++++++++++-
 arch/arm/configs/realview_defconfig       | 21 ++++----
 arch/arm/configs/versatile_defconfig      | 18 ++++---
 9 files changed, 317 insertions(+), 122 deletions(-)
 create mode 100644 arch/arm/boot/dts/versatile-ab-ib2.dts

-- 
2.14.3

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

* [PATCH 00/10] Switch Versatile and RealView to DRM
@ 2018-03-11 13:52 ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:52 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Liviu Dudau, dri-devel

The ARM Versatile and RealView platforms have enough support
merged for v4.17/next that we can fully switch them all over to
using the DRM PL111 driver instead of the old fbdev driver.

Integrator and Versatile Express will follow.

The device trees are augmented with the proper VGA bridges
instead of "panels" that were never correct, the maximum
memory bandwidth is augmented and these platforms can now
in many cases support 1024x768 in 16bpp instead of only
640x480 with 32bpp.

If the board has the IB1 or IB2 daughterboard
mounted, the daughterboard display will take precedence
over the VGA connector. The IB1 daughterboard which connects
a number of various displays does not need any separate device
tree: it will be autodetected.

For the Versatile CP with the IB2 daughterboard we need to
add a new device tree, as it has a system controller we need
to access and a few other features we may want to make use of
in the future. (It already has proper device tree bindings
in place.)

This has been tested on:

- RealView PM11MPCore
- RealView PB1176
- Versatile AB with and without the IB2 daughterboard
- All applicable QEMU models: RealView EB, RealView PBA8,
  RealView PBX-A9 and Versatile AB.

I'm planning to send this as two pull requests: one for the
DTS changes and one for the defconfig changes.

Linus Walleij (10):
  ARM: dts: Augment VGA connector bridge on PB11MPcore
  ARM: dts: Augment VGA connector bridge on PB1176
  ARM: dts: Augment VGA connector bridge on Realview EB
  ARM: dts: Augment VGA connector bridge on Realview PBX
  ARM: dts: Add Versatile IB2 device tree
  ARM: dts: Augment panel setting for Versatile
  ARM: defconfig: Update RealView defconfig
  ARM: defconfig: Switch RealView boards to use P111 DRM
  ARM: defconfig: Update Versatile defconfig
  ARM: defconfig: Configure Versatile boards to use PL111 DRM

 arch/arm/boot/dts/Makefile                |  1 +
 arch/arm/boot/dts/arm-realview-eb.dtsi    | 64 +++++++++++++++---------
 arch/arm/boot/dts/arm-realview-pb1176.dts | 66 ++++++++++++++----------
 arch/arm/boot/dts/arm-realview-pb11mp.dts | 78 +++++++++++++++++++----------
 arch/arm/boot/dts/arm-realview-pbx.dtsi   | 82 ++++++++++++++++++++----------
 arch/arm/boot/dts/versatile-ab-ib2.dts    | 26 ++++++++++
 arch/arm/boot/dts/versatile-ab.dts        | 83 ++++++++++++++++++++++++++++++-
 arch/arm/configs/realview_defconfig       | 21 ++++----
 arch/arm/configs/versatile_defconfig      | 18 ++++---
 9 files changed, 317 insertions(+), 122 deletions(-)
 create mode 100644 arch/arm/boot/dts/versatile-ab-ib2.dts

-- 
2.14.3

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

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

* [PATCH 01/10] ARM: dts: Augment VGA connector bridge on PB11MPcore
  2018-03-11 13:52 ` Linus Walleij
@ 2018-03-11 13:52   ` Linus Walleij
  -1 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:52 UTC (permalink / raw)
  To: linux-arm-kernel

The PL111 in the ARM reference platforms are connected to
"panels" that are actually dumb VGA DAC connector bridges.
Now that we can support the proper bridges in the DRM driver,
fix this up.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/arm-realview-pb11mp.dts | 78 +++++++++++++++++++++----------
 1 file changed, 53 insertions(+), 25 deletions(-)

diff --git a/arch/arm/boot/dts/arm-realview-pb11mp.dts b/arch/arm/boot/dts/arm-realview-pb11mp.dts
index 3944765ac4b0..36203288de42 100644
--- a/arch/arm/boot/dts/arm-realview-pb11mp.dts
+++ b/arch/arm/boot/dts/arm-realview-pb11mp.dts
@@ -242,6 +242,49 @@
 		bank-width = <4>;
 	};
 
+	bridge {
+		compatible = "ti,ths8134a", "ti,ths8134";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				vga_bridge_in: endpoint {
+					remote-endpoint = <&clcd_pads>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				vga_bridge_out: endpoint {
+					remote-endpoint = <&vga_con_in>;
+				};
+			};
+		};
+	};
+
+	vga {
+		/*
+		 * This DDC I2C is connected directly to the DVI portions
+		 * of the connector, so it's not really working when the
+		 * monitor is connected to the VGA connector.
+		 */
+		compatible = "vga-connector";
+		ddc-i2c-bus = <&i2c1>;
+
+		port {
+			vga_con_in: endpoint {
+				remote-endpoint = <&vga_bridge_out>;
+			};
+		};
+	};
+
 	soc {
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -575,6 +618,13 @@
 			clock-names = "apb_pclk";
 		};
 
+		i2c1: i2c at 10016000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "arm,versatile-i2c";
+			reg = <0x10016000 0x1000>;
+		};
+
 		rtc: rtc at 10017000 {
 			compatible = "arm,pl031", "arm,primecell";
 			reg = <0x10017000 0x1000>;
@@ -609,37 +659,15 @@
 			interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&oscclk4>, <&pclk>;
 			clock-names = "clcdclk", "apb_pclk";
-			max-memory-bandwidth = <130000000>; /* 16bpp @ 63.5MHz */
+			/* 1024x768 16bpp @65MHz works fine */
+			max-memory-bandwidth = <95000000>;
 
 			port {
 				clcd_pads: endpoint {
-					remote-endpoint = <&clcd_panel>;
+					remote-endpoint = <&vga_bridge_in>;
 					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
 				};
 			};
-
-			panel {
-				compatible = "panel-dpi";
-
-				port {
-					clcd_panel: endpoint {
-						remote-endpoint = <&clcd_pads>;
-					};
-				};
-
-				/* Standard 640x480 VGA timings */
-				panel-timing {
-					clock-frequency = <25175000>;
-					hactive = <640>;
-					hback-porch = <48>;
-					hfront-porch = <16>;
-					hsync-len = <96>;
-					vactive = <480>;
-					vback-porch = <33>;
-					vfront-porch = <10>;
-					vsync-len = <2>;
-				};
-			};
 		};
 
 		/*
-- 
2.14.3

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

* [PATCH 01/10] ARM: dts: Augment VGA connector bridge on PB11MPcore
@ 2018-03-11 13:52   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:52 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Liviu Dudau, dri-devel, Mali DP Maintainers

The PL111 in the ARM reference platforms are connected to
"panels" that are actually dumb VGA DAC connector bridges.
Now that we can support the proper bridges in the DRM driver,
fix this up.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/arm-realview-pb11mp.dts | 78 +++++++++++++++++++++----------
 1 file changed, 53 insertions(+), 25 deletions(-)

diff --git a/arch/arm/boot/dts/arm-realview-pb11mp.dts b/arch/arm/boot/dts/arm-realview-pb11mp.dts
index 3944765ac4b0..36203288de42 100644
--- a/arch/arm/boot/dts/arm-realview-pb11mp.dts
+++ b/arch/arm/boot/dts/arm-realview-pb11mp.dts
@@ -242,6 +242,49 @@
 		bank-width = <4>;
 	};
 
+	bridge {
+		compatible = "ti,ths8134a", "ti,ths8134";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				vga_bridge_in: endpoint {
+					remote-endpoint = <&clcd_pads>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				vga_bridge_out: endpoint {
+					remote-endpoint = <&vga_con_in>;
+				};
+			};
+		};
+	};
+
+	vga {
+		/*
+		 * This DDC I2C is connected directly to the DVI portions
+		 * of the connector, so it's not really working when the
+		 * monitor is connected to the VGA connector.
+		 */
+		compatible = "vga-connector";
+		ddc-i2c-bus = <&i2c1>;
+
+		port {
+			vga_con_in: endpoint {
+				remote-endpoint = <&vga_bridge_out>;
+			};
+		};
+	};
+
 	soc {
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -575,6 +618,13 @@
 			clock-names = "apb_pclk";
 		};
 
+		i2c1: i2c@10016000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "arm,versatile-i2c";
+			reg = <0x10016000 0x1000>;
+		};
+
 		rtc: rtc@10017000 {
 			compatible = "arm,pl031", "arm,primecell";
 			reg = <0x10017000 0x1000>;
@@ -609,37 +659,15 @@
 			interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&oscclk4>, <&pclk>;
 			clock-names = "clcdclk", "apb_pclk";
-			max-memory-bandwidth = <130000000>; /* 16bpp @ 63.5MHz */
+			/* 1024x768 16bpp @65MHz works fine */
+			max-memory-bandwidth = <95000000>;
 
 			port {
 				clcd_pads: endpoint {
-					remote-endpoint = <&clcd_panel>;
+					remote-endpoint = <&vga_bridge_in>;
 					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
 				};
 			};
-
-			panel {
-				compatible = "panel-dpi";
-
-				port {
-					clcd_panel: endpoint {
-						remote-endpoint = <&clcd_pads>;
-					};
-				};
-
-				/* Standard 640x480 VGA timings */
-				panel-timing {
-					clock-frequency = <25175000>;
-					hactive = <640>;
-					hback-porch = <48>;
-					hfront-porch = <16>;
-					hsync-len = <96>;
-					vactive = <480>;
-					vback-porch = <33>;
-					vfront-porch = <10>;
-					vsync-len = <2>;
-				};
-			};
 		};
 
 		/*
-- 
2.14.3

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

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

* [PATCH 02/10] ARM: dts: Augment VGA connector bridge on PB1176
  2018-03-11 13:52 ` Linus Walleij
@ 2018-03-11 13:52   ` Linus Walleij
  -1 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:52 UTC (permalink / raw)
  To: linux-arm-kernel

The PL111 in the ARM reference platforms are connected to
"panels" that are actually dumb VGA DAC connector bridges.
Now that we can support the proper bridges in the DRM driver,
fix this up.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/arm-realview-pb1176.dts | 66 +++++++++++++++++++------------
 1 file changed, 40 insertions(+), 26 deletions(-)

diff --git a/arch/arm/boot/dts/arm-realview-pb1176.dts b/arch/arm/boot/dts/arm-realview-pb1176.dts
index c789564f2803..f935b72d3d96 100644
--- a/arch/arm/boot/dts/arm-realview-pb1176.dts
+++ b/arch/arm/boot/dts/arm-realview-pb1176.dts
@@ -161,6 +161,43 @@
 		port1-otg;
 	};
 
+	bridge {
+		compatible = "ti,ths8134a", "ti,ths8134";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				vga_bridge_in: endpoint {
+					remote-endpoint = <&clcd_pads>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				vga_bridge_out: endpoint {
+					remote-endpoint = <&vga_con_in>;
+				};
+			};
+		};
+	};
+
+	vga {
+		compatible = "vga-connector";
+
+		port {
+			vga_con_in: endpoint {
+				remote-endpoint = <&vga_bridge_out>;
+			};
+		};
+	};
+
 	soc {
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -403,36 +440,15 @@
 			interrupts = <0 47 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&oscclk0>, <&pclk>;
 			clock-names = "clcdclk", "apb_pclk";
+			/* 1024x768 16bpp @65MHz works fine */
+			max-memory-bandwidth = <95000000>;
 
 			port {
 				clcd_pads: endpoint {
-					remote-endpoint = <&clcd_panel>;
+					remote-endpoint = <&vga_bridge_in>;
 					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
 				};
 			};
-
-			panel {
-				compatible = "panel-dpi";
-
-				port {
-					clcd_panel: endpoint {
-						remote-endpoint = <&clcd_pads>;
-					};
-				};
-
-				/* Standard 640x480 VGA timings */
-				panel-timing {
-					clock-frequency = <25175000>;
-					hactive = <640>;
-					hback-porch = <48>;
-					hfront-porch = <16>;
-					hsync-len = <96>;
-					vactive = <480>;
-					vback-porch = <33>;
-					vfront-porch = <10>;
-					vsync-len = <2>;
-				};
-			};
 		};
 	};
 
@@ -564,7 +580,5 @@
 			clocks = <&pclk>;
 			clock-names = "apb_pclk";
 		};
-
-
 	};
 };
-- 
2.14.3

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

* [PATCH 02/10] ARM: dts: Augment VGA connector bridge on PB1176
@ 2018-03-11 13:52   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:52 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Liviu Dudau, dri-devel, Mali DP Maintainers

The PL111 in the ARM reference platforms are connected to
"panels" that are actually dumb VGA DAC connector bridges.
Now that we can support the proper bridges in the DRM driver,
fix this up.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/arm-realview-pb1176.dts | 66 +++++++++++++++++++------------
 1 file changed, 40 insertions(+), 26 deletions(-)

diff --git a/arch/arm/boot/dts/arm-realview-pb1176.dts b/arch/arm/boot/dts/arm-realview-pb1176.dts
index c789564f2803..f935b72d3d96 100644
--- a/arch/arm/boot/dts/arm-realview-pb1176.dts
+++ b/arch/arm/boot/dts/arm-realview-pb1176.dts
@@ -161,6 +161,43 @@
 		port1-otg;
 	};
 
+	bridge {
+		compatible = "ti,ths8134a", "ti,ths8134";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				vga_bridge_in: endpoint {
+					remote-endpoint = <&clcd_pads>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				vga_bridge_out: endpoint {
+					remote-endpoint = <&vga_con_in>;
+				};
+			};
+		};
+	};
+
+	vga {
+		compatible = "vga-connector";
+
+		port {
+			vga_con_in: endpoint {
+				remote-endpoint = <&vga_bridge_out>;
+			};
+		};
+	};
+
 	soc {
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -403,36 +440,15 @@
 			interrupts = <0 47 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&oscclk0>, <&pclk>;
 			clock-names = "clcdclk", "apb_pclk";
+			/* 1024x768 16bpp @65MHz works fine */
+			max-memory-bandwidth = <95000000>;
 
 			port {
 				clcd_pads: endpoint {
-					remote-endpoint = <&clcd_panel>;
+					remote-endpoint = <&vga_bridge_in>;
 					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
 				};
 			};
-
-			panel {
-				compatible = "panel-dpi";
-
-				port {
-					clcd_panel: endpoint {
-						remote-endpoint = <&clcd_pads>;
-					};
-				};
-
-				/* Standard 640x480 VGA timings */
-				panel-timing {
-					clock-frequency = <25175000>;
-					hactive = <640>;
-					hback-porch = <48>;
-					hfront-porch = <16>;
-					hsync-len = <96>;
-					vactive = <480>;
-					vback-porch = <33>;
-					vfront-porch = <10>;
-					vsync-len = <2>;
-				};
-			};
 		};
 	};
 
@@ -564,7 +580,5 @@
 			clocks = <&pclk>;
 			clock-names = "apb_pclk";
 		};
-
-
 	};
 };
-- 
2.14.3

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

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

* [PATCH 03/10] ARM: dts: Augment VGA connector bridge on Realview EB
  2018-03-11 13:52 ` Linus Walleij
@ 2018-03-11 13:53   ` Linus Walleij
  -1 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

The PL111 in the ARM reference platforms are connected to
"panels" that are actually dumb VGA DAC connector bridges.
Now that we can support the proper bridges in the DRM driver,
fix this up.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/arm-realview-eb.dtsi | 64 +++++++++++++++++++++-------------
 1 file changed, 40 insertions(+), 24 deletions(-)

diff --git a/arch/arm/boot/dts/arm-realview-eb.dtsi b/arch/arm/boot/dts/arm-realview-eb.dtsi
index e2e9599596e2..a917cf8825ca 100644
--- a/arch/arm/boot/dts/arm-realview-eb.dtsi
+++ b/arch/arm/boot/dts/arm-realview-eb.dtsi
@@ -143,6 +143,43 @@
 		port1-otg;
 	};
 
+	bridge {
+		compatible = "ti,ths8134a", "ti,ths8134";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				vga_bridge_in: endpoint {
+					remote-endpoint = <&clcd_pads>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				vga_bridge_out: endpoint {
+					remote-endpoint = <&vga_con_in>;
+				};
+			};
+		};
+	};
+
+	vga {
+		compatible = "vga-connector";
+
+		port {
+			vga_con_in: endpoint {
+				remote-endpoint = <&vga_bridge_out>;
+			};
+		};
+	};
+
 	/* These peripherals are inside the FPGA */
 	fpga {
 		#address-cells = <1>;
@@ -409,36 +446,15 @@
 			interrupt-names = "combined";
 			clocks = <&oscclk0>, <&pclk>;
 			clock-names = "clcdclk", "apb_pclk";
+			/* 1024x768 16bpp @65MHz works fine */
+			max-memory-bandwidth = <95000000>;
 
 			port {
 				clcd_pads: endpoint {
-					remote-endpoint = <&clcd_panel>;
+					remote-endpoint = <&vga_bridge_in>;
 					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
 				};
 			};
-
-			panel {
-				compatible = "panel-dpi";
-
-				port {
-					clcd_panel: endpoint {
-						remote-endpoint = <&clcd_pads>;
-					};
-				};
-
-				/* Standard 640x480 VGA timings */
-				panel-timing {
-					clock-frequency = <25175000>;
-					hactive = <640>;
-					hback-porch = <48>;
-					hfront-porch = <16>;
-					hsync-len = <96>;
-					vactive = <480>;
-					vback-porch = <33>;
-					vfront-porch = <10>;
-					vsync-len = <2>;
-				};
-			};
 		};
 	};
 };
-- 
2.14.3

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

* [PATCH 03/10] ARM: dts: Augment VGA connector bridge on Realview EB
@ 2018-03-11 13:53   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Liviu Dudau, dri-devel, Mali DP Maintainers

The PL111 in the ARM reference platforms are connected to
"panels" that are actually dumb VGA DAC connector bridges.
Now that we can support the proper bridges in the DRM driver,
fix this up.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/arm-realview-eb.dtsi | 64 +++++++++++++++++++++-------------
 1 file changed, 40 insertions(+), 24 deletions(-)

diff --git a/arch/arm/boot/dts/arm-realview-eb.dtsi b/arch/arm/boot/dts/arm-realview-eb.dtsi
index e2e9599596e2..a917cf8825ca 100644
--- a/arch/arm/boot/dts/arm-realview-eb.dtsi
+++ b/arch/arm/boot/dts/arm-realview-eb.dtsi
@@ -143,6 +143,43 @@
 		port1-otg;
 	};
 
+	bridge {
+		compatible = "ti,ths8134a", "ti,ths8134";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				vga_bridge_in: endpoint {
+					remote-endpoint = <&clcd_pads>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				vga_bridge_out: endpoint {
+					remote-endpoint = <&vga_con_in>;
+				};
+			};
+		};
+	};
+
+	vga {
+		compatible = "vga-connector";
+
+		port {
+			vga_con_in: endpoint {
+				remote-endpoint = <&vga_bridge_out>;
+			};
+		};
+	};
+
 	/* These peripherals are inside the FPGA */
 	fpga {
 		#address-cells = <1>;
@@ -409,36 +446,15 @@
 			interrupt-names = "combined";
 			clocks = <&oscclk0>, <&pclk>;
 			clock-names = "clcdclk", "apb_pclk";
+			/* 1024x768 16bpp @65MHz works fine */
+			max-memory-bandwidth = <95000000>;
 
 			port {
 				clcd_pads: endpoint {
-					remote-endpoint = <&clcd_panel>;
+					remote-endpoint = <&vga_bridge_in>;
 					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
 				};
 			};
-
-			panel {
-				compatible = "panel-dpi";
-
-				port {
-					clcd_panel: endpoint {
-						remote-endpoint = <&clcd_pads>;
-					};
-				};
-
-				/* Standard 640x480 VGA timings */
-				panel-timing {
-					clock-frequency = <25175000>;
-					hactive = <640>;
-					hback-porch = <48>;
-					hfront-porch = <16>;
-					hsync-len = <96>;
-					vactive = <480>;
-					vback-porch = <33>;
-					vfront-porch = <10>;
-					vsync-len = <2>;
-				};
-			};
 		};
 	};
 };
-- 
2.14.3

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

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

* [PATCH 04/10] ARM: dts: Augment VGA connector bridge on Realview PBX
  2018-03-11 13:52 ` Linus Walleij
@ 2018-03-11 13:53   ` Linus Walleij
  -1 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

The PL111 in the ARM reference platforms are connected to
"panels" that are actually dumb VGA DAC connector bridges.
Now that we can support the proper bridges in the DRM driver,
fix this up.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/arm-realview-pbx.dtsi | 82 ++++++++++++++++++++++-----------
 1 file changed, 55 insertions(+), 27 deletions(-)

diff --git a/arch/arm/boot/dts/arm-realview-pbx.dtsi b/arch/arm/boot/dts/arm-realview-pbx.dtsi
index aeb49c4bd773..10868ba3277f 100644
--- a/arch/arm/boot/dts/arm-realview-pbx.dtsi
+++ b/arch/arm/boot/dts/arm-realview-pbx.dtsi
@@ -34,7 +34,8 @@
 		serial1 = &serial1;
 		serial2 = &serial2;
 		serial3 = &serial3;
-		i2c0 = &i2c;
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
 	};
 
 	memory {
@@ -158,6 +159,49 @@
 		port1-otg;
 	};
 
+	bridge {
+		compatible = "ti,ths8134a", "ti,ths8134";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				vga_bridge_in: endpoint {
+					remote-endpoint = <&clcd_pads>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				vga_bridge_out: endpoint {
+					remote-endpoint = <&vga_con_in>;
+				};
+			};
+		};
+	};
+
+	vga {
+		/*
+		 * This DDC I2C is connected directly to the DVI portions
+		 * of the connector, so it's not really working when the
+		 * monitor is connected to the VGA connector.
+		 */
+		compatible = "vga-connector";
+		ddc-i2c-bus = <&i2c1>;
+
+		port {
+			vga_con_in: endpoint {
+				remote-endpoint = <&vga_bridge_out>;
+			};
+		};
+	};
+
 	soc: soc at 0 {
 		compatible = "arm,realview-pbx-soc", "simple-bus";
 		#address-cells = <1>;
@@ -285,7 +329,7 @@
 					       <&timclk>;
 		};
 
-		i2c: i2c at 10002000 {
+		i2c0: i2c at 10002000 {
 			#address-cells = <1>;
 			#size-cells = <0>;
 			compatible = "arm,versatile-i2c";
@@ -396,7 +440,12 @@
 			clock-names = "apb_pclk";
 		};
 
-		/* DVI serial bus control is at 10016000 */
+		i2c1: i2c at 10016000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "arm,versatile-i2c";
+			reg = <0x10016000 0x1000>;
+		};
 
 		rtc: rtc at 10017000 {
 			compatible = "arm,pl031", "arm,primecell";
@@ -506,36 +555,15 @@
 			interrupt-names = "combined";
 			clocks = <&oscclk4>, <&pclk>;
 			clock-names = "clcdclk", "apb_pclk";
+			/* 1024x768 16bpp @65MHz works fine */
+			max-memory-bandwidth = <95000000>;
 
 			port {
 				clcd_pads: endpoint {
-					remote-endpoint = <&clcd_panel>;
+					remote-endpoint = <&vga_bridge_in>;
 					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
 				};
 			};
-
-			panel {
-				compatible = "panel-dpi";
-
-				port {
-					clcd_panel: endpoint {
-						remote-endpoint = <&clcd_pads>;
-					};
-				};
-
-				/* Standard 640x480 VGA timings */
-				panel-timing {
-					clock-frequency = <25175000>;
-					hactive = <640>;
-					hback-porch = <48>;
-					hfront-porch = <16>;
-					hsync-len = <96>;
-					vactive = <480>;
-					vback-porch = <33>;
-					vfront-porch = <10>;
-					vsync-len = <2>;
-				};
-			};
 		};
 	};
 };
-- 
2.14.3

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

* [PATCH 04/10] ARM: dts: Augment VGA connector bridge on Realview PBX
@ 2018-03-11 13:53   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Liviu Dudau, dri-devel, Mali DP Maintainers

The PL111 in the ARM reference platforms are connected to
"panels" that are actually dumb VGA DAC connector bridges.
Now that we can support the proper bridges in the DRM driver,
fix this up.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/arm-realview-pbx.dtsi | 82 ++++++++++++++++++++++-----------
 1 file changed, 55 insertions(+), 27 deletions(-)

diff --git a/arch/arm/boot/dts/arm-realview-pbx.dtsi b/arch/arm/boot/dts/arm-realview-pbx.dtsi
index aeb49c4bd773..10868ba3277f 100644
--- a/arch/arm/boot/dts/arm-realview-pbx.dtsi
+++ b/arch/arm/boot/dts/arm-realview-pbx.dtsi
@@ -34,7 +34,8 @@
 		serial1 = &serial1;
 		serial2 = &serial2;
 		serial3 = &serial3;
-		i2c0 = &i2c;
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
 	};
 
 	memory {
@@ -158,6 +159,49 @@
 		port1-otg;
 	};
 
+	bridge {
+		compatible = "ti,ths8134a", "ti,ths8134";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				vga_bridge_in: endpoint {
+					remote-endpoint = <&clcd_pads>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				vga_bridge_out: endpoint {
+					remote-endpoint = <&vga_con_in>;
+				};
+			};
+		};
+	};
+
+	vga {
+		/*
+		 * This DDC I2C is connected directly to the DVI portions
+		 * of the connector, so it's not really working when the
+		 * monitor is connected to the VGA connector.
+		 */
+		compatible = "vga-connector";
+		ddc-i2c-bus = <&i2c1>;
+
+		port {
+			vga_con_in: endpoint {
+				remote-endpoint = <&vga_bridge_out>;
+			};
+		};
+	};
+
 	soc: soc@0 {
 		compatible = "arm,realview-pbx-soc", "simple-bus";
 		#address-cells = <1>;
@@ -285,7 +329,7 @@
 					       <&timclk>;
 		};
 
-		i2c: i2c@10002000 {
+		i2c0: i2c@10002000 {
 			#address-cells = <1>;
 			#size-cells = <0>;
 			compatible = "arm,versatile-i2c";
@@ -396,7 +440,12 @@
 			clock-names = "apb_pclk";
 		};
 
-		/* DVI serial bus control is at 10016000 */
+		i2c1: i2c@10016000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "arm,versatile-i2c";
+			reg = <0x10016000 0x1000>;
+		};
 
 		rtc: rtc@10017000 {
 			compatible = "arm,pl031", "arm,primecell";
@@ -506,36 +555,15 @@
 			interrupt-names = "combined";
 			clocks = <&oscclk4>, <&pclk>;
 			clock-names = "clcdclk", "apb_pclk";
+			/* 1024x768 16bpp @65MHz works fine */
+			max-memory-bandwidth = <95000000>;
 
 			port {
 				clcd_pads: endpoint {
-					remote-endpoint = <&clcd_panel>;
+					remote-endpoint = <&vga_bridge_in>;
 					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
 				};
 			};
-
-			panel {
-				compatible = "panel-dpi";
-
-				port {
-					clcd_panel: endpoint {
-						remote-endpoint = <&clcd_pads>;
-					};
-				};
-
-				/* Standard 640x480 VGA timings */
-				panel-timing {
-					clock-frequency = <25175000>;
-					hactive = <640>;
-					hback-porch = <48>;
-					hfront-porch = <16>;
-					hsync-len = <96>;
-					vactive = <480>;
-					vback-porch = <33>;
-					vfront-porch = <10>;
-					vsync-len = <2>;
-				};
-			};
 		};
 	};
 };
-- 
2.14.3

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

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

* [PATCH 05/10] ARM: dts: Add Versatile IB2 device tree
  2018-03-11 13:52 ` Linus Walleij
@ 2018-03-11 13:53   ` Linus Walleij
  -1 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

The Versatile board can be equipped with a interface board
just named "IB2". This was created in the early 2000s for
prototyping GSM candybar phone form factor products.

The IB2 board contains:
- Cascaded interrupt controller
- Enfora Enabler GSM0308 quad-band module with antenna and
  separate audio jack
- Keypad with joystick
- Sanyo 2.5" color display
- A 28-pin connector for mounting a camera

This adds a DTS file for the combination of the Versatile AB
with an IB2 daughterboard mounted, making the LED blink and
making the system controller available for drivers, such as
the panel driver.

The device tree bindings already exist in
Documentation/devicetree/bindings/arm/arm-boards.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/Makefile             |  1 +
 arch/arm/boot/dts/versatile-ab-ib2.dts | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 arch/arm/boot/dts/versatile-ab-ib2.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index ade7a38543dc..850f36902b81 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1047,6 +1047,7 @@ dtb-$(CONFIG_ARCH_UNIPHIER) += \
 	uniphier-sld8-ref.dtb
 dtb-$(CONFIG_ARCH_VERSATILE) += \
 	versatile-ab.dtb \
+	versatile-ab-ib2.dtb \
 	versatile-pb.dtb
 dtb-$(CONFIG_ARCH_VEXPRESS) += \
 	vexpress-v2p-ca5s.dtb \
diff --git a/arch/arm/boot/dts/versatile-ab-ib2.dts b/arch/arm/boot/dts/versatile-ab-ib2.dts
new file mode 100644
index 000000000000..5890cb974f78
--- /dev/null
+++ b/arch/arm/boot/dts/versatile-ab-ib2.dts
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * The Versatile AB with the IB2 expansion board mounted.
+ * This works as a superset of the Versatile AB.
+ */
+
+#include "versatile-ab.dts"
+
+/ {
+	model = "ARM Versatile AB + IB2 board";
+
+	/* Special IB2 control register */
+	ib2_syscon at 27000000 {
+		compatible = "arm,versatile-ib2-syscon", "syscon", "simple-mfd";
+		reg = <0x27000000 0x4>;
+
+		led at 00.4 {
+			compatible = "register-bit-led";
+			offset = <0x00>;
+			mask = <0x10>;
+			label = "versatile-ib2:0";
+			linux,default-trigger = "heartbeat";
+			default-state = "on";
+		};
+	};
+};
-- 
2.14.3

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

* [PATCH 05/10] ARM: dts: Add Versatile IB2 device tree
@ 2018-03-11 13:53   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Liviu Dudau, dri-devel, Mali DP Maintainers

The Versatile board can be equipped with a interface board
just named "IB2". This was created in the early 2000s for
prototyping GSM candybar phone form factor products.

The IB2 board contains:
- Cascaded interrupt controller
- Enfora Enabler GSM0308 quad-band module with antenna and
  separate audio jack
- Keypad with joystick
- Sanyo 2.5" color display
- A 28-pin connector for mounting a camera

This adds a DTS file for the combination of the Versatile AB
with an IB2 daughterboard mounted, making the LED blink and
making the system controller available for drivers, such as
the panel driver.

The device tree bindings already exist in
Documentation/devicetree/bindings/arm/arm-boards.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/Makefile             |  1 +
 arch/arm/boot/dts/versatile-ab-ib2.dts | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 arch/arm/boot/dts/versatile-ab-ib2.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index ade7a38543dc..850f36902b81 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1047,6 +1047,7 @@ dtb-$(CONFIG_ARCH_UNIPHIER) += \
 	uniphier-sld8-ref.dtb
 dtb-$(CONFIG_ARCH_VERSATILE) += \
 	versatile-ab.dtb \
+	versatile-ab-ib2.dtb \
 	versatile-pb.dtb
 dtb-$(CONFIG_ARCH_VEXPRESS) += \
 	vexpress-v2p-ca5s.dtb \
diff --git a/arch/arm/boot/dts/versatile-ab-ib2.dts b/arch/arm/boot/dts/versatile-ab-ib2.dts
new file mode 100644
index 000000000000..5890cb974f78
--- /dev/null
+++ b/arch/arm/boot/dts/versatile-ab-ib2.dts
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * The Versatile AB with the IB2 expansion board mounted.
+ * This works as a superset of the Versatile AB.
+ */
+
+#include "versatile-ab.dts"
+
+/ {
+	model = "ARM Versatile AB + IB2 board";
+
+	/* Special IB2 control register */
+	ib2_syscon@27000000 {
+		compatible = "arm,versatile-ib2-syscon", "syscon", "simple-mfd";
+		reg = <0x27000000 0x4>;
+
+		led@00.4 {
+			compatible = "register-bit-led";
+			offset = <0x00>;
+			mask = <0x10>;
+			label = "versatile-ib2:0";
+			linux,default-trigger = "heartbeat";
+			default-state = "on";
+		};
+	};
+};
-- 
2.14.3

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

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

* [PATCH 06/10] ARM: dts: Augment panel setting for Versatile
  2018-03-11 13:52 ` Linus Walleij
@ 2018-03-11 13:53   ` Linus Walleij
  -1 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

This adds the actual VGA DAC bridge that is used in the
Versatile AB, and sets the mode to 640x480 VGA.

The "clcd" clock was incorrectly named, the proper name
(from bindings) is "clcdclk". So far drivers survived
by just getting the first clock, but future drivers will
use named clocks.

We add the panel connector to the
"arm,versatile-tft-panel" as well, the signals actually
fork on the board, reaching both the VGA DAC and the
display connector.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/versatile-ab.dts | 83 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 81 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/versatile-ab.dts b/arch/arm/boot/dts/versatile-ab.dts
index 4a51612996bc..5f61d3609027 100644
--- a/arch/arm/boot/dts/versatile-ab.dts
+++ b/arch/arm/boot/dts/versatile-ab.dts
@@ -30,6 +30,43 @@
 		clock-frequency = <24000000>;
 	};
 
+	bridge {
+		compatible = "ti,ths8134b", "ti,ths8134";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				vga_bridge_in: endpoint {
+					remote-endpoint = <&clcd_pads_vga_dac>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				vga_bridge_out: endpoint {
+					remote-endpoint = <&vga_con_in>;
+				};
+			};
+		};
+	};
+
+	vga {
+		compatible = "vga-connector";
+
+		port {
+			vga_con_in: endpoint {
+				remote-endpoint = <&vga_bridge_out>;
+			};
+		};
+	};
+
 	core-module at 10000000 {
 		compatible = "arm,core-module-versatile", "syscon", "simple-mfd";
 		reg = <0x10000000 0x200>;
@@ -230,7 +267,39 @@
 			reg = <0x10120000 0x1000>;
 			interrupts = <16>;
 			clocks = <&osc1>, <&pclk>;
-			clock-names = "clcd", "apb_pclk";
+			clock-names = "clcdclk", "apb_pclk";
+			/* 800x600 16bpp @ 36MHz works fine */
+			max-memory-bandwidth = <54000000>;
+
+			/*
+			 * This port is routed through a PLD (Programmable
+			 * Logic Device) that routes the output from the CLCD
+			 * (after transformations) to the VGA DAC and also an
+			 * external panel connector. The PLD is essential for
+			 * supporting RGB565/BGR565.
+			 *
+			 * The signals from the port thus reaches two endpoints.
+			 * The PLD is managed through a few special bits in the
+			 * FPGA "sysreg".
+			 *
+			 * This arrangement can be clearly seen in
+			 * ARM DUI 0225D, page 3-41, figure 3-19.
+			 */
+			port at 0 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				clcd_pads_panel: endpoint at 0 {
+					reg = <0>;
+					remote-endpoint = <&panel_in>;
+					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
+				};
+				clcd_pads_vga_dac: endpoint at 1 {
+					reg = <1>;
+					remote-endpoint = <&vga_bridge_in>;
+					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
+				};
+			};
 		};
 
 		sctl at 101e0000 {
@@ -319,8 +388,18 @@
 			ranges = <0 0x10000000 0x10000>;
 
 			sysreg at 0 {
-				compatible = "arm,versatile-sysreg", "syscon";
+				compatible = "arm,versatile-sysreg", "syscon", "simple-mfd";
 				reg = <0x00000 0x1000>;
+
+				panel: display at 0 {
+					compatible = "arm,versatile-tft-panel";
+
+					port {
+						panel_in: endpoint {
+							remote-endpoint = <&clcd_pads_panel>;
+						};
+					};
+				};
 			};
 
 			aaci at 4000 {
-- 
2.14.3

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

* [PATCH 06/10] ARM: dts: Augment panel setting for Versatile
@ 2018-03-11 13:53   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Liviu Dudau, dri-devel, Mali DP Maintainers

This adds the actual VGA DAC bridge that is used in the
Versatile AB, and sets the mode to 640x480 VGA.

The "clcd" clock was incorrectly named, the proper name
(from bindings) is "clcdclk". So far drivers survived
by just getting the first clock, but future drivers will
use named clocks.

We add the panel connector to the
"arm,versatile-tft-panel" as well, the signals actually
fork on the board, reaching both the VGA DAC and the
display connector.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/versatile-ab.dts | 83 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 81 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/versatile-ab.dts b/arch/arm/boot/dts/versatile-ab.dts
index 4a51612996bc..5f61d3609027 100644
--- a/arch/arm/boot/dts/versatile-ab.dts
+++ b/arch/arm/boot/dts/versatile-ab.dts
@@ -30,6 +30,43 @@
 		clock-frequency = <24000000>;
 	};
 
+	bridge {
+		compatible = "ti,ths8134b", "ti,ths8134";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				vga_bridge_in: endpoint {
+					remote-endpoint = <&clcd_pads_vga_dac>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				vga_bridge_out: endpoint {
+					remote-endpoint = <&vga_con_in>;
+				};
+			};
+		};
+	};
+
+	vga {
+		compatible = "vga-connector";
+
+		port {
+			vga_con_in: endpoint {
+				remote-endpoint = <&vga_bridge_out>;
+			};
+		};
+	};
+
 	core-module@10000000 {
 		compatible = "arm,core-module-versatile", "syscon", "simple-mfd";
 		reg = <0x10000000 0x200>;
@@ -230,7 +267,39 @@
 			reg = <0x10120000 0x1000>;
 			interrupts = <16>;
 			clocks = <&osc1>, <&pclk>;
-			clock-names = "clcd", "apb_pclk";
+			clock-names = "clcdclk", "apb_pclk";
+			/* 800x600 16bpp @ 36MHz works fine */
+			max-memory-bandwidth = <54000000>;
+
+			/*
+			 * This port is routed through a PLD (Programmable
+			 * Logic Device) that routes the output from the CLCD
+			 * (after transformations) to the VGA DAC and also an
+			 * external panel connector. The PLD is essential for
+			 * supporting RGB565/BGR565.
+			 *
+			 * The signals from the port thus reaches two endpoints.
+			 * The PLD is managed through a few special bits in the
+			 * FPGA "sysreg".
+			 *
+			 * This arrangement can be clearly seen in
+			 * ARM DUI 0225D, page 3-41, figure 3-19.
+			 */
+			port@0 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				clcd_pads_panel: endpoint@0 {
+					reg = <0>;
+					remote-endpoint = <&panel_in>;
+					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
+				};
+				clcd_pads_vga_dac: endpoint@1 {
+					reg = <1>;
+					remote-endpoint = <&vga_bridge_in>;
+					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
+				};
+			};
 		};
 
 		sctl@101e0000 {
@@ -319,8 +388,18 @@
 			ranges = <0 0x10000000 0x10000>;
 
 			sysreg@0 {
-				compatible = "arm,versatile-sysreg", "syscon";
+				compatible = "arm,versatile-sysreg", "syscon", "simple-mfd";
 				reg = <0x00000 0x1000>;
+
+				panel: display@0 {
+					compatible = "arm,versatile-tft-panel";
+
+					port {
+						panel_in: endpoint {
+							remote-endpoint = <&clcd_pads_panel>;
+						};
+					};
+				};
 			};
 
 			aaci@4000 {
-- 
2.14.3

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

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

* [PATCH 07/10] ARM: defconfig: Update RealView defconfig
  2018-03-11 13:52 ` Linus Walleij
@ 2018-03-11 13:53   ` Linus Walleij
  -1 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

Just update with some new results from savedefconfig so we are
in sync with what has happened in Kconfig upstream.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/configs/realview_defconfig | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/arch/arm/configs/realview_defconfig b/arch/arm/configs/realview_defconfig
index 2a6d69d896bd..95bd20b2a4d2 100644
--- a/arch/arm/configs/realview_defconfig
+++ b/arch/arm/configs/realview_defconfig
@@ -11,19 +11,16 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_IOSCHED_CFQ is not set
 CONFIG_ARCH_MULTI_V6=y
 CONFIG_ARCH_REALVIEW=y
-CONFIG_REALVIEW_DT=y
 CONFIG_MACH_REALVIEW_EB=y
 CONFIG_REALVIEW_EB_ARM1136=y
 CONFIG_REALVIEW_EB_ARM1176=y
 CONFIG_REALVIEW_EB_A9MP=y
 CONFIG_REALVIEW_EB_ARM11MP=y
-CONFIG_REALVIEW_EB_ARM11MP_REVB=y
 CONFIG_MACH_REALVIEW_PB11MP=y
 CONFIG_MACH_REALVIEW_PB1176=y
 CONFIG_MACH_REALVIEW_PBA8=y
 CONFIG_MACH_REALVIEW_PBX=y
 CONFIG_SMP=y
-CONFIG_AEABI=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M"
@@ -46,7 +43,7 @@ CONFIG_MTD_CFI_INTELEXT=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_ROM=y
 CONFIG_MTD_PHYSMAP=y
-CONFIG_ARM_CHARLCD=y
+CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_NETDEVICES=y
@@ -59,7 +56,6 @@ CONFIG_LEGACY_PTY_COUNT=16
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
 # CONFIG_HW_RANDOM is not set
-CONFIG_I2C=y
 CONFIG_I2C_VERSATILE=y
 CONFIG_SPI=y
 CONFIG_GPIOLIB=y
@@ -72,8 +68,6 @@ CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_VGA16 is not set
 CONFIG_SOUND=y
 CONFIG_SND=y
-CONFIG_SND_MIXER_OSS=y
-CONFIG_SND_PCM_OSS=y
 # CONFIG_SND_DRIVERS is not set
 CONFIG_SND_ARMAACI=y
 CONFIG_USB=y
@@ -83,13 +77,14 @@ CONFIG_MMC=y
 CONFIG_MMC_ARMMMCI=y
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
-CONFIG_LEDS_VERSATILE=y
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
 CONFIG_LEDS_TRIGGER_CPU=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_DS1307=y
 CONFIG_RTC_DRV_PL031=y
+CONFIG_AUXDISPLAY=y
+CONFIG_ARM_CHARLCD=y
 CONFIG_VFAT_FS=y
 CONFIG_TMPFS=y
 CONFIG_CRAMFS=y
-- 
2.14.3

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

* [PATCH 07/10] ARM: defconfig: Update RealView defconfig
@ 2018-03-11 13:53   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Liviu Dudau, dri-devel

Just update with some new results from savedefconfig so we are
in sync with what has happened in Kconfig upstream.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/configs/realview_defconfig | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/arch/arm/configs/realview_defconfig b/arch/arm/configs/realview_defconfig
index 2a6d69d896bd..95bd20b2a4d2 100644
--- a/arch/arm/configs/realview_defconfig
+++ b/arch/arm/configs/realview_defconfig
@@ -11,19 +11,16 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_IOSCHED_CFQ is not set
 CONFIG_ARCH_MULTI_V6=y
 CONFIG_ARCH_REALVIEW=y
-CONFIG_REALVIEW_DT=y
 CONFIG_MACH_REALVIEW_EB=y
 CONFIG_REALVIEW_EB_ARM1136=y
 CONFIG_REALVIEW_EB_ARM1176=y
 CONFIG_REALVIEW_EB_A9MP=y
 CONFIG_REALVIEW_EB_ARM11MP=y
-CONFIG_REALVIEW_EB_ARM11MP_REVB=y
 CONFIG_MACH_REALVIEW_PB11MP=y
 CONFIG_MACH_REALVIEW_PB1176=y
 CONFIG_MACH_REALVIEW_PBA8=y
 CONFIG_MACH_REALVIEW_PBX=y
 CONFIG_SMP=y
-CONFIG_AEABI=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M"
@@ -46,7 +43,7 @@ CONFIG_MTD_CFI_INTELEXT=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_ROM=y
 CONFIG_MTD_PHYSMAP=y
-CONFIG_ARM_CHARLCD=y
+CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_NETDEVICES=y
@@ -59,7 +56,6 @@ CONFIG_LEGACY_PTY_COUNT=16
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
 # CONFIG_HW_RANDOM is not set
-CONFIG_I2C=y
 CONFIG_I2C_VERSATILE=y
 CONFIG_SPI=y
 CONFIG_GPIOLIB=y
@@ -72,8 +68,6 @@ CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_VGA16 is not set
 CONFIG_SOUND=y
 CONFIG_SND=y
-CONFIG_SND_MIXER_OSS=y
-CONFIG_SND_PCM_OSS=y
 # CONFIG_SND_DRIVERS is not set
 CONFIG_SND_ARMAACI=y
 CONFIG_USB=y
@@ -83,13 +77,14 @@ CONFIG_MMC=y
 CONFIG_MMC_ARMMMCI=y
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
-CONFIG_LEDS_VERSATILE=y
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
 CONFIG_LEDS_TRIGGER_CPU=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_DS1307=y
 CONFIG_RTC_DRV_PL031=y
+CONFIG_AUXDISPLAY=y
+CONFIG_ARM_CHARLCD=y
 CONFIG_VFAT_FS=y
 CONFIG_TMPFS=y
 CONFIG_CRAMFS=y
-- 
2.14.3

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

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

* [PATCH 08/10] ARM: defconfig: Switch RealView boards to use P111 DRM
  2018-03-11 13:52 ` Linus Walleij
@ 2018-03-11 13:53   ` Linus Walleij
  -1 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

The DRM driver is now finalized for the RealView board family,
so switch the defconfig to use this driver instead of the old
fbdev driver.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/configs/realview_defconfig | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/arm/configs/realview_defconfig b/arch/arm/configs/realview_defconfig
index 95bd20b2a4d2..cc9fa24d4b8f 100644
--- a/arch/arm/configs/realview_defconfig
+++ b/arch/arm/configs/realview_defconfig
@@ -21,6 +21,7 @@ CONFIG_MACH_REALVIEW_PB1176=y
 CONFIG_MACH_REALVIEW_PBA8=y
 CONFIG_MACH_REALVIEW_PBX=y
 CONFIG_SMP=y
+CONFIG_CMA=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M"
@@ -60,9 +61,12 @@ CONFIG_I2C_VERSATILE=y
 CONFIG_SPI=y
 CONFIG_GPIOLIB=y
 # CONFIG_HWMON is not set
-CONFIG_FB=y
-CONFIG_FB_ARMCLCD=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_DRM=y
+CONFIG_DRM_PANEL_SIMPLE=y
+CONFIG_DRM_PL111=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
-- 
2.14.3

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

* [PATCH 08/10] ARM: defconfig: Switch RealView boards to use P111 DRM
@ 2018-03-11 13:53   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Liviu Dudau, dri-devel

The DRM driver is now finalized for the RealView board family,
so switch the defconfig to use this driver instead of the old
fbdev driver.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/configs/realview_defconfig | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/arm/configs/realview_defconfig b/arch/arm/configs/realview_defconfig
index 95bd20b2a4d2..cc9fa24d4b8f 100644
--- a/arch/arm/configs/realview_defconfig
+++ b/arch/arm/configs/realview_defconfig
@@ -21,6 +21,7 @@ CONFIG_MACH_REALVIEW_PB1176=y
 CONFIG_MACH_REALVIEW_PBA8=y
 CONFIG_MACH_REALVIEW_PBX=y
 CONFIG_SMP=y
+CONFIG_CMA=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M"
@@ -60,9 +61,12 @@ CONFIG_I2C_VERSATILE=y
 CONFIG_SPI=y
 CONFIG_GPIOLIB=y
 # CONFIG_HWMON is not set
-CONFIG_FB=y
-CONFIG_FB_ARMCLCD=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_DRM=y
+CONFIG_DRM_PANEL_SIMPLE=y
+CONFIG_DRM_PL111=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
-- 
2.14.3

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

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

* [PATCH 09/10] ARM: defconfig: Update Versatile defconfig
  2018-03-11 13:52 ` Linus Walleij
@ 2018-03-11 13:53   ` Linus Walleij
  -1 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

This updates the Versatile defconfig to the latest savedefconfig
results reflecting changes in Kconfig. We add in the Flash memory
support that has been available upstream for a while now.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/configs/versatile_defconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig
index 295408ea9dc7..6a3e5774247e 100644
--- a/arch/arm/configs/versatile_defconfig
+++ b/arch/arm/configs/versatile_defconfig
@@ -32,7 +32,9 @@ CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_EEPROM_LEGACY=m
 CONFIG_NETDEVICES=y
@@ -54,14 +56,11 @@ CONFIG_SPI=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_PL061=y
 # CONFIG_HWMON is not set
-CONFIG_MFD_SYSCON=y
 CONFIG_FB=y
 CONFIG_FB_ARMCLCD=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_SOUND=y
 CONFIG_SND=m
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
 CONFIG_SND_ARMAACI=m
 CONFIG_MMC=y
 CONFIG_MMC_ARMMMCI=y
-- 
2.14.3

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

* [PATCH 09/10] ARM: defconfig: Update Versatile defconfig
@ 2018-03-11 13:53   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Liviu Dudau, dri-devel

This updates the Versatile defconfig to the latest savedefconfig
results reflecting changes in Kconfig. We add in the Flash memory
support that has been available upstream for a while now.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/configs/versatile_defconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig
index 295408ea9dc7..6a3e5774247e 100644
--- a/arch/arm/configs/versatile_defconfig
+++ b/arch/arm/configs/versatile_defconfig
@@ -32,7 +32,9 @@ CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_EEPROM_LEGACY=m
 CONFIG_NETDEVICES=y
@@ -54,14 +56,11 @@ CONFIG_SPI=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_PL061=y
 # CONFIG_HWMON is not set
-CONFIG_MFD_SYSCON=y
 CONFIG_FB=y
 CONFIG_FB_ARMCLCD=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_SOUND=y
 CONFIG_SND=m
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
 CONFIG_SND_ARMAACI=m
 CONFIG_MMC=y
 CONFIG_MMC_ARMMMCI=y
-- 
2.14.3

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

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

* [PATCH 10/10] ARM: defconfig: Configure Versatile boards to use PL111 DRM
  2018-03-11 13:52 ` Linus Walleij
@ 2018-03-11 13:53   ` Linus Walleij
  -1 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

The DRM driver is now finalized for the Versatile board family,
so switch the defconfig to use this driver instead of the old
fbdev driver.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/configs/versatile_defconfig | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig
index 6a3e5774247e..df68dc4056e5 100644
--- a/arch/arm/configs/versatile_defconfig
+++ b/arch/arm/configs/versatile_defconfig
@@ -12,6 +12,7 @@ CONFIG_PARTITION_ADVANCED=y
 CONFIG_ARCH_VERSATILE=y
 CONFIG_AEABI=y
 CONFIG_OABI_COMPAT=y
+CONFIG_CMA=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE="root=1f03 mem=32M"
@@ -49,16 +50,20 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250_RSA=y
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
-CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=m
 CONFIG_I2C_VERSATILE=y
 CONFIG_SPI=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_PL061=y
 # CONFIG_HWMON is not set
-CONFIG_FB=y
-CONFIG_FB_ARMCLCD=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_DRM=y
+CONFIG_DRM_PANEL_ARM_VERSATILE=y
+CONFIG_DRM_PANEL_SIMPLE=y
+CONFIG_DRM_PL111=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LOGO=y
 CONFIG_SOUND=y
 CONFIG_SND=m
 CONFIG_SND_ARMAACI=m
-- 
2.14.3

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

* [PATCH 10/10] ARM: defconfig: Configure Versatile boards to use PL111 DRM
@ 2018-03-11 13:53   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2018-03-11 13:53 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Liviu Dudau, dri-devel

The DRM driver is now finalized for the Versatile board family,
so switch the defconfig to use this driver instead of the old
fbdev driver.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/configs/versatile_defconfig | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig
index 6a3e5774247e..df68dc4056e5 100644
--- a/arch/arm/configs/versatile_defconfig
+++ b/arch/arm/configs/versatile_defconfig
@@ -12,6 +12,7 @@ CONFIG_PARTITION_ADVANCED=y
 CONFIG_ARCH_VERSATILE=y
 CONFIG_AEABI=y
 CONFIG_OABI_COMPAT=y
+CONFIG_CMA=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE="root=1f03 mem=32M"
@@ -49,16 +50,20 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250_RSA=y
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
-CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=m
 CONFIG_I2C_VERSATILE=y
 CONFIG_SPI=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_PL061=y
 # CONFIG_HWMON is not set
-CONFIG_FB=y
-CONFIG_FB_ARMCLCD=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_DRM=y
+CONFIG_DRM_PANEL_ARM_VERSATILE=y
+CONFIG_DRM_PANEL_SIMPLE=y
+CONFIG_DRM_PL111=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LOGO=y
 CONFIG_SOUND=y
 CONFIG_SND=m
 CONFIG_SND_ARMAACI=m
-- 
2.14.3

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

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

* [PATCH 01/10] ARM: dts: Augment VGA connector bridge on PB11MPcore
  2018-03-11 13:52   ` Linus Walleij
@ 2018-03-12 17:28     ` Liviu Dudau
  -1 siblings, 0 replies; 32+ messages in thread
From: Liviu Dudau @ 2018-03-12 17:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Mar 11, 2018 at 02:52:58PM +0100, Linus Walleij wrote:
> The PL111 in the ARM reference platforms are connected to
> "panels" that are actually dumb VGA DAC connector bridges.
> Now that we can support the proper bridges in the DRM driver,
> fix this up.
> 
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Hi Linus,

Changes look sane to me, but again I lack hardware to test.

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> ---
>  arch/arm/boot/dts/arm-realview-pb11mp.dts | 78 +++++++++++++++++++++----------
>  1 file changed, 53 insertions(+), 25 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/arm-realview-pb11mp.dts b/arch/arm/boot/dts/arm-realview-pb11mp.dts
> index 3944765ac4b0..36203288de42 100644
> --- a/arch/arm/boot/dts/arm-realview-pb11mp.dts
> +++ b/arch/arm/boot/dts/arm-realview-pb11mp.dts
> @@ -242,6 +242,49 @@
>  		bank-width = <4>;
>  	};
>  
> +	bridge {
> +		compatible = "ti,ths8134a", "ti,ths8134";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port at 0 {
> +				reg = <0>;
> +
> +				vga_bridge_in: endpoint {
> +					remote-endpoint = <&clcd_pads>;
> +				};
> +			};
> +
> +			port at 1 {
> +				reg = <1>;
> +
> +				vga_bridge_out: endpoint {
> +					remote-endpoint = <&vga_con_in>;
> +				};
> +			};
> +		};
> +	};
> +
> +	vga {
> +		/*
> +		 * This DDC I2C is connected directly to the DVI portions
> +		 * of the connector, so it's not really working when the
> +		 * monitor is connected to the VGA connector.
> +		 */
> +		compatible = "vga-connector";
> +		ddc-i2c-bus = <&i2c1>;
> +
> +		port {
> +			vga_con_in: endpoint {
> +				remote-endpoint = <&vga_bridge_out>;
> +			};
> +		};
> +	};
> +
>  	soc {
>  		#address-cells = <1>;
>  		#size-cells = <1>;
> @@ -575,6 +618,13 @@
>  			clock-names = "apb_pclk";
>  		};
>  
> +		i2c1: i2c at 10016000 {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			compatible = "arm,versatile-i2c";
> +			reg = <0x10016000 0x1000>;
> +		};
> +
>  		rtc: rtc at 10017000 {
>  			compatible = "arm,pl031", "arm,primecell";
>  			reg = <0x10017000 0x1000>;
> @@ -609,37 +659,15 @@
>  			interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
>  			clocks = <&oscclk4>, <&pclk>;
>  			clock-names = "clcdclk", "apb_pclk";
> -			max-memory-bandwidth = <130000000>; /* 16bpp @ 63.5MHz */
> +			/* 1024x768 16bpp @65MHz works fine */
> +			max-memory-bandwidth = <95000000>;
>  
>  			port {
>  				clcd_pads: endpoint {
> -					remote-endpoint = <&clcd_panel>;
> +					remote-endpoint = <&vga_bridge_in>;
>  					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
>  				};
>  			};
> -
> -			panel {
> -				compatible = "panel-dpi";
> -
> -				port {
> -					clcd_panel: endpoint {
> -						remote-endpoint = <&clcd_pads>;
> -					};
> -				};
> -
> -				/* Standard 640x480 VGA timings */
> -				panel-timing {
> -					clock-frequency = <25175000>;
> -					hactive = <640>;
> -					hback-porch = <48>;
> -					hfront-porch = <16>;
> -					hsync-len = <96>;
> -					vactive = <480>;
> -					vback-porch = <33>;
> -					vfront-porch = <10>;
> -					vsync-len = <2>;
> -				};
> -			};
>  		};
>  
>  		/*
> -- 
> 2.14.3
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ?\_(?)_/?

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

* Re: [PATCH 01/10] ARM: dts: Augment VGA connector bridge on PB11MPcore
@ 2018-03-12 17:28     ` Liviu Dudau
  0 siblings, 0 replies; 32+ messages in thread
From: Liviu Dudau @ 2018-03-12 17:28 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Mali DP Maintainers, dri-devel, linux-arm-kernel

On Sun, Mar 11, 2018 at 02:52:58PM +0100, Linus Walleij wrote:
> The PL111 in the ARM reference platforms are connected to
> "panels" that are actually dumb VGA DAC connector bridges.
> Now that we can support the proper bridges in the DRM driver,
> fix this up.
> 
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Hi Linus,

Changes look sane to me, but again I lack hardware to test.

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> ---
>  arch/arm/boot/dts/arm-realview-pb11mp.dts | 78 +++++++++++++++++++++----------
>  1 file changed, 53 insertions(+), 25 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/arm-realview-pb11mp.dts b/arch/arm/boot/dts/arm-realview-pb11mp.dts
> index 3944765ac4b0..36203288de42 100644
> --- a/arch/arm/boot/dts/arm-realview-pb11mp.dts
> +++ b/arch/arm/boot/dts/arm-realview-pb11mp.dts
> @@ -242,6 +242,49 @@
>  		bank-width = <4>;
>  	};
>  
> +	bridge {
> +		compatible = "ti,ths8134a", "ti,ths8134";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +
> +				vga_bridge_in: endpoint {
> +					remote-endpoint = <&clcd_pads>;
> +				};
> +			};
> +
> +			port@1 {
> +				reg = <1>;
> +
> +				vga_bridge_out: endpoint {
> +					remote-endpoint = <&vga_con_in>;
> +				};
> +			};
> +		};
> +	};
> +
> +	vga {
> +		/*
> +		 * This DDC I2C is connected directly to the DVI portions
> +		 * of the connector, so it's not really working when the
> +		 * monitor is connected to the VGA connector.
> +		 */
> +		compatible = "vga-connector";
> +		ddc-i2c-bus = <&i2c1>;
> +
> +		port {
> +			vga_con_in: endpoint {
> +				remote-endpoint = <&vga_bridge_out>;
> +			};
> +		};
> +	};
> +
>  	soc {
>  		#address-cells = <1>;
>  		#size-cells = <1>;
> @@ -575,6 +618,13 @@
>  			clock-names = "apb_pclk";
>  		};
>  
> +		i2c1: i2c@10016000 {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			compatible = "arm,versatile-i2c";
> +			reg = <0x10016000 0x1000>;
> +		};
> +
>  		rtc: rtc@10017000 {
>  			compatible = "arm,pl031", "arm,primecell";
>  			reg = <0x10017000 0x1000>;
> @@ -609,37 +659,15 @@
>  			interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
>  			clocks = <&oscclk4>, <&pclk>;
>  			clock-names = "clcdclk", "apb_pclk";
> -			max-memory-bandwidth = <130000000>; /* 16bpp @ 63.5MHz */
> +			/* 1024x768 16bpp @65MHz works fine */
> +			max-memory-bandwidth = <95000000>;
>  
>  			port {
>  				clcd_pads: endpoint {
> -					remote-endpoint = <&clcd_panel>;
> +					remote-endpoint = <&vga_bridge_in>;
>  					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
>  				};
>  			};
> -
> -			panel {
> -				compatible = "panel-dpi";
> -
> -				port {
> -					clcd_panel: endpoint {
> -						remote-endpoint = <&clcd_pads>;
> -					};
> -				};
> -
> -				/* Standard 640x480 VGA timings */
> -				panel-timing {
> -					clock-frequency = <25175000>;
> -					hactive = <640>;
> -					hback-porch = <48>;
> -					hfront-porch = <16>;
> -					hsync-len = <96>;
> -					vactive = <480>;
> -					vback-porch = <33>;
> -					vfront-porch = <10>;
> -					vsync-len = <2>;
> -				};
> -			};
>  		};
>  
>  		/*
> -- 
> 2.14.3
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 00/10] Switch Versatile and RealView to DRM
  2018-03-11 13:52 ` Linus Walleij
@ 2018-03-12 17:31   ` Daniel Vetter
  -1 siblings, 0 replies; 32+ messages in thread
From: Daniel Vetter @ 2018-03-12 17:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Mar 11, 2018 at 02:52:57PM +0100, Linus Walleij wrote:
> The ARM Versatile and RealView platforms have enough support
> merged for v4.17/next that we can fully switch them all over to
> using the DRM PL111 driver instead of the old fbdev driver.
> 
> Integrator and Versatile Express will follow.
> 
> The device trees are augmented with the proper VGA bridges
> instead of "panels" that were never correct, the maximum
> memory bandwidth is augmented and these platforms can now
> in many cases support 1024x768 in 16bpp instead of only
> 640x480 with 32bpp.
> 
> If the board has the IB1 or IB2 daughterboard
> mounted, the daughterboard display will take precedence
> over the VGA connector. The IB1 daughterboard which connects
> a number of various displays does not need any separate device
> tree: it will be autodetected.
> 
> For the Versatile CP with the IB2 daughterboard we need to
> add a new device tree, as it has a system controller we need
> to access and a few other features we may want to make use of
> in the future. (It already has proper device tree bindings
> in place.)
> 
> This has been tested on:
> 
> - RealView PM11MPCore
> - RealView PB1176
> - Versatile AB with and without the IB2 daughterboard
> - All applicable QEMU models: RealView EB, RealView PBA8,
>   RealView PBX-A9 and Versatile AB.
> 
> I'm planning to send this as two pull requests: one for the
> DTS changes and one for the defconfig changes.

\o/ this sounds awesome!

But I'll immediately show myself out of this thread because DT :-)

Cheers, Daniel
> 
> Linus Walleij (10):
>   ARM: dts: Augment VGA connector bridge on PB11MPcore
>   ARM: dts: Augment VGA connector bridge on PB1176
>   ARM: dts: Augment VGA connector bridge on Realview EB
>   ARM: dts: Augment VGA connector bridge on Realview PBX
>   ARM: dts: Add Versatile IB2 device tree
>   ARM: dts: Augment panel setting for Versatile
>   ARM: defconfig: Update RealView defconfig
>   ARM: defconfig: Switch RealView boards to use P111 DRM
>   ARM: defconfig: Update Versatile defconfig
>   ARM: defconfig: Configure Versatile boards to use PL111 DRM
> 
>  arch/arm/boot/dts/Makefile                |  1 +
>  arch/arm/boot/dts/arm-realview-eb.dtsi    | 64 +++++++++++++++---------
>  arch/arm/boot/dts/arm-realview-pb1176.dts | 66 ++++++++++++++----------
>  arch/arm/boot/dts/arm-realview-pb11mp.dts | 78 +++++++++++++++++++----------
>  arch/arm/boot/dts/arm-realview-pbx.dtsi   | 82 ++++++++++++++++++++----------
>  arch/arm/boot/dts/versatile-ab-ib2.dts    | 26 ++++++++++
>  arch/arm/boot/dts/versatile-ab.dts        | 83 ++++++++++++++++++++++++++++++-
>  arch/arm/configs/realview_defconfig       | 21 ++++----
>  arch/arm/configs/versatile_defconfig      | 18 ++++---
>  9 files changed, 317 insertions(+), 122 deletions(-)
>  create mode 100644 arch/arm/boot/dts/versatile-ab-ib2.dts
> 
> -- 
> 2.14.3
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH 00/10] Switch Versatile and RealView to DRM
@ 2018-03-12 17:31   ` Daniel Vetter
  0 siblings, 0 replies; 32+ messages in thread
From: Daniel Vetter @ 2018-03-12 17:31 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Liviu Dudau, dri-devel, linux-arm-kernel

On Sun, Mar 11, 2018 at 02:52:57PM +0100, Linus Walleij wrote:
> The ARM Versatile and RealView platforms have enough support
> merged for v4.17/next that we can fully switch them all over to
> using the DRM PL111 driver instead of the old fbdev driver.
> 
> Integrator and Versatile Express will follow.
> 
> The device trees are augmented with the proper VGA bridges
> instead of "panels" that were never correct, the maximum
> memory bandwidth is augmented and these platforms can now
> in many cases support 1024x768 in 16bpp instead of only
> 640x480 with 32bpp.
> 
> If the board has the IB1 or IB2 daughterboard
> mounted, the daughterboard display will take precedence
> over the VGA connector. The IB1 daughterboard which connects
> a number of various displays does not need any separate device
> tree: it will be autodetected.
> 
> For the Versatile CP with the IB2 daughterboard we need to
> add a new device tree, as it has a system controller we need
> to access and a few other features we may want to make use of
> in the future. (It already has proper device tree bindings
> in place.)
> 
> This has been tested on:
> 
> - RealView PM11MPCore
> - RealView PB1176
> - Versatile AB with and without the IB2 daughterboard
> - All applicable QEMU models: RealView EB, RealView PBA8,
>   RealView PBX-A9 and Versatile AB.
> 
> I'm planning to send this as two pull requests: one for the
> DTS changes and one for the defconfig changes.

\o/ this sounds awesome!

But I'll immediately show myself out of this thread because DT :-)

Cheers, Daniel
> 
> Linus Walleij (10):
>   ARM: dts: Augment VGA connector bridge on PB11MPcore
>   ARM: dts: Augment VGA connector bridge on PB1176
>   ARM: dts: Augment VGA connector bridge on Realview EB
>   ARM: dts: Augment VGA connector bridge on Realview PBX
>   ARM: dts: Add Versatile IB2 device tree
>   ARM: dts: Augment panel setting for Versatile
>   ARM: defconfig: Update RealView defconfig
>   ARM: defconfig: Switch RealView boards to use P111 DRM
>   ARM: defconfig: Update Versatile defconfig
>   ARM: defconfig: Configure Versatile boards to use PL111 DRM
> 
>  arch/arm/boot/dts/Makefile                |  1 +
>  arch/arm/boot/dts/arm-realview-eb.dtsi    | 64 +++++++++++++++---------
>  arch/arm/boot/dts/arm-realview-pb1176.dts | 66 ++++++++++++++----------
>  arch/arm/boot/dts/arm-realview-pb11mp.dts | 78 +++++++++++++++++++----------
>  arch/arm/boot/dts/arm-realview-pbx.dtsi   | 82 ++++++++++++++++++++----------
>  arch/arm/boot/dts/versatile-ab-ib2.dts    | 26 ++++++++++
>  arch/arm/boot/dts/versatile-ab.dts        | 83 ++++++++++++++++++++++++++++++-
>  arch/arm/configs/realview_defconfig       | 21 ++++----
>  arch/arm/configs/versatile_defconfig      | 18 ++++---
>  9 files changed, 317 insertions(+), 122 deletions(-)
>  create mode 100644 arch/arm/boot/dts/versatile-ab-ib2.dts
> 
> -- 
> 2.14.3
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 04/10] ARM: dts: Augment VGA connector bridge on Realview PBX
  2018-03-11 13:53   ` Linus Walleij
@ 2018-03-12 17:31     ` Liviu Dudau
  -1 siblings, 0 replies; 32+ messages in thread
From: Liviu Dudau @ 2018-03-12 17:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Mar 11, 2018 at 02:53:01PM +0100, Linus Walleij wrote:
> The PL111 in the ARM reference platforms are connected to
> "panels" that are actually dumb VGA DAC connector bridges.
> Now that we can support the proper bridges in the DRM driver,
> fix this up.
> 
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

> ---
>  arch/arm/boot/dts/arm-realview-pbx.dtsi | 82 ++++++++++++++++++++++-----------
>  1 file changed, 55 insertions(+), 27 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/arm-realview-pbx.dtsi b/arch/arm/boot/dts/arm-realview-pbx.dtsi
> index aeb49c4bd773..10868ba3277f 100644
> --- a/arch/arm/boot/dts/arm-realview-pbx.dtsi
> +++ b/arch/arm/boot/dts/arm-realview-pbx.dtsi
> @@ -34,7 +34,8 @@
>  		serial1 = &serial1;
>  		serial2 = &serial2;
>  		serial3 = &serial3;
> -		i2c0 = &i2c;
> +		i2c0 = &i2c0;
> +		i2c1 = &i2c1;
>  	};
>  
>  	memory {
> @@ -158,6 +159,49 @@
>  		port1-otg;
>  	};
>  
> +	bridge {
> +		compatible = "ti,ths8134a", "ti,ths8134";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port at 0 {
> +				reg = <0>;
> +
> +				vga_bridge_in: endpoint {
> +					remote-endpoint = <&clcd_pads>;
> +				};
> +			};
> +
> +			port at 1 {
> +				reg = <1>;
> +
> +				vga_bridge_out: endpoint {
> +					remote-endpoint = <&vga_con_in>;
> +				};
> +			};
> +		};
> +	};
> +
> +	vga {
> +		/*
> +		 * This DDC I2C is connected directly to the DVI portions
> +		 * of the connector, so it's not really working when the
> +		 * monitor is connected to the VGA connector.
> +		 */
> +		compatible = "vga-connector";
> +		ddc-i2c-bus = <&i2c1>;
> +
> +		port {
> +			vga_con_in: endpoint {
> +				remote-endpoint = <&vga_bridge_out>;
> +			};
> +		};
> +	};
> +
>  	soc: soc at 0 {
>  		compatible = "arm,realview-pbx-soc", "simple-bus";
>  		#address-cells = <1>;
> @@ -285,7 +329,7 @@
>  					       <&timclk>;
>  		};
>  
> -		i2c: i2c at 10002000 {
> +		i2c0: i2c at 10002000 {
>  			#address-cells = <1>;
>  			#size-cells = <0>;
>  			compatible = "arm,versatile-i2c";
> @@ -396,7 +440,12 @@
>  			clock-names = "apb_pclk";
>  		};
>  
> -		/* DVI serial bus control is at 10016000 */
> +		i2c1: i2c at 10016000 {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			compatible = "arm,versatile-i2c";
> +			reg = <0x10016000 0x1000>;
> +		};
>  
>  		rtc: rtc at 10017000 {
>  			compatible = "arm,pl031", "arm,primecell";
> @@ -506,36 +555,15 @@
>  			interrupt-names = "combined";
>  			clocks = <&oscclk4>, <&pclk>;
>  			clock-names = "clcdclk", "apb_pclk";
> +			/* 1024x768 16bpp @65MHz works fine */
> +			max-memory-bandwidth = <95000000>;
>  
>  			port {
>  				clcd_pads: endpoint {
> -					remote-endpoint = <&clcd_panel>;
> +					remote-endpoint = <&vga_bridge_in>;
>  					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
>  				};
>  			};
> -
> -			panel {
> -				compatible = "panel-dpi";
> -
> -				port {
> -					clcd_panel: endpoint {
> -						remote-endpoint = <&clcd_pads>;
> -					};
> -				};
> -
> -				/* Standard 640x480 VGA timings */
> -				panel-timing {
> -					clock-frequency = <25175000>;
> -					hactive = <640>;
> -					hback-porch = <48>;
> -					hfront-porch = <16>;
> -					hsync-len = <96>;
> -					vactive = <480>;
> -					vback-porch = <33>;
> -					vfront-porch = <10>;
> -					vsync-len = <2>;
> -				};
> -			};
>  		};
>  	};
>  };
> -- 
> 2.14.3
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ?\_(?)_/?

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

* Re: [PATCH 04/10] ARM: dts: Augment VGA connector bridge on Realview PBX
@ 2018-03-12 17:31     ` Liviu Dudau
  0 siblings, 0 replies; 32+ messages in thread
From: Liviu Dudau @ 2018-03-12 17:31 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Mali DP Maintainers, dri-devel, linux-arm-kernel

On Sun, Mar 11, 2018 at 02:53:01PM +0100, Linus Walleij wrote:
> The PL111 in the ARM reference platforms are connected to
> "panels" that are actually dumb VGA DAC connector bridges.
> Now that we can support the proper bridges in the DRM driver,
> fix this up.
> 
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

> ---
>  arch/arm/boot/dts/arm-realview-pbx.dtsi | 82 ++++++++++++++++++++++-----------
>  1 file changed, 55 insertions(+), 27 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/arm-realview-pbx.dtsi b/arch/arm/boot/dts/arm-realview-pbx.dtsi
> index aeb49c4bd773..10868ba3277f 100644
> --- a/arch/arm/boot/dts/arm-realview-pbx.dtsi
> +++ b/arch/arm/boot/dts/arm-realview-pbx.dtsi
> @@ -34,7 +34,8 @@
>  		serial1 = &serial1;
>  		serial2 = &serial2;
>  		serial3 = &serial3;
> -		i2c0 = &i2c;
> +		i2c0 = &i2c0;
> +		i2c1 = &i2c1;
>  	};
>  
>  	memory {
> @@ -158,6 +159,49 @@
>  		port1-otg;
>  	};
>  
> +	bridge {
> +		compatible = "ti,ths8134a", "ti,ths8134";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +
> +				vga_bridge_in: endpoint {
> +					remote-endpoint = <&clcd_pads>;
> +				};
> +			};
> +
> +			port@1 {
> +				reg = <1>;
> +
> +				vga_bridge_out: endpoint {
> +					remote-endpoint = <&vga_con_in>;
> +				};
> +			};
> +		};
> +	};
> +
> +	vga {
> +		/*
> +		 * This DDC I2C is connected directly to the DVI portions
> +		 * of the connector, so it's not really working when the
> +		 * monitor is connected to the VGA connector.
> +		 */
> +		compatible = "vga-connector";
> +		ddc-i2c-bus = <&i2c1>;
> +
> +		port {
> +			vga_con_in: endpoint {
> +				remote-endpoint = <&vga_bridge_out>;
> +			};
> +		};
> +	};
> +
>  	soc: soc@0 {
>  		compatible = "arm,realview-pbx-soc", "simple-bus";
>  		#address-cells = <1>;
> @@ -285,7 +329,7 @@
>  					       <&timclk>;
>  		};
>  
> -		i2c: i2c@10002000 {
> +		i2c0: i2c@10002000 {
>  			#address-cells = <1>;
>  			#size-cells = <0>;
>  			compatible = "arm,versatile-i2c";
> @@ -396,7 +440,12 @@
>  			clock-names = "apb_pclk";
>  		};
>  
> -		/* DVI serial bus control is at 10016000 */
> +		i2c1: i2c@10016000 {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			compatible = "arm,versatile-i2c";
> +			reg = <0x10016000 0x1000>;
> +		};
>  
>  		rtc: rtc@10017000 {
>  			compatible = "arm,pl031", "arm,primecell";
> @@ -506,36 +555,15 @@
>  			interrupt-names = "combined";
>  			clocks = <&oscclk4>, <&pclk>;
>  			clock-names = "clcdclk", "apb_pclk";
> +			/* 1024x768 16bpp @65MHz works fine */
> +			max-memory-bandwidth = <95000000>;
>  
>  			port {
>  				clcd_pads: endpoint {
> -					remote-endpoint = <&clcd_panel>;
> +					remote-endpoint = <&vga_bridge_in>;
>  					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
>  				};
>  			};
> -
> -			panel {
> -				compatible = "panel-dpi";
> -
> -				port {
> -					clcd_panel: endpoint {
> -						remote-endpoint = <&clcd_pads>;
> -					};
> -				};
> -
> -				/* Standard 640x480 VGA timings */
> -				panel-timing {
> -					clock-frequency = <25175000>;
> -					hactive = <640>;
> -					hback-porch = <48>;
> -					hfront-porch = <16>;
> -					hsync-len = <96>;
> -					vactive = <480>;
> -					vback-porch = <33>;
> -					vfront-porch = <10>;
> -					vsync-len = <2>;
> -				};
> -			};
>  		};
>  	};
>  };
> -- 
> 2.14.3
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 05/10] ARM: dts: Add Versatile IB2 device tree
  2018-03-11 13:53   ` Linus Walleij
@ 2018-03-12 17:34     ` Liviu Dudau
  -1 siblings, 0 replies; 32+ messages in thread
From: Liviu Dudau @ 2018-03-12 17:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Mar 11, 2018 at 02:53:02PM +0100, Linus Walleij wrote:
> The Versatile board can be equipped with a interface board
> just named "IB2". This was created in the early 2000s for
> prototyping GSM candybar phone form factor products.
> 
> The IB2 board contains:
> - Cascaded interrupt controller
> - Enfora Enabler GSM0308 quad-band module with antenna and
>   separate audio jack
> - Keypad with joystick
> - Sanyo 2.5" color display
> - A 28-pin connector for mounting a camera
> 
> This adds a DTS file for the combination of the Versatile AB
> with an IB2 daughterboard mounted, making the LED blink and
> making the system controller available for drivers, such as
> the panel driver.
> 
> The device tree bindings already exist in
> Documentation/devicetree/bindings/arm/arm-boards.
> 
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

<joke_mode>
Is this part of some master plan to increase the value of all the old
hardware that you have before selling it with the "works on mainline
Linux" feature? I'm not sure I can find any of this hardware in Arm.
</joke_mode>

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

Again, lacking hardware to test.

Best regards,
Liviu

> ---
>  arch/arm/boot/dts/Makefile             |  1 +
>  arch/arm/boot/dts/versatile-ab-ib2.dts | 26 ++++++++++++++++++++++++++
>  2 files changed, 27 insertions(+)
>  create mode 100644 arch/arm/boot/dts/versatile-ab-ib2.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index ade7a38543dc..850f36902b81 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1047,6 +1047,7 @@ dtb-$(CONFIG_ARCH_UNIPHIER) += \
>  	uniphier-sld8-ref.dtb
>  dtb-$(CONFIG_ARCH_VERSATILE) += \
>  	versatile-ab.dtb \
> +	versatile-ab-ib2.dtb \
>  	versatile-pb.dtb
>  dtb-$(CONFIG_ARCH_VEXPRESS) += \
>  	vexpress-v2p-ca5s.dtb \
> diff --git a/arch/arm/boot/dts/versatile-ab-ib2.dts b/arch/arm/boot/dts/versatile-ab-ib2.dts
> new file mode 100644
> index 000000000000..5890cb974f78
> --- /dev/null
> +++ b/arch/arm/boot/dts/versatile-ab-ib2.dts
> @@ -0,0 +1,26 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * The Versatile AB with the IB2 expansion board mounted.
> + * This works as a superset of the Versatile AB.
> + */
> +
> +#include "versatile-ab.dts"
> +
> +/ {
> +	model = "ARM Versatile AB + IB2 board";
> +
> +	/* Special IB2 control register */
> +	ib2_syscon at 27000000 {
> +		compatible = "arm,versatile-ib2-syscon", "syscon", "simple-mfd";
> +		reg = <0x27000000 0x4>;
> +
> +		led at 00.4 {
> +			compatible = "register-bit-led";
> +			offset = <0x00>;
> +			mask = <0x10>;
> +			label = "versatile-ib2:0";
> +			linux,default-trigger = "heartbeat";
> +			default-state = "on";
> +		};
> +	};
> +};
> -- 
> 2.14.3
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ?\_(?)_/?

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

* Re: [PATCH 05/10] ARM: dts: Add Versatile IB2 device tree
@ 2018-03-12 17:34     ` Liviu Dudau
  0 siblings, 0 replies; 32+ messages in thread
From: Liviu Dudau @ 2018-03-12 17:34 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Mali DP Maintainers, dri-devel, linux-arm-kernel

On Sun, Mar 11, 2018 at 02:53:02PM +0100, Linus Walleij wrote:
> The Versatile board can be equipped with a interface board
> just named "IB2". This was created in the early 2000s for
> prototyping GSM candybar phone form factor products.
> 
> The IB2 board contains:
> - Cascaded interrupt controller
> - Enfora Enabler GSM0308 quad-band module with antenna and
>   separate audio jack
> - Keypad with joystick
> - Sanyo 2.5" color display
> - A 28-pin connector for mounting a camera
> 
> This adds a DTS file for the combination of the Versatile AB
> with an IB2 daughterboard mounted, making the LED blink and
> making the system controller available for drivers, such as
> the panel driver.
> 
> The device tree bindings already exist in
> Documentation/devicetree/bindings/arm/arm-boards.
> 
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

<joke_mode>
Is this part of some master plan to increase the value of all the old
hardware that you have before selling it with the "works on mainline
Linux" feature? I'm not sure I can find any of this hardware in Arm.
</joke_mode>

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

Again, lacking hardware to test.

Best regards,
Liviu

> ---
>  arch/arm/boot/dts/Makefile             |  1 +
>  arch/arm/boot/dts/versatile-ab-ib2.dts | 26 ++++++++++++++++++++++++++
>  2 files changed, 27 insertions(+)
>  create mode 100644 arch/arm/boot/dts/versatile-ab-ib2.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index ade7a38543dc..850f36902b81 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1047,6 +1047,7 @@ dtb-$(CONFIG_ARCH_UNIPHIER) += \
>  	uniphier-sld8-ref.dtb
>  dtb-$(CONFIG_ARCH_VERSATILE) += \
>  	versatile-ab.dtb \
> +	versatile-ab-ib2.dtb \
>  	versatile-pb.dtb
>  dtb-$(CONFIG_ARCH_VEXPRESS) += \
>  	vexpress-v2p-ca5s.dtb \
> diff --git a/arch/arm/boot/dts/versatile-ab-ib2.dts b/arch/arm/boot/dts/versatile-ab-ib2.dts
> new file mode 100644
> index 000000000000..5890cb974f78
> --- /dev/null
> +++ b/arch/arm/boot/dts/versatile-ab-ib2.dts
> @@ -0,0 +1,26 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * The Versatile AB with the IB2 expansion board mounted.
> + * This works as a superset of the Versatile AB.
> + */
> +
> +#include "versatile-ab.dts"
> +
> +/ {
> +	model = "ARM Versatile AB + IB2 board";
> +
> +	/* Special IB2 control register */
> +	ib2_syscon@27000000 {
> +		compatible = "arm,versatile-ib2-syscon", "syscon", "simple-mfd";
> +		reg = <0x27000000 0x4>;
> +
> +		led@00.4 {
> +			compatible = "register-bit-led";
> +			offset = <0x00>;
> +			mask = <0x10>;
> +			label = "versatile-ib2:0";
> +			linux,default-trigger = "heartbeat";
> +			default-state = "on";
> +		};
> +	};
> +};
> -- 
> 2.14.3
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 06/10] ARM: dts: Augment panel setting for Versatile
  2018-03-11 13:53   ` Linus Walleij
@ 2018-03-12 17:37     ` Liviu Dudau
  -1 siblings, 0 replies; 32+ messages in thread
From: Liviu Dudau @ 2018-03-12 17:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Mar 11, 2018 at 02:53:03PM +0100, Linus Walleij wrote:
> This adds the actual VGA DAC bridge that is used in the
> Versatile AB, and sets the mode to 640x480 VGA.
> 
> The "clcd" clock was incorrectly named, the proper name
> (from bindings) is "clcdclk". So far drivers survived
> by just getting the first clock, but future drivers will
> use named clocks.
> 
> We add the panel connector to the
> "arm,versatile-tft-panel" as well, the signals actually
> fork on the board, reaching both the VGA DAC and the
> display connector.
> 
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

> ---
>  arch/arm/boot/dts/versatile-ab.dts | 83 +++++++++++++++++++++++++++++++++++++-
>  1 file changed, 81 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/versatile-ab.dts b/arch/arm/boot/dts/versatile-ab.dts
> index 4a51612996bc..5f61d3609027 100644
> --- a/arch/arm/boot/dts/versatile-ab.dts
> +++ b/arch/arm/boot/dts/versatile-ab.dts
> @@ -30,6 +30,43 @@
>  		clock-frequency = <24000000>;
>  	};
>  
> +	bridge {
> +		compatible = "ti,ths8134b", "ti,ths8134";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port at 0 {
> +				reg = <0>;
> +
> +				vga_bridge_in: endpoint {
> +					remote-endpoint = <&clcd_pads_vga_dac>;
> +				};
> +			};
> +
> +			port at 1 {
> +				reg = <1>;
> +
> +				vga_bridge_out: endpoint {
> +					remote-endpoint = <&vga_con_in>;
> +				};
> +			};
> +		};
> +	};
> +
> +	vga {
> +		compatible = "vga-connector";
> +
> +		port {
> +			vga_con_in: endpoint {
> +				remote-endpoint = <&vga_bridge_out>;
> +			};
> +		};
> +	};
> +
>  	core-module at 10000000 {
>  		compatible = "arm,core-module-versatile", "syscon", "simple-mfd";
>  		reg = <0x10000000 0x200>;
> @@ -230,7 +267,39 @@
>  			reg = <0x10120000 0x1000>;
>  			interrupts = <16>;
>  			clocks = <&osc1>, <&pclk>;
> -			clock-names = "clcd", "apb_pclk";
> +			clock-names = "clcdclk", "apb_pclk";
> +			/* 800x600 16bpp @ 36MHz works fine */
> +			max-memory-bandwidth = <54000000>;
> +
> +			/*
> +			 * This port is routed through a PLD (Programmable
> +			 * Logic Device) that routes the output from the CLCD
> +			 * (after transformations) to the VGA DAC and also an
> +			 * external panel connector. The PLD is essential for
> +			 * supporting RGB565/BGR565.
> +			 *
> +			 * The signals from the port thus reaches two endpoints.
> +			 * The PLD is managed through a few special bits in the
> +			 * FPGA "sysreg".
> +			 *
> +			 * This arrangement can be clearly seen in
> +			 * ARM DUI 0225D, page 3-41, figure 3-19.
> +			 */

If I remember correctly, besides being able to flip outputs via "sysreg"
there was a debug menu on the microcontroller that had options to set
the MUX to the right output before OS boot.

That brings back a lot of memories that I thought I'll never have any
use of :)

Best regards,
Liviu

> +			port at 0 {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				clcd_pads_panel: endpoint at 0 {
> +					reg = <0>;
> +					remote-endpoint = <&panel_in>;
> +					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
> +				};
> +				clcd_pads_vga_dac: endpoint at 1 {
> +					reg = <1>;
> +					remote-endpoint = <&vga_bridge_in>;
> +					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
> +				};
> +			};
>  		};
>  
>  		sctl at 101e0000 {
> @@ -319,8 +388,18 @@
>  			ranges = <0 0x10000000 0x10000>;
>  
>  			sysreg at 0 {
> -				compatible = "arm,versatile-sysreg", "syscon";
> +				compatible = "arm,versatile-sysreg", "syscon", "simple-mfd";
>  				reg = <0x00000 0x1000>;
> +
> +				panel: display at 0 {
> +					compatible = "arm,versatile-tft-panel";
> +
> +					port {
> +						panel_in: endpoint {
> +							remote-endpoint = <&clcd_pads_panel>;
> +						};
> +					};
> +				};
>  			};
>  
>  			aaci at 4000 {
> -- 
> 2.14.3
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ?\_(?)_/?

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

* Re: [PATCH 06/10] ARM: dts: Augment panel setting for Versatile
@ 2018-03-12 17:37     ` Liviu Dudau
  0 siblings, 0 replies; 32+ messages in thread
From: Liviu Dudau @ 2018-03-12 17:37 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Mali DP Maintainers, dri-devel, linux-arm-kernel

On Sun, Mar 11, 2018 at 02:53:03PM +0100, Linus Walleij wrote:
> This adds the actual VGA DAC bridge that is used in the
> Versatile AB, and sets the mode to 640x480 VGA.
> 
> The "clcd" clock was incorrectly named, the proper name
> (from bindings) is "clcdclk". So far drivers survived
> by just getting the first clock, but future drivers will
> use named clocks.
> 
> We add the panel connector to the
> "arm,versatile-tft-panel" as well, the signals actually
> fork on the board, reaching both the VGA DAC and the
> display connector.
> 
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

> ---
>  arch/arm/boot/dts/versatile-ab.dts | 83 +++++++++++++++++++++++++++++++++++++-
>  1 file changed, 81 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/versatile-ab.dts b/arch/arm/boot/dts/versatile-ab.dts
> index 4a51612996bc..5f61d3609027 100644
> --- a/arch/arm/boot/dts/versatile-ab.dts
> +++ b/arch/arm/boot/dts/versatile-ab.dts
> @@ -30,6 +30,43 @@
>  		clock-frequency = <24000000>;
>  	};
>  
> +	bridge {
> +		compatible = "ti,ths8134b", "ti,ths8134";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +
> +				vga_bridge_in: endpoint {
> +					remote-endpoint = <&clcd_pads_vga_dac>;
> +				};
> +			};
> +
> +			port@1 {
> +				reg = <1>;
> +
> +				vga_bridge_out: endpoint {
> +					remote-endpoint = <&vga_con_in>;
> +				};
> +			};
> +		};
> +	};
> +
> +	vga {
> +		compatible = "vga-connector";
> +
> +		port {
> +			vga_con_in: endpoint {
> +				remote-endpoint = <&vga_bridge_out>;
> +			};
> +		};
> +	};
> +
>  	core-module@10000000 {
>  		compatible = "arm,core-module-versatile", "syscon", "simple-mfd";
>  		reg = <0x10000000 0x200>;
> @@ -230,7 +267,39 @@
>  			reg = <0x10120000 0x1000>;
>  			interrupts = <16>;
>  			clocks = <&osc1>, <&pclk>;
> -			clock-names = "clcd", "apb_pclk";
> +			clock-names = "clcdclk", "apb_pclk";
> +			/* 800x600 16bpp @ 36MHz works fine */
> +			max-memory-bandwidth = <54000000>;
> +
> +			/*
> +			 * This port is routed through a PLD (Programmable
> +			 * Logic Device) that routes the output from the CLCD
> +			 * (after transformations) to the VGA DAC and also an
> +			 * external panel connector. The PLD is essential for
> +			 * supporting RGB565/BGR565.
> +			 *
> +			 * The signals from the port thus reaches two endpoints.
> +			 * The PLD is managed through a few special bits in the
> +			 * FPGA "sysreg".
> +			 *
> +			 * This arrangement can be clearly seen in
> +			 * ARM DUI 0225D, page 3-41, figure 3-19.
> +			 */

If I remember correctly, besides being able to flip outputs via "sysreg"
there was a debug menu on the microcontroller that had options to set
the MUX to the right output before OS boot.

That brings back a lot of memories that I thought I'll never have any
use of :)

Best regards,
Liviu

> +			port@0 {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				clcd_pads_panel: endpoint@0 {
> +					reg = <0>;
> +					remote-endpoint = <&panel_in>;
> +					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
> +				};
> +				clcd_pads_vga_dac: endpoint@1 {
> +					reg = <1>;
> +					remote-endpoint = <&vga_bridge_in>;
> +					arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
> +				};
> +			};
>  		};
>  
>  		sctl@101e0000 {
> @@ -319,8 +388,18 @@
>  			ranges = <0 0x10000000 0x10000>;
>  
>  			sysreg@0 {
> -				compatible = "arm,versatile-sysreg", "syscon";
> +				compatible = "arm,versatile-sysreg", "syscon", "simple-mfd";
>  				reg = <0x00000 0x1000>;
> +
> +				panel: display@0 {
> +					compatible = "arm,versatile-tft-panel";
> +
> +					port {
> +						panel_in: endpoint {
> +							remote-endpoint = <&clcd_pads_panel>;
> +						};
> +					};
> +				};
>  			};
>  
>  			aaci@4000 {
> -- 
> 2.14.3
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2018-03-12 17:37 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-11 13:52 [PATCH 00/10] Switch Versatile and RealView to DRM Linus Walleij
2018-03-11 13:52 ` Linus Walleij
2018-03-11 13:52 ` [PATCH 01/10] ARM: dts: Augment VGA connector bridge on PB11MPcore Linus Walleij
2018-03-11 13:52   ` Linus Walleij
2018-03-12 17:28   ` Liviu Dudau
2018-03-12 17:28     ` Liviu Dudau
2018-03-11 13:52 ` [PATCH 02/10] ARM: dts: Augment VGA connector bridge on PB1176 Linus Walleij
2018-03-11 13:52   ` Linus Walleij
2018-03-11 13:53 ` [PATCH 03/10] ARM: dts: Augment VGA connector bridge on Realview EB Linus Walleij
2018-03-11 13:53   ` Linus Walleij
2018-03-11 13:53 ` [PATCH 04/10] ARM: dts: Augment VGA connector bridge on Realview PBX Linus Walleij
2018-03-11 13:53   ` Linus Walleij
2018-03-12 17:31   ` Liviu Dudau
2018-03-12 17:31     ` Liviu Dudau
2018-03-11 13:53 ` [PATCH 05/10] ARM: dts: Add Versatile IB2 device tree Linus Walleij
2018-03-11 13:53   ` Linus Walleij
2018-03-12 17:34   ` Liviu Dudau
2018-03-12 17:34     ` Liviu Dudau
2018-03-11 13:53 ` [PATCH 06/10] ARM: dts: Augment panel setting for Versatile Linus Walleij
2018-03-11 13:53   ` Linus Walleij
2018-03-12 17:37   ` Liviu Dudau
2018-03-12 17:37     ` Liviu Dudau
2018-03-11 13:53 ` [PATCH 07/10] ARM: defconfig: Update RealView defconfig Linus Walleij
2018-03-11 13:53   ` Linus Walleij
2018-03-11 13:53 ` [PATCH 08/10] ARM: defconfig: Switch RealView boards to use P111 DRM Linus Walleij
2018-03-11 13:53   ` Linus Walleij
2018-03-11 13:53 ` [PATCH 09/10] ARM: defconfig: Update Versatile defconfig Linus Walleij
2018-03-11 13:53   ` Linus Walleij
2018-03-11 13:53 ` [PATCH 10/10] ARM: defconfig: Configure Versatile boards to use PL111 DRM Linus Walleij
2018-03-11 13:53   ` Linus Walleij
2018-03-12 17:31 ` [PATCH 00/10] Switch Versatile and RealView to DRM Daniel Vetter
2018-03-12 17:31   ` Daniel Vetter

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.