Commit be4f53fa authored by Kumar Gala's avatar Kumar Gala Committed by Kumar Gala
Browse files

riscv: Add device tree support to pulpino



Add simple device tree support for the Pulpino SoC and Zedboard-Pulpino
board port.  This gets the UART info from device tree instead of soc.h

Signed-off-by: default avatarKumar Gala <kumar.gala@linaro.org>
parent c361405e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2,4 +2,5 @@
config BOARD_ZEDBOARD_PULPINO
	bool "Zedboard pulpino target"
	depends on SOC_RISCV32_PULPINO
	select HAS_DTS
	select BUILD_OUTPUT_S19
+28 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018 Linaro Limited
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/dts-v1/;

#include <pulpino.dtsi>

/ {
	model = "zedboard_pulpino";
	compatible = "pulp,zedboard-pulpino";

	aliases {
		uart-0 = &uart0;
	};

	chosen {
		zephyr,console = &uart0;
	};
};

&uart0 {
	status = "ok";
	current-speed = <115200>;
};
+32 −0
Original line number Diff line number Diff line
#
# Copyright (c) 2018, Linaro Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
---
title: PULPINO Event Unit
id: pulp,pulpino-event-unit
version: 0.1

description: >
    This binding describes the Pulpino Event Unit

properties:
  compatible:
      category: required
      type: string
      description: compatible strings
      constraint: "pulp,pulpino-event-unit"
      generation: define

  reg:
      category: required
      type: int
      description: mmio register space
      generation: define

base_label: PULPINO_EVENT_UNIT

"#cells":
  - irq
...
+54 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018 Linaro Limited
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/ {
	#address-cells = <1>;
	#size-cells = <1>;

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
		cpu@0 {
			compatible = "pulp,ri5cy", "riscv";
			reg = <0>;
		};
	};

	soc {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "pulp,pulpino-soc", "simple-bus";
		ranges;

		itim: itim@8000000 {
			compatible = "pulp,pulpino0itim";
			reg = <0x0 0x8000>;
		};

		dtim: dtim@100000 {
			compatible = "pulp,pulpino-dtim";
			reg = <0x100000 0x8000>;
		};

		uart0: uart@1a100000 {
			compatible = "ns16550";
			reg = <0x1a100000 0x1000>;
			label = "UART_0";
			clock-frequency = <2500000>;
			interrupts = <24>;
			interrupt-parent = <&intc>;

			status = "disabled";
		};

		intc: interrupt-controller@1a104000 {
			#interrupt-cells = <1>;
			compatible = "pulp,pulpino-event-unit";
			interrupt-controller;
			reg = <0x1a104000 0x1000>;
		};
	};
};
+0 −20
Original line number Diff line number Diff line
@@ -58,26 +58,6 @@ config UART_NS16550_PORT_0
	bool
	default y

if UART_NS16550_PORT_0

config UART_NS16550_PORT_0_NAME
	string
	default "UART_0"

config UART_NS16550_PORT_0_IRQ_PRI
	int
	default 0

config UART_NS16550_PORT_0_BAUD_RATE
	int
	default 115200

config UART_NS16550_PORT_0_OPTIONS
	int
	default 0

endif # UART_NS16550_PORT_0

endif # UART_NS16550

endif # SOC_RISCV32_PULPINO
Loading