All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] board: Atmel: Add SAMA5D27 giant board
@ 2021-01-21 16:55 Greg Gallagher
  2021-01-21 16:55 ` [PATCH 2/3] configs: sama5d27_som1_ek: Set FDT filename based on defconfig Greg Gallagher
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Greg Gallagher @ 2021-01-21 16:55 UTC (permalink / raw)
  To: u-boot

Giant board is a tiny SBC based on the Adafruit Feather form factor,
created by groboards it contains a SAMA5D2 processor (SAMA5D27),
128 MB of RAM and a microSD card for storage.

Signed-off-by: Greg Gallagher <greg@embeddedgreg.com>
---

 arch/arm/dts/Makefile                     |   3 +-
 arch/arm/dts/at91-sama5d27_giantboard.dts | 128 ++++++++++++++++++++++
 board/atmel/sama5d27_som1_ek/MAINTAINERS  |   6 +
 configs/sama5d27_giantboard_defconfig     |  97 ++++++++++++++++
 4 files changed, 233 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/at91-sama5d27_giantboard.dts
 create mode 100644 configs/sama5d27_giantboard_defconfig

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index e320c2254e..8a6a8bcee3 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -905,7 +905,8 @@ dtb-$(CONFIG_TARGET_SAMA5D2_XPLAINED) += \
 	at91-sama5d2_xplained.dtb
 
 dtb-$(CONFIG_TARGET_SAMA5D27_SOM1_EK) += \
-	at91-sama5d27_som1_ek.dtb
+	at91-sama5d27_som1_ek.dtb   \
+	at91-sama5d27_giantboard.dtb
 
 dtb-$(CONFIG_TARGET_SAMA5D27_WLSOM1_EK) += \
 	at91-sama5d27_wlsom1_ek.dtb
diff --git a/arch/arm/dts/at91-sama5d27_giantboard.dts b/arch/arm/dts/at91-sama5d27_giantboard.dts
new file mode 100644
index 0000000000..e81ca60ca0
--- /dev/null
+++ b/arch/arm/dts/at91-sama5d27_giantboard.dts
@@ -0,0 +1,128 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * at91-sama5d27_giantboard.dts - Device Tree file for Giant Board
+ *
+ * Copyright (C) 2020 Greg Gallagher <greg@embeddedgreg.com>
+ *
+ * Derived from at91-sama5d27_som1_ek.dts
+ *
+ * Copyright (C) 2017 Microchip Corporation
+ *		      Wenyou Yang <wenyou.yang@microchip.com>
+ */
+/dts-v1/;
+#include "sama5d2.dtsi"
+#include "sama5d2-pinfunc.h"
+
+/ {
+	model = "Giant Board";
+	compatible = "atmel,sama5d27-giantboard", "atmel,sama5d2", "atmel,sama5";
+
+	memory {
+		reg = <0x20000000 0x8000000>;
+	};
+
+	chosen {
+		u-boot,dm-pre-reloc;
+		stdout-path = &uart1;
+	};
+
+	ahb {
+		sdmmc1: sdio-host at b0000000 {
+			bus-width = <4>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinctrl_sdmmc1_cmd_dat_default &pinctrl_sdmmc1_ck_cd_default>;
+			status = "okay";
+			u-boot,dm-pre-reloc;
+		};
+
+		apb {
+
+			uart1: serial at f8020000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_uart1_default>;
+				status = "okay";
+				u-boot,dm-pre-reloc;
+			};
+
+			i2c0: i2c at f8028000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_i2c0_default>;
+				status = "okay";
+			};
+
+			i2c1: i2c at fc028000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_i2c1_default>;
+				status = "okay";
+
+				pmic at 5b {
+					compatible = "active-semi,act8945a";
+					reg = <0x5b>;
+					active-semi,vsel-low;
+					status = "okay";
+				};
+			};
+
+			pit: timer at f8048030 {
+				status = "okay";
+				u-boot,dm-pre-reloc;
+			};
+
+			sfr: sfr at f8030000 {
+				status = "okay";
+				u-boot,dm-pre-reloc;
+			};
+
+			pioA: gpio at fc038000 {
+				pinctrl {
+
+					pinctrl_sdmmc1_cmd_dat_default: sdmmc1_cmd_dat_default {
+						pinmux = <PIN_PA28__SDMMC1_CMD>,
+							 <PIN_PA18__SDMMC1_DAT0>,
+							 <PIN_PA19__SDMMC1_DAT1>,
+							 <PIN_PA20__SDMMC1_DAT2>,
+							 <PIN_PA21__SDMMC1_DAT3>;
+						bias-pull-up;
+						u-boot,dm-pre-reloc;
+					};
+
+					pinctrl_sdmmc1_ck_cd_default: sdmmc1_ck_cd_default {
+						pinmux = <PIN_PA22__SDMMC1_CK>,
+							 <PIN_PA30__SDMMC1_CD>;
+						bias-disable;
+						u-boot,dm-pre-reloc;
+					};
+
+					pinctrl_uart1_default: uart1_default {
+						pinmux = <PIN_PD2__URXD1>,
+							 <PIN_PD3__UTXD1>;
+						bias-disable;
+						u-boot,dm-pre-reloc;
+					};
+
+					pinctrl_i2c0_default: i2c0_default {
+						pinmux = <PIN_PD21__TWD0>,
+							 <PIN_PD22__TWCK0>;
+						bias-disable;
+					};
+
+					pinctrl_i2c1_default: i2c1_default {
+						pinmux = <PIN_PD4__TWD1>,
+							 <PIN_PD5__TWCK1>;
+						bias-disable;
+					};
+
+					pinctrl_usb_default: usb_default {
+						pinmux = <PIN_PB10__GPIO>;
+						bias-disable;
+					};
+
+					pinctrl_usba_vbus: usba_vbus {
+						pinmux = <PIN_PA31__GPIO>;
+						bias-disable;
+					};
+				};
+			};
+		};
+	};
+};
diff --git a/board/atmel/sama5d27_som1_ek/MAINTAINERS b/board/atmel/sama5d27_som1_ek/MAINTAINERS
index f2d2f49db3..ba2f31e6c4 100644
--- a/board/atmel/sama5d27_som1_ek/MAINTAINERS
+++ b/board/atmel/sama5d27_som1_ek/MAINTAINERS
@@ -6,3 +6,9 @@ F:	include/configs/sama5d27_som1_ek.h
 F:	configs/sama5d27_som1_ek_mmc_defconfig
 F:	configs/sama5d27_som1_ek_mmc1_defconfig
 F:	configs/sama5d27_som1_ek_qspiflash_defconfig
+
+SAMA5D27 GIANT BOARD
+M:	Greg Gallagher <greg@embeddedgreg.com>
+S:	Maintained
+F:	configs/sama5d27_giantboard_defconfig
+F:	arch/arm/dts/at91-sama5d27_giantboard.dts
diff --git a/configs/sama5d27_giantboard_defconfig b/configs/sama5d27_giantboard_defconfig
new file mode 100644
index 0000000000..4e55a62625
--- /dev/null
+++ b/configs/sama5d27_giantboard_defconfig
@@ -0,0 +1,97 @@
+CONFIG_ARM=y
+CONFIG_ARCH_CPU_INIT=y
+CONFIG_ARCH_AT91=y
+CONFIG_CMDLINE=y
+CONFIG_SYS_TEXT_BASE=0x23f00000
+CONFIG_TARGET_SAMA5D27_SOM1_EK=y
+CONFIG_SAMA5D27_GIANTBOARD=y
+CONFIG_SPL_GPIO_SUPPORT=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
+CONFIG_ENV_SIZE=0x4000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_SPL=y
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_BASE=0xf8020000
+CONFIG_DEBUG_UART_CLOCK=82000000
+CONFIG_SPL_FAT_SUPPORT=y
+CONFIG_SPL_FS_FAT=y
+CONFIG_SYS_BOARD="giantboard"
+CONFIG_SYS_BOARD_NAME="giantboard"
+CONFIG_SPL_LIBDISK_SUPPORT=y
+CONFIG_DEBUG_UART=y
+CONFIG_ENV_VARS_UBOOT_CONFIG=y
+CONFIG_FIT=y
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2"
+CONFIG_SD_BOOT=y
+CONFIG_BOOTDELAY=3
+CONFIG_USE_BOOTARGS=y
+CONFIG_MISC_INIT_R=y
+CONFIG_BOARD_EARLY_INIT_F=y
+# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_SPL_TEXT_BASE=0x200000
+CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_HUSH_PARSER=y
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_PROMPT="Hit SPACE in %d seconds to stop autoboot.\n"
+CONFIG_AUTOBOOT_STOP_STR=" "
+CONFIG_AUTOBOOT_KEYED_CTRLC=y
+CONFIG_CMD_BOOTZ=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_I2C=y
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_LIBFDT=y
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d27_giantboard"
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names"
+CONFIG_ENV_IS_IN_FAT=y
+CONFIG_DM=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_AT91_H32MX=y
+CONFIG_AT91_GENERIC_CLK=y
+CONFIG_DM_GPIO=y
+CONFIG_ATMEL_PIO4=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_AT91=y
+CONFIG_DM_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ATMEL=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+# CONFIG_NET is not set
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_PINCTRL_AT91PIO4=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_ATMEL_USBA=y
-- 
2.25.1

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

* [PATCH 2/3] configs: sama5d27_som1_ek: Set FDT filename based on defconfig
  2021-01-21 16:55 [PATCH 1/3] board: Atmel: Add SAMA5D27 giant board Greg Gallagher
@ 2021-01-21 16:55 ` Greg Gallagher
  2021-01-21 16:55 ` [PATCH 3/3] ARM: at91: spl: add spl_early_init for sama52d platforms Greg Gallagher
  2021-01-25 18:32 ` [PATCH 1/3] board: Atmel: Add SAMA5D27 giant board Eugen.Hristev at microchip.com
  2 siblings, 0 replies; 4+ messages in thread
