···11-* Hisilicon Hi3519 Clock and Reset Generator(CRG)11+* HiSilicon Clock and Reset Generator(CRG)2233-The Hi3519 CRG module provides clock and reset signals to various44-controllers within the SoC.33+The CRG module provides clock and reset signals to various44+modules within the SoC.5566This binding uses the following bindings:77 Documentation/devicetree/bindings/clock/clock-bindings.txt···1010Required Properties:11111212- compatible: should be one of the following.1313- - "hisilicon,hi3519-crg" - controller compatible with Hi3519 SoC.1313+ - "hisilicon,hi3516cv300-crg"1414+ - "hisilicon,hi3516cv300-sysctrl"1515+ - "hisilicon,hi3519-crg"1616+ - "hisilicon,hi3798cv200-crg"1717+ - "hisilicon,hi3798cv200-sysctrl"14181519- reg: physical base address of the controller and length of memory mapped1620 region.
+16
drivers/clk/hisilicon/Kconfig
···11+config COMMON_CLK_HI3516CV30022+ tristate "HI3516CV300 Clock Driver"33+ depends on ARCH_HISI || COMPILE_TEST44+ select RESET_HISI55+ default ARCH_HISI66+ help77+ Build the clock driver for hi3516cv300.88+19config COMMON_CLK_HI3519210 tristate "Hi3519 Clock Driver"311 depends on ARCH_HISI || COMPILE_TEST···135 default ARCH_HISI146 help157 Build the clock driver for hi3519.88+99+config COMMON_CLK_HI3798CV2001010+ tristate "Hi3798CV200 Clock Driver"1111+ depends on ARCH_HISI || COMPILE_TEST1212+ select RESET_HISI1313+ default ARCH_HISI1414+ help1515+ Build the clock driver for hi3798cv200.16161717config COMMON_CLK_HI62201818 bool "Hi6220 Clock Driver"
···11+/*22+ * HiSilicon Clock and Reset Driver Header33+ *44+ * Copyright (c) 2016 HiSilicon Limited.55+ *66+ * This program is free software; you can redistribute it and/or modify77+ * it under the terms of the GNU General Public License as published by88+ * the Free Software Foundation; either version 2 of the License, or99+ * (at your option) any later version.1010+ *1111+ * This program is distributed in the hope that it will be useful,1212+ * but WITHOUT ANY WARRANTY; without even the implied warranty of1313+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1414+ * GNU General Public License for more details.1515+ */1616+1717+#ifndef __HISI_CRG_H1818+#define __HISI_CRG_H1919+2020+struct hisi_clock_data;2121+struct hisi_reset_controller;2222+2323+struct hisi_crg_funcs {2424+ struct hisi_clock_data* (*register_clks)(struct platform_device *pdev);2525+ void (*unregister_clks)(struct platform_device *pdev);2626+};2727+2828+struct hisi_crg_dev {2929+ struct hisi_clock_data *clk_data;3030+ struct hisi_reset_controller *rstc;3131+ const struct hisi_crg_funcs *funcs;3232+};3333+3434+#endif /* __HISI_CRG_H */
+48
include/dt-bindings/clock/hi3516cv300-clock.h
···11+/*22+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.33+ *44+ * This program is free software; you can redistribute it and/or modify55+ * it under the terms of the GNU General Public License as published by66+ * the Free Software Foundation; either version 2 of the License, or77+ * (at your option) any later version.88+ *99+ * This program is distributed in the hope that it will be useful,1010+ * but WITHOUT ANY WARRANTY; without even the implied warranty of1111+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1212+ * GNU General Public License for more details.1313+ *1414+ * You should have received a copy of the GNU General Public License1515+ * along with this program. If not, see <http://www.gnu.org/licenses/>.1616+ */1717+1818+#ifndef __DTS_HI3516CV300_CLOCK_H1919+#define __DTS_HI3516CV300_CLOCK_H2020+2121+/* hi3516CV300 core CRG */2222+#define HI3516CV300_APB_CLK 02323+#define HI3516CV300_UART0_CLK 12424+#define HI3516CV300_UART1_CLK 22525+#define HI3516CV300_UART2_CLK 32626+#define HI3516CV300_SPI0_CLK 42727+#define HI3516CV300_SPI1_CLK 52828+#define HI3516CV300_FMC_CLK 62929+#define HI3516CV300_MMC0_CLK 73030+#define HI3516CV300_MMC1_CLK 83131+#define HI3516CV300_MMC2_CLK 93232+#define HI3516CV300_MMC3_CLK 103333+#define HI3516CV300_ETH_CLK 113434+#define HI3516CV300_ETH_MACIF_CLK 123535+#define HI3516CV300_DMAC_CLK 133636+#define HI3516CV300_PWM_CLK 143737+#define HI3516CV300_USB2_BUS_CLK 153838+#define HI3516CV300_USB2_OHCI48M_CLK 163939+#define HI3516CV300_USB2_OHCI12M_CLK 174040+#define HI3516CV300_USB2_OTG_UTMI_CLK 184141+#define HI3516CV300_USB2_HST_PHY_CLK 194242+#define HI3516CV300_USB2_UTMI0_CLK 204343+#define HI3516CV300_USB2_PHY_CLK 214444+4545+/* hi3516CV300 sysctrl CRG */4646+#define HI3516CV300_WDT_CLK 14747+4848+#endif /* __DTS_HI3516CV300_CLOCK_H */
+66
include/dt-bindings/clock/histb-clock.h
···11+/*22+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.33+ *44+ * This program is free software; you can redistribute it and/or modify55+ * it under the terms of the GNU General Public License as published by66+ * the Free Software Foundation; either version 2 of the License, or77+ * (at your option) any later version.88+ *99+ * This program is distributed in the hope that it will be useful,1010+ * but WITHOUT ANY WARRANTY; without even the implied warranty of1111+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1212+ * GNU General Public License for more details.1313+ *1414+ * You should have received a copy of the GNU General Public License1515+ * along with this program. If not, see <http://www.gnu.org/licenses/>.1616+ */1717+1818+#ifndef __DTS_HISTB_CLOCK_H1919+#define __DTS_HISTB_CLOCK_H2020+2121+/* clocks provided by core CRG */2222+#define HISTB_OSC_CLK 02323+#define HISTB_APB_CLK 12424+#define HISTB_AHB_CLK 22525+#define HISTB_UART1_CLK 32626+#define HISTB_UART2_CLK 42727+#define HISTB_UART3_CLK 52828+#define HISTB_I2C0_CLK 62929+#define HISTB_I2C1_CLK 73030+#define HISTB_I2C2_CLK 83131+#define HISTB_I2C3_CLK 93232+#define HISTB_I2C4_CLK 103333+#define HISTB_I2C5_CLK 113434+#define HISTB_SPI0_CLK 123535+#define HISTB_SPI1_CLK 133636+#define HISTB_SPI2_CLK 143737+#define HISTB_SCI_CLK 153838+#define HISTB_FMC_CLK 163939+#define HISTB_MMC_BIU_CLK 174040+#define HISTB_MMC_CIU_CLK 184141+#define HISTB_MMC_DRV_CLK 194242+#define HISTB_MMC_SAMPLE_CLK 204343+#define HISTB_SDIO0_BIU_CLK 214444+#define HISTB_SDIO0_CIU_CLK 224545+#define HISTB_SDIO0_DRV_CLK 234646+#define HISTB_SDIO0_SAMPLE_CLK 244747+#define HISTB_PCIE_AUX_CLK 254848+#define HISTB_PCIE_PIPE_CLK 264949+#define HISTB_PCIE_SYS_CLK 275050+#define HISTB_PCIE_BUS_CLK 285151+#define HISTB_ETH0_MAC_CLK 295252+#define HISTB_ETH0_MACIF_CLK 305353+#define HISTB_ETH1_MAC_CLK 315454+#define HISTB_ETH1_MACIF_CLK 325555+#define HISTB_COMBPHY1_CLK 335656+5757+5858+/* clocks provided by mcu CRG */5959+#define HISTB_MCE_CLK 16060+#define HISTB_IR_CLK 26161+#define HISTB_TIMER01_CLK 36262+#define HISTB_LEDC_CLK 46363+#define HISTB_UART0_CLK 56464+#define HISTB_LSADC_CLK 66565+6666+#endif /* __DTS_HISTB_CLOCK_H */