Re: [PATCH] rpi: always set fdt_addr to the correct value

2022-02-15 Thread Marek Szyprowski
Hi Matthias, On 15.02.2022 19:19, Matthias Brugger wrote: > > On 15/02/2022 15:55, Matthias Brugger wrote: >> >> On 18/02/2022 03:44, Jaehoon Chung wrote: >>> On 22. 2. 14. 20:25, Marek Szyprowski wrote: >>>> The fdt_addr env have meaning only for t

[PATCH] rpi: always set fdt_addr to the correct value

2022-02-14 Thread Marek Szyprowski
the fdt_addr env. This fixes system operation after saving the env to disk and updating i.e. dtb files or firmware. Signed-off-by: Marek Szyprowski --- board/raspberrypi/rpi/rpi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index

[PATCH] arm: rpi: perform XHCI firmware upload only once

2021-09-17 Thread Marek Szyprowski
XHCI firmware upload must be performed only once after initializing the PCI bridge. This fixes USB stack initialization after calling "usb stop; usb start" on Raspberry Pi 4B. Signed-off-by: Marek Szyprowski --- arch/arm/mach-bcm283x/msg.c | 6 ++ 1 file changed, 6 insertions(+)

Re: u-boot on RPi4 32bit - issue after upgrading the firmware

2021-06-17 Thread Marek Szyprowski
Hi On 04.03.2021 02:33, Jaehoon Chung wrote: > On 2/25/21 8:11 PM, Marek Szyprowski wrote: >> On 25.02.2021 11:55, Nicolas Saenz Julienne wrote: >>> On Thu, 2021-02-25 at 11:43 +0100, Marek Szyprowski wrote: >>>> Recently I've upgraded a video core firmware on my RPi

[PATCH] ARM: bcm283x: change the virtual address of the XHCI PCI device base

2021-06-17 Thread Marek Szyprowski
licts with the updated ARM/VideoCore firmware. This also requires to reduce the size of the mapped PCI device region from 8MiB to 4MiB to fit into 32bit address space. This is still enough for the XHCI PCI device. Signed-off-by: Marek Szyprowski --- This fixes the issue observed on ARM 32bit

Re: u-boot on RPi4 32bit - issue after upgrading the firmware

2021-02-25 Thread Marek Szyprowski
Hi Nicolas, On 25.02.2021 11:55, Nicolas Saenz Julienne wrote: > On Thu, 2021-02-25 at 11:43 +0100, Marek Szyprowski wrote: >> Recently I've upgraded a video core firmware on my RPi4 and I've noticed >> that u-boot in ARM 32bit mode stopped working properly or even randomly &

u-boot on RPi4 32bit - issue after upgrading the firmware

2021-02-25 Thread Marek Szyprowski
bit mode. Does anyone have an idea how to fix this issue? I've checked also the latest version of the RPi firmware, but the issue is still there. Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland

Re: [PATCH] button: adc: fix treshold typo

2021-02-23 Thread Marek Szyprowski
On 23.02.2021 16:10, Neil Armstrong wrote: > Fix the treshold typo in code by threshold. > > Fixes: c0165c85c3 ("button: add a simple Analog to Digital Converter device > based button driver") > Suggested-by: Tom Rini > Signed-off-by: Neil Armstrong Acked-by: Marek S

[PATCH v7 1/5] dt-bindings: input: adc-keys bindings documentation

2021-02-18 Thread Marek Szyprowski
Dump adc-keys bindings documentation from Linux kernel source tree from commit 698dc0cf9447 ("dt-bindings: input: adc-keys: clarify description"). Signed-off-by: Marek Szyprowski Reviewed-by: Simon Glass --- doc/device-tree-bindings/input/adc-keys.txt | 67 + 1 fi

[PATCH v7 0/5] VIM3: add support for checking 'Function' button state

2021-02-18 Thread Marek Szyprowski
. Once applied, one can use following commands in the boot scripts: -->8--- echo Checking Func button state: \\c if button Function then echo Selected alternative boot ... fi --->8--- Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v7: - added linu

[PATCH v7 3/5] adc: meson-saradc: add support for getting reference voltage value

2021-02-18 Thread Marek Szyprowski
Add support for getting the 'vref-supply' regulator and register it as ADC's reference voltage regulator, so clients can translate sampled ADC values to the voltage. Signed-off-by: Marek Szyprowski Reviewed-by: Simon Glass --- drivers/adc/meson-saradc.c | 21 + 1 file

[PATCH v7 2/5] button: add a simple Analog to Digital Converter device based button driver

2021-02-18 Thread Marek Szyprowski
Add a simple Analog to Digital Converter device based button driver. This driver binds to the 'adc-keys' device tree node. Signed-off-by: Marek Szyprowski Reviewed-by: Simon Glass --- drivers/button/Kconfig | 8 ++ drivers/button/Makefile | 1 + drivers/button/button-adc.c | 146

