summaryrefslogtreecommitdiffstats
path: root/sys/dev/ofw (follow)
Commit message (Collapse)AuthorAgeFilesLines
* We are allowed to enable regulators with the "regulator-always-on"patrick2019-04-301-3/+3
| | | | | | | property. The definition is that a regulator with this property should never be disabled. ok kettenis@
* Add support for current limit regulators in addition to the voltagepatrick2019-02-202-27/+143
| | | | | | | | regulators we already support. The GPIO-based regulators are rather independent of the type, we only need to know the type to check the upper and lower limits. With feedback from kettenis@
* In the voltage regulator getter we need to actually check the GPIOpatrick2019-02-181-2/+3
| | | | | | | pin before setting the "pin is high" bit in the index for the states. Otherwise the index always has all possible bits sets. ok kettenis@
* Setting a fixed voltage regulator to the voltage it is fixed topatrick2019-01-021-1/+5
| | | | | | should not throw an error. ok kettenis@
* A fixed regulator's minimum voltage attribute is called regulator-min-microvoltpatrick2019-01-021-2/+2
| | | | | | instead of regulator-min-voltage. ok kettenis@
* Fix OFW GPIO regulator by breaking out of the loop once the correctpatrick2018-10-231-2/+4
| | | | | | | match has been found. Otherwise the error condition will always be true. ok kettenis@
* avoid uninitialised variable usejsg2018-08-281-1/+2
| | | | ok patrick@ kettenis@
* Support GPIO-based voltage regulators.patrick2018-08-131-2/+118
| | | | ok kettenis@
* Fix typo that caused us to misassign parents.kettenis2018-08-051-2/+2
| | | | ok patrick@
* Add delay when increasing the voltage of a regulator that has akettenis2018-08-022-4/+17
| | | | | | | "regulator-ramp-delay" property to guerantee that the target voltage has been reached when regulator_set_voltage(9) returns. ok patrick@
* Change the set_parent() interface to pass the full parent specificationkettenis2018-06-031-6/+2
| | | | | | (including the phandle). ok patrick@
* Add a common rules file for ofw sources to help keep the configurationsvisa2018-05-041-0/+9
| | | | | | of fdt-enabled platforms in sync. OK deraadt@
* Add an API to configure clocks to specific pre-assigned values. Thesepatrick2018-05-032-2/+74
| | | | | | | | | values are defined in the device tree and make sure that all clocks needed for controller and driver operation are configured as expected. This allows modifying a clock's rate and parent. For now expect that a parent clock is on the same controller as the muxed one. ok kettenis@
* Implement a power domain framework to turn on/off so-called powerpatrick2018-05-022-0/+142
| | | | | | | domains. This mechanism is used by the newer i.MX8M SoCs so that drivers can call into ATF to supply power to e.g. a USB port. ok kettenis@
* Implement a regmap lookup by compatible since unfortunately not allpatrick2018-04-022-2/+16
| | | | | | regmaps are referenced by nodes or phandles. ok kettenis@
* Register regmap regardless of whether the node has a "phandle" property.kettenis2018-03-211-12/+8
| | | | ok patrick@, visa@
* Add remap_bynode() since I use it in the rkpcie(4) implementation.kettenis2018-01-032-2/+18
|
* Implement OF_getpropint64().kettenis2017-12-272-2/+16
| | | | ok jca@, tom@, patrick@, visa@
* Add support for enabling registered regulators. Make sure that we leavekettenis2017-12-182-11/+32
| | | | | | regulators with a "regulator-always-on" property alone. ok patrick@
* Enforce voltage limits from the device tree. Enforcing the limits alsokettenis2017-12-162-3/+21
| | | | | | | happens when regulators are registered. As a consequence they will be properly initialized even when the firmware doesn't do that. ok patrick@
* Extend regulator "framework" with functions to get/set voltages.kettenis2017-11-181-1/+15
| | | | ok jsg@
* Extend regulator "framework" with functions to get/set voltages.kettenis2017-11-181-1/+54
| | | | ok jsg@
* Make OF_getnodebyname() scan its child nodes instead of its peer nodes.kettenis2017-11-171-4/+2
| | | | | | | This still deviates from the implementation we have on macppc, but we only ever use OF_getnodebyname() to find child nodes in our tree. ok tom@, visa@
* Include <dev/ofw/ofw_misc.h> instead of <dev/ofw/ofw_pinctrl.h>.kettenis2017-05-051-2/+2
|
* Introduce OF_getindex() API and use it to replace multiple instances ofkettenis2017-03-124-94/+45
| | | | | | pretty much identical code. ok visa@
* Add a "regmap" interface that allows devices to provide access to theirkettenis2017-03-092-0/+110
| | | | | | registers to devices that live elsewhere in the device tree. ok patrick@
* Return -1 if we try to set the frequency of a clock but couldn't find it.kettenis2016-08-271-3/+3
|
* Add functions to assert/deassert all reset signals for a device.kettenis2016-08-232-2/+28
|
* Actually make fdt_find_node() return NULL if the node couldn't be found.kettenis2016-08-231-1/+4
| | | | ok tom@
* Fix two small bugs in the new reset API code.kettenis2016-08-221-3/+4
|
* Add an API to set the clock frequency.kettenis2016-08-222-2/+62
|
* Add a reset signal API alongside the clock API.kettenis2016-08-222-2/+150
|
* Implement interfaces to disable clocks and add interfaces that enable orkettenis2016-08-222-10/+48
| | | | | | disable all clocks for a device. The latter interfaces are useful for devices that have multiple clocks that don't have specific names/purposes such as sxiahci(4).
* Add a minimal clock "framework". Build it on armv7.kettenis2016-08-212-0/+251
| | | | ok patrick@
* Fix a pasto in a comment.kettenis2016-08-212-4/+4
|
* Add a minimal regulator "framework".kettenis2016-08-132-0/+105
| | | | ok jsg@, patrick@
* Add a generic pinctrl "framework".kettenis2016-08-062-0/+150
| | | | ok patrick@
* Add interface to facilitate iterating over gpios.kettenis2016-07-272-2/+16
| | | | ok patrick@
* Rename struct fdt_memory to fdt_reg to match the member namepatrick2016-07-262-18/+18
| | | | | | used in the fdt attach args and the device tree. ok kettenis@
* Add a simple framework for handling gpio controllers and pins on FDT-enabledkettenis2016-07-112-0/+129
| | | | | | platforms. ok visa@, jsg@
* Add interfaces to look up a device tree node by phandle.kettenis2016-07-093-3/+43
| | | | ok patrick@, jsg@, visa@
* Fix check for "name" property. Restores synthesised "name" proprties inkettenis2016-07-081-2/+2
| | | | eeprom -p output that were lost in revision 1.13.
* Make the fdt parser skip nop tokens. This is needed on somevisa2016-06-291-10/+25
| | | | | | octeon boards. Feedback and ok kettenis@
* Make sure OF_getprop() returns the proper length for a synthesised "name"kettenis2016-06-141-2/+4
| | | | | | property. From Tom Cosgrove.
* Make fdt_node_property() return -1 if the requested property can't be foundkettenis2016-06-141-7/+7
| | | | | | | | such that we can distinguish between non-existing properties and zero-length properties. This brings the FDT code in line with the real OFW implementations. ok jsg@
* Add OF_getpropint() and OF_getpropintarray().kettenis2016-06-122-2/+33
| | | | ok visa@, jsg@
* Use fdt to find the console to initialise. Try to use /chosen/stdout-pathjsg2016-06-082-14/+21
| | | | | | | | | if present otherwise fallback to /aliases/serial0. Don't require a platform match to run the various console init functions so the init functions will run for unknown board ids. With and ok kettenis@ on a earlier version.
* Implement openprom(4) for armv7.kettenis2016-05-211-4/+96
| | | | ok deraadt@
* Introduce OF_is_compatible(9), a convenience function to check the "compatible"kettenis2016-05-162-2/+22
| | | | | | property of an OFW/FDT node. ok deraadt@, pactrick@
* Convert memory extract routine to return errno-based errors.patrick2016-04-061-7/+7
| | | | | | | Also check that mem is not NULL, as its part of the FDT API and should make sure it's not accessing a null pointer. ok bmercer@