All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] configs/stm32f469_disco: enable Linux DRM support
@ 2021-07-04 14:11 Dario Binacchi
  2021-07-04 14:11 ` [Buildroot] [PATCH v2 1/1] configs/stm32f469_disco: fix kernel bootup Dario Binacchi
  2021-07-04 14:11 ` [Buildroot] [PATCH 2/2] configs/stm32f469_disco: add framebuffer test application Dario Binacchi
  0 siblings, 2 replies; 6+ messages in thread
From: Dario Binacchi @ 2021-07-04 14:11 UTC (permalink / raw)
  To: buildroot

The patch to be applied to the Kernel has been informally approved by
an ST maintainer as can be seen from [1] and [2].

After Linux boots, /dev/fb0 will be accessible. You can control the
brightness of the display after enabling the framebuffer by running the
following commands:

~ # echo 0 0 > /sys/class/graphics/fb0/pan
~ # echo 255 >/sys/class/backlight/40016c00.dsi.0/brightness

The brightness ranges from 0 to 255, as you can see running the
command:

~ # cat /sys/class/backlight/40016c00.dsi.0/max_brightness

[1] https://lore.kernel.org/patchwork/patch/1450524/
[2] https://lore.kernel.org/patchwork/patch/1450964/

Signed-off-by: Dario Binacchi <dariobin@libero.it>
---
 .../stm32f469-disco/linux.fragment            |  7 +-
 ...-post-divisor-setup-for-I2S-SAI-PLLs.patch | 86 +++++++++++++++++++
 configs/stm32f469_disco_defconfig             |  1 +
 3 files changed, 93 insertions(+), 1 deletion(-)
 create mode 100644 board/stmicroelectronics/stm32f469-disco/patches/linux/0001-clk-stm32f4-fix-post-divisor-setup-for-I2S-SAI-PLLs.patch

