public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 0/8] AM654: Add USB support
@ 2019-12-09  5:07 Vignesh Raghavendra
  2019-12-09  5:07 ` [PATCH v2 1/8] dwc3-generic: Add support for AM654 USB controller Vignesh Raghavendra
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Vignesh Raghavendra @ 2019-12-09  5:07 UTC (permalink / raw)
  To: u-boot

This series adds USB support for AM654 SoC that has DWC3 USB controller.

Patch 1 adds new compatible for DWC3 driver. Patch 2 and 3 adds PHY
related changes and remaining patches add DT and configs related to USB
host,device and DFU support.

v2:
Rebase onto the latest master
Collect Reviewed-bys

Vignesh Raghavendra (8):
  dwc3-generic: Add support for AM654 USB controller
  phy: omap-usb2-phy: Fix warnings when built for ARM64
  phy: omap-usb2-phy: Add support for AM654 USB2 PHY
  arm: dts: k3-am65-main: add USB support
  arm: dts: k3-am654-base-board: enable USB1
  configs: am65x_evm: Add DFU related env variables
  am65x_evm_a53_defconfig: Enable configs to support USB and DFU
  configs: am65x_evm: Enable USB keyboard as second stdin

 arch/arm/dts/k3-am65-main.dtsi               | 78 ++++++++++++++++++++
 arch/arm/dts/k3-am654-base-board-u-boot.dtsi |  4 +
 arch/arm/dts/k3-am654-base-board.dts         | 28 +++++++
 configs/am65x_evm_a53_defconfig              | 22 ++++++
 drivers/phy/omap-usb2-phy.c                  | 22 +++++-
 drivers/usb/dwc3/dwc3-generic.c              |  1 +
 include/configs/am65x_evm.h                  | 11 ++-
 7 files changed, 162 insertions(+), 4 deletions(-)

-- 
2.24.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/8] dwc3-generic: Add support for AM654 USB controller
  2019-12-09  5:07 [PATCH v2 0/8] AM654: Add USB support Vignesh Raghavendra
@ 2019-12-09  5:07 ` Vignesh Raghavendra
  2019-12-09  5:07 ` [PATCH v2 2/8] phy: omap-usb2-phy: Fix warnings when built for ARM64 Vignesh Raghavendra
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Vignesh Raghavendra @ 2019-12-09  5:07 UTC (permalink / raw)
  To: u-boot

AM654 has DWC3 USB controller that is very similar to other TI SoCs. Add
a new compatible to enable the same.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Marek Vasut <marex@denx.de>
---
 drivers/usb/dwc3/dwc3-generic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 8d45748b3b89..3e116b2c5cc4 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -426,6 +426,7 @@ static const struct udevice_id dwc3_glue_ids[] = {
 	{ .compatible = "ti,keystone-dwc3"},
 	{ .compatible = "ti,dwc3", .data = (ulong)&ti_ops },
 	{ .compatible = "ti,am437x-dwc3", .data = (ulong)&ti_ops },
+	{ .compatible = "ti,am654-dwc3" },
 	{ }
 };
 
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/8] phy: omap-usb2-phy: Fix warnings when built for ARM64
  2019-12-09  5:07 [PATCH v2 0/8] AM654: Add USB support Vignesh Raghavendra
  2019-12-09  5:07 ` [PATCH v2 1/8] dwc3-generic: Add support for AM654 USB controller Vignesh Raghavendra
@ 2019-12-09  5:07 ` Vignesh Raghavendra
  2019-12-09  5:07 ` [PATCH v2 3/8] phy: omap-usb2-phy: Add support for AM654 USB2 PHY Vignesh Raghavendra
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Vignesh Raghavendra @ 2019-12-09  5:07 UTC (permalink / raw)
  To: u-boot

Below warning is seen when this driver is built for devices with 64 bit
physical address space.

drivers/phy/omap-usb2-phy.c: In function ‘omap_usb2_phy_probe’:
drivers/phy/omap-usb2-phy.c:187:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   priv->phy_base = (void *)base;
                    ^
Fix this by using dev_read_addr_ptr() instead of dev_read_addr().

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Marek Vasut <marex@denx.de>
---
 drivers/phy/omap-usb2-phy.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/omap-usb2-phy.c b/drivers/phy/omap-usb2-phy.c
