From: kishon@ti.com (Kishon Vijay Abraham I)
To: linux-arm-kernel@lists.infradead.org
Subject: [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", ®_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
WARNING: multiple messages have this Message-ID (diff)
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", ®_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
WARNING: multiple messages have this Message-ID (diff)
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Doug Anderson <dianders@chromium.org>, Yunzhi Li <lyz@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>,
"Grant Likely" <grant.likely@linaro.org>,
"Rob Herring" <robh+dt@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
jwerner@chromium.org, "Olof Johansson" <olof@lixom.net>,
"Tao Huang" <huangtao@rock-chips.com>, Chris <zyw@rock-chips.com>,
"Eddie Cai" <cf@rock-chips.com>
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", ®_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
next prev parent reply other threads:[~2014-12-13 7:24 UTC|newest]
Thread overview: 52+ 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 ` Yunzhi Li
2014-12-12 15:00 ` Yunzhi Li
2014-12-12 15:00 ` [PATCH v7 1/5] Documentation: bindings: add dt documentation for Rockchip usb PHY Yunzhi Li
2014-12-12 15:07 ` [PATCH v7 2/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY Yunzhi Li
2014-12-12 15:07 ` Yunzhi Li
2014-12-12 15:07 ` Yunzhi Li
2014-12-13 0:19 ` Doug Anderson
2014-12-13 0:19 ` Doug Anderson
2014-12-13 0:19 ` Doug Anderson
2014-12-13 7:24 ` Kishon Vijay Abraham I [this message]
2014-12-13 7:24 ` Kishon Vijay Abraham I
2014-12-13 7:24 ` Kishon Vijay Abraham I
2014-12-13 23:12 ` Doug Anderson
2014-12-13 23:12 ` Doug Anderson
2014-12-13 23:12 ` Doug Anderson
2014-12-15 18:12 ` Doug Anderson
2014-12-15 18:12 ` Doug Anderson
2014-12-15 18:12 ` Doug Anderson
2015-01-21 9:48 ` Kishon Vijay Abraham I
2015-01-21 9:48 ` Kishon Vijay Abraham I
2015-01-21 9:48 ` Kishon Vijay Abraham I
2015-01-21 10:06 ` Yunzhi Li
2015-01-21 10:06 ` Yunzhi Li
2015-01-21 10:06 ` Yunzhi Li
2015-01-21 10:10 ` Kishon Vijay Abraham I
2015-01-21 10:10 ` Kishon Vijay Abraham I
2015-01-21 10:10 ` Kishon Vijay Abraham I
2015-01-21 10:21 ` Yunzhi Li
2015-01-21 10:21 ` Yunzhi Li
2014-12-12 15:09 ` [PATCH v7 3/5] usb: dwc2: add generic PHY framework support for dwc2 usb controler platform driver Yunzhi Li
2014-12-15 18:13 ` Doug Anderson
2015-01-09 2:15 ` Paul Zimmerman
2015-01-10 13:54 ` Yunzhi Li
2015-01-10 16:06 ` Yunzhi Li
2015-01-10 23:51 ` Paul Zimmerman
2015-01-13 0:54 ` Paul Zimmerman
2015-01-13 9:35 ` Robert Jarzmik
2015-01-13 15:30 ` Felipe Balbi
2014-12-12 15:12 ` [PATCH v7 4/5] ARM: dts: rockchip: add rk3288 usb PHY Yunzhi Li
2014-12-12 15:12 ` Yunzhi Li
2014-12-12 15:12 ` Yunzhi Li
2014-12-15 18:14 ` Doug Anderson
2014-12-15 18:14 ` Doug Anderson
2014-12-15 18:14 ` Doug Anderson
2014-12-12 15:17 ` [PATCH v7 5/5] ARM: dts: rockchip: Enable usb PHY on rk3288-evb board Yunzhi Li
2014-12-12 15:17 ` Yunzhi Li
2014-12-15 18:15 ` Doug Anderson
2014-12-15 18:15 ` Doug Anderson
2015-02-19 22:36 ` [PATCH v7 0/5] Patches to add support for Rockchip usb PHYs Heiko Stübner
2015-02-19 22:36 ` Heiko Stübner
2015-02-19 22:36 ` Heiko Stübner
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=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.