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 B6A52C433F5 for ; Wed, 13 Oct 2021 17:44:47 +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 E4B2360E0B for ; Wed, 13 Oct 2021 17:44:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E4B2360E0B 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 D5E5883786; Wed, 13 Oct 2021 19:44:44 +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="wESKbzZ5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 479B383785; Wed, 13 Oct 2021 19:44:42 +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 567DA835DF for ; Wed, 13 Oct 2021 19:44:38 +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 9179022247; Wed, 13 Oct 2021 19:44:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1634147078; 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=uWRt0817siMYqgdQzQihmvBr2yOIcUYffId7CjMVKxQ=; b=wESKbzZ57YKp1dgUhJuRDjliIkfYzUX8Qb3BH3CSGlJO67CeEE9OG6/LGEXOZzvF8E80+6 Ngs6Ie4aDrRsu0a+BXM6udJ5alnM2K04/aEdPF/V+e0gS0IM5TQA4MyGsENkCTdxptlPO9 PElqEf2OZJB1A/QC6mhkPKwb/DqcaUw= From: Michael Walle To: u-boot@lists.denx.de Cc: Marek Vasut , Simon Glass , Ran Wang , Michael Walle Subject: [PATCH 0/8] usb: dwc3: add Layerscape SoC support Date: Wed, 13 Oct 2021 19:44:23 +0200 Message-Id: <20211013174431.652550-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). Michael Walle (8): dm: core: add 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 +++ 9 files changed, 397 insertions(+), 18 deletions(-) create mode 100644 drivers/usb/dwc3/dwc3-layerscape.c -- 2.30.2