From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Subject: Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver Date: Wed, 17 Aug 2016 23:19:23 -0500 Message-ID: <57B5374B.6010805@codeaurora.org> References: <1470255143-3979-1-git-send-email-timur@codeaurora.org> <20160804175541.GA2832@rob-hp-laptop> <57B220C0.3060608@codeaurora.org> <57B31780.5030106@codeaurora.org> <57B3878D.1000805@codeaurora.org> <57B4C6EE.3080903@codeaurora.org> <57B4E5F7.9040500@codeaurora.org> <57B52B17.1080809@codeaurora.org> <5CCEFB33-8F93-40D7-BD32-ACDE1CBA586D@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5CCEFB33-8F93-40D7-BD32-ACDE1CBA586D-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Florian Fainelli , Al Stone , Rob Herring Cc: netdev , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , linux-arm-msm , Sagar Dharia , Shanker Donthineni , Vikram Sethi , Christopher Covington , Gilad Avidov , Andrew Lunn , Bjorn Andersson , Mark Langsdorf , "jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org" , Andy Gross , David Miller , Lino Sanfilippo , "Rafael J. Wysocki" , "Abdulhamid, Harb" List-Id: linux-arm-msm@vger.kernel.org Florian Fainelli wrote: > The larger issue is that the emac_sgmii node in the form you posted > is going to be backed by a platform device in Linux while you want a > PHY device with a reg property that describes a MDIO address > (#address-cells = 1, #size-cells = 0). But how do I get the platform device for the emac_sgmii node? If I create an of_device_id ID for it, like this: static const struct of_device_id emac_dt_match[] = { { .compatible = "qcom,fsm9900-emac", }, {} }; static const struct of_device_id emac_sgmii_dt_match[] = { { .compatible = "qcom,fsm9900-emac-sgmii", }, {} }; Then the probe function will be called for qcom,fsm9900-emac-sgmii separately from qcom,fsm9900-emac, which just confuses things. So I can't create emac_sgmii_dt_match. I know this is standard DT stuff, and I used to do a lot of work on DT so maybe I should know this already. But it seems to me that I need to manually create the platform_device for qcom,fsm9900-emac-sgmii. > IIRC the amd xgbe driver mainline had a similar design but still > implemented a PHY device anyway although it may not have been using > Device Tree. It should still be possible to implement a PHY driver > that you manually register and bind to its device_node pointer such > that of_phy_find_device and friends still work. You would do this > from the emac_sgmii platform device driver and parent devices in a > way that satisfy the PHY device driver lifecycle as well. > > Hope this helps. It doesn't, sorry. The emac_sgmii is really just another register block for the driver to program. Creating another PHY driver for it doesn't really make sense. It's not on an MDIO bus. -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html