All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/panel: ABT Y030XX067A panel support
@ 2020-11-01  9:31 ` Paul Cercueil
  0 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-01  9:31 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg, Rob Herring
  Cc: Christophe Branchereau, od, dri-devel, devicetree, linux-kernel,
	Paul Cercueil

Hi,

This patchset is for adding support for the Asia Better Technology (aka.
ABT) Y030XX067A 3.0" 320x480 24-bit LCD IPS panel.

While being 320x480 it is actually 4:3 with non-square pixels, and
requires a specific bus format, as the pixel ordering changes each line
(RGB on odd lines, GRB on even lines).

Patch #1 adds the abt,* vendor prefix.
Patch #2 adds the abt,y030xx067a panel binding documentation.
Patch #3 adds the MEDIA_BUS_FMT_RGB888_3X8_DELTA media bus format.
Patch #4 adds the driver itself.

Cheers,
-Paul

Paul Cercueil (4):
  dt-bindings: vendor-prefixes: Add abt vendor prefix
  dt-bindings: display: Add ABT Y030XX067A panel bindings
  media: uapi: Add MEDIA_BUS_FMT_RGB888_3X8_DELTA media bus format
  drm/panel: Add ABT Y030XX067A 3.0" 320x480 panel

 .../display/panel/abt,y030xx067a.yaml         |  54 +++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 drivers/gpu/drm/panel/Kconfig                 |   9 +
 drivers/gpu/drm/panel/Makefile                |   1 +
 drivers/gpu/drm/panel/panel-abt-y030xx067a.c  | 363 ++++++++++++++++++
 include/uapi/linux/media-bus-format.h         |   3 +-
 6 files changed, 431 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
 create mode 100644 drivers/gpu/drm/panel/panel-abt-y030xx067a.c

-- 
2.28.0


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

* [PATCH 0/3] drm/panel: ABT Y030XX067A panel support
@ 2020-11-01  9:31 ` Paul Cercueil
  0 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-01  9:31 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg, Rob Herring
  Cc: devicetree, linux-kernel, dri-devel, Paul Cercueil, od,
	Christophe Branchereau

Hi,

This patchset is for adding support for the Asia Better Technology (aka.
ABT) Y030XX067A 3.0" 320x480 24-bit LCD IPS panel.

While being 320x480 it is actually 4:3 with non-square pixels, and
requires a specific bus format, as the pixel ordering changes each line
(RGB on odd lines, GRB on even lines).

Patch #1 adds the abt,* vendor prefix.
Patch #2 adds the abt,y030xx067a panel binding documentation.
Patch #3 adds the MEDIA_BUS_FMT_RGB888_3X8_DELTA media bus format.
Patch #4 adds the driver itself.

Cheers,
-Paul

Paul Cercueil (4):
  dt-bindings: vendor-prefixes: Add abt vendor prefix
  dt-bindings: display: Add ABT Y030XX067A panel bindings
  media: uapi: Add MEDIA_BUS_FMT_RGB888_3X8_DELTA media bus format
  drm/panel: Add ABT Y030XX067A 3.0" 320x480 panel

 .../display/panel/abt,y030xx067a.yaml         |  54 +++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 drivers/gpu/drm/panel/Kconfig                 |   9 +
 drivers/gpu/drm/panel/Makefile                |   1 +
 drivers/gpu/drm/panel/panel-abt-y030xx067a.c  | 363 ++++++++++++++++++
 include/uapi/linux/media-bus-format.h         |   3 +-
 6 files changed, 431 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
 create mode 100644 drivers/gpu/drm/panel/panel-abt-y030xx067a.c

-- 
2.28.0

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

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

* [PATCH 1/4] dt-bindings: vendor-prefixes: Add abt vendor prefix
  2020-11-01  9:31 ` Paul Cercueil
@ 2020-11-01  9:31   ` Paul Cercueil
  -1 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-01  9:31 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg, Rob Herring
  Cc: Christophe Branchereau, od, dri-devel, devicetree, linux-kernel,
	Paul Cercueil

Add prefix for ShenZhen Asia Better Technology Ltd.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 0e384959e870..2040f46396de 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -29,6 +29,8 @@ patternProperties:
     description: Abilis Systems
   "^abracon,.*":
     description: Abracon Corporation
+  "^abt,.*":
+    description: ShenZhen Asia Better Technology Ltd.
   "^acer,.*":
     description: Acer Inc.
   "^acme,.*":
-- 
2.28.0


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

* [PATCH 1/4] dt-bindings: vendor-prefixes: Add abt vendor prefix
@ 2020-11-01  9:31   ` Paul Cercueil
  0 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-01  9:31 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg, Rob Herring
  Cc: devicetree, linux-kernel, dri-devel, Paul Cercueil, od,
	Christophe Branchereau

Add prefix for ShenZhen Asia Better Technology Ltd.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 0e384959e870..2040f46396de 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -29,6 +29,8 @@ patternProperties:
     description: Abilis Systems
   "^abracon,.*":
     description: Abracon Corporation
+  "^abt,.*":
+    description: ShenZhen Asia Better Technology Ltd.
   "^acer,.*":
     description: Acer Inc.
   "^acme,.*":
-- 
2.28.0

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

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

* [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
  2020-11-01  9:31 ` Paul Cercueil
@ 2020-11-01  9:31   ` Paul Cercueil
  -1 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-01  9:31 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg, Rob Herring
  Cc: Christophe Branchereau, od, dri-devel, devicetree, linux-kernel,
	Paul Cercueil

The Asia Better Technology (ABT) Y030XX067A panel is a 3.0" 320x480
24-bit IPS LCD panel. Its particularity is that it has non-square pixels
(as it is 4:3 for a resolution of 320x480), and that it requires odd
lines to be sent as RGB and even lines to be sent as GRB on its 8-bit
bus.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 .../display/panel/abt,y030xx067a.yaml         | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
new file mode 100644
index 000000000000..6407e8bf45fa
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Asia Better Technology 3.0" (320x480 pixels) 24-bit IPS LCD panel
+
+description: |
+  The panel must obey the rules for a SPI slave device as specified in
+  spi/spi-controller.yaml
+
+maintainers:
+  - Paul Cercueil <paul@crapouillou.net>
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    const: abt,y030xx067a
+
+  backlight: true
+  port: true
+  power-supply: true
+  reg: true
+  reset-gpios: true
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        panel@0 {
+            compatible = "abt,y030xx067a";
+            reg = <0>;
+
+            spi-max-frequency = <3125000>;
+
+            reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>;
+
+            backlight = <&backlight>;
+            power-supply = <&vcc>;
+
+            port {
+                panel_input: endpoint {
+                    remote-endpoint = <&panel_output>;
+                };
+            };
+        };
+    };
-- 
2.28.0


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

* [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
@ 2020-11-01  9:31   ` Paul Cercueil
  0 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-01  9:31 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg, Rob Herring
  Cc: devicetree, linux-kernel, dri-devel, Paul Cercueil, od,
	Christophe Branchereau

The Asia Better Technology (ABT) Y030XX067A panel is a 3.0" 320x480
24-bit IPS LCD panel. Its particularity is that it has non-square pixels
(as it is 4:3 for a resolution of 320x480), and that it requires odd
lines to be sent as RGB and even lines to be sent as GRB on its 8-bit
bus.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 .../display/panel/abt,y030xx067a.yaml         | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
new file mode 100644
index 000000000000..6407e8bf45fa
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Asia Better Technology 3.0" (320x480 pixels) 24-bit IPS LCD panel
+
+description: |
+  The panel must obey the rules for a SPI slave device as specified in
+  spi/spi-controller.yaml
+
+maintainers:
+  - Paul Cercueil <paul@crapouillou.net>
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    const: abt,y030xx067a
+
+  backlight: true
+  port: true
+  power-supply: true
+  reg: true
+  reset-gpios: true
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        panel@0 {
+            compatible = "abt,y030xx067a";
+            reg = <0>;
+
+            spi-max-frequency = <3125000>;
+
+            reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>;
+
+            backlight = <&backlight>;
+            power-supply = <&vcc>;
+
+            port {
+                panel_input: endpoint {
+                    remote-endpoint = <&panel_output>;
+                };
+            };
+        };
+    };
-- 
2.28.0

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

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

* [PATCH 3/4] media: uapi: Add MEDIA_BUS_FMT_RGB888_3X8_DELTA media bus format
  2020-11-01  9:31 ` Paul Cercueil
@ 2020-11-01  9:31   ` Paul Cercueil
  -1 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-01  9:31 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg, Rob Herring
  Cc: Christophe Branchereau, od, dri-devel, devicetree, linux-kernel,
	Paul Cercueil

Add media bus format for 24-bit panels that expect their pixel data to
be sent serially on a 8-bit bus, in RGB ordering on odd lines, and in
GBR ordering on even lines (aka delta-RGB).

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 include/uapi/linux/media-bus-format.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index 84fa53ffb13f..5d905ad6dbb2 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -34,7 +34,7 @@
 
 #define MEDIA_BUS_FMT_FIXED			0x0001
 
-/* RGB - next is	0x101d */
+/* RGB - next is	0x101e */
 #define MEDIA_BUS_FMT_RGB444_1X12		0x1016
 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE	0x1001
 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE	0x1002
@@ -56,6 +56,7 @@
 #define MEDIA_BUS_FMT_RGB888_2X12_BE		0x100b
 #define MEDIA_BUS_FMT_RGB888_2X12_LE		0x100c
 #define MEDIA_BUS_FMT_RGB888_3X8		0x101c
+#define MEDIA_BUS_FMT_RGB888_3X8_DELTA		0x101d
 #define MEDIA_BUS_FMT_RGB888_1X7X4_SPWG		0x1011
 #define MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA	0x1012
 #define MEDIA_BUS_FMT_ARGB8888_1X32		0x100d
-- 
2.28.0


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

* [PATCH 3/4] media: uapi: Add MEDIA_BUS_FMT_RGB888_3X8_DELTA media bus format
@ 2020-11-01  9:31   ` Paul Cercueil
  0 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-01  9:31 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg, Rob Herring
  Cc: devicetree, linux-kernel, dri-devel, Paul Cercueil, od,
	Christophe Branchereau

Add media bus format for 24-bit panels that expect their pixel data to
be sent serially on a 8-bit bus, in RGB ordering on odd lines, and in
GBR ordering on even lines (aka delta-RGB).

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 include/uapi/linux/media-bus-format.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index 84fa53ffb13f..5d905ad6dbb2 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -34,7 +34,7 @@
 
 #define MEDIA_BUS_FMT_FIXED			0x0001
 
-/* RGB - next is	0x101d */
+/* RGB - next is	0x101e */
 #define MEDIA_BUS_FMT_RGB444_1X12		0x1016
 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE	0x1001
 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE	0x1002
@@ -56,6 +56,7 @@
 #define MEDIA_BUS_FMT_RGB888_2X12_BE		0x100b
 #define MEDIA_BUS_FMT_RGB888_2X12_LE		0x100c
 #define MEDIA_BUS_FMT_RGB888_3X8		0x101c
+#define MEDIA_BUS_FMT_RGB888_3X8_DELTA		0x101d
 #define MEDIA_BUS_FMT_RGB888_1X7X4_SPWG		0x1011
 #define MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA	0x1012
 #define MEDIA_BUS_FMT_ARGB8888_1X32		0x100d
-- 
2.28.0

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

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

* [PATCH 4/4] drm/panel: Add ABT Y030XX067A 3.0" 320x480 panel
  2020-11-01  9:31 ` Paul Cercueil
