162306a36Sopenharmony_ciActions Semi S900 Pin Controller 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciThis binding describes the pin controller found in the S900 SoC. 462306a36Sopenharmony_ci 562306a36Sopenharmony_ciRequired Properties: 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci- compatible: Should be "actions,s900-pinctrl" 862306a36Sopenharmony_ci- reg: Should contain the register base address and size of 962306a36Sopenharmony_ci the pin controller. 1062306a36Sopenharmony_ci- clocks: phandle of the clock feeding the pin controller 1162306a36Sopenharmony_ci- gpio-controller: Marks the device node as a GPIO controller. 1262306a36Sopenharmony_ci- gpio-ranges: Specifies the mapping between gpio controller and 1362306a36Sopenharmony_ci pin-controller pins. 1462306a36Sopenharmony_ci- #gpio-cells: Should be two. The first cell is the gpio pin number 1562306a36Sopenharmony_ci and the second cell is used for optional parameters. 1662306a36Sopenharmony_ci- interrupt-controller: Marks the device node as an interrupt controller. 1762306a36Sopenharmony_ci- #interrupt-cells: Specifies the number of cells needed to encode an 1862306a36Sopenharmony_ci interrupt. Shall be set to 2. The first cell 1962306a36Sopenharmony_ci defines the interrupt number, the second encodes 2062306a36Sopenharmony_ci the trigger flags described in 2162306a36Sopenharmony_ci bindings/interrupt-controller/interrupts.txt 2262306a36Sopenharmony_ci- interrupts: The interrupt outputs from the controller. There is one GPIO 2362306a36Sopenharmony_ci interrupt per GPIO bank. The number of interrupts listed depends 2462306a36Sopenharmony_ci on the number of GPIO banks on the SoC. The interrupts must be 2562306a36Sopenharmony_ci ordered by bank, starting with bank 0. 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ciPlease refer to pinctrl-bindings.txt in this directory for details of the 2862306a36Sopenharmony_cicommon pinctrl bindings used by client devices, including the meaning of the 2962306a36Sopenharmony_ciphrase "pin configuration node". 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciThe pin configuration nodes act as a container for an arbitrary number of 3262306a36Sopenharmony_cisubnodes. Each of these subnodes represents some desired configuration for a 3362306a36Sopenharmony_cipin, a group, or a list of pins or groups. This configuration can include the 3462306a36Sopenharmony_cimux function to select on those group(s), and various pin configuration 3562306a36Sopenharmony_ciparameters, such as pull-up, drive strength, etc. 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ciPIN CONFIGURATION NODES: 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ciThe name of each subnode is not important; all subnodes should be enumerated 4062306a36Sopenharmony_ciand processed purely based on their content. 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ciEach subnode only affects those parameters that are explicitly listed. In 4362306a36Sopenharmony_ciother words, a subnode that lists a mux function but no pin configuration 4462306a36Sopenharmony_ciparameters implies no information about any pin configuration parameters. 4562306a36Sopenharmony_ciSimilarly, a pin subnode that describes a pullup parameter implies no 4662306a36Sopenharmony_ciinformation about e.g. the mux function. 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ciPinmux functions are available only for the pin groups while pinconf 4962306a36Sopenharmony_ciparameters are available for both pin groups and individual pins. 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ciThe following generic properties as defined in pinctrl-bindings.txt are valid 5262306a36Sopenharmony_cito specify in a pin configuration subnode: 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ciRequired Properties: 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ci- pins: An array of strings, each string containing the name of a pin. 5762306a36Sopenharmony_ci These pins are used for selecting the pull control and schmitt 5862306a36Sopenharmony_ci trigger parameters. The following are the list of pins 5962306a36Sopenharmony_ci available: 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ci eth_txd0, eth_txd1, eth_txen, eth_rxer, eth_crs_dv, 6262306a36Sopenharmony_ci eth_rxd1, eth_rxd0, eth_ref_clk, eth_mdc, eth_mdio, 6362306a36Sopenharmony_ci sirq0, sirq1, sirq2, i2s_d0, i2s_bclk0, i2s_lrclk0, 6462306a36Sopenharmony_ci i2s_mclk0, i2s_d1, i2s_bclk1, i2s_lrclk1, i2s_mclk1, 6562306a36Sopenharmony_ci pcm1_in, pcm1_clk, pcm1_sync, pcm1_out, eram_a5, 6662306a36Sopenharmony_ci eram_a6, eram_a7, eram_a8, eram_a9, eram_a10, eram_a11, 6762306a36Sopenharmony_ci lvds_oep, lvds_oen, lvds_odp, lvds_odn, lvds_ocp, 6862306a36Sopenharmony_ci lvds_ocn, lvds_obp, lvds_obn, lvds_oap, lvds_oan, 6962306a36Sopenharmony_ci lvds_eep, lvds_een, lvds_edp, lvds_edn, lvds_ecp, 7062306a36Sopenharmony_ci lvds_ecn, lvds_ebp, lvds_ebn, lvds_eap, lvds_ean, 7162306a36Sopenharmony_ci sd0_d0, sd0_d1, sd0_d2, sd0_d3, sd1_d0, sd1_d1, 7262306a36Sopenharmony_ci sd1_d2, sd1_d3, sd0_cmd, sd0_clk, sd1_cmd, sd1_clk, 7362306a36Sopenharmony_ci spi0_sclk, spi0_ss, spi0_miso, spi0_mosi, uart0_rx, 7462306a36Sopenharmony_ci uart0_tx, uart2_rx, uart2_tx, uart2_rtsb, uart2_ctsb, 7562306a36Sopenharmony_ci uart3_rx, uart3_tx, uart3_rtsb, uart3_ctsb, uart4_rx, 7662306a36Sopenharmony_ci uart4_tx, i2c0_sclk, i2c0_sdata, i2c1_sclk, i2c1_sdata, 7762306a36Sopenharmony_ci i2c2_sclk, i2c2_sdata, csi0_dn0, csi0_dp0, csi0_dn1, 7862306a36Sopenharmony_ci csi0_dp1, csi0_cn, csi0_cp, csi0_dn2, csi0_dp2, csi0_dn3, 7962306a36Sopenharmony_ci csi0_dp3, dsi_dp3, dsi_dn3, dsi_dp1, dsi_dn1, dsi_cp, 8062306a36Sopenharmony_ci dsi_cn, dsi_dp0, dsi_dn0, dsi_dp2, dsi_dn2, sensor0_pclk, 8162306a36Sopenharmony_ci csi1_dn0,csi1_dp0,csi1_dn1, csi1_dp1, csi1_cn, csi1_cp, 8262306a36Sopenharmony_ci sensor0_ckout, nand0_d0, nand0_d1, nand0_d2, nand0_d3, 8362306a36Sopenharmony_ci nand0_d4, nand0_d5, nand0_d6, nand0_d7, nand0_dqs, 8462306a36Sopenharmony_ci nand0_dqsn, nand0_ale, nand0_cle, nand0_ceb0, nand0_ceb1, 8562306a36Sopenharmony_ci nand0_ceb2, nand0_ceb3, nand1_d0, nand1_d1, nand1_d2, 8662306a36Sopenharmony_ci nand1_d3, nand1_d4, nand1_d5, nand1_d6, nand1_d7, nand1_dqs, 8762306a36Sopenharmony_ci nand1_dqsn, nand1_ale, nand1_cle, nand1_ceb0, nand1_ceb1, 8862306a36Sopenharmony_ci nand1_ceb2, nand1_ceb3, sgpio0, sgpio1, sgpio2, sgpio3 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci- groups: An array of strings, each string containing the name of a pin 9162306a36Sopenharmony_ci group. These pin groups are used for selecting the pinmux 9262306a36Sopenharmony_ci functions. 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ci lvds_oxx_uart4_mfp, rmii_mdc_mfp, rmii_mdio_mfp, sirq0_mfp, 9562306a36Sopenharmony_ci sirq1_mfp, rmii_txd0_mfp, rmii_txd1_mfp, rmii_txen_mfp, 9662306a36Sopenharmony_ci rmii_rxer_mfp, rmii_crs_dv_mfp, rmii_rxd1_mfp, rmii_rxd0_mfp, 9762306a36Sopenharmony_ci rmii_ref_clk_mfp, i2s_d0_mfp, i2s_d1_mfp, i2s_lr_m_clk0_mfp, 9862306a36Sopenharmony_ci i2s_bclk0_mfp, i2s_bclk1_mclk1_mfp, pcm1_in_out_mfp, 9962306a36Sopenharmony_ci pcm1_clk_mfp, pcm1_sync_mfp, eram_a5_mfp, eram_a6_mfp, 10062306a36Sopenharmony_ci eram_a7_mfp, eram_a8_mfp, eram_a9_mfp, eram_a10_mfp, 10162306a36Sopenharmony_ci eram_a11_mfp, lvds_oep_odn_mfp, lvds_ocp_obn_mfp, 10262306a36Sopenharmony_ci lvds_oap_oan_mfp, lvds_e_mfp, spi0_sclk_mosi_mfp, spi0_ss_mfp, 10362306a36Sopenharmony_ci spi0_miso_mfp, uart2_rtsb_mfp, uart2_ctsb_mfp, uart3_rtsb_mfp, 10462306a36Sopenharmony_ci uart3_ctsb_mfp, sd0_d0_mfp, sd0_d1_mfp, sd0_d2_d3_mfp, 10562306a36Sopenharmony_ci sd1_d0_d3_mfp, sd0_cmd_mfp, sd0_clk_mfp, sd1_cmd_clk_mfp, 10662306a36Sopenharmony_ci uart0_rx_mfp, nand0_d0_ceb3_mfp, uart0_tx_mfp, i2c0_mfp, 10762306a36Sopenharmony_ci csi0_cn_cp_mfp, csi0_dn0_dp3_mfp, csi1_dn0_cp_mfp, 10862306a36Sopenharmony_ci dsi_dp3_dn1_mfp, dsi_cp_dn0_mfp, dsi_dp2_dn2_mfp, 10962306a36Sopenharmony_ci nand1_d0_ceb1_mfp, nand1_ceb3_mfp, nand1_ceb0_mfp, 11062306a36Sopenharmony_ci csi1_dn0_dp0_mfp, uart4_rx_tx_mfp 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci These pin groups are used for selecting the drive strength 11462306a36Sopenharmony_ci parameters. 11562306a36Sopenharmony_ci 11662306a36Sopenharmony_ci sgpio3_drv, sgpio2_drv, sgpio1_drv, sgpio0_drv, 11762306a36Sopenharmony_ci rmii_tx_d0_d1_drv, rmii_txen_rxer_drv, rmii_crs_dv_drv, 11862306a36Sopenharmony_ci rmii_rx_d1_d0_drv, rmii_ref_clk_drv, rmii_mdc_mdio_drv, 11962306a36Sopenharmony_ci sirq_0_1_drv, sirq2_drv, i2s_d0_d1_drv, i2s_lr_m_clk0_drv, 12062306a36Sopenharmony_ci i2s_blk1_mclk1_drv, pcm1_in_out_drv, lvds_oap_oan_drv, 12162306a36Sopenharmony_ci lvds_oep_odn_drv, lvds_ocp_obn_drv, lvds_e_drv, sd0_d3_d0_drv, 12262306a36Sopenharmony_ci sd1_d3_d0_drv, sd0_sd1_cmd_clk_drv, spi0_sclk_mosi_drv, 12362306a36Sopenharmony_ci spi0_ss_miso_drv, uart0_rx_tx_drv, uart4_rx_tx_drv, uart2_drv, 12462306a36Sopenharmony_ci uart3_drv, i2c0_drv, i2c1_drv, i2c2_drv, sensor0_drv 12562306a36Sopenharmony_ci 12662306a36Sopenharmony_ci These pin groups are used for selecting the slew rate 12762306a36Sopenharmony_ci parameters. 12862306a36Sopenharmony_ci 12962306a36Sopenharmony_ci sgpio3_sr, sgpio2_sr, sgpio1_sr, sgpio0_sr, rmii_tx_d0_d1_sr, 13062306a36Sopenharmony_ci rmii_txen_rxer_sr, rmii_crs_dv_sr, rmii_rx_d1_d0_sr, 13162306a36Sopenharmony_ci rmii_ref_clk_sr, rmii_mdc_mdio_sr, sirq_0_1_sr, sirq2_sr, 13262306a36Sopenharmony_ci i2s_do_d1_sr, i2s_lr_m_clk0_sr, i2s_bclk0_mclk1_sr, 13362306a36Sopenharmony_ci pcm1_in_out_sr, sd1_d3_d0_sr, sd0_sd1_clk_cmd_sr, 13462306a36Sopenharmony_ci spi0_sclk_mosi_sr, spi0_ss_miso_sr, uart0_rx_tx_sr, 13562306a36Sopenharmony_ci uart4_rx_tx_sr, uart2_sr, uart3_sr, i2c0_sr, i2c1_sr, i2c2_sr, 13662306a36Sopenharmony_ci sensor0_sr 13762306a36Sopenharmony_ci 13862306a36Sopenharmony_ci- function: An array of strings, each string containing the name of the 13962306a36Sopenharmony_ci pinmux functions. These functions can only be selected by 14062306a36Sopenharmony_ci the corresponding pin groups. The following are the list of 14162306a36Sopenharmony_ci pinmux functions available: 14262306a36Sopenharmony_ci 14362306a36Sopenharmony_ci eram, eth_rmii, eth_smii, spi0, spi1, spi2, spi3, sens0, 14462306a36Sopenharmony_ci uart0, uart1, uart2, uart3, uart4, uart5, uart6, i2s0, i2s1, 14562306a36Sopenharmony_ci pcm0, pcm1, jtag, pwm0, pwm1, pwm2, pwm3, pwm4, pwm5, sd0, 14662306a36Sopenharmony_ci sd1, sd2, sd3, i2c0, i2c1, i2c2, i2c3, i2c4, i2c5, lvds, 14762306a36Sopenharmony_ci usb30, usb20, gpu, mipi_csi0, mipi_csi1, mipi_dsi, nand0, 14862306a36Sopenharmony_ci nand1, spdif, sirq0, sirq1, sirq2 14962306a36Sopenharmony_ci 15062306a36Sopenharmony_ciOptional Properties: 15162306a36Sopenharmony_ci 15262306a36Sopenharmony_ci- bias-bus-hold: No arguments. The specified pins should retain the previous 15362306a36Sopenharmony_ci state value. 15462306a36Sopenharmony_ci- bias-high-impedance: No arguments. The specified pins should be configured 15562306a36Sopenharmony_ci as high impedance. 15662306a36Sopenharmony_ci- bias-pull-down: No arguments. The specified pins should be configured as 15762306a36Sopenharmony_ci pull down. 15862306a36Sopenharmony_ci- bias-pull-up: No arguments. The specified pins should be configured as 15962306a36Sopenharmony_ci pull up. 16062306a36Sopenharmony_ci- input-schmitt-enable: No arguments: Enable schmitt trigger for the specified 16162306a36Sopenharmony_ci pins 16262306a36Sopenharmony_ci- input-schmitt-disable: No arguments: Disable schmitt trigger for the specified 16362306a36Sopenharmony_ci pins 16462306a36Sopenharmony_ci- slew-rate: Integer. Sets slew rate for the specified pins. 16562306a36Sopenharmony_ci Valid values are: 16662306a36Sopenharmony_ci <0> - Slow 16762306a36Sopenharmony_ci <1> - Fast 16862306a36Sopenharmony_ci- drive-strength: Integer. Selects the drive strength for the specified 16962306a36Sopenharmony_ci pins in mA. 17062306a36Sopenharmony_ci Valid values are: 17162306a36Sopenharmony_ci <2> 17262306a36Sopenharmony_ci <4> 17362306a36Sopenharmony_ci <8> 17462306a36Sopenharmony_ci <12> 17562306a36Sopenharmony_ci 17662306a36Sopenharmony_ciExample: 17762306a36Sopenharmony_ci 17862306a36Sopenharmony_ci pinctrl: pinctrl@e01b0000 { 17962306a36Sopenharmony_ci compatible = "actions,s900-pinctrl"; 18062306a36Sopenharmony_ci reg = <0x0 0xe01b0000 0x0 0x1000>; 18162306a36Sopenharmony_ci clocks = <&cmu CLK_GPIO>; 18262306a36Sopenharmony_ci gpio-controller; 18362306a36Sopenharmony_ci gpio-ranges = <&pinctrl 0 0 146>; 18462306a36Sopenharmony_ci #gpio-cells = <2>; 18562306a36Sopenharmony_ci interrupt-controller; 18662306a36Sopenharmony_ci #interrupt-cells = <2>; 18762306a36Sopenharmony_ci interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, 18862306a36Sopenharmony_ci <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, 18962306a36Sopenharmony_ci <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, 19062306a36Sopenharmony_ci <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, 19162306a36Sopenharmony_ci <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, 19262306a36Sopenharmony_ci <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; 19362306a36Sopenharmony_ci 19462306a36Sopenharmony_ci uart2-default: uart2-default { 19562306a36Sopenharmony_ci pinmux { 19662306a36Sopenharmony_ci groups = "lvds_oep_odn_mfp"; 19762306a36Sopenharmony_ci function = "uart2"; 19862306a36Sopenharmony_ci }; 19962306a36Sopenharmony_ci pinconf { 20062306a36Sopenharmony_ci groups = "lvds_oep_odn_drv"; 20162306a36Sopenharmony_ci drive-strength = <12>; 20262306a36Sopenharmony_ci }; 20362306a36Sopenharmony_ci }; 20462306a36Sopenharmony_ci }; 205