2024-01-27 15:29:12

by Dario Binacchi

[permalink] [raw]
Subject: [PATCH v10 0/5] Add display support for stm32f769-disco board

The series adds display support for the stm32f769-disco board. It has been
tested on hardware revisions MB1225-B03 and MB1166-A09. This required
modifications to the nt35510 driver that have already been applied.

Changes in v10:
- Drop backlight. From a closer analysis of the schematics
en.MB1225-F769I-B01_Schematic.pdf and en.mb1166-default-a09-schematic.pdf,
it is noticed that the GPIO I14 is connected to an unmounted
resistor (n/a), making the backlight functionality via GPIO unusable.
- Drop backlight references

Changes in v9:
- Drop 'interrupts' property to fix yaml checks
- Rename vcc_3v3 to to vcc-3v3
- Rename panel-dsi@0 to panel@0 to fix yaml warnings
- Change commit message
- Rename stm32f769-disco-mb1225-revb03-mb1166-reva09 to
stm32f769-disco-mb1166-reva09

Changes in v8:
- Add Acked-by tag of Lee Jones
- Add Reviewed-by tag of Raphael Gallais-Pou
- Add Reviewed-by tag of Raphael Gallais-Pou
- Remove unit name from 'ltdc/port/endpoint@0' to fix the compiling
warning:
../arch/arm/boot/dts/st/stm32f769-disco.dts:189.28-191.5: Warning
(unit_address_vs_reg): /soc/display-controller@40016800/port/endpoint@0: node
has a unit name, but no reg or ranges property
- Add Reviewed-by tag of Linus Walleij
- Add Reviewed-by tag of Raphael Gallais-Pou

Changes in v7:
- Replace .dts with .dtb in the Makefile

Changes in v6:
- Drop patches
- [5/8] dt-bindings: nt35510: add compatible for FRIDA FRD400B25025-A-CTK
- [7/8] drm/panel: nt35510: move hardwired parameters to configuration
- [8/8] drm/panel: nt35510: support FRIDA FRD400B25025-A-CTK
because applied by the maintainer Linus Walleij

Changes in v5:
- Replace GPIOD_ASIS with GPIOD_OUT_HIGH in the call to devm_gpiod_get_optional().

Changes in v2:
- Add Acked-by tag of Conor Dooley
- Change the status of panel_backlight node to "disabled"
- Delete backlight property from panel0 node.
- Re-write the patch [8/8] "drm/panel: nt35510: support FRIDA FRD400B25025-A-CTK"
in the same style as the original driver.

Dario Binacchi (5):
dt-bindings: mfd: stm32f7: Add binding definition for DSI
ARM: dts: stm32: add DSI support on stm32f769
ARM: dts: stm32: rename mmc_vcard to vcc-3v3 on stm32f769-disco
ARM: dts: stm32: add display support on stm32f769-disco
ARM: dts: add stm32f769-disco-mb1166-reva09

arch/arm/boot/dts/st/Makefile | 1 +
.../dts/st/stm32f769-disco-mb1166-reva09.dts | 13 ++++
arch/arm/boot/dts/st/stm32f769-disco.dts | 70 +++++++++++++++++--
arch/arm/boot/dts/st/stm32f769.dtsi | 20 ++++++
include/dt-bindings/mfd/stm32f7-rcc.h | 1 +
5 files changed, 101 insertions(+), 4 deletions(-)
create mode 100644 arch/arm/boot/dts/st/stm32f769-disco-mb1166-reva09.dts
create mode 100644 arch/arm/boot/dts/st/stm32f769.dtsi

--
2.43.0



2024-01-27 15:29:20

by Dario Binacchi

[permalink] [raw]
Subject: [PATCH v10 1/5] dt-bindings: mfd: stm32f7: Add binding definition for DSI

Add binding definition for MIPI DSI Host controller.

Signed-off-by: Dario Binacchi <[email protected]>
Acked-by: Conor Dooley <[email protected]>
Acked-by: Lee Jones <[email protected]>
Reviewed-by: Raphael Gallais-Pou <[email protected]>

---

(no changes since v8)

Changes in v8:
- Add Acked-by tag of Lee Jones
- Add Reviewed-by tag of Raphael Gallais-Pou

Changes in v2:
- Add Acked-by tag of Conor Dooley

include/dt-bindings/mfd/stm32f7-rcc.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/include/dt-bindings/mfd/stm32f7-rcc.h b/include/dt-bindings/mfd/stm32f7-rcc.h
index 8d73a9c51e2b..a4e4f9271395 100644
--- a/include/dt-bindings/mfd/stm32f7-rcc.h
+++ b/include/dt-bindings/mfd/stm32f7-rcc.h
@@ -108,6 +108,7 @@
#define STM32F7_RCC_APB2_SAI1 22
#define STM32F7_RCC_APB2_SAI2 23
#define STM32F7_RCC_APB2_LTDC 26
+#define STM32F7_RCC_APB2_DSI 27

#define STM32F7_APB2_RESET(bit) (STM32F7_RCC_APB2_##bit + (0x24 * 8))
#define STM32F7_APB2_CLOCK(bit) (STM32F7_RCC_APB2_##bit + 0xA0)
--
2.43.0


2024-01-27 15:29:33

by Dario Binacchi

[permalink] [raw]
Subject: [PATCH v10 2/5] ARM: dts: stm32: add DSI support on stm32f769

Add support for MIPI DSI Host controller. Since MIPI DSI is not
available on stm32f746, the patch adds the "stm32f769.dtsi" file
containing the dsi node inside.

Signed-off-by: Dario Binacchi <[email protected]>

---

(no changes since v9)

Changes in v9:
- Drop 'interrupts' property to fix yaml checks

arch/arm/boot/dts/st/stm32f769.dtsi | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 arch/arm/boot/dts/st/stm32f769.dtsi

diff --git a/arch/arm/boot/dts/st/stm32f769.dtsi b/arch/arm/boot/dts/st/stm32f769.dtsi
new file mode 100644
index 000000000000..4e7d9032149c
--- /dev/null
+++ b/arch/arm/boot/dts/st/stm32f769.dtsi
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2023 Dario Binacchi <[email protected]>
+ */
+
+#include "stm32f746.dtsi"
+
+/ {
+ soc {
+ dsi: dsi@40016c00 {
+ compatible = "st,stm32-dsi";
+ reg = <0x40016c00 0x800>;
+ clocks = <&rcc 1 CLK_F769_DSI>, <&clk_hse>;
+ clock-names = "pclk", "ref";
+ resets = <&rcc STM32F7_APB2_RESET(DSI)>;
+ reset-names = "apb";
+ status = "disabled";
+ };
+ };
+};
--
2.43.0


2024-01-27 15:29:46

by Dario Binacchi

[permalink] [raw]
Subject: [PATCH v10 3/5] ARM: dts: stm32: rename mmc_vcard to vcc-3v3 on stm32f769-disco

In the schematics of document UM2033, the power supply for the micro SD
card is the same 3v3 voltage that is used to power other devices on the
board. By generalizing the name of the voltage regulator, it can be
referenced by other nodes in the device tree without creating
misunderstandings.

This patch is preparatory for future developments.

Signed-off-by: Dario Binacchi <[email protected]>
Reviewed-by: Raphael Gallais-Pou <[email protected]>

---

(no changes since v9)

Changes in v9:
- Rename vcc_3v3 to to vcc-3v3

Changes in v8:
- Add Reviewed-by tag of Raphael Gallais-Pou

