[PATCH v2 4/8] sandbox: add tests for UCLASS_SM

2023-09-11 Thread Alexey Romanov
This patchs adds simple tests for Secure Monitor uclass. Signed-off-by: Alexey Romanov --- test/dm/Makefile | 1 + test/dm/sm.c | 65 2 files changed, 66 insertions(+) create mode 100644 test/dm/sm.c diff --git a/test/dm/Makefile b/test/dm

[PATCH v2 1/8] drivers: introduce Secure Monitor uclass

2023-09-11 Thread Alexey Romanov
pt_regs, which describes Secure Monitor arguments. Signed-off-by: Alexey Romanov --- drivers/Kconfig| 2 ++ drivers/Makefile | 1 + drivers/sm/Kconfig | 2 ++ drivers/sm/Makefile| 3 ++ drivers/sm/sm-uclass.c | 55 include/dm/uclass-id.h

[PATCH v2 2/8] sandbox: add sandobx sm uclass driver

2023-09-11 Thread Alexey Romanov
This patch adds sandbox secure monitor driver. Signed-off-by: Alexey Romanov --- drivers/sm/Makefile | 1 + drivers/sm/sandbox-sm.c | 76 + include/sandbox-sm.h| 18 ++ 3 files changed, 95 insertions(+) create mode 100644 drivers/sm

[PATCH v2 0/8] Add SM uclass and Meson SM driver

2023-09-11 Thread Alexey Romanov
such a uclass to be too arch-specific. That's why I suggest SM_UCLASS, which is not so arch-specific: secure monitor can used for whole ARM devices, not only for Amlogic SoC's. Alexey Romanov (8): drivers: introduce Secure Monitor uclass sandbox: add sandobx sm uclass driver sandbox: dts: add meson

[PATCH v2 3/8] sandbox: dts: add meson secure monitor node

2023-09-11 Thread Alexey Romanov
We need this to test UCLASS_SM. Signed-off-by: Alexey Romanov --- arch/sandbox/dts/test.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index dffe10adbf..4475aa58a6 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts

[PATCH v2 6/8] drivers: introduce Meson Secure Monitor driver

2023-09-11 Thread Alexey Romanov
This patch adds an implementation of the Meson Secure Monitor driver based on UCLASS_SM. Signed-off-by: Alexey Romanov --- MAINTAINERS | 1 + drivers/sm/Kconfig| 7 ++ drivers/sm/Makefile | 1 + drivers/sm/meson-sm.c | 198

[PATCH v2 8/8] arch: meson: use secure monitor driver

2023-09-11 Thread Alexey Romanov
Now we have to use UCLASS_SM driver instead of raw smc_call() function call. Signed-off-by: Alexey Romanov --- arch/arm/mach-meson/Kconfig | 1 + arch/arm/mach-meson/sm.c| 110 +++- 2 files changed, 58 insertions(+), 53 deletions(-) diff --git a/arch/arm

[PATCH v2 7/8] arch: meson: sm: set correct order of the includes

2023-09-11 Thread Alexey Romanov
The common.h header should always be first, followed by other headers in order, then headers with directories, then local files. Signed-off-by: Alexey Romanov --- arch/arm/mach-meson/sm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-meson/sm.c b/arch

[PATCH v2 5/8] sandbox: defconfig: enable CONFIG_SM option

2023-09-11 Thread Alexey Romanov
We use this option for test UCLASS_SM. Signed-off-by: Alexey Romanov --- configs/sandbox_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index be46cae7aa..0745a4ecca 100644 --- a/configs/sandbox_defconfig +++ b/configs

Re: [PATCH v1 2/2] meson-a1: dts: add ao secure node

2023-09-15 Thread Alexey Romanov
Hi Neil, On Wed, Jun 21, 2023 at 04:29:53PM +0300, Alexey Romanov wrote: > ao-secure node can be used to get information about the board, > so, for example, using show_board_info() we can get following > information for board with Meson A1 SoC: > > SoC: Amlogic Meson A1 (A113L) R

Re: [PATCH v1 1/2] meson-a1: dts: add hw rng node

2023-09-15 Thread Alexey Romanov
Hi Neil, On Thu, Jun 22, 2023 at 06:19:33PM +0200, neil.armstr...@linaro.org wrote: > On 21/06/2023 15:29, Alexey Romanov wrote: > > Add support for hardware random number generator > > of Amlogic Meson SoCs. > > > > Signed-off-by: Alexey Romanov > > --- >

[PATCH v1 2/2] drivers: sm: bind child sm devices in the device tree

2023-11-01 Thread Alexey Romanov
From: Dmitry Rokosov One well-known sm child device that provides secure power control is the Secure Power Controller. This device utilizes SMC calls to communicate with power domains on the secure monitor side. Signed-off-by: Dmitry Rokosov Signed-off-by: Alexey Romanov --- drivers/sm/meson

[PATCH v1 1/2] clk: a1: add new clocks for USB stack

2023-11-01 Thread Alexey Romanov
Since we sync device tree with Linux, we have to add this clock definition for USB stack. Signed-off-by: Alexey Romanov --- drivers/clk/meson/a1.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/meson/a1.c b/drivers/clk/meson/a1.c index 1075ba7333..d0f5bb3753 100644

