* [PATCH v3 1/4] Documentation: dt: Add binding info for jz4740-musb driver
@ 2019-01-17 22:33 Paul Cercueil
2019-01-17 22:33 ` [PATCH v3 2/4] usb: musb: jz4740: Add support for devicetree Paul Cercueil
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Paul Cercueil @ 2019-01-17 22:33 UTC (permalink / raw)
To: Bin Liu; +Cc: linux-usb, devicetree, linux-kernel, Paul Cercueil
This commit adds documentation for the device-tree bindings of the
jz4740-musb driver, which provides support for the USB gadget mode
of the JZ4740 and similar SoCs from Ingenic.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Rob Herring <robh@kernel.org>
---
v2: No change
v3: No change
.../bindings/usb/ingenic,jz4740-musb.txt | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/ingenic,jz4740-musb.txt
diff --git a/Documentation/devicetree/bindings/usb/ingenic,jz4740-musb.txt b/Documentation/devicetree/bindings/usb/ingenic,jz4740-musb.txt
new file mode 100644
index 000000000000..620355cee63f
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ingenic,jz4740-musb.txt
@@ -0,0 +1,24 @@
+Ingenic JZ4740 MUSB driver
+
+Required properties:
+
+- compatible: Must be "ingenic,jz4740-musb"
+- reg: Address range of the UDC register set
+- interrupts: IRQ number related to the UDC hardware
+- interrupt-names: must be "mc"
+- clocks: phandle to the "udc" clock
+- clock-names: must be "udc"
+
+Example:
+
+udc: usb@13040000 {
+ compatible = "ingenic,jz4740-musb";
+ reg = <0x13040000 0x10000>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <24>;
+ interrupt-names = "mc";
+
+ clocks = <&cgu JZ4740_CLK_UDC>;
+ clock-names = "udc";
+};
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 2/4] usb: musb: jz4740: Add support for devicetree
2019-01-17 22:33 [PATCH v3 1/4] Documentation: dt: Add binding info for jz4740-musb driver Paul Cercueil
@ 2019-01-17 22:33 ` Paul Cercueil
2019-01-17 22:33 ` [PATCH v3 3/4] usb: musb: Kconfig: Drop dependency on MACH_JZ4740 for jz4740 Paul Cercueil
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Paul Cercueil @ 2019-01-17 22:33 UTC (permalink / raw)
To: Bin Liu; +Cc: linux-usb, devicetree, linux-kernel, Paul Cercueil
Add support for probing the driver from devicetree.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
v2: Add MODULE_DEVICE_TABLE and wrap inside CONFIG_OF
v3: No change
drivers/usb/musb/jz4740.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c
index 04d8b2bc205a..a60627bf7be3 100644
--- a/drivers/usb/musb/jz4740.c
+++ b/drivers/usb/musb/jz4740.c
@@ -10,6 +10,7 @@
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/usb/usb_phy_generic.h>
@@ -188,11 +189,20 @@ static int jz4740_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id jz4740_musb_of_match[] = {
+ { .compatible = "ingenic,jz4740-musb" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, jz4740_musb_of_match);
+#endif
+
static struct platform_driver jz4740_driver = {
.probe = jz4740_probe,
.remove = jz4740_remove,
.driver = {
.name = "musb-jz4740",
+ .of_match_table = of_match_ptr(jz4740_musb_of_match),
},
};
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 3/4] usb: musb: Kconfig: Drop dependency on MACH_JZ4740 for jz4740
2019-01-17 22:33 [PATCH v3 1/4] Documentation: dt: Add binding info for jz4740-musb driver Paul Cercueil
2019-01-17 22:33 ` [PATCH v3 2/4] usb: musb: jz4740: Add support for devicetree Paul Cercueil
@ 2019-01-17 22:33 ` Paul Cercueil
2019-01-17 22:33 ` [PATCH v3 4/4] usb: musb: Kconfig: Drop dependency on CONFIG_USB " Paul Cercueil
2019-01-21 15:18 ` [PATCH v3 1/4] Documentation: dt: Add binding info for jz4740-musb driver Bin Liu
3 siblings, 0 replies; 5+ messages in thread
From: Paul Cercueil @ 2019-01-17 22:33 UTC (permalink / raw)
To: Bin Liu; +Cc: linux-usb, devicetree, linux-kernel, Paul Cercueil
Depending on MACH_JZ4740 prevent us from creating a generic kernel that
works on more than one MIPS board. Instead, we just depend on MIPS being
set.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
v2: Remove info about adding COMPILE_TEST in commit message, as it was
there before
v3: Change MACH_INGENIC to MACH_JZ4740 in commit message
drivers/usb/musb/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index ad08895e78f9..6f5b0ed6a507 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -111,7 +111,7 @@ config USB_MUSB_UX500
config USB_MUSB_JZ4740
tristate "JZ4740"
depends on NOP_USB_XCEIV
- depends on MACH_JZ4740 || COMPILE_TEST
+ depends on MIPS || COMPILE_TEST
depends on USB_MUSB_GADGET
depends on USB_OTG_BLACKLIST_HUB
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 4/4] usb: musb: Kconfig: Drop dependency on CONFIG_USB for jz4740
2019-01-17 22:33 [PATCH v3 1/4] Documentation: dt: Add binding info for jz4740-musb driver Paul Cercueil
2019-01-17 22:33 ` [PATCH v3 2/4] usb: musb: jz4740: Add support for devicetree Paul Cercueil
2019-01-17 22:33 ` [PATCH v3 3/4] usb: musb: Kconfig: Drop dependency on MACH_JZ4740 for jz4740 Paul Cercueil
@ 2019-01-17 22:33 ` Paul Cercueil
2019-01-21 15:18 ` [PATCH v3 1/4] Documentation: dt: Add binding info for jz4740-musb driver Bin Liu
3 siblings, 0 replies; 5+ messages in thread
From: Paul Cercueil @ 2019-01-17 22:33 UTC (permalink / raw)
To: Bin Liu; +Cc: linux-usb, devicetree, linux-kernel, Paul Cercueil
The Kconfig entry previously depended on USB_OTG_BLACKLIST_HUB
unconditionally, which is an option that is only available when
CONFIG_USB is enabled. However, the USB IP in the JZ4740 SoC does not
support host mode, only gadget mode, so it makes sense to allow it to
build when CONFIG_USB is not set.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
v2: Instead of removing the dependency on USB_OTG_BLACKLIST_HUB, we now
depend on (USB=n || USB_OTG_BLACKLIST_HUB)
v3: No change
drivers/usb/musb/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 6f5b0ed6a507..fda7691bf173 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -113,7 +113,7 @@ config USB_MUSB_JZ4740
depends on NOP_USB_XCEIV
depends on MIPS || COMPILE_TEST
depends on USB_MUSB_GADGET
- depends on USB_OTG_BLACKLIST_HUB
+ depends on USB=n || USB_OTG_BLACKLIST_HUB
config USB_MUSB_AM335X_CHILD
tristate
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/4] Documentation: dt: Add binding info for jz4740-musb driver
2019-01-17 22:33 [PATCH v3 1/4] Documentation: dt: Add binding info for jz4740-musb driver Paul Cercueil
` (2 preceding siblings ...)
2019-01-17 22:33 ` [PATCH v3 4/4] usb: musb: Kconfig: Drop dependency on CONFIG_USB " Paul Cercueil
@ 2019-01-21 15:18 ` Bin Liu
3 siblings, 0 replies; 5+ messages in thread
From: Bin Liu @ 2019-01-21 15:18 UTC (permalink / raw)
To: Paul Cercueil; +Cc: linux-usb, devicetree, linux-kernel
On Thu, Jan 17, 2019 at 07:33:27PM -0300, Paul Cercueil wrote:
> This commit adds documentation for the device-tree bindings of the
> jz4740-musb driver, which provides support for the USB gadget mode
> of the JZ4740 and similar SoCs from Ingenic.
>
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> Reviewed-by: Rob Herring <robh@kernel.org>
The series is applied. Thanks.
Regards,
-Bin.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-01-21 15:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-17 22:33 [PATCH v3 1/4] Documentation: dt: Add binding info for jz4740-musb driver Paul Cercueil
2019-01-17 22:33 ` [PATCH v3 2/4] usb: musb: jz4740: Add support for devicetree Paul Cercueil
2019-01-17 22:33 ` [PATCH v3 3/4] usb: musb: Kconfig: Drop dependency on MACH_JZ4740 for jz4740 Paul Cercueil
2019-01-17 22:33 ` [PATCH v3 4/4] usb: musb: Kconfig: Drop dependency on CONFIG_USB " Paul Cercueil
2019-01-21 15:18 ` [PATCH v3 1/4] Documentation: dt: Add binding info for jz4740-musb driver Bin Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).