@ 2020-11-01  9:31   ` Paul Cercueil
  -1 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-01  9:31 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg, Rob Herring
  Cc: Christophe Branchereau, od, dri-devel, devicetree, linux-kernel,
	Paul Cercueil

Add support for the ShenZhen Asia Better Technology Ltd. Y030XX067A 3.0"
320x480 IPS panel.

This panel can be found in the YLM RG-280M, RG-300 and RG-99 handheld
gaming consoles. While being 320x480, it is actually a horizontal 4:3
panel with non-square pixels.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com>
---
 drivers/gpu/drm/panel/Kconfig                |   9 +
 drivers/gpu/drm/panel/Makefile               |   1 +
 drivers/gpu/drm/panel/panel-abt-y030xx067a.c | 363 +++++++++++++++++++
 3 files changed, 373 insertions(+)
 create mode 100644 drivers/gpu/drm/panel/panel-abt-y030xx067a.c

diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index e386524b2d77..7fe22b4c8aa2 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -8,6 +8,15 @@ config DRM_PANEL
 menu "Display Panels"
 	depends on DRM && DRM_PANEL
 
+config DRM_PANEL_ABT_Y030XX067A
+	tristate "ABT Y030XX067A 320x480 LCD panel"
+	depends on OF && SPI
+	select REGMAP_SPI
+	help
+	  Say Y here to enable support for the Asia Better Technology Ltd.
+	  Y030XX067A 320x480 3.0" panel as found in the YLM RG-280M, RG-300
+	  and RG-99 handheld gaming consoles.
+
 config DRM_PANEL_ARM_VERSATILE
 	tristate "ARM Versatile panel driver"
 	depends on OF
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
index d1f8cc572f37..78b77ba4d458 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -1,4 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_DRM_PANEL_ABT_Y030XX067A) += panel-abt-y030xx067a.o
 obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o
 obj-$(CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596) += panel-asus-z00t-tm5p5-n35596.o
 obj-$(CONFIG_DRM_PANEL_BOE_HIMAX8279D) += panel-boe-himax8279d.o
diff --git a/drivers/gpu/drm/panel/panel-abt-y030xx067a.c b/drivers/gpu/drm/panel/panel-abt-y030xx067a.c
new file mode 100644
index 000000000000..2d8794d495d0
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-abt-y030xx067a.c
@@ -0,0 +1,363 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Asia Better Technology Ltd. Y030XX067A IPS LCD panel driver
+ *
+ * Copyright (C) 2020, Paul Cercueil <paul@crapouillou.net>
+ * Copyright (C) 2020, Christophe Branchereau <cbranchereau@gmail.com>
+ */
+
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/gpio/consumer.h>
+#include <linux/media-bus-format.h>
+#include <linux/module.h>
+#include <linux/of_device.h>
+#include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
+#include <linux/spi/spi.h>
+
+#include <drm/drm_modes.h>
+#include <drm/drm_panel.h>
+
+#define REG00_VBRT_CTRL(val)		(val)
+
+#define REG01_COM_DC(val)		(val)
+
+#define REG02_DA_CONTRAST(val)		(val)
+#define REG02_VESA_SEL(val)		((val) << 5)
+#define REG02_COMDC_SW			BIT(7)
+
+#define REG03_VPOSITION(val)		(val)
+#define REG03_BSMOUNT			BIT(5)
+#define REG03_COMTST			BIT(6)
+#define REG03_HPOSITION1		BIT(7)
+
+#define REG04_HPOSITION1(val)		(val)
+
+#define REG05_CLIP			BIT(0)
+#define REG05_NVM_VREFRESH		BIT(1)
+#define REG05_SLFR			BIT(2)
+#define REG05_SLBRCHARGE(val)		((val) << 3)
+#define REG05_PRECHARGE_LEVEL(val)	((val) << 6)
+
+#define REG06_TEST5			BIT(0)
+#define REG06_SLDWN			BIT(1)
+#define REG06_SLRGT			BIT(2)
+#define REG06_TEST2			BIT(3)
+#define REG06_XPSAVE			BIT(4)
+#define REG06_GAMMA_SEL(val)		((val) << 5)
+#define REG06_NT			BIT(7)
+
+#define REG07_TEST1			BIT(0)
+#define REG07_HDVD_POL			BIT(1)
+#define REG07_CK_POL			BIT(2)
+#define REG07_TEST3			BIT(3)
+#define REG07_TEST4			BIT(4)
+#define REG07_480_LINEMASK		BIT(5)
+#define REG07_AMPTST(val)		((val) << 6)
+
+#define REG08_SLHRC(val)		(val)
+#define REG08_CLOCK_DIV(val)		((val) << 2)
+#define REG08_PANEL(val)		((val) << 5)
+
+#define REG09_SUB_BRIGHT_R(val)		(val)
+#define REG09_NW_NB			BIT(6)
+#define REG09_IPCON			BIT(7)
+
+#define REG0A_SUB_BRIGHT_B(val)		(val)
+#define REG0A_PAIR			BIT(6)
+#define REG0A_DE_SEL			BIT(7)
+
+#define REG0B_MBK_POSITION(val)		(val)
+#define REG0B_HD_FREERUN		BIT(4)
+#define REG0B_VD_FREERUN		BIT(5)
+#define REG0B_YUV2BIN(val)		((val) << 6)
+
+#define REG0C_CONTRAST_R(val)		(val)
+#define REG0C_DOUBLEREAD		BIT(7)
+
+#define REG0D_CONTRAST_G(val)		(val)
+#define REG0D_RGB_YUV			BIT(7)
+
+#define REG0E_CONTRAST_B(val)		(val)
+#define REG0E_PIXELCOLORDRIVE		BIT(7)
+
+#define REG0F_ASPECT			BIT(0)
+#define REG0F_OVERSCAN(val)		((val) << 1)
+#define REG0F_FRAMEWIDTH(val)		((val) << 3)
+
+#define REG10_BRIGHT(val)		(val)
+
+#define REG11_SIG_GAIN(val)		(val)
+#define REG11_SIGC_CNTL			BIT(6)
+#define REG11_SIGC_POL			BIT(7)
+
+#define REG12_COLOR(val)		(val)
+#define REG12_PWCKSEL(val)		((val) << 6)
+
+#define REG13_4096LEVEL_CNTL(val)	(val)
+#define REG13_SL4096(val)		((val) << 4)
+#define REG13_LIMITER_CONTROL		BIT(7)
+
+#define REG14_PANEL_TEST(val)		(val)
+
+#define REG15_NVM_LINK0			BIT(0)
+#define REG15_NVM_LINK1			BIT(1)
+#define REG15_NVM_LINK2			BIT(2)
+#define REG15_NVM_LINK3			BIT(3)
+#define REG15_NVM_LINK4			BIT(4)
+#define REG15_NVM_LINK5			BIT(5)
+#define REG15_NVM_LINK6			BIT(6)
+#define REG15_NVM_LINK7			BIT(7)
+
+struct y030xx067a_info {
+	const struct drm_display_mode *display_modes;
+	unsigned int num_modes;
+	u16 width_mm, height_mm;
+	u32 bus_format, bus_flags;
+};
+
+struct y030xx067a {
+	struct drm_panel panel;
+	struct spi_device *spi;
+	struct regmap *map;
+
+	const struct y030xx067a_info *panel_info;
+
+	struct regulator *supply;
+	struct gpio_desc *reset_gpio;
+};
+
+static inline struct y030xx067a *to_y030xx067a(struct drm_panel *panel)
+{
+	return container_of(panel, struct y030xx067a, panel);
+}
+
+static const struct reg_sequence y030xx067a_init_sequence[] = {
+	{ 0x00, REG00_VBRT_CTRL(0x7f) },
+	{ 0x01, REG01_COM_DC(0x3c) },
+	{ 0x02, REG02_VESA_SEL(0x3) | REG02_DA_CONTRAST(0x1f) },
+	{ 0x03, REG03_VPOSITION(0x0a) },
+	{ 0x04, REG04_HPOSITION1(0xd2) },
+	{ 0x05, REG05_CLIP | REG05_NVM_VREFRESH | REG05_SLBRCHARGE(0x2) },
+	{ 0x06, REG06_XPSAVE | REG06_NT },
+	{ 0x07, 0 },
+	{ 0x08, REG08_PANEL(0x1) | REG08_CLOCK_DIV(0x2) },
+	{ 0x09, REG09_SUB_BRIGHT_R(0x20) },
+	{ 0x0a, REG0A_SUB_BRIGHT_B(0x20) },
+	{ 0x0b, REG0B_HD_FREERUN | REG0B_VD_FREERUN },
+	{ 0x0c, REG0C_CONTRAST_R(0x10) },
+	{ 0x0d, REG0D_CONTRAST_G(0x10) },
+	{ 0x0e, REG0E_CONTRAST_B(0x10) },
+	{ 0x0f, 0 },
+	{ 0x10, REG10_BRIGHT(0x7f) },
+	{ 0x11, REG11_SIGC_CNTL | REG11_SIG_GAIN(0x3f) },
+	{ 0x12, REG12_COLOR(0x20) | REG12_PWCKSEL(0x1) },
+	{ 0x13, REG13_4096LEVEL_CNTL(0x8) },
+	{ 0x14, 0 },
+	{ 0x15, 0 },
+};
+
+static int y030xx067a_prepare(struct drm_panel *panel)
+{
+	struct y030xx067a *priv = to_y030xx067a(panel);
+	struct device *dev = &priv->spi->dev;
+	int err;
+
+	err = regulator_enable(priv->supply);
+	if (err) {
+		dev_err(dev, "Failed to enable power supply: %d\n", err);
+		return err;
+	}
+
+	/* Reset the chip */
+	gpiod_set_value_cansleep(priv->reset_gpio, 1);
+	usleep_range(1000, 20000);
+	gpiod_set_value_cansleep(priv->reset_gpio, 0);
+	usleep_range(1000, 20000);
+
+	err = regmap_multi_reg_write(priv->map, y030xx067a_init_sequence,
+				     ARRAY_SIZE(y030xx067a_init_sequence));
+	if (err) {
+		dev_err(dev, "Failed to init registers: %d\n", err);
+		goto err_disable_regulator;
+	}
+
+	msleep(120);
+
+	return 0;
+
+err_disable_regulator:
+	regulator_disable(priv->supply);
+	return err;
+}
+
+static int y030xx067a_unprepare(struct drm_panel *panel)
+{
+	struct y030xx067a *priv = to_y030xx067a(panel);
+
+	gpiod_set_value_cansleep(priv->reset_gpio, 1);
+	regulator_disable(priv->supply);
+
+	return 0;
+}
+
+static int y030xx067a_get_modes(struct drm_panel *panel,
+				struct drm_connector *connector)
+{
+	struct y030xx067a *priv = to_y030xx067a(panel);
+	const struct y030xx067a_info *panel_info = priv->panel_info;
+	struct drm_display_mode *mode;
+	unsigned int i;
+
+	for (i = 0; i < panel_info->num_modes; i++) {
+		mode = drm_mode_duplicate(connector->dev,
+					  &panel_info->display_modes[i]);
+		if (!mode)
+			return -ENOMEM;
+
+		drm_mode_set_name(mode);
+
+		mode->type = DRM_MODE_TYPE_DRIVER;
+		if (panel_info->num_modes == 1)
+			mode->type |= DRM_MODE_TYPE_PREFERRED;
+
+		drm_mode_probed_add(connector, mode);
+	}
+
+	connector->display_info.bpc = 8;
+	connector->display_info.width_mm = panel_info->width_mm;
+	connector->display_info.height_mm = panel_info->height_mm;
+
+	drm_display_info_set_bus_formats(&connector->display_info,
+					 &panel_info->bus_format, 1);
+	connector->display_info.bus_flags = panel_info->bus_flags;
+
+	return panel_info->num_modes;
+}
+
+static const struct drm_panel_funcs y030xx067a_funcs = {
+	.prepare	= y030xx067a_prepare,
+	.unprepare	= y030xx067a_unprepare,
+	.get_modes	= y030xx067a_get_modes,
+};
+
+static const struct regmap_config y030xx067a_regmap_config = {
+	.reg_bits = 8,
+	.val_bits = 8,
+	.max_register = 0x15,
+};
+
+static int y030xx067a_probe(struct spi_device *spi)
+{
+	struct device *dev = &spi->dev;
+	struct y030xx067a *priv;
+	int err;
+
+	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;
+
+	priv->spi = spi;
+	spi_set_drvdata(spi, priv);
+
+	priv->map = devm_regmap_init_spi(spi, &y030xx067a_regmap_config);
+	if (IS_ERR(priv->map)) {
+		dev_err(dev, "Unable to init regmap\n");
+		return PTR_ERR(priv->map);
+	}
+
+	priv->panel_info = of_device_get_match_data(dev);
+	if (!priv->panel_info)
+		return -EINVAL;
+
+	priv->supply = devm_regulator_get(dev, "power");
+	if (IS_ERR(priv->supply)) {
+		dev_err(dev, "Failed to get power supply\n");
+		return PTR_ERR(priv->supply);
+	}
+
+	priv->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
+	if (IS_ERR(priv->reset_gpio)) {
+		dev_err(dev, "Failed to get reset GPIO\n");
+		return PTR_ERR(priv->reset_gpio);
+	}
+
+	drm_panel_init(&priv->panel, dev, &y030xx067a_funcs,
+		       DRM_MODE_CONNECTOR_DPI);
+
+	err = drm_panel_of_backlight(&priv->panel);
+	if (err)
+		return err;
+
+	drm_panel_add(&priv->panel);
+
+	return 0;
+}
+
+static int y030xx067a_remove(struct spi_device *spi)
+{
+	struct y030xx067a *priv = spi_get_drvdata(spi);
+
+	drm_panel_remove(&priv->panel);
+	drm_panel_disable(&priv->panel);
+	drm_panel_unprepare(&priv->panel);
+
+	return 0;
+}
+
+static const struct drm_display_mode y030xx067a_modes[] = {
+	{ /* 60 Hz */
+		.clock = 14400,
+		.hdisplay = 320,
+		.hsync_start = 320 + 10,
+		.hsync_end = 320 + 10 + 37,
+		.htotal = 320 + 10 + 37 + 33,
+		.vdisplay = 480,
+		.vsync_start = 480 + 84,
+		.vsync_end = 480 + 84 + 20,
+		.vtotal = 480 + 84 + 20 + 16,
+		.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
+	},
+	{ /* 50 Hz */
+		.clock = 12000,
+		.hdisplay = 320,
+		.hsync_start = 320 + 10,
+		.hsync_end = 320 + 10 + 37,
+		.htotal = 320 + 10 + 37 + 33,
+		.vdisplay = 480,
+		.vsync_start = 480 + 84,
+		.vsync_end = 480 + 84 + 20,
+		.vtotal = 480 + 84 + 20 + 16,
+		.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
+	},
+};
+
+static const struct y030xx067a_info y030xx067a_info = {
+	.display_modes = y030xx067a_modes,
+	.num_modes = ARRAY_SIZE(y030xx067a_modes),
+	.width_mm = 69,
+	.height_mm = 51,
+	.bus_format = MEDIA_BUS_FMT_RGB888_3X8_DELTA,
+	.bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE | DRM_BUS_FLAG_DE_LOW,
+};
+
+static const struct of_device_id y030xx067a_of_match[] = {
+	{ .compatible = "abt,y030xx067a", .data = &y030xx067a_info },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, y030xx067a_of_match);
+
+static struct spi_driver y030xx067a_driver = {
+	.driver = {
+		.name = "abt-y030xx067a",
+		.of_match_table = y030xx067a_of_match,
+	},
+	.probe = y030xx067a_probe,
+	.remove = y030xx067a_remove,
+};
+module_spi_driver(y030xx067a_driver);
+
+MODULE_AUTHOR("Paul Cercueil <paul@crapouillou.net>");
+MODULE_AUTHOR("Christophe Branchereau <cbranchereau@gmail.com>");
+MODULE_LICENSE("GPL v2");
-- 
2.28.0


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

* [PATCH 4/4] drm/panel: Add ABT Y030XX067A 3.0" 320x480 panel
@ 2020-11-01  9:31   ` Paul Cercueil
  0 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-01  9:31 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg, Rob Herring
  Cc: devicetree, linux-kernel, dri-devel, Paul Cercueil, od,
	Christophe Branchereau

