Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752731AbcKPMGk (ORCPT ); Wed, 16 Nov 2016 07:06:40 -0500 Received: from mail-db5eur01on0059.outbound.protection.outlook.com ([104.47.2.59]:2824 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751913AbcKPMGi (ORCPT ); Wed, 16 Nov 2016 07:06:38 -0500 From: Sriram Dash To: Scott Wood , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" CC: "mark.rutland@arm.com" , "felipe.balbi@linux.intel.com" , "mathias.nyman@intel.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "kishon@ti.com" , "robh+dt@kernel.org" , "stern@rowland.harvard.edu" , Suresh Gupta , "gregkh@linuxfoundation.org" , "pku.leo@gmail.com" Subject: RE: [upstream-release] [PATCH 1/2] drivers: usb: phy: Add qoriq usb 3.0 phy driver support Thread-Topic: [upstream-release] [PATCH 1/2] drivers: usb: phy: Add qoriq usb 3.0 phy driver support Thread-Index: AQHSPpFDCWlUkKh88UW4QNNVDxolJKDbYJJw Date: Wed, 16 Nov 2016 11:33:11 +0000 Message-ID: References: <1479101215-26954-1-git-send-email-sriram.dash@nxp.com> <1479101215-26954-2-git-send-email-sriram.dash@nxp.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=sriram.dash@nxp.com; x-originating-ip: [192.88.169.1] x-microsoft-exchange-diagnostics: 1;DB5PR0401MB1928;7:+p+5cRcwWZNFDESFAcxIWsz7AuyrL6TesoRWRWqvhOjK3ANO0NecQDUBistOX1x1KL5Iz/7NObhv9rUyz1XWEjD+ay/edTDOHAyLO/i6fiZe9J+cVhTXScvnwCZlOGWj7X4ip8oq6ZUWlii2XptwSPb52yJrh1x28WNDNh56W5jdaCMlrkWTPlyeWpZZcbZYvcMjHuLs+2C0H1YAdeVVoV8HVLROV1922/NtCSC5qBp/8MgzVayaXXj5VOxRDmG0QwV/BJGOQSbL5P1qItydv9t0YDaYLrj3u+QnqCEd8J3+aAoMKKBWb+R3Hcwwz9ADnH+FH7WDqywcKpLNs4XujQ6/V1+HwNmYMQGRCiJcj9w= x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10009020)(6009001)(7916002)(189002)(377454003)(199003)(24454002)(43544003)(122556002)(76576001)(6506003)(305945005)(4326007)(6116002)(2900100001)(3846002)(102836003)(74316002)(2201001)(76176999)(54356999)(101416001)(50986999)(87936001)(92566002)(106356001)(2501003)(106116001)(105586002)(86362001)(5660300001)(7696004)(2950100002)(3280700002)(3660700001)(5001770100001)(68736007)(97736004)(66066001)(93886004)(229853002)(77096005)(2906002)(7846002)(7736002)(33656002)(189998001)(9686002)(81166006)(81156014)(8936002)(7416002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB5PR0401MB1928;H:DB5PR0401MB1925.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-correlation-id: 6ad7bcea-89f3-41eb-29f1-08d40e145883 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR0401MB1928; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040281)(6060326)(6045074)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041223)(6046074)(6061324);SRVR:DB5PR0401MB1928;BCL:0;PCL:0;RULEID:;SRVR:DB5PR0401MB1928; x-forefront-prvs: 01283822F8 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Nov 2016 11:33:11.0896 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0401MB1928 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uAGC6p1B002232 Content-Length: 3219 Lines: 95 >From: Scott Wood >On 11/15/2016 06:39 AM, Sriram Dash wrote: >>> From: Scott Wood >>> On 11/13/2016 11:27 PM, Sriram Dash wrote: >>>> diff --git >>>> a/Documentation/devicetree/bindings/phy/phy-qoriq-usb3.txt >>>> b/Documentation/devicetree/bindings/phy/phy-qoriq-usb3.txt >>>> new file mode 100644 >>>> index 0000000..d934c80 >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/phy/phy-qoriq-usb3.txt >>>> @@ -0,0 +1,36 @@ >>>> +Driver for Freescale USB 3.0 PHY >>>> + >>>> +Required properties: >>>> + >>>> +- compatible : fsl,qoriq-usb3-phy >>> >> >> Hi Scott, >> >>> This is a very vague compatible. Are there versioning registers >>> within this register block? >>> >> >> There are versioning registers for the phy (1.0 and 1.1). But the >> current erratum >> A008751 does not require the mentioning of the version numbers. Was >> planning to take care of the versioning when there is code diversity >> on the basis of the version number. > >That is not how device tree bindings work. The describe the hardware, not the >driver. > >That said, is the block version sufficient to tell whether a given chip has this >erratum? If so, you don't need a special property for the erratum. If not, what is >different about the PHY that is not described by the versioning? > >In any case, it would be nice to mention the version register and its offset in the >binding, just so that it becomes part of the definition of this compatible string, and >if we come out with some QorIQ chip with a >USB3 PHY that is totally different and doesn't have that version register, it'll be >clear that it needs a different compatible. > Okay. Will include version number in the next rev for Documentation and dt. >>>> +static inline u32 qoriq_usb3_phy_readl(void __iomem *addr, u32 >>>> +offset) { >>>> + return __raw_readl(addr + offset); } >>>> + >>>> +static inline void qoriq_usb3_phy_writel(void __iomem *addr, u32 offset, >>>> + u32 data) >>>> +{ >>>> + __raw_writel(data, addr + offset); } >>> >>> Why raw? Besides missing barriers, this will cause the accesses to >>> be native-endian which is not correct. >>> >> >> The only reason for __raw_writel is to make the code faster. > >Does that really matter here? > >> However, shall I use writel(with both barriers and byte swap) instead > >Yes, if the registers are little-endian on all chips. > The endianness is not same for all Socs. But for most Socs, it is big-endian. Is "iowrite32be" better instead? >> and then make appropriate changes in the value 32'h27672B2A? > >Not sure what you mean here. > >> In my knowledge, there are more than 5 errata in pipeline, > >Then please get all of these errata described in the device tree ASAP (unless their >presence can be reliably inferred from the block version, as discussed above). > Yes. We will push the errata asap. >> However, in future, if any other erratum comes up, and it has to be >> applied at any point other than during init, then the variable has to >> be added in qoriq_usb3_phy struct and the property has to be read separately. > >Or if the erratum is detected by some means other than a device tree property... > Yes. For any other case also, it will be handled differently. >-Scott