Re: [PATCH 1/3] rockchip: block: simplify rkmtd driver

2024-10-18 Thread Johan Jonker
imon. https://source.denx.de/u-boot/u-boot/-/blob/master/test/dm/host.c?ref_type=heads#L71 This rkmtd driver makes use of devm_kzalloc(). All the memory that rkmtd reserves is freed. But if I remember well somehow I was not able to free all memory on unbind and was not able to find the source, so I did

Re: [PATCH] doc: rockchip: Clarify the rkspi image format further

2024-02-11 Thread Johan Jonker
ead more then 2k regardless of the page size. === This info must be written in a more neutral wording.(no bugs involved) Just describe the 2 formats and the SoC's that use it. Johan === Extra: Could someone cleanup README.rockchip The file README.rockchip has most building scenarios covered by n

Re: [PATCH v2 13/20] rockchip: migrate hardware.h inclusion into appropriate files

2024-02-09 Thread Johan Jonker
On 2/9/24 10:50, Quentin Schulz wrote: > From: Quentin Schulz > > hardware.h is only defining macros which are "wrappers" around writel(). > > writel() is however not available in hardware.h, needs to be > included. This means in order to use the wrappers in hardware.h, one > also needs to i

[PATCH v1] arm: dts: rockchip: rk3288: move to 64 bit reg size

2023-12-27 Thread Johan Jonker
To make automatic Rockchip DT syncing possible from Linux to U-boot prepare rk3288.dtsi by moving to 64 bit reg size. Signed-off-by: Johan Jonker --- arch/arm/dts/rk3288-evb.dtsi | 2 +- arch/arm/dts/rk3288-firefly.dtsi | 2 +- arch/arm/dts/rk3288-miqi.dtsi| 2 +- arch

Re: [PATCH 13/17] video: rockchip: Add rk3328 vop support

2023-12-16 Thread Johan Jonker
tree. Together with a simple basic rockchip_vop.c to start with. Not sure if we need a kind of DRM frame work. Question: What do the U-boot maintainers think of this DRM implementation in use by Rockchip. Is that a route that useful for mainline? Let me know your ideas. Johan On 12/11/23 09

Re: [tom.r...@gmail.com: Fwd: New Defects reported by Coverity Scan for Das U-Boot]

2023-11-07 Thread Johan Jonker
Hi Tom, Simon, Please have a look some comments below at 3 issues that are introduced by meself. ;) On 11/6/23 21:27, Tom Rini wrote: > Hey all, > > Here's the latest report. I _think_ I passed the right options to > get_maintainer.pl such that it would only look far enough back in git to > fin

[PATCH v3] rockchip: include: asm: fix entering download mode rk3066

2023-10-27 Thread Johan Jonker
the end of the function that reads boot blocks. >From there the BROM code goes into a download mode and waits for data on USB OTG and UART0. Signed-off-by: Johan Jonker --- Note: Normal U-boot flow is OK. In download mode this binary hangs after return to BROM for unknown reaso

Re: [RESEND PATCH v2] rockchip: include: asm: fix entering download mode rk3066

2023-10-27 Thread Johan Jonker
Hi Tom, Simon, The test for my patch ends with an error that is reported on various locations on the internet. My knowledge is limited here. Could you have a look? Thanks, Johan rockchip: include: asm: fix entering download mode rk3066 https://source.denx.de/u-boot/custodians/u-boot

[PATCH v5 8/8] rockchip: configs: sandbox: enable rkmtd command

2023-10-18 Thread Johan Jonker
Enable rkmtd command for testing with sandbox_defconfig and sandbox64_defconfig. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass --- Changed V3: New patch --- configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs

[PATCH v5 7/8] rockchip: doc: add rkmtd.rst

2023-10-18 Thread Johan Jonker
Add documention for Rockchip rkmtd virtual block device. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang Reviewed-by: Simon Glass --- Changed V3: New patch --- doc/board/rockchip/index.rst | 1 + doc/board/rockchip/rkmtd.rst | 105 +++ 2 files changed

[PATCH v5 6/8] rockchip: test: dm: add rkmtd test

2023-10-18 Thread Johan Jonker
Add Rockchip rkmtd test: Create/attach/detach RKMTD device. Send/read data with Rockchip boot block header. Test that reusing the same label should work. Basic test of 'rkmtd' commands. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang Reviewed-by: Simon Glass --- Changed

[PATCH v5 5/8] rockchip: cmd: add rkmtd command

2023-10-18 Thread Johan Jonker
ID. Data is then verified. When a block turns out bad the block header is discarded. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass --- Changed V4: Sort includes Changed V3: Split driver from command Split header Restyle --- cmd/Kconfig | 8 ++

[PATCH v5 4/8] rockchip: block: blk-uclass: add bounce buffer flag to blk_desc

2023-10-18 Thread Johan Jonker
Currently bounce buffer support is enabled for all block devices when available. Add a flag to blk_desc to enable only on demand. Signed-off-by: Johan Jonker --- Changed V5: New patch --- drivers/block/blk-uclass.c | 4 ++-- drivers/scsi/scsi.c| 4 include/blk.h | 1

