[PATCH v2 0/5] Support the required clocks to enable USB on SAM9X60

2023-03-08 Thread Claudiu Beznea
itial frequency before probing the OHCI/EHCI driver. Furthermore enable this driver in the defconfigs. Changes in v2: - fix build error for sam9x60_curiosity_mmc1_defconfig - took over the upstream process from Sergiu Claudiu Beznea (1): clk: at91: pmc: export clock setup to pmc Sergiu Moga (4):

[PATCH v2 1/5] clk: at91: Add support for sam9x60 USB clock

2023-03-08 Thread Claudiu Beznea
: Claudiu Beznea Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Kconfig | 7 ++ drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-sam9x60-usb.c | 157 + drivers/clk/at91/pmc.h | 11 ++ 4 files changed, 176 insertions

[PATCH v2 2/5] clk: at91: sam9x60: Register the required clocks for USB

2023-03-08 Thread Claudiu Beznea
From: Sergiu Moga Register into DM the clocks required to properly enable USB functionality within the bootloader. Signed-off-by: Sergiu Moga Reviewed-by: Claudiu Beznea Signed-off-by: Claudiu Beznea --- drivers/clk/at91/sam9x60.c | 33 + 1 file changed, 33

[PATCH v2 4/5] clk: at91: sam9x60: Add initial setup of UPLL and USBCK rates

2023-03-08 Thread Claudiu Beznea
From: Sergiu Moga In order for some of the functionalities, such as the USB clocks, to work properly we need some clocks to be properly initialised at the very beginning of booting. Signed-off-by: Sergiu Moga Reviewed-by: Claudiu Beznea Signed-off-by: Claudiu Beznea --- drivers/clk/at91

[PATCH v2 3/5] clk: at91: pmc: export clock setup to pmc

2023-03-08 Thread Claudiu Beznea
Clock setup was intended for setting clocks at boot time on SAMA7G5, e.g. for root clocks like PLLs, that were used to feed IPs needed alive in u-boot (e.g. Ethernet clock feed by a PLL). Export this functionality to all at91 clocks as it may be necessary on other SoCs. Signed-off-by: Claudiu

[PATCH v2 5/5] configs: at91: sam9x60: Add required configs for the USB clock

2023-03-08 Thread Claudiu Beznea
From: Sergiu Moga Add the configs required to use the SAM9X60's USB clock. Signed-off-by: Sergiu Moga Reviewed-by: Claudiu Beznea [claudiu.beznea: added CONFIG_AT91_SAM9X60_USB to sam9x60_curiosity_mmc1_defconfig] Signed-off-by: Claudiu Beznea --- configs/sam9x60_curiosity_mmc1_defc

[PATCH v3 1/5] net: macb: add user io config data structure

2021-01-19 Thread Claudiu Beznea
filled. Signed-off-by: Claudiu Beznea --- drivers/net/macb.c | 53 + 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 2225b33ff651..097d57871093 100644 --- a/drivers/net/macb.c +++ b

[PATCH v3 0/5] add support for sama7g5 ethernet interfaces

2021-01-19 Thread Claudiu Beznea
Hi, This series add support for SAMA7G5 ethernet interfaces: one gigabit interface and one 10/100Mbps interface. Thank you, Claudiu Beznea Changes in v3: - get rid of patch 1/6 from v2 as it was already integrated from patch series at [1] - rebase on top of current master branch Changes in

[PATCH v3 2/5] net: macb: check clk_set_rate return value to be negative

2021-01-19 Thread Claudiu Beznea
clk_set_rate() returns the set rate in case of success and a negative number in case of failure. Consider failure only the negative numbers. Fixes: 3ef6de157 ("dm: net: macb: Implement link speed change callback") Signed-off-by: Claudiu Beznea --- drivers/net/macb.c | 2 +- 1 fi

[PATCH v3 3/5] net: macb: add support for sama7g5 gmac

2021-01-19 Thread Claudiu Beznea
Add support for SAMA7G5 GMAC. Signed-off-by: Claudiu Beznea --- drivers/net/macb.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 80ed58d4b908..e87ffd9be3ed 100644 --- a/drivers/net/macb.c +++ b/drivers/net

[PATCH v3 4/5] net: macb: add support for sama7g5 emac

2021-01-19 Thread Claudiu Beznea
Add support for SAMA7G5 EMAC. Signed-off-by: Claudiu Beznea --- drivers/net/macb.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index e87ffd9be3ed..f71331827ca0 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -1482,12 +1482,21

[PATCH v3 5/5] net: macb: take into account all RGMII interface types

