From patchwork Thu Dec 13 14:45:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10728799 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A362C91E for ; Thu, 13 Dec 2018 14:51:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 938202C45C for ; Thu, 13 Dec 2018 14:51:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E8192C45A; Thu, 13 Dec 2018 14:51:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 323D52C3E1 for ; Thu, 13 Dec 2018 14:51:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729004AbeLMOvl (ORCPT ); Thu, 13 Dec 2018 09:51:41 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:49440 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727551AbeLMOvl (ORCPT ); Thu, 13 Dec 2018 09:51:41 -0500 X-Greylist: delayed 337 seconds by postgrey-1.27 at vger.kernel.org; Thu, 13 Dec 2018 09:51:40 EST From: Paul Cercueil To: Greg Kroah-Hartman , Rob Herring , Mark Rutland , Bin Liu Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, od@zcrc.me, Paul Cercueil Subject: [PATCH 1/4] Documentation: dt: Add binding info for jz4740-musb driver Date: Thu, 13 Dec 2018 15:45:52 +0100 Message-Id: <20181213144555.24031-1-paul@crapouillou.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1544712362; bh=4y2hxwsZG4mriJ47HHwLXXiR4ye2MNK5snwtkVum/UQ=; h=From:To:Cc:Subject:Date:Message-Id; b=nruD8W6n/Az0S/K+DFBi/ObT3qMWPgvHJRNpIXlY+LNwBSHxmNrs3y1CEfAKZy0VlxAQ5sDKcw1GnvgImRelayn374hRCzgTSbTj5YtEyQShOfta1ZIoe3Sd0gwRzbETG3xRtzGQehlQFIt4GWoyQG6qm8aDb1ejp7M3szT+vTw= Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Rob Herring --- .../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"; +}; From patchwork Thu Dec 13 14:45:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10728801 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E8F7B13AF for ; Thu, 13 Dec 2018 14:51:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA9172C452 for ; Thu, 13 Dec 2018 14:51:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D88442C471; Thu, 13 Dec 2018 14:51:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E0B02C452 for ; Thu, 13 Dec 2018 14:51:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729005AbeLMOvl (ORCPT ); Thu, 13 Dec 2018 09:51:41 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:49442 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728998AbeLMOvl (ORCPT ); Thu, 13 Dec 2018 09:51:41 -0500 From: Paul Cercueil To: Greg Kroah-Hartman , Rob Herring , Mark Rutland , Bin Liu Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, od@zcrc.me, Paul Cercueil Subject: [PATCH 2/4] usb: musb: jz4740: Add support for devicetree Date: Thu, 13 Dec 2018 15:45:53 +0100 Message-Id: <20181213144555.24031-2-paul@crapouillou.net> In-Reply-To: <20181213144555.24031-1-paul@crapouillou.net> References: <20181213144555.24031-1-paul@crapouillou.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1544712363; bh=qdVdUvaR2WUq/vrKQ9BM0PkyF6HXTrTJD84/ZZzJuEE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=g6vySxA1fuWw2xURqQamCxOrbw33KQjABpIuxyC3I82F1Loc/yDg++m/EcDG/XZMcA82IjDapnuMaXYMi4wE09ppaG+yY7JBeQBUbQ+53oH3KqSQqDk68UfAbFLzHXOn4cPKeXcsxsZ3F1QVTYh08Tp9v7QmzxKeaFMpi2sz+PI= Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for probing the driver from devicetree. Signed-off-by: Paul Cercueil --- 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 #include #include +#include #include #include @@ -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), }, }; From patchwork Thu Dec 13 14:45:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10728805 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AD8CF16B1 for ; Thu, 13 Dec 2018 14:51:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BCA82C452 for ; Thu, 13 Dec 2018 14:51:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99F482C455; Thu, 13 Dec 2018 14:51:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5127F2C3A1 for ; Thu, 13 Dec 2018 14:51:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729021AbeLMOvm (ORCPT ); Thu, 13 Dec 2018 09:51:42 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:49438 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728827AbeLMOvl (ORCPT ); Thu, 13 Dec 2018 09:51:41 -0500 From: Paul Cercueil To: Greg Kroah-Hartman , Rob Herring , Mark Rutland , Bin Liu Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, od@zcrc.me, Paul Cercueil Subject: [PATCH 3/4] usb: musb: jz4740: Drop dependency on MACH_JZ4740, use COMPILE_TEST Date: Thu, 13 Dec 2018 15:45:54 +0100 Message-Id: <20181213144555.24031-3-paul@crapouillou.net> In-Reply-To: <20181213144555.24031-1-paul@crapouillou.net> References: <20181213144555.24031-1-paul@crapouillou.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1544712364; bh=RHqwqtBgjj4iJ4aY/QjBbJQaINc07TI/M6HFVQwBqvM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=Yq97HlTi3LXf6Sa1UAEW16vN/ykeyKyN54RCAlUsLmMZjXC6jurnuYxitW2a6x24NViRXl9pqw3iUViqVxMz4zh1y9Lq8m6vKzdWW7ltO30dbVQfE2xYriyKX0wLElTnqpMeYRx3yAMkvD9XlH1QbRdmjsFOzwK5FskgQERZNtU= Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 From patchwork Thu Dec 13 14:45:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10728803 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C2DD13AF for ; Thu, 13 Dec 2018 14:51:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E03E2C3A1 for ; Thu, 13 Dec 2018 14:51:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C2972C45D; Thu, 13 Dec 2018 14:51:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E246C2C3E1 for ; Thu, 13 Dec 2018 14:51:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729042AbeLMOvm (ORCPT ); Thu, 13 Dec 2018 09:51:42 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:49436 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728759AbeLMOvl (ORCPT ); Thu, 13 Dec 2018 09:51:41 -0500 From: Paul Cercueil To: Greg Kroah-Hartman , Rob Herring , Mark Rutland , Bin Liu Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, od@zcrc.me, Paul Cercueil Subject: [PATCH 4/4] usb: musb: jz4740: Drop dependency on USB_OTG_BLACKLIST_HUB Date: Thu, 13 Dec 2018 15:45:55 +0100 Message-Id: <20181213144555.24031-4-paul@crapouillou.net> In-Reply-To: <20181213144555.24031-1-paul@crapouillou.net> References: <20181213144555.24031-1-paul@crapouillou.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1544712365; bh=3MUSccqUYtN4WbicUtUCow8kSgweaRYm7d6F87rpPus=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=dYFzyJzWH8B9G5OHCSRRpGALK7XkHtkrSkYHAGUbT2GmK7dYCX9/bnyMoQKAY7oC5eDPoORYn7DP4NardTDuHfAMdv41qviHz0PuL10Yo7OYFhO7wJMQe2gMR7OoJg5TU2tfszMr7r6ljUME6RSW58NNXd2B3Yttyx/3vcE5UxE= Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The USB IP in the JZ4740 SoC does not support host mode, only gadget mode. Signed-off-by: Paul Cercueil --- 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