[PATCH v5 3/8] rockchip: block: add rkmtd class and drivers

2023-10-18 Thread Johan Jonker
Add rkmtd class and drivers to create a virtual block device to transfer Rockchip boot block data to and from NAND with block orientated tools like "ums" and "rockusb". Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- Changed V5: Use devres_alloc in bind Restyle

[PATCH v5 2/8] rockchip: dm: prepare rkmtd UCLASS

2023-10-18 Thread Johan Jonker
Prepare a rkmtd UCLASS in use for writing Rockchip boot blocks in combination with existing userspace tools and rockusb command. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- disk/part.c| 4 drivers/block/blk-uclass.c | 1 + include/dm/uclass-id.h | 1 + 3

[PATCH v5 1/8] mtd: nand: raw: rockchip_nfc: add NAND_SKIP_BBTSCAN option

2023-10-18 Thread Johan Jonker
. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- drivers/mtd/nand/raw/Kconfig| 9 + drivers/mtd/nand/raw/rockchip_nfc.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index d624589a892b..72547f00fbec 100644

[PATCH v5 0/8] Add rkmtd command

2023-10-18 Thread Johan Jonker
hanged V3: Add documetation Add test Split driver from command Split header Use devm_kzalloc Remove out of memory debug Restyle Changed V2: Rename to rkmtd Johan Jonker (8): mtd: nand: raw: rockchip_nfc: add NAND_SKIP_BBTSCAN option rockchip: dm: prepare rkmtd UCLASS rock

Re: [PATCH v4 4/8] rockchip: block: blk-uclass: disable bounce buffer support for rkmtd

2023-10-17 Thread Johan Jonker
On 10/16/23 23:54, Simon Glass wrote: > Hi Johan, > > On Sun, 15 Oct 2023 at 16:33, Johan Jonker wrote: >> >> Disable bounce buffer support for rkmtd. >> >> Signed-off-by: Johan Jonker >> Reviewed-by: Kever Yang >> --- >> >> Changed

[PATCH v4 8/8] rockchip: configs: sandbox: enable rkmtd command

2023-10-15 Thread Johan Jonker
Enable rkmtd command for testing with sandbox_defconfig and sandbox64_defconfig. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass --- Changed V3: New patch --- configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs

[PATCH v4 7/8] rockchip: doc: add rkmtd.rst

2023-10-15 Thread Johan Jonker
Add documention for Rockchip rkmtd virtual block device. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang Reviewed-by: Simon Glass --- Changed V3: New patch --- doc/board/rockchip/index.rst | 1 + doc/board/rockchip/rkmtd.rst | 105 +++ 2 files changed

[PATCH v4 6/8] rockchip: test: dm: add rkmtd test

2023-10-15 Thread Johan Jonker
Add Rockchip rkmtd test: Create/attach/detach RKMTD device. Send/read data with Rockchip boot block header. Test that reusing the same label should work. Basic test of 'rkmtd' commands. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang Reviewed-by: Simon Glass --- Changed

[PATCH v4 5/8] rockchip: cmd: add rkmtd command

2023-10-15 Thread Johan Jonker
ID. Data is then verified. When a block turns out bad the block header is discarded. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass --- Changed V4: Sort includes Changed V3: Split driver from command Split header Restyle --- cmd/Kconfig | 8 ++

[PATCH v4 4/8] rockchip: block: blk-uclass: disable bounce buffer support for rkmtd

2023-10-15 Thread Johan Jonker
Disable bounce buffer support for rkmtd. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- Changed V3: New patch --- drivers/block/blk-uclass.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index

[PATCH v4 3/8] rockchip: block: add rkmtd class and drivers

2023-10-15 Thread Johan Jonker
Add rkmtd class and drivers to create a virtual block device to transfer Rockchip boot block data to and from NAND with block orientated tools like "ums" and "rockusb". Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- Changed V4: sort includes replace constant b

[PATCH v4 2/8] rockchip: dm: prepare rkmtd UCLASS

2023-10-15 Thread Johan Jonker
Prepare a rkmtd UCLASS in use for writing Rockchip boot blocks in combination with existing userspace tools and rockusb command. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- disk/part.c| 4 drivers/block/blk-uclass.c | 1 + include/dm/uclass-id.h | 1 + 3

[PATCH v4 1/8] mtd: nand: raw: rockchip_nfc: add NAND_SKIP_BBTSCAN option

2023-10-15 Thread Johan Jonker
. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- drivers/mtd/nand/raw/Kconfig| 9 + drivers/mtd/nand/raw/rockchip_nfc.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index d624589a892b..72547f00fbec 100644

[PATCH v4 0/8] Add rkmtd command

2023-10-15 Thread Johan Jonker
eader Use devm_kzalloc Remove out of memory debug Restyle Changed V2: Rename to rkmtd Johan Jonker (8): mtd: nand: raw: rockchip_nfc: add NAND_SKIP_BBTSCAN option rockchip: dm: prepare rkmtd UCLASS rockchip: block: add rkmtd class and drivers rockchip: block: blk-uclass: disable bo

[PATCH v3] rockchip: configs: sandbox: enable rkmtd command

