]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: dts: sam9x60: use CCF compatibles for PMC
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Wed, 7 Oct 2020 15:17:12 +0000 (18:17 +0300)
committerEugen Hristev <eugen.hristev@microchip.com>
Mon, 19 Oct 2020 06:19:53 +0000 (09:19 +0300)
Use CCF compatible for PMC. With this, the board/SoC will be
able to boot.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
arch/arm/dts/sam9x60.dtsi
arch/arm/dts/sam9x60ek-u-boot.dtsi
arch/arm/dts/sam9x60ek.dts

index 6eac2a8e3097ce1600754dd2e3855cee939b7105..7f3eae3f5d26b2104dfbafc35fb1dbbf35c27f15 100644 (file)
@@ -12,7 +12,7 @@
 #include <dt-bindings/pinctrl/at91.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/clock/at91.h>
+#include <dt-bindings/clk/at91.h>
 
 /{
        model = "Microchip SAM9X60 SoC";
                        clock-frequency = <18500>;
                };
 
+               main_rc: main_rc {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <12000000>;
+               };
+
                slow_xtal: slow_xtal {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
                sdhci0: sdhci-host@80000000 {
                        compatible = "microchip,sam9x60-sdhci";
                        reg = <0x80000000 0x300>;
-                       clocks = <&sdhci0_clk>, <&sdhci0_gclk>, <&main>;
-                       clock-names = "hclock", "multclk", "baseclk";
+                       clocks = <&pmc PMC_TYPE_PERIPHERAL 12>, <&pmc PMC_TYPE_GCK 12>;
+                       clock-names = "hclock", "multclk";
+                       assigned-clocks = <&pmc PMC_TYPE_GCK 12>;
+                       assigned-clock-rates = <100000000>;
+                       assigned-clock-parents = <&pmc PMC_TYPE_CORE 10>; /* ID_PLL_A_DIV */
                        bus-width = <4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_sdhci0>;
@@ -70,7 +79,7 @@
                                compatible = "microchip,sam9x60-qspi";
                                reg = <0xf0014000 0x100>, <0x70000000 0x10000000>;
                                reg-names = "qspi_base", "qspi_mmap";
-                               clocks =  <&qspi_clk>, <&qspick>;
+                               clocks =  <&pmc PMC_TYPE_PERIPHERAL 35>, <&pmc PMC_TYPE_SYSTEM 18>; /* ID_QSPI */
                                clock-names = "pclk", "qspick";
                                #address-cells = <1>;
                                #size-cells = <0>;
@@ -80,7 +89,7 @@
                        flx0: flexcom@f801c600 {
                                compatible = "atmel,sama5d2-flexcom";
                                reg = <0xf801c000 0x200>;
-                               clocks = <&flx0_clk>;
+                               clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
                                #address-cells = <1>;
                                #size-cells = <1>;
                                ranges = <0x0 0xf801c000 0x800>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_macb0_rmii>;
                                clock-names = "hclk", "pclk";
-                               clocks = <&macb0_clk>, <&macb0_clk>;
+                               clocks = <&pmc PMC_TYPE_PERIPHERAL 24>, <&pmc PMC_TYPE_PERIPHERAL 24>;
                                status = "disabled";
                        };
 
                                reg = <0xfffff200 0x200>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_dbgu>;
-                               clocks = <&dbgu_clk>;
+                               clocks = <&pmc PMC_TYPE_PERIPHERAL 47>;
                                clock-names = "usart";
                        };
 
                                reg = <0xfffff400 0x200>;
                                #gpio-cells = <2>;
                                gpio-controller;
-                               clocks = <&pioA_clk>;
+                               clocks = <&pmc PMC_TYPE_PERIPHERAL 2>;
                        };
 
                        pioB: gpio@fffff600 {
                                reg = <0xfffff600 0x200>;
                                #gpio-cells = <2>;
                                gpio-controller;
-                               clocks = <&pioB_clk>;
+                               clocks = <&pmc PMC_TYPE_PERIPHERAL 3>;
                        };
 
                        pioD: gpio@fffffa00 {
                                reg = <0xfffffa00 0x200>;
                                #gpio-cells = <2>;
                                gpio-controller;
-                               clocks = <&pioD_clk>;
+                               clocks = <&pmc PMC_TYPE_PERIPHERAL 44>;
                        };
 
                        pmc: pmc@fffffc00 {
-                               compatible = "atmel,at91sam9x5-pmc";
+                               compatible = "microchip,sam9x60-pmc";
                                reg = <0xfffffc00 0x200>;
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               main: mainck {
-                                       compatible = "atmel,at91sam9x5-clk-main";
-                                       #clock-cells = <0>;
-                               };
-
-                               plla: pllack {
-                                       compatible = "microchip,sam9x60-clk-pll";
-                                       #clock-cells = <0>;
-                                       clocks = <&main>;
-                                       reg = <0>;
-                                       atmel,clk-input-range = <8000000 24000000>;
-                                       #atmel,pll-clk-output-range-cells = <4>;
-                                       atmel,pll-clk-output-ranges = <140000000 1200000000 0 0>;
-                               };
-
-                               mck: masterck {
-                                       compatible = "atmel,at91sam9x5-clk-master";
-                                       #clock-cells = <0>;
-                                       clocks = <&clk32 0>, <&main>, <&plla>;
-                                       atmel,clk-output-range = <140000000 200000000>;
-                                       atmel,clk-divisors = <1 2 4 6>;
-                               };
-
-                               system: systemck {
-                                       compatible = "atmel,at91rm9200-clk-system";
-                                       #address-cells = <1>;
-                                       #size-cells = <0>;
-
-                                       qspick: qspick {
-                                               #clock-cells = <0>;
-                                               reg = <19>;
-                                               clocks = <&mck>;
-                                       };
-                               };
-
-                               periph: periphck {
-                                       compatible = "microchip,sam9x60-clk-peripheral";
-                                       #address-cells = <1>;
-                                       #size-cells = <0>;
-                                       clocks = <&mck>;
-
-                                       pioA_clk: pioA_clk {
-                                               #clock-cells = <0>;
-                                               reg = <2>;
-                                       };
-
-                                       pioB_clk: pioB_clk {
-                                               #clock-cells = <0>;
-                                               reg = <3>;
-                                       };
-
-                                       flx0_clk: flx0_clk {
-                                               #clock-cells = <0>;
-                                               reg = <5>;
-                                       };
-
-                                       pioD_clk: pioD_clk {
-                                               #clock-cells = <0>;
-                                               reg = <44>;
-                                       };
-
-                                       sdhci0_clk: sdhci0_clk {
-                                               #clock-cells = <0>;
-                                               reg = <12>;
-                                       };
-
-                                       dbgu_clk: dbgu_clk {
-                                               #clock-cells = <0>;
-                                               reg = <47>;
-                                       };
-
-                                       macb0_clk: macb0_clk {
-                                               #clock-cells = <0>;
-                                               reg = <24>;
-                                       };
-
-                                       qspi_clk: qspi_clk {
-                                               #clock-cells = <0>;
-                                               reg = <35>;
-                                       };
-                               };
-
-                               generic: gck {
-                                       compatible = "microchip,sam9x60-clk-generated";
-                                       #address-cells = <1>;
-                                       #size-cells = <0>;
-                                       clocks = <&clk32 0>, <&clk32 1>, <&main>, <&mck>, <&plla>;
-
-                                       sdhci0_gclk: sdhci0_gclk {
-                                               #clock-cells = <0>;
-                                               reg = <12>;
-                                       };
-                               };
+                               #clock-cells = <2>;
+                               clocks = <&clk32 1>, <&clk32 0>, <&main_xtal>, <&main_rc>;
+                               clock-names = "td_slck", "md_slck", "main_xtal", "main_rc";
+                               status = "okay";
                        };
 
                        pit: timer@fffffe40 {
                                compatible = "atmel,at91sam9260-pit";
                                reg = <0xfffffe40 0x10>;
-                               clocks = <&mck>;
+                               clocks = <&pmc PMC_TYPE_CORE 11>; /* ID_MCK. */
                        };
 
                        clk32: sckc@fffffe50 {
index c360b8214f1fc6af4b71c2b14704b6ea294898de..fe8ca81448da0275513175337903359b99df5c5e 100644 (file)
        u-boot,dm-pre-reloc;
 };
 
