Skip to contentSkip to conversation

lpc32xx updates

PATCH Superseded Trevor Woerner 1 participant 4 messages Jun 7, 2021

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover lpc32xx updates

This patch series starts with some lpc32xx-related cleanups, then adds support for a new LPC32XX board: the Embedded Artists LPC3250 DevKit v2

Trevor Woerner (3):
lpc32xx: Kconfig: switch to CONFIG_CONS_INDEX
lpc32xx: import device tree from Linux
arm: lpc32xx: add EA LPC3250 DevKitv2 board support

 arch/arm/dts/Makefile                         |   2 +
 arch/arm/dts/lpc3250-ea3250-u-boot.dtsi       |  15 +
 arch/arm/dts/lpc3250-ea3250.dts               | 273 ++++++++++
 arch/arm/dts/lpc32xx.dtsi                     | 508 ++++++++++++++++++
 arch/arm/include/asm/arch-lpc32xx/config.h    |   4 +-
 arch/arm/mach-lpc32xx/Kconfig                 |   4 +
 arch/arm/mach-lpc32xx/devices.c               |   3 +-
 board/ea/ea-lpc3250devkitv2/Kconfig           |  15 +
 board/ea/ea-lpc3250devkitv2/MAINTAINERS       |   9 +
 board/ea/ea-lpc3250devkitv2/Makefile          |   4 +
 board/ea/ea-lpc3250devkitv2/README.rst        | 132 +++++
 .../ea-lpc3250devkitv2/ea-lpc3250devkitv2.c   |  37 ++
 board/timll/devkit3250/devkit3250.c           |   2 +-
 board/timll/devkit3250/devkit3250_spl.c       |   2 +-
 board/work-microwave/work_92105/work_92105.c  |   2 +-
 .../work_92105/work_92105_spl.c               |   2 +-
 configs/devkit3250_defconfig                  |   2 +
 configs/ea-lpc3250devkitv2_defconfig          |  23 +
 configs/work_92105_defconfig                  |   2 +
 include/configs/devkit3250.h                  |   5 -
 include/configs/ea-lpc3250devkitv2.h          |  37 ++
 include/configs/work_92105.h                  |   5 -
 include/dt-bindings/clock/lpc32xx-clock.h     |  58 ++
 scripts/config_whitelist.txt                  |   1 -
 24 files changed, 1128 insertions(+), 19 deletions(-)
 create mode 100644 arch/arm/dts/lpc3250-ea3250-u-boot.dtsi
 create mode 100644 arch/arm/dts/lpc3250-ea3250.dts
 create mode 100644 arch/arm/dts/lpc32xx.dtsi
 create mode 100644 board/ea/ea-lpc3250devkitv2/Kconfig
 create mode 100644 board/ea/ea-lpc3250devkitv2/MAINTAINERS
 create mode 100644 board/ea/ea-lpc3250devkitv2/Makefile
 create mode 100644 board/ea/ea-lpc3250devkitv2/README.rst
 create mode 100644 board/ea/ea-lpc3250devkitv2/ea-lpc3250devkitv2.c
 create mode 100644 configs/ea-lpc3250devkitv2_defconfig
 create mode 100644 include/configs/ea-lpc3250devkitv2.h
 create mode 100644 include/dt-bindings/clock/lpc32xx-clock.h
Signature · 1 line
2.30.0.rc0
#1 lore raw

PATCH 1/3 lpc32xx: Kconfig: switch to CONFIG_CONS_INDEX

There's nothing special or unique to the lpc32xx that requires its own config parameter for specifying the console uart index. Therefore instead of using the lpc32xx-specific CONFIG_SYS_LPC32XX_UART include parameter, use the already-available CONFIG_CONS_INDEX from Kconfig.

---

 arch/arm/include/asm/arch-lpc32xx/config.h       | 4 ++--
 arch/arm/mach-lpc32xx/devices.c                  | 3 +--
 board/timll/devkit3250/devkit3250.c              | 2 +-
 board/timll/devkit3250/devkit3250_spl.c          | 2 +-
 board/work-microwave/work_92105/work_92105.c     | 2 +-
 board/work-microwave/work_92105/work_92105_spl.c | 2 +-
 configs/devkit3250_defconfig                     | 2 ++
 configs/work_92105_defconfig                     | 2 ++
 include/configs/devkit3250.h                     | 5 -----
 include/configs/work_92105.h                     | 5 -----
 scripts/config_whitelist.txt                     | 1 -
 11 files changed, 11 insertions(+), 19 deletions(-)
