xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/sprd,sc9860-pinctrl.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* Spreadtrum SC9860 Pin Controller
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotPlease refer to sprd,pinctrl.txt in this directory for common binding part
4*c66ec88fSEmmanuel Vadotand usage.
5*c66ec88fSEmmanuel Vadot
6*c66ec88fSEmmanuel VadotRequired properties:
7*c66ec88fSEmmanuel Vadot- compatible: Must be "sprd,sc9860-pinctrl".
8*c66ec88fSEmmanuel Vadot- reg: The register address of pin controller device.
9*c66ec88fSEmmanuel Vadot- pins : An array of strings, each string containing the name of a pin.
10*c66ec88fSEmmanuel Vadot
11*c66ec88fSEmmanuel VadotOptional properties:
12*c66ec88fSEmmanuel Vadot- function: A string containing the name of the function, values must be
13*c66ec88fSEmmanuel Vadot  one of: "func1", "func2", "func3" and "func4".
14*c66ec88fSEmmanuel Vadot- drive-strength: Drive strength in mA. Supported values: 2, 4, 6, 8, 10,
15*c66ec88fSEmmanuel Vadot  12, 14, 16, 20, 21, 24, 25, 27, 29, 31 and 33.
16*c66ec88fSEmmanuel Vadot- input-schmitt-disable: Enable schmitt-trigger mode.
17*c66ec88fSEmmanuel Vadot- input-schmitt-enable: Disable schmitt-trigger mode.
18*c66ec88fSEmmanuel Vadot- bias-disable: Disable pin bias.
19*c66ec88fSEmmanuel Vadot- bias-pull-down: Pull down on pin.
20*c66ec88fSEmmanuel Vadot- bias-pull-up: Pull up on pin. Supported values: 20000 for pull-up resistor
21*c66ec88fSEmmanuel Vadot  is 20K and 4700 for pull-up resistor is 4.7K.
22*c66ec88fSEmmanuel Vadot- input-enable: Enable pin input.
23*c66ec88fSEmmanuel Vadot- input-disable: Enable pin output.
24*c66ec88fSEmmanuel Vadot- output-high: Set the pin as an output level high.
25*c66ec88fSEmmanuel Vadot- output-low: Set the pin as an output level low.
26*c66ec88fSEmmanuel Vadot- sleep-hardware-state: Indicate these configs in this state are sleep related.
27*c66ec88fSEmmanuel Vadot- sprd,control: Control values referring to databook for global control pins.
28*c66ec88fSEmmanuel Vadot- sprd,sleep-mode: Choose the pin sleep mode, and supported values are:
29*c66ec88fSEmmanuel Vadot  AP_SLEEP, PUBCP_SLEEP, TGLDSP_SLEEP and AGDSP_SLEEP.
30*c66ec88fSEmmanuel Vadot
31*c66ec88fSEmmanuel VadotPin sleep mode definition:
32*c66ec88fSEmmanuel Vadotenum pin_sleep_mode {
33*c66ec88fSEmmanuel Vadot	AP_SLEEP = BIT(0),
34*c66ec88fSEmmanuel Vadot	PUBCP_SLEEP = BIT(1),
35*c66ec88fSEmmanuel Vadot	TGLDSP_SLEEP = BIT(2),
36*c66ec88fSEmmanuel Vadot	AGDSP_SLEEP = BIT(3),
37*c66ec88fSEmmanuel Vadot};
38*c66ec88fSEmmanuel Vadot
39*c66ec88fSEmmanuel VadotExample:
40*c66ec88fSEmmanuel Vadotpin_controller: pinctrl@402a0000 {
41*c66ec88fSEmmanuel Vadot	compatible = "sprd,sc9860-pinctrl";
42*c66ec88fSEmmanuel Vadot	reg = <0x402a0000 0x10000>;
43*c66ec88fSEmmanuel Vadot
44*c66ec88fSEmmanuel Vadot	grp1: sd0 {
45*c66ec88fSEmmanuel Vadot		pins = "SC9860_VIO_SD2_IRTE", "SC9860_VIO_SD0_IRTE";
46*c66ec88fSEmmanuel Vadot		sprd,control = <0x1>;
47*c66ec88fSEmmanuel Vadot	};
48*c66ec88fSEmmanuel Vadot
49*c66ec88fSEmmanuel Vadot	grp2: rfctl_33 {
50*c66ec88fSEmmanuel Vadot		pins = "SC9860_RFCTL33";
51*c66ec88fSEmmanuel Vadot		function = "func2";
52*c66ec88fSEmmanuel Vadot		sprd,sleep-mode = <AP_SLEEP | PUBCP_SLEEP>;
53*c66ec88fSEmmanuel Vadot		grp2_sleep_mode: rfctl_33_sleep {
54*c66ec88fSEmmanuel Vadot			pins = "SC9860_RFCTL33";
55*c66ec88fSEmmanuel Vadot			sleep-hardware-state;
56*c66ec88fSEmmanuel Vadot			output-low;
57*c66ec88fSEmmanuel Vadot		}
58*c66ec88fSEmmanuel Vadot	};
59*c66ec88fSEmmanuel Vadot
60*c66ec88fSEmmanuel Vadot	grp3: rfctl_misc_20 {
61*c66ec88fSEmmanuel Vadot		pins = "SC9860_RFCTL20_MISC";
62*c66ec88fSEmmanuel Vadot		drive-strength = <10>;
63*c66ec88fSEmmanuel Vadot		bias-pull-up = <4700>;
64*c66ec88fSEmmanuel Vadot		grp3_sleep_mode: rfctl_misc_sleep {
65*c66ec88fSEmmanuel Vadot			pins = "SC9860_RFCTL20_MISC";
66*c66ec88fSEmmanuel Vadot			sleep-hardware-state;
67*c66ec88fSEmmanuel Vadot			bias-pull-up;
68*c66ec88fSEmmanuel Vadot		}
69*c66ec88fSEmmanuel Vadot	};
70*c66ec88fSEmmanuel Vadot};
71