From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Keeping Subject: [PATCH] dt-bindings: display: rk3288-mipi-dsi: add reset property Date: Fri, 3 Mar 2017 11:39:45 +0000 Message-ID: <20170303113945.3bd2cbd9.john@metanate.com> References: <20170224125506.21533-1-john@metanate.com> <20170224125506.21533-24-john@metanate.com> <20170302215643.GA49163@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <20170302215643.GA49163@google.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Brian Norris Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Chris Zhong , linux-arm-kernel@lists.infradead.org List-Id: linux-rockchip.vger.kernel.org VGhpcyByZXNldCBpcyByZXF1aXJlZCBpbiBvcmRlciB0byBmdWxseSByZXNldCB0aGUgaW50ZXJu YWwgc3RhdGUgb2YgdGhlCk1JUEkgY29udHJvbGxlci4KClNpZ25lZC1vZmYtYnk6IEpvaG4gS2Vl cGluZyA8am9obkBtZXRhbmF0ZS5jb20+Ci0tLQpPbiBUaHUsIDIgTWFyIDIwMTcgMTM6NTY6NDYg LTA4MDAsIEJyaWFuIE5vcnJpcyB3cm90ZToKPiBPbiBGcmksIEZlYiAyNCwgMjAxNyBhdCAxMjo1 NTowNlBNICswMDAwLCBKb2huIEtlZXBpbmcgd3JvdGU6Cj4gPiArCS8qCj4gPiArCSAqIE5vdGUg dGhhdCB0aGUgcmVzZXQgd2FzIG5vdCBkZWZpbmVkIGluIHRoZSBpbml0aWFsIGRldmljZSB0cmVl LCBzbwo+ID4gKwkgKiB3ZSBoYXZlIHRvIGJlIHByZXBhcmVkIGZvciBpdCBub3QgYmVpbmcgZm91 bmQuCj4gPiArCSAqLwo+ID4gKwlhcGJfcnN0ID0gZGV2bV9yZXNldF9jb250cm9sX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LmZyZWVkZXNrdG9wLm9yZwpodHRwczovL2xpc3RzLmZyZWVkZXNrdG9wLm9yZy9tYWls bWFuL2xpc3RpbmZvL2RyaS1kZXZlbAo= From mboxrd@z Thu Jan 1 00:00:00 1970 From: john@metanate.com (John Keeping) Date: Fri, 3 Mar 2017 11:39:45 +0000 Subject: [PATCH] dt-bindings: display: rk3288-mipi-dsi: add reset property In-Reply-To: <20170302215643.GA49163@google.com> References: <20170224125506.21533-1-john@metanate.com> <20170224125506.21533-24-john@metanate.com> <20170302215643.GA49163@google.com> Message-ID: <20170303113945.3bd2cbd9.john@metanate.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org This reset is required in order to fully reset the internal state of the MIPI controller. Signed-off-by: John Keeping --- On Thu, 2 Mar 2017 13:56:46 -0800, Brian Norris wrote: > On Fri, Feb 24, 2017 at 12:55:06PM +0000, John Keeping wrote: > > + /* > > + * Note that the reset was not defined in the initial device tree, so > > + * we have to be prepared for it not being found. > > + */ > > + apb_rst = devm_reset_control_get(dev, "apb"); > > Did this reset ever get documented in the device tree bindings? I > couldn't find it. Perhaps a follow-up patch is in order? Here's a patch to do that. .../devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt b/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt index 1753f0cc6fad..28d0b437d3cd 100644 --- a/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt +++ b/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt @@ -13,8 +13,13 @@ Required properties: - ports: contain a port node with endpoint definitions as defined in [2]. For vopb,set the reg = <0> and set the reg = <1> for vopl. +Optional properties: +- resets: list of phandle + reset specifier pairs, as described in [3]. +- reset-names: string reset name, must be "apb". + [1] Documentation/devicetree/bindings/clock/clock-bindings.txt [2] Documentation/devicetree/bindings/media/video-interfaces.txt +[3] Documentation/devicetree/bindings/reset/reset.txt Example: mipi_dsi: mipi at ff960000 { @@ -25,6 +30,8 @@ Example: interrupts = ; clocks = <&cru SCLK_MIPI_24M>, <&cru PCLK_MIPI_DSI0>; clock-names = "ref", "pclk"; + resets = <&cru SRST_MIPIDSI0>; + reset-names = "apb"; rockchip,grf = <&grf>; status = "okay"; -- 2.12.0.rc2.230.ga28edc07cd.dirty From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751945AbdCCL6l (ORCPT ); Fri, 3 Mar 2017 06:58:41 -0500 Received: from dougal.metanate.com ([90.155.101.14]:55492 "EHLO metanate.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751269AbdCCL6j (ORCPT ); Fri, 3 Mar 2017 06:58:39 -0500 Date: Fri, 3 Mar 2017 11:39:45 +0000 From: John Keeping To: Brian Norris Cc: Mark Yao , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Sean Paul , Chris Zhong , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH] dt-bindings: display: rk3288-mipi-dsi: add reset property Message-ID: <20170303113945.3bd2cbd9.john@metanate.com> In-Reply-To: <20170302215643.GA49163@google.com> References: <20170224125506.21533-1-john@metanate.com> <20170224125506.21533-24-john@metanate.com> <20170302215643.GA49163@google.com> Organization: Metanate Ltd X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reset is required in order to fully reset the internal state of the MIPI controller. Signed-off-by: John Keeping --- On Thu, 2 Mar 2017 13:56:46 -0800, Brian Norris wrote: > On Fri, Feb 24, 2017 at 12:55:06PM +0000, John Keeping wrote: > > + /* > > + * Note that the reset was not defined in the initial device tree, so > > + * we have to be prepared for it not being found. > > + */ > > + apb_rst = devm_reset_control_get(dev, "apb"); > > Did this reset ever get documented in the device tree bindings? I > couldn't find it. Perhaps a follow-up patch is in order? Here's a patch to do that. .../devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt b/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt index 1753f0cc6fad..28d0b437d3cd 100644 --- a/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt +++ b/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt @@ -13,8 +13,13 @@ Required properties: - ports: contain a port node with endpoint definitions as defined in [2]. For vopb,set the reg = <0> and set the reg = <1> for vopl. +Optional properties: +- resets: list of phandle + reset specifier pairs, as described in [3]. +- reset-names: string reset name, must be "apb". + [1] Documentation/devicetree/bindings/clock/clock-bindings.txt [2] Documentation/devicetree/bindings/media/video-interfaces.txt +[3] Documentation/devicetree/bindings/reset/reset.txt Example: mipi_dsi: mipi@ff960000 { @@ -25,6 +30,8 @@ Example: interrupts = ; clocks = <&cru SCLK_MIPI_24M>, <&cru PCLK_MIPI_DSI0>; clock-names = "ref", "pclk"; + resets = <&cru SRST_MIPIDSI0>; + reset-names = "apb"; rockchip,grf = <&grf>; status = "okay"; -- 2.12.0.rc2.230.ga28edc07cd.dirty