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

Merge tag 'amlogic-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt

ARM: dts: Amlogic updates for v5.6
- add DDR clock controller
- GPU OPP updates

* tag 'amlogic-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
ARM: dts: meson8b: use the actual frequency for the GPU's 364MHz OPP
ARM: dts: meson8: use the actual frequency for the GPU's 182.1MHz OPP
ARM: dts: meson8b: fix the clock controller compatible string
ARM: dts: meson8b: add the DDR clock controller
ARM: dts: meson8: add the DDR clock controller
ARM: dts: meson: provide the XTAL clock using a fixed-clock
dt-bindings: clock: meson8b: add the clock inputs
dt-bindings: clock: add the Amlogic Meson8 DDR clock controller binding

Link: https://lore.kernel.org/r/7hwo9udi7m.fsf@baylibre.com
Signed-off-by: Olof Johansson <olof@lixom.net>

+108 -29
+50
Documentation/devicetree/bindings/clock/amlogic,meson8-ddr-clkc.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/amlogic,meson8-ddr-clkc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Amlogic DDR Clock Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Martin Blumenstingl <martin.blumenstingl@googlemail.com> 11 + 12 + properties: 13 + compatible: 14 + enum: 15 + - amlogic,meson8-ddr-clkc 16 + - amlogic,meson8b-ddr-clkc 17 + 18 + reg: 19 + maxItems: 1 20 + 21 + clocks: 22 + maxItems: 1 23 + 24 + clock-names: 25 + items: 26 + - const: xtal 27 + 28 + "#clock-cells": 29 + const: 1 30 + 31 + required: 32 + - compatible 33 + - reg 34 + - clocks 35 + - clock-names 36 + - "#clock-cells" 37 + 38 + additionalProperties: false 39 + 40 + examples: 41 + - | 42 + ddr_clkc: clock-controller@400 { 43 + compatible = "amlogic,meson8-ddr-clkc"; 44 + reg = <0x400 0x20>; 45 + clocks = <&xtal>; 46 + clock-names = "xtal"; 47 + #clock-cells = <1>; 48 + }; 49 + 50 + ...
+5
Documentation/devicetree/bindings/clock/amlogic,meson8b-clkc.txt
··· 11 11 - "amlogic,meson8m2-clkc" for Meson8m2 (S812) SoCs 12 12 - #clock-cells: should be 1. 13 13 - #reset-cells: should be 1. 14 + - clocks: list of clock phandles, one for each entry in clock-names 15 + - clock-names: should contain the following: 16 + * "xtal": the 24MHz system oscillator 17 + * "ddr_pll": the DDR PLL clock 18 + * "clk_32k": (if present) the 32kHz clock signal from GPIOAO_6 (CLK_32K_IN) 14 19 15 20 Parent node should have the following properties : 16 21 - compatible: "amlogic,meson-hhi-sysctrl", "simple-mfd", "syscon"
+7
arch/arm/boot/dts/meson.dtsi
··· 282 282 }; 283 283 }; 284 284 }; 285 + 286 + xtal: xtal-clk { 287 + compatible = "fixed-clock"; 288 + clock-frequency = <24000000>; 289 + clock-output-names = "xtal"; 290 + #clock-cells = <0>; 291 + }; 285 292 }; /* end of / */
-7
arch/arm/boot/dts/meson6.dtsi
··· 36 36 ranges = <0x0 0xd0000000 0x40000>; 37 37 }; 38 38 39 - xtal: xtal-clk { 40 - compatible = "fixed-clock"; 41 - clock-frequency = <24000000>; 42 - clock-output-names = "xtal"; 43 - #clock-cells = <0>; 44 - }; 45 - 46 39 clk81: clk@0 { 47 40 #clock-cells = <0>; 48 41 compatible = "fixed-clock";
+19 -9
arch/arm/boot/dts/meson8.dtsi
··· 3 3 * Copyright 2014 Carlo Caione <carlo@caione.org> 4 4 */ 5 5 6 + #include <dt-bindings/clock/meson8-ddr-clkc.h> 6 7 #include <dt-bindings/clock/meson8b-clkc.h> 7 8 #include <dt-bindings/gpio/meson8-gpio.h> 8 9 #include <dt-bindings/reset/amlogic,meson8b-clkc-reset.h> ··· 130 129 gpu_opp_table: gpu-opp-table { 131 130 compatible = "operating-points-v2"; 132 131 133 - opp-182150000 { 134 - opp-hz = /bits/ 64 <182150000>; 132 + opp-182142857 { 133 + opp-hz = /bits/ 64 <182142857>; 135 134 opp-microvolt = <1150000>; 136 135 }; 137 136 opp-318750000 { ··· 195 194 #address-cells = <1>; 196 195 #size-cells = <1>; 197 196 ranges = <0x0 0xc8000000 0x8000>; 197 + 198 + ddr_clkc: clock-controller@400 { 199 + compatible = "amlogic,meson8-ddr-clkc"; 200 + reg = <0x400 0x20>; 201 + clocks = <&xtal>; 202 + clock-names = "xtal"; 203 + #clock-cells = <1>; 204 + }; 198 205 199 206 dmcbus: bus@6000 { 200 207 compatible = "simple-bus"; ··· 464 455 &hhi { 465 456 clkc: clock-controller { 466 457 compatible = "amlogic,meson8-clkc"; 458 + clocks = <&xtal>, <&ddr_clkc DDR_CLKID_DDR_PLL>; 459 + clock-names = "xtal", "ddr_pll"; 467 460 #clock-cells = <1>; 468 461 #reset-cells = <1>; 469 462 }; ··· 540 529 541 530 &saradc { 542 531 compatible = "amlogic,meson8-saradc", "amlogic,meson-saradc"; 543 - clocks = <&clkc CLKID_XTAL>, 544 - <&clkc CLKID_SAR_ADC>; 532 + clocks = <&xtal>, <&clkc CLKID_SAR_ADC>; 545 533 clock-names = "clkin", "core"; 546 534 amlogic,hhi-sysctrl = <&hhi>; 547 535 nvmem-cells = <&temperature_calib>; ··· 558 548 }; 559 549 560 550 &timer_abcde { 561 - clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_CLK81>; 551 + clocks = <&xtal>, <&clkc CLKID_CLK81>; 562 552 clock-names = "xtal", "pclk"; 563 553 }; 564 554 565 555 &uart_AO { 566 556 compatible = "amlogic,meson8-uart", "amlogic,meson-uart"; 567 - clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_CLK81>; 557 + clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_CLK81>; 568 558 clock-names = "baud", "xtal", "pclk"; 569 559 }; 570 560 571 561 &uart_A { 572 562 compatible = "amlogic,meson8-uart", "amlogic,meson-uart"; 573 - clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART0>; 563 + clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_UART0>; 574 564 clock-names = "baud", "xtal", "pclk"; 575 565 }; 576 566 577 567 &uart_B { 578 568 compatible = "amlogic,meson8-uart", "amlogic,meson-uart"; 579 - clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART1>; 569 + clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_UART1>; 580 570 clock-names = "baud", "xtal", "pclk"; 581 571 }; 582 572 583 573 &uart_C { 584 574 compatible = "amlogic,meson8-uart", "amlogic,meson-uart"; 585 - clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART2>; 575 + clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_UART2>; 586 576 clock-names = "baud", "xtal", "pclk"; 587 577 }; 588 578
+1 -1
arch/arm/boot/dts/meson8b-ec100.dts
··· 377 377 status = "okay"; 378 378 pinctrl-0 = <&pwm_c1_pins>, <&pwm_d_pins>; 379 379 pinctrl-names = "default"; 380 - clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_XTAL>; 380 + clocks = <&xtal>, <&xtal>; 381 381 clock-names = "clkin0", "clkin1"; 382 382 }; 383 383
+1 -1
arch/arm/boot/dts/meson8b-mxq.dts
··· 165 165 status = "okay"; 166 166 pinctrl-0 = <&pwm_c1_pins>, <&pwm_d_pins>; 167 167 pinctrl-names = "default"; 168 - clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_XTAL>; 168 + clocks = <&xtal>, <&xtal>; 169 169 clock-names = "clkin0", "clkin1"; 170 170 }; 171 171
+1 -1
arch/arm/boot/dts/meson8b-odroidc1.dts
··· 340 340 status = "okay"; 341 341 pinctrl-0 = <&pwm_c1_pins>, <&pwm_d_pins>; 342 342 pinctrl-names = "default"; 343 - clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_XTAL>; 343 + clocks = <&xtal>, <&xtal>; 344 344 clock-names = "clkin0", "clkin1"; 345 345 }; 346 346
+20 -10
arch/arm/boot/dts/meson8b.dtsi
··· 4 4 * Author: Carlo Caione <carlo@endlessm.com> 5 5 */ 6 6 7 + #include <dt-bindings/clock/meson8-ddr-clkc.h> 7 8 #include <dt-bindings/clock/meson8b-clkc.h> 8 9 #include <dt-bindings/gpio/meson8b-gpio.h> 9 10 #include <dt-bindings/reset/amlogic,meson8b-reset.h> ··· 126 125 opp-hz = /bits/ 64 <255000000>; 127 126 opp-microvolt = <1100000>; 128 127 }; 129 - opp-364300000 { 130 - opp-hz = /bits/ 64 <364300000>; 128 + opp-364285714 { 129 + opp-hz = /bits/ 64 <364285714>; 131 130 opp-microvolt = <1100000>; 132 131 }; 133 132 opp-425000000 { ··· 172 171 #address-cells = <1>; 173 172 #size-cells = <1>; 174 173 ranges = <0x0 0xc8000000 0x8000>; 174 + 175 + ddr_clkc: clock-controller@400 { 176 + compatible = "amlogic,meson8b-ddr-clkc"; 177 + reg = <0x400 0x20>; 178 + clocks = <&xtal>; 179 + clock-names = "xtal"; 180 + #clock-cells = <1>; 181 + }; 175 182 176 183 dmcbus: bus@6000 { 177 184 compatible = "simple-bus"; ··· 442 433 443 434 &hhi { 444 435 clkc: clock-controller { 445 - compatible = "amlogic,meson8-clkc"; 436 + compatible = "amlogic,meson8b-clkc"; 437 + clocks = <&xtal>, <&ddr_clkc DDR_CLKID_DDR_PLL>; 438 + clock-names = "xtal", "ddr_pll"; 446 439 #clock-cells = <1>; 447 440 #reset-cells = <1>; 448 441 }; ··· 519 508 520 509 &saradc { 521 510 compatible = "amlogic,meson8b-saradc", "amlogic,meson-saradc"; 522 - clocks = <&clkc CLKID_XTAL>, 523 - <&clkc CLKID_SAR_ADC>; 511 + clocks = <&xtal>, <&clkc CLKID_SAR_ADC>; 524 512 clock-names = "clkin", "core"; 525 513 amlogic,hhi-sysctrl = <&hhi>; 526 514 nvmem-cells = <&temperature_calib>; ··· 533 523 }; 534 524 535 525 &timer_abcde { 536 - clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_CLK81>; 526 + clocks = <&xtal>, <&clkc CLKID_CLK81>; 537 527 clock-names = "xtal", "pclk"; 538 528 }; 539 529 540 530 &uart_AO { 541 531 compatible = "amlogic,meson8b-uart", "amlogic,meson-uart"; 542 - clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_CLK81>; 532 + clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_CLK81>; 543 533 clock-names = "baud", "xtal", "pclk"; 544 534 }; 545 535 546 536 &uart_A { 547 537 compatible = "amlogic,meson8b-uart", "amlogic,meson-uart"; 548 - clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART0>; 538 + clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_UART0>; 549 539 clock-names = "baud", "xtal", "pclk"; 550 540 }; 551 541 552 542 &uart_B { 553 543 compatible = "amlogic,meson8b-uart", "amlogic,meson-uart"; 554 - clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART1>; 544 + clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_UART1>; 555 545 clock-names = "baud", "xtal", "pclk"; 556 546 }; 557 547 558 548 &uart_C { 559 549 compatible = "amlogic,meson8b-uart", "amlogic,meson-uart"; 560 - clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART2>; 550 + clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_UART2>; 561 551 clock-names = "baud", "xtal", "pclk"; 562 552 }; 563 553
+4
include/dt-bindings/clock/meson8-ddr-clkc.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + 3 + #define DDR_CLKID_DDR_PLL_DCO 0 4 + #define DDR_CLKID_DDR_PLL 1