* [PATCH v2 0/3] Enable SD card slot on msm8998 MTP @ 2018-11-15 20:44 Jeffrey Hugo 2018-11-15 20:44 ` [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name Jeffrey Hugo ` (2 more replies) 0 siblings, 3 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-11-15 20:44 UTC (permalink / raw) To: andy.gross, david.brown Cc: bjorn.andersson, robh+dt, mark.rutland, linux-arm-msm, linux-soc, devicetree, linux-kernel, Jeffrey Hugo A short series to enable the SD card slot on the msm8998 MTP so that there is some storage media to play with. [v2] -Added Bjorn's reviewed by tags -Fixed white space issues in patch 4 -Refactored pin declarations -Squashed patches 3 and 4 Jeffrey Hugo (3): arm64: dts: qcom: msm8998: correct xo clock name arm64: dts: qcom: msm8998: Add SDCC2 arm64: dts: qcom: msm8998-mtp: Add external SD arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 65 +++++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8998.dtsi | 20 +++++++++- 2 files changed, 84 insertions(+), 1 deletion(-) -- Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-11-15 20:44 [PATCH v2 0/3] Enable SD card slot on msm8998 MTP Jeffrey Hugo @ 2018-11-15 20:44 ` Jeffrey Hugo 2018-12-05 16:12 ` Marc Gonzalez 2018-11-15 20:44 ` [PATCH v2 2/3] arm64: dts: qcom: msm8998: Add SDCC2 Jeffrey Hugo 2018-11-15 20:44 ` [PATCH v2 3/3] arm64: dts: qcom: msm8998-mtp: Add external SD Jeffrey Hugo 2 siblings, 1 reply; 28+ messages in thread From: Jeffrey Hugo @ 2018-11-15 20:44 UTC (permalink / raw) To: andy.gross, david.brown Cc: bjorn.andersson, robh+dt, mark.rutland, linux-arm-msm, linux-soc, devicetree, linux-kernel, Jeffrey Hugo 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>; -- Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-11-15 20:44 ` [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name Jeffrey Hugo @ 2018-12-05 16:12 ` Marc Gonzalez 0 siblings, 0 replies; 28+ messages in thread From: Marc Gonzalez @ 2018-12-05 16:12 UTC (permalink / raw) To: Jeffrey Hugo Cc: Stephen Boyd, MSM, Bjorn Andersson, Andy Gross, Georgi Djakov, Linux ARM 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. ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name @ 2018-12-05 16:12 ` Marc Gonzalez 0 siblings, 0 replies; 28+ messages in thread From: Marc Gonzalez @ 2018-12-05 16:12 UTC (permalink / raw) To: Jeffrey Hugo Cc: Stephen Boyd, MSM, Bjorn Andersson, Andy Gross, Georgi Djakov, Linux ARM 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-12-05 16:12 ` Marc Gonzalez @ 2018-12-05 16:38 ` Jeffrey Hugo -1 siblings, 0 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-12-05 16:38 UTC (permalink / raw) To: Marc Gonzalez Cc: Stephen Boyd, MSM, Bjorn Andersson, Andy Gross, Georgi Djakov, Linux ARM 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. -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name @ 2018-12-05 16:38 ` Jeffrey Hugo 0 siblings, 0 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-12-05 16:38 UTC (permalink / raw) To: Marc Gonzalez Cc: Stephen Boyd, MSM, Bjorn Andersson, Andy Gross, Georgi Djakov, Linux ARM 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. -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-12-05 16:38 ` Jeffrey Hugo @ 2018-12-05 16:48 ` Bjorn Andersson -1 siblings, 0 replies; 28+ messages in thread From: Bjorn Andersson @ 2018-12-05 16:48 UTC (permalink / raw) To: Jeffrey Hugo Cc: Marc Gonzalez, Stephen Boyd, MSM, Andy Gross, Georgi Djakov, Linux ARM 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 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name @ 2018-12-05 16:48 ` Bjorn Andersson 0 siblings, 0 replies; 28+ messages in thread From: Bjorn Andersson @ 2018-12-05 16:48 UTC (permalink / raw) To: Jeffrey Hugo Cc: Marc Gonzalez, Stephen Boyd, MSM, Andy Gross, Georgi Djakov, Linux ARM 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-12-05 16:48 ` Bjorn Andersson @ 2018-12-05 17:03 ` Jeffrey Hugo -1 siblings, 0 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-12-05 17:03 UTC (permalink / raw) To: Bjorn Andersson Cc: Marc Gonzalez, Stephen Boyd, MSM, Andy Gross, Georgi Djakov, Linux ARM 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? -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name @ 2018-12-05 17:03 ` Jeffrey Hugo 0 siblings, 0 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-12-05 17:03 UTC (permalink / raw) To: Bjorn Andersson Cc: Marc Gonzalez, Stephen Boyd, MSM, Andy Gross, Georgi Djakov, Linux ARM 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? -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-12-05 17:03 ` Jeffrey Hugo @ 2018-12-05 21:04 ` Stephen Boyd -1 siblings, 0 replies; 28+ messages in thread From: Stephen Boyd @ 2018-12-05 21:04 UTC (permalink / raw) To: Bjorn Andersson, Jeffrey Hugo Cc: Andy Gross, MSM, Georgi Djakov, Linux ARM, Marc Gonzalez 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. ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name @ 2018-12-05 21:04 ` Stephen Boyd 0 siblings, 0 replies; 28+ messages in thread From: Stephen Boyd @ 2018-12-05 21:04 UTC (permalink / raw) To: Bjorn Andersson, Jeffrey Hugo Cc: Andy Gross, MSM, Georgi Djakov, Linux ARM, Marc Gonzalez 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-12-05 21:04 ` Stephen Boyd @ 2018-12-05 21:20 ` Jeffrey Hugo -1 siblings, 0 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-12-05 21:20 UTC (permalink / raw) To: Stephen Boyd, Bjorn Andersson Cc: Andy Gross, MSM, Georgi Djakov, Linux ARM, Marc Gonzalez 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. -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name @ 2018-12-05 21:20 ` Jeffrey Hugo 0 siblings, 0 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-12-05 21:20 UTC (permalink / raw) To: Stephen Boyd, Bjorn Andersson Cc: Andy Gross, MSM, Georgi Djakov, Linux ARM, Marc Gonzalez 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. -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-12-05 21:20 ` Jeffrey Hugo @ 2018-12-05 21:42 ` Stephen Boyd -1 siblings, 0 replies; 28+ messages in thread From: Stephen Boyd @ 2018-12-05 21:42 UTC (permalink / raw) To: Bjorn Andersson, Jeffrey Hugo Cc: Andy Gross, MSM, Georgi Djakov, Linux ARM, Marc Gonzalez 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. ----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); } ^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name @ 2018-12-05 21:42 ` Stephen Boyd 0 siblings, 0 replies; 28+ messages in thread From: Stephen Boyd @ 2018-12-05 21:42 UTC (permalink / raw) To: Bjorn Andersson, Jeffrey Hugo Cc: Andy Gross, MSM, Georgi Djakov, Linux ARM, Marc Gonzalez 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. ----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); } _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-12-05 21:42 ` Stephen Boyd @ 2018-12-05 23:04 ` Jeffrey Hugo -1 siblings, 0 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-12-05 23:04 UTC (permalink / raw) To: Stephen Boyd, Bjorn Andersson, Andy Gross Cc: MSM, Georgi Djakov, Linux ARM, Marc Gonzalez 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); > } > -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name @ 2018-12-05 23:04 ` Jeffrey Hugo 0 siblings, 0 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-12-05 23:04 UTC (permalink / raw) To: Stephen Boyd, Bjorn Andersson, Andy Gross Cc: MSM, Georgi Djakov, Linux ARM, Marc Gonzalez 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); > } > -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-12-05 23:04 ` Jeffrey Hugo @ 2018-12-06 18:34 ` Stephen Boyd -1 siblings, 0 replies; 28+ messages in thread From: Stephen Boyd @ 2018-12-06 18:34 UTC (permalink / raw) To: Andy Gross, Bjorn Andersson, Jeffrey Hugo Cc: MSM, Georgi Djakov, Linux ARM, Marc Gonzalez 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. ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name @ 2018-12-06 18:34 ` Stephen Boyd 0 siblings, 0 replies; 28+ messages in thread From: Stephen Boyd @ 2018-12-06 18:34 UTC (permalink / raw) To: Andy Gross, Bjorn Andersson, Jeffrey Hugo Cc: MSM, Georgi Djakov, Linux ARM, Marc Gonzalez 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-12-06 18:34 ` Stephen Boyd @ 2018-12-07 9:03 ` Marc Gonzalez -1 siblings, 0 replies; 28+ messages in thread From: Marc Gonzalez @ 2018-12-07 9:03 UTC (permalink / raw) To: Stephen Boyd, Andy Gross Cc: Jeffrey Hugo, MSM, Georgi Djakov, Linux ARM, Bjorn Andersson 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. ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name @ 2018-12-07 9:03 ` Marc Gonzalez 0 siblings, 0 replies; 28+ messages in thread From: Marc Gonzalez @ 2018-12-07 9:03 UTC (permalink / raw) To: Stephen Boyd, Andy Gross Cc: Jeffrey Hugo, MSM, Georgi Djakov, Linux ARM, Bjorn Andersson 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-12-07 9:03 ` Marc Gonzalez @ 2018-12-07 14:58 ` Jeffrey Hugo -1 siblings, 0 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-12-07 14:58 UTC (permalink / raw) To: Marc Gonzalez, Stephen Boyd, Andy Gross Cc: MSM, Georgi Djakov, Linux ARM, Bjorn Andersson 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. -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name @ 2018-12-07 14:58 ` Jeffrey Hugo 0 siblings, 0 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-12-07 14:58 UTC (permalink / raw) To: Marc Gonzalez, Stephen Boyd, Andy Gross Cc: MSM, Georgi Djakov, Linux ARM, Bjorn Andersson 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. -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name 2018-12-07 14:58 ` Jeffrey Hugo @ 2018-12-07 18:23 ` Andy Gross -1 siblings, 0 replies; 28+ messages in thread From: Andy Gross @ 2018-12-07 18:23 UTC (permalink / raw) To: Jeffrey Hugo Cc: Marc Gonzalez, Stephen Boyd, MSM, Bjorn Andersson, Georgi Djakov, Linux ARM 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 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name @ 2018-12-07 18:23 ` Andy Gross 0 siblings, 0 replies; 28+ messages in thread From: Andy Gross @ 2018-12-07 18:23 UTC (permalink / raw) To: Jeffrey Hugo Cc: Marc Gonzalez, Stephen Boyd, MSM, Bjorn Andersson, Georgi Djakov, Linux ARM 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 2/3] arm64: dts: qcom: msm8998: Add SDCC2 2018-11-15 20:44 [PATCH v2 0/3] Enable SD card slot on msm8998 MTP Jeffrey Hugo 2018-11-15 20:44 ` [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name Jeffrey Hugo @ 2018-11-15 20:44 ` Jeffrey Hugo 2018-11-15 20:44 ` [PATCH v2 3/3] arm64: dts: qcom: msm8998-mtp: Add external SD Jeffrey Hugo 2 siblings, 0 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-11-15 20:44 UTC (permalink / raw) To: andy.gross, david.brown Cc: bjorn.andersson, robh+dt, mark.rutland, linux-arm-msm, linux-soc, devicetree, linux-kernel, Jeffrey Hugo SDCC2 is typically used as the controller for an external SD card slot. Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org> --- arch/arm64/boot/dts/qcom/msm8998.dtsi | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index a948d4b..09deee0 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -53,7 +53,7 @@ }; clocks { - xo { + xo: xo { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <19200000>; @@ -605,6 +605,23 @@ #mbox-cells = <1>; }; + sdhc2: sdhci@c0a4900 { + compatible = "qcom,sdhci-msm-v4"; + reg = <0xc0a4900 0x314>, <0xc0a4000 0x800>; + reg-names = "hc_mem", "core_mem"; + + interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "hc_irq", "pwr_irq"; + + clock-names = "iface", "core", "xo"; + clocks = <&gcc GCC_SDCC2_AHB_CLK>, + <&gcc GCC_SDCC2_APPS_CLK>, + <&xo>; + bus-width = <4>; + status = "disabled"; + }; + blsp2_uart1: serial@c1b0000 { compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; reg = <0xc1b0000 0x1000>; -- Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 3/3] arm64: dts: qcom: msm8998-mtp: Add external SD 2018-11-15 20:44 [PATCH v2 0/3] Enable SD card slot on msm8998 MTP Jeffrey Hugo 2018-11-15 20:44 ` [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name Jeffrey Hugo 2018-11-15 20:44 ` [PATCH v2 2/3] arm64: dts: qcom: msm8998: Add SDCC2 Jeffrey Hugo @ 2018-11-15 20:44 ` Jeffrey Hugo 2 siblings, 0 replies; 28+ messages in thread From: Jeffrey Hugo @ 2018-11-15 20:44 UTC (permalink / raw) To: andy.gross, david.brown Cc: bjorn.andersson, robh+dt, mark.rutland, linux-arm-msm, linux-soc, devicetree, linux-kernel, Jeffrey Hugo The externally accessible SD card slot on the MTP is driven by SDCC2. Wire it up for use. Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org> --- arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 65 +++++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8998.dtsi | 1 + 2 files changed, 66 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi index b4276da..cf74883 100644 --- a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi @@ -241,3 +241,68 @@ }; }; }; + +&tlmm { + sdc2_clk_on: sdc2-clk-on { + pins = "sdc2_clk"; + bias-disable; /* NO pull */ + drive-strength = <16>; /* 16 MA */ + }; + + sdc2_clk_off: sdc2-clk-off { + pins = "sdc2_clk"; + bias-disable; /* NO pull */ + drive-strength = <2>; /* 2 MA */ + }; + + sdc2_cmd_on: sdc2-cmd-on { + pins = "sdc2_cmd"; + bias-pull-up; /* pull up */ + drive-strength = <10>; /* 10 MA */ + }; + + sdc2_cmd_off: sdc2-cmd-off { + pins = "sdc2_cmd"; + bias-pull-up; /* pull up */ + drive-strength = <2>; /* 2 MA */ + }; + + sdc2_data_on: sdc2-data-on { + pins = "sdc2_data"; + bias-pull-up; /* pull up */ + drive-strength = <10>; /* 10 MA */ + }; + + sdc2_data_off: sdc2-data-off { + pins = "sdc2_data"; + bias-pull-up; /* pull up */ + drive-strength = <2>; /* 2 MA */ + }; + + sdc2_cd_on: sdc2-cd-on { + function = "gpio"; + pins = "gpio95"; + bias-pull-up; /* pull up */ + drive-strength = <2>; /* 2 MA */ + }; + + sdc2_cd_off: sdc2-cd-off { + function = "gpio"; + pins = "gpio95"; + bias-pull-up; /* pull up */ + drive-strength = <2>; /* 2 MA */ + }; +}; + +&sdhc2 { + status = "okay"; + cd-gpios = <&tlmm 95 GPIO_ACTIVE_LOW>; + + vmmc-supply = <&vreg_l21a_2p95>; + vqmmc-supply = <&vreg_l13a_2p95>; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; + pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; +}; + diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index 09deee0..82f6472 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -3,6 +3,7 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/clock/qcom,gcc-msm8998.h> +#include <dt-bindings/gpio/gpio.h> / { interrupt-parent = <&intc>; -- Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply related [flat|nested] 28+ messages in thread
end of thread, other threads:[~2018-12-07 18:23 UTC | newest] Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-11-15 20:44 [PATCH v2 0/3] Enable SD card slot on msm8998 MTP Jeffrey Hugo 2018-11-15 20:44 ` [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name Jeffrey Hugo 2018-12-05 16:12 ` Marc Gonzalez 2018-12-05 16:12 ` Marc Gonzalez 2018-12-05 16:38 ` Jeffrey Hugo 2018-12-05 16:38 ` Jeffrey Hugo 2018-12-05 16:48 ` Bjorn Andersson 2018-12-05 16:48 ` Bjorn Andersson 2018-12-05 17:03 ` Jeffrey Hugo 2018-12-05 17:03 ` Jeffrey Hugo 2018-12-05 21:04 ` Stephen Boyd 2018-12-05 21:04 ` Stephen Boyd 2018-12-05 21:20 ` Jeffrey Hugo 2018-12-05 21:20 ` Jeffrey Hugo 2018-12-05 21:42 ` Stephen Boyd 2018-12-05 21:42 ` Stephen Boyd 2018-12-05 23:04 ` Jeffrey Hugo 2018-12-05 23:04 ` Jeffrey Hugo 2018-12-06 18:34 ` Stephen Boyd 2018-12-06 18:34 ` Stephen Boyd 2018-12-07 9:03 ` Marc Gonzalez 2018-12-07 9:03 ` Marc Gonzalez 2018-12-07 14:58 ` Jeffrey Hugo 2018-12-07 14:58 ` Jeffrey Hugo 2018-12-07 18:23 ` Andy Gross 2018-12-07 18:23 ` Andy Gross 2018-11-15 20:44 ` [PATCH v2 2/3] arm64: dts: qcom: msm8998: Add SDCC2 Jeffrey Hugo 2018-11-15 20:44 ` [PATCH v2 3/3] arm64: dts: qcom: msm8998-mtp: Add external SD Jeffrey Hugo
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.