From patchwork Thu Jan 10 13:36:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10755737 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 04A086C5 for ; Thu, 10 Jan 2019 13:37:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E781729679 for ; Thu, 10 Jan 2019 13:37:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB39C29714; Thu, 10 Jan 2019 13:37:38 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 7E03429679 for ; Thu, 10 Jan 2019 13:37:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728913AbfAJNhO (ORCPT ); Thu, 10 Jan 2019 08:37:14 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:51464 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728733AbfAJNhN (ORCPT ); Thu, 10 Jan 2019 08:37:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1547127430; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=M5FERye9NHe7j0zYIe353rKH1QXqrc8+0iuUUl5qByY=; b=mNoL9o9uEe4OeztWj+ikwuauvk8ScvuFfF8XLh3McKuL0Xb9m4jvU/d5HFpFnXaa1VHrzd ehgEzFvz3c8v9KGhlMjZg9Pq+Ocvkw702vwcD3/mweiMGIMy8g4rP/0O2czDYivYCgv/2I IJs//34iGp/+3Xs4tQzw9POqH6FJxP0= From: Paul Cercueil To: Bin Liu Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH v2 1/4] Documentation: dt: Add binding info for jz4740-musb driver Date: Thu, 10 Jan 2019 10:36:57 -0300 Message-Id: <20190110133700.4471-1-paul@crapouillou.net> 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 --- v2: 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"; +}; From patchwork Thu Jan 10 13:36:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10755731 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 7DBCC6C5 for ; Thu, 10 Jan 2019 13:37:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 699B029679 for ; Thu, 10 Jan 2019 13:37:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B06929714; Thu, 10 Jan 2019 13:37:23 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 A6F1B29679 for ; Thu, 10 Jan 2019 13:37:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728976AbfAJNhQ (ORCPT ); Thu, 10 Jan 2019 08:37:16 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:51496 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728733AbfAJNhP (ORCPT ); Thu, 10 Jan 2019 08:37:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1547127433; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=y6x70HDfpOVTaqs0BzNGMeOkw6Plbds0nsWUN9mORg4=; b=scZ9CSd4sDdiB8vDl+Xw9oCDfWW0nUMZKMDNsJE1sdNVHBtAleF+jp71usGQGVFPlF2uEe DR8LA0vYE6IGNSawEbLoxQZuh18m+0EVeWuHu/xeVh7fR+UJGDq7zHYS0K2bSV7Ukgv7RA fwonRTbZXEOFjpZ8S4N1AYUuqyggjR8= From: Paul Cercueil To: Bin Liu Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH v2 2/4] usb: musb: jz4740: Add support for devicetree Date: Thu, 10 Jan 2019 10:36:58 -0300 Message-Id: <20190110133700.4471-2-paul@crapouillou.net> In-Reply-To: <20190110133700.4471-1-paul@crapouillou.net> References: <20190110133700.4471-1-paul@crapouillou.net> 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 --- v2: Add MODULE_DEVICE_TABLE and wrap inside CONFIG_OF 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 #include #include +#include #include #include @@ -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), }, }; From patchwork Thu Jan 10 13:36:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10755735 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 3BFCF6C2 for ; Thu, 10 Jan 2019 13:37:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B44129679 for ; Thu, 10 Jan 2019 13:37:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F44A29714; Thu, 10 Jan 2019 13:37:35 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 CCEC829679 for ; Thu, 10 Jan 2019 13:37:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728997AbfAJNhV (ORCPT ); Thu, 10 Jan 2019 08:37:21 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:51550 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728985AbfAJNhS (ORCPT ); Thu, 10 Jan 2019 08:37:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1547127436; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=l0qAOBPaffwONMK7+ifbUrTiQtYss2IiXh7MoLJ/8+M=; b=AQDd3s2Yf6BrY4A3u79wxVsBZ1txbp81f6UzFlnqJ2S9J53KH6/JKPp/Kw8xKH/r+DpKu0 G0YiEKcJv+fzEWQxtT19NwzB12iEi+bGlkNMG1DJVtY+flEOCRQh+0IK2pXjO5BiPYG9G5 ROYIxmAy2WzHOkcCzwDu61TdpBcHg3Y= From: Paul Cercueil To: Bin Liu Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH v2 3/4] usb: musb: Kconfig: Drop dependency on MACH_JZ4740 for jz4740 Date: Thu, 10 Jan 2019 10:36:59 -0300 Message-Id: <20190110133700.4471-3-paul@crapouillou.net> In-Reply-To: <20190110133700.4471-1-paul@crapouillou.net> References: <20190110133700.4471-1-paul@crapouillou.net> 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. Signed-off-by: Paul Cercueil --- v2: Remove info about adding COMPILE_TEST in commit message, as it was there before 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 Jan 10 13:37:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10755733 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 D50816C2 for ; Thu, 10 Jan 2019 13:37:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C54382969F for ; Thu, 10 Jan 2019 13:37:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B8BE729679; Thu, 10 Jan 2019 13:37:30 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 6944429679 for ; Thu, 10 Jan 2019 13:37:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729014AbfAJNhZ (ORCPT ); Thu, 10 Jan 2019 08:37:25 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:51578 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728733AbfAJNhV (ORCPT ); Thu, 10 Jan 2019 08:37:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1547127438; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=twckhWTGipZMTVScxSG6peggV/g7UY/bFgfeAzuiA2k=; b=R2IeLg9hfc96AeXDO5+WW9h+XwU4UZ2QDMsCzyHc0S4RVKn/sJWAy6xNdwLypzdzjQbm6L Nkfj44ruSvONj9COFHobWcVIxUe/Z/ynTyu/wEbEdcbaLvV5ZN/a9vf1INF9QaWQD2rV8f GX24JecMikaFpfqy0OjhYquH9xjUrfs= From: Paul Cercueil To: Bin Liu Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH v2 4/4] usb: musb: Kconfig: Drop dependency on CONFIG_USB for jz4740 Date: Thu, 10 Jan 2019 10:37:00 -0300 Message-Id: <20190110133700.4471-4-paul@crapouillou.net> In-Reply-To: <20190110133700.4471-1-paul@crapouillou.net> References: <20190110133700.4471-1-paul@crapouillou.net> 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 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 --- v2: Instead of removing the dependency on USB_OTG_BLACKLIST_HUB, we now depend on (USB=n || USB_OTG_BLACKLIST_HUB) 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