Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751577AbdFFTYE (ORCPT ); Tue, 6 Jun 2017 15:24:04 -0400 Received: from www84.your-server.de ([213.133.104.84]:47970 "EHLO www84.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751538AbdFFTW7 (ORCPT ); Tue, 6 Jun 2017 15:22:59 -0400 X-Greylist: delayed 310 seconds by postgrey-1.27 at vger.kernel.org; Tue, 06 Jun 2017 15:22:59 EDT Message-ID: <1496776974.3821.6.camel@seibold.net> Subject: Re: [PATCH] external references for device tree overlays From: Stefani Seibold To: Frank Rowand , Stefani Seibold , Pantelis Antoniou , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Holm Rauchfuss Date: Tue, 06 Jun 2017 21:22:54 +0200 In-Reply-To: <593657AF.8050208@gmail.com> References: <1496667567-13266-1-git-send-email-stefani.seibold.ext@huawei.com> <593657AF.8050208@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Authenticated-Sender: stefani@seibold.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1958 Lines: 65 Hi Frank, On 06.06.2017, 00:20 -0700 Frank Rowand wrote:: > On 06/05/17 05:59, Stefani Seibold wrote: > > From: Stefani Seibold > > > > This patch enables external references for symbols which are not > > exported by the current device tree. For example > > > > // RASPI example (only for testing) > > /dts-v1/; > > /plugin/; > > > > / { > > compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; > > > > fragment@0 { > > target-path = "/soc/i2s@7e203000"; > > __overlay__ { > > #address-cells = <0x00000001>; > > #size-cells = <0x00000001>; > > test = "test"; > > timer = <&timer>; > > }; > > }; > > > > __external_symbols__ { > > timer = "/soc/timer@7e003000"; > > }; > > }; > > My hope is that the dtc compiler will stop supporting specification > of the > __symbols__ node in dts source, and only generate it automatically in > the dtb. > That change to dtc would not allow any node name specified in a dts > to begin > with an underscore. Thus node __external_symbols__ would not be > allowed. > The name is not so important to me, only the solution. > > In case of the RASPI device tree this could be simple fixed by > > modifing > > the device tree source, but when the device tree is provided by a > > closed > > source BIOS this kind of missing symbol could not be fixed. > > Is there a real example of this issue, or is this a theoretical > concern? > If this is a real example, we should be discouraging such behavior. > Yes, I have a BIOS on some ARM64 servers which provides broken device tree. It also lacks some devices in this tree which needs references to other devices which lacks a phandle. > The suggestion by Pantelis should work, but that is just a hack to > get > you out of a bad situation, not a good practice. > I tried it, but it doesn't work. Look at my post to Pantelis. - Stefani