summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/aspeed
AgeCommit message (Collapse)Author
3 dayspinctrl: aspeed: Add AST2700 SoC1 pinconf supportBilly Tsai
The SoC1 SCU provides a bias enable bit per pin in the registers at 0x480 (setting the bit disables the bias; the pull direction is fixed in silicon) and 2-bit drive strength fields at 0x4C0 selecting 4 mA to 16 mA in 4 mA steps. The pin-to-field mapping of the drive strength registers is sparse and non-linear, so it is kept in a lookup table mirroring the Linux driver; pins without an entry reject drive-strength with -ENOTSUPP. Support the bias-disable, bias-pull-down, bias-pull-up and drive-strength properties per pin and per group, and select PINCONF so the generic pinctrl framework parses them. Signed-off-by: Billy Tsai <[email protected]>
3 dayspinctrl: aspeed: Add AST2700 SoC1 pinctrl driverBilly Tsai
Add the pinctrl driver for the AST2700 SoC1 (I/O) die. Unlike previous Aspeed generations, the SoC1 SCU assigns every pin a 4-bit multi-function selector field in a contiguous register range starting at SCU 0x400, eight pins per register. Only bits [2:0] of each field select the function; bit 3 is reserved read-only and must not be written. The driver therefore keeps per-pin group tables and per-function mux values, mirroring the Linux aspeed,ast2700-soc1-pinctrl driver, and shares the same device tree bindings: 220 pins, 238 groups and 217 functions with identical names, so pin states written for the Linux driver work unmodified. A few controls live outside the pin-indexed range and are handled as virtual pins: PCIERC2_PERST (SCU 0x908), the USB2 port C/D mode fields (SCU 0x3B0) and SGMII0 (SCU 0x47C). The gpio_request_enable hook restores a pin to GPIO by writing mux value 0, except for the ADC-capable balls W17..AB19 where function 1 selects GPIO and 0 selects the ADC input. Signed-off-by: Billy Tsai <[email protected]>
3 dayspinctrl: aspeed: Add AST2700 SoC0 pinconf supportBilly Tsai
Each GPIO18A/GPIO18B ball has its own IO control register starting at SCU 0x480, providing a 4-bit drive strength selector (3 mA to 41 mA in hardware-defined steps), a bias enable bit and a pull direction bit. Extend the group table with the pin members of the ball-backed groups so bias-disable, bias-pull-down, bias-pull-up and drive-strength properties can be applied per group as well as per pin. The routing groups (USB, JTAG, PCIe RC) have no package balls and reject pin configuration with -ENOTSUPP. Select PINCONF so the generic pinctrl framework parses the pin configuration properties. Signed-off-by: Billy Tsai <[email protected]>
3 dayspinctrl: aspeed: Add AST2700 SoC0 pinctrl driverBilly Tsai
The AST2700 is a dual-die BMC SoC: SoC0 (CPU die) and SoC1 (I/O die) each have their own SCU with independent multi-function pin controls. Add the pinctrl driver for the SoC0 die. The driver uses the generic pinctrl framework and is compatible with the Linux kernel device tree bindings, i.e. pin states are described with the same "function" and "groups" properties and the same names as the Linux aspeed,ast2700-soc0-pinctrl driver. Unlike the older AST2500/AST2600 SCUs where each signal is enabled by independent bits, the SoC0 mux selections mix single-bit enables (eMMC, VGA DDC, VB strap), multi-bit selector fields (JTAG master port select, USB2/USB3 port routing) and reset-control bits (PCIe RC PERST). Model each (function, group) pair as one register mask/value write so all of them fit a single flat table. The gpio_request_enable hook releases the GPIO18A/GPIO18B pins to GPIO mode by clearing every signal enable bit that claims the pin, matching the Linux driver behaviour. Signed-off-by: Billy Tsai <[email protected]>
2024-10-29ARM: dts: ast2600: Add SGPIO to device treeBilly Tsai
Add SGPIO DTS node and enable them for AST2600 EVB. Signed-off-by: Billy Tsai <[email protected]>
2024-10-29ARM: dts: ast2500: Add SGPIO to device treeBilly Tsai
Add SGPIO DTS node and enable it for AST2500 EVB. Signed-off-by: Billy Tsai <[email protected]>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-07pinctrl: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this driver directory and when needed add missing include files directly. Reviewed-by: Peter Robinson <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-03-01pinctrl: aspeed: add pass-through pins and siopbi/siopboIvan Mikhaylov
Add THRU0-3 and SIOPBI/SIOPBO pin groups/functions. Signed-off-by: Ivan Mikhaylov <[email protected]>
2022-09-13pinctrl: aspeed: FWSPICS1 and SPI1CS1 pin supportChin-Ting Kuo
Add FWSPICS1 and SPI1CS1 in AST2500 pinctrl group. On AST2500 EVB, FWSPICS1 can be supported by default. An extra jumper, J45, should be configured before enabling SPI1CS1. Signed-off-by: Chin-Ting Kuo <[email protected]> Reviewed-by: Cédric Le Goater <[email protected]>
2022-03-25pinctrl: Add the pinctrl setting for PWM.Billy Tsai
This patchs add the signal description array for PWM pinctrl settings. Signed-off-by: Billy Tsai <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Chia-Wei Wang <[email protected]>
2021-11-17aspeed: AST2600 Pinctrl DriverRyan Chen
This driver uses Pinctrl framework and is compatible with the Linux driver for AST2600. Signed-off-by: Ryan Chen <[email protected]> Signed-off-by: Dylan Hung <[email protected]>
2020-12-13dm: treewide: Rename auto_alloc_size members to be shorterSimon Glass
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <[email protected]>
2020-05-18common: Drop log.h from common headerSimon Glass
Move this header out of the common header. Signed-off-by: Simon Glass <[email protected]>
2019-09-05clk: aspeed: Add support for SD clockEddie James
Add code to enable the SD clock on the ast2500 SoC. Reviewed-by: Cédric Le Goater <[email protected]> Signed-off-by: Eddie James <[email protected]>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <[email protected]>
2018-04-27Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini
We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <[email protected]>
2017-05-08aspeed: AST2500 Pinctrl Driver[email protected]
This driver uses Generic Pinctrl framework and is compatible with the Linux driver for ast2500: it uses the same device tree configuration. Not all pins are supported by the driver at the moment, so it actually compatible with ast2400. In general, however, there are differences that in the future would be easier to maintain separately. Signed-off-by: Maxim Sloyko <[email protected]> Reviewed-by: Simon Glass <[email protected]>