index be3bb0d3676e..6e5958d1dcec 100644
--- a/drivers/phy/omap-usb2-phy.c
+++ b/drivers/phy/omap-usb2-phy.c
@@ -179,11 +179,10 @@ int omap_usb2_phy_probe(struct udevice *dev)
 		return -EINVAL;
 
 	if (data->flags & OMAP_USB2_CALIBRATE_FALSE_DISCONNECT) {
-		u32 base = dev_read_addr(dev);
+		priv->phy_base = dev_read_addr_ptr(dev);
 
-		if (base == FDT_ADDR_T_NONE)
+		if (!priv->phy_base)
 			return -EINVAL;
-		priv->phy_base = (void *)base;
 		priv->flags |= OMAP_USB2_CALIBRATE_FALSE_DISCONNECT;
 	}
 
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/8] phy: omap-usb2-phy: Add support for AM654 USB2 PHY
  2019-12-09  5:07 [PATCH v2 0/8] AM654: Add USB support Vignesh Raghavendra
  2019-12-09  5:07 ` [PATCH v2 1/8] dwc3-generic: Add support for AM654 USB controller Vignesh Raghavendra
  2019-12-09  5:07 ` [PATCH v2 2/8] phy: omap-usb2-phy: Fix warnings when built for ARM64 Vignesh Raghavendra
@ 2019-12-09  5:07 ` Vignesh Raghavendra
  2019-12-09  5:07 ` [PATCH v2 4/8] arm: dts: k3-am65-main: add USB support Vignesh Raghavendra
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Vignesh Raghavendra @ 2019-12-09  5:07 UTC (permalink / raw)
  To: u-boot

AM654 SoC has USB2 PHY which is similar to existing USB2 PHYs on OMAP
SoCs. Add support for the same.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Marek Vasut <marex@denx.de>
---
 drivers/phy/omap-usb2-phy.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/phy/omap-usb2-phy.c b/drivers/phy/omap-usb2-phy.c
index 6e5958d1dcec..923f2c105d67 100644
--- a/drivers/phy/omap-usb2-phy.c
+++ b/drivers/phy/omap-usb2-phy.c
@@ -27,6 +27,10 @@
 #define USB2PHY_DISCON_BYP_LATCH	BIT(31)
 #define USB2PHY_ANA_CONFIG1		(0x4c)
 
+#define AM654_USB2_OTG_PD		BIT(8)
+#define AM654_USB2_VBUS_DET_EN		BIT(5)
+#define AM654_USB2_VBUSVALID_DET_EN	BIT(4)
+
 DECLARE_GLOBAL_DATA_PTR;
 
 struct omap_usb2_phy {
@@ -74,6 +78,15 @@ static const struct usb_phy_data am437x_usb2_data = {
 	.power_off = AM437X_USB2_PHY_PD | AM437X_USB2_OTG_PD,
 };
 
+static const struct usb_phy_data am654_usb2_data = {
+	.label = "am654_usb2",
+	.flags = OMAP_USB2_CALIBRATE_FALSE_DISCONNECT,
+	.mask = AM654_USB2_OTG_PD | AM654_USB2_VBUS_DET_EN |
+		AM654_USB2_VBUSVALID_DET_EN,
+	.power_on = AM654_USB2_VBUS_DET_EN | AM654_USB2_VBUSVALID_DET_EN,
+	.power_off = AM654_USB2_OTG_PD,
+};
+
 static const struct udevice_id omap_usb2_id_table[] = {
 	{
 		.compatible = "ti,omap5-usb2",
@@ -91,6 +104,10 @@ static const struct udevice_id omap_usb2_id_table[] = {
 		.compatible = "ti,am437x-usb2",
 		.data = (ulong)&am437x_usb2_data,
 	},
+	{
+		.compatible = "ti,am654-usb2",
+		.data = (ulong)&am654_usb2_data,
+	},
 	{},
 };
 
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 4/8] arm: dts: k3-am65-main: add USB support
  2019-12-09  5:07 [PATCH v2 0/8] AM654: Add USB support Vignesh Raghavendra
                   ` (2 preceding siblings ...)
  2019-12-09  5:07 ` [PATCH v2 3/8] phy: omap-usb2-phy: Add support for AM654 USB2 PHY Vignesh Raghavendra
@ 2019-12-09  5:07 ` Vignesh Raghavendra
  2019-12-09  5:07 ` [PATCH v2 5/8] arm: dts: k3-am654-base-board: enable USB1 Vignesh Raghavendra
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Vignesh Raghavendra @ 2019-12-09  5:07 UTC (permalink / raw)
  To: u-boot

Add support for USB0 and USB1 instances on the AM6 SoC.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 arch/arm/dts/k3-am65-main.dtsi | 78 ++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/arch/arm/dts/k3-am65-main.dtsi b/arch/arm/dts/k3-am65-main.dtsi
index 0f5da9a563d3..ab40dafceb52 100644
--- a/arch/arm/dts/k3-am65-main.dtsi
+++ b/arch/arm/dts/k3-am65-main.dtsi
@@ -251,4 +251,82 @@
 			interrupts = <GIC_SPI 328 IRQ_TYPE_EDGE_RISING>;
 		};
 	};