From: Greg Gallagher @ 2021-01-21 16:55 UTC (permalink / raw)
  To: u-boot

Make the FDT file name based on the default on that is specified in the
defconfig file.

Signed-off-by: Greg Gallagher <greg@embeddedgreg.com>
---

 include/configs/sama5d27_som1_ek.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/configs/sama5d27_som1_ek.h b/include/configs/sama5d27_som1_ek.h
index 3358149e66..8942d15934 100644
--- a/include/configs/sama5d27_som1_ek.h
+++ b/include/configs/sama5d27_som1_ek.h
@@ -27,14 +27,11 @@
 
 #define CONFIG_SYS_LOAD_ADDR		0x22000000 /* load address */
 
-/* NAND flash */
-
-/* SPI flash */
-
 #undef CONFIG_BOOTCOMMAND
 #ifdef CONFIG_SD_BOOT
 /* bootstrap + u-boot + env in sd card */
-#define CONFIG_BOOTCOMMAND	"fatload mmc " CONFIG_ENV_FAT_DEVICE_AND_PART " 0x21000000 at91-sama5d27_som1_ek.dtb; " \
+#define CONFIG_BOOTCOMMAND	"fatload mmc " CONFIG_ENV_FAT_DEVICE_AND_PART " 0x21000000 " \
+				CONFIG_DEFAULT_DEVICE_TREE ".dtb; " \
 				"fatload mmc " CONFIG_ENV_FAT_DEVICE_AND_PART " 0x22000000 zImage; " \
 				"bootz 0x22000000 - 0x21000000"
 #endif