arch/arm/include/asm/arch-lpc32xx/config.h +2 -2
index 0836091af2..45e46f9946 100644
@@ -12,8 +12,8 @@
 /* Basic CPU architecture */
 
 /* UART configuration */
-#if	(CONFIG_SYS_LPC32XX_UART == 1) || (CONFIG_SYS_LPC32XX_UART == 2) || \
-	(CONFIG_SYS_LPC32XX_UART == 7)
+#if	(CONFIG_CONS_INDEX == 1) || (CONFIG_CONS_INDEX == 2) || \
+	(CONFIG_CONS_INDEX == 7)
 #if !defined(CONFIG_LPC32XX_HSUART)
 #define CONFIG_LPC32XX_HSUART
 #endif
arch/arm/mach-lpc32xx/devices.c +1 -2
index e1e2e0d094..0a4fef295a 100644
@@ -23,8 +23,7 @@ void lpc32xx_uart_init(unsigned int uart_id)
 		return;
 
 	/* Disable loopback mode, if it is set by S1L bootloader */
-	clrbits_le32(&ctrl->loop,
-		     UART_LOOPBACK(CONFIG_SYS_LPC32XX_UART));
+	clrbits_le32(&ctrl->loop, UART_LOOPBACK(uart_id));
 
 	if (uart_id < 3 || uart_id > 6)
 		return;
board/timll/devkit3250/devkit3250.c +1 -1
index 3c744b943f..9d4ffb0f97 100644
@@ -38,7 +38,7 @@ void reset_periph(void)
 
 int board_early_init_f(void)
 {
-	lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART);
+	lpc32xx_uart_init(CONFIG_CONS_INDEX);
 	lpc32xx_i2c_init(1);
 	lpc32xx_i2c_init(2);
 	lpc32xx_ssp_init();
board/timll/devkit3250/devkit3250_spl.c +1 -1
index 47af78ae0b..12e8ae9c39 100644
@@ -49,7 +49,7 @@ void spl_board_init(void)
 	/* First of all silence buzzer controlled by GPO_20 */
 	writel((1 << 20), &gpio->p3_outp_clr);
 
-	lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART);
+	lpc32xx_uart_init(CONFIG_CONS_INDEX);
 	preloader_console_init();
 
 	ddr_init(&dram_64mb);
board/work-microwave/work_92105/work_92105.c +1 -1
index bdcecff730..5d12f84cfe 100644
@@ -37,7 +37,7 @@ void reset_periph(void)
 int board_early_init_f(void)
 {
 	/* initialize serial port for console */
-	lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART);
+	lpc32xx_uart_init(CONFIG_CONS_INDEX);
 	/* enable I2C, SSP, MAC, NAND */
 	lpc32xx_i2c_init(1); /* only I2C1 has devices, I2C2 has none */
 	lpc32xx_ssp_init();
board/work-microwave/work_92105/work_92105_spl.c +1 -1
index a31553a2d2..d9401145f2 100644
@@ -58,7 +58,7 @@ const struct emc_dram_settings dram_128mb = {
 void spl_board_init(void)
 {
 	/* initialize serial port for console */
-	lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART);
+	lpc32xx_uart_init(CONFIG_CONS_INDEX);
 	/* initialize console */
 	preloader_console_init();
 	/* init DDR and NAND to chainload U-Boot */
configs/devkit3250_defconfig +2 -0
index 93c048cee8..9ae70f7d46 100644
@@ -51,6 +51,8 @@ CONFIG_PHYLIB=y
 CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=31
 CONFIG_PHY_SMSC=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_CONS_INDEX=5
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_USB=y
configs/work_92105_defconfig +2 -0
index c3f666dcfe..e9605adedd 100644
@@ -48,5 +48,7 @@ CONFIG_MTD_RAW_NAND=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_SMSC=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_CONS_INDEX=5
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
include/configs/devkit3250.h +0 -5
index 5d2b77b4a3..921a38c01e 100644
@@ -30,11 +30,6 @@
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + SZ_4K \
 					 - GENERATED_GBL_DATA_SIZE)
 
-/*
- * Serial Driver
- */
-#define CONFIG_SYS_LPC32XX_UART		5   /* UART5 */
-
 /*
  * DMA
  */