Add support for the ShenZhen Asia Better Technology Ltd. Y030XX067A 3.0"
320x480 IPS panel.

This panel can be found in the YLM RG-280M, RG-300 and RG-99 handheld
gaming consoles. While being 320x480, it is actually a horizontal 4:3
panel with non-square pixels.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com>
---
 drivers/gpu/drm/panel/Kconfig                |   9 +
 drivers/gpu/drm/panel/Makefile               |   1 +
 drivers/gpu/drm/panel/panel-abt-y030xx067a.c | 363 +++++++++++++++++++
 3 files changed, 373 insertions(+)
 create mode 100644 drivers/gpu/drm/panel/panel-abt-y030xx067a.c

diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index e386524b2d77..7fe22b4c8aa2 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -8,6 +8,15 @@ config DRM_PANEL
 menu "Display Panels"
 	depends on DRM && DRM_PANEL
 
+config DRM_PANEL_ABT_Y030XX067A
+	tristate "ABT Y030XX067A 320x480 LCD panel"
+	depends on OF && SPI
+	select REGMAP_SPI
+	help
+	  Say Y here to enable support for the Asia Better Technology Ltd.
+	  Y030XX067A 320x480 3.0" panel as found in the YLM RG-280M, RG-300
+	  and RG-99 handheld gaming consoles.
+
 config DRM_PANEL_ARM_VERSATILE
 	tristate "ARM Versatile panel driver"
 	depends on OF
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
index d1f8cc572f37..78b77ba4d458 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -1,4 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_DRM_PANEL_ABT_Y030XX067A) += panel-abt-y030xx067a.o
 obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o
 obj-$(CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596) += panel-asus-z00t-tm5p5-n35596.o
 obj-$(CONFIG_DRM_PANEL_BOE_HIMAX8279D) += panel-boe-himax8279d.o
diff --git a/drivers/gpu/drm/panel/panel-abt-y030xx067a.c b/drivers/gpu/drm/panel/panel-abt-y030xx067a.c
new file mode 100644
index 000000000000..2d8794d495d0
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-abt-y030xx067a.c
@@ -0,0 +1,363 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Asia Better Technology Ltd. Y030XX067A IPS LCD panel driver
+ *
+ * Copyright (C) 2020, Paul Cercueil <paul@crapouillou.net>
+ * Copyright (C) 2020, Christophe Branchereau <cbranchereau@gmail.com>
+ */
+
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/gpio/consumer.h>
+#include <linux/media-bus-format.h>
+#include <linux/module.h>
+#include <linux/of_device.h>
+#include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
+#include <linux/spi/spi.h>
+
+#include <drm/drm_modes.h>
+#include <drm/drm_panel.h>
+
+#define REG00_VBRT_CTRL(val)		(val)
+
+#define REG01_COM_DC(val)		(val)
+
+#define REG02_DA_CONTRAST(val)		(val)
+#define REG02_VESA_SEL(val)		((val) << 5)
+#define REG02_COMDC_SW			BIT(7)
+
+#define REG03_VPOSITION(val)		(val)
+#define REG03_BSMOUNT			BIT(5)
+#define REG03_COMTST			BIT(6)
+#define REG03_HPOSITION1		BIT(7)
+
+#define REG04_HPOSITION1(val)		(val)
+
+#define REG05_CLIP			BIT(0)
+#define REG05_NVM_VREFRESH		BIT(1)
+#define REG05_SLFR			BIT(2)
+#define REG05_SLBRCHARGE(val)		((val) << 3)
+#define REG05_PRECHARGE_LEVEL(val)	((val) << 6)
+
+#define REG06_TEST5			BIT(0)
+#define REG06_SLDWN			BIT(1)
+#define REG06_SLRGT			BIT(2)
+#define REG06_TEST2			BIT(3)
+#define REG06_XPSAVE			BIT(4)
+#define REG06_GAMMA_SEL(val)		((val) << 5)
+#define REG06_NT			BIT(7)
+
+#define REG07_TEST1			BIT(0)
+#define REG07_HDVD_POL			BIT(1)
+#define REG07_CK_POL			BIT(2)
+#define REG07_TEST3			BIT(3)
+#define REG07_TEST4			BIT(4)
+#define REG07_480_LINEMASK		BIT(5)
+#define REG07_AMPTST(val)		((val) << 6)
+
+#define REG08_SLHRC(val)		(val)
+#define REG08_CLOCK_DIV(val)		((val) << 2)
+#define REG08_PANEL(val)		((val) << 5)
+
+#define REG09_SUB_BRIGHT_R(val)		(val)
+#define REG09_NW_NB			BIT(6)
+#define REG09_IPCON			BIT(7)
+
+#define REG0A_SUB_BRIGHT_B(val)		(val)
+#define REG0A_PAIR			BIT(6)
+#define REG0A_DE_SEL			BIT(7)
+
+#define REG0B_MBK_POSITION(val)		(val)
+#define REG0B_HD_FREERUN		BIT(4)
+#define REG0B_VD_FREERUN		BIT(5)
+#define REG0B_YUV2BIN(val)		((val) << 6)
+
+#define REG0C_CONTRAST_R(val)		(val)
+#define REG0C_DOUBLEREAD		BIT(7)
+
+#define REG0D_CONTRAST_G(val)		(val)
+#define REG0D_RGB_YUV			BIT(7)
+
+#define REG0E_CONTRAST_B(val)		(val)
+#define REG0E_PIXELCOLORDRIVE		BIT(7)
+
+#define REG0F_ASPECT			BIT(0)
+#define REG0F_OVERSCAN(val)		((val) << 1)
+#define REG0F_FRAMEWIDTH(val)		((val) << 3)
+
+#define REG10_BRIGHT(val)		(val)
+
+#define REG11_SIG_GAIN(val)		(val)
+#define REG11_SIGC_CNTL			BIT(6)
+#define REG11_SIGC_POL			BIT(7)
+
+#define REG12_COLOR(val)		(val)
+#define REG12_PWCKSEL(val)		((val) << 6)
+
+#define REG13_4096LEVEL_CNTL(val)	(val)
+#define REG13_SL4096(val)		((val) << 4)
+#define REG13_LIMITER_CONTROL		BIT(7)
+
+#define REG14_PANEL_TEST(val)		(val)
+
+#define REG15_NVM_LINK0			BIT(0)
+#define REG15_NVM_LINK1			BIT(1)
+#define REG15_NVM_LINK2			BIT(2)
+#define REG15_NVM_LINK3			BIT(3)
+#define REG15_NVM_LINK4			BIT(4)
+#define REG15_NVM_LINK5			BIT(5)
+#define REG15_NVM_LINK6			BIT(6)
+#define REG15_NVM_LINK7			BIT(7)
+
+struct y030xx067a_info {
+	const struct drm_display_mode *display_modes;
+	unsigned int num_modes;
+	u16 width_mm, height_mm;
+	u32 bus_format, bus_flags;
+};
+
+struct y030xx067a {
+	struct drm_panel panel;
+	struct spi_device *spi;
+	struct regmap *map;
+
+	const struct y030xx067a_info *panel_info;
+
+	struct regulator *supply;
+	struct gpio_desc *reset_gpio;
+};
+
+static inline struct y030xx067a *to_y030xx067a(struct drm_panel *panel)
+{
+	return container_of(panel, struct y030xx067a, panel);
+}
+
+static const struct reg_sequence y030xx067a_init_sequence[] = {
+	{ 0x00, REG00_VBRT_CTRL(0x7f) },
+	{ 0x01, REG01_COM_DC(0x3c) },
+	{ 0x02, REG02_VESA_SEL(0x3) | REG02_DA_CONTRAST(0x1f) },
+	{ 0x03, REG03_VPOSITION(0x0a) },
+	{ 0x04, REG04_HPOSITION1(0xd2) },
+	{ 0x05, REG05_CLIP | REG05_NVM_VREFRESH | REG05_SLBRCHARGE(0x2) },
+	{ 0x06, REG06_XPSAVE | REG06_NT },
+	{ 0x07, 0 },
+	{ 0x08, REG08_PANEL(0x1) | REG08_CLOCK_DIV(0x2) },
+	{ 0x09, REG09_SUB_BRIGHT_R(0x20) },
+	{ 0x0a, REG0A_SUB_BRIGHT_B(0x20) },
+	{ 0x0b, REG0B_HD_FREERUN | REG0B_VD_FREERUN },
+	{ 0x0c, REG0C_CONTRAST_R(0x10) },
+	{ 0x0d, REG0D_CONTRAST_G(0x10) },
+	{ 0x0e, REG0E_CONTRAST_B(0x10) },
+	{ 0x0f, 0 },
+	{ 0x10, REG10_BRIGHT(0x7f) },
+	{ 0x11, REG11_SIGC_CNTL | REG11_SIG_GAIN(0x3f) },
+	{ 0x12, REG12_COLOR(0x20) | REG12_PWCKSEL(0x1) },
+	{ 0x13, REG13_4096LEVEL_CNTL(0x8) },
+	{ 0x14, 0 },
+	{ 0x15, 0 },
+};
+
+static int y030xx067a_prepare(struct drm_panel *panel)
+{
+	struct y030xx067a *priv = to_y030xx067a(panel);
+	struct device *dev = &priv->spi->dev;
+	int err;
+
+	err = regulator_enable(priv->supply);
+	if (err) {
+		dev_err(dev, "Failed to enable power supply: %d\n", err);
+		return err;
+	}
+
+	/* Reset the chip */
+	gpiod_set_value_cansleep(priv->reset_gpio, 1);
+	usleep_range(1000, 20000);
+	gpiod_set_value_cansleep(priv->reset_gpio, 0);
+	usleep_range(1000, 20000);
+
+	err = regmap_multi_reg_write(priv->map, y030xx067a_init_sequence,
+				     ARRAY_SIZE(y030xx067a_init_sequence));
+	if (err) {
+		dev_err(dev, "Failed to init registers: %d\n", err);
+		goto err_disable_regulator;
+	}
+
+	msleep(120);
+
+	return 0;
+
+err_disable_regulator:
+	regulator_disable(priv->supply);
+	return err;
+}
+
+static int y030xx067a_unprepare(struct drm_panel *panel)
+{
+	struct y030xx067a *priv = to_y030xx067a(panel);
+
+	gpiod_set_value_cansleep(priv->reset_gpio, 1);
+	regulator_disable(priv->supply);
+
+	return 0;
+}
+
+static int y030xx067a_get_modes(struct drm_panel *panel,
+				struct drm_connector *connector)
+{
+	struct y030xx067a *priv = to_y030xx067a(panel);
+	const struct y030xx067a_info *panel_info = priv->panel_info;
+	struct drm_display_mode *mode;
+	unsigned int i;
+
+	for (i = 0; i < panel_info->num_modes; i++) {
+		mode = drm_mode_duplicate(connector->dev,
+					  &panel_info->display_modes[i]);
+		if (!mode)
+			return -ENOMEM;
+
+		drm_mode_set_name(mode);
+
+		mode->type = DRM_MODE_TYPE_DRIVER;
+		if (panel_info->num_modes == 1)
+			mode->type |= DRM_MODE_TYPE_PREFERRED;
+
+		drm_mode_probed_add(connector, mode);
+	}
+
+	connector->display_info.bpc = 8;
+	connector->display_info.width_mm = panel_info->width_mm;
+	connector->display_info.height_mm = panel_info->height_mm;
+
+	drm_display_info_set_bus_formats(&connector->display_info,
+					 &panel_info->bus_format, 1);
+	connector->display_info.bus_flags = panel_info->bus_flags;
+
+	return panel_info->num_modes;
+}
+
+static const struct drm_panel_funcs y030xx067a_funcs = {
+	.prepare	= y030xx067a_prepare,
+	.unprepare	= y030xx067a_unprepare,
+	.get_modes	= y030xx067a_get_modes,
+};
+
+static const struct regmap_config y030xx067a_regmap_config = {
+	.reg_bits = 8,
+	.val_bits = 8,
+	.max_register = 0x15,
+};
+
+static int y030xx067a_probe(struct spi_device *spi)
+{
+	struct device *dev = &spi->dev;
+	struct y030xx067a *priv;
+	int err;
+
+	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;
+
+	priv->spi = spi;
+	spi_set_drvdata(spi, priv);
+
+	priv->map = devm_regmap_init_spi(spi, &y030xx067a_regmap_config);
+	if (IS_ERR(priv->map)) {
+		dev_err(dev, "Unable to init regmap\n");
+		return PTR_ERR(priv->map);
+	}
+
+	priv->panel_info = of_device_get_match_data(dev);
+	if (!priv->panel_info)
+		return -EINVAL;
+
+	priv->supply = devm_regulator_get(dev, "power");
+	if (IS_ERR(priv->supply)) {
+		dev_err(dev, "Failed to get power supply\n");
+		return PTR_ERR(priv->supply);
+	}
+
+	priv->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
+	if (IS_ERR(priv->reset_gpio)) {
+		dev_err(dev, "Failed to get reset GPIO\n");
+		return PTR_ERR(priv->reset_gpio);
+	}
+
+	drm_panel_init(&priv->panel, dev, &y030xx067a_funcs,
+		       DRM_MODE_CONNECTOR_DPI);
+
+	err = drm_panel_of_backlight(&priv->panel);
+	if (err)
+		return err;
+
+	drm_panel_add(&priv->panel);
+
+	return 0;
+}
+
+static int y030xx067a_remove(struct spi_device *spi)
+{
+	struct y030xx067a *priv = spi_get_drvdata(spi);
+
+	drm_panel_remove(&priv->panel);
+	drm_panel_disable(&priv->panel);
+	drm_panel_unprepare(&priv->panel);
+
+	return 0;
+}
+
+static const struct drm_display_mode y030xx067a_modes[] = {
+	{ /* 60 Hz */
+		.clock = 14400,
+		.hdisplay = 320,
+		.hsync_start = 320 + 10,
+		.hsync_end = 320 + 10 + 37,
+		.htotal = 320 + 10 + 37 + 33,
+		.vdisplay = 480,
+		.vsync_start = 480 + 84,
+		.vsync_end = 480 + 84 + 20,
+		.vtotal = 480 + 84 + 20 + 16,
+		.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
+	},
+	{ /* 50 Hz */
+		.clock = 12000,
+		.hdisplay = 320,
+		.hsync_start = 320 + 10,
+		.hsync_end = 320 + 10 + 37,
+		.htotal = 320 + 10 + 37 + 33,
+		.vdisplay = 480,
+		.vsync_start = 480 + 84,
+		.vsync_end = 480 + 84 + 20,
+		.vtotal = 480 + 84 + 20 + 16,
+		.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
+	},
+};
+
+static const struct y030xx067a_info y030xx067a_info = {
+	.display_modes = y030xx067a_modes,
+	.num_modes = ARRAY_SIZE(y030xx067a_modes),
+	.width_mm = 69,
+	.height_mm = 51,
+	.bus_format = MEDIA_BUS_FMT_RGB888_3X8_DELTA,
+	.bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE | DRM_BUS_FLAG_DE_LOW,
+};
+
+static const struct of_device_id y030xx067a_of_match[] = {
+	{ .compatible = "abt,y030xx067a", .data = &y030xx067a_info },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, y030xx067a_of_match);
+
+static struct spi_driver y030xx067a_driver = {
+	.driver = {
+		.name = "abt-y030xx067a",
+		.of_match_table = y030xx067a_of_match,
+	},
+	.probe = y030xx067a_probe,
+	.remove = y030xx067a_remove,
+};
+module_spi_driver(y030xx067a_driver);
+
+MODULE_AUTHOR("Paul Cercueil <paul@crapouillou.net>");
+MODULE_AUTHOR("Christophe Branchereau <cbranchereau@gmail.com>");
+MODULE_LICENSE("GPL v2");
-- 
2.28.0

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

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

