162306a36Sopenharmony_ciDevice Tree Clock bindings for ATL (Audio Tracking Logic) of DRA7 SoC. 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciThe ATL IP is used to generate clock to be used to synchronize baseband and 462306a36Sopenharmony_ciaudio codec. A single ATL IP provides four ATL clock instances sharing the same 562306a36Sopenharmony_cifunctional clock but can be configured to provide different clocks. 662306a36Sopenharmony_ciATL can maintain a clock averages to some desired frequency based on the bws/aws 762306a36Sopenharmony_cisignals - can compensate the drift between the two ws signal. 862306a36Sopenharmony_ci 962306a36Sopenharmony_ciIn order to provide the support for ATL and its output clocks (which can be used 1062306a36Sopenharmony_ciinternally within the SoC or external components) two sets of bindings is needed: 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ciClock tree binding: 1362306a36Sopenharmony_ciThis binding uses the common clock binding[1]. 1462306a36Sopenharmony_ciTo be able to integrate the ATL clocks with DT clock tree. 1562306a36Sopenharmony_ciProvides ccf level representation of the ATL clocks to be used by drivers. 1662306a36Sopenharmony_ciSince the clock instances are part of a single IP this binding is used as a node 1762306a36Sopenharmony_cifor the DT clock tree, the IP driver is needed to handle the actual configuration 1862306a36Sopenharmony_ciof the IP. 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci[1] Documentation/devicetree/bindings/clock/clock-bindings.txt 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ciRequired properties: 2362306a36Sopenharmony_ci- compatible : shall be "ti,dra7-atl-clock" 2462306a36Sopenharmony_ci- #clock-cells : from common clock binding; shall be set to 0. 2562306a36Sopenharmony_ci- clocks : link phandles to functional clock of ATL 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ciBinding for the IP driver: 2862306a36Sopenharmony_ciThis binding is used to configure the IP driver which is going to handle the 2962306a36Sopenharmony_ciconfiguration of the IP for the ATL clock instances. 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciRequired properties: 3262306a36Sopenharmony_ci- compatible : shall be "ti,dra7-atl" 3362306a36Sopenharmony_ci- reg : base address for the ATL IP 3462306a36Sopenharmony_ci- ti,provided-clocks : List of phandles to the clocks associated with the ATL 3562306a36Sopenharmony_ci- clocks : link phandles to functional clock of ATL 3662306a36Sopenharmony_ci- clock-names : Shall be set to "fck" 3762306a36Sopenharmony_ci- ti,hwmods : Shall be set to "atl" 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ciOptional properties: 4062306a36Sopenharmony_ciConfiguration of ATL instances: 4162306a36Sopenharmony_ci- atl{0/1/2/3} { 4262306a36Sopenharmony_ci - bws : Baseband word select signal selection 4362306a36Sopenharmony_ci - aws : Audio word select signal selection 4462306a36Sopenharmony_ci}; 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ciFor valid word select signals, see the dt-bindings/clock/ti-dra7-atl.h include 4762306a36Sopenharmony_cifile. 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ciExamples: 5062306a36Sopenharmony_ci/* clock bindings for atl provided clocks */ 5162306a36Sopenharmony_ciatl_clkin0_ck: atl_clkin0_ck { 5262306a36Sopenharmony_ci #clock-cells = <0>; 5362306a36Sopenharmony_ci compatible = "ti,dra7-atl-clock"; 5462306a36Sopenharmony_ci clocks = <&atl_gfclk_mux>; 5562306a36Sopenharmony_ci}; 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ciatl_clkin1_ck: atl_clkin1_ck { 5862306a36Sopenharmony_ci #clock-cells = <0>; 5962306a36Sopenharmony_ci compatible = "ti,dra7-atl-clock"; 6062306a36Sopenharmony_ci clocks = <&atl_gfclk_mux>; 6162306a36Sopenharmony_ci}; 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ciatl_clkin2_ck: atl_clkin2_ck { 6462306a36Sopenharmony_ci #clock-cells = <0>; 6562306a36Sopenharmony_ci compatible = "ti,dra7-atl-clock"; 6662306a36Sopenharmony_ci clocks = <&atl_gfclk_mux>; 6762306a36Sopenharmony_ci}; 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ciatl_clkin3_ck: atl_clkin3_ck { 7062306a36Sopenharmony_ci #clock-cells = <0>; 7162306a36Sopenharmony_ci compatible = "ti,dra7-atl-clock"; 7262306a36Sopenharmony_ci clocks = <&atl_gfclk_mux>; 7362306a36Sopenharmony_ci}; 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci/* binding for the IP */ 7662306a36Sopenharmony_ciatl: atl@4843c000 { 7762306a36Sopenharmony_ci compatible = "ti,dra7-atl"; 7862306a36Sopenharmony_ci reg = <0x4843c000 0x3ff>; 7962306a36Sopenharmony_ci ti,hwmods = "atl"; 8062306a36Sopenharmony_ci ti,provided-clocks = <&atl_clkin0_ck>, <&atl_clkin1_ck>, 8162306a36Sopenharmony_ci <&atl_clkin2_ck>, <&atl_clkin3_ck>; 8262306a36Sopenharmony_ci clocks = <&atl_gfclk_mux>; 8362306a36Sopenharmony_ci clock-names = "fck"; 8462306a36Sopenharmony_ci}; 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ci#include <dt-bindings/clock/ti-dra7-atl.h> 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci&atl { 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci atl2 { 9162306a36Sopenharmony_ci bws = <DRA7_ATL_WS_MCASP2_FSX>; 9262306a36Sopenharmony_ci aws = <DRA7_ATL_WS_MCASP3_FSX>; 9362306a36Sopenharmony_ci }; 9462306a36Sopenharmony_ci}; 95