+
+	dwc3_0: dwc3 at 4000000 {
+		compatible = "ti,am654-dwc3";
+		reg = <0x0 0x4000000 0x0 0x4000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x0 0x0 0x4000000 0x20000>;
+		interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
+		dma-coherent;
+		power-domains = <&k3_pds 151 TI_SCI_PD_EXCLUSIVE>;
+		assigned-clocks = <&k3_clks 151 2>, <&k3_clks 151 7>;
+		assigned-clock-parents = <&k3_clks 151 4>,	/* set REF_CLK to 20MHz i.e. PER0_PLL/48 */
+					 <&k3_clks 151 9>;	/* set PIPE3_TXB_CLK to CLK_12M_RC/256 (for HS only) */
+
+		usb0: usb at 10000 {
+			compatible = "snps,dwc3";
+			reg = <0x10000 0x10000>;
+			interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "peripheral",
+					  "host",
+					  "otg";
+			maximum-speed = "high-speed";
+			dr_mode = "otg";
+			phys = <&usb0_phy>;
+			phy-names = "usb2-phy";
+			snps,dis_u3_susphy_quirk;
+		};
+	};
+
+	usb0_phy: phy at 4100000 {
+		compatible = "ti,am654-usb2", "ti,omap-usb2";
+		reg = <0x0 0x4100000 0x0 0x54>;
+		syscon-phy-power = <&scm_conf 0x4000>;
+		clocks = <&k3_clks 151 0>, <&k3_clks 151 1>;
+		clock-names = "wkupclk", "refclk";
+		#phy-cells = <0>;
+		ti,dis-chg-det-quirk;
+	};
+
+	dwc3_1: dwc3 at 4020000 {
+		compatible = "ti,am654-dwc3";
+		reg = <0x0 0x4020000 0x0 0x4000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x0 0x0 0x4020000 0x20000>;
+		interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+		dma-coherent;
+		power-domains = <&k3_pds 152 TI_SCI_PD_EXCLUSIVE>;
+		assigned-clocks = <&k3_clks 152 2>;
+		assigned-clock-parents = <&k3_clks 152 4>;	/* set REF_CLK to 20MHz i.e. PER0_PLL/48 */
+
+		usb1: usb at 10000 {
+			compatible = "snps,dwc3";
+			reg = <0x10000 0x10000>;
+			interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "peripheral",
+					  "host",
+					  "otg";
+			maximum-speed = "high-speed";
+			dr_mode = "otg";
+			phys = <&usb1_phy>;
+			phy-names = "usb2-phy";
+		};
+	};
+
+	usb1_phy: phy at 4110000 {
+		compatible = "ti,am654-usb2", "ti,omap-usb2";
+		reg = <0x0 0x4110000 0x0 0x54>;
+		syscon-phy-power = <&scm_conf 0x4020>;
+		clocks = <&k3_clks 152 0>, <&k3_clks 152 1>;
+		clock-names = "wkupclk", "refclk";
+		#phy-cells = <0>;
+		ti,dis-chg-det-quirk;
+	};
 };
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 5/8] arm: dts: k3-am654-base-board: enable USB1
  2019-12-09  5:07 [PATCH v2 0/8] AM654: Add USB support Vignesh Raghavendra
                   ` (3 preceding siblings ...)
  2019-12-09  5:07 ` [PATCH v2 4/8] arm: dts: k3-am65-main: add USB support Vignesh Raghavendra
