Re: [PATCH] clk: Propagate clk_set_rate() if CLK_SET_PARENT_RATE present

2024-07-23 Thread Sam Protsenko
Jun 13, 2024 at 5:33 PM Tom Rini wrote: > > > > On Mon, Jun 10, 2024 at 02:43:17PM -0500, Sam Protsenko wrote: > > > On Tue, May 14, 2024 at 3:26 PM Sam Protsenko > > > wrote: > > > > > > > > On Wed, May 1, 2024 at 4:12 PM Sam Protsenko > &

Re: [PATCH V2] clk: Propagate clk_set_rate() if CLK_SET_PARENT_RATE present for gate and mux

2024-07-23 Thread Sam Protsenko
etc). > Add clk_generic_set_rate to allow them to trasverse the clock tree. > > Cc: Sam Protsenko > Signed-off-by: Michael Trimarchi > --- > drivers/clk/clk-gate.c | 1 + > drivers/clk/clk-mux.c| 2 +- > drivers/clk/clk-uclass.c | 20

Re: [PATCH v2 0/5] arm: exynos: Enable TRNG for E850-96 board

2024-07-23 Thread Sam Protsenko
[snip] > > Your patch was failed to apply to u-boot-samsung due to the e850-96_defconfig. > please rebase the patch. > Just sent v3, please take a look. > and about mmc patches, those have delegated to mmc maintainers. > Do you know if I should I ask some specific MMC maintainer to apply that

[PATCH v3 5/5] arm: exynos: Enable TRNG on E850-96 board

2024-07-23 Thread Sam Protsenko
appeared in upstream dts yet. Add it in U-Boot override dtsi file temporarily; it can be removed once it appears in upstream dts. Signed-off-by: Sam Protsenko --- Changes in v3: - Fixed applying the defconfig changes on U-Boot/master branch Changes in v2: - (none) arch/arm/dts/exynos850-e850

[PATCH v3 4/5] rng: Add Exynos TRNG driver

2024-07-23 Thread Sam Protsenko
,exynos5250-trng.yaml Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - Mentioned LDFW firmware in help section for RNG_EXYNOS config option - Renamed struct exynos_trng -> struct exynos_trng_priv - Added kernel-doc comments for struct exynos_trng_priv - Added ker

[PATCH v3 3/5] clk: exynos: Add SSS clocks for Exynos850

2024-07-23 Thread Sam Protsenko
Add ACLK (operating clock) and PCLK (bus clock) for Security Sub System (SSS) in Exynos850. Those clocks are needed for RNG enablement. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) drivers/clk/exynos/clk-exynos850.c | 10 ++ 1 file changed, 10

[PATCH v3 1/5] board: samsung: e850-96: Add default partitions

2024-07-23 Thread Sam Protsenko
Add an environment file for E850-96 board with default eMMC partition list. It follows the Samsung's partition list used for Android-Q on Exynos850 devices. It was verified on E850-96 board with: => gpt verify mmc 0 "$partitions" Verify GPT: success! Signed-off-by:

[PATCH v3 2/5] board: samsung: e850-96: Load LDFW firmware on board init

2024-07-23 Thread Sam Protsenko
in header comments, as this board support was actually added in 2024, not in 2020: it was probably a copy-paste mistake. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) board/samsung/e850-96/Makefile | 4 +- board/samsung/e850-96/e850-96.c | 6 +- board

[PATCH v3 0/5] arm: exynos: Enable TRNG for E850-96 board

2024-07-23 Thread Sam Protsenko
-Boot/master Changes in v2: - Addressed comments for [PATCH 4/5] rng: Add Exynos TRNG driver Sam Protsenko (5): board: samsung: e850-96: Add default partitions board: samsung: e850-96: Load LDFW firmware on board init clk: exynos: Add SSS clocks for Exynos850 rng: Add Exynos TRNG driver

Re: [PATCH v2 0/5] arm: exynos: Enable TRNG for E850-96 board

2024-07-22 Thread Sam Protsenko
Hi Minkyu, Can you please take a look at this series? And also my MMC series [1] has been pending for a while now, if it's ok with you -- can you please apply it? Thanks! [1] https://lists.denx.de/pipermail/u-boot/2024-July/559602.html On Mon, Jul 15, 2024 at 10:17 PM Sam Protsenko wrote

[PATCH v3 38/38] doc: samsung: Mention enabled eMMC in E850-96 board doc

2024-07-22 Thread Sam Protsenko
eMMC is enabled on E850-96 board now. Mention that in the board documentation. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) doc/board/samsung/e850-96.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/board/samsung/e850-96

[PATCH v3 37/38] configs: e850-96: Enable MMC

2024-07-22 Thread Sam Protsenko
Enable MMC subsystem and DW MMC driver support to make eMMC functional. Also enable a couple of related commands so the user can make use of eMMC from U-Boot shell. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) configs/e850-96_defconfig | 10

[PATCH v3 36/38] arm: dts: exynos: Remove outdated DW MMC properties in all Exynos dts

