123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769 |
- /*
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
- #include <linux/kernel.h>
- #include <linux/bitops.h>
- #include <linux/err.h>
- #include <linux/platform_device.h>
- #include <linux/module.h>
- #include <linux/of.h>
- #include <linux/of_device.h>
- #include <linux/clk-provider.h>
- #include <linux/regmap.h>
- #include <linux/reset-controller.h>
- #include <dt-bindings/clock/qcom,gcc-msm8974.h>
- #include <dt-bindings/reset/qcom,gcc-msm8974.h>
- #include "common.h"
- #include "clk-regmap.h"
- #include "clk-pll.h"
- #include "clk-rcg.h"
- #include "clk-branch.h"
- #include "reset.h"
- #include "gdsc.h"
- enum {
- P_XO,
- P_GPLL0,
- P_GPLL1,
- P_GPLL4,
- };
- static const struct parent_map gcc_xo_gpll0_map[] = {
- { P_XO, 0 },
- { P_GPLL0, 1 }
- };
- static const char * const gcc_xo_gpll0[] = {
- "xo",
- "gpll0_vote",
- };
- static const struct parent_map gcc_xo_gpll0_gpll4_map[] = {
- { P_XO, 0 },
- { P_GPLL0, 1 },
- { P_GPLL4, 5 }
- };
- static const char * const gcc_xo_gpll0_gpll4[] = {
- "xo",
- "gpll0_vote",
- "gpll4_vote",
- };
- #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
- static struct clk_pll gpll0 = {
- .l_reg = 0x0004,
- .m_reg = 0x0008,
- .n_reg = 0x000c,
- .config_reg = 0x0014,
- .mode_reg = 0x0000,
- .status_reg = 0x001c,
- .status_bit = 17,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "gpll0",
- .parent_names = (const char *[]){ "xo" },
- .num_parents = 1,
- .ops = &clk_pll_ops,
- },
- };
- static struct clk_regmap gpll0_vote = {
- .enable_reg = 0x1480,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gpll0_vote",
- .parent_names = (const char *[]){ "gpll0" },
- .num_parents = 1,
- .ops = &clk_pll_vote_ops,
- },
- };
- static struct clk_rcg2 config_noc_clk_src = {
- .cmd_rcgr = 0x0150,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "config_noc_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 periph_noc_clk_src = {
- .cmd_rcgr = 0x0190,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "periph_noc_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 system_noc_clk_src = {
- .cmd_rcgr = 0x0120,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "system_noc_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_pll gpll1 = {
- .l_reg = 0x0044,
- .m_reg = 0x0048,
- .n_reg = 0x004c,
- .config_reg = 0x0054,
- .mode_reg = 0x0040,
- .status_reg = 0x005c,
- .status_bit = 17,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "gpll1",
- .parent_names = (const char *[]){ "xo" },
- .num_parents = 1,
- .ops = &clk_pll_ops,
- },
- };
- static struct clk_regmap gpll1_vote = {
- .enable_reg = 0x1480,
- .enable_mask = BIT(1),
- .hw.init = &(struct clk_init_data){
- .name = "gpll1_vote",
- .parent_names = (const char *[]){ "gpll1" },
- .num_parents = 1,
- .ops = &clk_pll_vote_ops,
- },
- };
- static struct clk_pll gpll4 = {
- .l_reg = 0x1dc4,
- .m_reg = 0x1dc8,
- .n_reg = 0x1dcc,
- .config_reg = 0x1dd4,
- .mode_reg = 0x1dc0,
- .status_reg = 0x1ddc,
- .status_bit = 17,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "gpll4",
- .parent_names = (const char *[]){ "xo" },
- .num_parents = 1,
- .ops = &clk_pll_ops,
- },
- };
- static struct clk_regmap gpll4_vote = {
- .enable_reg = 0x1480,
- .enable_mask = BIT(4),
- .hw.init = &(struct clk_init_data){
- .name = "gpll4_vote",
- .parent_names = (const char *[]){ "gpll4" },
- .num_parents = 1,
- .ops = &clk_pll_vote_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_usb30_master_clk[] = {
- F(125000000, P_GPLL0, 1, 5, 24),
- { }
- };
- static struct clk_rcg2 usb30_master_clk_src = {
- .cmd_rcgr = 0x03d4,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_usb30_master_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "usb30_master_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk[] = {
- F(19200000, P_XO, 1, 0, 0),
- F(37500000, P_GPLL0, 16, 0, 0),
- F(50000000, P_GPLL0, 12, 0, 0),
- { }
- };
- static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src = {
- .cmd_rcgr = 0x0660,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_qup1_i2c_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk[] = {
- F(960000, P_XO, 10, 1, 2),
- F(4800000, P_XO, 4, 0, 0),
- F(9600000, P_XO, 2, 0, 0),
- F(15000000, P_GPLL0, 10, 1, 4),
- F(19200000, P_XO, 1, 0, 0),
- F(25000000, P_GPLL0, 12, 1, 2),
- F(50000000, P_GPLL0, 12, 0, 0),
- { }
- };
- static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src = {
- .cmd_rcgr = 0x064c,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_qup1_spi_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src = {
- .cmd_rcgr = 0x06e0,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_qup2_i2c_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src = {
- .cmd_rcgr = 0x06cc,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_qup2_spi_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src = {
- .cmd_rcgr = 0x0760,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_qup3_i2c_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src = {
- .cmd_rcgr = 0x074c,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_qup3_spi_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src = {
- .cmd_rcgr = 0x07e0,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_qup4_i2c_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src = {
- .cmd_rcgr = 0x07cc,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_qup4_spi_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src = {
- .cmd_rcgr = 0x0860,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_qup5_i2c_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src = {
- .cmd_rcgr = 0x084c,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_qup5_spi_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src = {
- .cmd_rcgr = 0x08e0,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_qup6_i2c_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src = {
- .cmd_rcgr = 0x08cc,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_qup6_spi_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_blsp1_2_uart1_6_apps_clk[] = {
- F(3686400, P_GPLL0, 1, 96, 15625),
- F(7372800, P_GPLL0, 1, 192, 15625),
- F(14745600, P_GPLL0, 1, 384, 15625),
- F(16000000, P_GPLL0, 5, 2, 15),
- F(19200000, P_XO, 1, 0, 0),
- F(24000000, P_GPLL0, 5, 1, 5),
- F(32000000, P_GPLL0, 1, 4, 75),
- F(40000000, P_GPLL0, 15, 0, 0),
- F(46400000, P_GPLL0, 1, 29, 375),
- F(48000000, P_GPLL0, 12.5, 0, 0),
- F(51200000, P_GPLL0, 1, 32, 375),
- F(56000000, P_GPLL0, 1, 7, 75),
- F(58982400, P_GPLL0, 1, 1536, 15625),
- F(60000000, P_GPLL0, 10, 0, 0),
- F(63160000, P_GPLL0, 9.5, 0, 0),
- { }
- };
- static struct clk_rcg2 blsp1_uart1_apps_clk_src = {
- .cmd_rcgr = 0x068c,
- .mnd_width = 16,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_uart1_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_uart2_apps_clk_src = {
- .cmd_rcgr = 0x070c,
- .mnd_width = 16,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_uart2_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_uart3_apps_clk_src = {
- .cmd_rcgr = 0x078c,
- .mnd_width = 16,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_uart3_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_uart4_apps_clk_src = {
- .cmd_rcgr = 0x080c,
- .mnd_width = 16,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_uart4_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_uart5_apps_clk_src = {
- .cmd_rcgr = 0x088c,
- .mnd_width = 16,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_uart5_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp1_uart6_apps_clk_src = {
- .cmd_rcgr = 0x090c,
- .mnd_width = 16,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp1_uart6_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src = {
- .cmd_rcgr = 0x09a0,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_qup1_i2c_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src = {
- .cmd_rcgr = 0x098c,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_qup1_spi_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src = {
- .cmd_rcgr = 0x0a20,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_qup2_i2c_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src = {
- .cmd_rcgr = 0x0a0c,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_qup2_spi_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src = {
- .cmd_rcgr = 0x0aa0,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_qup3_i2c_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src = {
- .cmd_rcgr = 0x0a8c,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_qup3_spi_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_qup4_i2c_apps_clk_src = {
- .cmd_rcgr = 0x0b20,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_qup4_i2c_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_qup4_spi_apps_clk_src = {
- .cmd_rcgr = 0x0b0c,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_qup4_spi_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_qup5_i2c_apps_clk_src = {
- .cmd_rcgr = 0x0ba0,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_qup5_i2c_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_qup5_spi_apps_clk_src = {
- .cmd_rcgr = 0x0b8c,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_qup5_spi_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_qup6_i2c_apps_clk_src = {
- .cmd_rcgr = 0x0c20,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_qup6_i2c_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_qup6_spi_apps_clk_src = {
- .cmd_rcgr = 0x0c0c,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_qup6_spi_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_uart1_apps_clk_src = {
- .cmd_rcgr = 0x09cc,
- .mnd_width = 16,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_uart1_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_uart2_apps_clk_src = {
- .cmd_rcgr = 0x0a4c,
- .mnd_width = 16,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_uart2_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_uart3_apps_clk_src = {
- .cmd_rcgr = 0x0acc,
- .mnd_width = 16,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_uart3_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_uart4_apps_clk_src = {
- .cmd_rcgr = 0x0b4c,
- .mnd_width = 16,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_uart4_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_uart5_apps_clk_src = {
- .cmd_rcgr = 0x0bcc,
- .mnd_width = 16,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_uart5_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 blsp2_uart6_apps_clk_src = {
- .cmd_rcgr = 0x0c4c,
- .mnd_width = 16,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "blsp2_uart6_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_ce1_clk[] = {
- F(50000000, P_GPLL0, 12, 0, 0),
- F(75000000, P_GPLL0, 8, 0, 0),
- F(100000000, P_GPLL0, 6, 0, 0),
- F(150000000, P_GPLL0, 4, 0, 0),
- { }
- };
- static struct clk_rcg2 ce1_clk_src = {
- .cmd_rcgr = 0x1050,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_ce1_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "ce1_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_ce2_clk[] = {
- F(50000000, P_GPLL0, 12, 0, 0),
- F(75000000, P_GPLL0, 8, 0, 0),
- F(100000000, P_GPLL0, 6, 0, 0),
- F(150000000, P_GPLL0, 4, 0, 0),
- { }
- };
- static struct clk_rcg2 ce2_clk_src = {
- .cmd_rcgr = 0x1090,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_ce2_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "ce2_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_gp_clk[] = {
- F(4800000, P_XO, 4, 0, 0),
- F(6000000, P_GPLL0, 10, 1, 10),
- F(6750000, P_GPLL0, 1, 1, 89),
- F(8000000, P_GPLL0, 15, 1, 5),
- F(9600000, P_XO, 2, 0, 0),
- F(16000000, P_GPLL0, 1, 2, 75),
- F(19200000, P_XO, 1, 0, 0),
- F(24000000, P_GPLL0, 5, 1, 5),
- { }
- };
- static struct clk_rcg2 gp1_clk_src = {
- .cmd_rcgr = 0x1904,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_gp_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "gp1_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 gp2_clk_src = {
- .cmd_rcgr = 0x1944,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_gp_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "gp2_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 gp3_clk_src = {
- .cmd_rcgr = 0x1984,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_gp_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "gp3_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_pdm2_clk[] = {
- F(60000000, P_GPLL0, 10, 0, 0),
- { }
- };
- static struct clk_rcg2 pdm2_clk_src = {
- .cmd_rcgr = 0x0cd0,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_pdm2_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "pdm2_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_sdcc1_4_apps_clk[] = {
- F(144000, P_XO, 16, 3, 25),
- F(400000, P_XO, 12, 1, 4),
- F(20000000, P_GPLL0, 15, 1, 2),
- F(25000000, P_GPLL0, 12, 1, 2),
- F(50000000, P_GPLL0, 12, 0, 0),
- F(100000000, P_GPLL0, 6, 0, 0),
- F(200000000, P_GPLL0, 3, 0, 0),
- { }
- };
- static const struct freq_tbl ftbl_gcc_sdcc1_apps_clk_pro[] = {
- F(144000, P_XO, 16, 3, 25),
- F(400000, P_XO, 12, 1, 4),
- F(20000000, P_GPLL0, 15, 1, 2),
- F(25000000, P_GPLL0, 12, 1, 2),
- F(50000000, P_GPLL0, 12, 0, 0),
- F(100000000, P_GPLL0, 6, 0, 0),
- F(192000000, P_GPLL4, 4, 0, 0),
- F(200000000, P_GPLL0, 3, 0, 0),
- F(384000000, P_GPLL4, 2, 0, 0),
- { }
- };
- static struct clk_init_data sdcc1_apps_clk_src_init = {
- .name = "sdcc1_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- };
- static struct clk_rcg2 sdcc1_apps_clk_src = {
- .cmd_rcgr = 0x04d0,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_sdcc1_4_apps_clk,
- .clkr.hw.init = &sdcc1_apps_clk_src_init,
- };
- static struct clk_rcg2 sdcc2_apps_clk_src = {
- .cmd_rcgr = 0x0510,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_sdcc1_4_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "sdcc2_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 sdcc3_apps_clk_src = {
- .cmd_rcgr = 0x0550,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_sdcc1_4_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "sdcc3_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_rcg2 sdcc4_apps_clk_src = {
- .cmd_rcgr = 0x0590,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_sdcc1_4_apps_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "sdcc4_apps_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_tsif_ref_clk[] = {
- F(105000, P_XO, 2, 1, 91),
- { }
- };
- static struct clk_rcg2 tsif_ref_clk_src = {
- .cmd_rcgr = 0x0d90,
- .mnd_width = 8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_tsif_ref_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "tsif_ref_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_usb30_mock_utmi_clk[] = {
- F(60000000, P_GPLL0, 10, 0, 0),
- { }
- };
- static struct clk_rcg2 usb30_mock_utmi_clk_src = {
- .cmd_rcgr = 0x03e8,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_usb30_mock_utmi_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "usb30_mock_utmi_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_usb_hs_system_clk[] = {
- F(60000000, P_GPLL0, 10, 0, 0),
- F(75000000, P_GPLL0, 8, 0, 0),
- { }
- };
- static struct clk_rcg2 usb_hs_system_clk_src = {
- .cmd_rcgr = 0x0490,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_usb_hs_system_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "usb_hs_system_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_usb_hsic_clk[] = {
- F(480000000, P_GPLL1, 1, 0, 0),
- { }
- };
- static const struct parent_map usb_hsic_clk_src_map[] = {
- { P_XO, 0 },
- { P_GPLL1, 4 }
- };
- static struct clk_rcg2 usb_hsic_clk_src = {
- .cmd_rcgr = 0x0440,
- .hid_width = 5,
- .parent_map = usb_hsic_clk_src_map,
- .freq_tbl = ftbl_gcc_usb_hsic_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "usb_hsic_clk_src",
- .parent_names = (const char *[]){
- "xo",
- "gpll1_vote",
- },
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_usb_hsic_io_cal_clk[] = {
- F(9600000, P_XO, 2, 0, 0),
- { }
- };
- static struct clk_rcg2 usb_hsic_io_cal_clk_src = {
- .cmd_rcgr = 0x0458,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_usb_hsic_io_cal_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "usb_hsic_io_cal_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 1,
- .ops = &clk_rcg2_ops,
- },
- };
- static const struct freq_tbl ftbl_gcc_usb_hsic_system_clk[] = {
- F(60000000, P_GPLL0, 10, 0, 0),
- F(75000000, P_GPLL0, 8, 0, 0),
- { }
- };
- static struct clk_rcg2 usb_hsic_system_clk_src = {
- .cmd_rcgr = 0x041c,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_map,
- .freq_tbl = ftbl_gcc_usb_hsic_system_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "usb_hsic_system_clk_src",
- .parent_names = gcc_xo_gpll0,
- .num_parents = 2,
- .ops = &clk_rcg2_ops,
- },
- };
- static struct clk_regmap gcc_mmss_gpll0_clk_src = {
- .enable_reg = 0x1484,
- .enable_mask = BIT(26),
- .hw.init = &(struct clk_init_data){
- .name = "mmss_gpll0_vote",
- .parent_names = (const char *[]){
- "gpll0_vote",
- },
- .num_parents = 1,
- .ops = &clk_branch_simple_ops,
- },
- };
- static struct clk_branch gcc_bam_dma_ahb_clk = {
- .halt_reg = 0x0d44,
- .halt_check = BRANCH_HALT_VOTED,
- .clkr = {
- .enable_reg = 0x1484,
- .enable_mask = BIT(12),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_bam_dma_ahb_clk",
- .parent_names = (const char *[]){
- "periph_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_ahb_clk = {
- .halt_reg = 0x05c4,
- .halt_check = BRANCH_HALT_VOTED,
- .clkr = {
- .enable_reg = 0x1484,
- .enable_mask = BIT(17),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_ahb_clk",
- .parent_names = (const char *[]){
- "periph_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk = {
- .halt_reg = 0x0648,
- .clkr = {
- .enable_reg = 0x0648,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_qup1_i2c_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_qup1_i2c_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_qup1_spi_apps_clk = {
- .halt_reg = 0x0644,
- .clkr = {
- .enable_reg = 0x0644,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_qup1_spi_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_qup1_spi_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk = {
- .halt_reg = 0x06c8,
- .clkr = {
- .enable_reg = 0x06c8,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_qup2_i2c_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_qup2_i2c_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_qup2_spi_apps_clk = {
- .halt_reg = 0x06c4,
- .clkr = {
- .enable_reg = 0x06c4,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_qup2_spi_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_qup2_spi_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk = {
- .halt_reg = 0x0748,
- .clkr = {
- .enable_reg = 0x0748,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_qup3_i2c_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_qup3_i2c_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_qup3_spi_apps_clk = {
- .halt_reg = 0x0744,
- .clkr = {
- .enable_reg = 0x0744,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_qup3_spi_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_qup3_spi_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk = {
- .halt_reg = 0x07c8,
- .clkr = {
- .enable_reg = 0x07c8,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_qup4_i2c_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_qup4_i2c_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_qup4_spi_apps_clk = {
- .halt_reg = 0x07c4,
- .clkr = {
- .enable_reg = 0x07c4,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_qup4_spi_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_qup4_spi_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk = {
- .halt_reg = 0x0848,
- .clkr = {
- .enable_reg = 0x0848,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_qup5_i2c_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_qup5_i2c_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_qup5_spi_apps_clk = {
- .halt_reg = 0x0844,
- .clkr = {
- .enable_reg = 0x0844,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_qup5_spi_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_qup5_spi_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk = {
- .halt_reg = 0x08c8,
- .clkr = {
- .enable_reg = 0x08c8,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_qup6_i2c_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_qup6_i2c_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = {
- .halt_reg = 0x08c4,
- .clkr = {
- .enable_reg = 0x08c4,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_qup6_spi_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_qup6_spi_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_uart1_apps_clk = {
- .halt_reg = 0x0684,
- .clkr = {
- .enable_reg = 0x0684,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_uart1_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_uart1_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_uart2_apps_clk = {
- .halt_reg = 0x0704,
- .clkr = {
- .enable_reg = 0x0704,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_uart2_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_uart2_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_uart3_apps_clk = {
- .halt_reg = 0x0784,
- .clkr = {
- .enable_reg = 0x0784,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_uart3_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_uart3_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_uart4_apps_clk = {
- .halt_reg = 0x0804,
- .clkr = {
- .enable_reg = 0x0804,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_uart4_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_uart4_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_uart5_apps_clk = {
- .halt_reg = 0x0884,
- .clkr = {
- .enable_reg = 0x0884,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_uart5_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_uart5_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp1_uart6_apps_clk = {
- .halt_reg = 0x0904,
- .clkr = {
- .enable_reg = 0x0904,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp1_uart6_apps_clk",
- .parent_names = (const char *[]){
- "blsp1_uart6_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_ahb_clk = {
- .halt_reg = 0x0944,
- .halt_check = BRANCH_HALT_VOTED,
- .clkr = {
- .enable_reg = 0x1484,
- .enable_mask = BIT(15),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_ahb_clk",
- .parent_names = (const char *[]){
- "periph_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk = {
- .halt_reg = 0x0988,
- .clkr = {
- .enable_reg = 0x0988,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_qup1_i2c_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_qup1_i2c_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_qup1_spi_apps_clk = {
- .halt_reg = 0x0984,
- .clkr = {
- .enable_reg = 0x0984,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_qup1_spi_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_qup1_spi_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk = {
- .halt_reg = 0x0a08,
- .clkr = {
- .enable_reg = 0x0a08,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_qup2_i2c_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_qup2_i2c_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_qup2_spi_apps_clk = {
- .halt_reg = 0x0a04,
- .clkr = {
- .enable_reg = 0x0a04,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_qup2_spi_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_qup2_spi_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk = {
- .halt_reg = 0x0a88,
- .clkr = {
- .enable_reg = 0x0a88,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_qup3_i2c_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_qup3_i2c_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_qup3_spi_apps_clk = {
- .halt_reg = 0x0a84,
- .clkr = {
- .enable_reg = 0x0a84,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_qup3_spi_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_qup3_spi_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_qup4_i2c_apps_clk = {
- .halt_reg = 0x0b08,
- .clkr = {
- .enable_reg = 0x0b08,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_qup4_i2c_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_qup4_i2c_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_qup4_spi_apps_clk = {
- .halt_reg = 0x0b04,
- .clkr = {
- .enable_reg = 0x0b04,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_qup4_spi_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_qup4_spi_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_qup5_i2c_apps_clk = {
- .halt_reg = 0x0b88,
- .clkr = {
- .enable_reg = 0x0b88,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_qup5_i2c_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_qup5_i2c_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_qup5_spi_apps_clk = {
- .halt_reg = 0x0b84,
- .clkr = {
- .enable_reg = 0x0b84,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_qup5_spi_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_qup5_spi_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_qup6_i2c_apps_clk = {
- .halt_reg = 0x0c08,
- .clkr = {
- .enable_reg = 0x0c08,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_qup6_i2c_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_qup6_i2c_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_qup6_spi_apps_clk = {
- .halt_reg = 0x0c04,
- .clkr = {
- .enable_reg = 0x0c04,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_qup6_spi_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_qup6_spi_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_uart1_apps_clk = {
- .halt_reg = 0x09c4,
- .clkr = {
- .enable_reg = 0x09c4,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_uart1_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_uart1_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_uart2_apps_clk = {
- .halt_reg = 0x0a44,
- .clkr = {
- .enable_reg = 0x0a44,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_uart2_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_uart2_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_uart3_apps_clk = {
- .halt_reg = 0x0ac4,
- .clkr = {
- .enable_reg = 0x0ac4,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_uart3_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_uart3_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_uart4_apps_clk = {
- .halt_reg = 0x0b44,
- .clkr = {
- .enable_reg = 0x0b44,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_uart4_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_uart4_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_uart5_apps_clk = {
- .halt_reg = 0x0bc4,
- .clkr = {
- .enable_reg = 0x0bc4,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_uart5_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_uart5_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_blsp2_uart6_apps_clk = {
- .halt_reg = 0x0c44,
- .clkr = {
- .enable_reg = 0x0c44,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_blsp2_uart6_apps_clk",
- .parent_names = (const char *[]){
- "blsp2_uart6_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_boot_rom_ahb_clk = {
- .halt_reg = 0x0e04,
- .halt_check = BRANCH_HALT_VOTED,
- .clkr = {
- .enable_reg = 0x1484,
- .enable_mask = BIT(10),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_boot_rom_ahb_clk",
- .parent_names = (const char *[]){
- "config_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_ce1_ahb_clk = {
- .halt_reg = 0x104c,
- .halt_check = BRANCH_HALT_VOTED,
- .clkr = {
- .enable_reg = 0x1484,
- .enable_mask = BIT(3),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_ce1_ahb_clk",
- .parent_names = (const char *[]){
- "config_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_ce1_axi_clk = {
- .halt_reg = 0x1048,
- .halt_check = BRANCH_HALT_VOTED,
- .clkr = {
- .enable_reg = 0x1484,
- .enable_mask = BIT(4),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_ce1_axi_clk",
- .parent_names = (const char *[]){
- "system_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_ce1_clk = {
- .halt_reg = 0x1050,
- .halt_check = BRANCH_HALT_VOTED,
- .clkr = {
- .enable_reg = 0x1484,
- .enable_mask = BIT(5),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_ce1_clk",
- .parent_names = (const char *[]){
- "ce1_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_ce2_ahb_clk = {
- .halt_reg = 0x108c,
- .halt_check = BRANCH_HALT_VOTED,
- .clkr = {
- .enable_reg = 0x1484,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_ce2_ahb_clk",
- .parent_names = (const char *[]){
- "config_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_ce2_axi_clk = {
- .halt_reg = 0x1088,
- .halt_check = BRANCH_HALT_VOTED,
- .clkr = {
- .enable_reg = 0x1484,
- .enable_mask = BIT(1),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_ce2_axi_clk",
- .parent_names = (const char *[]){
- "system_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_ce2_clk = {
- .halt_reg = 0x1090,
- .halt_check = BRANCH_HALT_VOTED,
- .clkr = {
- .enable_reg = 0x1484,
- .enable_mask = BIT(2),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_ce2_clk",
- .parent_names = (const char *[]){
- "ce2_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_gp1_clk = {
- .halt_reg = 0x1900,
- .clkr = {
- .enable_reg = 0x1900,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_gp1_clk",
- .parent_names = (const char *[]){
- "gp1_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_gp2_clk = {
- .halt_reg = 0x1940,
- .clkr = {
- .enable_reg = 0x1940,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_gp2_clk",
- .parent_names = (const char *[]){
- "gp2_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_gp3_clk = {
- .halt_reg = 0x1980,
- .clkr = {
- .enable_reg = 0x1980,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_gp3_clk",
- .parent_names = (const char *[]){
- "gp3_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_lpass_q6_axi_clk = {
- .halt_reg = 0x11c0,
- .clkr = {
- .enable_reg = 0x11c0,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_lpass_q6_axi_clk",
- .parent_names = (const char *[]){
- "system_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_mmss_noc_cfg_ahb_clk = {
- .halt_reg = 0x024c,
- .clkr = {
- .enable_reg = 0x024c,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_mmss_noc_cfg_ahb_clk",
- .parent_names = (const char *[]){
- "config_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- .flags = CLK_IGNORE_UNUSED,
- },
- },
- };
- static struct clk_branch gcc_ocmem_noc_cfg_ahb_clk = {
- .halt_reg = 0x0248,
- .clkr = {
- .enable_reg = 0x0248,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_ocmem_noc_cfg_ahb_clk",
- .parent_names = (const char *[]){
- "config_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_mss_cfg_ahb_clk = {
- .halt_reg = 0x0280,
- .clkr = {
- .enable_reg = 0x0280,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_mss_cfg_ahb_clk",
- .parent_names = (const char *[]){
- "config_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_mss_q6_bimc_axi_clk = {
- .halt_reg = 0x0284,
- .clkr = {
- .enable_reg = 0x0284,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_mss_q6_bimc_axi_clk",
- .flags = CLK_IS_ROOT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_pdm2_clk = {
- .halt_reg = 0x0ccc,
- .clkr = {
- .enable_reg = 0x0ccc,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_pdm2_clk",
- .parent_names = (const char *[]){
- "pdm2_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_pdm_ahb_clk = {
- .halt_reg = 0x0cc4,
- .clkr = {
- .enable_reg = 0x0cc4,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_pdm_ahb_clk",
- .parent_names = (const char *[]){
- "periph_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_prng_ahb_clk = {
- .halt_reg = 0x0d04,
- .halt_check = BRANCH_HALT_VOTED,
- .clkr = {
- .enable_reg = 0x1484,
- .enable_mask = BIT(13),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_prng_ahb_clk",
- .parent_names = (const char *[]){
- "periph_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_sdcc1_ahb_clk = {
- .halt_reg = 0x04c8,
- .clkr = {
- .enable_reg = 0x04c8,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_sdcc1_ahb_clk",
- .parent_names = (const char *[]){
- "periph_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_sdcc1_apps_clk = {
- .halt_reg = 0x04c4,
- .clkr = {
- .enable_reg = 0x04c4,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_sdcc1_apps_clk",
- .parent_names = (const char *[]){
- "sdcc1_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_sdcc1_cdccal_ff_clk = {
- .halt_reg = 0x04e8,
- .clkr = {
- .enable_reg = 0x04e8,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_sdcc1_cdccal_ff_clk",
- .parent_names = (const char *[]){
- "xo"
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_sdcc1_cdccal_sleep_clk = {
- .halt_reg = 0x04e4,
- .clkr = {
- .enable_reg = 0x04e4,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_sdcc1_cdccal_sleep_clk",
- .parent_names = (const char *[]){
- "sleep_clk_src"
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_sdcc2_ahb_clk = {
- .halt_reg = 0x0508,
- .clkr = {
- .enable_reg = 0x0508,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_sdcc2_ahb_clk",
- .parent_names = (const char *[]){
- "periph_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_sdcc2_apps_clk = {
- .halt_reg = 0x0504,
- .clkr = {
- .enable_reg = 0x0504,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_sdcc2_apps_clk",
- .parent_names = (const char *[]){
- "sdcc2_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_sdcc3_ahb_clk = {
- .halt_reg = 0x0548,
- .clkr = {
- .enable_reg = 0x0548,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_sdcc3_ahb_clk",
- .parent_names = (const char *[]){
- "periph_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_sdcc3_apps_clk = {
- .halt_reg = 0x0544,
- .clkr = {
- .enable_reg = 0x0544,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_sdcc3_apps_clk",
- .parent_names = (const char *[]){
- "sdcc3_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_sdcc4_ahb_clk = {
- .halt_reg = 0x0588,
- .clkr = {
- .enable_reg = 0x0588,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_sdcc4_ahb_clk",
- .parent_names = (const char *[]){
- "periph_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_sdcc4_apps_clk = {
- .halt_reg = 0x0584,
- .clkr = {
- .enable_reg = 0x0584,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_sdcc4_apps_clk",
- .parent_names = (const char *[]){
- "sdcc4_apps_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_sys_noc_usb3_axi_clk = {
- .halt_reg = 0x0108,
- .clkr = {
- .enable_reg = 0x0108,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_sys_noc_usb3_axi_clk",
- .parent_names = (const char *[]){
- "usb30_master_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_tsif_ahb_clk = {
- .halt_reg = 0x0d84,
- .clkr = {
- .enable_reg = 0x0d84,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_tsif_ahb_clk",
- .parent_names = (const char *[]){
- "periph_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_tsif_ref_clk = {
- .halt_reg = 0x0d88,
- .clkr = {
- .enable_reg = 0x0d88,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_tsif_ref_clk",
- .parent_names = (const char *[]){
- "tsif_ref_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_usb2a_phy_sleep_clk = {
- .halt_reg = 0x04ac,
- .clkr = {
- .enable_reg = 0x04ac,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_usb2a_phy_sleep_clk",
- .parent_names = (const char *[]){
- "sleep_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_usb2b_phy_sleep_clk = {
- .halt_reg = 0x04b4,
- .clkr = {
- .enable_reg = 0x04b4,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_usb2b_phy_sleep_clk",
- .parent_names = (const char *[]){
- "sleep_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_usb30_master_clk = {
- .halt_reg = 0x03c8,
- .clkr = {
- .enable_reg = 0x03c8,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_usb30_master_clk",
- .parent_names = (const char *[]){
- "usb30_master_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_usb30_mock_utmi_clk = {
- .halt_reg = 0x03d0,
- .clkr = {
- .enable_reg = 0x03d0,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_usb30_mock_utmi_clk",
- .parent_names = (const char *[]){
- "usb30_mock_utmi_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_usb30_sleep_clk = {
- .halt_reg = 0x03cc,
- .clkr = {
- .enable_reg = 0x03cc,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_usb30_sleep_clk",
- .parent_names = (const char *[]){
- "sleep_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_usb_hs_ahb_clk = {
- .halt_reg = 0x0488,
- .clkr = {
- .enable_reg = 0x0488,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_usb_hs_ahb_clk",
- .parent_names = (const char *[]){
- "periph_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_usb_hs_system_clk = {
- .halt_reg = 0x0484,
- .clkr = {
- .enable_reg = 0x0484,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_usb_hs_system_clk",
- .parent_names = (const char *[]){
- "usb_hs_system_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_usb_hsic_ahb_clk = {
- .halt_reg = 0x0408,
- .clkr = {
- .enable_reg = 0x0408,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_usb_hsic_ahb_clk",
- .parent_names = (const char *[]){
- "periph_noc_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_usb_hsic_clk = {
- .halt_reg = 0x0410,
- .clkr = {
- .enable_reg = 0x0410,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_usb_hsic_clk",
- .parent_names = (const char *[]){
- "usb_hsic_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_usb_hsic_io_cal_clk = {
- .halt_reg = 0x0414,
- .clkr = {
- .enable_reg = 0x0414,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_usb_hsic_io_cal_clk",
- .parent_names = (const char *[]){
- "usb_hsic_io_cal_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_usb_hsic_io_cal_sleep_clk = {
- .halt_reg = 0x0418,
- .clkr = {
- .enable_reg = 0x0418,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_usb_hsic_io_cal_sleep_clk",
- .parent_names = (const char *[]){
- "sleep_clk_src",
- },
- .num_parents = 1,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct clk_branch gcc_usb_hsic_system_clk = {
- .halt_reg = 0x040c,
- .clkr = {
- .enable_reg = 0x040c,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_usb_hsic_system_clk",
- .parent_names = (const char *[]){
- "usb_hsic_system_clk_src",
- },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
- };
- static struct gdsc usb_hs_hsic_gdsc = {
- .gdscr = 0x404,
- .pd = {
- .name = "usb_hs_hsic",
- },
- .pwrsts = PWRSTS_OFF_ON,
- };
- static struct clk_regmap *gcc_msm8974_clocks[] = {
- [GPLL0] = &gpll0.clkr,
- [GPLL0_VOTE] = &gpll0_vote,
- [CONFIG_NOC_CLK_SRC] = &config_noc_clk_src.clkr,
- [PERIPH_NOC_CLK_SRC] = &periph_noc_clk_src.clkr,
- [SYSTEM_NOC_CLK_SRC] = &system_noc_clk_src.clkr,
- [GPLL1] = &gpll1.clkr,
- [GPLL1_VOTE] = &gpll1_vote,
- [USB30_MASTER_CLK_SRC] = &usb30_master_clk_src.clkr,
- [BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr,
- [BLSP1_QUP1_SPI_APPS_CLK_SRC] = &blsp1_qup1_spi_apps_clk_src.clkr,
- [BLSP1_QUP2_I2C_APPS_CLK_SRC] = &blsp1_qup2_i2c_apps_clk_src.clkr,
- [BLSP1_QUP2_SPI_APPS_CLK_SRC] = &blsp1_qup2_spi_apps_clk_src.clkr,
- [BLSP1_QUP3_I2C_APPS_CLK_SRC] = &blsp1_qup3_i2c_apps_clk_src.clkr,
- [BLSP1_QUP3_SPI_APPS_CLK_SRC] = &blsp1_qup3_spi_apps_clk_src.clkr,
- [BLSP1_QUP4_I2C_APPS_CLK_SRC] = &blsp1_qup4_i2c_apps_clk_src.clkr,
- [BLSP1_QUP4_SPI_APPS_CLK_SRC] = &blsp1_qup4_spi_apps_clk_src.clkr,
- [BLSP1_QUP5_I2C_APPS_CLK_SRC] = &blsp1_qup5_i2c_apps_clk_src.clkr,
- [BLSP1_QUP5_SPI_APPS_CLK_SRC] = &blsp1_qup5_spi_apps_clk_src.clkr,
- [BLSP1_QUP6_I2C_APPS_CLK_SRC] = &blsp1_qup6_i2c_apps_clk_src.clkr,
- [BLSP1_QUP6_SPI_APPS_CLK_SRC] = &blsp1_qup6_spi_apps_clk_src.clkr,
- [BLSP1_UART1_APPS_CLK_SRC] = &blsp1_uart1_apps_clk_src.clkr,
- [BLSP1_UART2_APPS_CLK_SRC] = &blsp1_uart2_apps_clk_src.clkr,
- [BLSP1_UART3_APPS_CLK_SRC] = &blsp1_uart3_apps_clk_src.clkr,
- [BLSP1_UART4_APPS_CLK_SRC] = &blsp1_uart4_apps_clk_src.clkr,
- [BLSP1_UART5_APPS_CLK_SRC] = &blsp1_uart5_apps_clk_src.clkr,
- [BLSP1_UART6_APPS_CLK_SRC] = &blsp1_uart6_apps_clk_src.clkr,
- [BLSP2_QUP1_I2C_APPS_CLK_SRC] = &blsp2_qup1_i2c_apps_clk_src.clkr,
- [BLSP2_QUP1_SPI_APPS_CLK_SRC] = &blsp2_qup1_spi_apps_clk_src.clkr,
- [BLSP2_QUP2_I2C_APPS_CLK_SRC] = &blsp2_qup2_i2c_apps_clk_src.clkr,
- [BLSP2_QUP2_SPI_APPS_CLK_SRC] = &blsp2_qup2_spi_apps_clk_src.clkr,
- [BLSP2_QUP3_I2C_APPS_CLK_SRC] = &blsp2_qup3_i2c_apps_clk_src.clkr,
- [BLSP2_QUP3_SPI_APPS_CLK_SRC] = &blsp2_qup3_spi_apps_clk_src.clkr,
- [BLSP2_QUP4_I2C_APPS_CLK_SRC] = &blsp2_qup4_i2c_apps_clk_src.clkr,
- [BLSP2_QUP4_SPI_APPS_CLK_SRC] = &blsp2_qup4_spi_apps_clk_src.clkr,
- [BLSP2_QUP5_I2C_APPS_CLK_SRC] = &blsp2_qup5_i2c_apps_clk_src.clkr,
- [BLSP2_QUP5_SPI_APPS_CLK_SRC] = &blsp2_qup5_spi_apps_clk_src.clkr,
- [BLSP2_QUP6_I2C_APPS_CLK_SRC] = &blsp2_qup6_i2c_apps_clk_src.clkr,
- [BLSP2_QUP6_SPI_APPS_CLK_SRC] = &blsp2_qup6_spi_apps_clk_src.clkr,
- [BLSP2_UART1_APPS_CLK_SRC] = &blsp2_uart1_apps_clk_src.clkr,
- [BLSP2_UART2_APPS_CLK_SRC] = &blsp2_uart2_apps_clk_src.clkr,
- [BLSP2_UART3_APPS_CLK_SRC] = &blsp2_uart3_apps_clk_src.clkr,
- [BLSP2_UART4_APPS_CLK_SRC] = &blsp2_uart4_apps_clk_src.clkr,
- [BLSP2_UART5_APPS_CLK_SRC] = &blsp2_uart5_apps_clk_src.clkr,
- [BLSP2_UART6_APPS_CLK_SRC] = &blsp2_uart6_apps_clk_src.clkr,
- [CE1_CLK_SRC] = &ce1_clk_src.clkr,
- [CE2_CLK_SRC] = &ce2_clk_src.clkr,
- [GP1_CLK_SRC] = &gp1_clk_src.clkr,
- [GP2_CLK_SRC] = &gp2_clk_src.clkr,
- [GP3_CLK_SRC] = &gp3_clk_src.clkr,
- [PDM2_CLK_SRC] = &pdm2_clk_src.clkr,
- [SDCC1_APPS_CLK_SRC] = &sdcc1_apps_clk_src.clkr,
- [SDCC2_APPS_CLK_SRC] = &sdcc2_apps_clk_src.clkr,
- [SDCC3_APPS_CLK_SRC] = &sdcc3_apps_clk_src.clkr,
- [SDCC4_APPS_CLK_SRC] = &sdcc4_apps_clk_src.clkr,
- [TSIF_REF_CLK_SRC] = &tsif_ref_clk_src.clkr,
- [USB30_MOCK_UTMI_CLK_SRC] = &usb30_mock_utmi_clk_src.clkr,
- [USB_HS_SYSTEM_CLK_SRC] = &usb_hs_system_clk_src.clkr,
- [USB_HSIC_CLK_SRC] = &usb_hsic_clk_src.clkr,
- [USB_HSIC_IO_CAL_CLK_SRC] = &usb_hsic_io_cal_clk_src.clkr,
- [USB_HSIC_SYSTEM_CLK_SRC] = &usb_hsic_system_clk_src.clkr,
- [GCC_BAM_DMA_AHB_CLK] = &gcc_bam_dma_ahb_clk.clkr,
- [GCC_BLSP1_AHB_CLK] = &gcc_blsp1_ahb_clk.clkr,
- [GCC_BLSP1_QUP1_I2C_APPS_CLK] = &gcc_blsp1_qup1_i2c_apps_clk.clkr,
- [GCC_BLSP1_QUP1_SPI_APPS_CLK] = &gcc_blsp1_qup1_spi_apps_clk.clkr,
- [GCC_BLSP1_QUP2_I2C_APPS_CLK] = &gcc_blsp1_qup2_i2c_apps_clk.clkr,
- [GCC_BLSP1_QUP2_SPI_APPS_CLK] = &gcc_blsp1_qup2_spi_apps_clk.clkr,
- [GCC_BLSP1_QUP3_I2C_APPS_CLK] = &gcc_blsp1_qup3_i2c_apps_clk.clkr,
- [GCC_BLSP1_QUP3_SPI_APPS_CLK] = &gcc_blsp1_qup3_spi_apps_clk.clkr,
- [GCC_BLSP1_QUP4_I2C_APPS_CLK] = &gcc_blsp1_qup4_i2c_apps_clk.clkr,
- [GCC_BLSP1_QUP4_SPI_APPS_CLK] = &gcc_blsp1_qup4_spi_apps_clk.clkr,
- [GCC_BLSP1_QUP5_I2C_APPS_CLK] = &gcc_blsp1_qup5_i2c_apps_clk.clkr,
- [GCC_BLSP1_QUP5_SPI_APPS_CLK] = &gcc_blsp1_qup5_spi_apps_clk.clkr,
- [GCC_BLSP1_QUP6_I2C_APPS_CLK] = &gcc_blsp1_qup6_i2c_apps_clk.clkr,
- [GCC_BLSP1_QUP6_SPI_APPS_CLK] = &gcc_blsp1_qup6_spi_apps_clk.clkr,
- [GCC_BLSP1_UART1_APPS_CLK] = &gcc_blsp1_uart1_apps_clk.clkr,
- [GCC_BLSP1_UART2_APPS_CLK] = &gcc_blsp1_uart2_apps_clk.clkr,
- [GCC_BLSP1_UART3_APPS_CLK] = &gcc_blsp1_uart3_apps_clk.clkr,
- [GCC_BLSP1_UART4_APPS_CLK] = &gcc_blsp1_uart4_apps_clk.clkr,
- [GCC_BLSP1_UART5_APPS_CLK] = &gcc_blsp1_uart5_apps_clk.clkr,
- [GCC_BLSP1_UART6_APPS_CLK] = &gcc_blsp1_uart6_apps_clk.clkr,
- [GCC_BLSP2_AHB_CLK] = &gcc_blsp2_ahb_clk.clkr,
- [GCC_BLSP2_QUP1_I2C_APPS_CLK] = &gcc_blsp2_qup1_i2c_apps_clk.clkr,
- [GCC_BLSP2_QUP1_SPI_APPS_CLK] = &gcc_blsp2_qup1_spi_apps_clk.clkr,
- [GCC_BLSP2_QUP2_I2C_APPS_CLK] = &gcc_blsp2_qup2_i2c_apps_clk.clkr,
- [GCC_BLSP2_QUP2_SPI_APPS_CLK] = &gcc_blsp2_qup2_spi_apps_clk.clkr,
- [GCC_BLSP2_QUP3_I2C_APPS_CLK] = &gcc_blsp2_qup3_i2c_apps_clk.clkr,
- [GCC_BLSP2_QUP3_SPI_APPS_CLK] = &gcc_blsp2_qup3_spi_apps_clk.clkr,
- [GCC_BLSP2_QUP4_I2C_APPS_CLK] = &gcc_blsp2_qup4_i2c_apps_clk.clkr,
- [GCC_BLSP2_QUP4_SPI_APPS_CLK] = &gcc_blsp2_qup4_spi_apps_clk.clkr,
- [GCC_BLSP2_QUP5_I2C_APPS_CLK] = &gcc_blsp2_qup5_i2c_apps_clk.clkr,
- [GCC_BLSP2_QUP5_SPI_APPS_CLK] = &gcc_blsp2_qup5_spi_apps_clk.clkr,
- [GCC_BLSP2_QUP6_I2C_APPS_CLK] = &gcc_blsp2_qup6_i2c_apps_clk.clkr,
- [GCC_BLSP2_QUP6_SPI_APPS_CLK] = &gcc_blsp2_qup6_spi_apps_clk.clkr,
- [GCC_BLSP2_UART1_APPS_CLK] = &gcc_blsp2_uart1_apps_clk.clkr,
- [GCC_BLSP2_UART2_APPS_CLK] = &gcc_blsp2_uart2_apps_clk.clkr,
- [GCC_BLSP2_UART3_APPS_CLK] = &gcc_blsp2_uart3_apps_clk.clkr,
- [GCC_BLSP2_UART4_APPS_CLK] = &gcc_blsp2_uart4_apps_clk.clkr,
- [GCC_BLSP2_UART5_APPS_CLK] = &gcc_blsp2_uart5_apps_clk.clkr,
- [GCC_BLSP2_UART6_APPS_CLK] = &gcc_blsp2_uart6_apps_clk.clkr,
- [GCC_BOOT_ROM_AHB_CLK] = &gcc_boot_rom_ahb_clk.clkr,
- [GCC_CE1_AHB_CLK] = &gcc_ce1_ahb_clk.clkr,
- [GCC_CE1_AXI_CLK] = &gcc_ce1_axi_clk.clkr,
- [GCC_CE1_CLK] = &gcc_ce1_clk.clkr,
- [GCC_CE2_AHB_CLK] = &gcc_ce2_ahb_clk.clkr,
- [GCC_CE2_AXI_CLK] = &gcc_ce2_axi_clk.clkr,
- [GCC_CE2_CLK] = &gcc_ce2_clk.clkr,
- [GCC_GP1_CLK] = &gcc_gp1_clk.clkr,
- [GCC_GP2_CLK] = &gcc_gp2_clk.clkr,
- [GCC_GP3_CLK] = &gcc_gp3_clk.clkr,
- [GCC_LPASS_Q6_AXI_CLK] = &gcc_lpass_q6_axi_clk.clkr,
- [GCC_MMSS_NOC_CFG_AHB_CLK] = &gcc_mmss_noc_cfg_ahb_clk.clkr,
- [GCC_OCMEM_NOC_CFG_AHB_CLK] = &gcc_ocmem_noc_cfg_ahb_clk.clkr,
- [GCC_MSS_CFG_AHB_CLK] = &gcc_mss_cfg_ahb_clk.clkr,
- [GCC_MSS_Q6_BIMC_AXI_CLK] = &gcc_mss_q6_bimc_axi_clk.clkr,
- [GCC_PDM2_CLK] = &gcc_pdm2_clk.clkr,
- [GCC_PDM_AHB_CLK] = &gcc_pdm_ahb_clk.clkr,
- [GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr,
- [GCC_SDCC1_AHB_CLK] = &gcc_sdcc1_ahb_clk.clkr,
- [GCC_SDCC1_APPS_CLK] = &gcc_sdcc1_apps_clk.clkr,
- [GCC_SDCC2_AHB_CLK] = &gcc_sdcc2_ahb_clk.clkr,
- [GCC_SDCC2_APPS_CLK] = &gcc_sdcc2_apps_clk.clkr,
- [GCC_SDCC3_AHB_CLK] = &gcc_sdcc3_ahb_clk.clkr,
- [GCC_SDCC3_APPS_CLK] = &gcc_sdcc3_apps_clk.clkr,
- [GCC_SDCC4_AHB_CLK] = &gcc_sdcc4_ahb_clk.clkr,
- [GCC_SDCC4_APPS_CLK] = &gcc_sdcc4_apps_clk.clkr,
- [GCC_SYS_NOC_USB3_AXI_CLK] = &gcc_sys_noc_usb3_axi_clk.clkr,
- [GCC_TSIF_AHB_CLK] = &gcc_tsif_ahb_clk.clkr,
- [GCC_TSIF_REF_CLK] = &gcc_tsif_ref_clk.clkr,
- [GCC_USB2A_PHY_SLEEP_CLK] = &gcc_usb2a_phy_sleep_clk.clkr,
- [GCC_USB2B_PHY_SLEEP_CLK] = &gcc_usb2b_phy_sleep_clk.clkr,
- [GCC_USB30_MASTER_CLK] = &gcc_usb30_master_clk.clkr,
- [GCC_USB30_MOCK_UTMI_CLK] = &gcc_usb30_mock_utmi_clk.clkr,
- [GCC_USB30_SLEEP_CLK] = &gcc_usb30_sleep_clk.clkr,
- [GCC_USB_HS_AHB_CLK] = &gcc_usb_hs_ahb_clk.clkr,
- [GCC_USB_HS_SYSTEM_CLK] = &gcc_usb_hs_system_clk.clkr,
- [GCC_USB_HSIC_AHB_CLK] = &gcc_usb_hsic_ahb_clk.clkr,
- [GCC_USB_HSIC_CLK] = &gcc_usb_hsic_clk.clkr,
- [GCC_USB_HSIC_IO_CAL_CLK] = &gcc_usb_hsic_io_cal_clk.clkr,
- [GCC_USB_HSIC_IO_CAL_SLEEP_CLK] = &gcc_usb_hsic_io_cal_sleep_clk.clkr,
- [GCC_USB_HSIC_SYSTEM_CLK] = &gcc_usb_hsic_system_clk.clkr,
- [GCC_MMSS_GPLL0_CLK_SRC] = &gcc_mmss_gpll0_clk_src,
- [GPLL4] = NULL,
- [GPLL4_VOTE] = NULL,
- [GCC_SDCC1_CDCCAL_SLEEP_CLK] = NULL,
- [GCC_SDCC1_CDCCAL_FF_CLK] = NULL,
- };
- static const struct qcom_reset_map gcc_msm8974_resets[] = {
- [GCC_SYSTEM_NOC_BCR] = { 0x0100 },
- [GCC_CONFIG_NOC_BCR] = { 0x0140 },
- [GCC_PERIPH_NOC_BCR] = { 0x0180 },
- [GCC_IMEM_BCR] = { 0x0200 },
- [GCC_MMSS_BCR] = { 0x0240 },
- [GCC_QDSS_BCR] = { 0x0300 },
- [GCC_USB_30_BCR] = { 0x03c0 },
- [GCC_USB3_PHY_BCR] = { 0x03fc },
- [GCC_USB_HS_HSIC_BCR] = { 0x0400 },
- [GCC_USB_HS_BCR] = { 0x0480 },
- [GCC_USB2A_PHY_BCR] = { 0x04a8 },
- [GCC_USB2B_PHY_BCR] = { 0x04b0 },
- [GCC_SDCC1_BCR] = { 0x04c0 },
- [GCC_SDCC2_BCR] = { 0x0500 },
- [GCC_SDCC3_BCR] = { 0x0540 },
- [GCC_SDCC4_BCR] = { 0x0580 },
- [GCC_BLSP1_BCR] = { 0x05c0 },
- [GCC_BLSP1_QUP1_BCR] = { 0x0640 },
- [GCC_BLSP1_UART1_BCR] = { 0x0680 },
- [GCC_BLSP1_QUP2_BCR] = { 0x06c0 },
- [GCC_BLSP1_UART2_BCR] = { 0x0700 },
- [GCC_BLSP1_QUP3_BCR] = { 0x0740 },
- [GCC_BLSP1_UART3_BCR] = { 0x0780 },
- [GCC_BLSP1_QUP4_BCR] = { 0x07c0 },
- [GCC_BLSP1_UART4_BCR] = { 0x0800 },
- [GCC_BLSP1_QUP5_BCR] = { 0x0840 },
- [GCC_BLSP1_UART5_BCR] = { 0x0880 },
- [GCC_BLSP1_QUP6_BCR] = { 0x08c0 },
- [GCC_BLSP1_UART6_BCR] = { 0x0900 },
- [GCC_BLSP2_BCR] = { 0x0940 },
- [GCC_BLSP2_QUP1_BCR] = { 0x0980 },
- [GCC_BLSP2_UART1_BCR] = { 0x09c0 },
- [GCC_BLSP2_QUP2_BCR] = { 0x0a00 },
- [GCC_BLSP2_UART2_BCR] = { 0x0a40 },
- [GCC_BLSP2_QUP3_BCR] = { 0x0a80 },
- [GCC_BLSP2_UART3_BCR] = { 0x0ac0 },
- [GCC_BLSP2_QUP4_BCR] = { 0x0b00 },
- [GCC_BLSP2_UART4_BCR] = { 0x0b40 },
- [GCC_BLSP2_QUP5_BCR] = { 0x0b80 },
- [GCC_BLSP2_UART5_BCR] = { 0x0bc0 },
- [GCC_BLSP2_QUP6_BCR] = { 0x0c00 },
- [GCC_BLSP2_UART6_BCR] = { 0x0c40 },
- [GCC_PDM_BCR] = { 0x0cc0 },
- [GCC_BAM_DMA_BCR] = { 0x0d40 },
- [GCC_TSIF_BCR] = { 0x0d80 },
- [GCC_TCSR_BCR] = { 0x0dc0 },
- [GCC_BOOT_ROM_BCR] = { 0x0e00 },
- [GCC_MSG_RAM_BCR] = { 0x0e40 },
- [GCC_TLMM_BCR] = { 0x0e80 },
- [GCC_MPM_BCR] = { 0x0ec0 },
- [GCC_SEC_CTRL_BCR] = { 0x0f40 },
- [GCC_SPMI_BCR] = { 0x0fc0 },
- [GCC_SPDM_BCR] = { 0x1000 },
- [GCC_CE1_BCR] = { 0x1040 },
- [GCC_CE2_BCR] = { 0x1080 },
- [GCC_BIMC_BCR] = { 0x1100 },
- [GCC_MPM_NON_AHB_RESET] = { 0x0ec4, 2 },
- [GCC_MPM_AHB_RESET] = { 0x0ec4, 1 },
- [GCC_SNOC_BUS_TIMEOUT0_BCR] = { 0x1240 },
- [GCC_SNOC_BUS_TIMEOUT2_BCR] = { 0x1248 },
- [GCC_PNOC_BUS_TIMEOUT0_BCR] = { 0x1280 },
- [GCC_PNOC_BUS_TIMEOUT1_BCR] = { 0x1288 },
- [GCC_PNOC_BUS_TIMEOUT2_BCR] = { 0x1290 },
- [GCC_PNOC_BUS_TIMEOUT3_BCR] = { 0x1298 },
- [GCC_PNOC_BUS_TIMEOUT4_BCR] = { 0x12a0 },
- [GCC_CNOC_BUS_TIMEOUT0_BCR] = { 0x12c0 },
- [GCC_CNOC_BUS_TIMEOUT1_BCR] = { 0x12c8 },
- [GCC_CNOC_BUS_TIMEOUT2_BCR] = { 0x12d0 },
- [GCC_CNOC_BUS_TIMEOUT3_BCR] = { 0x12d8 },
- [GCC_CNOC_BUS_TIMEOUT4_BCR] = { 0x12e0 },
- [GCC_CNOC_BUS_TIMEOUT5_BCR] = { 0x12e8 },
- [GCC_CNOC_BUS_TIMEOUT6_BCR] = { 0x12f0 },
- [GCC_DEHR_BCR] = { 0x1300 },
- [GCC_RBCPR_BCR] = { 0x1380 },
- [GCC_MSS_RESTART] = { 0x1680 },
- [GCC_LPASS_RESTART] = { 0x16c0 },
- [GCC_WCSS_RESTART] = { 0x1700 },
- [GCC_VENUS_RESTART] = { 0x1740 },
- };
- static struct gdsc *gcc_msm8974_gdscs[] = {
- [USB_HS_HSIC_GDSC] = &usb_hs_hsic_gdsc,
- };
- static const struct regmap_config gcc_msm8974_regmap_config = {
- .reg_bits = 32,
- .reg_stride = 4,
- .val_bits = 32,
- .max_register = 0x1fc0,
- .fast_io = true,
- };
- static const struct qcom_cc_desc gcc_msm8974_desc = {
- .config = &gcc_msm8974_regmap_config,
- .clks = gcc_msm8974_clocks,
- .num_clks = ARRAY_SIZE(gcc_msm8974_clocks),
- .resets = gcc_msm8974_resets,
- .num_resets = ARRAY_SIZE(gcc_msm8974_resets),
- .gdscs = gcc_msm8974_gdscs,
- .num_gdscs = ARRAY_SIZE(gcc_msm8974_gdscs),
- };
- static const struct of_device_id gcc_msm8974_match_table[] = {
- { .compatible = "qcom,gcc-msm8974" },
- { .compatible = "qcom,gcc-msm8974pro" , .data = (void *)1UL },
- { .compatible = "qcom,gcc-msm8974pro-ac", .data = (void *)1UL },
- { }
- };
- MODULE_DEVICE_TABLE(of, gcc_msm8974_match_table);
- static void msm8974_pro_clock_override(void)
- {
- sdcc1_apps_clk_src_init.parent_names = gcc_xo_gpll0_gpll4;
- sdcc1_apps_clk_src_init.num_parents = 3;
- sdcc1_apps_clk_src.freq_tbl = ftbl_gcc_sdcc1_apps_clk_pro;
- sdcc1_apps_clk_src.parent_map = gcc_xo_gpll0_gpll4_map;
- gcc_msm8974_clocks[GPLL4] = &gpll4.clkr;
- gcc_msm8974_clocks[GPLL4_VOTE] = &gpll4_vote;
- gcc_msm8974_clocks[GCC_SDCC1_CDCCAL_SLEEP_CLK] =
- &gcc_sdcc1_cdccal_sleep_clk.clkr;
- gcc_msm8974_clocks[GCC_SDCC1_CDCCAL_FF_CLK] =
- &gcc_sdcc1_cdccal_ff_clk.clkr;
- }
- static int gcc_msm8974_probe(struct platform_device *pdev)
- {
- struct clk *clk;
- struct device *dev = &pdev->dev;
- bool pro;
- const struct of_device_id *id;
- id = of_match_device(gcc_msm8974_match_table, dev);
- if (!id)
- return -ENODEV;
- pro = !!(id->data);
- if (pro)
- msm8974_pro_clock_override();
- /* Temporary until RPM clocks supported */
- clk = clk_register_fixed_rate(dev, "xo", NULL, CLK_IS_ROOT, 19200000);
- if (IS_ERR(clk))
- return PTR_ERR(clk);
- /* Should move to DT node? */
- clk = clk_register_fixed_rate(dev, "sleep_clk_src", NULL,
- CLK_IS_ROOT, 32768);
- if (IS_ERR(clk))
- return PTR_ERR(clk);
- return qcom_cc_probe(pdev, &gcc_msm8974_desc);
- }
- static struct platform_driver gcc_msm8974_driver = {
- .probe = gcc_msm8974_probe,
- .driver = {
- .name = "gcc-msm8974",
- .of_match_table = gcc_msm8974_match_table,
- },
- };
- static int __init gcc_msm8974_init(void)
- {
- return platform_driver_register(&gcc_msm8974_driver);
- }
- core_initcall(gcc_msm8974_init);
- static void __exit gcc_msm8974_exit(void)
- {
- platform_driver_unregister(&gcc_msm8974_driver);
- }
- module_exit(gcc_msm8974_exit);
- MODULE_DESCRIPTION("QCOM GCC MSM8974 Driver");
- MODULE_LICENSE("GPL v2");
- MODULE_ALIAS("platform:gcc-msm8974");
|