1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2020 Compass Electronics Group, LLC
6 #ifndef __BEACON_RZG2M_H
7 #define __BEACON_RZG2M_H
9 #include "rcar-gen3-common.h"
12 #define CONFIG_BITBANGMII_MULTI
14 /* Environment in eMMC, at the end of 2nd "boot sector" */
15 /* #define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE) */
16 #define CONFIG_SYS_MMC_ENV_DEV 1
17 #define CONFIG_SYS_MMC_ENV_PART 2
19 #undef CONFIG_EXTRA_ENV_SETTINGS
21 #define CONFIG_EXTRA_ENV_SETTINGS \
22 "usb_pgood_delay=2000\0" \
25 "console=ttySC0,115200\0" \
26 "fdt_addr=0x48000000\0" \
27 "loadaddr=0x48080000\0" \
29 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
30 "initrd_addr=0x43800000\0" \
34 "finduuid=part uuid mmc ${mmcdev}:${mmcrootpart} uuid\0" \
35 "mmcautodetect=yes\0" \
36 "mmcargs=setenv bootargs console=${console} " \
37 " root=PARTUUID=${uuid} rootwait rw ${optargs}\0" \
38 "loadbootscript=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
39 "bootscript=echo Running bootscript from mmc ...; " \
41 "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
42 "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
43 "mmcboot=echo Booting from mmc ...; " \
44 "run finduuid; run mmcargs; " \
45 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
46 "if run loadfdt; then " \
47 "booti ${loadaddr} - ${fdt_addr}; " \
49 "echo WARN: Cannot load the DT; " \
52 "echo wait for boot; " \
54 "netargs=setenv bootargs ${jh_clk} console=${console} " \
56 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
57 "netboot=echo Booting from net ...; " \
59 "if test ${ip_dyn} = yes; then " \
60 "setenv get_cmd dhcp; " \
62 "setenv get_cmd tftp; " \
64 "${get_cmd} ${loadaddr} ${image}; " \
65 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
66 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
67 "booti ${loadaddr} - ${fdt_addr}; " \
69 "echo WARN: Cannot load the DT; " \
75 #undef CONFIG_BOOTCOMMAND
77 #define CONFIG_BOOTCOMMAND \
78 "mmc dev ${mmcdev}; if mmc rescan; then " \
79 "if run loadbootscript; then " \
82 "if run loadimage; then " \
84 "else run netboot; " \
87 "else booti ${loadaddr} - ${fdt_addr}; fi"
89 #endif /* __BEACON_RZG2M_H */