[PATCH v1] rng: add dm_rng_read_default() helper

2023-11-01 Thread Alexey Romanov
Add dm_rng_read_default() function, which obtain a series of random bytes. In some cases, such function would be useful because it allows the caller to abstract away from RNG device. Signed-off-by: Alexey Romanov --- drivers/rng/rng-uclass.c | 20 include/rng.h

[PATCH v1 0/2] Meson A1: fix USB and NAND stack

2023-11-01 Thread Alexey Romanov
Hello! After a recent sync device tree with the Linux Kernel, some drivers broke. These patchset will fix that. Alexey Romanov (1): clk: a1: add new clocks for USB stack Dmitry Rokosov (1): drivers: sm: bind child sm devices in the device tree drivers/clk/meson/a1.c | 6 ++ drivers/sm

[PATCH v2 0/2] Add dm_rng_read_default() helper

2023-11-02 Thread Alexey Romanov
Hello! This patchset adds dm_rng_read_default() helper function, that selects the first rng device and uses it to obtain random bytes. V2: - Move platform_get_rng_device() to rng-uclass.c. - Re-implement it to get first successfully probed device. - Use it in dm_rng_read_default(). Alexey

[PATCH v2 1/2] rng: move platform_get_rng_device() to rng-uclass.c

2023-11-02 Thread Alexey Romanov
The correct declaration place for platform_get_rng_device() function is here. Also, this function is re-implemented to provide the first successfully probed RNG device. Signed-off-by: Alexey Romanov --- drivers/rng/rng-uclass.c | 16 include/efi_rng.h| 2 -- include

[PATCH v2 2/2] rng: add dm_rng_read_default() helper

2023-11-02 Thread Alexey Romanov
Add dm_rng_read_default() function, which obtain a series of random bytes. In some cases, such function would be useful because it allows the caller to abstract away from RNG device. Signed-off-by: Alexey Romanov --- drivers/rng/rng-uclass.c | 18 ++ include/rng.h

[PATCH v3 2/8] sandbox: add sandbox sm uclass driver

2023-09-21 Thread Alexey Romanov
This patch adds sandbox secure monitor driver. Signed-off-by: Alexey Romanov Reviewed-by: Simon Glass --- drivers/sm/Makefile | 1 + drivers/sm/sandbox-sm.c | 76 + include/sandbox-sm.h| 18 ++ 3 files changed, 95 insertions(+) create

[PATCH v3 1/8] drivers: introduce Secure Monitor uclass

2023-09-21 Thread Alexey Romanov
pt_regs, which describes Secure Monitor arguments. Signed-off-by: Alexey Romanov Reviewed-by: Simon Glass --- drivers/Kconfig| 2 ++ drivers/Makefile | 1 + drivers/sm/Kconfig | 2 ++ drivers/sm/Makefile| 3 ++ drivers/sm/sm-uclass.c | 55

[PATCH v3 0/8] Add SM uclass and Meson SM driver

2023-09-21 Thread Alexey Romanov
of -EPROTONOSUPPORT if SM_UCLASS option not implemented Alexey Romanov (8): drivers: introduce Secure Monitor uclass sandbox: add sandbox sm uclass driver sandbox: dts: add meson secure monitor node sandbox: add tests for UCLASS_SM sandbox: defconfig: enable CONFIG_SM option drivers

[PATCH v3 6/8] drivers: introduce Meson Secure Monitor driver

2023-09-21 Thread Alexey Romanov
This patch adds an implementation of the Meson Secure Monitor driver based on UCLASS_SM. Signed-off-by: Alexey Romanov Reviewed-by: Simon Glass --- MAINTAINERS | 1 + drivers/sm/Kconfig| 7 ++ drivers/sm/Makefile | 1 + drivers/sm/meson-sm.c | 198

[PATCH v3 3/8] sandbox: dts: add meson secure monitor node

2023-09-21 Thread Alexey Romanov
We need this to test UCLASS_SM. Signed-off-by: Alexey Romanov Reviewed-by: Simon Glass --- arch/sandbox/dts/test.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index dffe10adbf..4475aa58a6 100644 --- a/arch/sandbox/dts/test.dts

[PATCH v3 4/8] sandbox: add tests for UCLASS_SM

2023-09-21 Thread Alexey Romanov
This patchs adds simple tests for Secure Monitor uclass. Signed-off-by: Alexey Romanov Reviewed-by: Simon Glass --- test/dm/Makefile | 1 + test/dm/sm.c | 65 2 files changed, 66 insertions(+) create mode 100644 test/dm/sm.c diff --git

[PATCH v3 8/8] arch: meson: use secure monitor driver

2023-09-21 Thread Alexey Romanov
Now we have to use UCLASS_SM driver instead of raw smc_call() function call. Signed-off-by: Alexey Romanov Reviewed-by: Simon Glass --- arch/arm/mach-meson/Kconfig | 1 + arch/arm/mach-meson/sm.c| 110 +++- 2 files changed, 58 insertions(+), 53 deletions

