| 1 |
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/pinctrl/sophgo,cv1800-pinctrl.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Sophgo CV1800 Pin Controller |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Inochi Amaoto <[email protected]> |
| 11 |
|
| 12 |
properties: |
| 13 |
compatible: |
| 14 |
enum: |
| 15 |
- sophgo,cv1800b-pinctrl |
| 16 |
- sophgo,cv1812h-pinctrl |
| 17 |
- sophgo,sg2000-pinctrl |
| 18 |
- sophgo,sg2002-pinctrl |
| 19 |
|
| 20 |
reg: |
| 21 |
items: |
| 22 |
- description: pinctrl for system domain |
| 23 |
- description: pinctrl for rtc domain |
| 24 |
|
| 25 |
reg-names: |
| 26 |
items: |
| 27 |
- const: sys |
| 28 |
- const: rtc |
| 29 |
|
| 30 |
resets: |
| 31 |
maxItems: 1 |
| 32 |
|
| 33 |
patternProperties: |
| 34 |
'-cfg$': |
| 35 |
type: object |
| 36 |
description: |
| 37 |
A pinctrl node should contain at least one subnode representing the |
| 38 |
pinctrl groups available on the machine. |
| 39 |
|
| 40 |
additionalProperties: false |
| 41 |
|
| 42 |
patternProperties: |
| 43 |
'-pins$': |
| 44 |
type: object |
| 45 |
description: | |
| 46 |
Each subnode will list the pins it needs, and how they should |
| 47 |
be configured, with regard to muxer configuration, bias, input |
| 48 |
enable/disable, input schmitt trigger, slew-rate, drive strength |
| 49 |
and bus hold state. In addition, all pins in the same subnode |
| 50 |
should have the same power domain. For configuration detail, |
| 51 |
refer to https://github.com/sophgo/sophgo-doc/. |
| 52 |
|
| 53 |
allOf: |
| 54 |
- $ref: pincfg-node.yaml# |
| 55 |
- $ref: pinmux-node.yaml# |
| 56 |
|
| 57 |
properties: |
| 58 |
pinmux: |
| 59 |
description: | |
| 60 |
The list of GPIOs and their mux settings that properties in the |
| 61 |
node apply to. This should be set using the PINMUX or PINMUX2 |
| 62 |
macro. |
| 63 |
|
| 64 |
bias-pull-up: |
| 65 |
type: boolean |
| 66 |
|
| 67 |
bias-pull-down: |
| 68 |
type: boolean |
| 69 |
|
| 70 |
drive-strength-microamp: |
| 71 |
description: typical current when output high level. |
| 72 |
|
| 73 |
input-schmitt-microvolt: |
| 74 |
description: typical threshold for schmitt trigger. |
| 75 |
|
| 76 |
power-source: |
| 77 |
description: power supplies at X mV. |
| 78 |
enum: [ 1800, 3300 ] |
| 79 |
|
| 80 |
slew-rate: |
| 81 |
description: slew rate for output buffer (0 is fast, 1 is slow) |
| 82 |
enum: [ 0, 1 ] |
| 83 |
|
| 84 |
bias-bus-hold: true |
| 85 |
|
| 86 |
required: |
| 87 |
- pinmux |
| 88 |
- power-source |
| 89 |
|
| 90 |
additionalProperties: false |
| 91 |
|
| 92 |
required: |
| 93 |
- compatible |
| 94 |
- reg |
| 95 |
- reg-names |
| 96 |
|
| 97 |
additionalProperties: false |
| 98 |
|
| 99 |
examples: |
| 100 |
- | |
| 101 |
#include <dt-bindings/pinctrl/pinctrl-cv1800b.h> |
| 102 |
|
| 103 |
pinctrl@3001000 { |
| 104 |
compatible = "sophgo,cv1800b-pinctrl"; |
| 105 |
reg = <0x03001000 0x1000>, |
| 106 |
<0x05027000 0x1000>; |
| 107 |
reg-names = "sys", "rtc"; |
| 108 |
|
| 109 |
uart0_cfg: uart0-cfg { |
| 110 |
uart0-pins { |
| 111 |
pinmux = <PINMUX(PIN_UART0_TX, 0)>, |
| 112 |
<PINMUX(PIN_UART0_RX, 0)>; |
| 113 |
bias-pull-up; |
| 114 |
drive-strength-microamp = <10800>; |
| 115 |
input-schmitt-microvolt = <0>; |
| 116 |
power-source = <3300>; |
| 117 |
slew-rate = <0>; |
| 118 |
}; |
| 119 |
}; |
| 120 |
}; |
| 121 |
|
| 122 |
... |