Received: by 10.223.185.116 with SMTP id b49csp4185163wrg; Tue, 13 Feb 2018 14:23:23 -0800 (PST) X-Google-Smtp-Source: AH8x226HA4YaQ3MKzSlS4RAx5b28lQG7b/MRfFjPmJ/esMU2QbLM0tPMhwc4JBmCZWWPVg0RD9Z6 X-Received: by 10.98.17.156 with SMTP id 28mr2665902pfr.112.1518560603845; Tue, 13 Feb 2018 14:23:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518560603; cv=none; d=google.com; s=arc-20160816; b=zLK3+eMaI6ijRRDsKVv6WypQyoahWcWDlHMNvVerI4e3wWVkBH4ZXqNkjjh47y/3zR 9PaTwUl3zg/EKniJhvW1xzCnm2JKA7Z260XsNbtVbvMv/3GZxRfnmxgjLAjvYuYzU01X VzSZURC/uxvnlPe6kLj2/fVzbZU4sboa4s4t4Z2UnWLmk3XW6heM9g5BhUOpWziH6hHQ p6egeIBh+wnQ5OvT3XW2j2AAH7Q05F+PKbt4HWMB4AZjd5vq2GxGZAeMmpl1zy/CnSRc h1kBU8xFfhBlIvKpXjh7zPOGkygM28XgEwlmcG4ahcNxkLhrFwa7HmHA1WpcoNEM7vG6 LSMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=LFR9GLJEGAMtF27YaO+02JfC59JiQfPnSmalLSRYAn4=; b=0NLpgAN4nEzWvWTjwIMNugDiWi83B6tc9YOHs5TbV5XUazyGKBAZ8jwpf85kxxHldY 1VE86fN8oG2bR6PRtqIHn/HDvxv5i6wjld1i06GMujCeKc1XmlBu9KpzK4EbHitnF6iL xIUIUF5LXPcqq27kk5ffV8VT15w2xnu1h4cYJ7c4DlcKEKJxZIV5LEaU8+M0LkMdXGnU HlnsD2xkgpwDiE6vJ4wmfKFv7D3mbcTXUlxykWzH4Arhn+t1Hzm//fgeiaMqTucUh5BW dd7L8H9wr7ZLMA9Z38N/bfYx9wfnicDBi2hQhzMmTwMmw2Th5NXNzgv09/ldz/FMUHwK A4QQ== 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 s14si22073pgf.748.2018.02.13.14.23.09; Tue, 13 Feb 2018 14:23:23 -0800 (PST) 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 S966042AbeBMWWQ (ORCPT + 99 others); Tue, 13 Feb 2018 17:22:16 -0500 Received: from gloria.sntech.de ([95.129.55.99]:36154 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965935AbeBMWWP (ORCPT ); Tue, 13 Feb 2018 17:22:15 -0500 Received: from ip9234b6d7.dynamic.kabel-deutschland.de ([146.52.182.215] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1elixm-0004qx-3j; Tue, 13 Feb 2018 23:22:10 +0100 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Enric Balletbo Serra Cc: Emil Renner Berthing , Rob Herring , Brian Norris , "devicetree@vger.kernel.org" , "open list:ARM/Rockchip SoC..." , Linux Kernel Mailing List , Doug Anderson , Kishon Vijay Abraham I , Chris Zhong , Enric Balletbo i Serra , William wu , kernel@collabora.com, linux-arm-kernel , huang lin Subject: Re: [PATCH 2/3] Documentation: bindings: add usb3-host-disable and usb3-host-port for Rockchip USB Type-C PHY Date: Tue, 13 Feb 2018 23:22:09 +0100 Message-ID: <6549869.GHAcyYtscp@diego> In-Reply-To: References: <20180208152028.9997-1-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Enric, Am Dienstag, 13. Februar 2018, 23:08:26 CET schrieb Enric Balletbo Serra: > 2018-02-13 10:18 GMT+01:00 Emil Renner Berthing > > : > > On 12 February 2018 at 23:29, Rob Herring wrote: > >> On Mon, Feb 12, 2018 at 3:26 PM, Brian Norris wrote: > >>> Hi, > >>> > >>> On Mon, Feb 12, 2018 at 10:43:41AM -0600, Rob Herring wrote: > >>>> On Thu, Feb 8, 2018 at 3:23 PM, Enric Balletbo Serra > >>>> > >>>> wrote: > >>>> > 2018-02-08 18:52 GMT+01:00 Rob Herring : > >>>> >> On Thu, Feb 8, 2018 at 9:20 AM, Enric Balletbo i Serra > >>>> >> > >>>> >> wrote: > >>>> >>> --- a/Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt > >>>> >>> +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt > >>>> >>> @@ -36,6 +36,12 @@ offset, enable bit, write mask bit. > >>>> >>> > >>>> >>> - rockchip,uphy-dp-sel : the register of type-c phy enable DP > >>>> >>> function > >>>> >>> > >>>> >>> for type-c phy0, it must be <0x6268 19 19>; > >>>> >>> for type-c phy1, it must be <0x6268 3 19>; > >>>> >>> > >>>> >>> + - rockchip,usb3-host-disable : the register of type-c phy disable > >>>> >>> usb3 host + for type-c phy0, it must be <0x2434 0 16>; > >>>> >>> + for type-c phy1, it must be <0x2444 0 16>; > >>>> >>> + - rockchip,usb3-host-port : the register of type-c phy usb3 port > >>>> >>> number > >>>> >>> + for type-c phy0, it must be <0x2434 12 28>; > >>>> >>> + for type-c phy1, it must be <0x2444 12 28>; > >>>> >> > >>>> >> When does this list stop? Adding properties for various register > >>>> >> fields doesn't scale. This information should be in the driver and > >>>> >> based on the compatible string if necessary. > >>>> > > >>>> > I see, seams reasonable to me, is this applicable to the new ones > >>>> > only > >>>> > or I should get rid of all the proprieties like this from the DT > >>>> > (including the old ones)? > >>>> > >>>> We're already kind of stuck with the existing ones. So it depends if > >>>> people want to phase them out or not. > >>> > >>> FWIW, any Chrome{device} using these sort of bindings is perfectly > >>> capable of handling changed bindings (we ship DTBs with the kernel). But > >>> that's not typically how mainline covers binding deprecation. > >> > >> If it's CrOS only that's using these, then it's really up to you all. > >> I guess it depends if many folks are trying to run mainline on CrOS > >> devices and don't necessarily keep things in sync. > > > > For what it's worth I run mainline on my Chromebook Plus > > (rk3399-gru-kevin), but in order to have a somewhat working setup you > > need to run > > 4.16-rc1 + various patches from the rockchip mailing list which means > > you have to keep up with the latest mainline (both kernel and devicetree) > > anyway. So I'm all in favour of cleaning up the devicetree. > > > >>> If we're going to start recommending not putting these offsets in the > >>> DT, I'd vote for deprecating them, for consistency. (Otherwise, we'll > >>> keep running into this same question.) We only documented the RK3399 > >>> ("rockchip,rk3399-typec-phy") binding, so all users should have the same > >>> offsets. I dunno if/how we pick a time for eventually removing the > >>> bindings entirely. > >> > >> Yes, makes sense. > > One question, maybe silly question, that comes to my mind is, as the > offsets for same register are different between type-c phy0 and type-c > phy1 and there is two instances, the driver needs to know which type-c > phyter is and I'm not sure the proper way to do it. It is just check > the type-c phyter base address? So if base address is 0xff7c0000 > (phy0) we know that we should apply the offsets for phy0 and if base > address is 0xff800000 we know that we should apply the offsets for > phy1? sounds reasonable and we already did something similar for example for the inno-usb2 phys where you can find the struct rockchip_usb2phy_cfg matching against a reg property. GRF reg offset in that case but matching against the base address for the type-c phy should therefore be fine as well. Heiko