Enable SD card slot on msm8998 MTP
Subsystems (5)
v2 cover Enable SD card slot on msm8998 MTP
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(-)
Signature · 3 lines
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.
PATCH v2 1/3 arm64: dts: qcom: msm8998: correct xo clock name
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.
--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8998.dtsi +1 -1
@@ -53,7 +53,7 @@ }; clocks { - xo_board { + xo { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <19200000>;
Signature · 3 lines
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.
PATCH v2 2/3 arm64: dts: qcom: msm8998: Add SDCC2
In reply to Jeffrey HugoSDCC2 is typically used as the controller for an external SD card slot.
--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8998.dtsi +18 -1
@@ -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>;
Signature · 3 lines
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.
PATCH v2 3/3 arm64: dts: qcom: msm8998-mtp: Add external SD
In reply to Jeffrey HugoThe externally accessible SD card slot on the MTP is driven by SDCC2. Wire it up for use.
--- arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 65 +++++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8998.dtsi | 1 + 2 files changed, 66 insertions(+)
arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi +65 -0
@@ -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>; +}; +
arch/arm64/boot/dts/qcom/msm8998.dtsi +1 -0
@@ -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>;
Signature · 3 lines
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.
Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name
In reply to Jeffrey HugoQuoted 19 lines · 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 <[email protected]>Signed-off-by Jeffrey Hugo <[email protected]>--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/qcom/msm8998.dtsi +0
-0
arch/arm64/boot/dts/qcom/msm8998.dtsi line 59
Quoted 8 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +1
-1@@ -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.
Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name
Quoted 22 lines · Marc Gonzalez
Quoted 20 lines · 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 <[email protected]>Signed-off-by Jeffrey Hugo <[email protected]>--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/qcom/msm8998.dtsi +0
-0@@ -53,7 +53,7 @@ };
Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi line 59
Quoted 7 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +1
-1clocks { - 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.cwhich uses "xo_board" forparent_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.
Signature · 4 lines
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.
Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name
Quoted 33 lines · Jeffrey Hugo
Quoted 15 lines · Marc Gonzalez
Quoted 13 lines · 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 <[email protected]>Signed-off-by Jeffrey Hugo <[email protected]>--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 16 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi line 59
Quoted 13 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +1
-1@@ -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.cwhich uses "xo_board" forparent_names?
Quoted 3 lines
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
Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name
Quoted 39 lines · Bjorn Andersson
Quoted 33 lines · Jeffrey Hugo
Quoted 15 lines · Marc Gonzalez
Quoted 13 lines · 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 <[email protected]>Signed-off-by Jeffrey Hugo <[email protected]>--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 16 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi line 59
Quoted 13 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +1
-1@@ -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.cwhich uses "xo_board" forparent_names?Quoted 3 lines
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.
Quoted 6 lines
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?
Signature · 4 lines
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.
Stephen Boyd
maintainerRe: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name
Quoting Jeffrey Hugo (2018-12-05 09:03:54)
Quoted 55 lines · Bjorn Andersson
Quoted 39 lines · Jeffrey Hugo
Quoted 34 lines · Marc Gonzalez
Quoted 15 lines · Jeffrey Hugo
Quoted 14 lines
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 <[email protected]>Signed-off-by Jeffrey Hugo <[email protected]>--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 16 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi line 59
Quoted 13 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +1
-1@@ -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.cwhich uses "xo_board" forparent_names?Quoted 3 lines
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.
Quoted 6 lines
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_boardclock in the respective gcc drivers. 8996 does not, but I don't know how functional 8996 really is on mainline. 845 seems to register thebi_tcxoclock (the 845 version of xo) in the rpmh driver, off ofxo_board.
Quoted 5 lines
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.
Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name
Quoted 59 lines · Stephen Boyd
Quoting Jeffrey Hugo (2018-12-05 09:03:54)
Quoted 58 lines · Bjorn Andersson
Quoted 39 lines · Jeffrey Hugo
Quoted 34 lines · Marc Gonzalez
Quoted 15 lines · Jeffrey Hugo
Quoted 14 lines
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 <[email protected]>Signed-off-by Jeffrey Hugo <[email protected]>--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 16 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi line 59
Quoted 13 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +1
-1@@ -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.cwhich uses "xo_board" forparent_names?Quoted 3 lines
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.
Quoted 6 lines
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_boardclock in the respective gcc drivers. 8996 does not, but I don't know how functional 8996 really is on mainline. 845 seems to register thebi_tcxoclock (the 845 version of xo) in the rpmh driver, off ofxo_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.
Quoted 6 lines
Quoted 2 lines
How do you suggest we proceed?
I don't quite understand the patch in general. The
xo_boardclk 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.
Quoted 4 lines
If anything, change the DT node to be named xo-board instead of
xo_boardbecause 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.
Signature · 4 lines
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.
Stephen Boyd
maintainerRe: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name
Quoting Jeffrey Hugo (2018-12-05 13:20:07)
Quoted 9 lines · Stephen Boyd
Quoted 5 lines
Quoting Jeffrey Hugo (2018-12-05 09:03:54)
I don't quite understand the patch in general. The
xo_boardclk 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!
Quoted 6 lines
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.
Quoted 7 lines
Quoted 6 lines
If anything, change the DT node to be named xo-board instead of
xo_boardbecause that matches DT naming schemes and then add a clock-output-names = "xo_board" property to it so that we keep the underscore.
Quoted 7 lines
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<----
drivers/clk/qcom/gcc-msm8998.c +15 -0
@@ -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); }
Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name
Quoted 35 lines · Stephen Boyd
Quoting Jeffrey Hugo (2018-12-05 13:20:07)
Quoted 9 lines · Stephen Boyd
Quoted 5 lines
Quoting Jeffrey Hugo (2018-12-05 09:03:54)
I don't quite understand the patch in general. The
xo_boardclk 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!
Quoted 6 lines
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_boardclk for now and later on it can be changed to use the rpm clk when the rpm node is created.Quoted 11 lines
Quoted 6 lines
If anything, change the DT node to be named xo-board instead of
xo_boardbecause 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.
Quoted 7 lines
Quoted 3 lines
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?
Quoted 35 lines
----8<----
drivers/clk/qcom/gcc-msm8998.c +15
-0@@ -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); }
Signature · 4 lines
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.
Stephen Boyd
maintainerRe: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name
Quoting Jeffrey Hugo (2018-12-05 15:04:01)
Quoted 44 lines · Stephen Boyd
Quoted 35 lines
Quoting Jeffrey Hugo (2018-12-05 13:20:07)
Quoted 9 lines · Stephen Boyd
Quoted 5 lines
Quoting Jeffrey Hugo (2018-12-05 09:03:54)
I don't quite understand the patch in general. The
xo_boardclk 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!
Quoted 6 lines
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_boardclk for now and later on it can be changed to use the rpm clk when the rpm node is created.Quoted 11 lines
Quoted 6 lines
If anything, change the DT node to be named xo-board instead of
xo_boardbecause 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.
Quoted 7 lines
Quoted 3 lines
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.
Quoted 5 lines
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_summaryin debugfs.Feel free to throw my tested-by on if you want.
Thanks. I did so and merged it up to clk-next.
Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name
Quoted 45 lines · Stephen Boyd
Quoting Jeffrey Hugo (2018-12-05 15:04:01)
Quoted 44 lines · Stephen Boyd
Quoted 42 lines
Quoting Jeffrey Hugo (2018-12-05 13:20:07)
Quoted 9 lines · Stephen Boyd
Quoted 5 lines
Quoting Jeffrey Hugo (2018-12-05 09:03:54)
I don't quite understand the patch in general. The
xo_boardclk 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!
Quoted 6 lines
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_boardclk for now and later on it can be changed to use the rpm clk when the rpm node is created.Quoted 7 lines
Quoted 6 lines
If anything, change the DT node to be named xo-board instead of
xo_boardbecause that matches DT naming schemes and then add a clock-output-names = "xo_board" property to it so that we keep the underscore.Quoted 7 lines
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.
Quoted 7 lines
Quoted 5 lines
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_summaryin 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.
Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name
Quoted 50 lines · Marc Gonzalez
Quoted 49 lines · Stephen Boyd
Quoting Jeffrey Hugo (2018-12-05 15:04:01)
Quoted 48 lines · Stephen Boyd
Quoted 35 lines
Quoting Jeffrey Hugo (2018-12-05 13:20:07)
Quoted 9 lines · Stephen Boyd
Quoted 5 lines
Quoting Jeffrey Hugo (2018-12-05 09:03:54)
I don't quite understand the patch in general. The
xo_boardclk 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!
Quoted 6 lines
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_boardclk for now and later on it can be changed to use the rpm clk when the rpm node is created.Quoted 11 lines
Quoted 6 lines
If anything, change the DT node to be named xo-board instead of
xo_boardbecause 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.
Quoted 7 lines
Quoted 3 lines
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_summaryin debugfs.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
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.
Signature · 4 lines
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.
Re: [PATCH v2 1/3] arm64: dts: qcom: msm8998: correct xo clock name
Quoted 51 lines · Jeffrey Hugo
Quoted 50 lines · Marc Gonzalez
Quoted 49 lines · Stephen Boyd
Quoting Jeffrey Hugo (2018-12-05 15:04:01)
Quoted 48 lines · Stephen Boyd
Quoted 35 lines
Quoting Jeffrey Hugo (2018-12-05 13:20:07)
Quoted 9 lines · Stephen Boyd
Quoted 5 lines
Quoting Jeffrey Hugo (2018-12-05 09:03:54)
I don't quite understand the patch in general. The
xo_boardclk 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!
Quoted 6 lines
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_boardclk for now and later on it can be changed to use the rpm clk when the rpm node is created.Quoted 11 lines
Quoted 6 lines
If anything, change the DT node to be named xo-board instead of
xo_boardbecause 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.
Quoted 7 lines
Quoted 3 lines
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_summaryin debugfs.
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
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