* Re: [PATCH 0/3] drm/panel: ABT Y030XX067A panel support
  2020-11-01  9:31 ` Paul Cercueil
@ 2020-11-01 12:26   ` Sam Ravnborg
  -1 siblings, 0 replies; 34+ messages in thread
From: Sam Ravnborg @ 2020-11-01 12:26 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Thierry Reding, Rob Herring, Christophe Branchereau, od,
	dri-devel, devicetree, linux-kernel

Hi Paul.

On Sun, Nov 01, 2020 at 09:31:46AM +0000, Paul Cercueil wrote:
> Hi,
> 
> This patchset is for adding support for the Asia Better Technology (aka.
> ABT) Y030XX067A 3.0" 320x480 24-bit LCD IPS panel.
> 
> While being 320x480 it is actually 4:3 with non-square pixels, and
> requires a specific bus format, as the pixel ordering changes each line
> (RGB on odd lines, GRB on even lines).
> 
> Patch #1 adds the abt,* vendor prefix.
> Patch #2 adds the abt,y030xx067a panel binding documentation.
> Patch #3 adds the MEDIA_BUS_FMT_RGB888_3X8_DELTA media bus format.
> Patch #4 adds the driver itself.

Full series looks good.

I asked google - but no hits for "Asia Better Technology". But I blame
that the company has no public page - in english at least.
Also the part with a DELTA media bus format looks correct, but not
something I know much off.

The driver itself utilises regmap_multi_reg_write() - very nice!

Full series is:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

I assume you will apply yourself - but please wait a few days after it
have hit dri-devel to let others have the possibility to give feedback.

	Sam

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

* Re: [PATCH 0/3] drm/panel: ABT Y030XX067A panel support
@ 2020-11-01 12:26   ` Sam Ravnborg
  0 siblings, 0 replies; 34+ messages in thread
From: Sam Ravnborg @ 2020-11-01 12:26 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: devicetree, od, linux-kernel, dri-devel, Rob Herring,
	Thierry Reding, Christophe Branchereau

Hi Paul.

On Sun, Nov 01, 2020 at 09:31:46AM +0000, Paul Cercueil wrote:
> Hi,
> 
> This patchset is for adding support for the Asia Better Technology (aka.
> ABT) Y030XX067A 3.0" 320x480 24-bit LCD IPS panel.
> 
> While being 320x480 it is actually 4:3 with non-square pixels, and
> requires a specific bus format, as the pixel ordering changes each line
> (RGB on odd lines, GRB on even lines).
> 
> Patch #1 adds the abt,* vendor prefix.
> Patch #2 adds the abt,y030xx067a panel binding documentation.
> Patch #3 adds the MEDIA_BUS_FMT_RGB888_3X8_DELTA media bus format.
> Patch #4 adds the driver itself.

Full series looks good.

I asked google - but no hits for "Asia Better Technology". But I blame
that the company has no public page - in english at least.
Also the part with a DELTA media bus format looks correct, but not
something I know much off.

The driver itself utilises regmap_multi_reg_write() - very nice!

Full series is:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

I assume you will apply yourself - but please wait a few days after it
have hit dri-devel to let others have the possibility to give feedback.

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

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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
  2020-11-01  9:31   ` Paul Cercueil
@ 2020-11-01 12:29     ` Sam Ravnborg
  -1 siblings, 0 replies; 34+ messages in thread
From: Sam Ravnborg @ 2020-11-01 12:29 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Thierry Reding, Rob Herring, Christophe Branchereau, od,
	dri-devel, devicetree, linux-kernel

On Sun, Nov 01, 2020 at 09:31:48AM +0000, Paul Cercueil wrote:
> The Asia Better Technology (ABT) Y030XX067A panel is a 3.0" 320x480
> 24-bit IPS LCD panel. Its particularity is that it has non-square pixels
> (as it is 4:3 for a resolution of 320x480), and that it requires odd
> lines to be sent as RGB and even lines to be sent as GRB on its 8-bit
> bus.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  .../display/panel/abt,y030xx067a.yaml         | 54 +++++++++++++++++++
>  1 file changed, 54 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> new file mode 100644
> index 000000000000..6407e8bf45fa
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Asia Better Technology 3.0" (320x480 pixels) 24-bit IPS LCD panel
> +
> +description: |
> +  The panel must obey the rules for a SPI slave device as specified in
> +  spi/spi-controller.yaml
> +
> +maintainers:
> +  - Paul Cercueil <paul@crapouillou.net>
> +
> +allOf:
> +  - $ref: panel-common.yaml#
> +
> +properties:
> +  compatible:
> +    const: abt,y030xx067a
> +
> +  backlight: true
> +  port: true
> +  power-supply: true
> +  reg: true
> +  reset-gpios: true

The binding is missing:
required:
  - compatible
  - reg
  - power-supply
  - reset-gpios
  - ...

additionalProperties: false

So r-b only with these added.

	Sam

> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        panel@0 {
> +            compatible = "abt,y030xx067a";
> +            reg = <0>;
> +
> +            spi-max-frequency = <3125000>;
> +
> +            reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>;
> +
> +            backlight = <&backlight>;
> +            power-supply = <&vcc>;
> +
> +            port {
> +                panel_input: endpoint {
> +                    remote-endpoint = <&panel_output>;
> +                };
> +            };
> +        };
> +    };
> -- 
> 2.28.0

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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
@ 2020-11-01 12:29     ` Sam Ravnborg
  0 siblings, 0 replies; 34+ messages in thread
From: Sam Ravnborg @ 2020-11-01 12:29 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: devicetree, od, linux-kernel, dri-devel, Rob Herring,
	Thierry Reding, Christophe Branchereau

On Sun, Nov 01, 2020 at 09:31:48AM +0000, Paul Cercueil wrote:
> The Asia Better Technology (ABT) Y030XX067A panel is a 3.0" 320x480
> 24-bit IPS LCD panel. Its particularity is that it has non-square pixels
> (as it is 4:3 for a resolution of 320x480), and that it requires odd
> lines to be sent as RGB and even lines to be sent as GRB on its 8-bit
> bus.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  .../display/panel/abt,y030xx067a.yaml         | 54 +++++++++++++++++++
>  1 file changed, 54 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> new file mode 100644
> index 000000000000..6407e8bf45fa
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Asia Better Technology 3.0" (320x480 pixels) 24-bit IPS LCD panel
> +
> +description: |
> +  The panel must obey the rules for a SPI slave device as specified in
> +  spi/spi-controller.yaml
> +
> +maintainers:
> +  - Paul Cercueil <paul@crapouillou.net>
> +
> +allOf:
> +  - $ref: panel-common.yaml#
> +
> +properties:
> +  compatible:
> +    const: abt,y030xx067a
> +
> +  backlight: true
> +  port: true
> +  power-supply: true
> +  reg: true
> +  reset-gpios: true

The binding is missing:
required:
  - compatible
  - reg
  - power-supply
  - reset-gpios
  - ...

additionalProperties: false

So r-b only with these added.

	Sam

> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        panel@0 {
> +            compatible = "abt,y030xx067a";
> +            reg = <0>;
> +
> +            spi-max-frequency = <3125000>;
> +
> +            reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>;
> +
> +            backlight = <&backlight>;
> +            power-supply = <&vcc>;
> +
> +            port {
> +                panel_input: endpoint {
> +                    remote-endpoint = <&panel_output>;
> +                };
> +            };
> +        };
> +    };
> -- 
> 2.28.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel  bindings
  2020-11-01 12:29     ` Sam Ravnborg
@ 2020-11-02 10:19       ` Paul Cercueil
  -1 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-02 10:19 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Thierry Reding, Rob Herring, Christophe Branchereau, od,
	dri-devel, devicetree, linux-kernel