-- 
2.25.1

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

* [PATCH 3/3] ARM: at91: spl: add spl_early_init for sama52d platforms
  2021-01-21 16:55 [PATCH 1/3] board: Atmel: Add SAMA5D27 giant board Greg Gallagher
  2021-01-21 16:55 ` [PATCH 2/3] configs: sama5d27_som1_ek: Set FDT filename based on defconfig Greg Gallagher
@ 2021-01-21 16:55 ` Greg Gallagher
  2021-01-25 18:32 ` [PATCH 1/3] board: Atmel: Add SAMA5D27 giant board Eugen.Hristev at microchip.com
  2 siblings, 0 replies; 4+ messages in thread
From: Greg Gallagher @ 2021-01-21 16:55 UTC (permalink / raw)
  To: u-boot

The dm root node is needed early in the spl to allow the timer to be
used.  This change calls spl_early_init to initialize the dm root node.

Signed-off-by: Greg Gallagher <greg@embeddedgreg.com>
---

 arch/arm/mach-at91/spl_atmel.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c
index 23588e79f9..217ed12e31 100644
--- a/arch/arm/mach-at91/spl_atmel.c
+++ b/arch/arm/mach-at91/spl_atmel.c
@@ -103,6 +103,13 @@ void board_init_f(ulong dummy)
 {
 	int ret;
 
+	if (IS_ENABLED(CONFIG_OF_CONTROL)) {
+		ret = spl_early_init();
+		if (ret) {
+			debug("spl_early_init() failed: %d\n", ret);
+			hang();
+		}
+	}
 	switch_to_main_crystal_osc();
 
 #ifdef CONFIG_SAMA5D2
-- 
2.25.1

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

* [PATCH 1/3] board: Atmel: Add SAMA5D27 giant board
  2021-01-21 16:55 [PATCH 1/3] board: Atmel: Add SAMA5D27 giant board Greg Gallagher
  2021-01-21 16:55 ` [PATCH 2/3] configs: sama5d27_som1_ek: Set FDT filename based on defconfig Greg Gallagher
  2021-01-21 16:55 ` [PATCH 3/3] ARM: at91: spl: add spl_early_init for sama52d platforms Greg Gallagher
@ 2021-01-25 18:32 ` Eugen.Hristev at microchip.com
  2 siblings, 0 replies; 4+ messages in thread
