|
33 | 33 | #define PAD_SR1 (0x0274) |
34 | 34 | #define PAD_SR2 (0x0278) |
35 | 35 |
|
36 | | -#define OWL_GPIO_PORT_A 0 |
37 | | -#define OWL_GPIO_PORT_B 1 |
38 | | -#define OWL_GPIO_PORT_C 2 |
39 | | -#define OWL_GPIO_PORT_D 3 |
40 | | -#define OWL_GPIO_PORT_E 4 |
41 | | -#define OWL_GPIO_PORT_F 5 |
42 | | - |
43 | 36 | #define _GPIOA(offset) (offset) |
44 | 37 | #define _GPIOB(offset) (32 + (offset)) |
45 | 38 | #define _GPIOC(offset) (64 + (offset)) |
@@ -892,55 +885,6 @@ static unsigned int i2c2_sr_pads[] = { I2C2_SCLK, I2C2_SDATA }; |
892 | 885 | static unsigned int sensor0_sr_pads[] = { SENSOR0_PCLK, |
893 | 886 | SENSOR0_CKOUT }; |
894 | 887 |
|
895 | | -#define MUX_PG(group_name, reg, shift, width) \ |
896 | | - { \ |
897 | | - .name = #group_name, \ |
898 | | - .pads = group_name##_pads, \ |
899 | | - .npads = ARRAY_SIZE(group_name##_pads), \ |
900 | | - .funcs = group_name##_funcs, \ |
901 | | - .nfuncs = ARRAY_SIZE(group_name##_funcs), \ |
902 | | - .mfpctl_reg = MFCTL##reg, \ |
903 | | - .mfpctl_shift = shift, \ |
904 | | - .mfpctl_width = width, \ |
905 | | - .drv_reg = -1, \ |
906 | | - .drv_shift = -1, \ |
907 | | - .drv_width = -1, \ |
908 | | - .sr_reg = -1, \ |
909 | | - .sr_shift = -1, \ |
910 | | - .sr_width = -1, \ |
911 | | - } |
912 | | - |
913 | | -#define DRV_PG(group_name, reg, shift, width) \ |
914 | | - { \ |
915 | | - .name = #group_name, \ |
916 | | - .pads = group_name##_pads, \ |
917 | | - .npads = ARRAY_SIZE(group_name##_pads), \ |
918 | | - .mfpctl_reg = -1, \ |
919 | | - .mfpctl_shift = -1, \ |
920 | | - .mfpctl_width = -1, \ |
921 | | - .drv_reg = PAD_DRV##reg, \ |
922 | | - .drv_shift = shift, \ |
923 | | - .drv_width = width, \ |
924 | | - .sr_reg = -1, \ |
925 | | - .sr_shift = -1, \ |
926 | | - .sr_width = -1, \ |
927 | | - } |
928 | | - |
929 | | -#define SR_PG(group_name, reg, shift, width) \ |
930 | | - { \ |
931 | | - .name = #group_name, \ |
932 | | - .pads = group_name##_pads, \ |
933 | | - .npads = ARRAY_SIZE(group_name##_pads), \ |
934 | | - .mfpctl_reg = -1, \ |
935 | | - .mfpctl_shift = -1, \ |
936 | | - .mfpctl_width = -1, \ |
937 | | - .drv_reg = -1, \ |
938 | | - .drv_shift = -1, \ |
939 | | - .drv_width = -1, \ |
940 | | - .sr_reg = PAD_SR##reg, \ |
941 | | - .sr_shift = shift, \ |
942 | | - .sr_width = width, \ |
943 | | - } |
944 | 888 |
|
945 | 889 | /* Pinctrl groups */ |
946 | 890 | static const struct owl_pingroup s900_groups[] = { |
@@ -1442,13 +1386,6 @@ static const char * const sirq2_groups[] = { |
1442 | 1386 | "sirq2_dummy", |
1443 | 1387 | }; |
1444 | 1388 |
|
1445 | | -#define FUNCTION(fname) \ |
1446 | | - { \ |
1447 | | - .name = #fname, \ |
1448 | | - .groups = fname##_groups, \ |
1449 | | - .ngroups = ARRAY_SIZE(fname##_groups), \ |
1450 | | - } |
1451 | | - |
1452 | 1389 | static const struct owl_pinmux_func s900_functions[] = { |
1453 | 1390 | [S900_MUX_ERAM] = FUNCTION(eram), |
1454 | 1391 | [S900_MUX_ETH_RMII] = FUNCTION(eth_rmii), |
@@ -1500,28 +1437,6 @@ static const struct owl_pinmux_func s900_functions[] = { |
1500 | 1437 | [S900_MUX_SIRQ1] = FUNCTION(sirq1), |
1501 | 1438 | [S900_MUX_SIRQ2] = FUNCTION(sirq2) |
1502 | 1439 | }; |
1503 | | -/* PAD PULL UP/DOWN CONFIGURES */ |
1504 | | -#define PULLCTL_CONF(pull_reg, pull_sft, pull_wdt) \ |
1505 | | - { \ |
1506 | | - .reg = PAD_PULLCTL##pull_reg, \ |
1507 | | - .shift = pull_sft, \ |
1508 | | - .width = pull_wdt, \ |
1509 | | - } |
1510 | | - |
1511 | | -#define PAD_PULLCTL_CONF(pad_name, pull_reg, pull_sft, pull_wdt) \ |
1512 | | - struct owl_pullctl pad_name##_pullctl_conf \ |
1513 | | - = PULLCTL_CONF(pull_reg, pull_sft, pull_wdt) |
1514 | | - |
1515 | | -#define ST_CONF(st_reg, st_sft, st_wdt) \ |
1516 | | - { \ |
1517 | | - .reg = PAD_ST##st_reg, \ |
1518 | | - .shift = st_sft, \ |
1519 | | - .width = st_wdt, \ |
1520 | | - } |
1521 | | - |
1522 | | -#define PAD_ST_CONF(pad_name, st_reg, st_sft, st_wdt) \ |
1523 | | - struct owl_st pad_name##_st_conf \ |
1524 | | - = ST_CONF(st_reg, st_sft, st_wdt) |
1525 | 1440 |
|
1526 | 1441 | /* PAD_PULLCTL0 */ |
1527 | 1442 | static PAD_PULLCTL_CONF(ETH_RXER, 0, 18, 2); |
@@ -1639,34 +1554,6 @@ static PAD_ST_CONF(SPI0_SS, 1, 2, 1); |
1639 | 1554 | static PAD_ST_CONF(I2S_BCLK0, 1, 1, 1); |
1640 | 1555 | static PAD_ST_CONF(I2S_MCLK0, 1, 0, 1); |
1641 | 1556 |
|
1642 | | -#define PAD_INFO(name) \ |
1643 | | - { \ |
1644 | | - .pad = name, \ |
1645 | | - .pullctl = NULL, \ |
1646 | | - .st = NULL, \ |
1647 | | - } |
1648 | | - |
1649 | | -#define PAD_INFO_ST(name) \ |
1650 | | - { \ |
1651 | | - .pad = name, \ |
1652 | | - .pullctl = NULL, \ |
1653 | | - .st = &name##_st_conf, \ |
1654 | | - } |
1655 | | - |
1656 | | -#define PAD_INFO_PULLCTL(name) \ |
1657 | | - { \ |
1658 | | - .pad = name, \ |
1659 | | - .pullctl = &name##_pullctl_conf, \ |
1660 | | - .st = NULL, \ |
1661 | | - } |
1662 | | - |
1663 | | -#define PAD_INFO_PULLCTL_ST(name) \ |
1664 | | - { \ |
1665 | | - .pad = name, \ |
1666 | | - .pullctl = &name##_pullctl_conf, \ |
1667 | | - .st = &name##_st_conf, \ |
1668 | | - } |
1669 | | - |
1670 | 1557 | /* Pad info table */ |
1671 | 1558 | static struct owl_padinfo s900_padinfo[NUM_PADS] = { |
1672 | 1559 | [ETH_TXD0] = PAD_INFO_ST(ETH_TXD0), |
@@ -1821,27 +1708,13 @@ static struct owl_padinfo s900_padinfo[NUM_PADS] = { |
1821 | 1708 | [SGPIO3] = PAD_INFO_PULLCTL_ST(SGPIO3) |
1822 | 1709 | }; |
1823 | 1710 |
|
1824 | | -#define OWL_GPIO_PORT(port, base, count, _outen, _inen, _dat, \ |
1825 | | - _intc_ctl, _intc_pd, _intc_msk, _intc_type) \ |
1826 | | - [OWL_GPIO_PORT_##port] = { \ |
1827 | | - .offset = base, \ |
1828 | | - .pins = count, \ |
1829 | | - .outen = _outen, \ |
1830 | | - .inen = _inen, \ |
1831 | | - .dat = _dat, \ |
1832 | | - .intc_ctl = _intc_ctl, \ |
1833 | | - .intc_pd = _intc_pd, \ |
1834 | | - .intc_msk = _intc_msk, \ |
1835 | | - .intc_type = _intc_type, \ |
1836 | | - } |
1837 | | - |
1838 | 1711 | static const struct owl_gpio_port s900_gpio_ports[] = { |
1839 | | - OWL_GPIO_PORT(A, 0x0000, 32, 0x0, 0x4, 0x8, 0x204, 0x208, 0x20C, 0x240), |
1840 | | - OWL_GPIO_PORT(B, 0x000C, 32, 0x0, 0x4, 0x8, 0x534, 0x204, 0x208, 0x23C), |
1841 | | - OWL_GPIO_PORT(C, 0x0018, 12, 0x0, 0x4, 0x8, 0x52C, 0x200, 0x204, 0x238), |
1842 | | - OWL_GPIO_PORT(D, 0x0024, 30, 0x0, 0x4, 0x8, 0x524, 0x1FC, 0x200, 0x234), |
1843 | | - OWL_GPIO_PORT(E, 0x0030, 32, 0x0, 0x4, 0x8, 0x51C, 0x1F8, 0x1FC, 0x230), |
1844 | | - OWL_GPIO_PORT(F, 0x00F0, 8, 0x0, 0x4, 0x8, 0x460, 0x140, 0x144, 0x178) |
| 1712 | + OWL_GPIO_PORT(A, 0x0000, 32, 0x0, 0x4, 0x8, 0x204, 0x208, 0x20C, 0x240, 0), |
| 1713 | + OWL_GPIO_PORT(B, 0x000C, 32, 0x0, 0x4, 0x8, 0x534, 0x204, 0x208, 0x23C, 0), |
| 1714 | + OWL_GPIO_PORT(C, 0x0018, 12, 0x0, 0x4, 0x8, 0x52C, 0x200, 0x204, 0x238, 0), |
| 1715 | + OWL_GPIO_PORT(D, 0x0024, 30, 0x0, 0x4, 0x8, 0x524, 0x1FC, 0x200, 0x234, 0), |
| 1716 | + OWL_GPIO_PORT(E, 0x0030, 32, 0x0, 0x4, 0x8, 0x51C, 0x1F8, 0x1FC, 0x230, 0), |
| 1717 | + OWL_GPIO_PORT(F, 0x00F0, 8, 0x0, 0x4, 0x8, 0x460, 0x140, 0x144, 0x178, 0) |
1845 | 1718 | }; |
1846 | 1719 |
|
1847 | 1720 | static struct owl_pinctrl_soc_data s900_pinctrl_data = { |
|
0 commit comments