diff options
author | Tom Rini <trini@konsulko.com> | 2019-06-20 09:14:03 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-06-20 09:14:03 -0400 |
commit | e8c185bb15f7e362f0d77e042b6811966917a6b7 (patch) | |
tree | bcf45fb8bc98c545ddf981e7b3b9504e8b723b63 | |
parent | 64fabed9715a85c0ebcd092c8e8f5f2f280c719c (diff) | |
parent | 7c654683464dc4cd89f9a8198e26336263390b57 (diff) | |
download | u-boot-e8c185bb15f7e362f0d77e042b6811966917a6b7.zip u-boot-e8c185bb15f7e362f0d77e042b6811966917a6b7.tar.gz u-boot-e8c185bb15f7e362f0d77e042b6811966917a6b7.tar.bz2 |
Merge tag 'u-boot-stm32-20190619' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
- Update STM32MP entry in MAINTAINERS
- Handle correctly binding for g-tx-fifo-size for USB DWC2 driver
- Fix trusted STM32MP1 defconfig with correct ethernet driver
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi | 4 | ||||
-rw-r--r-- | configs/stm32mp15_trusted_defconfig | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/dwc2_udc_otg.c | 17 |
4 files changed, 16 insertions, 8 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 8e26eda..ca32d7e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -295,7 +295,6 @@ F: arch/arm/include/asm/arch-spear/ ARM STM STM32MP M: Patrick Delaunay <patrick.delaunay@st.com> -M: Christophe Kerello <christophe.kerello@st.com> M: Patrice Chotard <patrice.chotard@st.com> L: uboot-stm32@st-md-mailman.stormreply.com (moderated for non-subscribers) S: Maintained diff --git a/arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi b/arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi index 5b19e44..994092a 100644 --- a/arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi +++ b/arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi @@ -56,10 +56,6 @@ }; }; -&usbotg_hs { - g-tx-fifo-size = <576>; -}; - &v3v3 { regulator-always-on; }; diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig index 66361c8..5fe9477 100644 --- a/configs/stm32mp15_trusted_defconfig +++ b/configs/stm32mp15_trusted_defconfig @@ -73,7 +73,7 @@ CONFIG_SPI_FLASH_WINBOND=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_SPI_FLASH_MTD=y CONFIG_DM_ETH=y -CONFIG_ETH_DESIGNWARE=y +CONFIG_DWC_ETH_QOS=y CONFIG_PHY=y CONFIG_PHY_STM32_USBPHYC=y CONFIG_PINCONF=y diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c index 494ab53..35f4147 100644 --- a/drivers/usb/gadget/dwc2_udc_otg.c +++ b/drivers/usb/gadget/dwc2_udc_otg.c @@ -1039,8 +1039,10 @@ static int dwc2_udc_otg_ofdata_to_platdata(struct udevice *dev) int node = dev_of_offset(dev); ulong drvdata; void (*set_params)(struct dwc2_plat_otg_data *data); + int ret; - if (usb_get_dr_mode(node) != USB_DR_MODE_PERIPHERAL) { + if (usb_get_dr_mode(node) != USB_DR_MODE_PERIPHERAL && + usb_get_dr_mode(node) != USB_DR_MODE_OTG) { dev_dbg(dev, "Invalid mode\n"); return -ENODEV; } @@ -1050,7 +1052,18 @@ static int dwc2_udc_otg_ofdata_to_platdata(struct udevice *dev) platdata->rx_fifo_sz = dev_read_u32_default(dev, "g-rx-fifo-size", 0); platdata->np_tx_fifo_sz = dev_read_u32_default(dev, "g-np-tx-fifo-size", 0); - platdata->tx_fifo_sz = dev_read_u32_default(dev, "g-tx-fifo-size", 0); + + platdata->tx_fifo_sz_nb = + dev_read_size(dev, "g-tx-fifo-size") / sizeof(u32); + if (platdata->tx_fifo_sz_nb > DWC2_MAX_HW_ENDPOINTS) + platdata->tx_fifo_sz_nb = DWC2_MAX_HW_ENDPOINTS; + if (platdata->tx_fifo_sz_nb) { + ret = dev_read_u32_array(dev, "g-tx-fifo-size", + platdata->tx_fifo_sz_array, + platdata->tx_fifo_sz_nb); + if (ret) + return ret; + } platdata->force_b_session_valid = dev_read_bool(dev, "u-boot,force-b-session-valid"); |