Skip to content
Snippets Groups Projects
Verified Commit 67eac49f authored by Johannes Schauer Marin Rodrigues's avatar Johannes Schauer Marin Rodrigues
Browse files

build u-boot for reform a311d

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #1214 passed
image: debian:bookworm
build:
script: |
set -exu
apt-get update
apt-get --yes install --no-install-recommends gcc-aarch64-linux-gnu build-essential bison flex device-tree-compiler git ca-certificates libssl-dev
git clone --depth 1 --single-branch --branch v2023.07.02 https://github.com/u-boot/u-boot
git -C u-boot rev-parse HEAD
[ "$(git -C u-boot rev-parse HEAD)" = "83cdab8b2c6ea0fc0860f8444d083353b47f1d5c" ]
export CROSS_COMPILE=aarch64-linux-gnu-
export ARCH=arm64
cp meson-g12b-bananapi-cm4-mnt-reform2.dts u-boot/arch/arm/dts/
patch -d u-boot -p1 < dts-makefile.patch
cp bananapi-cm4-mnt-reform2_defconfig u-boot/configs/
make -C u-boot bananapi-cm4-mnt-reform2_defconfig
make -C u-boot -j$(nproc)
git clone https://github.com/libreelec/amlogic-boot-fip
git -C amlogic-boot-fip reset --hard 0312a79cc65bf7bb3d66d33ad0660b66146bd36d
git -C amlogic-boot-fip clean -fdx
mkdir amlogic-boot-fip/mnt-reform2-a311d
env --chdir=amlogic-boot-fip ./build-fip.sh bananapi-cm4io ../u-boot/u-boot.bin mnt-reform2-a311d
cp amlogic-boot-fip/mnt-reform2-a311d/u-boot.bin.sd.bin flash.bin
artifacts:
paths:
- flash.bin
CONFIG_ARM=y
CONFIG_ARCH_MESON=y
CONFIG_TEXT_BASE=0x01000000
CONFIG_NR_DRAM_BANKS=1
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000
CONFIG_ENV_SIZE=0x2000
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="meson-g12b-bananapi-cm4-mnt-reform2"
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_DM_RESET=y
CONFIG_MESON_G12A=y
CONFIG_DEBUG_UART_BASE=0xff803000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_IDENT_STRING="bpi-cm4-mnt-reform2"
CONFIG_SYS_LOAD_ADDR=0x1000000
CONFIG_PCI=y
CONFIG_DEBUG_UART=y
CONFIG_REMAKE_ELF=y
CONFIG_OF_BOARD_SETUP=y
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_MISC_INIT_R=y
CONFIG_SYS_MAXARGS=32
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_IMI is not set
CONFIG_CMD_GPIO=y
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_PCI=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_REGULATOR=y
CONFIG_OF_CONTROL=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ADC=y
CONFIG_SARADC_MESON=y
CONFIG_BUTTON=y
CONFIG_BUTTON_ADC=y
CONFIG_MMC_MESON_GX=y
CONFIG_PHY_REALTEK=y
CONFIG_DM_MDIO=y
CONFIG_DM_MDIO_MUX=y
CONFIG_ETH_DESIGNWARE_MESON8B=y
CONFIG_MDIO_MUX_MESON_G12A=y
CONFIG_PCIE_DW_MESON=y
CONFIG_MESON_G12A_USB_PHY=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_MESON_G12A=y
CONFIG_POWER_DOMAIN=y
CONFIG_MESON_EE_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_DEBUG_UART_SKIP_INIT=y
CONFIG_MESON_SERIAL=y
CONFIG_SYSINFO=y
CONFIG_SYSINFO_SMBIOS=y
CONFIG_USB=y
CONFIG_DM_USB_GADGET=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
CONFIG_USB_DWC3_MESON_G12A=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e
CONFIG_USB_GADGET_PRODUCT_NUM=0xfada
CONFIG_USB_GADGET_DWC2_OTG=y
CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_BPP8 is not set
# CONFIG_VIDEO_BPP16 is not set
CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_VIDEO_MESON=y
CONFIG_VIDEO_DT_SIMPLEFB=y
CONFIG_SPLASH_SCREEN=y
CONFIG_SPLASH_SCREEN_ALIGN=y
CONFIG_VIDEO_BMP_RLE8=y
CONFIG_BMP_16BPP=y
CONFIG_BMP_24BPP=y
CONFIG_BMP_32BPP=y
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 480269fa60..2801246e53 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -213,6 +213,7 @@ dtb-$(CONFIG_ARCH_MESON) += \
meson-g12b-a311d-bananapi-m2s.dtb \
meson-g12b-a311d-khadas-vim3.dtb \
meson-g12b-bananapi-cm4-cm4io.dtb \
+ meson-g12b-bananapi-cm4-mnt-reform2.dtb \
meson-g12b-gsking-x.dtb \
meson-g12b-gtking.dtb \
meson-g12b-gtking-pro.dtb \
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2023 Neil Armstrong <neil.armstrong@linaro.org>
* Copyright 2023 MNT Research GmbH
*/
/dts-v1/;
#include "meson-g12b-bananapi-cm4.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
/ {
model = "MNT Reform 2 with BPI-CM4 Module";
compatible = "mntre,reform2-cm4", "bananapi,bpi-cm4", "amlogic,a311d", "amlogic,g12b";
chassis-type = "laptop";
aliases {
ethernet0 = &ethmac;
i2c0 = &i2c1;
i2c1 = &i2c3;
};
hdmi_connector: hdmi-connector {
compatible = "hdmi-connector";
type = "a";
port {
hdmi_connector_in: endpoint {
remote-endpoint = <&hdmi_tx_tmds_out>;
};
};
};
leds {
compatible = "gpio-leds";
led-blue {
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_STATUS;
gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
};
led-green {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
};
};
sound {
compatible = "amlogic,axg-sound-card";
model = "MNT-REFORM2-BPI-CM4";
audio-widgets = "Headphone", "Headphone Jack",
"Speaker", "External Speaker",
"Microphone", "Mic Jack";
audio-aux-devs = <&tdmout_a>, <&tdmout_b>, <&tdmin_b>;
audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
"TDMOUT_A IN 1", "FRDDR_B OUT 0",
"TDMOUT_A IN 2", "FRDDR_C OUT 0",
"TDM_A Playback", "TDMOUT_A OUT",
"TDMOUT_B IN 0", "FRDDR_A OUT 1",
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
"TDM_B Playback", "TDMOUT_B OUT",
"TDMIN_B IN 1", "TDM_B Capture",
"TDMIN_B IN 4", "TDM_B Loopback",
"TODDR_A IN 1", "TDMIN_B OUT",
"TODDR_B IN 1", "TDMIN_B OUT",
"TODDR_C IN 1", "TDMIN_B OUT",
"Headphone Jack", "HP_L",
"Headphone Jack", "HP_R",
"External Speaker", "SPK_LP",
"External Speaker", "SPK_LN",
"External Speaker", "SPK_RP",
"External Speaker", "SPK_RN",
"LINPUT1", "Mic Jack",
"Mic Jack", "MICB";
assigned-clocks = <&clkc CLKID_MPLL2>,
<&clkc CLKID_MPLL0>,
<&clkc CLKID_MPLL1>;
assigned-clock-parents = <0>, <0>, <0>;
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
dai-link-0 {
sound-dai = <&frddr_a>;
};
dai-link-1 {
sound-dai = <&frddr_b>;
};
dai-link-2 {
sound-dai = <&frddr_c>;
};
dai-link-3 {
sound-dai = <&toddr_a>;
};
dai-link-4 {
sound-dai = <&toddr_b>;
};
dai-link-5 {
sound-dai = <&toddr_c>;
};
/* 8ch hdmi interface */
dai-link-6 {
sound-dai = <&tdmif_a>;
dai-format = "i2s";
dai-tdm-slot-tx-mask-0 = <1 1>;
dai-tdm-slot-tx-mask-1 = <1 1>;
dai-tdm-slot-tx-mask-2 = <1 1>;
dai-tdm-slot-tx-mask-3 = <1 1>;
mclk-fs = <256>;
codec {
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
};
};
/* Analog Audio */
dai-link-7 {
sound-dai = <&tdmif_b>;
dai-format = "i2s";
dai-tdm-slot-tx-mask-0 = <1 1>;
mclk-fs = <256>;
codec {
sound-dai = <&wm8960>;
};
};
/* hdmi glue */
dai-link-8 {
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
codec {
sound-dai = <&hdmi_tx>;
};
};
};
reg_main_1v8: regulator-main-1v8 {
compatible = "regulator-fixed";
regulator-name = "1V8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&reg_main_3v3>;
};
reg_main_1v2: regulator-main-1v2 {
compatible = "regulator-fixed";
regulator-name = "1V2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
vin-supply = <&reg_main_5v>;
};
reg_main_3v3: regulator-main-3v3 {
compatible = "regulator-fixed";
regulator-name = "3V3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
reg_main_5v: regulator-main-5v {
compatible = "regulator-fixed";
regulator-name = "5V";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
};
reg_main_usb: regulator-main-usb {
compatible = "regulator-fixed";
regulator-name = "USB_PWR";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&reg_main_5v>;
};
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm_AO_ab 0 10000 0>;
power-supply = <&reg_main_usb>;
enable-gpios = <&gpio 58 GPIO_ACTIVE_HIGH>;
brightness-levels = <0 32 64 128 160 200 255>;
default-brightness-level = <6>;
status = "okay";
};
/*panel {
compatible = "innolux,n125hce-gn1", "simple-panel";
power-supply = <&reg_main_3v3>;
backlight = <&backlight>;
no-hpd;
status = "okay";
port {
panel_in: endpoint {
remote-endpoint = <&edp_bridge_out>;
};
};
};*/
clock_12288: clock_12288 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <12288000>;
};
};
/* not yet supported by u-boot */
/*&mipi_analog_dphy {
status = "okay";
};
&mipi_dphy {
status = "okay";
};
&mipi_dsi {
status = "okay";
assigned-clocks = <&clkc CLKID_GP0_PLL>,
<&clkc CLKID_MIPI_DSI_PXCLK_SEL>,
<&clkc CLKID_MIPI_DSI_PXCLK>,
<&clkc CLKID_CTS_ENCL_SEL>,
<&clkc CLKID_VCLK2_SEL>;
assigned-clock-parents = <0>,
<&clkc CLKID_GP0_PLL>,
<0>,
<&clkc CLKID_VCLK2_DIV1>,
<&clkc CLKID_GP0_PLL>;
assigned-clock-rates = <936000000>,
<0>,
<936000000>,
<0>,
<0>;
};
&mipi_dsi_panel_port {
mipi_dsi_out: endpoint {
remote-endpoint = <&edp_bridge_in>;
};
};*/
&cecb_AO {
status = "okay";
};
&ethmac {
status = "okay";
};
&hdmi_tx {
status = "okay";
};
&hdmi_tx_tmds_port {
hdmi_tx_tmds_out: endpoint {
remote-endpoint = <&hdmi_connector_in>;
};
};
&pwm_AO_ab {
pinctrl-names = "default";
pinctrl-0 = <&pwm_ao_a_pins>;
status = "okay";
};
&i2c0 {
status = "okay";
};
/*&i2c3 {
status = "okay";
edp_bridge: bridge@2c {
compatible = "ti,sn65dsi86";
reg = <0x2c>;
enable-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_HIGH>; // PIN_24 / GPIO8
vccio-supply = <&reg_main_1v8>;
vpll-supply = <&reg_main_1v8>;
vcca-supply = <&reg_main_1v2>;
vcc-supply = <&reg_main_1v2>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
edp_bridge_in: endpoint {
remote-endpoint = <&mipi_dsi_out>;
};
};
port@1 {
reg = <1>;
edp_bridge_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
};
};
};*/
&i2c2 {
status = "okay";
wm8960: codec@1a {
compatible = "wlf,wm8960";
reg = <0x1a>;
clocks = <&clock_12288>;
clock-names = "mclk";
#sound-dai-cells = <0>;
wlf,shared-lrclk;
};
rtc@68 {
compatible = "nxp,pcf8523";
reg = <0x68>;
};
};
&pcie {
status = "okay";
};
&sd_emmc_b {
status = "okay";
};
&tdmif_a {
status = "okay";
};
&tdmout_a {
status = "okay";
};
&tdmif_b {
pinctrl-0 = <&tdm_b_dout0_pins>, <&tdm_b_fs_pins>, <&tdm_b_sclk_pins>, <&tdm_b_din1_pins>;
pinctrl-names = "default";
assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD1>,
<&clkc_audio AUD_CLKID_TDM_LRCLK_PAD1>;
assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_B_SCLK>,
<&clkc_audio AUD_CLKID_MST_B_LRCLK>;
assigned-clock-rates = <0>, <0>;
};
&tdmin_b {
status = "okay";
};
&toddr_a {
status = "okay";
};
&toddr_b {
status = "okay";
};
&toddr_c {
status = "okay";
};
&tohdmitx {
status = "okay";
};
&usb {
dr_mode = "host";
status = "okay";
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment