diff options
Diffstat (limited to 'board/scalys')
-rw-r--r-- | board/scalys/grapeboard/Kconfig | 14 | ||||
-rw-r--r-- | board/scalys/grapeboard/PBL_0x33_0x05_800_250_1000.bin | bin | 160 -> 160 bytes | |||
-rw-r--r-- | board/scalys/grapeboard/PBL_0x33_0x08_800_250_1000.bin | bin | 0 -> 160 bytes | |||
-rw-r--r-- | board/scalys/grapeboard/PBL_0x35_0x08_800_250_1000.bin | bin | 160 -> 160 bytes | |||
-rw-r--r-- | board/scalys/grapeboard/grapeboard.c | 48 | ||||
-rw-r--r-- | board/scalys/grapeboard/usb_grapeboard.c | 30 | ||||
-rw-r--r-- | board/scalys/grapeboard/usb_grapeboard.h | 1 |
7 files changed, 33 insertions, 60 deletions
diff --git a/board/scalys/grapeboard/Kconfig b/board/scalys/grapeboard/Kconfig index 4eb17aa..72d67ca 100644 --- a/board/scalys/grapeboard/Kconfig +++ b/board/scalys/grapeboard/Kconfig @@ -14,20 +14,6 @@ config SYS_CONFIG_NAME menu "Grapeboard configuration options" depends on TARGET_GRAPEBOARD - -choice - prompt "SERDES configuration for PCIE or SATA" - default SERDES_D_TO_SATA - -config SERDES_D_TO_PCIE - bool - prompt "Support PCIe" - -config SERDES_D_TO_SATA - bool - prompt "Support SATA (Eth1 disabled)" - -endchoice choice prompt "U-boot environment configuration" diff --git a/board/scalys/grapeboard/PBL_0x33_0x05_800_250_1000.bin b/board/scalys/grapeboard/PBL_0x33_0x05_800_250_1000.bin Binary files differindex 994511d..5487ff6 100644 --- a/board/scalys/grapeboard/PBL_0x33_0x05_800_250_1000.bin +++ b/board/scalys/grapeboard/PBL_0x33_0x05_800_250_1000.bin diff --git a/board/scalys/grapeboard/PBL_0x33_0x08_800_250_1000.bin b/board/scalys/grapeboard/PBL_0x33_0x08_800_250_1000.bin Binary files differnew file mode 100644 index 0000000..2a12fd0 --- /dev/null +++ b/board/scalys/grapeboard/PBL_0x33_0x08_800_250_1000.bin diff --git a/board/scalys/grapeboard/PBL_0x35_0x08_800_250_1000.bin b/board/scalys/grapeboard/PBL_0x35_0x08_800_250_1000.bin Binary files differindex 86d6227..11db49f 100644 --- a/board/scalys/grapeboard/PBL_0x35_0x08_800_250_1000.bin +++ b/board/scalys/grapeboard/PBL_0x35_0x08_800_250_1000.bin diff --git a/board/scalys/grapeboard/grapeboard.c b/board/scalys/grapeboard/grapeboard.c index eade1bd..a0c0a9e 100644 --- a/board/scalys/grapeboard/grapeboard.c +++ b/board/scalys/grapeboard/grapeboard.c @@ -42,6 +42,7 @@ int checkboard(void) int ret; #endif int m2_config = 0; + int serdes_cfg = get_serdes_protocol(); puts("Board: Grape board\n"); @@ -63,28 +64,26 @@ int checkboard(void) /* Configure USB hub */ usb_hx3_hub_init(); - /* Scanning for M.2 module */ + /* Check for an M.2 module */ clrbits_be32(&pgpio->gpdir, (M2_CFG0 | M2_CFG1 | M2_CFG2 | M2_CFG3)); m2_config = (in_be32(&pgpio->gpdat) & (M2_CFG0 | M2_CFG1 | M2_CFG2 | M2_CFG3)); switch(m2_config >> 17) { case 0: - printf("M.2: SATA SSD module found on M.2 port\n"); -#if defined(CONFIG_SERDES_D_TO_PCIE) && defined(CONFIG_PBL_IMAGE) - printf("Warning: SERDES has not been configured in RCW for SATA!\n"); -#endif + printf("M.2: SATA SSD module found\n"); + if (serdes_cfg & 0x5) + printf("Warning: SERDES has not been configured in RCW for SATA!\n"); break; case 1: - printf("M.2: PCIe SSD module found on M.2 port\n"); -#if defined(CONFIG_SERDES_D_TO_SATA) && defined(CONFIG_PBL_IMAGE) - printf("Warning: SERDES has not been configured in RCW for PCIe!\n"); -#endif + printf("M.2: PCIe SSD module found\n"); + if (serdes_cfg & 0x8) + printf("Warning: SERDES has not been configured in RCW for PCIe!\n"); break; case 0xf: - printf("M.2: No module detected on M.2 port\n"); + printf("M.2: No module detected\n"); break; default: - printf("M.2: A module has been detected on M.2 port(TODO: add module type)\n"); + printf("M.2: A module has been detected (TODO: add module type and support)\n"); break; } @@ -93,8 +92,6 @@ int checkboard(void) int misc_init_r(void) { - - return 0; } @@ -162,31 +159,6 @@ int board_init(void) return 0; } -int esdhc_status_fixup(void *blob, const char *compat) -{ - /*char esdhc0_path[] = "/soc/esdhc@1560000";*/ - - return 0; -} - -void scsi_init(void) -{ -#if defined(CONFIG_SCSI_AHCI_PLAT) && defined(CONFIG_SERDES_D_TO_SATA) - struct ccsr_ahci __iomem *ccsr_ahci = (void *)CONFIG_SYS_SATA; - - /* Disable SATA ECC */ - out_le32((void *)CONFIG_SYS_DCSR_DCFG_ADDR + 0x520, 0x80000000); - out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG); - out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG); - out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG); - - ahci_init((void __iomem *)CONFIG_SYS_SATA); - scsi_scan(0); -#else - printf("Disabled\n"); -#endif -} - int ft_board_setup(void *blob, bd_t *bd) { arch_fixup_fdt(blob); diff --git a/board/scalys/grapeboard/usb_grapeboard.c b/board/scalys/grapeboard/usb_grapeboard.c index 5a75f99..f4d443e 100644 --- a/board/scalys/grapeboard/usb_grapeboard.c +++ b/board/scalys/grapeboard/usb_grapeboard.c @@ -24,18 +24,18 @@ const uint8_t hx3_settings[5 + HX3_SETTINGS_SIZE] = { HX3_SETTINGS_SIZE, /* payload size (192) */ 0xb4, 0x04, /* VID */ 0x04, 0x65, /* PID */ - 0x0a, 0x50, /* DID */ + 10, 50, /* DID */ 0x00, /* Reserved */ - 0x0f, /* 4 SuperSpeed ports, no shared link */ + 0x07, /* DS4 has no SuperSpeed port, DS4 is in shared link mode */ 0x32, /* bPwrOn2PwrGood : 100 ms */ 0x7f, /* 4 Downstream ports : DS4 is non-removable (MCU) */ - 0xe1, /* LEDs disabled, Ganged power switching */ - 0xa0, /* suspend indicator disabled, power switch control is active high */ - 0x04, /* BC v1.2 disabled, apple charging 1A, ghost charging disabled */ - 0x00, /* port charging, cdp & dcp disabled */ - 0xd8, /* US is embedded port, overcurrent input is active high */ + 0x11, /* Ganged power switching */ + 0x20, /* suspend indicator disabled, power switch control is active high */ + 0x11, /* BC v1.2 and ghost charging enabled */ + 0xf0, /* cdp enabled */ + 0x78, /* overcurrent input is active high */ 0x00, /* reserved */ - 0x08, /* USB String descriptors enabled */ + 0x00, /* USB String descriptors enabled */ 0x00, 0x00, 0x12, 0x00, 0x2c, 0x66, 0x66, /* USB3.0 TX driver de-emphasis */ @@ -93,6 +93,14 @@ int usb_hx3_hub_init(void) { data += length; } + /* Suspend USB2.0 PHY */ + /*unsigned int val; + + val = in_be32(0x2f0c200); + setbits_be32(0x2f0c200, val & (64 << 24)); + mdelay(10);*/ + + puts("Done!\n"); return 0; } @@ -101,3 +109,9 @@ int usb_hx3_hub_reset(void) { /* USB hub cannot be reset in software without resetting the ls1012a */ return 1; } + +/*void usb_hub_reset_devices(int port) +{ + udelay(100); + return; +}*/ diff --git a/board/scalys/grapeboard/usb_grapeboard.h b/board/scalys/grapeboard/usb_grapeboard.h index ae6289b..6bffe41 100644 --- a/board/scalys/grapeboard/usb_grapeboard.h +++ b/board/scalys/grapeboard/usb_grapeboard.h @@ -10,5 +10,6 @@ int usb_hx3_hub_init(void); int usb_hx3_hub_reset(void); +void usb_hub_reset_devices(int); #endif /* USB_GRAPEBOARD_H_ */ |