[PATCH v7 4/5] configs: khadas-vim3(l): enable Function button support

2021-02-18 Thread Marek Szyprowski
Add options required to check the 'Function' button state. Signed-off-by: Marek Szyprowski Reviewed-by: Simon Glass --- configs/khadas-vim3_defconfig | 2 ++ configs/khadas-vim3l_defconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configs/khadas-vim3_defconfig b/configs/khadas

[PATCH v7 5/5] test: add a simple test for the adc-keys button driver

2021-02-18 Thread Marek Szyprowski
Add adc-keys device to the sandbox/test.dts and connect it to the channel #3 of the sandbox_adc driver. The default values sampled by sandbox_adc driver determines that button3 and button4 are released and button5 is pressed. Signed-off-by: Marek Szyprowski Reviewed-by: Simon Glass --- arch

[PATCH v6 5/5] test: add a simple test for the adc-keys button driver

2021-02-11 Thread Marek Szyprowski
Add adc-keys device to the sandbox/test.dts and connect it to the channel #3 of the sandbox_adc driver. The default values sampled by sandbox_adc driver determines that button3 and button4 are released and button5 is pressed. Signed-off-by: Marek Szyprowski --- arch/sandbox/dts/test.dts | 24

[PATCH v6 2/5] button: add a simple Analog to Digital Converter device based button driver

2021-02-11 Thread Marek Szyprowski
Add a simple Analog to Digital Converter device based button driver. This driver binds to the 'adc-keys' device tree node. Signed-off-by: Marek Szyprowski --- drivers/button/Kconfig | 8 ++ drivers/button/Makefile | 1 + drivers/button/button-adc.c | 146

[PATCH v6 4/5] configs: khadas-vim3(l): enable Function button support

2021-02-11 Thread Marek Szyprowski
Add options required to check the 'Function' button state. Signed-off-by: Marek Szyprowski Reviewed-by: Simon Glass --- configs/khadas-vim3_defconfig | 2 ++ configs/khadas-vim3l_defconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configs/khadas-vim3_defconfig b/configs/khadas

[PATCH v6 0/5] VIM3: add support for checking 'Function' button state

2021-02-11 Thread Marek Szyprowski
. Once applied, one can use following commands in the boot scripts: -->8--- echo Checking Func button state: \\c if button Function then echo Selected alternative boot ... fi --->8--- Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v6: - added a simple s

[PATCH v6 1/5] dt-bindings: input: adc-keys bindings documentation

2021-02-11 Thread Marek Szyprowski
Dump adc-keys bindings documentation from Linux kernel source tree from commit 698dc0cf9447 ("dt-bindings: input: adc-keys: clarify description"). Signed-off-by: Marek Szyprowski Reviewed-by: Simon Glass --- doc/device-tree-bindings/input/adc-keys.txt | 67 + 1 fi

[PATCH v6 3/5] adc: meson-saradc: add support for getting reference voltage value

2021-02-11 Thread Marek Szyprowski
Add support for getting the 'vref-supply' regulator and register it as ADC's reference voltage regulator, so clients can translate sampled ADC values to the voltage. Signed-off-by: Marek Szyprowski Reviewed-by: Simon Glass --- drivers/adc/meson-saradc.c | 21 + 1 file

Re: [PATCH v5 2/4] button: add a simple Analog to Digital Converter device based button driver

2021-02-09 Thread Marek Szyprowski
Hi Simon, On 08.02.2021 18:08, Simon Glass wrote: > On Mon, 8 Feb 2021 at 09:10, Marek Szyprowski > wrote: >> On 06.02.2021 17:21, Simon Glass wrote: >>> On Thu, 4 Feb 2021 at 03:36, Marek Szyprowski >>> wrote: >>>> ... >>>> Could you

Re: [PATCH v5 2/4] button: add a simple Analog to Digital Converter device based button driver

2021-02-08 Thread Marek Szyprowski
Hi Simon, On 06.02.2021 17:21, Simon Glass wrote: > On Thu, 4 Feb 2021 at 03:36, Marek Szyprowski > wrote: >> ... >> Could you give me a bit more hints or point where to start? I've tried >> to build sandbox, but it fails for v2021.01 release (I've did make >> san

Re: [PATCH v5 2/4] button: add a simple Analog to Digital Converter device based button driver

2021-02-04 Thread Marek Szyprowski
Hi Simon, On 01.02.2021 21:38, Simon Glass wrote: > On Tue, 26 Jan 2021 at 06:03, Heinrich Schuchardt wrote: >> On 26.01.21 12:25, Marek Szyprowski wrote: >>> On 26.01.2021 12:10, Heinrich Schuchardt wrote: >>>> On 1/26/21 10:50 AM, Marek Szyprowski wrote: >&g

[PATCH] board: amlogic: odroid: add runtime detection of the N2/N2+/C4/HC4 variants

