#include "rockchip-u-boot.dtsi"
/ {
+ aliases {
+ spi5 = &sfc0;
+ spi6 = &sfc1;
+ };
+
chosen {
u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci;
};
};
};
+#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
+&binman {
+ simple-bin-spi {
+ mkimage {
+ args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
+ offset = <0x8000>;
+ };
+ };
+};
+#endif
+
&cru {
bootph-all;
};
bootph-some-ram;
};
+&fspi0_csn0 {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
+
+&fspi0_pins {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
+
+&fspi1m1_csn0 {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
+
+&fspi1m1_pins {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
+
&ioc_grf {
bootph-all;
};
bootph-some-ram;
};
+&sfc0 {
+ bootph-some-ram;
+ u-boot,spl-sfc-no-dma;
+};
+
+&sfc1 {
+ bootph-some-ram;
+ u-boot,spl-sfc-no-dma;
+};
+
&sys_grf {
bootph-all;
};
#define USB_GRF_BASE 0x2601E000
#define USB3OTG0_CON1 0x0030
+enum {
+ BROM_BOOTSOURCE_FSPI0 = 3,
+ BROM_BOOTSOURCE_FSPI1_M1 = 6,
+};
+
const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
[BROM_BOOTSOURCE_EMMC] = "/soc/mmc@2a330000",
+ [BROM_BOOTSOURCE_FSPI0] = "/soc/spi@2a340000/flash@0",
+ [BROM_BOOTSOURCE_FSPI1_M1] = "/soc/spi@2a300000/flash@0",
[BROM_BOOTSOURCE_SD] = "/soc/mmc@2a310000",
};
{
}
+u32 read_brom_bootsource_id(void)
+{
+ u32 bootsource_id = readl(BROM_BOOTSOURCE_ID_ADDR);
+
+ /* Re-map the raw value read from reg to a redefined or existing
+ * BROM_BOOTSOURCE enum value to avoid having to create a larger
+ * boot_devices table.
+ */
+ if (bootsource_id == 0x23)
+ return BROM_BOOTSOURCE_FSPI1_M1;
+ else if (bootsource_id == 0x81)
+ return BROM_BOOTSOURCE_USB;
+ else if (bootsource_id > BROM_LAST_BOOTSOURCE)
+ log_debug("Unknown bootsource %x\n", bootsource_id);
+
+ return bootsource_id;
+}
+
#define HP_TIMER_BASE CONFIG_ROCKCHIP_STIMER_BASE
#define HP_CTRL_REG 0x04
#define TIMER_EN BIT(0)