@ 2019-12-09  5:07 ` Vignesh Raghavendra
  2019-12-09  5:07 ` [PATCH v2 6/8] configs: am65x_evm: Add DFU related env variables Vignesh Raghavendra
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Vignesh Raghavendra @ 2019-12-09  5:07 UTC (permalink / raw)
  To: u-boot

Add pinmux for USB1 and enable it as a peripheral port in U-Boot
specific dtsi since U-Boot does not support OTG.
Disable USB0 as its not available on the baseboard.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 arch/arm/dts/k3-am654-base-board-u-boot.dtsi |  4 +++
 arch/arm/dts/k3-am654-base-board.dts         | 28 ++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
index 8589f76d2346..3b7e20accf96 100644
--- a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
@@ -361,3 +361,7 @@
 &wkup_i2c0 {
 	u-boot,dm-spl;
 };
+
+&usb1 {
+	dr_mode = "peripheral";
+};
diff --git a/arch/arm/dts/k3-am654-base-board.dts b/arch/arm/dts/k3-am654-base-board.dts
index 573ead0b4d85..7ebbf1786255 100644
--- a/arch/arm/dts/k3-am654-base-board.dts
+++ b/arch/arm/dts/k3-am654-base-board.dts
@@ -58,6 +58,12 @@
 			AM65X_IOPAD(0x01b0, PIN_INPUT, 0)		/* (C25) MMC0_DS */
 		>;
 	};
+
+	usb1_pins_default: usb1_pins_default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x02c0, PIN_OUTPUT, 0) /* (AC8) USB1_DRVVBUS */
+		>;
+	};
 };
 
 &wkup_pmx0 {
@@ -89,3 +95,25 @@
 		#gpio-cells = <2>;
 	};
 };
+
+&dwc3_1 {
+	status = "okay";
+};
+
+&usb1_phy {
+	status = "okay";
+};
+
+&usb1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb1_pins_default>;
+	dr_mode = "otg";
+};
+
+&dwc3_0 {
+	status = "disabled";
+};
+
+&usb0_phy {
+	status = "disabled";
+};
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 6/8] configs: am65x_evm: Add DFU related env variables
  2019-12-09  5:07 [PATCH v2 0/8] AM654: Add USB support Vignesh Raghavendra
                   ` (4 preceding siblings ...)
  2019-12-09  5:07 ` [PATCH v2 5/8] arm: dts: k3-am654-base-board: enable USB1 Vignesh Raghavendra
@ 2019-12-09  5:07 ` Vignesh Raghavendra
  2019-12-09  5:07 ` [PATCH v2 7/8] am65x_evm_a53_defconfig: Enable configs to support USB and DFU Vignesh Raghavendra
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Vignesh Raghavendra @ 2019-12-09  5:07 UTC (permalink / raw)
  To: u-boot

Add env variables that set up dfu_alt_info for MMC/EMMC/OSPI. This
is required to allow update of firmware on these media.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 include/configs/am65x_evm.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index 06be7cc8a469..9a120cad89e3 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -13,6 +13,7 @@
 #include <config_distro_bootcmd.h>
 #include <environment/ti/mmc.h>
 #include <environment/ti/k3_rproc.h>
+#include <environment/ti/k3_dfu.h>
 
 /* DDR Configuration */
 #define CONFIG_SYS_SDRAM_BASE1		0x880000000
@@ -104,13 +105,20 @@
 		"0 /lib/firmware/am65x-mcu-r5f0_0-fw "			\
 		"1 /lib/firmware/am65x-mcu-r5f0_1-fw "
 
+#define EXTRA_ENV_DFUARGS						\
+	"dfu_bufsiz=0x20000\0"						\
+	DFU_ALT_INFO_MMC						\
+	DFU_ALT_INFO_EMMC						\
+	DFU_ALT_INFO_OSPI
+
 /* Incorporate settings into the U-Boot environment */
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	DEFAULT_MMC_TI_ARGS						\
 	DEFAULT_FIT_TI_ARGS						\
 	EXTRA_ENV_AM65X_BOARD_SETTINGS					\
 	EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC				\