[PATCH v3 7/8] arch: meson: sm: set correct order of the includes

2023-09-21 Thread Alexey Romanov
The common.h header should always be first, followed by other headers in order, then headers with directories, then local files. Signed-off-by: Alexey Romanov Reviewed-by: Simon Glass --- arch/arm/mach-meson/sm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch

[PATCH v3 5/8] sandbox: defconfig: enable CONFIG_SM option

2023-09-21 Thread Alexey Romanov
We use this option to test UCLASS_SM. Signed-off-by: Alexey Romanov Reviewed-by: Simon Glass --- configs/sandbox_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index be46cae7aa..0745a4ecca 100644 --- a/configs

[PATCH v1 4/8] phy: move clk enable/disable in init/exit

2023-10-02 Thread Alexey Romanov
...@mail.gmail.com/ Signed-off-by: Alexey Romanov --- drivers/phy/meson-g12a-usb2.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c index 2e366b16ae..7b028784a0 100644 --- a/drivers/phy/meson

[PATCH v1 0/8] Support USB for Meson A1

2023-10-02 Thread Alexey Romanov
Hello! This patchset adds USB stack support for Amlogic A1 SoC's series. Made reset / phy / dwc3 drivers more flexible and added support for A1 board. Alexey Romanov (7): dt-bindings: reset: add Meson A1 reset bindings reset: add support for Amlogic A1 family phy: get rid of raw hex values

[PATCH v1 1/8] dt-bindings: reset: add Meson A1 reset bindings

2023-10-02 Thread Alexey Romanov
Get this from Linux 6.6-rc3. Signed-off-by: Alexey Romanov --- .../reset/amlogic,meson-a1-reset.h| 76 +++ 1 file changed, 76 insertions(+) create mode 100644 include/dt-bindings/reset/amlogic,meson-a1-reset.h diff --git a/include/dt-bindings/reset/amlogic,meson-a1

[PATCH v1 2/8] reset: add support for Amlogic A1 family

2023-10-02 Thread Alexey Romanov
This patch adds reset support for the Amlogic A1 family. We add the structure meson_reset_drvdata, which in the future will allow this driver to be used for other families by declaring only the correct parameters reg_count and level_offset. Signed-off-by: Alexey Romanov --- drivers/reset/reset

[PATCH v1 6/8] a1: clk: Add missing CLKID_USB_PHY_IN gate

2023-10-02 Thread Alexey Romanov
From: Igor Prusov We use this clock in dwc3 driver. Signed-off-by: Igor Prusov --- drivers/clk/meson/a1.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/meson/a1.c b/drivers/clk/meson/a1.c index 3aec42f33b..1540e1875b 100644 --- a/drivers/clk/meson/a1.c +++

[PATCH v1 5/8] phy: support Amlogic A1 family

2023-10-02 Thread Alexey Romanov
Setting G12A and A1 is similar, so we can use G12A phy driver with little changes. Signed-off-by: Alexey Romanov --- drivers/phy/Kconfig | 2 +- drivers/phy/meson-g12a-usb2.c | 77 --- 2 files changed, 64 insertions(+), 15 deletions(-) diff --git

[PATCH v1 7/8] dwc3: add support for Amlogic A1 family

2023-10-02 Thread Alexey Romanov
Now the driver supports also A1 phy layer. Signed-off-by: Alexey Romanov --- drivers/usb/dwc3/dwc3-meson-g12a.c | 73 ++ 1 file changed, 63 insertions(+), 10 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index

[PATCH v1 3/8] phy: get rid of raw hex values

2023-10-02 Thread Alexey Romanov
It is better to use defines instead of write raw hex values in regmap. Signed-off-by: Alexey Romanov --- drivers/phy/meson-g12a-usb2.c | 161 -- 1 file changed, 153 insertions(+), 8 deletions(-) diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a

[PATCH v1 8/8] arch: a1: introduce USB initialization functionality

2023-10-02 Thread Alexey Romanov
This is entrypoint for USB stack initialization. Function board_usb_init will be called from cmd/fastboot.c code. Signed-off-by: Alexey Romanov --- arch/arm/mach-meson/board-a1.c | 89 ++ 1 file changed, 89 insertions(+) diff --git a/arch/arm/mach-meson/board-a1

[PATCH v2 1/8] dt-bindings: reset: add Meson A1 reset bindings

2023-10-03 Thread Alexey Romanov
Get this from Linux 6.6-rc3. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- .../reset/amlogic,meson-a1-reset.h| 76 +++ 1 file changed, 76 insertions(+) create mode 100644 include/dt-bindings/reset/amlogic,meson-a1-reset.h diff --git a/include/dt

[PATCH v2 0/8] Support USB for Meson A1

2023-10-03 Thread Alexey Romanov
of, enable CONFIG_DM_USB_GADGET for AD401 board. - Support A1 in g12a_child_pre_probe/post_remove functions in dwc3 driver. Alexey Romanov (7): dt-bindings: reset: add Meson A1 reset bindings reset: add support for Amlogic A1 family phy: get rid of raw hex values phy: move clk enable/disable

[PATCH v2 5/8] phy: support Amlogic A1 family