2023-10-13 Thread Johan Jonker
Enable rkmtd command for testing with sandbox_defconfig and sandbox64_defconfig. Signed-off-by: Johan Jonker --- configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig index

Re: [PATCH v3 2/7] rockchip: dm: prepare rkmtd UCLASS

2023-10-13 Thread Johan Jonker
On 10/13/23 18:57, Simon Glass wrote: > Hi Johan, > > On Thu, 12 Oct 2023 at 13:51, Johan Jonker wrote: >> >> Prepare a rkmtd UCLASS in use for writing Rockchip boot blocks >> in combination with existing userspace tools and rockusb command. >> >> Sign

[PATCH v3 7/7] rockchip: doc: add rkmtd.rst

2023-10-12 Thread Johan Jonker
Add documention for Rockchip rkmtd virtual block device. Signed-off-by: Johan Jonker --- Changed V3: New patch --- doc/board/rockchip/index.rst | 1 + doc/board/rockchip/rkmtd.rst | 105 +++ 2 files changed, 106 insertions(+) create mode 100644 doc/board

[PATCH v3 5/7] rockchip: cmd: add rkmtd command

2023-10-12 Thread Johan Jonker
ID. Data is then verified. When a block turns out bad the block header is discarded. Signed-off-by: Johan Jonker --- Changed V3: Split driver from command Split header Restyle --- cmd/Kconfig | 8 ++ cmd/Makefile | 1 + cmd/rkmtd.c | 204

[PATCH v3 3/7] rockchip: block: add rkmtd class and drivers

2023-10-12 Thread Johan Jonker
Add rkmtd class and drivers to create a virtual block device to transfer Rockchip boot block data to and from NAND with block orientated tools like "ums" and "rockusb". Signed-off-by: Johan Jonker --- Changed V3: New patch Split driver from command Split header Use d

[PATCH v3 4/7] rockchip: block: blk-uclass: disable bounce buffer support for rkmtd

2023-10-12 Thread Johan Jonker
Disable bounce buffer support for rkmtd. Signed-off-by: Johan Jonker --- Changed V3: New patch --- drivers/block/blk-uclass.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index 30ad5bbb0024..ac1b43d757d8

[PATCH v3 6/7] rockchip: test: dm: add rkmtd test

2023-10-12 Thread Johan Jonker
Add Rockchip rkmtd test: Create/attach/detach RKMTD device. Send/read data with Rockchip boot block header. Test that reusing the same label should work. Basic test of 'rkmtd' commands. Signed-off-by: Johan Jonker --- Changed V3: New patch --- test/dm/Makefile | 1 + test/dm/rkmt

[PATCH v3 1/7] mtd: nand: raw: rockchip_nfc: add NAND_SKIP_BBTSCAN option

2023-10-12 Thread Johan Jonker
. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- drivers/mtd/nand/raw/Kconfig| 9 + drivers/mtd/nand/raw/rockchip_nfc.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index d624589a892b..72547f00fbec 100644

[PATCH v3 2/7] rockchip: dm: prepare rkmtd UCLASS

2023-10-12 Thread Johan Jonker
Prepare a rkmtd UCLASS in use for writing Rockchip boot blocks in combination with existing userspace tools and rockusb command. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- disk/part.c| 4 drivers/block/blk-uclass.c | 1 + include/dm/uclass-id.h | 1 + 3

[PATCH v3 0/7] Add rkmtd command

2023-10-12 Thread Johan Jonker
e NAND ID. Data is then verified. When a block turns out bad the block header is discarded. Changed V3: Add documetation Add test Split driver from command Split header Use devm_kzalloc Remove out of memory debug Restyle Changed V2: Rename to rkmtd Johan Jonker (7): mtd: nand:

Re: [PATCH v2 2/3] dm: prepare rkmtd UCLASS

2023-10-12 Thread Johan Jonker
On 10/2/23 03:16, Simon Glass wrote: > Hi Johan, > > On Thu, 28 Sept 2023 at 12:51, Johan Jonker wrote: >> >> Prepare a rkmtd UCLASS in use for writing Rockchip boot blocks >> in combination with existing userspace tools and rockusb command. >> >> Sign

[PATCH v2 3/3] rockchip: cmd: add rkmtd command

2023-09-28 Thread Johan Jonker
ID. Data is then verified. When a block turns out bad the block header is discarded. Signed-off-by: Johan Jonker --- Changed V2: rename to rkmtd change function call restyle --- cmd/Kconfig |7 + cmd/Makefile |1 + cmd/rkmtd.c | 1432

[PATCH v2 2/3] dm: prepare rkmtd UCLASS

2023-09-28 Thread Johan Jonker
Prepare a rkmtd UCLASS in use for writing Rockchip boot blocks in combination with existing userspace tools and rockusb command. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- disk/part.c| 4 drivers/block/blk-uclass.c | 1 + include/dm/uclass-id.h | 1 + 3

[PATCH v2 1/3] mtd: nand: raw: rockchip_nfc: add NAND_SKIP_BBTSCAN option

2023-09-28 Thread Johan Jonker
. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- drivers/mtd/nand/raw/Kconfig| 9 + drivers/mtd/nand/raw/rockchip_nfc.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index d624589a892b..72547f00fbec 100644

[PATCH v2 0/3] Add rkmtd command

2023-09-28 Thread Johan Jonker
shtool r 64 512 > rkflashtool_r_64_512.img # ums ums 0 rkmtd 0 dd if=idbloader.img of=/dev/sda1 dd if=/dev/sda1 of=ums_0_idb_0_rd.img Johan Jonker (3): mtd: nand: raw: rockchip_nfc: add NAND_SKIP_BBTSCAN option dm: p

[RESEND PATCH v2] rockchip: include: asm: fix entering download mode rk3066

2023-09-19 Thread Johan Jonker
the end of the function that reads boot blocks. >From there the BROM code goes into a download mode and waits for data on USB OTG and UART0. Signed-off-by: Johan Jonker --- Note: Normal boot flow is OK. In download mode this binary hangs after return to BROM for unknown reasons. Replace C

Re: [PATCH v2] rockchip: include: asm: fix entering download mode rk3066

2023-09-19 Thread Johan Jonker
Hi, It looks as if all the TABs are gone. Will resend. Johan On 9/19/23 16:57, Johan Jonker wrote: > Keep track of the re-entries with help of the lr register. > This binary can be re-used and called from various BROM functions. > Only when it's called from the part that handle

[PATCH v2] rockchip: include: asm: fix entering download mode rk3066

2023-09-19 Thread Johan Jonker
the end of the function that reads boot blocks. >From there the BROM code goes into a download mode and waits for data on USB OTG and UART0. Signed-off-by: Johan Jonker --- Note: Normal boot flow is OK. In download mode this binary hangs after return to BROM for unknown reasons. Replace CODE47

Re: [PATCH v1] rockchip: include: asm: fix entering download mode rk3066

2023-09-13 Thread Johan Jonker
the lr register address is not in the functions that handles USB OTG and UART0. Proposal 2: Instead of a retry_counter test LR: 0x1058. In all other cases skip early return Let me know your ideas/advice! How rk3188 handle return flag? Johan / //main read loop rk3066 boot

[PATCH v1] rockchip: include: asm: fix entering download mode rk3066

2023-09-11 Thread Johan Jonker
n download mode and waits for data on USB OTG and UART0. Signed-off-by: Johan Jonker --- arch/arm/include/asm/arch-rockchip/boot0.h | 32 +++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/boot0.h b/arch/arm/include/asm/arch-r

Re: [PATCH 2/2] doc: rockchip: Update and complete info about RK3308

2023-09-03 Thread Johan Jonker
=> ./tools/mkimage -n rk3308 -T rksd -d > /path/to/rkbin/bin/rk33/rk3308_ddr_589MHz_uart2_m0_v1.26.bin idbloader.img > - => cat spl/u-boot-spl.bin >> idbloader.img > Hi Massimo, The text in this document should moved to doc/board/rockchip. This paragraph abov

[PATCH v1 3/3] rockchip: cmd: add rockmtd command

2023-08-24 Thread Johan Jonker
is then verified. When a block turns out bad the block header is discarded. Signed-off-by: Johan Jonker --- cmd/Kconfig |7 + cmd/Makefile |1 + cmd/rockmtd.c | 1429 + 3 files changed, 1437 insertions(+) create mode 100644 cmd/rockmtd.c

[PATCH v1 2/3] dm: prepare rkmtd UCLASS

2023-08-24 Thread Johan Jonker
Prepare a rkmtd UCLASS in use for writing Rockchip boot blocks in combination with existing userspace tools and rockusb command. Signed-off-by: Johan Jonker --- disk/part.c| 4 drivers/block/blk-uclass.c | 1 + include/dm/uclass-id.h | 1 + 3 files changed, 6 insertions

[PATCH v1 1/3] mtd: nand: raw: rockchip_nfc: add NAND_SKIP_BBTSCAN option

2023-08-24 Thread Johan Jonker
. Signed-off-by: Johan Jonker --- drivers/mtd/nand/raw/Kconfig| 9 + drivers/mtd/nand/raw/rockchip_nfc.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index d624589a892b..72547f00fbec 100644 --- a/drivers/mtd/nand

[PATCH v1 0/3] Add rockmtd command

2023-08-24 Thread Johan Jonker
rkflashtool w 64 512 < idbloader.img rkflashtool r 64 512 > rkflashtool_r_64_512.img # ums ums 0 rkmtd 0 dd if=idbloader.img of=/dev/sda1 dd if=/dev/sda1 of=ums_0_idb_0_rd.img Johan Jonker (3): mtd: nand: raw: r

[PATCH v1] mtd: nand: raw: rockchip_nfc: copy hwecc PA data to oob_poi buffer

2023-06-22 Thread Johan Jonker
out. Signed-off-by: Johan Jonker --- drivers/mtd/nand/raw/rockchip_nfc.c | 34 ++--- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/drivers/mtd/nand/raw/rockchip_nfc.c b/drivers/mtd/nand/raw/rockchip_nfc.c index 5fcf6a6b..274489ec 100644 --- a/drivers/mtd/n

Re: [PATCH v10] core: fdtaddr: use map_sysmem() as cast for the return (part 2)

