From patchwork Mon Oct 2 15:58:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomer Maimon X-Patchwork-Id: 14828 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1723607vqb; Mon, 2 Oct 2023 15:21:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGdD2xUELTmoY7UCQI5NiK2r3u+meD4swJfQBCKoYVFIVNDoFZQqfvIxKr9BFkDYXgNYfcW X-Received: by 2002:a05:6a20:1592:b0:138:92ef:78f9 with SMTP id h18-20020a056a20159200b0013892ef78f9mr12795003pzj.6.1696285261312; Mon, 02 Oct 2023 15:21:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696285261; cv=pass; d=google.com; s=arc-20160816; b=UcIU7+ItbJQQNpZMvAQbzkHe+8LHCouh94s/EC4b36QveAOeBM5SoW4TiT7amlZUcq 4wzZQrNQ3/KZhZLn+izJ7d4HHhmBx4OxNVae+LGBbxCD9NqoSl/jL59s5USVsAh48jzH Ugpe7va5Zb2KTA1YfRxeoUR5rMO8WphYavMYRCypL9+RQnqIAfF1T6zCgENfcEq59fhI 6dra95JYaCG5FVh2qtvKqssiqESxYSbAF97pv2dD3K3ilUb2tFkQT/N6QBl+GyQUyneB MBR+A94Q4ZtBLue6vn5GBSSKSwfPAiJ/eB7J8MjloB4LwffRA8ZJnkm7xeef3zjqNbKz +CyA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=kz+pGrPTo6Q9RvIRMbYVOzaNL3wCvgPOckPVvpbShwk=; fh=S2Yd6ZWf4PE3UWmHWDKlbLbWMSMC5tewAeJBwAWxIdQ=; b=u5ClJJH75mNFeNyoPaiNCz015pOyjBhLBzP+X6OLJuPCEgfkk5UJYORw2vC+abFS1j fugbMvzbSEGislqroIWul5d3FTxXquQ/Ja0oQNJFPb1hwblnZTI+yrMqvPf8l5WYhuem tHq6OusNsgoY8o3kixCe6mtcn8MqzIdSxovTJJN5wnaVHzATfZeTxp8MOjmEn73uIFAP VlHH4YsZhOY9vqH6ZaYuS0IB5//eBc1GpPx8jlRyqu++cSugZ4P7TplxCfgkIrP/hmRA oPTtp3wnk2PgwHwwRxuuzLR+7w6WBevqSaReEydnliOwUvKgMsVVLyaAckGgSZZPmG56 VUlw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nuvoton.onmicrosoft.com header.s=selector2-nuvoton-onmicrosoft-com header.b="RC/zGPZE"; arc=pass (i=1 spf=pass spfdomain=nuvoton.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id a18-20020a63d412000000b00569561773a6si28104077pgh.549.2023.10.02.15.21.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 15:21:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@nuvoton.onmicrosoft.com header.s=selector2-nuvoton-onmicrosoft-com header.b="RC/zGPZE"; arc=pass (i=1 spf=pass spfdomain=nuvoton.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BD44380A90F2; Mon, 2 Oct 2023 08:59:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238343AbjJBP7M (ORCPT + 18 others); Mon, 2 Oct 2023 11:59:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238276AbjJBP7D (ORCPT ); Mon, 2 Oct 2023 11:59:03 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01hn2209.outbound.protection.outlook.com [52.100.164.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55D3EDC; Mon, 2 Oct 2023 08:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iXGDfR19/AIIRx5DqO51pZZUfM8r20VCcaB++W0s4ItH5gfuiVMJj9m5Hb4zs/f+njgusWW7vjlrYhQ/BB6vpqzTRdVQoTDTg8IrGWt46rIavnPEWi6t0qvt5V8uKr/zAS50mUSLCMeAqu5AjMgdiiDOmBusHjAH3N67c0iBTNDh3kMdlRzj0VsSaBWfraOowhVW17KGdip+AS9s8eF/fNQlCNXLsFiNFrsGhgh7LTLCyK6q6Mimx7x/AfjSaUrPjF1RmlJvOUGY5WFDwD3zc80NhDipg0DF7UyfD5h3a6+lXZDghGly2gjOjvWScTPo8gR/nHBiO74pRur2ufkGzQ== 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=kz+pGrPTo6Q9RvIRMbYVOzaNL3wCvgPOckPVvpbShwk=; b=BNzDC+9IjlxKp4Bk8uyPXdePvd+obRfqOduDG9xYjbp41WN0frUHXEuRuQSthg2Kc5E+lcoYIvlCws/VR/c6Oc6053oIATltQpATnqXIyaKbG+/QImrZYXfhoQwARgRSYgs/1JhCyxJGFeu6zt/UY865gLRTRM4qg3veoXrtawQ0or2wZ6k1N8B9/8/KQyCry5al4vk9gquJWFfSv+p3cuSqzqomdJn4msWvBlzJtKYBFrQhdtgI/sR7OgmuDUTiqqWlhwELGDLFJaal8TVlYUak45gcIBfNnwE8A4o4NTJvKntA5oYU7ZWjIF0M57RGUnTcaTBGolQnOCsSKDvOPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 211.75.126.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=kz+pGrPTo6Q9RvIRMbYVOzaNL3wCvgPOckPVvpbShwk=; b=RC/zGPZEu4wHsbWdVvnYZio64G8Ajc4iqhGs29waE44tn0e0a7vP4vyIEGM02AzYU1xr8rVZRfpJQMGqSazBjo5BAmI/sdbvn3v23PdU0zNQb2hWDM+kPY4EZuDE5JgTFWiN0GhXfNJTxMi/Twh4F0OzrXEPqJVZL67MJZQ5xjE= Received: from SG2PR01CA0141.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::21) by SEZPR03MB6764.apcprd03.prod.outlook.com (2603:1096:101:67::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.26; Mon, 2 Oct 2023 15:58:53 +0000 Received: from SG2PEPF000B66CF.apcprd03.prod.outlook.com (2603:1096:4:8f:cafe::8d) by SG2PR01CA0141.outlook.office365.com (2603:1096:4:8f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.30 via Frontend Transport; Mon, 2 Oct 2023 15:58:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 211.75.126.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 211.75.126.7 as permitted sender) receiver=protection.outlook.com; client-ip=211.75.126.7; helo=NTHCCAS01.nuvoton.com; pr=C Received: from NTHCCAS01.nuvoton.com (211.75.126.7) by SG2PEPF000B66CF.mail.protection.outlook.com (10.167.240.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.14 via Frontend Transport; Mon, 2 Oct 2023 15:58:52 +0000 Received: from NTHCML01A.nuvoton.com (10.1.8.177) by NTHCCAS01.nuvoton.com (10.1.8.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 2 Oct 2023 23:58:52 +0800 Received: from NTHCCAS01.nuvoton.com (10.1.8.28) by NTHCML01A.nuvoton.com (10.1.8.177) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 2 Oct 2023 23:58:51 +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; Mon, 2 Oct 2023 23:58:51 +0800 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id A4EA96473F; Mon, 2 Oct 2023 18:58:50 +0300 (IDT) From: Tomer Maimon To: , , , , , , , , , , , , CC: , , , , Tomer Maimon Subject: [PATCH v3 0/3] usb: ChipIdea: add Nuvoton NPCM UDC support Date: Mon, 2 Oct 2023 18:58:45 +0300 Message-ID: <20231002155848.62198-1-tmaimon77@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-NotSetDelaration: True X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PEPF000B66CF:EE_|SEZPR03MB6764:EE_ X-MS-Office365-Filtering-Correlation-Id: 4579838c-66a7-4d48-5adc-08dbc36079a9 X-MS-Exchange-SenderADCheck: 0 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /4J5ITz2WNhXzfKKL+fGH3TQJ4jEkC6xYZH+DpkuFDHTgo4enFLUNSJ7n34i+PPlK9n805giOHEeN7bBhFaIN2MLxIHJ1he9FTH6UzswQlsQxRSHAGP1u3XAPBNOmmzSIrvVEE1O4JAK6TSlfCoet8m5ZMNABFz6PR59xOTMxo4Z0i+2W52naSU8N/it4rctPWmeGkBWOD37KHO9KG59NZEKkMnR/A+NV57S47CYnmw66i5m63lnA5y1F+FJIbG+SRAd8bmYdFtKo+AHmC5xJqfwatJwvhm3cvt0wKO3EU0mDIHSd02gwfEfmcAVmVYdLVnffA86OKPfNPhSwfEn/HpxyNst5H0Edx9f0pTL/g95HDifaQYtxsNJkviay+A2d/hmQaA38zmntxcCXEqUa5a9XKZG+sgD4LkiAXc96wpoiAZ0p7/ZxFKKYoWuYVdDenkr9MzD0CSwPYyzFNwjkGvmzOA++XCMibkwJ4goIjG+Q75fUOEXjlF4Hkwsq1i7iKA6m2B/IO45m57JbZy43gJwyfPEjk8DwxjyyKQOTZRUPvcL2o2tQ8jrGcdlS1q/jt2rAVrLAg2yZkFvLI4xK0i/ck4oZj4DmFHC6S81J4x9r6OGbYis30ZtXQGffRohA/1IS3k5tqBh9W+8nbRNWypEUr0wS83BIDMuEbAt4PAiQH56w/GSOaHUJJ9Q7oueMLwwkPHs/LQYEZaHuEPPKUK8j2SfmeC0jDT7GF9cVsjEhPgC5jvYWu5EvI/k4i0XkcMBKddhJ2zl0GsZwBFki8Df/MiCMJJdy0mKwKc5aMpL3/5oxjXe0t7TNpfttfofMI/QB64/aFSsfdrWCnPKvvCXjCxgEyo0XbBRRrF+vtS8Kd6AQfvv/Ok3L+oKpdYEJO72xs5d0lRvUdeuYe0rTo5tjQPtWooBAavconSlPsTKY33+HnT6uJH0tEu2eO1+GSg75xHEdgkNuE0qheZRlA== X-Forefront-Antispam-Report: CIP:211.75.126.7;CTRY:TW;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:NTHCCAS01.nuvoton.com;PTR:211-75-126-7.hinet-ip.hinet.net;CAT:NONE;SFS:(13230031)(4636009)(346002)(39860400002)(376002)(136003)(396003)(230922051799003)(5400799018)(82310400011)(451199024)(61400799006)(48200799006)(64100799003)(186009)(40470700004)(36840700001)(46966006)(40460700003)(40480700001)(6666004)(966005)(76482006)(478600001)(34020700004)(81166007)(47076005)(36860700001)(921005)(55446002)(41300700001)(356005)(82740400003)(7416002)(73392003)(1076003)(6266002)(83380400001)(36756003)(336012)(82202003)(2906002)(2616005)(42882007)(26005)(42186006)(83170400001)(5660300002)(316002)(8936002)(110136005)(54906003)(8676002)(70206006)(4326008)(70586007)(45356006)(35450700002)(84790400001)(12100799045);DIR:OUT;SFP:1501; X-OriginatorOrg: nuvoton.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2023 15:58:52.7382 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4579838c-66a7-4d48-5adc-08dbc36079a9 X-MS-Exchange-CrossTenant-Id: a3f24931-d403-4b4a-94f1-7d83ac638e07 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a3f24931-d403-4b4a-94f1-7d83ac638e07;Ip=[211.75.126.7];Helo=[NTHCCAS01.nuvoton.com] X-MS-Exchange-CrossTenant-AuthSource: SG2PEPF000B66CF.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR03MB6764 X-Spam-Status: No, score=0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 02 Oct 2023 08:59:32 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778672912053014105 X-GMAIL-MSGID: 1778684013641190970 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: - Krzysztof Kozlowski : https://www.spinics.net/lists/kernel/msg4951321.html Changes since version 2: - Use dev_err_probe. - Remove MODULE_ALIAS. 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 | 114 ++++++++++++++++++ drivers/usb/chipidea/otg.c | 5 +- include/linux/usb/chipidea.h | 1 + 6 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 drivers/usb/chipidea/ci_hdrc_npcm.c