arch/arm/boot/dts/st/stm32f769-disco.dts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/st/stm32f769-disco.dts b/arch/arm/boot/dts/st/stm32f769-disco.dts
index 5d12ae25b327..660f85984164 100644
--- a/arch/arm/boot/dts/st/stm32f769-disco.dts
+++ b/arch/arm/boot/dts/st/stm32f769-disco.dts
@@ -92,9 +92,9 @@ usbotg_hs_phy: usb-phy {
clock-names = "main_clk";
};

- mmc_vcard: mmc_vcard {
+ vcc_3v3: vcc-3v3 {
compatible = "regulator-fixed";
- regulator-name = "mmc_vcard";
+ regulator-name = "vcc_3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
@@ -128,7 +128,7 @@ &rtc {

&sdio2 {
status = "okay";
- vmmc-supply = <&mmc_vcard>;
+ vmmc-supply = <&vcc_3v3>;
cd-gpios = <&gpioi 15 GPIO_ACTIVE_LOW>;
broken-cd;
pinctrl-names = "default", "opendrain", "sleep";
--
2.43.0


2024-01-27 15:30:08

by Dario Binacchi

[permalink] [raw]
Subject: [PATCH v10 4/5] ARM: dts: stm32: add display support on stm32f769-disco

The patch adds display support on the stm32f769-disco board.

Signed-off-by: Dario Binacchi <[email protected]>

---

Changes in v10:
- Drop backlight. From a closer analysis of the schematics
en.MB1225-F769I-B01_Schematic.pdf and en.mb1166-default-a09-schematic.pdf,
it is noticed that the GPIO I14 is connected to an unmounted
resistor (n/a), making the backlight functionality via GPIO unusable.

Changes in v9:
- Rename panel-dsi@0 to panel@0 to fix yaml warnings

Changes in v8:
- Remove unit name from 'ltdc/port/endpoint@0' to fix the compiling
warning:
../arch/arm/boot/dts/st/stm32f769-disco.dts:189.28-191.5: Warning
(unit_address_vs_reg): /soc/display-controller@40016800/port/endpoint@0: node
has a unit name, but no reg or ranges property

arch/arm/boot/dts/st/stm32f769-disco.dts | 64 +++++++++++++++++++++++-
1 file changed, 63 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/st/stm32f769-disco.dts b/arch/arm/boot/dts/st/stm32f769-disco.dts
index 660f85984164..52c5baf58ab9 100644
--- a/arch/arm/boot/dts/st/stm32f769-disco.dts
+++ b/arch/arm/boot/dts/st/stm32f769-disco.dts
@@ -41,7 +41,7 @@
*/

/dts-v1/;
-#include "stm32f746.dtsi"
+#include "stm32f769.dtsi"
#include "stm32f769-pinctrl.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
@@ -60,6 +60,19 @@ memory@c0000000 {
reg = <0xC0000000 0x1000000>;
};

+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ linux,dma {
+ compatible = "shared-dma-pool";
+ linux,dma-default;
+ no-map;
+ size = <0x100000>;
+ };
+ };
+
aliases {
serial0 = &usart1;
};
@@ -114,6 +127,45 @@ &clk_hse {
clock-frequency = <25000000>;
};

+&dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dsi_in: endpoint {
+ remote-endpoint = <&ltdc_out_dsi>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dsi_out: endpoint {
+ remote-endpoint = <&dsi_panel_in>;
+ };
+ };
+ };
+
+ panel0: panel@0 {
+ compatible = "orisetech,otm8009a";
+ reg = <0>; /* dsi virtual channel (0..3) */
+ reset-gpios = <&gpioj 15 GPIO_ACTIVE_LOW>;
+ power-supply = <&vcc_3v3>;
+ status = "okay";
+
+ port {
+ dsi_panel_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+ };
+};
+
&i2c1 {
pinctrl-0 = <&i2c1_pins_b>;
pinctrl-names = "default";
@@ -122,6 +174,16 @@ &i2c1 {
status = "okay";
};

+&ltdc {
+ status = "okay";
+
+ port {
+ ltdc_out_dsi: endpoint {
+ remote-endpoint = <&dsi_in>;
+ };
+ };
+};
+
&rtc {
status = "okay";
};
--
2.43.0


2024-01-27 15:30:14

by Dario Binacchi

[permalink] [raw]
Subject: [PATCH v10 5/5] ARM: dts: add stm32f769-disco-mb1166-reva09

As reported in the section 8.3 (i. e. Board revision history) of document
UM2033 (i. e. Discovery kit with STM32F769NI MCU) these are the changes
related to the board revision addressed by the patch:
- Board MB1166 revision A-09:
- LCD FRIDA FRD397B25009-D-CTK replaced by FRIDA FRD400B25025-A-CTK

The patch adds the DTS support for the new display which belongs to the
the Novatek NT35510-based panel family.

Signed-off-by: Dario Binacchi <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Reviewed-by: Raphael Gallais-Pou <[email protected]>

---

Changes in v10:
- Drop backlight references

Changes in v9:
- Change commit message
- Rename stm32f769-disco-mb1225-revb03-mb1166-reva09 to
stm32f769-disco-mb1166-reva09

Changes in v8:
- Add Reviewed-by tag of Linus Walleij
- Add Reviewed-by tag of Raphael Gallais-Pou

Changes in v7:
- Replace .dts with .dtb in the Makefile

Changes in v6:
- Drop patches
- [5/8] dt-bindings: nt35510: add compatible for FRIDA FRD400B25025-A-CTK
- [7/8] drm/panel: nt35510: move hardwired parameters to configuration
- [8/8] drm/panel: nt35510: support FRIDA FRD400B25025-A-CTK
because applied by the maintainer Linus Walleij

Changes in v5:
- Replace GPIOD_ASIS with GPIOD_OUT_HIGH in the call to devm_gpiod_get_optional().

Changes in v2:
- Change the status of panel_backlight node to "disabled"
- Delete backlight property from panel0 node.
- Re-write the patch [8/8] "drm/panel: nt35510: support FRIDA FRD400B25025-A-CTK"
in the same style as the original driver.

arch/arm/boot/dts/st/Makefile | 1 +
.../boot/dts/st/stm32f769-disco-mb1166-reva09.dts | 13 +++++++++++++
2 files changed, 14 insertions(+)
create mode 100644 arch/arm/boot/dts/st/stm32f769-disco-mb1166-reva09.dts

diff --git a/arch/arm/boot/dts/st/Makefile b/arch/arm/boot/dts/st/Makefile
index 7892ad69b441..9fedd6776208 100644
--- a/arch/arm/boot/dts/st/Makefile
+++ b/arch/arm/boot/dts/st/Makefile
@@ -23,6 +23,7 @@ dtb-$(CONFIG_ARCH_STM32) += \
stm32f469-disco.dtb \
stm32f746-disco.dtb \
stm32f769-disco.dtb \
+ stm32f769-disco-mb1166-reva09.dtb \
stm32429i-eval.dtb \
stm32746g-eval.dtb \
stm32h743i-eval.dtb \
diff --git a/arch/arm/boot/dts/st/stm32f769-disco-mb1166-reva09.dts b/arch/arm/boot/dts/st/stm32f769-disco-mb1166-reva09.dts
new file mode 100644
index 000000000000..ff7ff32371d0
--- /dev/null
+++ b/arch/arm/boot/dts/st/stm32f769-disco-mb1166-reva09.dts
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2023 Dario Binacchi <[email protected]>
+ */
+
+#include "stm32f769-disco.dts"
+
+&panel0 {
+ compatible = "frida,frd400b25025", "novatek,nt35510";
+ vddi-supply = <&vcc_3v3>;
+ vdd-supply = <&vcc_3v3>;
+ /delete-property/power-supply;
+};
--
2.43.0


2024-02-29 09:07:27

by Alexandre TORGUE

[permalink] [raw]
Subject: Re: [PATCH v10 0/5] Add display support for stm32f769-disco board

Hi Dario

On 1/27/24 16:28, Dario Binacchi wrote:
> The series adds display support for the stm32f769-disco board. It has been
> tested on hardware revisions MB1225-B03 and MB1166-A09. This required
> modifications to the nt35510 driver that have already been applied.
>
> Changes in v10:
> - Drop backlight. From a closer analysis of the schematics
> en.MB1225-F769I-B01_Schematic.pdf and en.mb1166-default-a09-schematic.pdf,
> it is noticed that the GPIO I14 is connected to an unmounted
> resistor (n/a), making the backlight functionality via GPIO unusable.
> - Drop backlight references
>
> Changes in v9:
> - Drop 'interrupts' property to fix yaml checks
> - Rename vcc_3v3 to to vcc-3v3
> - Rename panel-dsi@0 to panel@0 to fix yaml warnings
> - Change commit message
> - Rename stm32f769-disco-mb1225-revb03-mb1166-reva09 to
> stm32f769-disco-mb1166-reva09
>
> Changes in v8:
> - Add Acked-by tag of Lee Jones
> - Add Reviewed-by tag of Raphael Gallais-Pou
> - Add Reviewed-by tag of Raphael Gallais-Pou
> - Remove unit name from 'ltdc/port/endpoint@0' to fix the compiling
> warning:
> ../arch/arm/boot/dts/st/stm32f769-disco.dts:189.28-191.5: Warning
> (unit_address_vs_reg): /soc/display-controller@40016800/port/endpoint@0: node
> has a unit name, but no reg or ranges property
> - Add Reviewed-by tag of Linus Walleij
> - Add Reviewed-by tag of Raphael Gallais-Pou
>
> Changes in v7:
> - Replace .dts with .dtb in the Makefile
>
> Changes in v6:
> - Drop patches
> - [5/8] dt-bindings: nt35510: add compatible for FRIDA FRD400B25025-A-CTK
> - [7/8] drm/panel: nt35510: move hardwired parameters to configuration
> - [8/8] drm/panel: nt35510: support FRIDA FRD400B25025-A-CTK
> because applied by the maintainer Linus Walleij
>
> Changes in v5:
> - Replace GPIOD_ASIS with GPIOD_OUT_HIGH in the call to devm_gpiod_get_optional().
>
> Changes in v2:
> - Add Acked-by tag of Conor Dooley
> - Change the status of panel_backlight node to "disabled"
> - Delete backlight property from panel0 node.
> - Re-write the patch [8/8] "drm/panel: nt35510: support FRIDA FRD400B25025-A-CTK"
> in the same style as the original driver.
>
> Dario Binacchi (5):
> dt-bindings: mfd: stm32f7: Add binding definition for DSI
> ARM: dts: stm32: add DSI support on stm32f769
> ARM: dts: stm32: rename mmc_vcard to vcc-3v3 on stm32f769-disco
> ARM: dts: stm32: add display support on stm32f769-disco
> ARM: dts: add stm32f769-disco-mb1166-reva09
>
> arch/arm/boot/dts/st/Makefile | 1 +
> .../dts/st/stm32f769-disco-mb1166-reva09.dts | 13 ++++
> arch/arm/boot/dts/st/stm32f769-disco.dts | 70 +++++++++++++++++--
> arch/arm/boot/dts/st/stm32f769.dtsi | 20 ++++++
> include/dt-bindings/mfd/stm32f7-rcc.h | 1 +
> 5 files changed, 101 insertions(+), 4 deletions(-)
> create mode 100644 arch/arm/boot/dts/st/stm32f769-disco-mb1166-reva09.dts
> create mode 100644 arch/arm/boot/dts/st/stm32f769.dtsi
>

Series applied on stm32-next.

Thanks for your efforts.

Alex