Commit Graph

5653 Commits

Author SHA1 Message Date
Marek Vasut c67703ebaa rcar_gen3: drivers: qos: Move QoS drivers out of staging
Now that QoS drivers are cleaned up , move them out of staging.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: If61ab2157c30b8f5a6b91d2c56ddbb9098ef99e8
2019-06-17 15:13:22 +02:00
Marek Vasut b5a506abcd rcar_gen3: drivers: qos: V3M: Configure DBSC QoS from a table
Convert the DBSC QoS setting function to a simple table of register-value
pairs and pass it to common rcar_qos_dbsc_setting() to write those values
to matching registers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I3e8b0251099b57581ebdcfce5670bff5579dc505
2019-06-17 15:13:22 +02:00
Marek Vasut efb2c83759 rcar_gen3: drivers: qos: E3: Configure DBSC QoS from a table
Convert the DBSC QoS setting function to a simple table of register-value
pairs and pass it to common rcar_qos_dbsc_setting() to write those values
to matching registers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I1757eee9a209c368d0e8fba9809e56b8090ee43f
2019-06-17 15:13:22 +02:00
Marek Vasut 2d1393ef3e rcar_gen3: drivers: qos: D3: Configure DBSC QoS from a table
Convert the DBSC QoS setting function to a simple table of register-value
pairs and pass it to common rcar_qos_dbsc_setting() to write those values
to matching registers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I81b48475114fc293766a6d7f2b46f8e913a51b06
2019-06-17 15:13:22 +02:00
Marek Vasut be5d6079c8 rcar_gen3: drivers: qos: M3N: Configure DBSC QoS from a table
Convert the DBSC QoS setting function to a simple table of register-value
pairs and pass it to common rcar_qos_dbsc_setting() to write those values
to matching registers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I46b445a77b39412e7a41ae0e0e087a409d0c22e3
2019-06-17 15:13:22 +02:00
Marek Vasut f28f092fd8 rcar_gen3: drivers: qos: M3W: Configure DBSC QoS from a table
Convert the DBSC QoS setting function to a simple table of register-value
pairs and pass it to common rcar_qos_dbsc_setting() to write those values
to matching registers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Ie2cbfdacf6d1c7eca4498ab7787b866a83660485
2019-06-17 15:13:22 +02:00
Marek Vasut ed46cdb4b7 rcar_gen3: drivers: qos: H3: Configure DBSC QoS from a table
Convert the DBSC QoS setting function to a simple table of register-value
pairs and pass it to common rcar_qos_dbsc_setting() to write those values
to matching registers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I62b133ea4f4129a641b779a782938976ad52fbfe
2019-06-17 15:13:22 +02:00
Marek Vasut d875f93642 rcar_gen3: drivers: qos: Add function to configure DBSC QoS settings from a table
The DBSC QoS settings can be programmed by iterating over a table with
register-value pairs and writing those to the registers, add function
to do just that. Subsequent patches will convert the DBSC QoS setting
functions for each SoC to this new function.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I949c46a0f032661a58000cb5f7829349e973438c
2019-06-17 15:13:22 +02:00
Marek Vasut b784916485 rcar_gen3: drivers: qos: Fix checkpatch issues
Fix checkpatch issues, clean up macro indentation. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Id0f1e322b44562f9863e885583d89fbf47cab91b
2019-06-17 15:13:20 +02:00
Marek Vasut 5ea5c2b24d rcar_gen3: drivers: qos: V3M: Drop useless comments
Drop useless comments in dbsc_setting(). No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I8a113d253f39e5b6a61e16b1740f9a66b2540753
2019-06-17 15:12:59 +02:00
Marek Vasut c90b11990e rcar_gen3: drivers: qos: V3M: Convert mstat table to uint64_t
Convert the mstat table from a complex structure to simple sequence
of uint64_t values, since the structure described just that and the
loop can operate over incrementing sequence of addresses just fine.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: If1917605e5540a38cbd763c56fc1e677573e7066
2019-06-17 15:12:59 +02:00
Marek Vasut 344797db32 rcar_gen3: drivers: qos: V3M: Factor out mstat fix into separate file
Pull out the mstat fix array into separate file, to align the structure
of the driver with the other SoCs. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Ifb6644063d8f463e2eb20bdadc5b69ab74ac591d
2019-06-17 15:12:59 +02:00
Marek Vasut acf223bdda rcar_gen3: drivers: qos: V3M: Use common register definition
Use common qos_regs.h instead of a local copy in the V3M QoS init.
Fill missing registers into qos_regs.h . No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I9aabff54abc05781ef606b0d09e4e9fbf7ec3968
2019-06-17 15:12:58 +02:00
Marek Vasut 874be1b2be rcar_gen3: drivers: qos: E3: Drop extra level of nesting
The extra level of nesting is not necessary, drop it.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I49df37734cd6016373a5850d3b9cf4a6569c36d6
2019-06-17 15:11:57 +02:00
Marek Vasut 0292fe18b4 rcar_gen3: drivers: qos: E3: Use common register definition
Use common qos_regs.h instead of a local copy in the E3 QoS init.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Ia4336d4b6173e1dbb671a003d904dbc5dc0c196d
2019-06-17 15:11:56 +02:00
Marek Vasut 83314d087a rcar_gen3: drivers: qos: D3: Replace ad-hoc register addresses with macros
Replace the remaining ad-hoc register addresses with proper macros.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: If125f0c8ef77ed280107324edaa05f21979a2c27
2019-06-17 15:11:28 +02:00
Marek Vasut 377ccb7fb5 rcar_gen3: drivers: qos: D3: Drop MD pin check
The DBSC_SCFCTST2 is always written with the same value, no matter
what the MD pin value is, drop the entire check and just write the
register with the one and only possible value.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I44d48ad59293562539a0c1d8ffd66333714e041e
2019-06-17 15:11:28 +02:00
Marek Vasut 37a1f24287 rcar_gen3: drivers: qos: D3: Make DBSC settings local to dbsc_setting()
Move the DBSC write enabling and disabling to dbsc_setting() function,
to make it local, instead of having it all over the code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: If8e5657c3230b5d82b551cb89b11c4d13a2d096b
2019-06-17 15:11:28 +02:00
Marek Vasut 7b24603bc1 rcar_gen3: drivers: qos: D3: Drop useless comments
Drop useless comments in dbsc_setting(). No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: If54e770ce81c9a6610cd89c3d5f01ea9b96af521
2019-06-17 15:11:28 +02:00
Marek Vasut 0008870374 rcar_gen3: drivers: qos: D3: Convert mstat table to uint64_t
Convert the mstat table from a complex structure to simple sequence
of uint64_t values, since the structure described just that and the
loop can operate over incrementing sequence of addresses just fine.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I5f797024c76f2c18b160ac50ede9e1eac24e6652
2019-06-17 15:11:28 +02:00
Marek Vasut e182c7cc95 rcar_gen3: drivers: qos: D3: Factor out mstat fix into separate file
Pull out the mstat fix array into separate file, to align the structure
of the driver with the other SoCs. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I2559c5ceb06505361d026ebc1b762bebe17d920b
2019-06-17 15:11:28 +02:00
Marek Vasut 37173b342d rcar_gen3: drivers: qos: D3: Use common register definition
Use common qos_regs.h instead of a local copy in the D3 QoS init.
Fill missing registers into qos_regs.h . No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Ie22a81bf5cbf3f8970c6e3fbb43ef52c26fb7168
2019-06-17 15:11:27 +02:00
Marek Vasut 2041b0b850 rcar_gen3: drivers: qos: M3N: Fix checkpatch issues
Fix checkpatch issues, clean up macro indentation. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I08c033b317685bef7537eb49de160e827b7791ad
2019-06-17 15:05:49 +02:00
Marek Vasut 126cb4f54a rcar_gen3: drivers: qos: M3N: Drop MD pin check
The DBSC_SCFCTST2 is always written with the same value, no matter
what the MD pin value is, drop the entire check and just write the
register with the one and only possible value.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Icd3e12f814d4fdcddaec2d1415f0bbf92169284b
2019-06-17 15:05:49 +02:00
Marek Vasut 91a7cdf3de rcar_gen3: drivers: qos: M3N: Drop useless comments
Drop useless comments in dbsc_setting(). No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I6fe03e16c63278aa6fc1bbcc72c07a450d3b7638
2019-06-17 15:05:49 +02:00
Marek Vasut 16726bcd5f rcar_gen3: drivers: qos: M3N: Drop extra level of nesting
The extra level of nesting is not necessary, drop it.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I6d268eae8df5794511d5211e5a59a36291adab3e
2019-06-17 15:05:49 +02:00
Marek Vasut 51a687931c rcar_gen3: drivers: qos: M3N: Use common register definition
Use common qos_regs.h instead of a local copy in the M3N QoS init.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I9670c9cdb320d6724175c22210d048af54490b47
2019-06-17 15:05:49 +02:00
Marek Vasut 22c401abe0 rcar_gen3: drivers: qos: M3W: Fix checkpatch issues
Fix checkpatch issues, clean up macro indentation. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Ifd397962c40d174c3af31cb440241cc8bd9335d3
2019-06-17 15:05:49 +02:00
Marek Vasut 3b9d06008c rcar_gen3: drivers: qos: M3W: Drop MD pin check
The DBSC_SCFCTST2 is always written with the same value, no matter
what the MD pin value is, drop the entire check and just write the
register with the one and only possible value.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Idf26cf064e99e95f0140dd747183efe6a6d7f0bf
2019-06-17 15:05:49 +02:00
Marek Vasut 3038c4c5fc rcar_gen3: drivers: qos: M3W: Drop useless comments
Drop useless comments in dbsc_setting(). No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I4460c55bf58f33ca72c9bbad99a28b5e4ef7421e
2019-06-17 15:05:49 +02:00
Marek Vasut 203ee2c8ab rcar_gen3: drivers: qos: M3W: Drop extra level of nesting
The extra level of nesting is not necessary, drop it.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I086ab1f457866f0e2c3ccd67609c0be35631f893
2019-06-17 15:05:49 +02:00
Marek Vasut a22a4eda67 rcar_gen3: drivers: qos: M3W: Convert mstat table to uint64_t
Convert the mstat table from a complex structure to simple sequence
of uint64_t values, since the structure described just that and the
loop can operate over incrementing sequence of addresses just fine.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I41728b30087996edc9799f320bf6a3b4465538bd
2019-06-17 15:05:49 +02:00
Marek Vasut a956a0d7aa rcar_gen3: drivers: qos: M3W: Factor out mstat fix into separate file
Pull out the mstat fix array into separate file, to align the structure
of the driver with the other SoCs. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I21c18e80ab9225837e5553dadcf196605e878143
2019-06-17 15:05:49 +02:00
Marek Vasut 1f49a943e2 rcar_gen3: drivers: qos: M3W: Use common register definition
Use common qos_regs.h instead of a local copy in the M3W QoS init.
Fill missing registers into qos_regs.h . No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I91175c86cdb94b9271c880df2cb65949f15f1bad
2019-06-17 15:05:48 +02:00
Yann Gautier f237822f0b fdts: stm32mp1: realign device tree files with internal devs
Update DDR parameters to version 1.45.
Remove useless sdmmc1_dir_pins_b node.
Add USART3 and UART7 nodes.
Correct a PMIC value for USB regulator.
Add TIMER12, TIMER15, CRYP, HASH and USBOTG_HS nodes.
Update DTSI file for SDMMC compatible, but overwrite it with the former
name.
Move BSEC board_id node to boards DTS files, as this OTP is specific to
STMicroelectronics boards.

