Re: [PATCH v2] board: at91: sama5d29_curiosity: add initial support for sama5d29_curiosity

2023-08-07 Thread Eugen Hristev

On 7/24/23 14:35, Mihai Sain wrote:

Add initial support for sama5d29_curiosity board.

Hardware:
SoC: SAMA5D29 500 MHz
DRAM: LPDDR2 512 MiB
PMIC: MCP16502
Debug: UART0
Flash: QSPI NOR 8 MiB
RGB LCD connector
Mikrobus connectors x 2
SD-Card connectors x 2
USB 2.0 x 2

Changes in v2:


The version changes must be written after the `---` dashes, such that 
they will not land in the commit message.

I fixed this for you.


* Remove CONFIG_SYS_PROMPT and CONFIG_SYS_PROMPT_HUSH_PS2
* Remove CONFIG_SYS_SDRAM_BASE and CONFIG_SYS_SDRAM_SIZE

Signed-off-by: Mihai Sain 
---


[snip]


diff --git a/board/atmel/sama5d29_curiosity/MAINTAINERS 
b/board/atmel/sama5d29_curiosity/MAINTAINERS
new file mode 100644
index 00..110c3d2874
--- /dev/null
+++ b/board/atmel/sama5d29_curiosity/MAINTAINERS
@@ -0,0 +1,8 @@
+SAMA5D29 CURIOSITY BOARD
+M: Mihai Sain 
+S: Maintained
+F: board/atmel/sama5d29_curiosity.c
+F: include/configs/sama5d29_curiosity.h
+F: configs/sama5d29_curiosity_mmc_defconfig
+F: configs/sama5d29_curiosity_mmc1_defconfig
+F: configs/sama5d29_curiosity_qspiflash_defconfig


New requirement is to have the DT files added to this list as well

I added them for you,

and applied to u-boot-at91/next , thanks !



[PATCH v2] board: at91: sama5d29_curiosity: add initial support for sama5d29_curiosity

2023-07-24 Thread Mihai Sain
Add initial support for sama5d29_curiosity board.

Hardware:
SoC: SAMA5D29 500 MHz
DRAM: LPDDR2 512 MiB
PMIC: MCP16502
Debug: UART0
Flash: QSPI NOR 8 MiB
RGB LCD connector
Mikrobus connectors x 2
SD-Card connectors x 2
USB 2.0 x 2

Changes in v2:
* Remove CONFIG_SYS_PROMPT and CONFIG_SYS_PROMPT_HUSH_PS2
* Remove CONFIG_SYS_SDRAM_BASE and CONFIG_SYS_SDRAM_SIZE

Signed-off-by: Mihai Sain 
---
 arch/arm/dts/Makefile |   3 +
 .../dts/at91-sama5d29_curiosity-u-boot.dtsi   |  55 +
 arch/arm/dts/at91-sama5d29_curiosity.dts  | 219 ++
 arch/arm/mach-at91/Kconfig|  12 +
 board/atmel/sama5d29_curiosity/Kconfig|  15 ++
 board/atmel/sama5d29_curiosity/MAINTAINERS|   8 +
 board/atmel/sama5d29_curiosity/Makefile   |   7 +
 .../sama5d29_curiosity/sama5d29_curiosity.c   |  86 +++
 configs/sama5d29_curiosity_mmc1_defconfig | 120 ++
 configs/sama5d29_curiosity_mmc_defconfig  | 119 ++
 .../sama5d29_curiosity_qspiflash_defconfig| 119 ++
 include/configs/sama5d29_curiosity.h  |  17 ++
 12 files changed, 780 insertions(+)
 create mode 100644 arch/arm/dts/at91-sama5d29_curiosity-u-boot.dtsi
 create mode 100644 arch/arm/dts/at91-sama5d29_curiosity.dts
 create mode 100644 board/atmel/sama5d29_curiosity/Kconfig
 create mode 100644 board/atmel/sama5d29_curiosity/MAINTAINERS
 create mode 100644 board/atmel/sama5d29_curiosity/Makefile
 create mode 100644 board/atmel/sama5d29_curiosity/sama5d29_curiosity.c
 create mode 100644 configs/sama5d29_curiosity_mmc1_defconfig
 create mode 100644 configs/sama5d29_curiosity_mmc_defconfig
 create mode 100644 configs/sama5d29_curiosity_qspiflash_defconfig
 create mode 100644 include/configs/sama5d29_curiosity.h

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index b7780de776..eecb9adca2 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1172,6 +1172,9 @@ dtb-$(CONFIG_TARGET_SAMA5D27_WLSOM1_EK) += \
 dtb-$(CONFIG_TARGET_SAMA5D2_ICP) += \
