Message ID | 1542314695-24071-2-git-send-email-jhugo@codeaurora.org (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Andy Gross |
Headers | show |
Series | Enable SD card slot on msm8998 MTP | expand |
On 15/11/2018 21:44, Jeffrey Hugo wrote: > The root parent clock of most msm8998 clock is the "xo" clock. The DT node > is incorrectly named "xo_board", which prevents Linux from correctly > parsing the clock tree, resulting in most clocks being unparented and > unable to be manipulated. The end result is that we can't turn on clocks > for peripherals like SD, so init usually fails. > > Fixes: 4807c71cc688 (arm64: dts: Add msm8998 SoC and MTP board support) > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> > Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org> > --- > arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi > index 78227cc..a948d4b 100644 > --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi > +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi > @@ -53,7 +53,7 @@ > }; > > clocks { > - xo_board { > + xo { > compatible = "fixed-clock"; > #clock-cells = <0>; > clock-frequency = <19200000>; > Isn't there going to be a problem for msm8998 in drivers/clk/qcom/clk-smd-rpm.c which uses "xo_board" for parent_names? Regards.
On 12/5/2018 9:12 AM, Marc Gonzalez wrote: > On 15/11/2018 21:44, Jeffrey Hugo wrote: > >> The root parent clock of most msm8998 clock is the "xo" clock. The DT node >> is incorrectly named "xo_board", which prevents Linux from correctly >> parsing the clock tree, resulting in most clocks being unparented and >> unable to be manipulated. The end result is that we can't turn on clocks >> for peripherals like SD, so init usually fails. >> >> Fixes: 4807c71cc688 (arm64: dts: Add msm8998 SoC and MTP board support) >> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> >> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org> >> --- >> arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi >> index 78227cc..a948d4b 100644 >> --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi >> +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi >> @@ -53,7 +53,7 @@ >> }; >> >> clocks { >> - xo_board { >> + xo { >> compatible = "fixed-clock"; >> #clock-cells = <0>; >> clock-frequency = <19200000>; >> > > Isn't there going to be a problem for msm8998 in drivers/clk/qcom/clk-smd-rpm.c > which uses "xo_board" for parent_names? Looks like you are right. This doesn't seem to be the correct way to address the issue then. I'll have to dig in and take another look.
On Wed 05 Dec 08:38 PST 2018, Jeffrey Hugo wrote: > On 12/5/2018 9:12 AM, Marc Gonzalez wrote: > > On 15/11/2018 21:44, Jeffrey Hugo wrote: > > > > > The root parent clock of most msm8998 clock is the "xo" clock. The DT node > > > is incorrectly named "xo_board", which prevents Linux from correctly > > > parsing the clock tree, resulting in most clocks being unparented and > > > unable to be manipulated. The end result is that we can't turn on clocks > > > for peripherals like SD, so init usually fails. > > > > > > Fixes: 4807c71cc688 (arm64: dts: Add msm8998 SoC and MTP board support) > > > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> > > > Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org> > > > --- > > > arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi > > > index 78227cc..a948d4b 100644 > > > --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi > > > +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi > > > @@ -53,7 +53,7 @@ > > > }; > > > clocks { > > > - xo_board { > > > + xo { > > > compatible = "fixed-clock"; > > > #clock-cells = <0>; > > > clock-frequency = <19200000>; > > > > > > > Isn't there going to be a problem for msm8998 in drivers/clk/qcom/clk-smd-rpm.c > > which uses "xo_board" for parent_names? > > Looks like you are right. This doesn't seem to be the correct way to > address the issue then. I'll have to dig in and take another look. > The appropriate solution is to describe references between clock drivers explicitly in DeviceTree and by that not rely on a global namespace. That will also sort out any initialization ordering issues that we might have. But this task has not yet made it off the todo lists where it lives... Regards, Bjorn
On 12/5/2018 9:48 AM, Bjorn Andersson wrote: > On Wed 05 Dec 08:38 PST 2018, Jeffrey Hugo wrote: > >> On 12/5/2018 9:12 AM, Marc Gonzalez wrote: >>> On 15/11/2018 21:44, Jeffrey Hugo wrote: >>> >>>> The root parent clock of most msm8998 clock is the "xo" clock. The DT node >>>> is incorrectly named "xo_board", which prevents Linux from correctly >>>> parsing the clock tree, resulting in most clocks being unparented and >>>> unable to be manipulated. The end result is that we can't turn on clocks >>>> for peripherals like SD, so init usually fails. >>>> >>>> Fixes: 4807c71cc688 (arm64: dts: Add msm8998 SoC and MTP board support) >>>> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> >>>> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org> >>>> --- >>>> arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi >>>> index 78227cc..a948d4b 100644 >>>> --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi >>>> +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi >>>> @@ -53,7 +53,7 @@ >>>> }; >>>> clocks { >>>> - xo_board { >>>> + xo { >>>> compatible = "fixed-clock"; >>>> #clock-cells = <0>; >>>> clock-frequency = <19200000>; >>>> >>> >>> Isn't there going to be a problem for msm8998 in drivers/clk/qcom/clk-smd-rpm.c >>> which uses "xo_board" for parent_names? >> >> Looks like you are right. This doesn't seem to be the correct way to >> address the issue then. I'll have to dig in and take another look. >> > > The appropriate solution is to describe references between clock drivers > explicitly in DeviceTree and by that not rely on a global namespace. > That will also sort out any initialization ordering issues that we might > have. > > But this task has not yet made it off the todo lists where it lives... Ok, that sounds great, but doesn't seem like it helps anyone today. Looks like 8916 and 8974 explicitly register an xo clock off the xo_board clock in the respective gcc drivers. 8996 does not, but I don't know how functional 8996 really is on mainline. 845 seems to register the bi_tcxo clock (the 845 version of xo) in the rpmh driver, off of xo_board. Since both Marc and I are trying to get 8998 to work, it seems like one of those two solutions would be workable, short term. How do you suggest we proceed?
Quoting Jeffrey Hugo (2018-12-05 09:03:54) > On 12/5/2018 9:48 AM, Bjorn Andersson wrote: > > On Wed 05 Dec 08:38 PST 2018, Jeffrey Hugo wrote: > > > >> On 12/5/2018 9:12 AM, Marc Gonzalez wrote: > >>> On 15/11/2018 21:44, Jeffrey Hugo wrote: > >>> > >>>> The root parent clock of most msm8998 clock is the "xo" clock. The DT node > >>>> is incorrectly named "xo_board", which prevents Linux from correctly > >>>> parsing the clock tree, resulting in most clocks being unparented and > >>>> unable to be manipulated. The end result is that we can't turn on clocks > >>>> for peripherals like SD, so init usually fails. > >>>> > >>>> Fixes: 4807c71cc688 (arm64: dts: Add msm8998 SoC and MTP board support) > >>>> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> > >>>> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org> > >>>> --- > >>>> arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- > >>>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>>> > >>>> diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi > >>>> index 78227cc..a948d4b 100644 > >>>> --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi > >>>> +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi > >>>> @@ -53,7 +53,7 @@ > >>>> }; > >>>> clocks { > >>>> - xo_board { > >>>> + xo { > >>>> compatible = "fixed-clock"; > >>>> #clock-cells = <0>; > >>>> clock-frequency = <19200000>; > >>>> > >>> > >>> Isn't there going to be a problem for msm8998 in drivers/clk/qcom/clk-smd-rpm.c > >>> which uses "xo_board" for parent_names? > >> > >> Looks like you are right. This doesn't seem to be the correct way to > >> address the issue then. I'll have to dig in and take another look. > >> > > > > The appropriate solution is to describe references between clock drivers > > explicitly in DeviceTree and by that not rely on a global namespace. > > That will also sort out any initialization ordering issues that we might > > have. > > > > But this task has not yet made it off the todo lists where it lives... > > Ok, that sounds great, but doesn't seem like it helps anyone today. > > Looks like 8916 and 8974 explicitly register an xo clock off the > xo_board clock in the respective gcc drivers. 8996 does not, but I > don't know how functional 8996 really is on mainline. 845 seems to > register the bi_tcxo clock (the 845 version of xo) in the rpmh driver, > off of xo_board. > > Since both Marc and I are trying to get 8998 to work, it seems like one > of those two solutions would be workable, short term. > > How do you suggest we proceed? > I don't quite understand the patch in general. The xo_board clk should always exist in DT and the fixed factor clk in GCC is there until the rpm clk driver can control the XO clk state vote for the kernel. If anything, change the DT node to be named xo-board instead of xo_board because that matches DT naming schemes and then add a clock-output-names = "xo_board" property to it so that we keep the underscore.
On 12/5/2018 2:04 PM, Stephen Boyd wrote: > Quoting Jeffrey Hugo (2018-12-05 09:03:54) >> On 12/5/2018 9:48 AM, Bjorn Andersson wrote: >>> On Wed 05 Dec 08:38 PST 2018, Jeffrey Hugo wrote: >>> >>>> On 12/5/2018 9:12 AM, Marc Gonzalez wrote: >>>>> On 15/11/2018 21:44, Jeffrey Hugo wrote: >>>>> >>>>>> The root parent clock of most msm8998 clock is the "xo" clock. The DT node >>>>>> is incorrectly named "xo_board", which prevents Linux from correctly >>>>>> parsing the clock tree, resulting in most clocks being unparented and >>>>>> unable to be manipulated. The end result is that we can't turn on clocks >>>>>> for peripherals like SD, so init usually fails. >>>>>> >>>>>> Fixes: 4807c71cc688 (arm64: dts: Add msm8998 SoC and MTP board support) >>>>>> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> >>>>>> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org> >>>>>> --- >>>>>> arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- >>>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi >>>>>> index 78227cc..a948d4b 100644 >>>>>> --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi >>>>>> +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi >>>>>> @@ -53,7 +53,7 @@ >>>>>> }; >>>>>> clocks { >>>>>> - xo_board { >>>>>> + xo { >>>>>> compatible = "fixed-clock"; >>>>>> #clock-cells = <0>; >>>>>> clock-frequency = <19200000>; >>>>>> >>>>> >>>>> Isn't there going to be a problem for msm8998 in drivers/clk/qcom/clk-smd-rpm.c >>>>> which uses "xo_board" for parent_names? >>>> >>>> Looks like you are right. This doesn't seem to be the correct way to >>>> address the issue then. I'll have to dig in and take another look. >>>> >>> >>> The appropriate solution is to describe references between clock drivers >>> explicitly in DeviceTree and by that not rely on a global namespace. >>> That will also sort out any initialization ordering issues that we might >>> have. >>> >>> But this task has not yet made it off the todo lists where it lives... >> >> Ok, that sounds great, but doesn't seem like it helps anyone today. >> >> Looks like 8916 and 8974 explicitly register an xo clock off the >> xo_board clock in the respective gcc drivers. 8996 does not, but I >> don't know how functional 8996 really is on mainline. 845 seems to >> register the bi_tcxo clock (the 845 version of xo) in the rpmh driver, >> off of xo_board. >> >> Since both Marc and I are trying to get 8998 to work, it seems like one >> of those two solutions would be workable, short term. >> >> How do you suggest we proceed? >> > > I don't quite understand the patch in general. The xo_board clk should > always exist in DT and the fixed factor clk in GCC is there until the > rpm clk driver can control the XO clk state vote for the kernel. Sorry, this wasn't apparent. It doesn't seem like this "requirement" is captured anywhere. As far as the SD clocks are concerned, they are defined in GCC, and eventually have a root parent called "xo". "xo" isn't defined anywhere, so the SD clocks can't really be used, and the hardware doesn't come up. This patch "fixed" that, but I missed the link to the rpm driver that Marc pointed out. > > If anything, change the DT node to be named xo-board instead of xo_board > because that matches DT naming schemes and then add a clock-output-names > = "xo_board" property to it so that we keep the underscore. I see this now, and I agree with it, but then SD goes back to a broken state because there is "xo" clock for GCC. Its not quite clear to me how to make GCC (and thus SD) happy again with this change reverted/fixed. Bjorn mentioned offline he is going to take a look, but he has a few other things on his plate first.
On 12/5/2018 2:42 PM, Stephen Boyd wrote: > Quoting Jeffrey Hugo (2018-12-05 13:20:07) >> On 12/5/2018 2:04 PM, Stephen Boyd wrote: >>> Quoting Jeffrey Hugo (2018-12-05 09:03:54) >>> >>> I don't quite understand the patch in general. The xo_board clk should >>> always exist in DT and the fixed factor clk in GCC is there until the >>> rpm clk driver can control the XO clk state vote for the kernel. >> >> Sorry, this wasn't apparent. It doesn't seem like this "requirement" is >> captured anywhere. > > Agreed! > >> >> As far as the SD clocks are concerned, they are defined in GCC, and >> eventually have a root parent called "xo". "xo" isn't defined anywhere, >> so the SD clocks can't really be used, and the hardware doesn't come up. >> This patch "fixed" that, but I missed the link to the rpm driver that >> Marc pointed out. > > Hmm ok. The SD DT node should just point to the xo_board clk for now and > later on it can be changed to use the rpm clk when the rpm node is > created. > >> >> >>> >>> If anything, change the DT node to be named xo-board instead of xo_board >>> because that matches DT naming schemes and then add a clock-output-names >>> = "xo_board" property to it so that we keep the underscore. >> >> I see this now, and I agree with it, but then SD goes back to a broken >> state because there is "xo" clock for GCC. Its not quite clear to me >> how to make GCC (and thus SD) happy again with this change reverted/fixed. >> >> Bjorn mentioned offline he is going to take a look, but he has a few >> other things on his plate first. >> > > There is an XO clk created in drivers/clk/qcom/gcc-msm8996.c, we should > do the same here until rpm can handle this. I'll pack this patch up and > merge it to clk-next soon. Thanks. I pulled in the below change into my tree, and fixed up the DT based on the discussion we had. SD works, and things look sane to me per clk_summary in debugfs. Feel free to throw my tested-by on if you want. Andy, How would you like this little mess from my patch series to be fixed? It looks like you picked up a hybrid of v1 and v2 in your tree, and it would appear that went in a pull request to the ARM maintainers. Do you want fixes based upon your next branch? > > ----8<---- > diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c > index c3bb9fffd040..d72b908137e2 100644 > --- a/drivers/clk/qcom/gcc-msm8998.c > +++ b/drivers/clk/qcom/gcc-msm8998.c > @@ -117,6 +117,17 @@ static const char * const gcc_parent_names_5[] = { > "core_bi_pll_test_se", > }; > > +static struct clk_fixed_factor xo = { > + .mult = 1, > + .div = 1, > + .hw.init = &(struct clk_init_data){ > + .name = "xo", > + .parent_names = (const char *[]){ "xo_board" }, > + .num_parents = 1, > + .ops = &clk_fixed_factor_ops, > + }, > +}; > + > static struct pll_vco fabia_vco[] = { > { 250000000, 2000000000, 0 }, > { 125000000, 1000000000, 1 }, > @@ -2798,6 +2809,10 @@ static int gcc_msm8998_probe(struct platform_device *pdev) > if (ret) > return ret; > > + ret = devm_clk_hw_register(&pdev->dev, &xo.hw); > + if (ret) > + return ret; > + > return qcom_cc_really_probe(pdev, &gcc_msm8998_desc, regmap); > } >
Quoting Jeffrey Hugo (2018-12-05 15:04:01) > On 12/5/2018 2:42 PM, Stephen Boyd wrote: > > Quoting Jeffrey Hugo (2018-12-05 13:20:07) > >> On 12/5/2018 2:04 PM, Stephen Boyd wrote: > >>> Quoting Jeffrey Hugo (2018-12-05 09:03:54) > >>> > >>> I don't quite understand the patch in general. The xo_board clk should > >>> always exist in DT and the fixed factor clk in GCC is there until the > >>> rpm clk driver can control the XO clk state vote for the kernel. > >> > >> Sorry, this wasn't apparent. It doesn't seem like this "requirement" is > >> captured anywhere. > > > > Agreed! > > > >> > >> As far as the SD clocks are concerned, they are defined in GCC, and > >> eventually have a root parent called "xo". "xo" isn't defined anywhere, > >> so the SD clocks can't really be used, and the hardware doesn't come up. > >> This patch "fixed" that, but I missed the link to the rpm driver that > >> Marc pointed out. > > > > Hmm ok. The SD DT node should just point to the xo_board clk for now and > > later on it can be changed to use the rpm clk when the rpm node is > > created. > > > >> > >> > >>> > >>> If anything, change the DT node to be named xo-board instead of xo_board > >>> because that matches DT naming schemes and then add a clock-output-names > >>> = "xo_board" property to it so that we keep the underscore. > >> > >> I see this now, and I agree with it, but then SD goes back to a broken > >> state because there is "xo" clock for GCC. Its not quite clear to me > >> how to make GCC (and thus SD) happy again with this change reverted/fixed. > >> > >> Bjorn mentioned offline he is going to take a look, but he has a few > >> other things on his plate first. > >> > > > > There is an XO clk created in drivers/clk/qcom/gcc-msm8996.c, we should > > do the same here until rpm can handle this. I'll pack this patch up and > > merge it to clk-next soon. > > Thanks. I pulled in the below change into my tree, and fixed up the DT > based on the discussion we had. SD works, and things look sane to me > per clk_summary in debugfs. > > Feel free to throw my tested-by on if you want. Thanks. I did so and merged it up to clk-next.
On 06/12/2018 19:34, Stephen Boyd wrote: > Quoting Jeffrey Hugo (2018-12-05 15:04:01) >> On 12/5/2018 2:42 PM, Stephen Boyd wrote: >>> Quoting Jeffrey Hugo (2018-12-05 13:20:07) >>>> On 12/5/2018 2:04 PM, Stephen Boyd wrote: >>>>> Quoting Jeffrey Hugo (2018-12-05 09:03:54) >>>>> >>>>> I don't quite understand the patch in general. The xo_board clk should >>>>> always exist in DT and the fixed factor clk in GCC is there until the >>>>> rpm clk driver can control the XO clk state vote for the kernel. >>>> >>>> Sorry, this wasn't apparent. It doesn't seem like this "requirement" is >>>> captured anywhere. >>> >>> Agreed! >>> >>>> >>>> As far as the SD clocks are concerned, they are defined in GCC, and >>>> eventually have a root parent called "xo". "xo" isn't defined anywhere, >>>> so the SD clocks can't really be used, and the hardware doesn't come up. >>>> This patch "fixed" that, but I missed the link to the rpm driver that >>>> Marc pointed out. >>> >>> Hmm ok. The SD DT node should just point to the xo_board clk for now and >>> later on it can be changed to use the rpm clk when the rpm node is >>> created. >>> >>>> >>>> >>>>> >>>>> If anything, change the DT node to be named xo-board instead of xo_board >>>>> because that matches DT naming schemes and then add a clock-output-names >>>>> = "xo_board" property to it so that we keep the underscore. >>>> >>>> I see this now, and I agree with it, but then SD goes back to a broken >>>> state because there is "xo" clock for GCC. Its not quite clear to me >>>> how to make GCC (and thus SD) happy again with this change reverted/fixed. >>>> >>>> Bjorn mentioned offline he is going to take a look, but he has a few >>>> other things on his plate first. >>>> >>> >>> There is an XO clk created in drivers/clk/qcom/gcc-msm8996.c, we should >>> do the same here until rpm can handle this. I'll pack this patch up and >>> merge it to clk-next soon. >> >> Thanks. I pulled in the below change into my tree, and fixed up the DT >> based on the discussion we had. SD works, and things look sane to me >> per clk_summary in debugfs. >> >> Feel free to throw my tested-by on if you want. > > Thanks. I did so and merged it up to clk-next. @Andy, don't you still need to revert 634da3307b083ee83eb9b377081fdfd6416a148a ("arm64: dts: qcom: msm8998: correct xo clock name") in for-next? Regards.
On 12/7/2018 2:03 AM, Marc Gonzalez wrote: > On 06/12/2018 19:34, Stephen Boyd wrote: >> Quoting Jeffrey Hugo (2018-12-05 15:04:01) >>> On 12/5/2018 2:42 PM, Stephen Boyd wrote: >>>> Quoting Jeffrey Hugo (2018-12-05 13:20:07) >>>>> On 12/5/2018 2:04 PM, Stephen Boyd wrote: >>>>>> Quoting Jeffrey Hugo (2018-12-05 09:03:54) >>>>>> >>>>>> I don't quite understand the patch in general. The xo_board clk should >>>>>> always exist in DT and the fixed factor clk in GCC is there until the >>>>>> rpm clk driver can control the XO clk state vote for the kernel. >>>>> >>>>> Sorry, this wasn't apparent. It doesn't seem like this "requirement" is >>>>> captured anywhere. >>>> >>>> Agreed! >>>> >>>>> >>>>> As far as the SD clocks are concerned, they are defined in GCC, and >>>>> eventually have a root parent called "xo". "xo" isn't defined anywhere, >>>>> so the SD clocks can't really be used, and the hardware doesn't come up. >>>>> This patch "fixed" that, but I missed the link to the rpm driver that >>>>> Marc pointed out. >>>> >>>> Hmm ok. The SD DT node should just point to the xo_board clk for now and >>>> later on it can be changed to use the rpm clk when the rpm node is >>>> created. >>>> >>>>> >>>>> >>>>>> >>>>>> If anything, change the DT node to be named xo-board instead of xo_board >>>>>> because that matches DT naming schemes and then add a clock-output-names >>>>>> = "xo_board" property to it so that we keep the underscore. >>>>> >>>>> I see this now, and I agree with it, but then SD goes back to a broken >>>>> state because there is "xo" clock for GCC. Its not quite clear to me >>>>> how to make GCC (and thus SD) happy again with this change reverted/fixed. >>>>> >>>>> Bjorn mentioned offline he is going to take a look, but he has a few >>>>> other things on his plate first. >>>>> >>>> >>>> There is an XO clk created in drivers/clk/qcom/gcc-msm8996.c, we should >>>> do the same here until rpm can handle this. I'll pack this patch up and >>>> merge it to clk-next soon. >>> >>> Thanks. I pulled in the below change into my tree, and fixed up the DT >>> based on the discussion we had. SD works, and things look sane to me >>> per clk_summary in debugfs. >>> >>> Feel free to throw my tested-by on if you want. >> >> Thanks. I did so and merged it up to clk-next. > > @Andy, don't you still need to revert 634da3307b083ee83eb9b377081fdfd6416a148a > ("arm64: dts: qcom: msm8998: correct xo clock name") in for-next? Yes, and no. The SD changes kind of depend on that, so those would need to get sorted as well. I still haven't heard from Andy, but I guess I'll go ahead and create a fixup patch.
On Fri, Dec 07, 2018 at 07:58:52AM -0700, Jeffrey Hugo wrote: > On 12/7/2018 2:03 AM, Marc Gonzalez wrote: > >On 06/12/2018 19:34, Stephen Boyd wrote: > >>Quoting Jeffrey Hugo (2018-12-05 15:04:01) > >>>On 12/5/2018 2:42 PM, Stephen Boyd wrote: > >>>>Quoting Jeffrey Hugo (2018-12-05 13:20:07) > >>>>>On 12/5/2018 2:04 PM, Stephen Boyd wrote: > >>>>>>Quoting Jeffrey Hugo (2018-12-05 09:03:54) > >>>>>> > >>>>>>I don't quite understand the patch in general. The xo_board clk should > >>>>>>always exist in DT and the fixed factor clk in GCC is there until the > >>>>>>rpm clk driver can control the XO clk state vote for the kernel. > >>>>> > >>>>>Sorry, this wasn't apparent. It doesn't seem like this "requirement" is > >>>>>captured anywhere. > >>>> > >>>>Agreed! > >>>> > >>>>> > >>>>>As far as the SD clocks are concerned, they are defined in GCC, and > >>>>>eventually have a root parent called "xo". "xo" isn't defined anywhere, > >>>>>so the SD clocks can't really be used, and the hardware doesn't come up. > >>>>> This patch "fixed" that, but I missed the link to the rpm driver that > >>>>>Marc pointed out. > >>>> > >>>>Hmm ok. The SD DT node should just point to the xo_board clk for now and > >>>>later on it can be changed to use the rpm clk when the rpm node is > >>>>created. > >>>> > >>>>> > >>>>> > >>>>>> > >>>>>>If anything, change the DT node to be named xo-board instead of xo_board > >>>>>>because that matches DT naming schemes and then add a clock-output-names > >>>>>>= "xo_board" property to it so that we keep the underscore. > >>>>> > >>>>>I see this now, and I agree with it, but then SD goes back to a broken > >>>>>state because there is "xo" clock for GCC. Its not quite clear to me > >>>>>how to make GCC (and thus SD) happy again with this change reverted/fixed. > >>>>> > >>>>>Bjorn mentioned offline he is going to take a look, but he has a few > >>>>>other things on his plate first. > >>>>> > >>>> > >>>>There is an XO clk created in drivers/clk/qcom/gcc-msm8996.c, we should > >>>>do the same here until rpm can handle this. I'll pack this patch up and > >>>>merge it to clk-next soon. > >>> > >>>Thanks. I pulled in the below change into my tree, and fixed up the DT > >>>based on the discussion we had. SD works, and things look sane to me > >>>per clk_summary in debugfs. > >>> > >>>Feel free to throw my tested-by on if you want. > >> > >>Thanks. I did so and merged it up to clk-next. > > > >@Andy, don't you still need to revert 634da3307b083ee83eb9b377081fdfd6416a148a > >("arm64: dts: qcom: msm8998: correct xo clock name") in for-next? I'll send a fix for this. I think we want to keep the xo label, and just change it to xo: xo_board. So instead of a revert, it'll be that + a Fixes line. That ok? Andy
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index 78227cc..a948d4b 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -53,7 +53,7 @@ }; clocks { - xo_board { + xo { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <19200000>;