1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2023-2025 Keguang Zhang <keguang.zhang@gmail.com> 4 */ 5 6/dts-v1/; 7 8#include <dt-bindings/gpio/gpio.h> 9 10#include "loongson1b.dtsi" 11 12/ { 13 compatible = "loongson,lsgz-1b-dev", "loongson,ls1b"; 14 model = "LSGZ_1B_DEV Board"; 15 16 memory@0 { 17 device_type = "memory"; 18 reg = <0x0 0x4000000>; 19 }; 20 21 aliases { 22 ethernet0 = &gmac0; 23 ethernet1 = &gmac1; 24 gpio0 = &gpio0; 25 gpio1 = &gpio1; 26 serial0 = &uart2; 27 serial1 = &uart3; 28 }; 29 30 chosen { 31 stdout-path = "serial0:115200n8"; 32 }; 33 34 leds { 35 compatible = "gpio-leds"; 36 37 led9 { 38 label = "led9"; 39 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; 40 linux,default-trigger = "heartbeat"; 41 }; 42 43 led6 { 44 label = "led6"; 45 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; 46 linux,default-trigger = "nand-disk"; 47 }; 48 }; 49 50 codec: audio-codec { 51 compatible = "realtek,alc203"; 52 #sound-dai-cells = <0>; 53 }; 54 55 sound { 56 compatible = "simple-audio-card"; 57 simple-audio-card,name = "ls1b-alc655"; 58 simple-audio-card,format = "ac97"; 59 simple-audio-card,widgets = 60 "Speaker", "Line Out Jack", 61 "Line", "Line In Jack", 62 "Microphone", "Microphone Jack"; 63 simple-audio-card,routing = 64 "Line Out Jack", "TX", 65 "RX", "Line In Jack", 66 "RX", "Microphone Jack"; 67 68 simple-audio-card,cpu { 69 sound-dai = <&ac97>; 70 }; 71 72 simple-audio-card,codec { 73 sound-dai = <&codec>; 74 }; 75 }; 76}; 77 78&xtal { 79 clock-frequency = <33000000>; 80}; 81 82&gmac0 { 83 phy-handle = <&phy0>; 84 phy-mode = "mii"; 85 status = "okay"; 86 87 mdio { 88 #address-cells = <1>; 89 #size-cells = <0>; 90 compatible = "snps,dwmac-mdio"; 91 92 phy0: ethernet-phy@0 { 93 reg = <0x0>; 94 }; 95 }; 96}; 97 98&gmac1 { 99 phy-handle = <&phy1>; 100 phy-mode = "mii"; 101 status = "okay"; 102 103 mdio { 104 compatible = "snps,dwmac-mdio"; 105 #address-cells = <1>; 106 #size-cells = <0>; 107 108 phy1: ethernet-phy@0 { 109 reg = <0x0>; 110 }; 111 }; 112}; 113 114&nand { 115 status = "okay"; 116 117 nand@0 { 118 partitions { 119 compatible = "fixed-partitions"; 120 #address-cells = <1>; 121 #size-cells = <1>; 122 123 partition@0 { 124 label = "kernel"; 125 reg = <0x0 0x1000000>; 126 }; 127 128 partition@1000000 { 129 label = "rootfs"; 130 reg = <0x1000000 0x7000000>; 131 }; 132 }; 133 }; 134}; 135 136&ac97 { 137 status = "okay"; 138}; 139 140&ehci { 141 status = "okay"; 142}; 143 144&ohci { 145 status = "okay"; 146}; 147 148&rtc { 149 status = "okay"; 150}; 151 152&uart2 { 153 status = "okay"; 154}; 155 156&uart3 { 157 status = "okay"; 158}; 159 160&watchdog { 161 status = "okay"; 162}; 163