-	EXTRA_ENV_RPROC_SETTINGS
+	EXTRA_ENV_RPROC_SETTINGS					\
+	EXTRA_ENV_DFUARGS
 
 /* MMC ENV related defines */
 #ifdef CONFIG_ENV_IS_IN_MMC
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 7/8] am65x_evm_a53_defconfig: Enable configs to support USB and DFU
  2019-12-09  5:07 [PATCH v2 0/8] AM654: Add USB support Vignesh Raghavendra
                   ` (5 preceding siblings ...)
  2019-12-09  5:07 ` [PATCH v2 6/8] configs: am65x_evm: Add DFU related env variables Vignesh Raghavendra
@ 2019-12-09  5:07 ` Vignesh Raghavendra
  2019-12-09  5:07 ` [PATCH v2 8/8] configs: am65x_evm: Enable USB keyboard as second stdin Vignesh Raghavendra
  2020-01-20  6:03 ` [PATCH v2 0/8] AM654: Add USB support Lokesh Vutla
  8 siblings, 0 replies; 10+ messages in thread
From: Vignesh Raghavendra @ 2019-12-09  5:07 UTC (permalink / raw)
  To: u-boot

Enable configs related to USB Host mode, Peripheral mode and DFU.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 configs/am65x_evm_a53_defconfig | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig
index cec99ee1e298..d76c4b986f6d 100644
--- a/configs/am65x_evm_a53_defconfig
+++ b/configs/am65x_evm_a53_defconfig
@@ -32,11 +32,13 @@ CONFIG_SPL_DM_RESET=y
 CONFIG_SPL_POWER_DOMAIN=y
 CONFIG_SPL_YMODEM_SUPPORT=y
 CONFIG_CMD_ASKENV=y
+CONFIG_CMD_DFU=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_REMOTEPROC=y
+CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 # CONFIG_ISO_PARTITION is not set
@@ -54,9 +56,12 @@ CONFIG_DM=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_SPL_REGMAP=y
+CONFIG_SYSCON=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_CLK_TI_SCI=y
+CONFIG_DFU_MMC=y
+CONFIG_DFU_RAM=y
 CONFIG_DMA_CHANNELS=y
 CONFIG_TI_K3_NAVSS_UDMA=y
 CONFIG_TI_SCI_PROTOCOL=y
@@ -81,6 +86,7 @@ CONFIG_DM_PCI=y
 CONFIG_PCI_KEYSTONE=y
 CONFIG_PHY=y
 CONFIG_AM654_PHY=y
+CONFIG_OMAP_USB2_PHY=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 CONFIG_SPL_PINCTRL=y
@@ -96,5 +102,18 @@ CONFIG_SOC_TI=y
 CONFIG_SYSRESET=y
 CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_TI_SCI=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_DM_USB_GADGET=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_GENERIC=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
+CONFIG_USB_GADGET_VENDOR_NUM=0x0451
+CONFIG_USB_GADGET_PRODUCT_NUM=0x6162
+CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT_OVERLAY=y
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 8/8] configs: am65x_evm: Enable USB keyboard as second stdin
  2019-12-09  5:07 [PATCH v2 0/8] AM654: Add USB support Vignesh Raghavendra
                   ` (6 preceding siblings ...)
  2019-12-09  5:07 ` [PATCH v2 7/8] am65x_evm_a53_defconfig: Enable configs to support USB and DFU Vignesh Raghavendra
@ 2019-12-09  5:07 ` Vignesh Raghavendra
  2020-01-20  6:03 ` [PATCH v2 0/8] AM654: Add USB support Lokesh Vutla
  8 siblings, 0 replies; 10+ messages in thread
From: Vignesh Raghavendra @ 2019-12-09  5:07 UTC (permalink / raw)
  To: u-boot

Enable USB keyboard to be used as input device at U-Boot prompt. Both
serial and USB keyboard will be active inputs simultaneously.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 configs/am65x_evm_a53_defconfig | 3 +++
 include/configs/am65x_evm.h     | 1 +
 2 files changed, 4 insertions(+)

diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig
index d76c4b986f6d..312829be0d92 100644
--- a/configs/am65x_evm_a53_defconfig
+++ b/configs/am65x_evm_a53_defconfig
@@ -21,6 +21,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern"
+CONFIG_CONSOLE_MUX=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_SEPARATE_BSS=y
@@ -70,6 +71,7 @@ CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
 CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
 CONFIG_SYS_I2C_OMAP24XX=y
+CONFIG_DM_KEYBOARD=y
 CONFIG_DM_MAILBOX=y
 CONFIG_K3_SEC_PROXY=y
 CONFIG_DM_MMC=y
@@ -110,6 +112,7 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_GENERIC=y
+CONFIG_USB_KEYBOARD=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0451
diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index 9a120cad89e3..7d7f86a0598a 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -72,6 +72,7 @@
 	"overlayaddr=0x83000000\0"					\
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
+	"stdin=serial,usbkbd\0"						\
 	"args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000\0" \
 	"run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"		\
 
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 0/8] AM654: Add USB support
  2019-12-09  5:07 [PATCH v2 0/8] AM654: Add USB support Vignesh Raghavendra
                   ` (7 preceding siblings ...)
  2019-12-09  5:07 ` [PATCH v2 8/8] configs: am65x_evm: Enable USB keyboard as second stdin Vignesh Raghavendra
@ 2020-01-20  6:03 ` Lokesh Vutla
  8 siblings, 0 replies; 10+ messages in thread
