Skip to contentSkip to conversation

Add support for Topwise A721 tablet

PATCH Applied Pascal Roeleven 5 participants 14 messages Mar 20, 2020 – Jun 29, 2020

Subsystems (6)

v2 of 5 Applied Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add support for Topwise A721 tablet

This series add support for the Topwise A721 tablet and it's display. It is an old tablet (around 2012) but it might be useful as reference as the devicetree is pretty complete.

Changes from v1:
* Split into multiple patches
* dt-binding: use yaml instead of txt
* dt-binding: add Topwise A721 to sunxi.yaml
* dt-binding: add Topwise to vendor-prefixes
* drm: Add bus_format, bus_flags and connector_type
* dts: Use SPDX license identifier instead of boilerplate license text
* dts: Remove pinctrl leftovers

Pascal Roeleven (5):
dt-bindings: panel: Add binding for Starry KR070PE2T
drm: panel: Add Starry KR070PE2T
dt-bindings: vendor-prefixes: Add Topwise
dt-bindings: arm: Add Topwise A721
ARM: dts: sun4i: Add support for Topwise A721 tablet

 .../devicetree/bindings/arm/sunxi.yaml        |   5 +
 .../bindings/display/panel/panel-simple.yaml  |   2 +
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 arch/arm/boot/dts/Makefile                    |   3 +-
 arch/arm/boot/dts/sun4i-a10-topwise-a721.dts  | 242 ++++++++++++++++++
 drivers/gpu/drm/panel/panel-simple.c          |  29 +++
 6 files changed, 282 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun4i-a10-topwise-a721.dts
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/5 dt-bindings: panel: Add binding for Starry KR070PE2T

Add the devicetree binding for Starry KR070PE2T

---
 .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/display/panel/panel-simple.yaml +2 -0
index 8fe60ee25..7cbace360 100644
@@ -43,6 +43,8 @@ properties:
       - satoz,sat050at40h12r2
         # Sharp LS020B1DD01D 2.0" HQVGA TFT LCD panel
       - sharp,ls020b1dd01d
+        # Starry KR070PE2T 7" WVGA TFT LCD panel
+      - starry,kr070pe2t
 
   backlight: true
   enable-gpios: true
Signature · 1 line
2.20.1
#2 lore raw

Re: [PATCH v2 1/5] dt-bindings: panel: Add binding for Starry KR070PE2T

Hi Pascal.

Quoted 12 lines · Pascal Roeleven

Add the devicetree binding for Starry KR070PE2T

---
 .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/display/panel/panel-simple.yaml +0 -0
index 8fe60ee25..7cbace360 100644

Documentation/devicetree/bindings/display/panel/panel-simple.yaml properties: · line 47

Quoted 5 lines
Documentation/devicetree/bindings/display/panel/panel-simple.yaml +2 -0
@@ -43,6 +43,8 @@ properties:
       - satoz,sat050at40h12r2
         # Sharp LS020B1DD01D 2.0" HQVGA TFT LCD panel
       - sharp,ls020b1dd01d
+        # Starry KR070PE2T 7" WVGA TFT LCD panel
+      - starry,kr070pe2t

Adapted to apply to drm-misc-next and applied.

Sam

Quoted 5 lines
Documentation/devicetree/bindings/display/panel/panel-simple.yaml +0 -0
   backlight: true
   enable-gpios: true
Signature · 1 line
2.20.1
#3 lore raw

PATCH v2 2/5 drm: panel: Add Starry KR070PE2T

In reply to Pascal Roeleven

The KR070PE2T is a 7" panel with a resolution of 800x480.

KR070PE2T is the marking present on the ribbon cable. As this panel is probably available under different brands, this marking will catch most devices.

As I can't find a datasheet for this panel, the bus_flags are instead from trial-and-error. The flags seem to be common for these kind of panels as well.

---
 drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/gpu/drm/panel/panel-simple.c +29 -0
index e14c14ac6..b3d257257 100644
@@ -2842,6 +2842,32 @@ static const struct panel_desc shelly_sca07010_bfn_lnn = {
 	.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
 };
 