Change-Id: If4d2fe090c6a8368afe8e21e5ac70579911d3939
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-06-17 14:03:51 +02:00
Yann Gautier 0a016775ad stm32mp1: increase device tree size to 20kB
Change-Id: Idee966b6434aa038e54b6e7176749a7b65bdbe84
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-06-17 14:03:51 +02:00
Yann Gautier f805594d39 stm32mp1: make dt_get_stdout_node_offset() static
Do not export function dt_get_stdout_node_offset() that is used only inside
stm32mp_dt.c source file.

Change-Id: I9dd3dbfab21d42ed81c68723e71fe5a7586dce93
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-06-17 14:03:51 +02:00
Yann Gautier 29a5072782 stm32mp1: use unsigned values for SDMMC defines
Correct SDMMC macros to define unsigned values as expected by the
driver implementation.

Change-Id: Ib009f3df2cf26a9759d129eb571a27b2564770ce
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-06-17 14:03:51 +02:00
Yann Gautier d304158ed4 stm32mp1: remove useless LIBFDT_SRCS from PLAT_BL_COMMON_SOURCES
Remove inclusion of libfdt source files in source file list since these
are already included from generic libfdt.mk makefile.

Change-Id: If42624557c4d88ca85d70f83b1b08c58f50afe72
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-06-17 14:03:51 +02:00
Yann Gautier 196fa6c88f stm32mp1: update doc for U-Boot compilation
U-Boot should be compiled with stm32mp15_trusted_defconfig which is
supported since tag v2019.07-rc1 with commit [1].

