11.1Sjmcneill/* $NetBSD: hi6220-clock.h,v 1.1.1.4 2020/01/03 14:33:04 skrll Exp $ */ 21.1Sjmcneill 31.1.1.4Sskrll/* SPDX-License-Identifier: GPL-2.0-only */ 41.1Sjmcneill/* 51.1Sjmcneill * Copyright (c) 2015 Hisilicon Limited. 61.1Sjmcneill * 71.1Sjmcneill * Author: Bintian Wang <bintian.wang@huawei.com> 81.1Sjmcneill */ 91.1Sjmcneill 101.1Sjmcneill#ifndef __DT_BINDINGS_CLOCK_HI6220_H 111.1Sjmcneill#define __DT_BINDINGS_CLOCK_HI6220_H 121.1Sjmcneill 131.1Sjmcneill/* clk in Hi6220 AO (always on) controller */ 141.1Sjmcneill#define HI6220_NONE_CLOCK 0 151.1Sjmcneill 161.1Sjmcneill/* fixed rate clocks */ 171.1Sjmcneill#define HI6220_REF32K 1 181.1Sjmcneill#define HI6220_CLK_TCXO 2 191.1Sjmcneill#define HI6220_MMC1_PAD 3 201.1Sjmcneill#define HI6220_MMC2_PAD 4 211.1Sjmcneill#define HI6220_MMC0_PAD 5 221.1Sjmcneill#define HI6220_PLL_BBP 6 231.1Sjmcneill#define HI6220_PLL_GPU 7 241.1Sjmcneill#define HI6220_PLL1_DDR 8 251.1Sjmcneill#define HI6220_PLL_SYS 9 261.1Sjmcneill#define HI6220_PLL_SYS_MEDIA 10 271.1Sjmcneill#define HI6220_DDR_SRC 11 281.1Sjmcneill#define HI6220_PLL_MEDIA 12 291.1Sjmcneill#define HI6220_PLL_DDR 13 301.1Sjmcneill 311.1Sjmcneill/* fixed factor clocks */ 321.1Sjmcneill#define HI6220_300M 14 331.1Sjmcneill#define HI6220_150M 15 341.1Sjmcneill#define HI6220_PICOPHY_SRC 16 351.1Sjmcneill#define HI6220_MMC0_SRC_SEL 17 361.1Sjmcneill#define HI6220_MMC1_SRC_SEL 18 371.1Sjmcneill#define HI6220_MMC2_SRC_SEL 19 381.1Sjmcneill#define HI6220_VPU_CODEC 20 391.1Sjmcneill#define HI6220_MMC0_SMP 21 401.1Sjmcneill#define HI6220_MMC1_SMP 22 411.1Sjmcneill#define HI6220_MMC2_SMP 23 421.1Sjmcneill 431.1Sjmcneill/* gate clocks */ 441.1Sjmcneill#define HI6220_WDT0_PCLK 24 451.1Sjmcneill#define HI6220_WDT1_PCLK 25 461.1Sjmcneill#define HI6220_WDT2_PCLK 26 471.1Sjmcneill#define HI6220_TIMER0_PCLK 27 481.1Sjmcneill#define HI6220_TIMER1_PCLK 28 491.1Sjmcneill#define HI6220_TIMER2_PCLK 29 501.1Sjmcneill#define HI6220_TIMER3_PCLK 30 511.1Sjmcneill#define HI6220_TIMER4_PCLK 31 521.1Sjmcneill#define HI6220_TIMER5_PCLK 32 531.1Sjmcneill#define HI6220_TIMER6_PCLK 33 541.1Sjmcneill#define HI6220_TIMER7_PCLK 34 551.1Sjmcneill#define HI6220_TIMER8_PCLK 35 561.1Sjmcneill#define HI6220_UART0_PCLK 36 571.1Sjmcneill#define HI6220_RTC0_PCLK 37 581.1Sjmcneill#define HI6220_RTC1_PCLK 38 591.1Sjmcneill#define HI6220_AO_NR_CLKS 39 601.1Sjmcneill 611.1Sjmcneill/* clk in Hi6220 systrl */ 621.1Sjmcneill/* gate clock */ 631.1Sjmcneill#define HI6220_MMC0_CLK 1 641.1Sjmcneill#define HI6220_MMC0_CIUCLK 2 651.1Sjmcneill#define HI6220_MMC1_CLK 3 661.1Sjmcneill#define HI6220_MMC1_CIUCLK 4 671.1Sjmcneill#define HI6220_MMC2_CLK 5 681.1Sjmcneill#define HI6220_MMC2_CIUCLK 6 691.1Sjmcneill#define HI6220_USBOTG_HCLK 7 701.1Sjmcneill#define HI6220_CLK_PICOPHY 8 711.1Sjmcneill#define HI6220_HIFI 9 721.1Sjmcneill#define HI6220_DACODEC_PCLK 10 731.1Sjmcneill#define HI6220_EDMAC_ACLK 11 741.1Sjmcneill#define HI6220_CS_ATB 12 751.1Sjmcneill#define HI6220_I2C0_CLK 13 761.1Sjmcneill#define HI6220_I2C1_CLK 14 771.1Sjmcneill#define HI6220_I2C2_CLK 15 781.1Sjmcneill#define HI6220_I2C3_CLK 16 791.1Sjmcneill#define HI6220_UART1_PCLK 17 801.1Sjmcneill#define HI6220_UART2_PCLK 18 811.1Sjmcneill#define HI6220_UART3_PCLK 19 821.1Sjmcneill#define HI6220_UART4_PCLK 20 831.1Sjmcneill#define HI6220_SPI_CLK 21 841.1Sjmcneill#define HI6220_TSENSOR_CLK 22 851.1Sjmcneill#define HI6220_MMU_CLK 23 861.1Sjmcneill#define HI6220_HIFI_SEL 24 871.1Sjmcneill#define HI6220_MMC0_SYSPLL 25 881.1Sjmcneill#define HI6220_MMC1_SYSPLL 26 891.1Sjmcneill#define HI6220_MMC2_SYSPLL 27 901.1Sjmcneill#define HI6220_MMC0_SEL 28 911.1Sjmcneill#define HI6220_MMC1_SEL 29 921.1Sjmcneill#define HI6220_BBPPLL_SEL 30 931.1Sjmcneill#define HI6220_MEDIA_PLL_SRC 31 941.1Sjmcneill#define HI6220_MMC2_SEL 32 951.1Sjmcneill#define HI6220_CS_ATB_SYSPLL 33 961.1Sjmcneill 971.1Sjmcneill/* mux clocks */ 981.1Sjmcneill#define HI6220_MMC0_SRC 34 991.1Sjmcneill#define HI6220_MMC0_SMP_IN 35 1001.1Sjmcneill#define HI6220_MMC1_SRC 36 1011.1Sjmcneill#define HI6220_MMC1_SMP_IN 37 1021.1Sjmcneill#define HI6220_MMC2_SRC 38 1031.1Sjmcneill#define HI6220_MMC2_SMP_IN 39 1041.1Sjmcneill#define HI6220_HIFI_SRC 40 1051.1Sjmcneill#define HI6220_UART1_SRC 41 1061.1Sjmcneill#define HI6220_UART2_SRC 42 1071.1Sjmcneill#define HI6220_UART3_SRC 43 1081.1Sjmcneill#define HI6220_UART4_SRC 44 1091.1Sjmcneill#define HI6220_MMC0_MUX0 45 1101.1Sjmcneill#define HI6220_MMC1_MUX0 46 1111.1Sjmcneill#define HI6220_MMC2_MUX0 47 1121.1Sjmcneill#define HI6220_MMC0_MUX1 48 1131.1Sjmcneill#define HI6220_MMC1_MUX1 49 1141.1Sjmcneill#define HI6220_MMC2_MUX1 50 1151.1Sjmcneill 1161.1Sjmcneill/* divider clocks */ 1171.1Sjmcneill#define HI6220_CLK_BUS 51 1181.1Sjmcneill#define HI6220_MMC0_DIV 52 1191.1Sjmcneill#define HI6220_MMC1_DIV 53 1201.1Sjmcneill#define HI6220_MMC2_DIV 54 1211.1Sjmcneill#define HI6220_HIFI_DIV 55 1221.1Sjmcneill#define HI6220_BBPPLL0_DIV 56 1231.1Sjmcneill#define HI6220_CS_DAPB 57 1241.1Sjmcneill#define HI6220_CS_ATB_DIV 58 1251.1Sjmcneill 1261.1.1.2Sjmcneill/* gate clock */ 1271.1.1.2Sjmcneill#define HI6220_DAPB_CLK 59 1281.1.1.2Sjmcneill 1291.1.1.2Sjmcneill#define HI6220_SYS_NR_CLKS 60 1301.1Sjmcneill 1311.1Sjmcneill/* clk in Hi6220 media controller */ 1321.1Sjmcneill/* gate clocks */ 1331.1Sjmcneill#define HI6220_DSI_PCLK 1 1341.1Sjmcneill#define HI6220_G3D_PCLK 2 1351.1Sjmcneill#define HI6220_ACLK_CODEC_VPU 3 1361.1Sjmcneill#define HI6220_ISP_SCLK 4 1371.1Sjmcneill#define HI6220_ADE_CORE 5 1381.1Sjmcneill#define HI6220_MED_MMU 6 1391.1Sjmcneill#define HI6220_CFG_CSI4PHY 7 1401.1Sjmcneill#define HI6220_CFG_CSI2PHY 8 1411.1Sjmcneill#define HI6220_ISP_SCLK_GATE 9 1421.1Sjmcneill#define HI6220_ISP_SCLK_GATE1 10 1431.1Sjmcneill#define HI6220_ADE_CORE_GATE 11 1441.1Sjmcneill#define HI6220_CODEC_VPU_GATE 12 1451.1Sjmcneill#define HI6220_MED_SYSPLL 13 1461.1Sjmcneill 1471.1Sjmcneill/* mux clocks */ 1481.1Sjmcneill#define HI6220_1440_1200 14 1491.1Sjmcneill#define HI6220_1000_1200 15 1501.1Sjmcneill#define HI6220_1000_1440 16 1511.1Sjmcneill 1521.1Sjmcneill/* divider clocks */ 1531.1Sjmcneill#define HI6220_CODEC_JPEG 17 1541.1Sjmcneill#define HI6220_ISP_SCLK_SRC 18 1551.1Sjmcneill#define HI6220_ISP_SCLK1 19 1561.1Sjmcneill#define HI6220_ADE_CORE_SRC 20 1571.1Sjmcneill#define HI6220_ADE_PIX_SRC 21 1581.1Sjmcneill#define HI6220_G3D_CLK 22 1591.1Sjmcneill#define HI6220_CODEC_VPU_SRC 23 1601.1Sjmcneill 1611.1Sjmcneill#define HI6220_MEDIA_NR_CLKS 24 1621.1Sjmcneill 1631.1Sjmcneill/* clk in Hi6220 power controller */ 1641.1Sjmcneill/* gate clocks */ 1651.1Sjmcneill#define HI6220_PLL_GPU_GATE 1 1661.1Sjmcneill#define HI6220_PLL1_DDR_GATE 2 1671.1Sjmcneill#define HI6220_PLL_DDR_GATE 3 1681.1Sjmcneill#define HI6220_PLL_MEDIA_GATE 4 1691.1Sjmcneill#define HI6220_PLL0_BBP_GATE 5 1701.1Sjmcneill 1711.1Sjmcneill/* divider clocks */ 1721.1Sjmcneill#define HI6220_DDRC_SRC 6 1731.1Sjmcneill#define HI6220_DDRC_AXI1 7 1741.1Sjmcneill 1751.1Sjmcneill#define HI6220_POWER_NR_CLKS 8 1761.1.1.3Sjmcneill 1771.1.1.3Sjmcneill/* clk in Hi6220 acpu sctrl */ 1781.1.1.3Sjmcneill#define HI6220_ACPU_SFT_AT_S 0 1791.1.1.3Sjmcneill 1801.1Sjmcneill#endif 181