devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Doug Anderson <dianders@chromium.org>, Yunzhi Li <lyz@rock-chips.com>
Cc: "Tao Huang" <huangtao@rock-chips.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Olof Johansson" <olof@lixom.net>, Chris <zyw@rock-chips.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	"Eddie Cai" <cf@rock-chips.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Grant Likely" <grant.likely@linaro.org>,
	jwerner@chromium.org,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v7 2/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY
Date: Sat, 13 Dec 2014 12:54:14 +0530	[thread overview]
Message-ID: <548BE99E.2000409@ti.com> (raw)
In-Reply-To: <CAD=FV=XiP37Q8EkDYpBgh=Ng9nJD9-Uow0qCy78u6kCZomGNPA@mail.gmail.com>

hi,

On Saturday 13 December 2014 05:49 AM, Doug Anderson wrote:
> Yunzhi,
> 
> On Fri, Dec 12, 2014 at 7:07 AM, Yunzhi Li <lyz@rock-chips.com> wrote:
>> This patch to add a generic PHY driver for ROCKCHIP usb PHYs,
>> currently this driver can support RK3288. The RK3288 SoC have
>> three independent USB PHY IPs which are all configured through a
>> set of registers located in the GRF (general register files)
>> module.
>>
>> Signed-off-by: Yunzhi Li <lyz@rock-chips.com>
>>
>> ---
>>
>> Changes in v7:
>> - Accept Kishon's comments to use phandle args to find a phy
>>   struct directly and get rid of using a custom of_xlate
>>   function.
> 
> I'm going to assume you didn't test this version, since it doesn't
> work for me.  At suspend time power is high and my printouts in the
> powerup/powerdown code aren't called...
> 
> 
>> +       for_each_available_child_of_node(dev->of_node, child) {
>> +               rk_phy = devm_kzalloc(dev, sizeof(*rk_phy), GFP_KERNEL);
>> +               if (!rk_phy)
>> +                       return -ENOMEM;
>> +
>> +               if (of_property_read_u32(child, "reg", &reg_offset)) {
>> +                       dev_err(dev, "missing reg property in node %s\n",
>> +                               child->name);
>> +                       return -EINVAL;
>> +               }
>> +
>> +               rk_phy->reg_offset = reg_offset;
>> +               rk_phy->reg_base = grf;
>> +
>> +               rk_phy->clk = of_clk_get_by_name(child, "phyclk");
>> +               if (IS_ERR(rk_phy->clk))
>> +                       rk_phy->clk = NULL;
>> +
>> +               rk_phy->phy = devm_phy_create(dev, child, &ops);
>> +               if (IS_ERR(rk_phy->phy)) {
>> +                       dev_err(dev, "failed to create PHY\n");
>> +                       return PTR_ERR(rk_phy->phy);
>> +               }
>> +               phy_set_drvdata(rk_phy->phy, rk_phy);
>> +       }
>> +
>> +       phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
> 
> I think your bug is here.  I think you now need to register 3 phy
> providers, not just one.

No there should be only one phy provider. It means the bug is elsewhere.

Thanks
Kishon

  reply	other threads:[~2014-12-13  7:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-12 15:00 [PATCH v7 0/5] Patches to add support for Rockchip usb PHYs Yunzhi Li
2014-12-12 15:00 ` [PATCH v7 1/5] Documentation: bindings: add dt documentation for Rockchip usb PHY Yunzhi Li
     [not found] ` <1418396413-27937-1-git-send-email-lyz-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-12-12 15:07   ` [PATCH v7 2/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY Yunzhi Li
     [not found]     ` <1418396866-32625-1-git-send-email-lyz-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-12-13  0:19       ` Doug Anderson
2014-12-13  7:24         ` Kishon Vijay Abraham I [this message]
     [not found]           ` <548BE99E.2000409-l0cyMroinI0@public.gmane.org>
2014-12-13 23:12             ` Doug Anderson
2014-12-15 18:12       ` Doug Anderson
2015-01-21  9:48       ` Kishon Vijay Abraham I
     [not found]         ` <54BF75FF.6020207-l0cyMroinI0@public.gmane.org>
2015-01-21 10:06           ` Yunzhi Li
     [not found]             ` <54BF7A25.2050000-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-01-21 10:10               ` Kishon Vijay Abraham I
2015-01-21 10:21                 ` Yunzhi Li
2014-12-12 15:12   ` [PATCH v7 4/5] ARM: dts: rockchip: add rk3288 usb PHY Yunzhi Li
     [not found]     ` <1418397141-1079-1-git-send-email-lyz-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-12-15 18:14       ` Doug Anderson
2015-02-19 22:36   ` [PATCH v7 0/5] Patches to add support for Rockchip usb PHYs Heiko Stübner
2014-12-12 15:17 ` [PATCH v7 5/5] ARM: dts: rockchip: Enable usb PHY on rk3288-evb board Yunzhi Li
2014-12-15 18:15   ` Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=548BE99E.2000409@ti.com \
    --to=kishon@ti.com \
    --cc=cf@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=grant.likely@linaro.org \
    --cc=heiko@sntech.de \
    --cc=huangtao@rock-chips.com \
    --cc=jwerner@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lyz@rock-chips.com \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=zyw@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).