2021-01-19 Thread Claudiu Beznea
Take into account all RGMII interface types. Depending on it the RGMII PHY's timings are setup. Signed-off-by: Claudiu Beznea --- drivers/net/macb.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index f71331827ca0..6e26467

[PATCH v3 01/21] clk: check hw and hw->dev before dereference it

2020-09-07 Thread Claudiu Beznea
Check hw and hw->dev before dereference it. Signed-off-by: Claudiu Beznea Reviewed-by: Simon Glass --- drivers/clk/clk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 786f4e887e7a..319808d433f5 100644 --- a/drivers/clk/clk.c +++ b/driv

[PATCH v3 02/21] dm: core: add support for device re-parenting

2020-09-07 Thread Claudiu Beznea
that reparent a device. This will be used in clk-uclass.c to reparent a clock device. Signed-off-by: Claudiu Beznea Reviewed-by: Simon Glass --- drivers/core/device.c| 22 ++ include/dm/device-internal.h | 9 +++ test/dm/core.c

[PATCH v3 03/21] clk: bind clk to new parent device

2020-09-07 Thread Claudiu Beznea
Signed-off-by: Claudiu Beznea Reviewed-by: Simon Glass --- drivers/clk/clk-uclass.c | 11 ++- test/dm/clk_ccf.c| 27 +++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 934cd5787a5c.

[PATCH v3 05/21] clk: get clock pointer before proceeding

2020-09-07 Thread Claudiu Beznea
: 1d7993d1d0ef ("clk: Port Linux common clock framework [CCF] for imx6q to U-boot (tag: v5.1.12)") Signed-off-by: Claudiu Beznea Reviewed-by: Simon Glass --- drivers/clk/clk-uclass.c | 37 + 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/drive

[PATCH v3 00/21] clk: at91: add sama7g5 support

