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

ARM: dts: r8a7778: Add BRG support for SCIF

Add the device node for the external SCIF_CLK.
The presence of the SCIF_CLK crystal and its clock frequency depends on
the actual board.

Add the two optional clock sources (S1 and SCIF_CLK for the internal
resp. external clock) for the Baud Rate Generator for External Clock
(BRG) to all SCIF device nodes.

This increases the range and accuracy of supported baud rates on SCIF.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

authored by

Geert Uytterhoeven and committed by
Simon Horman
5fb544da 1b463bd5

+27 -12
+27 -12
arch/arm/boot/dts/r8a7778.dtsi
··· 301 301 "renesas,scif"; 302 302 reg = <0xffe40000 0x100>; 303 303 interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; 304 - clocks = <&mstp0_clks R8A7778_CLK_SCIF0>; 305 - clock-names = "fck"; 304 + clocks = <&mstp0_clks R8A7778_CLK_SCIF0>, 305 + <&cpg_clocks R8A7778_CLK_S1>, <&scif_clk>; 306 + clock-names = "fck", "brg_int", "scif_clk"; 306 307 power-domains = <&cpg_clocks>; 307 308 status = "disabled"; 308 309 }; ··· 313 312 "renesas,scif"; 314 313 reg = <0xffe41000 0x100>; 315 314 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; 316 - clocks = <&mstp0_clks R8A7778_CLK_SCIF1>; 317 - clock-names = "fck"; 315 + clocks = <&mstp0_clks R8A7778_CLK_SCIF1>, 316 + <&cpg_clocks R8A7778_CLK_S1>, <&scif_clk>; 317 + clock-names = "fck", "brg_int", "scif_clk"; 318 318 power-domains = <&cpg_clocks>; 319 319 status = "disabled"; 320 320 }; ··· 325 323 "renesas,scif"; 326 324 reg = <0xffe42000 0x100>; 327 325 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; 328 - clocks = <&mstp0_clks R8A7778_CLK_SCIF2>; 329 - clock-names = "fck"; 326 + clocks = <&mstp0_clks R8A7778_CLK_SCIF2>, 327 + <&cpg_clocks R8A7778_CLK_S1>, <&scif_clk>; 328 + clock-names = "fck", "brg_int", "scif_clk"; 330 329 power-domains = <&cpg_clocks>; 331 330 status = "disabled"; 332 331 }; ··· 337 334 "renesas,scif"; 338 335 reg = <0xffe43000 0x100>; 339 336 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; 340 - clocks = <&mstp0_clks R8A7778_CLK_SCIF3>; 341 - clock-names = "fck"; 337 + clocks = <&mstp0_clks R8A7778_CLK_SCIF3>, 338 + <&cpg_clocks R8A7778_CLK_S1>, <&scif_clk>; 339 + clock-names = "fck", "brg_int", "scif_clk"; 342 340 power-domains = <&cpg_clocks>; 343 341 status = "disabled"; 344 342 }; ··· 349 345 "renesas,scif"; 350 346 reg = <0xffe44000 0x100>; 351 347 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; 352 - clocks = <&mstp0_clks R8A7778_CLK_SCIF4>; 353 - clock-names = "fck"; 348 + clocks = <&mstp0_clks R8A7778_CLK_SCIF4>, 349 + <&cpg_clocks R8A7778_CLK_S1>, <&scif_clk>; 350 + clock-names = "fck", "brg_int", "scif_clk"; 354 351 power-domains = <&cpg_clocks>; 355 352 status = "disabled"; 356 353 }; ··· 361 356 "renesas,scif"; 362 357 reg = <0xffe45000 0x100>; 363 358 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; 364 - clocks = <&mstp0_clks R8A7778_CLK_SCIF5>; 365 - clock-names = "fck"; 359 + clocks = <&mstp0_clks R8A7778_CLK_SCIF5>, 360 + <&cpg_clocks R8A7778_CLK_S1>, <&scif_clk>; 361 + clock-names = "fck", "brg_int", "scif_clk"; 366 362 power-domains = <&cpg_clocks>; 367 363 status = "disabled"; 368 364 }; ··· 448 442 #clock-cells = <0>; 449 443 clock-frequency = <0>; 450 444 clock-output-names = "extal"; 445 + }; 446 + 447 + /* External SCIF clock */ 448 + scif_clk: scif { 449 + compatible = "fixed-clock"; 450 + #clock-cells = <0>; 451 + /* This value must be overridden by the board. */ 452 + clock-frequency = <0>; 453 + status = "disabled"; 451 454 }; 452 455 453 456 /* Special CPG clocks */