Merge tag 'u-boot-stm32-20190619' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
authorTom Rini <trini@konsulko.com>
Thu, 20 Jun 2019 13:14:03 +0000 (09:14 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 20 Jun 2019 13:14:03 +0000 (09:14 -0400)
- 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

MAINTAINERS
arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi
configs/stm32mp15_trusted_defconfig
drivers/usb/gadget/dwc2_udc_otg.c

index 8e26eda..ca32d7e 100644 (file)
@@ -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
index 5b19e44..994092a 100644 (file)
        };
 };
 
-&usbotg_hs {
-       g-tx-fifo-size = <576>;
-};
-
 &v3v3 {
        regulator-always-on;
 };
index 66361c8..5fe9477 100644 (file)
@@ -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
index 494ab53..35f4147 100644 (file)
@@ -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");