2021-02-04 Thread Marek Szyprowski
, adjusted to the 12-bit ADC driver operation mode (vendor code use 10-bit mode). Signed-off-by: Marek Szyprowski --- The relevant vendor's code is here: https://github.com/hardkernel/u-boot/blob/odroidg12-v2015.01/board/hardkernel/odroid-common/board.c#L55 --- arch/arm/dts/meson-g12b-odroid-n2-u

[PATCH] rpi: limit size of the RAM to the multiple of the MMU_SECTION_SIZE

2021-02-01 Thread Marek Szyprowski
, because it relocated itself into that unmapped memory and fails to execute. Fix this by limiting the size of the first bank to the multiple of MMU_SECTION_SIZE. Signed-off-by: Marek Szyprowski --- board/raspberrypi/rpi/rpi.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/board/raspberrypi

Re: [PATCH v2] disk: part_dos: update partition table entries after write

2021-01-28 Thread Marek Szyprowski
Hi, On 28.01.2021 09:10, Gary Bisson wrote: > Fixes issues when switching from GPT to MBR partition tables. > > Signed-off-by: Gary Bisson Acked-by: Marek Szyprowski > --- > Changes for v2: > - added part_init() inside write_mbr_partitions(), as suggested by >He

Re: [PATCH v5 2/4] button: add a simple Analog to Digital Converter device based button driver

2021-01-26 Thread Marek Szyprowski
Hi Heinrich, On 26.01.2021 12:10, Heinrich Schuchardt wrote: > On 1/26/21 10:50 AM, Marek Szyprowski wrote: >> Add a simple Analog to Digital Converter device based button driver. >> This >> driver binds to the 'adc-keys' device tree node. >> >>

[PATCH v5 2/4] button: add a simple Analog to Digital Converter device based button driver

2021-01-26 Thread Marek Szyprowski
Add a simple Analog to Digital Converter device based button driver. This driver binds to the 'adc-keys' device tree node. Signed-off-by: Marek Szyprowski --- drivers/button/Kconfig | 8 ++ drivers/button/Makefile | 1 + drivers/button/button-adc.c | 156

[PATCH v5 3/4] adc: meson-saradc: add support for getting reference voltage value

2021-01-26 Thread Marek Szyprowski
Add support for getting the 'vref-supply' regulator and register it as ADC's reference voltage regulator, so clients can translate sampled ADC values to the voltage. Signed-off-by: Marek Szyprowski --- drivers/adc/meson-saradc.c | 21 + 1 file changed, 21 insertions(+) diff

[PATCH v5 4/4] configs: khadas-vim3(l): enable Function button support

2021-01-26 Thread Marek Szyprowski
Add options required to check the 'Function' button state. Signed-off-by: Marek Szyprowski --- configs/khadas-vim3_defconfig | 2 ++ configs/khadas-vim3l_defconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index

[PATCH v5 1/4] dt-bindings: input: adc-keys bindings documentation

2021-01-26 Thread Marek Szyprowski
Dump adc-keys bindings documentation from Linux kernel source tree from commit 698dc0cf9447 ("dt-bindings: input: adc-keys: clarify description"). Signed-off-by: Marek Szyprowski --- doc/device-tree-bindings/input/adc-keys.txt | 67 + 1 file changed, 67 insertions(

[PATCH v5 0/4] VIM3: add support for checking 'Function' button state

2021-01-26 Thread Marek Szyprowski
drivers. Once applied, one can use following commands in the boot scripts: -->8--- echo Checking Func button state: \\c if button Function then echo Selected alternative boot ... fi --->8--- Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v5: - rebased onto

Re: [PATCH v4 0/3] VIM3: add support for checking 'Function' button state

2021-01-22 Thread Marek Szyprowski
Hi Neil, On 18.01.2021 13:55, Neil Armstrong wrote: > On 18/01/2021 13:48, Heinrich Schuchardt wrote: >> On 18.01.21 11:24, Neil Armstrong wrote: >>> On 22/12/2020 09:56, Marek Szyprowski wrote: >>>> Hi All, >>>> >>>> This patchset adds

[PATCH] cmd: misc: Fix return value for the sleep command

2021-01-22 Thread Marek Szyprowski
If sleeping has been interrupted, return CMD_RET_FAILURE instead of -1 (CMD_RET_USAGE). Signed-off-by: Marek Szyprowski --- cmd/sleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/sleep.c b/cmd/sleep.c index f0c78a8efb..1fff400c79 100644 --- a/cmd/sleep.c +++ b/cmd

Re: [PATCH] board: amlogic: vim3: fix setup ethernet mac from efuse

2021-01-12 Thread Marek Szyprowski
, > + mac_addr[0],mac_addr[1],mac_addr[2], > + mac_addr[3],mac_addr[4],mac_addr[5]); I'm not really convinced that this message has to be displayed. If so, then use "%pM" for printing MAC address. > } > > return 0; > } > + Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland

[PATCH v3 0/6] Add MBR partition table creation and verify command

2020-12-23 Thread Marek Szyprowski
already present in u-boot. Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v3: - fixed minor issues in the docs v2: https://lists.denx.de/pipermail/u-boot/2020-December/435689.html - added docs and minor fixes in the code style v1: https://lists.denx.de/pipermail/u-boot

[PATCH v3 4/6] disk: dos: make some functions static

2020-12-23 Thread Marek Szyprowski
Make functions not used outside this file static. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index 3b79b9b1b8..2c4ad0b6ba 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c

[PATCH v3 6/6] cmd: Add MBR partition layout control utility

2020-12-23 Thread Marek Szyprowski
rts 'name=boot,start=4M,size=128M,bootable,id=0x0e; name=rootfs,size=3072M,id=0x83; name=system-data,size=512M,id=0x83; name=[ext],size=-,id=0x05; name=user,size=-,id=0x83; name=modules,size=100M,id=0x83; name=ramdisk,size=8M,id=0x83' > mbr write mmc 0 Signed-off-by: Marek Szyp

[PATCH v3 5/6] disk: dos: add code for creating MBR partition layout

2020-12-23 Thread Marek Szyprowski
Add a code for creating and writing MBR partition layout. The code generates similar layout of EBRs (Exteneded Block Records) and logical volumes as Linux's fdisk utility. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 167 disk/part_dos.h

[PATCH v3 2/6] disk: dos: add some defines for the hardcoded numbers

2020-12-23 Thread Marek Szyprowski
Add some handy defines for some hardcoded magic numbers related to extended partition handling. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 6 +++--- disk/part_dos.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index

[PATCH v3 1/6] disk: dos: rename write_mbr_partition to write_mbr_sector

2020-12-23 Thread Marek Szyprowski
write_mbr_partition() function name is a bit misleading, so rename it to write_mbr_sector(). This is a preparation for adding code for writing a complete MBR partition layout. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 2 +- drivers/fastboot/fb_mmc.c | 2 +- include/part.h

[PATCH v3 3/6] disk: dos: use generic macro for unaligned le32 access

2020-12-23 Thread Marek Szyprowski
Use a generic helper for reading LE32 integers. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 28 +--- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index 20d35dc9cd..3b79b9b1b8 100644 --- a/disk/part_dos.c +++ b

[PATCH v2 0/6] Add MBR partition table creation and verify command

2020-12-22 Thread Marek Szyprowski
already present in u-boot. Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v2: - added docs and minor fixes in the code style v1: https://lists.denx.de/pipermail/u-boot/2020-December/435208.html - initial version Patch summary: Marek Szyprowski (6): disk: dos: rename

[PATCH v2 6/6] cmd: Add MBR partition layout control utility

2020-12-22 Thread Marek Szyprowski
rts 'name=boot,start=4M,size=128M,bootable,id=0x0e; name=rootfs,size=3072M,id=0x83; name=system-data,size=512M,id=0x83; name=[ext],size=-,id=0x05; name=user,size=-,id=0x83; name=modules,size=100M,id=0x83; name=ramdisk,size=8M,id=0x83' > mbr write mmc 0 Signed-off-by: Marek Szyp

[PATCH v2 3/6] disk: dos: use generic macro for unaligned le32 access

2020-12-22 Thread Marek Szyprowski
Use a generic helper for reading LE32 integers. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 28 +--- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index 20d35dc9cd..3b79b9b1b8 100644 --- a/disk/part_dos.c +++ b

[PATCH v2 5/6] disk: dos: add code for creating MBR partition layout

2020-12-22 Thread Marek Szyprowski
Add a code for creating and writing MBR partition layout. The code generates similar layout of EBRs (Exteneded Block Records) and logical volumes as Linux's fdisk utility. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 167 disk/part_dos.h

[PATCH v2 4/6] disk: dos: make some functions static

2020-12-22 Thread Marek Szyprowski
Make functions not used outside this file static. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index 3b79b9b1b8..2c4ad0b6ba 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c

[PATCH v2 1/6] disk: dos: rename write_mbr_partition to write_mbr_sector

2020-12-22 Thread Marek Szyprowski
write_mbr_partition() function name is a bit misleading, so rename it to write_mbr_sector(). This is a preparation for adding code for writing a complete MBR partition layout. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 2 +- drivers/fastboot/fb_mmc.c | 2 +- include/part.h

[PATCH v2 2/6] disk: dos: add some defines for the hardcoded numbers

2020-12-22 Thread Marek Szyprowski
Add some handy defines for some hardcoded magic numbers related to extended partition handling. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 6 +++--- disk/part_dos.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index

[PATCH v2 1/5] dfu: mmc: use the default MMC device if entity specifies it as -1