The creation of the U-Boot binary with stm32 header is done at U-Boot
compilation step, it is no more required to call the extra command.

[1] https://git.denx.de/?p=u-boot.git;a=commit;h=015289580f81

Change-Id: Ia875c22184785fc2e02ad07993a649069cd5ce34
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-06-17 14:03:51 +02:00
Yann Gautier f33b2433f5 stm32mp1: add general SYSCFG management
The system configuration controller is mainly used to manage
the compensation cell and other IOs and system related settings.

The SYSCFG driver is in charge of configuring masters on the interconnect,
IO compensation, low voltage boards, or pull-ups for boot pins.
All other configurations should be handled in Linux drivers requiring it.

Device tree files are also updated to manage vdd-supply regulator.

Change-Id: I10fb513761a7d1f2b7afedca9c723ad9d1bccf42
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-06-17 14:03:51 +02:00
Yann Gautier 8f282dae74 stm32mp1: move stm32_get_gpio_bank_clock() to private file
GPIOx clocks are specific to each STM32MP platforms.
This change moves function stm32_get_gpio_bank_clock() from stm32mp
common source files to platform private stm32mp1_private.c source file.

Change-Id: I9616c0d3fe4d10af715d6f2d1550c13ab62c829a
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-06-17 14:03:51 +02:00
Yann Gautier dd98aec87c clk: stm32mp1: correctly handle Clock Spreading Generator
To activate the CSG option, the driver needs to set the bit2
of PLLNCR register = SSCG_CTRL: Spread Spectrum Clock Generator.
This bit should not be cleared when starting the PLL.

