Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FBE2C433F5 for ; Fri, 15 Oct 2021 13:15:45 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A040E61151 for ; Fri, 15 Oct 2021 13:15:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A040E61151 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 38D2583889; Fri, 15 Oct 2021 15:15:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.b="tqNGNQRW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BD83883656; Fri, 15 Oct 2021 15:15:35 +0200 (CEST) Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3B06D83656 for ; Fri, 15 Oct 2021 15:15:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@walle.cc Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 77B8022236; Fri, 15 Oct 2021 15:15:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1634303730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=lvM9C8S7eOF5Pf50I2fuUnrLxHX6xjMnKudbp3LN8WY=; b=tqNGNQRWuvmUFHLX9AfHxAJJOcEpM4AKb7cGDSkzR5lSYgB8tfiFKsJI48ipjqw+4fFDmB l64NJEs8sJxbrtwgN1VzErslqwVFbOkjiWeAZ0QtikwM7KpjCPluwVPfPDdGANZT1szK7k 1BGoXBQP9fKXKvQtXhiZlCCHZ40z6Qc= From: Michael Walle To: u-boot@lists.denx.de Cc: Marek Vasut , Simon Glass , Ran Wang , Michael Walle Subject: [PATCH v2 0/9] usb: dwc3: add Layerscape SoC support Date: Fri, 15 Oct 2021 15:15:16 +0200 Message-Id: <20211015131525.721323-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Primarily, this will add support for peripheral mode on Layerscape SoCs. For this to work, we have to backport two fixes from linux and fix the fixup code for the DWC3 controller (which enables snooping because the SoC has wrong startup defaults). As a first user of the driver, enable it on the Kontron SL28 board, where both host and peripheral mode was tested. OTG mode is not supported. For this to work, one would need to read the hardware status of the OTG pin in the bind() op. But it isn't allowed to access the hardware in the bind() op (if I understand Simon correctly). changes since v1: - added test case for the new ofnode_for_each_compatible_node() Michael Walle (9): dm: core: add ofnode_for_each_compatible_node() test: dm: add test for ofnode_for_each_compatible_node() armv8: fsl-layerscape: rework the dwc3 snooping enable code usb: common: silence dubious errors usb: dwc3: Add frame length adjustment quirk usb: dwc3: Enable undefined length INCR burst type usb: dwc3: add layerscape support board: sl28: switch to dwc3 driver board: sl28: enable USB periheral support and gadgets arch/arm/cpu/armv8/fsl-layerscape/soc.c | 28 ++- configs/kontron_sl28_defconfig | 9 +- drivers/usb/common/common.c | 4 +- drivers/usb/dwc3/Kconfig | 10 ++ drivers/usb/dwc3/Makefile | 1 + drivers/usb/dwc3/core.c | 95 ++++++++++ drivers/usb/dwc3/core.h | 22 +++ drivers/usb/dwc3/dwc3-layerscape.c | 222 ++++++++++++++++++++++++ include/dm/ofnode.h | 24 +++ test/dm/ofnode.c | 18 ++ 10 files changed, 415 insertions(+), 18 deletions(-) create mode 100644 drivers/usb/dwc3/dwc3-layerscape.c -- 2.30.2