2024-07-22 Thread Sam Protsenko
: the fixed CIU clock divider value was moved to the chip data in exynos_dw_mmc.c driver No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) arch/arm/dts/exynos4210-origen.dts | 2 -- arch/arm/dts/exynos4210-trats.dts | 4

[PATCH v3 35/38] mmc: exynos_dw_mmc: Improve coding style

2024-07-22 Thread Sam Protsenko
Fix most of checkpatch warnings and other obvious style issues. No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) arch/arm/mach-exynos/include/mach/dwmmc.h | 36 +-- drivers/mmc/exynos_dw_mmc.c | 26

[PATCH v3 34/38] mmc: exynos_dw_mmc: Use dev->name as driver's displayed name

2024-07-22 Thread Sam Protsenko
Reduce U-Boot footprint by reusing dev->name as a driver's displayed name. This changes boot device name (and "mmc info" output) from "EXYNOS DWMMC" to something like "mmc@1210". Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Change

[PATCH v3 33/38] mmc: exynos_dw_mmc: Don't call dwmci_setup_cfg() after add_dwmci()

2024-07-22 Thread Sam Protsenko
s_dw_mmc: support the Driver mode for Exynos") Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - Replaced CONFIG_IS_ENABLED() with #ifdef drivers/mmc/exynos_dw_mmc.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH v3 32/38] mmc: exynos_dw_mmc: Pull all init code into probe function

2024-07-22 Thread Sam Protsenko
There is no logical sense to split the initialization code between multiple functions. Pull both do_dwmci_init() and exynos_dwmci_core_init() into exynos_dwmmc_probe() to make the code more simple and obvious. No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (none

[PATCH v3 31/38] mmc: exynos_dw_mmc: Add support for ARM64 Exynos chips

2024-07-22 Thread Sam Protsenko
(implemented in dw_mmc core driver) In terms of the driver implementation, the CIU clock is obtained via CCF framework (as opposed to ad-hoc clock driver implementation for ARM32 chips). Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) arch/arm/mach-exynos

[PATCH v3 29/38] mmc: exynos_dw_mmc: Read and use DDR timing when available

2024-07-22 Thread Sam Protsenko
DDR timing values should be defined in "samsung,dw-mshc-ddr-timing" dts property, and used when DDR MMC mode is selected. Read that value from dts and use it. If it's not available, use SDR timing values instead. This change is following upstream Linux kernel implementation. Signed-o

[PATCH v3 30/38] mmc: exynos_dw_mmc: Set requested freq in get_mmc_clk() callback

2024-07-22 Thread Sam Protsenko
hat's done in Linux kernel dw_mmc-exynos driver in .set_ios() callback for MMC_TIMING_MMC_DDR52 case. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) drivers/mmc/exynos_dw_mmc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/

[PATCH v3 28/38] mmc: exynos_dw_mmc: Move quirks from struct dwmci_host to chip data

2024-07-22 Thread Sam Protsenko
host->quirks field is only used internally in exynos_dw_mmc.c driver. To avoid cluttering the scope of struct dwmci_host, move quirks field into Exynos driver's chip data, where it can be statically defined. No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (n

[PATCH v3 27/38] mmc: exynos_dw_mmc: Read common clock-frequency property

2024-07-22 Thread Sam Protsenko
Instead of using non-standard "bus_hz" dts property, read common "clock-frequency" property used in upstream Linux kernel. It's safe to do so, as "clock-frequency" property was already added to corresponding nodes in all affected Exynos device tree files. No function

[PATCH v3 26/38] mmc: exynos_dw_mmc: Read common bus-width property

2024-07-22 Thread Sam Protsenko
Instead of using non-standard "samsung,bus-width" dts property, read common "bus-width" property used in upstream Linux kernel. It's safe to do so, as "bus-width" property was already added to corresponding nodes in all affected Exynos device tree files. No function

[PATCH v3 25/38] mmc: exynos_dw_mmc: Refactor fixed CIU clock divider

2024-07-22 Thread Sam Protsenko
r this change were taken from dw_mmc-exynos.c driver in Linux kernel. No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) drivers/mmc/ca_dw_mmc.c | 2 +- drivers/mmc/exynos_dw_mmc.c | 43 + in

[PATCH v3 24/38] mmc: exynos_dw_mmc: Abstract CLKSEL register

2024-07-22 Thread Sam Protsenko
CLKSEL register offset may vary between different Exynos chips, e.g. on ARM64 vs ARM32 chips. Provide a way to specify its offset value for each compatible instead of hard-coding its value in read/write calls. No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (none

[PATCH v3 23/38] mmc: exynos_dw_mmc: Read upstream SDR timing properties

2024-07-22 Thread Sam Protsenko
es instead of the old one. All affected dts files were already updated accordingly. No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) drivers/mmc/exynos_dw_mmc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletion

[PATCH v3 22/38] mmc: exynos_dw_mmc: Convert to use livetree API

2024-07-22 Thread Sam Protsenko
Update the driver to use livetree API instead of FDT one. No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - Moved exynos_dwmmc_of_to_plat() under #ifdef CONFIG_DM_MMC stanza drivers/mmc/exynos_dw_mmc.c | 17 - 1 file changed