Le dim. 1 nov. 2020 à 13:29, Sam Ravnborg <sam@ravnborg.org> a écrit :
> On Sun, Nov 01, 2020 at 09:31:48AM +0000, Paul Cercueil wrote:
>>  The Asia Better Technology (ABT) Y030XX067A panel is a 3.0" 320x480
>>  24-bit IPS LCD panel. Its particularity is that it has non-square 
>> pixels
>>  (as it is 4:3 for a resolution of 320x480), and that it requires odd
>>  lines to be sent as RGB and even lines to be sent as GRB on its 
>> 8-bit
>>  bus.
>> 
>>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>>  ---
>>   .../display/panel/abt,y030xx067a.yaml         | 54 
>> +++++++++++++++++++
>>   1 file changed, 54 insertions(+)
>>   create mode 100644 
>> Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>> 
>>  diff --git 
>> a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml 
>> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  new file mode 100644
>>  index 000000000000..6407e8bf45fa
>>  --- /dev/null
>>  +++ 
>> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  @@ -0,0 +1,54 @@
>>  +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>>  +%YAML 1.2
>>  +---
>>  +$id: 
>> http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
>>  +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>  +
>>  +title: Asia Better Technology 3.0" (320x480 pixels) 24-bit IPS LCD 
>> panel
>>  +
>>  +description: |
>>  +  The panel must obey the rules for a SPI slave device as 
>> specified in
>>  +  spi/spi-controller.yaml
>>  +
>>  +maintainers:
>>  +  - Paul Cercueil <paul@crapouillou.net>
>>  +
>>  +allOf:
>>  +  - $ref: panel-common.yaml#
>>  +
>>  +properties:
>>  +  compatible:
>>  +    const: abt,y030xx067a
>>  +
>>  +  backlight: true
>>  +  port: true
>>  +  power-supply: true
>>  +  reg: true
>>  +  reset-gpios: true
> 
> The binding is missing:
> required:
>   - compatible
>   - reg
>   - power-supply
>   - reset-gpios
>   - ...
> 
> additionalProperties: false
> 
> So r-b only with these added.

Stupid mistake, sorry about that.

I'll V2.

-Paul

> 
> 	Sam
> 
>>  +
>>  +examples:
>>  +  - |
>>  +    #include <dt-bindings/gpio/gpio.h>
>>  +
>>  +    spi {
>>  +        #address-cells = <1>;
>>  +        #size-cells = <0>;
>>  +
>>  +        panel@0 {
>>  +            compatible = "abt,y030xx067a";
>>  +            reg = <0>;
>>  +
>>  +            spi-max-frequency = <3125000>;
>>  +
>>  +            reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>;
>>  +
>>  +            backlight = <&backlight>;
>>  +            power-supply = <&vcc>;
>>  +
>>  +            port {
>>  +                panel_input: endpoint {
>>  +                    remote-endpoint = <&panel_output>;
>>  +                };
>>  +            };
>>  +        };
>>  +    };
>>  --
>>  2.28.0



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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel  bindings
@ 2020-11-02 10:19       ` Paul Cercueil
  0 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-02 10:19 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: devicetree, od, linux-kernel, dri-devel, Rob Herring,
	Thierry Reding, Christophe Branchereau



Le dim. 1 nov. 2020 à 13:29, Sam Ravnborg <sam@ravnborg.org> a écrit :
> On Sun, Nov 01, 2020 at 09:31:48AM +0000, Paul Cercueil wrote:
>>  The Asia Better Technology (ABT) Y030XX067A panel is a 3.0" 320x480
>>  24-bit IPS LCD panel. Its particularity is that it has non-square 
>> pixels
>>  (as it is 4:3 for a resolution of 320x480), and that it requires odd
>>  lines to be sent as RGB and even lines to be sent as GRB on its 
>> 8-bit
>>  bus.
>> 
>>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>>  ---
>>   .../display/panel/abt,y030xx067a.yaml         | 54 
>> +++++++++++++++++++
>>   1 file changed, 54 insertions(+)
>>   create mode 100644 
>> Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>> 
>>  diff --git 
>> a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml 
>> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  new file mode 100644
>>  index 000000000000..6407e8bf45fa
>>  --- /dev/null
>>  +++ 
>> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  @@ -0,0 +1,54 @@
>>  +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>>  +%YAML 1.2
>>  +---
>>  +$id: 
>> http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
>>  +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>  +
>>  +title: Asia Better Technology 3.0" (320x480 pixels) 24-bit IPS LCD 
>> panel
>>  +
>>  +description: |
>>  +  The panel must obey the rules for a SPI slave device as 
>> specified in
>>  +  spi/spi-controller.yaml
>>  +
>>  +maintainers:
>>  +  - Paul Cercueil <paul@crapouillou.net>
>>  +
>>  +allOf:
>>  +  - $ref: panel-common.yaml#
>>  +
>>  +properties:
>>  +  compatible:
>>  +    const: abt,y030xx067a
>>  +
>>  +  backlight: true
>>  +  port: true
>>  +  power-supply: true
>>  +  reg: true
>>  +  reset-gpios: true
> 
> The binding is missing:
> required:
>   - compatible
>   - reg
>   - power-supply
>   - reset-gpios
>   - ...
> 
> additionalProperties: false
> 
> So r-b only with these added.

Stupid mistake, sorry about that.

I'll V2.

-Paul

> 
> 	Sam
> 
>>  +
>>  +examples:
>>  +  - |
>>  +    #include <dt-bindings/gpio/gpio.h>
>>  +
>>  +    spi {
>>  +        #address-cells = <1>;
>>  +        #size-cells = <0>;
>>  +
>>  +        panel@0 {
>>  +            compatible = "abt,y030xx067a";
>>  +            reg = <0>;
>>  +
>>  +            spi-max-frequency = <3125000>;
>>  +
>>  +            reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>;
>>  +
>>  +            backlight = <&backlight>;
>>  +            power-supply = <&vcc>;
>>  +
>>  +            port {
>>  +                panel_input: endpoint {
>>  +                    remote-endpoint = <&panel_output>;
>>  +                };
>>  +            };
>>  +        };
>>  +    };
>>  --
>>  2.28.0


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

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

* Re: [PATCH 1/4] dt-bindings: vendor-prefixes: Add abt vendor prefix
  2020-11-01  9:31   ` Paul Cercueil
@ 2020-11-04 22:32     ` Rob Herring
  -1 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-11-04 22:32 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: od, Christophe Branchereau, Rob Herring, Sam Ravnborg,
	devicetree, dri-devel, linux-kernel, Thierry Reding

On Sun, 01 Nov 2020 09:31:47 +0000, Paul Cercueil wrote:
> Add prefix for ShenZhen Asia Better Technology Ltd.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 

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

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

* Re: [PATCH 1/4] dt-bindings: vendor-prefixes: Add abt vendor prefix
@ 2020-11-04 22:32     ` Rob Herring
  0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-11-04 22:32 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: devicetree, Christophe Branchereau, linux-kernel, dri-devel,
	Rob Herring, od, Thierry Reding, Sam Ravnborg

On Sun, 01 Nov 2020 09:31:47 +0000, Paul Cercueil wrote:
> Add prefix for ShenZhen Asia Better Technology Ltd.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
>  1 file changed, 2 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] 34+ messages in thread

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
  2020-11-02 10:19       ` Paul Cercueil
@ 2020-11-30 14:32         ` Rob Herring
  -1 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-11-30 14:32 UTC (permalink / raw)
  To: Paul Cercueil, Sam Ravnborg
  Cc: Thierry Reding, Christophe Branchereau, od, dri-devel,
	devicetree, linux-kernel

On Mon, Nov 2, 2020 at 3:19 AM Paul Cercueil <paul@crapouillou.net> wrote:
>
>
>
> Le dim. 1 nov. 2020 à 13:29, Sam Ravnborg <sam@ravnborg.org> a écrit :
> > On Sun, Nov 01, 2020 at 09:31:48AM +0000, Paul Cercueil wrote:
> >>  The Asia Better Technology (ABT) Y030XX067A panel is a 3.0" 320x480
> >>  24-bit IPS LCD panel. Its particularity is that it has non-square
> >> pixels
> >>  (as it is 4:3 for a resolution of 320x480), and that it requires odd
> >>  lines to be sent as RGB and even lines to be sent as GRB on its
> >> 8-bit
> >>  bus.
> >>
> >>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> >>  ---
> >>   .../display/panel/abt,y030xx067a.yaml         | 54
> >> +++++++++++++++++++
> >>   1 file changed, 54 insertions(+)
> >>   create mode 100644
> >> Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>
> >>  diff --git
> >> a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>  new file mode 100644
> >>  index 000000000000..6407e8bf45fa
> >>  --- /dev/null
> >>  +++
> >> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>  @@ -0,0 +1,54 @@
> >>  +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> >>  +%YAML 1.2
> >>  +---
> >>  +$id:
> >> http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
> >>  +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>  +
> >>  +title: Asia Better Technology 3.0" (320x480 pixels) 24-bit IPS LCD
> >> panel
> >>  +
> >>  +description: |
> >>  +  The panel must obey the rules for a SPI slave device as
> >> specified in
> >>  +  spi/spi-controller.yaml
> >>  +
> >>  +maintainers:
> >>  +  - Paul Cercueil <paul@crapouillou.net>
> >>  +
> >>  +allOf:
> >>  +  - $ref: panel-common.yaml#
> >>  +
> >>  +properties:
> >>  +  compatible:
> >>  +    const: abt,y030xx067a
> >>  +
> >>  +  backlight: true
> >>  +  port: true
> >>  +  power-supply: true
> >>  +  reg: true
> >>  +  reset-gpios: true
> >
> > The binding is missing:
> > required:
> >   - compatible
> >   - reg
> >   - power-supply
> >   - reset-gpios
> >   - ...
> >
> > additionalProperties: false
> >
> > So r-b only with these added.
>
> Stupid mistake, sorry about that.
>
> I'll V2.

I don't have any V2 in my inbox, but looks like it is in linux-next now:

/builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.example.dt.yaml:
panel@0: 'spi-max-frequency' does not match any of the regexes:
'pinctrl-[0-9]+'
 From schema: /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml

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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
@ 2020-11-30 14:32         ` Rob Herring
  0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-11-30 14:32 UTC (permalink / raw)
  To: Paul Cercueil, Sam Ravnborg
  Cc: devicetree, od, linux-kernel, dri-devel, Thierry Reding,
	Christophe Branchereau

On Mon, Nov 2, 2020 at 3:19 AM Paul Cercueil <paul@crapouillou.net> wrote:
>
>
>
> Le dim. 1 nov. 2020 à 13:29, Sam Ravnborg <sam@ravnborg.org> a écrit :
> > On Sun, Nov 01, 2020 at 09:31:48AM +0000, Paul Cercueil wrote:
> >>  The Asia Better Technology (ABT) Y030XX067A panel is a 3.0" 320x480
> >>  24-bit IPS LCD panel. Its particularity is that it has non-square
> >> pixels
> >>  (as it is 4:3 for a resolution of 320x480), and that it requires odd
> >>  lines to be sent as RGB and even lines to be sent as GRB on its
> >> 8-bit
> >>  bus.
> >>
> >>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> >>  ---
> >>   .../display/panel/abt,y030xx067a.yaml         | 54
> >> +++++++++++++++++++
> >>   1 file changed, 54 insertions(+)
> >>   create mode 100644
> >> Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>
> >>  diff --git
> >> a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>  new file mode 100644
> >>  index 000000000000..6407e8bf45fa
> >>  --- /dev/null
> >>  +++
> >> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>  @@ -0,0 +1,54 @@
> >>  +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> >>  +%YAML 1.2
> >>  +---
> >>  +$id:
> >> http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
> >>  +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>  +
> >>  +title: Asia Better Technology 3.0" (320x480 pixels) 24-bit IPS LCD
> >> panel
> >>  +
> >>  +description: |
> >>  +  The panel must obey the rules for a SPI slave device as
> >> specified in
> >>  +  spi/spi-controller.yaml
> >>  +
> >>  +maintainers:
> >>  +  - Paul Cercueil <paul@crapouillou.net>
> >>  +
> >>  +allOf:
> >>  +  - $ref: panel-common.yaml#
> >>  +
> >>  +properties:
> >>  +  compatible:
> >>  +    const: abt,y030xx067a
> >>  +
> >>  +  backlight: true
> >>  +  port: true
> >>  +  power-supply: true
> >>  +  reg: true
> >>  +  reset-gpios: true
> >
> > The binding is missing:
> > required:
> >   - compatible
> >   - reg
> >   - power-supply
> >   - reset-gpios
> >   - ...
> >
> > additionalProperties: false
> >
> > So r-b only with these added.
>
> Stupid mistake, sorry about that.
>
> I'll V2.

I don't have any V2 in my inbox, but looks like it is in linux-next now:

/builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.example.dt.yaml:
panel@0: 'spi-max-frequency' does not match any of the regexes:
'pinctrl-[0-9]+'
 From schema: /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
  2020-11-30 14:32         ` Rob Herring
