From patchwork Tue Feb 20 14:05:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13564057 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2116.outbound.protection.outlook.com [40.107.22.116]) (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 4EA0F6A8CF; Tue, 20 Feb 2024 14:05:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.116 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437960; cv=fail; b=W5gGZyYVVVwD2Wqf2z6m0aEC+hibMCQD+OZK6wDxYnuN5N39SwZ3IJ+2vJM4mxLFSHAXIIuQTANQScKPBCnZdJqtCZ/WrAmiJzOyNNyL/QWlnIxcaDg/RXtM4tT1te0i9ejnAA16iBFUxA8Y+ynbO3jMSvkxYDzwGmvTQMx1vT4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437960; c=relaxed/simple; bh=+iGxgLnKT3ZGZ58BzBVIYLY+vC7H0hLL4aXex3Qapp8=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=caNyzC1Be64p51ersd2g8TyvwtBcUqTHjnUtMouwIcaAU6nPu1XYGwdd3YiavfMYauahXVQ5GDwUci82hJHrueP5ITg21t7Q9cPvaZjyHQb2SVtfxRH59oJ/Xbg4BGplRaWvOFrZM7w7TSvaiCDYAPZIWr40aQsyBaD101QJOo0= 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=jGqh0OPl; arc=fail smtp.client-ip=40.107.22.116 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="jGqh0OPl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D6606DLnU3ylE/qJCg2JjUnN7FnOkP/XJ2AxNowEaMs5ERI+exMMQLxmZmEse6uzz/cu5zuw7SWdqEVjYGoXemxE2Hgbg5gH+he/gpmYrK14t+yJezk77ztOPos323fXqdAnfjwa6PPQ7L9alY+VKTEHDGx3DwjgqkmlaXgerniT3iEatDPRSD6S0gKwiSkN8A6fmP9NXcXYt5et+JeyyRI3AomMIwkaHnr9YMrvKaL7dLd9E/8qcuj9e4SBnhgzo/dmrZAyf4jJ8/dLYQbNNh5RIIbVb/S00MGa8XmIW4jeAQCKy7fbgs6pwgX6jd816HTIBI6/a17es9WBLlAYCw== 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=PQUZ7W2K186J8L3PALviohDuY4ptDhjOTS9QqxugLm0=; b=n6Nroc+YdmuD53HY8TkEEGOo5IgdFhK6+aEWgkwBzq9jTI/gNgHU9RhntOe5ZvKnKa9VbztGd7d/rppPL6MF5O72KRhldOvNp1fo8xRCgJkLPdqq7ruNz5f8dRX+bjXa5nJDI60lrbI6ybH0dcsfhYRDIBi2yWizTbADvCuLFULtTHuG06tEJF169rNJ2geZcTPKxkrSqn1Mk0AN1J8rcNtZBNfAR+0gBxInX4sSARlJUxMEIXQy3mGMiLPp48LhQumbaS3ao+2SZlQ1d6PfAPd6Bv+E+nwVXRA7losbJXnxeyvEmHZZ2q92XT7PZ2cVlZCurtmKwWGk2PrK3FG+0w== 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=PQUZ7W2K186J8L3PALviohDuY4ptDhjOTS9QqxugLm0=; b=jGqh0OPlkquDgnHg6WbCP+gEdZMY2r2KYJk9j21ZfmqpSDMxrLCe+9H8KmHqtMc5b6J+ES6l463Mp/fDsLhhrBqNNM+4wkKtx42WFB6Vc3UvbGihujOQihBhyJ2QsR47LTjazSkIvHCAr8+zgs+Q9VTmqLWtAMecep4oYohb5jc= 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:52 +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:52 +0000 From: Javier Carrasco Date: Tue, 20 Feb 2024 15:05:45 +0100 Subject: [PATCH v4 1/8] usb: misc: onboard_hub: rename to onboard_dev Message-Id: <20240220-onboard_xvf3500-v4-1-dc1617cc5dd4@wolfvision.net> References: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> In-Reply-To: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> 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=45541; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=+iGxgLnKT3ZGZ58BzBVIYLY+vC7H0hLL4aXex3Qapp8=; b=tsna4YBcZNlM9ngCzQfHNb3csfJ/3JCulB8BE06/VRCgY+EedLTShxBZ48JoOLoD5EE5aYdhc 5hKEiguSeYCBvm8KjK5AOD3aNmCuY0tjHvFWKMm0C1CK50mrVqTnoaN 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) 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_|PR3PR08MB5577:EE_ X-MS-Office365-Filtering-Correlation-Id: 62376ac6-3910-47cb-14e5-08dc321d0c39 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oF8+LTM6WKMLm0sgmgK3MhsELb8w6EGWNV4mQMXY6M0NFuIKzrhwPV6euo3aPmE1wNUX6EmljinDWRappznf4kUn19CDnCeTp6Eyv07FoQ+XH8v7toMarVEnELLqGOVtm1TSLJSoJv0hYInzculH1NcHkUgXunI2ipEY25+n4D9wnAyAgSjwvBqFh45mqlCA6UBPWGjtVmCu7ZCN0Brfq89s5c89g72fkcwIppNmKNpHWrwOxqbfJ8oKgmoPvuUpKXxWbEcbQZHCKCXjvjdc7RIAth2n0I7tWYgqM0hxHMhi3y55wgD7M0YEA0sM6FYJiBpS2WfNfqDVNFMcCos8bzyvpQtMAWse/RnD2KyVuWlXdMT9oZKLeV+NxzIrTOVIwE+F+SX3h9SrvYjRKVvhkNBpqNm6jkLZRzX5BRvRDZNTGZJPkDVMcqmd2OghigvN+sCAq1KElbq4RcmFshFvmhmkRvqIQOXlgX9SRUoei3ecFVSF4egqy+QlwFD0wmBM98v1d42COD7FCATWG4dtJZnl/7MuMkgeM4YUu38YpI2iPJMH2ZZAuJO2RqT661ph/WR6kAD1PtsWBCrQ4dAZU34kgTIQmEMVLWl00jfn4jgchADcOse4oLPQQYrGSy7FnD2qUwuA5M7ZXlRMbTnekA== 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?uIQUtAH79s18t5mUhX9AQObpk4k9?= =?utf-8?q?oGpmNf7vCI6qLsYDTn9PEbBXYK2s++iCC5kd2BbC/jP9qBVovi1hNrenABvt2fSrl?= =?utf-8?q?Vy9tj0a7WlM37IkSdh9A3MtBM0qIzHOPEIABvN9abkTB/x+oLz1kQSr1V9AR8CkjW?= =?utf-8?q?G7nnLrFHOuB7g/4Vlu3e6OFy5MvOGZmb5DW6oRtMnXJs7Gjt5UEup2LXX6Lu2ZIYD?= =?utf-8?q?2LC8g6up/uILjNECMKhLU/Wi9gooiTFXRaR8Xl2C/Q4S3lyH891BqKYGi01p9Nqf2?= =?utf-8?q?NHtRj4ZJThNkbVhCVO3LtKKAD/Qq1nBKjNvzKDQ2Ps6HEUE04EENrTRciqrNZ2tXa?= =?utf-8?q?cHQ6Sg2GYQKFL+fIPOJzwwkK7XJ/9yq0IdzieCROqXQHv7LKUEfP+l0FguKzir7r/?= =?utf-8?q?qXg7vJC/ZzpC75uX6xZSCeOUWLbqfhIb4ObDu/jFL1G48L1CCAHsCxfmLGa2hYGM+?= =?utf-8?q?nqxstxXgiz6SUiCWD2sJDK+PFZpI6uxqKLW1hGzEtA5AnEQY/RwQaBm8trJWVjS+b?= =?utf-8?q?YZmNTOBwbxeOzM8mh1Lm5giLzkFaHZc+McCs4AFPIC/oHwBBZ0NlfKRCYXrGuihet?= =?utf-8?q?tziruMpmZKmrxCv0dE84v9sPvjg7eP/NQ2a7O20cWuDCVURAYdM3LcaVBIJj7fdkI?= =?utf-8?q?FEvvPlcPfNISvenAdH1Ws/Qk/iwWdZMmTPpDujNcBhDit0pr9WYCbk2h9FzrXVjrZ?= =?utf-8?q?E6HXjwf0+V/wPHGz6JhoZCHWDkLWzp57+PD5fcM7e5Adbc5rIAVg3f6QJsGgdUXgR?= =?utf-8?q?yOFAacjrAcdlGFtVgwaGZm6zUrGzg98M56SA7LglTfxpQKHWjqLcQ21PbktRtp/KI?= =?utf-8?q?o3s/kEthTFkG9TNxrXbeSVPRLbQ/3d/F+UPKWrXm8VmuHbjXJwvpYgDVsZ8jVpJtV?= =?utf-8?q?IaQwKfvR/uDXv3MnMduemIauOM0fE1UqAm0rhUXL8HBu4obMmiwtaRLEn/PshOOgx?= =?utf-8?q?1exkNO1+NjcKpQgIpSZI7zlFZ0XuaVNjPF3FraPjVApWKKa5FHHOP5G8cVtt6Yx4X?= =?utf-8?q?5ShZ3LfEoCkeHb5icht47Qb3PE8CgNMqtq+BOPis2j99FhXkmfn/5N/6iqd68XapC?= =?utf-8?q?ratKUtZk2avSp6ul3TIIJsW34T7Zd1RAnR9v8fSG7gqx8yFjzkK1xR1P4aTk/iv/P?= =?utf-8?q?ExsJbPMFlLa/NM4OqkHQ8QSwe84ixescEsIKY9lPcgNPnbeqpkWg4zoUxxGRsB7f0?= =?utf-8?q?GnRFBRzl+Zuo/SbKJdRDbCiyqMKFkHwySu2UpSEZCB5LTTLlU3ShmB0H7G/yeZ78U?= =?utf-8?q?C+7Mo1gYl2Qtz4nktbQRGDDz1uiIzVYtJYKb+CMTepczuyxNXtyqwPAOEC0jDVTS0?= =?utf-8?q?HNURZAl9zB0AOFT9B5UCBswkYNLgH7npzlsS4QzGBGUZRnd+IKiPhO81m5B0d65EA?= =?utf-8?q?2WsrtmvXkp1PLWbhqnbG5OgiL6nka7vc/M2acpdVu5mKgCBRpc/asAwQmb54sRsRe?= =?utf-8?q?YccFCHdmEkfVTX4utpppKODgL6qrJqEkhvocm9E2ZiDuYt5ZolmiJtaLWsYEUwjIJ?= =?utf-8?q?C480ClucA8kWBVHxRbWdsO5ek0pFh/x338gA00f+QS4aGwwTF6ZtXxM=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 62376ac6-3910-47cb-14e5-08dc321d0c39 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:52.2260 (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: ZgxSa4MIRa0AhSzQDAYCvKq0eEMxrtY3Meb4hKQA4vrn8UxwohPl7M1TMwgSCWFHMZDTtB/huga+7dqUtQFPUonNFxmn3XnlAFCDHg62PPQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5577 This patch prepares onboad_hub to support non-hub devices by renaming the driver files and their content, the headers and their references. The comments and descriptions have been slightly modified to keep coherence and account for the specific cases that only affect onboard hubs (e.g. peer-hub). The "hub" variables in functions where "dev" (and similar names) variables already exist have been renamed to onboard_dev for clarity, which adds a few lines in cases where more than 80 characters are used. No new functionality has been added. Signed-off-by: Javier Carrasco --- ...-usb-hub => sysfs-bus-platform-onboard-usb-dev} | 4 +- MAINTAINERS | 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 | 518 +++++++++++++++++++++ .../misc/{onboard_usb_hub.h => onboard_usb_dev.h} | 28 +- ...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 - 13 files changed, 594 insertions(+), 576 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub b/Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-dev similarity index 67% rename from Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub rename to Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-dev index 42deb0552065..cd31f76362e7 100644 --- a/Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub +++ b/Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-dev @@ -4,5 +4,5 @@ KernelVersion: 5.20 Contact: Matthias Kaehlcke linux-usb@vger.kernel.org Description: - (RW) Controls whether the USB hub remains always powered - during system suspend or not. \ No newline at end of file + (RW) Controls whether the USB device remains always powered + during system suspend or not. diff --git a/MAINTAINERS b/MAINTAINERS index 8999497011a2..7ad556ecca40 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16297,8 +16297,8 @@ ONBOARD USB HUB DRIVER M: Matthias Kaehlcke L: linux-usb@vger.kernel.org S: Maintained -F: Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub -F: drivers/usb/misc/onboard_usb_hub.c +F: Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-dev +F: drivers/usb/misc/onboard_usb_dev.c ONENAND FLASH DRIVER M: Kyungmin Park diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile index 7d338e9c0657..ac006abd13b3 100644 --- a/drivers/usb/core/Makefile +++ b/drivers/usb/core/Makefile @@ -12,8 +12,8 @@ usbcore-$(CONFIG_OF) += of.o usbcore-$(CONFIG_USB_PCI) += hcd-pci.o usbcore-$(CONFIG_ACPI) += usb-acpi.o -ifdef CONFIG_USB_ONBOARD_HUB -usbcore-y += ../misc/onboard_usb_hub_pdevs.o +ifdef CONFIG_USB_ONBOARD_DEV +usbcore-y += ../misc/onboard_usb_dev_pdevs.o endif obj-$(CONFIG_USB) += usbcore.o diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index ffd7c99e24a3..f85b3e928a35 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -1776,7 +1776,7 @@ static void hub_disconnect(struct usb_interface *intf) if (hub->quirk_disable_autosuspend) usb_autopm_put_interface(intf); - onboard_hub_destroy_pdevs(&hub->onboard_hub_devs); + onboard_dev_destroy_pdevs(&hub->onboard_devs); kref_put(&hub->kref, hub_release); } @@ -1895,7 +1895,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) INIT_DELAYED_WORK(&hub->leds, led_work); INIT_DELAYED_WORK(&hub->init_work, NULL); INIT_WORK(&hub->events, hub_event); - INIT_LIST_HEAD(&hub->onboard_hub_devs); + INIT_LIST_HEAD(&hub->onboard_devs); spin_lock_init(&hub->irq_urb_lock); timer_setup(&hub->irq_urb_retry, hub_retry_irq_urb, 0); usb_get_intf(intf); @@ -1925,7 +1925,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) } if (hub_configure(hub, &desc->endpoint[0].desc) >= 0) { - onboard_hub_create_pdevs(hdev, &hub->onboard_hub_devs); + onboard_dev_create_pdevs(hdev, &hub->onboard_devs); return 0; } diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h index 43ce21c96a51..3820703b11d8 100644 --- a/drivers/usb/core/hub.h +++ b/drivers/usb/core/hub.h @@ -74,7 +74,7 @@ struct usb_hub { spinlock_t irq_urb_lock; struct timer_list irq_urb_retry; struct usb_port **ports; - struct list_head onboard_hub_devs; + struct list_head onboard_devs; }; /** diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index c510af7baa0d..50b86d531701 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig @@ -316,18 +316,18 @@ config BRCM_USB_PINMAP signals, which are typically on dedicated pins on the chip, to any gpio. -config USB_ONBOARD_HUB - tristate "Onboard USB hub support" +config USB_ONBOARD_DEV + tristate "Onboard USB device support" depends on OF help - Say Y here if you want to support discrete onboard USB hubs that - don't require an additional control bus for initialization, but - need some non-trivial form of initialization, such as enabling a - power regulator. An example for such a hub is the Realtek - RTS5411. + Say Y here if you want to support discrete onboard USB devices + that don't require an additional control bus for initialization, + but need some non-trivial form of initialization, such as + enabling a power regulator. An example for such device is the + Realtek RTS5411 hub. This driver can be used as a module but its state (module vs builtin) must match the state of the USB subsystem. Enabling this config will enable the driver and it will automatically match the state of the USB subsystem. If this driver is a - module it will be called onboard_usb_hub. + module it will be called onboard_usb_dev. diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile index 0bc732bcb162..0cd5bc8f52fe 100644 --- a/drivers/usb/misc/Makefile +++ b/drivers/usb/misc/Makefile @@ -33,4 +33,4 @@ obj-$(CONFIG_USB_CHAOSKEY) += chaoskey.o obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/ obj-$(CONFIG_USB_LINK_LAYER_TEST) += lvstest.o obj-$(CONFIG_BRCM_USB_PINMAP) += brcmstb-usb-pinmap.o -obj-$(CONFIG_USB_ONBOARD_HUB) += onboard_usb_hub.o +obj-$(CONFIG_USB_ONBOARD_DEV) += onboard_usb_dev.o diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c new file mode 100644 index 000000000000..2103af2cb2a6 --- /dev/null +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -0,0 +1,518 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Driver for onboard USB devices + * + * Copyright (c) 2022, Google LLC + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "onboard_usb_dev.h" + +/* + * Use generic names, as the actual names might differ between devices. If a new + * device requires more than the currently supported supplies, add a new one + * here. + */ +static const char * const supply_names[] = { + "vdd", + "vdd2", +}; + +#define MAX_SUPPLIES ARRAY_SIZE(supply_names) + +static void onboard_dev_attach_usb_driver(struct work_struct *work); + +static struct usb_device_driver onboard_dev_usbdev_driver; +static DECLARE_WORK(attach_usb_driver_work, onboard_dev_attach_usb_driver); + +/************************** Platform driver **************************/ + +struct usbdev_node { + struct usb_device *udev; + struct list_head list; +}; + +struct onboard_dev { + struct regulator_bulk_data supplies[MAX_SUPPLIES]; + struct device *dev; + const struct onboard_dev_pdata *pdata; + struct gpio_desc *reset_gpio; + bool always_powered_in_suspend; + bool is_powered_on; + bool going_away; + struct list_head udev_list; + struct mutex lock; + struct clk *clk; +}; + +static int onboard_dev_power_on(struct onboard_dev *onboard_dev) +{ + int err; + + err = clk_prepare_enable(onboard_dev->clk); + if (err) { + dev_err(onboard_dev->dev, "failed to enable clock: %pe\n", + ERR_PTR(err)); + return err; + } + + err = regulator_bulk_enable(onboard_dev->pdata->num_supplies, + onboard_dev->supplies); + if (err) { + dev_err(onboard_dev->dev, "failed to enable supplies: %pe\n", + ERR_PTR(err)); + return err; + } + + fsleep(onboard_dev->pdata->reset_us); + gpiod_set_value_cansleep(onboard_dev->reset_gpio, 0); + + onboard_dev->is_powered_on = true; + + return 0; +} + +static int onboard_dev_power_off(struct onboard_dev *onboard_dev) +{ + int err; + + gpiod_set_value_cansleep(onboard_dev->reset_gpio, 1); + + err = regulator_bulk_disable(onboard_dev->pdata->num_supplies, + onboard_dev->supplies); + if (err) { + dev_err(onboard_dev->dev, "failed to disable supplies: %pe\n", + ERR_PTR(err)); + return err; + } + + clk_disable_unprepare(onboard_dev->clk); + + onboard_dev->is_powered_on = false; + + return 0; +} + +static int __maybe_unused onboard_dev_suspend(struct device *dev) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + struct usbdev_node *node; + bool power_off = true; + + if (onboard_dev->always_powered_in_suspend) + return 0; + + mutex_lock(&onboard_dev->lock); + + list_for_each_entry(node, &onboard_dev->udev_list, list) { + if (!device_may_wakeup(node->udev->bus->controller)) + continue; + + if (usb_wakeup_enabled_descendants(node->udev)) { + power_off = false; + break; + } + } + + mutex_unlock(&onboard_dev->lock); + + if (!power_off) + return 0; + + return onboard_dev_power_off(onboard_dev); +} + +static int __maybe_unused onboard_dev_resume(struct device *dev) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + + if (onboard_dev->is_powered_on) + return 0; + + return onboard_dev_power_on(onboard_dev); +} + +static inline void get_udev_link_name(const struct usb_device *udev, char *buf, + size_t size) +{ + snprintf(buf, size, "usb_dev.%s", dev_name(&udev->dev)); +} + +static int onboard_dev_add_usbdev(struct onboard_dev *onboard_dev, + struct usb_device *udev) +{ + struct usbdev_node *node; + char link_name[64]; + int err; + + mutex_lock(&onboard_dev->lock); + + if (onboard_dev->going_away) { + err = -EINVAL; + goto error; + } + + node = kzalloc(sizeof(*node), GFP_KERNEL); + if (!node) { + err = -ENOMEM; + goto error; + } + + node->udev = udev; + + list_add(&node->list, &onboard_dev->udev_list); + + mutex_unlock(&onboard_dev->lock); + + get_udev_link_name(udev, link_name, sizeof(link_name)); + WARN_ON(sysfs_create_link(&onboard_dev->dev->kobj, &udev->dev.kobj, + link_name)); + + return 0; + +error: + mutex_unlock(&onboard_dev->lock); + + return err; +} + +static void onboard_dev_remove_usbdev(struct onboard_dev *onboard_dev, + const struct usb_device *udev) +{ + struct usbdev_node *node; + char link_name[64]; + + get_udev_link_name(udev, link_name, sizeof(link_name)); + sysfs_remove_link(&onboard_dev->dev->kobj, link_name); + + mutex_lock(&onboard_dev->lock); + + list_for_each_entry(node, &onboard_dev->udev_list, list) { + if (node->udev == udev) { + list_del(&node->list); + kfree(node); + break; + } + } + + mutex_unlock(&onboard_dev->lock); +} + +static ssize_t always_powered_in_suspend_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + const struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%d\n", onboard_dev->always_powered_in_suspend); +} + +static ssize_t always_powered_in_suspend_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + bool val; + int ret; + + ret = kstrtobool(buf, &val); + if (ret < 0) + return ret; + + onboard_dev->always_powered_in_suspend = val; + + return count; +} +static DEVICE_ATTR_RW(always_powered_in_suspend); + +static struct attribute *onboard_dev_attrs[] = { + &dev_attr_always_powered_in_suspend.attr, + NULL, +}; +ATTRIBUTE_GROUPS(onboard_dev); + +static void onboard_dev_attach_usb_driver(struct work_struct *work) +{ + int err; + + err = driver_attach(&onboard_dev_usbdev_driver.driver); + if (err) + pr_err("Failed to attach USB driver: %pe\n", ERR_PTR(err)); +} + +static int onboard_dev_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct onboard_dev *onboard_dev; + unsigned int i; + int err; + + onboard_dev = devm_kzalloc(dev, sizeof(*onboard_dev), GFP_KERNEL); + if (!onboard_dev) + return -ENOMEM; + + onboard_dev->pdata = device_get_match_data(&pdev->dev); + if (!onboard_dev->pdata) + return -EINVAL; + + if (onboard_dev->pdata->num_supplies > MAX_SUPPLIES) + return dev_err_probe(dev, -EINVAL, "max %zu supplies supported!\n", + MAX_SUPPLIES); + + for (i = 0; i < onboard_dev->pdata->num_supplies; i++) + onboard_dev->supplies[i].supply = supply_names[i]; + + err = devm_regulator_bulk_get(dev, onboard_dev->pdata->num_supplies, + onboard_dev->supplies); + if (err) { + dev_err(dev, "Failed to get regulator supplies: %pe\n", ERR_PTR(err)); + return err; + } + + onboard_dev->clk = devm_clk_get_optional(dev, NULL); + if (IS_ERR(onboard_dev->clk)) + return dev_err_probe(dev, PTR_ERR(onboard_dev->clk), + "failed to get clock\n"); + + onboard_dev->reset_gpio = devm_gpiod_get_optional(dev, "reset", + GPIOD_OUT_HIGH); + if (IS_ERR(onboard_dev->reset_gpio)) + return dev_err_probe(dev, PTR_ERR(onboard_dev->reset_gpio), + "failed to get reset GPIO\n"); + + onboard_dev->dev = dev; + mutex_init(&onboard_dev->lock); + INIT_LIST_HEAD(&onboard_dev->udev_list); + + dev_set_drvdata(dev, onboard_dev); + + err = onboard_dev_power_on(onboard_dev); + if (err) + return err; + + /* + * The USB driver might have been detached from the USB devices by + * onboard_dev_remove() (e.g. through an 'unbind' by userspace), + * make sure to re-attach it if needed. + * + * This needs to be done deferred to avoid self-deadlocks on systems + * with nested onboard hubs. + */ + schedule_work(&attach_usb_driver_work); + + return 0; +} + +static void onboard_dev_remove(struct platform_device *pdev) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(&pdev->dev); + struct usbdev_node *node; + struct usb_device *udev; + + onboard_dev->going_away = true; + + mutex_lock(&onboard_dev->lock); + + /* unbind the USB devices to avoid dangling references to this device */ + while (!list_empty(&onboard_dev->udev_list)) { + node = list_first_entry(&onboard_dev->udev_list, + struct usbdev_node, list); + udev = node->udev; + + /* + * Unbinding the driver will call onboard_dev_remove_usbdev(), + * which acquires onboard_dev->lock. We must release the lock + * first. + */ + get_device(&udev->dev); + mutex_unlock(&onboard_dev->lock); + device_release_driver(&udev->dev); + put_device(&udev->dev); + mutex_lock(&onboard_dev->lock); + } + + mutex_unlock(&onboard_dev->lock); + + onboard_dev_power_off(onboard_dev); +} + +MODULE_DEVICE_TABLE(of, onboard_dev_match); + +static const struct dev_pm_ops __maybe_unused onboard_dev_pm_ops = { + SET_LATE_SYSTEM_SLEEP_PM_OPS(onboard_dev_suspend, onboard_dev_resume) +}; + +static struct platform_driver onboard_dev_driver = { + .probe = onboard_dev_probe, + .remove_new = onboard_dev_remove, + + .driver = { + .name = "onboard-usb-dev", + .of_match_table = onboard_dev_match, + .pm = pm_ptr(&onboard_dev_pm_ops), + .dev_groups = onboard_dev_groups, + }, +}; + +/************************** USB driver **************************/ + +#define VENDOR_ID_CYPRESS 0x04b4 +#define VENDOR_ID_GENESYS 0x05e3 +#define VENDOR_ID_MICROCHIP 0x0424 +#define VENDOR_ID_REALTEK 0x0bda +#define VENDOR_ID_TI 0x0451 +#define VENDOR_ID_VIA 0x2109 + +/* + * Returns the onboard_dev platform device that is associated with the USB + * device passed as parameter. + */ +static struct onboard_dev *_find_onboard_dev(struct device *dev) +{ + struct platform_device *pdev; + struct device_node *np; + struct onboard_dev *onboard_dev; + + pdev = of_find_device_by_node(dev->of_node); + if (!pdev) { + np = of_parse_phandle(dev->of_node, "peer-hub", 0); + if (!np) { + dev_err(dev, "failed to find device node for peer hub\n"); + return ERR_PTR(-EINVAL); + } + + pdev = of_find_device_by_node(np); + of_node_put(np); + + if (!pdev) + return ERR_PTR(-ENODEV); + } + + onboard_dev = dev_get_drvdata(&pdev->dev); + put_device(&pdev->dev); + + /* + * The presence of drvdata ('hub') indicates that the platform driver + * finished probing. This handles the case where (conceivably) we could + * be running at the exact same time as the platform driver's probe. If + * we detect the race we request probe deferral and we'll come back and + * try again. + */ + if (!onboard_dev) + return ERR_PTR(-EPROBE_DEFER); + + return onboard_dev; +} + +static int onboard_dev_usbdev_probe(struct usb_device *udev) +{ + struct device *dev = &udev->dev; + struct onboard_dev *onboard_dev; + int err; + + /* ignore supported devices without device tree node */ + if (!dev->of_node) + return -ENODEV; + + onboard_dev = _find_onboard_dev(dev); + if (IS_ERR(onboard_dev)) + return PTR_ERR(onboard_dev); + + dev_set_drvdata(dev, onboard_dev); + + err = onboard_dev_add_usbdev(onboard_dev, udev); + if (err) + return err; + + return 0; +} + +static void onboard_dev_usbdev_disconnect(struct usb_device *udev) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(&udev->dev); + + onboard_dev_remove_usbdev(onboard_dev, udev); +} + +static const struct usb_device_id onboard_dev_id_table[] = { + { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6504) }, /* CYUSB33{0,1,2}x/CYUSB230x 3.0 */ + { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6506) }, /* CYUSB33{0,1,2}x/CYUSB230x 2.0 */ + { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6570) }, /* CY7C6563x 2.0 */ + { USB_DEVICE(VENDOR_ID_GENESYS, 0x0608) }, /* Genesys Logic GL850G USB 2.0 */ + { USB_DEVICE(VENDOR_ID_GENESYS, 0x0610) }, /* Genesys Logic GL852G USB 2.0 */ + { USB_DEVICE(VENDOR_ID_GENESYS, 0x0620) }, /* Genesys Logic GL3523 USB 3.1 */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2412) }, /* USB2412 USB 2.0 */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2514) }, /* USB2514B USB 2.0 */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2517) }, /* USB2517 USB 2.0 */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2744) }, /* USB5744 USB 2.0 */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x5744) }, /* USB5744 USB 3.0 */ + { USB_DEVICE(VENDOR_ID_REALTEK, 0x0411) }, /* RTS5411 USB 3.1 */ + { USB_DEVICE(VENDOR_ID_REALTEK, 0x5411) }, /* RTS5411 USB 2.1 */ + { USB_DEVICE(VENDOR_ID_REALTEK, 0x0414) }, /* RTS5414 USB 3.2 */ + { USB_DEVICE(VENDOR_ID_REALTEK, 0x5414) }, /* RTS5414 USB 2.1 */ + { USB_DEVICE(VENDOR_ID_TI, 0x8140) }, /* TI USB8041 3.0 */ + { USB_DEVICE(VENDOR_ID_TI, 0x8142) }, /* TI USB8041 2.0 */ + { USB_DEVICE(VENDOR_ID_VIA, 0x0817) }, /* VIA VL817 3.1 */ + { USB_DEVICE(VENDOR_ID_VIA, 0x2817) }, /* VIA VL817 2.0 */ + {} +}; +MODULE_DEVICE_TABLE(usb, onboard_dev_id_table); + +static struct usb_device_driver onboard_dev_usbdev_driver = { + .name = "onboard-usb-dev", + .probe = onboard_dev_usbdev_probe, + .disconnect = onboard_dev_usbdev_disconnect, + .generic_subclass = 1, + .supports_autosuspend = 1, + .id_table = onboard_dev_id_table, +}; + +static int __init onboard_dev_init(void) +{ + int ret; + + ret = usb_register_device_driver(&onboard_dev_usbdev_driver, THIS_MODULE); + if (ret) + return ret; + + ret = platform_driver_register(&onboard_dev_driver); + if (ret) + usb_deregister_device_driver(&onboard_dev_usbdev_driver); + + return ret; +} +module_init(onboard_dev_init); + +static void __exit onboard_dev_exit(void) +{ + usb_deregister_device_driver(&onboard_dev_usbdev_driver); + platform_driver_unregister(&onboard_dev_driver); + + cancel_work_sync(&attach_usb_driver_work); +} +module_exit(onboard_dev_exit); + +MODULE_AUTHOR("Matthias Kaehlcke "); +MODULE_DESCRIPTION("Driver for discrete onboard USB devices"); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_dev.h similarity index 71% rename from drivers/usb/misc/onboard_usb_hub.h rename to drivers/usb/misc/onboard_usb_dev.h index f360d5cf8d8a..f13d11a84371 100644 --- a/drivers/usb/misc/onboard_usb_hub.h +++ b/drivers/usb/misc/onboard_usb_dev.h @@ -3,60 +3,60 @@ * Copyright (c) 2022, Google LLC */ -#ifndef _USB_MISC_ONBOARD_USB_HUB_H -#define _USB_MISC_ONBOARD_USB_HUB_H +#ifndef _USB_MISC_ONBOARD_USB_DEV_H +#define _USB_MISC_ONBOARD_USB_DEV_H -struct onboard_hub_pdata { +struct onboard_dev_pdata { unsigned long reset_us; /* reset pulse width in us */ unsigned int num_supplies; /* number of supplies */ }; -static const struct onboard_hub_pdata microchip_usb424_data = { +static const struct onboard_dev_pdata microchip_usb424_data = { .reset_us = 1, .num_supplies = 1, }; -static const struct onboard_hub_pdata microchip_usb5744_data = { +static const struct onboard_dev_pdata microchip_usb5744_data = { .reset_us = 0, .num_supplies = 2, }; -static const struct onboard_hub_pdata realtek_rts5411_data = { +static const struct onboard_dev_pdata realtek_rts5411_data = { .reset_us = 0, .num_supplies = 1, }; -static const struct onboard_hub_pdata ti_tusb8041_data = { +static const struct onboard_dev_pdata ti_tusb8041_data = { .reset_us = 3000, .num_supplies = 1, }; -static const struct onboard_hub_pdata cypress_hx3_data = { +static const struct onboard_dev_pdata cypress_hx3_data = { .reset_us = 10000, .num_supplies = 2, }; -static const struct onboard_hub_pdata cypress_hx2vl_data = { +static const struct onboard_dev_pdata cypress_hx2vl_data = { .reset_us = 1, .num_supplies = 1, }; -static const struct onboard_hub_pdata genesys_gl850g_data = { +static const struct onboard_dev_pdata genesys_gl850g_data = { .reset_us = 3, .num_supplies = 1, }; -static const struct onboard_hub_pdata genesys_gl852g_data = { +static const struct onboard_dev_pdata genesys_gl852g_data = { .reset_us = 50, .num_supplies = 1, }; -static const struct onboard_hub_pdata vialab_vl817_data = { +static const struct onboard_dev_pdata vialab_vl817_data = { .reset_us = 10, .num_supplies = 1, }; -static const struct of_device_id onboard_hub_match[] = { +static const struct of_device_id onboard_dev_match[] = { { .compatible = "usb424,2412", .data = µchip_usb424_data, }, { .compatible = "usb424,2514", .data = µchip_usb424_data, }, { .compatible = "usb424,2517", .data = µchip_usb424_data, }, @@ -80,4 +80,4 @@ static const struct of_device_id onboard_hub_match[] = { {} }; -#endif /* _USB_MISC_ONBOARD_USB_HUB_H */ +#endif /* _USB_MISC_ONBOARD_USB_DEV_H */ diff --git a/drivers/usb/misc/onboard_usb_hub_pdevs.c b/drivers/usb/misc/onboard_usb_dev_pdevs.c similarity index 69% rename from drivers/usb/misc/onboard_usb_hub_pdevs.c rename to drivers/usb/misc/onboard_usb_dev_pdevs.c index ed22a18f4ab7..ca56f67393f1 100644 --- a/drivers/usb/misc/onboard_usb_hub_pdevs.c +++ b/drivers/usb/misc/onboard_usb_dev_pdevs.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * API for creating and destroying USB onboard hub platform devices + * API for creating and destroying USB onboard platform devices * * Copyright (c) 2022, Google LLC */ @@ -15,29 +15,30 @@ #include #include #include -#include +#include -#include "onboard_usb_hub.h" +#include "onboard_usb_dev.h" struct pdev_list_entry { struct platform_device *pdev; struct list_head node; }; -static bool of_is_onboard_usb_hub(const struct device_node *np) +static bool of_is_onboard_usb_dev(struct device_node *np) { - return !!of_match_node(onboard_hub_match, np); + return !!of_match_node(onboard_dev_match, np); } /** - * onboard_hub_create_pdevs -- create platform devices for onboard USB hubs - * @parent_hub : parent hub to scan for connected onboard hubs - * @pdev_list : list of onboard hub platform devices owned by the parent hub + * onboard_dev_create_pdevs -- create platform devices for onboard USB devices + * @parent_hub : parent hub to scan for connected onboard devices + * @pdev_list : list of onboard platform devices owned by the parent hub * - * Creates a platform device for each supported onboard hub that is connected to - * the given parent hub. The platform device is in charge of initializing the - * hub (enable regulators, take the hub out of reset, ...) and can optionally - * control whether the hub remains powered during system suspend or not. + * Creates a platform device for each supported onboard device that is connected + * to the given parent hub. The platform device is in charge of initializing the + * device (enable regulators, take the device out of reset, ...) and can + * optionally control whether the device remains powered during system suspend + * or not. * * To keep track of the platform devices they are added to a list that is owned * by the parent hub. @@ -50,9 +51,9 @@ static bool of_is_onboard_usb_hub(const struct device_node *np) * node. That means the root hubs of the primary and secondary HCD share the * same device tree node (the HCD node). As a result this function can be called * twice with the same DT node for root hubs. We only want to create a single - * platform device for each physical onboard hub, hence for root hubs the loop - * is only executed for the root hub of the primary HCD. Since the function - * scans through all child nodes it still creates pdevs for onboard hubs + * platform device for each physical onboard device, hence for root hubs the + * loop is only executed for the root hub of the primary HCD. Since the function + * scans through all child nodes it still creates pdevs for onboard devices * connected to the root hub of the secondary HCD if needed. * * Further there must be only one platform device for onboard hubs with a peer @@ -63,7 +64,7 @@ static bool of_is_onboard_usb_hub(const struct device_node *np) * the function processes the nodes of both peers. A platform device is only * created if the peer hub doesn't have one already. */ -void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *pdev_list) +void onboard_dev_create_pdevs(struct usb_device *parent_hub, struct list_head *pdev_list) { int i; struct usb_hcd *hcd = bus_to_hcd(parent_hub->bus); @@ -82,7 +83,7 @@ void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *p if (!np) continue; - if (!of_is_onboard_usb_hub(np)) + if (!of_is_onboard_usb_dev(np)) goto node_put; npc = of_parse_phandle(np, "peer-hub", 0); @@ -104,7 +105,7 @@ void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *p pdev = of_platform_device_create(np, NULL, &parent_hub->dev); if (!pdev) { dev_err(&parent_hub->dev, - "failed to create platform device for onboard hub '%pOF'\n", np); + "failed to create platform device for onboard dev '%pOF'\n", np); goto node_put; } @@ -121,16 +122,16 @@ void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *p of_node_put(np); } } -EXPORT_SYMBOL_GPL(onboard_hub_create_pdevs); +EXPORT_SYMBOL_GPL(onboard_dev_create_pdevs); /** - * onboard_hub_destroy_pdevs -- free resources of onboard hub platform devices - * @pdev_list : list of onboard hub platform devices + * onboard_dev_destroy_pdevs -- free resources of onboard platform devices + * @pdev_list : list of onboard platform devices * * Destroys the platform devices in the given list and frees the memory associated * with the list entry. */ -void onboard_hub_destroy_pdevs(struct list_head *pdev_list) +void onboard_dev_destroy_pdevs(struct list_head *pdev_list) { struct pdev_list_entry *pdle, *tmp; @@ -140,4 +141,4 @@ void onboard_hub_destroy_pdevs(struct list_head *pdev_list) kfree(pdle); } } -EXPORT_SYMBOL_GPL(onboard_hub_destroy_pdevs); +EXPORT_SYMBOL_GPL(onboard_dev_destroy_pdevs); diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c deleted file mode 100644 index 0dd2b032c90b..000000000000 --- a/drivers/usb/misc/onboard_usb_hub.c +++ /dev/null @@ -1,501 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * Driver for onboard USB hubs - * - * Copyright (c) 2022, Google LLC - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "onboard_usb_hub.h" - -/* - * Use generic names, as the actual names might differ between hubs. If a new - * hub requires more than the currently supported supplies, add a new one here. - */ -static const char * const supply_names[] = { - "vdd", - "vdd2", -}; - -#define MAX_SUPPLIES ARRAY_SIZE(supply_names) - -static void onboard_hub_attach_usb_driver(struct work_struct *work); - -static struct usb_device_driver onboard_hub_usbdev_driver; -static DECLARE_WORK(attach_usb_driver_work, onboard_hub_attach_usb_driver); - -/************************** Platform driver **************************/ - -struct usbdev_node { - struct usb_device *udev; - struct list_head list; -}; - -struct onboard_hub { - struct regulator_bulk_data supplies[MAX_SUPPLIES]; - struct device *dev; - const struct onboard_hub_pdata *pdata; - struct gpio_desc *reset_gpio; - bool always_powered_in_suspend; - bool is_powered_on; - bool going_away; - struct list_head udev_list; - struct mutex lock; - struct clk *clk; -}; - -static int onboard_hub_power_on(struct onboard_hub *hub) -{ - int err; - - err = clk_prepare_enable(hub->clk); - if (err) { - dev_err(hub->dev, "failed to enable clock: %pe\n", ERR_PTR(err)); - return err; - } - - err = regulator_bulk_enable(hub->pdata->num_supplies, hub->supplies); - if (err) { - dev_err(hub->dev, "failed to enable supplies: %pe\n", ERR_PTR(err)); - return err; - } - - fsleep(hub->pdata->reset_us); - gpiod_set_value_cansleep(hub->reset_gpio, 0); - - hub->is_powered_on = true; - - return 0; -} - -static int onboard_hub_power_off(struct onboard_hub *hub) -{ - int err; - - gpiod_set_value_cansleep(hub->reset_gpio, 1); - - err = regulator_bulk_disable(hub->pdata->num_supplies, hub->supplies); - if (err) { - dev_err(hub->dev, "failed to disable supplies: %pe\n", ERR_PTR(err)); - return err; - } - - clk_disable_unprepare(hub->clk); - - hub->is_powered_on = false; - - return 0; -} - -static int __maybe_unused onboard_hub_suspend(struct device *dev) -{ - struct onboard_hub *hub = dev_get_drvdata(dev); - struct usbdev_node *node; - bool power_off = true; - - if (hub->always_powered_in_suspend) - return 0; - - mutex_lock(&hub->lock); - - list_for_each_entry(node, &hub->udev_list, list) { - if (!device_may_wakeup(node->udev->bus->controller)) - continue; - - if (usb_wakeup_enabled_descendants(node->udev)) { - power_off = false; - break; - } - } - - mutex_unlock(&hub->lock); - - if (!power_off) - return 0; - - return onboard_hub_power_off(hub); -} - -static int __maybe_unused onboard_hub_resume(struct device *dev) -{ - struct onboard_hub *hub = dev_get_drvdata(dev); - - if (hub->is_powered_on) - return 0; - - return onboard_hub_power_on(hub); -} - -static inline void get_udev_link_name(const struct usb_device *udev, char *buf, size_t size) -{ - snprintf(buf, size, "usb_dev.%s", dev_name(&udev->dev)); -} - -static int onboard_hub_add_usbdev(struct onboard_hub *hub, struct usb_device *udev) -{ - struct usbdev_node *node; - char link_name[64]; - int err; - - mutex_lock(&hub->lock); - - if (hub->going_away) { - err = -EINVAL; - goto error; - } - - node = kzalloc(sizeof(*node), GFP_KERNEL); - if (!node) { - err = -ENOMEM; - goto error; - } - - node->udev = udev; - - list_add(&node->list, &hub->udev_list); - - mutex_unlock(&hub->lock); - - get_udev_link_name(udev, link_name, sizeof(link_name)); - WARN_ON(sysfs_create_link(&hub->dev->kobj, &udev->dev.kobj, link_name)); - - return 0; - -error: - mutex_unlock(&hub->lock); - - return err; -} - -static void onboard_hub_remove_usbdev(struct onboard_hub *hub, const struct usb_device *udev) -{ - struct usbdev_node *node; - char link_name[64]; - - get_udev_link_name(udev, link_name, sizeof(link_name)); - sysfs_remove_link(&hub->dev->kobj, link_name); - - mutex_lock(&hub->lock); - - list_for_each_entry(node, &hub->udev_list, list) { - if (node->udev == udev) { - list_del(&node->list); - kfree(node); - break; - } - } - - mutex_unlock(&hub->lock); -} - -static ssize_t always_powered_in_suspend_show(struct device *dev, struct device_attribute *attr, - char *buf) -{ - const struct onboard_hub *hub = dev_get_drvdata(dev); - - return sysfs_emit(buf, "%d\n", hub->always_powered_in_suspend); -} - -static ssize_t always_powered_in_suspend_store(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct onboard_hub *hub = dev_get_drvdata(dev); - bool val; - int ret; - - ret = kstrtobool(buf, &val); - if (ret < 0) - return ret; - - hub->always_powered_in_suspend = val; - - return count; -} -static DEVICE_ATTR_RW(always_powered_in_suspend); - -static struct attribute *onboard_hub_attrs[] = { - &dev_attr_always_powered_in_suspend.attr, - NULL, -}; -ATTRIBUTE_GROUPS(onboard_hub); - -static void onboard_hub_attach_usb_driver(struct work_struct *work) -{ - int err; - - err = driver_attach(&onboard_hub_usbdev_driver.driver); - if (err) - pr_err("Failed to attach USB driver: %pe\n", ERR_PTR(err)); -} - -static int onboard_hub_probe(struct platform_device *pdev) -{ - struct device *dev = &pdev->dev; - struct onboard_hub *hub; - unsigned int i; - int err; - - hub = devm_kzalloc(dev, sizeof(*hub), GFP_KERNEL); - if (!hub) - return -ENOMEM; - - hub->pdata = device_get_match_data(&pdev->dev); - if (!hub->pdata) - return -EINVAL; - - if (hub->pdata->num_supplies > MAX_SUPPLIES) - return dev_err_probe(dev, -EINVAL, "max %zu supplies supported!\n", - MAX_SUPPLIES); - - for (i = 0; i < hub->pdata->num_supplies; i++) - hub->supplies[i].supply = supply_names[i]; - - err = devm_regulator_bulk_get(dev, hub->pdata->num_supplies, hub->supplies); - if (err) { - dev_err(dev, "Failed to get regulator supplies: %pe\n", ERR_PTR(err)); - return err; - } - - hub->clk = devm_clk_get_optional(dev, NULL); - if (IS_ERR(hub->clk)) - return dev_err_probe(dev, PTR_ERR(hub->clk), "failed to get clock\n"); - - hub->reset_gpio = devm_gpiod_get_optional(dev, "reset", - GPIOD_OUT_HIGH); - if (IS_ERR(hub->reset_gpio)) - return dev_err_probe(dev, PTR_ERR(hub->reset_gpio), "failed to get reset GPIO\n"); - - hub->dev = dev; - mutex_init(&hub->lock); - INIT_LIST_HEAD(&hub->udev_list); - - dev_set_drvdata(dev, hub); - - err = onboard_hub_power_on(hub); - if (err) - return err; - - /* - * The USB driver might have been detached from the USB devices by - * onboard_hub_remove() (e.g. through an 'unbind' by userspace), - * make sure to re-attach it if needed. - * - * This needs to be done deferred to avoid self-deadlocks on systems - * with nested onboard hubs. - */ - schedule_work(&attach_usb_driver_work); - - return 0; -} - -static void onboard_hub_remove(struct platform_device *pdev) -{ - struct onboard_hub *hub = dev_get_drvdata(&pdev->dev); - struct usbdev_node *node; - struct usb_device *udev; - - hub->going_away = true; - - mutex_lock(&hub->lock); - - /* unbind the USB devices to avoid dangling references to this device */ - while (!list_empty(&hub->udev_list)) { - node = list_first_entry(&hub->udev_list, struct usbdev_node, list); - udev = node->udev; - - /* - * Unbinding the driver will call onboard_hub_remove_usbdev(), - * which acquires hub->lock. We must release the lock first. - */ - get_device(&udev->dev); - mutex_unlock(&hub->lock); - device_release_driver(&udev->dev); - put_device(&udev->dev); - mutex_lock(&hub->lock); - } - - mutex_unlock(&hub->lock); - - onboard_hub_power_off(hub); -} - -MODULE_DEVICE_TABLE(of, onboard_hub_match); - -static const struct dev_pm_ops __maybe_unused onboard_hub_pm_ops = { - SET_LATE_SYSTEM_SLEEP_PM_OPS(onboard_hub_suspend, onboard_hub_resume) -}; - -static struct platform_driver onboard_hub_driver = { - .probe = onboard_hub_probe, - .remove_new = onboard_hub_remove, - - .driver = { - .name = "onboard-usb-hub", - .of_match_table = onboard_hub_match, - .pm = pm_ptr(&onboard_hub_pm_ops), - .dev_groups = onboard_hub_groups, - }, -}; - -/************************** USB driver **************************/ - -#define VENDOR_ID_CYPRESS 0x04b4 -#define VENDOR_ID_GENESYS 0x05e3 -#define VENDOR_ID_MICROCHIP 0x0424 -#define VENDOR_ID_REALTEK 0x0bda -#define VENDOR_ID_TI 0x0451 -#define VENDOR_ID_VIA 0x2109 - -/* - * Returns the onboard_hub platform device that is associated with the USB - * device passed as parameter. - */ -static struct onboard_hub *_find_onboard_hub(struct device *dev) -{ - struct platform_device *pdev; - struct device_node *np; - struct onboard_hub *hub; - - pdev = of_find_device_by_node(dev->of_node); - if (!pdev) { - np = of_parse_phandle(dev->of_node, "peer-hub", 0); - if (!np) { - dev_err(dev, "failed to find device node for peer hub\n"); - return ERR_PTR(-EINVAL); - } - - pdev = of_find_device_by_node(np); - of_node_put(np); - - if (!pdev) - return ERR_PTR(-ENODEV); - } - - hub = dev_get_drvdata(&pdev->dev); - put_device(&pdev->dev); - - /* - * The presence of drvdata ('hub') indicates that the platform driver - * finished probing. This handles the case where (conceivably) we could - * be running at the exact same time as the platform driver's probe. If - * we detect the race we request probe deferral and we'll come back and - * try again. - */ - if (!hub) - return ERR_PTR(-EPROBE_DEFER); - - return hub; -} - -static int onboard_hub_usbdev_probe(struct usb_device *udev) -{ - struct device *dev = &udev->dev; - struct onboard_hub *hub; - int err; - - /* ignore supported hubs without device tree node */ - if (!dev->of_node) - return -ENODEV; - - hub = _find_onboard_hub(dev); - if (IS_ERR(hub)) - return PTR_ERR(hub); - - dev_set_drvdata(dev, hub); - - err = onboard_hub_add_usbdev(hub, udev); - if (err) - return err; - - return 0; -} - -static void onboard_hub_usbdev_disconnect(struct usb_device *udev) -{ - struct onboard_hub *hub = dev_get_drvdata(&udev->dev); - - onboard_hub_remove_usbdev(hub, udev); -} - -static const struct usb_device_id onboard_hub_id_table[] = { - { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6504) }, /* CYUSB33{0,1,2}x/CYUSB230x 3.0 */ - { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6506) }, /* CYUSB33{0,1,2}x/CYUSB230x 2.0 */ - { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6570) }, /* CY7C6563x 2.0 */ - { USB_DEVICE(VENDOR_ID_GENESYS, 0x0608) }, /* Genesys Logic GL850G USB 2.0 */ - { USB_DEVICE(VENDOR_ID_GENESYS, 0x0610) }, /* Genesys Logic GL852G USB 2.0 */ - { USB_DEVICE(VENDOR_ID_GENESYS, 0x0620) }, /* Genesys Logic GL3523 USB 3.1 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2412) }, /* USB2412 USB 2.0 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2514) }, /* USB2514B USB 2.0 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2517) }, /* USB2517 USB 2.0 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2744) }, /* USB5744 USB 2.0 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x5744) }, /* USB5744 USB 3.0 */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x0411) }, /* RTS5411 USB 3.1 */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x5411) }, /* RTS5411 USB 2.1 */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x0414) }, /* RTS5414 USB 3.2 */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x5414) }, /* RTS5414 USB 2.1 */ - { USB_DEVICE(VENDOR_ID_TI, 0x8140) }, /* TI USB8041 3.0 */ - { USB_DEVICE(VENDOR_ID_TI, 0x8142) }, /* TI USB8041 2.0 */ - { USB_DEVICE(VENDOR_ID_VIA, 0x0817) }, /* VIA VL817 3.1 */ - { USB_DEVICE(VENDOR_ID_VIA, 0x2817) }, /* VIA VL817 2.0 */ - {} -}; -MODULE_DEVICE_TABLE(usb, onboard_hub_id_table); - -static struct usb_device_driver onboard_hub_usbdev_driver = { - .name = "onboard-usb-hub", - .probe = onboard_hub_usbdev_probe, - .disconnect = onboard_hub_usbdev_disconnect, - .generic_subclass = 1, - .supports_autosuspend = 1, - .id_table = onboard_hub_id_table, -}; - -static int __init onboard_hub_init(void) -{ - int ret; - - ret = usb_register_device_driver(&onboard_hub_usbdev_driver, THIS_MODULE); - if (ret) - return ret; - - ret = platform_driver_register(&onboard_hub_driver); - if (ret) - usb_deregister_device_driver(&onboard_hub_usbdev_driver); - - return ret; -} -module_init(onboard_hub_init); - -static void __exit onboard_hub_exit(void) -{ - usb_deregister_device_driver(&onboard_hub_usbdev_driver); - platform_driver_unregister(&onboard_hub_driver); - - cancel_work_sync(&attach_usb_driver_work); -} -module_exit(onboard_hub_exit); - -MODULE_AUTHOR("Matthias Kaehlcke "); -MODULE_DESCRIPTION("Driver for discrete onboard USB hubs"); -MODULE_LICENSE("GPL v2"); diff --git a/include/linux/usb/onboard_dev.h b/include/linux/usb/onboard_dev.h new file mode 100644 index 000000000000..b79db6d193c8 --- /dev/null +++ b/include/linux/usb/onboard_dev.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef __LINUX_USB_ONBOARD_DEV_H +#define __LINUX_USB_ONBOARD_DEV_H + +struct usb_device; +struct list_head; + +#if IS_ENABLED(CONFIG_USB_ONBOARD_DEV) +void onboard_dev_create_pdevs(struct usb_device *parent_dev, struct list_head *pdev_list); +void onboard_dev_destroy_pdevs(struct list_head *pdev_list); +#else +static inline void onboard_dev_create_pdevs(struct usb_device *parent_dev, + struct list_head *pdev_list) {} +static inline void onboard_dev_destroy_pdevs(struct list_head *pdev_list) {} +#endif + +#endif /* __LINUX_USB_ONBOARD_DEV_H */ diff --git a/include/linux/usb/onboard_hub.h b/include/linux/usb/onboard_hub.h deleted file mode 100644 index d9373230556e..000000000000 --- a/include/linux/usb/onboard_hub.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ - -#ifndef __LINUX_USB_ONBOARD_HUB_H -#define __LINUX_USB_ONBOARD_HUB_H - -struct usb_device; -struct list_head; - -#if IS_ENABLED(CONFIG_USB_ONBOARD_HUB) -void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *pdev_list); -void onboard_hub_destroy_pdevs(struct list_head *pdev_list); -#else -static inline void onboard_hub_create_pdevs(struct usb_device *parent_hub, - struct list_head *pdev_list) {} -static inline void onboard_hub_destroy_pdevs(struct list_head *pdev_list) {} -#endif - -#endif /* __LINUX_USB_ONBOARD_HUB_H */ From patchwork Tue Feb 20 14:05:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13564058 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2116.outbound.protection.outlook.com [40.107.22.116]) (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 DA1E56BFA6; Tue, 20 Feb 2024 14:06:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.116 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437962; cv=fail; b=EkPPHcoWvO9Q5i0Sm5i83DFF/S419peQh5+OdsIfUS7JOLC1ZuC+9hxUTIImtEpJ2aYbqCxo4sksC0mUbZ4ww2ZazLGg8Rrzjbcp/26ViA+6gxULskY3ezxw+2wL0tIbci0dYDEo8UTwQSV87EFFgv+bwa3Thn40kmh5ahm2FU4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437962; c=relaxed/simple; bh=gMWA9iiw4gWjTtXoY5mpyTAT8kscTCPedXSh5GS03x0=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=APPFqUycKLDJPRqTyGfDigt2WoKeg9QI4rkqmojO04N8eZd38J8qmIlKhN5+Pp0fpxKsquvv7rlwB9KVc57PxaFVXGdToEPfzotMnNaRl31KSJIAD62hP4db4MgOR5knqhJ33G0+jT8pIHMhKk4q6oflkTOBNxFNBMcyQsw5UgY= 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=lQi5YSTV; arc=fail smtp.client-ip=40.107.22.116 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="lQi5YSTV" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lOmXZPMRVBhUXisYMTKCFklsXpqNdkf4c9duEkt+On4AAkI/ohsffXfbGEkIEFBgOr4dHu2GMpDsvVzaKlOIaLBfH8ATquCx2E/SxC+sIKwnyeYEdal/9BEhro0J3e2EtxmuQnQyz7aPH/+vthtOFL/+++8yYmpCj53/FXo6ueU90NLphlpotUTPmQLYkSXZzNxaju9fkMVc/25+ZxBfXoPt18lTv1+XTalDTCZEYixEuT+3UZw1tH/E793hLzrm117V8x9aj2QKsU4Sa/IBO32tw2+iehqv0oxMLHF/1P9Z0F+nkHXGLjnitjetXO/g4ejcZ6hWFHK0aUUbHIqW4Q== 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=hx4YfCu/A6IjPi6V+uhUigfsBHtiz8SORKkkQs9tvJw=; b=TO3mTAeiIhKvwCHzSlet+asWI3BK+wjghfpTlk4pSklMmyy6B0AGmGuLPf1Jm6+jidDIxeNp3ZuEiNO0ZFhjZJ4KDmC8KSFl1EXpf9UJYJpQy5XBdKXj7gW3Rc802cCR0iGpsE1md0VjiqCt6JEhsnot+4hUFPAtWqKHe/uF9i501O8aKjRH/o+bEZEVkGbk3FYadsQ1WAxWnDxADAc5Tj67bqo3aTbT/qLxcN1aDKKkWcYwaQnHOQ/rQxNwf6Ctxp8ZDKOfuUqqsOpPurfsE+cpaRzHnWjxJvzaIzw3cXUVYukexeNuUnAQVzhF+LnE7f5R0ApNxcG2GPxUP/+zoQ== 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=hx4YfCu/A6IjPi6V+uhUigfsBHtiz8SORKkkQs9tvJw=; b=lQi5YSTVYUOP6X1ntvs8OBJFBNi0BWUtkmMjS1qarH0AtQYeEHC/XIN7PbebNnYPvtuggd7gvU1rXVis2WyrlD1bweDVZcJlhen4Nna3i2bLiRHsKuXOrkQD5z8OQao7iPSh8AeD2Yqf8icAMnosANpY9wcv8jWfjS18AL9nBV0= 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:53 +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:53 +0000 From: Javier Carrasco Date: Tue, 20 Feb 2024 15:05:46 +0100 Subject: [PATCH v4 2/8] usb: misc: onboard_dev: add support for non-hub devices Message-Id: <20240220-onboard_xvf3500-v4-2-dc1617cc5dd4@wolfvision.net> References: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> In-Reply-To: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> 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 X-Mailer: b4 0.14-dev-8b532 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708437949; l=2655; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=gMWA9iiw4gWjTtXoY5mpyTAT8kscTCPedXSh5GS03x0=; b=AudUlCiKCPMauOKYrf8iJScAE9iGk2afLGNmodFqXJ3ThlDTcPoG4vTzl80gZlQq9MZdI3Ifx e7N4KiOhc9vBqZj6UxuuOPcjYhrSni6Ayz2/7KD7yFVQHVCsBgqwmQl 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) 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_|PR3PR08MB5577:EE_ X-MS-Office365-Filtering-Correlation-Id: d7934c8c-e1be-44cf-0bb6-08dc321d0cfc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r6aRTq4/TY9JVHo8XoLCFNQxlRDEodMz5tN+rNm2mJ4WN/5hWren5vYzi8eEXmNoH40j0UVDH29KUvuoy/2RbEItqEPKGVswLV7QVkJlINuC447ZbDZnvpJSmFopj58kibj4w+udC2dyk4SgLs6W9Nv68unsoCmJE+SpFUBzQtVttKN6U6Zm5fTIEJF3Dy7nWzwYu0Tz3OA6WrwhCzPj1gChGOSIsLuta+drwwNY5GgJkekhe7peRbi8pModHN9G53p4VK2ZViQnJBEU73fVcDzzdhuzJGjve80haTDS7xDiZAUdjX11rWwpy1BcfBvUdhlgtTUBdWHmExCykYBL+pBVh6SiEKDRZzlgHmrnDBDbtzyxVcLEcwt+Aa6uQXp/BqRHWsY3xGeTIecM09007Xy+uxR28cC5R13NyzG/M/JNreJimoi1OPEzIaPufMlXwQIFX02a7KFL2bqie5L9kzbVSDQDDjSQW0EdX4G0CsViPlpQtIan+snhtfpB99IkLuqbsc5OzODLWkNeZ1P4bU0DasheI3lcX641ypeQisjrCNChsvBjg2eCgwma3mliP307onM5UOrh/F8KkroFr+cSGYbVUbf/STQgIHKZ2edDswk8q3R4VIaspCnm1uiX 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?onQ0hatDLSXJCtNEd9OjPe1bV1oq?= =?utf-8?q?LED3o7re014sGXRFhI37D7crCg6CKGSLcaGbLzVxeaXf3U5Of8KFBRWtJmgSmDFwn?= =?utf-8?q?8gJ/faEbGcFEstM3bQpA6sbI4SjfL5xoWVUd/yLG49ha6gbjsdKDZCZJtJVMQRWWn?= =?utf-8?q?GduY6FlaO028P7gy10IIhjvA6bS4dciQXPg3x16xyoc6y4b43VDeio3a+v3OMlgo9?= =?utf-8?q?RkYJVFGxLswVHggpyU834gHhKaBkvywig4ksGqWuKDl87U3AagfnnEyJMcmZh5tde?= =?utf-8?q?nW/Nd5Fq6NsAEeK4g5BuWLTfsZgdMbYjIKTKimmW8eLiLlv8yHYC36j+K9cIRyYzO?= =?utf-8?q?617nP/1sjxg045Hi5StKELeeEgCV5X4rh9QD7UORTEH6IfIRmzeIltnBzxg8Ja55W?= =?utf-8?q?nqoeldvNuCBY9rTVdpjJeIIHPDnSwD+7hT4PQjl8PP+FN/BuS1qW5gVBt9Vtgf5M+?= =?utf-8?q?AjCFNnPhZWDOLo877bDRzLBLK92ZJv3iBElSrf3GjKlSL3KiqghbW0U6HzMqpP3wK?= =?utf-8?q?civvg7q/SlKcsMCSMhsk5bcKO6OoW5RoVP+pwIi/fFRwzLOClGUfT1dLnWihLJrrt?= =?utf-8?q?EqFjnBgvhAnDKBHmvNIqc89AZhwoGKjNV+GYfKcQ4TdthhEq1uPYGflokjStu/W0x?= =?utf-8?q?iRvPovC00wB2xsLSLAMKJoxog9hqAVFPKlH5E3uUtJdQQXwAyYfmRoyC0poqFsuko?= =?utf-8?q?aYlK6+PPLDe87pLTW44/StDkgysdEHlOxG42PWA0uzacbbITje0hyJU6j0KaJjEGz?= =?utf-8?q?HKAYbTBg2XgJsG+UIcvdCpp9Qt7Hz3fqWmLnPl98DnsrUnoJAc25YiTiKqZiIeOMd?= =?utf-8?q?Pgmp0oWZoFEcaUT0/pIZk2ILitni48byqMocJqbkapkYvp4ddTxJE2qgsF98vKIBz?= =?utf-8?q?/TQHsTE5FZTmuKdEG2kkWBbcJ6z6BsOyLBxk0aq9nbtY88ngDvrhpRJ7zGFBgJVE6?= =?utf-8?q?V4ghB4hOeuCvOjNGppRZpPcTa/pxUYcDGZKnOsno7qwF0qKbIcueuXPb1AAoVWdRa?= =?utf-8?q?VKeGv6X9fVbUeUi9cIeI0IUX3MfPOcjYeKISHrjPwJTLFTfwwqRl4lrIMPzxZuE+m?= =?utf-8?q?5qKYurdPOCE+nWjvNBziMpRwR/M0/4Lqh3XmyYnXVwHDH3+yZkW1xeKjAEADuPhVc?= =?utf-8?q?4D3X/FaFFe+Z1AF4YCa0dLQs1b2yD/cMiG1DG0Ila5uvjndykO0KpUq2v+7z5S88d?= =?utf-8?q?KpM9k+DVP2yIzZqAIRFT1iE16KziHhwtLhVyeMuUELfrWfVYdyvxdT3VpCXHRAlOd?= =?utf-8?q?m7SpZVYuWBozRPMQo+assv4rVMknYncfV/A5wVcnxZ272Srd6Hyw5xrlOglWtHnwG?= =?utf-8?q?S74zerm3CY+GXMrAtcqjXwelCIT0tJkCa+qWuu5LGBDut3rTWDquk/p9FsckyupN9?= =?utf-8?q?8CnqMzC9hjzAcDPrATtjIQSpJ0PuiOZA5U/JbQEPPuSd01zSNcd9Pf5kbRNgRjwaj?= =?utf-8?q?HD2nWkCm/6bCO544z8ltABRHzvbJfHSiFDquT7VUauU4CRDsU6S/XMULbVlcxvsNr?= =?utf-8?q?xWLG8u3mI4/wiSoivVBxEU9Y/ZBQ6VeFq8Q9tWBlssvuR4tLhUM0dQo=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: d7934c8c-e1be-44cf-0bb6-08dc321d0cfc 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:53.4092 (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: CNEjTGxetI51RtL/aJ8DejDSGPv8LacTvfODENzgmlRYMidrwxyE4BRgYVEf0vZt/VF11pLlMmc2nZEkzpBDvSsa2t5j5VusN4b1N/JlhW4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5577 Most of the functionality this driver provides can be used by non-hub devices as well. To account for the hub-specific code, add a flag to the device data structure and check its value for hub-specific code. Signed-off-by: Javier Carrasco --- drivers/usb/misc/onboard_usb_dev.c | 3 ++- drivers/usb/misc/onboard_usb_dev.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c index 2103af2cb2a6..f43130a6786f 100644 --- a/drivers/usb/misc/onboard_usb_dev.c +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -129,7 +129,8 @@ static int __maybe_unused onboard_dev_suspend(struct device *dev) if (!device_may_wakeup(node->udev->bus->controller)) continue; - if (usb_wakeup_enabled_descendants(node->udev)) { + if (usb_wakeup_enabled_descendants(node->udev) || + !onboard_dev->pdata->is_hub) { power_off = false; break; } diff --git a/drivers/usb/misc/onboard_usb_dev.h b/drivers/usb/misc/onboard_usb_dev.h index f13d11a84371..ebe83e19d818 100644 --- a/drivers/usb/misc/onboard_usb_dev.h +++ b/drivers/usb/misc/onboard_usb_dev.h @@ -9,51 +9,61 @@ struct onboard_dev_pdata { unsigned long reset_us; /* reset pulse width in us */ unsigned int num_supplies; /* number of supplies */ + bool is_hub; }; static const struct onboard_dev_pdata microchip_usb424_data = { .reset_us = 1, .num_supplies = 1, + .is_hub = true, }; static const struct onboard_dev_pdata microchip_usb5744_data = { .reset_us = 0, .num_supplies = 2, + .is_hub = true, }; static const struct onboard_dev_pdata realtek_rts5411_data = { .reset_us = 0, .num_supplies = 1, + .is_hub = true, }; static const struct onboard_dev_pdata ti_tusb8041_data = { .reset_us = 3000, .num_supplies = 1, + .is_hub = true, }; static const struct onboard_dev_pdata cypress_hx3_data = { .reset_us = 10000, .num_supplies = 2, + .is_hub = true, }; static const struct onboard_dev_pdata cypress_hx2vl_data = { .reset_us = 1, .num_supplies = 1, + .is_hub = true, }; static const struct onboard_dev_pdata genesys_gl850g_data = { .reset_us = 3, .num_supplies = 1, + .is_hub = true, }; static const struct onboard_dev_pdata genesys_gl852g_data = { .reset_us = 50, .num_supplies = 1, + .is_hub = true, }; static const struct onboard_dev_pdata vialab_vl817_data = { .reset_us = 10, .num_supplies = 1, + .is_hub = true, }; static const struct of_device_id onboard_dev_match[] = { From patchwork Tue Feb 20 14:05:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13564060 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2138.outbound.protection.outlook.com [40.107.22.138]) (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 3CA1A6F50D; Tue, 20 Feb 2024 14:06:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.138 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437967; cv=fail; b=ttgJykN33d5TW2nn+qWSOnGGGz7sbnmHQTHn0igHrm4N3WQ8eMQNudT6IFugMi3du0XQ+wgd99z1Mjj4NEhuBHRkC/0FOhxC2TVKh37u2p7kdfML/jjDsKrg82Pbf7cE+GPMYEyMnXKrRecTHv+T9jhB4Bv9MjVMe6yerW+P+ME= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437967; c=relaxed/simple; bh=6Ht5ynmIJIX21g9C4JpOADohFLbwFWj8jYgr/isAV+M=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=MCoG+iJ5tCNe+g8aEFH8DCdEUQuTrL2+aLIvnInwk8/tBmmtFUA/hZGKTDZS4vD03QA3dcmYD6uNqrFDM72oyPwdBuXmpLqOUNCSiZTNC5cW6ls+kycxs0cbAq7D+2PctmPMmLQhcq+bd7pxgBHAdbxKKZcH0znyAcEeiNgZPAE= 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=H3GGYXZz; arc=fail smtp.client-ip=40.107.22.138 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="H3GGYXZz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gwJUXqCJwGArrQkJvswf2zJM4ddHct6L2mmu1f10CcVak7yK7jtTUXx9b7DTY7rmJEvNFFv/XQQjL6FAOokwyZdb9AH11YIS6DoO2VKdGq6qUjvOemruBzx7aJnNzn+4gGSkNaYDaaQKN6nnP0SC3w8kocyKiolgt4sKTWoCybYYUUqjQkgzz/MhCTyiwuOyK1MiPd75Y73CoPJWG0gSvLyT5MNWyF61cxu4LQGV9YEm1QAei2ovMHgBSOhM1E2OrMpnyYEQGL2egnJFpdSy2qcSs3paJrOVVsSCY+OOzn1wFuEMWJrV16RHYTqGIna3zSAuzScCDBjGKh/ubEz8Mw== 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=C2fcPywiN44+BPGaXpHzkDdxp4Z9BT1tDuUyT0+2Jyk=; b=P8nGd9qh3dYgCDu/SkIL44S+I3F0q/su367bWgfiTh8MYF+69JL3gj2Qgyg4+YA6fZ2Aroj7WY6aeZ/Q5FhX7qQmI9hAUpxpp0bgHLm7P9hwKwY4fG5hX6UOj7zkPucwK3Y6IHC0geVQAHiBq/uGBV0y6yujeKH5odsyVchLPaCka5Q90YYeI1Xd8QMKWb74vEhfQRjQTLvUBJ81oIN7kyw3P0g/zy8L74C/DW+sCPtz5O6nK94EQg+DcY6x6rxjouPnnx9x2Q9jY5dhPqXLzktTwkdQxzcIYuEYUA6/OiM6JRRforpZ4532XV4nl9VnRGti5pakn+ydCdQcUylbnA== 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=C2fcPywiN44+BPGaXpHzkDdxp4Z9BT1tDuUyT0+2Jyk=; b=H3GGYXZzseuvxrdMKPk8hGbccRhFm8naRft0PJb9PUIPHvM5d9t8mUP4KiEC4fADTy27iNgJNPzh0Pblk7skwr+qvnwxHjEqt5Oae6affgt/vFEAHkwMGbT3eIenFJBku7FBjD1eorE7JTTTA0udjG56YScsCDZFgQ67WU8ZhaQ= 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:54 +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:54 +0000 From: Javier Carrasco Date: Tue, 20 Feb 2024 15:05:47 +0100 Subject: [PATCH v4 3/8] drm: ci: arm64.config: update ONBOARD_USB_HUB to ONBOARD_USB_DEV Message-Id: <20240220-onboard_xvf3500-v4-3-dc1617cc5dd4@wolfvision.net> References: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> In-Reply-To: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> 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 X-Mailer: b4 0.14-dev-8b532 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708437949; l=1001; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=6Ht5ynmIJIX21g9C4JpOADohFLbwFWj8jYgr/isAV+M=; b=OmCZA6Ger2HI0w5q9rl900pKLlvS239auOHjR8NKqYOb987A1wOyH2RsZqohFP0HPFOeyGytu 5pxnWf0zZGPDNGAuen/VkAoPmL5j1tkD8lnurS+uKollQqWEYOx5zvZ 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) 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_|PR3PR08MB5577:EE_ X-MS-Office365-Filtering-Correlation-Id: 11233766-96cf-45a3-9243-08dc321d0dae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hA08wHFYwKSPZCnFjBXVzsqh6Ng0ULxWm/WAFNg3kxYgtT/2wRl8vWN3GnB7ytU2nLA0KqFzH19pvnbyBuxucMliQPgmjsCUNZ/k9NdPh/OJrtFJxx16SmB+XIBRsaMdgIUoruBX1GmoWmenXng8QEhzSX4IjmH43P8C9h7aXDtOIEck/rw3T/7Y3YD/E0N62+6ukP1MiIfaPWcb/rGw7tJxnwQkOhOIE5flGAoLK4jt4KQB5/4JyOYxMaA70OjFfTKjIAb4TySLDCKyzqMvTXqApx831E3+t5CLp4BR9ojPrsB9rCcoS1wIN48CchUnlYz0rDalTkoMpdfgSgB/dyK4Z7eyU/SpTWl8OZSoTUHrEwTpVjaPPLoPFecdjdnqXBwPlLaMNF8jLLG8Z6BQd12r8mvRdl46eBD+NBAZ964UO4paPoFoZc1BVt1cgeJ503gHm6bobi7G2tNb+ux1yUh2gYAFzYCrXczZAVTQ3T6JIawCrnNxbaMFr6LAObmT7cN448xkeiIMytlD1NWaZKEHoGP4Tk+MCqb6lLl3zJ3TrUI83JWqUvV08vBaJZUUjfpMWVj7eom/0E07efEE+p+WzKHka+OfHu/jliZ6VO3R2wqL/sUoQ+hhSmkvitkdLwTkZkWePs2sFQifs8kZcg== 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?UhIOLVMY3PJ82WpFALFp5ncBEgTM?= =?utf-8?q?4QRJCqfOSB3XtCuDSkV8KJRjqEGRbiQUsT2ZyuU0B7ri7b+ww7BHxxyFqYzaZKZv2?= =?utf-8?q?JUPKKv0OLVcwcesvmKtdmZtWulZ5E/CNE58eiETFoFdD++8USFMM0NmEJo6um3vys?= =?utf-8?q?6wA5tIshyTmIaGgIxHIJe6OpCq9ELQlrtIeSFJ4s0oc/UMNy+n5A5ODiX70awlmMw?= =?utf-8?q?52bbQoB6EEETBLzPpYVGmL7BITAIUtA3N15xkTcWg/5+ceoSaqDrVyvhxUiv1iMQA?= =?utf-8?q?RYAsgom2fRJDoXKU1aFL0V8mL4vkxRI3RF/20C386MzK+BseYh0P7EiqqVYFW6SJT?= =?utf-8?q?Ir8PLWgddyDl4A6UqLDVCVoWkR/xRviUfNzBX2kKQN3UorZG1zDX4689wVMxPQ71z?= =?utf-8?q?leYO2ZWnUxjgaFRSSlp+N/EtppjesObGPveQWII/aONKB1Re1RBSOkWKaGo8xWlLF?= =?utf-8?q?8HjcFS6zL5GwxXSg3T2/oJVBdj7iDPB2rzObbr0kmvs9kt1PpGlwAZF/PcNxt1Bwn?= =?utf-8?q?cH4pQtC+b9ABDrYNqhO5DSlh3Fw3zvvVsiLCOGuZUVW8Cdi6JjYdqud2Evk4uHzxS?= =?utf-8?q?rENHSzKYknvOoWM5uAnNIbUxE/+2L/n5/KbM0ndRq5g3/ullxJGEFDZXK4Agv95Zc?= =?utf-8?q?VzoTTozLb5M2ahYCh5OHRjCfTXwjm8fy7eeWBGktAWIvx7js95X47qYuGPxL02kcG?= =?utf-8?q?+8f5YqL98UrAC9M8tvtFswKxnMsipTCDqCGRiVo0AReQ1+TR8zbQ8ukmOIXVFiGee?= =?utf-8?q?3btjUEtHlzhY1dKl4JvJH3m55nx9lv2KLW+HoECRbksyLDxEI0RYkngDiuSDGh2sW?= =?utf-8?q?Neu2yDXvfd3aYj+8umcosxCUD9bYuYeaBThMwuZ5bwONvW7A4TB7JISNAlW12QvOm?= =?utf-8?q?vB5tDopXwc4fW1oFpnpHT4rDMQAmJuEZyTf/OvOdDclC6h9XcTvqXvA5jr6O6U7/i?= =?utf-8?q?dnx6S5P3FTL8H6V7UXyPMxEp0Xg3u94Fct+EZb4vZatHAx1in+MTBslh8xadw2HOm?= =?utf-8?q?Cur08Hq2517U0YyHdSXwaCslk7GmoX6c9hAo2kaKAcytJP1rdb6v5qfUM1qKK+WqZ?= =?utf-8?q?6ZVGvYVRNs/4Dz2OVu/dzsaWwYORVdx72rOgkC4eSmlRvpDO4TzIfbq3+sCkr2yml?= =?utf-8?q?cFSWBJVqRMSZb8o7p7NFqHOtLTYVtn55ilWGpMyyHWF4OpGws5UaUbcu+kOiL0Ehs?= =?utf-8?q?djp4FMwHWhz3VSTZdZ/+JenA3GEtyTualysGf2W7d4mvmBCYls0cBFwXOdP15/59p?= =?utf-8?q?WDukl/+iLntQI69VVLGSZQ140POffcdTaB7jRc5mK+a3wef7gajD/d+ePMozDvSZo?= =?utf-8?q?LzDz+qAqsLlV+d3kysaoEY2s/byEkDx8XsCNhM4ESTecdPg00KVpt/FOWr0+2MH4x?= =?utf-8?q?bHwwhYBTlC1TXi3BfqxsCqrdgZbhx77ip73Hd4/zw3FTd+MOm3bikgQvmASYXyqjD?= =?utf-8?q?Gs4NYBQruKdD5quqvhRMTpSXGTVPz7E7J+1NBsSDY+ewN67zADlGMC7wLrBPK0yz7?= =?utf-8?q?DlklZcEl99xlnpXMoE95wstFXvWn6JEvWCvmn+fJwnbO+GdYSSHyPXI=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 11233766-96cf-45a3-9243-08dc321d0dae 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:54.5740 (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: Q2lvR1SCb8FXle4F4kG1PcWNZWw4pEdSRO0TE4mlz/GnxXb/Ks3NRjDPUObx+ByG5AvL9oKE1Bt5oEYzTfcNzp/bADHo+v8WRMy3dubQdVk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5577 The onboard_usb_hub driver has been updated to support non-hub devices, which has led to some renaming. Update to the new name (ONBOARD_USB_DEV) accordingly. Signed-off-by: Javier Carrasco Acked-by: Helen Koike --- drivers/gpu/drm/ci/arm64.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ci/arm64.config b/drivers/gpu/drm/ci/arm64.config index 8dbce9919a57..4140303d6260 100644 --- a/drivers/gpu/drm/ci/arm64.config +++ b/drivers/gpu/drm/ci/arm64.config @@ -87,7 +87,7 @@ CONFIG_DRM_PARADE_PS8640=y CONFIG_DRM_LONTIUM_LT9611UXC=y CONFIG_PHY_QCOM_USB_HS=y CONFIG_QCOM_GPI_DMA=y -CONFIG_USB_ONBOARD_HUB=y +CONFIG_USB_ONBOARD_DEV=y CONFIG_NVMEM_QCOM_QFPROM=y CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2=y @@ -97,7 +97,7 @@ CONFIG_USB_RTL8152=y # db820c ethernet CONFIG_ATL1C=y # Chromebooks ethernet -CONFIG_USB_ONBOARD_HUB=y +CONFIG_USB_ONBOARD_DEV=y # 888 HDK ethernet CONFIG_USB_LAN78XX=y From patchwork Tue Feb 20 14:05:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13564059 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2116.outbound.protection.outlook.com [40.107.22.116]) (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 22E766D1D8; Tue, 20 Feb 2024 14:06:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.116 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437965; cv=fail; b=SivhKTa/fzMsONAE88NnTCUCvgmPdrXBI+DTVuMM0N/RA/hKijTmwcCO7ndPKbPzUsAJHA6lrXVRKFFqj3yrvFD9efsSL2ndthKoSaTFCgLgbxrr9HRWlyjRdD0t9EQYrSt5eMlZxX0gEy/5Gn7qG95kZfib3+lMThpL96qTDT4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437965; c=relaxed/simple; bh=Hn7W5NquFOfa2SPwHz+COI8OES/VcCwNF5nc43UmJR0=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=ENZimtNgNSnx0gj/01LxMSQB3Uo/sBoUjBhjpf3h9l8N/HPMrQd70YCM9CElyoqyoM5o2WDrA8DESwQpaYfANspv2yv3lVBPoBDYTqLPgy8rbbXZaBiYXLgmm1Y96bDg6wMhX4JfoS7lzh5p3p3o2skcD0SpWrQ5X4hhuEIsJcQ= 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=PVtXVViM; arc=fail smtp.client-ip=40.107.22.116 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="PVtXVViM" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FLvdj3nQyD8iFAbzRsABDxFzzXMrO/gcC5VWQuaFWEQrmgz8KjDIwlmFmZ+Ba6oeuFzJ9iJsYXZZA9osJ1qjlR4wFxuDyCW8fb327Ky4V3NMDeRJmvJbeIq6VF1y9H6/Luz2LEokUyvIikGdZoOGwp81uwnaO1VZ7+CLnuAOi1SONJN2YS5BL2a+G9SoiQOcg1uR0SkGGD8j4fQTjLqUYfpKkHjaxKo7O5EbU9z07yQeStnLkWQdjQpO/UeuZQczCTVmE0sgKzvqFBfZuPkI/21Q569ex/d4tCf0e4Ji36af/nzjP1WCfMRVxehnF2K886ptut+1Kdlh7Tp01fYPAg== 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=jbaOGiQnqMim73n95NNuOUW1VNxYpJ3bWE0RQMANOTk=; b=aeoPRI20xW3t+Na+oE5sLW4IdOc6AWvq89xU3TYl+xgWrcgMf44u/DUiNBzkHTYa/9JQvUlgJtUY+JxbTUXk/5f0/iz85YzWBOlGuPZMS3CXGU9q8ca79qtT+QwagXmyOnLS2H17l6qYE8SDtoPCOl2hg3e3SIbgg9BPDdv/GJcw9fX8MJBLTlY93FjU9VAgnAs4jTwP4wVEM5qgjb47m4Ii8vJ5nw2KeeFHfeHAeuSsc+F6raHXFjaeMOtyQQVbfZlgj9cbgKyhDbe9O9HuWi47ZMAr+tektuCvzVHnLGkGaY6zuDAmxGmpGEPphpDKXQxlFtWhF/UD7qAe0Y5e/g== 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=jbaOGiQnqMim73n95NNuOUW1VNxYpJ3bWE0RQMANOTk=; b=PVtXVViMh8dATpgAUUfRXEPB9uUGIhfoQW+k69lsinavyiP/iF920qBIYBcTjI6U22/c2UgXitLp7pAG+ecagyE8qceCocMV4NU6wvTHHGMiV8u+Dk6SXwFZU1QyDljVkWW1SGSFJtp9yNCZDApLFL1kr05hk0Af5QFoQQRem3A= 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:55 +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:55 +0000 From: Javier Carrasco Date: Tue, 20 Feb 2024 15:05:48 +0100 Subject: [PATCH v4 4/8] arm64: defconfig: update ONBOARD_USB_HUB to ONBOARD_USB_DEV Message-Id: <20240220-onboard_xvf3500-v4-4-dc1617cc5dd4@wolfvision.net> References: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> In-Reply-To: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> 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 X-Mailer: b4 0.14-dev-8b532 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708437949; l=792; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=Hn7W5NquFOfa2SPwHz+COI8OES/VcCwNF5nc43UmJR0=; b=OPPzzjhHtWj8Z532+WD3LepV7vfoXgmKh44+nlOQTl7f1AHjxSCPVkKSVMpiNR5G1WH8zz6p5 lRf7yfTskxYBGnLwYcAKV7QGW/UMy5+xTSvkhadHSpevZtfrgGw8H7A 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) 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_|PR3PR08MB5577:EE_ X-MS-Office365-Filtering-Correlation-Id: d998ea84-2f3c-404b-cb58-08dc321d0e5a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 199F83Dh5NRulhc2yOF2JBJPqbCjr7stuUvCYh5Fpp2aOq3jBAG9JQoZ3dx1kXRnVZkudCKCpZxxiQQsS0uVXMeludpRfviu7XSUX82+MjaPmjzi38wTflXDBPKCsa6+Cq8Hru/K8Ka2zOTrUR5ktf8Pno51FKu/TJCEbiFbk98TJVu8LAU2pSRKDm+3clVj9DkiDgvvHKy2uoO4WsxXUGd/6C+kOj+tzxhaSKVyRkic1k2iD2PMIy60x2AqOCPAPXO/2YZhazY319NVFJyKj5ulRxjUrolxNY2ssMKeDx9ZkOiMTs/OrL1adhsQBzIpIpQpJzATh5JBs8OyEjixcDGDSVqogCjoZvZSKMxlqa42Pv0RMplhE3uyIpDCPQAeg2VcOAvU/ggOJQCClMPMVCfGtAKtmfNTBR700tNLuDC+Kvwue+EbvG7SLlOqQtMojU+cgegfYAFXqi5B8nH1ro/gbUah2qyr+iDYuLi8KLjj4XaC83PZ/NwSjucUPw79c8EmXuv8frWKx0mmOg51KijN3BOHeKqbKczTUImXs6stK6b5qoL/91PfnVhfN65JbBsnQ0ZpmhP0YJbzNggJMbv1mRMSCrtxMcamEtNijyTDNO65+XGu4A5wiY9tOM5ePmA4Y7x2k2pDUn4EQZAzSw== 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?oIL/BXlYhM9x5U0SxbaZ6fuazUDI?= =?utf-8?q?hCXQpnWl+2ChwYHdVkRKNNaXzZ/COB9sZG5ZFQuUDcjnyFWf/qtycUttYhS27raeS?= =?utf-8?q?gIT24JKNczLL5cncm4OhuqMgbJZs0CFWNIINhNwZ+p7JxuZvO7u3Mu/bZizLoh5AJ?= =?utf-8?q?MoSUkpuyRjOJ5E8BhX30VlYV2BgziuFZapiom+4cuz8QiGYEcGaY/9N4ywNf5PIYI?= =?utf-8?q?0xLNeG8//Jg1jifUfbznMRQGMpQx3kFWbcQwVyze860+xp4EFyDYpeRUy/syZ9iRi?= =?utf-8?q?7as5ypimNxXxLHHMeF0quxTzR1C1KEx0YjMcvFzXJ5gyhopauQcG94bs0+GFEo/NO?= =?utf-8?q?vtCrIxyNOl9VSSS0+60/CwAHgODlHAXrJgx1eCIcmiV9sDBQZlYUXrurv+Vo1be8+?= =?utf-8?q?VWXAuH2itcWlJvXHhorLKUFjK2mXOaBBNXVDOo2EW7ZNK60sc+fGBVkQYm1dzqsOk?= =?utf-8?q?Xgy2QoY8DlTYvOSfE5khiDA+ZEXNk0qjGp6san0EAnm3JaUU6XJQ3iJnQ3x7bO9i6?= =?utf-8?q?RXFX7IKk4iPr1AiE3QOMOufyF5R7Q2075S3RRBfKP7gdpjvtA/a+vq/ssjX4Gv12f?= =?utf-8?q?KgVjZ6hH/4OKfExboOgbybRxTb17LMWW/mJ5PX8tV4+8TTrt1uvxGCa9XHBjC7F8l?= =?utf-8?q?HsBvwOIt9AOfAhUZEPzqCKpa0uo9CbukCMpHxr6UFixoDTOtc4IzDsvPVFbGVTpCR?= =?utf-8?q?9bEEAzS5ZhCB6A73NR8+iL0D7G0AxPfJOIJOKanpMRsiJpKUzQJi9CiuWN+C9v49c?= =?utf-8?q?5U2M4sZC64kNr0nHuukciiVQjbU+zH4Cu5mxMiH0G4INP25s1OkK6NC0BEZ9aXuHr?= =?utf-8?q?fPLqk2jzVZmrhpaAD2xyFlJH29BPnRycxfCpau0eEi4dRKs18IVh4hgGT1wZ2kPwd?= =?utf-8?q?Ade0B1nuJXSsju/wipgFX/naOXUPBXSCXkm2gkCN5/0l7hjwwmFM0y+bMgmENWYJV?= =?utf-8?q?H9kEIHECi5SruF/smwT77NPM7NHnQTpMW+yjZOoXQUFJAnMM9YKZqUlgdtz0ejTYQ?= =?utf-8?q?DzxMH4j1r5q79/U2QaVqp7i+iEuUsG0Ou+df/Ff5PRfm6QmLSr1LIrIcvsZIpf894?= =?utf-8?q?h3b/Lc2jELU9auNK0SJFFalRLc6/PtaXZq+o8QebXEmY4taKx3BZ/UXbrvanAfq79?= =?utf-8?q?gOUXEoZ/g+HfCHulyeKXWS5ip4xmPSEhzVtvDF3p0HpSww38P+ASXvenqxSzBQ6db?= =?utf-8?q?llkMKQ1YLEVQgAkIZ1m/yNxgTBFbrYWQO4Jr1Z1q4d2otiTHDxFDpmLTn2uQ1tmsj?= =?utf-8?q?BkIY+EKYJjoiIelxHnDpvsiN9UAgrM51V3pmoTMS4zWMcq4cGo1nbZk1Y6Xn2E5ka?= =?utf-8?q?MIlm5tOQ3b4mwCuK0vzijVbD99B6co6+t7veGyV/RcCZPP1c/9+7CqnaDy0IIhfQu?= =?utf-8?q?UyDNgexv1FHfLDpSY3GfUj3Azm/c3+Lq8lPYs+Vm0ps0lHKV58jZJyOmcn1YNlqbZ?= =?utf-8?q?Ka5KcxPhSR/2EqtYF8vrK+gWH3fMr72ShyTt5zf/VeC0MXyZVIJq3PjyenTXV/3QU?= =?utf-8?q?CDy4MS6vGH275VLpCaQTJfZ9gxPbg7n5SIhz96cmArrGFQjwGdpLbbA=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: d998ea84-2f3c-404b-cb58-08dc321d0e5a 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:55.7794 (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: wNaAsT1jMESGY63kxCmVO85TlzebgddVU45qxYj2vG8HSvexQvjZt4QY8jNy54OSKYyZwwDKJSj8TWVtB0y2/sJGbzG3dd2t8lohOZmW+AM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5577 The onboard_usb_hub driver has been updated to support non-hub devices, which has led to some renaming. Update to the new name (ONBOARD_USB_DEV) accordingly. Signed-off-by: Javier Carrasco --- arch/arm64/configs/defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index e6cf3e5d63c3..3c6196b6c984 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -1047,7 +1047,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m CONFIG_USB_SERIAL_OPTION=m CONFIG_USB_QCOM_EUD=m CONFIG_USB_HSIC_USB3503=y -CONFIG_USB_ONBOARD_HUB=m +CONFIG_USB_ONBOARD_DEV=m CONFIG_NOP_USB_XCEIV=y CONFIG_USB_GADGET=y CONFIG_USB_RENESAS_USBHS_UDC=m From patchwork Tue Feb 20 14:05:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13564061 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2116.outbound.protection.outlook.com [40.107.22.116]) (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 C997971B4A; Tue, 20 Feb 2024 14:06:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.116 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437967; cv=fail; b=aHxg+029IrKqr7QzfEDoX0MueflLyda30hINaSNsqlqePczRPSGh9fXyr7XiEv6D+79aou6u7DJkgA5NHmpAGwp+JgD+P2LW7Dsig6EELaxIdmBD9zfBBb20azDIbI2LID/2+IWCeziPvoZMRbYmXlp6pPL5fVD42Hj9OKjOk4E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437967; c=relaxed/simple; bh=GYIorgCuxQ34b4lu1hFXgE4alR4MOyW2uxp4IG/bCFo=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=knCKOdUzH6AWml7nayywD6s6Y5mpLPaBWhxHA+Jh0oJ1nDJomM1H8tLbNdW80d2UgC9sVEOucjEFVHubZmAwCiXv16+1Uv/+g7RmsS0dhNbyb6zp2EFjwObUm/DP/euE04m0CRhr/zDVg/LJTe0Y2DevzPXnMb3eZ4Lva2Fv5Nw= 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=AyJfmFbY; arc=fail smtp.client-ip=40.107.22.116 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="AyJfmFbY" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YrAGNU29L8PY9e6LABcdXRJjIBlJIy8s8JcIHuRII208oy4IGA2o7GUWbyJRmJ710fY4Wr3H4rGhL601ebtEEvY9nNfHUFE+l8g542CgFYvo1l6DwqcdW9pildd6JSkCnGfi7vUn1RrQwQhXp7hHoneLhXsV5RswQCmCSFODHKPbarWbOQwBKPNchCKTYYCsbNF07gbI7aOgpsceN0diCEtQnNO1JOIO+1BAzFa0WIM9aDnYPzUoAOzfgZS6nM9HushNFdAXHpiSOxZoNOIRBDxWiR0E8CUUCGtDutdNGkYgQ5JTitFFPgmLA79Z+mt1NzwbQ13b6KgA22dgCWjVDg== 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=BwxTPyHk173LH7OLvpI8Mk3rAWKwhtS83y1hH7zVRz4=; b=lwSlzpWzFtpLxisbqdlfB/WyzQhQYrY5WMumS/VFPx+hUTof6O6+IPOm9Pi0YFPFi/Tz01DyRPv12GaBxMSxVk5NrRPXPQHFd8f76rDsuo5HG1+M1rkuNbcz2M8NYg75D2K8XG9vFxrz/ZN3xsbh9hEBFUpk4wKww3ygZr6w+6TwZa1yJrlCY0+dy2TxKRfW+403juumHhHK+EnR/jhn5kGgFSDx6vBDF1sV4ZUBC/vEMCgMYTm32TITFe5Hp19XldmHXOUFLtZ1sZ+pPSOQ+Q+rgvaJThOpRMBSBms1UkD5UizQOuwD/gcOLMAbuqavARHay+EOI5+CwCeoaU/ykw== 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=BwxTPyHk173LH7OLvpI8Mk3rAWKwhtS83y1hH7zVRz4=; b=AyJfmFbY13cpzRn7PaSclZh/Ak/ThIcldIw7Fy0Hz2vORdUKR+4PoTO7pS4+QMMYiiyLpOE4FpIohC4YHv5hiZmd1pnqjSHGGOsH0wOb8qOvb0rhWioP0gcSCMGFyNNzWMa7NxrhpJ8DhS/iNjuFQzFaSgN/9HF+oKQlP8sNf4k= 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:57 +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:57 +0000 From: Javier Carrasco Date: Tue, 20 Feb 2024 15:05:49 +0100 Subject: [PATCH v4 5/8] ARM: multi_v7_defconfig: update ONBOARD_USB_HUB name Message-Id: <20240220-onboard_xvf3500-v4-5-dc1617cc5dd4@wolfvision.net> References: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> In-Reply-To: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> 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 X-Mailer: b4 0.14-dev-8b532 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708437949; l=852; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=GYIorgCuxQ34b4lu1hFXgE4alR4MOyW2uxp4IG/bCFo=; b=whEgHdyBThgyN6VX99Kt1UTaJZOZJbGAvKe5p+Hv9eaE5VyqW2gGRPtLq1Lg7nNtTNKFKABJf IXNHAhOpTFmDy1XlKBFEYPueC62C2nK8tji1SAJ/RPraSZdPfPa9WZl 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) 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_|PR3PR08MB5577:EE_ X-MS-Office365-Filtering-Correlation-Id: 7ffdc478-c64f-408a-6e98-08dc321d0f1a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p/fX7U0utxUuvw3kSDq+j6ODyGHfYN423jA28EBFPZK1cm8QxqajcG1J8u8DxxRYZbWb99BJufhZETfLSaKtpHLwO0f4lAtfzJPUQ7G1QrKW9xJyOUfyXGmGUuV1Prpyc6cpM4yPYBj8kkJoVS4s/afdRgZY+LTLUlOMPskAzOKXhiAFAiJeyJuRYOSbm7M6EiKEYpoX2vHLrIKVtqU+sAOksYOdPZGDwyrFbXdgj8kX4fC6/rY07CEgGm4eKqIhUPUB/6Nc9wimwc/RPzPu9gyiMoclhpxKcTwOoLyMyXyCnwqPR1uvL+NneEbYN1jchu4P8roULwA5T0z9M1I0yrnXgIPQqjcqEbhuAv5tqeMnYoMT4GWtzlroBc+qdyvkNLLH8BJWF73YDYbnRV0c1sCsHB2SAOtqbfHDhIr+RP1xnacx8HMun5NwRvkv3BdQhZOV4o9gqefZMOoq55JFe9GVe1kCtjixoYdahJ6PIPV30POVSiPRheUGc4lFTZlV1iqYUTHwEZa2IP3HfhYykJq6n6buuapLWihuHg/4Dg2ki3viXKacjAw866BeU8Q2q8bYZ3eYyXap0QWTqPSwNg1FaIj3ER43cPp3y0uMI5xd0SfaPs/R0d7Z6YNQG5UCkawtD0r8ruFA8Gdv45UsYQ== 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?JMdQiNKwPPejpfYRIMXnAzde0mHc?= =?utf-8?q?XBmrx9idPQXlC2/ng160CEE5u0Ao06GBaVgjwe/PykJIzL7uE7vdWAW99YaH+/rvR?= =?utf-8?q?pEUv1+Xwdk4A5sX/3AvIgSuYm1BIjpth02yXx7STHdEPpkKvkbGC9LYU3z6KBfDza?= =?utf-8?q?YArRIjFKDcUDJKO+bLa+QNBI5c2hgrfZ/sGYoiqNDqbAVK6LYo3F2RLRuOCMgPizm?= =?utf-8?q?s/DiV5UBfGICuA9oUhL5vAnhQZieRjg2pLpn5lZOZwciwrJnOqPCnprSpucUmNjGu?= =?utf-8?q?dyqFvF7D3DfT1G2wJoIyi91DDke2L93WAjePTdkL8UHS4qKh5sLSqn454/MkPmMUj?= =?utf-8?q?m0hu3PGInyGLu/UjFodblfHqBx5GOOWmV/maxQXbB5rdc5oHNCwwv3whv/aGQiL2R?= =?utf-8?q?oiBgOb2D9Wa2RlUqqei67CZZuXCp5Og8jkE9Ic9ejYEMv/iK+8MSwPOufBUp3tVa6?= =?utf-8?q?jdr0mL1Hmff9kpU565Hkr4nlqAJLi2EBNAltr4kRE+vDkNM/gJ/Uufl9C3MC4wUJ+?= =?utf-8?q?Pp2fSRjOQtAGl1t1aPxfLzzFCp79rLjU8sev+zfmYyDCjo7See93vjDKqTBcIwzs1?= =?utf-8?q?BeA92M2tNu3aTMV3lgcEIogcGepFzMDlfosTzLn5//K1ES26eSwqyj/z4loC4L+HI?= =?utf-8?q?QCgWp2nwJ6rdCbtxCwBqqe1ZuoyggQ3zuXADSZJEzCeWi+s4YzdqnyC7F7BvWJDKP?= =?utf-8?q?INkEOJDgnyqENeqWWBVaUB/F1lOGPOt+ae8ImtZ0Dj8P1YkamK+IJta3MzFT94Twv?= =?utf-8?q?FL0ZOkz2GvH6U7ecOeOEMTWAw1va3/T1ylt6G5pm88MvmfR6Gvk+WQfx0gvIph7fG?= =?utf-8?q?Wug3SYz5BzZ+AICoz6vZARYp6SOin2rdZnBXM6bXbunN60vDsQ7bkffSQXwZPpI5p?= =?utf-8?q?O2fCS/PkLRqUyDZzI+YAoIFXH4if96XcAwXyWRqMMBf5npRE0FjIETPC0wrZ/25Kh?= =?utf-8?q?acBcDc83jjjrjLPAZSCZelOQmNRiSQykyDxTDsgolhNg4Atr+C6KuHSnET5dDHuiQ?= =?utf-8?q?DvAmzCRdvRXOYqElMG0MRyVzrtjnAOjdOVYul+RbDd7ldmrmwwZRSXUrqzAtY9w1v?= =?utf-8?q?y+ihb1YiCoISJWgHQugh53ZikzDJ02UUx1bn1tqBMDnx8F/aflU3yi7ssiEWVpsGO?= =?utf-8?q?4NhZ0aFuFej4mN5u6Sv1XKE8rtPweBpw/2N26rgkrrLbunAtpSeuUx0yot6gTC78X?= =?utf-8?q?vjkHm9l9YcJAExeFzjkLp18NaBWxgRM+b3h3st3NykR6ZcQ1IfVe8+LQBtPU/7oLb?= =?utf-8?q?o9W6fvnWNZbgt3sME5TJWDP9VVjE7WaclKOmAbWXCrFooUxqo6ENYexZ74Up/F3Y9?= =?utf-8?q?Xc+hSmwd8wAGD1rhO/UfcbwH+c+J2Ly+CLUVxK7kI8JEvLRhsFYdAJJRkMpC8Zwsk?= =?utf-8?q?sp8myxGsmB/S6hR29twxCvxjcq4U+RxyieHxrxqw612laN7skeBLrqub2wxHvzh5L?= =?utf-8?q?fCAb82OkOiQbaGX0pgD9URrku5yfFBsRw/8tFPYJmYB59KeTZLobHUqy2DJPgrjqf?= =?utf-8?q?WOwjjck+HfZYlhx309sUkXIabVeuiXoZazeRbK0efHYTlokJnUjUM8k=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 7ffdc478-c64f-408a-6e98-08dc321d0f1a 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:56.9627 (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: BCt78nBEgENORgGUrWvksREyR3lz3v2icYnJ+AiCrx4wbUsFtIz7zHDD9o74ltxptzgF7sAwxlIpd7X6cemLsHWOp/5iAXWWyIdfeq2SWmc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5577 The onboard_usb_hub driver has been updated to support non-hub devices, which has led to some renaming. Update to the new name accordingly. Update to the new name (ONBOARD_USB_DEV) accordingly. Signed-off-by: Javier Carrasco --- arch/arm/configs/multi_v7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index ecb3e286107a..6a6ebec173dc 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -876,7 +876,7 @@ CONFIG_USB_CHIPIDEA_UDC=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_ISP1760=y CONFIG_USB_HSIC_USB3503=y -CONFIG_USB_ONBOARD_HUB=m +CONFIG_USB_ONBOARD_DEV=m CONFIG_AB8500_USB=y CONFIG_KEYSTONE_USB_PHY=m CONFIG_NOP_USB_XCEIV=y From patchwork Tue Feb 20 14:05:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13564062 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2138.outbound.protection.outlook.com [40.107.22.138]) (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 58B6F73195; Tue, 20 Feb 2024 14:06:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.138 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437969; cv=fail; b=a3SNKNC9k/YmWWAsyR8EGNtQcDPUGbJQcAht/8rD08DIfXCYXghEziiFklvAyX29XCLS2HHgxgHrH2Nyzy1J5/e+dzTrbJEKXjUzHgyQYFQRNzw9BRKKyuGhR6s/1awCRHvvLNd+5aJDd8TcZS4N+aPOSzzaBLjB+/DSMhdMgV0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437969; c=relaxed/simple; bh=wUGrYbPnydwzo+RtLKmi7eQ2m/EJeSbfPolFtQ6kIRQ=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Z5sD0q/+rGvkytApF5NBIl+xlAuHe+lVNJDsvtjsfiyaS3+V1rDO45vKuk9I407IgubBp7cNJ79ecEJMgFrCzhMRXW6MrkZ1rOF913zwLCpdNEQMmmn+08K++ctYQ9QvSzRiq4n5e5MTcdS+sEYxY5/VwOcunArOeUg2eHoDiRo= 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=W6Lj2AA9; arc=fail smtp.client-ip=40.107.22.138 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="W6Lj2AA9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AVK6aJE7kKo3hI60sLrybf1C1YZ3JcusTr5AonWD4vUVa3pM9WZVKoG7zMwEtkcFemlutEdLartI48rv2omKNbzpS+lgefMkUbbYaE1pO/oWfJtb7ZBgE7kYXtyAT7jU7nMhXozQAQ6e10vTXKy54+FJ79m9PXXRUEBry/+IjkwYI3lArA8uksnn7ed1IRU0ABMLEjw+Ahe91td3kb5lnUqH6Mb1nmvYjLoHEYDglQgX0nShGk7sQeUD3xs5t13j9tbXyfwGQSvoym+q8yWwLw5wLC3AUwSAtjleYeHZ34a2O1SRje5VMlj0PWxkIH6BQdxcfKiJ2uVGczHCd3rl9Q== 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=wu9zGPKHKH/j0L4z2++XlAq79sCFrmoumx8z7gnJzZw=; b=kTz0GHrSe0SrKxOMDaGlLgDPS782n0vJld9Tpl1f6uCbMQLi7VGkf+pyWvHFR9cEqywwrrsoENVEMDlgzTs26spwfbBS6k75ISatpv07M9N62noXGVS5mTAMPuKD8fHaq6BRNUpbYY/Rbf+hUc57ZUXHvdKGe2Wy4JR+dU5NPyfD/aU3rbaQ4TvVWtacuHt1Y8zmY8147miOKlHh9yIGFZul7Mx1/n7dRApAXhVuvGnwuYDaQ6c9CNg0zZP+kcFgboFxNnXx8fThZEyW1Rqa0M3oJgbkhUllWfg4gvzsujpB17y1UCt26YdzzCDFjXzch3JHpJjF3h2lYLRYc4tFTg== 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=wu9zGPKHKH/j0L4z2++XlAq79sCFrmoumx8z7gnJzZw=; b=W6Lj2AA93+7z8LVUklES/JRsU2IjXEa7sT7roGrBpzBw5lREe0QnPxDhQ5nKL7N/tZMlNfBLbrxBo+gYgKsFGvW5mexuZbKsgr7luSiHhDNZtv6dDveQeTTilOBCiUpoK43K73M5Cz0dsexxiTjtU7HbjCKbGhjoKLLBrWCVVhU= 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:58 +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:58 +0000 From: Javier Carrasco Date: Tue, 20 Feb 2024 15:05:50 +0100 Subject: [PATCH v4 6/8] usb: misc: onboard_dev: use device supply names Message-Id: <20240220-onboard_xvf3500-v4-6-dc1617cc5dd4@wolfvision.net> References: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> In-Reply-To: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> 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 X-Mailer: b4 0.14-dev-8b532 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708437949; l=5600; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=wUGrYbPnydwzo+RtLKmi7eQ2m/EJeSbfPolFtQ6kIRQ=; b=NfsAaQep/oh9gZ7YytYUoAWOR9xVUzlZ+mL1lYrfCleQj8N/AfsRRjGKWmSfsfwTPYc/J8TST vaCWzcRyNeXASuhwRNuiHcPD+T5ig7T12/N8poLEk0XpX9M1ongpQz8 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) 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_|PR3PR08MB5577:EE_ X-MS-Office365-Filtering-Correlation-Id: f982dc5e-9aa4-4235-5be2-08dc321d0fcc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jhw4rUTMtfAI24+OMIL7yLgt8Hx86ztx6+C89sjABEu8KpNsVOmHjvKdmpK6NiD96oEUrwdxYaBzKJrn7eQBIBdilH4Zl3IpeHfUl93f2AVtZB9dcaoPZqjQCEhFuo/iqfZEqGvKJlJcuaQ+SdDO7ncvHcqV2WR2mjUdtHbL5R5T/o3DXnKsoMwGozg1jyuNN6qyRZjdXdYzTEkDi5wzrZiSSlci2bUNT2pCFV/yDtflz4bzWIv0Sj5s6lSYdzXd3T8GrEsaZqCGtTlLTZPelrJl+HOxeqcP82tASNfAQos8eIL7Cn2C5K1NHPwEI/2HTXIjddY27kHISJ6Ehd1z41bBC7FnkYMai5hvXzLj9DgI5eAvJKayICJ1Bh7Gv0uCDzCbI1uVgrEzF2DGG9ieYKmf3OptuGem58jcASEVCB/L3gUMuKCzTcR5w3KaQfbVyASnHMdaLxZ4cM30Hw7YkIDfHpWsqwTXTn/4DBFsdNn7+FuYi7GTS7COuqY8oS1cQoRJvOadOFIsRkJC6UBcd+SLc1p/hFLsDVGh50G3OJ8UZXrCdU1G/n/KBJAw7PEhVHmne2biam1iKDSB7YP8Iaeu3tzi6bQP6KVyiqP1UDAbr8UJ6It+iZLcsl8v7Kn8LZCMBbgCgAmhBKbaCH3yCw== 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?a+3dk8aMnQZwPaK//f6cQclOBhEn?= =?utf-8?q?xW5SJJnbC1xcnFWFC4Ryi4LvSuPxJuGUaXg4Y4sReMMVAgEaH16ok0kfvsrjrPrAa?= =?utf-8?q?n+V9nm1lzoX/d9H/Oolt3PBCv3QCixhhfwtOR4H/Q7lW5CjRSavZrlRpStn1bHI2A?= =?utf-8?q?qhRSpzb2VmyY89SevsiZwftfhNESM8qPoHOMJHd5tECh0FCDPCExo61cuypm1kz/0?= =?utf-8?q?MK6i8WWSTAEVrICCjjAVDHctx0OP7tE8w67w4x4CzRl811L75MWy6OV2CE4gj9kIU?= =?utf-8?q?JQz385AjL/M+rvQYMIxIWzdJm5RCyXzNZI1HJWsItP52fv06rmrtqcRE634ZIEg/J?= =?utf-8?q?LQepZY8YBegE5I0VPox42Vown0RUaR0/FNiD3oPFfRPvSEsrStSrTzPW4nGUFvHo1?= =?utf-8?q?jTP4HZjMIWmw8hvyNlFRhPpKommJgRMDJZim6G3PdiNL/hyQJSfopzO0MY647XLLB?= =?utf-8?q?6PhuoMqrbX4bUcKgu8bv40Vwy5jzQgWhlaBg5I5iUInBqLy/Q2tkGOcmQZRRyUXlK?= =?utf-8?q?cKFDVzTk9u+h9/rboRQkKmi9jT1Wf63Vr7sqQqd16USqRRM/BCTLV48HqXFzlz4Xr?= =?utf-8?q?aHvM+FOQ404gMWnmJyvBTcjaiWpmtdkKcmwcZVw9MLJUf5pphYDZ6WCL7z3q1BdEM?= =?utf-8?q?4ofe8anFj3KZAE5v6WypatOftPd+uuxi+xa6PhfrryRD29s4wDqvHdWf5e9euN2GL?= =?utf-8?q?wkyoZ+d50/KOc2Oreuw0BWVPhU08O4Ke9j6Gwj7dHWykc86B1ZRtSXbIKdz58QOiq?= =?utf-8?q?v06IseF8lrTUxHuNhcdmX1+j1vGvlUjAuNseslKRDXdOl1N/KTr2vCqndhVIWdiJR?= =?utf-8?q?RArAon/xqGaFo80rWrJeY+HCN8ncssOIQNjFnsitNN7zeKFsca+HHGuM+Bt8r7sPl?= =?utf-8?q?LXhHc1zI+zmSZFEStGMqlNRo9uR1etxoKviEVCLLIU6rMQ7Ue/zrPSuw2AWgBRXMs?= =?utf-8?q?EjPtTP0fMCwqnQCP6BoxwF0HpxFKhvxBb3YE1clW0KKHPLwkoXggqZG80NQwT3WuK?= =?utf-8?q?WsVmxUpb6e5s0gL8NpGnFSFhbccpkEiNV+2LPkTSHyRBzr7UAZjI2tr/RzNbxRJV9?= =?utf-8?q?HxQqwHsY2Qv0VqjOYZ/LiB1E2gKK/qO0noVcTDjBRevQPt3b44uM4I9OsLTnAPfAl?= =?utf-8?q?hfaK/6/x/SUADek+W/OeWXtM4bzH9wOdKrW5D2yNlFJgnjF7RPNMR4GWFaWDoxmjh?= =?utf-8?q?McZynP33bFnixgYoAERsOzgAkeYQW/o/QPTwxms+bwh6Uqe9MhyY2E4H694b1tFNt?= =?utf-8?q?NjQaiYirLOJY6d9qarO5roS15jtiamMuxkcDFWmF6v/ZOPyJ/6MhsoDA+sKPFQG+Q?= =?utf-8?q?nzu8vLi1Gtnos8ab8ScXqgO41oy0/lxdB6YAa8DMoeDXpYuLXLhUtcHAyO6wSiKnb?= =?utf-8?q?VXgicvAoWp2YKf8v5rW46eDreFRkTJjWyXE9dKt+nHVRYYGUw9hmUah0Ow1e4F70j?= =?utf-8?q?9aiprM8xsAYOJ6XvZWDwlBkWymtyCROTN9hiQWAwlHBI+3UBKV4755CY1OyUZgnZH?= =?utf-8?q?0mw2srUgzWS3zZDwJyBet+7lQ5NK87p/1uEYD/P/Ac79nUqkPsTQ7qI=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: f982dc5e-9aa4-4235-5be2-08dc321d0fcc 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:58.1078 (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: idsM3Y2m+uzunysAbGu2pwHWpxtGuKgHHD7smbdN9nGRPjV8WbL6U9g6szk5DgcoNyZHN4IsOKIrjReGHbgHrIxeBRN8KkhyyOCqxhol2zE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5577 The current mechanism uses generic names for the power supplies, which conflicts with proper name definitions in the device bindings. Add a per-device property to include real supply names and keep generic names as a fallback mechanism for backward compatibility. Signed-off-by: Javier Carrasco --- drivers/usb/misc/onboard_usb_dev.c | 54 ++++++++++++++++++++------------------ drivers/usb/misc/onboard_usb_dev.h | 23 ++++++++++++++++ 2 files changed, 52 insertions(+), 25 deletions(-) diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c index f43130a6786f..e66fcac93006 100644 --- a/drivers/usb/misc/onboard_usb_dev.c +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -29,18 +29,6 @@ #include "onboard_usb_dev.h" -/* - * Use generic names, as the actual names might differ between devices. If a new - * device requires more than the currently supported supplies, add a new one - * here. - */ -static const char * const supply_names[] = { - "vdd", - "vdd2", -}; - -#define MAX_SUPPLIES ARRAY_SIZE(supply_names) - static void onboard_dev_attach_usb_driver(struct work_struct *work); static struct usb_device_driver onboard_dev_usbdev_driver; @@ -66,6 +54,33 @@ struct onboard_dev { struct clk *clk; }; +static int onboard_dev_get_regulator_bulk(struct device *dev, + struct onboard_dev *onboard_dev) +{ + unsigned int i; + int err; + + const char * const *supply_names = onboard_dev->pdata->supply_names; + + if (onboard_dev->pdata->num_supplies > MAX_SUPPLIES) + return dev_err_probe(dev, -EINVAL, "max %zu supplies supported!\n", + MAX_SUPPLIES); + + if (!supply_names[0]) + supply_names = generic_supply_names; + + for (i = 0; i < onboard_dev->pdata->num_supplies; i++) + onboard_dev->supplies[i].supply = supply_names[i]; + + err = devm_regulator_bulk_get(dev, onboard_dev->pdata->num_supplies, + onboard_dev->supplies); + if (err) + dev_err(dev, "Failed to get regulator supplies: %pe\n", + ERR_PTR(err)); + + return err; +} + static int onboard_dev_power_on(struct onboard_dev *onboard_dev) { int err; @@ -266,7 +281,6 @@ static int onboard_dev_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct onboard_dev *onboard_dev; - unsigned int i; int err; onboard_dev = devm_kzalloc(dev, sizeof(*onboard_dev), GFP_KERNEL); @@ -277,19 +291,9 @@ static int onboard_dev_probe(struct platform_device *pdev) if (!onboard_dev->pdata) return -EINVAL; - if (onboard_dev->pdata->num_supplies > MAX_SUPPLIES) - return dev_err_probe(dev, -EINVAL, "max %zu supplies supported!\n", - MAX_SUPPLIES); - - for (i = 0; i < onboard_dev->pdata->num_supplies; i++) - onboard_dev->supplies[i].supply = supply_names[i]; - - err = devm_regulator_bulk_get(dev, onboard_dev->pdata->num_supplies, - onboard_dev->supplies); - if (err) { - dev_err(dev, "Failed to get regulator supplies: %pe\n", ERR_PTR(err)); + err = onboard_dev_get_regulator_bulk(dev, onboard_dev); + if (err) return err; - } onboard_dev->clk = devm_clk_get_optional(dev, NULL); if (IS_ERR(onboard_dev->clk)) diff --git a/drivers/usb/misc/onboard_usb_dev.h b/drivers/usb/misc/onboard_usb_dev.h index ebe83e19d818..59dced6bd339 100644 --- a/drivers/usb/misc/onboard_usb_dev.h +++ b/drivers/usb/misc/onboard_usb_dev.h @@ -6,63 +6,86 @@ #ifndef _USB_MISC_ONBOARD_USB_DEV_H #define _USB_MISC_ONBOARD_USB_DEV_H +/* + * Fallback supply names for backwards compatibility. If the device requires + * more than the currently supported supplies, add a new one here, and if + * possible, the real name supplies to the device-specific data. + */ +static const char * const generic_supply_names[] = { + "vdd", + "vdd2", +}; + +#define MAX_SUPPLIES ARRAY_SIZE(generic_supply_names) + struct onboard_dev_pdata { unsigned long reset_us; /* reset pulse width in us */ unsigned int num_supplies; /* number of supplies */ bool is_hub; + const char * const supply_names[MAX_SUPPLIES]; + }; static const struct onboard_dev_pdata microchip_usb424_data = { .reset_us = 1, .num_supplies = 1, + .supply_names = { NULL }, .is_hub = true, }; static const struct onboard_dev_pdata microchip_usb5744_data = { .reset_us = 0, .num_supplies = 2, + .supply_names = { NULL }, .is_hub = true, }; static const struct onboard_dev_pdata realtek_rts5411_data = { .reset_us = 0, .num_supplies = 1, + .supply_names = { NULL }, .is_hub = true, }; static const struct onboard_dev_pdata ti_tusb8041_data = { .reset_us = 3000, .num_supplies = 1, + .supply_names = { NULL }, .is_hub = true, }; static const struct onboard_dev_pdata cypress_hx3_data = { .reset_us = 10000, .num_supplies = 2, + .supply_names = { NULL }, .is_hub = true, }; static const struct onboard_dev_pdata cypress_hx2vl_data = { .reset_us = 1, .num_supplies = 1, + .supply_names = { NULL }, .is_hub = true, }; static const struct onboard_dev_pdata genesys_gl850g_data = { .reset_us = 3, .num_supplies = 1, + .supply_names = { NULL }, .is_hub = true, }; static const struct onboard_dev_pdata genesys_gl852g_data = { .reset_us = 50, .num_supplies = 1, + .supply_names = { NULL }, .is_hub = true, }; static const struct onboard_dev_pdata vialab_vl817_data = { .reset_us = 10, .num_supplies = 1, + .supply_names = { NULL }, .is_hub = true, }; From patchwork Tue Feb 20 14:05:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13564063 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2116.outbound.protection.outlook.com [40.107.22.116]) (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 32FE8745E8; Tue, 20 Feb 2024 14:06:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.116 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437969; cv=fail; b=ZvNn1v4tyAc1otLsRbdU19DZM/A9ZQ/uzX4cIIGgYioZ4j+H5FAoEfVSHYItmQJzLnUD0GU2zOtGRirJgO1k9pjHk00XV1+xFYQbEYCNwv3I6tUR/xRwKVK6hjJD5gmnktLG0PPsYOHppRQfCn8dqCFg1IxSPbxgkQQFr69Ihok= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437969; c=relaxed/simple; bh=oR6a5xqQsOGc1uMLfQupb0mPr7OXyz+ZGxt/49f9RUI=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=okn8g3FKtFe4t+fO1hKLEbmSQR2YAtq+5Y9xxk84nc6kowAUEx+uC+d/xmca9NDTYYu6NCK2p0MmrLLS++st6cK31W7DhRXiHlFhnCjrNptMyP71EtNfJ+KH9qA8Z7LNTWyCVrljmi9JKqgGwxXyuomTj4Sz/NHJG9moduQG99Q= 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=R/BL2AyA; arc=fail smtp.client-ip=40.107.22.116 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="R/BL2AyA" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RIbFo/twIxwOPfFhWymYXspldgKM0WJBguzl8XnrRiLwzeSs8Kbhk27qKJHx8LoGB+Zr3I8QvapYgkTHOS3tVgBxfqtvWtOdAgF6x4yZ2R8FiDQ2cFJ/IPIQ5b7yLxN/XnpbxST3qmnDJfhPRvHV2hnaqiai+eevyY9qhM0/oeLEPviidZnkLKqGbhhb64CqymBm/0lQnkYdK/7vUJs3nYhMKtbe2aUUyBinLpr414JPAiQXVZyqHPGEMArBGQ2jFOq4xSUQJjEKQB8KE1c96tif2Z1rI1JWMLXa3C7QeY05zdHAWY4PAmaVHye93VM4Ylo6OJQ6iWs2IJiQsdRWHw== 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=Fq03xRjDQ28owlDKvq/GnOa/lXRcjSb+m6v6YYdcPc8=; b=URtxGCQFKZBItjMfzYAOTRAGYxFg1s2yOP5taADmnBTEQoZSQH0m1838ymsp7xbm4aNAOnkiUr0JNvHYmhWh4KWPxQfakKPcI65/SSxPmukwjrgkpPPhZSeeGPY83ZTAqMyH37nF6BEo8BlG7m/lL7SiZ80CPjMrKnVBR6U8tDtzO0YRxCqxU+hllHCH6fV+TEWcbEN0rteTZjIbTt1gUqADBrmVc1cv5oT9KsZnQWiMcip3EItr2PUivIh9nd9IQYi5hhlCt8XGxBfUz1Ziw4syoGRNZ5zf8BGPxObZa9DVHvmd7qttQz3kUcx7JHKkrzQfgtrsA7KtiSj2/MwUCw== 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=Fq03xRjDQ28owlDKvq/GnOa/lXRcjSb+m6v6YYdcPc8=; b=R/BL2AyAXIKnjTMAKHTnBLKpoYQ39njoGPGrcurOYWd2uGbgtUk1wWOr80kQdUhTUnybJzrqE5ioFxdpEVUhESRADMX2ZXutLB1sdomdTOo6yeYNTvXWBmIo1IQ0rdfqXaf+/wAD3ofpnqvpiB8WGCy1qosTFTiTltMDcW4bpZE= 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:59 +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:59 +0000 From: Javier Carrasco Date: Tue, 20 Feb 2024 15:05:51 +0100 Subject: [PATCH v4 7/8] ASoC: dt-bindings: xmos,xvf3500: add XMOS XVF3500 voice processor Message-Id: <20240220-onboard_xvf3500-v4-7-dc1617cc5dd4@wolfvision.net> References: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> In-Reply-To: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> 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 X-Mailer: b4 0.14-dev-8b532 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708437949; l=2063; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=oR6a5xqQsOGc1uMLfQupb0mPr7OXyz+ZGxt/49f9RUI=; b=PRJPQlk4A+rooh7Fw7N/NT12s2VAYBpe/wnZGTwHgqu3Qb1Fug9nlPw6vT8lBhUX9rvknaT77 cORylSJhXqXCBUkZhH88B2RArbZKPesZ7keB7cVCjh0oTyjhVaI2F8K 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) 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_|PR3PR08MB5577:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e765a91-a687-4b3e-652d-08dc321d1079 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kIV61SycbSrcjBS8g682zY/aZ3ZWSdUkj72Ch/qZWO5LKty6/tK5O2xw3ImwY43Ilh9absV8fzHIeWdoWp8gCR8M5nrPyAtKIBG6FKtIdFa0NS2baRXtVp9Flw8u0wyG8BVddt3jtCfY0P5/Ljtq7wZYkXW0YkJG8NrHJAUwHHfp+IYwO+tCggq5bsPLM92Z8KpHShDWP3ZFFQQvOU6XoC1R8er1reqgpohHwHapIgVUAtO8AH5bRFYK2n4X1CC8zXMgz5CzMD6h9ERyhWRCL+cCFSg6NUMx3BcGTfl4r8b2Lsx45ccro5PK0hl2A9D4613oFDFEsP7lntjTFdpPKyClUmHPM6vywqLRgkGGio9H86CUaR8njeq1lBm2G05xl2uKQxOA6dTArnFH0cDbmmFH4IHEZ1JgbZmqCWwuLcBWUuGYv0C6NHo6pnRJR8btoVLKL7TGaciIWOegj+HanebTul8cClDej5PxpzSHFVBGJz0o+IR32bP/cMAm+3zo6AiAnLtrHYLltwD4yGybDxOExFQbePqEEM3GA8e98NIszes0VXd7XHQ+t5RElQn171DWMYw+SYxbd5HCGf8tmOZdQeOdowURpnGni9rwCCkYuvUEyiiPm2qaUQBEyDTO 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?l4if1H4ZkltSb91KrMFtp0TmAzjG?= =?utf-8?q?lBuRtvK2d0XggAF2ZmYHkhEepSYqZI8a8bC8CSThFhoinUEBNnRB5plNVWo/JgkwA?= =?utf-8?q?pPgTsWYgFCs/R9Ql6eNrl4Q5RXxxsUAtisAfricF+c+d54ViRf+4cHHHFQz1nA87U?= =?utf-8?q?21saeWagxplJGA5JWpQNqJOHEvf/SCSzDGGkSWYanRPUqLIp4Y6see//VBqXFOii4?= =?utf-8?q?fTDrDgDAw8graR5Je4RoQqbMlz20tq1T+GrQWKPL3Z2AqqbOEU+kSIWkzu8uK73SS?= =?utf-8?q?rbskEFFlnJ05SNjusgxEPXAY/0CZQIQ9FU4opO6SZtdGmRsllxjazX7T2SIJB3FD/?= =?utf-8?q?DeJCBnI42+mrPzGeLGtqOYsZAzcSwyA6Xd5SomOpaBW2v3jFfYIiI2lvI3ljyC69F?= =?utf-8?q?haU4fGJDIWMpb63rVKmlU+dDFepo5Kpgc88bUCecyQ/yHi9oZ04rSSl1G+umlFvB2?= =?utf-8?q?Kl/iScn5ILe8wEb4AgQ44ARDPx9CizJ2J5HfoeFZVVPEWjBGKxeWBcdzyHqHteeHg?= =?utf-8?q?cZycEfYCvp46V8VqT6O60wBJ8PI7wZn/06/PYkcKOvQKQJWwM211TH9q8ISjktirx?= =?utf-8?q?UkMiIWAgqNmTDH5gw7wKlqdyMcaNHEHsSwTA9s3kTT81Qm5pO3aCWirGYvMafIQ7I?= =?utf-8?q?VYxHRmwXiCloPFNRHK/Jt1Tmown6+HsHhJNyUoALUf5I8TFKB5yk86M6knoAfKq1+?= =?utf-8?q?uZqW51Ok4SIhJxmITlKntWDMgAIx5DlrVbCIZPPAXTR/rFXhtniZSW+EMANPzWULr?= =?utf-8?q?DqY0lgyv6oDROpR4w20XUsXQ8uGC1H/u8aReSN5Fes2Sh5SGGlIGiSyvRtGuVXbCN?= =?utf-8?q?g9AEW9TMZiDP4Ucefzn8i3rnGEoPwBUiktR9hpOvm02uHijlxl95XTjjy0+HaGNK2?= =?utf-8?q?tLuT5/bcMKzGcSaI28K/XsBXbZgNsK8sM0j0fFdmuI5LpAs71g1p08J9c4lTAFpqZ?= =?utf-8?q?8wYmbrgq6L1/uRHCwuRrdTt90bmTmtx3A9k1RjczZp2NS9elXll656vUtJ/Wl2cUI?= =?utf-8?q?+BslICvz9kd/GrUaz7Ue2BlgLgY0xj0OEQykdpV/O6vfrK6bxarBNZlxDQS8cevrt?= =?utf-8?q?ZSLV7bR/2GOSp161R+hVcmdhMUddpnjM4eplrgaMd/6lIz6uwkaVyUVNZD7qA7bc+?= =?utf-8?q?vADr9cnk6BqY+1GIY9ZWO6GBdC/b0TW9DDcR2lik3TbGQ9wqmABvh3Ul9FBusiP3f?= =?utf-8?q?WihM8SkCw5qMYgaTChEegkgcNuTjzJtr3dfY97+gPTLm9g1lb0bCoBRcp+mZKwWR7?= =?utf-8?q?S2mJfubHg0HnaLxwOGnuZLUgkalz/6UAptgTnrpAu0y5/vhBzNx0CuPwahvqCe+dO?= =?utf-8?q?zhOQo8wn4FXyxZV5pbc+670EpBXMkS3MxRdujnIJBE1aqGgG5X37QQczatYAOB23O?= =?utf-8?q?OebUQecBDp1xGBVrpX2Il3jR1dI8zeLm/YQ6dH2I1YmF5k4KsOkbQQgKlBjx+/sZO?= =?utf-8?q?RwiDkifVbJuuF+RcApHHZOuiYLP96WQgXpUDoEBk1iQsPdYSRMJH2xFGVeW7imc6j?= =?utf-8?q?qQIloiE2tJnxJ+3yRJCHyKOaG6lEb6DlfWohnUBCY0mn7MPiXvMqZm8=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 8e765a91-a687-4b3e-652d-08dc321d1079 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:59.2546 (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: gmsxSe0lNICyXF2LcE9XTlBqOFpF9XpSp0JnJ4eNiZEM5Fv3id+5LxPZFdba9BSP8RkkXNW2yYzNJV3VxG4nx/yoNbxxQ5b+OMolnG5D574= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5577 The XMOS XVF3500 VocalFusion Voice Processor[1] is a low-latency, 32-bit multicore controller for voice processing. Add new bindings to define the device properties. [1] https://www.xmos.com/xvf3500/ Signed-off-by: Javier Carrasco Reviewed-by: Krzysztof Kozlowski --- .../devicetree/bindings/sound/xmos,xvf3500.yaml | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml b/Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml new file mode 100644 index 000000000000..fb77a61f1350 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/xmos,xvf3500.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: XMOS XVF3500 VocalFusion Voice Processor + +maintainers: + - Javier Carrasco + +description: + The XMOS XVF3500 VocalFusion Voice Processor is a low-latency, 32-bit + multicore controller for voice processing. + https://www.xmos.com/xvf3500/ + +allOf: + - $ref: /schemas/usb/usb-device.yaml# + +properties: + compatible: + const: usb20b1,0013 + + reg: true + + reset-gpios: + maxItems: 1 + + vdd-supply: + description: + Regulator for the 1V0 supply. + + vddio-supply: + description: + Regulator for the 3V3 supply. + +required: + - compatible + - reg + - reset-gpios + - vdd-supply + - vddio-supply + +additionalProperties: false + +examples: + - | + #include + + usb { + #address-cells = <1>; + #size-cells = <0>; + + voice_processor: voice-processor@1 { + compatible = "usb20b1,0013"; + reg = <1>; + reset-gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + vdd-supply = <&vcc1v0>; + vddio-supply = <&vcc3v3>; + }; + }; + +... From patchwork Tue Feb 20 14:05:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13564064 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2138.outbound.protection.outlook.com [40.107.22.138]) (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 B004074E36; Tue, 20 Feb 2024 14:06:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.138 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437971; cv=fail; b=KoMiLcatLZ7Cr/uW5K1pqKkaQC9qgu6O39lSexw7XLBf/W20Fd6FiUIPzKglp8Qx321G9MIZIFHszDbmp8+RaD2YELbOtgJJLE4YabXuuEJvKTXwuIHhbXWbvH4JZU9NCf5Tm6NiCjDhR8YTLe8Lsoyq9cS5qGEpXmz7hpo0CdQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708437971; c=relaxed/simple; bh=oznwCdmDCgxhvp9GWMzxXJB+MbURB7Yo9lb4CwA1iFg=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=l5mnBNWd4MPdcA39v8RtfyPD7/qZfJ/WykOUHLCJgO6WJsFWLi5BKGgl7FcUxoM8K9SLvNgixDFj4O4ImxTuV1gbyRLTQXZGtfpc3ykCJZ0a+/UqCxZvD+h8N/rfgb6XY9RcH2zdcersmeQ762lPeVXxUPkFyqi73smgD5xJU8s= 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=Hph8pfcZ; arc=fail smtp.client-ip=40.107.22.138 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="Hph8pfcZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bE1lzbVYCQbMiox8ibA+GLVeSNr3mQbU9KdzxMI2UxYn1QbSw5ZM6Fhyzpj9eOwlp9g6Fppjzl2hyEnnSEVe/hu0ER6G7dEc9yFYSax5J8gDk13IpCTeJKDgZyIVqV/3zL/xStcWJgBcZwNpSeGw9lBP9YLR9xqQr1Zb17JIEmiaXDt9woKL/zFEtTx3kMh2tNJzQKD87U5UOtLUv0LHr7D56YrrWJmjJc7S14HJY+izr9TMWvLdsVgqRgCAVS+TBK/R6aZEAdw2lpCo+jlUgDWrfLrMIIiHoNMOSsE/JOIKEy3P9SNlr1rrIXP4VRAcFHz6L3e0ZZyNypSxVoIt1Q== 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=R9DRWNNHJf1m1oNiTxM/aRUkX1vWZM4TNEwdcvl4H4Q=; b=Ehz6FKLNYP01/raXpMox81dpzS+gTiVfPbPtDILtfLzbPcAtDmMofndJeR8CkTrVPE0KavoNxfrhFjtXDzi2Fn2i+UBtTsCcIAmCOPZK6zcN396CLOkS4pJ+HSW8jplc5G4Bx5V9sa6WbvdzK7hbA9QpsWv5AZX5FCVdMGG5VwcJBt+RZliLcoK3ndI5arh2gMQiwsb9N94a4MCup/sWMXXJLyPHU8E91mwGEhac5fx/QWB1RZmxhlAJTialJv2DxoWB1cm/dp3VfjtTdGb5tgTLR56VTqsgWqPfyjvu8yuGsDnREu/YGT7Wt8ExJAm4+UfpppDpCyTQQqr/e4h6uA== 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=R9DRWNNHJf1m1oNiTxM/aRUkX1vWZM4TNEwdcvl4H4Q=; b=Hph8pfcZZ4mBmVvphmfZ/3tEaue/biDBXCvpIxdHeC5WIJEsaJFDkM+umNsX6rSwzvJXF8n/GVx/Q2m5ZvXNt9lVU1Mg+7E17eqvf+EnE7w5BOf49ZpC/GQiIKaqg5En2HetDf5p/2+X/edMmXT1kxCLCUs7S9/3lqmYELF+9Pk= 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:06:00 +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:06:00 +0000 From: Javier Carrasco Date: Tue, 20 Feb 2024 15:05:52 +0100 Subject: [PATCH v4 8/8] usb: misc: onboard_hub: add support for XMOS XVF3500 Message-Id: <20240220-onboard_xvf3500-v4-8-dc1617cc5dd4@wolfvision.net> References: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> In-Reply-To: <20240220-onboard_xvf3500-v4-0-dc1617cc5dd4@wolfvision.net> 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 X-Mailer: b4 0.14-dev-8b532 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708437949; l=2771; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=oznwCdmDCgxhvp9GWMzxXJB+MbURB7Yo9lb4CwA1iFg=; b=0xncclfPpbx4/JCkF1FaiUPnqqb71vJ2hPUTP8GDtumrBFDc0jV+bbfvYLuqc9mOfZiepGLQF PPmkc3csT1UCjb/9Ivni4k0HWjAE4FvVSgzE7jKVk707rjnwUOUs/4L 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) 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_|PR3PR08MB5577:EE_ X-MS-Office365-Filtering-Correlation-Id: b19e035a-ed2c-4a63-b18b-08dc321d1128 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NHwIXZtPSGiSgnJI+gqJ6MO1XGMfRH99bPfS2eq6+iWzqK4r4hBLqjb/ItBECH99za8pYWvUeAzv5QIyqwNh9pBTIvNWB7mkAI3E8ebBcnLUE65V/BllPqb2wXGCTlb65IH5Q7D0HSoSdUmeVHjXa52nFiFIM750a5yHSuequ/lxsUGDgD8iKSL4A7Bw7QXK/CgseVvOhwGf+MTuYw+ARQBIlJIIK4oZg+rL0hnZyZ1rOVy0m1swi1RY1XFNhVbGvAB6NZ7OE6Oq2eTbBYATMeTR+gVpIIM/Sa3mlvgkvGL0qrQ02eVvGSceuuwypln5ludlTbu8Rgnrq28S4nB9dTa7Bx9kdKd6MsIo2kUURuWCZW7lu7+k3+FKsho680eSGZgepAQBi4UPmjkOav310ZqDueZsXM2u/qL7BhxX7tezXgf8EbpEO2NBc3U6aD+gJEgupImRAcGY5Lh7Z/S0lETN71uoBx3EcWqXmc5zE7f8BGIufTRGznVT6Cpa7DcTDFkOtddqPfxZzHzQtj6jYiNFt41begZ4+VFruhW7xdiTr1LspQu2zaNrbmB5Ox4TJ/QhEs1fVl7+ar10EJ+DL9830WEhpBZVJdTVVFPXD3mSKbkzmvyYVwk/ick7d4JH 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?tOXgdJm8vJxawcxM5IixWjvf/eYF?= =?utf-8?q?0Q+lDtR5rWKtWmmbfhb3yXX9L1+fb/UBY1M7kaF4wdPsS6roOOFP4tP4J6z+eLLWc?= =?utf-8?q?awmoGRtETNR9H1Qt7OGAGmGtA/vaLbkDokKVCQ3BHupH89zu9onD4kFztrpw7pBl0?= =?utf-8?q?Ff6M1iyqI5As6P8447PYPtDJfg/DETdHr3TcbgMhceZvNrxj3X1E+TvNHVYma4soc?= =?utf-8?q?R9TVEErF98bQ7E1LvaD91agW6SOfdfa/WN/xfK0FjHXLVA41DY50y1RD/KXnRsZVy?= =?utf-8?q?ORX2LHXQM7QBGQHshD9sGQv11CEXeijhM7D8t5yHyoEUV3cfyuWwMoizLg0aS8wp3?= =?utf-8?q?V0x42T2CkwyokBGL2XYJnFpCZLU47x/P78w/+seV/iE+WfGl6V4AJvd7yCP1sSNG0?= =?utf-8?q?Ee9Vijzl06VQo18v5n3fTsSB8QahREBoLsiIDgjQQOGjY/kRa35nPPLOgwl6ZTM0l?= =?utf-8?q?juWZrI3TI8W0M8O0xM9rNPWRUkdx+wCWjDJQ6Ak1TSk8sqkSRukf3zk+n1sfmN4rX?= =?utf-8?q?gx0IGFXNUfljOg9tYWxvrKejfhbL035vhKGcA5upC5u9RC5WKD3/ll8qDYVluFLnQ?= =?utf-8?q?OfFuantc5BZR2qLciAR8Q/R4mctcU1n7cVGi/hyVkJVWbkWYsUdnapRQ6wdfH1Nx6?= =?utf-8?q?8mzi4dn0f0fz1uJA805KFLrP6YSLadw/EylvQIDH3SiDVKZnD1iGlV1PdvJXMeZjk?= =?utf-8?q?JNhWR8L1m+PF/O7arXVV2GH7PBfTsz5JbxUF2iOGeTDJcbrB7jwo/V/OEK4TfVN4D?= =?utf-8?q?hZARXAFKSSDR66l0JYd/HHcjDyaBE9PJMtAMUvhGt1waNQ/ZCOPn66ddHuHWgDWWy?= =?utf-8?q?yyz8mU72cw1pwsa+Dk/TTVBFlBQppd3LzFxB6ThncSs4puFBCBoJFbKqHfjb0JFZ4?= =?utf-8?q?A/DsMabE6ZHgAlmAMhjazsOJfpmcDY0kQDduJG10y5pAiJePlJ50Q56jlZonwnz6D?= =?utf-8?q?GSz1FLlXcuo94YGOt50JTvmtXbxFE3CGIjfNKd6tQowwrKBpU0h/4Zy1OBuvun8TF?= =?utf-8?q?Un7hYcPEXJNROiihYYSOWQl7O5+w8CVYnKbCTJNNFqEUV/EOfxVbTfobjhqocbtCl?= =?utf-8?q?6xxT+Ac3BKOFQ427OpddNgH4HCoZAIFrKWaRa6Ev0PWVd5+WjWnSx4dh8xVF1pJeE?= =?utf-8?q?eazJf7fIsUfYcRoUZcZcxZ1twKoPEyarLppmmaZqMIeC8D6gy28yDU4EmIQgHencY?= =?utf-8?q?RmSiJD7FPOVgH38sZM9mtZBtlb28Tlyc5mYek3qGG+qd64KRbLOo3sTkfGyCAEeN/?= =?utf-8?q?Hal2lxc8JjuOqinscgu5bZy0BNTTWIIeIO/NZRvxbe7WTFn3YQvtMoCZ0fFeAQTzN?= =?utf-8?q?oQAardd8Yf6A1T2s6kENHBZQm7eZlO/0TWYcv1yrKJuDyzP845CODH8DR6CbO9FMk?= =?utf-8?q?18iM5rAG+bE0dmck8msFrrRyiwxhFbr8viYNQnCkofNgdqJZDKCZph2eIdaVeRkVc?= =?utf-8?q?DVennpf9Hsjl/Q0s/iL/qFYsbys/bm8B9pz/f/XZEsZynMS4uw9n2PgjqFwn3oQpV?= =?utf-8?q?tKlsZM4fMkqt3G5HW3m9uvcWj2JxtAG2JfHNgRjXlFrTQrE3qnTDGPU=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: b19e035a-ed2c-4a63-b18b-08dc321d1128 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:06:00.3976 (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: mDdtUgadmeTZVk6PDBEmbGi/+23v3G5qvjEQUy2imIPuvfuyzKjkBmD3+IOUrEYgEqN6zy0153pTmvJ0FibicXlzCoiPB8Tr9pwlI7BcMys= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5577 The XMOS XVF3500 VocalFusion Voice Processor[1] is a low-latency, 32-bit multicore controller for voice processing. This device 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. Such power sequence is already supported by the onboard_hub driver, and it can be reused for non-hub USB devices as well. Once in normal operation, the XVF3500 registers itself as a USB device, and it does not require any device-specific operations in the driver. [1] https://www.xmos.com/xvf3500/ Signed-off-by: Javier Carrasco --- drivers/usb/misc/onboard_usb_dev.c | 2 ++ drivers/usb/misc/onboard_usb_dev.h | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c index e66fcac93006..e717d1ca8d79 100644 --- a/drivers/usb/misc/onboard_usb_dev.c +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -388,6 +388,7 @@ static struct platform_driver onboard_dev_driver = { #define VENDOR_ID_REALTEK 0x0bda #define VENDOR_ID_TI 0x0451 #define VENDOR_ID_VIA 0x2109 +#define VENDOR_ID_XMOS 0x20B1 /* * Returns the onboard_dev platform device that is associated with the USB @@ -480,6 +481,7 @@ static const struct usb_device_id onboard_dev_id_table[] = { { USB_DEVICE(VENDOR_ID_TI, 0x8142) }, /* TI USB8041 2.0 */ { USB_DEVICE(VENDOR_ID_VIA, 0x0817) }, /* VIA VL817 3.1 */ { USB_DEVICE(VENDOR_ID_VIA, 0x2817) }, /* VIA VL817 2.0 */ + { USB_DEVICE(VENDOR_ID_XMOS, 0x0013) }, /* XVF3500 */ {} }; MODULE_DEVICE_TABLE(usb, onboard_dev_id_table); diff --git a/drivers/usb/misc/onboard_usb_dev.h b/drivers/usb/misc/onboard_usb_dev.h index 59dced6bd339..921a5276fc7f 100644 --- a/drivers/usb/misc/onboard_usb_dev.h +++ b/drivers/usb/misc/onboard_usb_dev.h @@ -89,6 +89,13 @@ static const struct onboard_dev_pdata vialab_vl817_data = { .is_hub = true, }; +static const struct onboard_dev_pdata xmos_xvf3500_data = { + .reset_us = 1, + .num_supplies = 2, + .supply_names = { "vdd", "vddio" }, + .is_hub = false, +}; + static const struct of_device_id onboard_dev_match[] = { { .compatible = "usb424,2412", .data = µchip_usb424_data, }, { .compatible = "usb424,2514", .data = µchip_usb424_data, }, @@ -110,6 +117,7 @@ static const struct of_device_id onboard_dev_match[] = { { .compatible = "usbbda,5414", .data = &realtek_rts5411_data, }, { .compatible = "usb2109,817", .data = &vialab_vl817_data, }, { .compatible = "usb2109,2817", .data = &vialab_vl817_data, }, + { .compatible = "usb20b1,0013", .data = &xmos_xvf3500_data, }, {} };