[PATCH v3 21/38] mmc: exynos_dw_mmc: Use .of_to_plat for device tree parsing

2024-07-22 Thread Sam Protsenko
exynos_dwmci_get_config() is called from the probe function and used to read data from device tree. Make use of .of_to_plat driver callback instead, and convert exynos_dwmci_get_config() to match its signature. No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (none

[PATCH v3 20/38] mmc: exynos_dw_mmc: Obtain and use CIU clock via CCF API

2024-07-22 Thread Sam Protsenko
to abstract getting/setting the sclk rate. Then add CCF clock support to those functions for ARM64 platforms. Fixes: a082a2dde061 ("EXYNOS5: DWMMC: Added FDT support for DWMMC") Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - Replaced CONFIG_IS_ENABLED() w

[PATCH v3 19/38] mmc: exynos_dw_mmc: Don't call pinmux functions on ARM64 chips

2024-07-22 Thread Sam Protsenko
s_dw_mmc.o: in function `do_dwmci_init': undefined reference to `exynos_pinmux_config' Fixes: a082a2dde061 ("EXYNOS5: DWMMC: Added FDT support for DWMMC") Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - Replaced CONFIG_IS_ENABLED() with

[PATCH v3 16/38] arm: exynos: Add header guard for dwmmc.h

2024-07-22 Thread Sam Protsenko
Add missing header guard to prevent possible build errors. Fixes: 77b55e8cfcee ("ARM: exynos: move SoC sources to mach-exynos") Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) arch/arm/mach-exynos/include/mach/dwmmc.h | 5 + 1 file

[PATCH v3 18/38] mmc: exynos_dw_mmc: Fix getting private data in exynos_dwmci_board_init()

2024-07-22 Thread Sam Protsenko
rom exynos_dwmci_clksel() and using it for getting the private data in exynos_dwmci_board_init() Fixes: 3537ee879e04 ("mmc: exynos_dw_mmc: support the Driver mode for Exynos") Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) drivers/mmc/exynos_

[PATCH v3 17/38] mmc: exynos_dw_mmc: Fix obtaining the base address of controller

2024-07-22 Thread Sam Protsenko
] host->ioaddr = (void *)base; Use livetree API instead (dev_read_addr_ptr()), which handles this correctly. Fixes: a082a2dde061 ("EXYNOS5: DWMMC: Added FDT support for DWMMC") Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) drivers/mmc/exynos

[PATCH v3 15/38] dt-bindings: exynos: Update bindings doc for DW MMC controller

2024-07-22 Thread Sam Protsenko
Update the bindings doc for Exynos DW MMC block to follow the upstream example and reflect the latest changes made in corresponding Linux kernel bindings. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) doc/device-tree-bindings/exynos/dwmmc.txt | 46

[PATCH v3 14/38] arm: dts: exynos: Add upstream DW MMC properties to all Exynos dts

2024-07-22 Thread Sam Protsenko
register description in TRM): fifo-depth = ((fifoth_val >> 16) + 1) * 2 * bus-width: generic replacement for samsung,bus-width * clock-frequency: generic replacement for bus_hz * non-removable: generic replacement for samsung,removable = <0> No functional change. Signed

[PATCH v3 11/38] mmc: dw_mmc: Replace fifoth_val property with fifo-depth

2024-07-22 Thread Sam Protsenko
, and pulls common FIFOTH register value calculation into core dw_mmc driver where it belongs. No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) drivers/mmc/dw_mmc.c | 21 + drivers/mmc/exynos_dw_mmc.c | 10

[PATCH v3 13/38] mmc: dw_mmc: Improve coding style

2024-07-22 Thread Sam Protsenko
Fix most of checkpatch warnings and other obvious style issues. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v3: - (none) Changes in v2: - Added R-b tag from Quentin drivers/mmc/dw_mmc.c | 69 ++-- include/dwmmc.h

[PATCH v3 12/38] mmc: dw_mmc: Fix kernel-doc comments in dwmmc.h

2024-07-22 Thread Sam Protsenko
Rework kernel-doc comments in dwmmc.h header so it's actually possible to generate a proper documentation from it usin scripts/kernel-doc script, with no errors. No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - (none) include/dwmmc.h | 41

[PATCH v3 10/38] mmc: dw_mmc: Add support for 64-bit IDMAC

2024-07-22 Thread Sam Protsenko
nd_cmd routine. The insights for this implementation were taken from Linux kernel DW MMC driver. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - Replaced CONFIG_IS_ENABLED() with #ifdef drivers/mmc/dw_mmc.c | 152 ++- i

[PATCH v3 09/38] mmc: dw_mmc: Improve 32-bit IDMAC descriptor namings

2024-07-22 Thread Sam Protsenko
Prepare for adding 64-bit IDMAC descriptors by renaming current 32-bit descriptor and its fields accordingly. While at it, make use of virt_to_phys() to make it more obvious in which places the physical addresses have to be used. No functional change. Signed-off-by: Sam Protsenko --- Changes

[PATCH v3 08/38] mmc: dw_mmc: Extract setting the DMA descriptor into a separate routine

