15b5dce39SInochi Amaoto// SPDX-License-Identifier: (GPL-2.0 OR MIT) 25b5dce39SInochi Amaoto/* 35b5dce39SInochi Amaoto * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org> 4dd791b45SInochi Amaoto * Copyright (C) 2023 Inochi Amaoto <inochiama@outlook.com> 55b5dce39SInochi Amaoto */ 65b5dce39SInochi Amaoto 718e8c6d2SInochi Amaoto#include <dt-bindings/clock/sophgo,cv1800.h> 889a7056eSJisheng Zhang#include <dt-bindings/gpio/gpio.h> 95b5dce39SInochi Amaoto#include <dt-bindings/interrupt-controller/irq.h> 105b5dce39SInochi Amaoto 115b5dce39SInochi Amaoto/ { 125b5dce39SInochi Amaoto #address-cells = <1>; 135b5dce39SInochi Amaoto #size-cells = <1>; 145b5dce39SInochi Amaoto 155b5dce39SInochi Amaoto cpus: cpus { 165b5dce39SInochi Amaoto #address-cells = <1>; 175b5dce39SInochi Amaoto #size-cells = <0>; 185b5dce39SInochi Amaoto timebase-frequency = <25000000>; 195b5dce39SInochi Amaoto 205b5dce39SInochi Amaoto cpu0: cpu@0 { 215b5dce39SInochi Amaoto compatible = "thead,c906", "riscv"; 225b5dce39SInochi Amaoto device_type = "cpu"; 235b5dce39SInochi Amaoto reg = <0>; 245b5dce39SInochi Amaoto d-cache-block-size = <64>; 255b5dce39SInochi Amaoto d-cache-sets = <512>; 265b5dce39SInochi Amaoto d-cache-size = <65536>; 275b5dce39SInochi Amaoto i-cache-block-size = <64>; 285b5dce39SInochi Amaoto i-cache-sets = <128>; 295b5dce39SInochi Amaoto i-cache-size = <32768>; 305b5dce39SInochi Amaoto mmu-type = "riscv,sv39"; 315b5dce39SInochi Amaoto riscv,isa = "rv64imafdc"; 325b5dce39SInochi Amaoto riscv,isa-base = "rv64i"; 335b5dce39SInochi Amaoto riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr", 345b5dce39SInochi Amaoto "zifencei", "zihpm"; 355b5dce39SInochi Amaoto 365b5dce39SInochi Amaoto cpu0_intc: interrupt-controller { 375b5dce39SInochi Amaoto compatible = "riscv,cpu-intc"; 385b5dce39SInochi Amaoto interrupt-controller; 395b5dce39SInochi Amaoto #interrupt-cells = <1>; 405b5dce39SInochi Amaoto }; 415b5dce39SInochi Amaoto }; 425b5dce39SInochi Amaoto }; 435b5dce39SInochi Amaoto 445b5dce39SInochi Amaoto osc: oscillator { 455b5dce39SInochi Amaoto compatible = "fixed-clock"; 465b5dce39SInochi Amaoto clock-output-names = "osc_25m"; 475b5dce39SInochi Amaoto #clock-cells = <0>; 485b5dce39SInochi Amaoto }; 495b5dce39SInochi Amaoto 505b5dce39SInochi Amaoto soc { 515b5dce39SInochi Amaoto compatible = "simple-bus"; 525b5dce39SInochi Amaoto interrupt-parent = <&plic>; 535b5dce39SInochi Amaoto #address-cells = <1>; 545b5dce39SInochi Amaoto #size-cells = <1>; 555b5dce39SInochi Amaoto dma-noncoherent; 565b5dce39SInochi Amaoto ranges; 575b5dce39SInochi Amaoto 58bb7b3419SInochi Amaoto clk: clock-controller@3002000 { 59bb7b3419SInochi Amaoto reg = <0x03002000 0x1000>; 60bb7b3419SInochi Amaoto clocks = <&osc>; 61bb7b3419SInochi Amaoto #clock-cells = <1>; 62bb7b3419SInochi Amaoto }; 63bb7b3419SInochi Amaoto 64dd791b45SInochi Amaoto gpio0: gpio@3020000 { 65dd791b45SInochi Amaoto compatible = "snps,dw-apb-gpio"; 66dd791b45SInochi Amaoto reg = <0x3020000 0x1000>; 67dd791b45SInochi Amaoto #address-cells = <1>; 68dd791b45SInochi Amaoto #size-cells = <0>; 69dd791b45SInochi Amaoto 70dd791b45SInochi Amaoto porta: gpio-controller@0 { 71dd791b45SInochi Amaoto compatible = "snps,dw-apb-gpio-port"; 72dd791b45SInochi Amaoto gpio-controller; 73dd791b45SInochi Amaoto #gpio-cells = <2>; 74dd791b45SInochi Amaoto ngpios = <32>; 75dd791b45SInochi Amaoto reg = <0>; 76dd791b45SInochi Amaoto interrupt-controller; 77dd791b45SInochi Amaoto #interrupt-cells = <2>; 78dd791b45SInochi Amaoto interrupts = <60 IRQ_TYPE_LEVEL_HIGH>; 79dd791b45SInochi Amaoto }; 80dd791b45SInochi Amaoto }; 81dd791b45SInochi Amaoto 82dd791b45SInochi Amaoto gpio1: gpio@3021000 { 83dd791b45SInochi Amaoto compatible = "snps,dw-apb-gpio"; 84dd791b45SInochi Amaoto reg = <0x3021000 0x1000>; 85dd791b45SInochi Amaoto #address-cells = <1>; 86dd791b45SInochi Amaoto #size-cells = <0>; 87dd791b45SInochi Amaoto 88dd791b45SInochi Amaoto portb: gpio-controller@0 { 89dd791b45SInochi Amaoto compatible = "snps,dw-apb-gpio-port"; 90dd791b45SInochi Amaoto gpio-controller; 91dd791b45SInochi Amaoto #gpio-cells = <2>; 92dd791b45SInochi Amaoto ngpios = <32>; 93dd791b45SInochi Amaoto reg = <0>; 94dd791b45SInochi Amaoto interrupt-controller; 95dd791b45SInochi Amaoto #interrupt-cells = <2>; 96dd791b45SInochi Amaoto interrupts = <61 IRQ_TYPE_LEVEL_HIGH>; 97dd791b45SInochi Amaoto }; 98dd791b45SInochi Amaoto }; 99dd791b45SInochi Amaoto 100dd791b45SInochi Amaoto gpio2: gpio@3022000 { 101dd791b45SInochi Amaoto compatible = "snps,dw-apb-gpio"; 102dd791b45SInochi Amaoto reg = <0x3022000 0x1000>; 103dd791b45SInochi Amaoto #address-cells = <1>; 104dd791b45SInochi Amaoto #size-cells = <0>; 105dd791b45SInochi Amaoto 106dd791b45SInochi Amaoto portc: gpio-controller@0 { 107dd791b45SInochi Amaoto compatible = "snps,dw-apb-gpio-port"; 108dd791b45SInochi Amaoto gpio-controller; 109dd791b45SInochi Amaoto #gpio-cells = <2>; 110dd791b45SInochi Amaoto ngpios = <32>; 111dd791b45SInochi Amaoto reg = <0>; 112dd791b45SInochi Amaoto interrupt-controller; 113dd791b45SInochi Amaoto #interrupt-cells = <2>; 114dd791b45SInochi Amaoto interrupts = <62 IRQ_TYPE_LEVEL_HIGH>; 115dd791b45SInochi Amaoto }; 116dd791b45SInochi Amaoto }; 117dd791b45SInochi Amaoto 118dd791b45SInochi Amaoto gpio3: gpio@3023000 { 119dd791b45SInochi Amaoto compatible = "snps,dw-apb-gpio"; 120dd791b45SInochi Amaoto reg = <0x3023000 0x1000>; 121dd791b45SInochi Amaoto #address-cells = <1>; 122dd791b45SInochi Amaoto #size-cells = <0>; 123dd791b45SInochi Amaoto 124dd791b45SInochi Amaoto portd: gpio-controller@0 { 125dd791b45SInochi Amaoto compatible = "snps,dw-apb-gpio-port"; 126dd791b45SInochi Amaoto gpio-controller; 127dd791b45SInochi Amaoto #gpio-cells = <2>; 128dd791b45SInochi Amaoto ngpios = <32>; 129dd791b45SInochi Amaoto reg = <0>; 130dd791b45SInochi Amaoto interrupt-controller; 131dd791b45SInochi Amaoto #interrupt-cells = <2>; 132dd791b45SInochi Amaoto interrupts = <63 IRQ_TYPE_LEVEL_HIGH>; 133dd791b45SInochi Amaoto }; 134dd791b45SInochi Amaoto }; 135dd791b45SInochi Amaoto 13665fcc08bSInochi Amaoto i2c0: i2c@4000000 { 13765fcc08bSInochi Amaoto compatible = "snps,designware-i2c"; 13865fcc08bSInochi Amaoto reg = <0x04000000 0x10000>; 13965fcc08bSInochi Amaoto #address-cells = <1>; 14065fcc08bSInochi Amaoto #size-cells = <0>; 14165fcc08bSInochi Amaoto clocks = <&clk CLK_I2C>, <&clk CLK_APB_I2C0>; 14265fcc08bSInochi Amaoto clock-names = "ref", "pclk"; 14365fcc08bSInochi Amaoto interrupts = <49 IRQ_TYPE_LEVEL_HIGH>; 14465fcc08bSInochi Amaoto status = "disabled"; 14565fcc08bSInochi Amaoto }; 14665fcc08bSInochi Amaoto 14765fcc08bSInochi Amaoto i2c1: i2c@4010000 { 14865fcc08bSInochi Amaoto compatible = "snps,designware-i2c"; 14965fcc08bSInochi Amaoto reg = <0x04010000 0x10000>; 15065fcc08bSInochi Amaoto #address-cells = <1>; 15165fcc08bSInochi Amaoto #size-cells = <0>; 15265fcc08bSInochi Amaoto clocks = <&clk CLK_I2C>, <&clk CLK_APB_I2C1>; 15365fcc08bSInochi Amaoto clock-names = "ref", "pclk"; 15465fcc08bSInochi Amaoto interrupts = <50 IRQ_TYPE_LEVEL_HIGH>; 15565fcc08bSInochi Amaoto status = "disabled"; 15665fcc08bSInochi Amaoto }; 15765fcc08bSInochi Amaoto 15865fcc08bSInochi Amaoto i2c2: i2c@4020000 { 15965fcc08bSInochi Amaoto compatible = "snps,designware-i2c"; 16065fcc08bSInochi Amaoto reg = <0x04020000 0x10000>; 16165fcc08bSInochi Amaoto #address-cells = <1>; 16265fcc08bSInochi Amaoto #size-cells = <0>; 16365fcc08bSInochi Amaoto clocks = <&clk CLK_I2C>, <&clk CLK_APB_I2C2>; 16465fcc08bSInochi Amaoto clock-names = "ref", "pclk"; 16565fcc08bSInochi Amaoto interrupts = <51 IRQ_TYPE_LEVEL_HIGH>; 16665fcc08bSInochi Amaoto status = "disabled"; 16765fcc08bSInochi Amaoto }; 16865fcc08bSInochi Amaoto 16965fcc08bSInochi Amaoto i2c3: i2c@4030000 { 17065fcc08bSInochi Amaoto compatible = "snps,designware-i2c"; 17165fcc08bSInochi Amaoto reg = <0x04030000 0x10000>; 17265fcc08bSInochi Amaoto #address-cells = <1>; 17365fcc08bSInochi Amaoto #size-cells = <0>; 17465fcc08bSInochi Amaoto clocks = <&clk CLK_I2C>, <&clk CLK_APB_I2C3>; 17565fcc08bSInochi Amaoto clock-names = "ref", "pclk"; 17665fcc08bSInochi Amaoto interrupts = <52 IRQ_TYPE_LEVEL_HIGH>; 17765fcc08bSInochi Amaoto status = "disabled"; 17865fcc08bSInochi Amaoto }; 17965fcc08bSInochi Amaoto 18065fcc08bSInochi Amaoto i2c4: i2c@4040000 { 18165fcc08bSInochi Amaoto compatible = "snps,designware-i2c"; 18265fcc08bSInochi Amaoto reg = <0x04040000 0x10000>; 18365fcc08bSInochi Amaoto #address-cells = <1>; 18465fcc08bSInochi Amaoto #size-cells = <0>; 18565fcc08bSInochi Amaoto clocks = <&clk CLK_I2C>, <&clk CLK_APB_I2C4>; 18665fcc08bSInochi Amaoto clock-names = "ref", "pclk"; 18765fcc08bSInochi Amaoto interrupts = <53 IRQ_TYPE_LEVEL_HIGH>; 18865fcc08bSInochi Amaoto status = "disabled"; 18965fcc08bSInochi Amaoto }; 19065fcc08bSInochi Amaoto 1915b5dce39SInochi Amaoto uart0: serial@4140000 { 1925b5dce39SInochi Amaoto compatible = "snps,dw-apb-uart"; 1935b5dce39SInochi Amaoto reg = <0x04140000 0x100>; 1945b5dce39SInochi Amaoto interrupts = <44 IRQ_TYPE_LEVEL_HIGH>; 19518e8c6d2SInochi Amaoto clocks = <&clk CLK_UART0>, <&clk CLK_APB_UART0>; 19618e8c6d2SInochi Amaoto clock-names = "baudclk", "apb_pclk"; 1975b5dce39SInochi Amaoto reg-shift = <2>; 1985b5dce39SInochi Amaoto reg-io-width = <4>; 1995b5dce39SInochi Amaoto status = "disabled"; 2005b5dce39SInochi Amaoto }; 2015b5dce39SInochi Amaoto 2025b5dce39SInochi Amaoto uart1: serial@4150000 { 2035b5dce39SInochi Amaoto compatible = "snps,dw-apb-uart"; 2045b5dce39SInochi Amaoto reg = <0x04150000 0x100>; 2055b5dce39SInochi Amaoto interrupts = <45 IRQ_TYPE_LEVEL_HIGH>; 20618e8c6d2SInochi Amaoto clocks = <&clk CLK_UART1>, <&clk CLK_APB_UART1>; 20718e8c6d2SInochi Amaoto clock-names = "baudclk", "apb_pclk"; 2085b5dce39SInochi Amaoto reg-shift = <2>; 2095b5dce39SInochi Amaoto reg-io-width = <4>; 2105b5dce39SInochi Amaoto status = "disabled"; 2115b5dce39SInochi Amaoto }; 2125b5dce39SInochi Amaoto 2135b5dce39SInochi Amaoto uart2: serial@4160000 { 2145b5dce39SInochi Amaoto compatible = "snps,dw-apb-uart"; 2155b5dce39SInochi Amaoto reg = <0x04160000 0x100>; 2165b5dce39SInochi Amaoto interrupts = <46 IRQ_TYPE_LEVEL_HIGH>; 21718e8c6d2SInochi Amaoto clocks = <&clk CLK_UART2>, <&clk CLK_APB_UART2>; 21818e8c6d2SInochi Amaoto clock-names = "baudclk", "apb_pclk"; 2195b5dce39SInochi Amaoto reg-shift = <2>; 2205b5dce39SInochi Amaoto reg-io-width = <4>; 2215b5dce39SInochi Amaoto status = "disabled"; 2225b5dce39SInochi Amaoto }; 2235b5dce39SInochi Amaoto 2245b5dce39SInochi Amaoto uart3: serial@4170000 { 2255b5dce39SInochi Amaoto compatible = "snps,dw-apb-uart"; 2265b5dce39SInochi Amaoto reg = <0x04170000 0x100>; 2275b5dce39SInochi Amaoto interrupts = <47 IRQ_TYPE_LEVEL_HIGH>; 22818e8c6d2SInochi Amaoto clocks = <&clk CLK_UART3>, <&clk CLK_APB_UART3>; 22918e8c6d2SInochi Amaoto clock-names = "baudclk", "apb_pclk"; 2305b5dce39SInochi Amaoto reg-shift = <2>; 2315b5dce39SInochi Amaoto reg-io-width = <4>; 2325b5dce39SInochi Amaoto status = "disabled"; 2335b5dce39SInochi Amaoto }; 2345b5dce39SInochi Amaoto 2354281f8f1SInochi Amaoto spi0: spi@4180000 { 2364281f8f1SInochi Amaoto compatible = "snps,dw-apb-ssi"; 2374281f8f1SInochi Amaoto reg = <0x04180000 0x10000>; 2384281f8f1SInochi Amaoto #address-cells = <1>; 2394281f8f1SInochi Amaoto #size-cells = <0>; 2404281f8f1SInochi Amaoto clocks = <&clk CLK_SPI>, <&clk CLK_APB_SPI0>; 2414281f8f1SInochi Amaoto clock-names = "ssi_clk", "pclk"; 2424281f8f1SInochi Amaoto interrupts = <54 IRQ_TYPE_LEVEL_HIGH>; 2434281f8f1SInochi Amaoto status = "disabled"; 2444281f8f1SInochi Amaoto }; 2454281f8f1SInochi Amaoto 2464281f8f1SInochi Amaoto spi1: spi@4190000 { 2474281f8f1SInochi Amaoto compatible = "snps,dw-apb-ssi"; 2484281f8f1SInochi Amaoto reg = <0x04190000 0x10000>; 2494281f8f1SInochi Amaoto #address-cells = <1>; 2504281f8f1SInochi Amaoto #size-cells = <0>; 2514281f8f1SInochi Amaoto clocks = <&clk CLK_SPI>, <&clk CLK_APB_SPI1>; 2524281f8f1SInochi Amaoto clock-names = "ssi_clk", "pclk"; 2534281f8f1SInochi Amaoto interrupts = <55 IRQ_TYPE_LEVEL_HIGH>; 2544281f8f1SInochi Amaoto status = "disabled"; 2554281f8f1SInochi Amaoto }; 2564281f8f1SInochi Amaoto 2574281f8f1SInochi Amaoto spi2: spi@41a0000 { 2584281f8f1SInochi Amaoto compatible = "snps,dw-apb-ssi"; 2594281f8f1SInochi Amaoto reg = <0x041a0000 0x10000>; 2604281f8f1SInochi Amaoto #address-cells = <1>; 2614281f8f1SInochi Amaoto #size-cells = <0>; 2624281f8f1SInochi Amaoto clocks = <&clk CLK_SPI>, <&clk CLK_APB_SPI2>; 2634281f8f1SInochi Amaoto clock-names = "ssi_clk", "pclk"; 2644281f8f1SInochi Amaoto interrupts = <56 IRQ_TYPE_LEVEL_HIGH>; 2654281f8f1SInochi Amaoto status = "disabled"; 2664281f8f1SInochi Amaoto }; 2674281f8f1SInochi Amaoto 2684281f8f1SInochi Amaoto spi3: spi@41b0000 { 2694281f8f1SInochi Amaoto compatible = "snps,dw-apb-ssi"; 2704281f8f1SInochi Amaoto reg = <0x041b0000 0x10000>; 2714281f8f1SInochi Amaoto #address-cells = <1>; 2724281f8f1SInochi Amaoto #size-cells = <0>; 2734281f8f1SInochi Amaoto clocks = <&clk CLK_SPI>, <&clk CLK_APB_SPI3>; 2744281f8f1SInochi Amaoto clock-names = "ssi_clk", "pclk"; 2754281f8f1SInochi Amaoto interrupts = <57 IRQ_TYPE_LEVEL_HIGH>; 2764281f8f1SInochi Amaoto status = "disabled"; 2774281f8f1SInochi Amaoto }; 2784281f8f1SInochi Amaoto 2795b5dce39SInochi Amaoto uart4: serial@41c0000 { 2805b5dce39SInochi Amaoto compatible = "snps,dw-apb-uart"; 2815b5dce39SInochi Amaoto reg = <0x041c0000 0x100>; 2825b5dce39SInochi Amaoto interrupts = <48 IRQ_TYPE_LEVEL_HIGH>; 28318e8c6d2SInochi Amaoto clocks = <&clk CLK_UART4>, <&clk CLK_APB_UART4>; 28418e8c6d2SInochi Amaoto clock-names = "baudclk", "apb_pclk"; 2855b5dce39SInochi Amaoto reg-shift = <2>; 2865b5dce39SInochi Amaoto reg-io-width = <4>; 2875b5dce39SInochi Amaoto status = "disabled"; 2885b5dce39SInochi Amaoto }; 2895b5dce39SInochi Amaoto 29089a7056eSJisheng Zhang sdhci0: mmc@4310000 { 29189a7056eSJisheng Zhang compatible = "sophgo,cv1800b-dwcmshc"; 29289a7056eSJisheng Zhang reg = <0x4310000 0x1000>; 29389a7056eSJisheng Zhang interrupts = <36 IRQ_TYPE_LEVEL_HIGH>; 294886776caSInochi Amaoto clocks = <&clk CLK_AXI4_SD0>, 295886776caSInochi Amaoto <&clk CLK_SD0>; 296886776caSInochi Amaoto clock-names = "core", "bus"; 29789a7056eSJisheng Zhang status = "disabled"; 29889a7056eSJisheng Zhang }; 29989a7056eSJisheng Zhang 300*514951a8SInochi Amaoto dmac: dma-controller@4330000 { 301*514951a8SInochi Amaoto compatible = "snps,axi-dma-1.01a"; 302*514951a8SInochi Amaoto reg = <0x04330000 0x1000>; 303*514951a8SInochi Amaoto interrupts = <29 IRQ_TYPE_LEVEL_HIGH>; 304*514951a8SInochi Amaoto clocks = <&clk CLK_SDMA_AXI>, <&clk CLK_SDMA_AXI>; 305*514951a8SInochi Amaoto clock-names = "core-clk", "cfgr-clk"; 306*514951a8SInochi Amaoto #dma-cells = <1>; 307*514951a8SInochi Amaoto dma-channels = <8>; 308*514951a8SInochi Amaoto snps,block-size = <1024 1024 1024 1024 309*514951a8SInochi Amaoto 1024 1024 1024 1024>; 310*514951a8SInochi Amaoto snps,priority = <0 1 2 3 4 5 6 7>; 311*514951a8SInochi Amaoto snps,dma-masters = <2>; 312*514951a8SInochi Amaoto snps,data-width = <4>; 313*514951a8SInochi Amaoto status = "disabled"; 314*514951a8SInochi Amaoto }; 315*514951a8SInochi Amaoto 3165b5dce39SInochi Amaoto plic: interrupt-controller@70000000 { 3175b5dce39SInochi Amaoto reg = <0x70000000 0x4000000>; 3185b5dce39SInochi Amaoto interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>; 3195b5dce39SInochi Amaoto interrupt-controller; 3205b5dce39SInochi Amaoto #address-cells = <0>; 3215b5dce39SInochi Amaoto #interrupt-cells = <2>; 3225b5dce39SInochi Amaoto riscv,ndev = <101>; 3235b5dce39SInochi Amaoto }; 3245b5dce39SInochi Amaoto 3255b5dce39SInochi Amaoto clint: timer@74000000 { 3265b5dce39SInochi Amaoto reg = <0x74000000 0x10000>; 3275b5dce39SInochi Amaoto interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>; 3285b5dce39SInochi Amaoto }; 3295b5dce39SInochi Amaoto }; 3305b5dce39SInochi Amaoto}; 331