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 #undef CONFIG_EXTRA_ENV_SETTINGS
16 #define CONFIG_EXTRA_ENV_SETTINGS \
17 "usb_pgood_delay=2000\0" \
20 "console=ttySC0,115200\0" \
21 "fdt_addr=0x48000000\0" \
22 "loadaddr=0x48080000\0" \
24 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
25 "initrd_addr=0x43800000\0" \
29 "finduuid=part uuid mmc ${mmcdev}:${mmcrootpart} uuid\0" \
30 "mmcautodetect=yes\0" \
31 "mmcargs=setenv bootargs console=${console} " \
32 " root=PARTUUID=${uuid} rootwait rw ${optargs}\0" \
33 "loadbootscript=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
34 "bootscript=echo Running bootscript from mmc ...; " \
36 "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
37 "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
38 "mmcboot=echo Booting from mmc ...; " \
39 "run finduuid; run mmcargs; " \
40 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
41 "if run loadfdt; then " \
42 "booti ${loadaddr} - ${fdt_addr}; " \
44 "echo WARN: Cannot load the DT; " \
47 "echo wait for boot; " \
49 "netargs=setenv bootargs ${jh_clk} console=${console} " \
51 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
52 "netboot=echo Booting from net ...; " \
54 "if test ${ip_dyn} = yes; then " \
55 "setenv get_cmd dhcp; " \
57 "setenv get_cmd tftp; " \
59 "${get_cmd} ${loadaddr} ${image}; " \
60 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
61 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
62 "booti ${loadaddr} - ${fdt_addr}; " \
64 "echo WARN: Cannot load the DT; " \
70 #undef CONFIG_BOOTCOMMAND
72 #define CONFIG_BOOTCOMMAND \
73 "mmc dev ${mmcdev}; if mmc rescan; then " \
74 "if run loadbootscript; then " \
77 "if run loadimage; then " \
79 "else run netboot; " \
82 "else booti ${loadaddr} - ${fdt_addr}; fi"
84 #endif /* __BEACON_RZG2M_H */