2024-07-22 Thread Sam Protsenko
Make dwmci_prepare_data() function easier to read by extracting the preparation of IDMAC descriptor into a dedicated function. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v3: - (none) Changes in v2: - Added R-b tag from Quentin drivers

[PATCH v3 06/38] mmc: dw_mmc: Extract FIFO data transfer into a separate routine

2024-07-22 Thread Sam Protsenko
FIFO data transfer is implemented as quite a massive chunk of code. Extract it into a dedicated function to make dwmci_data_transfer() easier to read and reduce the indentation level of the code. No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2

[PATCH v3 07/38] mmc: dw_mmc: Extract DMA transfer handling code into a separate routine

2024-07-22 Thread Sam Protsenko
Make dwmci_send_cmd() easier to read by moving the DMA transfer handling code into a dedicated function. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v3: - (none) Changes in v2: - Added R-b tag from Quentin drivers/mmc/dw_mmc.c | 51

[PATCH v3 05/38] mmc: dw_mmc: Extract divider update to a separate function

2024-07-22 Thread Sam Protsenko
(). No functional change. Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - Moved CLKSRC after disabling the clock as recommended in TRM, to avoid possible glitch - Extracted div update into a separate function with corresponding comment - Changed the patch

[PATCH v3 04/38] mmc: dw_mmc: Extract FIFO init into a separate routine

2024-07-22 Thread Sam Protsenko
Move FIFO threshold initialization into a separate function to make dwmci_init() more readable. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v3: - (none) Changes in v2: - Added R-b tag from Quentin drivers/mmc/dw_mmc.c | 25

[PATCH v3 03/38] mmc: dw_mmc: Extract waiting for data busy into a separate routine

2024-07-22 Thread Sam Protsenko
-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v3: - (none) Changes in v2: - Added R-b tag from Quentin drivers/mmc/dw_mmc.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index

[PATCH v3 02/38] mmc: dw_mmc: Move struct idmac to dw_mmc.c

2024-07-22 Thread Sam Protsenko
struct idmac is only used in dw_mmc.c, so move it there from dwmmc.h to avoid cluttering the interface in the header. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v3: - (none) Changes in v2: - Added R-b tag from Quentin drivers/mmc

[PATCH v3 01/38] mmc: dw_mmc: Remove unused version field from struct dwmci_host

2024-07-22 Thread Sam Protsenko
Nobody seems to use it, so just remove it. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v3: - (none) Changes in v2: - Added R-b tag from Quentin include/dwmmc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/dwmmc.h b/include

[PATCH v3 00/38] mmc: dw_mmc: Enable eMMC on E850-96 board

2024-07-22 Thread Sam Protsenko
of Exynos chips implementing 64-bit IDMAC descriptor (in [PATCH 00/40]) [1] https://lists.denx.de/pipermail/u-boot/2024-March/547719.html Sam Protsenko (38): mmc: dw_mmc: Remove unused version field from struct dwmci_host mmc: dw_mmc: Move struct idmac to dw_mmc.c mmc: dw_mmc: Extract wai

[PATCH v2 5/5] arm: exynos: Enable TRNG on E850-96 board

2024-07-15 Thread Sam Protsenko
appeared in upstream dts yet. Add it in U-Boot override dtsi file temporarily; it can be removed once it appears in upstream dts. Signed-off-by: Sam Protsenko --- Changes in v2: - (none) arch/arm/dts/exynos850-e850-96-u-boot.dtsi | 11 +++ arch/arm/mach-exynos/Kconfig | 2

[PATCH v2 4/5] rng: Add Exynos TRNG driver

2024-07-15 Thread Sam Protsenko
,exynos5250-trng.yaml Signed-off-by: Sam Protsenko --- Changes in v2: - Mentioned LDFW firmware in help section for RNG_EXYNOS config option - Renamed struct exynos_trng -> struct exynos_trng_priv - Added kernel-doc comments for struct exynos_trng_priv - Added kernel-doc comments for str

[PATCH v2 3/5] clk: exynos: Add SSS clocks for Exynos850

2024-07-15 Thread Sam Protsenko
Add ACLK (operating clock) and PCLK (bus clock) for Security Sub System (SSS) in Exynos850. Those clocks are needed for RNG enablement. Signed-off-by: Sam Protsenko --- Changes in v2: - (none) drivers/clk/exynos/clk-exynos850.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH v2 2/5] board: samsung: e850-96: Load LDFW firmware on board init

2024-07-15 Thread Sam Protsenko
in header comments, as this board support was actually added in 2024, not in 2020: it was probably a copy-paste mistake. Signed-off-by: Sam Protsenko --- Changes in v2: - (none) board/samsung/e850-96/Makefile | 4 +- board/samsung/e850-96/e850-96.c | 6 +- board/samsung/e850-96/fw.c

[PATCH v2 1/5] board: samsung: e850-96: Add default partitions

2024-07-15 Thread Sam Protsenko
Add an environment file for E850-96 board with default eMMC partition list. It follows the Samsung's partition list used for Android-Q on Exynos850 devices. It was verified on E850-96 board with: => gpt verify mmc 0 "$partitions" Verify GPT: success! Signed-off-by:

[PATCH v2 0/5] arm: exynos: Enable TRNG for E850-96 board

2024-07-15 Thread Sam Protsenko
://lore.kernel.org/all/20240618003743.2975-1-semen.protse...@linaro.org/T/#me6ba1762a254ca438a9715f011d32820babfe2d8 Sam Protsenko (5): board: samsung: e850-96: Add default partitions board: samsung: e850-96: Load LDFW firmware on board init clk: exynos: Add SSS clocks for Exynos850 rng: Add Exynos TRNG

Re: [PATCH 4/5] rng: Add Exynos TRNG driver

2024-07-15 Thread Sam Protsenko
On Sat, Jul 13, 2024 at 10:13 AM Simon Glass wrote: > > Hi Sam, > Hi Simon, Thank you for the review! > On Sat, 13 Jul 2024 at 00:44, Sam Protsenko > wrote: > > +config RNG_EXYNOS > > + bool "Samsung Exynos True Random Number Generator suppor

[PATCH 4/5] rng: Add Exynos TRNG driver

2024-07-12 Thread Sam Protsenko
,exynos5250-trng.yaml Signed-off-by: Sam Protsenko --- drivers/rng/Kconfig | 7 + drivers/rng/Makefile | 1 + drivers/rng/exynos-trng.c | 275 ++ 3 files changed, 283 insertions(+) create mode 100644 drivers/rng/exynos-trng.c diff --git a/drivers/rng

[PATCH 5/5] arm: exynos: Enable TRNG on E850-96 board

2024-07-12 Thread Sam Protsenko
appeared in upstream dts yet. Add it in U-Boot override dtsi file temporarily; it can be removed once it appears in upstream dts. Signed-off-by: Sam Protsenko --- arch/arm/dts/exynos850-e850-96-u-boot.dtsi | 11 +++ arch/arm/mach-exynos/Kconfig | 2 ++ configs/e850

[PATCH 1/5] board: samsung: e850-96: Add default partitions

2024-07-12 Thread Sam Protsenko
Add an environment file for E850-96 board with default eMMC partition list. It follows the Samsung's partition list used for Android-Q on Exynos850 devices. It was verified on E850-96 board with: => gpt verify mmc 0 "$partitions" Verify GPT: success! Signed-off-by:

[PATCH 3/5] clk: exynos: Add SSS clocks for Exynos850

2024-07-12 Thread Sam Protsenko
Add ACLK (operating clock) and PCLK (bus clock) for Security Sub System (SSS) in Exynos850. Those clocks are needed for RNG enablement. Signed-off-by: Sam Protsenko --- drivers/clk/exynos/clk-exynos850.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/clk/exynos/clk

[PATCH 2/5] board: samsung: e850-96: Load LDFW firmware on board init

2024-07-12 Thread Sam Protsenko
in header comments, as this board support was actually added in 2024, not in 2020: it was probably a copy-paste mistake. Signed-off-by: Sam Protsenko --- board/samsung/e850-96/Makefile | 4 +- board/samsung/e850-96/e850-96.c | 6 +- board/samsung/e850-96/fw.c | 131

[PATCH 0/5] arm: exynos: Enable TRNG for E850-96 board

2024-07-12 Thread Sam Protsenko
/#me6ba1762a254ca438a9715f011d32820babfe2d8 Sam Protsenko (5): board: samsung: e850-96: Add default partitions board: samsung: e850-96: Load LDFW firmware on board init clk: exynos: Add SSS clocks for Exynos850 rng: Add Exynos TRNG driver arm: exynos: Enable TRNG on E850-96 board arch/arm/dts/exynos850-e850-96-u

Re: [PATCH] gpt: allow spaces in partition list

2024-07-10 Thread Sam Protsenko
On Tue, Jul 9, 2024 at 9:00 PM Sam Protsenko wrote: > > On Thu, Jun 27, 2024 at 6:29 AM Mikhail Kshevetskiy > wrote: > > > > This allows spliting partition list to several lines in environment file > > > > ex: > > > > gpt_par

Re: [PATCH] gpt: allow spaces in partition list

2024-07-09 Thread Sam Protsenko
; name=rootfs1,size=70MiB; > name=rootfs2,size=70MiB; > name=overlay1,size=20MiB; > name=overlay2,size=20MiB; > name=art,size=4MiB; > > Signed-off-by: Mikhail Kshevetskiy > --- Feel free to add: Reviewed-by: Sam Protsenko Tested-by:

Re: [PATCH v2 00/40] mmc: dw_mmc: Enable eMMC on E850-96 board

2024-07-08 Thread Sam Protsenko
On Thu, Jun 27, 2024 at 9:42 AM Tom Rini wrote: > > On Wed, Jun 26, 2024 at 10:12:12PM +0530, Anand Moon wrote: > > Hi Sam, > > > > On Wed, 19 Jun 2024 at 02:26, Sam Protsenko > > wrote: > > > > > > If there are no new comments on this ser

Re: [PATCH v1 2/2] odroid: Fix target platform compilation issue on Odroid-XU3