2023-10-03 Thread Alexey Romanov
Setting G12A and A1 is similar, so we can use G12A phy driver with little changes. Signed-off-by: Alexey Romanov --- drivers/phy/Kconfig | 2 +- drivers/phy/meson-g12a-usb2.c | 79 --- 2 files changed, 66 insertions(+), 15 deletions(-) diff --git

[PATCH v2 4/8] phy: move clk enable/disable in init/exit

2023-10-03 Thread Alexey Romanov
...@mail.gmail.com/ Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- drivers/phy/meson-g12a-usb2.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c index 2e366b16ae..7b028784a0

[PATCH v2 3/8] phy: get rid of raw hex values

2023-10-03 Thread Alexey Romanov
It is better to use defines instead of write raw hex values in regmap. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- drivers/phy/meson-g12a-usb2.c | 161 -- 1 file changed, 153 insertions(+), 8 deletions(-) diff --git a/drivers/phy/meson-g12a

[PATCH v2 6/8] a1: clk: Add missing USB_PHY_IN and USB_PHY gates

2023-10-03 Thread Alexey Romanov
From: Igor Prusov We use this clocks in dwc3 driver. Signed-off-by: Igor Prusov Signed-off-by: Alexey Romanov --- drivers/clk/meson/a1.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/meson/a1.c b/drivers/clk/meson/a1.c index 3aec42f33b..1075ba7333 100644 --- a/drivers

[PATCH v2 2/8] reset: add support for Amlogic A1 family

2023-10-03 Thread Alexey Romanov
This patch adds reset support for the Amlogic A1 family. We add the structure meson_reset_drvdata, which in the future will allow this driver to be used for other families by declaring only the correct parameters reg_count and level_offset. Signed-off-by: Alexey Romanov Reviewed-by: Neil

[PATCH v2 8/8] ad401: enable USB stack

2023-10-03 Thread Alexey Romanov
Currently we have all drivers for use USB stack on A1-series SoC's. Let's enable USB options for the Amlogic AD401 reference A1 SoC board. Signed-off-by: Alexey Romanov --- configs/ad401_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/ad401_defconfig b/configs

[PATCH v2 7/8] dwc3: add support for Amlogic A1 family

2023-10-03 Thread Alexey Romanov
Now the driver supports also A1 phy layer. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- drivers/usb/dwc3/dwc3-meson-g12a.c | 73 ++ 1 file changed, 63 insertions(+), 10 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb

[PATCH v2 0/2] Meson A1: add HW RNG and AO Secure nodes

2023-10-10 Thread Alexey Romanov
Hello! This patchest adds HW RNG and AO Secure definition in device tree for Amlogic A1-series. V2: - Rebased over latest amlogic U-Boot branch. Alexey Romanov (2): meson-a1: dts: add hw rng node meson-a1: dts: add ao secure node arch/arm/dts/meson-a1.dtsi | 11 +++ 1 file

[PATCH v2 1/1] drivers: rng: add support for Meson S4

2023-10-10 Thread Alexey Romanov
For some Amlogic SOC's, mechanism to obtain random number has been changed. For example, S4 now uses status bit waiting algo. Signed-off-by: Alexey Romanov --- drivers/rng/meson-rng.c | 72 - 1 file changed, 71 insertions(+), 1 deletion(-) diff --git

[PATCH v2 1/2] meson-a1: dts: add hw rng node

2023-10-10 Thread Alexey Romanov
Add support for hardware random number generator of Amlogic Meson SoCs. Signed-off-by: Alexey Romanov --- arch/arm/dts/meson-a1.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/dts/meson-a1.dtsi b/arch/arm/dts/meson-a1.dtsi index 6509329b85..e6e72d4004 100644 --- a/arch

[PATCH v2 2/2] meson-a1: dts: add ao secure node

2023-10-10 Thread Alexey Romanov
ao-secure node can be used to get information about the board, so, for example, using show_board_info() we can get following information for board with Meson A1 SoC: SoC: Amlogic Meson A1 (A113L) Revision 2c:a (1:a) Signed-off-by: Alexey Romanov --- arch/arm/dts/meson-a1.dtsi | 6 ++ 1

[PATCH v2 0/1] hwrng: meson - add support for S4

2023-10-10 Thread Alexey Romanov
Hello! This patch adds support for Meson S4 series hardware number generator using new algo. V2: - Sync with Linux version. Alexey Romanov (1): drivers: rng: add support for Meson S4 drivers/rng/meson-rng.c | 72 - 1 file changed, 71 insertions

[PATCH v3 1/1] drivers: rng: add support for Meson S4

2023-10-12 Thread Alexey Romanov
For some Amlogic SOC's, mechanism to obtain random number has been changed. For example, S4 now uses status bit waiting algo. Signed-off-by: Alexey Romanov --- drivers/rng/meson-rng.c | 72 - 1 file changed, 71 insertions(+), 1 deletion(-) diff --git

[PATCH v3 0/1] hwrng: meson - add support for S4

