Skip to content
Open
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
1 change: 1 addition & 0 deletions arch/riscv/boot/dts/canaan/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ dtb-$(CONFIG_ARCH_CANAAN) += k230_evb.dtb
dtb-$(CONFIG_ARCH_CANAAN) += k230_evb_nand.dtb
dtb-$(CONFIG_ARCH_CANAAN) += k230_evb_doorlock.dtb
dtb-$(CONFIG_ARCH_CANAAN) += k230_canmv.dtb
dtb-$(CONFIG_ARCH_CANAAN) += k230_canmv_01studio.dtb

obj-$(CONFIG_ARCH_CANAAN_K210_DTB_BUILTIN) += $(addsuffix .dtb.o, $(CONFIG_ARCH_CANAAN_K210_DTB_SOURCE))
43 changes: 24 additions & 19 deletions arch/riscv/boot/dts/canaan/k230.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
/dts-v1/;

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/soc/canaan,k230_pm_domains.h>
#include <dt-bindings/reset/canaan-k230-reset.h>

/ {
model = "Canaan Kendryte K230";
Expand Down Expand Up @@ -519,6 +521,7 @@
display: display-subsystem {
compatible = "canaan,display-subsystem";
ports = <&vo_out>;
power-domains = <&sysctl_power K230_PM_DOMAIN_DISP>;
status = "okay";
};

Expand All @@ -532,14 +535,26 @@

vo: vo@90840000 {
compatible = "canaan,k230-vo";
reg = <0x0 0x90840000 0x0 0x10000 >;
reg = <0x0 0x90840000 0x0 0x10000>;
interrupt-parent = <&plic>;
interrupts = <133 IRQ_TYPE_LEVEL_HIGH>;
resets = <&sysctl_reset
K230_RESET_DISP_REG_OFFSET
K230_RESET_DISP_TYPE
K230_RESET_DISP_DONE_BIT
K230_RESET_DISP_ASSERT_BIT>;
status = "okay";

background = <0xffffff>;
vth_line = <10>;

vo_out: port {
#address-cells = <1>;
#size-cells = <0>;
vop_out_dsi: endpoint@0 {
reg = <0>;
remote-endpoint = <&dsi_in_vop>;
};
};
};

Expand All @@ -550,27 +565,17 @@
#size-cells = <0>;
status = "okay";

panel@0 {
compatible = "canaan,hx8399";
reg = <0>;
panel-width-mm = <68>;
panel-height-mm = <120>;

display-timings {
timing-0 {
clock-frequency = <74437200>;
hactive = <1080>;
vactive = <1920>;
hfront-porch = <40>;
hback-porch = <20>;
hsync-len = <20>;
vfront-porch = <206>;
vback-porch = <8>;
vsync-len = <5>;
ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
dsi_in_vop: endpoint {
remote-endpoint = <&vop_out_dsi>;
};
};
};
};

};
};
90 changes: 68 additions & 22 deletions arch/riscv/boot/dts/canaan/k230_canmv.dts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "gpio_provider.dtsi" /* k230 soc gpio provider */
#include "gpio_consumer.dtsi" /* k230 soc gpio consumer */


/ {
aliases {
serial0 = &uart0;
Expand All @@ -26,6 +25,18 @@
linux,initrd-end = <0x0 0x0>;
stdout-path = "serial0:115200";
};

hdmi: connector {
compatible = "hdmi-connector";
label = "hdmi";
type = "a";

port {
hdmi_connector_in: endpoint {
remote-endpoint = <&lt9611_out>;
};
};
};
};
&ddr {
reg = <0x0 0x200000 0x0 0x1fdff000>; /*linux memory config*/
Expand Down Expand Up @@ -101,6 +112,14 @@
status = "okay";
};

&gpio42 {
status = "okay";
};

&gpio43 {
status = "okay";
};

&mmc_sd0{
status = "okay";
io_fixed_1v8;
Expand All @@ -119,29 +138,56 @@
mshc_ctrl_r = <0x00>;
};

&dsi {
status = "okay";
&uart0 {
status = "okay";
};

panel@0 {
compatible = "canaan,hx8399";
reg = <0>;

display-timings {
timing-0 {
clock-frequency = <74250000>;
hactive = <1920>;
vactive = <1080>;
hfront-porch = <88>;
hback-porch = <148>;
hsync-len = <44>;
vfront-porch = <36>;
vback-porch = <4>;
vsync-len = <5>;
};
};
};
&i2c3 {
status = "okay";
};

&uart0 {
&i2c4 {
status = "okay";

lt9611: hdmi-bridge@3b {
compatible = "lontium,lt9611";
reg = <0x3b>;
reset-gpios = <&port42 0 GPIO_ACTIVE_HIGH>;
interrupt-parent = <&gpio43>;
interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lt9611_in: endpoint {
remote-endpoint = <&dsi_out_lt9611>;
};
};

port@2 {
reg = <2>;
lt9611_out: endpoint {
remote-endpoint = <&hdmi_connector_in>;
};
};
};
};
};

&dsi {
status = "okay";

ports {
port@1 {
reg = <1>;
dsi_out_lt9611: endpoint {
remote-endpoint = <&lt9611_in>;
};
};
};
};

&vo {
vth_line = <10>;
};
162 changes: 162 additions & 0 deletions arch/riscv/boot/dts/canaan/k230_canmv_01studio.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
/* Copyright (c) 2023, Canaan Bright Sight Co., Ltd
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include "k230.dtsi"
#include "clock_provider.dtsi" /* k230 soc clock tree */
#include "clock_consumer.dtsi" /* k230 soc clock consumer */
#include "reset_provider.dtsi" /* k230 soc reset provider */
#include "reset_consumer.dtsi" /* k230 soc reset consumer */
#include "power_provider.dtsi" /* k230 soc power provider */
#include "power_consumer.dtsi" /* k230 soc power consumer */
#include "gpio_provider.dtsi" /* k230 soc gpio provider */
#include "gpio_consumer.dtsi" /* k230 soc gpio consumer */

/ {
aliases {
serial0 = &uart0;
};

chosen {
bootargs = "earlycon=sbi console=ttyS0,115200 loglevel=8 root=/dev/mmcblk1p2 rw rootwait audit=0";
linux,initrd-start = <0x0 0xa100000>;
linux,initrd-end = <0x0 0x0>;
stdout-path = "serial0:115200";
};

hdmi: connector {
compatible = "hdmi-connector";
label = "hdmi";
type = "a";

port {
hdmi_connector_in: endpoint {
remote-endpoint = <&lt9611_out>;
};
};
};
};

&ddr {
reg = <0x0 0x200000 0x0 0x3fdff000>; /* 1GB RAM (minus reserved) */
};

&spi0 {
status = "okay";
spi-flash@0 {
compatible = "jedec,spi-nor";
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
spi-max-frequency = <100000000>;
spi-tx-bus-width = <8>;
spi-rx-bus-width = <8>;
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

partition@0 {
/* spl boot */
reg = <0x0 0x00080000>;
label = "spl_boot";
};
partition@2000000 {
/* 32MB for update image*/
reg = <0 0x2000000>;
label = "all_flash";
};
};
};

};

&usbotg0 {
dr_mode = "host";
status = "okay";
};

&usbotg1 {
dr_mode = "host";
status = "okay";
};

&gpio22 {
status = "okay";
};

&gpio23 {
status = "okay";
};

&mmc_sd0{
status = "okay";
no-1-8-v;
cap-sd-highspeed;
rx_delay_line = <0x0d>;
tx_delay_line = <0xb0>;
};

&mmc_sd1{
status = "okay";
no-1-8-v;
cap-sd-highspeed;
mshc_ctrl_r = <0x00>;
};

&uart0 {
status = "okay";
};

&i2c3 {
status = "okay";

lt9611: hdmi-bridge@3b {
compatible = "lontium,lt9611";
reg = <0x3b>;
reset-gpios = <&port22 0 GPIO_ACTIVE_HIGH>;
interrupt-parent = <&gpio23>;
interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lt9611_in: endpoint {
remote-endpoint = <&dsi_out_lt9611>;
};
};

port@2 {
reg = <2>;
lt9611_out: endpoint {
remote-endpoint = <&hdmi_connector_in>;
};
};
};
};
};

&i2c4 {
status = "okay";
};

&dsi {
status = "okay";

ports {
port@1 {
reg = <1>;
dsi_out_lt9611: endpoint {
remote-endpoint = <&lt9611_in>;
};
};
};
};

&vo {
vth_line = <10>;
};
Loading