Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion arch/riscv/boot/dts/bouffalolab/bl808-pine64-ox64.dts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

chosen {
stdout-path = "serial0:2000000n8";
bootargs = "console=ttyS0,2000000 loglevel=8 earlycon=sbi root=/dev/mmcblk0p2 rootwait rootfstype=ext4";
bootargs = "console=ttyS0,2000000 loglevel=8 earlycon=sbi root=PARTLABEL=rootfs rootwait rootfstype=ext4";
linux,initrd-start = <0x0 0x52000000>;
linux,initrd-end = <0x0 0x52941784>;
};
Expand All @@ -41,12 +41,24 @@

&pinctrl {
status = "okay";

i2c_2_pins: i2c-pins {
pins = "GPIO6", "GPIO7";
function = "i2c2";
};
};

&seceng {
status = "okay";
};

&i2c2 {
status = "okay";

pinctrl-0 = <&i2c_2_pins>;
pinctrl-names = "default";
};

&uart0 {
status = "okay";
};
Expand Down
56 changes: 56 additions & 0 deletions arch/riscv/boot/dts/bouffalolab/bl808.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@
#clock-cells = <0>;
};

rc32m: rc32m-clk {
compatible = "fixed-clock";
clock-frequency = <32000000>;
clock-output-names = "rc32m";
#clock-cells = <0>;
};

mm_b: mm_bclk1x {
compatible = "fixed-clock";
clock-frequency = <160000000>;
clock-output-names = "mm_b";
#clock-cells = <0>;
};

enet: enet-clk {
compatible = "fixed-clock";
clock-frequency = <50000000>;
Expand Down Expand Up @@ -97,6 +111,48 @@
status = "disabled";
};

i2c0: i2c@2000A300 {
compatible = "bflb,bl808-i2c";
reg = <0x2000A300 0x0100>;
interrupts-extended = <&ipclic BFLB_IPC_SOURCE_M0
BFLB_IPC_DEVICE_I2C0
IRQ_TYPE_EDGE_RISING>;
mboxes = <&ipclic BFLB_IPC_SOURCE_M0 BFLB_IPC_DEVICE_I2C0>;
clocks = <&rc32m>;
clock-frequency = <400000>;
status = "disabled";
};

i2c1: i2c@2000A900 {
compatible = "bflb,bl808-i2c";
reg = <0x2000A900 0x0100>;
interrupts-extended = <&ipclic BFLB_IPC_SOURCE_M0
BFLB_IPC_DEVICE_I2C1
IRQ_TYPE_EDGE_RISING>;
mboxes = <&ipclic BFLB_IPC_SOURCE_M0 BFLB_IPC_DEVICE_I2C1>;
clocks = <&rc32m>;
clock-frequency = <400000>;
status = "disabled";
};

i2c2: i2c@30003000 {
compatible = "bflb,bl808-i2c";
reg = <0x30003000 0x1000>;
interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mm_b>;
clock-frequency = <400000>;
status = "disabled";
};

i2c3: i2c@30004000 {
compatible = "bflb,bl808-i2c";
reg = <0x30004000 0x1000>;
interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mm_b>;
clock-frequency = <400000>;
status = "disabled";
};

uart0: serial@30002000 {
compatible = "bflb,bl808-uart";
reg = <0x30002000 0x1000>;
Expand Down
10 changes: 10 additions & 0 deletions drivers/i2c/busses/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,16 @@ config I2C_RCAR
This driver can also be built as a module. If so, the module
will be called i2c-rcar.

config I2C_BL808
tristate "Bouffalo Lab BL808 I2C driver"
depends on SOC_BOUFFALOLAB
help
This driver provides support for the I2C bus
hardware found on Bouffalo Lab BL808 SoCs.

To compile this driver as a module, choose M here. The
module will be called i2c-bl808. If unsure, say N.

comment "External I2C/SMBus adapter drivers"

config I2C_DIOLAN_U2C
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ obj-$(CONFIG_I2C_AU1550) += i2c-au1550.o
obj-$(CONFIG_I2C_AXXIA) += i2c-axxia.o
obj-$(CONFIG_I2C_BCM2835) += i2c-bcm2835.o
obj-$(CONFIG_I2C_BCM_IPROC) += i2c-bcm-iproc.o
obj-$(CONFIG_I2C_BL808) += i2c-bl808.o
obj-$(CONFIG_I2C_CADENCE) += i2c-cadence.o
obj-$(CONFIG_I2C_CBUS_GPIO) += i2c-cbus-gpio.o
obj-$(CONFIG_I2C_CPM) += i2c-cpm.o
Expand Down
Loading