Skip to contentSkip to conversation

ARM: sunxi: Add support for MSI Primo73 tablet

PATCH In review Chen-Yu Tsai 3 participants 15 messages Jul 14, 2020 – Jul 21, 2020

Subsystems (6)
lore
Share & tools
lore

Chen-Yu Tsai

author maintainer
#0 lore raw

cover ARM: sunxi: Add support for MSI Primo73 tablet

From: Chen-Yu Tsai <[email protected]>

Hi everyone,

This series add support for MSI's Primo73 tablet. This is a 7" tablet based on Allwinner's A20 SoC.

The tablet uses some unknown LCD panel, with only serial number markings, and what appears to be a part number. Searching the Internet for said part number yielded no usable results. Hence this panel is described solely using the panel-dpi binding. The display timing values were retrieved from the hardware description file from the original Android system.

A new property for the panel-dpi binding is added to describe the color depth of the panel, which is normally included the panel description in panel-simple. Otherwise this would be undefined in the panel-dpi case and left to encoder drivers to make up. I believe this would be separate from the bus format, which was added earlier and then retracted.

Patches 1 and 2 add the new color depth property to the device tree binding and the panel-simple driver.

Patch 3 adds the board compatible string to the list of boards.

Patch 4 adds a pinmux option for LCD0 full 24-bit output, with control signals, for the A20.

Patch 5 adds the device tree file for the Primo73.

Please have a look.

Regards
ChenYu

Chen-Yu Tsai (5):
dt-bindings: display: panel-dpi: Add bits-per-color property drm/panel: simple: Set bpc from bits-per-color DT property for
panel-dpi
dt-bindings: arm: sunxi: Add compatible for MSI Primo73 tablet
ARM: dts: sun7i: Add LCD0 RGB888 pins
ARM: dts: sun7i: Add MSI Primo73 tablet

 .../devicetree/bindings/arm/sunxi.yaml        |   5 +
 .../bindings/display/panel/panel-dpi.yaml     |   4 +
 arch/arm/boot/dts/Makefile                    |   1 +
 arch/arm/boot/dts/sun7i-a20-primo73.dts       | 279 ++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20.dtsi              |  12 +
 drivers/gpu/drm/panel/panel-simple.c          |   1 +
 6 files changed, 302 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-primo73.dts
Signature · 1 line
2.27.0
author maintainer
#1 lore raw

PATCH 1/5 dt-bindings: display: panel-dpi: Add bits-per-color property

From: Chen-Yu Tsai <[email protected]>

Some LCD panels do not support 24-bit true color, or 8bits per channel RGB. Many low end ones only support up to 6 bits per channel natively.

Add a device tree property to describe the native bit depth of the panel. This is separate from the bus width or format of the connection to the display output.

---
 .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +4 -0
index 0cd74c8dab42..8eb013fb1969 100644
@@ -26,6 +26,9 @@ properties:
   height-mm: true
   label: true
   panel-timing: true
+  bits-per-color:
+    description:
+      Shall contain an integer describing the number of bits per color.
   port: true
   power-supply: true
   reset-gpios: true
