Commit 2d32fba0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull pin control updates from Linus Walleij:
 "No core changes this time.

  New drivers:

   - Xlinix Versal pin control driver

   - Ocelot LAN969x pin control driver

   - T-Head TH1520 RISC-V SoC pin control driver

   - Qualcomm SM8750, IPQ5424, QCS8300, SAR2130P and QCS615 SoC pin
     control drivers

   - Qualcomm SM8750 LPASS (low power audio subsystem) pin control
     driver

   - Qualcomm PM8937 mixsig IC pin control support, GPIO and MPP
     (multi-purpose-pin)

   - Samsung Exynos8895 and Exynos9810 SoC pin control driver

   - SpacemiT K1 SoC pin control driver

   - Airhoa EN7581 IC pin control driver

  Improvements:

   - The Renesas subdriver now supports schmitt-trigger and open drain
     pin configurations if the hardware supports it

   - Support GPIOF and GPIOG banks in the Aspeed G6 SoC

   - Support the DSW community in the Intel Elkhartlake SoC"

* tag 'pinctrl-v6.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (105 commits)
  pinctrl: airoha: Use unsigned long for bit search
  pinctrl: k210: Undef K210_PC_DEFAULT
  pinctrl: qcom: spmi: fix debugfs drive strength
  pinctrl: qcom: Add sm8750 pinctrl driver
  dt-bindings: pinctrl: qcom: Add sm8750 pinctrl
  pinctrl: cy8c95x0: remove unneeded goto labels
  pinctrl: cy8c95x0: embed iterator to the for-loop
  pinctrl: cy8c95x0: Use temporary variable for struct device
  pinctrl: cy8c95x0: use flexible sleeping in reset function
  pinctrl: cy8c95x0: switch to using devm_regulator_get_enable()
  pinctrl: cy8c95x0: Use 2-argument strscpy()
  dt-bindings: pinctrl: sx150xq: allow gpio line naming
  pinctrl: single: add marvell,pxa1908-padconf compatible
  dt-bindings: pinctrl: pinctrl-single: add marvell,pxa1908-padconf compatible
  dt-bindings: pinctrl: correct typo of description for cv1800
  pinctrl: qcom: spmi-mpp: Add PM8937 compatible
  dt-bindings: pinctrl: qcom,pmic-mpp: Document PM8937 compatible
  pinctrl: qcom-pmic-gpio: add support for PM8937
  dt-bindings: pinctrl: qcom,pmic-gpio: add PM8937
  pinctrl: Use of_property_present() for non-boolean properties
  ...
parents 70dbb12e ac6f0825
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/airoha,en7581-chip-scu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Airoha Chip SCU Controller for EN7581 SoC

maintainers:
  - Lorenzo Bianconi <lorenzo@kernel.org>

description:
  The airoha chip-scu block provides a configuration interface for clock,
  io-muxing and other functionalities used by multiple controllers (e.g. clock,
  pinctrl, ecc) on EN7581 SoC.

properties:
  compatible:
    items:
      - enum:
          - airoha,en7581-chip-scu
      - const: syscon

  reg:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    soc {
      #address-cells = <2>;
      #size-cells = <2>;
      syscon@1fa20000 {
        compatible = "airoha,en7581-chip-scu", "syscon";
        reg = <0x0 0x1fa20000 0x0 0x388>;
      };
    };
+90 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/airoha,en7581-gpio-sysctl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Airoha EN7581 GPIO System Controller

maintainers:
  - Christian Marangi <ansuelsmth@gmail.com>
  - Lorenzo Bianconi <lorenzo@kernel.org>

description:
  Airoha EN7581 SoC GPIO system controller which provided a register map
  for controlling the GPIO, pins and PWM of the SoC.

