Received: by 10.223.176.46 with SMTP id f43csp485513wra; Fri, 19 Jan 2018 22:14:38 -0800 (PST) X-Google-Smtp-Source: AH8x225j4qRL9esqCBTyUbgQ+bgvgaV5h5FBbTzFwg04wVjghbgBjp9FVSwpo8gj12kRe/w4PVUw X-Received: by 10.101.96.198 with SMTP id r6mr1032747pgv.420.1516428878477; Fri, 19 Jan 2018 22:14:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516428878; cv=none; d=google.com; s=arc-20160816; b=KibTqXKBq3Y+oZNN1VIuL+gn+tCt7Exe487l8UsD85zBOFJmibbUUNjogLPx1tJo34 4ltX550uoc451ESc+V864b3uxiU9aJ1+U3IWi1RZ5+MsC63YpikcqUmX25rEepnTKfC+ v5FeSxdGaRFI7iPuRVZAsKurV8G81JSJD5ChI36yxD7QuCdl9JNtA1RSsoGPBiS8So2r iT+fTbsX2Uog/DVq0K9kFfGWi2G4tKzsnJp8sZVQBjX80+A5ktVSLzHd7R6lMT+CvV2M wUm+t8xciZLygTEV4oPXh4caI3w//A/CVHcUjgSN02bcAnfi6DaEz/MYsrf459vs2FCA PNyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=S30UfuROdTKhYSsarYnKVNTZ6Zq4M/4xO1yQgI6cBAU=; b=zVFgJpiOiYP8VwV8hVeUOCfVP0XuTdf1CcRQtQ4UUg1niF/us2J8NGQKDwRs44bXnL mIwJhbfIts+GeOtLhLaGRXt2/klnaGV3nb25CbjypEdp1PPjcNrhK+xl6PFRvo4NCuob CGXkm2KE64icmANEa7R4Yr05Y3gsFMdkjEiwadlTaazxtGz/wYWNSaNKWxlgmN+iXvUs dafqFkSnQQJPyyn1LYX8eWOt3kjjSxRFteroXbjRzJBtTF6DxnES3vqzBjfml4fAZGbK bwCbj8P+IvELLd0dKX7Zx851Um06jk4yQfrfjFztPpWIJlef4Xfk8xTwlYVpzr/16yKh svIA== 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 z90si10704967pfl.204.2018.01.19.22.14.24; Fri, 19 Jan 2018 22:14:38 -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 S1753144AbeATGJ1 (ORCPT + 99 others); Sat, 20 Jan 2018 01:09:27 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:32982 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbeATGJU (ORCPT ); Sat, 20 Jan 2018 01:09:20 -0500 Received: by mail-wm0-f43.google.com with SMTP id x4so9992204wmc.0; Fri, 19 Jan 2018 22:09:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=S30UfuROdTKhYSsarYnKVNTZ6Zq4M/4xO1yQgI6cBAU=; b=d5inco5rhJv5uIBeu88Wl9jXIkVRI4yhLKwED0R0AGMnXMHLJjBR6tW2Q9njyOTdWW AAaa+WK3ZiGDQvvUa8EmunExLb2O2qXxUBG4Jp8KIDt3c+DywgdRV7JLkEADahdO9xWA bol+M17zHA5jH89WQ536N1Ij5agZY7QDpG0vV1XYFGv6d6CRPFGXlVE2RQW1y+jBowxw tjy1Hj94eVOTyOK/l4EXxnym5SWeQC7QUqFTZBpn6XV+33hbzdS1oq8YZo0vwi4h8bsm trxn1xiVBsHae6s9EBbwKzkAUPPISCYeAYIyISsaFYvqJAFtoqh7s9glzVbEEZcKTCqV W8qA== X-Gm-Message-State: AKwxyteUyDYpRm93MFvHUf36ImTk0edR/PVToY32ZNNLWQtzq6YUUirE OhXnvONxIDvYiH2CrlVXmS8MpjJV X-Received: by 10.80.145.27 with SMTP id e27mr1922971eda.217.1516428558746; Fri, 19 Jan 2018 22:09:18 -0800 (PST) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com. [74.125.82.41]) by smtp.gmail.com with ESMTPSA id q11sm2367369edj.64.2018.01.19.22.09.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jan 2018 22:09:18 -0800 (PST) Received: by mail-wm0-f41.google.com with SMTP id g1so7054779wmg.2; Fri, 19 Jan 2018 22:09:17 -0800 (PST) X-Received: by 10.28.9.18 with SMTP id 18mr399106wmj.37.1516428557316; Fri, 19 Jan 2018 22:09:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.175.80 with HTTP; Fri, 19 Jan 2018 22:08:56 -0800 (PST) In-Reply-To: <548d57b7-4db1-a9ee-369e-9067f981162d@olimex.com> References: <1515747666-6597-1-git-send-email-stefan@olimex.com> <20180115095031.pzsgrp3tdmemotrs@flea.lan> <1b9667a4-75de-4ece-069d-7ec33b7e2f8d@olimex.com> <20180118100745.y62adzvfnrzqkagd@flea.lan> <548d57b7-4db1-a9ee-369e-9067f981162d@olimex.com> From: Chen-Yu Tsai Date: Sat, 20 Jan 2018 14:08:56 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/1] ARM: dts: sunxi: Add Olimex A20-SOM204-EVB board To: Stefan Mavrodiev Cc: Maxime Ripard , Rob Herring , Mark Rutland , Russell King , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM PORT" , open list , linux-sunxi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 19, 2018 at 9:27 PM, Stefan Mavrodiev wrote: > On 01/18/2018 04:28 PM, Chen-Yu Tsai wrote: >> >> On Thu, Jan 18, 2018 at 6:07 PM, Maxime Ripard >> wrote: >>> >>> Hi! >>> >>> On Mon, Jan 15, 2018 at 12:07:34PM +0200, Stefan Mavrodiev wrote: >>>>>> >>>>>> +/dts-v1/; >>>>>> +#include "sun7i-a20.dtsi" >>>>>> +#include "sunxi-common-regulators.dtsi" >>>>>> + >>>>>> + >>>>>> +#include >>>>>> +#include >>>>>> +#include >>>>>> + >>>>>> +/ { >>>>>> + model = "Olimex A20-SOM204-EVB"; >>>>>> + compatible = "olimex,a20-olimex-som204-evb", "allwinner,sun7i-a20"; >>>>>> + >>>>>> + aliases { >>>>>> + serial0 = &uart0; >>>>>> + serial1 = &uart4; >>>>>> + serial2 = &uart7; >>>>>> + spi0 = &spi1; >>>>>> + spi1 = &spi2; >>>>>> + ethernet1 = &rtl8723bs; >>>>> >>>>> ethernet1? if there's a single network interface, it should be >>>>> ethernet0. >>>> >>>> I think this will conflict the gmac alias defined in sun7i-a20.dtsi: >>>> >>>> aliases { >>>> ethernet0 = &gmac; >>>> }; >>> >>> We have that? That's bad, but you're right :) >>> >>>>>> + stat { >>>>>> + label = "a20-som204:green:stat"; >>>>>> + gpios = <&pio 8 0 GPIO_ACTIVE_HIGH>; >>>>>> + default-state = "on"; >>>>>> + }; >>>>>> + >>>>>> + led1 { >>>>>> + label = "a20-som204-evb:green:led1"; >>>>>> + gpios = <&pio 8 10 GPIO_ACTIVE_HIGH>; >>>>>> + default-state = "on"; >>>>>> + }; >>>>>> + >>>>>> + led2 { >>>>>> + label = "a20-som204-evb:yellow:led2"; >>>>>> + gpios = <&pio 8 11 GPIO_ACTIVE_HIGH>; >>>>>> + default-state = "on"; >>>>>> + }; >>>>> >>>>> You don't have the same prefix between stat and led1/led2. I'm fine >>>>> with both, but you should be consistent :) >>>> >>>> STAT led is on the SOM204 module, while led1/2 on the EVB. Thats why >>>> they have different prefix. >>> >>> Still, the user and the system will see it as a single board, and the >>> documentation states that it should be the board name. I'm not quite >>> sure what a good rule would be here. Have you looked at how other >>> boards dealt with it? Chen-Yu, any opinion on this? >> >> Follow the bindings, I guess? I don't think we (sunxi) have dealt >> with modules that have LEDs or anything that needs to be named after >> the board. >> >> On a related topic, I don't know if you (Stefan / Olimex) want to split >> this into a .dtsi file for the SoM, and a .dts file for the EVB. It might >> help your customers? > > I'm not sure this will be good ideal. We will have one EVB with all > possible peripheries. On the other hand, we are planning 3-4 different > SOM204 modules (A20, A64, RK....). I think this will make the dtsi > incompatible. Yes. That was what I mentioned in the second half of my reply. > > Maybe if there is one dtsi for the base SOM204 module (one for each arch) > and > multiple dts for boards with additional features. But this will generate > 10-20 > dts files. I think this will be better handled using overlays in the uboot. OK. I'm guessing there's the possibility that some pins or GPIOs get muxed to different functions depending on what base board is used? How would you list them, if you only had one .dts file, say for the EVB? Clearly the SoM cannot work by itself, so it probably doesn't get its own .dts file. > > About the leds, I'm ok to be named after full board name (a20-som204-evb). Cool. ChenYu >> >> I've tried it previously, and it helps in some ways >> when you're matching the files to the schematics. But it is confusing >> when you want the big picture. On the other hand, this is not going to >> help with supporting different modules on the same baseboard, as the >> routing, peripherals and labels likely won't match up. Just my two cents. >> >> ChenYu > > Regards, > Stefan Mavrodiev