arch/riscv/boot/dts/canaan/canaan_kd233.dts

Source file repositories/reference/linux-study-clean/arch/riscv/boot/dts/canaan/canaan_kd233.dts

File Facts

System
Linux kernel
Corpus path
arch/riscv/boot/dts/canaan/canaan_kd233.dts
Extension
.dts
Size
3513 bytes
Lines
158
Domain
Architecture Layer
Bucket
arch/riscv
Inferred role
Architecture Layer: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com>
 * Copyright (C) 2020 Western Digital Corporation or its affiliates.
 */

/dts-v1/;

#include "k210.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
	model = "Kendryte KD233";
	compatible = "canaan,kendryte-kd233", "canaan,kendryte-k210";

	aliases {
		serial0 = &uarths0;
	};

	chosen {
		bootargs = "earlycon console=ttySIF0";
		stdout-path = "serial0:115200n8";
	};

	gpio-leds {
		compatible = "gpio-leds";

		led0 {
			gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
		};

		led1 {
			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		key {
			label = "KEY0";
			linux,code = <BTN_0>;
			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
		};
	};
};

&fpioa {
	pinctrl-0 = <&jtag_pinctrl>;
	pinctrl-names = "default";

	jtag_pinctrl: jtag-pinmux {
		pinmux = <K210_FPIOA(0, K210_PCF_JTAG_TCLK)>,
			 <K210_FPIOA(1, K210_PCF_JTAG_TDI)>,
			 <K210_FPIOA(2, K210_PCF_JTAG_TMS)>,
			 <K210_FPIOA(3, K210_PCF_JTAG_TDO)>;
	};

	uarths_pinctrl: uarths-pinmux {
		pinmux = <K210_FPIOA(4, K210_PCF_UARTHS_RX)>,
			 <K210_FPIOA(5, K210_PCF_UARTHS_TX)>;
	};

	spi0_pinctrl: spi0-pinmux {
		pinmux = <K210_FPIOA(6, K210_PCF_GPIOHS20)>,  /* cs */
			 <K210_FPIOA(7, K210_PCF_SPI0_SCLK)>, /* wr */
			 <K210_FPIOA(8, K210_PCF_GPIOHS21)>;  /* dc */
	};

Annotation

Implementation Notes