Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2146250pxb; Thu, 11 Feb 2021 05:41:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxWPu1J5PC7x5TK8jHGgO0bt3GEGpQ75KncfjZ+eHk91xhczmh/wEWjqKaDgmS3IWYp9yRF X-Received: by 2002:a17:906:17d3:: with SMTP id u19mr8970407eje.316.1613050918508; Thu, 11 Feb 2021 05:41:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613050918; cv=none; d=google.com; s=arc-20160816; b=NiqSpWXWEczSLIwvUvO4264iBcWeQCEODYnuXti3WuvJ+d/wcDSAqmuS9eQIF2b/Ea stQaPuK99b6IOW+dXIQz+pxp496udK+2122xUT8bkf6xAewGSc1edVksXwNYjIUfhKsW Fkxy/ehIgALiqeWMyAr4d03GIrvNpyv7csHSGbtzkJld8Yi8I8gUhDHmD6LdiLvhMRJD A7W2heBRWUMrD/5JkA+uJk1M6BUqwPu7DOJfsz8ELg1l1i9U1T1p4acgv6wZzxS/Gwun tlr/qE8iskQsyUOAN21u2yinMj6qLxuacRuoKEtQXhP2ppJkblwp7TDS61IkhX4h0fRD 7P0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=RkqiRZRDpEECn5JZ3R4bJkI6n0rep8cTHamHqmutATc=; b=jareByPKRha0c0pmp7D/u3fH9UTVe3mYDWQ2MWlth+T5rG8kWCE5GbBeg8Eo5Avt+i hUA5CQ/HwOZkvgHDiz76vyAvSZVCZW52YZNwViW0FYqT4yC1Xb49e76jLtbxSPtFBwRE qGRAa4AQxrxcqkTfgHhVUatftjPDWskm50JytFUweYA3Kr3uz2/Zr9Q6qrQEsb5wiuE0 qKigGKAi+HZAcz2zFNgG/2vcmxJuQtHI+F2HkHzFoPJ1eCbHd28bHAaopYkMmsVskSjr fS7luUc6ZtIi9mKN0169LGYsl5pNNCii2eYk/3X81Gzz5MkypV9huRZ0io0QkgXQe4qV W/+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a1si3792243edj.524.2021.02.11.05.41.34; Thu, 11 Feb 2021 05:41:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229803AbhBKNiz (ORCPT + 99 others); Thu, 11 Feb 2021 08:38:55 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:37999 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231235AbhBKNSn (ORCPT ); Thu, 11 Feb 2021 08:18:43 -0500 Received: from [192.168.1.155] ([95.114.27.115]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M8yPu-1lE3Av2zoM-0063xQ; Thu, 11 Feb 2021 14:15:51 +0100 Subject: Re: [RFC PATCH 12/12] platform/x86/of: add support for PC Engines APU v2/3/4 boards To: Rob Herring , "Enrico Weigelt, metux IT consult" Cc: "linux-kernel@vger.kernel.org" , "Rafael J. Wysocki" , Linus Walleij , Bartosz Golaszewski , Frank Rowand , Pantelis Antoniou , "open list:GPIO SUBSYSTEM" , devicetree@vger.kernel.org References: <20210208222203.22335-1-info@metux.net> <20210208222203.22335-13-info@metux.net> From: "Enrico Weigelt, metux IT consult" Message-ID: <1a96e003-e264-9f9b-4239-4b3b002c0198@metux.net> Date: Thu, 11 Feb 2021 14:15:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: tl Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:X03an0jzA7Ik2yin6U2Zx4JrFGvXamVp+aFMSxgk7gvcKjOnIG2 wRS+NMnI958UjkK1bAW4exbjNEvRWZ4ey6UZ/64Wd23lvW+3NvDnpHNqEqa3EAzsTjMSeCb uDnDWaaxXEORuRz806oib9eZzBt5K/+/B3QtShlGtjSybccD7Yex6xVSQN8drwU+hYgwMdT UNQdvFXyUb8a8euhz5KLQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:iBvfJPWk7OE=:tQXOSq539WLmvFCUNCOBEG W4jA2/b156mHHTcc63xYdiTc8DwuHKNNCPNatkoJNn+AmALQJ0VWiwHZKTWrgm2lcxJsMtRxo wnZVhG59kLAMEwXRwSLzyD4AD3Wb9d2jQW5gyYVXos+6kb0UQTDYQsboEZhxo9CKlLD/ceQtV Mi7uaSAvqgfTECa6MnBYgzbln8Xpp3rYHWQT6SGGgVKW2hN42JwUneuwrnyALk9Rzb53NNdtv PhoarSX7K0oU5Vn5AkuhYFzVvWl5xufuI9IV28Rajfp1IG/sq4zutlTf4t8jWUzoHH1D3JQdJ TixDQ5UEECULBXxxLM8BFIe5ZWUedHT8MiuHrWg0aW945siyMdOalTHlKHcUmBocrrC3M5F6z V1wlARoAS3v3rUDA1rv+uEcw5xpeCZ2pDY3NQMEdxwtWHerWKVdE2G/eEj/QW Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.02.21 01:06, Rob Herring wrote: Hi, >> +/ { >> + apu2x { >> + compatible = "virtual,dmi-board"; >> + dmi-sys-vendor = "PC engines"; >> + dmi-board-name = >> + "APU2", >> + "apu2", >> + "PC engines apu2", >> + "APU3", >> + "apu3", >> + "PC engines apu3", >> + "APU4", >> + "apu4", >> + "PC engines apu4"; > > I think these DMI properties just need to be the compatible string(s). > We already have a way to do matching with DT and don't need a > secondary way. If you can It's not easy fitting that into one string, because we've got lots of combinations that need to be matched. In this specific case, I haven't seen any board where the vendor name isn't an exact match of the given string (that's why it's only one entry), but in the past seen several boards where even this changes between bios versions. The board names, more varying. Something that's not reflected in this example yet: there're even more subtle differences between production series (eg. certain pins not wired, etc). Supporting such things would need adding more matching rules and possibly runtime DT manipulations. >> + unbind { >> + acpi = "PNP0076:00", "PNP0B00:00"; >> + platform = "platform-framebuffer.0", "PNP0103:00"; > > This node really needs to go. It's clearly Linuxisms. It either has to > go in the kernel or userspace. Note that the whole thing here *is* a Linuxism. This kind of DTs is built into the kernel, not in firmware or anywhere else. This stuff is only for cases where firmware is not giving, or giving broken information. And it's for replacing hand-written C code by a machine readable description. I had to put that in, since in some cases firmware (-versions) already enumerates some devices, but does it in a wrong or incomplete way. So, these devices need to be removed first, before the correct ones can be initialized. (note that this patch, for now, is just an hacking example - some details are still broken). If anybody has a better idea how to do that, let me know. In general, I'd like to have everything for one board (family) in one declarative file. >> + }; >> + devices { >> + gpio1: gpio1 { >> + compatible = "amd,fch-gpio"; > > This of course will need to be documented. Yes, but that's a different issue. It's still in RFC stage. The gpio-amd-fch changes are in this patch queue for a complete example, but probably will be upstreamed separately. >> + gpio-controller; >> + status = "okay"; > > nit: That's the default. Okay, dropping it. --mtx -- --- Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren GPG/PGP-Schlüssel zu. --- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@metux.net -- +49-151-27565287