From 8ada211d0383b72878582bd312b984a9eae62b30 Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Wed, 13 Dec 2017 15:47:00 +0900 Subject: usb: renesas_usbhs: add extcon notifier to set mode for non-otg channel This patch adds extcon notifier callback to set the mode of host/peripheral by using extcon state (e.g phy-rcar-gen3-usb2) for non-otg channel (e.g. R-Car D3). [Fengguang Wu: fixed sparse warning] Signed-off-by: Fengguang Wu Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi usb: renesas_usbhs: usbhs_rcar3_notifier() can be static Fixes: 3a7cce26122e ("usb: renesas_usbhs: add extcon notifier to set mode for non-otg channel") Signed-off-by: Fengguang Wu Signed-off-by: Felipe Balbi --- drivers/usb/renesas_usbhs/common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/usb/renesas_usbhs/common.h') diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h index 64797784a6df..c9747f064601 100644 --- a/drivers/usb/renesas_usbhs/common.h +++ b/drivers/usb/renesas_usbhs/common.h @@ -249,6 +249,7 @@ struct usbhs_priv { struct platform_device *pdev; struct extcon_dev *edev; + struct notifier_block nb; spinlock_t lock; -- cgit v1.2.3 From aec2927b5944df70bca4bdeea6c4e7c3195dc37a Mon Sep 17 00:00:00 2001 From: Chris Brandt Date: Mon, 8 Jan 2018 07:30:53 -0500 Subject: usb: renesas_usbhs: Add support for RZ/A1 This patch adds the capability to support RZ/A1 SoCs. Signed-off-by: Chris Brandt Signed-off-by: Greg Kroah-Hartman --- drivers/usb/renesas_usbhs/common.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/usb/renesas_usbhs/common.h') diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h index c9747f064601..f619afeae2b8 100644 --- a/drivers/usb/renesas_usbhs/common.h +++ b/drivers/usb/renesas_usbhs/common.h @@ -98,6 +98,7 @@ struct usbhs_priv; #define D2FIFOCTR 0x00F2 /* for R-Car Gen2 */ #define D3FIFOSEL 0x00F4 /* for R-Car Gen2 */ #define D3FIFOCTR 0x00F6 /* for R-Car Gen2 */ +#define SUSPMODE 0x0102 /* for RZ/A */ /* SYSCFG */ #define SCKE (1 << 10) /* USB Module Clock Enable */ @@ -106,6 +107,8 @@ struct usbhs_priv; #define DRPD (1 << 5) /* D+ Line/D- Line Resistance Control */ #define DPRPU (1 << 4) /* D+ Line Resistance Control */ #define USBE (1 << 0) /* USB Module Operation Enable */ +#define UCKSEL (1 << 2) /* Clock Select for RZ/A1 */ +#define UPLLE (1 << 1) /* USB PLL Enable for RZ/A1 */ /* DVSTCTR */ #define EXTLP (1 << 10) /* Controls the EXTLP pin output state */ @@ -233,6 +236,9 @@ struct usbhs_priv; #define USBSPD_SPEED_FULL 0x2 #define USBSPD_SPEED_HIGH 0x3 +/* SUSPMODE */ +#define SUSPM (1 << 14) /* SuspendM Control */ + /* * struct */ -- cgit v1.2.3