summaryrefslogtreecommitdiff
path: root/sys/dev/ofw
AgeCommit message (Collapse)Author
2018-10-23Fix OFW GPIO regulator by breaking out of the loop once the correctPatrick Wildt
match has been found. Otherwise the error condition will always be true. ok kettenis@
2018-08-28avoid uninitialised variable useJonathan Gray
ok patrick@ kettenis@
2018-08-13Support GPIO-based voltage regulators.Patrick Wildt
ok kettenis@
2018-08-05Fix typo that caused us to misassign parents.Mark Kettenis
ok patrick@
2018-08-02Add delay when increasing the voltage of a regulator that has aMark Kettenis
"regulator-ramp-delay" property to guerantee that the target voltage has been reached when regulator_set_voltage(9) returns. ok patrick@
2018-06-03Change the set_parent() interface to pass the full parent specificationMark Kettenis
(including the phandle). ok patrick@
2018-05-04Add a common rules file for ofw sources to help keep the configurationsVisa Hankala
of fdt-enabled platforms in sync. OK deraadt@
2018-05-03Add an API to configure clocks to specific pre-assigned values. ThesePatrick Wildt
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@
2018-05-02Implement a power domain framework to turn on/off so-called powerPatrick Wildt
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@
2018-04-02Implement a regmap lookup by compatible since unfortunately not allPatrick Wildt
regmaps are referenced by nodes or phandles. ok kettenis@
2018-03-21Register regmap regardless of whether the node has a "phandle" property.Mark Kettenis
ok patrick@, visa@
2018-01-03Add remap_bynode() since I use it in the rkpcie(4) implementation.Mark Kettenis
2017-12-27Implement OF_getpropint64().Mark Kettenis
ok jca@, tom@, patrick@, visa@
2017-12-18Add support for enabling registered regulators. Make sure that we leaveMark Kettenis
regulators with a "regulator-always-on" property alone. ok patrick@
2017-12-16Enforce voltage limits from the device tree. Enforcing the limits alsoMark Kettenis
happens when regulators are registered. As a consequence they will be properly initialized even when the firmware doesn't do that. ok patrick@
2017-11-18Extend regulator "framework" with functions to get/set voltages.Mark Kettenis
ok jsg@
2017-11-18Extend regulator "framework" with functions to get/set voltages.Mark Kettenis
ok jsg@
2017-11-17Make OF_getnodebyname() scan its child nodes instead of its peer nodes.Mark Kettenis
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@
2017-05-05Include <dev/ofw/ofw_misc.h> instead of <dev/ofw/ofw_pinctrl.h>.Mark Kettenis
2017-03-12Introduce OF_getindex() API and use it to replace multiple instances ofMark Kettenis
pretty much identical code. ok visa@
2017-03-09Add a "regmap" interface that allows devices to provide access to theirMark Kettenis
registers to devices that live elsewhere in the device tree. ok patrick@
2016-08-27Return -1 if we try to set the frequency of a clock but couldn't find it.Mark Kettenis
2016-08-23Add functions to assert/deassert all reset signals for a device.Mark Kettenis
2016-08-23Actually make fdt_find_node() return NULL if the node couldn't be found.Mark Kettenis
ok tom@
2016-08-22Fix two small bugs in the new reset API code.Mark Kettenis
2016-08-22Add an API to set the clock frequency.Mark Kettenis
2016-08-22Add a reset signal API alongside the clock API.Mark Kettenis
2016-08-22Implement interfaces to disable clocks and add interfaces that enable orMark Kettenis
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).
2016-08-21Add a minimal clock "framework". Build it on armv7.Mark Kettenis
ok patrick@
2016-08-21Fix a pasto in a comment.Mark Kettenis
2016-08-13Add a minimal regulator "framework".Mark Kettenis
ok jsg@, patrick@
2016-08-06Add a generic pinctrl "framework".Mark Kettenis
ok patrick@
2016-07-27Add interface to facilitate iterating over gpios.Mark Kettenis
ok patrick@
2016-07-26Rename struct fdt_memory to fdt_reg to match the member namePatrick Wildt
used in the fdt attach args and the device tree. ok kettenis@
2016-07-11Add a simple framework for handling gpio controllers and pins on FDT-enabledMark Kettenis
platforms. ok visa@, jsg@
2016-07-09Add interfaces to look up a device tree node by phandle.Mark Kettenis
ok patrick@, jsg@, visa@
2016-07-08Fix check for "name" property. Restores synthesised "name" proprties inMark Kettenis
eeprom -p output that were lost in revision 1.13.
2016-06-29Make the fdt parser skip nop tokens. This is needed on someVisa Hankala
octeon boards. Feedback and ok kettenis@
2016-06-14Make sure OF_getprop() returns the proper length for a synthesised "name"Mark Kettenis
property. From Tom Cosgrove.
2016-06-14Make fdt_node_property() return -1 if the requested property can't be foundMark Kettenis
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@
2016-06-12Add OF_getpropint() and OF_getpropintarray().Mark Kettenis
ok visa@, jsg@
2016-06-08Use fdt to find the console to initialise. Try to use /chosen/stdout-pathJonathan Gray
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.
2016-05-21Implement openprom(4) for armv7.Mark Kettenis
ok deraadt@
2016-05-16Introduce OF_is_compatible(9), a convenience function to check the "compatible"Mark Kettenis
property of an OFW/FDT node. ok deraadt@, pactrick@
2016-04-06Convert memory extract routine to return errno-based errors.Patrick Wildt
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@
2016-04-06Add support for bus space translation.Patrick Wildt
The ranges property can be used to translate from one address space to another. This means that we cannot just use a controllers's reg property to get the physical address, but have to use its parent's ranges attribute to translate the address to another. ok kettenis@
2016-04-03Remove erroneous whitespace added in previous change.Patrick Wildt
2016-04-03Implement a way to extract memory information from a node. This can bePatrick Wildt
used to extract information about how much RAM is available or where a controller is in the address space and how big its IO space is. Add a way to get the device tree's size. This is helpful to find out how much you need to copy if you want to move the tree somewhere else. Also add helpers to easily retrieve integers from a property. ok jsg@
2016-04-03The callers of fdt_next_node() expect it to return NULL if a next nodePatrick Wildt
cannot be found. Due to implementation details, it used to return a pointer to the next node, without checking if it actually exists. Modify fdt_next_node() to only return a next node if it actually exists and implement an internal skip_node() function that keeps the previous behaviour. ok mpi@
2016-03-17Do not iterate all over the tree if OF_parent() is called on the rootMartin Pieuchot
node. The root is the root, it has no parent. From Patrick Wildt.