162306a36Sopenharmony_ci#ifndef MMSS_CC_XML 262306a36Sopenharmony_ci#define MMSS_CC_XML 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci/* Autogenerated file, DO NOT EDIT manually! 562306a36Sopenharmony_ci 662306a36Sopenharmony_ciThis file was generated by the rules-ng-ng headergen tool in this git repository: 762306a36Sopenharmony_cihttp://github.com/freedreno/envytools/ 862306a36Sopenharmony_cigit clone https://github.com/freedreno/envytools.git 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ciThe rules-ng-ng source files this header was generated from are: 1162306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) 1262306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) 1362306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) 1462306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) 1562306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) 1662306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) 1762306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) 1862306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) 1962306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) 2062306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) 2162306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) 2262306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) 2362306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) 2462306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) 2562306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) 2662306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) 2762306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) 2862306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ciCopyright (C) 2013-2022 by the following authors: 3162306a36Sopenharmony_ci- Rob Clark <robdclark@gmail.com> (robclark) 3262306a36Sopenharmony_ci- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin) 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ciPermission is hereby granted, free of charge, to any person obtaining 3562306a36Sopenharmony_cia copy of this software and associated documentation files (the 3662306a36Sopenharmony_ci"Software"), to deal in the Software without restriction, including 3762306a36Sopenharmony_ciwithout limitation the rights to use, copy, modify, merge, publish, 3862306a36Sopenharmony_cidistribute, sublicense, and/or sell copies of the Software, and to 3962306a36Sopenharmony_cipermit persons to whom the Software is furnished to do so, subject to 4062306a36Sopenharmony_cithe following conditions: 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ciThe above copyright notice and this permission notice (including the 4362306a36Sopenharmony_cinext paragraph) shall be included in all copies or substantial 4462306a36Sopenharmony_ciportions of the Software. 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ciTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 4762306a36Sopenharmony_ciEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 4862306a36Sopenharmony_ciMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 4962306a36Sopenharmony_ciIN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE 5062306a36Sopenharmony_ciLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 5162306a36Sopenharmony_ciOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 5262306a36Sopenharmony_ciWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 5362306a36Sopenharmony_ci*/ 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_cienum mmss_cc_clk { 5762306a36Sopenharmony_ci CLK = 0, 5862306a36Sopenharmony_ci PCLK = 1, 5962306a36Sopenharmony_ci}; 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ci#define REG_MMSS_CC_AHB 0x00000008 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_cistatic inline uint32_t __offset_CLK(enum mmss_cc_clk idx) 6462306a36Sopenharmony_ci{ 6562306a36Sopenharmony_ci switch (idx) { 6662306a36Sopenharmony_ci case CLK: return 0x0000004c; 6762306a36Sopenharmony_ci case PCLK: return 0x00000130; 6862306a36Sopenharmony_ci default: return INVALID_IDX(idx); 6962306a36Sopenharmony_ci } 7062306a36Sopenharmony_ci} 7162306a36Sopenharmony_cistatic inline uint32_t REG_MMSS_CC_CLK(enum mmss_cc_clk i0) { return 0x00000000 + __offset_CLK(i0); } 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_cistatic inline uint32_t REG_MMSS_CC_CLK_CC(enum mmss_cc_clk i0) { return 0x00000000 + __offset_CLK(i0); } 7462306a36Sopenharmony_ci#define MMSS_CC_CLK_CC_CLK_EN 0x00000001 7562306a36Sopenharmony_ci#define MMSS_CC_CLK_CC_ROOT_EN 0x00000004 7662306a36Sopenharmony_ci#define MMSS_CC_CLK_CC_MND_EN 0x00000020 7762306a36Sopenharmony_ci#define MMSS_CC_CLK_CC_MND_MODE__MASK 0x000000c0 7862306a36Sopenharmony_ci#define MMSS_CC_CLK_CC_MND_MODE__SHIFT 6 7962306a36Sopenharmony_cistatic inline uint32_t MMSS_CC_CLK_CC_MND_MODE(uint32_t val) 8062306a36Sopenharmony_ci{ 8162306a36Sopenharmony_ci return ((val) << MMSS_CC_CLK_CC_MND_MODE__SHIFT) & MMSS_CC_CLK_CC_MND_MODE__MASK; 8262306a36Sopenharmony_ci} 8362306a36Sopenharmony_ci#define MMSS_CC_CLK_CC_PMXO_SEL__MASK 0x00000300 8462306a36Sopenharmony_ci#define MMSS_CC_CLK_CC_PMXO_SEL__SHIFT 8 8562306a36Sopenharmony_cistatic inline uint32_t MMSS_CC_CLK_CC_PMXO_SEL(uint32_t val) 8662306a36Sopenharmony_ci{ 8762306a36Sopenharmony_ci return ((val) << MMSS_CC_CLK_CC_PMXO_SEL__SHIFT) & MMSS_CC_CLK_CC_PMXO_SEL__MASK; 8862306a36Sopenharmony_ci} 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_cistatic inline uint32_t REG_MMSS_CC_CLK_MD(enum mmss_cc_clk i0) { return 0x00000004 + __offset_CLK(i0); } 9162306a36Sopenharmony_ci#define MMSS_CC_CLK_MD_D__MASK 0x000000ff 9262306a36Sopenharmony_ci#define MMSS_CC_CLK_MD_D__SHIFT 0 9362306a36Sopenharmony_cistatic inline uint32_t MMSS_CC_CLK_MD_D(uint32_t val) 9462306a36Sopenharmony_ci{ 9562306a36Sopenharmony_ci return ((val) << MMSS_CC_CLK_MD_D__SHIFT) & MMSS_CC_CLK_MD_D__MASK; 9662306a36Sopenharmony_ci} 9762306a36Sopenharmony_ci#define MMSS_CC_CLK_MD_M__MASK 0x0000ff00 9862306a36Sopenharmony_ci#define MMSS_CC_CLK_MD_M__SHIFT 8 9962306a36Sopenharmony_cistatic inline uint32_t MMSS_CC_CLK_MD_M(uint32_t val) 10062306a36Sopenharmony_ci{ 10162306a36Sopenharmony_ci return ((val) << MMSS_CC_CLK_MD_M__SHIFT) & MMSS_CC_CLK_MD_M__MASK; 10262306a36Sopenharmony_ci} 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_cistatic inline uint32_t REG_MMSS_CC_CLK_NS(enum mmss_cc_clk i0) { return 0x00000008 + __offset_CLK(i0); } 10562306a36Sopenharmony_ci#define MMSS_CC_CLK_NS_SRC__MASK 0x0000000f 10662306a36Sopenharmony_ci#define MMSS_CC_CLK_NS_SRC__SHIFT 0 10762306a36Sopenharmony_cistatic inline uint32_t MMSS_CC_CLK_NS_SRC(uint32_t val) 10862306a36Sopenharmony_ci{ 10962306a36Sopenharmony_ci return ((val) << MMSS_CC_CLK_NS_SRC__SHIFT) & MMSS_CC_CLK_NS_SRC__MASK; 11062306a36Sopenharmony_ci} 11162306a36Sopenharmony_ci#define MMSS_CC_CLK_NS_PRE_DIV_FUNC__MASK 0x00fff000 11262306a36Sopenharmony_ci#define MMSS_CC_CLK_NS_PRE_DIV_FUNC__SHIFT 12 11362306a36Sopenharmony_cistatic inline uint32_t MMSS_CC_CLK_NS_PRE_DIV_FUNC(uint32_t val) 11462306a36Sopenharmony_ci{ 11562306a36Sopenharmony_ci return ((val) << MMSS_CC_CLK_NS_PRE_DIV_FUNC__SHIFT) & MMSS_CC_CLK_NS_PRE_DIV_FUNC__MASK; 11662306a36Sopenharmony_ci} 11762306a36Sopenharmony_ci#define MMSS_CC_CLK_NS_VAL__MASK 0xff000000 11862306a36Sopenharmony_ci#define MMSS_CC_CLK_NS_VAL__SHIFT 24 11962306a36Sopenharmony_cistatic inline uint32_t MMSS_CC_CLK_NS_VAL(uint32_t val) 12062306a36Sopenharmony_ci{ 12162306a36Sopenharmony_ci return ((val) << MMSS_CC_CLK_NS_VAL__SHIFT) & MMSS_CC_CLK_NS_VAL__MASK; 12262306a36Sopenharmony_ci} 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ci#define REG_MMSS_CC_DSI2_PIXEL_CC 0x00000094 12562306a36Sopenharmony_ci 12662306a36Sopenharmony_ci#define REG_MMSS_CC_DSI2_PIXEL_NS 0x000000e4 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ci#define REG_MMSS_CC_DSI2_PIXEL_CC2 0x00000264 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci 13162306a36Sopenharmony_ci#endif /* MMSS_CC_XML */ 132