2023-05-11 Thread Johan Jonker
On 5/11/23 09:12, Kever Yang wrote: > Hi Johan, > >     The patch v9 has merged, it will be better to send a new patch if more > change needed, Merging logic with 2 maintainers... This is a separate new patch for Simon. He applied that (part 1) first, then the nfc serie was mer

[PATCH v10] core: fdtaddr: use map_sysmem() as cast for the return (part 2)

2023-05-10 Thread Johan Jonker
For the devfdt_get_addr_size_index_ptr() function use map_sysmem() function as cast for the return for use in sandbox. Signed-off-by: Johan Jonker --- drivers/core/fdtaddr.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/core/fdtaddr.c b/drivers/core/fdtaddr.c

Re: [PATCH v8 00/24] Fixes for Rockchip NFC driver part 1

2023-04-23 Thread Johan Jonker
On 4/23/23 03:51, Kever Yang wrote: > Hi Johan, > > On 2023/4/21 23:34, Johan Jonker wrote: >> >> On 4/21/23 05:15, Kever Yang wrote: >>> Hi Johan, >>> >>> I got below error report from CI test, I

[PATCH v9] core: fdtaddr: use map_sysmem() as cast for the return

2023-04-23 Thread Johan Jonker
For the devfdt_get_addr_index_ptr() and devfdt_get_addr_size_index_ptr() function use map_sysmem() function as cast for the return for use in sandbox. Also fix sandbox test. Signed-off-by: Johan Jonker --- Apply after: [PATCH v8 00/24] Fixes for Rockchip NFC driver part 1 with replacement

Re: [PATCH v8 00/24] Fixes for Rockchip NFC driver part 1

2023-04-22 Thread Johan Jonker
On 4/21/23 17:34, Johan Jonker wrote: > > > On 4/21/23 05:15, Kever Yang wrote: >> Hi Johan, >> >>     I got below error report from CI test, I think it should be relate to >> this patch set. >> >> === FAILURES &

Re: [PATCH v8 00/24] Fixes for Rockchip NFC driver part 1

2023-04-21 Thread Johan Jonker
On 4/21/23 05:15, Kever Yang wrote: > Hi Johan, > >     I got below error report from CI test, I think it should be relate to > this patch set. > > === FAILURES > === > 1107 > <https://source.de

[PATCH v9] core: fdtaddr: add devfdt_get_addr_size_index_ptr function

2023-04-21 Thread Johan Jonker
Add devfdt_get_addr_size_index_ptr function with the same functionality as devfdt_get_addr_size_index, but instead a return pointer is given. Suggested-by: Michael Nazzareno Trimarchi Signed-off-by: Johan Jonker Reviewed-by: Michael Trimarchi Reviewed-by: Simon Glass --- Changed V9: remove

Re: [PATCH v1 1/6] rockchip: gpio: rk_gpio: use ROCKCHIP_GPIOS_PER_BANK as divider

2023-03-20 Thread Johan Jonker
On 3/20/23 02:32, Kever Yang wrote: > Hi Johan, > > On 2023/3/19 19:34, Johan Jonker wrote: >> >> On 3/18/23 21:20, Simon Glass wrote: >>> Hi Johan, >>> >>> On Thu, 16 Mar 2023 at 10:46, Johan Jonker wrote: >>>> The current divi

[PATCH v2 6/6] rockchip: configs: mk808: enable usb support

2023-03-19 Thread Johan Jonker
Enable usb support in the mk808_defconfig. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass --- configs/mk808_defconfig | 10 ++ 1 file changed, 10 insertions(+) diff --git a/configs/mk808_defconfig b/configs/mk808_defconfig index 5a264eb9..b7dcd163 100644 --- a/configs

[PATCH v2 5/6] rockchip: configs: mk808: change CONFIG_TPL_TEXT_BASE

2023-03-19 Thread Johan Jonker
Currently the Rockchip rk3066a u-boot-tpl.bin file needs to add the characters "RK30", while the other SoCs replace the first 4 bytes. Bring this in line with the rest by lowering CONFIG_TPL_TEXT_BASE and update rockchip.rst instructions. Signed-off-by: Johan Jonker Reviewed-by: S

[PATCH v2 4/6] arm: dts: rockchip: sync rk3066/rk3188 DT files from linux-next v6.2-rc4

2023-03-19 Thread Johan Jonker
Sync rk3066/rk3188 DT files from Linux. This is the state as of linux-next v6.2-rc4. New nfc node for MK808 rk3066a. CRU nodes now have a clock property. To prefend dtoc errors a fixed clock must also be included for tpl/spl in the rk3xxx-u-boot.dtsi file. Signed-off-by: Johan Jonker Reviewed-by

[PATCH v2 3/6] arm: dts: rockchip: rk3188-u-boot: add gpio-ranges

2023-03-19 Thread Johan Jonker
The gpio node names are made generic, but without gpio bank ID. Add gpio-ranges to rk3188-u-boot.dtsi for now till a better method is found. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass --- arch/arm/dts/rk3188-u-boot.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git

[PATCH v2 2/6] arm: dts: rockchip: rk3066a-u-boot: add gpio-ranges

