From patchwork Tue May 11 08:50:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 1476967 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=okWZdckE; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4FfWqM5gnLz9sjJ for ; Tue, 11 May 2021 18:51:11 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230386AbhEKIwO (ORCPT ); Tue, 11 May 2021 04:52:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230316AbhEKIwN (ORCPT ); Tue, 11 May 2021 04:52:13 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 454ABC061574 for ; Tue, 11 May 2021 01:51:07 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id g65so10644243wmg.2 for ; Tue, 11 May 2021 01:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QF3gKv7VTtDVAFANjakXh9njdRISNpRUS3Lr86kJVaY=; b=okWZdckEqGZUXxO3Zjpwgy3oHKs5yLJFHVgqgQY+OITUgoGjavCiCBgizlvL21Tlq/ xfu8EdJWz4GZ4rKFkbbjrAukgz3gMZiNs52UxS4PKXG/G5b4AkL4N5ruDcRO35ykUkKW qKCV8M06TMNJ4l860Mi8zjMC8AML3nGgzuE8PnU48rhmFYWKmeQmRRoAwFqpygGyQ1kA QVfxeXJBVB2x98WTh/9U98c8+4JOGuCgi4qoEFsz0MPPW/NgJrIHsleiWbtoQxgc7Xcn aFPxfLozWrqfiXDQUSPE+qcws/5x6Upc+mfQng4oT7h0qZVszE7dswxrUEfL1ASv4V88 N+bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QF3gKv7VTtDVAFANjakXh9njdRISNpRUS3Lr86kJVaY=; b=mdnmVSu+SvhqMh0ptsHGIzhSV1Eg7PYN6psZiM0mKdoaKITB6c+FqE60A17CBTNh5q Pj5+Tgmvq4CBN/4RmA7/DC6utjP4cnTjW8Bz3+cq1ToO2n3lh903/vOKxoJPavUF1Hj4 ZH9aUr6KBHT5J0IBEX+Rn1X3uKzT5QGFhYuRkdmdsbtwsPysh7zR1hCeWxPRqoz/kf3K tYiuzM8OW280Z7ChzTkySd0GCwFepGhSmrWbpONCnU0RFl2OW4HauMIAj/MICPCpqY/T 4kQ3R8cE5OD/f8ugvFF9mM3p3nH9yQDx6yrwT+AsagWa4iFOTgXOz7fA4WoAOYQoaJpU ONdw== X-Gm-Message-State: AOAM531DsdzunI0dmWTNP8HEV0HLo7Fl6KETJWGeT4458bba6uDecx8P 7LlUFE4uxTepKP/QZ0fBOhFz1A== X-Google-Smtp-Source: ABdhPJyaMx5QLAIag6J1ENl4JC/bE4/GzFR/uT4VfoGaI2CeMRe1M+ktjHPKotLWzxB2FlwM5wiqQg== X-Received: by 2002:a1c:c90f:: with SMTP id f15mr4159209wmb.142.1620723065986; Tue, 11 May 2021 01:51:05 -0700 (PDT) Received: from arch-thunder.local (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id j7sm23042980wmi.21.2021.05.11.01.51.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 01:51:05 -0700 (PDT) From: Rui Miguel Silva To: Greg Kroah-Hartman , Sebastian Siewior , Laurent Pinchart , Rob Herring Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, Rui Miguel Silva Subject: [PATCH v2 0/9] usb: isp1760: extend support for isp1763 Date: Tue, 11 May 2021 09:50:52 +0100 Message-Id: <20210511085101.2081399-1-rui.silva@linaro.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The Arm MPS3 FPGA prototyping board [0] have an isp1763 [1] as USB controller. There is already support for the isp1760 and isp1761 in tree, this series extend the support also for the isp1763. Move register access using regmap, remove some platform data and code, refactor the mempool, use dr_mode to align to existing bindings, then add the support for isp1763 host mode, add bindings files that did not existed and at the end add also support for peripheral mode for isp1763. @Laurent and @Sebastian, I add both of you in the bindings files as maintainers (it is a mandatory field)since you were the ones which contributed with the initial code and peripheral code, let me know if you are ok with it. If yes I may send a follow up to add also entries in MAINTAINERS file that it is also missing. v1 [2] -> v2: kernel test robot: - add two patches (1/9 and 3/9) to fix dozens of pre-existing sparse warnings so that this series does not introduce new ones. No sparse warning left. - fix duplication of regmap fields Laurent: - move initializers from .h to .c - change interrupt registers setup from field to one shot register setting (did not change hcd hw mode init because I think it did not make the difference and even avoid artifact around setting twice the register) Rob test bot: - fix suffix at compatible string to clean up warning in bindings Cheers, Rui [0]: https://developer.arm.com/tools-and-software/development-boards/fpga-prototyping-boards/mps3 [1]: https://media.digikey.com/pdf/Data%20Sheets/ST%20Ericsson%20PDFs/ISP1763A.pdf [2]: https://lore.kernel.org/linux-devicetree/20210504101910.18619-1-rui.silva@linaro.org/ Rui Miguel Silva (9): usb: isp1760: fix strict typechecking usb: isp1760: move to regmap for register access usb: isp1760: use relaxed primitives usb: isp1760: remove platform data struct and code usb: isp1760: hcd: refactor mempool config and setup usb: isp1760: use dr_mode binding usb: isp1760: add support for isp1763 dt-bindings: usb: nxp,isp1760: add bindings usb: isp1763: add peripheral mode .../devicetree/bindings/usb/nxp,isp1760.yaml | 59 + arch/arm/boot/dts/arm-realview-eb.dtsi | 2 +- arch/arm/boot/dts/arm-realview-pb1176.dts | 2 +- arch/arm/boot/dts/arm-realview-pb11mp.dts | 2 +- arch/arm/boot/dts/arm-realview-pbx.dtsi | 2 +- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 2 +- arch/arm/boot/dts/vexpress-v2m.dtsi | 2 +- drivers/usb/isp1760/Kconfig | 4 +- drivers/usb/isp1760/isp1760-core.c | 513 ++++++++- drivers/usb/isp1760/isp1760-core.h | 44 +- drivers/usb/isp1760/isp1760-hcd.c | 1021 ++++++++++++----- drivers/usb/isp1760/isp1760-hcd.h | 57 +- drivers/usb/isp1760/isp1760-if.c | 41 +- drivers/usb/isp1760/isp1760-regs.h | 435 ++++--- drivers/usb/isp1760/isp1760-udc.c | 250 ++-- drivers/usb/isp1760/isp1760-udc.h | 13 +- include/linux/usb/isp1760.h | 19 - 17 files changed, 1758 insertions(+), 710 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/nxp,isp1760.yaml delete mode 100644 include/linux/usb/isp1760.h