2020-12-22 Thread Marek Szyprowski
Use the default MMC device set in the command line if entity specifies it as -1. This allows to use the same dfu_alt_info string for different MMC devices (like embedded eMMC and external SD card if data layout is the same on both devices). Signed-off-by: Marek Szyprowski --- drivers/dfu

[PATCH v2 3/5] dfu: add 'SCRIPT' entity

2020-12-22 Thread Marek Szyprowski
for tracking the potential need to reinitialize the dfu_alt_info related structures. Signed-off-by: Marek Szyprowski --- doc/README.dfu| 17 - drivers/dfu/dfu.c | 7 ++- drivers/dfu/dfu_mmc.c | 23 +-- include/dfu.h | 3 +++ 4 files

[PATCH v2 4/5] dfu: add support for the dfu_alt_info reintialization from the flashed script

2020-12-22 Thread Marek Szyprowski
Reinitialize DFU USB gadget after flashing the 'SCRIPT' entity to ensure that the potential changes to the 'dfu_alt_info' environment variable are applied. Signed-off-by: Marek Szyprowski --- cmd/dfu.c| 14 +- common/dfu.c | 3 +++ 2 files changed, 16 insertions(+), 1 deletion

[PATCH v2 5/5] thor: add support for the dfu_alt_info reintialization from the flashed script

2020-12-22 Thread Marek Szyprowski
Reinitialize dfu_env_entities after flashing the 'SCRIPT' entity to ensure that the potential changes to the 'dfu_alt_info' environment variable are applied. Signed-off-by: Marek Szyprowski --- cmd/thordown.c | 19 --- drivers/usb/gadget/f_thor.c | 3 +++ include

[PATCH v2 2/5] dfu: add 'SKIP' entity

2020-12-22 Thread Marek Szyprowski
t;dfu: add 'SKIP' entity"] Signed-off-by: Marek Szyprowski --- Original version of this patch is available here: https://patchwork.ozlabs.org/project/uboot/patch/20201109115757.24601-1-jh80.ch...@samsung.com/ --- doc/README.dfu| 15 ++- drivers/dfu/dfu.c | 2 +- d

[PATCH v2 0/5] DFU: new entity types and minor improvements

2020-12-22 Thread Marek Szyprowski
to create the whole partition table during the board flashing. It also easies the flashing by allowing to use the same images for different board variants/types, as each board can now use only the relevant images and skip the other ones without returning a failure. Best regards Marek Szyprowski Samsung

[PATCH v4 3/3] configs: khadas-vim3(l): enable Function button support

2020-12-22 Thread Marek Szyprowski
Add options required to check the 'Function' button state. Signed-off-by: Marek Szyprowski --- configs/khadas-vim3_defconfig | 2 ++ configs/khadas-vim3l_defconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index

[PATCH v4 2/3] button: add a simple Analog to Digital Converter device based button driver

2020-12-22 Thread Marek Szyprowski
Add a simple Analog to Digital Converter device based button driver. This driver binds to the 'adc-keys' device tree node. Signed-off-by: Marek Szyprowski --- drivers/button/Kconfig | 8 +++ drivers/button/Makefile | 1 + drivers/button/button-adc.c | 121

[PATCH v4 0/3] VIM3: add support for checking 'Function' button state

2020-12-22 Thread Marek Szyprowski
drivers. Once applied, one can use following commands in the boot scripts: -->8--- echo Checking Func button state: \\c if button Function then echo Selected alternative boot ... fi --->8--- Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v4: - rebased onto

[PATCH v4 1/3] dt-bindings: input: adc-keys bindings documentation

2020-12-22 Thread Marek Szyprowski
Dump adc-keys bindings documentation from Linux kernel source tree v5.10. Signed-off-by: Marek Szyprowski --- doc/device-tree-bindings/input/adc-keys.txt | 49 + 1 file changed, 49 insertions(+) create mode 100644 doc/device-tree-bindings/input/adc-keys.txt diff --git

Re: [PATCH 4/6] button: add a simple ADC-based button driver

2020-12-21 Thread Marek Szyprowski
Hi Simon, On 19.12.2020 03:28, Simon Glass wrote: > On Mon, 14 Dec 2020 at 04:25, Marek Szyprowski > wrote: >> Add a simple ADC-based button driver. This driver binds to the 'adc-keys' >> device tree node. >> >> Signed-off-by:

Re: [PATCH 0/5] DFU: new entity types and minor improvements

2020-12-20 Thread Marek Szyprowski
Hi Jaehoon, On 20.12.2020 23:17, Jaehoon Chung wrote: > On 12/17/20 9:10 PM, Marek Szyprowski wrote: >> This patchset adds support for SKIP and SCRIPT entity types to the DFU >> subsystem. They significantly extends the flexibility of the DFU >> subsystem. Together with the

[PATCH] board: amlogic: add MMC boot device detection for environment load

2020-12-18 Thread Marek Szyprowski
Signed-off-by: Marek Szyprowski --- board/amlogic/odroid-n2/odroid-n2.c | 8 board/amlogic/vim3/vim3.c | 8 2 files changed, 16 insertions(+) diff --git a/board/amlogic/odroid-n2/odroid-n2.c b/board/amlogic/odroid-n2/odroid-n2.c index caf7fd6810..12ee5d3abc 100644 -

[PATCH] ARM: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4

2020-12-18 Thread Marek Szyprowski
the pin in input to achieve high state (pin has the pull-up) and solve the issue. Suggested-by: Neil Armstrong Signed-off-by: Marek Szyprowski --- This is a result of the discussion in the "[PATCH/RFC] board: amlogic: Fix Odroid-C4 SD card reboot issue" thread: https://lists.denx.de/p

Re: [PATCH/RFC] board: amlogic: Fix Odroid-C4 SD card reboot issue

2020-12-18 Thread Marek Szyprowski
Hi Neil, On 18.12.2020 10:24, Neil Armstrong wrote: > On 18/12/2020 10:11, Marek Szyprowski wrote: >> On 18.12.2020 09:36, Neil Armstrong wrote: >>> On 17/12/2020 10:06, Marek Szyprowski wrote: >>>> For the proper reboot Odroid C4 board requires to switch TFLASH_VDD_

Re: [PATCH/RFC] board: amlogic: Fix Odroid-C4 SD card reboot issue

2020-12-18 Thread Marek Szyprowski
Hi Neil, On 18.12.2020 09:36, Neil Armstrong wrote: > On 17/12/2020 10:06, Marek Szyprowski wrote: >> For the proper reboot Odroid C4 board requires to switch TFLASH_VDD_EN >> pin to the input (high impedance?) mode, otherwise the board is stuck >> in the middle of

[PATCH 4/5] dfu: add support for the dfu_alt_info reintialization from the flashed script

2020-12-17 Thread Marek Szyprowski
Reinitialize DFU USB gadget after flashing the 'SCRIPT' entity to ensure that the potential changes to the 'dfu_alt_info' environment variable are applied. Signed-off-by: Marek Szyprowski --- cmd/dfu.c| 14 +- common/dfu.c | 3 +++ 2 files changed, 16 insertions(+), 1 deletion

[PATCH 0/5] DFU: new entity types and minor improvements

2020-12-17 Thread Marek Szyprowski
during the board flashing when one prepares a proper script. It also easies the flashing by allowing to use the same images for different board variants/types, as each board can now use only the relevant images and skip the other ones without returning a failure. Best regards Marek Szyprowski

[PATCH 1/5] dfu: mmc: use the default MMC device if entity specifies it as -1

2020-12-17 Thread Marek Szyprowski
Use the default MMC device set in the command line if entity specifies it as -1. This allows to use the same dfu_alt_info string for different MMC devices (like embedded eMMC and external SD card if data layout is the same on both devices). Signed-off-by: Marek Szyprowski --- drivers/dfu

[PATCH 5/5] thor: add support for the dfu_alt_info reintialization from the flashed script

2020-12-17 Thread Marek Szyprowski
Reinitialize dfu_env_entities after flashing the 'SCRIPT' entity to ensure that the potential changes to the 'dfu_alt_info' environment variable are applied. Signed-off-by: Marek Szyprowski --- cmd/thordown.c | 19 --- drivers/usb/gadget/f_thor.c | 3 +++ include

[PATCH 2/5] dfu: add 'SKIP' entity

2020-12-17 Thread Marek Szyprowski
to it and skips the rest. Signed-off-by: Jaehoon Chung [mszyprow: rephrased commit message and subject] Signed-off-by: Marek Szyprowski --- drivers/dfu/dfu.c | 2 +- drivers/dfu/dfu_mmc.c | 9 + include/dfu.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git

[PATCH 3/5] dfu: add 'SCRIPT' entity

2020-12-17 Thread Marek Szyprowski
for tracking the potential need to reinitialize the dfu_alt_info related structures. Signed-off-by: Marek Szyprowski --- drivers/dfu/dfu.c | 6 +- drivers/dfu/dfu_mmc.c | 23 +-- include/dfu.h | 3 +++ 3 files changed, 29 insertions(+), 3 deletions(-) diff

[PATCH 2/6] disk: dos: add some defines for the hardcoded numbers

2020-12-17 Thread Marek Szyprowski
Add some handy defines for some hardcoded magic numbers related to extended partition handling. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 6 +++--- disk/part_dos.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index

[PATCH 0/6] Add MBR partition table creation and verify command

2020-12-17 Thread Marek Szyprowski
already present in u-boot. Best regards Marek Szyprowski Samsung R Institute Poland Marek Szyprowski (6): disk: dos: rename write_mbr_partition to write_mbr_sector disk: dos: add some defines for the hardcoded numbers disk: dos: use generic macro for unaligned le32 access disk: dos: make

