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

dt-bindings: reset: Document canaan,k210-rst bindings

Document the device tree bindings for the Canaan Kendryte K210 SoC
reset controller driver in
Documentation/devicetree/bindings/reset/canaan,k210-rst.yaml. The header
file include/dt-bindings/reset/k210-rst.h is added to define all
possible reset lines of the SoC.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>

authored by

Damien Le Moal and committed by
Palmer Dabbelt
1d7c9d09 23fb08e7

+82
+40
Documentation/devicetree/bindings/reset/canaan,k210-rst.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/reset/canaan,k210-rst.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Canaan Kendryte K210 Reset Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Damien Le Moal <damien.lemoal@wdc.com> 11 + 12 + description: | 13 + Canaan Kendryte K210 reset controller driver which supports the SoC 14 + system controller supplied reset registers for the various peripherals 15 + of the SoC. The K210 reset controller node must be defined as a child 16 + node of the K210 system controller node. 17 + 18 + See also: 19 + - dt-bindings/reset/k210-rst.h 20 + 21 + properties: 22 + compatible: 23 + const: canaan,k210-rst 24 + 25 + '#reset-cells': 26 + const: 1 27 + 28 + required: 29 + - '#reset-cells' 30 + - compatible 31 + 32 + additionalProperties: false 33 + 34 + examples: 35 + - | 36 + #include <dt-bindings/reset/k210-rst.h> 37 + sysrst: reset-controller { 38 + compatible = "canaan,k210-rst"; 39 + #reset-cells = <1>; 40 + };
+42
include/dt-bindings/reset/k210-rst.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ */ 2 + /* 3 + * Copyright (C) 2019 Sean Anderson <seanga2@gmail.com> 4 + * Copyright (c) 2020 Western Digital Corporation or its affiliates. 5 + */ 6 + #ifndef RESET_K210_SYSCTL_H 7 + #define RESET_K210_SYSCTL_H 8 + 9 + /* 10 + * Kendryte K210 SoC system controller K210_SYSCTL_SOFT_RESET register bits. 11 + * Taken from Kendryte SDK (kendryte-standalone-sdk). 12 + */ 13 + #define K210_RST_ROM 0 14 + #define K210_RST_DMA 1 15 + #define K210_RST_AI 2 16 + #define K210_RST_DVP 3 17 + #define K210_RST_FFT 4 18 + #define K210_RST_GPIO 5 19 + #define K210_RST_SPI0 6 20 + #define K210_RST_SPI1 7 21 + #define K210_RST_SPI2 8 22 + #define K210_RST_SPI3 9 23 + #define K210_RST_I2S0 10 24 + #define K210_RST_I2S1 11 25 + #define K210_RST_I2S2 12 26 + #define K210_RST_I2C0 13 27 + #define K210_RST_I2C1 14 28 + #define K210_RST_I2C2 15 29 + #define K210_RST_UART1 16 30 + #define K210_RST_UART2 17 31 + #define K210_RST_UART3 18 32 + #define K210_RST_AES 19 33 + #define K210_RST_FPIOA 20 34 + #define K210_RST_TIMER0 21 35 + #define K210_RST_TIMER1 22 36 + #define K210_RST_TIMER2 23 37 + #define K210_RST_WDT0 24 38 + #define K210_RST_WDT1 25 39 + #define K210_RST_SHA 26 40 + #define K210_RST_RTC 29 41 + 42 + #endif /* RESET_K210_SYSCTL_H */