5 years agoUse -ffreestanding ti-v4.1.y 07.00.00.002 07.00.00.003 07.00.00.004 07.00.00.005 07.01.00.001 07.01.00.002 07.01.00.003 07.01.00.004 07.01.00.005 07.01.00.006 07.02.00.001 07.02.00.002 07.02.00.003 07.02.00.004 07.03.00.000 07.03.00.001 07.03.00.002 07.03.00.003 07.03.00.004 07.03.00.005 08.00.00.000 08.00.00.001 08.00.00.002 08.00.00.003 08.00.00.004 08.01.00.001 08.01.00.002 08.01.00.003 08.01.00.004 08.01.00.005 08.01.00.006 08.02.00.001 08.02.00.002 08.02.00.003 08.02.00.004 08.02.00.005 08.02.00.006 08.03.00.001 08.03.00.002 08.03.00.003 08.03.00.004 08.03.00.005 08.04.00.001 08.04.00.002 08.04.00.003 08.04.00.004 08.04.00.005 08.04.01.001 2021.00.001 2021.00.002 2021.00.003 ti2018.05 ti2019.00 ti2019.01 ti2019.01-rc3 ti2019.01-rc4 ti2019.01-rc5 ti2019.02 ti2019.02-rc1 ti2019.02-rc2 ti2019.02-rc3 ti2019.02-rc4 ti2019.03 ti2019.03-rc1 ti2019.03-rc2 ti2019.03-rc3 ti2019.03-rc4 ti2019.04 ti2019.04-rc1 ti2019.04-rc2 ti2019.04-rc3 ti2019.04-rc4 ti2019.04-rc5 ti2019.05 ti2019.05-rc1 ti2019.05-rc2 ti2019.05-rc3 ti2019.05-rc4 ti2019.06 ti2019.06-rc1 ti2019.06-rc2 ti2019.06-rc3 ti2019.06-rc4 ti2019.06-rc5 ti2020-rc1 ti2020.00 ti2020.00-rc1 ti2020.00-rc2 ti2020.00-rc3 ti2020.00-rc4 ti2020.01.00
Use -ffreestanding
The fix is provided by Khem Raj <raj.khem@gmail.com>
When compiled using hosted toolchains e.g. default Linux targetted
toolchains from OpenEmbedded, we need to ensure that none of hosted
nature of toolchain is manifested and its compiled as a standalone
baremetal application. In addition to using -nostdlib we also need to
specify -ffreestanding so it does not include linux specific compiler
headers etc.
This means that the floating point config defaults of toolchain is not
looking for platform specific headers e.g. gnu/stubs-soft.h or
gnu/stubs-hard.h, since OE make it free choice to use hard-fp calling
convention ABI choice, this change ensures it does not affect compiling
this baremetal application
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
The fix is provided by Khem Raj <raj.khem@gmail.com>
When compiled using hosted toolchains e.g. default Linux targetted
toolchains from OpenEmbedded, we need to ensure that none of hosted
nature of toolchain is manifested and its compiled as a standalone
baremetal application. In addition to using -nostdlib we also need to
specify -ffreestanding so it does not include linux specific compiler
headers etc.
This means that the floating point config defaults of toolchain is not
looking for platform specific headers e.g. gnu/stubs-soft.h or
gnu/stubs-hard.h, since OE make it free choice to use hard-fp calling
convention ABI choice, this change ensures it does not affect compiling
this baremetal application
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
7 years agoCM3: Firmware release 0x192 2016.04-rc3 2016.04-rc4 ti2016.04 ti2016.04-rc1 ti2016.04-rc2 ti2016.05 ti2016.05-rc1 ti2016.05-rc2 ti2016.05-rc3 ti2016.05-rc4 ti2016.05-rc5 ti2016.06 ti2016.06-rc1 ti2016.06-rc2 ti2016.06-rc3 ti2016.06-rc4 ti2017.00 ti2017.00-c4 ti2017.00-rc1 ti2017.00-rc2 ti2017.00-rc3 ti2017.00-rc4 ti2017.00-rc5 ti2017.00-rc6 ti2017.01 ti2017.01-rc1 ti2017.01-rc2 ti2017.01-rc3 ti2017.01-rc4 ti2017.02 ti2017.02-${RC_TAG} ti2017.02-rc1 ti2017.02-rc2 ti2017.02-rc3 ti2017.02-rc4 ti2017.02-rc5 ti2017.02-rc6 ti2017.03 ti2017.03-rc1 ti2017.03-rc2 ti2017.03-rc3 ti2017.03-rc4 ti2017.04 ti2017.04-rc1 ti2017.04-rc2 ti2017.04-rc3 ti2017.04-rc4 ti2017.05 ti2017.05-rc1 ti2017.05-rc2 ti2017.05-rc3 ti2017.05-rc4 ti2017.06 ti2017.06-rc1 ti2017.06-rc2 ti2017.06-rc3 ti2017.06-rc4 ti2018.02 ti2018.03 ti2018.04
CM3: Firmware release 0x192
This version, 0x192, includes the following changes:
- Fix DDR IO CTRL handling during suspend so both am335x and am437x
use optimal low power state and restore the exact previous
configuration.
- Explicitly configure PER state in standby, even though it is
configured to ON state to ensure proper state.
- Add new 'halt' flag in IPC_REG4 bit 11 to allow HLOS to configure
the suspend path to wait immediately before suspending the system
entirely to allow JTAG visiblity for debug.
- Fix board voltage scaling binaries i2c speed configuration in
order to properly configure 100khz operation.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
This version, 0x192, includes the following changes:
- Fix DDR IO CTRL handling during suspend so both am335x and am437x
use optimal low power state and restore the exact previous
configuration.
- Explicitly configure PER state in standby, even though it is
configured to ON state to ensure proper state.
- Add new 'halt' flag in IPC_REG4 bit 11 to allow HLOS to configure
the suspend path to wait immediately before suspending the system
entirely to allow JTAG visiblity for debug.
- Fix board voltage scaling binaries i2c speed configuration in
order to properly configure 100khz operation.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Add debug_halt wait loop to standby and other deep sleep modes
Make use of the flag introduced by commit 3254473ddd8 ('CM3: msg: Add
halt flag to param3') to also halt standby and deepsleep1 and deepsleep2
modes when the HLOS sets the debug_halt flag in the IPC registers.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Make use of the flag introduced by commit 3254473ddd8 ('CM3: msg: Add
halt flag to param3') to also halt standby and deepsleep1 and deepsleep2
modes when the HLOS sets the debug_halt flag in the IPC registers.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Fix Add i2c speed value in voltage scaling binaries
An incorrect value of 00 34 is present for the i2c bus speed given in
all of the voltage scaling binaries. This value should be 64 00 to properly
represent 100 kHz due to the little-endianess of the two-byte value. Also,
because of this change, we must add a 00 byte at the end of the sleep
sequence to properly terminate it which then increases the offset to the
wake sequence in all of the binaries by 1.
The correct value of 100 kHz should be used to ensure reliability of the
i2c transaction, although the incorrect value seems to have worked
without visible issues.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
An incorrect value of 00 34 is present for the i2c bus speed given in
all of the voltage scaling binaries. This value should be 64 00 to properly
represent 100 kHz due to the little-endianess of the two-byte value. Also,
because of this change, we must add a 00 byte at the end of the sleep
sequence to properly terminate it which then increases the offset to the
wake sequence in all of the binaries by 1.
The correct value of 100 kHz should be used to ensure reliability of the
i2c transaction, although the incorrect value seems to have worked
without visible issues.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: msg: Add halt flag to param3
Add a flag into param3 IPC register to allow user of the firmware
to set this bit and cause the firmware to wait at a loop at the last
possible point in DS0 to allow for connection by JTAG for debug
purposes. Once this occurs the program counter can be adjusted to exit
the loop and continue to suspend.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Add a flag into param3 IPC register to allow user of the firmware
to set this bit and cause the firmware to wait at a loop at the last
possible point in DS0 to allow for connection by JTAG for debug
purposes. Once this occurs the program counter can be adjusted to exit
the loop and continue to suspend.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: AMX3: Explicitly set the PER Domain state for standby
Currently as part of a8_standby_handler we are not setting
the PER domain power state but checking for the power
domain transition during the a8_wake_standby_handler
post wake up from standby. Hence explicitly set the PER Domain
state for standby.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Currently as part of a8_standby_handler we are not setting
the PER domain power state but checking for the power
domain transition during the a8_wake_standby_handler
post wake up from standby. Hence explicitly set the PER Domain
state for standby.
Signed-off-by: Keerthy <j-keerthy@ti.com>
CM3: AMX3: Add PER domain target power state for standby
standby_data currently has data for MPU power domain alone. Add
the PER domain target power domain state for standby.
Signed-off-by: Keerthy <j-keerthy@ti.com>
standby_data currently has data for MPU power domain alone. Add
the PER domain target power domain state for standby.
Signed-off-by: Keerthy <j-keerthy@ti.com>
CM3: ddr: Split 335x and 437x ddr io ctrl handling
It seems that some of the ddr io ctrl handling for am335x got wiped out
during the development on am437x io ctrl values so this patch restores
am335x sequence separately and splits am437x io ctrl sequence into its
own function. Also, do a proper save of context and restore during
resume rather than writing in fixed values.
Reviewed-by: Brad Griffis <bgriffis@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
It seems that some of the ddr io ctrl handling for am335x got wiped out
during the development on am437x io ctrl values so this patch restores
am335x sequence separately and splits am437x io ctrl sequence into its
own function. Also, do a proper save of context and restore during
resume rather than writing in fixed values.
Reviewed-by: Brad Griffis <bgriffis@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Bump firmware release to 0x191
This version, 0x191, includes the following changes:
- Add trace output on boot for kernel remoteproc driver
- Fix resouce table as RSC_INTMEM is no longer used in kernel
- Add header dependency checking
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
This version, 0x191, includes the following changes:
- Add trace output on boot for kernel remoteproc driver
- Fix resouce table as RSC_INTMEM is no longer used in kernel
- Add header dependency checking
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Makefile: Add header dependency check to build
Make sure to rebuild any .c files that depend on header files that have
changed by generating .d dependency files for each object file. Also, add
the .d files that get generated to the .gitignore file and to the make
clean job, and change use of 'find -exec' to delete .o and .d files to
'find -delete'
Reviewed-and-Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Make sure to rebuild any .c files that depend on header files that have
changed by generating .d dependency files for each object file. Also, add
the .d files that get generated to the .gitignore file and to the make
clean job, and change use of 'find -exec' to delete .o and .d files to
'find -delete'
Reviewed-and-Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: scripts/generate: Only generate version.h if changed
In preparation of adding header dependency checking, change the
version.h generate script to only generate the file if a new version
needs to be generated, otherwise any file that depends on version.h will
always need to be rebuilt because the file time changes on every build.
Reviewed-and-Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
In preparation of adding header dependency checking, change the
version.h generate script to only generate the file if a new version
needs to be generated, otherwise any file that depends on version.h will
always need to be rebuilt because the file time changes on every build.
Reviewed-and-Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Makefile: Update default CROSS_COMPILE to arm-linux-gnueabihf-
Update the name of the default CROSS_COMPILE variable to match the
compiler used today by the TI Processors SDK.
Reviewed-and-Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Update the name of the default CROSS_COMPILE variable to match the
compiler used today by the TI Processors SDK.
Reviewed-and-Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Makefile: allow CROSS_COMPILE to be defined on environment
Not everybody will use the exact same toolchain, so
we should let people pass their own CROSS_COMPILE
when calling make.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Not everybody will use the exact same toolchain, so
we should let people pass their own CROSS_COMPILE
when calling make.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: Remove RSC_INTMEM entries from resource table
RSC_INTMEM is not accepted into the linux kernel so remove
the entries from the resource table here.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
RSC_INTMEM is not accepted into the linux kernel so remove
the entries from the resource table here.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
CM3: add trace output for booting rproc
Output a debug message when firmware boots so remoteproc can see
it in it's trace log under sysfs.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Output a debug message when firmware boots so remoteproc can see
it in it's trace log under sysfs.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
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
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
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
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>