From patchwork Mon Mar 25 09:15:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13601730 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2111.outbound.protection.outlook.com [40.107.8.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED0BE16D32C; Mon, 25 Mar 2024 09:15:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.8.111 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358122; cv=fail; b=fusRhBMZXVyE7CJRMwkAo5dJ019yFD5WO21+2LG6ewxRB7fQ94wmjbhJR4PFN1GsjU0WxXD2q2rG9gTc7WvF64SP0ZJOUgm/QqSWbVCvXUQyKhYACOQlMpmBLUmsskBOt9yqbvw5OTRJBhEfW3Ue+s8glev+goozSJuPihB9YtQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358122; c=relaxed/simple; bh=iJW1loYbFNUDu87doTkXh8CuGto0mxNK9GLqvCLtJmk=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=QW6qLuEQS+C03dbWxxb62eWpJpqlWh0dnM09P8nMk5UeloK3/tbIGhTMvI2CnXtYkTX58QjS9fSyANG9JKsxMp97TsjzAUnWAMlGdgXPGlvhIPxsjPWMAKLx6qqPVI6kP0/NFozGGpKo5egw2+7JciPDCVZsLJ+9SMrPugBkevs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net; spf=pass smtp.mailfrom=wolfvision.net; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b=uCoO2pUC; arc=fail smtp.client-ip=40.107.8.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="uCoO2pUC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lzbwe3kJv2qAerZzw9SwIs7SCZF6KPppjmoSWi9KsTHcAs+Z9Fproy993M/k3612Pn7dzfBSjDWKmkJyKQE4WKm3ES2luZrOhyoqFeEZJcvT8HB17DWx98t9H22XQxg9TGIJZyUqommJSfynd7y+dWfohIPr9/WjNUL4PDKJkJ/AlL9oopz90s0YL994/me2uPpfdR8HmwI45i2gN+MPov9q95k/o59pUPMIEoxaxmSNlie9upEZRA81mGBdA7ScE0bktCKW2de9r4+r+ptygLC3qF9p2VscB56KRME0/Xde7vnrOTxnjSsx8MruLqJLGe9ICOv4eDT8OUvK6zkijw== 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=DvBYi8hO2l+d1pIbVcWJnnKCfvXq63E64DCxQAM1lZA=; b=A+K3A1yNU9HgXxLrzTU9FyE8Lm2yg+CX4aVqDxfJaBrzK9nJqu8p9Ud6HQ1xhquQPwkNGYbCCW+5HN5dSB7tBAbjGVUCvUhspK3bLP48ZTpWlxxIA+bL/G2BBNrcrngt8m21YVj5Ppz8Cmm7sPw5qmlfUTdrKmHk0Q3LHH5J++eBgy3LWzmeNbrEVMEdvEVPWCbrEd1D2rzbGp5aQKB3pydksbTeg3WTRqvnk9Zt6shUt/E3A/sHNKd4PWFJDrM5vf0CbMPmIDOZAayLdD32uIg1CkQC8uCVTzDaMmndMKuvm4f5sXtI+F7JniB7ZWctx37Ycad+CQbmOt6me20CdA== 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=DvBYi8hO2l+d1pIbVcWJnnKCfvXq63E64DCxQAM1lZA=; b=uCoO2pUCjMyouEHuhWTR40rX6g+mTnXwu73rNQZHR/L4aAdGf2HvdHDWlBjJtFx5oUTHpDPTk8Ji/yqn5j11yVMZeMTxmZz/E34dfiEU71z69RkdYBKuMrC/IG0AfKNNT2Eq2Ud2CzqlHAt9y5mNDO9C30sY7Ms4FTdunR8TO1M= 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 GV1PR08MB9916.eurprd08.prod.outlook.com (2603:10a6:150:a6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.31; Mon, 25 Mar 2024 09:15:16 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7409.028; Mon, 25 Mar 2024 09:15:16 +0000 From: Javier Carrasco Subject: [PATCH v8 0/8] usb: misc: onboard_hub: add support for XMOS XVF3500 Date: Mon, 25 Mar 2024 10:15:10 +0100 Message-Id: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> X-B4-Tracking: v=1; b=H4sIAJ5AAWYC/3XQTWrDMBAF4KsEresyI2kkuaveo4Si30ZQrCAHN yH47pXTRQx2l29gvnnMnY2x5jiyt8Od1TjlMZehBfNyYP5kh6/Y5dAy48AloICuDK7YGj6vUxI E0CkPUZuAaNGxtnWuMeXrQ/w4tnzK46XU2+PAhMv0f2vCDjpCR6I3EpR37z/lO/2Veh3ihS3gJ J4IB7VFREOSIQcSUSljdhG5QvhOE9mQ4FGh9p5CkLsIrRGzRaghWjkDlIJIUe0iao30W0Q1xIJ NifdSg4RdRD8RAbRF9IK0Do4gUi+2j53n+RctQtSQDAIAAA== 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 , Krzysztof Kozlowski X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1711358115; l=7048; i=javier.carrasco@wolfvision.net; s=20240320; h=from:subject:message-id; bh=iJW1loYbFNUDu87doTkXh8CuGto0mxNK9GLqvCLtJmk=; b=96P2LEv7CFFFuxh/0Q83mWBktDCEYvPUiiAqtggXYkOGL4rpXtD582zOJz0ywOkJDrqX3cKBU rXgPFkxRA4tCgH1S+mlmlHTjMoVDgqzHVdANSvvJqo2mbcoUMRC/nD0 X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=Vxk2/0sGIxM8rsKnceszFuSuHVfQwa1Yo8+is7BX2nY= X-ClientProxiedBy: VI1PR08CA0223.eurprd08.prod.outlook.com (2603:10a6:802:15::32) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|GV1PR08MB9916:EE_ X-MS-Office365-Filtering-Correlation-Id: e6fb4a75-d361-4aeb-c42a-08dc4cac15bd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4WeZoG/Qo9rSnxQMTIVhWH7CpM5jIBAHiQzdCPXfxKsWFEb+HZYME0F9uSgEjNMe/RVWsTu5i289KUv4RBe/JbogmUKKG3wGyTb6vgIVC8zcZTkvJromEWEbX7KLHEYQEH07gIVt8/WCD07VsVZYS/aZ++oatgzFBD8fhvVWCjAVxfxUnv+MXTFfh5LP2qRwRzS/iQYqqR/uJDRGxeUPwng514MZWk1CV62Xt8YvALPUMzGEnppOs3TCofNsIDT2YVMYnc119v2ftVYFseqMQZDbUAQUtpG1TBPXG88vqBmFaO0dkivsEyZPuSoCOIi2OEdmxaVaLwJ4EQQJby2u9rWaTrNkF8tpR1qz7aCiwBxzSjfoAexQFvwubfDvrQd3GCIgkphn39ivttVRIs0hXybEwNtjUKCCh9OhkJOizqAgG1pzS0VXewYpgy6ukX/B3XwYQ1jzvFZkcP97pn1ugtbkQZJe8A3mD7wEQc9jUdtGb2ljsrOpScY1ZeLt62ScbPZ0BV6sRFU4bJEXunCTXcIPg/FQ1mN2CzJ6eo+T6uCGHtc1GmOmQBOf7+yz77/drDcaqJOKGz7jrrqFVjI+hUTadzOxfTRt330G77bR+6DDjBg3FKBAeWvWdl/raPrqnvfIVf/nQ9aCukiSBobhZrrQDGQ4VvQuWoevdzGRdaFjcQ44aR2mAL4YRL1ceLw2 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)(1800799015)(52116005)(7416005)(376005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange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iL99FU?= =?utf-8?q?eGL1AOI0JUp200/AFHzuklTtMQMffz+pJhX7j1PoEUTxex3ZIxhnqnKgNnjVfu1Yu?= =?utf-8?q?lVt21eXMGT8tI4ZVeEpLwmzOdoslD6ex7JHINsH7qOfB7rsB+n3QlapvraD08GqjS?= =?utf-8?q?tWs3JSJFYMKLAuuUSTEZz5L2UoaXRpwRGKhs0BkzchRCBUWHKiZQjQsm1fBuk54O9?= =?utf-8?q?pqP+kl5Y9QyhtFmnRQAAtXu9LE9+jGkQFrXLOVJAlTeaUh+cwGevj7iiUSKbjU9eq?= =?utf-8?q?mIwAgWyfWpWCIebCZdLNjn3xiuA2CpGswRFFATLBUv7LAY+6uYS0UPuaY8TAfZYv5?= =?utf-8?q?ll0Jt3fAJLh0UeYBEckEtlQ7yCHxM10PkOe+7UvoLo4cbkPHjPEsnMlA8yqId7+OQ?= =?utf-8?q?hYPAiGLC3FdYSh2DHcZGRrP/vrCpy9Eox7XtA65cFxHi7Hi56Rc4lZv/BaSfzfIDm?= =?utf-8?q?spBSWFhYzDK4Q9d+PNhUTNZW6e7G0xVqNcXUxim6OGa6hbeV6wFvE/wtXXAyv/LWj?= =?utf-8?q?reCBxswXl3w3sl1aL6BWrSlFf3Sfkl2rLdU4pVYF4jxQ1k09tdZTsV7OPb2PtDaIY?= =?utf-8?q?MzEkUnW5LslO2akH9Vglk2gquopo7ULgESW3AB4MZm6Ev4cUPoieDqTwMlpigfzpB?= =?utf-8?q?LmSV9Wcb24aD3W41lAVE1X7W9v40q3XIhIzEHbp0+u/SoRcTTQBFHW1cmNOmtroXS?= =?utf-8?q?OJaIc3x5bAkrHCMl17xywvnNgOkZNhbmEWmPo//Lc611B88UpQ4CSoo=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: e6fb4a75-d361-4aeb-c42a-08dc4cac15bd X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 09:15:16.3553 (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: Iq2cwxp5RGKNki3fkcHmH4s+UPQ87zc69Moe93UL8aPLdsgPBpZ04HGnsZudYuxYTkOX4Q/iOPDYaAlgkFYx+blRkQw5chlIIyiRb6b9fcI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB9916 Note: This series could not be completely applied due to conflicts upstream (TI TUSB8020 was added), and a rebase to the next -rc1 was suggested. The series is therefore identical to the previous version (v7), but taking into account the new hub. The first patch of the series has already been applied and it is not included anymore. 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 also been added, keeping generic names for already supported devices to keep backwards compatibility. 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. 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 v8: - General: rebase to rc1 to solve conflicts upstream (new hubs). - PATCH 1/9: remove (already applied). - Link to v7: https://lore.kernel.org/r/20240305-onboard_xvf3500-v7-0-ad3fb50e593b@wolfvision.net Changes in v7: - onboard_usb_dev.c: drop comment for is_hub field. - Link to v6: https://lore.kernel.org/r/20240229-onboard_xvf3500-v6-0-a0aff2947040@wolfvision.net Changes in v6: - onboard_usb_hub.c: use dev pointer in probe consistently (new patch). - onboard_usb_hub.c: rename get_regulator_bulk function to get_regulators and only pass onboard_hub (hub in probe) as argument. - onboard_usb_hub.c: drop file after renaming. - onboard_usb_dev.c: improve device descriptions in usb_device_id table. - onboard_usb_dev.c: keep non-hub devices powered on in suspend. - General: update commit messages (use usb_hub_dev after renaming). - Link to v5: https://lore.kernel.org/r/20240228-onboard_xvf3500-v5-0-76b805fd3fe6@wolfvision.net Changes in v5: - onboard_usb_dev: move device supply names handling to [1/8]. - onboard_usb_dev.c: make always_powered_in_suspend not visible for non-hub devices. - onboard_usb_dev.c: move is_hub check in suspend() to function entry. - onboard_usb_dev_pdevs.c: comment rephrasing to account for hub-specific attribute. - Link to v4: https://lore.kernel.org/r/20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net 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: use device supply names usb: misc: onboard_hub: rename to onboard_dev 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 to ONBOAD_USB_DEV usb: misc: onboard_dev: add support for non-hub devices ASoC: dt-bindings: xmos,xvf3500: add XMOS XVF3500 voice processor usb: misc: onboard_dev: add support for XMOS XVF3500 ...-usb-hub => sysfs-bus-platform-onboard-usb-dev} | 3 +- .../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 | 546 +++++++++++++++++++++ .../misc/{onboard_usb_hub.h => onboard_usb_dev.h} | 62 ++- ...ard_usb_hub_pdevs.c => onboard_usb_dev_pdevs.c} | 47 +- drivers/usb/misc/onboard_usb_hub.c | 503 ------------------- include/linux/usb/onboard_dev.h | 18 + include/linux/usb/onboard_hub.h | 18 - 17 files changed, 722 insertions(+), 582 deletions(-) --- base-commit: 4cece764965020c22cff7665b18a012006359095 change-id: 20240130-onboard_xvf3500-6c0e78d11a1b Best regards,