- Add MMC High speed modes for AM64 and J7200
- Add Sierra/Torrent SERDES driver
- Minor clean-ups for R5F boot from SPL
This commit is contained in:
Tom Rini
2021-07-29 08:20:06 -04:00
55 changed files with 5776 additions and 579 deletions

View File

@@ -115,10 +115,4 @@
#define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1
/* MMC ENV related defines */
#ifdef CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_SYS_MMC_ENV_PART 1
#endif
#endif /* __CONFIG_AM642_EVM_H */

View File

@@ -82,8 +82,6 @@
#ifdef CONFIG_SYS_K3_SPL_ATF
#if defined(CONFIG_TARGET_J721E_R5_EVM)
#define EXTRA_ENV_R5_SPL_RPROC_FW_ARGS_MMC \
"addr_mainr5f0_0load=0x88000000\0" \
"name_mainr5f0_0fw=/lib/firmware/j7-main-r5f0_0-fw\0" \
"addr_mcur5f0_0load=0x89000000\0" \
"name_mcur5f0_0fw=/lib/firmware/j7-mcu-r5f0_0-fw\0"
#elif defined(CONFIG_TARGET_J7200_R5_EVM)
@@ -129,6 +127,7 @@
#ifdef CONFIG_TARGET_J721E_A72_EVM
#define DEFAULT_RPROCS "" \
"2 /lib/firmware/j7-main-r5f0_0-fw " \
"3 /lib/firmware/j7-main-r5f0_1-fw " \
"4 /lib/firmware/j7-main-r5f1_0-fw " \
"5 /lib/firmware/j7-main-r5f1_1-fw " \
@@ -138,11 +137,24 @@
#endif /* CONFIG_TARGET_J721E_A72_EVM */
#ifdef CONFIG_TARGET_J7200_A72_EVM
#define EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY \
"do_main_cpsw0_qsgmii_phyinit=1\0" \
"init_main_cpsw0_qsgmii_phy=gpio set gpio@22_17;" \
"gpio clear gpio@22_16\0" \
"main_cpsw0_qsgmii_phyinit=" \
"if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1 && test ${dorprocboot} -eq 1 && " \
"test ${boot} = mmc; then " \
"run init_main_cpsw0_qsgmii_phy;" \
"fi;\0"
#define DEFAULT_RPROCS "" \
"2 /lib/firmware/j7200-main-r5f0_0-fw " \
"3 /lib/firmware/j7200-main-r5f0_1-fw "
#endif /* CONFIG_TARGET_J7200_A72_EVM */
#ifndef EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY
#define EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY
#endif
/* set default dfu_bufsiz to 128KB (sector size of OSPI) */
#define EXTRA_ENV_DFUARGS \
"dfu_bufsiz=0x20000\0" \
@@ -190,6 +202,7 @@
EXTRA_ENV_DFUARGS \
DEFAULT_UFS_TI_ARGS \
EXTRA_ENV_J721E_BOARD_SETTINGS_MTD \
EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY \
BOOTENV
/* Now for the remaining common defines */

View File

@@ -231,6 +231,16 @@ static inline ofnode ofnode_root(void)
return node;
}
/**
* ofnode_name_eq() - Check if the node name is equivalent to a given name
* ignoring the unit address
*
* @node: valid node reference that has to be compared
* @name: name that has to be compared with the node name
* @return true if matches, false if it doesn't match
*/
bool ofnode_name_eq(ofnode node, const char *name);
/**
* ofnode_read_u32() - Read a 32-bit integer from a property
*

View File

@@ -90,4 +90,9 @@
#define J7200_SERDES0_LANE3_USB 0x2
#define J7200_SERDES0_LANE3_IP4_UNUSED 0x3
/* AM64 */
#define AM64_SERDES0_LANE0_PCIE0 0x0
#define AM64_SERDES0_LANE0_USB 0x1
#endif /* _DT_BINDINGS_MUX_TI_SERDES */

View File

