All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 1/1] configs/zynqmp_zcu106_defconfig: uboot dp pll patch
@ 2022-05-04 14:04 Neal Frager via buildroot
  2022-05-05  8:47 ` Luca Ceresoli
  0 siblings, 1 reply; 3+ messages in thread
From: Neal Frager via buildroot @ 2022-05-04 14:04 UTC (permalink / raw)
  To: buildroot; +Cc: luca, giulio.benetti, michal.simek, Neal Frager

This patch adds a u-boot patch that fixes the DP audio and video
PLL configurations for the zynqmp-zcu106-revA evaluation board.

The Linux DP driver expects the DP to be using the following PLL config:
  - DP video PLL should use the VPLL (0x0)
  - DP audio PLL should use the RPLL (0x3)

Register 0xFD1A0070 configures the DP video PLL.
Register 0xFD1A0074 configures the DP audio PLL.

This patch was build and run tested on a zynqmp-zcu106-revA target board.

Signed-off-by: Neal Frager <neal.frager@amd.com>
---
 ...zynqmp-zcu106-revA-Fix-DP-PLL-config.patch | 39 +++++++++++++++++++
 configs/zynqmp_zcu106_defconfig               |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 board/zynqmp/zcu106/patches/uboot/v1-0001-arm64-zynqmp-zynqmp-zcu106-revA-Fix-DP-PLL-config.patch

diff --git a/board/zynqmp/zcu106/patches/uboot/v1-0001-arm64-zynqmp-zynqmp-zcu106-revA-Fix-DP-PLL-config.patch b/board/zynqmp/zcu106/patches/uboot/v1-0001-arm64-zynqmp-zynqmp-zcu106-revA-Fix-DP-PLL-config.patch
new file mode 100644
index 0000000000..58eb0a1555
--- /dev/null
+++ b/board/zynqmp/zcu106/patches/uboot/v1-0001-arm64-zynqmp-zynqmp-zcu106-revA-Fix-DP-PLL-config.patch
@@ -0,0 +1,39 @@
+From 8e8b766d918877a7e64efce1e1a640d9e541fba2 Mon Sep 17 00:00:00 2001
+From: Neal Frager <neal.frager@amd.com>
+Date: Wed, 4 May 2022 14:14:16 +0100
+Subject: [PATCH v1 1/1] arm64: zynqmp: zynqmp-zcu106-revA: Fix DP PLL
+ configuration
+
+This patch fixes the DP audio and video PLL configurations
+for the zynqmp-zcu106-revA evaluation board.
+
+The Linux DP driver expects the DP to be using the following PLL config:
+  - DP video PLL should use the VPLL (0x0)
+  - DP audio PLL should use the RPLL (0x3)
+
+Register 0xFD1A0070 configures the DP video PLL.
+Register 0xFD1A0074 configures the DP audio PLL.
+
+Signed-off-by: Neal Frager <neal.frager@amd.com>
+---
+ board/xilinx/zynqmp/zynqmp-zcu106-revA/psu_init_gpl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/board/xilinx/zynqmp/zynqmp-zcu106-revA/psu_init_gpl.c b/board/xilinx/zynqmp/zynqmp-zcu106-revA/psu_init_gpl.c
+index 15f0be1a43..cbc436289f 100644
+--- a/board/xilinx/zynqmp/zynqmp-zcu106-revA/psu_init_gpl.c
++++ b/board/xilinx/zynqmp/zynqmp-zcu106-revA/psu_init_gpl.c
+@@ -81,8 +81,8 @@ static unsigned long psu_clock_init_data(void)
+ 	psu_mask_write(0xFF5E0104, 0x00000007U, 0x00000000U);
+ 	psu_mask_write(0xFF5E0128, 0x01003F07U, 0x01000F00U);
+ 	psu_mask_write(0xFD1A00A0, 0x01003F07U, 0x01000200U);
+-	psu_mask_write(0xFD1A0070, 0x013F3F07U, 0x01010203U);
+-	psu_mask_write(0xFD1A0074, 0x013F3F07U, 0x01013C00U);
++	psu_mask_write(0xFD1A0070, 0x013F3F07U, 0x01010500U);
++	psu_mask_write(0xFD1A0074, 0x013F3F07U, 0x01013C03U);
+ 	psu_mask_write(0xFD1A007C, 0x013F3F07U, 0x01011303U);
+ 	psu_mask_write(0xFD1A0060, 0x03003F07U, 0x03000100U);
+ 	psu_mask_write(0xFD1A0068, 0x01003F07U, 0x01000200U);
+-- 
+2.17.1
+
diff --git a/configs/zynqmp_zcu106_defconfig b/configs/zynqmp_zcu106_defconfig
index 96b15eea81..9b6957e826 100644
--- a/configs/zynqmp_zcu106_defconfig
+++ b/configs/zynqmp_zcu106_defconfig
@@ -1,4 +1,5 @@
 BR2_aarch64=y
+BR2_GLOBAL_PATCH_DIR="board/zynqmp/zcu106/patches"
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/zynqmp/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/zynqmp/post-image.sh"
-- 
2.17.1

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

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

* Re: [Buildroot] [PATCH v1 1/1] configs/zynqmp_zcu106_defconfig: uboot dp pll patch
  2022-05-04 14:04 [Buildroot] [PATCH v1 1/1] configs/zynqmp_zcu106_defconfig: uboot dp pll patch Neal Frager via buildroot
@ 2022-05-05  8:47 ` Luca Ceresoli
  2022-05-05  8:55   ` Neal Frager
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Ceresoli @ 2022-05-05  8:47 UTC (permalink / raw)
  To: Neal Frager, buildroot; +Cc: giulio.benetti, michal.simek

Hi Neal,

On 04/05/22 16:04, Neal Frager wrote:
> This patch adds a u-boot patch that fixes the DP audio and video
> PLL configurations for the zynqmp-zcu106-revA evaluation board.
> 
> The Linux DP driver expects the DP to be using the following PLL config:
>   - DP video PLL should use the VPLL (0x0)
>   - DP audio PLL should use the RPLL (0x3)
> 
> Register 0xFD1A0070 configures the DP video PLL.
> Register 0xFD1A0074 configures the DP audio PLL.
> 
> This patch was build and run tested on a zynqmp-zcu106-revA target board.
> 
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
>  ...zynqmp-zcu106-revA-Fix-DP-PLL-config.patch | 39 +++++++++++++++++++

I haven't seen this patch on the U-Boot mailing list. The best practice
for fixes to packages is to send a patch to the upstream project (in the
U-Boot case it would be a patch sent to their mailing list) and then
integrate it in Buildroot with the addition of a line such as:

Upstream-Status: submitted (https://.....)

To have the topic traceable and mark that the patch is probably ending
in a future release.

This is not a major bug, it is rather an annoyance, thus it's worth
spending a little extra time and have a clean patch here.

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

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

* Re: [Buildroot] [PATCH v1 1/1] configs/zynqmp_zcu106_defconfig: uboot dp pll patch
  2022-05-05  8:47 ` Luca Ceresoli
@ 2022-05-05  8:55   ` Neal Frager
  0 siblings, 0 replies; 3+ messages in thread
From: Neal Frager @ 2022-05-05  8:55 UTC (permalink / raw)
  To: Luca Ceresoli, Neal Frager, buildroot; +Cc: giulio.benetti, michal.simek

Hi Luca,

> I haven't seen this patch on the U-Boot mailing list. The best practice for fixes to packages is to send a patch to the upstream project (in the U-Boot case it would be a patch sent to their mailing list) and then integrate it in Buildroot with the addition > of a line such as:

> Upstream-Status: submitted (https://.....)

> To have the topic traceable and mark that the patch is probably ending in a future release.

> This is not a major bug, it is rather an annoyance, thus it's worth spending a little extra time and have a clean patch here.

Thank you for your feedback.  I expect that Michal will be submitting my patch to the U-Boot mailing list shortly.

Once that is done, I will create a v2 of this patch taking your feedback into account.

Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-05-05  8:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 14:04 [Buildroot] [PATCH v1 1/1] configs/zynqmp_zcu106_defconfig: uboot dp pll patch Neal Frager via buildroot
2022-05-05  8:47 ` Luca Ceresoli
2022-05-05  8:55   ` Neal Frager

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.