Received: by 10.223.176.46 with SMTP id f43csp4209317wra; Tue, 23 Jan 2018 06:06:12 -0800 (PST) X-Google-Smtp-Source: AH8x224oK6PFVWTNGSsAs+OUsNN8ot6HlpDLJYN13si375mCjpCIhxKCjARrVHKk8mtlByeaTAtG X-Received: by 2002:a17:902:7003:: with SMTP id y3-v6mr5758536plk.449.1516716371899; Tue, 23 Jan 2018 06:06:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516716371; cv=none; d=google.com; s=arc-20160816; b=U0gm0kTlj3J2vaWyPGxKAd2lCg8AkmCbF6HDfbMs/OhUZ89UVulPHRCZpVNLqMVwpE DzAVGswff7Y0asJDq4EcW0VG1srXC1IEr2VLIFyrOHjJFHGoWObvVwvkVHz41T+U0OHb NoJZE2KK55KmwXbtSWh6YBWhcWkjM2NxA0SVDRD8C46nJz0BpvYWgWFKElsKAaqpxbZA FFfVDNFyQYOxf7jz/SSKXMLOLmKhJEKOx2XIx5pvEbRuvGn0Uov4XaV34XcuQHgGvsDX up5QOtINpKugziSRoK7n87bRK9O96GDJasM5W0VlU04SKJzpeyNmfGNdiqqUca0o8zr1 WH/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=/bvIYCXyULqCHv5Txc7eS70hrfgwW54/F6Q/rabSG2k=; b=NtK0lawhJNcYXHXsdRaVTIwOdVHiCu3e55FC9jcSXJVUY6m9ENrPzGdvQV6q+WohtH ITB1iB5K8JURPnKNPi0cH1yromcVxrzOyFuxxZhchS0iCVPOxHGLtBbMLZHPE3B7rx4P tqhvQ79Gw5Jepm2yqN+hf7yjU8ZLEGysn35xj6EtPQp6K8tr/1ijqgo0r3j8Z4ugdOyJ voCpZFfySjUBP1TZjGUv8ZJ1vsbkww9C3gd0YwXB7OufMuQ6mX+cqVC5Iqze0kC9tnVy M4JVYgG/DyhuOMHU5C/JCisALpFMllL0TsyZ9rizf1SZnoO9eO3wYS65vW9MajNa/M2z AEwA== 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 89-v6si2314302plb.612.2018.01.23.06.05.30; Tue, 23 Jan 2018 06:06:11 -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 S1751933AbeAWOE1 (ORCPT + 99 others); Tue, 23 Jan 2018 09:04:27 -0500 Received: from olimex.com ([184.105.72.32]:52894 "EHLO olimex.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751655AbeAWOEZ (ORCPT ); Tue, 23 Jan 2018 09:04:25 -0500 Received: from 195.238.85.143 ([195.238.85.143]) by olimex.com with ESMTPSA (ECDHE-RSA-AES128-GCM-SHA256:TLSv1.2:Kx=ECDH:Au=RSA:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username stefan@olimex.com, mechanism PLAIN) for ; Tue, 23 Jan 2018 06:04:19 -0800 Subject: Re: [PATCH 1/1] ARM: dts: sunxi: Add Olimex A20-SOM204-EVB board To: Chen-Yu Tsai , 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 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: Stefan Mavrodiev Message-ID: Date: Tue, 23 Jan 2018 16:04:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/20/2018 08:08 AM, Chen-Yu Tsai wrote: > 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. Yes, the SoM cannot work by itself. I'm thinking to follow the current practice:     - One dts for base board + evb     - One dts for the above + eMMC. There is also possibility (a real one) some periphery to work with one SoM, and other - not. For example A20-SOM204 or A64-SOM204 doesn't have PCIe support, but RKxxxx-SOM204 will. On second re-read of the comments: >> +}; >> + >> +&ahci { >> + target-supply = <®_ahci_5v>; > You should use the regulators you defined in your PMIC there. The power comes from the DC jack not from PCIM. In this case, is this OK? > >> +&usb_otg { >> + dr_mode = "otg"; >> + status = "okay"; >> +}; >> + >> +&usb_power_supply { >> + status = "okay"; >> +}; >> + >> +&usbphy { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&usb0_id_detect_pin>, >> + <&usb0_vbus_detect_pin>; >> + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ >> + usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ >> + usb0_vbus_power-supply = <&usb_power_supply>; >> + usb0_vbus-supply = <®_usb0_vbus>; >> + usb1_vbus-supply = <®_usb1_vbus>; >> + usb2_vbus-supply = <®_usb2_vbus>; > You should also use one of the PMIC regulators here. Same here. Power comes from DC jack, not PMIC. Regards, Stefan Mavrodiev > >> 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