at91-sama5d2_icp.dtb
 
+dtb-$(CONFIG_TARGET_SAMA5D29_CURIOSITY) += \
+   at91-sama5d29_curiosity.dtb
+
 dtb-$(CONFIG_TARGET_SAMA5D3XEK) += \
sama5d31ek.dtb \
sama5d33ek.dtb \
diff --git a/arch/arm/dts/at91-sama5d29_curiosity-u-boot.dtsi 
b/arch/arm/dts/at91-sama5d29_curiosity-u-boot.dtsi
new file mode 100644
index 00..798761c98a
--- /dev/null
+++ b/arch/arm/dts/at91-sama5d29_curiosity-u-boot.dtsi
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * at91-sama5d29_curiosity-u-boot.dtsi - Device Tree file for SAMA5D2 SoC 
u-boot properties.
+ *
+ * Copyright (c) 2023, Microchip Technology Inc. and its subsidiaries
+ *
+ * Author: Mihai Sain 
+ *
+ */
+
+/ {
+   chosen {
+   bootph-all;
+   };
+};
+
+&pinctrl_qspi1_default {
+   bootph-all;
+};
+
+&pinctrl_sdmmc0_default {
+   bootph-all;
+};
+
+&pinctrl_sdmmc1_default {
+   bootph-all;
+};
+
+&hlcdc {
+   bootph-all;
+};
+
+&pioA {
+   bootph-all;
+};
+
+&qspi1 {
+   bootph-all;
+
+   flash@0 {
+   bootph-all;
+   };
+};
+
+&sdmmc0 {
+   bootph-all;
+};
+
+&sdmmc1 {
+   bootph-all;
+};
+
+&uart0 {
+   bootph-all;
+};
diff --git a/arch/arm/dts/at91-sama5d29_curiosity.dts 
b/arch/arm/dts/at91-sama5d29_curiosity.dts
new file mode 100644
index 00..eff0e9175a
--- /dev/null
+++ b/arch/arm/dts/at91-sama5d29_curiosity.dts
@@ -0,0 +1,219 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * at91-sama5d29_curiosity.dts - Device Tree file for SAMA5D29 CURIOSITY board
+ *
+ * Copyright (C) 2023 Microchip Technology Inc. and its subsidiaries
+ *
+ * Author: Mihai Sain 
+ *
+ */
+/dts-v1/;
+#include 
+#include 
+#include "sama5d2.dtsi"
+#include "sama5d2-pinfunc.h"
+
+/ {
+   model = "Microchip SAMA5D29-Curiosity";
+   compatible = "atmel,sama5d29-curiosity", "atmel,sama5d2", "atmel,sama5";
+
+   chosen {
+   bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw 
rootwait";
+   stdout-path = &uart0;
+   };
+
+   memory {
+   reg = <0x2000 0x2000>; // 512 MiB LPDDR2-333
+   };
+
+   clocks {
+   slow_xtal: slow_xtal {
+   clock-frequency = <32768>;
+   };
+
+   main_xtal: main_xtal {
+   clock-frequency = <2400>;
+   };
+   };
+
+   onewire_tm: onewire {
+   gpios = <&pioA PIN_PC9 GPIO_ACTIVE_HIGH>;
+   pinctrl-names = "default";
+   pinctrl-0 = <&pinctrl_onewire_tm_default>;
+   status = "okay";
+
+   w1_eeprom: w1_eeprom@0 {
+   compatible = "maxim,ds24b33";
+   status = "okay";
+   };
+   };
+
+   ahb {
+   usb1: ohci@40 {
+   num-ports = <3>;
+   atmel,vbus-gpio = <&pioA PIN_PB13 GPIO_ACTIVE_