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=-16.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable 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 AE829C4338F for ; Tue, 24 Aug 2021 06:45:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8FF6C61265 for ; Tue, 24 Aug 2021 06:45:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233256AbhHXGqO (ORCPT ); Tue, 24 Aug 2021 02:46:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:44312 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230497AbhHXGqM (ORCPT ); Tue, 24 Aug 2021 02:46:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5D87F61101; Tue, 24 Aug 2021 06:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1629787529; bh=Kubh2nvvp1Q6uolaYfDooSop8qoFrJBPwS451q3QqQQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xGWMER6q+ZDV6Hm4DxrGKvKsHkFDy8BDt6PNPXTysOZDKEdnwernVRLzn7TS/3Evl GUhFInVIHNNsVxBZSDZ0VmXBTNgiiT2TJiC2djbzXkYTqJoXGLDf2G57b6ZSyxLmK9 P+TCRogG1zFDExrBgJV1rbTjS3lR406ezv9jq510= Date: Tue, 24 Aug 2021 08:45:25 +0200 From: Greg Kroah-Hartman To: Alexander Dahl Cc: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Alan Stern , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] USB: host: ehci-atmel: Allow enabling HSIC on SAMA5D2 Message-ID: References: <20210823140052.GA120849@rowland.harvard.edu> <20210824063702.24586-1-ada@thorsis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210824063702.24586-1-ada@thorsis.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 24, 2021 at 08:37:02AM +0200, Alexander Dahl wrote: > Unlike other SoC series featuring the 'atmel,at91sam9g45-ehci' USB EHCI > controller, which have embedded USB high-speed transceivers for each > port, the third port on the SAMA5D2 series is HSIC only. That HSIC > interface is not enabled after a power-on reset, but can be enabled by > setting a flag in a vendor specific EHCI register. > > The register offsets added to the new header file were compared with > those for the SAM9G45, SAM9X25, SAMA5D3, SAMA5D4, and SAM9X60 series and > there are no differences in the offsets or contents of those registers. > Which of those additional vendor specific registers are supported, > differs by SoC family. So while the HSIC enable feature is currently > only present for SAMA5D2, it probably does not hurt to set it on the > other families, hence no additional check for SoC family here. > > Tested on a custom board featuring a SAMA5D27C-D5M SiP connected to an > USB3503 hub with an upstream HSIC interface. > > Link: https://community.atmel.com/forum/sama5d2-using-hsic-under-linux > Signed-off-by: Alexander Dahl > --- > > Notes: > - for introducing new dt binding, would be nice to convert old one > first, probably needs split up and multiple iteration review? > - name of that new dt property? > - register definitions put to a separate file, like > 'drivers/usb/host/ehci-fsl.h' > - unsure where exactly in the probe process that register write should > happen, datasheet gives no hint > - should suspend/resume be considered? > > drivers/usb/host/ehci-atmel.c | 17 +++++++++++++++++ > drivers/usb/host/ehci-atmel.h | 19 +++++++++++++++++++ No need for a new .h file that is only used in a single .c file. Just put those few lines in the .c file please. thanks, greg k-h 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=-14.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 44CB4C4338F for ; Tue, 24 Aug 2021 06:47:59 +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 0000461212 for ; Tue, 24 Aug 2021 06:47:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0000461212 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=Kn4snhUjqr1Nv89ypjhzcJo6WoODpPL+hRrm3vta4qI=; b=N2EACYTsUmhJXi 74mHlPFdYoFkRZmFt0XPWekJequoZ8uLOStEq0MspT2fH0uPIOYLCyCDtrXt0AOrDAoWriP0o/m7b mGGs2uXeVeaATbjX1kmqhxTFIg4UHulT33NoghpgTRkFYL0U3HwpHv/WjwyqWhTupzI4FasleJDZ+ ERjFFFx6NKA4tfmrrQvkwXUUnALnTitIHXZUZb8gPwhawSIv2GvnBXT3W1HOq30nWNF+hjF9n6Dcs oPijJyuiq+w2+6fHwTAJnXgUAAwipZBBHxiRlSjp4oCaH7WDGYhysx2Dxn1bZO7Kze/c2fkVn5XnA GpBbvCqdayk77gNFXvtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIQBl-001uqu-49; Tue, 24 Aug 2021 06:45:37 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIQBe-001uoq-A9 for linux-arm-kernel@lists.infradead.org; Tue, 24 Aug 2021 06:45:34 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5D87F61101; Tue, 24 Aug 2021 06:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1629787529; bh=Kubh2nvvp1Q6uolaYfDooSop8qoFrJBPwS451q3QqQQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xGWMER6q+ZDV6Hm4DxrGKvKsHkFDy8BDt6PNPXTysOZDKEdnwernVRLzn7TS/3Evl GUhFInVIHNNsVxBZSDZ0VmXBTNgiiT2TJiC2djbzXkYTqJoXGLDf2G57b6ZSyxLmK9 P+TCRogG1zFDExrBgJV1rbTjS3lR406ezv9jq510= Date: Tue, 24 Aug 2021 08:45:25 +0200 From: Greg Kroah-Hartman To: Alexander Dahl Subject: Re: [RFC PATCH] USB: host: ehci-atmel: Allow enabling HSIC on SAMA5D2 Message-ID: References: <20210823140052.GA120849@rowland.harvard.edu> <20210824063702.24586-1-ada@thorsis.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210824063702.24586-1-ada@thorsis.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210823_234530_412718_D77A89B4 X-CRM114-Status: GOOD ( 19.85 ) 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: , Cc: Alexandre Belloni , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Ludovic Desroches , Alan Stern , linux-arm-kernel@lists.infradead.org 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 Tue, Aug 24, 2021 at 08:37:02AM +0200, Alexander Dahl wrote: > Unlike other SoC series featuring the 'atmel,at91sam9g45-ehci' USB EHCI > controller, which have embedded USB high-speed transceivers for each > port, the third port on the SAMA5D2 series is HSIC only. That HSIC > interface is not enabled after a power-on reset, but can be enabled by > setting a flag in a vendor specific EHCI register. > > The register offsets added to the new header file were compared with > those for the SAM9G45, SAM9X25, SAMA5D3, SAMA5D4, and SAM9X60 series and > there are no differences in the offsets or contents of those registers. > Which of those additional vendor specific registers are supported, > differs by SoC family. So while the HSIC enable feature is currently > only present for SAMA5D2, it probably does not hurt to set it on the > other families, hence no additional check for SoC family here. > > Tested on a custom board featuring a SAMA5D27C-D5M SiP connected to an > USB3503 hub with an upstream HSIC interface. > > Link: https://community.atmel.com/forum/sama5d2-using-hsic-under-linux > Signed-off-by: Alexander Dahl > --- > > Notes: > - for introducing new dt binding, would be nice to convert old one > first, probably needs split up and multiple iteration review? > - name of that new dt property? > - register definitions put to a separate file, like > 'drivers/usb/host/ehci-fsl.h' > - unsure where exactly in the probe process that register write should > happen, datasheet gives no hint > - should suspend/resume be considered? > > drivers/usb/host/ehci-atmel.c | 17 +++++++++++++++++ > drivers/usb/host/ehci-atmel.h | 19 +++++++++++++++++++ No need for a new .h file that is only used in a single .c file. Just put those few lines in the .c file please. thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel