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

dt-bindings: arm: Convert Marvell AP80x System Controller to DT schema

Convert the Marvell AP80x System Controller binding to DT schema format.

There's not any specific compatible for the whole block which is a
separate problem, so just the child nodes are documented. Only the
pinctrl and clock child nodes need to be converted as the GPIO node
already has a schema.

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://patch.msgid.link/20251014153040.3783896-1-robh@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

+115 -146
-146
Documentation/devicetree/bindings/arm/marvell/ap80x-system-controller.txt
··· 1 - Marvell Armada AP80x System Controller 2 - ====================================== 3 - 4 - The AP806/AP807 is one of the two core HW blocks of the Marvell Armada 5 - 7K/8K/931x SoCs. It contains system controllers, which provide several 6 - registers giving access to numerous features: clocks, pin-muxing and 7 - many other SoC configuration items. This DT binding allows to describe 8 - these system controllers. 9 - 10 - For the top level node: 11 - - compatible: must be: "syscon", "simple-mfd"; 12 - - reg: register area of the AP80x system controller 13 - 14 - SYSTEM CONTROLLER 0 15 - =================== 16 - 17 - Clocks: 18 - ------- 19 - 20 - 21 - The Device Tree node representing the AP806/AP807 system controller 22 - provides a number of clocks: 23 - 24 - - 0: reference clock of CPU cluster 0 25 - - 1: reference clock of CPU cluster 1 26 - - 2: fixed PLL at 1200 Mhz 27 - - 3: MSS clock, derived from the fixed PLL 28 - 29 - Required properties: 30 - 31 - - compatible: must be one of: 32 - * "marvell,ap806-clock" 33 - * "marvell,ap807-clock" 34 - - #clock-cells: must be set to 1 35 - 36 - Pinctrl: 37 - -------- 38 - 39 - For common binding part and usage, refer to 40 - Documentation/devicetree/bindings/pinctrl/marvell,mvebu-pinctrl.txt. 41 - 42 - Required properties: 43 - - compatible must be "marvell,ap806-pinctrl", 44 - 45 - Available mpp pins/groups and functions: 46 - Note: brackets (x) are not part of the mpp name for marvell,function and given 47 - only for more detailed description in this document. 48 - 49 - name pins functions 50 - ================================================================================ 51 - mpp0 0 gpio, sdio(clk), spi0(clk) 52 - mpp1 1 gpio, sdio(cmd), spi0(miso) 53 - mpp2 2 gpio, sdio(d0), spi0(mosi) 54 - mpp3 3 gpio, sdio(d1), spi0(cs0n) 55 - mpp4 4 gpio, sdio(d2), i2c0(sda) 56 - mpp5 5 gpio, sdio(d3), i2c0(sdk) 57 - mpp6 6 gpio, sdio(ds) 58 - mpp7 7 gpio, sdio(d4), uart1(rxd) 59 - mpp8 8 gpio, sdio(d5), uart1(txd) 60 - mpp9 9 gpio, sdio(d6), spi0(cs1n) 61 - mpp10 10 gpio, sdio(d7) 62 - mpp11 11 gpio, uart0(txd) 63 - mpp12 12 gpio, sdio(pw_off), sdio(hw_rst) 64 - mpp13 13 gpio 65 - mpp14 14 gpio 66 - mpp15 15 gpio 67 - mpp16 16 gpio 68 - mpp17 17 gpio 69 - mpp18 18 gpio 70 - mpp19 19 gpio, uart0(rxd), sdio(pw_off) 71 - 72 - GPIO: 73 - ----- 74 - For common binding part and usage, refer to 75 - Documentation/devicetree/bindings/gpio/gpio-mvebu.yaml. 76 - 77 - Required properties: 78 - 79 - - compatible: "marvell,armada-8k-gpio" 80 - 81 - - offset: offset address inside the syscon block 82 - 83 - Optional properties: 84 - 85 - - marvell,pwm-offset: offset address of PWM duration control registers inside 86 - the syscon block 87 - 88 - Example: 89 - ap_syscon: system-controller@6f4000 { 90 - compatible = "syscon", "simple-mfd"; 91 - reg = <0x6f4000 0x1000>; 92 - 93 - ap_clk: clock { 94 - compatible = "marvell,ap806-clock"; 95 - #clock-cells = <1>; 96 - }; 97 - 98 - ap_pinctrl: pinctrl { 99 - compatible = "marvell,ap806-pinctrl"; 100 - }; 101 - 102 - ap_gpio: gpio { 103 - compatible = "marvell,armada-8k-gpio"; 104 - offset = <0x1040>; 105 - ngpios = <19>; 106 - gpio-controller; 107 - #gpio-cells = <2>; 108 - gpio-ranges = <&ap_pinctrl 0 0 19>; 109 - marvell,pwm-offset = <0x10c0>; 110 - #pwm-cells = <2>; 111 - clocks = <&ap_clk 3>; 112 - }; 113 - }; 114 - 115 - SYSTEM CONTROLLER 1 116 - =================== 117 - 118 - Cluster clocks: 119 - --------------- 120 - 121 - Device Tree Clock bindings for cluster clock of Marvell 122 - AP806/AP807. Each cluster contain up to 2 CPUs running at the same 123 - frequency. 124 - 125 - Required properties: 126 - - compatible: must be one of: 127 - * "marvell,ap806-cpu-clock" 128 - * "marvell,ap807-cpu-clock" 129 - - #clock-cells : should be set to 1. 130 - 131 - - clocks : shall be the input parent clock(s) phandle for the clock 132 - (one per cluster) 133 - 134 - - reg: register range associated with the cluster clocks 135 - 136 - ap_syscon1: system-controller@6f8000 { 137 - compatible = "marvell,armada-ap806-syscon1", "syscon", "simple-mfd"; 138 - reg = <0x6f8000 0x1000>; 139 - 140 - cpu_clk: clock-cpu@278 { 141 - compatible = "marvell,ap806-cpu-clock"; 142 - clocks = <&ap_clk 0>, <&ap_clk 1>; 143 - #clock-cells = <1>; 144 - reg = <0x278 0xa30>; 145 - }; 146 - };
+54
Documentation/devicetree/bindings/clock/marvell,ap80x-clock.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/marvell,ap80x-clock.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Marvell Armada AP80x System Controller Clocks 8 + 9 + maintainers: 10 + - Gregory Clement <gregory.clement@bootlin.com> 11 + - Miquel Raynal <miquel.raynal@bootlin.com> 12 + 13 + description: > 14 + The AP806/AP807 is one of the two core HW blocks of the Marvell Armada 15 + 7K/8K/931x SoCs. It contains system controllers, which provide several 16 + registers giving access to numerous features: clocks, pin-muxing and many 17 + other SoC configuration items. 18 + 19 + properties: 20 + compatible: 21 + enum: 22 + - marvell,ap806-clock 23 + - marvell,ap806-cpu-clock 24 + - marvell,ap807-clock 25 + - marvell,ap807-cpu-clock 26 + 27 + reg: 28 + maxItems: 1 29 + 30 + "#clock-cells": 31 + const: 1 32 + 33 + clocks: 34 + items: 35 + - description: cluster 0 parent clock phandle 36 + - description: cluster 1 parent clock phandle 37 + 38 + required: 39 + - compatible 40 + - "#clock-cells" 41 + 42 + additionalProperties: false 43 + 44 + allOf: 45 + - if: 46 + properties: 47 + compatible: 48 + contains: 49 + enum: 50 + - marvell,ap806-cpu-clock 51 + - marvell,ap807-cpu-clock 52 + then: 53 + required: 54 + - clocks
+61
Documentation/devicetree/bindings/pinctrl/marvell,ap806-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/marvell,ap806-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Marvell AP806 pin controller 8 + 9 + maintainers: 10 + - Gregory Clement <gregory.clement@bootlin.com> 11 + - Miquel Raynal <miquel.raynal@bootlin.com> 12 + 13 + properties: 14 + compatible: 15 + const: marvell,ap806-pinctrl 16 + 17 + reg: 18 + maxItems: 1 19 + 20 + patternProperties: 21 + '-pins$': 22 + type: object 23 + additionalProperties: false 24 + 25 + properties: 26 + marvell,function: 27 + $ref: /schemas/types.yaml#/definitions/string 28 + description: 29 + Indicates the function to select. 30 + enum: [ gpio, i2c0, sdio, spi0, uart0, uart1 ] 31 + 32 + marvell,pins: 33 + $ref: /schemas/types.yaml#/definitions/string-array 34 + description: 35 + Array of MPP pins to be used for the given function. 36 + minItems: 1 37 + maxItems: 20 38 + items: 39 + enum: [ 40 + mpp0, mpp1, mpp2, mpp3, mpp4, mpp5, mpp6, mpp7, mpp8, mpp9, mpp10, 41 + mpp11, mpp12, mpp13, mpp14, mpp15, mpp16, mpp17, mpp18, mpp19 42 + ] 43 + 44 + allOf: 45 + - $ref: pinctrl.yaml# 46 + 47 + required: 48 + - compatible 49 + 50 + additionalProperties: false 51 + 52 + examples: 53 + - | 54 + pinctrl { 55 + compatible = "marvell,ap806-pinctrl"; 56 + 57 + uart0_pins: uart0-pins { 58 + marvell,pins = "mpp11", "mpp19"; 59 + marvell,function = "uart0"; 60 + }; 61 + };