@ 2020-11-30 19:39           ` Paul Cercueil
  -1 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-30 19:39 UTC (permalink / raw)
  To: Rob Herring
  Cc: Sam Ravnborg, Thierry Reding, Christophe Branchereau, od,
	dri-devel, devicetree, linux-kernel

Hi Rob,

Le lun. 30 nov. 2020 à 7:32, Rob Herring <robh+dt@kernel.org> a écrit 
:
> On Mon, Nov 2, 2020 at 3:19 AM Paul Cercueil <paul@crapouillou.net> 
> wrote:
>> 
>> 
>> 
>>  Le dim. 1 nov. 2020 à 13:29, Sam Ravnborg <sam@ravnborg.org> a 
>> écrit :
>>  > On Sun, Nov 01, 2020 at 09:31:48AM +0000, Paul Cercueil wrote:
>>  >>  The Asia Better Technology (ABT) Y030XX067A panel is a 3.0" 
>> 320x480
>>  >>  24-bit IPS LCD panel. Its particularity is that it has 
>> non-square
>>  >> pixels
>>  >>  (as it is 4:3 for a resolution of 320x480), and that it 
>> requires odd
>>  >>  lines to be sent as RGB and even lines to be sent as GRB on its
>>  >> 8-bit
>>  >>  bus.
>>  >>
>>  >>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>>  >>  ---
>>  >>   .../display/panel/abt,y030xx067a.yaml         | 54
>>  >> +++++++++++++++++++
>>  >>   1 file changed, 54 insertions(+)
>>  >>   create mode 100644
>>  >> 
>> Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>
>>  >>  diff --git
>>  >> 
>> a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >> 
>> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>  new file mode 100644
>>  >>  index 000000000000..6407e8bf45fa
>>  >>  --- /dev/null
>>  >>  +++
>>  >> 
>> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>  @@ -0,0 +1,54 @@
>>  >>  +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>>  >>  +%YAML 1.2
>>  >>  +---
>>  >>  +$id:
>>  >> http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
>>  >>  +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>  >>  +
>>  >>  +title: Asia Better Technology 3.0" (320x480 pixels) 24-bit IPS 
>> LCD
>>  >> panel
>>  >>  +
>>  >>  +description: |
>>  >>  +  The panel must obey the rules for a SPI slave device as
>>  >> specified in
>>  >>  +  spi/spi-controller.yaml
>>  >>  +
>>  >>  +maintainers:
>>  >>  +  - Paul Cercueil <paul@crapouillou.net>
>>  >>  +
>>  >>  +allOf:
>>  >>  +  - $ref: panel-common.yaml#
>>  >>  +
>>  >>  +properties:
>>  >>  +  compatible:
>>  >>  +    const: abt,y030xx067a
>>  >>  +
>>  >>  +  backlight: true
>>  >>  +  port: true
>>  >>  +  power-supply: true
>>  >>  +  reg: true
>>  >>  +  reset-gpios: true
>>  >
>>  > The binding is missing:
>>  > required:
>>  >   - compatible
>>  >   - reg
>>  >   - power-supply
>>  >   - reset-gpios
>>  >   - ...
>>  >
>>  > additionalProperties: false
>>  >
>>  > So r-b only with these added.
>> 
>>  Stupid mistake, sorry about that.
>> 
>>  I'll V2.
> 
> I don't have any V2 in my inbox, but looks like it is in linux-next 
> now:

Yes, Sam told me on IRC I could fix it while applying and avoid the V2.

> /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.example.dt.yaml:
> panel@0: 'spi-max-frequency' does not match any of the regexes:
> 'pinctrl-[0-9]+'
>  From schema: 
> /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml

"make dt_binding_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml" 
doesn't complain here :(

-Paul



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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
@ 2020-11-30 19:39           ` Paul Cercueil
  0 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-30 19:39 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, od, Sam Ravnborg, linux-kernel, dri-devel,
	Thierry Reding, Christophe Branchereau

Hi Rob,

Le lun. 30 nov. 2020 à 7:32, Rob Herring <robh+dt@kernel.org> a écrit 
:
> On Mon, Nov 2, 2020 at 3:19 AM Paul Cercueil <paul@crapouillou.net> 
> wrote:
>> 
>> 
>> 
>>  Le dim. 1 nov. 2020 à 13:29, Sam Ravnborg <sam@ravnborg.org> a 
>> écrit :
>>  > On Sun, Nov 01, 2020 at 09:31:48AM +0000, Paul Cercueil wrote:
>>  >>  The Asia Better Technology (ABT) Y030XX067A panel is a 3.0" 
>> 320x480
>>  >>  24-bit IPS LCD panel. Its particularity is that it has 
>> non-square
>>  >> pixels
>>  >>  (as it is 4:3 for a resolution of 320x480), and that it 
>> requires odd
>>  >>  lines to be sent as RGB and even lines to be sent as GRB on its
>>  >> 8-bit
>>  >>  bus.
>>  >>
>>  >>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>>  >>  ---
>>  >>   .../display/panel/abt,y030xx067a.yaml         | 54
>>  >> +++++++++++++++++++
>>  >>   1 file changed, 54 insertions(+)
>>  >>   create mode 100644
>>  >> 
>> Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>
>>  >>  diff --git
>>  >> 
>> a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >> 
>> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>  new file mode 100644
>>  >>  index 000000000000..6407e8bf45fa
>>  >>  --- /dev/null
>>  >>  +++
>>  >> 
>> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>  @@ -0,0 +1,54 @@
>>  >>  +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>>  >>  +%YAML 1.2
>>  >>  +---
>>  >>  +$id:
>>  >> http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
>>  >>  +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>  >>  +
>>  >>  +title: Asia Better Technology 3.0" (320x480 pixels) 24-bit IPS 
>> LCD
>>  >> panel
>>  >>  +
>>  >>  +description: |
>>  >>  +  The panel must obey the rules for a SPI slave device as
>>  >> specified in
>>  >>  +  spi/spi-controller.yaml
>>  >>  +
>>  >>  +maintainers:
>>  >>  +  - Paul Cercueil <paul@crapouillou.net>
>>  >>  +
>>  >>  +allOf:
>>  >>  +  - $ref: panel-common.yaml#
>>  >>  +
>>  >>  +properties:
>>  >>  +  compatible:
>>  >>  +    const: abt,y030xx067a
>>  >>  +
>>  >>  +  backlight: true
>>  >>  +  port: true
>>  >>  +  power-supply: true
>>  >>  +  reg: true
>>  >>  +  reset-gpios: true
>>  >
>>  > The binding is missing:
>>  > required:
>>  >   - compatible
>>  >   - reg
>>  >   - power-supply
>>  >   - reset-gpios
>>  >   - ...
>>  >
>>  > additionalProperties: false
>>  >
>>  > So r-b only with these added.
>> 
>>  Stupid mistake, sorry about that.
>> 
>>  I'll V2.
> 
> I don't have any V2 in my inbox, but looks like it is in linux-next 
> now:

Yes, Sam told me on IRC I could fix it while applying and avoid the V2.

> /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.example.dt.yaml:
> panel@0: 'spi-max-frequency' does not match any of the regexes:
> 'pinctrl-[0-9]+'
>  From schema: 
> /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml

"make dt_binding_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml" 
doesn't complain here :(

-Paul


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

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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
  2020-11-30 19:39           ` Paul Cercueil
@ 2020-11-30 20:18             ` Rob Herring
  -1 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-11-30 20:18 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Sam Ravnborg, Thierry Reding, Christophe Branchereau, od,
	dri-devel, devicetree, linux-kernel

On Mon, Nov 30, 2020 at 12:39 PM Paul Cercueil <paul@crapouillou.net> wrote:
>
> Hi Rob,
>
> Le lun. 30 nov. 2020 à 7:32, Rob Herring <robh+dt@kernel.org> a écrit
> :
> > On Mon, Nov 2, 2020 at 3:19 AM Paul Cercueil <paul@crapouillou.net>
> > wrote:
> >>
> >>
> >>
> >>  Le dim. 1 nov. 2020 à 13:29, Sam Ravnborg <sam@ravnborg.org> a
> >> écrit :
> >>  > On Sun, Nov 01, 2020 at 09:31:48AM +0000, Paul Cercueil wrote:
> >>  >>  The Asia Better Technology (ABT) Y030XX067A panel is a 3.0"
> >> 320x480
> >>  >>  24-bit IPS LCD panel. Its particularity is that it has
> >> non-square
> >>  >> pixels
> >>  >>  (as it is 4:3 for a resolution of 320x480), and that it
> >> requires odd
> >>  >>  lines to be sent as RGB and even lines to be sent as GRB on its
> >>  >> 8-bit
> >>  >>  bus.
> >>  >>
> >>  >>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> >>  >>  ---
> >>  >>   .../display/panel/abt,y030xx067a.yaml         | 54
> >>  >> +++++++++++++++++++
> >>  >>   1 file changed, 54 insertions(+)
> >>  >>   create mode 100644
> >>  >>
> >> Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>  >>
> >>  >>  diff --git
> >>  >>
> >> a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>  >>
> >> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>  >>  new file mode 100644
> >>  >>  index 000000000000..6407e8bf45fa
> >>  >>  --- /dev/null
> >>  >>  +++
> >>  >>
> >> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>  >>  @@ -0,0 +1,54 @@
> >>  >>  +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> >>  >>  +%YAML 1.2
> >>  >>  +---
> >>  >>  +$id:
> >>  >> http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
> >>  >>  +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>  >>  +
> >>  >>  +title: Asia Better Technology 3.0" (320x480 pixels) 24-bit IPS
> >> LCD
> >>  >> panel
> >>  >>  +
> >>  >>  +description: |
> >>  >>  +  The panel must obey the rules for a SPI slave device as
> >>  >> specified in
> >>  >>  +  spi/spi-controller.yaml
> >>  >>  +
> >>  >>  +maintainers:
> >>  >>  +  - Paul Cercueil <paul@crapouillou.net>
> >>  >>  +
> >>  >>  +allOf:
> >>  >>  +  - $ref: panel-common.yaml#
> >>  >>  +
> >>  >>  +properties:
> >>  >>  +  compatible:
> >>  >>  +    const: abt,y030xx067a
> >>  >>  +
> >>  >>  +  backlight: true
> >>  >>  +  port: true
> >>  >>  +  power-supply: true
> >>  >>  +  reg: true
> >>  >>  +  reset-gpios: true
> >>  >
> >>  > The binding is missing:
> >>  > required:
> >>  >   - compatible
> >>  >   - reg
> >>  >   - power-supply
> >>  >   - reset-gpios
> >>  >   - ...
> >>  >
> >>  > additionalProperties: false
> >>  >
> >>  > So r-b only with these added.
> >>
> >>  Stupid mistake, sorry about that.
> >>
> >>  I'll V2.
> >
> > I don't have any V2 in my inbox, but looks like it is in linux-next
> > now:
>
> Yes, Sam told me on IRC I could fix it while applying and avoid the V2.
>
> > /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.example.dt.yaml:
> > panel@0: 'spi-max-frequency' does not match any of the regexes:
> > 'pinctrl-[0-9]+'
> >  From schema:
> > /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>
> "make dt_binding_check
> DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml"
> doesn't complain here :(

Even if you do 'touch
Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml'
or do a clean build?

I can't think of any kernel or dt-schema changes which would explain
the difference. This is purely related to 'additionalProperties:
false'.

