Skip to content

Commit

Permalink
Have overlay compiling inside the u-boot tree. Issue #8
Browse files Browse the repository at this point in the history
  • Loading branch information
tim committed Jun 1, 2022
1 parent 142d4d3 commit 17a07f4
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 46 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ RUN apt-get install -y python3-setuptools git
WORKDIR /build
RUN git clone --depth 1 --branch ${UBOOT_TAG} https://github.com/smaeul/u-boot.git
WORKDIR /build/u-boot

# Make sure we update the device tree and add the overlays
COPY kernel/update_uboot_config.sh .
COPY config/ov_lichee_rv_mini_lcd.dts ./arch/riscv/dts/ov_lichee_rv_mini_lcd.dts
RUN sed -i '3s/^/dtb-$(CONFIG_TARGET_SUNXI) += ov_lichee_rv_mini_lcd.dtb\n/' ./arch/riscv/dts/Makefile
RUN cat ./arch/riscv/dts/Makefile

RUN if [ "$BOARD" = "lichee_rv_86" ] ; then \
echo "Building for the RV_86_Panel"; \
./update_uboot_config.sh lichee_rv_86_panel_defconfig; \
Expand Down Expand Up @@ -146,8 +152,6 @@ RUN ./u-boot/tools/mkimage -T script -C none -O linux -A riscv -d bootscr.txt bo
# Try device tree FIT format
#
RUN apt-get install -y device-tree-compiler
COPY config/mini_lcd_overlay.dts .
RUN dtc -@ -I dts -O dtb -o mini_lcd_overlay.dtbo mini_lcd_overlay.dts
COPY config/${BOARD}_boot.its .
RUN ./u-boot/tools/mkimage -f ${BOARD}_boot.its lichee_rv_boot.itb

Expand Down
12 changes: 6 additions & 6 deletions config/lichee_rv_dock_boot.its
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,27 @@
entry = <0x44000000>;
};
fdt-2 {
description = "DTB";
data = /incbin/("mini_lcd_overlay.dtbo");
description = "Mini-LCD";
data = /incbin/("u-boot/arch/riscv/dts/ov_lichee_rv_mini_lcd.dtb");
type = "flat_dt";
arch = "riscv";
load = <0x44000000>;
};
};

configurations {
default = "standard";
default = "standard.dtb";
standard.dtb {
description = "Standard Boot";
firmware = "opensbi";
loadables = "uboot";
fdt = "fdt-1"
fdt = "fdt-1";
};
mini-lcd.dtb {
description = "Standard Boot";
description = "Standard with Mini LCD";
firmware = "opensbi";
loadables = "uboot";
fdt = "fdt-1", "fdt-2"
fdt = "fdt-1", "fdt-2";
};
};
};
38 changes: 0 additions & 38 deletions config/mini_lcd_overlay.dts

This file was deleted.

34 changes: 34 additions & 0 deletions config/ov_lichee_rv_mini_lcd.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2022 Tim Molteno
*/
#include <dt-bindings/gpio/gpio.h>

/dts-v1/;
/plugin/;


&spi0 {
pinctrl-0 = <&spi0_pins>;
pinctrl-names = "default";
status = "okay";
num-cs = <1>;
panel@0 {
compatible = "sitronix,st7789v";
buswidth = <0x8>;
reg = <0>;
reset-gpios = <&gpio 2 6 GPIO_ACTIVE_LOW>; /* PC6 */
dc-gpios = <&gpio 2 5 GPIO_ACTIVE_HIGH>; /* PC5 */
led-gpios = <&gpio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
spi-max-frequency = <32000000>;
// width = <135>;
// height = <240>;
txbuflen = <32768>;
spi-cpol;
spi-cpha;
rotate = <90>;
fps = <25>;
status = "okay";
debug = <0>;
};
};

0 comments on commit 17a07f4

Please sign in to comment.