Sama7g5 Evaluation Kit support
cover Sama7g5 Evaluation Kit support
Hello,
This series adds support for sama7g5 SoC DT and the sama7g5ek board. I kept the original incremental development for this board, with each commit's author and designated change, for traceability and for easier reviewing.
The series starts from a basic devicetree and ends with a fully functional board including SD-Card/MMC, i2c eeproms, ethernet.
Thanks,
Eugen
Claudiu Beznea (20):
board: atmel: sama7g5ek: add SYS_MALLOC_F_LEN to SYS_INIT_SP_ADDR
configs: sama7g5ek: set malloc pool to 68K
configs: sama7g5ek: enable pll driver
ARM: dts: sama7g5: move clock frequencies for xtals in board file
ARM: dts: sama7g5: add slow rc and main rc oscillators
ARM: dts: sama7g5: add u-boot,dm-pre-reloc bindings for xtals
ARM: dts: sama7g5: add slow clock bindings
ARM: dts: sama7g5: add PMC bindings
ARM: dts: sama7g5: switch to PMC bindings
configs: sama7g5: enable CONFIG_CPU
ARM: dts: sama7g5: add CPU bindings
configs: sama7g5: use PIT64B
ARM: dts: sama7g5: enable autoboot
ARM: dts: sama7g5: add pit64b support
configs: sama7g5ek: enable mii command
ARM: dts: sama7g5: add GMAC0
ARM: dts: sama7g5: add GMAC1
board: atmel: sama7g5ek: increase arp timeout and retry count
configs: sama7g5ek: enable support for KSZ9131
configs: sama7g5ek: enable CCF
Eugen Hristev (13):
ARM: dts: sama7g5: add initial DT for sama7g5 SoC
board: atmel: sama7g5ek: add initial support for sama7g5ek
ARM: dts: at91: sama7g5: add pinctrl node
ARM: dts: at91: sama7g5ek: add pinctrl for sdmmc1 and flx3
ARM: dts: at91: sama7g5: add assigned clocks for sdmmc1
ARM: dts: at91: sama7g5: add node for sdmmc0
ARM: dts: at91: sama7g5ek: enable sdmmc0 with pinctrl
board: atmel: sama7g5ek: clean-up header bootcommand
configs: sama7g5: add mmc config for sdmmc0
ARM: dts: at91: sama7g5: add flexcom1 and i2c subnode
ARM: dts: sama7g5ek: add i2c1 bus and eeproms
board: atmel: sama7g5ek: add support for MAC address retreival
configs: sama7g5ek: add i2c and eeprom
Nicolas Ferre (1):
ARM: dts: sama7g5ek: fix TXC pin configuration
arch/arm/dts/Makefile | 3 + arch/arm/dts/sama7g5.dtsi | 169 ++++++++++++++++++++++++ arch/arm/dts/sama7g5ek-u-boot.dtsi | 65 ++++++++++ arch/arm/dts/sama7g5ek.dts | 202 +++++++++++++++++++++++++++++ arch/arm/mach-at91/Kconfig | 8 ++ board/atmel/sama7g5ek/Kconfig | 15 +++ board/atmel/sama7g5ek/MAINTAINERS | 8 ++ board/atmel/sama7g5ek/Makefile | 7 + board/atmel/sama7g5ek/sama7g5ek.c | 76 +++++++++++ configs/sama7g5ek_mmc1_defconfig | 70 ++++++++++ configs/sama7g5ek_mmc_defconfig | 70 ++++++++++ include/configs/sama7g5ek.h | 45 +++++++ 12 files changed, 738 insertions(+) create mode 100644 arch/arm/dts/sama7g5.dtsi create mode 100644 arch/arm/dts/sama7g5ek-u-boot.dtsi create mode 100644 arch/arm/dts/sama7g5ek.dts create mode 100644 board/atmel/sama7g5ek/Kconfig create mode 100644 board/atmel/sama7g5ek/MAINTAINERS create mode 100644 board/atmel/sama7g5ek/Makefile create mode 100644 board/atmel/sama7g5ek/sama7g5ek.c create mode 100644 configs/sama7g5ek_mmc1_defconfig create mode 100644 configs/sama7g5ek_mmc_defconfig create mode 100644 include/configs/sama7g5ek.h
Signature · 1 line
2.25.1
PATCH 1/34 ARM: dts: sama7g5: add initial DT for sama7g5 SoC
Add initial basic devicetree for sama7g5 SoC
--- arch/arm/dts/sama7g5.dtsi | 65 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 arch/arm/dts/sama7g5.dtsi
arch/arm/dts/sama7g5.dtsi new file +65 -0
@@ -0,0 +1,65 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * sama7g5.dtsi - Device Tree Include file for SAMA7G5 SoC. + * + * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries + * + * Author: Eugen Hristev <[email protected]> + * Author: Claudiu Beznea <[email protected]> + * + */ + +#include "skeleton.dtsi" + +/ { + model = "Microchip SAMA7G5 family SoC"; + compatible = "microchip,sama7g5"; + + clocks { + slow_xtal: slow_xtal { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + main_xtal: main_xtal { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + mck: mck { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <200000000>; + }; + }; + + ahb { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + + apb { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + + sdmmc1: sdio-host at e1208000 { + compatible = "microchip,sama7g5-sdhci"; + reg = <0xe1208000 0x300>; + clocks = <&mck>, <&mck>, <&mck>; + clock-names = "hclock", "multclk", "baseclk"; + status = "disabled"; + }; + + uart0: serial at e1824200 { + compatible = "atmel,at91sam9260-usart"; + reg = <0xe1824200 0x200>; + clocks = <&mck>; + clock-names = "usart"; + status = "disabled"; + }; + }; + }; +};
Signature · 1 line
2.25.1
PATCH 2/34 board: atmel: sama7g5ek: add initial support for sama7g5ek
In reply to Eugen HristevAdd initial support for sama7g5 evaluation kit board.
--- arch/arm/dts/Makefile | 3 ++ arch/arm/dts/sama7g5ek-u-boot.dtsi | 33 +++++++++++++++ arch/arm/dts/sama7g5ek.dts | 39 +++++++++++++++++ arch/arm/mach-at91/Kconfig | 8 ++++ board/atmel/sama7g5ek/Kconfig | 15 +++++++ board/atmel/sama7g5ek/MAINTAINERS | 7 +++ board/atmel/sama7g5ek/Makefile | 7 +++ board/atmel/sama7g5ek/sama7g5ek.c | 68 ++++++++++++++++++++++++++++++ configs/sama7g5ek_mmc1_defconfig | 59 ++++++++++++++++++++++++++ include/configs/sama7g5ek.h | 46 ++++++++++++++++++++ 10 files changed, 285 insertions(+) create mode 100644 arch/arm/dts/sama7g5ek-u-boot.dtsi create mode 100644 arch/arm/dts/sama7g5ek.dts create mode 100644 board/atmel/sama7g5ek/Kconfig create mode 100644 board/atmel/sama7g5ek/MAINTAINERS create mode 100644 board/atmel/sama7g5ek/Makefile create mode 100644 board/atmel/sama7g5ek/sama7g5ek.c create mode 100644 configs/sama7g5ek_mmc1_defconfig create mode 100644 include/configs/sama7g5ek.h
arch/arm/dts/Makefile +3 -0
@@ -886,6 +886,9 @@ dtb-$(CONFIG_TARGET_OMAP4_SDP4430) += \ dtb-$(CONFIG_TARGET_OMAP5_UEVM) += \ omap5-uevm.dtb +dtb-$(CONFIG_TARGET_SAMA7G5EK) += \ + sama7g5ek.dtb + dtb-$(CONFIG_TARGET_SAMA5D2_PTC_EK) += \ at91-sama5d2_ptc_ek.dtb
arch/arm/dts/sama7g5ek-u-boot.dtsi new file +33 -0
@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * sama7g5ek-u-boot.dts - Device Tree file for SAMA7G5 SoC u-boot properties. + * + * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries + * + * Author: Eugen Hristev <[email protected]> + * Author: Claudiu Beznea <[email protected]> + * + */ + +/ { + chosen { + u-boot,dm-pre-reloc; + }; + + ahb { + u-boot,dm-pre-reloc; + + apb { + u-boot,dm-pre-reloc; + }; + }; +}; + +&uart0 { + u-boot,dm-pre-reloc; +}; + +&mck { + u-boot,dm-pre-reloc; +}; +
arch/arm/dts/sama7g5ek.dts new file +39 -0
@@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * sama7g5ek.dts - Device Tree file for SAMA7G5 EK + * SAMA7G5 Evaluation Kit + * + * Copyright (c) 2020, Microchip Technology Inc. + * 2020, Eugen Hristev <[email protected]> + * 2020, Claudiu Beznea <[email protected]> + */ +/dts-v1/; +#include "sama7g5.dtsi" +#include "sama7g5-pinfunc.h" + +/ { + model = "Microchip SAMA7G5 Evaluation Kit"; + compatible = "microchip,sama7g5ek", "microchip,sama7g54", "microchip,sama7g5", "microchip,sama7"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + ahb { + + apb { + sdmmc1: sdio-host at e1208000 { + bus-width = <4>; + status = "okay"; + }; + + uart0: serial at e1824200 { + status = "okay"; + }; + }; + }; +};
arch/arm/mach-at91/Kconfig +8 -0
@@ -265,6 +265,13 @@ config TARGET_CORVUS select SUPPORT_SPL imply CMD_DM +config TARGET_SAMA7G5EK + bool "SAMA7G5 EK board" + select SAMA7G5 + select BOARD_EARLY_INIT_F + select BOARD_LATE_INIT + + config TARGET_TAURUS bool "Support taurus" select AT91SAM9G20
@@ -327,6 +334,7 @@ source "board/atmel/at91sam9n12ek/Kconfig" source "board/atmel/at91sam9rlek/Kconfig" source "board/atmel/at91sam9x5ek/Kconfig" source "board/atmel/sam9x60ek/Kconfig" +source "board/atmel/sama7g5ek/Kconfig" source "board/atmel/sama5d2_ptc_ek/Kconfig" source "board/atmel/sama5d2_xplained/Kconfig" source "board/atmel/sama5d27_som1_ek/Kconfig"
board/atmel/sama7g5ek/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +if TARGET_SAMA7G5EK + +config SYS_BOARD + default "sama7g5ek" + +config SYS_VENDOR + default "atmel" + +config SYS_SOC + default "at91" + +config SYS_CONFIG_NAME + default "sama7g5ek" + +endif
board/atmel/sama7g5ek/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +SAMA7G5 EK BOARD +M: Eugen Hristev <[email protected]> +S: Maintained +F: board/atmel/sama7g5ek.c +F: include/configs/sama7g5ek.h +F: configs/sama7g5ek_mmc1_defconfig +
board/atmel/sama7g5ek/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2020 Microchip Technology Inc. +# Eugen Hristev <[email protected]> +# + +obj-y += sama7g5ek.o
board/atmel/sama7g5ek/sama7g5ek.c new file +68 -0
68 lines not on this page · raw message
configs/sama7g5ek_mmc1_defconfig new file +59 -0
59 lines not on this page · raw message
include/configs/sama7g5ek.h new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 3/34 board: atmel: sama7g5ek: add SYS_MALLOC_F_LEN to SYS_INIT_SP_ADDR
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Heap base address is computed based on SYS_INIT_SP_ADDR by subtracting the SYS_MALLOC_F_LEN value in board_init_f_init_reserve().
--- include/configs/sama7g5ek.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/configs/sama7g5ek.h +2 -1
@@ -20,7 +20,8 @@#define CONFIG_SYS_INIT_SP_ADDR 0x218000#else #define CONFIG_SYS_INIT_SP_ADDR \ - (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE) + (CONFIG_SYS_SDRAM_BASE + 16 * 1024 + CONFIG_SYS_MALLOC_F_LEN - \ + GENERATED_GBL_DATA_SIZE)#endif #define CONFIG_SYS_LOAD_ADDR 0x62000000/* load address */
Signature · 1 line
2.25.1
PATCH 4/34 configs: sama7g5ek: set malloc pool to 68K
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Set malloc pool to 68K for sama7g5ek.
--- configs/sama7g5ek_mmc1_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/sama7g5ek_mmc1_defconfig +1 -0
@@ -3,6 +3,7 @@ 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_ENV_SIZE=0x4000 CONFIG_DM_GPIO=y CONFIG_DEBUG_UART_BOARD_INIT=y
Signature · 1 line
2.25.1
PATCH 5/34 configs: sama7g5ek: enable pll driver
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Enable PLL driver for SAMA7G5.
--- configs/sama7g5ek_mmc1_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
configs/sama7g5ek_mmc1_defconfig +2 -1
@@ -5,7 +5,6 @@ CONFIG_TARGET_SAMA7G5EK=y CONFIG_NR_DRAM_BANKS=1 CONFIG_SYS_MALLOC_F_LEN=0x11000 CONFIG_ENV_SIZE=0x4000 -CONFIG_DM_GPIO=y CONFIG_DEBUG_UART_BOARD_INIT=y CONFIG_DEBUG_UART_BASE=0xe1824200 CONFIG_DEBUG_UART_CLOCK=200000000
@@ -42,6 +41,8 @@ CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_UTMI=y CONFIG_AT91_GENERIC_CLK=y +CONFIG_AT91_SAM9X60_PLL=y +CONFIG_DM_GPIO=y CONFIG_ATMEL_PIO4=y CONFIG_DM_I2C=y CONFIG_DM_MMC=y
Signature · 1 line
2.25.1
PATCH 6/34 ARM: dts: sama7g5: move clock frequencies for xtals in board file
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Move clock frequencies for crystals on board specific files.
--- arch/arm/dts/sama7g5.dtsi | 2 -- arch/arm/dts/sama7g5ek.dts | 10 ++++++++++ 2 files changed, 10 insertions(+), 2 deletions(-)
arch/arm/dts/sama7g5.dtsi +0 -2
@@ -19,13 +19,11 @@ slow_xtal: slow_xtal { compatible = "fixed-clock"; #clock-cells = <0>; - clock-frequency = <0>; }; main_xtal: main_xtal { compatible = "fixed-clock"; #clock-cells = <0>; - clock-frequency = <0>; }; mck: mck {
arch/arm/dts/sama7g5ek.dts +10 -0
@@ -23,6 +23,16 @@ stdout-path = "serial0:115200n8"; }; + clocks { + slow_xtal: slow_xtal { + clock-frequency = <32768>; + }; + + main_xtal: main_xtal { + clock-frequency = <24000000>; + }; + }; + ahb { apb {
Signature · 1 line
2.25.1
PATCH 7/34 ARM: dts: sama7g5: add slow rc and main rc oscillators
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Add slow rc and main rc oscillators to dtsi.
--- arch/arm/dts/sama7g5.dtsi | 12 ++++++++++++ arch/arm/dts/sama7g5ek-u-boot.dtsi | 8 ++++++++ 2 files changed, 20 insertions(+)
arch/arm/dts/sama7g5.dtsi +12 -0
@@ -16,6 +16,18 @@ compatible = "microchip,sama7g5"; clocks { + slow_rc_osc: slow_rc_osc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <18500>; + }; + + main_rc: main_rc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <12000000>; + }; + slow_xtal: slow_xtal { compatible = "fixed-clock"; #clock-cells = <0>;
arch/arm/dts/sama7g5ek-u-boot.dtsi +8 -0
@@ -23,6 +23,14 @@ }; }; +&main_rc { + u-boot,dm-pre-reloc; +}; + +&slow_rc_osc { + u-boot,dm-pre-reloc; +}; + &uart0 { u-boot,dm-pre-reloc; };
Signature · 1 line
2.25.1
PATCH 8/34 ARM: dts: sama7g5: add u-boot, dm-pre-reloc bindings for xtals
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Add dm-pre-reloc DT binding property for cristals.
--- arch/arm/dts/sama7g5ek-u-boot.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/dts/sama7g5ek-u-boot.dtsi +8 -0
@@ -27,10 +27,18 @@ u-boot,dm-pre-reloc; }; +&main_xtal { + u-boot,dm-pre-reloc; +}; + &slow_rc_osc { u-boot,dm-pre-reloc; }; +&slow_xtal { + u-boot,dm-pre-reloc; +}; + &uart0 { u-boot,dm-pre-reloc; };
Signature · 1 line
2.25.1
PATCH 9/34 ARM: dts: sama7g5: add slow clock bindings
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Add DT bindings for slow clock driver.
--- arch/arm/dts/sama7g5.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/dts/sama7g5.dtsi +7 -0
@@ -55,6 +55,13 @@ #address-cells = <1>; #size-cells = <1>; + clk32: sckc at e001d050 { + compatible = "microchip,sam9x60-sckc"; + reg = <0xe001d050 0x4>; + clocks = <&slow_rc_osc>, <&slow_xtal>; + #clock-cells = <1>; + }; + sdmmc1: sdio-host at e1208000 { compatible = "microchip,sama7g5-sdhci"; reg = <0xe1208000 0x300>;
Signature · 1 line
2.25.1
PATCH 10/34 ARM: dts: sama7g5: add PMC bindings
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Add DT bindings for PMC driver.
--- arch/arm/dts/sama7g5.dtsi | 9 +++++++++ arch/arm/dts/sama7g5ek-u-boot.dtsi | 4 ++++ 2 files changed, 13 insertions(+)
arch/arm/dts/sama7g5.dtsi +9 -0
@@ -55,6 +55,15 @@ #address-cells = <1>; #size-cells = <1>; + pmc: pmc at e0018000 { + compatible = "microchip,sama7g5-pmc"; + reg = <0xe0018000 0x200>; + #clock-cells = <2>; + clocks = <&clk32 1>, <&clk32 0>, <&main_xtal>, <&main_rc>; + clock-names = "td_slck", "md_slck", "main_xtal", "main_rc"; + status = "okay"; + }; + clk32: sckc at e001d050 { compatible = "microchip,sam9x60-sckc"; reg = <0xe001d050 0x4>;
arch/arm/dts/sama7g5ek-u-boot.dtsi +4 -0
@@ -31,6 +31,10 @@ u-boot,dm-pre-reloc; }; +&pmc { + u-boot,dm-pre-reloc; +}; + &slow_rc_osc { u-boot,dm-pre-reloc; };
Signature · 1 line
2.25.1
PATCH 11/34 ARM: dts: sama7g5: switch to PMC bindings
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Get rid of software defined MCK and switch to PMC bindings for IPs currently present in device tree.
--- arch/arm/dts/sama7g5.dtsi | 13 ++++--------- arch/arm/dts/sama7g5ek-u-boot.dtsi | 4 ---- 2 files changed, 4 insertions(+), 13 deletions(-)
arch/arm/dts/sama7g5.dtsi +4 -9
@@ -10,6 +10,7 @@ */ #include "skeleton.dtsi" +#include <dt-bindings/clk/at91.h> / { model = "Microchip SAMA7G5 family SoC";
@@ -37,12 +38,6 @@ compatible = "fixed-clock"; #clock-cells = <0>; }; - - mck: mck { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <200000000>; - }; }; ahb {
@@ -74,15 +69,15 @@ sdmmc1: sdio-host at e1208000 { compatible = "microchip,sama7g5-sdhci"; reg = <0xe1208000 0x300>; - clocks = <&mck>, <&mck>, <&mck>; - clock-names = "hclock", "multclk", "baseclk"; + clocks = <&pmc PMC_TYPE_PERIPHERAL 81>, <&pmc PMC_TYPE_GCK 81>; + clock-names = "hclock", "multclk"; status = "disabled"; }; uart0: serial at e1824200 { compatible = "atmel,at91sam9260-usart"; reg = <0xe1824200 0x200>; - clocks = <&mck>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 41>; clock-names = "usart"; status = "disabled"; };
arch/arm/dts/sama7g5ek-u-boot.dtsi +0 -4
@@ -47,7 +47,3 @@ u-boot,dm-pre-reloc; }; -&mck { - u-boot,dm-pre-reloc; -}; -
Signature · 1 line
2.25.1
PATCH 12/34 configs: sama7g5: enable CONFIG_CPU
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Enable CONFIG_CPU.
--- configs/sama7g5ek_mmc1_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/sama7g5ek_mmc1_defconfig +1 -0
@@ -42,6 +42,7 @@ CONFIG_CLK_AT91=y 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
Signature · 1 line
2.25.1
PATCH 13/34 ARM: dts: sama7g5: add CPU bindings
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Add CPU DT bindings.
--- arch/arm/dts/sama7g5.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/dts/sama7g5.dtsi +12 -0
@@ -40,6 +40,18 @@ }; }; + cpus { + #address-cells = <1>; + #size-cells = <0>; + + A7_0: cpu at 0 { + device_type = "cpu"; + compatible = "arm,cortex-a7"; + clocks = <&pmc PMC_TYPE_CORE 8>, <&pmc PMC_TYPE_CORE 22>, <&main_xtal>; + clock-names = "cpu", "master", "xtal"; + }; + }; + ahb { compatible = "simple-bus"; #address-cells = <1>;
Signature · 1 line
2.25.1
PATCH 14/34 configs: sama7g5: use PIT64B
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Use PIT64B driver. ATMEL_PIT is not available for SAMA7G5.
--- configs/sama7g5ek_mmc1_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/sama7g5ek_mmc1_defconfig +1 -0
@@ -58,5 +58,6 @@ 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
Signature · 1 line
2.25.1
PATCH 15/34 ARM: dts: sama7g5: enable autoboot
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Enable autoboot.
--- configs/sama7g5ek_mmc1_defconfig | 1 - 1 file changed, 1 deletion(-)
configs/sama7g5ek_mmc1_defconfig +0 -1
@@ -16,7 +16,6 @@ CONFIG_SD_BOOT=y CONFIG_USE_BOOTARGS=y CONFIG_MISC_INIT_R=y CONFIG_HUSH_PARSER=y -# CONFIG_AUTOBOOT is not set CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMI is not set CONFIG_CMD_MD5SUM=y
Signature · 1 line
2.25.1
PATCH 16/34 ARM: dts: sama7g5: add pit64b support
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Add DT bindings for PIT64B driver.
--- arch/arm/dts/sama7g5.dtsi | 8 ++++++++ arch/arm/dts/sama7g5ek-u-boot.dtsi | 4 ++++ 2 files changed, 12 insertions(+)
arch/arm/dts/sama7g5.dtsi +8 -0
@@ -86,6 +86,14 @@ status = "disabled"; }; + pit64b0: timer at e1800000 { + compatible = "microchip,sama7g5-pit64b"; + reg = <0xe1800000 0x4000>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 70>, <&pmc PMC_TYPE_GCK 70>; + clock-names = "pclk", "gclk"; + status = "okay"; + }; + uart0: serial at e1824200 { compatible = "atmel,at91sam9260-usart"; reg = <0xe1824200 0x200>;
arch/arm/dts/sama7g5ek-u-boot.dtsi +4 -0
@@ -31,6 +31,10 @@ u-boot,dm-pre-reloc; }; +&pit64b0 { + u-boot,dm-pre-reloc; +}; + &pmc { u-boot,dm-pre-reloc; };
Signature · 1 line
2.25.1
PATCH 17/34 ARM: dts: at91: sama7g5: add pinctrl node
In reply to Eugen HristevAdd pioA pinctrl node.
--- arch/arm/dts/sama7g5.dtsi | 13 +++++++++++++ arch/arm/dts/sama7g5ek-u-boot.dtsi | 8 ++++++++ 2 files changed, 21 insertions(+)
arch/arm/dts/sama7g5.dtsi +13 -0
@@ -62,6 +62,19 @@ #address-cells = <1>; #size-cells = <1>; + pioA: pinctrl at e0014000 { + compatible = "atmel,sama5d2-gpio"; + reg = <0xe0014000 0x800>; + gpio-controller; + #gpio-cells = <2>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 11>; + status = "okay"; + + pinctrl: pinctrl_default { + compatible = "microchip,sama7g5-pinctrl"; + }; + }; + pmc: pmc at e0018000 { compatible = "microchip,sama7g5-pmc"; reg = <0xe0018000 0x200>;
arch/arm/dts/sama7g5ek-u-boot.dtsi +8 -0
@@ -31,6 +31,14 @@ u-boot,dm-pre-reloc; }; +&pioA { + u-boot,dm-pre-reloc; + + pinctrl { + u-boot,dm-pre-reloc; + }; +}; + &pit64b0 { u-boot,dm-pre-reloc; };
Signature · 1 line
2.25.1
PATCH 18/34 ARM: dts: at91: sama7g5ek: add pinctrl for sdmmc1 and flx3
In reply to Eugen HristevAdd pinctrl for sdmmc1 and flx3.
--- arch/arm/dts/sama7g5ek-u-boot.dtsi | 4 ++++ arch/arm/dts/sama7g5ek.dts | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+)
arch/arm/dts/sama7g5ek-u-boot.dtsi +4 -0
@@ -39,6 +39,10 @@ }; }; +&pinctrl_flx3_default { + u-boot,dm-pre-reloc; +}; + &pit64b0 { u-boot,dm-pre-reloc; };
arch/arm/dts/sama7g5ek.dts +30 -0
@@ -38,12 +38,42 @@ apb { sdmmc1: sdio-host at e1208000 { bus-width = <4>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sdmmc1_cmd_data_default + &pinctrl_sdmmc1_ck_cd_rstn_vddsel_default>; status = "okay"; }; uart0: serial at e1824200 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flx3_default>; status = "okay"; }; }; }; }; + +&pinctrl { + pinctrl_flx3_default: flx3_default { + pinmux = <PIN_PD16__FLEXCOM3_IO0>, + <PIN_PD17__FLEXCOM3_IO1>; + bias-disable; + }; + + pinctrl_sdmmc1_cmd_data_default: sdmmc1_cmd_data_default { + pinmux = <PIN_PB29__SDMMC1_CMD>, + <PIN_PB31__SDMMC1_DAT0>, + <PIN_PC0__SDMMC1_DAT1>, + <PIN_PC1__SDMMC1_DAT2>, + <PIN_PC2__SDMMC1_DAT3>; + bias-pull-up; + }; + + pinctrl_sdmmc1_ck_cd_rstn_vddsel_default: sdmmc1_ck_cd_rstn_vddsel_default { + pinmux = <PIN_PB30__SDMMC1_CK>, + <PIN_PB28__SDMMC1_RSTN>, + <PIN_PC5__SDMMC1_1V8SEL>, + <PIN_PC4__SDMMC1_CD>; + bias-pull-up; + }; +};
Signature · 1 line
2.25.1
PATCH 19/34 configs: sama7g5ek: enable mii command
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Enable mii command as ethernet's PHY specific programming is based on it.
--- configs/sama7g5ek_mmc1_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/sama7g5ek_mmc1_defconfig +1 -0
@@ -29,6 +29,7 @@ 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
Signature · 1 line
2.25.1
PATCH 20/34 ARM: dts: sama7g5: add GMAC0
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Add GMAC0.
--- arch/arm/dts/sama7g5.dtsi | 11 +++++++++++ arch/arm/dts/sama7g5ek.dts | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+)
arch/arm/dts/sama7g5.dtsi +11 -0
@@ -114,6 +114,17 @@ clock-names = "usart"; status = "disabled"; }; + + gmac0: ethernet at e2800000 { + compatible = "cdns,sama7g5-gem"; + reg = <0xe2800000 0x4000>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 51>, <&pmc PMC_TYPE_PERIPHERAL 51>, <&pmc PMC_TYPE_GCK 51>; + clock-names = "hclk", "pclk", "tx_clk"; + assigned-clocks = <&pmc PMC_TYPE_GCK 51>; + assigned-clock-parents = <&pmc PMC_TYPE_CORE 21>; /* eth pll div. */ + assigned-clock-rates = <125000000>; + status = "disabled"; + }; }; }; };
arch/arm/dts/sama7g5ek.dts +32 -0
@@ -53,6 +53,19 @@ }; }; +&gmac0 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gmac0_default>; + phy-mode = "rgmii-id"; + status = "okay"; + + ethernet-phy at 7 { + reg = <0x7>; + }; +}; + &pinctrl { pinctrl_flx3_default: flx3_default { pinmux = <PIN_PD16__FLEXCOM3_IO0>,
@@ -76,4 +89,23 @@ <PIN_PC4__SDMMC1_CD>; bias-pull-up; }; + + pinctrl_gmac0_default: gmac0_default { + pinmux = <PIN_PA16__G0_TX0>, + <PIN_PA17__G0_TX1>, + <PIN_PA26__G0_TX2>, + <PIN_PA27__G0_TX3>, + <PIN_PA19__G0_RX0>, + <PIN_PA20__G0_RX1>, + <PIN_PA28__G0_RX2>, + <PIN_PA29__G0_RX3>, + <PIN_PA15__G0_TXEN>, + <PIN_PA24__G0_TXCK>, + <PIN_PA30__G0_RXCK>, + <PIN_PA18__G0_RXDV>, + <PIN_PA22__G0_MDC>, + <PIN_PA23__G0_MDIO>, + <PIN_PA25__G0_125CK>; + bias-disable; + }; };
Signature · 1 line
2.25.1
PATCH 21/34 ARM: dts: sama7g5: add GMAC1
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Add GMAC1.
--- arch/arm/dts/sama7g5.dtsi | 8 ++++++++ arch/arm/dts/sama7g5ek.dts | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+)
arch/arm/dts/sama7g5.dtsi +8 -0
@@ -125,6 +125,14 @@ assigned-clock-rates = <125000000>; status = "disabled"; }; + + gmac1: ethernet at e2804000 { + compatible = "cdns,sama7g5-emac"; + reg = <0xe2804000 0x1000>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 52>, <&pmc PMC_TYPE_PERIPHERAL 52>; + clock-names = "pclk", "hclk"; + status = "disabled"; + }; }; }; };
arch/arm/dts/sama7g5ek.dts +27 -0
@@ -66,6 +66,19 @@ }; }; +&gmac1 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gmac1_default>; + phy-mode = "rmii"; + status = "okay"; + + ethernet-phy at 0 { + reg = <0x0>; + }; +}; + &pinctrl { pinctrl_flx3_default: flx3_default { pinmux = <PIN_PD16__FLEXCOM3_IO0>,
@@ -108,4 +121,18 @@ <PIN_PA25__G0_125CK>; bias-disable; }; + + pinctrl_gmac1_default: gmac1_default { + pinmux = <PIN_PD30__G1_TXCK>, + <PIN_PD22__G1_TX0>, + <PIN_PD23__G1_TX1>, + <PIN_PD21__G1_TXEN>, + <PIN_PD25__G1_RX0>, + <PIN_PD26__G1_RX1>, + <PIN_PD27__G1_RXER>, + <PIN_PD24__G1_RXDV>, + <PIN_PD28__G1_MDC>, + <PIN_PD29__G1_MDIO>; + bias-disable; + }; };
Signature · 1 line
2.25.1
PATCH 22/34 board: atmel: sama7g5ek: increase arp timeout and retry count
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Increase ARP timeout and retry count as this will increase the speed of communication.
--- include/configs/sama7g5ek.h | 3 +++ 1 file changed, 3 insertions(+)
include/configs/sama7g5ek.h +3 -0
@@ -44,4 +44,7 @@/* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) +#define CONFIG_ARP_TIMEOUT 200 +#define CONFIG_NET_RETRY_COUNT 50 +#endif
Signature · 1 line
2.25.1
PATCH 23/34 configs: sama7g5ek: enable support for KSZ9131
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Enable support for KSZ9131.
--- configs/sama7g5ek_mmc1_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/sama7g5ek_mmc1_defconfig +2 -0
@@ -49,6 +49,8 @@ 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
Signature · 1 line
2.25.1
PATCH 24/34 configs: sama7g5ek: enable CCF
In reply to Eugen HristevFrom: Claudiu Beznea <[email protected]>
Enable CCF for SAMA7G5.
--- configs/sama7g5ek_mmc1_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/sama7g5ek_mmc1_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_ENV_IS_IN_FAT=y 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
Signature · 1 line
2.25.1
PATCH 25/34 ARM: dts: at91: sama7g5: add assigned clocks for sdmmc1
In reply to Eugen HristevSDMMC1 requires clock specification with assigned-clocks, such that the PMC will know which parent to assign and the initial start-up frequency.
--- arch/arm/dts/sama7g5.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/dts/sama7g5.dtsi +3 -0
@@ -96,6 +96,9 @@ reg = <0xe1208000 0x300>; clocks = <&pmc PMC_TYPE_PERIPHERAL 81>, <&pmc PMC_TYPE_GCK 81>; clock-names = "hclock", "multclk"; + assigned-clocks = <&pmc PMC_TYPE_GCK 81>; + assigned-clock-rates = <200000000>; + assigned-clock-parents = <&pmc PMC_TYPE_CORE 10>; /* sys pll div. */ status = "disabled"; };
Signature · 1 line
2.25.1
PATCH 26/34 ARM: dts: at91: sama7g5: add node for sdmmc0
In reply to Eugen HristevAdd node for sdmmc0 block.
--- arch/arm/dts/sama7g5.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/dts/sama7g5.dtsi +11 -0
@@ -91,6 +91,17 @@ #clock-cells = <1>; }; + sdmmc0: sdio-host at e1204000 { + compatible = "microchip,sama7g5-sdhci"; + reg = <0xe1204000 0x300>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 80>, <&pmc PMC_TYPE_GCK 80>; + clock-names = "hclock", "multclk"; + assigned-clocks = <&pmc PMC_TYPE_GCK 80>; + assigned-clock-rates = <200000000>; + assigned-clock-parents = <&pmc PMC_TYPE_CORE 10>; /* sys pll div. */ + status = "disabled"; + }; + sdmmc1: sdio-host at e1208000 { compatible = "microchip,sama7g5-sdhci"; reg = <0xe1208000 0x300>;
Signature · 1 line
2.25.1
PATCH 27/34 ARM: dts: at91: sama7g5ek: enable sdmmc0 with pinctrl
In reply to Eugen HristevEnable sdmmc0 on this board. A non-removable eMMC is connected on this block.
Configure pincontrol accordingly.
--- arch/arm/dts/sama7g5ek.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm/dts/sama7g5ek.dts +30 -0
@@ -36,6 +36,15 @@ ahb { apb { + sdmmc0: sdio-host at e1204000 { + bus-width = <8>; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sdmmc0_cmd_data_default + &pinctrl_sdmmc0_ck_rstn_ds_cd_default>; + status = "okay"; + }; + sdmmc1: sdio-host at e1208000 { bus-width = <4>; pinctrl-names = "default";
@@ -86,6 +95,27 @@ bias-disable; }; + pinctrl_sdmmc0_cmd_data_default: sdmmc0_cmd_data_default { + pinmux = <PIN_PA1__SDMMC0_CMD>, + <PIN_PA3__SDMMC0_DAT0>, + <PIN_PA4__SDMMC0_DAT1>, + <PIN_PA5__SDMMC0_DAT2>, + <PIN_PA6__SDMMC0_DAT3>, + <PIN_PA7__SDMMC0_DAT4>, + <PIN_PA8__SDMMC0_DAT5>, + <PIN_PA9__SDMMC0_DAT6>, + <PIN_PA10__SDMMC0_DAT7>; + bias-pull-up; + }; + + pinctrl_sdmmc0_ck_rstn_ds_cd_default: sdmmc0_ck_rstn_ds_cd_default { + pinmux = <PIN_PA0__SDMMC0_CK>, + <PIN_PA2__SDMMC0_RSTN>, + <PIN_PA11__SDMMC0_DS>, + <PIN_PA14__SDMMC0_CD>; + bias-pull-up; + }; + pinctrl_sdmmc1_cmd_data_default: sdmmc1_cmd_data_default { pinmux = <PIN_PB29__SDMMC1_CMD>, <PIN_PB31__SDMMC1_DAT0>,
Signature · 1 line
2.25.1
PATCH 28/34 board: atmel: sama7g5ek: clean-up header bootcommand
In reply to Eugen HristevClean-up boot command to use the predefined device and part for FAT environment.
According to this device and partition, select the proper boot media.
--- include/configs/sama7g5ek.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
include/configs/sama7g5ek.h +3 -8
@@ -29,16 +29,11 @@#undef CONFIG_BOOTCOMMAND#ifdef CONFIG_SD_BOOT /* u-boot env in sd/mmc card */ -#define FAT_ENV_INTERFACE "mmc" -#define FAT_ENV_DEVICE_AND_PART "0" -#define FAT_ENV_FILE "uboot.env" +/* bootstrap + u-boot + env in sd card */ -#define CONFIG_BOOTCOMMAND "fatload mmc 0:1 0x61000000 at91-sama7g5ek.dtb; " \ - "fatload mmc 0:1 0x62000000 zImage; " \ +#define CONFIG_BOOTCOMMAND "fatload mmc " CONFIG_ENV_FAT_DEVICE_AND_PART " 0x61000000 at91-sama7g5ek.dtb; " \ + "fatload mmc " CONFIG_ENV_FAT_DEVICE_AND_PART " 0x62000000 zImage; " \ "bootz 0x62000000 - 0x61000000" -#undef CONFIG_BOOTARGS -#define CONFIG_BOOTARGS \ - "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait"#endif /* Size of malloc() pool */
Signature · 1 line
2.25.1
PATCH 29/34 configs: sama7g5: add mmc config for sdmmc0
In reply to Eugen HristevAdd new config for storing environment from sdmmc0. Also clean-up sama7g5ek_emmc1 to point to the proper mmc device.
--- 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
board/atmel/sama7g5ek/MAINTAINERS +1 -0
@@ -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
configs/sama7g5ek_mmc1_defconfig +4 -3
@@ -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
configs/sama7g5ek_mmc_defconfig new file +67 -0
67 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 29/34 configs: sama7g5: add mmc config for sdmmc0
Hi,
Quoted 2 lines · Eugen Hristev
Add new config for storing environment from sdmmc0. Also clean-up
sama7g5ek_emmc1to 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?
Best Regards,
Jaehoon Chung
Quoted 141 lines
Signed-off-by Eugen Hristev <[email protected]>--- 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_defconfigboard/atmel/sama7g5ek/MAINTAINERS +1
-0@@ -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_defconfigconfigs/sama7g5ek_mmc1_defconfig +4
-3@@ -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=yconfigs/sama7g5ek_mmc_defconfig new file +67
-0@@ -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
PATCH 29/34 configs: sama7g5: add mmc config for sdmmc0
Quoted 9 lines · Jaehoon Chung
Hi,
Quoted 2 lines · Eugen Hristev
Add new config for storing environment from sdmmc0. Also clean-up
sama7g5ek_emmc1to point to the proper mmc device.Just one question, Sorry, i didn't check entire patchset.
What is different between
sama7g5ek_mmc1andsama7g5ek_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 .
Eugen
Quoted 146 lines
Best Regards,
Jaehoon ChungQuoted 141 lines
Signed-off-by Eugen Hristev <[email protected]>--- 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
board/atmel/sama7g5ek/MAINTAINERS +1
-0@@ -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_defconfigconfigs/sama7g5ek_mmc1_defconfig +4
-3@@ -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=yconfigs/sama7g5ek_mmc_defconfig new file +67
-0@@ -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
PATCH 29/34 configs: sama7g5: add mmc config for sdmmc0
Quoted 14 lines · Eugen.Hristev at microchip.com
Quoted 9 lines · Jaehoon Chung
Hi,
Quoted 2 lines · Eugen Hristev
Add new config for storing environment from sdmmc0. Also clean-up
sama7g5ek_emmc1to point to the proper mmc device.Just one question, Sorry, i didn't check entire patchset.
What is different between
sama7g5ek_mmc1andsama7g5ek_mmc?
Sama7g5ek_mmcis set to store the environment in the eMMC device soldered on the board which is connected on the SDMMC0 hardware block.
Quoted 6 lines
sama7g5ek_mmc1is 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())
commit 6731bef6966ea2b26cdcfe0109ff5a950003fd03
Refs: v2020.07-1080-g6731bef696 Author: David Woodhouse <[email protected]> AuthorDate: Fri Jun 19 23:07:17 2020 +0100 Commit: Tom Rini <[email protected]> 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.
[trini: Add #if/#else/#endif logic around CONFIG_SYS_MMC_ENV_DEV usage,
whitespace changes]
Best Regards,
Jaehoon Chung
Quoted 149 lines
Eugen
Quoted 146 lines
Best Regards,
Jaehoon ChungQuoted 141 lines
Signed-off-by Eugen Hristev <[email protected]>--- 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
board/atmel/sama7g5ek/MAINTAINERS +1
-0@@ -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_defconfigconfigs/sama7g5ek_mmc1_defconfig +4
-3@@ -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=yconfigs/sama7g5ek_mmc_defconfig new file +67
-0@@ -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
PATCH 29/34 configs: sama7g5: add mmc config for sdmmc0
Quoted 21 lines · Jaehoon Chung
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 18 lines · Eugen.Hristev at microchip.com
Quoted 9 lines · Jaehoon Chung
Hi,
Quoted 2 lines · Eugen Hristev
Add new config for storing environment from sdmmc0. Also clean-up
sama7g5ek_emmc1to point to the proper mmc device.Just one question, Sorry, i didn't check entire patchset.
What is different between
sama7g5ek_mmc1andsama7g5ek_mmc?
Sama7g5ek_mmcis set to store the environment in the eMMC device soldered on the board which is connected on the SDMMC0 hardware block.
sama7g5ek_mmc1is 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.
Quoted 7 lines
Quoted 2 lines
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.
(withCONFIG_ENV_FAT_DEVICE_AND_PART":<partition>" and implementmmc_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 ?
Quoted 174 lines
commit
6731bef6966ea2b26cdcfe0109ff5a950003fd03Refs: v2020.07-1080-g6731bef696 Author: David Woodhouse <[email protected]> AuthorDate: Fri Jun 19 23:07:17 2020 +0100 Commit: Tom Rini <[email protected]> CommitDate: Sun Jul 26 14:35:12 2020 -0400
env/fat.c: allow loading from a FAT partition on the MMC boot deviceI 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 <[email protected]>[trini: Add #if/#else/#endif logic around
CONFIG_SYS_MMC_ENV_DEVusage,
whitespace changes]Signed-off-by Tom Rini <[email protected]>Best Regards,
Jaehoon ChungQuoted 149 lines
Eugen
Quoted 146 lines
Best Regards,
Jaehoon ChungQuoted 141 lines
Signed-off-by Eugen Hristev <[email protected]>--- 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
board/atmel/sama7g5ek/MAINTAINERS +1
-0@@ -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_defconfigconfigs/sama7g5ek_mmc1_defconfig +4
-3@@ -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=yconfigs/sama7g5ek_mmc_defconfig new file +67
-0@@ -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
PATCH 29/34 configs: sama7g5: add mmc config for sdmmc0
Hi,
Quoted 25 lines · Eugen.Hristev at microchip.com
Quoted 24 lines · Jaehoon Chung
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 20 lines · Eugen.Hristev at microchip.com
Quoted 9 lines · Jaehoon Chung
Hi,
Quoted 2 lines · Eugen Hristev
Add new config for storing environment from sdmmc0. Also clean-up
sama7g5ek_emmc1to point to the proper mmc device.Just one question, Sorry, i didn't check entire patchset.
What is different between
sama7g5ek_mmc1andsama7g5ek_mmc?
Sama7g5ek_mmcis set to store the environment in the eMMC device soldered on the board which is connected on the SDMMC0 hardware block.
sama7g5ek_mmc1is 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 .
Quoted 7 lines
Quoted 4 lines
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.
(withCONFIG_ENV_FAT_DEVICE_AND_PART":<partition>" and implementmmc_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. Then you can implement mmc_get_env_dev() in its board specific file.
Then it can be got with below sequence.
In env/fat.cenv_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.
Best Regards,
Jaehoon Chung
Quoted 176 lines
Quoted 175 lines
commit
6731bef6966ea2b26cdcfe0109ff5a950003fd03Refs: v2020.07-1080-g6731bef696 Author: David Woodhouse <[email protected]> AuthorDate: Fri Jun 19 23:07:17 2020 +0100 Commit: Tom Rini <[email protected]> CommitDate: Sun Jul 26 14:35:12 2020 -0400
env/fat.c: allow loading from a FAT partition on the MMC boot deviceI 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 <[email protected]>[trini: Add #if/#else/#endif logic around
CONFIG_SYS_MMC_ENV_DEVusage,
whitespace changes]Signed-off-by Tom Rini <[email protected]>Best Regards,
Jaehoon ChungQuoted 149 lines
Eugen
Quoted 146 lines
Best Regards,
Jaehoon ChungQuoted 141 lines
Signed-off-by Eugen Hristev <[email protected]>--- 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
board/atmel/sama7g5ek/MAINTAINERS +1
-0@@ -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_defconfigconfigs/sama7g5ek_mmc1_defconfig +4
-3@@ -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=yconfigs/sama7g5ek_mmc_defconfig new file +67
-0@@ -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
PATCH 29/34 configs: sama7g5: add mmc config for sdmmc0
Quoted 33 lines · Jaehoon Chung
Hi,
Quoted 30 lines · Eugen.Hristev at microchip.com
Quoted 28 lines · Jaehoon Chung
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 14 lines · Eugen.Hristev at microchip.com
Quoted 9 lines · Jaehoon Chung
Hi,
Quoted 2 lines · Eugen Hristev
Add new config for storing environment from sdmmc0. Also clean-up
sama7g5ek_emmc1to point to the proper mmc device.Just one question, Sorry, i didn't check entire patchset.
What is different between
sama7g5ek_mmc1andsama7g5ek_mmc?
Sama7g5ek_mmcis set to store the environment in the eMMC device soldered on the board which is connected on the SDMMC0 hardware block.Quoted 6 lines
sama7g5ek_mmc1is 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.
(withCONFIG_ENV_FAT_DEVICE_AND_PART":<partition>" and implementmmc_get_env_dev())
Quoted 5 lines
Quoted 2 lines
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.
Quoted 8 lines
Then you can implement
mmc_get_env_dev()in its board specific file.
Then it can be got with below sequence.
Inenv/fat.cenv_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.
Quoted 182 lines
Best Regards,
Jaehoon ChungQuoted 176 lines
Quoted 175 lines
commit
6731bef6966ea2b26cdcfe0109ff5a950003fd03Refs: v2020.07-1080-g6731bef696 Author: David Woodhouse <[email protected]> AuthorDate: Fri Jun 19 23:07:17 2020 +0100 Commit: Tom Rini <[email protected]> CommitDate: Sun Jul 26 14:35:12 2020 -0400
env/fat.c: allow loading from a FAT partition on the MMC boot deviceI 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 <[email protected]>[trini: Add #if/#else/#endif logic around
CONFIG_SYS_MMC_ENV_DEVusage,
whitespace changes]Signed-off-by Tom Rini <[email protected]>Best Regards,
Jaehoon ChungQuoted 149 lines
Eugen
Quoted 146 lines
Best Regards,
Jaehoon ChungQuoted 141 lines
Signed-off-by Eugen Hristev <[email protected]>--- 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
board/atmel/sama7g5ek/MAINTAINERS +1
-0@@ -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_defconfigconfigs/sama7g5ek_mmc1_defconfig +4
-3@@ -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=yconfigs/sama7g5ek_mmc_defconfig new file +67
-0@@ -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
PATCH 29/34 configs: sama7g5: add mmc config for sdmmc0
Quoted 37 lines · Eugen.Hristev at microchip.com
Quoted 36 lines · Jaehoon Chung
Hi,
Quoted 32 lines · Eugen.Hristev at microchip.com
Quoted 21 lines · Jaehoon Chung
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 18 lines · Eugen.Hristev at microchip.com
Quoted 9 lines · Jaehoon Chung
Hi,
Quoted 2 lines · Eugen Hristev
Add new config for storing environment from sdmmc0. Also clean-up
sama7g5ek_emmc1to point to the proper mmc device.Just one question, Sorry, i didn't check entire patchset.
What is different between
sama7g5ek_mmc1andsama7g5ek_mmc?
Sama7g5ek_mmcis set to store the environment in the eMMC device soldered on the board which is connected on the SDMMC0 hardware block.
sama7g5ek_mmc1is 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.Quoted 7 lines
Quoted 2 lines
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.
(withCONFIG_ENV_FAT_DEVICE_AND_PART":<partition>" and implementmmc_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 ?
Quoted 6 lines
Quoted 2 lines
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.
It doesn't matter which stage is used. It's dependent with your register. If your bl0 is checking which device is used, it can be set to register.
- I don't know how to implement your bl0..so it's just guessing.
Quoted 8 lines
Quoted 8 lines
Then you can implement
mmc_get_env_dev()in its board specific file.
Then it can be got with below sequence.
In env/fenv_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.
Quoted 5 lines
Quoted 1 line
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.
I understood what you want.
As i already mentioned, i didn't check this patchset fully. Just it seemed taht your configuration is duplicated, except env location. I don't have any objection about your patch. :)
Just had a question whether it can be used one config or not.
Thanks for explanation kindly.
Best Regards,
Jaehoon Chung
Quoted 187 lines
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.
Quoted 182 lines
Best Regards,
Jaehoon ChungQuoted 176 lines
Quoted 175 lines
commit
6731bef6966ea2b26cdcfe0109ff5a950003fd03Refs: v2020.07-1080-g6731bef696 Author: David Woodhouse <[email protected]> AuthorDate: Fri Jun 19 23:07:17 2020 +0100 Commit: Tom Rini <[email protected]> CommitDate: Sun Jul 26 14:35:12 2020 -0400
env/fat.c: allow loading from a FAT partition on the MMC boot deviceI 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 <[email protected]>[trini: Add #if/#else/#endif logic around
CONFIG_SYS_MMC_ENV_DEVusage,
whitespace changes]Signed-off-by Tom Rini <[email protected]>Best Regards,
Jaehoon ChungQuoted 149 lines
Eugen
Quoted 146 lines
Best Regards,
Jaehoon ChungQuoted 141 lines
Signed-off-by Eugen Hristev <[email protected]>--- 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
board/atmel/sama7g5ek/MAINTAINERS +1
-0@@ -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_defconfigconfigs/sama7g5ek_mmc1_defconfig +4
-3@@ -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=yconfigs/sama7g5ek_mmc_defconfig new file +67
-0@@ -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
PATCH 30/34 ARM: dts: at91: sama7g5: add flexcom1 and i2c subnode
In reply to Eugen HristevAdd flexcom1 and i2c subnode.
--- arch/arm/dts/sama7g5.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/dts/sama7g5.dtsi +17 -0
@@ -121,6 +121,23 @@ status = "okay"; }; + flx1: flexcom at e181c000 { + compatible = "atmel,sama5d2-flexcom"; + reg = <0xe181c000 0x200>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 39>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0xe181c000 0x800>; + status = "disabled"; + + i2c1: i2c at 600 { + compatible = "atmel,sama5d2-i2c"; + reg = <0x600 0x200>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 39>; + }; + }; uart0: serial at e1824200 { compatible = "atmel,at91sam9260-usart"; reg = <0xe1824200 0x200>;
Signature · 1 line
2.25.1
PATCH 31/34 ARM: dts: sama7g5ek: add i2c1 bus and eeproms
In reply to Eugen HristevAdd node for flx1 i2c1 subnode (and alias to bus 0) This bus has two eeprom devices connected.
--- arch/arm/dts/sama7g5ek.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm/dts/sama7g5ek.dts +30 -0
@@ -17,6 +17,7 @@ aliases { serial0 = &uart0; + i2c0 = &i2c1; }; chosen {
@@ -62,6 +63,29 @@ }; }; +&flx1 { + atmel,flexcom-mode = <3>; + status = "okay"; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flx1_default>; + status = "okay"; + + eeprom at 52 { + compatible = "atmel,24c32"; + reg = <0x52>; + pagesize = <16>; + }; + + eeprom at 53 { + compatible = "atmel,24c32"; + reg = <0x53>; + pagesize = <16>; + }; +}; + &gmac0 { #address-cells = <1>; #size-cells = <0>;
@@ -89,6 +113,12 @@ }; &pinctrl { + pinctrl_flx1_default: flx1_default { + pinmux = <PIN_PC9__FLEXCOM1_IO0>, + <PIN_PC10__FLEXCOM1_IO1>; + bias-disable; + }; + pinctrl_flx3_default: flx3_default { pinmux = <PIN_PD16__FLEXCOM3_IO0>, <PIN_PD17__FLEXCOM3_IO1>;
Signature · 1 line
2.25.1
PATCH 32/34 board: atmel: sama7g5ek: add support for MAC address retreival
In reply to Eugen HristevObtain two MAC addresses from the two EEPROMs and configure the two available Ethernet interfaces accordingly.
--- board/atmel/sama7g5ek/sama7g5ek.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
board/atmel/sama7g5ek/sama7g5ek.c +13 -5
@@ -46,6 +46,19 @@ int board_early_init_f(void)return 0 ; } +#define MAC24AA_MAC_OFFSET 0xfa + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r (void ) +{ +#ifdef CONFIG_I2C_EEPROM +at91_set_ethaddr (MAC24AA_MAC_OFFSET ); +at91_set_eth1addr (MAC24AA_MAC_OFFSET ); +#endif +return 0 ; +} +#endif +int board_init (void ) {/* address of boot parameters */
@@ -61,8 +74,3 @@ int dram_init(void)return 0 ; } -int misc_init_r (void ) -{ -return 0 ; -} -
Signature · 1 line
2.25.1
PATCH 33/34 configs: sama7g5ek: add i2c and eeprom
In reply to Eugen HristevAdd drivers for flexcom, i2c and eeproms
--- configs/sama7g5ek_mmc1_defconfig | 3 +++ configs/sama7g5ek_mmc_defconfig | 3 +++ 2 files changed, 6 insertions(+)
configs/sama7g5ek_mmc1_defconfig +3 -0
@@ -49,6 +49,9 @@ CONFIG_AT91_SAM9X60_PLL=y CONFIG_CPU=y CONFIG_ATMEL_PIO4=y CONFIG_DM_I2C=y +CONFIG_SYS_I2C_AT91=y +CONFIG_I2C_EEPROM=y +CONFIG_MICROCHIP_FLEXCOM=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ATMEL=y
configs/sama7g5ek_mmc_defconfig +3 -0
@@ -49,6 +49,9 @@ CONFIG_AT91_SAM9X60_PLL=y CONFIG_CPU=y CONFIG_ATMEL_PIO4=y CONFIG_DM_I2C=y +CONFIG_SYS_I2C_AT91=y +CONFIG_I2C_EEPROM=y +CONFIG_MICROCHIP_FLEXCOM=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ATMEL=y
Signature · 1 line
2.25.1
PATCH 34/34 ARM: dts: sama7g5ek: fix TXC pin configuration
In reply to Eugen HristevFrom: Nicolas Ferre <[email protected]>
TXC line is directly connected from the SoC to the KSZ9131 PHY. There is a transient state on this signal, before configuring it to RGMII, which leads to packet transmit being blocked.
Keeping a pull-up when muxing this pin as function A (G0_TXCK) fixes the issue.
--- arch/arm/dts/sama7g5ek.dts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/dts/sama7g5ek.dts +6 -2
@@ -90,7 +90,7 @@ #address-cells = <1>; #size-cells = <0>; pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_gmac0_default>; + pinctrl-0 = <&pinctrl_gmac0_default &pinctrl_gmac0_txc_default>; phy-mode = "rgmii-id"; status = "okay";
@@ -173,7 +173,6 @@ <PIN_PA28__G0_RX2>, <PIN_PA29__G0_RX3>, <PIN_PA15__G0_TXEN>, - <PIN_PA24__G0_TXCK>, <PIN_PA30__G0_RXCK>, <PIN_PA18__G0_RXDV>, <PIN_PA22__G0_MDC>,
@@ -182,6 +181,11 @@ bias-disable; }; + pinctrl_gmac0_txc_default: gmac0_txc_default { + pinmux = <PIN_PA24__G0_TXCK>; + bias-pull-up; + }; + pinctrl_gmac1_default: gmac1_default { pinmux = <PIN_PD30__G1_TXCK>, <PIN_PD22__G1_TX0>,
Signature · 1 line
2.25.1