From: Eugen.Hristev at microchip.com <Eugen.Hristev@microchip.com>
To: u-boot@lists.denx.de
Subject: [PATCH 29/34] configs: sama7g5: add mmc config for sdmmc0
Date: Fri, 4 Dec 2020 07:00:59 +0000 [thread overview]
Message-ID: <4355e46d-8221-1f1a-7ea6-e8d8c52daaf2@microchip.com> (raw)
In-Reply-To: <01819e14-2d33-276f-842c-fecf33e6e7ba@samsung.com>
On 03.12.2020 23:45, Jaehoon Chung wrote:
> Hi,
>
> On 12/3/20 8:20 PM, Eugen.Hristev at microchip.com wrote:
>> On 03.12.2020 13:11, Jaehoon Chung wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> On 12/3/20 7:47 PM, Eugen.Hristev at microchip.com wrote:
>>>> On 03.12.2020 12:38, Jaehoon Chung wrote:
>>>>> Hi,
>>>>>
>>>>> On 12/3/20 6:28 PM, Eugen Hristev wrote:
>>>>>> Add new config for storing environment from sdmmc0.
>>>>>> Also clean-up sama7g5ek_emmc1 to point to the proper mmc device.
>>>>>
>>>>> Just one question, Sorry, i didn't check entire patchset.
>>>>>
>>>>> What is different between sama7g5ek_mmc1 and sama7g5ek_mmc?
>>>>
>>>> Sama7g5ek_mmc is set to store the environment in the eMMC device
>>>> soldered on the board which is connected on the SDMMC0 hardware block.
>>>>
>>>> sama7g5ek_mmc1 is set to store the environment on the SD-Card which can
>>>> be inserted in the SD slot on the board which is connected on the SDMMC1
>>>> hardware block.
>>>>
>>>> So basically we have two possible boot/env store configurations, one on
>>>> eMMC and one on SD-Card .
>>>
>>> If device can know which device is used to boot, then i think that it doesn't need to add one more config.
>>> It can know where env is stored at runtime.
>>> (with CONFIG_ENV_FAT_DEVICE_AND_PART ":<partition>" and implement mmc_get_env_dev())
>>>
>>
>> Can you explain a little more ? I do not understand how.
>> How will u-boot know if it should read the env from SD or eMMC ?
>
> I don't have any knowledge of your SoC. Maybe you know more exactly.
> If its SoC has some registers to get boot device, it's possible to get which device is used to boot device.
It does, but U-boot is not the first stage bootloader. We have a second
stage that initializes the external RAM first.
U-boot is in fact the third stage.
> Then you can implement mmc_get_env_dev() in its board specific file.
> Then it can be got with below sequence.
> In env/fat.c
> env_fat_devc_and_part()
> -> part_str[0] += mmc_get_env_dev()
> -> mmc_get_env_dev() will be returned to proper device after read register relevant to checking device.
>
> If there is no register to get boot device, it may be impossible.
Even if we know the boot device, we do not wish do enforce u-boot to
store the env on the same boot device. This would mean hard rules on
storing the env, which is something we wish to avoid.
We would like to be able to select at compile time where to store the
env and the default boot device. This would allow for example to have a
very fast and small QSPI memory for storing the initial stages , but
have u-boot load linux and store the env from/on eMMCs or SD-Cards.
>
> Best Regards,
> Jaehoon Chung
>
>
>>
>>>
>>> commit 6731bef6966ea2b26cdcfe0109ff5a950003fd03
>>> Refs: v2020.07-1080-g6731bef696
>>> Author: David Woodhouse <dwmw2@infradead.org>
>>> AuthorDate: Fri Jun 19 23:07:17 2020 +0100
>>> Commit: Tom Rini <trini@konsulko.com>
>>> CommitDate: Sun Jul 26 14:35:12 2020 -0400
>>>
>>> env/fat.c: allow loading from a FAT partition on the MMC boot device
>>>
>>> I don't want to have to specify the device; only the partition.
>>>
>>> This allows me to use the same image on internal eMMC or SD card for
>>> Banana Pi R2, and it finds its own environment either way.
>>>
>>> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
>>> [trini: Add #if/#else/#endif logic around CONFIG_SYS_MMC_ENV_DEV usage,
>>> whitespace changes]
>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>
>>>
>>> Best Regards,
>>> Jaehoon Chung
>>>
>>>>
>>>> Eugen
>>>>>
>>>>> Best Regards,
>>>>> Jaehoon Chung
>>>>>
>>>>>>
>>>>>> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
>>>>>> ---
>>>>>> board/atmel/sama7g5ek/MAINTAINERS | 1 +
>>>>>> configs/sama7g5ek_mmc1_defconfig | 7 ++--
>>>>>> configs/sama7g5ek_mmc_defconfig | 67 +++++++++++++++++++++++++++++++
>>>>>> 3 files changed, 72 insertions(+), 3 deletions(-)
>>>>>> create mode 100644 configs/sama7g5ek_mmc_defconfig
>>>>>>
>>>>>> diff --git a/board/atmel/sama7g5ek/MAINTAINERS b/board/atmel/sama7g5ek/MAINTAINERS
>>>>>> index f66953ac4e..eac972968d 100644
>>>>>> --- a/board/atmel/sama7g5ek/MAINTAINERS
>>>>>> +++ b/board/atmel/sama7g5ek/MAINTAINERS
>>>>>> @@ -4,4 +4,5 @@ S: Maintained
>>>>>> F: board/atmel/sama7g5ek.c
>>>>>> F: include/configs/sama7g5ek.h
>>>>>> F: configs/sama7g5ek_mmc1_defconfig
>>>>>> +F: configs/sama7g5ek_mmc_defconfig
>>>>>>
>>>>>> diff --git a/configs/sama7g5ek_mmc1_defconfig b/configs/sama7g5ek_mmc1_defconfig
>>>>>> index fa4c88ffa6..b6d2f4dd05 100644
>>>>>> --- a/configs/sama7g5ek_mmc1_defconfig
>>>>>> +++ b/configs/sama7g5ek_mmc1_defconfig
>>>>>> @@ -2,9 +2,10 @@ CONFIG_ARM=y
>>>>>> CONFIG_ARCH_AT91=y
>>>>>> CONFIG_SYS_TEXT_BASE=0x66f00000
>>>>>> CONFIG_TARGET_SAMA7G5EK=y
>>>>>> -CONFIG_NR_DRAM_BANKS=1
>>>>>> CONFIG_SYS_MALLOC_F_LEN=0x11000
>>>>>> +CONFIG_NR_DRAM_BANKS=1
>>>>>> CONFIG_ENV_SIZE=0x4000
>>>>>> +CONFIG_DM_GPIO=y
>>>>>> CONFIG_DEBUG_UART_BOARD_INIT=y
>>>>>> CONFIG_DEBUG_UART_BASE=0xe1824200
>>>>>> CONFIG_DEBUG_UART_CLOCK=200000000
>>>>>> @@ -14,6 +15,7 @@ CONFIG_ENV_VARS_UBOOT_CONFIG=y
>>>>>> CONFIG_FIT=y
>>>>>> CONFIG_SD_BOOT=y
>>>>>> CONFIG_USE_BOOTARGS=y
>>>>>> +CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/mmcblk1p2 rw rootwait"
>>>>>> CONFIG_MISC_INIT_R=y
>>>>>> CONFIG_HUSH_PARSER=y
>>>>>> CONFIG_CMD_BOOTZ=y
>>>>>> @@ -35,6 +37,7 @@ CONFIG_CMD_EXT4=y
>>>>>> CONFIG_CMD_FAT=y
>>>>>> CONFIG_OF_CONTROL=y
>>>>>> CONFIG_ENV_IS_IN_FAT=y
>>>>>> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
>>>>>> CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>>>>>> CONFIG_DM=y
>>>>>> CONFIG_CLK=y
>>>>>> @@ -44,7 +47,6 @@ CONFIG_AT91_UTMI=y
>>>>>> CONFIG_AT91_GENERIC_CLK=y
>>>>>> CONFIG_AT91_SAM9X60_PLL=y
>>>>>> CONFIG_CPU=y
>>>>>> -CONFIG_DM_GPIO=y
>>>>>> CONFIG_ATMEL_PIO4=y
>>>>>> CONFIG_DM_I2C=y
>>>>>> CONFIG_DM_MMC=y
>>>>>> @@ -56,7 +58,6 @@ CONFIG_DM_ETH=y
>>>>>> CONFIG_MACB=y
>>>>>> CONFIG_PINCTRL=y
>>>>>> CONFIG_PINCTRL_AT91PIO4=y
>>>>>> -# CONFIG_RAM_ROCKCHIP_DEBUG is not set
>>>>>> CONFIG_DM_SERIAL=y
>>>>>> CONFIG_DEBUG_UART_ANNOUNCE=y
>>>>>> CONFIG_ATMEL_USART=y
>>>>>> diff --git a/configs/sama7g5ek_mmc_defconfig b/configs/sama7g5ek_mmc_defconfig
>>>>>> new file mode 100644
>>>>>> index 0000000000..894a64983f
>>>>>> --- /dev/null
>>>>>> +++ b/configs/sama7g5ek_mmc_defconfig
>>>>>> @@ -0,0 +1,67 @@
>>>>>> +CONFIG_ARM=y
>>>>>> +CONFIG_ARCH_AT91=y
>>>>>> +CONFIG_SYS_TEXT_BASE=0x66f00000
>>>>>> +CONFIG_TARGET_SAMA7G5EK=y
>>>>>> +CONFIG_SYS_MALLOC_F_LEN=0x11000
>>>>>> +CONFIG_NR_DRAM_BANKS=1
>>>>>> +CONFIG_ENV_SIZE=0x4000
>>>>>> +CONFIG_DM_GPIO=y
>>>>>> +CONFIG_DEBUG_UART_BOARD_INIT=y
>>>>>> +CONFIG_DEBUG_UART_BASE=0xe1824200
>>>>>> +CONFIG_DEBUG_UART_CLOCK=200000000
>>>>>> +CONFIG_DEFAULT_DEVICE_TREE="sama7g5ek"
>>>>>> +CONFIG_DEBUG_UART=y
>>>>>> +CONFIG_ENV_VARS_UBOOT_CONFIG=y
>>>>>> +CONFIG_FIT=y
>>>>>> +CONFIG_SD_BOOT=y
>>>>>> +CONFIG_USE_BOOTARGS=y
>>>>>> +CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait"
>>>>>> +CONFIG_MISC_INIT_R=y
>>>>>> +CONFIG_HUSH_PARSER=y
>>>>>> +CONFIG_CMD_BOOTZ=y
>>>>>> +# CONFIG_CMD_IMI is not set
>>>>>> +CONFIG_CMD_MD5SUM=y
>>>>>> +CONFIG_CMD_MEMTEST=y
>>>>>> +CONFIG_SYS_MEMTEST_START=0x60000000
>>>>>> +CONFIG_SYS_MEMTEST_END=0x70000000
>>>>>> +CONFIG_CMD_STRINGS=y
>>>>>> +CONFIG_CMD_DM=y
>>>>>> +CONFIG_CMD_GPIO=y
>>>>>> +CONFIG_CMD_I2C=y
>>>>>> +# CONFIG_CMD_LOADS is not set
>>>>>> +CONFIG_CMD_MMC=y
>>>>>> +CONFIG_CMD_DHCP=y
>>>>>> +CONFIG_CMD_MII=y
>>>>>> +CONFIG_CMD_PING=y
>>>>>> +CONFIG_CMD_EXT4=y
>>>>>> +CONFIG_CMD_FAT=y
>>>>>> +CONFIG_OF_CONTROL=y
>>>>>> +CONFIG_ENV_IS_IN_FAT=y
>>>>>> +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
>>>>>> +CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>>>>>> +CONFIG_DM=y
>>>>>> +CONFIG_CLK=y
>>>>>> +CONFIG_CLK_CCF=y
>>>>>> +CONFIG_CLK_AT91=y
>>>>>> +CONFIG_AT91_UTMI=y
>>>>>> +CONFIG_AT91_GENERIC_CLK=y
>>>>>> +CONFIG_AT91_SAM9X60_PLL=y
>>>>>> +CONFIG_CPU=y
>>>>>> +CONFIG_ATMEL_PIO4=y
>>>>>> +CONFIG_DM_I2C=y
>>>>>> +CONFIG_DM_MMC=y
>>>>>> +CONFIG_MMC_SDHCI=y
>>>>>> +CONFIG_MMC_SDHCI_ATMEL=y
>>>>>> +CONFIG_PHY_MICREL=y
>>>>>> +CONFIG_PHY_MICREL_KSZ90X1=y
>>>>>> +CONFIG_DM_ETH=y
>>>>>> +CONFIG_MACB=y
>>>>>> +CONFIG_PINCTRL=y
>>>>>> +CONFIG_PINCTRL_AT91PIO4=y
>>>>>> +CONFIG_DM_SERIAL=y
>>>>>> +CONFIG_DEBUG_UART_ANNOUNCE=y
>>>>>> +CONFIG_ATMEL_USART=y
>>>>>> +CONFIG_TIMER=y
>>>>>> +CONFIG_MCHP_PIT64B_TIMER=y
>>>>>> +CONFIG_OF_LIBFDT_OVERLAY=y
>>>>>> +# CONFIG_EFI_LOADER_HII is not set
>>>>>>
>>>>>
>>>>
>>>
>>
>
next prev parent reply other threads:[~2020-12-04 7:00 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 9:28 [PATCH 00/34] Sama7g5 Evaluation Kit support Eugen Hristev
2020-12-03 9:28 ` [PATCH 01/34] ARM: dts: sama7g5: add initial DT for sama7g5 SoC Eugen Hristev
2020-12-03 9:28 ` [PATCH 02/34] board: atmel: sama7g5ek: add initial support for sama7g5ek Eugen Hristev
2020-12-03 9:28 ` [PATCH 03/34] board: atmel: sama7g5ek: add SYS_MALLOC_F_LEN to SYS_INIT_SP_ADDR Eugen Hristev
2020-12-03 9:28 ` [PATCH 04/34] configs: sama7g5ek: set malloc pool to 68K Eugen Hristev
2020-12-03 9:28 ` [PATCH 05/34] configs: sama7g5ek: enable pll driver Eugen Hristev
2020-12-03 9:28 ` [PATCH 06/34] ARM: dts: sama7g5: move clock frequencies for xtals in board file Eugen Hristev
2020-12-03 9:28 ` [PATCH 07/34] ARM: dts: sama7g5: add slow rc and main rc oscillators Eugen Hristev
2020-12-03 9:28 ` [PATCH 08/34] ARM: dts: sama7g5: add u-boot, dm-pre-reloc bindings for xtals Eugen Hristev
2020-12-03 9:28 ` [PATCH 09/34] ARM: dts: sama7g5: add slow clock bindings Eugen Hristev
2020-12-03 9:28 ` [PATCH 10/34] ARM: dts: sama7g5: add PMC bindings Eugen Hristev
2020-12-03 9:28 ` [PATCH 11/34] ARM: dts: sama7g5: switch to " Eugen Hristev
2020-12-03 9:28 ` [PATCH 12/34] configs: sama7g5: enable CONFIG_CPU Eugen Hristev
2020-12-03 9:28 ` [PATCH 13/34] ARM: dts: sama7g5: add CPU bindings Eugen Hristev
2020-12-03 9:28 ` [PATCH 14/34] configs: sama7g5: use PIT64B Eugen Hristev
2020-12-03 9:28 ` [PATCH 15/34] ARM: dts: sama7g5: enable autoboot Eugen Hristev
2020-12-03 9:28 ` [PATCH 16/34] ARM: dts: sama7g5: add pit64b support Eugen Hristev
2020-12-03 9:28 ` [PATCH 17/34] ARM: dts: at91: sama7g5: add pinctrl node Eugen Hristev
2020-12-03 9:28 ` [PATCH 18/34] ARM: dts: at91: sama7g5ek: add pinctrl for sdmmc1 and flx3 Eugen Hristev
2020-12-03 9:28 ` [PATCH 19/34] configs: sama7g5ek: enable mii command Eugen Hristev
2020-12-03 9:28 ` [PATCH 20/34] ARM: dts: sama7g5: add GMAC0 Eugen Hristev
2020-12-03 9:28 ` [PATCH 21/34] ARM: dts: sama7g5: add GMAC1 Eugen Hristev
2020-12-03 9:28 ` [PATCH 22/34] board: atmel: sama7g5ek: increase arp timeout and retry count Eugen Hristev
2020-12-03 9:28 ` [PATCH 23/34] configs: sama7g5ek: enable support for KSZ9131 Eugen Hristev
2020-12-03 9:28 ` [PATCH 24/34] configs: sama7g5ek: enable CCF Eugen Hristev
2020-12-03 9:28 ` [PATCH 25/34] ARM: dts: at91: sama7g5: add assigned clocks for sdmmc1 Eugen Hristev
2020-12-03 9:28 ` [PATCH 26/34] ARM: dts: at91: sama7g5: add node for sdmmc0 Eugen Hristev
2020-12-03 9:28 ` [PATCH 27/34] ARM: dts: at91: sama7g5ek: enable sdmmc0 with pinctrl Eugen Hristev
2020-12-03 9:28 ` [PATCH 28/34] board: atmel: sama7g5ek: clean-up header bootcommand Eugen Hristev
2020-12-03 9:28 ` [PATCH 29/34] configs: sama7g5: add mmc config for sdmmc0 Eugen Hristev
2020-12-03 10:38 ` Jaehoon Chung
2020-12-03 10:47 ` Eugen.Hristev at microchip.com
2020-12-03 11:11 ` Jaehoon Chung
2020-12-03 11:20 ` Eugen.Hristev at microchip.com
2020-12-03 21:45 ` Jaehoon Chung
2020-12-04 7:00 ` Eugen.Hristev at microchip.com [this message]
2020-12-06 22:15 ` Jaehoon Chung
2020-12-03 9:28 ` [PATCH 30/34] ARM: dts: at91: sama7g5: add flexcom1 and i2c subnode Eugen Hristev
2020-12-03 9:28 ` [PATCH 31/34] ARM: dts: sama7g5ek: add i2c1 bus and eeproms Eugen Hristev
2020-12-03 9:28 ` [PATCH 32/34] board: atmel: sama7g5ek: add support for MAC address retreival Eugen Hristev
2020-12-03 9:28 ` [PATCH 33/34] configs: sama7g5ek: add i2c and eeprom Eugen Hristev
2020-12-03 9:28 ` [PATCH 34/34] ARM: dts: sama7g5ek: fix TXC pin configuration Eugen Hristev
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=4355e46d-8221-1f1a-7ea6-e8d8c52daaf2@microchip.com \
--to=eugen.hristev@microchip.com \
--cc=u-boot@lists.denx.de \
/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