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

dt-bindings: clocks: Convert Allwinner A80 USB clocks to a schema

The Allwinner A80 SoC has a USB clocks controller that is supported in
Linux, with a matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree
bindings for that controller over to a YAML schemas.

Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>

+59 -24
+59
Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-usb-clocks.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0+ 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/allwinner,sun9i-a80-usb-clocks.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Allwinner A80 USB Clock Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Chen-Yu Tsai <wens@csie.org> 11 + - Maxime Ripard <mripard@kernel.org> 12 + 13 + properties: 14 + "#clock-cells": 15 + const: 1 16 + 17 + "#reset-cells": 18 + const: 1 19 + 20 + compatible: 21 + const: allwinner,sun9i-a80-usb-clocks 22 + 23 + reg: 24 + maxItems: 1 25 + 26 + clocks: 27 + items: 28 + - description: Bus Clock 29 + - description: High Frequency Oscillator 30 + 31 + clock-names: 32 + items: 33 + - const: bus 34 + - const: hosc 35 + 36 + required: 37 + - "#clock-cells" 38 + - "#reset-cells" 39 + - compatible 40 + - reg 41 + - clocks 42 + - clock-names 43 + 44 + additionalProperties: false 45 + 46 + examples: 47 + - | 48 + #include <dt-bindings/clock/sun9i-a80-ccu.h> 49 + 50 + usb_clocks: clock@a08000 { 51 + compatible = "allwinner,sun9i-a80-usb-clks"; 52 + reg = <0x00a08000 0x8>; 53 + clocks = <&ccu CLK_BUS_USB>, <&osc24M>; 54 + clock-names = "bus", "hosc"; 55 + #clock-cells = <1>; 56 + #reset-cells = <1>; 57 + }; 58 + 59 + ...
-24
Documentation/devicetree/bindings/clock/sun9i-usb.txt
··· 1 - Allwinner A80 USB Clock Control Binding 2 - --------------------------------------- 3 - 4 - Required properties : 5 - - compatible: must contain one of the following compatibles: 6 - - "allwinner,sun9i-a80-usb-clocks" 7 - 8 - - reg: Must contain the registers base address and length 9 - - clocks: phandle to the clocks feeding the USB subsystem. Two are needed: 10 - - "bus": the bus clock for the whole USB subsystem 11 - - "hosc": the high frequency oscillator (usually at 24MHz) 12 - - clock-names: Must contain the clock names described just above 13 - - #clock-cells : must contain 1 14 - - #reset-cells : must contain 1 15 - 16 - Example: 17 - usb_clocks: clock@a08000 { 18 - compatible = "allwinner,sun9i-a80-usb-clks"; 19 - reg = <0x00a08000 0x8>; 20 - clocks = <&ccu CLK_BUS_USB>, <&osc24M>; 21 - clock-names = "bus", "hosc"; 22 - #clock-cells = <1>; 23 - #reset-cells = <1>; 24 - };