2023-10-12 Thread Alexey Romanov
Hello! This patch adds support for Meson S4 series hardware number generator using new algo. V2: - Sync with Linux version. V3: - Fix compiler warning "makes pointer from integer without a cast" Alexey Romanov (1): drivers: rng: add support for Meson S4 drivers/rng/meson-

[PATCH v3 4/8] phy: move clk enable/disable in init/exit

2023-10-05 Thread Alexey Romanov
...@mail.gmail.com/ Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- drivers/phy/meson-g12a-usb2.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c index a803b6796c..2ea0498f86

[PATCH v3 5/8] phy: support Amlogic A1 family

2023-10-05 Thread Alexey Romanov
Setting G12A and A1 is similar, so we can use G12A phy driver with little changes. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- drivers/phy/Kconfig | 2 +- drivers/phy/meson-g12a-usb2.c | 79 --- 2 files changed, 66 insertions(+), 15

[PATCH v3 3/8] phy: get rid of raw hex values

2023-10-05 Thread Alexey Romanov
It is better to use defines instead of write raw hex values in regmap. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- drivers/phy/meson-g12a-usb2.c | 161 -- 1 file changed, 153 insertions(+), 8 deletions(-) diff --git a/drivers/phy/meson-g12a

[PATCH v3 8/8] ad401: enable USB stack

2023-10-05 Thread Alexey Romanov
Currently we have all drivers for use USB stack on A1-series SoC's. Let's enable USB options for the Amlogic AD401 reference A1 SoC board. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- configs/ad401_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs

[PATCH v3 6/8] a1: clk: Add missing USB_PHY_IN and USB_PHY gates

2023-10-05 Thread Alexey Romanov
From: Igor Prusov We use this clocks in dwc3 driver. Signed-off-by: Igor Prusov Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- drivers/clk/meson/a1.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/meson/a1.c b/drivers/clk/meson/a1.c index 3aec42f33b

[PATCH v3 1/8] dt-bindings: reset: add Meson A1 reset bindings

2023-10-05 Thread Alexey Romanov
Get this from Linux 6.6-rc3. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- .../reset/amlogic,meson-a1-reset.h| 76 +++ 1 file changed, 76 insertions(+) create mode 100644 include/dt-bindings/reset/amlogic,meson-a1-reset.h diff --git a/include/dt

[PATCH v3 2/8] reset: add support for Amlogic A1 family

2023-10-05 Thread Alexey Romanov
This patch adds reset support for the Amlogic A1 family. We add the structure meson_reset_drvdata, which in the future will allow this driver to be used for other families by declaring only the correct parameters reg_count and level_offset. Signed-off-by: Alexey Romanov Reviewed-by: Neil

[PATCH v3 0/8] Support USB for Meson A1

2023-10-05 Thread Alexey Romanov
of, enable CONFIG_DM_USB_GADGET for AD401 board. - Support A1 in g12a_child_pre_probe/post_remove functions in dwc3 driver. V3: - Rebased over latests Amlogic U-Boot branch. Alexey Romanov (7): dt-bindings: reset: add Meson A1 reset bindings reset: add support for Amlogic A1 family phy: get

[PATCH v1] drivers: sm: fix build warning

2023-10-05 Thread Alexey Romanov
driver") Signed-off-by: Alexey Romanov Signed-off-by: Igor Prusov --- drivers/sm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/sm/Kconfig b/drivers/sm/Kconfig index b4cc3f768e..f0987275d2 100644 --- a/drivers/sm/Kconfig +++ b/drivers/sm/Kconfig @@ -3,7 +

[PATCH v3 7/8] dwc3: add support for Amlogic A1 family

2023-10-05 Thread Alexey Romanov
Now the driver supports also A1 phy layer. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- drivers/usb/dwc3/dwc3-meson-g12a.c | 79 ++ 1 file changed, 69 insertions(+), 10 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb

[PATCH v1] drivers: don't compile Secure Monitor UCLASS unconditionally

2023-10-13 Thread Alexey Romanov
It makes no sense to compile Secure Monitor unconditionally. For example, this break the SPL build on boards with a small allowed SPL image size. Fixes: 126fbbefd89e ("drivers: introduce Secure Monitor uclass") Signed-off-by: Alexey Romanov --- drivers/Makefile | 2 +- 1 file

Re: [PATCH v1 1/2] drivers: firmware: introduce Meson Secure Monitor driver

2023-08-22 Thread Alexey Romanov
Hi, On Tue, Aug 22, 2023 at 10:24:23AM +0200, neil.armstr...@linaro.org wrote: > On 21/08/2023 21:11, Simon Glass wrote: > > Hi Neil, > > > > On Mon, 21 Aug 2023 at 03:16, neil.armstr...@linaro.org > > wrote: > > > > > > Hi, > > > > > > On 16/07/2023 01:40, Simon Glass wrote: > > > > Hi, > >

Re: [PATCH v1 1/2] drivers: firmware: introduce Meson Secure Monitor driver

2023-08-24 Thread Alexey Romanov
Hi Simon, On Tue, Aug 22, 2023 at 12:56:32PM -0600, Simon Glass wrote: > Hi Alexey, > > On Tue, 22 Aug 2023 at 06:59, Alexey Romanov > wrote: > > > > Hi, > > > > On Tue, Aug 22, 2023 at 10:24:23AM +0200, neil.armstr...@linaro.org wrote: > > > On 21

