]> Git Repo - J-linux.git/commitdiff
RISC-V: Canaan devicetree fixes
authorPalmer Dabbelt <[email protected]>
Wed, 10 Aug 2022 21:33:45 +0000 (14:33 -0700)
committerPalmer Dabbelt <[email protected]>
Wed, 10 Aug 2022 21:43:14 +0000 (14:43 -0700)
This series should rid us of dtbs_check errors for the RISC-V Canaan
k210 based boards. To make keeping it that way a little easier, I
changed the Canaan devicetree Makefile so that it would build all of the
devicetrees in the directory if SOC_CANAAN.

Link: https://lore.kernel.org/all/mhng-85044754-c361-40bc-a6a2-7082f35930bb@palmer-ri-x1c9/
* remotes/palmer/riscv-canaan_dt_schema:
  riscv: dts: canaan: build all devicetress if SOC_CANAAN
  riscv: dts: canaan: add specific compatible for kd233's LCD
  riscv: dts: canaan: fix bus {ranges,reg} warnings
  riscv: dts: canaan: remove spi-max-frequency from controllers
  riscv: dts: canaan: use custom compatible for k210 i2s
  riscv: dts: canaan: fix kd233 display spi frequency
  riscv: dts: canaan: fix mmc node names
  riscv: dts: canaan: fix the k210's timer nodes
  riscv: dts: canaan: fix the k210's memory node
  dt-bindings: memory-controllers: add canaan k210 sram controller
  dt-bindings: display: ili9341: document canaan kd233's lcd
  dt-bindings: display: convert ilitek,ili9341.txt to dt-schema

1  2 
arch/riscv/boot/dts/canaan/canaan_kd233.dts
arch/riscv/boot/dts/canaan/k210.dtsi
arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts
arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts
arch/riscv/boot/dts/canaan/sipeed_maix_go.dts
arch/riscv/boot/dts/canaan/sipeed_maixduino.dts

