brintos

brintos / linux-shallow public Read only

0
0
Text · 7.8 KiB · e994b0c Raw
233 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/pinctrl/mediatek,mt8188-pinctrl.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: MediaTek MT8188 Pin Controller8 9maintainers:10  - Hui Liu <hui.liu@mediatek.com>11 12description:13  The MediaTek's MT8188 Pin controller is used to control SoC pins.14 15properties:16  compatible:17    const: mediatek,mt8188-pinctrl18 19  gpio-controller: true20 21  '#gpio-cells':22    description:23      Number of cells in GPIO specifier, should be two. The first cell is the24      pin number, the second cell is used to specify optional parameters which25      are defined in <dt-bindings/gpio/gpio.h>.26    const: 227 28  gpio-ranges:29    maxItems: 130 31  gpio-line-names: true32 33  reg:34    items:35      - description: gpio registers base address36      - description: rm group io configuration registers base address37      - description: lt group io configuration registers base address38      - description: lm group io configuration registers base address39      - description: rt group io configuration registers base address40      - description: eint registers base address41 42  reg-names:43    items:44      - const: iocfg045      - const: iocfg_rm46      - const: iocfg_lt47      - const: iocfg_lm48      - const: iocfg_rt49      - const: eint50 51  interrupt-controller: true52 53  '#interrupt-cells':54    const: 255 56  interrupts:57    description: The interrupt outputs to sysirq.58    maxItems: 159 60  mediatek,rsel-resistance-in-si-unit:61    type: boolean62    description:63      We provide two methods to select the resistance for I2C when pull up or64      pull down. The first is by RSEL definition value, another one is by65      resistance value(ohm). This flag is used to identify if the method is66      resistance(si unit) value.67 68# PIN CONFIGURATION NODES69patternProperties:70  '-pins$':71    type: object72    additionalProperties: false73 74    patternProperties:75      '^pins':76        type: object77        $ref: /schemas/pinctrl/pincfg-node.yaml78        additionalProperties: false79        description:80          A pinctrl node should contain at least one subnode representing the81          pinctrl groups available on the machine. Each subnode will list the82          pins it needs, and how they should be configured, with regard to muxer83          configuration, pullups, drive strength, input enable/disable and input84          schmitt.85 86        properties:87          pinmux:88            description:89              Integer array, represents gpio pin number and mux setting.90              Supported pin number and mux varies for different SoCs, and are91              defined as macros in dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h92              directly, for this SoC.93 94          drive-strength:95            enum: [2, 4, 6, 8, 10, 12, 14, 16]96 97          drive-strength-microamp:98            enum: [125, 250, 500, 1000]99 100          bias-pull-down:101            oneOf:102              - type: boolean103              - enum: [100, 101, 102, 103]104                description: mt8188 pull down PUPD/R0/R1 type define value.105              - enum: [200, 201, 202, 203, 204, 205, 206, 207]106                description: mt8188 pull down RSEL type define value.107              - enum: [75000, 5000]108                description: mt8188 pull down RSEL type si unit value(ohm).109            description: |110              For pull down type is normal, it doesn't need add RSEL & R1R0111              define and resistance value.112              For pull down type is PUPD/R0/R1 type, it can add R1R0 define to113              set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &114              "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" &115              "MTK_PUPD_SET_R1R0_11" define in mt8188.116              For pull down type is RSEL, it can add RSEL define & resistance117              value(ohm) to set different resistance by identifying property118              "mediatek,rsel-resistance-in-si-unit". It can support119              "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001" &120              "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" &121              "MTK_PULL_SET_RSEL_100" & "MTK_PULL_SET_RSEL_101" &122              "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111" define in123              mt8188. It can also support resistance value(ohm) "75000" & "5000"124              in mt8188.125 126          bias-pull-up:127            oneOf:128              - type: boolean129              - enum: [100, 101, 102, 103]130                description: mt8188 pull up PUPD/R0/R1 type define value.131              - enum: [200, 201, 202, 203, 204, 205, 206, 207]132                description: mt8188 pull up RSEL type define value.133              - enum: [1000, 1500, 2000, 3000, 4000, 5000, 10000, 75000]134                description: mt8188 pull up RSEL type si unit value(ohm).135            description: |136              For pull up type is normal, it don't need add RSEL & R1R0 define137              and resistance value.138              For pull up type is PUPD/R0/R1 type, it can add R1R0 define to set139              different resistance. It can support "MTK_PUPD_SET_R1R0_00" &140              "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" &141              "MTK_PUPD_SET_R1R0_11" define in mt8188.142              For pull up type is RSEL, it can add RSEL define & resistance143              value(ohm) to set different resistance by identifying property144              "mediatek,rsel-resistance-in-si-unit". It can support145              "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001" &146              "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" &147              "MTK_PULL_SET_RSEL_100" & "MTK_PULL_SET_RSEL_101" &148              "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111" define in149              mt8188. It can also support resistance value(ohm) "1000" & "1500"150              & "2000" & "3000" & "4000" & "5000" & "10000" & "75000" in mt8188.151 152          bias-disable: true153 154          output-high: true155 156          output-low: true157 158          input-enable: true159 160          input-disable: true161 162          input-schmitt-enable: true163 164          input-schmitt-disable: true165 166        required:167          - pinmux168 169required:170  - compatible171  - reg172  - interrupts173  - interrupt-controller174  - '#interrupt-cells'175  - gpio-controller176  - '#gpio-cells'177  - gpio-ranges178 179additionalProperties: false180 181examples:182  - |183    #include <dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h>184    #include <dt-bindings/interrupt-controller/arm-gic.h>185 186    pio: pinctrl@10005000 {187        compatible = "mediatek,mt8188-pinctrl";188        reg = <0x10005000 0x1000>,189              <0x11c00000 0x1000>,190              <0x11e10000 0x1000>,191              <0x11e20000 0x1000>,192              <0x11ea0000 0x1000>,193              <0x1000b000 0x1000>;194        reg-names = "iocfg0", "iocfg_rm",195                    "iocfg_lt", "iocfg_lm", "iocfg_rt",196                    "eint";197        gpio-controller;198        #gpio-cells = <2>;199        gpio-ranges = <&pio 0 0 176>;200        interrupt-controller;201        interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH 0>;202        #interrupt-cells = <2>;203 204        pio-pins {205            pins {206                pinmux = <PINMUX_GPIO0__FUNC_B_GPIO0>;207                output-low;208            };209        };210 211        spi0-pins {212            pins-spi {213                pinmux = <PINMUX_GPIO75__FUNC_O_SPIM1_CSB>,214                         <PINMUX_GPIO76__FUNC_O_SPIM1_CLK>,215                         <PINMUX_GPIO77__FUNC_B0_SPIM1_MOSI>;216                drive-strength = <6>;217            };218            pins-spi-mi {219                pinmux = <PINMUX_GPIO78__FUNC_B0_SPIM1_MISO>;220                bias-pull-down = <MTK_PUPD_SET_R1R0_10>;221            };222        };223 224        i2c0-pins {225            pins {226                pinmux = <PINMUX_GPIO55__FUNC_B1_SCL0>,227                         <PINMUX_GPIO56__FUNC_B1_SDA0>;228                bias-disable;229                drive-strength-microamp = <1000>;230            };231        };232    };233