123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- diff -Nur linux-5.4.36/arch/riscv/boot/dts/thead/Makefile kernel/arch/riscv/boot/dts/thead/Makefile
- --- /dev/null
- +++ kernel/arch/riscv/boot/dts/thead/Makefile
- @@ -0,0 +1,2 @@
- +# SPDX-License-Identifier: GPL-2.0
- +dtb-$(CONFIG_SOC_LIGHT) += k210.dtb
- diff -Nur linux-5.4.36/arch/riscv/boot/dts/thead/light-c910.dts kernel/arch/riscv/boot/dts/thead/light-c910.dts
- --- /dev/null
- +++ kernel/arch/riscv/boot/dts/thead/light-c910.dts
- @@ -0,0 +1,401 @@
- +/dts-v1/;
- +/ {
- + model = "T-HEAD ICE soc";
- + compatible = "thead,ice_c910";
- + #address-cells = <2>;
- + #size-cells = <2>;
- +
- + memory@0 {
- + device_type = "memory";
- + /*
- + * Total memory size: 2GB (0x00000000 0x80000000)
- + * 0x00200000 - 0x40000000: 1022MB for Linux system
- + * 0x40000000 - 0x60000000: 512MB for NPU: IAS0
- + * 0x60000000 - 0x80000000: 512MB for GPU
- + */
- + reg = <0x0 0x200000 0x0 0x3fe00000>;
- + };
- +
- + cpus {
- + #address-cells = <1>;
- + #size-cells = <0>;
- + timebase-frequency = <3000000>;
- + cpu@0 {
- + device_type = "cpu";
- + reg = <0>;
- + status = "okay";
- + compatible = "riscv";
- + riscv,isa = "rv64imafdcsu";
- + mmu-type = "riscv,sv39";
- + cpu0_intc: interrupt-controller {
- + #interrupt-cells = <1>;
- + compatible = "riscv,cpu-intc";
- + interrupt-controller;
- + };
- + };
- + cpu@1 {
- + device_type = "cpu";
- + reg = <1>;
- + status = "okay";
- + compatible = "riscv";
- + riscv,isa = "rv64imafdcsu";
- + mmu-type = "riscv,sv39";
- + cpu1_intc: interrupt-controller {
- + #interrupt-cells = <1>;
- + compatible = "riscv,cpu-intc";
- + interrupt-controller;
- + };
- + };
- + cpu@2 {
- + device_type = "cpu";
- + reg = <2>;
- + status = "fail";
- + compatible = "riscv";
- + riscv,isa = "rv64imafdcsu";
- + mmu-type = "riscv,sv39";
- + cpu2_intc: interrupt-controller {
- + #interrupt-cells = <1>;
- + compatible = "riscv,cpu-intc";
- + interrupt-controller;
- + };
- + };
- + };
- +
- + aliases {
- + ethernet0 = &gmac;
- + };
- +
- + soc {
- + #address-cells = <2>;
- + #size-cells = <2>;
- + compatible = "simple-bus";
- + ranges;
- +
- + intc: interrupt-controller@3f0000000 {
- + #interrupt-cells = <1>;
- + compatible = "riscv,plic0";
- + interrupt-controller;
- + interrupts-extended = <
- + &cpu0_intc 0xffffffff &cpu0_intc 9
- + &cpu1_intc 0xffffffff &cpu1_intc 9
- + &cpu2_intc 0xffffffff &cpu2_intc 9
- + >;
- + reg = <0x3 0xf0000000 0x0 0x04000000>;
- + reg-names = "control";
- + riscv,max-priority = <7>;
- + riscv,ndev = <80>;
- + };
- +
- + dummy_apb: apb-clock {
- + compatible = "fixed-clock";
- + clock-frequency = <62500000>;
- + clock-output-names = "dummy_apb";
- + #clock-cells = <0>;
- + };
- +
- + dummy_ahb: ahb-clock {
- + compatible = "fixed-clock";
- + clock-frequency = <250000000>;
- + clock-output-names = "dummy_ahb";
- + #clock-cells = <0>;
- + };
- +
- + dummy_axi: axi-clock {
- + compatible = "fixed-clock";
- + clock-frequency = <500000000>;
- + clock-output-names = "dummy_axi";
- + #clock-cells = <0>;
- + };
- +
- + dummy_gmac: gmac-clock {
- + compatible = "fixed-clock";
- + clock-frequency = <1000000000>;
- + clock-output-names = "dummy_gmac";
- + #clock-cells = <0>;
- + };
- +
- + dummy_clk_sdio: dummy-clk-sdio {
- + compatible = "fixed-clock";
- + clock-frequency = <150000000>;
- + clock-output-names = "dummy_sdio";
- + #clock-cells = <0>;
- + };
- +
- + dummy_clk_dpu: dummy-clk-dpu {
- + compatible = "fixed-clock";
- + clock-frequency = <297000000>;
- + clock-output-names = "dummy_dpu";
- + #clock-cells = <0>;
- + };
- +
- + gpio0: gpio@3fff71000 {
- + compatible = "snps,dw-apb-gpio";
- + reg = <0x3 0xfff71000 0x0 0x1000>;
- + #address-cells = <2>;
- + #size-cells = <2>;
- +
- + /* GPIO0[0-31] */
- + gpio0_porta: gpio0-controller@0 {
- + compatible = "snps,dw-apb-gpio-port";
- + gpio-controller;
- + #gpio-cells = <2>;
- + snps,nr-gpios = <32>;
- + reg = <0>;
- +
- + interrupt-controller;
- + #interrupt-cells = <2>;
- + interrupt-parent = <&intc>;
- + interrupts = <27>;
- + };
- +
- + /* GPIO0[32-63] */
- + gpio0_portb: gpio0-controller@1 {
- + compatible = "snps,dw-apb-gpio-port";
- + gpio-controller;
- + #gpio-cells = <2>;
- + snps,nr-gpios = <32>;
- + reg = <1>;
- + };
- + };
- +
- + gpio1: gpio@3fff72000 {
- + compatible = "snps,dw-apb-gpio";
- + reg = <0x3 0xfff72000 0x0 0x1000>;
- + #address-cells = <2>;
- + #size-cells = <2>;
- +
- + /* GPIO1[0-31] */
- + gpio1_porta: gpio1-controller@0 {
- + compatible = "snps,dw-apb-gpio-port";
- + gpio-controller;
- + #gpio-cells = <2>;
- + snps,nr-gpios = <32>;
- + reg = <0>;
- + };
- +
- + /* GPIO1[32-63] */
- + gpio1_portb: gpio1-controller@1 {
- + compatible = "snps,dw-apb-gpio-port";
- + gpio-controller;
- + #gpio-cells = <2>;
- + snps,nr-gpios = <32>;
- + reg = <1>;
- + };
- +
- + /* GPIO1[64-95] */
- + gpio1_portc: gpio1-controller@2 {
- + compatible = "snps,dw-apb-gpio-port";
- + gpio-controller;
- + #gpio-cells = <2>;
- + snps,nr-gpios = <32>;
- + reg = <2>;
- + };
- + };
- +
- + gpio-leds {
- + compatible = "gpio-leds";
- +
- + led0 { /* GPIO0[11] - UART2_TXD */
- + label = "led0";
- + gpios = <&gpio0_porta 11 1>;
- + default-state = "off";
- + };
- + };
- +
- + gpio-keys {
- + compatible = "gpio-keys";
- + /* autorepeat; */
- +
- + key_0 { /* GPIO0[10] - UART2_RXD */
- + gpios = <&gpio0_porta 10 1>;
- + linux,code = <59>;
- + label = "key_0";
- + };
- + };
- +
- + serial0@3fff73000 {
- + compatible = "snps,dw-apb-uart";
- + reg = <0x3 0xfff73000 0x0 0x400>;
- + interrupt-parent = <&intc>;
- + interrupts = <23>;
- + clocks = <&dummy_apb>;
- + clock-names = "baudclk";
- + reg-shift = <2>;
- + reg-io-width = <4>;
- + fifo-size = <16>;
- + /*
- + * rx-trigger-level:
- + * 0 - 1 character
- + * 1 - 1/4 full
- + * 2 - 1/2 full
- + * 3 - (fifo size - 2)
- + */
- + rx-trigger-level = <2>;
- + };
- +
- + /* serial1@3fff73400, interrupt=24 is occupied by CK810 system */
- +
- + serial2@3fff73800 {
- + compatible = "snps,dw-apb-uart";
- + reg = <0x3 0xfff73800 0x0 0x400>;
- + interrupt-parent = <&intc>;
- + interrupts = <25>;
- + clocks = <&dummy_apb>;
- + clock-names = "baudclk";
- + reg-shift = <2>;
- + reg-io-width = <4>;
- + fifo-size = <16>;
- + /*
- + * rx-trigger-level:
- + * 0 - 1 character
- + * 1 - 1/4 full
- + * 2 - 1/2 full
- + * 3 - (fifo size - 2)
- + */
- + rx-trigger-level = <2>;
- + };
- +
- + i2c@3fff74000 {
- + #address-cells = <2>;
- + #size-cells = <2>;
- + compatible = "dahua,i2c-dw201a";
- + reg = <0x3 0xfff74000 0x0 0x1000>;
- + interrupts = <21>;
- + interrupt-parent = <&intc>;
- + clocks = <&dummy_apb>;
- + clock-frequency = <400000>;
- +
- + eeprom@50 {
- + compatible = "atmel,24c64";
- + reg = <0x50>;
- + pagesize = <32>;
- + };
- + };
- +
- + pmu: pmu {
- + compatible = "riscv,c910_pmu";
- + };
- +
- + dmac0: dmac@3fffd0000 {
- + compatible = "snps,axi-dma-1.01a";
- + reg = <0x3 0xfffd0000 0x0 0x1000>;
- + interrupt-parent = <&intc>;
- + interrupts = <65>;
- + clocks = <&dummy_axi>, <&dummy_ahb>;
- + clock-names = "core-clk", "cfgr-clk";
- +
- + dma-channels = <8>;
- + snps,block-size = <65536 65536 65536 65536 65536 65536 65536 65536>;
- + snps,priority = <0 1 2 3 4 5 6 7>;
- + snps,dma-masters = <1>;
- + snps,data-width = <4>;
- + snps,axi-max-burst-len = <16>;
- +
- + /* status = "disabled"; */
- + };
- +
- + sdhc0: sdhc0@3fffb0000 {
- + #address-cells = <1>;
- + #size-cells = <0>;
- + compatible = "snps,dw-mshc";
- + reg = <0x3 0xfffb0000 0x0 0x1000>;
- + interrupt-parent = <&intc>;
- + interrupts = <37>;
- + clocks = <&dummy_clk_sdio>, <&dummy_clk_sdio>;
- + clock-names = "ciu", "biu";
- + num-slots = <1>;
- + card-detect-delay = <200>;
- + cap-mmc-highspeed;
- + cap-cmd23;
- + non-removable;
- + bus-width = <8>;
- + };
- +
- + sdhc1: sdhc1@3fffa0000 {
- + compatible = "snps,dw-mshc";
- + reg = <0x3 0xfffa0000 0x0 0x1000>;
- + interrupt-parent = <&intc>;
- + interrupts = <38>;
- + clocks = <&dummy_clk_sdio>, <&dummy_clk_sdio>;
- + clock-names = "ciu", "biu";
- + num-slots = <1>;
- + card-detect-delay = <200>;
- + cap-sd-highspeed;
- + bus-width = <4>;
- + };
- +
- + stmmac_axi_setup: stmmac-axi-config {
- + snps,wr_osr_lmt = <3>;
- + snps,rd_osr_lmt = <3>;
- + snps,blen = <16 8 4 0 0 0 0>;
- + };
- +
- + gmac: ethernet@3fffc0000 {
- + compatible = "thead,dwmac";
- + reg = < 0x3 0xfffc0000 0x0 0x2000
- + 0x3 0xfe83025c 0x0 0x4
- + 0x3 0xfe83031c 0x0 0x4
- + 0x3 0xfff770c0 0x0 0x1c>;
- + reg-names = "gmac", "phy_if_reg", "txclk_dir_reg", "clk_mgr_reg";
- + interrupt-parent = <&intc>;
- + interrupts = <40>;
- + interrupt-names = "macirq";
- + clocks = <&dummy_ahb>, <&dummy_gmac>;
- + clock-names = "stmmaceth", "gmac_pll_clk";
- + snps,pbl = <32>;
- + snps,fixed-burst;
- + snps,axi-config = <&stmmac_axi_setup>;
- +
- + phy-mode = "rgmii-txid";
- + rx-clk-delay = <0x1f>; /* for RGMII */
- + tx-clk-delay = <0x1f>; /* for RGMII */
- +
- + phy-handle = <ð_phy_0>;
- + mdio0 {
- + #address-cells = <1>;
- + #size-cells = <0>;
- + compatible = "snps,dwmac-mdio";
- +
- + eth_phy_0: ethernet-phy@0 {
- + reg = <0>;
- + };
- + };
- + };
- +
- + npu0: npu@3fff20000 {
- + compatible = "verisilicon,vip8000";
- + core-id = <0>;
- + reg = <0x3 0xfff20000 0x0 0x1000>;
- + interrupt-parent = <&intc>;
- + interrupts = <66>;
- + contiguous-base = <0x0 0x40000000>;
- + contiguous-size = <0x0 0x20000000>;
- + extsram-base = <0x3 0xfe400000>;
- + extsram-size = <0x0 0x40000>;
- + };
- +
- + gpu: gpu@3fff27000 {
- + compatible = "verisilicon,gc8000ul";
- + reg = <0x3 0xfff27000 0x0 0x1000>;
- + interrupt-parent = <&intc>;
- + interrupts = <63>;
- + contiguous-base = <0x0 0x60000000>;
- + contiguous-size = <0x0 0x10000000>;
- + };
- +
- + dpu: dpu@3fff28000 {
- + compatible = "verisilicon,dc8000-fb";
- + reg = <0x3 0xfff28000 0x0 0x8000>;
- + interrupt-parent = <&intc>;
- + interrupts = <64>;
- + };
- +
- + };
- +
- + chosen {
- + bootargs = "console=ttyS0,115200 crashkernel=256M-:128M c910_mmu_v1";
- + linux,initrd-start = <0x2000000>;
- + linux,initrd-end = <0x17000000>;
- + stdout-path = "serial0@3fff73000:115200";
- + };
- +};
|