2024-06-26 Thread Sam Protsenko
efile to ensure that compilation only occurs for > the Odroid-XU3 specified target platform. > > Now, object files will be generated only when building for the > TARGET_ODROID platform. > > Signed-off-by: Anand Moon > --- Reviewed-by: Sam Protsenko > Tested om Odroid-U3 and Odroid-XU4.

Re: [PATCH v1 1/2] dm: exynos: Correct CONFIG_SYS_BOARD setting for Odroid XU3 boards

2024-06-26 Thread Sam Protsenko
ailed to persist EFI variables > No EFI system partition > Failed to persist EFI variables > Loading Boot 'mmc 2' failed > EFI boot manager: Cannot load any image > MMC Device 1 not found > no mmc device at slot 1 > --- Reviewed-by: Sam Protsenko > board/samsung

Re: [PATCH] include/fastboot.h: add missing types.h include

2024-06-20 Thread Sam Protsenko
On Thu, Jun 20, 2024 at 8:51 PM Caleb Connolly wrote: > > Fixes a compile error when building with only the TCP fastboot implementation. > > Signed-off-by: Caleb Connolly > --- Reviewed-by: Sam Protsenko > include/fastboot.h | 2 ++ > 1 file changed, 2 insertions(+) >

[PATCH] cmd: gpt: Fix freeing gpt_pte in gpt_verify()

2024-06-19 Thread Sam Protsenko
ort" handler, esr 0x9621, far 0xba247bff Fix the issue by only freeing gpt_pte if none of those functions failed. Fixes: bbb9ffac6066 ("gpt: command: Extend gpt command to support GPT table verification") Signed-off-by: Sam Protsenko --- cmd/gpt.c | 3 ++- 1 file ch

Re: [PATCH v2 00/40] mmc: dw_mmc: Enable eMMC on E850-96 board

2024-06-18 Thread Sam Protsenko
If there are no new comments on this series, can you please apply it? Thanks! On Sun, Jun 9, 2024 at 8:12 PM Sam Protsenko wrote: > > Bring 64-bit support to dw_mmc core and Exynos dw_mmc drivers, and > enable it on E850-96 board. Additionally do some related cleanups and > device

Re: [PATCH] clk: Propagate clk_set_rate() if CLK_SET_PARENT_RATE present

2024-06-10 Thread Sam Protsenko
On Tue, May 14, 2024 at 3:26 PM Sam Protsenko wrote: > > On Wed, May 1, 2024 at 4:12 PM Sam Protsenko > wrote: > > > > On Wed, Apr 10, 2024 at 9:53 PM Sean Anderson wrote: > > > > > > On 3/7/24 19:04, Sam Protsenko wrote: > > > > Sometimes clo

[PATCH v2 39/40] configs: e850-96: Enable MMC

2024-06-09 Thread Sam Protsenko
Enable MMC subsystem and DW MMC driver support to make eMMC functional. Also enable a couple of related commands so the user can make use of eMMC from U-Boot shell. Signed-off-by: Sam Protsenko --- configs/e850-96_defconfig | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff

[PATCH v2 40/40] doc: samsung: Mention enabled eMMC in E850-96 board doc

2024-06-09 Thread Sam Protsenko
eMMC is enabled on E850-96 board now. Mention that in the board documentation. Signed-off-by: Sam Protsenko --- doc/board/samsung/e850-96.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/board/samsung/e850-96.rst b/doc/board/samsung/e850-96.rst index 0cb95473e536

[PATCH v2 38/40] arm: dts: exynos: Remove outdated DW MMC properties in all Exynos dts

2024-06-09 Thread Sam Protsenko
: the fixed CIU clock divider value was moved to the chip data in exynos_dw_mmc.c driver No functional change. Signed-off-by: Sam Protsenko --- arch/arm/dts/exynos4210-origen.dts | 2 -- arch/arm/dts/exynos4210-trats.dts | 4 arch/arm/dts/exynos4210-universal_c210.dts | 4

[PATCH v2 36/40] mmc: exynos_dw_mmc: Use dev->name as driver's displayed name

2024-06-09 Thread Sam Protsenko
Reduce U-Boot footprint by reusing dev->name as a driver's displayed name. This changes boot device name (and "mmc info" output) from "EXYNOS DWMMC" to something like "mmc@1210". Signed-off-by: Sam Protsenko --- drivers/mmc/exynos_dw_mmc.c | 2 +- 1 file ch

[PATCH v2 37/40] mmc: exynos_dw_mmc: Improve coding style

2024-06-09 Thread Sam Protsenko
Fix most of checkpatch warnings and other obvious style issues. No functional change. Signed-off-by: Sam Protsenko --- arch/arm/mach-exynos/include/mach/dwmmc.h | 36 +-- drivers/mmc/exynos_dw_mmc.c | 26 ++-- 2 files changed, 29 insertions(+), 33

[PATCH v2 35/40] mmc: exynos_dw_mmc: Don't call dwmci_setup_cfg() after add_dwmci()

