Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753006AbbG2RiV (ORCPT ); Wed, 29 Jul 2015 13:38:21 -0400 Received: from mail-bn1bon0057.outbound.protection.outlook.com ([157.56.111.57]:1184 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752013AbbG2RiS (ORCPT ); Wed, 29 Jul 2015 13:38:18 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none; Date: Wed, 29 Jul 2015 10:38:02 -0700 From: =?utf-8?B?U8O2cmVu?= Brinkmann To: Moritz Fischer CC: Philipp Zabel , , , , , Kumar Gala , "Michal Simek" , , , linux-arm-kernel , Subject: Re: [RFCv2 1/3] docs: dts: Added documentation for Xilinx Zynq Reset Controller bindings. Message-ID: <20150729173802.GO2650@xsjsorenbubuntu> References: <1437783682-13632-1-git-send-email-moritz.fischer@ettus.com> <1437783682-13632-2-git-send-email-moritz.fischer@ettus.com> <20150728025833.GQ2650@xsjsorenbubuntu> <20150728225337.GF2650@xsjsorenbubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21710.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD033;1:ALLIRl4tjW+2dliL8N1uB7mxNfv+Mh8X1nE8fVPjHr7yjeLpKxMPDphXgUnPJi3NZVHii2zYNbTSy6X0baKg8CjcMMnp0Q4sQ6HOgon77vU8W0wjpwwBGAdqSri3Jzcrw+CF5GZDQ94DVOlFTc4Ll8+AcRbBK9yVEOY7nNkFAfryx5ScSommnSg/OeFxZpBuy922gZJSQpg8R8hnXMOlf+piBDeMnyp3Ai6wQNM0KY0oZt7QFIHij9hsp3T3Hye/2mytFZGDgeZsvV3eC+8qR/ZW9OndGF+b9h3iGxk3Q20ZnGNWZpOqLo++so/goe8c X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(199003)(164054003)(189002)(377424004)(377454003)(24454002)(83506001)(76506005)(110136002)(6806004)(19580405001)(4001350100001)(57986006)(36386004)(47776003)(63266004)(189998001)(85202003)(19580395003)(33716001)(92566002)(85182001)(5001960100002)(87936001)(77156002)(2950100001)(77096005)(106466001)(50986999)(33656002)(62966003)(23676002)(86362001)(54356999)(46102003)(93886004)(50466002)(76176999)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1AFFO11HUB038;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11HUB038;2:1idKeCSj/h5dZM4NFP60fPMlqLVqBDgMjzowANV8ikAnQqktERrb5T+99S4MLFBCGOtop7ik8y0uPjRe6lwiFzpa0L/6Ce2sWCfoPT1BWlujWfuFAHibIJL3jY63g0Nhf7PtENOpzF/QaxcR7w4Ctcx9iBl2aPQhAXrypAssFPQ=;3:niJgKs4RkEoKThV89L0yDCELeIIPuShbMZTIy/qYqejHBf86DzcDp5D8RGSfkxJFMobJV5GlOq7TDdoU0go3iITlSmXFKqS8bIK0zIHn3axc/cXxbI+tsPGa8+/0zd3uW9js3QLLLmTOgj2v3Qh7yUHiruRIWuf2JoZYEmtI2XjmuJThr0IHtpGZwfDqZb2KdTPiXe32RHTDZ8FHuJX3Rbr6/H4Y89X9OOG2OKKZe+I=;25:DzegKg02X2Yq7diWWXoqu3SdMew2VV7j4hL/2242pSjqwbRtIhN9ZAT4yWElX+8oPOg4kdd07gkzX66ES2rZ/9fCKMbgF/3dvq/dpL59f8/b0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fAOvrQ14= BN1AFFO11HUB038: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN1AFFO11HUB038;BCL:0;PCL:0;RULEID:;SRVR:BN1AFFO11HUB038; X-Forefront-PRVS: 0652EA5565 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjFBRkZPMTFIVUIwMzg7MjM6NklORkV6cXBGNVRhOFhnUE1iRFRnUllN?= =?utf-8?B?bC84MFp3RGVqZVFmMnM1S3hCR0F1a3JpNHpiS0IrblVvS0wxeVRMSG10eEtL?= =?utf-8?B?TEwvTm5aNkt1cExXdDdQc1F1MGF4SjZRZGJ5b3NwNWFBdmJZbmw2OFk4NmQz?= =?utf-8?B?dkx1ZFR3d2V5NS9QdkFPS1g4K0QrcktTM3BzZmpDQ2FpeGdZWjhMMFllZXNh?= =?utf-8?B?OTVtTSt5dlFlbFVqd2xEdFp5NmtkMXZJSUtoZWp4YUtSbWV6UGRLN0FlVG0w?= =?utf-8?B?eEhoMXdiR3p0SWQrYzgyUmV5NS9hZ2VCcUpWRzRPd0piZXF1RmRIRzRaTWx1?= =?utf-8?B?VWpiL2dRODd5Rzc4TElWTElPUFo5UERmTEIrcFYvRkhML3FwNDQrZU52ejlw?= =?utf-8?B?aExReXdlMHpxWjBrYjRnWDNOVlVrdGFtMUJ6RXJYZ0NHVU1Cc0swaVBTZGww?= =?utf-8?B?TEc0UVdKb3U1d1hSTjI0VlRvczlNY3hqdDcxVGRscXZFeU1vQ21kQjA1ZS9a?= =?utf-8?B?a0U3cDViZHB6dllGV2pHZ0x1cEVEM2JTbkdRQlJ2eW1KQ3lyVGp4cHdWS0Q1?= =?utf-8?B?Wm05RW9GYkZpQjFCZ2srWHdUSldjbGlGYzBubm9xK1RWMUpWdkxVZ0VIZFIr?= =?utf-8?B?eG5wYytWN0xXaWg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yMBd9xnIRgE3L21HGVdDD0RH/QxeI5xpupqfjDYZVHSAp2LwuPMO530ucpPUozswumXniLypA9yOkKR/cGR4hS0U6D7JNynEeN+HGqlQ3UKl2TsP0thF13IqNM20ftlLQ==;24:lr+jyNSltn1YNGTAnCL9u5uEwTJ6VwwepDjRXN8DF1quWOXDNJcjHnSeQwiyWbUgSFvjOGdjxIYMW5ffe5i5Pbcj3ew6wAK0nb0XTi7q1us= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2015 17:38:15.4471 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1AFFO11HUB038 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5152 Lines: 142 On Tue, 2015-07-28 at 11:14PM -0700, Moritz Fischer wrote: > Hi Sören, > > On Tue, Jul 28, 2015 at 3:53 PM, Sören Brinkmann > wrote: > > On Mon, 2015-07-27 at 09:52PM -0700, Moritz Fischer wrote: > >> Hi Sören, > >> > >> thanks for your feedback. > >> > >> On Mon, Jul 27, 2015 at 7:58 PM, Sören Brinkmann > >> wrote: > >> > Hi Moritz, > >> > > >> > On Fri, 2015-07-24 at 05:21PM -0700, Moritz Fischer wrote: > >> >> Signed-off-by: Moritz Fischer > >> >> --- > >> >> Documentation/devicetree/bindings/reset/zynq-reset-pl.txt | 13 +++++++++++++ > >> >> 1 file changed, 13 insertions(+) > >> >> create mode 100644 Documentation/devicetree/bindings/reset/zynq-reset-pl.txt > >> >> > >> >> diff --git a/Documentation/devicetree/bindings/reset/zynq-reset-pl.txt b/Documentation/devicetree/bindings/reset/zynq-reset-pl.txt > >> >> new file mode 100644 > >> >> index 0000000..ac4499e > >> >> --- /dev/null > >> >> +++ b/Documentation/devicetree/bindings/reset/zynq-reset-pl.txt > >> >> @@ -0,0 +1,13 @@ > >> >> +Xilinx Zynq PL Reset Manager > >> >> + > >> >> +Required properties: > >> >> +- compatible: "xlnx,zynq-reset-pl" > >> >> +- syscon <&slcr>; > >> >> +- #reset-cells: 1 > >> >> + > >> >> +Example: > >> >> + rstc: rstc@240 { > >> >> + #reset-cells = <1>; > >> >> + compatible = "xlnx,zynq-reset-pl"; > >> >> + syscon = <&slcr>; > >> >> + }; > >> > > >> > I think you also have to add the outputs and make them part of the > >> > binding. Otherwise you'd have to read the implementation to find > >> > out what device should be hooked up to which output of the reset-controller. > >> > >> Is something like this what you had in mind? I had that prepared for > >> the next round of patches: > >> > >> Reset outputs: > >> 0 : soft reset > >> 32 : ddr reset > >> 64 : topsw reset > >> 96 : dmac reset > >> 128: usb0 reset > >> 129: usb1 reset > >> 160: gem0 reset > >> 161: gem1 reset > >> 164: gem0 rx reset > >> 165: gem1 rx reset > >> 166: gem0 ref reset > >> 167: gem1 ref reset > >> 192: sdio0 reset > >> 193: sdio1 reset > >> 196: sdio0 ref reset > >> 197: sdio1 ref reset > >> 224: spi0 reset > >> 225: spi1 reset > >> 226: spi0 ref reset > >> 227: spi1 ref reset > >> 256: can0 reset > >> 257: can1 reset > >> 258: can0 ref reset > >> 259: can1 ref reset > >> 288: i2c0 reset > >> 289: i2c1 reset > >> 320: uart0 reset > >> 321: uart1 reset > >> 322: uart0 ref reset > >> 323: uart1 ref reset > >> 352: gpio reset > >> 384: lqspi reset > >> 385: qspi ref reset > >> 416: smc reset > >> 417: smc ref reset > >> 448: ocm reset > >> 512: fpga0 out reset > >> 513: fpga1 out reset > >> 514: fpga2 out reset > >> 515: fpga3 out reset > >> 544: a9 reset 0 > >> 545: a9 reset 1 > >> 552: peri reset > > > > Basically, yes. I guess the gaps are due to directly mapping this number > > to bank and bit instead of doing some more complex mapping in between? > > I'm not sure whether I like this :) I guess if a number is off the > > driver would still toggle the addressed bit? > > My assumption was that people would use a #include > in their dts. Assuming I got the > numbers in there right this makes it hard to misuse by accident. > I'm not saying it's perfect ... Michal always turned down the #include patches with the argument of re-using the dts files outside of the Linux sources where those includes etc may not be available in this form. > > > I'm not sure, is it worth > > to do some explicit mapping from logical outputs to a physical reset? It > > seems it would be a little safer since it would be easy to check that > > the addressed reset is valid and there wouldn't be any reserved/invalid > > bits be toggled. Also, it would make the outputs in here a continuous > > series of numbers without these gaps. Not sure though whether > > it's worth the additional complexity in the implementation. > > So your suggestion is to have a large switch case kind of thingy? I > thought about it and it seemed complex as there's quite a bunch of > resets with gaps. Do you know of a driver that does something similar? Yeah, that was what I had in mind. Some big switch-case lookup that maps a logical reset number from DT to the HW. No, I haven't looked around what other drivers do. So, probably the right thing is to just do what everybody else does. I was more thinking about how easy it might be to re-use the driver for the next-gen device. > When I wrote this I looked at the other reset drivers and figured they > all had this kind of bank mapping of sorts so I assumed that's how > people usually do it. Yeah, I don't think we should make things overly complicated without a good reason. So, unless DT or reset folks have any objections, I'm fine with it. Thanks, Sören -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/