Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp546145pxa; Wed, 12 Aug 2020 08:14:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxR9WOMZKOjee115M6aeh78NAl79i9F2ZORKiY1Y08xHm+wzRM/sQzVPB6px7J54V22yiTx X-Received: by 2002:a05:6402:1c10:: with SMTP id ck16mr363142edb.151.1597245298947; Wed, 12 Aug 2020 08:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597245298; cv=none; d=google.com; s=arc-20160816; b=ZgoSJK4mPoLqXX7wL9a9NAjVAMDpZjB7nEltsUF71nlHzOMHQ+ZAje/GWT9VhJuEBH n4xOijWAhbnmDd7L6BbvC5WuHwjCi96qZKnxOtn95ESvKs+zxj+j7/5UgsA4wY1kJKYc Rfc0OE09Ng7gaDyABAcfBRJ3XpUSPejUy+0bZDKAtBoDfouhsteaVV3zmR3xeXmVvvh5 K3fe/XAsxGIKU/gzkLc7HiqTkcd2QqezKEwNTmXsZuEJQbiV7ZPW9UQPAW4Aj8HXXet9 ub88Nq1X7z2IfooV4VUGLb8c9i1NyBnVslbQnQnUQVJKVRY/XFItBX4g2Vuq8CeHna6B UGoA== 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:from:references:cc:to:subject:dkim-signature; bh=jd+0O3rfZzFFL8LU24BOfuyCqms8qaWRv2Co74kbUzc=; b=D121sPJfDrJiWNrkm8JGmNG3R6uucE6AAgqGWkqxNDyT9gKR1pFEDc05aXTjMBIgcn XgLWn4PVOLtwvhWRKsNgMy0EX5s4iy5os4jQTKVOo4RSZRjl07Anw4+j2txoCTwxg1oD MXSvPwCdouL1IMYdxOfRv3f+PkP4l/sX5dmsE9gfBZIi0/sA1gOSOMgqnA666Joz5GD+ bD8XfufwqzPzncYMgb6KV2a8SIIendOFJUgyIsSKyC6iOMRE1xMmd/3I/CB/cf86OfeW AVYDnbwGcDyPPkr/DZTRCFmFH1JpYDAyEqqvPxQw4Rx1m1Wg094cb7fJ4TklbdmC6OAm ZiJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j91ZT750; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si1535013ejb.68.2020.08.12.08.14.36; Wed, 12 Aug 2020 08:14:58 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j91ZT750; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726641AbgHLPNd (ORCPT + 99 others); Wed, 12 Aug 2020 11:13:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726510AbgHLPN1 (ORCPT ); Wed, 12 Aug 2020 11:13:27 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 022C2C061384; Wed, 12 Aug 2020 08:13:26 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id x12so1728842qtp.1; Wed, 12 Aug 2020 08:13:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jd+0O3rfZzFFL8LU24BOfuyCqms8qaWRv2Co74kbUzc=; b=j91ZT750zKdCaCs4PQtHNGQx8b7SYeKNb5qzyJ5ohLQUEL3iCPkSC12yVA98Qd3XZA aBwqrwl/PshYusq68OX1wPw/JOQboTCXOpwLBqSalmYjNfcMdx8AyiCi1xDaPGN+f9t9 4eiF04kqG8gzcHjhsd4cLYBV4lYgIuHLxUVuOQdsKSTdhjh0pTvCCXvTDaohVViR9Ppr Hde4WwVtAclxGRzY2jqBNY48bQPAwtYh4Nwglua8IN7T/5V2kWZBvFnRxXRc2MyedgiG O1TF8j5YSLdh+NcKTAgGbBv2zN5/7tUZGM6eJzMAve+tX3Q5uc/+58Emc1RQCUkIBXv0 b+aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jd+0O3rfZzFFL8LU24BOfuyCqms8qaWRv2Co74kbUzc=; b=Z0ifID5BJZH11zKUAFT3mZ4Iq7nNsQBvmAvefgSdQosFDYsjdpCBFOot1l57w8FW+K hTJJtzrU8tmOZACbbXp4amDClhh/ShDa9Zq5WA5nkiNqPsDwZ1y9fY3zAdBnfEhGIrYA NWaJUk1g0k6WQUtjyCzGJ6bubFW0JcLWResk6c5xDmweqskewlgk6cppHizaf907bkDc TetSoQ/3+Pjsri6ecofmbrGRFPBRN9Sl8U5bwsraLid9q9AW/ShBPfJIN/t/kjkjxfut 6XY62kBMRwRqjPWjBvRpmW5hjDxpkGhvchHd/LV42KWcslemltDoWDr2U+KMqf3pjo7E IJuQ== X-Gm-Message-State: AOAM533kq9NaC8U3pP+aLuyZnJon9d/HByEO0dm3KlaZY9aVB20rbfp8 35rLKbbL2HJ9jkdU9mKuqSM= X-Received: by 2002:ac8:7606:: with SMTP id t6mr44005qtq.348.1597245205581; Wed, 12 Aug 2020 08:13:25 -0700 (PDT) Received: from [192.168.1.46] (c-73-88-245-53.hsd1.tn.comcast.net. [73.88.245.53]) by smtp.gmail.com with ESMTPSA id k5sm2695377qke.18.2020.08.12.08.13.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Aug 2020 08:13:25 -0700 (PDT) Subject: Re: [Q] devicetree overlays To: "Enrico Weigelt, metux IT consult" , Sven Van Asbroeck , "Enrico Weigelt, metux IT consult" Cc: Pantelis Antoniou , David Airlie , Daniel Vetter , devicetree , Linux Kernel Mailing List References: <24f1687c-043a-a15e-0be4-8392e7b5c96b@metux.net> <1acc987a-d844-fca7-77eb-cf1d466f35c1@metux.net> From: Frank Rowand Message-ID: Date: Wed, 12 Aug 2020 10:13:24 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1acc987a-d844-fca7-77eb-cf1d466f35c1@metux.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-08-12 08:27, Enrico Weigelt, metux IT consult wrote: > On 07.08.20 16:17, Sven Van Asbroeck wrote: > > Hi, > >> I believe you're asking: "how do I associate device tree nodes to >> devices on a dynamically discoverable bus such as USB or PCI" right ? >> >> I believe that already exists. You can describe the _expected_ pci or >> usb topology in the >> devicetree. If a device gets detected in a spot on the bus described >> in the tree, that >> snippet will be automatically associated with this device. >> >> How to for usb: >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/usb/usb-device.txt?h=v5.8 >> >> How to for pci: >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/pci/pci.txt?h=v5.8 > > Thanks, that looks good. > > But I've still got another problem: how can I use DT along w/ ACPI ? Some answers from https://elinux.org/Device_tree_plumbers_2016_etherpad Question: what about device tree on x86 Answer: there's already support for DT on x86. But, we should not mix DT and ACPI. A controversial topic is ACPI overlays (putting DT in ACPI or ACPI in DT). Don't want to have drivers that get part of their info from ACPI and part from DT. That's nuts. Question: Can you have ACPI and DT at the same time on x86? Answer: No. Some ARM64 systems have support for both ACPI and DT, but the system selects one to use at runtime. They are not used at the same time. You can run the DT unit tests on x86. -Frank > > The scenario goes like this: > > * machine boots and probes normally w/ ACPI > * device is detected via USB, PCI, DMI, etc -> driver gets active > * driver loads (or carries) a DT snippet > * devices on the bus are instantiated via this DT snippet > > (driver could also be some udev vodoo) > > Example a: > > * generic usb i2c dongle w/ some i2c devices attached behind it > * config (or DT snippet) somewhere in the FS > > Example b: > > * x86 board driver (eg. apu2/3/4), probed via DMI > * just instantiates a bunch of generic drivers and wires up > devices (gpio, leds, keys, ...) > > > Do you think we can already do that ? > Otherwise, what has to be done to achieve that ? > > > --mtx >