summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/pwm-imx233.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-16imx233: add small framework for LEDAmaury Pouly1-2/+9
It handles GPIO and PWM based LEDs, possibly with several channels (red-green LED for example). The debug allows one to play with the setting. Currently the code supports the ZEN, ZEN X-Fi, and ZEN Mozaic. Change-Id: I8c3b66e6ba21778acdb123daabb724280a7d1a4f
2016-05-28imx233: generate register headers using headergen_v2 and update code for itAmaury Pouly1-8/+16
NOTE: this commit does not introduce any change, ideally even the binary should be almost the same. I checked the disassembly by hand and there are only a few differences here and there, mostly the compiler decides to compile very close expressions slightly differently. I tried to run the new code on several targets to make sure and saw no difference. The major syntax changes of the new headers are as follows: - BF_{WR,SET,CLR} are now superpowerful and allows to set several fileds at once: BF_WR(reg, field1(value1), field2(value2), ...) - BF_CS (use like BF_WR) does a write to reg_CLR and then reg_SET instead of RMW - there is no more need for macros like BF_{WR_,SET,CLR}_V, since one can simply BF_WR with field_V(name) - the old BF_SETV macro has no trivial equivalent and is replaced with its its equivalent for BF_WR(reg_SET, ...) I also rename the register headers: "regs/regs-x.h" -> "regs/x.h" to avoid the redundant "regs". Final note: the registers were generated using the following command: ./headergen_v2 -g imx -o ../../firmware/target/arm/imx233/regs/ desc/regs-stmp3{600,700,780}.xml Change-Id: I7485e8b4315a0929a8edb63e7fa1edcaa54b1edc
2013-06-17imx233: enhance pwmAmaury Pouly1-6/+76
The current pwm interface is too low-level. Introduce a higher level setup function which directly computes the parameters from the required frequency. Change-Id: Ie95c7522e9f42492fe872203f4cab46770a9649a
2013-06-17imx233: normalise clkctrlAmaury Pouly1-2/+3
The clkctrl functions were becoming a mess. Normalise the names, get rid of the xtal derived as special case and use the same interface. Change-Id: Ib954a8d30a6bd691914b5e0d97774ec9fc560c50
2013-06-17imx233: introduce virtual pins to simplify pin setupAmaury Pouly1-6/+1
A number of pins on the imx233 are standard and manually calling functions to acquire, set function/drive/output is painful. This will become unmanageable when we will add support for the other stmp chips. Introduce the concept of virtual pin which is a way to completely describe a virtual pin (virtual because pins are muxed). Change-Id: I01b6e040945648e58e1d1abab06529c9571c5f10
2013-06-17imx233: normalise pinctrl namesAmaury Pouly1-3/+3
The current pinctrl functions were a mess. Normalise the functions names to make them shorter and clearer. Change-Id: Iac6ff84625ef2b7610268e3a5802dc0088de3167
2013-06-16imx233: rewrite pwm using new registersAmaury Pouly1-8/+6
Change-Id: Ie222f0b25f4b8af9ccf21aecd82a7f4eba40aa3c
2012-05-22imx233: have pwm code acquire configured pinsAmaury Pouly1-0/+2
Change-Id: I534cc10fbcaf1bb0e950fe2f60271008209b1122
2012-05-19imx233: add pwm driverAmaury Pouly1-0/+64
Change-Id: Ib920b119f52b492247d75e97c5ec9298146d583c