[PATCH v3 5/5] doc/usage: cmd: sm: documentation efusedump cmd

2022-12-22 Thread Alexey Romanov
Signed-off-by: Alexey Romanov --- doc/usage/cmd/sm.rst | 4 1 file changed, 4 insertions(+) diff --git a/doc/usage/cmd/sm.rst b/doc/usage/cmd/sm.rst index 3a70c137ec9..beb53b3f46d 100644 --- a/doc/usage/cmd/sm.rst +++ b/doc/usage/cmd/sm.rst @@ -38,6 +38,10 @@ sm efusewrite Write

[PATCH v3 2/5] arm/mach-meson: move smc commands in cmd/meson

2022-12-22 Thread Alexey Romanov
It is incorrect to keep commands in the arch/ folder. Signed-off-by: Alexey Romanov Reviewed-by: Mattijs Korpershoek --- MAINTAINERS | 1 + arch/arm/mach-meson/sm.c | 144 cmd/Kconfig | 7 ++ cmd/Makefile | 3

[PATCH v3 0/5] arch-meson: introduce efusedump command

2022-12-22 Thread Alexey Romanov
Keeping the commands code in an arch/ is not correct. This patchset moves the meson smc commands from arch/arm/mach-meson to cmd/meson folder and also adds a new 'efusedump' command with which user can print efuse memory. Alexey Romanov (5): asm/arch-meson: add missing meson_sm_write_efuse

[PATCH v3 1/5] asm/arch-meson: add missing meson_sm_write_efuse signature

2022-12-22 Thread Alexey Romanov
This function can be used by other modules. Also add comments. Signed-off-by: Alexey Romanov --- arch/arm/include/asm/arch-meson/sm.h | 28 1 file changed, 28 insertions(+) diff --git a/arch/arm/include/asm/arch-meson/sm.h b/arch/arm/include/asm/arch-meson/sm.h

[PATCH v3 4/5] cmd/arm: meson: sm: introduce efusedump command

2022-12-22 Thread Alexey Romanov
Using this command user can print efuse memory: $ sm efusedump 0 10 : ff 00 31 00 00 ff 66 00 00 00 ..1...f... Signed-off-by: Alexey Romanov Reviewed-by: Mattijs Korpershoek --- cmd/meson/sm.c | 36 +++- 1 file changed, 35 insertions(+), 1

[PATCH v3 3/5] doc/usage: cmd: documentation for meson/sm command

2022-12-22 Thread Alexey Romanov
Signed-off-by: Alexey Romanov --- doc/usage/cmd/sm.rst | 44 1 file changed, 44 insertions(+) create mode 100644 doc/usage/cmd/sm.rst diff --git a/doc/usage/cmd/sm.rst b/doc/usage/cmd/sm.rst new file mode 100644 index 000..3a70c137ec9

[PATCH v4 5/5] doc/usage: cmd: sm: documentation efusedump cmd

2023-01-10 Thread Alexey Romanov
Added docs about sm efusedump command, that reads bytes from efuse memory bank and print them to the console. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- doc/usage/cmd/sm.rst | 4 1 file changed, 4 insertions(+) diff --git a/doc/usage/cmd/sm.rst b/doc/usage/cmd/sm.rst

[PATCH v4 3/5] doc/usage: cmd: documentation for meson/sm command

2023-01-10 Thread Alexey Romanov
Added docs for Meson Security Monitor command. Signed-off-by: Alexey Romanov --- doc/usage/cmd/sm.rst | 44 doc/usage/index.rst | 1 + 2 files changed, 45 insertions(+) create mode 100644 doc/usage/cmd/sm.rst diff --git a/doc/usage/cmd/sm.rst b

[PATCH v4 4/5] cmd/arm: meson: sm: introduce efusedump command

2023-01-10 Thread Alexey Romanov
Using this command user can print efuse memory: $ sm efusedump 0 10 : ff 00 31 00 00 ff 66 00 00 00 ..1...f... Signed-off-by: Alexey Romanov Reviewed-by: Mattijs Korpershoek Reviewed-by: Neil Armstrong --- cmd/meson/sm.c | 36 +++- 1 file

[PATCH v4 0/5] arch-meson: introduce efusedump command

2023-01-10 Thread Alexey Romanov
Keeping the commands code in an arch/ is not correct. This patchset moves the meson smc commands from arch/arm/mach-meson to cmd/meson folder and also adds a new 'efusedump' command with which user can print efuse memory. Alexey Romanov (5): asm/arch-meson: add missing meson_sm_write_efuse

[PATCH v4 2/5] arm/mach-meson: move smc commands in cmd/meson

2023-01-10 Thread Alexey Romanov
It is incorrect to keep commands in the arch/ folder. Signed-off-by: Alexey Romanov Reviewed-by: Mattijs Korpershoek Reviewed-by: Neil Armstrong --- MAINTAINERS | 1 + arch/arm/mach-meson/sm.c | 144 cmd/Kconfig | 7 ++ cmd