2023-03-19 Thread Johan Jonker
The gpio node names are made generic, but without gpio bank ID. Add gpio-ranges to rk3066a-u-boot.dtsi for now till a better method is found. Disable gpio6 as the driver gives an error code on return as status. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass --- Changed V2: disable

[PATCH v2 1/6] rockchip: gpio: rk_gpio: use ROCKCHIP_GPIOS_PER_BANK as divider

2023-03-19 Thread Johan Jonker
The current divider to calculate the bank ID can change. Given the Rockchip TRM not all gpio-banks have 32 pins per bank. The "gpio-ranges" syntax allows multiple items with variable number of pins. Use a constant ROCKCHIP_GPIOS_PER_BANK as fixed divider. Signed-off-by: Johan Jonker R

Re: [PATCH v1 1/6] rockchip: gpio: rk_gpio: use ROCKCHIP_GPIOS_PER_BANK as divider

2023-03-19 Thread Johan Jonker
On 3/19/23 13:20, Jonas Karlman wrote: > Hi Johan, > On 2023-03-19 12:34, Johan Jonker wrote: >> >> >> On 3/18/23 21:20, Simon Glass wrote: >>> Hi Johan, >>> >>> On Thu, 16 Mar 2023 at 10:46, Johan Jonker wrote: >>>> >>&

Re: [PATCH v1 1/6] rockchip: gpio: rk_gpio: use ROCKCHIP_GPIOS_PER_BANK as divider

2023-03-19 Thread Johan Jonker
On 3/18/23 21:20, Simon Glass wrote: > Hi Johan, > > On Thu, 16 Mar 2023 at 10:46, Johan Jonker wrote: >> >> The current divider to calculate the bank ID can change. >> Use a constant ROCKCHIP_GPIOS_PER_BANK as fixed divider. > > What is the motivation

[PATCH v1 6/6] rockchip: configs: mk808: enable usb support

2023-03-16 Thread Johan Jonker
Enable usb support in the mk808_defconfig. Signed-off-by: Johan Jonker --- configs/mk808_defconfig | 10 ++ 1 file changed, 10 insertions(+) diff --git a/configs/mk808_defconfig b/configs/mk808_defconfig index 548df9c5..3e9bdb14 100644 --- a/configs/mk808_defconfig +++ b/configs

[PATCH v1 5/6] rockchip: configs: mk808: change CONFIG_TPL_TEXT_BASE

2023-03-16 Thread Johan Jonker
Currently the Rockchip rk3066a u-boot-tpl.bin file needs to add the characters "RK30", while the other SoCs replace the first 4 bytes. Bring this in line with the rest by lowering CONFIG_TPL_TEXT_BASE and update rockchip.rst instructions. Signed-off-by: Johan Jonker Reviewed-by: S

[PATCH v1 4/6] arm: dts: rockchip: sync rk3066/rk3188 DT files from linux-next v6.2-rc4

2023-03-16 Thread Johan Jonker
Sync rk3066/rk3188 DT files from Linux. This is the state as of linux-next v6.2-rc4. New nfc node for MK808 rk3066a. CRU nodes now have a clock property. To prefend dtoc errors a fixed clock must also be included for tpl/spl in the rk3xxx-u-boot.dtsi file. Signed-off-by: Johan Jonker --- arch

[PATCH v1 3/6] arm: dts: rockchip: rk3188-u-boot: add gpio-ranges

2023-03-16 Thread Johan Jonker
The gpio node names are made generic, but without gpio bank ID. Add gpio-ranges to rk3188-u-boot.dtsi for now till a better method is found. Signed-off-by: Johan Jonker --- arch/arm/dts/rk3188-u-boot.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/dts/rk3188-u

[PATCH v1 2/6] arm: dts: rockchip: rk3066a-u-boot: add gpio-ranges

2023-03-16 Thread Johan Jonker
The gpio node names are made generic, but without gpio bank ID. Add gpio-ranges to rk3066a-u-boot.dtsi for now till a better method is found. Signed-off-by: Johan Jonker --- arch/arm/dts/rk3066a-u-boot.dtsi | 25 + 1 file changed, 25 insertions(+) diff --git a/arch/arm

[PATCH v1 1/6] rockchip: gpio: rk_gpio: use ROCKCHIP_GPIOS_PER_BANK as divider

2023-03-16 Thread Johan Jonker
The current divider to calculate the bank ID can change. Use a constant ROCKCHIP_GPIOS_PER_BANK as fixed divider. Signed-off-by: Johan Jonker --- drivers/gpio/rk_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/rk_gpio.c b/drivers/gpio/rk_gpio.c index

[PATCH v2 7/7] arm: dts: rockchip: rk3288: partial sync pwm nodes

2023-03-15 Thread Johan Jonker
In order to better compare the Linux rk3288.dtsi version 6.3 -rc2 with the U-Boot version partial sync the pwm nodes. Signed-off-by: Johan Jonker --- arch/arm/dts/rk3288.dtsi | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/arch/arm/dts/rk3288.dtsi b/arch

[PATCH v2 6/7] clk: rockchip: clk_rk3288: add PCLK_RKPWM

