From patchwork Wed Sep 27 09:55:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomer Maimon X-Patchwork-Id: 727054 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 0177A14AA6; Wed, 27 Sep 2023 09:55:29 +0000 (UTC) Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01hn2212.outbound.protection.outlook.com [52.100.223.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25F9010E; Wed, 27 Sep 2023 02:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TjShKLKkRMcPKTNbcHEJVxOSPtGcuwCkss8enhBf5SofpE9DvQY9gy8rgjxA9CLGQnnTYMz2RzidN+WFX0MKNP8z45Tr8WodW7iFpR47JHX5NCSRE87cHd+VAJvKEAr64/NfrpeMmzn09YvQDn2lukJTEwTlCTPhhyPaTZXEkV6F2wkuXiGOMoKDOD1ZpVvrhxZT8CjoFTG4fd9OVlJM5MGsC7sJ3rMS+ZsYm4P1GPMtn0IPYvN96EVpz9nWjMNLsaTD0FJo4KgZxI13exwj/5YOOmsplkvbYe/EUkpSynn+0nUfecl/wsToWUUTO/9FPm5cNQn0kjYtc/fwRop5hA== 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=z1Kp9hXECWrSVj3RrKfs1suUHvBoFn9FhI6/bx2zAxE=; b=dZCUpIOcS04n2L4WfvOzvpwaFsArjSqiDh6rhgaR/6zK/Za2miEJOPD3Rh8X3yXfP9IVHCvMXuAImsrwmfOKXxai+/RBlUE3aNpI565VcWIG8mvrvQ+I9ZyayuVxUFzYKIOd5rBWXKPsZyhJ4aY+ZFN1D0s+sZo2wiERFKBMvxYmQlISu5SdyohsNDtqYDDSrDVQoFL6jBP9x9RbrCJp1V4mOavD8YH4uScRw+ims1rvXIiE0sQnzihPdKWTMBnBt4xgrNJ8CzUot08WMx8r9FqIz2/nXIlt0ZzBaHifvRS2VLjSnhImgQeKXAHGYXjXN/Lq+OW5UbPLGYp27SgHJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 175.98.123.7) smtp.rcpttodomain=gmail.com smtp.mailfrom=nuvoton.com; dmarc=fail (p=none sp=quarantine pct=100) action=none header.from=gmail.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuvoton.onmicrosoft.com; s=selector2-nuvoton-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z1Kp9hXECWrSVj3RrKfs1suUHvBoFn9FhI6/bx2zAxE=; b=DsmtdEYk/5Z6IzMm0jPUZOMS/XyQEh1xSD5ytouFh/ZsnPN85IFJRhR0NrQZLrWujRpntxzl+J1pUTv9G39eGhJiY9nZjWz8r1TeGKvEr/lJ28IUt6mBj4TZ1eNCCKgvN3j3zsoy3uVTywsr5l7muGD9g7Wiw4yqXQj8Uc56BII= Received: from SI2PR02CA0012.apcprd02.prod.outlook.com (2603:1096:4:194::7) by JH0PR03MB8351.apcprd03.prod.outlook.com (2603:1096:990:49::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21; Wed, 27 Sep 2023 09:55:24 +0000 Received: from SG1PEPF000082E7.apcprd02.prod.outlook.com (2603:1096:4:194:cafe::a4) by SI2PR02CA0012.outlook.office365.com (2603:1096:4:194::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.35 via Frontend Transport; Wed, 27 Sep 2023 09:55:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 175.98.123.7) smtp.mailfrom=nuvoton.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=gmail.com; Received-SPF: Pass (protection.outlook.com: domain of nuvoton.com designates 175.98.123.7 as permitted sender) receiver=protection.outlook.com; client-ip=175.98.123.7; helo=NTHCCAS04.nuvoton.com; pr=C Received: from NTHCCAS04.nuvoton.com (175.98.123.7) by SG1PEPF000082E7.mail.protection.outlook.com (10.167.240.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.6838.14 via Frontend Transport; Wed, 27 Sep 2023 09:55:24 +0000 Received: from NTHCCAS01.nuvoton.com (10.1.8.28) by NTHCCAS04.nuvoton.com (10.1.8.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.14; Wed, 27 Sep 2023 17:55:12 +0800 Received: from taln60.nuvoton.co.il (10.191.1.180) by NTHCCAS01.nuvoton.com (10.1.8.28) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Wed, 27 Sep 2023 17:55:11 +0800 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id 2803664740; Wed, 27 Sep 2023 12:55:11 +0300 (IDT) From: Tomer Maimon To: , , , , , , , , , , , , CC: , , , , Tomer Maimon Subject: [PATCH v2 0/3] usb: ChipIdea: add Nuvoton NPCM UDC support Date: Wed, 27 Sep 2023 12:55:06 +0300 Message-ID: <20230927095509.267029-1-tmaimon77@gmail.com> X-Mailer: git-send-email 2.33.0 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NotSetDelaration: True X-EOPAttributedMessage: 0 X-MS-Exchange-SkipListedInternetSender: ip=[175.98.123.7]; domain=NTHCCAS04.nuvoton.com X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG1PEPF000082E7:EE_|JH0PR03MB8351:EE_ X-MS-Office365-Filtering-Correlation-Id: 6142c8f5-be9a-4db4-6157-08dbbf3fdf03 X-MS-Exchange-SenderADCheck: 0 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?utf-8?q?+tspV1J8lOrX0V5GAh7DcCs5PBUEcqt?= =?utf-8?q?gOoNgxv+GlIayYLHcVbHPgqCdKb3PGYN6qOQnzmTQb0p4hNQ3j3qCjPtiwbk1pnSX?= =?utf-8?q?3H+Q10DgKUkLe04ndXH+ZH+qZhRABMPIfoCZWLsUiHvM7WBjZCIRh1fcMIuLN706p?= =?utf-8?q?tDNuGUZOqwTVOYGZJCMYF9SBp/pWNaTkDaTGNo5U59zbw1ewL/mqn5pjvuqE8F7sB?= =?utf-8?q?+bYU+IjZwlZGeYIZDCaiY2hEjN5xfyp0/LdVNBc9Wzt+iFWRE6+ujt7JOKCkxvx2b?= =?utf-8?q?zZ825cde9XQkCDkViYVHHiwdnPiyDZWXNg1K+h4D4sIodBVmfiJBqDJeknLMyTW+S?= =?utf-8?q?8cw/vfo55JoV1LE73uhTQjbkmpf+KIqhx9OKh7O6gHm7ESvcdJm4YZI33cgSGGRn8?= =?utf-8?q?PSygGpghc13jiGtpYHJuORLpI9BmNN3/TgxueGzJ2SBpXHi1bTyJu8PbA/FeQaL2M?= =?utf-8?q?ff3Ll6k6rWd5o60vgullaaeKLmxfF+7fvRiCKTq/f7YtQcVWCyEexOSX2ZTv5odV0?= =?utf-8?q?0/7OoOGwaThj4lbAu1D0DXGsf9XCf9vq9f0fMk787PB634DP5gsiMnfk1fo7rZ/YH?= =?utf-8?q?jWYjw6CHy1ayfp/+C71qLWN+qEpeHKKh/avNqU3KElZbIJ7xC90Zj8n8ACNSvFWXw?= =?utf-8?q?BlpiwKd/+ju1QhGed7LSNp4YoWuto2dBrGszXxLw8NHZX85SskRlkNAn/Ybx0iE57?= =?utf-8?q?KvbIzgSMZ60/HM/EOvSFVuc3mGhxv/r3ff4rOepuLg0hsu5sgOwc7XMkCQBFZX54F?= =?utf-8?q?K+3xYas3OQVzOGMmysZYTOwZDRKhgiS/U/+TEOxEjOlWTrUF5b5HYnesu3kghDsxu?= =?utf-8?q?5zk9SjMNx0GzInwXyrRYr2Pf6ClTQ8og7N9pwkS6sJnL2D0lZfDSJyXg2+GaTXpAN?= =?utf-8?q?wOX9+pX6OxZTAzoiBI5Wna5X0UwpDf+qzS3tPw1NfdmOlNlGIBYxthLs7eJa+IBmZ?= =?utf-8?q?YBW5hss0qctnDRC7ni?= X-Forefront-Antispam-Report: CIP:175.98.123.7; CTRY:TW; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:NTHCCAS04.nuvoton.com; PTR:175-98-123-7.static.tfn.net.tw; CAT:NONE; SFS:(13230031)(4636009)(136003)(396003)(39860400002)(376002)(346002)(230922051799003)(48200799006)(451199024)(82310400011)(5400799018)(61400799006)(186009)(36840700001)(46966006)(40470700004)(54906003)(966005)(478600001)(110136005)(70586007)(76482006)(70206006)(47076005)(40460700003)(6666004)(316002)(42186006)(36756003)(6266002)(336012)(40480700001)(1076003)(42882007)(73392003)(66574015)(41300700001)(2616005)(82202003)(34020700004)(26005)(5660300002)(83380400001)(55446002)(83170400001)(81166007)(36860700001)(8676002)(4326008)(2906002)(82740400003)(8936002)(7416002)(921005)(356005)(45356006)(84790400001)(35450700002)(12100799045); DIR:OUT; SFP:1501; X-OriginatorOrg: nuvoton.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 09:55:24.7192 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6142c8f5-be9a-4db4-6157-08dbbf3fdf03 X-MS-Exchange-CrossTenant-Id: a3f24931-d403-4b4a-94f1-7d83ac638e07 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a3f24931-d403-4b4a-94f1-7d83ac638e07; Ip=[175.98.123.7]; Helo=[NTHCCAS04.nuvoton.com] X-MS-Exchange-CrossTenant-AuthSource: SG1PEPF000082E7.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR03MB8351 X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net This patch set add USB device controller for the NPCM Baseboard Management Controllers (BMC). NPCM UDC driver is a part of the USB ChipIdea driver. Adding CI_HDRC_FORCE_VBUS_ACTIVE_ALWAYS flag to modify the vbus_active parameter to active in case the ChipIdea USB IP role is device-only and there is no otgsc register. BMC NPCM7XX and BMC NPCM8XX has ten identical NPCM UDC modules, The NPCM UDC were tested on NPCM845 evaluation board. Addressed comments from: - Rob Herring : https://www.spinics.net/lists/linux-usb/msg246811.html - Krzysztof Kozlowski : https://www.spinics.net/lists/linux-usb/msg246773.html - kernel test robot : https://www.spinics.net/lists/devicetree/msg634160.html - Jonathan Neuschäfer : https://www.spinics.net/lists/linux-usb/msg246790.html Changes since version 1: - Add SoC specific compatible. - Remove USB phy mux property from dt-binding, will be handled differently. - Add CI_HDRC_FORCE_VBUS_ACTIVE_ALWAYS commit to this patch set. Tomer Maimon (3): usb: chipidea: add CI_HDRC_FORCE_VBUS_ACTIVE_ALWAYS flag dt-bindings: usb: ci-hdrc-usb2: add npcm750 and npcm845 compatible usb: chipidea: Add support for NPCM .../devicetree/bindings/usb/ci-hdrc-usb2.yaml | 4 + drivers/usb/chipidea/Kconfig | 4 + drivers/usb/chipidea/Makefile | 1 + drivers/usb/chipidea/ci_hdrc_npcm.c | 117 ++++++++++++++++++ drivers/usb/chipidea/otg.c | 5 +- include/linux/usb/chipidea.h | 1 + 6 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 drivers/usb/chipidea/ci_hdrc_npcm.c