From owner-freebsd-hackers@freebsd.org Sun Sep 9 07:25:51 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72730108DBE5 for ; Sun, 9 Sep 2018 07:25:51 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D0648A306 for ; Sun, 9 Sep 2018 07:25:50 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 69957219FE for ; Sun, 9 Sep 2018 03:25:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 09 Sep 2018 03:25:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.net; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=WGQTiIs7TMsCvKhumwdvMurRz86D8BgFMuGFsFunemY=; b=sqogr4e7 D/zYero/sLPFp1ky/DnB6RT6mPJJncuAZfleNGjwaFLHzZbtTTyAnn/2X/uAefT7 sllISho+BaC+x+w7RvEdbpxs5o2JB2Q7XG+BMvqMXf896xm2V2yAwavFjPlemaMp AD5GTckNNz/nMztfxJPpN101Sk+dGqJL8tKC+zdQRFLkHi2ENtF3d7HjVbfozm0e /UOn2jdBMdTdZVMUwBG2zQ70JrGUI++pnzupUu0w/d1uHvf1tAqGxl5RU1OzzYBS zuKkoUV7mEKHDtn8H+MQK1Uytr7kw3LprvVrCojIpnEL9J6szbxCIXsflejnihDQ JkLGXC/Wn98WlA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=WGQTiIs7TMsCvKhumwdvMurRz86D8 BgFMuGFsFunemY=; b=IyzaSWFzJk7/wZMbp3ttty/3JTQyhfL1zaY7Ldo2j4B3I r6ZAWE9LQKKWLSpfNLAGvbrKRZi9QtXTgFBoz3RDZHgH4Hi/1hwwcNMBCzunZwcA p6UM38ya3qjjfAHvIZP7zdJ8fBc3rCiFVtetLdMiOhmjVAQiaUpIBH/qblgAWHQx s9gWaPtgPdvUJ2mDq7vqCs/PwrSW9rW6McDH0sF93h7IYtrhsoK5h7Gdt0Zlq1e4 aYRArbbcQWT3/+3cAqPQXRTwxNshcEuW2sqqrAC5Qf5Noajs0HJiJTsCLrlxnrY3 sNwg3vKVBNScrhyyFw6pcmzdAxSdIGCFG+DEu0jXA== X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.2] (unknown [62.183.126.215]) by mail.messagingengine.com (Postfix) with ESMTPA id A699810293 for ; Sun, 9 Sep 2018 03:25:49 -0400 (EDT) To: freebsd-hackers From: Yuri Pankov Subject: acpi, pci, spibus -- tying it all together Message-ID: <30e41db8-a56d-e916-0490-7e184063a811@yuripv.net> Date: Sun, 9 Sep 2018 10:25:44 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2018 07:25:51 -0000 I have modified intelspi to attach to SPI master (Sunrise Point-H Serial IO SPI) located on pci bus, and on attach I have the spibus0 and spibus1 buses added. As spibus is not self-enumerating, the only way to find the slave device I need is via acpi bus probe, that works, but I don't see a way to make it a child of spibus1 (where it's located). In ACPI terms it looks like the below (from DSDT): ... \_SB_.PCI0.SPI0 "Device (SPI0)" \_SB_.PCI0.SPI1 "Device (SPI1)" ... Scope (SPI1) { Device (SPIT) { ...here comes all the data we need, including the ACPI ID we can probe... } } ... I hope that made at least some sense. And the question is if there any existing way of tying it all together, and adding that slave device to the spibus1 (which only knows about hinted children at the moment)?