summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalkerChenL <walker.chen@starfivetech.com>2022-01-05 10:24:01 +0300
committerjianlong.huang <jianlong.huang@starfivetech.com>2022-04-21 08:29:39 +0300
commit1de138b97fce81524f9797b68437800805ed531f (patch)
tree0b80e4eaec6d2b0d8eaf70773982ac5eacaeaa85
parent41c2df1ce672fe6172edbcf98df6fb9b8bae2c03 (diff)
downloadlinux-1de138b97fce81524f9797b68437800805ed531f.tar.xz
riscv: dts: starfive: Modify devicee tree for JH7100
Support WM8960 daughter board in 3 dev-boards by modifying device tree. Signed-off-by: Walker Chen <walker.chen@starfivetech.com>
-rw-r--r--arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight-a1.dts2
-rw-r--r--arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts6
-rw-r--r--arch/riscv/boot/dts/starfive/jh7100-common.dtsi54
-rw-r--r--arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts6
4 files changed, 66 insertions, 2 deletions
diff --git a/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight-a1.dts b/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight-a1.dts
index c7e6b793d763..1b77d9985136 100644
--- a/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight-a1.dts
+++ b/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight-a1.dts
@@ -23,4 +23,6 @@
starfive,keep-gpiomux = <13 14 63 0 2 3 45>;
};
+#ifdef WM8960_ENABLED
#include "codecs/sf_wm8960.dtsi"
+#endif
diff --git a/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts b/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts
index ec42effa7a0e..d895eea45f1d 100644
--- a/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts
+++ b/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts
@@ -18,5 +18,9 @@
&gpio {
/* don't reset gpio mux for serial console on uart3 */
- starfive,keep-gpiomux = <13 14>;
+ starfive,keep-gpiomux = <13 14 63 0 2 3 45>;
};
+
+#ifdef WM8960_ENABLED
+#include "codecs/sf_wm8960.dtsi"
+#endif
diff --git a/arch/riscv/boot/dts/starfive/jh7100-common.dtsi b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi
index ff3e6b746132..bf401355b17e 100644
--- a/arch/riscv/boot/dts/starfive/jh7100-common.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi
@@ -10,6 +10,8 @@
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/pinctrl-starfive.h>
+#undef WM8960_ENABLED
+
/ {
aliases {
mshc0 = &sdio0;
@@ -472,12 +474,64 @@
pinctrl-0 = <&i2c1_pins>;
status = "okay";
+#ifdef WM8960_ENABLED
wm8960: codec@1a {
compatible = "wlf,wm8960";
reg = <0x1a>;
#sound-dai-cells = <0>;
wlf,shared-lrclk;
};
+#endif
+
+ seeed_plane_i2c@45 {
+ compatible = "seeed_panel";
+ reg = <0x45>;
+ };
+
+ /* TODO: Used for EVB board, should comment here for starlight board, remove it later*/
+ ov5640: ov5640@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+ clocks = <&clk_ext_camera>;
+ clock-names = "xclk";
+ powerdown-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
+ //DOVDD-supply = <&v2v8>;
+ rotation = <180>;
+ port {
+ // Parallel bus endpoint
+ ov5640_to_parallel: endpoint {
+ remote-endpoint = <&parallel_from_ov5640>;
+ bus-type = <5>; // Parallel
+ bus-width = <8>;
+ data-shift = <2>; // lines 9:2 are used
+ hsync-active = <0>;
+ vsync-active = <1>;
+ pclk-sample = <1>;
+ };
+ };
+ };
+ sc2235@30 {
+ compatible = "sc2235";
+ reg = <0x30>;
+ clocks = <&clk_ext_camera>;
+ clock-names = "xclk";
+ powerdown-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
+ //DOVDD-supply = <&v2v8>;
+ port {
+ // Parallel bus endpoint
+ sc2235_to_parallel: endpoint {
+ remote-endpoint = <&parallel_from_sc2235>;
+ bus-type = <5>; // Parallel
+ bus-width = <8>;
+ data-shift = <2>; // lines 13:6 are used
+ hsync-active = <1>;
+ vsync-active = <1>;
+ pclk-sample = <1>;
+ };
+ };
+ };
};
&i2c2 {
diff --git a/arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts b/arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts
index 68616a1c9cf6..c760c6f3742b 100644
--- a/arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts
+++ b/arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts
@@ -20,7 +20,7 @@
&gpio {
/* don't reset gpio mux for serial console and reset gpio */
- starfive,keep-gpiomux = <13 14 63>;
+ starfive,keep-gpiomux = <13 14 63 0 2 3 45>;
};
&i2c0 {
@@ -30,3 +30,7 @@
pagesize = <16>;
};
};
+
+#ifdef WM8960_ENABLED
+#include "codecs/sf_wm8960.dtsi"
+#endif