diff --git a/board/stmicroelectronics/stm32f469-disco/linux.fragment b/board/stmicroelectronics/stm32f469-disco/linux.fragment
index 90f5e8a8ff..ffa4d6205f 100644
--- a/board/stmicroelectronics/stm32f469-disco/linux.fragment
+++ b/board/stmicroelectronics/stm32f469-disco/linux.fragment
@@ -1 +1,6 @@
-# CONFIG_XIP_KERNEL is not set
\ No newline at end of file
+# CONFIG_XIP_KERNEL is not set
+CONFIG_DRM=y
+CONFIG_DRM_STM=y
+CONFIG_DRM_STM_DSI=y
+CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
diff --git a/board/stmicroelectronics/stm32f469-disco/patches/linux/0001-clk-stm32f4-fix-post-divisor-setup-for-I2S-SAI-PLLs.patch b/board/stmicroelectronics/stm32f469-disco/patches/linux/0001-clk-stm32f4-fix-post-divisor-setup-for-I2S-SAI-PLLs.patch
new file mode 100644
index 0000000000..34e398b81d
--- /dev/null
+++ b/board/stmicroelectronics/stm32f469-disco/patches/linux/0001-clk-stm32f4-fix-post-divisor-setup-for-I2S-SAI-PLLs.patch
@@ -0,0 +1,86 @@
+From 463c3a0cbf18fd1bdd2c9a3c370c484b6cab97b5 Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dariobin@libero.it>
+Date: Mon, 21 Jun 2021 23:40:47 +0200
+Subject: [PATCH v2] clk: stm32f4: fix post divisor setup for I2S/SAI PLLs
+
+Enabling the framebuffer leads to a system hang. Running, as a debug
+hack, the store_pan() function in drivers/video/fbdev/core/fbsysfs.c
+without taking the console_lock, allows to see the crash backtrace on
+the serial line.
+
+~ # echo 0 0 > /sys/class/graphics/fb0/pan
+
+[    9.719414] Unhandled exception: IPSR = 00000005 LR = fffffff1
+[    9.726937] CPU: 0 PID: 49 Comm: sh Not tainted 5.13.0-rc5 #9
+[    9.733008] Hardware name: STM32 (Device Tree Support)
+[    9.738296] PC is at clk_gate_is_enabled+0x0/0x28
+[    9.743426] LR is at stm32f4_pll_div_set_rate+0xf/0x38
+[    9.748857] pc : [<0011e4be>]    lr : [<0011f9e3>]    psr: 0100000b
+[    9.755373] sp : 00bc7be0  ip : 00000000  fp : 001f3ac4
+[    9.760812] r10: 002610d0  r9 : 01efe920  r8 : 00540560
+[    9.766269] r7 : 02e7ddb0  r6 : 0173eed8  r5 : 00000000  r4 : 004027c0
+[    9.773081] r3 : 0011e4bf  r2 : 02e7ddb0  r1 : 0173eed8  r0 : 1d3267b8
+[    9.779911] xPSR: 0100000b
+[    9.782719] CPU: 0 PID: 49 Comm: sh Not tainted 5.13.0-rc5 #9
+[    9.788791] Hardware name: STM32 (Device Tree Support)
+[    9.794120] [<0000afa1>] (unwind_backtrace) from [<0000a33f>] (show_stack+0xb/0xc)
+[    9.802421] [<0000a33f>] (show_stack) from [<0000a8df>] (__invalid_entry+0x4b/0x4c)
+
+The `pll_num' field in the post_div_data configuration contained a wrong
+value which also referenced an uninitialized hardware clock when
+clk_register_pll_div() was called.
+
+Fixes: 517633ef630e ("clk: stm32f4: Add post divisor for I2S & SAI PLLs")
+Signed-off-by: Dario Binacchi <dariobin@libero.it>
+
+---
+
+Changes in v2:
+- Change  'u8 pll_num' from 'stm32f4_pll_post_div_data' structure into
+  'int pll_idx'.
+
+ drivers/clk/clk-stm32f4.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c
+index 18117ce5ff85..5c75e3d906c2 100644
+--- a/drivers/clk/clk-stm32f4.c
++++ b/drivers/clk/clk-stm32f4.c
+@@ -526,7 +526,7 @@ struct stm32f4_pll {
+ 
+ struct stm32f4_pll_post_div_data {
+ 	int idx;
+-	u8 pll_num;
++	int pll_idx;
+ 	const char *name;
+ 	const char *parent;
+ 	u8 flag;
+@@ -557,13 +557,13 @@ static const struct clk_div_table post_divr_table[] = {
+ 
+ #define MAX_POST_DIV 3
+ static const struct stm32f4_pll_post_div_data  post_div_data[MAX_POST_DIV] = {
+-	{ CLK_I2SQ_PDIV, PLL_I2S, "plli2s-q-div", "plli2s-q",
++	{ CLK_I2SQ_PDIV, PLL_VCO_I2S, "plli2s-q-div", "plli2s-q",
+ 		CLK_SET_RATE_PARENT, STM32F4_RCC_DCKCFGR, 0, 5, 0, NULL},
+ 
+-	{ CLK_SAIQ_PDIV, PLL_SAI, "pllsai-q-div", "pllsai-q",
++	{ CLK_SAIQ_PDIV, PLL_VCO_SAI, "pllsai-q-div", "pllsai-q",
+ 		CLK_SET_RATE_PARENT, STM32F4_RCC_DCKCFGR, 8, 5, 0, NULL },
+ 
+-	{ NO_IDX, PLL_SAI, "pllsai-r-div", "pllsai-r", CLK_SET_RATE_PARENT,
++	{ NO_IDX, PLL_VCO_SAI, "pllsai-r-div", "pllsai-r", CLK_SET_RATE_PARENT,
+ 		STM32F4_RCC_DCKCFGR, 16, 2, 0, post_divr_table },
+ };
+ 
+@@ -1774,7 +1774,7 @@ static void __init stm32f4_rcc_init(struct device_node *np)
+ 				post_div->width,
+ 				post_div->flag_div,
+ 				post_div->div_table,
+-				clks[post_div->pll_num],
++				clks[post_div->pll_idx],
+ 				&stm32f4_clk_lock);
+ 
+ 		if (post_div->idx != NO_IDX)
+-- 
+2.17.1
+
diff --git a/configs/stm32f469_disco_defconfig b/configs/stm32f469_disco_defconfig
index e538a664e2..1440aefd95 100644
--- a/configs/stm32f469_disco_defconfig
+++ b/configs/stm32f469_disco_defconfig
@@ -1,6 +1,7 @@
 BR2_arm=y
 BR2_cortex_m4=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_12=y
+BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f469-disco/patches"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh board/stmicroelectronics/stm32f469-disco/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f469-disco/genimage.cfg"
-- 
2.17.1

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

* [Buildroot] [PATCH v2 1/1] configs/stm32f469_disco: fix kernel bootup
  2021-07-04 14:11 [Buildroot] [PATCH 1/2] configs/stm32f469_disco: enable Linux DRM support Dario Binacchi
@ 2021-07-04 14:11 ` Dario Binacchi
  2021-07-04 14:11 ` [Buildroot] [PATCH 2/2] configs/stm32f469_disco: add framebuffer test application Dario Binacchi
  1 sibling, 0 replies; 6+ messages in thread
From: Dario Binacchi @ 2021-07-04 14:11 UTC (permalink / raw)
  To: buildroot

As described by [1], the kernel generated by the configuration for the
STM32f469 Discovery board is buggy. Using a newer kernel, as suggested
by [1], increases the dtb and Kernel image size. In particular, the
5.12 version of the kernel generates a dtb and a kernel image whose sum
exceeds the 2 MByte of the flash module.

So I decided to replace the afboot-stm32 bootloader in the flash with
U-boot to easily boot the system from sdcard without having to worry
about the size of dtb, kernel and rootfs generated by the configuration.

This solution allows you to fix the kernel boot issue and makes it
possible to use its future versions.

[1] http://buildroot-busybox.2317881.n4.nabble.com/Bug-11746-New-stm32f469-didn-t-work-correctly-td219644.html

Signed-off-by: Dario Binacchi <dariobin@libero.it>

---

Changes in v2:
- Replace stm32f429 with stm32f469 in the commit header.

 .../stm32f469-disco/extlinux.conf             |  4 +++
 .../stm32f469-disco/flash.sh                  |  4 +--
 .../stm32f469-disco/genimage.cfg              | 27 +++++++++++++++
 .../stm32f469-disco/linux.fragment            |  1 +
 ...sco-don-t-force-init-in-chosen-boota.patch | 33 -------------------
 .../stm32f469-disco/post-build.sh             |  4 +++
 .../stm32f469-disco/readme.txt                | 16 +++++++--
 configs/stm32f469_disco_defconfig             | 19 ++++++-----
 8 files changed, 62 insertions(+), 46 deletions(-)
 create mode 100644 board/stmicroelectronics/stm32f469-disco/extlinux.conf
 create mode 100644 board/stmicroelectronics/stm32f469-disco/genimage.cfg
 create mode 100644 board/stmicroelectronics/stm32f469-disco/linux.fragment
 delete mode 100644 board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch
 create mode 100755 board/stmicroelectronics/stm32f469-disco/post-build.sh

diff --git a/board/stmicroelectronics/stm32f469-disco/extlinux.conf b/board/stmicroelectronics/stm32f469-disco/extlinux.conf
new file mode 100644
index 0000000000..1c2db4383b
--- /dev/null
+++ b/board/stmicroelectronics/stm32f469-disco/extlinux.conf
@@ -0,0 +1,4 @@
+label stm32f469-disco-buildroot
+  kernel /zImage
+  devicetree /stm32f469-disco.dtb
+  append console=ttySTM0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext2 rootwait earlyprintk consoleblank=0 ignore_loglevel
diff --git a/board/stmicroelectronics/stm32f469-disco/flash.sh b/board/stmicroelectronics/stm32f469-disco/flash.sh
index 0ec0beb2de..984d2b2599 100755
--- a/board/stmicroelectronics/stm32f469-disco/flash.sh
+++ b/board/stmicroelectronics/stm32f469-disco/flash.sh
@@ -13,8 +13,6 @@ ${OUTPUT_DIR}/host/bin/openocd -f board/stm32f469discovery.cfg \
   -c "reset init" \
   -c "flash probe 0" \
   -c "flash info 0" \
-  -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f469i-disco.bin 0x08000000" \
-  -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f469-disco.dtb 0x08004000" \
-  -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x08008000" \
+  -c "flash write_image erase ${OUTPUT_DIR}/images/u-boot.bin 0x08000000" \
   -c "reset run" \
   -c "shutdown"
diff --git a/board/stmicroelectronics/stm32f469-disco/genimage.cfg b/board/stmicroelectronics/stm32f469-disco/genimage.cfg
new file mode 100644
index 0000000000..bc945955fa
--- /dev/null
+++ b/board/stmicroelectronics/stm32f469-disco/genimage.cfg
@@ -0,0 +1,27 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"stm32f469-disco.dtb",
+			"extlinux"
+		}
+	}
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		partition-type = 0xC
+                image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext2"
+		size = 32M
+	}
+}
+
diff --git a/board/stmicroelectronics/stm32f469-disco/linux.fragment b/board/stmicroelectronics/stm32f469-disco/linux.fragment
new file mode 100644
index 0000000000..90f5e8a8ff
--- /dev/null
+++ b/board/stmicroelectronics/stm32f469-disco/linux.fragment
@@ -0,0 +1 @@
+# CONFIG_XIP_KERNEL is not set
\ No newline at end of file
diff --git a/board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch b/board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch
deleted file mode 100644
index 750e477dfc..0000000000
--- a/board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From c8f8f33c2f0460a34c9545b01a7972a7ed2df0e9 Mon Sep 17 00:00:00 2001
-From: Christophe Priouzeau <christophe.priouzeau@st.com>
-Date: Mon, 29 May 2017 13:38:16 +0200
-Subject: [PATCH] ARM: stm32f249-disco: don't force init= in /chosen/bootargs
-
-There is no reason to override the kernel's default init= value, as
-this breaks userspace that assumes the kernel default of /init is
-used. Since stm32 is often used with a minimal bootloader
-(afboot-stm32) that doesn't provide any mechanism to override the DTB,
-we need to adjust the kernel command line in the Device Tree source.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com>
----
- arch/arm/boot/dts/stm32f469-disco.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts
-index 0dd56ef..93ee1b2 100644
---- a/arch/arm/boot/dts/stm32f469-disco.dts
-+++ b/arch/arm/boot/dts/stm32f469-disco.dts
-@@ -53,7 +53,7 @@
- 	compatible = "st,stm32f469i-disco", "st,stm32f469";
- 
- 	chosen {
--		bootargs = "root=/dev/ram rdinit=/linuxrc";
-+		bootargs = "root=/dev/ram";
- 		stdout-path = "serial0:115200n8";
- 	};
- 
--- 
-2.7.4
-
diff --git a/board/stmicroelectronics/stm32f469-disco/post-build.sh b/board/stmicroelectronics/stm32f469-disco/post-build.sh
new file mode 100755
index 0000000000..ec20fca7d9
--- /dev/null
+++ b/board/stmicroelectronics/stm32f469-disco/post-build.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+BOARD_DIR="$(dirname $0)"
+
+install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf
diff --git a/board/stmicroelectronics/stm32f469-disco/readme.txt b/board/stmicroelectronics/stm32f469-disco/readme.txt
index 888bff08a1..c1e1d30e69 100644
--- a/board/stmicroelectronics/stm32f469-disco/readme.txt
+++ b/board/stmicroelectronics/stm32f469-disco/readme.txt
@@ -15,5 +15,17 @@ Flashing
 
   ./board/stmicroelectronics/stm32f469-disco/flash.sh output/
 
-It will flash the minimal bootloader, the Device Tree Blob, and the
-kernel image which includes the root filesystem as initramfs.
+It will flash the U-boot bootloader.
+
+Creating SD card
+----------------
+
+Buildroot prepares an"sdcard.img" image in the output/images/ directory,
+ready to be dumped on a SD card. Launch the following command as root:
+
+  dd if=output/images/sdcard.img of=/dev/<your-sd-device>
+
+*** WARNING! This will destroy all the card content. Use with care! ***
+
+For details about the medium image layout and its content, see the
+definition in board/stmicroelectronics/stm32f469-disco/genimage.cfg.
diff --git a/configs/stm32f469_disco_defconfig b/configs/stm32f469_disco_defconfig
index 9760d51878..8701ccbc02 100644
--- a/configs/stm32f469_disco_defconfig
+++ b/configs/stm32f469_disco_defconfig
@@ -1,19 +1,22 @@
 BR2_arm=y
 BR2_cortex_m4=y
-BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f469-disco/patches"
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11=y
-BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh board/stmicroelectronics/stm32f469-disco/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f469-disco/genimage.cfg"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12"
 BR2_LINUX_KERNEL_DEFCONFIG="stm32"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux.fragment"
 BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
-BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage"
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f469-disco"
 BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
-BR2_TARGET_ROOTFS_INITRAMFS=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="32M"
 # BR2_TARGET_ROOTFS_TAR is not set
-BR2_TARGET_AFBOOT_STM32=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32f469-discovery"
+BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_OPENOCD=y
-- 
2.17.1

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

* [Buildroot] [PATCH 2/2] configs/stm32f469_disco: add framebuffer test application
  2021-07-04 14:11 [Buildroot] [PATCH 1/2] configs/stm32f469_disco: enable Linux DRM support Dario Binacchi
  2021-07-04 14:11 ` [Buildroot] [PATCH v2 1/1] configs/stm32f469_disco: fix kernel bootup Dario Binacchi
