mirror of https://gitee.com/openkylin/linux.git
This is the bulk of pin control changes for the v3.16
development cycle: - Antoine Tenart made the get_group_pins() vtable entry optional. - Antoine also provides an entirely new driver for the Marvell Berlin SoC. This is unrelated to the existing MVEBU hardware driver and warrants its own separate driver. - Reflected from the GPIO subsystem there is a number of refactorings to make pin control drivers with gpiochips use the new gpiolib irqchip helpers. The following drivers were converted to use the new infrastructure: - ST Microelectronics STiH416 and friends - The Atmel AT91 - The CSR SiRF (Prima2) - The Qualcomm MSM series - Massive improvements in the Qualcomm MSM driver from Bjorn Andersson, Andy Gross and Kumar Gala. Among those new support for the IPQ8064 and MSM8x74 SoC variants. - Support for the Freescale i.MX6 SoloX SoC variant. - Massive improvements in the Allwinner sunxi driver from Boris Brezillon, Maxime Ripard and Chen-Yu Tsai. - Renesas PFC updates from Laurent Pinchart, Kuninori Morimoto, Wolfram Sang and Magnus Damm. - Cleanups and refactorings of the nVidia Tegra driver from Stepgen Warren. - The Exynos driver now supports the Exynos3250 SoC. - Intel BayTrail updates from Jin Yao, Mika Westerberg. - The MVEBU driver now supports the Orion5x SoC variants, which is part of the effort of getting rid of the old Marvell kludges in arch/arm/mach-orion5x - Rockchip driver updates from Heiko Stuebner. - A ton of cleanups and janitorial patches from Axel Lin. - Some minor fixes and improvements here and there. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJTjXDAAAoJEEEQszewGV1z8zsP/i+7o5sU+rm3ZwfpCyuVih7E 90nHTMzV2Se+8gX4D0jLZUYkxMQn9pkqG616IyT5kP5sx9co8raoAUC1Qmv6b7rI kIlfCaDvjPzEWgH9KZNjMP8P0rqdj8TelDRSZ0EPzHdfyUwxFmLRnFo7ywguPCG2 SOM1uo7XhjXmphoUP7ZZWs3doflYxBAL3ZdK77QQcLEQjlNxSz/vbls6ldkKie7C XF7DKvGqphB8GdGKkdFvyhjQNy26rBanZRy94yU53Ak5zc0mTtmO+WEjiByAW1m7 Fy6AVdZZhl6BLxzn9rUzsKdrWzaWzUkQNilhEO1u7OfZtNQbuYWcv7GJ7h37lIzI P0jegOy+7d4JxPyROphtJXx6AwV1pFFimMnWS4rHwUdjwMBVRnlOKQW/G7ulEBsn wD5MhD76nHySKtjYquI+iVHbmE06hG8iDUUxFm2saVG8O7Siw+E2aCXPLm9+Lp5R fBNuj8lnTy8/F6sHyPs8Bw6u8Ra5uSmRhV4j3B/jZG8pAksqUK6xOmjdVdE7JmoH qIZxuQhqrAhjmGkAg/ys5SUuMMbegxTI2f+rDy7rpWonbVOtaItMpgbYwyiQpIR4 BDmlwZi5BNupiEW7Yzp6utWYIyYA0ntuMGpnqnPBDBCn5jZOCUTMjZXAPCDK5dEN Ktyu+5jCBZgpqS+KgTXl =wGE5 -----END PGP SIGNATURE----- Merge tag 'pinctrl-v3.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl into next Pull pin control changes from Linus Walleij: "This is the bulk of pin control changes for the v3.16 development cycle: - Antoine Tenart made the get_group_pins() vtable entry optional. - Antoine also provides an entirely new driver for the Marvell Berlin SoC. This is unrelated to the existing MVEBU hardware driver and warrants its own separate driver. - reflected from the GPIO subsystem there is a number of refactorings to make pin control drivers with gpiochips use the new gpiolib irqchip helpers. The following drivers were converted to use the new infrastructure: * ST Microelectronics STiH416 and friends * The Atmel AT91 * The CSR SiRF (Prima2) * The Qualcomm MSM series - massive improvements in the Qualcomm MSM driver from Bjorn Andersson, Andy Gross and Kumar Gala. Among those new support for the IPQ8064 and MSM8x74 SoC variants. - support for the Freescale i.MX6 SoloX SoC variant. - massive improvements in the Allwinner sunxi driver from Boris Brezillon, Maxime Ripard and Chen-Yu Tsai. - Renesas PFC updates from Laurent Pinchart, Kuninori Morimoto, Wolfram Sang and Magnus Damm. - Cleanups and refactorings of the nVidia Tegra driver from Stepgen Warren. - the Exynos driver now supports the Exynos3250 SoC. - Intel BayTrail updates from Jin Yao, Mika Westerberg. - the MVEBU driver now supports the Orion5x SoC variants, which is part of the effort of getting rid of the old Marvell kludges in arch/arm/mach-orion5x - Rockchip driver updates from Heiko Stuebner. - a ton of cleanups and janitorial patches from Axel Lin. - some minor fixes and improvements here and there" * tag 'pinctrl-v3.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (93 commits) pinctrl: sirf: fix a bad conflict resolution pinctrl: msm: Add more MSM8X74 pin definitions pinctrl: qcom: ipq8064: Fix naming convention pinctrl: msm: Add missing sdc1 and sdc3 groups pinctrl: sirf: switch to using allocated state container pinctrl: Enable "power-source" to be extracted from DT files pinctrl: sunxi: create irq/pin mapping during init pinctrl: pinconf-generic: Use kmemdup instead of kmalloc + memcpy pinctrl: berlin: Use devm_ioremap_resource() pinctrl: sirf: fix typo for GPIO bank number pinctrl: sunxi: depend on RESET_CONTROLLER pinctrl: sunxi: fix pin numbers passed to register offset helpers pinctrl: add pinctrl driver for imx6sx pinctrl/at91: Fix lockup when IRQ on PIOC and PIOD occurs pinctrl: msm: switch to using generic GPIO irqchip helpers pinctrl: sunxi: Fix multiple registration issue pinctrl: sunxi: Fix recursive dependency pinctrl: berlin: add the BG2CD pinctrl driver pinctrl: berlin: add the BG2 pinctrl driver pinctrl: berlin: add the BG2Q pinctrl driver ...
This commit is contained in:
commit
bd698cf659
|
@ -6,8 +6,13 @@ the first two functions being GPIO in and out. The configuration on
|
|||
the pins includes drive strength and pull-up.
|
||||
|
||||
Required properties:
|
||||
- compatible: "allwinner,<soc>-pinctrl". Supported SoCs for now are:
|
||||
sun5i-a13.
|
||||
- compatible: Should be one of the followings (depending on you SoC):
|
||||
"allwinner,sun4i-a10-pinctrl"
|
||||
"allwinner,sun5i-a10s-pinctrl"
|
||||
"allwinner,sun5i-a13-pinctrl"
|
||||
"allwinner,sun6i-a31-pinctrl"
|
||||
"allwinner,sun6i-a31-r-pinctrl"
|
||||
"allwinner,sun7i-a20-pinctrl"
|
||||
- reg: Should contain the register physical address and length for the
|
||||
pin controller.
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
* Freescale i.MX6 SoloX IOMUX Controller
|
||||
|
||||
Please refer to fsl,imx-pinctrl.txt in this directory for common binding part
|
||||
and usage.
|
||||
|
||||
Required properties:
|
||||
- compatible: "fsl,imx6sx-iomuxc"
|
||||
- fsl,pins: each entry consists of 6 integers and represents the mux and config
|
||||
setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val
|
||||
input_val> are specified using a PIN_FUNC_ID macro, which can be found in
|
||||
imx6sx-pinfunc.h under device tree source folder. The last integer CONFIG is
|
||||
the pad setting value like pull-up on this pin. Please refer to i.MX6 SoloX
|
||||
Reference Manual for detailed CONFIG settings.
|
||||
|
||||
CONFIG bits definition:
|
||||
PAD_CTL_HYS (1 << 16)
|
||||
PAD_CTL_PUS_100K_DOWN (0 << 14)
|
||||
PAD_CTL_PUS_47K_UP (1 << 14)
|
||||
PAD_CTL_PUS_100K_UP (2 << 14)
|
||||
PAD_CTL_PUS_22K_UP (3 << 14)
|
||||
PAD_CTL_PUE (1 << 13)
|
||||
PAD_CTL_PKE (1 << 12)
|
||||
PAD_CTL_ODE (1 << 11)
|
||||
PAD_CTL_SPEED_LOW (0 << 6)
|
||||
PAD_CTL_SPEED_MED (1 << 6)
|
||||
PAD_CTL_SPEED_HIGH (3 << 6)
|
||||
PAD_CTL_DSE_DISABLE (0 << 3)
|
||||
PAD_CTL_DSE_260ohm (1 << 3)
|
||||
PAD_CTL_DSE_130ohm (2 << 3)
|
||||
PAD_CTL_DSE_87ohm (3 << 3)
|
||||
PAD_CTL_DSE_65ohm (4 << 3)
|
||||
PAD_CTL_DSE_52ohm (5 << 3)
|
||||
PAD_CTL_DSE_43ohm (6 << 3)
|
||||
PAD_CTL_DSE_37ohm (7 << 3)
|
||||
PAD_CTL_SRE_FAST (1 << 0)
|
||||
PAD_CTL_SRE_SLOW (0 << 0)
|
|
@ -0,0 +1,91 @@
|
|||
* Marvell Orion SoC pinctrl driver for mpp
|
||||
|
||||
Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding
|
||||
part and usage.
|
||||
|
||||
Required properties:
|
||||
- compatible: "marvell,88f5181l-pinctrl", "marvell,88f5182-pinctrl",
|
||||
"marvell,88f5281-pinctrl"
|
||||
|
||||
- reg: two register areas, the first one describing the first two
|
||||
contiguous MPP registers, and the second one describing the single
|
||||
final MPP register, separated from the previous one.
|
||||
|
||||
Available mpp pins/groups and functions:
|
||||
Note: brackets (x) are not part of the mpp name for marvell,function and given
|
||||
only for more detailed description in this document.
|
||||
|
||||
* Marvell Orion 88f5181l
|
||||
|
||||
name pins functions
|
||||
================================================================================
|
||||
mpp0 0 pcie(rstout), pci(req2), gpio
|
||||
mpp1 1 gpio, pci(gnt2)
|
||||
mpp2 2 gpio, pci(req3), pci-1(pme)
|
||||
mpp3 3 gpio, pci(gnt3)
|
||||
mpp4 4 gpio, pci(req4)
|
||||
mpp5 5 gpio, pci(gnt4)
|
||||
mpp6 6 gpio, pci(req5), pci-1(clk)
|
||||
mpp7 7 gpio, pci(gnt5), pci-1(clk)
|
||||
mpp8 8 gpio, ge(col)
|
||||
mpp9 9 gpio, ge(rxerr)
|
||||
mpp10 10 gpio, ge(crs)
|
||||
mpp11 11 gpio, ge(txerr)
|
||||
mpp12 12 gpio, ge(txd4)
|
||||
mpp13 13 gpio, ge(txd5)
|
||||
mpp14 14 gpio, ge(txd6)
|
||||
mpp15 15 gpio, ge(txd7)
|
||||
mpp16 16 ge(rxd4)
|
||||
mpp17 17 ge(rxd5)
|
||||
mpp18 18 ge(rxd6)
|
||||
mpp19 19 ge(rxd7)
|
||||
|
||||
* Marvell Orion 88f5182
|
||||
|
||||
name pins functions
|
||||
================================================================================
|
||||
mpp0 0 pcie(rstout), pci(req2), gpio
|
||||
mpp1 1 gpio, pci(gnt2)
|
||||
mpp2 2 gpio, pci(req3), pci-1(pme)
|
||||
mpp3 3 gpio, pci(gnt3)
|
||||
mpp4 4 gpio, pci(req4), bootnand(re), sata0(prsnt)
|
||||
mpp5 5 gpio, pci(gnt4), bootnand(we), sata1(prsnt)
|
||||
mpp6 6 gpio, pci(req5), nand(re0), sata0(act)
|
||||
mpp7 7 gpio, pci(gnt5), nand(we0), sata1(act)
|
||||
mpp8 8 gpio, ge(col)
|
||||
mpp9 9 gpio, ge(rxerr)
|
||||
mpp10 10 gpio, ge(crs)
|
||||
mpp11 11 gpio, ge(txerr)
|
||||
mpp12 12 gpio, ge(txd4), nand(re1), sata0(ledprsnt)
|
||||
mpp13 13 gpio, ge(txd5), nand(we1), sata1(ledprsnt)
|
||||
mpp14 14 gpio, ge(txd6), nand(re2), sata0(ledact)
|
||||
mpp15 15 gpio, ge(txd7), nand(we2), sata1(ledact)
|
||||
mpp16 16 uart1(rxd), ge(rxd4), gpio
|
||||
mpp17 17 uart1(txd), ge(rxd5), gpio
|
||||
mpp18 18 uart1(cts), ge(rxd6), gpio
|
||||
mpp19 19 uart1(rts), ge(rxd7), gpio
|
||||
|
||||
* Marvell Orion 88f5281
|
||||
|
||||
name pins functions
|
||||
================================================================================
|
||||
mpp0 0 pcie(rstout), pci(req2), gpio
|
||||
mpp1 1 gpio, pci(gnt2)
|
||||
mpp2 2 gpio, pci(req3), pci(pme)
|
||||
mpp3 3 gpio, pci(gnt3)
|
||||
mpp4 4 gpio, pci(req4), bootnand(re)
|
||||
mpp5 5 gpio, pci(gnt4), bootnand(we)
|
||||
mpp6 6 gpio, pci(req5), nand(re0)
|
||||
mpp7 7 gpio, pci(gnt5), nand(we0)
|
||||
mpp8 8 gpio, ge(col)
|
||||
mpp9 9 gpio, ge(rxerr)
|
||||
mpp10 10 gpio, ge(crs)
|
||||
mpp11 11 gpio, ge(txerr)
|
||||
mpp12 12 gpio, ge(txd4), nand(re1)
|
||||
mpp13 13 gpio, ge(txd5), nand(we1)
|
||||
mpp14 14 gpio, ge(txd6), nand(re2)
|
||||
mpp15 15 gpio, ge(txd7), nand(we2)
|
||||
mpp16 16 uart1(rxd), ge(rxd4)
|
||||
mpp17 17 uart1(txd), ge(rxd5)
|
||||
mpp18 18 uart1(cts), ge(rxd6)
|
||||
mpp19 19 uart1(rts), ge(rxd7)
|
|
@ -156,6 +156,7 @@ input-disable - disable input on pin (no effect on output)
|
|||
input-schmitt-enable - enable schmitt-trigger mode
|
||||
input-schmitt-disable - disable schmitt-trigger mode
|
||||
input-debounce - debounce mode with debound time X
|
||||
power-source - select between different power supplies
|
||||
low-power-enable - enable low power mode
|
||||
low-power-disable - disable low power mode
|
||||
output-low - set the pin to output mode with low level
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
Qualcomm APQ8064 TLMM block
|
||||
|
||||
Required properties:
|
||||
- compatible: "qcom,apq8064-pinctrl"
|
||||
- reg: Should be the base address and length of the TLMM block.
|
||||
- interrupts: Should be the parent IRQ of the TLMM block.
|
||||
- interrupt-controller: Marks the device node as an interrupt controller.
|
||||
- #interrupt-cells: Should be two.
|
||||
- gpio-controller: Marks the device node as a GPIO controller.
|
||||
- #gpio-cells : Should be two.
|
||||
The first cell is the gpio pin number and the
|
||||
second cell is used for optional parameters.
|
||||
|
||||
Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
|
||||
a general description of GPIO and interrupt bindings.
|
||||
|
||||
Please refer to pinctrl-bindings.txt in this directory for details of the
|
||||
common pinctrl bindings used by client devices, including the meaning of the
|
||||
phrase "pin configuration node".
|
||||
|
||||
Qualcomm's pin configuration nodes act as a container for an abitrary number of
|
||||
subnodes. Each of these subnodes represents some desired configuration for a
|
||||
pin, a group, or a list of pins or groups. This configuration can include the
|
||||
mux function to select on those pin(s)/group(s), and various pin configuration
|
||||
parameters, such as pull-up, drive strength, etc.
|
||||
|
||||
The name of each subnode is not important; all subnodes should be enumerated
|
||||
and processed purely based on their content.
|
||||
|
||||
Each subnode only affects those parameters that are explicitly listed. In
|
||||
other words, a subnode that lists a mux function but no pin configuration
|
||||
parameters implies no information about any pin configuration parameters.
|
||||
Similarly, a pin subnode that describes a pullup parameter implies no
|
||||
information about e.g. the mux function.
|
||||
|
||||
|
||||
The following generic properties as defined in pinctrl-bindings.txt are valid
|
||||
to specify in a pin configuration subnode:
|
||||
|
||||
pins, function, bias-disable, bias-pull-down, bias-pull,up, drive-strength,
|
||||
output-low, output-high.
|
||||
|
||||
Non-empty subnodes must specify the 'pins' property.
|
||||
|
||||
Valid values for pins are:
|
||||
gpio0-gpio89
|
||||
|
||||
Valid values for function are:
|
||||
cam_mclk, codec_mic_i2s, codec_spkr_i2s, gsbi1, gsbi2, gsbi3, gsbi4,
|
||||
gsbi4_cam_i2c, gsbi5, gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6,
|
||||
gsbi6_spi_cs1, gsbi6_spi_cs2, gsbi6_spi_cs3, gsbi7, gsbi7_spi_cs1,
|
||||
gsbi7_spi_cs2, gsbi7_spi_cs3, gsbi_cam_i2c, hdmi, mi2s, riva_bt, riva_fm,
|
||||
riva_wlan, sdc2, sdc4, slimbus, spkr_i2s, tsif1, tsif2, usb2_hsic,
|
||||
|
||||
Example:
|
||||
|
||||
msmgpio: pinctrl@800000 {
|
||||
compatible = "qcom,apq8064-pinctrl";
|
||||
reg = <0x800000 0x4000>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <0 32 0x4>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gsbi5_uart_default>;
|
||||
|
||||
gsbi5_uart_default: gsbi5_uart_default {
|
||||
mux {
|
||||
pins = "gpio51", "gpio52";
|
||||
function = "gsbi5";
|
||||
};
|
||||
|
||||
tx {
|
||||
pins = "gpio51";
|
||||
drive-strength = <4>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
rx {
|
||||
pins = "gpio52";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -0,0 +1,95 @@
|
|||
Qualcomm IPQ8064 TLMM block
|
||||
|
||||
Required properties:
|
||||
- compatible: "qcom,ipq8064-pinctrl"
|
||||
- reg: Should be the base address and length of the TLMM block.
|
||||
- interrupts: Should be the parent IRQ of the TLMM block.
|
||||
- interrupt-controller: Marks the device node as an interrupt controller.
|
||||
- #interrupt-cells: Should be two.
|
||||
- gpio-controller: Marks the device node as a GPIO controller.
|
||||
- #gpio-cells : Should be two.
|
||||
The first cell is the gpio pin number and the
|
||||
second cell is used for optional parameters.
|
||||
|
||||
Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
|
||||
a general description of GPIO and interrupt bindings.
|
||||
|
||||
Please refer to pinctrl-bindings.txt in this directory for details of the
|
||||
common pinctrl bindings used by client devices, including the meaning of the
|
||||
phrase "pin configuration node".
|
||||
|
||||
Qualcomm's pin configuration nodes act as a container for an abitrary number of
|
||||
subnodes. Each of these subnodes represents some desired configuration for a
|
||||
pin, a group, or a list of pins or groups. This configuration can include the
|
||||
mux function to select on those pin(s)/group(s), and various pin configuration
|
||||
parameters, such as pull-up, drive strength, etc.
|
||||
|
||||
The name of each subnode is not important; all subnodes should be enumerated
|
||||
and processed purely based on their content.
|
||||
|
||||
Each subnode only affects those parameters that are explicitly listed. In
|
||||
other words, a subnode that lists a mux function but no pin configuration
|
||||
parameters implies no information about any pin configuration parameters.
|
||||
Similarly, a pin subnode that describes a pullup parameter implies no
|
||||
information about e.g. the mux function.
|
||||
|
||||
|
||||
The following generic properties as defined in pinctrl-bindings.txt are valid
|
||||
to specify in a pin configuration subnode:
|
||||
|
||||
pins, function, bias-disable, bias-pull-down, bias-pull,up, drive-strength,
|
||||
output-low, output-high.
|
||||
|
||||
Non-empty subnodes must specify the 'pins' property.
|
||||
|
||||
Valid values for qcom,pins are:
|
||||
gpio0-gpio68
|
||||
Supports mux, bias, and drive-strength
|
||||
|
||||
sdc3_clk, sdc3_cmd, sdc3_data
|
||||
Supports bias and drive-strength
|
||||
|
||||
|
||||
Valid values for function are:
|
||||
mdio, mi2s, pdm, ssbi, spmi, audio_pcm, gsbi1, gsbi2, gsbi4, gsbi5,
|
||||
gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6, gsbi7, nss_spi, sdc1,
|
||||
spdif, nand, tsif1, tsif2, usb_fs_n, usb_fs, usb2_hsic, rgmii2, sata,
|
||||
pcie1_rst, pcie1_prsnt, pcie1_pwren_n, pcie1_pwren, pcie1_pwrflt,
|
||||
pcie1_clk_req, pcie2_rst, pcie2_prsnt, pcie2_pwren_n, pcie2_pwren,
|
||||
pcie2_pwrflt, pcie2_clk_req, pcie3_rst, pcie3_prsnt, pcie3_pwren_n,
|
||||
pcie3_pwren, pcie3_pwrflt, pcie3_clk_req, ps_hold
|
||||
|
||||
Example:
|
||||
|
||||
pinmux: pinctrl@800000 {
|
||||
compatible = "qcom,ipq8064-pinctrl";
|
||||
reg = <0x800000 0x4000>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <0 32 0x4>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gsbi5_uart_default>;
|
||||
|
||||
gsbi5_uart_default: gsbi5_uart_default {
|
||||
mux {
|
||||
pins = "gpio18", "gpio19";
|
||||
function = "gsbi5";
|
||||
};
|
||||
|
||||
tx {
|
||||
pins = "gpio18";
|
||||
drive-strength = <4>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
rx {
|
||||
pins = "gpio19";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -50,7 +50,27 @@ Valid values for pins are:
|
|||
Supports bias and drive-strength
|
||||
|
||||
Valid values for function are:
|
||||
blsp_i2c2, blsp_i2c6, blsp_i2c11, blsp_spi1, blsp_uart2, blsp_uart8, slimbus
|
||||
cci_i2c0, cci_i2c1, uim1, uim2, uim_batt_alarm,
|
||||
blsp_uim1, blsp_uart1, blsp_i2c1, blsp_spi1,
|
||||
blsp_uim2, blsp_uart2, blsp_i2c2, blsp_spi2,
|
||||
blsp_uim3, blsp_uart3, blsp_i2c3, blsp_spi3,
|
||||
blsp_uim4, blsp_uart4, blsp_i2c4, blsp_spi4,
|
||||
blsp_uim5, blsp_uart5, blsp_i2c5, blsp_spi5,
|
||||
blsp_uim6, blsp_uart6, blsp_i2c6, blsp_spi6,
|
||||
blsp_uim7, blsp_uart7, blsp_i2c7, blsp_spi7,
|
||||
blsp_uim8, blsp_uart8, blsp_i2c8, blsp_spi8,
|
||||
blsp_uim9, blsp_uart9, blsp_i2c9, blsp_spi9,
|
||||
blsp_uim10, blsp_uart10, blsp_i2c10, blsp_spi10,
|
||||
blsp_uim11, blsp_uart11, blsp_i2c11, blsp_spi11,
|
||||
blsp_uim12, blsp_uart12, blsp_i2c12, blsp_spi12,
|
||||
blsp_spi1_cs1, blsp_spi2_cs2, blsp_spi_cs3, blsp_spi2_cs1, blsp_spi2_cs2
|
||||
blsp_spi2_cs3, blsp_spi10_cs1, blsp_spi10_cs2, blsp_spi10_cs3,
|
||||
sdc3, sdc4, gcc_gp_clk1, gcc_gp_clk2, gcc_gp_clk3, cci_timer0, cci_timer1,
|
||||
cci_timer2, cci_timer3, cci_async_in0, cci_async_in1, cci_async_in2,
|
||||
cam_mckl0, cam_mclk1, cam_mclk2, cam_mclk3, mdp_vsync, hdmi_cec, hdmi_ddc,
|
||||
hdmi_hpd, edp_hpd, gp_pdm0, gp_pdm1, gp_pdm2, gp_pdm3, gp0_clk, gp1_clk,
|
||||
gp_mn, tsif1, tsif2, hsic, grfc, audio_ref_clk, qua_mi2s, pri_mi2s, spkr_mi2s,
|
||||
ter_mi2s, sec_mi2s, bt, fm, wlan, slimbus
|
||||
|
||||
(Note that this is not yet the complete list of functions)
|
||||
|
||||
|
|
|
@ -21,13 +21,23 @@ defined as gpio sub-nodes of the pinmux controller.
|
|||
Required properties for iomux controller:
|
||||
- compatible: one of "rockchip,rk2928-pinctrl", "rockchip,rk3066a-pinctrl"
|
||||
"rockchip,rk3066b-pinctrl", "rockchip,rk3188-pinctrl"
|
||||
- rockchip,grf: phandle referencing a syscon providing the
|
||||
"general register files"
|
||||
|
||||
Optional properties for iomux controller:
|
||||
- rockchip,pmu: phandle referencing a syscon providing the pmu registers
|
||||
as some SoCs carry parts of the iomux controller registers there.
|
||||
Required for at least rk3188 and rk3288.
|
||||
|
||||
Deprecated properties for iomux controller:
|
||||
- reg: first element is the general register space of the iomux controller
|
||||
second element is the separate pull register space of the rk3188
|
||||
It should be large enough to contain also separate pull registers.
|
||||
second element is the separate pull register space of the rk3188.
|
||||
Use rockchip,grf and rockchip,pmu described above instead.
|
||||
|
||||
Required properties for gpio sub nodes:
|
||||
- compatible: "rockchip,gpio-bank", "rockchip,rk3188-gpio-bank0"
|
||||
- reg: register of the gpio bank (different than the iomux registerset)
|
||||
second element: separate pull register for rk3188 bank0
|
||||
- interrupts: base interrupt of the gpio bank in the interrupt controller
|
||||
- clocks: clock that drives this bank
|
||||
- gpio-controller: identifies the node as a gpio controller and pin bank.
|
||||
|
@ -39,6 +49,10 @@ Required properties for gpio sub nodes:
|
|||
cells should use the standard two-cell scheme described in
|
||||
bindings/interrupt-controller/interrupts.txt
|
||||
|
||||
Deprecated properties for gpio sub nodes:
|
||||
- reg: second element: separate pull register for rk3188 bank0, use
|
||||
rockchip,pmu described above instead
|
||||
|
||||
Required properties for pin configuration node:
|
||||
- rockchip,pins: 3 integers array, represents a group of pins mux and config
|
||||
setting. The format is rockchip,pins = <PIN_BANK PIN_BANK_IDX MUX &phandle>.
|
||||
|
@ -54,7 +68,8 @@ Examples:
|
|||
|
||||
pinctrl@20008000 {
|
||||
compatible = "rockchip,rk3066a-pinctrl";
|
||||
reg = <0x20008000 0x150>;
|
||||
rockchip,grf = <&grf>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
@ -103,16 +118,15 @@ Example for rk3188:
|
|||
|
||||
pinctrl@20008000 {
|
||||
compatible = "rockchip,rk3188-pinctrl";
|
||||
reg = <0x20008000 0xa0>,
|
||||
<0x20008164 0x1a0>;
|
||||
rockchip,grf = <&grf>;
|
||||
rockchip,pmu = <&pmu>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
gpio0: gpio0@0x2000a000 {
|
||||
compatible = "rockchip,rk3188-gpio-bank0";
|
||||
reg = <0x2000a000 0x100>,
|
||||
<0x20004064 0x8>;
|
||||
reg = <0x2000a000 0x100>;
|
||||
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk_gates8 9>;
|
||||
|
||||
|
|
|
@ -1629,9 +1629,9 @@ config ARCH_NR_GPIO
|
|||
int
|
||||
default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
|
||||
default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX
|
||||
default 416 if ARCH_SUNXI
|
||||
default 392 if ARCH_U8500
|
||||
default 352 if ARCH_VT8500
|
||||
default 288 if ARCH_SUNXI
|
||||
default 264 if MACH_H4700
|
||||
default 0
|
||||
help
|
||||
|
|
|
@ -180,6 +180,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
|
|||
{ "80860F14", (unsigned long)&byt_sdio_dev_desc },
|
||||
{ "80860F41", (unsigned long)&byt_i2c_dev_desc },
|
||||
{ "INT33B2", },
|
||||
{ "INT33FC", },
|
||||
|
||||
{ "INT3430", (unsigned long)&lpt_dev_desc },
|
||||
{ "INT3431", (unsigned long)&lpt_dev_desc },
|
||||
|
|
|
@ -84,6 +84,9 @@ config PINCTRL_AT91
|
|||
depends on ARCH_AT91
|
||||
select PINMUX
|
||||
select PINCONF
|
||||
select GPIOLIB
|
||||
select OF_GPIO
|
||||
select GPIOLIB_IRQCHIP
|
||||
help
|
||||
Say Y here to enable the at91 pinctrl driver
|
||||
|
||||
|
@ -185,6 +188,13 @@ config PINCTRL_IMX6SL
|
|||
help
|
||||
Say Y here to enable the imx6sl pinctrl driver
|
||||
|
||||
config PINCTRL_IMX6SX
|
||||
bool "IMX6SX pinctrl driver"
|
||||
depends on SOC_IMX6SX
|
||||
select PINCTRL_IMX
|
||||
help
|
||||
Say Y here to enable the imx6sx pinctrl driver
|
||||
|
||||
config PINCTRL_VF610
|
||||
bool "Freescale Vybrid VF610 pinctrl driver"
|
||||
depends on SOC_VF610
|
||||
|
@ -221,10 +231,27 @@ config PINCTRL_MSM
|
|||
select PINMUX
|
||||
select PINCONF
|
||||
select GENERIC_PINCONF
|
||||
select GPIOLIB_IRQCHIP
|
||||
|
||||
config PINCTRL_APQ8064
|
||||
tristate "Qualcomm APQ8064 pin controller driver"
|
||||
depends on GPIOLIB && OF
|
||||
select PINCTRL_MSM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm APQ8064 platform.
|
||||
|
||||
config PINCTRL_IPQ8064
|
||||
tristate "Qualcomm IPQ8064 pin controller driver"
|
||||
depends on GPIOLIB && OF
|
||||
select PINCTRL_MSM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
Qualcomm TLMM block found in the Qualcomm IPQ8064 platform.
|
||||
|
||||
config PINCTRL_MSM8X74
|
||||
tristate "Qualcomm 8x74 pin controller driver"
|
||||
depends on GPIOLIB && OF
|
||||
depends on GPIOLIB && OF && (ARCH_QCOM || COMPILE_TEST)
|
||||
select PINCTRL_MSM
|
||||
help
|
||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||
|
@ -256,6 +283,7 @@ config PINCTRL_ROCKCHIP
|
|||
select PINMUX
|
||||
select GENERIC_PINCONF
|
||||
select GENERIC_IRQ_CHIP
|
||||
select MFD_SYSCON
|
||||
|
||||
config PINCTRL_SINGLE
|
||||
tristate "One-register-per-pin type device tree based pinctrl driver"
|
||||
|
@ -270,17 +298,14 @@ config PINCTRL_SIRF
|
|||
bool "CSR SiRFprimaII/SiRFmarco pin controller driver"
|
||||
depends on ARCH_SIRF
|
||||
select PINMUX
|
||||
|
||||
config PINCTRL_SUNXI
|
||||
bool
|
||||
select PINMUX
|
||||
select GENERIC_PINCONF
|
||||
select GPIOLIB_IRQCHIP
|
||||
|
||||
config PINCTRL_ST
|
||||
bool
|
||||
depends on OF
|
||||
select PINMUX
|
||||
select PINCONF
|
||||
select GPIOLIB_IRQCHIP
|
||||
|
||||
config PINCTRL_TEGRA
|
||||
bool
|
||||
|
@ -368,9 +393,11 @@ config PINCTRL_S3C64XX
|
|||
depends on ARCH_S3C64XX
|
||||
select PINCTRL_SAMSUNG
|
||||
|
||||
source "drivers/pinctrl/berlin/Kconfig"
|
||||
source "drivers/pinctrl/mvebu/Kconfig"
|
||||
source "drivers/pinctrl/sh-pfc/Kconfig"
|
||||
source "drivers/pinctrl/spear/Kconfig"
|
||||
source "drivers/pinctrl/sunxi/Kconfig"
|
||||
source "drivers/pinctrl/vt8500/Kconfig"
|
||||
|
||||
config PINCTRL_XWAY
|
||||
|
|
|
@ -32,12 +32,15 @@ obj-$(CONFIG_PINCTRL_IMX53) += pinctrl-imx53.o
|
|||
obj-$(CONFIG_PINCTRL_IMX6Q) += pinctrl-imx6q.o
|
||||
obj-$(CONFIG_PINCTRL_IMX6Q) += pinctrl-imx6dl.o
|
||||
obj-$(CONFIG_PINCTRL_IMX6SL) += pinctrl-imx6sl.o
|
||||
obj-$(CONFIG_PINCTRL_IMX6SX) += pinctrl-imx6sx.o
|
||||
obj-$(CONFIG_PINCTRL_FALCON) += pinctrl-falcon.o
|
||||
obj-$(CONFIG_PINCTRL_MXS) += pinctrl-mxs.o
|
||||
obj-$(CONFIG_PINCTRL_IMX23) += pinctrl-imx23.o
|
||||
obj-$(CONFIG_PINCTRL_IMX25) += pinctrl-imx25.o
|
||||
obj-$(CONFIG_PINCTRL_IMX28) += pinctrl-imx28.o
|
||||
obj-$(CONFIG_PINCTRL_MSM) += pinctrl-msm.o
|
||||
obj-$(CONFIG_PINCTRL_APQ8064) += pinctrl-apq8064.o
|
||||
obj-$(CONFIG_PINCTRL_IPQ8064) += pinctrl-ipq8064.o
|
||||
obj-$(CONFIG_PINCTRL_MSM8X74) += pinctrl-msm8x74.o
|
||||
obj-$(CONFIG_PINCTRL_NOMADIK) += pinctrl-nomadik.o
|
||||
obj-$(CONFIG_PINCTRL_STN8815) += pinctrl-nomadik-stn8815.o
|
||||
|
@ -47,7 +50,6 @@ obj-$(CONFIG_PINCTRL_PALMAS) += pinctrl-palmas.o
|
|||
obj-$(CONFIG_PINCTRL_ROCKCHIP) += pinctrl-rockchip.o
|
||||
obj-$(CONFIG_PINCTRL_SINGLE) += pinctrl-single.o
|
||||
obj-$(CONFIG_PINCTRL_SIRF) += sirf/
|
||||
obj-$(CONFIG_PINCTRL_SUNXI) += pinctrl-sunxi.o
|
||||
obj-$(CONFIG_PINCTRL_TEGRA) += pinctrl-tegra.o
|
||||
obj-$(CONFIG_PINCTRL_TEGRA20) += pinctrl-tegra20.o
|
||||
obj-$(CONFIG_PINCTRL_TEGRA30) += pinctrl-tegra30.o
|
||||
|
@ -68,8 +70,10 @@ obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-tb10x.o
|
|||
obj-$(CONFIG_PINCTRL_ST) += pinctrl-st.o
|
||||
obj-$(CONFIG_PINCTRL_VF610) += pinctrl-vf610.o
|
||||
|
||||
obj-$(CONFIG_ARCH_BERLIN) += berlin/
|
||||
obj-$(CONFIG_PLAT_ORION) += mvebu/
|
||||
obj-$(CONFIG_ARCH_SHMOBILE) += sh-pfc/
|
||||
obj-$(CONFIG_SUPERH) += sh-pfc/
|
||||
obj-$(CONFIG_PLAT_SPEAR) += spear/
|
||||
obj-$(CONFIG_ARCH_VT8500) += vt8500/
|
||||
obj-$(CONFIG_ARCH_SUNXI) += sunxi/
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
if ARCH_BERLIN
|
||||
|
||||
config PINCTRL_BERLIN
|
||||
bool
|
||||
select PINMUX
|
||||
select REGMAP_MMIO
|
||||
|
||||
config PINCTRL_BERLIN_BG2
|
||||
bool
|
||||
select PINCTRL_BERLIN
|
||||
|
||||
config PINCTRL_BERLIN_BG2CD
|
||||
bool
|
||||
select PINCTRL_BERLIN
|
||||
|
||||
config PINCTRL_BERLIN_BG2Q
|
||||
bool
|
||||
select PINCTRL_BERLIN
|
||||
|
||||
endif
|
|
@ -0,0 +1,4 @@
|
|||
obj-$(CONFIG_PINCTRL_BERLIN) += berlin.o
|
||||
obj-$(CONFIG_PINCTRL_BERLIN_BG2) += berlin-bg2.o
|
||||
obj-$(CONFIG_PINCTRL_BERLIN_BG2CD) += berlin-bg2cd.o
|
||||
obj-$(CONFIG_PINCTRL_BERLIN_BG2Q) += berlin-bg2q.o
|
|
@ -0,0 +1,274 @@
|
|||
/*
|
||||
* Marvell Berlin BG2 pinctrl driver.
|
||||
*
|
||||
* Copyright (C) 2014 Marvell Technology Group Ltd.
|
||||
*
|
||||
* Antoine Ténart <antoine.tenart@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include "berlin.h"
|
||||
|
||||
static const struct berlin_desc_group berlin2_soc_pinctrl_groups[] = {
|
||||
/* G */
|
||||
BERLIN_PINCTRL_GROUP("G0", 0x00, 0x1, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "spi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G1", 0x00, 0x2, 0x01,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "spi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "usb1")),
|
||||
BERLIN_PINCTRL_GROUP("G2", 0x00, 0x2, 0x02,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "pwm"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "i2s0")),
|
||||
BERLIN_PINCTRL_GROUP("G3", 0x00, 0x2, 0x04,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "soc"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "i2s1")),
|
||||
BERLIN_PINCTRL_GROUP("G4", 0x00, 0x2, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "spi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "pwm")),
|
||||
BERLIN_PINCTRL_GROUP("G5", 0x00, 0x3, 0x08,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sts1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "et"),
|
||||
/*
|
||||
* Mode 0x3 mux i2s2 mclk *and* i2s3 mclk:
|
||||
* add two functions so it can be used with other groups
|
||||
* within the same subnode in the device tree
|
||||
*/
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "i2s2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "i2s3")),
|
||||
BERLIN_PINCTRL_GROUP("G6", 0x00, 0x2, 0x0b,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sts0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "et")),
|
||||
BERLIN_PINCTRL_GROUP("G7", 0x00, 0x3, 0x0d,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sts0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "et"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "vdac")),
|
||||
BERLIN_PINCTRL_GROUP("G8", 0x00, 0x3, 0x10,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sd0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "et"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "sata_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G9", 0x00, 0x3, 0x13,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sd0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "et"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "sata_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G10", 0x00, 0x2, 0x16,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "soc"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "twsi0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "ptp")),
|
||||
BERLIN_PINCTRL_GROUP("G11", 0x00, 0x2, 0x18,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "soc"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "twsi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "eddc")),
|
||||
BERLIN_PINCTRL_GROUP("G12", 0x00, 0x3, 0x1a,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "sts2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sata"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "sd1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "sts1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G13", 0x04, 0x3, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sata"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "sd1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "sts1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G14", 0x04, 0x1, 0x03,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G15", 0x04, 0x2, 0x04,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "et"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "osco")),
|
||||
BERLIN_PINCTRL_GROUP("G16", 0x04, 0x3, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dvio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp")),
|
||||
BERLIN_PINCTRL_GROUP("G17", 0x04, 0x3, 0x09,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dvio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp")),
|
||||
BERLIN_PINCTRL_GROUP("G18", 0x04, 0x1, 0x0c,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "pll"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "i2s0")),
|
||||
BERLIN_PINCTRL_GROUP("G19", 0x04, 0x1, 0x0d,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "i2s0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "pwm")),
|
||||
BERLIN_PINCTRL_GROUP("G20", 0x04, 0x1, 0x0e,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "spdif"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "arc")),
|
||||
BERLIN_PINCTRL_GROUP("G21", 0x04, 0x3, 0x0f,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dvio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "adac_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "pdm_a"), /* gpio17..19,pdm */
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "pdm_b")), /* gpio12..14,pdm */
|
||||
BERLIN_PINCTRL_GROUP("G22", 0x04, 0x3, 0x12,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dv0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "twsi0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "pwm")),
|
||||
BERLIN_PINCTRL_GROUP("G23", 0x04, 0x3, 0x15,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "vclki"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dv0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "i2s0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "pwm"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "pdm")),
|
||||
BERLIN_PINCTRL_GROUP("G24", 0x04, 0x2, 0x18,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "i2s2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "i2s1")),
|
||||
BERLIN_PINCTRL_GROUP("G25", 0x04, 0x2, 0x1a,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "nand"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "i2s2")),
|
||||
BERLIN_PINCTRL_GROUP("G26", 0x04, 0x1, 0x1c,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "nand"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "emmc")),
|
||||
BERLIN_PINCTRL_GROUP("G27", 0x04, 0x1, 0x1d,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "nand")),
|
||||
BERLIN_PINCTRL_GROUP("G28", 0x04, 0x2, 0x1e,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "dvo"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "sp")),
|
||||
};
|
||||
|
||||
static const struct berlin_desc_group berlin2_sysmgr_pinctrl_groups[] = {
|
||||
/* GSM */
|
||||
BERLIN_PINCTRL_GROUP("GSM0", 0x40, 0x2, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "eth1")),
|
||||
BERLIN_PINCTRL_GROUP("GSM1", 0x40, 0x2, 0x02,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "eth1")),
|
||||
BERLIN_PINCTRL_GROUP("GSM2", 0x40, 0x2, 0x04,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "twsi2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi2")),
|
||||
BERLIN_PINCTRL_GROUP("GSM3", 0x40, 0x2, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "uart0"), /* CTS/RTS */
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "uart2"), /* RX/TX */
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "twsi2")),
|
||||
BERLIN_PINCTRL_GROUP("GSM4", 0x40, 0x2, 0x08,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "uart0"), /* RX/TX */
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "irda0")),
|
||||
BERLIN_PINCTRL_GROUP("GSM5", 0x40, 0x2, 0x0a,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "uart1"), /* RX/TX */
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "irda1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "twsi3")),
|
||||
BERLIN_PINCTRL_GROUP("GSM6", 0x40, 0x2, 0x0c,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "clki")),
|
||||
BERLIN_PINCTRL_GROUP("GSM7", 0x40, 0x1, 0x0e,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "hdmi")),
|
||||
BERLIN_PINCTRL_GROUP("GSM8", 0x40, 0x1, 0x0f,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "hdmi")),
|
||||
BERLIN_PINCTRL_GROUP("GSM9", 0x40, 0x1, 0x10,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "led")),
|
||||
BERLIN_PINCTRL_GROUP("GSM10", 0x40, 0x1, 0x11,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "led")),
|
||||
BERLIN_PINCTRL_GROUP("GSM11", 0x40, 0x1, 0x12,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "led")),
|
||||
};
|
||||
|
||||
static const struct berlin_pinctrl_desc berlin2_soc_pinctrl_data = {
|
||||
.groups = berlin2_soc_pinctrl_groups,
|
||||
.ngroups = ARRAY_SIZE(berlin2_soc_pinctrl_groups),
|
||||
};
|
||||
|
||||
static const struct berlin_pinctrl_desc berlin2_sysmgr_pinctrl_data = {
|
||||
.groups = berlin2_sysmgr_pinctrl_groups,
|
||||
.ngroups = ARRAY_SIZE(berlin2_sysmgr_pinctrl_groups),
|
||||
};
|
||||
|
||||
static const struct of_device_id berlin2_pinctrl_match[] = {
|
||||
{
|
||||
.compatible = "marvell,berlin2-chip-ctrl",
|
||||
.data = &berlin2_soc_pinctrl_data
|
||||
},
|
||||
{
|
||||
.compatible = "marvell,berlin2-system-ctrl",
|
||||
.data = &berlin2_sysmgr_pinctrl_data
|
||||
},
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, berlin2_pinctrl_match);
|
||||
|
||||
static int berlin2_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct of_device_id *match =
|
||||
of_match_device(berlin2_pinctrl_match, &pdev->dev);
|
||||
struct regmap_config *rmconfig;
|
||||
struct regmap *regmap;
|
||||
struct resource *res;
|
||||
void __iomem *base;
|
||||
|
||||
rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL);
|
||||
if (!rmconfig)
|
||||
return -ENOMEM;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
rmconfig->reg_bits = 32,
|
||||
rmconfig->val_bits = 32,
|
||||
rmconfig->reg_stride = 4,
|
||||
rmconfig->max_register = resource_size(res);
|
||||
|
||||
regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
return berlin_pinctrl_probe(pdev, match->data);
|
||||
}
|
||||
|
||||
static struct platform_driver berlin2_pinctrl_driver = {
|
||||
.probe = berlin2_pinctrl_probe,
|
||||
.driver = {
|
||||
.name = "berlin-bg2-pinctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = berlin2_pinctrl_match,
|
||||
},
|
||||
};
|
||||
module_platform_driver(berlin2_pinctrl_driver);
|
||||
|
||||
MODULE_AUTHOR("Antoine Ténart <antoine.tenart@free-electrons.com>");
|
||||
MODULE_DESCRIPTION("Marvell Berlin BG2 pinctrl driver");
|
||||
MODULE_LICENSE("GPL");
|
|
@ -0,0 +1,217 @@
|
|||
/*
|
||||
* Marvell Berlin BG2CD pinctrl driver.
|
||||
*
|
||||
* Copyright (C) 2014 Marvell Technology Group Ltd.
|
||||
*
|
||||
* Antoine Ténart <antoine.tenart@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include "berlin.h"
|
||||
|
||||
static const struct berlin_desc_group berlin2cd_soc_pinctrl_groups[] = {
|
||||
/* G */
|
||||
BERLIN_PINCTRL_GROUP("G0", 0x00, 0x1, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "jtag"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "led"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "pwm")),
|
||||
BERLIN_PINCTRL_GROUP("G1", 0x00, 0x2, 0x01,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sd0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G2", 0x00, 0x2, 0x02,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sd0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fe"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "pll"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G3", 0x00, 0x2, 0x04,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sd0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "twsi2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "pll"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "fe"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G4", 0x00, 0x2, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sd0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "twsi3"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "pll"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "pwm"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G5", 0x00, 0x3, 0x08,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sd0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "twsi3"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "arc"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "pwm"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G6", 0x00, 0x2, 0x0b,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "uart0"), /* RX/TX */
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G7", 0x00, 0x3, 0x0d,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "eddc"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "twsi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G8", 0x00, 0x3, 0x10,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "ss0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G9", 0x00, 0x3, 0x13,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "twsi0")),
|
||||
BERLIN_PINCTRL_GROUP("G10", 0x00, 0x2, 0x16,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "spi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G11", 0x00, 0x2, 0x18,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "spi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G12", 0x00, 0x3, 0x1a,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "usb1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G13", 0x04, 0x3, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "nand"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G14", 0x04, 0x1, 0x03,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "nand"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G15", 0x04, 0x2, 0x04,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "jtag"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G16", 0x04, 0x3, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G17", 0x04, 0x3, 0x09,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G18", 0x04, 0x1, 0x0c,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G19", 0x04, 0x1, 0x0d,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G20", 0x04, 0x1, 0x0e,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G21", 0x04, 0x3, 0x0f,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G22", 0x04, 0x3, 0x12,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G23", 0x04, 0x3, 0x15,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G24", 0x04, 0x2, 0x18,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G25", 0x04, 0x2, 0x1a,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G26", 0x04, 0x1, 0x1c,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G27", 0x04, 0x1, 0x1d,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("G28", 0x04, 0x2, 0x1e,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
};
|
||||
|
||||
static const struct berlin_desc_group berlin2cd_sysmgr_pinctrl_groups[] = {
|
||||
/* GSM */
|
||||
BERLIN_PINCTRL_GROUP("GSM0", 0x40, 0x2, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("GSM1", 0x40, 0x2, 0x02,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("GSM2", 0x40, 0x2, 0x04,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("GSM3", 0x40, 0x2, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("GSM4", 0x40, 0x2, 0x08,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("GSM5", 0x40, 0x2, 0x0a,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("GSM6", 0x40, 0x2, 0x0c,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("GSM7", 0x40, 0x1, 0x0e,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("GSM8", 0x40, 0x1, 0x0f,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("GSM9", 0x40, 0x1, 0x10,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("GSM10", 0x40, 0x1, 0x11,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
BERLIN_PINCTRL_GROUP("GSM11", 0x40, 0x1, 0x12,
|
||||
BERLIN_PINCTRL_FUNCTION_UNKNOWN),
|
||||
};
|
||||
|
||||
static const struct berlin_pinctrl_desc berlin2cd_soc_pinctrl_data = {
|
||||
.groups = berlin2cd_soc_pinctrl_groups,
|
||||
.ngroups = ARRAY_SIZE(berlin2cd_soc_pinctrl_groups),
|
||||
};
|
||||
|
||||
static const struct berlin_pinctrl_desc berlin2cd_sysmgr_pinctrl_data = {
|
||||
.groups = berlin2cd_sysmgr_pinctrl_groups,
|
||||
.ngroups = ARRAY_SIZE(berlin2cd_sysmgr_pinctrl_groups),
|
||||
};
|
||||
|
||||
static const struct of_device_id berlin2cd_pinctrl_match[] = {
|
||||
{
|
||||
.compatible = "marvell,berlin2cd-chip-ctrl",
|
||||
.data = &berlin2cd_soc_pinctrl_data
|
||||
},
|
||||
{
|
||||
.compatible = "marvell,berlin2cd-system-ctrl",
|
||||
.data = &berlin2cd_sysmgr_pinctrl_data
|
||||
},
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, berlin2cd_pinctrl_match);
|
||||
|
||||
static int berlin2cd_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct of_device_id *match =
|
||||
of_match_device(berlin2cd_pinctrl_match, &pdev->dev);
|
||||
struct regmap_config *rmconfig;
|
||||
struct regmap *regmap;
|
||||
struct resource *res;
|
||||
void __iomem *base;
|
||||
|
||||
rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL);
|
||||
if (!rmconfig)
|
||||
return -ENOMEM;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
rmconfig->reg_bits = 32,
|
||||
rmconfig->val_bits = 32,
|
||||
rmconfig->reg_stride = 4,
|
||||
rmconfig->max_register = resource_size(res);
|
||||
|
||||
regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
return berlin_pinctrl_probe(pdev, match->data);
|
||||
}
|
||||
|
||||
static struct platform_driver berlin2cd_pinctrl_driver = {
|
||||
.probe = berlin2cd_pinctrl_probe,
|
||||
.driver = {
|
||||
.name = "berlin-bg2cd-pinctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = berlin2cd_pinctrl_match,
|
||||
},
|
||||
};
|
||||
module_platform_driver(berlin2cd_pinctrl_driver);
|
||||
|
||||
MODULE_AUTHOR("Antoine Ténart <antoine.tenart@free-electrons.com>");
|
||||
MODULE_DESCRIPTION("Marvell Berlin BG2CD pinctrl driver");
|
||||
MODULE_LICENSE("GPL");
|
|
@ -0,0 +1,436 @@
|
|||
/*
|
||||
* Marvell Berlin BG2Q pinctrl driver
|
||||
*
|
||||
* Copyright (C) 2014 Marvell Technology Group Ltd.
|
||||
*
|
||||
* Antoine Ténart <antoine.tenart@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include "berlin.h"
|
||||
|
||||
static const struct berlin_desc_group berlin2q_soc_pinctrl_groups[] = {
|
||||
/* G */
|
||||
BERLIN_PINCTRL_GROUP("G0", 0x18, 0x3, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "nand"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "mmc"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G1", 0x18, 0x3, 0x03,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "nand"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G2", 0x18, 0x3, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "arc"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "lvds")),
|
||||
BERLIN_PINCTRL_GROUP("G3", 0x18, 0x3, 0x09,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "i2s2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "lvds")),
|
||||
BERLIN_PINCTRL_GROUP("G4", 0x18, 0x3, 0x0c,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "pll"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sd0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "rgmii"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x5, "sata_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G5", 0x18, 0x3, 0x0f,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sd0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "rgmii"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x5, "sata_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G6", 0x18, 0x3, 0x12,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "jtag"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "twsi0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G7", 0x18, 0x3, 0x15,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "jtag"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "twsi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "eddc")),
|
||||
BERLIN_PINCTRL_GROUP("G8", 0x18, 0x3, 0x18,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "spi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G9", 0x18, 0x3, 0x1b,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "spi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x5, "sata")),
|
||||
BERLIN_PINCTRL_GROUP("G10", 0x1c, 0x3, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "i2s0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "pwm"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x5, "sata")),
|
||||
BERLIN_PINCTRL_GROUP("G11", 0x1c, 0x3, 0x03,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "jtag"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "i2s1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "pwm"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x5, "sata")),
|
||||
BERLIN_PINCTRL_GROUP("G12", 0x1c, 0x3, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "agc"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G13", 0x1c, 0x3, 0x09,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sts1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "rgmii"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G14", 0x1c, 0x3, 0x0c,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sts0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "sts1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G15", 0x1c, 0x3, 0x0f,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sts0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "sts1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x5, "vdac"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G16", 0x1c, 0x3, 0x12,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sts0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "sts1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x5, "osco"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G17", 0x1c, 0x3, 0x15,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "rgmii"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "spdif"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "sts1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "usb0_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G18", 0x1c, 0x3, 0x18,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "rgmii"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "i2s2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "sts1")),
|
||||
BERLIN_PINCTRL_GROUP("G19", 0x1c, 0x3, 0x1b,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "rgmii"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "i2s3"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "sts1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x5, "osco")),
|
||||
BERLIN_PINCTRL_GROUP("G20", 0x20, 0x3, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "demod"),
|
||||
/*
|
||||
* Mode 0x4 mux usb2_dbg *and* usb3_dbg:
|
||||
* add two functions so it can be used with other groups
|
||||
* within the same subnode in the device tree
|
||||
*/
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "usb2_dbg"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "usb3_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G21", 0x20, 0x3, 0x03,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sts2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "demod")),
|
||||
BERLIN_PINCTRL_GROUP("G22", 0x20, 0x3, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G23", 0x20, 0x3, 0x09,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "avif"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "usb2_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G24", 0x20, 0x3, 0x0c,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "demod"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "usb2_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G25", 0x20, 0x3, 0x0f,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "vga"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "avif"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "usb2_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G26", 0x20, 0x3, 0x12,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "lvds"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G27", 0x20, 0x3, 0x15,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "agc"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G28", 0x20, 0x3, 0x18,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "avif"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "usb2_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("G29", 0x20, 0x3, 0x1b,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "scrd0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G30", 0x24, 0x3, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "scrd1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G31", 0x24, 0x3, 0x03,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sd1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("G32", 0x24, 0x3, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "cam"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "sd1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
/* GAV */
|
||||
BERLIN_PINCTRL_GROUP("GAV0", 0x24, 0x3, 0x09,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dvio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "lvds")),
|
||||
BERLIN_PINCTRL_GROUP("GAV1", 0x24, 0x3, 0x0c,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dvio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "vga")),
|
||||
BERLIN_PINCTRL_GROUP("GAV2", 0x24, 0x3, 0x0f,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dvio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "i2s3"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "pdm"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "adac")),
|
||||
BERLIN_PINCTRL_GROUP("GAV3", 0x24, 0x3, 0x12,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dvio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "i2s3"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "adac")),
|
||||
BERLIN_PINCTRL_GROUP("GAV4", 0x24, 0x3, 0x15,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dvio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "i2s1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "adac")),
|
||||
BERLIN_PINCTRL_GROUP("GAV5", 0x24, 0x3, 0x18,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dvio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "spdif")),
|
||||
BERLIN_PINCTRL_GROUP("GAV6", 0x24, 0x3, 0x1b,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dvio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "i2s2")),
|
||||
BERLIN_PINCTRL_GROUP("GAV7", 0x28, 0x3, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dvio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "i2s3")),
|
||||
BERLIN_PINCTRL_GROUP("GAV8", 0x28, 0x3, 0x03,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dv0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "pwm")),
|
||||
BERLIN_PINCTRL_GROUP("GAV9", 0x28, 0x3, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dv0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "pwm")),
|
||||
BERLIN_PINCTRL_GROUP("GAV10", 0x28, 0x3, 0x09,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dv0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "agc")),
|
||||
BERLIN_PINCTRL_GROUP("GAV11", 0x28, 0x3, 0x0c,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "dv0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "fp"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "i2s0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "pwm"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x5, "vclki")),
|
||||
BERLIN_PINCTRL_GROUP("GAV12", 0x28, 0x3, 0x0f,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "i2s2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "i2s1")),
|
||||
BERLIN_PINCTRL_GROUP("GAV13", 0x28, 0x3, 0x12,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "i2s2")),
|
||||
BERLIN_PINCTRL_GROUP("GAV14", 0x28, 0x3, 0x15,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "i2s2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "i2s1")),
|
||||
BERLIN_PINCTRL_GROUP("GAV15", 0x28, 0x3, 0x18,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "i2s1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "dac_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("GAV16", 0x28, 0x3, 0x1b,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "i2s0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "i2s1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "i2s3"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x5, "pdm"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "dac_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("GAV17", 0x2c, 0x3, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "i2s0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "i2s1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "pwm"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "i2s3"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x5, "pdm"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x6, "dac_dbg")),
|
||||
BERLIN_PINCTRL_GROUP("GAV18", 0x2c, 0x3, 0x03,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spdif"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "arc")),
|
||||
BERLIN_PINCTRL_GROUP("GAV19", 0x2c, 0x3, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "avio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spdif"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x4, "i2s3"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x5, "pdm")),
|
||||
};
|
||||
|
||||
static const struct berlin_desc_group berlin2q_sysmgr_pinctrl_groups[] = {
|
||||
/* GSM */
|
||||
BERLIN_PINCTRL_GROUP("GSM0", 0x40, 0x2, 0x00,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "eth1")),
|
||||
BERLIN_PINCTRL_GROUP("GSM1", 0x40, 0x2, 0x02,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "eth1")),
|
||||
BERLIN_PINCTRL_GROUP("GSM2", 0x40, 0x2, 0x04,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "eddc")),
|
||||
BERLIN_PINCTRL_GROUP("GSM3", 0x40, 0x2, 0x06,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "spi2"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "eddc")),
|
||||
BERLIN_PINCTRL_GROUP("GSM4", 0x40, 0x1, 0x08,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "hdmi")),
|
||||
BERLIN_PINCTRL_GROUP("GSM5", 0x40, 0x1, 0x09,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "hdmi")),
|
||||
BERLIN_PINCTRL_GROUP("GSM6", 0x40, 0x1, 0x0a,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "hdmi")),
|
||||
BERLIN_PINCTRL_GROUP("GSM7", 0x40, 0x1, 0x0b,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "hdmi")),
|
||||
BERLIN_PINCTRL_GROUP("GSM8", 0x40, 0x1, 0x0c,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "hdmi")),
|
||||
BERLIN_PINCTRL_GROUP("GSM9", 0x40, 0x1, 0x0d,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "hdmi")),
|
||||
BERLIN_PINCTRL_GROUP("GSM10", 0x40, 0x1, 0x0e,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "led")),
|
||||
BERLIN_PINCTRL_GROUP("GSM11", 0x40, 0x1, 0x0f,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "led")),
|
||||
BERLIN_PINCTRL_GROUP("GSM12", 0x40, 0x2, 0x10,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "uart0"), /* RX/TX */
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "irda0"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("GSM13", 0x40, 0x2, 0x12,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "uart0"), /* CTS/RTS */
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "uart1"), /* RX/TX */
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "twsi2")),
|
||||
BERLIN_PINCTRL_GROUP("GSM14", 0x40, 0x2, 0x14,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "uart1"), /* RX/TX */
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "irda1"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x3, "twsi3")),
|
||||
BERLIN_PINCTRL_GROUP("GSM15", 0x40, 0x2, 0x16,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "pwr"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "led"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x2, "gpio")),
|
||||
BERLIN_PINCTRL_GROUP("GSM16", 0x40, 0x1, 0x18,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "eddc")),
|
||||
BERLIN_PINCTRL_GROUP("GSM17", 0x40, 0x1, 0x19,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "eddc")),
|
||||
BERLIN_PINCTRL_GROUP("GSM18", 0x40, 0x1, 0x1a,
|
||||
BERLIN_PINCTRL_FUNCTION(0x0, "gpio"),
|
||||
BERLIN_PINCTRL_FUNCTION(0x1, "eddc")),
|
||||
};
|
||||
|
||||
static const struct berlin_pinctrl_desc berlin2q_soc_pinctrl_data = {
|
||||
.groups = berlin2q_soc_pinctrl_groups,
|
||||
.ngroups = ARRAY_SIZE(berlin2q_soc_pinctrl_groups),
|
||||
};
|
||||
|
||||
static const struct berlin_pinctrl_desc berlin2q_sysmgr_pinctrl_data = {
|
||||
.groups = berlin2q_sysmgr_pinctrl_groups,
|
||||
.ngroups = ARRAY_SIZE(berlin2q_sysmgr_pinctrl_groups),
|
||||
};
|
||||
|
||||
static const struct of_device_id berlin2q_pinctrl_match[] = {
|
||||
{
|
||||
.compatible = "marvell,berlin2q-chip-ctrl",
|
||||
.data = &berlin2q_soc_pinctrl_data,
|
||||
},
|
||||
{
|
||||
.compatible = "marvell,berlin2q-system-ctrl",
|
||||
.data = &berlin2q_sysmgr_pinctrl_data,
|
||||
},
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, berlin2q_pinctrl_match);
|
||||
|
||||
static int berlin2q_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct of_device_id *match =
|
||||
of_match_device(berlin2q_pinctrl_match, &pdev->dev);
|
||||
struct regmap_config *rmconfig;
|
||||
struct regmap *regmap;
|
||||
struct resource *res;
|
||||
void __iomem *base;
|
||||
|
||||
rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL);
|
||||
if (!rmconfig)
|
||||
return -ENOMEM;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
rmconfig->reg_bits = 32,
|
||||
rmconfig->val_bits = 32,
|
||||
rmconfig->reg_stride = 4,
|
||||
rmconfig->max_register = resource_size(res);
|
||||
|
||||
regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
return berlin_pinctrl_probe(pdev, match->data);
|
||||
}
|
||||
|
||||
static struct platform_driver berlin2q_pinctrl_driver = {
|
||||
.probe = berlin2q_pinctrl_probe,
|
||||
.driver = {
|
||||
.name = "berlin-bg2q-pinctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = berlin2q_pinctrl_match,
|
||||
},
|
||||
};
|
||||
module_platform_driver(berlin2q_pinctrl_driver);
|
||||
|
||||
MODULE_AUTHOR("Antoine Ténart <antoine.tenart@free-electrons.com>");
|
||||
MODULE_DESCRIPTION("Marvell Berlin BG2Q pinctrl driver");
|
||||
MODULE_LICENSE("GPL");
|
|
@ -0,0 +1,348 @@
|
|||
/*
|
||||
* Marvell Berlin SoC pinctrl core driver
|
||||
*
|
||||
* Copyright (C) 2014 Marvell Technology Group Ltd.
|
||||
*
|
||||
* Antoine Ténart <antoine.tenart@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
#include <linux/pinctrl/pinmux.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "../core.h"
|
||||
#include "../pinctrl-utils.h"
|
||||
#include "berlin.h"
|
||||
|
||||
struct berlin_pinctrl {
|
||||
struct regmap *regmap;
|
||||
struct device *dev;
|
||||
const struct berlin_pinctrl_desc *desc;
|
||||
struct berlin_pinctrl_function *functions;
|
||||
unsigned nfunctions;
|
||||
struct pinctrl_dev *pctrl_dev;
|
||||
};
|
||||
|
||||
static int berlin_pinctrl_get_group_count(struct pinctrl_dev *pctrl_dev)
|
||||
{
|
||||
struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
|
||||
return pctrl->desc->ngroups;
|
||||
}
|
||||
|
||||
static const char *berlin_pinctrl_get_group_name(struct pinctrl_dev *pctrl_dev,
|
||||
unsigned group)
|
||||
{
|
||||
struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
|
||||
return pctrl->desc->groups[group].name;
|
||||
}
|
||||
|
||||
static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrl_dev,
|
||||
struct device_node *node,
|
||||
struct pinctrl_map **map,
|
||||
unsigned *num_maps)
|
||||
{
|
||||
struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
struct property *prop;
|
||||
const char *function_name, *group_name;
|
||||
unsigned reserved_maps = 0;
|
||||
int ret, ngroups;
|
||||
|
||||
*map = NULL;
|
||||
*num_maps = 0;
|
||||
|
||||
ret = of_property_read_string(node, "function", &function_name);
|
||||
if (ret) {
|
||||
dev_err(pctrl->dev,
|
||||
"missing function property in node %s\n",
|
||||
node->name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ngroups = of_property_count_strings(node, "groups");
|
||||
if (ngroups < 0) {
|
||||
dev_err(pctrl->dev,
|
||||
"missing groups property in node %s\n",
|
||||
node->name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = pinctrl_utils_reserve_map(pctrl_dev, map, &reserved_maps,
|
||||
num_maps, ngroups);
|
||||
if (ret) {
|
||||
dev_err(pctrl->dev, "can't reserve map: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
of_property_for_each_string(node, "groups", prop, group_name) {
|
||||
ret = pinctrl_utils_add_map_mux(pctrl_dev, map, &reserved_maps,
|
||||
num_maps, group_name,
|
||||
function_name);
|
||||
if (ret) {
|
||||
dev_err(pctrl->dev, "can't add map: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void berlin_pinctrl_dt_free_map(struct pinctrl_dev *pctrl_dev,
|
||||
struct pinctrl_map *map,
|
||||
unsigned nmaps)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nmaps; i++) {
|
||||
if (map[i].type == PIN_MAP_TYPE_MUX_GROUP) {
|
||||
kfree(map[i].data.mux.group);
|
||||
|
||||
/* a function can be applied to multiple groups */
|
||||
if (i == 0)
|
||||
kfree(map[i].data.mux.function);
|
||||
}
|
||||
}
|
||||
|
||||
kfree(map);
|
||||
}
|
||||
|
||||
static const struct pinctrl_ops berlin_pinctrl_ops = {
|
||||
.get_groups_count = &berlin_pinctrl_get_group_count,
|
||||
.get_group_name = &berlin_pinctrl_get_group_name,
|
||||
.dt_node_to_map = &berlin_pinctrl_dt_node_to_map,
|
||||
.dt_free_map = &berlin_pinctrl_dt_free_map,
|
||||
};
|
||||
|
||||
static int berlin_pinmux_get_functions_count(struct pinctrl_dev *pctrl_dev)
|
||||
{
|
||||
struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
|
||||
return pctrl->nfunctions;
|
||||
}
|
||||
|
||||
static const char *berlin_pinmux_get_function_name(struct pinctrl_dev *pctrl_dev,
|
||||
unsigned function)
|
||||
{
|
||||
struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
|
||||
return pctrl->functions[function].name;
|
||||
}
|
||||
|
||||
static int berlin_pinmux_get_function_groups(struct pinctrl_dev *pctrl_dev,
|
||||
unsigned function,
|
||||
const char * const **groups,
|
||||
unsigned * const num_groups)
|
||||
{
|
||||
struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
|
||||
*groups = pctrl->functions[function].groups;
|
||||
*num_groups = pctrl->functions[function].ngroups;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct berlin_desc_function *
|
||||
berlin_pinctrl_find_function_by_name(struct berlin_pinctrl *pctrl,
|
||||
const struct berlin_desc_group *group,
|
||||
const char *fname)
|
||||
{
|
||||
struct berlin_desc_function *function = group->functions;
|
||||
|
||||
while (function->name) {
|
||||
if (!strcmp(function->name, fname))
|
||||
return function;
|
||||
|
||||
function++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int berlin_pinmux_enable(struct pinctrl_dev *pctrl_dev,
|
||||
unsigned function,
|
||||
unsigned group)
|
||||
{
|
||||
struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
const struct berlin_desc_group *group_desc = pctrl->desc->groups + group;
|
||||
struct berlin_pinctrl_function *func = pctrl->functions + function;
|
||||
struct berlin_desc_function *function_desc =
|
||||
berlin_pinctrl_find_function_by_name(pctrl, group_desc,
|
||||
func->name);
|
||||
u32 mask, val;
|
||||
|
||||
if (!function_desc)
|
||||
return -EINVAL;
|
||||
|
||||
mask = GENMASK(group_desc->lsb + group_desc->bit_width - 1,
|
||||
group_desc->lsb);
|
||||
val = function_desc->muxval << group_desc->lsb;
|
||||
regmap_update_bits(pctrl->regmap, group_desc->offset, mask, val);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct pinmux_ops berlin_pinmux_ops = {
|
||||
.get_functions_count = &berlin_pinmux_get_functions_count,
|
||||
.get_function_name = &berlin_pinmux_get_function_name,
|
||||
.get_function_groups = &berlin_pinmux_get_function_groups,
|
||||
.enable = &berlin_pinmux_enable,
|
||||
};
|
||||
|
||||
static int berlin_pinctrl_add_function(struct berlin_pinctrl *pctrl,
|
||||
const char *name)
|
||||
{
|
||||
struct berlin_pinctrl_function *function = pctrl->functions;
|
||||
|
||||
while (function->name) {
|
||||
if (!strcmp(function->name, name)) {
|
||||
function->ngroups++;
|
||||
return -EEXIST;
|
||||
}
|
||||
function++;
|
||||
}
|
||||
|
||||
function->name = name;
|
||||
function->ngroups = 1;
|
||||
|
||||
pctrl->nfunctions++;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int berlin_pinctrl_build_state(struct platform_device *pdev)
|
||||
{
|
||||
struct berlin_pinctrl *pctrl = platform_get_drvdata(pdev);
|
||||
struct berlin_desc_group const *desc_group;
|
||||
struct berlin_desc_function const *desc_function;
|
||||
int i, max_functions = 0;
|
||||
|
||||
pctrl->nfunctions = 0;
|
||||
|
||||
for (i = 0; i < pctrl->desc->ngroups; i++) {
|
||||
desc_group = pctrl->desc->groups + i;
|
||||
/* compute the maxiumum number of functions a group can have */
|
||||
max_functions += 1 << (desc_group->bit_width + 1);
|
||||
}
|
||||
|
||||
/* we will reallocate later */
|
||||
pctrl->functions = devm_kzalloc(&pdev->dev,
|
||||
max_functions * sizeof(*pctrl->functions),
|
||||
GFP_KERNEL);
|
||||
if (!pctrl->functions)
|
||||
return -ENOMEM;
|
||||
|
||||
/* register all functions */
|
||||
for (i = 0; i < pctrl->desc->ngroups; i++) {
|
||||
desc_group = pctrl->desc->groups + i;
|
||||
desc_function = desc_group->functions;
|
||||
|
||||
while (desc_function->name) {
|
||||
berlin_pinctrl_add_function(pctrl, desc_function->name);
|
||||
desc_function++;
|
||||
}
|
||||
}
|
||||
|
||||
pctrl->functions = krealloc(pctrl->functions,
|
||||
pctrl->nfunctions * sizeof(*pctrl->functions),
|
||||
GFP_KERNEL);
|
||||
|
||||
/* map functions to theirs groups */
|
||||
for (i = 0; i < pctrl->desc->ngroups; i++) {
|
||||
desc_group = pctrl->desc->groups + i;
|
||||
desc_function = desc_group->functions;
|
||||
|
||||
while (desc_function->name) {
|
||||
struct berlin_pinctrl_function
|
||||
*function = pctrl->functions;
|
||||
const char **groups;
|
||||
bool found = false;
|
||||
|
||||
while (function->name) {
|
||||
if (!strcmp(desc_function->name, function->name)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
function++;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
return -EINVAL;
|
||||
|
||||
if (!function->groups) {
|
||||
function->groups =
|
||||
devm_kzalloc(&pdev->dev,
|
||||
function->ngroups * sizeof(char *),
|
||||
GFP_KERNEL);
|
||||
|
||||
if (!function->groups)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
groups = function->groups;
|
||||
while (*groups)
|
||||
groups++;
|
||||
|
||||
*groups = desc_group->name;
|
||||
|
||||
desc_function++;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct pinctrl_desc berlin_pctrl_desc = {
|
||||
.name = "berlin-pinctrl",
|
||||
.pctlops = &berlin_pinctrl_ops,
|
||||
.pmxops = &berlin_pinmux_ops,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
int berlin_pinctrl_probe(struct platform_device *pdev,
|
||||
const struct berlin_pinctrl_desc *desc)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct berlin_pinctrl *pctrl;
|
||||
struct regmap *regmap;
|
||||
int ret;
|
||||
|
||||
regmap = dev_get_regmap(&pdev->dev, NULL);
|
||||
if (!regmap)
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL);
|
||||
if (!pctrl)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, pctrl);
|
||||
|
||||
pctrl->regmap = regmap;
|
||||
pctrl->dev = &pdev->dev;
|
||||
pctrl->desc = desc;
|
||||
|
||||
ret = berlin_pinctrl_build_state(pdev);
|
||||
if (ret) {
|
||||
dev_err(dev, "cannot build driver state: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
pctrl->pctrl_dev = pinctrl_register(&berlin_pctrl_desc, dev, pctrl);
|
||||
if (!pctrl->pctrl_dev) {
|
||||
dev_err(dev, "failed to register pinctrl driver\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Marvell Berlin SoC pinctrl driver.
|
||||
*
|
||||
* Copyright (C) 2014 Marvell Technology Group Ltd.
|
||||
*
|
||||
* Antoine Ténart <antoine.tenart@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#ifndef __PINCTRL_BERLIN_H
|
||||
#define __PINCTRL_BERLIN_H
|
||||
|
||||
struct berlin_desc_function {
|
||||
const char *name;
|
||||
u8 muxval;
|
||||
};
|
||||
|
||||
struct berlin_desc_group {
|
||||
const char *name;
|
||||
u8 offset;
|
||||
u8 bit_width;
|
||||
u8 lsb;
|
||||
struct berlin_desc_function *functions;
|
||||
};
|
||||
|
||||
struct berlin_pinctrl_desc {
|
||||
const struct berlin_desc_group *groups;
|
||||
unsigned ngroups;
|
||||
};
|
||||
|
||||
struct berlin_pinctrl_function {
|
||||
const char *name;
|
||||
const char **groups;
|
||||
unsigned ngroups;
|
||||
};
|
||||
|
||||
#define BERLIN_PINCTRL_GROUP(_name, _offset, _width, _lsb, ...) \
|
||||
{ \
|
||||
.name = _name, \
|
||||
.offset = _offset, \
|
||||
.bit_width = _width, \
|
||||
.lsb = _lsb, \
|
||||
.functions = (struct berlin_desc_function[]){ \
|
||||
__VA_ARGS__, { } }, \
|
||||
}
|
||||
|
||||
#define BERLIN_PINCTRL_FUNCTION(_muxval, _name) \
|
||||
{ \
|
||||
.name = _name, \
|
||||
.muxval = _muxval, \
|
||||
}
|
||||
|
||||
#define BERLIN_PINCTRL_FUNCTION_UNKNOWN {}
|
||||
|
||||
int berlin_pinctrl_probe(struct platform_device *pdev,
|
||||
const struct berlin_pinctrl_desc *desc);
|
||||
|
||||
#endif /* __PINCTRL_BERLIN_H */
|
|
@ -468,6 +468,9 @@ int pinctrl_get_group_pins(struct pinctrl_dev *pctldev, const char *pin_group,
|
|||
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
|
||||
int gs;
|
||||
|
||||
if (!pctlops->get_group_pins)
|
||||
return -EINVAL;
|
||||
|
||||
gs = pinctrl_get_group_selector(pctldev, pin_group);
|
||||
if (gs < 0)
|
||||
return gs;
|
||||
|
@ -1362,15 +1365,16 @@ static int pinctrl_groups_show(struct seq_file *s, void *what)
|
|||
|
||||
seq_puts(s, "registered pin groups:\n");
|
||||
while (selector < ngroups) {
|
||||
const unsigned *pins;
|
||||
unsigned num_pins;
|
||||
const unsigned *pins = NULL;
|
||||
unsigned num_pins = 0;
|
||||
const char *gname = ops->get_group_name(pctldev, selector);
|
||||
const char *pname;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
||||
ret = ops->get_group_pins(pctldev, selector,
|
||||
&pins, &num_pins);
|
||||
if (ops->get_group_pins)
|
||||
ret = ops->get_group_pins(pctldev, selector,
|
||||
&pins, &num_pins);
|
||||
if (ret)
|
||||
seq_printf(s, "%s [ERROR GETTING PINS]\n",
|
||||
gname);
|
||||
|
@ -1694,8 +1698,7 @@ static int pinctrl_check_ops(struct pinctrl_dev *pctldev)
|
|||
|
||||
if (!ops ||
|
||||
!ops->get_groups_count ||
|
||||
!ops->get_group_name ||
|
||||
!ops->get_group_pins)
|
||||
!ops->get_group_name)
|
||||
return -EINVAL;
|
||||
|
||||
if (ops->dt_node_to_map && !ops->dt_free_map)
|
||||
|
|
|
@ -30,4 +30,8 @@ config PINCTRL_ARMADA_XP
|
|||
bool
|
||||
select PINCTRL_MVEBU
|
||||
|
||||
config PINCTRL_ORION
|
||||
bool
|
||||
select PINCTRL_MVEBU
|
||||
|
||||
endif
|
||||
|
|
|
@ -5,3 +5,4 @@ obj-$(CONFIG_PINCTRL_ARMADA_370) += pinctrl-armada-370.o
|
|||
obj-$(CONFIG_PINCTRL_ARMADA_375) += pinctrl-armada-375.o
|
||||
obj-$(CONFIG_PINCTRL_ARMADA_38X) += pinctrl-armada-38x.o
|
||||
obj-$(CONFIG_PINCTRL_ARMADA_XP) += pinctrl-armada-xp.o
|
||||
obj-$(CONFIG_PINCTRL_ORION) += pinctrl-orion.o
|
||||
|
|
|
@ -0,0 +1,261 @@
|
|||
/*
|
||||
* Marvell Orion pinctrl driver based on mvebu pinctrl core
|
||||
*
|
||||
* Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The first 16 MPP pins on Orion are easy to handle: they are
|
||||
* configured through 2 consecutive registers, located at the base
|
||||
* address of the MPP device.
|
||||
*
|
||||
* However the last 4 MPP pins are handled by a register at offset
|
||||
* 0x50 from the base address, so it is not consecutive with the first
|
||||
* two registers.
|
||||
*/
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
|
||||
#include "pinctrl-mvebu.h"
|
||||
|
||||
static void __iomem *mpp_base;
|
||||
static void __iomem *high_mpp_base;
|
||||
|
||||
static int orion_mpp_ctrl_get(unsigned pid, unsigned long *config)
|
||||
{
|
||||
unsigned shift = (pid % MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS;
|
||||
|
||||
if (pid < 16) {
|
||||
unsigned off = (pid / MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS;
|
||||
*config = (readl(mpp_base + off) >> shift) & MVEBU_MPP_MASK;
|
||||
}
|
||||
else {
|
||||
*config = (readl(high_mpp_base) >> shift) & MVEBU_MPP_MASK;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int orion_mpp_ctrl_set(unsigned pid, unsigned long config)
|
||||
{
|
||||
unsigned shift = (pid % MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS;
|
||||
|
||||
if (pid < 16) {
|
||||
unsigned off = (pid / MVEBU_MPPS_PER_REG) * MVEBU_MPP_BITS;
|
||||
u32 reg = readl(mpp_base + off) & ~(MVEBU_MPP_MASK << shift);
|
||||
writel(reg | (config << shift), mpp_base + off);
|
||||
}
|
||||
else {
|
||||
u32 reg = readl(high_mpp_base) & ~(MVEBU_MPP_MASK << shift);
|
||||
writel(reg | (config << shift), high_mpp_base);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define V(f5181l, f5182, f5281) \
|
||||
((f5181l << 0) | (f5182 << 1) | (f5281 << 2))
|
||||
|
||||
enum orion_variant {
|
||||
V_5181L = V(1, 0, 0),
|
||||
V_5182 = V(0, 1, 0),
|
||||
V_5281 = V(0, 0, 1),
|
||||
V_ALL = V(1, 1, 1),
|
||||
};
|
||||
|
||||
static struct mvebu_mpp_mode orion_mpp_modes[] = {
|
||||
MPP_MODE(0,
|
||||
MPP_VAR_FUNCTION(0x0, "pcie", "rstout", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x2, "pci", "req2", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x3, "gpio", NULL, V_ALL)),
|
||||
MPP_MODE(1,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x2, "pci", "gnt2", V_ALL)),
|
||||
MPP_MODE(2,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x2, "pci", "req3", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x3, "pci-1", "pme", V_ALL)),
|
||||
MPP_MODE(3,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x2, "pci", "gnt3", V_ALL)),
|
||||
MPP_MODE(4,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x2, "pci", "req4", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x4, "bootnand", "re", V_5182 | V_5281),
|
||||
MPP_VAR_FUNCTION(0x5, "sata0", "prsnt", V_5182)),
|
||||
MPP_MODE(5,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x2, "pci", "gnt4", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x4, "bootnand", "we", V_5182 | V_5281),
|
||||
MPP_VAR_FUNCTION(0x5, "sata1", "prsnt", V_5182)),
|
||||
MPP_MODE(6,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x2, "pci", "req5", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x4, "nand", "re0", V_5182 | V_5281),
|
||||
MPP_VAR_FUNCTION(0x5, "pci-1", "clk", V_5181L),
|
||||
MPP_VAR_FUNCTION(0x5, "sata0", "act", V_5182)),
|
||||
MPP_MODE(7,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x2, "pci", "gnt5", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x4, "nand", "we0", V_5182 | V_5281),
|
||||
MPP_VAR_FUNCTION(0x5, "pci-1", "clk", V_5181L),
|
||||
MPP_VAR_FUNCTION(0x5, "sata1", "act", V_5182)),
|
||||
MPP_MODE(8,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x1, "ge", "col", V_ALL)),
|
||||
MPP_MODE(9,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x1, "ge", "rxerr", V_ALL)),
|
||||
MPP_MODE(10,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x1, "ge", "crs", V_ALL)),
|
||||
MPP_MODE(11,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x1, "ge", "txerr", V_ALL)),
|
||||
MPP_MODE(12,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x1, "ge", "txd4", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x4, "nand", "re1", V_5182 | V_5281),
|
||||
MPP_VAR_FUNCTION(0x5, "sata0", "ledprsnt", V_5182)),
|
||||
MPP_MODE(13,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x1, "ge", "txd5", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x4, "nand", "we1", V_5182 | V_5281),
|
||||
MPP_VAR_FUNCTION(0x5, "sata1", "ledprsnt", V_5182)),
|
||||
MPP_MODE(14,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x1, "ge", "txd6", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x4, "nand", "re2", V_5182 | V_5281),
|
||||
MPP_VAR_FUNCTION(0x5, "sata0", "ledact", V_5182)),
|
||||
MPP_MODE(15,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL),
|
||||
MPP_VAR_FUNCTION(0x1, "ge", "txd7", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x4, "nand", "we2", V_5182 | V_5281),
|
||||
MPP_VAR_FUNCTION(0x5, "sata1", "ledact", V_5182)),
|
||||
MPP_MODE(16,
|
||||
MPP_VAR_FUNCTION(0x0, "uart1", "rxd", V_5182 | V_5281),
|
||||
MPP_VAR_FUNCTION(0x1, "ge", "rxd4", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x5, "gpio", NULL, V_5182)),
|
||||
MPP_MODE(17,
|
||||
MPP_VAR_FUNCTION(0x0, "uart1", "txd", V_5182 | V_5281),
|
||||
MPP_VAR_FUNCTION(0x1, "ge", "rxd5", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x5, "gpio", NULL, V_5182)),
|
||||
MPP_MODE(18,
|
||||
MPP_VAR_FUNCTION(0x0, "uart1", "cts", V_5182 | V_5281),
|
||||
MPP_VAR_FUNCTION(0x1, "ge", "rxd6", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x5, "gpio", NULL, V_5182)),
|
||||
MPP_MODE(19,
|
||||
MPP_VAR_FUNCTION(0x0, "uart1", "rts", V_5182 | V_5281),
|
||||
MPP_VAR_FUNCTION(0x1, "ge", "rxd7", V_ALL),
|
||||
MPP_VAR_FUNCTION(0x5, "gpio", NULL, V_5182)),
|
||||
};
|
||||
|
||||
static struct mvebu_mpp_ctrl orion_mpp_controls[] = {
|
||||
MPP_FUNC_CTRL(0, 19, NULL, orion_mpp_ctrl),
|
||||
};
|
||||
|
||||
static struct pinctrl_gpio_range mv88f5181l_gpio_ranges[] = {
|
||||
MPP_GPIO_RANGE(0, 0, 0, 16),
|
||||
};
|
||||
|
||||
static struct pinctrl_gpio_range mv88f5182_gpio_ranges[] = {
|
||||
MPP_GPIO_RANGE(0, 0, 0, 19),
|
||||
};
|
||||
|
||||
static struct pinctrl_gpio_range mv88f5281_gpio_ranges[] = {
|
||||
MPP_GPIO_RANGE(0, 0, 0, 16),
|
||||
};
|
||||
|
||||
static struct mvebu_pinctrl_soc_info mv88f5181l_info = {
|
||||
.variant = V_5181L,
|
||||
.controls = orion_mpp_controls,
|
||||
.ncontrols = ARRAY_SIZE(orion_mpp_controls),
|
||||
.modes = orion_mpp_modes,
|
||||
.nmodes = ARRAY_SIZE(orion_mpp_modes),
|
||||
.gpioranges = mv88f5181l_gpio_ranges,
|
||||
.ngpioranges = ARRAY_SIZE(mv88f5181l_gpio_ranges),
|
||||
};
|
||||
|
||||
static struct mvebu_pinctrl_soc_info mv88f5182_info = {
|
||||
.variant = V_5182,
|
||||
.controls = orion_mpp_controls,
|
||||
.ncontrols = ARRAY_SIZE(orion_mpp_controls),
|
||||
.modes = orion_mpp_modes,
|
||||
.nmodes = ARRAY_SIZE(orion_mpp_modes),
|
||||
.gpioranges = mv88f5182_gpio_ranges,
|
||||
.ngpioranges = ARRAY_SIZE(mv88f5182_gpio_ranges),
|
||||
};
|
||||
|
||||
static struct mvebu_pinctrl_soc_info mv88f5281_info = {
|
||||
.variant = V_5281,
|
||||
.controls = orion_mpp_controls,
|
||||
.ncontrols = ARRAY_SIZE(orion_mpp_controls),
|
||||
.modes = orion_mpp_modes,
|
||||
.nmodes = ARRAY_SIZE(orion_mpp_modes),
|
||||
.gpioranges = mv88f5281_gpio_ranges,
|
||||
.ngpioranges = ARRAY_SIZE(mv88f5281_gpio_ranges),
|
||||
};
|
||||
|
||||
/*
|
||||
* There are multiple variants of the Orion SoCs, but in terms of pin
|
||||
* muxing, they are identical.
|
||||
*/
|
||||
static struct of_device_id orion_pinctrl_of_match[] = {
|
||||
{ .compatible = "marvell,88f5181l-pinctrl", .data = &mv88f5181l_info },
|
||||
{ .compatible = "marvell,88f5182-pinctrl", .data = &mv88f5182_info },
|
||||
{ .compatible = "marvell,88f5281-pinctrl", .data = &mv88f5281_info },
|
||||
{ }
|
||||
};
|
||||
|
||||
static int orion_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct of_device_id *match =
|
||||
of_match_device(orion_pinctrl_of_match, &pdev->dev);
|
||||
struct resource *res;
|
||||
|
||||
pdev->dev.platform_data = (void*)match->data;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
mpp_base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(mpp_base))
|
||||
return PTR_ERR(mpp_base);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
high_mpp_base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(high_mpp_base))
|
||||
return PTR_ERR(high_mpp_base);
|
||||
|
||||
return mvebu_pinctrl_probe(pdev);
|
||||
}
|
||||
|
||||
static int orion_pinctrl_remove(struct platform_device *pdev)
|
||||
{
|
||||
return mvebu_pinctrl_remove(pdev);
|
||||
}
|
||||
|
||||
static struct platform_driver orion_pinctrl_driver = {
|
||||
.driver = {
|
||||
.name = "orion-pinctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = of_match_ptr(orion_pinctrl_of_match),
|
||||
},
|
||||
.probe = orion_pinctrl_probe,
|
||||
.remove = orion_pinctrl_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(orion_pinctrl_driver);
|
||||
|
||||
MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>");
|
||||
MODULE_DESCRIPTION("Marvell Orion pinctrl driver");
|
||||
MODULE_LICENSE("GPL v2");
|
|
@ -166,6 +166,7 @@ static struct pinconf_generic_dt_params dt_params[] = {
|
|||
{ "input-schmitt-enable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 1 },
|
||||
{ "input-schmitt-disable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 0 },
|
||||
{ "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 },
|
||||
{ "power-source", PIN_CONFIG_POWER_SOURCE, 0 },
|
||||
{ "low-power-enable", PIN_CONFIG_LOW_POWER_MODE, 1 },
|
||||
{ "low-power-disable", PIN_CONFIG_LOW_POWER_MODE, 0 },
|
||||
{ "output-low", PIN_CONFIG_OUTPUT, 0, },
|
||||
|
@ -228,13 +229,12 @@ int pinconf_generic_parse_dt_config(struct device_node *np,
|
|||
* Now limit the number of configs to the real number of
|
||||
* found properties.
|
||||
*/
|
||||
*configs = kzalloc(ncfg * sizeof(unsigned long), GFP_KERNEL);
|
||||
*configs = kmemdup(cfg, ncfg * sizeof(unsigned long), GFP_KERNEL);
|
||||
if (!*configs) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
memcpy(*configs, cfg, ncfg * sizeof(unsigned long));
|
||||
*nconfigs = ncfg;
|
||||
|
||||
out:
|
||||
|
|
|
@ -927,7 +927,7 @@ static int adi_gpio_irq_map(struct irq_domain *d, unsigned int irq,
|
|||
return 0;
|
||||
}
|
||||
|
||||
const struct irq_domain_ops adi_gpio_irq_domain_ops = {
|
||||
static const struct irq_domain_ops adi_gpio_irq_domain_ops = {
|
||||
.map = adi_gpio_irq_map,
|
||||
.xlate = irq_domain_xlate_onecell,
|
||||
};
|
||||
|
|
|
@ -0,0 +1,613 @@
|
|||
/*
|
||||
* Copyright (c) 2014, Sony Mobile Communications AB.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
|
||||
#include "pinctrl-msm.h"
|
||||
|
||||
static const struct pinctrl_pin_desc apq8064_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"),
|
||||
PINCTRL_PIN(54, "GPIO_54"),
|
||||
PINCTRL_PIN(55, "GPIO_55"),
|
||||
PINCTRL_PIN(56, "GPIO_56"),
|
||||
PINCTRL_PIN(57, "GPIO_57"),
|
||||
PINCTRL_PIN(58, "GPIO_58"),
|
||||
PINCTRL_PIN(59, "GPIO_59"),
|
||||
PINCTRL_PIN(60, "GPIO_60"),
|
||||
PINCTRL_PIN(61, "GPIO_61"),
|
||||
PINCTRL_PIN(62, "GPIO_62"),
|
||||
PINCTRL_PIN(63, "GPIO_63"),
|
||||
PINCTRL_PIN(64, "GPIO_64"),
|
||||
PINCTRL_PIN(65, "GPIO_65"),
|
||||
PINCTRL_PIN(66, "GPIO_66"),
|
||||
PINCTRL_PIN(67, "GPIO_67"),
|
||||
PINCTRL_PIN(68, "GPIO_68"),
|
||||
PINCTRL_PIN(69, "GPIO_69"),
|
||||
PINCTRL_PIN(70, "GPIO_70"),
|
||||
PINCTRL_PIN(71, "GPIO_71"),
|
||||
PINCTRL_PIN(72, "GPIO_72"),
|
||||
PINCTRL_PIN(73, "GPIO_73"),
|
||||
PINCTRL_PIN(74, "GPIO_74"),
|
||||
PINCTRL_PIN(75, "GPIO_75"),
|
||||
PINCTRL_PIN(76, "GPIO_76"),
|
||||
PINCTRL_PIN(77, "GPIO_77"),
|
||||
PINCTRL_PIN(78, "GPIO_78"),
|
||||
PINCTRL_PIN(79, "GPIO_79"),
|
||||
PINCTRL_PIN(80, "GPIO_80"),
|
||||
PINCTRL_PIN(81, "GPIO_81"),
|
||||
PINCTRL_PIN(82, "GPIO_82"),
|
||||
PINCTRL_PIN(83, "GPIO_83"),
|
||||
PINCTRL_PIN(84, "GPIO_84"),
|
||||
PINCTRL_PIN(85, "GPIO_85"),
|
||||
PINCTRL_PIN(86, "GPIO_86"),
|
||||
PINCTRL_PIN(87, "GPIO_87"),
|
||||
PINCTRL_PIN(88, "GPIO_88"),
|
||||
PINCTRL_PIN(89, "GPIO_89"),
|
||||
|
||||
PINCTRL_PIN(90, "SDC1_CLK"),
|
||||
PINCTRL_PIN(91, "SDC1_CMD"),
|
||||
PINCTRL_PIN(92, "SDC1_DATA"),
|
||||
PINCTRL_PIN(93, "SDC3_CLK"),
|
||||
PINCTRL_PIN(94, "SDC3_CMD"),
|
||||
PINCTRL_PIN(95, "SDC3_DATA"),
|
||||
};
|
||||
|
||||
#define DECLARE_APQ_GPIO_PINS(pin) static const unsigned int gpio##pin##_pins[] = { pin }
|
||||
DECLARE_APQ_GPIO_PINS(0);
|
||||
DECLARE_APQ_GPIO_PINS(1);
|
||||
DECLARE_APQ_GPIO_PINS(2);
|
||||
DECLARE_APQ_GPIO_PINS(3);
|
||||
DECLARE_APQ_GPIO_PINS(4);
|
||||
DECLARE_APQ_GPIO_PINS(5);
|
||||
DECLARE_APQ_GPIO_PINS(6);
|
||||
DECLARE_APQ_GPIO_PINS(7);
|
||||
DECLARE_APQ_GPIO_PINS(8);
|
||||
DECLARE_APQ_GPIO_PINS(9);
|
||||
DECLARE_APQ_GPIO_PINS(10);
|
||||
DECLARE_APQ_GPIO_PINS(11);
|
||||
DECLARE_APQ_GPIO_PINS(12);
|
||||
DECLARE_APQ_GPIO_PINS(13);
|
||||
DECLARE_APQ_GPIO_PINS(14);
|
||||
DECLARE_APQ_GPIO_PINS(15);
|
||||
DECLARE_APQ_GPIO_PINS(16);
|
||||
DECLARE_APQ_GPIO_PINS(17);
|
||||
DECLARE_APQ_GPIO_PINS(18);
|
||||
DECLARE_APQ_GPIO_PINS(19);
|
||||
DECLARE_APQ_GPIO_PINS(20);
|
||||
DECLARE_APQ_GPIO_PINS(21);
|
||||
DECLARE_APQ_GPIO_PINS(22);
|
||||
DECLARE_APQ_GPIO_PINS(23);
|
||||
DECLARE_APQ_GPIO_PINS(24);
|
||||
DECLARE_APQ_GPIO_PINS(25);
|
||||
DECLARE_APQ_GPIO_PINS(26);
|
||||
DECLARE_APQ_GPIO_PINS(27);
|
||||
DECLARE_APQ_GPIO_PINS(28);
|
||||
DECLARE_APQ_GPIO_PINS(29);
|
||||
DECLARE_APQ_GPIO_PINS(30);
|
||||
DECLARE_APQ_GPIO_PINS(31);
|
||||
DECLARE_APQ_GPIO_PINS(32);
|
||||
DECLARE_APQ_GPIO_PINS(33);
|
||||
DECLARE_APQ_GPIO_PINS(34);
|
||||
DECLARE_APQ_GPIO_PINS(35);
|
||||
DECLARE_APQ_GPIO_PINS(36);
|
||||
DECLARE_APQ_GPIO_PINS(37);
|
||||
DECLARE_APQ_GPIO_PINS(38);
|
||||
DECLARE_APQ_GPIO_PINS(39);
|
||||
DECLARE_APQ_GPIO_PINS(40);
|
||||
DECLARE_APQ_GPIO_PINS(41);
|
||||
DECLARE_APQ_GPIO_PINS(42);
|
||||
DECLARE_APQ_GPIO_PINS(43);
|
||||
DECLARE_APQ_GPIO_PINS(44);
|
||||
DECLARE_APQ_GPIO_PINS(45);
|
||||
DECLARE_APQ_GPIO_PINS(46);
|
||||
DECLARE_APQ_GPIO_PINS(47);
|
||||
DECLARE_APQ_GPIO_PINS(48);
|
||||
DECLARE_APQ_GPIO_PINS(49);
|
||||
DECLARE_APQ_GPIO_PINS(50);
|
||||
DECLARE_APQ_GPIO_PINS(51);
|
||||
DECLARE_APQ_GPIO_PINS(52);
|
||||
DECLARE_APQ_GPIO_PINS(53);
|
||||
DECLARE_APQ_GPIO_PINS(54);
|
||||
DECLARE_APQ_GPIO_PINS(55);
|
||||
DECLARE_APQ_GPIO_PINS(56);
|
||||
DECLARE_APQ_GPIO_PINS(57);
|
||||
DECLARE_APQ_GPIO_PINS(58);
|
||||
DECLARE_APQ_GPIO_PINS(59);
|
||||
DECLARE_APQ_GPIO_PINS(60);
|
||||
DECLARE_APQ_GPIO_PINS(61);
|
||||
DECLARE_APQ_GPIO_PINS(62);
|
||||
DECLARE_APQ_GPIO_PINS(63);
|
||||
DECLARE_APQ_GPIO_PINS(64);
|
||||
DECLARE_APQ_GPIO_PINS(65);
|
||||
DECLARE_APQ_GPIO_PINS(66);
|
||||
DECLARE_APQ_GPIO_PINS(67);
|
||||
DECLARE_APQ_GPIO_PINS(68);
|
||||
DECLARE_APQ_GPIO_PINS(69);
|
||||
DECLARE_APQ_GPIO_PINS(70);
|
||||
DECLARE_APQ_GPIO_PINS(71);
|
||||
DECLARE_APQ_GPIO_PINS(72);
|
||||
DECLARE_APQ_GPIO_PINS(73);
|
||||
DECLARE_APQ_GPIO_PINS(74);
|
||||
DECLARE_APQ_GPIO_PINS(75);
|
||||
DECLARE_APQ_GPIO_PINS(76);
|
||||
DECLARE_APQ_GPIO_PINS(77);
|
||||
DECLARE_APQ_GPIO_PINS(78);
|
||||
DECLARE_APQ_GPIO_PINS(79);
|
||||
DECLARE_APQ_GPIO_PINS(80);
|
||||
DECLARE_APQ_GPIO_PINS(81);
|
||||
DECLARE_APQ_GPIO_PINS(82);
|
||||
DECLARE_APQ_GPIO_PINS(83);
|
||||
DECLARE_APQ_GPIO_PINS(84);
|
||||
DECLARE_APQ_GPIO_PINS(85);
|
||||
DECLARE_APQ_GPIO_PINS(86);
|
||||
DECLARE_APQ_GPIO_PINS(87);
|
||||
DECLARE_APQ_GPIO_PINS(88);
|
||||
DECLARE_APQ_GPIO_PINS(89);
|
||||
|
||||
static const unsigned int sdc1_clk_pins[] = { 90 };
|
||||
static const unsigned int sdc1_cmd_pins[] = { 91 };
|
||||
static const unsigned int sdc1_data_pins[] = { 92 };
|
||||
static const unsigned int sdc3_clk_pins[] = { 93 };
|
||||
static const unsigned int sdc3_cmd_pins[] = { 94 };
|
||||
static const unsigned int sdc3_data_pins[] = { 95 };
|
||||
|
||||
#define FUNCTION(fname) \
|
||||
[APQ_MUX_##fname] = { \
|
||||
.name = #fname, \
|
||||
.groups = fname##_groups, \
|
||||
.ngroups = ARRAY_SIZE(fname##_groups), \
|
||||
}
|
||||
|
||||
#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10) \
|
||||
{ \
|
||||
.name = "gpio" #id, \
|
||||
.pins = gpio##id##_pins, \
|
||||
.npins = ARRAY_SIZE(gpio##id##_pins), \
|
||||
.funcs = (int[]){ \
|
||||
APQ_MUX_NA, /* gpio mode */ \
|
||||
APQ_MUX_##f1, \
|
||||
APQ_MUX_##f2, \
|
||||
APQ_MUX_##f3, \
|
||||
APQ_MUX_##f4, \
|
||||
APQ_MUX_##f5, \
|
||||
APQ_MUX_##f6, \
|
||||
APQ_MUX_##f7, \
|
||||
APQ_MUX_##f8, \
|
||||
APQ_MUX_##f9, \
|
||||
APQ_MUX_##f10, \
|
||||
}, \
|
||||
.nfuncs = 11, \
|
||||
.ctl_reg = 0x1000 + 0x10 * id, \
|
||||
.io_reg = 0x1004 + 0x10 * id, \
|
||||
.intr_cfg_reg = 0x1008 + 0x10 * id, \
|
||||
.intr_status_reg = 0x100c + 0x10 * id, \
|
||||
.intr_target_reg = 0x400 + 0x4 * 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_ack_high = 1, \
|
||||
.intr_target_bit = 0, \
|
||||
.intr_raw_status_bit = 3, \
|
||||
.intr_polarity_bit = 1, \
|
||||
.intr_detection_bit = 2, \
|
||||
.intr_detection_width = 1, \
|
||||
}
|
||||
|
||||
#define SDC_PINGROUP(pg_name, ctl, pull, drv) \
|
||||
{ \
|
||||
.name = #pg_name, \
|
||||
.pins = pg_name##_pins, \
|
||||
.npins = ARRAY_SIZE(pg_name##_pins), \
|
||||
.ctl_reg = ctl, \
|
||||
.io_reg = 0, \
|
||||
.intr_cfg_reg = 0, \
|
||||
.intr_status_reg = 0, \
|
||||
.intr_target_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, \
|
||||
}
|
||||
|
||||
enum apq8064_functions {
|
||||
APQ_MUX_cam_mclk,
|
||||
APQ_MUX_codec_mic_i2s,
|
||||
APQ_MUX_codec_spkr_i2s,
|
||||
APQ_MUX_gsbi1,
|
||||
APQ_MUX_gsbi2,
|
||||
APQ_MUX_gsbi3,
|
||||
APQ_MUX_gsbi4,
|
||||
APQ_MUX_gsbi4_cam_i2c,
|
||||
APQ_MUX_gsbi5,
|
||||
APQ_MUX_gsbi5_spi_cs1,
|
||||
APQ_MUX_gsbi5_spi_cs2,
|
||||
APQ_MUX_gsbi5_spi_cs3,
|
||||
APQ_MUX_gsbi6,
|
||||
APQ_MUX_gsbi6_spi_cs1,
|
||||
APQ_MUX_gsbi6_spi_cs2,
|
||||
APQ_MUX_gsbi6_spi_cs3,
|
||||
APQ_MUX_gsbi7,
|
||||
APQ_MUX_gsbi7_spi_cs1,
|
||||
APQ_MUX_gsbi7_spi_cs2,
|
||||
APQ_MUX_gsbi7_spi_cs3,
|
||||
APQ_MUX_gsbi_cam_i2c,
|
||||
APQ_MUX_hdmi,
|
||||
APQ_MUX_mi2s,
|
||||
APQ_MUX_riva_bt,
|
||||
APQ_MUX_riva_fm,
|
||||
APQ_MUX_riva_wlan,
|
||||
APQ_MUX_sdc2,
|
||||
APQ_MUX_sdc4,
|
||||
APQ_MUX_slimbus,
|
||||
APQ_MUX_spkr_i2s,
|
||||
APQ_MUX_tsif1,
|
||||
APQ_MUX_tsif2,
|
||||
APQ_MUX_usb2_hsic,
|
||||
APQ_MUX_NA,
|
||||
};
|
||||
|
||||
static const char * const cam_mclk_groups[] = {
|
||||
"gpio4" "gpio5"
|
||||
};
|
||||
static const char * const codec_mic_i2s_groups[] = {
|
||||
"gpio34", "gpio35", "gpio36", "gpio37", "gpio38"
|
||||
};
|
||||
static const char * const codec_spkr_i2s_groups[] = {
|
||||
"gpio39", "gpio40", "gpio41", "gpio42"
|
||||
};
|
||||
static const char * const gsbi1_groups[] = {
|
||||
"gpio18", "gpio19", "gpio20", "gpio21"
|
||||
};
|
||||
static const char * const gsbi2_groups[] = {
|
||||
"gpio22", "gpio23", "gpio24", "gpio25"
|
||||
};
|
||||
static const char * const gsbi3_groups[] = {
|
||||
"gpio6", "gpio7", "gpio8", "gpio9"
|
||||
};
|
||||
static const char * const gsbi4_groups[] = {
|
||||
"gpio10", "gpio11", "gpio12", "gpio13"
|
||||
};
|
||||
static const char * const gsbi4_cam_i2c_groups[] = {
|
||||
"gpio10", "gpio11", "gpio12", "gpio13"
|
||||
};
|
||||
static const char * const gsbi5_groups[] = {
|
||||
"gpio51", "gpio52", "gpio53", "gpio54"
|
||||
};
|
||||
static const char * const gsbi5_spi_cs1_groups[] = {
|
||||
"gpio47"
|
||||
};
|
||||
static const char * const gsbi5_spi_cs2_groups[] = {
|
||||
"gpio31"
|
||||
};
|
||||
static const char * const gsbi5_spi_cs3_groups[] = {
|
||||
"gpio32"
|
||||
};
|
||||
static const char * const gsbi6_groups[] = {
|
||||
"gpio14", "gpio15", "gpio16", "gpio17"
|
||||
};
|
||||
static const char * const gsbi6_spi_cs1_groups[] = {
|
||||
"gpio47"
|
||||
};
|
||||
static const char * const gsbi6_spi_cs2_groups[] = {
|
||||
"gpio31"
|
||||
};
|
||||
static const char * const gsbi6_spi_cs3_groups[] = {
|
||||
"gpio32"
|
||||
};
|
||||
static const char * const gsbi7_groups[] = {
|
||||
"gpio82", "gpio83", "gpio84", "gpio85"
|
||||
};
|
||||
static const char * const gsbi7_spi_cs1_groups[] = {
|
||||
"gpio47"
|
||||
};
|
||||
static const char * const gsbi7_spi_cs2_groups[] = {
|
||||
"gpio31"
|
||||
};
|
||||
static const char * const gsbi7_spi_cs3_groups[] = {
|
||||
"gpio32"
|
||||
};
|
||||
static const char * const gsbi_cam_i2c_groups[] = {
|
||||
"gpio10", "gpio11", "gpio12", "gpio13"
|
||||
};
|
||||
static const char * const hdmi_groups[] = {
|
||||
"gpio69", "gpio70", "gpio71", "gpio72"
|
||||
};
|
||||
static const char * const mi2s_groups[] = {
|
||||
"gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", "gpio33"
|
||||
};
|
||||
static const char * const riva_bt_groups[] = {
|
||||
"gpio16", "gpio17"
|
||||
};
|
||||
static const char * const riva_fm_groups[] = {
|
||||
"gpio14", "gpio15"
|
||||
};
|
||||
static const char * const riva_wlan_groups[] = {
|
||||
"gpio64", "gpio65", "gpio66", "gpio67", "gpio68"
|
||||
};
|
||||
static const char * const sdc2_groups[] = {
|
||||
"gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62"
|
||||
};
|
||||
static const char * const sdc4_groups[] = {
|
||||
"gpio63", "gpio64", "gpio65", "gpio66", "gpio67", "gpio68"
|
||||
};
|
||||
static const char * const slimbus_groups[] = {
|
||||
"gpio40", "gpio41"
|
||||
};
|
||||
static const char * const spkr_i2s_groups[] = {
|
||||
"gpio47", "gpio48", "gpio49", "gpio50"
|
||||
};
|
||||
static const char * const tsif1_groups[] = {
|
||||
"gpio55", "gpio56", "gpio57"
|
||||
};
|
||||
static const char * const tsif2_groups[] = {
|
||||
"gpio58", "gpio59", "gpio60"
|
||||
};
|
||||
static const char * const usb2_hsic_groups[] = {
|
||||
"gpio88", "gpio89"
|
||||
};
|
||||
|
||||
static const struct msm_function apq8064_functions[] = {
|
||||
FUNCTION(cam_mclk),
|
||||
FUNCTION(codec_mic_i2s),
|
||||
FUNCTION(codec_spkr_i2s),
|
||||
FUNCTION(gsbi1),
|
||||
FUNCTION(gsbi2),
|
||||
FUNCTION(gsbi3),
|
||||
FUNCTION(gsbi4),
|
||||
FUNCTION(gsbi4_cam_i2c),
|
||||
FUNCTION(gsbi5),
|
||||
FUNCTION(gsbi5_spi_cs1),
|
||||
FUNCTION(gsbi5_spi_cs2),
|
||||
FUNCTION(gsbi5_spi_cs3),
|
||||
FUNCTION(gsbi6),
|
||||
FUNCTION(gsbi6_spi_cs1),
|
||||
FUNCTION(gsbi6_spi_cs2),
|
||||
FUNCTION(gsbi6_spi_cs3),
|
||||
FUNCTION(gsbi7),
|
||||
FUNCTION(gsbi7_spi_cs1),
|
||||
FUNCTION(gsbi7_spi_cs2),
|
||||
FUNCTION(gsbi7_spi_cs3),
|
||||
FUNCTION(gsbi_cam_i2c),
|
||||
FUNCTION(hdmi),
|
||||
FUNCTION(mi2s),
|
||||
FUNCTION(riva_bt),
|
||||
FUNCTION(riva_fm),
|
||||
FUNCTION(riva_wlan),
|
||||
FUNCTION(sdc2),
|
||||
FUNCTION(sdc4),
|
||||
FUNCTION(slimbus),
|
||||
FUNCTION(spkr_i2s),
|
||||
FUNCTION(tsif1),
|
||||
FUNCTION(tsif2),
|
||||
FUNCTION(usb2_hsic),
|
||||
};
|
||||
|
||||
static const struct msm_pingroup apq8064_groups[] = {
|
||||
PINGROUP(0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(3, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(4, NA, NA, cam_mclk, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(5, NA, cam_mclk, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(6, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(7, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(8, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(9, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(10, gsbi4, NA, NA, NA, NA, NA, NA, NA, gsbi4_cam_i2c, NA),
|
||||
PINGROUP(11, gsbi4, NA, NA, NA, NA, NA, NA, NA, NA, gsbi4_cam_i2c),
|
||||
PINGROUP(12, gsbi4, NA, NA, NA, NA, gsbi4_cam_i2c, NA, NA, NA, NA),
|
||||
PINGROUP(13, gsbi4, NA, NA, NA, NA, gsbi4_cam_i2c, NA, NA, NA, NA),
|
||||
PINGROUP(14, riva_fm, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(15, riva_fm, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(16, riva_bt, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(17, riva_bt, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(18, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(19, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(20, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(21, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(22, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(23, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(24, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(25, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(26, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(27, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(28, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(29, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(30, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(31, mi2s, NA, gsbi5_spi_cs2, gsbi6_spi_cs2, gsbi7_spi_cs2, NA, NA, NA, NA, NA),
|
||||
PINGROUP(32, mi2s, NA, NA, NA, NA, gsbi5_spi_cs3, gsbi6_spi_cs3, gsbi7_spi_cs3, NA, NA),
|
||||
PINGROUP(33, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(34, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(35, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(36, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(37, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(38, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(39, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(40, slimbus, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(41, slimbus, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(42, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(43, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(44, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(45, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(46, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(47, spkr_i2s, gsbi5_spi_cs1, gsbi6_spi_cs1, gsbi7_spi_cs1, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(48, spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(49, spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(50, spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(51, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(52, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(53, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(54, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(55, tsif1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(56, tsif1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(57, tsif1, sdc2, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(58, tsif2, sdc2, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(59, tsif2, sdc2, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(60, tsif2, sdc2, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(61, NA, sdc2, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(62, NA, sdc2, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(63, NA, sdc4, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(64, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(65, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(66, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(67, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(68, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(69, hdmi, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(70, hdmi, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(71, hdmi, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(72, hdmi, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(73, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(74, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(75, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(76, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(77, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(78, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(79, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(80, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(81, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(82, NA, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(83, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(84, NA, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(85, NA, NA, gsbi7, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(86, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(87, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(88, usb2_hsic, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(89, usb2_hsic, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
|
||||
SDC_PINGROUP(sdc1_clk, 0x20a0, 13, 6),
|
||||
SDC_PINGROUP(sdc1_cmd, 0x20a0, 11, 3),
|
||||
SDC_PINGROUP(sdc1_data, 0x20a0, 9, 0),
|
||||
|
||||
SDC_PINGROUP(sdc3_clk, 0x20a4, 14, 6),
|
||||
SDC_PINGROUP(sdc3_cmd, 0x20a4, 11, 3),
|
||||
SDC_PINGROUP(sdc3_data, 0x20a4, 9, 0),
|
||||
};
|
||||
|
||||
#define NUM_GPIO_PINGROUPS 90
|
||||
|
||||
static const struct msm_pinctrl_soc_data apq8064_pinctrl = {
|
||||
.pins = apq8064_pins,
|
||||
.npins = ARRAY_SIZE(apq8064_pins),
|
||||
.functions = apq8064_functions,
|
||||
.nfunctions = ARRAY_SIZE(apq8064_functions),
|
||||
.groups = apq8064_groups,
|
||||
.ngroups = ARRAY_SIZE(apq8064_groups),
|
||||
.ngpios = NUM_GPIO_PINGROUPS,
|
||||
};
|
||||
|
||||
static int apq8064_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
return msm_pinctrl_probe(pdev, &apq8064_pinctrl);
|
||||
}
|
||||
|
||||
static const struct of_device_id apq8064_pinctrl_of_match[] = {
|
||||
{ .compatible = "qcom,apq8064-pinctrl", },
|
||||
{ },
|
||||
};
|
||||
|
||||
static struct platform_driver apq8064_pinctrl_driver = {
|
||||
.driver = {
|
||||
.name = "apq8064-pinctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = apq8064_pinctrl_of_match,
|
||||
},
|
||||
.probe = apq8064_pinctrl_probe,
|
||||
.remove = msm_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init apq8064_pinctrl_init(void)
|
||||
{
|
||||
return platform_driver_register(&apq8064_pinctrl_driver);
|
||||
}
|
||||
arch_initcall(apq8064_pinctrl_init);
|
||||
|
||||
static void __exit apq8064_pinctrl_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&apq8064_pinctrl_driver);
|
||||
}
|
||||
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);
|
|
@ -16,9 +16,6 @@
|
|||
#include <linux/of_irq.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/irqchip/chained_irq.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/pinctrl/machine.h>
|
||||
|
@ -47,7 +44,6 @@ struct at91_gpio_chip {
|
|||
int pioc_idx; /* PIO bank index */
|
||||
void __iomem *regbase; /* PIO bank virtual address */
|
||||
struct clk *clock; /* associated clock */
|
||||
struct irq_domain *domain; /* associated irq domain */
|
||||
struct at91_pinctrl_mux_ops *ops; /* ops */
|
||||
};
|
||||
|
||||
|
@ -1192,21 +1188,6 @@ static int at91_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int at91_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
struct at91_gpio_chip *at91_gpio = to_at91_gpio_chip(chip);
|
||||
int virq;
|
||||
|
||||
if (offset < chip->ngpio)
|
||||
virq = irq_create_mapping(at91_gpio->domain, offset);
|
||||
else
|
||||
virq = -ENXIO;
|
||||
|
||||
dev_dbg(chip->dev, "%s: request IRQ for GPIO %d, return %d\n",
|
||||
chip->label, offset + chip->base, virq);
|
||||
return virq;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static void at91_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
|
||||
{
|
||||
|
@ -1216,8 +1197,7 @@ static void at91_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
|
|||
void __iomem *pio = at91_gpio->regbase;
|
||||
|
||||
for (i = 0; i < chip->ngpio; i++) {
|
||||
unsigned pin = chip->base + i;
|
||||
unsigned mask = pin_to_mask(pin);
|
||||
unsigned mask = pin_to_mask(i);
|
||||
const char *gpio_label;
|
||||
u32 pdsr;
|
||||
|
||||
|
@ -1336,6 +1316,11 @@ static int alt_gpio_irq_type(struct irq_data *d, unsigned type)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void gpio_irq_ack(struct irq_data *d)
|
||||
{
|
||||
/* the interrupt is already cleared before by reading ISR */
|
||||
}
|
||||
|
||||
static unsigned int gpio_irq_startup(struct irq_data *d)
|
||||
{
|
||||
struct at91_gpio_chip *at91_gpio = irq_data_get_irq_chip_data(d);
|
||||
|
@ -1435,6 +1420,7 @@ void at91_pinctrl_gpio_resume(void)
|
|||
|
||||
static struct irq_chip gpio_irqchip = {
|
||||
.name = "GPIO",
|
||||
.irq_ack = gpio_irq_ack,
|
||||
.irq_startup = gpio_irq_startup,
|
||||
.irq_shutdown = gpio_irq_shutdown,
|
||||
.irq_disable = gpio_irq_mask,
|
||||
|
@ -1446,9 +1432,11 @@ static struct irq_chip gpio_irqchip = {
|
|||
|
||||
static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
|
||||
{
|
||||
struct irq_chip *chip = irq_desc_get_chip(desc);
|
||||
struct irq_data *idata = irq_desc_get_irq_data(desc);
|
||||
struct at91_gpio_chip *at91_gpio = irq_data_get_irq_chip_data(idata);
|
||||
struct irq_chip *chip = irq_get_chip(irq);
|
||||
struct gpio_chip *gpio_chip = irq_desc_get_handler_data(desc);
|
||||
struct at91_gpio_chip *at91_gpio = container_of(gpio_chip,
|
||||
struct at91_gpio_chip, chip);
|
||||
|
||||
void __iomem *pio = at91_gpio->regbase;
|
||||
unsigned long isr;
|
||||
int n;
|
||||
|
@ -1465,85 +1453,25 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
|
|||
break;
|
||||
at91_gpio = at91_gpio->next;
|
||||
pio = at91_gpio->regbase;
|
||||
gpio_chip = &at91_gpio->chip;
|
||||
continue;
|
||||
}
|
||||
|
||||
for_each_set_bit(n, &isr, BITS_PER_LONG) {
|
||||
generic_handle_irq(irq_find_mapping(at91_gpio->domain, n));
|
||||
generic_handle_irq(irq_find_mapping(
|
||||
gpio_chip->irqdomain, n));
|
||||
}
|
||||
}
|
||||
chained_irq_exit(chip, desc);
|
||||
/* now it may re-trigger */
|
||||
}
|
||||
|
||||
/*
|
||||
* This lock class tells lockdep that GPIO irqs are in a different
|
||||
* category than their parents, so it won't report false recursion.
|
||||
*/
|
||||
static struct lock_class_key gpio_lock_class;
|
||||
|
||||
static int at91_gpio_irq_map(struct irq_domain *h, unsigned int virq,
|
||||
irq_hw_number_t hw)
|
||||
{
|
||||
struct at91_gpio_chip *at91_gpio = h->host_data;
|
||||
void __iomem *pio = at91_gpio->regbase;
|
||||
u32 mask = 1 << hw;
|
||||
|
||||
irq_set_lockdep_class(virq, &gpio_lock_class);
|
||||
|
||||
/*
|
||||
* Can use the "simple" and not "edge" handler since it's
|
||||
* shorter, and the AIC handles interrupts sanely.
|
||||
*/
|
||||
irq_set_chip(virq, &gpio_irqchip);
|
||||
if ((at91_gpio->ops == &at91sam9x5_ops) &&
|
||||
(readl_relaxed(pio + PIO_AIMMR) & mask) &&
|
||||
(readl_relaxed(pio + PIO_ELSR) & mask))
|
||||
irq_set_handler(virq, handle_level_irq);
|
||||
else
|
||||
irq_set_handler(virq, handle_simple_irq);
|
||||
set_irq_flags(virq, IRQF_VALID);
|
||||
irq_set_chip_data(virq, at91_gpio);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int at91_gpio_irq_domain_xlate(struct irq_domain *d,
|
||||
struct device_node *ctrlr,
|
||||
const u32 *intspec, unsigned int intsize,
|
||||
irq_hw_number_t *out_hwirq,
|
||||
unsigned int *out_type)
|
||||
{
|
||||
struct at91_gpio_chip *at91_gpio = d->host_data;
|
||||
int ret;
|
||||
int pin = at91_gpio->chip.base + intspec[0];
|
||||
|
||||
if (WARN_ON(intsize < 2))
|
||||
return -EINVAL;
|
||||
*out_hwirq = intspec[0];
|
||||
*out_type = intspec[1] & IRQ_TYPE_SENSE_MASK;
|
||||
|
||||
ret = gpio_request(pin, ctrlr->full_name);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = gpio_direction_input(pin);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops at91_gpio_ops = {
|
||||
.map = at91_gpio_irq_map,
|
||||
.xlate = at91_gpio_irq_domain_xlate,
|
||||
};
|
||||
|
||||
static int at91_gpio_of_irq_setup(struct device_node *node,
|
||||
struct at91_gpio_chip *at91_gpio)
|
||||
{
|
||||
struct at91_gpio_chip *prev = NULL;
|
||||
struct at91_gpio_chip *prev = NULL;
|
||||
struct irq_data *d = irq_get_irq_data(at91_gpio->pioc_virq);
|
||||
int ret;
|
||||
|
||||
at91_gpio->pioc_hwirq = irqd_to_hwirq(d);
|
||||
|
||||
|
@ -1553,10 +1481,17 @@ static int at91_gpio_of_irq_setup(struct device_node *node,
|
|||
/* Disable irqs of this PIO controller */
|
||||
writel_relaxed(~0, at91_gpio->regbase + PIO_IDR);
|
||||
|
||||
/* Setup irq domain */
|
||||
at91_gpio->domain = irq_domain_add_linear(node, at91_gpio->chip.ngpio,
|
||||
&at91_gpio_ops, at91_gpio);
|
||||
if (!at91_gpio->domain)
|
||||
/*
|
||||
* Let the generic code handle this edge IRQ, the the chained
|
||||
* handler will perform the actual work of handling the parent
|
||||
* interrupt.
|
||||
*/
|
||||
ret = gpiochip_irqchip_add(&at91_gpio->chip,
|
||||
&gpio_irqchip,
|
||||
0,
|
||||
handle_edge_irq,
|
||||
IRQ_TYPE_EDGE_BOTH);
|
||||
if (ret)
|
||||
panic("at91_gpio.%d: couldn't allocate irq domain (DT).\n",
|
||||
at91_gpio->pioc_idx);
|
||||
|
||||
|
@ -1571,8 +1506,11 @@ static int at91_gpio_of_irq_setup(struct device_node *node,
|
|||
if (prev && prev->next == at91_gpio)
|
||||
return 0;
|
||||
|
||||
irq_set_chip_data(at91_gpio->pioc_virq, at91_gpio);
|
||||
irq_set_chained_handler(at91_gpio->pioc_virq, gpio_irq_handler);
|
||||
/* Then register the chain on the parent IRQ */
|
||||
gpiochip_set_chained_irqchip(&at91_gpio->chip,
|
||||
&gpio_irqchip,
|
||||
at91_gpio->pioc_virq,
|
||||
gpio_irq_handler);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1586,7 +1524,6 @@ static struct gpio_chip at91_gpio_template = {
|
|||
.get = at91_gpio_get,
|
||||
.direction_output = at91_gpio_direction_output,
|
||||
.set = at91_gpio_set,
|
||||
.to_irq = at91_gpio_to_irq,
|
||||
.dbg_show = at91_gpio_dbg_show,
|
||||
.can_sleep = false,
|
||||
.ngpio = MAX_NB_GPIO_PER_BANK,
|
||||
|
|
|
@ -43,9 +43,20 @@
|
|||
#define BYT_INT_STAT_REG 0x800
|
||||
|
||||
/* BYT_CONF0_REG register bits */
|
||||
#define BYT_IODEN BIT(31)
|
||||
#define BYT_TRIG_NEG BIT(26)
|
||||
#define BYT_TRIG_POS BIT(25)
|
||||
#define BYT_TRIG_LVL BIT(24)
|
||||
#define BYT_PULL_STR_SHIFT 9
|
||||
#define BYT_PULL_STR_MASK (3 << BYT_PULL_STR_SHIFT)
|
||||
#define BYT_PULL_STR_2K (0 << BYT_PULL_STR_SHIFT)
|
||||
#define BYT_PULL_STR_10K (1 << BYT_PULL_STR_SHIFT)
|
||||
#define BYT_PULL_STR_20K (2 << BYT_PULL_STR_SHIFT)
|
||||
#define BYT_PULL_STR_40K (3 << BYT_PULL_STR_SHIFT)
|
||||
#define BYT_PULL_ASSIGN_SHIFT 7
|
||||
#define BYT_PULL_ASSIGN_MASK (3 << BYT_PULL_ASSIGN_SHIFT)
|
||||
#define BYT_PULL_ASSIGN_UP (1 << BYT_PULL_ASSIGN_SHIFT)
|
||||
#define BYT_PULL_ASSIGN_DOWN (2 << BYT_PULL_ASSIGN_SHIFT)
|
||||
#define BYT_PIN_MUX 0x07
|
||||
|
||||
/* BYT_VAL_REG register bits */
|
||||
|
@ -321,6 +332,8 @@ static void byt_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
|
|||
spin_lock_irqsave(&vg->lock, flags);
|
||||
|
||||
for (i = 0; i < vg->chip.ngpio; i++) {
|
||||
const char *pull_str = NULL;
|
||||
const char *pull = NULL;
|
||||
const char *label;
|
||||
offs = vg->range->pins[i] * 16;
|
||||
conf0 = readl(vg->reg_base + offs + BYT_CONF0_REG);
|
||||
|
@ -330,8 +343,32 @@ static void byt_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
|
|||
if (!label)
|
||||
label = "Unrequested";
|
||||
|
||||
switch (conf0 & BYT_PULL_ASSIGN_MASK) {
|
||||
case BYT_PULL_ASSIGN_UP:
|
||||
pull = "up";
|
||||
break;
|
||||
case BYT_PULL_ASSIGN_DOWN:
|
||||
pull = "down";
|
||||
break;
|
||||
}
|
||||
|
||||
switch (conf0 & BYT_PULL_STR_MASK) {
|
||||
case BYT_PULL_STR_2K:
|
||||
pull_str = "2k";
|
||||
break;
|
||||
case BYT_PULL_STR_10K:
|
||||
pull_str = "10k";
|
||||
break;
|
||||
case BYT_PULL_STR_20K:
|
||||
pull_str = "20k";
|
||||
break;
|
||||
case BYT_PULL_STR_40K:
|
||||
pull_str = "40k";
|
||||
break;
|
||||
}
|
||||
|
||||
seq_printf(s,
|
||||
" gpio-%-3d (%-20.20s) %s %s %s pad-%-3d offset:0x%03x mux:%d %s%s%s\n",
|
||||
" gpio-%-3d (%-20.20s) %s %s %s pad-%-3d offset:0x%03x mux:%d %s%s%s",
|
||||
i,
|
||||
label,
|
||||
val & BYT_INPUT_EN ? " " : "in",
|
||||
|
@ -339,9 +376,19 @@ static void byt_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
|
|||
val & BYT_LEVEL ? "hi" : "lo",
|
||||
vg->range->pins[i], offs,
|
||||
conf0 & 0x7,
|
||||
conf0 & BYT_TRIG_NEG ? " fall" : "",
|
||||
conf0 & BYT_TRIG_POS ? " rise" : "",
|
||||
conf0 & BYT_TRIG_LVL ? " level" : "");
|
||||
conf0 & BYT_TRIG_NEG ? " fall" : " ",
|
||||
conf0 & BYT_TRIG_POS ? " rise" : " ",
|
||||
conf0 & BYT_TRIG_LVL ? " level" : " ");
|
||||
|
||||
if (pull && pull_str)
|
||||
seq_printf(s, " %-4s %-3s", pull, pull_str);
|
||||
else
|
||||
seq_puts(s, " ");
|
||||
|
||||
if (conf0 & BYT_IODEN)
|
||||
seq_puts(s, " open-drain");
|
||||
|
||||
seq_puts(s, "\n");
|
||||
}
|
||||
spin_unlock_irqrestore(&vg->lock, flags);
|
||||
}
|
||||
|
@ -527,12 +574,6 @@ static int byt_gpio_probe(struct platform_device *pdev)
|
|||
gc->can_sleep = false;
|
||||
gc->dev = dev;
|
||||
|
||||
ret = gpiochip_add(gc);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed adding byt-gpio chip\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* set up interrupts */
|
||||
irq_rc = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
if (irq_rc && irq_rc->start) {
|
||||
|
@ -550,6 +591,12 @@ static int byt_gpio_probe(struct platform_device *pdev)
|
|||
irq_set_chained_handler(hwirq, byt_gpio_irq_handler);
|
||||
}
|
||||
|
||||
ret = gpiochip_add(gc);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed adding byt-gpio chip\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
return 0;
|
||||
|
@ -572,6 +619,7 @@ static const struct dev_pm_ops byt_gpio_pm_ops = {
|
|||
|
||||
static const struct acpi_device_id byt_gpio_acpi_match[] = {
|
||||
{ "INT33B2", 0 },
|
||||
{ "INT33FC", 0 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, byt_gpio_acpi_match);
|
||||
|
|
|
@ -718,6 +718,73 @@ struct samsung_pin_ctrl s5pv210_pin_ctrl[] = {
|
|||
},
|
||||
};
|
||||
|
||||
/* pin banks of exynos3250 pin-controller 0 */
|
||||
static struct samsung_pin_bank exynos3250_pin_banks0[] = {
|
||||
EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
|
||||
EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04),
|
||||
EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08),
|
||||
EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c),
|
||||
EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10),
|
||||
EXYNOS_PIN_BANK_EINTG(4, 0x0a0, "gpd0", 0x14),
|
||||
EXYNOS_PIN_BANK_EINTG(4, 0x0c0, "gpd1", 0x18),
|
||||
};
|
||||
|
||||
/* pin banks of exynos3250 pin-controller 1 */
|
||||
static struct samsung_pin_bank exynos3250_pin_banks1[] = {
|
||||
EXYNOS_PIN_BANK_EINTN(8, 0x120, "gpe0"),
|
||||
EXYNOS_PIN_BANK_EINTN(8, 0x140, "gpe1"),
|
||||
EXYNOS_PIN_BANK_EINTN(3, 0x180, "gpe2"),
|
||||
EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpk0", 0x08),
|
||||
EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c),
|
||||
EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10),
|
||||
EXYNOS_PIN_BANK_EINTG(4, 0x0c0, "gpl0", 0x18),
|
||||
EXYNOS_PIN_BANK_EINTG(8, 0x260, "gpm0", 0x24),
|
||||
EXYNOS_PIN_BANK_EINTG(7, 0x280, "gpm1", 0x28),
|
||||
EXYNOS_PIN_BANK_EINTG(5, 0x2a0, "gpm2", 0x2c),
|
||||
EXYNOS_PIN_BANK_EINTG(8, 0x2c0, "gpm3", 0x30),
|
||||
EXYNOS_PIN_BANK_EINTG(8, 0x2e0, "gpm4", 0x34),
|
||||
EXYNOS_PIN_BANK_EINTW(8, 0xc00, "gpx0", 0x00),
|
||||
EXYNOS_PIN_BANK_EINTW(8, 0xc20, "gpx1", 0x04),
|
||||
EXYNOS_PIN_BANK_EINTW(8, 0xc40, "gpx2", 0x08),
|
||||
EXYNOS_PIN_BANK_EINTW(8, 0xc60, "gpx3", 0x0c),
|
||||
};
|
||||
|
||||
/*
|
||||
* Samsung pinctrl driver data for Exynos3250 SoC. Exynos3250 SoC includes
|
||||
* two gpio/pin-mux/pinconfig controllers.
|
||||
*/
|
||||
struct samsung_pin_ctrl exynos3250_pin_ctrl[] = {
|
||||
{
|
||||
/* pin-controller instance 0 data */
|
||||
.pin_banks = exynos3250_pin_banks0,
|
||||
.nr_banks = ARRAY_SIZE(exynos3250_pin_banks0),
|
||||
.geint_con = EXYNOS_GPIO_ECON_OFFSET,
|
||||
.geint_mask = EXYNOS_GPIO_EMASK_OFFSET,
|
||||
.geint_pend = EXYNOS_GPIO_EPEND_OFFSET,
|
||||
.svc = EXYNOS_SVC_OFFSET,
|
||||
.eint_gpio_init = exynos_eint_gpio_init,
|
||||
.suspend = exynos_pinctrl_suspend,
|
||||
.resume = exynos_pinctrl_resume,
|
||||
.label = "exynos3250-gpio-ctrl0",
|
||||
}, {
|
||||
/* pin-controller instance 1 data */
|
||||
.pin_banks = exynos3250_pin_banks1,
|
||||
.nr_banks = ARRAY_SIZE(exynos3250_pin_banks1),
|
||||
.geint_con = EXYNOS_GPIO_ECON_OFFSET,
|
||||
.geint_mask = EXYNOS_GPIO_EMASK_OFFSET,
|
||||
.geint_pend = EXYNOS_GPIO_EPEND_OFFSET,
|
||||
.weint_con = EXYNOS_WKUP_ECON_OFFSET,
|
||||
.weint_mask = EXYNOS_WKUP_EMASK_OFFSET,
|
||||
.weint_pend = EXYNOS_WKUP_EPEND_OFFSET,
|
||||
.svc = EXYNOS_SVC_OFFSET,
|
||||
.eint_gpio_init = exynos_eint_gpio_init,
|
||||
.eint_wkup_init = exynos_eint_wkup_init,
|
||||
.suspend = exynos_pinctrl_suspend,
|
||||
.resume = exynos_pinctrl_resume,
|
||||
.label = "exynos3250-gpio-ctrl1",
|
||||
},
|
||||
};
|
||||
|
||||
/* pin banks of exynos4210 pin-controller 0 */
|
||||
static struct samsung_pin_bank exynos4210_pin_banks0[] = {
|
||||
EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
|
||||
|
|
|
@ -491,7 +491,7 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
|
|||
pin->mux_mode |= IOMUXC_CONFIG_SION;
|
||||
pin->config = config & ~IMX_PAD_SION;
|
||||
|
||||
dev_dbg(info->dev, "%s: %d 0x%08lx", info->pins[pin_id].name,
|
||||
dev_dbg(info->dev, "%s: 0x%x 0x%08lx", info->pins[pin_id].name,
|
||||
pin->mux_mode, pin->config);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,407 @@
|
|||
/*
|
||||
* Copyright (C) 2014 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
|
||||
#include "pinctrl-imx.h"
|
||||
|
||||
enum imx6sx_pads {
|
||||
MX6Sx_PAD_RESERVE0 = 0,
|
||||
MX6Sx_PAD_RESERVE1 = 1,
|
||||
MX6Sx_PAD_RESERVE2 = 2,
|
||||
MX6Sx_PAD_RESERVE3 = 3,
|
||||
MX6Sx_PAD_RESERVE4 = 4,
|
||||
MX6SX_PAD_GPIO1_IO00 = 5,
|
||||
MX6SX_PAD_GPIO1_IO01 = 6,
|
||||
MX6SX_PAD_GPIO1_IO02 = 7,
|
||||
MX6SX_PAD_GPIO1_IO03 = 8,
|
||||
MX6SX_PAD_GPIO1_IO04 = 9,
|
||||
MX6SX_PAD_GPIO1_IO05 = 10,
|
||||
MX6SX_PAD_GPIO1_IO06 = 11,
|
||||
MX6SX_PAD_GPIO1_IO07 = 12,
|
||||
MX6SX_PAD_GPIO1_IO08 = 13,
|
||||
MX6SX_PAD_GPIO1_IO09 = 14,
|
||||
MX6SX_PAD_GPIO1_IO10 = 15,
|
||||
MX6SX_PAD_GPIO1_IO11 = 16,
|
||||
MX6SX_PAD_GPIO1_IO12 = 17,
|
||||
MX6SX_PAD_GPIO1_IO13 = 18,
|
||||
MX6SX_PAD_CSI_DATA00 = 19,
|
||||
MX6SX_PAD_CSI_DATA01 = 20,
|
||||
MX6SX_PAD_CSI_DATA02 = 21,
|
||||
MX6SX_PAD_CSI_DATA03 = 22,
|
||||
MX6SX_PAD_CSI_DATA04 = 23,
|
||||
MX6SX_PAD_CSI_DATA05 = 24,
|
||||
MX6SX_PAD_CSI_DATA06 = 25,
|
||||
MX6SX_PAD_CSI_DATA07 = 26,
|
||||
MX6SX_PAD_CSI_HSYNC = 27,
|
||||
MX6SX_PAD_CSI_MCLK = 28,
|
||||
MX6SX_PAD_CSI_PIXCLK = 29,
|
||||
MX6SX_PAD_CSI_VSYNC = 30,
|
||||
MX6SX_PAD_ENET1_COL = 31,
|
||||
MX6SX_PAD_ENET1_CRS = 32,
|
||||
MX6SX_PAD_ENET1_MDC = 33,
|
||||
MX6SX_PAD_ENET1_MDIO = 34,
|
||||
MX6SX_PAD_ENET1_RX_CLK = 35,
|
||||
MX6SX_PAD_ENET1_TX_CLK = 36,
|
||||
MX6SX_PAD_ENET2_COL = 37,
|
||||
MX6SX_PAD_ENET2_CRS = 38,
|
||||
MX6SX_PAD_ENET2_RX_CLK = 39,
|
||||
MX6SX_PAD_ENET2_TX_CLK = 40,
|
||||
MX6SX_PAD_KEY_COL0 = 41,
|
||||
MX6SX_PAD_KEY_COL1 = 42,
|
||||
MX6SX_PAD_KEY_COL2 = 43,
|
||||
MX6SX_PAD_KEY_COL3 = 44,
|
||||
MX6SX_PAD_KEY_COL4 = 45,
|
||||
MX6SX_PAD_KEY_ROW0 = 46,
|
||||
MX6SX_PAD_KEY_ROW1 = 47,
|
||||
MX6SX_PAD_KEY_ROW2 = 48,
|
||||
MX6SX_PAD_KEY_ROW3 = 49,
|
||||
MX6SX_PAD_KEY_ROW4 = 50,
|
||||
MX6SX_PAD_LCD1_CLK = 51,
|
||||
MX6SX_PAD_LCD1_DATA00 = 52,
|
||||
MX6SX_PAD_LCD1_DATA01 = 53,
|
||||
MX6SX_PAD_LCD1_DATA02 = 54,
|
||||
MX6SX_PAD_LCD1_DATA03 = 55,
|
||||
MX6SX_PAD_LCD1_DATA04 = 56,
|
||||
MX6SX_PAD_LCD1_DATA05 = 57,
|
||||
MX6SX_PAD_LCD1_DATA06 = 58,
|
||||
MX6SX_PAD_LCD1_DATA07 = 59,
|
||||
MX6SX_PAD_LCD1_DATA08 = 60,
|
||||
MX6SX_PAD_LCD1_DATA09 = 61,
|
||||
MX6SX_PAD_LCD1_DATA10 = 62,
|
||||
MX6SX_PAD_LCD1_DATA11 = 63,
|
||||
MX6SX_PAD_LCD1_DATA12 = 64,
|
||||
MX6SX_PAD_LCD1_DATA13 = 65,
|
||||
MX6SX_PAD_LCD1_DATA14 = 66,
|
||||
MX6SX_PAD_LCD1_DATA15 = 67,
|
||||
MX6SX_PAD_LCD1_DATA16 = 68,
|
||||
MX6SX_PAD_LCD1_DATA17 = 69,
|
||||
MX6SX_PAD_LCD1_DATA18 = 70,
|
||||
MX6SX_PAD_LCD1_DATA19 = 71,
|
||||
MX6SX_PAD_LCD1_DATA20 = 72,
|
||||
MX6SX_PAD_LCD1_DATA21 = 73,
|
||||
MX6SX_PAD_LCD1_DATA22 = 74,
|
||||
MX6SX_PAD_LCD1_DATA23 = 75,
|
||||
MX6SX_PAD_LCD1_ENABLE = 76,
|
||||
MX6SX_PAD_LCD1_HSYNC = 77,
|
||||
MX6SX_PAD_LCD1_RESET = 78,
|
||||
MX6SX_PAD_LCD1_VSYNC = 79,
|
||||
MX6SX_PAD_NAND_ALE = 80,
|
||||
MX6SX_PAD_NAND_CE0_B = 81,
|
||||
MX6SX_PAD_NAND_CE1_B = 82,
|
||||
MX6SX_PAD_NAND_CLE = 83,
|
||||
MX6SX_PAD_NAND_DATA00 = 84 ,
|
||||
MX6SX_PAD_NAND_DATA01 = 85,
|
||||
MX6SX_PAD_NAND_DATA02 = 86,
|
||||
MX6SX_PAD_NAND_DATA03 = 87,
|
||||
MX6SX_PAD_NAND_DATA04 = 88,
|
||||
MX6SX_PAD_NAND_DATA05 = 89,
|
||||
MX6SX_PAD_NAND_DATA06 = 90,
|
||||
MX6SX_PAD_NAND_DATA07 = 91,
|
||||
MX6SX_PAD_NAND_RE_B = 92,
|
||||
MX6SX_PAD_NAND_READY_B = 93,
|
||||
MX6SX_PAD_NAND_WE_B = 94,
|
||||
MX6SX_PAD_NAND_WP_B = 95,
|
||||
MX6SX_PAD_QSPI1A_DATA0 = 96,
|
||||
MX6SX_PAD_QSPI1A_DATA1 = 97,
|
||||
MX6SX_PAD_QSPI1A_DATA2 = 98,
|
||||
MX6SX_PAD_QSPI1A_DATA3 = 99,
|
||||
MX6SX_PAD_QSPI1A_DQS = 100,
|
||||
MX6SX_PAD_QSPI1A_SCLK = 101,
|
||||
MX6SX_PAD_QSPI1A_SS0_B = 102,
|
||||
MX6SX_PAD_QSPI1A_SS1_B = 103,
|
||||
MX6SX_PAD_QSPI1B_DATA0 = 104,
|
||||
MX6SX_PAD_QSPI1B_DATA1 = 105,
|
||||
MX6SX_PAD_QSPI1B_DATA2 = 106,
|
||||
MX6SX_PAD_QSPI1B_DATA3 = 107,
|
||||
MX6SX_PAD_QSPI1B_DQS = 108,
|
||||
MX6SX_PAD_QSPI1B_SCLK = 109,
|
||||
MX6SX_PAD_QSPI1B_SS0_B = 110,
|
||||
MX6SX_PAD_QSPI1B_SS1_B = 111,
|
||||
MX6SX_PAD_RGMII1_RD0 = 112,
|
||||
MX6SX_PAD_RGMII1_RD1 = 113,
|
||||
MX6SX_PAD_RGMII1_RD2 = 114,
|
||||
MX6SX_PAD_RGMII1_RD3 = 115,
|
||||
MX6SX_PAD_RGMII1_RX_CTL = 116,
|
||||
MX6SX_PAD_RGMII1_RXC = 117,
|
||||
MX6SX_PAD_RGMII1_TD0 = 118,
|
||||
MX6SX_PAD_RGMII1_TD1 = 119,
|
||||
MX6SX_PAD_RGMII1_TD2 = 120,
|
||||
MX6SX_PAD_RGMII1_TD3 = 121,
|
||||
MX6SX_PAD_RGMII1_TX_CTL = 122,
|
||||
MX6SX_PAD_RGMII1_TXC = 123,
|
||||
MX6SX_PAD_RGMII2_RD0 = 124,
|
||||
MX6SX_PAD_RGMII2_RD1 = 125,
|
||||
MX6SX_PAD_RGMII2_RD2 = 126,
|
||||
MX6SX_PAD_RGMII2_RD3 = 127,
|
||||
MX6SX_PAD_RGMII2_RX_CTL = 128,
|
||||
MX6SX_PAD_RGMII2_RXC = 129,
|
||||
MX6SX_PAD_RGMII2_TD0 = 130,
|
||||
MX6SX_PAD_RGMII2_TD1 = 131,
|
||||
MX6SX_PAD_RGMII2_TD2 = 132,
|
||||
MX6SX_PAD_RGMII2_TD3 = 133,
|
||||
MX6SX_PAD_RGMII2_TX_CTL = 134,
|
||||
MX6SX_PAD_RGMII2_TXC = 135,
|
||||
MX6SX_PAD_SD1_CLK = 136,
|
||||
MX6SX_PAD_SD1_CMD = 137,
|
||||
MX6SX_PAD_SD1_DATA0 = 138,
|
||||
MX6SX_PAD_SD1_DATA1 = 139,
|
||||
MX6SX_PAD_SD1_DATA2 = 140,
|
||||
MX6SX_PAD_SD1_DATA3 = 141,
|
||||
MX6SX_PAD_SD2_CLK = 142,
|
||||
MX6SX_PAD_SD2_CMD = 143,
|
||||
MX6SX_PAD_SD2_DATA0 = 144,
|
||||
MX6SX_PAD_SD2_DATA1 = 145,
|
||||
MX6SX_PAD_SD2_DATA2 = 146,
|
||||
MX6SX_PAD_SD2_DATA3 = 147,
|
||||
MX6SX_PAD_SD3_CLK = 148,
|
||||
MX6SX_PAD_SD3_CMD = 149,
|
||||
MX6SX_PAD_SD3_DATA0 = 150,
|
||||
MX6SX_PAD_SD3_DATA1 = 151,
|
||||
MX6SX_PAD_SD3_DATA2 = 152,
|
||||
MX6SX_PAD_SD3_DATA3 = 153,
|
||||
MX6SX_PAD_SD3_DATA4 = 154,
|
||||
MX6SX_PAD_SD3_DATA5 = 155,
|
||||
MX6SX_PAD_SD3_DATA6 = 156,
|
||||
MX6SX_PAD_SD3_DATA7 = 157,
|
||||
MX6SX_PAD_SD4_CLK = 158,
|
||||
MX6SX_PAD_SD4_CMD = 159,
|
||||
MX6SX_PAD_SD4_DATA0 = 160,
|
||||
MX6SX_PAD_SD4_DATA1 = 161,
|
||||
MX6SX_PAD_SD4_DATA2 = 162,
|
||||
MX6SX_PAD_SD4_DATA3 = 163,
|
||||
MX6SX_PAD_SD4_DATA4 = 164,
|
||||
MX6SX_PAD_SD4_DATA5 = 165,
|
||||
MX6SX_PAD_SD4_DATA6 = 166,
|
||||
MX6SX_PAD_SD4_DATA7 = 167,
|
||||
MX6SX_PAD_SD4_RESET_B = 168,
|
||||
MX6SX_PAD_USB_H_DATA = 169,
|
||||
MX6SX_PAD_USB_H_STROBE = 170,
|
||||
};
|
||||
|
||||
/* Pad names for the pinmux subsystem */
|
||||
static const struct pinctrl_pin_desc imx6sx_pinctrl_pads[] = {
|
||||
IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE0),
|
||||
IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE1),
|
||||
IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE2),
|
||||
IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE3),
|
||||
IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE4),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO00),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO01),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO02),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO03),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO04),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO05),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO06),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO07),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO08),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO09),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO10),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO11),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO12),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO13),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA00),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA01),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA02),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA03),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA04),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA05),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA06),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA07),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_CSI_HSYNC),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_CSI_MCLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_CSI_PIXCLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_CSI_VSYNC),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_COL),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_CRS),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_MDC),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_MDIO),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_RX_CLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_TX_CLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_ENET2_COL),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_ENET2_CRS),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_ENET2_RX_CLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_ENET2_TX_CLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL0),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL1),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL2),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL3),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL4),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW0),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW1),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW2),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW3),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW4),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_CLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA00),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA01),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA02),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA03),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA04),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA05),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA06),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA07),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA08),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA09),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA10),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA11),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA12),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA13),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA14),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA15),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA16),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA17),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA18),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA19),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA20),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA21),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA22),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA23),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_ENABLE),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_HSYNC),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_RESET),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_VSYNC),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_ALE),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_CE0_B),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_CE1_B),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_CLE),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA00),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA01),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA02),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA03),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA04),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA05),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA06),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA07),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_RE_B),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_READY_B),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_WE_B),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_NAND_WP_B),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DATA0),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DATA1),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DATA2),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DATA3),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DQS),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_SCLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_SS0_B),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_SS1_B),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DATA0),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DATA1),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DATA2),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DATA3),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DQS),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_SCLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_SS0_B),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_SS1_B),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RD0),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RD1),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RD2),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RD3),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RX_CTL),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RXC),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TD0),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TD1),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TD2),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TD3),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TX_CTL),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TXC),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RD0),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RD1),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RD2),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RD3),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RX_CTL),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RXC),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TD0),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TD1),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TD2),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TD3),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TX_CTL),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TXC),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD1_CLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD1_CMD),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD1_DATA0),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD1_DATA1),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD1_DATA2),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD1_DATA3),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD2_CLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD2_CMD),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD2_DATA0),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD2_DATA1),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD2_DATA2),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD2_DATA3),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD3_CLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD3_CMD),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA0),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA1),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA2),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA3),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA4),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA5),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA6),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA7),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD4_CLK),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD4_CMD),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA0),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA1),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA2),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA3),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA4),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA5),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA6),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA7),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_SD4_RESET_B),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_USB_H_DATA),
|
||||
IMX_PINCTRL_PIN(MX6SX_PAD_USB_H_STROBE),
|
||||
};
|
||||
|
||||
static struct imx_pinctrl_soc_info imx6sx_pinctrl_info = {
|
||||
.pins = imx6sx_pinctrl_pads,
|
||||
.npins = ARRAY_SIZE(imx6sx_pinctrl_pads),
|
||||
};
|
||||
|
||||
static struct of_device_id imx6sx_pinctrl_of_match[] = {
|
||||
{ .compatible = "fsl,imx6sx-iomuxc", },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
static int imx6sx_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
return imx_pinctrl_probe(pdev, &imx6sx_pinctrl_info);
|
||||
}
|
||||
|
||||
static struct platform_driver imx6sx_pinctrl_driver = {
|
||||
.driver = {
|
||||
.name = "imx6sx-pinctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = of_match_ptr(imx6sx_pinctrl_of_match),
|
||||
},
|
||||
.probe = imx6sx_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init imx6sx_pinctrl_init(void)
|
||||
{
|
||||
return platform_driver_register(&imx6sx_pinctrl_driver);
|
||||
}
|
||||
arch_initcall(imx6sx_pinctrl_init);
|
||||
|
||||
static void __exit imx6sx_pinctrl_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&imx6sx_pinctrl_driver);
|
||||
}
|
||||
module_exit(imx6sx_pinctrl_exit);
|
||||
|
||||
MODULE_AUTHOR("Anson Huang <Anson.Huang@freescale.com>");
|
||||
MODULE_DESCRIPTION("Freescale imx6sx pinctrl driver");
|
||||
MODULE_LICENSE("GPL v2");
|
|
@ -0,0 +1,653 @@
|
|||
/*
|
||||
* Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
|
||||
#include "pinctrl-msm.h"
|
||||
|
||||
static const struct pinctrl_pin_desc ipq8064_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"),
|
||||
PINCTRL_PIN(54, "GPIO_54"),
|
||||
PINCTRL_PIN(55, "GPIO_55"),
|
||||
PINCTRL_PIN(56, "GPIO_56"),
|
||||
PINCTRL_PIN(57, "GPIO_57"),
|
||||
PINCTRL_PIN(58, "GPIO_58"),
|
||||
PINCTRL_PIN(59, "GPIO_59"),
|
||||
PINCTRL_PIN(60, "GPIO_60"),
|
||||
PINCTRL_PIN(61, "GPIO_61"),
|
||||
PINCTRL_PIN(62, "GPIO_62"),
|
||||
PINCTRL_PIN(63, "GPIO_63"),
|
||||
PINCTRL_PIN(64, "GPIO_64"),
|
||||
PINCTRL_PIN(65, "GPIO_65"),
|
||||
PINCTRL_PIN(66, "GPIO_66"),
|
||||
PINCTRL_PIN(67, "GPIO_67"),
|
||||
PINCTRL_PIN(68, "GPIO_68"),
|
||||
|
||||
PINCTRL_PIN(69, "SDC3_CLK"),
|
||||
PINCTRL_PIN(70, "SDC3_CMD"),
|
||||
PINCTRL_PIN(71, "SDC3_DATA"),
|
||||
};
|
||||
|
||||
#define DECLARE_IPQ_GPIO_PINS(pin) static const unsigned int gpio##pin##_pins[] = { pin }
|
||||
DECLARE_IPQ_GPIO_PINS(0);
|
||||
DECLARE_IPQ_GPIO_PINS(1);
|
||||
DECLARE_IPQ_GPIO_PINS(2);
|
||||
DECLARE_IPQ_GPIO_PINS(3);
|
||||
DECLARE_IPQ_GPIO_PINS(4);
|
||||
DECLARE_IPQ_GPIO_PINS(5);
|
||||
DECLARE_IPQ_GPIO_PINS(6);
|
||||
DECLARE_IPQ_GPIO_PINS(7);
|
||||
DECLARE_IPQ_GPIO_PINS(8);
|
||||
DECLARE_IPQ_GPIO_PINS(9);
|
||||
DECLARE_IPQ_GPIO_PINS(10);
|
||||
DECLARE_IPQ_GPIO_PINS(11);
|
||||
DECLARE_IPQ_GPIO_PINS(12);
|
||||
DECLARE_IPQ_GPIO_PINS(13);
|
||||
DECLARE_IPQ_GPIO_PINS(14);
|
||||
DECLARE_IPQ_GPIO_PINS(15);
|
||||
DECLARE_IPQ_GPIO_PINS(16);
|
||||
DECLARE_IPQ_GPIO_PINS(17);
|
||||
DECLARE_IPQ_GPIO_PINS(18);
|
||||
DECLARE_IPQ_GPIO_PINS(19);
|
||||
DECLARE_IPQ_GPIO_PINS(20);
|
||||
DECLARE_IPQ_GPIO_PINS(21);
|
||||
DECLARE_IPQ_GPIO_PINS(22);
|
||||
DECLARE_IPQ_GPIO_PINS(23);
|
||||
DECLARE_IPQ_GPIO_PINS(24);
|
||||
DECLARE_IPQ_GPIO_PINS(25);
|
||||
DECLARE_IPQ_GPIO_PINS(26);
|
||||
DECLARE_IPQ_GPIO_PINS(27);
|
||||
DECLARE_IPQ_GPIO_PINS(28);
|
||||
DECLARE_IPQ_GPIO_PINS(29);
|
||||
DECLARE_IPQ_GPIO_PINS(30);
|
||||
DECLARE_IPQ_GPIO_PINS(31);
|
||||
DECLARE_IPQ_GPIO_PINS(32);
|
||||
DECLARE_IPQ_GPIO_PINS(33);
|
||||
DECLARE_IPQ_GPIO_PINS(34);
|
||||
DECLARE_IPQ_GPIO_PINS(35);
|
||||
DECLARE_IPQ_GPIO_PINS(36);
|
||||
DECLARE_IPQ_GPIO_PINS(37);
|
||||
DECLARE_IPQ_GPIO_PINS(38);
|
||||
DECLARE_IPQ_GPIO_PINS(39);
|
||||
DECLARE_IPQ_GPIO_PINS(40);
|
||||
DECLARE_IPQ_GPIO_PINS(41);
|
||||
DECLARE_IPQ_GPIO_PINS(42);
|
||||
DECLARE_IPQ_GPIO_PINS(43);
|
||||
DECLARE_IPQ_GPIO_PINS(44);
|
||||
DECLARE_IPQ_GPIO_PINS(45);
|
||||
DECLARE_IPQ_GPIO_PINS(46);
|
||||
DECLARE_IPQ_GPIO_PINS(47);
|
||||
DECLARE_IPQ_GPIO_PINS(48);
|
||||
DECLARE_IPQ_GPIO_PINS(49);
|
||||
DECLARE_IPQ_GPIO_PINS(50);
|
||||
DECLARE_IPQ_GPIO_PINS(51);
|
||||
DECLARE_IPQ_GPIO_PINS(52);
|
||||
DECLARE_IPQ_GPIO_PINS(53);
|
||||
DECLARE_IPQ_GPIO_PINS(54);
|
||||
DECLARE_IPQ_GPIO_PINS(55);
|
||||
DECLARE_IPQ_GPIO_PINS(56);
|
||||
DECLARE_IPQ_GPIO_PINS(57);
|
||||
DECLARE_IPQ_GPIO_PINS(58);
|
||||
DECLARE_IPQ_GPIO_PINS(59);
|
||||
DECLARE_IPQ_GPIO_PINS(60);
|
||||
DECLARE_IPQ_GPIO_PINS(61);
|
||||
DECLARE_IPQ_GPIO_PINS(62);
|
||||
DECLARE_IPQ_GPIO_PINS(63);
|
||||
DECLARE_IPQ_GPIO_PINS(64);
|
||||
DECLARE_IPQ_GPIO_PINS(65);
|
||||
DECLARE_IPQ_GPIO_PINS(66);
|
||||
DECLARE_IPQ_GPIO_PINS(67);
|
||||
DECLARE_IPQ_GPIO_PINS(68);
|
||||
|
||||
static const unsigned int sdc3_clk_pins[] = { 69 };
|
||||
static const unsigned int sdc3_cmd_pins[] = { 70 };
|
||||
static const unsigned int sdc3_data_pins[] = { 71 };
|
||||
|
||||
#define FUNCTION(fname) \
|
||||
[IPQ_MUX_##fname] = { \
|
||||
.name = #fname, \
|
||||
.groups = fname##_groups, \
|
||||
.ngroups = ARRAY_SIZE(fname##_groups), \
|
||||
}
|
||||
|
||||
#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10) \
|
||||
{ \
|
||||
.name = "gpio" #id, \
|
||||
.pins = gpio##id##_pins, \
|
||||
.npins = ARRAY_SIZE(gpio##id##_pins), \
|
||||
.funcs = (int[]){ \
|
||||
IPQ_MUX_NA, /* gpio mode */ \
|
||||
IPQ_MUX_##f1, \
|
||||
IPQ_MUX_##f2, \
|
||||
IPQ_MUX_##f3, \
|
||||
IPQ_MUX_##f4, \
|
||||
IPQ_MUX_##f5, \
|
||||
IPQ_MUX_##f6, \
|
||||
IPQ_MUX_##f7, \
|
||||
IPQ_MUX_##f8, \
|
||||
IPQ_MUX_##f9, \
|
||||
IPQ_MUX_##f10, \
|
||||
}, \
|
||||
.nfuncs = 11, \
|
||||
.ctl_reg = 0x1000 + 0x10 * id, \
|
||||
.io_reg = 0x1004 + 0x10 * id, \
|
||||
.intr_cfg_reg = 0x1008 + 0x10 * id, \
|
||||
.intr_status_reg = 0x100c + 0x10 * id, \
|
||||
.intr_target_reg = 0x400 + 0x4 * 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_ack_high = 1, \
|
||||
.intr_target_bit = 0, \
|
||||
.intr_raw_status_bit = 3, \
|
||||
.intr_polarity_bit = 1, \
|
||||
.intr_detection_bit = 2, \
|
||||
.intr_detection_width = 1, \
|
||||
}
|
||||
|
||||
#define SDC_PINGROUP(pg_name, ctl, pull, drv) \
|
||||
{ \
|
||||
.name = #pg_name, \
|
||||
.pins = pg_name##_pins, \
|
||||
.npins = ARRAY_SIZE(pg_name##_pins), \
|
||||
.ctl_reg = ctl, \
|
||||
.io_reg = 0, \
|
||||
.intr_cfg_reg = 0, \
|
||||
.intr_status_reg = 0, \
|
||||
.intr_target_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, \
|
||||
}
|
||||
|
||||
enum ipq8064_functions {
|
||||
IPQ_MUX_mdio,
|
||||
IPQ_MUX_mi2s,
|
||||
IPQ_MUX_pdm,
|
||||
IPQ_MUX_ssbi,
|
||||
IPQ_MUX_spmi,
|
||||
IPQ_MUX_audio_pcm,
|
||||
IPQ_MUX_gsbi1,
|
||||
IPQ_MUX_gsbi2,
|
||||
IPQ_MUX_gsbi4,
|
||||
IPQ_MUX_gsbi5,
|
||||
IPQ_MUX_gsbi5_spi_cs1,
|
||||
IPQ_MUX_gsbi5_spi_cs2,
|
||||
IPQ_MUX_gsbi5_spi_cs3,
|
||||
IPQ_MUX_gsbi6,
|
||||
IPQ_MUX_gsbi7,
|
||||
IPQ_MUX_nss_spi,
|
||||
IPQ_MUX_sdc1,
|
||||
IPQ_MUX_spdif,
|
||||
IPQ_MUX_nand,
|
||||
IPQ_MUX_tsif1,
|
||||
IPQ_MUX_tsif2,
|
||||
IPQ_MUX_usb_fs_n,
|
||||
IPQ_MUX_usb_fs,
|
||||
IPQ_MUX_usb2_hsic,
|
||||
IPQ_MUX_rgmii2,
|
||||
IPQ_MUX_sata,
|
||||
IPQ_MUX_pcie1_rst,
|
||||
IPQ_MUX_pcie1_prsnt,
|
||||
IPQ_MUX_pcie1_pwrflt,
|
||||
IPQ_MUX_pcie1_pwren_n,
|
||||
IPQ_MUX_pcie1_pwren,
|
||||
IPQ_MUX_pcie1_clk_req,
|
||||
IPQ_MUX_pcie2_rst,
|
||||
IPQ_MUX_pcie2_prsnt,
|
||||
IPQ_MUX_pcie2_pwrflt,
|
||||
IPQ_MUX_pcie2_pwren_n,
|
||||
IPQ_MUX_pcie2_pwren,
|
||||
IPQ_MUX_pcie2_clk_req,
|
||||
IPQ_MUX_pcie3_rst,
|
||||
IPQ_MUX_pcie3_prsnt,
|
||||
IPQ_MUX_pcie3_pwrflt,
|
||||
IPQ_MUX_pcie3_pwren_n,
|
||||
IPQ_MUX_pcie3_pwren,
|
||||
IPQ_MUX_pcie3_clk_req,
|
||||
IPQ_MUX_ps_hold,
|
||||
IPQ_MUX_NA,
|
||||
};
|
||||
|
||||
static const char * const mdio_groups[] = {
|
||||
"gpio0", "gpio1", "gpio10", "gpio11",
|
||||
};
|
||||
|
||||
static const char * const mi2s_groups[] = {
|
||||
"gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
|
||||
"gpio33", "gpio55", "gpio56", "gpio57", "gpio58",
|
||||
};
|
||||
|
||||
static const char * const pdm_groups[] = {
|
||||
"gpio3", "gpio16", "gpio17", "gpio22", "gpio30", "gpio31",
|
||||
"gpio34", "gpio35", "gpio52", "gpio55", "gpio56", "gpio58",
|
||||
"gpio59",
|
||||
};
|
||||
|
||||
static const char * const ssbi_groups[] = {
|
||||
"gpio10", "gpio11",
|
||||
};
|
||||
|
||||
static const char * const spmi_groups[] = {
|
||||
"gpio10", "gpio11",
|
||||
};
|
||||
|
||||
static const char * const audio_pcm_groups[] = {
|
||||
"gpio14", "gpio15", "gpio16", "gpio17",
|
||||
};
|
||||
|
||||
static const char * const gsbi1_groups[] = {
|
||||
"gpio51", "gpio52", "gpio53", "gpio54",
|
||||
};
|
||||
|
||||
static const char * const gsbi2_groups[] = {
|
||||
"gpio22", "gpio23", "gpio24", "gpio25",
|
||||
};
|
||||
|
||||
static const char * const gsbi4_groups[] = {
|
||||
"gpio10", "gpio11", "gpio12", "gpio13",
|
||||
};
|
||||
|
||||
static const char * const gsbi5_groups[] = {
|
||||
"gpio18", "gpio19", "gpio20", "gpio21",
|
||||
};
|
||||
|
||||
static const char * const gsbi5_spi_cs1_groups[] = {
|
||||
"gpio6", "gpio61",
|
||||
};
|
||||
|
||||
static const char * const gsbi5_spi_cs2_groups[] = {
|
||||
"gpio7", "gpio62",
|
||||
};
|
||||
|
||||
static const char * const gsbi5_spi_cs3_groups[] = {
|
||||
"gpio2",
|
||||
};
|
||||
|
||||
static const char * const gsbi6_groups[] = {
|
||||
"gpio27", "gpio28", "gpio29", "gpio30", "gpio55", "gpio56",
|
||||
"gpio57", "gpio58",
|
||||
};
|
||||
|
||||
static const char * const gsbi7_groups[] = {
|
||||
"gpio6", "gpio7", "gpio8", "gpio9",
|
||||
};
|
||||
|
||||
static const char * const nss_spi_groups[] = {
|
||||
"gpio14", "gpio15", "gpio16", "gpio17", "gpio55", "gpio56",
|
||||
"gpio57", "gpio58",
|
||||
};
|
||||
|
||||
static const char * const sdc1_groups[] = {
|
||||
"gpio38", "gpio39", "gpio40", "gpio41", "gpio42", "gpio43",
|
||||
"gpio44", "gpio45", "gpio46", "gpio47",
|
||||
};
|
||||
|
||||
static const char * const spdif_groups[] = {
|
||||
"gpio10", "gpio48",
|
||||
};
|
||||
|
||||
static const char * const nand_groups[] = {
|
||||
"gpio34", "gpio35", "gpio36", "gpio37", "gpio38", "gpio39",
|
||||
"gpio40", "gpio41", "gpio42", "gpio43", "gpio44", "gpio45",
|
||||
"gpio46", "gpio47",
|
||||
};
|
||||
|
||||
static const char * const tsif1_groups[] = {
|
||||
"gpio55", "gpio56", "gpio57", "gpio58",
|
||||
};
|
||||
|
||||
static const char * const tsif2_groups[] = {
|
||||
"gpio59", "gpio60", "gpio61", "gpio62",
|
||||
};
|
||||
|
||||
static const char * const usb_fs_n_groups[] = {
|
||||
"gpio6",
|
||||
};
|
||||
|
||||
static const char * const usb_fs_groups[] = {
|
||||
"gpio6", "gpio7", "gpio8",
|
||||
};
|
||||
|
||||
static const char * const usb2_hsic_groups[] = {
|
||||
"gpio67", "gpio68",
|
||||
};
|
||||
|
||||
static const char * const rgmii2_groups[] = {
|
||||
"gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
|
||||
"gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62",
|
||||
};
|
||||
|
||||
static const char * const sata_groups[] = {
|
||||
"gpio10",
|
||||
};
|
||||
|
||||
static const char * const pcie1_rst_groups[] = {
|
||||
"gpio3",
|
||||
};
|
||||
|
||||
static const char * const pcie1_prsnt_groups[] = {
|
||||
"gpio3", "gpio11",
|
||||
};
|
||||
|
||||
static const char * const pcie1_pwren_n_groups[] = {
|
||||
"gpio4", "gpio12",
|
||||
};
|
||||
|
||||
static const char * const pcie1_pwren_groups[] = {
|
||||
"gpio4", "gpio12",
|
||||
};
|
||||
|
||||
static const char * const pcie1_pwrflt_groups[] = {
|
||||
"gpio5", "gpio13",
|
||||
};
|
||||
|
||||
static const char * const pcie1_clk_req_groups[] = {
|
||||
"gpio5",
|
||||
};
|
||||
|
||||
static const char * const pcie2_rst_groups[] = {
|
||||
"gpio48",
|
||||
};
|
||||
|
||||
static const char * const pcie2_prsnt_groups[] = {
|
||||
"gpio11", "gpio48",
|
||||
};
|
||||
|
||||
static const char * const pcie2_pwren_n_groups[] = {
|
||||
"gpio12", "gpio49",
|
||||
};
|
||||
|
||||
static const char * const pcie2_pwren_groups[] = {
|
||||
"gpio12", "gpio49",
|
||||
};
|
||||
|
||||
static const char * const pcie2_pwrflt_groups[] = {
|
||||
"gpio13", "gpio50",
|
||||
};
|
||||
|
||||
static const char * const pcie2_clk_req_groups[] = {
|
||||
"gpio50",
|
||||
};
|
||||
|
||||
static const char * const pcie3_rst_groups[] = {
|
||||
"gpio63",
|
||||
};
|
||||
|
||||
static const char * const pcie3_prsnt_groups[] = {
|
||||
"gpio11",
|
||||
};
|
||||
|
||||
static const char * const pcie3_pwren_n_groups[] = {
|
||||
"gpio12",
|
||||
};
|
||||
|
||||
static const char * const pcie3_pwren_groups[] = {
|
||||
"gpio12",
|
||||
};
|
||||
|
||||
static const char * const pcie3_pwrflt_groups[] = {
|
||||
"gpio13",
|
||||
};
|
||||
|
||||
static const char * const pcie3_clk_req_groups[] = {
|
||||
"gpio65",
|
||||
};
|
||||
|
||||
static const char * const ps_hold_groups[] = {
|
||||
"gpio26",
|
||||
};
|
||||
|
||||
static const struct msm_function ipq8064_functions[] = {
|
||||
FUNCTION(mdio),
|
||||
FUNCTION(ssbi),
|
||||
FUNCTION(spmi),
|
||||
FUNCTION(mi2s),
|
||||
FUNCTION(pdm),
|
||||
FUNCTION(audio_pcm),
|
||||
FUNCTION(gsbi1),
|
||||
FUNCTION(gsbi2),
|
||||
FUNCTION(gsbi4),
|
||||
FUNCTION(gsbi5),
|
||||
FUNCTION(gsbi5_spi_cs1),
|
||||
FUNCTION(gsbi5_spi_cs2),
|
||||
FUNCTION(gsbi5_spi_cs3),
|
||||
FUNCTION(gsbi6),
|
||||
FUNCTION(gsbi7),
|
||||
FUNCTION(nss_spi),
|
||||
FUNCTION(sdc1),
|
||||
FUNCTION(spdif),
|
||||
FUNCTION(nand),
|
||||
FUNCTION(tsif1),
|
||||
FUNCTION(tsif2),
|
||||
FUNCTION(usb_fs_n),
|
||||
FUNCTION(usb_fs),
|
||||
FUNCTION(usb2_hsic),
|
||||
FUNCTION(rgmii2),
|
||||
FUNCTION(sata),
|
||||
FUNCTION(pcie1_rst),
|
||||
FUNCTION(pcie1_prsnt),
|
||||
FUNCTION(pcie1_pwren_n),
|
||||
FUNCTION(pcie1_pwren),
|
||||
FUNCTION(pcie1_pwrflt),
|
||||
FUNCTION(pcie1_clk_req),
|
||||
FUNCTION(pcie2_rst),
|
||||
FUNCTION(pcie2_prsnt),
|
||||
FUNCTION(pcie2_pwren_n),
|
||||
FUNCTION(pcie2_pwren),
|
||||
FUNCTION(pcie2_pwrflt),
|
||||
FUNCTION(pcie2_clk_req),
|
||||
FUNCTION(pcie3_rst),
|
||||
FUNCTION(pcie3_prsnt),
|
||||
FUNCTION(pcie3_pwren_n),
|
||||
FUNCTION(pcie3_pwren),
|
||||
FUNCTION(pcie3_pwrflt),
|
||||
FUNCTION(pcie3_clk_req),
|
||||
FUNCTION(ps_hold),
|
||||
};
|
||||
|
||||
static const struct msm_pingroup ipq8064_groups[] = {
|
||||
PINGROUP(0, mdio, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(1, mdio, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(2, gsbi5_spi_cs3, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(3, pcie1_rst, pcie1_prsnt, pdm, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(4, pcie1_pwren_n, pcie1_pwren, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(5, pcie1_clk_req, pcie1_pwrflt, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(6, gsbi7, usb_fs, gsbi5_spi_cs1, usb_fs_n, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(7, gsbi7, usb_fs, gsbi5_spi_cs2, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(8, gsbi7, usb_fs, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(9, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(10, gsbi4, spdif, sata, ssbi, mdio, spmi, NA, NA, NA, NA),
|
||||
PINGROUP(11, gsbi4, pcie2_prsnt, pcie1_prsnt, pcie3_prsnt, ssbi, mdio, spmi, NA, NA, NA),
|
||||
PINGROUP(12, gsbi4, pcie2_pwren_n, pcie1_pwren_n, pcie3_pwren_n, pcie2_pwren, pcie1_pwren, pcie3_pwren, NA, NA, NA),
|
||||
PINGROUP(13, gsbi4, pcie2_pwrflt, pcie1_pwrflt, pcie3_pwrflt, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(14, audio_pcm, nss_spi, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(15, audio_pcm, nss_spi, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(16, audio_pcm, nss_spi, pdm, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(17, audio_pcm, nss_spi, pdm, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(18, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(19, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(20, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(21, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(22, gsbi2, pdm, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(23, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(24, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(25, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(26, ps_hold, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(27, mi2s, rgmii2, gsbi6, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(28, mi2s, rgmii2, gsbi6, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(29, mi2s, rgmii2, gsbi6, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(30, mi2s, rgmii2, gsbi6, pdm, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(31, mi2s, rgmii2, pdm, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(32, mi2s, rgmii2, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(33, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(34, nand, pdm, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(35, nand, pdm, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(36, nand, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(37, nand, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(38, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(39, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(40, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(41, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(42, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(43, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(44, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(45, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(46, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(47, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(48, pcie2_rst, spdif, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(49, pcie2_pwren_n, pcie2_pwren, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(50, pcie2_clk_req, pcie2_pwrflt, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(51, gsbi1, rgmii2, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(52, gsbi1, rgmii2, pdm, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(53, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(54, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(55, tsif1, mi2s, gsbi6, pdm, nss_spi, NA, NA, NA, NA, NA),
|
||||
PINGROUP(56, tsif1, mi2s, gsbi6, pdm, nss_spi, NA, NA, NA, NA, NA),
|
||||
PINGROUP(57, tsif1, mi2s, gsbi6, nss_spi, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(58, tsif1, mi2s, gsbi6, pdm, nss_spi, NA, NA, NA, NA, NA),
|
||||
PINGROUP(59, tsif2, rgmii2, pdm, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(60, tsif2, rgmii2, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(61, tsif2, rgmii2, gsbi5_spi_cs1, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(62, tsif2, rgmii2, gsbi5_spi_cs2, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(63, pcie3_rst, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(64, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(65, pcie3_clk_req, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(66, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(67, usb2_hsic, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(68, usb2_hsic, NA, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
SDC_PINGROUP(sdc3_clk, 0x204a, 14, 6),
|
||||
SDC_PINGROUP(sdc3_cmd, 0x204a, 11, 3),
|
||||
SDC_PINGROUP(sdc3_data, 0x204a, 9, 0),
|
||||
};
|
||||
|
||||
#define NUM_GPIO_PINGROUPS 69
|
||||
|
||||
static const struct msm_pinctrl_soc_data ipq8064_pinctrl = {
|
||||
.pins = ipq8064_pins,
|
||||
.npins = ARRAY_SIZE(ipq8064_pins),
|
||||
.functions = ipq8064_functions,
|
||||
.nfunctions = ARRAY_SIZE(ipq8064_functions),
|
||||
.groups = ipq8064_groups,
|
||||
.ngroups = ARRAY_SIZE(ipq8064_groups),
|
||||
.ngpios = NUM_GPIO_PINGROUPS,
|
||||
};
|
||||
|
||||
static int ipq8064_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
return msm_pinctrl_probe(pdev, &ipq8064_pinctrl);
|
||||
}
|
||||
|
||||
static const struct of_device_id ipq8064_pinctrl_of_match[] = {
|
||||
{ .compatible = "qcom,ipq8064-pinctrl", },
|
||||
{ },
|
||||
};
|
||||
|
||||
static struct platform_driver ipq8064_pinctrl_driver = {
|
||||
.driver = {
|
||||
.name = "ipq8064-pinctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = ipq8064_pinctrl_of_match,
|
||||
},
|
||||
.probe = ipq8064_pinctrl_probe,
|
||||
.remove = msm_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init ipq8064_pinctrl_init(void)
|
||||
{
|
||||
return platform_driver_register(&ipq8064_pinctrl_driver);
|
||||
}
|
||||
arch_initcall(ipq8064_pinctrl_init);
|
||||
|
||||
static void __exit ipq8064_pinctrl_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&ipq8064_pinctrl_driver);
|
||||
}
|
||||
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);
|
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
|
||||
#ifndef __PINCTRL_LANTIQ_H
|
||||
#define __PINCTRL_LANTIQ_H
|
||||
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
*/
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
|
@ -26,8 +25,6 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/irqchip/chained_irq.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include "core.h"
|
||||
|
@ -41,7 +38,6 @@
|
|||
* struct msm_pinctrl - state for a pinctrl-msm device
|
||||
* @dev: device handle.
|
||||
* @pctrl: pinctrl handle.
|
||||
* @domain: irqdomain handle.
|
||||
* @chip: gpiochip handle.
|
||||
* @irq: parent irq for the TLMM irq_chip.
|
||||
* @lock: Spinlock to protect register resources as well
|
||||
|
@ -55,7 +51,6 @@
|
|||
struct msm_pinctrl {
|
||||
struct device *dev;
|
||||
struct pinctrl_dev *pctrl;
|
||||
struct irq_domain *domain;
|
||||
struct gpio_chip chip;
|
||||
int irq;
|
||||
|
||||
|
@ -68,6 +63,11 @@ struct msm_pinctrl {
|
|||
void __iomem *regs;
|
||||
};
|
||||
|
||||
static inline struct msm_pinctrl *to_msm_pinctrl(struct gpio_chip *gc)
|
||||
{
|
||||
return container_of(gc, struct msm_pinctrl, chip);
|
||||
}
|
||||
|
||||
static int msm_get_groups_count(struct pinctrl_dev *pctldev)
|
||||
{
|
||||
struct msm_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
|
||||
|
@ -145,12 +145,12 @@ static int msm_pinmux_enable(struct pinctrl_dev *pctldev,
|
|||
if (WARN_ON(g->mux_bit < 0))
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(g->funcs); i++) {
|
||||
for (i = 0; i < g->nfuncs; i++) {
|
||||
if (g->funcs[i] == function)
|
||||
break;
|
||||
}
|
||||
|
||||
if (WARN_ON(i == ARRAY_SIZE(g->funcs)))
|
||||
if (WARN_ON(i == g->nfuncs))
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
@ -480,13 +480,6 @@ static void msm_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
|
|||
spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
}
|
||||
|
||||
static int msm_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
struct msm_pinctrl *pctrl = container_of(chip, struct msm_pinctrl, chip);
|
||||
|
||||
return irq_find_mapping(pctrl->domain, offset);
|
||||
}
|
||||
|
||||
static int msm_gpio_request(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
int gpio = chip->base + offset;
|
||||
|
@ -556,7 +549,6 @@ static struct gpio_chip msm_gpio_template = {
|
|||
.direction_output = msm_gpio_direction_output,
|
||||
.get = msm_gpio_get,
|
||||
.set = msm_gpio_set,
|
||||
.to_irq = msm_gpio_to_irq,
|
||||
.request = msm_gpio_request,
|
||||
.free = msm_gpio_free,
|
||||
.dbg_show = msm_gpio_dbg_show,
|
||||
|
@ -608,12 +600,12 @@ static void msm_gpio_update_dual_edge_pos(struct msm_pinctrl *pctrl,
|
|||
|
||||
static void msm_gpio_irq_mask(struct irq_data *d)
|
||||
{
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct msm_pinctrl *pctrl = to_msm_pinctrl(gc);
|
||||
const struct msm_pingroup *g;
|
||||
struct msm_pinctrl *pctrl;
|
||||
unsigned long flags;
|
||||
u32 val;
|
||||
|
||||
pctrl = irq_data_get_irq_chip_data(d);
|
||||
g = &pctrl->soc->groups[d->hwirq];
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
@ -629,12 +621,12 @@ static void msm_gpio_irq_mask(struct irq_data *d)
|
|||
|
||||
static void msm_gpio_irq_unmask(struct irq_data *d)
|
||||
{
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct msm_pinctrl *pctrl = to_msm_pinctrl(gc);
|
||||
const struct msm_pingroup *g;
|
||||
struct msm_pinctrl *pctrl;
|
||||
unsigned long flags;
|
||||
u32 val;
|
||||
|
||||
pctrl = irq_data_get_irq_chip_data(d);
|
||||
g = &pctrl->soc->groups[d->hwirq];
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
@ -654,12 +646,12 @@ static void msm_gpio_irq_unmask(struct irq_data *d)
|
|||
|
||||
static void msm_gpio_irq_ack(struct irq_data *d)
|
||||
{
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct msm_pinctrl *pctrl = to_msm_pinctrl(gc);
|
||||
const struct msm_pingroup *g;
|
||||
struct msm_pinctrl *pctrl;
|
||||
unsigned long flags;
|
||||
u32 val;
|
||||
|
||||
pctrl = irq_data_get_irq_chip_data(d);
|
||||
g = &pctrl->soc->groups[d->hwirq];
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
@ -681,12 +673,12 @@ static void msm_gpio_irq_ack(struct irq_data *d)
|
|||
|
||||
static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)
|
||||
{
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct msm_pinctrl *pctrl = to_msm_pinctrl(gc);
|
||||
const struct msm_pingroup *g;
|
||||
struct msm_pinctrl *pctrl;
|
||||
unsigned long flags;
|
||||
u32 val;
|
||||
|
||||
pctrl = irq_data_get_irq_chip_data(d);
|
||||
g = &pctrl->soc->groups[d->hwirq];
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
@ -775,11 +767,10 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)
|
|||
|
||||
static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
|
||||
{
|
||||
struct msm_pinctrl *pctrl;
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct msm_pinctrl *pctrl = to_msm_pinctrl(gc);
|
||||
unsigned long flags;
|
||||
|
||||
pctrl = irq_data_get_irq_chip_data(d);
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
||||
irq_set_irq_wake(pctrl->irq, on);
|
||||
|
@ -789,25 +780,6 @@ static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int msm_gpio_irq_reqres(struct irq_data *d)
|
||||
{
|
||||
struct msm_pinctrl *pctrl = irq_data_get_irq_chip_data(d);
|
||||
|
||||
if (gpio_lock_as_irq(&pctrl->chip, d->hwirq)) {
|
||||
dev_err(pctrl->dev, "unable to lock HW IRQ %lu for IRQ\n",
|
||||
d->hwirq);
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void msm_gpio_irq_relres(struct irq_data *d)
|
||||
{
|
||||
struct msm_pinctrl *pctrl = irq_data_get_irq_chip_data(d);
|
||||
|
||||
gpio_unlock_as_irq(&pctrl->chip, d->hwirq);
|
||||
}
|
||||
|
||||
static struct irq_chip msm_gpio_irq_chip = {
|
||||
.name = "msmgpio",
|
||||
.irq_mask = msm_gpio_irq_mask,
|
||||
|
@ -815,14 +787,13 @@ static struct irq_chip msm_gpio_irq_chip = {
|
|||
.irq_ack = msm_gpio_irq_ack,
|
||||
.irq_set_type = msm_gpio_irq_set_type,
|
||||
.irq_set_wake = msm_gpio_irq_set_wake,
|
||||
.irq_request_resources = msm_gpio_irq_reqres,
|
||||
.irq_release_resources = msm_gpio_irq_relres,
|
||||
};
|
||||
|
||||
static void msm_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
|
||||
{
|
||||
struct gpio_chip *gc = irq_desc_get_handler_data(desc);
|
||||
const struct msm_pingroup *g;
|
||||
struct msm_pinctrl *pctrl = irq_desc_get_handler_data(desc);
|
||||
struct msm_pinctrl *pctrl = to_msm_pinctrl(gc);
|
||||
struct irq_chip *chip = irq_get_chip(irq);
|
||||
int irq_pin;
|
||||
int handled = 0;
|
||||
|
@ -839,7 +810,7 @@ static void msm_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
|
|||
g = &pctrl->soc->groups[i];
|
||||
val = readl(pctrl->regs + g->intr_status_reg);
|
||||
if (val & BIT(g->intr_status_bit)) {
|
||||
irq_pin = irq_find_mapping(pctrl->domain, i);
|
||||
irq_pin = irq_find_mapping(gc->irqdomain, i);
|
||||
generic_handle_irq(irq_pin);
|
||||
handled++;
|
||||
}
|
||||
|
@ -852,19 +823,10 @@ static void msm_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
|
|||
chained_irq_exit(chip, desc);
|
||||
}
|
||||
|
||||
/*
|
||||
* This lock class tells lockdep that GPIO irqs are in a different
|
||||
* category than their parents, so it won't report false recursion.
|
||||
*/
|
||||
static struct lock_class_key gpio_lock_class;
|
||||
|
||||
static int msm_gpio_init(struct msm_pinctrl *pctrl)
|
||||
{
|
||||
struct gpio_chip *chip;
|
||||
int irq;
|
||||
int ret;
|
||||
int i;
|
||||
int r;
|
||||
unsigned ngpio = pctrl->soc->ngpios;
|
||||
|
||||
if (WARN_ON(ngpio > MAX_NR_GPIO))
|
||||
|
@ -890,23 +852,18 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)
|
|||
return ret;
|
||||
}
|
||||
|
||||
pctrl->domain = irq_domain_add_linear(pctrl->dev->of_node, chip->ngpio,
|
||||
&irq_domain_simple_ops, NULL);
|
||||
if (!pctrl->domain) {
|
||||
dev_err(pctrl->dev, "Failed to register irq domain\n");
|
||||
r = gpiochip_remove(&pctrl->chip);
|
||||
ret = gpiochip_irqchip_add(chip,
|
||||
&msm_gpio_irq_chip,
|
||||
0,
|
||||
handle_edge_irq,
|
||||
IRQ_TYPE_NONE);
|
||||
if (ret) {
|
||||
dev_err(pctrl->dev, "Failed to add irqchip to gpiochip\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
for (i = 0; i < chip->ngpio; i++) {
|
||||
irq = irq_create_mapping(pctrl->domain, i);
|
||||
irq_set_lockdep_class(irq, &gpio_lock_class);
|
||||
irq_set_chip_and_handler(irq, &msm_gpio_irq_chip, handle_edge_irq);
|
||||
irq_set_chip_data(irq, pctrl);
|
||||
}
|
||||
|
||||
irq_set_handler_data(pctrl->irq, pctrl);
|
||||
irq_set_chained_handler(pctrl->irq, msm_gpio_irq_handler);
|
||||
gpiochip_set_chained_irqchip(chip, &msm_gpio_irq_chip, pctrl->irq,
|
||||
msm_gpio_irq_handler);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -974,8 +931,6 @@ int msm_pinctrl_remove(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
irq_set_chained_handler(pctrl->irq, NULL);
|
||||
irq_domain_remove(pctrl->domain);
|
||||
pinctrl_unregister(pctrl->pctrl);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -65,7 +65,8 @@ struct msm_pingroup {
|
|||
const unsigned *pins;
|
||||
unsigned npins;
|
||||
|
||||
unsigned funcs[8];
|
||||
unsigned *funcs;
|
||||
unsigned nfuncs;
|
||||
|
||||
s16 ctl_reg;
|
||||
s16 io_reg;
|
||||
|
|
|
@ -341,7 +341,7 @@ static const unsigned int sdc2_data_pins[] = { 151 };
|
|||
.name = "gpio" #id, \
|
||||
.pins = gpio##id##_pins, \
|
||||
.npins = ARRAY_SIZE(gpio##id##_pins), \
|
||||
.funcs = { \
|
||||
.funcs = (int[]){ \
|
||||
MSM_MUX_NA, /* gpio mode */ \
|
||||
MSM_MUX_##f1, \
|
||||
MSM_MUX_##f2, \
|
||||
|
@ -351,6 +351,7 @@ static const unsigned int sdc2_data_pins[] = { 151 };
|
|||
MSM_MUX_##f6, \
|
||||
MSM_MUX_##f7 \
|
||||
}, \
|
||||
.nfuncs = 8, \
|
||||
.ctl_reg = 0x1000 + 0x10 * id, \
|
||||
.io_reg = 0x1004 + 0x10 * id, \
|
||||
.intr_cfg_reg = 0x1008 + 0x10 * id, \
|
||||
|
@ -401,169 +402,568 @@ static const unsigned int sdc2_data_pins[] = { 151 };
|
|||
* the pingroup table below.
|
||||
*/
|
||||
enum msm8x74_functions {
|
||||
MSM_MUX_cci_i2c0,
|
||||
MSM_MUX_cci_i2c1,
|
||||
MSM_MUX_blsp_i2c1,
|
||||
MSM_MUX_blsp_i2c2,
|
||||
MSM_MUX_blsp_i2c3,
|
||||
MSM_MUX_blsp_i2c4,
|
||||
MSM_MUX_blsp_i2c5,
|
||||
MSM_MUX_blsp_i2c6,
|
||||
MSM_MUX_blsp_i2c7,
|
||||
MSM_MUX_blsp_i2c8,
|
||||
MSM_MUX_blsp_i2c9,
|
||||
MSM_MUX_blsp_i2c10,
|
||||
MSM_MUX_blsp_i2c11,
|
||||
MSM_MUX_blsp_i2c12,
|
||||
MSM_MUX_blsp_spi1,
|
||||
MSM_MUX_blsp_spi1_cs1,
|
||||
MSM_MUX_blsp_spi1_cs2,
|
||||
MSM_MUX_blsp_spi1_cs3,
|
||||
MSM_MUX_blsp_spi2,
|
||||
MSM_MUX_blsp_spi2_cs1,
|
||||
MSM_MUX_blsp_spi2_cs2,
|
||||
MSM_MUX_blsp_spi2_cs3,
|
||||
MSM_MUX_blsp_spi3,
|
||||
MSM_MUX_blsp_spi4,
|
||||
MSM_MUX_blsp_spi5,
|
||||
MSM_MUX_blsp_spi6,
|
||||
MSM_MUX_blsp_spi7,
|
||||
MSM_MUX_blsp_spi8,
|
||||
MSM_MUX_blsp_spi9,
|
||||
MSM_MUX_blsp_spi10,
|
||||
MSM_MUX_blsp_spi10_cs1,
|
||||
MSM_MUX_blsp_spi10_cs2,
|
||||
MSM_MUX_blsp_spi10_cs3,
|
||||
MSM_MUX_blsp_spi11,
|
||||
MSM_MUX_blsp_spi12,
|
||||
MSM_MUX_blsp_uart1,
|
||||
MSM_MUX_blsp_uart2,
|
||||
MSM_MUX_blsp_uart3,
|
||||
MSM_MUX_blsp_uart4,
|
||||
MSM_MUX_blsp_uart5,
|
||||
MSM_MUX_blsp_uart6,
|
||||
MSM_MUX_blsp_uart7,
|
||||
MSM_MUX_blsp_uart8,
|
||||
MSM_MUX_blsp_uart9,
|
||||
MSM_MUX_blsp_uart10,
|
||||
MSM_MUX_blsp_uart11,
|
||||
MSM_MUX_blsp_uart12,
|
||||
MSM_MUX_blsp_uim1,
|
||||
MSM_MUX_blsp_uim2,
|
||||
MSM_MUX_blsp_uim3,
|
||||
MSM_MUX_blsp_uim4,
|
||||
MSM_MUX_blsp_uim5,
|
||||
MSM_MUX_blsp_uim6,
|
||||
MSM_MUX_blsp_uim7,
|
||||
MSM_MUX_blsp_uim8,
|
||||
MSM_MUX_blsp_uim9,
|
||||
MSM_MUX_blsp_uim10,
|
||||
MSM_MUX_blsp_uim11,
|
||||
MSM_MUX_blsp_uim12,
|
||||
MSM_MUX_uim1,
|
||||
MSM_MUX_uim2,
|
||||
MSM_MUX_uim_batt_alarm,
|
||||
MSM_MUX_sdc3,
|
||||
MSM_MUX_sdc4,
|
||||
MSM_MUX_gcc_gp_clk1,
|
||||
MSM_MUX_gcc_gp_clk2,
|
||||
MSM_MUX_gcc_gp_clk3,
|
||||
MSM_MUX_qua_mi2s,
|
||||
MSM_MUX_pri_mi2s,
|
||||
MSM_MUX_spkr_mi2s,
|
||||
MSM_MUX_ter_mi2s,
|
||||
MSM_MUX_sec_mi2s,
|
||||
MSM_MUX_hdmi_cec,
|
||||
MSM_MUX_hdmi_ddc,
|
||||
MSM_MUX_hdmi_hpd,
|
||||
MSM_MUX_edp_hpd,
|
||||
MSM_MUX_mdp_vsync,
|
||||
MSM_MUX_cam_mclk0,
|
||||
MSM_MUX_cam_mclk1,
|
||||
MSM_MUX_cam_mclk2,
|
||||
MSM_MUX_cam_mclk3,
|
||||
MSM_MUX_cci_timer0,
|
||||
MSM_MUX_cci_timer1,
|
||||
MSM_MUX_cci_timer2,
|
||||
MSM_MUX_cci_timer3,
|
||||
MSM_MUX_cci_timer4,
|
||||
MSM_MUX_cci_async_in0,
|
||||
MSM_MUX_cci_async_in1,
|
||||
MSM_MUX_cci_async_in2,
|
||||
MSM_MUX_gp_pdm0,
|
||||
MSM_MUX_gp_pdm1,
|
||||
MSM_MUX_gp_pdm2,
|
||||
MSM_MUX_gp0_clk,
|
||||
MSM_MUX_gp1_clk,
|
||||
MSM_MUX_gp_mn,
|
||||
MSM_MUX_tsif1,
|
||||
MSM_MUX_tsif2,
|
||||
MSM_MUX_hsic,
|
||||
MSM_MUX_grfc,
|
||||
MSM_MUX_audio_ref_clk,
|
||||
MSM_MUX_bt,
|
||||
MSM_MUX_fm,
|
||||
MSM_MUX_wlan,
|
||||
MSM_MUX_slimbus,
|
||||
MSM_MUX_NA,
|
||||
};
|
||||
|
||||
static const char * const blsp_uart1_groups[] = {
|
||||
"gpio0", "gpio1", "gpio2", "gpio3"
|
||||
};
|
||||
static const char * const blsp_uim1_groups[] = { "gpio0", "gpio1" };
|
||||
static const char * const blsp_i2c1_groups[] = { "gpio2", "gpio3" };
|
||||
static const char * const blsp_spi1_groups[] = {
|
||||
"gpio0", "gpio1", "gpio2", "gpio3"
|
||||
};
|
||||
static const char * const blsp_spi1_cs1_groups[] = { "gpio8" };
|
||||
static const char * const blsp_spi1_cs2_groups[] = { "gpio9", "gpio11" };
|
||||
static const char * const blsp_spi1_cs3_groups[] = { "gpio10" };
|
||||
|
||||
static const char * const blsp_uart2_groups[] = {
|
||||
"gpio4", "gpio5", "gpio6", "gpio7"
|
||||
};
|
||||
static const char * const blsp_uim2_groups[] = { "gpio4", "gpio5" };
|
||||
static const char * const blsp_i2c2_groups[] = { "gpio6", "gpio7" };
|
||||
static const char * const blsp_spi2_groups[] = {
|
||||
"gpio4", "gpio5", "gpio6", "gpio7"
|
||||
};
|
||||
static const char * const blsp_spi2_cs1_groups[] = { "gpio53", "gpio62" };
|
||||
static const char * const blsp_spi2_cs2_groups[] = { "gpio54", "gpio63" };
|
||||
static const char * const blsp_spi2_cs3_groups[] = { "gpio66" };
|
||||
|
||||
static const char * const blsp_uart3_groups[] = {
|
||||
"gpio8", "gpio9", "gpio10", "gpio11"
|
||||
};
|
||||
static const char * const blsp_uim3_groups[] = { "gpio8", "gpio9" };
|
||||
static const char * const blsp_i2c3_groups[] = { "gpio10", "gpio11" };
|
||||
static const char * const blsp_spi3_groups[] = {
|
||||
"gpio8", "gpio9", "gpio10", "gpio11"
|
||||
};
|
||||
|
||||
static const char * const cci_i2c0_groups[] = { "gpio19", "gpio20" };
|
||||
static const char * const cci_i2c1_groups[] = { "gpio21", "gpio22" };
|
||||
|
||||
static const char * const blsp_uart4_groups[] = {
|
||||
"gpio19", "gpio20", "gpio21", "gpio22"
|
||||
};
|
||||
static const char * const blsp_uim4_groups[] = { "gpio19", "gpio20" };
|
||||
static const char * const blsp_i2c4_groups[] = { "gpio21", "gpio22" };
|
||||
static const char * const blsp_spi4_groups[] = {
|
||||
"gpio19", "gpio20", "gpio21", "gpio22"
|
||||
};
|
||||
|
||||
static const char * const blsp_uart5_groups[] = {
|
||||
"gpio23", "gpio24", "gpio25", "gpio26"
|
||||
};
|
||||
static const char * const blsp_uim5_groups[] = { "gpio23", "gpio24" };
|
||||
static const char * const blsp_i2c5_groups[] = { "gpio25", "gpio26" };
|
||||
static const char * const blsp_spi5_groups[] = {
|
||||
"gpio23", "gpio24", "gpio25", "gpio26"
|
||||
};
|
||||
|
||||
static const char * const blsp_uart6_groups[] = {
|
||||
"gpio27", "gpio28", "gpio29", "gpio30"
|
||||
};
|
||||
static const char * const blsp_uim6_groups[] = { "gpio27", "gpio28" };
|
||||
static const char * const blsp_i2c6_groups[] = { "gpio29", "gpio30" };
|
||||
static const char * const blsp_i2c11_groups[] = { "gpio83", "gpio84" };
|
||||
static const char * const blsp_spi1_groups[] = { "gpio0", "gpio1", "gpio2", "gpio3" };
|
||||
static const char * const blsp_spi6_groups[] = {
|
||||
"gpio27", "gpio28", "gpio29", "gpio30"
|
||||
};
|
||||
|
||||
static const char * const blsp_uart7_groups[] = {
|
||||
"gpio41", "gpio42", "gpio43", "gpio44"
|
||||
};
|
||||
static const char * const blsp_uim7_groups[] = { "gpio41", "gpio42" };
|
||||
static const char * const blsp_i2c7_groups[] = { "gpio43", "gpio44" };
|
||||
static const char * const blsp_spi7_groups[] = {
|
||||
"gpio41", "gpio42", "gpio43", "gpio44"
|
||||
};
|
||||
|
||||
static const char * const blsp_uart8_groups[] = {
|
||||
"gpio45", "gpio46", "gpio47", "gpio48"
|
||||
};
|
||||
static const char * const blsp_uim8_groups[] = { "gpio45", "gpio46" };
|
||||
static const char * const blsp_i2c8_groups[] = { "gpio47", "gpio48" };
|
||||
static const char * const blsp_spi8_groups[] = {
|
||||
"gpio45", "gpio46", "gpio47", "gpio48"
|
||||
};
|
||||
static const char * const blsp_uart2_groups[] = { "gpio4", "gpio5" };
|
||||
static const char * const blsp_uart8_groups[] = { "gpio45", "gpio46" };
|
||||
|
||||
static const char * const blsp_uart9_groups[] = {
|
||||
"gpio49", "gpio50", "gpio51", "gpio52"
|
||||
};
|
||||
static const char * const blsp_uim9_groups[] = { "gpio49", "gpio50" };
|
||||
static const char * const blsp_i2c9_groups[] = { "gpio51", "gpio52" };
|
||||
static const char * const blsp_spi9_groups[] = {
|
||||
"gpio49", "gpio50", "gpio51", "gpio52"
|
||||
};
|
||||
|
||||
static const char * const blsp_uart10_groups[] = {
|
||||
"gpio53", "gpio54", "gpio55", "gpio56"
|
||||
};
|
||||
static const char * const blsp_uim10_groups[] = { "gpio53", "gpio54" };
|
||||
static const char * const blsp_i2c10_groups[] = { "gpio55", "gpio56" };
|
||||
static const char * const blsp_spi10_groups[] = {
|
||||
"gpio53", "gpio54", "gpio55", "gpio56"
|
||||
};
|
||||
static const char * const blsp_spi10_cs1_groups[] = { "gpio47", "gpio67" };
|
||||
static const char * const blsp_spi10_cs2_groups[] = { "gpio48", "gpio68" };
|
||||
static const char * const blsp_spi10_cs3_groups[] = { "gpio90" };
|
||||
|
||||
static const char * const blsp_uart11_groups[] = {
|
||||
"gpio81", "gpio82", "gpio83", "gpio84"
|
||||
};
|
||||
static const char * const blsp_uim11_groups[] = { "gpio81", "gpio82" };
|
||||
static const char * const blsp_i2c11_groups[] = { "gpio83", "gpio84" };
|
||||
static const char * const blsp_spi11_groups[] = {
|
||||
"gpio81", "gpio82", "gpio83", "gpio84"
|
||||
};
|
||||
|
||||
static const char * const blsp_uart12_groups[] = {
|
||||
"gpio85", "gpio86", "gpio87", "gpio88"
|
||||
};
|
||||
static const char * const blsp_uim12_groups[] = { "gpio85", "gpio86" };
|
||||
static const char * const blsp_i2c12_groups[] = { "gpio87", "gpio88" };
|
||||
static const char * const blsp_spi12_groups[] = {
|
||||
"gpio85", "gpio86", "gpio87", "gpio88"
|
||||
};
|
||||
|
||||
static const char * const uim1_groups[] = {
|
||||
"gpio97", "gpio98", "gpio99", "gpio100"
|
||||
};
|
||||
|
||||
static const char * const uim2_groups[] = {
|
||||
"gpio49", "gpio50", "gpio51", "gpio52"
|
||||
};
|
||||
|
||||
static const char * const uim_batt_alarm_groups[] = { "gpio101" };
|
||||
|
||||
static const char * const sdc3_groups[] = {
|
||||
"gpio35", "gpio36", "gpio37", "gpio38", "gpio39", "gpio40"
|
||||
};
|
||||
|
||||
static const char * const sdc4_groups[] = {
|
||||
"gpio91", "gpio92", "gpio93", "gpio94", "gpio95", "gpio96"
|
||||
};
|
||||
|
||||
static const char * const gp0_clk_groups[] = { "gpio26" };
|
||||
static const char * const gp1_clk_groups[] = { "gpio27", "gpio57", "gpio78" };
|
||||
static const char * const gp_mn_groups[] = { "gpio29" };
|
||||
static const char * const gcc_gp_clk1_groups[] = { "gpio57", "gpio78" };
|
||||
static const char * const gcc_gp_clk2_groups[] = { "gpio58", "gpio81" };
|
||||
static const char * const gcc_gp_clk3_groups[] = { "gpio59", "gpio82" };
|
||||
|
||||
static const char * const qua_mi2s_groups[] = {
|
||||
"gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
|
||||
};
|
||||
|
||||
static const char * const pri_mi2s_groups[] = {
|
||||
"gpio64", "gpio65", "gpio66", "gpio67", "gpio68"
|
||||
};
|
||||
|
||||
static const char * const spkr_mi2s_groups[] = {
|
||||
"gpio69", "gpio70", "gpio71", "gpio72"
|
||||
};
|
||||
|
||||
static const char * const ter_mi2s_groups[] = {
|
||||
"gpio73", "gpio74", "gpio75", "gpio76", "gpio77"
|
||||
};
|
||||
|
||||
static const char * const sec_mi2s_groups[] = {
|
||||
"gpio78", "gpio79", "gpio80", "gpio81", "gpio82"
|
||||
};
|
||||
|
||||
static const char * const hdmi_cec_groups[] = { "gpio31" };
|
||||
static const char * const hdmi_ddc_groups[] = { "gpio32", "gpio33" };
|
||||
static const char * const hdmi_hpd_groups[] = { "gpio34" };
|
||||
static const char * const edp_hpd_groups[] = { "gpio102" };
|
||||
|
||||
static const char * const mdp_vsync_groups[] = { "gpio12", "gpio13", "gpio14" };
|
||||
static const char * const cam_mclk0_groups[] = { "gpio15" };
|
||||
static const char * const cam_mclk1_groups[] = { "gpio16" };
|
||||
static const char * const cam_mclk2_groups[] = { "gpio17" };
|
||||
static const char * const cam_mclk3_groups[] = { "gpio18" };
|
||||
|
||||
static const char * const cci_timer0_groups[] = { "gpio23" };
|
||||
static const char * const cci_timer1_groups[] = { "gpio24" };
|
||||
static const char * const cci_timer2_groups[] = { "gpio25" };
|
||||
static const char * const cci_timer3_groups[] = { "gpio26" };
|
||||
static const char * const cci_timer4_groups[] = { "gpio27" };
|
||||
static const char * const cci_async_in0_groups[] = { "gpio28" };
|
||||
static const char * const cci_async_in1_groups[] = { "gpio26" };
|
||||
static const char * const cci_async_in2_groups[] = { "gpio27" };
|
||||
|
||||
static const char * const gp_pdm0_groups[] = { "gpio54", "gpio68" };
|
||||
static const char * const gp_pdm1_groups[] = { "gpio74", "gpio86" };
|
||||
static const char * const gp_pdm2_groups[] = { "gpio63", "gpio79" };
|
||||
|
||||
static const char * const tsif1_groups[] = {
|
||||
"gpio89", "gpio90", "gpio91", "gpio92"
|
||||
};
|
||||
|
||||
static const char * const tsif2_groups[] = {
|
||||
"gpio93", "gpio94", "gpio95", "gpio96"
|
||||
};
|
||||
|
||||
static const char * const hsic_groups[] = { "gpio144", "gpio145" };
|
||||
static const char * const grfc_groups[] = {
|
||||
"gpio104", "gpio105", "gpio106", "gpio107", "gpio108", "gpio109",
|
||||
"gpio110", "gpio111", "gpio112", "gpio113", "gpio114", "gpio115",
|
||||
"gpio116", "gpio117", "gpio118", "gpio119", "gpio120", "gpio121",
|
||||
"gpio122", "gpio123", "gpio124", "gpio125", "gpio126", "gpio127",
|
||||
"gpio128", "gpio136", "gpio137", "gpio141", "gpio143"
|
||||
};
|
||||
|
||||
static const char * const audio_ref_clk_groups[] = { "gpio69" };
|
||||
|
||||
static const char * const bt_groups[] = { "gpio35", "gpio43", "gpio44" };
|
||||
|
||||
static const char * const fm_groups[] = { "gpio41", "gpio42" };
|
||||
|
||||
static const char * const wlan_groups[] = {
|
||||
"gpio36", "gpio37", "gpio38", "gpio39", "gpio40"
|
||||
};
|
||||
|
||||
static const char * const slimbus_groups[] = { "gpio70", "gpio71" };
|
||||
|
||||
static const struct msm_function msm8x74_functions[] = {
|
||||
FUNCTION(cci_i2c0),
|
||||
FUNCTION(cci_i2c1),
|
||||
FUNCTION(uim1),
|
||||
FUNCTION(uim2),
|
||||
FUNCTION(uim_batt_alarm),
|
||||
FUNCTION(blsp_uim1),
|
||||
FUNCTION(blsp_uim2),
|
||||
FUNCTION(blsp_uim3),
|
||||
FUNCTION(blsp_uim4),
|
||||
FUNCTION(blsp_uim5),
|
||||
FUNCTION(blsp_uim6),
|
||||
FUNCTION(blsp_uim7),
|
||||
FUNCTION(blsp_uim8),
|
||||
FUNCTION(blsp_uim9),
|
||||
FUNCTION(blsp_uim10),
|
||||
FUNCTION(blsp_uim11),
|
||||
FUNCTION(blsp_uim12),
|
||||
FUNCTION(blsp_i2c1),
|
||||
FUNCTION(blsp_i2c2),
|
||||
FUNCTION(blsp_i2c3),
|
||||
FUNCTION(blsp_i2c4),
|
||||
FUNCTION(blsp_i2c5),
|
||||
FUNCTION(blsp_i2c6),
|
||||
FUNCTION(blsp_i2c7),
|
||||
FUNCTION(blsp_i2c8),
|
||||
FUNCTION(blsp_i2c9),
|
||||
FUNCTION(blsp_i2c10),
|
||||
FUNCTION(blsp_i2c11),
|
||||
FUNCTION(blsp_i2c12),
|
||||
FUNCTION(blsp_spi1),
|
||||
FUNCTION(blsp_spi1_cs1),
|
||||
FUNCTION(blsp_spi1_cs2),
|
||||
FUNCTION(blsp_spi1_cs3),
|
||||
FUNCTION(blsp_spi2),
|
||||
FUNCTION(blsp_spi2_cs1),
|
||||
FUNCTION(blsp_spi2_cs2),
|
||||
FUNCTION(blsp_spi2_cs3),
|
||||
FUNCTION(blsp_spi3),
|
||||
FUNCTION(blsp_spi4),
|
||||
FUNCTION(blsp_spi5),
|
||||
FUNCTION(blsp_spi6),
|
||||
FUNCTION(blsp_spi7),
|
||||
FUNCTION(blsp_spi8),
|
||||
FUNCTION(blsp_spi9),
|
||||
FUNCTION(blsp_spi10),
|
||||
FUNCTION(blsp_spi10_cs1),
|
||||
FUNCTION(blsp_spi10_cs2),
|
||||
FUNCTION(blsp_spi10_cs3),
|
||||
FUNCTION(blsp_spi11),
|
||||
FUNCTION(blsp_spi12),
|
||||
FUNCTION(blsp_uart1),
|
||||
FUNCTION(blsp_uart2),
|
||||
FUNCTION(blsp_uart3),
|
||||
FUNCTION(blsp_uart4),
|
||||
FUNCTION(blsp_uart5),
|
||||
FUNCTION(blsp_uart6),
|
||||
FUNCTION(blsp_uart7),
|
||||
FUNCTION(blsp_uart8),
|
||||
FUNCTION(blsp_uart9),
|
||||
FUNCTION(blsp_uart10),
|
||||
FUNCTION(blsp_uart11),
|
||||
FUNCTION(blsp_uart12),
|
||||
FUNCTION(sdc3),
|
||||
FUNCTION(sdc4),
|
||||
FUNCTION(gcc_gp_clk1),
|
||||
FUNCTION(gcc_gp_clk2),
|
||||
FUNCTION(gcc_gp_clk3),
|
||||
FUNCTION(qua_mi2s),
|
||||
FUNCTION(pri_mi2s),
|
||||
FUNCTION(spkr_mi2s),
|
||||
FUNCTION(ter_mi2s),
|
||||
FUNCTION(sec_mi2s),
|
||||
FUNCTION(mdp_vsync),
|
||||
FUNCTION(cam_mclk0),
|
||||
FUNCTION(cam_mclk1),
|
||||
FUNCTION(cam_mclk2),
|
||||
FUNCTION(cam_mclk3),
|
||||
FUNCTION(cci_timer0),
|
||||
FUNCTION(cci_timer1),
|
||||
FUNCTION(cci_timer2),
|
||||
FUNCTION(cci_timer3),
|
||||
FUNCTION(cci_timer4),
|
||||
FUNCTION(cci_async_in0),
|
||||
FUNCTION(cci_async_in1),
|
||||
FUNCTION(cci_async_in2),
|
||||
FUNCTION(hdmi_cec),
|
||||
FUNCTION(hdmi_ddc),
|
||||
FUNCTION(hdmi_hpd),
|
||||
FUNCTION(edp_hpd),
|
||||
FUNCTION(gp_pdm0),
|
||||
FUNCTION(gp_pdm1),
|
||||
FUNCTION(gp_pdm2),
|
||||
FUNCTION(gp0_clk),
|
||||
FUNCTION(gp1_clk),
|
||||
FUNCTION(gp_mn),
|
||||
FUNCTION(tsif1),
|
||||
FUNCTION(tsif2),
|
||||
FUNCTION(hsic),
|
||||
FUNCTION(grfc),
|
||||
FUNCTION(audio_ref_clk),
|
||||
FUNCTION(bt),
|
||||
FUNCTION(fm),
|
||||
FUNCTION(wlan),
|
||||
FUNCTION(slimbus),
|
||||
};
|
||||
|
||||
static const struct msm_pingroup msm8x74_groups[] = {
|
||||
PINGROUP(0, blsp_spi1, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(1, blsp_spi1, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(2, blsp_spi1, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(3, blsp_spi1, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(4, NA, blsp_uart2, NA, NA, NA, NA, NA),
|
||||
PINGROUP(5, NA, blsp_uart2, NA, NA, NA, NA, NA),
|
||||
PINGROUP(6, NA, NA, blsp_i2c2, NA, NA, NA, NA),
|
||||
PINGROUP(7, NA, NA, blsp_i2c2, NA, NA, NA, NA),
|
||||
PINGROUP(8, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(9, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(10, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(11, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(12, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(13, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(14, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(15, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(16, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(17, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(18, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(19, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(20, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(21, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(22, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(23, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(24, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(25, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(26, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(27, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(28, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(29, NA, NA, blsp_i2c6, NA, NA, NA, NA),
|
||||
PINGROUP(30, NA, NA, blsp_i2c6, NA, NA, NA, NA),
|
||||
PINGROUP(31, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(32, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(33, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(34, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(35, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(36, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(37, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(38, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(39, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(40, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(41, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(42, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(43, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(44, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(45, blsp_spi8, blsp_uart8, NA, NA, NA, NA, NA),
|
||||
PINGROUP(46, blsp_spi8, blsp_uart8, NA, NA, NA, NA, NA),
|
||||
PINGROUP(47, blsp_spi8, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(48, blsp_spi8, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(49, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(50, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(51, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(52, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(53, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(54, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(55, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(56, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(57, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(58, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(59, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(60, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(61, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(62, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(63, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(64, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(65, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(66, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(67, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(68, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(69, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(70, slimbus, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(71, slimbus, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(72, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(73, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(74, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(75, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(76, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(77, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(78, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(79, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(80, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(81, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(82, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(83, NA, NA, blsp_i2c11, NA, NA, NA, NA),
|
||||
PINGROUP(84, NA, NA, blsp_i2c11, NA, NA, NA, NA),
|
||||
PINGROUP(85, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(86, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(87, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(88, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(89, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(90, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(91, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(92, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(93, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(94, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(95, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(96, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(97, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(98, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(99, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(100, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(101, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(102, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(0, blsp_spi1, blsp_uart1, blsp_uim1, NA, NA, NA, NA),
|
||||
PINGROUP(1, blsp_spi1, blsp_uart1, blsp_uim1, NA, NA, NA, NA),
|
||||
PINGROUP(2, blsp_spi1, blsp_uart1, blsp_i2c1, NA, NA, NA, NA),
|
||||
PINGROUP(3, blsp_spi1, blsp_uart1, blsp_i2c1, NA, NA, NA, NA),
|
||||
PINGROUP(4, blsp_spi2, blsp_uart2, blsp_uim2, NA, NA, NA, NA),
|
||||
PINGROUP(5, blsp_spi2, blsp_uart2, blsp_uim2, NA, NA, NA, NA),
|
||||
PINGROUP(6, blsp_spi2, blsp_uart2, blsp_i2c2, NA, NA, NA, NA),
|
||||
PINGROUP(7, blsp_spi2, blsp_uart2, blsp_i2c2, NA, NA, NA, NA),
|
||||
PINGROUP(8, blsp_spi3, blsp_uart3, blsp_uim3, blsp_spi1_cs1, NA, NA, NA),
|
||||
PINGROUP(9, blsp_spi3, blsp_uart3, blsp_uim3, blsp_spi1_cs2, NA, NA, NA),
|
||||
PINGROUP(10, blsp_spi3, blsp_uart3, blsp_i2c3, blsp_spi1_cs3, NA, NA, NA),
|
||||
PINGROUP(11, blsp_spi3, blsp_uart3, blsp_i2c3, blsp_spi1_cs2, NA, NA, NA),
|
||||
PINGROUP(12, mdp_vsync, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(13, mdp_vsync, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(14, mdp_vsync, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(15, cam_mclk0, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(16, cam_mclk1, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(17, cam_mclk2, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(18, cam_mclk3, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(19, cci_i2c0, blsp_spi4, blsp_uart4, blsp_uim4, NA, NA, NA),
|
||||
PINGROUP(20, cci_i2c0, blsp_spi4, blsp_uart4, blsp_uim4, NA, NA, NA),
|
||||
PINGROUP(21, cci_i2c1, blsp_spi4, blsp_uart4, blsp_i2c4, NA, NA, NA),
|
||||
PINGROUP(22, cci_i2c1, blsp_spi4, blsp_uart4, blsp_i2c4, NA, NA, NA),
|
||||
PINGROUP(23, cci_timer0, blsp_spi5, blsp_uart5, blsp_uim5, NA, NA, NA),
|
||||
PINGROUP(24, cci_timer1, blsp_spi5, blsp_uart5, blsp_uim5, NA, NA, NA),
|
||||
PINGROUP(25, cci_timer2, blsp_spi5, blsp_uart5, blsp_i2c5, NA, NA, NA),
|
||||
PINGROUP(26, cci_timer3, cci_async_in1, blsp_spi5, blsp_uart5, blsp_i2c5, gp0_clk, NA),
|
||||
PINGROUP(27, cci_timer4, cci_async_in2, blsp_spi6, blsp_uart6, blsp_i2c6, gp1_clk, NA),
|
||||
PINGROUP(28, cci_async_in0, blsp_spi6, blsp_uart6, blsp_uim6, NA, NA, NA),
|
||||
PINGROUP(29, blsp_spi6, blsp_uart6, blsp_i2c6, gp_mn, NA, NA, NA),
|
||||
PINGROUP(30, blsp_spi6, blsp_uart6, blsp_i2c6, NA, NA, NA, NA),
|
||||
PINGROUP(31, hdmi_cec, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(32, hdmi_ddc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(33, hdmi_ddc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(34, hdmi_hpd, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(35, bt, sdc3, NA, NA, NA, NA, NA),
|
||||
PINGROUP(36, wlan, sdc3, NA, NA, NA, NA, NA),
|
||||
PINGROUP(37, wlan, sdc3, NA, NA, NA, NA, NA),
|
||||
PINGROUP(38, wlan, sdc3, NA, NA, NA, NA, NA),
|
||||
PINGROUP(39, wlan, sdc3, NA, NA, NA, NA, NA),
|
||||
PINGROUP(40, wlan, sdc3, NA, NA, NA, NA, NA),
|
||||
PINGROUP(41, fm, blsp_spi7, blsp_uart7, blsp_uim7, NA, NA, NA),
|
||||
PINGROUP(42, fm, blsp_spi7, blsp_uart7, blsp_uim7, NA, NA, NA),
|
||||
PINGROUP(43, bt, blsp_spi7, blsp_uart7, blsp_i2c7, NA, NA, NA),
|
||||
PINGROUP(44, bt, blsp_spi7, blsp_uart7, blsp_i2c7, NA, NA, NA),
|
||||
PINGROUP(45, blsp_spi8, blsp_uart8, blsp_uim8, NA, NA, NA, NA),
|
||||
PINGROUP(46, blsp_spi8, blsp_uart8, blsp_uim8, NA, NA, NA, NA),
|
||||
PINGROUP(47, blsp_spi8, blsp_uart8, blsp_i2c8, blsp_spi10_cs1, NA, NA, NA),
|
||||
PINGROUP(48, blsp_spi8, blsp_uart8, blsp_i2c8, blsp_spi10_cs2, NA, NA, NA),
|
||||
PINGROUP(49, uim2, blsp_spi9, blsp_uart9, blsp_uim9, NA, NA, NA),
|
||||
PINGROUP(50, uim2, blsp_spi9, blsp_uart9, blsp_uim9, NA, NA, NA),
|
||||
PINGROUP(51, uim2, blsp_spi9, blsp_uart9, blsp_i2c9, NA, NA, NA),
|
||||
PINGROUP(52, uim2, blsp_spi9, blsp_uart9, blsp_i2c9, NA, NA, NA),
|
||||
PINGROUP(53, blsp_spi10, blsp_uart10, blsp_uim10, blsp_spi2_cs1, NA, NA, NA),
|
||||
PINGROUP(54, blsp_spi10, blsp_uart10, blsp_uim10, blsp_spi2_cs2, gp_pdm0, NA, NA),
|
||||
PINGROUP(55, blsp_spi10, blsp_uart10, blsp_i2c10, NA, NA, NA, NA),
|
||||
PINGROUP(56, blsp_spi10, blsp_uart10, blsp_i2c10, NA, NA, NA, NA),
|
||||
PINGROUP(57, qua_mi2s, gcc_gp_clk1, NA, NA, NA, NA, NA),
|
||||
PINGROUP(58, qua_mi2s, gcc_gp_clk2, NA, NA, NA, NA, NA),
|
||||
PINGROUP(59, qua_mi2s, gcc_gp_clk3, NA, NA, NA, NA, NA),
|
||||
PINGROUP(60, qua_mi2s, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(61, qua_mi2s, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(62, qua_mi2s, blsp_spi2_cs1, NA, NA, NA, NA, NA),
|
||||
PINGROUP(63, qua_mi2s, blsp_spi2_cs2, gp_pdm2, NA, NA, NA, NA),
|
||||
PINGROUP(64, pri_mi2s, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(65, pri_mi2s, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(66, pri_mi2s, blsp_spi2_cs3, NA, NA, NA, NA, NA),
|
||||
PINGROUP(67, pri_mi2s, blsp_spi10_cs1, NA, NA, NA, NA, NA),
|
||||
PINGROUP(68, pri_mi2s, blsp_spi10_cs2, gp_pdm0, NA, NA, NA, NA),
|
||||
PINGROUP(69, spkr_mi2s, audio_ref_clk, NA, NA, NA, NA, NA),
|
||||
PINGROUP(70, slimbus, spkr_mi2s, NA, NA, NA, NA, NA),
|
||||
PINGROUP(71, slimbus, spkr_mi2s, NA, NA, NA, NA, NA),
|
||||
PINGROUP(72, spkr_mi2s, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(73, ter_mi2s, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(74, ter_mi2s, gp_pdm1, NA, NA, NA, NA, NA),
|
||||
PINGROUP(75, ter_mi2s, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(76, ter_mi2s, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(77, ter_mi2s, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(78, sec_mi2s, gcc_gp_clk1, NA, NA, NA, NA, NA),
|
||||
PINGROUP(79, sec_mi2s, gp_pdm2, NA, NA, NA, NA, NA),
|
||||
PINGROUP(80, sec_mi2s, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(81, sec_mi2s, blsp_spi11, blsp_uart11, blsp_uim11, gcc_gp_clk2, NA, NA),
|
||||
PINGROUP(82, sec_mi2s, blsp_spi11, blsp_uart11, blsp_uim11, gcc_gp_clk3, NA, NA),
|
||||
PINGROUP(83, blsp_spi11, blsp_uart11, blsp_i2c11, NA, NA, NA, NA),
|
||||
PINGROUP(84, blsp_spi11, blsp_uart11, blsp_i2c11, NA, NA, NA, NA),
|
||||
PINGROUP(85, blsp_spi12, blsp_uart12, blsp_uim12, NA, NA, NA, NA),
|
||||
PINGROUP(86, blsp_spi12, blsp_uart12, blsp_uim12, gp_pdm1, NA, NA, NA),
|
||||
PINGROUP(87, blsp_spi12, blsp_uart12, blsp_i2c12, NA, NA, NA, NA),
|
||||
PINGROUP(88, blsp_spi12, blsp_uart12, blsp_i2c12, NA, NA, NA, NA),
|
||||
PINGROUP(89, tsif1, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(90, tsif1, blsp_spi10_cs3, NA, NA, NA, NA, NA),
|
||||
PINGROUP(91, tsif1, sdc4, NA, NA, NA, NA, NA),
|
||||
PINGROUP(92, tsif1, sdc4, NA, NA, NA, NA, NA),
|
||||
PINGROUP(93, tsif2, sdc4, NA, NA, NA, NA, NA),
|
||||
PINGROUP(94, tsif2, sdc4, NA, NA, NA, NA, NA),
|
||||
PINGROUP(95, tsif2, sdc4, NA, NA, NA, NA, NA),
|
||||
PINGROUP(96, tsif2, sdc4, NA, NA, NA, NA, NA),
|
||||
PINGROUP(97, uim1, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(98, uim1, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(99, uim1, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(100, uim1, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(101, uim_batt_alarm, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(102, edp_hpd, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(103, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(104, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(105, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(106, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(107, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(108, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(109, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(110, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(111, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(112, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(113, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(114, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(115, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(116, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(117, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(118, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(119, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(120, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(121, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(122, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(123, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(124, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(125, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(126, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(127, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(128, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(104, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(105, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(106, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(107, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(108, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(109, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(110, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(111, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(112, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(113, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(114, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(115, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(116, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(117, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(118, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(119, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(120, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(121, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(122, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(123, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(124, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(125, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(126, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(127, grfc, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(128, NA, grfc, NA, NA, NA, NA, NA),
|
||||
PINGROUP(129, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(130, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(131, NA, NA, NA, NA, NA, NA, NA),
|
||||
|
@ -571,16 +971,16 @@ static const struct msm_pingroup msm8x74_groups[] = {
|
|||
PINGROUP(133, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(134, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(135, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(136, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(137, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(136, NA, grfc, NA, NA, NA, NA, NA),
|
||||
PINGROUP(137, NA, grfc, NA, NA, NA, NA, NA),
|
||||
PINGROUP(138, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(139, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(140, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(141, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(143, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(143, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(144, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(145, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(141, NA, grfc, NA, NA, NA, NA, NA),
|
||||
PINGROUP(142, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(143, NA, grfc, NA, NA, NA, NA, NA),
|
||||
PINGROUP(144, hsic, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(145, hsic, NA, NA, NA, NA, NA, NA),
|
||||
SDC_PINGROUP(sdc1_clk, 0x2044, 13, 6),
|
||||
SDC_PINGROUP(sdc1_cmd, 0x2044, 11, 3),
|
||||
SDC_PINGROUP(sdc1_data, 0x2044, 9, 0),
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
#include <linux/pinctrl/pinconf-generic.h>
|
||||
#include <linux/irqchip/chained_irq.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
|
||||
#include "core.h"
|
||||
|
@ -86,7 +88,7 @@ enum rockchip_pin_bank_type {
|
|||
*/
|
||||
struct rockchip_pin_bank {
|
||||
void __iomem *reg_base;
|
||||
void __iomem *reg_pull;
|
||||
struct regmap *regmap_pull;
|
||||
struct clk *clk;
|
||||
int irq;
|
||||
u32 pin_base;
|
||||
|
@ -120,8 +122,9 @@ struct rockchip_pin_ctrl {
|
|||
char *label;
|
||||
enum rockchip_pinctrl_type type;
|
||||
int mux_offset;
|
||||
void (*pull_calc_reg)(struct rockchip_pin_bank *bank, int pin_num,
|
||||
void __iomem **reg, u8 *bit);
|
||||
void (*pull_calc_reg)(struct rockchip_pin_bank *bank,
|
||||
int pin_num, struct regmap **regmap,
|
||||
int *reg, u8 *bit);
|
||||
};
|
||||
|
||||
struct rockchip_pin_config {
|
||||
|
@ -159,8 +162,10 @@ struct rockchip_pmx_func {
|
|||
};
|
||||
|
||||
struct rockchip_pinctrl {
|
||||
void __iomem *reg_base;
|
||||
void __iomem *reg_pull;
|
||||
struct regmap *regmap_base;
|
||||
int reg_size;
|
||||
struct regmap *regmap_pull;
|
||||
struct regmap *regmap_pmu;
|
||||
struct device *dev;
|
||||
struct rockchip_pin_ctrl *ctrl;
|
||||
struct pinctrl_desc pctl;
|
||||
|
@ -171,6 +176,12 @@ struct rockchip_pinctrl {
|
|||
unsigned int nfunctions;
|
||||
};
|
||||
|
||||
static struct regmap_config rockchip_regmap_config = {
|
||||
.reg_bits = 32,
|
||||
.val_bits = 32,
|
||||
.reg_stride = 4,
|
||||
};
|
||||
|
||||
static inline struct rockchip_pin_bank *gc_to_pin_bank(struct gpio_chip *gc)
|
||||
{
|
||||
return container_of(gc, struct rockchip_pin_bank, gpio_chip);
|
||||
|
@ -329,6 +340,29 @@ static const struct pinctrl_ops rockchip_pctrl_ops = {
|
|||
* Hardware access
|
||||
*/
|
||||
|
||||
static int rockchip_get_mux(struct rockchip_pin_bank *bank, int pin)
|
||||
{
|
||||
struct rockchip_pinctrl *info = bank->drvdata;
|
||||
unsigned int val;
|
||||
int reg, ret;
|
||||
u8 bit;
|
||||
|
||||
if (bank->bank_type == RK3188_BANK0 && pin < 16)
|
||||
return RK_FUNC_GPIO;
|
||||
|
||||
/* get basic quadrupel of mux registers and the correct reg inside */
|
||||
reg = info->ctrl->mux_offset;
|
||||
reg += bank->bank_num * 0x10;
|
||||
reg += (pin / 8) * 4;
|
||||
bit = (pin % 8) * 2;
|
||||
|
||||
ret = regmap_read(info->regmap_base, reg, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return ((val >> bit) & 3);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set a new mux function for a pin.
|
||||
*
|
||||
|
@ -345,7 +379,7 @@ static const struct pinctrl_ops rockchip_pctrl_ops = {
|
|||
static int rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)
|
||||
{
|
||||
struct rockchip_pinctrl *info = bank->drvdata;
|
||||
void __iomem *reg = info->reg_base + info->ctrl->mux_offset;
|
||||
int reg, ret;
|
||||
unsigned long flags;
|
||||
u8 bit;
|
||||
u32 data;
|
||||
|
@ -368,6 +402,7 @@ static int rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)
|
|||
bank->bank_num, pin, mux);
|
||||
|
||||
/* get basic quadrupel of mux registers and the correct reg inside */
|
||||
reg = info->ctrl->mux_offset;
|
||||
reg += bank->bank_num * 0x10;
|
||||
reg += (pin / 8) * 4;
|
||||
bit = (pin % 8) * 2;
|
||||
|
@ -376,11 +411,11 @@ static int rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)
|
|||
|
||||
data = (3 << (bit + 16));
|
||||
data |= (mux & 3) << bit;
|
||||
writel(data, reg);
|
||||
ret = regmap_write(info->regmap_base, reg, data);
|
||||
|
||||
spin_unlock_irqrestore(&bank->slock, flags);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define RK2928_PULL_OFFSET 0x118
|
||||
|
@ -388,34 +423,46 @@ static int rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)
|
|||
#define RK2928_PULL_BANK_STRIDE 8
|
||||
|
||||
static void rk2928_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank,
|
||||
int pin_num, void __iomem **reg, u8 *bit)
|
||||
int pin_num, struct regmap **regmap,
|
||||
int *reg, u8 *bit)
|
||||
{
|
||||
struct rockchip_pinctrl *info = bank->drvdata;
|
||||
|
||||
*reg = info->reg_base + RK2928_PULL_OFFSET;
|
||||
*regmap = info->regmap_base;
|
||||
*reg = RK2928_PULL_OFFSET;
|
||||
*reg += bank->bank_num * RK2928_PULL_BANK_STRIDE;
|
||||
*reg += (pin_num / RK2928_PULL_PINS_PER_REG) * 4;
|
||||
|
||||
*bit = pin_num % RK2928_PULL_PINS_PER_REG;
|
||||
};
|
||||
|
||||
#define RK3188_PULL_OFFSET 0x164
|
||||
#define RK3188_PULL_BITS_PER_PIN 2
|
||||
#define RK3188_PULL_PINS_PER_REG 8
|
||||
#define RK3188_PULL_BANK_STRIDE 16
|
||||
#define RK3188_PULL_PMU_OFFSET 0x64
|
||||
|
||||
static void rk3188_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank,
|
||||
int pin_num, void __iomem **reg, u8 *bit)
|
||||
int pin_num, struct regmap **regmap,
|
||||
int *reg, u8 *bit)
|
||||
{
|
||||
struct rockchip_pinctrl *info = bank->drvdata;
|
||||
|
||||
/* The first 12 pins of the first bank are located elsewhere */
|
||||
if (bank->bank_type == RK3188_BANK0 && pin_num < 12) {
|
||||
*reg = bank->reg_pull +
|
||||
((pin_num / RK3188_PULL_PINS_PER_REG) * 4);
|
||||
*regmap = info->regmap_pmu ? info->regmap_pmu
|
||||
: bank->regmap_pull;
|
||||
*reg = info->regmap_pmu ? RK3188_PULL_PMU_OFFSET : 0;
|
||||
*reg += ((pin_num / RK3188_PULL_PINS_PER_REG) * 4);
|
||||
*bit = pin_num % RK3188_PULL_PINS_PER_REG;
|
||||
*bit *= RK3188_PULL_BITS_PER_PIN;
|
||||
} else {
|
||||
*reg = info->reg_pull - 4;
|
||||
*regmap = info->regmap_pull ? info->regmap_pull
|
||||
: info->regmap_base;
|
||||
*reg = info->regmap_pull ? 0 : RK3188_PULL_OFFSET;
|
||||
|
||||
/* correct the offset, as it is the 2nd pull register */
|
||||
*reg -= 4;
|
||||
*reg += bank->bank_num * RK3188_PULL_BANK_STRIDE;
|
||||
*reg += ((pin_num / RK3188_PULL_PINS_PER_REG) * 4);
|
||||
|
||||
|
@ -433,7 +480,8 @@ static int rockchip_get_pull(struct rockchip_pin_bank *bank, int pin_num)
|
|||
{
|
||||
struct rockchip_pinctrl *info = bank->drvdata;
|
||||
struct rockchip_pin_ctrl *ctrl = info->ctrl;
|
||||
void __iomem *reg;
|
||||
struct regmap *regmap;
|
||||
int reg, ret;
|
||||
u8 bit;
|
||||
u32 data;
|
||||
|
||||
|
@ -441,15 +489,19 @@ static int rockchip_get_pull(struct rockchip_pin_bank *bank, int pin_num)
|
|||
if (ctrl->type == RK3066B)
|
||||
return PIN_CONFIG_BIAS_DISABLE;
|
||||
|
||||
ctrl->pull_calc_reg(bank, pin_num, ®, &bit);
|
||||
ctrl->pull_calc_reg(bank, pin_num, ®map, ®, &bit);
|
||||
|
||||
ret = regmap_read(regmap, reg, &data);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
switch (ctrl->type) {
|
||||
case RK2928:
|
||||
return !(readl_relaxed(reg) & BIT(bit))
|
||||
return !(data & BIT(bit))
|
||||
? PIN_CONFIG_BIAS_PULL_PIN_DEFAULT
|
||||
: PIN_CONFIG_BIAS_DISABLE;
|
||||
case RK3188:
|
||||
data = readl_relaxed(reg) >> bit;
|
||||
data >>= bit;
|
||||
data &= (1 << RK3188_PULL_BITS_PER_PIN) - 1;
|
||||
|
||||
switch (data) {
|
||||
|
@ -476,7 +528,8 @@ static int rockchip_set_pull(struct rockchip_pin_bank *bank,
|
|||
{
|
||||
struct rockchip_pinctrl *info = bank->drvdata;
|
||||
struct rockchip_pin_ctrl *ctrl = info->ctrl;
|
||||
void __iomem *reg;
|
||||
struct regmap *regmap;
|
||||
int reg, ret;
|
||||
unsigned long flags;
|
||||
u8 bit;
|
||||
u32 data;
|
||||
|
@ -488,7 +541,7 @@ static int rockchip_set_pull(struct rockchip_pin_bank *bank,
|
|||
if (ctrl->type == RK3066B)
|
||||
return pull ? -EINVAL : 0;
|
||||
|
||||
ctrl->pull_calc_reg(bank, pin_num, ®, &bit);
|
||||
ctrl->pull_calc_reg(bank, pin_num, ®map, ®, &bit);
|
||||
|
||||
switch (ctrl->type) {
|
||||
case RK2928:
|
||||
|
@ -497,7 +550,7 @@ static int rockchip_set_pull(struct rockchip_pin_bank *bank,
|
|||
data = BIT(bit + 16);
|
||||
if (pull == PIN_CONFIG_BIAS_DISABLE)
|
||||
data |= BIT(bit);
|
||||
writel(data, reg);
|
||||
ret = regmap_write(regmap, reg, data);
|
||||
|
||||
spin_unlock_irqrestore(&bank->slock, flags);
|
||||
break;
|
||||
|
@ -526,7 +579,7 @@ static int rockchip_set_pull(struct rockchip_pin_bank *bank,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
writel(data, reg);
|
||||
ret = regmap_write(regmap, reg, data);
|
||||
|
||||
spin_unlock_irqrestore(&bank->slock, flags);
|
||||
break;
|
||||
|
@ -535,7 +588,7 @@ static int rockchip_set_pull(struct rockchip_pin_bank *bank,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -687,6 +740,10 @@ static bool rockchip_pinconf_pull_valid(struct rockchip_pin_ctrl *ctrl,
|
|||
return false;
|
||||
}
|
||||
|
||||
static int rockchip_gpio_direction_output(struct gpio_chip *gc,
|
||||
unsigned offset, int value);
|
||||
static int rockchip_gpio_get(struct gpio_chip *gc, unsigned offset);
|
||||
|
||||
/* set the pin config settings for a specified pin */
|
||||
static int rockchip_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
|
||||
unsigned long *configs, unsigned num_configs)
|
||||
|
@ -724,6 +781,13 @@ static int rockchip_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
|
|||
if (rc)
|
||||
return rc;
|
||||
break;
|
||||
case PIN_CONFIG_OUTPUT:
|
||||
rc = rockchip_gpio_direction_output(&bank->gpio_chip,
|
||||
pin - bank->pin_base,
|
||||
arg);
|
||||
if (rc)
|
||||
return rc;
|
||||
break;
|
||||
default:
|
||||
return -ENOTSUPP;
|
||||
break;
|
||||
|
@ -740,13 +804,15 @@ static int rockchip_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin,
|
|||
struct rockchip_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct rockchip_pin_bank *bank = pin_to_bank(info, pin);
|
||||
enum pin_config_param param = pinconf_to_config_param(*config);
|
||||
u16 arg;
|
||||
int rc;
|
||||
|
||||
switch (param) {
|
||||
case PIN_CONFIG_BIAS_DISABLE:
|
||||
if (rockchip_get_pull(bank, pin - bank->pin_base) != param)
|
||||
return -EINVAL;
|
||||
|
||||
*config = 0;
|
||||
arg = 0;
|
||||
break;
|
||||
case PIN_CONFIG_BIAS_PULL_UP:
|
||||
case PIN_CONFIG_BIAS_PULL_DOWN:
|
||||
|
@ -758,13 +824,26 @@ static int rockchip_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin,
|
|||
if (rockchip_get_pull(bank, pin - bank->pin_base) != param)
|
||||
return -EINVAL;
|
||||
|
||||
*config = 1;
|
||||
arg = 1;
|
||||
break;
|
||||
case PIN_CONFIG_OUTPUT:
|
||||
rc = rockchip_get_mux(bank, pin - bank->pin_base);
|
||||
if (rc != RK_FUNC_GPIO)
|
||||
return -EINVAL;
|
||||
|
||||
rc = rockchip_gpio_get(&bank->gpio_chip, pin - bank->pin_base);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
arg = rc ? 1 : 0;
|
||||
break;
|
||||
default:
|
||||
return -ENOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
*config = pinconf_to_config_packed(param, arg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1365,16 +1444,17 @@ static int rockchip_gpiolib_unregister(struct platform_device *pdev,
|
|||
}
|
||||
|
||||
static int rockchip_get_bank_data(struct rockchip_pin_bank *bank,
|
||||
struct device *dev)
|
||||
struct rockchip_pinctrl *info)
|
||||
{
|
||||
struct resource res;
|
||||
void __iomem *base;
|
||||
|
||||
if (of_address_to_resource(bank->of_node, 0, &res)) {
|
||||
dev_err(dev, "cannot find IO resource for bank\n");
|
||||
dev_err(info->dev, "cannot find IO resource for bank\n");
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
bank->reg_base = devm_ioremap_resource(dev, &res);
|
||||
bank->reg_base = devm_ioremap_resource(info->dev, &res);
|
||||
if (IS_ERR(bank->reg_base))
|
||||
return PTR_ERR(bank->reg_base);
|
||||
|
||||
|
@ -1384,16 +1464,30 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank,
|
|||
*/
|
||||
if (of_device_is_compatible(bank->of_node,
|
||||
"rockchip,rk3188-gpio-bank0")) {
|
||||
struct device_node *node;
|
||||
|
||||
bank->bank_type = RK3188_BANK0;
|
||||
|
||||
if (of_address_to_resource(bank->of_node, 1, &res)) {
|
||||
dev_err(dev, "cannot find IO resource for bank\n");
|
||||
return -ENOENT;
|
||||
node = of_parse_phandle(bank->of_node->parent,
|
||||
"rockchip,pmu", 0);
|
||||
if (!node) {
|
||||
if (of_address_to_resource(bank->of_node, 1, &res)) {
|
||||
dev_err(info->dev, "cannot find IO resource for bank\n");
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
base = devm_ioremap_resource(info->dev, &res);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
rockchip_regmap_config.max_register =
|
||||
resource_size(&res) - 4;
|
||||
rockchip_regmap_config.name =
|
||||
"rockchip,rk3188-gpio-bank0-pull";
|
||||
bank->regmap_pull = devm_regmap_init_mmio(info->dev,
|
||||
base,
|
||||
&rockchip_regmap_config);
|
||||
}
|
||||
|
||||
bank->reg_pull = devm_ioremap_resource(dev, &res);
|
||||
if (IS_ERR(bank->reg_pull))
|
||||
return PTR_ERR(bank->reg_pull);
|
||||
} else {
|
||||
bank->bank_type = COMMON_BANK;
|
||||
}
|
||||
|
@ -1433,7 +1527,7 @@ static struct rockchip_pin_ctrl *rockchip_pinctrl_get_soc_data(
|
|||
if (!strcmp(bank->name, np->name)) {
|
||||
bank->of_node = np;
|
||||
|
||||
if (!rockchip_get_bank_data(bank, &pdev->dev))
|
||||
if (!rockchip_get_bank_data(bank, d))
|
||||
bank->valid = true;
|
||||
|
||||
break;
|
||||
|
@ -1457,7 +1551,9 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
|
|||
struct rockchip_pinctrl *info;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct rockchip_pin_ctrl *ctrl;
|
||||
struct device_node *np = pdev->dev.of_node, *node;
|
||||
struct resource *res;
|
||||
void __iomem *base;
|
||||
int ret;
|
||||
|
||||
if (!dev->of_node) {
|
||||
|
@ -1469,25 +1565,56 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
|
|||
if (!info)
|
||||
return -ENOMEM;
|
||||
|
||||
info->dev = dev;
|
||||
|
||||
ctrl = rockchip_pinctrl_get_soc_data(info, pdev);
|
||||
if (!ctrl) {
|
||||
dev_err(dev, "driver data not available\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
info->ctrl = ctrl;
|
||||
info->dev = dev;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
info->reg_base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(info->reg_base))
|
||||
return PTR_ERR(info->reg_base);
|
||||
node = of_parse_phandle(np, "rockchip,grf", 0);
|
||||
if (node) {
|
||||
info->regmap_base = syscon_node_to_regmap(node);
|
||||
if (IS_ERR(info->regmap_base))
|
||||
return PTR_ERR(info->regmap_base);
|
||||
} else {
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
/* The RK3188 has its pull registers in a separate place */
|
||||
if (ctrl->type == RK3188) {
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
info->reg_pull = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(info->reg_pull))
|
||||
return PTR_ERR(info->reg_pull);
|
||||
rockchip_regmap_config.max_register = resource_size(res) - 4;
|
||||
rockchip_regmap_config.name = "rockchip,pinctrl";
|
||||
info->regmap_base = devm_regmap_init_mmio(&pdev->dev, base,
|
||||
&rockchip_regmap_config);
|
||||
|
||||
/* to check for the old dt-bindings */
|
||||
info->reg_size = resource_size(res);
|
||||
|
||||
/* Honor the old binding, with pull registers as 2nd resource */
|
||||
if (ctrl->type == RK3188 && info->reg_size < 0x200) {
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
rockchip_regmap_config.max_register =
|
||||
resource_size(res) - 4;
|
||||
rockchip_regmap_config.name = "rockchip,pinctrl-pull";
|
||||
info->regmap_pull = devm_regmap_init_mmio(&pdev->dev,
|
||||
base,
|
||||
&rockchip_regmap_config);
|
||||
}
|
||||
}
|
||||
|
||||
/* try to find the optional reference to the pmu syscon */
|
||||
node = of_parse_phandle(np, "rockchip,pmu", 0);
|
||||
if (node) {
|
||||
info->regmap_pmu = syscon_node_to_regmap(node);
|
||||
if (IS_ERR(info->regmap_pmu))
|
||||
return PTR_ERR(info->regmap_pmu);
|
||||
}
|
||||
|
||||
ret = rockchip_gpiolib_register(pdev, info);
|
||||
|
|
|
@ -1114,6 +1114,8 @@ static struct syscore_ops samsung_pinctrl_syscore_ops = {
|
|||
|
||||
static const struct of_device_id samsung_pinctrl_dt_match[] = {
|
||||
#ifdef CONFIG_PINCTRL_EXYNOS
|
||||
{ .compatible = "samsung,exynos3250-pinctrl",
|
||||
.data = (void *)exynos3250_pin_ctrl },
|
||||
{ .compatible = "samsung,exynos4210-pinctrl",
|
||||
.data = (void *)exynos4210_pin_ctrl },
|
||||
{ .compatible = "samsung,exynos4x12-pinctrl",
|
||||
|
|
|
@ -251,6 +251,7 @@ struct samsung_pmx_func {
|
|||
};
|
||||
|
||||
/* list of all exported SoC specific data */
|
||||
extern struct samsung_pin_ctrl exynos3250_pin_ctrl[];
|
||||
extern struct samsung_pin_ctrl exynos4210_pin_ctrl[];
|
||||
extern struct samsung_pin_ctrl exynos4x12_pin_ctrl[];
|
||||
extern struct samsung_pin_ctrl exynos5250_pin_ctrl[];
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/irqdesc.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/irqchip/chained_irq.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
@ -242,13 +238,13 @@ struct st_pio_control {
|
|||
};
|
||||
|
||||
struct st_pctl_data {
|
||||
enum st_retime_style rt_style;
|
||||
unsigned int *input_delays;
|
||||
int ninput_delays;
|
||||
unsigned int *output_delays;
|
||||
int noutput_delays;
|
||||
const enum st_retime_style rt_style;
|
||||
const unsigned int *input_delays;
|
||||
const int ninput_delays;
|
||||
const unsigned int *output_delays;
|
||||
const int noutput_delays;
|
||||
/* register offset information */
|
||||
int alt, oe, pu, od, rt;
|
||||
const int alt, oe, pu, od, rt;
|
||||
};
|
||||
|
||||
struct st_pinconf {
|
||||
|
@ -321,7 +317,6 @@ struct st_gpio_bank {
|
|||
struct pinctrl_gpio_range range;
|
||||
void __iomem *base;
|
||||
struct st_pio_control pc;
|
||||
struct irq_domain *domain;
|
||||
unsigned long irq_edge_conf;
|
||||
spinlock_t lock;
|
||||
};
|
||||
|
@ -342,15 +337,15 @@ struct st_pinctrl {
|
|||
|
||||
/* SOC specific data */
|
||||
/* STiH415 data */
|
||||
static unsigned int stih415_input_delays[] = {0, 500, 1000, 1500};
|
||||
static unsigned int stih415_output_delays[] = {0, 1000, 2000, 3000};
|
||||
static const unsigned int stih415_input_delays[] = {0, 500, 1000, 1500};
|
||||
static const unsigned int stih415_output_delays[] = {0, 1000, 2000, 3000};
|
||||
|
||||
#define STIH415_PCTRL_COMMON_DATA \
|
||||
.rt_style = st_retime_style_packed, \
|
||||
.input_delays = stih415_input_delays, \
|
||||
.ninput_delays = 4, \
|
||||
.ninput_delays = ARRAY_SIZE(stih415_input_delays), \
|
||||
.output_delays = stih415_output_delays, \
|
||||
.noutput_delays = 4
|
||||
.noutput_delays = ARRAY_SIZE(stih415_output_delays)
|
||||
|
||||
static const struct st_pctl_data stih415_sbc_data = {
|
||||
STIH415_PCTRL_COMMON_DATA,
|
||||
|
@ -378,8 +373,8 @@ static const struct st_pctl_data stih415_right_data = {
|
|||
};
|
||||
|
||||
/* STiH416 data */
|
||||
static unsigned int stih416_delays[] = {0, 300, 500, 750, 1000, 1250, 1500,
|
||||
1750, 2000, 2250, 2500, 2750, 3000, 3250 };
|
||||
static const unsigned int stih416_delays[] = {0, 300, 500, 750, 1000, 1250,
|
||||
1500, 1750, 2000, 2250, 2500, 2750, 3000, 3250 };
|
||||
|
||||
static const struct st_pctl_data stih416_data = {
|
||||
.rt_style = st_retime_style_dedicated,
|
||||
|
@ -468,7 +463,7 @@ static void st_pctl_set_function(struct st_pio_control *pc,
|
|||
static unsigned long st_pinconf_delay_to_bit(unsigned int delay,
|
||||
const struct st_pctl_data *data, unsigned long config)
|
||||
{
|
||||
unsigned int *delay_times;
|
||||
const unsigned int *delay_times;
|
||||
int num_delay_times, i, closest_index = -1;
|
||||
unsigned int closest_divergence = UINT_MAX;
|
||||
|
||||
|
@ -501,7 +496,7 @@ static unsigned long st_pinconf_delay_to_bit(unsigned int delay,
|
|||
static unsigned long st_pinconf_bit_to_delay(unsigned int index,
|
||||
const struct st_pctl_data *data, unsigned long output)
|
||||
{
|
||||
unsigned int *delay_times;
|
||||
const unsigned int *delay_times;
|
||||
int num_delay_times;
|
||||
|
||||
if (output) {
|
||||
|
@ -1285,58 +1280,26 @@ static int st_pctl_parse_functions(struct device_node *np,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int st_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
struct st_gpio_bank *bank = gpio_chip_to_bank(chip);
|
||||
int irq = -ENXIO;
|
||||
|
||||
if (offset < chip->ngpio)
|
||||
irq = irq_find_mapping(bank->domain, offset);
|
||||
|
||||
dev_info(chip->dev, "%s: request IRQ for GPIO %d, return %d\n",
|
||||
chip->label, offset + chip->base, irq);
|
||||
return irq;
|
||||
}
|
||||
|
||||
static void st_gpio_irq_mask(struct irq_data *d)
|
||||
{
|
||||
struct st_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct st_gpio_bank *bank = gpio_chip_to_bank(gc);
|
||||
|
||||
writel(BIT(d->hwirq), bank->base + REG_PIO_CLR_PMASK);
|
||||
}
|
||||
|
||||
static void st_gpio_irq_unmask(struct irq_data *d)
|
||||
{
|
||||
struct st_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct st_gpio_bank *bank = gpio_chip_to_bank(gc);
|
||||
|
||||
writel(BIT(d->hwirq), bank->base + REG_PIO_SET_PMASK);
|
||||
}
|
||||
|
||||
static unsigned int st_gpio_irq_startup(struct irq_data *d)
|
||||
{
|
||||
struct st_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
||||
|
||||
if (gpio_lock_as_irq(&bank->gpio_chip, d->hwirq))
|
||||
dev_err(bank->gpio_chip.dev,
|
||||
"unable to lock HW IRQ %lu for IRQ\n",
|
||||
d->hwirq);
|
||||
|
||||
st_gpio_irq_unmask(d);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void st_gpio_irq_shutdown(struct irq_data *d)
|
||||
{
|
||||
struct st_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
||||
|
||||
st_gpio_irq_mask(d);
|
||||
gpio_unlock_as_irq(&bank->gpio_chip, d->hwirq);
|
||||
}
|
||||
|
||||
static int st_gpio_irq_set_type(struct irq_data *d, unsigned type)
|
||||
{
|
||||
struct st_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct st_gpio_bank *bank = gpio_chip_to_bank(gc);
|
||||
unsigned long flags;
|
||||
int comp, pin = d->hwirq;
|
||||
u32 val;
|
||||
|
@ -1440,7 +1403,7 @@ static void __gpio_irq_handler(struct st_gpio_bank *bank)
|
|||
continue;
|
||||
}
|
||||
|
||||
generic_handle_irq(irq_find_mapping(bank->domain, n));
|
||||
generic_handle_irq(irq_find_mapping(bank->gpio_chip.irqdomain, n));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1449,7 +1412,8 @@ static void st_gpio_irq_handler(unsigned irq, struct irq_desc *desc)
|
|||
{
|
||||
/* interrupt dedicated per bank */
|
||||
struct irq_chip *chip = irq_get_chip(irq);
|
||||
struct st_gpio_bank *bank = irq_get_handler_data(irq);
|
||||
struct gpio_chip *gc = irq_desc_get_handler_data(desc);
|
||||
struct st_gpio_bank *bank = gpio_chip_to_bank(gc);
|
||||
|
||||
chained_irq_enter(chip, desc);
|
||||
__gpio_irq_handler(bank);
|
||||
|
@ -1483,7 +1447,6 @@ static struct gpio_chip st_gpio_template = {
|
|||
.ngpio = ST_GPIO_PINS_PER_BANK,
|
||||
.of_gpio_n_cells = 1,
|
||||
.of_xlate = st_gpio_xlate,
|
||||
.to_irq = st_gpio_to_irq,
|
||||
};
|
||||
|
||||
static struct irq_chip st_gpio_irqchip = {
|
||||
|
@ -1491,26 +1454,6 @@ static struct irq_chip st_gpio_irqchip = {
|
|||
.irq_mask = st_gpio_irq_mask,
|
||||
.irq_unmask = st_gpio_irq_unmask,
|
||||
.irq_set_type = st_gpio_irq_set_type,
|
||||
.irq_startup = st_gpio_irq_startup,
|
||||
.irq_shutdown = st_gpio_irq_shutdown,
|
||||
};
|
||||
|
||||
static int st_gpio_irq_domain_map(struct irq_domain *h,
|
||||
unsigned int virq, irq_hw_number_t hw)
|
||||
{
|
||||
struct st_gpio_bank *bank = h->host_data;
|
||||
|
||||
irq_set_chip(virq, &st_gpio_irqchip);
|
||||
irq_set_handler(virq, handle_simple_irq);
|
||||
set_irq_flags(virq, IRQF_VALID);
|
||||
irq_set_chip_data(virq, bank);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops st_gpio_irq_ops = {
|
||||
.map = st_gpio_irq_domain_map,
|
||||
.xlate = irq_domain_xlate_twocell,
|
||||
};
|
||||
|
||||
static int st_gpiolib_register_bank(struct st_pinctrl *info,
|
||||
|
@ -1521,7 +1464,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
|
|||
struct device *dev = info->dev;
|
||||
int bank_num = of_alias_get_id(np, "gpio");
|
||||
struct resource res, irq_res;
|
||||
int gpio_irq = 0, err, i;
|
||||
int gpio_irq = 0, err;
|
||||
|
||||
if (of_address_to_resource(np, 0, &res))
|
||||
return -ENODEV;
|
||||
|
@ -1534,6 +1477,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
|
|||
bank->gpio_chip.base = bank_num * ST_GPIO_PINS_PER_BANK;
|
||||
bank->gpio_chip.ngpio = ST_GPIO_PINS_PER_BANK;
|
||||
bank->gpio_chip.of_node = np;
|
||||
bank->gpio_chip.dev = dev;
|
||||
spin_lock_init(&bank->lock);
|
||||
|
||||
of_property_read_string(np, "st,bank-name", &range->name);
|
||||
|
@ -1571,26 +1515,18 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
|
|||
|
||||
if (of_irq_to_resource(np, 0, &irq_res)) {
|
||||
gpio_irq = irq_res.start;
|
||||
irq_set_chained_handler(gpio_irq, st_gpio_irq_handler);
|
||||
irq_set_handler_data(gpio_irq, bank);
|
||||
gpiochip_set_chained_irqchip(&bank->gpio_chip, &st_gpio_irqchip,
|
||||
gpio_irq, st_gpio_irq_handler);
|
||||
}
|
||||
|
||||
if (info->irqmux_base > 0 || gpio_irq > 0) {
|
||||
/* Setup IRQ domain */
|
||||
bank->domain = irq_domain_add_linear(np,
|
||||
ST_GPIO_PINS_PER_BANK,
|
||||
&st_gpio_irq_ops, bank);
|
||||
if (!bank->domain) {
|
||||
dev_err(dev, "Failed to add irq domain for %s\n",
|
||||
np->full_name);
|
||||
} else {
|
||||
for (i = 0; i < ST_GPIO_PINS_PER_BANK; i++) {
|
||||
if (irq_create_mapping(bank->domain, i) < 0)
|
||||
dev_err(dev,
|
||||
"Failed to map IRQ %i\n", i);
|
||||
}
|
||||
err = gpiochip_irqchip_add(&bank->gpio_chip, &st_gpio_irqchip,
|
||||
0, handle_simple_irq,
|
||||
IRQ_TYPE_LEVEL_LOW);
|
||||
if (err) {
|
||||
dev_info(dev, "could not add irqchip\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
} else {
|
||||
dev_info(dev, "No IRQ support for %s bank\n", np->full_name);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,548 +0,0 @@
|
|||
/*
|
||||
* Allwinner A1X SoCs pinctrl driver.
|
||||
*
|
||||
* Copyright (C) 2012 Maxime Ripard
|
||||
*
|
||||
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#ifndef __PINCTRL_SUNXI_H
|
||||
#define __PINCTRL_SUNXI_H
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#define PA_BASE 0
|
||||
#define PB_BASE 32
|
||||
#define PC_BASE 64
|
||||
#define PD_BASE 96
|
||||
#define PE_BASE 128
|
||||
#define PF_BASE 160
|
||||
#define PG_BASE 192
|
||||
#define PH_BASE 224
|
||||
#define PI_BASE 256
|
||||
|
||||
#define SUNXI_PINCTRL_PIN_PA0 PINCTRL_PIN(PA_BASE + 0, "PA0")
|
||||
#define SUNXI_PINCTRL_PIN_PA1 PINCTRL_PIN(PA_BASE + 1, "PA1")
|
||||
#define SUNXI_PINCTRL_PIN_PA2 PINCTRL_PIN(PA_BASE + 2, "PA2")
|
||||
#define SUNXI_PINCTRL_PIN_PA3 PINCTRL_PIN(PA_BASE + 3, "PA3")
|
||||
#define SUNXI_PINCTRL_PIN_PA4 PINCTRL_PIN(PA_BASE + 4, "PA4")
|
||||
#define SUNXI_PINCTRL_PIN_PA5 PINCTRL_PIN(PA_BASE + 5, "PA5")
|
||||
#define SUNXI_PINCTRL_PIN_PA6 PINCTRL_PIN(PA_BASE + 6, "PA6")
|
||||
#define SUNXI_PINCTRL_PIN_PA7 PINCTRL_PIN(PA_BASE + 7, "PA7")
|
||||
#define SUNXI_PINCTRL_PIN_PA8 PINCTRL_PIN(PA_BASE + 8, "PA8")
|
||||
#define SUNXI_PINCTRL_PIN_PA9 PINCTRL_PIN(PA_BASE + 9, "PA9")
|
||||
#define SUNXI_PINCTRL_PIN_PA10 PINCTRL_PIN(PA_BASE + 10, "PA10")
|
||||
#define SUNXI_PINCTRL_PIN_PA11 PINCTRL_PIN(PA_BASE + 11, "PA11")
|
||||
#define SUNXI_PINCTRL_PIN_PA12 PINCTRL_PIN(PA_BASE + 12, "PA12")
|
||||
#define SUNXI_PINCTRL_PIN_PA13 PINCTRL_PIN(PA_BASE + 13, "PA13")
|
||||
#define SUNXI_PINCTRL_PIN_PA14 PINCTRL_PIN(PA_BASE + 14, "PA14")
|
||||
#define SUNXI_PINCTRL_PIN_PA15 PINCTRL_PIN(PA_BASE + 15, "PA15")
|
||||
#define SUNXI_PINCTRL_PIN_PA16 PINCTRL_PIN(PA_BASE + 16, "PA16")
|
||||
#define SUNXI_PINCTRL_PIN_PA17 PINCTRL_PIN(PA_BASE + 17, "PA17")
|
||||
#define SUNXI_PINCTRL_PIN_PA18 PINCTRL_PIN(PA_BASE + 18, "PA18")
|
||||
#define SUNXI_PINCTRL_PIN_PA19 PINCTRL_PIN(PA_BASE + 19, "PA19")
|
||||
#define SUNXI_PINCTRL_PIN_PA20 PINCTRL_PIN(PA_BASE + 20, "PA20")
|
||||
#define SUNXI_PINCTRL_PIN_PA21 PINCTRL_PIN(PA_BASE + 21, "PA21")
|
||||
#define SUNXI_PINCTRL_PIN_PA22 PINCTRL_PIN(PA_BASE + 22, "PA22")
|
||||
#define SUNXI_PINCTRL_PIN_PA23 PINCTRL_PIN(PA_BASE + 23, "PA23")
|
||||
#define SUNXI_PINCTRL_PIN_PA24 PINCTRL_PIN(PA_BASE + 24, "PA24")
|
||||
#define SUNXI_PINCTRL_PIN_PA25 PINCTRL_PIN(PA_BASE + 25, "PA25")
|
||||
#define SUNXI_PINCTRL_PIN_PA26 PINCTRL_PIN(PA_BASE + 26, "PA26")
|
||||
#define SUNXI_PINCTRL_PIN_PA27 PINCTRL_PIN(PA_BASE + 27, "PA27")
|
||||
#define SUNXI_PINCTRL_PIN_PA28 PINCTRL_PIN(PA_BASE + 28, "PA28")
|
||||
#define SUNXI_PINCTRL_PIN_PA29 PINCTRL_PIN(PA_BASE + 29, "PA29")
|
||||
#define SUNXI_PINCTRL_PIN_PA30 PINCTRL_PIN(PA_BASE + 30, "PA30")
|
||||
#define SUNXI_PINCTRL_PIN_PA31 PINCTRL_PIN(PA_BASE + 31, "PA31")
|
||||
|
||||
#define SUNXI_PINCTRL_PIN_PB0 PINCTRL_PIN(PB_BASE + 0, "PB0")
|
||||
#define SUNXI_PINCTRL_PIN_PB1 PINCTRL_PIN(PB_BASE + 1, "PB1")
|
||||
#define SUNXI_PINCTRL_PIN_PB2 PINCTRL_PIN(PB_BASE + 2, "PB2")
|
||||
#define SUNXI_PINCTRL_PIN_PB3 PINCTRL_PIN(PB_BASE + 3, "PB3")
|
||||
#define SUNXI_PINCTRL_PIN_PB4 PINCTRL_PIN(PB_BASE + 4, "PB4")
|
||||
#define SUNXI_PINCTRL_PIN_PB5 PINCTRL_PIN(PB_BASE + 5, "PB5")
|
||||
#define SUNXI_PINCTRL_PIN_PB6 PINCTRL_PIN(PB_BASE + 6, "PB6")
|
||||
#define SUNXI_PINCTRL_PIN_PB7 PINCTRL_PIN(PB_BASE + 7, "PB7")
|
||||
#define SUNXI_PINCTRL_PIN_PB8 PINCTRL_PIN(PB_BASE + 8, "PB8")
|
||||
#define SUNXI_PINCTRL_PIN_PB9 PINCTRL_PIN(PB_BASE + 9, "PB9")
|
||||
#define SUNXI_PINCTRL_PIN_PB10 PINCTRL_PIN(PB_BASE + 10, "PB10")
|
||||
#define SUNXI_PINCTRL_PIN_PB11 PINCTRL_PIN(PB_BASE + 11, "PB11")
|
||||
#define SUNXI_PINCTRL_PIN_PB12 PINCTRL_PIN(PB_BASE + 12, "PB12")
|
||||
#define SUNXI_PINCTRL_PIN_PB13 PINCTRL_PIN(PB_BASE + 13, "PB13")
|
||||
#define SUNXI_PINCTRL_PIN_PB14 PINCTRL_PIN(PB_BASE + 14, "PB14")
|
||||
#define SUNXI_PINCTRL_PIN_PB15 PINCTRL_PIN(PB_BASE + 15, "PB15")
|
||||
#define SUNXI_PINCTRL_PIN_PB16 PINCTRL_PIN(PB_BASE + 16, "PB16")
|
||||
#define SUNXI_PINCTRL_PIN_PB17 PINCTRL_PIN(PB_BASE + 17, "PB17")
|
||||
#define SUNXI_PINCTRL_PIN_PB18 PINCTRL_PIN(PB_BASE + 18, "PB18")
|
||||
#define SUNXI_PINCTRL_PIN_PB19 PINCTRL_PIN(PB_BASE + 19, "PB19")
|
||||
#define SUNXI_PINCTRL_PIN_PB20 PINCTRL_PIN(PB_BASE + 20, "PB20")
|
||||
#define SUNXI_PINCTRL_PIN_PB21 PINCTRL_PIN(PB_BASE + 21, "PB21")
|
||||
#define SUNXI_PINCTRL_PIN_PB22 PINCTRL_PIN(PB_BASE + 22, "PB22")
|
||||
#define SUNXI_PINCTRL_PIN_PB23 PINCTRL_PIN(PB_BASE + 23, "PB23")
|
||||
#define SUNXI_PINCTRL_PIN_PB24 PINCTRL_PIN(PB_BASE + 24, "PB24")
|
||||
#define SUNXI_PINCTRL_PIN_PB25 PINCTRL_PIN(PB_BASE + 25, "PB25")
|
||||
#define SUNXI_PINCTRL_PIN_PB26 PINCTRL_PIN(PB_BASE + 26, "PB26")
|
||||
#define SUNXI_PINCTRL_PIN_PB27 PINCTRL_PIN(PB_BASE + 27, "PB27")
|
||||
#define SUNXI_PINCTRL_PIN_PB28 PINCTRL_PIN(PB_BASE + 28, "PB28")
|
||||
#define SUNXI_PINCTRL_PIN_PB29 PINCTRL_PIN(PB_BASE + 29, "PB29")
|
||||
#define SUNXI_PINCTRL_PIN_PB30 PINCTRL_PIN(PB_BASE + 30, "PB30")
|
||||
#define SUNXI_PINCTRL_PIN_PB31 PINCTRL_PIN(PB_BASE + 31, "PB31")
|
||||
|
||||
#define SUNXI_PINCTRL_PIN_PC0 PINCTRL_PIN(PC_BASE + 0, "PC0")
|
||||
#define SUNXI_PINCTRL_PIN_PC1 PINCTRL_PIN(PC_BASE + 1, "PC1")
|
||||
#define SUNXI_PINCTRL_PIN_PC2 PINCTRL_PIN(PC_BASE + 2, "PC2")
|
||||
#define SUNXI_PINCTRL_PIN_PC3 PINCTRL_PIN(PC_BASE + 3, "PC3")
|
||||
#define SUNXI_PINCTRL_PIN_PC4 PINCTRL_PIN(PC_BASE + 4, "PC4")
|
||||
#define SUNXI_PINCTRL_PIN_PC5 PINCTRL_PIN(PC_BASE + 5, "PC5")
|
||||
#define SUNXI_PINCTRL_PIN_PC6 PINCTRL_PIN(PC_BASE + 6, "PC6")
|
||||
#define SUNXI_PINCTRL_PIN_PC7 PINCTRL_PIN(PC_BASE + 7, "PC7")
|
||||
#define SUNXI_PINCTRL_PIN_PC8 PINCTRL_PIN(PC_BASE + 8, "PC8")
|
||||
#define SUNXI_PINCTRL_PIN_PC9 PINCTRL_PIN(PC_BASE + 9, "PC9")
|
||||
#define SUNXI_PINCTRL_PIN_PC10 PINCTRL_PIN(PC_BASE + 10, "PC10")
|
||||
#define SUNXI_PINCTRL_PIN_PC11 PINCTRL_PIN(PC_BASE + 11, "PC11")
|
||||
#define SUNXI_PINCTRL_PIN_PC12 PINCTRL_PIN(PC_BASE + 12, "PC12")
|
||||
#define SUNXI_PINCTRL_PIN_PC13 PINCTRL_PIN(PC_BASE + 13, "PC13")
|
||||
#define SUNXI_PINCTRL_PIN_PC14 PINCTRL_PIN(PC_BASE + 14, "PC14")
|
||||
#define SUNXI_PINCTRL_PIN_PC15 PINCTRL_PIN(PC_BASE + 15, "PC15")
|
||||
#define SUNXI_PINCTRL_PIN_PC16 PINCTRL_PIN(PC_BASE + 16, "PC16")
|
||||
#define SUNXI_PINCTRL_PIN_PC17 PINCTRL_PIN(PC_BASE + 17, "PC17")
|
||||
#define SUNXI_PINCTRL_PIN_PC18 PINCTRL_PIN(PC_BASE + 18, "PC18")
|
||||
#define SUNXI_PINCTRL_PIN_PC19 PINCTRL_PIN(PC_BASE + 19, "PC19")
|
||||
#define SUNXI_PINCTRL_PIN_PC20 PINCTRL_PIN(PC_BASE + 20, "PC20")
|
||||
#define SUNXI_PINCTRL_PIN_PC21 PINCTRL_PIN(PC_BASE + 21, "PC21")
|
||||
#define SUNXI_PINCTRL_PIN_PC22 PINCTRL_PIN(PC_BASE + 22, "PC22")
|
||||
#define SUNXI_PINCTRL_PIN_PC23 PINCTRL_PIN(PC_BASE + 23, "PC23")
|
||||
#define SUNXI_PINCTRL_PIN_PC24 PINCTRL_PIN(PC_BASE + 24, "PC24")
|
||||
#define SUNXI_PINCTRL_PIN_PC25 PINCTRL_PIN(PC_BASE + 25, "PC25")
|
||||
#define SUNXI_PINCTRL_PIN_PC26 PINCTRL_PIN(PC_BASE + 26, "PC26")
|
||||
#define SUNXI_PINCTRL_PIN_PC27 PINCTRL_PIN(PC_BASE + 27, "PC27")
|
||||
#define SUNXI_PINCTRL_PIN_PC28 PINCTRL_PIN(PC_BASE + 28, "PC28")
|
||||
#define SUNXI_PINCTRL_PIN_PC29 PINCTRL_PIN(PC_BASE + 29, "PC29")
|
||||
#define SUNXI_PINCTRL_PIN_PC30 PINCTRL_PIN(PC_BASE + 30, "PC30")
|
||||
#define SUNXI_PINCTRL_PIN_PC31 PINCTRL_PIN(PC_BASE + 31, "PC31")
|
||||
|
||||
#define SUNXI_PINCTRL_PIN_PD0 PINCTRL_PIN(PD_BASE + 0, "PD0")
|
||||
#define SUNXI_PINCTRL_PIN_PD1 PINCTRL_PIN(PD_BASE + 1, "PD1")
|
||||
#define SUNXI_PINCTRL_PIN_PD2 PINCTRL_PIN(PD_BASE + 2, "PD2")
|
||||
#define SUNXI_PINCTRL_PIN_PD3 PINCTRL_PIN(PD_BASE + 3, "PD3")
|
||||
#define SUNXI_PINCTRL_PIN_PD4 PINCTRL_PIN(PD_BASE + 4, "PD4")
|
||||
#define SUNXI_PINCTRL_PIN_PD5 PINCTRL_PIN(PD_BASE + 5, "PD5")
|
||||
#define SUNXI_PINCTRL_PIN_PD6 PINCTRL_PIN(PD_BASE + 6, "PD6")
|
||||
#define SUNXI_PINCTRL_PIN_PD7 PINCTRL_PIN(PD_BASE + 7, "PD7")
|
||||
#define SUNXI_PINCTRL_PIN_PD8 PINCTRL_PIN(PD_BASE + 8, "PD8")
|
||||
#define SUNXI_PINCTRL_PIN_PD9 PINCTRL_PIN(PD_BASE + 9, "PD9")
|
||||
#define SUNXI_PINCTRL_PIN_PD10 PINCTRL_PIN(PD_BASE + 10, "PD10")
|
||||
#define SUNXI_PINCTRL_PIN_PD11 PINCTRL_PIN(PD_BASE + 11, "PD11")
|
||||
#define SUNXI_PINCTRL_PIN_PD12 PINCTRL_PIN(PD_BASE + 12, "PD12")
|
||||
#define SUNXI_PINCTRL_PIN_PD13 PINCTRL_PIN(PD_BASE + 13, "PD13")
|
||||
#define SUNXI_PINCTRL_PIN_PD14 PINCTRL_PIN(PD_BASE + 14, "PD14")
|
||||
#define SUNXI_PINCTRL_PIN_PD15 PINCTRL_PIN(PD_BASE + 15, "PD15")
|
||||
#define SUNXI_PINCTRL_PIN_PD16 PINCTRL_PIN(PD_BASE + 16, "PD16")
|
||||
#define SUNXI_PINCTRL_PIN_PD17 PINCTRL_PIN(PD_BASE + 17, "PD17")
|
||||
#define SUNXI_PINCTRL_PIN_PD18 PINCTRL_PIN(PD_BASE + 18, "PD18")
|
||||
#define SUNXI_PINCTRL_PIN_PD19 PINCTRL_PIN(PD_BASE + 19, "PD19")
|
||||
#define SUNXI_PINCTRL_PIN_PD20 PINCTRL_PIN(PD_BASE + 20, "PD20")
|
||||
#define SUNXI_PINCTRL_PIN_PD21 PINCTRL_PIN(PD_BASE + 21, "PD21")
|
||||
#define SUNXI_PINCTRL_PIN_PD22 PINCTRL_PIN(PD_BASE + 22, "PD22")
|
||||
#define SUNXI_PINCTRL_PIN_PD23 PINCTRL_PIN(PD_BASE + 23, "PD23")
|
||||
#define SUNXI_PINCTRL_PIN_PD24 PINCTRL_PIN(PD_BASE + 24, "PD24")
|
||||
#define SUNXI_PINCTRL_PIN_PD25 PINCTRL_PIN(PD_BASE + 25, "PD25")
|
||||
#define SUNXI_PINCTRL_PIN_PD26 PINCTRL_PIN(PD_BASE + 26, "PD26")
|
||||
#define SUNXI_PINCTRL_PIN_PD27 PINCTRL_PIN(PD_BASE + 27, "PD27")
|
||||
#define SUNXI_PINCTRL_PIN_PD28 PINCTRL_PIN(PD_BASE + 28, "PD28")
|
||||
#define SUNXI_PINCTRL_PIN_PD29 PINCTRL_PIN(PD_BASE + 29, "PD29")
|
||||
#define SUNXI_PINCTRL_PIN_PD30 PINCTRL_PIN(PD_BASE + 30, "PD30")
|
||||
#define SUNXI_PINCTRL_PIN_PD31 PINCTRL_PIN(PD_BASE + 31, "PD31")
|
||||
|
||||
#define SUNXI_PINCTRL_PIN_PE0 PINCTRL_PIN(PE_BASE + 0, "PE0")
|
||||
#define SUNXI_PINCTRL_PIN_PE1 PINCTRL_PIN(PE_BASE + 1, "PE1")
|
||||
#define SUNXI_PINCTRL_PIN_PE2 PINCTRL_PIN(PE_BASE + 2, "PE2")
|
||||
#define SUNXI_PINCTRL_PIN_PE3 PINCTRL_PIN(PE_BASE + 3, "PE3")
|
||||
#define SUNXI_PINCTRL_PIN_PE4 PINCTRL_PIN(PE_BASE + 4, "PE4")
|
||||
#define SUNXI_PINCTRL_PIN_PE5 PINCTRL_PIN(PE_BASE + 5, "PE5")
|
||||
#define SUNXI_PINCTRL_PIN_PE6 PINCTRL_PIN(PE_BASE + 6, "PE6")
|
||||
#define SUNXI_PINCTRL_PIN_PE7 PINCTRL_PIN(PE_BASE + 7, "PE7")
|
||||
#define SUNXI_PINCTRL_PIN_PE8 PINCTRL_PIN(PE_BASE + 8, "PE8")
|
||||
#define SUNXI_PINCTRL_PIN_PE9 PINCTRL_PIN(PE_BASE + 9, "PE9")
|
||||
#define SUNXI_PINCTRL_PIN_PE10 PINCTRL_PIN(PE_BASE + 10, "PE10")
|
||||
#define SUNXI_PINCTRL_PIN_PE11 PINCTRL_PIN(PE_BASE + 11, "PE11")
|
||||
#define SUNXI_PINCTRL_PIN_PE12 PINCTRL_PIN(PE_BASE + 12, "PE12")
|
||||
#define SUNXI_PINCTRL_PIN_PE13 PINCTRL_PIN(PE_BASE + 13, "PE13")
|
||||
#define SUNXI_PINCTRL_PIN_PE14 PINCTRL_PIN(PE_BASE + 14, "PE14")
|
||||
#define SUNXI_PINCTRL_PIN_PE15 PINCTRL_PIN(PE_BASE + 15, "PE15")
|
||||
#define SUNXI_PINCTRL_PIN_PE16 PINCTRL_PIN(PE_BASE + 16, "PE16")
|
||||
#define SUNXI_PINCTRL_PIN_PE17 PINCTRL_PIN(PE_BASE + 17, "PE17")
|
||||
#define SUNXI_PINCTRL_PIN_PE18 PINCTRL_PIN(PE_BASE + 18, "PE18")
|
||||
#define SUNXI_PINCTRL_PIN_PE19 PINCTRL_PIN(PE_BASE + 19, "PE19")
|
||||
#define SUNXI_PINCTRL_PIN_PE20 PINCTRL_PIN(PE_BASE + 20, "PE20")
|
||||
#define SUNXI_PINCTRL_PIN_PE21 PINCTRL_PIN(PE_BASE + 21, "PE21")
|
||||
#define SUNXI_PINCTRL_PIN_PE22 PINCTRL_PIN(PE_BASE + 22, "PE22")
|
||||
#define SUNXI_PINCTRL_PIN_PE23 PINCTRL_PIN(PE_BASE + 23, "PE23")
|
||||
#define SUNXI_PINCTRL_PIN_PE24 PINCTRL_PIN(PE_BASE + 24, "PE24")
|
||||
#define SUNXI_PINCTRL_PIN_PE25 PINCTRL_PIN(PE_BASE + 25, "PE25")
|
||||
#define SUNXI_PINCTRL_PIN_PE26 PINCTRL_PIN(PE_BASE + 26, "PE26")
|
||||
#define SUNXI_PINCTRL_PIN_PE27 PINCTRL_PIN(PE_BASE + 27, "PE27")
|
||||
#define SUNXI_PINCTRL_PIN_PE28 PINCTRL_PIN(PE_BASE + 28, "PE28")
|
||||
#define SUNXI_PINCTRL_PIN_PE29 PINCTRL_PIN(PE_BASE + 29, "PE29")
|
||||
#define SUNXI_PINCTRL_PIN_PE30 PINCTRL_PIN(PE_BASE + 30, "PE30")
|
||||
#define SUNXI_PINCTRL_PIN_PE31 PINCTRL_PIN(PE_BASE + 31, "PE31")
|
||||
|
||||
#define SUNXI_PINCTRL_PIN_PF0 PINCTRL_PIN(PF_BASE + 0, "PF0")
|
||||
#define SUNXI_PINCTRL_PIN_PF1 PINCTRL_PIN(PF_BASE + 1, "PF1")
|
||||
#define SUNXI_PINCTRL_PIN_PF2 PINCTRL_PIN(PF_BASE + 2, "PF2")
|
||||
#define SUNXI_PINCTRL_PIN_PF3 PINCTRL_PIN(PF_BASE + 3, "PF3")
|
||||
#define SUNXI_PINCTRL_PIN_PF4 PINCTRL_PIN(PF_BASE + 4, "PF4")
|
||||
#define SUNXI_PINCTRL_PIN_PF5 PINCTRL_PIN(PF_BASE + 5, "PF5")
|
||||
#define SUNXI_PINCTRL_PIN_PF6 PINCTRL_PIN(PF_BASE + 6, "PF6")
|
||||
#define SUNXI_PINCTRL_PIN_PF7 PINCTRL_PIN(PF_BASE + 7, "PF7")
|
||||
#define SUNXI_PINCTRL_PIN_PF8 PINCTRL_PIN(PF_BASE + 8, "PF8")
|
||||
#define SUNXI_PINCTRL_PIN_PF9 PINCTRL_PIN(PF_BASE + 9, "PF9")
|
||||
#define SUNXI_PINCTRL_PIN_PF10 PINCTRL_PIN(PF_BASE + 10, "PF10")
|
||||
#define SUNXI_PINCTRL_PIN_PF11 PINCTRL_PIN(PF_BASE + 11, "PF11")
|
||||
#define SUNXI_PINCTRL_PIN_PF12 PINCTRL_PIN(PF_BASE + 12, "PF12")
|
||||
#define SUNXI_PINCTRL_PIN_PF13 PINCTRL_PIN(PF_BASE + 13, "PF13")
|
||||
#define SUNXI_PINCTRL_PIN_PF14 PINCTRL_PIN(PF_BASE + 14, "PF14")
|
||||
#define SUNXI_PINCTRL_PIN_PF15 PINCTRL_PIN(PF_BASE + 15, "PF15")
|
||||
#define SUNXI_PINCTRL_PIN_PF16 PINCTRL_PIN(PF_BASE + 16, "PF16")
|
||||
#define SUNXI_PINCTRL_PIN_PF17 PINCTRL_PIN(PF_BASE + 17, "PF17")
|
||||
#define SUNXI_PINCTRL_PIN_PF18 PINCTRL_PIN(PF_BASE + 18, "PF18")
|
||||
#define SUNXI_PINCTRL_PIN_PF19 PINCTRL_PIN(PF_BASE + 19, "PF19")
|
||||
#define SUNXI_PINCTRL_PIN_PF20 PINCTRL_PIN(PF_BASE + 20, "PF20")
|
||||
#define SUNXI_PINCTRL_PIN_PF21 PINCTRL_PIN(PF_BASE + 21, "PF21")
|
||||
#define SUNXI_PINCTRL_PIN_PF22 PINCTRL_PIN(PF_BASE + 22, "PF22")
|
||||
#define SUNXI_PINCTRL_PIN_PF23 PINCTRL_PIN(PF_BASE + 23, "PF23")
|
||||
#define SUNXI_PINCTRL_PIN_PF24 PINCTRL_PIN(PF_BASE + 24, "PF24")
|
||||
#define SUNXI_PINCTRL_PIN_PF25 PINCTRL_PIN(PF_BASE + 25, "PF25")
|
||||
#define SUNXI_PINCTRL_PIN_PF26 PINCTRL_PIN(PF_BASE + 26, "PF26")
|
||||
#define SUNXI_PINCTRL_PIN_PF27 PINCTRL_PIN(PF_BASE + 27, "PF27")
|
||||
#define SUNXI_PINCTRL_PIN_PF28 PINCTRL_PIN(PF_BASE + 28, "PF28")
|
||||
#define SUNXI_PINCTRL_PIN_PF29 PINCTRL_PIN(PF_BASE + 29, "PF29")
|
||||
#define SUNXI_PINCTRL_PIN_PF30 PINCTRL_PIN(PF_BASE + 30, "PF30")
|
||||
#define SUNXI_PINCTRL_PIN_PF31 PINCTRL_PIN(PF_BASE + 31, "PF31")
|
||||
|
||||
#define SUNXI_PINCTRL_PIN_PG0 PINCTRL_PIN(PG_BASE + 0, "PG0")
|
||||
#define SUNXI_PINCTRL_PIN_PG1 PINCTRL_PIN(PG_BASE + 1, "PG1")
|
||||
#define SUNXI_PINCTRL_PIN_PG2 PINCTRL_PIN(PG_BASE + 2, "PG2")
|
||||
#define SUNXI_PINCTRL_PIN_PG3 PINCTRL_PIN(PG_BASE + 3, "PG3")
|
||||
#define SUNXI_PINCTRL_PIN_PG4 PINCTRL_PIN(PG_BASE + 4, "PG4")
|
||||
#define SUNXI_PINCTRL_PIN_PG5 PINCTRL_PIN(PG_BASE + 5, "PG5")
|
||||
#define SUNXI_PINCTRL_PIN_PG6 PINCTRL_PIN(PG_BASE + 6, "PG6")
|
||||
#define SUNXI_PINCTRL_PIN_PG7 PINCTRL_PIN(PG_BASE + 7, "PG7")
|
||||
#define SUNXI_PINCTRL_PIN_PG8 PINCTRL_PIN(PG_BASE + 8, "PG8")
|
||||
#define SUNXI_PINCTRL_PIN_PG9 PINCTRL_PIN(PG_BASE + 9, "PG9")
|
||||
#define SUNXI_PINCTRL_PIN_PG10 PINCTRL_PIN(PG_BASE + 10, "PG10")
|
||||
#define SUNXI_PINCTRL_PIN_PG11 PINCTRL_PIN(PG_BASE + 11, "PG11")
|
||||
#define SUNXI_PINCTRL_PIN_PG12 PINCTRL_PIN(PG_BASE + 12, "PG12")
|
||||
#define SUNXI_PINCTRL_PIN_PG13 PINCTRL_PIN(PG_BASE + 13, "PG13")
|
||||
#define SUNXI_PINCTRL_PIN_PG14 PINCTRL_PIN(PG_BASE + 14, "PG14")
|
||||
#define SUNXI_PINCTRL_PIN_PG15 PINCTRL_PIN(PG_BASE + 15, "PG15")
|
||||
#define SUNXI_PINCTRL_PIN_PG16 PINCTRL_PIN(PG_BASE + 16, "PG16")
|
||||
#define SUNXI_PINCTRL_PIN_PG17 PINCTRL_PIN(PG_BASE + 17, "PG17")
|
||||
#define SUNXI_PINCTRL_PIN_PG18 PINCTRL_PIN(PG_BASE + 18, "PG18")
|
||||
#define SUNXI_PINCTRL_PIN_PG19 PINCTRL_PIN(PG_BASE + 19, "PG19")
|
||||
#define SUNXI_PINCTRL_PIN_PG20 PINCTRL_PIN(PG_BASE + 20, "PG20")
|
||||
#define SUNXI_PINCTRL_PIN_PG21 PINCTRL_PIN(PG_BASE + 21, "PG21")
|
||||
#define SUNXI_PINCTRL_PIN_PG22 PINCTRL_PIN(PG_BASE + 22, "PG22")
|
||||
#define SUNXI_PINCTRL_PIN_PG23 PINCTRL_PIN(PG_BASE + 23, "PG23")
|
||||
#define SUNXI_PINCTRL_PIN_PG24 PINCTRL_PIN(PG_BASE + 24, "PG24")
|
||||
#define SUNXI_PINCTRL_PIN_PG25 PINCTRL_PIN(PG_BASE + 25, "PG25")
|
||||
#define SUNXI_PINCTRL_PIN_PG26 PINCTRL_PIN(PG_BASE + 26, "PG26")
|
||||
#define SUNXI_PINCTRL_PIN_PG27 PINCTRL_PIN(PG_BASE + 27, "PG27")
|
||||
#define SUNXI_PINCTRL_PIN_PG28 PINCTRL_PIN(PG_BASE + 28, "PG28")
|
||||
#define SUNXI_PINCTRL_PIN_PG29 PINCTRL_PIN(PG_BASE + 29, "PG29")
|
||||
#define SUNXI_PINCTRL_PIN_PG30 PINCTRL_PIN(PG_BASE + 30, "PG30")
|
||||
#define SUNXI_PINCTRL_PIN_PG31 PINCTRL_PIN(PG_BASE + 31, "PG31")
|
||||
|
||||
#define SUNXI_PINCTRL_PIN_PH0 PINCTRL_PIN(PH_BASE + 0, "PH0")
|
||||
#define SUNXI_PINCTRL_PIN_PH1 PINCTRL_PIN(PH_BASE + 1, "PH1")
|
||||
#define SUNXI_PINCTRL_PIN_PH2 PINCTRL_PIN(PH_BASE + 2, "PH2")
|
||||
#define SUNXI_PINCTRL_PIN_PH3 PINCTRL_PIN(PH_BASE + 3, "PH3")
|
||||
#define SUNXI_PINCTRL_PIN_PH4 PINCTRL_PIN(PH_BASE + 4, "PH4")
|
||||
#define SUNXI_PINCTRL_PIN_PH5 PINCTRL_PIN(PH_BASE + 5, "PH5")
|
||||
#define SUNXI_PINCTRL_PIN_PH6 PINCTRL_PIN(PH_BASE + 6, "PH6")
|
||||
#define SUNXI_PINCTRL_PIN_PH7 PINCTRL_PIN(PH_BASE + 7, "PH7")
|
||||
#define SUNXI_PINCTRL_PIN_PH8 PINCTRL_PIN(PH_BASE + 8, "PH8")
|
||||
#define SUNXI_PINCTRL_PIN_PH9 PINCTRL_PIN(PH_BASE + 9, "PH9")
|
||||
#define SUNXI_PINCTRL_PIN_PH10 PINCTRL_PIN(PH_BASE + 10, "PH10")
|
||||
#define SUNXI_PINCTRL_PIN_PH11 PINCTRL_PIN(PH_BASE + 11, "PH11")
|
||||
#define SUNXI_PINCTRL_PIN_PH12 PINCTRL_PIN(PH_BASE + 12, "PH12")
|
||||
#define SUNXI_PINCTRL_PIN_PH13 PINCTRL_PIN(PH_BASE + 13, "PH13")
|
||||
#define SUNXI_PINCTRL_PIN_PH14 PINCTRL_PIN(PH_BASE + 14, "PH14")
|
||||
#define SUNXI_PINCTRL_PIN_PH15 PINCTRL_PIN(PH_BASE + 15, "PH15")
|
||||
#define SUNXI_PINCTRL_PIN_PH16 PINCTRL_PIN(PH_BASE + 16, "PH16")
|
||||
#define SUNXI_PINCTRL_PIN_PH17 PINCTRL_PIN(PH_BASE + 17, "PH17")
|
||||
#define SUNXI_PINCTRL_PIN_PH18 PINCTRL_PIN(PH_BASE + 18, "PH18")
|
||||
#define SUNXI_PINCTRL_PIN_PH19 PINCTRL_PIN(PH_BASE + 19, "PH19")
|
||||
#define SUNXI_PINCTRL_PIN_PH20 PINCTRL_PIN(PH_BASE + 20, "PH20")
|
||||
#define SUNXI_PINCTRL_PIN_PH21 PINCTRL_PIN(PH_BASE + 21, "PH21")
|
||||
#define SUNXI_PINCTRL_PIN_PH22 PINCTRL_PIN(PH_BASE + 22, "PH22")
|
||||
#define SUNXI_PINCTRL_PIN_PH23 PINCTRL_PIN(PH_BASE + 23, "PH23")
|
||||
#define SUNXI_PINCTRL_PIN_PH24 PINCTRL_PIN(PH_BASE + 24, "PH24")
|
||||
#define SUNXI_PINCTRL_PIN_PH25 PINCTRL_PIN(PH_BASE + 25, "PH25")
|
||||
#define SUNXI_PINCTRL_PIN_PH26 PINCTRL_PIN(PH_BASE + 26, "PH26")
|
||||
#define SUNXI_PINCTRL_PIN_PH27 PINCTRL_PIN(PH_BASE + 27, "PH27")
|
||||
#define SUNXI_PINCTRL_PIN_PH28 PINCTRL_PIN(PH_BASE + 28, "PH28")
|
||||
#define SUNXI_PINCTRL_PIN_PH29 PINCTRL_PIN(PH_BASE + 29, "PH29")
|
||||
#define SUNXI_PINCTRL_PIN_PH30 PINCTRL_PIN(PH_BASE + 30, "PH30")
|
||||
#define SUNXI_PINCTRL_PIN_PH31 PINCTRL_PIN(PH_BASE + 31, "PH31")
|
||||
|
||||
#define SUNXI_PINCTRL_PIN_PI0 PINCTRL_PIN(PI_BASE + 0, "PI0")
|
||||
#define SUNXI_PINCTRL_PIN_PI1 PINCTRL_PIN(PI_BASE + 1, "PI1")
|
||||
#define SUNXI_PINCTRL_PIN_PI2 PINCTRL_PIN(PI_BASE + 2, "PI2")
|
||||
#define SUNXI_PINCTRL_PIN_PI3 PINCTRL_PIN(PI_BASE + 3, "PI3")
|
||||
#define SUNXI_PINCTRL_PIN_PI4 PINCTRL_PIN(PI_BASE + 4, "PI4")
|
||||
#define SUNXI_PINCTRL_PIN_PI5 PINCTRL_PIN(PI_BASE + 5, "PI5")
|
||||
#define SUNXI_PINCTRL_PIN_PI6 PINCTRL_PIN(PI_BASE + 6, "PI6")
|
||||
#define SUNXI_PINCTRL_PIN_PI7 PINCTRL_PIN(PI_BASE + 7, "PI7")
|
||||
#define SUNXI_PINCTRL_PIN_PI8 PINCTRL_PIN(PI_BASE + 8, "PI8")
|
||||
#define SUNXI_PINCTRL_PIN_PI9 PINCTRL_PIN(PI_BASE + 9, "PI9")
|
||||
#define SUNXI_PINCTRL_PIN_PI10 PINCTRL_PIN(PI_BASE + 10, "PI10")
|
||||
#define SUNXI_PINCTRL_PIN_PI11 PINCTRL_PIN(PI_BASE + 11, "PI11")
|
||||
#define SUNXI_PINCTRL_PIN_PI12 PINCTRL_PIN(PI_BASE + 12, "PI12")
|
||||
#define SUNXI_PINCTRL_PIN_PI13 PINCTRL_PIN(PI_BASE + 13, "PI13")
|
||||
#define SUNXI_PINCTRL_PIN_PI14 PINCTRL_PIN(PI_BASE + 14, "PI14")
|
||||
#define SUNXI_PINCTRL_PIN_PI15 PINCTRL_PIN(PI_BASE + 15, "PI15")
|
||||
#define SUNXI_PINCTRL_PIN_PI16 PINCTRL_PIN(PI_BASE + 16, "PI16")
|
||||
#define SUNXI_PINCTRL_PIN_PI17 PINCTRL_PIN(PI_BASE + 17, "PI17")
|
||||
#define SUNXI_PINCTRL_PIN_PI18 PINCTRL_PIN(PI_BASE + 18, "PI18")
|
||||
#define SUNXI_PINCTRL_PIN_PI19 PINCTRL_PIN(PI_BASE + 19, "PI19")
|
||||
#define SUNXI_PINCTRL_PIN_PI20 PINCTRL_PIN(PI_BASE + 20, "PI20")
|
||||
#define SUNXI_PINCTRL_PIN_PI21 PINCTRL_PIN(PI_BASE + 21, "PI21")
|
||||
#define SUNXI_PINCTRL_PIN_PI22 PINCTRL_PIN(PI_BASE + 22, "PI22")
|
||||
#define SUNXI_PINCTRL_PIN_PI23 PINCTRL_PIN(PI_BASE + 23, "PI23")
|
||||
#define SUNXI_PINCTRL_PIN_PI24 PINCTRL_PIN(PI_BASE + 24, "PI24")
|
||||
#define SUNXI_PINCTRL_PIN_PI25 PINCTRL_PIN(PI_BASE + 25, "PI25")
|
||||
#define SUNXI_PINCTRL_PIN_PI26 PINCTRL_PIN(PI_BASE + 26, "PI26")
|
||||
#define SUNXI_PINCTRL_PIN_PI27 PINCTRL_PIN(PI_BASE + 27, "PI27")
|
||||
#define SUNXI_PINCTRL_PIN_PI28 PINCTRL_PIN(PI_BASE + 28, "PI28")
|
||||
#define SUNXI_PINCTRL_PIN_PI29 PINCTRL_PIN(PI_BASE + 29, "PI29")
|
||||
#define SUNXI_PINCTRL_PIN_PI30 PINCTRL_PIN(PI_BASE + 30, "PI30")
|
||||
#define SUNXI_PINCTRL_PIN_PI31 PINCTRL_PIN(PI_BASE + 31, "PI31")
|
||||
|
||||
#define SUNXI_PIN_NAME_MAX_LEN 5
|
||||
|
||||
#define BANK_MEM_SIZE 0x24
|
||||
#define MUX_REGS_OFFSET 0x0
|
||||
#define DATA_REGS_OFFSET 0x10
|
||||
#define DLEVEL_REGS_OFFSET 0x14
|
||||
#define PULL_REGS_OFFSET 0x1c
|
||||
|
||||
#define PINS_PER_BANK 32
|
||||
#define MUX_PINS_PER_REG 8
|
||||
#define MUX_PINS_BITS 4
|
||||
#define MUX_PINS_MASK 0x0f
|
||||
#define DATA_PINS_PER_REG 32
|
||||
#define DATA_PINS_BITS 1
|
||||
#define DATA_PINS_MASK 0x01
|
||||
#define DLEVEL_PINS_PER_REG 16
|
||||
#define DLEVEL_PINS_BITS 2
|
||||
#define DLEVEL_PINS_MASK 0x03
|
||||
#define PULL_PINS_PER_REG 16
|
||||
#define PULL_PINS_BITS 2
|
||||
#define PULL_PINS_MASK 0x03
|
||||
|
||||
#define SUNXI_IRQ_NUMBER 32
|
||||
|
||||
#define IRQ_CFG_REG 0x200
|
||||
#define IRQ_CFG_IRQ_PER_REG 8
|
||||
#define IRQ_CFG_IRQ_BITS 4
|
||||
#define IRQ_CFG_IRQ_MASK ((1 << IRQ_CFG_IRQ_BITS) - 1)
|
||||
#define IRQ_CTRL_REG 0x210
|
||||
#define IRQ_CTRL_IRQ_PER_REG 32
|
||||
#define IRQ_CTRL_IRQ_BITS 1
|
||||
#define IRQ_CTRL_IRQ_MASK ((1 << IRQ_CTRL_IRQ_BITS) - 1)
|
||||
#define IRQ_STATUS_REG 0x214
|
||||
#define IRQ_STATUS_IRQ_PER_REG 32
|
||||
#define IRQ_STATUS_IRQ_BITS 1
|
||||
#define IRQ_STATUS_IRQ_MASK ((1 << IRQ_STATUS_IRQ_BITS) - 1)
|
||||
|
||||
#define IRQ_EDGE_RISING 0x00
|
||||
#define IRQ_EDGE_FALLING 0x01
|
||||
#define IRQ_LEVEL_HIGH 0x02
|
||||
#define IRQ_LEVEL_LOW 0x03
|
||||
#define IRQ_EDGE_BOTH 0x04
|
||||
|
||||
struct sunxi_desc_function {
|
||||
const char *name;
|
||||
u8 muxval;
|
||||
u8 irqnum;
|
||||
};
|
||||
|
||||
struct sunxi_desc_pin {
|
||||
struct pinctrl_pin_desc pin;
|
||||
struct sunxi_desc_function *functions;
|
||||
};
|
||||
|
||||
struct sunxi_pinctrl_desc {
|
||||
const struct sunxi_desc_pin *pins;
|
||||
int npins;
|
||||
struct pinctrl_gpio_range *ranges;
|
||||
int nranges;
|
||||
};
|
||||
|
||||
struct sunxi_pinctrl_function {
|
||||
const char *name;
|
||||
const char **groups;
|
||||
unsigned ngroups;
|
||||
};
|
||||
|
||||
struct sunxi_pinctrl_group {
|
||||
const char *name;
|
||||
unsigned long config;
|
||||
unsigned pin;
|
||||
};
|
||||
|
||||
struct sunxi_pinctrl {
|
||||
void __iomem *membase;
|
||||
struct gpio_chip *chip;
|
||||
struct sunxi_pinctrl_desc *desc;
|
||||
struct device *dev;
|
||||
struct irq_domain *domain;
|
||||
struct sunxi_pinctrl_function *functions;
|
||||
unsigned nfunctions;
|
||||
struct sunxi_pinctrl_group *groups;
|
||||
unsigned ngroups;
|
||||
int irq;
|
||||
int irq_array[SUNXI_IRQ_NUMBER];
|
||||
spinlock_t lock;
|
||||
struct pinctrl_dev *pctl_dev;
|
||||
};
|
||||
|
||||
#define SUNXI_PIN(_pin, ...) \
|
||||
{ \
|
||||
.pin = _pin, \
|
||||
.functions = (struct sunxi_desc_function[]){ \
|
||||
__VA_ARGS__, { } }, \
|
||||
}
|
||||
|
||||
#define SUNXI_FUNCTION(_val, _name) \
|
||||
{ \
|
||||
.name = _name, \
|
||||
.muxval = _val, \
|
||||
}
|
||||
|
||||
#define SUNXI_FUNCTION_IRQ(_val, _irq) \
|
||||
{ \
|
||||
.name = "irq", \
|
||||
.muxval = _val, \
|
||||
.irqnum = _irq, \
|
||||
}
|
||||
|
||||
/*
|
||||
* The sunXi PIO registers are organized as is:
|
||||
* 0x00 - 0x0c Muxing values.
|
||||
* 8 pins per register, each pin having a 4bits value
|
||||
* 0x10 Pin values
|
||||
* 32 bits per register, each pin corresponding to one bit
|
||||
* 0x14 - 0x18 Drive level
|
||||
* 16 pins per register, each pin having a 2bits value
|
||||
* 0x1c - 0x20 Pull-Up values
|
||||
* 16 pins per register, each pin having a 2bits value
|
||||
*
|
||||
* This is for the first bank. Each bank will have the same layout,
|
||||
* with an offset being a multiple of 0x24.
|
||||
*
|
||||
* The following functions calculate from the pin number the register
|
||||
* and the bit offset that we should access.
|
||||
*/
|
||||
static inline u32 sunxi_mux_reg(u16 pin)
|
||||
{
|
||||
u8 bank = pin / PINS_PER_BANK;
|
||||
u32 offset = bank * BANK_MEM_SIZE;
|
||||
offset += MUX_REGS_OFFSET;
|
||||
offset += pin % PINS_PER_BANK / MUX_PINS_PER_REG * 0x04;
|
||||
return round_down(offset, 4);
|
||||
}
|
||||
|
||||
static inline u32 sunxi_mux_offset(u16 pin)
|
||||
{
|
||||
u32 pin_num = pin % MUX_PINS_PER_REG;
|
||||
return pin_num * MUX_PINS_BITS;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_data_reg(u16 pin)
|
||||
{
|
||||
u8 bank = pin / PINS_PER_BANK;
|
||||
u32 offset = bank * BANK_MEM_SIZE;
|
||||
offset += DATA_REGS_OFFSET;
|
||||
offset += pin % PINS_PER_BANK / DATA_PINS_PER_REG * 0x04;
|
||||
return round_down(offset, 4);
|
||||
}
|
||||
|
||||
static inline u32 sunxi_data_offset(u16 pin)
|
||||
{
|
||||
u32 pin_num = pin % DATA_PINS_PER_REG;
|
||||
return pin_num * DATA_PINS_BITS;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_dlevel_reg(u16 pin)
|
||||
{
|
||||
u8 bank = pin / PINS_PER_BANK;
|
||||
u32 offset = bank * BANK_MEM_SIZE;
|
||||
offset += DLEVEL_REGS_OFFSET;
|
||||
offset += pin % PINS_PER_BANK / DLEVEL_PINS_PER_REG * 0x04;
|
||||
return round_down(offset, 4);
|
||||
}
|
||||
|
||||
static inline u32 sunxi_dlevel_offset(u16 pin)
|
||||
{
|
||||
u32 pin_num = pin % DLEVEL_PINS_PER_REG;
|
||||
return pin_num * DLEVEL_PINS_BITS;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_pull_reg(u16 pin)
|
||||
{
|
||||
u8 bank = pin / PINS_PER_BANK;
|
||||
u32 offset = bank * BANK_MEM_SIZE;
|
||||
offset += PULL_REGS_OFFSET;
|
||||
offset += pin % PINS_PER_BANK / PULL_PINS_PER_REG * 0x04;
|
||||
return round_down(offset, 4);
|
||||
}
|
||||
|
||||
static inline u32 sunxi_pull_offset(u16 pin)
|
||||
{
|
||||
u32 pin_num = pin % PULL_PINS_PER_REG;
|
||||
return pin_num * PULL_PINS_BITS;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_irq_cfg_reg(u16 irq)
|
||||
{
|
||||
u8 reg = irq / IRQ_CFG_IRQ_PER_REG * 0x04;
|
||||
return reg + IRQ_CFG_REG;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_irq_cfg_offset(u16 irq)
|
||||
{
|
||||
u32 irq_num = irq % IRQ_CFG_IRQ_PER_REG;
|
||||
return irq_num * IRQ_CFG_IRQ_BITS;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_irq_ctrl_reg(u16 irq)
|
||||
{
|
||||
u8 reg = irq / IRQ_CTRL_IRQ_PER_REG * 0x04;
|
||||
return reg + IRQ_CTRL_REG;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_irq_ctrl_offset(u16 irq)
|
||||
{
|
||||
u32 irq_num = irq % IRQ_CTRL_IRQ_PER_REG;
|
||||
return irq_num * IRQ_CTRL_IRQ_BITS;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_irq_status_reg(u16 irq)
|
||||
{
|
||||
u8 reg = irq / IRQ_STATUS_IRQ_PER_REG * 0x04;
|
||||
return reg + IRQ_STATUS_REG;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_irq_status_offset(u16 irq)
|
||||
{
|
||||
u32 irq_num = irq % IRQ_STATUS_IRQ_PER_REG;
|
||||
return irq_num * IRQ_STATUS_IRQ_BITS;
|
||||
}
|
||||
|
||||
#endif /* __PINCTRL_SUNXI_H */
|
|
@ -295,17 +295,11 @@ static void tegra_pinctrl_disable(struct pinctrl_dev *pctldev,
|
|||
{
|
||||
struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
|
||||
const struct tegra_pingroup *g;
|
||||
u32 val;
|
||||
|
||||
g = &pmx->soc->groups[group];
|
||||
|
||||
if (WARN_ON(g->mux_reg < 0))
|
||||
return;
|
||||
|
||||
val = pmx_readl(pmx, g->mux_bank, g->mux_reg);
|
||||
val &= ~(0x3 << g->mux_bit);
|
||||
val |= g->func_safe << g->mux_bit;
|
||||
pmx_writel(pmx, val, g->mux_bank, g->mux_reg);
|
||||
}
|
||||
|
||||
static const struct pinmux_ops tegra_pinmux_ops = {
|
||||
|
@ -336,32 +330,32 @@ static int tegra_pinconf_reg(struct tegra_pmx *pmx,
|
|||
*width = 1;
|
||||
break;
|
||||
case TEGRA_PINCONF_PARAM_ENABLE_INPUT:
|
||||
*bank = g->einput_bank;
|
||||
*reg = g->einput_reg;
|
||||
*bank = g->mux_bank;
|
||||
*reg = g->mux_reg;
|
||||
*bit = g->einput_bit;
|
||||
*width = 1;
|
||||
break;
|
||||
case TEGRA_PINCONF_PARAM_OPEN_DRAIN:
|
||||
*bank = g->odrain_bank;
|
||||
*reg = g->odrain_reg;
|
||||
*bank = g->mux_bank;
|
||||
*reg = g->mux_reg;
|
||||
*bit = g->odrain_bit;
|
||||
*width = 1;
|
||||
break;
|
||||
case TEGRA_PINCONF_PARAM_LOCK:
|
||||
*bank = g->lock_bank;
|
||||
*reg = g->lock_reg;
|
||||
*bank = g->mux_bank;
|
||||
*reg = g->mux_reg;
|
||||
*bit = g->lock_bit;
|
||||
*width = 1;
|
||||
break;
|
||||
case TEGRA_PINCONF_PARAM_IORESET:
|
||||
*bank = g->ioreset_bank;
|
||||
*reg = g->ioreset_reg;
|
||||
*bank = g->mux_bank;
|
||||
*reg = g->mux_reg;
|
||||
*bit = g->ioreset_bit;
|
||||
*width = 1;
|
||||
break;
|
||||
case TEGRA_PINCONF_PARAM_RCV_SEL:
|
||||
*bank = g->rcv_sel_bank;
|
||||
*reg = g->rcv_sel_reg;
|
||||
*bank = g->mux_bank;
|
||||
*reg = g->mux_reg;
|
||||
*bit = g->rcv_sel_bit;
|
||||
*width = 1;
|
||||
break;
|
||||
|
@ -408,8 +402,8 @@ static int tegra_pinconf_reg(struct tegra_pmx *pmx,
|
|||
*width = g->slwr_width;
|
||||
break;
|
||||
case TEGRA_PINCONF_PARAM_DRIVE_TYPE:
|
||||
*bank = g->drvtype_bank;
|
||||
*reg = g->drvtype_reg;
|
||||
*bank = g->drv_bank;
|
||||
*reg = g->drv_reg;
|
||||
*bit = g->drvtype_bit;
|
||||
*width = 2;
|
||||
break;
|
||||
|
@ -418,11 +412,22 @@ static int tegra_pinconf_reg(struct tegra_pmx *pmx,
|
|||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
if (*reg < 0) {
|
||||
if (report_err)
|
||||
if (*reg < 0 || *bit > 31) {
|
||||
if (report_err) {
|
||||
const char *prop = "unknown";
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(cfg_params); i++) {
|
||||
if (cfg_params[i].param == param) {
|
||||
prop = cfg_params[i].property;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
dev_err(pmx->dev,
|
||||
"Config param %04x not supported on group %s\n",
|
||||
param, g->name);
|
||||
"Config param %04x (%s) not supported on group %s\n",
|
||||
param, prop, g->name);
|
||||
}
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,98 +78,83 @@ struct tegra_function {
|
|||
|
||||
/**
|
||||
* struct tegra_pingroup - Tegra pin group
|
||||
* @mux_reg: Mux register offset. -1 if unsupported.
|
||||
* @mux_bank: Mux register bank. 0 if unsupported.
|
||||
* @mux_bit: Mux register bit. 0 if unsupported.
|
||||
* @pupd_reg: Pull-up/down register offset. -1 if unsupported.
|
||||
* @pupd_bank: Pull-up/down register bank. 0 if unsupported.
|
||||
* @pupd_bit: Pull-up/down register bit. 0 if unsupported.
|
||||
* @tri_reg: Tri-state register offset. -1 if unsupported.
|
||||
* @tri_bank: Tri-state register bank. 0 if unsupported.
|
||||
* @tri_bit: Tri-state register bit. 0 if unsupported.
|
||||
* @einput_reg: Enable-input register offset. -1 if unsupported.
|
||||
* @einput_bank: Enable-input register bank. 0 if unsupported.
|
||||
* @einput_bit: Enable-input register bit. 0 if unsupported.
|
||||
* @odrain_reg: Open-drain register offset. -1 if unsupported.
|
||||
* @odrain_bank: Open-drain register bank. 0 if unsupported.
|
||||
* @odrain_bit: Open-drain register bit. 0 if unsupported.
|
||||
* @lock_reg: Lock register offset. -1 if unsupported.
|
||||
* @lock_bank: Lock register bank. 0 if unsupported.
|
||||
* @lock_bit: Lock register bit. 0 if unsupported.
|
||||
* @ioreset_reg: IO reset register offset. -1 if unsupported.
|
||||
* @ioreset_bank: IO reset register bank. 0 if unsupported.
|
||||
* @ioreset_bit: IO reset register bit. 0 if unsupported.
|
||||
* @rcv_sel_reg: Receiver select offset. -1 if unsupported.
|
||||
* @rcv_sel_bank: Receiver select bank. 0 if unsupported.
|
||||
* @rcv_sel_bit: Receiver select bit. 0 if unsupported.
|
||||
* @drv_reg: Drive fields register offset. -1 if unsupported.
|
||||
* This register contains the hsm, schmitt, lpmd, drvdn,
|
||||
* drvup, slwr, and slwf parameters.
|
||||
* @drv_bank: Drive fields register bank. 0 if unsupported.
|
||||
* @hsm_bit: High Speed Mode register bit. 0 if unsupported.
|
||||
* @schmitt_bit: Scmitt register bit. 0 if unsupported.
|
||||
* @lpmd_bit: Low Power Mode register bit. 0 if unsupported.
|
||||
* @drvdn_bit: Drive Down register bit. 0 if unsupported.
|
||||
* @drvdn_width: Drive Down field width. 0 if unsupported.
|
||||
* @drvup_bit: Drive Up register bit. 0 if unsupported.
|
||||
* @drvup_width: Drive Up field width. 0 if unsupported.
|
||||
* @slwr_bit: Slew Rising register bit. 0 if unsupported.
|
||||
* @slwr_width: Slew Rising field width. 0 if unsupported.
|
||||
* @slwf_bit: Slew Falling register bit. 0 if unsupported.
|
||||
* @slwf_width: Slew Falling field width. 0 if unsupported.
|
||||
* @drvtype_reg: Drive type fields register offset. -1 if unsupported.
|
||||
* @drvtype_bank: Drive type fields register bank. 0 if unsupported.
|
||||
* @drvtype_bit: Drive type register bit. 0 if unsupported.
|
||||
* @name The name of the pin group.
|
||||
* @pins An array of pin IDs included in this pin group.
|
||||
* @npins The number of entries in @pins.
|
||||
* @funcs The mux functions which can be muxed onto this group.
|
||||
* @mux_reg: Mux register offset.
|
||||
* This register contains the mux, einput, odrain, lock,
|
||||
* ioreset, rcv_sel parameters.
|
||||
* @mux_bank: Mux register bank.
|
||||
* @mux_bit: Mux register bit.
|
||||
* @pupd_reg: Pull-up/down register offset.
|
||||
* @pupd_bank: Pull-up/down register bank.
|
||||
* @pupd_bit: Pull-up/down register bit.
|
||||
* @tri_reg: Tri-state register offset.
|
||||
* @tri_bank: Tri-state register bank.
|
||||
* @tri_bit: Tri-state register bit.
|
||||
* @einput_bit: Enable-input register bit.
|
||||
* @odrain_bit: Open-drain register bit.
|
||||
* @lock_bit: Lock register bit.
|
||||
* @ioreset_bit: IO reset register bit.
|
||||
* @rcv_sel_bit: Receiver select bit.
|
||||
* @drv_reg: Drive fields register offset.
|
||||
* This register contains hsm, schmitt, lpmd, drvdn,
|
||||
* drvup, slwr, slwf, and drvtype parameters.
|
||||
* @drv_bank: Drive fields register bank.
|
||||
* @hsm_bit: High Speed Mode register bit.
|
||||
* @schmitt_bit: Scmitt register bit.
|
||||
* @lpmd_bit: Low Power Mode register bit.
|
||||
* @drvdn_bit: Drive Down register bit.
|
||||
* @drvdn_width: Drive Down field width.
|
||||
* @drvup_bit: Drive Up register bit.
|
||||
* @drvup_width: Drive Up field width.
|
||||
* @slwr_bit: Slew Rising register bit.
|
||||
* @slwr_width: Slew Rising field width.
|
||||
* @slwf_bit: Slew Falling register bit.
|
||||
* @slwf_width: Slew Falling field width.
|
||||
* @drvtype_bit: Drive type register bit.
|
||||
*
|
||||
* -1 in a *_reg field means that feature is unsupported for this group.
|
||||
* *_bank and *_reg values are irrelevant when *_reg is -1.
|
||||
* When *_reg is valid, *_bit may be -1 to indicate an unsupported feature.
|
||||
*
|
||||
* A representation of a group of pins (possibly just one pin) in the Tegra
|
||||
* pin controller. Each group allows some parameter or parameters to be
|
||||
* configured. The most common is mux function selection. Many others exist
|
||||
* such as pull-up/down, tri-state, etc. Tegra's pin controller is complex;
|
||||
* certain groups may only support configuring certain parameters, hence
|
||||
* each parameter is optional, represented by a -1 "reg" value.
|
||||
* each parameter is optional.
|
||||
*/
|
||||
struct tegra_pingroup {
|
||||
const char *name;
|
||||
const unsigned *pins;
|
||||
unsigned npins;
|
||||
unsigned funcs[4];
|
||||
unsigned func_safe;
|
||||
u8 npins;
|
||||
u8 funcs[4];
|
||||
s16 mux_reg;
|
||||
s16 pupd_reg;
|
||||
s16 tri_reg;
|
||||
s16 einput_reg;
|
||||
s16 odrain_reg;
|
||||
s16 lock_reg;
|
||||
s16 ioreset_reg;
|
||||
s16 rcv_sel_reg;
|
||||
s16 drv_reg;
|
||||
s16 drvtype_reg;
|
||||
u32 mux_bank:2;
|
||||
u32 pupd_bank:2;
|
||||
u32 tri_bank:2;
|
||||
u32 einput_bank:2;
|
||||
u32 odrain_bank:2;
|
||||
u32 ioreset_bank:2;
|
||||
u32 rcv_sel_bank:2;
|
||||
u32 lock_bank:2;
|
||||
u32 drv_bank:2;
|
||||
u32 drvtype_bank:2;
|
||||
u32 mux_bit:5;
|
||||
u32 pupd_bit:5;
|
||||
u32 tri_bit:5;
|
||||
u32 einput_bit:5;
|
||||
u32 odrain_bit:5;
|
||||
u32 lock_bit:5;
|
||||
u32 ioreset_bit:5;
|
||||
u32 rcv_sel_bit:5;
|
||||
u32 hsm_bit:5;
|
||||
u32 schmitt_bit:5;
|
||||
u32 lpmd_bit:5;
|
||||
u32 drvdn_bit:5;
|
||||
u32 drvup_bit:5;
|
||||
u32 slwr_bit:5;
|
||||
u32 slwf_bit:5;
|
||||
u32 drvtype_bit:5;
|
||||
u32 mux_bit:6;
|
||||
u32 pupd_bit:6;
|
||||
u32 tri_bit:6;
|
||||
u32 einput_bit:6;
|
||||
u32 odrain_bit:6;
|
||||
u32 lock_bit:6;
|
||||
u32 ioreset_bit:6;
|
||||
u32 rcv_sel_bit:6;
|
||||
u32 hsm_bit:6;
|
||||
u32 schmitt_bit:6;
|
||||
u32 lpmd_bit:6;
|
||||
u32 drvdn_bit:6;
|
||||
u32 drvup_bit:6;
|
||||
u32 slwr_bit:6;
|
||||
u32 slwf_bit:6;
|
||||
u32 drvtype_bit:6;
|
||||
u32 drvdn_width:6;
|
||||
u32 drvup_width:6;
|
||||
u32 slwr_width:6;
|
||||
|
|
|
@ -1547,10 +1547,12 @@ static struct tegra_function tegra114_functions[] = {
|
|||
#define DRV_PINGROUP_REG_A 0x868 /* bank 0 */
|
||||
#define PINGROUP_REG_A 0x3000 /* bank 1 */
|
||||
|
||||
#define PINGROUP_REG_Y(r) ((r) - PINGROUP_REG_A)
|
||||
#define PINGROUP_REG_N(r) -1
|
||||
#define PINGROUP_REG(r) ((r) - PINGROUP_REG_A)
|
||||
|
||||
#define PINGROUP(pg_name, f0, f1, f2, f3, f_safe, r, od, ior, rcv_sel) \
|
||||
#define PINGROUP_BIT_Y(b) (b)
|
||||
#define PINGROUP_BIT_N(b) (-1)
|
||||
|
||||
#define PINGROUP(pg_name, f0, f1, f2, f3, r, od, ior, rcv_sel) \
|
||||
{ \
|
||||
.name = #pg_name, \
|
||||
.pins = pg_name##_pins, \
|
||||
|
@ -1561,38 +1563,24 @@ static struct tegra_function tegra114_functions[] = {
|
|||
TEGRA_MUX_##f2, \
|
||||
TEGRA_MUX_##f3, \
|
||||
}, \
|
||||
.func_safe = TEGRA_MUX_##f_safe, \
|
||||
.mux_reg = PINGROUP_REG_Y(r), \
|
||||
.mux_reg = PINGROUP_REG(r), \
|
||||
.mux_bank = 1, \
|
||||
.mux_bit = 0, \
|
||||
.pupd_reg = PINGROUP_REG_Y(r), \
|
||||
.pupd_reg = PINGROUP_REG(r), \
|
||||
.pupd_bank = 1, \
|
||||
.pupd_bit = 2, \
|
||||
.tri_reg = PINGROUP_REG_Y(r), \
|
||||
.tri_reg = PINGROUP_REG(r), \
|
||||
.tri_bank = 1, \
|
||||
.tri_bit = 4, \
|
||||
.einput_reg = PINGROUP_REG_Y(r), \
|
||||
.einput_bank = 1, \
|
||||
.einput_bit = 5, \
|
||||
.odrain_reg = PINGROUP_REG_##od(r), \
|
||||
.odrain_bank = 1, \
|
||||
.odrain_bit = 6, \
|
||||
.lock_reg = PINGROUP_REG_Y(r), \
|
||||
.lock_bank = 1, \
|
||||
.lock_bit = 7, \
|
||||
.ioreset_reg = PINGROUP_REG_##ior(r), \
|
||||
.ioreset_bank = 1, \
|
||||
.ioreset_bit = 8, \
|
||||
.rcv_sel_reg = PINGROUP_REG_##rcv_sel(r), \
|
||||
.rcv_sel_bank = 1, \
|
||||
.rcv_sel_bit = 9, \
|
||||
.einput_bit = PINGROUP_BIT_Y(5), \
|
||||
.odrain_bit = PINGROUP_BIT_##od(6), \
|
||||
.lock_bit = PINGROUP_BIT_Y(7), \
|
||||
.ioreset_bit = PINGROUP_BIT_##ior(8), \
|
||||
.rcv_sel_bit = PINGROUP_BIT_##rcv_sel(9), \
|
||||
.drv_reg = -1, \
|
||||
.drvtype_reg = -1, \
|
||||
}
|
||||
|
||||
#define DRV_PINGROUP_REG_Y(r) ((r) - DRV_PINGROUP_REG_A)
|
||||
#define DRV_PINGROUP_REG_N(r) -1
|
||||
|
||||
#define DRV_PINGROUP_REG(r) ((r) - DRV_PINGROUP_REG_A)
|
||||
|
||||
#define DRV_PINGROUP(pg_name, r, hsm_b, schmitt_b, lpmd_b, \
|
||||
drvdn_b, drvdn_w, drvup_b, drvup_w, \
|
||||
|
@ -1605,12 +1593,12 @@ static struct tegra_function tegra114_functions[] = {
|
|||
.mux_reg = -1, \
|
||||
.pupd_reg = -1, \
|
||||
.tri_reg = -1, \
|
||||
.einput_reg = -1, \
|
||||
.odrain_reg = -1, \
|
||||
.lock_reg = -1, \
|
||||
.ioreset_reg = -1, \
|
||||
.rcv_sel_reg = -1, \
|
||||
.drv_reg = DRV_PINGROUP_REG_Y(r), \
|
||||
.einput_bit = -1, \
|
||||
.odrain_bit = -1, \
|
||||
.lock_bit = -1, \
|
||||
.ioreset_bit = -1, \
|
||||
.rcv_sel_bit = -1, \
|
||||
.drv_reg = DRV_PINGROUP_REG(r), \
|
||||
.drv_bank = 0, \
|
||||
.hsm_bit = hsm_b, \
|
||||
.schmitt_bit = schmitt_b, \
|
||||
|
@ -1623,190 +1611,188 @@ static struct tegra_function tegra114_functions[] = {
|
|||
.slwr_width = slwr_w, \
|
||||
.slwf_bit = slwf_b, \
|
||||
.slwf_width = slwf_w, \
|
||||
.drvtype_reg = DRV_PINGROUP_REG_##drvtype(r), \
|
||||
.drvtype_bank = 0, \
|
||||
.drvtype_bit = 6, \
|
||||
.drvtype_bit = PINGROUP_BIT_##drvtype(6), \
|
||||
}
|
||||
|
||||
static const struct tegra_pingroup tegra114_groups[] = {
|
||||
/* pg_name, f0, f1, f2, f3, safe, r, od, ior, rcv_sel */
|
||||
PINGROUP(ulpi_data0_po1, SPI3, HSI, UARTA, ULPI, ULPI, 0x3000, N, N, N),
|
||||
PINGROUP(ulpi_data1_po2, SPI3, HSI, UARTA, ULPI, ULPI, 0x3004, N, N, N),
|
||||
PINGROUP(ulpi_data2_po3, SPI3, HSI, UARTA, ULPI, ULPI, 0x3008, N, N, N),
|
||||
PINGROUP(ulpi_data3_po4, SPI3, HSI, UARTA, ULPI, ULPI, 0x300c, N, N, N),
|
||||
PINGROUP(ulpi_data4_po5, SPI2, HSI, UARTA, ULPI, ULPI, 0x3010, N, N, N),
|
||||
PINGROUP(ulpi_data5_po6, SPI2, HSI, UARTA, ULPI, ULPI, 0x3014, N, N, N),
|
||||
PINGROUP(ulpi_data6_po7, SPI2, HSI, UARTA, ULPI, ULPI, 0x3018, N, N, N),
|
||||
PINGROUP(ulpi_data7_po0, SPI2, HSI, UARTA, ULPI, ULPI, 0x301c, N, N, N),
|
||||
PINGROUP(ulpi_clk_py0, SPI1, SPI5, UARTD, ULPI, ULPI, 0x3020, N, N, N),
|
||||
PINGROUP(ulpi_dir_py1, SPI1, SPI5, UARTD, ULPI, ULPI, 0x3024, N, N, N),
|
||||
PINGROUP(ulpi_nxt_py2, SPI1, SPI5, UARTD, ULPI, ULPI, 0x3028, N, N, N),
|
||||
PINGROUP(ulpi_stp_py3, SPI1, SPI5, UARTD, ULPI, ULPI, 0x302c, N, N, N),
|
||||
PINGROUP(dap3_fs_pp0, I2S2, SPI5, DISPLAYA, DISPLAYB, I2S2, 0x3030, N, N, N),
|
||||
PINGROUP(dap3_din_pp1, I2S2, SPI5, DISPLAYA, DISPLAYB, I2S2, 0x3034, N, N, N),
|
||||
PINGROUP(dap3_dout_pp2, I2S2, SPI5, DISPLAYA, DISPLAYB, I2S2, 0x3038, N, N, N),
|
||||
PINGROUP(dap3_sclk_pp3, I2S2, SPI5, DISPLAYA, DISPLAYB, I2S2, 0x303c, N, N, N),
|
||||
PINGROUP(pv0, USB, RSVD2, RSVD3, RSVD4, RSVD4, 0x3040, N, N, N),
|
||||
PINGROUP(pv1, RSVD1, RSVD2, RSVD3, RSVD4, RSVD4, 0x3044, N, N, N),
|
||||
PINGROUP(sdmmc1_clk_pz0, SDMMC1, CLK12, RSVD3, RSVD4, RSVD4, 0x3048, N, N, N),
|
||||
PINGROUP(sdmmc1_cmd_pz1, SDMMC1, SPDIF, SPI4, UARTA, SDMMC1, 0x304c, N, N, N),
|
||||
PINGROUP(sdmmc1_dat3_py4, SDMMC1, SPDIF, SPI4, UARTA, SDMMC1, 0x3050, N, N, N),
|
||||
PINGROUP(sdmmc1_dat2_py5, SDMMC1, PWM0, SPI4, UARTA, SDMMC1, 0x3054, N, N, N),
|
||||
PINGROUP(sdmmc1_dat1_py6, SDMMC1, PWM1, SPI4, UARTA, SDMMC1, 0x3058, N, N, N),
|
||||
PINGROUP(sdmmc1_dat0_py7, SDMMC1, RSVD2, SPI4, UARTA, RSVD2, 0x305c, N, N, N),
|
||||
PINGROUP(clk2_out_pw5, EXTPERIPH2, RSVD2, RSVD3, RSVD4, RSVD4, 0x3068, N, N, N),
|
||||
PINGROUP(clk2_req_pcc5, DAP, RSVD2, RSVD3, RSVD4, RSVD4, 0x306c, N, N, N),
|
||||
PINGROUP(hdmi_int_pn7, RSVD1, RSVD2, RSVD3, RSVD4, RSVD4, 0x3110, N, N, Y),
|
||||
PINGROUP(ddc_scl_pv4, I2C4, RSVD2, RSVD3, RSVD4, RSVD4, 0x3114, N, N, Y),
|
||||
PINGROUP(ddc_sda_pv5, I2C4, RSVD2, RSVD3, RSVD4, RSVD4, 0x3118, N, N, Y),
|
||||
PINGROUP(uart2_rxd_pc3, IRDA, SPDIF, UARTA, SPI4, IRDA, 0x3164, N, N, N),
|
||||
PINGROUP(uart2_txd_pc2, IRDA, SPDIF, UARTA, SPI4, IRDA, 0x3168, N, N, N),
|
||||
PINGROUP(uart2_rts_n_pj6, UARTA, UARTB, RSVD3, SPI4, RSVD3, 0x316c, N, N, N),
|
||||
PINGROUP(uart2_cts_n_pj5, UARTA, UARTB, RSVD3, SPI4, RSVD3, 0x3170, N, N, N),
|
||||
PINGROUP(uart3_txd_pw6, UARTC, RSVD2, RSVD3, SPI4, RSVD3, 0x3174, N, N, N),
|
||||
PINGROUP(uart3_rxd_pw7, UARTC, RSVD2, RSVD3, SPI4, RSVD3, 0x3178, N, N, N),
|
||||
PINGROUP(uart3_cts_n_pa1, UARTC, SDMMC1, DTV, SPI4, UARTC, 0x317c, N, N, N),
|
||||
PINGROUP(uart3_rts_n_pc0, UARTC, PWM0, DTV, DISPLAYA, UARTC, 0x3180, N, N, N),
|
||||
PINGROUP(pu0, OWR, UARTA, RSVD3, RSVD4, RSVD4, 0x3184, N, N, N),
|
||||
PINGROUP(pu1, RSVD1, UARTA, RSVD3, RSVD4, RSVD4, 0x3188, N, N, N),
|
||||
PINGROUP(pu2, RSVD1, UARTA, RSVD3, RSVD4, RSVD4, 0x318c, N, N, N),
|
||||
PINGROUP(pu3, PWM0, UARTA, DISPLAYA, DISPLAYB, PWM0, 0x3190, N, N, N),
|
||||
PINGROUP(pu4, PWM1, UARTA, DISPLAYA, DISPLAYB, PWM1, 0x3194, N, N, N),
|
||||
PINGROUP(pu5, PWM2, UARTA, DISPLAYA, DISPLAYB, PWM2, 0x3198, N, N, N),
|
||||
PINGROUP(pu6, PWM3, UARTA, USB, DISPLAYB, PWM3, 0x319c, N, N, N),
|
||||
PINGROUP(gen1_i2c_sda_pc5, I2C1, RSVD2, RSVD3, RSVD4, RSVD4, 0x31a0, Y, N, N),
|
||||
PINGROUP(gen1_i2c_scl_pc4, I2C1, RSVD2, RSVD3, RSVD4, RSVD4, 0x31a4, Y, N, N),
|
||||
PINGROUP(dap4_fs_pp4, I2S3, RSVD2, DTV, RSVD4, RSVD4, 0x31a8, N, N, N),
|
||||
PINGROUP(dap4_din_pp5, I2S3, RSVD2, RSVD3, RSVD4, RSVD4, 0x31ac, N, N, N),
|
||||
PINGROUP(dap4_dout_pp6, I2S3, RSVD2, DTV, RSVD4, RSVD4, 0x31b0, N, N, N),
|
||||
PINGROUP(dap4_sclk_pp7, I2S3, RSVD2, RSVD3, RSVD4, RSVD4, 0x31b4, N, N, N),
|
||||
PINGROUP(clk3_out_pee0, EXTPERIPH3, RSVD2, RSVD3, RSVD4, RSVD4, 0x31b8, N, N, N),
|
||||
PINGROUP(clk3_req_pee1, DEV3, RSVD2, RSVD3, RSVD4, RSVD4, 0x31bc, N, N, N),
|
||||
PINGROUP(gmi_wp_n_pc7, RSVD1, NAND, GMI, GMI_ALT, RSVD1, 0x31c0, N, N, N),
|
||||
PINGROUP(gmi_iordy_pi5, SDMMC2, RSVD2, GMI, TRACE, RSVD2, 0x31c4, N, N, N),
|
||||
PINGROUP(gmi_wait_pi7, SPI4, NAND, GMI, DTV, NAND, 0x31c8, N, N, N),
|
||||
PINGROUP(gmi_adv_n_pk0, RSVD1, NAND, GMI, TRACE, RSVD1, 0x31cc, N, N, N),
|
||||
PINGROUP(gmi_clk_pk1, SDMMC2, NAND, GMI, TRACE, GMI, 0x31d0, N, N, N),
|
||||
PINGROUP(gmi_cs0_n_pj0, RSVD1, NAND, GMI, USB, RSVD1, 0x31d4, N, N, N),
|
||||
PINGROUP(gmi_cs1_n_pj2, RSVD1, NAND, GMI, SOC, RSVD1, 0x31d8, N, N, N),
|
||||
PINGROUP(gmi_cs2_n_pk3, SDMMC2, NAND, GMI, TRACE, GMI, 0x31dc, N, N, N),
|
||||
PINGROUP(gmi_cs3_n_pk4, SDMMC2, NAND, GMI, GMI_ALT, GMI, 0x31e0, N, N, N),
|
||||
PINGROUP(gmi_cs4_n_pk2, USB, NAND, GMI, TRACE, GMI, 0x31e4, N, N, N),
|
||||
PINGROUP(gmi_cs6_n_pi3, NAND, NAND_ALT, GMI, SPI4, NAND, 0x31e8, N, N, N),
|
||||
PINGROUP(gmi_cs7_n_pi6, NAND, NAND_ALT, GMI, SDMMC2, NAND, 0x31ec, N, N, N),
|
||||
PINGROUP(gmi_ad0_pg0, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31f0, N, N, N),
|
||||
PINGROUP(gmi_ad1_pg1, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31f4, N, N, N),
|
||||
PINGROUP(gmi_ad2_pg2, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31f8, N, N, N),
|
||||
PINGROUP(gmi_ad3_pg3, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31fc, N, N, N),
|
||||
PINGROUP(gmi_ad4_pg4, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x3200, N, N, N),
|
||||
PINGROUP(gmi_ad5_pg5, RSVD1, NAND, GMI, SPI4, RSVD1, 0x3204, N, N, N),
|
||||
PINGROUP(gmi_ad6_pg6, RSVD1, NAND, GMI, SPI4, RSVD1, 0x3208, N, N, N),
|
||||
PINGROUP(gmi_ad7_pg7, RSVD1, NAND, GMI, SPI4, RSVD1, 0x320c, N, N, N),
|
||||
PINGROUP(gmi_ad8_ph0, PWM0, NAND, GMI, DTV, GMI, 0x3210, N, N, N),
|
||||
PINGROUP(gmi_ad9_ph1, PWM1, NAND, GMI, CLDVFS, GMI, 0x3214, N, N, N),
|
||||
PINGROUP(gmi_ad10_ph2, PWM2, NAND, GMI, CLDVFS, GMI, 0x3218, N, N, N),
|
||||
PINGROUP(gmi_ad11_ph3, PWM3, NAND, GMI, USB, GMI, 0x321c, N, N, N),
|
||||
PINGROUP(gmi_ad12_ph4, SDMMC2, NAND, GMI, RSVD4, RSVD4, 0x3220, N, N, N),
|
||||
PINGROUP(gmi_ad13_ph5, SDMMC2, NAND, GMI, RSVD4, RSVD4, 0x3224, N, N, N),
|
||||
PINGROUP(gmi_ad14_ph6, SDMMC2, NAND, GMI, DTV, GMI, 0x3228, N, N, N),
|
||||
PINGROUP(gmi_ad15_ph7, SDMMC2, NAND, GMI, DTV, GMI, 0x322c, N, N, N),
|
||||
PINGROUP(gmi_a16_pj7, UARTD, TRACE, GMI, GMI_ALT, GMI, 0x3230, N, N, N),
|
||||
PINGROUP(gmi_a17_pb0, UARTD, RSVD2, GMI, TRACE, RSVD2, 0x3234, N, N, N),
|
||||
PINGROUP(gmi_a18_pb1, UARTD, RSVD2, GMI, TRACE, RSVD2, 0x3238, N, N, N),
|
||||
PINGROUP(gmi_a19_pk7, UARTD, SPI4, GMI, TRACE, GMI, 0x323c, N, N, N),
|
||||
PINGROUP(gmi_wr_n_pi0, RSVD1, NAND, GMI, SPI4, RSVD1, 0x3240, N, N, N),
|
||||
PINGROUP(gmi_oe_n_pi1, RSVD1, NAND, GMI, SOC, RSVD1, 0x3244, N, N, N),
|
||||
PINGROUP(gmi_dqs_p_pj3, SDMMC2, NAND, GMI, TRACE, NAND, 0x3248, N, N, N),
|
||||
PINGROUP(gmi_rst_n_pi4, NAND, NAND_ALT, GMI, RSVD4, RSVD4, 0x324c, N, N, N),
|
||||
PINGROUP(gen2_i2c_scl_pt5, I2C2, RSVD2, GMI, RSVD4, RSVD4, 0x3250, Y, N, N),
|
||||
PINGROUP(gen2_i2c_sda_pt6, I2C2, RSVD2, GMI, RSVD4, RSVD4, 0x3254, Y, N, N),
|
||||
PINGROUP(sdmmc4_clk_pcc4, SDMMC4, RSVD2, GMI, RSVD4, RSVD4, 0x3258, N, Y, N),
|
||||
PINGROUP(sdmmc4_cmd_pt7, SDMMC4, RSVD2, GMI, RSVD4, RSVD4, 0x325c, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat0_paa0, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x3260, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat1_paa1, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x3264, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat2_paa2, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x3268, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat3_paa3, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x326c, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat4_paa4, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x3270, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat5_paa5, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x3274, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat6_paa6, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x3278, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat7_paa7, SDMMC4, RSVD2, GMI, RSVD4, RSVD4, 0x327c, N, Y, N),
|
||||
PINGROUP(cam_mclk_pcc0, VI, VI_ALT1, VI_ALT3, RSVD4, RSVD4, 0x3284, N, N, N),
|
||||
PINGROUP(pcc1, I2S4, RSVD2, RSVD3, RSVD4, RSVD4, 0x3288, N, N, N),
|
||||
PINGROUP(pbb0, I2S4, VI, VI_ALT1, VI_ALT3, I2S4, 0x328c, N, N, N),
|
||||
PINGROUP(cam_i2c_scl_pbb1, VGP1, I2C3, RSVD3, RSVD4, RSVD4, 0x3290, Y, N, N),
|
||||
PINGROUP(cam_i2c_sda_pbb2, VGP2, I2C3, RSVD3, RSVD4, RSVD4, 0x3294, Y, N, N),
|
||||
PINGROUP(pbb3, VGP3, DISPLAYA, DISPLAYB, RSVD4, RSVD4, 0x3298, N, N, N),
|
||||
PINGROUP(pbb4, VGP4, DISPLAYA, DISPLAYB, RSVD4, RSVD4, 0x329c, N, N, N),
|
||||
PINGROUP(pbb5, VGP5, DISPLAYA, DISPLAYB, RSVD4, RSVD4, 0x32a0, N, N, N),
|
||||
PINGROUP(pbb6, VGP6, DISPLAYA, DISPLAYB, RSVD4, RSVD4, 0x32a4, N, N, N),
|
||||
PINGROUP(pbb7, I2S4, RSVD2, RSVD3, RSVD4, RSVD4, 0x32a8, N, N, N),
|
||||
PINGROUP(pcc2, I2S4, RSVD2, RSVD3, RSVD4, RSVD4, 0x32ac, N, N, N),
|
||||
PINGROUP(jtag_rtck, RTCK, RSVD2, RSVD3, RSVD4, RTCK, 0x32b0, N, N, N),
|
||||
PINGROUP(pwr_i2c_scl_pz6, I2CPWR, RSVD2, RSVD3, RSVD4, RSVD4, 0x32b4, Y, N, N),
|
||||
PINGROUP(pwr_i2c_sda_pz7, I2CPWR, RSVD2, RSVD3, RSVD4, RSVD4, 0x32b8, Y, N, N),
|
||||
PINGROUP(kb_row0_pr0, KBC, RSVD2, RSVD3, RSVD4, RSVD4, 0x32bc, N, N, N),
|
||||
PINGROUP(kb_row1_pr1, KBC, RSVD2, RSVD3, RSVD4, RSVD4, 0x32c0, N, N, N),
|
||||
PINGROUP(kb_row2_pr2, KBC, RSVD2, RSVD3, RSVD4, RSVD4, 0x32c4, N, N, N),
|
||||
PINGROUP(kb_row3_pr3, KBC, DISPLAYA, RSVD3, DISPLAYB, RSVD3, 0x32c8, N, N, N),
|
||||
PINGROUP(kb_row4_pr4, KBC, DISPLAYA, SPI2, DISPLAYB, KBC, 0x32cc, N, N, N),
|
||||
PINGROUP(kb_row5_pr5, KBC, DISPLAYA, SPI2, DISPLAYB, KBC, 0x32d0, N, N, N),
|
||||
PINGROUP(kb_row6_pr6, KBC, DISPLAYA, DISPLAYA_ALT, DISPLAYB, KBC, 0x32d4, N, N, N),
|
||||
PINGROUP(kb_row7_pr7, KBC, RSVD2, CLDVFS, UARTA, RSVD2, 0x32d8, N, N, N),
|
||||
PINGROUP(kb_row8_ps0, KBC, RSVD2, CLDVFS, UARTA, RSVD2, 0x32dc, N, N, N),
|
||||
PINGROUP(kb_row9_ps1, KBC, RSVD2, RSVD3, UARTA, RSVD3, 0x32e0, N, N, N),
|
||||
PINGROUP(kb_row10_ps2, KBC, RSVD2, RSVD3, UARTA, RSVD3, 0x32e4, N, N, N),
|
||||
PINGROUP(kb_col0_pq0, KBC, USB, SPI2, EMC_DLL, KBC, 0x32fc, N, N, N),
|
||||
PINGROUP(kb_col1_pq1, KBC, RSVD2, SPI2, EMC_DLL, RSVD2, 0x3300, N, N, N),
|
||||
PINGROUP(kb_col2_pq2, KBC, RSVD2, SPI2, RSVD4, RSVD2, 0x3304, N, N, N),
|
||||
PINGROUP(kb_col3_pq3, KBC, DISPLAYA, PWM2, UARTA, KBC, 0x3308, N, N, N),
|
||||
PINGROUP(kb_col4_pq4, KBC, OWR, SDMMC3, UARTA, KBC, 0x330c, N, N, N),
|
||||
PINGROUP(kb_col5_pq5, KBC, RSVD2, SDMMC1, RSVD4, RSVD4, 0x3310, N, N, N),
|
||||
PINGROUP(kb_col6_pq6, KBC, RSVD2, SPI2, RSVD4, RSVD4, 0x3314, N, N, N),
|
||||
PINGROUP(kb_col7_pq7, KBC, RSVD2, SPI2, RSVD4, RSVD4, 0x3318, N, N, N),
|
||||
PINGROUP(clk_32k_out_pa0, BLINK, SOC, RSVD3, RSVD4, RSVD4, 0x331c, N, N, N),
|
||||
PINGROUP(sys_clk_req_pz5, SYSCLK, RSVD2, RSVD3, RSVD4, RSVD4, 0x3320, N, N, N),
|
||||
PINGROUP(core_pwr_req, PWRON, RSVD2, RSVD3, RSVD4, RSVD4, 0x3324, N, N, N),
|
||||
PINGROUP(cpu_pwr_req, CPU, RSVD2, RSVD3, RSVD4, RSVD4, 0x3328, N, N, N),
|
||||
PINGROUP(pwr_int_n, PMI, RSVD2, RSVD3, RSVD4, RSVD4, 0x332c, N, N, N),
|
||||
PINGROUP(clk_32k_in, CLK, RSVD2, RSVD3, RSVD4, CLK, 0x3330, N, N, N),
|
||||
PINGROUP(owr, OWR, RSVD2, RSVD3, RSVD4, RSVD4, 0x3334, N, N, Y),
|
||||
PINGROUP(dap1_fs_pn0, I2S0, HDA, GMI, RSVD4, RSVD4, 0x3338, N, N, N),
|
||||
PINGROUP(dap1_din_pn1, I2S0, HDA, GMI, RSVD4, RSVD4, 0x333c, N, N, N),
|
||||
PINGROUP(dap1_dout_pn2, I2S0, HDA, GMI, RSVD4, RSVD4, 0x3340, N, N, N),
|
||||
PINGROUP(dap1_sclk_pn3, I2S0, HDA, GMI, RSVD4, RSVD4, 0x3344, N, N, N),
|
||||
PINGROUP(clk1_req_pee2, DAP, DAP1, RSVD3, RSVD4, RSVD4, 0x3348, N, N, N),
|
||||
PINGROUP(clk1_out_pw4, EXTPERIPH1, DAP2, RSVD3, RSVD4, RSVD4, 0x334c, N, N, N),
|
||||
PINGROUP(spdif_in_pk6, SPDIF, USB, RSVD3, RSVD4, RSVD4, 0x3350, N, N, N),
|
||||
PINGROUP(spdif_out_pk5, SPDIF, RSVD2, RSVD3, RSVD4, RSVD4, 0x3354, N, N, N),
|
||||
PINGROUP(dap2_fs_pa2, I2S1, HDA, RSVD3, RSVD4, RSVD4, 0x3358, N, N, N),
|
||||
PINGROUP(dap2_din_pa4, I2S1, HDA, RSVD3, RSVD4, RSVD4, 0x335c, N, N, N),
|
||||
PINGROUP(dap2_dout_pa5, I2S1, HDA, RSVD3, RSVD4, RSVD4, 0x3360, N, N, N),
|
||||
PINGROUP(dap2_sclk_pa3, I2S1, HDA, RSVD3, RSVD4, RSVD4, 0x3364, N, N, N),
|
||||
PINGROUP(dvfs_pwm_px0, SPI6, CLDVFS, RSVD3, RSVD4, RSVD4, 0x3368, N, N, N),
|
||||
PINGROUP(gpio_x1_aud_px1, SPI6, RSVD2, RSVD3, RSVD4, RSVD4, 0x336c, N, N, N),
|
||||
PINGROUP(gpio_x3_aud_px3, SPI6, SPI1, RSVD3, RSVD4, RSVD4, 0x3370, N, N, N),
|
||||
PINGROUP(dvfs_clk_px2, SPI6, CLDVFS, RSVD3, RSVD4, RSVD4, 0x3374, N, N, N),
|
||||
PINGROUP(gpio_x4_aud_px4, RSVD1, SPI1, SPI2, DAP2, RSVD1, 0x3378, N, N, N),
|
||||
PINGROUP(gpio_x5_aud_px5, RSVD1, SPI1, SPI2, RSVD4, RSVD1, 0x337c, N, N, N),
|
||||
PINGROUP(gpio_x6_aud_px6, SPI6, SPI1, SPI2, RSVD4, RSVD4, 0x3380, N, N, N),
|
||||
PINGROUP(gpio_x7_aud_px7, RSVD1, SPI1, SPI2, RSVD4, RSVD4, 0x3384, N, N, N),
|
||||
PINGROUP(sdmmc3_clk_pa6, SDMMC3, RSVD2, RSVD3, SPI3, RSVD3, 0x3390, N, N, N),
|
||||
PINGROUP(sdmmc3_cmd_pa7, SDMMC3, PWM3, UARTA, SPI3, SDMMC3, 0x3394, N, N, N),
|
||||
PINGROUP(sdmmc3_dat0_pb7, SDMMC3, RSVD2, RSVD3, SPI3, RSVD3, 0x3398, N, N, N),
|
||||
PINGROUP(sdmmc3_dat1_pb6, SDMMC3, PWM2, UARTA, SPI3, SDMMC3, 0x339c, N, N, N),
|
||||
PINGROUP(sdmmc3_dat2_pb5, SDMMC3, PWM1, DISPLAYA, SPI3, SDMMC3, 0x33a0, N, N, N),
|
||||
PINGROUP(sdmmc3_dat3_pb4, SDMMC3, PWM0, DISPLAYB, SPI3, SDMMC3, 0x33a4, N, N, N),
|
||||
PINGROUP(hdmi_cec_pee3, CEC, SDMMC3, RSVD3, SOC, RSVD3, 0x33e0, Y, N, N),
|
||||
PINGROUP(sdmmc1_wp_n_pv3, SDMMC1, CLK12, SPI4, UARTA, SDMMC1, 0x33e4, N, N, N),
|
||||
PINGROUP(sdmmc3_cd_n_pv2, SDMMC3, OWR, RSVD3, RSVD4, RSVD4, 0x33e8, N, N, N),
|
||||
PINGROUP(gpio_w2_aud_pw2, SPI6, RSVD2, SPI2, I2C1, RSVD2, 0x33ec, N, N, N),
|
||||
PINGROUP(gpio_w3_aud_pw3, SPI6, SPI1, SPI2, I2C1, SPI6, 0x33f0, N, N, N),
|
||||
PINGROUP(usb_vbus_en0_pn4, USB, RSVD2, RSVD3, RSVD4, RSVD4, 0x33f4, Y, N, N),
|
||||
PINGROUP(usb_vbus_en1_pn5, USB, RSVD2, RSVD3, RSVD4, RSVD4, 0x33f8, Y, N, N),
|
||||
PINGROUP(sdmmc3_clk_lb_in_pee5, SDMMC3, RSVD2, RSVD3, RSVD4, RSVD4, 0x33fc, N, N, N),
|
||||
PINGROUP(sdmmc3_clk_lb_out_pee4, SDMMC3, RSVD2, RSVD3, RSVD4, RSVD4, 0x3400, N, N, N),
|
||||
PINGROUP(gmi_clk_lb, SDMMC2, NAND, GMI, RSVD4, GMI, 0x3404, N, N, N),
|
||||
PINGROUP(reset_out_n, RSVD1, RSVD2, RSVD3, RESET_OUT_N, RSVD3, 0x3408, N, N, N),
|
||||
/* pg_name, f0, f1, f2, f3, r, od, ior, rcv_sel */
|
||||
PINGROUP(ulpi_data0_po1, SPI3, HSI, UARTA, ULPI, 0x3000, N, N, N),
|
||||
PINGROUP(ulpi_data1_po2, SPI3, HSI, UARTA, ULPI, 0x3004, N, N, N),
|
||||
PINGROUP(ulpi_data2_po3, SPI3, HSI, UARTA, ULPI, 0x3008, N, N, N),
|
||||
PINGROUP(ulpi_data3_po4, SPI3, HSI, UARTA, ULPI, 0x300c, N, N, N),
|
||||
PINGROUP(ulpi_data4_po5, SPI2, HSI, UARTA, ULPI, 0x3010, N, N, N),
|
||||
PINGROUP(ulpi_data5_po6, SPI2, HSI, UARTA, ULPI, 0x3014, N, N, N),
|
||||
PINGROUP(ulpi_data6_po7, SPI2, HSI, UARTA, ULPI, 0x3018, N, N, N),
|
||||
PINGROUP(ulpi_data7_po0, SPI2, HSI, UARTA, ULPI, 0x301c, N, N, N),
|
||||
PINGROUP(ulpi_clk_py0, SPI1, SPI5, UARTD, ULPI, 0x3020, N, N, N),
|
||||
PINGROUP(ulpi_dir_py1, SPI1, SPI5, UARTD, ULPI, 0x3024, N, N, N),
|
||||
PINGROUP(ulpi_nxt_py2, SPI1, SPI5, UARTD, ULPI, 0x3028, N, N, N),
|
||||
PINGROUP(ulpi_stp_py3, SPI1, SPI5, UARTD, ULPI, 0x302c, N, N, N),
|
||||
PINGROUP(dap3_fs_pp0, I2S2, SPI5, DISPLAYA, DISPLAYB, 0x3030, N, N, N),
|
||||
PINGROUP(dap3_din_pp1, I2S2, SPI5, DISPLAYA, DISPLAYB, 0x3034, N, N, N),
|
||||
PINGROUP(dap3_dout_pp2, I2S2, SPI5, DISPLAYA, DISPLAYB, 0x3038, N, N, N),
|
||||
PINGROUP(dap3_sclk_pp3, I2S2, SPI5, DISPLAYA, DISPLAYB, 0x303c, N, N, N),
|
||||
PINGROUP(pv0, USB, RSVD2, RSVD3, RSVD4, 0x3040, N, N, N),
|
||||
PINGROUP(pv1, RSVD1, RSVD2, RSVD3, RSVD4, 0x3044, N, N, N),
|
||||
PINGROUP(sdmmc1_clk_pz0, SDMMC1, CLK12, RSVD3, RSVD4, 0x3048, N, N, N),
|
||||
PINGROUP(sdmmc1_cmd_pz1, SDMMC1, SPDIF, SPI4, UARTA, 0x304c, N, N, N),
|
||||
PINGROUP(sdmmc1_dat3_py4, SDMMC1, SPDIF, SPI4, UARTA, 0x3050, N, N, N),
|
||||
PINGROUP(sdmmc1_dat2_py5, SDMMC1, PWM0, SPI4, UARTA, 0x3054, N, N, N),
|
||||
PINGROUP(sdmmc1_dat1_py6, SDMMC1, PWM1, SPI4, UARTA, 0x3058, N, N, N),
|
||||
PINGROUP(sdmmc1_dat0_py7, SDMMC1, RSVD2, SPI4, UARTA, 0x305c, N, N, N),
|
||||
PINGROUP(clk2_out_pw5, EXTPERIPH2, RSVD2, RSVD3, RSVD4, 0x3068, N, N, N),
|
||||
PINGROUP(clk2_req_pcc5, DAP, RSVD2, RSVD3, RSVD4, 0x306c, N, N, N),
|
||||
PINGROUP(hdmi_int_pn7, RSVD1, RSVD2, RSVD3, RSVD4, 0x3110, N, N, Y),
|
||||
PINGROUP(ddc_scl_pv4, I2C4, RSVD2, RSVD3, RSVD4, 0x3114, N, N, Y),
|
||||
PINGROUP(ddc_sda_pv5, I2C4, RSVD2, RSVD3, RSVD4, 0x3118, N, N, Y),
|
||||
PINGROUP(uart2_rxd_pc3, IRDA, SPDIF, UARTA, SPI4, 0x3164, N, N, N),
|
||||
PINGROUP(uart2_txd_pc2, IRDA, SPDIF, UARTA, SPI4, 0x3168, N, N, N),
|
||||
PINGROUP(uart2_rts_n_pj6, UARTA, UARTB, RSVD3, SPI4, 0x316c, N, N, N),
|
||||
PINGROUP(uart2_cts_n_pj5, UARTA, UARTB, RSVD3, SPI4, 0x3170, N, N, N),
|
||||
PINGROUP(uart3_txd_pw6, UARTC, RSVD2, RSVD3, SPI4, 0x3174, N, N, N),
|
||||
PINGROUP(uart3_rxd_pw7, UARTC, RSVD2, RSVD3, SPI4, 0x3178, N, N, N),
|
||||
PINGROUP(uart3_cts_n_pa1, UARTC, SDMMC1, DTV, SPI4, 0x317c, N, N, N),
|
||||
PINGROUP(uart3_rts_n_pc0, UARTC, PWM0, DTV, DISPLAYA, 0x3180, N, N, N),
|
||||
PINGROUP(pu0, OWR, UARTA, RSVD3, RSVD4, 0x3184, N, N, N),
|
||||
PINGROUP(pu1, RSVD1, UARTA, RSVD3, RSVD4, 0x3188, N, N, N),
|
||||
PINGROUP(pu2, RSVD1, UARTA, RSVD3, RSVD4, 0x318c, N, N, N),
|
||||
PINGROUP(pu3, PWM0, UARTA, DISPLAYA, DISPLAYB, 0x3190, N, N, N),
|
||||
PINGROUP(pu4, PWM1, UARTA, DISPLAYA, DISPLAYB, 0x3194, N, N, N),
|
||||
PINGROUP(pu5, PWM2, UARTA, DISPLAYA, DISPLAYB, 0x3198, N, N, N),
|
||||
PINGROUP(pu6, PWM3, UARTA, USB, DISPLAYB, 0x319c, N, N, N),
|
||||
PINGROUP(gen1_i2c_sda_pc5, I2C1, RSVD2, RSVD3, RSVD4, 0x31a0, Y, N, N),
|
||||
PINGROUP(gen1_i2c_scl_pc4, I2C1, RSVD2, RSVD3, RSVD4, 0x31a4, Y, N, N),
|
||||
PINGROUP(dap4_fs_pp4, I2S3, RSVD2, DTV, RSVD4, 0x31a8, N, N, N),
|
||||
PINGROUP(dap4_din_pp5, I2S3, RSVD2, RSVD3, RSVD4, 0x31ac, N, N, N),
|
||||
PINGROUP(dap4_dout_pp6, I2S3, RSVD2, DTV, RSVD4, 0x31b0, N, N, N),
|
||||
PINGROUP(dap4_sclk_pp7, I2S3, RSVD2, RSVD3, RSVD4, 0x31b4, N, N, N),
|
||||
PINGROUP(clk3_out_pee0, EXTPERIPH3, RSVD2, RSVD3, RSVD4, 0x31b8, N, N, N),
|
||||
PINGROUP(clk3_req_pee1, DEV3, RSVD2, RSVD3, RSVD4, 0x31bc, N, N, N),
|
||||
PINGROUP(gmi_wp_n_pc7, RSVD1, NAND, GMI, GMI_ALT, 0x31c0, N, N, N),
|
||||
PINGROUP(gmi_iordy_pi5, SDMMC2, RSVD2, GMI, TRACE, 0x31c4, N, N, N),
|
||||
PINGROUP(gmi_wait_pi7, SPI4, NAND, GMI, DTV, 0x31c8, N, N, N),
|
||||
PINGROUP(gmi_adv_n_pk0, RSVD1, NAND, GMI, TRACE, 0x31cc, N, N, N),
|
||||
PINGROUP(gmi_clk_pk1, SDMMC2, NAND, GMI, TRACE, 0x31d0, N, N, N),
|
||||
PINGROUP(gmi_cs0_n_pj0, RSVD1, NAND, GMI, USB, 0x31d4, N, N, N),
|
||||
PINGROUP(gmi_cs1_n_pj2, RSVD1, NAND, GMI, SOC, 0x31d8, N, N, N),
|
||||
PINGROUP(gmi_cs2_n_pk3, SDMMC2, NAND, GMI, TRACE, 0x31dc, N, N, N),
|
||||
PINGROUP(gmi_cs3_n_pk4, SDMMC2, NAND, GMI, GMI_ALT, 0x31e0, N, N, N),
|
||||
PINGROUP(gmi_cs4_n_pk2, USB, NAND, GMI, TRACE, 0x31e4, N, N, N),
|
||||
PINGROUP(gmi_cs6_n_pi3, NAND, NAND_ALT, GMI, SPI4, 0x31e8, N, N, N),
|
||||
PINGROUP(gmi_cs7_n_pi6, NAND, NAND_ALT, GMI, SDMMC2, 0x31ec, N, N, N),
|
||||
PINGROUP(gmi_ad0_pg0, RSVD1, NAND, GMI, RSVD4, 0x31f0, N, N, N),
|
||||
PINGROUP(gmi_ad1_pg1, RSVD1, NAND, GMI, RSVD4, 0x31f4, N, N, N),
|
||||
PINGROUP(gmi_ad2_pg2, RSVD1, NAND, GMI, RSVD4, 0x31f8, N, N, N),
|
||||
PINGROUP(gmi_ad3_pg3, RSVD1, NAND, GMI, RSVD4, 0x31fc, N, N, N),
|
||||
PINGROUP(gmi_ad4_pg4, RSVD1, NAND, GMI, RSVD4, 0x3200, N, N, N),
|
||||
PINGROUP(gmi_ad5_pg5, RSVD1, NAND, GMI, SPI4, 0x3204, N, N, N),
|
||||
PINGROUP(gmi_ad6_pg6, RSVD1, NAND, GMI, SPI4, 0x3208, N, N, N),
|
||||
PINGROUP(gmi_ad7_pg7, RSVD1, NAND, GMI, SPI4, 0x320c, N, N, N),
|
||||
PINGROUP(gmi_ad8_ph0, PWM0, NAND, GMI, DTV, 0x3210, N, N, N),
|
||||
PINGROUP(gmi_ad9_ph1, PWM1, NAND, GMI, CLDVFS, 0x3214, N, N, N),
|
||||
PINGROUP(gmi_ad10_ph2, PWM2, NAND, GMI, CLDVFS, 0x3218, N, N, N),
|
||||
PINGROUP(gmi_ad11_ph3, PWM3, NAND, GMI, USB, 0x321c, N, N, N),
|
||||
PINGROUP(gmi_ad12_ph4, SDMMC2, NAND, GMI, RSVD4, 0x3220, N, N, N),
|
||||
PINGROUP(gmi_ad13_ph5, SDMMC2, NAND, GMI, RSVD4, 0x3224, N, N, N),
|
||||
PINGROUP(gmi_ad14_ph6, SDMMC2, NAND, GMI, DTV, 0x3228, N, N, N),
|
||||
PINGROUP(gmi_ad15_ph7, SDMMC2, NAND, GMI, DTV, 0x322c, N, N, N),
|
||||
PINGROUP(gmi_a16_pj7, UARTD, TRACE, GMI, GMI_ALT, 0x3230, N, N, N),
|
||||
PINGROUP(gmi_a17_pb0, UARTD, RSVD2, GMI, TRACE, 0x3234, N, N, N),
|
||||
PINGROUP(gmi_a18_pb1, UARTD, RSVD2, GMI, TRACE, 0x3238, N, N, N),
|
||||
PINGROUP(gmi_a19_pk7, UARTD, SPI4, GMI, TRACE, 0x323c, N, N, N),
|
||||
PINGROUP(gmi_wr_n_pi0, RSVD1, NAND, GMI, SPI4, 0x3240, N, N, N),
|
||||
PINGROUP(gmi_oe_n_pi1, RSVD1, NAND, GMI, SOC, 0x3244, N, N, N),
|
||||
PINGROUP(gmi_dqs_p_pj3, SDMMC2, NAND, GMI, TRACE, 0x3248, N, N, N),
|
||||
PINGROUP(gmi_rst_n_pi4, NAND, NAND_ALT, GMI, RSVD4, 0x324c, N, N, N),
|
||||
PINGROUP(gen2_i2c_scl_pt5, I2C2, RSVD2, GMI, RSVD4, 0x3250, Y, N, N),
|
||||
PINGROUP(gen2_i2c_sda_pt6, I2C2, RSVD2, GMI, RSVD4, 0x3254, Y, N, N),
|
||||
PINGROUP(sdmmc4_clk_pcc4, SDMMC4, RSVD2, GMI, RSVD4, 0x3258, N, Y, N),
|
||||
PINGROUP(sdmmc4_cmd_pt7, SDMMC4, RSVD2, GMI, RSVD4, 0x325c, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat0_paa0, SDMMC4, SPI3, GMI, RSVD4, 0x3260, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat1_paa1, SDMMC4, SPI3, GMI, RSVD4, 0x3264, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat2_paa2, SDMMC4, SPI3, GMI, RSVD4, 0x3268, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat3_paa3, SDMMC4, SPI3, GMI, RSVD4, 0x326c, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat4_paa4, SDMMC4, SPI3, GMI, RSVD4, 0x3270, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat5_paa5, SDMMC4, SPI3, GMI, RSVD4, 0x3274, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat6_paa6, SDMMC4, SPI3, GMI, RSVD4, 0x3278, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat7_paa7, SDMMC4, RSVD2, GMI, RSVD4, 0x327c, N, Y, N),
|
||||
PINGROUP(cam_mclk_pcc0, VI, VI_ALT1, VI_ALT3, RSVD4, 0x3284, N, N, N),
|
||||
PINGROUP(pcc1, I2S4, RSVD2, RSVD3, RSVD4, 0x3288, N, N, N),
|
||||
PINGROUP(pbb0, I2S4, VI, VI_ALT1, VI_ALT3, 0x328c, N, N, N),
|
||||
PINGROUP(cam_i2c_scl_pbb1, VGP1, I2C3, RSVD3, RSVD4, 0x3290, Y, N, N),
|
||||
PINGROUP(cam_i2c_sda_pbb2, VGP2, I2C3, RSVD3, RSVD4, 0x3294, Y, N, N),
|
||||
PINGROUP(pbb3, VGP3, DISPLAYA, DISPLAYB, RSVD4, 0x3298, N, N, N),
|
||||
PINGROUP(pbb4, VGP4, DISPLAYA, DISPLAYB, RSVD4, 0x329c, N, N, N),
|
||||
PINGROUP(pbb5, VGP5, DISPLAYA, DISPLAYB, RSVD4, 0x32a0, N, N, N),
|
||||
PINGROUP(pbb6, VGP6, DISPLAYA, DISPLAYB, RSVD4, 0x32a4, N, N, N),
|
||||
PINGROUP(pbb7, I2S4, RSVD2, RSVD3, RSVD4, 0x32a8, N, N, N),
|
||||
PINGROUP(pcc2, I2S4, RSVD2, RSVD3, RSVD4, 0x32ac, N, N, N),
|
||||
PINGROUP(jtag_rtck, RTCK, RSVD2, RSVD3, RSVD4, 0x32b0, N, N, N),
|
||||
PINGROUP(pwr_i2c_scl_pz6, I2CPWR, RSVD2, RSVD3, RSVD4, 0x32b4, Y, N, N),
|
||||
PINGROUP(pwr_i2c_sda_pz7, I2CPWR, RSVD2, RSVD3, RSVD4, 0x32b8, Y, N, N),
|
||||
PINGROUP(kb_row0_pr0, KBC, RSVD2, RSVD3, RSVD4, 0x32bc, N, N, N),
|
||||
PINGROUP(kb_row1_pr1, KBC, RSVD2, RSVD3, RSVD4, 0x32c0, N, N, N),
|
||||
PINGROUP(kb_row2_pr2, KBC, RSVD2, RSVD3, RSVD4, 0x32c4, N, N, N),
|
||||
PINGROUP(kb_row3_pr3, KBC, DISPLAYA, RSVD3, DISPLAYB, 0x32c8, N, N, N),
|
||||
PINGROUP(kb_row4_pr4, KBC, DISPLAYA, SPI2, DISPLAYB, 0x32cc, N, N, N),
|
||||
PINGROUP(kb_row5_pr5, KBC, DISPLAYA, SPI2, DISPLAYB, 0x32d0, N, N, N),
|
||||
PINGROUP(kb_row6_pr6, KBC, DISPLAYA, DISPLAYA_ALT, DISPLAYB, 0x32d4, N, N, N),
|
||||
PINGROUP(kb_row7_pr7, KBC, RSVD2, CLDVFS, UARTA, 0x32d8, N, N, N),
|
||||
PINGROUP(kb_row8_ps0, KBC, RSVD2, CLDVFS, UARTA, 0x32dc, N, N, N),
|
||||
PINGROUP(kb_row9_ps1, KBC, RSVD2, RSVD3, UARTA, 0x32e0, N, N, N),
|
||||
PINGROUP(kb_row10_ps2, KBC, RSVD2, RSVD3, UARTA, 0x32e4, N, N, N),
|
||||
PINGROUP(kb_col0_pq0, KBC, USB, SPI2, EMC_DLL, 0x32fc, N, N, N),
|
||||
PINGROUP(kb_col1_pq1, KBC, RSVD2, SPI2, EMC_DLL, 0x3300, N, N, N),
|
||||
PINGROUP(kb_col2_pq2, KBC, RSVD2, SPI2, RSVD4, 0x3304, N, N, N),
|
||||
PINGROUP(kb_col3_pq3, KBC, DISPLAYA, PWM2, UARTA, 0x3308, N, N, N),
|
||||
PINGROUP(kb_col4_pq4, KBC, OWR, SDMMC3, UARTA, 0x330c, N, N, N),
|
||||
PINGROUP(kb_col5_pq5, KBC, RSVD2, SDMMC1, RSVD4, 0x3310, N, N, N),
|
||||
PINGROUP(kb_col6_pq6, KBC, RSVD2, SPI2, RSVD4, 0x3314, N, N, N),
|
||||
PINGROUP(kb_col7_pq7, KBC, RSVD2, SPI2, RSVD4, 0x3318, N, N, N),
|
||||
PINGROUP(clk_32k_out_pa0, BLINK, SOC, RSVD3, RSVD4, 0x331c, N, N, N),
|
||||
PINGROUP(sys_clk_req_pz5, SYSCLK, RSVD2, RSVD3, RSVD4, 0x3320, N, N, N),
|
||||
PINGROUP(core_pwr_req, PWRON, RSVD2, RSVD3, RSVD4, 0x3324, N, N, N),
|
||||
PINGROUP(cpu_pwr_req, CPU, RSVD2, RSVD3, RSVD4, 0x3328, N, N, N),
|
||||
PINGROUP(pwr_int_n, PMI, RSVD2, RSVD3, RSVD4, 0x332c, N, N, N),
|
||||
PINGROUP(clk_32k_in, CLK, RSVD2, RSVD3, RSVD4, 0x3330, N, N, N),
|
||||
PINGROUP(owr, OWR, RSVD2, RSVD3, RSVD4, 0x3334, N, N, Y),
|
||||
PINGROUP(dap1_fs_pn0, I2S0, HDA, GMI, RSVD4, 0x3338, N, N, N),
|
||||
PINGROUP(dap1_din_pn1, I2S0, HDA, GMI, RSVD4, 0x333c, N, N, N),
|
||||
PINGROUP(dap1_dout_pn2, I2S0, HDA, GMI, RSVD4, 0x3340, N, N, N),
|
||||
PINGROUP(dap1_sclk_pn3, I2S0, HDA, GMI, RSVD4, 0x3344, N, N, N),
|
||||
PINGROUP(clk1_req_pee2, DAP, DAP1, RSVD3, RSVD4, 0x3348, N, N, N),
|
||||
PINGROUP(clk1_out_pw4, EXTPERIPH1, DAP2, RSVD3, RSVD4, 0x334c, N, N, N),
|
||||
PINGROUP(spdif_in_pk6, SPDIF, USB, RSVD3, RSVD4, 0x3350, N, N, N),
|
||||
PINGROUP(spdif_out_pk5, SPDIF, RSVD2, RSVD3, RSVD4, 0x3354, N, N, N),
|
||||
PINGROUP(dap2_fs_pa2, I2S1, HDA, RSVD3, RSVD4, 0x3358, N, N, N),
|
||||
PINGROUP(dap2_din_pa4, I2S1, HDA, RSVD3, RSVD4, 0x335c, N, N, N),
|
||||
PINGROUP(dap2_dout_pa5, I2S1, HDA, RSVD3, RSVD4, 0x3360, N, N, N),
|
||||
PINGROUP(dap2_sclk_pa3, I2S1, HDA, RSVD3, RSVD4, 0x3364, N, N, N),
|
||||
PINGROUP(dvfs_pwm_px0, SPI6, CLDVFS, RSVD3, RSVD4, 0x3368, N, N, N),
|
||||
PINGROUP(gpio_x1_aud_px1, SPI6, RSVD2, RSVD3, RSVD4, 0x336c, N, N, N),
|
||||
PINGROUP(gpio_x3_aud_px3, SPI6, SPI1, RSVD3, RSVD4, 0x3370, N, N, N),
|
||||
PINGROUP(dvfs_clk_px2, SPI6, CLDVFS, RSVD3, RSVD4, 0x3374, N, N, N),
|
||||
PINGROUP(gpio_x4_aud_px4, RSVD1, SPI1, SPI2, DAP2, 0x3378, N, N, N),
|
||||
PINGROUP(gpio_x5_aud_px5, RSVD1, SPI1, SPI2, RSVD4, 0x337c, N, N, N),
|
||||
PINGROUP(gpio_x6_aud_px6, SPI6, SPI1, SPI2, RSVD4, 0x3380, N, N, N),
|
||||
PINGROUP(gpio_x7_aud_px7, RSVD1, SPI1, SPI2, RSVD4, 0x3384, N, N, N),
|
||||
PINGROUP(sdmmc3_clk_pa6, SDMMC3, RSVD2, RSVD3, SPI3, 0x3390, N, N, N),
|
||||
PINGROUP(sdmmc3_cmd_pa7, SDMMC3, PWM3, UARTA, SPI3, 0x3394, N, N, N),
|
||||
PINGROUP(sdmmc3_dat0_pb7, SDMMC3, RSVD2, RSVD3, SPI3, 0x3398, N, N, N),
|
||||
PINGROUP(sdmmc3_dat1_pb6, SDMMC3, PWM2, UARTA, SPI3, 0x339c, N, N, N),
|
||||
PINGROUP(sdmmc3_dat2_pb5, SDMMC3, PWM1, DISPLAYA, SPI3, 0x33a0, N, N, N),
|
||||
PINGROUP(sdmmc3_dat3_pb4, SDMMC3, PWM0, DISPLAYB, SPI3, 0x33a4, N, N, N),
|
||||
PINGROUP(hdmi_cec_pee3, CEC, SDMMC3, RSVD3, SOC, 0x33e0, Y, N, N),
|
||||
PINGROUP(sdmmc1_wp_n_pv3, SDMMC1, CLK12, SPI4, UARTA, 0x33e4, N, N, N),
|
||||
PINGROUP(sdmmc3_cd_n_pv2, SDMMC3, OWR, RSVD3, RSVD4, 0x33e8, N, N, N),
|
||||
PINGROUP(gpio_w2_aud_pw2, SPI6, RSVD2, SPI2, I2C1, 0x33ec, N, N, N),
|
||||
PINGROUP(gpio_w3_aud_pw3, SPI6, SPI1, SPI2, I2C1, 0x33f0, N, N, N),
|
||||
PINGROUP(usb_vbus_en0_pn4, USB, RSVD2, RSVD3, RSVD4, 0x33f4, Y, N, N),
|
||||
PINGROUP(usb_vbus_en1_pn5, USB, RSVD2, RSVD3, RSVD4, 0x33f8, Y, N, N),
|
||||
PINGROUP(sdmmc3_clk_lb_in_pee5, SDMMC3, RSVD2, RSVD3, RSVD4, 0x33fc, N, N, N),
|
||||
PINGROUP(sdmmc3_clk_lb_out_pee4, SDMMC3, RSVD2, RSVD3, RSVD4, 0x3400, N, N, N),
|
||||
PINGROUP(gmi_clk_lb, SDMMC2, NAND, GMI, RSVD4, 0x3404, N, N, N),
|
||||
PINGROUP(reset_out_n, RSVD1, RSVD2, RSVD3, RESET_OUT_N, 0x3408, N, N, N),
|
||||
|
||||
/* pg_name, r, hsm_b, schmitt_b, lpmd_b, drvdn_b, drvdn_w, drvup_b, drvup_w, slwr_b, slwr_w, slwf_b, slwf_w, drvtype */
|
||||
DRV_PINGROUP(ao1, 0x868, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
|
|
|
@ -1677,10 +1677,12 @@ static struct tegra_function tegra124_functions[] = {
|
|||
#define DRV_PINGROUP_REG_A 0x868 /* bank 0 */
|
||||
#define PINGROUP_REG_A 0x3000 /* bank 1 */
|
||||
|
||||
#define PINGROUP_REG_Y(r) ((r) - PINGROUP_REG_A)
|
||||
#define PINGROUP_REG_N(r) -1
|
||||
#define PINGROUP_REG(r) ((r) - PINGROUP_REG_A)
|
||||
|
||||
#define PINGROUP(pg_name, f0, f1, f2, f3, f_safe, r, od, ior, rcv_sel) \
|
||||
#define PINGROUP_BIT_Y(b) (b)
|
||||
#define PINGROUP_BIT_N(b) (-1)
|
||||
|
||||
#define PINGROUP(pg_name, f0, f1, f2, f3, r, od, ior, rcv_sel) \
|
||||
{ \
|
||||
.name = #pg_name, \
|
||||
.pins = pg_name##_pins, \
|
||||
|
@ -1691,38 +1693,24 @@ static struct tegra_function tegra124_functions[] = {
|
|||
TEGRA_MUX_##f2, \
|
||||
TEGRA_MUX_##f3, \
|
||||
}, \
|
||||
.func_safe = TEGRA_MUX_##f_safe, \
|
||||
.mux_reg = PINGROUP_REG_Y(r), \
|
||||
.mux_reg = PINGROUP_REG(r), \
|
||||
.mux_bank = 1, \
|
||||
.mux_bit = 0, \
|
||||
.pupd_reg = PINGROUP_REG_Y(r), \
|
||||
.pupd_reg = PINGROUP_REG(r), \
|
||||
.pupd_bank = 1, \
|
||||
.pupd_bit = 2, \
|
||||
.tri_reg = PINGROUP_REG_Y(r), \
|
||||
.tri_reg = PINGROUP_REG(r), \
|
||||
.tri_bank = 1, \
|
||||
.tri_bit = 4, \
|
||||
.einput_reg = PINGROUP_REG_Y(r), \
|
||||
.einput_bank = 1, \
|
||||
.einput_bit = 5, \
|
||||
.odrain_reg = PINGROUP_REG_##od(r), \
|
||||
.odrain_bank = 1, \
|
||||
.odrain_bit = 6, \
|
||||
.lock_reg = PINGROUP_REG_Y(r), \
|
||||
.lock_bank = 1, \
|
||||
.lock_bit = 7, \
|
||||
.ioreset_reg = PINGROUP_REG_##ior(r), \
|
||||
.ioreset_bank = 1, \
|
||||
.ioreset_bit = 8, \
|
||||
.rcv_sel_reg = PINGROUP_REG_##rcv_sel(r), \
|
||||
.rcv_sel_bank = 1, \
|
||||
.rcv_sel_bit = 9, \
|
||||
.einput_bit = PINGROUP_BIT_Y(5), \
|
||||
.odrain_bit = PINGROUP_BIT_##od(6), \
|
||||
.lock_bit = PINGROUP_BIT_Y(7), \
|
||||
.ioreset_bit = PINGROUP_BIT_##ior(8), \
|
||||
.rcv_sel_bit = PINGROUP_BIT_##rcv_sel(9), \
|
||||
.drv_reg = -1, \
|
||||
.drvtype_reg = -1, \
|
||||
}
|
||||
|
||||
#define DRV_PINGROUP_REG_Y(r) ((r) - DRV_PINGROUP_REG_A)
|
||||
#define DRV_PINGROUP_REG_N(r) -1
|
||||
|
||||
#define DRV_PINGROUP_REG(r) ((r) - DRV_PINGROUP_REG_A)
|
||||
|
||||
#define DRV_PINGROUP(pg_name, r, hsm_b, schmitt_b, lpmd_b, \
|
||||
drvdn_b, drvdn_w, drvup_b, drvup_w, \
|
||||
|
@ -1735,12 +1723,12 @@ static struct tegra_function tegra124_functions[] = {
|
|||
.mux_reg = -1, \
|
||||
.pupd_reg = -1, \
|
||||
.tri_reg = -1, \
|
||||
.einput_reg = -1, \
|
||||
.odrain_reg = -1, \
|
||||
.lock_reg = -1, \
|
||||
.ioreset_reg = -1, \
|
||||
.rcv_sel_reg = -1, \
|
||||
.drv_reg = DRV_PINGROUP_REG_Y(r), \
|
||||
.einput_bit = -1, \
|
||||
.odrain_bit = -1, \
|
||||
.lock_bit = -1, \
|
||||
.ioreset_bit = -1, \
|
||||
.rcv_sel_bit = -1, \
|
||||
.drv_reg = DRV_PINGROUP_REG(r), \
|
||||
.drv_bank = 0, \
|
||||
.hsm_bit = hsm_b, \
|
||||
.schmitt_bit = schmitt_b, \
|
||||
|
@ -1753,246 +1741,244 @@ static struct tegra_function tegra124_functions[] = {
|
|||
.slwr_width = slwr_w, \
|
||||
.slwf_bit = slwf_b, \
|
||||
.slwf_width = slwf_w, \
|
||||
.drvtype_reg = DRV_PINGROUP_REG_##drvtype(r), \
|
||||
.drvtype_bank = 0, \
|
||||
.drvtype_bit = 6, \
|
||||
.drvtype_bit = PINGROUP_BIT_##drvtype(6), \
|
||||
}
|
||||
|
||||
static const struct tegra_pingroup tegra124_groups[] = {
|
||||
/* pg_name, f0, f1, f2, f3, safe, r, od, ior, rcv_sel */
|
||||
PINGROUP(ulpi_data0_po1, SPI3, HSI, UARTA, ULPI, SPI3, 0x3000, N, N, N),
|
||||
PINGROUP(ulpi_data1_po2, SPI3, HSI, UARTA, ULPI, SPI3, 0x3004, N, N, N),
|
||||
PINGROUP(ulpi_data2_po3, SPI3, HSI, UARTA, ULPI, SPI3, 0x3008, N, N, N),
|
||||
PINGROUP(ulpi_data3_po4, SPI3, HSI, UARTA, ULPI, SPI3, 0x300c, N, N, N),
|
||||
PINGROUP(ulpi_data4_po5, SPI2, HSI, UARTA, ULPI, SPI2, 0x3010, N, N, N),
|
||||
PINGROUP(ulpi_data5_po6, SPI2, HSI, UARTA, ULPI, SPI2, 0x3014, N, N, N),
|
||||
PINGROUP(ulpi_data6_po7, SPI2, HSI, UARTA, ULPI, SPI2, 0x3018, N, N, N),
|
||||
PINGROUP(ulpi_data7_po0, SPI2, HSI, UARTA, ULPI, SPI2, 0x301c, N, N, N),
|
||||
PINGROUP(ulpi_clk_py0, SPI1, SPI5, UARTD, ULPI, SPI1, 0x3020, N, N, N),
|
||||
PINGROUP(ulpi_dir_py1, SPI1, SPI5, UARTD, ULPI, SPI1, 0x3024, N, N, N),
|
||||
PINGROUP(ulpi_nxt_py2, SPI1, SPI5, UARTD, ULPI, SPI1, 0x3028, N, N, N),
|
||||
PINGROUP(ulpi_stp_py3, SPI1, SPI5, UARTD, ULPI, SPI1, 0x302c, N, N, N),
|
||||
PINGROUP(dap3_fs_pp0, I2S2, SPI5, DISPLAYA, DISPLAYB, I2S2, 0x3030, N, N, N),
|
||||
PINGROUP(dap3_din_pp1, I2S2, SPI5, DISPLAYA, DISPLAYB, I2S2, 0x3034, N, N, N),
|
||||
PINGROUP(dap3_dout_pp2, I2S2, SPI5, DISPLAYA, RSVD4, I2S2, 0x3038, N, N, N),
|
||||
PINGROUP(dap3_sclk_pp3, I2S2, SPI5, RSVD3, DISPLAYB, I2S2, 0x303c, N, N, N),
|
||||
PINGROUP(pv0, RSVD1, RSVD2, RSVD3, RSVD4, RSVD1, 0x3040, N, N, N),
|
||||
PINGROUP(pv1, RSVD1, RSVD2, RSVD3, RSVD4, RSVD1, 0x3044, N, N, N),
|
||||
PINGROUP(sdmmc1_clk_pz0, SDMMC1, CLK12, RSVD3, RSVD4, RSVD3, 0x3048, N, N, N),
|
||||
PINGROUP(sdmmc1_cmd_pz1, SDMMC1, SPDIF, SPI4, UARTA, SDMMC1, 0x304c, N, N, N),
|
||||
PINGROUP(sdmmc1_dat3_py4, SDMMC1, SPDIF, SPI4, UARTA, SDMMC1, 0x3050, N, N, N),
|
||||
PINGROUP(sdmmc1_dat2_py5, SDMMC1, PWM0, SPI4, UARTA, SDMMC1, 0x3054, N, N, N),
|
||||
PINGROUP(sdmmc1_dat1_py6, SDMMC1, PWM1, SPI4, UARTA, SDMMC1, 0x3058, N, N, N),
|
||||
PINGROUP(sdmmc1_dat0_py7, SDMMC1, RSVD2, SPI4, UARTA, SDMMC1, 0x305c, N, N, N),
|
||||
PINGROUP(clk2_out_pw5, EXTPERIPH2, RSVD2, RSVD3, RSVD4, EXTPERIPH2, 0x3068, N, N, N),
|
||||
PINGROUP(clk2_req_pcc5, DAP, RSVD2, RSVD3, RSVD4, DAP, 0x306c, N, N, N),
|
||||
PINGROUP(hdmi_int_pn7, RSVD1, RSVD2, RSVD3, RSVD4, RSVD1, 0x3110, N, N, Y),
|
||||
PINGROUP(ddc_scl_pv4, I2C4, RSVD2, RSVD3, RSVD4, I2C4, 0x3114, N, N, Y),
|
||||
PINGROUP(ddc_sda_pv5, I2C4, RSVD2, RSVD3, RSVD4, I2C4, 0x3118, N, N, Y),
|
||||
PINGROUP(uart2_rxd_pc3, IRDA, SPDIF, UARTA, SPI4, IRDA, 0x3164, N, N, N),
|
||||
PINGROUP(uart2_txd_pc2, IRDA, SPDIF, UARTA, SPI4, IRDA, 0x3168, N, N, N),
|
||||
PINGROUP(uart2_rts_n_pj6, UARTA, UARTB, GMI, SPI4, UARTA, 0x316c, N, N, N),
|
||||
PINGROUP(uart2_cts_n_pj5, UARTA, UARTB, GMI, SPI4, UARTA, 0x3170, N, N, N),
|
||||
PINGROUP(uart3_txd_pw6, UARTC, RSVD2, GMI, SPI4, UARTC, 0x3174, N, N, N),
|
||||
PINGROUP(uart3_rxd_pw7, UARTC, RSVD2, GMI, SPI4, UARTC, 0x3178, N, N, N),
|
||||
PINGROUP(uart3_cts_n_pa1, UARTC, SDMMC1, DTV, GMI, UARTC, 0x317c, N, N, N),
|
||||
PINGROUP(uart3_rts_n_pc0, UARTC, PWM0, DTV, GMI, UARTC, 0x3180, N, N, N),
|
||||
PINGROUP(pu0, OWR, UARTA, GMI, RSVD4, RSVD4, 0x3184, N, N, N),
|
||||
PINGROUP(pu1, RSVD1, UARTA, GMI, RSVD4, RSVD4, 0x3188, N, N, N),
|
||||
PINGROUP(pu2, RSVD1, UARTA, GMI, RSVD4, RSVD4, 0x318c, N, N, N),
|
||||
PINGROUP(pu3, PWM0, UARTA, GMI, DISPLAYB, PWM0, 0x3190, N, N, N),
|
||||
PINGROUP(pu4, PWM1, UARTA, GMI, DISPLAYB, PWM1, 0x3194, N, N, N),
|
||||
PINGROUP(pu5, PWM2, UARTA, GMI, DISPLAYB, PWM2, 0x3198, N, N, N),
|
||||
PINGROUP(pu6, PWM3, UARTA, RSVD3, GMI, RSVD3, 0x319c, N, N, N),
|
||||
PINGROUP(gen1_i2c_sda_pc5, I2C1, RSVD2, RSVD3, RSVD4, I2C1, 0x31a0, Y, N, N),
|
||||
PINGROUP(gen1_i2c_scl_pc4, I2C1, RSVD2, RSVD3, RSVD4, I2C1, 0x31a4, Y, N, N),
|
||||
PINGROUP(dap4_fs_pp4, I2S3, GMI, DTV, RSVD4, I2S3, 0x31a8, N, N, N),
|
||||
PINGROUP(dap4_din_pp5, I2S3, GMI, RSVD3, RSVD4, I2S3, 0x31ac, N, N, N),
|
||||
PINGROUP(dap4_dout_pp6, I2S3, GMI, DTV, RSVD4, I2S3, 0x31b0, N, N, N),
|
||||
PINGROUP(dap4_sclk_pp7, I2S3, GMI, RSVD3, RSVD4, I2S3, 0x31b4, N, N, N),
|
||||
PINGROUP(clk3_out_pee0, EXTPERIPH3, RSVD2, RSVD3, RSVD4, RSVD3, 0x31b8, N, N, N),
|
||||
PINGROUP(clk3_req_pee1, DEV3, RSVD2, RSVD3, RSVD4, RSVD4, 0x31bc, N, N, N),
|
||||
PINGROUP(pc7, RSVD1, RSVD2, GMI, GMI_ALT, RSVD1, 0x31c0, N, N, N),
|
||||
PINGROUP(pi5, SDMMC2, RSVD2, GMI, RSVD4, GMI, 0x31c4, N, N, N),
|
||||
PINGROUP(pi7, RSVD1, TRACE, GMI, DTV, RSVD1, 0x31c8, N, N, N),
|
||||
PINGROUP(pk0, RSVD1, SDMMC3, GMI, SOC, RSVD1, 0x31cc, N, N, N),
|
||||
PINGROUP(pk1, SDMMC2, TRACE, GMI, RSVD4, GMI, 0x31d0, N, N, N),
|
||||
PINGROUP(pj0, RSVD1, RSVD2, GMI, USB, RSVD1, 0x31d4, N, N, N),
|
||||
PINGROUP(pj2, RSVD1, RSVD2, GMI, SOC, RSVD1, 0x31d8, N, N, N),
|
||||
PINGROUP(pk3, SDMMC2, TRACE, GMI, CCLA, GMI, 0x31dc, N, N, N),
|
||||
PINGROUP(pk4, SDMMC2, RSVD2, GMI, GMI_ALT, GMI, 0x31e0, N, N, N),
|
||||
PINGROUP(pk2, RSVD1, RSVD2, GMI, RSVD4, RSVD4, 0x31e4, N, N, N),
|
||||
PINGROUP(pi3, RSVD1, RSVD2, GMI, SPI4, RSVD1, 0x31e8, N, N, N),
|
||||
PINGROUP(pi6, RSVD1, RSVD2, GMI, SDMMC2, RSVD1, 0x31ec, N, N, N),
|
||||
PINGROUP(pg0, RSVD1, RSVD2, GMI, RSVD4, RSVD4, 0x31f0, N, N, N),
|
||||
PINGROUP(pg1, RSVD1, RSVD2, GMI, RSVD4, RSVD4, 0x31f4, N, N, N),
|
||||
PINGROUP(pg2, RSVD1, TRACE, GMI, RSVD4, RSVD4, 0x31f8, N, N, N),
|
||||
PINGROUP(pg3, RSVD1, TRACE, GMI, RSVD4, RSVD4, 0x31fc, N, N, N),
|
||||
PINGROUP(pg4, RSVD1, TMDS, GMI, SPI4, RSVD1, 0x3200, N, N, N),
|
||||
PINGROUP(pg5, RSVD1, RSVD2, GMI, SPI4, RSVD1, 0x3204, N, N, N),
|
||||
PINGROUP(pg6, RSVD1, RSVD2, GMI, SPI4, RSVD1, 0x3208, N, N, N),
|
||||
PINGROUP(pg7, RSVD1, RSVD2, GMI, SPI4, RSVD1, 0x320c, N, N, N),
|
||||
PINGROUP(ph0, PWM0, TRACE, GMI, DTV, GMI, 0x3210, N, N, N),
|
||||
PINGROUP(ph1, PWM1, TMDS, GMI, DISPLAYA, GMI, 0x3214, N, N, N),
|
||||
PINGROUP(ph2, PWM2, TMDS, GMI, CLDVFS, GMI, 0x3218, N, N, N),
|
||||
PINGROUP(ph3, PWM3, SPI4, GMI, CLDVFS, GMI, 0x321c, N, N, N),
|
||||
PINGROUP(ph4, SDMMC2, RSVD2, GMI, RSVD4, GMI, 0x3220, N, N, N),
|
||||
PINGROUP(ph5, SDMMC2, RSVD2, GMI, RSVD4, GMI, 0x3224, N, N, N),
|
||||
PINGROUP(ph6, SDMMC2, TRACE, GMI, DTV, GMI, 0x3228, N, N, N),
|
||||
PINGROUP(ph7, SDMMC2, TRACE, GMI, DTV, GMI, 0x322c, N, N, N),
|
||||
PINGROUP(pj7, UARTD, RSVD2, GMI, GMI_ALT, RSVD2, 0x3230, N, N, N),
|
||||
PINGROUP(pb0, UARTD, RSVD2, GMI, RSVD4, RSVD2, 0x3234, N, N, N),
|
||||
PINGROUP(pb1, UARTD, RSVD2, GMI, RSVD4, RSVD2, 0x3238, N, N, N),
|
||||
PINGROUP(pk7, UARTD, RSVD2, GMI, RSVD4, RSVD2, 0x323c, N, N, N),
|
||||
PINGROUP(pi0, RSVD1, RSVD2, GMI, RSVD4, RSVD4, 0x3240, N, N, N),
|
||||
PINGROUP(pi1, RSVD1, RSVD2, GMI, RSVD4, RSVD1, 0x3244, N, N, N),
|
||||
PINGROUP(pi2, SDMMC2, TRACE, GMI, RSVD4, GMI, 0x3248, N, N, N),
|
||||
PINGROUP(pi4, SPI4, TRACE, GMI, DISPLAYA, GMI, 0x324c, N, N, N),
|
||||
PINGROUP(gen2_i2c_scl_pt5, I2C2, RSVD2, GMI, RSVD4, RSVD2, 0x3250, Y, N, N),
|
||||
PINGROUP(gen2_i2c_sda_pt6, I2C2, RSVD2, GMI, RSVD4, RSVD2, 0x3254, Y, N, N),
|
||||
PINGROUP(sdmmc4_clk_pcc4, SDMMC4, RSVD2, GMI, RSVD4, RSVD2, 0x3258, N, Y, N),
|
||||
PINGROUP(sdmmc4_cmd_pt7, SDMMC4, RSVD2, GMI, RSVD4, RSVD2, 0x325c, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat0_paa0, SDMMC4, SPI3, GMI, RSVD4, SDMMC4, 0x3260, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat1_paa1, SDMMC4, SPI3, GMI, RSVD4, SDMMC4, 0x3264, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat2_paa2, SDMMC4, SPI3, GMI, RSVD4, SDMMC4, 0x3268, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat3_paa3, SDMMC4, SPI3, GMI, RSVD4, SDMMC4, 0x326c, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat4_paa4, SDMMC4, SPI3, GMI, RSVD4, SDMMC4, 0x3270, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat5_paa5, SDMMC4, SPI3, RSVD3, RSVD4, SDMMC4, 0x3274, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat6_paa6, SDMMC4, SPI3, GMI, RSVD4, SDMMC4, 0x3278, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat7_paa7, SDMMC4, RSVD2, GMI, RSVD4, SDMMC4, 0x327c, N, Y, N),
|
||||
PINGROUP(cam_mclk_pcc0, VI, VI_ALT1, VI_ALT3, SDMMC2, VI, 0x3284, N, N, N),
|
||||
PINGROUP(pcc1, I2S4, RSVD2, RSVD3, SDMMC2, I2S4, 0x3288, N, N, N),
|
||||
PINGROUP(pbb0, VGP6, VIMCLK2, SDMMC2, VIMCLK2_ALT, VGP6, 0x328c, N, N, N),
|
||||
PINGROUP(cam_i2c_scl_pbb1, VGP1, I2C3, RSVD3, SDMMC2, VGP1, 0x3290, Y, N, N),
|
||||
PINGROUP(cam_i2c_sda_pbb2, VGP2, I2C3, RSVD3, SDMMC2, VGP2, 0x3294, Y, N, N),
|
||||
PINGROUP(pbb3, VGP3, DISPLAYA, DISPLAYB, SDMMC2, VGP3, 0x3298, N, N, N),
|
||||
PINGROUP(pbb4, VGP4, DISPLAYA, DISPLAYB, SDMMC2, VGP4, 0x329c, N, N, N),
|
||||
PINGROUP(pbb5, VGP5, DISPLAYA, RSVD3, SDMMC2, VGP5, 0x32a0, N, N, N),
|
||||
PINGROUP(pbb6, I2S4, RSVD2, DISPLAYB, SDMMC2, I2S4, 0x32a4, N, N, N),
|
||||
PINGROUP(pbb7, I2S4, RSVD2, RSVD3, SDMMC2, I2S4, 0x32a8, N, N, N),
|
||||
PINGROUP(pcc2, I2S4, RSVD2, SDMMC3, SDMMC2, I2S4, 0x32ac, N, N, N),
|
||||
PINGROUP(jtag_rtck, RTCK, RSVD2, RSVD3, RSVD4, RTCK, 0x32b0, N, N, N),
|
||||
PINGROUP(pwr_i2c_scl_pz6, I2CPWR, RSVD2, RSVD3, RSVD4, RSVD2, 0x32b4, Y, N, N),
|
||||
PINGROUP(pwr_i2c_sda_pz7, I2CPWR, RSVD2, RSVD3, RSVD4, RSVD2, 0x32b8, Y, N, N),
|
||||
PINGROUP(kb_row0_pr0, KBC, RSVD2, RSVD3, RSVD4, RSVD4, 0x32bc, N, N, N),
|
||||
PINGROUP(kb_row1_pr1, KBC, RSVD2, RSVD3, RSVD4, RSVD4, 0x32c0, N, N, N),
|
||||
PINGROUP(kb_row2_pr2, KBC, RSVD2, RSVD3, RSVD4, RSVD4, 0x32c4, N, N, N),
|
||||
PINGROUP(kb_row3_pr3, KBC, DISPLAYA, SYS, DISPLAYB, KBC, 0x32c8, N, N, N),
|
||||
PINGROUP(kb_row4_pr4, KBC, DISPLAYA, RSVD3, DISPLAYB, RSVD3, 0x32cc, N, N, N),
|
||||
PINGROUP(kb_row5_pr5, KBC, DISPLAYA, RSVD3, DISPLAYB, RSVD3, 0x32d0, N, N, N),
|
||||
PINGROUP(kb_row6_pr6, KBC, DISPLAYA, DISPLAYA_ALT, DISPLAYB, KBC, 0x32d4, N, N, N),
|
||||
PINGROUP(kb_row7_pr7, KBC, RSVD2, CLDVFS, UARTA, RSVD2, 0x32d8, N, N, N),
|
||||
PINGROUP(kb_row8_ps0, KBC, RSVD2, CLDVFS, UARTA, RSVD2, 0x32dc, N, N, N),
|
||||
PINGROUP(kb_row9_ps1, KBC, RSVD2, RSVD3, UARTA, KBC, 0x32e0, N, N, N),
|
||||
PINGROUP(kb_row10_ps2, KBC, RSVD2, RSVD3, UARTA, KBC, 0x32e4, N, N, N),
|
||||
PINGROUP(kb_row11_ps3, KBC, RSVD2, RSVD3, IRDA, RSVD3, 0x32e8, N, N, N),
|
||||
PINGROUP(kb_row12_ps4, KBC, RSVD2, RSVD3, IRDA, RSVD3, 0x32ec, N, N, N),
|
||||
PINGROUP(kb_row13_ps5, KBC, RSVD2, SPI2, RSVD4, RSVD4, 0x32f0, N, N, N),
|
||||
PINGROUP(kb_row14_ps6, KBC, RSVD2, SPI2, RSVD4, RSVD4, 0x32f4, N, N, N),
|
||||
PINGROUP(kb_row15_ps7, KBC, SOC, RSVD3, RSVD4, KBC, 0x32f8, N, N, N),
|
||||
PINGROUP(kb_col0_pq0, KBC, RSVD2, SPI2, RSVD4, RSVD4, 0x32fc, N, N, N),
|
||||
PINGROUP(kb_col1_pq1, KBC, RSVD2, SPI2, RSVD4, RSVD4, 0x3300, N, N, N),
|
||||
PINGROUP(kb_col2_pq2, KBC, RSVD2, SPI2, RSVD4, RSVD4, 0x3304, N, N, N),
|
||||
PINGROUP(kb_col3_pq3, KBC, DISPLAYA, PWM2, UARTA, KBC, 0x3308, N, N, N),
|
||||
PINGROUP(kb_col4_pq4, KBC, OWR, SDMMC3, UARTA, KBC, 0x330c, N, N, N),
|
||||
PINGROUP(kb_col5_pq5, KBC, RSVD2, SDMMC3, RSVD4, RSVD4, 0x3310, N, N, N),
|
||||
PINGROUP(kb_col6_pq6, KBC, RSVD2, SPI2, UARTD, RSVD2, 0x3314, N, N, N),
|
||||
PINGROUP(kb_col7_pq7, KBC, RSVD2, SPI2, UARTD, RSVD2, 0x3318, N, N, N),
|
||||
PINGROUP(clk_32k_out_pa0, BLINK, SOC, RSVD3, RSVD4, RSVD3, 0x331c, N, N, N),
|
||||
PINGROUP(core_pwr_req, PWRON, RSVD2, RSVD3, RSVD4, RSVD2, 0x3324, N, N, N),
|
||||
PINGROUP(cpu_pwr_req, CPU, RSVD2, RSVD3, RSVD4, RSVD2, 0x3328, N, N, N),
|
||||
PINGROUP(pwr_int_n, PMI, RSVD2, RSVD3, RSVD4, RSVD2, 0x332c, N, N, N),
|
||||
PINGROUP(clk_32k_in, CLK, RSVD2, RSVD3, RSVD4, RSVD2, 0x3330, N, N, N),
|
||||
PINGROUP(owr, OWR, RSVD2, RSVD3, RSVD4, RSVD2, 0x3334, N, N, Y),
|
||||
PINGROUP(dap1_fs_pn0, I2S0, HDA, GMI, RSVD4, RSVD4, 0x3338, N, N, N),
|
||||
PINGROUP(dap1_din_pn1, I2S0, HDA, GMI, RSVD4, RSVD4, 0x333c, N, N, N),
|
||||
PINGROUP(dap1_dout_pn2, I2S0, HDA, GMI, SATA, I2S0, 0x3340, N, N, N),
|
||||
PINGROUP(dap1_sclk_pn3, I2S0, HDA, GMI, RSVD4, I2S0, 0x3344, N, N, N),
|
||||
PINGROUP(dap_mclk1_req_pee2, DAP, DAP1, SATA, RSVD4, DAP, 0x3348, N, N, N),
|
||||
PINGROUP(dap_mclk1_pw4, EXTPERIPH1, DAP2, RSVD3, RSVD4, RSVD3, 0x334c, N, N, N),
|
||||
PINGROUP(spdif_in_pk6, SPDIF, RSVD2, RSVD3, I2C3, RSVD3, 0x3350, N, N, N),
|
||||
PINGROUP(spdif_out_pk5, SPDIF, RSVD2, RSVD3, I2C3, RSVD3, 0x3354, N, N, N),
|
||||
PINGROUP(dap2_fs_pa2, I2S1, HDA, GMI, RSVD4, I2S1, 0x3358, N, N, N),
|
||||
PINGROUP(dap2_din_pa4, I2S1, HDA, GMI, RSVD4, I2S1, 0x335c, N, N, N),
|
||||
PINGROUP(dap2_dout_pa5, I2S1, HDA, GMI, RSVD4, I2S1, 0x3360, N, N, N),
|
||||
PINGROUP(dap2_sclk_pa3, I2S1, HDA, GMI, RSVD4, I2S1, 0x3364, N, N, N),
|
||||
PINGROUP(dvfs_pwm_px0, SPI6, CLDVFS, GMI, RSVD4, SPI6, 0x3368, N, N, N),
|
||||
PINGROUP(gpio_x1_aud_px1, SPI6, RSVD2, GMI, RSVD4, SPI6, 0x336c, N, N, N),
|
||||
PINGROUP(gpio_x3_aud_px3, SPI6, SPI1, GMI, RSVD4, SPI6, 0x3370, N, N, N),
|
||||
PINGROUP(dvfs_clk_px2, SPI6, CLDVFS, GMI, RSVD4, SPI6, 0x3374, N, N, N),
|
||||
PINGROUP(gpio_x4_aud_px4, GMI, SPI1, SPI2, DAP2, SPI1, 0x3378, N, N, N),
|
||||
PINGROUP(gpio_x5_aud_px5, GMI, SPI1, SPI2, RSVD4, SPI1, 0x337c, N, N, N),
|
||||
PINGROUP(gpio_x6_aud_px6, SPI6, SPI1, SPI2, GMI, SPI1, 0x3380, N, N, N),
|
||||
PINGROUP(gpio_x7_aud_px7, RSVD1, SPI1, SPI2, RSVD4, SPI1, 0x3384, N, N, N),
|
||||
PINGROUP(sdmmc3_clk_pa6, SDMMC3, RSVD2, RSVD3, SPI3, SDMMC3, 0x3390, N, N, N),
|
||||
PINGROUP(sdmmc3_cmd_pa7, SDMMC3, PWM3, UARTA, SPI3, SDMMC3, 0x3394, N, N, N),
|
||||
PINGROUP(sdmmc3_dat0_pb7, SDMMC3, RSVD2, RSVD3, SPI3, SDMMC3, 0x3398, N, N, N),
|
||||
PINGROUP(sdmmc3_dat1_pb6, SDMMC3, PWM2, UARTA, SPI3, SDMMC3, 0x339c, N, N, N),
|
||||
PINGROUP(sdmmc3_dat2_pb5, SDMMC3, PWM1, DISPLAYA, SPI3, SDMMC3, 0x33a0, N, N, N),
|
||||
PINGROUP(sdmmc3_dat3_pb4, SDMMC3, PWM0, DISPLAYB, SPI3, SDMMC3, 0x33a4, N, N, N),
|
||||
PINGROUP(pex_l0_rst_n_pdd1, PE0, RSVD2, RSVD3, RSVD4, PE0, 0x33bc, N, N, N),
|
||||
PINGROUP(pex_l0_clkreq_n_pdd2, PE0, RSVD2, RSVD3, RSVD4, PE0, 0x33c0, N, N, N),
|
||||
PINGROUP(pex_wake_n_pdd3, PE, RSVD2, RSVD3, RSVD4, PE, 0x33c4, N, N, N),
|
||||
PINGROUP(pex_l1_rst_n_pdd5, PE1, RSVD2, RSVD3, RSVD4, PE1, 0x33cc, N, N, N),
|
||||
PINGROUP(pex_l1_clkreq_n_pdd6, PE1, RSVD2, RSVD3, RSVD4, PE1, 0x33d0, N, N, N),
|
||||
PINGROUP(hdmi_cec_pee3, CEC, RSVD2, RSVD3, RSVD4, CEC, 0x33e0, Y, N, N),
|
||||
PINGROUP(sdmmc1_wp_n_pv3, SDMMC1, CLK12, SPI4, UARTA, SDMMC1, 0x33e4, N, N, N),
|
||||
PINGROUP(sdmmc3_cd_n_pv2, SDMMC3, OWR, RSVD3, RSVD4, SDMMC3, 0x33e8, N, N, N),
|
||||
PINGROUP(gpio_w2_aud_pw2, SPI6, RSVD2, SPI2, I2C1, RSVD2, 0x33ec, N, N, N),
|
||||
PINGROUP(gpio_w3_aud_pw3, SPI6, SPI1, SPI2, I2C1, SPI1, 0x33f0, N, N, N),
|
||||
PINGROUP(usb_vbus_en0_pn4, USB, RSVD2, RSVD3, RSVD4, USB, 0x33f4, Y, N, N),
|
||||
PINGROUP(usb_vbus_en1_pn5, USB, RSVD2, RSVD3, RSVD4, USB, 0x33f8, Y, N, N),
|
||||
PINGROUP(sdmmc3_clk_lb_in_pee5, SDMMC3, RSVD2, RSVD3, RSVD4, SDMMC3, 0x33fc, N, N, N),
|
||||
PINGROUP(sdmmc3_clk_lb_out_pee4, SDMMC3, RSVD2, RSVD3, RSVD4, SDMMC3, 0x3400, N, N, N),
|
||||
PINGROUP(gmi_clk_lb, SDMMC2, RSVD2, GMI, RSVD4, SDMMC2, 0x3404, N, N, N),
|
||||
PINGROUP(reset_out_n, RSVD1, RSVD2, RSVD3, RESET_OUT_N, RSVD1, 0x3408, N, N, N),
|
||||
PINGROUP(kb_row16_pt0, KBC, RSVD2, RSVD3, UARTC, KBC, 0x340c, N, N, N),
|
||||
PINGROUP(kb_row17_pt1, KBC, RSVD2, RSVD3, UARTC, KBC, 0x3410, N, N, N),
|
||||
PINGROUP(usb_vbus_en2_pff1, USB, RSVD2, RSVD3, RSVD4, USB, 0x3414, Y, N, N),
|
||||
PINGROUP(pff2, SATA, RSVD2, RSVD3, RSVD4, RSVD2, 0x3418, Y, N, N),
|
||||
PINGROUP(dp_hpd_pff0, DP, RSVD2, RSVD3, RSVD4, DP, 0x3430, N, N, N),
|
||||
/* pg_name, f0, f1, f2, f3, r, od, ior, rcv_sel */
|
||||
PINGROUP(ulpi_data0_po1, SPI3, HSI, UARTA, ULPI, 0x3000, N, N, N),
|
||||
PINGROUP(ulpi_data1_po2, SPI3, HSI, UARTA, ULPI, 0x3004, N, N, N),
|
||||
PINGROUP(ulpi_data2_po3, SPI3, HSI, UARTA, ULPI, 0x3008, N, N, N),
|
||||
PINGROUP(ulpi_data3_po4, SPI3, HSI, UARTA, ULPI, 0x300c, N, N, N),
|
||||
PINGROUP(ulpi_data4_po5, SPI2, HSI, UARTA, ULPI, 0x3010, N, N, N),
|
||||
PINGROUP(ulpi_data5_po6, SPI2, HSI, UARTA, ULPI, 0x3014, N, N, N),
|
||||
PINGROUP(ulpi_data6_po7, SPI2, HSI, UARTA, ULPI, 0x3018, N, N, N),
|
||||
PINGROUP(ulpi_data7_po0, SPI2, HSI, UARTA, ULPI, 0x301c, N, N, N),
|
||||
PINGROUP(ulpi_clk_py0, SPI1, SPI5, UARTD, ULPI, 0x3020, N, N, N),
|
||||
PINGROUP(ulpi_dir_py1, SPI1, SPI5, UARTD, ULPI, 0x3024, N, N, N),
|
||||
PINGROUP(ulpi_nxt_py2, SPI1, SPI5, UARTD, ULPI, 0x3028, N, N, N),
|
||||
PINGROUP(ulpi_stp_py3, SPI1, SPI5, UARTD, ULPI, 0x302c, N, N, N),
|
||||
PINGROUP(dap3_fs_pp0, I2S2, SPI5, DISPLAYA, DISPLAYB, 0x3030, N, N, N),
|
||||
PINGROUP(dap3_din_pp1, I2S2, SPI5, DISPLAYA, DISPLAYB, 0x3034, N, N, N),
|
||||
PINGROUP(dap3_dout_pp2, I2S2, SPI5, DISPLAYA, RSVD4, 0x3038, N, N, N),
|
||||
PINGROUP(dap3_sclk_pp3, I2S2, SPI5, RSVD3, DISPLAYB, 0x303c, N, N, N),
|
||||
PINGROUP(pv0, RSVD1, RSVD2, RSVD3, RSVD4, 0x3040, N, N, N),
|
||||
PINGROUP(pv1, RSVD1, RSVD2, RSVD3, RSVD4, 0x3044, N, N, N),
|
||||
PINGROUP(sdmmc1_clk_pz0, SDMMC1, CLK12, RSVD3, RSVD4, 0x3048, N, N, N),
|
||||
PINGROUP(sdmmc1_cmd_pz1, SDMMC1, SPDIF, SPI4, UARTA, 0x304c, N, N, N),
|
||||
PINGROUP(sdmmc1_dat3_py4, SDMMC1, SPDIF, SPI4, UARTA, 0x3050, N, N, N),
|
||||
PINGROUP(sdmmc1_dat2_py5, SDMMC1, PWM0, SPI4, UARTA, 0x3054, N, N, N),
|
||||
PINGROUP(sdmmc1_dat1_py6, SDMMC1, PWM1, SPI4, UARTA, 0x3058, N, N, N),
|
||||
PINGROUP(sdmmc1_dat0_py7, SDMMC1, RSVD2, SPI4, UARTA, 0x305c, N, N, N),
|
||||
PINGROUP(clk2_out_pw5, EXTPERIPH2, RSVD2, RSVD3, RSVD4, 0x3068, N, N, N),
|
||||
PINGROUP(clk2_req_pcc5, DAP, RSVD2, RSVD3, RSVD4, 0x306c, N, N, N),
|
||||
PINGROUP(hdmi_int_pn7, RSVD1, RSVD2, RSVD3, RSVD4, 0x3110, N, N, Y),
|
||||
PINGROUP(ddc_scl_pv4, I2C4, RSVD2, RSVD3, RSVD4, 0x3114, N, N, Y),
|
||||
PINGROUP(ddc_sda_pv5, I2C4, RSVD2, RSVD3, RSVD4, 0x3118, N, N, Y),
|
||||
PINGROUP(uart2_rxd_pc3, IRDA, SPDIF, UARTA, SPI4, 0x3164, N, N, N),
|
||||
PINGROUP(uart2_txd_pc2, IRDA, SPDIF, UARTA, SPI4, 0x3168, N, N, N),
|
||||
PINGROUP(uart2_rts_n_pj6, UARTA, UARTB, GMI, SPI4, 0x316c, N, N, N),
|
||||
PINGROUP(uart2_cts_n_pj5, UARTA, UARTB, GMI, SPI4, 0x3170, N, N, N),
|
||||
PINGROUP(uart3_txd_pw6, UARTC, RSVD2, GMI, SPI4, 0x3174, N, N, N),
|
||||
PINGROUP(uart3_rxd_pw7, UARTC, RSVD2, GMI, SPI4, 0x3178, N, N, N),
|
||||
PINGROUP(uart3_cts_n_pa1, UARTC, SDMMC1, DTV, GMI, 0x317c, N, N, N),
|
||||
PINGROUP(uart3_rts_n_pc0, UARTC, PWM0, DTV, GMI, 0x3180, N, N, N),
|
||||
PINGROUP(pu0, OWR, UARTA, GMI, RSVD4, 0x3184, N, N, N),
|
||||
PINGROUP(pu1, RSVD1, UARTA, GMI, RSVD4, 0x3188, N, N, N),
|
||||
PINGROUP(pu2, RSVD1, UARTA, GMI, RSVD4, 0x318c, N, N, N),
|
||||
PINGROUP(pu3, PWM0, UARTA, GMI, DISPLAYB, 0x3190, N, N, N),
|
||||
PINGROUP(pu4, PWM1, UARTA, GMI, DISPLAYB, 0x3194, N, N, N),
|
||||
PINGROUP(pu5, PWM2, UARTA, GMI, DISPLAYB, 0x3198, N, N, N),
|
||||
PINGROUP(pu6, PWM3, UARTA, RSVD3, GMI, 0x319c, N, N, N),
|
||||
PINGROUP(gen1_i2c_sda_pc5, I2C1, RSVD2, RSVD3, RSVD4, 0x31a0, Y, N, N),
|
||||
PINGROUP(gen1_i2c_scl_pc4, I2C1, RSVD2, RSVD3, RSVD4, 0x31a4, Y, N, N),
|
||||
PINGROUP(dap4_fs_pp4, I2S3, GMI, DTV, RSVD4, 0x31a8, N, N, N),
|
||||
PINGROUP(dap4_din_pp5, I2S3, GMI, RSVD3, RSVD4, 0x31ac, N, N, N),
|
||||
PINGROUP(dap4_dout_pp6, I2S3, GMI, DTV, RSVD4, 0x31b0, N, N, N),
|
||||
PINGROUP(dap4_sclk_pp7, I2S3, GMI, RSVD3, RSVD4, 0x31b4, N, N, N),
|
||||
PINGROUP(clk3_out_pee0, EXTPERIPH3, RSVD2, RSVD3, RSVD4, 0x31b8, N, N, N),
|
||||
PINGROUP(clk3_req_pee1, DEV3, RSVD2, RSVD3, RSVD4, 0x31bc, N, N, N),
|
||||
PINGROUP(pc7, RSVD1, RSVD2, GMI, GMI_ALT, 0x31c0, N, N, N),
|
||||
PINGROUP(pi5, SDMMC2, RSVD2, GMI, RSVD4, 0x31c4, N, N, N),
|
||||
PINGROUP(pi7, RSVD1, TRACE, GMI, DTV, 0x31c8, N, N, N),
|
||||
PINGROUP(pk0, RSVD1, SDMMC3, GMI, SOC, 0x31cc, N, N, N),
|
||||
PINGROUP(pk1, SDMMC2, TRACE, GMI, RSVD4, 0x31d0, N, N, N),
|
||||
PINGROUP(pj0, RSVD1, RSVD2, GMI, USB, 0x31d4, N, N, N),
|
||||
PINGROUP(pj2, RSVD1, RSVD2, GMI, SOC, 0x31d8, N, N, N),
|
||||
PINGROUP(pk3, SDMMC2, TRACE, GMI, CCLA, 0x31dc, N, N, N),
|
||||
PINGROUP(pk4, SDMMC2, RSVD2, GMI, GMI_ALT, 0x31e0, N, N, N),
|
||||
PINGROUP(pk2, RSVD1, RSVD2, GMI, RSVD4, 0x31e4, N, N, N),
|
||||
PINGROUP(pi3, RSVD1, RSVD2, GMI, SPI4, 0x31e8, N, N, N),
|
||||
PINGROUP(pi6, RSVD1, RSVD2, GMI, SDMMC2, 0x31ec, N, N, N),
|
||||
PINGROUP(pg0, RSVD1, RSVD2, GMI, RSVD4, 0x31f0, N, N, N),
|
||||
PINGROUP(pg1, RSVD1, RSVD2, GMI, RSVD4, 0x31f4, N, N, N),
|
||||
PINGROUP(pg2, RSVD1, TRACE, GMI, RSVD4, 0x31f8, N, N, N),
|
||||
PINGROUP(pg3, RSVD1, TRACE, GMI, RSVD4, 0x31fc, N, N, N),
|
||||
PINGROUP(pg4, RSVD1, TMDS, GMI, SPI4, 0x3200, N, N, N),
|
||||
PINGROUP(pg5, RSVD1, RSVD2, GMI, SPI4, 0x3204, N, N, N),
|
||||
PINGROUP(pg6, RSVD1, RSVD2, GMI, SPI4, 0x3208, N, N, N),
|
||||
PINGROUP(pg7, RSVD1, RSVD2, GMI, SPI4, 0x320c, N, N, N),
|
||||
PINGROUP(ph0, PWM0, TRACE, GMI, DTV, 0x3210, N, N, N),
|
||||
PINGROUP(ph1, PWM1, TMDS, GMI, DISPLAYA, 0x3214, N, N, N),
|
||||
PINGROUP(ph2, PWM2, TMDS, GMI, CLDVFS, 0x3218, N, N, N),
|
||||
PINGROUP(ph3, PWM3, SPI4, GMI, CLDVFS, 0x321c, N, N, N),
|
||||
PINGROUP(ph4, SDMMC2, RSVD2, GMI, RSVD4, 0x3220, N, N, N),
|
||||
PINGROUP(ph5, SDMMC2, RSVD2, GMI, RSVD4, 0x3224, N, N, N),
|
||||
PINGROUP(ph6, SDMMC2, TRACE, GMI, DTV, 0x3228, N, N, N),
|
||||
PINGROUP(ph7, SDMMC2, TRACE, GMI, DTV, 0x322c, N, N, N),
|
||||
PINGROUP(pj7, UARTD, RSVD2, GMI, GMI_ALT, 0x3230, N, N, N),
|
||||
PINGROUP(pb0, UARTD, RSVD2, GMI, RSVD4, 0x3234, N, N, N),
|
||||
PINGROUP(pb1, UARTD, RSVD2, GMI, RSVD4, 0x3238, N, N, N),
|
||||
PINGROUP(pk7, UARTD, RSVD2, GMI, RSVD4, 0x323c, N, N, N),
|
||||
PINGROUP(pi0, RSVD1, RSVD2, GMI, RSVD4, 0x3240, N, N, N),
|
||||
PINGROUP(pi1, RSVD1, RSVD2, GMI, RSVD4, 0x3244, N, N, N),
|
||||
PINGROUP(pi2, SDMMC2, TRACE, GMI, RSVD4, 0x3248, N, N, N),
|
||||
PINGROUP(pi4, SPI4, TRACE, GMI, DISPLAYA, 0x324c, N, N, N),
|
||||
PINGROUP(gen2_i2c_scl_pt5, I2C2, RSVD2, GMI, RSVD4, 0x3250, Y, N, N),
|
||||
PINGROUP(gen2_i2c_sda_pt6, I2C2, RSVD2, GMI, RSVD4, 0x3254, Y, N, N),
|
||||
PINGROUP(sdmmc4_clk_pcc4, SDMMC4, RSVD2, GMI, RSVD4, 0x3258, N, Y, N),
|
||||
PINGROUP(sdmmc4_cmd_pt7, SDMMC4, RSVD2, GMI, RSVD4, 0x325c, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat0_paa0, SDMMC4, SPI3, GMI, RSVD4, 0x3260, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat1_paa1, SDMMC4, SPI3, GMI, RSVD4, 0x3264, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat2_paa2, SDMMC4, SPI3, GMI, RSVD4, 0x3268, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat3_paa3, SDMMC4, SPI3, GMI, RSVD4, 0x326c, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat4_paa4, SDMMC4, SPI3, GMI, RSVD4, 0x3270, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat5_paa5, SDMMC4, SPI3, RSVD3, RSVD4, 0x3274, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat6_paa6, SDMMC4, SPI3, GMI, RSVD4, 0x3278, N, Y, N),
|
||||
PINGROUP(sdmmc4_dat7_paa7, SDMMC4, RSVD2, GMI, RSVD4, 0x327c, N, Y, N),
|
||||
PINGROUP(cam_mclk_pcc0, VI, VI_ALT1, VI_ALT3, SDMMC2, 0x3284, N, N, N),
|
||||
PINGROUP(pcc1, I2S4, RSVD2, RSVD3, SDMMC2, 0x3288, N, N, N),
|
||||
PINGROUP(pbb0, VGP6, VIMCLK2, SDMMC2, VIMCLK2_ALT, 0x328c, N, N, N),
|
||||
PINGROUP(cam_i2c_scl_pbb1, VGP1, I2C3, RSVD3, SDMMC2, 0x3290, Y, N, N),
|
||||
PINGROUP(cam_i2c_sda_pbb2, VGP2, I2C3, RSVD3, SDMMC2, 0x3294, Y, N, N),
|
||||
PINGROUP(pbb3, VGP3, DISPLAYA, DISPLAYB, SDMMC2, 0x3298, N, N, N),
|
||||
PINGROUP(pbb4, VGP4, DISPLAYA, DISPLAYB, SDMMC2, 0x329c, N, N, N),
|
||||
PINGROUP(pbb5, VGP5, DISPLAYA, RSVD3, SDMMC2, 0x32a0, N, N, N),
|
||||
PINGROUP(pbb6, I2S4, RSVD2, DISPLAYB, SDMMC2, 0x32a4, N, N, N),
|
||||
PINGROUP(pbb7, I2S4, RSVD2, RSVD3, SDMMC2, 0x32a8, N, N, N),
|
||||
PINGROUP(pcc2, I2S4, RSVD2, SDMMC3, SDMMC2, 0x32ac, N, N, N),
|
||||
PINGROUP(jtag_rtck, RTCK, RSVD2, RSVD3, RSVD4, 0x32b0, N, N, N),
|
||||
PINGROUP(pwr_i2c_scl_pz6, I2CPWR, RSVD2, RSVD3, RSVD4, 0x32b4, Y, N, N),
|
||||
PINGROUP(pwr_i2c_sda_pz7, I2CPWR, RSVD2, RSVD3, RSVD4, 0x32b8, Y, N, N),
|
||||
PINGROUP(kb_row0_pr0, KBC, RSVD2, RSVD3, RSVD4, 0x32bc, N, N, N),
|
||||
PINGROUP(kb_row1_pr1, KBC, RSVD2, RSVD3, RSVD4, 0x32c0, N, N, N),
|
||||
PINGROUP(kb_row2_pr2, KBC, RSVD2, RSVD3, RSVD4, 0x32c4, N, N, N),
|
||||
PINGROUP(kb_row3_pr3, KBC, DISPLAYA, SYS, DISPLAYB, 0x32c8, N, N, N),
|
||||
PINGROUP(kb_row4_pr4, KBC, DISPLAYA, RSVD3, DISPLAYB, 0x32cc, N, N, N),
|
||||
PINGROUP(kb_row5_pr5, KBC, DISPLAYA, RSVD3, DISPLAYB, 0x32d0, N, N, N),
|
||||
PINGROUP(kb_row6_pr6, KBC, DISPLAYA, DISPLAYA_ALT, DISPLAYB, 0x32d4, N, N, N),
|
||||
PINGROUP(kb_row7_pr7, KBC, RSVD2, CLDVFS, UARTA, 0x32d8, N, N, N),
|
||||
PINGROUP(kb_row8_ps0, KBC, RSVD2, CLDVFS, UARTA, 0x32dc, N, N, N),
|
||||
PINGROUP(kb_row9_ps1, KBC, RSVD2, RSVD3, UARTA, 0x32e0, N, N, N),
|
||||
PINGROUP(kb_row10_ps2, KBC, RSVD2, RSVD3, UARTA, 0x32e4, N, N, N),
|
||||
PINGROUP(kb_row11_ps3, KBC, RSVD2, RSVD3, IRDA, 0x32e8, N, N, N),
|
||||
PINGROUP(kb_row12_ps4, KBC, RSVD2, RSVD3, IRDA, 0x32ec, N, N, N),
|
||||
PINGROUP(kb_row13_ps5, KBC, RSVD2, SPI2, RSVD4, 0x32f0, N, N, N),
|
||||
PINGROUP(kb_row14_ps6, KBC, RSVD2, SPI2, RSVD4, 0x32f4, N, N, N),
|
||||
PINGROUP(kb_row15_ps7, KBC, SOC, RSVD3, RSVD4, 0x32f8, N, N, N),
|
||||
PINGROUP(kb_col0_pq0, KBC, RSVD2, SPI2, RSVD4, 0x32fc, N, N, N),
|
||||
PINGROUP(kb_col1_pq1, KBC, RSVD2, SPI2, RSVD4, 0x3300, N, N, N),
|
||||
PINGROUP(kb_col2_pq2, KBC, RSVD2, SPI2, RSVD4, 0x3304, N, N, N),
|
||||
PINGROUP(kb_col3_pq3, KBC, DISPLAYA, PWM2, UARTA, 0x3308, N, N, N),
|
||||
PINGROUP(kb_col4_pq4, KBC, OWR, SDMMC3, UARTA, 0x330c, N, N, N),
|
||||
PINGROUP(kb_col5_pq5, KBC, RSVD2, SDMMC3, RSVD4, 0x3310, N, N, N),
|
||||
PINGROUP(kb_col6_pq6, KBC, RSVD2, SPI2, UARTD, 0x3314, N, N, N),
|
||||
PINGROUP(kb_col7_pq7, KBC, RSVD2, SPI2, UARTD, 0x3318, N, N, N),
|
||||
PINGROUP(clk_32k_out_pa0, BLINK, SOC, RSVD3, RSVD4, 0x331c, N, N, N),
|
||||
PINGROUP(core_pwr_req, PWRON, RSVD2, RSVD3, RSVD4, 0x3324, N, N, N),
|
||||
PINGROUP(cpu_pwr_req, CPU, RSVD2, RSVD3, RSVD4, 0x3328, N, N, N),
|
||||
PINGROUP(pwr_int_n, PMI, RSVD2, RSVD3, RSVD4, 0x332c, N, N, N),
|
||||
PINGROUP(clk_32k_in, CLK, RSVD2, RSVD3, RSVD4, 0x3330, N, N, N),
|
||||
PINGROUP(owr, OWR, RSVD2, RSVD3, RSVD4, 0x3334, N, N, Y),
|
||||
PINGROUP(dap1_fs_pn0, I2S0, HDA, GMI, RSVD4, 0x3338, N, N, N),
|
||||
PINGROUP(dap1_din_pn1, I2S0, HDA, GMI, RSVD4, 0x333c, N, N, N),
|
||||
PINGROUP(dap1_dout_pn2, I2S0, HDA, GMI, SATA, 0x3340, N, N, N),
|
||||
PINGROUP(dap1_sclk_pn3, I2S0, HDA, GMI, RSVD4, 0x3344, N, N, N),
|
||||
PINGROUP(dap_mclk1_req_pee2, DAP, DAP1, SATA, RSVD4, 0x3348, N, N, N),
|
||||
PINGROUP(dap_mclk1_pw4, EXTPERIPH1, DAP2, RSVD3, RSVD4, 0x334c, N, N, N),
|
||||
PINGROUP(spdif_in_pk6, SPDIF, RSVD2, RSVD3, I2C3, 0x3350, N, N, N),
|
||||
PINGROUP(spdif_out_pk5, SPDIF, RSVD2, RSVD3, I2C3, 0x3354, N, N, N),
|
||||
PINGROUP(dap2_fs_pa2, I2S1, HDA, GMI, RSVD4, 0x3358, N, N, N),
|
||||
PINGROUP(dap2_din_pa4, I2S1, HDA, GMI, RSVD4, 0x335c, N, N, N),
|
||||
PINGROUP(dap2_dout_pa5, I2S1, HDA, GMI, RSVD4, 0x3360, N, N, N),
|
||||
PINGROUP(dap2_sclk_pa3, I2S1, HDA, GMI, RSVD4, 0x3364, N, N, N),
|
||||
PINGROUP(dvfs_pwm_px0, SPI6, CLDVFS, GMI, RSVD4, 0x3368, N, N, N),
|
||||
PINGROUP(gpio_x1_aud_px1, SPI6, RSVD2, GMI, RSVD4, 0x336c, N, N, N),
|
||||
PINGROUP(gpio_x3_aud_px3, SPI6, SPI1, GMI, RSVD4, 0x3370, N, N, N),
|
||||
PINGROUP(dvfs_clk_px2, SPI6, CLDVFS, GMI, RSVD4, 0x3374, N, N, N),
|
||||
PINGROUP(gpio_x4_aud_px4, GMI, SPI1, SPI2, DAP2, 0x3378, N, N, N),
|
||||
PINGROUP(gpio_x5_aud_px5, GMI, SPI1, SPI2, RSVD4, 0x337c, N, N, N),
|
||||
PINGROUP(gpio_x6_aud_px6, SPI6, SPI1, SPI2, GMI, 0x3380, N, N, N),
|
||||
PINGROUP(gpio_x7_aud_px7, RSVD1, SPI1, SPI2, RSVD4, 0x3384, N, N, N),
|
||||
PINGROUP(sdmmc3_clk_pa6, SDMMC3, RSVD2, RSVD3, SPI3, 0x3390, N, N, N),
|
||||
PINGROUP(sdmmc3_cmd_pa7, SDMMC3, PWM3, UARTA, SPI3, 0x3394, N, N, N),
|
||||
PINGROUP(sdmmc3_dat0_pb7, SDMMC3, RSVD2, RSVD3, SPI3, 0x3398, N, N, N),
|
||||
PINGROUP(sdmmc3_dat1_pb6, SDMMC3, PWM2, UARTA, SPI3, 0x339c, N, N, N),
|
||||
PINGROUP(sdmmc3_dat2_pb5, SDMMC3, PWM1, DISPLAYA, SPI3, 0x33a0, N, N, N),
|
||||
PINGROUP(sdmmc3_dat3_pb4, SDMMC3, PWM0, DISPLAYB, SPI3, 0x33a4, N, N, N),
|
||||
PINGROUP(pex_l0_rst_n_pdd1, PE0, RSVD2, RSVD3, RSVD4, 0x33bc, N, N, N),
|
||||
PINGROUP(pex_l0_clkreq_n_pdd2, PE0, RSVD2, RSVD3, RSVD4, 0x33c0, N, N, N),
|
||||
PINGROUP(pex_wake_n_pdd3, PE, RSVD2, RSVD3, RSVD4, 0x33c4, N, N, N),
|
||||
PINGROUP(pex_l1_rst_n_pdd5, PE1, RSVD2, RSVD3, RSVD4, 0x33cc, N, N, N),
|
||||
PINGROUP(pex_l1_clkreq_n_pdd6, PE1, RSVD2, RSVD3, RSVD4, 0x33d0, N, N, N),
|
||||
PINGROUP(hdmi_cec_pee3, CEC, RSVD2, RSVD3, RSVD4, 0x33e0, Y, N, N),
|
||||
PINGROUP(sdmmc1_wp_n_pv3, SDMMC1, CLK12, SPI4, UARTA, 0x33e4, N, N, N),
|
||||
PINGROUP(sdmmc3_cd_n_pv2, SDMMC3, OWR, RSVD3, RSVD4, 0x33e8, N, N, N),
|
||||
PINGROUP(gpio_w2_aud_pw2, SPI6, RSVD2, SPI2, I2C1, 0x33ec, N, N, N),
|
||||
PINGROUP(gpio_w3_aud_pw3, SPI6, SPI1, SPI2, I2C1, 0x33f0, N, N, N),
|
||||
PINGROUP(usb_vbus_en0_pn4, USB, RSVD2, RSVD3, RSVD4, 0x33f4, Y, N, N),
|
||||
PINGROUP(usb_vbus_en1_pn5, USB, RSVD2, RSVD3, RSVD4, 0x33f8, Y, N, N),
|
||||
PINGROUP(sdmmc3_clk_lb_in_pee5, SDMMC3, RSVD2, RSVD3, RSVD4, 0x33fc, N, N, N),
|
||||
PINGROUP(sdmmc3_clk_lb_out_pee4, SDMMC3, RSVD2, RSVD3, RSVD4, 0x3400, N, N, N),
|
||||
PINGROUP(gmi_clk_lb, SDMMC2, RSVD2, GMI, RSVD4, 0x3404, N, N, N),
|
||||
PINGROUP(reset_out_n, RSVD1, RSVD2, RSVD3, RESET_OUT_N, 0x3408, N, N, N),
|
||||
PINGROUP(kb_row16_pt0, KBC, RSVD2, RSVD3, UARTC, 0x340c, N, N, N),
|
||||
PINGROUP(kb_row17_pt1, KBC, RSVD2, RSVD3, UARTC, 0x3410, N, N, N),
|
||||
PINGROUP(usb_vbus_en2_pff1, USB, RSVD2, RSVD3, RSVD4, 0x3414, Y, N, N),
|
||||
PINGROUP(pff2, SATA, RSVD2, RSVD3, RSVD4, 0x3418, Y, N, N),
|
||||
PINGROUP(dp_hpd_pff0, DP, RSVD2, RSVD3, RSVD4, 0x3430, N, N, N),
|
||||
|
||||
/* pg_name, r, hsm_b, schmitt_b, lpmd_b, drvdn_b, drvdn_w, drvup_b, drvup_w, slwr_b, slwr_w, slwf_b, slwf_w, drvtype */
|
||||
DRV_PINGROUP(ao1, 0x868, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(ao2, 0x86c, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(at1, 0x870, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(at2, 0x874, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(at3, 0x878, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(at4, 0x87c, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(at5, 0x880, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(cdev1, 0x884, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(cdev2, 0x888, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(dap1, 0x890, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(dap2, 0x894, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(dap3, 0x898, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(dap4, 0x89c, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(dbg, 0x8a0, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(sdio3, 0x8b0, 2, 3, -1, 12, 7, 20, 7, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(spi, 0x8b4, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(uaa, 0x8b8, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(uab, 0x8bc, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(uart2, 0x8c0, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(uart3, 0x8c4, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(sdio1, 0x8ec, 2, 3, -1, 12, 7, 20, 7, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(ddc, 0x8fc, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(gma, 0x900, 2, 3, 4, 14, 5, 20, 5, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(gme, 0x910, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(gmf, 0x914, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(gmg, 0x918, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(gmh, 0x91c, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(owr, 0x920, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(uda, 0x924, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(gpv, 0x928, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(dev3, 0x92c, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(cec, 0x938, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(at6, 0x994, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(dap5, 0x998, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(usb_vbus_en, 0x99c, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(ao3, 0x9a8, 2, 3, 4, 12, 5, -1, -1, 28, 2, -1, -1, N),
|
||||
DRV_PINGROUP(ao0, 0x9b0, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(hv0, 0x9b4, 2, 3, 4, 12, 5, -1, -1, 28, 2, -1, -1, N),
|
||||
DRV_PINGROUP(sdio4, 0x9c4, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(ao4, 0x9c8, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(ao1, 0x868, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(ao2, 0x86c, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(at1, 0x870, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(at2, 0x874, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(at3, 0x878, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(at4, 0x87c, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(at5, 0x880, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(cdev1, 0x884, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(cdev2, 0x888, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(dap1, 0x890, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(dap2, 0x894, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(dap3, 0x898, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(dap4, 0x89c, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(dbg, 0x8a0, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(sdio3, 0x8b0, 2, 3, -1, 12, 7, 20, 7, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(spi, 0x8b4, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(uaa, 0x8b8, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(uab, 0x8bc, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(uart2, 0x8c0, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(uart3, 0x8c4, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(sdio1, 0x8ec, 2, 3, -1, 12, 7, 20, 7, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(ddc, 0x8fc, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(gma, 0x900, 2, 3, 4, 14, 5, 20, 5, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(gme, 0x910, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(gmf, 0x914, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(gmg, 0x918, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(gmh, 0x91c, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(owr, 0x920, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(uda, 0x924, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(gpv, 0x928, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(dev3, 0x92c, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(cec, 0x938, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(at6, 0x994, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
|
||||
DRV_PINGROUP(dap5, 0x998, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(usb_vbus_en, 0x99c, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(ao3, 0x9a8, 2, 3, 4, 12, 5, -1, -1, 28, 2, -1, -1, N),
|
||||
DRV_PINGROUP(ao0, 0x9b0, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(hv0, 0x9b4, 2, 3, 4, 12, 5, -1, -1, 28, 2, -1, -1, N),
|
||||
DRV_PINGROUP(sdio4, 0x9c4, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
|
||||
DRV_PINGROUP(ao4, 0x9c8, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
|
||||
};
|
||||
|
||||
static const struct tegra_pinctrl_soc_data tegra124_pinctrl = {
|
||||
|
|
|
@ -1973,7 +1973,7 @@ static struct tegra_function tegra20_functions[] = {
|
|||
#define PINGROUP_REG_A 0x868
|
||||
|
||||
/* Pin group with mux control, and typically tri-state and pull-up/down too */
|
||||
#define MUX_PG(pg_name, f0, f1, f2, f3, f_safe, \
|
||||
#define MUX_PG(pg_name, f0, f1, f2, f3, \
|
||||
tri_r, tri_b, mux_r, mux_b, pupd_r, pupd_b) \
|
||||
{ \
|
||||
.name = #pg_name, \
|
||||
|
@ -1985,7 +1985,6 @@ static struct tegra_function tegra20_functions[] = {
|
|||
TEGRA_MUX_ ## f2, \
|
||||
TEGRA_MUX_ ## f3, \
|
||||
}, \
|
||||
.func_safe = TEGRA_MUX_ ## f_safe, \
|
||||
.mux_reg = ((mux_r) - PIN_MUX_CTL_REG_A), \
|
||||
.mux_bank = 1, \
|
||||
.mux_bit = mux_b, \
|
||||
|
@ -1995,13 +1994,12 @@ static struct tegra_function tegra20_functions[] = {
|
|||
.tri_reg = ((tri_r) - TRISTATE_REG_A), \
|
||||
.tri_bank = 0, \
|
||||
.tri_bit = tri_b, \
|
||||
.einput_reg = -1, \
|
||||
.odrain_reg = -1, \
|
||||
.lock_reg = -1, \
|
||||
.ioreset_reg = -1, \
|
||||
.rcv_sel_reg = -1, \
|
||||
.einput_bit = -1, \
|
||||
.odrain_bit = -1, \
|
||||
.lock_bit = -1, \
|
||||
.ioreset_bit = -1, \
|
||||
.rcv_sel_bit = -1, \
|
||||
.drv_reg = -1, \
|
||||
.drvtype_reg = -1, \
|
||||
}
|
||||
|
||||
/* Pin groups with only pull up and pull down control */
|
||||
|
@ -2014,14 +2012,7 @@ static struct tegra_function tegra20_functions[] = {
|
|||
.pupd_reg = ((pupd_r) - PULLUPDOWN_REG_A), \
|
||||
.pupd_bank = 2, \
|
||||
.pupd_bit = pupd_b, \
|
||||
.tri_reg = -1, \
|
||||
.einput_reg = -1, \
|
||||
.odrain_reg = -1, \
|
||||
.lock_reg = -1, \
|
||||
.ioreset_reg = -1, \
|
||||
.rcv_sel_reg = -1, \
|
||||
.drv_reg = -1, \
|
||||
.drvtype_reg = -1, \
|
||||
}
|
||||
|
||||
/* Pin groups for drive strength registers (configurable version) */
|
||||
|
@ -2035,11 +2026,6 @@ static struct tegra_function tegra20_functions[] = {
|
|||
.mux_reg = -1, \
|
||||
.pupd_reg = -1, \
|
||||
.tri_reg = -1, \
|
||||
.einput_reg = -1, \
|
||||
.odrain_reg = -1, \
|
||||
.lock_reg = -1, \
|
||||
.ioreset_reg = -1, \
|
||||
.rcv_sel_reg = -1, \
|
||||
.drv_reg = ((r) - PINGROUP_REG_A), \
|
||||
.drv_bank = 3, \
|
||||
.hsm_bit = hsm_b, \
|
||||
|
@ -2053,7 +2039,7 @@ static struct tegra_function tegra20_functions[] = {
|
|||
.slwr_width = slwr_w, \
|
||||
.slwf_bit = slwf_b, \
|
||||
.slwf_width = slwf_w, \
|
||||
.drvtype_reg = -1, \
|
||||
.drvtype_bit = -1, \
|
||||
}
|
||||
|
||||
/* Pin groups for drive strength registers (simple version) */
|
||||
|
@ -2061,114 +2047,114 @@ static struct tegra_function tegra20_functions[] = {
|
|||
DRV_PG_EXT(pg_name, r, 2, 3, 4, 12, 20, 28, 2, 30, 2)
|
||||
|
||||
static const struct tegra_pingroup tegra20_groups[] = {
|
||||
/* name, f0, f1, f2, f3, f_safe, tri r/b, mux r/b, pupd r/b */
|
||||
MUX_PG(ata, IDE, NAND, GMI, RSVD4, IDE, 0x14, 0, 0x80, 24, 0xa0, 0),
|
||||
MUX_PG(atb, IDE, NAND, GMI, SDIO4, IDE, 0x14, 1, 0x80, 16, 0xa0, 2),
|
||||
MUX_PG(atc, IDE, NAND, GMI, SDIO4, IDE, 0x14, 2, 0x80, 22, 0xa0, 4),
|
||||
MUX_PG(atd, IDE, NAND, GMI, SDIO4, IDE, 0x14, 3, 0x80, 20, 0xa0, 6),
|
||||
MUX_PG(ate, IDE, NAND, GMI, RSVD4, IDE, 0x18, 25, 0x80, 12, 0xa0, 8),
|
||||
MUX_PG(cdev1, OSC, PLLA_OUT, PLLM_OUT1, AUDIO_SYNC, OSC, 0x14, 4, 0x88, 2, 0xa8, 0),
|
||||
MUX_PG(cdev2, OSC, AHB_CLK, APB_CLK, PLLP_OUT4, OSC, 0x14, 5, 0x88, 4, 0xa8, 2),
|
||||
MUX_PG(crtp, CRT, RSVD2, RSVD3, RSVD4, RSVD2, 0x20, 14, 0x98, 20, 0xa4, 24),
|
||||
MUX_PG(csus, PLLC_OUT1, PLLP_OUT2, PLLP_OUT3, VI_SENSOR_CLK, PLLC_OUT1, 0x14, 6, 0x88, 6, 0xac, 24),
|
||||
MUX_PG(dap1, DAP1, RSVD2, GMI, SDIO2, DAP1, 0x14, 7, 0x88, 20, 0xa0, 10),
|
||||
MUX_PG(dap2, DAP2, TWC, RSVD3, GMI, DAP2, 0x14, 8, 0x88, 22, 0xa0, 12),
|
||||
MUX_PG(dap3, DAP3, RSVD2, RSVD3, RSVD4, DAP3, 0x14, 9, 0x88, 24, 0xa0, 14),
|
||||
MUX_PG(dap4, DAP4, RSVD2, GMI, RSVD4, DAP4, 0x14, 10, 0x88, 26, 0xa0, 16),
|
||||
MUX_PG(ddc, I2C2, RSVD2, RSVD3, RSVD4, RSVD4, 0x18, 31, 0x88, 0, 0xb0, 28),
|
||||
MUX_PG(dta, RSVD1, SDIO2, VI, RSVD4, RSVD4, 0x14, 11, 0x84, 20, 0xa0, 18),
|
||||
MUX_PG(dtb, RSVD1, RSVD2, VI, SPI1, RSVD1, 0x14, 12, 0x84, 22, 0xa0, 20),
|
||||
MUX_PG(dtc, RSVD1, RSVD2, VI, RSVD4, RSVD1, 0x14, 13, 0x84, 26, 0xa0, 22),
|
||||
MUX_PG(dtd, RSVD1, SDIO2, VI, RSVD4, RSVD1, 0x14, 14, 0x84, 28, 0xa0, 24),
|
||||
MUX_PG(dte, RSVD1, RSVD2, VI, SPI1, RSVD1, 0x14, 15, 0x84, 30, 0xa0, 26),
|
||||
MUX_PG(dtf, I2C3, RSVD2, VI, RSVD4, RSVD4, 0x20, 12, 0x98, 30, 0xa0, 28),
|
||||
MUX_PG(gma, UARTE, SPI3, GMI, SDIO4, SPI3, 0x14, 28, 0x84, 0, 0xb0, 20),
|
||||
MUX_PG(gmb, IDE, NAND, GMI, GMI_INT, GMI, 0x18, 29, 0x88, 28, 0xb0, 22),
|
||||
MUX_PG(gmc, UARTD, SPI4, GMI, SFLASH, SPI4, 0x14, 29, 0x84, 2, 0xb0, 24),
|
||||
MUX_PG(gmd, RSVD1, NAND, GMI, SFLASH, GMI, 0x18, 30, 0x88, 30, 0xb0, 26),
|
||||
MUX_PG(gme, RSVD1, DAP5, GMI, SDIO4, GMI, 0x18, 0, 0x8c, 0, 0xa8, 24),
|
||||
MUX_PG(gpu, PWM, UARTA, GMI, RSVD4, RSVD4, 0x14, 16, 0x8c, 4, 0xa4, 20),
|
||||
MUX_PG(gpu7, RTCK, RSVD2, RSVD3, RSVD4, RTCK, 0x20, 11, 0x98, 28, 0xa4, 6),
|
||||
MUX_PG(gpv, PCIE, RSVD2, RSVD3, RSVD4, PCIE, 0x14, 17, 0x8c, 2, 0xa0, 30),
|
||||
MUX_PG(hdint, HDMI, RSVD2, RSVD3, RSVD4, HDMI, 0x1c, 23, 0x84, 4, -1, -1),
|
||||
MUX_PG(i2cp, I2CP, RSVD2, RSVD3, RSVD4, RSVD4, 0x14, 18, 0x88, 8, 0xa4, 2),
|
||||
MUX_PG(irrx, UARTA, UARTB, GMI, SPI4, UARTB, 0x14, 20, 0x88, 18, 0xa8, 22),
|
||||
MUX_PG(irtx, UARTA, UARTB, GMI, SPI4, UARTB, 0x14, 19, 0x88, 16, 0xa8, 20),
|
||||
MUX_PG(kbca, KBC, NAND, SDIO2, EMC_TEST0_DLL, KBC, 0x14, 22, 0x88, 10, 0xa4, 8),
|
||||
MUX_PG(kbcb, KBC, NAND, SDIO2, MIO, KBC, 0x14, 21, 0x88, 12, 0xa4, 10),
|
||||
MUX_PG(kbcc, KBC, NAND, TRACE, EMC_TEST1_DLL, KBC, 0x18, 26, 0x88, 14, 0xa4, 12),
|
||||
MUX_PG(kbcd, KBC, NAND, SDIO2, MIO, KBC, 0x20, 10, 0x98, 26, 0xa4, 14),
|
||||
MUX_PG(kbce, KBC, NAND, OWR, RSVD4, KBC, 0x14, 26, 0x80, 28, 0xb0, 2),
|
||||
MUX_PG(kbcf, KBC, NAND, TRACE, MIO, KBC, 0x14, 27, 0x80, 26, 0xb0, 0),
|
||||
MUX_PG(lcsn, DISPLAYA, DISPLAYB, SPI3, RSVD4, RSVD4, 0x1c, 31, 0x90, 12, -1, -1),
|
||||
MUX_PG(ld0, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 0, 0x94, 0, -1, -1),
|
||||
MUX_PG(ld1, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 1, 0x94, 2, -1, -1),
|
||||
MUX_PG(ld2, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 2, 0x94, 4, -1, -1),
|
||||
MUX_PG(ld3, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 3, 0x94, 6, -1, -1),
|
||||
MUX_PG(ld4, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 4, 0x94, 8, -1, -1),
|
||||
MUX_PG(ld5, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 5, 0x94, 10, -1, -1),
|
||||
MUX_PG(ld6, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 6, 0x94, 12, -1, -1),
|
||||
MUX_PG(ld7, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 7, 0x94, 14, -1, -1),
|
||||
MUX_PG(ld8, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 8, 0x94, 16, -1, -1),
|
||||
MUX_PG(ld9, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 9, 0x94, 18, -1, -1),
|
||||
MUX_PG(ld10, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 10, 0x94, 20, -1, -1),
|
||||
MUX_PG(ld11, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 11, 0x94, 22, -1, -1),
|
||||
MUX_PG(ld12, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 12, 0x94, 24, -1, -1),
|
||||
MUX_PG(ld13, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 13, 0x94, 26, -1, -1),
|
||||
MUX_PG(ld14, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 14, 0x94, 28, -1, -1),
|
||||
MUX_PG(ld15, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 15, 0x94, 30, -1, -1),
|
||||
MUX_PG(ld16, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 16, 0x98, 0, -1, -1),
|
||||
MUX_PG(ld17, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x1c, 17, 0x98, 2, -1, -1),
|
||||
MUX_PG(ldc, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x1c, 30, 0x90, 14, -1, -1),
|
||||
MUX_PG(ldi, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x20, 6, 0x98, 16, -1, -1),
|
||||
MUX_PG(lhp0, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x1c, 18, 0x98, 10, -1, -1),
|
||||
MUX_PG(lhp1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x1c, 19, 0x98, 4, -1, -1),
|
||||
MUX_PG(lhp2, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x1c, 20, 0x98, 6, -1, -1),
|
||||
MUX_PG(lhs, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x20, 7, 0x90, 22, -1, -1),
|
||||
MUX_PG(lm0, DISPLAYA, DISPLAYB, SPI3, RSVD4, RSVD4, 0x1c, 24, 0x90, 26, -1, -1),
|
||||
MUX_PG(lm1, DISPLAYA, DISPLAYB, RSVD3, CRT, RSVD3, 0x1c, 25, 0x90, 28, -1, -1),
|
||||
MUX_PG(lpp, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x20, 8, 0x98, 14, -1, -1),
|
||||
MUX_PG(lpw0, DISPLAYA, DISPLAYB, SPI3, HDMI, DISPLAYA, 0x20, 3, 0x90, 0, -1, -1),
|
||||
MUX_PG(lpw1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x20, 4, 0x90, 2, -1, -1),
|
||||
MUX_PG(lpw2, DISPLAYA, DISPLAYB, SPI3, HDMI, DISPLAYA, 0x20, 5, 0x90, 4, -1, -1),
|
||||
MUX_PG(lsc0, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 27, 0x90, 18, -1, -1),
|
||||
MUX_PG(lsc1, DISPLAYA, DISPLAYB, SPI3, HDMI, DISPLAYA, 0x1c, 28, 0x90, 20, -1, -1),
|
||||
MUX_PG(lsck, DISPLAYA, DISPLAYB, SPI3, HDMI, DISPLAYA, 0x1c, 29, 0x90, 16, -1, -1),
|
||||
MUX_PG(lsda, DISPLAYA, DISPLAYB, SPI3, HDMI, DISPLAYA, 0x20, 1, 0x90, 8, -1, -1),
|
||||
MUX_PG(lsdi, DISPLAYA, DISPLAYB, SPI3, RSVD4, DISPLAYA, 0x20, 2, 0x90, 6, -1, -1),
|
||||
MUX_PG(lspi, DISPLAYA, DISPLAYB, XIO, HDMI, DISPLAYA, 0x20, 0, 0x90, 10, -1, -1),
|
||||
MUX_PG(lvp0, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x1c, 21, 0x90, 30, -1, -1),
|
||||
MUX_PG(lvp1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x1c, 22, 0x98, 8, -1, -1),
|
||||
MUX_PG(lvs, DISPLAYA, DISPLAYB, XIO, RSVD4, RSVD4, 0x1c, 26, 0x90, 24, -1, -1),
|
||||
MUX_PG(owc, OWR, RSVD2, RSVD3, RSVD4, OWR, 0x14, 31, 0x84, 8, 0xb0, 30),
|
||||
MUX_PG(pmc, PWR_ON, PWR_INTR, RSVD3, RSVD4, PWR_ON, 0x14, 23, 0x98, 18, -1, -1),
|
||||
MUX_PG(pta, I2C2, HDMI, GMI, RSVD4, RSVD4, 0x14, 24, 0x98, 22, 0xa4, 4),
|
||||
MUX_PG(rm, I2C1, RSVD2, RSVD3, RSVD4, RSVD4, 0x14, 25, 0x80, 14, 0xa4, 0),
|
||||
MUX_PG(sdb, UARTA, PWM, SDIO3, SPI2, PWM, 0x20, 15, 0x8c, 10, -1, -1),
|
||||
MUX_PG(sdc, PWM, TWC, SDIO3, SPI3, TWC, 0x18, 1, 0x8c, 12, 0xac, 28),
|
||||
MUX_PG(sdd, UARTA, PWM, SDIO3, SPI3, PWM, 0x18, 2, 0x8c, 14, 0xac, 30),
|
||||
MUX_PG(sdio1, SDIO1, RSVD2, UARTE, UARTA, RSVD2, 0x14, 30, 0x80, 30, 0xb0, 18),
|
||||
MUX_PG(slxa, PCIE, SPI4, SDIO3, SPI2, PCIE, 0x18, 3, 0x84, 6, 0xa4, 22),
|
||||
MUX_PG(slxc, SPDIF, SPI4, SDIO3, SPI2, SPI4, 0x18, 5, 0x84, 10, 0xa4, 26),
|
||||
MUX_PG(slxd, SPDIF, SPI4, SDIO3, SPI2, SPI4, 0x18, 6, 0x84, 12, 0xa4, 28),
|
||||
MUX_PG(slxk, PCIE, SPI4, SDIO3, SPI2, PCIE, 0x18, 7, 0x84, 14, 0xa4, 30),
|
||||
MUX_PG(spdi, SPDIF, RSVD2, I2C1, SDIO2, RSVD2, 0x18, 8, 0x8c, 8, 0xa4, 16),
|
||||
MUX_PG(spdo, SPDIF, RSVD2, I2C1, SDIO2, RSVD2, 0x18, 9, 0x8c, 6, 0xa4, 18),
|
||||
MUX_PG(spia, SPI1, SPI2, SPI3, GMI, GMI, 0x18, 10, 0x8c, 30, 0xa8, 4),
|
||||
MUX_PG(spib, SPI1, SPI2, SPI3, GMI, GMI, 0x18, 11, 0x8c, 28, 0xa8, 6),
|
||||
MUX_PG(spic, SPI1, SPI2, SPI3, GMI, GMI, 0x18, 12, 0x8c, 26, 0xa8, 8),
|
||||
MUX_PG(spid, SPI2, SPI1, SPI2_ALT, GMI, GMI, 0x18, 13, 0x8c, 24, 0xa8, 10),
|
||||
MUX_PG(spie, SPI2, SPI1, SPI2_ALT, GMI, GMI, 0x18, 14, 0x8c, 22, 0xa8, 12),
|
||||
MUX_PG(spif, SPI3, SPI1, SPI2, RSVD4, RSVD4, 0x18, 15, 0x8c, 20, 0xa8, 14),
|
||||
MUX_PG(spig, SPI3, SPI2, SPI2_ALT, I2C1, SPI2_ALT, 0x18, 16, 0x8c, 18, 0xa8, 16),
|
||||
MUX_PG(spih, SPI3, SPI2, SPI2_ALT, I2C1, SPI2_ALT, 0x18, 17, 0x8c, 16, 0xa8, 18),
|
||||
MUX_PG(uaa, SPI3, MIPI_HS, UARTA, ULPI, MIPI_HS, 0x18, 18, 0x80, 0, 0xac, 0),
|
||||
MUX_PG(uab, SPI2, MIPI_HS, UARTA, ULPI, MIPI_HS, 0x18, 19, 0x80, 2, 0xac, 2),
|
||||
MUX_PG(uac, OWR, RSVD2, RSVD3, RSVD4, RSVD4, 0x18, 20, 0x80, 4, 0xac, 4),
|
||||
MUX_PG(uad, IRDA, SPDIF, UARTA, SPI4, SPDIF, 0x18, 21, 0x80, 6, 0xac, 6),
|
||||
MUX_PG(uca, UARTC, RSVD2, GMI, RSVD4, RSVD4, 0x18, 22, 0x84, 16, 0xac, 8),
|
||||
MUX_PG(ucb, UARTC, PWM, GMI, RSVD4, RSVD4, 0x18, 23, 0x84, 18, 0xac, 10),
|
||||
MUX_PG(uda, SPI1, RSVD2, UARTD, ULPI, RSVD2, 0x20, 13, 0x80, 8, 0xb0, 16),
|
||||
/* name, f0, f1, f2, f3, tri r/b, mux r/b, pupd r/b */
|
||||
MUX_PG(ata, IDE, NAND, GMI, RSVD4, 0x14, 0, 0x80, 24, 0xa0, 0),
|
||||
MUX_PG(atb, IDE, NAND, GMI, SDIO4, 0x14, 1, 0x80, 16, 0xa0, 2),
|
||||
MUX_PG(atc, IDE, NAND, GMI, SDIO4, 0x14, 2, 0x80, 22, 0xa0, 4),
|
||||
MUX_PG(atd, IDE, NAND, GMI, SDIO4, 0x14, 3, 0x80, 20, 0xa0, 6),
|
||||
MUX_PG(ate, IDE, NAND, GMI, RSVD4, 0x18, 25, 0x80, 12, 0xa0, 8),
|
||||
MUX_PG(cdev1, OSC, PLLA_OUT, PLLM_OUT1, AUDIO_SYNC, 0x14, 4, 0x88, 2, 0xa8, 0),
|
||||
MUX_PG(cdev2, OSC, AHB_CLK, APB_CLK, PLLP_OUT4, 0x14, 5, 0x88, 4, 0xa8, 2),
|
||||
MUX_PG(crtp, CRT, RSVD2, RSVD3, RSVD4, 0x20, 14, 0x98, 20, 0xa4, 24),
|
||||
MUX_PG(csus, PLLC_OUT1, PLLP_OUT2, PLLP_OUT3, VI_SENSOR_CLK, 0x14, 6, 0x88, 6, 0xac, 24),
|
||||
MUX_PG(dap1, DAP1, RSVD2, GMI, SDIO2, 0x14, 7, 0x88, 20, 0xa0, 10),
|
||||
MUX_PG(dap2, DAP2, TWC, RSVD3, GMI, 0x14, 8, 0x88, 22, 0xa0, 12),
|
||||
MUX_PG(dap3, DAP3, RSVD2, RSVD3, RSVD4, 0x14, 9, 0x88, 24, 0xa0, 14),
|
||||
MUX_PG(dap4, DAP4, RSVD2, GMI, RSVD4, 0x14, 10, 0x88, 26, 0xa0, 16),
|
||||
MUX_PG(ddc, I2C2, RSVD2, RSVD3, RSVD4, 0x18, 31, 0x88, 0, 0xb0, 28),
|
||||
MUX_PG(dta, RSVD1, SDIO2, VI, RSVD4, 0x14, 11, 0x84, 20, 0xa0, 18),
|
||||
MUX_PG(dtb, RSVD1, RSVD2, VI, SPI1, 0x14, 12, 0x84, 22, 0xa0, 20),
|
||||
MUX_PG(dtc, RSVD1, RSVD2, VI, RSVD4, 0x14, 13, 0x84, 26, 0xa0, 22),
|
||||
MUX_PG(dtd, RSVD1, SDIO2, VI, RSVD4, 0x14, 14, 0x84, 28, 0xa0, 24),
|
||||
MUX_PG(dte, RSVD1, RSVD2, VI, SPI1, 0x14, 15, 0x84, 30, 0xa0, 26),
|
||||
MUX_PG(dtf, I2C3, RSVD2, VI, RSVD4, 0x20, 12, 0x98, 30, 0xa0, 28),
|
||||
MUX_PG(gma, UARTE, SPI3, GMI, SDIO4, 0x14, 28, 0x84, 0, 0xb0, 20),
|
||||
MUX_PG(gmb, IDE, NAND, GMI, GMI_INT, 0x18, 29, 0x88, 28, 0xb0, 22),
|
||||
MUX_PG(gmc, UARTD, SPI4, GMI, SFLASH, 0x14, 29, 0x84, 2, 0xb0, 24),
|
||||
MUX_PG(gmd, RSVD1, NAND, GMI, SFLASH, 0x18, 30, 0x88, 30, 0xb0, 26),
|
||||
MUX_PG(gme, RSVD1, DAP5, GMI, SDIO4, 0x18, 0, 0x8c, 0, 0xa8, 24),
|
||||
MUX_PG(gpu, PWM, UARTA, GMI, RSVD4, 0x14, 16, 0x8c, 4, 0xa4, 20),
|
||||
MUX_PG(gpu7, RTCK, RSVD2, RSVD3, RSVD4, 0x20, 11, 0x98, 28, 0xa4, 6),
|
||||
MUX_PG(gpv, PCIE, RSVD2, RSVD3, RSVD4, 0x14, 17, 0x8c, 2, 0xa0, 30),
|
||||
MUX_PG(hdint, HDMI, RSVD2, RSVD3, RSVD4, 0x1c, 23, 0x84, 4, -1, -1),
|
||||
MUX_PG(i2cp, I2CP, RSVD2, RSVD3, RSVD4, 0x14, 18, 0x88, 8, 0xa4, 2),
|
||||
MUX_PG(irrx, UARTA, UARTB, GMI, SPI4, 0x14, 20, 0x88, 18, 0xa8, 22),
|
||||
MUX_PG(irtx, UARTA, UARTB, GMI, SPI4, 0x14, 19, 0x88, 16, 0xa8, 20),
|
||||
MUX_PG(kbca, KBC, NAND, SDIO2, EMC_TEST0_DLL, 0x14, 22, 0x88, 10, 0xa4, 8),
|
||||
MUX_PG(kbcb, KBC, NAND, SDIO2, MIO, 0x14, 21, 0x88, 12, 0xa4, 10),
|
||||
MUX_PG(kbcc, KBC, NAND, TRACE, EMC_TEST1_DLL, 0x18, 26, 0x88, 14, 0xa4, 12),
|
||||
MUX_PG(kbcd, KBC, NAND, SDIO2, MIO, 0x20, 10, 0x98, 26, 0xa4, 14),
|
||||
MUX_PG(kbce, KBC, NAND, OWR, RSVD4, 0x14, 26, 0x80, 28, 0xb0, 2),
|
||||
MUX_PG(kbcf, KBC, NAND, TRACE, MIO, 0x14, 27, 0x80, 26, 0xb0, 0),
|
||||
MUX_PG(lcsn, DISPLAYA, DISPLAYB, SPI3, RSVD4, 0x1c, 31, 0x90, 12, -1, -1),
|
||||
MUX_PG(ld0, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 0, 0x94, 0, -1, -1),
|
||||
MUX_PG(ld1, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 1, 0x94, 2, -1, -1),
|
||||
MUX_PG(ld2, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 2, 0x94, 4, -1, -1),
|
||||
MUX_PG(ld3, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 3, 0x94, 6, -1, -1),
|
||||
MUX_PG(ld4, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 4, 0x94, 8, -1, -1),
|
||||
MUX_PG(ld5, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 5, 0x94, 10, -1, -1),
|
||||
MUX_PG(ld6, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 6, 0x94, 12, -1, -1),
|
||||
MUX_PG(ld7, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 7, 0x94, 14, -1, -1),
|
||||
MUX_PG(ld8, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 8, 0x94, 16, -1, -1),
|
||||
MUX_PG(ld9, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 9, 0x94, 18, -1, -1),
|
||||
MUX_PG(ld10, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 10, 0x94, 20, -1, -1),
|
||||
MUX_PG(ld11, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 11, 0x94, 22, -1, -1),
|
||||
MUX_PG(ld12, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 12, 0x94, 24, -1, -1),
|
||||
MUX_PG(ld13, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 13, 0x94, 26, -1, -1),
|
||||
MUX_PG(ld14, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 14, 0x94, 28, -1, -1),
|
||||
MUX_PG(ld15, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 15, 0x94, 30, -1, -1),
|
||||
MUX_PG(ld16, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 16, 0x98, 0, -1, -1),
|
||||
MUX_PG(ld17, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 17, 0x98, 2, -1, -1),
|
||||
MUX_PG(ldc, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 30, 0x90, 14, -1, -1),
|
||||
MUX_PG(ldi, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x20, 6, 0x98, 16, -1, -1),
|
||||
MUX_PG(lhp0, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 18, 0x98, 10, -1, -1),
|
||||
MUX_PG(lhp1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 19, 0x98, 4, -1, -1),
|
||||
MUX_PG(lhp2, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 20, 0x98, 6, -1, -1),
|
||||
MUX_PG(lhs, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x20, 7, 0x90, 22, -1, -1),
|
||||
MUX_PG(lm0, DISPLAYA, DISPLAYB, SPI3, RSVD4, 0x1c, 24, 0x90, 26, -1, -1),
|
||||
MUX_PG(lm1, DISPLAYA, DISPLAYB, RSVD3, CRT, 0x1c, 25, 0x90, 28, -1, -1),
|
||||
MUX_PG(lpp, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x20, 8, 0x98, 14, -1, -1),
|
||||
MUX_PG(lpw0, DISPLAYA, DISPLAYB, SPI3, HDMI, 0x20, 3, 0x90, 0, -1, -1),
|
||||
MUX_PG(lpw1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x20, 4, 0x90, 2, -1, -1),
|
||||
MUX_PG(lpw2, DISPLAYA, DISPLAYB, SPI3, HDMI, 0x20, 5, 0x90, 4, -1, -1),
|
||||
MUX_PG(lsc0, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 27, 0x90, 18, -1, -1),
|
||||
MUX_PG(lsc1, DISPLAYA, DISPLAYB, SPI3, HDMI, 0x1c, 28, 0x90, 20, -1, -1),
|
||||
MUX_PG(lsck, DISPLAYA, DISPLAYB, SPI3, HDMI, 0x1c, 29, 0x90, 16, -1, -1),
|
||||
MUX_PG(lsda, DISPLAYA, DISPLAYB, SPI3, HDMI, 0x20, 1, 0x90, 8, -1, -1),
|
||||
MUX_PG(lsdi, DISPLAYA, DISPLAYB, SPI3, RSVD4, 0x20, 2, 0x90, 6, -1, -1),
|
||||
MUX_PG(lspi, DISPLAYA, DISPLAYB, XIO, HDMI, 0x20, 0, 0x90, 10, -1, -1),
|
||||
MUX_PG(lvp0, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 21, 0x90, 30, -1, -1),
|
||||
MUX_PG(lvp1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 22, 0x98, 8, -1, -1),
|
||||
MUX_PG(lvs, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 26, 0x90, 24, -1, -1),
|
||||
MUX_PG(owc, OWR, RSVD2, RSVD3, RSVD4, 0x14, 31, 0x84, 8, 0xb0, 30),
|
||||
MUX_PG(pmc, PWR_ON, PWR_INTR, RSVD3, RSVD4, 0x14, 23, 0x98, 18, -1, -1),
|
||||
MUX_PG(pta, I2C2, HDMI, GMI, RSVD4, 0x14, 24, 0x98, 22, 0xa4, 4),
|
||||
MUX_PG(rm, I2C1, RSVD2, RSVD3, RSVD4, 0x14, 25, 0x80, 14, 0xa4, 0),
|
||||
MUX_PG(sdb, UARTA, PWM, SDIO3, SPI2, 0x20, 15, 0x8c, 10, -1, -1),
|
||||
MUX_PG(sdc, PWM, TWC, SDIO3, SPI3, 0x18, 1, 0x8c, 12, 0xac, 28),
|
||||
MUX_PG(sdd, UARTA, PWM, SDIO3, SPI3, 0x18, 2, 0x8c, 14, 0xac, 30),
|
||||
MUX_PG(sdio1, SDIO1, RSVD2, UARTE, UARTA, 0x14, 30, 0x80, 30, 0xb0, 18),
|
||||
MUX_PG(slxa, PCIE, SPI4, SDIO3, SPI2, 0x18, 3, 0x84, 6, 0xa4, 22),
|
||||
MUX_PG(slxc, SPDIF, SPI4, SDIO3, SPI2, 0x18, 5, 0x84, 10, 0xa4, 26),
|
||||
MUX_PG(slxd, SPDIF, SPI4, SDIO3, SPI2, 0x18, 6, 0x84, 12, 0xa4, 28),
|
||||
MUX_PG(slxk, PCIE, SPI4, SDIO3, SPI2, 0x18, 7, 0x84, 14, 0xa4, 30),
|
||||
MUX_PG(spdi, SPDIF, RSVD2, I2C1, SDIO2, 0x18, 8, 0x8c, 8, 0xa4, 16),
|
||||
MUX_PG(spdo, SPDIF, RSVD2, I2C1, SDIO2, 0x18, 9, 0x8c, 6, 0xa4, 18),
|
||||
MUX_PG(spia, SPI1, SPI2, SPI3, GMI, 0x18, 10, 0x8c, 30, 0xa8, 4),
|
||||
MUX_PG(spib, SPI1, SPI2, SPI3, GMI, 0x18, 11, 0x8c, 28, 0xa8, 6),
|
||||
MUX_PG(spic, SPI1, SPI2, SPI3, GMI, 0x18, 12, 0x8c, 26, 0xa8, 8),
|
||||
MUX_PG(spid, SPI2, SPI1, SPI2_ALT, GMI, 0x18, 13, 0x8c, 24, 0xa8, 10),
|
||||
MUX_PG(spie, SPI2, SPI1, SPI2_ALT, GMI, 0x18, 14, 0x8c, 22, 0xa8, 12),
|
||||
MUX_PG(spif, SPI3, SPI1, SPI2, RSVD4, 0x18, 15, 0x8c, 20, 0xa8, 14),
|
||||
MUX_PG(spig, SPI3, SPI2, SPI2_ALT, I2C1, 0x18, 16, 0x8c, 18, 0xa8, 16),
|
||||
MUX_PG(spih, SPI3, SPI2, SPI2_ALT, I2C1, 0x18, 17, 0x8c, 16, 0xa8, 18),
|
||||
MUX_PG(uaa, SPI3, MIPI_HS, UARTA, ULPI, 0x18, 18, 0x80, 0, 0xac, 0),
|
||||
MUX_PG(uab, SPI2, MIPI_HS, UARTA, ULPI, 0x18, 19, 0x80, 2, 0xac, 2),
|
||||
MUX_PG(uac, OWR, RSVD2, RSVD3, RSVD4, 0x18, 20, 0x80, 4, 0xac, 4),
|
||||
MUX_PG(uad, IRDA, SPDIF, UARTA, SPI4, 0x18, 21, 0x80, 6, 0xac, 6),
|
||||
MUX_PG(uca, UARTC, RSVD2, GMI, RSVD4, 0x18, 22, 0x84, 16, 0xac, 8),
|
||||
MUX_PG(ucb, UARTC, PWM, GMI, RSVD4, 0x18, 23, 0x84, 18, 0xac, 10),
|
||||
MUX_PG(uda, SPI1, RSVD2, UARTD, ULPI, 0x20, 13, 0x80, 8, 0xb0, 16),
|
||||
/* pg_name, pupd_r/b */
|
||||
PULL_PG(ck32, 0xb0, 14),
|
||||
PULL_PG(ddrc, 0xac, 26),
|
||||
|
|
|
@ -2108,10 +2108,12 @@ static struct tegra_function tegra30_functions[] = {
|
|||
#define DRV_PINGROUP_REG_A 0x868 /* bank 0 */
|
||||
#define PINGROUP_REG_A 0x3000 /* bank 1 */
|
||||
|
||||
#define PINGROUP_REG_Y(r) ((r) - PINGROUP_REG_A)
|
||||
#define PINGROUP_REG_N(r) -1
|
||||
#define PINGROUP_REG(r) ((r) - PINGROUP_REG_A)
|
||||
|
||||
#define PINGROUP(pg_name, f0, f1, f2, f3, f_safe, r, od, ior) \
|
||||
#define PINGROUP_BIT_Y(b) (b)
|
||||
#define PINGROUP_BIT_N(b) (-1)
|
||||
|
||||
#define PINGROUP(pg_name, f0, f1, f2, f3, r, od, ior) \
|
||||
{ \
|
||||
.name = #pg_name, \
|
||||
.pins = pg_name##_pins, \
|
||||
|
@ -2122,35 +2124,24 @@ static struct tegra_function tegra30_functions[] = {
|
|||
TEGRA_MUX_##f2, \
|
||||
TEGRA_MUX_##f3, \
|
||||
}, \
|
||||
.func_safe = TEGRA_MUX_##f_safe, \
|
||||
.mux_reg = PINGROUP_REG_Y(r), \
|
||||
.mux_reg = PINGROUP_REG(r), \
|
||||
.mux_bank = 1, \
|
||||
.mux_bit = 0, \
|
||||
.pupd_reg = PINGROUP_REG_Y(r), \
|
||||
.pupd_reg = PINGROUP_REG(r), \
|
||||
.pupd_bank = 1, \
|
||||
.pupd_bit = 2, \
|
||||
.tri_reg = PINGROUP_REG_Y(r), \
|
||||
.tri_reg = PINGROUP_REG(r), \
|
||||
.tri_bank = 1, \
|
||||
.tri_bit = 4, \
|
||||
.einput_reg = PINGROUP_REG_Y(r), \
|
||||
.einput_bank = 1, \
|
||||
.einput_bit = 5, \
|
||||
.odrain_reg = PINGROUP_REG_##od(r), \
|
||||
.odrain_bank = 1, \
|
||||
.odrain_bit = 6, \
|
||||
.lock_reg = PINGROUP_REG_Y(r), \
|
||||
.lock_bank = 1, \
|
||||
.lock_bit = 7, \
|
||||
.ioreset_reg = PINGROUP_REG_##ior(r), \
|
||||
.ioreset_bank = 1, \
|
||||
.ioreset_bit = 8, \
|
||||
.rcv_sel_reg = -1, \
|
||||
.einput_bit = PINGROUP_BIT_Y(5), \
|
||||
.odrain_bit = PINGROUP_BIT_##od(6), \
|
||||
.lock_bit = PINGROUP_BIT_Y(7), \
|
||||
.ioreset_bit = PINGROUP_BIT_##ior(8), \
|
||||
.rcv_sel_bit = -1, \
|
||||
.drv_reg = -1, \
|
||||
.drvtype_reg = -1, \
|
||||
}
|
||||
|
||||
#define DRV_PINGROUP_REG_Y(r) ((r) - DRV_PINGROUP_REG_A)
|
||||
#define DRV_PINGROUP_REG_N(r) -1
|
||||
#define DRV_PINGROUP_REG(r) ((r) - DRV_PINGROUP_REG_A)
|
||||
|
||||
#define DRV_PINGROUP(pg_name, r, hsm_b, schmitt_b, lpmd_b, \
|
||||
drvdn_b, drvdn_w, drvup_b, drvup_w, \
|
||||
|
@ -2162,12 +2153,12 @@ static struct tegra_function tegra30_functions[] = {
|
|||
.mux_reg = -1, \
|
||||
.pupd_reg = -1, \
|
||||
.tri_reg = -1, \
|
||||
.einput_reg = -1, \
|
||||
.odrain_reg = -1, \
|
||||
.lock_reg = -1, \
|
||||
.ioreset_reg = -1, \
|
||||
.rcv_sel_reg = -1, \
|
||||
.drv_reg = DRV_PINGROUP_REG_Y(r), \
|
||||
.einput_bit = -1, \
|
||||
.odrain_bit = -1, \
|
||||
.lock_bit = -1, \
|
||||
.ioreset_bit = -1, \
|
||||
.rcv_sel_bit = -1, \
|
||||
.drv_reg = DRV_PINGROUP_REG(r), \
|
||||
.drv_bank = 0, \
|
||||
.hsm_bit = hsm_b, \
|
||||
.schmitt_bit = schmitt_b, \
|
||||
|
@ -2180,260 +2171,260 @@ static struct tegra_function tegra30_functions[] = {
|
|||
.slwr_width = slwr_w, \
|
||||
.slwf_bit = slwf_b, \
|
||||
.slwf_width = slwf_w, \
|
||||
.drvtype_reg = -1, \
|
||||
.drvtype_bit = -1, \
|
||||
}
|
||||
|
||||
static const struct tegra_pingroup tegra30_groups[] = {
|
||||
/* pg_name, f0, f1, f2, f3, safe, r, od, ior */
|
||||
PINGROUP(clk_32k_out_pa0, BLINK, RSVD2, RSVD3, RSVD4, RSVD4, 0x331c, N, N),
|
||||
PINGROUP(uart3_cts_n_pa1, UARTC, RSVD2, GMI, RSVD4, RSVD4, 0x317c, N, N),
|
||||
PINGROUP(dap2_fs_pa2, I2S1, HDA, RSVD3, GMI, RSVD3, 0x3358, N, N),
|
||||
PINGROUP(dap2_sclk_pa3, I2S1, HDA, RSVD3, GMI, RSVD3, 0x3364, N, N),
|
||||
PINGROUP(dap2_din_pa4, I2S1, HDA, RSVD3, GMI, RSVD3, 0x335c, N, N),
|
||||
PINGROUP(dap2_dout_pa5, I2S1, HDA, RSVD3, GMI, RSVD3, 0x3360, N, N),
|
||||
PINGROUP(sdmmc3_clk_pa6, UARTA, PWM2, SDMMC3, SPI3, SPI3, 0x3390, N, N),
|
||||
PINGROUP(sdmmc3_cmd_pa7, UARTA, PWM3, SDMMC3, SPI2, SPI2, 0x3394, N, N),
|
||||
PINGROUP(gmi_a17_pb0, UARTD, SPI4, GMI, DTV, DTV, 0x3234, N, N),
|
||||
PINGROUP(gmi_a18_pb1, UARTD, SPI4, GMI, DTV, DTV, 0x3238, N, N),
|
||||
PINGROUP(lcd_pwr0_pb2, DISPLAYA, DISPLAYB, SPI5, HDCP, HDCP, 0x3090, N, N),
|
||||
PINGROUP(lcd_pclk_pb3, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x3094, N, N),
|
||||
PINGROUP(sdmmc3_dat3_pb4, RSVD1, PWM0, SDMMC3, SPI3, RSVD1, 0x33a4, N, N),
|
||||
PINGROUP(sdmmc3_dat2_pb5, RSVD1, PWM1, SDMMC3, SPI3, RSVD1, 0x33a0, N, N),
|
||||
PINGROUP(sdmmc3_dat1_pb6, RSVD1, RSVD2, SDMMC3, SPI3, RSVD2, 0x339c, N, N),
|
||||
PINGROUP(sdmmc3_dat0_pb7, RSVD1, RSVD2, SDMMC3, SPI3, RSVD2, 0x3398, N, N),
|
||||
PINGROUP(uart3_rts_n_pc0, UARTC, PWM0, GMI, RSVD4, RSVD4, 0x3180, N, N),
|
||||
PINGROUP(lcd_pwr1_pc1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x3070, N, N),
|
||||
PINGROUP(uart2_txd_pc2, UARTB, SPDIF, UARTA, SPI4, SPI4, 0x3168, N, N),
|
||||
PINGROUP(uart2_rxd_pc3, UARTB, SPDIF, UARTA, SPI4, SPI4, 0x3164, N, N),
|
||||
PINGROUP(gen1_i2c_scl_pc4, I2C1, RSVD2, RSVD3, RSVD4, RSVD4, 0x31a4, Y, N),
|
||||
PINGROUP(gen1_i2c_sda_pc5, I2C1, RSVD2, RSVD3, RSVD4, RSVD4, 0x31a0, Y, N),
|
||||
PINGROUP(lcd_pwr2_pc6, DISPLAYA, DISPLAYB, SPI5, HDCP, HDCP, 0x3074, N, N),
|
||||
PINGROUP(gmi_wp_n_pc7, RSVD1, NAND, GMI, GMI_ALT, RSVD1, 0x31c0, N, N),
|
||||
PINGROUP(sdmmc3_dat5_pd0, PWM0, SPI4, SDMMC3, SPI2, SPI2, 0x33ac, N, N),
|
||||
PINGROUP(sdmmc3_dat4_pd1, PWM1, SPI4, SDMMC3, SPI2, SPI2, 0x33a8, N, N),
|
||||
PINGROUP(lcd_dc1_pd2, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x310c, N, N),
|
||||
PINGROUP(sdmmc3_dat6_pd3, SPDIF, SPI4, SDMMC3, SPI2, SPI2, 0x33b0, N, N),
|
||||
PINGROUP(sdmmc3_dat7_pd4, SPDIF, SPI4, SDMMC3, SPI2, SPI2, 0x33b4, N, N),
|
||||
PINGROUP(vi_d1_pd5, DDR, SDMMC2, VI, RSVD4, RSVD4, 0x3128, N, Y),
|
||||
PINGROUP(vi_vsync_pd6, DDR, RSVD2, VI, RSVD4, RSVD4, 0x315c, N, Y),
|
||||
PINGROUP(vi_hsync_pd7, DDR, RSVD2, VI, RSVD4, RSVD4, 0x3160, N, Y),
|
||||
PINGROUP(lcd_d0_pe0, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30a4, N, N),
|
||||
PINGROUP(lcd_d1_pe1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30a8, N, N),
|
||||
PINGROUP(lcd_d2_pe2, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30ac, N, N),
|
||||
PINGROUP(lcd_d3_pe3, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30b0, N, N),
|
||||
PINGROUP(lcd_d4_pe4, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30b4, N, N),
|
||||
PINGROUP(lcd_d5_pe5, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30b8, N, N),
|
||||
PINGROUP(lcd_d6_pe6, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30bc, N, N),
|
||||
PINGROUP(lcd_d7_pe7, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30c0, N, N),
|
||||
PINGROUP(lcd_d8_pf0, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30c4, N, N),
|
||||
PINGROUP(lcd_d9_pf1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30c8, N, N),
|
||||
PINGROUP(lcd_d10_pf2, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30cc, N, N),
|
||||
PINGROUP(lcd_d11_pf3, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30d0, N, N),
|
||||
PINGROUP(lcd_d12_pf4, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30d4, N, N),
|
||||
PINGROUP(lcd_d13_pf5, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30d8, N, N),
|
||||
PINGROUP(lcd_d14_pf6, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30dc, N, N),
|
||||
PINGROUP(lcd_d15_pf7, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30e0, N, N),
|
||||
PINGROUP(gmi_ad0_pg0, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31f0, N, N),
|
||||
PINGROUP(gmi_ad1_pg1, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31f4, N, N),
|
||||
PINGROUP(gmi_ad2_pg2, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31f8, N, N),
|
||||
PINGROUP(gmi_ad3_pg3, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31fc, N, N),
|
||||
PINGROUP(gmi_ad4_pg4, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x3200, N, N),
|
||||
PINGROUP(gmi_ad5_pg5, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x3204, N, N),
|
||||
PINGROUP(gmi_ad6_pg6, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x3208, N, N),
|
||||
PINGROUP(gmi_ad7_pg7, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x320c, N, N),
|
||||
PINGROUP(gmi_ad8_ph0, PWM0, NAND, GMI, RSVD4, RSVD4, 0x3210, N, N),
|
||||
PINGROUP(gmi_ad9_ph1, PWM1, NAND, GMI, RSVD4, RSVD4, 0x3214, N, N),
|
||||
PINGROUP(gmi_ad10_ph2, PWM2, NAND, GMI, RSVD4, RSVD4, 0x3218, N, N),
|
||||
PINGROUP(gmi_ad11_ph3, PWM3, NAND, GMI, RSVD4, RSVD4, 0x321c, N, N),
|
||||
PINGROUP(gmi_ad12_ph4, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x3220, N, N),
|
||||
PINGROUP(gmi_ad13_ph5, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x3224, N, N),
|
||||
PINGROUP(gmi_ad14_ph6, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x3228, N, N),
|
||||
PINGROUP(gmi_ad15_ph7, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x322c, N, N),
|
||||
PINGROUP(gmi_wr_n_pi0, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x3240, N, N),
|
||||
PINGROUP(gmi_oe_n_pi1, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x3244, N, N),
|
||||
PINGROUP(gmi_dqs_pi2, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x3248, N, N),
|
||||
PINGROUP(gmi_cs6_n_pi3, NAND, NAND_ALT, GMI, SATA, SATA, 0x31e8, N, N),
|
||||
PINGROUP(gmi_rst_n_pi4, NAND, NAND_ALT, GMI, RSVD4, RSVD4, 0x324c, N, N),
|
||||
PINGROUP(gmi_iordy_pi5, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31c4, N, N),
|
||||
PINGROUP(gmi_cs7_n_pi6, NAND, NAND_ALT, GMI, GMI_ALT, GMI_ALT, 0x31ec, N, N),
|
||||
PINGROUP(gmi_wait_pi7, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31c8, N, N),
|
||||
PINGROUP(gmi_cs0_n_pj0, RSVD1, NAND, GMI, DTV, RSVD1, 0x31d4, N, N),
|
||||
PINGROUP(lcd_de_pj1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x3098, N, N),
|
||||
PINGROUP(gmi_cs1_n_pj2, RSVD1, NAND, GMI, DTV, RSVD1, 0x31d8, N, N),
|
||||
PINGROUP(lcd_hsync_pj3, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x309c, N, N),
|
||||
PINGROUP(lcd_vsync_pj4, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30a0, N, N),
|
||||
PINGROUP(uart2_cts_n_pj5, UARTA, UARTB, GMI, SPI4, SPI4, 0x3170, N, N),
|
||||
PINGROUP(uart2_rts_n_pj6, UARTA, UARTB, GMI, SPI4, SPI4, 0x316c, N, N),
|
||||
PINGROUP(gmi_a16_pj7, UARTD, SPI4, GMI, GMI_ALT, GMI_ALT, 0x3230, N, N),
|
||||
PINGROUP(gmi_adv_n_pk0, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31cc, N, N),
|
||||
PINGROUP(gmi_clk_pk1, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31d0, N, N),
|
||||
PINGROUP(gmi_cs4_n_pk2, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31e4, N, N),
|
||||
PINGROUP(gmi_cs2_n_pk3, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31dc, N, N),
|
||||
PINGROUP(gmi_cs3_n_pk4, RSVD1, NAND, GMI, GMI_ALT, RSVD1, 0x31e0, N, N),
|
||||
PINGROUP(spdif_out_pk5, SPDIF, RSVD2, I2C1, SDMMC2, RSVD2, 0x3354, N, N),
|
||||
PINGROUP(spdif_in_pk6, SPDIF, HDA, I2C1, SDMMC2, SDMMC2, 0x3350, N, N),
|
||||
PINGROUP(gmi_a19_pk7, UARTD, SPI4, GMI, RSVD4, RSVD4, 0x323c, N, N),
|
||||
PINGROUP(vi_d2_pl0, DDR, SDMMC2, VI, RSVD4, RSVD4, 0x312c, N, Y),
|
||||
PINGROUP(vi_d3_pl1, DDR, SDMMC2, VI, RSVD4, RSVD4, 0x3130, N, Y),
|
||||
PINGROUP(vi_d4_pl2, DDR, SDMMC2, VI, RSVD4, RSVD4, 0x3134, N, Y),
|
||||
PINGROUP(vi_d5_pl3, DDR, SDMMC2, VI, RSVD4, RSVD4, 0x3138, N, Y),
|
||||
PINGROUP(vi_d6_pl4, DDR, SDMMC2, VI, RSVD4, RSVD4, 0x313c, N, Y),
|
||||
PINGROUP(vi_d7_pl5, DDR, SDMMC2, VI, RSVD4, RSVD4, 0x3140, N, Y),
|
||||
PINGROUP(vi_d8_pl6, DDR, SDMMC2, VI, RSVD4, RSVD4, 0x3144, N, Y),
|
||||
PINGROUP(vi_d9_pl7, DDR, SDMMC2, VI, RSVD4, RSVD4, 0x3148, N, Y),
|
||||
PINGROUP(lcd_d16_pm0, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30e4, N, N),
|
||||
PINGROUP(lcd_d17_pm1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30e8, N, N),
|
||||
PINGROUP(lcd_d18_pm2, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30ec, N, N),
|
||||
PINGROUP(lcd_d19_pm3, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30f0, N, N),
|
||||
PINGROUP(lcd_d20_pm4, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30f4, N, N),
|
||||
PINGROUP(lcd_d21_pm5, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30f8, N, N),
|
||||
PINGROUP(lcd_d22_pm6, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x30fc, N, N),
|
||||
PINGROUP(lcd_d23_pm7, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x3100, N, N),
|
||||
PINGROUP(dap1_fs_pn0, I2S0, HDA, GMI, SDMMC2, SDMMC2, 0x3338, N, N),
|
||||
PINGROUP(dap1_din_pn1, I2S0, HDA, GMI, SDMMC2, SDMMC2, 0x333c, N, N),
|
||||
PINGROUP(dap1_dout_pn2, I2S0, HDA, GMI, SDMMC2, SDMMC2, 0x3340, N, N),
|
||||
PINGROUP(dap1_sclk_pn3, I2S0, HDA, GMI, SDMMC2, SDMMC2, 0x3344, N, N),
|
||||
PINGROUP(lcd_cs0_n_pn4, DISPLAYA, DISPLAYB, SPI5, RSVD4, RSVD4, 0x3084, N, N),
|
||||
PINGROUP(lcd_sdout_pn5, DISPLAYA, DISPLAYB, SPI5, HDCP, HDCP, 0x307c, N, N),
|
||||
PINGROUP(lcd_dc0_pn6, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x3088, N, N),
|
||||
PINGROUP(hdmi_int_pn7, HDMI, RSVD2, RSVD3, RSVD4, RSVD4, 0x3110, N, N),
|
||||
PINGROUP(ulpi_data7_po0, SPI2, HSI, UARTA, ULPI, ULPI, 0x301c, N, N),
|
||||
PINGROUP(ulpi_data0_po1, SPI3, HSI, UARTA, ULPI, ULPI, 0x3000, N, N),
|
||||
PINGROUP(ulpi_data1_po2, SPI3, HSI, UARTA, ULPI, ULPI, 0x3004, N, N),
|
||||
PINGROUP(ulpi_data2_po3, SPI3, HSI, UARTA, ULPI, ULPI, 0x3008, N, N),
|
||||
PINGROUP(ulpi_data3_po4, SPI3, HSI, UARTA, ULPI, ULPI, 0x300c, N, N),
|
||||
PINGROUP(ulpi_data4_po5, SPI2, HSI, UARTA, ULPI, ULPI, 0x3010, N, N),
|
||||
PINGROUP(ulpi_data5_po6, SPI2, HSI, UARTA, ULPI, ULPI, 0x3014, N, N),
|
||||
PINGROUP(ulpi_data6_po7, SPI2, HSI, UARTA, ULPI, ULPI, 0x3018, N, N),
|
||||
PINGROUP(dap3_fs_pp0, I2S2, RSVD2, DISPLAYA, DISPLAYB, RSVD2, 0x3030, N, N),
|
||||
PINGROUP(dap3_din_pp1, I2S2, RSVD2, DISPLAYA, DISPLAYB, RSVD2, 0x3034, N, N),
|
||||
PINGROUP(dap3_dout_pp2, I2S2, RSVD2, DISPLAYA, DISPLAYB, RSVD2, 0x3038, N, N),
|
||||
PINGROUP(dap3_sclk_pp3, I2S2, RSVD2, DISPLAYA, DISPLAYB, RSVD2, 0x303c, N, N),
|
||||
PINGROUP(dap4_fs_pp4, I2S3, RSVD2, GMI, RSVD4, RSVD4, 0x31a8, N, N),
|
||||
PINGROUP(dap4_din_pp5, I2S3, RSVD2, GMI, RSVD4, RSVD4, 0x31ac, N, N),
|
||||
PINGROUP(dap4_dout_pp6, I2S3, RSVD2, GMI, RSVD4, RSVD4, 0x31b0, N, N),
|
||||
PINGROUP(dap4_sclk_pp7, I2S3, RSVD2, GMI, RSVD4, RSVD4, 0x31b4, N, N),
|
||||
PINGROUP(kb_col0_pq0, KBC, NAND, TRACE, TEST, TEST, 0x32fc, N, N),
|
||||
PINGROUP(kb_col1_pq1, KBC, NAND, TRACE, TEST, TEST, 0x3300, N, N),
|
||||
PINGROUP(kb_col2_pq2, KBC, NAND, TRACE, RSVD4, RSVD4, 0x3304, N, N),
|
||||
PINGROUP(kb_col3_pq3, KBC, NAND, TRACE, RSVD4, RSVD4, 0x3308, N, N),
|
||||
PINGROUP(kb_col4_pq4, KBC, NAND, TRACE, RSVD4, RSVD4, 0x330c, N, N),
|
||||
PINGROUP(kb_col5_pq5, KBC, NAND, TRACE, RSVD4, RSVD4, 0x3310, N, N),
|
||||
PINGROUP(kb_col6_pq6, KBC, NAND, TRACE, MIO, MIO, 0x3314, N, N),
|
||||
PINGROUP(kb_col7_pq7, KBC, NAND, TRACE, MIO, MIO, 0x3318, N, N),
|
||||
PINGROUP(kb_row0_pr0, KBC, NAND, RSVD3, RSVD4, RSVD4, 0x32bc, N, N),
|
||||
PINGROUP(kb_row1_pr1, KBC, NAND, RSVD3, RSVD4, RSVD4, 0x32c0, N, N),
|
||||
PINGROUP(kb_row2_pr2, KBC, NAND, RSVD3, RSVD4, RSVD4, 0x32c4, N, N),
|
||||
PINGROUP(kb_row3_pr3, KBC, NAND, RSVD3, INVALID, RSVD3, 0x32c8, N, N),
|
||||
PINGROUP(kb_row4_pr4, KBC, NAND, TRACE, RSVD4, RSVD4, 0x32cc, N, N),
|
||||
PINGROUP(kb_row5_pr5, KBC, NAND, TRACE, OWR, OWR, 0x32d0, N, N),
|
||||
PINGROUP(kb_row6_pr6, KBC, NAND, SDMMC2, MIO, MIO, 0x32d4, N, N),
|
||||
PINGROUP(kb_row7_pr7, KBC, NAND, SDMMC2, MIO, MIO, 0x32d8, N, N),
|
||||
PINGROUP(kb_row8_ps0, KBC, NAND, SDMMC2, MIO, MIO, 0x32dc, N, N),
|
||||
PINGROUP(kb_row9_ps1, KBC, NAND, SDMMC2, MIO, MIO, 0x32e0, N, N),
|
||||
PINGROUP(kb_row10_ps2, KBC, NAND, SDMMC2, MIO, MIO, 0x32e4, N, N),
|
||||
PINGROUP(kb_row11_ps3, KBC, NAND, SDMMC2, MIO, MIO, 0x32e8, N, N),
|
||||
PINGROUP(kb_row12_ps4, KBC, NAND, SDMMC2, MIO, MIO, 0x32ec, N, N),
|
||||
PINGROUP(kb_row13_ps5, KBC, NAND, SDMMC2, MIO, MIO, 0x32f0, N, N),
|
||||
PINGROUP(kb_row14_ps6, KBC, NAND, SDMMC2, MIO, MIO, 0x32f4, N, N),
|
||||
PINGROUP(kb_row15_ps7, KBC, NAND, SDMMC2, MIO, MIO, 0x32f8, N, N),
|
||||
PINGROUP(vi_pclk_pt0, RSVD1, SDMMC2, VI, RSVD4, RSVD4, 0x3154, N, Y),
|
||||
PINGROUP(vi_mclk_pt1, VI, VI_ALT1, VI_ALT2, VI_ALT3, VI_ALT3, 0x3158, N, Y),
|
||||
PINGROUP(vi_d10_pt2, DDR, RSVD2, VI, RSVD4, RSVD4, 0x314c, N, Y),
|
||||
PINGROUP(vi_d11_pt3, DDR, RSVD2, VI, RSVD4, RSVD4, 0x3150, N, Y),
|
||||
PINGROUP(vi_d0_pt4, DDR, RSVD2, VI, RSVD4, RSVD4, 0x3124, N, Y),
|
||||
PINGROUP(gen2_i2c_scl_pt5, I2C2, HDCP, GMI, RSVD4, RSVD4, 0x3250, Y, N),
|
||||
PINGROUP(gen2_i2c_sda_pt6, I2C2, HDCP, GMI, RSVD4, RSVD4, 0x3254, Y, N),
|
||||
PINGROUP(sdmmc4_cmd_pt7, I2C3, NAND, GMI, SDMMC4, SDMMC4, 0x325c, N, Y),
|
||||
PINGROUP(pu0, OWR, UARTA, GMI, RSVD4, RSVD4, 0x3184, N, N),
|
||||
PINGROUP(pu1, RSVD1, UARTA, GMI, RSVD4, RSVD4, 0x3188, N, N),
|
||||
PINGROUP(pu2, RSVD1, UARTA, GMI, RSVD4, RSVD4, 0x318c, N, N),
|
||||
PINGROUP(pu3, PWM0, UARTA, GMI, RSVD4, RSVD4, 0x3190, N, N),
|
||||
PINGROUP(pu4, PWM1, UARTA, GMI, RSVD4, RSVD4, 0x3194, N, N),
|
||||
PINGROUP(pu5, PWM2, UARTA, GMI, RSVD4, RSVD4, 0x3198, N, N),
|
||||
PINGROUP(pu6, PWM3, UARTA, GMI, RSVD4, RSVD4, 0x319c, N, N),
|
||||
PINGROUP(jtag_rtck_pu7, RTCK, RSVD2, RSVD3, RSVD4, RSVD4, 0x32b0, N, N),
|
||||
PINGROUP(pv0, RSVD1, RSVD2, RSVD3, RSVD4, RSVD4, 0x3040, N, N),
|
||||
PINGROUP(pv1, RSVD1, RSVD2, RSVD3, RSVD4, RSVD4, 0x3044, N, N),
|
||||
PINGROUP(pv2, OWR, RSVD2, RSVD3, RSVD4, RSVD4, 0x3060, N, N),
|
||||
PINGROUP(pv3, CLK_12M_OUT, RSVD2, RSVD3, RSVD4, RSVD4, 0x3064, N, N),
|
||||
PINGROUP(ddc_scl_pv4, I2C4, RSVD2, RSVD3, RSVD4, RSVD4, 0x3114, N, N),
|
||||
PINGROUP(ddc_sda_pv5, I2C4, RSVD2, RSVD3, RSVD4, RSVD4, 0x3118, N, N),
|
||||
PINGROUP(crt_hsync_pv6, CRT, RSVD2, RSVD3, RSVD4, RSVD4, 0x311c, N, N),
|
||||
PINGROUP(crt_vsync_pv7, CRT, RSVD2, RSVD3, RSVD4, RSVD4, 0x3120, N, N),
|
||||
PINGROUP(lcd_cs1_n_pw0, DISPLAYA, DISPLAYB, SPI5, RSVD4, RSVD4, 0x3104, N, N),
|
||||
PINGROUP(lcd_m1_pw1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, RSVD4, 0x3108, N, N),
|
||||
PINGROUP(spi2_cs1_n_pw2, SPI3, SPI2, SPI2_ALT, I2C1, I2C1, 0x3388, N, N),
|
||||
PINGROUP(spi2_cs2_n_pw3, SPI3, SPI2, SPI2_ALT, I2C1, I2C1, 0x338c, N, N),
|
||||
PINGROUP(clk1_out_pw4, EXTPERIPH1, RSVD2, RSVD3, RSVD4, RSVD4, 0x334c, N, N),
|
||||
PINGROUP(clk2_out_pw5, EXTPERIPH2, RSVD2, RSVD3, RSVD4, RSVD4, 0x3068, N, N),
|
||||
PINGROUP(uart3_txd_pw6, UARTC, RSVD2, GMI, RSVD4, RSVD4, 0x3174, N, N),
|
||||
PINGROUP(uart3_rxd_pw7, UARTC, RSVD2, GMI, RSVD4, RSVD4, 0x3178, N, N),
|
||||
PINGROUP(spi2_mosi_px0, SPI6, SPI2, SPI3, GMI, GMI, 0x3368, N, N),
|
||||
PINGROUP(spi2_miso_px1, SPI6, SPI2, SPI3, GMI, GMI, 0x336c, N, N),
|
||||
PINGROUP(spi2_sck_px2, SPI6, SPI2, SPI3, GMI, GMI, 0x3374, N, N),
|
||||
PINGROUP(spi2_cs0_n_px3, SPI6, SPI2, SPI3, GMI, GMI, 0x3370, N, N),
|
||||
PINGROUP(spi1_mosi_px4, SPI2, SPI1, SPI2_ALT, GMI, GMI, 0x3378, N, N),
|
||||
PINGROUP(spi1_sck_px5, SPI2, SPI1, SPI2_ALT, GMI, GMI, 0x337c, N, N),
|
||||
PINGROUP(spi1_cs0_n_px6, SPI2, SPI1, SPI2_ALT, GMI, GMI, 0x3380, N, N),
|
||||
PINGROUP(spi1_miso_px7, SPI3, SPI1, SPI2_ALT, RSVD4, RSVD4, 0x3384, N, N),
|
||||
PINGROUP(ulpi_clk_py0, SPI1, RSVD2, UARTD, ULPI, RSVD2, 0x3020, N, N),
|
||||
PINGROUP(ulpi_dir_py1, SPI1, RSVD2, UARTD, ULPI, RSVD2, 0x3024, N, N),
|
||||
PINGROUP(ulpi_nxt_py2, SPI1, RSVD2, UARTD, ULPI, RSVD2, 0x3028, N, N),
|
||||
PINGROUP(ulpi_stp_py3, SPI1, RSVD2, UARTD, ULPI, RSVD2, 0x302c, N, N),
|
||||
PINGROUP(sdmmc1_dat3_py4, SDMMC1, RSVD2, UARTE, UARTA, RSVD2, 0x3050, N, N),
|
||||
PINGROUP(sdmmc1_dat2_py5, SDMMC1, RSVD2, UARTE, UARTA, RSVD2, 0x3054, N, N),
|
||||
PINGROUP(sdmmc1_dat1_py6, SDMMC1, RSVD2, UARTE, UARTA, RSVD2, 0x3058, N, N),
|
||||
PINGROUP(sdmmc1_dat0_py7, SDMMC1, RSVD2, UARTE, UARTA, RSVD2, 0x305c, N, N),
|
||||
PINGROUP(sdmmc1_clk_pz0, SDMMC1, RSVD2, RSVD3, UARTA, RSVD3, 0x3048, N, N),
|
||||
PINGROUP(sdmmc1_cmd_pz1, SDMMC1, RSVD2, RSVD3, UARTA, RSVD3, 0x304c, N, N),
|
||||
PINGROUP(lcd_sdin_pz2, DISPLAYA, DISPLAYB, SPI5, RSVD4, RSVD4, 0x3078, N, N),
|
||||
PINGROUP(lcd_wr_n_pz3, DISPLAYA, DISPLAYB, SPI5, HDCP, HDCP, 0x3080, N, N),
|
||||
PINGROUP(lcd_sck_pz4, DISPLAYA, DISPLAYB, SPI5, HDCP, HDCP, 0x308c, N, N),
|
||||
PINGROUP(sys_clk_req_pz5, SYSCLK, RSVD2, RSVD3, RSVD4, RSVD4, 0x3320, N, N),
|
||||
PINGROUP(pwr_i2c_scl_pz6, I2CPWR, RSVD2, RSVD3, RSVD4, RSVD4, 0x32b4, Y, N),
|
||||
PINGROUP(pwr_i2c_sda_pz7, I2CPWR, RSVD2, RSVD3, RSVD4, RSVD4, 0x32b8, Y, N),
|
||||
PINGROUP(sdmmc4_dat0_paa0, UARTE, SPI3, GMI, SDMMC4, SDMMC4, 0x3260, N, Y),
|
||||
PINGROUP(sdmmc4_dat1_paa1, UARTE, SPI3, GMI, SDMMC4, SDMMC4, 0x3264, N, Y),
|
||||
PINGROUP(sdmmc4_dat2_paa2, UARTE, SPI3, GMI, SDMMC4, SDMMC4, 0x3268, N, Y),
|
||||
PINGROUP(sdmmc4_dat3_paa3, UARTE, SPI3, GMI, SDMMC4, SDMMC4, 0x326c, N, Y),
|
||||
PINGROUP(sdmmc4_dat4_paa4, I2C3, I2S4, GMI, SDMMC4, SDMMC4, 0x3270, N, Y),
|
||||
PINGROUP(sdmmc4_dat5_paa5, VGP3, I2S4, GMI, SDMMC4, SDMMC4, 0x3274, N, Y),
|
||||
PINGROUP(sdmmc4_dat6_paa6, VGP4, I2S4, GMI, SDMMC4, SDMMC4, 0x3278, N, Y),
|
||||
PINGROUP(sdmmc4_dat7_paa7, VGP5, I2S4, GMI, SDMMC4, SDMMC4, 0x327c, N, Y),
|
||||
PINGROUP(pbb0, I2S4, RSVD2, RSVD3, SDMMC4, RSVD3, 0x328c, N, N),
|
||||
PINGROUP(cam_i2c_scl_pbb1, VGP1, I2C3, RSVD3, SDMMC4, RSVD3, 0x3290, Y, N),
|
||||
PINGROUP(cam_i2c_sda_pbb2, VGP2, I2C3, RSVD3, SDMMC4, RSVD3, 0x3294, Y, N),
|
||||
PINGROUP(pbb3, VGP3, DISPLAYA, DISPLAYB, SDMMC4, SDMMC4, 0x3298, N, N),
|
||||
PINGROUP(pbb4, VGP4, DISPLAYA, DISPLAYB, SDMMC4, SDMMC4, 0x329c, N, N),
|
||||
PINGROUP(pbb5, VGP5, DISPLAYA, DISPLAYB, SDMMC4, SDMMC4, 0x32a0, N, N),
|
||||
PINGROUP(pbb6, VGP6, DISPLAYA, DISPLAYB, SDMMC4, SDMMC4, 0x32a4, N, N),
|
||||
PINGROUP(pbb7, I2S4, RSVD2, RSVD3, SDMMC4, RSVD3, 0x32a8, N, N),
|
||||
PINGROUP(cam_mclk_pcc0, VI, VI_ALT1, VI_ALT3, SDMMC4, SDMMC4, 0x3284, N, N),
|
||||
PINGROUP(pcc1, I2S4, RSVD2, RSVD3, SDMMC4, RSVD3, 0x3288, N, N),
|
||||
PINGROUP(pcc2, I2S4, RSVD2, RSVD3, RSVD4, RSVD4, 0x32ac, N, N),
|
||||
PINGROUP(sdmmc4_rst_n_pcc3, VGP6, RSVD2, RSVD3, SDMMC4, RSVD3, 0x3280, N, Y),
|
||||
PINGROUP(sdmmc4_clk_pcc4, INVALID, NAND, GMI, SDMMC4, SDMMC4, 0x3258, N, Y),
|
||||
PINGROUP(clk2_req_pcc5, DAP, RSVD2, RSVD3, RSVD4, RSVD4, 0x306c, N, N),
|
||||
PINGROUP(pex_l2_rst_n_pcc6, PCIE, HDA, RSVD3, RSVD4, RSVD4, 0x33d8, N, N),
|
||||
PINGROUP(pex_l2_clkreq_n_pcc7, PCIE, HDA, RSVD3, RSVD4, RSVD4, 0x33dc, N, N),
|
||||
PINGROUP(pex_l0_prsnt_n_pdd0, PCIE, HDA, RSVD3, RSVD4, RSVD4, 0x33b8, N, N),
|
||||
PINGROUP(pex_l0_rst_n_pdd1, PCIE, HDA, RSVD3, RSVD4, RSVD4, 0x33bc, N, N),
|
||||
PINGROUP(pex_l0_clkreq_n_pdd2, PCIE, HDA, RSVD3, RSVD4, RSVD4, 0x33c0, N, N),
|
||||
PINGROUP(pex_wake_n_pdd3, PCIE, HDA, RSVD3, RSVD4, RSVD4, 0x33c4, N, N),
|
||||
PINGROUP(pex_l1_prsnt_n_pdd4, PCIE, HDA, RSVD3, RSVD4, RSVD4, 0x33c8, N, N),
|
||||
PINGROUP(pex_l1_rst_n_pdd5, PCIE, HDA, RSVD3, RSVD4, RSVD4, 0x33cc, N, N),
|
||||
PINGROUP(pex_l1_clkreq_n_pdd6, PCIE, HDA, RSVD3, RSVD4, RSVD4, 0x33d0, N, N),
|
||||
PINGROUP(pex_l2_prsnt_n_pdd7, PCIE, HDA, RSVD3, RSVD4, RSVD4, 0x33d4, N, N),
|
||||
PINGROUP(clk3_out_pee0, EXTPERIPH3, RSVD2, RSVD3, RSVD4, RSVD4, 0x31b8, N, N),
|
||||
PINGROUP(clk3_req_pee1, DEV3, RSVD2, RSVD3, RSVD4, RSVD4, 0x31bc, N, N),
|
||||
PINGROUP(clk1_req_pee2, DAP, HDA, RSVD3, RSVD4, RSVD4, 0x3348, N, N),
|
||||
PINGROUP(hdmi_cec_pee3, CEC, RSVD2, RSVD3, RSVD4, RSVD4, 0x33e0, Y, N),
|
||||
PINGROUP(clk_32k_in, CLK_32K_IN, RSVD2, RSVD3, RSVD4, RSVD4, 0x3330, N, N),
|
||||
PINGROUP(core_pwr_req, CORE_PWR_REQ, RSVD2, RSVD3, RSVD4, RSVD4, 0x3324, N, N),
|
||||
PINGROUP(cpu_pwr_req, CPU_PWR_REQ, RSVD2, RSVD3, RSVD4, RSVD4, 0x3328, N, N),
|
||||
PINGROUP(owr, OWR, CEC, RSVD3, RSVD4, RSVD4, 0x3334, N, N),
|
||||
PINGROUP(pwr_int_n, PWR_INT_N, RSVD2, RSVD3, RSVD4, RSVD4, 0x332c, N, N),
|
||||
/* pg_name, f0, f1, f2, f3, r, od, ior */
|
||||
PINGROUP(clk_32k_out_pa0, BLINK, RSVD2, RSVD3, RSVD4, 0x331c, N, N),
|
||||
PINGROUP(uart3_cts_n_pa1, UARTC, RSVD2, GMI, RSVD4, 0x317c, N, N),
|
||||
PINGROUP(dap2_fs_pa2, I2S1, HDA, RSVD3, GMI, 0x3358, N, N),
|
||||
PINGROUP(dap2_sclk_pa3, I2S1, HDA, RSVD3, GMI, 0x3364, N, N),
|
||||
PINGROUP(dap2_din_pa4, I2S1, HDA, RSVD3, GMI, 0x335c, N, N),
|
||||
PINGROUP(dap2_dout_pa5, I2S1, HDA, RSVD3, GMI, 0x3360, N, N),
|
||||
PINGROUP(sdmmc3_clk_pa6, UARTA, PWM2, SDMMC3, SPI3, 0x3390, N, N),
|
||||
PINGROUP(sdmmc3_cmd_pa7, UARTA, PWM3, SDMMC3, SPI2, 0x3394, N, N),
|
||||
PINGROUP(gmi_a17_pb0, UARTD, SPI4, GMI, DTV, 0x3234, N, N),
|
||||
PINGROUP(gmi_a18_pb1, UARTD, SPI4, GMI, DTV, 0x3238, N, N),
|
||||
PINGROUP(lcd_pwr0_pb2, DISPLAYA, DISPLAYB, SPI5, HDCP, 0x3090, N, N),
|
||||
PINGROUP(lcd_pclk_pb3, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x3094, N, N),
|
||||
PINGROUP(sdmmc3_dat3_pb4, RSVD1, PWM0, SDMMC3, SPI3, 0x33a4, N, N),
|
||||
PINGROUP(sdmmc3_dat2_pb5, RSVD1, PWM1, SDMMC3, SPI3, 0x33a0, N, N),
|
||||
PINGROUP(sdmmc3_dat1_pb6, RSVD1, RSVD2, SDMMC3, SPI3, 0x339c, N, N),
|
||||
PINGROUP(sdmmc3_dat0_pb7, RSVD1, RSVD2, SDMMC3, SPI3, 0x3398, N, N),
|
||||
PINGROUP(uart3_rts_n_pc0, UARTC, PWM0, GMI, RSVD4, 0x3180, N, N),
|
||||
PINGROUP(lcd_pwr1_pc1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x3070, N, N),
|
||||
PINGROUP(uart2_txd_pc2, UARTB, SPDIF, UARTA, SPI4, 0x3168, N, N),
|
||||
PINGROUP(uart2_rxd_pc3, UARTB, SPDIF, UARTA, SPI4, 0x3164, N, N),
|
||||
PINGROUP(gen1_i2c_scl_pc4, I2C1, RSVD2, RSVD3, RSVD4, 0x31a4, Y, N),
|
||||
PINGROUP(gen1_i2c_sda_pc5, I2C1, RSVD2, RSVD3, RSVD4, 0x31a0, Y, N),
|
||||
PINGROUP(lcd_pwr2_pc6, DISPLAYA, DISPLAYB, SPI5, HDCP, 0x3074, N, N),
|
||||
PINGROUP(gmi_wp_n_pc7, RSVD1, NAND, GMI, GMI_ALT, 0x31c0, N, N),
|
||||
PINGROUP(sdmmc3_dat5_pd0, PWM0, SPI4, SDMMC3, SPI2, 0x33ac, N, N),
|
||||
PINGROUP(sdmmc3_dat4_pd1, PWM1, SPI4, SDMMC3, SPI2, 0x33a8, N, N),
|
||||
PINGROUP(lcd_dc1_pd2, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x310c, N, N),
|
||||
PINGROUP(sdmmc3_dat6_pd3, SPDIF, SPI4, SDMMC3, SPI2, 0x33b0, N, N),
|
||||
PINGROUP(sdmmc3_dat7_pd4, SPDIF, SPI4, SDMMC3, SPI2, 0x33b4, N, N),
|
||||
PINGROUP(vi_d1_pd5, DDR, SDMMC2, VI, RSVD4, 0x3128, N, Y),
|
||||
PINGROUP(vi_vsync_pd6, DDR, RSVD2, VI, RSVD4, 0x315c, N, Y),
|
||||
PINGROUP(vi_hsync_pd7, DDR, RSVD2, VI, RSVD4, 0x3160, N, Y),
|
||||
PINGROUP(lcd_d0_pe0, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30a4, N, N),
|
||||
PINGROUP(lcd_d1_pe1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30a8, N, N),
|
||||
PINGROUP(lcd_d2_pe2, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30ac, N, N),
|
||||
PINGROUP(lcd_d3_pe3, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30b0, N, N),
|
||||
PINGROUP(lcd_d4_pe4, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30b4, N, N),
|
||||
PINGROUP(lcd_d5_pe5, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30b8, N, N),
|
||||
PINGROUP(lcd_d6_pe6, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30bc, N, N),
|
||||
PINGROUP(lcd_d7_pe7, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30c0, N, N),
|
||||
PINGROUP(lcd_d8_pf0, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30c4, N, N),
|
||||
PINGROUP(lcd_d9_pf1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30c8, N, N),
|
||||
PINGROUP(lcd_d10_pf2, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30cc, N, N),
|
||||
PINGROUP(lcd_d11_pf3, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30d0, N, N),
|
||||
PINGROUP(lcd_d12_pf4, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30d4, N, N),
|
||||
PINGROUP(lcd_d13_pf5, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30d8, N, N),
|
||||
PINGROUP(lcd_d14_pf6, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30dc, N, N),
|
||||
PINGROUP(lcd_d15_pf7, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30e0, N, N),
|
||||
PINGROUP(gmi_ad0_pg0, RSVD1, NAND, GMI, RSVD4, 0x31f0, N, N),
|
||||
PINGROUP(gmi_ad1_pg1, RSVD1, NAND, GMI, RSVD4, 0x31f4, N, N),
|
||||
PINGROUP(gmi_ad2_pg2, RSVD1, NAND, GMI, RSVD4, 0x31f8, N, N),
|
||||
PINGROUP(gmi_ad3_pg3, RSVD1, NAND, GMI, RSVD4, 0x31fc, N, N),
|
||||
PINGROUP(gmi_ad4_pg4, RSVD1, NAND, GMI, RSVD4, 0x3200, N, N),
|
||||
PINGROUP(gmi_ad5_pg5, RSVD1, NAND, GMI, RSVD4, 0x3204, N, N),
|
||||
PINGROUP(gmi_ad6_pg6, RSVD1, NAND, GMI, RSVD4, 0x3208, N, N),
|
||||
PINGROUP(gmi_ad7_pg7, RSVD1, NAND, GMI, RSVD4, 0x320c, N, N),
|
||||
PINGROUP(gmi_ad8_ph0, PWM0, NAND, GMI, RSVD4, 0x3210, N, N),
|
||||
PINGROUP(gmi_ad9_ph1, PWM1, NAND, GMI, RSVD4, 0x3214, N, N),
|
||||
PINGROUP(gmi_ad10_ph2, PWM2, NAND, GMI, RSVD4, 0x3218, N, N),
|
||||
PINGROUP(gmi_ad11_ph3, PWM3, NAND, GMI, RSVD4, 0x321c, N, N),
|
||||
PINGROUP(gmi_ad12_ph4, RSVD1, NAND, GMI, RSVD4, 0x3220, N, N),
|
||||
PINGROUP(gmi_ad13_ph5, RSVD1, NAND, GMI, RSVD4, 0x3224, N, N),
|
||||
PINGROUP(gmi_ad14_ph6, RSVD1, NAND, GMI, RSVD4, 0x3228, N, N),
|
||||
PINGROUP(gmi_ad15_ph7, RSVD1, NAND, GMI, RSVD4, 0x322c, N, N),
|
||||
PINGROUP(gmi_wr_n_pi0, RSVD1, NAND, GMI, RSVD4, 0x3240, N, N),
|
||||
PINGROUP(gmi_oe_n_pi1, RSVD1, NAND, GMI, RSVD4, 0x3244, N, N),
|
||||
PINGROUP(gmi_dqs_pi2, RSVD1, NAND, GMI, RSVD4, 0x3248, N, N),
|
||||
PINGROUP(gmi_cs6_n_pi3, NAND, NAND_ALT, GMI, SATA, 0x31e8, N, N),
|
||||
PINGROUP(gmi_rst_n_pi4, NAND, NAND_ALT, GMI, RSVD4, 0x324c, N, N),
|
||||
PINGROUP(gmi_iordy_pi5, RSVD1, NAND, GMI, RSVD4, 0x31c4, N, N),
|
||||
PINGROUP(gmi_cs7_n_pi6, NAND, NAND_ALT, GMI, GMI_ALT, 0x31ec, N, N),
|
||||
PINGROUP(gmi_wait_pi7, RSVD1, NAND, GMI, RSVD4, 0x31c8, N, N),
|
||||
PINGROUP(gmi_cs0_n_pj0, RSVD1, NAND, GMI, DTV, 0x31d4, N, N),
|
||||
PINGROUP(lcd_de_pj1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x3098, N, N),
|
||||
PINGROUP(gmi_cs1_n_pj2, RSVD1, NAND, GMI, DTV, 0x31d8, N, N),
|
||||
PINGROUP(lcd_hsync_pj3, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x309c, N, N),
|
||||
PINGROUP(lcd_vsync_pj4, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30a0, N, N),
|
||||
PINGROUP(uart2_cts_n_pj5, UARTA, UARTB, GMI, SPI4, 0x3170, N, N),
|
||||
PINGROUP(uart2_rts_n_pj6, UARTA, UARTB, GMI, SPI4, 0x316c, N, N),
|
||||
PINGROUP(gmi_a16_pj7, UARTD, SPI4, GMI, GMI_ALT, 0x3230, N, N),
|
||||
PINGROUP(gmi_adv_n_pk0, RSVD1, NAND, GMI, RSVD4, 0x31cc, N, N),
|
||||
PINGROUP(gmi_clk_pk1, RSVD1, NAND, GMI, RSVD4, 0x31d0, N, N),
|
||||
PINGROUP(gmi_cs4_n_pk2, RSVD1, NAND, GMI, RSVD4, 0x31e4, N, N),
|
||||
PINGROUP(gmi_cs2_n_pk3, RSVD1, NAND, GMI, RSVD4, 0x31dc, N, N),
|
||||
PINGROUP(gmi_cs3_n_pk4, RSVD1, NAND, GMI, GMI_ALT, 0x31e0, N, N),
|
||||
PINGROUP(spdif_out_pk5, SPDIF, RSVD2, I2C1, SDMMC2, 0x3354, N, N),
|
||||
PINGROUP(spdif_in_pk6, SPDIF, HDA, I2C1, SDMMC2, 0x3350, N, N),
|
||||
PINGROUP(gmi_a19_pk7, UARTD, SPI4, GMI, RSVD4, 0x323c, N, N),
|
||||
PINGROUP(vi_d2_pl0, DDR, SDMMC2, VI, RSVD4, 0x312c, N, Y),
|
||||
PINGROUP(vi_d3_pl1, DDR, SDMMC2, VI, RSVD4, 0x3130, N, Y),
|
||||
PINGROUP(vi_d4_pl2, DDR, SDMMC2, VI, RSVD4, 0x3134, N, Y),
|
||||
PINGROUP(vi_d5_pl3, DDR, SDMMC2, VI, RSVD4, 0x3138, N, Y),
|
||||
PINGROUP(vi_d6_pl4, DDR, SDMMC2, VI, RSVD4, 0x313c, N, Y),
|
||||
PINGROUP(vi_d7_pl5, DDR, SDMMC2, VI, RSVD4, 0x3140, N, Y),
|
||||
PINGROUP(vi_d8_pl6, DDR, SDMMC2, VI, RSVD4, 0x3144, N, Y),
|
||||
PINGROUP(vi_d9_pl7, DDR, SDMMC2, VI, RSVD4, 0x3148, N, Y),
|
||||
PINGROUP(lcd_d16_pm0, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30e4, N, N),
|
||||
PINGROUP(lcd_d17_pm1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30e8, N, N),
|
||||
PINGROUP(lcd_d18_pm2, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30ec, N, N),
|
||||
PINGROUP(lcd_d19_pm3, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30f0, N, N),
|
||||
PINGROUP(lcd_d20_pm4, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30f4, N, N),
|
||||
PINGROUP(lcd_d21_pm5, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30f8, N, N),
|
||||
PINGROUP(lcd_d22_pm6, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x30fc, N, N),
|
||||
PINGROUP(lcd_d23_pm7, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x3100, N, N),
|
||||
PINGROUP(dap1_fs_pn0, I2S0, HDA, GMI, SDMMC2, 0x3338, N, N),
|
||||
PINGROUP(dap1_din_pn1, I2S0, HDA, GMI, SDMMC2, 0x333c, N, N),
|
||||
PINGROUP(dap1_dout_pn2, I2S0, HDA, GMI, SDMMC2, 0x3340, N, N),
|
||||
PINGROUP(dap1_sclk_pn3, I2S0, HDA, GMI, SDMMC2, 0x3344, N, N),
|
||||
PINGROUP(lcd_cs0_n_pn4, DISPLAYA, DISPLAYB, SPI5, RSVD4, 0x3084, N, N),
|
||||
PINGROUP(lcd_sdout_pn5, DISPLAYA, DISPLAYB, SPI5, HDCP, 0x307c, N, N),
|
||||
PINGROUP(lcd_dc0_pn6, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x3088, N, N),
|
||||
PINGROUP(hdmi_int_pn7, HDMI, RSVD2, RSVD3, RSVD4, 0x3110, N, N),
|
||||
PINGROUP(ulpi_data7_po0, SPI2, HSI, UARTA, ULPI, 0x301c, N, N),
|
||||
PINGROUP(ulpi_data0_po1, SPI3, HSI, UARTA, ULPI, 0x3000, N, N),
|
||||
PINGROUP(ulpi_data1_po2, SPI3, HSI, UARTA, ULPI, 0x3004, N, N),
|
||||
PINGROUP(ulpi_data2_po3, SPI3, HSI, UARTA, ULPI, 0x3008, N, N),
|
||||
PINGROUP(ulpi_data3_po4, SPI3, HSI, UARTA, ULPI, 0x300c, N, N),
|
||||
PINGROUP(ulpi_data4_po5, SPI2, HSI, UARTA, ULPI, 0x3010, N, N),
|
||||
PINGROUP(ulpi_data5_po6, SPI2, HSI, UARTA, ULPI, 0x3014, N, N),
|
||||
PINGROUP(ulpi_data6_po7, SPI2, HSI, UARTA, ULPI, 0x3018, N, N),
|
||||
PINGROUP(dap3_fs_pp0, I2S2, RSVD2, DISPLAYA, DISPLAYB, 0x3030, N, N),
|
||||
PINGROUP(dap3_din_pp1, I2S2, RSVD2, DISPLAYA, DISPLAYB, 0x3034, N, N),
|
||||
PINGROUP(dap3_dout_pp2, I2S2, RSVD2, DISPLAYA, DISPLAYB, 0x3038, N, N),
|
||||
PINGROUP(dap3_sclk_pp3, I2S2, RSVD2, DISPLAYA, DISPLAYB, 0x303c, N, N),
|
||||
PINGROUP(dap4_fs_pp4, I2S3, RSVD2, GMI, RSVD4, 0x31a8, N, N),
|
||||
PINGROUP(dap4_din_pp5, I2S3, RSVD2, GMI, RSVD4, 0x31ac, N, N),
|
||||
PINGROUP(dap4_dout_pp6, I2S3, RSVD2, GMI, RSVD4, 0x31b0, N, N),
|
||||
PINGROUP(dap4_sclk_pp7, I2S3, RSVD2, GMI, RSVD4, 0x31b4, N, N),
|
||||
PINGROUP(kb_col0_pq0, KBC, NAND, TRACE, TEST, 0x32fc, N, N),
|
||||
PINGROUP(kb_col1_pq1, KBC, NAND, TRACE, TEST, 0x3300, N, N),
|
||||
PINGROUP(kb_col2_pq2, KBC, NAND, TRACE, RSVD4, 0x3304, N, N),
|
||||
PINGROUP(kb_col3_pq3, KBC, NAND, TRACE, RSVD4, 0x3308, N, N),
|
||||
PINGROUP(kb_col4_pq4, KBC, NAND, TRACE, RSVD4, 0x330c, N, N),
|
||||
PINGROUP(kb_col5_pq5, KBC, NAND, TRACE, RSVD4, 0x3310, N, N),
|
||||
PINGROUP(kb_col6_pq6, KBC, NAND, TRACE, MIO, 0x3314, N, N),
|
||||
PINGROUP(kb_col7_pq7, KBC, NAND, TRACE, MIO, 0x3318, N, N),
|
||||
PINGROUP(kb_row0_pr0, KBC, NAND, RSVD3, RSVD4, 0x32bc, N, N),
|
||||
PINGROUP(kb_row1_pr1, KBC, NAND, RSVD3, RSVD4, 0x32c0, N, N),
|
||||
PINGROUP(kb_row2_pr2, KBC, NAND, RSVD3, RSVD4, 0x32c4, N, N),
|
||||
PINGROUP(kb_row3_pr3, KBC, NAND, RSVD3, INVALID, 0x32c8, N, N),
|
||||
PINGROUP(kb_row4_pr4, KBC, NAND, TRACE, RSVD4, 0x32cc, N, N),
|
||||
PINGROUP(kb_row5_pr5, KBC, NAND, TRACE, OWR, 0x32d0, N, N),
|
||||
PINGROUP(kb_row6_pr6, KBC, NAND, SDMMC2, MIO, 0x32d4, N, N),
|
||||
PINGROUP(kb_row7_pr7, KBC, NAND, SDMMC2, MIO, 0x32d8, N, N),
|
||||
PINGROUP(kb_row8_ps0, KBC, NAND, SDMMC2, MIO, 0x32dc, N, N),
|
||||
PINGROUP(kb_row9_ps1, KBC, NAND, SDMMC2, MIO, 0x32e0, N, N),
|
||||
PINGROUP(kb_row10_ps2, KBC, NAND, SDMMC2, MIO, 0x32e4, N, N),
|
||||
PINGROUP(kb_row11_ps3, KBC, NAND, SDMMC2, MIO, 0x32e8, N, N),
|
||||
PINGROUP(kb_row12_ps4, KBC, NAND, SDMMC2, MIO, 0x32ec, N, N),
|
||||
PINGROUP(kb_row13_ps5, KBC, NAND, SDMMC2, MIO, 0x32f0, N, N),
|
||||
PINGROUP(kb_row14_ps6, KBC, NAND, SDMMC2, MIO, 0x32f4, N, N),
|
||||
PINGROUP(kb_row15_ps7, KBC, NAND, SDMMC2, MIO, 0x32f8, N, N),
|
||||
PINGROUP(vi_pclk_pt0, RSVD1, SDMMC2, VI, RSVD4, 0x3154, N, Y),
|
||||
PINGROUP(vi_mclk_pt1, VI, VI_ALT1, VI_ALT2, VI_ALT3, 0x3158, N, Y),
|
||||
PINGROUP(vi_d10_pt2, DDR, RSVD2, VI, RSVD4, 0x314c, N, Y),
|
||||
PINGROUP(vi_d11_pt3, DDR, RSVD2, VI, RSVD4, 0x3150, N, Y),
|
||||
PINGROUP(vi_d0_pt4, DDR, RSVD2, VI, RSVD4, 0x3124, N, Y),
|
||||
PINGROUP(gen2_i2c_scl_pt5, I2C2, HDCP, GMI, RSVD4, 0x3250, Y, N),
|
||||
PINGROUP(gen2_i2c_sda_pt6, I2C2, HDCP, GMI, RSVD4, 0x3254, Y, N),
|
||||
PINGROUP(sdmmc4_cmd_pt7, I2C3, NAND, GMI, SDMMC4, 0x325c, N, Y),
|
||||
PINGROUP(pu0, OWR, UARTA, GMI, RSVD4, 0x3184, N, N),
|
||||
PINGROUP(pu1, RSVD1, UARTA, GMI, RSVD4, 0x3188, N, N),
|
||||
PINGROUP(pu2, RSVD1, UARTA, GMI, RSVD4, 0x318c, N, N),
|
||||
PINGROUP(pu3, PWM0, UARTA, GMI, RSVD4, 0x3190, N, N),
|
||||
PINGROUP(pu4, PWM1, UARTA, GMI, RSVD4, 0x3194, N, N),
|
||||
PINGROUP(pu5, PWM2, UARTA, GMI, RSVD4, 0x3198, N, N),
|
||||
PINGROUP(pu6, PWM3, UARTA, GMI, RSVD4, 0x319c, N, N),
|
||||
PINGROUP(jtag_rtck_pu7, RTCK, RSVD2, RSVD3, RSVD4, 0x32b0, N, N),
|
||||
PINGROUP(pv0, RSVD1, RSVD2, RSVD3, RSVD4, 0x3040, N, N),
|
||||
PINGROUP(pv1, RSVD1, RSVD2, RSVD3, RSVD4, 0x3044, N, N),
|
||||
PINGROUP(pv2, OWR, RSVD2, RSVD3, RSVD4, 0x3060, N, N),
|
||||
PINGROUP(pv3, CLK_12M_OUT, RSVD2, RSVD3, RSVD4, 0x3064, N, N),
|
||||
PINGROUP(ddc_scl_pv4, I2C4, RSVD2, RSVD3, RSVD4, 0x3114, N, N),
|
||||
PINGROUP(ddc_sda_pv5, I2C4, RSVD2, RSVD3, RSVD4, 0x3118, N, N),
|
||||
PINGROUP(crt_hsync_pv6, CRT, RSVD2, RSVD3, RSVD4, 0x311c, N, N),
|
||||
PINGROUP(crt_vsync_pv7, CRT, RSVD2, RSVD3, RSVD4, 0x3120, N, N),
|
||||
PINGROUP(lcd_cs1_n_pw0, DISPLAYA, DISPLAYB, SPI5, RSVD4, 0x3104, N, N),
|
||||
PINGROUP(lcd_m1_pw1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x3108, N, N),
|
||||
PINGROUP(spi2_cs1_n_pw2, SPI3, SPI2, SPI2_ALT, I2C1, 0x3388, N, N),
|
||||
PINGROUP(spi2_cs2_n_pw3, SPI3, SPI2, SPI2_ALT, I2C1, 0x338c, N, N),
|
||||
PINGROUP(clk1_out_pw4, EXTPERIPH1, RSVD2, RSVD3, RSVD4, 0x334c, N, N),
|
||||
PINGROUP(clk2_out_pw5, EXTPERIPH2, RSVD2, RSVD3, RSVD4, 0x3068, N, N),
|
||||
PINGROUP(uart3_txd_pw6, UARTC, RSVD2, GMI, RSVD4, 0x3174, N, N),
|
||||
PINGROUP(uart3_rxd_pw7, UARTC, RSVD2, GMI, RSVD4, 0x3178, N, N),
|
||||
PINGROUP(spi2_mosi_px0, SPI6, SPI2, SPI3, GMI, 0x3368, N, N),
|
||||
PINGROUP(spi2_miso_px1, SPI6, SPI2, SPI3, GMI, 0x336c, N, N),
|
||||
PINGROUP(spi2_sck_px2, SPI6, SPI2, SPI3, GMI, 0x3374, N, N),
|
||||
PINGROUP(spi2_cs0_n_px3, SPI6, SPI2, SPI3, GMI, 0x3370, N, N),
|
||||
PINGROUP(spi1_mosi_px4, SPI2, SPI1, SPI2_ALT, GMI, 0x3378, N, N),
|
||||
PINGROUP(spi1_sck_px5, SPI2, SPI1, SPI2_ALT, GMI, 0x337c, N, N),
|
||||
PINGROUP(spi1_cs0_n_px6, SPI2, SPI1, SPI2_ALT, GMI, 0x3380, N, N),
|
||||
PINGROUP(spi1_miso_px7, SPI3, SPI1, SPI2_ALT, RSVD4, 0x3384, N, N),
|
||||
PINGROUP(ulpi_clk_py0, SPI1, RSVD2, UARTD, ULPI, 0x3020, N, N),
|
||||
PINGROUP(ulpi_dir_py1, SPI1, RSVD2, UARTD, ULPI, 0x3024, N, N),
|
||||
PINGROUP(ulpi_nxt_py2, SPI1, RSVD2, UARTD, ULPI, 0x3028, N, N),
|
||||
PINGROUP(ulpi_stp_py3, SPI1, RSVD2, UARTD, ULPI, 0x302c, N, N),
|
||||
PINGROUP(sdmmc1_dat3_py4, SDMMC1, RSVD2, UARTE, UARTA, 0x3050, N, N),
|
||||
PINGROUP(sdmmc1_dat2_py5, SDMMC1, RSVD2, UARTE, UARTA, 0x3054, N, N),
|
||||
PINGROUP(sdmmc1_dat1_py6, SDMMC1, RSVD2, UARTE, UARTA, 0x3058, N, N),
|
||||
PINGROUP(sdmmc1_dat0_py7, SDMMC1, RSVD2, UARTE, UARTA, 0x305c, N, N),
|
||||
PINGROUP(sdmmc1_clk_pz0, SDMMC1, RSVD2, RSVD3, UARTA, 0x3048, N, N),
|
||||
PINGROUP(sdmmc1_cmd_pz1, SDMMC1, RSVD2, RSVD3, UARTA, 0x304c, N, N),
|
||||
PINGROUP(lcd_sdin_pz2, DISPLAYA, DISPLAYB, SPI5, RSVD4, 0x3078, N, N),
|
||||
PINGROUP(lcd_wr_n_pz3, DISPLAYA, DISPLAYB, SPI5, HDCP, 0x3080, N, N),
|
||||
PINGROUP(lcd_sck_pz4, DISPLAYA, DISPLAYB, SPI5, HDCP, 0x308c, N, N),
|
||||
PINGROUP(sys_clk_req_pz5, SYSCLK, RSVD2, RSVD3, RSVD4, 0x3320, N, N),
|
||||
PINGROUP(pwr_i2c_scl_pz6, I2CPWR, RSVD2, RSVD3, RSVD4, 0x32b4, Y, N),
|
||||
PINGROUP(pwr_i2c_sda_pz7, I2CPWR, RSVD2, RSVD3, RSVD4, 0x32b8, Y, N),
|
||||
PINGROUP(sdmmc4_dat0_paa0, UARTE, SPI3, GMI, SDMMC4, 0x3260, N, Y),
|
||||
PINGROUP(sdmmc4_dat1_paa1, UARTE, SPI3, GMI, SDMMC4, 0x3264, N, Y),
|
||||
PINGROUP(sdmmc4_dat2_paa2, UARTE, SPI3, GMI, SDMMC4, 0x3268, N, Y),
|
||||
PINGROUP(sdmmc4_dat3_paa3, UARTE, SPI3, GMI, SDMMC4, 0x326c, N, Y),
|
||||
PINGROUP(sdmmc4_dat4_paa4, I2C3, I2S4, GMI, SDMMC4, 0x3270, N, Y),
|
||||
PINGROUP(sdmmc4_dat5_paa5, VGP3, I2S4, GMI, SDMMC4, 0x3274, N, Y),
|
||||
PINGROUP(sdmmc4_dat6_paa6, VGP4, I2S4, GMI, SDMMC4, 0x3278, N, Y),
|
||||
PINGROUP(sdmmc4_dat7_paa7, VGP5, I2S4, GMI, SDMMC4, 0x327c, N, Y),
|
||||
PINGROUP(pbb0, I2S4, RSVD2, RSVD3, SDMMC4, 0x328c, N, N),
|
||||
PINGROUP(cam_i2c_scl_pbb1, VGP1, I2C3, RSVD3, SDMMC4, 0x3290, Y, N),
|
||||
PINGROUP(cam_i2c_sda_pbb2, VGP2, I2C3, RSVD3, SDMMC4, 0x3294, Y, N),
|
||||
PINGROUP(pbb3, VGP3, DISPLAYA, DISPLAYB, SDMMC4, 0x3298, N, N),
|
||||
PINGROUP(pbb4, VGP4, DISPLAYA, DISPLAYB, SDMMC4, 0x329c, N, N),
|
||||
PINGROUP(pbb5, VGP5, DISPLAYA, DISPLAYB, SDMMC4, 0x32a0, N, N),
|
||||
PINGROUP(pbb6, VGP6, DISPLAYA, DISPLAYB, SDMMC4, 0x32a4, N, N),
|
||||
PINGROUP(pbb7, I2S4, RSVD2, RSVD3, SDMMC4, 0x32a8, N, N),
|
||||
PINGROUP(cam_mclk_pcc0, VI, VI_ALT1, VI_ALT3, SDMMC4, 0x3284, N, N),
|
||||
PINGROUP(pcc1, I2S4, RSVD2, RSVD3, SDMMC4, 0x3288, N, N),
|
||||
PINGROUP(pcc2, I2S4, RSVD2, RSVD3, RSVD4, 0x32ac, N, N),
|
||||
PINGROUP(sdmmc4_rst_n_pcc3, VGP6, RSVD2, RSVD3, SDMMC4, 0x3280, N, Y),
|
||||
PINGROUP(sdmmc4_clk_pcc4, INVALID, NAND, GMI, SDMMC4, 0x3258, N, Y),
|
||||
PINGROUP(clk2_req_pcc5, DAP, RSVD2, RSVD3, RSVD4, 0x306c, N, N),
|
||||
PINGROUP(pex_l2_rst_n_pcc6, PCIE, HDA, RSVD3, RSVD4, 0x33d8, N, N),
|
||||
PINGROUP(pex_l2_clkreq_n_pcc7, PCIE, HDA, RSVD3, RSVD4, 0x33dc, N, N),
|
||||
PINGROUP(pex_l0_prsnt_n_pdd0, PCIE, HDA, RSVD3, RSVD4, 0x33b8, N, N),
|
||||
PINGROUP(pex_l0_rst_n_pdd1, PCIE, HDA, RSVD3, RSVD4, 0x33bc, N, N),
|
||||
PINGROUP(pex_l0_clkreq_n_pdd2, PCIE, HDA, RSVD3, RSVD4, 0x33c0, N, N),
|
||||
PINGROUP(pex_wake_n_pdd3, PCIE, HDA, RSVD3, RSVD4, 0x33c4, N, N),
|
||||
PINGROUP(pex_l1_prsnt_n_pdd4, PCIE, HDA, RSVD3, RSVD4, 0x33c8, N, N),
|
||||
PINGROUP(pex_l1_rst_n_pdd5, PCIE, HDA, RSVD3, RSVD4, 0x33cc, N, N),
|
||||
PINGROUP(pex_l1_clkreq_n_pdd6, PCIE, HDA, RSVD3, RSVD4, 0x33d0, N, N),
|
||||
PINGROUP(pex_l2_prsnt_n_pdd7, PCIE, HDA, RSVD3, RSVD4, 0x33d4, N, N),
|
||||
PINGROUP(clk3_out_pee0, EXTPERIPH3, RSVD2, RSVD3, RSVD4, 0x31b8, N, N),
|
||||
PINGROUP(clk3_req_pee1, DEV3, RSVD2, RSVD3, RSVD4, 0x31bc, N, N),
|
||||
PINGROUP(clk1_req_pee2, DAP, HDA, RSVD3, RSVD4, 0x3348, N, N),
|
||||
PINGROUP(hdmi_cec_pee3, CEC, RSVD2, RSVD3, RSVD4, 0x33e0, Y, N),
|
||||
PINGROUP(clk_32k_in, CLK_32K_IN, RSVD2, RSVD3, RSVD4, 0x3330, N, N),
|
||||
PINGROUP(core_pwr_req, CORE_PWR_REQ, RSVD2, RSVD3, RSVD4, 0x3324, N, N),
|
||||
PINGROUP(cpu_pwr_req, CPU_PWR_REQ, RSVD2, RSVD3, RSVD4, 0x3328, N, N),
|
||||
PINGROUP(owr, OWR, CEC, RSVD3, RSVD4, 0x3334, N, N),
|
||||
PINGROUP(pwr_int_n, PWR_INT_N, RSVD2, RSVD3, RSVD4, 0x332c, N, N),
|
||||
/* pg_name, r, hsm_b, schmitt_b, lpmd_b, drvdn_b, drvdn_w, drvup_b, drvup_w, slwr_b, slwr_w, slwf_b, slwf_w */
|
||||
DRV_PINGROUP(ao1, 0x868, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2),
|
||||
DRV_PINGROUP(ao2, 0x86c, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2),
|
||||
|
|
|
@ -391,14 +391,16 @@ int pinmux_enable_setting(struct pinctrl_setting const *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;
|
||||
const unsigned *pins;
|
||||
unsigned num_pins;
|
||||
int ret = 0;
|
||||
const unsigned *pins = NULL;
|
||||
unsigned num_pins = 0;
|
||||
int i;
|
||||
struct pin_desc *desc;
|
||||
|
||||
ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
|
||||
&pins, &num_pins);
|
||||
if (pctlops->get_group_pins)
|
||||
ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
|
||||
&pins, &num_pins);
|
||||
|
||||
if (ret) {
|
||||
const char *gname;
|
||||
|
||||
|
@ -470,14 +472,15 @@ void pinmux_disable_setting(struct pinctrl_setting const *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;
|
||||
const unsigned *pins;
|
||||
unsigned num_pins;
|
||||
int ret = 0;
|
||||
const unsigned *pins = NULL;
|
||||
unsigned num_pins = 0;
|
||||
int i;
|
||||
struct pin_desc *desc;
|
||||
|
||||
ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
|
||||
&pins, &num_pins);
|
||||
if (pctlops->get_group_pins)
|
||||
ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
|
||||
&pins, &num_pins);
|
||||
if (ret) {
|
||||
const char *gname;
|
||||
|
||||
|
|
|
@ -20,7 +20,10 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/pinctrl/pinconf-generic.h>
|
||||
|
||||
#ifndef CONFIG_ARCH_MULTIPLATFORM
|
||||
#include <mach/irqs.h>
|
||||
#endif
|
||||
|
||||
#include "core.h"
|
||||
#include "sh_pfc.h"
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/pinctrl/pinconf-generic.h>
|
||||
|
||||
#ifndef CONFIG_ARCH_MULTIPLATFORM
|
||||
#include <mach/irqs.h>
|
||||
#endif
|
||||
|
||||
#include "core.h"
|
||||
#include "sh_pfc.h"
|
||||
|
|
|
@ -782,7 +782,8 @@ enum {
|
|||
USB1_PWEN_MARK, AUDIO_CLKOUT_D_MARK, USB1_OVC_MARK,
|
||||
TCLK1_B_MARK,
|
||||
|
||||
I2C3_SCL_MARK, I2C3_SDA_MARK,
|
||||
IIC0_SCL_MARK, IIC0_SDA_MARK, I2C0_SCL_MARK, I2C0_SDA_MARK,
|
||||
IIC3_SCL_MARK, IIC3_SDA_MARK, I2C3_SCL_MARK, I2C3_SDA_MARK,
|
||||
PINMUX_MARK_END,
|
||||
};
|
||||
|
||||
|
@ -1722,6 +1723,13 @@ static const u16 pinmux_data[] = {
|
|||
PINMUX_IPSR_DATA(IP16_7, USB1_OVC),
|
||||
PINMUX_IPSR_MODSEL_DATA(IP16_7, TCLK1_B, SEL_TMU1_1),
|
||||
|
||||
PINMUX_DATA(IIC0_SCL_MARK, FN_SEL_IIC0_0),
|
||||
PINMUX_DATA(IIC0_SDA_MARK, FN_SEL_IIC0_0),
|
||||
PINMUX_DATA(I2C0_SCL_MARK, FN_SEL_IIC0_1),
|
||||
PINMUX_DATA(I2C0_SDA_MARK, FN_SEL_IIC0_1),
|
||||
|
||||
PINMUX_DATA(IIC3_SCL_MARK, FN_SEL_IICDVFS_0),
|
||||
PINMUX_DATA(IIC3_SDA_MARK, FN_SEL_IICDVFS_0),
|
||||
PINMUX_DATA(I2C3_SCL_MARK, FN_SEL_IICDVFS_1),
|
||||
PINMUX_DATA(I2C3_SDA_MARK, FN_SEL_IICDVFS_1),
|
||||
};
|
||||
|
@ -1735,8 +1743,10 @@ static const struct sh_pfc_pin pinmux_pins[] = {
|
|||
PINMUX_GPIO_GP_ALL(),
|
||||
|
||||
/* Pins not associated with a GPIO port */
|
||||
SH_PFC_PIN_NAMED(ROW_GROUP_A('J'), 15, AJ15),
|
||||
SH_PFC_PIN_NAMED(ROW_GROUP_A('F'), 15, AF15),
|
||||
SH_PFC_PIN_NAMED(ROW_GROUP_A('G'), 15, AG15),
|
||||
SH_PFC_PIN_NAMED(ROW_GROUP_A('H'), 15, AH15),
|
||||
SH_PFC_PIN_NAMED(ROW_GROUP_A('J'), 15, AJ15),
|
||||
};
|
||||
|
||||
/* - AUDIO CLOCK ------------------------------------------------------------ */
|
||||
|
@ -2054,6 +2064,14 @@ static const unsigned int hscif1_ctrl_b_pins[] = {
|
|||
static const unsigned int hscif1_ctrl_b_mux[] = {
|
||||
HRTS1_N_B_MARK, HCTS1_N_B_MARK,
|
||||
};
|
||||
/* - I2C0 ------------------------------------------------------------------- */
|
||||
static const unsigned int i2c0_pins[] = {
|
||||
/* SCL, SDA */
|
||||
PIN_A_NUMBER('G', 15), PIN_A_NUMBER('F', 15),
|
||||
};
|
||||
static const unsigned int i2c0_mux[] = {
|
||||
I2C0_SCL_MARK, I2C0_SDA_MARK,
|
||||
};
|
||||
/* - I2C1 ------------------------------------------------------------------- */
|
||||
static const unsigned int i2c1_pins[] = {
|
||||
/* SCL, SDA */
|
||||
|
@ -2120,6 +2138,80 @@ static const unsigned int i2c3_pins[] = {
|
|||
static const unsigned int i2c3_mux[] = {
|
||||
I2C3_SCL_MARK, I2C3_SDA_MARK,
|
||||
};
|
||||
/* - IIC0 (I2C4) ------------------------------------------------------------ */
|
||||
static const unsigned int iic0_pins[] = {
|
||||
/* SCL, SDA */
|
||||
PIN_A_NUMBER('G', 15), PIN_A_NUMBER('F', 15),
|
||||
};
|
||||
static const unsigned int iic0_mux[] = {
|
||||
IIC0_SCL_MARK, IIC0_SDA_MARK,
|
||||
};
|
||||
/* - IIC1 (I2C5) ------------------------------------------------------------ */
|
||||
static const unsigned int iic1_pins[] = {
|
||||
/* SCL, SDA */
|
||||
RCAR_GP_PIN(1, 16), RCAR_GP_PIN(1, 17),
|
||||
};
|
||||
static const unsigned int iic1_mux[] = {
|
||||
IIC1_SCL_MARK, IIC1_SDA_MARK,
|
||||
};
|
||||
static const unsigned int iic1_b_pins[] = {
|
||||
/* SCL, SDA */
|
||||
RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
|
||||
};
|
||||
static const unsigned int iic1_b_mux[] = {
|
||||
IIC1_SCL_B_MARK, IIC1_SDA_B_MARK,
|
||||
};
|
||||
static const unsigned int iic1_c_pins[] = {
|
||||
/* SCL, SDA */
|
||||
RCAR_GP_PIN(4, 30), RCAR_GP_PIN(4, 27),
|
||||
};
|
||||
static const unsigned int iic1_c_mux[] = {
|
||||
IIC1_SCL_C_MARK, IIC1_SDA_C_MARK,
|
||||
};
|
||||
/* - IIC2 (I2C6) ------------------------------------------------------------ */
|
||||
static const unsigned int iic2_pins[] = {
|
||||
/* SCL, SDA */
|
||||
RCAR_GP_PIN(5, 5), RCAR_GP_PIN(5, 6),
|
||||
};
|
||||
static const unsigned int iic2_mux[] = {
|
||||
IIC2_SCL_MARK, IIC2_SDA_MARK,
|
||||
};
|
||||
static const unsigned int iic2_b_pins[] = {
|
||||
/* SCL, SDA */
|
||||
RCAR_GP_PIN(4, 0), RCAR_GP_PIN(4, 1),
|
||||
};
|
||||
static const unsigned int iic2_b_mux[] = {
|
||||
IIC2_SCL_B_MARK, IIC2_SDA_B_MARK,
|
||||
};
|
||||
static const unsigned int iic2_c_pins[] = {
|
||||
/* SCL, SDA */
|
||||
RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7),
|
||||
};
|
||||
static const unsigned int iic2_c_mux[] = {
|
||||
IIC2_SCL_C_MARK, IIC2_SDA_C_MARK,
|
||||
};
|
||||
static const unsigned int iic2_d_pins[] = {
|
||||
/* SCL, SDA */
|
||||
RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15),
|
||||
};
|
||||
static const unsigned int iic2_d_mux[] = {
|
||||
IIC2_SCL_D_MARK, IIC2_SDA_D_MARK,
|
||||
};
|
||||
static const unsigned int iic2_e_pins[] = {
|
||||
/* SCL, SDA */
|
||||
RCAR_GP_PIN(2, 18), RCAR_GP_PIN(2, 19),
|
||||
};
|
||||
static const unsigned int iic2_e_mux[] = {
|
||||
IIC2_SCL_E_MARK, IIC2_SDA_E_MARK,
|
||||
};
|
||||
/* - IIC3 (I2C7) ------------------------------------------------------------ */
|
||||
static const unsigned int iic3_pins[] = {
|
||||
/* SCL, SDA */
|
||||
PIN_A_NUMBER('J', 15), PIN_A_NUMBER('H', 15),
|
||||
};
|
||||
static const unsigned int iic3_mux[] = {
|
||||
IIC3_SCL_MARK, IIC3_SDA_MARK,
|
||||
};
|
||||
/* - INTC ------------------------------------------------------------------- */
|
||||
static const unsigned int intc_irq0_pins[] = {
|
||||
/* IRQ */
|
||||
|
@ -3757,6 +3849,7 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
|
|||
SH_PFC_PIN_GROUP(hscif1_data_b),
|
||||
SH_PFC_PIN_GROUP(hscif1_clk_b),
|
||||
SH_PFC_PIN_GROUP(hscif1_ctrl_b),
|
||||
SH_PFC_PIN_GROUP(i2c0),
|
||||
SH_PFC_PIN_GROUP(i2c1),
|
||||
SH_PFC_PIN_GROUP(i2c1_b),
|
||||
SH_PFC_PIN_GROUP(i2c1_c),
|
||||
|
@ -3766,6 +3859,16 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
|
|||
SH_PFC_PIN_GROUP(i2c2_d),
|
||||
SH_PFC_PIN_GROUP(i2c2_e),
|
||||
SH_PFC_PIN_GROUP(i2c3),
|
||||
SH_PFC_PIN_GROUP(iic0),
|
||||
SH_PFC_PIN_GROUP(iic1),
|
||||
SH_PFC_PIN_GROUP(iic1_b),
|
||||
SH_PFC_PIN_GROUP(iic1_c),
|
||||
SH_PFC_PIN_GROUP(iic2),
|
||||
SH_PFC_PIN_GROUP(iic2_b),
|
||||
SH_PFC_PIN_GROUP(iic2_c),
|
||||
SH_PFC_PIN_GROUP(iic2_d),
|
||||
SH_PFC_PIN_GROUP(iic2_e),
|
||||
SH_PFC_PIN_GROUP(iic3),
|
||||
SH_PFC_PIN_GROUP(intc_irq0),
|
||||
SH_PFC_PIN_GROUP(intc_irq1),
|
||||
SH_PFC_PIN_GROUP(intc_irq2),
|
||||
|
@ -4044,6 +4147,10 @@ static const char * const hscif1_groups[] = {
|
|||
"hscif1_ctrl_b",
|
||||
};
|
||||
|
||||
static const char * const i2c0_groups[] = {
|
||||
"i2c0",
|
||||
};
|
||||
|
||||
static const char * const i2c1_groups[] = {
|
||||
"i2c1",
|
||||
"i2c1_b",
|
||||
|
@ -4062,6 +4169,28 @@ static const char * const i2c3_groups[] = {
|
|||
"i2c3",
|
||||
};
|
||||
|
||||
static const char * const iic0_groups[] = {
|
||||
"iic0",
|
||||
};
|
||||
|
||||
static const char * const iic1_groups[] = {
|
||||
"iic1",
|
||||
"iic1_b",
|
||||
"iic1_c",
|
||||
};
|
||||
|
||||
static const char * const iic2_groups[] = {
|
||||
"iic2",
|
||||
"iic2_b",
|
||||
"iic2_c",
|
||||
"iic2_d",
|
||||
"iic2_e",
|
||||
};
|
||||
|
||||
static const char * const iic3_groups[] = {
|
||||
"iic3",
|
||||
};
|
||||
|
||||
static const char * const intc_groups[] = {
|
||||
"intc_irq0",
|
||||
"intc_irq1",
|
||||
|
@ -4373,9 +4502,14 @@ static const struct sh_pfc_function pinmux_functions[] = {
|
|||
SH_PFC_FUNCTION(eth),
|
||||
SH_PFC_FUNCTION(hscif0),
|
||||
SH_PFC_FUNCTION(hscif1),
|
||||
SH_PFC_FUNCTION(i2c0),
|
||||
SH_PFC_FUNCTION(i2c1),
|
||||
SH_PFC_FUNCTION(i2c2),
|
||||
SH_PFC_FUNCTION(i2c3),
|
||||
SH_PFC_FUNCTION(iic0),
|
||||
SH_PFC_FUNCTION(iic1),
|
||||
SH_PFC_FUNCTION(iic2),
|
||||
SH_PFC_FUNCTION(iic3),
|
||||
SH_PFC_FUNCTION(intc),
|
||||
SH_PFC_FUNCTION(mmc0),
|
||||
SH_PFC_FUNCTION(mmc1),
|
||||
|
|
|
@ -1680,6 +1680,53 @@ static const struct sh_pfc_pin pinmux_pins[] = {
|
|||
PINMUX_GPIO_GP_ALL(),
|
||||
};
|
||||
|
||||
/* - Audio Clock ------------------------------------------------------------ */
|
||||
static const unsigned int audio_clk_a_pins[] = {
|
||||
/* CLK */
|
||||
RCAR_GP_PIN(2, 28),
|
||||
};
|
||||
|
||||
static const unsigned int audio_clk_a_mux[] = {
|
||||
AUDIO_CLKA_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int audio_clk_b_pins[] = {
|
||||
/* CLK */
|
||||
RCAR_GP_PIN(2, 29),
|
||||
};
|
||||
|
||||
static const unsigned int audio_clk_b_mux[] = {
|
||||
AUDIO_CLKB_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int audio_clk_b_b_pins[] = {
|
||||
/* CLK */
|
||||
RCAR_GP_PIN(7, 20),
|
||||
};
|
||||
|
||||
static const unsigned int audio_clk_b_b_mux[] = {
|
||||
AUDIO_CLKB_B_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int audio_clk_c_pins[] = {
|
||||
/* CLK */
|
||||
RCAR_GP_PIN(2, 30),
|
||||
};
|
||||
|
||||
static const unsigned int audio_clk_c_mux[] = {
|
||||
AUDIO_CLKC_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int audio_clkout_pins[] = {
|
||||
/* CLK */
|
||||
RCAR_GP_PIN(2, 31),
|
||||
};
|
||||
|
||||
static const unsigned int audio_clkout_mux[] = {
|
||||
AUDIO_CLKOUT_MARK,
|
||||
};
|
||||
|
||||
|
||||
/* - DU --------------------------------------------------------------------- */
|
||||
static const unsigned int du_rgb666_pins[] = {
|
||||
/* R[7:2], G[7:2], B[7:2] */
|
||||
|
@ -1733,19 +1780,32 @@ static const unsigned int du_clk_out_1_mux[] = {
|
|||
DU1_DOTCLKOUT1_MARK
|
||||
};
|
||||
static const unsigned int du_sync_pins[] = {
|
||||
/* EXVSYNC/VSYNC, EXHSYNC/HSYNC, EXDISP/EXODDF/EXCDE */
|
||||
RCAR_GP_PIN(3, 29), RCAR_GP_PIN(3, 28), RCAR_GP_PIN(3, 27),
|
||||
/* EXVSYNC/VSYNC, EXHSYNC/HSYNC */
|
||||
RCAR_GP_PIN(3, 28), RCAR_GP_PIN(3, 27),
|
||||
};
|
||||
static const unsigned int du_sync_mux[] = {
|
||||
DU1_EXODDF_DU1_ODDF_DISP_CDE_MARK,
|
||||
DU1_EXVSYNC_DU1_VSYNC_MARK, DU1_EXHSYNC_DU1_HSYNC_MARK
|
||||
};
|
||||
static const unsigned int du_cde_disp_pins[] = {
|
||||
/* CDE DISP */
|
||||
RCAR_GP_PIN(3, 31), RCAR_GP_PIN(3, 30),
|
||||
static const unsigned int du_oddf_pins[] = {
|
||||
/* EXDISP/EXODDF/EXCDE */
|
||||
RCAR_GP_PIN(3, 29),
|
||||
};
|
||||
static const unsigned int du_cde_disp_mux[] = {
|
||||
DU1_CDE_MARK, DU1_DISP_MARK
|
||||
static const unsigned int du_oddf_mux[] = {
|
||||
DU1_EXODDF_DU1_ODDF_DISP_CDE_MARK,
|
||||
};
|
||||
static const unsigned int du_cde_pins[] = {
|
||||
/* CDE */
|
||||
RCAR_GP_PIN(3, 31),
|
||||
};
|
||||
static const unsigned int du_cde_mux[] = {
|
||||
DU1_CDE_MARK,
|
||||
};
|
||||
static const unsigned int du_disp_pins[] = {
|
||||
/* DISP */
|
||||
RCAR_GP_PIN(3, 30),
|
||||
};
|
||||
static const unsigned int du_disp_mux[] = {
|
||||
DU1_DISP_MARK,
|
||||
};
|
||||
static const unsigned int du0_clk_in_pins[] = {
|
||||
/* CLKIN */
|
||||
|
@ -3246,6 +3306,260 @@ static const unsigned int sdhi2_wp_pins[] = {
|
|||
static const unsigned int sdhi2_wp_mux[] = {
|
||||
SD2_WP_MARK,
|
||||
};
|
||||
|
||||
/* - SSI -------------------------------------------------------------------- */
|
||||
static const unsigned int ssi0_data_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(2, 2),
|
||||
};
|
||||
|
||||
static const unsigned int ssi0_data_mux[] = {
|
||||
SSI_SDATA0_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi0_data_b_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(3, 4),
|
||||
};
|
||||
|
||||
static const unsigned int ssi0_data_b_mux[] = {
|
||||
SSI_SDATA0_B_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi0129_ctrl_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1),
|
||||
};
|
||||
|
||||
static const unsigned int ssi0129_ctrl_mux[] = {
|
||||
SSI_SCK0129_MARK, SSI_WS0129_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi0129_ctrl_b_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3),
|
||||
};
|
||||
|
||||
static const unsigned int ssi0129_ctrl_b_mux[] = {
|
||||
SSI_SCK0129_B_MARK, SSI_WS0129_B_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi1_data_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(2, 5),
|
||||
};
|
||||
|
||||
static const unsigned int ssi1_data_mux[] = {
|
||||
SSI_SDATA1_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi1_data_b_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(3, 7),
|
||||
};
|
||||
|
||||
static const unsigned int ssi1_data_b_mux[] = {
|
||||
SSI_SDATA1_B_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi1_ctrl_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(2, 3), RCAR_GP_PIN(2, 4),
|
||||
};
|
||||
|
||||
static const unsigned int ssi1_ctrl_mux[] = {
|
||||
SSI_SCK1_MARK, SSI_WS1_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi1_ctrl_b_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(3, 5), RCAR_GP_PIN(3, 6),
|
||||
};
|
||||
|
||||
static const unsigned int ssi1_ctrl_b_mux[] = {
|
||||
SSI_SCK1_B_MARK, SSI_WS1_B_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi2_data_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(2, 8),
|
||||
};
|
||||
|
||||
static const unsigned int ssi2_data_mux[] = {
|
||||
SSI_SDATA2_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi2_ctrl_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
|
||||
};
|
||||
|
||||
static const unsigned int ssi2_ctrl_mux[] = {
|
||||
SSI_SCK2_MARK, SSI_WS2_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi3_data_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(2, 11),
|
||||
};
|
||||
|
||||
static const unsigned int ssi3_data_mux[] = {
|
||||
SSI_SDATA3_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi34_ctrl_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(2, 9), RCAR_GP_PIN(2, 10),
|
||||
};
|
||||
|
||||
static const unsigned int ssi34_ctrl_mux[] = {
|
||||
SSI_SCK34_MARK, SSI_WS34_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi4_data_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(2, 14),
|
||||
};
|
||||
|
||||
static const unsigned int ssi4_data_mux[] = {
|
||||
SSI_SDATA4_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi4_ctrl_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
|
||||
};
|
||||
|
||||
static const unsigned int ssi4_ctrl_mux[] = {
|
||||
SSI_SCK4_MARK, SSI_WS4_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi5_data_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(2, 17),
|
||||
};
|
||||
|
||||
static const unsigned int ssi5_data_mux[] = {
|
||||
SSI_SDATA5_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi5_ctrl_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(2, 15), RCAR_GP_PIN(2, 16),
|
||||
};
|
||||
|
||||
static const unsigned int ssi5_ctrl_mux[] = {
|
||||
SSI_SCK5_MARK, SSI_WS5_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi6_data_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(2, 20),
|
||||
};
|
||||
|
||||
static const unsigned int ssi6_data_mux[] = {
|
||||
SSI_SDATA6_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi6_ctrl_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(2, 18), RCAR_GP_PIN(2, 19),
|
||||
};
|
||||
|
||||
static const unsigned int ssi6_ctrl_mux[] = {
|
||||
SSI_SCK6_MARK, SSI_WS6_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi7_data_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(2, 23),
|
||||
};
|
||||
|
||||
static const unsigned int ssi7_data_mux[] = {
|
||||
SSI_SDATA7_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi7_data_b_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(3, 12),
|
||||
};
|
||||
|
||||
static const unsigned int ssi7_data_b_mux[] = {
|
||||
SSI_SDATA7_B_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi78_ctrl_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(2, 21), RCAR_GP_PIN(2, 22),
|
||||
};
|
||||
|
||||
static const unsigned int ssi78_ctrl_mux[] = {
|
||||
SSI_SCK78_MARK, SSI_WS78_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi78_ctrl_b_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
|
||||
};
|
||||
|
||||
static const unsigned int ssi78_ctrl_b_mux[] = {
|
||||
SSI_SCK78_B_MARK, SSI_WS78_B_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi8_data_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(2, 24),
|
||||
};
|
||||
|
||||
static const unsigned int ssi8_data_mux[] = {
|
||||
SSI_SDATA8_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi8_data_b_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(3, 13),
|
||||
};
|
||||
|
||||
static const unsigned int ssi8_data_b_mux[] = {
|
||||
SSI_SDATA8_B_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi9_data_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(2, 27),
|
||||
};
|
||||
|
||||
static const unsigned int ssi9_data_mux[] = {
|
||||
SSI_SDATA9_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi9_data_b_pins[] = {
|
||||
/* SDATA */
|
||||
RCAR_GP_PIN(3, 18),
|
||||
};
|
||||
|
||||
static const unsigned int ssi9_data_b_mux[] = {
|
||||
SSI_SDATA9_B_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi9_ctrl_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(2, 25), RCAR_GP_PIN(2, 26),
|
||||
};
|
||||
|
||||
static const unsigned int ssi9_ctrl_mux[] = {
|
||||
SSI_SCK9_MARK, SSI_WS9_MARK,
|
||||
};
|
||||
|
||||
static const unsigned int ssi9_ctrl_b_pins[] = {
|
||||
/* SCK, WS */
|
||||
RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15),
|
||||
};
|
||||
|
||||
static const unsigned int ssi9_ctrl_b_mux[] = {
|
||||
SSI_SCK9_B_MARK, SSI_WS9_B_MARK,
|
||||
};
|
||||
|
||||
/* - USB0 ------------------------------------------------------------------- */
|
||||
static const unsigned int usb0_pins[] = {
|
||||
RCAR_GP_PIN(7, 23), /* PWEN */
|
||||
|
@ -3550,12 +3864,19 @@ static const unsigned int vin2_clk_mux[] = {
|
|||
};
|
||||
|
||||
static const struct sh_pfc_pin_group pinmux_groups[] = {
|
||||
SH_PFC_PIN_GROUP(audio_clk_a),
|
||||
SH_PFC_PIN_GROUP(audio_clk_b),
|
||||
SH_PFC_PIN_GROUP(audio_clk_b_b),
|
||||
SH_PFC_PIN_GROUP(audio_clk_c),
|
||||
SH_PFC_PIN_GROUP(audio_clkout),
|
||||
SH_PFC_PIN_GROUP(du_rgb666),
|
||||
SH_PFC_PIN_GROUP(du_rgb888),
|
||||
SH_PFC_PIN_GROUP(du_clk_out_0),
|
||||
SH_PFC_PIN_GROUP(du_clk_out_1),
|
||||
SH_PFC_PIN_GROUP(du_sync),
|
||||
SH_PFC_PIN_GROUP(du_cde_disp),
|
||||
SH_PFC_PIN_GROUP(du_oddf),
|
||||
SH_PFC_PIN_GROUP(du_cde),
|
||||
SH_PFC_PIN_GROUP(du_disp),
|
||||
SH_PFC_PIN_GROUP(du0_clk_in),
|
||||
SH_PFC_PIN_GROUP(du1_clk_in),
|
||||
SH_PFC_PIN_GROUP(du1_clk_in_b),
|
||||
|
@ -3762,6 +4083,34 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
|
|||
SH_PFC_PIN_GROUP(sdhi2_ctrl),
|
||||
SH_PFC_PIN_GROUP(sdhi2_cd),
|
||||
SH_PFC_PIN_GROUP(sdhi2_wp),
|
||||
SH_PFC_PIN_GROUP(ssi0_data),
|
||||
SH_PFC_PIN_GROUP(ssi0_data_b),
|
||||
SH_PFC_PIN_GROUP(ssi0129_ctrl),
|
||||
SH_PFC_PIN_GROUP(ssi0129_ctrl_b),
|
||||
SH_PFC_PIN_GROUP(ssi1_data),
|
||||
SH_PFC_PIN_GROUP(ssi1_data_b),
|
||||
SH_PFC_PIN_GROUP(ssi1_ctrl),
|
||||
SH_PFC_PIN_GROUP(ssi1_ctrl_b),
|
||||
SH_PFC_PIN_GROUP(ssi2_data),
|
||||
SH_PFC_PIN_GROUP(ssi2_ctrl),
|
||||
SH_PFC_PIN_GROUP(ssi3_data),
|
||||
SH_PFC_PIN_GROUP(ssi34_ctrl),
|
||||
SH_PFC_PIN_GROUP(ssi4_data),
|
||||
SH_PFC_PIN_GROUP(ssi4_ctrl),
|
||||
SH_PFC_PIN_GROUP(ssi5_data),
|
||||
SH_PFC_PIN_GROUP(ssi5_ctrl),
|
||||
SH_PFC_PIN_GROUP(ssi6_data),
|
||||
SH_PFC_PIN_GROUP(ssi6_ctrl),
|
||||
SH_PFC_PIN_GROUP(ssi7_data),
|
||||
SH_PFC_PIN_GROUP(ssi7_data_b),
|
||||
SH_PFC_PIN_GROUP(ssi78_ctrl),
|
||||
SH_PFC_PIN_GROUP(ssi78_ctrl_b),
|
||||
SH_PFC_PIN_GROUP(ssi8_data),
|
||||
SH_PFC_PIN_GROUP(ssi8_data_b),
|
||||
SH_PFC_PIN_GROUP(ssi9_data),
|
||||
SH_PFC_PIN_GROUP(ssi9_data_b),
|
||||
SH_PFC_PIN_GROUP(ssi9_ctrl),
|
||||
SH_PFC_PIN_GROUP(ssi9_ctrl_b),
|
||||
SH_PFC_PIN_GROUP(usb0),
|
||||
SH_PFC_PIN_GROUP(usb1),
|
||||
VIN_DATA_PIN_GROUP(vin0_data, 24),
|
||||
|
@ -3798,13 +4147,23 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
|
|||
SH_PFC_PIN_GROUP(vin2_clk),
|
||||
};
|
||||
|
||||
static const char * const audio_clk_groups[] = {
|
||||
"audio_clk_a",
|
||||
"audio_clk_b",
|
||||
"audio_clk_b_b",
|
||||
"audio_clk_c",
|
||||
"audio_clkout",
|
||||
};
|
||||
|
||||
static const char * const du_groups[] = {
|
||||
"du_rgb666",
|
||||
"du_rgb888",
|
||||
"du_clk_out_0",
|
||||
"du_clk_out_1",
|
||||
"du_sync",
|
||||
"du_cde_disp",
|
||||
"du_oddf",
|
||||
"du_cde",
|
||||
"du_disp",
|
||||
};
|
||||
|
||||
static const char * const du0_groups[] = {
|
||||
|
@ -4103,6 +4462,37 @@ static const char * const sdhi2_groups[] = {
|
|||
"sdhi2_wp",
|
||||
};
|
||||
|
||||
static const char * const ssi_groups[] = {
|
||||
"ssi0_data",
|
||||
"ssi0_data_b",
|
||||
"ssi0129_ctrl",
|
||||
"ssi0129_ctrl_b",
|
||||
"ssi1_data",
|
||||
"ssi1_data_b",
|
||||
"ssi1_ctrl",
|
||||
"ssi1_ctrl_b",
|
||||
"ssi2_data",
|
||||
"ssi2_ctrl",
|
||||
"ssi3_data",
|
||||
"ssi34_ctrl",
|
||||
"ssi4_data",
|
||||
"ssi4_ctrl",
|
||||
"ssi5_data",
|
||||
"ssi5_ctrl",
|
||||
"ssi6_data",
|
||||
"ssi6_ctrl",
|
||||
"ssi7_data",
|
||||
"ssi7_data_b",
|
||||
"ssi78_ctrl",
|
||||
"ssi78_ctrl_b",
|
||||
"ssi8_data",
|
||||
"ssi8_data_b",
|
||||
"ssi9_data",
|
||||
"ssi9_data_b",
|
||||
"ssi9_ctrl",
|
||||
"ssi9_ctrl_b",
|
||||
};
|
||||
|
||||
static const char * const usb0_groups[] = {
|
||||
"usb0",
|
||||
};
|
||||
|
@ -4152,6 +4542,7 @@ static const char * const vin2_groups[] = {
|
|||
};
|
||||
|
||||
static const struct sh_pfc_function pinmux_functions[] = {
|
||||
SH_PFC_FUNCTION(audio_clk),
|
||||
SH_PFC_FUNCTION(du),
|
||||
SH_PFC_FUNCTION(du0),
|
||||
SH_PFC_FUNCTION(du1),
|
||||
|
@ -4187,6 +4578,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
|
|||
SH_PFC_FUNCTION(sdhi0),
|
||||
SH_PFC_FUNCTION(sdhi1),
|
||||
SH_PFC_FUNCTION(sdhi2),
|
||||
SH_PFC_FUNCTION(ssi),
|
||||
SH_PFC_FUNCTION(usb0),
|
||||
SH_PFC_FUNCTION(usb1),
|
||||
SH_PFC_FUNCTION(vin0),
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
#include <linux/regulator/machine.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#ifndef CONFIG_ARCH_MULTIPLATFORM
|
||||
#include <mach/irqs.h>
|
||||
#endif
|
||||
|
||||
#include "core.h"
|
||||
#include "sh_pfc.h"
|
||||
|
|
|
@ -98,8 +98,13 @@ struct pinmux_irq {
|
|||
const short *gpios;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARCH_MULTIPLATFORM
|
||||
#define PINMUX_IRQ(irq_nr, ids...) \
|
||||
{ .gpios = (const short []) { ids, -1 } }
|
||||
#else
|
||||
#define PINMUX_IRQ(irq_nr, ids...) \
|
||||
{ .irq = irq_nr, .gpios = (const short []) { ids, -1 } }
|
||||
#endif
|
||||
|
||||
struct pinmux_range {
|
||||
u16 begin;
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/irqchip/chained_irq.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
#include <linux/pinctrl/pinmux.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
@ -27,22 +25,23 @@
|
|||
#include <linux/bitops.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <asm/mach/irq.h>
|
||||
|
||||
#include "pinctrl-sirf.h"
|
||||
|
||||
#define DRIVER_NAME "pinmux-sirf"
|
||||
|
||||
struct sirfsoc_gpio_bank {
|
||||
struct of_mm_gpio_chip chip;
|
||||
struct irq_domain *domain;
|
||||
int id;
|
||||
int parent_irq;
|
||||
spinlock_t lock;
|
||||
bool is_marco; /* for marco, some registers are different with prima2 */
|
||||
};
|
||||
|
||||
static struct sirfsoc_gpio_bank sgpio_bank[SIRFSOC_GPIO_NO_OF_BANKS];
|
||||
struct sirfsoc_gpio_chip {
|
||||
struct of_mm_gpio_chip chip;
|
||||
bool is_marco; /* for marco, some registers are different with prima2 */
|
||||
struct sirfsoc_gpio_bank sgpio_bank[SIRFSOC_GPIO_NO_OF_BANKS];
|
||||
};
|
||||
|
||||
static DEFINE_SPINLOCK(sgpio_lock);
|
||||
|
||||
static struct sirfsoc_pin_group *sirfsoc_pin_groups;
|
||||
|
@ -255,37 +254,6 @@ static struct pinctrl_desc sirfsoc_pinmux_desc = {
|
|||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
/*
|
||||
* Todo: bind irq_chip to every pinctrl_gpio_range
|
||||
*/
|
||||
static struct pinctrl_gpio_range sirfsoc_gpio_ranges[] = {
|
||||
{
|
||||
.name = "sirfsoc-gpio*",
|
||||
.id = 0,
|
||||
.base = 0,
|
||||
.pin_base = 0,
|
||||
.npins = 32,
|
||||
}, {
|
||||
.name = "sirfsoc-gpio*",
|
||||
.id = 1,
|
||||
.base = 32,
|
||||
.pin_base = 32,
|
||||
.npins = 32,
|
||||
}, {
|
||||
.name = "sirfsoc-gpio*",
|
||||
.id = 2,
|
||||
.base = 64,
|
||||
.pin_base = 64,
|
||||
.npins = 32,
|
||||
}, {
|
||||
.name = "sirfsoc-gpio*",
|
||||
.id = 3,
|
||||
.base = 96,
|
||||
.pin_base = 96,
|
||||
.npins = 19,
|
||||
},
|
||||
};
|
||||
|
||||
static void __iomem *sirfsoc_rsc_of_iomap(void)
|
||||
{
|
||||
const struct of_device_id rsc_ids[] = {
|
||||
|
@ -303,19 +271,16 @@ static void __iomem *sirfsoc_rsc_of_iomap(void)
|
|||
}
|
||||
|
||||
static int sirfsoc_gpio_of_xlate(struct gpio_chip *gc,
|
||||
const struct of_phandle_args *gpiospec,
|
||||
u32 *flags)
|
||||
const struct of_phandle_args *gpiospec,
|
||||
u32 *flags)
|
||||
{
|
||||
if (gpiospec->args[0] > SIRFSOC_GPIO_NO_OF_BANKS * SIRFSOC_GPIO_BANK_SIZE)
|
||||
if (gpiospec->args[0] > SIRFSOC_GPIO_NO_OF_BANKS * SIRFSOC_GPIO_BANK_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
if (gc != &sgpio_bank[gpiospec->args[0] / SIRFSOC_GPIO_BANK_SIZE].chip.gc)
|
||||
return -EINVAL;
|
||||
|
||||
if (flags)
|
||||
if (flags)
|
||||
*flags = gpiospec->args[1];
|
||||
|
||||
return gpiospec->args[0] % SIRFSOC_GPIO_BANK_SIZE;
|
||||
return gpiospec->args[0];
|
||||
}
|
||||
|
||||
static const struct of_device_id pinmux_ids[] = {
|
||||
|
@ -331,7 +296,6 @@ static int sirfsoc_pinmux_probe(struct platform_device *pdev)
|
|||
struct sirfsoc_pmx *spmx;
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
const struct sirfsoc_pinctrl_data *pdata;
|
||||
int i;
|
||||
|
||||
/* Create state holders etc for this driver */
|
||||
spmx = devm_kzalloc(&pdev->dev, sizeof(*spmx), GFP_KERNEL);
|
||||
|
@ -375,11 +339,6 @@ static int sirfsoc_pinmux_probe(struct platform_device *pdev)
|
|||
goto out_no_pmx;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(sirfsoc_gpio_ranges); i++) {
|
||||
sirfsoc_gpio_ranges[i].gc = &sgpio_bank[i].chip.gc;
|
||||
pinctrl_add_gpio_range(spmx->pmx, &sirfsoc_gpio_ranges[i]);
|
||||
}
|
||||
|
||||
dev_info(&pdev->dev, "initialized SIRFSOC pinmux driver\n");
|
||||
|
||||
return 0;
|
||||
|
@ -464,34 +423,28 @@ static int __init sirfsoc_pinmux_init(void)
|
|||
}
|
||||
arch_initcall(sirfsoc_pinmux_init);
|
||||
|
||||
static inline int sirfsoc_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
|
||||
static inline struct sirfsoc_gpio_chip *to_sirfsoc_gpio(struct gpio_chip *gc)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = container_of(to_of_mm_gpio_chip(chip),
|
||||
struct sirfsoc_gpio_bank, chip);
|
||||
|
||||
return irq_create_mapping(bank->domain, offset + bank->id *
|
||||
SIRFSOC_GPIO_BANK_SIZE);
|
||||
return container_of(gc, struct sirfsoc_gpio_chip, chip.gc);
|
||||
}
|
||||
|
||||
static inline int sirfsoc_gpio_to_offset(unsigned int gpio)
|
||||
static inline struct sirfsoc_gpio_bank *
|
||||
sirfsoc_gpio_to_bank(struct sirfsoc_gpio_chip *sgpio, unsigned int offset)
|
||||
{
|
||||
return gpio % SIRFSOC_GPIO_BANK_SIZE;
|
||||
return &sgpio->sgpio_bank[offset / SIRFSOC_GPIO_BANK_SIZE];
|
||||
}
|
||||
|
||||
static inline struct sirfsoc_gpio_bank *sirfsoc_gpio_to_bank(unsigned int gpio)
|
||||
static inline int sirfsoc_gpio_to_bankoff(unsigned int offset)
|
||||
{
|
||||
return &sgpio_bank[gpio / SIRFSOC_GPIO_BANK_SIZE];
|
||||
}
|
||||
|
||||
static inline struct sirfsoc_gpio_bank *sirfsoc_irqchip_to_bank(struct gpio_chip *chip)
|
||||
{
|
||||
return container_of(to_of_mm_gpio_chip(chip), struct sirfsoc_gpio_bank, chip);
|
||||
return offset % SIRFSOC_GPIO_BANK_SIZE;
|
||||
}
|
||||
|
||||
static void sirfsoc_gpio_irq_ack(struct irq_data *d)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
||||
int idx = d->hwirq % SIRFSOC_GPIO_BANK_SIZE;
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct sirfsoc_gpio_chip *sgpio = to_sirfsoc_gpio(gc);
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_gpio_to_bank(sgpio, d->hwirq);
|
||||
int idx = sirfsoc_gpio_to_bankoff(d->hwirq);
|
||||
u32 val, offset;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -499,14 +452,16 @@ static void sirfsoc_gpio_irq_ack(struct irq_data *d)
|
|||
|
||||
spin_lock_irqsave(&sgpio_lock, flags);
|
||||
|
||||
val = readl(bank->chip.regs + offset);
|
||||
val = readl(sgpio->chip.regs + offset);
|
||||
|
||||
writel(val, bank->chip.regs + offset);
|
||||
writel(val, sgpio->chip.regs + offset);
|
||||
|
||||
spin_unlock_irqrestore(&sgpio_lock, flags);
|
||||
}
|
||||
|
||||
static void __sirfsoc_gpio_irq_mask(struct sirfsoc_gpio_bank *bank, int idx)
|
||||
static void __sirfsoc_gpio_irq_mask(struct sirfsoc_gpio_chip *sgpio,
|
||||
struct sirfsoc_gpio_bank *bank,
|
||||
int idx)
|
||||
{
|
||||
u32 val, offset;
|
||||
unsigned long flags;
|
||||
|
@ -515,25 +470,29 @@ static void __sirfsoc_gpio_irq_mask(struct sirfsoc_gpio_bank *bank, int idx)
|
|||
|
||||
spin_lock_irqsave(&sgpio_lock, flags);
|
||||
|
||||
val = readl(bank->chip.regs + offset);
|
||||
val = readl(sgpio->chip.regs + offset);
|
||||
val &= ~SIRFSOC_GPIO_CTL_INTR_EN_MASK;
|
||||
val &= ~SIRFSOC_GPIO_CTL_INTR_STS_MASK;
|
||||
writel(val, bank->chip.regs + offset);
|
||||
writel(val, sgpio->chip.regs + offset);
|
||||
|
||||
spin_unlock_irqrestore(&sgpio_lock, flags);
|
||||
}
|
||||
|
||||
static void sirfsoc_gpio_irq_mask(struct irq_data *d)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct sirfsoc_gpio_chip *sgpio = to_sirfsoc_gpio(gc);
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_gpio_to_bank(sgpio, d->hwirq);
|
||||
|
||||
__sirfsoc_gpio_irq_mask(bank, d->hwirq % SIRFSOC_GPIO_BANK_SIZE);
|
||||
__sirfsoc_gpio_irq_mask(sgpio, bank, d->hwirq % SIRFSOC_GPIO_BANK_SIZE);
|
||||
}
|
||||
|
||||
static void sirfsoc_gpio_irq_unmask(struct irq_data *d)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
||||
int idx = d->hwirq % SIRFSOC_GPIO_BANK_SIZE;
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct sirfsoc_gpio_chip *sgpio = to_sirfsoc_gpio(gc);
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_gpio_to_bank(sgpio, d->hwirq);
|
||||
int idx = sirfsoc_gpio_to_bankoff(d->hwirq);
|
||||
u32 val, offset;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -541,18 +500,20 @@ static void sirfsoc_gpio_irq_unmask(struct irq_data *d)
|
|||
|
||||
spin_lock_irqsave(&sgpio_lock, flags);
|
||||
|
||||
val = readl(bank->chip.regs + offset);
|
||||
val = readl(sgpio->chip.regs + offset);
|
||||
val &= ~SIRFSOC_GPIO_CTL_INTR_STS_MASK;
|
||||
val |= SIRFSOC_GPIO_CTL_INTR_EN_MASK;
|
||||
writel(val, bank->chip.regs + offset);
|
||||
writel(val, sgpio->chip.regs + offset);
|
||||
|
||||
spin_unlock_irqrestore(&sgpio_lock, flags);
|
||||
}
|
||||
|
||||
static int sirfsoc_gpio_irq_type(struct irq_data *d, unsigned type)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
||||
int idx = d->hwirq % SIRFSOC_GPIO_BANK_SIZE;
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct sirfsoc_gpio_chip *sgpio = to_sirfsoc_gpio(gc);
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_gpio_to_bank(sgpio, d->hwirq);
|
||||
int idx = sirfsoc_gpio_to_bankoff(d->hwirq);
|
||||
u32 val, offset;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -560,7 +521,7 @@ static int sirfsoc_gpio_irq_type(struct irq_data *d, unsigned type)
|
|||
|
||||
spin_lock_irqsave(&sgpio_lock, flags);
|
||||
|
||||
val = readl(bank->chip.regs + offset);
|
||||
val = readl(sgpio->chip.regs + offset);
|
||||
val &= ~(SIRFSOC_GPIO_CTL_INTR_STS_MASK | SIRFSOC_GPIO_CTL_OUT_EN_MASK);
|
||||
|
||||
switch (type) {
|
||||
|
@ -588,53 +549,41 @@ static int sirfsoc_gpio_irq_type(struct irq_data *d, unsigned type)
|
|||
break;
|
||||
}
|
||||
|
||||
writel(val, bank->chip.regs + offset);
|
||||
writel(val, sgpio->chip.regs + offset);
|
||||
|
||||
spin_unlock_irqrestore(&sgpio_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sirfsoc_gpio_irq_reqres(struct irq_data *d)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
||||
|
||||
if (gpio_lock_as_irq(&bank->chip.gc, d->hwirq % SIRFSOC_GPIO_BANK_SIZE)) {
|
||||
dev_err(bank->chip.gc.dev,
|
||||
"unable to lock HW IRQ %lu for IRQ\n",
|
||||
d->hwirq);
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sirfsoc_gpio_irq_relres(struct irq_data *d)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
||||
|
||||
gpio_unlock_as_irq(&bank->chip.gc, d->hwirq % SIRFSOC_GPIO_BANK_SIZE);
|
||||
}
|
||||
|
||||
static struct irq_chip sirfsoc_irq_chip = {
|
||||
.name = "sirf-gpio-irq",
|
||||
.irq_ack = sirfsoc_gpio_irq_ack,
|
||||
.irq_mask = sirfsoc_gpio_irq_mask,
|
||||
.irq_unmask = sirfsoc_gpio_irq_unmask,
|
||||
.irq_set_type = sirfsoc_gpio_irq_type,
|
||||
.irq_request_resources = sirfsoc_gpio_irq_reqres,
|
||||
.irq_release_resources = sirfsoc_gpio_irq_relres,
|
||||
};
|
||||
|
||||
static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = irq_get_handler_data(irq);
|
||||
struct gpio_chip *gc = irq_desc_get_handler_data(desc);
|
||||
struct sirfsoc_gpio_chip *sgpio = to_sirfsoc_gpio(gc);
|
||||
struct sirfsoc_gpio_bank *bank;
|
||||
u32 status, ctrl;
|
||||
int idx = 0;
|
||||
struct irq_chip *chip = irq_get_chip(irq);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) {
|
||||
bank = &sgpio->sgpio_bank[i];
|
||||
if (bank->parent_irq == irq)
|
||||
break;
|
||||
}
|
||||
BUG_ON(i == SIRFSOC_GPIO_NO_OF_BANKS);
|
||||
|
||||
chained_irq_enter(chip, desc);
|
||||
|
||||
status = readl(bank->chip.regs + SIRFSOC_GPIO_INT_STATUS(bank->id));
|
||||
status = readl(sgpio->chip.regs + SIRFSOC_GPIO_INT_STATUS(bank->id));
|
||||
if (!status) {
|
||||
printk(KERN_WARNING
|
||||
"%s: gpio id %d status %#x no interrupt is flaged\n",
|
||||
|
@ -644,7 +593,7 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc)
|
|||
}
|
||||
|
||||
while (status) {
|
||||
ctrl = readl(bank->chip.regs + SIRFSOC_GPIO_CTRL(bank->id, idx));
|
||||
ctrl = readl(sgpio->chip.regs + SIRFSOC_GPIO_CTRL(bank->id, idx));
|
||||
|
||||
/*
|
||||
* Here we must check whether the corresponding GPIO's interrupt
|
||||
|
@ -653,7 +602,7 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc)
|
|||
if ((status & 0x1) && (ctrl & SIRFSOC_GPIO_CTL_INTR_EN_MASK)) {
|
||||
pr_debug("%s: gpio id %d idx %d happens\n",
|
||||
__func__, bank->id, idx);
|
||||
generic_handle_irq(irq_find_mapping(bank->domain, idx +
|
||||
generic_handle_irq(irq_find_mapping(gc->irqdomain, idx +
|
||||
bank->id * SIRFSOC_GPIO_BANK_SIZE));
|
||||
}
|
||||
|
||||
|
@ -664,18 +613,20 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc)
|
|||
chained_irq_exit(chip, desc);
|
||||
}
|
||||
|
||||
static inline void sirfsoc_gpio_set_input(struct sirfsoc_gpio_bank *bank, unsigned ctrl_offset)
|
||||
static inline void sirfsoc_gpio_set_input(struct sirfsoc_gpio_chip *sgpio,
|
||||
unsigned ctrl_offset)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
val = readl(bank->chip.regs + ctrl_offset);
|
||||
val = readl(sgpio->chip.regs + ctrl_offset);
|
||||
val &= ~SIRFSOC_GPIO_CTL_OUT_EN_MASK;
|
||||
writel(val, bank->chip.regs + ctrl_offset);
|
||||
writel(val, sgpio->chip.regs + ctrl_offset);
|
||||
}
|
||||
|
||||
static int sirfsoc_gpio_request(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_irqchip_to_bank(chip);
|
||||
struct sirfsoc_gpio_chip *sgpio = to_sirfsoc_gpio(chip);
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_gpio_to_bank(sgpio, offset);
|
||||
unsigned long flags;
|
||||
|
||||
if (pinctrl_request_gpio(chip->base + offset))
|
||||
|
@ -687,8 +638,8 @@ static int sirfsoc_gpio_request(struct gpio_chip *chip, unsigned offset)
|
|||
* default status:
|
||||
* set direction as input and mask irq
|
||||
*/
|
||||
sirfsoc_gpio_set_input(bank, SIRFSOC_GPIO_CTRL(bank->id, offset));
|
||||
__sirfsoc_gpio_irq_mask(bank, offset);
|
||||
sirfsoc_gpio_set_input(sgpio, SIRFSOC_GPIO_CTRL(bank->id, offset));
|
||||
__sirfsoc_gpio_irq_mask(sgpio, bank, offset);
|
||||
|
||||
spin_unlock_irqrestore(&bank->lock, flags);
|
||||
|
||||
|
@ -697,13 +648,14 @@ static int sirfsoc_gpio_request(struct gpio_chip *chip, unsigned offset)
|
|||
|
||||
static void sirfsoc_gpio_free(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_irqchip_to_bank(chip);
|
||||
struct sirfsoc_gpio_chip *sgpio = to_sirfsoc_gpio(chip);
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_gpio_to_bank(sgpio, offset);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&bank->lock, flags);
|
||||
|
||||
__sirfsoc_gpio_irq_mask(bank, offset);
|
||||
sirfsoc_gpio_set_input(bank, SIRFSOC_GPIO_CTRL(bank->id, offset));
|
||||
__sirfsoc_gpio_irq_mask(sgpio, bank, offset);
|
||||
sirfsoc_gpio_set_input(sgpio, SIRFSOC_GPIO_CTRL(bank->id, offset));
|
||||
|
||||
spin_unlock_irqrestore(&bank->lock, flags);
|
||||
|
||||
|
@ -712,8 +664,9 @@ static void sirfsoc_gpio_free(struct gpio_chip *chip, unsigned offset)
|
|||
|
||||
static int sirfsoc_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_irqchip_to_bank(chip);
|
||||
int idx = sirfsoc_gpio_to_offset(gpio);
|
||||
struct sirfsoc_gpio_chip *sgpio = to_sirfsoc_gpio(chip);
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_gpio_to_bank(sgpio, gpio);
|
||||
int idx = sirfsoc_gpio_to_bankoff(gpio);
|
||||
unsigned long flags;
|
||||
unsigned offset;
|
||||
|
||||
|
@ -721,22 +674,24 @@ static int sirfsoc_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
|
|||
|
||||
spin_lock_irqsave(&bank->lock, flags);
|
||||
|
||||
sirfsoc_gpio_set_input(bank, offset);
|
||||
sirfsoc_gpio_set_input(sgpio, offset);
|
||||
|
||||
spin_unlock_irqrestore(&bank->lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void sirfsoc_gpio_set_output(struct sirfsoc_gpio_bank *bank, unsigned offset,
|
||||
int value)
|
||||
static inline void sirfsoc_gpio_set_output(struct sirfsoc_gpio_chip *sgpio,
|
||||
struct sirfsoc_gpio_bank *bank,
|
||||
unsigned offset,
|
||||
int value)
|
||||
{
|
||||
u32 out_ctrl;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&bank->lock, flags);
|
||||
|
||||
out_ctrl = readl(bank->chip.regs + offset);
|
||||
out_ctrl = readl(sgpio->chip.regs + offset);
|
||||
if (value)
|
||||
out_ctrl |= SIRFSOC_GPIO_CTL_DATAOUT_MASK;
|
||||
else
|
||||
|
@ -744,15 +699,16 @@ static inline void sirfsoc_gpio_set_output(struct sirfsoc_gpio_bank *bank, unsig
|
|||
|
||||
out_ctrl &= ~SIRFSOC_GPIO_CTL_INTR_EN_MASK;
|
||||
out_ctrl |= SIRFSOC_GPIO_CTL_OUT_EN_MASK;
|
||||
writel(out_ctrl, bank->chip.regs + offset);
|
||||
writel(out_ctrl, sgpio->chip.regs + offset);
|
||||
|
||||
spin_unlock_irqrestore(&bank->lock, flags);
|
||||
}
|
||||
|
||||
static int sirfsoc_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int value)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_irqchip_to_bank(chip);
|
||||
int idx = sirfsoc_gpio_to_offset(gpio);
|
||||
struct sirfsoc_gpio_chip *sgpio = to_sirfsoc_gpio(chip);
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_gpio_to_bank(sgpio, gpio);
|
||||
int idx = sirfsoc_gpio_to_bankoff(gpio);
|
||||
u32 offset;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -760,7 +716,7 @@ static int sirfsoc_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
|
|||
|
||||
spin_lock_irqsave(&sgpio_lock, flags);
|
||||
|
||||
sirfsoc_gpio_set_output(bank, offset, value);
|
||||
sirfsoc_gpio_set_output(sgpio, bank, offset, value);
|
||||
|
||||
spin_unlock_irqrestore(&sgpio_lock, flags);
|
||||
|
||||
|
@ -769,13 +725,14 @@ static int sirfsoc_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
|
|||
|
||||
static int sirfsoc_gpio_get_value(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_irqchip_to_bank(chip);
|
||||
struct sirfsoc_gpio_chip *sgpio = to_sirfsoc_gpio(chip);
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_gpio_to_bank(sgpio, offset);
|
||||
u32 val;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&bank->lock, flags);
|
||||
|
||||
val = readl(bank->chip.regs + SIRFSOC_GPIO_CTRL(bank->id, offset));
|
||||
val = readl(sgpio->chip.regs + SIRFSOC_GPIO_CTRL(bank->id, offset));
|
||||
|
||||
spin_unlock_irqrestore(&bank->lock, flags);
|
||||
|
||||
|
@ -785,44 +742,25 @@ static int sirfsoc_gpio_get_value(struct gpio_chip *chip, unsigned offset)
|
|||
static void sirfsoc_gpio_set_value(struct gpio_chip *chip, unsigned offset,
|
||||
int value)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_irqchip_to_bank(chip);
|
||||
struct sirfsoc_gpio_chip *sgpio = to_sirfsoc_gpio(chip);
|
||||
struct sirfsoc_gpio_bank *bank = sirfsoc_gpio_to_bank(sgpio, offset);
|
||||
u32 ctrl;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&bank->lock, flags);
|
||||
|
||||
ctrl = readl(bank->chip.regs + SIRFSOC_GPIO_CTRL(bank->id, offset));
|
||||
ctrl = readl(sgpio->chip.regs + SIRFSOC_GPIO_CTRL(bank->id, offset));
|
||||
if (value)
|
||||
ctrl |= SIRFSOC_GPIO_CTL_DATAOUT_MASK;
|
||||
else
|
||||
ctrl &= ~SIRFSOC_GPIO_CTL_DATAOUT_MASK;
|
||||
writel(ctrl, bank->chip.regs + SIRFSOC_GPIO_CTRL(bank->id, offset));
|
||||
writel(ctrl, sgpio->chip.regs + SIRFSOC_GPIO_CTRL(bank->id, offset));
|
||||
|
||||
spin_unlock_irqrestore(&bank->lock, flags);
|
||||
}
|
||||
|
||||
static int sirfsoc_gpio_irq_map(struct irq_domain *d, unsigned int irq,
|
||||
irq_hw_number_t hwirq)
|
||||
{
|
||||
struct sirfsoc_gpio_bank *bank = d->host_data;
|
||||
|
||||
if (!bank)
|
||||
return -EINVAL;
|
||||
|
||||
irq_set_chip(irq, &sirfsoc_irq_chip);
|
||||
irq_set_handler(irq, handle_level_irq);
|
||||
irq_set_chip_data(irq, bank + hwirq / SIRFSOC_GPIO_BANK_SIZE);
|
||||
set_irq_flags(irq, IRQF_VALID);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct irq_domain_ops sirfsoc_gpio_irq_simple_ops = {
|
||||
.map = sirfsoc_gpio_irq_map,
|
||||
.xlate = irq_domain_xlate_twocell,
|
||||
};
|
||||
|
||||
static void sirfsoc_gpio_set_pullup(const u32 *pullups)
|
||||
static void sirfsoc_gpio_set_pullup(struct sirfsoc_gpio_chip *sgpio,
|
||||
const u32 *pullups)
|
||||
{
|
||||
int i, n;
|
||||
const unsigned long *p = (const unsigned long *)pullups;
|
||||
|
@ -830,15 +768,16 @@ static void sirfsoc_gpio_set_pullup(const u32 *pullups)
|
|||
for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) {
|
||||
for_each_set_bit(n, p + i, BITS_PER_LONG) {
|
||||
u32 offset = SIRFSOC_GPIO_CTRL(i, n);
|
||||
u32 val = readl(sgpio_bank[i].chip.regs + offset);
|
||||
u32 val = readl(sgpio->chip.regs + offset);
|
||||
val |= SIRFSOC_GPIO_CTL_PULL_MASK;
|
||||
val |= SIRFSOC_GPIO_CTL_PULL_HIGH;
|
||||
writel(val, sgpio_bank[i].chip.regs + offset);
|
||||
writel(val, sgpio->chip.regs + offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sirfsoc_gpio_set_pulldown(const u32 *pulldowns)
|
||||
static void sirfsoc_gpio_set_pulldown(struct sirfsoc_gpio_chip *sgpio,
|
||||
const u32 *pulldowns)
|
||||
{
|
||||
int i, n;
|
||||
const unsigned long *p = (const unsigned long *)pulldowns;
|
||||
|
@ -846,10 +785,10 @@ static void sirfsoc_gpio_set_pulldown(const u32 *pulldowns)
|
|||
for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) {
|
||||
for_each_set_bit(n, p + i, BITS_PER_LONG) {
|
||||
u32 offset = SIRFSOC_GPIO_CTRL(i, n);
|
||||
u32 val = readl(sgpio_bank[i].chip.regs + offset);
|
||||
u32 val = readl(sgpio->chip.regs + offset);
|
||||
val |= SIRFSOC_GPIO_CTL_PULL_MASK;
|
||||
val &= ~SIRFSOC_GPIO_CTL_PULL_HIGH;
|
||||
writel(val, sgpio_bank[i].chip.regs + offset);
|
||||
writel(val, sgpio->chip.regs + offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -857,10 +796,10 @@ static void sirfsoc_gpio_set_pulldown(const u32 *pulldowns)
|
|||
static int sirfsoc_gpio_probe(struct device_node *np)
|
||||
{
|
||||
int i, err = 0;
|
||||
static struct sirfsoc_gpio_chip *sgpio;
|
||||
struct sirfsoc_gpio_bank *bank;
|
||||
void __iomem *regs;
|
||||
struct platform_device *pdev;
|
||||
struct irq_domain *domain;
|
||||
bool is_marco = false;
|
||||
|
||||
u32 pullups[SIRFSOC_GPIO_NO_OF_BANKS], pulldowns[SIRFSOC_GPIO_NO_OF_BANKS];
|
||||
|
@ -869,6 +808,10 @@ static int sirfsoc_gpio_probe(struct device_node *np)
|
|||
if (!pdev)
|
||||
return -ENODEV;
|
||||
|
||||
sgpio = devm_kzalloc(&pdev->dev, sizeof(*sgpio), GFP_KERNEL);
|
||||
if (!sgpio)
|
||||
return -ENOMEM;
|
||||
|
||||
regs = of_iomap(np, 0);
|
||||
if (!regs)
|
||||
return -ENOMEM;
|
||||
|
@ -876,63 +819,76 @@ static int sirfsoc_gpio_probe(struct device_node *np)
|
|||
if (of_device_is_compatible(np, "sirf,marco-pinctrl"))
|
||||
is_marco = 1;
|
||||
|
||||
domain = irq_domain_add_linear(np, SIRFSOC_GPIO_BANK_SIZE * SIRFSOC_GPIO_NO_OF_BANKS,
|
||||
&sirfsoc_gpio_irq_simple_ops, sgpio_bank);
|
||||
if (!domain) {
|
||||
pr_err("%s: Failed to create irqdomain\n", np->full_name);
|
||||
err = -ENOSYS;
|
||||
sgpio->chip.gc.request = sirfsoc_gpio_request;
|
||||
sgpio->chip.gc.free = sirfsoc_gpio_free;
|
||||
sgpio->chip.gc.direction_input = sirfsoc_gpio_direction_input;
|
||||
sgpio->chip.gc.get = sirfsoc_gpio_get_value;
|
||||
sgpio->chip.gc.direction_output = sirfsoc_gpio_direction_output;
|
||||
sgpio->chip.gc.set = sirfsoc_gpio_set_value;
|
||||
sgpio->chip.gc.base = 0;
|
||||
sgpio->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE * SIRFSOC_GPIO_NO_OF_BANKS;
|
||||
sgpio->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL);
|
||||
sgpio->chip.gc.of_node = np;
|
||||
sgpio->chip.gc.of_xlate = sirfsoc_gpio_of_xlate;
|
||||
sgpio->chip.gc.of_gpio_n_cells = 2;
|
||||
sgpio->chip.gc.dev = &pdev->dev;
|
||||
sgpio->chip.regs = regs;
|
||||
sgpio->is_marco = is_marco;
|
||||
|
||||
err = gpiochip_add(&sgpio->chip.gc);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "%s: error in probe function with status %d\n",
|
||||
np->full_name, err);
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = gpiochip_irqchip_add(&sgpio->chip.gc,
|
||||
&sirfsoc_irq_chip,
|
||||
0, handle_level_irq,
|
||||
IRQ_TYPE_NONE);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev,
|
||||
"could not connect irqchip to gpiochip\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) {
|
||||
bank = &sgpio_bank[i];
|
||||
bank = &sgpio->sgpio_bank[i];
|
||||
spin_lock_init(&bank->lock);
|
||||
bank->chip.gc.request = sirfsoc_gpio_request;
|
||||
bank->chip.gc.free = sirfsoc_gpio_free;
|
||||
bank->chip.gc.direction_input = sirfsoc_gpio_direction_input;
|
||||
bank->chip.gc.get = sirfsoc_gpio_get_value;
|
||||
bank->chip.gc.direction_output = sirfsoc_gpio_direction_output;
|
||||
bank->chip.gc.set = sirfsoc_gpio_set_value;
|
||||
bank->chip.gc.to_irq = sirfsoc_gpio_to_irq;
|
||||
bank->chip.gc.base = i * SIRFSOC_GPIO_BANK_SIZE;
|
||||
bank->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE;
|
||||
bank->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL);
|
||||
bank->chip.gc.of_node = np;
|
||||
bank->chip.gc.of_xlate = sirfsoc_gpio_of_xlate;
|
||||
bank->chip.gc.of_gpio_n_cells = 2;
|
||||
bank->chip.gc.dev = &pdev->dev;
|
||||
bank->chip.regs = regs;
|
||||
bank->id = i;
|
||||
bank->is_marco = is_marco;
|
||||
bank->parent_irq = platform_get_irq(pdev, i);
|
||||
if (bank->parent_irq < 0) {
|
||||
err = bank->parent_irq;
|
||||
goto out;
|
||||
goto out_banks;
|
||||
}
|
||||
|
||||
err = gpiochip_add(&bank->chip.gc);
|
||||
if (err) {
|
||||
pr_err("%s: error in probe function with status %d\n",
|
||||
np->full_name, err);
|
||||
goto out;
|
||||
}
|
||||
gpiochip_set_chained_irqchip(&sgpio->chip.gc,
|
||||
&sirfsoc_irq_chip,
|
||||
bank->parent_irq,
|
||||
sirfsoc_gpio_handle_irq);
|
||||
}
|
||||
|
||||
bank->domain = domain;
|
||||
|
||||
irq_set_chained_handler(bank->parent_irq, sirfsoc_gpio_handle_irq);
|
||||
irq_set_handler_data(bank->parent_irq, bank);
|
||||
err = gpiochip_add_pin_range(&sgpio->chip.gc, dev_name(&pdev->dev),
|
||||
0, 0, SIRFSOC_GPIO_BANK_SIZE * SIRFSOC_GPIO_NO_OF_BANKS);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev,
|
||||
"could not add gpiochip pin range\n");
|
||||
goto out_no_range;
|
||||
}
|
||||
|
||||
if (!of_property_read_u32_array(np, "sirf,pullups", pullups,
|
||||
SIRFSOC_GPIO_NO_OF_BANKS))
|
||||
sirfsoc_gpio_set_pullup(pullups);
|
||||
sirfsoc_gpio_set_pullup(sgpio, pullups);
|
||||
|
||||
if (!of_property_read_u32_array(np, "sirf,pulldowns", pulldowns,
|
||||
SIRFSOC_GPIO_NO_OF_BANKS))
|
||||
sirfsoc_gpio_set_pulldown(pulldowns);
|
||||
sirfsoc_gpio_set_pulldown(sgpio, pulldowns);
|
||||
|
||||
return 0;
|
||||
|
||||
out_no_range:
|
||||
out_banks:
|
||||
if (gpiochip_remove(&sgpio->chip.gc))
|
||||
dev_err(&pdev->dev, "could not remove gpio chip\n");
|
||||
out:
|
||||
iounmap(regs);
|
||||
return err;
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
if ARCH_SUNXI
|
||||
|
||||
config PINCTRL_SUNXI
|
||||
bool
|
||||
|
||||
config PINCTRL_SUNXI_COMMON
|
||||
bool
|
||||
select PINMUX
|
||||
select GENERIC_PINCONF
|
||||
|
||||
config PINCTRL_SUN4I_A10
|
||||
def_bool PINCTRL_SUNXI || MACH_SUN4I
|
||||
select PINCTRL_SUNXI_COMMON
|
||||
|
||||
config PINCTRL_SUN5I_A10S
|
||||
def_bool PINCTRL_SUNXI || MACH_SUN5I
|
||||
select PINCTRL_SUNXI_COMMON
|
||||
|
||||
config PINCTRL_SUN5I_A13
|
||||
def_bool PINCTRL_SUNXI || MACH_SUN5I
|
||||
select PINCTRL_SUNXI_COMMON
|
||||
|
||||
config PINCTRL_SUN6I_A31
|
||||
def_bool PINCTRL_SUNXI || MACH_SUN6I
|
||||
select PINCTRL_SUNXI_COMMON
|
||||
|
||||
config PINCTRL_SUN6I_A31_R
|
||||
def_bool PINCTRL_SUNXI || MACH_SUN6I
|
||||
depends on RESET_CONTROLLER
|
||||
select PINCTRL_SUNXI_COMMON
|
||||
|
||||
config PINCTRL_SUN7I_A20
|
||||
def_bool PINCTRL_SUNXI || MACH_SUN7I
|
||||
select PINCTRL_SUNXI_COMMON
|
||||
|
||||
endif
|
|
@ -0,0 +1,10 @@
|
|||
# Core
|
||||
obj-$(CONFIG_PINCTRL_SUNXI_COMMON) += pinctrl-sunxi.o
|
||||
|
||||
# SoC Drivers
|
||||
obj-$(CONFIG_PINCTRL_SUN4I_A10) += pinctrl-sun4i-a10.o
|
||||
obj-$(CONFIG_PINCTRL_SUN5I_A10S) += pinctrl-sun5i-a10s.o
|
||||
obj-$(CONFIG_PINCTRL_SUN5I_A13) += pinctrl-sun5i-a13.o
|
||||
obj-$(CONFIG_PINCTRL_SUN6I_A31) += pinctrl-sun6i-a31.o
|
||||
obj-$(CONFIG_PINCTRL_SUN6I_A31_R) += pinctrl-sun6i-a31-r.o
|
||||
obj-$(CONFIG_PINCTRL_SUN7I_A20) += pinctrl-sun7i-a20.o
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,690 @@
|
|||
/*
|
||||
* Allwinner A10s SoCs pinctrl driver.
|
||||
*
|
||||
* Copyright (C) 2014 Maxime Ripard
|
||||
*
|
||||
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
|
||||
#include "pinctrl-sunxi.h"
|
||||
|
||||
static const struct sunxi_desc_pin sun5i_a10s_pins[] = {
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ERXD3 */
|
||||
SUNXI_FUNCTION(0x3, "ts0"), /* CLK */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* IN0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ERXD2 */
|
||||
SUNXI_FUNCTION(0x3, "ts0"), /* ERR */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* IN1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ERXD1 */
|
||||
SUNXI_FUNCTION(0x3, "ts0"), /* SYNC */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* IN2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ERXD0 */
|
||||
SUNXI_FUNCTION(0x3, "ts0"), /* DLVD */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* IN3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ETXD3 */
|
||||
SUNXI_FUNCTION(0x3, "ts0"), /* D0 */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* IN4 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ETXD2 */
|
||||
SUNXI_FUNCTION(0x3, "ts0"), /* D1 */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* IN5 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ETXD1 */
|
||||
SUNXI_FUNCTION(0x3, "ts0"), /* D2 */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* IN6 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ETXD0 */
|
||||
SUNXI_FUNCTION(0x3, "ts0"), /* D3 */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* IN7 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ERXCK */
|
||||
SUNXI_FUNCTION(0x3, "ts0"), /* D4 */
|
||||
SUNXI_FUNCTION(0x4, "uart1"), /* DTR */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* OUT0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ERXERR */
|
||||
SUNXI_FUNCTION(0x3, "ts0"), /* D5 */
|
||||
SUNXI_FUNCTION(0x4, "uart1"), /* DSR */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* OUT1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ERXDV */
|
||||
SUNXI_FUNCTION(0x3, "ts0"), /* D6 */
|
||||
SUNXI_FUNCTION(0x4, "uart1"), /* DCD */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* OUT2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* EMDC */
|
||||
SUNXI_FUNCTION(0x3, "ts0"), /* D7 */
|
||||
SUNXI_FUNCTION(0x4, "uart1"), /* RING */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* OUT3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* EMDIO */
|
||||
SUNXI_FUNCTION(0x3, "uart1"), /* TX */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* OUT4 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ETXEN */
|
||||
SUNXI_FUNCTION(0x3, "uart1"), /* RX */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* OUT5 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 14),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ETXCK */
|
||||
SUNXI_FUNCTION(0x3, "uart1"), /* CTS */
|
||||
SUNXI_FUNCTION(0x4, "uart3"), /* TX */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* OUT6 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ECRS */
|
||||
SUNXI_FUNCTION(0x3, "uart1"), /* RTS */
|
||||
SUNXI_FUNCTION(0x4, "uart3"), /* RX */
|
||||
SUNXI_FUNCTION(0x5, "keypad")), /* OUT7 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ECOL */
|
||||
SUNXI_FUNCTION(0x3, "uart2")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "emac"), /* ETXERR */
|
||||
SUNXI_FUNCTION(0x3, "uart2"), /* RX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 31)), /* EINT31 */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c0")), /* SCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c0")), /* SDA */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "pwm"), /* PWM0 */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 16)), /* EINT16 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ir0"), /* TX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 17)), /* EINT17 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ir0"), /* RX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 18)), /* EINT18 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2s"), /* MCLK */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 19)), /* EINT19 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2s"), /* BCLK */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 20)), /* EINT20 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2s"), /* LRCK */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 21)), /* EINT21 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2s"), /* DO */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 22)), /* EINT22 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2s"), /* DI */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 23)), /* EINT23 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi2"), /* CS1 */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 24)), /* EINT24 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi2"), /* CS0 */
|
||||
SUNXI_FUNCTION(0x3, "jtag"), /* MS0 */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 25)), /* EINT25 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi2"), /* CLK */
|
||||
SUNXI_FUNCTION(0x3, "jtag"), /* CK0 */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 26)), /* EINT26 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi2"), /* MOSI */
|
||||
SUNXI_FUNCTION(0x3, "jtag"), /* DO0 */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 27)), /* EINT27 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 14),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi2"), /* MISO */
|
||||
SUNXI_FUNCTION(0x3, "jtag"), /* DI0 */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 28)), /* EINT28 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c1")), /* SCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 16),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c1")), /* SDA */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 17),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c2")), /* SCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 18),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c2")), /* SDA */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 19),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "uart0"), /* TX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 29)), /* EINT29 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 20),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "uart0"), /* RX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 30)), /* EINT30 */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NWE */
|
||||
SUNXI_FUNCTION(0x3, "spi0")), /* MOSI */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NALE */
|
||||
SUNXI_FUNCTION(0x3, "spi0")), /* MISO */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NCLE */
|
||||
SUNXI_FUNCTION(0x3, "spi0")), /* SCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NCE1 */
|
||||
SUNXI_FUNCTION(0x3, "spi0")), /* CS0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0")), /* NCE0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0")), /* NRE */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NRB0 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* CMD */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NRB1 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ0 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ1 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ2 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ3 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ4 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D4 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ5 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D5 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ6 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D6 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ7 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D7 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NWP */
|
||||
SUNXI_FUNCTION(0x4, "uart3")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 17),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NCE2 */
|
||||
SUNXI_FUNCTION(0x4, "uart3")), /* RX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 18),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NCE3 */
|
||||
SUNXI_FUNCTION(0x3, "uart2"), /* TX */
|
||||
SUNXI_FUNCTION(0x4, "uart3")), /* CTS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 19),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NCE4 */
|
||||
SUNXI_FUNCTION(0x3, "uart2"), /* RX */
|
||||
SUNXI_FUNCTION(0x4, "uart3")), /* RTS */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D2 */
|
||||
SUNXI_FUNCTION(0x3, "uart2")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D3 */
|
||||
SUNXI_FUNCTION(0x3, "uart2")), /* RX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D4 */
|
||||
SUNXI_FUNCTION(0x3, "uart2")), /* CTS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D5 */
|
||||
SUNXI_FUNCTION(0x3, "uart2")), /* RTS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D6 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ECRS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D7 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ECOL */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D8 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D9 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D10 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ERXD0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D11 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ERXD1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D12 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ERXD2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D13 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ERXD3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D14 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ERXCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D15 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ERXERR */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 16),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D16 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 17),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D17 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 18),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D18 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ERXDV */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 19),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D19 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ETXD0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 20),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D20 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ETXD1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 21),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D21 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ETXD2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 22),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D22 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ETXD3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 23),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D23 */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ETXEN */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 24),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* CLK */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ETXCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 25),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* DE */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* ETXERR */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 26),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* HSYNC */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* EMDC */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 27),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* VSYNC */
|
||||
SUNXI_FUNCTION(0x3, "emac")), /* EMDIO */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x2, "ts0"), /* CLK */
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* PCK */
|
||||
SUNXI_FUNCTION(0x4, "spi2"), /* CS0 */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 14)), /* EINT14 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x2, "ts0"), /* ERR */
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* CK */
|
||||
SUNXI_FUNCTION(0x4, "spi2"), /* CLK */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 15)), /* EINT15 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x2, "ts0"), /* SYNC */
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* HSYNC */
|
||||
SUNXI_FUNCTION(0x4, "spi2")), /* MOSI */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ts0"), /* DVLD */
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* VSYNC */
|
||||
SUNXI_FUNCTION(0x4, "spi2")), /* MISO */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ts0"), /* D0 */
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D0 */
|
||||
SUNXI_FUNCTION(0x4, "mmc2")), /* D0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ts0"), /* D1 */
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D1 */
|
||||
SUNXI_FUNCTION(0x4, "mmc2")), /* D1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ts0"), /* D2 */
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D2 */
|
||||
SUNXI_FUNCTION(0x4, "mmc2")), /* D2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ts0"), /* D3 */
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D3 */
|
||||
SUNXI_FUNCTION(0x4, "mmc2")), /* D3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ts0"), /* D4 */
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D4 */
|
||||
SUNXI_FUNCTION(0x4, "mmc2")), /* CMD */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ts0"), /* D5 */
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D5 */
|
||||
SUNXI_FUNCTION(0x4, "mmc2")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ts0"), /* D6 */
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D6 */
|
||||
SUNXI_FUNCTION(0x4, "uart1")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ts0"), /* D7 */
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D7 */
|
||||
SUNXI_FUNCTION(0x4, "uart1")), /* RX */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0"), /* D1 */
|
||||
SUNXI_FUNCTION(0x4, "jtag")), /* MS1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0"), /* D0 */
|
||||
SUNXI_FUNCTION(0x4, "jtag")), /* DI1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0"), /* CLK */
|
||||
SUNXI_FUNCTION(0x4, "uart0")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0"), /* CMD */
|
||||
SUNXI_FUNCTION(0x4, "jtag")), /* DO1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */
|
||||
SUNXI_FUNCTION(0x4, "uart0")), /* RX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0"), /* D2 */
|
||||
SUNXI_FUNCTION(0x4, "jtag")), /* CK1 */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x2, "gps"), /* CLK */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 0)), /* EINT0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x2, "gps"), /* SIGN */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 1)), /* EINT1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x2, "gps"), /* MAG */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 2)), /* EINT2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1"), /* CMD */
|
||||
SUNXI_FUNCTION(0x4, "uart1"), /* TX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 3)), /* EINT3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1"), /* CLK */
|
||||
SUNXI_FUNCTION(0x4, "uart1"), /* RX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 4)), /* EINT4 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1"), /* DO */
|
||||
SUNXI_FUNCTION(0x4, "uart1"), /* CTS */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 5)), /* EINT5 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1"), /* D1 */
|
||||
SUNXI_FUNCTION(0x4, "uart1"), /* RTS */
|
||||
SUNXI_FUNCTION(0x5, "uart2"), /* RTS */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 6)), /* EINT6 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1"), /* D2 */
|
||||
SUNXI_FUNCTION(0x5, "uart2"), /* TX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 7)), /* EINT7 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1"), /* D3 */
|
||||
SUNXI_FUNCTION(0x5, "uart2"), /* RX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 8)), /* EINT8 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* CS0 */
|
||||
SUNXI_FUNCTION(0x3, "uart3"), /* TX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 9)), /* EINT9 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* CLK */
|
||||
SUNXI_FUNCTION(0x3, "uart3"), /* RX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 10)), /* EINT10 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* MOSI */
|
||||
SUNXI_FUNCTION(0x3, "uart3"), /* CTS */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 11)), /* EINT11 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* MISO */
|
||||
SUNXI_FUNCTION(0x3, "uart3"), /* RTS */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 12)), /* EINT12 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* CS1 */
|
||||
SUNXI_FUNCTION(0x3, "uart3"), /* PWM1 */
|
||||
SUNXI_FUNCTION(0x5, "uart2"), /* CTS */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 13)), /* EINT13 */
|
||||
};
|
||||
|
||||
static const struct sunxi_pinctrl_desc sun5i_a10s_pinctrl_data = {
|
||||
.pins = sun5i_a10s_pins,
|
||||
.npins = ARRAY_SIZE(sun5i_a10s_pins),
|
||||
};
|
||||
|
||||
static int sun5i_a10s_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
return sunxi_pinctrl_init(pdev,
|
||||
&sun5i_a10s_pinctrl_data);
|
||||
}
|
||||
|
||||
static struct of_device_id sun5i_a10s_pinctrl_match[] = {
|
||||
{ .compatible = "allwinner,sun5i-a10s-pinctrl", },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sun5i_a10s_pinctrl_match);
|
||||
|
||||
static struct platform_driver sun5i_a10s_pinctrl_driver = {
|
||||
.probe = sun5i_a10s_pinctrl_probe,
|
||||
.driver = {
|
||||
.name = "sun5i-a10s-pinctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = sun5i_a10s_pinctrl_match,
|
||||
},
|
||||
};
|
||||
module_platform_driver(sun5i_a10s_pinctrl_driver);
|
||||
|
||||
MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com");
|
||||
MODULE_DESCRIPTION("Allwinner A10s pinctrl driver");
|
||||
MODULE_LICENSE("GPL");
|
|
@ -0,0 +1,411 @@
|
|||
/*
|
||||
* Allwinner A13 SoCs pinctrl driver.
|
||||
*
|
||||
* Copyright (C) 2014 Maxime Ripard
|
||||
*
|
||||
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
|
||||
#include "pinctrl-sunxi.h"
|
||||
|
||||
static const struct sunxi_desc_pin sun5i_a13_pins[] = {
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c0")), /* SCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c0")), /* SDA */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "pwm"),
|
||||
SUNXI_FUNCTION_IRQ(0x6, 16)), /* EINT16 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ir0"), /* TX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 17)), /* EINT17 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "ir0"), /* RX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 18)), /* EINT18 */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi2"), /* CS1 */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 24)), /* EINT24 */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c1")), /* SCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 16),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c1")), /* SDA */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 17),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c2")), /* SCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 18),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c2")), /* SDA */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NWE */
|
||||
SUNXI_FUNCTION(0x3, "spi0")), /* MOSI */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NALE */
|
||||
SUNXI_FUNCTION(0x3, "spi0")), /* MISO */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NCLE */
|
||||
SUNXI_FUNCTION(0x3, "spi0")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NCE1 */
|
||||
SUNXI_FUNCTION(0x3, "spi0")), /* CS0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0")), /* NCE0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0")), /* NRE */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NRB0 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* CMD */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NRB1 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ0 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ1 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ2 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ3 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ4 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D4 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ5 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D5 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ6 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D6 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQ7 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2")), /* D7 */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 19),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* NDQS */
|
||||
SUNXI_FUNCTION(0x4, "uart3")), /* RTS */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D4 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D5 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D6 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D7 */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D10 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D11 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D12 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D13 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D14 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D15 */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 18),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D18 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 19),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D19 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 20),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D20 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 21),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D21 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 22),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D22 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 23),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D23 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 24),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 25),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* DE */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 26),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* HSYNC */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 27),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* VSYNC */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* PCLK */
|
||||
SUNXI_FUNCTION(0x4, "spi2"), /* CS0 */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 14)), /* EINT14 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* MCLK */
|
||||
SUNXI_FUNCTION(0x4, "spi2"), /* CLK */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 15)), /* EINT15 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* HSYNC */
|
||||
SUNXI_FUNCTION(0x4, "spi2")), /* MOSI */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* VSYNC */
|
||||
SUNXI_FUNCTION(0x4, "spi2")), /* MISO */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D0 */
|
||||
SUNXI_FUNCTION(0x4, "mmc2")), /* D0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D1 */
|
||||
SUNXI_FUNCTION(0x4, "mmc2")), /* D1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D2 */
|
||||
SUNXI_FUNCTION(0x4, "mmc2")), /* D2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D3 */
|
||||
SUNXI_FUNCTION(0x4, "mmc2")), /* D3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D4 */
|
||||
SUNXI_FUNCTION(0x4, "mmc2")), /* CMD */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D5 */
|
||||
SUNXI_FUNCTION(0x4, "mmc2")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D6 */
|
||||
SUNXI_FUNCTION(0x4, "uart1")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "csi0"), /* D7 */
|
||||
SUNXI_FUNCTION(0x4, "uart1")), /* RX */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0")), /* D1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0")), /* D0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0")), /* CMD */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0")), /* D3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0")), /* D2 */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION_IRQ(0x6, 0)), /* EINT0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION_IRQ(0x6, 1)), /* EINT1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION_IRQ(0x6, 2)), /* EINT2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1"), /* CMD */
|
||||
SUNXI_FUNCTION(0x4, "uart1"), /* TX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 3)), /* EINT3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1"), /* CLK */
|
||||
SUNXI_FUNCTION(0x4, "uart1"), /* RX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 4)), /* EINT4 */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* CS0 */
|
||||
SUNXI_FUNCTION(0x3, "uart3"), /* TX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 9)), /* EINT9 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* CLK */
|
||||
SUNXI_FUNCTION(0x3, "uart3"), /* RX */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 10)), /* EINT10 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* MOSI */
|
||||
SUNXI_FUNCTION(0x3, "uart3"), /* CTS */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 11)), /* EINT11 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* MISO */
|
||||
SUNXI_FUNCTION(0x3, "uart3"), /* RTS */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 12)), /* EINT12 */
|
||||
};
|
||||
|
||||
static const struct sunxi_pinctrl_desc sun5i_a13_pinctrl_data = {
|
||||
.pins = sun5i_a13_pins,
|
||||
.npins = ARRAY_SIZE(sun5i_a13_pins),
|
||||
};
|
||||
|
||||
static int sun5i_a13_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
return sunxi_pinctrl_init(pdev,
|
||||
&sun5i_a13_pinctrl_data);
|
||||
}
|
||||
|
||||
static struct of_device_id sun5i_a13_pinctrl_match[] = {
|
||||
{ .compatible = "allwinner,sun5i-a13-pinctrl", },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sun5i_a13_pinctrl_match);
|
||||
|
||||
static struct platform_driver sun5i_a13_pinctrl_driver = {
|
||||
.probe = sun5i_a13_pinctrl_probe,
|
||||
.driver = {
|
||||
.name = "sun5i-a13-pinctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = sun5i_a13_pinctrl_match,
|
||||
},
|
||||
};
|
||||
module_platform_driver(sun5i_a13_pinctrl_driver);
|
||||
|
||||
MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com");
|
||||
MODULE_DESCRIPTION("Allwinner A13 pinctrl driver");
|
||||
MODULE_LICENSE("GPL");
|
|
@ -0,0 +1,141 @@
|
|||
/*
|
||||
* Allwinner A31 SoCs special pins pinctrl driver.
|
||||
*
|
||||
* Copyright (C) 2014 Boris Brezillon
|
||||
* Boris Brezillon <boris.brezillon@free-electrons.com>
|
||||
*
|
||||
* Copyright (C) 2014 Maxime Ripard
|
||||
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
#include <linux/reset.h>
|
||||
|
||||
#include "pinctrl-sunxi.h"
|
||||
|
||||
static const struct sunxi_desc_pin sun6i_a31_r_pins[] = {
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(L, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "s_twi"), /* SCK */
|
||||
SUNXI_FUNCTION(0x3, "s_p2wi")), /* SCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(L, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "s_twi"), /* SDA */
|
||||
SUNXI_FUNCTION(0x3, "s_p2wi")), /* SDA */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(L, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "s_uart")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(L, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "s_uart")), /* RX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(L, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "s_ir")), /* RX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(L, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "s_jtag")), /* MS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(L, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "s_jtag")), /* CK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(L, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "s_jtag")), /* DO */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(L, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "s_jtag")), /* DI */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(M, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(M, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(M, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "1wire")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(M, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(M, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(M, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(M, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(M, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "rtc")), /* CLKO */
|
||||
};
|
||||
|
||||
static const struct sunxi_pinctrl_desc sun6i_a31_r_pinctrl_data = {
|
||||
.pins = sun6i_a31_r_pins,
|
||||
.npins = ARRAY_SIZE(sun6i_a31_r_pins),
|
||||
.pin_base = PL_BASE,
|
||||
};
|
||||
|
||||
static int sun6i_a31_r_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct reset_control *rstc;
|
||||
int ret;
|
||||
|
||||
rstc = devm_reset_control_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(rstc)) {
|
||||
dev_err(&pdev->dev, "Reset controller missing\n");
|
||||
return PTR_ERR(rstc);
|
||||
}
|
||||
|
||||
ret = reset_control_deassert(rstc);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = sunxi_pinctrl_init(pdev,
|
||||
&sun6i_a31_r_pinctrl_data);
|
||||
|
||||
if (ret)
|
||||
reset_control_assert(rstc);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct of_device_id sun6i_a31_r_pinctrl_match[] = {
|
||||
{ .compatible = "allwinner,sun6i-a31-r-pinctrl", },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sun6i_a31_r_pinctrl_match);
|
||||
|
||||
static struct platform_driver sun6i_a31_r_pinctrl_driver = {
|
||||
.probe = sun6i_a31_r_pinctrl_probe,
|
||||
.driver = {
|
||||
.name = "sun6i-a31-r-pinctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = sun6i_a31_r_pinctrl_match,
|
||||
},
|
||||
};
|
||||
module_platform_driver(sun6i_a31_r_pinctrl_driver);
|
||||
|
||||
MODULE_AUTHOR("Boris Brezillon <boris.brezillon@free-electrons.com");
|
||||
MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com");
|
||||
MODULE_DESCRIPTION("Allwinner A31 R_PIO pinctrl driver");
|
||||
MODULE_LICENSE("GPL");
|
|
@ -0,0 +1,865 @@
|
|||
/*
|
||||
* Allwinner A31 SoCs pinctrl driver.
|
||||
*
|
||||
* Copyright (C) 2014 Maxime Ripard
|
||||
*
|
||||
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
|
||||
#include "pinctrl-sunxi.h"
|
||||
|
||||
static const struct sunxi_desc_pin sun6i_a31_pins[] = {
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* TXD0 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D0 */
|
||||
SUNXI_FUNCTION(0x4, "uart1")), /* DTR */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* TXD1 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D1 */
|
||||
SUNXI_FUNCTION(0x4, "uart1")), /* DSR */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* TXD2 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D2 */
|
||||
SUNXI_FUNCTION(0x4, "uart1")), /* DCD */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* TXD3 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D3 */
|
||||
SUNXI_FUNCTION(0x4, "uart1")), /* RING */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* TXD4 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D4 */
|
||||
SUNXI_FUNCTION(0x4, "uart1")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* TXD5 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D5 */
|
||||
SUNXI_FUNCTION(0x4, "uart1")), /* RX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* TXD6 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D6 */
|
||||
SUNXI_FUNCTION(0x4, "uart1")), /* RTS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* TXD7 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D7 */
|
||||
SUNXI_FUNCTION(0x4, "uart1")), /* CTS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* TXCLK */
|
||||
SUNXI_FUNCTION(0x3, "lcd1")), /* D8 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* TXEN */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D9 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3"), /* CMD */
|
||||
SUNXI_FUNCTION(0x5, "mmc2")), /* CMD */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* GTXCLK */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D10 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3"), /* CLK */
|
||||
SUNXI_FUNCTION(0x5, "mmc2")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* RXD0 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D11 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3"), /* D0 */
|
||||
SUNXI_FUNCTION(0x5, "mmc2")), /* D0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* RXD1 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D12 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3"), /* D1 */
|
||||
SUNXI_FUNCTION(0x5, "mmc2")), /* D1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* RXD2 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D13 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3"), /* D2 */
|
||||
SUNXI_FUNCTION(0x5, "mmc2")), /* D2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 14),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* RXD3 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D14 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3"), /* D3 */
|
||||
SUNXI_FUNCTION(0x5, "mmc2")), /* D3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* RXD4 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1")), /* D15 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* RXD5 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1")), /* D16 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* RXD6 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1")), /* D17 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 18),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* RXD7 */
|
||||
SUNXI_FUNCTION(0x3, "lcd1")), /* D18 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* RXDV */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D19 */
|
||||
SUNXI_FUNCTION(0x4, "pwm3")), /* Positive */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 20),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* RXCLK */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D20 */
|
||||
SUNXI_FUNCTION(0x4, "pwm3")), /* Negative */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 21),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* TXERR */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D21 */
|
||||
SUNXI_FUNCTION(0x4, "spi3")), /* CS0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 22),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* RXERR */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D22 */
|
||||
SUNXI_FUNCTION(0x4, "spi3")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 23),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* COL */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* D23 */
|
||||
SUNXI_FUNCTION(0x4, "spi3")), /* MOSI */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 24),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* CRS */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* CLK */
|
||||
SUNXI_FUNCTION(0x4, "spi3")), /* MISO */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 25),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* CLKIN */
|
||||
SUNXI_FUNCTION(0x3, "lcd1"), /* DE */
|
||||
SUNXI_FUNCTION(0x4, "spi3")), /* CS1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 26),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* MDC */
|
||||
SUNXI_FUNCTION(0x3, "lcd1")), /* HSYNC */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 27),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "gmac"), /* MDIO */
|
||||
SUNXI_FUNCTION(0x3, "lcd1")), /* VSYNC */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2s0"), /* MCLK */
|
||||
SUNXI_FUNCTION(0x3, "uart3"), /* CTS */
|
||||
SUNXI_FUNCTION(0x4, "csi")), /* MCLK1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2s0")), /* BCLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2s0")), /* LRCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2s0")), /* DO0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2s0"), /* DO1 */
|
||||
SUNXI_FUNCTION(0x3, "uart3")), /* RTS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2s0"), /* DO2 */
|
||||
SUNXI_FUNCTION(0x3, "uart3"), /* TX */
|
||||
SUNXI_FUNCTION(0x4, "i2c3")), /* SCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2s0"), /* DO3 */
|
||||
SUNXI_FUNCTION(0x3, "uart3"), /* RX */
|
||||
SUNXI_FUNCTION(0x4, "i2c3")), /* SDA */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "i2s0")), /* DI */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* WE */
|
||||
SUNXI_FUNCTION(0x3, "spi0")), /* MOSI */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* ALE */
|
||||
SUNXI_FUNCTION(0x3, "spi0")), /* MISO */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* CLE */
|
||||
SUNXI_FUNCTION(0x3, "spi0")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0")), /* CE1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0")), /* CE0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0")), /* RE */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* RB0 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2"), /* CMD */
|
||||
SUNXI_FUNCTION(0x4, "mmc3")), /* CMD */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* RB1 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2"), /* CLK */
|
||||
SUNXI_FUNCTION(0x4, "mmc3")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ0 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2"), /* D0 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3")), /* D0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ1 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2"), /* D1 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3")), /* D1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ2 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2"), /* D2 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3")), /* D2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ3 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2"), /* D3 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3")), /* D3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ4 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2"), /* D4 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3")), /* D4 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ5 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2"), /* D5 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3")), /* D5 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ6 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2"), /* D6 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3")), /* D6 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ7 */
|
||||
SUNXI_FUNCTION(0x3, "mmc2"), /* D7 */
|
||||
SUNXI_FUNCTION(0x4, "mmc3")), /* D7 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ8 */
|
||||
SUNXI_FUNCTION(0x3, "nand1")), /* DQ0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 17),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ9 */
|
||||
SUNXI_FUNCTION(0x3, "nand1")), /* DQ1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 18),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ10 */
|
||||
SUNXI_FUNCTION(0x3, "nand1")), /* DQ2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 19),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ11 */
|
||||
SUNXI_FUNCTION(0x3, "nand1")), /* DQ3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 20),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ12 */
|
||||
SUNXI_FUNCTION(0x3, "nand1")), /* DQ4 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 21),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ13 */
|
||||
SUNXI_FUNCTION(0x3, "nand1")), /* DQ5 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 22),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ14 */
|
||||
SUNXI_FUNCTION(0x3, "nand1")), /* DQ6 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 23),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQ15 */
|
||||
SUNXI_FUNCTION(0x3, "nand1")), /* DQ7 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 24),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0"), /* DQS */
|
||||
SUNXI_FUNCTION(0x3, "mmc2"), /* RST */
|
||||
SUNXI_FUNCTION(0x4, "mmc3")), /* RST */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 25),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0")), /* CE2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 26),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand0")), /* CE3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 27),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x3, "spi0")), /* CS0 */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D0 */
|
||||
SUNXI_FUNCTION(0x3, "lvds0")), /* VP0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D1 */
|
||||
SUNXI_FUNCTION(0x3, "lvds0")), /* VN0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D2 */
|
||||
SUNXI_FUNCTION(0x3, "lvds0")), /* VP1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D3 */
|
||||
SUNXI_FUNCTION(0x3, "lvds0")), /* VN1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D4 */
|
||||
SUNXI_FUNCTION(0x3, "lvds0")), /* VP2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D5 */
|
||||
SUNXI_FUNCTION(0x3, "lvds0")), /* VN2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D6 */
|
||||
SUNXI_FUNCTION(0x3, "lvds0")), /* VPC */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D7 */
|
||||
SUNXI_FUNCTION(0x3, "lvds0")), /* VNC */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D8 */
|
||||
SUNXI_FUNCTION(0x3, "lvds0")), /* VP3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D9 */
|
||||
SUNXI_FUNCTION(0x3, "lvds0")), /* VN3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D10 */
|
||||
SUNXI_FUNCTION(0x3, "lvds1")), /* VP0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D11 */
|
||||
SUNXI_FUNCTION(0x3, "lvds1")), /* VN0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D12 */
|
||||
SUNXI_FUNCTION(0x3, "lvds1")), /* VP1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D13 */
|
||||
SUNXI_FUNCTION(0x3, "lvds1")), /* VN1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D14 */
|
||||
SUNXI_FUNCTION(0x3, "lvds1")), /* VP2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D15 */
|
||||
SUNXI_FUNCTION(0x3, "lvds1")), /* VN2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 16),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D16 */
|
||||
SUNXI_FUNCTION(0x3, "lvds1")), /* VPC */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 17),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D17 */
|
||||
SUNXI_FUNCTION(0x3, "lvds1")), /* VNC */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 18),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D18 */
|
||||
SUNXI_FUNCTION(0x3, "lvds1")), /* VP3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 19),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0"), /* D19 */
|
||||
SUNXI_FUNCTION(0x3, "lvds1")), /* VN3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 20),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D20 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 21),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D21 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 22),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D22 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 23),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* D23 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 24),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 25),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* DE */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 26),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* HSYNC */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 27),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "lcd0")), /* VSYNC */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* PCLK */
|
||||
SUNXI_FUNCTION(0x3, "ts")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* MCLK */
|
||||
SUNXI_FUNCTION(0x3, "ts")), /* ERR */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* HSYNC */
|
||||
SUNXI_FUNCTION(0x3, "ts")), /* SYNC */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* VSYNC */
|
||||
SUNXI_FUNCTION(0x3, "ts")), /* DVLD */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* D0 */
|
||||
SUNXI_FUNCTION(0x3, "uart5")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* D1 */
|
||||
SUNXI_FUNCTION(0x3, "uart5")), /* RX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* D2 */
|
||||
SUNXI_FUNCTION(0x3, "uart5")), /* RTS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* D3 */
|
||||
SUNXI_FUNCTION(0x3, "uart5")), /* CTS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* D4 */
|
||||
SUNXI_FUNCTION(0x3, "ts")), /* D0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* D5 */
|
||||
SUNXI_FUNCTION(0x3, "ts")), /* D1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* D6 */
|
||||
SUNXI_FUNCTION(0x3, "ts")), /* D2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* D7 */
|
||||
SUNXI_FUNCTION(0x3, "ts")), /* D3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* D8 */
|
||||
SUNXI_FUNCTION(0x3, "ts")), /* D4 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* D9 */
|
||||
SUNXI_FUNCTION(0x3, "ts")), /* D5 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 14),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* D10 */
|
||||
SUNXI_FUNCTION(0x3, "ts")), /* D6 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi"), /* D11 */
|
||||
SUNXI_FUNCTION(0x3, "ts")), /* D7 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 16),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "csi")), /* MIPI CSI MCLK */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0"), /* D1 */
|
||||
SUNXI_FUNCTION(0x4, "jtag")), /* MS1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0"), /* D0 */
|
||||
SUNXI_FUNCTION(0x4, "jtag")), /* DI1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0"), /* CLK */
|
||||
SUNXI_FUNCTION(0x4, "uart0")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0"), /* CMD */
|
||||
SUNXI_FUNCTION(0x4, "jtag")), /* DO1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */
|
||||
SUNXI_FUNCTION(0x4, "uart0")), /* RX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc0"), /* D2 */
|
||||
SUNXI_FUNCTION(0x4, "jtag")), /* CK1 */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1")), /* CLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1")), /* CMD */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1")), /* D0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1")), /* D1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1")), /* D2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "mmc1")), /* D3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "uart2")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "uart2")), /* RX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "uart2")), /* RTS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "uart2")), /* CTS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c3"), /* SCK */
|
||||
SUNXI_FUNCTION(0x3, "usb")), /* DP3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c3"), /* SDA */
|
||||
SUNXI_FUNCTION(0x3, "usb")), /* DM3 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* CS1 */
|
||||
SUNXI_FUNCTION(0x3, "i2s1")), /* MCLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* CS0 */
|
||||
SUNXI_FUNCTION(0x3, "i2s1")), /* BCLK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 14),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* CLK */
|
||||
SUNXI_FUNCTION(0x3, "i2s1")), /* LRCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* MOSI */
|
||||
SUNXI_FUNCTION(0x3, "i2s1")), /* DIN */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 16),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi1"), /* MISO */
|
||||
SUNXI_FUNCTION(0x3, "i2s1")), /* DOUT */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 17),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "uart4")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 18),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "uart4")), /* RX */
|
||||
/* Hole */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 0),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand1")), /* WE */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 1),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand1")), /* ALE */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 2),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand1")), /* CLE */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 3),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand1")), /* CE1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 4),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand1")), /* CE0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 5),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand1")), /* RE */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 6),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand1")), /* RB0 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 7),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand1")), /* RB1 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 8),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand1")), /* DQS */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 9),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi2"), /* CS0 */
|
||||
SUNXI_FUNCTION(0x3, "jtag"), /* MS0 */
|
||||
SUNXI_FUNCTION(0x4, "pwm1")), /* Positive */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 10),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi2"), /* CLK */
|
||||
SUNXI_FUNCTION(0x3, "jtag"), /* CK0 */
|
||||
SUNXI_FUNCTION(0x4, "pwm1")), /* Negative */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 11),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi2"), /* MOSI */
|
||||
SUNXI_FUNCTION(0x3, "jtag"), /* DO0 */
|
||||
SUNXI_FUNCTION(0x4, "pwm2")), /* Positive */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 12),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "spi2"), /* MISO */
|
||||
SUNXI_FUNCTION(0x3, "jtag"), /* DI0 */
|
||||
SUNXI_FUNCTION(0x4, "pwm2")), /* Negative */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 13),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "pwm0")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 14),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c0")), /* SCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 15),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c0")), /* SDA */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 16),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c1")), /* SCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 17),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c1")), /* SDA */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 18),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c2")), /* SCK */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 19),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "i2c2")), /* SDA */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 20),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "uart0")), /* TX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 21),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "uart0")), /* RX */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 22),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 23),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 24),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 25),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 26),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 27),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 28),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 29),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand1")), /* CE2 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 30),
|
||||
SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
SUNXI_FUNCTION(0x2, "nand1")), /* CE3 */
|
||||
};
|
||||
|
||||
static const struct sunxi_pinctrl_desc sun6i_a31_pinctrl_data = {
|
||||
.pins = sun6i_a31_pins,
|
||||
.npins = ARRAY_SIZE(sun6i_a31_pins),
|
||||
};
|
||||
|
||||
static int sun6i_a31_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
return sunxi_pinctrl_init(pdev,
|
||||
&sun6i_a31_pinctrl_data);
|
||||
}
|
||||
|
||||
static struct of_device_id sun6i_a31_pinctrl_match[] = {
|
||||
{ .compatible = "allwinner,sun6i-a31-pinctrl", },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sun6i_a31_pinctrl_match);
|
||||
|
||||
static struct platform_driver sun6i_a31_pinctrl_driver = {
|
||||
.probe = sun6i_a31_pinctrl_probe,
|
||||
.driver = {
|
||||
.name = "sun6i-a31-pinctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = sun6i_a31_pinctrl_match,
|
||||
},
|
||||
};
|
||||
module_platform_driver(sun6i_a31_pinctrl_driver);
|
||||
|
||||
MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com");
|
||||
MODULE_DESCRIPTION("Allwinner A31 pinctrl driver");
|
||||
MODULE_LICENSE("GPL");
|
File diff suppressed because it is too large
Load Diff
|
@ -28,9 +28,8 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "core.h"
|
||||
#include "../core.h"
|
||||
#include "pinctrl-sunxi.h"
|
||||
#include "pinctrl-sunxi-pins.h"
|
||||
|
||||
static struct sunxi_pinctrl_group *
|
||||
sunxi_pinctrl_find_group_by_name(struct sunxi_pinctrl *pctl, const char *group)
|
||||
|
@ -281,6 +280,7 @@ static int sunxi_pconf_group_set(struct pinctrl_dev *pctldev,
|
|||
struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct sunxi_pinctrl_group *g = &pctl->groups[group];
|
||||
unsigned long flags;
|
||||
unsigned pin = g->pin - pctl->desc->pin_base;
|
||||
u32 val, mask;
|
||||
u16 strength;
|
||||
u8 dlevel;
|
||||
|
@ -304,23 +304,23 @@ static int sunxi_pconf_group_set(struct pinctrl_dev *pctldev,
|
|||
* 3: 40mA
|
||||
*/
|
||||
dlevel = strength / 10 - 1;
|
||||
val = readl(pctl->membase + sunxi_dlevel_reg(g->pin));
|
||||
mask = DLEVEL_PINS_MASK << sunxi_dlevel_offset(g->pin);
|
||||
val = readl(pctl->membase + sunxi_dlevel_reg(pin));
|
||||
mask = DLEVEL_PINS_MASK << sunxi_dlevel_offset(pin);
|
||||
writel((val & ~mask)
|
||||
| dlevel << sunxi_dlevel_offset(g->pin),
|
||||
pctl->membase + sunxi_dlevel_reg(g->pin));
|
||||
| dlevel << sunxi_dlevel_offset(pin),
|
||||
pctl->membase + sunxi_dlevel_reg(pin));
|
||||
break;
|
||||
case PIN_CONFIG_BIAS_PULL_UP:
|
||||
val = readl(pctl->membase + sunxi_pull_reg(g->pin));
|
||||
mask = PULL_PINS_MASK << sunxi_pull_offset(g->pin);
|
||||
writel((val & ~mask) | 1 << sunxi_pull_offset(g->pin),
|
||||
pctl->membase + sunxi_pull_reg(g->pin));
|
||||
val = readl(pctl->membase + sunxi_pull_reg(pin));
|
||||
mask = PULL_PINS_MASK << sunxi_pull_offset(pin);
|
||||
writel((val & ~mask) | 1 << sunxi_pull_offset(pin),
|
||||
pctl->membase + sunxi_pull_reg(pin));
|
||||
break;
|
||||
case PIN_CONFIG_BIAS_PULL_DOWN:
|
||||
val = readl(pctl->membase + sunxi_pull_reg(g->pin));
|
||||
mask = PULL_PINS_MASK << sunxi_pull_offset(g->pin);
|
||||
writel((val & ~mask) | 2 << sunxi_pull_offset(g->pin),
|
||||
pctl->membase + sunxi_pull_reg(g->pin));
|
||||
val = readl(pctl->membase + sunxi_pull_reg(pin));
|
||||
mask = PULL_PINS_MASK << sunxi_pull_offset(pin);
|
||||
writel((val & ~mask) | 2 << sunxi_pull_offset(pin),
|
||||
pctl->membase + sunxi_pull_reg(pin));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -377,6 +377,7 @@ static void sunxi_pmx_set(struct pinctrl_dev *pctldev,
|
|||
|
||||
spin_lock_irqsave(&pctl->lock, flags);
|
||||
|
||||
pin -= pctl->desc->pin_base;
|
||||
val = readl(pctl->membase + sunxi_mux_reg(pin));
|
||||
mask = MUX_PINS_MASK << sunxi_mux_offset(pin);
|
||||
writel((val & ~mask) | config << sunxi_mux_offset(pin),
|
||||
|
@ -437,12 +438,6 @@ static const struct pinmux_ops sunxi_pmx_ops = {
|
|||
.gpio_set_direction = sunxi_pmx_gpio_set_direction,
|
||||
};
|
||||
|
||||
static struct pinctrl_desc sunxi_pctrl_desc = {
|
||||
.confops = &sunxi_pconf_ops,
|
||||
.pctlops = &sunxi_pctrl_ops,
|
||||
.pmxops = &sunxi_pmx_ops,
|
||||
};
|
||||
|
||||
static int sunxi_pinctrl_gpio_request(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
return pinctrl_request_gpio(chip->base + offset);
|
||||
|
@ -530,27 +525,12 @@ static int sunxi_pinctrl_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
|
|||
if (!desc)
|
||||
return -EINVAL;
|
||||
|
||||
pctl->irq_array[desc->irqnum] = offset;
|
||||
|
||||
dev_dbg(chip->dev, "%s: request IRQ for GPIO %d, return %d\n",
|
||||
chip->label, offset + chip->base, desc->irqnum);
|
||||
|
||||
return irq_find_mapping(pctl->domain, desc->irqnum);
|
||||
}
|
||||
|
||||
static struct gpio_chip sunxi_pinctrl_gpio_chip = {
|
||||
.owner = THIS_MODULE,
|
||||
.request = sunxi_pinctrl_gpio_request,
|
||||
.free = sunxi_pinctrl_gpio_free,
|
||||
.direction_input = sunxi_pinctrl_gpio_direction_input,
|
||||
.direction_output = sunxi_pinctrl_gpio_direction_output,
|
||||
.get = sunxi_pinctrl_gpio_get,
|
||||
.set = sunxi_pinctrl_gpio_set,
|
||||
.of_xlate = sunxi_pinctrl_gpio_of_xlate,
|
||||
.to_irq = sunxi_pinctrl_gpio_to_irq,
|
||||
.of_gpio_n_cells = 3,
|
||||
.can_sleep = false,
|
||||
};
|
||||
|
||||
static int sunxi_pinctrl_irq_set_type(struct irq_data *d,
|
||||
unsigned int type)
|
||||
|
@ -685,16 +665,6 @@ static void sunxi_pinctrl_irq_handler(unsigned irq, struct irq_desc *desc)
|
|||
}
|
||||
}
|
||||
|
||||
static struct of_device_id sunxi_pinctrl_match[] = {
|
||||
{ .compatible = "allwinner,sun4i-a10-pinctrl", .data = (void *)&sun4i_a10_pinctrl_data },
|
||||
{ .compatible = "allwinner,sun5i-a10s-pinctrl", .data = (void *)&sun5i_a10s_pinctrl_data },
|
||||
{ .compatible = "allwinner,sun5i-a13-pinctrl", .data = (void *)&sun5i_a13_pinctrl_data },
|
||||
{ .compatible = "allwinner,sun6i-a31-pinctrl", .data = (void *)&sun6i_a31_pinctrl_data },
|
||||
{ .compatible = "allwinner,sun7i-a20-pinctrl", .data = (void *)&sun7i_a20_pinctrl_data },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sunxi_pinctrl_match);
|
||||
|
||||
static int sunxi_pinctrl_add_function(struct sunxi_pinctrl *pctl,
|
||||
const char *name)
|
||||
{
|
||||
|
@ -755,6 +725,9 @@ static int sunxi_pinctrl_build_state(struct platform_device *pdev)
|
|||
struct sunxi_desc_function *func = pin->functions;
|
||||
|
||||
while (func->name) {
|
||||
/* Create interrupt mapping while we're at it */
|
||||
if (!strcmp(func->name, "irq"))
|
||||
pctl->irq_array[func->irqnum] = pin->pin.number;
|
||||
sunxi_pinctrl_add_function(pctl, func->name);
|
||||
func++;
|
||||
}
|
||||
|
@ -798,12 +771,14 @@ static int sunxi_pinctrl_build_state(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int sunxi_pinctrl_probe(struct platform_device *pdev)
|
||||
int sunxi_pinctrl_init(struct platform_device *pdev,
|
||||
const struct sunxi_pinctrl_desc *desc)
|
||||
{
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
const struct of_device_id *device;
|
||||
struct pinctrl_desc *pctrl_desc;
|
||||
struct pinctrl_pin_desc *pins;
|
||||
struct sunxi_pinctrl *pctl;
|
||||
struct resource *res;
|
||||
int i, ret, last_pin;
|
||||
struct clk *clk;
|
||||
|
||||
|
@ -814,15 +789,13 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev)
|
|||
|
||||
spin_lock_init(&pctl->lock);
|
||||
|
||||
pctl->membase = of_iomap(node, 0);
|
||||
if (!pctl->membase)
|
||||
return -ENOMEM;
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
pctl->membase = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(pctl->membase))
|
||||
return PTR_ERR(pctl->membase);
|
||||
|
||||
device = of_match_device(sunxi_pinctrl_match, &pdev->dev);
|
||||
if (!device)
|
||||
return -ENODEV;
|
||||
|
||||
pctl->desc = (struct sunxi_pinctrl_desc *)device->data;
|
||||
pctl->dev = &pdev->dev;
|
||||
pctl->desc = desc;
|
||||
|
||||
ret = sunxi_pinctrl_build_state(pdev);
|
||||
if (ret) {
|
||||
|
@ -839,12 +812,21 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev)
|
|||
for (i = 0; i < pctl->desc->npins; i++)
|
||||
pins[i] = pctl->desc->pins[i].pin;
|
||||
|
||||
sunxi_pctrl_desc.name = dev_name(&pdev->dev);
|
||||
sunxi_pctrl_desc.owner = THIS_MODULE;
|
||||
sunxi_pctrl_desc.pins = pins;
|
||||
sunxi_pctrl_desc.npins = pctl->desc->npins;
|
||||
pctl->dev = &pdev->dev;
|
||||
pctl->pctl_dev = pinctrl_register(&sunxi_pctrl_desc,
|
||||
pctrl_desc = devm_kzalloc(&pdev->dev,
|
||||
sizeof(*pctrl_desc),
|
||||
GFP_KERNEL);
|
||||
if (!pctrl_desc)
|
||||
return -ENOMEM;
|
||||
|
||||
pctrl_desc->name = dev_name(&pdev->dev);
|
||||
pctrl_desc->owner = THIS_MODULE;
|
||||
pctrl_desc->pins = pins;
|
||||
pctrl_desc->npins = pctl->desc->npins;
|
||||
pctrl_desc->confops = &sunxi_pconf_ops;
|
||||
pctrl_desc->pctlops = &sunxi_pctrl_ops;
|
||||
pctrl_desc->pmxops = &sunxi_pmx_ops;
|
||||
|
||||
pctl->pctl_dev = pinctrl_register(pctrl_desc,
|
||||
&pdev->dev, pctl);
|
||||
if (!pctl->pctl_dev) {
|
||||
dev_err(&pdev->dev, "couldn't register pinctrl driver\n");
|
||||
|
@ -858,11 +840,22 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
last_pin = pctl->desc->pins[pctl->desc->npins - 1].pin.number;
|
||||
pctl->chip = &sunxi_pinctrl_gpio_chip;
|
||||
pctl->chip->ngpio = round_up(last_pin, PINS_PER_BANK);
|
||||
pctl->chip->owner = THIS_MODULE;
|
||||
pctl->chip->request = sunxi_pinctrl_gpio_request,
|
||||
pctl->chip->free = sunxi_pinctrl_gpio_free,
|
||||
pctl->chip->direction_input = sunxi_pinctrl_gpio_direction_input,
|
||||
pctl->chip->direction_output = sunxi_pinctrl_gpio_direction_output,
|
||||
pctl->chip->get = sunxi_pinctrl_gpio_get,
|
||||
pctl->chip->set = sunxi_pinctrl_gpio_set,
|
||||
pctl->chip->of_xlate = sunxi_pinctrl_gpio_of_xlate,
|
||||
pctl->chip->to_irq = sunxi_pinctrl_gpio_to_irq,
|
||||
pctl->chip->of_gpio_n_cells = 3,
|
||||
pctl->chip->can_sleep = false,
|
||||
pctl->chip->ngpio = round_up(last_pin, PINS_PER_BANK) -
|
||||
pctl->desc->pin_base;
|
||||
pctl->chip->label = dev_name(&pdev->dev);
|
||||
pctl->chip->dev = &pdev->dev;
|
||||
pctl->chip->base = 0;
|
||||
pctl->chip->base = pctl->desc->pin_base;
|
||||
|
||||
ret = gpiochip_add(pctl->chip);
|
||||
if (ret)
|
||||
|
@ -884,12 +877,14 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev)
|
|||
goto gpiochip_error;
|
||||
}
|
||||
|
||||
clk_prepare_enable(clk);
|
||||
ret = clk_prepare_enable(clk);
|
||||
if (ret)
|
||||
goto gpiochip_error;
|
||||
|
||||
pctl->irq = irq_of_parse_and_map(node, 0);
|
||||
if (!pctl->irq) {
|
||||
ret = -EINVAL;
|
||||
goto gpiochip_error;
|
||||
goto clk_error;
|
||||
}
|
||||
|
||||
pctl->domain = irq_domain_add_linear(node, SUNXI_IRQ_NUMBER,
|
||||
|
@ -897,7 +892,7 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev)
|
|||
if (!pctl->domain) {
|
||||
dev_err(&pdev->dev, "Couldn't register IRQ domain\n");
|
||||
ret = -ENOMEM;
|
||||
goto gpiochip_error;
|
||||
goto clk_error;
|
||||
}
|
||||
|
||||
for (i = 0; i < SUNXI_IRQ_NUMBER; i++) {
|
||||
|
@ -915,6 +910,8 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev)
|
|||
|
||||
return 0;
|
||||
|
||||
clk_error:
|
||||
clk_disable_unprepare(clk);
|
||||
gpiochip_error:
|
||||
if (gpiochip_remove(pctl->chip))
|
||||
dev_err(&pdev->dev, "failed to remove gpio chip\n");
|
||||
|
@ -922,17 +919,3 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev)
|
|||
pinctrl_unregister(pctl->pctl_dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct platform_driver sunxi_pinctrl_driver = {
|
||||
.probe = sunxi_pinctrl_probe,
|
||||
.driver = {
|
||||
.name = "sunxi-pinctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = sunxi_pinctrl_match,
|
||||
},
|
||||
};
|
||||
module_platform_driver(sunxi_pinctrl_driver);
|
||||
|
||||
MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com");
|
||||
MODULE_DESCRIPTION("Allwinner A1X pinctrl driver");
|
||||
MODULE_LICENSE("GPL");
|
|
@ -0,0 +1,258 @@
|
|||
/*
|
||||
* Allwinner A1X SoCs pinctrl driver.
|
||||
*
|
||||
* Copyright (C) 2012 Maxime Ripard
|
||||
*
|
||||
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#ifndef __PINCTRL_SUNXI_H
|
||||
#define __PINCTRL_SUNXI_H
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#define PA_BASE 0
|
||||
#define PB_BASE 32
|
||||
#define PC_BASE 64
|
||||
#define PD_BASE 96
|
||||
#define PE_BASE 128
|
||||
#define PF_BASE 160
|
||||
#define PG_BASE 192
|
||||
#define PH_BASE 224
|
||||
#define PI_BASE 256
|
||||
#define PL_BASE 352
|
||||
#define PM_BASE 384
|
||||
|
||||
#define SUNXI_PINCTRL_PIN(bank, pin) \
|
||||
PINCTRL_PIN(P ## bank ## _BASE + (pin), "P" #bank #pin)
|
||||
|
||||
#define SUNXI_PIN_NAME_MAX_LEN 5
|
||||
|
||||
#define BANK_MEM_SIZE 0x24
|
||||
#define MUX_REGS_OFFSET 0x0
|
||||
#define DATA_REGS_OFFSET 0x10
|
||||
#define DLEVEL_REGS_OFFSET 0x14
|
||||
#define PULL_REGS_OFFSET 0x1c
|
||||
|
||||
#define PINS_PER_BANK 32
|
||||
#define MUX_PINS_PER_REG 8
|
||||
#define MUX_PINS_BITS 4
|
||||
#define MUX_PINS_MASK 0x0f
|
||||
#define DATA_PINS_PER_REG 32
|
||||
#define DATA_PINS_BITS 1
|
||||
#define DATA_PINS_MASK 0x01
|
||||
#define DLEVEL_PINS_PER_REG 16
|
||||
#define DLEVEL_PINS_BITS 2
|
||||
#define DLEVEL_PINS_MASK 0x03
|
||||
#define PULL_PINS_PER_REG 16
|
||||
#define PULL_PINS_BITS 2
|
||||
#define PULL_PINS_MASK 0x03
|
||||
|
||||
#define SUNXI_IRQ_NUMBER 32
|
||||
|
||||
#define IRQ_CFG_REG 0x200
|
||||
#define IRQ_CFG_IRQ_PER_REG 8
|
||||
#define IRQ_CFG_IRQ_BITS 4
|
||||
#define IRQ_CFG_IRQ_MASK ((1 << IRQ_CFG_IRQ_BITS) - 1)
|
||||
#define IRQ_CTRL_REG 0x210
|
||||
#define IRQ_CTRL_IRQ_PER_REG 32
|
||||
#define IRQ_CTRL_IRQ_BITS 1
|
||||
#define IRQ_CTRL_IRQ_MASK ((1 << IRQ_CTRL_IRQ_BITS) - 1)
|
||||
#define IRQ_STATUS_REG 0x214
|
||||
#define IRQ_STATUS_IRQ_PER_REG 32
|
||||
#define IRQ_STATUS_IRQ_BITS 1
|
||||
#define IRQ_STATUS_IRQ_MASK ((1 << IRQ_STATUS_IRQ_BITS) - 1)
|
||||
|
||||
#define IRQ_EDGE_RISING 0x00
|
||||
#define IRQ_EDGE_FALLING 0x01
|
||||
#define IRQ_LEVEL_HIGH 0x02
|
||||
#define IRQ_LEVEL_LOW 0x03
|
||||
#define IRQ_EDGE_BOTH 0x04
|
||||
|
||||
struct sunxi_desc_function {
|
||||
const char *name;
|
||||
u8 muxval;
|
||||
u8 irqnum;
|
||||
};
|
||||
|
||||
struct sunxi_desc_pin {
|
||||
struct pinctrl_pin_desc pin;
|
||||
struct sunxi_desc_function *functions;
|
||||
};
|
||||
|
||||
struct sunxi_pinctrl_desc {
|
||||
const struct sunxi_desc_pin *pins;
|
||||
int npins;
|
||||
unsigned pin_base;
|
||||
};
|
||||
|
||||
struct sunxi_pinctrl_function {
|
||||
const char *name;
|
||||
const char **groups;
|
||||
unsigned ngroups;
|
||||
};
|
||||
|
||||
struct sunxi_pinctrl_group {
|
||||
const char *name;
|
||||
unsigned long config;
|
||||
unsigned pin;
|
||||
};
|
||||
|
||||
struct sunxi_pinctrl {
|
||||
void __iomem *membase;
|
||||
struct gpio_chip *chip;
|
||||
const struct sunxi_pinctrl_desc *desc;
|
||||
struct device *dev;
|
||||
struct irq_domain *domain;
|
||||
struct sunxi_pinctrl_function *functions;
|
||||
unsigned nfunctions;
|
||||
struct sunxi_pinctrl_group *groups;
|
||||
unsigned ngroups;
|
||||
int irq;
|
||||
int irq_array[SUNXI_IRQ_NUMBER];
|
||||
spinlock_t lock;
|
||||
struct pinctrl_dev *pctl_dev;
|
||||
};
|
||||
|
||||
#define SUNXI_PIN(_pin, ...) \
|
||||
{ \
|
||||
.pin = _pin, \
|
||||
.functions = (struct sunxi_desc_function[]){ \
|
||||
__VA_ARGS__, { } }, \
|
||||
}
|
||||
|
||||
#define SUNXI_FUNCTION(_val, _name) \
|
||||
{ \
|
||||
.name = _name, \
|
||||
.muxval = _val, \
|
||||
}
|
||||
|
||||
#define SUNXI_FUNCTION_IRQ(_val, _irq) \
|
||||
{ \
|
||||
.name = "irq", \
|
||||
.muxval = _val, \
|
||||
.irqnum = _irq, \
|
||||
}
|
||||
|
||||
/*
|
||||
* The sunXi PIO registers are organized as is:
|
||||
* 0x00 - 0x0c Muxing values.
|
||||
* 8 pins per register, each pin having a 4bits value
|
||||
* 0x10 Pin values
|
||||
* 32 bits per register, each pin corresponding to one bit
|
||||
* 0x14 - 0x18 Drive level
|
||||
* 16 pins per register, each pin having a 2bits value
|
||||
* 0x1c - 0x20 Pull-Up values
|
||||
* 16 pins per register, each pin having a 2bits value
|
||||
*
|
||||
* This is for the first bank. Each bank will have the same layout,
|
||||
* with an offset being a multiple of 0x24.
|
||||
*
|
||||
* The following functions calculate from the pin number the register
|
||||
* and the bit offset that we should access.
|
||||
*/
|
||||
static inline u32 sunxi_mux_reg(u16 pin)
|
||||
{
|
||||
u8 bank = pin / PINS_PER_BANK;
|
||||
u32 offset = bank * BANK_MEM_SIZE;
|
||||
offset += MUX_REGS_OFFSET;
|
||||
offset += pin % PINS_PER_BANK / MUX_PINS_PER_REG * 0x04;
|
||||
return round_down(offset, 4);
|
||||
}
|
||||
|
||||
static inline u32 sunxi_mux_offset(u16 pin)
|
||||
{
|
||||
u32 pin_num = pin % MUX_PINS_PER_REG;
|
||||
return pin_num * MUX_PINS_BITS;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_data_reg(u16 pin)
|
||||
{
|
||||
u8 bank = pin / PINS_PER_BANK;
|
||||
u32 offset = bank * BANK_MEM_SIZE;
|
||||
offset += DATA_REGS_OFFSET;
|
||||
offset += pin % PINS_PER_BANK / DATA_PINS_PER_REG * 0x04;
|
||||
return round_down(offset, 4);
|
||||
}
|
||||
|
||||
static inline u32 sunxi_data_offset(u16 pin)
|
||||
{
|
||||
u32 pin_num = pin % DATA_PINS_PER_REG;
|
||||
return pin_num * DATA_PINS_BITS;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_dlevel_reg(u16 pin)
|
||||
{
|
||||
u8 bank = pin / PINS_PER_BANK;
|
||||
u32 offset = bank * BANK_MEM_SIZE;
|
||||
offset += DLEVEL_REGS_OFFSET;
|
||||
offset += pin % PINS_PER_BANK / DLEVEL_PINS_PER_REG * 0x04;
|
||||
return round_down(offset, 4);
|
||||
}
|
||||
|
||||
static inline u32 sunxi_dlevel_offset(u16 pin)
|
||||
{
|
||||
u32 pin_num = pin % DLEVEL_PINS_PER_REG;
|
||||
return pin_num * DLEVEL_PINS_BITS;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_pull_reg(u16 pin)
|
||||
{
|
||||
u8 bank = pin / PINS_PER_BANK;
|
||||
u32 offset = bank * BANK_MEM_SIZE;
|
||||
offset += PULL_REGS_OFFSET;
|
||||
offset += pin % PINS_PER_BANK / PULL_PINS_PER_REG * 0x04;
|
||||
return round_down(offset, 4);
|
||||
}
|
||||
|
||||
static inline u32 sunxi_pull_offset(u16 pin)
|
||||
{
|
||||
u32 pin_num = pin % PULL_PINS_PER_REG;
|
||||
return pin_num * PULL_PINS_BITS;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_irq_cfg_reg(u16 irq)
|
||||
{
|
||||
u8 reg = irq / IRQ_CFG_IRQ_PER_REG * 0x04;
|
||||
return reg + IRQ_CFG_REG;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_irq_cfg_offset(u16 irq)
|
||||
{
|
||||
u32 irq_num = irq % IRQ_CFG_IRQ_PER_REG;
|
||||
return irq_num * IRQ_CFG_IRQ_BITS;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_irq_ctrl_reg(u16 irq)
|
||||
{
|
||||
u8 reg = irq / IRQ_CTRL_IRQ_PER_REG * 0x04;
|
||||
return reg + IRQ_CTRL_REG;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_irq_ctrl_offset(u16 irq)
|
||||
{
|
||||
u32 irq_num = irq % IRQ_CTRL_IRQ_PER_REG;
|
||||
return irq_num * IRQ_CTRL_IRQ_BITS;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_irq_status_reg(u16 irq)
|
||||
{
|
||||
u8 reg = irq / IRQ_STATUS_IRQ_PER_REG * 0x04;
|
||||
return reg + IRQ_STATUS_REG;
|
||||
}
|
||||
|
||||
static inline u32 sunxi_irq_status_offset(u16 irq)
|
||||
{
|
||||
u32 irq_num = irq % IRQ_STATUS_IRQ_PER_REG;
|
||||
return irq_num * IRQ_STATUS_IRQ_BITS;
|
||||
}
|
||||
|
||||
int sunxi_pinctrl_init(struct platform_device *pdev,
|
||||
const struct sunxi_pinctrl_desc *desc);
|
||||
|
||||
#endif /* __PINCTRL_SUNXI_H */
|
Loading…
Reference in New Issue