1*4882a593SmuzhiyunActions Semi S900 Pin Controller 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThis binding describes the pin controller found in the S900 SoC. 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunRequired Properties: 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun- compatible: Should be "actions,s900-pinctrl" 8*4882a593Smuzhiyun- reg: Should contain the register base address and size of 9*4882a593Smuzhiyun the pin controller. 10*4882a593Smuzhiyun- clocks: phandle of the clock feeding the pin controller 11*4882a593Smuzhiyun- gpio-controller: Marks the device node as a GPIO controller. 12*4882a593Smuzhiyun- gpio-ranges: Specifies the mapping between gpio controller and 13*4882a593Smuzhiyun pin-controller pins. 14*4882a593Smuzhiyun- #gpio-cells: Should be two. The first cell is the gpio pin number 15*4882a593Smuzhiyun and the second cell is used for optional parameters. 16*4882a593Smuzhiyun- interrupt-controller: Marks the device node as an interrupt controller. 17*4882a593Smuzhiyun- #interrupt-cells: Specifies the number of cells needed to encode an 18*4882a593Smuzhiyun interrupt. Shall be set to 2. The first cell 19*4882a593Smuzhiyun defines the interrupt number, the second encodes 20*4882a593Smuzhiyun the trigger flags described in 21*4882a593Smuzhiyun bindings/interrupt-controller/interrupts.txt 22*4882a593Smuzhiyun- interrupts: The interrupt outputs from the controller. There is one GPIO 23*4882a593Smuzhiyun interrupt per GPIO bank. The number of interrupts listed depends 24*4882a593Smuzhiyun on the number of GPIO banks on the SoC. The interrupts must be 25*4882a593Smuzhiyun ordered by bank, starting with bank 0. 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunPlease refer to pinctrl-bindings.txt in this directory for details of the 28*4882a593Smuzhiyuncommon pinctrl bindings used by client devices, including the meaning of the 29*4882a593Smuzhiyunphrase "pin configuration node". 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunThe pin configuration nodes act as a container for an arbitrary number of 32*4882a593Smuzhiyunsubnodes. Each of these subnodes represents some desired configuration for a 33*4882a593Smuzhiyunpin, a group, or a list of pins or groups. This configuration can include the 34*4882a593Smuzhiyunmux function to select on those group(s), and various pin configuration 35*4882a593Smuzhiyunparameters, such as pull-up, drive strength, etc. 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunPIN CONFIGURATION NODES: 38*4882a593Smuzhiyun 39*4882a593SmuzhiyunThe name of each subnode is not important; all subnodes should be enumerated 40*4882a593Smuzhiyunand processed purely based on their content. 41*4882a593Smuzhiyun 42*4882a593SmuzhiyunEach subnode only affects those parameters that are explicitly listed. In 43*4882a593Smuzhiyunother words, a subnode that lists a mux function but no pin configuration 44*4882a593Smuzhiyunparameters implies no information about any pin configuration parameters. 45*4882a593SmuzhiyunSimilarly, a pin subnode that describes a pullup parameter implies no 46*4882a593Smuzhiyuninformation about e.g. the mux function. 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunPinmux functions are available only for the pin groups while pinconf 49*4882a593Smuzhiyunparameters are available for both pin groups and individual pins. 50*4882a593Smuzhiyun 51*4882a593SmuzhiyunThe following generic properties as defined in pinctrl-bindings.txt are valid 52*4882a593Smuzhiyunto specify in a pin configuration subnode: 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunRequired Properties: 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun- pins: An array of strings, each string containing the name of a pin. 57*4882a593Smuzhiyun These pins are used for selecting the pull control and schmitt 58*4882a593Smuzhiyun trigger parameters. The following are the list of pins 59*4882a593Smuzhiyun available: 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun eth_txd0, eth_txd1, eth_txen, eth_rxer, eth_crs_dv, 62*4882a593Smuzhiyun eth_rxd1, eth_rxd0, eth_ref_clk, eth_mdc, eth_mdio, 63*4882a593Smuzhiyun sirq0, sirq1, sirq2, i2s_d0, i2s_bclk0, i2s_lrclk0, 64*4882a593Smuzhiyun i2s_mclk0, i2s_d1, i2s_bclk1, i2s_lrclk1, i2s_mclk1, 65*4882a593Smuzhiyun pcm1_in, pcm1_clk, pcm1_sync, pcm1_out, eram_a5, 66*4882a593Smuzhiyun eram_a6, eram_a7, eram_a8, eram_a9, eram_a10, eram_a11, 67*4882a593Smuzhiyun lvds_oep, lvds_oen, lvds_odp, lvds_odn, lvds_ocp, 68*4882a593Smuzhiyun lvds_ocn, lvds_obp, lvds_obn, lvds_oap, lvds_oan, 69*4882a593Smuzhiyun lvds_eep, lvds_een, lvds_edp, lvds_edn, lvds_ecp, 70*4882a593Smuzhiyun lvds_ecn, lvds_ebp, lvds_ebn, lvds_eap, lvds_ean, 71*4882a593Smuzhiyun sd0_d0, sd0_d1, sd0_d2, sd0_d3, sd1_d0, sd1_d1, 72*4882a593Smuzhiyun sd1_d2, sd1_d3, sd0_cmd, sd0_clk, sd1_cmd, sd1_clk, 73*4882a593Smuzhiyun spi0_sclk, spi0_ss, spi0_miso, spi0_mosi, uart0_rx, 74*4882a593Smuzhiyun uart0_tx, uart2_rx, uart2_tx, uart2_rtsb, uart2_ctsb, 75*4882a593Smuzhiyun uart3_rx, uart3_tx, uart3_rtsb, uart3_ctsb, uart4_rx, 76*4882a593Smuzhiyun uart4_tx, i2c0_sclk, i2c0_sdata, i2c1_sclk, i2c1_sdata, 77*4882a593Smuzhiyun i2c2_sclk, i2c2_sdata, csi0_dn0, csi0_dp0, csi0_dn1, 78*4882a593Smuzhiyun csi0_dp1, csi0_cn, csi0_cp, csi0_dn2, csi0_dp2, csi0_dn3, 79*4882a593Smuzhiyun csi0_dp3, dsi_dp3, dsi_dn3, dsi_dp1, dsi_dn1, dsi_cp, 80*4882a593Smuzhiyun dsi_cn, dsi_dp0, dsi_dn0, dsi_dp2, dsi_dn2, sensor0_pclk, 81*4882a593Smuzhiyun csi1_dn0,csi1_dp0,csi1_dn1, csi1_dp1, csi1_cn, csi1_cp, 82*4882a593Smuzhiyun sensor0_ckout, nand0_d0, nand0_d1, nand0_d2, nand0_d3, 83*4882a593Smuzhiyun nand0_d4, nand0_d5, nand0_d6, nand0_d7, nand0_dqs, 84*4882a593Smuzhiyun nand0_dqsn, nand0_ale, nand0_cle, nand0_ceb0, nand0_ceb1, 85*4882a593Smuzhiyun nand0_ceb2, nand0_ceb3, nand1_d0, nand1_d1, nand1_d2, 86*4882a593Smuzhiyun nand1_d3, nand1_d4, nand1_d5, nand1_d6, nand1_d7, nand1_dqs, 87*4882a593Smuzhiyun nand1_dqsn, nand1_ale, nand1_cle, nand1_ceb0, nand1_ceb1, 88*4882a593Smuzhiyun nand1_ceb2, nand1_ceb3, sgpio0, sgpio1, sgpio2, sgpio3 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun- groups: An array of strings, each string containing the name of a pin 91*4882a593Smuzhiyun group. These pin groups are used for selecting the pinmux 92*4882a593Smuzhiyun functions. 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun lvds_oxx_uart4_mfp, rmii_mdc_mfp, rmii_mdio_mfp, sirq0_mfp, 95*4882a593Smuzhiyun sirq1_mfp, rmii_txd0_mfp, rmii_txd1_mfp, rmii_txen_mfp, 96*4882a593Smuzhiyun rmii_rxer_mfp, rmii_crs_dv_mfp, rmii_rxd1_mfp, rmii_rxd0_mfp, 97*4882a593Smuzhiyun rmii_ref_clk_mfp, i2s_d0_mfp, i2s_d1_mfp, i2s_lr_m_clk0_mfp, 98*4882a593Smuzhiyun i2s_bclk0_mfp, i2s_bclk1_mclk1_mfp, pcm1_in_out_mfp, 99*4882a593Smuzhiyun pcm1_clk_mfp, pcm1_sync_mfp, eram_a5_mfp, eram_a6_mfp, 100*4882a593Smuzhiyun eram_a7_mfp, eram_a8_mfp, eram_a9_mfp, eram_a10_mfp, 101*4882a593Smuzhiyun eram_a11_mfp, lvds_oep_odn_mfp, lvds_ocp_obn_mfp, 102*4882a593Smuzhiyun lvds_oap_oan_mfp, lvds_e_mfp, spi0_sclk_mosi_mfp, spi0_ss_mfp, 103*4882a593Smuzhiyun spi0_miso_mfp, uart2_rtsb_mfp, uart2_ctsb_mfp, uart3_rtsb_mfp, 104*4882a593Smuzhiyun uart3_ctsb_mfp, sd0_d0_mfp, sd0_d1_mfp, sd0_d2_d3_mfp, 105*4882a593Smuzhiyun sd1_d0_d3_mfp, sd0_cmd_mfp, sd0_clk_mfp, sd1_cmd_clk_mfp, 106*4882a593Smuzhiyun uart0_rx_mfp, nand0_d0_ceb3_mfp, uart0_tx_mfp, i2c0_mfp, 107*4882a593Smuzhiyun csi0_cn_cp_mfp, csi0_dn0_dp3_mfp, csi1_dn0_cp_mfp, 108*4882a593Smuzhiyun dsi_dp3_dn1_mfp, dsi_cp_dn0_mfp, dsi_dp2_dn2_mfp, 109*4882a593Smuzhiyun nand1_d0_ceb1_mfp, nand1_ceb3_mfp, nand1_ceb0_mfp, 110*4882a593Smuzhiyun csi1_dn0_dp0_mfp, uart4_rx_tx_mfp 111*4882a593Smuzhiyun 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun These pin groups are used for selecting the drive strength 114*4882a593Smuzhiyun parameters. 115*4882a593Smuzhiyun 116*4882a593Smuzhiyun sgpio3_drv, sgpio2_drv, sgpio1_drv, sgpio0_drv, 117*4882a593Smuzhiyun rmii_tx_d0_d1_drv, rmii_txen_rxer_drv, rmii_crs_dv_drv, 118*4882a593Smuzhiyun rmii_rx_d1_d0_drv, rmii_ref_clk_drv, rmii_mdc_mdio_drv, 119*4882a593Smuzhiyun sirq_0_1_drv, sirq2_drv, i2s_d0_d1_drv, i2s_lr_m_clk0_drv, 120*4882a593Smuzhiyun i2s_blk1_mclk1_drv, pcm1_in_out_drv, lvds_oap_oan_drv, 121*4882a593Smuzhiyun lvds_oep_odn_drv, lvds_ocp_obn_drv, lvds_e_drv, sd0_d3_d0_drv, 122*4882a593Smuzhiyun sd1_d3_d0_drv, sd0_sd1_cmd_clk_drv, spi0_sclk_mosi_drv, 123*4882a593Smuzhiyun spi0_ss_miso_drv, uart0_rx_tx_drv, uart4_rx_tx_drv, uart2_drv, 124*4882a593Smuzhiyun uart3_drv, i2c0_drv, i2c1_drv, i2c2_drv, sensor0_drv 125*4882a593Smuzhiyun 126*4882a593Smuzhiyun These pin groups are used for selecting the slew rate 127*4882a593Smuzhiyun parameters. 128*4882a593Smuzhiyun 129*4882a593Smuzhiyun sgpio3_sr, sgpio2_sr, sgpio1_sr, sgpio0_sr, rmii_tx_d0_d1_sr, 130*4882a593Smuzhiyun rmii_txen_rxer_sr, rmii_crs_dv_sr, rmii_rx_d1_d0_sr, 131*4882a593Smuzhiyun rmii_ref_clk_sr, rmii_mdc_mdio_sr, sirq_0_1_sr, sirq2_sr, 132*4882a593Smuzhiyun i2s_do_d1_sr, i2s_lr_m_clk0_sr, i2s_bclk0_mclk1_sr, 133*4882a593Smuzhiyun pcm1_in_out_sr, sd1_d3_d0_sr, sd0_sd1_clk_cmd_sr, 134*4882a593Smuzhiyun spi0_sclk_mosi_sr, spi0_ss_miso_sr, uart0_rx_tx_sr, 135*4882a593Smuzhiyun uart4_rx_tx_sr, uart2_sr, uart3_sr, i2c0_sr, i2c1_sr, i2c2_sr, 136*4882a593Smuzhiyun sensor0_sr 137*4882a593Smuzhiyun 138*4882a593Smuzhiyun- function: An array of strings, each string containing the name of the 139*4882a593Smuzhiyun pinmux functions. These functions can only be selected by 140*4882a593Smuzhiyun the corresponding pin groups. The following are the list of 141*4882a593Smuzhiyun pinmux functions available: 142*4882a593Smuzhiyun 143*4882a593Smuzhiyun eram, eth_rmii, eth_smii, spi0, spi1, spi2, spi3, sens0, 144*4882a593Smuzhiyun uart0, uart1, uart2, uart3, uart4, uart5, uart6, i2s0, i2s1, 145*4882a593Smuzhiyun pcm0, pcm1, jtag, pwm0, pwm1, pwm2, pwm3, pwm4, pwm5, sd0, 146*4882a593Smuzhiyun sd1, sd2, sd3, i2c0, i2c1, i2c2, i2c3, i2c4, i2c5, lvds, 147*4882a593Smuzhiyun usb30, usb20, gpu, mipi_csi0, mipi_csi1, mipi_dsi, nand0, 148*4882a593Smuzhiyun nand1, spdif, sirq0, sirq1, sirq2 149*4882a593Smuzhiyun 150*4882a593SmuzhiyunOptional Properties: 151*4882a593Smuzhiyun 152*4882a593Smuzhiyun- bias-bus-hold: No arguments. The specified pins should retain the previous 153*4882a593Smuzhiyun state value. 154*4882a593Smuzhiyun- bias-high-impedance: No arguments. The specified pins should be configured 155*4882a593Smuzhiyun as high impedance. 156*4882a593Smuzhiyun- bias-pull-down: No arguments. The specified pins should be configured as 157*4882a593Smuzhiyun pull down. 158*4882a593Smuzhiyun- bias-pull-up: No arguments. The specified pins should be configured as 159*4882a593Smuzhiyun pull up. 160*4882a593Smuzhiyun- input-schmitt-enable: No arguments: Enable schmitt trigger for the specified 161*4882a593Smuzhiyun pins 162*4882a593Smuzhiyun- input-schmitt-disable: No arguments: Disable schmitt trigger for the specified 163*4882a593Smuzhiyun pins 164*4882a593Smuzhiyun- slew-rate: Integer. Sets slew rate for the specified pins. 165*4882a593Smuzhiyun Valid values are: 166*4882a593Smuzhiyun <0> - Slow 167*4882a593Smuzhiyun <1> - Fast 168*4882a593Smuzhiyun- drive-strength: Integer. Selects the drive strength for the specified 169*4882a593Smuzhiyun pins in mA. 170*4882a593Smuzhiyun Valid values are: 171*4882a593Smuzhiyun <2> 172*4882a593Smuzhiyun <4> 173*4882a593Smuzhiyun <8> 174*4882a593Smuzhiyun <12> 175*4882a593Smuzhiyun 176*4882a593SmuzhiyunExample: 177*4882a593Smuzhiyun 178*4882a593Smuzhiyun pinctrl: pinctrl@e01b0000 { 179*4882a593Smuzhiyun compatible = "actions,s900-pinctrl"; 180*4882a593Smuzhiyun reg = <0x0 0xe01b0000 0x0 0x1000>; 181*4882a593Smuzhiyun clocks = <&cmu CLK_GPIO>; 182*4882a593Smuzhiyun gpio-controller; 183*4882a593Smuzhiyun gpio-ranges = <&pinctrl 0 0 146>; 184*4882a593Smuzhiyun #gpio-cells = <2>; 185*4882a593Smuzhiyun interrupt-controller; 186*4882a593Smuzhiyun #interrupt-cells = <2>; 187*4882a593Smuzhiyun interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, 188*4882a593Smuzhiyun <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, 189*4882a593Smuzhiyun <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, 190*4882a593Smuzhiyun <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, 191*4882a593Smuzhiyun <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, 192*4882a593Smuzhiyun <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; 193*4882a593Smuzhiyun 194*4882a593Smuzhiyun uart2-default: uart2-default { 195*4882a593Smuzhiyun pinmux { 196*4882a593Smuzhiyun groups = "lvds_oep_odn_mfp"; 197*4882a593Smuzhiyun function = "uart2"; 198*4882a593Smuzhiyun }; 199*4882a593Smuzhiyun pinconf { 200*4882a593Smuzhiyun groups = "lvds_oep_odn_drv"; 201*4882a593Smuzhiyun drive-strength = <12>; 202*4882a593Smuzhiyun }; 203*4882a593Smuzhiyun }; 204*4882a593Smuzhiyun }; 205