18c2ecf20Sopenharmony_ciBitmain BM1880 Pin Controller 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThis binding describes the pin controller found in the BM1880 SoC. 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ciRequired Properties: 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci- compatible: Should be "bitmain,bm1880-pinctrl" 88c2ecf20Sopenharmony_ci- reg: Offset and length of pinctrl space in SCTRL. 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciPlease refer to pinctrl-bindings.txt in this directory for details of the 118c2ecf20Sopenharmony_cicommon pinctrl bindings used by client devices, including the meaning of the 128c2ecf20Sopenharmony_ciphrase "pin configuration node". 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciThe pin configuration nodes act as a container for an arbitrary number of 158c2ecf20Sopenharmony_cisubnodes. Each of these subnodes represents some desired configuration for a 168c2ecf20Sopenharmony_cipin, a group, or a list of pins or groups. This configuration for BM1880 SoC 178c2ecf20Sopenharmony_ciincludes pinmux and various pin configuration parameters, such as pull-up, 188c2ecf20Sopenharmony_cislew rate etc... 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciEach configuration node can consist of multiple nodes describing the pinmux 218c2ecf20Sopenharmony_cioptions. The name of each subnode is not important; all subnodes should be 228c2ecf20Sopenharmony_cienumerated and processed purely based on their content. 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciThe following generic properties as defined in pinctrl-bindings.txt are valid 258c2ecf20Sopenharmony_cito specify in a pinmux subnode: 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciRequired Properties: 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci- pins: An array of strings, each string containing the name of a pin. 308c2ecf20Sopenharmony_ci Valid values for pins are: 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci MIO0 - MIO111 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci- groups: An array of strings, each string containing the name of a pin 358c2ecf20Sopenharmony_ci group. Valid values for groups are: 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci nand_grp, spi_grp, emmc_grp, sdio_grp, eth0_grp, pwm0_grp, 388c2ecf20Sopenharmony_ci pwm1_grp, pwm2_grp, pwm3_grp, pwm4_grp, pwm5_grp, pwm6_grp, 398c2ecf20Sopenharmony_ci pwm7_grp, pwm8_grp, pwm9_grp, pwm10_grp, pwm11_grp, pwm12_grp, 408c2ecf20Sopenharmony_ci pwm13_grp, pwm14_grp, pwm15_grp, pwm16_grp, pwm17_grp, 418c2ecf20Sopenharmony_ci pwm18_grp, pwm19_grp, pwm20_grp, pwm21_grp, pwm22_grp, 428c2ecf20Sopenharmony_ci pwm23_grp, pwm24_grp, pwm25_grp, pwm26_grp, pwm27_grp, 438c2ecf20Sopenharmony_ci pwm28_grp, pwm29_grp, pwm30_grp, pwm31_grp, pwm32_grp, 448c2ecf20Sopenharmony_ci pwm33_grp, pwm34_grp, pwm35_grp, pwm36_grp, i2c0_grp, 458c2ecf20Sopenharmony_ci i2c1_grp, i2c2_grp, i2c3_grp, i2c4_grp, uart0_grp, uart1_grp, 468c2ecf20Sopenharmony_ci uart2_grp, uart3_grp, uart4_grp, uart5_grp, uart6_grp, 478c2ecf20Sopenharmony_ci uart7_grp, uart8_grp, uart9_grp, uart10_grp, uart11_grp, 488c2ecf20Sopenharmony_ci uart12_grp, uart13_grp, uart14_grp, uart15_grp, gpio0_grp, 498c2ecf20Sopenharmony_ci gpio1_grp, gpio2_grp, gpio3_grp, gpio4_grp, gpio5_grp, 508c2ecf20Sopenharmony_ci gpio6_grp, gpio7_grp, gpio8_grp, gpio9_grp, gpio10_grp, 518c2ecf20Sopenharmony_ci gpio11_grp, gpio12_grp, gpio13_grp, gpio14_grp, gpio15_grp, 528c2ecf20Sopenharmony_ci gpio16_grp, gpio17_grp, gpio18_grp, gpio19_grp, gpio20_grp, 538c2ecf20Sopenharmony_ci gpio21_grp, gpio22_grp, gpio23_grp, gpio24_grp, gpio25_grp, 548c2ecf20Sopenharmony_ci gpio26_grp, gpio27_grp, gpio28_grp, gpio29_grp, gpio30_grp, 558c2ecf20Sopenharmony_ci gpio31_grp, gpio32_grp, gpio33_grp, gpio34_grp, gpio35_grp, 568c2ecf20Sopenharmony_ci gpio36_grp, gpio37_grp, gpio38_grp, gpio39_grp, gpio40_grp, 578c2ecf20Sopenharmony_ci gpio41_grp, gpio42_grp, gpio43_grp, gpio44_grp, gpio45_grp, 588c2ecf20Sopenharmony_ci gpio46_grp, gpio47_grp, gpio48_grp, gpio49_grp, gpio50_grp, 598c2ecf20Sopenharmony_ci gpio51_grp, gpio52_grp, gpio53_grp, gpio54_grp, gpio55_grp, 608c2ecf20Sopenharmony_ci gpio56_grp, gpio57_grp, gpio58_grp, gpio59_grp, gpio60_grp, 618c2ecf20Sopenharmony_ci gpio61_grp, gpio62_grp, gpio63_grp, gpio64_grp, gpio65_grp, 628c2ecf20Sopenharmony_ci gpio66_grp, gpio67_grp, eth1_grp, i2s0_grp, i2s0_mclkin_grp, 638c2ecf20Sopenharmony_ci i2s1_grp, i2s1_mclkin_grp, spi0_grp 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci- function: An array of strings, each string containing the name of the 668c2ecf20Sopenharmony_ci pinmux functions. The following are the list of pinmux 678c2ecf20Sopenharmony_ci functions available: 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci nand, spi, emmc, sdio, eth0, pwm0, pwm1, pwm2, pwm3, pwm4, 708c2ecf20Sopenharmony_ci pwm5, pwm6, pwm7, pwm8, pwm9, pwm10, pwm11, pwm12, pwm13, 718c2ecf20Sopenharmony_ci pwm14, pwm15, pwm16, pwm17, pwm18, pwm19, pwm20, pwm21, pwm22, 728c2ecf20Sopenharmony_ci pwm23, pwm24, pwm25, pwm26, pwm27, pwm28, pwm29, pwm30, pwm31, 738c2ecf20Sopenharmony_ci pwm32, pwm33, pwm34, pwm35, pwm36, i2c0, i2c1, i2c2, i2c3, 748c2ecf20Sopenharmony_ci i2c4, uart0, uart1, uart2, uart3, uart4, uart5, uart6, uart7, 758c2ecf20Sopenharmony_ci uart8, uart9, uart10, uart11, uart12, uart13, uart14, uart15, 768c2ecf20Sopenharmony_ci gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7, gpio8, 778c2ecf20Sopenharmony_ci gpio9, gpio10, gpio11, gpio12, gpio13, gpio14, gpio15, gpio16, 788c2ecf20Sopenharmony_ci gpio17, gpio18, gpio19, gpio20, gpio21, gpio22, gpio23, 798c2ecf20Sopenharmony_ci gpio24, gpio25, gpio26, gpio27, gpio28, gpio29, gpio30, 808c2ecf20Sopenharmony_ci gpio31, gpio32, gpio33, gpio34, gpio35, gpio36, gpio37, 818c2ecf20Sopenharmony_ci gpio38, gpio39, gpio40, gpio41, gpio42, gpio43, gpio44, 828c2ecf20Sopenharmony_ci gpio45, gpio46, gpio47, gpio48, gpio49, gpio50, gpio51, 838c2ecf20Sopenharmony_ci gpio52, gpio53, gpio54, gpio55, gpio56, gpio57, gpio58, 848c2ecf20Sopenharmony_ci gpio59, gpio60, gpio61, gpio62, gpio63, gpio64, gpio65, 858c2ecf20Sopenharmony_ci gpio66, gpio67, eth1, i2s0, i2s0_mclkin, i2s1, i2s1_mclkin, 868c2ecf20Sopenharmony_ci spi0 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ciOptional Properties: 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci- bias-disable: No arguments. Disable pin bias. 918c2ecf20Sopenharmony_ci- bias-pull-down: No arguments. The specified pins should be configured as 928c2ecf20Sopenharmony_ci pull down. 938c2ecf20Sopenharmony_ci- bias-pull-up: No arguments. The specified pins should be configured as 948c2ecf20Sopenharmony_ci pull up. 958c2ecf20Sopenharmony_ci- input-schmitt-enable: No arguments: Enable schmitt trigger for the specified 968c2ecf20Sopenharmony_ci pins 978c2ecf20Sopenharmony_ci- input-schmitt-disable: No arguments: Disable schmitt trigger for the specified 988c2ecf20Sopenharmony_ci pins 998c2ecf20Sopenharmony_ci- slew-rate: Integer. Sets slew rate for the specified pins. 1008c2ecf20Sopenharmony_ci Valid values are: 1018c2ecf20Sopenharmony_ci <0> - Slow 1028c2ecf20Sopenharmony_ci <1> - Fast 1038c2ecf20Sopenharmony_ci- drive-strength: Integer. Selects the drive strength for the specified 1048c2ecf20Sopenharmony_ci pins in mA. 1058c2ecf20Sopenharmony_ci Valid values are: 1068c2ecf20Sopenharmony_ci <4> 1078c2ecf20Sopenharmony_ci <8> 1088c2ecf20Sopenharmony_ci <12> 1098c2ecf20Sopenharmony_ci <16> 1108c2ecf20Sopenharmony_ci <20> 1118c2ecf20Sopenharmony_ci <24> 1128c2ecf20Sopenharmony_ci <28> 1138c2ecf20Sopenharmony_ci <32> 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ciExample: 1168c2ecf20Sopenharmony_ci pinctrl: pinctrl@400 { 1178c2ecf20Sopenharmony_ci compatible = "bitmain,bm1880-pinctrl"; 1188c2ecf20Sopenharmony_ci reg = <0x400 0x120>; 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci pinctrl_uart0_default: uart0-default { 1218c2ecf20Sopenharmony_ci pinmux { 1228c2ecf20Sopenharmony_ci groups = "uart0_grp"; 1238c2ecf20Sopenharmony_ci function = "uart0"; 1248c2ecf20Sopenharmony_ci }; 1258c2ecf20Sopenharmony_ci }; 1268c2ecf20Sopenharmony_ci }; 127