Skip to content

Commit 61702b9

Browse files
authored
Merge pull request #1 from alexhorner/irq-forward
Add support for BL808 UART2 and multiple IRQ forwards
2 parents f357635 + d057802 commit 61702b9

File tree

4 files changed

+74
-1
lines changed

4 files changed

+74
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# SPDX-License-Identifier: GPL-2.0
22
dtb-$(CONFIG_SOC_BOUFFALOLAB) += bl808-sipeed-m1s.dtb
3+
dtb-$(CONFIG_SOC_BOUFFALOLAB) += bl808-pine64-ox64.dtb
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ or MIT)
2+
/*
3+
* Copyright (C) 2022 Jisheng Zhang <[email protected]>
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include "bl808.dtsi"
9+
10+
/ {
11+
model = "Pine64 Ox64";
12+
compatible = "sipeed,m1s", "bouffalolab,bl808";
13+
14+
aliases {
15+
serial0 = &uart0;
16+
serial1 = &uart1;
17+
};
18+
19+
chosen {
20+
stdout-path = "serial0:2000000n8";
21+
bootargs = "console=ttyS0,2000000 loglevel=8 earlycon=sbi root=/dev/mtdblock0 ro rootfstype=squashfs";
22+
linux,initrd-start = <0x0 0x52000000>;
23+
linux,initrd-end = <0x0 0x52941784>;
24+
};
25+
26+
memory@50000000 {
27+
device_type = "memory";
28+
reg = <0x50000000 0x04000000>;
29+
};
30+
31+
xip_flash@58500000 {
32+
compatible = "mtd-rom";
33+
reg = <0x58500000 0x400000>;
34+
linux,mtd-name = "xip-flash.0";
35+
erase-size = <0x10000>;
36+
bank-width = <4>;
37+
38+
rootfs@0 {
39+
label = "rootfs";
40+
reg = <0x00000 0x280000>;
41+
read-only;
42+
};
43+
};
44+
};
45+
46+
&uart0 {
47+
status = "okay";
48+
};
49+
50+
&uart1 {
51+
status = "okay";
52+
};
53+
54+
&sdhci0 {
55+
status = "okay";
56+
};
57+
58+
&ipclic {
59+
status = "okay";
60+
};

arch/riscv/boot/dts/bouffalolab/bl808.dtsi

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,18 @@
6060
clocks = <&xtal>;
6161
status = "disabled";
6262
};
63-
63+
64+
uart1: serial@0x2000AA00 {
65+
compatible = "bouffalolab,uart";
66+
reg = <0x2000AA00 0x0100>;
67+
interrupts-extended = <&ipclic BFLB_IPC_SOURCE_M0
68+
BFLB_IPC_DEVICE_UART2
69+
IRQ_TYPE_EDGE_RISING>;
70+
mboxes = <&ipclic BFLB_IPC_SOURCE_M0 BFLB_IPC_DEVICE_UART2>;
71+
clocks = <&xtal>;
72+
status = "disabled";
73+
};
74+
6475
sdhci0: sdhci@20060000 {
6576
compatible = "bouffalolab,bflb-sdhci";
6677
reg = <0x20060000 0x100>;

include/dt-bindings/mailbox/bflb-ipc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212

1313
/* Peripheral device ID */
1414
#define BFLB_IPC_DEVICE_SDHCI 0
15+
#define BFLB_IPC_DEVICE_UART2 1
1516

1617
#endif

0 commit comments

Comments
 (0)