Commit 351f39f9 authored by Sahaj Sarup's avatar Sahaj Sarup Committed by Kumar Gala
Browse files

board: arm: Add Support For 96Boards Aerocore2



Changes:

- Added all required board files in /boards/arm/96b_aerocore2
- Modified pinmux for stm32f4

Most of the changes in this PR is based on reverse-engineering of the
PCB layout and following commits in the PX4 firmware repository for
the same board. The manufacturer does not provide and or generate
schematics and pinout tables for this board.

This PR includes almost all of the interfaces connected to the STM32
MCU, the only thing not included is the J9 and J8 headers that connect
to a 96Boards baseboard.
These headers are not vital to the functionality of the Aerocore2.

Signed-off-by: default avatarSahaj Sarup <sahaj.sarup@linaro.org>
parent 161d8c0c
Loading
Loading
Loading
Loading
+114 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2020 Linaro Limited
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/dts-v1/;

#include <st/f4/stm32f427vi.dtsi>

/ {
	model = "96Boards Gumstix AeroCore 2";
	compatible = "gumstix,aerocore2", "st,stm32f427";

	chosen {
		zephyr,console = &uart7;
		zephyr,shell-uart = &uart7;
		zephyr,sram = &sram0;
		zephyr,flash = &flash0;
		zephyr,ccm = &ccm0;
	};

	leds {
		compatible = "gpio-leds";
		yellow_led_1: led_1 {
			gpios = <&gpioe 10 GPIO_ACTIVE_HIGH>;
			label = "USR1 LED";
		};
		blue_led_2: led_2 {
			gpios = <&gpioe 9 GPIO_ACTIVE_HIGH>;
			label = "USR2 LED";
		};
	};

	aliases {
		led0 = &yellow_led_1;
		led1 = &blue_led_2;
	};

};

&usart1 {
	current-speed = <115200>;
	status = "okay";
};

&usart2 {
	current-speed = <115200>;
	status = "okay";
};

&usart3 {
	current-speed = <115200>;
	status = "okay";
};

&uart7 {
	current-speed = <115200>;
	status = "okay";
};

&uart8 {
	current-speed = <115200>;
	status = "okay";
};

&spi1 {
	status = "okay";
};

&spi2 {
	status = "okay";
};

&spi3 {
	status = "okay";
};

&spi4 {
	status = "okay";
};

&i2c2 {
	status = "okay";
	clock-frequency = <I2C_BITRATE_FAST>;
};

&usbotg_fs {
	status = "okay";
};

&timers4 {
	status = "okay";

	pwm4: pwm {
		status = "okay";
	};
};

&timers5 {
	status = "okay";

	pwm5: pwm {
		status = "okay";
	};
};

&adc1 {
	status = "okay";
};

&rng {
	status = "okay";
};
+21 −0
Original line number Diff line number Diff line
# Copyright (c) 2020 Linaro Limited
# SPDX-License-Identifier: Apache-2.0


identifier: 96b_aerocore2
name: 96Boards AeroCore 2
type: mcu
arch: arm
toolchain:
  - zephyr
  - gnuarmemb
  - xtools
supported:
  - gpio
  - pwm
  - i2c
  - spi
  - usb_device
  - adc
ram: 256
flash: 2048
+44 −0
Original line number Diff line number Diff line
# Copyright (c) 2020 Linaro Limited
# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F427XX=y
# 168MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000

# Enable MPU
CONFIG_ARM_MPU=y

CONFIG_SERIAL=y

# console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# enable pinmux
CONFIG_PINMUX=y

# enable GPIO
CONFIG_GPIO=y

# clock configuration
CONFIG_CLOCK_CONTROL=y


# SYSCLK selection
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y

# use HSE as PLL input
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
CONFIG_CLOCK_STM32_HSE_CLOCK=24000000

# produce 168MHz clock at PLL output
CONFIG_CLOCK_STM32_PLL_M_DIVISOR=24
CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=336
CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2
CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=7
CONFIG_CLOCK_STM32_AHB_PRESCALER=1

# APB1 clock must not exceed 50MHz limit
CONFIG_CLOCK_STM32_APB1_PRESCALER=4
CONFIG_CLOCK_STM32_APB2_PRESCALER=2
+8 −0
Original line number Diff line number Diff line
#  Copyright (c) 2020 Linaro Limited
#  SPDX-License-Identifier: Apache-2.0

if(CONFIG_PINMUX)
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
endif()
+6 −0
Original line number Diff line number Diff line
#  Copyright (c) 2020 Linaro Limited
#  SPDX-License-Identifier: Apache-2.0

config BOARD_96B_AEROCORE2
	bool "96Boards AEROCORE2 (STM32F427)"
	depends on SOC_STM32F427XX
Loading