[PATCH 1/6] disk: dos: rename write_mbr_partition to write_mbr_sector

2020-12-17 Thread Marek Szyprowski
write_mbr_partition() function name is a bit misleading, so rename it to write_mbr_sector(). This is a preparation for adding code for writing a complete MBR partition layout. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 2 +- drivers/fastboot/fb_mmc.c | 2 +- include/part.h

[PATCH 3/6] disk: dos: use generic macro for unaligned le32 access

2020-12-17 Thread Marek Szyprowski
Use a generic helper for reading LE32 integers. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 28 +--- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index 20d35dc9cd..3b79b9b1b8 100644 --- a/disk/part_dos.c +++ b

[PATCH 6/6] cmd: Add MBR partition layout control utility

2020-12-17 Thread Marek Szyprowski
rts 'name=boot,start=4M,size=128M,bootable,id=0x0e; name=rootfs,size=3072M,id=0x83; name=system-data,size=512M,id=0x83; name=[ext],size=-,id=0x05; name=user,size=-,id=0x83; name=modules,size=100M,id=0x83; name=ramdisk,size=8M,id=0x83' > mbr write mmc 0 Signed-off-by: Marek Szyp

[PATCH 5/6] disk: dos: add code for creating MBR partition layout

2020-12-17 Thread Marek Szyprowski
Add a code for creating and writing MBR partition layout. The code generates similar layout of EBRs (Exteneded Block Records) and logical volumes as Linux's fdisk utility. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 167 disk/part_dos.h

[PATCH 4/6] disk: dos: make some functions static

2020-12-17 Thread Marek Szyprowski
Make functions not used outside this file static. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index 3b79b9b1b8..2c4ad0b6ba 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c

[PATCH] cmd: usb_mass_storage: show device interface name

2020-12-17 Thread Marek Szyprowski
Show the interface name (i.e. 'mmc') in the information string to ease user checking which device is exported via USB Mass Storage protocol. Signed-off-by: Marek Szyprowski --- cmd/usb_mass_storage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/usb_mass_storage.c

[PATCH/RFC] board: amlogic: Fix Odroid-C4 SD card reboot issue

2020-12-17 Thread Marek Szyprowski
in the Odroid board code. The common meson cpu_reset() function, which is called later during the reboot procedure, will call PSCI reboot anyway. This issue doesn't happen if board is booted from eMMC. Signed-off-by: Marek Szyprowski --- board/amlogic/odroid-n2/odroid-n2.c | 15

[PATCH] board: amlogic: vim3: read ethernet MAC address from efuse

2020-12-16 Thread Marek Szyprowski
Add the board specific code for reading built-in ethernet MAC address from efuse. Signed-off-by: Marek Szyprowski --- board/amlogic/vim3/vim3.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/board/amlogic/vim3/vim3.c b/board/amlogic/vim3/vim3.c index 09ef39ff30

[PATCH v3 5/6] button: add a simple ADC-based button driver

2020-12-15 Thread Marek Szyprowski
Add a simple Analog to Digital Converter device based button driver. This driver binds to the 'adc-keys' device tree node. Signed-off-by: Marek Szyprowski --- drivers/button/Kconfig | 8 +++ drivers/button/Makefile | 1 + drivers/button/button-adc.c | 117

[PATCH v3 6/6] configs: khadas-vim3: enable Function button support

2020-12-15 Thread Marek Szyprowski
Add options required to check the 'Function' button state. Signed-off-by: Marek Szyprowski --- configs/khadas-vim3_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index 5d16652fd6..bc17430569 100644 --- a/configs

[PATCH v3 0/6] VIM3: add support for checking 'Function' button state

2020-12-15 Thread Marek Szyprowski
already present in mainline tree. Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v3: - removed 'button' env variable - extended kconfig and patch descriptions v2: https://lists.denx.de/pipermail/u-boot/2020-December/434991.html - removed Change-Id tags - split defconfig

[PATCH v3 4/6] configs: khadas-vim3: enable ADC device support

2020-12-15 Thread Marek Szyprowski
Analog to Digital Converter device (Meson SARADC) will be used for probing 'Function' button state. Signed-off-by: Marek Szyprowski --- configs/khadas-vim3_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index

[PATCH v3 3/6] adc: meson-saradc: skip hardware init only if ADC is enabled

2020-12-15 Thread Marek Szyprowski
The driver skips hardware initialization if it is already configured by the earlier bootloader stage (BL30). Skip the initialization only if the hardware is really initialized and enabled. Signed-off-by: Marek Szyprowski Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon

[PATCH v3 2/6] adc: meson-saradc: add G12A variant

2020-12-15 Thread Marek Szyprowski
Add support for the SARADC variant found on the G12A SoCs family. Signed-off-by: Marek Szyprowski Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung --- drivers/adc/meson-saradc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/adc/meson-saradc.c b

