Re: [U-Boot] [i.MX8MM+CCF 11/41] clk: fixed_rate: export clk_fixed_rate

2019-05-16 Thread Lukasz Majewski
On Thu, 9 May 2019 01:13:15 + Peng Fan wrote: > > Subject: Re: [i.MX8MM+CCF 11/41] clk: fixed_rate: export > > clk_fixed_rate > > > > On Wed, 8 May 2019 07:45:39 + > > Peng Fan wrote: > > > > > > -Original Message- >

[U-Boot] [PATCH v1 2/3] ARM: imx: config: Disable support for USB on MCCMON6

2019-05-16 Thread Lukasz Majewski
The IMX6Q based MCCMON6 is not using USB for any purpose. Signed-off-by: Lukasz Majewski --- configs/mccmon6_nor_defconfig | 2 -- configs/mccmon6_sd_defconfig | 2 -- include/configs/mccmon6.h | 5 - 3 files changed, 9 deletions(-) diff --git a/configs/mccmon6_nor_defconfig b

[U-Boot] [PATCH v1 3/3] ARM: imx: Disable 1Gbps support on MCCMON6's KSZ9031 PHY

2019-05-16 Thread Lukasz Majewski
mccmon6 works in 10/100 MiB Ethernet environment, so disabling 1GiB support improves robustness of the network after power up (as one don't need to wait for autoneg). Signed-off-by: Lukasz Majewski --- include/configs/mccmon6.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include

[U-Boot] [PATCH v1 1/3] ARM: imx: cosmetic: Remove not needed comment from the mccmon6.h file

2019-05-16 Thread Lukasz Majewski
This comment is a leftover from the Kconfig CONFIG_*MTD* move. Signed-off-by: Lukasz Majewski --- include/configs/mccmon6.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/configs/mccmon6.h b/include/configs/mccmon6.h index a1774c027a..b97373512f 100644 --- a/include/configs

[U-Boot] [PATCH v1 0/3] imx: Cleanup i.MX6Q mccmon6 board configuration

2019-05-16 Thread Lukasz Majewski
anch: SHA1: 5b4b680cfe29a67171ccbe439c66374cb31faca3 Lukasz Majewski (3): ARM: imx: cosmetic: Remove not needed comment from the mccmon6.h file ARM: imx: config: Disable support for USB on MCCMON6 ARM: imx: Disable 1Gbps support on MCCMON6's KSZ9031 PHY configs/mccmon6_nor_defconfig | 2 -- configs/mccmon6_sd_defc

Re: [U-Boot] [i.MX8MM+CCF 11/41] clk: fixed_rate: export clk_fixed_rate

2019-05-08 Thread Lukasz Majewski
On Wed, 8 May 2019 07:45:39 + Peng Fan wrote: > > -Original Message- > > From: Lukasz Majewski [mailto:lu...@denx.de] > > Sent: 2019年5月8日 15:40 > > To: Peng Fan > > Cc: sba...@denx.de; feste...@gmail.com; dl-uboot-imx > > ; s...@chromium.or

Re: [U-Boot] [i.MX8MM+CCF 03/41] clk: introduce clk_dev_binded

2019-05-08 Thread Lukasz Majewski
On Wed, 8 May 2019 07:41:18 + Peng Fan wrote: > > -Original Message- > > From: Lukasz Majewski [mailto:lu...@denx.de] > > Sent: 2019年5月8日 15:31 > > To: Peng Fan > > Cc: sba...@denx.de; feste...@gmail.com; dl-uboot-imx > > ; s...@chromium.or

Re: [U-Boot] [PATCH v1] config: Update KP's imx53 HSC config to pass key pressed information

2019-05-08 Thread Lukasz Majewski
Hi Stefano, > The information about pressed key is relevant in performing correct > update and recovery scenarios via USB pendrive. > > This commit modifies envs to provide it. > > Signed-off-by: Lukasz Majewski > Please drop this standalone patch, as I've ju

Re: [U-Boot] [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue"

2019-05-08 Thread Lukasz Majewski
On Wed, 8 May 2019 13:59:14 + Peng Fan wrote: > > -Original Message- > > From: Lukasz Majewski [mailto:lu...@denx.de] > > Sent: 2019年5月8日 14:38 > > To: Peng Fan > > Cc: u-boot@lists.denx.de; Tom Rini ; Marcel > > Ziswiler ; Fabio Estevam >

[U-Boot] [PATCH v1 2/2] config: Update KP's imx53 HSC config to pass key pressed information

2019-05-08 Thread Lukasz Majewski
The information about pressed key is relevant in performing correct update and recovery scenarios via USB pendrive. This commit modifies envs to provide it. Signed-off-by: Lukasz Majewski --- include/configs/kp_imx53.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs

[U-Boot] [PATCH v1 1/2] config: Update KP's imx53 HSC config to support SWUpdate

2019-05-08 Thread Lukasz Majewski
This commit updates envs responsible for using USB pendrive as a SWUpdate based tool for recovery and update. Signed-off-by: Lukasz Majewski --- include/configs/kp_imx53.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/configs/kp_imx53.h b/include/configs

[U-Boot] [PATCH v1] config: Update KP's imx53 HSC config to pass key pressed information

2019-05-08 Thread Lukasz Majewski
The information about pressed key is relevant in performing correct update and recovery scenarios via USB pendrive. This commit modifies envs to provide it. Signed-off-by: Lukasz Majewski --- include/configs/kp_imx53.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs

Re: [U-Boot] [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue"

2019-05-08 Thread Lukasz Majewski
On Wed, 8 May 2019 13:03:58 + BOUGH CHEN wrote: > > -Original Message- > > From: Lukasz Majewski [mailto:lu...@denx.de] > > Sent: 2019年5月8日 19:38 > > To: Peng Fan > > Cc: u-boot@lists.denx.de; Tom Rini ; Marcel > > Ziswiler ; Fabio Estevam >

Re: [U-Boot] [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue"

2019-05-08 Thread Lukasz Majewski
Hi Peng, > > Subject: Re: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode > > clock setting issue" > > > > On Wed, 8 May 2019 08:19:45 +0200 > > Lukasz Majewski wrote: > > > > > Hi Peng, > > > > > > > Hi Luk

Re: [U-Boot] [i.MX8MM+CCF 11/41] clk: fixed_rate: export clk_fixed_rate

2019-05-08 Thread Lukasz Majewski
On Wed, 8 May 2019 06:51:46 + Peng Fan wrote: > > -Original Message- > > From: Lukasz Majewski [mailto:lu...@denx.de] > > Sent: 2019年5月8日 14:46 > > To: Peng Fan > > Cc: sba...@denx.de; feste...@gmail.com; dl-uboot-imx > > ; s...@chromium.or

Re: [U-Boot] [i.MX8MM+CCF 03/41] clk: introduce clk_dev_binded

2019-05-08 Thread Lukasz Majewski
t; + return false; > > > +} > > > diff --git a/include/clk.h b/include/clk.h index > > > a4ecca9fbc..8199119d01 100644 > > > --- a/include/clk.h > > > +++ b/include/clk.h > > > @@ -337,4 +337,13 @@ static inline bool clk_valid(struct clk *clk) >

Re: [U-Boot] [i.MX8MM+CCF 04/41] clk: use clk_dev_binded

2019-05-08 Thread Lukasz Majewski
ux = to_clk_mux(clk); > + struct clk_mux *mux = to_clk_mux(clk_dev_binded(clk) ? > + (struct clk > *)dev_get_driver_data(clk->dev) : clk); u32 val; Maybe the (clk_dev_binded(clk) ? (struct clk *)dev_get_driver_data(clk->dev) : clk) Could be an inline func

Re: [U-Boot] [PATCH v3 00/11] clk: Port Linux common clock framework [CCF] to U-boot (tag: 5.0-rc3)

2019-05-08 Thread Lukasz Majewski
ing described above design decisions. Thanks in advance. > Repository: > https://github.com/lmajewski/u-boot-dfu/commits/CCF-v3 > > > Changes in v3: > - New patch > - The rate information is now cached into struct clk field > - The clk_get_parent() is used to get pointer to the p

Re: [U-Boot] [i.MX8MM+CCF 12/41] clk: fixed_rate: add pre reloc flag

2019-05-08 Thread Lukasz Majewski
rrect. For device tree that cannot be > modified by U-Boot, eg: DT passed from previous bootloader, the only > way to support pre-relocation binding is to add DM_FLAG_PRE_RELOC in > the U-Boot driver. But as fair as I understand - the discussion is about SPL, not u-boot's proper pre-location

Re: [U-Boot] [i.MX8MM+CCF 12/41] clk: fixed_rate: add pre reloc flag

2019-05-08 Thread Lukasz Majewski
e it work without the DM_FLAG_PRE_RELOC, > Right? > > Thanks, > Peng. > > > > > +#include "imx6qdl-u-boot.dtsi" > > + > > +/ { > > + clocks { > > + u-boot,dm-spl; > > + osc { > > +

Re: [U-Boot] [i.MX8MM+CCF 11/41] clk: fixed_rate: export clk_fixed_rate

2019-05-08 Thread Lukasz Majewski
ver, the "osc" or in your case "clock-osc-24m" shall be available in "clocks" DTS node and hence parsed / setup from there (and be available in the clk uclass list). > + > + /* Configure ARM PLL to 1.2GHz */ > + clk_get_by_id(IMX8MM_ARM_PLL, ); >

Re: [U-Boot] [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue"

2019-05-08 Thread Lukasz Majewski
On Wed, 8 May 2019 08:19:45 +0200 Lukasz Majewski wrote: > Hi Peng, > > > Hi Lukasz, > > > > > Subject: [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock > > > setting issue" > > > > > > This reverts commit 72a89e0da5

Re: [U-Boot] [i.MX8MM+CCF 08/41] clk: export mux/divider ops

2019-05-08 Thread Lukasz Majewski
inside > composite clk. Please then write a detailed rationale for this change in commit message or a comment in the header file. The one from the original message seems to be not enough. > The Linux CCF also exports it. > > You could check the clk-composite-imx8m and clk-compo

Re: [U-Boot] [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue"

2019-05-08 Thread Lukasz Majewski
240 set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 pre_div: 8 div: 12 set_sysctl: clk: 2240 set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 pre_div: 0 div: 3 set_sysctl: clk: 48 set_sysctl: pre_div = 2 mmc->ddr: 0 sdhc_clk: 8000 pre_div: 0 div: 1 set_sysctl: clk: 16

[U-Boot] [PATCH] Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue"

2019-05-07 Thread Lukasz Majewski
of pre_div and div generation showed that those values are generated in a way, which is not matching the ones from working setup. As the original patch was performing code refactoring, let's revert this change, so all imx53 boards would work again. Signed-off-by: Lukasz Majewski --- drivers/mmc

Re: [U-Boot] [PATCH v3 0/3] ARM: meson: Add G12A USB Support

2019-05-07 Thread Lukasz Majewski
wc3/dwc3-meson-g12a.c| 456 > >>> ++ 9 files changed, 1173 insertions(+) > >>> create mode 100644 arch/arm/include/asm/arch-meson/usb.h > >>> create mode 100644 drivers/phy/meson-g12a-usb2.c > >>> create mode 100644 drivers/p

Re: [U-Boot] [PATCH v2 1/4] disk: efi: Fix memory leak on 'gpt guid'

2019-05-07 Thread Lukasz Majewski
On Tue, 7 May 2019 09:10:28 +0200 Eugeniu Rosca wrote: > Hi Lukasz, > > On Tue, May 07, 2019 at 09:03:15AM +0200, Lukasz Majewski wrote: > [..] > > Reviewed-by: Lukasz Majewski > > > > > > Best regards, > > > > Lukasz Majewski >

Re: [U-Boot] [PATCH v2 4/4] lib: uuid: Fix unseeded PRNG on RANDOM_UUID=y

2019-05-07 Thread Lukasz Majewski
patch/1092944/ > --- > lib/uuid.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/uuid.c b/lib/uuid.c > index fa20ee39fc32..2d4d6ef7e461 100644 > --- a/lib/uuid.c > +++ b/lib/uuid.c > @@ -238,6 +238,8 @@ void gen_rand_uuid(unsigned char *uuid_bin) > unsigned in

Re: [U-Boot] [PATCH v2 1/4] disk: efi: Fix memory leak on 'gpt guid'

2019-05-07 Thread Lukasz Majewski
--- a/disk/part_efi.c > +++ b/disk/part_efi.c > @@ -209,6 +209,8 @@ int get_disk_guid(struct blk_desc * dev_desc, > char *guid) guid_bin = gpt_head->disk_guid.b; > uuid_bin_to_str(guid_bin, guid, UUID_STR_FORMAT_GUID); > > + /* Remember to free pte */ > + free(gpt_pte)

Re: [U-Boot] [PATCH v2 2/4] disk: efi: Fix memory leak on 'gpt verify'

2019-05-07 Thread Lukasz Majewski
(is_gpt_valid(dev_desc, (dev_desc->lba - 1), >gpt_head, gpt_pte) != 1) { > printf("%s: *** ERROR: Invalid Backup GPT ***\n", Reviewed-by: Lukasz Majewski Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Dire

Re: [U-Boot] [PATCH v2 3/4] cmd: gpt: fix and tidy up help message

2019-05-07 Thread Lukasz Majewski
ot; gpt guid mmc 0 varname\n" > #ifdef CONFIG_CMD_GPT_RENAME > "gpt partition renaming commands:\n" > - "gpt swap\n" > + " gpt read \n" > + "- read GPT into a data structure for manipulation\n" > + " g

Re: [U-Boot] [i.MX8MM+CCF 12/41] clk: fixed_rate: add pre reloc flag

2019-05-06 Thread Lukasz Majewski
,dm-spl; + osc { + u-boot,dm-spl; + }; + }; +}; + + { + u-boot,dm-pre-reloc; +}; Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82

Re: [U-Boot] [i.MX8MM+CCF 13/41] clk: imx: import clk heplers

2019-05-06 Thread Lukasz Majewski
> flags); + > +#define __imx8m_clk_composite(name, parent_names, reg, flags) \ > + imx8m_clk_composite_flags(name, parent_names, \ > + ARRAY_SIZE(parent_names), reg, \ > + flags | CLK_SET_RATE_NO_REPARENT | > CLK_OPS_PARENT_ENABLE) + > +#define imx8m_clk_composite

Re: [U-Boot] [i.MX8MM+CCF 11/41] clk: fixed_rate: export clk_fixed_rate

2019-05-06 Thread Lukasz Majewski
it is available in early SPL (parsed from dts /clocks property - the 24MHz OSC) > + > +#define to_clk_fixed_rate(dev) ((struct clk_fixed_rate > *)dev_get_platdata(dev)) + > int clk_register(struct clk *clk, const char *drv_name, >ulong drv_data, const char *na

Re: [U-Boot] [i.MX8MM+CCF 07/41] clk: mux: add set parent support

2019-05-06 Thread Lukasz Majewski
include/linux/clk-provider.h index 3458746a60..216095d28c 100644 > --- a/include/linux/clk-provider.h > +++ b/include/linux/clk-provider.h > @@ -56,6 +56,8 @@ struct clk_mux { > }; > > #define to_clk_mux(_clk) container_of(_clk, struct clk_mux, clk) > +extern const stru

Re: [U-Boot] [i.MX8MM+CCF 08/41] clk: export mux/divider ops

2019-05-06 Thread Lukasz Majewski
ne CLK_DIVIDER_MAX_AT_ZERO BIT(6) > +extern const struct clk_ops clk_divider_ops; > Why do we need to export clk_divider_ops? Why iMX8MM requires it? > struct clk_fixed_factor { > struct clk clk; Best regards, Lukasz Majewski -- DENX Software Engineeri

Re: [U-Boot] [i.MX8MM+CCF 10/41] divider set rate supporrt

2019-05-06 Thread Lukasz Majewski
er->flags & CLK_DIVIDER_HIWORD_MASK) { > + val = clk_div_mask(divider->width) << > (divider->shift + 16); > + } else { > + val = readl(divider->reg); > + val &= ~(clk_div_mask(divider->width) << > divider->s

Re: [U-Boot] [i.MX8MM+CCF 06/41] cmd: clk: print err value when clk_get_rate failed

2019-05-06 Thread Lukasz Majewski
printf("%-30.30s : err=%ld\n", dev->name, > rate); > clk_free(); > } Reviewed-by: Lukasz Majewski Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Ki

Re: [U-Boot] [i.MX8MM+CCF 05/41] clk-provider: sync more clk flags from Linux Kernel

2019-05-06 Thread Lukasz Majewski
e > forwarded to the parent clock */ +#define > CLK_DUTY_CYCLE_PARENT BIT(13) #define > CLK_MUX_INDEX_ONE BIT(0) #define > CLK_MUX_INDEX_BIT BIT(1) Reviewed-by: Lukasz Majewski Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: W

Re: [U-Boot] [i.MX8MM+CCF 04/41] clk: use clk_dev_binded

2019-05-06 Thread Lukasz Majewski
62,8 @@ int clk_mux_val_to_index(struct clk *clk, u32 > *table, unsigned int flags, > static u8 clk_mux_get_parent(struct clk *clk) > { > - struct clk_mux *mux = to_clk_mux(clk); > + struct clk_mux *mux = to_clk_mux(clk_dev_binded(clk) ? > + (struct clk >

Re: [U-Boot] [i.MX8MM+CCF 03/41] clk: introduce clk_dev_binded

2019-05-06 Thread Lukasz Majewski
-ENOENT on error > */ > int clk_get_by_id(ulong id, struct clk **clkp); > + > +/** > + * clk_dev_binded() - Check whether the clk has a device binded > + * > + * @clk A pointer to the clk > + * > + * @return true on binded, or false on no > + */ >

Re: [U-Boot] [i.MX8MM+CCF 02/41] clk: fixed-factor: fix get clk_fixed_factor

2019-05-06 Thread Lukasz Majewski
to_clk_fixed_factor((struct clk > *)dev_get_driver_data(clk->dev)); unsigned long parent_rate = > clk_get_parent_rate(clk); unsigned long long int rate; > Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Of

Re: [U-Boot] [i.MX8MM+CCF 01/41] clk: correct get clk_x pointer

2019-05-06 Thread Lukasz Majewski
> @@ -27,7 +27,7 @@ struct clk_pllv3 { > static ulong clk_pllv3_get_rate(struct clk *clk) > { > struct clk_pllv3 *pll = > - (struct clk_pllv3 *)dev_get_driver_data(clk->dev); > + to_clk_pllv3((struct clk > *)dev_get_driver_data(clk->dev)); un

Re: [U-Boot] [i.MX8MM+CCF 00/41] i.MX8MM + CCF

2019-05-06 Thread Lukasz Majewski
mx8mm_evk/lpddr4_timing.c create mode 100644 > board/freescale/imx8mm_evk/spl.c create mode 100644 > configs/imx8mm_evk_defconfig create mode 100644 > drivers/clk/clk-composite.c create mode 100644 drivers/clk/clk-gate.c > create mode 100644 drivers/clk/imx/clk-composite-8m.c > c

Re: [U-Boot] [PATCH v2 3/3] mach-meson: g12a: add DWC2 peripheral mode support

2019-05-06 Thread Lukasz Majewski
Hi Neil, > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > Hi Lukasw, > > Le 19/04/2019 08:17, Lukasz Majewski a écrit : > > Hi Neil, > > > >> Adds support for Amlogic G12A USB Device mode. > >> > >> The DWC2 Controller be

Re: [U-Boot] DM for ci_udc

2019-05-06 Thread Lukasz Majewski
. > > +CC Lukasz, UDC is his stuff. > Note: [1] - https://lists.denx.de/pipermail/u-boot/2018-June/333105.html Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,

Re: [U-Boot] [i.MX8MM+CCF 00/41] i.MX8MM + CCF

2019-05-06 Thread Lukasz Majewski
  |    2 > > +- > > >>   drivers/clk/imx/clk.h  | > > 106 ++ > > >>   drivers/core/uclass.c  | > >   2 +- > > >>   drivers/ddr/imx/imx8m/helper.c   

Re: [U-Boot] [PATCH 00/18] autoboot: Tidy up autoboot code

2019-05-06 Thread Lukasz Majewski
On Sun, 5 May 2019 15:53:24 -0600 Simon Glass wrote: > This series cleans up autoboot.c a bit to: > > - Convert options to Kconfig > - Use C code instead of C preprocessor where possible > - Add a few comments > Reviewed-by: Lukasz Majewski > > Simon Glass (18): &

Re: [U-Boot] [PATCH] lib: uuid: Improve randomness of uuid values on RANDOM_UUID=y

2019-04-27 Thread Lukasz Majewski
/lib/uuid.c > @@ -238,6 +238,8 @@ void gen_rand_uuid(unsigned char *uuid_bin) > unsigned int *ptr = (unsigned int *) > int i; > > + srand(get_timer(0)); > + > /* Set all fields randomly */ > for (i = 0; i < sizeof(struct uuid) / sizeof(*ptr); i++) &

Re: [U-Boot] [PATCH v3 07/11] dm: clk: Define clk_get_parent_rate() for clk operations

2019-04-26 Thread Lukasz Majewski
; Unfortunately, u-boot's DM support for getting parent is different > > (the parent relationship is in udevice) than the one in common > > clock framework (CCF) in Linux. > > > > To alleviate this problem - the clk_get_parent_rate() function has > > been i

Re: [U-Boot] [PATCH] imx: hab: Increase CSF_SIZE for i.MX6 and i.MX7 devices

2019-04-25 Thread Lukasz Majewski
> In this case the total image size in boot data structure must cover > the entire binary otherwise the dek_blob won't be copied to memory > and image won't be decrypted. > > Increase CSF_SIZE to 0x4000 to avoid such issue when booting encrypted > boot images. Reviewed-by: Lukas

[U-Boot] [PATCH v3 10/11] clk: test: Provide unit test for clk_get_parent_rate() method

2019-04-25 Thread Lukasz Majewski
ing the pointer to proper struct clk. It uses internally clk_get_parent() method also tested by this test. Signed-off-by: Lukasz Majewski --- Changes in v3: - New patch arch/sandbox/include/asm/clk.h | 8 drivers/clk/clk_sandbox_test.c | 26 ++ test/dm/cl

[U-Boot] [PATCH v3 06/11] dm: clk: Define clk_get_parent() for clk operations

2019-04-25 Thread Lukasz Majewski
clk of parent the pdev->driver_data field is read. Signed-off-by: Lukasz Majewski --- Changes in v3: - New patch drivers/clk/clk-uclass.c | 15 +++ include/clk.h| 9 + 2 files changed, 24 insertions(+) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/

[U-Boot] [PATCH v3 03/11] clk: Remove clock ID check in .get_rate() of clk_fixed_*

2019-04-25 Thread Lukasz Majewski
This check requires the struct clk passed to .get_rate() to be always cleared out as any clock with valid ID causes -EINVAL return value. The return code of fixed clocks shall always be returned. Signed-off-by: Lukasz Majewski --- Changes in v3: None drivers/clk/clk_fixed_factor.c | 3

[U-Boot] [PATCH v3 11/11] clk: Port Linux common clock framework [CCF] for imx6q to U-boot (tag: 5.0-rc3)

2019-04-25 Thread Lukasz Majewski
t;set" part of the clock management. Signed-off-by: Lukasz Majewski --- Changes in v3: None drivers/clk/Kconfig| 14 drivers/clk/Makefile | 2 + drivers/clk/clk-divider.c | 148 ++ drivers/clk/clk-fixed-fact

[U-Boot] [PATCH v3 08/11] dm: clk: Define clk_get_by_id() for clk operations

2019-04-25 Thread Lukasz Majewski
ook for UCLASS_CLK related udevices. Signed-off-by: Lukasz Majewski --- Changes in v3: - Replace -ENODEV with -ENOENT - Use **clkp instead of **c drivers/clk/clk-uclass.c | 22 ++ include/clk.h| 11 +++ 2 files changed, 33 insertions(+) diff --git a/drivers/clk/

[U-Boot] [PATCH v3 09/11] clk: test: Provide unit test for clk_get_by_id() method

2019-04-25 Thread Lukasz Majewski
clk. Signed-off-by: Lukasz Majewski --- Changes in v3: - New patch arch/sandbox/include/asm/clk.h | 8 drivers/clk/clk_sandbox_test.c | 23 +++ test/dm/clk.c | 3 ++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/arch/sand

[U-Boot] [PATCH v3 05/11] clk: Provide struct clk for fixed rate clock (clk_fixed_rate.c)

2019-04-25 Thread Lukasz Majewski
this change struct clk is accessible from udevice and udevice from struct clk. Signed-off-by: Lukasz Majewski --- Changes in v3: None drivers/clk/clk_fixed_rate.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c index 50dbb13655

[U-Boot] [PATCH v3 07/11] dm: clk: Define clk_get_parent_rate() for clk operations

2019-04-25 Thread Lukasz Majewski
this problem - the clk_get_parent_rate() function has been introduced to clk-uclass.c. Signed-off-by: Lukasz Majewski --- Changes in v3: - The rate information is now cached into struct clk field - The clk_get_parent() is used to get pointer to the parent struct clk drivers/clk/clk-uclass.c | 22

[U-Boot] [PATCH v3 04/11] clk: Extend struct clk to provide information regarding clock rate

2019-04-25 Thread Lukasz Majewski
This commit extends the struct clk to provide information regarding the clock rate. As a result the clock tree traversal is performed at most once, and further reads are using the cached value. Signed-off-by: Lukasz Majewski --- Changes in v3: None include/clk.h | 2 ++ 1 file changed, 2

[U-Boot] [PATCH v3 01/11] dm: Fix documentation entry as there is no UCLASS_CLOCK uclass

2019-04-25 Thread Lukasz Majewski
There is no UCLASS_CLOCK uclass defined. Instead we do use the UCLASS_CLK. Signed-off-by: Lukasz Majewski Reviewed-by: Simon Glass --- Changes in v3: None include/clk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/clk.h b/include/clk.h index 8e366163f9

[U-Boot] [PATCH v3 02/11] cmd: Do not show frequency for clocks which .get_rate() return error

2019-04-25 Thread Lukasz Majewski
wing reusing default implementation of this command. Signed-off-by: Lukasz Majewski Reviewed-by: Simon Glass --- Changes in v3: None cmd/clk.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/clk.c b/cmd/clk.c index fd4231589c..2ea82176aa 100644 --- a/cmd/clk.c +++ b/cmd/

[U-Boot] [PATCH v3 00/11] clk: Port Linux common clock framework [CCF] to U-boot (tag: 5.0-rc3)

2019-04-25 Thread Lukasz Majewski
wski/u-boot-dfu/commits/CCF-v3 Changes in v3: - New patch - The rate information is now cached into struct clk field - The clk_get_parent() is used to get pointer to the parent struct clk - Replace -ENODEV with -ENOENT - Use **clkp instead of **c - New patch - New patch Lukasz Majewski (11): dm: Fix doc

Re: [U-Boot] [PATCH v3 1/2] eeprom: fix DM_I2C support without CONFIG_SYS_I2C_EEPROM_BUS

2019-04-23 Thread Lukasz Majewski
Hi Simon, > The current device model enabled eeprom code only works if > CONFIG_SYS_I2C_EEPROM_BUS is set. > > This patch makes it work without that define so that the bus > number passed to 'eeprom_init' is used. Reviewed-by: Lukasz Majewski > > Signed-off-by: Simon Go

[U-Boot] [PATCH v2] pinctrl: imx: Define imx6_pinctrl_soc_info in .data section

2019-04-23 Thread Lukasz Majewski
one wants to configure pins before relocation via DTS/DM, the board hangs (imx6q SoC powered one) as only OCRAM area is available (0x009x). This commit prevents from this issue by moving the imx6_pinctrl_soc_info structure to data section (from BSS). Signed-off-by: Lukasz Majewski --- Changes in

Re: [U-Boot] [PATCH v2 00/10] clk: imx: Add i.MX6 CLK support

2019-04-23 Thread Lukasz Majewski
Hi Peng, > > -Original Message- > > From: Lukasz Majewski [mailto:lu...@denx.de] > > Sent: 2019年4月23日 16:46 > > To: Peng Fan > > Cc: Jagan Teki ; Stefano Babic > > ; Fabio Estevam ; Simon Glass > > ; Tom Rini ; Marek Vasut > > ; Neil Arm

Re: [U-Boot] [PATCH v2 00/10] clk: imx: Add i.MX6 CLK support

2019-04-23 Thread Lukasz Majewski
On Tue, 23 Apr 2019 07:47:38 + Peng Fan wrote: > Hi Lukasz, > > > -Original Message- > > From: Lukasz Majewski [mailto:lu...@denx.de] > > Sent: 2019年4月20日 6:18 > > To: Peng Fan > > Cc: Jagan Teki ; Stefano Babic > > ; Fabio Estevam

Re: [U-Boot] Is mmc still being actively maintained?

2019-04-22 Thread Lukasz Majewski
; > > > > > > > > Thanks, > > > Peng. > > > ___ > > > U-Boot mailing list > > > U-Boot@lists.denx.de > > > https://lists.denx.de/listinfo/u-boot > > > > > > > &

Re: [U-Boot] Is mmc still being actively maintained?

2019-04-19 Thread Lukasz Majewski
e great if you could help with maintaining this code as a dedicated Custodian. > > Thanks, > Peng. > ___ > U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot Best regards, Lukasz Majewski -- DENX Sof

Re: [U-Boot] [PATCH v2 00/10] clk: imx: Add i.MX6 CLK support

2019-04-19 Thread Lukasz Majewski
On Fri, 19 Apr 2019 08:52:28 + Peng Fan wrote: > > On Fri, 19 Apr 2019 11:56:25 +0530 > > Jagan Teki wrote: > > > > > On Fri, Apr 5, 2019 at 2:20 AM Lukasz Majewski > > > wrote: > > > > > > > > Hi Jagan, > &

[U-Boot] [GIT] Pull request: u-boot-dfu v2 (14.04.2019)

2019-04-19 Thread Lukasz Majewski
| 7 ++ 21 files changed, 670 insertions(+), 229 deletions(-) create mode 100644 doc/device-tree-bindings/usb/dwc2.txt Travis-CI: https://travis-ci.org/lmajewski/u-boot-dfu/builds/522181824 Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolf

Re: [U-Boot] [GIT] Pull request: u-boot-dfu (14.04.2019)

2019-04-19 Thread Lukasz Majewski
Hi Marek, > On 4/19/19 1:23 PM, Lukasz Majewski wrote: > > Dear Marek, > > > > The following changes since commit > > 1f4ae66eaab29bfb5d1eb44996f7826c9cd01ed1: > > [...] > > > Peng Fan (1): > > MLK-12883 usb: limit USB_MAX_XFER_BLK

Re: [U-Boot] [PATCH] Convert CONFIG_SUPPORT_EMMC_BOOT to Kconfig

2019-04-19 Thread Lukasz Majewski
ul > dms-ba16-1g pico-pi-imx7d 02: configs: Resync with savedefconfig 03: > Convert CONFIG_SUPPORT_EMMC_BOOT to Kconfig Acked-by: Lukasz Majewski > > README | 3 --- > configs/am57xx_evm_defconfig | 1 + > con

[U-Boot] [GIT] Pull request: u-boot-dfu (14.04.2019)

2019-04-19 Thread Lukasz Majewski
ki/u-boot-dfu/builds/522040767 Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de pgpaVSO9p6Paa.pgp

Re: [U-Boot] [PATCH v2 00/10] clk: imx: Add i.MX6 CLK support

2019-04-19 Thread Lukasz Majewski
On Fri, 19 Apr 2019 11:56:25 +0530 Jagan Teki wrote: > On Fri, Apr 5, 2019 at 2:20 AM Lukasz Majewski wrote: > > > > Hi Jagan, > > > > > On Thu, Apr 4, 2019 at 3:31 PM Lukasz Majewski > > > wrote: > > > > > > > &

Re: [U-Boot] [PATCH v2 05/10] clk: imx: Add imx6q clock tree support

2019-04-19 Thread Lukasz Majewski
PLL2_PFD2_396M]= PLL_PFD(pfd_352m, > 0x100, 6, 2), + > + [IMX6QDL_CLK_USDHC1_SEL]= MUX(usdhc_sel, 0x01c, 16, > 1), > + [IMX6QDL_CLK_USDHC2_SEL]= MUX(usdhc_sel, 0x01c, 17, > 1), > + [IMX6QDL_CLK_USDHC3_SEL]= MUX(usdhc_sel, 0x01c, 18, > 1), > +

Re: [U-Boot] [PATCH] usb: dwc2: fix gadget disconnect

2019-04-19 Thread Lukasz Majewski
> state */ > + if (gotgint & GOTGINT_SES_END_DET) { > + debug_cond(DEBUG_ISR, "\t\tSession End > Detected\n"); > + /* Let gadget detect disconnected state */ > if (dev->driver->disconnect) {

Re: [U-Boot] [PATCH] usb: reload watchdog during ums command

2019-04-19 Thread Lukasz Majewski
tor(struct ums *ums_dev, > ulong start, lbaint_t blkcnt, void *buf) > @@ -226,6 +227,8 @@ static int do_usb_mass_storage(cmd_tbl_t *cmdtp, > int flag, rc = CMD_RET_SUCCESS; > goto cleanup_register; > } > + > +

Re: [U-Boot] [PATCH v2 3/3] mach-meson: g12a: add DWC2 peripheral mode support

2019-04-19 Thread Lukasz Majewski
+} > + > +int board_usb_cleanup(int index, enum usb_init_type init) > +{ > + const void *blob = gd->fdt_blob; > + struct udevice *dev; > + int node; > + int ret; > + > + /* find the usb glue node */ > + node = fdt_node_offset_by_compatible(blob

Re: [U-Boot] [RFC PATCH v2] MLK-12883 usb: limit USB_MAX_XFER_BLK to 256

2019-04-09 Thread Lukasz Majewski
have issues, limiting > > this to 256 Could you name those devices? > > +* fixes this. > > +*/ > > + blk = 256; > > #else > > blk = 20; > > #endif > > -- > > 2.20.1 > > Adding in Lukasz now that get_maintainers.p

Re: [U-Boot] [PATCH v2] ARM: dts: i.MX6Q: fix avoid_unnecessary_addr_size warnings

2019-04-09 Thread Lukasz Majewski
; }; > > ipu2_di0: port@2 { > + #address-cells = <1>; > + #size-cells = <0>; > reg = <2>; > > ipu2_di0_disp0: endpoint@0 { >

Re: [U-Boot] [PATCH 16/16] stm32mp1: add stusb1600 support for DK1 and DK2 board

2019-04-08 Thread Lukasz Majewski
ssion-valid"); > + dev_read_bool(dev, "u-boot,force-b-session-valid"); > > /* force platdata according compatible */ > drvdata = dev_get_driver_data(dev); > @@ -1075,6 +1075,9 @@ static void > dwc2_set_stm32mp1_hsotg_params(struct dwc2_plat_o

Re: [U-Boot] [PATCH 13/16] usb: dwc2: add support for STM32MP1

2019-04-08 Thread Lukasz Majewski
M_IN_EPS_SHIFT 26 > + > +/* OTG general core configuration register (OTG_GCCFG:0x38) for > STM32MP1 */ +#define GGPIO_STM32_OTG_GCCFG_VBDEN BIT(21) > +#define GGPIO_STM32_OTG_GCCFG_IDENBIT(22) > + > #endif > diff --git a/include/usb/dwc2_udc.h b/include/usb/dwc2_udc.h > index

Re: [U-Boot] [PATCH 11/16] usb: dwc2_udc_otg: Read MAX_HW_ENDPOINT from HWCFG4 register

2019-04-08 Thread Lukasz Majewski
t_endp[16]; > - u8 res5[768]; > + u8 res6[768]; > struct ep_fifo ep[16]; > }; > > @@ -273,4 +276,8 @@ struct dwc2_usbotg_reg { > /* Device ALL Endpoints Interrupt Register (DAINT) */ > #define DAINT_IN_EP_INT(x)(x << 0) > #define

Re: [U-Boot] [PATCH 12/16] usb: dwc2_udc_otg: Add tx_fifo_sz array support

2019-04-08 Thread Lukasz Majewski
void*priv; > @@ -22,6 +23,8 @@ struct dwc2_plat_otg_data { > unsigned intrx_fifo_sz; > unsigned intnp_tx_fifo_sz; > unsigned inttx_fifo_sz; > + unsigned inttx_fifo_sz_array[DWC2_MAX_HW_ENDPOINTS]; > + unsigned char tx_fifo_sz_nb; >

Re: [U-Boot] [PATCH 09/16] usb: dwc2: Add force-b-session-valid support

2019-04-08 Thread Lukasz Majewski
CFG */ > #define PTXFE_HALF (0<<8) > diff --git a/include/usb/dwc2_udc.h b/include/usb/dwc2_udc.h > index 4068de0..3cf20ea 100644 > --- a/include/usb/dwc2_udc.h > +++ b/include/usb/dwc2_udc.h > @@ -22,6 +22,7 @@ struct dwc2_plat_otg_data { > unsigne

Re: [U-Boot] [PATCH 10/16] usb: dwc2: Add function for session B check

2019-04-08 Thread Lukasz Majewski
clude/usb/dwc2_udc.h b/include/usb/dwc2_udc.h > index 3cf20ea..8a426b6 100644 > --- a/include/usb/dwc2_udc.h > +++ b/include/usb/dwc2_udc.h > @@ -27,4 +27,6 @@ struct dwc2_plat_otg_data { > > int dwc2_udc_probe(struct dwc2_plat_otg_data *pdata); > > +int dwc2_udc_B_sess

Re: [U-Boot] [PATCH 08/16] usb: dwc2: force reset assert before to probe the driver

2019-04-08 Thread Lukasz Majewski
eset_release_bulk(resets); > return ret; Reviewed-by: Lukasz Majewski Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+4

Re: [U-Boot] [PATCH 07/16] usb: dwc2: convert driver to DM_USB_GADGET

2019-04-08 Thread Lukasz Majewski
return ret; > + > + ret = clk_enable_bulk(clks); > + if (ret) { > + clk_release_bulk(clks); > + return ret; > + } > + > + return 0; > +} > + > +static int dwc2_udc_otg_probe(struct udevice *dev) > +{ > + struct dwc2_pl

Re: [U-Boot] [PATCH 06/16] usb: dwc2: remove unused variable regs_otg

2019-04-08 Thread Lukasz Majewski
egs_otg = (void *)pdata->regs_otg; */ > - > dev->gadget.is_dualspeed = 1; /* Hack only*/ > dev->gadget.is_otg = 0; > dev->gadget.is_a_peripheral = 0; Reviewed-by: Lukasz Majewski Best regards, Lukasz Majewski -- DENX Software Engineering GmbH,

[U-Boot] [imx-next PATCH v1] config: Update KP's imx53 HSC|DDC boards config to support SWUpdate

2019-04-08 Thread Lukasz Majewski
This commit updates envs responsible for using USB perdrive as a tool for recovery / update. Signed-off-by: Lukasz Majewski --- include/configs/kp_imx53.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/configs/kp_imx53.h b/include/configs/kp_imx53.h index

Re: [U-Boot] [PATCH v3] net: phy: implement fallback mechanism for negative phy adresses

2019-04-07 Thread Lukasz Majewski
t; #endif > > > > if (!phydev) > > - phydev = phy_find_by_mask(bus, 1 << addr, > > interface); > > + phydev = phy_find_by_mask(bus, mask, interface); > > > > if (phydev) > > phy_connect_dev(phydev, dev); > > T

Re: [U-Boot] [PATCH v2 00/10] clk: imx: Add i.MX6 CLK support

2019-04-04 Thread Lukasz Majewski
Hi Jagan, > On Thu, Apr 4, 2019 at 3:31 PM Lukasz Majewski wrote: > > > > On Thu, 4 Apr 2019 14:56:36 +0530 > > Jagan Teki wrote: > > > > > On Thu, Apr 4, 2019 at 2:31 PM Lukasz Majewski > > > wrote: > > > > > > &

[U-Boot] [imx-next PATCH v1 00/14] imx: Fully convert HSC|DDC K+P i.MX53 based boards to use DM/DTS

2019-04-04 Thread Lukasz Majewski
tch series applies on top of u-boot-imx -next branch SHA1: 9648463488735e13328f8738c56251e1fb941e51 Lukasz Majewski (14): ARM: Remove HSC|DDC ETH PHY reset code after switching to DM/DTS DTS: Add esdhc3 device tree description tuning for HSC|DDC boards ARM: Enable CONFIG_DM_MMC and CONFIG_DM_

[U-Boot] [imx-next PATCH v1 13/14] Convert CONFIG_USB_EHCI_MX5 to Kconfig

2019-04-04 Thread Lukasz Majewski
This converts the following to Kconfig: CONFIG_USB_EHCI_MX5 Signed-off-by: Lukasz Majewski --- configs/kp_imx53_defconfig | 1 + configs/m53menlo_defconfig | 1 + configs/mx51evk_defconfig| 1 + configs/mx53loco_defconfig | 1 + configs/mx53ppd_defconfig| 1 + configs

[U-Boot] [PATCH 2/2] DTS: imx53: Add imx53-kp-u-boot.dtsi file with u-boot specific property

2019-04-04 Thread Lukasz Majewski
This file adds the "u-boot,i2c-transaction-bytes" to mc34708 PMIC. Signed-off-by: Lukasz Majewski --- arch/arm/dts/imx53-kp-u-boot.dtsi | 10 ++ 1 file changed, 10 insertions(+) create mode 100644 arch/arm/dts/imx53-kp-u-boot.dtsi diff --git a/arch/arm/dts/imx53-kp-u-bo

[U-Boot] [PATCH 1/2] DM: I2C: Introduce 'u-boot, i2c-transaction-bytes' property

2019-04-04 Thread Lukasz Majewski
be not enough to have the full transmission. 4. We end up with I2C inconsistency with MC34708. This PMIC device requires 24+ SCL cycles to make finish any pending I2C transmission. Signed-off-by: Lukasz Majewski --- doc/device-tree-bindings/i2c/i2c.txt | 5 + drivers/i2c/i2c-uclass.c

[U-Boot] [imx-next PATCH v1 09/14] ARM: Remove EHCI specific code from HSC|DDC board file

2019-04-04 Thread Lukasz Majewski
As EHCI on i.MX5 has been converted to driver model, the board specific code, necessary for VBUS USB power supply setup is not needed anymore. Signed-off-by: Lukasz Majewski --- board/k+p/kp_imx53/kp_imx53.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/board/k+p/kp_imx53

[U-Boot] [imx-next PATCH v1 14/14] boot.src: Provide dsa_core.blacklist bootarg when booting via NFS

2019-04-04 Thread Lukasz Majewski
This setup is a bit special as Linux kernel (4.19) is not supporting in-kernel NFS rootfs mount and Distributed Switch Architecture (DSA) operation. For that reason it was necessary to provide a bootarg to allow userspace enable it afterwards if needed. Signed-off-by: Lukasz Majewski

[U-Boot] [imx-next PATCH v1 12/14] ARM: config: Remove not needed CONFIG_MXC_USB_PORT define

2019-04-04 Thread Lukasz Majewski
After i.MX5's EHCI conversion to DM, the CONFIG_MXC_USB_PORT is not needed anymore and should be removed. Signed-off-by: Lukasz Majewski --- include/configs/kp_imx53.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/configs/kp_imx53.h b/include/configs/kp_imx53.h index 9bbf590b72

<    5   6   7   8   9   10   11   12   13   14   >