Skip to content

Commit 80e046f

Browse files
VynDragonkartben
authored andcommitted
dts: bflb: Add I2C nodes
Adds i2c binding and nodes Signed-off-by: Camille BAUD <mail@massdriver.space>
1 parent fddce23 commit 80e046f

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed

dts/bindings/i2c/bflb,i2c.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) 2024-2025 MASSDRIVER EI (massdriver.space)
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Bouffalolab I2C interface
5+
6+
compatible: "bflb,i2c"
7+
8+
include: [i2c-controller.yaml, pinctrl-device.yaml]
9+
10+
properties:
11+
reg:
12+
required: true
13+
14+
interrupts:
15+
required: true
16+
17+
pinctrl-0:
18+
required: true
19+
20+
pinctrl-names:
21+
required: true

dts/riscv/bflb/bl60x.dtsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <dt-bindings/pinctrl/bflb-common-pinctrl.h>
1111
#include <dt-bindings/pinctrl/bl60x-pinctrl.h>
1212
#include <dt-bindings/clock/bflb_bl60x_clock.h>
13+
#include <zephyr/dt-bindings/i2c/i2c.h>
1314

1415
/ {
1516
#address-cells = <1>;
@@ -176,6 +177,17 @@
176177
interrupt-parent = <&clic>;
177178
};
178179

180+
i2c0: i2c@4000a300 {
181+
compatible = "bflb,i2c";
182+
reg = <0x4000a300 0x100>;
183+
#address-cells = <1>;
184+
#size-cells = <0>;
185+
status = "disabled";
186+
187+
interrupts = <48 0>;
188+
interrupt-parent = <&clic>;
189+
};
190+
179191
flashctrl: flash-controller@4000b000 {
180192
compatible = "bflb,flash-controller";
181193
reg = <0x4000b000 0x1000>;

dts/riscv/bflb/bl61x.dtsi

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <dt-bindings/clock/bflb_bl61x_clock.h>
1212
#include <zephyr/dt-bindings/gpio/gpio.h>
1313
#include <zephyr/dt-bindings/input/input-event-codes.h>
14+
#include <zephyr/dt-bindings/i2c/i2c.h>
1415

1516
/ {
1617
#address-cells = <1>;
@@ -169,6 +170,28 @@
169170
status = "disabled";
170171
};
171172

173+
i2c0: i2c@2000a300 {
174+
compatible = "bflb,i2c";
175+
reg = <0x2000a300 0x100>;
176+
#address-cells = <1>;
177+
#size-cells = <0>;
178+
status = "disabled";
179+
180+
interrupts = <48 1>;
181+
interrupt-parent = <&clic>;
182+
};
183+
184+
i2c1: i2c@2000a900 {
185+
compatible = "bflb,i2c";
186+
reg = <0x2000a900 0x100>;
187+
#address-cells = <1>;
188+
#size-cells = <0>;
189+
status = "disabled";
190+
191+
interrupts = <55 1>;
192+
interrupt-parent = <&clic>;
193+
};
194+
172195
flashctrl: flash-controller@2000b000 {
173196
compatible = "bflb,flash-controller";
174197
reg = <0x2000b000 0x1000>;

dts/riscv/bflb/bl70x.dtsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <dt-bindings/pinctrl/bflb-common-pinctrl.h>
1010
#include <dt-bindings/pinctrl/bl70x-pinctrl.h>
1111
#include <dt-bindings/clock/bflb_bl70x_clock.h>
12+
#include <zephyr/dt-bindings/i2c/i2c.h>
1213

1314
/ {
1415
#address-cells = <1>;
@@ -170,6 +171,17 @@
170171
status = "disabled";
171172
};
172173

174+
i2c0: i2c@4000a300 {
175+
compatible = "bflb,i2c";
176+
reg = <0x4000a300 0x100>;
177+
#address-cells = <1>;
178+
#size-cells = <0>;
179+
status = "disabled";
180+
181+
interrupts = <48 0>;
182+
interrupt-parent = <&clic>;
183+
};
184+
173185
flashctrl: flash-controller@4000b000 {
174186
compatible = "bflb,flash-controller";
175187
reg = <0x4000b000 0x1000>;

0 commit comments

Comments
 (0)