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

dt-bindings: clock: loongson2: Add Loongson-2K0300 compatible

Document the clock controller shipped in Loongson-2K0300 SoC, which
generates various clock signals for SoC peripherals. Differing from
previous generations of SoCs, LS2K0300 requires a 120MHz external clock
input.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Yao Zi and committed by
Stephen Boyd
793e6b74 8f5ae30d

+51 -3
+15 -3
Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml
··· 16 16 properties: 17 17 compatible: 18 18 enum: 19 + - loongson,ls2k0300-clk 19 20 - loongson,ls2k0500-clk 20 21 - loongson,ls2k-clk # This is for Loongson-2K1000 21 22 - loongson,ls2k2000-clk ··· 25 24 maxItems: 1 26 25 27 26 clocks: 28 - items: 29 - - description: 100m ref 27 + maxItems: 1 30 28 31 29 clock-names: 32 30 items: ··· 38 38 ID in its "clocks" phandle cell. See include/dt-bindings/clock/loongson,ls2k-clk.h 39 39 for the full list of Loongson-2 SoC clock IDs. 40 40 41 + allOf: 42 + - if: 43 + properties: 44 + compatible: 45 + contains: 46 + const: loongson,ls2k0300-clk 47 + then: 48 + properties: 49 + clock-names: false 50 + else: 51 + required: 52 + - clock-names 53 + 41 54 required: 42 55 - compatible 43 56 - reg 44 57 - clocks 45 - - clock-names 46 58 - '#clock-cells' 47 59 48 60 additionalProperties: false
+36
include/dt-bindings/clock/loongson,ls2k-clk.h
··· 43 43 #define LOONGSON2_I2S_CLK 33 44 44 #define LOONGSON2_MISC_CLK 34 45 45 46 + #define LS2K0300_CLK_STABLE 0 47 + #define LS2K0300_NODE_PLL 1 48 + #define LS2K0300_DDR_PLL 2 49 + #define LS2K0300_PIX_PLL 3 50 + #define LS2K0300_CLK_THSENS 4 51 + #define LS2K0300_CLK_NODE_DIV 5 52 + #define LS2K0300_CLK_NODE_PLL_GATE 6 53 + #define LS2K0300_CLK_NODE_SCALE 7 54 + #define LS2K0300_CLK_NODE_GATE 8 55 + #define LS2K0300_CLK_GMAC_DIV 9 56 + #define LS2K0300_CLK_GMAC_GATE 10 57 + #define LS2K0300_CLK_I2S_DIV 11 58 + #define LS2K0300_CLK_I2S_SCALE 12 59 + #define LS2K0300_CLK_I2S_GATE 13 60 + #define LS2K0300_CLK_DDR_DIV 14 61 + #define LS2K0300_CLK_DDR_GATE 15 62 + #define LS2K0300_CLK_NET_DIV 16 63 + #define LS2K0300_CLK_NET_GATE 17 64 + #define LS2K0300_CLK_DEV_DIV 18 65 + #define LS2K0300_CLK_DEV_GATE 19 66 + #define LS2K0300_CLK_PIX_DIV 20 67 + #define LS2K0300_CLK_PIX_PLL_GATE 21 68 + #define LS2K0300_CLK_PIX_SCALE 22 69 + #define LS2K0300_CLK_PIX_GATE 23 70 + #define LS2K0300_CLK_GMACBP_DIV 24 71 + #define LS2K0300_CLK_GMACBP_GATE 25 72 + #define LS2K0300_CLK_USB_SCALE 26 73 + #define LS2K0300_CLK_USB_GATE 27 74 + #define LS2K0300_CLK_APB_SCALE 28 75 + #define LS2K0300_CLK_APB_GATE 29 76 + #define LS2K0300_CLK_BOOT_SCALE 30 77 + #define LS2K0300_CLK_BOOT_GATE 31 78 + #define LS2K0300_CLK_SDIO_SCALE 32 79 + #define LS2K0300_CLK_SDIO_GATE 33 80 + #define LS2K0300_CLK_GMAC_IN 34 81 + 46 82 #endif