include/configs/work_92105.h +0 -5
index 7874b77f3f..076a1b065e 100644
@@ -35,11 +35,6 @@
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + SZ_512K \
 					 - GENERATED_GBL_DATA_SIZE)
 
-/*
- * Serial Driver
- */
-#define CONFIG_SYS_LPC32XX_UART		5   /* UART5 - NS16550 */
-
 /*
  * Ethernet Driver
  */
scripts/config_whitelist.txt +0 -1
index 8f92b82719..00a58d65fc 100644
@@ -2737,7 +2737,6 @@ CONFIG_SYS_LOW
 CONFIG_SYS_LOWMEM_BASE
 CONFIG_SYS_LOW_RES_TIMER
 CONFIG_SYS_LPAE_SDRAM_BASE
-CONFIG_SYS_LPC32XX_UART
 CONFIG_SYS_LS1_DDR_BLOCK1_SIZE
 CONFIG_SYS_LS_MC_AIOP_IMG_MAX_LENGTH
 CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS
Signature · 1 line
2.30.0.rc0
#2 lore raw

PATCH 2/3 lpc32xx: import device tree from Linux

In reply to Trevor Woerner

Import the dtsi, dts, and clock binding files for the lpc32xx ea3250 board directly and unmodified from the latest Linux kernel.

---

 arch/arm/dts/lpc3250-ea3250.dts           | 273 ++++++++++++
 arch/arm/dts/lpc32xx.dtsi                 | 508 ++++++++++++++++++++++
 include/dt-bindings/clock/lpc32xx-clock.h |  58 +++
 3 files changed, 839 insertions(+)
 create mode 100644 arch/arm/dts/lpc3250-ea3250.dts
 create mode 100644 arch/arm/dts/lpc32xx.dtsi
 create mode 100644 include/dt-bindings/clock/lpc32xx-clock.h