2023-03-15 Thread Johan Jonker
The rk3288 pwm nodes synced from Linux make use of PCLK_RKPWM instead of PCLK_PWM. They have the same pclk_cpu parent, so add PCLK_RKPWM to rk3288_clk_get_rate(). Signed-off-by: Johan Jonker Reviewed-by: Simon Glass Tested-by: Simon Glass # chromebook-jerry --- drivers/clk/rockchip

[PATCH v2 5/7] arm: dts: rockchip: rk3288: partial sync vop/lvds/mipi/hdmi nodes

2023-03-15 Thread Johan Jonker
In order to better compare the Linux rk3288.dtsi version 6.3 -rc2 with the U-Boot version partial sync the vop/lvds/mipi/hdmi nodes. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass Tested-by: Simon Glass # chromebook-jerry --- arch/arm/dts/rk3288.dtsi | 48

[PATCH v2 4/7] arm: dts: rockchip: rk3288: partial sync edp node

2023-03-15 Thread Johan Jonker
The rk3288 edp node has a phy node in Linux with a clock property while current U-Boot driver expects this clock on position index 1. Move U-Boot-specific DT clock properties to rk3288-u-boot.dtsi and partially sync the edp node. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass Tested-by

[PATCH v2 3/7] video: rockchip: rk_vop: add rk3288-dp compare string

2023-03-15 Thread Johan Jonker
In the current rk3288.dtsi file the compatible string for the DisplayPort(DP) node ends with "edp". The string in the binding ends with "dp" which conflicts with "cdn-dp" as a search term. Add "rk3288-dp" as compare string to select vop_id. Signed-off-by

[PATCH v2 2/7] arm: dts: rockchip: rk3288: partial sync grf and pmu nodes

2023-03-15 Thread Johan Jonker
In order to better compare the Linux rk3288.dtsi version 6.3 -rc2 with the U-Boot version partial sync the grf and pmu nodes. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass Tested-by: Simon Glass # chromebook-jerry --- arch/arm/dts/rk3288.dtsi | 269

[PATCH v2 1/7] arm: dts: rockchip: rk3288: move io-domains nodes

2023-03-15 Thread Johan Jonker
In order to better compare the Linux rk3288.dtsi version with the U-Boot version move the io-domains nodes. Signed-off-by: Johan Jonker Reviewed-by: John Keeping Reviewed-by: Simon Glass Tested-by: Simon Glass # chromebook-jerry --- arch/arm/dts/rk3288-miqi.dtsi| 27

Re: [PATCH v1 7/7] arm: dts: rockchip: rk3288: partial sync pwm nodes

2023-03-15 Thread Johan Jonker
On 3/15/23 15:05, Simon Glass wrote: > Hi Johan, > > On Tue, 14 Mar 2023 at 12:16, Johan Jonker wrote: >> >> In order to better compare the Linux rk3288.dtsi >> version 6.3 -rc2 with the u-boot version partial >> sync the pwm nodes. >> >> Signed-

[PATCH v1 7/7] arm: dts: rockchip: rk3288: partial sync pwm nodes

2023-03-14 Thread Johan Jonker
In order to better compare the Linux rk3288.dtsi version 6.3 -rc2 with the u-boot version partial sync the pwm nodes. Signed-off-by: Johan Jonker --- arch/arm/dts/rk3288.dtsi | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/arch/arm/dts/rk3288.dtsi b/arch

[PATCH v1 6/7] clk: rockchip: clk_rk3288: add PCLK_RKPWM

2023-03-14 Thread Johan Jonker
The rk3288 pwm node synced from Linux make use of PCLK_RKPWM instead of PCLK_PWM. They have the same pclk_cpu parent, so add PCLK_RKPWM to rk3288_clk_get_rate(). Signed-off-by: Johan Jonker --- drivers/clk/rockchip/clk_rk3288.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk

[PATCH v1 5/7] arm: dts: rockchip: rk3288: partial sync vop/lvds/mipi/hdmi nodes

2023-03-14 Thread Johan Jonker
In order to better compare the Linux rk3288.dtsi version 6.3 -rc2 with the u-boot version partial sync the vop/lvds/mipi/hdmi nodes. Signed-off-by: Johan Jonker --- arch/arm/dts/rk3288.dtsi | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff

[PATCH v1 3/7] video: rockchip: rk_vop: add rk3288-dp compare string

2023-03-14 Thread Johan Jonker
In the current rk3288.dtsi file the compatible string for the DisplayPort(DP) node ends with "edp". The string in the binding ends with "dp" which conflicts with "cdn-dp" as a search term. Add "rk3288-dp" as compare string to select vop_id. Signed-off-by: J

[PATCH v1 4/7] arm: dts: rockchip: rk3288: partial sync edp node

2023-03-14 Thread Johan Jonker
The rk3288 edp node has a phy node in Linux with a clock property while current U-boot driver expects this clock on position index 1. Move U-boot specific DT clock properties to rk3288-u-boot.dtsi and partially the sync edp node. Signed-off-by: Johan Jonker --- arch/arm/dts/rk3288-u-boot.dtsi

[PATCH v1 2/7] arm: dts: rockchip: rk3288: partial sync grf and pmu nodes

