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

dt-bindings: clock: Add Loongson-1 clock

Add devicetree binding document and related header file
for the Loongson-1 clock.

Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230321111817.71756-2-keguang.zhang@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Keguang Zhang and committed by
Stephen Boyd
12de2f50 fe15c26e

+64
+45
Documentation/devicetree/bindings/clock/loongson,ls1x-clk.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/loongson,ls1x-clk.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Loongson-1 Clock Controller 8 + 9 + maintainers: 10 + - Keguang Zhang <keguang.zhang@gmail.com> 11 + 12 + properties: 13 + compatible: 14 + enum: 15 + - loongson,ls1b-clk 16 + - loongson,ls1c-clk 17 + 18 + reg: 19 + maxItems: 1 20 + 21 + clocks: 22 + maxItems: 1 23 + 24 + "#clock-cells": 25 + const: 1 26 + 27 + required: 28 + - compatible 29 + - reg 30 + - clocks 31 + - "#clock-cells" 32 + 33 + additionalProperties: false 34 + 35 + examples: 36 + - | 37 + clkc: clock-controller@1fe78030 { 38 + compatible = "loongson,ls1b-clk"; 39 + reg = <0x1fe78030 0x8>; 40 + 41 + clocks = <&xtal>; 42 + #clock-cells = <1>; 43 + }; 44 + 45 + ...
+19
include/dt-bindings/clock/loongson,ls1x-clk.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ 2 + /* 3 + * Loongson-1 clock tree IDs 4 + * 5 + * Copyright (C) 2023 Keguang Zhang <keguang.zhang@gmail.com> 6 + */ 7 + 8 + #ifndef __DT_BINDINGS_CLOCK_LS1X_CLK_H__ 9 + #define __DT_BINDINGS_CLOCK_LS1X_CLK_H__ 10 + 11 + #define LS1X_CLKID_PLL 0 12 + #define LS1X_CLKID_CPU 1 13 + #define LS1X_CLKID_DC 2 14 + #define LS1X_CLKID_AHB 3 15 + #define LS1X_CLKID_APB 4 16 + 17 + #define CLK_NR_CLKS (LS1X_CLKID_APB + 1) 18 + 19 + #endif /* __DT_BINDINGS_CLOCK_LS1X_CLK_H__ */