@ 2021-07-04 14:11 ` Dario Binacchi
  1 sibling, 0 replies; 6+ messages in thread
From: Dario Binacchi @ 2021-07-04 14:11 UTC (permalink / raw)
  To: buildroot

It's a test suite for Linux framebuffer. You can run, for example,
fb-test-rect that displays random rectangles on the screen. But first,
you need to enable the framebuffer:

~ # echo 0 0 > /sys/class/graphics/fb0/pan
~ # fb-test-rect

Signed-off-by: Dario Binacchi <dariobin@libero.it>
---
 configs/stm32f469_disco_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/stm32f469_disco_defconfig b/configs/stm32f469_disco_defconfig
index 1440aefd95..b6de6748a0 100644
--- a/configs/stm32f469_disco_defconfig
+++ b/configs/stm32f469_disco_defconfig
@@ -15,6 +15,7 @@ BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f469-disco"
 BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+BR2_PACKAGE_FB_TEST_APP=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="32M"
 # BR2_TARGET_ROOTFS_TAR is not set
-- 
2.17.1

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

* Re: [Buildroot] [PATCH 1/2] configs/stm32f469_disco: enable Linux DRM support
  2021-10-17 16:28 ` [Buildroot] [PATCH 1/2] " Dario Binacchi via buildroot
  2021-10-18 11:06   ` Christophe Priouzeau
@ 2021-10-26 19:31   ` Arnout Vandecappelle
  1 sibling, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2021-10-26 19:31 UTC (permalink / raw)
  To: Dario Binacchi, buildroot; +Cc: Christophe Priouzeau



