Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/808522/?format=api
{ "id": 808522, "url": "http://patchwork.ozlabs.org/api/1.2/patches/808522/?format=api", "web_url": "http://patchwork.ozlabs.org/project/lede/patch/1504239396-26149-1-git-send-email-adron@yapic.net/", "project": { "id": 54, "url": "http://patchwork.ozlabs.org/api/1.2/projects/54/?format=api", "name": "LEDE development", "link_name": "lede", "list_id": "lede-dev.lists.infradead.org", "list_email": "lede-dev@lists.infradead.org", "web_url": "http://lede-project.org/", "scm_url": "", "webscm_url": "http://git.lede-project.org/", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1504239396-26149-1-git-send-email-adron@yapic.net>", "list_archive_url": null, "date": "2017-09-01T04:16:36", "name": "[LEDE-DEV] ar71xx: Chipidea USB device support for QCA953x", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "569bb321d3d0cf8c1c0641f2bb1d086751d62042", "submitter": { "id": 68802, "url": "http://patchwork.ozlabs.org/api/1.2/people/68802/?format=api", "name": null, "email": "adron@yapic.net" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/lede/patch/1504239396-26149-1-git-send-email-adron@yapic.net/mbox/", "series": [ { "id": 946, "url": "http://patchwork.ozlabs.org/api/1.2/series/946/?format=api", "web_url": "http://patchwork.ozlabs.org/project/lede/list/?series=946", "date": "2017-09-01T04:16:36", "name": "[LEDE-DEV] ar71xx: Chipidea USB device support for QCA953x", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/946/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808522/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808522/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"nLVLg+Hk\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"McJIYvhJ\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=yapic.net header.i=@yapic.net\n\theader.b=\"PZH7PRIE\"; dkim-atps=neutral" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xk5ZW6k0vz9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 1 Sep 2017 14:18:10 +1000 (AEST)", "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dndOu-00049c-FM; Fri, 01 Sep 2017 04:17:48 +0000", "from casper.infradead.org ([2001:8b0:10b:1236::1])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dndOr-00049U-V5\n\tfor lede-dev@bombadil.infradead.org; Fri, 01 Sep 2017 04:17:46 +0000", "from mailserv.yapic.net ([194.150.175.70])\n\tby casper.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dndOo-0004hn-DA\n\tfor lede-dev@lists.infradead.org; Fri, 01 Sep 2017 04:17:44 +0000", "from adron-nout.yapic.net (unknown [195.189.99.194])\n\tby mailserv.yapic.net (Postfix) with ESMTPSA id C784533B83B5;\n\tFri, 1 Sep 2017 07:16:38 +0300 (MSK)", "from root by adron-nout.yapic.net with local (Exim 4.86_2)\n\t(envelope-from <adron@yapic.net>)\n\tid 1dndNm-0006pI-GK; Fri, 01 Sep 2017 07:16:38 +0300" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id:\n\tDate:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:\n\tList-Owner; bh=k3rbdq8jgqmwqs4vNhmv3qsXe4ktQFL4uahjL2MJXTE=;\n\tb=nLVLg+Hkp54K/4\n\tC5NkEPmZqikg0nHSnMJZDJPGHR8YXwlRyVjGR3c6+gshCrlh3FaRTygUdDliTOJ1gpRMqXEFEOxJ7\n\trXKhLa44Mo/Nri5xvINcYnKmXfPRjRAU4iUHRG1qNM7mY5XjDWGdpl4LYgo7xG+rGDvNMlcpkEUD0\n\t3oURD/C3PywThqE4bTZ+UtNIVGAPa1p0kU2xsve2gqF8q0CUMQr1Y7FnK6S72TCGfZ0aJnn/OQsxq\n\tftl8zcc6RK8o+ex8i2sAW/hyoznFyxkR2ApV9ehe4tNCvrYqlVI7rIEaLj3pOz8ccW8H7QZZ/n9XU\n\tGeJGU77s/ZOD8afYu3Jw==;", "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=casper.20170209;\n\th=Message-Id:Date:Subject:Cc:To:From:\n\tSender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:\n\tContent-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:\n\tResent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=32nnyngRz3Z5aOYpyiDyt7zO5oK8Za5QL28FBAuznsk=;\n\tb=McJIYvhJ6PG9eYS6S8fVFZrmg\n\t8ROTtE9jJ5SXSa5c7HKeLWhX3i3v20gj2i2EarKn99Udy0WT8UNI2fuPL/2VgOZBwhhV7hr8jgavi\n\t3bjoOndEegDV6namVihHmFXEOOWF0eomgXST9IEPIVk7+x4nxCZYYX7kCOhK++YsYOnBJdghD6QYi\n\t97kinmEl4x0KgG0eSM9GrXcyBtd6JfEG6xDilQOXkCOcBbx/zx4XOJDru1WDL14q4rrHGDWAleQgv\n\tV+jv+Py9p0S2cbswVvy3H33k52goQVCMdcXIJQ6kHZvn4CYJfzfjp3C24bvz+AtvByZp0HNrZLw25\n\tU0/0nYDjw==;", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=yapic.net;\n\ts=mailserv; t=1504239398;\n\tbh=32nnyngRz3Z5aOYpyiDyt7zO5oK8Za5QL28FBAuznsk=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=PZH7PRIEvP2rVrCJF55xXOxhyY5OG4QbfSf3w0L997ruGfcCeiBalmOQ9pxI7WGow\n\toGe49EPTKcmGHZuwZU4lEqdmWbWDUa0MPsMgcCwHvhsR8gYo8sx+R2JE7+281UxeOU\n\tVocGpI/X8/AeSqKspT0+o61aiC3RG05/Da9NWTGk=" ], "X-DKIM": "OpenDKIM Filter v2.6.8 mailserv.yapic.net C784533B83B5", "From": "adron@yapic.net", "To": "lede-dev@lists.infradead.org", "Date": "Fri, 1 Sep 2017 07:16:36 +0300", "Message-Id": "<1504239396-26149-1-git-send-email-adron@yapic.net>", "X-Mailer": "git-send-email 2.7.4", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20170901_051742_634603_980897BC ", "X-CRM114-Status": "GOOD ( 12.53 )", "X-Spam-Score": "-2.0 (--)", "X-Spam-Report": "SpamAssassin version 3.4.1 on casper.infradead.org summary:\n\tContent analysis details: (-2.0 points, 5.0 required)\n\tpts rule name description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain\n\t0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature", "Subject": "[LEDE-DEV] [PATCH] ar71xx: Chipidea USB device support for QCA953x", "X-BeenThere": "lede-dev@lists.infradead.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<lede-dev.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/lede-dev/>", "List-Post": "<mailto:lede-dev@lists.infradead.org>", "List-Help": "<mailto:lede-dev-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=subscribe>", "Cc": "Sergey Sergeev <adron@yapic.net>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"Lede-dev\" <lede-dev-bounces@lists.infradead.org>", "Errors-To": "lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "From: Sergey Sergeev <adron@yapic.net>\n\nChanges the platform to use the Chipidea driver instead of the\ngeneric USB host driver which has support for both host and\ndevice modes (selected on boot) for QCA953x based boards.\n\nIt was tested on GL.iNet GL-AR300M with USB DEVICE mode config.\n\nMore details is available here:\nhttps://github.com/adron-s/QCA953x-usb-device-mode\n\nSigned-off-by: Sergey Sergeev <adron@yapic.net>\n---\n ...940-usb-chipidea-QCA953x-platform-support.patch | 87 ++++++++++++++++++++++\n 1 file changed, 87 insertions(+)\n create mode 100644 target/linux/ar71xx/patches-4.4/940-usb-chipidea-QCA953x-platform-support.patch", "diff": "diff --git a/target/linux/ar71xx/patches-4.4/940-usb-chipidea-QCA953x-platform-support.patch b/target/linux/ar71xx/patches-4.4/940-usb-chipidea-QCA953x-platform-support.patch\nnew file mode 100644\nindex 0000000..a3e2509\n--- /dev/null\n+++ b/target/linux/ar71xx/patches-4.4/940-usb-chipidea-QCA953x-platform-support.patch\n@@ -0,0 +1,87 @@\n+--- a/arch/mips/ath79/dev-usb.c\n++++ b/arch/mips/ath79/dev-usb.c\n+@@ -286,6 +286,51 @@\n+ \t\t\t &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));\n+ }\n+ \n++#if IS_ENABLED(CONFIG_USB_CHIPIDEA)\n++static void __init qca953x_usb_setup_ctrl_config(void)\n++{\n++\tvoid __iomem *usb_ctrl_base, *usb_config_reg;\n++\tu32 usb_config;\n++\n++\tusb_ctrl_base = ioremap(AR71XX_USB_CTRL_BASE, AR71XX_USB_CTRL_SIZE);\n++\tusb_config_reg = usb_ctrl_base + AR71XX_USB_CTRL_REG_CONFIG;\n++\tusb_config = __raw_readl(usb_config_reg);\n++\tusb_config &= ~QCA953X_USB_CONFIG_HOST_ONLY;\n++\t__raw_writel(usb_config, usb_config_reg);\n++\tiounmap(usb_ctrl_base);\n++}\n++\n++static void __init qca953x_ci_usb_setup(u32 bootstrap)\n++{\n++\tenum usb_dr_mode dr_mode;\n++\tstruct ci_hdrc_platform_data ci_pdata;\n++\n++\tif (bootstrap & QCA953X_BOOTSTRAP_USB_MODE_DEVICE) {\n++\t\tdr_mode = USB_DR_MODE_PERIPHERAL;\n++\t\tqca953x_usb_setup_ctrl_config();\n++\t} else {\n++\t\tdr_mode = USB_DR_MODE_HOST;\n++\t}\n++\n++\tmemset(&ci_pdata, 0, sizeof(ci_pdata));\n++\tci_pdata.name = \"ci_hdrc_qca953x\";\n++\tci_pdata.capoffset = DEF_CAPOFFSET;\n++\tci_pdata.dr_mode = dr_mode;\n++\tci_pdata.flags = CI_HDRC_DUAL_ROLE_NOT_OTG | CI_HDRC_DP_ALWAYS_PULLUP;\n++\tci_pdata.vbus_extcon.edev = ERR_PTR(-ENODEV);\n++\tci_pdata.id_extcon.edev = ERR_PTR(-ENODEV);\n++\tci_pdata.itc_setting = 1;\n++\n++\tplatform_device_register_simple(\"usb_phy_generic\",\n++\t\t\t\t\tPLATFORM_DEVID_AUTO, NULL, 0);\n++\n++\tath79_usb_register(\"ci_hdrc\", -1,\n++\t\t\t QCA953X_EHCI_BASE, QCA953X_EHCI_SIZE,\n++\t\t\t ATH79_CPU_IRQ(3),\n++\t\t\t &ci_pdata, sizeof(ci_pdata));\n++}\n++#endif\n++\n+ static void __init qca953x_usb_setup(void)\n+ {\n+ \tu32 bootstrap;\n+@@ -304,10 +349,14 @@\n+ \tath79_device_reset_clear(QCA953X_RESET_USB_HOST);\n+ \tudelay(1000);\n+ \n++#if IS_ENABLED(CONFIG_USB_CHIPIDEA)\n++\tqca953x_ci_usb_setup(bootstrap);\n++#else\n+ \tath79_usb_register(\"ehci-platform\", -1,\n+ \t\t\t QCA953X_EHCI_BASE, QCA953X_EHCI_SIZE,\n+ \t\t\t ATH79_CPU_IRQ(3),\n+ \t\t\t &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));\n++#endif\n+ }\n+ \n+ static void qca955x_usb_reset_notifier(struct platform_device *pdev)\n+--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h\n++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h\n+@@ -660,6 +660,7 @@\n+ #define AR933X_BOOTSTRAP_MDIO_GPIO_EN\tBIT(18)\n+ #define AR933X_BOOTSTRAP_EEPBUSY\tBIT(4)\n+ #define AR933X_BOOTSTRAP_USB_MODE_HOST\tBIT(3)\n++#define QCA953X_BOOTSTRAP_USB_MODE_DEVICE BIT(7)\n+ #define AR933X_BOOTSTRAP_REF_CLK_40\tBIT(0)\n+ \n+ #define AR934X_BOOTSTRAP_SW_OPTION8\tBIT(23)\n+@@ -690,6 +691,7 @@\n+ #define QCA956X_BOOTSTRAP_REF_CLK_40\tBIT(2)\n+ \n+ #define AR933X_USB_CONFIG_HOST_ONLY BIT(8)\n++#define QCA953X_USB_CONFIG_HOST_ONLY\tBIT(4)\n+ \n+ #define AR934X_PCIE_WMAC_INT_WMAC_MISC\t\tBIT(0)\n+ #define AR934X_PCIE_WMAC_INT_WMAC_TX\t\tBIT(1)\n", "prefixes": [ "LEDE-DEV" ] }