2020-09-07 Thread Claudiu Beznea
ag is needed in there). Also patch 3/21 has been added to support clock re-reparenting (this is minimal support and hope it doesn't break anything if used). Thank you, Claudiu Beznea Changes in v3: - collected remaining Reviewed-by tags - rebase on top of latest master branch: e5df264e7aac (&q

[PATCH v3 04/21] clk: do not disable clock if it is critical

2020-09-07 Thread Claudiu Beznea
Do not disable clock if it is a critical one. Signed-off-by: Claudiu Beznea Reviewed-by: Simon Glass --- drivers/clk/clk-uclass.c | 3 +++ test/dm/clk_ccf.c| 32 +++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk-uclass.c b

[PATCH v3 09/21] clk: at91: sckc: add driver compatible with ccf

2020-09-07 Thread Claudiu Beznea
Add sckc driver compatible with common clock framework. Driver implements slow clock support for SAM9X60 compatible IPs (in this list it is also present SAMA7G5's slow clock IP). Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/sckc.c

[PATCH v3 07/21] clk: at91: pmc: add helpers for clock drivers

2020-09-07 Thread Claudiu Beznea
Add helper for clock drivers. These will be used by following commits in the process of switching AT91 clock drivers to CCF. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/pmc.c | 91 ++ drivers/clk/at91/pmc.h | 13 2 files changed

[PATCH v3 06/21] clk: at91: add pre-requisite headers for AT91 clock architecture

2020-09-07 Thread Claudiu Beznea
Add pre-requisite headers for AT91 clock architecture. These are based on already present files on Linux and will be used by following commits for AT91 CCF clock drivers. Signed-off-by: Claudiu Beznea --- include/dt-bindings/clk/at91.h | 22 include/linux/clk/at91_pmc.h | 247

[PATCH v3 12/21] clk: at91: clk-master: add driver compatible with ccf

2020-09-07 Thread Claudiu Beznea
Add clk-master driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-master.c | 156 ++ drivers/clk/at91/pmc.h| 21 ++ 3 files changed, 178 insertions

[PATCH v3 10/21] clk: at91: clk-main: add driver compatible with ccf

2020-09-07 Thread Claudiu Beznea
Add clk-main driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-main.c | 387 drivers/clk/at91/pmc.h | 10 ++ 3 files changed, 398 insertions(+), 1

[PATCH v3 08/21] clk: at91: move clock code to compat.c

2020-09-07 Thread Claudiu Beznea
Move clock code to compat.c to allow switching to CCF without mixing CCF code with non CCF code. This prepares the field for next commits. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 13 +- drivers/clk/at91/clk-generated.c | 178 --- drivers/clk/at91/clk

[PATCH v3 15/21] clk: at91: clk-utmi: add support for sama7g5

2020-09-07 Thread Claudiu Beznea
Add UTMI support for SAMA7G5. SAMA7G5's UTMI control is done via XTALF register. Values written at bits 2..0 in this register correspond to the on board crystal oscillator frequency. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/clk-utmi.c

[PATCH v3 11/21] clk: at91: sam9x60-pll: add driver compatible with ccf

2020-09-07 Thread Claudiu Beznea
Add sam9x60-pll driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Kconfig | 7 + drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-sam9x60-pll.c | 442 + drivers/clk/at91/pmc.h

[PATCH v3 14/21] clk: at91: clk-utmi: add driver compatible with ccf

2020-09-07 Thread Claudiu Beznea
Add clk-utmi driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-utmi.c | 165 drivers/clk/at91/pmc.h | 3 + 3 files changed, 169 insertions(+) create mode

[PATCH v3 13/21] clk: at91: clk-master: add support for sama7g5

2020-09-07 Thread Claudiu Beznea
Add master clock (MCK1..MCK4) support for SAMA7G5. SAMA7G5's PMC has multiple master clocks feeding different subsystems. One of them feeds image subsystem and is changeable based on image subsystem needs. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/clk-master.c

[PATCH v3 21/21] clk: at91: sama7g5: add clock support

2020-09-07 Thread Claudiu Beznea
Add clock support for SAMA7G5. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile |1 + drivers/clk/at91/sama7g5.c | 1401 2 files changed, 1402 insertions(+) create mode 100644 drivers/clk/at91/sama7g5.c diff --git a/drivers/clk/at91

[PATCH v3 16/21] clk: at91: clk-programmable: add driver compatible with ccf

2020-09-07 Thread Claudiu Beznea
Add clk-programmable driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-programmable.c | 208 drivers/clk/at91/pmc.h | 17 +++ 3 files changed, 226

[PATCH v3 17/21] clk: at91: clk-system: add driver compatible with ccf

2020-09-07 Thread Claudiu Beznea
Add clk-system driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-system.c | 112 ++ drivers/clk/at91/pmc.h| 3 ++ 3 files changed, 116 insertions(+), 1

[PATCH v3 18/21] clk: at91: clk-peripheral: add driver compatible with ccf

2020-09-07 Thread Claudiu Beznea
Add clk-peripheral compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 + drivers/clk/at91/clk-peripheral.c | 254 ++ drivers/clk/at91/pmc.h| 16 +++ 3 files changed, 272 insertions

[PATCH v3 20/21] clk: at91: pmc: add generic clock ops

2020-09-07 Thread Claudiu Beznea
Add generic clock ops to be used by every AT91 PMC driver built on top of CCF. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/pmc.c | 71 ++ drivers/clk/at91/pmc.h | 2 ++ 2 files changed, 73 insertions(+) diff --git a/drivers/clk/at91/pmc.c

[PATCH v3 19/21] clk: at91: clk-generic: add driver compatible with ccf

2020-09-07 Thread Claudiu Beznea
Add clk-generic driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-generic.c | 202 + drivers/clk/at91/pmc.h | 6 ++ 3 files changed, 209 insertions

[PATCH 2/2] pinctrl: at91-pio4: add support for slew-rate

2021-01-27 Thread Claudiu Beznea
SAMA7G5 supports slew rate configuration. Adapt the driver for this. For switching frequencies lower than 50MHz the slew rate needs to be enabled. Since most of the pins on SAMA7G5 fall into this category enabled the slew rate by default. Signed-off-by: Claudiu Beznea --- arch/arm/mach-at91

[PATCH 0/2] pinctrl: at91-pio4: add support for slew-rate

2021-01-27 Thread Claudiu Beznea
Hi, This series adds support for slew rate on AT91 PIO4 driver. The support is enabled on SAMA7G5. Thank you, Claudiu Beznea Claudiu Beznea (2): dt-bindings: pinctrl: at91-pio4: add slew-rate pinctrl: at91-pio4: add support for slew-rate arch/arm/mach-at91/include/mach/atmel_pio4.h

[PATCH 1/2] dt-bindings: pinctrl: at91-pio4: add slew-rate

2021-01-27 Thread Claudiu Beznea
Document slew-rate DT binding for SAMA7G5. Signed-off-by: Claudiu Beznea --- doc/device-tree-bindings/pinctrl/atmel,at91-pio4-pinctrl.txt | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/device-tree-bindings/pinctrl/atmel,at91-pio4-pinctrl.txt b/doc/device-tree

[PATCH 4/4] configs: sam9x60ek: enable CONFIG_CPU

2021-07-16 Thread Claudiu Beznea
Enable CONFIG_CPU for SAM9X60EK configs. Reported-by: Eugen Hristev Fixes: a64862284f65 ("clk: at91: sam9x60: add support compatible with CCF") Signed-off-by: Claudiu Beznea --- configs/sam9x60ek_mmc_defconfig | 1 + configs/sam9x60ek_nandflash_defconfig | 1

[PATCH 0/4] clk: at91: fix system clocks display for sam9x60

2021-07-16 Thread Claudiu Beznea
via device tree (or any other mechanism). Thank you, Claudiu Beznea Claudiu Beznea (4): clk: at91: clk-master: split master clock in pres and divider cpu: at91: add compatible for ARM9260EJ-S ARM: dts: at91: sam9x60: add bindings for CPU configs: sam9x60ek: enable CONFIG_CPU arch/arm/dts

[PATCH 3/4] ARM: dts: at91: sam9x60: add bindings for CPU

2021-07-16 Thread Claudiu Beznea
Add bindings for CPU. This will allow displaying correctly the crystal, CPU and master clock. Reported-by: Eugen Hristev Fixes: a64862284f65 ("clk: at91: sam9x60: add support compatible with CCF") Signed-off-by: Claudiu Beznea --- arch/arm/dts/sam9x60.dtsi | 12 1 file c

[PATCH 2/4] cpu: at91: add compatible for ARM9260EJ-S

2021-07-16 Thread Claudiu Beznea
The crystal, CPU and master clock were not displayed correctly on SAM9X60 after adding CCF clock support. Add compatible for ARM926EJ-S to fix this. Reported-by: Eugen Hristev Fixes: a64862284f65 ("clk: at91: sam9x60: add support compatible with CCF") Signed-off-by: Claudiu Beznea --

[PATCH 1/4] clk: at91: clk-master: split master clock in pres and divider

2021-07-16 Thread Claudiu Beznea
Split master clock in 2 controlling block: one for prescaler one for divider. This will allow referencing correctly the CPU clock and master clock in device trees. Reported-by: Eugen Hristev Fixes: a64862284f65 ("clk: at91: sam9x60: add support compatible with CCF") Signed-off-by: Clau

[PATCH 01/22] clk: check hw and hw->dev before dereference it

2020-07-29 Thread Claudiu Beznea
Check hw and hw->dev before dereference it. Signed-off-by: Claudiu Beznea --- drivers/clk/clk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 0f55ba751c0f..9fa18e342eaf 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -57,6 +5

[PATCH 02/22] clk: check pointer returned by dev_get_parent()

2020-07-29 Thread Claudiu Beznea
Check pointer returned by dev_get_parent(). Signed-off-by: Claudiu Beznea --- drivers/clk/clk-uclass.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 70df9d410f4c..aa1f11a27c41 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers

[PATCH 05/22] clk: do not disable clock if it is critical

2020-07-29 Thread Claudiu Beznea
Do not disable clock if it is a critical one. Signed-off-by: Claudiu Beznea --- drivers/clk/clk-uclass.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index b390a6b01c06..958a9490bee2 100644 --- a/drivers/clk/clk-uclass.c +++ b

[PATCH 03/22] dm: core: add support for device re-parenting

2020-07-29 Thread Claudiu Beznea
that reparent a device. This will be used in clk-uclass.c to reparent a clock device. Signed-off-by: Claudiu Beznea --- drivers/core/device.c| 26 ++ include/dm/device-internal.h | 9 + 2 files changed, 35 insertions(+) diff --git a/drivers/core/device.c b/dr

[PATCH 00/22] clk: at91: add sama7g5 support

2020-07-29 Thread Claudiu Beznea
ag is needed in there). Also patch 3/22 has been added to support clock re-reparenting (this is minimal support and hope it doesn't break anything if used). Thank you, Claudiu Beznea Claudiu Beznea (22): clk: check hw and hw->dev before dereference it clk: check pointer returned by d

[PATCH 04/22] clk: bind clk to new parent device

2020-07-29 Thread Claudiu Beznea
Signed-off-by: Claudiu Beznea --- drivers/clk/clk-uclass.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index aa1f11a27c41..b390a6b01c06 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @

[PATCH 07/22] clk: at91: add pre-requisite headers for AT91 clock architecture

2020-07-29 Thread Claudiu Beznea
Add pre-requisite headers for AT91 clock architecture. These are based on already present files on Linux and will be used by following commits for AT91 CCF clock drivers. Signed-off-by: Claudiu Beznea --- include/dt-bindings/clk/at91.h | 22 include/linux/clk/at91_pmc.h | 247

[PATCH 13/22] clk: at91: clk-master: add driver compatible with ccf

2020-07-29 Thread Claudiu Beznea
Add clk-master driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-master.c | 156 ++ drivers/clk/at91/pmc.h| 21 ++ 3 files changed, 178 insertions

[PATCH 11/22] clk: at91: clk-main: add driver compatible with ccf

2020-07-29 Thread Claudiu Beznea
Add clk-main driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-main.c | 387 drivers/clk/at91/pmc.h | 10 ++ 3 files changed, 398 insertions(+), 1

[PATCH 10/22] clk: at91: sckc: add driver compatible with ccf

2020-07-29 Thread Claudiu Beznea
Add sckc driver compatible with common clock framework. Driver implements slow clock support for SAM9X60 compatible IPs (in this list it is also present SAMA7G5's slow clock IP). Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/sckc.c

[PATCH 08/22] clk: at91: pmc: add helpers for clock drivers

2020-07-29 Thread Claudiu Beznea
Add helper for clock drivers. These will be used by following commits in the process of switching AT91 clock drivers to CCF. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/pmc.c | 91 ++ drivers/clk/at91/pmc.h | 13 2 files changed

[PATCH 06/22] clk: get clock pointer before proceeding

2020-07-29 Thread Claudiu Beznea
: 1d7993d1d0ef ("clk: Port Linux common clock framework [CCF] for imx6q to U-boot (tag: v5.1.12)") Signed-off-by: Claudiu Beznea --- drivers/clk/clk-uclass.c | 41 + 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-uclass.c

[PATCH 17/22] clk: at91: clk-programmable: add driver compatible with ccf

2020-07-29 Thread Claudiu Beznea
Add clk-programmable driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-programmable.c | 208 drivers/clk/at91/pmc.h | 17 +++ 3 files changed, 226

[PATCH 16/22] clk: at91: clk-utmi: add support for sama7g5

2020-07-29 Thread Claudiu Beznea
Add UTMI support for SAMA7G5. SAMA7G5's UTMI control is done via XTALF register. Values written at bits 2..0 in this register correspond to the on board crystal oscillator frequency. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/clk-utmi.c

[PATCH 18/22] clk: at91: clk-system: add driver compatible with ccf

2020-07-29 Thread Claudiu Beznea
Add clk-system driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-system.c | 112 ++ drivers/clk/at91/pmc.h| 3 ++ 3 files changed, 116 insertions(+), 1

[PATCH 14/22] clk: at91: clk-master: add support for sama7g5

2020-07-29 Thread Claudiu Beznea
Add master clock (MCK1..MCK4) support for SAMA7G5. SAMA7G5's PMC has multiple master clocks feeding different subsystems. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/clk-master.c | 178 +- drivers/clk/at91/pmc.h| 5 ++ 2 files ch

[PATCH 19/22] clk: at91: clk-peripheral: add driver compatible with ccf

2020-07-29 Thread Claudiu Beznea
Add clk-peripheral compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 + drivers/clk/at91/clk-peripheral.c | 254 ++ drivers/clk/at91/pmc.h| 16 +++ 3 files changed, 272 insertions

[PATCH 20/22] clk: at91: clk-generic: add driver compatible with ccf

2020-07-29 Thread Claudiu Beznea
Add clk-generic driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-generic.c | 202 + drivers/clk/at91/pmc.h | 6 ++ 3 files changed, 209 insertions

[PATCH 21/22] clk: at91: pmc: add generic clock ops

2020-07-29 Thread Claudiu Beznea
Add generic clock ops to be used by every AT91 PMC driver built on top of CCF. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/pmc.c | 71 ++ drivers/clk/at91/pmc.h | 2 ++ 2 files changed, 73 insertions(+) diff --git a/drivers/clk/at91/pmc.c

[PATCH 22/22] clk: at91: sama7g5: add clock support

2020-07-29 Thread Claudiu Beznea
Add clock support for SAMA7G5. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile |1 + drivers/clk/at91/sama7g5.c | 1401 2 files changed, 1402 insertions(+) create mode 100644 drivers/clk/at91/sama7g5.c diff --git a/drivers/clk/at91

[PATCH 12/22] clk: at91: sam9x60-pll: add driver compatible with ccf

2020-07-29 Thread Claudiu Beznea
Add sam9x60-pll driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Kconfig | 7 + drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-sam9x60-pll.c | 442 + drivers/clk/at91/pmc.h

[PATCH 09/22] clk: at91: move clock code to compat.c

2020-07-29 Thread Claudiu Beznea
Move clock code to compat.c to allow switching to CCF without mixing CCF code with non CCF code. This prepares the field for next commits. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 13 +- drivers/clk/at91/clk-generated.c | 178 --- drivers/clk/at91/clk

[PATCH 15/22] clk: at91: clk-utmi: add driver compatible with ccf

2020-07-29 Thread Claudiu Beznea
Add clk-utmi driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-utmi.c | 165 drivers/clk/at91/pmc.h | 3 + 3 files changed, 169 insertions(+) create mode

[PATCH v2 00/21] clk: at91: add sama7g5 support

2020-08-05 Thread Claudiu Beznea
ag is needed in there). Also patch 3/21 has been added to support clock re-reparenting (this is minimal support and hope it doesn't break anything if used). Thank you, Claudiu Beznea Changes in v2: - use assert() in patch 1/21 - drop patch 2/22 from previous series - add sandbox tests

[PATCH v2 01/21] clk: check hw and hw->dev before dereference it

2020-08-05 Thread Claudiu Beznea
Check hw and hw->dev before dereference it. Signed-off-by: Claudiu Beznea --- drivers/clk/clk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 0f55ba751c0f..56ae1e7e265f 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -57,6 +5

[PATCH v2 05/21] clk: get clock pointer before proceeding

2020-08-05 Thread Claudiu Beznea
: 1d7993d1d0ef ("clk: Port Linux common clock framework [CCF] for imx6q to U-boot (tag: v5.1.12)") Signed-off-by: Claudiu Beznea --- drivers/clk/clk-uclass.c | 37 + 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-uclass.c b/drive

[PATCH v2 03/21] clk: bind clk to new parent device

2020-08-05 Thread Claudiu Beznea
Signed-off-by: Claudiu Beznea Reviewed-by: Simon Glass --- drivers/clk/clk-uclass.c | 11 ++- test/dm/clk_ccf.c| 27 +++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 934cd5787a5c.

[PATCH v2 04/21] clk: do not disable clock if it is critical

2020-08-05 Thread Claudiu Beznea
Do not disable clock if it is a critical one. Signed-off-by: Claudiu Beznea Reviewed-by: Simon Glass --- drivers/clk/clk-uclass.c | 3 +++ test/dm/clk_ccf.c| 32 +++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk-uclass.c b

[PATCH v2 02/21] dm: core: add support for device re-parenting

2020-08-05 Thread Claudiu Beznea
that reparent a device. This will be used in clk-uclass.c to reparent a clock device. Signed-off-by: Claudiu Beznea --- drivers/core/device.c| 22 ++ include/dm/device-internal.h | 9 +++ test/dm/core.c | 160 +++ 3 files changed

[PATCH v2 06/21] clk: at91: add pre-requisite headers for AT91 clock architecture

2020-08-05 Thread Claudiu Beznea
Add pre-requisite headers for AT91 clock architecture. These are based on already present files on Linux and will be used by following commits for AT91 CCF clock drivers. Signed-off-by: Claudiu Beznea --- include/dt-bindings/clk/at91.h | 22 include/linux/clk/at91_pmc.h | 247

[PATCH v2 09/21] clk: at91: sckc: add driver compatible with ccf

2020-08-05 Thread Claudiu Beznea
Add sckc driver compatible with common clock framework. Driver implements slow clock support for SAM9X60 compatible IPs (in this list it is also present SAMA7G5's slow clock IP). Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/sckc.c

[PATCH v2 10/21] clk: at91: clk-main: add driver compatible with ccf

2020-08-05 Thread Claudiu Beznea
Add clk-main driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-main.c | 387 drivers/clk/at91/pmc.h | 10 ++ 3 files changed, 398 insertions(+), 1

[PATCH v2 07/21] clk: at91: pmc: add helpers for clock drivers

2020-08-05 Thread Claudiu Beznea
Add helper for clock drivers. These will be used by following commits in the process of switching AT91 clock drivers to CCF. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/pmc.c | 91 ++ drivers/clk/at91/pmc.h | 13 2 files changed

[PATCH v2 08/21] clk: at91: move clock code to compat.c

2020-08-05 Thread Claudiu Beznea
Move clock code to compat.c to allow switching to CCF without mixing CCF code with non CCF code. This prepares the field for next commits. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 13 +- drivers/clk/at91/clk-generated.c | 178 --- drivers/clk/at91/clk

[PATCH v2 13/21] clk: at91: clk-master: add support for sama7g5

2020-08-05 Thread Claudiu Beznea
Add master clock (MCK1..MCK4) support for SAMA7G5. SAMA7G5's PMC has multiple master clocks feeding different subsystems. One of them feeds image subsystem and is changeable based on image subsystem needs. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/clk-master.c

[PATCH v2 11/21] clk: at91: sam9x60-pll: add driver compatible with ccf

2020-08-05 Thread Claudiu Beznea
Add sam9x60-pll driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Kconfig | 7 + drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-sam9x60-pll.c | 442 + drivers/clk/at91/pmc.h

[PATCH v2 18/21] clk: at91: clk-peripheral: add driver compatible with ccf

2020-08-05 Thread Claudiu Beznea
Add clk-peripheral compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 + drivers/clk/at91/clk-peripheral.c | 254 ++ drivers/clk/at91/pmc.h| 16 +++ 3 files changed, 272 insertions

[PATCH v2 12/21] clk: at91: clk-master: add driver compatible with ccf

2020-08-05 Thread Claudiu Beznea
Add clk-master driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-master.c | 156 ++ drivers/clk/at91/pmc.h| 21 ++ 3 files changed, 178 insertions

[PATCH v2 17/21] clk: at91: clk-system: add driver compatible with ccf

2020-08-05 Thread Claudiu Beznea
Add clk-system driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-system.c | 112 ++ drivers/clk/at91/pmc.h| 3 ++ 3 files changed, 116 insertions(+), 1

[PATCH v2 14/21] clk: at91: clk-utmi: add driver compatible with ccf

2020-08-05 Thread Claudiu Beznea
Add clk-utmi driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-utmi.c | 165 drivers/clk/at91/pmc.h | 3 + 3 files changed, 169 insertions(+) create mode

[PATCH v2 16/21] clk: at91: clk-programmable: add driver compatible with ccf

2020-08-05 Thread Claudiu Beznea
Add clk-programmable driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-programmable.c | 208 drivers/clk/at91/pmc.h | 17 +++ 3 files changed, 226

[PATCH v2 15/21] clk: at91: clk-utmi: add support for sama7g5

2020-08-05 Thread Claudiu Beznea
Add UTMI support for SAMA7G5. SAMA7G5's UTMI control is done via XTALF register. Values written at bits 2..0 in this register correspond to the on board crystal oscillator frequency. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/clk-utmi.c

[PATCH v2 21/21] clk: at91: sama7g5: add clock support

2020-08-05 Thread Claudiu Beznea
Add clock support for SAMA7G5. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile |1 + drivers/clk/at91/sama7g5.c | 1401 2 files changed, 1402 insertions(+) create mode 100644 drivers/clk/at91/sama7g5.c diff --git a/drivers/clk/at91

[PATCH v2 19/21] clk: at91: clk-generic: add driver compatible with ccf

2020-08-05 Thread Claudiu Beznea
Add clk-generic driver compatible with common clock framework. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-generic.c | 202 + drivers/clk/at91/pmc.h | 6 ++ 3 files changed, 209 insertions

[PATCH v2 20/21] clk: at91: pmc: add generic clock ops

2020-08-05 Thread Claudiu Beznea
Add generic clock ops to be used by every AT91 PMC driver built on top of CCF. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/pmc.c | 71 ++ drivers/clk/at91/pmc.h | 2 ++ 2 files changed, 73 insertions(+) diff --git a/drivers/clk/at91/pmc.c

[PATCH] MAINTAINERS: add Microchip PIT64B timer

2020-09-23 Thread Claudiu Beznea
Add Microchip PIT64B timer. Signed-off-by: Claudiu Beznea --- Hi Eugen, I chosed to have it under AT91 hood to not create an entry only for this driver as there are mostly architecture/subsystem related entries in MAINTAINERS file. Thank you, Claudiu Beznea MAINTAINERS | 1 + 1 file changed

[PATCH] cpu: at91: add driver for CPU

2020-09-25 Thread Claudiu Beznea
Add basic CPU driver use to retrieve information about CPU itself. Signed-off-by: Claudiu Beznea --- MAINTAINERS| 1 + drivers/cpu/Makefile | 1 + drivers/cpu/at91_cpu.c | 123 + 3 files changed, 125 insertions(+) create mode

[PATCH v2] cpu: at91: add driver for CPU

2020-10-01 Thread Claudiu Beznea
Add basic CPU driver use to retrieve information about CPU itself. Signed-off-by: Claudiu Beznea --- Changes in v2: - get rid of compilation warnings - rebase on top of "MAINTAINERS: add Microchip PIT64B timer" patch MAINTAINERS| 1 + drivers/cpu/Makefile | 1 + d

[PATCH 0/7] add SAM9X60 clock support

2020-10-05 Thread Claudiu Beznea
Hi, This series adds SAM9X60 clock support, CCF compatible, so that SAM9X60 based boards (e.g. SAM9X60-EK in this case) to be able to boot with mainline code. This series is based on u-boot-atmel/next. Thank you, Claudiu Beznea Claudiu Beznea (7): board: atmel: sam9x60ek: add

[PATCH 2/7] clk: at91: sam9x60: add support compatible with CCF

2020-10-05 Thread Claudiu Beznea
Add SAM9X60 clock support compatible with CCF. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/Makefile | 1 + drivers/clk/at91/sam9x60.c | 594 + 2 files changed, 595 insertions(+) create mode 100644 drivers/clk/at91/sam9x60.c diff --git a

[PATCH 4/7] ARM: dts: sam9x60: use u-boot,dm-pre-reloc

2020-10-05 Thread Claudiu Beznea
Use u-boot,dm-pre-reloc for slow xtal and main xtal. Signed-off-by: Claudiu Beznea --- arch/arm/dts/sam9x60.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/dts/sam9x60.dtsi b/arch/arm/dts/sam9x60.dtsi index 51de586e1900..a4e2576d8e0f 100644 --- a/arch/arm/dts/sam9x60.dtsi

[PATCH 3/7] ARM: dts: sam9x60ek: add clock frequencies to board file

2020-10-05 Thread Claudiu Beznea
Slow Xtal and Main Xtal are board specific. Add their proper frequency to board file. Signed-off-by: Claudiu Beznea --- arch/arm/dts/sam9x60.dtsi | 2 -- arch/arm/dts/sam9x60ek.dts | 10 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/sam9x60.dtsi b

[PATCH 1/7] board: atmel: sam9x60ek: add SYS_MALLOC_F_LEN to SYS_INIT_SP_ADDR

2020-10-05 Thread Claudiu Beznea
Heap base address is computed based on SYS_INIT_SP_ADDR by subtracting the SYS_MALLOC_F_LEN value in board_init_f_init_reserve(). Signed-off-by: Claudiu Beznea --- include/configs/sam9x60ek.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/configs/sam9x60ek.h b

[PATCH 6/7] ARM: dts: sam9x60: use CCF compatibles for PMC

2020-10-05 Thread Claudiu Beznea
Use CCF compatible for PMC. With this, the board/SoC will be able to boot. Signed-off-by: Claudiu Beznea --- arch/arm/dts/sam9x60.dtsi | 135 - arch/arm/dts/sam9x60ek-u-boot.dtsi | 52 -- arch/arm/dts/sam9x60ek.dts | 2 +- 3

[PATCH 5/7] ARM: dts: sam9x60: use slow clock CCF compatible bindings

2020-10-05 Thread Claudiu Beznea
Use slow clock CCF compatible DT bindings. This will not break the above functionality as the SoC is not booting with current PMC bindings. Signed-off-by: Claudiu Beznea --- arch/arm/dts/sam9x60.dtsi | 42 +- arch/arm/dts/sam9x60ek-u-boot.dtsi | 17

[PATCH 7/7] configs: sam9x60ek: update defconfigs for CCF

2020-10-05 Thread Claudiu Beznea
Update defconfigs for using common clock framework compatible clocks. Signed-off-by: Claudiu Beznea --- configs/sam9x60ek_mmc_defconfig | 4 +++- configs/sam9x60ek_nandflash_defconfig | 4 +++- configs/sam9x60ek_qspiflash_defconfig | 4 +++- 3 files changed, 9 insertions(+), 3 deletions

[PATCH v2 1/8] board: atmel: sam9x60ek: add SYS_MALLOC_F_LEN to SYS_INIT_SP_ADDR

2020-10-07 Thread Claudiu Beznea
Heap base address is computed based on SYS_INIT_SP_ADDR by subtracting the SYS_MALLOC_F_LEN value in board_init_f_init_reserve(). Signed-off-by: Claudiu Beznea --- include/configs/sam9x60ek.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/configs/sam9x60ek.h b

[PATCH v2 0/8] add SAM9X60 clock support

2020-10-07 Thread Claudiu Beznea
Hi, This series adds SAM9X60 clock support, CCF compatible, so that SAM9X60 based boards (e.g. SAM9X60-EK in this case) to be able to boot with mainline code. This series is based on u-boot-atmel/next. Thank you, Claudiu Beznea Changes in v2: - remove "Alignment should match open parent

  1   2   >