[PATCH v4 1/5] asm/arch-meson: add missing meson_sm_write_efuse signature

2023-01-10 Thread Alexey Romanov
This function can be used by other modules. Also add comments. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- arch/arm/include/asm/arch-meson/sm.h | 28 1 file changed, 28 insertions(+) diff --git a/arch/arm/include/asm/arch-meson/sm.h b/arch/arm

[PATCH v1] arch/arm: sm: introduce efusedump command

2022-12-09 Thread Alexey Romanov
Using this command user can print efuse memory: $ sm efusedump 0 10 : ff 00 31 00 00 ff 66 00 00 00 ..1...f... Signed-off-by: Alexey Romanov --- arch/arm/mach-meson/sm.c | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/arch

[PATCH v2 3/3] cmd/arm: meson: sm: introduce efusedump command

2022-12-13 Thread Alexey Romanov
Using this command user can print efuse memory: $ sm efusedump 0 10 : ff 00 31 00 00 ff 66 00 00 00 ..1...f... Signed-off-by: Alexey Romanov --- cmd/meson/sm.c | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/cmd/meson/sm.c

[PATCH v2 2/3] arm/mach-meson: move smc commands in cmd/meson

2022-12-13 Thread Alexey Romanov
It is incorrect to keep commands in the arch/ folder. Signed-off-by: Alexey Romanov --- MAINTAINERS | 1 + arch/arm/mach-meson/sm.c | 144 cmd/Kconfig | 7 ++ cmd/Makefile | 3 + cmd/meson/Makefile | 5

[PATCH v2 1/3] asm/arch-meson: add missing meson_sm_write_efuse signature

2022-12-13 Thread Alexey Romanov
This function can be used by other modules. Signed-off-by: Alexey Romanov --- arch/arm/include/asm/arch-meson/sm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/include/asm/arch-meson/sm.h b/arch/arm/include/asm/arch-meson/sm.h index f3ae46a6d6b..b68edf842e4 100644 --- a/arch

[PATCH v2 0/3] arch-meson: introduce efusedump command

2022-12-13 Thread Alexey Romanov
Keeping the commands code in an arch/ is not correct. This patchset moves the meson smc commands from arch/arm/mach-meson to cmd/meson folder and also adds a new 'efusedump' command with which user can print efuse memory. Alexey Romanov (3): asm/arch-meson: add missing meson_sm_write_efuse

Re: [PATCH v1] arch/arm: sm: introduce efusedump command

2022-12-13 Thread Alexey Romanov
Hello! On Mon, Dec 12, 2022 at 11:08:34AM -0500, Tom Rini wrote: > On Fri, Dec 09, 2022 at 03:52:04PM +0300, Alexey Romanov wrote: > > > Using this command user can print efuse memory: > > > > $ sm efusedump 0 10 > > : ff 00 31 00 00 ff 66 00 00 00

Re: [PATCH v2 2/3] arm/mach-meson: move smc commands in cmd/meson

2022-12-14 Thread Alexey Romanov
On Wed, Dec 14, 2022 at 11:33:35AM +0100, Mattijs Korpershoek wrote: > On Tue, Dec 13, 2022 at 21:31, Alexey Romanov > wrote: > > > It is incorrect to keep commands in the arch/ folder. > > > > Signed-off-by: Alexey Romanov > > --- > > MAINTAINERS

Re: [PATCH v2 1/3] asm/arch-meson: add missing meson_sm_write_efuse signature

2022-12-14 Thread Alexey Romanov
Hello! On Tue, Dec 13, 2022 at 08:39:46PM -0800, Simon Glass wrote: > Hi Alexey, > > On Tue, 13 Dec 2022 at 10:32, Alexey Romanov wrote: > > > > This function can be used by other modules. > > > > Signed-off-by: Alexey Romanov > > --- > > arch/

Re: [PATCH v2 0/3] arch-meson: introduce efusedump command

2022-12-14 Thread Alexey Romanov
Hello! On Tue, Dec 13, 2022 at 08:39:43PM -0800, Simon Glass wrote: > Hi Alexey, > > On Tue, 13 Dec 2022 at 10:31, Alexey Romanov wrote: > > > > Keeping the commands code in an arch/ is not correct. This patchset > > moves the meson smc commands from arch/arm/mach-me

[PATCH v1 2/2] asm/arch: mach-meson: use secure monitor driver

2023-07-06 Thread Alexey Romanov
Now we have to use UCLASS_FIRMWARE meson secure monitor driver instead of raw smc_call() function call. Signed-off-by: Alexey Romanov --- arch/arm/mach-meson/sm.c | 161 +++ 1 file changed, 97 insertions(+), 64 deletions(-) diff --git a/arch/arm/mach-meson

[PATCH v1 1/2] drivers: firmware: introduce Meson Secure Monitor driver

2023-07-06 Thread Alexey Romanov
() A typical driver usage example is shown here: 1. uclass_get_device_by_driver(UCLASS_FIRMWARE, "secure-monitor", ); 2. handle = meson_sm_get_handle(dev); 3. handle->ops.sm_call(dev, cmd, ...); Signed-off-by: Alexey Romanov --- arch/arm/mach-meson/Kconfig | 1 + drivers/fir