[PATCH v3 1/6] clk: meson: add minimal driver for g12a-ao clocks

2020-12-15 Thread Marek Szyprowski
Add minimal driver AO clocks on meson G12A family. Only ADC related clocks are supported. Signed-off-by: Marek Szyprowski Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung --- drivers/clk/meson/Makefile | 1 + drivers/clk/meson/g12a-ao.c | 83

Re: [PATCH v2 6/7 RESEND] cmd: button: store button state in the 'button' env

2020-12-15 Thread Marek Szyprowski
On 16.12.2020 08:29, Heinrich Schuchardt wrote: > On 12/16/20 8:08 AM, Marek Szyprowski wrote: >> On 15.12.2020 20:07, Heinrich Schuchardt wrote: >>> On 12/15/20 5:54 PM, Marek Szyprowski wrote: >>>> Save examined button state in 'button' environment variable to ena

Re: [PATCH v2 6/7 RESEND] cmd: button: store button state in the 'button' env

2020-12-15 Thread Marek Szyprowski
On 15.12.2020 20:07, Heinrich Schuchardt wrote: > On 12/15/20 5:54 PM, Marek Szyprowski wrote: >> Save examined button state in 'button' environment variable to enable >> checking button state in the scripts. >> >> Signed-off-by: Marek Szyprowski >> --- >>

[PATCH v2 6/7 RESEND] cmd: button: store button state in the 'button' env

2020-12-15 Thread Marek Szyprowski
Save examined button state in 'button' environment variable to enable checking button state in the scripts. Signed-off-by: Marek Szyprowski --- Resend reason: get rid of the Change-Id tag, that was still in v2. --- cmd/button.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH v2 5/7] button: add a simple ADC-based button driver

2020-12-15 Thread Marek Szyprowski
Add a simple ADC-based button driver. This driver binds to the 'adc-keys' device tree node. Signed-off-by: Marek Szyprowski --- drivers/button/Kconfig | 8 +++ drivers/button/Makefile | 1 + drivers/button/button-adc.c | 117 3 files changed

[PATCH v2 1/7] clk: meson: add minimal driver for g12a-ao clocks

2020-12-15 Thread Marek Szyprowski
Add minimal driver AO clocks on meson G12A family. Only ADC related clocks are supported. Signed-off-by: Marek Szyprowski Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung --- drivers/clk/meson/Makefile | 1 + drivers/clk/meson/g12a-ao.c | 83

[PATCH v2 4/7] configs: khadas-vim3: enable ADC device support

2020-12-15 Thread Marek Szyprowski
ADC device (Meson SARADC) will be used for probing 'Function' button state. Signed-off-by: Marek Szyprowski --- configs/khadas-vim3_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index 9d7ba72d44..5d16652fd6 100644

[PATCH v2 0/7] VIM3: add support for checking 'Function' button state

2020-12-15 Thread Marek Szyprowski
drivers. Once applied, one can use following commands in the boot scripts: -->8--- echo Checking Func button state: \\c button Function if test ${button} = on then echo Selected alternative boot ... fi --->8--- Best regards Marek Szyprowski Samsung R Institute Poland Changel

[PATCH v2 2/7] adc: meson-saradc: add G12A variant

2020-12-15 Thread Marek Szyprowski
Add support for the SARADC variant found on the G12A SoCs family. Signed-off-by: Marek Szyprowski Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung --- drivers/adc/meson-saradc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/adc/meson-saradc.c b

[PATCH v2 7/7] configs: khadas-vim3: enable Function button support

2020-12-15 Thread Marek Szyprowski
Add options needed to check the 'Function' button state. Signed-off-by: Marek Szyprowski --- configs/khadas-vim3_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index 5d16652fd6..bc17430569 100644 --- a/configs/khadas

[PATCH v2 6/7] cmd: button: store button state in the 'button' env

2020-12-15 Thread Marek Szyprowski
Save examined button state in 'button' environment variable to enable checking button state in the scripts. Signed-off-by: Marek Szyprowski Change-Id: I78b539e1516573fcfea4401f75469291844daae4 --- cmd/button.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/button.c b

[PATCH v2 3/7] adc: meson-saradc: skip hardware init only if ADC is enabled

2020-12-15 Thread Marek Szyprowski
The driver skips hardware initialization if it is already configured by the earlier bootloader stage (BL30). Skip the initialization only if the hardware is really initialized and enabled. Signed-off-by: Marek Szyprowski Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon

Re: [PATCH 6/6] configs: khadas-vim3: enable Function button support

2020-12-14 Thread Marek Szyprowski
Hi Neil, On 14.12.2020 19:55, Neil Armstrong wrote: > On 14/12/2020 12:24, Marek Szyprowski wrote: >> Add options required to check the 'Function' button state. >> >> Signed-off-by: Marek Szyprowski >> --- >> configs/khadas-vim3_defconfig | 4

  1   2   3   >