xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1*84943d6fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*84943d6fSEmmanuel Vadot# Copyright 2023 Realtek Semiconductor Corporation
3*84943d6fSEmmanuel Vadot%YAML 1.2
4*84943d6fSEmmanuel Vadot---
5*84943d6fSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/realtek,rtd1619b-pinctrl.yaml#
6*84943d6fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7*84943d6fSEmmanuel Vadot
8*84943d6fSEmmanuel Vadottitle: Realtek DHC RTD1619B Pin Controller
9*84943d6fSEmmanuel Vadot
10*84943d6fSEmmanuel Vadotmaintainers:
11*84943d6fSEmmanuel Vadot  - TY Chang <tychang@realtek.com>
12*84943d6fSEmmanuel Vadot
13*84943d6fSEmmanuel Vadotdescription:
14*84943d6fSEmmanuel Vadot  The Realtek DHC RTD1619B is a high-definition media processor SoC. The
15*84943d6fSEmmanuel Vadot  RTD1619B pin controller is used to control pin function, pull up/down
16*84943d6fSEmmanuel Vadot  resistor, drive strength, schmitt trigger and power source.
17*84943d6fSEmmanuel Vadot
18*84943d6fSEmmanuel Vadotproperties:
19*84943d6fSEmmanuel Vadot  compatible:
20*84943d6fSEmmanuel Vadot    const: realtek,rtd1619b-pinctrl
21*84943d6fSEmmanuel Vadot
22*84943d6fSEmmanuel Vadot  reg:
23*84943d6fSEmmanuel Vadot    maxItems: 1
24*84943d6fSEmmanuel Vadot
25*84943d6fSEmmanuel VadotpatternProperties:
26*84943d6fSEmmanuel Vadot  '-pins$':
27*84943d6fSEmmanuel Vadot    type: object
28*84943d6fSEmmanuel Vadot    allOf:
29*84943d6fSEmmanuel Vadot      - $ref: pincfg-node.yaml#
30*84943d6fSEmmanuel Vadot      - $ref: pinmux-node.yaml#
31*84943d6fSEmmanuel Vadot
32*84943d6fSEmmanuel Vadot    properties:
33*84943d6fSEmmanuel Vadot      pins:
34*84943d6fSEmmanuel Vadot        items:
35*84943d6fSEmmanuel Vadot          enum: [ gpio_0, gpio_1, gpio_2, gpio_3, gpio_4, gpio_5, gpio_6, gpio_7,
36*84943d6fSEmmanuel Vadot                  gpio_8, gpio_9, gpio_10, gpio_11, gpio_12, gpio_13, gpio_14,
37*84943d6fSEmmanuel Vadot                  gpio_15, gpio_16, gpio_17, gpio_18, gpio_19, gpio_20, gpio_21,
38*84943d6fSEmmanuel Vadot                  gpio_22, gpio_23, usb_cc2, gpio_25, gpio_26, gpio_27, gpio_28,
39*84943d6fSEmmanuel Vadot                  gpio_29, gpio_30, gpio_31, gpio_32, gpio_33, gpio_34, gpio_35,
40*84943d6fSEmmanuel Vadot                  hif_data, hif_en, hif_rdy, hif_clk, gpio_40, gpio_41, gpio_42,
41*84943d6fSEmmanuel Vadot                  gpio_43, gpio_44, gpio_45, gpio_46, gpio_47, gpio_48, gpio_49,
42*84943d6fSEmmanuel Vadot                  gpio_50, usb_cc1, gpio_52, gpio_53, ir_rx, ur0_rx, ur0_tx,
43*84943d6fSEmmanuel Vadot                  gpio_57, gpio_58, gpio_59, gpio_60, gpio_61, gpio_62, gpio_63,
44*84943d6fSEmmanuel Vadot                  gpio_64, gpio_65, gpio_66, gpio_67, gpio_68, gpio_69, gpio_70,
45*84943d6fSEmmanuel Vadot                  gpio_71, gpio_72, gpio_73, gpio_74, gpio_75, gpio_76, emmc_cmd,
46*84943d6fSEmmanuel Vadot                  spi_ce_n, spi_sck, spi_so, spi_si, emmc_rst_n, emmc_dd_sb,
47*84943d6fSEmmanuel Vadot                  emmc_clk, emmc_data_0, emmc_data_1, emmc_data_2, emmc_data_3,
48*84943d6fSEmmanuel Vadot                  emmc_data_4, emmc_data_5, emmc_data_6, emmc_data_7, ur2_loc,
49*84943d6fSEmmanuel Vadot                  gspi_loc, sdio_loc, hi_loc, hi_width, sf_en, arm_trace_dbg_en,
50*84943d6fSEmmanuel Vadot                  pwm_01_open_drain_en_loc0, pwm_23_open_drain_en_loc0,
51*84943d6fSEmmanuel Vadot                  pwm_01_open_drain_en_loc1, pwm_23_open_drain_en_loc1,
52*84943d6fSEmmanuel Vadot                  ejtag_acpu_loc, ejtag_vcpu_loc, ejtag_scpu_loc, dmic_loc,
53*84943d6fSEmmanuel Vadot                  iso_gspi_loc, ejtag_ve3_loc, ejtag_aucpu0_loc, ejtag_aucpu1_loc ]
54*84943d6fSEmmanuel Vadot
55*84943d6fSEmmanuel Vadot      function:
56*84943d6fSEmmanuel Vadot        enum: [ gpio, nf, nf_spi, spi, pmic, spdif, spdif_coaxial, spdif_optical_loc0,
57*84943d6fSEmmanuel Vadot                spdif_optical_loc1, emmc_spi, emmc, sc1, uart0, uart1, uart2_loc0, uart2_loc1,
58*84943d6fSEmmanuel Vadot                gspi_loc1, iso_gspi_loc1, i2c0, i2c1, i2c3, i2c4, i2c5, pwm0, pwm1, pwm2,
59*84943d6fSEmmanuel Vadot                pwm3, etn_led, etn_phy, etn_clk, sc0, vfd, gspi_loc0, iso_gspi_loc0, pcie1,
60*84943d6fSEmmanuel Vadot                pcie2, sd, sdio_loc0, sdio_loc1, hi, hi_m, dc_fan, pll_test_loc0, pll_test_loc1,
61*84943d6fSEmmanuel Vadot                usb_cc1, usb_cc2, ir_rx, tdm_ai_loc0, tdm_ai_loc1, dmic_loc0, dmic_loc1,
62*84943d6fSEmmanuel Vadot                ai_loc0, ai_loc1, tp0, tp1, ao, uart2_disable, gspi_disable, sdio_disable,
63*84943d6fSEmmanuel Vadot                hi_loc_disable, hi_loc0, hi_width_disable, hi_width_1bit, vtc_i2si_loc0,
64*84943d6fSEmmanuel Vadot                vtc_tdm_loc0, vtc_dmic_loc0, vtc_i2si_loc1, vtc_tdm_loc1, vtc_dmic_loc1,
65*84943d6fSEmmanuel Vadot                vtc_i2so, ve3_ejtag_loc0, aucpu0_ejtag_loc0, aucpu1_ejtag_loc0, ve3_ejtag_loc1,
66*84943d6fSEmmanuel Vadot                aucpu0_ejtag_loc1, aucpu1_ejtag_loc1, ve3_ejtag_loc2, aucpu0_ejtag_loc2,
67*84943d6fSEmmanuel Vadot                aucpu1_ejtag_loc2, scpu_ejtag_loc0, acpu_ejtag_loc0, vcpu_ejtag_loc0,
68*84943d6fSEmmanuel Vadot                scpu_ejtag_loc1, acpu_ejtag_loc1, vcpu_ejtag_loc1, scpu_ejtag_loc2,
69*84943d6fSEmmanuel Vadot                acpu_ejtag_loc2, vcpu_ejtag_loc2, ve3_ejtag_disable, aucpu0_ejtag_disable,
70*84943d6fSEmmanuel Vadot                aucpu1_ejtag_disable, acpu_ejtag_disable, vcpu_ejtag_disable,
71*84943d6fSEmmanuel Vadot                scpu_ejtag_disable, iso_gspi_disable, sf_disable, sf_enable,
72*84943d6fSEmmanuel Vadot                arm_trace_debug_disable, arm_trace_debug_enable, pwm_normal, pwm_open_drain,
73*84943d6fSEmmanuel Vadot                standby_dbg, test_loop_dis ]
74*84943d6fSEmmanuel Vadot
75*84943d6fSEmmanuel Vadot      drive-strength:
76*84943d6fSEmmanuel Vadot        enum: [4, 8]
77*84943d6fSEmmanuel Vadot
78*84943d6fSEmmanuel Vadot      bias-pull-down: true
79*84943d6fSEmmanuel Vadot
80*84943d6fSEmmanuel Vadot      bias-pull-up: true
81*84943d6fSEmmanuel Vadot
82*84943d6fSEmmanuel Vadot      bias-disable: true
83*84943d6fSEmmanuel Vadot
84*84943d6fSEmmanuel Vadot      input-schmitt-enable: true
85*84943d6fSEmmanuel Vadot
86*84943d6fSEmmanuel Vadot      input-schmitt-disable: true
87*84943d6fSEmmanuel Vadot
88*84943d6fSEmmanuel Vadot      drive-push-pull: true
89*84943d6fSEmmanuel Vadot
90*84943d6fSEmmanuel Vadot      power-source:
91*84943d6fSEmmanuel Vadot        description: |
92*84943d6fSEmmanuel Vadot          Valid arguments are described as below:
93*84943d6fSEmmanuel Vadot          0: power supply of 1.8V
94*84943d6fSEmmanuel Vadot          1: power supply of 3.3V
95*84943d6fSEmmanuel Vadot        enum: [0, 1]
96*84943d6fSEmmanuel Vadot
97*84943d6fSEmmanuel Vadot      realtek,drive-strength-p:
98*84943d6fSEmmanuel Vadot        description: |
99*84943d6fSEmmanuel Vadot          Some of pins can be driven using the P-MOS and N-MOS transistor to
100*84943d6fSEmmanuel Vadot          achieve finer adjustments. The block-diagram representation is as
101*84943d6fSEmmanuel Vadot          follows:
102*84943d6fSEmmanuel Vadot                         VDD
103*84943d6fSEmmanuel Vadot                          |
104*84943d6fSEmmanuel Vadot                      ||--+
105*84943d6fSEmmanuel Vadot               +-----o||     P-MOS-FET
106*84943d6fSEmmanuel Vadot               |      ||--+
107*84943d6fSEmmanuel Vadot          IN --+          +----- out
108*84943d6fSEmmanuel Vadot               |      ||--+
109*84943d6fSEmmanuel Vadot               +------||     N-MOS-FET
110*84943d6fSEmmanuel Vadot                      ||--+
111*84943d6fSEmmanuel Vadot                          |
112*84943d6fSEmmanuel Vadot                         GND
113*84943d6fSEmmanuel Vadot          The driving strength of the P-MOS/N-MOS transistors impacts the
114*84943d6fSEmmanuel Vadot          waveform's rise/fall times. Greater driving strength results in
115*84943d6fSEmmanuel Vadot          shorter rise/fall times. Each P-MOS and N-MOS transistor offers
116*84943d6fSEmmanuel Vadot          8 configurable levels (0 to 7), with higher values indicating
117*84943d6fSEmmanuel Vadot          greater driving strength, contributing to achieving the desired
118*84943d6fSEmmanuel Vadot          speed.
119*84943d6fSEmmanuel Vadot
120*84943d6fSEmmanuel Vadot          The realtek,drive-strength-p is used to control the driving strength
121*84943d6fSEmmanuel Vadot          of the P-MOS output.
122*84943d6fSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
123*84943d6fSEmmanuel Vadot        minimum: 0
124*84943d6fSEmmanuel Vadot        maximum: 7
125*84943d6fSEmmanuel Vadot
126*84943d6fSEmmanuel Vadot      realtek,drive-strength-n:
127*84943d6fSEmmanuel Vadot        description: |
128*84943d6fSEmmanuel Vadot          Similar to the realtek,drive-strength-p, the realtek,drive-strength-n
129*84943d6fSEmmanuel Vadot          is used to control the driving strength of the N-MOS output.
130*84943d6fSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
131*84943d6fSEmmanuel Vadot        minimum: 0
132*84943d6fSEmmanuel Vadot        maximum: 7
133*84943d6fSEmmanuel Vadot
134*84943d6fSEmmanuel Vadot      realtek,duty-cycle:
135*84943d6fSEmmanuel Vadot        description: |
136*84943d6fSEmmanuel Vadot          An integer describing the level to adjust output duty cycle, controlling
137*84943d6fSEmmanuel Vadot          the proportion of positive and negative waveforms in nanoseconds.
138*84943d6fSEmmanuel Vadot          Valid arguments are described as below:
139*84943d6fSEmmanuel Vadot          0: 0ns
140*84943d6fSEmmanuel Vadot          2: + 0.25ns
141*84943d6fSEmmanuel Vadot          3: + 0.5ns
142*84943d6fSEmmanuel Vadot          4: -0.25ns
143*84943d6fSEmmanuel Vadot          5: -0.5ns
144*84943d6fSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
145*84943d6fSEmmanuel Vadot        enum: [ 0, 2, 3, 4, 5 ]
146*84943d6fSEmmanuel Vadot
147*84943d6fSEmmanuel Vadot    required:
148*84943d6fSEmmanuel Vadot      - pins
149*84943d6fSEmmanuel Vadot
150*84943d6fSEmmanuel Vadot    additionalProperties: false
151*84943d6fSEmmanuel Vadot
152*84943d6fSEmmanuel Vadotrequired:
153*84943d6fSEmmanuel Vadot  - compatible
154*84943d6fSEmmanuel Vadot  - reg
155*84943d6fSEmmanuel Vadot
156*84943d6fSEmmanuel VadotadditionalProperties: false
157*84943d6fSEmmanuel Vadot
158*84943d6fSEmmanuel Vadotexamples:
159*84943d6fSEmmanuel Vadot  - |
160*84943d6fSEmmanuel Vadot     pinctrl@4e000 {
161*84943d6fSEmmanuel Vadot         compatible = "realtek,rtd1619b-pinctrl";
162*84943d6fSEmmanuel Vadot         reg = <0x4e000 0x130>;
163*84943d6fSEmmanuel Vadot
164*84943d6fSEmmanuel Vadot         emmc-hs200-pins {
165*84943d6fSEmmanuel Vadot             pins = "emmc_clk",
166*84943d6fSEmmanuel Vadot                    "emmc_cmd",
167*84943d6fSEmmanuel Vadot                    "emmc_data_0",
168*84943d6fSEmmanuel Vadot                    "emmc_data_1",
169*84943d6fSEmmanuel Vadot                    "emmc_data_2",
170*84943d6fSEmmanuel Vadot                    "emmc_data_3",
171*84943d6fSEmmanuel Vadot                    "emmc_data_4",
172*84943d6fSEmmanuel Vadot                    "emmc_data_5",
173*84943d6fSEmmanuel Vadot                    "emmc_data_6",
174*84943d6fSEmmanuel Vadot                    "emmc_data_7";
175*84943d6fSEmmanuel Vadot             function = "emmc";
176*84943d6fSEmmanuel Vadot             realtek,drive-strength-p = <0x2>;
177*84943d6fSEmmanuel Vadot             realtek,drive-strength-n = <0x2>;
178*84943d6fSEmmanuel Vadot         };
179*84943d6fSEmmanuel Vadot
180*84943d6fSEmmanuel Vadot         i2c-0-pins {
181*84943d6fSEmmanuel Vadot             pins = "gpio_12",
182*84943d6fSEmmanuel Vadot                    "gpio_13";
183*84943d6fSEmmanuel Vadot             function = "i2c0";
184*84943d6fSEmmanuel Vadot             drive-strength = <4>;
185*84943d6fSEmmanuel Vadot         };
186*84943d6fSEmmanuel Vadot     };
187