index f72540bd14a3be3f05222d5f0bacc31b5f3f6f44,b0cd0105a5bdd93a565ad733e15db1129b26d313..8df4cf3656f2c93249f0576fe6b10529b5ccd335
@@@ -35,7 -35,7 +35,7 @@@
        gpio-keys {
                compatible = "gpio-keys";
  
 -              key0 {
 +              key {
                        label = "KEY0";
                        linux,code = <BTN_0>;
                        gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
        cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
  
        panel@0 {
-               compatible = "ilitek,ili9341";
+               compatible = "canaan,kd233-tft", "ilitek,ili9341";
                reg = <0>;
                dc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
-               spi-max-frequency = <15000000>;
+               spi-max-frequency = <10000000>;
                status = "disabled";
        };
  };
        cs-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
        status = "okay";
  
-       slot@0 {
+       mmc@0 {
                compatible = "mmc-spi-slot";
                reg = <0>;
                voltage-ranges = <3300 3300>;
index ec944d1537dc40ea3e40ad5a1bd72c09a6a6992c,a515e5fb1af38013b40d74b9cc98981680e93a79..07e2e2649604640156aa61b6c7594b3c23e7a902
                                compatible = "riscv,cpu-intc";
                        };
                };
 +
 +              cpu-map {
 +                      cluster0 {
 +                              core0 {
 +                                      cpu = <&cpu0>;
 +                              };
 +
 +                              core1 {
 +                                      cpu = <&cpu1>;
 +                              };
 +                      };
 +              };
        };
  
        sram: memory@80000000 {
                device_type = "memory";
+               reg = <0x80000000 0x400000>, /* sram0 4 MiB */
+                     <0x80400000 0x200000>, /* sram1 2 MiB */
+                     <0x80600000 0x200000>; /* aisram 2 MiB */
+       };
+       sram_controller: memory-controller {
                compatible = "canaan,k210-sram";
-               reg = <0x80000000 0x400000>,
-                     <0x80400000 0x200000>,
-                     <0x80600000 0x200000>;
-               reg-names = "sram0", "sram1", "aisram";
                clocks = <&sysclk K210_CLK_SRAM0>,
                         <&sysclk K210_CLK_SRAM1>,
                         <&sysclk K210_CLK_AI>;
                        #address-cells = <1>;
                        #size-cells = <1>;
                        compatible = "simple-pm-bus";
-                       ranges;
+                       ranges = <0x50200000 0x50200000 0x200000>;
                        clocks = <&sysclk K210_CLK_APB0>;
  
                        gpio1: gpio@50200000 {
                        };
  
                        i2s0: i2s@50250000 {
-                               compatible = "snps,designware-i2s";
+                               compatible = "canaan,k210-i2s", "snps,designware-i2s";
                                reg = <0x50250000 0x200>;
                                interrupts = <5>;
                                clocks = <&sysclk K210_CLK_I2S0>;
                        };
  
                        i2s1: i2s@50260000 {
-                               compatible = "snps,designware-i2s";
+                               compatible = "canaan,k210-i2s", "snps,designware-i2s";
                                reg = <0x50260000 0x200>;
                                interrupts = <6>;
                                clocks = <&sysclk K210_CLK_I2S1>;
                        };
  
                        i2s2: i2s@50270000 {
-                               compatible = "snps,designware-i2s";
+                               compatible = "canaan,k210-i2s", "snps,designware-i2s";
                                reg = <0x50270000 0x200>;
                                interrupts = <7>;
                                clocks = <&sysclk K210_CLK_I2S2>;
  
                        timer0: timer@502d0000 {
                                compatible = "snps,dw-apb-timer";
-                               reg = <0x502D0000 0x100>;
-                               interrupts = <14>, <15>;
+                               reg = <0x502D0000 0x14>;
+                               interrupts = <14>;
                                clocks = <&sysclk K210_CLK_TIMER0>,
                                         <&sysclk K210_CLK_APB0>;
                                clock-names = "timer", "pclk";
                                resets = <&sysrst K210_RST_TIMER0>;
                        };
  
-                       timer1: timer@502e0000 {
+                       timer1: timer@502d0014 {
+                               compatible = "snps,dw-apb-timer";
+                               reg = <0x502D0014 0x14>;
+                               interrupts = <15>;
+                               clocks = <&sysclk K210_CLK_TIMER0>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "timer", "pclk";
+                               resets = <&sysrst K210_RST_TIMER0>;
+                       };
+                       timer2: timer@502e0000 {
+                               compatible = "snps,dw-apb-timer";
+                               reg = <0x502E0000 0x14>;
+                               interrupts = <16>;
+                               clocks = <&sysclk K210_CLK_TIMER1>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "timer", "pclk";
+                               resets = <&sysrst K210_RST_TIMER1>;
+                       };
+                       timer3: timer@502e0014 {
                                compatible = "snps,dw-apb-timer";
-                               reg = <0x502E0000 0x100>;
-                               interrupts = <16>, <17>;
+                               reg = <0x502E0014 0x114>;
+                               interrupts = <17>;
                                clocks = <&sysclk K210_CLK_TIMER1>,
                                         <&sysclk K210_CLK_APB0>;
                                clock-names = "timer", "pclk";
                                resets = <&sysrst K210_RST_TIMER1>;
                        };
  
-                       timer2: timer@502f0000 {
+                       timer4: timer@502f0000 {
                                compatible = "snps,dw-apb-timer";
-                               reg = <0x502F0000 0x100>;
-                               interrupts = <18>, <19>;
+                               reg = <0x502F0000 0x14>;
+                               interrupts = <18>;
+                               clocks = <&sysclk K210_CLK_TIMER2>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "timer", "pclk";
+                               resets = <&sysrst K210_RST_TIMER2>;
+                       };
+                       timer5: timer@502f0014 {
+                               compatible = "snps,dw-apb-timer";
+                               reg = <0x502F0014 0x14>;
+                               interrupts = <19>;
                                clocks = <&sysclk K210_CLK_TIMER2>,
                                         <&sysclk K210_CLK_APB0>;
                                clock-names = "timer", "pclk";
                        #address-cells = <1>;
                        #size-cells = <1>;
                        compatible = "simple-pm-bus";
-                       ranges;
+                       ranges = <0x50400000 0x50400000 0x40100>;
                        clocks = <&sysclk K210_CLK_APB1>;
  
                        wdt0: watchdog@50400000 {
                        #address-cells = <1>;
                        #size-cells = <1>;
                        compatible = "simple-pm-bus";
-                       ranges;
+                       ranges = <0x52000000 0x52000000 0x2000200>;
                        clocks = <&sysclk K210_CLK_APB2>;
  
                        spi0: spi@52000000 {
                                clock-names = "ssi_clk", "pclk";
                                resets = <&sysrst K210_RST_SPI0>;
                                reset-names = "spi";
-                               spi-max-frequency = <25000000>;
                                num-cs = <4>;
                                reg-io-width = <4>;
                        };
                                clock-names = "ssi_clk", "pclk";
                                resets = <&sysrst K210_RST_SPI1>;
                                reset-names = "spi";
-                               spi-max-frequency = <25000000>;
                                num-cs = <4>;
                                reg-io-width = <4>;
                        };
                                clock-names = "ssi_clk", "pclk";
                                resets = <&sysrst K210_RST_SPI3>;
                                reset-names = "spi";
-                               /* Could possibly go up to 200 MHz */
-                               spi-max-frequency = <100000000>;
                                num-cs = <4>;
                                reg-io-width = <4>;
                        };
index 8abdbe26a1d098583f99b4e87116b5dbc6acf45b,5e809d0e11fbf1bf6b6cb43bbc6616907f699e84..6d25bf07481a6ed8ecbe74e10316825f630cc559
@@@ -47,7 -47,7 +47,7 @@@
        gpio-keys {
                compatible = "gpio-keys";
  
 -              boot {
 +              key-boot {
                        label = "BOOT";
                        linux,code = <BTN_0>;
                        gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
        cs-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
        status = "okay";
  
-       slot@0 {
+       mmc@0 {
                compatible = "mmc-spi-slot";
                reg = <0>;
                voltage-ranges = <3300 3300>;
index 3c6df1ecf76fd7f3534fdc557837ffad5e2ad1f1,4be5ffac6b4ae5b5e8a9548bf53ede017becdda3..f4f4d8d5e8b88cad89664f6c6d4e105f97e44c92
@@@ -52,7 -52,7 +52,7 @@@
        gpio-keys {
                compatible = "gpio-keys";
  
 -              boot {
 +              key-boot {
                        label = "BOOT";
                        linux,code = <BTN_0>;
                        gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
        cs-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
        status = "okay";
  
-       slot@0 {
+       mmc@0 {
                compatible = "mmc-spi-slot";
                reg = <0>;
                voltage-ranges = <3300 3300>;
index 03c9843d503e6fc23cd3196c82aae6a96164a543,5c63f79b18ec8aefb8b72aa96add5532463e383b..0d86df47e1ed3987afd424db059ec5a271bf0fdf
        gpio-keys {
                compatible = "gpio-keys";
  
 -              up {
 +              key-up {
                        label = "UP";
                        linux,code = <BTN_1>;
                        gpios = <&gpio1_0 7 GPIO_ACTIVE_LOW>;
                };
  
 -              press {
 +              key-press {
                        label = "PRESS";
                        linux,code = <BTN_0>;
                        gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
                };
  
 -              down {
 +              key-down {
                        label = "DOWN";
                        linux,code = <BTN_2>;
                        gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
        cs-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
        status = "okay";
  
-       slot@0 {
+       mmc@0 {
                compatible = "mmc-spi-slot";
                reg = <0>;
                voltage-ranges = <3300 3300>;
index 7164ad06317812d7ee53fc81871345b98e69a77b,59f7eaf74655667ad689dc4106fdee1a76ab1227..5c05c498e2b88bf4f6310b4168e47ef810f33745
@@@ -23,7 -23,7 +23,7 @@@
        gpio-keys {
                compatible = "gpio-keys";
  
 -              boot {
 +              key-boot {
                        label = "BOOT";
                        linux,code = <BTN_0>;
                        gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
        cs-gpios = <&gpio1_0 2 GPIO_ACTIVE_LOW>;
        status = "okay";
  
-       slot@0 {
+       mmc@0 {
                compatible = "mmc-spi-slot";
                reg = <0>;
                voltage-ranges = <3300 3300>;
This page took 0.078441 seconds and 4 git commands to generate.