arch/arm/dts/lpc3250-ea3250.dts new file +273 -0
new file mode 100644
index 0000000000..63c6f17bb7
@@ -0,0 +1,273 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Embedded Artists LPC3250 board
+ *
+ * Copyright 2012 Roland Stigge <[email protected]>
+ */
+
+/dts-v1/;
+#include "lpc32xx.dtsi"
+
+/ {
+	model = "Embedded Artists LPC3250 board based on NXP LPC3250";
+	compatible = "ea,ea3250", "nxp,lpc3250";
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x80000000 0x4000000>;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		autorepeat;
+
+		button {
+			label = "Interrupt Key";
+			linux,code = <103>;
+			gpios = <&gpio 4 1 0>; /* GPI_P3 1 */
+		};
+
+		key1 {
+			label = "KEY1";
+			linux,code = <1>;
+			gpios = <&pca9532 0 0>;
+		};
+
+		key2 {
+			label = "KEY2";
+			linux,code = <2>;
+			gpios = <&pca9532 1 0>;
+		};
+
+		key3 {
+			label = "KEY3";
+			linux,code = <3>;
+			gpios = <&pca9532 2 0>;
+		};
+
+		key4 {
+			label = "KEY4";
+			linux,code = <4>;
+			gpios = <&pca9532 3 0>;
+		};
+
+		joy0 {
+			label = "Joystick Key 0";
+			linux,code = <10>;
+			gpios = <&gpio 2 0 0>; /* P2.0 */
+		};
+
+		joy1 {
+			label = "Joystick Key 1";
+			linux,code = <11>;
+			gpios = <&gpio 2 1 0>; /* P2.1 */
+		};
+
+		joy2 {
+			label = "Joystick Key 2";
+			linux,code = <12>;
+			gpios = <&gpio 2 2 0>; /* P2.2 */
+		};
+
+		joy3 {
+			label = "Joystick Key 3";
+			linux,code = <13>;
+			gpios = <&gpio 2 3 0>; /* P2.3 */
+		};
+
+		joy4 {
+			label = "Joystick Key 4";
+			linux,code = <14>;
+			gpios = <&gpio 2 4 0>; /* P2.4 */
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		/* LEDs on OEM Board */
+
+		led1 {
+			gpios = <&gpio 5 14 1>; /* GPO_P3 14, GPIO 93, active low */
+			linux,default-trigger = "timer";
+			default-state = "off";
+		};
+
+		led2 {
+			gpios = <&gpio 2 10 1>; /* P2.10, active low */
+			default-state = "off";
+		};
+
+		led3 {
+			gpios = <&gpio 2 11 1>; /* P2.11, active low */
+			default-state = "off";
+		};
+
+		led4 {
+			gpios = <&gpio 2 12 1>; /* P2.12, active low */
+			default-state = "off";
+		};
+
+		/* LEDs on Base Board */
+
+		lede1 {
+			gpios = <&pca9532 8 0>;
+			default-state = "off";
+		};
+		lede2 {
+			gpios = <&pca9532 9 0>;
+			default-state = "off";
+		};
+		lede3 {
+			gpios = <&pca9532 10 0>;
+			default-state = "off";
+		};
+		lede4 {
+			gpios = <&pca9532 11 0>;
+			default-state = "off";
+		};
+		lede5 {
+			gpios = <&pca9532 12 0>;
+			default-state = "off";
+		};
+		lede6 {
+			gpios = <&pca9532 13 0>;
+			default-state = "off";
+		};
+		lede7 {
+			gpios = <&pca9532 14 0>;
+			default-state = "off";
+		};
+		lede8 {
+			gpios = <&pca9532 15 0>;
+			default-state = "off";
+		};
+	};
+};
+
+/* 3-axis accelerometer X,Y,Z (or AD-IN instead of Z) */
+&adc {
+	status = "okay";
+};
+
+&i2c1 {
+	clock-frequency = <100000>;
+
+	uda1380: uda1380@18 {
+		compatible = "nxp,uda1380";
+		reg = <0x18>;
+		power-gpio = <&gpio 3 10 0>;
+		reset-gpio = <&gpio 3 2 0>;
+		dac-clk = "wspll";
+	};
+
+	eeprom@50 {
+		compatible = "atmel,24c256";
+		reg = <0x50>;
+	};
+
+	eeprom@57 {
+		compatible = "atmel,24c64";
+		reg = <0x57>;
+	};
+
+	pca9532: pca9532@60 {
+		compatible = "nxp,pca9532";
+		gpio-controller;
+		#gpio-cells = <2>;
+		reg = <0x60>;
+	};
+};
+
+&i2c2 {
+	clock-frequency = <100000>;
+};
+
+&i2cusb {
+	clock-frequency = <100000>;
+
+	isp1301: usb-transceiver@2d {
+		compatible = "nxp,isp1301";
+		reg = <0x2d>;
+	};
+};
+
+&mac {
+	phy-mode = "rmii";
+	use-iram;
+	status = "okay";
+};
+
+/* Here, choose exactly one from: ohci, usbd */
+&ohci /* &usbd */ {
+	transceiver = <&isp1301>;
+	status = "okay";
+};
+
+&sd {
+	wp-gpios = <&pca9532 5 0>;
+	cd-gpios = <&pca9532 4 0>;
+	cd-inverted;
+	bus-width = <4>;
+	status = "okay";
+};
+
+/* 128MB Flash via SLC NAND controller */
+&slc {
+	status = "okay";
+
+	nxp,wdr-clks = <14>;
+	nxp,wwidth = <260000000>;
+	nxp,whold = <104000000>;
+	nxp,wsetup = <200000000>;
+	nxp,rdr-clks = <14>;
+	nxp,rwidth = <34666666>;
+	nxp,rhold = <104000000>;
+	nxp,rsetup = <200000000>;
+	nand-on-flash-bbt;
+	gpios = <&gpio 5 19 1>; /* GPO_P3 19, active low */
+
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		mtd0@0 {
+			label = "ea3250-boot";
+			reg = <0x00000000 0x00080000>;
+			read-only;
+		};
+
+		mtd1@80000 {
+			label = "ea3250-uboot";
+			reg = <0x00080000 0x000c0000>;
+			read-only;
+		};
+
+		mtd2@140000 {
+			label = "ea3250-kernel";
+			reg = <0x00140000 0x00400000>;
+		};
+
+		mtd3@540000 {
+			label = "ea3250-rootfs";
+			reg = <0x00540000 0x07ac0000>;
+		};
+	};
+};
+
+&uart1 {
+	status = "okay";
+};
+
+&uart3 {
+	status = "okay";
+};
+
+&uart5 {
+	status = "okay";
+};
+
+&uart6 {
+	status = "okay";
+};
arch/arm/dts/lpc32xx.dtsi new file +508 -0

508 lines not on this page · raw message