-&pinctrl_dbgu {
-       u-boot,dm-pre-reloc;
-};
-
-&pinctrl_sdhci0 {
-       u-boot,dm-pre-reloc;
-};
-
-&pinctrl_qspi {
-       u-boot,dm-pre-reloc;
-};
-
-&pioA {
-       u-boot,dm-pre-reloc;
-};
-
-&pioB {
-       u-boot,dm-pre-reloc;
-};
-
-&pmc {
-       u-boot,dm-pre-reloc;
-};
-
-&main {
-       u-boot,dm-pre-reloc;
-};
-
-&plla {
+&main_rc {
        u-boot,dm-pre-reloc;
 };
 
        u-boot,dm-pre-reloc;
 };
 
-&mck {
-       u-boot,dm-pre-reloc;
-};
-
-&system {
-       u-boot,dm-pre-reloc;
-};
-
-&qspick {
-       u-boot,dm-pre-reloc;
-};
-
-&periph {
-       u-boot,dm-pre-reloc;
-};
-
-&pioA_clk {
-       u-boot,dm-pre-reloc;
-};
-
-&pioB_clk {
+&pinctrl_dbgu {
        u-boot,dm-pre-reloc;
 };
 
-&sdhci0_clk {
+&pinctrl_sdhci0 {
        u-boot,dm-pre-reloc;
 };
 
-&dbgu_clk {
+&pinctrl_qspi {
        u-boot,dm-pre-reloc;
 };
 
-&qspi_clk {
+&pioA {
        u-boot,dm-pre-reloc;
 };
 
-&generic {
+&pioB {
        u-boot,dm-pre-reloc;
 };
 
-&sdhci0_gclk {
+&pmc {
        u-boot,dm-pre-reloc;
 };
 
index 44af5d99ee4ce2f45d8886a25ee715d4362763e2..96914b3ea2ca3ae39a405acc94c39716b6f266ab 100644 (file)
@@ -67,7 +67,7 @@
                                        pinctrl-0 = <&pinctrl_flx0>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
-                                       clocks = <&flx0_clk>;
+                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
                                        status = "okay";
 
                                        eeprom@53 {