From 29dff4d4556fb9d1422ecd7f8fd03fff60acba17 Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Tue, 11 Jun 2019 15:40:41 +0200 Subject: configs: stm32mp15: Select correct Ethernet driver for trusted mode Select the correct Ethernet driver from Synopsis. Initially, "Synopsys Designware Ethernet MAC" driver was wrongly selected instead of "Synopsys DWC Ethernet QOS device" driver. Fixes: commit f90b3f5b68ed ("configs: stm32mp15: Enable Ethernet feature") Signed-off-by: Patrice Chotard --- configs/stm32mp15_trusted_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig index 66361c87155..5fe94778235 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 -- cgit v1.2.3 From 5fa8fe105ece2990de21d3e468fd2d8cfeee26f5 Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Tue, 18 Jun 2019 10:52:07 +0200 Subject: MAINTAINERS: Remove Christophe Kerello from STM32MP entry Christophe will not have maintainer activities, so remove its name. Signed-off-by: Patrice Chotard Cc: Christophe Kerello Cc: Patrick Delaunay --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 8e26eda2c88..ca32d7e5e1c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -295,7 +295,6 @@ F: arch/arm/include/asm/arch-spear/ ARM STM STM32MP M: Patrick Delaunay -M: Christophe Kerello M: Patrice Chotard L: uboot-stm32@st-md-mailman.stormreply.com (moderated for non-subscribers) S: Maintained -- cgit v1.2.3 From 7350a75b517b6162c8f832a9ead09b9e26e8068f Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Tue, 18 Jun 2019 16:57:16 +0200 Subject: usb: dwc2: correctly handle binding for g-tx-fifo-size Manage g-tx-fifo-size as a array as specify in the binding. Signed-off-by: Patrick Delaunay Reviewed-by: Marek Vasut --- drivers/usb/gadget/dwc2_udc_otg.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c index 494ab533cca..023439cdacc 100644 --- a/drivers/usb/gadget/dwc2_udc_otg.c +++ b/drivers/usb/gadget/dwc2_udc_otg.c @@ -1039,6 +1039,7 @@ 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) { dev_dbg(dev, "Invalid mode\n"); @@ -1050,7 +1051,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"); -- cgit v1.2.3 From de6e4a6f5c3cd12ccda8d408ea60079211346e5e Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Tue, 18 Jun 2019 16:57:17 +0200 Subject: ARM: dts: stm32mp1: remove override for g-tx-fifo-size Remove the override for usbotg_hs on g-tx-fifo-size as the correct binding, used in the kernel device tree, is now supported in dwc2 device driver. Signed-off-by: Patrick Delaunay --- arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi b/arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi index 5b19e44d2fb..994092a195b 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; }; -- cgit v1.2.3 From 7c654683464dc4cd89f9a8198e26336263390b57 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Tue, 18 Jun 2019 16:57:18 +0200 Subject: usb: dwc2: allow peripheral mode for OTG configuration Allow device mode in DWC2 driver when device tree select the dr_mode "peripheral" or "otg". The device mode is not allowed when dr_mode = "host" in device tree. Signed-off-by: Patrick Delaunay Reviewed-by: Marek Vasut --- drivers/usb/gadget/dwc2_udc_otg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c index 023439cdacc..35f4147840e 100644 --- a/drivers/usb/gadget/dwc2_udc_otg.c +++ b/drivers/usb/gadget/dwc2_udc_otg.c @@ -1041,7 +1041,8 @@ static int dwc2_udc_otg_ofdata_to_platdata(struct udevice *dev) 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; } -- cgit v1.2.3