properties:
  compatible:
    items:
      - const: airoha,en7581-gpio-sysctl
      - const: syscon
      - const: simple-mfd

  reg:
    maxItems: 1

  pinctrl:
    type: object
    $ref: /schemas/pinctrl/airoha,en7581-pinctrl.yaml
    description:
      Child node definition for EN7581 Pin controller

  pwm:
    type: object
    $ref: /schemas/pwm/airoha,en7581-pwm.yaml
    description:
      Child node definition for EN7581 PWM controller

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    system-controller@1fbf0200 {
      compatible = "airoha,en7581-gpio-sysctl", "syscon", "simple-mfd";
      reg = <0x1fbf0200 0xc0>;

      pinctrl {
        compatible = "airoha,en7581-pinctrl";

        interrupt-parent = <&gic>;
        interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;

        gpio-controller;
        #gpio-cells = <2>;

        interrupt-controller;
        #interrupt-cells = <2>;

        mmc-pins {
          mux {
            function = "emmc";
            groups = "emmc";
          };
        };

        mdio-pins {
          mux {
            function = "mdio";
            groups = "mdio";
          };

          conf {
            pins = "gpio2";
            output-enable;
          };
        };
      };

      pwm {
        compatible = "airoha,en7581-pwm";

        #pwm-cells = <3>;
      };
    };
+400 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinctrl/airoha,en7581-pinctrl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Airoha EN7581 Pin Controller

maintainers:
  - Lorenzo Bianconi <lorenzo@kernel.org>

description:
  The Airoha's EN7581 Pin controller is used to control SoC pins.

properties:
  compatible:
    const: airoha,en7581-pinctrl

  interrupts:
    maxItems: 1

  gpio-controller: true

  '#gpio-cells':
    const: 2

  interrupt-controller: true

  '#interrupt-cells':
    const: 2

allOf:
  - $ref: pinctrl.yaml#

required:
  - compatible
  - interrupts
  - gpio-controller
  - "#gpio-cells"
  - interrupt-controller
  - "#interrupt-cells"