Rob

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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
@ 2020-11-30 20:18             ` Rob Herring
  0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-11-30 20:18 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: devicetree, od, Sam Ravnborg, linux-kernel, dri-devel,
	Thierry Reding, Christophe Branchereau

On Mon, Nov 30, 2020 at 12:39 PM Paul Cercueil <paul@crapouillou.net> wrote:
>
> Hi Rob,
>
> Le lun. 30 nov. 2020 à 7:32, Rob Herring <robh+dt@kernel.org> a écrit
> :
> > On Mon, Nov 2, 2020 at 3:19 AM Paul Cercueil <paul@crapouillou.net>
> > wrote:
> >>
> >>
> >>
> >>  Le dim. 1 nov. 2020 à 13:29, Sam Ravnborg <sam@ravnborg.org> a
> >> écrit :
> >>  > On Sun, Nov 01, 2020 at 09:31:48AM +0000, Paul Cercueil wrote:
> >>  >>  The Asia Better Technology (ABT) Y030XX067A panel is a 3.0"
> >> 320x480
> >>  >>  24-bit IPS LCD panel. Its particularity is that it has
> >> non-square
> >>  >> pixels
> >>  >>  (as it is 4:3 for a resolution of 320x480), and that it
> >> requires odd
> >>  >>  lines to be sent as RGB and even lines to be sent as GRB on its
> >>  >> 8-bit
> >>  >>  bus.
> >>  >>
> >>  >>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> >>  >>  ---
> >>  >>   .../display/panel/abt,y030xx067a.yaml         | 54
> >>  >> +++++++++++++++++++
> >>  >>   1 file changed, 54 insertions(+)
> >>  >>   create mode 100644
> >>  >>
> >> Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>  >>
> >>  >>  diff --git
> >>  >>
> >> a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>  >>
> >> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>  >>  new file mode 100644
> >>  >>  index 000000000000..6407e8bf45fa
> >>  >>  --- /dev/null
> >>  >>  +++
> >>  >>
> >> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> >>  >>  @@ -0,0 +1,54 @@
> >>  >>  +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> >>  >>  +%YAML 1.2
> >>  >>  +---
> >>  >>  +$id:
> >>  >> http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
> >>  >>  +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>  >>  +
> >>  >>  +title: Asia Better Technology 3.0" (320x480 pixels) 24-bit IPS
> >> LCD
> >>  >> panel
> >>  >>  +
> >>  >>  +description: |
> >>  >>  +  The panel must obey the rules for a SPI slave device as
> >>  >> specified in
> >>  >>  +  spi/spi-controller.yaml
> >>  >>  +
> >>  >>  +maintainers:
> >>  >>  +  - Paul Cercueil <paul@crapouillou.net>
> >>  >>  +
> >>  >>  +allOf:
> >>  >>  +  - $ref: panel-common.yaml#
> >>  >>  +
> >>  >>  +properties:
> >>  >>  +  compatible:
> >>  >>  +    const: abt,y030xx067a
> >>  >>  +
> >>  >>  +  backlight: true
> >>  >>  +  port: true
> >>  >>  +  power-supply: true
> >>  >>  +  reg: true
> >>  >>  +  reset-gpios: true
> >>  >
> >>  > The binding is missing:
> >>  > required:
> >>  >   - compatible
> >>  >   - reg
> >>  >   - power-supply
> >>  >   - reset-gpios
> >>  >   - ...
> >>  >
> >>  > additionalProperties: false
> >>  >
> >>  > So r-b only with these added.
> >>
> >>  Stupid mistake, sorry about that.
> >>
> >>  I'll V2.
> >
> > I don't have any V2 in my inbox, but looks like it is in linux-next
> > now:
>
> Yes, Sam told me on IRC I could fix it while applying and avoid the V2.
>
> > /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.example.dt.yaml:
> > panel@0: 'spi-max-frequency' does not match any of the regexes:
> > 'pinctrl-[0-9]+'
> >  From schema:
> > /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>
> "make dt_binding_check
> DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml"
> doesn't complain here :(

Even if you do 'touch
Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml'
or do a clean build?

I can't think of any kernel or dt-schema changes which would explain
the difference. This is purely related to 'additionalProperties:
false'.

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

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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
  2020-11-30 20:18             ` Rob Herring
@ 2020-11-30 21:48               ` Paul Cercueil
  -1 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-30 21:48 UTC (permalink / raw)
  To: Rob Herring
  Cc: Sam Ravnborg, Thierry Reding, Christophe Branchereau, od,
	dri-devel, devicetree, linux-kernel



Le lun. 30 nov. 2020 à 13:18, Rob Herring <robh+dt@kernel.org> a 
écrit :
> On Mon, Nov 30, 2020 at 12:39 PM Paul Cercueil <paul@crapouillou.net> 
> wrote:
>> 
>>  Hi Rob,
>> 
>>  Le lun. 30 nov. 2020 à 7:32, Rob Herring <robh+dt@kernel.org> a 
>> écrit
>>  :
>>  > On Mon, Nov 2, 2020 at 3:19 AM Paul Cercueil 
>> <paul@crapouillou.net>
>>  > wrote:
>>  >>
>>  >>
>>  >>
>>  >>  Le dim. 1 nov. 2020 à 13:29, Sam Ravnborg <sam@ravnborg.org> a
>>  >> écrit :
>>  >>  > On Sun, Nov 01, 2020 at 09:31:48AM +0000, Paul Cercueil wrote:
>>  >>  >>  The Asia Better Technology (ABT) Y030XX067A panel is a 3.0"
>>  >> 320x480
>>  >>  >>  24-bit IPS LCD panel. Its particularity is that it has
>>  >> non-square
>>  >>  >> pixels
>>  >>  >>  (as it is 4:3 for a resolution of 320x480), and that it
>>  >> requires odd
>>  >>  >>  lines to be sent as RGB and even lines to be sent as GRB on 
>> its
>>  >>  >> 8-bit
>>  >>  >>  bus.
>>  >>  >>
>>  >>  >>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>>  >>  >>  ---
>>  >>  >>   .../display/panel/abt,y030xx067a.yaml         | 54
>>  >>  >> +++++++++++++++++++
>>  >>  >>   1 file changed, 54 insertions(+)
>>  >>  >>   create mode 100644
>>  >>  >>
>>  >> 
>> Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>  >>
>>  >>  >>  diff --git
>>  >>  >>
>>  >> 
>> a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>  >>
>>  >> 
>> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>  >>  new file mode 100644
>>  >>  >>  index 000000000000..6407e8bf45fa
>>  >>  >>  --- /dev/null
>>  >>  >>  +++
>>  >>  >>
>>  >> 
>> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>  >>  @@ -0,0 +1,54 @@
>>  >>  >>  +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>>  >>  >>  +%YAML 1.2
>>  >>  >>  +---
>>  >>  >>  +$id:
>>  >>  >> 
>> http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
>>  >>  >>  +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>  >>  >>  +
>>  >>  >>  +title: Asia Better Technology 3.0" (320x480 pixels) 24-bit 
>> IPS
>>  >> LCD
>>  >>  >> panel
>>  >>  >>  +
>>  >>  >>  +description: |
>>  >>  >>  +  The panel must obey the rules for a SPI slave device as
>>  >>  >> specified in
>>  >>  >>  +  spi/spi-controller.yaml
>>  >>  >>  +
>>  >>  >>  +maintainers:
>>  >>  >>  +  - Paul Cercueil <paul@crapouillou.net>
>>  >>  >>  +
>>  >>  >>  +allOf:
>>  >>  >>  +  - $ref: panel-common.yaml#
>>  >>  >>  +
>>  >>  >>  +properties:
>>  >>  >>  +  compatible:
>>  >>  >>  +    const: abt,y030xx067a
>>  >>  >>  +
>>  >>  >>  +  backlight: true
>>  >>  >>  +  port: true
>>  >>  >>  +  power-supply: true
>>  >>  >>  +  reg: true
>>  >>  >>  +  reset-gpios: true
>>  >>  >
>>  >>  > The binding is missing:
>>  >>  > required:
>>  >>  >   - compatible
>>  >>  >   - reg
>>  >>  >   - power-supply
>>  >>  >   - reset-gpios
>>  >>  >   - ...
>>  >>  >
>>  >>  > additionalProperties: false
>>  >>  >
>>  >>  > So r-b only with these added.
>>  >>
>>  >>  Stupid mistake, sorry about that.
>>  >>
>>  >>  I'll V2.
>>  >
>>  > I don't have any V2 in my inbox, but looks like it is in 
>> linux-next
>>  > now:
>> 
>>  Yes, Sam told me on IRC I could fix it while applying and avoid the 
>> V2.
>> 
>>  > 
>> /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.example.dt.yaml:
>>  > panel@0: 'spi-max-frequency' does not match any of the regexes:
>>  > 'pinctrl-[0-9]+'
>>  >  From schema:
>>  > 
>> /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>> 
>>  "make dt_binding_check
>>  
>> DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml"
>>  doesn't complain here :(
> 
> Even if you do 'touch
> Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml'
> or do a clean build?
> 
> I can't think of any kernel or dt-schema changes which would explain
> the difference. This is purely related to 'additionalProperties:
> false'.

Ok, I see it now.
Should I use 'unevaluatedProperties: false' instead?

-Paul



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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
@ 2020-11-30 21:48               ` Paul Cercueil
  0 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-11-30 21:48 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, od, Sam Ravnborg, linux-kernel, dri-devel,
	Thierry Reding, Christophe Branchereau



Le lun. 30 nov. 2020 à 13:18, Rob Herring <robh+dt@kernel.org> a 
écrit :
> On Mon, Nov 30, 2020 at 12:39 PM Paul Cercueil <paul@crapouillou.net> 
> wrote:
>> 
>>  Hi Rob,
>> 
>>  Le lun. 30 nov. 2020 à 7:32, Rob Herring <robh+dt@kernel.org> a 
>> écrit
>>  :
>>  > On Mon, Nov 2, 2020 at 3:19 AM Paul Cercueil 
>> <paul@crapouillou.net>
>>  > wrote:
>>  >>
>>  >>
>>  >>
>>  >>  Le dim. 1 nov. 2020 à 13:29, Sam Ravnborg <sam@ravnborg.org> a
>>  >> écrit :
>>  >>  > On Sun, Nov 01, 2020 at 09:31:48AM +0000, Paul Cercueil wrote:
>>  >>  >>  The Asia Better Technology (ABT) Y030XX067A panel is a 3.0"
>>  >> 320x480
>>  >>  >>  24-bit IPS LCD panel. Its particularity is that it has
>>  >> non-square
>>  >>  >> pixels
>>  >>  >>  (as it is 4:3 for a resolution of 320x480), and that it
>>  >> requires odd
>>  >>  >>  lines to be sent as RGB and even lines to be sent as GRB on 
>> its
>>  >>  >> 8-bit
>>  >>  >>  bus.
>>  >>  >>
>>  >>  >>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>>  >>  >>  ---
>>  >>  >>   .../display/panel/abt,y030xx067a.yaml         | 54
>>  >>  >> +++++++++++++++++++
>>  >>  >>   1 file changed, 54 insertions(+)
>>  >>  >>   create mode 100644
>>  >>  >>
>>  >> 
>> Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>  >>
>>  >>  >>  diff --git
>>  >>  >>
>>  >> 
>> a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>  >>
>>  >> 
>> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>  >>  new file mode 100644
>>  >>  >>  index 000000000000..6407e8bf45fa
>>  >>  >>  --- /dev/null
>>  >>  >>  +++
>>  >>  >>
>>  >> 
>> b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>>  >>  >>  @@ -0,0 +1,54 @@
>>  >>  >>  +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>>  >>  >>  +%YAML 1.2
>>  >>  >>  +---
>>  >>  >>  +$id:
>>  >>  >> 
>> http://devicetree.org/schemas/display/panel/abt,y030xx067a.yaml#
>>  >>  >>  +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>  >>  >>  +
>>  >>  >>  +title: Asia Better Technology 3.0" (320x480 pixels) 24-bit 
>> IPS
>>  >> LCD
>>  >>  >> panel
>>  >>  >>  +
>>  >>  >>  +description: |
>>  >>  >>  +  The panel must obey the rules for a SPI slave device as
>>  >>  >> specified in
>>  >>  >>  +  spi/spi-controller.yaml
>>  >>  >>  +
>>  >>  >>  +maintainers:
>>  >>  >>  +  - Paul Cercueil <paul@crapouillou.net>
>>  >>  >>  +
>>  >>  >>  +allOf:
>>  >>  >>  +  - $ref: panel-common.yaml#
>>  >>  >>  +
>>  >>  >>  +properties:
>>  >>  >>  +  compatible:
>>  >>  >>  +    const: abt,y030xx067a
>>  >>  >>  +
>>  >>  >>  +  backlight: true
>>  >>  >>  +  port: true
>>  >>  >>  +  power-supply: true
>>  >>  >>  +  reg: true
>>  >>  >>  +  reset-gpios: true
>>  >>  >
>>  >>  > The binding is missing:
>>  >>  > required:
>>  >>  >   - compatible
>>  >>  >   - reg
>>  >>  >   - power-supply
>>  >>  >   - reset-gpios
>>  >>  >   - ...
>>  >>  >
>>  >>  > additionalProperties: false
>>  >>  >
>>  >>  > So r-b only with these added.
>>  >>
>>  >>  Stupid mistake, sorry about that.
>>  >>
>>  >>  I'll V2.
>>  >
>>  > I don't have any V2 in my inbox, but looks like it is in 
>> linux-next
>>  > now:
>> 
>>  Yes, Sam told me on IRC I could fix it while applying and avoid the 
>> V2.
>> 
>>  > 
>> /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.example.dt.yaml:
>>  > panel@0: 'spi-max-frequency' does not match any of the regexes:
>>  > 'pinctrl-[0-9]+'
>>  >  From schema:
>>  > 
>> /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
>> 
>>  "make dt_binding_check
>>  
>> DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml"
>>  doesn't complain here :(
> 
> Even if you do 'touch
> Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml'
> or do a clean build?
> 
> I can't think of any kernel or dt-schema changes which would explain
> the difference. This is purely related to 'additionalProperties:
> false'.

Ok, I see it now.
Should I use 'unevaluatedProperties: false' instead?

-Paul


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

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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
  2020-11-30 21:48               ` Paul Cercueil
@ 2020-12-05 19:55                 ` Sam Ravnborg
  -1 siblings, 0 replies; 34+ messages in thread