@@ -42,6 +45,7 @@ examples:
     panel {
         compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
         label = "osddisplay";
+        bits-per-color = <8>;
         power-supply = <&vcc_supply>;
         backlight = <&backlight>;
 
Signature · 6 lines
2.27.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property

Quoted 19 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

Some LCD panels do not support 24-bit true color, or 8bits per channel RGB. Many low end ones only support up to 6 bits per channel natively.

Add a device tree property to describe the native bit depth of the panel. This is separate from the bus width or format of the connection to the display output.

---
 .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +0 -0
index 0cd74c8dab42..8eb013fb1969 100644

Documentation/devicetree/bindings/display/panel/panel-dpi.yaml properties: · line 31

Quoted 6 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +3 -0
@@ -26,6 +26,9 @@ properties:
   height-mm: true
   label: true
   panel-timing: true
+  bits-per-color:
+    description:
+      Shall contain an integer describing the number of bits per color.

You should specify its type (u32), range (1-8 I guess?) and default value (which seems to be 8).

Also, it's not unusual to have a different number of bits per color, like for 16 bits panels where we usually use RGB565. I guess we could make that an array?

Maxime

author maintainer
#3 lore raw

Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property

Quoted 16 lines · Maxime Ripard
Quoted 14 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

Some LCD panels do not support 24-bit true color, or 8bits per channel RGB. Many low end ones only support up to 6 bits per channel natively.

Add a device tree property to describe the native bit depth of the panel. This is separate from the bus width or format of the connection to the display output.

---
 .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
 1 file changed, 4 insertions(+)
Quoted 14 lines

Documentation/devicetree/bindings/display/panel/panel-dpi.yaml properties: · line 31

Quoted 11 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +3 -0
index 0cd74c8dab42..8eb013fb1969 100644
@@ -26,6 +26,9 @@ properties:
   height-mm: true
   label: true
   panel-timing: true
+  bits-per-color:
+    description:
+      Shall contain an integer describing the number of bits per color.

You should specify its type (u32), range (1-8 I guess?) and default value (which seems to be 8).

Ok.

Quoted 3 lines

Also, it's not unusual to have a different number of bits per color, like for 16 bits panels where we usually use RGB565. I guess we could make that an array?

So for different number of bits per color, I'm not sure whether that's a function of the panel itself, or the bus format. I don't really have any 16-bit panels on hand. As it stands DRM only handles a common color depth.

ChenYu

maintainer
#4 lore raw

Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property

In reply to Chen-Yu Tsai
Quoted 4 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

Some LCD panels do not support 24-bit true color, or 8bits per channel RGB. Many low end ones only support up to 6 bits per channel natively.

This should be implied by the panel's compatible property.

Quoted 34 lines

Add a device tree property to describe the native bit depth of the panel. This is separate from the bus width or format of the connection to the display output.

---
 .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +4 -0
index 0cd74c8dab42..8eb013fb1969 100644
@@ -26,6 +26,9 @@ properties:
   height-mm: true
   label: true
   panel-timing: true
+  bits-per-color:
+    description:
+      Shall contain an integer describing the number of bits per color.
   port: true
   power-supply: true
   reset-gpios: true
@@ -42,6 +45,7 @@ examples:
     panel {
         compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
         label = "osddisplay";
+        bits-per-color = <8>;
         power-supply = <&vcc_supply>;
         backlight = <&backlight>;
 
Signature · 1 line
2.27.0
#5 lore raw

Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property

Quoted 7 lines · Rob Herring
Quoted 4 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

Some LCD panels do not support 24-bit true color, or 8bits per channel RGB. Many low end ones only support up to 6 bits per channel natively.

This should be implied by the panel's compatible property.

I'm not sure it should, or at least it's not sufficient. Some panels while 24 bits capable might only have the higher bits connected to save off a couple of pins per color, in which case we should probably describe that somehow.

Maxime

author maintainer
#6 lore raw

Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property

Quoted 8 lines · Maxime Ripard
Quoted 6 lines · Rob Herring
Quoted 4 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

Some LCD panels do not support 24-bit true color, or 8bits per channel RGB. Many low end ones only support up to 6 bits per channel natively.

Quoted 6 lines
Quoted 1 line

This should be implied by the panel's compatible property.

I'm not sure it should, or at least it's not sufficient. Some panels while 24 bits capable might only have the higher bits connected to save off a couple of pins per color, in which case we should probably describe that somehow.

The bus format stuff that was added then removed might be better suited for what you have in mind. Right now that's put in the simple panel driver, but it likely doesn't belong there, since the bus format is also related to the hardware integration, signal routing as you mentioned, and not just a property of the panel itself.

Nevertheless, what I'm looking for can be achieved using bus format as well. Given that I have no datasheet for the panel in the device I'm upstreaming, and only a vague part number to go with, describing it as a bus format modifier rather than a property of the panel might be safer.

So I'll just drop the two patches regarding bit depth for now.

ChenYu

maintainer
#7 lore raw

Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property

In reply to Maxime Ripard
Quoted 8 lines · Maxime Ripard
Quoted 6 lines · Rob Herring
Quoted 4 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

Some LCD panels do not support 24-bit true color, or 8bits per channel RGB. Many low end ones only support up to 6 bits per channel natively.

Quoted 6 lines
Quoted 1 line

This should be implied by the panel's compatible property.

I'm not sure it should, or at least it's not sufficient. Some panels while 24 bits capable might only have the higher bits connected to save off a couple of pins per color, in which case we should probably describe that somehow.

That's the bus/interface format which the 2nd paragraph said this was not for. If it was, then just bits per component is not enough.

Rob

author maintainer
#8 lore raw

PATCH 2/5 drm/panel: simple: Set bpc from bits-per-color DT property for panel-dpi

In reply to Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

Now that the device tree binding for panel-dpi has the "bits-per-color" property, parse its value and set bpc in the panel description to the given value. This would allow encoders to detect less-than-8-bits color depth and employ color dithering if possible.

---
 drivers/gpu/drm/panel/panel-simple.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-simple.c +1 -0
index 13a9df44f781..0765bfa54b7a 100644
@@ -433,6 +433,7 @@ static int panel_dpi_probe(struct device *dev,
 
 	of_property_read_u32(np, "width-mm", &desc->size.width);
 	of_property_read_u32(np, "height-mm", &desc->size.height);
+	of_property_read_u32(np, "bits-per-color", &desc->bpc);
 
 	/* Extract bus_flags from display_timing */
 	bus_flags = 0;
Signature · 1 line
2.27.0
author maintainer
#9 lore raw

PATCH 3/5 dt-bindings: arm: sunxi: Add compatible for MSI Primo73 tablet

In reply to Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

Document board compatible name for MSI Primo73 tablet.

---
 Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/sunxi.yaml +5 -0
index efc9118233b4..35d78448ec46 100644
@@ -475,6 +475,11 @@ properties:
           - const: allwinner,mk808c
           - const: allwinner,sun7i-a20
 
+      - description: MSI Primo73 Tablet
+        items:
+          - const: msi,primo73
+          - const: allwinner,sun7i-a20
+
       - description: MSI Primo81 Tablet
         items:
           - const: msi,primo81
Signature · 1 line
2.27.0
author maintainer
#11 lore raw

PATCH 4/5 ARM: dts: sun7i: Add LCD0 RGB888 pins

In reply to Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

In some designs, the full 24 bits of RGB plus the control / sync signals for the LCD panel are used.

Add a pinmux option for this.

---
 arch/arm/boot/dts/sun7i-a20.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/boot/dts/sun7i-a20.dtsi +12 -0
index 6d6a37940db2..eec6b4473cbd 100644
@@ -934,6 +934,18 @@ ir1_tx_pin: ir1-tx-pin {
 				function = "ir1";
 			};
 
+			/omit-if-no-ref/
+			lcd0_rgb888_pins: lcd0-rgb888-pins {
+				pins = "PD0", "PD1", "PD2", "PD3",
+				       "PD4", "PD5", "PD6", "PD7",
+				       "PD8", "PD9", "PD10", "PD11",
+				       "PD12", "PD13", "PD14", "PD15",
+				       "PD16", "PD17", "PD18", "PD19",
+				       "PD20", "PD21", "PD22", "PD23",
+				       "PD24", "PD25", "PD26", "PD27";
+				function = "lcd0";
+			};
+
 			/omit-if-no-ref/
 			lcd_lvds0_pins: lcd-lvds0-pins {
 				pins = "PD0", "PD1", "PD2", "PD3", "PD4",
Signature · 1 line
2.27.0
author maintainer
#12 lore raw

PATCH 5/5 ARM: dts: sun7i: Add MSI Primo73 tablet

In reply to Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

The Primo73 is an MSI branded Allwinner A20-based 7-inch tablet. It has a metal back case with a plastic insert around where the WiFi antenna is. The tablet is (as of July of 2020) no longer available from retailers. Kernel sources (as required by GPL) are no longer available from the vendor, MSI. The device support page still lists the link, but it is dead.

The tablet features a non-identifiable 1024x600 7" MIPI DPI TFT panel, Goodix GT911-based capacitive touchscreen, 1GB DRAM, 8GB MLC NAND, RTL8188ETV-based WiFi, an NXP MMA8452 accelerometer for orientation, a GC2035 2 megapixel rear camera, a GC0308 0.3 megapixel front camera, a mini-HDMI output, a micro-USB port, a headphone jack and single speaker.

The board design is believe to follow Allwinner's reference design. This judgement is based on the fact that the I/O pins and GPIO lines used match up with the reference design. Assumptions about the regulator tree are based on this.

The LCD panel only has some serial number markings, and what appears to be a part number: "OS1N71J003", which is also a prefix for one of the serial number markings. Searching for this part number yielded no results. As such, the color depth display timings are directly listed in the device tree. The timing are from the FEX file recovered from the device. The color depth was derived from the dithering setting from the FEX file, as well as independent testing with a color gradient image. The internal board, as well as the ribbon cable for the panel, route the full 24 bits of color. So the 2 extra bits are dropped either by the panel itself or somewhere within the LCD panel module casing.

Add a device tree for this tablet. Almost the whole device is supported. The only things missing are the two cameras, which don't have device tree bindings or driver support. The vendor for the LCD panel is left out, since there is nothing to go with.

---

The panel-dpi binding requires a more-specific compatible string. However given the vendor of the panel is unknown, I'm not sure what the best course of action is here. I opted to put the part number in without a vendor prefix.

---
 arch/arm/boot/dts/Makefile              |   1 +
 arch/arm/boot/dts/sun7i-a20-primo73.dts | 279 ++++++++++++++++++++++++
 2 files changed, 280 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-primo73.dts
arch/arm/boot/dts/Makefile +1 -0
index e6a1cac0bfc7..c09cda958db5 100644
@@ -1133,6 +1133,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-orangepi-mini.dtb \
 	sun7i-a20-pcduino3.dtb \
 	sun7i-a20-pcduino3-nano.dtb \
+	sun7i-a20-primo73.dtb \
 	sun7i-a20-wexler-tab7200.dtb \
 	sun7i-a20-wits-pro-a20-dkt.dtb
 dtb-$(CONFIG_MACH_SUN8I) += \
arch/arm/boot/dts/sun7i-a20-primo73.dts new file +279 -0

279 lines not on this page · raw message

Signature · 1 line
2.27.0
#13 lore raw

Re: [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet

Hi,

Quoted 36 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

The Primo73 is an MSI branded Allwinner A20-based 7-inch tablet. It has a metal back case with a plastic insert around where the WiFi antenna is. The tablet is (as of July of 2020) no longer available from retailers. Kernel sources (as required by GPL) are no longer available from the vendor, MSI. The device support page still lists the link, but it is dead.

The tablet features a non-identifiable 1024x600 7" MIPI DPI TFT panel, Goodix GT911-based capacitive touchscreen, 1GB DRAM, 8GB MLC NAND, RTL8188ETV-based WiFi, an NXP MMA8452 accelerometer for orientation, a GC2035 2 megapixel rear camera, a GC0308 0.3 megapixel front camera, a mini-HDMI output, a micro-USB port, a headphone jack and single speaker.

The board design is believe to follow Allwinner's reference design. This judgement is based on the fact that the I/O pins and GPIO lines used match up with the reference design. Assumptions about the regulator tree are based on this.

The LCD panel only has some serial number markings, and what appears to be a part number: "OS1N71J003", which is also a prefix for one of the serial number markings. Searching for this part number yielded no results. As such, the color depth display timings are directly listed in the device tree. The timing are from the FEX file recovered from the device. The color depth was derived from the dithering setting from the FEX file, as well as independent testing with a color gradient image. The internal board, as well as the ribbon cable for the panel, route the full 24 bits of color. So the 2 extra bits are dropped either by the panel itself or somewhere within the LCD panel module casing.

Add a device tree for this tablet. Almost the whole device is supported. The only things missing are the two cameras, which don't have device tree bindings or driver support. The vendor for the LCD panel is left out, since there is nothing to go with.

Quoted 7 lines

---

The panel-dpi binding requires a more-specific compatible string. However given the vendor of the panel is unknown, I'm not sure what the best course of action is here. I opted to put the part number in without a vendor prefix.

I guess we could just make up a comptible from the tablet name here? Something like msi,primo73-panel ?

Quoted 79 lines
---
 arch/arm/boot/dts/Makefile              |   1 +
 arch/arm/boot/dts/sun7i-a20-primo73.dts | 279 ++++++++++++++++++++++++
 2 files changed, 280 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-primo73.dts
arch/arm/boot/dts/Makefile +1 -0
index e6a1cac0bfc7..c09cda958db5 100644
@@ -1133,6 +1133,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-orangepi-mini.dtb \
 	sun7i-a20-pcduino3.dtb \
 	sun7i-a20-pcduino3-nano.dtb \
+	sun7i-a20-primo73.dtb \
 	sun7i-a20-wexler-tab7200.dtb \
 	sun7i-a20-wits-pro-a20-dkt.dtb
 dtb-$(CONFIG_MACH_SUN8I) += \
arch/arm/boot/dts/sun7i-a20-primo73.dts new file +55 -0
new file mode 100644
index 000000000000..f3b1002ceb50
@@ -0,0 +1,279 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Chen-Yu Tsai <[email protected]>
+ */
+
+/dts-v1/;
+#include "sun7i-a20.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/{
+	model = "MSI Primo73 Tablet";
+	compatible = "msi,primo73", "allwinner,sun7i-a20";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	hdmi-connector {
+		compatible = "hdmi-connector";
+		type = "b";
+
+		port {
+			hdmi_con_in: endpoint {
+				remote-endpoint = <&hdmi_out_con>;
+			};
+		};
+	};
+
+	panel: panel {
+		compatible = "os1n71j003", "panel-dpi";
+		backlight = <&backlight>;
+		power-supply = <&reg_vcc5v0>; /* Actually driven from IPSOUT */
+		enable-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
+		height-mm = <86>;
+		width-mm = <155>;
+		bits-per-color = <6>;
+
+		panel-timing {
+			clock-frequency = <60000000>;
+			hactive = <1024>;

arch/arm/boot/dts/sun7i-a20-primo73.dts line 65

Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-primo73.dts new file +10 -0
+			vactive = <600>;
+			hfront-porch = <160>;
+			hback-porch = <60>;
+			hsync-len = <100>;
+			vback-porch = <13>;
+			vfront-porch = <10>;
+			vsync-len = <10>;
+			de-active = <1>;
+			pixelclk-active = <0>;
+		};

The clock frequency doesn't seem to match the rest of the timings though, it should be around 51MHz. Was this taken from the fex file too?

Maxime

author maintainer
#14 lore raw

Re: [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet

Quoted 43 lines · Maxime Ripard

Hi,

Quoted 39 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

The Primo73 is an MSI branded Allwinner A20-based 7-inch tablet. It has a metal back case with a plastic insert around where the WiFi antenna is. The tablet is (as of July of 2020) no longer available from retailers. Kernel sources (as required by GPL) are no longer available from the vendor, MSI. The device support page still lists the link, but it is dead.

The tablet features a non-identifiable 1024x600 7" MIPI DPI TFT panel, Goodix GT911-based capacitive touchscreen, 1GB DRAM, 8GB MLC NAND, RTL8188ETV-based WiFi, an NXP MMA8452 accelerometer for orientation, a GC2035 2 megapixel rear camera, a GC0308 0.3 megapixel front camera, a mini-HDMI output, a micro-USB port, a headphone jack and single speaker.

The board design is believe to follow Allwinner's reference design. This judgement is based on the fact that the I/O pins and GPIO lines used match up with the reference design. Assumptions about the regulator tree are based on this.

The LCD panel only has some serial number markings, and what appears to be a part number: "OS1N71J003", which is also a prefix for one of the serial number markings. Searching for this part number yielded no results. As such, the color depth display timings are directly listed in the device tree. The timing are from the FEX file recovered from the device. The color depth was derived from the dithering setting from the FEX file, as well as independent testing with a color gradient image. The internal board, as well as the ribbon cable for the panel, route the full 24 bits of color. So the 2 extra bits are dropped either by the panel itself or somewhere within the LCD panel module casing.

Add a device tree for this tablet. Almost the whole device is supported. The only things missing are the two cameras, which don't have device tree bindings or driver support. The vendor for the LCD panel is left out, since there is nothing to go with.

---

Quoted 7 lines
Quoted 4 lines

The panel-dpi binding requires a more-specific compatible string. However given the vendor of the panel is unknown, I'm not sure what the best course of action is here. I opted to put the part number in without a vendor prefix.

I guess we could just make up a comptible from the tablet name here? Something like msi,primo73-panel ?

That might work. On the other hand, someone might take apart theirs and find a different panel than mine, and not realize the timings are off. Keeping the part number would still be useful, even if we don't have any information on it.

Quoted 84 lines
Quoted 84 lines
---
 arch/arm/boot/dts/Makefile              |   1 +
 arch/arm/boot/dts/sun7i-a20-primo73.dts | 279 ++++++++++++++++++++++++
 2 files changed, 280 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-primo73.dts
arch/arm/boot/dts/Makefile +1 -0
index e6a1cac0bfc7..c09cda958db5 100644
@@ -1133,6 +1133,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
      sun7i-a20-orangepi-mini.dtb \
      sun7i-a20-pcduino3.dtb \
      sun7i-a20-pcduino3-nano.dtb \
+     sun7i-a20-primo73.dtb \
      sun7i-a20-wexler-tab7200.dtb \
      sun7i-a20-wits-pro-a20-dkt.dtb
 dtb-$(CONFIG_MACH_SUN8I) += \
arch/arm/boot/dts/sun7i-a20-primo73.dts new file +60 -0
new file mode 100644
index 000000000000..f3b1002ceb50
@@ -0,0 +1,279 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Chen-Yu Tsai <[email protected]>
+ */
+
+/dts-v1/;
+#include "sun7i-a20.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/{
+     model = "MSI Primo73 Tablet";
+     compatible = "msi,primo73", "allwinner,sun7i-a20";
+
+     aliases {
+             serial0 = &uart0;
+     };
+
+     backlight: backlight {
+             compatible = "pwm-backlight";
+             pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+             enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+     };
+
+     chosen {
+             stdout-path = "serial0:115200n8";
+     };
+
+     hdmi-connector {
+             compatible = "hdmi-connector";
+             type = "b";
+
+             port {
+                     hdmi_con_in: endpoint {
+                             remote-endpoint = <&hdmi_out_con>;
+                     };
+             };
+     };
+
+     panel: panel {
+             compatible = "os1n71j003", "panel-dpi";
+             backlight = <&backlight>;
+             power-supply = <&reg_vcc5v0>; /* Actually driven from IPSOUT */
+             enable-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
+             height-mm = <86>;
+             width-mm = <155>;
+             bits-per-color = <6>;
+
+             panel-timing {
+                     clock-frequency = <60000000>;
+                     hactive = <1024>;
+                     vactive = <600>;
+                     hfront-porch = <160>;
+                     hback-porch = <60>;
+                     hsync-len = <100>;
+                     vback-porch = <13>;
Quoted 8 lines

arch/arm/boot/dts/sun7i-a20-primo73.dts line 65

Quoted 5 lines
arch/arm/boot/dts/sun7i-a20-primo73.dts new file +5 -0
+                     vfront-porch = <10>;
+                     vsync-len = <10>;
+                     de-active = <1>;
+                     pixelclk-active = <0>;
+             };

The clock frequency doesn't seem to match the rest of the timings though, it should be around 51MHz. Was this taken from the fex file too?

It was. I wonder if they somehow fixed up the timing in the driver.

ChenYu
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel