* [PATCH 1/4] Documentation: dt: Add binding info for jz4740-musb driver
@ 2018-12-13 14:45 Paul Cercueil
2018-12-13 14:45 ` [PATCH 2/4] usb: musb: jz4740: Add support for devicetree Paul Cercueil
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Paul Cercueil @ 2018-12-13 14:45 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Bin Liu
Cc: linux-usb, devicetree, linux-kernel, od, 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>
---
.../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] 8+ messages in thread
* [PATCH 2/4] usb: musb: jz4740: Add support for devicetree
2018-12-13 14:45 [PATCH 1/4] Documentation: dt: Add binding info for jz4740-musb driver Paul Cercueil
@ 2018-12-13 14:45 ` Paul Cercueil
2019-01-07 19:47 ` Bin Liu
2018-12-13 14:45 ` [PATCH 3/4] usb: musb: jz4740: Drop dependency on MACH_JZ4740, use COMPILE_TEST Paul Cercueil
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Paul Cercueil @ 2018-12-13 14:45 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Bin Liu
Cc: linux-usb, devicetree, linux-kernel, od, Paul Cercueil
Add support for probing the driver from devicetree.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
drivers/usb/musb/jz4740.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c
index 04d8b2bc205a..9a2cebcac260 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,17 @@ static int jz4740_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id jz4740_musb_of_match[] = {
+ { .compatible = "ingenic,jz4740-musb" },
+ {},
+};
+
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] 8+ messages in thread
* [PATCH 3/4] usb: musb: jz4740: Drop dependency on MACH_JZ4740, use COMPILE_TEST
2018-12-13 14:45 [PATCH 1/4] Documentation: dt: Add binding info for jz4740-musb driver Paul Cercueil
2018-12-13 14:45 ` [PATCH 2/4] usb: musb: jz4740: Add support for devicetree Paul Cercueil
@ 2018-12-13 14:45 ` Paul Cercueil
2019-01-07 20:10 ` Bin Liu
2018-12-13 14:45 ` [PATCH 4/4] usb: musb: jz4740: Drop dependency on USB_OTG_BLACKLIST_HUB Paul Cercueil
2018-12-20 20:33 ` [PATCH 1/4] Documentation: dt: Add binding info for jz4740-musb driver Rob Herring
3 siblings, 1 reply; 8+ messages in thread
From: Paul Cercueil @ 2018-12-13 14:45 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Bin Liu
Cc: linux-usb, devicetree, linux-kernel, od, Paul Cercueil
Depending on MACH_INGENIC prevent us from creating a generic kernel that
works on more than one MIPS board. Instead, we just depend on MIPS being
set.
On other architectures, this driver can still be built, thanks to
COMPILE_TEST. This is used by automated tools to find bugs, for
instance.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
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] 8+ messages in thread
* [PATCH 4/4] usb: musb: jz4740: Drop dependency on USB_OTG_BLACKLIST_HUB
2018-12-13 14:45 [PATCH 1/4] Documentation: dt: Add binding info for jz4740-musb driver Paul Cercueil
2018-12-13 14:45 ` [PATCH 2/4] usb: musb: jz4740: Add support for devicetree Paul Cercueil
2018-12-13 14:45 ` [PATCH 3/4] usb: musb: jz4740: Drop dependency on MACH_JZ4740, use COMPILE_TEST Paul Cercueil
@ 2018-12-13 14:45 ` Paul Cercueil
2019-01-07 20:11 ` Bin Liu
2018-12-20 20:33 ` [PATCH 1/4] Documentation: dt: Add binding info for jz4740-musb driver Rob Herring
3 siblings, 1 reply; 8+ messages in thread
From: Paul Cercueil @ 2018-12-13 14:45 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Bin Liu
Cc: linux-usb, devicetree, linux-kernel, od, Paul Cercueil
The USB IP in the JZ4740 SoC does not support host mode, only gadget
mode.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
drivers/usb/musb/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 6f5b0ed6a507..a884179bc3c0 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -113,7 +113,6 @@ 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
config USB_MUSB_AM335X_CHILD
tristate
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] Documentation: dt: Add binding info for jz4740-musb driver
2018-12-13 14:45 [PATCH 1/4] Documentation: dt: Add binding info for jz4740-musb driver Paul Cercueil
` (2 preceding siblings ...)
2018-12-13 14:45 ` [PATCH 4/4] usb: musb: jz4740: Drop dependency on USB_OTG_BLACKLIST_HUB Paul Cercueil
@ 2018-12-20 20:33 ` Rob Herring
3 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2018-12-20 20:33 UTC (permalink / raw)
To: Paul Cercueil
Cc: Greg Kroah-Hartman, Mark Rutland, Bin Liu, linux-usb, devicetree,
linux-kernel, od, Paul Cercueil
On Thu, 13 Dec 2018 15:45:52 +0100, 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>
> ---
> .../bindings/usb/ingenic,jz4740-musb.txt | 24 ++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/usb/ingenic,jz4740-musb.txt
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/4] usb: musb: jz4740: Add support for devicetree
2018-12-13 14:45 ` [PATCH 2/4] usb: musb: jz4740: Add support for devicetree Paul Cercueil
@ 2019-01-07 19:47 ` Bin Liu
0 siblings, 0 replies; 8+ messages in thread
From: Bin Liu @ 2019-01-07 19:47 UTC (permalink / raw)
To: Paul Cercueil
Cc: Greg Kroah-Hartman, Rob Herring, Mark Rutland, linux-usb,
devicetree, linux-kernel, od
Hi,
On Thu, Dec 13, 2018 at 03:45:53PM +0100, Paul Cercueil wrote:
> Add support for probing the driver from devicetree.
>
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
> drivers/usb/musb/jz4740.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c
> index 04d8b2bc205a..9a2cebcac260 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,17 @@ static int jz4740_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static const struct of_device_id jz4740_musb_of_match[] = {
> + { .compatible = "ingenic,jz4740-musb" },
> + {},
> +};
should be wrapped by '#ifdef CONFIG_OF'?
miss MODULE_DEVICE_TABLE()
> +
> 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),
> },
> };
>
Regards,
-Bin.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/4] usb: musb: jz4740: Drop dependency on MACH_JZ4740, use COMPILE_TEST
2018-12-13 14:45 ` [PATCH 3/4] usb: musb: jz4740: Drop dependency on MACH_JZ4740, use COMPILE_TEST Paul Cercueil
@ 2019-01-07 20:10 ` Bin Liu
0 siblings, 0 replies; 8+ messages in thread
From: Bin Liu @ 2019-01-07 20:10 UTC (permalink / raw)
To: Paul Cercueil
Cc: Greg Kroah-Hartman, Rob Herring, Mark Rutland, linux-usb,
devicetree, linux-kernel, od
Hi,
Please use the following subject instead.
usb: musb: Kconfig: Drop dependency on MACH_JZ4740 and use COMPILE_TEST for jz4740
On Thu, Dec 13, 2018 at 03:45:54PM +0100, Paul Cercueil wrote:
> Depending on MACH_INGENIC prevent us from creating a generic kernel that
did you mean MACH_JZ4740 instead?
Regards,
-Bin.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] usb: musb: jz4740: Drop dependency on USB_OTG_BLACKLIST_HUB
2018-12-13 14:45 ` [PATCH 4/4] usb: musb: jz4740: Drop dependency on USB_OTG_BLACKLIST_HUB Paul Cercueil
@ 2019-01-07 20:11 ` Bin Liu
0 siblings, 0 replies; 8+ messages in thread
From: Bin Liu @ 2019-01-07 20:11 UTC (permalink / raw)
To: Paul Cercueil
Cc: Greg Kroah-Hartman, Rob Herring, Mark Rutland, linux-usb,
devicetree, linux-kernel, od
Hi,
Please use the following subject instead.
usb: musb: Kconfig: Drop dependency on USB_OTG_BLACKLIST_HUB for jz4740
Regards,
-Bin.
On Thu, Dec 13, 2018 at 03:45:55PM +0100, Paul Cercueil wrote:
> The USB IP in the JZ4740 SoC does not support host mode, only gadget
> mode.
>
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
> drivers/usb/musb/Kconfig | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
> index 6f5b0ed6a507..a884179bc3c0 100644
> --- a/drivers/usb/musb/Kconfig
> +++ b/drivers/usb/musb/Kconfig
> @@ -113,7 +113,6 @@ 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
>
> config USB_MUSB_AM335X_CHILD
> tristate
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-01-07 20:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13 14:45 [PATCH 1/4] Documentation: dt: Add binding info for jz4740-musb driver Paul Cercueil
2018-12-13 14:45 ` [PATCH 2/4] usb: musb: jz4740: Add support for devicetree Paul Cercueil
2019-01-07 19:47 ` Bin Liu
2018-12-13 14:45 ` [PATCH 3/4] usb: musb: jz4740: Drop dependency on MACH_JZ4740, use COMPILE_TEST Paul Cercueil
2019-01-07 20:10 ` Bin Liu
2018-12-13 14:45 ` [PATCH 4/4] usb: musb: jz4740: Drop dependency on USB_OTG_BLACKLIST_HUB Paul Cercueil
2019-01-07 20:11 ` Bin Liu
2018-12-20 20:33 ` [PATCH 1/4] Documentation: dt: Add binding info for jz4740-musb driver Rob Herring
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).