patternProperties:
  '-pins$':
    type: object

    patternProperties:
      '^mux(-|$)':
        type: object

        description:
          pinmux configuration nodes.

        $ref: /schemas/pinctrl/pinmux-node.yaml

        properties:
          function:
            description:
              A string containing the name of the function to mux to the group.
            enum: [pon, tod_1pps, sipo, mdio, uart, i2c, jtag, pcm, spi,
                   pcm_spi, i2s, emmc, pnand, pcie_reset, pwm, phy1_led0,
                   phy2_led0, phy3_led0, phy4_led0, phy1_led1, phy2_led1,
                   phy3_led1, phy4_led1]

          groups:
            description:
              An array of strings. Each string contains the name of a group.

        required:
          - function
          - groups

        allOf:
          - if:
              properties:
                function:
                  const: pon
            then:
              properties:
                groups:
                  enum: [pon]
          - if:
              properties:
                function:
                  const: tod_1pps
            then:
              properties:
                groups:
                  enum: [pon_tod_1pps, gsw_tod_1pps]
          - if:
              properties:
                function:
                  const: sipo
            then:
              properties:
                groups:
                  enum: [sipo, sipo_rclk]
          - if:
              properties:
                function:
                  const: mdio
            then:
              properties:
                groups:
                  enum: [mdio]
          - if:
              properties:
                function:
                  const: uart
            then:
              properties:
                groups:
                  items:
                    enum: [uart2, uart2_cts_rts, hsuart, hsuart_cts_rts,
                           uart4, uart5]
                  maxItems: 2
          - if:
              properties:
                function:
                  const: i2c
            then:
              properties:
                groups:
                  enum: [i2c1]
          - if:
              properties:
                function:
                  const: jtag
            then:
              properties:
                groups:
                  enum: [jtag_udi, jtag_dfd]
          - if:
              properties:
                function:
                  const: pcm
            then:
              properties:
                groups:
                  enum: [pcm1, pcm2]
          - if:
              properties:
                function:
                  const: spi
            then:
              properties:
                groups:
                  items:
                    enum: [spi_quad, spi_cs1]
                  maxItems: 2
          - if:
              properties:
                function:
                  const: pcm_spi
            then:
              properties:
                groups:
                  items:
                    enum: [pcm_spi, pcm_spi_int, pcm_spi_rst, pcm_spi_cs1,
                           pcm_spi_cs2_p156, pcm_spi_cs2_p128, pcm_spi_cs3,
                           pcm_spi_cs4]
                  maxItems: 7
          - if:
              properties:
                function:
                  const: i2c
            then:
              properties:
                groups:
                  enum: [i2s]
          - if:
              properties:
                function:
                  const: emmc
            then:
              properties:
                groups:
                  enum: [emmc]
          - if:
              properties:
                function:
                  const: pnand
            then:
              properties:
                groups:
                  enum: [pnand]
          - if:
              properties:
                function:
                  const: pcie_reset
            then:
              properties:
                groups:
                  enum: [pcie_reset0, pcie_reset1, pcie_reset2]
          - if:
              properties:
                function:
                  const: pwm
            then:
              properties:
                groups:
                  enum: [gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6,
                         gpio7, gpio8, gpio9, gpio10, gpio11, gpio12, gpio13,
                         gpio14, gpio15, gpio16, gpio17, gpio18, gpio19,
                         gpio20, gpio21, gpio22, gpio23, gpio24, gpio25,
                         gpio26, gpio27, gpio28, gpio29, gpio30, gpio31,
                         gpio36, gpio37, gpio38, gpio39, gpio40, gpio41,
                         gpio42, gpio43, gpio44, gpio45, gpio46, gpio47]
          - if:
              properties:
                function:
                  const: phy1_led0
            then:
              properties:
                groups:
                  enum: [gpio33, gpio34, gpio35, gpio42]
          - if:
              properties:
                function:
                  const: phy2_led0
            then:
              properties:
                groups:
                  enum: [gpio33, gpio34, gpio35, gpio42]
          - if:
              properties:
                function:
                  const: phy3_led0
            then:
              properties:
                groups:
                  enum: [gpio33, gpio34, gpio35, gpio42]
          - if:
              properties:
                function:
                  const: phy4_led0
            then:
              properties:
                groups:
                  enum: [gpio33, gpio34, gpio35, gpio42]
          - if:
              properties:
                function:
                  const: phy1_led1
            then:
              properties:
                groups:
                  enum: [gpio43, gpio44, gpio45, gpio46]
          - if:
              properties:
                function:
                  const: phy2_led1
            then:
              properties:
                groups:
                  enum: [gpio43, gpio44, gpio45, gpio46]
          - if:
              properties:
                function:
                  const: phy3_led1
            then:
              properties:
                groups:
                  enum: [gpio43, gpio44, gpio45, gpio46]
          - if:
              properties:
                function:
                  const: phy4_led1
            then:
              properties:
                groups:
                  enum: [gpio43, gpio44, gpio45, gpio46]

        additionalProperties: false

      '^conf(-|$)':
        type: object

        description:
          pinconf configuration nodes.

        $ref: /schemas/pinctrl/pincfg-node.yaml

        properties:
          pins:
            description:
              An array of strings. Each string contains the name of a pin.
            items:
              enum: [uart1_txd, uart1_rxd, i2c_scl, i2c_sda, spi_cs0, spi_clk,
                     spi_mosi, spi_miso, gpio0, gpio1, gpio2, gpio3, gpio4,
                     gpio5, gpio6, gpio7, gpio8, gpio9, gpio10, gpio11, gpio12,
                     gpio13, gpio14, gpio15, gpio16, gpio17, gpio18, gpio19,
                     gpio20, gpio21, gpio22, gpio23, gpio24, gpio25, gpio26,
                     gpio27, gpio28, gpio29, gpio30, gpio31, gpio32, gpio33,
                     gpio34, gpio35, gpio36, gpio37, gpio38, gpio39, gpio40,
                     gpio41, gpio42, gpio43, gpio44, gpio45, gpio46,
                     pcie_reset0, pcie_reset1, pcie_reset2]
            minItems: 1
            maxItems: 58

          bias-disable: true

          bias-pull-up: true

          bias-pull-down: true

          input-enable: true

          output-enable: true

          output-low: true

          output-high: true

          drive-open-drain: true

          drive-strength:
            description:
              Selects the drive strength for MIO pins, in mA.
            enum: [2, 4, 6, 8]

        required:
          - pins

        additionalProperties: false

    additionalProperties: false

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    pinctrl {
      compatible = "airoha,en7581-pinctrl";

      interrupt-parent = <&gic>;
      interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;

      gpio-controller;
      #gpio-cells = <2>;

      interrupt-controller;
      #interrupt-cells = <2>;

      pcie1-rst-pins {
        conf {
          pins = "pcie_reset1";
          drive-open-drain = <1>;
        };
      };

      pwm-pins {
        mux {
          function = "pwm";
          groups = "gpio18";
        };
      };

      spi-pins {
        mux {
          function = "spi";
          groups = "spi_quad", "spi_cs1";
        };
      };

      uart2-pins {
        mux {
          function = "uart";
          groups = "uart2", "uart2_cts_rts";
        };
      };

      uar5-pins {
        mux {
          function = "uart";
          groups = "uart5";
        };
      };

      mmc-pins {
        mux {
          function = "emmc";
          groups = "emmc";
        };
      };

      mdio-pins {
        mux {
          function = "mdio";
          groups = "mdio";
        };

        conf {
          pins = "gpio2";
          output-enable;
        };
      };
    };
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ patternProperties:
          - const: gpio

      gpio-line-names:
        minItems: 86 # AXG
        minItems: 83 # Meson8b
        maxItems: 120 # Meson8

