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