From patchwork Tue Feb 6 13:59:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13547324 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2132.outbound.protection.outlook.com [40.107.13.132]) (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 AFDAA131721; Tue, 6 Feb 2024 13:59:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.13.132 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707227983; cv=fail; b=FmmDEJZUO/iECftCTmuVixxoHpWWN5FESJvTDiJaQWVOyUzmqFRwkHD5bFG6qxcN0nULffb8PqcdpbLphHDQhRQa6dMXaBR3vO8AoEay7q/ipXWwwYnD6F0NOYNAtlBJknnVOxiCQlUJnI77oDhZxwFvE5jsfpMlfku+iyRDDk4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707227983; c=relaxed/simple; bh=xcaKombqlylQnDTAm9hIIYy+M1MtfKjaEHCnlM3jnkU=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=HPms0oMlEUzSFsVUiuNMhoVLO4TOz+WdPP4bxjFwJUmv48i7c6br6fsUyh4KDsNHheiid852VkJItg+PvwFho3IVH4clxCdjwUXf/YZuoJk0481IdXuxKEDzS5C5J0wQFbuT/kIJNVmR+Mb0I0SxC1cPUd6TaTMa2Vb9ElBINbg= 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=T7wv3hpL; arc=fail smtp.client-ip=40.107.13.132 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="T7wv3hpL" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IuGaOTe6W+fLjFTveKmBQJkN1ng3Hjrs4YcOh3p74T6SK5U1o4zCvazm0F/PfbuZU3TkQUsxEgjHgFwK6fEtIAUSHkoDNZFLlQJXpr7imALlGhGqIYZhmDQjE395w+Zu65qhy0uh2UaGIDAyVUpZT2bibAeC5PnYKSKmvW40D4Rbue2qi0TibRSc0cKMNgwhekaf6dcVCYAxx6wtBGyk7AwQ8fT+KUHKkTa7WdvYcId25xJyEPL9zIU+6WEyeyCU3/tFIOTk72LXF9Rv66R2m0xMS8JvIywpqH9WguLfKAvMJzMDMs41Go+QLh4M8s+7XBI2TCGaLHS394OAq2ysww== 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=pcms0RghkDv8XncUdqg+ekxu/0OcbM9PLKfrAYkqv9g=; b=jK+r25nnmqPDHCImA11v4nOOZBdmQ0XApma9uvtqgb3zDtPVC9fcjU01wp/vaQGAbvR46yRhLKVldQS2E3ECy5/7t7zBiQkywkKWZMovfQV28nNuh2aG9eme8k3VNQlePtBNhu/n+zdh+EFFdUx+I3mzqpEyHYsdXfP0b8Uigm1danSJ2iSIaJiTHy5WU+7593MYyF0JMtwxXTL3eOQ3ew6oEumv4ggkwM1pXIxmAJ6am/6sR5XcXVF2r1sTy0ulVNu3MmsNPa8aGZZAsO9NeeJLigrmax90zK3Ozmx0x/SGo6DYYMFJsytE6UTZA/bE2tTo2w8iHYvQ4m663+iKRw== 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=pcms0RghkDv8XncUdqg+ekxu/0OcbM9PLKfrAYkqv9g=; b=T7wv3hpLDb0myG9qWhMrVi48721C3XDBWRWIEx+pmp8AP07qesxRR34x0rg2mDz0CIrE+VwYMvGBF3JSVpMfpreYF00DTo7h9kwgeNKFsnVMhjJXrcf/dw7ijCIceFhlZlPM2LkS9JbqdTtdG+/rbBvQqIFKpcXPvuyHJKSVtME= 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 DB9PR08MB6330.eurprd08.prod.outlook.com (2603:10a6:10:263::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Tue, 6 Feb 2024 13:59:36 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::c8ee:9414:a0c6:42ab]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::c8ee:9414:a0c6:42ab%7]) with mapi id 15.20.7249.035; Tue, 6 Feb 2024 13:59:36 +0000 From: Javier Carrasco Subject: [PATCH v3 0/7] usb: misc: onboard_hub: add support for XMOS XVF3500 Date: Tue, 06 Feb 2024 14:59:28 +0100 Message-Id: <20240206-onboard_xvf3500-v3-0-f85b04116688@wolfvision.net> X-B4-Tracking: v=1; b=H4sIAEA7wmUC/3WOwQ6CMBBEf4Xs2ZpdCoie/A9DDC1baWJa0pKKI fy7Fc8e3yTzZlaIHCxHuBQrBE42Wu8yyEMBeuzdg4UdMkOJZYUkUXinfB+G+5KMrBFFo5FP7UD Uk4LcmgIbu+zGW5d5tHH24b0PJPqm/12JBIqaVC3PbYWNVteXf5rfqaPjGbpt2z6l4ddHswAAA A== To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Javier Carrasco , Matthias Kaehlcke X-Mailer: b4 0.13-dev-0434a X-Developer-Signature: v=1; a=ed25519-sha256; t=1707227975; l=4119; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=xcaKombqlylQnDTAm9hIIYy+M1MtfKjaEHCnlM3jnkU=; b=tBwaUPBoMEfwd5d48U0bAR+Ryy34V09lWE6V2T2JTfnVvEfxTIEJulEpeCPq3J0fH9hc94NqM jhJFt7CA6rjCjoiRZhF/LC4ZRhvm2kT69PfHgjFMUJtuPrc+0y6mX9k X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: FR5P281CA0038.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f3::8) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DB9PR08MB6330:EE_ X-MS-Office365-Filtering-Correlation-Id: 766dc3f1-2fd1-4186-daac-08dc271bda34 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2HCwPLFR6NkVFMZ4H8VMbJ2CDYIm+jY4RJ6FHQIF9O0TAXH/zJ0G6Nz9U+NCU3MZX3fGi9hcsBJ0DogtHpoYlZ65TiBpJZ1EFn+KtOXyI2R41fD6lZ7NN/jN0QipHJx10EpOi2lsOBTnOjHsxcIHvmidtPfX8n3sGgsI+57nE1Ocv6lv58VY5xEaXC3ZH5rPqvmOcgPvuqsTBePFfTVtqnEMK9RYOiM8RVi0/v8oFmPFmuPAwXlE4tLt1gfbbzwaGDvAr6DCUSfZD/Mu3b8svN1i2TkOAV09PzGdS/5q13UzLE0gWy1ldoss1ymDVb/qGRYwjxG/Kchfngc/nZY0wBTlLPyyW+QNvpxYUcyvvvfKui5qyW+WHySXQ12krYFTeq5k2vPyOoWzbhm/LbTHkVNv9yhTGqpjEpWiLkkQfjWcrQFlfi/n8jx4jv5I6X6EFIyhYUAikA2/LwOp+9RhZgJDayJeVphn7eYa5V/LRbBabC0jC1YGlPPpjlx0PBs8cpT2TFLOuMpm42sPo+lS1EjE/7/thICRV3yacfmkDm4kv8XrSoosCv/AfI9yJlNmxXnf2h9KtjoBjO5L5iuiuensI8pKMYC+yyxQ52cBK8I= 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)(366004)(346002)(39850400004)(396003)(376002)(136003)(230922051799003)(186009)(64100799003)(451199024)(1800799012)(38100700002)(44832011)(83380400001)(26005)(2616005)(6486002)(966005)(86362001)(6506007)(6666004)(478600001)(6512007)(52116002)(36756003)(316002)(38350700005)(41300700001)(54906003)(66946007)(66556008)(66476007)(110136005)(8676002)(4326008)(2906002)(8936002)(5660300002)(7416002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?M+EqE+w8NzIcUf4qg1NUljOk765H?= =?utf-8?q?i3QWTc9r+bE3cANEEGdUXcaP/T7xlD5tLGiR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wwQkexkr3yzMdIP/8WawSy+PwGQAxWaYBa?= =?utf-8?q?pWmVJeNTITaUHQWu6a44h/JWJdT7nBFdXn0O5f1NaYxJGr5uySi1NUTIx4dFAzE5O?= =?utf-8?q?IH0gjYHauMgjQQ9qoP9yCjhVWSWIvNw7O3G3Gr863Udni6CGD6SX9WLsvC+k9Msv3?= =?utf-8?q?zn7aHckkSqUSw22HwifVooPowkTDUuhFTTCGJl4Ismg4GOAERlte9MV1uC/UTwyDJ?= =?utf-8?q?zitVpL1IrJ78n67tJIrNPILCYkoAVuuKO3HnmGAXp81tbr42rmem0FD+rHrITmQtQ?= =?utf-8?q?/tZIdZD3eJTpaR3JWMTAJr6VFS4xMFkcQkX4yJengvakMV2/x10qANiyoKcfUpheL?= =?utf-8?q?XMdKnse1hL0R5Fe/owCz8Q/ZLJ9+e169uvE4Wi+w8bW0gERLvq4h/5cfFzlWbAV9T?= =?utf-8?q?fQ8aidMrDbirhgsyo4A8Lv7DlYu/ReBIwwTzWEoZ8tMUKo715rucBLTkLi75Aaakh?= =?utf-8?q?wItchgTUvd22qscKNpQb5nAwzXqRhx2HJ7xjVd3vmC03q/hqo5i1EWu85mutr5bx6?= =?utf-8?q?vcQu8lyuSgZtG0Gq11E0wxtE0DAAf5z5L5n1ashcO+0Z5KAggNtlDg5sNjVJbFrMi?= =?utf-8?q?u4ZqjYAMU64HKbDes2nKG9FzZ7nREJBkHQyYYtZbcC8z9ihwrm6cbv0=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 766dc3f1-2fd1-4186-daac-08dc271bda34 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2024 13:59:35.9262 (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: ToQDAYngRzYmC5PuTlLVpXCyGYgbwvtBBcWGnmHqZUrMZHcmcNny5jt6F/H1p+qoap17w6OBB0tK7O1KRYsQZgxfqaJWf8NnWInQgqlQc5M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6330 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. 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/ Signed-off-by: Javier Carrasco --- 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 (7): 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 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 | 523 +++++++++++++++++++++ .../misc/{onboard_usb_hub.h => onboard_usb_dev.h} | 45 +- ...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, 683 insertions(+), 580 deletions(-) --- base-commit: 41bccc98fb7931d63d03f326a746ac4d429c1dd3 change-id: 20240130-onboard_xvf3500-6c0e78d11a1b Best regards,