Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp484963ybn; Thu, 3 Oct 2019 07:54:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUvroOvd+xjG1bEF/EsMQEltPDW0N1qCJfzkitjomCrytXwZ7eHxk7VvuaFeCeoW+65FA7 X-Received: by 2002:a17:906:2f03:: with SMTP id v3mr524583eji.333.1570114471917; Thu, 03 Oct 2019 07:54:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570114471; cv=none; d=google.com; s=arc-20160816; b=TUHwn6aYnHAj1xbKwUvo2O0v3l27JVXTyYT9b1sTfv5wEcWHePpkL2lNwd3CjQ633C qy2MzzXvKZnhQzI/ILBgUxHzaXgzAqr/Ve8b2CvZKDg52xkhaB5MKwA2Eoq9P4RNjAbF fiMXO/2+PzYBnUWnX2zwCSs9MRzdZy6o3NPgxKlUKfDpHrPRNoaj39BvDQDvkQ7GhkP3 BTzoWDJloORv7oH45PKL5v6FfM8VvzDssJmvlSpA9vn3TYhNBaigiE3ZMuJjTvp05bKy bdvLwkqTZJeTJUCc3CnkS+ZxKD0qp1qlzmG/OS81raHKowUMXF2PuAQzouJjJTrNZFOz F98Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=mToKt4HrJLDWtvGJQt9xVx3tyRbrhtXQZVkdWLOjIqg=; b=kT0bcYndD3+2n54aAHRvZUl2XYJZn2LJJX7zbxL9NMwH3NZsB3Yu9qoDostaTW4MxI ukFhrD1yeCsU7WChJ7lqIZT/U3Ax9PUXkoHgv7sX5ybyUHfLjP4q1MNr30Tmo9G9KVJ1 yZnKw9JzbVKTw3WSrUnR1FuLW41s5xazqIpPexMQjjZJ/QfIopO7uI5r5SReKZisCh69 ufXIB5giVQvnBYshMPqcV4U46iO9eV7d0RWtvncgU3JHQlJmyCwU2iUFdEjwpVRjjUFs v5RfMeb0+Fe/3RCeS6kAa/XN/kLGFtA9FfrSPjuF3nPlhG7606xmasfdRUpmuUhhJZLp l7jw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1si1353434ejt.143.2019.10.03.07.54.07; Thu, 03 Oct 2019 07:54:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730114AbfJCOUE (ORCPT + 99 others); Thu, 3 Oct 2019 10:20:04 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:58345 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727254AbfJCOUE (ORCPT ); Thu, 3 Oct 2019 10:20:04 -0400 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iG1xW-0003Vd-IS; Thu, 03 Oct 2019 16:19:58 +0200 Received: from pza by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1iG1xT-0006E6-Kf; Thu, 03 Oct 2019 16:19:55 +0200 Date: Thu, 3 Oct 2019 16:19:55 +0200 From: Philipp Zabel To: Martin Blumenstingl Cc: Dilip Kota , "Chuan Hua, Lei" , cheol.yong.kim@intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, qi-ming.wu@intel.com, robh@kernel.org, Hauke Mehrtens Subject: Re: [PATCH v2 2/2] reset: Reset controller driver for Intel LGM SoC Message-ID: <20191003141955.zi5wqjqf4wa7lhv7@pengutronix.de> References: <34336c9a-8e87-8f84-2ae8-032b7967928f@linux.intel.com> <657d796d-cb1b-472d-fe67-f7b9bf12fd79@linux.intel.com> <389f360a-a993-b9a8-4b50-ad87bcfec767@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 15:21:55 up 87 days, 19:32, 47 users, load average: 0.17, 0.20, 0.22 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: pza@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin, Dilip, On Thu, Sep 19, 2019 at 09:51:48PM +0200, Martin Blumenstingl wrote: > Hi Dilip, > > (sorry for the late reply) Same, sorry for the delay. > On Thu, Sep 12, 2019 at 8:38 AM Dilip Kota wrote: > [...] > > The major difference between the vrx200 and lgm is: > > 1.) RCU in vrx200 is having multiple register regions wheres RCU in lgm > > has one single register region. > > 2.) Register offsets and bit offsets are different. > > > > So enhancing the intel-reset-syscon.c to provide compatibility/support > > for vrx200. > > Please check the below dtsi binding proposal and let me know your view. > > > > rcu0:reset-controller@00000000 { > > compatible= "intel,rcu-lgm"; > > reg = <0x0000000 0x80000>, , , > > ; > I'm not sure that I understand what are reg_set2/3/4 for > the first resource (0x80000 at 0x0) already covers the whole LGM RCU, > so what is the purpose of the other register resources > > > intel,global-reset = <0x10 30>; > > #reset-cells = <3>; > > }; > > > > "#reset-cells": > > const:3 > > description: | > > The 1st cell is the reset register offset. > > The 2nd cell is the reset set bit offset. > > The 3rd cell is the reset status bit offset. > I think this will work fine for VRX200 (and even older SoCs) > as you have described in your previous emails we can determine the > status offset from the reset offset using a simple if/else > > for LGM I like your initial suggestion with #reset-cells = <2> because > it's easier to read and write. > > > Reset driver takes care of parsing the register address "reg" as per the > > ".data" structure in struct of_device_id. > > Reset driver takes care of traversing the status register offset. > the differentiation between two and three #reset-cells can also happen > based on the struct of_device_id: > - the LGM implementation would simply also use the reset bit as status > bit (only two cells are needed) > - the implementation for earlier SoCs would parse the third cell and > use that as status bit > > Philipp, can you please share your opinion on how to move forward with > the reset-intel driver from this series? That all sounds reasonable for VRX200/LGM to me. > because the register layout was greatly simplified for the newer SoCs > (for which there is reset-intel) compared to the older ones > (reset-lantiq). > Dilip's suggestion (in my own words) is that you take his new > reset-intel driver, then we will work on porting reset-lantiq over to > that so in the end we can drop the reset-lantiq driver. Just to be sure, you are suggesting to add support for the current lantiq,reset binding to the reset-intel driver at a later point? I see no reason not to do that, but I'm also not quite sure what the benefit will be over just keeping reset-lantiq as is? > This approach means more work for me (as I am probably the one who > then has to do the work to port reset-lantiq over to reset-intel). More work than what alternative? > I'm happy to do that work if you think that it's worth following this > approach. So I want your opinion on this before I spend any effort on > porting reset-lantiq over to reset-intel. Reset drivers are typically so simple, I'm not quite sure whether it is worth to integrate multiple drivers if it complicates matters too much. In this case though I expect it would just be adding support for a custom .of_xlate and lantiq specific register property parsing? regards Philipp