From: Eugen.Hristev at microchip.com @ 2021-01-25 18:32 UTC (permalink / raw)
  To: u-boot

On 21.01.2021 18:55, Greg Gallagher wrote:
> Giant board is a tiny SBC based on the Adafruit Feather form factor,
> created by groboards it contains a SAMA5D2 processor (SAMA5D27),
> 128 MB of RAM and a microSD card for storage.
> 
> Signed-off-by: Greg Gallagher <greg@embeddedgreg.com>
> ---
> 
>   arch/arm/dts/Makefile                     |   3 +-
>   arch/arm/dts/at91-sama5d27_giantboard.dts | 128 ++++++++++++++++++++++
>   board/atmel/sama5d27_som1_ek/MAINTAINERS  |   6 +
>   configs/sama5d27_giantboard_defconfig     |  97 ++++++++++++++++
>   4 files changed, 233 insertions(+), 1 deletion(-)
>   create mode 100644 arch/arm/dts/at91-sama5d27_giantboard.dts
>   create mode 100644 configs/sama5d27_giantboard_defconfig
> 

Applied to u-boot-master and pushed out, thanks !

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

end of thread, other threads:[~2021-01-25 18:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-21 16:55 [PATCH 1/3] board: Atmel: Add SAMA5D27 giant board Greg Gallagher
2021-01-21 16:55 ` [PATCH 2/3] configs: sama5d27_som1_ek: Set FDT filename based on defconfig Greg Gallagher
2021-01-21 16:55 ` [PATCH 3/3] ARM: at91: spl: add spl_early_init for sama52d platforms Greg Gallagher
2021-01-25 18:32 ` [PATCH 1/3] board: Atmel: Add SAMA5D27 giant board Eugen.Hristev at microchip.com

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.