forked from u-boot/u-boot
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Samuel Holland <samuel@sholland.org>
- Loading branch information
Showing
15 changed files
with
481 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
|
||
#define LOG_CATEGORY LOGC_DM | ||
|
||
#define DEBUG | ||
#include <common.h> | ||
#include <errno.h> | ||
#include <log.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if ARCH_SUNXI | ||
|
||
config PINCTRL_SUNXI | ||
bool | ||
|
||
config PINCTRL_SUN50I_H5 | ||
bool "Support for the Allwinner H5 PIO" | ||
select PINCTRL_SUNXI | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
obj-y += pinctrl-sunxi.o | ||
|
||
obj-$(CONFIG_PINCTRL_SUN50I_H5) += pinctrl-sun50i-h5.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
|
||
#include <dm.h> | ||
|
||
#include "pinctrl-sunxi.h" | ||
|
||
static const struct sunxi_pinctrl_cfg sun50i_h5_pinctrl_cfgs[] = { | ||
SUNXI_PINCTRL_CFG(C, 5, MMC2, 3), | ||
SUNXI_PINCTRL_CFG(C, 6, MMC2, 3), | ||
SUNXI_PINCTRL_CFG(C, 8, MMC2, 3), | ||
SUNXI_PINCTRL_CFG(C, 9, MMC2, 3), | ||
SUNXI_PINCTRL_CFG(C, 10, MMC2, 3), | ||
SUNXI_PINCTRL_CFG(C, 11, MMC2, 3), | ||
SUNXI_PINCTRL_CFG(C, 12, MMC2, 3), | ||
SUNXI_PINCTRL_CFG(C, 13, MMC2, 3), | ||
SUNXI_PINCTRL_CFG(C, 14, MMC2, 3), | ||
SUNXI_PINCTRL_CFG(C, 15, MMC2, 3), | ||
SUNXI_PINCTRL_CFG(C, 16, MMC2, 3), | ||
SUNXI_PINCTRL_CFG(D, 0, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 1, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 2, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 3, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 4, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 5, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 6, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 7, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 8, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 9, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 10, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 11, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 12, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 13, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 14, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 15, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 16, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(D, 17, EMAC, 2), | ||
SUNXI_PINCTRL_CFG(F, 0, MMC0, 2), | ||
SUNXI_PINCTRL_CFG(F, 1, MMC0, 2), | ||
SUNXI_PINCTRL_CFG(F, 2, MMC0, 2), | ||
SUNXI_PINCTRL_CFG(F, 3, MMC0, 2), | ||
SUNXI_PINCTRL_CFG(F, 4, MMC0, 2), | ||
SUNXI_PINCTRL_CFG(F, 5, MMC0, 2), | ||
}; | ||
|
||
static const struct sunxi_pinctrl_desc sun50i_h5_pinctrl_desc = { | ||
.cfgs = sun50i_h5_pinctrl_cfgs, | ||
.ncfgs = ARRAY_SIZE(sun50i_h5_pinctrl_cfgs), | ||
.first_bank = 'A', | ||
.nbanks = 7, | ||
}; | ||
|
||
static const struct udevice_id sun50i_h5_pinctrl_ids[] = { | ||
{ | ||
.compatible = "allwinner,sun50i-h5-pinctrl", | ||
.data = (ulong)&sun50i_h5_pinctrl_desc, | ||
}, | ||
{ } | ||
}; | ||
|
||
U_BOOT_DRIVER(pinctrl_sunxi) = { | ||
.name = "sun50i-h5-pinctrl", | ||
.id = UCLASS_PINCTRL, | ||
.of_match = sun50i_h5_pinctrl_ids, | ||
.bind = sunxi_pinctrl_bind, | ||
.probe = sunxi_pinctrl_probe, | ||
.of_to_plat = sunxi_pinctrl_of_to_plat, | ||
.plat_auto = sizeof(struct sunxi_pinctrl_plat), | ||
.ops = &sunxi_pinctrl_ops, | ||
}; |
Oops, something went wrong.