mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-06-21 15:43:21 +02:00
Merge tag 'pinctrl-v7.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control updates from Linus Walleij:
"Core changes:
- Add new generic callbacks to populate per-pin pin controllers
creating groups and functions from the device tree building out
pinctrl_generic_to_map() and move the Spacemit driver over to use
this
- Generic board-level pin control driver using the mux framework
New pin controller drivers:
- Amlogic (meson) A9 SoC
- Aspeed AST2700 SoC0 and SoC1
- nVidia Tegra264 and Tegra238
- Qualcomm Nord TLMM, Shikra TLMM, SM6350 LPASS LPI, and IPQ9650 TLMM
- Renesas RZ/G3L SoC
- UltraRISC DP1000
Improvements:
- Handle pull up/pull down properly in the Renesas RZG2L driver
- Fix up nVidia Tegra 234 DT bindings
- Fix up pin definitions in the Qualcomm Eliza driver
- Qualcomm PM8010 GPIO support in the PM8010
- Qualcomm SM6115 EGPIO support in the SM6115
- Switch Qualcomm LPASS LPI drivers to use runtime PM for power
management
- Clean up the Qualcomm Kconfig business a bit to include the
necessary drivers for each subarch
- Fix output glitch in the Amlogic (meson) A4 pin controller
- Move the Airoha driver from the Mediatek directory to its own
directory. It is too different from other Mediatek hardware
- A slew of fixes to the Airoha AN7581 and AN7583 drivers"
* tag 'pinctrl-v7.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (151 commits)
pinctrl: Export pinctrl_get_group_selector()
pinctrl: Match DT helper types
pinctrl: qcom: Register functions before enabling pinctrl
pinctrl: meson: amlogic-a4: use nolock get range
pinctrl: ultrarisc: Add UltraRISC DP1000 pinctrl driver
dt-bindings: pinctrl: Add UltraRISC DP1000 pinctrl controller
pinctrl: qcom: Remove unused macro definitions
pinctrl: tegra: PINCTRL_TEGRA264 should depend on ARCH_TEGRA
pinctrl: tegra: PINCTRL_TEGRA238 should depend on ARCH_TEGRA
pinctrl: tegra238: add missing AON pin groups
dt-bindings: pinctrl: tegra238: add missing AON pin groups
pinctrl: airoha: an7583: remove undefined groups from pcm_spi pin function
pinctrl: airoha: an7583: fix phy1_led1 pin function
pinctrl: airoha: an7583: add missed gpio22 pin group
pinctrl: airoha: an7583: fix gpio21 pin group
pinctrl: airoha: fix pwm pin function for an7581 and an7583
pinctrl: airoha: an7583: fix incorrect led mapping in phy4_led1 pin function
pinctrl: airoha: an7581: fix incorrect led mapping in phy4_led1 pin function
pinctrl: airoha: an7583: fix misprint in gpio19 pinconf
pinctrl: airoha: an7581: fix misprint in gpio19 pinconf
...
This commit is contained in:
@@ -34,7 +34,7 @@ properties:
|
||||
|
||||
interrupts:
|
||||
minItems: 2
|
||||
maxItems: 10
|
||||
maxItems: 11
|
||||
description:
|
||||
One interrupt per external interrupt bank supported on the
|
||||
controller, sorted by bank number ascending order.
|
||||
@@ -61,7 +61,7 @@ properties:
|
||||
bank found in the controller
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
minItems: 2
|
||||
maxItems: 10
|
||||
maxItems: 11
|
||||
|
||||
patternProperties:
|
||||
# It's pretty scary, but the basic idea is that:
|
||||
@@ -130,8 +130,8 @@ allOf:
|
||||
then:
|
||||
properties:
|
||||
interrupts:
|
||||
minItems: 10
|
||||
maxItems: 10
|
||||
minItems: 11
|
||||
maxItems: 11
|
||||
|
||||
- if:
|
||||
properties:
|
||||
|
||||
@@ -17,6 +17,7 @@ properties:
|
||||
oneOf:
|
||||
- enum:
|
||||
- amlogic,pinctrl-a4
|
||||
- amlogic,pinctrl-a9
|
||||
- amlogic,pinctrl-s6
|
||||
- amlogic,pinctrl-s7
|
||||
- items:
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/aspeed,ast2700-soc0-pinctrl.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: ASPEED AST2700 SoC0 Pin Controller
|
||||
|
||||
maintainers:
|
||||
- Billy Tsai <billy_tsai@aspeedtech.com>
|
||||
|
||||
description: >
|
||||
The AST2700 features a dual-SoC architecture with two interconnected SoCs,
|
||||
each having its own System Control Unit (SCU) for independent pin control.
|
||||
This pin controller manages the pin multiplexing for SoC0.
|
||||
|
||||
The SoC0 pin controller manages pin functions including eMMC, VGA DDC,
|
||||
dual USB3/USB2 ports (A and B), JTAG, and PCIe root complex interfaces.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: aspeed,ast2700-soc0-pinctrl
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
patternProperties:
|
||||
'-state$':
|
||||
description: |
|
||||
Pin control state.
|
||||
|
||||
If 'function' is present, the node describes a pinmux state and must
|
||||
specify 'groups'.
|
||||
|
||||
For pin configuration, exactly one of 'groups' or 'pins' must be
|
||||
specified in each state node. Group-level configuration applies to all
|
||||
pins in the group. Pin-level configuration may be supplied in a
|
||||
separate state node for individual pins; when both group-level and
|
||||
pin-level configuration apply to the same pin, the pin-level
|
||||
configuration takes precedence.
|
||||
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: pinmux-node.yaml#
|
||||
- $ref: pincfg-node.yaml#
|
||||
- if:
|
||||
required:
|
||||
- function
|
||||
then:
|
||||
required:
|
||||
- groups
|
||||
- oneOf:
|
||||
- required:
|
||||
- groups
|
||||
- required:
|
||||
- pins
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
properties:
|
||||
function:
|
||||
enum:
|
||||
- EMMC
|
||||
- JTAGDDR
|
||||
- JTAGM0
|
||||
- JTAGPCIEA
|
||||
- JTAGPCIEB
|
||||
- JTAGPSP
|
||||
- JTAGSSP
|
||||
- JTAGTSP
|
||||
- JTAGUSB3A
|
||||
- JTAGUSB3B
|
||||
- PCIERC0PERST
|
||||
- PCIERC1PERST
|
||||
- TSPRSTN
|
||||
- UFSCLKI
|
||||
- USB2AD0
|
||||
- USB2AD1
|
||||
- USB2AH
|
||||
- USB2AHP
|
||||
- USB2AHPD0
|
||||
- USB2AXH
|
||||
- USB2AXH2B
|
||||
- USB2AXHD1
|
||||
- USB2AXHP
|
||||
- USB2AXHP2B
|
||||
- USB2AXHPD1
|
||||
- USB2BD0
|
||||
- USB2BD1
|
||||
- USB2BH
|
||||
- USB2BHP
|
||||
- USB2BHPD0
|
||||
- USB2BXH
|
||||
- USB2BXH2A
|
||||
- USB2BXHD1
|
||||
- USB2BXHP
|
||||
- USB2BXHP2A
|
||||
- USB2BXHPD1
|
||||
- USB3AXH
|
||||
- USB3AXH2B
|
||||
- USB3AXHD
|
||||
- USB3AXHP
|
||||
- USB3AXHP2B
|
||||
- USB3AXHPD
|
||||
- USB3BXH
|
||||
- USB3BXH2A
|
||||
- USB3BXHD
|
||||
- USB3BXHP
|
||||
- USB3BXHP2A
|
||||
- USB3BXHPD
|
||||
- VB
|
||||
- VGADDC
|
||||
|
||||
groups:
|
||||
enum:
|
||||
- EMMCCDN
|
||||
- EMMCG1
|
||||
- EMMCG4
|
||||
- EMMCG8
|
||||
- EMMCWPN
|
||||
- JTAG0
|
||||
- PCIERC0PERST
|
||||
- PCIERC1PERST
|
||||
- TSPRSTN
|
||||
- UFSCLKI
|
||||
- USB2A
|
||||
- USB2AAP
|
||||
- USB2ABP
|
||||
- USB2ADAP
|
||||
- USB2AH
|
||||
- USB2AHAP
|
||||
- USB2B
|
||||
- USB2BAP
|
||||
- USB2BBP
|
||||
- USB2BDBP
|
||||
- USB2BH
|
||||
- USB2BHBP
|
||||
- USB3A
|
||||
- USB3AAP
|
||||
- USB3ABP
|
||||
- USB3B
|
||||
- USB3BAP
|
||||
- USB3BBP
|
||||
- VB0
|
||||
- VB1
|
||||
- VGADDC
|
||||
|
||||
pins:
|
||||
enum:
|
||||
- AB13
|
||||
- AB14
|
||||
- AC13
|
||||
- AC14
|
||||
- AD13
|
||||
- AD14
|
||||
- AE13
|
||||
- AE14
|
||||
- AE15
|
||||
- AF13
|
||||
- AF14
|
||||
- AF15
|
||||
|
||||
drive-strength:
|
||||
enum: [3, 6, 8, 11, 16, 18, 20, 23, 30, 32, 33, 35, 37, 38, 39, 41]
|
||||
|
||||
bias-disable: true
|
||||
bias-pull-up: true
|
||||
bias-pull-down: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
allOf:
|
||||
- $ref: pinctrl.yaml#
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
pinctrl@400 {
|
||||
compatible = "aspeed,ast2700-soc0-pinctrl";
|
||||
reg = <0x400 0x318>;
|
||||
emmc-state {
|
||||
function = "EMMC";
|
||||
groups = "EMMCG1";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,760 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/aspeed,ast2700-soc1-pinctrl.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: ASPEED AST2700 SoC1 Pin Controller
|
||||
|
||||
maintainers:
|
||||
- Billy Tsai <billy_tsai@aspeedtech.com>
|
||||
|
||||
description:
|
||||
The AST2700 features a dual-SoC architecture with two interconnected SoCs,
|
||||
each having its own System Control Unit (SCU) for independent pin control.
|
||||
This pin controller manages the pin multiplexing for SoC1.
|
||||
|
||||
The SoC1 pin controller manages pin functions including eSPI, LPC and I2C,
|
||||
among others.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: aspeed,ast2700-soc1-pinctrl
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
patternProperties:
|
||||
'-state$':
|
||||
description: |
|
||||
Pin control state.
|
||||
|
||||
If `function` is present, the node describes a pinmux state and must
|
||||
specify `groups`.
|
||||
|
||||
For pin configuration, exactly one of `groups` or `pins` must be
|
||||
specified in each state node. Group-level configuration applies to all
|
||||
pins in the group. Pin-level configuration may be supplied in a
|
||||
separate state node for individual pins; when both group-level and
|
||||
pin-level configuration apply to the same pin, the pin-level
|
||||
configuration takes precedence.
|
||||
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: pinmux-node.yaml#
|
||||
- $ref: pincfg-node.yaml#
|
||||
- if:
|
||||
required:
|
||||
- function
|
||||
then:
|
||||
required:
|
||||
- groups
|
||||
- oneOf:
|
||||
- required:
|
||||
- groups
|
||||
- required:
|
||||
- pins
|
||||
additionalProperties: false
|
||||
|
||||
properties:
|
||||
function:
|
||||
enum:
|
||||
- ADC0
|
||||
- ADC1
|
||||
- ADC10
|
||||
- ADC11
|
||||
- ADC12
|
||||
- ADC13
|
||||
- ADC14
|
||||
- ADC15
|
||||
- ADC2
|
||||
- ADC3
|
||||
- ADC4
|
||||
- ADC5
|
||||
- ADC6
|
||||
- ADC7
|
||||
- ADC8
|
||||
- ADC9
|
||||
- AUXPWRGOOD0
|
||||
- AUXPWRGOOD1
|
||||
- CANBUS
|
||||
- ESPI0
|
||||
- ESPI1
|
||||
- FSI0
|
||||
- FSI1
|
||||
- FSI2
|
||||
- FSI3
|
||||
- FWQSPI
|
||||
- FWSPIABR
|
||||
- FWWPN
|
||||
- HBLED
|
||||
- I2C0
|
||||
- I2C1
|
||||
- I2C10
|
||||
- I2C11
|
||||
- I2C12
|
||||
- I2C13
|
||||
- I2C14
|
||||
- I2C15
|
||||
- I2C2
|
||||
- I2C3
|
||||
- I2C4
|
||||
- I2C5
|
||||
- I2C6
|
||||
- I2C7
|
||||
- I2C8
|
||||
- I2C9
|
||||
- I2CF0
|
||||
- I2CF1
|
||||
- I2CF2
|
||||
- I3C0
|
||||
- I3C1
|
||||
- I3C10
|
||||
- I3C11
|
||||
- I3C12
|
||||
- I3C13
|
||||
- I3C14
|
||||
- I3C15
|
||||
- I3C2
|
||||
- I3C3
|
||||
- I3C4
|
||||
- I3C5
|
||||
- I3C6
|
||||
- I3C7
|
||||
- I3C8
|
||||
- I3C9
|
||||
- JTAGM1
|
||||
- LPC0
|
||||
- LPC1
|
||||
- LTPI
|
||||
- MACLINK0
|
||||
- MACLINK1
|
||||
- MACLINK2
|
||||
- MDIO0
|
||||
- MDIO1
|
||||
- MDIO2
|
||||
- NCTS0
|
||||
- NCTS1
|
||||
- NCTS5
|
||||
- NCTS6
|
||||
- NDCD0
|
||||
- NDCD1
|
||||
- NDCD5
|
||||
- NDCD6
|
||||
- NDSR0
|
||||
- NDSR1
|
||||
- NDSR5
|
||||
- NDSR6
|
||||
- NDTR0
|
||||
- NDTR1
|
||||
- NDTR5
|
||||
- NDTR6
|
||||
- NRI0
|
||||
- NRI1
|
||||
- NRI5
|
||||
- NRI6
|
||||
- NRTS0
|
||||
- NRTS1
|
||||
- NRTS5
|
||||
- NRTS6
|
||||
- OSCCLK
|
||||
- PCIERC
|
||||
- PWM0
|
||||
- PWM1
|
||||
- PWM10
|
||||
- PWM11
|
||||
- PWM12
|
||||
- PWM13
|
||||
- PWM14
|
||||
- PWM15
|
||||
- PWM2
|
||||
- PWM3
|
||||
- PWM4
|
||||
- PWM5
|
||||
- PWM6
|
||||
- PWM7
|
||||
- PWM8
|
||||
- PWM9
|
||||
- QSPI0
|
||||
- QSPI1
|
||||
- QSPI2
|
||||
- RGMII0
|
||||
- RGMII1
|
||||
- RMII0
|
||||
- RMII0RCLKO
|
||||
- RMII1
|
||||
- RMII1RCLKO
|
||||
- SALT0
|
||||
- SALT1
|
||||
- SALT10
|
||||
- SALT11
|
||||
- SALT12
|
||||
- SALT13
|
||||
- SALT14
|
||||
- SALT15
|
||||
- SALT2
|
||||
- SALT3
|
||||
- SALT4
|
||||
- SALT5
|
||||
- SALT6
|
||||
- SALT7
|
||||
- SALT8
|
||||
- SALT9
|
||||
- SD
|
||||
- SGMII
|
||||
- SGPM0
|
||||
- SGPM1
|
||||
- SGPS
|
||||
- SIOONCTRLN0
|
||||
- SIOONCTRLN1
|
||||
- SIOPBIN0
|
||||
- SIOPBIN1
|
||||
- SIOPBON0
|
||||
- SIOPBON1
|
||||
- SIOPWREQN0
|
||||
- SIOPWREQN1
|
||||
- SIOPWRGD1
|
||||
- SIOS3N0
|
||||
- SIOS3N1
|
||||
- SIOS5N0
|
||||
- SIOS5N1
|
||||
- SIOSCIN0
|
||||
- SIOSCIN1
|
||||
- SMON0
|
||||
- SMON1
|
||||
- SPI0
|
||||
- SPI0ABR
|
||||
- SPI0CS1
|
||||
- SPI0WPN
|
||||
- SPI1
|
||||
- SPI1ABR
|
||||
- SPI1CS1
|
||||
- SPI1WPN
|
||||
- SPI2
|
||||
- SPI2CS1
|
||||
- TACH0
|
||||
- TACH1
|
||||
- TACH10
|
||||
- TACH11
|
||||
- TACH12
|
||||
- TACH13
|
||||
- TACH14
|
||||
- TACH15
|
||||
- TACH2
|
||||
- TACH3
|
||||
- TACH4
|
||||
- TACH5
|
||||
- TACH6
|
||||
- TACH7
|
||||
- TACH8
|
||||
- TACH9
|
||||
- THRU0
|
||||
- THRU1
|
||||
- THRU2
|
||||
- THRU3
|
||||
- UART0
|
||||
- UART1
|
||||
- UART10
|
||||
- UART11
|
||||
- UART2
|
||||
- UART3
|
||||
- UART5
|
||||
- UART6
|
||||
- UART7
|
||||
- UART8
|
||||
- UART9
|
||||
- USB2C
|
||||
- USB2D
|
||||
- USBUART
|
||||
- VGA
|
||||
- VPI
|
||||
- WDTRST0N
|
||||
- WDTRST1N
|
||||
- WDTRST2N
|
||||
- WDTRST3N
|
||||
- WDTRST4N
|
||||
- WDTRST5N
|
||||
- WDTRST6N
|
||||
- WDTRST7N
|
||||
|
||||
groups:
|
||||
enum:
|
||||
- ADC0
|
||||
- ADC1
|
||||
- ADC10
|
||||
- ADC11
|
||||
- ADC12
|
||||
- ADC13
|
||||
- ADC14
|
||||
- ADC15
|
||||
- ADC2
|
||||
- ADC3
|
||||
- ADC4
|
||||
- ADC5
|
||||
- ADC6
|
||||
- ADC7
|
||||
- ADC8
|
||||
- ADC9
|
||||
- AUXPWRGOOD0
|
||||
- AUXPWRGOOD1
|
||||
- CANBUS
|
||||
- DI2C0
|
||||
- DI2C1
|
||||
- DI2C10
|
||||
- DI2C11
|
||||
- DI2C12
|
||||
- DI2C13
|
||||
- DI2C14
|
||||
- DI2C15
|
||||
- DI2C2
|
||||
- DI2C3
|
||||
- DI2C8
|
||||
- DI2C9
|
||||
- DSGPM0
|
||||
- ESPI0
|
||||
- ESPI1
|
||||
- FSI0
|
||||
- FSI1
|
||||
- FSI2
|
||||
- FSI3
|
||||
- FWQSPI
|
||||
- FWSPIABR
|
||||
- FWWPN
|
||||
- HBLED
|
||||
- HVI3C0
|
||||
- HVI3C1
|
||||
- HVI3C12
|
||||
- HVI3C13
|
||||
- HVI3C14
|
||||
- HVI3C15
|
||||
- HVI3C2
|
||||
- HVI3C3
|
||||
- I2C0
|
||||
- I2C1
|
||||
- I2C10
|
||||
- I2C11
|
||||
- I2C12
|
||||
- I2C13
|
||||
- I2C14
|
||||
- I2C15
|
||||
- I2C2
|
||||
- I2C3
|
||||
- I2C4
|
||||
- I2C5
|
||||
- I2C6
|
||||
- I2C7
|
||||
- I2C8
|
||||
- I2C9
|
||||
- I2CF0
|
||||
- I2CF1
|
||||
- I2CF2
|
||||
- I3C10
|
||||
- I3C11
|
||||
- I3C4
|
||||
- I3C5
|
||||
- I3C6
|
||||
- I3C7
|
||||
- I3C8
|
||||
- I3C9
|
||||
- JTAGM1
|
||||
- LPC0
|
||||
- LPC1
|
||||
- LTPI
|
||||
- LTPI_PS_I2C0
|
||||
- LTPI_PS_I2C1
|
||||
- LTPI_PS_I2C2
|
||||
- LTPI_PS_I2C3
|
||||
- MACLINK0
|
||||
- MACLINK1
|
||||
- MACLINK2
|
||||
- MDIO0
|
||||
- MDIO1
|
||||
- MDIO2
|
||||
- NCTS0
|
||||
- NCTS1
|
||||
- NCTS5
|
||||
- NCTS6
|
||||
- NDCD0
|
||||
- NDCD1
|
||||
- NDCD5
|
||||
- NDCD6
|
||||
- NDSR0
|
||||
- NDSR1
|
||||
- NDSR5
|
||||
- NDSR6
|
||||
- NDTR0
|
||||
- NDTR1
|
||||
- NDTR5
|
||||
- NDTR6
|
||||
- NRI0
|
||||
- NRI1
|
||||
- NRI5
|
||||
- NRI6
|
||||
- NRTS0
|
||||
- NRTS1
|
||||
- NRTS5
|
||||
- NRTS6
|
||||
- OSCCLK
|
||||
- PE2SGRSTN
|
||||
- PWM0
|
||||
- PWM1
|
||||
- PWM10
|
||||
- PWM11
|
||||
- PWM12
|
||||
- PWM13
|
||||
- PWM14
|
||||
- PWM15
|
||||
- PWM2
|
||||
- PWM3
|
||||
- PWM4
|
||||
- PWM5
|
||||
- PWM6
|
||||
- PWM7
|
||||
- PWM8
|
||||
- PWM9
|
||||
- QSPI0
|
||||
- QSPI1
|
||||
- QSPI2
|
||||
- RGMII0
|
||||
- RGMII1
|
||||
- RMII0
|
||||
- RMII0RCLKO
|
||||
- RMII1
|
||||
- RMII1RCLKO
|
||||
- SALT0
|
||||
- SALT1
|
||||
- SALT10
|
||||
- SALT11
|
||||
- SALT12
|
||||
- SALT13
|
||||
- SALT14
|
||||
- SALT15
|
||||
- SALT2
|
||||
- SALT3
|
||||
- SALT4
|
||||
- SALT5
|
||||
- SALT6
|
||||
- SALT7
|
||||
- SALT8
|
||||
- SALT9
|
||||
- SD
|
||||
- SGMII
|
||||
- SGPM0
|
||||
- SGPM1
|
||||
- SGPS
|
||||
- SIOONCTRLN0
|
||||
- SIOONCTRLN1
|
||||
- SIOPBIN0
|
||||
- SIOPBIN1
|
||||
- SIOPBON0
|
||||
- SIOPBON1
|
||||
- SIOPWREQN0
|
||||
- SIOPWREQN1
|
||||
- SIOPWRGD1
|
||||
- SIOS3N0
|
||||
- SIOS3N1
|
||||
- SIOS5N0
|
||||
- SIOS5N1
|
||||
- SIOSCIN0
|
||||
- SIOSCIN1
|
||||
- SMON0
|
||||
- SMON1
|
||||
- SPI0
|
||||
- SPI0ABR
|
||||
- SPI0CS1
|
||||
- SPI0WPN
|
||||
- SPI1
|
||||
- SPI1ABR
|
||||
- SPI1CS1
|
||||
- SPI1WPN
|
||||
- SPI2
|
||||
- SPI2CS1
|
||||
- TACH0
|
||||
- TACH1
|
||||
- TACH10
|
||||
- TACH11
|
||||
- TACH12
|
||||
- TACH13
|
||||
- TACH14
|
||||
- TACH15
|
||||
- TACH2
|
||||
- TACH3
|
||||
- TACH4
|
||||
- TACH5
|
||||
- TACH6
|
||||
- TACH7
|
||||
- TACH8
|
||||
- TACH9
|
||||
- THRU0
|
||||
- THRU1
|
||||
- THRU2
|
||||
- THRU3
|
||||
- UART0
|
||||
- UART1
|
||||
- UART10
|
||||
- UART11
|
||||
- UART2
|
||||
- UART3
|
||||
- UART5
|
||||
- UART6
|
||||
- UART7
|
||||
- UART8
|
||||
- UART9
|
||||
- USB2CD
|
||||
- USB2CH
|
||||
- USB2CU
|
||||
- USB2CUD
|
||||
- USB2DD
|
||||
- USB2DH
|
||||
- USBUART
|
||||
- VGA
|
||||
- VPI
|
||||
- WDTRST0N
|
||||
- WDTRST1N
|
||||
- WDTRST2N
|
||||
- WDTRST3N
|
||||
- WDTRST4N
|
||||
- WDTRST5N
|
||||
- WDTRST6N
|
||||
- WDTRST7N
|
||||
|
||||
pins:
|
||||
enum:
|
||||
- A14
|
||||
- A15
|
||||
- A18
|
||||
- A19
|
||||
- A21
|
||||
- A22
|
||||
- A23
|
||||
- A24
|
||||
- A25
|
||||
- A26
|
||||
- A6
|
||||
- A7
|
||||
- A8
|
||||
- AA12
|
||||
- AA13
|
||||
- AA14
|
||||
- AA15
|
||||
- AA16
|
||||
- AA17
|
||||
- AA18
|
||||
- AA20
|
||||
- AA21
|
||||
- AA22
|
||||
- AA23
|
||||
- AA24
|
||||
- AA25
|
||||
- AA26
|
||||
- AB15
|
||||
- AB16
|
||||
- AB17
|
||||
- AB18
|
||||
- AB19
|
||||
- AB20
|
||||
- AB21
|
||||
- AB22
|
||||
- AB23
|
||||
- AB24
|
||||
- AB25
|
||||
- AB26
|
||||
- AC15
|
||||
- AC16
|
||||
- AC17
|
||||
- AC18
|
||||
- AC19
|
||||
- AC20
|
||||
- AC22
|
||||
- AC24
|
||||
- AC25
|
||||
- AC26
|
||||
- AD15
|
||||
- AD16
|
||||
- AD17
|
||||
- AD18
|
||||
- AD19
|
||||
- AD20
|
||||
- AD22
|
||||
- AD25
|
||||
- AD26
|
||||
- AE16
|
||||
- AE17
|
||||
- AE18
|
||||
- AE19
|
||||
- AE20
|
||||
- AE21
|
||||
- AE23
|
||||
- AE25
|
||||
- AE26
|
||||
- AF16
|
||||
- AF17
|
||||
- AF18
|
||||
- AF19
|
||||
- AF20
|
||||
- AF21
|
||||
- AF23
|
||||
- AF25
|
||||
- AF26
|
||||
- B10
|
||||
- B11
|
||||
- B12
|
||||
- B13
|
||||
- B14
|
||||
- B15
|
||||
- B16
|
||||
- B18
|
||||
- B19
|
||||
- B21
|
||||
- B22
|
||||
- B23
|
||||
- B24
|
||||
- B25
|
||||
- B26
|
||||
- B6
|
||||
- B7
|
||||
- B8
|
||||
- B9
|
||||
- C10
|
||||
- C11
|
||||
- C12
|
||||
- C13
|
||||
- C14
|
||||
- C15
|
||||
- C16
|
||||
- C17
|
||||
- C18
|
||||
- C19
|
||||
- C20
|
||||
- C23
|
||||
- C26
|
||||
- C6
|
||||
- C7
|
||||
- C8
|
||||
- C9
|
||||
- D10
|
||||
- D12
|
||||
- D14
|
||||
- D15
|
||||
- D19
|
||||
- D20
|
||||
- D24
|
||||
- D26
|
||||
- D7
|
||||
- D8
|
||||
- D9
|
||||
- E10
|
||||
- E11
|
||||
- E12
|
||||
- E13
|
||||
- E14
|
||||
- E26
|
||||
- E7
|
||||
- E8
|
||||
- E9
|
||||
- F10
|
||||
- F11
|
||||
- F12
|
||||
- F13
|
||||
- F14
|
||||
- F26
|
||||
- F7
|
||||
- F8
|
||||
- F9
|
||||
- G10
|
||||
- G11
|
||||
- G7
|
||||
- G8
|
||||
- G9
|
||||
- H10
|
||||
- H11
|
||||
- H7
|
||||
- H8
|
||||
- H9
|
||||
- J10
|
||||
- J11
|
||||
- J12
|
||||
- J13
|
||||
- J9
|
||||
- K12
|
||||
- K13
|
||||
- L12
|
||||
- M13
|
||||
- M14
|
||||
- M15
|
||||
- M16
|
||||
- N13
|
||||
- N14
|
||||
- N15
|
||||
- N25
|
||||
- N26
|
||||
- P13
|
||||
- P14
|
||||
- P25
|
||||
- P26
|
||||
- R14
|
||||
- R25
|
||||
- R26
|
||||
- T23
|
||||
- T24
|
||||
- U21
|
||||
- U22
|
||||
- U25
|
||||
- U26
|
||||
- V14
|
||||
- V16
|
||||
- V17
|
||||
- V18
|
||||
- V19
|
||||
- V20
|
||||
- V21
|
||||
- V22
|
||||
- V23
|
||||
- V24
|
||||
- W14
|
||||
- W16
|
||||
- W17
|
||||
- W18
|
||||
- W20
|
||||
- W21
|
||||
- W22
|
||||
- W25
|
||||
- W26
|
||||
- Y11
|
||||
- Y15
|
||||
- Y16
|
||||
- Y17
|
||||
- Y18
|
||||
- Y20
|
||||
- Y21
|
||||
- Y22
|
||||
- Y23
|
||||
- Y24
|
||||
- Y25
|
||||
- Y26
|
||||
|
||||
drive-strength:
|
||||
enum: [4, 8, 12, 16]
|
||||
|
||||
bias-disable: true
|
||||
bias-pull-up: true
|
||||
bias-pull-down: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
allOf:
|
||||
- $ref: pinctrl.yaml#
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
pinctrl@400 {
|
||||
compatible = "aspeed,ast2700-soc1-pinctrl";
|
||||
reg = <0x400 0x2A0>;
|
||||
sgpm0-state {
|
||||
function = "SGPM0";
|
||||
groups = "SGPM0";
|
||||
};
|
||||
};
|
||||
@@ -17,6 +17,7 @@ properties:
|
||||
enum:
|
||||
- mediatek,mt2701-pinctrl
|
||||
- mediatek,mt2712-pinctrl
|
||||
- mediatek,mt6392-pinctrl
|
||||
- mediatek,mt6397-pinctrl
|
||||
- mediatek,mt7623-pinctrl
|
||||
- mediatek,mt8127-pinctrl
|
||||
|
||||
@@ -152,6 +152,14 @@ patternProperties:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [0, 1, 2, 3]
|
||||
|
||||
slew-rate:
|
||||
description: |
|
||||
Set the slew rate. Valid arguments are described as below:
|
||||
0: Normal slew rate
|
||||
1: Slower slew
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [0, 1]
|
||||
|
||||
required:
|
||||
- pinmux
|
||||
|
||||
|
||||
@@ -67,6 +67,11 @@ properties:
|
||||
|
||||
# PIN CONFIGURATION NODES
|
||||
patternProperties:
|
||||
"-hog(-[0-9]+)?$":
|
||||
type: object
|
||||
required:
|
||||
- gpio-hog
|
||||
|
||||
'-pins$':
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
@@ -58,7 +58,11 @@ patternProperties:
|
||||
drive_soc_gpio27_pee6, drive_ao_retention_n_pee2,
|
||||
drive_vcomp_alert_pee1, drive_hdmi_cec_pgg0 ]
|
||||
|
||||
unevaluatedProperties: false
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
||||
@@ -115,7 +115,11 @@ patternProperties:
|
||||
drive_sdmmc1_dat2_pj4, drive_sdmmc1_dat1_pj3,
|
||||
drive_sdmmc1_dat0_pj2 ]
|
||||
|
||||
unevaluatedProperties: false
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/nvidia,tegra238-pinmux-aon.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NVIDIA Tegra238 AON Pinmux Controller
|
||||
|
||||
maintainers:
|
||||
- Thierry Reding <thierry.reding@gmail.com>
|
||||
- Jon Hunter <jonathanh@nvidia.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: nvidia,tegra238-pinmux-aon
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
patternProperties:
|
||||
"^pinmux(-[a-z0-9-]+)?$":
|
||||
type: object
|
||||
|
||||
# pin groups
|
||||
additionalProperties:
|
||||
$ref: nvidia,tegra238-pinmux-common.yaml
|
||||
|
||||
properties:
|
||||
nvidia,pins:
|
||||
items:
|
||||
enum: [ bootv_ctl_n_paa0, soc_gpio00_paa1, vcomp_alert_paa2,
|
||||
pwm1_paa3, batt_oc_paa4, soc_gpio04_paa5,
|
||||
soc_gpio25_paa6, soc_gpio26_paa7,
|
||||
hdmi_cec_pbb0,
|
||||
spi2_sck_pcc0, spi2_miso_pcc1, spi2_mosi_pcc2,
|
||||
spi2_cs0_pcc3, spi2_cs1_pcc4, uart3_tx_pcc5,
|
||||
uart3_rx_pcc6, gen2_i2c_scl_pcc7,
|
||||
gen2_i2c_sda_pdd0, gen8_i2c_scl_pdd1,
|
||||
gen8_i2c_sda_pdd2, touch_clk_pdd3, dmic1_clk_pdd4,
|
||||
dmic1_dat_pdd5, soc_gpio19_pdd6, pwm2_pdd7,
|
||||
pwm3_pee0, pwm7_pee1, soc_gpio49_pee2,
|
||||
soc_gpio82_pee3, soc_gpio50_pee4, soc_gpio83_pee5,
|
||||
soc_gpio69_pff0, soc_gpio70_pff1, soc_gpio71_pff2,
|
||||
soc_gpio72_pff3, soc_gpio73_pff4, soc_gpio74_pff5,
|
||||
soc_gpio80_pff6, soc_gpio76_pff7, soc_gpio77_pgg0,
|
||||
soc_gpio84_pgg1, uart2_tx_pgg2, uart2_rx_pgg3,
|
||||
uart2_rts_pgg4, uart2_cts_pgg5, soc_gpio85_pgg6,
|
||||
uart5_tx_pgg7, uart5_rx_phh0, uart5_rts_phh1,
|
||||
uart5_cts_phh2, soc_gpio86_phh3,
|
||||
# drive groups (ordered PAA, PBB, PCC, PDD, PEE, PFF, PGG, PHH)
|
||||
drive_bootv_ctl_n_paa0, drive_soc_gpio00_paa1,
|
||||
drive_vcomp_alert_paa2, drive_pwm1_paa3,
|
||||
drive_batt_oc_paa4, drive_soc_gpio04_paa5,
|
||||
drive_soc_gpio25_paa6, drive_soc_gpio26_paa7,
|
||||
drive_hdmi_cec_pbb0,
|
||||
drive_spi2_sck_pcc0, drive_spi2_miso_pcc1,
|
||||
drive_spi2_mosi_pcc2, drive_spi2_cs0_pcc3,
|
||||
drive_spi2_cs1_pcc4, drive_uart3_tx_pcc5,
|
||||
drive_uart3_rx_pcc6, drive_gen2_i2c_scl_pcc7,
|
||||
drive_gen2_i2c_sda_pdd0, drive_gen8_i2c_scl_pdd1,
|
||||
drive_gen8_i2c_sda_pdd2, drive_touch_clk_pdd3,
|
||||
drive_dmic1_clk_pdd4, drive_dmic1_dat_pdd5,
|
||||
drive_soc_gpio19_pdd6, drive_pwm2_pdd7,
|
||||
drive_pwm3_pee0, drive_pwm7_pee1,
|
||||
drive_soc_gpio49_pee2, drive_soc_gpio50_pee4,
|
||||
drive_soc_gpio82_pee3, drive_soc_gpio71_pff2,
|
||||
drive_soc_gpio76_pff7, drive_soc_gpio74_pff5,
|
||||
drive_soc_gpio86_phh3, drive_soc_gpio72_pff3,
|
||||
drive_soc_gpio77_pgg0, drive_soc_gpio80_pff6,
|
||||
drive_soc_gpio84_pgg1, drive_soc_gpio83_pee5,
|
||||
drive_soc_gpio73_pff4, drive_soc_gpio70_pff1,
|
||||
drive_soc_gpio85_pgg6, drive_soc_gpio69_pff0,
|
||||
drive_uart5_tx_pgg7, drive_uart5_rx_phh0,
|
||||
drive_uart2_tx_pgg2, drive_uart2_rx_pgg3,
|
||||
drive_uart2_cts_pgg5, drive_uart2_rts_pgg4,
|
||||
drive_uart5_cts_phh2, drive_uart5_rts_phh1 ]
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/pinctrl/pinctrl-tegra.h>
|
||||
|
||||
pinmux@c300000 {
|
||||
compatible = "nvidia,tegra238-pinmux-aon";
|
||||
reg = <0x0c300000 0x4000>;
|
||||
|
||||
pinctrl-names = "cec";
|
||||
pinctrl-0 = <&cec_state>;
|
||||
|
||||
cec_state: pinmux-cec {
|
||||
cec {
|
||||
nvidia,pins = "hdmi_cec_pbb0";
|
||||
nvidia,function = "hdmi_cec";
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
||||
@@ -0,0 +1,73 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/nvidia,tegra238-pinmux-common.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NVIDIA Tegra238 Pinmux Controller
|
||||
|
||||
maintainers:
|
||||
- Thierry Reding <thierry.reding@gmail.com>
|
||||
- Jon Hunter <jonathanh@nvidia.com>
|
||||
|
||||
$ref: nvidia,tegra-pinmux-common.yaml
|
||||
|
||||
properties:
|
||||
nvidia,function:
|
||||
enum: [ dca_vsync, dca_hsync, displaya, rsvd0, i2c7_clk, i2c7_dat,
|
||||
i2c4_dat, i2c4_clk, i2c9_dat, i2c9_clk, usb_vbus_en0,
|
||||
usb_vbus_en1, spi3_din, spi1_cs0, spi3_cs0, spi1_din,
|
||||
spi3_cs1, spi1_sck, spi3_sck, spi1_cs1, spi1_dout, spi3_dout,
|
||||
gp_pwm5, gp_pwm6, extperiph2_clk, extperiph1_clk, i2c3_dat,
|
||||
i2c3_clk, extperiph4_clk, extperiph3_clk, dmic2_dat,
|
||||
dmic2_clk, uarta_cts, uarta_rts, uarta_rxd, uarta_txd,
|
||||
i2c5_clk, i2c5_dat, uartd_cts, uartd_rts, uartd_rxd,
|
||||
uartd_txd, i2c1_clk, i2c1_dat, sdmmc1_cd, i2s2_sclk,
|
||||
i2s2_sdata_out, i2s2_sdata_in, i2s2_lrck, i2s4_sclk,
|
||||
i2s4_sdata_out, i2s4_sdata_in, i2s4_lrck, i2s1_sclk,
|
||||
i2s1_sdata_out, i2s1_sdata_in, i2s1_lrck, aud_mclk,
|
||||
i2s3_lrck, i2s3_sclk, i2s3_sdata_in, i2s3_sdata_out,
|
||||
pe2_clkreq_l, pe1_clkreq_l, pe1_rst_l, pe0_clkreq_l,
|
||||
pe0_rst_l, pe2_rst_l, pe3_clkreq_l, pe3_rst_l,
|
||||
dp_aux_ch0_hpd, qspi0_io0, qspi0_io1, qspi0_sck, qspi0_cs_n,
|
||||
uartg_cts, uartg_rts, uartg_txd, uartg_rxd, sdmmc1_clk,
|
||||
sdmmc1_cmd, sdmmc1_comp, sdmmc1_dat3, sdmmc1_dat2,
|
||||
sdmmc1_dat1, sdmmc1_dat0, ufs0, soc_therm_oc1, hdmi_cec,
|
||||
gp_pwm4, uartc_rxd, uartc_txd, i2c8_dat, i2c8_clk,
|
||||
spi2_dout, i2c2_clk, spi2_cs0, i2c2_dat, spi2_sck, spi2_din,
|
||||
ppc_mode_1, ppc_ready, ppc_mode_2, ppc_cc, ppc_mode_0,
|
||||
ppc_int_n, uarte_txd, uarte_rxd, uartb_txd, uartb_rxd,
|
||||
uartb_cts, uartb_rts, uarte_cts, uarte_rts, gp_pwm7,
|
||||
gp_pwm2, gp_pwm3, gp_pwm1, spi2_cs1, dmic1_clk, dmic1_dat,
|
||||
rsvd1, dcb_hsync, dcb_vsync, soc_therm_oc4, gp_pwm8,
|
||||
nv_therm_fan_tach0, wdt_reset_outa, ccla_la_trigger_mux,
|
||||
dspk1_dat, dspk1_clk, nv_therm_fan_tach1, dspk0_dat,
|
||||
dspk0_clk, i2s5_sclk, i2s6_lrck, i2s6_sdata_in, i2s6_sclk,
|
||||
i2s6_sdata_out, i2s5_lrck, i2s5_sdata_out, i2s5_sdata_in,
|
||||
sdmmc1_pe3_rst_l, sdmmc1_pe3_clkreq_l, touch_clk,
|
||||
ppc_i2c_dat, wdt_reset_outb, spi5_cs1, ppc_rst_n,
|
||||
ppc_i2c_clk, spi4_cs1, soc_therm_oc3, spi5_sck, spi5_miso,
|
||||
spi4_sck, spi4_miso, spi4_cs0, spi4_mosi, spi5_cs0,
|
||||
spi5_mosi, led_blink, rsvd2, dmic3_clk, dmic3_dat,
|
||||
dmic4_clk, dmic4_dat, tsc_edge_out0, tsc_edge_out3,
|
||||
tsc_edge_out1, tsc_edge_out2, dmic5_clk, dmic5_dat, rsvd3,
|
||||
sdmmc1_wp, tsc_edge_out0a, tsc_edge_out0d, tsc_edge_out0b,
|
||||
tsc_edge_out0c, soc_therm_oc2 ]
|
||||
|
||||
# out of the common properties, only these are allowed for Tegra238
|
||||
nvidia,pins: true
|
||||
nvidia,pull: true
|
||||
nvidia,tristate: true
|
||||
nvidia,schmitt: true
|
||||
nvidia,enable-input: true
|
||||
nvidia,open-drain: true
|
||||
nvidia,lock: true
|
||||
nvidia,drive-type: true
|
||||
nvidia,io-hv: true
|
||||
|
||||
required:
|
||||
- nvidia,pins
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
...
|
||||
@@ -0,0 +1,219 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/nvidia,tegra238-pinmux.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NVIDIA Tegra238 Pinmux Controller
|
||||
|
||||
maintainers:
|
||||
- Thierry Reding <thierry.reding@gmail.com>
|
||||
- Jon Hunter <jonathanh@nvidia.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: nvidia,tegra238-pinmux
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
patternProperties:
|
||||
"^pinmux(-[a-z0-9-]+)?$":
|
||||
type: object
|
||||
|
||||
# pin groups
|
||||
additionalProperties:
|
||||
$ref: nvidia,tegra238-pinmux-common.yaml
|
||||
|
||||
properties:
|
||||
nvidia,pins:
|
||||
items:
|
||||
enum: [ gpu_pwr_req_pa0, gp_pwm5_pa1, gp_pwm6_pa2, spi3_sck_pa3,
|
||||
spi3_miso_pa4, spi3_mosi_pa5, spi3_cs0_pa6, spi3_cs1_pa7,
|
||||
spi1_sck_pb0, spi1_miso_pb1, spi1_mosi_pb2, spi1_cs0_pb3,
|
||||
spi1_cs1_pb4, pwr_i2c_scl_pc0, pwr_i2c_sda_pc1,
|
||||
extperiph1_clk_pc2, extperiph2_clk_pc3, cam_i2c_scl_pc4,
|
||||
cam_i2c_sda_pc5, soc_gpio23_pc6, soc_gpio24_pc7,
|
||||
soc_gpio27_pd0, soc_gpio55_pd1, soc_gpio29_pd2,
|
||||
soc_gpio33_pd3, soc_gpio32_pd4, soc_gpio35_pd5,
|
||||
soc_gpio37_pd6, soc_gpio56_pd7, uart1_tx_pe0,
|
||||
uart1_rx_pe1, uart1_rts_pe2, uart1_cts_pe3,
|
||||
soc_gpio13_pf0, soc_gpio14_pf1, soc_gpio15_pf2,
|
||||
soc_gpio16_pf3, soc_gpio17_pf4, soc_gpio18_pf5,
|
||||
soc_gpio20_pf6, soc_gpio21_pf7, soc_gpio22_pg0,
|
||||
soc_gpio06_pg1, uart4_tx_pg2, uart4_rx_pg3,
|
||||
uart4_rts_pg4, uart4_cts_pg5, soc_gpio41_pg6,
|
||||
soc_gpio42_pg7, soc_gpio43_ph0, soc_gpio44_ph1,
|
||||
gen1_i2c_scl_ph2, gen1_i2c_sda_ph3, cpu_pwr_req_ph4,
|
||||
soc_gpio07_ph5, dap3_clk_pj0, dap3_dout_pj1,
|
||||
dap3_din_pj2, dap3_fs_pj3, soc_gpio57_pj4,
|
||||
soc_gpio58_pj5, soc_gpio59_pj6, soc_gpio60_pj7,
|
||||
soc_gpio45_pk0, soc_gpio46_pk1, soc_gpio47_pk2,
|
||||
soc_gpio48_pk3, qspi0_sck_pl0, qspi0_io0_pl1,
|
||||
qspi0_io1_pl2, qspi0_cs_n_pl3, soc_gpio152_pl4,
|
||||
soc_gpio153_pl5, soc_gpio154_pl6, soc_gpio155_pl7,
|
||||
soc_gpio156_pm0, soc_gpio157_pm1, soc_gpio158_pm2,
|
||||
soc_gpio159_pm3, soc_gpio160_pm4, soc_gpio161_pm5,
|
||||
soc_gpio162_pm6, uart7_tx_pm7, uart7_rx_pn0,
|
||||
uart7_rts_pn1, uart7_cts_pn2, soc_gpio167_pp0,
|
||||
soc_gpio168_pp1, soc_gpio169_pp2, soc_gpio170_pp3,
|
||||
dap4_sclk_pp4, dap4_dout_pp5, dap4_din_pp6, dap4_fs_pp7,
|
||||
soc_gpio171_pq0, soc_gpio172_pq1, soc_gpio173_pq2,
|
||||
soc_gpio61_pr0, soc_gpio62_pr1, soc_gpio63_pr2,
|
||||
soc_gpio64_pr3, soc_gpio65_pr4, soc_gpio66_pr5,
|
||||
soc_gpio67_pr6, soc_gpio68_pr7, gen4_i2c_scl_ps0,
|
||||
gen4_i2c_sda_ps1, soc_gpio75_ps2, gen7_i2c_scl_ps3,
|
||||
gen7_i2c_sda_ps4, soc_gpio78_ps5, gen9_i2c_scl_ps6,
|
||||
gen9_i2c_sda_ps7, soc_gpio81_pt0, soc_gpio36_pt1,
|
||||
soc_gpio53_pt2, soc_gpio38_pt3, soc_gpio40_pt4,
|
||||
soc_gpio34_pt5, usb_vbus_en0_pt6, usb_vbus_en1_pt7,
|
||||
sdmmc1_clk_pu0, sdmmc1_cmd_pu1, sdmmc1_dat0_pu2,
|
||||
sdmmc1_dat1_pu3, sdmmc1_dat2_pu4, sdmmc1_dat3_pu5,
|
||||
ufs0_ref_clk_pv0, ufs0_rst_n_pv1, pex_l0_clkreq_n_pw0,
|
||||
pex_l0_rst_n_pw1, pex_l1_clkreq_n_pw2,
|
||||
pex_l1_rst_n_pw3, pex_l2_clkreq_n_pw4,
|
||||
pex_l2_rst_n_pw5, pex_l3_clkreq_n_pw6,
|
||||
pex_l3_rst_n_pw7, pex_wake_n_px0, dp_aux_ch0_hpd_px1,
|
||||
bootv_ctl_n_paa0, soc_gpio00_paa1, vcomp_alert_paa2,
|
||||
pwm1_paa3, batt_oc_paa4, soc_gpio04_paa5,
|
||||
soc_gpio25_paa6, soc_gpio26_paa7, hdmi_cec_pbb0,
|
||||
spi2_sck_pcc0, spi2_miso_pcc1, spi2_mosi_pcc2,
|
||||
spi2_cs0_pcc3, spi2_cs1_pcc4, uart3_tx_pcc5,
|
||||
uart3_rx_pcc6, gen2_i2c_scl_pcc7, gen2_i2c_sda_pdd0,
|
||||
gen8_i2c_scl_pdd1, gen8_i2c_sda_pdd2, touch_clk_pdd3,
|
||||
dmic1_clk_pdd4, dmic1_dat_pdd5, soc_gpio19_pdd6,
|
||||
pwm2_pdd7, pwm3_pee0, pwm7_pee1, soc_gpio49_pee2,
|
||||
soc_gpio82_pee3, soc_gpio50_pee4, soc_gpio83_pee5,
|
||||
soc_gpio69_pff0, soc_gpio70_pff1, soc_gpio71_pff2,
|
||||
soc_gpio72_pff3, soc_gpio73_pff4, soc_gpio74_pff5,
|
||||
soc_gpio80_pff6, soc_gpio76_pff7, soc_gpio77_pgg0,
|
||||
soc_gpio84_pgg1, uart2_tx_pgg2, uart2_rx_pgg3,
|
||||
uart2_rts_pgg4, uart2_cts_pgg5, soc_gpio85_pgg6,
|
||||
uart5_tx_pgg7, uart5_rx_phh0, uart5_rts_phh1,
|
||||
uart5_cts_phh2, soc_gpio86_phh3, sdmmc1_comp,
|
||||
# drive groups
|
||||
drive_soc_gpio36_pt1, drive_soc_gpio53_pt2,
|
||||
drive_soc_gpio38_pt3, drive_soc_gpio40_pt4,
|
||||
drive_soc_gpio75_ps2, drive_soc_gpio81_pt0,
|
||||
drive_soc_gpio78_ps5, drive_soc_gpio34_pt5,
|
||||
drive_gen7_i2c_scl_ps3, drive_gen7_i2c_sda_ps4,
|
||||
drive_gen4_i2c_sda_ps1, drive_gen4_i2c_scl_ps0,
|
||||
drive_gen9_i2c_sda_ps7, drive_gen9_i2c_scl_ps6,
|
||||
drive_usb_vbus_en0_pt6, drive_usb_vbus_en1_pt7,
|
||||
drive_soc_gpio61_pr0, drive_soc_gpio62_pr1,
|
||||
drive_soc_gpio63_pr2, drive_soc_gpio64_pr3,
|
||||
drive_soc_gpio65_pr4, drive_soc_gpio66_pr5,
|
||||
drive_soc_gpio67_pr6, drive_soc_gpio68_pr7,
|
||||
drive_spi3_miso_pa4, drive_spi1_cs0_pb3,
|
||||
drive_spi3_cs0_pa6, drive_spi1_miso_pb1,
|
||||
drive_spi3_cs1_pa7, drive_spi1_sck_pb0,
|
||||
drive_spi3_sck_pa3, drive_spi1_cs1_pb4,
|
||||
drive_spi1_mosi_pb2, drive_spi3_mosi_pa5,
|
||||
drive_gpu_pwr_req_pa0, drive_gp_pwm5_pa1,
|
||||
drive_gp_pwm6_pa2, drive_extperiph2_clk_pc3,
|
||||
drive_extperiph1_clk_pc2, drive_cam_i2c_sda_pc5,
|
||||
drive_cam_i2c_scl_pc4, drive_soc_gpio23_pc6,
|
||||
drive_soc_gpio24_pc7, drive_soc_gpio27_pd0,
|
||||
drive_soc_gpio29_pd2, drive_soc_gpio32_pd4,
|
||||
drive_soc_gpio33_pd3, drive_soc_gpio35_pd5,
|
||||
drive_soc_gpio37_pd6, drive_soc_gpio56_pd7,
|
||||
drive_soc_gpio55_pd1, drive_uart1_cts_pe3,
|
||||
drive_uart1_rts_pe2, drive_uart1_rx_pe1,
|
||||
drive_uart1_tx_pe0, drive_pwr_i2c_scl_pc0,
|
||||
drive_pwr_i2c_sda_pc1, drive_cpu_pwr_req_ph4,
|
||||
drive_uart4_cts_pg5, drive_uart4_rts_pg4,
|
||||
drive_uart4_rx_pg3, drive_uart4_tx_pg2,
|
||||
drive_gen1_i2c_scl_ph2, drive_gen1_i2c_sda_ph3,
|
||||
drive_soc_gpio20_pf6, drive_soc_gpio21_pf7,
|
||||
drive_soc_gpio22_pg0, drive_soc_gpio13_pf0,
|
||||
drive_soc_gpio14_pf1, drive_soc_gpio15_pf2,
|
||||
drive_soc_gpio16_pf3, drive_soc_gpio17_pf4,
|
||||
drive_soc_gpio18_pf5, drive_soc_gpio41_pg6,
|
||||
drive_soc_gpio42_pg7, drive_soc_gpio43_ph0,
|
||||
drive_soc_gpio44_ph1, drive_soc_gpio06_pg1,
|
||||
drive_soc_gpio07_ph5, drive_dap4_sclk_pp4,
|
||||
drive_dap4_dout_pp5, drive_dap4_din_pp6,
|
||||
drive_dap4_fs_pp7, drive_soc_gpio167_pp0,
|
||||
drive_soc_gpio168_pp1, drive_soc_gpio169_pp2,
|
||||
drive_soc_gpio170_pp3, drive_soc_gpio171_pq0,
|
||||
drive_soc_gpio172_pq1, drive_soc_gpio173_pq2,
|
||||
drive_soc_gpio45_pk0, drive_soc_gpio46_pk1,
|
||||
drive_soc_gpio47_pk2, drive_soc_gpio48_pk3,
|
||||
drive_soc_gpio57_pj4, drive_soc_gpio58_pj5,
|
||||
drive_soc_gpio59_pj6, drive_soc_gpio60_pj7,
|
||||
drive_dap3_fs_pj3, drive_dap3_clk_pj0,
|
||||
drive_dap3_din_pj2, drive_dap3_dout_pj1,
|
||||
drive_pex_l2_clkreq_n_pw4, drive_pex_wake_n_px0,
|
||||
drive_pex_l1_clkreq_n_pw2, drive_pex_l1_rst_n_pw3,
|
||||
drive_pex_l0_clkreq_n_pw0, drive_pex_l0_rst_n_pw1,
|
||||
drive_pex_l2_rst_n_pw5, drive_pex_l3_clkreq_n_pw6,
|
||||
drive_pex_l3_rst_n_pw7, drive_dp_aux_ch0_hpd_px1,
|
||||
drive_qspi0_io0_pl1, drive_qspi0_io1_pl2,
|
||||
drive_qspi0_sck_pl0, drive_qspi0_cs_n_pl3,
|
||||
drive_soc_gpio156_pm0, drive_soc_gpio155_pl7,
|
||||
drive_soc_gpio160_pm4, drive_soc_gpio154_pl6,
|
||||
drive_soc_gpio152_pl4, drive_soc_gpio153_pl5,
|
||||
drive_soc_gpio161_pm5, drive_soc_gpio162_pm6,
|
||||
drive_soc_gpio159_pm3, drive_soc_gpio157_pm1,
|
||||
drive_soc_gpio158_pm2, drive_uart7_cts_pn2,
|
||||
drive_uart7_rts_pn1, drive_uart7_tx_pm7,
|
||||
drive_uart7_rx_pn0, drive_sdmmc1_clk_pu0,
|
||||
drive_sdmmc1_cmd_pu1, drive_sdmmc1_dat3_pu5,
|
||||
drive_sdmmc1_dat2_pu4, drive_sdmmc1_dat1_pu3,
|
||||
drive_sdmmc1_dat0_pu2, drive_ufs0_rst_n_pv1,
|
||||
drive_ufs0_ref_clk_pv0, drive_batt_oc_paa4,
|
||||
drive_bootv_ctl_n_paa0, drive_vcomp_alert_paa2,
|
||||
drive_hdmi_cec_pbb0, drive_touch_clk_pdd3,
|
||||
drive_uart3_rx_pcc6, drive_uart3_tx_pcc5,
|
||||
drive_gen8_i2c_sda_pdd2, drive_gen8_i2c_scl_pdd1,
|
||||
drive_spi2_mosi_pcc2, drive_gen2_i2c_scl_pcc7,
|
||||
drive_spi2_cs0_pcc3, drive_gen2_i2c_sda_pdd0,
|
||||
drive_spi2_sck_pcc0, drive_spi2_miso_pcc1,
|
||||
drive_soc_gpio49_pee2, drive_soc_gpio50_pee4,
|
||||
drive_soc_gpio82_pee3, drive_soc_gpio71_pff2,
|
||||
drive_soc_gpio76_pff7, drive_soc_gpio74_pff5,
|
||||
drive_soc_gpio00_paa1, drive_soc_gpio19_pdd6,
|
||||
drive_soc_gpio86_phh3, drive_soc_gpio72_pff3,
|
||||
drive_soc_gpio77_pgg0, drive_soc_gpio80_pff6,
|
||||
drive_soc_gpio84_pgg1, drive_soc_gpio83_pee5,
|
||||
drive_soc_gpio73_pff4, drive_soc_gpio70_pff1,
|
||||
drive_soc_gpio04_paa5, drive_soc_gpio85_pgg6,
|
||||
drive_soc_gpio69_pff0, drive_soc_gpio25_paa6,
|
||||
drive_soc_gpio26_paa7, drive_uart5_tx_pgg7,
|
||||
drive_uart5_rx_phh0, drive_uart2_tx_pgg2,
|
||||
drive_uart2_rx_pgg3, drive_uart2_cts_pgg5,
|
||||
drive_uart2_rts_pgg4, drive_uart5_cts_phh2,
|
||||
drive_uart5_rts_phh1, drive_pwm7_pee1,
|
||||
drive_pwm2_pdd7, drive_pwm3_pee0, drive_pwm1_paa3,
|
||||
drive_spi2_cs1_pcc4, drive_dmic1_clk_pdd4,
|
||||
drive_dmic1_dat_pdd5, drive_sdmmc1_comp ]
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/pinctrl/pinctrl-tegra.h>
|
||||
|
||||
pinmux@2430000 {
|
||||
compatible = "nvidia,tegra238-pinmux";
|
||||
reg = <0x2430000 0x17000>;
|
||||
|
||||
pinctrl-names = "pex_rst";
|
||||
pinctrl-0 = <&pex_rst_c5_out_state>;
|
||||
|
||||
pex_rst_c5_out_state: pinmux-pex-rst-c5-out {
|
||||
pexrst {
|
||||
nvidia,pins = "pex_l3_rst_n_pw7";
|
||||
nvidia,schmitt = <TEGRA_PIN_DISABLE>;
|
||||
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
|
||||
nvidia,io-hv = <TEGRA_PIN_ENABLE>;
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
||||
@@ -0,0 +1,80 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/nvidia,tegra264-pinmux-aon.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NVIDIA Tegra264 AON Pinmux Controller
|
||||
|
||||
maintainers:
|
||||
- Thierry Reding <thierry.reding@gmail.com>
|
||||
- Jon Hunter <jonathanh@nvidia.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: nvidia,tegra264-pinmux-aon
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
patternProperties:
|
||||
"^pinmux(-[a-z0-9-]+)?$":
|
||||
type: object
|
||||
|
||||
# pin groups
|
||||
additionalProperties:
|
||||
$ref: nvidia,tegra264-pinmux-common.yaml
|
||||
|
||||
properties:
|
||||
nvidia,pins:
|
||||
items:
|
||||
enum: [ soc_gpio00_paa0, vcomp_alert_paa1, ao_retention_n_paa2,
|
||||
batt_oc_paa3, bootv_ctl_n_paa4, power_on_paa5,
|
||||
hdmi_cec_paa6, soc_gpio07_paa7, soc_gpio08_pbb0,
|
||||
soc_gpio09_pbb1, gen2_i2c_scl_pcc0, gen2_i2c_sda_pcc1,
|
||||
gen3_i2c_scl_pcc2, gen3_i2c_sda_pcc3, gp_pwm4_pcc4,
|
||||
uart0_tx_pcc5, uart0_rx_pcc6, spi2_sck_pcc7,
|
||||
spi2_miso_pdd0, spi2_mosi_pdd1, spi2_cs0_n_pdd2,
|
||||
soc_gpio21_pdd3, soc_gpio22_pdd4, soc_gpio23_pdd5,
|
||||
soc_gpio24_pdd6, soc_gpio25_pdd7, soc_gpio26_pee0,
|
||||
soc_gpio27_pee1, soc_gpio28_pee2, soc_gpio29_pee3,
|
||||
drive_ao_retention_n_paa2, drive_batt_oc_paa3,
|
||||
drive_power_on_paa5, drive_vcomp_alert_paa1,
|
||||
drive_bootv_ctl_n_paa4, drive_soc_gpio00_paa0,
|
||||
drive_soc_gpio07_paa7, drive_soc_gpio08_pbb0,
|
||||
drive_soc_gpio09_pbb1, drive_hdmi_cec_paa6,
|
||||
drive_gen2_i2c_scl_pcc0, drive_gen2_i2c_sda_pcc1,
|
||||
drive_gen3_i2c_scl_pcc2, drive_gen3_i2c_sda_pcc3,
|
||||
drive_gp_pwm4_pcc4, drive_uart0_tx_pcc5,
|
||||
drive_uart0_rx_pcc6, drive_spi2_sck_pcc7,
|
||||
drive_spi2_miso_pdd0, drive_spi2_mosi_pdd1,
|
||||
drive_spi2_cs0_n_pdd2, drive_soc_gpio21_pdd3,
|
||||
drive_soc_gpio22_pdd4, drive_soc_gpio23_pdd5,
|
||||
drive_soc_gpio24_pdd6, drive_soc_gpio25_pdd7,
|
||||
drive_soc_gpio26_pee0, drive_soc_gpio27_pee1,
|
||||
drive_soc_gpio28_pee2, drive_soc_gpio29_pee3 ]
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/pinctrl/pinctrl-tegra.h>
|
||||
|
||||
pinmux@c7a2000 {
|
||||
compatible = "nvidia,tegra264-pinmux-aon";
|
||||
reg = <0xc7a2000 0x2000>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&state_default>;
|
||||
|
||||
state_default: pinmux-default {
|
||||
uart0 {
|
||||
nvidia,pins = "uart0_tx_pcc5";
|
||||
nvidia,function = "uarta_txd";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,84 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/nvidia,tegra264-pinmux-common.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NVIDIA Tegra264 Pinmux Common Properties
|
||||
|
||||
maintainers:
|
||||
- Thierry Reding <thierry.reding@gmail.com>
|
||||
- Jon Hunter <jonathanh@nvidia.com>
|
||||
|
||||
$ref: nvidia,tegra-pinmux-common.yaml
|
||||
|
||||
properties:
|
||||
nvidia,function:
|
||||
enum: [ dca_vsync, dca_hsync, rsvd0, dp_aux_ch0_hpd, dp_aux_ch1_hpd,
|
||||
dp_aux_ch2_hpd, dp_aux_ch3_hpd, gp_pwm2, gp_pwm3, i2c7_clk,
|
||||
i2c7_dat, i2c9_clk, i2c9_dat, uartk_cts, uartk_rts, uartk_rxd,
|
||||
uartk_txd, spi3_cs0, spi3_cs3, spi3_din, spi3_dout, spi3_sck,
|
||||
uartf_cts, uartf_rts, uartf_rxd, uartf_txd, spi1_cs0, spi1_cs1,
|
||||
spi1_din, spi1_dout, spi1_sck, extperiph2_clk, extperiph1_clk,
|
||||
i2c12_clk, i2c12_dat, nv_therm_fan_tach0, gp_pwm9, uartj_cts,
|
||||
uartj_rts, uartj_rxd, uartj_txd, i2c0_clk, i2c0_dat, i2c1_clk,
|
||||
i2c1_dat, i2s2_lrck, i2s2_sclk, i2s2_sdata_out, i2s2_sdata_in,
|
||||
gp_pwm10, uarte_cts, uarte_rts, uarte_rxd, uarte_txd, i2c5_dat,
|
||||
i2c5_clk, i2s6_sdata_in, i2s6_sdata_out, i2s6_lrck, i2s6_sclk,
|
||||
i2s4_sdata_out, i2s4_sclk, i2s4_sdata_in, i2s4_lrck, spi5_cs0,
|
||||
spi5_din, spi5_dout, spi5_sck, aud_mclk, i2s1_sclk, i2s1_sdata_in,
|
||||
i2s1_sdata_out, i2s1_lrck, i2c11_clk, i2c11_dat, xhalt_trig,
|
||||
gp_pwm1, gp_pwm6, gp_pwm7, gp_pwm8, ufs0, pe1_clkreq_l, pe1_rst_l,
|
||||
pe2_rst_l, pe2_clkreq_l, pe3_clkreq_l, pe3_rst_l, sgmii0_sma_mdio,
|
||||
sgmii0_sma_mdc, usb_vbus_en0, usb_vbus_en1, eth1_mdio, pe4_clkreq_l,
|
||||
pe4_rst_l, pe5_clkreq_l, pe5_rst_l, eth0_mdio, eth0_mdc, eth1_mdc,
|
||||
eth2_mdio, eth2_mdc, eth3_mdio, eth3_mdc, qspi0_cs_n, qspi0_io0,
|
||||
qspi0_io1, qspi0_io2, qspi0_io3, qspi0_sck, sdmmc1_clk, sdmmc1_cmd,
|
||||
sdmmc1_comp, sdmmc1_dat3, sdmmc1_dat2, sdmmc1_dat1, sdmmc1_dat0,
|
||||
qspi3_sck, qspi3_cs0, qspi3_io0, qspi3_io1, dcb_vsync, dcb_hsync,
|
||||
dsa_lspii, dce_vsync, dce_hsync, dch_vsync, dch_hsync, bl_en,
|
||||
bl_pwm_dim0, rsvd1, soc_therm_oc3, i2s5_sclk, i2s5_sdata_in,
|
||||
extperiph3_clk, extperiph4_clk, i2s5_sdata_out, i2s5_lrck,
|
||||
sdmmc1_cd, i2s7_sdata_in, spi4_sck, spi4_din, spi4_dout, spi4_cs0,
|
||||
spi4_cs1, gp_pwm5, i2c14_clk, i2c14_dat, i2s8_sclk, i2s8_sdata_out,
|
||||
i2s8_lrck, i2s8_sdata_in, i2c16_clk, i2c16_dat, i2s3_sclk,
|
||||
i2s3_sdata_out, i2s3_sdata_in, i2s3_lrck, pm_trig1, pm_trig0,
|
||||
qspi2_sck, qspi2_cs0, qspi2_io0, qspi2_io1, dcc_vsync, dcc_hsync,
|
||||
rsvd2, dcf_vsync, dcf_hsync, soundwire1_clk, soundwire1_dat0,
|
||||
soundwire1_dat1, soundwire1_dat2, dmic2_clk, dmic2_dat,
|
||||
nv_therm_fan_tach1, i2c15_clk, i2c15_dat, i2s7_lrck,
|
||||
ccla_la_trigger_mux, i2s7_sclk, i2s7_sdata_out, dmic1_dat,
|
||||
dmic1_clk, dcd_vsync, dcd_hsync, rsvd3, dcg_vsync, dcg_hsync,
|
||||
dspk1_clk, dspk1_dat, soc_therm_oc2, istctrl_ist_done_n,
|
||||
soc_therm_oc1, tsc_edge_out0c, tsc_edge_out0d, tsc_edge_out0a,
|
||||
tsc_edge_out0b, touch_clk, hdmi_cec, i2c2_clk, i2c2_dat, i2c3_clk,
|
||||
i2c3_dat, gp_pwm4, uarta_txd, uarta_rxd, spi2_sck, spi2_din,
|
||||
spi2_dout, spi2_cs0, tsc_sync1, tsc_edge_out3, tsc_edge_out0,
|
||||
tsc_edge_out1, tsc_sync0, soundwire0_clk, soundwire0_dat0,
|
||||
l0l1_rst_out_n, l2_rst_out_n, uartl_txd, uartl_rxd, i2s9_sclk,
|
||||
i2s9_sdata_out, i2s9_sdata_in, i2s9_lrck, dmic5_dat, dmic5_clk,
|
||||
tsc_edge_out2 ]
|
||||
|
||||
# out of the common properties, only these are allowed for Tegra264
|
||||
nvidia,pins: true
|
||||
nvidia,pull: true
|
||||
nvidia,tristate: true
|
||||
nvidia,schmitt: true
|
||||
nvidia,enable-input: true
|
||||
nvidia,open-drain: true
|
||||
nvidia,lock: true
|
||||
nvidia,drive-type: true
|
||||
nvidia,io-hv: true
|
||||
|
||||
required:
|
||||
- nvidia,pins
|
||||
|
||||
# We would typically use unevaluatedProperties here but that has the
|
||||
# downside that all the properties in the common bindings become valid
|
||||
# for all chip generations. In this case, however, we want the per-SoC
|
||||
# bindings to be able to override which of the common properties are
|
||||
# allowed, since not all pinmux generations support the same sets of
|
||||
# properties. This way, the common bindings define the format of the
|
||||
# properties but the per-SoC bindings define which of them apply to a
|
||||
# given chip.
|
||||
additionalProperties: false
|
||||
@@ -0,0 +1,167 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/nvidia,tegra264-pinmux-main.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NVIDIA Tegra264 Main Pinmux Controller
|
||||
|
||||
maintainers:
|
||||
- Thierry Reding <thierry.reding@gmail.com>
|
||||
- Jon Hunter <jonathanh@nvidia.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: nvidia,tegra264-pinmux-main
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
patternProperties:
|
||||
"^pinmux(-[a-z0-9-]+)?$":
|
||||
type: object
|
||||
|
||||
# pin groups
|
||||
additionalProperties:
|
||||
$ref: nvidia,tegra264-pinmux-common.yaml
|
||||
|
||||
properties:
|
||||
nvidia,pins:
|
||||
items:
|
||||
enum: [ pwm1_pa0, pwm6_pa1, pwm7_pa2, pwm8_pa3, ufs0_ref_clk_pa4,
|
||||
ufs0_rst_n_pa5, soc_gpio250_pf0, soc_gpio251_pf1,
|
||||
soc_gpio252_pf2, dp_aux_ch0_hpd_pf3, dp_aux_ch1_hpd_pf4,
|
||||
dp_aux_ch2_hpd_pf5, dp_aux_ch3_hpd_pf6, pwm2_pf7, pwm3_pg0,
|
||||
gen7_i2c_scl_pg1, gen7_i2c_sda_pg2, gen9_i2c_scl_pg3,
|
||||
gen9_i2c_sda_pg4, sdmmc1_clk_px0, sdmmc1_cmd_px1,
|
||||
sdmmc1_dat0_px2, sdmmc1_dat1_px3, sdmmc1_dat2_px4,
|
||||
sdmmc1_dat3_px5, sdmmc1_comp, soc_gpio124_pl0,
|
||||
soc_gpio125_pl1, fan_tach0_pl2, soc_gpio127_pl3,
|
||||
soc_gpio128_pl4, soc_gpio129_pl5, soc_gpio130_pl6,
|
||||
soc_gpio131_pl7, gp_pwm9_pm0, soc_gpio133_pm1, uart9_tx_pm2,
|
||||
uart9_rx_pm3, uart9_rts_n_pm4, uart9_cts_n_pm5,
|
||||
soc_gpio170_pu0, soc_gpio171_pu1, soc_gpio172_pu2,
|
||||
soc_gpio173_pu3, soc_gpio174_pu4, soc_gpio175_pu5,
|
||||
soc_gpio176_pu6, soc_gpio177_pu7, soc_gpio178_pv0,
|
||||
pwm10_pv1, uart4_tx_pv2, uart4_rx_pv3, uart4_rts_n_pv4,
|
||||
uart4_cts_n_pv5, dap2_clk_pv6, dap2_din_pv7, dap2_dout_pw0,
|
||||
dap2_fs_pw1, gen1_i2c_scl_pw2, gen1_i2c_sda_pw3,
|
||||
gen0_i2c_scl_pw4, gen0_i2c_sda_pw5, pwr_i2c_scl_pw6,
|
||||
pwr_i2c_sda_pw7, soc_gpio138_pp0, soc_gpio139_pp1,
|
||||
dap6_sclk_pp2, dap6_dout_pp3, dap6_din_pp4, dap6_fs_pp5,
|
||||
dap4_sclk_pp6, dap4_dout_pp7, dap4_din_pq0, dap4_fs_pq1,
|
||||
spi5_sck_pq2, spi5_miso_pq3, spi5_mosi_pq4, spi5_cs0_pq5,
|
||||
soc_gpio152_pq6, soc_gpio153_pq7, aud_mclk_pr0,
|
||||
soc_gpio155_pr1, dap1_sclk_pr2, dap1_out_pr3, dap1_in_pr4,
|
||||
dap1_fs_pr5, gen11_i2c_scl_pr6, gen11_i2c_sda_pr7,
|
||||
soc_gpio350_ps0, soc_gpio351_ps1, qspi0_sck_pt0,
|
||||
qspi0_cs_n_pt1, qspi0_io0_pt2, qspi0_io1_pt3, qspi0_io2_pt4,
|
||||
qspi0_io3_pt5, soc_gpio192_pt6, soc_gpio270_py0,
|
||||
soc_gpio271_py1, soc_gpio272_py2, soc_gpio273_py3,
|
||||
soc_gpio274_py4, soc_gpio275_py5, soc_gpio276_py6,
|
||||
soc_gpio277_py7, soc_gpio278_pz0, soc_gpio279_pz1,
|
||||
xhalt_trig_pz2, soc_gpio281_pz3, soc_gpio282_pz4,
|
||||
soc_gpio283_pz5, soc_gpio284_pz6, soc_gpio285_pz7,
|
||||
soc_gpio286_pal0, soc_gpio287_pal1, soc_gpio288_pal2,
|
||||
cpu_pwr_req_ph0, gpu_pwr_req_ph1, uart10_tx_ph2,
|
||||
uart10_rx_ph3, uart10_rts_n_ph4, uart10_cts_n_ph5,
|
||||
spi3_sck_ph6, spi3_miso_ph7, spi3_mosi_pj0, spi3_cs0_pj1,
|
||||
spi3_cs3_pj2, uart5_tx_pj3, uart5_rx_pj4, uart5_rts_n_pj5,
|
||||
uart5_cts_n_pj6, spi1_sck_pj7, spi1_miso_pk0, spi1_mosi_pk1,
|
||||
spi1_cs0_pk2, spi1_cs1_pk3, extperiph1_clk_pk4,
|
||||
extperiph2_clk_pk5, gen12_i2c_scl_pk6, gen12_i2c_sda_pk7,
|
||||
drive_cpu_pwr_req_ph0, drive_gpu_pwr_req_ph1,
|
||||
drive_uart10_cts_n_ph5, drive_uart10_rts_n_ph4,
|
||||
drive_uart10_rx_ph3, drive_uart10_tx_ph2,
|
||||
drive_spi3_cs0_pj1, drive_spi3_cs3_pj2,
|
||||
drive_spi3_miso_ph7, drive_spi3_mosi_pj0,
|
||||
drive_spi3_sck_ph6, drive_uart5_cts_n_pj6,
|
||||
drive_uart5_rts_n_pj5, drive_uart5_rx_pj4,
|
||||
drive_uart5_tx_pj3, drive_spi1_cs0_pk2,
|
||||
drive_spi1_cs1_pk3, drive_spi1_miso_pk0,
|
||||
drive_spi1_mosi_pk1, drive_spi1_sck_pj7,
|
||||
drive_extperiph2_clk_pk5, drive_extperiph1_clk_pk4,
|
||||
drive_gen12_i2c_scl_pk6, drive_gen12_i2c_sda_pk7,
|
||||
drive_soc_gpio124_pl0, drive_soc_gpio125_pl1,
|
||||
drive_fan_tach0_pl2, drive_soc_gpio127_pl3,
|
||||
drive_soc_gpio128_pl4, drive_soc_gpio129_pl5,
|
||||
drive_soc_gpio130_pl6, drive_soc_gpio131_pl7,
|
||||
drive_gp_pwm9_pm0, drive_soc_gpio133_pm1,
|
||||
drive_uart9_cts_n_pm5, drive_uart9_rts_n_pm4,
|
||||
drive_uart9_rx_pm3, drive_uart9_tx_pm2,
|
||||
drive_sdmmc1_clk_px0, drive_sdmmc1_cmd_px1,
|
||||
drive_sdmmc1_dat3_px5, drive_sdmmc1_dat2_px4,
|
||||
drive_sdmmc1_dat1_px3, drive_sdmmc1_dat0_px2,
|
||||
drive_qspi0_cs_n_pt1, drive_qspi0_io0_pt2,
|
||||
drive_qspi0_io1_pt3, drive_qspi0_io2_pt4,
|
||||
drive_qspi0_io3_pt5, drive_qspi0_sck_pt0,
|
||||
drive_soc_gpio192_pt6, drive_soc_gpio138_pp0,
|
||||
drive_soc_gpio139_pp1, drive_dap6_din_pp4,
|
||||
drive_dap6_dout_pp3, drive_dap6_fs_pp5,
|
||||
drive_dap6_sclk_pp2, drive_dap4_dout_pp7,
|
||||
drive_dap4_sclk_pp6, drive_dap4_din_pq0,
|
||||
drive_dap4_fs_pq1, drive_spi5_cs0_pq5,
|
||||
drive_spi5_miso_pq3, drive_spi5_mosi_pq4,
|
||||
drive_spi5_sck_pq2, drive_soc_gpio152_pq6,
|
||||
drive_soc_gpio153_pq7, drive_soc_gpio155_pr1,
|
||||
drive_aud_mclk_pr0, drive_dap1_sclk_pr2,
|
||||
drive_dap1_in_pr4, drive_dap1_out_pr3,
|
||||
drive_dap1_fs_pr5, drive_gen11_i2c_scl_pr6,
|
||||
drive_gen11_i2c_sda_pr7, drive_soc_gpio350_ps0,
|
||||
drive_soc_gpio351_ps1, drive_gen0_i2c_scl_pw4,
|
||||
drive_gen0_i2c_sda_pw5, drive_gen1_i2c_scl_pw2,
|
||||
drive_gen1_i2c_sda_pw3, drive_dap2_fs_pw1,
|
||||
drive_dap2_clk_pv6, drive_dap2_din_pv7,
|
||||
drive_dap2_dout_pw0, drive_pwm10_pv1,
|
||||
drive_soc_gpio170_pu0, drive_soc_gpio171_pu1,
|
||||
drive_soc_gpio172_pu2, drive_soc_gpio173_pu3,
|
||||
drive_soc_gpio174_pu4, drive_soc_gpio175_pu5,
|
||||
drive_soc_gpio176_pu6, drive_soc_gpio177_pu7,
|
||||
drive_soc_gpio178_pv0, drive_uart4_cts_n_pv5,
|
||||
drive_uart4_rts_n_pv4, drive_uart4_rx_pv3,
|
||||
drive_uart4_tx_pv2, drive_pwr_i2c_sda_pw7,
|
||||
drive_pwr_i2c_scl_pw6, drive_soc_gpio250_pf0,
|
||||
drive_soc_gpio251_pf1, drive_soc_gpio252_pf2,
|
||||
drive_dp_aux_ch0_hpd_pf3, drive_dp_aux_ch1_hpd_pf4,
|
||||
drive_dp_aux_ch2_hpd_pf5, drive_dp_aux_ch3_hpd_pf6,
|
||||
drive_pwm2_pf7, drive_pwm3_pg0,
|
||||
drive_gen7_i2c_scl_pg1, drive_gen7_i2c_sda_pg2,
|
||||
drive_gen9_i2c_scl_pg3, drive_gen9_i2c_sda_pg4,
|
||||
drive_soc_gpio270_py0, drive_soc_gpio271_py1,
|
||||
drive_soc_gpio272_py2, drive_soc_gpio273_py3,
|
||||
drive_soc_gpio274_py4, drive_soc_gpio275_py5,
|
||||
drive_soc_gpio276_py6, drive_soc_gpio277_py7,
|
||||
drive_soc_gpio278_pz0, drive_soc_gpio279_pz1,
|
||||
drive_soc_gpio282_pz4, drive_soc_gpio283_pz5,
|
||||
drive_soc_gpio284_pz6, drive_soc_gpio285_pz7,
|
||||
drive_soc_gpio286_pal0, drive_soc_gpio287_pal1,
|
||||
drive_soc_gpio288_pal2, drive_xhalt_trig_pz2,
|
||||
drive_soc_gpio281_pz3 ]
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/pinctrl/pinctrl-tegra.h>
|
||||
|
||||
pinmux@c281000 {
|
||||
compatible = "nvidia,tegra264-pinmux-main";
|
||||
reg = <0xc281000 0xc000>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&state_default>;
|
||||
|
||||
state_default: pinmux-default {
|
||||
sdmmc1 {
|
||||
nvidia,pins = "sdmmc1_clk_px0";
|
||||
nvidia,function = "sdmmc1_cd";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,78 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/nvidia,tegra264-pinmux-uphy.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NVIDIA Tegra264 UPHY Pinmux Controller
|
||||
|
||||
maintainers:
|
||||
- Thierry Reding <thierry.reding@gmail.com>
|
||||
- Jon Hunter <jonathanh@nvidia.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: nvidia,tegra264-pinmux-uphy
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
patternProperties:
|
||||
"^pinmux(-[a-z0-9-]+)?$":
|
||||
type: object
|
||||
|
||||
# pin groups
|
||||
additionalProperties:
|
||||
$ref: nvidia,tegra264-pinmux-common.yaml
|
||||
|
||||
properties:
|
||||
nvidia,pins:
|
||||
items:
|
||||
enum: [ eth1_mdio_pe0, pex_l4_clkreq_n_pd0, pex_l4_rst_n_pd1,
|
||||
pex_l5_clkreq_n_pd2, pex_l5_rst_n_pd3, eth0_mdio_pd4,
|
||||
eth0_mdc_pd5, eth1_mdc_pe1, eth2_mdio_pe2, eth2_mdc_pe3,
|
||||
eth3_mdio_pd6, eth3_mdc_pd7, pex_l1_clkreq_n_pb0,
|
||||
pex_l1_rst_n_pb1, pex_wake_n_pc2, pex_l2_rst_n_pb3,
|
||||
pex_l2_clkreq_n_pb2, pex_l3_clkreq_n_pb4, pex_l3_rst_n_pb5,
|
||||
sgmii0_sma_mdio_pc0, sgmii0_sma_mdc_pc1, soc_gpio113_pb6,
|
||||
soc_gpio114_pb7, pwm1_pa0, pwm6_pa1, pwm7_pa2, pwm8_pa3,
|
||||
ufs0_ref_clk_pa4, ufs0_rst_n_pa5, drive_eth1_mdio_pe0,
|
||||
drive_pex_l4_clkreq_n_pd0, drive_pex_l4_rst_n_pd1,
|
||||
drive_pex_l5_clkreq_n_pd2, drive_pex_l5_rst_n_pd3,
|
||||
drive_eth0_mdio_pd4, drive_eth0_mdc_pd5, drive_eth1_mdc_pe1,
|
||||
drive_eth2_mdio_pe2, drive_eth2_mdc_pe3, drive_eth3_mdio_pd6,
|
||||
drive_eth3_mdc_pd7, drive_pex_l1_clkreq_n_pb0,
|
||||
drive_pex_l1_rst_n_pb1, drive_pex_wake_n_pc2,
|
||||
drive_pex_l2_rst_n_pb3, drive_pex_l2_clkreq_n_pb2,
|
||||
drive_pex_l3_clkreq_n_pb4, drive_pex_l3_rst_n_pb5,
|
||||
drive_sgmii0_sma_mdio_pc0, drive_sgmii0_sma_mdc_pc1,
|
||||
drive_soc_gpio113_pb6, drive_soc_gpio114_pb7,
|
||||
drive_pwm1_pa0, drive_pwm6_pa1, drive_pwm7_pa2,
|
||||
drive_pwm8_pa3, drive_ufs0_ref_clk_pa4, drive_ufs0_rst_n_pa5 ]
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/pinctrl/pinctrl-tegra.h>
|
||||
|
||||
pinmux@82e0000 {
|
||||
compatible = "nvidia,tegra264-pinmux-uphy";
|
||||
reg = <0x82e0000 0x4000>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinmux_default>;
|
||||
|
||||
pinmux_default: pinmux-default {
|
||||
pex {
|
||||
nvidia,pins = "pex_l1_rst_n_pb1";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,57 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/pinctrl-multiplexer.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Generic pinctrl device for on-board MUX Chips
|
||||
|
||||
maintainers:
|
||||
- Frank Li <Frank.Li@nxp.com>
|
||||
|
||||
description:
|
||||
Generic pinctrl device for on-board MUX Chips, which switch SoC signals
|
||||
between different peripherals (e.g. MMC and UART).
|
||||
|
||||
The MUX select lines are often driven by a I2C GPIO expander.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: pinctrl-multiplexer
|
||||
|
||||
patternProperties:
|
||||
'-grp$':
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
mux-states:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- mux-states
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
allOf:
|
||||
- $ref: pinctrl.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
pinctrl-mux {
|
||||
compatible = "pinctrl-multiplexer";
|
||||
|
||||
uart-grp {
|
||||
mux-states = <&mux 0>;
|
||||
};
|
||||
|
||||
spi-grp {
|
||||
mux-states = <&mux 1>;
|
||||
};
|
||||
|
||||
i2c-grp {
|
||||
mux-states = <&mux 2>;
|
||||
};
|
||||
};
|
||||
@@ -27,7 +27,7 @@ description: |
|
||||
|
||||
properties:
|
||||
$nodename:
|
||||
pattern: "^(pinctrl|pinmux)(@[0-9a-f]+)?$"
|
||||
pattern: "^(pinctrl|pinmux)(@[0-9a-f]+|-[a-z0-9]+)?$"
|
||||
|
||||
"#pinctrl-cells":
|
||||
description: >
|
||||
|
||||
@@ -86,16 +86,22 @@ $defs:
|
||||
qdss_gpio_tracectl, qdss_gpio_tracedata, qlink_big_enable,
|
||||
qlink_big_request, qlink_little_enable,
|
||||
qlink_little_request, qlink_wmss, qspi0, qspi_clk,
|
||||
qspi_cs, qup1_se0, qup1_se1, qup1_se2, qup1_se3, qup1_se4,
|
||||
qup1_se5, qup1_se6, qup1_se7, qup2_se0, qup2_se1,
|
||||
qup2_se2, qup2_se3, qup2_se4, qup2_se5, qup2_se6,
|
||||
qup2_se7, resout_gpio, sd_write_protect, sdc1, sdc2,
|
||||
sdc2_fb_clk, tb_trig_sdc1, tb_trig_sdc2, tmess_prng0,
|
||||
tmess_prng1, tmess_prng2, tmess_prng3, tsense_pwm1,
|
||||
tsense_pwm2, tsense_pwm3, tsense_pwm4, uim0_clk,
|
||||
uim0_data, uim0_present, uim0_reset, uim1_clk, uim1_data,
|
||||
uim1_present, uim1_reset, usb0_hs, usb_phy, vfr_0, vfr_1,
|
||||
vsense_trigger_mirnat, wcn_sw_ctrl ]
|
||||
qspi_cs, qup1_se0, qup1_se1, qup1_se2, qup1_se2_l2_mira,
|
||||
qup1_se2_l2_mirb, qup1_se2_l3_mira, qup1_se2_l3_mirb,
|
||||
qup1_se3, qup1_se4_01, qup1_se4_23,
|
||||
qup1_se5, qup1_se6, qup1_se6_l1_mira,
|
||||
qup1_se6_l1_mirb, qup1_se6_l3_mira, qup1_se6_l3_mirb,
|
||||
qup1_se7, qup1_se7_l0_mira, qup1_se7_l0_mirb,
|
||||
qup1_se7_l1_mira, qup1_se7_l1_mirb, qup2_se0, qup2_se1,
|
||||
qup2_se2, qup2_se3, qup2_se3_l0_mira, qup2_se3_l0_mirb,
|
||||
qup2_se3_l1_mira, qup2_se3_l1_mirb, qup2_se4, qup2_se5,
|
||||
qup2_se6, qup2_se7, resout_gpio, sd_write_protect, sdc1,
|
||||
sdc2, sdc2_fb_clk, tb_trig_sdc1, tb_trig_sdc2,
|
||||
tmess_prng0, tmess_prng1, tmess_prng2, tmess_prng3,
|
||||
tsense_pwm1, tsense_pwm2, tsense_pwm3, tsense_pwm4,
|
||||
uim0_clk, uim0_data, uim0_present, uim0_reset, uim1_clk,
|
||||
uim1_data, uim1_present, uim1_reset, usb0_hs, usb_phy,
|
||||
vfr_0, vfr_1, vsense_trigger_mirnat, wcn_sw_ctrl ]
|
||||
required:
|
||||
- pins
|
||||
|
||||
|
||||
@@ -36,11 +36,6 @@ patternProperties:
|
||||
$ref: "#/$defs/qcom-ipq4019-tlmm-state"
|
||||
additionalProperties: false
|
||||
|
||||
"-hog(-[0-9]+)?$":
|
||||
type: object
|
||||
required:
|
||||
- gpio-hog
|
||||
|
||||
$defs:
|
||||
qcom-ipq4019-tlmm-state:
|
||||
type: object
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/qcom,ipq9650-tlmm.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm IPQ9650 TLMM pin controller
|
||||
|
||||
maintainers:
|
||||
- Bjorn Andersson <andersson@kernel.org>
|
||||
- Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
|
||||
|
||||
description:
|
||||
Top Level Mode Multiplexer pin controller in Qualcomm IPQ9650 SoC.
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,ipq9650-tlmm
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
gpio-reserved-ranges:
|
||||
minItems: 1
|
||||
maxItems: 27
|
||||
|
||||
gpio-line-names:
|
||||
maxItems: 54
|
||||
|
||||
patternProperties:
|
||||
"-state$":
|
||||
oneOf:
|
||||
- $ref: "#/$defs/qcom-ipq9650-tlmm-state"
|
||||
- patternProperties:
|
||||
"-pins$":
|
||||
$ref: "#/$defs/qcom-ipq9650-tlmm-state"
|
||||
additionalProperties: false
|
||||
|
||||
$defs:
|
||||
qcom-ipq9650-tlmm-state:
|
||||
type: object
|
||||
description:
|
||||
Pinctrl node's client devices use subnodes for desired pin configuration.
|
||||
Client device subnodes use below standard properties.
|
||||
$ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
pins:
|
||||
description:
|
||||
List of gpio pins affected by the properties specified in this
|
||||
subnode.
|
||||
items:
|
||||
pattern: "^gpio([0-9]|[1-4][0-9]|5[0-3])$"
|
||||
minItems: 1
|
||||
maxItems: 36
|
||||
|
||||
function:
|
||||
description:
|
||||
Specify the alternative function to be configured for the specified
|
||||
pins.
|
||||
|
||||
enum: [ atest_char_start, atest_char_status0, atest_char_status1,
|
||||
atest_char_status2, atest_char_status3, atest_tic_en,
|
||||
audio_pri_mclk_in0, audio_pri_mclk_out0, audio_pri_mclk_in1,
|
||||
audio_pri_mclk_out1, audio_pri, audio_sec, audio_sec_mclk_in0,
|
||||
audio_sec_mclk_out0, audio_sec_mclk_in1, audio_sec_mclk_out1,
|
||||
core_voltage_0, core_voltage_1, core_voltage_2, core_voltage_3,
|
||||
core_voltage_4, cri_rng0, cri_rng1, cri_rng2, dbg_out_clk,
|
||||
gcc_plltest_bypassnl, gcc_plltest_resetn, gcc_tlmm, gpio,
|
||||
mdc_mst, mdc_slv0, mdc_slv1, mdio_mst, mdio_slv, mdio_slv0,
|
||||
mdio_slv1, pcie0_clk_req_n, pcie0_wake, pcie1_clk_req_n,
|
||||
pcie1_wake, pcie2_clk_req_n, pcie2_wake, pcie3_clk_req_n,
|
||||
pcie3_wake, pcie4_clk_req_n, pcie4_wake, pll_bist_sync,
|
||||
pll_test, pwm, qdss_cti_trig_in_a0, qdss_cti_trig_in_a1,
|
||||
qdss_cti_trig_in_b0, qdss_cti_trig_in_b1, qdss_cti_trig_out_a0,
|
||||
qdss_cti_trig_out_a1, qdss_cti_trig_out_b0, qdss_cti_trig_out_b1,
|
||||
qdss_traceclk_a, qdss_tracectl_a, qdss_tracedata_a, qspi_data,
|
||||
qspi_clk, qspi_cs_n, qup_se0, qup_se1, qup_se2, qup_se3,
|
||||
qup_se4, qup_se5, qup_se6, qup_se7, resout, rx_los0, rx_los1,
|
||||
rx_los2, sdc_clk, sdc_cmd, sdc_data, tsens_max, tsn ]
|
||||
|
||||
required:
|
||||
- pins
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
tlmm: pinctrl@1000000 {
|
||||
compatible = "qcom,ipq9650-tlmm";
|
||||
reg = <0x01000000 0x300000>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpio-ranges = <&tlmm 0 0 54>;
|
||||
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
qup-uart1-default-state {
|
||||
pins = "gpio43", "gpio44";
|
||||
function = "qup_se6";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,141 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/qcom,nord-tlmm.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Technologies, Inc. SA8797P TLMM block
|
||||
|
||||
maintainers:
|
||||
- Bartosz Golaszewski <brgl@kernel.org>
|
||||
|
||||
description:
|
||||
Top Level Mode Multiplexer pin controller in Qualcomm SA8797P SoC.
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,nord-tlmm
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
gpio-reserved-ranges:
|
||||
minItems: 1
|
||||
maxItems: 90
|
||||
|
||||
gpio-line-names:
|
||||
maxItems: 181
|
||||
|
||||
patternProperties:
|
||||
"-state$":
|
||||
oneOf:
|
||||
- $ref: "#/$defs/qcom-nord-tlmm-state"
|
||||
- patternProperties:
|
||||
"-pins$":
|
||||
$ref: "#/$defs/qcom-nord-tlmm-state"
|
||||
additionalProperties: false
|
||||
|
||||
$defs:
|
||||
qcom-nord-tlmm-state:
|
||||
type: object
|
||||
description:
|
||||
Pinctrl node's client devices use subnodes for desired pin configuration.
|
||||
Client device subnodes use below standard properties.
|
||||
$ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
pins:
|
||||
description:
|
||||
List of gpio pins affected by the properties specified in this
|
||||
subnode.
|
||||
items:
|
||||
oneOf:
|
||||
- pattern: "^gpio([0-9]|[1-9][0-9]|1[0-7][0-9]|180)$"
|
||||
- enum: [ ufs_reset ]
|
||||
minItems: 1
|
||||
maxItems: 16
|
||||
|
||||
function:
|
||||
description:
|
||||
Specify the alternative function to be configured for the specified
|
||||
pins.
|
||||
|
||||
enum: [ aoss_cti, atest_char, atest_usb20, atest_usb21,
|
||||
aud_intfc0_clk, aud_intfc0_data, aud_intfc0_ws,
|
||||
aud_intfc10_clk, aud_intfc10_data, aud_intfc10_ws,
|
||||
aud_intfc1_clk, aud_intfc1_data, aud_intfc1_ws,
|
||||
aud_intfc2_clk, aud_intfc2_data, aud_intfc2_ws,
|
||||
aud_intfc3_clk, aud_intfc3_data, aud_intfc3_ws,
|
||||
aud_intfc4_clk, aud_intfc4_data, aud_intfc4_ws,
|
||||
aud_intfc5_clk, aud_intfc5_data, aud_intfc5_ws,
|
||||
aud_intfc6_clk, aud_intfc6_data, aud_intfc6_ws,
|
||||
aud_intfc7_clk, aud_intfc7_data, aud_intfc7_ws,
|
||||
aud_intfc8_clk, aud_intfc8_data, aud_intfc8_ws,
|
||||
aud_intfc9_clk, aud_intfc9_data, aud_intfc9_ws,
|
||||
aud_mclk0_mira, aud_mclk0_mirb, aud_mclk1_mira, aud_mclk1_mirb,
|
||||
aud_mclk2_mira, aud_mclk2_mirb, aud_refclk0, aud_refclk1,
|
||||
bist_done, ccu_async_in, ccu_i2c_scl, ccu_i2c_sda, ccu_timer,
|
||||
clink_debug, dbg_out, dbg_out_clk,
|
||||
ddr_bist_complete, ddr_bist_fail, ddr_bist_start, ddr_bist_stop,
|
||||
ddr_pxi, dp_rx0, dp_rx00, dp_rx01, dp_rx0_mute, dp_rx1, dp_rx10,
|
||||
dp_rx11, dp_rx1_mute,
|
||||
edp0_hot, edp0_lcd, edp1_hot, edp1_lcd, edp2_hot, edp2_lcd,
|
||||
edp3_hot, edp3_lcd,
|
||||
emac0_mcg, emac0_mdc, emac0_mdio, emac0_ptp, emac1_mcg,
|
||||
emac1_mdc, emac1_mdio, emac1_ptp,
|
||||
gcc_gp1_clk, gcc_gp2_clk, gcc_gp3_clk, gcc_gp4_clk, gcc_gp5_clk,
|
||||
gcc_gp6_clk, gcc_gp7_clk, gcc_gp8_clk, jitter_bist, lbist_pass,
|
||||
mbist_pass, mdp0_vsync_out, mdp1_vsync_out, mdp_vsync_e,
|
||||
mdp_vsync_p, mdp_vsync_s,
|
||||
pcie0_clk_req_n, pcie1_clk_req_n, pcie2_clk_req_n,
|
||||
pcie3_clk_req_n, phase_flag, pll_bist_sync, pll_clk_aux,
|
||||
prng_rosc0, prng_rosc1, pwrbrk_i_n, qdss, qdss_cti, qspi,
|
||||
qup0_se0, qup0_se1, qup0_se2, qup0_se3, qup0_se4, qup0_se5,
|
||||
qup1_se0, qup1_se1, qup1_se3, qup1_se2, qup1_se4, qup1_se5,
|
||||
qup1_se6, qup2_se0, qup2_se1, qup2_se2, qup2_se3, qup2_se4,
|
||||
qup2_se5, qup2_se6,
|
||||
sailss_ospi, sdc4_clk, sdc4_cmd, sdc4_data, smb_alert,
|
||||
smb_alert_n, smb_clk, smb_dat, tb_trig_sdc4, tmess_prng0,
|
||||
tmess_prng1, tsc_timer, tsense_pwm, usb0_hs,
|
||||
usb0_phy_ps, usb1_hs, usb1_phy_ps, usb2_hs, usxgmii0_phy,
|
||||
usxgmii1_phy, vsense_trigger_mirnat, wcn_sw, wcn_sw_ctrl]
|
||||
|
||||
required:
|
||||
- pins
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
tlmm: pinctrl@f100000 {
|
||||
compatible = "qcom,nord-tlmm";
|
||||
reg = <0x0f100000 0xc0000>;
|
||||
interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
gpio-ranges = <&tlmm 0 0 181>;
|
||||
wakeup-parent = <&pdc>;
|
||||
|
||||
qup_uart15_default: qup-uart15-default-state {
|
||||
pins = "gpio147", "gpio148";
|
||||
function = "qup2_se2";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
...
|
||||
@@ -30,6 +30,7 @@ properties:
|
||||
- qcom,pm7550-gpio
|
||||
- qcom,pm7550ba-gpio
|
||||
- qcom,pm8005-gpio
|
||||
- qcom,pm8010-gpio
|
||||
- qcom,pm8018-gpio
|
||||
- qcom,pm8019-gpio
|
||||
- qcom,pm8038-gpio
|
||||
@@ -134,6 +135,7 @@ allOf:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,pm8010-gpio
|
||||
- qcom,pmi8950-gpio
|
||||
- qcom,pmr735d-gpio
|
||||
then:
|
||||
@@ -465,6 +467,7 @@ $defs:
|
||||
- gpio1-gpio10 for pm7325
|
||||
- gpio1-gpio8 for pm7550ba
|
||||
- gpio1-gpio4 for pm8005
|
||||
- gpio1-gpio2 for pm8010
|
||||
- gpio1-gpio6 for pm8018
|
||||
- gpio1-gpio12 for pm8038
|
||||
- gpio1-gpio40 for pm8058
|
||||
|
||||
@@ -42,11 +42,6 @@ patternProperties:
|
||||
$ref: "#/$defs/qcom-sdm845-tlmm-state"
|
||||
additionalProperties: false
|
||||
|
||||
"-hog(-[0-9]+)?$":
|
||||
type: object
|
||||
required:
|
||||
- gpio-hog
|
||||
|
||||
$defs:
|
||||
qcom-sdm845-tlmm-state:
|
||||
type: object
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/qcom,shikra-tlmm.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Technologies, Inc. Shikra TLMM block
|
||||
|
||||
maintainers:
|
||||
- Komal Bajaj <komal.bajaj@oss.qualcomm.com>
|
||||
|
||||
description: |
|
||||
Top Level Mode Multiplexer pin controller in Qualcomm Shikra SoC.
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,shikra-tlmm
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
gpio-reserved-ranges:
|
||||
minItems: 1
|
||||
maxItems: 83
|
||||
|
||||
gpio-line-names:
|
||||
maxItems: 166
|
||||
|
||||
patternProperties:
|
||||
"-state$":
|
||||
oneOf:
|
||||
- $ref: "#/$defs/qcom-shikra-tlmm-state"
|
||||
- patternProperties:
|
||||
"-pins$":
|
||||
$ref: "#/$defs/qcom-shikra-tlmm-state"
|
||||
additionalProperties: false
|
||||
|
||||
$defs:
|
||||
qcom-shikra-tlmm-state:
|
||||
type: object
|
||||
description:
|
||||
Pinctrl node's client devices use subnodes for desired pin configuration.
|
||||
Client device subnodes use below standard properties.
|
||||
$ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
pins:
|
||||
description:
|
||||
List of gpio pins affected by the properties specified in this
|
||||
subnode.
|
||||
items:
|
||||
oneOf:
|
||||
- pattern: "^gpio([0-9]|[1-9][0-9]|1[0-5][0-9]|16[0-5])$"
|
||||
- enum: [ sdc1_rclk, sdc1_clk, sdc1_cmd, sdc1_data,
|
||||
sdc2_clk, sdc2_cmd, sdc2_data ]
|
||||
minItems: 1
|
||||
maxItems: 36
|
||||
|
||||
function:
|
||||
description:
|
||||
Specify the alternative function to be configured for the specified
|
||||
pins.
|
||||
|
||||
enum: [ gpio, agera_pll, atest_bbrx, atest_char, atest_gpsadc,
|
||||
atest_tsens, atest_usb, cam_mclk, cci_async, cci_i2c0,
|
||||
cci_i2c1, cci_timer, char_exec, cri_trng, dac_calib,
|
||||
dbg_out_clk, ddr_bist, ddr_pxi, dmic, emac_dll, emac_mcg,
|
||||
emac_phy, emac0_ptp_aux, emac0_ptp_pps, emac1_ptp_aux,
|
||||
emac1_ptp_pps, ext_mclk, gcc_gp, gsm0_tx, i2s0, i2s1,
|
||||
i2s2, i2s3, jitter_bist, m_voc, mdp_vsync_e, mdp_vsync_out0,
|
||||
mdp_vsync_out1, mdp_vsync_p, mdp_vsync_s, mpm_pwr, mss_lte,
|
||||
nav_gpio, pa_indicator_or, pbs_in, pbs_out, pcie0_clk_req_n,
|
||||
phase_flag, pll, prng_rosc, pwm, qdss_cti, qup0_se0,
|
||||
qup0_se1, qup0_se1_01, qup0_se1_23, qup0_se2, qup0_se3_01,
|
||||
qup0_se3_23, qup0_se4_01, qup0_se4_23, qup0_se5, qup0_se6,
|
||||
qup0_se7_01, qup0_se7_23, qup0_se8, qup0_se9, qup0_se9_01,
|
||||
qup0_se9_23, rgmii, sd_write_protect, sdc_cdc, sdc_tb_trig,
|
||||
ssbi_wtr, swr0_rx, swr0_tx, tgu_ch_trigout, tsc_async,
|
||||
tsense_pwm, uim1, uim2, unused_adsp, unused_gsm1, usb0_phy_ps,
|
||||
vfr, vsense_trigger_mirnat, wlan ]
|
||||
|
||||
required:
|
||||
- pins
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
tlmm: pinctrl@500000 {
|
||||
compatible = "qcom,shikra-tlmm";
|
||||
reg = <0x00500000 0x800000>;
|
||||
|
||||
interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
gpio-ranges = <&tlmm 0 0 166>;
|
||||
|
||||
qup-uart0-default-state {
|
||||
pins = "gpio0", "gpio1";
|
||||
function = "qup0_se1";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
...
|
||||
@@ -0,0 +1,124 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/qcom,sm6350-lpass-lpi-pinctrl.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm SM6350 SoC LPASS LPI TLMM
|
||||
|
||||
maintainers:
|
||||
- Luca Weiss <luca.weiss@fairphone.com>
|
||||
|
||||
description:
|
||||
Top Level Mode Multiplexer pin controller in the Low Power Audio SubSystem
|
||||
(LPASS) Low Power Island (LPI) of Qualcomm SM6350 SoC.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,sm6350-lpass-lpi-pinctrl
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: LPASS LPI TLMM Control and Status registers
|
||||
- description: LPASS LPI MCC registers
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: LPASS Core voting clock
|
||||
- description: LPASS Audio voting clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: core
|
||||
- const: audio
|
||||
|
||||
patternProperties:
|
||||
"-state$":
|
||||
oneOf:
|
||||
- $ref: "#/$defs/qcom-sm6350-lpass-state"
|
||||
- patternProperties:
|
||||
"-pins$":
|
||||
$ref: "#/$defs/qcom-sm6350-lpass-state"
|
||||
additionalProperties: false
|
||||
|
||||
$defs:
|
||||
qcom-sm6350-lpass-state:
|
||||
type: object
|
||||
description:
|
||||
Pinctrl node's client devices use subnodes for desired pin configuration.
|
||||
Client device subnodes use below standard properties.
|
||||
$ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
pins:
|
||||
description:
|
||||
List of gpio pins affected by the properties specified in this
|
||||
subnode.
|
||||
items:
|
||||
pattern: "^gpio([0-9]|1[0-4])$"
|
||||
|
||||
function:
|
||||
enum: [ dmic1_clk, dmic1_data, dmic2_clk, dmic2_data, dmic3_clk,
|
||||
dmic3_data, gpio, i2s1_clk, i2s1_data, i2s1_ws, i2s2_clk,
|
||||
i2s2_data, i2s2_ws, qua_mi2s_data, qua_mi2s_sclk, qua_mi2s_ws,
|
||||
swr_rx_clk, swr_rx_data, swr_tx_clk, swr_tx_data, wsa_swr_clk,
|
||||
wsa_swr_data ]
|
||||
description:
|
||||
Specify the alternative function to be configured for the specified
|
||||
pins.
|
||||
|
||||
allOf:
|
||||
- $ref: qcom,lpass-lpi-common.yaml#
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
|
||||
|
||||
lpass_tlmm: pinctrl@33c0000 {
|
||||
compatible = "qcom,sm6350-lpass-lpi-pinctrl";
|
||||
reg = <0x033c0000 0x20000>,
|
||||
<0x03550000 0x10000>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpio-ranges = <&lpass_tlmm 0 0 15>;
|
||||
|
||||
clocks = <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
|
||||
<&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
|
||||
clock-names = "core",
|
||||
"audio";
|
||||
|
||||
i2s1_active: i2s1-active-state {
|
||||
clk-pins {
|
||||
pins = "gpio6";
|
||||
function = "i2s1_clk";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
ws-pins {
|
||||
pins = "gpio7";
|
||||
function = "i2s1_ws";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
data-pins {
|
||||
pins = "gpio8", "gpio9";
|
||||
function = "i2s1_data";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -51,6 +51,12 @@ properties:
|
||||
should not be accessed by the OS. Please see the ../gpio/gpio.txt for more
|
||||
information.
|
||||
|
||||
patternProperties:
|
||||
"-hog(-[0-9]+)?$":
|
||||
type: object
|
||||
required:
|
||||
- gpio-hog
|
||||
|
||||
allOf:
|
||||
- $ref: pinctrl.yaml#
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ patternProperties:
|
||||
|
||||
input-schmitt-disable: true
|
||||
|
||||
input-voltage-microvolt:
|
||||
input-threshold-voltage-microvolt:
|
||||
description: |
|
||||
Select the input receiver voltage domain for the pin.
|
||||
Valid arguments are:
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pinctrl/ultrarisc,dp1000-pinctrl.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: UltraRISC DP1000 Pin Controller
|
||||
|
||||
maintainers:
|
||||
- Jia Wang <wangjia@ultrarisc.com>
|
||||
|
||||
description: |
|
||||
UltraRISC RISC-V SoC DP1000 pin controller.
|
||||
The controller manages ports A, B, C, D and LPC. Ports A-D default to
|
||||
GPIO and provide additional SPI, UART, I2C, and PWM mux functions.
|
||||
LPC pins default to the LPC interface and can be muxed to eSPI.
|
||||
All pins also support pin configuration, including drive strength,
|
||||
pull-up, and pull-down settings.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: ultrarisc,dp1000-pinctrl
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: pin controller registers
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
patternProperties:
|
||||
'.*-pins$':
|
||||
type: object
|
||||
unevaluatedProperties: false
|
||||
allOf:
|
||||
- $ref: /schemas/pinctrl/pincfg-node.yaml#
|
||||
- $ref: /schemas/pinctrl/pinmux-node.yaml#
|
||||
- if:
|
||||
properties:
|
||||
pins:
|
||||
items:
|
||||
minimum: 40
|
||||
maximum: 52
|
||||
then:
|
||||
properties:
|
||||
function:
|
||||
enum:
|
||||
- lpc
|
||||
- espi
|
||||
else:
|
||||
properties:
|
||||
pins:
|
||||
items:
|
||||
maximum: 39
|
||||
function:
|
||||
enum:
|
||||
- gpio
|
||||
- i2c
|
||||
- pwm
|
||||
- spi
|
||||
- uart
|
||||
|
||||
properties:
|
||||
pins:
|
||||
description: |
|
||||
List of pins affected by this state node, using numeric pin IDs.
|
||||
Pins 0-39 correspond to ports A-D, and pins 40-52 correspond
|
||||
to LPC0-LPC12.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
minItems: 1
|
||||
uniqueItems: true
|
||||
items:
|
||||
minimum: 0
|
||||
maximum: 52
|
||||
|
||||
function:
|
||||
description: |
|
||||
Mux function to select for the listed pins. Supported functions
|
||||
depend on the selected pins and match the DP1000 hardware mux
|
||||
table.
|
||||
enum:
|
||||
- gpio
|
||||
- i2c
|
||||
- pwm
|
||||
- spi
|
||||
- uart
|
||||
- lpc
|
||||
- espi
|
||||
|
||||
bias-disable: true
|
||||
bias-high-impedance: true
|
||||
bias-pull-up: true
|
||||
bias-pull-down: true
|
||||
|
||||
drive-strength:
|
||||
description: Output drive strength in mA.
|
||||
enum: [20, 27, 33, 40]
|
||||
|
||||
required:
|
||||
- pins
|
||||
- function
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
soc {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
pinctrl@11081000 {
|
||||
compatible = "ultrarisc,dp1000-pinctrl";
|
||||
reg = <0x0 0x11081000 0x0 0x1000>;
|
||||
|
||||
i2c0-pins {
|
||||
pins = <12 13>;
|
||||
function = "i2c";
|
||||
bias-pull-up;
|
||||
drive-strength = <33>;
|
||||
};
|
||||
|
||||
uart0-pins {
|
||||
pins = <8 9>;
|
||||
function = "uart";
|
||||
bias-pull-up;
|
||||
drive-strength = <33>;
|
||||
};
|
||||
};
|
||||
};
|
||||
+9
-1
@@ -21154,7 +21154,7 @@ M: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||
L: linux-mediatek@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/pinctrl/airoha,en7581-pinctrl.yaml
|
||||
F: drivers/pinctrl/mediatek/pinctrl-airoha.c
|
||||
F: drivers/pinctrl/airoha/pinctrl-airoha.c
|
||||
|
||||
PIN CONTROLLER - AMD
|
||||
M: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
|
||||
@@ -21246,6 +21246,7 @@ F: drivers/pinctrl/renesas/
|
||||
PIN CONTROLLER - SAMSUNG
|
||||
M: Krzysztof Kozlowski <krzk@kernel.org>
|
||||
M: Sylwester Nawrocki <s.nawrocki@samsung.com>
|
||||
M: Peter Griffin <peter.griffin@linaro.org>
|
||||
R: Alim Akhtar <alim.akhtar@samsung.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
L: linux-samsung-soc@vger.kernel.org
|
||||
@@ -27524,6 +27525,13 @@ S: Maintained
|
||||
F: drivers/usb/common/ulpi.c
|
||||
F: include/linux/ulpi/
|
||||
|
||||
ULTRARISC DP1000 PINCTRL DRIVER
|
||||
M: Jia Wang <wangjia@ultrarisc.com>
|
||||
L: linux-gpio@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/pinctrl/ultrarisc,dp1000-pinctrl.yaml
|
||||
F: drivers/pinctrl/ultrarisc/*
|
||||
|
||||
ULTRATRONIK BOARD SUPPORT
|
||||
M: Goran Rađenović <goran.radni@gmail.com>
|
||||
M: Börge Strümpfel <boerge.struempfel@gmail.com>
|
||||
|
||||
+27
-16
@@ -533,14 +533,16 @@ static struct mux_chip *of_find_mux_chip_by_node(struct device_node *np)
|
||||
* @state: Pointer to where the requested state is returned, or NULL when
|
||||
* the required multiplexer states are handled by other means.
|
||||
* @optional: Whether to return NULL and silence errors when mux doesn't exist.
|
||||
* @node: the device nodes, use dev->of_node if it is NULL.
|
||||
*
|
||||
* Return: Pointer to the mux-control on success, an ERR_PTR with a negative
|
||||
* errno on error, or NULL if optional is true and mux doesn't exist.
|
||||
*/
|
||||
static struct mux_control *mux_get(struct device *dev, const char *mux_name,
|
||||
unsigned int *state, bool optional)
|
||||
unsigned int *state, bool optional,
|
||||
struct device_node *node)
|
||||
{
|
||||
struct device_node *np = dev->of_node;
|
||||
struct device_node *np = node ? node : dev->of_node;
|
||||
struct of_phandle_args args;
|
||||
struct mux_chip *mux_chip;
|
||||
unsigned int controller;
|
||||
@@ -635,7 +637,7 @@ static struct mux_control *mux_get(struct device *dev, const char *mux_name,
|
||||
*/
|
||||
struct mux_control *mux_control_get(struct device *dev, const char *mux_name)
|
||||
{
|
||||
struct mux_control *mux = mux_get(dev, mux_name, NULL, false);
|
||||
struct mux_control *mux = mux_get(dev, mux_name, NULL, false, NULL);
|
||||
|
||||
if (!mux)
|
||||
return ERR_PTR(-ENOENT);
|
||||
@@ -654,7 +656,7 @@ EXPORT_SYMBOL_GPL(mux_control_get);
|
||||
*/
|
||||
struct mux_control *mux_control_get_optional(struct device *dev, const char *mux_name)
|
||||
{
|
||||
return mux_get(dev, mux_name, NULL, true);
|
||||
return mux_get(dev, mux_name, NULL, true, NULL);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mux_control_get_optional);
|
||||
|
||||
@@ -712,11 +714,14 @@ EXPORT_SYMBOL_GPL(devm_mux_control_get);
|
||||
* @dev: The device that needs a mux-state.
|
||||
* @mux_name: The name identifying the mux-state.
|
||||
* @optional: Whether to return NULL and silence errors when mux doesn't exist.
|
||||
* @np: the device nodes, use dev->of_node if it is NULL.
|
||||
*
|
||||
* Return: Pointer to the mux-state on success, an ERR_PTR with a negative
|
||||
* errno on error, or NULL if optional is true and mux doesn't exist.
|
||||
*/
|
||||
static struct mux_state *mux_state_get(struct device *dev, const char *mux_name, bool optional)
|
||||
static struct mux_state *
|
||||
mux_state_get(struct device *dev, const char *mux_name, bool optional,
|
||||
struct device_node *np)
|
||||
{
|
||||
struct mux_state *mstate;
|
||||
|
||||
@@ -724,7 +729,7 @@ static struct mux_state *mux_state_get(struct device *dev, const char *mux_name,
|
||||
if (!mstate)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
mstate->mux = mux_get(dev, mux_name, &mstate->state, optional);
|
||||
mstate->mux = mux_get(dev, mux_name, &mstate->state, optional, np);
|
||||
if (IS_ERR(mstate->mux)) {
|
||||
int err = PTR_ERR(mstate->mux);
|
||||
|
||||
@@ -766,6 +771,7 @@ static void devm_mux_state_release(struct device *dev, void *res)
|
||||
* @dev: The device that needs a mux-state.
|
||||
* @mux_name: The name identifying the mux-state.
|
||||
* @optional: Whether to return NULL and silence errors when mux doesn't exist.
|
||||
* @np: The device nodes, use dev->of_node if it is NULL.
|
||||
* @init: Optional function pointer for mux-state object initialisation.
|
||||
* @exit: Optional function pointer for mux-state object cleanup on release.
|
||||
*
|
||||
@@ -773,7 +779,7 @@ static void devm_mux_state_release(struct device *dev, void *res)
|
||||
* errno on error, or NULL if optional is true and mux doesn't exist.
|
||||
*/
|
||||
static struct mux_state *__devm_mux_state_get(struct device *dev, const char *mux_name,
|
||||
bool optional,
|
||||
bool optional, struct device_node *np,
|
||||
int (*init)(struct mux_state *mstate),
|
||||
int (*exit)(struct mux_state *mstate))
|
||||
{
|
||||
@@ -781,7 +787,7 @@ static struct mux_state *__devm_mux_state_get(struct device *dev, const char *mu
|
||||
struct mux_state *mstate;
|
||||
int ret;
|
||||
|
||||
mstate = mux_state_get(dev, mux_name, optional);
|
||||
mstate = mux_state_get(dev, mux_name, optional, np);
|
||||
if (IS_ERR(mstate))
|
||||
return ERR_CAST(mstate);
|
||||
else if (optional && !mstate)
|
||||
@@ -815,20 +821,23 @@ err_devres_alloc:
|
||||
}
|
||||
|
||||
/**
|
||||
* devm_mux_state_get() - Get the mux-state for a device, with resource
|
||||
* management.
|
||||
* devm_mux_state_get_from_np() - Get the mux-state for a device, with resource
|
||||
* management.
|
||||
* @dev: The device that needs a mux-control.
|
||||
* @mux_name: The name identifying the mux-control.
|
||||
* @np: the device nodes, use dev->of_node if it is NULL.
|
||||
*
|
||||
* Return: Pointer to the mux-state, or an ERR_PTR with a negative errno.
|
||||
*
|
||||
* The mux-state will automatically be freed on release.
|
||||
*/
|
||||
struct mux_state *devm_mux_state_get(struct device *dev, const char *mux_name)
|
||||
struct mux_state *
|
||||
devm_mux_state_get_from_np(struct device *dev, const char *mux_name,
|
||||
struct device_node *np)
|
||||
{
|
||||
return __devm_mux_state_get(dev, mux_name, false, NULL, NULL);
|
||||
return __devm_mux_state_get(dev, mux_name, false, np, NULL, NULL);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_mux_state_get);
|
||||
EXPORT_SYMBOL_GPL(devm_mux_state_get_from_np);
|
||||
|
||||
/**
|
||||
* devm_mux_state_get_optional() - Get the optional mux-state for a device,
|
||||
@@ -843,7 +852,7 @@ EXPORT_SYMBOL_GPL(devm_mux_state_get);
|
||||
*/
|
||||
struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name)
|
||||
{
|
||||
return __devm_mux_state_get(dev, mux_name, true, NULL, NULL);
|
||||
return __devm_mux_state_get(dev, mux_name, true, NULL, NULL, NULL);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_mux_state_get_optional);
|
||||
|
||||
@@ -861,7 +870,8 @@ EXPORT_SYMBOL_GPL(devm_mux_state_get_optional);
|
||||
*/
|
||||
struct mux_state *devm_mux_state_get_selected(struct device *dev, const char *mux_name)
|
||||
{
|
||||
return __devm_mux_state_get(dev, mux_name, false, mux_state_select, mux_state_deselect);
|
||||
return __devm_mux_state_get(dev, mux_name, false, NULL,
|
||||
mux_state_select, mux_state_deselect);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_mux_state_get_selected);
|
||||
|
||||
@@ -881,7 +891,8 @@ EXPORT_SYMBOL_GPL(devm_mux_state_get_selected);
|
||||
struct mux_state *devm_mux_state_get_optional_selected(struct device *dev,
|
||||
const char *mux_name)
|
||||
{
|
||||
return __devm_mux_state_get(dev, mux_name, true, mux_state_select, mux_state_deselect);
|
||||
return __devm_mux_state_get(dev, mux_name, true, NULL,
|
||||
mux_state_select, mux_state_deselect);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_mux_state_get_optional_selected);
|
||||
|
||||
|
||||
@@ -272,6 +272,16 @@ config PINCTRL_GEMINI
|
||||
select GENERIC_PINCONF
|
||||
select MFD_SYSCON
|
||||
|
||||
config PINCTRL_GENERIC_MUX
|
||||
tristate "Generic Pinctrl driver by using multiplexer"
|
||||
depends on MULTIPLEXER
|
||||
depends on OF
|
||||
select PINMUX
|
||||
select GENERIC_PINCTRL
|
||||
help
|
||||
Generic pinctrl driver by MULTIPLEXER framework to control on
|
||||
board pin selection.
|
||||
|
||||
config PINCTRL_INGENIC
|
||||
bool "Pinctrl driver for the Ingenic JZ47xx SoCs"
|
||||
default MACH_INGENIC
|
||||
@@ -548,6 +558,7 @@ config PINCTRL_ST
|
||||
|
||||
config PINCTRL_STMFX
|
||||
tristate "STMicroelectronics STMFX GPIO expander pinctrl driver"
|
||||
depends on OF
|
||||
depends on I2C
|
||||
depends on HAS_IOMEM
|
||||
select GENERIC_PINCONF
|
||||
@@ -679,6 +690,7 @@ config PINCTRL_RP1
|
||||
multi function device.
|
||||
|
||||
source "drivers/pinctrl/actions/Kconfig"
|
||||
source "drivers/pinctrl/airoha/Kconfig"
|
||||
source "drivers/pinctrl/aspeed/Kconfig"
|
||||
source "drivers/pinctrl/bcm/Kconfig"
|
||||
source "drivers/pinctrl/berlin/Kconfig"
|
||||
@@ -708,6 +720,7 @@ source "drivers/pinctrl/sunplus/Kconfig"
|
||||
source "drivers/pinctrl/sunxi/Kconfig"
|
||||
source "drivers/pinctrl/tegra/Kconfig"
|
||||
source "drivers/pinctrl/ti/Kconfig"
|
||||
source "drivers/pinctrl/ultrarisc/Kconfig"
|
||||
source "drivers/pinctrl/uniphier/Kconfig"
|
||||
source "drivers/pinctrl/visconti/Kconfig"
|
||||
source "drivers/pinctrl/vt8500/Kconfig"
|
||||
|
||||
@@ -29,6 +29,7 @@ obj-$(CONFIG_PINCTRL_EQUILIBRIUM) += pinctrl-equilibrium.o
|
||||
obj-$(CONFIG_PINCTRL_EP93XX) += pinctrl-ep93xx.o
|
||||
obj-$(CONFIG_PINCTRL_EYEQ5) += pinctrl-eyeq5.o
|
||||
obj-$(CONFIG_PINCTRL_GEMINI) += pinctrl-gemini.o
|
||||
obj-$(CONFIG_PINCTRL_GENERIC_MUX) += pinctrl-generic-mux.o
|
||||
obj-$(CONFIG_PINCTRL_INGENIC) += pinctrl-ingenic.o
|
||||
obj-$(CONFIG_PINCTRL_K210) += pinctrl-k210.o
|
||||
obj-$(CONFIG_PINCTRL_K230) += pinctrl-k230.o
|
||||
@@ -66,7 +67,8 @@ obj-$(CONFIG_PINCTRL_ZYNQMP) += pinctrl-zynqmp.o
|
||||
obj-$(CONFIG_PINCTRL_ZYNQ) += pinctrl-zynq.o
|
||||
|
||||
obj-y += actions/
|
||||
obj-$(CONFIG_ARCH_ASPEED) += aspeed/
|
||||
obj-y += airoha/
|
||||
obj-$(CONFIG_PINCTRL_ASPEED) += aspeed/
|
||||
obj-y += bcm/
|
||||
obj-$(CONFIG_PINCTRL_BERLIN) += berlin/
|
||||
obj-y += cirrus/
|
||||
@@ -82,7 +84,7 @@ obj-y += nuvoton/
|
||||
obj-y += nxp/
|
||||
obj-$(CONFIG_PINCTRL_PXA) += pxa/
|
||||
obj-y += qcom/
|
||||
obj-$(CONFIG_ARCH_REALTEK) += realtek/
|
||||
obj-$(CONFIG_PINCTRL_RTD) += realtek/
|
||||
obj-$(CONFIG_PINCTRL_RENESAS) += renesas/
|
||||
obj-$(CONFIG_PINCTRL_SAMSUNG) += samsung/
|
||||
obj-y += sophgo/
|
||||
@@ -93,8 +95,9 @@ obj-y += starfive/
|
||||
obj-$(CONFIG_PINCTRL_STM32) += stm32/
|
||||
obj-y += sunplus/
|
||||
obj-$(CONFIG_PINCTRL_SUNXI) += sunxi/
|
||||
obj-$(CONFIG_ARCH_TEGRA) += tegra/
|
||||
obj-y += tegra/
|
||||
obj-y += ti/
|
||||
obj-$(CONFIG_PINCTRL_ULTRARISC) += ultrarisc/
|
||||
obj-$(CONFIG_PINCTRL_UNIPHIER) += uniphier/
|
||||
obj-$(CONFIG_PINCTRL_VISCONTI) += visconti/
|
||||
obj-$(CONFIG_ARCH_VT8500) += vt8500/
|
||||
obj-$(CONFIG_PINCTRL_WMT) += vt8500/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* OWL SoC's Pinctrl definitions
|
||||
*
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
menu "Airoha pinctrl drivers"
|
||||
depends on ARCH_AIROHA || COMPILE_TEST
|
||||
|
||||
config PINCTRL_AIROHA
|
||||
tristate "Airoha EN7581 pin control"
|
||||
depends on OF
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
select PINMUX
|
||||
select GENERIC_PINCONF
|
||||
select GENERIC_PINCTRL_GROUPS
|
||||
select GENERIC_PINMUX_FUNCTIONS
|
||||
select GPIOLIB
|
||||
select GPIOLIB_IRQCHIP
|
||||
select REGMAP_MMIO
|
||||
help
|
||||
Say yes here to support pin controller and gpio driver
|
||||
on Airoha EN7581 SoC.
|
||||
|
||||
endmenu
|
||||
@@ -0,0 +1,3 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
obj-$(CONFIG_PINCTRL_AIROHA) += pinctrl-airoha.o
|
||||
+99
-25
@@ -539,6 +539,7 @@ static const int en7581_gpio28_pins[] = { 41 };
|
||||
static const int en7581_gpio29_pins[] = { 42 };
|
||||
static const int en7581_gpio30_pins[] = { 43 };
|
||||
static const int en7581_gpio31_pins[] = { 44 };
|
||||
static const int en7581_gpio32_pins[] = { 45 };
|
||||
static const int en7581_gpio33_pins[] = { 46 };
|
||||
static const int en7581_gpio34_pins[] = { 47 };
|
||||
static const int en7581_gpio35_pins[] = { 48 };
|
||||
@@ -623,6 +624,7 @@ static const struct pingroup en7581_pinctrl_groups[] = {
|
||||
PINCTRL_PIN_GROUP("gpio29", en7581_gpio29),
|
||||
PINCTRL_PIN_GROUP("gpio30", en7581_gpio30),
|
||||
PINCTRL_PIN_GROUP("gpio31", en7581_gpio31),
|
||||
PINCTRL_PIN_GROUP("gpio32", en7581_gpio32),
|
||||
PINCTRL_PIN_GROUP("gpio33", en7581_gpio33),
|
||||
PINCTRL_PIN_GROUP("gpio34", en7581_gpio34),
|
||||
PINCTRL_PIN_GROUP("gpio35", en7581_gpio35),
|
||||
@@ -746,7 +748,8 @@ static const int an7583_gpio17_pins[] = { 19 };
|
||||
static const int an7583_gpio18_pins[] = { 20 };
|
||||
static const int an7583_gpio19_pins[] = { 21 };
|
||||
static const int an7583_gpio20_pins[] = { 22 };
|
||||
static const int an7583_gpio21_pins[] = { 24 };
|
||||
static const int an7583_gpio21_pins[] = { 23 };
|
||||
static const int an7583_gpio22_pins[] = { 24 };
|
||||
static const int an7583_gpio23_pins[] = { 25 };
|
||||
static const int an7583_gpio24_pins[] = { 26 };
|
||||
static const int an7583_gpio25_pins[] = { 27 };
|
||||
@@ -756,6 +759,7 @@ static const int an7583_gpio28_pins[] = { 30 };
|
||||
static const int an7583_gpio29_pins[] = { 31 };
|
||||
static const int an7583_gpio30_pins[] = { 32 };
|
||||
static const int an7583_gpio31_pins[] = { 33 };
|
||||
static const int an7583_gpio32_pins[] = { 34 };
|
||||
static const int an7583_gpio33_pins[] = { 35 };
|
||||
static const int an7583_gpio34_pins[] = { 36 };
|
||||
static const int an7583_gpio35_pins[] = { 37 };
|
||||
@@ -825,6 +829,7 @@ static const struct pingroup an7583_pinctrl_groups[] = {
|
||||
PINCTRL_PIN_GROUP("gpio19", an7583_gpio19),
|
||||
PINCTRL_PIN_GROUP("gpio20", an7583_gpio20),
|
||||
PINCTRL_PIN_GROUP("gpio21", an7583_gpio21),
|
||||
PINCTRL_PIN_GROUP("gpio22", an7583_gpio22),
|
||||
PINCTRL_PIN_GROUP("gpio23", an7583_gpio23),
|
||||
PINCTRL_PIN_GROUP("gpio24", an7583_gpio24),
|
||||
PINCTRL_PIN_GROUP("gpio25", an7583_gpio25),
|
||||
@@ -834,6 +839,7 @@ static const struct pingroup an7583_pinctrl_groups[] = {
|
||||
PINCTRL_PIN_GROUP("gpio29", an7583_gpio29),
|
||||
PINCTRL_PIN_GROUP("gpio30", an7583_gpio30),
|
||||
PINCTRL_PIN_GROUP("gpio31", an7583_gpio31),
|
||||
PINCTRL_PIN_GROUP("gpio32", an7583_gpio32),
|
||||
PINCTRL_PIN_GROUP("gpio33", an7583_gpio33),
|
||||
PINCTRL_PIN_GROUP("gpio34", an7583_gpio34),
|
||||
PINCTRL_PIN_GROUP("gpio35", an7583_gpio35),
|
||||
@@ -871,10 +877,8 @@ static const char *const pcm_spi_groups[] = { "pcm_spi", "pcm_spi_int",
|
||||
"pcm_spi_cs2_p156",
|
||||
"pcm_spi_cs2_p128",
|
||||
"pcm_spi_cs3", "pcm_spi_cs4" };
|
||||
static const char *const an7583_pcm_spi_groups[] = { "pcm_spi", "pcm_spi_int",
|
||||
"pcm_spi_rst", "pcm_spi_cs1",
|
||||
"pcm_spi_cs2", "pcm_spi_cs3",
|
||||
"pcm_spi_cs4" };
|
||||
static const char *const an7583_pcm_spi_groups[] = { "pcm_spi",
|
||||
"pcm_spi_rst", "pcm_spi_cs1" };
|
||||
static const char *const i2s_groups[] = { "i2s" };
|
||||
static const char *const emmc_groups[] = { "emmc" };
|
||||
static const char *const pnand_groups[] = { "pnand" };
|
||||
@@ -902,7 +906,30 @@ static const char *const pwm_groups[] = { "gpio0", "gpio1",
|
||||
"gpio40", "gpio41",
|
||||
"gpio42", "gpio43",
|
||||
"gpio44", "gpio45",
|
||||
"gpio46", "gpio47" };
|
||||
"gpio46" };
|
||||
static const char *const an7583_pwm_groups[] = { "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",
|
||||
"gpio48" };
|
||||
static const char *const phy1_led0_groups[] = { "gpio33", "gpio34",
|
||||
"gpio35", "gpio42" };
|
||||
static const char *const phy2_led0_groups[] = { "gpio33", "gpio34",
|
||||
@@ -1500,7 +1527,54 @@ static const struct airoha_pinctrl_func_group pwm_func_group[] = {
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio44", GPIO44_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio45", GPIO45_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio46", GPIO46_FLASH_MODE_CFG),
|
||||
};
|
||||
|
||||
static const struct airoha_pinctrl_func_group an7583_pwm_func_group[] = {
|
||||
AIROHA_PINCTRL_PWM("gpio0", GPIO0_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio1", GPIO1_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio2", GPIO2_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio3", GPIO3_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio4", GPIO4_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio5", GPIO5_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio6", GPIO6_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio7", GPIO7_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio8", GPIO8_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio9", GPIO9_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio10", GPIO10_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio11", GPIO11_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio12", GPIO12_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio13", GPIO13_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio14", GPIO14_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM("gpio15", GPIO15_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio16", GPIO16_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio17", GPIO17_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio18", GPIO18_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio19", GPIO19_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio20", GPIO20_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio21", GPIO21_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio22", GPIO22_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio23", GPIO23_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio24", GPIO24_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio25", GPIO25_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio26", GPIO26_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio27", GPIO27_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio28", GPIO28_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio29", GPIO29_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio30", GPIO30_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio31", GPIO31_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio36", GPIO36_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio37", GPIO37_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio38", GPIO38_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio39", GPIO39_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio40", GPIO40_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio41", GPIO41_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio42", GPIO42_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio43", GPIO43_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio44", GPIO44_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio45", GPIO45_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio46", GPIO46_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio47", GPIO47_FLASH_MODE_CFG),
|
||||
AIROHA_PINCTRL_PWM_EXT("gpio48", GPIO48_FLASH_MODE_CFG),
|
||||
};
|
||||
|
||||
#define AIROHA_PINCTRL_PHY_LED0(gpio, mux_val, map_mask, map_val) \
|
||||
@@ -1618,13 +1692,13 @@ static const struct airoha_pinctrl_func_group phy3_led1_func_group[] = {
|
||||
|
||||
static const struct airoha_pinctrl_func_group phy4_led1_func_group[] = {
|
||||
AIROHA_PINCTRL_PHY_LED1("gpio43", GPIO_LAN0_LED1_MODE_MASK,
|
||||
LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(2)),
|
||||
LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(3)),
|
||||
AIROHA_PINCTRL_PHY_LED1("gpio44", GPIO_LAN1_LED1_MODE_MASK,
|
||||
LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(2)),
|
||||
LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(3)),
|
||||
AIROHA_PINCTRL_PHY_LED1("gpio45", GPIO_LAN2_LED1_MODE_MASK,
|
||||
LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(2)),
|
||||
LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(3)),
|
||||
AIROHA_PINCTRL_PHY_LED1("gpio46", GPIO_LAN3_LED1_MODE_MASK,
|
||||
LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(2)),
|
||||
LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(3)),
|
||||
};
|
||||
|
||||
static const struct airoha_pinctrl_func_group an7583_phy1_led0_func_group[] = {
|
||||
@@ -1678,7 +1752,7 @@ static const struct airoha_pinctrl_func_group an7583_phy1_led1_func_group[] = {
|
||||
LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(0)),
|
||||
AIROHA_PINCTRL_PHY_LED1("gpio10", GPIO_LAN2_LED1_MODE_MASK,
|
||||
LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(0)),
|
||||
AIROHA_PINCTRL_PHY_LED1("gpio1", GPIO_LAN3_LED1_MODE_MASK,
|
||||
AIROHA_PINCTRL_PHY_LED1("gpio11", GPIO_LAN3_LED1_MODE_MASK,
|
||||
LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(0)),
|
||||
};
|
||||
|
||||
@@ -1706,13 +1780,13 @@ static const struct airoha_pinctrl_func_group an7583_phy3_led1_func_group[] = {
|
||||
|
||||
static const struct airoha_pinctrl_func_group an7583_phy4_led1_func_group[] = {
|
||||
AIROHA_PINCTRL_PHY_LED1("gpio8", GPIO_LAN0_LED1_MODE_MASK,
|
||||
LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(2)),
|
||||
LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(3)),
|
||||
AIROHA_PINCTRL_PHY_LED1("gpio9", GPIO_LAN1_LED1_MODE_MASK,
|
||||
LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(2)),
|
||||
LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(3)),
|
||||
AIROHA_PINCTRL_PHY_LED1("gpio10", GPIO_LAN2_LED1_MODE_MASK,
|
||||
LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(2)),
|
||||
LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(3)),
|
||||
AIROHA_PINCTRL_PHY_LED1("gpio11", GPIO_LAN3_LED1_MODE_MASK,
|
||||
LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(2)),
|
||||
LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(3)),
|
||||
};
|
||||
|
||||
static const struct airoha_pinctrl_func en7581_pinctrl_funcs[] = {
|
||||
@@ -1755,7 +1829,7 @@ static const struct airoha_pinctrl_func an7583_pinctrl_funcs[] = {
|
||||
PINCTRL_FUNC_DESC("emmc", emmc),
|
||||
PINCTRL_FUNC_DESC("pnand", pnand),
|
||||
PINCTRL_FUNC_DESC("pcie_reset", an7583_pcie_reset),
|
||||
PINCTRL_FUNC_DESC("pwm", pwm),
|
||||
PINCTRL_FUNC_DESC("pwm", an7583_pwm),
|
||||
PINCTRL_FUNC_DESC("phy1_led0", an7583_phy1_led0),
|
||||
PINCTRL_FUNC_DESC("phy2_led0", an7583_phy2_led0),
|
||||
PINCTRL_FUNC_DESC("phy3_led0", an7583_phy3_led0),
|
||||
@@ -1794,7 +1868,7 @@ static const struct airoha_pinctrl_conf en7581_pinctrl_pullup_conf[] = {
|
||||
PINCTRL_CONF_DESC(29, REG_GPIO_L_PU, BIT(16)),
|
||||
PINCTRL_CONF_DESC(30, REG_GPIO_L_PU, BIT(17)),
|
||||
PINCTRL_CONF_DESC(31, REG_GPIO_L_PU, BIT(18)),
|
||||
PINCTRL_CONF_DESC(32, REG_GPIO_L_PU, BIT(18)),
|
||||
PINCTRL_CONF_DESC(32, REG_GPIO_L_PU, BIT(19)),
|
||||
PINCTRL_CONF_DESC(33, REG_GPIO_L_PU, BIT(20)),
|
||||
PINCTRL_CONF_DESC(34, REG_GPIO_L_PU, BIT(21)),
|
||||
PINCTRL_CONF_DESC(35, REG_GPIO_L_PU, BIT(22)),
|
||||
@@ -1847,7 +1921,7 @@ static const struct airoha_pinctrl_conf an7583_pinctrl_pullup_conf[] = {
|
||||
PINCTRL_CONF_DESC(18, REG_GPIO_L_PU, BIT(16)),
|
||||
PINCTRL_CONF_DESC(19, REG_GPIO_L_PU, BIT(17)),
|
||||
PINCTRL_CONF_DESC(20, REG_GPIO_L_PU, BIT(18)),
|
||||
PINCTRL_CONF_DESC(21, REG_GPIO_L_PU, BIT(18)),
|
||||
PINCTRL_CONF_DESC(21, REG_GPIO_L_PU, BIT(19)),
|
||||
PINCTRL_CONF_DESC(22, REG_GPIO_L_PU, BIT(20)),
|
||||
PINCTRL_CONF_DESC(23, REG_GPIO_L_PU, BIT(21)),
|
||||
PINCTRL_CONF_DESC(24, REG_GPIO_L_PU, BIT(22)),
|
||||
@@ -1911,7 +1985,7 @@ static const struct airoha_pinctrl_conf en7581_pinctrl_pulldown_conf[] = {
|
||||
PINCTRL_CONF_DESC(29, REG_GPIO_L_PD, BIT(16)),
|
||||
PINCTRL_CONF_DESC(30, REG_GPIO_L_PD, BIT(17)),
|
||||
PINCTRL_CONF_DESC(31, REG_GPIO_L_PD, BIT(18)),
|
||||
PINCTRL_CONF_DESC(32, REG_GPIO_L_PD, BIT(18)),
|
||||
PINCTRL_CONF_DESC(32, REG_GPIO_L_PD, BIT(19)),
|
||||
PINCTRL_CONF_DESC(33, REG_GPIO_L_PD, BIT(20)),
|
||||
PINCTRL_CONF_DESC(34, REG_GPIO_L_PD, BIT(21)),
|
||||
PINCTRL_CONF_DESC(35, REG_GPIO_L_PD, BIT(22)),
|
||||
@@ -1964,7 +2038,7 @@ static const struct airoha_pinctrl_conf an7583_pinctrl_pulldown_conf[] = {
|
||||
PINCTRL_CONF_DESC(18, REG_GPIO_L_PD, BIT(16)),
|
||||
PINCTRL_CONF_DESC(19, REG_GPIO_L_PD, BIT(17)),
|
||||
PINCTRL_CONF_DESC(20, REG_GPIO_L_PD, BIT(18)),
|
||||
PINCTRL_CONF_DESC(21, REG_GPIO_L_PD, BIT(18)),
|
||||
PINCTRL_CONF_DESC(21, REG_GPIO_L_PD, BIT(19)),
|
||||
PINCTRL_CONF_DESC(22, REG_GPIO_L_PD, BIT(20)),
|
||||
PINCTRL_CONF_DESC(23, REG_GPIO_L_PD, BIT(21)),
|
||||
PINCTRL_CONF_DESC(24, REG_GPIO_L_PD, BIT(22)),
|
||||
@@ -2028,7 +2102,7 @@ static const struct airoha_pinctrl_conf en7581_pinctrl_drive_e2_conf[] = {
|
||||
PINCTRL_CONF_DESC(29, REG_GPIO_L_E2, BIT(16)),
|
||||
PINCTRL_CONF_DESC(30, REG_GPIO_L_E2, BIT(17)),
|
||||
PINCTRL_CONF_DESC(31, REG_GPIO_L_E2, BIT(18)),
|
||||
PINCTRL_CONF_DESC(32, REG_GPIO_L_E2, BIT(18)),
|
||||
PINCTRL_CONF_DESC(32, REG_GPIO_L_E2, BIT(19)),
|
||||
PINCTRL_CONF_DESC(33, REG_GPIO_L_E2, BIT(20)),
|
||||
PINCTRL_CONF_DESC(34, REG_GPIO_L_E2, BIT(21)),
|
||||
PINCTRL_CONF_DESC(35, REG_GPIO_L_E2, BIT(22)),
|
||||
@@ -2081,7 +2155,7 @@ static const struct airoha_pinctrl_conf an7583_pinctrl_drive_e2_conf[] = {
|
||||
PINCTRL_CONF_DESC(18, REG_GPIO_L_E2, BIT(16)),
|
||||
PINCTRL_CONF_DESC(19, REG_GPIO_L_E2, BIT(17)),
|
||||
PINCTRL_CONF_DESC(20, REG_GPIO_L_E2, BIT(18)),
|
||||
PINCTRL_CONF_DESC(21, REG_GPIO_L_E2, BIT(18)),
|
||||
PINCTRL_CONF_DESC(21, REG_GPIO_L_E2, BIT(19)),
|
||||
PINCTRL_CONF_DESC(22, REG_GPIO_L_E2, BIT(20)),
|
||||
PINCTRL_CONF_DESC(23, REG_GPIO_L_E2, BIT(21)),
|
||||
PINCTRL_CONF_DESC(24, REG_GPIO_L_E2, BIT(22)),
|
||||
@@ -2145,7 +2219,7 @@ static const struct airoha_pinctrl_conf en7581_pinctrl_drive_e4_conf[] = {
|
||||
PINCTRL_CONF_DESC(29, REG_GPIO_L_E4, BIT(16)),
|
||||
PINCTRL_CONF_DESC(30, REG_GPIO_L_E4, BIT(17)),
|
||||
PINCTRL_CONF_DESC(31, REG_GPIO_L_E4, BIT(18)),
|
||||
PINCTRL_CONF_DESC(32, REG_GPIO_L_E4, BIT(18)),
|
||||
PINCTRL_CONF_DESC(32, REG_GPIO_L_E4, BIT(19)),
|
||||
PINCTRL_CONF_DESC(33, REG_GPIO_L_E4, BIT(20)),
|
||||
PINCTRL_CONF_DESC(34, REG_GPIO_L_E4, BIT(21)),
|
||||
PINCTRL_CONF_DESC(35, REG_GPIO_L_E4, BIT(22)),
|
||||
@@ -2198,7 +2272,7 @@ static const struct airoha_pinctrl_conf an7583_pinctrl_drive_e4_conf[] = {
|
||||
PINCTRL_CONF_DESC(18, REG_GPIO_L_E4, BIT(16)),
|
||||
PINCTRL_CONF_DESC(19, REG_GPIO_L_E4, BIT(17)),
|
||||
PINCTRL_CONF_DESC(20, REG_GPIO_L_E4, BIT(18)),
|
||||
PINCTRL_CONF_DESC(21, REG_GPIO_L_E4, BIT(18)),
|
||||
PINCTRL_CONF_DESC(21, REG_GPIO_L_E4, BIT(19)),
|
||||
PINCTRL_CONF_DESC(22, REG_GPIO_L_E4, BIT(20)),
|
||||
PINCTRL_CONF_DESC(23, REG_GPIO_L_E4, BIT(21)),
|
||||
PINCTRL_CONF_DESC(24, REG_GPIO_L_E4, BIT(22)),
|
||||
@@ -2811,7 +2885,7 @@ static int airoha_pinconf_group_get(struct pinctrl_dev *pctrl_dev,
|
||||
unsigned int group, unsigned long *config)
|
||||
{
|
||||
struct airoha_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
u32 cur_config = 0;
|
||||
unsigned long cur_config = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < pinctrl->grps[group].npins; i++) {
|
||||
@@ -31,3 +31,26 @@ config PINCTRL_ASPEED_G6
|
||||
help
|
||||
Say Y here to enable pin controller support for Aspeed's 6th
|
||||
generation SoCs. GPIO is provided by a separate GPIO driver.
|
||||
|
||||
config PINCTRL_ASPEED_G7_SOC0
|
||||
bool "Aspeed G7 SoC pin control"
|
||||
depends on (ARCH_ASPEED || COMPILE_TEST) && OF
|
||||
select PINCTRL_ASPEED
|
||||
help
|
||||
Say Y here to enable pin controller support for the SoC0 instance
|
||||
of Aspeed's 7th generation SoCs. GPIO is provided by a separate
|
||||
GPIO driver.
|
||||
|
||||
config PINCTRL_ASPEED_G7_SOC1
|
||||
bool "Aspeed G7 SoC1 pin control"
|
||||
depends on (ARCH_ASPEED || COMPILE_TEST) && OF
|
||||
select MFD_SYSCON
|
||||
select PINMUX
|
||||
select GENERIC_PINCTRL_GROUPS
|
||||
select GENERIC_PINMUX_FUNCTIONS
|
||||
select GENERIC_PINCONF
|
||||
select REGMAP_MMIO
|
||||
help
|
||||
Say Y here to enable pin controller support for the SoC1 instance
|
||||
of Aspeed's 7th generation SoCs. GPIO is provided by a separate
|
||||
GPIO driver.
|
||||
|
||||
@@ -6,3 +6,5 @@ obj-$(CONFIG_PINCTRL_ASPEED) += pinctrl-aspeed.o pinmux-aspeed.o
|
||||
obj-$(CONFIG_PINCTRL_ASPEED_G4) += pinctrl-aspeed-g4.o
|
||||
obj-$(CONFIG_PINCTRL_ASPEED_G5) += pinctrl-aspeed-g5.o
|
||||
obj-$(CONFIG_PINCTRL_ASPEED_G6) += pinctrl-aspeed-g6.o
|
||||
obj-$(CONFIG_PINCTRL_ASPEED_G7_SOC0) += pinctrl-aspeed-g7-soc0.o
|
||||
obj-$(CONFIG_PINCTRL_ASPEED_G7_SOC1) += pinctrl-aspeed-g7-soc1.o
|
||||
|
||||
@@ -0,0 +1,749 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/bits.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/pinctrl/pinconf-generic.h>
|
||||
#include <linux/pinctrl/pinconf.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
#include <linux/pinctrl/pinmux.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include "pinctrl-aspeed.h"
|
||||
#include "pinmux-aspeed.h"
|
||||
#include "../pinctrl-utils.h"
|
||||
|
||||
#define SCU200 0x200 /* System Reset Control #1 */
|
||||
|
||||
#define SCU010 0x010 /* Hardware Strap Register */
|
||||
#define SCU400 0x400 /* Multi-function Pin Control #1 */
|
||||
#define SCU404 0x404 /* Multi-function Pin Control #2 */
|
||||
#define SCU408 0x408 /* Multi-function Pin Control #3 */
|
||||
#define SCU40C 0x40C /* Multi-function Pin Control #3 */
|
||||
#define SCU410 0x410 /* USB Multi-function Control Register */
|
||||
#define SCU414 0x414 /* VGA Function Control Register */
|
||||
|
||||
#define SCU480 0x480 /* GPIO18A0 IO Control Register */
|
||||
#define SCU484 0x484 /* GPIO18A1 IO Control Register */
|
||||
#define SCU488 0x488 /* GPIO18A2 IO Control Register */
|
||||
#define SCU48C 0x48c /* GPIO18A3 IO Control Register */
|
||||
#define SCU490 0x490 /* GPIO18A4 IO Control Register */
|
||||
#define SCU494 0x494 /* GPIO18A5 IO Control Register */
|
||||
#define SCU498 0x498 /* GPIO18A6 IO Control Register */
|
||||
#define SCU49C 0x49c /* GPIO18A7 IO Control Register */
|
||||
#define SCU4A0 0x4A0 /* GPIO18B0 IO Control Register */
|
||||
#define SCU4A4 0x4A4 /* GPIO18B1 IO Control Register */
|
||||
#define SCU4A8 0x4A8 /* GPIO18B2 IO Control Register */
|
||||
#define SCU4AC 0x4AC /* GPIO18B3 IO Control Register */
|
||||
|
||||
enum {
|
||||
AC14,
|
||||
AE15,
|
||||
AD14,
|
||||
AE14,
|
||||
AF14,
|
||||
AB13,
|
||||
AB14,
|
||||
AF15,
|
||||
AF13,
|
||||
AC13,
|
||||
AD13,
|
||||
AE13,
|
||||
JTAG_PORT,
|
||||
PCIERC0_PERST,
|
||||
PCIERC1_PERST,
|
||||
PORTA_MODE,
|
||||
PORTA_U2,
|
||||
PORTB_MODE,
|
||||
PORTB_U2,
|
||||
PORTA_U2_PHY,
|
||||
PORTB_U2_PHY,
|
||||
PORTA_U3,
|
||||
PORTB_U3,
|
||||
PORTA_U3_PHY,
|
||||
PORTB_U3_PHY,
|
||||
};
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(AC14, EMMCCLK, EMMCG1, EMMC, SIG_DESC_SET(SCU400, 0));
|
||||
SIG_EXPR_LIST_DECL_SEMG(AC14, VB1CS, VB1, VB, SIG_DESC_SET(SCU404, 0));
|
||||
PIN_DECL_2(AC14, GPIO18A0, EMMCCLK, VB1CS);
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(AE15, EMMCCMD, EMMCG1, EMMC, SIG_DESC_SET(SCU400, 1));
|
||||
SIG_EXPR_LIST_DECL_SEMG(AE15, VB1CK, VB1, VB, SIG_DESC_SET(SCU404, 1));
|
||||
PIN_DECL_2(AE15, GPIO18A1, EMMCCMD, VB1CK);
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(AD14, EMMCDAT0, EMMCG1, EMMC, SIG_DESC_SET(SCU400, 2));
|
||||
SIG_EXPR_LIST_DECL_SEMG(AD14, VB1MOSI, VB1, VB, SIG_DESC_SET(SCU404, 2));
|
||||
PIN_DECL_2(AD14, GPIO18A2, EMMCDAT0, VB1MOSI);
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(AE14, EMMCDAT1, EMMCG4, EMMC, SIG_DESC_SET(SCU400, 3));
|
||||
SIG_EXPR_LIST_DECL_SEMG(AE14, VB1MISO, VB1, VB, SIG_DESC_SET(SCU404, 3));
|
||||
PIN_DECL_2(AE14, GPIO18A3, EMMCDAT1, VB1MISO);
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(AF14, EMMCDAT2, EMMCG4, EMMC, SIG_DESC_SET(SCU400, 4));
|
||||
PIN_DECL_1(AF14, GPIO18A4, EMMCDAT2);
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(AB13, EMMCDAT3, EMMCG4, EMMC, SIG_DESC_SET(SCU400, 5));
|
||||
PIN_DECL_1(AB13, GPIO18A5, EMMCDAT3);
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(AB14, EMMCCDN, EMMCG1, EMMC, SIG_DESC_SET(SCU400, 6));
|
||||
SIG_EXPR_LIST_DECL_SEMG(AB14, VB0CS, VB0, VB, SIG_DESC_SET(SCU010, 17));
|
||||
PIN_DECL_2(AB14, GPIO18A6, EMMCCDN, VB0CS);
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(AF15, EMMCWPN, EMMCG1, EMMC, SIG_DESC_SET(SCU400, 7));
|
||||
SIG_EXPR_LIST_DECL_SEMG(AF15, VB0CK, VB0, VB, SIG_DESC_SET(SCU010, 17));
|
||||
PIN_DECL_2(AF15, GPIO18A7, EMMCWPN, VB0CK);
|
||||
|
||||
SIG_EXPR_LIST_DECL_SESG(AF13, TSPRSTN, TSPRSTN, SIG_DESC_SET(SCU010, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(AF13, EMMCDAT4, EMMCG8, EMMC, SIG_DESC_SET(SCU400, 8));
|
||||
SIG_EXPR_LIST_DECL_SEMG(AF13, VB0MOSI, VB0, VB, SIG_DESC_SET(SCU010, 17));
|
||||
PIN_DECL_3(AF13, GPIO18B0, TSPRSTN, EMMCDAT4, VB0MOSI);
|
||||
|
||||
SIG_EXPR_LIST_DECL_SESG(AC13, UFSCLKI, UFSCLKI, SIG_DESC_SET(SCU010, 19));
|
||||
SIG_EXPR_LIST_DECL_SEMG(AC13, EMMCDAT5, EMMCG8, EMMC, SIG_DESC_SET(SCU400, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(AC13, VB0MISO, VB0, VB, SIG_DESC_SET(SCU010, 17));
|
||||
PIN_DECL_3(AC13, GPIO18B1, UFSCLKI, EMMCDAT5, VB0MISO);
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(AD13, EMMCDAT6, EMMCG8, EMMC, SIG_DESC_SET(SCU400, 10));
|
||||
SIG_EXPR_LIST_DECL_SESG(AD13, DDCCLK, VGADDC, SIG_DESC_SET(SCU404, 10));
|
||||
PIN_DECL_2(AD13, GPIO18B2, EMMCDAT6, DDCCLK);
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(AE13, EMMCDAT7, EMMCG8, EMMC, SIG_DESC_SET(SCU400, 11));
|
||||
SIG_EXPR_LIST_DECL_SESG(AE13, DDCDAT, VGADDC, SIG_DESC_SET(SCU404, 11));
|
||||
PIN_DECL_2(AE13, GPIO18B3, EMMCDAT7, DDCDAT);
|
||||
|
||||
GROUP_DECL(EMMCG1, AC14, AE15, AD14);
|
||||
GROUP_DECL(EMMCG4, AC14, AE15, AD14, AE14, AF14, AB13);
|
||||
GROUP_DECL(EMMCG8, AC14, AE15, AD14, AE14, AF14, AB13, AF13, AC13, AD13, AE13);
|
||||
GROUP_DECL(EMMCWPN, AF15);
|
||||
GROUP_DECL(EMMCCDN, AB14);
|
||||
FUNC_DECL_(EMMC, "EMMCG1", "EMMCG4", "EMMCG8", "EMMCWPN", "EMMCCDN");
|
||||
|
||||
GROUP_DECL(VB1, AC14, AE15, AD14, AE14);
|
||||
GROUP_DECL(VB0, AF15, AB14, AF13, AC13);
|
||||
FUNC_DECL_2(VB, VB1, VB0);
|
||||
|
||||
FUNC_GROUP_DECL(TSPRSTN, AF13);
|
||||
|
||||
FUNC_GROUP_DECL(UFSCLKI, AC13);
|
||||
|
||||
FUNC_GROUP_DECL(VGADDC, AD13, AE13);
|
||||
|
||||
/* JTAG Port Selection */
|
||||
#define JTAG_PORT_PSP_DESC { ASPEED_IP_SCU, SCU408, GENMASK(12, 5), 0x0, 0 }
|
||||
#define JTAG_PORT_SSP_DESC { ASPEED_IP_SCU, SCU408, GENMASK(12, 5), 0x41, 0 }
|
||||
#define JTAG_PORT_TSP_DESC { ASPEED_IP_SCU, SCU408, GENMASK(12, 5), 0x42, 0 }
|
||||
#define JTAG_PORT_DDR_DESC { ASPEED_IP_SCU, SCU408, GENMASK(12, 5), 0x43, 0 }
|
||||
#define JTAG_PORT_USB3A_DESC { ASPEED_IP_SCU, SCU408, GENMASK(12, 5), 0x44, 0 }
|
||||
#define JTAG_PORT_USB3B_DESC { ASPEED_IP_SCU, SCU408, GENMASK(12, 5), 0x45, 0 }
|
||||
#define JTAG_PORT_PCIEA_DESC { ASPEED_IP_SCU, SCU408, GENMASK(12, 5), 0x46, 0 }
|
||||
#define JTAG_PORT_PCIEB_DESC { ASPEED_IP_SCU, SCU408, GENMASK(12, 5), 0x47, 0 }
|
||||
#define JTAG_PORT_JTAGM0_DESC { ASPEED_IP_SCU, SCU408, GENMASK(12, 5), 0x8, 0 }
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(JTAG_PORT, JTAGPSP, JTAG0, JTAGPSP, JTAG_PORT_PSP_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(JTAG_PORT, JTAGSSP, JTAG0, JTAGSSP, JTAG_PORT_SSP_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(JTAG_PORT, JTAGTSP, JTAG0, JTAGTSP, JTAG_PORT_TSP_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(JTAG_PORT, JTAGDDR, JTAG0, JTAGDDR, JTAG_PORT_DDR_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(JTAG_PORT, JTAGUSB3A, JTAG0, JTAGUSB3A, JTAG_PORT_USB3A_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(JTAG_PORT, JTAGUSB3B, JTAG0, JTAGUSB3B, JTAG_PORT_USB3B_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(JTAG_PORT, JTAGPCIEA, JTAG0, JTAGPCIEA, JTAG_PORT_PCIEA_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(JTAG_PORT, JTAGPCIEB, JTAG0, JTAGPCIEB, JTAG_PORT_PCIEB_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(JTAG_PORT, JTAGM0, JTAG0, JTAGM0, JTAG_PORT_JTAGM0_DESC);
|
||||
PIN_DECL_(JTAG_PORT, SIG_EXPR_LIST_PTR(JTAG_PORT, JTAGPSP), SIG_EXPR_LIST_PTR(JTAG_PORT, JTAGSSP),
|
||||
SIG_EXPR_LIST_PTR(JTAG_PORT, JTAGTSP), SIG_EXPR_LIST_PTR(JTAG_PORT, JTAGDDR),
|
||||
SIG_EXPR_LIST_PTR(JTAG_PORT, JTAGUSB3A), SIG_EXPR_LIST_PTR(JTAG_PORT, JTAGUSB3B),
|
||||
SIG_EXPR_LIST_PTR(JTAG_PORT, JTAGPCIEA), SIG_EXPR_LIST_PTR(JTAG_PORT, JTAGPCIEB),
|
||||
SIG_EXPR_LIST_PTR(JTAG_PORT, JTAGM0));
|
||||
|
||||
GROUP_DECL(JTAG0, JTAG_PORT);
|
||||
|
||||
FUNC_DECL_1(JTAGPSP, JTAG0);
|
||||
FUNC_DECL_1(JTAGSSP, JTAG0);
|
||||
FUNC_DECL_1(JTAGTSP, JTAG0);
|
||||
FUNC_DECL_1(JTAGDDR, JTAG0);
|
||||
FUNC_DECL_1(JTAGUSB3A, JTAG0);
|
||||
FUNC_DECL_1(JTAGUSB3B, JTAG0);
|
||||
FUNC_DECL_1(JTAGPCIEA, JTAG0);
|
||||
FUNC_DECL_1(JTAGPCIEB, JTAG0);
|
||||
FUNC_DECL_1(JTAGM0, JTAG0);
|
||||
|
||||
/* PCIe Reset Control */
|
||||
SIG_EXPR_LIST_DECL_SESG(PCIERC0_PERST, PCIERC0PERST, PCIERC0PERST, SIG_DESC_SET(SCU200, 21));
|
||||
PIN_DECL_(PCIERC0_PERST, SIG_EXPR_LIST_PTR(PCIERC0_PERST, PCIERC0PERST));
|
||||
FUNC_GROUP_DECL(PCIERC0PERST, PCIERC0_PERST);
|
||||
|
||||
SIG_EXPR_LIST_DECL_SESG(PCIERC1_PERST, PCIERC1PERST, PCIERC1PERST, SIG_DESC_SET(SCU200, 19));
|
||||
PIN_DECL_(PCIERC1_PERST, SIG_EXPR_LIST_PTR(PCIERC1_PERST, PCIERC1PERST));
|
||||
FUNC_GROUP_DECL(PCIERC1PERST, PCIERC1_PERST);
|
||||
|
||||
#define PORTA_MODE_HPD0_DESC { ASPEED_IP_SCU, SCU410, GENMASK(25, 24), 0, 0 }
|
||||
#define PORTA_MODE_D0_DESC { ASPEED_IP_SCU, SCU410, GENMASK(25, 24), 1, 0 }
|
||||
#define PORTA_MODE_H_DESC { ASPEED_IP_SCU, SCU410, GENMASK(25, 24), 2, 0 }
|
||||
#define PORTA_MODE_HP_DESC { ASPEED_IP_SCU, SCU410, GENMASK(25, 24), 3, 0 }
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_MODE, USB2AHPD0, USB2AH, USB2AHPD0, PORTA_MODE_HPD0_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_MODE, USB2AH, USB2AHAP, USB2AH, PORTA_MODE_H_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_MODE, USB2AHP, USB2AHAP, USB2AHP, PORTA_MODE_HP_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_MODE, USB2AD0, USB2AHAP, USB2AD0, PORTA_MODE_D0_DESC);
|
||||
PIN_DECL_(PORTA_MODE, SIG_EXPR_LIST_PTR(PORTA_MODE, USB2AHPD0),
|
||||
SIG_EXPR_LIST_PTR(PORTA_MODE, USB2AH), SIG_EXPR_LIST_PTR(PORTA_MODE, USB2AHP),
|
||||
SIG_EXPR_LIST_PTR(PORTA_MODE, USB2AD0));
|
||||
|
||||
#define PORTA_U2_XHD_DESC { ASPEED_IP_SCU, SCU410, GENMASK(3, 2), 0, 0 }
|
||||
#define PORTA_U2_D1_DESC { ASPEED_IP_SCU, SCU410, GENMASK(3, 2), 1, 0 }
|
||||
#define PORTA_U2_XH_DESC { ASPEED_IP_SCU, SCU410, GENMASK(3, 2), 2, 0 }
|
||||
#define PORTA_U2_XH2E_DESC { ASPEED_IP_SCU, SCU410, GENMASK(3, 2), 3, 0 }
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U2, USB2AXHD1, USB2A, USB2AXHD1, PORTA_U2_XHD_DESC,
|
||||
SIG_DESC_SET(SCU410, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U2, USB2AXHPD1, USB2A, USB2AXHPD1, PORTA_U2_XHD_DESC,
|
||||
SIG_DESC_CLEAR(SCU410, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U2, USB2AXH, USB2AAP, USB2AXH, PORTA_U2_XH_DESC,
|
||||
SIG_DESC_SET(SCU410, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U2, USB2AXHP, USB2AAP, USB2AXHP, PORTA_U2_XH_DESC,
|
||||
SIG_DESC_CLEAR(SCU410, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U2, USB2AXH2B, USB2ABP, USB2AXH2B, PORTA_U2_XH2E_DESC,
|
||||
SIG_DESC_SET(SCU410, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U2, USB2AXHP2B, USB2ABP, USB2AXHP2B, PORTA_U2_XH2E_DESC,
|
||||
SIG_DESC_CLEAR(SCU410, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U2, USB2AD1, USB2ADAP, USB2AD1, PORTA_U2_D1_DESC);
|
||||
PIN_DECL_(PORTA_U2, SIG_EXPR_LIST_PTR(PORTA_U2, USB2AXHD1), SIG_EXPR_LIST_PTR(PORTA_U2, USB2AXHPD1),
|
||||
SIG_EXPR_LIST_PTR(PORTA_U2, USB2AXH), SIG_EXPR_LIST_PTR(PORTA_U2, USB2AXHP),
|
||||
SIG_EXPR_LIST_PTR(PORTA_U2, USB2AXH2B), SIG_EXPR_LIST_PTR(PORTA_U2, USB2AXHP2B),
|
||||
SIG_EXPR_LIST_PTR(PORTA_U2, USB2AD1));
|
||||
|
||||
#define PORTB_MODE_HPD0_DESC { ASPEED_IP_SCU, SCU410, GENMASK(29, 28), 0, 0 }
|
||||
#define PORTB_MODE_D0_DESC { ASPEED_IP_SCU, SCU410, GENMASK(29, 28), 1, 0 }
|
||||
#define PORTB_MODE_H_DESC { ASPEED_IP_SCU, SCU410, GENMASK(29, 28), 2, 0 }
|
||||
#define PORTB_MODE_HP_DESC { ASPEED_IP_SCU, SCU410, GENMASK(29, 28), 3, 0 }
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_MODE, USB2BHPD0, USB2BH, USB2BHPD0, PORTB_MODE_HPD0_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_MODE, USB2BH, USB2BHBP, USB2BH, PORTB_MODE_H_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_MODE, USB2BHP, USB2BHBP, USB2BHP, PORTB_MODE_HP_DESC);
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_MODE, USB2BD0, USB2BHBP, USB2BD0, PORTB_MODE_D0_DESC);
|
||||
PIN_DECL_(PORTB_MODE, SIG_EXPR_LIST_PTR(PORTB_MODE, USB2BHPD0),
|
||||
SIG_EXPR_LIST_PTR(PORTB_MODE, USB2BH), SIG_EXPR_LIST_PTR(PORTB_MODE, USB2BHP),
|
||||
SIG_EXPR_LIST_PTR(PORTB_MODE, USB2BD0));
|
||||
|
||||
#define PORTB_U2_XHD_DESC { ASPEED_IP_SCU, SCU410, GENMASK(7, 6), 0, 0 }
|
||||
#define PORTB_U2_D1_DESC { ASPEED_IP_SCU, SCU410, GENMASK(7, 6), 1, 0 }
|
||||
#define PORTB_U2_XH_DESC { ASPEED_IP_SCU, SCU410, GENMASK(7, 6), 2, 0 }
|
||||
#define PORTB_U2_XH2E_DESC { ASPEED_IP_SCU, SCU410, GENMASK(7, 6), 3, 0 }
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U2, USB2BXHD1, USB2B, USB2BXHD1, PORTB_U2_XHD_DESC,
|
||||
SIG_DESC_SET(SCU410, 10));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U2, USB2BXHPD1, USB2B, USB2BXHPD1, PORTB_U2_XHD_DESC,
|
||||
SIG_DESC_CLEAR(SCU410, 10));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U2, USB2BXH, USB2BBP, USB2BXH, PORTB_U2_XH_DESC,
|
||||
SIG_DESC_SET(SCU410, 10));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U2, USB2BXHP, USB2BBP, USB2BXHP, PORTB_U2_XH_DESC,
|
||||
SIG_DESC_CLEAR(SCU410, 10));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U2, USB2BXH2A, USB2BAP, USB2BXH2A, PORTB_U2_XH2E_DESC,
|
||||
SIG_DESC_SET(SCU410, 10));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U2, USB2BXHP2A, USB2BAP, USB2BXHP2A, PORTB_U2_XH2E_DESC,
|
||||
SIG_DESC_CLEAR(SCU410, 10));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U2, USB2BD1, USB2BDBP, USB2BD1, PORTB_U2_D1_DESC);
|
||||
PIN_DECL_(PORTB_U2, SIG_EXPR_LIST_PTR(PORTB_U2, USB2BXHD1), SIG_EXPR_LIST_PTR(PORTB_U2, USB2BXHPD1),
|
||||
SIG_EXPR_LIST_PTR(PORTB_U2, USB2BXH), SIG_EXPR_LIST_PTR(PORTB_U2, USB2BXHP),
|
||||
SIG_EXPR_LIST_PTR(PORTB_U2, USB2BXH2A), SIG_EXPR_LIST_PTR(PORTB_U2, USB2BXHP2A),
|
||||
SIG_EXPR_LIST_PTR(PORTB_U2, USB2BD1));
|
||||
/*
|
||||
* USB2 virtual PHY pins.
|
||||
*
|
||||
* PORTA_U2_PHY and PORTB_U2_PHY are logical endpoints, not package pins.
|
||||
* They alias existing USB2 expressions so pin groups can model direct and
|
||||
* cross-coupled routing for host and mode paths.
|
||||
*
|
||||
* - USB2AAP/USB2ADAP/USB2AHAP: use PORTA_U2_PHY
|
||||
* - USB2ABP : use PORTB_U2_PHY
|
||||
* - USB2BBP/USB2BDBP/USB2BHBP: use PORTB_U2_PHY
|
||||
* - USB2BAP : use PORTA_U2_PHY
|
||||
*
|
||||
* They do not have any registers to configure this behaviour; the goal is
|
||||
* simply for the driver to prevent conflicting selections. For example,
|
||||
* selecting group USB2ABP and USB2BBP at the same time should not be
|
||||
* allowed.
|
||||
*/
|
||||
SIG_EXPR_LIST_ALIAS(PORTA_U2_PHY, USB2AXH, USB2AAP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTA_U2_PHY, USB2AXHP, USB2AAP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTA_U2_PHY, USB2BXH2A, USB2BAP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTA_U2_PHY, USB2BXHP2A, USB2BAP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTA_U2_PHY, USB2AD1, USB2ADAP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTA_U2_PHY, USB2AH, USB2AHAP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTA_U2_PHY, USB2AHP, USB2AHAP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTA_U2_PHY, USB2AD0, USB2AHAP);
|
||||
PIN_DECL_(PORTA_U2_PHY, SIG_EXPR_LIST_PTR(PORTA_U2_PHY, USB2AXH),
|
||||
SIG_EXPR_LIST_PTR(PORTA_U2_PHY, USB2AXHP), SIG_EXPR_LIST_PTR(PORTA_U2_PHY, USB2BXH2A),
|
||||
SIG_EXPR_LIST_PTR(PORTA_U2_PHY, USB2BXHP2A), SIG_EXPR_LIST_PTR(PORTA_U2_PHY, USB2AD1),
|
||||
SIG_EXPR_LIST_PTR(PORTA_U2_PHY, USB2AH), SIG_EXPR_LIST_PTR(PORTA_U2_PHY, USB2AHP),
|
||||
SIG_EXPR_LIST_PTR(PORTA_U2_PHY, USB2AD0));
|
||||
|
||||
SIG_EXPR_LIST_ALIAS(PORTB_U2_PHY, USB2AXH2B, USB2ABP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTB_U2_PHY, USB2AXHP2B, USB2ABP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTB_U2_PHY, USB2BXH, USB2BBP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTB_U2_PHY, USB2BXHP, USB2BBP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTB_U2_PHY, USB2BD1, USB2BDBP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTB_U2_PHY, USB2BH, USB2BHBP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTB_U2_PHY, USB2BHP, USB2BHBP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTB_U2_PHY, USB2BD0, USB2BHBP);
|
||||
PIN_DECL_(PORTB_U2_PHY, SIG_EXPR_LIST_PTR(PORTB_U2_PHY, USB2AXH2B),
|
||||
SIG_EXPR_LIST_PTR(PORTB_U2_PHY, USB2AXHP2B), SIG_EXPR_LIST_PTR(PORTB_U2_PHY, USB2BXH),
|
||||
SIG_EXPR_LIST_PTR(PORTB_U2_PHY, USB2BXHP), SIG_EXPR_LIST_PTR(PORTB_U2_PHY, USB2BD1),
|
||||
SIG_EXPR_LIST_PTR(PORTB_U2_PHY, USB2BH), SIG_EXPR_LIST_PTR(PORTB_U2_PHY, USB2BHP),
|
||||
SIG_EXPR_LIST_PTR(PORTB_U2_PHY, USB2BD0));
|
||||
|
||||
GROUP_DECL(USB2A, PORTA_U2);
|
||||
GROUP_DECL(USB2AAP, PORTA_U2, PORTA_U2_PHY);
|
||||
GROUP_DECL(USB2ABP, PORTA_U2, PORTB_U2_PHY);
|
||||
GROUP_DECL(USB2ADAP, PORTA_U2, PORTA_U2_PHY);
|
||||
GROUP_DECL(USB2AH, PORTA_MODE);
|
||||
GROUP_DECL(USB2AHAP, PORTA_MODE, PORTA_U2_PHY);
|
||||
|
||||
FUNC_DECL_1(USB2AXHD1, USB2A);
|
||||
FUNC_DECL_1(USB2AXHPD1, USB2A);
|
||||
FUNC_DECL_1(USB2AXH, USB2AAP);
|
||||
FUNC_DECL_1(USB2AXHP, USB2AAP);
|
||||
FUNC_DECL_1(USB2AXH2B, USB2ABP);
|
||||
FUNC_DECL_1(USB2AXHP2B, USB2ABP);
|
||||
FUNC_DECL_1(USB2AD1, USB2ADAP);
|
||||
FUNC_DECL_1(USB2AHPD0, USB2AH);
|
||||
FUNC_DECL_1(USB2AH, USB2AHAP);
|
||||
FUNC_DECL_1(USB2AHP, USB2AHAP);
|
||||
FUNC_DECL_1(USB2AD0, USB2AHAP);
|
||||
|
||||
GROUP_DECL(USB2B, PORTB_U2);
|
||||
GROUP_DECL(USB2BBP, PORTB_U2, PORTB_U2_PHY);
|
||||
GROUP_DECL(USB2BAP, PORTB_U2, PORTA_U2_PHY);
|
||||
GROUP_DECL(USB2BDBP, PORTB_U2, PORTB_U2_PHY);
|
||||
GROUP_DECL(USB2BH, PORTB_MODE);
|
||||
GROUP_DECL(USB2BHBP, PORTB_MODE, PORTB_U2_PHY);
|
||||
|
||||
FUNC_DECL_1(USB2BXHD1, USB2B);
|
||||
FUNC_DECL_1(USB2BXHPD1, USB2B);
|
||||
FUNC_DECL_1(USB2BXH, USB2BBP);
|
||||
FUNC_DECL_1(USB2BXHP, USB2BBP);
|
||||
FUNC_DECL_1(USB2BXH2A, USB2BAP);
|
||||
FUNC_DECL_1(USB2BXHP2A, USB2BAP);
|
||||
FUNC_DECL_1(USB2BD1, USB2BDBP);
|
||||
FUNC_DECL_1(USB2BHPD0, USB2BH);
|
||||
FUNC_DECL_1(USB2BH, USB2BHBP);
|
||||
FUNC_DECL_1(USB2BHP, USB2BHBP);
|
||||
FUNC_DECL_1(USB2BD0, USB2BHBP);
|
||||
|
||||
#define PORTA_U3_XHD_DESC { ASPEED_IP_SCU, SCU410, GENMASK(1, 0), 0, 0 }
|
||||
#define PORTA_U3_XH_DESC { ASPEED_IP_SCU, SCU410, GENMASK(1, 0), 2, 0 }
|
||||
#define PORTA_U3_XH2E_DESC { ASPEED_IP_SCU, SCU410, GENMASK(1, 0), 3, 0 }
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U3, USB3AXHD, USB3A, USB3AXHD, PORTA_U3_XHD_DESC,
|
||||
SIG_DESC_SET(SCU410, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U3, USB3AXHPD, USB3A, USB3AXHPD, PORTA_U3_XHD_DESC,
|
||||
SIG_DESC_CLEAR(SCU410, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U3, USB3AXH, USB3AAP, USB3AXH, PORTA_U3_XH_DESC,
|
||||
SIG_DESC_SET(SCU410, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U3, USB3AXHP, USB3AAP, USB3AXHP, PORTA_U3_XH_DESC,
|
||||
SIG_DESC_CLEAR(SCU410, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U3, USB3AXH2B, USB3ABP, USB3AXH2B, PORTA_U3_XH2E_DESC,
|
||||
SIG_DESC_SET(SCU410, 9));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTA_U3, USB3AXHP2B, USB3ABP, USB3AXHP2B, PORTA_U3_XH2E_DESC,
|
||||
SIG_DESC_CLEAR(SCU410, 9));
|
||||
PIN_DECL_(PORTA_U3, SIG_EXPR_LIST_PTR(PORTA_U3, USB3AXHD), SIG_EXPR_LIST_PTR(PORTA_U3, USB3AXHPD),
|
||||
SIG_EXPR_LIST_PTR(PORTA_U3, USB3AXH), SIG_EXPR_LIST_PTR(PORTA_U3, USB3AXHP),
|
||||
SIG_EXPR_LIST_PTR(PORTA_U3, USB3AXH2B), SIG_EXPR_LIST_PTR(PORTA_U3, USB3AXHP2B));
|
||||
|
||||
#define PORTB_U3_XHD_DESC { ASPEED_IP_SCU, SCU410, GENMASK(5, 4), 0, 0 }
|
||||
#define PORTB_U3_XH_DESC { ASPEED_IP_SCU, SCU410, GENMASK(5, 4), 2, 0 }
|
||||
#define PORTB_U3_XH2E_DESC { ASPEED_IP_SCU, SCU410, GENMASK(5, 4), 3, 0 }
|
||||
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U3, USB3BXHD, USB3B, USB3BXHD, PORTB_U3_XHD_DESC,
|
||||
SIG_DESC_SET(SCU410, 10));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U3, USB3BXHPD, USB3B, USB3BXHPD, PORTB_U3_XHD_DESC,
|
||||
SIG_DESC_CLEAR(SCU410, 10));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U3, USB3BXH, USB3BBP, USB3BXH, PORTB_U3_XH_DESC,
|
||||
SIG_DESC_SET(SCU410, 10));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U3, USB3BXHP, USB3BBP, USB3BXHP, PORTB_U3_XH_DESC,
|
||||
SIG_DESC_CLEAR(SCU410, 10));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U3, USB3BXH2A, USB3BAP, USB3BXH2A, PORTB_U3_XH2E_DESC,
|
||||
SIG_DESC_SET(SCU410, 10));
|
||||
SIG_EXPR_LIST_DECL_SEMG(PORTB_U3, USB3BXHP2A, USB3BAP, USB3BXHP2A, PORTB_U3_XH2E_DESC,
|
||||
SIG_DESC_CLEAR(SCU410, 10));
|
||||
PIN_DECL_(PORTB_U3, SIG_EXPR_LIST_PTR(PORTB_U3, USB3BXHD), SIG_EXPR_LIST_PTR(PORTB_U3, USB3BXHPD),
|
||||
SIG_EXPR_LIST_PTR(PORTB_U3, USB3BXH), SIG_EXPR_LIST_PTR(PORTB_U3, USB3BXHP),
|
||||
SIG_EXPR_LIST_PTR(PORTB_U3, USB3BXH2A), SIG_EXPR_LIST_PTR(PORTB_U3, USB3BXHP2A));
|
||||
|
||||
/*
|
||||
* USB3 virtual PHY pins.
|
||||
*
|
||||
* PORTA_U3_PHY and PORTB_U3_PHY are logical endpoints, not package pins.
|
||||
* They alias existing USB3 expressions so pin groups can model both direct and
|
||||
* cross-coupled routing to PHY A/B.
|
||||
*
|
||||
* - USB3AAP: PORTA_U3 + PORTA_U3_PHY (A -> PHY A)
|
||||
* - USB3ABP: PORTA_U3 + PORTB_U3_PHY (A -> PHY B)
|
||||
* - USB3BBP: PORTB_U3 + PORTB_U3_PHY (B -> PHY B)
|
||||
* - USB3BAP: PORTB_U3 + PORTA_U3_PHY (B -> PHY A)
|
||||
*
|
||||
* They do not have any registers to configure this behavior; the goal is
|
||||
* simply for the driver to prevent conflicting selections. For example,
|
||||
* selecting group USB3ABP and USB3BBP at the same time should not be
|
||||
* allowed.
|
||||
*/
|
||||
SIG_EXPR_LIST_ALIAS(PORTA_U3_PHY, USB3AXH, USB3AAP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTA_U3_PHY, USB3AXHP, USB3AAP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTA_U3_PHY, USB3BXH2A, USB3BAP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTA_U3_PHY, USB3BXHP2A, USB3BAP);
|
||||
PIN_DECL_(PORTA_U3_PHY, SIG_EXPR_LIST_PTR(PORTA_U3_PHY, USB3AXH),
|
||||
SIG_EXPR_LIST_PTR(PORTA_U3_PHY, USB3AXHP), SIG_EXPR_LIST_PTR(PORTA_U3_PHY, USB3BXH2A),
|
||||
SIG_EXPR_LIST_PTR(PORTA_U3_PHY, USB3BXHP2A));
|
||||
|
||||
SIG_EXPR_LIST_ALIAS(PORTB_U3_PHY, USB3AXH2B, USB3ABP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTB_U3_PHY, USB3AXHP2B, USB3ABP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTB_U3_PHY, USB3BXH, USB3BBP);
|
||||
SIG_EXPR_LIST_ALIAS(PORTB_U3_PHY, USB3BXHP, USB3BBP);
|
||||
PIN_DECL_(PORTB_U3_PHY, SIG_EXPR_LIST_PTR(PORTB_U3_PHY, USB3AXH2B),
|
||||
SIG_EXPR_LIST_PTR(PORTB_U3_PHY, USB3AXHP2B), SIG_EXPR_LIST_PTR(PORTB_U3_PHY, USB3BXH),
|
||||
SIG_EXPR_LIST_PTR(PORTB_U3_PHY, USB3BXHP));
|
||||
|
||||
/* USB3A xHCI to vHUB */
|
||||
GROUP_DECL(USB3A, PORTA_U3);
|
||||
/* USB3A xHCI to USB3A PHY */
|
||||
GROUP_DECL(USB3AAP, PORTA_U3, PORTA_U3_PHY);
|
||||
/* USB3A xHCI to USB3B PHY */
|
||||
GROUP_DECL(USB3ABP, PORTA_U3, PORTB_U3_PHY);
|
||||
|
||||
FUNC_DECL_1(USB3AXHD, USB3A);
|
||||
FUNC_DECL_1(USB3AXHPD, USB3A);
|
||||
FUNC_DECL_1(USB3AXH, USB3AAP);
|
||||
FUNC_DECL_1(USB3AXHP, USB3AAP);
|
||||
FUNC_DECL_1(USB3AXH2B, USB3ABP);
|
||||
FUNC_DECL_1(USB3AXHP2B, USB3ABP);
|
||||
|
||||
/* USB3B xHCI to vHUB */
|
||||
GROUP_DECL(USB3B, PORTB_U3);
|
||||
/* USB3B xHCI to USB3A PHY */
|
||||
GROUP_DECL(USB3BAP, PORTB_U3, PORTA_U3_PHY);
|
||||
/* USB3B xHCI to USB3B PHY */
|
||||
GROUP_DECL(USB3BBP, PORTB_U3, PORTB_U3_PHY);
|
||||
|
||||
FUNC_DECL_1(USB3BXHD, USB3B);
|
||||
FUNC_DECL_1(USB3BXHPD, USB3B);
|
||||
FUNC_DECL_1(USB3BXH, USB3BBP);
|
||||
FUNC_DECL_1(USB3BXHP, USB3BBP);
|
||||
FUNC_DECL_1(USB3BXH2A, USB3BAP);
|
||||
FUNC_DECL_1(USB3BXHP2A, USB3BAP);
|
||||
|
||||
static const struct pinctrl_pin_desc aspeed_g7_soc0_pins[] = {
|
||||
ASPEED_PINCTRL_PIN(AC14),
|
||||
ASPEED_PINCTRL_PIN(AE15),
|
||||
ASPEED_PINCTRL_PIN(AD14),
|
||||
ASPEED_PINCTRL_PIN(AE14),
|
||||
ASPEED_PINCTRL_PIN(AF14),
|
||||
ASPEED_PINCTRL_PIN(AB13),
|
||||
ASPEED_PINCTRL_PIN(AB14),
|
||||
ASPEED_PINCTRL_PIN(AF15),
|
||||
ASPEED_PINCTRL_PIN(AF13),
|
||||
ASPEED_PINCTRL_PIN(AC13),
|
||||
ASPEED_PINCTRL_PIN(AD13),
|
||||
ASPEED_PINCTRL_PIN(AE13),
|
||||
ASPEED_PINCTRL_PIN(JTAG_PORT),
|
||||
ASPEED_PINCTRL_PIN(PCIERC0_PERST),
|
||||
ASPEED_PINCTRL_PIN(PCIERC1_PERST),
|
||||
ASPEED_PINCTRL_PIN(PORTA_MODE),
|
||||
ASPEED_PINCTRL_PIN(PORTA_U2),
|
||||
ASPEED_PINCTRL_PIN(PORTA_U3),
|
||||
ASPEED_PINCTRL_PIN(PORTA_U2_PHY),
|
||||
ASPEED_PINCTRL_PIN(PORTA_U3_PHY),
|
||||
ASPEED_PINCTRL_PIN(PORTB_MODE),
|
||||
ASPEED_PINCTRL_PIN(PORTB_U2),
|
||||
ASPEED_PINCTRL_PIN(PORTB_U3),
|
||||
ASPEED_PINCTRL_PIN(PORTB_U2_PHY),
|
||||
ASPEED_PINCTRL_PIN(PORTB_U3_PHY),
|
||||
};
|
||||
|
||||
static const struct aspeed_pin_group aspeed_g7_soc0_groups[] = {
|
||||
ASPEED_PINCTRL_GROUP(EMMCCDN),
|
||||
ASPEED_PINCTRL_GROUP(EMMCG1),
|
||||
ASPEED_PINCTRL_GROUP(EMMCG4),
|
||||
ASPEED_PINCTRL_GROUP(EMMCG8),
|
||||
ASPEED_PINCTRL_GROUP(EMMCWPN),
|
||||
ASPEED_PINCTRL_GROUP(TSPRSTN),
|
||||
ASPEED_PINCTRL_GROUP(UFSCLKI),
|
||||
ASPEED_PINCTRL_GROUP(VB0),
|
||||
ASPEED_PINCTRL_GROUP(VB1),
|
||||
ASPEED_PINCTRL_GROUP(VGADDC),
|
||||
/* JTAG groups */
|
||||
ASPEED_PINCTRL_GROUP(JTAG0),
|
||||
/* PCIE RC groups */
|
||||
ASPEED_PINCTRL_GROUP(PCIERC0PERST),
|
||||
ASPEED_PINCTRL_GROUP(PCIERC1PERST),
|
||||
/* USB3A groups */
|
||||
ASPEED_PINCTRL_GROUP(USB3A),
|
||||
ASPEED_PINCTRL_GROUP(USB3AAP),
|
||||
ASPEED_PINCTRL_GROUP(USB3ABP),
|
||||
/* USB3B groups */
|
||||
ASPEED_PINCTRL_GROUP(USB3B),
|
||||
ASPEED_PINCTRL_GROUP(USB3BAP),
|
||||
ASPEED_PINCTRL_GROUP(USB3BBP),
|
||||
/* USB2A groups */
|
||||
ASPEED_PINCTRL_GROUP(USB2A),
|
||||
ASPEED_PINCTRL_GROUP(USB2AAP),
|
||||
ASPEED_PINCTRL_GROUP(USB2ABP),
|
||||
ASPEED_PINCTRL_GROUP(USB2ADAP),
|
||||
ASPEED_PINCTRL_GROUP(USB2AH),
|
||||
ASPEED_PINCTRL_GROUP(USB2AHAP),
|
||||
/* USB2B groups */
|
||||
ASPEED_PINCTRL_GROUP(USB2B),
|
||||
ASPEED_PINCTRL_GROUP(USB2BAP),
|
||||
ASPEED_PINCTRL_GROUP(USB2BBP),
|
||||
ASPEED_PINCTRL_GROUP(USB2BDBP),
|
||||
ASPEED_PINCTRL_GROUP(USB2BH),
|
||||
ASPEED_PINCTRL_GROUP(USB2BHBP),
|
||||
};
|
||||
|
||||
static const struct aspeed_pin_function aspeed_g7_soc0_functions[] = {
|
||||
ASPEED_PINCTRL_FUNC(EMMC),
|
||||
ASPEED_PINCTRL_FUNC(TSPRSTN),
|
||||
ASPEED_PINCTRL_FUNC(UFSCLKI),
|
||||
ASPEED_PINCTRL_FUNC(VB),
|
||||
ASPEED_PINCTRL_FUNC(VGADDC),
|
||||
/* JTAG functions */
|
||||
ASPEED_PINCTRL_FUNC(JTAGDDR),
|
||||
ASPEED_PINCTRL_FUNC(JTAGM0),
|
||||
ASPEED_PINCTRL_FUNC(JTAGPCIEA),
|
||||
ASPEED_PINCTRL_FUNC(JTAGPCIEB),
|
||||
ASPEED_PINCTRL_FUNC(JTAGPSP),
|
||||
ASPEED_PINCTRL_FUNC(JTAGSSP),
|
||||
ASPEED_PINCTRL_FUNC(JTAGTSP),
|
||||
ASPEED_PINCTRL_FUNC(JTAGUSB3A),
|
||||
ASPEED_PINCTRL_FUNC(JTAGUSB3B),
|
||||
/* PCIE RC functions */
|
||||
ASPEED_PINCTRL_FUNC(PCIERC0PERST),
|
||||
ASPEED_PINCTRL_FUNC(PCIERC1PERST),
|
||||
/* USB3A functions */
|
||||
ASPEED_PINCTRL_FUNC(USB3AXH),
|
||||
ASPEED_PINCTRL_FUNC(USB3AXH2B),
|
||||
ASPEED_PINCTRL_FUNC(USB3AXHD),
|
||||
ASPEED_PINCTRL_FUNC(USB3AXHP),
|
||||
ASPEED_PINCTRL_FUNC(USB3AXHP2B),
|
||||
ASPEED_PINCTRL_FUNC(USB3AXHPD),
|
||||
/* USB3B functions */
|
||||
ASPEED_PINCTRL_FUNC(USB3BXH),
|
||||
ASPEED_PINCTRL_FUNC(USB3BXH2A),
|
||||
ASPEED_PINCTRL_FUNC(USB3BXHD),
|
||||
ASPEED_PINCTRL_FUNC(USB3BXHP),
|
||||
ASPEED_PINCTRL_FUNC(USB3BXHP2A),
|
||||
ASPEED_PINCTRL_FUNC(USB3BXHPD),
|
||||
/* USB2A functions */
|
||||
ASPEED_PINCTRL_FUNC(USB2AD0),
|
||||
ASPEED_PINCTRL_FUNC(USB2AD1),
|
||||
ASPEED_PINCTRL_FUNC(USB2AH),
|
||||
ASPEED_PINCTRL_FUNC(USB2AHP),
|
||||
ASPEED_PINCTRL_FUNC(USB2AHPD0),
|
||||
ASPEED_PINCTRL_FUNC(USB2AXH),
|
||||
ASPEED_PINCTRL_FUNC(USB2AXH2B),
|
||||
ASPEED_PINCTRL_FUNC(USB2AXHD1),
|
||||
ASPEED_PINCTRL_FUNC(USB2AXHP),
|
||||
ASPEED_PINCTRL_FUNC(USB2AXHP2B),
|
||||
ASPEED_PINCTRL_FUNC(USB2AXHPD1),
|
||||
/* USB2B functions */
|
||||
ASPEED_PINCTRL_FUNC(USB2BD0),
|
||||
ASPEED_PINCTRL_FUNC(USB2BD1),
|
||||
ASPEED_PINCTRL_FUNC(USB2BH),
|
||||
ASPEED_PINCTRL_FUNC(USB2BHP),
|
||||
ASPEED_PINCTRL_FUNC(USB2BHPD0),
|
||||
ASPEED_PINCTRL_FUNC(USB2BXH),
|
||||
ASPEED_PINCTRL_FUNC(USB2BXH2A),
|
||||
ASPEED_PINCTRL_FUNC(USB2BXHD1),
|
||||
ASPEED_PINCTRL_FUNC(USB2BXHP),
|
||||
ASPEED_PINCTRL_FUNC(USB2BXHP2A),
|
||||
ASPEED_PINCTRL_FUNC(USB2BXHPD1),
|
||||
};
|
||||
|
||||
static const struct pinmux_ops aspeed_g7_soc0_pinmux_ops = {
|
||||
.get_functions_count = aspeed_pinmux_get_fn_count,
|
||||
.get_function_name = aspeed_pinmux_get_fn_name,
|
||||
.get_function_groups = aspeed_pinmux_get_fn_groups,
|
||||
.set_mux = aspeed_pinmux_set_mux,
|
||||
.gpio_request_enable = aspeed_gpio_request_enable,
|
||||
.strict = true,
|
||||
};
|
||||
|
||||
static const struct pinctrl_ops aspeed_g7_soc0_pinctrl_ops = {
|
||||
.get_groups_count = aspeed_pinctrl_get_groups_count,
|
||||
.get_group_name = aspeed_pinctrl_get_group_name,
|
||||
.get_group_pins = aspeed_pinctrl_get_group_pins,
|
||||
.pin_dbg_show = aspeed_pinctrl_pin_dbg_show,
|
||||
.dt_node_to_map = pinconf_generic_dt_node_to_map_all,
|
||||
.dt_free_map = pinctrl_utils_free_map,
|
||||
};
|
||||
|
||||
static const struct pinconf_ops aspeed_g7_soc0_pinconf_ops = {
|
||||
.is_generic = true,
|
||||
.pin_config_get = aspeed_pin_config_get,
|
||||
.pin_config_set = aspeed_pin_config_set,
|
||||
.pin_config_group_get = aspeed_pin_config_group_get,
|
||||
.pin_config_group_set = aspeed_pin_config_group_set,
|
||||
};
|
||||
|
||||
/* pinctrl_desc */
|
||||
static const struct pinctrl_desc aspeed_g7_soc0_pinctrl_desc = {
|
||||
.name = "aspeed-g7-soc0-pinctrl",
|
||||
.pins = aspeed_g7_soc0_pins,
|
||||
.npins = ARRAY_SIZE(aspeed_g7_soc0_pins),
|
||||
.pctlops = &aspeed_g7_soc0_pinctrl_ops,
|
||||
.pmxops = &aspeed_g7_soc0_pinmux_ops,
|
||||
.confops = &aspeed_g7_soc0_pinconf_ops,
|
||||
};
|
||||
|
||||
static const struct aspeed_pin_config aspeed_g7_soc0_configs[] = {
|
||||
/* GPIO18A */
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, { AC14, AC14 }, SCU480, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, { AC14, AC14 }, SCU480, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, { AC14, AC14 }, SCU480, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, { AC14, AC14 }, SCU480, BIT(5) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, { AE15, AE15 }, SCU484, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, { AE15, AE15 }, SCU484, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, { AE15, AE15 }, SCU484, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, { AE15, AE15 }, SCU484, BIT(5) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, { AD14, AD14 }, SCU488, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, { AD14, AD14 }, SCU488, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, { AD14, AD14 }, SCU488, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, { AD14, AD14 }, SCU488, BIT(5) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, { AE14, AE14 }, SCU48C, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, { AE14, AE14 }, SCU48C, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, { AE14, AE14 }, SCU48C, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, { AE14, AE14 }, SCU48C, BIT(5) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, { AF14, AF14 }, SCU490, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, { AF14, AF14 }, SCU490, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, { AF14, AF14 }, SCU490, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, { AF14, AF14 }, SCU490, BIT(5) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, { AB13, AB13 }, SCU494, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, { AB13, AB13 }, SCU494, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, { AB13, AB13 }, SCU494, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, { AB13, AB13 }, SCU494, BIT(5) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, { AB14, AB14 }, SCU498, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, { AB14, AB14 }, SCU498, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, { AB14, AB14 }, SCU498, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, { AB14, AB14 }, SCU498, BIT(5) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, { AF15, AF15 }, SCU49C, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, { AF15, AF15 }, SCU49C, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, { AF15, AF15 }, SCU49C, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, { AF15, AF15 }, SCU49C, BIT(5) },
|
||||
/* GPIO18B */
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, { AF13, AF13 }, SCU4A0, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, { AF13, AF13 }, SCU4A0, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, { AF13, AF13 }, SCU4A0, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, { AF13, AF13 }, SCU4A0, BIT(5) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, { AC13, AC13 }, SCU4A4, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, { AC13, AC13 }, SCU4A4, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, { AC13, AC13 }, SCU4A4, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, { AC13, AC13 }, SCU4A4, BIT(5) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, { AD13, AD13 }, SCU4A8, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, { AD13, AD13 }, SCU4A8, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, { AD13, AD13 }, SCU4A8, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, { AD13, AD13 }, SCU4A8, BIT(5) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, { AE13, AE13 }, SCU4AC, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, { AE13, AE13 }, SCU4AC, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, { AE13, AE13 }, SCU4AC, GENMASK(5, 4) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, { AE13, AE13 }, SCU4AC, BIT(5) },
|
||||
};
|
||||
|
||||
static const struct aspeed_pin_config_map aspeed_g7_soc0_pin_config_map[] = {
|
||||
{ PIN_CONFIG_BIAS_PULL_DOWN, -1, 2, GENMASK(1, 0) },
|
||||
{ PIN_CONFIG_BIAS_PULL_UP, -1, 3, GENMASK(1, 0) },
|
||||
{ PIN_CONFIG_BIAS_DISABLE, -1, 0, BIT_MASK(0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 3, 0, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 6, 1, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 8, 2, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 11, 3, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 16, 4, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 18, 5, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 20, 6, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 23, 7, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 30, 8, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 32, 9, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 33, 10, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 35, 11, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 37, 12, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 38, 13, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 39, 14, GENMASK(3, 0) },
|
||||
{ PIN_CONFIG_DRIVE_STRENGTH, 41, 15, GENMASK(3, 0) },
|
||||
|
||||
};
|
||||
|
||||
static int aspeed_g7_soc0_sig_expr_set(struct aspeed_pinmux_data *ctx,
|
||||
const struct aspeed_sig_expr *expr, bool enable)
|
||||
{
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < expr->ndescs; i++) {
|
||||
const struct aspeed_sig_desc *desc = &expr->descs[i];
|
||||
u32 pattern = enable ? desc->enable : desc->disable;
|
||||
u32 val = (pattern << __ffs(desc->mask));
|
||||
|
||||
if (!ctx->maps[desc->ip])
|
||||
return -ENODEV;
|
||||
|
||||
WARN_ON_ONCE(desc->ip != ASPEED_IP_SCU);
|
||||
|
||||
ret = regmap_update_bits(ctx->maps[desc->ip], desc->reg,
|
||||
desc->mask, val);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = aspeed_sig_expr_eval(ctx, expr, enable);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return ret ? 0 : -EPERM;
|
||||
}
|
||||
|
||||
static const struct aspeed_pinmux_ops aspeed_g7_soc0_ops = {
|
||||
.set = aspeed_g7_soc0_sig_expr_set,
|
||||
};
|
||||
|
||||
static struct aspeed_pinctrl_data aspeed_g7_soc0_pinctrl_data = {
|
||||
.pins = aspeed_g7_soc0_pins,
|
||||
.npins = ARRAY_SIZE(aspeed_g7_soc0_pins),
|
||||
.pinmux = {
|
||||
.ops = &aspeed_g7_soc0_ops,
|
||||
.groups = aspeed_g7_soc0_groups,
|
||||
.ngroups = ARRAY_SIZE(aspeed_g7_soc0_groups),
|
||||
.functions = aspeed_g7_soc0_functions,
|
||||
.nfunctions = ARRAY_SIZE(aspeed_g7_soc0_functions),
|
||||
},
|
||||
.configs = aspeed_g7_soc0_configs,
|
||||
.nconfigs = ARRAY_SIZE(aspeed_g7_soc0_configs),
|
||||
.confmaps = aspeed_g7_soc0_pin_config_map,
|
||||
.nconfmaps = ARRAY_SIZE(aspeed_g7_soc0_pin_config_map),
|
||||
};
|
||||
|
||||
static int aspeed_g7_soc0_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
return aspeed_pinctrl_probe(pdev, &aspeed_g7_soc0_pinctrl_desc,
|
||||
&aspeed_g7_soc0_pinctrl_data);
|
||||
}
|
||||
|
||||
static const struct of_device_id aspeed_g7_soc0_pinctrl_match[] = {
|
||||
{ .compatible = "aspeed,ast2700-soc0-pinctrl" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, aspeed_g7_soc0_pinctrl_match);
|
||||
|
||||
static struct platform_driver aspeed_g7_soc0_pinctrl_driver = {
|
||||
.probe = aspeed_g7_soc0_pinctrl_probe,
|
||||
.driver = {
|
||||
.name = "aspeed-g7-soc0-pinctrl",
|
||||
.of_match_table = aspeed_g7_soc0_pinctrl_match,
|
||||
.suppress_bind_attrs = true,
|
||||
},
|
||||
};
|
||||
|
||||
static int __init aspeed_g7_soc0_pinctrl_init(void)
|
||||
{
|
||||
return platform_driver_register(&aspeed_g7_soc0_pinctrl_driver);
|
||||
}
|
||||
arch_initcall(aspeed_g7_soc0_pinctrl_init);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -466,6 +466,7 @@ static const struct of_device_id bcm4908_pinctrl_of_match_table[] = {
|
||||
{ .compatible = "brcm,bcm4908-pinctrl", },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, bcm4908_pinctrl_of_match_table);
|
||||
|
||||
static int bcm4908_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
@@ -561,4 +562,3 @@ module_platform_driver(bcm4908_pinctrl_driver);
|
||||
MODULE_AUTHOR("Rafał Miłecki");
|
||||
MODULE_DESCRIPTION("Broadcom BCM4908 pinmux driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DEVICE_TABLE(of, bcm4908_pinctrl_of_match_table);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2021 Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
* Copyright (C) 2016 Jonas Gorski <jonas.gorski@gmail.com>
|
||||
|
||||
@@ -868,7 +868,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
|
||||
gc->set = iproc_gpio_set;
|
||||
gc->get = iproc_gpio_get;
|
||||
|
||||
chip->pinmux_is_supported = of_property_read_bool(dev->of_node,
|
||||
chip->pinmux_is_supported = of_property_present(dev->of_node,
|
||||
"gpio-ranges");
|
||||
|
||||
/* optional GPIO interrupt support */
|
||||
|
||||
@@ -204,6 +204,7 @@ static const struct of_device_id ns_pinctrl_of_match_table[] = {
|
||||
{ .compatible = "brcm,bcm53012-pinmux", .data = (void *)FLAG_BCM53012, },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ns_pinctrl_of_match_table);
|
||||
|
||||
static int ns_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
@@ -295,4 +296,3 @@ static struct platform_driver ns_pinctrl_driver = {
|
||||
module_platform_driver(ns_pinctrl_driver);
|
||||
|
||||
MODULE_AUTHOR("Rafał Miłecki");
|
||||
MODULE_DEVICE_TABLE(of, ns_pinctrl_of_match_table);
|
||||
|
||||
@@ -343,7 +343,7 @@ static int cs42l43_pin_set_db(struct cs42l43_pin *priv, unsigned int pin,
|
||||
|
||||
return regmap_update_bits(priv->regmap, CS42L43_GPIO_CTRL2,
|
||||
CS42L43_GPIO1_DEGLITCH_BYP_MASK << pin,
|
||||
!!us << pin);
|
||||
!us << pin);
|
||||
}
|
||||
|
||||
static int cs42l43_pin_config_get(struct pinctrl_dev *pctldev,
|
||||
@@ -499,12 +499,10 @@ static int cs42l43_gpio_set(struct gpio_chip *chip, unsigned int offset,
|
||||
|
||||
ret = regmap_update_bits(priv->regmap, CS42L43_GPIO_CTRL1,
|
||||
BIT(shift), value << shift);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
pm_runtime_put(priv->dev);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int cs42l43_gpio_direction_out(struct gpio_chip *chip,
|
||||
@@ -604,8 +602,8 @@ static int cs42l43_pin_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
static const struct platform_device_id cs42l43_pin_id_table[] = {
|
||||
{ "cs42l43-pinctrl", },
|
||||
{}
|
||||
{ .name = "cs42l43-pinctrl" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, cs42l43_pin_id_table);
|
||||
|
||||
|
||||
+36
-5
@@ -622,8 +622,13 @@ static int pinctrl_generic_group_name_to_selector(struct pinctrl_dev *pctldev,
|
||||
const char *function)
|
||||
{
|
||||
const struct pinctrl_ops *ops = pctldev->desc->pctlops;
|
||||
int ngroups = ops->get_groups_count(pctldev);
|
||||
int selector = 0;
|
||||
int ngroups;
|
||||
|
||||
if (!ops->get_groups_count || !ops->get_group_name)
|
||||
return -EINVAL;
|
||||
|
||||
ngroups = ops->get_groups_count(pctldev);
|
||||
|
||||
/* See if this pctldev has this group */
|
||||
while (selector < ngroups) {
|
||||
@@ -738,8 +743,15 @@ int pinctrl_get_group_selector(struct pinctrl_dev *pctldev,
|
||||
const char *pin_group)
|
||||
{
|
||||
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
|
||||
unsigned int ngroups = pctlops->get_groups_count(pctldev);
|
||||
unsigned int group_selector = 0;
|
||||
unsigned int ngroups;
|
||||
|
||||
if (!pctlops->get_groups_count || !pctlops->get_group_name) {
|
||||
dev_err(pctldev->dev, "does not support pin groups\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ngroups = pctlops->get_groups_count(pctldev);
|
||||
|
||||
while (group_selector < ngroups) {
|
||||
const char *gname = pctlops->get_group_name(pctldev,
|
||||
@@ -760,6 +772,7 @@ int pinctrl_get_group_selector(struct pinctrl_dev *pctldev,
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pinctrl_get_group_selector);
|
||||
|
||||
bool pinctrl_gpio_can_use_line(struct gpio_chip *gc, unsigned int offset)
|
||||
{
|
||||
@@ -1801,6 +1814,11 @@ static int pinctrl_groups_show(struct seq_file *s, void *what)
|
||||
|
||||
mutex_lock(&pctldev->mutex);
|
||||
|
||||
if (!ops->get_groups_count || !ops->get_group_name) {
|
||||
mutex_unlock(&pctldev->mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ngroups = ops->get_groups_count(pctldev);
|
||||
|
||||
seq_puts(s, "registered pin groups:\n");
|
||||
@@ -2081,12 +2099,25 @@ static void pinctrl_remove_device_debugfs(struct pinctrl_dev *pctldev)
|
||||
static int pinctrl_check_ops(struct pinctrl_dev *pctldev)
|
||||
{
|
||||
const struct pinctrl_ops *ops = pctldev->desc->pctlops;
|
||||
const struct pinconf_ops *confops = pctldev->desc->confops;
|
||||
bool needs_groups = false;
|
||||
|
||||
if (!ops ||
|
||||
!ops->get_groups_count ||
|
||||
!ops->get_group_name)
|
||||
if (!ops)
|
||||
return -EINVAL;
|
||||
|
||||
if (pctldev->desc->pmxops)
|
||||
needs_groups = true;
|
||||
|
||||
if (confops && (confops->pin_config_group_get ||
|
||||
confops->pin_config_group_set))
|
||||
needs_groups = true;
|
||||
|
||||
if (needs_groups && (!ops->get_groups_count || !ops->get_group_name)) {
|
||||
dev_err(pctldev->dev,
|
||||
"driver needs group callbacks for mux or group config\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -995,8 +995,8 @@ static const struct acpi_device_id bxt_pinctrl_acpi_match[] = {
|
||||
MODULE_DEVICE_TABLE(acpi, bxt_pinctrl_acpi_match);
|
||||
|
||||
static const struct platform_device_id bxt_pinctrl_platform_ids[] = {
|
||||
{ "apollolake-pinctrl", (kernel_ulong_t)apl_pinctrl_soc_data },
|
||||
{ "broxton-pinctrl", (kernel_ulong_t)bxt_pinctrl_soc_data },
|
||||
{ .name = "apollolake-pinctrl", .driver_data = (kernel_ulong_t)apl_pinctrl_soc_data },
|
||||
{ .name = "broxton-pinctrl", .driver_data = (kernel_ulong_t)bxt_pinctrl_soc_data },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, bxt_pinctrl_platform_ids);
|
||||
|
||||
@@ -250,7 +250,7 @@ static const struct acpi_device_id dnv_pinctrl_acpi_match[] = {
|
||||
MODULE_DEVICE_TABLE(acpi, dnv_pinctrl_acpi_match);
|
||||
|
||||
static const struct platform_device_id dnv_pinctrl_platform_ids[] = {
|
||||
{ "denverton-pinctrl", (kernel_ulong_t)&dnv_soc_data },
|
||||
{ .name = "denverton-pinctrl", .driver_data = (kernel_ulong_t)&dnv_soc_data },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, dnv_pinctrl_platform_ids);
|
||||
|
||||
@@ -1556,13 +1556,13 @@ static int intel_pinctrl_probe_pwm(struct intel_pinctrl *pctrl,
|
||||
struct intel_community *community,
|
||||
unsigned short capability_offset)
|
||||
{
|
||||
void __iomem *base = community->regs + capability_offset + 4;
|
||||
static const struct pwm_lpss_boardinfo info = {
|
||||
.clk_rate = 19200000,
|
||||
.npwm = 1,
|
||||
.base_unit_bits = 22,
|
||||
};
|
||||
struct pwm_chip *chip;
|
||||
void __iomem *base;
|
||||
|
||||
if (!(community->features & PINCTRL_FEATURE_PWM))
|
||||
return 0;
|
||||
@@ -1570,6 +1570,7 @@ static int intel_pinctrl_probe_pwm(struct intel_pinctrl *pctrl,
|
||||
if (!IS_REACHABLE(CONFIG_PWM_LPSS))
|
||||
return 0;
|
||||
|
||||
base = community->regs + capability_offset + 4;
|
||||
chip = devm_pwm_lpss_probe(pctrl->dev, base, &info);
|
||||
return PTR_ERR_OR_ZERO(chip);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
menu "MediaTek pinctrl drivers"
|
||||
depends on ARCH_MEDIATEK || ARCH_AIROHA || RALINK || COMPILE_TEST
|
||||
depends on ARCH_MEDIATEK || RALINK || COMPILE_TEST
|
||||
|
||||
config EINT_MTK
|
||||
tristate "MediaTek External Interrupt Support"
|
||||
@@ -126,21 +126,6 @@ config PINCTRL_MT8127
|
||||
select PINCTRL_MTK
|
||||
|
||||
# For ARMv8 SoCs
|
||||
config PINCTRL_AIROHA
|
||||
tristate "Airoha EN7581 pin control"
|
||||
depends on OF
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
select PINMUX
|
||||
select GENERIC_PINCONF
|
||||
select GENERIC_PINCTRL_GROUPS
|
||||
select GENERIC_PINMUX_FUNCTIONS
|
||||
select GPIOLIB
|
||||
select GPIOLIB_IRQCHIP
|
||||
select REGMAP_MMIO
|
||||
help
|
||||
Say yes here to support pin controller and gpio driver
|
||||
on Airoha EN7581 SoC.
|
||||
|
||||
config PINCTRL_MT2712
|
||||
bool "MediaTek MT2712 pin control"
|
||||
depends on OF
|
||||
|
||||
@@ -8,7 +8,6 @@ obj-$(CONFIG_PINCTRL_MTK_MOORE) += pinctrl-moore.o
|
||||
obj-$(CONFIG_PINCTRL_MTK_PARIS) += pinctrl-paris.o
|
||||
|
||||
# SoC Drivers
|
||||
obj-$(CONFIG_PINCTRL_AIROHA) += pinctrl-airoha.o
|
||||
obj-$(CONFIG_PINCTRL_MT7620) += pinctrl-mt7620.o
|
||||
obj-$(CONFIG_PINCTRL_MT7621) += pinctrl-mt7621.o
|
||||
obj-$(CONFIG_PINCTRL_MT76X8) += pinctrl-mt76x8.o
|
||||
|
||||
@@ -246,7 +246,7 @@ static int mtk_eint_irq_set_wake(struct irq_data *d, unsigned int on)
|
||||
}
|
||||
|
||||
static void mtk_eint_chip_write_mask(const struct mtk_eint *eint,
|
||||
void __iomem *base, unsigned int **buf)
|
||||
unsigned int **buf)
|
||||
{
|
||||
int inst, port, port_num;
|
||||
void __iomem *reg;
|
||||
@@ -425,7 +425,7 @@ static void mtk_eint_irq_handler(struct irq_desc *desc)
|
||||
|
||||
int mtk_eint_do_suspend(struct mtk_eint *eint)
|
||||
{
|
||||
mtk_eint_chip_write_mask(eint, eint->base, eint->wake_mask);
|
||||
mtk_eint_chip_write_mask(eint, eint->wake_mask);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -433,7 +433,7 @@ EXPORT_SYMBOL_GPL(mtk_eint_do_suspend);
|
||||
|
||||
int mtk_eint_do_resume(struct mtk_eint *eint)
|
||||
{
|
||||
mtk_eint_chip_write_mask(eint, eint->base, eint->cur_mask);
|
||||
mtk_eint_chip_write_mask(eint, eint->cur_mask);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -402,7 +402,8 @@ static int mtk_pinconf_group_get(struct pinctrl_dev *pctldev,
|
||||
unsigned int group, unsigned long *config)
|
||||
{
|
||||
const unsigned int *pins;
|
||||
unsigned int i, npins, old = 0;
|
||||
unsigned int i, npins;
|
||||
unsigned long old = 0;
|
||||
int ret;
|
||||
|
||||
ret = pinctrl_generic_get_group_pins(pctldev, group, &pins, &npins);
|
||||
|
||||
@@ -244,7 +244,7 @@ static const struct mtk_pin_ies_smt_set mt8167_smt_set[] = {
|
||||
MTK_PIN_IES_SMT_SPEC(24, 25, 0xA00, 12),
|
||||
MTK_PIN_IES_SMT_SPEC(26, 30, 0xA00, 0),
|
||||
MTK_PIN_IES_SMT_SPEC(31, 33, 0xA00, 1),
|
||||
MTK_PIN_IES_SMT_SPEC(34, 39, 0xA900, 2),
|
||||
MTK_PIN_IES_SMT_SPEC(34, 39, 0xA00, 2),
|
||||
MTK_PIN_IES_SMT_SPEC(40, 40, 0xA10, 11),
|
||||
MTK_PIN_IES_SMT_SPEC(41, 43, 0xA00, 10),
|
||||
MTK_PIN_IES_SMT_SPEC(44, 47, 0xA00, 11),
|
||||
|
||||
@@ -244,7 +244,7 @@ static const struct mtk_pin_ies_smt_set mt8516_smt_set[] = {
|
||||
MTK_PIN_IES_SMT_SPEC(24, 25, 0xA00, 12),
|
||||
MTK_PIN_IES_SMT_SPEC(26, 30, 0xA00, 0),
|
||||
MTK_PIN_IES_SMT_SPEC(31, 33, 0xA00, 1),
|
||||
MTK_PIN_IES_SMT_SPEC(34, 39, 0xA900, 2),
|
||||
MTK_PIN_IES_SMT_SPEC(34, 39, 0xA00, 2),
|
||||
MTK_PIN_IES_SMT_SPEC(40, 40, 0xA10, 11),
|
||||
MTK_PIN_IES_SMT_SPEC(41, 43, 0xA00, 10),
|
||||
MTK_PIN_IES_SMT_SPEC(44, 47, 0xA00, 11),
|
||||
|
||||
@@ -802,20 +802,27 @@ static const struct pinmux_ops mtk_pmx_ops = {
|
||||
.get_function_name = mtk_pmx_get_func_name,
|
||||
.get_function_groups = mtk_pmx_get_func_groups,
|
||||
.set_mux = mtk_pmx_set_mux,
|
||||
.gpio_set_direction = mtk_pmx_gpio_set_direction,
|
||||
.gpio_request_enable = mtk_pmx_gpio_request_enable,
|
||||
};
|
||||
|
||||
static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
struct mtk_pinctrl *pctl = gpiochip_get_data(chip);
|
||||
|
||||
return mtk_pmx_gpio_set_direction(pctl->pctl_dev, NULL, offset, true);
|
||||
}
|
||||
|
||||
static int mtk_gpio_direction_output(struct gpio_chip *chip,
|
||||
unsigned offset, int value)
|
||||
{
|
||||
struct mtk_pinctrl *pctl = gpiochip_get_data(chip);
|
||||
int ret;
|
||||
|
||||
ret = mtk_gpio_set(chip, offset, value);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return pinctrl_gpio_direction_output(chip, offset);
|
||||
return mtk_pmx_gpio_set_direction(pctl->pctl_dev, NULL, offset, false);
|
||||
}
|
||||
|
||||
static int mtk_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
|
||||
@@ -895,7 +902,7 @@ static const struct gpio_chip mtk_gpio_chip = {
|
||||
.request = gpiochip_generic_request,
|
||||
.free = gpiochip_generic_free,
|
||||
.get_direction = mtk_gpio_get_direction,
|
||||
.direction_input = pinctrl_gpio_direction_input,
|
||||
.direction_input = mtk_gpio_direction_input,
|
||||
.direction_output = mtk_gpio_direction_output,
|
||||
.get = mtk_gpio_get,
|
||||
.set = mtk_gpio_set,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2018 MediaTek Inc.
|
||||
* Author: Zhiyong Tao <zhiyong.tao@mediatek.com>
|
||||
|
||||
@@ -771,7 +771,6 @@ static const struct pinmux_ops mtk_pmxops = {
|
||||
.get_function_name = mtk_pmx_get_func_name,
|
||||
.get_function_groups = mtk_pmx_get_func_groups,
|
||||
.set_mux = mtk_pmx_set_mux,
|
||||
.gpio_set_direction = mtk_pinmux_gpio_set_direction,
|
||||
.gpio_request_enable = mtk_pinmux_gpio_request_enable,
|
||||
};
|
||||
|
||||
@@ -886,19 +885,22 @@ static int mtk_gpio_set(struct gpio_chip *chip, unsigned int gpio, int value)
|
||||
|
||||
static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned int gpio)
|
||||
{
|
||||
return pinctrl_gpio_direction_input(chip, gpio);
|
||||
struct mtk_pinctrl *hw = gpiochip_get_data(chip);
|
||||
|
||||
return mtk_pinmux_gpio_set_direction(hw->pctrl, NULL, gpio, true);
|
||||
}
|
||||
|
||||
static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int gpio,
|
||||
int value)
|
||||
{
|
||||
struct mtk_pinctrl *hw = gpiochip_get_data(chip);
|
||||
int ret;
|
||||
|
||||
ret = mtk_gpio_set(chip, gpio, value);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return pinctrl_gpio_direction_output(chip, gpio);
|
||||
return mtk_pinmux_gpio_set_direction(hw->pctrl, NULL, gpio, false);
|
||||
}
|
||||
|
||||
static int mtk_gpio_to_irq(struct gpio_chip *chip, unsigned int offset)
|
||||
|
||||
@@ -55,14 +55,18 @@ struct aml_pio_control {
|
||||
* partial bank(subordinate) pins mux config use other bank(main) mux registgers
|
||||
* m_bank_id: the main bank which pin_id from 0, but register bit not from bit 0
|
||||
* m_bit_offs: bit offset the main bank mux register
|
||||
* s_bit_offs: start bit that subordinate bank use mux register
|
||||
* sid: start pin_id of subordinate bank
|
||||
* eid: end pin_id of subordinate bank
|
||||
* next: subordinate bank reused multiple other bank groups.
|
||||
*/
|
||||
struct multi_mux {
|
||||
unsigned int m_bank_id;
|
||||
unsigned int m_bit_offs;
|
||||
unsigned int s_bit_offs;
|
||||
unsigned int sid;
|
||||
unsigned int eid;
|
||||
const struct multi_mux *next;
|
||||
};
|
||||
|
||||
struct aml_pctl_data {
|
||||
@@ -124,12 +128,51 @@ static const char *aml_bank_name[31] = {
|
||||
"GPIOCC", "TEST_N", "ANALOG"
|
||||
};
|
||||
|
||||
static const struct multi_mux multi_mux_a9[] = {
|
||||
{
|
||||
.m_bank_id = AMLOGIC_GPIO_C,
|
||||
.m_bit_offs = 4,
|
||||
.s_bit_offs = 0,
|
||||
.sid = (AMLOGIC_GPIO_D << 8) + 16,
|
||||
.eid = (AMLOGIC_GPIO_D << 8) + 16,
|
||||
.next = &multi_mux_a9[1],
|
||||
}, {
|
||||
.m_bank_id = AMLOGIC_GPIO_AO,
|
||||
.m_bit_offs = 0,
|
||||
.s_bit_offs = 52,
|
||||
.sid = (AMLOGIC_GPIO_D << 8) + 17,
|
||||
.eid = (AMLOGIC_GPIO_D << 8) + 17,
|
||||
.next = NULL,
|
||||
}, {
|
||||
.m_bank_id = AMLOGIC_GPIO_A,
|
||||
.m_bit_offs = 0,
|
||||
.s_bit_offs = 80,
|
||||
.sid = (AMLOGIC_GPIO_Y << 8) + 8,
|
||||
.eid = (AMLOGIC_GPIO_Y << 8) + 9,
|
||||
.next = NULL,
|
||||
}, {
|
||||
.m_bank_id = AMLOGIC_GPIO_CC,
|
||||
.m_bit_offs = 24,
|
||||
.s_bit_offs = 0,
|
||||
.sid = (AMLOGIC_GPIO_X << 8) + 16,
|
||||
.eid = (AMLOGIC_GPIO_X << 8) + 17,
|
||||
.next = NULL,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct aml_pctl_data a9_priv_data = {
|
||||
.number = ARRAY_SIZE(multi_mux_a9),
|
||||
.p_mux = multi_mux_a9,
|
||||
};
|
||||
|
||||
static const struct multi_mux multi_mux_s7[] = {
|
||||
{
|
||||
.m_bank_id = AMLOGIC_GPIO_CC,
|
||||
.m_bit_offs = 24,
|
||||
.s_bit_offs = 0,
|
||||
.sid = (AMLOGIC_GPIO_X << 8) + 16,
|
||||
.eid = (AMLOGIC_GPIO_X << 8) + 19,
|
||||
.next = NULL,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -142,13 +185,17 @@ static const struct multi_mux multi_mux_s6[] = {
|
||||
{
|
||||
.m_bank_id = AMLOGIC_GPIO_CC,
|
||||
.m_bit_offs = 24,
|
||||
.s_bit_offs = 0,
|
||||
.sid = (AMLOGIC_GPIO_X << 8) + 16,
|
||||
.eid = (AMLOGIC_GPIO_X << 8) + 19,
|
||||
.next = NULL,
|
||||
}, {
|
||||
.m_bank_id = AMLOGIC_GPIO_F,
|
||||
.m_bit_offs = 4,
|
||||
.s_bit_offs = 0,
|
||||
.sid = (AMLOGIC_GPIO_D << 8) + 6,
|
||||
.eid = (AMLOGIC_GPIO_D << 8) + 6,
|
||||
.next = NULL,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -177,31 +224,34 @@ static int aml_pctl_set_function(struct aml_pinctrl *info,
|
||||
struct aml_gpio_bank *bank = gpio_chip_to_bank(range->gc);
|
||||
unsigned int shift;
|
||||
int reg;
|
||||
int i;
|
||||
int i, loop_count;
|
||||
unsigned int offset = bank->mux_bit_offs;
|
||||
const struct multi_mux *p_mux;
|
||||
|
||||
/* peculiar mux reg set */
|
||||
if (bank->p_mux) {
|
||||
p_mux = bank->p_mux;
|
||||
loop_count = 10;
|
||||
p_mux = bank->p_mux;
|
||||
while (p_mux && loop_count) {
|
||||
if (pin_id >= p_mux->sid && pin_id <= p_mux->eid) {
|
||||
bank = NULL;
|
||||
for (i = 0; i < info->nbanks; i++) {
|
||||
if (info->banks[i].bank_id == p_mux->m_bank_id) {
|
||||
bank = &info->banks[i];
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bank || !bank->reg_mux)
|
||||
return -EINVAL;
|
||||
|
||||
shift = (pin_id - p_mux->sid) << 2;
|
||||
shift = ((pin_id - p_mux->sid) << 2) + p_mux->s_bit_offs;
|
||||
reg = (shift / 32) * 4;
|
||||
offset = shift % 32;
|
||||
return regmap_update_bits(bank->reg_mux, reg,
|
||||
0xf << offset, (func & 0xf) << offset);
|
||||
}
|
||||
p_mux = p_mux->next;
|
||||
loop_count--;
|
||||
}
|
||||
|
||||
/* normal mux reg set */
|
||||
@@ -250,7 +300,7 @@ static int aml_pmx_set_mux(struct pinctrl_dev *pctldev, unsigned int fselector,
|
||||
int i;
|
||||
|
||||
for (i = 0; i < group->npins; i++) {
|
||||
range = pinctrl_find_gpio_range_from_pin(pctldev, group->pins[i]);
|
||||
range = pinctrl_find_gpio_range_from_pin_nolock(pctldev, group->pins[i]);
|
||||
aml_pctl_set_function(info, range, group->pins[i], group->func[i]);
|
||||
}
|
||||
|
||||
@@ -449,7 +499,7 @@ static int aml_pinconf_disable_bias(struct aml_pinctrl *info,
|
||||
unsigned int pin)
|
||||
{
|
||||
struct pinctrl_gpio_range *range =
|
||||
pinctrl_find_gpio_range_from_pin(info->pctl, pin);
|
||||
pinctrl_find_gpio_range_from_pin_nolock(info->pctl, pin);
|
||||
struct aml_gpio_bank *bank = gpio_chip_to_bank(range->gc);
|
||||
unsigned int reg, bit = 0;
|
||||
|
||||
@@ -462,7 +512,7 @@ static int aml_pinconf_enable_bias(struct aml_pinctrl *info, unsigned int pin,
|
||||
bool pull_up)
|
||||
{
|
||||
struct pinctrl_gpio_range *range =
|
||||
pinctrl_find_gpio_range_from_pin(info->pctl, pin);
|
||||
pinctrl_find_gpio_range_from_pin_nolock(info->pctl, pin);
|
||||
struct aml_gpio_bank *bank = gpio_chip_to_bank(range->gc);
|
||||
unsigned int reg, bit, val = 0;
|
||||
int ret;
|
||||
@@ -484,7 +534,7 @@ static int aml_pinconf_set_drive_strength(struct aml_pinctrl *info,
|
||||
u16 drive_strength_ua)
|
||||
{
|
||||
struct pinctrl_gpio_range *range =
|
||||
pinctrl_find_gpio_range_from_pin(info->pctl, pin);
|
||||
pinctrl_find_gpio_range_from_pin_nolock(info->pctl, pin);
|
||||
struct aml_gpio_bank *bank = gpio_chip_to_bank(range->gc);
|
||||
unsigned int reg, bit, ds_val;
|
||||
|
||||
@@ -519,7 +569,7 @@ static int aml_pinconf_set_gpio_bit(struct aml_pinctrl *info,
|
||||
bool arg)
|
||||
{
|
||||
struct pinctrl_gpio_range *range =
|
||||
pinctrl_find_gpio_range_from_pin(info->pctl, pin);
|
||||
pinctrl_find_gpio_range_from_pin_nolock(info->pctl, pin);
|
||||
struct aml_gpio_bank *bank = gpio_chip_to_bank(range->gc);
|
||||
unsigned int reg, bit;
|
||||
|
||||
@@ -548,11 +598,11 @@ static int aml_pinconf_set_output_drive(struct aml_pinctrl *info,
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = aml_pinconf_set_output(info, pin, true);
|
||||
ret = aml_pinconf_set_drive(info, pin, high);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return aml_pinconf_set_drive(info, pin, high);
|
||||
return aml_pinconf_set_output(info, pin, true);
|
||||
}
|
||||
|
||||
static int aml_pinconf_set(struct pinctrl_dev *pcdev, unsigned int pin,
|
||||
@@ -921,15 +971,14 @@ static int aml_gpio_direction_output(struct gpio_chip *chip, unsigned int gpio,
|
||||
unsigned int bit, reg;
|
||||
int ret;
|
||||
|
||||
aml_gpio_calc_reg_and_bit(bank, AML_REG_DIR, gpio, ®, &bit);
|
||||
ret = regmap_update_bits(bank->reg_gpio, reg, BIT(bit), 0);
|
||||
aml_gpio_calc_reg_and_bit(bank, AML_REG_OUT, gpio, ®, &bit);
|
||||
ret = regmap_update_bits(bank->reg_gpio, reg, BIT(bit),
|
||||
value ? BIT(bit) : 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
aml_gpio_calc_reg_and_bit(bank, AML_REG_OUT, gpio, ®, &bit);
|
||||
|
||||
return regmap_update_bits(bank->reg_gpio, reg, BIT(bit),
|
||||
value ? BIT(bit) : 0);
|
||||
aml_gpio_calc_reg_and_bit(bank, AML_REG_DIR, gpio, ®, &bit);
|
||||
return regmap_update_bits(bank->reg_gpio, reg, BIT(bit), 0);
|
||||
}
|
||||
|
||||
static int aml_gpio_set(struct gpio_chip *chip, unsigned int gpio, int value)
|
||||
@@ -1159,6 +1208,7 @@ static int aml_pctl_probe(struct platform_device *pdev)
|
||||
|
||||
static const struct of_device_id aml_pctl_of_match[] = {
|
||||
{ .compatible = "amlogic,pinctrl-a4", },
|
||||
{ .compatible = "amlogic,pinctrl-a9", .data = &a9_priv_data, },
|
||||
{ .compatible = "amlogic,pinctrl-s7", .data = &s7_priv_data, },
|
||||
{ .compatible = "amlogic,pinctrl-s6", .data = &s6_priv_data, },
|
||||
{ /* sentinel */ }
|
||||
|
||||
@@ -1014,7 +1014,8 @@ static int ma35_pinctrl_parse_groups(struct fwnode_handle *fwnode, struct group_
|
||||
grp->data = pin;
|
||||
|
||||
for (i = 0, j = 0; i < count; i += 3, j++) {
|
||||
pin->offset = elems[i] * MA35_MFP_REG_SZ_PER_BANK + MA35_MFP_REG_BASE;
|
||||
pin->offset = elems[i] * MA35_MFP_REG_SZ_PER_BANK + MA35_MFP_REG_BASE +
|
||||
(elems[i + 1] >= 8 ? 4 : 0);
|
||||
pin->shift = (elems[i + 1] * MA35_MFP_BITS_PER_PORT) % 32;
|
||||
pin->muxval = elems[i + 2];
|
||||
pin->configs = configs;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Core driver for the S32 CC (Common Chassis) pin controller
|
||||
*
|
||||
* Copyright 2017-2022,2024 NXP
|
||||
* Copyright 2017-2022,2024-2025 NXP
|
||||
* Copyright (C) 2022 SUSE LLC
|
||||
* Copyright 2015-2016 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
@@ -236,10 +236,10 @@ static int s32_dt_group_node_to_map(struct pinctrl_dev *pctldev,
|
||||
}
|
||||
|
||||
ret = pinconf_generic_parse_dt_config(np, pctldev, &cfgs, &n_cfgs);
|
||||
if (ret) {
|
||||
dev_err(dev, "%pOF: could not parse node property\n", np);
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret,
|
||||
"%pOF: could not parse node property\n",
|
||||
np);
|
||||
|
||||
if (n_cfgs)
|
||||
reserve++;
|
||||
@@ -763,15 +763,15 @@ static int s32_pinctrl_parse_groups(struct device_node *np,
|
||||
grp->data.name = np->name;
|
||||
|
||||
npins = of_property_count_elems_of_size(np, "pinmux", sizeof(u32));
|
||||
if (npins < 0) {
|
||||
dev_err(dev, "Failed to read 'pinmux' property in node %s.\n",
|
||||
grp->data.name);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!npins) {
|
||||
dev_err(dev, "The group %s has no pins.\n", grp->data.name);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (npins < 0)
|
||||
return dev_err_probe(dev, -EINVAL,
|
||||
"Failed to read 'pinmux' in node %s\n",
|
||||
grp->data.name);
|
||||
|
||||
if (!npins)
|
||||
return dev_err_probe(dev, -EINVAL,
|
||||
"The group %s has no pins\n",
|
||||
grp->data.name);
|
||||
|
||||
grp->data.npins = npins;
|
||||
|
||||
@@ -812,10 +812,9 @@ static int s32_pinctrl_parse_functions(struct device_node *np,
|
||||
/* Initialise function */
|
||||
func->name = np->name;
|
||||
func->ngroups = of_get_child_count(np);
|
||||
if (func->ngroups == 0) {
|
||||
dev_err(info->dev, "no groups defined in %pOF\n", np);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (func->ngroups == 0)
|
||||
return dev_err_probe(info->dev, -EINVAL,
|
||||
"No groups defined in %pOF\n", np);
|
||||
|
||||
groups = devm_kcalloc(info->dev, func->ngroups,
|
||||
sizeof(*func->groups), GFP_KERNEL);
|
||||
@@ -886,10 +885,9 @@ static int s32_pinctrl_probe_dt(struct platform_device *pdev,
|
||||
}
|
||||
|
||||
nfuncs = of_get_child_count(np);
|
||||
if (nfuncs <= 0) {
|
||||
dev_err(&pdev->dev, "no functions defined\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (nfuncs <= 0)
|
||||
return dev_err_probe(&pdev->dev, -EINVAL,
|
||||
"No functions defined\n");
|
||||
|
||||
info->nfunctions = nfuncs;
|
||||
info->functions = devm_kcalloc(&pdev->dev, nfuncs,
|
||||
@@ -919,18 +917,17 @@ static int s32_pinctrl_probe_dt(struct platform_device *pdev,
|
||||
int s32_pinctrl_probe(struct platform_device *pdev,
|
||||
const struct s32_pinctrl_soc_data *soc_data)
|
||||
{
|
||||
struct s32_pinctrl *ipctl;
|
||||
int ret;
|
||||
struct pinctrl_desc *s32_pinctrl_desc;
|
||||
struct s32_pinctrl_soc_info *info;
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
struct s32_pinctrl_context *saved_context;
|
||||
#endif
|
||||
struct pinctrl_desc *s32_pinctrl_desc;
|
||||
struct s32_pinctrl_soc_info *info;
|
||||
struct s32_pinctrl *ipctl;
|
||||
int ret;
|
||||
|
||||
if (!soc_data || !soc_data->pins || !soc_data->npins) {
|
||||
dev_err(&pdev->dev, "wrong pinctrl info\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!soc_data || !soc_data->pins || !soc_data->npins)
|
||||
return dev_err_probe(&pdev->dev, -EINVAL,
|
||||
"Wrong pinctrl info\n");
|
||||
|
||||
info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
|
||||
if (!info)
|
||||
@@ -965,10 +962,9 @@ int s32_pinctrl_probe(struct platform_device *pdev,
|
||||
s32_pinctrl_desc->owner = THIS_MODULE;
|
||||
|
||||
ret = s32_pinctrl_probe_dt(pdev, ipctl);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "fail to probe dt properties\n");
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
return dev_err_probe(&pdev->dev, ret,
|
||||
"Fail to probe dt properties\n");
|
||||
|
||||
ipctl->pctl = devm_pinctrl_register(&pdev->dev, s32_pinctrl_desc,
|
||||
ipctl);
|
||||
|
||||
@@ -225,10 +225,9 @@ static int parse_fw_cfg(struct fwnode_handle *fwnode,
|
||||
unsigned int count, unsigned long *cfg,
|
||||
unsigned int *ncfg)
|
||||
{
|
||||
unsigned long *properties;
|
||||
int i, test;
|
||||
|
||||
properties = bitmap_zalloc(count, GFP_KERNEL);
|
||||
unsigned long *properties __free(bitmap) = bitmap_zalloc(count, GFP_KERNEL);
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
u32 val;
|
||||
@@ -263,7 +262,6 @@ static int parse_fw_cfg(struct fwnode_handle *fwnode,
|
||||
if (ret) {
|
||||
pr_err("%pfw: conflicting setting detected for %s\n",
|
||||
fwnode, par->property);
|
||||
bitmap_free(properties);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
@@ -295,7 +293,6 @@ static int parse_fw_cfg(struct fwnode_handle *fwnode,
|
||||
pr_err("%pfw: cannot have multiple drive configurations\n",
|
||||
fwnode);
|
||||
|
||||
bitmap_free(properties);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -419,7 +416,7 @@ int pinconf_generic_parse_dt_config(struct device_node *np,
|
||||
* Now limit the number of configs to the real number of
|
||||
* found properties.
|
||||
*/
|
||||
*configs = kmemdup(cfg, ncfg * sizeof(unsigned long), GFP_KERNEL);
|
||||
*configs = kmemdup_array(cfg, ncfg, sizeof(unsigned long), GFP_KERNEL);
|
||||
if (!*configs) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
|
||||
@@ -275,7 +275,7 @@ void pinconf_show_setting(struct seq_file *s,
|
||||
case PIN_MAP_TYPE_CONFIGS_GROUP:
|
||||
seq_printf(s, "group %s (%d)",
|
||||
pctlops->get_group_name(pctldev,
|
||||
setting->data.configs.group_or_pin),
|
||||
setting->data.configs.group_or_pin),
|
||||
setting->data.configs.group_or_pin);
|
||||
break;
|
||||
default:
|
||||
@@ -348,8 +348,13 @@ static int pinconf_groups_show(struct seq_file *s, void *what)
|
||||
{
|
||||
struct pinctrl_dev *pctldev = s->private;
|
||||
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
|
||||
unsigned int ngroups = pctlops->get_groups_count(pctldev);
|
||||
unsigned int selector = 0;
|
||||
unsigned int ngroups;
|
||||
|
||||
if (!pctlops->get_groups_count || !pctlops->get_group_name)
|
||||
return 0;
|
||||
|
||||
ngroups = pctlops->get_groups_count(pctldev);
|
||||
|
||||
seq_puts(s, "Pin config settings per pin group\n");
|
||||
seq_puts(s, "Format: group (name): configs\n");
|
||||
|
||||
@@ -167,11 +167,22 @@ pinconf_generic_parse_dt_pinmux(struct device_node *np, struct device *dev,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_GENERIC_PINCTRL) && defined (CONFIG_OF)
|
||||
#if defined(CONFIG_GENERIC_PINCTRL)
|
||||
int pinctrl_generic_pins_function_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
struct device_node *np,
|
||||
struct pinctrl_map **maps,
|
||||
unsigned int *num_maps);
|
||||
|
||||
int pinctrl_generic_pinmux_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
struct device_node *np,
|
||||
struct pinctrl_map **maps,
|
||||
unsigned int *num_maps);
|
||||
|
||||
int pinctrl_generic_to_map(struct pinctrl_dev *pctldev, struct device_node *parent,
|
||||
struct device_node *np, struct pinctrl_map **maps,
|
||||
unsigned int *num_maps, unsigned int *num_reserved_maps,
|
||||
const char **group_name, unsigned int ngroups,
|
||||
void *data, unsigned int *pins, unsigned int npins);
|
||||
#else
|
||||
static inline int
|
||||
pinctrl_generic_pins_function_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
@@ -181,4 +192,23 @@ pinctrl_generic_pins_function_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int
|
||||
pinctrl_generic_pinmux_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
struct device_node *np,
|
||||
struct pinctrl_map **maps,
|
||||
unsigned int *num_maps)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int
|
||||
pinctrl_generic_to_map(struct pinctrl_dev *pctldev, struct device_node *parent,
|
||||
struct device_node *np, struct pinctrl_map **maps,
|
||||
unsigned int *num_maps, unsigned int *num_reserved_maps,
|
||||
const char **group_name, unsigned int ngroups,
|
||||
void *data, unsigned int *pins, unsigned int npins)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1033,7 +1033,7 @@ static void aw9523_remove(struct i2c_client *client)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id aw9523_i2c_id_table[] = {
|
||||
{ "aw9523_i2c" },
|
||||
{ .name = "aw9523_i2c" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, aw9523_i2c_id_table);
|
||||
|
||||
@@ -1461,9 +1461,9 @@ static int cy8c95x0_probe(struct i2c_client *client)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id cy8c95x0_id[] = {
|
||||
{ "cy8c9520", 20 },
|
||||
{ "cy8c9540", 40 },
|
||||
{ "cy8c9560", 60 },
|
||||
{ .name = "cy8c9520", .driver_data = 20 },
|
||||
{ .name = "cy8c9540", .driver_data = 40 },
|
||||
{ .name = "cy8c9560", .driver_data = 60 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, cy8c95x0_id);
|
||||
|
||||
@@ -532,8 +532,9 @@ static int eqbr_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
|
||||
static int eqbr_pinconf_group_get(struct pinctrl_dev *pctldev,
|
||||
unsigned int group, unsigned long *config)
|
||||
{
|
||||
unsigned int i, npins, old = 0;
|
||||
const unsigned int *pins;
|
||||
unsigned int i, npins;
|
||||
unsigned long old = 0;
|
||||
int ret;
|
||||
|
||||
ret = pinctrl_generic_get_group_pins(pctldev, group, &pins, &npins);
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Generic Pin Control Driver for Board-Level Mux Chips
|
||||
* Copyright 2026 NXP
|
||||
*/
|
||||
|
||||
#include <linux/cleanup.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/mux/consumer.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pinctrl/pinconf-generic.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
#include <linux/pinctrl/pinmux.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "core.h"
|
||||
#include "pinconf.h"
|
||||
#include "pinmux.h"
|
||||
#include "pinctrl-utils.h"
|
||||
|
||||
struct mux_pin_function {
|
||||
struct mux_state *mux_state;
|
||||
};
|
||||
|
||||
struct mux_pinctrl {
|
||||
struct device *dev;
|
||||
struct pinctrl_dev *pctl;
|
||||
|
||||
/* mutex protect [pinctrl|pinmux]_generic functions */
|
||||
struct mutex lock;
|
||||
};
|
||||
|
||||
static int
|
||||
mux_pinmux_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
struct device_node *np_config,
|
||||
struct pinctrl_map **maps, unsigned int *num_maps)
|
||||
{
|
||||
unsigned int num_reserved_maps = 0;
|
||||
struct mux_pin_function *function;
|
||||
const char **group_names;
|
||||
int ret;
|
||||
|
||||
function = devm_kzalloc(pctldev->dev, sizeof(*function), GFP_KERNEL);
|
||||
if (!function)
|
||||
return -ENOMEM;
|
||||
|
||||
group_names = devm_kcalloc(pctldev->dev, 1, sizeof(*group_names), GFP_KERNEL);
|
||||
if (!group_names)
|
||||
return -ENOMEM;
|
||||
|
||||
function->mux_state = devm_mux_state_get_from_np(pctldev->dev, NULL, np_config);
|
||||
if (IS_ERR(function->mux_state))
|
||||
return PTR_ERR(function->mux_state);
|
||||
|
||||
ret = pinctrl_generic_to_map(pctldev, np_config, np_config, maps,
|
||||
num_maps, &num_reserved_maps, group_names,
|
||||
0, &np_config->name, NULL, 0);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = pinmux_generic_add_function(pctldev, np_config->name, group_names,
|
||||
1, function);
|
||||
if (ret < 0) {
|
||||
pinctrl_utils_free_map(pctldev, *maps, *num_maps);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct pinctrl_ops mux_pinctrl_ops = {
|
||||
.get_groups_count = pinctrl_generic_get_group_count,
|
||||
.get_group_name = pinctrl_generic_get_group_name,
|
||||
.get_group_pins = pinctrl_generic_get_group_pins,
|
||||
.dt_node_to_map = mux_pinmux_dt_node_to_map,
|
||||
.dt_free_map = pinctrl_utils_free_map,
|
||||
};
|
||||
|
||||
static int mux_pinmux_set_mux(struct pinctrl_dev *pctldev,
|
||||
unsigned int func_selector,
|
||||
unsigned int group_selector)
|
||||
{
|
||||
struct mux_pinctrl *mpctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
const struct function_desc *function;
|
||||
struct mux_pin_function *func;
|
||||
int ret;
|
||||
|
||||
guard(mutex)(&mpctl->lock);
|
||||
|
||||
function = pinmux_generic_get_function(pctldev, func_selector);
|
||||
func = function->data;
|
||||
|
||||
ret = mux_state_select(func->mux_state);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mux_pinmux_release_mux(struct pinctrl_dev *pctldev,
|
||||
unsigned int func_selector,
|
||||
unsigned int group_selector)
|
||||
{
|
||||
struct mux_pinctrl *mpctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
const struct function_desc *function;
|
||||
struct mux_pin_function *func;
|
||||
|
||||
guard(mutex)(&mpctl->lock);
|
||||
|
||||
function = pinmux_generic_get_function(pctldev, func_selector);
|
||||
func = function->data;
|
||||
|
||||
mux_state_deselect(func->mux_state);
|
||||
}
|
||||
|
||||
static const struct pinmux_ops mux_pinmux_ops = {
|
||||
.get_functions_count = pinmux_generic_get_function_count,
|
||||
.get_function_name = pinmux_generic_get_function_name,
|
||||
.get_function_groups = pinmux_generic_get_function_groups,
|
||||
.set_mux = mux_pinmux_set_mux,
|
||||
.release_mux = mux_pinmux_release_mux,
|
||||
};
|
||||
|
||||
static int mux_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct mux_pinctrl *mpctl;
|
||||
struct pinctrl_desc *pctl_desc;
|
||||
int ret;
|
||||
|
||||
mpctl = devm_kzalloc(dev, sizeof(*mpctl), GFP_KERNEL);
|
||||
if (!mpctl)
|
||||
return -ENOMEM;
|
||||
|
||||
mpctl->dev = dev;
|
||||
|
||||
platform_set_drvdata(pdev, mpctl);
|
||||
|
||||
pctl_desc = devm_kzalloc(dev, sizeof(*pctl_desc), GFP_KERNEL);
|
||||
if (!pctl_desc)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = devm_mutex_init(dev, &mpctl->lock);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
pctl_desc->name = dev_name(dev);
|
||||
pctl_desc->owner = THIS_MODULE;
|
||||
pctl_desc->pctlops = &mux_pinctrl_ops;
|
||||
pctl_desc->pmxops = &mux_pinmux_ops;
|
||||
|
||||
ret = devm_pinctrl_register_and_init(dev, pctl_desc, mpctl,
|
||||
&mpctl->pctl);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Failed to register pinctrl.\n");
|
||||
|
||||
ret = pinctrl_enable(mpctl->pctl);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Failed to enable pinctrl.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id mux_pinctrl_of_match[] = {
|
||||
{ .compatible = "pinctrl-multiplexer" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, mux_pinctrl_of_match);
|
||||
|
||||
static struct platform_driver mux_pinctrl_driver = {
|
||||
.driver = {
|
||||
.name = "generic-pinctrl-mux",
|
||||
.of_match_table = mux_pinctrl_of_match,
|
||||
},
|
||||
.probe = mux_pinctrl_probe,
|
||||
};
|
||||
module_platform_driver(mux_pinctrl_driver);
|
||||
|
||||
MODULE_AUTHOR("Frank Li <Frank.Li@nxp.com>");
|
||||
MODULE_DESCRIPTION("Generic Pin Control Driver for Board-Level Mux Chips");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -17,29 +17,17 @@
|
||||
#include "pinctrl-utils.h"
|
||||
#include "pinmux.h"
|
||||
|
||||
static int pinctrl_generic_pins_function_dt_subnode_to_map(struct pinctrl_dev *pctldev,
|
||||
struct device_node *parent,
|
||||
struct device_node *np,
|
||||
struct pinctrl_map **maps,
|
||||
unsigned int *num_maps,
|
||||
unsigned int *num_reserved_maps,
|
||||
const char **group_names,
|
||||
unsigned int ngroups)
|
||||
int pinctrl_generic_to_map(struct pinctrl_dev *pctldev, struct device_node *parent,
|
||||
struct device_node *np, struct pinctrl_map **maps,
|
||||
unsigned int *num_maps, unsigned int *num_reserved_maps,
|
||||
const char **group_names, unsigned int ngroups,
|
||||
void *data, unsigned int *pins, unsigned int npins)
|
||||
{
|
||||
struct device *dev = pctldev->dev;
|
||||
const char **functions;
|
||||
unsigned int num_configs;
|
||||
const char *group_name;
|
||||
unsigned long *configs;
|
||||
unsigned int num_configs, pin, *pins;
|
||||
int npins, ret, reserve = 1;
|
||||
|
||||
npins = of_property_count_u32_elems(np, "pins");
|
||||
|
||||
if (npins < 1) {
|
||||
dev_err(dev, "invalid pinctrl group %pOFn.%pOFn %d\n",
|
||||
parent, np, npins);
|
||||
return npins;
|
||||
}
|
||||
int ret, reserve = 1;
|
||||
|
||||
group_name = devm_kasprintf(dev, GFP_KERNEL, "%pOFn.%pOFn", parent, np);
|
||||
if (!group_name)
|
||||
@@ -47,26 +35,6 @@ static int pinctrl_generic_pins_function_dt_subnode_to_map(struct pinctrl_dev *p
|
||||
|
||||
group_names[ngroups] = group_name;
|
||||
|
||||
pins = devm_kcalloc(dev, npins, sizeof(*pins), GFP_KERNEL);
|
||||
if (!pins)
|
||||
return -ENOMEM;
|
||||
|
||||
functions = devm_kcalloc(dev, npins, sizeof(*functions), GFP_KERNEL);
|
||||
if (!functions)
|
||||
return -ENOMEM;
|
||||
|
||||
for (int i = 0; i < npins; i++) {
|
||||
ret = of_property_read_u32_index(np, "pins", i, &pin);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
pins[i] = pin;
|
||||
|
||||
ret = of_property_read_string(np, "function", &functions[i]);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = pinctrl_utils_reserve_map(pctldev, maps, num_reserved_maps, num_maps, reserve);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -76,7 +44,7 @@ static int pinctrl_generic_pins_function_dt_subnode_to_map(struct pinctrl_dev *p
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = pinctrl_generic_add_group(pctldev, group_name, pins, npins, functions);
|
||||
ret = pinctrl_generic_add_group(pctldev, group_name, pins, npins, data);
|
||||
if (ret < 0)
|
||||
return dev_err_probe(dev, ret, "failed to add group %s: %d\n",
|
||||
group_name, ret);
|
||||
@@ -102,18 +70,113 @@ static int pinctrl_generic_pins_function_dt_subnode_to_map(struct pinctrl_dev *p
|
||||
|
||||
return 0;
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(pinctrl_generic_to_map);
|
||||
|
||||
/*
|
||||
* For platforms that do not define groups or functions in the driver, but
|
||||
* instead use the devicetree to describe them. This function will, unlike
|
||||
* pinconf_generic_dt_node_to_map() etc which rely on driver defined groups
|
||||
* and functions, create them in addition to parsing pinconf properties and
|
||||
* adding mappings.
|
||||
*/
|
||||
int pinctrl_generic_pins_function_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
struct device_node *np,
|
||||
struct pinctrl_map **maps,
|
||||
unsigned int *num_maps)
|
||||
static int pinctrl_generic_pins_function_dt_subnode_to_map(struct pinctrl_dev *pctldev,
|
||||
struct device_node *parent,
|
||||
struct device_node *np,
|
||||
struct pinctrl_map **maps,
|
||||
unsigned int *num_maps,
|
||||
unsigned int *num_reserved_maps,
|
||||
const char **group_names,
|
||||
unsigned int ngroups)
|
||||
{
|
||||
struct device *dev = pctldev->dev;
|
||||
unsigned int pin, *pins;
|
||||
const char **functions;
|
||||
int npins, ret;
|
||||
|
||||
npins = of_property_count_u32_elems(np, "pins");
|
||||
|
||||
if (npins < 1) {
|
||||
dev_err(dev, "invalid pinctrl group %pOFn.%pOFn %d\n",
|
||||
parent, np, npins);
|
||||
return npins;
|
||||
}
|
||||
|
||||
pins = devm_kcalloc(dev, npins, sizeof(*pins), GFP_KERNEL);
|
||||
if (!pins)
|
||||
return -ENOMEM;
|
||||
|
||||
functions = devm_kcalloc(dev, npins, sizeof(*functions), GFP_KERNEL);
|
||||
if (!functions)
|
||||
return -ENOMEM;
|
||||
|
||||
for (int i = 0; i < npins; i++) {
|
||||
ret = of_property_read_u32_index(np, "pins", i, &pin);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
pins[i] = pin;
|
||||
|
||||
ret = of_property_read_string(np, "function", &functions[i]);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return pinctrl_generic_to_map(pctldev, parent, np, maps, num_maps,
|
||||
num_reserved_maps, group_names, ngroups,
|
||||
functions, pins, npins);
|
||||
}
|
||||
|
||||
static int pinctrl_generic_pinmux_dt_subnode_to_map(struct pinctrl_dev *pctldev,
|
||||
struct device_node *parent,
|
||||
struct device_node *np,
|
||||
struct pinctrl_map **maps,
|
||||
unsigned int *num_maps,
|
||||
unsigned int *num_reserved_maps,
|
||||
const char **group_names,
|
||||
unsigned int ngroups)
|
||||
{
|
||||
struct device *dev = pctldev->dev;
|
||||
unsigned int *pins, *muxes;
|
||||
int npins, ret;
|
||||
|
||||
npins = of_property_count_u32_elems(np, "pinmux");
|
||||
|
||||
if (npins < 1) {
|
||||
dev_err(dev, "invalid pinctrl group %pOFn.%pOFn %d\n",
|
||||
parent, np, npins);
|
||||
return npins;
|
||||
}
|
||||
|
||||
pins = devm_kcalloc(dev, npins, sizeof(*pins), GFP_KERNEL);
|
||||
if (!pins)
|
||||
return -ENOMEM;
|
||||
|
||||
muxes = devm_kcalloc(dev, npins, sizeof(*muxes), GFP_KERNEL);
|
||||
if (!muxes)
|
||||
return -ENOMEM;
|
||||
|
||||
for (int i = 0; i < npins; i++) {
|
||||
unsigned int pinmux;
|
||||
|
||||
ret = of_property_read_u32_index(np, "pinmux", i, &pinmux);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
pins[i] = pinmux >> 16;
|
||||
muxes[i] = pinmux & GENMASK(15, 0);
|
||||
}
|
||||
|
||||
return pinctrl_generic_to_map(pctldev, parent, np, maps, num_maps,
|
||||
num_reserved_maps, group_names, ngroups,
|
||||
muxes, pins, npins);
|
||||
}
|
||||
|
||||
static int pinctrl_generic_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
struct device_node *np,
|
||||
struct pinctrl_map **maps,
|
||||
unsigned int *num_maps,
|
||||
int (dt_subnode_to_map)(
|
||||
struct pinctrl_dev *,
|
||||
struct device_node *,
|
||||
struct device_node *,
|
||||
struct pinctrl_map **,
|
||||
unsigned int *,
|
||||
unsigned int *,
|
||||
const char **,
|
||||
unsigned int))
|
||||
{
|
||||
struct device *dev = pctldev->dev;
|
||||
struct device_node *child_np;
|
||||
@@ -136,11 +199,8 @@ int pinctrl_generic_pins_function_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
if (!group_names)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = pinctrl_generic_pins_function_dt_subnode_to_map(pctldev, np, np,
|
||||
maps, num_maps,
|
||||
&num_reserved_maps,
|
||||
group_names,
|
||||
ngroups);
|
||||
ret = dt_subnode_to_map(pctldev, np, np, maps, num_maps,
|
||||
&num_reserved_maps, group_names, ngroups);
|
||||
if (ret) {
|
||||
pinctrl_utils_free_map(pctldev, *maps, *num_maps);
|
||||
return dev_err_probe(dev, ret, "error figuring out mappings for %s\n", np->name);
|
||||
@@ -164,11 +224,8 @@ parent:
|
||||
|
||||
ngroups = 0;
|
||||
for_each_available_child_of_node_scoped(np, child_np) {
|
||||
ret = pinctrl_generic_pins_function_dt_subnode_to_map(pctldev, np, child_np,
|
||||
maps, num_maps,
|
||||
&num_reserved_maps,
|
||||
group_names,
|
||||
ngroups);
|
||||
ret = dt_subnode_to_map(pctldev, np, child_np, maps, num_maps,
|
||||
&num_reserved_maps, group_names, ngroups);
|
||||
if (ret) {
|
||||
pinctrl_utils_free_map(pctldev, *maps, *num_maps);
|
||||
return dev_err_probe(dev, ret, "error figuring out mappings for %s\n",
|
||||
@@ -186,4 +243,40 @@ parent:
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* For platforms that do not define groups or functions in the driver, but
|
||||
* instead use the devicetree to describe them. This function will, unlike
|
||||
* pinconf_generic_dt_node_to_map() etc which rely on driver defined groups
|
||||
* and functions, create them in addition to parsing pinconf properties and
|
||||
* adding mappings.
|
||||
*/
|
||||
int pinctrl_generic_pins_function_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
struct device_node *np,
|
||||
struct pinctrl_map **maps,
|
||||
unsigned int *num_maps)
|
||||
{
|
||||
return pinctrl_generic_dt_node_to_map(pctldev, np, maps, num_maps,
|
||||
&pinctrl_generic_pins_function_dt_subnode_to_map);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pinctrl_generic_pins_function_dt_node_to_map);
|
||||
|
||||
/*
|
||||
* For platforms that do not define groups or functions in the driver, but
|
||||
* instead use the devicetree to describe them. This function will, unlike
|
||||
* pinconf_generic_dt_node_to_map() etc which rely on driver defined groups
|
||||
* and functions, create them in addition to parsing pinconf properties and
|
||||
* adding mappings.
|
||||
*
|
||||
* It assumes that the upper 16 bits of the pinmux items contain the pin
|
||||
* and the lower 16 the mux setting.
|
||||
*/
|
||||
int pinctrl_generic_pinmux_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
struct device_node *np,
|
||||
struct pinctrl_map **maps,
|
||||
unsigned int *num_maps)
|
||||
{
|
||||
return pinctrl_generic_dt_node_to_map(pctldev, np, maps, num_maps,
|
||||
&pinctrl_generic_pinmux_dt_subnode_to_map);
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(pinctrl_generic_pinmux_dt_node_to_map);
|
||||
|
||||
@@ -4334,7 +4334,8 @@ static int ingenic_pinconf_group_get(struct pinctrl_dev *pctldev,
|
||||
unsigned int group, unsigned long *config)
|
||||
{
|
||||
const unsigned int *pins;
|
||||
unsigned int i, npins, old = 0;
|
||||
unsigned int i, npins;
|
||||
unsigned long old = 0;
|
||||
int ret;
|
||||
|
||||
ret = pinctrl_generic_get_group_pins(pctldev, group, &pins, &npins);
|
||||
|
||||
@@ -645,9 +645,9 @@ static const struct dev_pm_ops max77620_pinctrl_pm_ops = {
|
||||
};
|
||||
|
||||
static const struct platform_device_id max77620_pinctrl_devtype[] = {
|
||||
{ .name = "max77620-pinctrl", },
|
||||
{ .name = "max20024-pinctrl", },
|
||||
{},
|
||||
{ .name = "max77620-pinctrl" },
|
||||
{ .name = "max20024-pinctrl" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, max77620_pinctrl_devtype);
|
||||
|
||||
|
||||
@@ -67,9 +67,9 @@ static const struct mcp23s08_info mcp23018_i2c = {
|
||||
};
|
||||
|
||||
static const struct i2c_device_id mcp230xx_id[] = {
|
||||
{ "mcp23008", (kernel_ulong_t)&mcp23008_i2c },
|
||||
{ "mcp23017", (kernel_ulong_t)&mcp23017_i2c },
|
||||
{ "mcp23018", (kernel_ulong_t)&mcp23018_i2c },
|
||||
{ .name = "mcp23008", .driver_data = (kernel_ulong_t)&mcp23008_i2c },
|
||||
{ .name = "mcp23017", .driver_data = (kernel_ulong_t)&mcp23017_i2c },
|
||||
{ .name = "mcp23018", .driver_data = (kernel_ulong_t)&mcp23018_i2c },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, mcp230xx_id);
|
||||
|
||||
@@ -5303,6 +5303,7 @@ static const struct of_device_id rockchip_pinctrl_dt_match[] = {
|
||||
.data = &rk3588_pin_ctrl },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, rockchip_pinctrl_dt_match);
|
||||
|
||||
static struct platform_driver rockchip_pinctrl_driver = {
|
||||
.probe = rockchip_pinctrl_probe,
|
||||
@@ -5329,4 +5330,3 @@ module_exit(rockchip_pinctrl_drv_unregister);
|
||||
MODULE_DESCRIPTION("ROCKCHIP Pin Controller Driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("platform:pinctrl-rockchip");
|
||||
MODULE_DEVICE_TABLE(of, rockchip_pinctrl_dt_match);
|
||||
|
||||
@@ -619,8 +619,9 @@ static int pcs_pinconf_set(struct pinctrl_dev *pctldev,
|
||||
static int pcs_pinconf_group_get(struct pinctrl_dev *pctldev,
|
||||
unsigned group, unsigned long *config)
|
||||
{
|
||||
unsigned long old = 0;
|
||||
const unsigned *pins;
|
||||
unsigned npins, old = 0;
|
||||
unsigned npins;
|
||||
int i, ret;
|
||||
|
||||
ret = pinctrl_generic_get_group_pins(pctldev, group, &pins, &npins);
|
||||
|
||||
@@ -839,16 +839,16 @@ static const struct pinconf_ops sx150x_pinconf_ops = {
|
||||
};
|
||||
|
||||
static const struct i2c_device_id sx150x_id[] = {
|
||||
{"sx1501q", (kernel_ulong_t) &sx1501q_device_data },
|
||||
{"sx1502q", (kernel_ulong_t) &sx1502q_device_data },
|
||||
{"sx1503q", (kernel_ulong_t) &sx1503q_device_data },
|
||||
{"sx1504q", (kernel_ulong_t) &sx1504q_device_data },
|
||||
{"sx1505q", (kernel_ulong_t) &sx1505q_device_data },
|
||||
{"sx1506q", (kernel_ulong_t) &sx1506q_device_data },
|
||||
{"sx1507q", (kernel_ulong_t) &sx1507q_device_data },
|
||||
{"sx1508q", (kernel_ulong_t) &sx1508q_device_data },
|
||||
{"sx1509q", (kernel_ulong_t) &sx1509q_device_data },
|
||||
{}
|
||||
{ .name = "sx1501q", .driver_data = (kernel_ulong_t)&sx1501q_device_data },
|
||||
{ .name = "sx1502q", .driver_data = (kernel_ulong_t)&sx1502q_device_data },
|
||||
{ .name = "sx1503q", .driver_data = (kernel_ulong_t)&sx1503q_device_data },
|
||||
{ .name = "sx1504q", .driver_data = (kernel_ulong_t)&sx1504q_device_data },
|
||||
{ .name = "sx1505q", .driver_data = (kernel_ulong_t)&sx1505q_device_data },
|
||||
{ .name = "sx1506q", .driver_data = (kernel_ulong_t)&sx1506q_device_data },
|
||||
{ .name = "sx1507q", .driver_data = (kernel_ulong_t)&sx1507q_device_data },
|
||||
{ .name = "sx1508q", .driver_data = (kernel_ulong_t)&sx1508q_device_data },
|
||||
{ .name = "sx1509q", .driver_data = (kernel_ulong_t)&sx1509q_device_data },
|
||||
{ }
|
||||
};
|
||||
|
||||
static const struct of_device_id sx150x_of_match[] = {
|
||||
|
||||
@@ -562,8 +562,8 @@ static int tps6594_pinctrl_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
static const struct platform_device_id tps6594_pinctrl_id_table[] = {
|
||||
{ "tps6594-pinctrl", },
|
||||
{}
|
||||
{ .name = "tps6594-pinctrl" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, tps6594_pinctrl_id_table);
|
||||
|
||||
|
||||
@@ -517,6 +517,7 @@ void pinmux_disable_setting(const struct pinctrl_setting *setting)
|
||||
{
|
||||
struct pinctrl_dev *pctldev = setting->pctldev;
|
||||
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
|
||||
const struct pinmux_ops *ops = pctldev->desc->pmxops;
|
||||
int ret = 0;
|
||||
const unsigned int *pins = NULL;
|
||||
unsigned int num_pins = 0;
|
||||
@@ -563,6 +564,10 @@ void pinmux_disable_setting(const struct pinctrl_setting *setting)
|
||||
pins[i], desc->name, gname);
|
||||
}
|
||||
}
|
||||
|
||||
if (ops->release_mux)
|
||||
ops->release_mux(pctldev, setting->data.mux.func,
|
||||
setting->data.mux.group);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
|
||||
@@ -6,6 +6,7 @@ config PINCTRL_MSM
|
||||
depends on GPIOLIB
|
||||
# OF for pinconf_generic_dt_node_to_map_group() from GENERIC_PINCONF
|
||||
depends on OF
|
||||
default ARCH_QCOM
|
||||
select QCOM_SCM
|
||||
select PINMUX
|
||||
select GENERIC_PINMUX_FUNCTIONS
|
||||
@@ -49,11 +50,12 @@ config PINCTRL_QCOM_SSBI_PMIC
|
||||
devices are pm8058 and pm8921.
|
||||
|
||||
config PINCTRL_LPASS_LPI
|
||||
tristate "Qualcomm Technologies Inc LPASS LPI pin controller driver"
|
||||
tristate "Qualcomm LPASS LPI pin controller driver"
|
||||
select PINMUX
|
||||
select PINCONF
|
||||
select GENERIC_PINCONF
|
||||
select GENERIC_PINCTRL_GROUPS
|
||||
depends on PM_CLK
|
||||
depends on GPIOLIB
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
@@ -61,7 +63,7 @@ config PINCTRL_LPASS_LPI
|
||||
(Low Power Island) found on the Qualcomm Technologies Inc SoCs.
|
||||
|
||||
config PINCTRL_MILOS_LPASS_LPI
|
||||
tristate "Qualcomm Technologies Inc Milos LPASS LPI pin controller driver"
|
||||
tristate "Qualcomm Milos LPASS LPI pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
depends on PINCTRL_LPASS_LPI
|
||||
help
|
||||
@@ -71,7 +73,7 @@ config PINCTRL_MILOS_LPASS_LPI
|
||||
platform.
|
||||
|
||||
config PINCTRL_SC7280_LPASS_LPI
|
||||
tristate "Qualcomm Technologies Inc SC7280 and SM8350 LPASS LPI pin controller driver"
|
||||
tristate "Qualcomm SC7280 and SM8350 LPASS LPI pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
depends on PINCTRL_LPASS_LPI
|
||||
help
|
||||
@@ -81,7 +83,7 @@ config PINCTRL_SC7280_LPASS_LPI
|
||||
and SM8350 platforms.
|
||||
|
||||
config PINCTRL_SDM660_LPASS_LPI
|
||||
tristate "Qualcomm Technologies Inc SDM660 LPASS LPI pin controller driver"
|
||||
tristate "Qualcomm SDM660 LPASS LPI pin controller driver"
|
||||
depends on GPIOLIB
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
depends on PINCTRL_LPASS_LPI
|
||||
@@ -91,7 +93,7 @@ config PINCTRL_SDM660_LPASS_LPI
|
||||
(Low Power Island) found on the Qualcomm Technologies Inc SDM660 platform.
|
||||
|
||||
config PINCTRL_SM4250_LPASS_LPI
|
||||
tristate "Qualcomm Technologies Inc SM4250 LPASS LPI pin controller driver"
|
||||
tristate "Qualcomm SM4250 LPASS LPI pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
depends on PINCTRL_LPASS_LPI
|
||||
help
|
||||
@@ -100,7 +102,7 @@ config PINCTRL_SM4250_LPASS_LPI
|
||||
(Low Power Island) found on the Qualcomm Technologies Inc SM4250 platform.
|
||||
|
||||
config PINCTRL_SDM670_LPASS_LPI
|
||||
tristate "Qualcomm Technologies Inc SDM670 LPASS LPI pin controller driver"
|
||||
tristate "Qualcomm SDM670 LPASS LPI pin controller driver"
|
||||
depends on GPIOLIB
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
depends on PINCTRL_LPASS_LPI
|
||||
@@ -110,7 +112,7 @@ config PINCTRL_SDM670_LPASS_LPI
|
||||
(Low Power Island) found on the Qualcomm Technologies Inc SDM670 platform.
|
||||
|
||||
config PINCTRL_SM6115_LPASS_LPI
|
||||
tristate "Qualcomm Technologies Inc SM6115 LPASS LPI pin controller driver"
|
||||
tristate "Qualcomm SM6115 LPASS LPI pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
depends on PINCTRL_LPASS_LPI
|
||||
help
|
||||
@@ -118,8 +120,17 @@ config PINCTRL_SM6115_LPASS_LPI
|
||||
Qualcomm Technologies Inc LPASS (Low Power Audio SubSystem) LPI
|
||||
(Low Power Island) found on the Qualcomm Technologies Inc SM6115 platform.
|
||||
|
||||
config PINCTRL_SM6350_LPASS_LPI
|
||||
tristate "Qualcomm SM6350 LPASS LPI pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
depends on PINCTRL_LPASS_LPI
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc LPASS (Low Power Audio SubSystem) LPI
|
||||
(Low Power Island) found on the Qualcomm Technologies Inc SM6350 platform.
|
||||
|
||||
config PINCTRL_SM8250_LPASS_LPI
|
||||
tristate "Qualcomm Technologies Inc SM8250 LPASS LPI pin controller driver"
|
||||
tristate "Qualcomm SM8250 LPASS LPI pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
depends on PINCTRL_LPASS_LPI
|
||||
help
|
||||
@@ -128,7 +139,7 @@ config PINCTRL_SM8250_LPASS_LPI
|
||||
(Low Power Island) found on the Qualcomm Technologies Inc SM8250 platform.
|
||||
|
||||
config PINCTRL_SM8450_LPASS_LPI
|
||||
tristate "Qualcomm Technologies Inc SM8450 LPASS LPI pin controller driver"
|
||||
tristate "Qualcomm SM8450 LPASS LPI pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
depends on PINCTRL_LPASS_LPI
|
||||
help
|
||||
@@ -137,7 +148,7 @@ config PINCTRL_SM8450_LPASS_LPI
|
||||
(Low Power Island) found on the Qualcomm Technologies Inc SM8450 platform.
|
||||
|
||||
config PINCTRL_SC8280XP_LPASS_LPI
|
||||
tristate "Qualcomm Technologies Inc SC8280XP LPASS LPI pin controller driver"
|
||||
tristate "Qualcomm SC8280XP LPASS LPI pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
depends on PINCTRL_LPASS_LPI
|
||||
help
|
||||
@@ -146,7 +157,7 @@ config PINCTRL_SC8280XP_LPASS_LPI
|
||||
(Low Power Island) found on the Qualcomm Technologies Inc SC8280XP platform.
|
||||
|
||||
config PINCTRL_SM8550_LPASS_LPI
|
||||
tristate "Qualcomm Technologies Inc SM8550 LPASS LPI pin controller driver"
|
||||
tristate "Qualcomm SM8550 LPASS LPI pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
depends on PINCTRL_LPASS_LPI
|
||||
help
|
||||
@@ -156,7 +167,7 @@ config PINCTRL_SM8550_LPASS_LPI
|
||||
platform.
|
||||
|
||||
config PINCTRL_SM8650_LPASS_LPI
|
||||
tristate "Qualcomm Technologies Inc SM8650 LPASS LPI pin controller driver"
|
||||
tristate "Qualcomm SM8650 LPASS LPI pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
depends on PINCTRL_LPASS_LPI
|
||||
help
|
||||
|
||||
@@ -4,6 +4,7 @@ if PINCTRL_MSM
|
||||
config PINCTRL_APQ8064
|
||||
tristate "Qualcomm APQ8064 pin controller driver"
|
||||
depends on ARM || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm APQ8064 platform.
|
||||
@@ -11,13 +12,15 @@ config PINCTRL_APQ8064
|
||||
config PINCTRL_APQ8084
|
||||
tristate "Qualcomm APQ8084 pin controller driver"
|
||||
depends on ARM || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm APQ8084 platform.
|
||||
|
||||
config PINCTRL_ELIZA
|
||||
tristate "Qualcomm Technologies Inc Eliza pin controller driver"
|
||||
tristate "Qualcomm Eliza pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc Top Level Mode Multiplexer block (TLMM)
|
||||
@@ -26,8 +29,9 @@ config PINCTRL_ELIZA
|
||||
If unsure, say N.
|
||||
|
||||
config PINCTRL_GLYMUR
|
||||
tristate "Qualcomm Technologies Inc Glymur pin controller driver"
|
||||
tristate "Qualcomm Glymur pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc Top Level Mode Multiplexer block (TLMM)
|
||||
@@ -36,8 +40,9 @@ config PINCTRL_GLYMUR
|
||||
If unsure, say N.
|
||||
|
||||
config PINCTRL_HAWI
|
||||
tristate "Qualcomm Technologies Inc Hawi pin controller driver"
|
||||
tristate "Qualcomm Hawi pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc Top Level Mode Multiplexer block (TLMM)
|
||||
@@ -48,13 +53,15 @@ config PINCTRL_HAWI
|
||||
config PINCTRL_IPQ4019
|
||||
tristate "Qualcomm IPQ4019 pin controller driver"
|
||||
depends on ARM || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm IPQ4019 platform.
|
||||
|
||||
config PINCTRL_IPQ5018
|
||||
tristate "Qualcomm Technologies, Inc. IPQ5018 pin controller driver"
|
||||
tristate "Qualcomm IPQ5018 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for
|
||||
the Qualcomm Technologies Inc. TLMM block found on the
|
||||
@@ -64,29 +71,33 @@ config PINCTRL_IPQ5018
|
||||
config PINCTRL_IPQ8064
|
||||
tristate "Qualcomm IPQ8064 pin controller driver"
|
||||
depends on ARM || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm IPQ8064 platform.
|
||||
|
||||
config PINCTRL_IPQ5210
|
||||
tristate "Qualcomm Technologies Inc IPQ5210 pin controller driver"
|
||||
tristate "Qualcomm IPQ5210 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc IPQ5210 platform.
|
||||
|
||||
config PINCTRL_IPQ5332
|
||||
tristate "Qualcomm Technologies Inc IPQ5332 pin controller driver"
|
||||
tristate "Qualcomm IPQ5332 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc IPQ5332 platform.
|
||||
|
||||
config PINCTRL_IPQ5424
|
||||
tristate "Qualcomm Technologies, Inc. IPQ5424 pin controller driver"
|
||||
tristate "Qualcomm IPQ5424 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for
|
||||
the Qualcomm Technologies Inc. TLMM block found on the
|
||||
@@ -94,8 +105,9 @@ config PINCTRL_IPQ5424
|
||||
IPQ5424.
|
||||
|
||||
config PINCTRL_IPQ8074
|
||||
tristate "Qualcomm Technologies, Inc. IPQ8074 pin controller driver"
|
||||
tristate "Qualcomm IPQ8074 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for
|
||||
the Qualcomm Technologies Inc. TLMM block found on the
|
||||
@@ -103,8 +115,9 @@ config PINCTRL_IPQ8074
|
||||
IPQ8074.
|
||||
|
||||
config PINCTRL_IPQ6018
|
||||
tristate "Qualcomm Technologies, Inc. IPQ6018 pin controller driver"
|
||||
tristate "Qualcomm IPQ6018 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for
|
||||
the Qualcomm Technologies Inc. TLMM block found on the
|
||||
@@ -112,17 +125,29 @@ config PINCTRL_IPQ6018
|
||||
IPQ6018.
|
||||
|
||||
config PINCTRL_IPQ9574
|
||||
tristate "Qualcomm Technologies, Inc. IPQ9574 pin controller driver"
|
||||
tristate "Qualcomm IPQ9574 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for
|
||||
the Qualcomm Technologies Inc. TLMM block found on the
|
||||
Qualcomm Technologies Inc. IPQ9574 platform. Select this for
|
||||
IPQ9574.
|
||||
|
||||
config PINCTRL_KAANAPALI
|
||||
tristate "Qualcomm Technologies Inc Kaanapali pin controller driver"
|
||||
config PINCTRL_IPQ9650
|
||||
tristate "Qualcomm IPQ9650 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for
|
||||
the Qualcomm Technologies Inc. TLMM block found on the
|
||||
Qualcomm Technologies Inc. IPQ9650 platform. Select this for
|
||||
IPQ9650.
|
||||
|
||||
config PINCTRL_KAANAPALI
|
||||
tristate "Qualcomm Kaanapali pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
@@ -131,6 +156,7 @@ config PINCTRL_KAANAPALI
|
||||
config PINCTRL_MSM8226
|
||||
tristate "Qualcomm 8226 pin controller driver"
|
||||
depends on ARM || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
@@ -139,6 +165,7 @@ config PINCTRL_MSM8226
|
||||
config PINCTRL_MSM8660
|
||||
tristate "Qualcomm 8660 pin controller driver"
|
||||
depends on ARM || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm 8660 platform.
|
||||
@@ -146,12 +173,14 @@ config PINCTRL_MSM8660
|
||||
config PINCTRL_MSM8960
|
||||
tristate "Qualcomm 8960 pin controller driver"
|
||||
depends on ARM || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm 8960 platform.
|
||||
|
||||
config PINCTRL_MDM9607
|
||||
tristate "Qualcomm 9607 pin controller driver"
|
||||
default ARCH_QCOM if ARM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm 9607 platform.
|
||||
@@ -159,6 +188,7 @@ config PINCTRL_MDM9607
|
||||
config PINCTRL_MDM9615
|
||||
tristate "Qualcomm 9615 pin controller driver"
|
||||
depends on ARM || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm 9615 platform.
|
||||
@@ -166,6 +196,7 @@ config PINCTRL_MDM9615
|
||||
config PINCTRL_MSM8X74
|
||||
tristate "Qualcomm 8x74 pin controller driver"
|
||||
depends on ARM || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm 8974 platform.
|
||||
@@ -173,12 +204,14 @@ config PINCTRL_MSM8X74
|
||||
config PINCTRL_MSM8909
|
||||
tristate "Qualcomm 8909 pin controller driver"
|
||||
depends on ARM || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found on the Qualcomm MSM8909 platform.
|
||||
|
||||
config PINCTRL_MSM8916
|
||||
tristate "Qualcomm 8916 pin controller driver"
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found on the Qualcomm 8916 platform.
|
||||
@@ -192,6 +225,7 @@ config PINCTRL_MSM8917
|
||||
config PINCTRL_MSM8953
|
||||
tristate "Qualcomm 8953 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found on the Qualcomm MSM8953 platform.
|
||||
@@ -201,6 +235,7 @@ config PINCTRL_MSM8953
|
||||
config PINCTRL_MSM8976
|
||||
tristate "Qualcomm 8976 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found on the Qualcomm MSM8976 platform.
|
||||
@@ -210,6 +245,7 @@ config PINCTRL_MSM8976
|
||||
config PINCTRL_MSM8994
|
||||
tristate "Qualcomm 8994 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm 8994 platform. The
|
||||
@@ -218,6 +254,7 @@ config PINCTRL_MSM8994
|
||||
config PINCTRL_MSM8996
|
||||
tristate "Qualcomm MSM8996 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm MSM8996 platform.
|
||||
@@ -225,13 +262,23 @@ config PINCTRL_MSM8996
|
||||
config PINCTRL_MSM8998
|
||||
tristate "Qualcomm MSM8998 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm MSM8998 platform.
|
||||
|
||||
config PINCTRL_NORD
|
||||
tristate "Qualcomm Nord pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux and pinconf driver for the Qualcomm
|
||||
TLMM block found on the Qualcomm NORD platforms.
|
||||
|
||||
config PINCTRL_QCM2290
|
||||
tristate "Qualcomm QCM2290 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
TLMM block found in the Qualcomm QCM2290 platform.
|
||||
@@ -239,48 +286,54 @@ config PINCTRL_QCM2290
|
||||
config PINCTRL_QCS404
|
||||
tristate "Qualcomm QCS404 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
TLMM block found in the Qualcomm QCS404 platform.
|
||||
|
||||
config PINCTRL_QCS615
|
||||
tristate "Qualcomm Technologies QCS615 pin controller driver"
|
||||
tristate "Qualcomm QCS615 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
TLMM block found on the Qualcomm QCS615 platform.
|
||||
|
||||
config PINCTRL_QCS8300
|
||||
tristate "Qualcomm Technologies QCS8300 pin controller driver"
|
||||
tristate "Qualcomm QCS8300 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux and pinconf driver for the Qualcomm
|
||||
TLMM block found on the Qualcomm QCS8300 platform.
|
||||
|
||||
config PINCTRL_QDF2XXX
|
||||
tristate "Qualcomm Technologies QDF2xxx pin controller driver"
|
||||
tristate "Qualcomm QDF2xxx pin controller driver"
|
||||
depends on ACPI
|
||||
default ARCH_QCOM if ARM64
|
||||
help
|
||||
This is the GPIO driver for the TLMM block found on the
|
||||
Qualcomm Technologies QDF2xxx SOCs.
|
||||
|
||||
config PINCTRL_QDU1000
|
||||
tristate "Qualcomm Technologies Inc QDU1000/QRU1000 pin controller driver"
|
||||
tristate "Qualcomm QDU1000/QRU1000 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf, and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc QDU1000 and QRU1000 platforms.
|
||||
|
||||
config PINCTRL_SA8775P
|
||||
tristate "Qualcomm Technologies Inc SA8775P pin controller driver"
|
||||
tristate "Qualcomm SA8775P pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux and pinconf driver for the Qualcomm
|
||||
TLMM block found on the Qualcomm SA8775P platforms.
|
||||
|
||||
config PINCTRL_SAR2130P
|
||||
tristate "Qualcomm Technologies Inc SAR2130P pin controller driver"
|
||||
tristate "Qualcomm SAR2130P pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
@@ -288,202 +341,238 @@ config PINCTRL_SAR2130P
|
||||
Technologies Inc SAR2130P platform.
|
||||
|
||||
config PINCTRL_SC7180
|
||||
tristate "Qualcomm Technologies Inc SC7180 pin controller driver"
|
||||
tristate "Qualcomm SC7180 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SC7180 platform.
|
||||
|
||||
config PINCTRL_SC7280
|
||||
tristate "Qualcomm Technologies Inc SC7280 pin controller driver"
|
||||
tristate "Qualcomm SC7280 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SC7280 platform.
|
||||
|
||||
config PINCTRL_SC8180X
|
||||
tristate "Qualcomm Technologies Inc SC8180x pin controller driver"
|
||||
tristate "Qualcomm SC8180x pin controller driver"
|
||||
depends on (OF || ACPI)
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SC8180x platform.
|
||||
|
||||
config PINCTRL_SC8280XP
|
||||
tristate "Qualcomm Technologies Inc SC8280xp pin controller driver"
|
||||
tristate "Qualcomm SC8280xp pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SC8280xp platform.
|
||||
|
||||
config PINCTRL_SDM660
|
||||
tristate "Qualcomm Technologies Inc SDM660 pin controller driver"
|
||||
tristate "Qualcomm SDM660 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SDM660 platform.
|
||||
|
||||
config PINCTRL_SDM670
|
||||
tristate "Qualcomm Technologies Inc SDM670 pin controller driver"
|
||||
tristate "Qualcomm SDM670 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SDM670 platform.
|
||||
|
||||
config PINCTRL_SDM845
|
||||
tristate "Qualcomm Technologies Inc SDM845 pin controller driver"
|
||||
tristate "Qualcomm SDM845 pin controller driver"
|
||||
depends on (OF || ACPI)
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SDM845 platform.
|
||||
|
||||
config PINCTRL_SDX55
|
||||
tristate "Qualcomm Technologies Inc SDX55 pin controller driver"
|
||||
tristate "Qualcomm SDX55 pin controller driver"
|
||||
depends on ARM || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SDX55 platform.
|
||||
|
||||
config PINCTRL_SDX65
|
||||
tristate "Qualcomm Technologies Inc SDX65 pin controller driver"
|
||||
tristate "Qualcomm SDX65 pin controller driver"
|
||||
depends on ARM || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SDX65 platform.
|
||||
|
||||
config PINCTRL_SDX75
|
||||
tristate "Qualcomm Technologies Inc SDX75 pin controller driver"
|
||||
tristate "Qualcomm SDX75 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SDX75 platform.
|
||||
|
||||
config PINCTRL_SM4450
|
||||
tristate "Qualcomm Technologies Inc SM4450 pin controller driver"
|
||||
config PINCTRL_SHIKRA
|
||||
tristate "Qualcomm Shikra pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc Top Level Mode Multiplexer block (TLMM)
|
||||
found on the Qualcomm Technologies Inc Shikra platform.
|
||||
Say Y here to compile statically, or M here to compile it as a module.
|
||||
If unsure, say N.
|
||||
|
||||
config PINCTRL_SM4450
|
||||
tristate "Qualcomm SM4450 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM4450 platform.
|
||||
|
||||
config PINCTRL_SM6115
|
||||
tristate "Qualcomm Technologies Inc SM6115,SM4250 pin controller driver"
|
||||
tristate "Qualcomm SM6115,SM4250 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM6115 and SM4250 platforms.
|
||||
|
||||
config PINCTRL_SM6125
|
||||
tristate "Qualcomm Technologies Inc SM6125 pin controller driver"
|
||||
tristate "Qualcomm SM6125 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM6125 platform.
|
||||
|
||||
config PINCTRL_SM6350
|
||||
tristate "Qualcomm Technologies Inc SM6350 pin controller driver"
|
||||
tristate "Qualcomm SM6350 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM6350 platform.
|
||||
|
||||
config PINCTRL_SM6375
|
||||
tristate "Qualcomm Technologies Inc SM6375 pin controller driver"
|
||||
tristate "Qualcomm SM6375 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM6375 platform.
|
||||
|
||||
config PINCTRL_SM7150
|
||||
tristate "Qualcomm Technologies Inc SM7150 pin controller driver"
|
||||
tristate "Qualcomm SM7150 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM7150 platform.
|
||||
|
||||
config PINCTRL_MILOS
|
||||
tristate "Qualcomm Technologies Inc Milos pin controller driver"
|
||||
tristate "Qualcomm Milos pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc Milos platform.
|
||||
|
||||
config PINCTRL_SM8150
|
||||
tristate "Qualcomm Technologies Inc SM8150 pin controller driver"
|
||||
tristate "Qualcomm SM8150 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM8150 platform.
|
||||
|
||||
config PINCTRL_SM8250
|
||||
tristate "Qualcomm Technologies Inc SM8250 pin controller driver"
|
||||
tristate "Qualcomm SM8250 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM8250 platform.
|
||||
|
||||
config PINCTRL_SM8350
|
||||
tristate "Qualcomm Technologies Inc SM8350 pin controller driver"
|
||||
tristate "Qualcomm SM8350 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM8350 platform.
|
||||
|
||||
config PINCTRL_SM8450
|
||||
tristate "Qualcomm Technologies Inc SM8450 pin controller driver"
|
||||
tristate "Qualcomm SM8450 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM8450 platform.
|
||||
|
||||
config PINCTRL_SM8550
|
||||
tristate "Qualcomm Technologies Inc SM8550 pin controller driver"
|
||||
tristate "Qualcomm SM8550 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM8550 platform.
|
||||
|
||||
config PINCTRL_SM8650
|
||||
tristate "Qualcomm Technologies Inc SM8650 pin controller driver"
|
||||
tristate "Qualcomm SM8650 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM8650 platform.
|
||||
|
||||
config PINCTRL_SM8750
|
||||
tristate "Qualcomm Technologies Inc SM8750 pin controller driver"
|
||||
tristate "Qualcomm SM8750 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc TLMM block found on the Qualcomm
|
||||
Technologies Inc SM8750 platform.
|
||||
|
||||
config PINCTRL_X1E80100
|
||||
tristate "Qualcomm Technologies Inc X1E80100 pin controller driver"
|
||||
tristate "Qualcomm X1E80100 pin controller driver"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm Technologies Inc Top Level Mode Multiplexer block (TLMM)
|
||||
|
||||
@@ -15,6 +15,7 @@ obj-$(CONFIG_PINCTRL_IPQ5424) += pinctrl-ipq5424.o
|
||||
obj-$(CONFIG_PINCTRL_IPQ8074) += pinctrl-ipq8074.o
|
||||
obj-$(CONFIG_PINCTRL_IPQ6018) += pinctrl-ipq6018.o
|
||||
obj-$(CONFIG_PINCTRL_IPQ9574) += pinctrl-ipq9574.o
|
||||
obj-$(CONFIG_PINCTRL_IPQ9650) += pinctrl-ipq9650.o
|
||||
obj-$(CONFIG_PINCTRL_KAANAPALI) += pinctrl-kaanapali.o
|
||||
obj-$(CONFIG_PINCTRL_MSM8226) += pinctrl-msm8226.o
|
||||
obj-$(CONFIG_PINCTRL_MSM8660) += pinctrl-msm8660.o
|
||||
@@ -37,6 +38,7 @@ obj-$(CONFIG_PINCTRL_MDM9607) += pinctrl-mdm9607.o
|
||||
obj-$(CONFIG_PINCTRL_MDM9615) += pinctrl-mdm9615.o
|
||||
obj-$(CONFIG_PINCTRL_MILOS) += pinctrl-milos.o
|
||||
obj-$(CONFIG_PINCTRL_MILOS_LPASS_LPI) += pinctrl-milos-lpass-lpi.o
|
||||
obj-$(CONFIG_PINCTRL_NORD) += pinctrl-nord.o
|
||||
obj-$(CONFIG_PINCTRL_QCOM_SPMI_PMIC) += pinctrl-spmi-gpio.o
|
||||
obj-$(CONFIG_PINCTRL_QCOM_SPMI_PMIC) += pinctrl-spmi-mpp.o
|
||||
obj-$(CONFIG_PINCTRL_QCOM_SSBI_PMIC) += pinctrl-ssbi-gpio.o
|
||||
@@ -57,12 +59,14 @@ obj-$(CONFIG_PINCTRL_SDM845) += pinctrl-sdm845.o
|
||||
obj-$(CONFIG_PINCTRL_SDX55) += pinctrl-sdx55.o
|
||||
obj-$(CONFIG_PINCTRL_SDX65) += pinctrl-sdx65.o
|
||||
obj-$(CONFIG_PINCTRL_SDX75) += pinctrl-sdx75.o
|
||||
obj-$(CONFIG_PINCTRL_SHIKRA) += pinctrl-shikra.o
|
||||
obj-$(CONFIG_PINCTRL_SM4250_LPASS_LPI) += pinctrl-sm4250-lpass-lpi.o
|
||||
obj-$(CONFIG_PINCTRL_SM4450) += pinctrl-sm4450.o
|
||||
obj-$(CONFIG_PINCTRL_SM6115) += pinctrl-sm6115.o
|
||||
obj-$(CONFIG_PINCTRL_SM6115_LPASS_LPI) += pinctrl-sm6115-lpass-lpi.o
|
||||
obj-$(CONFIG_PINCTRL_SM6125) += pinctrl-sm6125.o
|
||||
obj-$(CONFIG_PINCTRL_SM6350) += pinctrl-sm6350.o
|
||||
obj-$(CONFIG_PINCTRL_SM6350_LPASS_LPI) += pinctrl-sm6350-lpass-lpi.o
|
||||
obj-$(CONFIG_PINCTRL_SM6375) += pinctrl-sm6375.o
|
||||
obj-$(CONFIG_PINCTRL_SM7150) += pinctrl-sm7150.o
|
||||
obj-$(CONFIG_PINCTRL_SM8150) += pinctrl-sm8150.o
|
||||
|
||||
@@ -622,6 +622,7 @@ static const struct of_device_id apq8064_pinctrl_of_match[] = {
|
||||
{ .compatible = "qcom,apq8064-pinctrl", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, apq8064_pinctrl_of_match);
|
||||
|
||||
static struct platform_driver apq8064_pinctrl_driver = {
|
||||
.driver = {
|
||||
@@ -646,4 +647,3 @@ module_exit(apq8064_pinctrl_exit);
|
||||
MODULE_AUTHOR("Bjorn Andersson <bjorn.andersson@sonymobile.com>");
|
||||
MODULE_DESCRIPTION("Qualcomm APQ8064 pinctrl driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DEVICE_TABLE(of, apq8064_pinctrl_of_match);
|
||||
|
||||
@@ -1198,6 +1198,7 @@ static const struct of_device_id apq8084_pinctrl_of_match[] = {
|
||||
{ .compatible = "qcom,apq8084-pinctrl", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, apq8084_pinctrl_of_match);
|
||||
|
||||
static struct platform_driver apq8084_pinctrl_driver = {
|
||||
.driver = {
|
||||
@@ -1221,4 +1222,3 @@ module_exit(apq8084_pinctrl_exit);
|
||||
|
||||
MODULE_DESCRIPTION("Qualcomm APQ8084 pinctrl driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DEVICE_TABLE(of, apq8084_pinctrl_of_match);
|
||||
|
||||
@@ -54,30 +54,6 @@
|
||||
.intr_detection_width = 2, \
|
||||
}
|
||||
|
||||
#define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv) \
|
||||
{ \
|
||||
.grp = PINCTRL_PINGROUP(#pg_name, \
|
||||
pg_name##_pins, \
|
||||
ARRAY_SIZE(pg_name##_pins)), \
|
||||
.ctl_reg = ctl, \
|
||||
.io_reg = 0, \
|
||||
.intr_cfg_reg = 0, \
|
||||
.intr_status_reg = 0, \
|
||||
.mux_bit = -1, \
|
||||
.pull_bit = pull, \
|
||||
.drv_bit = drv, \
|
||||
.oe_bit = -1, \
|
||||
.in_bit = -1, \
|
||||
.out_bit = -1, \
|
||||
.intr_enable_bit = -1, \
|
||||
.intr_status_bit = -1, \
|
||||
.intr_target_bit = -1, \
|
||||
.intr_raw_status_bit = -1, \
|
||||
.intr_polarity_bit = -1, \
|
||||
.intr_detection_bit = -1, \
|
||||
.intr_detection_width = -1, \
|
||||
}
|
||||
|
||||
#define UFS_RESET(pg_name, ctl, io) \
|
||||
{ \
|
||||
.grp = PINCTRL_PINGROUP(#pg_name, \
|
||||
@@ -563,15 +539,32 @@ enum eliza_functions {
|
||||
msm_mux_qup1_se0,
|
||||
msm_mux_qup1_se1,
|
||||
msm_mux_qup1_se2,
|
||||
msm_mux_qup1_se2_l2_mira,
|
||||
msm_mux_qup1_se2_l2_mirb,
|
||||
msm_mux_qup1_se2_l3_mira,
|
||||
msm_mux_qup1_se2_l3_mirb,
|
||||
msm_mux_qup1_se3,
|
||||
msm_mux_qup1_se4,
|
||||
msm_mux_qup1_se4_01,
|
||||
msm_mux_qup1_se4_23,
|
||||
msm_mux_qup1_se5,
|
||||
msm_mux_qup1_se6,
|
||||
msm_mux_qup1_se6_l1_mira,
|
||||
msm_mux_qup1_se6_l1_mirb,
|
||||
msm_mux_qup1_se6_l3_mira,
|
||||
msm_mux_qup1_se6_l3_mirb,
|
||||
msm_mux_qup1_se7,
|
||||
msm_mux_qup1_se7_l0_mira,
|
||||
msm_mux_qup1_se7_l0_mirb,
|
||||
msm_mux_qup1_se7_l1_mira,
|
||||
msm_mux_qup1_se7_l1_mirb,
|
||||
msm_mux_qup2_se0,
|
||||
msm_mux_qup2_se1,
|
||||
msm_mux_qup2_se2,
|
||||
msm_mux_qup2_se3,
|
||||
msm_mux_qup2_se3_l0_mira,
|
||||
msm_mux_qup2_se3_l0_mirb,
|
||||
msm_mux_qup2_se3_l1_mira,
|
||||
msm_mux_qup2_se3_l1_mirb,
|
||||
msm_mux_qup2_se4,
|
||||
msm_mux_qup2_se5,
|
||||
msm_mux_qup2_se6,
|
||||
@@ -978,15 +971,35 @@ static const char *const qup1_se1_groups[] = {
|
||||
};
|
||||
|
||||
static const char *const qup1_se2_groups[] = {
|
||||
"gpio52", "gpio53", "gpio54", "gpio52", "gpio55", "gpio53", "gpio40", "gpio42", "gpio30",
|
||||
"gpio52", "gpio53", "gpio40", "gpio42", "gpio30",
|
||||
};
|
||||
|
||||
static const char *const qup1_se2_l2_mira_groups[] = {
|
||||
"gpio54",
|
||||
};
|
||||
|
||||
static const char *const qup1_se2_l2_mirb_groups[] = {
|
||||
"gpio52",
|
||||
};
|
||||
|
||||
static const char *const qup1_se2_l3_mira_groups[] = {
|
||||
"gpio55",
|
||||
};
|
||||
|
||||
static const char *const qup1_se2_l3_mirb_groups[] = {
|
||||
"gpio53",
|
||||
};
|
||||
|
||||
static const char *const qup1_se3_groups[] = {
|
||||
"gpio44", "gpio45", "gpio46", "gpio47",
|
||||
};
|
||||
|
||||
static const char *const qup1_se4_groups[] = {
|
||||
"gpio36", "gpio37", "gpio37", "gpio36",
|
||||
static const char *const qup1_se4_01_groups[] = {
|
||||
"gpio36", "gpio37",
|
||||
};
|
||||
|
||||
static const char *const qup1_se4_23_groups[] = {
|
||||
"gpio36", "gpio37",
|
||||
};
|
||||
|
||||
static const char *const qup1_se5_groups[] = {
|
||||
@@ -994,11 +1007,43 @@ static const char *const qup1_se5_groups[] = {
|
||||
};
|
||||
|
||||
static const char *const qup1_se6_groups[] = {
|
||||
"gpio40", "gpio42", "gpio54", "gpio42", "gpio40", "gpio55",
|
||||
"gpio40", "gpio42",
|
||||
};
|
||||
|
||||
static const char *const qup1_se6_l1_mira_groups[] = {
|
||||
"gpio42",
|
||||
};
|
||||
|
||||
static const char *const qup1_se6_l1_mirb_groups[] = {
|
||||
"gpio54",
|
||||
};
|
||||
|
||||
static const char *const qup1_se6_l3_mira_groups[] = {
|
||||
"gpio40",
|
||||
};
|
||||
|
||||
static const char *const qup1_se6_l3_mirb_groups[] = {
|
||||
"gpio55",
|
||||
};
|
||||
|
||||
static const char *const qup1_se7_groups[] = {
|
||||
"gpio81", "gpio78", "gpio80", "gpio114", "gpio114", "gpio78",
|
||||
"gpio78", "gpio114",
|
||||
};
|
||||
|
||||
static const char *const qup1_se7_l0_mira_groups[] = {
|
||||
"gpio81",
|
||||
};
|
||||
|
||||
static const char *const qup1_se7_l0_mirb_groups[] = {
|
||||
"gpio78",
|
||||
};
|
||||
|
||||
static const char *const qup1_se7_l1_mira_groups[] = {
|
||||
"gpio80",
|
||||
};
|
||||
|
||||
static const char *const qup1_se7_l1_mirb_groups[] = {
|
||||
"gpio114",
|
||||
};
|
||||
|
||||
static const char *const qup2_se0_groups[] = {
|
||||
@@ -1014,7 +1059,23 @@ static const char *const qup2_se2_groups[] = {
|
||||
};
|
||||
|
||||
static const char *const qup2_se3_groups[] = {
|
||||
"gpio79", "gpio116", "gpio97", "gpio100", "gpio100", "gpio116",
|
||||
"gpio100", "gpio116",
|
||||
};
|
||||
|
||||
static const char *const qup2_se3_l0_mira_groups[] = {
|
||||
"gpio79",
|
||||
};
|
||||
|
||||
static const char *const qup2_se3_l0_mirb_groups[] = {
|
||||
"gpio116",
|
||||
};
|
||||
|
||||
static const char *const qup2_se3_l1_mira_groups[] = {
|
||||
"gpio97",
|
||||
};
|
||||
|
||||
static const char *const qup2_se3_l1_mirb_groups[] = {
|
||||
"gpio100",
|
||||
};
|
||||
|
||||
static const char *const qup2_se4_groups[] = {
|
||||
@@ -1236,15 +1297,32 @@ static const struct pinfunction eliza_functions[] = {
|
||||
MSM_PIN_FUNCTION(qup1_se0),
|
||||
MSM_PIN_FUNCTION(qup1_se1),
|
||||
MSM_PIN_FUNCTION(qup1_se2),
|
||||
MSM_PIN_FUNCTION(qup1_se2_l2_mira),
|
||||
MSM_PIN_FUNCTION(qup1_se2_l2_mirb),
|
||||
MSM_PIN_FUNCTION(qup1_se2_l3_mira),
|
||||
MSM_PIN_FUNCTION(qup1_se2_l3_mirb),
|
||||
MSM_PIN_FUNCTION(qup1_se3),
|
||||
MSM_PIN_FUNCTION(qup1_se4),
|
||||
MSM_PIN_FUNCTION(qup1_se4_01),
|
||||
MSM_PIN_FUNCTION(qup1_se4_23),
|
||||
MSM_PIN_FUNCTION(qup1_se5),
|
||||
MSM_PIN_FUNCTION(qup1_se6),
|
||||
MSM_PIN_FUNCTION(qup1_se6_l1_mira),
|
||||
MSM_PIN_FUNCTION(qup1_se6_l1_mirb),
|
||||
MSM_PIN_FUNCTION(qup1_se6_l3_mira),
|
||||
MSM_PIN_FUNCTION(qup1_se6_l3_mirb),
|
||||
MSM_PIN_FUNCTION(qup1_se7),
|
||||
MSM_PIN_FUNCTION(qup1_se7_l0_mira),
|
||||
MSM_PIN_FUNCTION(qup1_se7_l0_mirb),
|
||||
MSM_PIN_FUNCTION(qup1_se7_l1_mira),
|
||||
MSM_PIN_FUNCTION(qup1_se7_l1_mirb),
|
||||
MSM_PIN_FUNCTION(qup2_se0),
|
||||
MSM_PIN_FUNCTION(qup2_se1),
|
||||
MSM_PIN_FUNCTION(qup2_se2),
|
||||
MSM_PIN_FUNCTION(qup2_se3),
|
||||
MSM_PIN_FUNCTION(qup2_se3_l0_mira),
|
||||
MSM_PIN_FUNCTION(qup2_se3_l0_mirb),
|
||||
MSM_PIN_FUNCTION(qup2_se3_l1_mira),
|
||||
MSM_PIN_FUNCTION(qup2_se3_l1_mirb),
|
||||
MSM_PIN_FUNCTION(qup2_se4),
|
||||
MSM_PIN_FUNCTION(qup2_se5),
|
||||
MSM_PIN_FUNCTION(qup2_se6),
|
||||
@@ -1322,33 +1400,33 @@ static const struct msm_pingroup eliza_groups[] = {
|
||||
[33] = PINGROUP(33, qup1_se1, ibi_i3c, host2wlan_sol, gcc_gp3, _, _, _, _, _, _, _),
|
||||
[34] = PINGROUP(34, qup1_se1, qup1_se5, tb_trig_sdc1, ddr_bist_start, qdss_gpio_tracedata, _, _, _, _, _, _),
|
||||
[35] = PINGROUP(35, qup1_se1, qup1_se5, tb_trig_sdc2, gcc_gp2, qdss_gpio_tracedata, _, _, _, _, _, _),
|
||||
[36] = PINGROUP(36, qup1_se4, qup1_se4, ibi_i3c, _, _, _, _, _, _, _, _),
|
||||
[37] = PINGROUP(37, qup1_se4, qup1_se4, ibi_i3c, _, _, _, _, _, _, _, _),
|
||||
[38] = PINGROUP(38, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[39] = PINGROUP(39, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[40] = PINGROUP(40, qup1_se6, qup1_se2, qup1_se6, _, qdss_gpio_tracedata, gnss_adc1, ddr_pxi1, _, _, _, _),
|
||||
[36] = PINGROUP(36, qup1_se4_01, qup1_se4_23, ibi_i3c, _, _, _, _, _, _, _, _),
|
||||
[37] = PINGROUP(37, qup1_se4_01, qup1_se4_23, ibi_i3c, _, _, _, _, _, _, _, _),
|
||||
[38] = PINGROUP(38, sdc2, _, _, _, _, _, _, _, _, _, _),
|
||||
[39] = PINGROUP(39, sdc2, _, _, _, _, _, _, _, _, _, _),
|
||||
[40] = PINGROUP(40, qup1_se6, qup1_se2, qup1_se6_l3_mira, _, qdss_gpio_tracedata, gnss_adc1, ddr_pxi1, _, _, _, _),
|
||||
[41] = PINGROUP(41, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[42] = PINGROUP(42, qup1_se6, qup1_se2, qup1_se6, qdss_gpio_tracedata, gnss_adc0, ddr_pxi1, _, _, _, _, _),
|
||||
[42] = PINGROUP(42, qup1_se6, qup1_se2, qup1_se6_l1_mira, qdss_gpio_tracedata, gnss_adc0, ddr_pxi1, _, _, _, _, _),
|
||||
[43] = PINGROUP(43, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[44] = PINGROUP(44, qup1_se3, _, _, _, _, _, _, _, _, _, _),
|
||||
[45] = PINGROUP(45, qup1_se3, _, _, _, _, _, _, _, _, _, _),
|
||||
[46] = PINGROUP(46, qup1_se3, hdmi_tx_cec, _, _, _, _, _, _, _, _, _),
|
||||
[47] = PINGROUP(47, qup1_se3, hdmi_hot_plug, _, _, _, _, _, _, _, _, _),
|
||||
[48] = PINGROUP(48, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[49] = PINGROUP(49, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[48] = PINGROUP(48, sdc2, _, _, _, _, _, _, _, _, _, _),
|
||||
[49] = PINGROUP(49, sdc2, _, _, _, _, _, _, _, _, _, _),
|
||||
[50] = PINGROUP(50, sdc2_fb_clk, _, _, _, _, _, _, _, _, _, _),
|
||||
[51] = PINGROUP(51, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[52] = PINGROUP(52, qup1_se2, pcie1_clk_req_n, qup1_se2, ddr_bist_complete, qdss_gpio_tracedata, _, vsense_trigger_mirnat, _, _, _, _),
|
||||
[53] = PINGROUP(53, qup1_se2, qup1_se2, gcc_gp1, ddr_bist_stop, _, qdss_gpio_tracedata, _, _, _, _, _),
|
||||
[54] = PINGROUP(54, qup1_se2, qup1_se6, qdss_gpio_traceclk, gnss_adc1, atest_usb, ddr_pxi0, _, _, _, _, _),
|
||||
[55] = PINGROUP(55, qup1_se2, dp0_hot, qup1_se6, _, gnss_adc0, atest_usb, ddr_pxi0, _, _, _, _),
|
||||
[51] = PINGROUP(51, sdc2, _, _, _, _, _, _, _, _, _, _),
|
||||
[52] = PINGROUP(52, qup1_se2, pcie1_clk_req_n, qup1_se2_l2_mirb, ddr_bist_complete, qdss_gpio_tracedata, _, vsense_trigger_mirnat, _, _, _, _),
|
||||
[53] = PINGROUP(53, qup1_se2, qup1_se2_l3_mirb, gcc_gp1, ddr_bist_stop, _, qdss_gpio_tracedata, _, _, _, _, _),
|
||||
[54] = PINGROUP(54, qup1_se2_l2_mira, qup1_se6_l1_mirb, qdss_gpio_traceclk, gnss_adc1, atest_usb, ddr_pxi0, _, _, _, _, _),
|
||||
[55] = PINGROUP(55, qup1_se2_l3_mira, dp0_hot, qup1_se6_l3_mirb, _, gnss_adc0, atest_usb, ddr_pxi0, _, _, _, _),
|
||||
[56] = PINGROUP(56, usb0_hs, tsense_pwm1, tsense_pwm2, tsense_pwm3, tsense_pwm4, _, _, _, _, _, _),
|
||||
[57] = PINGROUP(57, sd_write_protect, _, _, _, _, _, _, _, _, _, _),
|
||||
[58] = PINGROUP(58, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[59] = PINGROUP(59, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[60] = PINGROUP(60, i2s0_sck, _, _, _, _, _, _, _, _, _, _),
|
||||
[61] = PINGROUP(61, i2s0_ws, _, _, _, _, _, _, _, _, _, _),
|
||||
[62] = PINGROUP(62, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[62] = PINGROUP(62, sdc2, _, _, _, _, _, _, _, _, _, _),
|
||||
[63] = PINGROUP(63, resout_gpio, i2s0_data1, cci_timer, vfr_0, _, _, _, _, _, _, _),
|
||||
[64] = PINGROUP(64, i2s0_data0, _, _, _, _, _, _, _, _, _, _),
|
||||
[65] = PINGROUP(65, cam_mclk, _, qdss_gpio_tracedata, _, _, _, _, _, _, _, _),
|
||||
@@ -1364,10 +1442,10 @@ static const struct msm_pingroup eliza_groups[] = {
|
||||
[75] = PINGROUP(75, cci_i2c_scl, _, phase_flag, _, _, _, _, _, _, _, _),
|
||||
[76] = PINGROUP(76, cci_i2c_sda, cci_timer, prng_rosc2, _, phase_flag, _, _, _, _, _, _),
|
||||
[77] = PINGROUP(77, cci_i2c_scl, jitter_bist, _, _, _, _, _, _, _, _, _),
|
||||
[78] = PINGROUP(78, qup1_se7, qup1_se7, _, phase_flag, _, _, _, _, _, _, _),
|
||||
[79] = PINGROUP(79, qspi0, mdp_vsync, qup2_se3, _, _, _, _, _, _, _, _),
|
||||
[80] = PINGROUP(80, pcie0_clk_req_n, qup1_se7, _, phase_flag, _, _, _, _, _, _, _),
|
||||
[81] = PINGROUP(81, wcn_sw_ctrl, qup1_se7, dbg_out_clk, _, _, _, _, _, _, _, _),
|
||||
[78] = PINGROUP(78, qup1_se7, qup1_se7_l0_mirb, _, phase_flag, _, _, _, _, _, _, _),
|
||||
[79] = PINGROUP(79, qspi0, mdp_vsync, qup2_se3_l0_mira, _, _, _, _, _, _, _, _),
|
||||
[80] = PINGROUP(80, pcie0_clk_req_n, qup1_se7_l1_mira, _, phase_flag, _, _, _, _, _, _, _),
|
||||
[81] = PINGROUP(81, wcn_sw_ctrl, qup1_se7_l0_mira, dbg_out_clk, _, _, _, _, _, _, _, _),
|
||||
[82] = PINGROUP(82, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[83] = PINGROUP(83, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[84] = PINGROUP(84, uim0_data, _, _, _, _, _, _, _, _, _, _),
|
||||
@@ -1383,10 +1461,10 @@ static const struct msm_pingroup eliza_groups[] = {
|
||||
[94] = PINGROUP(94, qlink_wmss, _, _, _, _, _, _, _, _, _, _),
|
||||
[95] = PINGROUP(95, qlink_big_request, _, _, _, _, _, _, _, _, _, _),
|
||||
[96] = PINGROUP(96, qlink_big_enable, _, _, _, _, _, _, _, _, _, _),
|
||||
[97] = PINGROUP(97, uim1_data, qspi0, qup2_se3, _, _, _, _, _, _, _, _),
|
||||
[97] = PINGROUP(97, uim1_data, qspi0, qup2_se3_l1_mira, _, _, _, _, _, _, _, _),
|
||||
[98] = PINGROUP(98, uim1_clk, qspi0, _, _, _, _, _, _, _, _, _),
|
||||
[99] = PINGROUP(99, uim1_reset, qspi0, _, _, _, _, _, _, _, _, _),
|
||||
[100] = PINGROUP(100, uim1_present, qspi0, qup2_se3, coex_uart2_tx, qup2_se3, mdp_vsync, _, _, _, _, _),
|
||||
[100] = PINGROUP(100, uim1_present, qspi0, qup2_se3, coex_uart2_tx, qup2_se3_l1_mirb, mdp_vsync, _, _, _, _, _),
|
||||
[101] = PINGROUP(101, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[102] = PINGROUP(102, _, _, _, _, _, _, _, _, _, _, _),
|
||||
[103] = PINGROUP(103, _, _, _, _, _, _, _, _, _, _, _),
|
||||
@@ -1400,9 +1478,9 @@ static const struct msm_pingroup eliza_groups[] = {
|
||||
[111] = PINGROUP(111, coex_uart1_tx, _, _, _, _, _, _, _, _, _, _),
|
||||
[112] = PINGROUP(112, coex_uart1_rx, _, _, _, _, _, _, _, _, _, _),
|
||||
[113] = PINGROUP(113, _, nav_gpio3, _, _, _, _, _, _, _, _, _),
|
||||
[114] = PINGROUP(114, qup1_se7, qup1_se7, _, qdss_gpio_tracedata, _, _, _, _, _, _, _),
|
||||
[114] = PINGROUP(114, qup1_se7, qup1_se7_l1_mirb, _, qdss_gpio_tracedata, _, _, _, _, _, _, _),
|
||||
[115] = PINGROUP(115, _, qspi0, cci_async_in, _, _, _, _, _, _, _, _),
|
||||
[116] = PINGROUP(116, qspi0, coex_uart2_rx, qup2_se3, qup2_se3, _, _, _, _, _, _, _),
|
||||
[116] = PINGROUP(116, qspi0, coex_uart2_rx, qup2_se3, qup2_se3_l0_mirb, _, _, _, _, _, _, _),
|
||||
[117] = PINGROUP(117, nav_gpio1, _, vfr_1, _, _, _, _, _, _, _, _),
|
||||
[118] = PINGROUP(118, nav_gpio2, _, _, _, _, _, _, _, _, _, _),
|
||||
[119] = PINGROUP(119, nav_gpio0, _, _, _, _, _, _, _, _, _, _),
|
||||
@@ -1519,6 +1597,7 @@ static const struct of_device_id eliza_tlmm_of_match[] = {
|
||||
{ .compatible = "qcom,eliza-tlmm", },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, eliza_tlmm_of_match);
|
||||
|
||||
static struct platform_driver eliza_tlmm_driver = {
|
||||
.driver = {
|
||||
@@ -1542,4 +1621,3 @@ module_exit(eliza_tlmm_exit);
|
||||
|
||||
MODULE_DESCRIPTION("QTI Eliza TLMM driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(of, eliza_tlmm_of_match);
|
||||
|
||||
@@ -1777,6 +1777,7 @@ static const struct of_device_id glymur_tlmm_of_match[] = {
|
||||
{ .compatible = "qcom,mahua-tlmm", .data = &mahua_tlmm },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, glymur_tlmm_of_match);
|
||||
|
||||
static int glymur_tlmm_probe(struct platform_device *pdev)
|
||||
{
|
||||
@@ -1811,4 +1812,3 @@ module_exit(glymur_tlmm_exit);
|
||||
|
||||
MODULE_DESCRIPTION("QTI Glymur TLMM driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(of, glymur_tlmm_of_match);
|
||||
|
||||
@@ -1584,6 +1584,7 @@ static const struct of_device_id hawi_tlmm_of_match[] = {
|
||||
{ .compatible = "qcom,hawi-tlmm", },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, hawi_tlmm_of_match);
|
||||
|
||||
static struct platform_driver hawi_tlmm_driver = {
|
||||
.driver = {
|
||||
@@ -1607,4 +1608,3 @@ module_exit(hawi_tlmm_exit);
|
||||
|
||||
MODULE_DESCRIPTION("QTI Hawi TLMM driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(of, hawi_tlmm_of_match);
|
||||
|
||||
@@ -702,6 +702,7 @@ static const struct of_device_id ipq4019_pinctrl_of_match[] = {
|
||||
{ .compatible = "qcom,ipq4019-pinctrl", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ipq4019_pinctrl_of_match);
|
||||
|
||||
static struct platform_driver ipq4019_pinctrl_driver = {
|
||||
.driver = {
|
||||
@@ -725,4 +726,3 @@ module_exit(ipq4019_pinctrl_exit);
|
||||
|
||||
MODULE_DESCRIPTION("Qualcomm ipq4019 pinctrl driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DEVICE_TABLE(of, ipq4019_pinctrl_of_match);
|
||||
|
||||
@@ -1072,6 +1072,7 @@ static const struct of_device_id ipq6018_pinctrl_of_match[] = {
|
||||
{ .compatible = "qcom,ipq6018-pinctrl", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ipq6018_pinctrl_of_match);
|
||||
|
||||
static struct platform_driver ipq6018_pinctrl_driver = {
|
||||
.driver = {
|
||||
@@ -1095,4 +1096,3 @@ module_exit(ipq6018_pinctrl_exit);
|
||||
|
||||
MODULE_DESCRIPTION("QTI ipq6018 pinctrl driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DEVICE_TABLE(of, ipq6018_pinctrl_of_match);
|
||||
|
||||
@@ -624,6 +624,7 @@ static const struct of_device_id ipq8064_pinctrl_of_match[] = {
|
||||
{ .compatible = "qcom,ipq8064-pinctrl", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ipq8064_pinctrl_of_match);
|
||||
|
||||
static struct platform_driver ipq8064_pinctrl_driver = {
|
||||
.driver = {
|
||||
@@ -648,4 +649,3 @@ module_exit(ipq8064_pinctrl_exit);
|
||||
MODULE_AUTHOR("Andy Gross <agross@codeaurora.org>");
|
||||
MODULE_DESCRIPTION("Qualcomm IPQ8064 pinctrl driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DEVICE_TABLE(of, ipq8064_pinctrl_of_match);
|
||||
|
||||
@@ -1033,6 +1033,7 @@ static const struct of_device_id ipq8074_pinctrl_of_match[] = {
|
||||
{ .compatible = "qcom,ipq8074-pinctrl", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ipq8074_pinctrl_of_match);
|
||||
|
||||
static struct platform_driver ipq8074_pinctrl_driver = {
|
||||
.driver = {
|
||||
@@ -1056,4 +1057,3 @@ module_exit(ipq8074_pinctrl_exit);
|
||||
|
||||
MODULE_DESCRIPTION("Qualcomm ipq8074 pinctrl driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DEVICE_TABLE(of, ipq8074_pinctrl_of_match);
|
||||
|
||||
@@ -0,0 +1,762 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "pinctrl-msm.h"
|
||||
|
||||
#define REG_SIZE 0x1000
|
||||
#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
|
||||
{ \
|
||||
.grp = PINCTRL_PINGROUP("gpio" #id, \
|
||||
gpio##id##_pins, \
|
||||
ARRAY_SIZE(gpio##id##_pins)), \
|
||||
.ctl_reg = REG_SIZE * id, \
|
||||
.io_reg = 0x4 + REG_SIZE * id, \
|
||||
.intr_cfg_reg = 0x8 + REG_SIZE * id, \
|
||||
.intr_status_reg = 0xc + REG_SIZE * id, \
|
||||
.mux_bit = 2, \
|
||||
.pull_bit = 0, \
|
||||
.drv_bit = 6, \
|
||||
.oe_bit = 9, \
|
||||
.in_bit = 0, \
|
||||
.out_bit = 1, \
|
||||
.intr_enable_bit = 0, \
|
||||
.intr_status_bit = 0, \
|
||||
.intr_target_bit = 5, \
|
||||
.intr_target_kpss_val = 3, \
|
||||
.intr_raw_status_bit = 4, \
|
||||
.intr_polarity_bit = 1, \
|
||||
.intr_detection_bit = 2, \
|
||||
.intr_detection_width = 2, \
|
||||
.funcs = (int[]){ \
|
||||
msm_mux_gpio, /* gpio mode */ \
|
||||
msm_mux_##f1, \
|
||||
msm_mux_##f2, \
|
||||
msm_mux_##f3, \
|
||||
msm_mux_##f4, \
|
||||
msm_mux_##f5, \
|
||||
msm_mux_##f6, \
|
||||
msm_mux_##f7, \
|
||||
msm_mux_##f8, \
|
||||
msm_mux_##f9, \
|
||||
}, \
|
||||
.nfuncs = 10, \
|
||||
}
|
||||
|
||||
static const struct pinctrl_pin_desc ipq9650_pins[] = {
|
||||
PINCTRL_PIN(0, "GPIO_0"),
|
||||
PINCTRL_PIN(1, "GPIO_1"),
|
||||
PINCTRL_PIN(2, "GPIO_2"),
|
||||
PINCTRL_PIN(3, "GPIO_3"),
|
||||
PINCTRL_PIN(4, "GPIO_4"),
|
||||
PINCTRL_PIN(5, "GPIO_5"),
|
||||
PINCTRL_PIN(6, "GPIO_6"),
|
||||
PINCTRL_PIN(7, "GPIO_7"),
|
||||
PINCTRL_PIN(8, "GPIO_8"),
|
||||
PINCTRL_PIN(9, "GPIO_9"),
|
||||
PINCTRL_PIN(10, "GPIO_10"),
|
||||
PINCTRL_PIN(11, "GPIO_11"),
|
||||
PINCTRL_PIN(12, "GPIO_12"),
|
||||
PINCTRL_PIN(13, "GPIO_13"),
|
||||
PINCTRL_PIN(14, "GPIO_14"),
|
||||
PINCTRL_PIN(15, "GPIO_15"),
|
||||
PINCTRL_PIN(16, "GPIO_16"),
|
||||
PINCTRL_PIN(17, "GPIO_17"),
|
||||
PINCTRL_PIN(18, "GPIO_18"),
|
||||
PINCTRL_PIN(19, "GPIO_19"),
|
||||
PINCTRL_PIN(20, "GPIO_20"),
|
||||
PINCTRL_PIN(21, "GPIO_21"),
|
||||
PINCTRL_PIN(22, "GPIO_22"),
|
||||
PINCTRL_PIN(23, "GPIO_23"),
|
||||
PINCTRL_PIN(24, "GPIO_24"),
|
||||
PINCTRL_PIN(25, "GPIO_25"),
|
||||
PINCTRL_PIN(26, "GPIO_26"),
|
||||
PINCTRL_PIN(27, "GPIO_27"),
|
||||
PINCTRL_PIN(28, "GPIO_28"),
|
||||
PINCTRL_PIN(29, "GPIO_29"),
|
||||
PINCTRL_PIN(30, "GPIO_30"),
|
||||
PINCTRL_PIN(31, "GPIO_31"),
|
||||
PINCTRL_PIN(32, "GPIO_32"),
|
||||
PINCTRL_PIN(33, "GPIO_33"),
|
||||
PINCTRL_PIN(34, "GPIO_34"),
|
||||
PINCTRL_PIN(35, "GPIO_35"),
|
||||
PINCTRL_PIN(36, "GPIO_36"),
|
||||
PINCTRL_PIN(37, "GPIO_37"),
|
||||
PINCTRL_PIN(38, "GPIO_38"),
|
||||
PINCTRL_PIN(39, "GPIO_39"),
|
||||
PINCTRL_PIN(40, "GPIO_40"),
|
||||
PINCTRL_PIN(41, "GPIO_41"),
|
||||
PINCTRL_PIN(42, "GPIO_42"),
|
||||
PINCTRL_PIN(43, "GPIO_43"),
|
||||
PINCTRL_PIN(44, "GPIO_44"),
|
||||
PINCTRL_PIN(45, "GPIO_45"),
|
||||
PINCTRL_PIN(46, "GPIO_46"),
|
||||
PINCTRL_PIN(47, "GPIO_47"),
|
||||
PINCTRL_PIN(48, "GPIO_48"),
|
||||
PINCTRL_PIN(49, "GPIO_49"),
|
||||
PINCTRL_PIN(50, "GPIO_50"),
|
||||
PINCTRL_PIN(51, "GPIO_51"),
|
||||
PINCTRL_PIN(52, "GPIO_52"),
|
||||
PINCTRL_PIN(53, "GPIO_53"),
|
||||
};
|
||||
|
||||
#define DECLARE_MSM_GPIO_PINS(pin) \
|
||||
static const unsigned int gpio##pin##_pins[] = { pin }
|
||||
DECLARE_MSM_GPIO_PINS(0);
|
||||
DECLARE_MSM_GPIO_PINS(1);
|
||||
DECLARE_MSM_GPIO_PINS(2);
|
||||
DECLARE_MSM_GPIO_PINS(3);
|
||||
DECLARE_MSM_GPIO_PINS(4);
|
||||
DECLARE_MSM_GPIO_PINS(5);
|
||||
DECLARE_MSM_GPIO_PINS(6);
|
||||
DECLARE_MSM_GPIO_PINS(7);
|
||||
DECLARE_MSM_GPIO_PINS(8);
|
||||
DECLARE_MSM_GPIO_PINS(9);
|
||||
DECLARE_MSM_GPIO_PINS(10);
|
||||
DECLARE_MSM_GPIO_PINS(11);
|
||||
DECLARE_MSM_GPIO_PINS(12);
|
||||
DECLARE_MSM_GPIO_PINS(13);
|
||||
DECLARE_MSM_GPIO_PINS(14);
|
||||
DECLARE_MSM_GPIO_PINS(15);
|
||||
DECLARE_MSM_GPIO_PINS(16);
|
||||
DECLARE_MSM_GPIO_PINS(17);
|
||||
DECLARE_MSM_GPIO_PINS(18);
|
||||
DECLARE_MSM_GPIO_PINS(19);
|
||||
DECLARE_MSM_GPIO_PINS(20);
|
||||
DECLARE_MSM_GPIO_PINS(21);
|
||||
DECLARE_MSM_GPIO_PINS(22);
|
||||
DECLARE_MSM_GPIO_PINS(23);
|
||||
DECLARE_MSM_GPIO_PINS(24);
|
||||
DECLARE_MSM_GPIO_PINS(25);
|
||||
DECLARE_MSM_GPIO_PINS(26);
|
||||
DECLARE_MSM_GPIO_PINS(27);
|
||||
DECLARE_MSM_GPIO_PINS(28);
|
||||
DECLARE_MSM_GPIO_PINS(29);
|
||||
DECLARE_MSM_GPIO_PINS(30);
|
||||
DECLARE_MSM_GPIO_PINS(31);
|
||||
DECLARE_MSM_GPIO_PINS(32);
|
||||
DECLARE_MSM_GPIO_PINS(33);
|
||||
DECLARE_MSM_GPIO_PINS(34);
|
||||
DECLARE_MSM_GPIO_PINS(35);
|
||||
DECLARE_MSM_GPIO_PINS(36);
|
||||
DECLARE_MSM_GPIO_PINS(37);
|
||||
DECLARE_MSM_GPIO_PINS(38);
|
||||
DECLARE_MSM_GPIO_PINS(39);
|
||||
DECLARE_MSM_GPIO_PINS(40);
|
||||
DECLARE_MSM_GPIO_PINS(41);
|
||||
DECLARE_MSM_GPIO_PINS(42);
|
||||
DECLARE_MSM_GPIO_PINS(43);
|
||||
DECLARE_MSM_GPIO_PINS(44);
|
||||
DECLARE_MSM_GPIO_PINS(45);
|
||||
DECLARE_MSM_GPIO_PINS(46);
|
||||
DECLARE_MSM_GPIO_PINS(47);
|
||||
DECLARE_MSM_GPIO_PINS(48);
|
||||
DECLARE_MSM_GPIO_PINS(49);
|
||||
DECLARE_MSM_GPIO_PINS(50);
|
||||
DECLARE_MSM_GPIO_PINS(51);
|
||||
DECLARE_MSM_GPIO_PINS(52);
|
||||
DECLARE_MSM_GPIO_PINS(53);
|
||||
|
||||
enum ipq9650_functions {
|
||||
msm_mux_atest_char_start,
|
||||
msm_mux_atest_char_status0,
|
||||
msm_mux_atest_char_status1,
|
||||
msm_mux_atest_char_status2,
|
||||
msm_mux_atest_char_status3,
|
||||
msm_mux_atest_tic_en,
|
||||
msm_mux_audio_pri_mclk_in0,
|
||||
msm_mux_audio_pri_mclk_out0,
|
||||
msm_mux_audio_pri_mclk_in1,
|
||||
msm_mux_audio_pri_mclk_out1,
|
||||
msm_mux_audio_pri,
|
||||
msm_mux_audio_sec,
|
||||
msm_mux_audio_sec_mclk_in0,
|
||||
msm_mux_audio_sec_mclk_out0,
|
||||
msm_mux_audio_sec_mclk_in1,
|
||||
msm_mux_audio_sec_mclk_out1,
|
||||
msm_mux_core_voltage_0,
|
||||
msm_mux_core_voltage_1,
|
||||
msm_mux_core_voltage_2,
|
||||
msm_mux_core_voltage_3,
|
||||
msm_mux_core_voltage_4,
|
||||
msm_mux_cri_rng0,
|
||||
msm_mux_cri_rng1,
|
||||
msm_mux_cri_rng2,
|
||||
msm_mux_dbg_out_clk,
|
||||
msm_mux_gcc_plltest_bypassnl,
|
||||
msm_mux_gcc_plltest_resetn,
|
||||
msm_mux_gcc_tlmm,
|
||||
msm_mux_gpio,
|
||||
msm_mux_mdc_mst,
|
||||
msm_mux_mdc_slv0,
|
||||
msm_mux_mdc_slv1,
|
||||
msm_mux_mdio_mst,
|
||||
msm_mux_mdio_slv,
|
||||
msm_mux_mdio_slv0,
|
||||
msm_mux_mdio_slv1,
|
||||
msm_mux_pcie0_clk_req_n,
|
||||
msm_mux_pcie0_wake,
|
||||
msm_mux_pcie1_clk_req_n,
|
||||
msm_mux_pcie1_wake,
|
||||
msm_mux_pcie2_clk_req_n,
|
||||
msm_mux_pcie2_wake,
|
||||
msm_mux_pcie3_clk_req_n,
|
||||
msm_mux_pcie3_wake,
|
||||
msm_mux_pcie4_clk_req_n,
|
||||
msm_mux_pcie4_wake,
|
||||
msm_mux_pll_bist_sync,
|
||||
msm_mux_pll_test,
|
||||
msm_mux_pwm,
|
||||
msm_mux_qdss_cti_trig_in_a0,
|
||||
msm_mux_qdss_cti_trig_in_a1,
|
||||
msm_mux_qdss_cti_trig_in_b0,
|
||||
msm_mux_qdss_cti_trig_in_b1,
|
||||
msm_mux_qdss_cti_trig_out_a0,
|
||||
msm_mux_qdss_cti_trig_out_a1,
|
||||
msm_mux_qdss_cti_trig_out_b0,
|
||||
msm_mux_qdss_cti_trig_out_b1,
|
||||
msm_mux_qdss_traceclk_a,
|
||||
msm_mux_qdss_tracectl_a,
|
||||
msm_mux_qdss_tracedata_a,
|
||||
msm_mux_qspi_data,
|
||||
msm_mux_qspi_clk,
|
||||
msm_mux_qspi_cs_n,
|
||||
msm_mux_qup_se0,
|
||||
msm_mux_qup_se1,
|
||||
msm_mux_qup_se2,
|
||||
msm_mux_qup_se3,
|
||||
msm_mux_qup_se4,
|
||||
msm_mux_qup_se5,
|
||||
msm_mux_qup_se6,
|
||||
msm_mux_qup_se7,
|
||||
msm_mux_resout,
|
||||
msm_mux_rx_los0,
|
||||
msm_mux_rx_los1,
|
||||
msm_mux_rx_los2,
|
||||
msm_mux_sdc_clk,
|
||||
msm_mux_sdc_cmd,
|
||||
msm_mux_sdc_data,
|
||||
msm_mux_tsens_max,
|
||||
msm_mux_tsn,
|
||||
msm_mux__,
|
||||
};
|
||||
|
||||
static const char *const gpio_groups[] = {
|
||||
"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", "gpio47", "gpio48",
|
||||
"gpio49", "gpio50", "gpio51", "gpio52", "gpio53",
|
||||
};
|
||||
|
||||
static const char *const atest_char_start_groups[] = {
|
||||
"gpio21",
|
||||
};
|
||||
|
||||
static const char *const atest_char_status0_groups[] = {
|
||||
"gpio33",
|
||||
};
|
||||
|
||||
static const char *const atest_char_status1_groups[] = {
|
||||
"gpio35",
|
||||
};
|
||||
|
||||
static const char *const atest_char_status2_groups[] = {
|
||||
"gpio22",
|
||||
};
|
||||
|
||||
static const char *const atest_char_status3_groups[] = {
|
||||
"gpio23",
|
||||
};
|
||||
|
||||
static const char *const atest_tic_en_groups[] = {
|
||||
"gpio53",
|
||||
};
|
||||
|
||||
static const char *const audio_pri_mclk_in0_groups[] = {
|
||||
"gpio53",
|
||||
};
|
||||
|
||||
static const char *const audio_pri_mclk_out0_groups[] = {
|
||||
"gpio53",
|
||||
};
|
||||
|
||||
static const char *const audio_pri_mclk_in1_groups[] = {
|
||||
"gpio51",
|
||||
};
|
||||
|
||||
static const char *const audio_pri_mclk_out1_groups[] = {
|
||||
"gpio51",
|
||||
};
|
||||
|
||||
static const char *const audio_pri_groups[] = {
|
||||
"gpio36", "gpio37", "gpio38", "gpio39",
|
||||
};
|
||||
|
||||
static const char *const audio_sec_mclk_in0_groups[] = {
|
||||
"gpio37",
|
||||
};
|
||||
|
||||
static const char *const audio_sec_mclk_out0_groups[] = {
|
||||
"gpio37",
|
||||
};
|
||||
|
||||
static const char *const audio_sec_mclk_in1_groups[] = {
|
||||
"gpio37",
|
||||
};
|
||||
|
||||
static const char *const audio_sec_mclk_out1_groups[] = {
|
||||
"gpio37",
|
||||
};
|
||||
|
||||
static const char *const audio_sec_groups[] = {
|
||||
"gpio45", "gpio46", "gpio47", "gpio48",
|
||||
};
|
||||
|
||||
static const char *const core_voltage_0_groups[] = {
|
||||
"gpio16",
|
||||
};
|
||||
|
||||
static const char *const core_voltage_1_groups[] = {
|
||||
"gpio17",
|
||||
};
|
||||
|
||||
static const char *const core_voltage_2_groups[] = {
|
||||
"gpio33",
|
||||
};
|
||||
|
||||
static const char *const core_voltage_3_groups[] = {
|
||||
"gpio34",
|
||||
};
|
||||
|
||||
static const char *const core_voltage_4_groups[] = {
|
||||
"gpio35",
|
||||
};
|
||||
|
||||
static const char *const cri_rng0_groups[] = {
|
||||
"gpio6",
|
||||
};
|
||||
|
||||
static const char *const cri_rng1_groups[] = {
|
||||
"gpio7",
|
||||
};
|
||||
|
||||
static const char *const cri_rng2_groups[] = {
|
||||
"gpio8",
|
||||
};
|
||||
|
||||
static const char *const dbg_out_clk_groups[] = {
|
||||
"gpio46",
|
||||
};
|
||||
|
||||
static const char *const gcc_plltest_bypassnl_groups[] = {
|
||||
"gpio33",
|
||||
};
|
||||
|
||||
static const char *const gcc_plltest_resetn_groups[] = {
|
||||
"gpio35",
|
||||
};
|
||||
|
||||
static const char *const gcc_tlmm_groups[] = {
|
||||
"gpio34",
|
||||
};
|
||||
|
||||
static const char *const mdc_mst_groups[] = {
|
||||
"gpio22",
|
||||
};
|
||||
|
||||
static const char *const mdc_slv0_groups[] = {
|
||||
"gpio20",
|
||||
};
|
||||
|
||||
static const char *const mdc_slv1_groups[] = {
|
||||
"gpio14",
|
||||
};
|
||||
|
||||
static const char *const mdio_mst_groups[] = {
|
||||
"gpio23",
|
||||
};
|
||||
|
||||
static const char *const mdio_slv_groups[] = {
|
||||
"gpio46",
|
||||
"gpio47",
|
||||
};
|
||||
|
||||
static const char *const mdio_slv0_groups[] = {
|
||||
"gpio21",
|
||||
};
|
||||
|
||||
static const char *const mdio_slv1_groups[] = {
|
||||
"gpio15",
|
||||
};
|
||||
|
||||
static const char *const pcie0_clk_req_n_groups[] = {
|
||||
"gpio24",
|
||||
};
|
||||
|
||||
static const char *const pcie0_wake_groups[] = {
|
||||
"gpio26",
|
||||
};
|
||||
|
||||
static const char *const pcie1_clk_req_n_groups[] = {
|
||||
"gpio27",
|
||||
};
|
||||
|
||||
static const char *const pcie1_wake_groups[] = {
|
||||
"gpio29",
|
||||
};
|
||||
|
||||
static const char *const pcie2_clk_req_n_groups[] = {
|
||||
"gpio51",
|
||||
};
|
||||
|
||||
static const char *const pcie2_wake_groups[] = {
|
||||
"gpio53",
|
||||
};
|
||||
|
||||
static const char *const pcie3_clk_req_n_groups[] = {
|
||||
"gpio40",
|
||||
};
|
||||
|
||||
static const char *const pcie3_wake_groups[] = {
|
||||
"gpio42",
|
||||
};
|
||||
|
||||
static const char *const pcie4_clk_req_n_groups[] = {
|
||||
"gpio30",
|
||||
};
|
||||
|
||||
static const char *const pcie4_wake_groups[] = {
|
||||
"gpio32",
|
||||
};
|
||||
|
||||
static const char *const pll_bist_sync_groups[] = {
|
||||
"gpio47",
|
||||
};
|
||||
|
||||
static const char *const pll_test_groups[] = {
|
||||
"gpio39",
|
||||
};
|
||||
|
||||
static const char *const pwm_groups[] = {
|
||||
"gpio6", "gpio7", "gpio8", "gpio9", "gpio10", "gpio11", "gpio16",
|
||||
"gpio17", "gpio33", "gpio34", "gpio35", "gpio43", "gpio44", "gpio45",
|
||||
"gpio46", "gpio47", "gpio48",
|
||||
};
|
||||
|
||||
static const char *const qdss_cti_trig_in_a0_groups[] = {
|
||||
"gpio53",
|
||||
};
|
||||
|
||||
static const char *const qdss_cti_trig_in_a1_groups[] = {
|
||||
"gpio29",
|
||||
};
|
||||
|
||||
static const char *const qdss_cti_trig_in_b0_groups[] = {
|
||||
"gpio42",
|
||||
};
|
||||
|
||||
static const char *const qdss_cti_trig_in_b1_groups[] = {
|
||||
"gpio43",
|
||||
};
|
||||
|
||||
static const char *const qdss_cti_trig_out_a0_groups[] = {
|
||||
"gpio51",
|
||||
};
|
||||
|
||||
static const char *const qdss_cti_trig_out_a1_groups[] = {
|
||||
"gpio27",
|
||||
};
|
||||
|
||||
static const char *const qdss_cti_trig_out_b0_groups[] = {
|
||||
"gpio40",
|
||||
};
|
||||
|
||||
static const char *const qdss_cti_trig_out_b1_groups[] = {
|
||||
"gpio44",
|
||||
};
|
||||
|
||||
static const char *const qdss_traceclk_a_groups[] = {
|
||||
"gpio45",
|
||||
};
|
||||
|
||||
static const char *const qdss_tracectl_a_groups[] = {
|
||||
"gpio46",
|
||||
};
|
||||
|
||||
static const char *const qdss_tracedata_a_groups[] = {
|
||||
"gpio6", "gpio7", "gpio8", "gpio9", "gpio10", "gpio11",
|
||||
"gpio12", "gpio13", "gpio14", "gpio15", "gpio20", "gpio21",
|
||||
"gpio36", "gpio37", "gpio38", "gpio39",
|
||||
};
|
||||
|
||||
static const char *const qspi_data_groups[] = {
|
||||
"gpio0", "gpio1", "gpio2", "gpio3",
|
||||
};
|
||||
|
||||
static const char *const qspi_clk_groups[] = {
|
||||
"gpio5",
|
||||
};
|
||||
|
||||
static const char *const qspi_cs_n_groups[] = {
|
||||
"gpio4",
|
||||
};
|
||||
|
||||
static const char *const qup_se0_groups[] = {
|
||||
"gpio6", "gpio7", "gpio8", "gpio9", "gpio51", "gpio53",
|
||||
};
|
||||
|
||||
static const char *const qup_se1_groups[] = {
|
||||
"gpio10", "gpio11", "gpio12", "gpio13", "gpio27", "gpio29",
|
||||
};
|
||||
|
||||
static const char *const qup_se2_groups[] = {
|
||||
"gpio27", "gpio29", "gpio33", "gpio34",
|
||||
};
|
||||
|
||||
static const char *const qup_se3_groups[] = {
|
||||
"gpio16", "gpio17", "gpio20", "gpio21",
|
||||
};
|
||||
|
||||
static const char *const qup_se4_groups[] = {
|
||||
"gpio14", "gpio15", "gpio40", "gpio42", "gpio43", "gpio44",
|
||||
};
|
||||
|
||||
static const char *const qup_se5_groups[] = {
|
||||
"gpio40", "gpio42", "gpio45", "gpio46", "gpio47", "gpio48",
|
||||
};
|
||||
|
||||
static const char *const qup_se6_groups[] = {
|
||||
"gpio43", "gpio44", "gpio51", "gpio53",
|
||||
};
|
||||
|
||||
static const char *const qup_se7_groups[] = {
|
||||
"gpio36", "gpio37", "gpio38", "gpio39",
|
||||
};
|
||||
|
||||
static const char *const resout_groups[] = {
|
||||
"gpio49",
|
||||
};
|
||||
|
||||
static const char *const rx_los0_groups[] = {
|
||||
"gpio39", "gpio47", "gpio50",
|
||||
};
|
||||
|
||||
static const char *const rx_los1_groups[] = {
|
||||
"gpio38", "gpio46",
|
||||
};
|
||||
|
||||
static const char *const rx_los2_groups[] = {
|
||||
"gpio37", "gpio45",
|
||||
};
|
||||
|
||||
static const char *const sdc_clk_groups[] = {
|
||||
"gpio5",
|
||||
};
|
||||
|
||||
static const char *const sdc_cmd_groups[] = {
|
||||
"gpio4",
|
||||
};
|
||||
|
||||
static const char *const sdc_data_groups[] = {
|
||||
"gpio0", "gpio1", "gpio2", "gpio3",
|
||||
};
|
||||
|
||||
static const char *const tsens_max_groups[] = {
|
||||
"gpio14",
|
||||
};
|
||||
|
||||
static const char *const tsn_groups[] = {
|
||||
"gpio50",
|
||||
};
|
||||
|
||||
static const struct pinfunction ipq9650_functions[] = {
|
||||
MSM_PIN_FUNCTION(atest_char_start),
|
||||
MSM_PIN_FUNCTION(atest_char_status0),
|
||||
MSM_PIN_FUNCTION(atest_char_status1),
|
||||
MSM_PIN_FUNCTION(atest_char_status2),
|
||||
MSM_PIN_FUNCTION(atest_char_status3),
|
||||
MSM_PIN_FUNCTION(atest_tic_en),
|
||||
MSM_PIN_FUNCTION(audio_pri_mclk_in0),
|
||||
MSM_PIN_FUNCTION(audio_pri_mclk_out0),
|
||||
MSM_PIN_FUNCTION(audio_pri_mclk_in1),
|
||||
MSM_PIN_FUNCTION(audio_pri_mclk_out1),
|
||||
MSM_PIN_FUNCTION(audio_pri),
|
||||
MSM_PIN_FUNCTION(audio_sec),
|
||||
MSM_PIN_FUNCTION(audio_sec_mclk_in0),
|
||||
MSM_PIN_FUNCTION(audio_sec_mclk_out0),
|
||||
MSM_PIN_FUNCTION(audio_sec_mclk_in1),
|
||||
MSM_PIN_FUNCTION(audio_sec_mclk_out1),
|
||||
MSM_PIN_FUNCTION(core_voltage_0),
|
||||
MSM_PIN_FUNCTION(core_voltage_1),
|
||||
MSM_PIN_FUNCTION(core_voltage_2),
|
||||
MSM_PIN_FUNCTION(core_voltage_3),
|
||||
MSM_PIN_FUNCTION(core_voltage_4),
|
||||
MSM_PIN_FUNCTION(cri_rng0),
|
||||
MSM_PIN_FUNCTION(cri_rng1),
|
||||
MSM_PIN_FUNCTION(cri_rng2),
|
||||
MSM_PIN_FUNCTION(dbg_out_clk),
|
||||
MSM_PIN_FUNCTION(gcc_plltest_bypassnl),
|
||||
MSM_PIN_FUNCTION(gcc_plltest_resetn),
|
||||
MSM_PIN_FUNCTION(gcc_tlmm),
|
||||
MSM_GPIO_PIN_FUNCTION(gpio),
|
||||
MSM_PIN_FUNCTION(mdc_mst),
|
||||
MSM_PIN_FUNCTION(mdc_slv0),
|
||||
MSM_PIN_FUNCTION(mdc_slv1),
|
||||
MSM_PIN_FUNCTION(mdio_mst),
|
||||
MSM_PIN_FUNCTION(mdio_slv),
|
||||
MSM_PIN_FUNCTION(mdio_slv0),
|
||||
MSM_PIN_FUNCTION(mdio_slv1),
|
||||
MSM_PIN_FUNCTION(pcie0_clk_req_n),
|
||||
MSM_PIN_FUNCTION(pcie0_wake),
|
||||
MSM_PIN_FUNCTION(pcie1_clk_req_n),
|
||||
MSM_PIN_FUNCTION(pcie1_wake),
|
||||
MSM_PIN_FUNCTION(pcie2_clk_req_n),
|
||||
MSM_PIN_FUNCTION(pcie2_wake),
|
||||
MSM_PIN_FUNCTION(pcie3_clk_req_n),
|
||||
MSM_PIN_FUNCTION(pcie3_wake),
|
||||
MSM_PIN_FUNCTION(pcie4_clk_req_n),
|
||||
MSM_PIN_FUNCTION(pcie4_wake),
|
||||
MSM_PIN_FUNCTION(pll_bist_sync),
|
||||
MSM_PIN_FUNCTION(pll_test),
|
||||
MSM_PIN_FUNCTION(pwm),
|
||||
MSM_PIN_FUNCTION(qdss_cti_trig_in_a0),
|
||||
MSM_PIN_FUNCTION(qdss_cti_trig_in_a1),
|
||||
MSM_PIN_FUNCTION(qdss_cti_trig_in_b0),
|
||||
MSM_PIN_FUNCTION(qdss_cti_trig_in_b1),
|
||||
MSM_PIN_FUNCTION(qdss_cti_trig_out_a0),
|
||||
MSM_PIN_FUNCTION(qdss_cti_trig_out_a1),
|
||||
MSM_PIN_FUNCTION(qdss_cti_trig_out_b0),
|
||||
MSM_PIN_FUNCTION(qdss_cti_trig_out_b1),
|
||||
MSM_PIN_FUNCTION(qdss_traceclk_a),
|
||||
MSM_PIN_FUNCTION(qdss_tracectl_a),
|
||||
MSM_PIN_FUNCTION(qdss_tracedata_a),
|
||||
MSM_PIN_FUNCTION(qspi_data),
|
||||
MSM_PIN_FUNCTION(qspi_clk),
|
||||
MSM_PIN_FUNCTION(qspi_cs_n),
|
||||
MSM_PIN_FUNCTION(qup_se0),
|
||||
MSM_PIN_FUNCTION(qup_se1),
|
||||
MSM_PIN_FUNCTION(qup_se2),
|
||||
MSM_PIN_FUNCTION(qup_se3),
|
||||
MSM_PIN_FUNCTION(qup_se4),
|
||||
MSM_PIN_FUNCTION(qup_se5),
|
||||
MSM_PIN_FUNCTION(qup_se6),
|
||||
MSM_PIN_FUNCTION(qup_se7),
|
||||
MSM_PIN_FUNCTION(resout),
|
||||
MSM_PIN_FUNCTION(rx_los0),
|
||||
MSM_PIN_FUNCTION(rx_los1),
|
||||
MSM_PIN_FUNCTION(rx_los2),
|
||||
MSM_PIN_FUNCTION(sdc_clk),
|
||||
MSM_PIN_FUNCTION(sdc_cmd),
|
||||
MSM_PIN_FUNCTION(sdc_data),
|
||||
MSM_PIN_FUNCTION(tsens_max),
|
||||
MSM_PIN_FUNCTION(tsn),
|
||||
};
|
||||
|
||||
static const struct msm_pingroup ipq9650_groups[] = {
|
||||
[0] = PINGROUP(0, sdc_data, qspi_data, _, _, _, _, _, _, _),
|
||||
[1] = PINGROUP(1, sdc_data, qspi_data, _, _, _, _, _, _, _),
|
||||
[2] = PINGROUP(2, sdc_data, qspi_data, _, _, _, _, _, _, _),
|
||||
[3] = PINGROUP(3, sdc_data, qspi_data, _, _, _, _, _, _, _),
|
||||
[4] = PINGROUP(4, sdc_cmd, qspi_cs_n, _, _, _, _, _, _, _),
|
||||
[5] = PINGROUP(5, sdc_clk, qspi_clk, _, _, _, _, _, _, _),
|
||||
[6] = PINGROUP(6, qup_se0, pwm, _, cri_rng0, qdss_tracedata_a, _, _, _, _),
|
||||
[7] = PINGROUP(7, qup_se0, pwm, _, cri_rng1, qdss_tracedata_a, _, _, _, _),
|
||||
[8] = PINGROUP(8, qup_se0, pwm, _, cri_rng2, qdss_tracedata_a, _, _, _, _),
|
||||
[9] = PINGROUP(9, qup_se0, pwm, _, qdss_tracedata_a, _, _, _, _, _),
|
||||
[10] = PINGROUP(10, qup_se1, pwm, _, _, qdss_tracedata_a, _, _, _, _),
|
||||
[11] = PINGROUP(11, qup_se1, pwm, _, _, qdss_tracedata_a, _, _, _, _),
|
||||
[12] = PINGROUP(12, qup_se1, _, qdss_tracedata_a, _, _, _, _, _, _),
|
||||
[13] = PINGROUP(13, qup_se1, _, qdss_tracedata_a, _, _, _, _, _, _),
|
||||
[14] = PINGROUP(14, qup_se4, mdc_slv1, tsens_max, _, qdss_tracedata_a, _, _, _, _),
|
||||
[15] = PINGROUP(15, qup_se4, mdio_slv1, _, qdss_tracedata_a, _, _, _, _, _),
|
||||
[16] = PINGROUP(16, core_voltage_0, qup_se3, pwm, _, _, _, _, _, _),
|
||||
[17] = PINGROUP(17, core_voltage_1, qup_se3, pwm, _, _, _, _, _, _),
|
||||
[18] = PINGROUP(18, _, _, _, _, _, _, _, _, _),
|
||||
[19] = PINGROUP(19, _, _, _, _, _, _, _, _, _),
|
||||
[20] = PINGROUP(20, mdc_slv0, qup_se3, _, qdss_tracedata_a, _, _, _, _, _),
|
||||
[21] = PINGROUP(21, mdio_slv0, qup_se3, atest_char_start, _, qdss_tracedata_a, _, _, _, _),
|
||||
[22] = PINGROUP(22, mdc_mst, atest_char_status2, _, _, _, _, _, _, _),
|
||||
[23] = PINGROUP(23, mdio_mst, atest_char_status3, _, _, _, _, _, _, _),
|
||||
[24] = PINGROUP(24, pcie0_clk_req_n, _, _, _, _, _, _, _, _),
|
||||
[25] = PINGROUP(25, _, _, _, _, _, _, _, _, _),
|
||||
[26] = PINGROUP(26, pcie0_wake, _, _, _, _, _, _, _, _),
|
||||
[27] = PINGROUP(27, pcie1_clk_req_n, qup_se2, qup_se1, _, qdss_cti_trig_out_a1, _, _, _, _),
|
||||
[28] = PINGROUP(28, _, _, _, _, _, _, _, _, _),
|
||||
[29] = PINGROUP(29, pcie1_wake, qup_se2, qup_se1, _, qdss_cti_trig_in_a1, _, _, _, _),
|
||||
[30] = PINGROUP(30, pcie4_clk_req_n, _, _, _, _, _, _, _, _),
|
||||
[31] = PINGROUP(31, _, _, _, _, _, _, _, _, _),
|
||||
[32] = PINGROUP(32, pcie4_wake, _, _, _, _, _, _, _, _),
|
||||
[33] = PINGROUP(33, core_voltage_2, qup_se2, gcc_plltest_bypassnl, pwm, atest_char_status0, _, _, _, _),
|
||||
[34] = PINGROUP(34, core_voltage_3, qup_se2, gcc_tlmm, pwm, _, _, _, _, _),
|
||||
[35] = PINGROUP(35, core_voltage_4, gcc_plltest_resetn, pwm, atest_char_status1, _, _, _, _, _),
|
||||
[36] = PINGROUP(36, audio_pri, qup_se7, qdss_tracedata_a, _, _, _, _, _, _),
|
||||
[37] = PINGROUP(37, audio_pri, qup_se7, audio_sec_mclk_out0, audio_sec_mclk_in0, rx_los2, qdss_tracedata_a, _, _, _),
|
||||
[38] = PINGROUP(38, audio_pri, qup_se7, rx_los1, qdss_tracedata_a, _, _, _, _, _),
|
||||
[39] = PINGROUP(39, audio_pri, qup_se7, audio_sec_mclk_out1, audio_sec_mclk_in1, pll_test, rx_los0, _, qdss_tracedata_a, _),
|
||||
[40] = PINGROUP(40, pcie3_clk_req_n, qup_se5, qup_se4, _, qdss_cti_trig_out_b0, _, _, _, _),
|
||||
[41] = PINGROUP(41, _, _, _, _, _, _, _, _, _),
|
||||
[42] = PINGROUP(42, pcie3_wake, qup_se5, qup_se4, _, qdss_cti_trig_in_b0, _, _, _, _),
|
||||
[43] = PINGROUP(43, qup_se4, qup_se6, pwm, _, qdss_cti_trig_in_b1, _, _, _, _),
|
||||
[44] = PINGROUP(44, qup_se4, qup_se6, pwm, _, qdss_cti_trig_out_b1, _, _, _, _),
|
||||
[45] = PINGROUP(45, qup_se5, rx_los2, audio_sec, pwm, _, qdss_traceclk_a, _, _, _),
|
||||
[46] = PINGROUP(46, qup_se5, rx_los1, audio_sec, mdio_slv, pwm, dbg_out_clk, qdss_tracectl_a, _, _),
|
||||
[47] = PINGROUP(47, qup_se5, rx_los0, audio_sec, mdio_slv, pll_bist_sync, pwm, _, _, _),
|
||||
[48] = PINGROUP(48, qup_se5, audio_sec, pwm, _, _, _, _, _, _),
|
||||
[49] = PINGROUP(49, resout, _, _, _, _, _, _, _, _),
|
||||
[50] = PINGROUP(50, tsn, rx_los0, _, _, _, _, _, _, _),
|
||||
[51] = PINGROUP(51, pcie2_clk_req_n, qup_se6, qup_se0, audio_pri_mclk_out1, audio_pri_mclk_in1, qdss_cti_trig_out_a0, _, _, _),
|
||||
[52] = PINGROUP(52, _, _, _, _, _, _, _, _, _),
|
||||
[53] = PINGROUP(53, pcie2_wake, qup_se6, qup_se0, audio_pri_mclk_out0, audio_pri_mclk_in0, qdss_cti_trig_in_a0, _, atest_tic_en, _),
|
||||
};
|
||||
|
||||
static const struct msm_pinctrl_soc_data ipq9650_tlmm = {
|
||||
.pins = ipq9650_pins,
|
||||
.npins = ARRAY_SIZE(ipq9650_pins),
|
||||
.functions = ipq9650_functions,
|
||||
.nfunctions = ARRAY_SIZE(ipq9650_functions),
|
||||
.groups = ipq9650_groups,
|
||||
.ngroups = ARRAY_SIZE(ipq9650_groups),
|
||||
.ngpios = 54,
|
||||
};
|
||||
|
||||
static const struct of_device_id ipq9650_tlmm_of_match[] = {
|
||||
{ .compatible = "qcom,ipq9650-tlmm", },
|
||||
{},
|
||||
};
|
||||
|
||||
static int ipq9650_tlmm_probe(struct platform_device *pdev)
|
||||
{
|
||||
return msm_pinctrl_probe(pdev, &ipq9650_tlmm);
|
||||
}
|
||||
|
||||
static struct platform_driver ipq9650_tlmm_driver = {
|
||||
.driver = {
|
||||
.name = "ipq9650-tlmm",
|
||||
.of_match_table = ipq9650_tlmm_of_match,
|
||||
},
|
||||
.probe = ipq9650_tlmm_probe,
|
||||
};
|
||||
|
||||
static int __init ipq9650_tlmm_init(void)
|
||||
{
|
||||
return platform_driver_register(&ipq9650_tlmm_driver);
|
||||
}
|
||||
arch_initcall(ipq9650_tlmm_init);
|
||||
|
||||
static void __exit ipq9650_tlmm_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&ipq9650_tlmm_driver);
|
||||
}
|
||||
module_exit(ipq9650_tlmm_exit);
|
||||
|
||||
MODULE_DESCRIPTION("QTI IPQ9650 TLMM driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -1774,6 +1774,7 @@ static const struct of_device_id kaanapali_tlmm_of_match[] = {
|
||||
{ .compatible = "qcom,kaanapali-tlmm",},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, kaanapali_tlmm_of_match);
|
||||
|
||||
static struct platform_driver kaanapali_tlmm_driver = {
|
||||
.driver = {
|
||||
@@ -1797,4 +1798,3 @@ module_exit(kaanapali_tlmm_exit);
|
||||
|
||||
MODULE_DESCRIPTION("QTI Kaanapali TLMM driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(of, kaanapali_tlmm_of_match);
|
||||
|
||||
@@ -11,10 +11,13 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/cleanup.h>
|
||||
|
||||
#include <linux/pinctrl/pinconf-generic.h>
|
||||
#include <linux/pinctrl/pinconf.h>
|
||||
#include <linux/pinctrl/pinmux.h>
|
||||
#include <linux/pm_clock.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
#include "../pinctrl-utils.h"
|
||||
|
||||
@@ -22,7 +25,6 @@
|
||||
|
||||
#define MAX_NR_GPIO 32
|
||||
#define GPIO_FUNC 0
|
||||
#define MAX_LPI_NUM_CLKS 2
|
||||
|
||||
struct lpi_pinctrl {
|
||||
struct device *dev;
|
||||
@@ -31,15 +33,14 @@ struct lpi_pinctrl {
|
||||
struct pinctrl_desc desc;
|
||||
char __iomem *tlmm_base;
|
||||
char __iomem *slew_base;
|
||||
struct clk_bulk_data clks[MAX_LPI_NUM_CLKS];
|
||||
/* Protects from concurrent register updates */
|
||||
struct mutex lock;
|
||||
DECLARE_BITMAP(ever_gpio, MAX_NR_GPIO);
|
||||
const struct lpi_pinctrl_variant_data *data;
|
||||
};
|
||||
|
||||
static int lpi_gpio_read(struct lpi_pinctrl *state, unsigned int pin,
|
||||
unsigned int addr)
|
||||
static void __iomem *lpi_gpio_reg(struct lpi_pinctrl *state,
|
||||
unsigned int pin, unsigned int addr)
|
||||
{
|
||||
u32 pin_offset;
|
||||
|
||||
@@ -48,22 +49,34 @@ static int lpi_gpio_read(struct lpi_pinctrl *state, unsigned int pin,
|
||||
else
|
||||
pin_offset = LPI_TLMM_REG_OFFSET * pin;
|
||||
|
||||
return ioread32(state->tlmm_base + pin_offset + addr);
|
||||
return state->tlmm_base + pin_offset + addr;
|
||||
}
|
||||
|
||||
static int lpi_gpio_write(struct lpi_pinctrl *state, unsigned int pin,
|
||||
unsigned int addr, unsigned int val)
|
||||
static void lpi_gpio_read_reg(struct lpi_pinctrl *state,
|
||||
unsigned int pin, unsigned int addr, u32 *val)
|
||||
{
|
||||
u32 pin_offset;
|
||||
*val = ioread32(lpi_gpio_reg(state, pin, addr));
|
||||
}
|
||||
|
||||
if (state->data->flags & LPI_FLAG_USE_PREDEFINED_PIN_OFFSET)
|
||||
pin_offset = state->data->groups[pin].pin_offset;
|
||||
else
|
||||
pin_offset = LPI_TLMM_REG_OFFSET * pin;
|
||||
static void lpi_gpio_write_reg(struct lpi_pinctrl *state,
|
||||
unsigned int pin, unsigned int addr,
|
||||
unsigned int val)
|
||||
{
|
||||
iowrite32(val, lpi_gpio_reg(state, pin, addr));
|
||||
}
|
||||
|
||||
iowrite32(val, state->tlmm_base + pin_offset + addr);
|
||||
static int lpi_gpio_read(struct lpi_pinctrl *state, unsigned int pin,
|
||||
unsigned int addr, u32 *val)
|
||||
{
|
||||
int ret;
|
||||
|
||||
return 0;
|
||||
ret = pm_runtime_resume_and_get(state->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
lpi_gpio_read_reg(state, pin, addr, val);
|
||||
|
||||
return pm_runtime_put_autosuspend(state->dev);
|
||||
}
|
||||
|
||||
static const struct pinctrl_ops lpi_gpio_pinctrl_ops = {
|
||||
@@ -107,8 +120,8 @@ static int lpi_gpio_set_mux(struct pinctrl_dev *pctldev, unsigned int function,
|
||||
{
|
||||
struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
|
||||
const struct lpi_pingroup *g = &pctrl->data->groups[group];
|
||||
u32 val;
|
||||
int i, pin = g->pin;
|
||||
u32 io_val, val;
|
||||
int i, pin = g->pin, ret;
|
||||
|
||||
for (i = 0; i < g->nfuncs; i++) {
|
||||
if (g->funcs[i] == function)
|
||||
@@ -118,8 +131,12 @@ static int lpi_gpio_set_mux(struct pinctrl_dev *pctldev, unsigned int function,
|
||||
if (WARN_ON(i == g->nfuncs))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&pctrl->lock);
|
||||
val = lpi_gpio_read(pctrl, pin, LPI_GPIO_CFG_REG);
|
||||
ret = pm_runtime_resume_and_get(pctrl->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
guard(mutex)(&pctrl->lock);
|
||||
lpi_gpio_read_reg(pctrl, pin, LPI_GPIO_CFG_REG, &val);
|
||||
|
||||
/*
|
||||
* If this is the first time muxing to GPIO and the direction is
|
||||
@@ -129,24 +146,25 @@ static int lpi_gpio_set_mux(struct pinctrl_dev *pctldev, unsigned int function,
|
||||
*/
|
||||
if (i == GPIO_FUNC && (val & LPI_GPIO_OE_MASK) &&
|
||||
!test_and_set_bit(group, pctrl->ever_gpio)) {
|
||||
u32 io_val = lpi_gpio_read(pctrl, group, LPI_GPIO_VALUE_REG);
|
||||
lpi_gpio_read_reg(pctrl, group, LPI_GPIO_VALUE_REG, &io_val);
|
||||
|
||||
if (io_val & LPI_GPIO_VALUE_IN_MASK) {
|
||||
if (!(io_val & LPI_GPIO_VALUE_OUT_MASK))
|
||||
lpi_gpio_write(pctrl, group, LPI_GPIO_VALUE_REG,
|
||||
io_val | LPI_GPIO_VALUE_OUT_MASK);
|
||||
lpi_gpio_write_reg(pctrl, group,
|
||||
LPI_GPIO_VALUE_REG,
|
||||
io_val | LPI_GPIO_VALUE_OUT_MASK);
|
||||
} else {
|
||||
if (io_val & LPI_GPIO_VALUE_OUT_MASK)
|
||||
lpi_gpio_write(pctrl, group, LPI_GPIO_VALUE_REG,
|
||||
io_val & ~LPI_GPIO_VALUE_OUT_MASK);
|
||||
lpi_gpio_write_reg(pctrl, group,
|
||||
LPI_GPIO_VALUE_REG,
|
||||
io_val & ~LPI_GPIO_VALUE_OUT_MASK);
|
||||
}
|
||||
}
|
||||
|
||||
u32p_replace_bits(&val, i, LPI_GPIO_FUNCTION_MASK);
|
||||
lpi_gpio_write(pctrl, pin, LPI_GPIO_CFG_REG, val);
|
||||
mutex_unlock(&pctrl->lock);
|
||||
lpi_gpio_write_reg(pctrl, pin, LPI_GPIO_CFG_REG, val);
|
||||
|
||||
return 0;
|
||||
return pm_runtime_put_autosuspend(pctrl->dev);
|
||||
}
|
||||
|
||||
static const struct pinmux_ops lpi_gpio_pinmux_ops = {
|
||||
@@ -162,11 +180,15 @@ static int lpi_config_get(struct pinctrl_dev *pctldev,
|
||||
unsigned int param = pinconf_to_config_param(*config);
|
||||
struct lpi_pinctrl *state = dev_get_drvdata(pctldev->dev);
|
||||
unsigned int arg = 0;
|
||||
u32 ctl_reg;
|
||||
int is_out;
|
||||
int pull;
|
||||
u32 ctl_reg;
|
||||
int ret;
|
||||
|
||||
ret = lpi_gpio_read(state, pin, LPI_GPIO_CFG_REG, &ctl_reg);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ctl_reg = lpi_gpio_read(state, pin, LPI_GPIO_CFG_REG);
|
||||
is_out = ctl_reg & LPI_GPIO_OE_MASK;
|
||||
pull = FIELD_GET(LPI_GPIO_PULL_MASK, ctl_reg);
|
||||
|
||||
@@ -197,6 +219,7 @@ static int lpi_config_get(struct pinctrl_dev *pctldev,
|
||||
}
|
||||
|
||||
*config = pinconf_to_config_packed(param, arg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -206,7 +229,7 @@ static int lpi_config_set_slew_rate(struct lpi_pinctrl *pctrl,
|
||||
{
|
||||
unsigned long sval;
|
||||
void __iomem *reg;
|
||||
int slew_offset;
|
||||
int slew_offset, ret;
|
||||
|
||||
if (slew > LPI_SLEW_RATE_MAX) {
|
||||
dev_err(pctrl->dev, "invalid slew rate %u for pin: %d\n",
|
||||
@@ -220,9 +243,15 @@ static int lpi_config_set_slew_rate(struct lpi_pinctrl *pctrl,
|
||||
|
||||
if (pctrl->data->flags & LPI_FLAG_SLEW_RATE_SAME_REG)
|
||||
reg = pctrl->tlmm_base + LPI_TLMM_REG_OFFSET * group + LPI_GPIO_CFG_REG;
|
||||
else if (g->slew_base_spare_1)
|
||||
reg = pctrl->slew_base + LPI_SPARE_1_REG;
|
||||
else
|
||||
reg = pctrl->slew_base + LPI_SLEW_RATE_CTL_REG;
|
||||
|
||||
ret = pm_runtime_resume_and_get(pctrl->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
mutex_lock(&pctrl->lock);
|
||||
|
||||
sval = ioread32(reg);
|
||||
@@ -232,7 +261,7 @@ static int lpi_config_set_slew_rate(struct lpi_pinctrl *pctrl,
|
||||
|
||||
mutex_unlock(&pctrl->lock);
|
||||
|
||||
return 0;
|
||||
return pm_runtime_put_autosuspend(pctrl->dev);
|
||||
}
|
||||
|
||||
static int lpi_config_set(struct pinctrl_dev *pctldev, unsigned int group,
|
||||
@@ -242,8 +271,8 @@ static int lpi_config_set(struct pinctrl_dev *pctldev, unsigned int group,
|
||||
unsigned int param, arg, pullup = LPI_GPIO_BIAS_DISABLE, strength = 2;
|
||||
bool value, output_enabled = false;
|
||||
const struct lpi_pingroup *g;
|
||||
int i, ret;
|
||||
u32 val;
|
||||
int i, ret;
|
||||
|
||||
g = &pctrl->data->groups[group];
|
||||
for (i = 0; i < nconfs; i++) {
|
||||
@@ -287,23 +316,26 @@ static int lpi_config_set(struct pinctrl_dev *pctldev, unsigned int group,
|
||||
* As per Hardware Programming Guide, when configuring pin as output,
|
||||
* set the pin value before setting output-enable (OE).
|
||||
*/
|
||||
ret = pm_runtime_resume_and_get(pctrl->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
guard(mutex)(&pctrl->lock);
|
||||
if (output_enabled) {
|
||||
val = u32_encode_bits(value ? 1 : 0, LPI_GPIO_VALUE_OUT_MASK);
|
||||
lpi_gpio_write(pctrl, group, LPI_GPIO_VALUE_REG, val);
|
||||
lpi_gpio_write_reg(pctrl, group, LPI_GPIO_VALUE_REG, val);
|
||||
}
|
||||
|
||||
mutex_lock(&pctrl->lock);
|
||||
val = lpi_gpio_read(pctrl, group, LPI_GPIO_CFG_REG);
|
||||
lpi_gpio_read_reg(pctrl, group, LPI_GPIO_CFG_REG, &val);
|
||||
|
||||
u32p_replace_bits(&val, pullup, LPI_GPIO_PULL_MASK);
|
||||
u32p_replace_bits(&val, LPI_GPIO_DS_TO_VAL(strength),
|
||||
LPI_GPIO_OUT_STRENGTH_MASK);
|
||||
u32p_replace_bits(&val, output_enabled, LPI_GPIO_OE_MASK);
|
||||
|
||||
lpi_gpio_write(pctrl, group, LPI_GPIO_CFG_REG, val);
|
||||
mutex_unlock(&pctrl->lock);
|
||||
lpi_gpio_write_reg(pctrl, group, LPI_GPIO_CFG_REG, val);
|
||||
|
||||
return 0;
|
||||
return pm_runtime_put_autosuspend(pctrl->dev);
|
||||
}
|
||||
|
||||
static const struct pinconf_ops lpi_gpio_pinconf_ops = {
|
||||
@@ -352,9 +384,14 @@ static int lpi_gpio_direction_output(struct gpio_chip *chip,
|
||||
static int lpi_gpio_get(struct gpio_chip *chip, unsigned int pin)
|
||||
{
|
||||
struct lpi_pinctrl *state = gpiochip_get_data(chip);
|
||||
u32 val;
|
||||
int ret;
|
||||
|
||||
return lpi_gpio_read(state, pin, LPI_GPIO_VALUE_REG) &
|
||||
LPI_GPIO_VALUE_IN_MASK;
|
||||
ret = lpi_gpio_read(state, pin, LPI_GPIO_VALUE_REG, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return val & LPI_GPIO_VALUE_IN_MASK;
|
||||
}
|
||||
|
||||
static int lpi_gpio_set(struct gpio_chip *chip, unsigned int pin, int value)
|
||||
@@ -397,7 +434,9 @@ static void lpi_gpio_dbg_show_one(struct seq_file *s,
|
||||
|
||||
pctldev = pctldev ? : state->ctrl;
|
||||
pindesc = pctldev->desc->pins[offset];
|
||||
ctl_reg = lpi_gpio_read(state, offset, LPI_GPIO_CFG_REG);
|
||||
if (lpi_gpio_read(state, offset, LPI_GPIO_CFG_REG, &ctl_reg))
|
||||
return;
|
||||
|
||||
is_out = ctl_reg & LPI_GPIO_OE_MASK;
|
||||
|
||||
func = FIELD_GET(LPI_GPIO_FUNCTION_MASK, ctl_reg);
|
||||
@@ -480,9 +519,6 @@ int lpi_pinctrl_probe(struct platform_device *pdev)
|
||||
pctrl->data = data;
|
||||
pctrl->dev = &pdev->dev;
|
||||
|
||||
pctrl->clks[0].id = "core";
|
||||
pctrl->clks[1].id = "audio";
|
||||
|
||||
pctrl->tlmm_base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(pctrl->tlmm_base))
|
||||
return dev_err_probe(dev, PTR_ERR(pctrl->tlmm_base),
|
||||
@@ -495,13 +531,19 @@ int lpi_pinctrl_probe(struct platform_device *pdev)
|
||||
"Slew resource not provided\n");
|
||||
}
|
||||
|
||||
ret = devm_clk_bulk_get_optional(dev, MAX_LPI_NUM_CLKS, pctrl->clks);
|
||||
ret = devm_pm_clk_create(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = clk_bulk_prepare_enable(MAX_LPI_NUM_CLKS, pctrl->clks);
|
||||
ret = of_pm_clk_add_clks(dev);
|
||||
if (ret < 0 && ret != -ENODEV)
|
||||
return ret;
|
||||
|
||||
pm_runtime_set_autosuspend_delay(dev, 100);
|
||||
pm_runtime_use_autosuspend(dev);
|
||||
ret = devm_pm_runtime_enable(dev);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Can't enable clocks\n");
|
||||
return ret;
|
||||
|
||||
pctrl->desc.pctlops = &lpi_gpio_pinctrl_ops;
|
||||
pctrl->desc.pmxops = &lpi_gpio_pinmux_ops;
|
||||
@@ -540,7 +582,6 @@ int lpi_pinctrl_probe(struct platform_device *pdev)
|
||||
|
||||
err_pinctrl:
|
||||
mutex_destroy(&pctrl->lock);
|
||||
clk_bulk_disable_unprepare(MAX_LPI_NUM_CLKS, pctrl->clks);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -552,7 +593,6 @@ void lpi_pinctrl_remove(struct platform_device *pdev)
|
||||
int i;
|
||||
|
||||
mutex_destroy(&pctrl->lock);
|
||||
clk_bulk_disable_unprepare(MAX_LPI_NUM_CLKS, pctrl->clks);
|
||||
|
||||
for (i = 0; i < pctrl->data->npins; i++)
|
||||
pinctrl_generic_remove_group(pctrl->ctrl, i);
|
||||
|
||||
@@ -16,6 +16,7 @@ struct platform_device;
|
||||
struct pinctrl_pin_desc;
|
||||
|
||||
#define LPI_SLEW_RATE_CTL_REG 0xa000
|
||||
#define LPI_SPARE_1_REG 0xc000
|
||||
#define LPI_TLMM_REG_OFFSET 0x1000
|
||||
#define LPI_SLEW_RATE_MAX 0x03
|
||||
#define LPI_SLEW_BITS_SIZE 0x02
|
||||
@@ -47,6 +48,7 @@ struct pinctrl_pin_desc;
|
||||
{ \
|
||||
.pin = id, \
|
||||
.slew_offset = soff, \
|
||||
.slew_base_spare_1 = false, \
|
||||
.funcs = (int[]){ \
|
||||
LPI_MUX_gpio, \
|
||||
LPI_MUX_##f1, \
|
||||
@@ -62,6 +64,7 @@ struct pinctrl_pin_desc;
|
||||
{ \
|
||||
.pin = id, \
|
||||
.slew_offset = soff, \
|
||||
.slew_base_spare_1 = false, \
|
||||
.funcs = (int[]){ \
|
||||
LPI_MUX_gpio, \
|
||||
LPI_MUX_##f1, \
|
||||
@@ -73,6 +76,22 @@ struct pinctrl_pin_desc;
|
||||
.pin_offset = poff, \
|
||||
}
|
||||
|
||||
#define LPI_PINGROUP_SLEW_SPARE_1(id, soff, f1, f2, f3, f4) \
|
||||
{ \
|
||||
.pin = id, \
|
||||
.slew_offset = soff, \
|
||||
.slew_base_spare_1 = true, \
|
||||
.funcs = (int[]){ \
|
||||
LPI_MUX_gpio, \
|
||||
LPI_MUX_##f1, \
|
||||
LPI_MUX_##f2, \
|
||||
LPI_MUX_##f3, \
|
||||
LPI_MUX_##f4, \
|
||||
}, \
|
||||
.nfuncs = 5, \
|
||||
.pin_offset = 0, \
|
||||
}
|
||||
|
||||
/*
|
||||
* Slew rate control is done in the same register as rest of the
|
||||
* pin configuration.
|
||||
@@ -87,6 +106,7 @@ struct lpi_pingroup {
|
||||
unsigned int *funcs;
|
||||
unsigned int nfuncs;
|
||||
unsigned int pin_offset;
|
||||
bool slew_base_spare_1;
|
||||
};
|
||||
|
||||
struct lpi_function {
|
||||
|
||||
@@ -1050,6 +1050,7 @@ static const struct of_device_id mdm9607_pinctrl_of_match[] = {
|
||||
{ .compatible = "qcom,mdm9607-tlmm", },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, mdm9607_pinctrl_of_match);
|
||||
|
||||
static struct platform_driver mdm9607_pinctrl_driver = {
|
||||
.driver = {
|
||||
@@ -1073,4 +1074,3 @@ module_exit(mdm9607_pinctrl_exit);
|
||||
|
||||
MODULE_DESCRIPTION("Qualcomm mdm9607 pinctrl driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DEVICE_TABLE(of, mdm9607_pinctrl_of_match);
|
||||
|
||||
@@ -439,6 +439,7 @@ static const struct of_device_id mdm9615_pinctrl_of_match[] = {
|
||||
{ .compatible = "qcom,mdm9615-pinctrl", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, mdm9615_pinctrl_of_match);
|
||||
|
||||
static struct platform_driver mdm9615_pinctrl_driver = {
|
||||
.driver = {
|
||||
@@ -463,4 +464,3 @@ module_exit(mdm9615_pinctrl_exit);
|
||||
MODULE_AUTHOR("Neil Armstrong <narmstrong@baylibre.com>");
|
||||
MODULE_DESCRIPTION("Qualcomm MDM9615 pinctrl driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DEVICE_TABLE(of, mdm9615_pinctrl_of_match);
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <linux/gpio/driver.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_clock.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
#include "pinctrl-lpass-lpi.h"
|
||||
|
||||
@@ -203,10 +205,15 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
|
||||
|
||||
static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
|
||||
RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
|
||||
};
|
||||
|
||||
static struct platform_driver lpi_pinctrl_driver = {
|
||||
.driver = {
|
||||
.name = "qcom-milos-lpass-lpi-pinctrl",
|
||||
.of_match_table = lpi_pinctrl_of_match,
|
||||
.pm = pm_ptr(&lpi_pinctrl_pm_ops),
|
||||
},
|
||||
.probe = lpi_pinctrl_probe,
|
||||
.remove = lpi_pinctrl_remove,
|
||||
|
||||
@@ -1310,6 +1310,7 @@ static const struct of_device_id milos_tlmm_of_match[] = {
|
||||
{ .compatible = "qcom,milos-tlmm" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, milos_tlmm_of_match);
|
||||
|
||||
static struct platform_driver milos_tlmm_driver = {
|
||||
.driver = {
|
||||
@@ -1333,4 +1334,3 @@ module_exit(milos_tlmm_exit);
|
||||
|
||||
MODULE_DESCRIPTION("QTI Milos TLMM driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(of, milos_tlmm_of_match);
|
||||
|
||||
@@ -1012,10 +1012,8 @@ static void msm_gpio_irq_ack(struct irq_data *d)
|
||||
|
||||
static void msm_gpio_irq_eoi(struct irq_data *d)
|
||||
{
|
||||
d = d->parent_data;
|
||||
|
||||
if (d)
|
||||
d->chip->irq_eoi(d);
|
||||
if (d->parent_data)
|
||||
irq_chip_eoi_parent(d);
|
||||
}
|
||||
|
||||
static bool msm_gpio_needs_dual_edge_parent_workaround(struct irq_data *d,
|
||||
@@ -1593,11 +1591,11 @@ int msm_pinctrl_probe(struct platform_device *pdev,
|
||||
pctrl->desc.pins = pctrl->soc->pins;
|
||||
pctrl->desc.npins = pctrl->soc->npins;
|
||||
|
||||
pctrl->pctrl = devm_pinctrl_register(&pdev->dev, &pctrl->desc, pctrl);
|
||||
if (IS_ERR(pctrl->pctrl)) {
|
||||
dev_err(&pdev->dev, "Couldn't register pinctrl driver\n");
|
||||
return PTR_ERR(pctrl->pctrl);
|
||||
}
|
||||
ret = devm_pinctrl_register_and_init(&pdev->dev, &pctrl->desc,
|
||||
pctrl, &pctrl->pctrl);
|
||||
if (ret)
|
||||
return dev_err_probe(&pdev->dev, ret,
|
||||
"Couldn't register pinctrl driver\n");
|
||||
|
||||
for (i = 0; i < soc_data->nfunctions; i++) {
|
||||
func = &soc_data->functions[i];
|
||||
@@ -1607,6 +1605,11 @@ int msm_pinctrl_probe(struct platform_device *pdev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = pinctrl_enable(pctrl->pctrl);
|
||||
if (ret)
|
||||
return dev_err_probe(&pdev->dev, ret,
|
||||
"Couldn't enable pinctrl driver\n");
|
||||
|
||||
ret = msm_gpio_init(pctrl);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user