Received: by 10.192.165.148 with SMTP id m20csp846749imm; Wed, 2 May 2018 09:42:12 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqrlqlDcFmKNVxZSewBa7xq2++sScS7Tth0gPS6mPMkZamjw2UVE0THiraVFYiX2tvSPjZ9 X-Received: by 2002:a63:2ace:: with SMTP id q197-v6mr16946304pgq.60.1525279332393; Wed, 02 May 2018 09:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525279332; cv=none; d=google.com; s=arc-20160816; b=sI6QqinyAw6DIBwODPHZ8y5hhZqgUCwOzRngArXUg/emv+Q9JFc0gEnVbT5pW/FVhQ r16Z9B/ScIWNWqcZC56jhagydesp12beB80sl2OebZAYy8mHtOLOFTxPT6tzDVrJcFWS 9i/xBAkWMryU34lnx+9meY6s/jz/zZClZ4yY34PmzYi1j29+mNixN+MEpSFdznK8vjSP au4UkQjCbHFY7e/29viGzKDSIPqUrlB9KRfLdwesthPEYeJY4mIBmje+9yZaBOt6A08x +KS1F3smXmttvTutfnNcq4/EOITHmP1RTH4RaIkYgNhGrtc22b135Ghg+shE2wFCuUqi of3g== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature :arc-authentication-results; bh=jxd2wo3g2JPLkzXObwHvul4j4e62NtBJCFYLr3My9MA=; b=pof8fA29Sb72Z4FoiJrkXHLvCe5VTbst7UprRRK9ccHKR446xTV8uug8LkKmqfsDEs 4Beqb6hA1nUx4zEvaXV6N7DHoWO3Liy4uurhTNK/PbbcymxCemRMTDV8xrKpqdM72zJC vYI7lsufrt1wni0Kx3UVM0jK3KXw4PaERM+ItbvbKKz8stj3IByUBsmiPouKD9sjEscp eZN0SPvkfpalPQixT/B5+dHI4Agp7Uya7t2weyBfMvYLN6IgJceLeYbkuqbcYo/kbfRo eEm1is3fNeoRmnPVxKXt3h8KkI1J59qedrVGpF5IKrTqfx22Gof1TufPoRLdCkcsmbKg cfQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=c7FNJ5Iy; 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 p25-v6si9766771pgd.395.2018.05.02.09.41.58; Wed, 02 May 2018 09:42:12 -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; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=c7FNJ5Iy; 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 S1751829AbeEBQlj (ORCPT + 99 others); Wed, 2 May 2018 12:41:39 -0400 Received: from mail.micronovasrl.com ([212.103.203.10]:57704 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751713AbeEBQli (ORCPT ); Wed, 2 May 2018 12:41:38 -0400 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 30E74B0098B for ; Wed, 2 May 2018 18:41:37 +0200 (CEST) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:references:to:from:from:subject:subject; s=dkim; t= 1525279295; x=1526143296; bh=cTEP6GQ/Hy+KzYVGCPk05swTNsF+xkN7uCv XT2TfSQo=; b=c7FNJ5IyxUyhfyXX+kRDUWRKknZh1X6iWUideBhgIz4ndEPsVzj jxejY1omzcZKQ90Ti1kNBO1UlCtl+R9a79HuMBuza9YZHvaoYOWV4jWz3fEOXSS2 a02v2C+OUmj2Qvxt+UctI+wGNttytjgt2dpB3mv5rLO05msRe9AVMCws= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com X-Spam-Flag: NO X-Spam-Score: -2.899 X-Spam-Level: X-Spam-Status: No, score=-2.899 tagged_above=-10 required=4.5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, LOTS_OF_MONEY=0.001] autolearn=unavailable autolearn_force=no Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GCm75aQt62Fa for ; Wed, 2 May 2018 18:41:35 +0200 (CEST) Received: from [192.168.2.71] (62-11-51-166.dialup.tiscali.it [62.11.51.166]) by mail.micronovasrl.com (Postfix) with ESMTPSA id D359FB00333; Wed, 2 May 2018 18:41:32 +0200 (CEST) Subject: Re: [PATCH 7/7] ARM: dts: sun7i: Add dts file for the A20-linova1-7 HMI From: Giulio Benetti To: Maxime Ripard Cc: Thierry Reding , David Airlie , Chen-Yu Tsai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org References: <1521662593-25468-1-git-send-email-giulio.benetti@micronovasrl.com> <1521662593-25468-7-git-send-email-giulio.benetti@micronovasrl.com> <20180322180508.my64gobhh5rc2x2m@flea> <8ef3b259-03b4-6987-286e-36ff627a8b76@micronovasrl.com> <20180424084137.7xfwji2gcibxavvt@flea> <03a02abb-e95c-b4ec-748f-907c0af67969@micronovasrl.com> <20180425184016.xktppxw7egddr7li@flea> <42feccc9-1d09-9ff2-3ccc-1dea63bacfb6@micronovasrl.com> Message-ID: <839d2560-0250-9b3a-8019-4e83d9e931e2@micronovasrl.com> Date: Wed, 2 May 2018 18:41:34 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <42feccc9-1d09-9ff2-3ccc-1dea63bacfb6@micronovasrl.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Language: it Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maxime, >> You don't have to handcode the fragments anymore with the new syntax, >> and U-Boot makes it really trivial to use if you use the FIT image >> format to have multiple overlays bundled in the same image. You can >> choose to apply them dynamically, for example based on an EEPROM or >> some other metric to see which combination you have. > > Ah, this is interesting. I'm going to experiment with that. > I'm struggling against this, I don't really know how to proceed, except keeping monolithic dts files including other dtsi files. About dt-overlays I've tried to look around lot of time, but the only thing I've found is this: https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/tree/arch/arm/boot/dts?h=topic/renesas-overlays where they use .dtso tagging them as "/plugin/;" and compile all .dtso found in dts folder. Then they obtain .dtbo files that should be the dt-overlays we have spoken about right? What I can't understand is if there's a real standard at this time to follow, because on renesas-driver they use their way to handle all .dtso files, but on mainline there seems to be nothing about that. So at the moment I'm trying to compile dts tagged as /plugin/; but dtc gives me a lot of warnings. dts: " /dts-v1/; /plugin/; #include #include &i2c2 { pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins_a>; status = "okay"; ft5x { compatible = "edt,edt-ft5306"; reg = <0x38>; interrupt-parent = <&pio>; interrupts = <7 2 IRQ_TYPE_EDGE_FALLING>; /* PH2 */ reset-gpios = <&pio 7 3 GPIO_ACTIVE_LOW>; /* PH3 */ touchscreen-size-x = <480>; touchscreen-size-y = <272>; }; }; " Build output issuing make ARCH=arm CROSS_COMPILE=arm-linux- aaa.dtb (I use aaa.dts as source): " arch/arm/boot/dts/aaa.dtb: Warning (reg_format): /fragment@0/__overlay__/ft5x:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) arch/arm/boot/dts/aaa.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format' arch/arm/boot/dts/aaa.dtb: Warning (simple_bus_reg): Failed prerequisite 'reg_format' arch/arm/boot/dts/aaa.dtb: Warning (avoid_default_addr_size): /fragment@0/__overlay__/ft5x: Relying on default #address-cells value arch/arm/boot/dts/aaa.dtb: Warning (avoid_default_addr_size): /fragment@0/__overlay__/ft5x: Relying on default #size-cells value " Then in uboot I'm trying to do as follows: # fdt addr 0x43000000 (where dtb is) # fdt resize 8192 # fdt apply 0x430c0000 (where dtbo is) But it gives me "libfdt fdt_check_header(): FDT_ERR_BADMAGIC" (I was expecting some error) Is there anywhere a guide for this? Is this what you've meant before? Using FIT for my use is not the best, so I would like to have many overlays in /boot folder and use different boot.scr depending on hardware. Can you point me to somewhere or something? I don't really know where to beat my head! Thanks in advance. -- Giulio Benetti CTO MICRONOVA SRL Sede: Via A. Niedda 3 - 35010 Vigonza (PD) Tel. 049/8931563 - Fax 049/8931346 Cod.Fiscale - P.IVA 02663420285 Capitale Sociale ? 26.000 i.v. Iscritta al Reg. Imprese di Padova N. 02663420285 Numero R.E.A. 258642