18c2ecf20Sopenharmony_ciAbilis Systems TB10x pin controller 28c2ecf20Sopenharmony_ci=================================== 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciRequired properties 58c2ecf20Sopenharmony_ci------------------- 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci- compatible: should be "abilis,tb10x-iomux"; 88c2ecf20Sopenharmony_ci- reg: should contain the physical address and size of the pin controller's 98c2ecf20Sopenharmony_ci register range. 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciFunction definitions 138c2ecf20Sopenharmony_ci-------------------- 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciFunctions are defined (and referenced) by sub-nodes of the pin controller. 168c2ecf20Sopenharmony_ciEvery sub-node defines exactly one function (implying a set of pins). 178c2ecf20Sopenharmony_ciEvery function is associated to one named pin group inside the pin controller 188c2ecf20Sopenharmony_cidriver and these names are used to associate pin group predefinitions to pin 198c2ecf20Sopenharmony_cicontroller sub-nodes. 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciRequired function definition subnode properties: 228c2ecf20Sopenharmony_ci - abilis,function: should be set to the name of the function's pin group. 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciThe following pin groups are available: 258c2ecf20Sopenharmony_ci - GPIO ports: gpioa, gpiob, gpioc, gpiod, gpioe, gpiof, gpiog, 268c2ecf20Sopenharmony_ci gpioh, gpioi, gpioj, gpiok, gpiol, gpiom, gpion 278c2ecf20Sopenharmony_ci - Serial TS input ports: mis0, mis1, mis2, mis3, mis4, mis5, mis6, mis7 288c2ecf20Sopenharmony_ci - Parallel TS input ports: mip1, mip3, mip5, mip7 298c2ecf20Sopenharmony_ci - Serial TS output ports: mos0, mos1, mos2, mos3 308c2ecf20Sopenharmony_ci - Parallel TS output port: mop 318c2ecf20Sopenharmony_ci - CI+ port: ciplus 328c2ecf20Sopenharmony_ci - CableCard (Mcard) port: mcard 338c2ecf20Sopenharmony_ci - Smart card ports: stc0, stc1 348c2ecf20Sopenharmony_ci - UART ports: uart0, uart1 358c2ecf20Sopenharmony_ci - SPI ports: spi1, spi3 368c2ecf20Sopenharmony_ci - JTAG: jtag 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ciAll other ports of the chip are not multiplexed and thus not managed by this 398c2ecf20Sopenharmony_cidriver. 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ciGPIO ranges definition 438c2ecf20Sopenharmony_ci---------------------- 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ciThe named pin groups of GPIO ports can be used to define GPIO ranges as 468c2ecf20Sopenharmony_ciexplained in Documentation/devicetree/bindings/gpio/gpio.txt. 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ciExample 508c2ecf20Sopenharmony_ci------- 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ciiomux: iomux@ff10601c { 538c2ecf20Sopenharmony_ci compatible = "abilis,tb10x-iomux"; 548c2ecf20Sopenharmony_ci reg = <0xFF10601c 0x4>; 558c2ecf20Sopenharmony_ci pctl_gpio_a: pctl-gpio-a { 568c2ecf20Sopenharmony_ci abilis,function = "gpioa"; 578c2ecf20Sopenharmony_ci }; 588c2ecf20Sopenharmony_ci pctl_uart0: pctl-uart0 { 598c2ecf20Sopenharmony_ci abilis,function = "uart0"; 608c2ecf20Sopenharmony_ci }; 618c2ecf20Sopenharmony_ci}; 628c2ecf20Sopenharmony_ciuart@ff100000 { 638c2ecf20Sopenharmony_ci compatible = "snps,dw-apb-uart"; 648c2ecf20Sopenharmony_ci reg = <0xFF100000 0x100>; 658c2ecf20Sopenharmony_ci clock-frequency = <166666666>; 668c2ecf20Sopenharmony_ci interrupts = <25 1>; 678c2ecf20Sopenharmony_ci reg-shift = <2>; 688c2ecf20Sopenharmony_ci reg-io-width = <4>; 698c2ecf20Sopenharmony_ci pinctrl-names = "default"; 708c2ecf20Sopenharmony_ci pinctrl-0 = <&pctl_uart0>; 718c2ecf20Sopenharmony_ci}; 728c2ecf20Sopenharmony_cigpioa: gpio@ff140000 { 738c2ecf20Sopenharmony_ci compatible = "abilis,tb10x-gpio"; 748c2ecf20Sopenharmony_ci reg = <0xFF140000 0x1000>; 758c2ecf20Sopenharmony_ci gpio-controller; 768c2ecf20Sopenharmony_ci #gpio-cells = <2>; 778c2ecf20Sopenharmony_ci ngpio = <3>; 788c2ecf20Sopenharmony_ci gpio-ranges = <&iomux 0 0>; 798c2ecf20Sopenharmony_ci gpio-ranges-group-names = "gpioa"; 808c2ecf20Sopenharmony_ci}; 81