Skip to content

Commit

Permalink
Merge pull request #54 from YuzukiHD/dev
Browse files Browse the repository at this point in the history
fix extlinux initrd boot, add board yuzukihomekit
  • Loading branch information
YuzukiTsuru committed Mar 29, 2024
2 parents a6c8fe9 + 3c8107a commit 3026b5d
Show file tree
Hide file tree
Showing 8 changed files with 204 additions and 323 deletions.
4 changes: 2 additions & 2 deletions board/longanpi-4b/extlinux_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ static int load_extlinux(image_info_t *image, uint64_t dram_size) {
/* Get the offset of "/chosen" node */
int chosen_node = fdt_find_or_add_subnode(image->of_dest, 0, "chosen");

uint64_t ramdisk_start = (uint64_t) (uintptr_t) image->ramdisk_dest;
uint64_t ramdisk_end = ramdisk_start + ramdisk_size;
uint32_t ramdisk_start = (uint32_t) (uintptr_t) image->ramdisk_dest;
uint32_t ramdisk_end = (uint32_t) ramdisk_start + (uint32_t) ramdisk_size;
if (ramdisk_size > 0) {
uint64_t addr, size;

Expand Down
16 changes: 13 additions & 3 deletions board/yuzukihomekit/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@

#include <common.h>

#include <sys-clk.h>
#include <reg-ncat.h>
#include <sys-clk.h>

#include <mmu.h>

#include <sys-dram.h>
#include <sys-gpio.h>
#include <sys-i2c.h>
#include <sys-sdcard.h>
#include <sys-sid.h>
#include <sys-spi.h>
#include <sys-uart.h>
#include <sys-dram.h>
#include <sys-sdcard.h>

sunxi_serial_t uart_dbg = {
.base = SUNXI_UART3_BASE,
Expand Down Expand Up @@ -56,6 +58,14 @@ sdhci_t sdhci0 = {
.gpio_d3 = {GPIO_PIN(GPIO_PORTF, 4), GPIO_PERIPH_MUX2},
};

sunxi_i2c_t i2c_pmu = {
.base = SUNXI_TWI0_BASE,
.id = SUNXI_I2C0,
.speed = 4000000,
.gpio_scl = {GPIO_PIN(GPIO_PORTL, 0), GPIO_PERIPH_MUX3},
.gpio_sda = {GPIO_PIN(GPIO_PORTL, 1), GPIO_PERIPH_MUX3},
};

dram_para_t dram_para = {
.dram_clk = 792,
.dram_type = 3,
Expand Down
Loading

0 comments on commit 3026b5d

Please sign in to comment.