unevaluatedProperties:
+127 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinctrl/canaan,k230-pinctrl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Canaan Kendryte K230 Pin Controller

maintainers:
  - Ze Huang <18771902331@163.com>

description:
  The Canaan Kendryte K230 platform includes 64 IO pins, each capable of
  multiplexing up to 5 different functions. Pin function configuration is
  performed on a per-pin basis.

properties:
  compatible:
    const: canaan,k230-pinctrl

  reg:
    maxItems: 1

patternProperties:
  '-pins$':
    type: object
    additionalProperties: false
    description:
      A pinctrl node should contain at least one subnode representing the
      pinctrl groups available on the machine.

    patternProperties:
      '-cfg$':
        type: object
        allOf:
          - $ref: /schemas/pinctrl/pincfg-node.yaml
          - $ref: /schemas/pinctrl/pinmux-node.yaml
        additionalProperties: false
        description:
          Each subnode will list the pins it needs, and how they should
          be configured, with regard to muxer configuration, bias, input
          enable/disable, input schmitt trigger, slew-rate enable/disable,
          slew-rate, drive strength.

        properties:
          pinmux:
            description:
              The list of GPIOs and their mux settings that properties in
              the node apply to. This should be set with the macro
              'K230_PINMUX(pin, mode)'

          bias-disable: true

          bias-pull-up: true

          bias-pull-down: true

          drive-strength:
            minimum: 0
            maximum: 15

          input-enable: true

          output-enable: true

          input-schmitt-enable: true

          slew-rate:
            description: |
              slew rate control enable
              0: disable
              1: enable

            enum: [0, 1]

          power-source:
            description: |
              Specifies the power source voltage for the IO bank that the
              pin belongs to. Each bank of IO pins operate at a specific,
              fixed voltage levels. Incorrect voltage configuration can
              damage the chip. The defined constants represent the
              possible voltage configurations:

              - K230_MSC_3V3 (value 0): 3.3V power supply
              - K230_MSC_1V8 (value 1): 1.8V power supply

              The following banks have the corresponding voltage
              configurations:

              - bank IO0 to IO1: Fixed at 1.8V
              - bank IO2 to IO13: Fixed at 1.8V
              - bank IO14 to IO25: Fixed at 1.8V
              - bank IO26 to IO37: Fixed at 1.8V
              - bank IO38 to IO49: Fixed at 1.8V
              - bank IO50 to IO61: Fixed at 3.3V
              - bank IO62 to IO63: Fixed at 1.8V

            enum: [0, 1]

        required:
          - pinmux

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    pinctrl@91105000 {
        compatible = "canaan,k230-pinctrl";
        reg = <0x91105000 0x100>;

        uart2-pins {
            uart2-pins-cfg {
                pinmux = <0x503>, /* uart2 txd */
                         <0x603>; /* uart2 rxd */
                slew-rate = <0>;
                drive-strength = <4>;
                power-source = <1>;
                input-enable;
                output-enable;
                bias-disable;
            };
        };
    };
Loading