12d5e4479SPeter UjfalusiDevice Tree Clock bindings for ATL (Audio Tracking Logic) of DRA7 SoC. 22d5e4479SPeter Ujfalusi 32d5e4479SPeter UjfalusiThe ATL IP is used to generate clock to be used to synchronize baseband and 42d5e4479SPeter Ujfalusiaudio codec. A single ATL IP provides four ATL clock instances sharing the same 52d5e4479SPeter Ujfalusifunctional clock but can be configured to provide different clocks. 62d5e4479SPeter UjfalusiATL can maintain a clock averages to some desired frequency based on the bws/aws 72d5e4479SPeter Ujfalusisignals - can compensate the drift between the two ws signal. 82d5e4479SPeter Ujfalusi 9*be55492eSRandy DunlapIn order to provide the support for ATL and its output clocks (which can be used 102d5e4479SPeter Ujfalusiinternally within the SoC or external components) two sets of bindings is needed: 112d5e4479SPeter Ujfalusi 122d5e4479SPeter UjfalusiClock tree binding: 132d5e4479SPeter UjfalusiThis binding uses the common clock binding[1]. 142d5e4479SPeter UjfalusiTo be able to integrate the ATL clocks with DT clock tree. 152d5e4479SPeter UjfalusiProvides ccf level representation of the ATL clocks to be used by drivers. 162d5e4479SPeter UjfalusiSince the clock instances are part of a single IP this binding is used as a node 172d5e4479SPeter Ujfalusifor the DT clock tree, the IP driver is needed to handle the actual configuration 182d5e4479SPeter Ujfalusiof the IP. 192d5e4479SPeter Ujfalusi 202d5e4479SPeter Ujfalusi[1] Documentation/devicetree/bindings/clock/clock-bindings.txt 212d5e4479SPeter Ujfalusi 222d5e4479SPeter UjfalusiRequired properties: 232d5e4479SPeter Ujfalusi- compatible : shall be "ti,dra7-atl-clock" 242d5e4479SPeter Ujfalusi- #clock-cells : from common clock binding; shall be set to 0. 252d5e4479SPeter Ujfalusi- clocks : link phandles to functional clock of ATL 262d5e4479SPeter Ujfalusi 272d5e4479SPeter UjfalusiBinding for the IP driver: 282d5e4479SPeter UjfalusiThis binding is used to configure the IP driver which is going to handle the 292d5e4479SPeter Ujfalusiconfiguration of the IP for the ATL clock instances. 302d5e4479SPeter Ujfalusi 312d5e4479SPeter UjfalusiRequired properties: 322d5e4479SPeter Ujfalusi- compatible : shall be "ti,dra7-atl" 332d5e4479SPeter Ujfalusi- reg : base address for the ATL IP 342d5e4479SPeter Ujfalusi- ti,provided-clocks : List of phandles to the clocks associated with the ATL 352d5e4479SPeter Ujfalusi- clocks : link phandles to functional clock of ATL 362d5e4479SPeter Ujfalusi- clock-names : Shall be set to "fck" 372d5e4479SPeter Ujfalusi- ti,hwmods : Shall be set to "atl" 382d5e4479SPeter Ujfalusi 392d5e4479SPeter UjfalusiOptional properties: 402d5e4479SPeter UjfalusiConfiguration of ATL instances: 412d5e4479SPeter Ujfalusi- atl{0/1/2/3} { 422d5e4479SPeter Ujfalusi - bws : Baseband word select signal selection 432d5e4479SPeter Ujfalusi - aws : Audio word select signal selection 442d5e4479SPeter Ujfalusi}; 452d5e4479SPeter Ujfalusi 468e28918aSPeter UjfalusiFor valid word select signals, see the dt-bindings/clock/ti-dra7-atl.h include 472d5e4479SPeter Ujfalusifile. 482d5e4479SPeter Ujfalusi 492d5e4479SPeter UjfalusiExamples: 502d5e4479SPeter Ujfalusi/* clock bindings for atl provided clocks */ 512d5e4479SPeter Ujfalusiatl_clkin0_ck: atl_clkin0_ck { 522d5e4479SPeter Ujfalusi #clock-cells = <0>; 532d5e4479SPeter Ujfalusi compatible = "ti,dra7-atl-clock"; 542d5e4479SPeter Ujfalusi clocks = <&atl_gfclk_mux>; 552d5e4479SPeter Ujfalusi}; 562d5e4479SPeter Ujfalusi 572d5e4479SPeter Ujfalusiatl_clkin1_ck: atl_clkin1_ck { 582d5e4479SPeter Ujfalusi #clock-cells = <0>; 592d5e4479SPeter Ujfalusi compatible = "ti,dra7-atl-clock"; 602d5e4479SPeter Ujfalusi clocks = <&atl_gfclk_mux>; 612d5e4479SPeter Ujfalusi}; 622d5e4479SPeter Ujfalusi 632d5e4479SPeter Ujfalusiatl_clkin2_ck: atl_clkin2_ck { 642d5e4479SPeter Ujfalusi #clock-cells = <0>; 652d5e4479SPeter Ujfalusi compatible = "ti,dra7-atl-clock"; 662d5e4479SPeter Ujfalusi clocks = <&atl_gfclk_mux>; 672d5e4479SPeter Ujfalusi}; 682d5e4479SPeter Ujfalusi 692d5e4479SPeter Ujfalusiatl_clkin3_ck: atl_clkin3_ck { 702d5e4479SPeter Ujfalusi #clock-cells = <0>; 712d5e4479SPeter Ujfalusi compatible = "ti,dra7-atl-clock"; 722d5e4479SPeter Ujfalusi clocks = <&atl_gfclk_mux>; 732d5e4479SPeter Ujfalusi}; 742d5e4479SPeter Ujfalusi 752d5e4479SPeter Ujfalusi/* binding for the IP */ 762d5e4479SPeter Ujfalusiatl: atl@4843c000 { 772d5e4479SPeter Ujfalusi compatible = "ti,dra7-atl"; 782d5e4479SPeter Ujfalusi reg = <0x4843c000 0x3ff>; 792d5e4479SPeter Ujfalusi ti,hwmods = "atl"; 802d5e4479SPeter Ujfalusi ti,provided-clocks = <&atl_clkin0_ck>, <&atl_clkin1_ck>, 812d5e4479SPeter Ujfalusi <&atl_clkin2_ck>, <&atl_clkin3_ck>; 822d5e4479SPeter Ujfalusi clocks = <&atl_gfclk_mux>; 832d5e4479SPeter Ujfalusi clock-names = "fck"; 842d5e4479SPeter Ujfalusi}; 852d5e4479SPeter Ujfalusi 868e28918aSPeter Ujfalusi#include <dt-bindings/clock/ti-dra7-atl.h> 872d5e4479SPeter Ujfalusi 882d5e4479SPeter Ujfalusi&atl { 892d5e4479SPeter Ujfalusi 902d5e4479SPeter Ujfalusi atl2 { 912d5e4479SPeter Ujfalusi bws = <DRA7_ATL_WS_MCASP2_FSX>; 922d5e4479SPeter Ujfalusi aws = <DRA7_ATL_WS_MCASP3_FSX>; 932d5e4479SPeter Ujfalusi }; 942d5e4479SPeter Ujfalusi}; 95