include/dt-bindings/clock/lpc32xx-clock.h new file +58 -0

58 lines not on this page · raw message

Signature · 1 line
2.30.0.rc0
#3 lore raw

PATCH 3/3 arm: lpc32xx: add EA LPC3250 DevKitv2 board support

In reply to Trevor Woerner

Add basic support for running U-Boot on the Embedded Artists LPC3250 Developer's Kit v2 board by launching U-Boot from the board's s1l loader (which comes pre-installed on the board).

---

 arch/arm/dts/Makefile                         |   2 +
 arch/arm/dts/lpc3250-ea3250-u-boot.dtsi       |  15 ++
 arch/arm/mach-lpc32xx/Kconfig                 |   4 +
 board/ea/ea-lpc3250devkitv2/Kconfig           |  15 ++
 board/ea/ea-lpc3250devkitv2/MAINTAINERS       |   9 ++
 board/ea/ea-lpc3250devkitv2/Makefile          |   4 +
 board/ea/ea-lpc3250devkitv2/README.rst        | 132 ++++++++++++++++++
 .../ea-lpc3250devkitv2/ea-lpc3250devkitv2.c   |  37 +++++
 configs/ea-lpc3250devkitv2_defconfig          |  23 +++
 include/configs/ea-lpc3250devkitv2.h          |  37 +++++
 10 files changed, 278 insertions(+)
 create mode 100644 arch/arm/dts/lpc3250-ea3250-u-boot.dtsi
 create mode 100644 board/ea/ea-lpc3250devkitv2/Kconfig
 create mode 100644 board/ea/ea-lpc3250devkitv2/MAINTAINERS
 create mode 100644 board/ea/ea-lpc3250devkitv2/Makefile
 create mode 100644 board/ea/ea-lpc3250devkitv2/README.rst
 create mode 100644 board/ea/ea-lpc3250devkitv2/ea-lpc3250devkitv2.c
 create mode 100644 configs/ea-lpc3250devkitv2_defconfig
 create mode 100644 include/configs/ea-lpc3250devkitv2.h
arch/arm/dts/Makefile +2 -0
index 096068261d..134108f14e 100644
@@ -1103,6 +1103,8 @@ dtb-$(CONFIG_TARGET_PRESIDIO_ASIC) += ca-presidio-engboard.dtb
 
 dtb-$(CONFIG_TARGET_IMX8MM_CL_IOT_GATE) += imx8mm-cl-iot-gate.dtb
 
+dtb-$(CONFIG_TARGET_EA_LPC3250DEVKITV2) += lpc3250-ea3250.dtb
+
 targets += $(dtb-y)
 
 # Add any required device tree compiler flags here
arch/arm/dts/lpc3250-ea3250-u-boot.dtsi new file +15 -0
new file mode 100644
index 0000000000..0c82e512c6
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2021 Trevor Woerner <[email protected]>
+ */
+
+/{
+	model = "Embedded Artists LPC3250 DevKit v2 board based on the NXP LPC3250 SoC";
+	chosen {
+		stdout-path = &uart5;
+	};
+};
+
+&uart5 {
+	compatible = "nxp,lpc3220-uart", "ns16550a";
+};
arch/arm/mach-lpc32xx/Kconfig +4 -0
index 986ad738ac..185bda41c2 100644
@@ -12,9 +12,13 @@ config TARGET_DEVKIT3250
 config TARGET_WORK_92105
 	bool "Work Microwave Work_92105"
 
+config TARGET_EA_LPC3250DEVKITV2
+	bool "Embedded Artists LPC3250 Developer's Kit v2"
+
 endchoice
 
 source "board/timll/devkit3250/Kconfig"
 source "board/work-microwave/work_92105/Kconfig"
+source "board/ea/ea-lpc3250devkitv2/Kconfig"
 
 endif
