beacon-rzg2m.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2020 Compass Electronics Group, LLC
  4. */
  5. #ifndef __BEACON_RZG2M_H
  6. #define __BEACON_RZG2M_H
  7. #include "rcar-gen3-common.h"
  8. /* Ethernet RAVB */
  9. #define CONFIG_BITBANGMII_MULTI
  10. #undef CONFIG_EXTRA_ENV_SETTINGS
  11. #define CONFIG_EXTRA_ENV_SETTINGS \
  12. "usb_pgood_delay=2000\0" \
  13. "script=boot.scr\0" \
  14. "image=Image\0" \
  15. "console=ttySC0,115200\0" \
  16. "fdt_addr=0x48000000\0" \
  17. "loadaddr=0x48080000\0" \
  18. "boot_fdt=try\0" \
  19. "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
  20. "initrd_addr=0x43800000\0" \
  21. "mmcdev=0\0" \
  22. "mmcpart=1\0" \
  23. "mmcrootpart=2\0" \
  24. "finduuid=part uuid mmc ${mmcdev}:${mmcrootpart} uuid\0" \
  25. "mmcautodetect=yes\0" \
  26. "mmcargs=setenv bootargs console=${console} " \
  27. " root=PARTUUID=${uuid} rootwait rw ${optargs}\0" \
  28. "loadbootscript=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
  29. "bootscript=echo Running bootscript from mmc ...; " \
  30. "source\0" \
  31. "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
  32. "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
  33. "mmcboot=echo Booting from mmc ...; " \
  34. "run finduuid; run mmcargs; " \
  35. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  36. "if run loadfdt; then " \
  37. "booti ${loadaddr} - ${fdt_addr}; " \
  38. "else " \
  39. "echo WARN: Cannot load the DT; " \
  40. "fi; " \
  41. "else " \
  42. "echo wait for boot; " \
  43. "fi;\0" \
  44. "netargs=setenv bootargs ${jh_clk} console=${console} " \
  45. "root=/dev/nfs " \
  46. "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
  47. "netboot=echo Booting from net ...; " \
  48. "run netargs; " \
  49. "if test ${ip_dyn} = yes; then " \
  50. "setenv get_cmd dhcp; " \
  51. "else " \
  52. "setenv get_cmd tftp; " \
  53. "fi; " \
  54. "${get_cmd} ${loadaddr} ${image}; " \
  55. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  56. "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
  57. "booti ${loadaddr} - ${fdt_addr}; " \
  58. "else " \
  59. "echo WARN: Cannot load the DT; " \
  60. "fi; " \
  61. "else " \
  62. "booti; " \
  63. "fi;\0"
  64. #undef CONFIG_BOOTCOMMAND
  65. #define CONFIG_BOOTCOMMAND \
  66. "mmc dev ${mmcdev}; if mmc rescan; then " \
  67. "if run loadbootscript; then " \
  68. "run bootscript; " \
  69. "else " \
  70. "if run loadimage; then " \
  71. "run mmcboot; " \
  72. "else run netboot; " \
  73. "fi; " \
  74. "fi; " \
  75. "else booti ${loadaddr} - ${fdt_addr}; fi"
  76. #endif /* __BEACON_RZG2M_H */