On 17/10/2021 18:28, Dario Binacchi wrote:
> The patch [1], which is required for DRM to work properly, has been
> merged into Linux version 5.14-rc3. There's a 5.14.12 now in stable, so
> I took that one.
> 
> After Linux boots, /dev/fb0 will be accessible. You can control the
> brightness of the display after enabling the framebuffer by running the
> following commands:
> 
> ~ # echo 0 0 > /sys/class/graphics/fb0/pan
> ~ # echo 255 >/sys/class/backlight/40016c00.dsi.0/brightness
> 
> The brightness ranges from 0 to 255, as you can see running the
> command:
> 
> ~ # cat /sys/class/backlight/40016c00.dsi.0/max_brightness

  I've added the above text to the readme.txt and applied to master, thanks.

  Regards,
  Arnout

> 
> [1] 24b5b1978cd5 ("clk: stm32f4: fix post divisor setup for I2S/SAI PLLs")
> 
> Signed-off-by: Dario Binacchi <dariobin@libero.it>
> ---
>   board/stmicroelectronics/stm32f469-disco/linux.fragment | 8 +++++++-
>   configs/stm32f469_disco_defconfig                       | 4 ++--
>   2 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/board/stmicroelectronics/stm32f469-disco/linux.fragment b/board/stmicroelectronics/stm32f469-disco/linux.fragment
> index 90f5e8a8ff..e5d39bf04a 100644
> --- a/board/stmicroelectronics/stm32f469-disco/linux.fragment
> +++ b/board/stmicroelectronics/stm32f469-disco/linux.fragment
> @@ -1 +1,7 @@
> -# CONFIG_XIP_KERNEL is not set
> \ No newline at end of file
> +# CONFIG_XIP_KERNEL is not set
> +CONFIG_DRM=y
> +CONFIG_DRM_STM=y
> +CONFIG_DRM_STM_DSI=y
> +CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y
> +CONFIG_FB=y
> +CONFIG_BACKLIGHT_CLASS_DEVICE=y
> diff --git a/configs/stm32f469_disco_defconfig b/configs/stm32f469_disco_defconfig
> index e538a664e2..438d32150c 100644
> --- a/configs/stm32f469_disco_defconfig
> +++ b/configs/stm32f469_disco_defconfig
> @@ -1,12 +1,12 @@
>   BR2_arm=y
>   BR2_cortex_m4=y
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_12=y
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_14=y
>   BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh board/stmicroelectronics/stm32f469-disco/post-build.sh"
>   BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
>   BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f469-disco/genimage.cfg"
>   BR2_LINUX_KERNEL=y
>   BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.11"
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.14.12"
>   BR2_LINUX_KERNEL_DEFCONFIG="stm32"
>   BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux.fragment"
>   BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] configs/stm32f469_disco: enable Linux DRM support
  2021-10-17 16:28 ` [Buildroot] [PATCH 1/2] " Dario Binacchi via buildroot
@ 2021-10-18 11:06   ` Christophe Priouzeau
  2021-10-26 19:31   ` Arnout Vandecappelle
  1 sibling, 0 replies; 6+ messages in thread
From: Christophe Priouzeau @ 2021-10-18 11:06 UTC (permalink / raw)
  To: Dario Binacchi, buildroot

Acked-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>

On 10/17/21 6:28 PM, Dario Binacchi wrote:
> The patch [1], which is required for DRM to work properly, has been
> merged into Linux version 5.14-rc3. There's a 5.14.12 now in stable, so
> I took that one.
> 
> After Linux boots, /dev/fb0 will be accessible. You can control the
> brightness of the display after enabling the framebuffer by running the
> following commands:
> 
> ~ # echo 0 0 > /sys/class/graphics/fb0/pan
> ~ # echo 255 >/sys/class/backlight/40016c00.dsi.0/brightness
> 
> The brightness ranges from 0 to 255, as you can see running the
> command:
> 
> ~ # cat /sys/class/backlight/40016c00.dsi.0/max_brightness
> 
> [1] 24b5b1978cd5 ("clk: stm32f4: fix post divisor setup for I2S/SAI PLLs")
> 
> Signed-off-by: Dario Binacchi <dariobin@libero.it>
> ---
>   board/stmicroelectronics/stm32f469-disco/linux.fragment | 8 +++++++-
>   configs/stm32f469_disco_defconfig                       | 4 ++--
>   2 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/board/stmicroelectronics/stm32f469-disco/linux.fragment b/board/stmicroelectronics/stm32f469-disco/linux.fragment
> index 90f5e8a8ff..e5d39bf04a 100644
> --- a/board/stmicroelectronics/stm32f469-disco/linux.fragment
> +++ b/board/stmicroelectronics/stm32f469-disco/linux.fragment
> @@ -1 +1,7 @@
> -# CONFIG_XIP_KERNEL is not set
> \ No newline at end of file
> +# CONFIG_XIP_KERNEL is not set
> +CONFIG_DRM=y
> +CONFIG_DRM_STM=y
> +CONFIG_DRM_STM_DSI=y
> +CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y
> +CONFIG_FB=y
> +CONFIG_BACKLIGHT_CLASS_DEVICE=y
> diff --git a/configs/stm32f469_disco_defconfig b/configs/stm32f469_disco_defconfig
> index e538a664e2..438d32150c 100644
> --- a/configs/stm32f469_disco_defconfig
> +++ b/configs/stm32f469_disco_defconfig
> @@ -1,12 +1,12 @@
>   BR2_arm=y
>   BR2_cortex_m4=y
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_12=y
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_14=y
>   BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh board/stmicroelectronics/stm32f469-disco/post-build.sh"
>   BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
>   BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f469-disco/genimage.cfg"
>   BR2_LINUX_KERNEL=y
>   BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.11"
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.14.12"
>   BR2_LINUX_KERNEL_DEFCONFIG="stm32"
>   BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux.fragment"
>   BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
> 


-- 
Best regards / Cordialement,

Christophe Priouzeau | Tel: +33 244027320
STMicroelectronics
ST online: www.st.com<http://www.st.com/>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 1/2] configs/stm32f469_disco: enable Linux DRM support
  2021-10-17 16:28 [Buildroot] [PATCH 0/2] configs/stm32f469_disco: enable Linux DRM support Dario Binacchi via buildroot
@ 2021-10-17 16:28 ` Dario Binacchi via buildroot
  2021-10-18 11:06   ` Christophe Priouzeau
  2021-10-26 19:31   ` Arnout Vandecappelle
  0 siblings, 2 replies; 6+ messages in thread