board/ea/ea-lpc3250devkitv2/Kconfig new file +15 -0
new file mode 100644
index 0000000000..368ce027e6
@@ -0,0 +1,15 @@
+if TARGET_EA_LPC3250DEVKITV2
+
+config SYS_BOARD
+	default "ea-lpc3250devkitv2"
+
+config SYS_VENDOR
+	default "ea"
+
+config SYS_SOC
+	default "lpc32xx"
+
+config SYS_CONFIG_NAME
+	default "ea-lpc3250devkitv2"
+
+endif
board/ea/ea-lpc3250devkitv2/MAINTAINERS new file +9 -0
new file mode 100644
index 0000000000..b4b9362f5b
@@ -0,0 +1,9 @@
+EMBEDDED ARTISTS LPC3250 DEVKIT v2
+M:	Trevor Woerner <[email protected]>
+S:	Maintained
+F:	board/ea/ea-lpc3250devkitv2
+F:	include/configs/ea-lpc3250devkitv2.h
+F:	configs/ea-lpc3250devkitv2_defconfig
+F:	arch/arm/dts/lpc32xx.dtsi
+F:	arch/arm/dts/lpc3250-ea3250.dts
+F:	arch/arm/dts/lpc3250-ea3250-u-boot.dtsi
board/ea/ea-lpc3250devkitv2/Makefile new file +4 -0
new file mode 100644
index 0000000000..a4a40b6d4f
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2021  Trevor Woerner <[email protected]>
+
+obj-y += ea-lpc3250devkitv2.o
board/ea/ea-lpc3250devkitv2/README.rst new file +132 -0

132 lines not on this page · raw message

board/ea/ea-lpc3250devkitv2/ea-lpc3250devkitv2.c new file +37 -0
new file mode 100644
index 0000000000..7a19400041
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Board init file for Embedded Artists LPC3250 DevKit v2
+ * Copyright (C) 2021  Trevor Woerner <[email protected]>
+ */
+
+#include <init.h>
+#include <common.h>
+#include <asm/io.h>
+#include <asm/global_data.h>
+
+#include <asm/arch/clk.h>
+#include <asm/arch/wdt.h>
+#include <asm/arch/sys_proto.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int
+board_early_init_f(void)
+{
+	lpc32xx_uart_init(CONFIG_CONS_INDEX);
+	return 0;
+}
+
+int
+board_init(void)
+{
+	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x2000;
+	return 0;
+}
+
+int
+dram_init(void)
+{
+	gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE, SZ_64M);
+	return 0;
+}
configs/ea-lpc3250devkitv2_defconfig new file +23 -0
new file mode 100644
index 0000000000..dc90e16475
@@ -0,0 +1,23 @@
+CONFIG_ARM=y
+CONFIG_SYS_ICACHE_OFF=y
+CONFIG_SYS_DCACHE_OFF=y
+CONFIG_ARCH_CPU_INIT=y
+CONFIG_ARCH_LPC32XX=y
+CONFIG_SYS_TEXT_BASE=0x83000000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_TARGET_EA_LPC3250DEVKITV2=y
+CONFIG_DEFAULT_DEVICE_TREE="lpc3250-ea3250"
+CONFIG_DISTRO_DEFAULTS=y
+# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
+# CONFIG_AUTOBOOT is not set
+# CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_SYS_PROMPT="EA-LPC3250v2=> "
+CONFIG_CMD_GPIO=y
+CONFIG_OF_CONTROL=y
+# CONFIG_NET is not set
+CONFIG_LPC32XX_GPIO=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_CONS_INDEX=5
+CONFIG_SYS_NS16550=y
+CONFIG_PANIC_HANG=y
include/configs/ea-lpc3250devkitv2.h new file +37 -0
new file mode 100644
index 0000000000..c1a37c8a79
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Embedded Artists LPC3250 DevKit v2
+ * Copyright (C) 2021  Trevor Woerner <[email protected]>
+ */
+
+#ifndef __CONFIG_EA_LPC3250DEVKITV2_H__
+#define __CONFIG_EA_LPC3250DEVKITV2_H__
+
+#include <linux/sizes.h>
+#include <asm/arch/cpu.h>
+
+/*
+ * SoC and board defines
+ */
+#define CONFIG_MACH_TYPE MACH_TYPE_LPC3XXX
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_BOARD_SIZE_LIMIT 0x000fffff /* maximum allowable size for full U-Boot binary */
+
+/*
+ * RAM
+ */
+#define CONFIG_SYS_MALLOC_LEN SZ_4M
+#define CONFIG_SYS_SDRAM_BASE EMC_DYCS0_BASE
+
+/*
+ * cmd
+ */
+#define CONFIG_SYS_LOAD_ADDR 0x80100000
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_4K - GENERATED_GBL_DATA_SIZE)
+
+/*
+ * SoC-specific config
+ */
+#include <asm/arch/config.h>
+
+#endif
Signature · 1 line
2.30.0.rc0