[PATCH v1 0/2] Introduce Meson SM driver

2023-07-06 Thread Alexey Romanov
Hello! This patchset adds Meson Secure Monitor driver, which export following generic API: - sm_call_read() - sm_call_write() - sm_call() Also, now use this new API in arch/arm/mach-meson/sm.c helper functions. Alexey Romanov (2): drivers: firmware: introduce Meson Secure Monitor driver

Re: [PATCH v1 1/2] drivers: firmware: introduce Meson Secure Monitor driver

2023-07-07 Thread Alexey Romanov
Hello, Simon! On Thu, Jul 06, 2023 at 09:58:02AM -0600, Simon Glass wrote: > Hi Alexey, > > On Thu, 6 Jul 2023 at 14:16, Alexey Romanov wrote: > > > > At the moment, only smc API is a set of functions in > > arch/arm/mach-meson/sm.c. This approach is hard to conf

Re: [PATCH v1 1/2] drivers: firmware: introduce Meson Secure Monitor driver

2023-07-11 Thread Alexey Romanov
Hi Simon, On Mon, Jul 10, 2023 at 01:45:53PM -0600, Simon Glass wrote: > Hi Alexey, > > On Mon, 10 Jul 2023 at 02:34, Alexey Romanov wrote: > > > > > > Hello! > > > > On Fri, Jul 07, 2023 at 11:35:47AM -0600, Simon Glass wrote: > > > Hi Alexey,

Re: [PATCH v1 1/2] drivers: firmware: introduce Meson Secure Monitor driver

2023-07-10 Thread Alexey Romanov
Hello! On Fri, Jul 07, 2023 at 11:35:47AM -0600, Simon Glass wrote: > Hi Alexey, > > On Fri, 7 Jul 2023 at 09:43, Alexey Romanov wrote: > > > > Hello, Simon! > > > > On Thu, Jul 06, 2023 at 09:58:02AM -0600, Simon Glass wrote: > > > Hi Alexey, >

[PATCH v2 3/3] drivers: meson: introduce secure power controller driver

2023-05-31 Thread Alexey Romanov
This patch adds Power controller driver support for Amlogic A1 family using secure monitor calls. The power domains register only can access in secure world. Signed-off-by: Alexey Romanov --- drivers/power/domain/Kconfig | 7 + drivers/power/domain/Makefile| 1

[PATCH v2 1/3] arch/arm: meson: sm: introduce power domain functions

2023-05-31 Thread Alexey Romanov
This commit adds functions to manage secure power domain for Amlogic SoC's using smc functionality. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong --- arch/arm/include/asm/arch-meson/sm.h | 30 arch/arm/mach-meson/sm.c | 14 + 2

[PATCH v2 0/3] Meson Secure PWRC Driver

2023-05-31 Thread Alexey Romanov
ate patch. * Drop 'move pwrc node to bus' patch. Alexey Romanov (3): arch/arm: meson: sm: introduce power domain functions dt-bindings: power: add Meson A1 PWRC bindings drivers: meson: introduce secure power controller driver arch/arm/include/asm/arch-meson/sm.h | 30 arch/arm/m

[PATCH v2 2/3] dt-bindings: power: add Meson A1 PWRC bindings

2023-05-31 Thread Alexey Romanov
We can use them in secure pwrc driver. Signed-off-by: Alexey Romanov --- include/dt-bindings/power/meson-a1-power.h | 32 ++ 1 file changed, 32 insertions(+) create mode 100644 include/dt-bindings/power/meson-a1-power.h diff --git a/include/dt-bindings/power/meson-a1

[PATCH v1 0/3] Meson Secure PWRC Driver

2023-05-22 Thread Alexey Romanov
Hello! This patch set adds support (driver and sm functions) for working with power domain controller using secure monitor for Amlogic A1-series. Additionally, in the future, the driver can be used for other Amlgoic SoC series, such as S4. Alexey Romanov (3): arch/arm: meson: sm: introduce

[PATCH v1 2/3] drivers: meson: introduce secure power controller driver

2023-05-22 Thread Alexey Romanov
This patch adds Power controller driver support for Amlogic A1 family using secure monitor calls. The power domains register only can access in secure world. Signed-off-by: Alexey Romanov --- drivers/power/domain/Kconfig | 7 + drivers/power/domain/Makefile | 1

[PATCH v1 3/3] arch/arm64: meson-a1: dts: move pwrc node to bus

2023-05-22 Thread Alexey Romanov
This is necessary so that pwrc can be used together with peripherals when described in a bus node. For example, in the future, this will be USB. Signed-off-by: Alexey Romanov --- arch/arm/dts/meson-a1.dtsi | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm

[PATCH v1 1/3] arch/arm: meson: sm: introduce power domain functions

2023-05-22 Thread Alexey Romanov
This commit adds functions to manage secure power domain for Amlogic SoC's using smc functionality. Signed-off-by: Alexey Romanov --- arch/arm/include/asm/arch-meson/sm.h | 30 arch/arm/mach-meson/sm.c | 14 + 2 files changed, 44 insertions

  1   2   >