Skip to content

Commit c26979a

Browse files
Andre-ARMjoyxu
authored andcommitted
ARM: dts: hisilicon: Fix SP804 users
The SP804 binding only specifies one or three clocks, but does not allow just two clocks. The HiSi 3620 .dtsi specified two clocks for the two timers, plus gave one "apb_pclk" clock-name to appease the primecell bus driver. Extend the clocks by duplicating the first clock to the end of the clock list, and add two dummy clock-names to make the primecell driver happy. I don't know what the real APB clock for the IP is, but with the current DT the first timer clock was used for that, so this change keeps the current status. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
1 parent 9123e3a commit c26979a

2 files changed

Lines changed: 22 additions & 12 deletions

File tree

arch/arm/boot/dts/hi3620.dtsi

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@
111111
reg = <0x800000 0x1000>;
112112
/* timer00 & timer01 */
113113
interrupts = <0 0 4>, <0 1 4>;
114-
clocks = <&clock HI3620_TIMER0_MUX>, <&clock HI3620_TIMER1_MUX>;
115-
clock-names = "apb_pclk";
114+
clocks = <&clock HI3620_TIMER0_MUX>,
115+
<&clock HI3620_TIMER1_MUX>,
116+
<&clock HI3620_TIMER0_MUX>;
117+
clock-names = "timer0clk", "timer1clk", "apb_pclk";
116118
status = "disabled";
117119
};
118120

@@ -121,8 +123,10 @@
121123
reg = <0x801000 0x1000>;
122124
/* timer10 & timer11 */
123125
interrupts = <0 2 4>, <0 3 4>;
124-
clocks = <&clock HI3620_TIMER2_MUX>, <&clock HI3620_TIMER3_MUX>;
125-
clock-names = "apb_pclk";
126+
clocks = <&clock HI3620_TIMER2_MUX>,
127+
<&clock HI3620_TIMER3_MUX>,
128+
<&clock HI3620_TIMER2_MUX>;
129+
clock-names = "timer0clk", "timer1clk", "apb_pclk";
126130
status = "disabled";
127131
};
128132

@@ -131,8 +135,10 @@
131135
reg = <0xa01000 0x1000>;
132136
/* timer20 & timer21 */
133137
interrupts = <0 4 4>, <0 5 4>;
134-
clocks = <&clock HI3620_TIMER4_MUX>, <&clock HI3620_TIMER5_MUX>;
135-
clock-names = "apb_pclk";
138+
clocks = <&clock HI3620_TIMER4_MUX>,
139+
<&clock HI3620_TIMER5_MUX>,
140+
<&clock HI3620_TIMER4_MUX>;
141+
clock-names = "timer0lck", "timer1clk", "apb_pclk";
136142
status = "disabled";
137143
};
138144

@@ -141,8 +147,10 @@
141147
reg = <0xa02000 0x1000>;
142148
/* timer30 & timer31 */
143149
interrupts = <0 6 4>, <0 7 4>;
144-
clocks = <&clock HI3620_TIMER6_MUX>, <&clock HI3620_TIMER7_MUX>;
145-
clock-names = "apb_pclk";
150+
clocks = <&clock HI3620_TIMER6_MUX>,
151+
<&clock HI3620_TIMER7_MUX>,
152+
<&clock HI3620_TIMER6_MUX>;
153+
clock-names = "timer0clk", "timer1clk", "apb_pclk";
146154
status = "disabled";
147155
};
148156

@@ -151,8 +159,10 @@
151159
reg = <0xa03000 0x1000>;
152160
/* timer40 & timer41 */
153161
interrupts = <0 96 4>, <0 97 4>;
154-
clocks = <&clock HI3620_TIMER8_MUX>, <&clock HI3620_TIMER9_MUX>;
155-
clock-names = "apb_pclk";
162+
clocks = <&clock HI3620_TIMER8_MUX>,
163+
<&clock HI3620_TIMER9_MUX>,
164+
<&clock HI3620_TIMER8_MUX>;
165+
clock-names = "timer0clk", "timer1clk", "apb_pclk";
156166
status = "disabled";
157167
};
158168

arch/arm/boot/dts/hip04.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@
226226
compatible = "arm,sp804", "arm,primecell";
227227
reg = <0x3000000 0x1000>;
228228
interrupts = <0 224 4>;
229-
clocks = <&clk_50m>, <&clk_50m>;
230-
clock-names = "apb_pclk";
229+
clocks = <&clk_50m>, <&clk_50m>, <&clk_50m>;
230+
clock-names = "timer0clk", "timer1clk", "apb_pclk";
231231
};
232232

233233
arm-pmu {

0 commit comments

Comments
 (0)