2023-03-14 Thread Johan Jonker
In order to better compare the Linux rk3288.dtsi version 6.3 -rc2 with the u-boot version partial sync the grf and pmu nodes. Signed-off-by: Johan Jonker --- arch/arm/dts/rk3288.dtsi | 269 +-- 1 file changed, 173 insertions(+), 96 deletions(-) diff --git a

[PATCH v1 1/7] arm: dts: rockchip: rk3288: move io-domains nodes

2023-03-14 Thread Johan Jonker
In order to better compare the Linux rk3288.dtsi version with the u-boot version move the io-domains nodes. Signed-off-by: Johan Jonker --- arch/arm/dts/rk3288-miqi.dtsi| 27 +++-- arch/arm/dts/rk3288-phycore-som.dtsi | 30 +--- arch/arm/dts

Re: [PATCH v8 13/24] rockchip: rk3288: syscon_rk3288: store syscon platdata in regmap

2023-03-13 Thread Johan Jonker
On 3/13/23 18:46, John Keeping wrote: > On Mon, Mar 13, 2023 at 05:53:20PM +0100, Johan Jonker wrote: >> On 3/13/23 14:26, John Keeping wrote: >>> On Mon, Mar 13, 2023 at 01:30:57AM +0100, Johan Jonker wrote: >>>> The Rockchip SoC rk3288 has 2 types of device trees

Re: [PATCH v8 13/24] rockchip: rk3288: syscon_rk3288: store syscon platdata in regmap

2023-03-13 Thread Johan Jonker
On 3/13/23 14:26, John Keeping wrote: > On Mon, Mar 13, 2023 at 01:30:57AM +0100, Johan Jonker wrote: >> The Rockchip SoC rk3288 has 2 types of device trees floating around. >> A 64bit reg size when synced from Linux and a 32bit for U-boot. >> A pre-probe function in th

Re: [PATCH v8 13/24] rockchip: rk3288: syscon_rk3288: store syscon platdata in regmap

2023-03-13 Thread Johan Jonker
On 3/13/23 04:10, Simon Glass wrote: > On Sun, 12 Mar 2023 at 18:31, Johan Jonker wrote: >> >> The Rockchip SoC rk3288 has 2 types of device trees floating around. >> A 64bit reg size when synced from Linux and a 32bit for U-boot. >> A pre-probe function in the sysco

[PATCH v8 24/24] include: fdtdec: decouple fdt_addr_t and phys_addr_t size

2023-03-12 Thread Johan Jonker
with the wrong offset and sizes when only the lower 32-bit is passed. Decouple the fdt_addr_t and phys_addr_t size as they don't necessary match. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass Reviewed-by: Kever Yang --- Note: Due to the large number of references to fdt_addr_t

[PATCH v8 23/24] arm: stm32mp: spl: fix function with fdt_addr_t input

2023-03-12 Thread Johan Jonker
The fdt_addr_t and phys_addr_t size have been decoupled. A 32bit CPU can expect 64-bit data from the device tree parser, so fix ofnode_get_addr_size function with fdt_addr_t input to be able to handle both sizes for stm32mp SoC in spl.c file. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass

[PATCH v8 22/24] drivers: fix debug string with fdt_addr_t input

2023-03-12 Thread Johan Jonker
The fdt_addr_t and phys_addr_t size have been decoupled. A 32bit CPU can expect 64-bit data from the device tree parser, so fix some debug strings with fdt_addr_t to be able to handle both sizes. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass --- Changed V5: new patch --- arch/arm

[PATCH v8 21/24] drivers: use devfdt_get_addr_ptr when cast to pointer

2023-03-12 Thread Johan Jonker
The fdt_addr_t and phys_addr_t size have been decoupled. A 32bit CPU can expect 64-bit data from the device tree parser, so use devfdt_get_addr_ptr instead of the devfdt_get_addr function in the various files in the drivers directory that cast to a pointer. Signed-off-by: Johan Jonker Reviewed

[PATCH v8 20/24] drivers: use devfdt_get_addr_index_ptr when cast to pointer

2023-03-12 Thread Johan Jonker
streamline the error response to -EINVAL on return. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass --- Changed V6: use -EINVAL on return drop cast --- drivers/clk/clk-hsdk-cgu.c| 4 ++-- drivers/ddr/altera/sdram_gen5.c | 4 ++-- drivers/mmc/xenon_sdhci.c | 2 +- drivers

[PATCH v8 19/24] drivers: use devfdt_get_addr_size_index_ptr when cast to pointer

2023-03-12 Thread Johan Jonker
: Johan Jonker Reviewed-by: Michael Trimarchi Reviewed-by: Simon Glass --- drivers/pci/pcie_dw_mvebu.c | 6 +++--- drivers/spi/cadence_qspi.c | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c index a0b82c78..3b2ada54

[PATCH v8 18/24] drivers: use dev_read_addr_ptr when cast to pointer

2023-03-12 Thread Johan Jonker
response to -EINVAL on return. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass --- Changed V6: use -EINVAL on return drop cast Changed V5: rebase fix typo fix more files --- arch/arm/mach-mvebu/system-controller.c| 4 ++-- doc/develop/driver-model/livetree.rst | 2

  1   2   3   4   5   6   >