zephyr/dts/arm/atmel/same5x.dtsi
Gerson Fernando Budke ea7922195b clocks: atmel: sam0: Fix gclk and mclk clock bindings
The Atmel SAM0 SoC enable peripherals clocks in distinct places: PM and
MCLK. The old devices had defined the peripheral clock enable bit at PM.
On the newer devices this was extracted on a dedicated memory section
called Master Clock (MCLK). This change excludes the dedicated bindings
in favor of a generic approach that cover all cases.

Now the clocks properties is complemented by the atmel,assigned-clocks
property. It gives the liberty to user to customize the clock source
from a generic clock or configure the direct connections.

All peripherals drivers were reworked with the newer solution.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-01-14 20:49:03 +01:00

64 lines
1.4 KiB
Plaintext

/*
* Copyright (c) 2020 Stephanos Ioannidis <root@stephanos.io>
* Copyright (c) 2023 Sebastian Schlupp
* Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <atmel/samd5x.dtsi>
/ {
soc {
gmac: ethernet@42000800 {
compatible = "atmel,sam0-gmac";
reg = <0x42000800 0x400>;
interrupts = <84 0>;
interrupt-names = "gmac";
status = "disabled";
num-queues = <1>;
local-mac-address = [00 00 00 00 00 00];
};
mdio: mdio@42000800 {
compatible = "atmel,sam-mdio";
reg = <0x42000800 0x400>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
can0: can@42000000 {
compatible = "atmel,sam0-can";
reg = <0x42000000 0x400>;
interrupts = <78 0>, <78 0>;
interrupt-names = "int0", "int1";
clocks = <&gclk 27>, <&mclk 0x10 17>;
clock-names = "GCLK", "MCLK";
atmel,assigned-clocks = <&gclk 0>;
atmel,assigned-clock-names = "GCLK";
status = "disabled";
bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
divider = <12>;
};
can1: can@42000400 {
compatible = "atmel,sam0-can";
reg = <0x42000400 0x400>;
interrupts = <79 0>, <79 0>;
interrupt-names = "int0", "int1";
clocks = <&gclk 28>, <&mclk 0x10 18>;
clock-names = "GCLK", "MCLK";
atmel,assigned-clocks = <&gclk 0>;
atmel,assigned-clock-names = "GCLK";
status = "disabled";
bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
divider = <12>;
};
};
};