From: Dario Binacchi via buildroot @ 2021-10-17 16:28 UTC (permalink / raw)
  To: buildroot; +Cc: Christophe Priouzeau, Dario Binacchi

The patch [1], which is required for DRM to work properly, has been
merged into Linux version 5.14-rc3. There's a 5.14.12 now in stable, so
I took that one.

After Linux boots, /dev/fb0 will be accessible. You can control the
brightness of the display after enabling the framebuffer by running the
following commands:

~ # echo 0 0 > /sys/class/graphics/fb0/pan
~ # echo 255 >/sys/class/backlight/40016c00.dsi.0/brightness

The brightness ranges from 0 to 255, as you can see running the
command:

~ # cat /sys/class/backlight/40016c00.dsi.0/max_brightness

[1] 24b5b1978cd5 ("clk: stm32f4: fix post divisor setup for I2S/SAI PLLs")

Signed-off-by: Dario Binacchi <dariobin@libero.it>
---
 board/stmicroelectronics/stm32f469-disco/linux.fragment | 8 +++++++-
 configs/stm32f469_disco_defconfig                       | 4 ++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/board/stmicroelectronics/stm32f469-disco/linux.fragment b/board/stmicroelectronics/stm32f469-disco/linux.fragment
index 90f5e8a8ff..e5d39bf04a 100644
--- a/board/stmicroelectronics/stm32f469-disco/linux.fragment
+++ b/board/stmicroelectronics/stm32f469-disco/linux.fragment
@@ -1 +1,7 @@
-# CONFIG_XIP_KERNEL is not set
\ No newline at end of file
+# CONFIG_XIP_KERNEL is not set
+CONFIG_DRM=y
+CONFIG_DRM_STM=y
+CONFIG_DRM_STM_DSI=y
+CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y
+CONFIG_FB=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
diff --git a/configs/stm32f469_disco_defconfig b/configs/stm32f469_disco_defconfig
index e538a664e2..438d32150c 100644
--- a/configs/stm32f469_disco_defconfig
+++ b/configs/stm32f469_disco_defconfig
@@ -1,12 +1,12 @@
 BR2_arm=y
 BR2_cortex_m4=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_12=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_14=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh board/stmicroelectronics/stm32f469-disco/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f469-disco/genimage.cfg"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.11"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.14.12"
 BR2_LINUX_KERNEL_DEFCONFIG="stm32"
 BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux.fragment"
 BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
-- 
2.17.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-10-26 19:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-04 14:11 [Buildroot] [PATCH 1/2] configs/stm32f469_disco: enable Linux DRM support Dario Binacchi
2021-07-04 14:11 ` [Buildroot] [PATCH v2 1/1] configs/stm32f469_disco: fix kernel bootup Dario Binacchi
2021-07-04 14:11 ` [Buildroot] [PATCH 2/2] configs/stm32f469_disco: add framebuffer test application Dario Binacchi
2021-10-17 16:28 [Buildroot] [PATCH 0/2] configs/stm32f469_disco: enable Linux DRM support Dario Binacchi via buildroot
2021-10-17 16:28 ` [Buildroot] [PATCH 1/2] " Dario Binacchi via buildroot
2021-10-18 11:06   ` Christophe Priouzeau
2021-10-26 19:31   ` Arnout Vandecappelle

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.