Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: gcc-msm8996: Fix parent for CLKREF clocks

The CLKREF clocks are all fed by the clock signal on the CXO2 pad on the
SoC. Update the definition of these clocks to allow this to be wired up
to the appropriate clock source.

Retain "xo" as the global named parent to make the change a nop in the
event that DT doesn't carry the necessary clocks definition.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lkml.kernel.org/r/20200106080546.3192125-2-bjorn.andersson@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Bjorn Andersson and committed by
Stephen Boyd
ab91f72e bcd63d22

+38 -7
+10
Documentation/devicetree/bindings/clock/qcom,gcc.yaml
··· 47 47 - description: Board XO source 48 48 - description: Board active XO source 49 49 - description: Sleep clock source 50 + #qcom,gcc-msm8996 51 + - items: 52 + - description: XO source 53 + - description: Second XO source 54 + - description: Sleep clock source 50 55 #qcom,gcc-msm8998 51 56 - items: 52 57 - description: Board XO source ··· 69 64 - items: 70 65 - const: bi_tcxo 71 66 - const: bi_tcxo_ao 67 + - const: sleep_clk 68 + #qcom,gcc-msm8996 69 + - items: 70 + - const: cxo 71 + - const: cxo2 72 72 - const: sleep_clk 73 73 #qcom,gcc-msm8998 74 74 - items:
+28 -7
drivers/clk/qcom/gcc-msm8996.c
··· 3046 3046 .enable_mask = BIT(0), 3047 3047 .hw.init = &(struct clk_init_data){ 3048 3048 .name = "gcc_usb3_clkref_clk", 3049 - .parent_names = (const char *[]){ "xo" }, 3049 + .parent_data = &(const struct clk_parent_data){ 3050 + .fw_name = "cxo2", 3051 + .name = "xo", 3052 + }, 3050 3053 .num_parents = 1, 3051 3054 .ops = &clk_branch2_ops, 3052 3055 }, ··· 3063 3060 .enable_mask = BIT(0), 3064 3061 .hw.init = &(struct clk_init_data){ 3065 3062 .name = "gcc_hdmi_clkref_clk", 3066 - .parent_names = (const char *[]){ "xo" }, 3063 + .parent_data = &(const struct clk_parent_data){ 3064 + .fw_name = "cxo2", 3065 + .name = "xo", 3066 + }, 3067 3067 .num_parents = 1, 3068 3068 .ops = &clk_branch2_ops, 3069 3069 }, ··· 3080 3074 .enable_mask = BIT(0), 3081 3075 .hw.init = &(struct clk_init_data){ 3082 3076 .name = "gcc_edp_clkref_clk", 3083 - .parent_names = (const char *[]){ "xo" }, 3077 + .parent_data = &(const struct clk_parent_data){ 3078 + .fw_name = "cxo2", 3079 + .name = "xo", 3080 + }, 3084 3081 .num_parents = 1, 3085 3082 .ops = &clk_branch2_ops, 3086 3083 }, ··· 3097 3088 .enable_mask = BIT(0), 3098 3089 .hw.init = &(struct clk_init_data){ 3099 3090 .name = "gcc_ufs_clkref_clk", 3100 - .parent_names = (const char *[]){ "xo" }, 3091 + .parent_data = &(const struct clk_parent_data){ 3092 + .fw_name = "cxo2", 3093 + .name = "xo", 3094 + }, 3101 3095 .num_parents = 1, 3102 3096 .ops = &clk_branch2_ops, 3103 3097 }, ··· 3114 3102 .enable_mask = BIT(0), 3115 3103 .hw.init = &(struct clk_init_data){ 3116 3104 .name = "gcc_pcie_clkref_clk", 3117 - .parent_names = (const char *[]){ "xo" }, 3105 + .parent_data = &(const struct clk_parent_data){ 3106 + .fw_name = "cxo2", 3107 + .name = "xo", 3108 + }, 3118 3109 .num_parents = 1, 3119 3110 .ops = &clk_branch2_ops, 3120 3111 }, ··· 3131 3116 .enable_mask = BIT(0), 3132 3117 .hw.init = &(struct clk_init_data){ 3133 3118 .name = "gcc_rx2_usb2_clkref_clk", 3134 - .parent_names = (const char *[]){ "xo" }, 3119 + .parent_data = &(const struct clk_parent_data){ 3120 + .fw_name = "cxo2", 3121 + .name = "xo", 3122 + }, 3135 3123 .num_parents = 1, 3136 3124 .ops = &clk_branch2_ops, 3137 3125 }, ··· 3148 3130 .enable_mask = BIT(0), 3149 3131 .hw.init = &(struct clk_init_data){ 3150 3132 .name = "gcc_rx1_usb2_clkref_clk", 3151 - .parent_names = (const char *[]){ "xo" }, 3133 + .parent_data = &(const struct clk_parent_data){ 3134 + .fw_name = "cxo2", 3135 + .name = "xo", 3136 + }, 3152 3137 .num_parents = 1, 3153 3138 .ops = &clk_branch2_ops, 3154 3139 },