From: Lokesh Vutla @ 2020-01-20  6:03 UTC (permalink / raw)
  To: u-boot



On 09/12/19 10:37 AM, Vignesh Raghavendra wrote:
> This series adds USB support for AM654 SoC that has DWC3 USB controller.
> 
> Patch 1 adds new compatible for DWC3 driver. Patch 2 and 3 adds PHY
> related changes and remaining patches add DT and configs related to USB
> host,device and DFU support.
> 
> v2:
> Rebase onto the latest master
> Collect Reviewed-bys

Merged into u-boot-ti

Thanks and regards,
Lokesh

> 
> Vignesh Raghavendra (8):
>   dwc3-generic: Add support for AM654 USB controller
>   phy: omap-usb2-phy: Fix warnings when built for ARM64
>   phy: omap-usb2-phy: Add support for AM654 USB2 PHY
>   arm: dts: k3-am65-main: add USB support
>   arm: dts: k3-am654-base-board: enable USB1
>   configs: am65x_evm: Add DFU related env variables
>   am65x_evm_a53_defconfig: Enable configs to support USB and DFU
>   configs: am65x_evm: Enable USB keyboard as second stdin
> 
>  arch/arm/dts/k3-am65-main.dtsi               | 78 ++++++++++++++++++++
>  arch/arm/dts/k3-am654-base-board-u-boot.dtsi |  4 +
>  arch/arm/dts/k3-am654-base-board.dts         | 28 +++++++
>  configs/am65x_evm_a53_defconfig              | 22 ++++++
>  drivers/phy/omap-usb2-phy.c                  | 22 +++++-
>  drivers/usb/dwc3/dwc3-generic.c              |  1 +
>  include/configs/am65x_evm.h                  | 11 ++-
>  7 files changed, 162 insertions(+), 4 deletions(-)
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-01-20  6:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-09  5:07 [PATCH v2 0/8] AM654: Add USB support Vignesh Raghavendra
2019-12-09  5:07 ` [PATCH v2 1/8] dwc3-generic: Add support for AM654 USB controller Vignesh Raghavendra
2019-12-09  5:07 ` [PATCH v2 2/8] phy: omap-usb2-phy: Fix warnings when built for ARM64 Vignesh Raghavendra
2019-12-09  5:07 ` [PATCH v2 3/8] phy: omap-usb2-phy: Add support for AM654 USB2 PHY Vignesh Raghavendra
2019-12-09  5:07 ` [PATCH v2 4/8] arm: dts: k3-am65-main: add USB support Vignesh Raghavendra
2019-12-09  5:07 ` [PATCH v2 5/8] arm: dts: k3-am654-base-board: enable USB1 Vignesh Raghavendra
2019-12-09  5:07 ` [PATCH v2 6/8] configs: am65x_evm: Add DFU related env variables Vignesh Raghavendra
2019-12-09  5:07 ` [PATCH v2 7/8] am65x_evm_a53_defconfig: Enable configs to support USB and DFU Vignesh Raghavendra
2019-12-09  5:07 ` [PATCH v2 8/8] configs: am65x_evm: Enable USB keyboard as second stdin Vignesh Raghavendra
2020-01-20  6:03 ` [PATCH v2 0/8] AM654: Add USB support Lokesh Vutla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox