18c2ecf20Sopenharmony_ci* Spreadtrum SC9860 Pin Controller
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciPlease refer to sprd,pinctrl.txt in this directory for common binding part
48c2ecf20Sopenharmony_ciand usage.
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciRequired properties:
78c2ecf20Sopenharmony_ci- compatible: Must be "sprd,sc9860-pinctrl".
88c2ecf20Sopenharmony_ci- reg: The register address of pin controller device.
98c2ecf20Sopenharmony_ci- pins : An array of strings, each string containing the name of a pin.
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciOptional properties:
128c2ecf20Sopenharmony_ci- function: A string containing the name of the function, values must be
138c2ecf20Sopenharmony_ci  one of: "func1", "func2", "func3" and "func4".
148c2ecf20Sopenharmony_ci- drive-strength: Drive strength in mA. Supported values: 2, 4, 6, 8, 10,
158c2ecf20Sopenharmony_ci  12, 14, 16, 20, 21, 24, 25, 27, 29, 31 and 33.
168c2ecf20Sopenharmony_ci- input-schmitt-disable: Enable schmitt-trigger mode.
178c2ecf20Sopenharmony_ci- input-schmitt-enable: Disable schmitt-trigger mode.
188c2ecf20Sopenharmony_ci- bias-disable: Disable pin bias.
198c2ecf20Sopenharmony_ci- bias-pull-down: Pull down on pin.
208c2ecf20Sopenharmony_ci- bias-pull-up: Pull up on pin. Supported values: 20000 for pull-up resistor
218c2ecf20Sopenharmony_ci  is 20K and 4700 for pull-up resistor is 4.7K.
228c2ecf20Sopenharmony_ci- input-enable: Enable pin input.
238c2ecf20Sopenharmony_ci- input-disable: Enable pin output.
248c2ecf20Sopenharmony_ci- output-high: Set the pin as an output level high.
258c2ecf20Sopenharmony_ci- output-low: Set the pin as an output level low.
268c2ecf20Sopenharmony_ci- sleep-hardware-state: Indicate these configs in this state are sleep related.
278c2ecf20Sopenharmony_ci- sprd,control: Control values referring to databook for global control pins.
288c2ecf20Sopenharmony_ci- sprd,sleep-mode: Choose the pin sleep mode, and supported values are:
298c2ecf20Sopenharmony_ci  AP_SLEEP, PUBCP_SLEEP, TGLDSP_SLEEP and AGDSP_SLEEP.
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciPin sleep mode definition:
328c2ecf20Sopenharmony_cienum pin_sleep_mode {
338c2ecf20Sopenharmony_ci	AP_SLEEP = BIT(0),
348c2ecf20Sopenharmony_ci	PUBCP_SLEEP = BIT(1),
358c2ecf20Sopenharmony_ci	TGLDSP_SLEEP = BIT(2),
368c2ecf20Sopenharmony_ci	AGDSP_SLEEP = BIT(3),
378c2ecf20Sopenharmony_ci};
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ciExample:
408c2ecf20Sopenharmony_cipin_controller: pinctrl@402a0000 {
418c2ecf20Sopenharmony_ci	compatible = "sprd,sc9860-pinctrl";
428c2ecf20Sopenharmony_ci	reg = <0x402a0000 0x10000>;
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci	grp1: sd0 {
458c2ecf20Sopenharmony_ci		pins = "SC9860_VIO_SD2_IRTE", "SC9860_VIO_SD0_IRTE";
468c2ecf20Sopenharmony_ci		sprd,control = <0x1>;
478c2ecf20Sopenharmony_ci	};
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci	grp2: rfctl_33 {
508c2ecf20Sopenharmony_ci		pins = "SC9860_RFCTL33";
518c2ecf20Sopenharmony_ci		function = "func2";
528c2ecf20Sopenharmony_ci		sprd,sleep-mode = <AP_SLEEP | PUBCP_SLEEP>;
538c2ecf20Sopenharmony_ci		grp2_sleep_mode: rfctl_33_sleep {
548c2ecf20Sopenharmony_ci			pins = "SC9860_RFCTL33";
558c2ecf20Sopenharmony_ci			sleep-hardware-state;
568c2ecf20Sopenharmony_ci			output-low;
578c2ecf20Sopenharmony_ci		}
588c2ecf20Sopenharmony_ci	};
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci	grp3: rfctl_misc_20 {
618c2ecf20Sopenharmony_ci		pins = "SC9860_RFCTL20_MISC";
628c2ecf20Sopenharmony_ci		drive-strength = <10>;
638c2ecf20Sopenharmony_ci		bias-pull-up = <4700>;
648c2ecf20Sopenharmony_ci		grp3_sleep_mode: rfctl_misc_sleep {
658c2ecf20Sopenharmony_ci			pins = "SC9860_RFCTL20_MISC";
668c2ecf20Sopenharmony_ci			sleep-hardware-state;
678c2ecf20Sopenharmony_ci			bias-pull-up;
688c2ecf20Sopenharmony_ci		}
698c2ecf20Sopenharmony_ci	};
708c2ecf20Sopenharmony_ci};
71