All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] ARM: sunxi: Add support for MSI Primo73 tablet
@ 2020-07-14  7:13 ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: Chen-Yu Tsai, linux-arm-kernel, devicetree, dri-devel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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

-- 
2.27.0


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

* [PATCH 0/5] ARM: sunxi: Add support for MSI Primo73 tablet
@ 2020-07-14  7:13 ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: devicetree, Chen-Yu Tsai, dri-devel, linux-arm-kernel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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

-- 
2.27.0


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

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

* [PATCH 0/5] ARM: sunxi: Add support for MSI Primo73 tablet
@ 2020-07-14  7:13 ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: devicetree, Chen-Yu Tsai, dri-devel, linux-arm-kernel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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

-- 
2.27.0

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

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

* [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
  2020-07-14  7:13 ` Chen-Yu Tsai
  (?)
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: Chen-Yu Tsai, linux-arm-kernel, devicetree, dri-devel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
index 0cd74c8dab42..8eb013fb1969 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
@@ -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>;
 
-- 
2.27.0


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

* [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: devicetree, Chen-Yu Tsai, dri-devel, linux-arm-kernel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
index 0cd74c8dab42..8eb013fb1969 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
@@ -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>;
 
-- 
2.27.0


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

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

* [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: devicetree, Chen-Yu Tsai, dri-devel, linux-arm-kernel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
index 0cd74c8dab42..8eb013fb1969 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
@@ -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>;
 
-- 
2.27.0

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

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

* [PATCH 2/5] drm/panel: simple: Set bpc from bits-per-color DT property for panel-dpi
  2020-07-14  7:13 ` Chen-Yu Tsai
  (?)
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: Chen-Yu Tsai, linux-arm-kernel, devicetree, dri-devel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 drivers/gpu/drm/panel/panel-simple.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 13a9df44f781..0765bfa54b7a 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -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;
-- 
2.27.0


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

* [PATCH 2/5] drm/panel: simple: Set bpc from bits-per-color DT property for panel-dpi
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: devicetree, Chen-Yu Tsai, dri-devel, linux-arm-kernel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 drivers/gpu/drm/panel/panel-simple.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 13a9df44f781..0765bfa54b7a 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -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;
-- 
2.27.0


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

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

* [PATCH 2/5] drm/panel: simple: Set bpc from bits-per-color DT property for panel-dpi
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: devicetree, Chen-Yu Tsai, dri-devel, linux-arm-kernel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 drivers/gpu/drm/panel/panel-simple.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 13a9df44f781..0765bfa54b7a 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -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;
-- 
2.27.0

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

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

* [PATCH 3/5] dt-bindings: arm: sunxi: Add compatible for MSI Primo73 tablet
  2020-07-14  7:13 ` Chen-Yu Tsai
  (?)
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: Chen-Yu Tsai, linux-arm-kernel, devicetree, dri-devel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

Document board compatible name for MSI Primo73 tablet.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
index efc9118233b4..35d78448ec46 100644
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
@@ -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
-- 
2.27.0


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

* [PATCH 3/5] dt-bindings: arm: sunxi: Add compatible for MSI Primo73 tablet
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: devicetree, Chen-Yu Tsai, dri-devel, linux-arm-kernel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

Document board compatible name for MSI Primo73 tablet.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
index efc9118233b4..35d78448ec46 100644
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
@@ -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
-- 
2.27.0


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

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

* [PATCH 3/5] dt-bindings: arm: sunxi: Add compatible for MSI Primo73 tablet
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: devicetree, Chen-Yu Tsai, dri-devel, linux-arm-kernel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

Document board compatible name for MSI Primo73 tablet.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
index efc9118233b4..35d78448ec46 100644
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
@@ -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
-- 
2.27.0

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

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

* [PATCH 4/5] ARM: dts: sun7i: Add LCD0 RGB888 pins
  2020-07-14  7:13 ` Chen-Yu Tsai
  (?)
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: Chen-Yu Tsai, linux-arm-kernel, devicetree, dri-devel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 6d6a37940db2..eec6b4473cbd 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -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",
-- 
2.27.0


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

* [PATCH 4/5] ARM: dts: sun7i: Add LCD0 RGB888 pins
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: devicetree, Chen-Yu Tsai, dri-devel, linux-arm-kernel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 6d6a37940db2..eec6b4473cbd 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -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",
-- 
2.27.0


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

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

* [PATCH 4/5] ARM: dts: sun7i: Add LCD0 RGB888 pins
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: devicetree, Chen-Yu Tsai, dri-devel, linux-arm-kernel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 6d6a37940db2..eec6b4473cbd 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -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",
-- 
2.27.0

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

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

* [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet
  2020-07-14  7:13 ` Chen-Yu Tsai
  (?)
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: Chen-Yu Tsai, linux-arm-kernel, devicetree, dri-devel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

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

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e6a1cac0bfc7..c09cda958db5 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -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) += \
diff --git a/arch/arm/boot/dts/sun7i-a20-primo73.dts b/arch/arm/boot/dts/sun7i-a20-primo73.dts
new file mode 100644
index 000000000000..f3b1002ceb50
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-primo73.dts
@@ -0,0 +1,279 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Chen-Yu Tsai <wens@csie.org>
+ */
+
+/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>;
+			vfront-porch = <10>;
+			vsync-len = <10>;
+			de-active = <1>;
+			pixelclk-active = <0>;
+		};
+
+		port {
+			panel_input: endpoint {
+				remote-endpoint = <&tcon0_out_lcd>;
+			};
+		};
+	};
+};
+
+&ccu {
+	pinctrl-0 = <&csi0_clk_pin>;
+	pinctrl-names = "default";
+};
+
+&codec {
+	allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
+	status = "okay";
+};
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&de {
+	status = "okay";
+};
+
+&ehci1 {
+	status = "okay";
+};
+
+&hdmi {
+	status = "okay";
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
+&i2c0 {
+	status = "okay";
+
+	axp209: pmic@34 {
+		reg = <0x34>;
+		interrupt-parent = <&nmi_intc>;
+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
+
+#include "axp209.dtsi"
+
+&battery_power_supply {
+	status = "okay";
+};
+
+&i2c1 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	accelerometer@1c {
+		compatible = "fsl,mma8452";
+		reg = <0x1c>;
+		vdd-supply = <&reg_vcc3v0>;
+		vddio-supply = <&reg_vcc3v0>;
+		#io-channel-cells = <1>;
+	};
+};
+
+&i2c2 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	touchscreen@5d {
+		compatible = "goodix,gt911";
+		reg = <0x5d>;
+		interrupt-parent = <&pio>;
+		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
+		irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
+		reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
+		touchscreen-swapped-x-y; /* Match LCD panel orientation */
+	};
+};
+
+&lradc {
+	vref-supply = <&reg_vcc3v0>;
+	status = "okay";
+
+	button-200 {
+		label = "Volume Up";
+		linux,code = <KEY_VOLUMEUP>;
+		channel = <0>;
+		voltage = <200000>;
+	};
+
+	button-400 {
+		label = "Volume Down";
+		linux,code = <KEY_VOLUMEDOWN>;
+		channel = <0>;
+		voltage = <400000>;
+	};
+};
+
+&mmc0 {
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <4>;
+	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
+	status = "okay";
+};
+
+&otg_sram {
+	status = "okay";
+};
+
+&pio {
+	vcc-pa-supply = <&reg_vcc3v0>;
+	vcc-pc-supply = <&reg_vcc3v0>;
+	vcc-pe-supply = <&reg_ldo3>;
+	vcc-pf-supply = <&reg_vcc3v0>;
+	vcc-pg-supply = <&reg_ldo3>;
+};
+
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm0_pin>;
+	status = "okay";
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+&reg_ldo3 {
+	regulator-min-microvolt = <2800000>;
+	regulator-max-microvolt = <2800000>;
+	regulator-name = "csi-iovdd";
+};
+
+&reg_ldo4 {
+	regulator-min-microvolt = <2800000>;
+	regulator-max-microvolt = <2800000>;
+	regulator-name = "csi-avdd";
+};
+
+&reg_usb0_vbus {
+	gpio = <&pio 1 9 GPIO_ACTIVE_HIGH>; /* PB09 */
+	status = "okay";
+};
+
+&reg_usb2_vbus {
+	gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
+	status = "okay";
+};
+
+&reg_vcc3v3 {
+	status = "disabled";
+};
+
+&tcon0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&lcd0_rgb888_pins>;
+};
+
+&tcon0_out {
+	tcon0_out_lcd: endpoint@0 {
+		reg = <0>;
+		remote-endpoint = <&panel_input>;
+	};
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pb_pins>;
+	status = "okay";
+};
+
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&usb_power_supply {
+	status = "okay";
+};
+
+&usbphy {
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+	usb0_vbus_power-supply = <&usb_power_supply>;
+	usb0_vbus-supply = <&reg_usb0_vbus>;
+	usb2_vbus-supply = <&reg_usb2_vbus>;
+	status = "okay";
+};
-- 
2.27.0


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

* [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: devicetree, Chen-Yu Tsai, dri-devel, linux-arm-kernel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

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

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e6a1cac0bfc7..c09cda958db5 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -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) += \
diff --git a/arch/arm/boot/dts/sun7i-a20-primo73.dts b/arch/arm/boot/dts/sun7i-a20-primo73.dts
new file mode 100644
index 000000000000..f3b1002ceb50
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-primo73.dts
@@ -0,0 +1,279 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Chen-Yu Tsai <wens@csie.org>
+ */
+
+/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>;
+			vfront-porch = <10>;
+			vsync-len = <10>;
+			de-active = <1>;
+			pixelclk-active = <0>;
+		};
+
+		port {
+			panel_input: endpoint {
+				remote-endpoint = <&tcon0_out_lcd>;
+			};
+		};
+	};
+};
+
+&ccu {
+	pinctrl-0 = <&csi0_clk_pin>;
+	pinctrl-names = "default";
+};
+
+&codec {
+	allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
+	status = "okay";
+};
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&de {
+	status = "okay";
+};
+
+&ehci1 {
+	status = "okay";
+};
+
+&hdmi {
+	status = "okay";
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
+&i2c0 {
+	status = "okay";
+
+	axp209: pmic@34 {
+		reg = <0x34>;
+		interrupt-parent = <&nmi_intc>;
+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
+
+#include "axp209.dtsi"
+
+&battery_power_supply {
+	status = "okay";
+};
+
+&i2c1 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	accelerometer@1c {
+		compatible = "fsl,mma8452";
+		reg = <0x1c>;
+		vdd-supply = <&reg_vcc3v0>;
+		vddio-supply = <&reg_vcc3v0>;
+		#io-channel-cells = <1>;
+	};
+};
+
+&i2c2 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	touchscreen@5d {
+		compatible = "goodix,gt911";
+		reg = <0x5d>;
+		interrupt-parent = <&pio>;
+		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
+		irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
+		reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
+		touchscreen-swapped-x-y; /* Match LCD panel orientation */
+	};
+};
+
+&lradc {
+	vref-supply = <&reg_vcc3v0>;
+	status = "okay";
+
+	button-200 {
+		label = "Volume Up";
+		linux,code = <KEY_VOLUMEUP>;
+		channel = <0>;
+		voltage = <200000>;
+	};
+
+	button-400 {
+		label = "Volume Down";
+		linux,code = <KEY_VOLUMEDOWN>;
+		channel = <0>;
+		voltage = <400000>;
+	};
+};
+
+&mmc0 {
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <4>;
+	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
+	status = "okay";
+};
+
+&otg_sram {
+	status = "okay";
+};
+
+&pio {
+	vcc-pa-supply = <&reg_vcc3v0>;
+	vcc-pc-supply = <&reg_vcc3v0>;
+	vcc-pe-supply = <&reg_ldo3>;
+	vcc-pf-supply = <&reg_vcc3v0>;
+	vcc-pg-supply = <&reg_ldo3>;
+};
+
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm0_pin>;
+	status = "okay";
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+&reg_ldo3 {
+	regulator-min-microvolt = <2800000>;
+	regulator-max-microvolt = <2800000>;
+	regulator-name = "csi-iovdd";
+};
+
+&reg_ldo4 {
+	regulator-min-microvolt = <2800000>;
+	regulator-max-microvolt = <2800000>;
+	regulator-name = "csi-avdd";
+};
+
+&reg_usb0_vbus {
+	gpio = <&pio 1 9 GPIO_ACTIVE_HIGH>; /* PB09 */
+	status = "okay";
+};
+
+&reg_usb2_vbus {
+	gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
+	status = "okay";
+};
+
+&reg_vcc3v3 {
+	status = "disabled";
+};
+
+&tcon0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&lcd0_rgb888_pins>;
+};
+
+&tcon0_out {
+	tcon0_out_lcd: endpoint@0 {
+		reg = <0>;
+		remote-endpoint = <&panel_input>;
+	};
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pb_pins>;
+	status = "okay";
+};
+
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&usb_power_supply {
+	status = "okay";
+};
+
+&usbphy {
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+	usb0_vbus_power-supply = <&usb_power_supply>;
+	usb0_vbus-supply = <&reg_usb0_vbus>;
+	usb2_vbus-supply = <&reg_usb2_vbus>;
+	status = "okay";
+};
-- 
2.27.0


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

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

* [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet
@ 2020-07-14  7:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-14  7:13 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter
  Cc: devicetree, Chen-Yu Tsai, dri-devel, linux-arm-kernel, Siarhei Siamashka

From: Chen-Yu Tsai <wens@csie.org>

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

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

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e6a1cac0bfc7..c09cda958db5 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -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) += \
diff --git a/arch/arm/boot/dts/sun7i-a20-primo73.dts b/arch/arm/boot/dts/sun7i-a20-primo73.dts
new file mode 100644
index 000000000000..f3b1002ceb50
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-primo73.dts
@@ -0,0 +1,279 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Chen-Yu Tsai <wens@csie.org>
+ */
+
+/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>;
+			vfront-porch = <10>;
+			vsync-len = <10>;
+			de-active = <1>;
+			pixelclk-active = <0>;
+		};
+
+		port {
+			panel_input: endpoint {
+				remote-endpoint = <&tcon0_out_lcd>;
+			};
+		};
+	};
+};
+
+&ccu {
+	pinctrl-0 = <&csi0_clk_pin>;
+	pinctrl-names = "default";
+};
+
+&codec {
+	allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
+	status = "okay";
+};
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&de {
+	status = "okay";
+};
+
+&ehci1 {
+	status = "okay";
+};
+
+&hdmi {
+	status = "okay";
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
+&i2c0 {
+	status = "okay";
+
+	axp209: pmic@34 {
+		reg = <0x34>;
+		interrupt-parent = <&nmi_intc>;
+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
+
+#include "axp209.dtsi"
+
+&battery_power_supply {
+	status = "okay";
+};
+
+&i2c1 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	accelerometer@1c {
+		compatible = "fsl,mma8452";
+		reg = <0x1c>;
+		vdd-supply = <&reg_vcc3v0>;
+		vddio-supply = <&reg_vcc3v0>;
+		#io-channel-cells = <1>;
+	};
+};
+
+&i2c2 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	touchscreen@5d {
+		compatible = "goodix,gt911";
+		reg = <0x5d>;
+		interrupt-parent = <&pio>;
+		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
+		irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
+		reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
+		touchscreen-swapped-x-y; /* Match LCD panel orientation */
+	};
+};
+
+&lradc {
+	vref-supply = <&reg_vcc3v0>;
+	status = "okay";
+
+	button-200 {
+		label = "Volume Up";
+		linux,code = <KEY_VOLUMEUP>;
+		channel = <0>;
+		voltage = <200000>;
+	};
+
+	button-400 {
+		label = "Volume Down";
+		linux,code = <KEY_VOLUMEDOWN>;
+		channel = <0>;
+		voltage = <400000>;
+	};
+};
+
+&mmc0 {
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <4>;
+	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
+	status = "okay";
+};
+
+&otg_sram {
+	status = "okay";
+};
+
+&pio {
+	vcc-pa-supply = <&reg_vcc3v0>;
+	vcc-pc-supply = <&reg_vcc3v0>;
+	vcc-pe-supply = <&reg_ldo3>;
+	vcc-pf-supply = <&reg_vcc3v0>;
+	vcc-pg-supply = <&reg_ldo3>;
+};
+
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm0_pin>;
+	status = "okay";
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+&reg_ldo3 {
+	regulator-min-microvolt = <2800000>;
+	regulator-max-microvolt = <2800000>;
+	regulator-name = "csi-iovdd";
+};
+
+&reg_ldo4 {
+	regulator-min-microvolt = <2800000>;
+	regulator-max-microvolt = <2800000>;
+	regulator-name = "csi-avdd";
+};
+
+&reg_usb0_vbus {
+	gpio = <&pio 1 9 GPIO_ACTIVE_HIGH>; /* PB09 */
+	status = "okay";
+};
+
+&reg_usb2_vbus {
+	gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
+	status = "okay";
+};
+
+&reg_vcc3v3 {
+	status = "disabled";
+};
+
+&tcon0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&lcd0_rgb888_pins>;
+};
+
+&tcon0_out {
+	tcon0_out_lcd: endpoint@0 {
+		reg = <0>;
+		remote-endpoint = <&panel_input>;
+	};
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pb_pins>;
+	status = "okay";
+};
+
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&usb_power_supply {
+	status = "okay";
+};
+
+&usbphy {
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+	usb0_vbus_power-supply = <&usb_power_supply>;
+	usb0_vbus-supply = <&reg_usb0_vbus>;
+	usb2_vbus-supply = <&reg_usb2_vbus>;
+	status = "okay";
+};
-- 
2.27.0

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
  2020-07-14  7:13   ` Chen-Yu Tsai
  (?)
@ 2020-07-16  8:00     ` Maxime Ripard
  -1 siblings, 0 replies; 45+ messages in thread
From: Maxime Ripard @ 2020-07-16  8:00 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Rob Herring, Sam Ravnborg, Thierry Reding, David Airlie,
	Daniel Vetter, Chen-Yu Tsai, linux-arm-kernel, devicetree,
	dri-devel, Siarhei Siamashka

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

On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> 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.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> index 0cd74c8dab42..8eb013fb1969 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> @@ -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

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-16  8:00     ` Maxime Ripard
  0 siblings, 0 replies; 45+ messages in thread
From: Maxime Ripard @ 2020-07-16  8:00 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: devicetree, Siarhei Siamashka, David Airlie, Rob Herring,
	Chen-Yu Tsai, Thierry Reding, dri-devel, Daniel Vetter,
	Sam Ravnborg, linux-arm-kernel


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

On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> 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.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> index 0cd74c8dab42..8eb013fb1969 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> @@ -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

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

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

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-16  8:00     ` Maxime Ripard
  0 siblings, 0 replies; 45+ messages in thread
From: Maxime Ripard @ 2020-07-16  8:00 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: devicetree, Siarhei Siamashka, David Airlie, Rob Herring,
	Chen-Yu Tsai, Thierry Reding, dri-devel, Sam Ravnborg,
	linux-arm-kernel


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

On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> 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.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> index 0cd74c8dab42..8eb013fb1969 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> @@ -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

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

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

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

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

* Re: [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet
  2020-07-14  7:13   ` Chen-Yu Tsai
  (?)
@ 2020-07-16  8:04     ` Maxime Ripard
  -1 siblings, 0 replies; 45+ messages in thread
From: Maxime Ripard @ 2020-07-16  8:04 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Rob Herring, Sam Ravnborg, Thierry Reding, David Airlie,
	Daniel Vetter, Chen-Yu Tsai, linux-arm-kernel, devicetree,
	dri-devel, Siarhei Siamashka

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

Hi,

On Tue, Jul 14, 2020 at 03:13:05PM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> 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.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> 
> 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 ?

> ---
>  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
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index e6a1cac0bfc7..c09cda958db5 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -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) += \
> diff --git a/arch/arm/boot/dts/sun7i-a20-primo73.dts b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> new file mode 100644
> index 000000000000..f3b1002ceb50
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> @@ -0,0 +1,279 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (C) 2020 Chen-Yu Tsai <wens@csie.org>
> + */
> +
> +/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>;
> +			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

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

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

* Re: [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet
@ 2020-07-16  8:04     ` Maxime Ripard
  0 siblings, 0 replies; 45+ messages in thread
From: Maxime Ripard @ 2020-07-16  8:04 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: devicetree, Siarhei Siamashka, David Airlie, Rob Herring,
	Chen-Yu Tsai, Thierry Reding, dri-devel, Daniel Vetter,
	Sam Ravnborg, linux-arm-kernel


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

Hi,

On Tue, Jul 14, 2020 at 03:13:05PM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> 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.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> 
> 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 ?

> ---
>  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
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index e6a1cac0bfc7..c09cda958db5 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -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) += \
> diff --git a/arch/arm/boot/dts/sun7i-a20-primo73.dts b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> new file mode 100644
> index 000000000000..f3b1002ceb50
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> @@ -0,0 +1,279 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (C) 2020 Chen-Yu Tsai <wens@csie.org>
> + */
> +
> +/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>;
> +			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

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

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

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

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

* Re: [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet
@ 2020-07-16  8:04     ` Maxime Ripard
  0 siblings, 0 replies; 45+ messages in thread
From: Maxime Ripard @ 2020-07-16  8:04 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: devicetree, Siarhei Siamashka, David Airlie, Rob Herring,
	Chen-Yu Tsai, Thierry Reding, dri-devel, Sam Ravnborg,
	linux-arm-kernel


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

Hi,

On Tue, Jul 14, 2020 at 03:13:05PM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> 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.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> 
> 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 ?

> ---
>  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
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index e6a1cac0bfc7..c09cda958db5 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -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) += \
> diff --git a/arch/arm/boot/dts/sun7i-a20-primo73.dts b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> new file mode 100644
> index 000000000000..f3b1002ceb50
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> @@ -0,0 +1,279 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (C) 2020 Chen-Yu Tsai <wens@csie.org>
> + */
> +
> +/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>;
> +			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

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

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

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
  2020-07-16  8:00     ` Maxime Ripard
  (?)
@ 2020-07-16  8:05       ` Chen-Yu Tsai
  -1 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-16  8:05 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter, linux-arm-kernel, devicetree,
	dri-devel, Siarhei Siamashka

On Thu, Jul 16, 2020 at 4:00 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> > From: Chen-Yu Tsai <wens@csie.org>
> >
> > 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.
> >
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> >  .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> > index 0cd74c8dab42..8eb013fb1969 100644
> > --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> > @@ -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.

> 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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-16  8:05       ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-16  8:05 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, Siarhei Siamashka, David Airlie, Rob Herring,
	Thierry Reding, dri-devel, Daniel Vetter, Chen-Yu Tsai,
	Sam Ravnborg, linux-arm-kernel

On Thu, Jul 16, 2020 at 4:00 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> > From: Chen-Yu Tsai <wens@csie.org>
> >
> > 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.
> >
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> >  .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> > index 0cd74c8dab42..8eb013fb1969 100644
> > --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> > @@ -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.

> 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

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-16  8:05       ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-16  8:05 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, Siarhei Siamashka, David Airlie, Rob Herring,
	Thierry Reding, dri-devel, Chen-Yu Tsai, Sam Ravnborg,
	linux-arm-kernel

On Thu, Jul 16, 2020 at 4:00 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> > From: Chen-Yu Tsai <wens@csie.org>
> >
> > 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.
> >
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> >  .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> > index 0cd74c8dab42..8eb013fb1969 100644
> > --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> > @@ -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.

> 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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet
  2020-07-16  8:04     ` Maxime Ripard
  (?)
@ 2020-07-16  8:09       ` Chen-Yu Tsai
  -1 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-16  8:09 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter, linux-arm-kernel, devicetree,
	dri-devel, Siarhei Siamashka

On Thu, Jul 16, 2020 at 4:04 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> Hi,
>
> On Tue, Jul 14, 2020 at 03:13:05PM +0800, Chen-Yu Tsai wrote:
> > From: Chen-Yu Tsai <wens@csie.org>
> >
> > 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.
> >
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> >
> > 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.

> > ---
> >  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
> >
> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > index e6a1cac0bfc7..c09cda958db5 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -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) += \
> > diff --git a/arch/arm/boot/dts/sun7i-a20-primo73.dts b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> > new file mode 100644
> > index 000000000000..f3b1002ceb50
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> > @@ -0,0 +1,279 @@
> > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > +/*
> > + * Copyright (C) 2020 Chen-Yu Tsai <wens@csie.org>
> > + */
> > +
> > +/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>;
> > +                     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

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

* Re: [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet
@ 2020-07-16  8:09       ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-16  8:09 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, Siarhei Siamashka, David Airlie, Rob Herring,
	Thierry Reding, dri-devel, Daniel Vetter, Chen-Yu Tsai,
	Sam Ravnborg, linux-arm-kernel

On Thu, Jul 16, 2020 at 4:04 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> Hi,
>
> On Tue, Jul 14, 2020 at 03:13:05PM +0800, Chen-Yu Tsai wrote:
> > From: Chen-Yu Tsai <wens@csie.org>
> >
> > 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.
> >
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> >
> > 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.

> > ---
> >  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
> >
> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > index e6a1cac0bfc7..c09cda958db5 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -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) += \
> > diff --git a/arch/arm/boot/dts/sun7i-a20-primo73.dts b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> > new file mode 100644
> > index 000000000000..f3b1002ceb50
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> > @@ -0,0 +1,279 @@
> > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > +/*
> > + * Copyright (C) 2020 Chen-Yu Tsai <wens@csie.org>
> > + */
> > +
> > +/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>;
> > +                     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

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

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

* Re: [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet
@ 2020-07-16  8:09       ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-16  8:09 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, Siarhei Siamashka, David Airlie, Rob Herring,
	Thierry Reding, dri-devel, Chen-Yu Tsai, Sam Ravnborg,
	linux-arm-kernel

On Thu, Jul 16, 2020 at 4:04 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> Hi,
>
> On Tue, Jul 14, 2020 at 03:13:05PM +0800, Chen-Yu Tsai wrote:
> > From: Chen-Yu Tsai <wens@csie.org>
> >
> > 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.
> >
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> >
> > 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.

> > ---
> >  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
> >
> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > index e6a1cac0bfc7..c09cda958db5 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -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) += \
> > diff --git a/arch/arm/boot/dts/sun7i-a20-primo73.dts b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> > new file mode 100644
> > index 000000000000..f3b1002ceb50
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> > @@ -0,0 +1,279 @@
> > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > +/*
> > + * Copyright (C) 2020 Chen-Yu Tsai <wens@csie.org>
> > + */
> > +
> > +/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>;
> > +                     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
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
  2020-07-14  7:13   ` Chen-Yu Tsai
  (?)
@ 2020-07-21  2:10     ` Rob Herring
  -1 siblings, 0 replies; 45+ messages in thread
From: Rob Herring @ 2020-07-21  2:10 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Maxime Ripard, Sam Ravnborg, Thierry Reding, David Airlie,
	Daniel Vetter, Chen-Yu Tsai, linux-arm-kernel, devicetree,
	dri-devel, Siarhei Siamashka

On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> 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.

> 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.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> index 0cd74c8dab42..8eb013fb1969 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> @@ -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>;
>  
> -- 
> 2.27.0
> 

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-21  2:10     ` Rob Herring
  0 siblings, 0 replies; 45+ messages in thread
From: Rob Herring @ 2020-07-21  2:10 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: devicetree, Siarhei Siamashka, David Airlie, Maxime Ripard,
	Chen-Yu Tsai, Thierry Reding, dri-devel, Daniel Vetter,
	Sam Ravnborg, linux-arm-kernel

On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> 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.

> 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.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> index 0cd74c8dab42..8eb013fb1969 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> @@ -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>;
>  
> -- 
> 2.27.0
> 

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-21  2:10     ` Rob Herring
  0 siblings, 0 replies; 45+ messages in thread
From: Rob Herring @ 2020-07-21  2:10 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: devicetree, Siarhei Siamashka, David Airlie, Chen-Yu Tsai,
	Thierry Reding, dri-devel, Sam Ravnborg, linux-arm-kernel

On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> 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.

> 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.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  .../devicetree/bindings/display/panel/panel-dpi.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> index 0cd74c8dab42..8eb013fb1969 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> @@ -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>;
>  
> -- 
> 2.27.0
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 3/5] dt-bindings: arm: sunxi: Add compatible for MSI Primo73 tablet
  2020-07-14  7:13   ` Chen-Yu Tsai
  (?)
@ 2020-07-21  2:10     ` Rob Herring
  -1 siblings, 0 replies; 45+ messages in thread
From: Rob Herring @ 2020-07-21  2:10 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Maxime Ripard, Sam Ravnborg, dri-devel, linux-arm-kernel,
	Siarhei Siamashka, devicetree, Rob Herring, Daniel Vetter,
	Thierry Reding, Chen-Yu Tsai, David Airlie

On Tue, 14 Jul 2020 15:13:03 +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> Document board compatible name for MSI Primo73 tablet.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 

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

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

* Re: [PATCH 3/5] dt-bindings: arm: sunxi: Add compatible for MSI Primo73 tablet
@ 2020-07-21  2:10     ` Rob Herring
  0 siblings, 0 replies; 45+ messages in thread
From: Rob Herring @ 2020-07-21  2:10 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Siarhei Siamashka, devicetree, David Airlie, dri-devel,
	Chen-Yu Tsai, Rob Herring, Thierry Reding, Maxime Ripard,
	Daniel Vetter, Sam Ravnborg, linux-arm-kernel

On Tue, 14 Jul 2020 15:13:03 +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> Document board compatible name for MSI Primo73 tablet.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 

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

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

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

* Re: [PATCH 3/5] dt-bindings: arm: sunxi: Add compatible for MSI Primo73 tablet
@ 2020-07-21  2:10     ` Rob Herring
  0 siblings, 0 replies; 45+ messages in thread
From: Rob Herring @ 2020-07-21  2:10 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Siarhei Siamashka, devicetree, David Airlie, dri-devel,
	Chen-Yu Tsai, Rob Herring, Thierry Reding, Sam Ravnborg,
	linux-arm-kernel

On Tue, 14 Jul 2020 15:13:03 +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> Document board compatible name for MSI Primo73 tablet.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
  2020-07-21  2:10     ` Rob Herring
  (?)
@ 2020-07-21  9:23       ` Maxime Ripard
  -1 siblings, 0 replies; 45+ messages in thread
From: Maxime Ripard @ 2020-07-21  9:23 UTC (permalink / raw)
  To: Rob Herring
  Cc: Chen-Yu Tsai, Sam Ravnborg, Thierry Reding, David Airlie,
	Daniel Vetter, Chen-Yu Tsai, linux-arm-kernel, devicetree,
	dri-devel, Siarhei Siamashka

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

On Mon, Jul 20, 2020 at 08:10:26PM -0600, Rob Herring wrote:
> On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> > From: Chen-Yu Tsai <wens@csie.org>
> > 
> > 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

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-21  9:23       ` Maxime Ripard
  0 siblings, 0 replies; 45+ messages in thread
From: Maxime Ripard @ 2020-07-21  9:23 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, Siarhei Siamashka, David Airlie, dri-devel,
	Chen-Yu Tsai, Thierry Reding, Daniel Vetter, Chen-Yu Tsai,
	Sam Ravnborg, linux-arm-kernel


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

On Mon, Jul 20, 2020 at 08:10:26PM -0600, Rob Herring wrote:
> On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> > From: Chen-Yu Tsai <wens@csie.org>
> > 
> > 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

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

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

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-21  9:23       ` Maxime Ripard
  0 siblings, 0 replies; 45+ messages in thread
From: Maxime Ripard @ 2020-07-21  9:23 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, Siarhei Siamashka, David Airlie, dri-devel,
	Chen-Yu Tsai, Thierry Reding, Chen-Yu Tsai, Sam Ravnborg,
	linux-arm-kernel


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

On Mon, Jul 20, 2020 at 08:10:26PM -0600, Rob Herring wrote:
> On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> > From: Chen-Yu Tsai <wens@csie.org>
> > 
> > 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

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

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

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
  2020-07-21  9:23       ` Maxime Ripard
  (?)
@ 2020-07-21  9:40         ` Chen-Yu Tsai
  -1 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-21  9:40 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Rob Herring, Chen-Yu Tsai, Sam Ravnborg, Thierry Reding,
	David Airlie, Daniel Vetter, linux-arm-kernel, devicetree,
	dri-devel, Siarhei Siamashka

On Tue, Jul 21, 2020 at 5:23 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Mon, Jul 20, 2020 at 08:10:26PM -0600, Rob Herring wrote:
> > On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> > > From: Chen-Yu Tsai <wens@csie.org>
> > >
> > > 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.

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-21  9:40         ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-21  9:40 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Rob Herring, devicetree, David Airlie, dri-devel, Thierry Reding,
	Daniel Vetter, Siarhei Siamashka, Chen-Yu Tsai, Sam Ravnborg,
	linux-arm-kernel

On Tue, Jul 21, 2020 at 5:23 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Mon, Jul 20, 2020 at 08:10:26PM -0600, Rob Herring wrote:
> > On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> > > From: Chen-Yu Tsai <wens@csie.org>
> > >
> > > 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.

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

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-21  9:40         ` Chen-Yu Tsai
  0 siblings, 0 replies; 45+ messages in thread
From: Chen-Yu Tsai @ 2020-07-21  9:40 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, David Airlie, dri-devel, Thierry Reding,
	Siarhei Siamashka, Chen-Yu Tsai, Sam Ravnborg, linux-arm-kernel

On Tue, Jul 21, 2020 at 5:23 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Mon, Jul 20, 2020 at 08:10:26PM -0600, Rob Herring wrote:
> > On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> > > From: Chen-Yu Tsai <wens@csie.org>
> > >
> > > 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.

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
  2020-07-21  9:23       ` Maxime Ripard
  (?)
@ 2020-07-21 13:58         ` Rob Herring
  -1 siblings, 0 replies; 45+ messages in thread
From: Rob Herring @ 2020-07-21 13:58 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Sam Ravnborg, Thierry Reding, David Airlie,
	Daniel Vetter, Chen-Yu Tsai,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	devicetree, dri-devel, Siarhei Siamashka

On Tue, Jul 21, 2020 at 3:23 AM Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Mon, Jul 20, 2020 at 08:10:26PM -0600, Rob Herring wrote:
> > On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> > > From: Chen-Yu Tsai <wens@csie.org>
> > >
> > > 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.

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-21 13:58         ` Rob Herring
  0 siblings, 0 replies; 45+ messages in thread
From: Rob Herring @ 2020-07-21 13:58 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, Siarhei Siamashka, David Airlie, dri-devel,
	Chen-Yu Tsai, Thierry Reding, Daniel Vetter, Chen-Yu Tsai,
	Sam Ravnborg,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Tue, Jul 21, 2020 at 3:23 AM Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Mon, Jul 20, 2020 at 08:10:26PM -0600, Rob Herring wrote:
> > On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> > > From: Chen-Yu Tsai <wens@csie.org>
> > >
> > > 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.

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

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

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

* Re: [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property
@ 2020-07-21 13:58         ` Rob Herring
  0 siblings, 0 replies; 45+ messages in thread
From: Rob Herring @ 2020-07-21 13:58 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, Siarhei Siamashka, David Airlie, dri-devel,
	Chen-Yu Tsai, Thierry Reding, Chen-Yu Tsai, Sam Ravnborg,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Tue, Jul 21, 2020 at 3:23 AM Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Mon, Jul 20, 2020 at 08:10:26PM -0600, Rob Herring wrote:
> > On Tue, Jul 14, 2020 at 03:13:01PM +0800, Chen-Yu Tsai wrote:
> > > From: Chen-Yu Tsai <wens@csie.org>
> > >
> > > 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.

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-07-21 14:00 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14  7:13 [PATCH 0/5] ARM: sunxi: Add support for MSI Primo73 tablet Chen-Yu Tsai
2020-07-14  7:13 ` Chen-Yu Tsai
2020-07-14  7:13 ` Chen-Yu Tsai
2020-07-14  7:13 ` [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property Chen-Yu Tsai
2020-07-14  7:13   ` Chen-Yu Tsai
2020-07-14  7:13   ` Chen-Yu Tsai
2020-07-16  8:00   ` Maxime Ripard
2020-07-16  8:00     ` Maxime Ripard
2020-07-16  8:00     ` Maxime Ripard
2020-07-16  8:05     ` Chen-Yu Tsai
2020-07-16  8:05       ` Chen-Yu Tsai
2020-07-16  8:05       ` Chen-Yu Tsai
2020-07-21  2:10   ` Rob Herring
2020-07-21  2:10     ` Rob Herring
2020-07-21  2:10     ` Rob Herring
2020-07-21  9:23     ` Maxime Ripard
2020-07-21  9:23       ` Maxime Ripard
2020-07-21  9:23       ` Maxime Ripard
2020-07-21  9:40       ` Chen-Yu Tsai
2020-07-21  9:40         ` Chen-Yu Tsai
2020-07-21  9:40         ` Chen-Yu Tsai
2020-07-21 13:58       ` Rob Herring
2020-07-21 13:58         ` Rob Herring
2020-07-21 13:58         ` Rob Herring
2020-07-14  7:13 ` [PATCH 2/5] drm/panel: simple: Set bpc from bits-per-color DT property for panel-dpi Chen-Yu Tsai
2020-07-14  7:13   ` Chen-Yu Tsai
2020-07-14  7:13   ` Chen-Yu Tsai
2020-07-14  7:13 ` [PATCH 3/5] dt-bindings: arm: sunxi: Add compatible for MSI Primo73 tablet Chen-Yu Tsai
2020-07-14  7:13   ` Chen-Yu Tsai
2020-07-14  7:13   ` Chen-Yu Tsai
2020-07-21  2:10   ` Rob Herring
2020-07-21  2:10     ` Rob Herring
2020-07-21  2:10     ` Rob Herring
2020-07-14  7:13 ` [PATCH 4/5] ARM: dts: sun7i: Add LCD0 RGB888 pins Chen-Yu Tsai
2020-07-14  7:13   ` Chen-Yu Tsai
2020-07-14  7:13   ` Chen-Yu Tsai
2020-07-14  7:13 ` [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet Chen-Yu Tsai
2020-07-14  7:13   ` Chen-Yu Tsai
2020-07-14  7:13   ` Chen-Yu Tsai
2020-07-16  8:04   ` Maxime Ripard
2020-07-16  8:04     ` Maxime Ripard
2020-07-16  8:04     ` Maxime Ripard
2020-07-16  8:09     ` Chen-Yu Tsai
2020-07-16  8:09       ` Chen-Yu Tsai
2020-07-16  8:09       ` Chen-Yu Tsai

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.