@@ -0,0 +1,20 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* This header provides constants for Cadence SERDES.
*/
#ifndef _DT_BINDINGS_CADENCE_SERDES_H
#define _DT_BINDINGS_CADENCE_SERDES_H
/* Torrent */
#define TORRENT_SERDES_NO_SSC 0
#define TORRENT_SERDES_EXTERNAL_SSC 1
#define TORRENT_SERDES_INTERNAL_SSC 2
#define CDNS_TORRENT_REFCLK_DRIVER 0
/* Sierra */
#define CDNS_SIERRA_PLL_CMNLC 0
#define CDNS_SIERRA_PLL_CMNLC1 1
#endif /* _DT_BINDINGS_CADENCE_SERDES_H */

View File

@@ -0,0 +1,21 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* This header provides constants for TI SERDES.
*/
#ifndef _DT_BINDINGS_TI_SERDES
#define _DT_BINDINGS_TI_SERDES
/* Clock index for output clocks from WIZ */
/* MUX Clocks */
#define TI_WIZ_PLL0_REFCLK 0
#define TI_WIZ_PLL1_REFCLK 1
#define TI_WIZ_REFCLK_DIG 2
/* Reserve index here for future additions */
/* MISC Clocks */
#define TI_WIZ_PHY_EN_REFCLK 16
#endif /* _DT_BINDINGS_TI_SERDES */

View File