+static const struct drm_display_mode starry_kr070pe2t_mode = {
+	.clock = 33000,
+	.hdisplay = 800,
+	.hsync_start = 800 + 209,
+	.hsync_end = 800 + 209 + 1,
+	.htotal = 800 + 209 + 1 + 45,
+	.vdisplay = 480,
+	.vsync_start = 480 + 22,
+	.vsync_end = 480 + 22 + 1,
+	.vtotal = 480 + 22 + 1 + 22,
+	.vrefresh = 60,
+};
+
+static const struct panel_desc starry_kr070pe2t = {
+	.modes = &starry_kr070pe2t_mode,
+	.num_modes = 1,
+	.bpc = 8,
+	.size = {
+		.width = 152,
+		.height = 86,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+	.connector_type = DRM_MODE_CONNECTOR_LVDS,
+};
+
 static const struct drm_display_mode starry_kr122ea0sra_mode = {
 	.clock = 147000,
 	.hdisplay = 1920,
@@ -3474,6 +3500,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "shelly,sca07010-bfn-lnn",
 		.data = &shelly_sca07010_bfn_lnn,
+	}, {
+		.compatible = "starry,kr070pe2t",
+		.data = &starry_kr070pe2t,
 	}, {
 		.compatible = "starry,kr122ea0sra",
 		.data = &starry_kr122ea0sra,
Signature · 1 line
2.20.1
Applied
#4 lore raw

Re: [PATCH v2 2/5] drm: panel: Add Starry KR070PE2T

Quoted 11 lines · Pascal Roeleven

The KR070PE2T is a 7" panel with a resolution of 800x480.

KR070PE2T is the marking present on the ribbon cable. As this panel is probably available under different brands, this marking will catch most devices.

As I can't find a datasheet for this panel, the bus_flags are instead from trial-and-error. The flags seem to be common for these kind of panels as well.

Applied to drm-misc-next.

Sam

Quoted 53 lines
---
 drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/gpu/drm/panel/panel-simple.c +29 -0
index e14c14ac6..b3d257257 100644
@@ -2842,6 +2842,32 @@ static const struct panel_desc shelly_sca07010_bfn_lnn = {
 	.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
 };
 
+static const struct drm_display_mode starry_kr070pe2t_mode = {
+	.clock = 33000,
+	.hdisplay = 800,
+	.hsync_start = 800 + 209,
+	.hsync_end = 800 + 209 + 1,
+	.htotal = 800 + 209 + 1 + 45,
+	.vdisplay = 480,
+	.vsync_start = 480 + 22,
+	.vsync_end = 480 + 22 + 1,
+	.vtotal = 480 + 22 + 1 + 22,
+	.vrefresh = 60,
+};
+
+static const struct panel_desc starry_kr070pe2t = {
+	.modes = &starry_kr070pe2t_mode,
+	.num_modes = 1,
+	.bpc = 8,
+	.size = {
+		.width = 152,
+		.height = 86,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+	.connector_type = DRM_MODE_CONNECTOR_LVDS,
+};
+
 static const struct drm_display_mode starry_kr122ea0sra_mode = {
 	.clock = 147000,
 	.hdisplay = 1920,
@@ -3474,6 +3500,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "shelly,sca07010-bfn-lnn",
 		.data = &shelly_sca07010_bfn_lnn,
+	}, {
+		.compatible = "starry,kr070pe2t",
+		.data = &starry_kr070pe2t,
 	}, {
 		.compatible = "starry,kr122ea0sra",
 		.data = &starry_kr122ea0sra,
Signature · 1 line
2.20.1

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

#5 lore raw

Re: [PATCH v2 2/5] drm: panel: Add Starry KR070PE2T

In reply to Pascal Roeleven

Hi Pascal,

Quoted 37 lines · Pascal Roeleven

The KR070PE2T is a 7" panel with a resolution of 800x480.

KR070PE2T is the marking present on the ribbon cable. As this panel is probably available under different brands, this marking will catch most devices.

As I can't find a datasheet for this panel, the bus_flags are instead from trial-and-error. The flags seem to be common for these kind of panels as well.

---
 drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/gpu/drm/panel/panel-simple.c +14 -0
index e14c14ac6..b3d257257 100644
@@ -2842,6 +2842,32 @@ static const struct panel_desc shelly_sca07010_bfn_lnn = {
 	.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
 };
 
+static const struct drm_display_mode starry_kr070pe2t_mode = {
+	.clock = 33000,
+	.hdisplay = 800,
+	.hsync_start = 800 + 209,
+	.hsync_end = 800 + 209 + 1,
+	.htotal = 800 + 209 + 1 + 45,
+	.vdisplay = 480,
+	.vsync_start = 480 + 22,
+	.vsync_end = 480 + 22 + 1,
+	.vtotal = 480 + 22 + 1 + 22,
+	.vrefresh = 60,
+};
+
+static const struct panel_desc starry_kr070pe2t = {

drivers/gpu/drm/panel/panel-simple.c static const struct panel_desc shelly_sca07010_bfn_lnn = { · line 2868

Quoted 10 lines
drivers/gpu/drm/panel/panel-simple.c +10 -0
+	.modes = &starry_kr070pe2t_mode,
+	.num_modes = 1,
+	.bpc = 8,
+	.size = {
+		.width = 152,
+		.height = 86,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+	.connector_type = DRM_MODE_CONNECTOR_LVDS,

I'm trying to fix inconsistencies in the panel-simple driver, and this caught my eyes. MEDIA_BUS_FMT_RGB888_1X24 isn't a correct format for LVDS panels. MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, MEDIA_BUS_FMT_RGB888_1X7X4_SPWG or MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA should be used instead. As I couldn't find documentation for the panel, I can't tell which format is correct. Could you please help ?

Quoted 15 lines
drivers/gpu/drm/panel/panel-simple.c +5 -0
+};
+
 static const struct drm_display_mode starry_kr122ea0sra_mode = {
 	.clock = 147000,
 	.hdisplay = 1920,
@@ -3474,6 +3500,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "shelly,sca07010-bfn-lnn",
 		.data = &shelly_sca07010_bfn_lnn,
+	}, {
+		.compatible = "starry,kr070pe2t",
+		.data = &starry_kr070pe2t,
 	}, {
 		.compatible = "starry,kr122ea0sra",
 		.data = &starry_kr122ea0sra,
Signature · 3 lines
Regards,

Laurent Pinchart
#6 lore raw

Re: [linux-sunxi] Re: [PATCH v2 2/5] drm: panel: Add Starry KR070PE2T

Hi Laurent,

Good catch. It's actually the connector type which is wrong. The connector_type should be DRM_MODE_CONNECTOR_DPI. If you would include this in your patch series, you can have my acked-by.

Regards,
Pascal

Quoted 81 lines · Laurent Pinchart

Hi Pascal,

Quoted 40 lines · Pascal Roeleven

The KR070PE2T is a 7" panel with a resolution of 800x480.

KR070PE2T is the marking present on the ribbon cable. As this panel is probably available under different brands, this marking will catch most devices.

As I can't find a datasheet for this panel, the bus_flags are instead from trial-and-error. The flags seem to be common for these kind of panels as well.

---
 drivers/gpu/drm/panel/panel-simple.c | 29 
++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/gpu/drm/panel/panel-simple.c +15 -0
index e14c14ac6..b3d257257 100644
@@ -2842,6 +2842,32 @@ static const struct panel_desc 
 shelly_sca07010_bfn_lnn = {
 	.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
 };
 
+static const struct drm_display_mode starry_kr070pe2t_mode = {
+	.clock = 33000,
+	.hdisplay = 800,
+	.hsync_start = 800 + 209,
+	.hsync_end = 800 + 209 + 1,
+	.htotal = 800 + 209 + 1 + 45,
+	.vdisplay = 480,
+	.vsync_start = 480 + 22,
+	.vsync_end = 480 + 22 + 1,
+	.vtotal = 480 + 22 + 1 + 22,
+	.vrefresh = 60,
+};
+
+static const struct panel_desc starry_kr070pe2t = {
+	.modes = &starry_kr070pe2t_mode,

drivers/gpu/drm/panel/panel-simple.c static const struct panel_desc · line 2870

Quoted 10 lines
drivers/gpu/drm/panel/panel-simple.c +9 -0
+	.num_modes = 1,
+	.bpc = 8,
+	.size = {
+		.width = 152,
+		.height = 86,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH | 
 DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+	.connector_type = DRM_MODE_CONNECTOR_LVDS,

I'm trying to fix inconsistencies in the panel-simple driver, and this caught my eyes. MEDIA_BUS_FMT_RGB888_1X24 isn't a correct format for LVDS panels. MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, MEDIA_BUS_FMT_RGB888_1X7X4_SPWG or MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA should be used instead. As I couldn't find documentation for the panel, I can't tell which format is correct. Could you please help ?

Quoted 15 lines
drivers/gpu/drm/panel/panel-simple.c +2 -0
+};
+
 static const struct drm_display_mode starry_kr122ea0sra_mode = {
drivers/gpu/drm/panel/panel-simple.c +3 -0
 	.clock = 147000,
 	.hdisplay = 1920,
@@ -3474,6 +3500,9 @@ static const struct of_device_id 
 platform_of_match[] = {
 	}, {
 		.compatible = "shelly,sca07010-bfn-lnn",
 		.data = &shelly_sca07010_bfn_lnn,
+	}, {
+		.compatible = "starry,kr070pe2t",
+		.data = &starry_kr070pe2t,
 	}, {
 		.compatible = "starry,kr122ea0sra",
Quoted 1 line

.data = &starry_kr122ea0sra,

--
Regards,

Quoted 1 line

Laurent Pinchart

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#7 lore raw

PATCH v2 3/5 dt-bindings: vendor-prefixes: Add Topwise

In reply to Pascal Roeleven

Topwise Communication Co,. Ltd. is a company based in Shenzhen. They manufacture all kind of products but seem to be focusing on POS nowadays.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 9e67944be..3c08370b7 100644
@@ -982,6 +982,8 @@ patternProperties:
   "^toppoly,.*":
     description: TPO (deprecated, use tpo)
     deprecated: true
+  "^topwise,.*":
+    description: Topwise Communication Co., Ltd.
   "^toradex,.*":
     description: Toradex AG
   "^toshiba,.*":
Signature · 1 line
2.20.1
Acked-by on v2 3/5
#8 lore raw

Re: [PATCH v2 3/5] dt-bindings: vendor-prefixes: Add Topwise

Quoted 4 lines · Pascal Roeleven

Topwise Communication Co,. Ltd. is a company based in Shenzhen. They manufacture all kind of products but seem to be focusing on POS nowadays.

Quoted 19 lines
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 9e67944be..3c08370b7 100644
@@ -982,6 +982,8 @@ patternProperties:
   "^toppoly,.*":
     description: TPO (deprecated, use tpo)
     deprecated: true
+  "^topwise,.*":
+    description: Topwise Communication Co., Ltd.
   "^toradex,.*":
     description: Toradex AG
   "^toshiba,.*":
Signature · 1 line
2.20.1
maintainer Applied
#9 lore raw

Re: [PATCH v2 3/5] dt-bindings: vendor-prefixes: Add Topwise

In reply to Pascal Roeleven
Quoted 8 lines · Pascal Roeleven

Topwise Communication Co,. Ltd. is a company based in Shenzhen. They manufacture all kind of products but seem to be focusing on POS nowadays.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

Applied, thanks.

Rob

#10 lore raw

PATCH v2 4/5 dt-bindings: arm: Add Topwise A721

In reply to Pascal Roeleven

Add the bindings for Topwise A721 tablet

---
 Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/sunxi.yaml +5 -0
index abf2d97fb..3de8e85a4 100644
@@ -744,6 +744,11 @@ properties:
           - const: tbs-biometrics,a711
           - const: allwinner,sun8i-a83t
 
+      - description: Topwise A721 Tablet
+        items:
+          - const: topwise,a721
+          - const: allwinner,sun4i-a10
+
       - description: Utoo P66
         items:
           - const: utoo,p66
Signature · 1 line
2.20.1
maintainer Acked-by on v2 4/5
#11 lore raw

Re: [PATCH v2 4/5] dt-bindings: arm: Add Topwise A721

Quoted 7 lines · Pascal Roeleven

Add the bindings for Topwise A721 tablet

---
 Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
 1 file changed, 5 insertions(+)

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

#12 lore raw

PATCH v2 5/5 ARM: dts: sun4i: Add support for Topwise A721 tablet

In reply to Pascal Roeleven

The Topwise A721/LY-F1 tablet is a tablet sold around 2012 under different brands. The mainboard mentions A721 clearly, so this tablet is best known under this name.

---
 arch/arm/boot/dts/Makefile                   |   3 +-
 arch/arm/boot/dts/sun4i-a10-topwise-a721.dts | 242 +++++++++++++++++++
 2 files changed, 244 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun4i-a10-topwise-a721.dts
arch/arm/boot/dts/Makefile +2 -1
index 78f144e33..6e6141e00 100644
@@ -1040,7 +1040,8 @@ dtb-$(CONFIG_MACH_SUN4I) += \
 	sun4i-a10-olinuxino-lime.dtb \
 	sun4i-a10-pcduino.dtb \
 	sun4i-a10-pcduino2.dtb \
-	sun4i-a10-pov-protab2-ips9.dtb
+	sun4i-a10-pov-protab2-ips9.dtb \
+	sun4i-a10-topwise-a721.dtb
 dtb-$(CONFIG_MACH_SUN5I) += \
 	sun5i-a10s-auxtek-t003.dtb \
 	sun5i-a10s-auxtek-t004.dtb \
arch/arm/boot/dts/sun4i-a10-topwise-a721.dts new file +242 -0

242 lines not on this page · raw message

Signature · 1 line
2.20.1
#13 lore raw
In reply to Pascal Roeleven

Hi,

Quoted 3 lines · Pascal Roeleven

This series add support for the Topwise A721 tablet and it's display. It is an old tablet (around 2012) but it might be useful as reference as the devicetree is pretty complete.

It looks good to me for the last 2 patches, I'll wait for feedback from Thierry or Sam on the panel side.

Maxime