CM3: Bump firmware release version to 0x190
This version, 0x190, includes the following changes:
- Correction to interrupt clearing and disabling
- Bug fix that caused AM335x CPUIdle to hang
- Bug fix that caused AM335x SK EVM to hang on GPIO wake
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
This version, 0x190, includes the following changes:
- Correction to interrupt clearing and disabling
- Bug fix that caused AM335x CPUIdle to hang
- Bug fix that caused AM335x SK EVM to hang on GPIO wake
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Fix GPIO wake hang on platforms using GPIO0 VTT Toggle
Some platforms, like AM335x SK EVM, use a GPIO0 pin to toggle a VTT
regulator on the board. If a GPIO wake event occurs on one of these
platforms then during the VTT regulator re-enable during resume the
interrupt from the GPIO wake will now be pending for MPU. Because of
this, disabling the GPIO after VTT re-enable would cause a kernel hang
as kernel immediately received IRQ from GPIO0 before the kernel is able
to enable the hwmod at whcih time it would normally get the pending IRQ.
We can avoid this by leaving GPIO0 enabled after reenabling VTT GPIO0
pin. AM335x SK EVM is the only board currently using this so no other
platforms will be affected.
Some platforms, like AM335x SK EVM, use a GPIO0 pin to toggle a VTT
regulator on the board. If a GPIO wake event occurs on one of these
platforms then during the VTT regulator re-enable during resume the
interrupt from the GPIO wake will now be pending for MPU. Because of
this, disabling the GPIO after VTT re-enable would cause a kernel hang
as kernel immediately received IRQ from GPIO0 before the kernel is able
to enable the hwmod at whcih time it would normally get the pending IRQ.
We can avoid this by leaving GPIO0 enabled after reenabling VTT GPIO0
pin. AM335x SK EVM is the only board currently using this so no other
platforms will be affected.
CM3: Fix deep_sleep bit field definition
This patch changes size of res1 member of deep_sleep struct back to two
bits rather than one as changed in commit d7803c4a10 ("CM3: Add
additional bit for prcm int16"). When set to one a strange bit shift is
seen in wake_sources member causing incorrect wake sources to be defined
for each sleep state. Without this patch cpuidle no longer works as
MPU_WAKE bit gets incorrectly set.
This patch changes size of res1 member of deep_sleep struct back to two
bits rather than one as changed in commit d7803c4a10 ("CM3: Add
additional bit for prcm int16"). When set to one a strange bit shift is
seen in wake_sources member causing incorrect wake sources to be defined
for each sleep state. Without this patch cpuidle no longer works as
MPU_WAKE bit gets incorrectly set.
CM3: Fix low level interrupt configuration
All interrupt control (enable, disable, clear) has been done using
read/modify/write strategy, however this is incorrect. According to the
ARM Cortex-M3 Devices Generic User Guide, Section 4.2.2-5, these
registers require a write to clear a bit. Because of this, the current
code has been doing each desired action to ALL interrupts held in that
register rather than the one requested.
However, due to the use-case in place, where we never needed to clear an
interrupt when leaving others active, this never manifested as a bug.
This patch fixes interrupt control so that each call clears, enables,
or disables only the interrupt requested.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
All interrupt control (enable, disable, clear) has been done using
read/modify/write strategy, however this is incorrect. According to the
ARM Cortex-M3 Devices Generic User Guide, Section 4.2.2-5, these
registers require a write to clear a bit. Because of this, the current
code has been doing each desired action to ALL interrupts held in that
register rather than the one requested.
However, due to the use-case in place, where we never needed to clear an
interrupt when leaving others active, this never manifested as a bug.
This patch fixes interrupt control so that each call clears, enables,
or disables only the interrupt requested.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Bump firmware release version to 0x189
This version, 0x189, adds support for the following:
- IO Daisy Chain wake on am437x
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
This version, 0x189, adds support for the following:
- IO Daisy Chain wake on am437x
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Add IO wake up support
AM43XX family of processors have the IO wake up feature.
This patch adds support for enabling IO wake up.
Enable IO wake up while configuring the wake sources
and disable the same while clearing the wake sources.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
AM43XX family of processors have the IO wake up feature.
This patch adds support for enabling IO wake up.
Enable IO wake up while configuring the wake sources
and disable the same while clearing the wake sources.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Accommodate additional bit for PRCM int16 interrupt and add PRCM irq realted bit fields.
Expand wake sources mask to include prcm interrupt and add information
about PRM IRQ registers.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Expand wake sources mask to include prcm interrupt and add information
about PRM IRQ registers.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Add additional bit for prcm int16
Add another bit for prcm interrupt now that it can be a valid wake
source.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Add another bit for prcm interrupt now that it can be a valid wake
source.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Do not loop on PRCM interrupt 16
Do not loop but on the event of PRCM IO Interrupt
clear the status after handling.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Do not loop but on the event of PRCM IO Interrupt
clear the status after handling.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Add PRCM int16 as wake up source
Add PRCM int16 as wake up source.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Add PRCM int16 as wake up source.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Bump firmware release version to 0x188 (NEXT)
On next branch add this bumped firmware for updated auxdata region
On next branch add this bumped firmware for updated auxdata region
CM3: Update mem regions for auxdata support
Add auxdata region to linker script to avoid any strange issues with
auxdata being randomly overwritten. This was not a problem with previous
i2c scaling data implementation but seems to be an issue now. Also
adjust trace region to leave room for auxdata.
Add auxdata region to linker script to avoid any strange issues with
auxdata being randomly overwritten. This was not a problem with previous
i2c scaling data implementation but seems to be an issue now. Also
adjust trace region to leave room for auxdata.
CM3: Add board specific voltage scaling binaries
This CM3 firmware supports voltaeg scaling during low power modes
using i2c sequences sent to the PMIC. These sequences are both board
and PMIC specific. Add binaries containing the proper sequence to be
loaded by the software in use and copied to DMEM. Firmware still can
accept the offset of the wake and sleep sequence in IPC register 5 as
was done previously.
Currently firmware format contains 0x0C57 present as the first two
bytes followed by one byte defining offset to sleep sequence followed by
one byte defining offset to wake sequence. These can be used by software
running on MPU to facilitate loading of the sequences, which immediately
follow the offsets in the binary.
The CM3 i2c code expects each sequence to be a series of I2C transfers
in the form:
u8 length | u8 chip address | u8 byte0/reg address | u8 byte1 | u8 byteN ..
The length indicates the number of bytes to transfer, including the
register address. The length of each transfer is limited by the I2C
buffer size of 32 bytes.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
This CM3 firmware supports voltaeg scaling during low power modes
using i2c sequences sent to the PMIC. These sequences are both board
and PMIC specific. Add binaries containing the proper sequence to be
loaded by the software in use and copied to DMEM. Firmware still can
accept the offset of the wake and sleep sequence in IPC register 5 as
was done previously.
Currently firmware format contains 0x0C57 present as the first two
bytes followed by one byte defining offset to sleep sequence followed by
one byte defining offset to wake sequence. These can be used by software
running on MPU to facilitate loading of the sequences, which immediately
follow the offsets in the binary.
The CM3 i2c code expects each sequence to be a series of I2C transfers
in the form:
u8 length | u8 chip address | u8 byte0/reg address | u8 byte1 | u8 byteN ..
The length indicates the number of bytes to transfer, including the
register address. The length of each transfer is limited by the I2C
buffer size of 32 bytes.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Bump firmware release version to 0x187
This version, 0x187, adds support for the following:
- Further optimized IO DDR config on AM43xx platforms
- Remoteproc resource table for use with the linux kernel
- Standby support for am335x and am437x without any need for kernel
clockdomain control.
Implementations not using the resource table will not be affected by
this, but all future implementations within the linux kernel will use
remoteproc and require this firmware or higher.
This version, 0x187, adds support for the following:
- Further optimized IO DDR config on AM43xx platforms
- Remoteproc resource table for use with the linux kernel
- Standby support for am335x and am437x without any need for kernel
clockdomain control.
Implementations not using the resource table will not be affected by
this, but all future implementations within the linux kernel will use
remoteproc and require this firmware or higher.
CM3: clockdomain: Add standby_clkdms to enable standby
Standby mode is a higher power mode than DS0 but can have better wake
latency because PER_PD remains active and therefore does not lose
context.
Certain clockdomains may get disabled by kernel code if they are not in
use but are required for waking MPU from standby. Add functionality
to wake certain clockdomains when resuming from standby and add relevant
clockdomains for both am335x and am43xx.
Standby mode is a higher power mode than DS0 but can have better wake
latency because PER_PD remains active and therefore does not lose
context.
Certain clockdomains may get disabled by kernel code if they are not in
use but are required for waking MPU from standby. Add functionality
to wake certain clockdomains when resuming from standby and add relevant
clockdomains for both am335x and am43xx.
CM3: ddr: Improve DDR IO Config for AM437x Boards
Adjust values used for DDR IO Config on for am437x boards for better
power savings and also configure the two additional data io registers
only present on 437x.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Adjust values used for DDR IO Config on for am437x boards for better
power savings and also configure the two additional data io registers
only present on 437x.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Add resource table definition for use with remoteproc
Add a resource table so that the remoteproc framework within the Linux
kernel is able to load the firmware when the (Linux) driver probes in
order to specify where the needed memory regions are. Also add a TRACE
resource so that remoteproc can access the LOGBUF from the kernel for
debug output.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Add a resource table so that the remoteproc framework within the Linux
kernel is able to load the firmware when the (Linux) driver probes in
order to specify where the needed memory regions are. Also add a TRACE
resource so that remoteproc can access the LOGBUF from the kernel for
debug output.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: AM43XX: Add Tamper swakeup settings
Provision of swakeup from Tamper source is a new addition for
AM43XX lineup SOCs.
So, below things are implemented :-
1. Tamper entry is made into list of swakeup sources.
2. Settings inside Configure/Clear wake-up source APIs.
3. Modified handlers(specific to AM43xx) to add Tamper swakeup.
Signed-off-by: ankur <a-kishore@ti.com>
Provision of swakeup from Tamper source is a new addition for
AM43XX lineup SOCs.
So, below things are implemented :-
1. Tamper entry is made into list of swakeup sources.
2. Settings inside Configure/Clear wake-up source APIs.
3. Modified handlers(specific to AM43xx) to add Tamper swakeup.
Signed-off-by: ankur <a-kishore@ti.com>
CM3: Bump firmware release version to 0x186
This includes fixes in I2C clock rate calculation for both
AM335x and AM437x. On all platforms, incorrect
calculations led to a frequency of around 520kHz
being used. The duty cycle is also corrected from 35%
to 50%.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This includes fixes in I2C clock rate calculation for both
AM335x and AM437x. On all platforms, incorrect
calculations led to a frequency of around 520kHz
being used. The duty cycle is also corrected from 35%
to 50%.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: I2C: Fix duty cycle calculations
The duty cycle calculations were incorrect leading to a 35%
duty cycle. Rework the calculations to get a 50% duty cycle.
Tested on AM335x (BBB) and AM437x (ePOS EVM)
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
The duty cycle calculations were incorrect leading to a 35%
duty cycle. Rework the calculations to get a 50% duty cycle.
Tested on AM335x (BBB) and AM437x (ePOS EVM)
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: I2C: Fix PER CLKOUTM2 frequency calculation
Based on experimental readings of the output I2C frequency,
the method used to calculate the PER CLKOUTM2 frequency
while the PER LL is in bypass was found to be incorrect. The
TRM for both AM437x and AM335x indicate that a divisor is
applied. This was found to not be the case.
Having this divisor in the code bottoms out the SCLL and SCLH
registers and causes the I2C controller to run at the highest
possible frequency possible given the input clock. This turns
out to be ~500kHz, which isn't a problem on most platforms.
However, with the AM437x ePOS EVM, the bus is not stable at
this frequency.
Removing the assumption that this divisor is applied corrects
the calculations of the SCLL and SCLH registers leading to a
correct output frequency.
Tested on AM335x (BBB) and AM437x (ePOS EVM)
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Based on experimental readings of the output I2C frequency,
the method used to calculate the PER CLKOUTM2 frequency
while the PER LL is in bypass was found to be incorrect. The
TRM for both AM437x and AM335x indicate that a divisor is
applied. This was found to not be the case.
Having this divisor in the code bottoms out the SCLL and SCLH
registers and causes the I2C controller to run at the highest
possible frequency possible given the input clock. This turns
out to be ~500kHz, which isn't a problem on most platforms.
However, with the AM437x ePOS EVM, the bus is not stable at
this frequency.
Removing the assumption that this divisor is applied corrects
the calculations of the SCLL and SCLH registers leading to a
correct output frequency.
Tested on AM335x (BBB) and AM437x (ePOS EVM)
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: AM437x: Add XTAL calculation code and support am437x
The AM437x CONFIG_STATUS register has two places where
the master xtal frequency can be indicated, and a bit showing
where software should read the value from. Make a function
that works for both instead of open coding it in i2c.c. This
function works for both because the bit that indicates where
to read the value from is always 0 on am335x.
This was causing issues with a miscalculation of i2c fclk
frequency on AM437x.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
The AM437x CONFIG_STATUS register has two places where
the master xtal frequency can be indicated, and a bit showing
where software should read the value from. Make a function
that works for both instead of open coding it in i2c.c. This
function works for both because the bit that indicates where
to read the value from is always 0 on am335x.
This was causing issues with a miscalculation of i2c fclk
frequency on AM437x.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Update the pre-build binary to support am43xx IO isolation
Firmware version 0x185
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Firmware version 0x185
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: ddr: Only clear DDR reset line for AM335x
DDR reset line on am335x does not behave the same way as that on am43xx
so only clear it for am335x DDR3 boards.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
DDR reset line on am335x does not behave the same way as that on am43xx
so only clear it for am335x DDR3 boards.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: AM43XX Add support for IO Isolation
Allow configuration of PRCM IO Isolation control in order to put IOs
into isolation and use DS0 states of pins. Implementation based on VTT
toggle control for GPIO0. The setting of isolation is controllable from
the A9 and will only be set if bit 10 in the IPC register has been set
from the A9 processor.
This is used to control VTT regulator on AM43xx when it is not connected
to a GPIO other than GPIO0 but can be used to control other things based
on the configuration of the DS_PAD_CONFIG bits inside the CTRL_CONF_*
register corresponding to the desired pin.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Allow configuration of PRCM IO Isolation control in order to put IOs
into isolation and use DS0 states of pins. Implementation based on VTT
toggle control for GPIO0. The setting of isolation is controllable from
the A9 and will only be set if bit 10 in the IPC register has been set
from the A9 processor.
This is used to control VTT regulator on AM43xx when it is not connected
to a GPIO other than GPIO0 but can be used to control other things based
on the configuration of the DS_PAD_CONFIG bits inside the CTRL_CONF_*
register corresponding to the desired pin.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
cm3: bug-fix for cm3 version generator script
Script was incorrectly using logical OR instead of a binary one, which
resulted in the version being always 0x1 and being rejected by kernel.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Script was incorrectly using logical OR instead of a binary one, which
resulted in the version being always 0x1 and being rejected by kernel.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
cm3: License.txt: break lines at 80-characters
It makes it a lot easier to read through the file.
Signed-off-by: Felipe Balbi <balbi@ti.com>
It makes it a lot easier to read through the file.
Signed-off-by: Felipe Balbi <balbi@ti.com>
cm3: utf8-ify License.txt agreement
Original file was in some weird character-set,
by converting it to UTF-8, we make sure more
readers are able to read it.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Original file was in some weird character-set,
by converting it to UTF-8, we make sure more
readers are able to read it.
Signed-off-by: Felipe Balbi <balbi@ti.com>
cm3: improve Makefile a little more
after this patch, with a simple make command
we will build both new binaries and output
looks very clean, as below:
$ make
CC src/foundation/cm3.o
CC src/foundation/exception_handlers.o
CC src/foundation/ext_intr_handlers.o
CC src/foundation/rtc.o
CC src/foundation/startup.o
CC src/lib/debug.o
CC src/lib/printf.o
CC src/lib/puts.o
CC src/lib/string.o
CC src/pm_services/clockdomain.o
CC src/pm_services/clockdomain_335x.o
CC src/pm_services/clockdomain_43xx.o
CC src/pm_services/ddr.o
CC src/pm_services/dpll.o
CC src/pm_services/dpll_335x.o
CC src/pm_services/dpll_43xx.o
CC src/pm_services/hwmod.o
CC src/pm_services/hwmod_335x.o
CC src/pm_services/hwmod_43xx.o
CC src/pm_services/i2c.o
CC src/pm_services/ldo.o
CC src/pm_services/ldo_335x.o
CC src/pm_services/ldo_43xx.o
CC src/pm_services/pm_handlers.o
CC src/pm_services/powerdomain.o
CC src/pm_services/powerdomain_335x.o
CC src/pm_services/pm_state_data.o
CC src/pm_services/powerdomain_43xx.o
CC src/pm_services/prcm_core.o
CC src/sys_exec/msg.o
CC src/sys_exec/sync.o
CC src/sys_exec/sys_init.o
CC src/sys_exec/trace.o
LINK am335x-pm-firmware.elf
GEN am335x-pm-firmware.bin
Signed-off-by: Felipe Balbi <balbi@ti.com>
after this patch, with a simple make command
we will build both new binaries and output
looks very clean, as below:
$ make
CC src/foundation/cm3.o
CC src/foundation/exception_handlers.o
CC src/foundation/ext_intr_handlers.o
CC src/foundation/rtc.o
CC src/foundation/startup.o
CC src/lib/debug.o
CC src/lib/printf.o
CC src/lib/puts.o
CC src/lib/string.o
CC src/pm_services/clockdomain.o
CC src/pm_services/clockdomain_335x.o
CC src/pm_services/clockdomain_43xx.o
CC src/pm_services/ddr.o
CC src/pm_services/dpll.o
CC src/pm_services/dpll_335x.o
CC src/pm_services/dpll_43xx.o
CC src/pm_services/hwmod.o
CC src/pm_services/hwmod_335x.o
CC src/pm_services/hwmod_43xx.o
CC src/pm_services/i2c.o
CC src/pm_services/ldo.o
CC src/pm_services/ldo_335x.o
CC src/pm_services/ldo_43xx.o
CC src/pm_services/pm_handlers.o
CC src/pm_services/powerdomain.o
CC src/pm_services/powerdomain_335x.o
CC src/pm_services/pm_state_data.o
CC src/pm_services/powerdomain_43xx.o
CC src/pm_services/prcm_core.o
CC src/sys_exec/msg.o
CC src/sys_exec/sync.o
CC src/sys_exec/sys_init.o
CC src/sys_exec/trace.o
LINK am335x-pm-firmware.elf
GEN am335x-pm-firmware.bin
Signed-off-by: Felipe Balbi <balbi@ti.com>
cm3: generate version number from Makefile
This will make it a lot easier to make releases
out of this source code.
In order to make sure we're using the same version
number, this patch also changes Makefile to use
version 0x184.
Signed-off-by: Felipe Balbi <balbi@ti.com>
This will make it a lot easier to make releases
out of this source code.
In order to make sure we're using the same version
number, this patch also changes Makefile to use
version 0x184.
Signed-off-by: Felipe Balbi <balbi@ti.com>
cm3: add a script to generate version number
This way we can fix version number in Makefile
only.
Signed-off-by: Felipe Balbi <balbi@ti.com>
This way we can fix version number in Makefile
only.
Signed-off-by: Felipe Balbi <balbi@ti.com>
cm3: add tags and *.diff to .gitignore
few extra files which should be ignored.
Signed-off-by: Felipe Balbi <balbi@ti.com>
few extra files which should be ignored.
Signed-off-by: Felipe Balbi <balbi@ti.com>
cm3: pretty print build sequence
This will make it a lot cleaner to look at
build output.
sample output:
$ make
CC src/foundation/cm3.o
CC src/foundation/exception_handlers.o
CC src/foundation/ext_intr_handlers.o
CC src/foundation/rtc.o
CC src/foundation/startup.o
CC src/lib/debug.o
CC src/lib/printf.o
CC src/lib/puts.o
CC src/lib/string.o
CC src/pm_services/clockdomain.o
CC src/pm_services/clockdomain_335x.o
CC src/pm_services/clockdomain_43xx.o
CC src/pm_services/ddr.o
CC src/pm_services/dpll.o
CC src/pm_services/dpll_335x.o
CC src/pm_services/dpll_43xx.o
CC src/pm_services/hwmod.o
CC src/pm_services/hwmod_335x.o
CC src/pm_services/hwmod_43xx.o
CC src/pm_services/i2c.o
CC src/pm_services/ldo.o
CC src/pm_services/ldo_335x.o
CC src/pm_services/ldo_43xx.o
CC src/pm_services/pm_handlers.o
CC src/pm_services/pm_state_data.o
CC src/pm_services/powerdomain.o
CC src/pm_services/powerdomain_335x.o
CC src/pm_services/powerdomain_43xx.o
CC src/pm_services/prcm_core.o
CC src/sys_exec/msg.o
CC src/sys_exec/sync.o
CC src/sys_exec/sys_init.o
CC src/sys_exec/trace.o
LINK am335x-pm-firmware.elf
Signed-off-by: Felipe Balbi <balbi@ti.com>
This will make it a lot cleaner to look at
build output.
sample output:
$ make
CC src/foundation/cm3.o
CC src/foundation/exception_handlers.o
CC src/foundation/ext_intr_handlers.o
CC src/foundation/rtc.o
CC src/foundation/startup.o
CC src/lib/debug.o
CC src/lib/printf.o
CC src/lib/puts.o
CC src/lib/string.o
CC src/pm_services/clockdomain.o
CC src/pm_services/clockdomain_335x.o
CC src/pm_services/clockdomain_43xx.o
CC src/pm_services/ddr.o
CC src/pm_services/dpll.o
CC src/pm_services/dpll_335x.o
CC src/pm_services/dpll_43xx.o
CC src/pm_services/hwmod.o
CC src/pm_services/hwmod_335x.o
CC src/pm_services/hwmod_43xx.o
CC src/pm_services/i2c.o
CC src/pm_services/ldo.o
CC src/pm_services/ldo_335x.o
CC src/pm_services/ldo_43xx.o
CC src/pm_services/pm_handlers.o
CC src/pm_services/pm_state_data.o
CC src/pm_services/powerdomain.o
CC src/pm_services/powerdomain_335x.o
CC src/pm_services/powerdomain_43xx.o
CC src/pm_services/prcm_core.o
CC src/sys_exec/msg.o
CC src/sys_exec/sync.o
CC src/sys_exec/sys_init.o
CC src/sys_exec/trace.o
LINK am335x-pm-firmware.elf
Signed-off-by: Felipe Balbi <balbi@ti.com>
cm3: Makefile doesn't need execute permission
No functional changes, just a chmod.
Signed-off-by: Felipe Balbi <balbi@ti.com>
No functional changes, just a chmod.
Signed-off-by: Felipe Balbi <balbi@ti.com>
CM3: Version 0x184 - Additional am43xx support
Firmware version 0x184
This adds several fixes and improvements for am43xx.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Firmware version 0x184
This adds several fixes and improvements for am43xx.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: AM43XX: Add missing hwmods
IEEE5000 and OCPWP added to list of essential hwmods to idle before
attempting DS0 entry.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
IEEE5000 and OCPWP added to list of essential hwmods to idle before
attempting DS0 entry.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: AM43XX: Add state data to shut off upper OCMC during DS0
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: AM43XX: powerdomain: Add ability to shut off upper OCMC
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: AM43XX: Allow CORE_SRAM_LDO to be put in retention
Same core_sram_ldo code will work for am43xx as well so add it to check
before running code.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Same core_sram_ldo code will work for am43xx as well so add it to check
before running code.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: AM43XX: Update ds save and restore functions
ds_save and ds_restore do not need to be only run for am33xx, same
functions will work for am43xx as well.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
ds_save and ds_restore do not need to be only run for am33xx, same
functions will work for am43xx as well.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: AM43XX: Add DDR ioconfig for LPDDR2
Add adjusted values to configure DDR IOs for LPDDR2 on AM43xx.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Add adjusted values to configure DDR IOs for LPDDR2 on AM43xx.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: AM43XX: Add PLL registers and bits
Add proper data to allow for power down and bypass of AM43xx plls.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Add proper data to allow for power down and bypass of AM43xx plls.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: AM43XX: Cleanup AM43XX clockdomains
Some clockdomains did not apply to AM43XX that were present on AM33XX
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Some clockdomains did not apply to AM43XX that were present on AM33XX
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Add timeouts for hwmod enable and disable
If a hwmod cannot be enabled or disabled, timeout eventually and
continue. Timeout will be reflected in kernel error message due to
powerdomain not transitioning.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
If a hwmod cannot be enabled or disabled, timeout eventually and
continue. Timeout will be reflected in kernel error message due to
powerdomain not transitioning.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Fix A8 Parameter Mask
VTT GPIO PIN parameter is 6 bits and so the mask should be 0x3f & not
0x2f.
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
VTT GPIO PIN parameter is 6 bits and so the mask should be 0x3f & not
0x2f.
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Bump version and update the pre-built binary for I2C fixes
Firmware version 0x183
The I2C suspend/resume write code had a couple bugs. One could cause a crash
on resume in the kernel, the other could cause a failure to resume due to the
resume sequence being sent out too fast.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Firmware version 0x183
The I2C suspend/resume write code had a couple bugs. One could cause a crash
on resume in the kernel, the other could cause a failure to resume due to the
resume sequence being sent out too fast.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: I2C: Move wake_handler to before the re-enabling of DPLLs
The wake handler calculates frequencies assuming the DPLL is in
bypass.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
The wake handler calculates frequencies assuming the DPLL is in
bypass.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: I2C: Restore SCLH register properly
Add debug support
CM3: Leave I2C IP block the way we found it
If we forcibly disable the HWMOD and the kernel expects it to be active, a
crash will occur. Save the original state and put it back properly. Additionally,
don't muck with the state at all if we don't need to.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
If we forcibly disable the HWMOD and the kernel expects it to be active, a
crash will occur. Save the original state and put it back properly. Additionally,
don't muck with the state at all if we don't need to.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Add hwmod_is_enabled check
This is needed so that if a IP block (such as I2C) is needed by the CM3 firmware,
it can be put back to its original state.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This is needed so that if a IP block (such as I2C) is needed by the CM3 firmware,
it can be put back to its original state.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Update the pre-built binary with V2 command support
Firmware version 0x182
- V2 command support
- AM437X - Basic DS0 support
- I2C sleep/wake sequence support
- Return wakeup reason
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Firmware version 0x182
- V2 command support
- AM437X - Basic DS0 support
- I2C sleep/wake sequence support
- Return wakeup reason
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
AM335X: CM3: Add CPU idle handlers.
This commit adds support for CPU idle modes. The wake source used during
CPU idle is MPU_WAKE so more of the SoC needs to be running as compared
to deep sleep modes.
Signed-off-by: Russ Dill <russ.dill@ti.com>
This commit adds support for CPU idle modes. The wake source used during
CPU idle is MPU_WAKE so more of the SoC needs to be running as compared
to deep sleep modes.
Signed-off-by: Russ Dill <russ.dill@ti.com>
CM3: Remove redundant rtc_timeout_val range check.
The rtc_timeout_val field is 4 bits long. The RTC_TIMEOUT_MAX
val is 0xf. The field can never contain a value larger than 0xf.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
The rtc_timeout_val field is 4 bits long. The RTC_TIMEOUT_MAX
val is 0xf. The field can never contain a value larger than 0xf.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Only re-enable master oscillator if it was disabled.
This prepares the generic_wake_handler function to be shared by
cpu idle.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This prepares the generic_wake_handler function to be shared by
cpu idle.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Reset IPC param registers at firmware boot
This prevents stale or uninitialized values from causing the I2C
code to think something is there.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This prevents stale or uninitialized values from causing the I2C
code to think something is there.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move memory config globals to msg.c
There should really only be one declaration for globals.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
There should really only be one declaration for globals.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Remove unnecessary include statements.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Remove now unused bits from prm335x.h
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Add functionality to powerdomain to read current state.
This allows pm_handlers to not include any am335x headers.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This allows pm_handlers to not include any am335x headers.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move LDO register bits from prm335x.h to ldo.c
This allows ldo.c to not include any am335x or am43xx
specific headers.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This allows ldo.c to not include any am335x or am43xx
specific headers.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
AM335x: CM3: Rename prmam335x.h to prm335x.h for consistency.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Break apart prcm.h
This breaks prcm.h into cm335x.h and cm43xx.h. This matches more closely
with the linux kernel and keeps am335x and am43xx defines separated.
Move the DPLL defines from prcm.h into dpll.c.
Move the DDR defines into ddr.c.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This breaks prcm.h into cm335x.h and cm43xx.h. This matches more closely
with the linux kernel and keeps am335x and am43xx defines separated.
Move the DPLL defines from prcm.h into dpll.c.
Move the DDR defines into ddr.c.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Get div for I2C from dpll helper functions.
This eliminates the need for i2c.c to know the DPLL_PERIPH
address.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This eliminates the need for i2c.c to know the DPLL_PERIPH
address.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Remove unused system_am335.c
This code has been sitting as a skeleton since initial checkin,
if someone wants to fill it in, it'll still be in the git history.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This code has been sitting as a skeleton since initial checkin,
if someone wants to fill it in, it'll still be in the git history.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Rename device_am335x.h device_common.h
Now that device_am335x only contains macros that are common
between am335x and am43xx, rename it to reflect such.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Now that device_am335x only contains macros that are common
between am335x and am43xx, rename it to reflect such.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Rename constants that are CM3 specific to a CM3 namespace.
The interrupt numbers and internal memory areas are the same on
both am43xx and am335x. Name them as CM3_ and not AM335X_
and put them in a device_cm3.h header.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
The interrupt numbers and internal memory areas are the same on
both am43xx and am335x. Name them as CM3_ and not AM335X_
and put them in a device_cm3.h header.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move RTC regs from device_am335x.h to rtc.h
These aren't SoC specific, so move them into rtc.h
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
These aren't SoC specific, so move them into rtc.h
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move I2C reg offsets from device_am335x to i2c.c
These aren't SoC specific, so move them into i2c.c
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
These aren't SoC specific, so move them into i2c.c
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move usage of RTCSS_BASE into rtc.c
This will make it easier to support an rtc with a different
address, as may be the case we am43xx.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This will make it easier to support an rtc with a different
address, as may be the case we am43xx.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Breakout IO functions into separate header.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Rename GPIO_BASE to GPIO0_BASE.
Reflect properly that this is just the first GPIO bank.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Reflect properly that this is just the first GPIO bank.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Remove un-required includes of system_am335.h
Now that system_am335 just has stuff specific to system_am335.c,
we can remove a bunch of includes to it from the codebase.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Now that system_am335 just has stuff specific to system_am335.c,
we can remove a bunch of includes to it from the codebase.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move prototypes from system_am335 to i2c.h
Move i2c.c prototypes from system_am335.h to i2c.h.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Move i2c.c prototypes from system_am335.h to i2c.h.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move prototypes from system_am335 to rtc.h
Move rtc.c prototypes from system_am335.h to rtc.h.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Move rtc.c prototypes from system_am335.h to rtc.h.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move prototypes from system_am335 to sync.h
Move sync.c prototypes from system_am335 to sync.h.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Move sync.c prototypes from system_am335 to sync.h.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move prototypes from system_am335 to trace.h
Move prototypes specific to trace.c from system_am335.h
to trace.h.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Move prototypes specific to trace.c from system_am335.h
to trace.h.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move things from system_am335 to pm_handlers.h
Move prototypes and macros related to pm_handlers.c from
system_am335x.h into pm_handlers.h
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Move prototypes and macros related to pm_handlers.c from
system_am335x.h into pm_handlers.h
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move relevant prototypes from system_am335 to prcm_core.h
Move prototypes and variables that are relevant for prcm_core.c from
system_am335.h to prcm_core.h.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Move prototypes and variables that are relevant for prcm_core.c from
system_am335.h to prcm_core.h.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move BITBAND defines for WAKE into prcm_core.c
They are only used in prcm_core.c, so move them there.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
They are only used in prcm_core.c, so move them there.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Remove unused variables and macros from system_am335x.h
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Create msg.h header for msg.c
Collect together the function prototypes, structs, and macros associated with
msg.c into an msg.h header.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Collect together the function prototypes, structs, and macros associated with
msg.c into an msg.h header.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Rename low_power.h to prcm_core.h to match c file.
This makes the codebase easier to follow.
Also, remove the header from places it isn't needed.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This makes the codebase easier to follow.
Also, remove the header from places it isn't needed.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Move state_data into it's own file
This reduces clutter in prcm_core.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This reduces clutter in prcm_core.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Breakout LDO data for am335x/am43xx.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Make LDO interface generic and separate am335x/am43xx
This makes the LDO interface generic and prepares for a
am335x/am43xx split. The removal of the ES1_0 check is
ok because the code that calls it already checks for that.
Future work might include a flag indicating that an LDO can
or cannot be put into retention.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This makes the LDO interface generic and prepares for a
am335x/am43xx split. The removal of the ES1_0 check is
ok because the code that calls it already checks for that.
Future work might include a flag indicating that an LDO can
or cannot be put into retention.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Breakout LDO control from prcm_core.
PRCM core is getting too big to be easily readable, break out the pieces.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
PRCM core is getting too big to be easily readable, break out the pieces.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Replace empty wrapper functions in hwmod.c with simple calls.
This increases consistency, as some hwmods have their own special
function call, and some use the hwmod_state_change interface.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This increases consistency, as some hwmods have their own special
function call, and some use the hwmod_state_change interface.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Replace empty wrapper functions in clockdomain.c for simple calls.
This introduces some consistency, as it be a bit weird to have
customized function calls for some clockdomains, but not others.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This introduces some consistency, as it be a bit weird to have
customized function calls for some clockdomains, but not others.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Rename pm_init to pm_reset to better match it's functionality.
This function is called to reset all the state values to their default.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This function is called to reset all the state values to their default.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Breakout dpll data for am335x/am43xx.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Rename am33xx_power_up/down_plls to be more generic.
Once am43xx support is more complete, this will be supported on both platforms.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Once am43xx support is more complete, this will be supported on both platforms.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Break out separate am335x/am43xx DPLL functionality further.
The am43xx support is a bit of a skeleton right now.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
The am43xx support is a bit of a skeleton right now.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Add missing DPLL reset function.
We store state, but don't reset that state on firmware reset, fix that.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
We store state, but don't reset that state on firmware reset, fix that.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Rework dpll struct to prepare for am335x/am43xx split.
Combine the information on the different parts of the DPLLs into
one struct. This will make the am335x/am43xx split easier.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Combine the information on the different parts of the DPLLs into
one struct. This will make the am335x/am43xx split easier.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Use enumeration for DPLL index
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Use clockdomain active check in rtc_enable_check.
This utilizes the new clkdm framework, keeping the IP register
addresses and accesses isolated.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This utilizes the new clkdm framework, keeping the IP register
addresses and accesses isolated.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Add check for if a clockdomain is active.
This will be used by the RTC code to check if it's clock domain
is active.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
This will be used by the RTC code to check if it's clock domain
is active.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
AM335X: CM3: Add RTC clockdomain for am335x.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
CM3: Breakout DDR functions from prcm_core.
PRCM core is getting too big to be easily readable, break out the pieces.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
PRCM core is getting too big to be easily readable, break out the pieces.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>