Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: clock: Add StarFive JH7110 always-on clock and reset generator

Add bindings for the always-on clock and reset generator (AONCRG) on the
JH7110 RISC-V SoC by StarFive Ltd.

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

authored by

Emil Renner Berthing and committed by
Conor Dooley
3de0c910 7fce1e39

+137
+107
Documentation/devicetree/bindings/clock/starfive,jh7110-aoncrg.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/starfive,jh7110-aoncrg.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: StarFive JH7110 Always-On Clock and Reset Generator 8 + 9 + maintainers: 10 + - Emil Renner Berthing <kernel@esmil.dk> 11 + 12 + properties: 13 + compatible: 14 + const: starfive,jh7110-aoncrg 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + clocks: 20 + oneOf: 21 + - items: 22 + - description: Main Oscillator (24 MHz) 23 + - description: GMAC0 RMII reference or GMAC0 RGMII RX 24 + - description: STG AXI/AHB 25 + - description: APB Bus 26 + - description: GMAC0 GTX 27 + 28 + - items: 29 + - description: Main Oscillator (24 MHz) 30 + - description: GMAC0 RMII reference or GMAC0 RGMII RX 31 + - description: STG AXI/AHB or GMAC0 RGMII RX 32 + - description: APB Bus or STG AXI/AHB 33 + - description: GMAC0 GTX or APB Bus 34 + - description: RTC Oscillator (32.768 kHz) or GMAC0 GTX 35 + 36 + - items: 37 + - description: Main Oscillator (24 MHz) 38 + - description: GMAC0 RMII reference 39 + - description: GMAC0 RGMII RX 40 + - description: STG AXI/AHB 41 + - description: APB Bus 42 + - description: GMAC0 GTX 43 + - description: RTC Oscillator (32.768 kHz) 44 + 45 + clock-names: 46 + oneOf: 47 + - minItems: 5 48 + items: 49 + - const: osc 50 + - enum: 51 + - gmac0_rmii_refin 52 + - gmac0_rgmii_rxin 53 + - const: stg_axiahb 54 + - const: apb_bus 55 + - const: gmac0_gtxclk 56 + - const: rtc_osc 57 + 58 + - minItems: 6 59 + items: 60 + - const: osc 61 + - const: gmac0_rmii_refin 62 + - const: gmac0_rgmii_rxin 63 + - const: stg_axiahb 64 + - const: apb_bus 65 + - const: gmac0_gtxclk 66 + - const: rtc_osc 67 + 68 + '#clock-cells': 69 + const: 1 70 + description: 71 + See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices. 72 + 73 + '#reset-cells': 74 + const: 1 75 + description: 76 + See <dt-bindings/reset/starfive,jh7110-crg.h> for valid indices. 77 + 78 + required: 79 + - compatible 80 + - reg 81 + - clocks 82 + - clock-names 83 + - '#clock-cells' 84 + - '#reset-cells' 85 + 86 + additionalProperties: false 87 + 88 + examples: 89 + - | 90 + #include <dt-bindings/clock/starfive,jh7110-crg.h> 91 + 92 + clock-controller@17000000 { 93 + compatible = "starfive,jh7110-aoncrg"; 94 + reg = <0x17000000 0x10000>; 95 + clocks = <&osc>, <&gmac0_rmii_refin>, 96 + <&gmac0_rgmii_rxin>, 97 + <&syscrg JH7110_SYSCLK_STG_AXIAHB>, 98 + <&syscrg JH7110_SYSCLK_APB_BUS>, 99 + <&syscrg JH7110_SYSCLK_GMAC0_GTXCLK>, 100 + <&rtc_osc>; 101 + clock-names = "osc", "gmac0_rmii_refin", 102 + "gmac0_rgmii_rxin", "stg_axiahb", 103 + "apb_bus", "gmac0_gtxclk", 104 + "rtc_osc"; 105 + #clock-cells = <1>; 106 + #reset-cells = <1>; 107 + };
+18
include/dt-bindings/clock/starfive,jh7110-crg.h
··· 200 200 201 201 #define JH7110_SYSCLK_END 190 202 202 203 + /* AONCRG clocks */ 204 + #define JH7110_AONCLK_OSC_DIV4 0 205 + #define JH7110_AONCLK_APB_FUNC 1 206 + #define JH7110_AONCLK_GMAC0_AHB 2 207 + #define JH7110_AONCLK_GMAC0_AXI 3 208 + #define JH7110_AONCLK_GMAC0_RMII_RTX 4 209 + #define JH7110_AONCLK_GMAC0_TX 5 210 + #define JH7110_AONCLK_GMAC0_TX_INV 6 211 + #define JH7110_AONCLK_GMAC0_RX 7 212 + #define JH7110_AONCLK_GMAC0_RX_INV 8 213 + #define JH7110_AONCLK_OTPC_APB 9 214 + #define JH7110_AONCLK_RTC_APB 10 215 + #define JH7110_AONCLK_RTC_INTERNAL 11 216 + #define JH7110_AONCLK_RTC_32K 12 217 + #define JH7110_AONCLK_RTC_CAL 13 218 + 219 + #define JH7110_AONCLK_END 14 220 + 203 221 #endif /* __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__ */
+12
include/dt-bindings/reset/starfive,jh7110-crg.h
··· 139 139 140 140 #define JH7110_SYSRST_END 126 141 141 142 + /* AONCRG resets */ 143 + #define JH7110_AONRST_GMAC0_AXI 0 144 + #define JH7110_AONRST_GMAC0_AHB 1 145 + #define JH7110_AONRST_IOMUX 2 146 + #define JH7110_AONRST_PMU_APB 3 147 + #define JH7110_AONRST_PMU_WKUP 4 148 + #define JH7110_AONRST_RTC_APB 5 149 + #define JH7110_AONRST_RTC_CAL 6 150 + #define JH7110_AONRST_RTC_32K 7 151 + 152 + #define JH7110_AONRST_END 8 153 + 142 154 #endif /* __DT_BINDINGS_RESET_STARFIVE_JH7110_CRG_H__ */