2024-06-09 Thread Sam Protsenko
s_dw_mmc: support the Driver mode for Exynos") Signed-off-by: Sam Protsenko --- Changes in v2: - Replaced CONFIG_IS_ENABLED() with #ifdef drivers/mmc/exynos_dw_mmc.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/exynos_dw_mmc.c b/drive

[PATCH v2 34/40] mmc: exynos_dw_mmc: Pull all init code into probe function

2024-06-09 Thread Sam Protsenko
There is no logical sense to split the initialization code between multiple functions. Pull both do_dwmci_init() and exynos_dwmci_core_init() into exynos_dwmmc_probe() to make the code more simple and obvious. No functional change. Signed-off-by: Sam Protsenko --- Changes in v2: - Replaced

[PATCH v2 33/40] mmc: exynos_dw_mmc: Remove common.h

2024-06-09 Thread Sam Protsenko
common.h header is marked for removal treewide and shouldn't be used. Remove it from Exynos DW MMC driver. No functional change. Signed-off-by: Sam Protsenko --- drivers/mmc/exynos_dw_mmc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc

[PATCH v2 32/40] mmc: exynos_dw_mmc: Add support for ARM64 Exynos chips

2024-06-09 Thread Sam Protsenko
(implemented in dw_mmc core driver) In terms of the driver implementation, the CIU clock is obtained via CCF framework (as opposed to ad-hoc clock driver implementation for ARM32 chips). Signed-off-by: Sam Protsenko --- arch/arm/mach-exynos/include/mach/dwmmc.h | 1 + drivers/mmc/exynos_dw_mmc.c

[PATCH v2 31/40] mmc: exynos_dw_mmc: Set requested freq in get_mmc_clk() callback

2024-06-09 Thread Sam Protsenko
hat's done in Linux kernel dw_mmc-exynos driver in .set_ios() callback for MMC_TIMING_MMC_DDR52 case. Signed-off-by: Sam Protsenko --- drivers/mmc/exynos_dw_mmc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c index

[PATCH v2 30/40] mmc: exynos_dw_mmc: Read and use DDR timing when available

2024-06-09 Thread Sam Protsenko
DDR timing values should be defined in "samsung,dw-mshc-ddr-timing" dts property, and used when DDR MMC mode is selected. Read that value from dts and use it. If it's not available, use SDR timing values instead. This change is following upstream Linux kernel implementation. Signed-o

[PATCH v2 29/40] mmc: exynos_dw_mmc: Move quirks from struct dwmci_host to chip data

2024-06-09 Thread Sam Protsenko
host->quirks field is only used internally in exynos_dw_mmc.c driver. To avoid cluttering the scope of struct dwmci_host, move quirks field into Exynos driver's chip data, where it can be statically defined. No functional change. Signed-off-by: Sam Protsenko --- Changes in v2: - Repla

[PATCH v2 28/40] mmc: exynos_dw_mmc: Read common clock-frequency property

2024-06-09 Thread Sam Protsenko
Instead of using non-standard "bus_hz" dts property, read common "clock-frequency" property used in upstream Linux kernel. It's safe to do so, as "clock-frequency" property was already added to corresponding nodes in all affected Exynos device tree files. No function

[PATCH v2 27/40] mmc: exynos_dw_mmc: Read common bus-width property

2024-06-09 Thread Sam Protsenko
Instead of using non-standard "samsung,bus-width" dts property, read common "bus-width" property used in upstream Linux kernel. It's safe to do so, as "bus-width" property was already added to corresponding nodes in all affected Exynos device tree files. No function

[PATCH v2 26/40] mmc: exynos_dw_mmc: Refactor fixed CIU clock divider

2024-06-09 Thread Sam Protsenko
r this change were taken from dw_mmc-exynos.c driver in Linux kernel. No functional change. Signed-off-by: Sam Protsenko --- drivers/mmc/ca_dw_mmc.c | 2 +- drivers/mmc/exynos_dw_mmc.c | 43 + include/dwmmc.h | 2 -- 3 files changed, 30 inse

[PATCH v2 25/40] mmc: exynos_dw_mmc: Abstract CLKSEL register

2024-06-09 Thread Sam Protsenko
CLKSEL register offset may vary between different Exynos chips, e.g. on ARM64 vs ARM32 chips. Provide a way to specify its offset value for each compatible instead of hard-coding its value in read/write calls. No functional change. Signed-off-by: Sam Protsenko --- drivers/mmc/exynos_dw_mmc.c

[PATCH v2 24/40] mmc: exynos_dw_mmc: Read upstream SDR timing properties

2024-06-09 Thread Sam Protsenko
es instead of the old one. All affected dts files were already updated accordingly. No functional change. Signed-off-by: Sam Protsenko --- drivers/mmc/exynos_dw_mmc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exyn

[PATCH v2 23/40] mmc: exynos_dw_mmc: Convert to use livetree API

2024-06-09 Thread Sam Protsenko
Update the driver to use livetree API instead of FDT one. No functional change. Signed-off-by: Sam Protsenko --- Changes in v2: - Moved exynos_dwmmc_of_to_plat() under #ifdef CONFIG_DM_MMC stanza drivers/mmc/exynos_dw_mmc.c | 17 - 1 file changed, 8 insertions(+), 9