@@ -19,5 +19,6 @@
#define PHY_TYPE_DP 6
#define PHY_TYPE_XPCS 7
#define PHY_TYPE_SGMII 8
#define PHY_TYPE_QSGMII 9
#endif /* _DT_BINDINGS_PHY */

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* This header provides constants specific to AM33XX pinctrl bindings.
*/
@@ -39,5 +40,133 @@
#undef PIN_OFF_INPUT_PULLDOWN
#undef PIN_OFF_WAKEUPENABLE
#endif
#define AM335X_PIN_OFFSET_MIN 0x0800U
#define AM335X_PIN_GPMC_AD0 0x800
#define AM335X_PIN_GPMC_AD1 0x804
#define AM335X_PIN_GPMC_AD2 0x808
#define AM335X_PIN_GPMC_AD3 0x80c
#define AM335X_PIN_GPMC_AD4 0x810
#define AM335X_PIN_GPMC_AD5 0x814
#define AM335X_PIN_GPMC_AD6 0x818
#define AM335X_PIN_GPMC_AD7 0x81c
#define AM335X_PIN_GPMC_AD8 0x820
#define AM335X_PIN_GPMC_AD9 0x824
#define AM335X_PIN_GPMC_AD10 0x828
#define AM335X_PIN_GPMC_AD11 0x82c
#define AM335X_PIN_GPMC_AD12 0x830
#define AM335X_PIN_GPMC_AD13 0x834
#define AM335X_PIN_GPMC_AD14 0x838
#define AM335X_PIN_GPMC_AD15 0x83c
#define AM335X_PIN_GPMC_A0 0x840
#define AM335X_PIN_GPMC_A1 0x844
#define AM335X_PIN_GPMC_A2 0x848
#define AM335X_PIN_GPMC_A3 0x84c
#define AM335X_PIN_GPMC_A4 0x850
#define AM335X_PIN_GPMC_A5 0x854
#define AM335X_PIN_GPMC_A6 0x858
#define AM335X_PIN_GPMC_A7 0x85c
#define AM335X_PIN_GPMC_A8 0x860
#define AM335X_PIN_GPMC_A9 0x864
#define AM335X_PIN_GPMC_A10 0x868
#define AM335X_PIN_GPMC_A11 0x86c
#define AM335X_PIN_GPMC_WAIT0 0x870
#define AM335X_PIN_GPMC_WPN 0x874
#define AM335X_PIN_GPMC_BEN1 0x878
#define AM335X_PIN_GPMC_CSN0 0x87c
#define AM335X_PIN_GPMC_CSN1 0x880
#define AM335X_PIN_GPMC_CSN2 0x884
#define AM335X_PIN_GPMC_CSN3 0x888
#define AM335X_PIN_GPMC_CLK 0x88c
#define AM335X_PIN_GPMC_ADVN_ALE 0x890
#define AM335X_PIN_GPMC_OEN_REN 0x894
#define AM335X_PIN_GPMC_WEN 0x898
#define AM335X_PIN_GPMC_BEN0_CLE 0x89c
#define AM335X_PIN_LCD_DATA0 0x8a0
#define AM335X_PIN_LCD_DATA1 0x8a4
#define AM335X_PIN_LCD_DATA2 0x8a8
#define AM335X_PIN_LCD_DATA3 0x8ac
#define AM335X_PIN_LCD_DATA4 0x8b0
#define AM335X_PIN_LCD_DATA5 0x8b4
#define AM335X_PIN_LCD_DATA6 0x8b8
#define AM335X_PIN_LCD_DATA7 0x8bc
#define AM335X_PIN_LCD_DATA8 0x8c0
#define AM335X_PIN_LCD_DATA9 0x8c4
#define AM335X_PIN_LCD_DATA10 0x8c8
#define AM335X_PIN_LCD_DATA11 0x8cc
#define AM335X_PIN_LCD_DATA12 0x8d0
#define AM335X_PIN_LCD_DATA13 0x8d4
#define AM335X_PIN_LCD_DATA14 0x8d8
#define AM335X_PIN_LCD_DATA15 0x8dc
#define AM335X_PIN_LCD_VSYNC 0x8e0
#define AM335X_PIN_LCD_HSYNC 0x8e4
#define AM335X_PIN_LCD_PCLK 0x8e8
#define AM335X_PIN_LCD_AC_BIAS_EN 0x8ec
#define AM335X_PIN_MMC0_DAT3 0x8f0
#define AM335X_PIN_MMC0_DAT2 0x8f4
#define AM335X_PIN_MMC0_DAT1 0x8f8
#define AM335X_PIN_MMC0_DAT0 0x8fc
#define AM335X_PIN_MMC0_CLK 0x900
#define AM335X_PIN_MMC0_CMD 0x904
#define AM335X_PIN_MII1_COL 0x908
#define AM335X_PIN_MII1_CRS 0x90c
#define AM335X_PIN_MII1_RX_ER 0x910
#define AM335X_PIN_MII1_TX_EN 0x914
#define AM335X_PIN_MII1_RX_DV 0x918
#define AM335X_PIN_MII1_TXD3 0x91c
#define AM335X_PIN_MII1_TXD2 0x920
#define AM335X_PIN_MII1_TXD1 0x924
#define AM335X_PIN_MII1_TXD0 0x928
#define AM335X_PIN_MII1_TX_CLK 0x92c
#define AM335X_PIN_MII1_RX_CLK 0x930
#define AM335X_PIN_MII1_RXD3 0x934
#define AM335X_PIN_MII1_RXD2 0x938
#define AM335X_PIN_MII1_RXD1 0x93c
#define AM335X_PIN_MII1_RXD0 0x940
#define AM335X_PIN_RMII1_REF_CLK 0x944
#define AM335X_PIN_MDIO 0x948
#define AM335X_PIN_MDC 0x94c
#define AM335X_PIN_SPI0_SCLK 0x950
#define AM335X_PIN_SPI0_D0 0x954
#define AM335X_PIN_SPI0_D1 0x958
#define AM335X_PIN_SPI0_CS0 0x95c
#define AM335X_PIN_SPI0_CS1 0x960
#define AM335X_PIN_ECAP0_IN_PWM0_OUT 0x964
#define AM335X_PIN_UART0_CTSN 0x968
#define AM335X_PIN_UART0_RTSN 0x96c
#define AM335X_PIN_UART0_RXD 0x970
#define AM335X_PIN_UART0_TXD 0x974
#define AM335X_PIN_UART1_CTSN 0x978
#define AM335X_PIN_UART1_RTSN 0x97c
#define AM335X_PIN_UART1_RXD 0x980
#define AM335X_PIN_UART1_TXD 0x984
#define AM335X_PIN_I2C0_SDA 0x988
#define AM335X_PIN_I2C0_SCL 0x98c
#define AM335X_PIN_MCASP0_ACLKX 0x990
#define AM335X_PIN_MCASP0_FSX 0x994
#define AM335X_PIN_MCASP0_AXR0 0x998
#define AM335X_PIN_MCASP0_AHCLKR 0x99c
#define AM335X_PIN_MCASP0_ACLKR 0x9a0
#define AM335X_PIN_MCASP0_FSR 0x9a4
#define AM335X_PIN_MCASP0_AXR1 0x9a8
#define AM335X_PIN_MCASP0_AHCLKX 0x9ac
#define AM335X_PIN_XDMA_EVENT_INTR0 0x9b0
#define AM335X_PIN_XDMA_EVENT_INTR1 0x9b4
#define AM335X_PIN_WARMRSTN 0x9b8
#define AM335X_PIN_NNMI 0x9c0
#define AM335X_PIN_TMS 0x9d0
#define AM335X_PIN_TDI 0x9d4
#define AM335X_PIN_TDO 0x9d8
#define AM335X_PIN_TCK 0x9dc
#define AM335X_PIN_TRSTN 0x9e0
#define AM335X_PIN_EMU0 0x9e4
#define AM335X_PIN_EMU1 0x9e8
#define AM335X_PIN_RTC_PWRONRSTN 0x9f8
#define AM335X_PIN_PMIC_POWER_EN 0x9fc
#define AM335X_PIN_EXT_WAKEUP 0xa00
#define AM335X_PIN_USB0_DRVVBUS 0xa1c
#define AM335X_PIN_USB1_DRVVBUS 0xa34
#define AM335X_PIN_OFFSET_MAX 0x0a34U
#endif