From: Sam Ravnborg @ 2020-12-05 19:55 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Rob Herring, devicetree, od, linux-kernel, dri-devel,
	Thierry Reding, Christophe Branchereau

Hi Paul

> > >  >>  >>  +
> > >  >>  >>  +maintainers:
> > >  >>  >>  +  - Paul Cercueil <paul@crapouillou.net>
> > >  >>  >>  +
> > >  >>  >>  +allOf:
> > >  >>  >>  +  - $ref: panel-common.yaml#
> > >  >>  >>  +
> > >  >>  >>  +properties:
> > >  >>  >>  +  compatible:
> > >  >>  >>  +    const: abt,y030xx067a
> > >  >>  >>  +
> > >  >>  >>  +  backlight: true
> > >  >>  >>  +  port: true
> > >  >>  >>  +  power-supply: true
> > >  >>  >>  +  reg: true
> > >  >>  >>  +  reset-gpios: true
> > >  >>  >
> > >  >>  > The binding is missing:
> > >  >>  > required:
> > >  >>  >   - compatible
> > >  >>  >   - reg
> > >  >>  >   - power-supply
> > >  >>  >   - reset-gpios
> > >  >>  >   - ...
> > >  >>  >
> > >  >>  > additionalProperties: false
> > >  >>  >
> > >  >>  > So r-b only with these added.
> > >  >>
> > >  >>  Stupid mistake, sorry about that.
> > >  >>
> > >  >>  I'll V2.
> > >  >
> > >  > I don't have any V2 in my inbox, but looks like it is in
> > > linux-next
> > >  > now:
> > > 
> > >  Yes, Sam told me on IRC I could fix it while applying and avoid the
> > > V2.
> > > 
> > >  > /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.example.dt.yaml:
> > >  > panel@0: 'spi-max-frequency' does not match any of the regexes:
> > >  > 'pinctrl-[0-9]+'
> > >  >  From schema:
> > >  > /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> > > 
> > >  "make dt_binding_check
> > > DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml"
> > >  doesn't complain here :(
> > 
> > Even if you do 'touch
> > Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml'
> > or do a clean build?
> > 
> > I can't think of any kernel or dt-schema changes which would explain
> > the difference. This is purely related to 'additionalProperties:
> > false'.
> 
> Ok, I see it now.
> Should I use 'unevaluatedProperties: false' instead?

Yes, the issue here is that you add a number of spi properties to the
binding. And you cannot or at least shall not, list them all in this
binding.
So when evaluating the binding the spi-max-frequency should be allowed,
and when a full DT file is checked the tools will catch it there is a
binding that is not known - as you tell it with "unevaluatedProperties:
false" that all prperties must be known.

	Sam

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

* Re: [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings
@ 2020-12-05 19:55                 ` Sam Ravnborg
  0 siblings, 0 replies; 34+ messages in thread
From: Sam Ravnborg @ 2020-12-05 19:55 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: devicetree, od, linux-kernel, Rob Herring, Thierry Reding,
	dri-devel, Christophe Branchereau

Hi Paul

> > >  >>  >>  +
> > >  >>  >>  +maintainers:
> > >  >>  >>  +  - Paul Cercueil <paul@crapouillou.net>
> > >  >>  >>  +
> > >  >>  >>  +allOf:
> > >  >>  >>  +  - $ref: panel-common.yaml#
> > >  >>  >>  +
> > >  >>  >>  +properties:
> > >  >>  >>  +  compatible:
> > >  >>  >>  +    const: abt,y030xx067a
> > >  >>  >>  +
> > >  >>  >>  +  backlight: true
> > >  >>  >>  +  port: true
> > >  >>  >>  +  power-supply: true
> > >  >>  >>  +  reg: true
> > >  >>  >>  +  reset-gpios: true
> > >  >>  >
> > >  >>  > The binding is missing:
> > >  >>  > required:
> > >  >>  >   - compatible
> > >  >>  >   - reg
> > >  >>  >   - power-supply
> > >  >>  >   - reset-gpios
> > >  >>  >   - ...
> > >  >>  >
> > >  >>  > additionalProperties: false
> > >  >>  >
> > >  >>  > So r-b only with these added.
> > >  >>
> > >  >>  Stupid mistake, sorry about that.
> > >  >>
> > >  >>  I'll V2.
> > >  >
> > >  > I don't have any V2 in my inbox, but looks like it is in
> > > linux-next
> > >  > now:
> > > 
> > >  Yes, Sam told me on IRC I could fix it while applying and avoid the
> > > V2.
> > > 
> > >  > /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.example.dt.yaml:
> > >  > panel@0: 'spi-max-frequency' does not match any of the regexes:
> > >  > 'pinctrl-[0-9]+'
> > >  >  From schema:
> > >  > /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
> > > 
> > >  "make dt_binding_check
> > > DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml"
> > >  doesn't complain here :(
> > 
> > Even if you do 'touch
> > Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml'
> > or do a clean build?
> > 
> > I can't think of any kernel or dt-schema changes which would explain
> > the difference. This is purely related to 'additionalProperties:
> > false'.
> 
> Ok, I see it now.
> Should I use 'unevaluatedProperties: false' instead?

Yes, the issue here is that you add a number of spi properties to the
binding. And you cannot or at least shall not, list them all in this
binding.
So when evaluating the binding the spi-max-frequency should be allowed,
and when a full DT file is checked the tools will catch it there is a
binding that is not known - as you tell it with "unevaluatedProperties:
false" that all prperties must be known.

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

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

* [PATCH] dt-bindings/display: abt,y030xx067a: Fix binding
  2020-11-01  9:31 ` Paul Cercueil
@ 2020-12-17  0:59   ` Paul Cercueil
  -1 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-12-17  0:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: Sam Ravnborg, od, dri-devel, devicetree, linux-kernel, Paul Cercueil

The binding should use "unevaluatedProperties" instead of
"additionalProperties", since it is a SPI device and may have
SPI-related Device Tree properties, for instance the "spi-max-frequency"
property that is present in the example.

Fixes: e366a644c69d ("dt-bindings: display: Add ABT Y030XX067A panel bindings")
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 .../devicetree/bindings/display/panel/abt,y030xx067a.yaml       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
index 91cb4c3e0198..a108029ecfab 100644
--- a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
+++ b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
@@ -32,7 +32,7 @@ required:
   - power-supply
   - reset-gpios
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.29.2


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

* [PATCH] dt-bindings/display: abt,y030xx067a: Fix binding
@ 2020-12-17  0:59   ` Paul Cercueil
  0 siblings, 0 replies; 34+ messages in thread
From: Paul Cercueil @ 2020-12-17  0:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, linux-kernel, dri-devel, Paul Cercueil, od, Sam Ravnborg

The binding should use "unevaluatedProperties" instead of
"additionalProperties", since it is a SPI device and may have
SPI-related Device Tree properties, for instance the "spi-max-frequency"
property that is present in the example.

Fixes: e366a644c69d ("dt-bindings: display: Add ABT Y030XX067A panel bindings")
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 .../devicetree/bindings/display/panel/abt,y030xx067a.yaml       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
index 91cb4c3e0198..a108029ecfab 100644
--- a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
+++ b/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml
@@ -32,7 +32,7 @@ required:
   - power-supply
   - reset-gpios
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.29.2

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

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

* Re: [PATCH] dt-bindings/display: abt,y030xx067a: Fix binding
  2020-12-17  0:59   ` Paul Cercueil
@ 2020-12-17  6:03     ` Sam Ravnborg
  -1 siblings, 0 replies; 34+ messages in thread
From: Sam Ravnborg @ 2020-12-17  6:03 UTC (permalink / raw)
  To: Paul Cercueil; +Cc: Rob Herring, od, dri-devel, devicetree, linux-kernel

On Thu, Dec 17, 2020 at 12:59:45AM +0000, Paul Cercueil wrote:
> The binding should use "unevaluatedProperties" instead of
> "additionalProperties", since it is a SPI device and may have
> SPI-related Device Tree properties, for instance the "spi-max-frequency"
> property that is present in the example.
> 
> Fixes: e366a644c69d ("dt-bindings: display: Add ABT Y030XX067A panel bindings")
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

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

* Re: [PATCH] dt-bindings/display: abt,y030xx067a: Fix binding
@ 2020-12-17  6:03     ` Sam Ravnborg
  0 siblings, 0 replies; 34+ messages in thread
From: Sam Ravnborg @ 2020-12-17  6:03 UTC (permalink / raw)
  To: Paul Cercueil; +Cc: devicetree, Rob Herring, od, linux-kernel, dri-devel

On Thu, Dec 17, 2020 at 12:59:45AM +0000, Paul Cercueil wrote:
> The binding should use "unevaluatedProperties" instead of
> "additionalProperties", since it is a SPI device and may have
> SPI-related Device Tree properties, for instance the "spi-max-frequency"
> property that is present in the example.
> 
> Fixes: e366a644c69d ("dt-bindings: display: Add ABT Y030XX067A panel bindings")
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] dt-bindings/display: abt,y030xx067a: Fix binding
  2020-12-17  0:59   ` Paul Cercueil
@ 2020-12-18 21:17     ` Rob Herring
  -1 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-12-18 21:17 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: dri-devel, Rob Herring, devicetree, linux-kernel, od, Sam Ravnborg

On Thu, 17 Dec 2020 00:59:45 +0000, Paul Cercueil wrote:
> The binding should use "unevaluatedProperties" instead of
> "additionalProperties", since it is a SPI device and may have
> SPI-related Device Tree properties, for instance the "spi-max-frequency"
> property that is present in the example.
> 
> Fixes: e366a644c69d ("dt-bindings: display: Add ABT Y030XX067A panel bindings")
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  .../devicetree/bindings/display/panel/abt,y030xx067a.yaml       | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied, thanks!

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

* Re: [PATCH] dt-bindings/display: abt,y030xx067a: Fix binding
@ 2020-12-18 21:17     ` Rob Herring
  0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-12-18 21:17 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: devicetree, od, linux-kernel, dri-devel, Rob Herring, Sam Ravnborg

On Thu, 17 Dec 2020 00:59:45 +0000, Paul Cercueil wrote:
> The binding should use "unevaluatedProperties" instead of
> "additionalProperties", since it is a SPI device and may have
> SPI-related Device Tree properties, for instance the "spi-max-frequency"
> property that is present in the example.
> 
> Fixes: e366a644c69d ("dt-bindings: display: Add ABT Y030XX067A panel bindings")
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  .../devicetree/bindings/display/panel/abt,y030xx067a.yaml       | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

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

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

end of thread, other threads:[~2020-12-18 21:19 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-01  9:31 [PATCH 0/3] drm/panel: ABT Y030XX067A panel support Paul Cercueil
2020-11-01  9:31 ` Paul Cercueil
2020-11-01  9:31 ` [PATCH 1/4] dt-bindings: vendor-prefixes: Add abt vendor prefix Paul Cercueil
2020-11-01  9:31   ` Paul Cercueil
2020-11-04 22:32   ` Rob Herring
2020-11-04 22:32     ` Rob Herring
2020-11-01  9:31 ` [PATCH 2/4] dt-bindings: display: Add ABT Y030XX067A panel bindings Paul Cercueil
2020-11-01  9:31   ` Paul Cercueil
2020-11-01 12:29   ` Sam Ravnborg
2020-11-01 12:29     ` Sam Ravnborg
2020-11-02 10:19     ` Paul Cercueil
2020-11-02 10:19       ` Paul Cercueil
2020-11-30 14:32       ` Rob Herring
2020-11-30 14:32         ` Rob Herring
2020-11-30 19:39         ` Paul Cercueil
2020-11-30 19:39           ` Paul Cercueil
2020-11-30 20:18           ` Rob Herring
2020-11-30 20:18             ` Rob Herring
2020-11-30 21:48             ` Paul Cercueil
2020-11-30 21:48               ` Paul Cercueil
2020-12-05 19:55               ` Sam Ravnborg
2020-12-05 19:55                 ` Sam Ravnborg
2020-11-01  9:31 ` [PATCH 3/4] media: uapi: Add MEDIA_BUS_FMT_RGB888_3X8_DELTA media bus format Paul Cercueil
2020-11-01  9:31   ` Paul Cercueil
2020-11-01  9:31 ` [PATCH 4/4] drm/panel: Add ABT Y030XX067A 3.0" 320x480 panel Paul Cercueil
2020-11-01  9:31   ` Paul Cercueil
2020-11-01 12:26 ` [PATCH 0/3] drm/panel: ABT Y030XX067A panel support Sam Ravnborg
2020-11-01 12:26   ` Sam Ravnborg
2020-12-17  0:59 ` [PATCH] dt-bindings/display: abt,y030xx067a: Fix binding Paul Cercueil
2020-12-17  0:59   ` Paul Cercueil
2020-12-17  6:03   ` Sam Ravnborg
2020-12-17  6:03     ` Sam Ravnborg
2020-12-18 21:17   ` Rob Herring
2020-12-18 21:17     ` Rob Herring

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.