]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: Add device tree bindings for SPI
authorSean Anderson <seanga2@gmail.com>
Fri, 16 Oct 2020 22:57:54 +0000 (18:57 -0400)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 18 Dec 2020 10:46:37 +0000 (16:16 +0530)
This patch adds bindings for the MMC slot and SPI flash on the Sipeed Maix
Bit.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Acked-by: Rick Chen <rick@andestech.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
arch/riscv/dts/k210-maix-bit.dts
arch/riscv/dts/k210.dtsi

index c2beec602c5366128ea93f9954a4cf3ef8af1f3b..e4dea205b24b0f8bdc2f35789a0333e89a8764db 100644 (file)
                pinmux = <K210_FPIOA(26, K210_PCF_SPI1_D1)>,
                         <K210_FPIOA(27, K210_PCF_SPI1_SCLK)>,
                         <K210_FPIOA(28, K210_PCF_SPI1_D0)>,
-                        <K210_FPIOA(29, K210_PCF_GPIOHS13)>;
+                        <K210_FPIOA(29, K210_PCF_GPIOHS13)>; /* cs */
        };
 };
 
        pinctrl-0 = <&fpioa_dvp>;
        pinctrl-names = "default";
 };
+
+&spi0 {
+       pinctrl-0 = <&fpioa_spi0>;
+       pinctrl-names = "default";
+       num-cs = <1>;
+       cs-gpios = <&gpio0 20 0>;
+
+       panel@0 {
+               compatible = "sitronix,st7789v";
+               reg = <0>;
+               reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+               dc-gpios = <&gpio0 22 0>;
+               spi-max-frequency = <15000000>;
+               status = "disabled";
+       };
+};
+
+&spi1 {
+       pinctrl-0 = <&fpioa_spi1>;
+       pinctrl-names = "default";
+       num-cs = <1>;
+       cs-gpios = <&gpio0 13 0>;
+       status = "okay";
+
+       slot@0 {
+               compatible = "mmc-spi-slot";
+               reg = <0>;
+               spi-max-frequency = <25000000>;
+               voltage-ranges = <3300 3300>;
+               broken-cd;
+       };
+};
+
+&spi3 {
+       status = "okay";
+
+       spi-flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <50000000>;
+               m25p,fast-read;
+               broken-flash-reset;
+       };
+};
index fce98b0fc340cb5a4daa0cd1ac6ee832a6e6015c..81b04018c63c4aca59e456b45996f4f5ed690667 100644 (file)
                                interrupts = <24>;
                                clocks = <&sysclk K210_CLK_DVP>;
                                resets = <&sysrst K210_RST_DVP>;
+                               kendryte,sysctl = <&sysctl>;
+                               kendryte,misc-offset = <K210_SYSCTL_MISC>;
                                status = "disabled";
                        };