From: Jan Kiszka <jan.kiszka@siemens.com>
To: Florian Bezdeka <florian.bezdeka@siemens.com>,
isar-users <isar-users@googlegroups.com>
Cc: Nishanth Menon <nm@ti.com>
Subject: Re: [PATCH 7/9] beagleplay: Add U-Boot recipe
Date: Mon, 8 Jan 2024 14:19:17 +0100 [thread overview]
Message-ID: <a4b0b097-7276-4ffb-8f65-47d6355d9280@siemens.com> (raw)
In-Reply-To: <a6571a80b3365854f318fe2bb9def396c9bb27a6.camel@siemens.com>
On 08.01.24 14:17, Florian Bezdeka wrote:
> On Sun, 2024-01-07 at 13:54 +0100, 'Jan Kiszka' via isar-users wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Upstream support is available via upcoming 2024.01. One patches is still
>> needed to enable WIFI support.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> ...2x-Add-basic-initialization-for-usb-.patch | 80 +++++++++++++++++++
>> .../recipes-bsp/u-boot/files/rules-beagleplay | 34 ++++++++
>> .../u-boot/u-boot-beagleplay_2024.01-rc6.bb | 41 ++++++++++
>> 3 files changed, 155 insertions(+)
>> create mode 100644 meta-isar/recipes-bsp/u-boot/files/0001-TMP-board-ti-am62x-Add-basic-initialization-for-usb-.patch
>> create mode 100755 meta-isar/recipes-bsp/u-boot/files/rules-beagleplay
>> create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-beagleplay_2024.01-rc6.bb
>>
>> diff --git a/meta-isar/recipes-bsp/u-boot/files/0001-TMP-board-ti-am62x-Add-basic-initialization-for-usb-.patch b/meta-isar/recipes-bsp/u-boot/files/0001-TMP-board-ti-am62x-Add-basic-initialization-for-usb-.patch
>> new file mode 100644
>> index 00000000..d4e3137e
>> --- /dev/null
>> +++ b/meta-isar/recipes-bsp/u-boot/files/0001-TMP-board-ti-am62x-Add-basic-initialization-for-usb-.patch
>> @@ -0,0 +1,80 @@
>> +From 3502d8a4dd51b3bfe9b2fb123f0e8d6f7c0735ec Mon Sep 17 00:00:00 2001
>> +From: Nishanth Menon <nm@ti.com>
>> +Date: Tue, 25 Jul 2023 13:52:50 -0500
>> +Subject: [PATCH] TMP: board: ti: am62x: Add basic initialization for usb
>> + voltage, 32k crystal, debounce
>> +
>> +Do the basic configuration required for setting up the USB core voltage
>> +configuration, setup to configure the 32k clock coming from 32k crystal
>> +and the debounce configurations for the various pins.
>> +
>> +See https://lore.kernel.org/u-boot/20230725185253.2123433-4-nm@ti.com/
>> +Changes since then: writel(val, reg) - fixed for debounce values
>> +
>> +Signed-off-by: Nishanth Menon <nm@ti.com>
>> +---
>> + board/ti/am62x/evm.c | 46 ++++++++++++++++++++++++++++++++++++++++++++
>> + 1 file changed, 46 insertions(+)
>> +
>> +diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c
>> +index ad939088402..a1575c2b220 100644
>> +--- a/board/ti/am62x/evm.c
>> ++++ b/board/ti/am62x/evm.c
>> +@@ -78,8 +78,54 @@ static int video_setup(void)
>> + return 0;
>> + }
>> +
>> ++#define CTRLMMR_USB0_PHY_CTRL 0x43004008
>> ++#define CTRLMMR_USB1_PHY_CTRL 0x43004018
>> ++#define CORE_VOLTAGE 0x80000000
>> ++
>> ++#define WKUP_CTRLMMR_DBOUNCE_CFG1 0x04504084
>> ++#define WKUP_CTRLMMR_DBOUNCE_CFG2 0x04504088
>> ++#define WKUP_CTRLMMR_DBOUNCE_CFG3 0x0450408c
>> ++#define WKUP_CTRLMMR_DBOUNCE_CFG4 0x04504090
>> ++#define WKUP_CTRLMMR_DBOUNCE_CFG5 0x04504094
>> ++#define WKUP_CTRLMMR_DBOUNCE_CFG6 0x04504098
>> ++
>> + void spl_board_init(void)
>> + {
>> ++ u32 val;
>> ++
>> ++ /* Set USB0 PHY core voltage to 0.85V */
>> ++ val = readl(CTRLMMR_USB0_PHY_CTRL);
>> ++ val &= ~(CORE_VOLTAGE);
>> ++ writel(val, CTRLMMR_USB0_PHY_CTRL);
>> ++
>> ++ /* Set USB1 PHY core voltage to 0.85V */
>> ++ val = readl(CTRLMMR_USB1_PHY_CTRL);
>> ++ val &= ~(CORE_VOLTAGE);
>> ++ writel(val, CTRLMMR_USB1_PHY_CTRL);
>> ++
>> ++ /* We have 32k crystal, so lets enable it */
>> ++ val = readl(MCU_CTRL_LFXOSC_CTRL);
>> ++ val &= ~(MCU_CTRL_LFXOSC_32K_DISABLE_VAL);
>> ++ writel(val, MCU_CTRL_LFXOSC_CTRL);
>> ++ /* Add any TRIM needed for the crystal here.. */
>> ++ /* Make sure to mux up to take the SoC 32k from the crystal */
>> ++ writel(MCU_CTRL_DEVICE_CLKOUT_LFOSC_SELECT_VAL,
>> ++ MCU_CTRL_DEVICE_CLKOUT_32K_CTRL);
>> ++
>> ++ /* Setup debounce conf registers - arbitrary values. Times are approx */
>> ++ /* 1.9ms debounce @ 32k */
>> ++ writel(0x1, WKUP_CTRLMMR_DBOUNCE_CFG1);
>> ++ /* 5ms debounce @ 32k */
>> ++ writel(0x5, WKUP_CTRLMMR_DBOUNCE_CFG2);
>> ++ /* 20ms debounce @ 32k */
>> ++ writel(0x14, WKUP_CTRLMMR_DBOUNCE_CFG3);
>> ++ /* 46ms debounce @ 32k */
>> ++ writel(0x18, WKUP_CTRLMMR_DBOUNCE_CFG4);
>> ++ /* 100ms debounce @ 32k */
>> ++ writel(0x1c, WKUP_CTRLMMR_DBOUNCE_CFG5);
>> ++ /* 156ms debounce @ 32k */
>> ++ writel(0x1f, WKUP_CTRLMMR_DBOUNCE_CFG6);
>> ++
>> + video_setup();
>> + enable_caches();
>> + if (IS_ENABLED(CONFIG_SPL_SPLASH_SCREEN) && IS_ENABLED(CONFIG_SPL_BMP))
>> +--
>> +2.35.3
>> +
>> diff --git a/meta-isar/recipes-bsp/u-boot/files/rules-beagleplay b/meta-isar/recipes-bsp/u-boot/files/rules-beagleplay
>> new file mode 100755
>> index 00000000..36bbdecb
>> --- /dev/null
>> +++ b/meta-isar/recipes-bsp/u-boot/files/rules-beagleplay
>> @@ -0,0 +1,34 @@
>> +#!/usr/bin/make -f
>> +
>> +# Debian rules for custom U-Boot build
>> +#
>> +# This software is a part of ISAR.
>> +# Copyright (c) Siemens AG, 2018-2023
>> +#
>> +# SPDX-License-Identifier: MIT
>> +
>> +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
>> +export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
>> +SET_CROSS_BUILD_TOOLS=CROSS_BUILD_TOOLS=y
>> +endif
>> +
>> +override_dh_auto_build:
>> + $(MAKE) $(PARALLEL_MAKE) ARCH=arm am62x_evm_r5_defconfig beagleplay_r5.config
>> + $(MAKE) $(PARALLEL_MAKE) ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
>> +
>> + $(MAKE) $(PARALLEL_MAKE) am62x_evm_a53_defconfig beagleplay_a53.config
>> + $(MAKE) $(PARALLEL_MAKE) BL31=/usr/lib/trusted-firmware-a/beagleplay/bl31.bin \
>> + TEE=/usr/lib/optee-os/beagleplay/tee-raw.bin
>> + $(MAKE) $(PARALLEL_MAKE) u-boot-initial-env
>> + $(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 tools-only envtools
>> +
>> +override_dh_auto_install:
>> + mv tools/env/lib.a tools/env/libubootenv.a
>> +
>> +override_dh_auto_test:
>> +
>> +override_dh_strip:
>> + dh_strip -X libubootenv.a
>> +
>> +%:
>> + dh $@ --parallel
>> diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-beagleplay_2024.01-rc6.bb b/meta-isar/recipes-bsp/u-boot/u-boot-beagleplay_2024.01-rc6.bb
>> new file mode 100644
>> index 00000000..524c5ed0
>> --- /dev/null
>> +++ b/meta-isar/recipes-bsp/u-boot/u-boot-beagleplay_2024.01-rc6.bb
>
> This RC will not disappear anymore? Is the necessary release already
> scheduled?
Yeah, .01 actually means "January", and we can likely update this recipe
soon. But also the -rc6 will remain available.
Jan
--
Siemens AG, Technology
Linux Expert Center
next prev parent reply other threads:[~2024-01-08 13:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-07 12:54 [PATCH 0/9] Add support for BeaglePlay Jan Kiszka
2024-01-07 12:54 ` [PATCH 1/9] meta-isar: linux-mainline: Update to 6.6.10 Jan Kiszka
2024-01-07 12:54 ` [PATCH 2/9] optee-os: Switch default binary to tee-raw.bin Jan Kiszka
2024-01-07 12:54 ` [PATCH 3/9] u-boot-custom: Allow to set BL31 and TEE from recipes Jan Kiszka
2024-01-07 12:54 ` [PATCH 4/9] u-boot-custom: Allow to define different installation binaries Jan Kiszka
2024-01-07 12:54 ` [PATCH 5/9] beagleplay: Add TF-A recipe Jan Kiszka
2024-01-08 12:49 ` Florian Bezdeka
2024-01-07 12:54 ` [PATCH 6/9] beagleplay: Add OP-TEE recipe Jan Kiszka
2024-01-07 12:54 ` [PATCH 7/9] beagleplay: Add U-Boot recipe Jan Kiszka
2024-01-08 13:17 ` Florian Bezdeka
2024-01-08 13:19 ` Jan Kiszka [this message]
2024-01-07 12:54 ` [PATCH 8/9] Add support for the BeaglePlay board Jan Kiszka
2024-01-07 16:40 ` Jan Kiszka
2024-01-07 12:54 ` [PATCH 9/9] expand-on-first-boot: Preserve MBR on expansion of GPT disks Jan Kiszka
2024-01-08 8:51 ` [PATCH 0/9] Add support for BeaglePlay Anton Mikanovich
2024-01-08 12:18 ` Jan Kiszka
2024-01-08 13:53 ` Anton Mikanovich
2024-01-08 15:07 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4b0b097-7276-4ffb-8f65-47d6355d9280@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=florian.bezdeka@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=nm@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox