Skip to contentSkip to conversation

rockchip: rk3228-power: sync power domain dt-binding header from Linux

PATCH Superseded Johan Jonker 2 participants 16 messages Mar 1, 2022 – Mar 12, 2022

Subsystems (5)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/12 rockchip: rk3228-power: sync power domain dt-binding header from Linux

In order to update the DT for rk3228
sync the power domain dt-binding header.
This is the state as of v5.17 in Linux.

---
 include/dt-bindings/power/rk3228-power.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 include/dt-bindings/power/rk3228-power.h
include/dt-bindings/power/rk3228-power.h new file +21 -0
new file mode 100644
index 00000000..6a8dc1bf
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __DT_BINDINGS_POWER_RK3228_POWER_H__
+#define __DT_BINDINGS_POWER_RK3228_POWER_H__
+
+/**
+ * RK3228 idle id Summary.
+ */
+
+#define RK3228_PD_CORE		0
+#define RK3228_PD_MSCH		1
+#define RK3228_PD_BUS		2
+#define RK3228_PD_SYS		3
+#define RK3228_PD_VIO		4
+#define RK3228_PD_VOP		5
+#define RK3228_PD_VPU		6
+#define RK3228_PD_RKVDEC	7
+#define RK3228_PD_GPU		8
+#define RK3228_PD_PERI		9
+#define RK3228_PD_GMAC		10
+
+#endif
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 2/12 rockchip: rk3228-cru: sync the clock dt-binding header from Linux

In order to update the DT for rk3228 sync the clock dt-binding header.
This is the state as of v5.17 in Linux.

---
 include/dt-bindings/clock/rk3228-cru.h | 54 +++++++++++++++++++++++++-
 1 file changed, 52 insertions(+), 2 deletions(-)
include/dt-bindings/clock/rk3228-cru.h +52 -2
index 1217d523..de550ea5 100644
@@ -1,6 +1,7 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
- * (C) Copyright 2017 Rockchip Electronics Co., Ltd.
+ * Copyright (c) 2015 Rockchip Electronics Co. Ltd.
+ * Author: Jeffy Chen <[email protected]>
  */
 
 #ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3228_H
@@ -39,6 +40,7 @@
 #define SCLK_EMMC_DRV		117
 #define SCLK_SDMMC_SAMPLE	118
 #define SCLK_SDIO_SAMPLE	119
+#define SCLK_SDIO_SRC		120
 #define SCLK_EMMC_SAMPLE	121
 #define SCLK_VOP		122
 #define SCLK_HDMI_HDCP		123
@@ -51,6 +53,18 @@
 #define SCLK_MAC_TX		130
 #define SCLK_MAC_PHY		131
 #define SCLK_MAC_OUT		132
+#define SCLK_VDEC_CABAC		133
+#define SCLK_VDEC_CORE		134
+#define SCLK_RGA		135
+#define SCLK_HDCP		136
+#define SCLK_HDMI_CEC		137
+#define SCLK_CRYPTO		138
+#define SCLK_TSP		139
+#define SCLK_HSADC		140
+#define SCLK_WIFI		141
+#define SCLK_OTGPHY0		142
+#define SCLK_OTGPHY1		143
+#define SCLK_HDMI_PHY		144
 
 /* dclk gates */
 #define DCLK_VOP		190
@@ -58,15 +72,32 @@
 
 /* aclk gates */
 #define ACLK_DMAC		194
+#define ACLK_CPU		195
+#define ACLK_VPU_PRE		196
+#define ACLK_RKVDEC_PRE		197
+#define ACLK_RGA_PRE		198
+#define ACLK_IEP_PRE		199
+#define ACLK_HDCP_PRE		200
+#define ACLK_VOP_PRE		201
+#define ACLK_VPU		202
+#define ACLK_RKVDEC		203
+#define ACLK_IEP		204
+#define ACLK_RGA		205
+#define ACLK_HDCP		206
 #define ACLK_PERI		210
 #define ACLK_VOP		211
 #define ACLK_GMAC		212
+#define ACLK_GPU		213
 
 /* pclk gates */
 #define PCLK_GPIO0		320
 #define PCLK_GPIO1		321
 #define PCLK_GPIO2		322
 #define PCLK_GPIO3		323
+#define PCLK_VIO_H2P		324
+#define PCLK_HDCP		325
+#define PCLK_EFUSE_1024		326
+#define PCLK_EFUSE_256		327
 #define PCLK_GRF		329
 #define PCLK_I2C0		332
 #define PCLK_I2C1		333
@@ -79,6 +110,7 @@
 #define PCLK_TSADC		344
 #define PCLK_PWM		350
 #define PCLK_TIMER		353
+#define PCLK_CPU		354
 #define PCLK_PERI		363
 #define PCLK_HDMI_CTRL		364
 #define PCLK_HDMI_PHY		365
@@ -94,6 +126,24 @@
 #define HCLK_SDMMC		456
 #define HCLK_SDIO		457
 #define HCLK_EMMC		459
+#define HCLK_CPU		460
+#define HCLK_VPU_PRE		461
+#define HCLK_RKVDEC_PRE		462
+#define HCLK_VIO_PRE		463
+#define HCLK_VPU		464
+#define HCLK_RKVDEC		465
+#define HCLK_VIO		466
+#define HCLK_RGA		467
+#define HCLK_IEP		468
+#define HCLK_VIO_H2P		469
+#define HCLK_HDCP_MMU		470
+#define HCLK_HOST0		471
+#define HCLK_HOST1		472
+#define HCLK_HOST2		473
+#define HCLK_OTG		474
+#define HCLK_TSP		475
+#define HCLK_M_CRYPTO		476
+#define HCLK_S_CRYPTO		477
 #define HCLK_PERI		478
 
 #define CLK_NR_CLKS		(HCLK_PERI + 1)
Signature · 1 line
2.20.1
#2 lore raw

PATCH v2 3/12 arm: dts: rockchip: move all rk322x u-boot specific properties in separate dtsi files

In reply to Johan Jonker

In order to sync rk322x.dtsi from Linux, move all U-boot specific properties in separate dtsi files.

---
 arch/arm/dts/rk3229-evb-u-boot.dtsi | 28 +++++++++++++++
 arch/arm/dts/rk3229-evb.dts         | 17 ---------
 arch/arm/dts/rk322x-u-boot.dtsi     | 54 +++++++++++++++++++++++++++++
 arch/arm/dts/rk322x.dtsi            | 37 --------------------
 4 files changed, 82 insertions(+), 54 deletions(-)
 create mode 100644 arch/arm/dts/rk3229-evb-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk322x-u-boot.dtsi
arch/arm/dts/rk3229-evb-u-boot.dtsi new file +28 -0
new file mode 100644
index 00000000..b65149c2
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+#include "rk322x-u-boot.dtsi"
+
+/ {
+	chosen {
+		stdout-path = &uart2;
+	};
+};
+
+&dmc {
+	rockchip,pctl-timing = <0x96 0xC8 0x1F3 0xF 0x8000004D 0x4 0x4E 0x6 0x3
+		0x0 0x6 0x5 0xC 0x10 0x6 0x4 0x4
+		0x5 0x4 0x200 0x3 0xA 0x40 0x0 0x1
+		0x5 0x5 0x3 0xC 0x1E 0x100 0x0 0x4
+		0x0 0x924>;
+	rockchip,phy-timing = <0x220 0x1 0x0 0x0 0x0 0x4 0x60>;
+	rockchip,sdram-params = <0x428B188 0x0 0x21 0x472 0x15
+		0 300 3 0 120>;
+};
+
+&emmc {
+	u-boot,dm-pre-reloc;
+};
+
+&uart2 {
+	u-boot,dm-pre-reloc;
+};
arch/arm/dts/rk3229-evb.dts +0 -17
index 632cdc9b..66a3ba23 100644
@@ -11,10 +11,6 @@
 	model = "Rockchip RK3229 Evaluation board";
 	compatible = "rockchip,rk3229-evb", "rockchip,rk3229";
 
-	chosen {
-		stdout-path = &uart2;
-	};
-
 	memory@60000000 {
 		device_type = "memory";
 		reg = <0x60000000 0x40000000>;
@@ -38,17 +34,6 @@
 	};
 };
 
-&dmc {
-	rockchip,pctl-timing = <0x96 0xC8 0x1F3 0xF 0x8000004D 0x4 0x4E 0x6 0x3
-		0x0 0x6 0x5 0xC 0x10 0x6 0x4 0x4
-		0x5 0x4 0x200 0x3 0xA 0x40 0x0 0x1
-		0x5 0x5 0x3 0xC 0x1E 0x100 0x0 0x4
-		0x0 0x924>;
-	rockchip,phy-timing = <0x220 0x1 0x0 0x0 0x0 0x4 0x60>;
-	rockchip,sdram-params = <0x428B188 0x0 0x21 0x472 0x15
-		0 300 3 0 120>;
-};
-
 &gmac {
 	assigned-clocks = <&cru SCLK_MAC_EXTCLK>, <&cru SCLK_MAC>;
 	assigned-clock-parents = <&ext_gmac>, <&cru SCLK_MAC_EXTCLK>;
@@ -66,7 +51,6 @@
 };
 
 &emmc {
-	u-boot,dm-pre-reloc;
 	status = "okay";
 };
 
@@ -82,7 +66,6 @@
 };
 
 &uart2 {
-	u-boot,dm-pre-reloc;
 	status = "okay";
 };
 
arch/arm/dts/rk322x-u-boot.dtsi new file +54 -0

54 lines not on this page · raw message

arch/arm/dts/rk322x.dtsi +0 -37
index 4a8be5da..3245da3c 100644
@@ -107,22 +107,6 @@
 		#clock-cells = <0>;
 	};
 
-	bus_intmem@10080000 {
-		compatible = "mmio-sram";
-		reg = <0x10080000 0x9000>;
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges = <0 0x10080000 0x9000>;
-		smp-sram@0 {
-			compatible = "rockchip,rk322x-smp-sram";
-			reg = <0x00 0x10>;
-		};
-		ddr_sram: ddr-sram@1000 {
-			compatible = "rockchip,rk322x-ddr-sram";
-			reg = <0x1000 0x8000>;
-		};
-	};
-
 	i2s1: i2s1@100b0000 {
 		compatible = "rockchip,rk3228-i2s", "rockchip,rk3066-i2s";
 		reg = <0x100b0000 0x4000>;
@@ -165,7 +149,6 @@
 	};
 
 	grf: syscon@11000000 {
-		u-boot,dm-pre-reloc;
 		compatible = "rockchip,rk3228-grf", "syscon";
 		reg = <0x11000000 0x1000>;
 	};
@@ -317,7 +300,6 @@
 	};
 
 	cru: clock-controller@110e0000 {
-		u-boot,dm-pre-reloc;
 		compatible = "rockchip,rk3228-cru";
 		reg = <0x110e0000 0x1000>;
 		rockchip,grf = <&grf>;
@@ -387,7 +369,6 @@
 	sdmmc: dwmmc@30000000 {
 		compatible = "rockchip,rk3228-dw-mshc", "rockchip,rk3288-dw-mshc";
 		reg = <0x30000000 0x4000>;
-		max-frequency = <150000000>;
 		interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
 			 <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
@@ -414,7 +395,6 @@
 	emmc: dwmmc@30020000 {
 		compatible = "rockchip,rk3288-dw-mshc";
 		reg = <0x30020000 0x4000>;
-		max-frequency = <150000000>;
 		interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
 			 <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
@@ -768,21 +748,4 @@
 			};
 		};
 	};
-
-	dmc: dmc@11200000 {
-		u-boot,dm-pre-reloc;
-		compatible = "rockchip,rk3228-dmc", "syscon";
-		rockchip,cru = <&cru>;
-		rockchip,grf = <&grf>;
-		rockchip,msch = <&service_msch>;
-		reg = <0x11200000 0x3fc
-		       0x12000000 0x400>;
-		rockchip,sram = <&ddr_sram>;
-	};
-
-	service_msch: syscon@31090000 {
-		u-boot,dm-pre-reloc;
-		compatible = "rockchip,rk3228-msch", "syscon";
-		reg = <0x31090000 0x2000>;
-	};
 };
Signature · 1 line
2.20.1
#3 lore raw

PATCH v2 4/12 arm: dts: rockchip: sync rk322x.dtsi from Linux

In reply to Johan Jonker

Sync rk322x.dtsi from Linux version 5.17.

---

Changed V2:
update
rename usb20_otg label

---
 arch/arm/dts/rk3229-evb.dts |   2 +-
 arch/arm/dts/rk322x.dtsi    | 846 +++++++++++++++++++++++++++++-------
 2 files changed, 695 insertions(+), 153 deletions(-)
arch/arm/dts/rk3229-evb.dts +1 -1
index 66a3ba23..d2681d1a 100644
@@ -69,6 +69,6 @@
 	status = "okay";
 };
 
-&usb20_otg {
+&usb_otg {
        status = "okay";
 };
arch/arm/dts/rk322x.dtsi +694 -152

1,207 lines not on this page · raw message

Signature · 1 line
2.20.1
#4 lore raw

PATCH v2 5/12 arm: dts: rockchip: sync rk3229-evb.dts from Linux

In reply to Johan Jonker

Sync rk3229-evb.dts from Linux version 5.17.

---
 arch/arm/dts/rk3229-evb.dts | 212 +++++++++++++++++++++++++++++++++---
 arch/arm/dts/rk3229.dtsi    |  52 +++++++++
 2 files changed, 249 insertions(+), 15 deletions(-)
 create mode 100644 arch/arm/dts/rk3229.dtsi
arch/arm/dts/rk3229-evb.dts +197 -15
index d2681d1a..797476e8 100644
@@ -1,21 +1,32 @@
-// SPDX-License-Identifier: GPL-2.0+ OR X11
-/*
- * (C) Copyright 2017 Rockchip Electronics Co., Ltd.
- */
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 
 /dts-v1/;
 
-#include "rk322x.dtsi"
+#include <dt-bindings/input/input.h>
+#include "rk3229.dtsi"
 
 / {
 	model = "Rockchip RK3229 Evaluation board";
 	compatible = "rockchip,rk3229-evb", "rockchip,rk3229";
 
+	aliases {
+		mmc0 = &emmc;
+	};
+
 	memory@60000000 {
 		device_type = "memory";
 		reg = <0x60000000 0x40000000>;
 	};
 
+	dc_12v: dc-12v-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "dc_12v";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+	};
+
 	ext_gmac: ext_gmac {
 		compatible = "fixed-clock";
 		clock-frequency = <125000000>;
@@ -23,6 +34,18 @@
 		#clock-cells = <0>;
 	};
 
+	vcc_host: vcc-host-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&host_vbus_drv>;
+		regulator-name = "vcc_host";
+		regulator-always-on;
+		regulator-boot-on;
+		vin-supply = <&vcc_sys>;
+	};
+
 	vcc_phy: vcc-phy-regulator {
 		compatible = "regulator-fixed";
 		enable-active-high;
@@ -31,7 +54,95 @@
 		regulator-max-microvolt = <1800000>;
 		regulator-always-on;
 		regulator-boot-on;
+		vin-supply = <&vccio_1v8>;
+	};
+
+	vcc_sys: vcc-sys-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_sys";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&dc_12v>;
+	};
+
+	vccio_1v8: vccio-1v8-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vccio_1v8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-always-on;
+		vin-supply = <&vcc_sys>;
+	};
+
+	vccio_3v3: vccio-3v3-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vccio_3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+		vin-supply = <&vcc_sys>;
+	};
+
+	vdd_arm: vdd-arm-regulator {
+		compatible = "pwm-regulator";
+		pwms = <&pwm1 0 25000 1>;
+		pwm-supply = <&vcc_sys>;
+		regulator-name = "vdd_arm";
+		regulator-min-microvolt = <950000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-always-on;
+		regulator-boot-on;
 	};
+
+	vdd_log: vdd-log-regulator {
+		compatible = "pwm-regulator";
+		pwms = <&pwm2 0 25000 1>;
+		pwm-supply = <&vcc_sys>;
+		regulator-name = "vdd_log";
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1300000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+		autorepeat;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pwr_key>;
+
+		power_key: power-key {
+			label = "GPIO Key Power";
+			gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_POWER>;
+			debounce-interval = <100>;
+			wakeup-source;
+		};
+	};
+};
+
+&cpu0 {
+	cpu-supply = <&vdd_arm>;
+};
+
+&cpu1 {
+	cpu-supply = <&vdd_arm>;
+};
+
+&cpu2 {
+	cpu-supply = <&vdd_arm>;
+};
+
+&cpu3 {
+	cpu-supply = <&vdd_arm>;
+};
+
+&emmc {
+	cap-mmc-highspeed;
+	non-removable;
+	status = "okay";
 };
 
 &gmac {
@@ -50,25 +161,96 @@
 	status = "okay";
 };
 
-&emmc {
+&io_domains {
 	status = "okay";
+
+	vccio1-supply = <&vccio_3v3>;
+	vccio2-supply = <&vccio_1v8>;
+	vccio4-supply = <&vccio_3v3>;
 };
 
-&sdmmc {
+&pinctrl {
+	keys {
+		pwr_key: pwr-key {
+			rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	usb {
+		host_vbus_drv: host-vbus-drv {
+			rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};
+
+&pwm1 {
+	status = "okay";
+};
+
+&pwm2 {
+	status = "okay";
+};
+
+&tsadc {
+	rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
 	status = "okay";
-	bus-width = <4>;
-	cap-mmc-highspeed;
-	cap-sd-highspeed;
-	card-detect-delay = <200>;
-	disable-wp;
-	num-slots = <1>;
-	supports-sd;
 };
 
 &uart2 {
 	status = "okay";
 };
 
+&u2phy0 {
+	status = "okay";
+
+	u2phy0_otg: otg-port {
+		status = "okay";
+	};
+
+	u2phy0_host: host-port {
+		phy-supply = <&vcc_host>;
+		status = "okay";
+	};
+};
+
+&u2phy1 {
+	status = "okay";
+
+	u2phy1_otg: otg-port {
+		phy-supply = <&vcc_host>;
+		status = "okay";
+	};
+
+	u2phy1_host: host-port {
+		phy-supply = <&vcc_host>;
+		status = "okay";
+	};
+};
+
+&usb_host0_ehci {
+	status = "okay";
+};
+
+&usb_host0_ohci {
+	status = "okay";
+};
+
+&usb_host1_ehci {
+	status = "okay";
+};
+
+&usb_host1_ohci {
+	status = "okay";
+};
+
+&usb_host2_ehci {
+	status = "okay";
+};
+
+&usb_host2_ohci {
+	status = "okay";
+};
+
 &usb_otg {
-       status = "okay";
+	status = "okay";
 };
arch/arm/dts/rk3229.dtsi new file +52 -0

52 lines not on this page · raw message

Signature · 1 line
2.20.1
#5 lore raw

PATCH v2 6/12 rockchip: rk3288-power: sync power domain dt-binding header from Linux

In reply to Johan Jonker

In order to update the DT for rk3288
sync the power domain dt-binding header. This is the state as of v5.17 in Linux. Change location to be more in line with other SoCs.

---

Changed V2:
changed include rk3288.dtsi

---
 arch/arm/dts/rk3288.dtsi                  |  2 +-
 include/dt-bindings/power-domain/rk3288.h | 11 --------
 include/dt-bindings/power/rk3288-power.h  | 32 +++++++++++++++++++++++
 3 files changed, 33 insertions(+), 12 deletions(-)
 delete mode 100644 include/dt-bindings/power-domain/rk3288.h
 create mode 100644 include/dt-bindings/power/rk3288-power.h
arch/arm/dts/rk3288.dtsi +1 -1
index 22bb06ce..2086dbfd 100644
@@ -5,7 +5,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/pinctrl/rockchip.h>
 #include <dt-bindings/clock/rk3288-cru.h>
-#include <dt-bindings/power-domain/rk3288.h>
+#include <dt-bindings/power/rk3288-power.h>
 #include <dt-bindings/thermal/thermal.h>
 #include <dt-bindings/video/rk3288.h>
 #include "skeleton.dtsi"
include/dt-bindings/power-domain/rk3288.h deleted +0 -11
deleted file mode 100644
index ca68c114..00000000
@@ -1,11 +0,0 @@
-#ifndef __DT_BINDINGS_POWER_DOMAIN_RK3288_H__
-#define __DT_BINDINGS_POWER_DOMAIN_RK3288_H__
-
-/* RK3288 power domain index */
-#define RK3288_PD_GPU          0
-#define RK3288_PD_VIO          1
-#define RK3288_PD_VIDEO        2
-#define RK3288_PD_HEVC         3
-#define RK3288_PD_PERI         4
-
-#endif
include/dt-bindings/power/rk3288-power.h new file +32 -0
new file mode 100644
index 00000000..f710b56c
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __DT_BINDINGS_POWER_RK3288_POWER_H__
+#define __DT_BINDINGS_POWER_RK3288_POWER_H__
+
+/**
+ * RK3288 Power Domain and Voltage Domain Summary.
+ */
+
+/* VD_CORE */
+#define RK3288_PD_A17_0		0
+#define RK3288_PD_A17_1		1
+#define RK3288_PD_A17_2		2
+#define RK3288_PD_A17_3		3
+#define RK3288_PD_SCU		4
+#define RK3288_PD_DEBUG		5
+#define RK3288_PD_MEM		6
+
+/* VD_LOGIC */
+#define RK3288_PD_BUS		7
+#define RK3288_PD_PERI		8
+#define RK3288_PD_VIO		9
+#define RK3288_PD_ALIVE		10
+#define RK3288_PD_HEVC		11
+#define RK3288_PD_VIDEO		12
+
+/* VD_GPU */
+#define RK3288_PD_GPU		13
+
+/* VD_PMU */
+#define RK3288_PD_PMU		14
+
+#endif
Signature · 1 line
2.20.1
#6 lore raw

PATCH v2 7/12 rockchip: rk3288-cru: sync the clock dt-binding header from Linux

In reply to Johan Jonker

In order to update the DT for rk3288
sync the clock dt-binding header.
This is the state as of v5.17 in Linux. Keep SCLK_MAC_PLL in use for rk3288 clock driver.

---
 include/dt-bindings/clock/rk3288-cru.h | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
include/dt-bindings/clock/rk3288-cru.h +12 -1
index e368d767..453f6671 100644
@@ -1,9 +1,12 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Copyright (c) 2014 MundoReader S.L.
  * Author: Heiko Stuebner <[email protected]>
  */
 
+#ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3288_H
+#define _DT_BINDINGS_CLK_ROCKCHIP_RK3288_H
+
 /* core clocks */
 #define PLL_APLL		1
 #define PLL_DPLL		2
@@ -74,6 +77,9 @@
 #define SCLK_USBPHY480M_SRC	122
 #define SCLK_PVTM_CORE		123
 #define SCLK_PVTM_GPU		124
+#define SCLK_CRYPTO		125
+#define SCLK_MIPIDSI_24M	126
+#define SCLK_VIP_OUT		127
 
 #define SCLK_MAC_PLL		150
 #define SCLK_MAC		151
@@ -153,6 +159,9 @@
 #define PCLK_DDRUPCTL1		366
 #define PCLK_PUBL1		367
 #define PCLK_WDT		368
+#define PCLK_EFUSE256		369
+#define PCLK_EFUSE1024		370
+#define PCLK_ISP_IN		371
 
 /* hclk gates */
 #define HCLK_GPS		448
@@ -368,3 +377,5 @@
 #define SRST_TSP_CLKIN0		189
 #define SRST_TSP_CLKIN1		190
 #define SRST_TSP_27M		191
+
+#endif
Signature · 1 line
2.20.1
#7 lore raw

PATCH v2 8/12 arm: dts: rockchip: move all rk3288 u-boot specific properties in separate dtsi files

In reply to Johan Jonker

In order to sync rk3288.dtsi from Linux it needed to move all u-boot specific properties in separate dtsi files.

---

Changed V2:
combine U-boot specific changes
add bus_intmem label
use current led node name

---
 arch/arm/dts/rk3288-evb-u-boot.dtsi           | 11 +++
 arch/arm/dts/rk3288-evb.dts                   | 11 ---
 arch/arm/dts/rk3288-firefly-u-boot.dtsi       | 31 ++++++++
 arch/arm/dts/rk3288-firefly.dts               | 17 ----
 arch/arm/dts/rk3288-firefly.dtsi              |  3 -
 arch/arm/dts/rk3288-miqi-u-boot.dtsi          | 20 +++++
 arch/arm/dts/rk3288-miqi.dts                  | 11 ---
 arch/arm/dts/rk3288-miqi.dtsi                 |  2 -
 arch/arm/dts/rk3288-phycore-rdk-u-boot.dtsi   | 44 +++++++++++
 arch/arm/dts/rk3288-phycore-rdk.dts           | 18 -----
 arch/arm/dts/rk3288-phycore-som.dtsi          |  6 --
 arch/arm/dts/rk3288-popmetal-u-boot.dtsi      | 11 +++
 arch/arm/dts/rk3288-popmetal.dts              | 11 ---
 arch/arm/dts/rk3288-rock2-square-u-boot.dtsi  | 30 +++++++
 arch/arm/dts/rk3288-rock2-square.dts          | 18 -----
 arch/arm/dts/rk3288-u-boot.dtsi               | 79 ++++++++++++++++---
 arch/arm/dts/rk3288-veyron-jerry-u-boot.dtsi  | 14 ++++
 arch/arm/dts/rk3288-veyron-jerry.dts          | 11 ---
 arch/arm/dts/rk3288-veyron-mickey-u-boot.dtsi | 14 ++++
 arch/arm/dts/rk3288-veyron-mickey.dts         | 11 ---
 arch/arm/dts/rk3288-veyron-minnie-u-boot.dtsi | 14 ++++
 arch/arm/dts/rk3288-veyron-minnie.dts         | 11 ---
 arch/arm/dts/rk3288-veyron-u-boot.dtsi        | 62 +++++++++++++++
 arch/arm/dts/rk3288-veyron.dtsi               | 39 ---------
 arch/arm/dts/rk3288.dtsi                      | 49 +-----------
 25 files changed, 320 insertions(+), 228 deletions(-)
 create mode 100644 arch/arm/dts/rk3288-phycore-rdk-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk3288-rock2-square-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk3288-veyron-jerry-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk3288-veyron-mickey-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk3288-veyron-minnie-u-boot.dtsi
arch/arm/dts/rk3288-evb-u-boot.dtsi +11 -0
index 8ac7840f..c8f51207 100644
@@ -5,6 +5,17 @@
 
 #include "rk3288-u-boot.dtsi"
 
+&dmc {
+	rockchip,pctl-timing = <0x215 0xc8 0x0 0x35 0x26 0x2 0x70 0x2000d
+		0x6 0x0 0x8 0x4 0x17 0x24 0xd 0x6
+		0x4 0x8 0x4 0x76 0x4 0x0 0x30 0x0
+		0x1 0x2 0x2 0x4 0x0 0x0 0xc0 0x4
+		0x8 0x1f4>;
+	rockchip,phy-timing = <0x48d7dd93 0x187008d8 0x121076
+		0x0 0xc3 0x6 0x2>;
+	rockchip,sdram-params = <0x20d266a4 0x5b6 2 533000000 6 9 0>;
+};
+
 &pinctrl {
 	u-boot,dm-pre-reloc;
 };
arch/arm/dts/rk3288-evb.dts +0 -11
index eac91a87..bb24a96c 100644
@@ -15,17 +15,6 @@
 	};
 };
 
-&dmc {
-	rockchip,pctl-timing = <0x215 0xc8 0x0 0x35 0x26 0x2 0x70 0x2000d
-		0x6 0x0 0x8 0x4 0x17 0x24 0xd 0x6
-		0x4 0x8 0x4 0x76 0x4 0x0 0x30 0x0
-		0x1 0x2 0x2 0x4 0x0 0x0 0xc0 0x4
-		0x8 0x1f4>;
-	rockchip,phy-timing = <0x48d7dd93 0x187008d8 0x121076
-		0x0 0xc3 0x6 0x2>;
-	rockchip,sdram-params = <0x20d266a4 0x5b6 2 533000000 6 9 0>;
-};
-
 &pwm1 {
 	status = "okay";
 };
arch/arm/dts/rk3288-firefly-u-boot.dtsi +31 -0
index 8b9c3831..cc84d7c4 100644
@@ -5,6 +5,37 @@
 
 #include "rk3288-u-boot.dtsi"
 
+/ {
+	config {
+		u-boot,dm-pre-reloc;
+		u-boot,boot-led = "firefly:green:power";
+	};
+
+	leds {
+		u-boot,dm-pre-reloc;
+
+		work {
+			u-boot,dm-pre-reloc;
+		};
+
+		power {
+			u-boot,dm-pre-reloc;
+		};
+	};
+};
+
+&dmc {
+	rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
+		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
+		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
+		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
+		0x5 0x0>;
+	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
+		0xa60 0x40 0x10 0x0>;
+	/* Add a dummy value to cause of-platdata think this is bytes */
+	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
+};
+
 &pinctrl {
 	u-boot,dm-pre-reloc;
 };
arch/arm/dts/rk3288-firefly.dts +0 -17
index 1cff04e7..72982efd 100644
@@ -13,23 +13,6 @@
 	chosen {
 		stdout-path = &uart2;
 	};
-
-	config {
-		u-boot,dm-pre-reloc;
-		u-boot,boot-led = "firefly:green:power";
-	};
-};
-
-&dmc {
-	rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
-		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
-		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
-		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
-		0x5 0x0>;
-	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
-		0xa60 0x40 0x10 0x0>;
-	/* Add a dummy value to cause of-platdata think this is bytes */
-	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
 };
 
 &ir {
arch/arm/dts/rk3288-firefly.dtsi +0 -3
index b7f279f7..1117d391 100644
@@ -37,11 +37,9 @@
 	};
 
 	leds {
-		u-boot,dm-pre-reloc;
 		compatible = "gpio-leds";
 
 		work {
-			u-boot,dm-pre-reloc;
 			gpios = <&gpio8 1 GPIO_ACTIVE_LOW>;
 			label = "firefly:blue:user";
 			linux,default-trigger = "rc-feedback";
@@ -50,7 +48,6 @@
 		};
 
 		power {
-			u-boot,dm-pre-reloc;
 			gpios = <&gpio8 2 GPIO_ACTIVE_LOW>;
 			label = "firefly:green:power";
 			linux,default-trigger = "default-on";
arch/arm/dts/rk3288-miqi-u-boot.dtsi +20 -0
index 4f63fc9f..2a74fdd1 100644
@@ -4,6 +4,26 @@
  */
 
 #include "rk3288-u-boot.dtsi"
+/ {
+	leds {
+		u-boot,dm-pre-reloc;
+
+		work {
+			u-boot,dm-pre-reloc;
+		};
+	};
+};
+
+&dmc {
+	rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
+		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
+		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
+		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
+		0x5 0x0>;
+	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
+		0xa60 0x40 0x10 0x0>;
+	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
+};
 
 &pinctrl {
 	u-boot,dm-pre-reloc;
arch/arm/dts/rk3288-miqi.dts +0 -11
index e47170c6..4a2f249e 100644
@@ -14,14 +14,3 @@
 		stdout-path = "serial2:115200n8";
 	};
 };
-
-&dmc {
-	rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
-		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
-		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
-		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
-		0x5 0x0>;
-	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
-		0xa60 0x40 0x10 0x0>;
-	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
-};
arch/arm/dts/rk3288-miqi.dtsi +0 -2
index 432f744b..cb80cbf2 100644
@@ -34,11 +34,9 @@
 
 
 	leds {
-		u-boot,dm-pre-reloc;
 		compatible = "gpio-leds";
 
 		work {
-			u-boot,dm-pre-reloc;
 			gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
 			label = "miqi:green:user";
 			linux,default-trigger = "default-on";
arch/arm/dts/rk3288-phycore-rdk-u-boot.dtsi new file +44 -0

44 lines not on this page · raw message

arch/arm/dts/rk3288-phycore-rdk.dts +0 -18
index cc392109..ebea8e67 100644
@@ -112,19 +112,6 @@
 	};
 };
 
-&dmc {
-	rockchip,num-channels = <2>;
-	rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
-		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
-		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
-		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
-		0x5 0x0>;
-	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
-		0xa60 0x40 0x10 0x0>;
-	rockchip,sdram-channel = /bits/ 8 <0x1 0xa 0x3 0x2 0x1 0x0 0xe 0xe>;
-	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 5 1>;
-};
-
 &gmac {
 	status = "okay";
 };
@@ -175,8 +162,6 @@
 };
 
 &pinctrl {
-	u-boot,dm-pre-reloc;
-
 	pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
 		bias-pull-up;
 		drive-strength = <12>;
@@ -246,8 +231,6 @@
 };
 
 &sdmmc {
-	u-boot,dm-pre-reloc;
-
 	bus-width = <4>;
 	cap-mmc-highspeed;
 	cap-sd-highspeed;
@@ -268,7 +251,6 @@
 };
 
 &uart2 {
-	u-boot,dm-pre-reloc;
 	status = "okay";
 };
 
arch/arm/dts/rk3288-phycore-som.dtsi +0 -6
index 02d11968..821525f7 100644
@@ -149,8 +149,6 @@
 
 &emmc {
 	status = "okay";
-	u-boot,dm-pre-reloc;
-
 	bus-width = <8>;
 	cap-mmc-highspeed;
 	disable-wp;
@@ -201,8 +199,6 @@
 
 &i2c0 {
 	status = "okay";
-	u-boot,dm-pre-reloc;
-
 	clock-frequency = <400000>;
 
 	rk818: pmic@1c {
@@ -216,7 +212,6 @@
 		rockchip,system-power-controller;
 		wakeup-source;
 		#clock-cells = <1>;
-		u-boot,dm-pre-reloc;
 
 		vcc1-supply = <&vdd_sys>;
 		vcc2-supply = <&vdd_sys>;
@@ -230,7 +225,6 @@
 		vddio-supply = <&vdd_3v3_io>;
 
 		regulators {
-			u-boot,dm-pre-reloc;
 			vdd_log: DCDC_REG1 {
 				regulator-name = "vdd_log";
 				regulator-always-on;
arch/arm/dts/rk3288-popmetal-u-boot.dtsi +11 -0
index 8ac7840f..3782253c 100644
@@ -5,6 +5,17 @@
 
 #include "rk3288-u-boot.dtsi"
 
+&dmc {
+	rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
+		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
+		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
+		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
+		0x5 0x0>;
+	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
+		0xa60 0x40 0x10 0x0>;
+	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
+};
+
 &pinctrl {
 	u-boot,dm-pre-reloc;
 };
arch/arm/dts/rk3288-popmetal.dts +0 -11
index 5c6d06f2..736dc51e 100644
@@ -15,17 +15,6 @@
 	};
 };
 
-&dmc {
-	rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
-		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
-		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
-		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
-		0x5 0x0>;
-	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
-		0xa60 0x40 0x10 0x0>;
-	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
-};
-
 &pwm1 {
 	status = "okay";
 };
arch/arm/dts/rk3288-rock2-square-u-boot.dtsi new file +30 -0
new file mode 100644
index 00000000..509f789b
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include "rk3288-u-boot.dtsi"
+
+&dmc {
+	rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
+		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
+		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
+		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
+		0x5 0x0>;
+	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
+		0xa60 0x40 0x10 0x0>;
+	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
+};
+
+&gpio7 {
+	u-boot,dm-pre-reloc;
+};
+
+&pinctrl {
+	u-boot,dm-pre-reloc;
+};
+
+&sdmmc {
+	u-boot,dm-pre-reloc;
+};
+
+&uart2 {
+	u-boot,dm-pre-reloc;
+};
arch/arm/dts/rk3288-rock2-square.dts +0 -18
index 11c580a0..41676696 100644
@@ -96,7 +96,6 @@
 };
 
 &sdmmc {
-	u-boot,dm-pre-reloc;
 	bus-width = <4>;
 	cap-mmc-highspeed;
 	cap-sd-highspeed;
@@ -139,7 +138,6 @@
 };
 
 &pinctrl {
-	u-boot,dm-pre-reloc;
 	ir {
 		ir_int: ir-int {
 			rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -171,7 +169,6 @@
 
 &uart2 {
 	status = "okay";
-	u-boot,dm-pre-reloc;
 	reg-shift = <2>;
 };
 
@@ -182,18 +179,3 @@
 &usb_host0_ehci {
 	status = "okay";
 };
-
-&dmc {
-	rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
-		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
-		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
-		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
-		0x5 0x0>;
-	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
-		0xa60 0x40 0x10 0x0>;
-	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
-};
-
-&gpio7 {
-	u-boot,dm-pre-reloc;
-};
arch/arm/dts/rk3288-u-boot.dtsi +68 -11

116 lines not on this page · raw message

arch/arm/dts/rk3288-veyron-jerry-u-boot.dtsi new file +14 -0
new file mode 100644
index 00000000..2cc6b090
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include "rk3288-veyron-u-boot.dtsi"
+
+&dmc {
+	rockchip,pctl-timing = <0x29a 0xc8 0x1f4 0x42 0x4e 0x4 0xea 0xa
+		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
+		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
+		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
+		0x5 0x0>;
+	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
+		0xa60 0x40 0x10 0x0>;
+	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
+};
arch/arm/dts/rk3288-veyron-jerry.dts +0 -11
index c251d9d5..ff7669eb 100644
@@ -66,17 +66,6 @@
 	};
 };
 
-&dmc {
-	rockchip,pctl-timing = <0x29a 0xc8 0x1f4 0x42 0x4e 0x4 0xea 0xa
-		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
-		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
-		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
-		0x5 0x0>;
-	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
-		0xa60 0x40 0x10 0x0>;
-	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
-};
-
 &gpio_keys {
 	power {
 		gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
arch/arm/dts/rk3288-veyron-mickey-u-boot.dtsi new file +14 -0
new file mode 100644
index 00000000..213a46ba
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include "rk3288-veyron-u-boot.dtsi"
+
+&dmc {
+	rockchip,pctl-timing = <0x215 0xc8 0x0 0x35 0x26 0x2 0x70 0x2000d
+		0x6 0x0 0x8 0x4 0x17 0x24 0xd 0x6
+		0x4 0x8 0x4 0x76 0x4 0x0 0x30 0x0
+		0x1 0x2 0x2 0x4 0x0 0x0 0xc0 0x4
+		0x8 0x1f4>;
+	rockchip,phy-timing = <0x48d7dd93 0x187008d8 0x121076
+		0x0 0xc3 0x6 0x2>;
+	rockchip,sdram-params = <0x20d266a4 0x5b6 2 533000000 6 9 1>;
+};
arch/arm/dts/rk3288-veyron-mickey.dts +0 -11
index e0dc3620..0521d9e0 100644
@@ -161,17 +161,6 @@
 	};
 };
 
-&dmc {
-	rockchip,pctl-timing = <0x215 0xc8 0x0 0x35 0x26 0x2 0x70 0x2000d
-		0x6 0x0 0x8 0x4 0x17 0x24 0xd 0x6
-		0x4 0x8 0x4 0x76 0x4 0x0 0x30 0x0
-		0x1 0x2 0x2 0x4 0x0 0x0 0xc0 0x4
-		0x8 0x1f4>;
-	rockchip,phy-timing = <0x48d7dd93 0x187008d8 0x121076
-		0x0 0xc3 0x6 0x2>;
-	rockchip,sdram-params = <0x20d266a4 0x5b6 2 533000000 6 9 1>;
-};
-
 &emmc {
 	/delete-property/mmc-hs200-1_8v;
 };
arch/arm/dts/rk3288-veyron-minnie-u-boot.dtsi new file +14 -0
new file mode 100644
index 00000000..8211da41
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include "rk3288-veyron-u-boot.dtsi"
+
+&dmc {
+	rockchip,pctl-timing = <0x215 0xc8 0x0 0x35 0x26 0x2 0x70 0x2000d
+		0x6 0x0 0x8 0x4 0x17 0x24 0xd 0x6
+		0x4 0x8 0x4 0x76 0x4 0x0 0x30 0x0
+		0x1 0x2 0x2 0x4 0x0 0x0 0xc0 0x4
+		0x8 0x1f4>;
+	rockchip,phy-timing = <0x48d7dd93 0x187008d8 0x121076
+		0x0 0xc3 0x6 0x1>;
+	rockchip,sdram-params = <0x20d266a4 0x5b6 6 533000000 6 13 0>;
+};
arch/arm/dts/rk3288-veyron-minnie.dts +0 -11
index 646f6ae7..b56a3f4f 100644
@@ -137,17 +137,6 @@
 	power-supply = <&backlight_regulator>;
 };
 
-&dmc {
-	rockchip,pctl-timing = <0x215 0xc8 0x0 0x35 0x26 0x2 0x70 0x2000d
-		0x6 0x0 0x8 0x4 0x17 0x24 0xd 0x6
-		0x4 0x8 0x4 0x76 0x4 0x0 0x30 0x0
-		0x1 0x2 0x2 0x4 0x0 0x0 0xc0 0x4
-		0x8 0x1f4>;
-	rockchip,phy-timing = <0x48d7dd93 0x187008d8 0x121076
-		0x0 0xc3 0x6 0x1>;
-	rockchip,sdram-params = <0x20d266a4 0x5b6 6 533000000 6 13 0>;
-};
-
 &emmc {
 	/delete-property/mmc-hs200-1_8v;
 };
arch/arm/dts/rk3288-veyron-u-boot.dtsi +62 -0

69 lines not on this page · raw message

arch/arm/dts/rk3288-veyron.dtsi +0 -39
index 8754043b..4a9c27a4 100644
@@ -16,7 +16,6 @@
 
 	chosen {
 		stdout-path = &uart2;
-		u-boot,spl-boot-order = &spi_flash;
 	};
 
 	firmware {
@@ -220,26 +219,6 @@
 	cpu0-supply = <&vdd_cpu>;
 };
 
-&dmc {
-	logic-supply = <&vdd_logic>;
-	rockchip,odt-disable-freq = <333000000>;
-	rockchip,dll-disable-freq = <333000000>;
-	rockchip,sr-enable-freq = <333000000>;
-	rockchip,pd-enable-freq = <666000000>;
-	rockchip,auto-self-refresh-cnt = <0>;
-	rockchip,auto-power-down-cnt = <64>;
-	rockchip,ddr-speed-bin = <21>;
-	rockchip,trcd = <10>;
-	rockchip,trp = <10>;
-	operating-points = <
-		/* KHz    uV */
-		200000 1050000
-		333000 1100000
-		533000 1150000
-		666000 1200000
-	>;
-};
-
 &efuse {
 	status = "okay";
 };
@@ -299,10 +278,8 @@
 
 &spi2 {
 	status = "okay";
-	u-boot,dm-pre-reloc;
 
 	spi_flash: spiflash@0 {
-		u-boot,dm-pre-reloc;
 		compatible = "spidev", "jedec,spi-nor";
 		spi-max-frequency = <20000000>; /* Reduce for Dediprog em100 pro */
 		reg = <0>;
@@ -315,7 +292,6 @@
 	clock-frequency = <400000>;
 	i2c-scl-falling-time-ns = <50>;		/* 2.5ns measured */
 	i2c-scl-rising-time-ns = <100>;		/* 45ns measured */
-	u-boot,dm-pre-reloc;
 
 	rk808: pmic@1b {
 		compatible = "rockchip,rk808";
@@ -328,7 +304,6 @@
 		rockchip,system-power-controller;
 		wakeup-source;
 		#clock-cells = <1>;
-		u-boot,dm-pre-reloc;
 
 		vcc1-supply = <&vcc33_sys>;
 		vcc2-supply = <&vcc33_sys>;
@@ -557,7 +532,6 @@
 
 &uart2 {
 	status = "okay";
-	u-boot,dm-pre-reloc;
 	reg-shift = <2>;
 };
 
@@ -601,7 +575,6 @@
 };
 
 &pinctrl {
-	u-boot,dm-pre-reloc;
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <
 		/* Common for sleep and wake, but no owners */
@@ -826,15 +799,3 @@
 	assigned-clocks = <&cru SCLK_USBPHY480M_SRC>;
 	assigned-clock-parents = <&cru SCLK_OTGPHY0>;
 };
-
-&sdmmc {
-	u-boot,dm-pre-reloc;
-};
-
-&gpio3 {
-	u-boot,dm-pre-reloc;
-};
-
-&gpio8 {
-	u-boot,dm-pre-reloc;
-};
arch/arm/dts/rk3288.dtsi +1 -48

115 lines not on this page · raw message

Signature · 1 line
2.20.1
#8 lore raw

PATCH v2 9/12 arm: dts: rockchip: sync rk3288.dtsi from Linux

In reply to Johan Jonker

Sync rk3288.dtsi from Linux version 5.17.

---

Changed V2:
rename mipi_dsi0 label
move io_domains
remove hdmi_audio veyron node
change memory@0 reg size

---
 arch/arm/dts/rk3288-evb.dtsi         |    7 +-
 arch/arm/dts/rk3288-firefly.dtsi     |    3 +-
 arch/arm/dts/rk3288-miqi.dtsi        |   30 +-
 arch/arm/dts/rk3288-phycore-som.dtsi |   32 +-
 arch/arm/dts/rk3288-popmetal.dtsi    |   32 +-
 arch/arm/dts/rk3288-rock2-som.dtsi   |    2 +-
 arch/arm/dts/rk3288-thermal.dtsi     |   87 --
 arch/arm/dts/rk3288-tinker.dtsi      |    2 +-
 arch/arm/dts/rk3288-veyron-jerry.dts |    6 -
 arch/arm/dts/rk3288-veyron.dtsi      |   35 +-
 arch/arm/dts/rk3288.dtsi             | 1479 +++++++++++++++++---------
 11 files changed, 1037 insertions(+), 678 deletions(-)
 delete mode 100644 arch/arm/dts/rk3288-thermal.dtsi
arch/arm/dts/rk3288-evb.dtsi +4 -3
index 04902c0b..21f812ab 100644
@@ -6,8 +6,9 @@
 #include "rk3288.dtsi"
 
 / {
-	memory {
-		reg = <0 0x80000000>;
+	memory@0 {
+		device_type = "memory";
+		reg = <0x0 0x0 0x0 0x80000000>;
 	};
 
 	ext_gmac: external-gmac-clock {
@@ -448,7 +449,7 @@
 	status = "okay";
 };
 
-&mipi_dsi0 {
+&mipi_dsi {
 	status = "disabled";
 	rockchip,panel = <&panel>;
 	display-timings {
arch/arm/dts/rk3288-firefly.dtsi +2 -1
index 1117d391..0924e388 100644
@@ -7,7 +7,8 @@
 
 / {
 	memory {
-		reg = <0 0x80000000>;
+		device_type = "memory";
+		reg = <0x0 0x0 0x0 0x80000000>;
 	};
 
 	ext_gmac: external-gmac-clock {
arch/arm/dts/rk3288-miqi.dtsi +14 -16
index cb80cbf2..15797f7d 100644
@@ -8,7 +8,7 @@
 / {
 	memory {
 		device_type = "memory";
-		reg = <0 0x80000000>;
+		reg = <0x0 0x0 0x0 0x80000000>;
 	};
 
 	ext_gmac: external-gmac-clock {
@@ -18,21 +18,6 @@
 		clock-output-names = "ext_gmac";
 	};
 
-	io_domains: io-domains {
-		compatible = "rockchip,rk3288-io-voltage-domain";
-		rockchip,grf = <&grf>;
-
-		audio-supply = <&vcca_33>;
-		flash0-supply = <&vcc_flash>;
-		flash1-supply = <&vcc_lan>;
-		gpio30-supply = <&vcc_io>;
-		gpio1830-supply = <&vcc_io>;
-		lcdc-supply = <&vcc_io>;
-		sdcard-supply = <&vccio_sd>;
-		wifi-supply = <&vcc_18>;
-	};
-
-
 	leds {
 		compatible = "gpio-leds";
 
@@ -277,6 +262,19 @@
 	status = "okay";
 };
 
+&io_domains {
+	status = "okay";
+
+	audio-supply = <&vcca_33>;
+	flash0-supply = <&vcc_flash>;
+	flash1-supply = <&vcc_lan>;
+	gpio30-supply = <&vcc_io>;
+	gpio1830-supply = <&vcc_io>;
+	lcdc-supply = <&vcc_io>;
+	sdcard-supply = <&vccio_sd>;
+	wifi-supply = <&vcc_18>;
+};
+
 &pinctrl {
 	pcfg_output_high: pcfg-output-high {
 		output-high;
arch/arm/dts/rk3288-phycore-som.dtsi +15 -17
index 821525f7..7ecc06f9 100644
@@ -55,7 +55,7 @@
 	 */
 	memory {
 		device_type = "memory";
-		reg = <0 0x8000000>;
+		reg = <0x0 0x0 0x0 0x80000000>;
 	};
 
 	aliases {
@@ -71,22 +71,6 @@
 		clock-output-names = "ext_gmac";
 	};
 
-	io_domains: io_domains {
-		compatible = "rockchip,rk3288-io-voltage-domain";
-
-		status = "okay";
-		sdcard-supply = <&vdd_io_sd>;
-		flash0-supply = <&vdd_emmc_io>;
-		flash1-supply = <&vdd_misc_1v8>;
-		gpio1830-supply = <&vdd_3v3_io>;
-		gpio30-supply = <&vdd_3v3_io>;
-		bb-supply = <&vdd_3v3_io>;
-		dvp-supply = <&vdd_3v3_io>;
-		lcdc-supply = <&vdd_3v3_io>;
-		wifi-supply = <&vdd_3v3_io>;
-		audio-supply = <&vdd_3v3_io>;
-	};
-
 	leds: user-leds {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
@@ -197,6 +181,20 @@
 	ddc-i2c-bus = <&i2c5>;
 };
 
+&io_domains {
+	status = "okay";
+	sdcard-supply = <&vdd_io_sd>;
+	flash0-supply = <&vdd_emmc_io>;
+	flash1-supply = <&vdd_misc_1v8>;
+	gpio1830-supply = <&vdd_3v3_io>;
+	gpio30-supply = <&vdd_3v3_io>;
+	bb-supply = <&vdd_3v3_io>;
+	dvp-supply = <&vdd_3v3_io>;
+	lcdc-supply = <&vdd_3v3_io>;
+	wifi-supply = <&vdd_3v3_io>;
+	audio-supply = <&vdd_3v3_io>;
+};
+
 &i2c0 {
 	status = "okay";
 	clock-frequency = <400000>;
arch/arm/dts/rk3288-popmetal.dtsi +15 -17
index 63785eb5..24151bd2 100644
@@ -42,8 +42,8 @@
 
 / {
 	memory{
+		reg = <0x0 0x0 0x0 0x80000000>;
 		device_type = "memory";
-		reg = <0 0x80000000>;
 	};
 
 	ext_gmac: external-gmac-clock {
@@ -69,22 +69,6 @@
 		};
 	};
 
-	io_domains: io-domains {
-		compatible = "rockchip,rk3288-io-voltage-domain";
-		rockchip,grf = <&grf>;
-
-		audio-supply = <&vcca_33>;
-		bb-supply = <&vcc_io>;
-		dvp-supply = <&vcc18_dvp>;
-		flash0-supply = <&vcc_flash>;
-		flash1-supply = <&vcc_lan>;
-		gpio30-supply = <&vcc_io>;
-		gpio1830-supply = <&vcc_io>;
-		lcdc-supply = <&vcc_io>;
-		sdcard-supply = <&vccio_sd>;
-		wifi-supply = <&vccio_wl>;
-	};
-
 	ir: ir-receiver {
 		compatible = "gpio-ir-receiver";
 		gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
@@ -441,6 +425,20 @@
 	status = "okay";
 };
 
+&io_domains {
+	status = "okay";
+	audio-supply = <&vcca_33>;
+	bb-supply = <&vcc_io>;
+	dvp-supply = <&vcc18_dvp>;
+	flash0-supply = <&vcc_flash>;
+	flash1-supply = <&vcc_lan>;
+	gpio30-supply = <&vcc_io>;
+	gpio1830-supply = <&vcc_io>;
+	lcdc-supply = <&vcc_io>;
+	sdcard-supply = <&vccio_sd>;
+	wifi-supply = <&vccio_wl>;
+};
+
 &pinctrl {
 	ak8963 {
 		comp_int: comp-int {
arch/arm/dts/rk3288-rock2-som.dtsi +1 -1
index 1ece66f3..aa34cd02 100644
@@ -43,8 +43,8 @@
 
 / {
 	memory {
-		reg = <0x0 0x80000000>;
 		device_type = "memory";
+		reg = <0x0 0x0 0x0 0x80000000>;
 	};
 
 	emmc_pwrseq: emmc-pwrseq {
arch/arm/dts/rk3288-thermal.dtsi deleted +0 -87

87 lines not on this page · raw message

arch/arm/dts/rk3288-tinker.dtsi +1 -1
index 2f816af4..99de2a9f 100644
@@ -42,8 +42,8 @@
 
 / {
 	memory {
+		reg = <0x0 0x0 0x0 0x80000000>;
 		device_type = "memory";
-		reg = <0x0 0x80000000>;
 	};
 
 	ext_gmac: external-gmac-clock {
arch/arm/dts/rk3288-veyron-jerry.dts +0 -6
index ff7669eb..40fee55c 100644
@@ -137,12 +137,6 @@
 		};
 	};
 
-	edp {
-		edp_hpd: edp_hpd {
-			rockchip,pins = <7 11 RK_FUNC_2 &pcfg_pull_down>;
-		};
-	};
-
 	emmc {
 		/* Make sure eMMC is not in reset */
 		emmc_deassert_reset: emmc-deassert-reset {
arch/arm/dts/rk3288-veyron.dtsi +15 -20
index 4a9c27a4..d7145cd1 100644
@@ -11,7 +11,7 @@
 
 / {
 	memory {
-		reg = <0x0 0x80000000>;
+		reg = <0x0 0x0 0x0 0x80000000>;
 	};
 
 	chosen {
@@ -198,21 +198,6 @@
 		/* Faux input supply.  See bt_regulator description. */
 		vin-supply = <&bt_regulator>;
 	};
-
-	io-domains {
-		compatible = "rockchip,rk3288-io-voltage-domain";
-		rockchip,grf = <&grf>;
-
-		audio-supply = <&vcc18_codec>;
-		bb-supply = <&vcc33_io>;
-		dvp-supply = <&vcc_18>;
-		flash0-supply = <&vcc18_flashio>;
-		gpio1830-supply = <&vcc33_io>;
-		gpio30-supply = <&vcc33_io>;
-		lcdc-supply = <&vcc33_lcd>;
-		sdcard-supply = <&vccio_sd>;
-		wifi-supply = <&vcc18_wl>;
-	};
 };
 
 &cpu0 {
@@ -503,6 +488,20 @@
 	clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>, <&cru SCLK_I2S0_OUT>;
 };
 
+&io_domains {
+	status = "okay";
+
+	audio-supply = <&vcc18_codec>;
+	bb-supply = <&vcc33_io>;
+	dvp-supply = <&vcc_18>;
+	flash0-supply = <&vcc18_flashio>;
+	gpio1830-supply = <&vcc33_io>;
+	gpio30-supply = <&vcc33_io>;
+	lcdc-supply = <&vcc33_lcd>;
+	sdcard-supply = <&vccio_sd>;
+	wifi-supply = <&vcc18_wl>;
+};
+
 &wdt {
 	status = "okay";
 };
@@ -560,10 +559,6 @@
 	status = "okay";
 };
 
-&hdmi_audio {
-	status = "okay";
-};
-
 &gpu {
 	status = "okay";
 };
arch/arm/dts/rk3288.dtsi +970 -509

2,346 lines not on this page · raw message

Signature · 1 line
2.20.1
#9 lore raw

PATCH v2 10/12 arm: dts: rockchip: sync rk3288 DT boards from Linux

In reply to Johan Jonker

Sync rk3288 DT boards that have support both in
Linux 5.17 as in U-boot.

---

Changed V2:
update
change led labels

---
 arch/arm/dts/rk3288-firefly-u-boot.dtsi |   4 +-
 arch/arm/dts/rk3288-firefly.dts         |  17 +-
 arch/arm/dts/rk3288-firefly.dtsi        | 160 +++++--
 arch/arm/dts/rk3288-miqi-u-boot.dtsi    |   2 +-
 arch/arm/dts/rk3288-miqi.dts            | 431 ++++++++++++++++++-
 arch/arm/dts/rk3288-miqi.dtsi           | 418 ------------------
 arch/arm/dts/rk3288-phycore-rdk.dts     | 109 +++--
 arch/arm/dts/rk3288-phycore-som.dtsi    | 111 +----
 arch/arm/dts/rk3288-popmetal.dts        | 505 +++++++++++++++++++++-
 arch/arm/dts/rk3288-popmetal.dtsi       | 545 ------------------------
 arch/arm/dts/rk3288-rock2-som.dtsi      |  93 ++--
 arch/arm/dts/rk3288-rock2-square.dts    | 215 +++++++---
 arch/arm/dts/rk3288-tinker-s.dts        |   9 +-
 arch/arm/dts/rk3288-tinker.dts          |  30 +-
 arch/arm/dts/rk3288-tinker.dtsi         | 405 +++++++++---------
 15 files changed, 1554 insertions(+), 1500 deletions(-)
 delete mode 100644 arch/arm/dts/rk3288-miqi.dtsi
 delete mode 100644 arch/arm/dts/rk3288-popmetal.dtsi
arch/arm/dts/rk3288-firefly-u-boot.dtsi +2 -2
index cc84d7c4..c43d3281 100644
@@ -14,11 +14,11 @@
 	leds {
 		u-boot,dm-pre-reloc;
 
-		work {
+		work_led: led-0 {
 			u-boot,dm-pre-reloc;
 		};
 
-		power {
+		power_led: led-1 {
 			u-boot,dm-pre-reloc;
 		};
 	};
arch/arm/dts/rk3288-firefly.dts +4 -13
index 72982efd..313459da 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR X11
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2014, 2015 FUKAUMI Naoki <[email protected]>
  */
@@ -9,31 +9,22 @@
 / {
 	model = "Firefly-RK3288";
 	compatible = "firefly,firefly-rk3288", "rockchip,rk3288";
-
-	chosen {
-		stdout-path = &uart2;
-	};
 };
 
 &ir {
-	gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
+	gpios = <&gpio7 RK_PA0 GPIO_ACTIVE_LOW>;
 };
 
 &pinctrl {
 	act8846 {
 		pmic_vsel: pmic-vsel {
-			rockchip,pins = <7 14 RK_FUNC_GPIO &pcfg_output_low>;
+			rockchip,pins = <7 RK_PB6 RK_FUNC_GPIO &pcfg_output_low>;
 		};
 	};
 
 	ir {
 		ir_int: ir-int {
-			rockchip,pins = <7 0 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-	};
-	usb_host {
-		host_vbus_drv: host-vbus-drv {
-			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
+			rockchip,pins = <7 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
 	};
 };
arch/arm/dts/rk3288-firefly.dtsi +121 -39

352 lines not on this page · raw message

arch/arm/dts/rk3288-miqi-u-boot.dtsi +1 -1
index 2a74fdd1..f2611aaa 100644
@@ -8,7 +8,7 @@
 	leds {
 		u-boot,dm-pre-reloc;
 
-		work {
+		work_led: led-0 {
 			u-boot,dm-pre-reloc;
 		};
 	};
arch/arm/dts/rk3288-miqi.dts +428 -3

442 lines not on this page · raw message

arch/arm/dts/rk3288-miqi.dtsi deleted +0 -418

418 lines not on this page · raw message

arch/arm/dts/rk3288-phycore-rdk.dts +51 -58

186 lines not on this page · raw message

arch/arm/dts/rk3288-phycore-som.dtsi +22 -89

202 lines not on this page · raw message

arch/arm/dts/rk3288-popmetal.dts +499 -6

519 lines not on this page · raw message

arch/arm/dts/rk3288-popmetal.dtsi deleted +0 -545

545 lines not on this page · raw message

arch/arm/dts/rk3288-rock2-som.dtsi +44 -49

162 lines not on this page · raw message

arch/arm/dts/rk3288-rock2-square.dts +161 -54

114 lines not on this page · raw message

arch/arm/dts/rk3288-tinker-s.dts +5 -4
index cc7ac5f8..970e1385 100644

Lines of this file are not shown. View the raw message.

arch/arm/dts/rk3288-tinker.dts +5 -25
index 8b1848c3..1e43527a 100644

Lines of this file are not shown. View the raw message.

arch/arm/dts/rk3288-tinker.dtsi +211 -194

405 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.20.1

Part of the diff is not shown here. View the raw message.

#10 lore raw

PATCH v2 11/12 arm: dts: rockchip: sync rk3288-veyron DT from Linux

In reply to Johan Jonker

Sync rk3288-veyron DT from Linux version 5.17.

---

Changed V2:
update
add label spi_flash veyron

---
 arch/arm/dts/rk3288-veyron-analog-audio.dtsi  |  99 +++
 .../dts/rk3288-veyron-broadcom-bluetooth.dtsi |  22 +
 arch/arm/dts/rk3288-veyron-chromebook.dtsi    | 115 ++--
 arch/arm/dts/rk3288-veyron-edp.dtsi           | 141 ++++
 arch/arm/dts/rk3288-veyron-jerry.dts          | 506 +++++++++++---
 arch/arm/dts/rk3288-veyron-mickey.dts         | 343 +++++++---
 arch/arm/dts/rk3288-veyron-minnie.dts         | 441 +++++++-----
 arch/arm/dts/rk3288-veyron-sdmmc.dtsi         |  89 +++
 arch/arm/dts/rk3288-veyron-speedy.dts         | 303 ++++++--
 arch/arm/dts/rk3288-veyron.dtsi               | 645 ++++++------------
 10 files changed, 1799 insertions(+), 905 deletions(-)
 create mode 100644 arch/arm/dts/rk3288-veyron-analog-audio.dtsi
 create mode 100644 arch/arm/dts/rk3288-veyron-broadcom-bluetooth.dtsi
 create mode 100644 arch/arm/dts/rk3288-veyron-edp.dtsi
 create mode 100644 arch/arm/dts/rk3288-veyron-sdmmc.dtsi
arch/arm/dts/rk3288-veyron-analog-audio.dtsi new file +99 -0
new file mode 100644
index 00000000..51208d16
@@ -0,0 +1,99 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Google Veyron (and derivatives) fragment for the  max98090 audio
+ * codec and analog headphone jack.
+ *
+ * Copyright 2016 Google, Inc
+ */
+
+/ {
+	sound {
+		compatible = "rockchip,rockchip-audio-max98090";
+		pinctrl-names = "default";
+		pinctrl-0 = <&mic_det>, <&hp_det>;
+		rockchip,model = "VEYRON-I2S";
+		rockchip,i2s-controller = <&i2s>;
+		rockchip,audio-codec = <&max98090>;
+		rockchip,hp-det-gpios = <&gpio6 RK_PA5 GPIO_ACTIVE_HIGH>;
+		rockchip,mic-det-gpios = <&gpio6 RK_PB3 GPIO_ACTIVE_LOW>;
+		rockchip,headset-codec = <&headsetcodec>;
+		rockchip,hdmi-codec = <&hdmi>;
+	};
+};
+
+&i2c2 {
+	max98090: max98090@10 {
+		compatible = "maxim,max98090";
+		reg = <0x10>;
+		interrupt-parent = <&gpio6>;
+		interrupts = <RK_PA7 IRQ_TYPE_EDGE_FALLING>;
+		clock-names = "mclk";
+		clocks = <&cru SCLK_I2S0_OUT>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&int_codec>;
+	};
+};
+
+&i2c4 {
+	headsetcodec: ts3a227e@3b {
+		compatible = "ti,ts3a227e";
+		reg = <0x3b>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ts3a227e_int_l>;
+		ti,micbias = <7>;		/* MICBIAS = 2.8V */
+	};
+};
+
+&i2s {
+	status = "okay";
+};
+
+&io_domains {
+	audio-supply = <&vcc18_codec>;
+};
+
+&rk808 {
+	vcc10-supply = <&vcc33_sys>;
+
+	regulators {
+		vcc18_codec: LDO_REG6 {
+			regulator-name = "vcc18_codec";
+			regulator-always-on;
+			regulator-boot-on;
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-state-mem {
+				regulator-off-in-suspend;
+			};
+		};
+	};
+};
+
+&pinctrl {
+	codec {
+		hp_det: hp-det {
+			rockchip,pins = <6 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+
+		/*
+		 * HACK: We're going to _pull down_ this _active low_ interrupt
+		 * so that it never fires.  We don't need this interrupt because
+		 * we've got a ts3a227e chip but the driver requires it.
+		 */
+		int_codec: int-codec {
+			rockchip,pins = <6 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+
+		mic_det: mic-det {
+			rockchip,pins = <6 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	headset {
+		ts3a227e_int_l: ts3a227e-int-l {
+			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+};
arch/arm/dts/rk3288-veyron-broadcom-bluetooth.dtsi new file +22 -0
new file mode 100644
index 00000000..a10d25ac
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Google Veyron (and derivatives) fragment for the Broadcom 43450 bluetooth
+ * chip.
+ *
+ * Copyright 2019 Google, Inc
+ */
+
+&uart0 {
+	bluetooth {
+		pinctrl-names = "default";
+		pinctrl-0 = <&bt_host_wake_l>, <&bt_enable_l>,
+			    <&bt_dev_wake>;
+
+		compatible = "brcm,bcm43540-bt";
+		host-wakeup-gpios	= <&gpio4 RK_PD7 GPIO_ACTIVE_HIGH>;
+		shutdown-gpios		= <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>;
+		device-wakeup-gpios	= <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
+		max-speed		= <3000000>;
+		brcm,bt-pcm-int-params	= [01 02 00 01 01];
+	};
+};
arch/arm/dts/rk3288-veyron-chromebook.dtsi +47 -68

220 lines not on this page · raw message

arch/arm/dts/rk3288-veyron-edp.dtsi new file +141 -0

141 lines not on this page · raw message

arch/arm/dts/rk3288-veyron-jerry.dts +396 -110

590 lines not on this page · raw message

arch/arm/dts/rk3288-veyron-mickey.dts +265 -78

425 lines not on this page · raw message

arch/arm/dts/rk3288-veyron-minnie.dts +277 -164

541 lines not on this page · raw message

arch/arm/dts/rk3288-veyron-sdmmc.dtsi new file +89 -0

89 lines not on this page · raw message

arch/arm/dts/rk3288-veyron-speedy.dts +242 -61

357 lines not on this page · raw message

arch/arm/dts/rk3288-veyron.dtsi +221 -424

516 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.20.1

Part of the diff is not shown here. View the raw message.

#11 lore raw

PATCH v2 12/12 rockchip: fix boot_devices constants

In reply to Johan Jonker

The DT node name pattern in mmc-controller.yaml for mmc is "^mmc(@.*)?$". The Rockchip mmc nodes have been synced with Linux, so update the boot_devices constants as well.

---
 arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
 arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
 arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
 arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
 arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
arch/arm/mach-rockchip/rk3188/rk3188.c +2 -2
index 5a02914e..df8fa156 100644
@@ -21,8 +21,8 @@
 #define GRF_BASE	0x20008000
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-	[BROM_BOOTSOURCE_EMMC] = "/dwmmc@1021c000",
-	[BROM_BOOTSOURCE_SD] = "/dwmmc@10214000",
+	[BROM_BOOTSOURCE_EMMC] = "/mmc@1021c000",
+	[BROM_BOOTSOURCE_SD] = "/mmc@10214000",
 };
 
 #ifdef CONFIG_DEBUG_UART_BOARD_INIT
arch/arm/mach-rockchip/rk322x/rk322x.c +2 -2
index ad4ac62e..a304795f 100644
@@ -9,8 +9,8 @@
 #include <asm/arch-rockchip/hardware.h>
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-	[BROM_BOOTSOURCE_EMMC] = "/dwmmc@30020000",
-	[BROM_BOOTSOURCE_SD] = "/dwmmc@30000000",
+	[BROM_BOOTSOURCE_EMMC] = "/mmc@30020000",
+	[BROM_BOOTSOURCE_SD] = "/mmc@30000000",
 };
 
 #ifdef CONFIG_DEBUG_UART_BOARD_INIT
arch/arm/mach-rockchip/rk3288/rk3288.c +2 -2
index bc20bc5a..3ad28875 100644
@@ -28,8 +28,8 @@ DECLARE_GLOBAL_DATA_PTR;
 #define GRF_BASE	0xff770000
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-	[BROM_BOOTSOURCE_EMMC] = "/dwmmc@ff0f0000",
-	[BROM_BOOTSOURCE_SD] = "/dwmmc@ff0c0000",
+	[BROM_BOOTSOURCE_EMMC] = "/mmc@ff0f0000",
+	[BROM_BOOTSOURCE_SD] = "/mmc@ff0c0000",
 };
 
 #ifdef CONFIG_SPL_BUILD
arch/arm/mach-rockchip/rk3328/rk3328.c +2 -2
index ec3336cb..de17b886 100644
@@ -21,8 +21,8 @@ DECLARE_GLOBAL_DATA_PTR;
 #define FW_DDR_CON_REG		0xFF7C0040
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-	[BROM_BOOTSOURCE_EMMC] = "/rksdmmc@ff520000",
-	[BROM_BOOTSOURCE_SD] = "/rksdmmc@ff500000",
+	[BROM_BOOTSOURCE_EMMC] = "/mmc@ff520000",
+	[BROM_BOOTSOURCE_SD] = "/mmc@ff500000",
 };
 
 static struct mm_region rk3328_mem_map[] = {
arch/arm/mach-rockchip/rk3368/rk3368.c +2 -2
index 9b7132d4..d0a6107e 100644
@@ -58,8 +58,8 @@ static struct mm_region rk3368_mem_map[] = {
 struct mm_region *mem_map = rk3368_mem_map;
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-	[BROM_BOOTSOURCE_EMMC] = "/dwmmc@ff0f0000",
-	[BROM_BOOTSOURCE_SD] = "/dwmmc@ff0c0000",
+	[BROM_BOOTSOURCE_EMMC] = "/mmc@ff0f0000",
+	[BROM_BOOTSOURCE_SD] = "/mmc@ff0c0000",
 };
 
 #ifdef CONFIG_ARCH_EARLY_INIT_R
Signature · 1 line
2.20.1
#12 lore raw

Re: [PATCH v2 12/12] rockchip: fix boot_devices constants

Hi Johan,

Quoted 7 lines · Johan Jonker

The DT node name pattern in mmc-controller.yaml for mmc is "^mmc(@.*)?$". The Rockchip mmc nodes have been synced with Linux, so update the boot_devices constants as well.

Quoted 7 lines
---
 arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
 arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
 arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
 arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
 arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

I tested this series on snow and it seems fine.

I tried it on jerry and got:

DRAM init failed: -19

It also seemed fine on bob although my display is not coming up, for different reasons.

Regards

Simon

#13 lore raw

Re: [PATCH v2 12/12] rockchip: fix boot_devices constants

Hi Simon,

Thank you for your test report.
As I don't always have the hardware, could the board maintainers help me identify u-boot specific property differences with Linux that need to be moved to a dtsi file.

Will send a new serie with fixes.

Johan

===

After I sync rk3288.dtsi I get this warning.
fdt64_t is generated by a script and is not something that I can update the regmap_init_mem_plat function for.
Any advice here?

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make chromebook_jerry_defconfig

CC spl/drivers/ram/rockchip/sdram_rk3288.o
drivers/ram/rockchip/sdram_rk3288.c: In function ‘conv_of_plat’:
drivers/ram/rockchip/sdram_rk3288.c:1032:41: warning: passing argument 2 of ‘regmap_init_mem_plat’ from incompatible pointer type [-Wincompatible-pointer-types]
ret = regmap_init_mem_plat(dev, of_plat->reg,

                                  ~~~~~~~^~~~~

In file included from drivers/ram/rockchip/sdram_rk3288.c:18:
include/regmap.h:391:58: note: expected ‘fdt_val_t *’ {aka ‘unsigned int *’} but argument is of type ‘fdt64_t *’ {aka ‘long long unsigned int *’}
int regmap_init_mem_plat(struct udevice *dev, fdt_val_t *reg, int count,

Quoted 19 lines · Simon Glass

Hi Johan,

Quoted 7 lines · Johan Jonker

The DT node name pattern in mmc-controller.yaml for mmc is "^mmc(@.*)?$". The Rockchip mmc nodes have been synced with Linux, so update the boot_devices constants as well.

Quoted 7 lines
---
 arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
 arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
 arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
 arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
 arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
Quoted 5 lines

I tested this series on snow and it seems fine.

I tried it on jerry and got:

DRAM init failed: -19

	noc: syscon@ffac0000 {
		compatible = "rockchip,rk3288-noc", "syscon";
		reg = <0x0 0xffac0000 0x0 0x2000>;

Forgot something. Does that help or is there more that needs to be fixed?

==> u-boot,dm-pre-reloc;

	};

TODO: Must change/update dmc/noc reg size when I sync rk3288.dtsi.

Quoted 3 lines

It also seemed fine on bob although my display is not coming up, for different reasons.

In SPL or full U-boot?

rk3288-veyron-chromebook.dtsi:

	aliases {
		i2c20 = &i2c_tunnel;
		video0 = &vopl;
		video1 = &vopb;
	};

Is this video alias something U-boot specific? Fixing U-boot video is beyond my U-boot knowledge.

Quoted 4 lines

Regards

Simon

#14 lore raw

Re: [PATCH v2 12/12] rockchip: fix boot_devices constants

Quoted 9 lines · Johan Jonker

Hi Simon,

Thank you for your test report.
As I don't always have the hardware, could the board maintainers help me identify u-boot specific property differences with Linux that need to be moved to a dtsi file.

Will send a new serie with fixes.

Quoted 8 lines

Johan

===

After I sync rk3288.dtsi I get this warning.
fdt64_t is generated by a script and is not something that I can update the regmap_init_mem_plat function for.
Any advice here?

A possible solution with:

config ROCKCHIP_RK3288
select PHYS_64BIT

Adding PHYS_64BIT leads to other warning like this:

drivers/video/rockchip/rk_vop.c: In function ‘rk_vop_probe’:
drivers/video/rockchip/rk_vop.c:449:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
priv->regs = (struct rk3288_vop *)dev_read_addr(dev);

Conclusion: a direct rk3288.dtsi sync from Linux with 64bit gives too much work to drivers or DT reg changes.

Will look at a partial upgrade without reg size change.

Johan

Quoted 75 lines

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make chromebook_jerry_defconfig

CC spl/drivers/ram/rockchip/sdram_rk3288.o
drivers/ram/rockchip/sdram_rk3288.c: In function ‘conv_of_plat’:
drivers/ram/rockchip/sdram_rk3288.c:1032:41: warning: passing argument 2 of ‘regmap_init_mem_plat’ from incompatible pointer type [-Wincompatible-pointer-types]
ret = regmap_init_mem_plat(dev, of_plat->reg,

                                  ~~~~~~~^~~~~

In file included from drivers/ram/rockchip/sdram_rk3288.c:18:
include/regmap.h:391:58: note: expected ‘fdt_val_t *’ {aka ‘unsigned int *’} but argument is of type ‘fdt64_t *’ {aka ‘long long unsigned int *’}
int regmap_init_mem_plat(struct udevice *dev, fdt_val_t *reg, int count,

Quoted 19 lines · Simon Glass

Hi Johan,

Quoted 7 lines · Johan Jonker

The DT node name pattern in mmc-controller.yaml for mmc is "^mmc(@.*)?$". The Rockchip mmc nodes have been synced with Linux, so update the boot_devices constants as well.

Quoted 7 lines
---
 arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
 arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
 arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
 arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
 arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
Quoted 5 lines

I tested this series on snow and it seems fine.

I tried it on jerry and got:

DRAM init failed: -19

	noc: syscon@ffac0000 {
		compatible = "rockchip,rk3288-noc", "syscon";
		reg = <0x0 0xffac0000 0x0 0x2000>;

Forgot something. Does that help or is there more that needs to be fixed?

==> u-boot,dm-pre-reloc;

	};

TODO: Must change/update dmc/noc reg size when I sync rk3288.dtsi.

Quoted 3 lines

It also seemed fine on bob although my display is not coming up, for different reasons.

In SPL or full U-boot?

rk3288-veyron-chromebook.dtsi:

	aliases {
		i2c20 = &i2c_tunnel;
		video0 = &vopl;
		video1 = &vopb;
	};

Is this video alias something U-boot specific? Fixing U-boot video is beyond my U-boot knowledge.

Quoted 4 lines

Regards

Simon

#15 lore raw

Re: [PATCH v2 12/12] rockchip: fix boot_devices constants

In reply to Johan Jonker

Hi Johan,

Quoted 60 lines · Johan Jonker

Hi Simon,

Thank you for your test report.
As I don't always have the hardware, could the board maintainers help me identify u-boot specific property differences with Linux that need to be moved to a dtsi file.

Will send a new serie with fixes.

Johan

===

After I sync rk3288.dtsi I get this warning.
fdt64_t is generated by a script and is not something that I can update the regmap_init_mem_plat function for.
Any advice here?

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make chromebook_jerry_defconfig

CC spl/drivers/ram/rockchip/sdram_rk3288.o
drivers/ram/rockchip/sdram_rk3288.c: In function ‘conv_of_plat’:
drivers/ram/rockchip/sdram_rk3288.c:1032:41: warning: passing argument 2 of ‘regmap_init_mem_plat’ from incompatible pointer type [-Wincompatible-pointer-types]
ret = regmap_init_mem_plat(dev, of_plat->reg,

                                  ~~~~~~~^~~~~

In file included from drivers/ram/rockchip/sdram_rk3288.c:18:
include/regmap.h:391:58: note: expected ‘fdt_val_t *’ {aka ‘unsigned int *’} but argument is of type ‘fdt64_t *’ {aka ‘long long unsigned int *’}
int regmap_init_mem_plat(struct udevice *dev, fdt_val_t *reg, int count,

Quoted 19 lines · Simon Glass

Hi Johan,

Quoted 7 lines · Johan Jonker

The DT node name pattern in mmc-controller.yaml for mmc is "^mmc(@.*)?$". The Rockchip mmc nodes have been synced with Linux, so update the boot_devices constants as well.

Quoted 7 lines
---
 arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
 arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
 arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
 arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
 arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
Quoted 5 lines

I tested this series on snow and it seems fine.

I tried it on jerry and got:

DRAM init failed: -19

Quoted 7 lines
        noc: syscon@ffac0000 {
                compatible = "rockchip,rk3288-noc", "syscon";
                reg = <0x0 0xffac0000 0x0 0x2000>;

Forgot something. Does that help or is there more that needs to be fixed?

==> u-boot,dm-pre-reloc;

See my other reply for jerry.

I might be able to make my lab available to you somehow.

Quoted 10 lines
        };

TODO: Must change/update dmc/noc reg size when I sync rk3288.dtsi.

Quoted 3 lines

It also seemed fine on bob although my display is not coming up, for different reasons.

In SPL or full U-boot?

There is no display in SPL.

Quoted 11 lines

rk3288-veyron-chromebook.dtsi:

        aliases {
                i2c20 = &i2c_tunnel;
                video0 = &vopl;
                video1 = &vopb;
        };

Is this video alias something U-boot specific? Fixing U-boot video is beyond my U-boot knowledge.

Well that's OK, just keep the aliases around and perhaps upstream them? I am not quite sure why we need an ordering for the video, actually.

Regards,
Simon