Change-Id: Ie5c720ff03655f27a7e7e9e7ccf8295dd046112f
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-06-17 14:03:51 +02:00
Yann Gautier d4151d2ff9 clk: stm32mp1: use defines for mask values in stm32mp1_clk_sel array
Rework the macro that eases the table definition: the src and msk fields
are now using MASK and SHIFT defines of each source register.
Some macros had then to be modified: _USART1_SEL, _ASS_SEL and _MSS_SEL to
_UART1_SEL, _AXIS_SEL, and _MCUS_SEL to match register fields.

Note: the mask for RCC_ASSCKSELR_AXISSRC is changed from 0x3 to 0x7
to reflect the size of the register field, even if there are only
3 possible clock sources.

The mask value is also corrected for QSPI and FMC clock selection.

Change-Id: I44114e3c1dd37b9fa1be1ba519611abd9a07764c
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2019-06-17 14:03:51 +02:00
Yann Gautier f66358afee clk: stm32mp1: move oscillator functions to generic file
Those functions are generic for parsing nodes from device tree
hence could be located in generic source file.

The oscillators description structure is also moved to STM32MP1 clock
driver, as it is no more used in stm32mp1_clkfunc and cannot be in a
generic file.

Change-Id: I93ba74f4eea916440fef9b160d306af1b39f17c6
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-06-17 14:03:51 +02:00
Yann Gautier e1abd5600b arch: add some defines for generic timer registers
Those defines are used in STM32MP1 clock driver.
It is better to put them altogether with already defined registers.

Change-Id: I6f8ad8c2477b947af6f76283a4ef5c40212d0027
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-06-17 14:03:16 +02:00
John Tsichritzis 97c9a42d09 Merge "Fix type of cot_desc_ptr" into integration 2019-06-17 11:51:24 +00:00
John Tsichritzis 45c28e95bd Merge "DSU: Apply erratum 936184 for Neoverse N1/E1" into integration 2019-06-17 11:50:52 +00:00
John Tsichritzis 6acb509c08 Merge "allwinner: Disable unused features to save space" into integration 2019-06-17 11:49:23 +00:00
Marek Vasut fbcdc4ebe7 rcar_gen3: drivers: qos: H3: Fix checkpatch issues
Fix checkpatch issues, clean up macro indentation. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I605109b5e41219473a4cbc4a1929b84377ba0b67
2019-06-17 13:25:06 +02:00