From patchwork Tue Feb 20 14:05:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13564065 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 120B5C48BC3 for ; Tue, 20 Feb 2024 14:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XWEABiEIyea6JlvINZ46xWFjtQu2fvqtoQKjTECUhUU=; b=tl1n37fsAQdTR+ auStTVLOKx2auNDf3ZNZx+Sb7mHRhGkPhDofrZv3+0S37yJZsxNRu9IWQlLFTzfl6gNcKv8H4KjSd v5Ho/pWKptMjIwgzVbNqfAwpGGuHugNp+6dCkWpIyQAVkjAurIaKD+89oroScyUSmb5DZJ/8Fv9Va se7uWfEikZBGU0tUYGlaYbfLOu5PHFMROCqhIaD9iwqhmN8mUgX4Qnz+7EEAREBYwmIuY4giYSkks gfz57vZAjSj/8cHIGKA5xgQgkcmxmI6BTUV8UOpt2+8ISzXc3YW5frgmw95/iBwUiQ5CPHmF1C8Kj /D0i/Ca8Q2CDXKu7kuvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcQl8-0000000F1Wh-0HSD; Tue, 20 Feb 2024 14:06:10 +0000 Received: from mail-am6eur05on20700.outbound.protection.outlook.com ([2a01:111:f403:2612::700] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcQl2-0000000F1So-3hOo for linux-arm-kernel@lists.infradead.org; Tue, 20 Feb 2024 14:06:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V5dvelJm+onA4YC9jioq4vcHhtXKM/iCTzWOOrt4wZOolMHg9mRPuDSB4iua5Ymc/tSKI+SYvlTYA3Yc5IBqsgqegWM8pryCT3v/TduYtRpgI6lnqXGYeCB6uY4pG/NxUnynHLEh2XMejHYOlH0POOhjuThEJOP9BaYaQ3HNrCFiJdh9VoYbeMFgxnyz1ZKKrdO20WpQEr71/GxjzOB6cQJ+7PORjIM1b0dsiBDJXRuWT48CunyeBpMsj7rGa5jdmwDKBkrcPc5SVYZfTW/Odoqpkt5oj6cvHqb+XcEjeufWBOj9LipMYiA5NZF63kiOWzz2A+CVCSq5wfwAjBw3xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EYJSVyaPlm3RaF4FtzmWKDx+gw6kedbjArMLrsS47us=; b=XVQXwe44Zs2z+p7X/2stzo1APQJdSeHw0ISjpo9t93OoJmeHmRZJZ11pnN7JbEJRlLjqyHaLO/GdIq6u9OMt2lmBqblfEeYE4pXLf3S+LHit1lzt3kYWpXymz14R5fOw+hBNYy7g/Im6ZAwb3XF536k6YO2pzWU+LJmfvPIohFmIkPiGey3vn4a9QAI29leWO6pttFS0ZzjqRLwlfngj31P2JqhCH5siW7sG87W4/3hLdnhEouX0Sz+r3hnSfkiNjOQ0OdB+vIZvJ40kZKlB9T/ib3jFpEipCJHYCnYwzF8IiQ/JlSe1e1qdGvpJZ4OgM3naD89QV2seKS2dSnSlgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EYJSVyaPlm3RaF4FtzmWKDx+gw6kedbjArMLrsS47us=; b=NegOLWrJq9sxpjM4SIJ1GR3rFJeKob842ffsbS5CrIsypIBtEf2quKU/a2AQPoeOq+lZaQpqevjhkOws35UndobVIQ2oOisMNoeD3L/FMHfO7FpXyNBbH1L5MZdx/PVF+3+r1wcRLfstOu6gvqBn32yt1+ef993/54x6w11MoYc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by PR3PR08MB5577.eurprd08.prod.outlook.com (2603:10a6:102:81::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39; Tue, 20 Feb 2024 14:05:51 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9527:ec9f:ec4b:ec99]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9527:ec9f:ec4b:ec99%6]) with mapi id 15.20.7292.033; Tue, 20 Feb 2024 14:05:51 +0000 From: Javier Carrasco Subject: [PATCH v4 0/8] usb: misc: onboard_hub: add support for XMOS XVF3500 Date: Tue, 20 Feb 2024 15:05:44 +0100 Message-Id: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> X-B4-Tracking: v=1; b=H4sIALix1GUC/3XOSwrCMBCA4auUrI3MNA+jK+8hIk2b2IAkkpRYK b27aV24KC7/gflmJpJMdCaRUzWRaLJLLvgSfFeRtm/83VDXlSY11ByQAQ1ehyZ2tzFbJgCobME cVIfYoCZl6xmNdeMqXq6le5eGEN/rgYzL9L+VkQIVqAU7Kg6y1edXeNjvU3tvBrKAmf2QGuQWY QWxSmjgiFIqtUHmef4AGYD/1fgAAAA= To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco , Matthias Kaehlcke X-Mailer: b4 0.14-dev-8b532 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708437949; l=5500; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=SHAnYTUFqtrCCn8stJuXEo4JZhrqJsAVYLtm+BK7Iq4=; b=lO2JOkdHW8GGrVf8D9Ux1reOo4O8GZFsrpoqdGXyYdfTPB0YBYJGulQ+1suUekXs6tv+AceEz Wz9vzDQqppPC8EdSj5MsryX7tGUrWBCKKljsXuC2ORfyiiOqFAxfruX X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: VI1PR0102CA0010.eurprd01.prod.exchangelabs.com (2603:10a6:802::23) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|PR3PR08MB5577:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c85b2b0-7a9a-4bd1-dc0a-08dc321d0b74 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XeSoSiAyzy29OoAKYNBxN+Ec2PNhZhDGzSs3PuruHt2/c+/j+UrPgKT/+2lZrYSnwihjSPEnx3LzXspl7eB/iep5qJb+0QGudca7F+qBJY2HV1qpqctDDM2KGLhKyFrcVj0REKA0i4Qm2gM2kKtWK00qbwE2Gc6BhxXVih1wg7DsVs6485aiKlS9RNfE06JI3VgjLDjDSM5iPGXdqwqii8Tp+fMGFWKJ7O6faMhgH/eUGg6i/2gZNzh33uBDpp355BJKRBwVtue6khDEcx32g9Segds/nyBVhEQmUCSH2mExf7188nwOA2u5owGxEjnK42k1tnZUKwFlVeCSK1oxmMvKvc2dsYwd0F8ia0UPeOJsl2uPhpuzwVDgbcNyZlTlG2UHRyXRrjhkGwmIyy1Tc0NYo8oJuh8TeEsorKOG3RWF+CzBdMRId7OiNVYReCzJ+9o/WK5lFl0MeiQb/rw1fTpiCgQp3Y3AuHc/aJr5YSOKfVG4T0oCeJBc2UYfQz4cK0p3u4ppL/i0b2u/eQ+Gtz5dB8gIljszCC5+07FTOXJQ9w3yVCuJcWahYtgAMhHyagb8z83yPLVSQPpLKrjI7uirbgzEPe9Hd6EH7+UJ55J1AgQVN14aASbj3EhPIz9E X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?NoVwvZTD6FS183GpRDZiyQlILSfI?= =?utf-8?q?Tuvw9nV4bsNgL8xZ5KnDkCG86iNd1TaurZtyUb010LtDpm3i+dw1QfJoPolv2OpFt?= =?utf-8?q?k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2qOyblv0GW9ZBSTNsxEnOhpx+/nBp4/0R3VFriBYbjHmgsX?= =?utf-8?q?foWmSUChr0LJ/DwaJ1aNBNwrnwvk2uhCH7fleKDaMMH5H+AY6VrV67MUTUk+0ZTmI?= =?utf-8?q?niQfZes2uExflNar9nLnZYI5rFfvYmgB1lnXVguOawg60Ttizds5DQBrsHrYD+cJi?= =?utf-8?q?Jy/JvngQlmW7ML8413I/9YGMdMNc/hQ53XSR8R9rIglStWc5yXcx5ysD8rEeo980Z?= =?utf-8?q?YAMJfiTUR7dABZ+X4RA8pwiCYho62h4Bs1GyIoeo12tE+A7eESDKiQTIRrZx49NwD?= =?utf-8?q?4BBCHJZfyCVX53I3krcn0fDVz/CquhLAAVqJ0LEmEBMQUiv3HFTEVjUSmNbYMjPrx?= =?utf-8?q?LDS8OwLehIfFdIxBl5rRVqaQqMcrAxnxj8X6MGabgNliNNHUHuOeuwRLuO9Z1D5/1?= =?utf-8?q?dk4DpKnnbW/bPIdkRNTQwINrZhy5wZGs7h+bjW6D1moXtOszqgfj+PfmbQo5LDT47?= =?utf-8?q?OGeHugrKdHgv3y76o5X8PtCjWBiO+ufdo1nhUt5VFoTRxkWApHoEsvwYF3FsQZQMQ?= =?utf-8?q?K65RDxvbOoX9Xs0gTDBV81ZDX3o+BfknAg=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 6c85b2b0-7a9a-4bd1-dc0a-08dc321d0b74 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2024 14:05:50.8779 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: a2/8WlNgNJSyRoP3nP0nlYyQPIWZqteXlf+oVpI2jVFMkvCxi6qIHNWR3CjMmpOjKhKtNnqAuZ4yT52uT8GVbRMnhiIUbi7ItIOC5/0Ptww= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5577 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240220_060604_993275_3B74C4B3 X-CRM114-Status: GOOD ( 21.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series adds support for the XMOS XVF3500 VocalFusion Voice Processor[1], a low-latency, 32-bit multicore controller for voice processing. The XVF3500 requires a specific power sequence, which consists of enabling the regulators that control the 3V3 and 1V0 device supplies, and a reset de-assertion after a delay of at least 100ns. Once in normal operation, the XVF3500 registers itself as a regular USB device and no device-specific management is required. The power management provided by onboard_usb_hub is not specific for hubs and any other USB device with the same power sequence could profit from that driver, provided that the device does not have any specific requirements beyond the power management. To account for non-hub devices, the driver has been renamed and an extra flag has been added to identify hubs and provide their specific functionality. Support for device-specific power suply names has been added, keeping generic names for backwards compatibility and as a fallback mechanism. The references to onboard_usb_hub in the core and config files have been updated as well. The diff is way much bulkier than the actual code addition because of the file renaming, so in order to ease reviews and catch hub-specific code that might still affect non-hub devices, the complete renaming was moved to a single commit. The device binding has been added to sound/ because it is the subsystem that covers its functionality (voice processing) during normal operation. If it should reside under usb/ instead, it will be moved as required. This series has been tested with a Rockchip-based SoC and an XMOS XVF3500-FB167-C. [1] https://www.xmos.com/xvf3500/ To: Liam Girdwood To: Mark Brown To: Rob Herring To: Krzysztof Kozlowski To: Conor Dooley To: Matthias Kaehlcke To: Greg Kroah-Hartman To: Helen Koike To: Maarten Lankhorst To: Maxime Ripard To: Thomas Zimmermann To: David Airlie To: Daniel Vetter To: Catalin Marinas To: Will Deacon To: Russell King Cc: linux-sound@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Javier Carrasco Changes in v4: - General: use device supply names and generics as fallback. - onbord_usb_dev.c: fix suspend callback for non-hub devices. - onboard_usb_dev.c: fix typos. - Link to v3: https://lore.kernel.org/r/20240206-onboard_xvf3500-v3-0-f85b04116688@wolfvision.net Changes in v3: - onboard_usb_hub: rename to onboard_usb_dev to include non-hub devices. - onboard_hub_dev: add flag to identify hubs and provide their extra functionality. - dt-bindings: add reference to usb-device.yaml and usb node in the example. - dt-bindings: generic node name. - Link to v2: https://lore.kernel.org/r/20240130-onboard_xvf3500-v1-0-51b5398406cb@wolfvision.net Changes in v2: - general: add support in onboard_usb_hub instead of using a dedicated driver. - dt-bindings: use generic usb-device compatible ("usbVID,PID"). - Link to v1: https://lore.kernel.org/all/20240115-feature-xvf3500_driver-v1-0-ed9cfb48bb85@wolfvision.net/ --- Javier Carrasco (8): usb: misc: onboard_hub: rename to onboard_dev usb: misc: onboard_dev: add support for non-hub devices drm: ci: arm64.config: update ONBOARD_USB_HUB to ONBOARD_USB_DEV arm64: defconfig: update ONBOARD_USB_HUB to ONBOARD_USB_DEV ARM: multi_v7_defconfig: update ONBOARD_USB_HUB name usb: misc: onboard_dev: use device supply names ASoC: dt-bindings: xmos,xvf3500: add XMOS XVF3500 voice processor usb: misc: onboard_hub: add support for XMOS XVF3500 ...-usb-hub => sysfs-bus-platform-onboard-usb-dev} | 4 +- .../devicetree/bindings/sound/xmos,xvf3500.yaml | 63 +++ MAINTAINERS | 4 +- arch/arm/configs/multi_v7_defconfig | 2 +- arch/arm64/configs/defconfig | 2 +- drivers/gpu/drm/ci/arm64.config | 4 +- drivers/usb/core/Makefile | 4 +- drivers/usb/core/hub.c | 8 +- drivers/usb/core/hub.h | 2 +- drivers/usb/misc/Kconfig | 16 +- drivers/usb/misc/Makefile | 2 +- drivers/usb/misc/onboard_usb_dev.c | 525 +++++++++++++++++++++ .../misc/{onboard_usb_hub.h => onboard_usb_dev.h} | 69 ++- ...ard_usb_hub_pdevs.c => onboard_usb_dev_pdevs.c} | 47 +- drivers/usb/misc/onboard_usb_hub.c | 501 -------------------- include/linux/usb/onboard_dev.h | 18 + include/linux/usb/onboard_hub.h | 18 - 17 files changed, 709 insertions(+), 580 deletions(-) --- base-commit: 41bccc98fb7931d63d03f326a746ac4d429c1dd3 change-id: 20240130-onboard_xvf3500-6c0e78d11a1b Best regards,