[PATCH v2 22/40] mmc: exynos_dw_mmc: Use .of_to_plat for device tree parsing

2024-06-09 Thread Sam Protsenko
exynos_dwmci_get_config() is called from the probe function and used to read data from device tree. Make use of .of_to_plat driver callback instead, and convert exynos_dwmci_get_config() to match its signature. No functional change. Signed-off-by: Sam Protsenko --- drivers/mmc/exynos_dw_mmc.c

[PATCH v2 21/40] mmc: exynos_dw_mmc: Obtain and use CIU clock via CCF API

2024-06-09 Thread Sam Protsenko
to abstract getting/setting the sclk rate. Then add CCF clock support to those functions for ARM64 platforms. Fixes: a082a2dde061 ("EXYNOS5: DWMMC: Added FDT support for DWMMC") Signed-off-by: Sam Protsenko --- Changes in v2: - Replaced CONFIG_IS_ENABLED() with #ifdef drivers/mmc/exyno

[PATCH v2 20/40] mmc: exynos_dw_mmc: Don't call pinmux functions on ARM64 chips

2024-06-09 Thread Sam Protsenko
s_dw_mmc.o: in function `do_dwmci_init': undefined reference to `exynos_pinmux_config' Fixes: a082a2dde061 ("EXYNOS5: DWMMC: Added FDT support for DWMMC") Signed-off-by: Sam Protsenko --- Changes in v2: - Replaced CONFIG_IS_ENABLED() with #ifdef drivers/mmc/exynos_dw_mm

[PATCH v2 19/40] mmc: exynos_dw_mmc: Fix getting private data in exynos_dwmci_board_init()

2024-06-09 Thread Sam Protsenko
rom exynos_dwmci_clksel() and using it for getting the private data in exynos_dwmci_board_init() Fixes: 3537ee879e04 ("mmc: exynos_dw_mmc: support the Driver mode for Exynos") Signed-off-by: Sam Protsenko --- drivers/mmc/exynos_dw_mmc.c | 20 +--- 1 file changed, 13 ins

[PATCH v2 18/40] mmc: exynos_dw_mmc: Fix obtaining the base address of controller

2024-06-09 Thread Sam Protsenko
] host->ioaddr = (void *)base; Use livetree API instead (dev_read_addr_ptr()), which handles this correctly. Fixes: a082a2dde061 ("EXYNOS5: DWMMC: Added FDT support for DWMMC") Signed-off-by: Sam Protsenko --- drivers/mmc/exynos_dw_mmc.c | 7 +++ 1 file changed, 3 insertions(+)

[PATCH v2 17/40] arm: exynos: Add header guard for dwmmc.h

2024-06-09 Thread Sam Protsenko
Add missing header guard to prevent possible build errors. Fixes: 77b55e8cfcee ("ARM: exynos: move SoC sources to mach-exynos") Signed-off-by: Sam Protsenko --- arch/arm/mach-exynos/include/mach/dwmmc.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-exynos/in

[PATCH v2 15/40] arm: dts: exynos: Add upstream DW MMC properties to all Exynos dts

2024-06-09 Thread Sam Protsenko
register description in TRM): fifo-depth = ((fifoth_val >> 16) + 1) * 2 * bus-width: generic replacement for samsung,bus-width * clock-frequency: generic replacement for bus_hz * non-removable: generic replacement for samsung,removable = <0> No functional change. Signed

[PATCH v2 14/40] mmc: dw_mmc: Improve coding style

2024-06-09 Thread Sam Protsenko
Fix most of checkpatch warnings and other obvious style issues. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v2: - Added R-b tag from Quentin drivers/mmc/dw_mmc.c | 69 ++-- include/dwmmc.h | 149

[PATCH v2 16/40] dt-bindings: exynos: Update bindings doc for DW MMC controller

2024-06-09 Thread Sam Protsenko
Update the bindings doc for Exynos DW MMC block to follow the upstream example and reflect the latest changes made in corresponding Linux kernel bindings. Signed-off-by: Sam Protsenko --- doc/device-tree-bindings/exynos/dwmmc.txt | 46 +-- 1 file changed, 27 insertions

[PATCH v2 13/40] mmc: dw_mmc: Fix kernel-doc comments in dwmmc.h

2024-06-09 Thread Sam Protsenko
Rework kernel-doc comments in dwmmc.h header so it's actually possible to generate a proper documentation from it usin scripts/kernel-doc script, with no errors. No functional change. Signed-off-by: Sam Protsenko --- include/dwmmc.h | 41 ++--- 1 file

[PATCH v2 12/40] mmc: dw_mmc: Replace fifoth_val property with fifo-depth

2024-06-09 Thread Sam Protsenko
, and pulls common FIFOTH register value calculation into core dw_mmc driver where it belongs. No functional change. Signed-off-by: Sam Protsenko --- drivers/mmc/dw_mmc.c | 21 + drivers/mmc/exynos_dw_mmc.c | 10 +- drivers/mmc/ftsdc010_mci.h| 1

  1   2   3   4   5   6   7   8   >