View File

@@ -24,7 +24,7 @@
#define PULL_UP (1 << 4)
#define ALTELECTRICALSEL (1 << 5)
/* 34xx specific mux bit defines */
/* omap3/4/5 specific mux bit defines */
#define INPUT_EN (1 << 8)
#define OFF_EN (1 << 9)
#define OFFOUT_EN (1 << 10)
@@ -32,8 +32,6 @@
#define OFF_PULL_EN (1 << 12)
#define OFF_PULL_UP (1 << 13)
#define WAKEUP_EN (1 << 14)
/* 44xx specific mux bit defines */
#define WAKEUP_EVENT (1 << 15)
/* Active pin states */
@@ -48,8 +46,8 @@
#define PIN_OFF_NONE 0
#define PIN_OFF_OUTPUT_HIGH (OFF_EN | OFFOUT_EN | OFFOUT_VAL)
#define PIN_OFF_OUTPUT_LOW (OFF_EN | OFFOUT_EN)
#define PIN_OFF_INPUT_PULLUP (OFF_EN | OFF_PULL_EN | OFF_PULL_UP)
#define PIN_OFF_INPUT_PULLDOWN (OFF_EN | OFF_PULL_EN)
#define PIN_OFF_INPUT_PULLUP (OFF_EN | OFFOUT_EN | OFF_PULL_EN | OFF_PULL_UP)
#define PIN_OFF_INPUT_PULLDOWN (OFF_EN | OFFOUT_EN | OFF_PULL_EN)
#define PIN_OFF_WAKEUPENABLE WAKEUP_EN
/*
@@ -66,7 +64,8 @@
#define OMAP3_WKUP_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x2a00) (val)
#define DM814X_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val)
#define DM816X_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val)
#define AM33XX_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val)
#define AM33XX_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) (0)
#define AM33XX_PADCONF(pa, conf, mux) OMAP_IOPAD_OFFSET((pa), 0x0800) (conf) (mux)
/*
* Macros to allow using the offset from the padconf physical address