From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFA48C4338F for ; Mon, 23 Aug 2021 14:03:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D55261262 for ; Mon, 23 Aug 2021 14:03:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7D55261262 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AR01UYFBHNsr4ZWKUuHdT4EQXjvtl6tel2Upc+2UZQg=; b=emtwYWrG7sKiG8 hmKD32nl5ZR0Cw48wdH3b7dxkbO5IGw1XldaYwAKyOrmanHo43L4DXgNoxsq2y1sFyWTeGbTtFFeb an2Kz3SD1Lpf5E3sDCx2xrkbFnki8ayQX5g1HzcdO+mNnrCvKAGT+U24EC5QRyeCtGZ+6vOgGrFa0 r0PGghsH2Aznh8KEMc4VEP/M2BM+d8Hk2xbEFlJNOHemyn48n2giX7OfMM6LGgGqMo3R3f/hcfGhW 9FpJDWbLz/tb0pB6Mphbktxb4fts/AtO2jSbYBdVX6rG42uiqL5ICHbQIYuj9S2e6AHK2kgu2y+9l nNXXK+sBInFr09rP2UuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIAVk-00HAVi-UE; Mon, 23 Aug 2021 14:01:13 +0000 Received: from netrider.rowland.org ([192.131.102.5]) by bombadil.infradead.org with smtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIAVd-00HASL-EU for linux-arm-kernel@lists.infradead.org; Mon, 23 Aug 2021 14:01:10 +0000 Received: (qmail 121444 invoked by uid 1000); 23 Aug 2021 10:00:52 -0400 Date: Mon, 23 Aug 2021 10:00:52 -0400 From: Alan Stern To: Alexander Dahl Cc: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, rca@thorsis.com Subject: Re: Enable HSIC Host Port on Atmel/Microchip SAMA5D2 Message-ID: <20210823140052.GA120849@rowland.harvard.edu> References: <2869763.XZdSvA6Ref@ada> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2869763.XZdSvA6Ref@ada> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210823_070105_682112_161DAE74 X-CRM114-Status: GOOD ( 23.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 23, 2021 at 11:24:35AM +0200, Alexander Dahl wrote: > Hello, > > for a new embedded board featuring a Microchip SAMA5D2 SoC (64 MiB SiP variant > SAMA5D27C-D5M) we connected the third USB host port (HSIC only) with an > USB3503 hub chip. This doesn't work out of the box with the Linux kernel > currently, because neither the SoC nor the kernel does enable the HSIC > interface by default. > > That SoC has three USB host ports, from the SAMA5D2 Series Datasheet [1] I > learned there's a flag in an EHCI register, which has to be set to enable the > HSIC interface on port C, the third port. (Section "41.7.14 EHCI: REG08 - HSIC > Enable/Disable" of the datasheet.) I suppose that register is vendor specific. > The register definitions in '/include/linux/usb/ehci_def.h' do not contain > that register. > > Where would I add that register definition and set that flag in the kernel > then? I suppose in the vendor specific ehci driver? > That would be 'drivers/usb/host/ehci-atmel.c' right? That is where you would set the flag. You might want to put the register definition in ehci_def.h, with the other definitions. > Since that feature is optional (other boards don't need to turn on hsic on > that port), some driver specific new device tree binding would be necessary, > right? I suppose that would have to be documented in 'Documentation/ > devicetree/bindings/usb/atmel-usb.txt' right? (Or that would have to be > converted to yaml first?) Yes, it would have to go into the device tree data somehow. I don't know the best way to do this; people who know more about DT may be able to tell you. > Is this the right track? If yes, I'm going to develop patches for this. > Otherwise any hint into the right direction are highly appreciated. Yes, this is the right approach. Alan Stern > FWIW, I'm not the first one struggling [2] with this problem. ;-) > > Greets > Alex > > [1] https://www.microchip.com/en-us/product/ATSAMA5D27C-D5M#document-table > [2] https://community.atmel.com/forum/sama5d2-using-hsic-under-linux _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel