Skip to contentSkip to conversation

some devicetree changes for rk3288 boards

PATCH New Jacob Chen 3 participants 9 messages Jul 1, 2017

Subsystems (2)
lore
Share & tools
lore

Jacob Chen

author
#0 lore raw

cover some devicetree changes for rk3288 boards

Since Guillaume have send patches for mali gpu node, let's enable it in more boards.

Jacob Chen (5):
ARM: dts: rockchip: enable ARM Mali GPU on rk3288-tinker
ARM: dts: rockchip: enable ARM Mali GPU on rk3288-evb
ARM: dts: rockchip: enable ARM Mali GPU on rk3288-fennec
ARM: dts: rockchip: enable saradc for rk3288-evb
ARM: dts: rockchip: enable adc key for rk3288-evb

 arch/arm/boot/dts/rk3288-evb.dtsi   | 56 +++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/rk3288-fennec.dts |  5 ++++
 arch/arm/boot/dts/rk3288-tinker.dts |  5 ++++
 3 files changed, 66 insertions(+)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/5 ARM: dts: rockchip: enable ARM Mali GPU on rk3288-tinker

Add reference to the Mali GPU device tree node on rk3288-tinker. Tested on Tinker board.

---
 arch/arm/boot/dts/rk3288-tinker.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/rk3288-tinker.dts +5 -0
index f601c78..ba0d0bf 100644
@@ -156,6 +156,11 @@
 	status = "ok";
 };
 
+&gpu {
+	mali-supply = <&vdd_gpu>;
+	status = "okay";
+};
+
 &hdmi {
 	ddc-i2c-bus = <&i2c5>;
 	status = "okay";
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 2/5 ARM: dts: rockchip: enable ARM Mali GPU on rk3288-evb

In reply to Jacob Chen

Add reference to the Mali GPU device tree node on rk3288-evb. Tested on rk3288-evb-act8846 board.

---
 arch/arm/boot/dts/rk3288-evb.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/rk3288-evb.dtsi +5 -0
index 0dec94c..f226ca7 100644
@@ -248,6 +248,11 @@
 	status = "ok";
 };
 
+&gpu {
+	mali-supply = <&vdd_gpu>;
+	status = "okay";
+};
+
 &hdmi {
 	ddc-i2c-bus = <&i2c5>;
 	status = "okay";
Signature · 1 line
2.7.4
author
#3 lore raw

PATCH 3/5 ARM: dts: rockchip: enable ARM Mali GPU on rk3288-fennec

In reply to Jacob Chen

Add reference to the Mali GPU device tree node on rk3288-fennec Tested on Fennec board.

---
 arch/arm/boot/dts/rk3288-fennec.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/rk3288-fennec.dts +5 -0
index 61d1c10..9ece328 100644
@@ -99,6 +99,11 @@
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&vdd_gpu>;
+	status = "okay";
+};
+
 &hdmi {
 	status = "okay";
 };
Signature · 1 line
2.7.4
author
#4 lore raw

PATCH 4/5 ARM: dts: rockchip: enable saradc for rk3288-evb

In reply to Jacob Chen

saradc in rk3288-evb use 1.8v ref.

---
 arch/arm/boot/dts/rk3288-evb.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/rk3288-evb.dtsi +14 -0
index f226ca7..9cee856 100644
@@ -129,6 +129,15 @@
 		};
 	};
 
+	vccadc_ref: vccadc-ref {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc1v8_sys";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+
 	/* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
 	vcc_host: vcc-host-regulator {
 		compatible = "regulator-fixed";
@@ -218,6 +227,11 @@
 	status = "okay";
 };
 
+&saradc {
+	vref-supply = <&vccadc_ref>;
+	status = "okay";
+};
+
 &sdmmc {
 	bus-width = <4>;
 	cap-mmc-highspeed;
Signature · 1 line
2.7.4
maintainer
#5 lore raw

PATCH 4/5 ARM: dts: rockchip: enable saradc for rk3288-evb

Hi Jacob,

Am Samstag, 1. Juli 2017, 10:02:46 CEST schrieb Jacob Chen:

Quoted 13 lines

saradc in rk3288-evb use 1.8v ref.

---
 arch/arm/boot/dts/rk3288-evb.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/rk3288-evb.dtsi +0 -0
index f226ca7..9cee856 100644
@@ -129,6 +129,15 @@
 		};

arch/arm/boot/dts/rk3288-evb.dtsi line 139

Quoted 10 lines
arch/arm/boot/dts/rk3288-evb.dtsi +8 -0
 	};
 
+	vccadc_ref: vccadc-ref {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc1v8_sys";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};

this looks wrong. Regulators should always be named with the name used in schematics and also, according to the rk3288-evb schematics I have here, the saradc uses vcc_18 directly which comes from either the rk808 or act8846 pmics (depending on the board version).

arch/arm/boot/dts/rk3288-evb.dtsi line 231

Quoted 10 lines
arch/arm/boot/dts/rk3288-evb.dtsi +3 -0
+
 	/* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
 	vcc_host: vcc-host-regulator {
 		compatible = "regulator-fixed";
@@ -218,6 +227,11 @@
 	status = "okay";
 };
 
+&saradc {
+	vref-supply = <&vccadc_ref>;

So taking the above into account

	vref-supply = <&vcc_18>; ?

Heiko

Quoted 7 lines
arch/arm/boot/dts/rk3288-evb.dtsi +3 -0
+	status = "okay";
+};
+
 &sdmmc {
 	bus-width = <4>;
 	cap-mmc-highspeed;
#6 lore raw

PATCH 4/5 ARM: dts: rockchip: enable saradc for rk3288-evb

Hi heiko,

Heiko Stuebner wrote on 2017?07?01? 19:06:

Quoted 18 lines

Hi Jacob,

Am Samstag, 1. Juli 2017, 10:02:46 CEST schrieb Jacob Chen:

Quoted 15 lines

saradc in rk3288-evb use 1.8v ref.

---
  arch/arm/boot/dts/rk3288-evb.dtsi | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
arch/arm/boot/dts/rk3288-evb.dtsi +0 -0
index f226ca7..9cee856 100644
@@ -129,6 +129,15 @@
  		};
  	};
 
Quoted 13 lines

arch/arm/boot/dts/rk3288-evb.dtsi line 139

Quoted 8 lines
arch/arm/boot/dts/rk3288-evb.dtsi +8 -0
+	vccadc_ref: vccadc-ref {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc1v8_sys";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};

this looks wrong. Regulators should always be named with the name used in schematics and also, according to the rk3288-evb schematics I have here, the saradc uses vcc_18 directly which comes from either the rk808 or act8846 pmics (depending on the board version).

OK, I don't have software to check that schematics... Agree and i will send a new patch.

Quoted 25 lines

arch/arm/boot/dts/rk3288-evb.dtsi line 231

Quoted 10 lines
arch/arm/boot/dts/rk3288-evb.dtsi +3 -0
+
  	/* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
  	vcc_host: vcc-host-regulator {
  		compatible = "regulator-fixed";
@@ -218,6 +227,11 @@
  	status = "okay";
  };
 
+&saradc {
+	vref-supply = <&vccadc_ref>;

So taking the above into account

	vref-supply = <&vcc_18>; ?

Heiko

Quoted 7 lines
arch/arm/boot/dts/rk3288-evb.dtsi +3 -0
+	status = "okay";
+};
+
  &sdmmc {
  	bus-width = <4>;
  	cap-mmc-highspeed;
author
#7 lore raw

PATCH 5/5 ARM: dts: rockchip: enable adc key for rk3288-evb

In reply to Jacob Chen

rk3288-evb have many tablet-used adc buttons.

---
 arch/arm/boot/dts/rk3288-evb.dtsi | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
arch/arm/boot/dts/rk3288-evb.dtsi +37 -0
index 9cee856..835ddb8 100644
@@ -48,6 +48,43 @@
 		reg = <0x0 0x80000000>;
 	};
 
+	adc-keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 1>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <1800000>;
+
+		button-up {
+			label = "Volume Up";
+			linux,code = <KEY_VOLUMEUP>;
+			press-threshold-microvolt = <100000>;
+		};
+
+		button-down {
+			label = "Volume Down";
+			linux,code = <KEY_VOLUMEDOWN>;
+			press-threshold-microvolt = <300000>;
+		};
+
+		menu {
+			label = "Menu";
+			linux,code = <KEY_MENU>;
+			press-threshold-microvolt = <640000>;
+		};
+
+		esc {
+			label = "Esc";
+			linux,code = <KEY_ESC>;
+			press-threshold-microvolt = <1000000>;
+		};
+
+		home  {
+			label = "Home";
+			linux,code = <KEY_HOME>;
+			press-threshold-microvolt = <1300000>;
+		};
+	};
+
 	backlight: backlight {
 		compatible = "pwm-backlight";
 		brightness-levels = <
Signature · 1 line
2.7.4
maintainer
#8 lore raw

cover some devicetree changes for rk3288 boards

In reply to Jacob Chen

Am Samstag, 1. Juli 2017, 10:02:42 CEST schrieb Jacob Chen:

Quoted 8 lines

Since Guillaume have send patches for mali gpu node, let's enable it in more boards.

Jacob Chen (5):
ARM: dts: rockchip: enable ARM Mali GPU on rk3288-tinker
ARM: dts: rockchip: enable ARM Mali GPU on rk3288-evb
ARM: dts: rockchip: enable ARM Mali GPU on rk3288-fennec
ARM: dts: rockchip: enable saradc for rk3288-evb
ARM: dts: rockchip: enable adc key for rk3288-evb

applied for 4.14, with the saradc patch replaced with your v2

Heiko