.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Pinctrl data for the NVIDIA Tegra210 pinmux |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify it |
---|
7 | | - * under the terms and conditions of the GNU General Public License, |
---|
8 | | - * version 2, as published by the Free Software Foundation. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
---|
11 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
12 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
13 | | - * more details. |
---|
14 | 6 | */ |
---|
15 | 7 | |
---|
16 | 8 | #include <linux/init.h> |
---|
.. | .. |
---|
1310 | 1302 | .lock_bit = 7, \ |
---|
1311 | 1303 | .ioreset_bit = -1, \ |
---|
1312 | 1304 | .rcv_sel_bit = PINGROUP_BIT_##e_io_hv(10), \ |
---|
1313 | | - .parked_bit = 5, \ |
---|
1314 | 1305 | .hsm_bit = PINGROUP_BIT_##hsm(9), \ |
---|
1315 | 1306 | .schmitt_bit = 12, \ |
---|
1316 | 1307 | .drvtype_bit = PINGROUP_BIT_##drvtype(13), \ |
---|
.. | .. |
---|
1325 | 1316 | .slwr_width = slwr_w, \ |
---|
1326 | 1317 | .slwf_bit = slwf_b, \ |
---|
1327 | 1318 | .slwf_width = slwf_w, \ |
---|
| 1319 | + .parked_bitmask = BIT(5), \ |
---|
1328 | 1320 | } |
---|
1329 | 1321 | |
---|
1330 | | -#define DRV_PINGROUP(pg_name, r, drvdn_b, drvdn_w, drvup_b, drvup_w, \ |
---|
1331 | | - slwr_b, slwr_w, slwf_b, slwf_w) \ |
---|
| 1322 | +#define DRV_PINGROUP(pg_name, r, prk_mask, drvdn_b, drvdn_w, drvup_b, \ |
---|
| 1323 | + drvup_w, slwr_b, slwr_w, slwf_b, slwf_w) \ |
---|
1332 | 1324 | { \ |
---|
1333 | 1325 | .name = "drive_" #pg_name, \ |
---|
1334 | 1326 | .pins = drive_##pg_name##_pins, \ |
---|
.. | .. |
---|
1343 | 1335 | .rcv_sel_bit = -1, \ |
---|
1344 | 1336 | .drv_reg = DRV_PINGROUP_REG(r), \ |
---|
1345 | 1337 | .drv_bank = 0, \ |
---|
1346 | | - .parked_bit = -1, \ |
---|
1347 | 1338 | .hsm_bit = -1, \ |
---|
1348 | 1339 | .schmitt_bit = -1, \ |
---|
1349 | 1340 | .lpmd_bit = -1, \ |
---|
.. | .. |
---|
1356 | 1347 | .slwf_bit = slwf_b, \ |
---|
1357 | 1348 | .slwf_width = slwf_w, \ |
---|
1358 | 1349 | .drvtype_bit = -1, \ |
---|
| 1350 | + .parked_bitmask = prk_mask, \ |
---|
1359 | 1351 | } |
---|
1360 | 1352 | |
---|
1361 | 1353 | static const struct tegra_pingroup tegra210_groups[] = { |
---|
.. | .. |
---|
1523 | 1515 | PINGROUP(pz4, SDMMC1, RSVD1, RSVD2, RSVD3, 0x328c, N, N, N, -1, -1, -1, -1, -1, -1, -1, -1, -1), |
---|
1524 | 1516 | PINGROUP(pz5, SOC, RSVD1, RSVD2, RSVD3, 0x3290, N, N, N, -1, -1, -1, -1, -1, -1, -1, -1, -1), |
---|
1525 | 1517 | |
---|
1526 | | - /* pg_name, r, drvdn_b, drvdn_w, drvup_b, drvup_w, slwr_b, slwr_w, slwf_b, slwf_w */ |
---|
1527 | | - DRV_PINGROUP(pa6, 0x9c0, 12, 5, 20, 5, -1, -1, -1, -1), |
---|
1528 | | - DRV_PINGROUP(pcc7, 0x9c4, 12, 5, 20, 5, -1, -1, -1, -1), |
---|
1529 | | - DRV_PINGROUP(pe6, 0x9c8, 12, 5, 20, 5, -1, -1, -1, -1), |
---|
1530 | | - DRV_PINGROUP(pe7, 0x9cc, 12, 5, 20, 5, -1, -1, -1, -1), |
---|
1531 | | - DRV_PINGROUP(ph6, 0x9d0, 12, 5, 20, 5, -1, -1, -1, -1), |
---|
1532 | | - DRV_PINGROUP(pk0, 0x9d4, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
1533 | | - DRV_PINGROUP(pk1, 0x9d8, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
1534 | | - DRV_PINGROUP(pk2, 0x9dc, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
1535 | | - DRV_PINGROUP(pk3, 0x9e0, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
1536 | | - DRV_PINGROUP(pk4, 0x9e4, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
1537 | | - DRV_PINGROUP(pk5, 0x9e8, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
1538 | | - DRV_PINGROUP(pk6, 0x9ec, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
1539 | | - DRV_PINGROUP(pk7, 0x9f0, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
1540 | | - DRV_PINGROUP(pl0, 0x9f4, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
1541 | | - DRV_PINGROUP(pl1, 0x9f8, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
1542 | | - DRV_PINGROUP(pz0, 0x9fc, 12, 7, 20, 7, -1, -1, -1, -1), |
---|
1543 | | - DRV_PINGROUP(pz1, 0xa00, 12, 7, 20, 7, -1, -1, -1, -1), |
---|
1544 | | - DRV_PINGROUP(pz2, 0xa04, 12, 7, 20, 7, -1, -1, -1, -1), |
---|
1545 | | - DRV_PINGROUP(pz3, 0xa08, 12, 7, 20, 7, -1, -1, -1, -1), |
---|
1546 | | - DRV_PINGROUP(pz4, 0xa0c, 12, 7, 20, 7, -1, -1, -1, -1), |
---|
1547 | | - DRV_PINGROUP(pz5, 0xa10, 12, 7, 20, 7, -1, -1, -1, -1), |
---|
1548 | | - DRV_PINGROUP(sdmmc1, 0xa98, 12, 7, 20, 7, 28, 2, 30, 2), |
---|
1549 | | - DRV_PINGROUP(sdmmc2, 0xa9c, 2, 6, 8, 6, 28, 2, 30, 2), |
---|
1550 | | - DRV_PINGROUP(sdmmc3, 0xab0, 12, 7, 20, 7, 28, 2, 30, 2), |
---|
1551 | | - DRV_PINGROUP(sdmmc4, 0xab4, 2, 6, 8, 6, 28, 2, 30, 2), |
---|
| 1518 | + /* pg_name, r, prk_mask, drvdn_b, drvdn_w, drvup_b, drvup_w, slwr_b, slwr_w, slwf_b, slwf_w */ |
---|
| 1519 | + DRV_PINGROUP(pa6, 0x9c0, 0x0, 12, 5, 20, 5, -1, -1, -1, -1), |
---|
| 1520 | + DRV_PINGROUP(pcc7, 0x9c4, 0x0, 12, 5, 20, 5, -1, -1, -1, -1), |
---|
| 1521 | + DRV_PINGROUP(pe6, 0x9c8, 0x0, 12, 5, 20, 5, -1, -1, -1, -1), |
---|
| 1522 | + DRV_PINGROUP(pe7, 0x9cc, 0x0, 12, 5, 20, 5, -1, -1, -1, -1), |
---|
| 1523 | + DRV_PINGROUP(ph6, 0x9d0, 0x0, 12, 5, 20, 5, -1, -1, -1, -1), |
---|
| 1524 | + DRV_PINGROUP(pk0, 0x9d4, 0x0, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
| 1525 | + DRV_PINGROUP(pk1, 0x9d8, 0x0, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
| 1526 | + DRV_PINGROUP(pk2, 0x9dc, 0x0, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
| 1527 | + DRV_PINGROUP(pk3, 0x9e0, 0x0, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
| 1528 | + DRV_PINGROUP(pk4, 0x9e4, 0x0, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
| 1529 | + DRV_PINGROUP(pk5, 0x9e8, 0x0, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
| 1530 | + DRV_PINGROUP(pk6, 0x9ec, 0x0, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
| 1531 | + DRV_PINGROUP(pk7, 0x9f0, 0x0, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
| 1532 | + DRV_PINGROUP(pl0, 0x9f4, 0x0, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
| 1533 | + DRV_PINGROUP(pl1, 0x9f8, 0x0, -1, -1, -1, -1, 28, 2, 30, 2), |
---|
| 1534 | + DRV_PINGROUP(pz0, 0x9fc, 0x0, 12, 7, 20, 7, -1, -1, -1, -1), |
---|
| 1535 | + DRV_PINGROUP(pz1, 0xa00, 0x0, 12, 7, 20, 7, -1, -1, -1, -1), |
---|
| 1536 | + DRV_PINGROUP(pz2, 0xa04, 0x0, 12, 7, 20, 7, -1, -1, -1, -1), |
---|
| 1537 | + DRV_PINGROUP(pz3, 0xa08, 0x0, 12, 7, 20, 7, -1, -1, -1, -1), |
---|
| 1538 | + DRV_PINGROUP(pz4, 0xa0c, 0x0, 12, 7, 20, 7, -1, -1, -1, -1), |
---|
| 1539 | + DRV_PINGROUP(pz5, 0xa10, 0x0, 12, 7, 20, 7, -1, -1, -1, -1), |
---|
| 1540 | + DRV_PINGROUP(sdmmc1, 0xa98, 0x0, 12, 7, 20, 7, 28, 2, 30, 2), |
---|
| 1541 | + DRV_PINGROUP(sdmmc2, 0xa9c, 0x7ffc000, 2, 6, 8, 6, 28, 2, 30, 2), |
---|
| 1542 | + DRV_PINGROUP(sdmmc3, 0xab0, 0x0, 12, 7, 20, 7, 28, 2, 30, 2), |
---|
| 1543 | + DRV_PINGROUP(sdmmc4, 0xab4, 0x7ffc000, 2, 6, 8, 6, 28, 2, 30, 2), |
---|
1552 | 1544 | }; |
---|
1553 | 1545 | |
---|
1554 | 1546 | static const struct tegra_pinctrl_soc_data tegra210_pinctrl = { |
---|
1555 | 1547 | .ngpios = NUM_GPIOS, |
---|
1556 | | - .gpio_compatible = "nvidia,tegra30-gpio", |
---|
| 1548 | + .gpio_compatible = "nvidia,tegra210-gpio", |
---|
1557 | 1549 | .pins = tegra210_pins, |
---|
1558 | 1550 | .npins = ARRAY_SIZE(tegra210_pins), |
---|
1559 | 1551 | .functions = tegra210_functions, |
---|
.. | .. |
---|
1579 | 1571 | .driver = { |
---|
1580 | 1572 | .name = "tegra210-pinctrl", |
---|
1581 | 1573 | .of_match_table = tegra210_pinctrl_of_match, |
---|
| 1574 | + .pm = &tegra_pinctrl_pm, |
---|
1582 | 1575 | }, |
---|
1583 | 1576 | .probe = tegra210_pinctrl_probe, |
---|
1584 | 1577 | }; |
---|