devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] rockchip: Add support for RK3582
@ 2024-12-22  3:03 FUKAUMI Naoki
  2024-12-22  3:03 ` [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround " FUKAUMI Naoki
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: FUKAUMI Naoki @ 2024-12-22  3:03 UTC (permalink / raw)
  To: heiko
  Cc: robh, krzk+dt, conor+dt, maz, tglx, jonas, macromorgan, andyshrk,
	liujianfeng1994, dmt.yashin, dsimic, tim, marcin.juszkiewicz,
	michael.riesch, alchark, sebastian.reichel, jbx6244, devicetree,
	linux-arm-kernel, linux-rockchip, FUKAUMI Naoki

Rockchip RK3582 is a scaled down version of Rockchip RK3588(S).

- Dual Cortex-A76 and quad Cortex-A55 CPU
- No GPU
- 5TOPS NPU
- H.264/H.265 video encoder up to 4K@60fps

This patch series adds RK3582 support to the GIC and the Radxa E52C
compact network computer.

FUKAUMI Naoki (3):
  irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
  dt-bindings: arm: rockchip: Add Radxa E52C
  arm64: dts: rockchip: Add Radxa E52C

 .../devicetree/bindings/arm/rockchip.yaml     |   5 +
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3582-radxa-e52c.dts   | 729 ++++++++++++++++++
 drivers/irqchip/irq-gic-v3-its.c              |   3 +-
 4 files changed, 737 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts

-- 
2.43.0


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
  2024-12-22  3:03 [PATCH 0/3] rockchip: Add support for RK3582 FUKAUMI Naoki
@ 2024-12-22  3:03 ` FUKAUMI Naoki
  2024-12-22  9:04   ` Marc Zyngier
  2024-12-22  3:03 ` [PATCH 2/3] dt-bindings: arm: rockchip: Add Radxa E52C FUKAUMI Naoki
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 20+ messages in thread
From: FUKAUMI Naoki @ 2024-12-22  3:03 UTC (permalink / raw)
  To: heiko
  Cc: robh, krzk+dt, conor+dt, maz, tglx, jonas, macromorgan, andyshrk,
	liujianfeng1994, dmt.yashin, dsimic, tim, marcin.juszkiewicz,
	michael.riesch, alchark, sebastian.reichel, jbx6244, devicetree,
	linux-arm-kernel, linux-rockchip, FUKAUMI Naoki

Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply
Rockchip 3588001 erratum workaround to RK3582.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
---
 drivers/irqchip/irq-gic-v3-its.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 92244cfa0464..c59ce9332dc0 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -4861,7 +4861,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data)
 {
 	struct its_node *its = data;
 
-	if (!of_machine_is_compatible("rockchip,rk3588") &&
+	if (!of_machine_is_compatible("rockchip,rk3582") &&
+	    !of_machine_is_compatible("rockchip,rk3588") &&
 	    !of_machine_is_compatible("rockchip,rk3588s"))
 		return false;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/3] dt-bindings: arm: rockchip: Add Radxa E52C
  2024-12-22  3:03 [PATCH 0/3] rockchip: Add support for RK3582 FUKAUMI Naoki
  2024-12-22  3:03 ` [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround " FUKAUMI Naoki
@ 2024-12-22  3:03 ` FUKAUMI Naoki
  2024-12-22 13:11   ` Conor Dooley
  2024-12-22  3:03 ` [PATCH 3/3] arm64: dts: " FUKAUMI Naoki
  2024-12-23 12:52 ` [PATCH 0/3] rockchip: Add support for RK3582 Rob Herring (Arm)
  3 siblings, 1 reply; 20+ messages in thread
From: FUKAUMI Naoki @ 2024-12-22  3:03 UTC (permalink / raw)
  To: heiko
  Cc: robh, krzk+dt, conor+dt, maz, tglx, jonas, macromorgan, andyshrk,
	liujianfeng1994, dmt.yashin, dsimic, tim, marcin.juszkiewicz,
	michael.riesch, alchark, sebastian.reichel, jbx6244, devicetree,
	linux-arm-kernel, linux-rockchip, FUKAUMI Naoki

Add devicetree binding for the Radxa E52C.

Radxa E52C is a compact network computer based on the Rockchip RK3582
SoC.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
index 753199a12923..0f0c049a2e90 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.yaml
+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
@@ -812,6 +812,11 @@ properties:
           - const: radxa,e20c
           - const: rockchip,rk3528
 
+      - description: Radxa E52C
+        items:
+          - const: radxa,e52c
+          - const: rockchip,rk3582
+
       - description: Radxa Rock
         items:
           - const: radxa,rock
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 3/3] arm64: dts: rockchip: Add Radxa E52C
  2024-12-22  3:03 [PATCH 0/3] rockchip: Add support for RK3582 FUKAUMI Naoki
  2024-12-22  3:03 ` [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround " FUKAUMI Naoki
  2024-12-22  3:03 ` [PATCH 2/3] dt-bindings: arm: rockchip: Add Radxa E52C FUKAUMI Naoki
@ 2024-12-22  3:03 ` FUKAUMI Naoki
  2024-12-22  3:58   ` FUKAUMI Naoki
  2024-12-23  9:39   ` Marc Zyngier
  2024-12-23 12:52 ` [PATCH 0/3] rockchip: Add support for RK3582 Rob Herring (Arm)
  3 siblings, 2 replies; 20+ messages in thread
From: FUKAUMI Naoki @ 2024-12-22  3:03 UTC (permalink / raw)
  To: heiko
  Cc: robh, krzk+dt, conor+dt, maz, tglx, jonas, macromorgan, andyshrk,
	liujianfeng1994, dmt.yashin, dsimic, tim, marcin.juszkiewicz,
	michael.riesch, alchark, sebastian.reichel, jbx6244, devicetree,
	linux-arm-kernel, linux-rockchip, FUKAUMI Naoki

Radxa E52C is a compact network computer[1] based on the Rockchip
RK3582 SoC:

- Dual Cortex-A76 and quad Cortex-A55 CPU
- 5TOPS NPU
- 2GB/4GB/8GB LPDDR4 RAM
- 16GB/32GB/64GB on-board eMMC
- microSD card slot
- USB 3.0 Type-A HOST port
- USB Type-C debug port
- USB Type-C power port (5V only)
- 2x 2.5GbE ports

[1] https://radxa.com/products/network-computer/e52c

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
---
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3582-radxa-e52c.dts   | 729 ++++++++++++++++++
 2 files changed, 730 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts

diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index cac3f39af82a..e6e71e8f5519 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -157,6 +157,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-display-vz.dtbo
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-io-expander.dtbo
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-armsom-sige5.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3582-radxa-e52c.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-armsom-sige7.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-armsom-w3.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-coolpi-cm5-evb.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts b/arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
new file mode 100644
index 000000000000..a278802ace18
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
@@ -0,0 +1,729 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2024 Radxa Computer (Shenzhen) Co., Ltd.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/pwm/pwm.h>
+#include "rk3588s.dtsi"
+
+/ {
+	model = "Radxa E52C";
+	compatible = "radxa,e52c", "rockchip,rk3582";
+
+	aliases {
+		mmc0 = &sdhci;
+		mmc1 = &sdmmc;
+	};
+
+	chosen {
+		stdout-path = "serial2:1500000n8";
+	};
+
+	adc-keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 0>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <18000>;
+		poll-interval = <100>;
+
+		key-vendor {
+			label = "Maskrom";
+			linux,code = <KEY_VENDOR>;
+			press-threshold-microvolt = <0>;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&btn_user>;
+
+		button-0 {
+			label = "User";
+			gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
+			linux,code = <BTN_0>;
+			wakeup-source;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&led_pin>;
+
+		led-0 {
+			color = <LED_COLOR_ID_GREEN>;
+			default-state = "on";
+			function = LED_FUNCTION_STATUS;
+			gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	pwm-leds {
+		compatible = "pwm-leds";
+
+		led-1 {
+			color = <LED_COLOR_ID_GREEN>;
+			default-state = "on";
+			function = LED_FUNCTION_LAN;
+			linux,default-trigger = "r8169-4-4100:00:link";
+			pwms = <&pwm14 0 1000000 PWM_POLARITY_INVERTED>;
+			max-brightness = <255>;
+		};
+
+		led-2 {
+			color = <LED_COLOR_ID_GREEN>;
+			default-state = "on";
+			function = LED_FUNCTION_WAN;
+			linux,default-trigger = "r8169-3-3100:00:link";
+			pwms = <&pwm11 0 1000000 PWM_POLARITY_INVERTED>;
+			max-brightness = <255>;
+		};
+	};
+
+	/* 5V_DCIN */
+	vbus_typec: regulator-vbus-typec {
+		compatible = "regulator-fixed";
+		regulator-name = "vbus_typec";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+	};
+
+	vcc5v0_usb_otg0: regulator-vcc5v0-usb-otg0 {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&usb_otg_pwren_h>;
+		regulator-name = "vcc5v0_usb_otg0";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc_sysin>;
+	};
+
+	vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_1v1_nldo_s3";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <1100000>;
+		regulator-max-microvolt = <1100000>;
+		vin-supply = <&vcc_sysin>;
+	};
+
+	vcc_3v3_pmu: regulator-vcc-3v3-pmu {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_3v3_pmu";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&vcc_3v3_s3>;
+	};
+
+	vcc_3v3_s0: regulator-vcc-3v3-s0 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_3v3_s0";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&vcc_3v3_s3>;
+	};
+
+	vcc_5v0: regulator-vcc-5v0 {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc_5v0_pwren_h>;
+		regulator-name = "vcc_5v0";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc_sysin>;
+	};
+
+	vcc_sysin: regulator-vcc-sysin {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_sysin";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vbus_typec>;
+	};
+
+	vcca: regulator-vcca {
+		compatible = "regulator-fixed";
+		regulator-name = "vcca";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <4000000>;
+		regulator-max-microvolt = <4000000>;
+		vin-supply = <&vcc_sysin>;
+	};
+};
+
+&combphy0_ps {
+	status = "okay";
+};
+
+&combphy2_psu {
+	status = "okay";
+};
+
+&cpu_b0 {
+	cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b1 {
+	cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b2 {
+	cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_b3 {
+	cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_l0 {
+	cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l1 {
+	cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l2 {
+	cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l3 {
+	cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0m2_xfer>;
+	status = "okay";
+
+	vdd_cpu_big0_s0: regulator@42 {
+		compatible = "rockchip,rk8602";
+		reg = <0x42>;
+		fcs,suspend-voltage-selector = <1>;
+		regulator-name = "vdd_cpu_big0_s0";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <550000>;
+		regulator-max-microvolt = <1050000>;
+		regulator-ramp-delay = <2300>;
+		vin-supply = <&vcc_sysin>;
+
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+
+	vdd_cpu_big1_s0: regulator@43 {
+		compatible = "rockchip,rk8603", "rockchip,rk8602";
+		reg = <0x43>;
+		fcs,suspend-voltage-selector = <1>;
+		regulator-name = "vdd_cpu_big1_s0";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <550000>;
+		regulator-max-microvolt = <1050000>;
+		regulator-ramp-delay = <2300>;
+		vin-supply = <&vcc_sysin>;
+
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+
+	eeprom@50 {
+		compatible = "belling,bl24c16a", "atmel,24c16";
+		reg = <0x50>;
+		pagesize = <16>;
+		vcc-supply = <&vcc_3v3_pmu>;
+	};
+};
+
+&i2c2 {
+	status = "okay";
+
+	vdd_npu_s0: regulator@42 {
+		compatible = "rockchip,rk8602";
+		reg = <0x42>;
+		fcs,suspend-voltage-selector = <1>;
+		regulator-name = "vdd_npu_s0";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <550000>;
+		regulator-max-microvolt = <950000>;
+		regulator-ramp-delay = <2300>;
+		vin-supply = <&vcc_sysin>;
+
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+};
+
+&pcie2x1l1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie20x1_1_perstn_m1>,
+		    <&pcie30x1m1_1_clkreqn>,
+		    <&pcie30x1m1_1_waken>;
+	reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
+	vpcie3v3-supply = <&vcc_3v3_s3>;
+	status = "okay";
+};
+
+&pcie2x1l2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie20x1_2_perstn_m0>,
+		    <&pcie20x1m0_clkreqn>,
+		    <&pcie20x1m0_waken>;
+	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
+	vpcie3v3-supply = <&vcc_3v3_s3>;
+	status = "okay";
+};
+
+&pinctrl {
+	keys {
+		btn_user: btn-user {
+			rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	leds {
+		led_pin: led-pin {
+			rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	pcie {
+		pcie20x1_1_perstn_m1: pcie20x1-1-perstn-m1 {
+			rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		pcie20x1_2_perstn_m0: pcie20x1-2-perstn-m0 {
+			rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	usb {
+		usb_otg_pwren_h: usb-otg-pwren-h {
+			rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	vcc-5v0 {
+		vcc_5v0_pwren_h: vcc-5v0-pwren-h {
+			rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};
+
+&pwm11 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm11m1_pins>;
+	status = "okay";
+};
+
+&pwm14 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm14m1_pins>;
+	status = "okay";
+};
+
+&saradc {
+	vref-supply = <&vcca_1v8_s0>;
+	status = "okay";
+};
+
+&sdhci {
+	bus-width = <8>;
+	cap-mmc-highspeed;
+	mmc-hs400-1_8v;
+	mmc-hs400-enhanced-strobe;
+	no-sd;
+	no-sdio;
+	non-removable;
+	vmmc-supply = <&vcc_3v3_s0>;
+	vqmmc-supply = <&vcc_1v8_s3>;
+	status = "okay";
+};
+
+&sdmmc {
+	bus-width = <4>;
+	cap-mmc-highspeed;
+	cap-sd-highspeed;
+	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
+	disable-wp;
+	no-sdio;
+	sd-uhs-sdr104;
+	vmmc-supply = <&vcc_3v3_s3>;
+	vqmmc-supply = <&vccio_sd_s0>;
+	status = "okay";
+};
+
+&spi2 {
+	status = "okay";
+	assigned-clocks = <&cru CLK_SPI2>;
+	assigned-clock-rates = <200000000>;
+	num-cs = <1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
+
+	pmic@0 {
+		compatible = "rockchip,rk806";
+		reg = <0>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
+			    <&rk806_dvs2_null>, <&rk806_dvs3_null>;
+		spi-max-frequency = <1000000>;
+		system-power-controller;
+
+		vcc1-supply = <&vcc_sysin>;
+		vcc2-supply = <&vcc_sysin>;
+		vcc3-supply = <&vcc_sysin>;
+		vcc4-supply = <&vcc_sysin>;
+		vcc5-supply = <&vcc_sysin>;
+		vcc6-supply = <&vcc_sysin>;
+		vcc7-supply = <&vcc_sysin>;
+		vcc8-supply = <&vcc_sysin>;
+		vcc9-supply = <&vcc_sysin>;
+		vcc10-supply = <&vcc_sysin>;
+		vcc11-supply = <&vcc_2v0_pldo_s3>;
+		vcc12-supply = <&vcc_sysin>;
+		vcc13-supply = <&vcc_1v1_nldo_s3>;
+		vcc14-supply = <&vcc_1v1_nldo_s3>;
+		vcca-supply = <&vcca>;
+
+		rk806_dvs1_null: dvs1-null-pins {
+			pins = "gpio_pwrctrl1";
+			function = "pin_fun0";
+		};
+
+		rk806_dvs2_null: dvs2-null-pins {
+			pins = "gpio_pwrctrl2";
+			function = "pin_fun0";
+		};
+
+		rk806_dvs3_null: dvs3-null-pins {
+			pins = "gpio_pwrctrl3";
+			function = "pin_fun0";
+		};
+
+		regulators {
+			vdd_gpu_s0: dcdc-reg1 {
+				regulator-name = "vdd_gpu_s0";
+				regulator-boot-on;
+				regulator-min-microvolt = <550000>;
+				regulator-max-microvolt = <950000>;
+				regulator-ramp-delay = <12500>;
+				regulator-enable-ramp-delay = <400>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vdd_cpu_lit_s0: dcdc-reg2 {
+				regulator-name = "vdd_cpu_lit_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <550000>;
+				regulator-max-microvolt = <950000>;
+				regulator-ramp-delay = <12500>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vdd_logic_s0: dcdc-reg3 {
+				regulator-name = "vdd_logic_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <675000>;
+				regulator-max-microvolt = <750000>;
+				regulator-ramp-delay = <12500>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <750000>;
+				};
+			};
+
+			vdd_vdenc_s0: dcdc-reg4 {
+				regulator-name = "vdd_vdenc_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <550000>;
+				regulator-max-microvolt = <950000>;
+				regulator-ramp-delay = <12500>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vdd_ddr_s0: dcdc-reg5 {
+				regulator-name = "vdd_ddr_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <675000>;
+				regulator-max-microvolt = <900000>;
+				regulator-ramp-delay = <12500>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+					regulator-suspend-microvolt = <850000>;
+				};
+			};
+
+			vdd2_ddr_s3: dcdc-reg6 {
+				regulator-name = "vdd2_ddr_s3";
+				regulator-always-on;
+				regulator-boot-on;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+				};
+			};
+
+			vcc_2v0_pldo_s3: dcdc-reg7 {
+				regulator-name = "vcc_2v0_pldo_s3";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <2000000>;
+				regulator-max-microvolt = <2000000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <2000000>;
+				};
+			};
+
+			vcc_3v3_s3: dcdc-reg8 {
+				regulator-name = "vcc_3v3_s3";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <3300000>;
+				};
+			};
+
+			vddq_ddr_s0: dcdc-reg9 {
+				regulator-name = "vddq_ddr_s0";
+				regulator-always-on;
+				regulator-boot-on;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcc_1v8_s3: dcdc-reg10 {
+				regulator-name = "vcc_1v8_s3";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <1800000>;
+				};
+			};
+
+			vcc_1v8_s0: pldo-reg1 {
+				regulator-name = "vcc_1v8_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <1800000>;
+				};
+			};
+
+			vcca_1v8_s0: pldo-reg2 {
+				regulator-name = "vcca_1v8_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <1800000>;
+				};
+			};
+
+			vdda_1v2_s0: pldo-reg3 {
+				regulator-name = "vdda_1v2_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcca_3v3_s0: pldo-reg4 {
+				regulator-name = "vcca_3v3_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <3300000>;
+				};
+			};
+
+			vccio_sd_s0: pldo-reg5 {
+				regulator-name = "vccio_sd_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			pldo6_s3: pldo-reg6 {
+				regulator-name = "pldo6_s3";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <1800000>;
+				};
+			};
+
+			vdd_0v75_s3: nldo-reg1 {
+				regulator-name = "vdd_0v75_s3";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <750000>;
+				regulator-max-microvolt = <750000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <750000>;
+				};
+			};
+
+			vdda_ddr_pll_s0: nldo-reg2 {
+				regulator-name = "vdda_ddr_pll_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <850000>;
+				regulator-max-microvolt = <850000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <850000>;
+				};
+			};
+
+			vdda_0v75_s0: nldo-reg3 {
+				regulator-name = "vdda_0v75_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <750000>;
+				regulator-max-microvolt = <750000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <750000>;
+				};
+			};
+
+			vdda_0v85_s0: nldo-reg4 {
+				regulator-name = "vdda_0v85_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <850000>;
+				regulator-max-microvolt = <850000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vdd_0v75_s0: nldo-reg5 {
+				regulator-name = "vdd_0v75_s0";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <750000>;
+				regulator-max-microvolt = <750000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+		};
+	};
+};
+
+&tsadc {
+	status = "okay";
+};
+
+&u2phy0 {
+	status = "okay";
+};
+
+&u2phy0_otg {
+	phy-supply = <&vcc5v0_usb_otg0>;
+	status = "okay";
+};
+
+&uart2 {
+	pinctrl-0 = <&uart2m0_xfer>;
+	status = "okay";
+};
+
+&usb_host0_xhci {
+	dr_mode = "host";
+	status = "okay";
+};
+
+&usbdp_phy0 {
+	status = "okay";
+};
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/3] arm64: dts: rockchip: Add Radxa E52C
  2024-12-22  3:03 ` [PATCH 3/3] arm64: dts: " FUKAUMI Naoki
@ 2024-12-22  3:58   ` FUKAUMI Naoki
  2024-12-23  9:39   ` Marc Zyngier
  1 sibling, 0 replies; 20+ messages in thread
From: FUKAUMI Naoki @ 2024-12-22  3:58 UTC (permalink / raw)
  To: heiko
  Cc: robh, krzk+dt, conor+dt, maz, tglx, jonas, macromorgan, andyshrk,
	liujianfeng1994, dmt.yashin, dsimic, tim, marcin.juszkiewicz,
	michael.riesch, alchark, sebastian.reichel, jbx6244, devicetree,
	linux-arm-kernel, linux-rockchip

In v2 I will change the node names to be more general. Please ignore the 
"node name" part.

Best regards,

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

On 12/22/24 12:03, FUKAUMI Naoki wrote:
> Radxa E52C is a compact network computer[1] based on the Rockchip
> RK3582 SoC:
> 
> - Dual Cortex-A76 and quad Cortex-A55 CPU
> - 5TOPS NPU
> - 2GB/4GB/8GB LPDDR4 RAM
> - 16GB/32GB/64GB on-board eMMC
> - microSD card slot
> - USB 3.0 Type-A HOST port
> - USB Type-C debug port
> - USB Type-C power port (5V only)
> - 2x 2.5GbE ports
> 
> [1] https://radxa.com/products/network-computer/e52c
> 
> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
> ---
>   arch/arm64/boot/dts/rockchip/Makefile         |   1 +
>   .../boot/dts/rockchip/rk3582-radxa-e52c.dts   | 729 ++++++++++++++++++
>   2 files changed, 730 insertions(+)
>   create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
> 
> diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
> index cac3f39af82a..e6e71e8f5519 100644
> --- a/arch/arm64/boot/dts/rockchip/Makefile
> +++ b/arch/arm64/boot/dts/rockchip/Makefile
> @@ -157,6 +157,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5.dtb
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-display-vz.dtbo
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-io-expander.dtbo
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-armsom-sige5.dtb
> +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3582-radxa-e52c.dtb
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-armsom-sige7.dtb
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-armsom-w3.dtb
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-coolpi-cm5-evb.dtb
> diff --git a/arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts b/arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
> new file mode 100644
> index 000000000000..a278802ace18
> --- /dev/null
> +++ b/arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
> @@ -0,0 +1,729 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2024 Radxa Computer (Shenzhen) Co., Ltd.
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/pinctrl/rockchip.h>
> +#include <dt-bindings/pwm/pwm.h>
> +#include "rk3588s.dtsi"
> +
> +/ {
> +	model = "Radxa E52C";
> +	compatible = "radxa,e52c", "rockchip,rk3582";
> +
> +	aliases {
> +		mmc0 = &sdhci;
> +		mmc1 = &sdmmc;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial2:1500000n8";
> +	};
> +
> +	adc-keys {
> +		compatible = "adc-keys";
> +		io-channels = <&saradc 0>;
> +		io-channel-names = "buttons";
> +		keyup-threshold-microvolt = <18000>;
> +		poll-interval = <100>;
> +
> +		key-vendor {
> +			label = "Maskrom";
> +			linux,code = <KEY_VENDOR>;
> +			press-threshold-microvolt = <0>;
> +		};
> +	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&btn_user>;
> +
> +		button-0 {
> +			label = "User";
> +			gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
> +			linux,code = <BTN_0>;
> +			wakeup-source;
> +		};
> +	};
> +
> +	gpio-leds {
> +		compatible = "gpio-leds";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&led_pin>;
> +
> +		led-0 {
> +			color = <LED_COLOR_ID_GREEN>;
> +			default-state = "on";
> +			function = LED_FUNCTION_STATUS;
> +			gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "heartbeat";
> +		};
> +	};
> +
> +	pwm-leds {
> +		compatible = "pwm-leds";
> +
> +		led-1 {
> +			color = <LED_COLOR_ID_GREEN>;
> +			default-state = "on";
> +			function = LED_FUNCTION_LAN;
> +			linux,default-trigger = "r8169-4-4100:00:link";
> +			pwms = <&pwm14 0 1000000 PWM_POLARITY_INVERTED>;
> +			max-brightness = <255>;
> +		};
> +
> +		led-2 {
> +			color = <LED_COLOR_ID_GREEN>;
> +			default-state = "on";
> +			function = LED_FUNCTION_WAN;
> +			linux,default-trigger = "r8169-3-3100:00:link";
> +			pwms = <&pwm11 0 1000000 PWM_POLARITY_INVERTED>;
> +			max-brightness = <255>;
> +		};
> +	};
> +
> +	/* 5V_DCIN */
> +	vbus_typec: regulator-vbus-typec {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vbus_typec";
> +		regulator-always-on;
> +		regulator-boot-on;
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +	};
> +
> +	vcc5v0_usb_otg0: regulator-vcc5v0-usb-otg0 {
> +		compatible = "regulator-fixed";
> +		enable-active-high;
> +		gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&usb_otg_pwren_h>;
> +		regulator-name = "vcc5v0_usb_otg0";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		vin-supply = <&vcc_sysin>;
> +	};
> +
> +	vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vcc_1v1_nldo_s3";
> +		regulator-always-on;
> +		regulator-boot-on;
> +		regulator-min-microvolt = <1100000>;
> +		regulator-max-microvolt = <1100000>;
> +		vin-supply = <&vcc_sysin>;
> +	};
> +
> +	vcc_3v3_pmu: regulator-vcc-3v3-pmu {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vcc_3v3_pmu";
> +		regulator-always-on;
> +		regulator-boot-on;
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		vin-supply = <&vcc_3v3_s3>;
> +	};
> +
> +	vcc_3v3_s0: regulator-vcc-3v3-s0 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vcc_3v3_s0";
> +		regulator-always-on;
> +		regulator-boot-on;
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		vin-supply = <&vcc_3v3_s3>;
> +	};
> +
> +	vcc_5v0: regulator-vcc-5v0 {
> +		compatible = "regulator-fixed";
> +		enable-active-high;
> +		gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&vcc_5v0_pwren_h>;
> +		regulator-name = "vcc_5v0";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		vin-supply = <&vcc_sysin>;
> +	};
> +
> +	vcc_sysin: regulator-vcc-sysin {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vcc_sysin";
> +		regulator-always-on;
> +		regulator-boot-on;
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		vin-supply = <&vbus_typec>;
> +	};
> +
> +	vcca: regulator-vcca {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vcca";
> +		regulator-always-on;
> +		regulator-boot-on;
> +		regulator-min-microvolt = <4000000>;
> +		regulator-max-microvolt = <4000000>;
> +		vin-supply = <&vcc_sysin>;
> +	};
> +};
> +
> +&combphy0_ps {
> +	status = "okay";
> +};
> +
> +&combphy2_psu {
> +	status = "okay";
> +};
> +
> +&cpu_b0 {
> +	cpu-supply = <&vdd_cpu_big0_s0>;
> +};
> +
> +&cpu_b1 {
> +	cpu-supply = <&vdd_cpu_big0_s0>;
> +};
> +
> +&cpu_b2 {
> +	cpu-supply = <&vdd_cpu_big1_s0>;
> +};
> +
> +&cpu_b3 {
> +	cpu-supply = <&vdd_cpu_big1_s0>;
> +};
> +
> +&cpu_l0 {
> +	cpu-supply = <&vdd_cpu_lit_s0>;
> +};
> +
> +&cpu_l1 {
> +	cpu-supply = <&vdd_cpu_lit_s0>;
> +};
> +
> +&cpu_l2 {
> +	cpu-supply = <&vdd_cpu_lit_s0>;
> +};
> +
> +&cpu_l3 {
> +	cpu-supply = <&vdd_cpu_lit_s0>;
> +};
> +
> +&i2c0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c0m2_xfer>;
> +	status = "okay";
> +
> +	vdd_cpu_big0_s0: regulator@42 {
> +		compatible = "rockchip,rk8602";
> +		reg = <0x42>;
> +		fcs,suspend-voltage-selector = <1>;
> +		regulator-name = "vdd_cpu_big0_s0";
> +		regulator-always-on;
> +		regulator-boot-on;
> +		regulator-min-microvolt = <550000>;
> +		regulator-max-microvolt = <1050000>;
> +		regulator-ramp-delay = <2300>;
> +		vin-supply = <&vcc_sysin>;
> +
> +		regulator-state-mem {
> +			regulator-off-in-suspend;
> +		};
> +	};
> +
> +	vdd_cpu_big1_s0: regulator@43 {
> +		compatible = "rockchip,rk8603", "rockchip,rk8602";
> +		reg = <0x43>;
> +		fcs,suspend-voltage-selector = <1>;
> +		regulator-name = "vdd_cpu_big1_s0";
> +		regulator-always-on;
> +		regulator-boot-on;
> +		regulator-min-microvolt = <550000>;
> +		regulator-max-microvolt = <1050000>;
> +		regulator-ramp-delay = <2300>;
> +		vin-supply = <&vcc_sysin>;
> +
> +		regulator-state-mem {
> +			regulator-off-in-suspend;
> +		};
> +	};
> +
> +	eeprom@50 {
> +		compatible = "belling,bl24c16a", "atmel,24c16";
> +		reg = <0x50>;
> +		pagesize = <16>;
> +		vcc-supply = <&vcc_3v3_pmu>;
> +	};
> +};
> +
> +&i2c2 {
> +	status = "okay";
> +
> +	vdd_npu_s0: regulator@42 {
> +		compatible = "rockchip,rk8602";
> +		reg = <0x42>;
> +		fcs,suspend-voltage-selector = <1>;
> +		regulator-name = "vdd_npu_s0";
> +		regulator-always-on;
> +		regulator-boot-on;
> +		regulator-min-microvolt = <550000>;
> +		regulator-max-microvolt = <950000>;
> +		regulator-ramp-delay = <2300>;
> +		vin-supply = <&vcc_sysin>;
> +
> +		regulator-state-mem {
> +			regulator-off-in-suspend;
> +		};
> +	};
> +};
> +
> +&pcie2x1l1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pcie20x1_1_perstn_m1>,
> +		    <&pcie30x1m1_1_clkreqn>,
> +		    <&pcie30x1m1_1_waken>;
> +	reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
> +	vpcie3v3-supply = <&vcc_3v3_s3>;
> +	status = "okay";
> +};
> +
> +&pcie2x1l2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pcie20x1_2_perstn_m0>,
> +		    <&pcie20x1m0_clkreqn>,
> +		    <&pcie20x1m0_waken>;
> +	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
> +	vpcie3v3-supply = <&vcc_3v3_s3>;
> +	status = "okay";
> +};
> +
> +&pinctrl {
> +	keys {
> +		btn_user: btn-user {
> +			rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
> +
> +	leds {
> +		led_pin: led-pin {
> +			rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
> +
> +	pcie {
> +		pcie20x1_1_perstn_m1: pcie20x1-1-perstn-m1 {
> +			rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +
> +		pcie20x1_2_perstn_m0: pcie20x1-2-perstn-m0 {
> +			rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
> +
> +	usb {
> +		usb_otg_pwren_h: usb-otg-pwren-h {
> +			rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
> +
> +	vcc-5v0 {
> +		vcc_5v0_pwren_h: vcc-5v0-pwren-h {
> +			rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
> +};
> +
> +&pwm11 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pwm11m1_pins>;
> +	status = "okay";
> +};
> +
> +&pwm14 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pwm14m1_pins>;
> +	status = "okay";
> +};
> +
> +&saradc {
> +	vref-supply = <&vcca_1v8_s0>;
> +	status = "okay";
> +};
> +
> +&sdhci {
> +	bus-width = <8>;
> +	cap-mmc-highspeed;
> +	mmc-hs400-1_8v;
> +	mmc-hs400-enhanced-strobe;
> +	no-sd;
> +	no-sdio;
> +	non-removable;
> +	vmmc-supply = <&vcc_3v3_s0>;
> +	vqmmc-supply = <&vcc_1v8_s3>;
> +	status = "okay";
> +};
> +
> +&sdmmc {
> +	bus-width = <4>;
> +	cap-mmc-highspeed;
> +	cap-sd-highspeed;
> +	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
> +	disable-wp;
> +	no-sdio;
> +	sd-uhs-sdr104;
> +	vmmc-supply = <&vcc_3v3_s3>;
> +	vqmmc-supply = <&vccio_sd_s0>;
> +	status = "okay";
> +};
> +
> +&spi2 {
> +	status = "okay";
> +	assigned-clocks = <&cru CLK_SPI2>;
> +	assigned-clock-rates = <200000000>;
> +	num-cs = <1>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
> +
> +	pmic@0 {
> +		compatible = "rockchip,rk806";
> +		reg = <0>;
> +		gpio-controller;
> +		#gpio-cells = <2>;
> +		interrupt-parent = <&gpio0>;
> +		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
> +			    <&rk806_dvs2_null>, <&rk806_dvs3_null>;
> +		spi-max-frequency = <1000000>;
> +		system-power-controller;
> +
> +		vcc1-supply = <&vcc_sysin>;
> +		vcc2-supply = <&vcc_sysin>;
> +		vcc3-supply = <&vcc_sysin>;
> +		vcc4-supply = <&vcc_sysin>;
> +		vcc5-supply = <&vcc_sysin>;
> +		vcc6-supply = <&vcc_sysin>;
> +		vcc7-supply = <&vcc_sysin>;
> +		vcc8-supply = <&vcc_sysin>;
> +		vcc9-supply = <&vcc_sysin>;
> +		vcc10-supply = <&vcc_sysin>;
> +		vcc11-supply = <&vcc_2v0_pldo_s3>;
> +		vcc12-supply = <&vcc_sysin>;
> +		vcc13-supply = <&vcc_1v1_nldo_s3>;
> +		vcc14-supply = <&vcc_1v1_nldo_s3>;
> +		vcca-supply = <&vcca>;
> +
> +		rk806_dvs1_null: dvs1-null-pins {
> +			pins = "gpio_pwrctrl1";
> +			function = "pin_fun0";
> +		};
> +
> +		rk806_dvs2_null: dvs2-null-pins {
> +			pins = "gpio_pwrctrl2";
> +			function = "pin_fun0";
> +		};
> +
> +		rk806_dvs3_null: dvs3-null-pins {
> +			pins = "gpio_pwrctrl3";
> +			function = "pin_fun0";
> +		};
> +
> +		regulators {
> +			vdd_gpu_s0: dcdc-reg1 {
> +				regulator-name = "vdd_gpu_s0";
> +				regulator-boot-on;
> +				regulator-min-microvolt = <550000>;
> +				regulator-max-microvolt = <950000>;
> +				regulator-ramp-delay = <12500>;
> +				regulator-enable-ramp-delay = <400>;
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +				};
> +			};
> +
> +			vdd_cpu_lit_s0: dcdc-reg2 {
> +				regulator-name = "vdd_cpu_lit_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <550000>;
> +				regulator-max-microvolt = <950000>;
> +				regulator-ramp-delay = <12500>;
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +				};
> +			};
> +
> +			vdd_logic_s0: dcdc-reg3 {
> +				regulator-name = "vdd_logic_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <675000>;
> +				regulator-max-microvolt = <750000>;
> +				regulator-ramp-delay = <12500>;
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <750000>;
> +				};
> +			};
> +
> +			vdd_vdenc_s0: dcdc-reg4 {
> +				regulator-name = "vdd_vdenc_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <550000>;
> +				regulator-max-microvolt = <950000>;
> +				regulator-ramp-delay = <12500>;
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +				};
> +			};
> +
> +			vdd_ddr_s0: dcdc-reg5 {
> +				regulator-name = "vdd_ddr_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <675000>;
> +				regulator-max-microvolt = <900000>;
> +				regulator-ramp-delay = <12500>;
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +					regulator-suspend-microvolt = <850000>;
> +				};
> +			};
> +
> +			vdd2_ddr_s3: dcdc-reg6 {
> +				regulator-name = "vdd2_ddr_s3";
> +				regulator-always-on;
> +				regulator-boot-on;
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +				};
> +			};
> +
> +			vcc_2v0_pldo_s3: dcdc-reg7 {
> +				regulator-name = "vcc_2v0_pldo_s3";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <2000000>;
> +				regulator-max-microvolt = <2000000>;
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <2000000>;
> +				};
> +			};
> +
> +			vcc_3v3_s3: dcdc-reg8 {
> +				regulator-name = "vcc_3v3_s3";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <3300000>;
> +				};
> +			};
> +
> +			vddq_ddr_s0: dcdc-reg9 {
> +				regulator-name = "vddq_ddr_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +				};
> +			};
> +
> +			vcc_1v8_s3: dcdc-reg10 {
> +				regulator-name = "vcc_1v8_s3";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <1800000>;
> +				};
> +			};
> +
> +			vcc_1v8_s0: pldo-reg1 {
> +				regulator-name = "vcc_1v8_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <1800000>;
> +				};
> +			};
> +
> +			vcca_1v8_s0: pldo-reg2 {
> +				regulator-name = "vcca_1v8_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <1800000>;
> +				};
> +			};
> +
> +			vdda_1v2_s0: pldo-reg3 {
> +				regulator-name = "vdda_1v2_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <1200000>;
> +				regulator-max-microvolt = <1200000>;
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +				};
> +			};
> +
> +			vcca_3v3_s0: pldo-reg4 {
> +				regulator-name = "vcca_3v3_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <3300000>;
> +				};
> +			};
> +
> +			vccio_sd_s0: pldo-reg5 {
> +				regulator-name = "vccio_sd_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <3300000>;
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +				};
> +			};
> +
> +			pldo6_s3: pldo-reg6 {
> +				regulator-name = "pldo6_s3";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <1800000>;
> +				};
> +			};
> +
> +			vdd_0v75_s3: nldo-reg1 {
> +				regulator-name = "vdd_0v75_s3";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <750000>;
> +				regulator-max-microvolt = <750000>;
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <750000>;
> +				};
> +			};
> +
> +			vdda_ddr_pll_s0: nldo-reg2 {
> +				regulator-name = "vdda_ddr_pll_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <850000>;
> +				regulator-max-microvolt = <850000>;
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <850000>;
> +				};
> +			};
> +
> +			vdda_0v75_s0: nldo-reg3 {
> +				regulator-name = "vdda_0v75_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <750000>;
> +				regulator-max-microvolt = <750000>;
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <750000>;
> +				};
> +			};
> +
> +			vdda_0v85_s0: nldo-reg4 {
> +				regulator-name = "vdda_0v85_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <850000>;
> +				regulator-max-microvolt = <850000>;
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +				};
> +			};
> +
> +			vdd_0v75_s0: nldo-reg5 {
> +				regulator-name = "vdd_0v75_s0";
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-min-microvolt = <750000>;
> +				regulator-max-microvolt = <750000>;
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&tsadc {
> +	status = "okay";
> +};
> +
> +&u2phy0 {
> +	status = "okay";
> +};
> +
> +&u2phy0_otg {
> +	phy-supply = <&vcc5v0_usb_otg0>;
> +	status = "okay";
> +};
> +
> +&uart2 {
> +	pinctrl-0 = <&uart2m0_xfer>;
> +	status = "okay";
> +};
> +
> +&usb_host0_xhci {
> +	dr_mode = "host";
> +	status = "okay";
> +};
> +
> +&usbdp_phy0 {
> +	status = "okay";
> +};


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
  2024-12-22  3:03 ` [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround " FUKAUMI Naoki
@ 2024-12-22  9:04   ` Marc Zyngier
  2024-12-22 12:10     ` FUKAUMI Naoki
  2024-12-22 18:25     ` Dragan Simic
  0 siblings, 2 replies; 20+ messages in thread
From: Marc Zyngier @ 2024-12-22  9:04 UTC (permalink / raw)
  To: FUKAUMI Naoki
  Cc: heiko, robh, krzk+dt, conor+dt, tglx, jonas, macromorgan,
	andyshrk, liujianfeng1994, dmt.yashin, dsimic, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

On Sun, 22 Dec 2024 03:03:53 +0000,
FUKAUMI Naoki <naoki@radxa.com> wrote:
> 
> Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply
> Rockchip 3588001 erratum workaround to RK3582.
> 
> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
> ---
>  drivers/irqchip/irq-gic-v3-its.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index 92244cfa0464..c59ce9332dc0 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -4861,7 +4861,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data)
>  {
>  	struct its_node *its = data;
>  
> -	if (!of_machine_is_compatible("rockchip,rk3588") &&
> +	if (!of_machine_is_compatible("rockchip,rk3582") &&
> +	    !of_machine_is_compatible("rockchip,rk3588") &&
>  	    !of_machine_is_compatible("rockchip,rk3588s"))
>  		return false;
>  

Please use the relevant property for that purpose ("dma-noncoherent")
at the distributor and ITS levels. We're not adding extra compatibles
for this anymore, and you might as well fix the core dtsi to expose
such property.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
  2024-12-22  9:04   ` Marc Zyngier
@ 2024-12-22 12:10     ` FUKAUMI Naoki
  2024-12-22 18:25     ` Dragan Simic
  1 sibling, 0 replies; 20+ messages in thread
From: FUKAUMI Naoki @ 2024-12-22 12:10 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: heiko, robh, krzk+dt, conor+dt, tglx, jonas, macromorgan,
	andyshrk, liujianfeng1994, dmt.yashin, dsimic, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

Hi Marc,

On 12/22/24 18:04, Marc Zyngier wrote:
> On Sun, 22 Dec 2024 03:03:53 +0000,
> FUKAUMI Naoki <naoki@radxa.com> wrote:
>>
>> Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply
>> Rockchip 3588001 erratum workaround to RK3582.
>>
>> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
>> ---
>>   drivers/irqchip/irq-gic-v3-its.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
>> index 92244cfa0464..c59ce9332dc0 100644
>> --- a/drivers/irqchip/irq-gic-v3-its.c
>> +++ b/drivers/irqchip/irq-gic-v3-its.c
>> @@ -4861,7 +4861,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data)
>>   {
>>   	struct its_node *its = data;
>>   
>> -	if (!of_machine_is_compatible("rockchip,rk3588") &&
>> +	if (!of_machine_is_compatible("rockchip,rk3582") &&
>> +	    !of_machine_is_compatible("rockchip,rk3588") &&
>>   	    !of_machine_is_compatible("rockchip,rk3588s"))
>>   		return false;
>>   
> 
> Please use the relevant property for that purpose ("dma-noncoherent")
> at the distributor and ITS levels. We're not adding extra compatibles
> for this anymore, and you might as well fix the core dtsi to expose
> such property.

I see. I'll drop this patch in v2.

Best regards,

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

> Thanks,
> 
> 	M.
> 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/3] dt-bindings: arm: rockchip: Add Radxa E52C
  2024-12-22  3:03 ` [PATCH 2/3] dt-bindings: arm: rockchip: Add Radxa E52C FUKAUMI Naoki
@ 2024-12-22 13:11   ` Conor Dooley
  2024-12-23  2:13     ` FUKAUMI Naoki
  0 siblings, 1 reply; 20+ messages in thread
From: Conor Dooley @ 2024-12-22 13:11 UTC (permalink / raw)
  To: FUKAUMI Naoki
  Cc: heiko, robh, krzk+dt, conor+dt, maz, tglx, jonas, macromorgan,
	andyshrk, liujianfeng1994, dmt.yashin, dsimic, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

On Sun, Dec 22, 2024 at 03:03:54AM +0000, FUKAUMI Naoki wrote:
> Add devicetree binding for the Radxa E52C.
> 
> Radxa E52C is a compact network computer based on the Rockchip RK3582
> SoC.
> 
> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>


Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
  2024-12-22  9:04   ` Marc Zyngier
  2024-12-22 12:10     ` FUKAUMI Naoki
@ 2024-12-22 18:25     ` Dragan Simic
  2024-12-22 23:16       ` Marc Zyngier
  1 sibling, 1 reply; 20+ messages in thread
From: Dragan Simic @ 2024-12-22 18:25 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: FUKAUMI Naoki, heiko, robh, krzk+dt, conor+dt, tglx, jonas,
	macromorgan, andyshrk, liujianfeng1994, dmt.yashin, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

Hello Marc,

On 2024-12-22 10:04, Marc Zyngier wrote:
> On Sun, 22 Dec 2024 03:03:53 +0000,
> FUKAUMI Naoki <naoki@radxa.com> wrote:
>> 
>> Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply
>> Rockchip 3588001 erratum workaround to RK3582.
>> 
>> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
>> ---
>>  drivers/irqchip/irq-gic-v3-its.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/irqchip/irq-gic-v3-its.c 
>> b/drivers/irqchip/irq-gic-v3-its.c
>> index 92244cfa0464..c59ce9332dc0 100644
>> --- a/drivers/irqchip/irq-gic-v3-its.c
>> +++ b/drivers/irqchip/irq-gic-v3-its.c
>> @@ -4861,7 +4861,8 @@ static bool __maybe_unused 
>> its_enable_rk3588001(void *data)
>>  {
>>  	struct its_node *its = data;
>> 
>> -	if (!of_machine_is_compatible("rockchip,rk3588") &&
>> +	if (!of_machine_is_compatible("rockchip,rk3582") &&
>> +	    !of_machine_is_compatible("rockchip,rk3588") &&
>>  	    !of_machine_is_compatible("rockchip,rk3588s"))
>>  		return false;
>> 
> 
> Please use the relevant property for that purpose ("dma-noncoherent")
> at the distributor and ITS levels. We're not adding extra compatibles
> for this anymore, and you might as well fix the core dtsi to expose
> such property.

Thanks for your response.

After a more detailed look into drivers/irqchip/irq-gic-v3-its.c,
it seems that relying on the "dma-noncoherent" DT property may not
be equivalent to adding another compatible check.  Here are a few
quotations from irq-gic-v3-its.c, to illustrate this better:

4746 static bool __maybe_unused its_enable_rk3588001(void *data)
4747 {
4748         struct its_node *its = data;
4749
4750         if (!of_machine_is_compatible("rockchip,rk3588") &&
4751             !of_machine_is_compatible("rockchip,rk3588s"))
4752                 return false;
4753
4754         its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
4755         gic_rdists->flags |= RDIST_FLAGS_FORCE_NON_SHAREABLE;
4756
4757         return true;
4758 }
4759
4760 static bool its_set_non_coherent(void *data)
4761 {
4762         struct its_node *its = data;
4763
4764         its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
4765         return true;
4766 }

4814 #ifdef CONFIG_ROCKCHIP_ERRATUM_3588001
4815         {
4816                 .desc   = "ITS: Rockchip erratum RK3588001",
4817                 .iidr   = 0x0201743b,
4818                 .mask   = 0xffffffff,
4819                 .init   = its_enable_rk3588001,
4820         },
4821 #endif
4822         {
4823                 .desc   = "ITS: non-coherent attribute",
4824                 .property = "dma-noncoherent",
4825                 .init   = its_set_non_coherent,
4826         },

As visible above, using the "dma-noncoherent" DT property results
in not setting the RDIST_FLAGS_FORCE_NON_SHAREABLE flag, which the
its_enable_rk3588001() function does.  In other words, it doesn't
seem that "dma-noncoherent" is a "drop-in" replacement for adding
yet another compatible for the RK3582.

Modifying the current behavior of the "dma-noncoherent" DT property
doesn't seem like an option, because it's already used in a couple
of board dts(i) files.  Should we introduce another DT property,
perhaps "dma-noncoherent-rdist" or something similar?

Could you, please, advise on how to move forward with this?  I'm
willing to implement the required patches, but I'd prefer to reduce
the possible back-and-forth on them, to save everyone's time.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
  2024-12-22 18:25     ` Dragan Simic
@ 2024-12-22 23:16       ` Marc Zyngier
  2024-12-23  6:10         ` Dragan Simic
  0 siblings, 1 reply; 20+ messages in thread
From: Marc Zyngier @ 2024-12-22 23:16 UTC (permalink / raw)
  To: Dragan Simic
  Cc: FUKAUMI Naoki, heiko, robh, krzk+dt, conor+dt, tglx, jonas,
	macromorgan, andyshrk, liujianfeng1994, dmt.yashin, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

Dragan,

On Sun, 22 Dec 2024 18:25:02 +0000,
Dragan Simic <dsimic@manjaro.org> wrote:
> 
> Hello Marc,
> 
> On 2024-12-22 10:04, Marc Zyngier wrote:
> > On Sun, 22 Dec 2024 03:03:53 +0000,
> > FUKAUMI Naoki <naoki@radxa.com> wrote:
> >> 
> >> Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply
> >> Rockchip 3588001 erratum workaround to RK3582.
> >> 
> >> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
> >> ---
> >>  drivers/irqchip/irq-gic-v3-its.c | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >> 
> >> diff --git a/drivers/irqchip/irq-gic-v3-its.c
> >> b/drivers/irqchip/irq-gic-v3-its.c
> >> index 92244cfa0464..c59ce9332dc0 100644
> >> --- a/drivers/irqchip/irq-gic-v3-its.c
> >> +++ b/drivers/irqchip/irq-gic-v3-its.c
> >> @@ -4861,7 +4861,8 @@ static bool __maybe_unused
> >> its_enable_rk3588001(void *data)
> >>  {
> >>  	struct its_node *its = data;
> >> 
> >> -	if (!of_machine_is_compatible("rockchip,rk3588") &&
> >> +	if (!of_machine_is_compatible("rockchip,rk3582") &&
> >> +	    !of_machine_is_compatible("rockchip,rk3588") &&
> >>  	    !of_machine_is_compatible("rockchip,rk3588s"))
> >>  		return false;
> >> 
> > 
> > Please use the relevant property for that purpose ("dma-noncoherent")
> > at the distributor and ITS levels. We're not adding extra compatibles
> > for this anymore, and you might as well fix the core dtsi to expose
> > such property.
> 
> Thanks for your response.
> 
> After a more detailed look into drivers/irqchip/irq-gic-v3-its.c,
> it seems that relying on the "dma-noncoherent" DT property may not
> be equivalent to adding another compatible check.

It is. My email makes it plain what needs doing.

> Here are a few
> quotations from irq-gic-v3-its.c, to illustrate this better:
> 
> 4746 static bool __maybe_unused its_enable_rk3588001(void *data)
> 4747 {
> 4748         struct its_node *its = data;
> 4749
> 4750         if (!of_machine_is_compatible("rockchip,rk3588") &&
> 4751             !of_machine_is_compatible("rockchip,rk3588s"))
> 4752                 return false;
> 4753
> 4754         its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
> 4755         gic_rdists->flags |= RDIST_FLAGS_FORCE_NON_SHAREABLE;
> 4756
> 4757         return true;
> 4758 }
> 4759
> 4760 static bool its_set_non_coherent(void *data)
> 4761 {
> 4762         struct its_node *its = data;
> 4763
> 4764         its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
> 4765         return true;
> 4766 }
> 
> 4814 #ifdef CONFIG_ROCKCHIP_ERRATUM_3588001
> 4815         {
> 4816                 .desc   = "ITS: Rockchip erratum RK3588001",
> 4817                 .iidr   = 0x0201743b,
> 4818                 .mask   = 0xffffffff,
> 4819                 .init   = its_enable_rk3588001,
> 4820         },
> 4821 #endif
> 4822         {
> 4823                 .desc   = "ITS: non-coherent attribute",
> 4824                 .property = "dma-noncoherent",
> 4825                 .init   = its_set_non_coherent,
> 4826         },

Nothing tickles me more than having my own work being thrown back at
me.

> 
> As visible above, using the "dma-noncoherent" DT property results
> in not setting the RDIST_FLAGS_FORCE_NON_SHAREABLE flag, which the
> its_enable_rk3588001() function does.  In other words, it doesn't
> seem that "dma-noncoherent" is a "drop-in" replacement for adding
> yet another compatible for the RK3582.

You clearly haven't read what I wrote. Or rather, you read what you
wanted to read, and ignored half of it.

>
> Modifying the current behavior of the "dma-noncoherent" DT property
> doesn't seem like an option, because it's already used in a couple
> of board dts(i) files.  Should we introduce another DT property,
> perhaps "dma-noncoherent-rdist" or something similar?

No. We have everything we need. Believe it or not, I actually know
what I'm talking about. I know, this is surprising. I surprise myself
sometimes.

> Could you, please, advise on how to move forward with this?  I'm

I already have.

> willing to implement the required patches, but I'd prefer to reduce
> the possible back-and-forth on them, to save everyone's time.

May I suggest that you read my email again? How about grepping through
the upstream DT collection and (shock, horror) look at the imx95.dtsi
file, which suffers from the same braindead behaviour as the RK stuff?

For clarity, let me paste it here again, and add some emphasis for
extra clarity:

> > Please use the relevant property for that purpose ("dma-noncoherent")
> > at the distributor and ITS levels. We're not adding extra compatibles
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Now, please go look at the code for real this time, appreciate how the
"dma-noncoherent" property placed at the distributor *AND* ITS levels
combine to give you the effects the hardware requires.

To sum it up: the standard properties and the Rockchip hacks are
strictly equivalent, there is no need for anything extra, and I stand
by my NAK on this very patch.

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/3] dt-bindings: arm: rockchip: Add Radxa E52C
  2024-12-22 13:11   ` Conor Dooley
@ 2024-12-23  2:13     ` FUKAUMI Naoki
  0 siblings, 0 replies; 20+ messages in thread
From: FUKAUMI Naoki @ 2024-12-23  2:13 UTC (permalink / raw)
  To: Conor Dooley
  Cc: heiko, robh, krzk+dt, conor+dt, maz, tglx, jonas, macromorgan,
	andyshrk, liujianfeng1994, dmt.yashin, dsimic, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

Hi Conor,

Thank you for your ack.

I fixed the patch so I didn't add your A-b in v2.

Best regards,

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

On 12/22/24 22:11, Conor Dooley wrote:
> On Sun, Dec 22, 2024 at 03:03:54AM +0000, FUKAUMI Naoki wrote:
>> Add devicetree binding for the Radxa E52C.
>>
>> Radxa E52C is a compact network computer based on the Rockchip RK3582
>> SoC.
>>
>> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
> 
> 
> Acked-by: Conor Dooley <conor.dooley@microchip.com>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
  2024-12-22 23:16       ` Marc Zyngier
@ 2024-12-23  6:10         ` Dragan Simic
  2024-12-23  9:29           ` Marc Zyngier
  0 siblings, 1 reply; 20+ messages in thread
From: Dragan Simic @ 2024-12-23  6:10 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: FUKAUMI Naoki, heiko, robh, krzk+dt, conor+dt, tglx, jonas,
	macromorgan, andyshrk, liujianfeng1994, dmt.yashin, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

Hello Marc,

On 2024-12-23 00:16, Marc Zyngier wrote:
> On Sun, 22 Dec 2024 18:25:02 +0000,
> Dragan Simic <dsimic@manjaro.org> wrote:
>> On 2024-12-22 10:04, Marc Zyngier wrote:
>> > On Sun, 22 Dec 2024 03:03:53 +0000,
>> > FUKAUMI Naoki <naoki@radxa.com> wrote:
>> >>
>> >> Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply
>> >> Rockchip 3588001 erratum workaround to RK3582.
>> >>
>> >> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
>> >> ---
>> >>  drivers/irqchip/irq-gic-v3-its.c | 3 ++-
>> >>  1 file changed, 2 insertions(+), 1 deletion(-)
>> >>
>> >> diff --git a/drivers/irqchip/irq-gic-v3-its.c
>> >> b/drivers/irqchip/irq-gic-v3-its.c
>> >> index 92244cfa0464..c59ce9332dc0 100644
>> >> --- a/drivers/irqchip/irq-gic-v3-its.c
>> >> +++ b/drivers/irqchip/irq-gic-v3-its.c
>> >> @@ -4861,7 +4861,8 @@ static bool __maybe_unused
>> >> its_enable_rk3588001(void *data)
>> >>  {
>> >>  	struct its_node *its = data;
>> >>
>> >> -	if (!of_machine_is_compatible("rockchip,rk3588") &&
>> >> +	if (!of_machine_is_compatible("rockchip,rk3582") &&
>> >> +	    !of_machine_is_compatible("rockchip,rk3588") &&
>> >>  	    !of_machine_is_compatible("rockchip,rk3588s"))
>> >>  		return false;
>> >>
>> >
>> > Please use the relevant property for that purpose ("dma-noncoherent")
>> > at the distributor and ITS levels. We're not adding extra compatibles
>> > for this anymore, and you might as well fix the core dtsi to expose
>> > such property.
>> 
>> Thanks for your response.
>> 
>> After a more detailed look into drivers/irqchip/irq-gic-v3-its.c,
>> it seems that relying on the "dma-noncoherent" DT property may not
>> be equivalent to adding another compatible check.
> 
> It is. My email makes it plain what needs doing.
> 
>> Here are a few
>> quotations from irq-gic-v3-its.c, to illustrate this better:
>> 
>> 4746 static bool __maybe_unused its_enable_rk3588001(void *data)
>> 4747 {
>> 4748         struct its_node *its = data;
>> 4749
>> 4750         if (!of_machine_is_compatible("rockchip,rk3588") &&
>> 4751             !of_machine_is_compatible("rockchip,rk3588s"))
>> 4752                 return false;
>> 4753
>> 4754         its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
>> 4755         gic_rdists->flags |= RDIST_FLAGS_FORCE_NON_SHAREABLE;
>> 4756
>> 4757         return true;
>> 4758 }
>> 4759
>> 4760 static bool its_set_non_coherent(void *data)
>> 4761 {
>> 4762         struct its_node *its = data;
>> 4763
>> 4764         its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
>> 4765         return true;
>> 4766 }
>> 
>> 4814 #ifdef CONFIG_ROCKCHIP_ERRATUM_3588001
>> 4815         {
>> 4816                 .desc   = "ITS: Rockchip erratum RK3588001",
>> 4817                 .iidr   = 0x0201743b,
>> 4818                 .mask   = 0xffffffff,
>> 4819                 .init   = its_enable_rk3588001,
>> 4820         },
>> 4821 #endif
>> 4822         {
>> 4823                 .desc   = "ITS: non-coherent attribute",
>> 4824                 .property = "dma-noncoherent",
>> 4825                 .init   = its_set_non_coherent,
>> 4826         },
> 
> Nothing tickles me more than having my own work being thrown back at
> me.

I'm sorry, that wasn't my intention.  I just wanted to make
referencing to what I was talking about a bit easier.  Though,
I now see that I was wrong, and I apologize for the noise.

>> As visible above, using the "dma-noncoherent" DT property results
>> in not setting the RDIST_FLAGS_FORCE_NON_SHAREABLE flag, which the
>> its_enable_rk3588001() function does.  In other words, it doesn't
>> seem that "dma-noncoherent" is a "drop-in" replacement for adding
>> yet another compatible for the RK3582.
> 
> You clearly haven't read what I wrote. Or rather, you read what you
> wanted to read, and ignored half of it.

No, it an honest mistake, nothing else.  My intention is never to
twist the reality in any way.

>> Modifying the current behavior of the "dma-noncoherent" DT property
>> doesn't seem like an option, because it's already used in a couple
>> of board dts(i) files.  Should we introduce another DT property,
>> perhaps "dma-noncoherent-rdist" or something similar?
> 
> No. We have everything we need. Believe it or not, I actually know
> what I'm talking about. I know, this is surprising. I surprise myself
> sometimes.

It wasn't my intention to insult you in any way.  I highly respect
everyone's work, including yours, of course.  I am a human being,
so perhaps I am allowed to be tired a bit and, as a result, make
an honest mistake from time to time?

>> Could you, please, advise on how to move forward with this?  I'm
> 
> I already have.

Yes, I see it now.  I'm sorry for not reading the code more carefully
the first time.  I read your earlier response carefully, but I missed
to read the code carefully as well.

>> willing to implement the required patches, but I'd prefer to reduce
>> the possible back-and-forth on them, to save everyone's time.
> 
> May I suggest that you read my email again? How about grepping through
> the upstream DT collection and (shock, horror) look at the imx95.dtsi
> file, which suffers from the same braindead behaviour as the RK stuff?
> 
> For clarity, let me paste it here again, and add some emphasis for
> extra clarity:
> 
>> > Please use the relevant property for that purpose ("dma-noncoherent")
>> > at the distributor and ITS levels. We're not adding extra compatibles
>        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Now, please go look at the code for real this time, appreciate how the
> "dma-noncoherent" property placed at the distributor *AND* ITS levels
> combine to give you the effects the hardware requires.

You're absolutely right, and I should've read the code more carefully.
I stand corrected, and I appreciate your additional explanation.

> To sum it up: the standard properties and the Rockchip hacks are
> strictly equivalent, there is no need for anything extra, and I stand
> by my NAK on this very patch.

Please note that I never questioned that this patch shouldn't be 
dropped.
I just missed some parts of the code, as an honest mistake, for which I
apologize once again.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
  2024-12-23  6:10         ` Dragan Simic
@ 2024-12-23  9:29           ` Marc Zyngier
  2024-12-23 10:11             ` Dragan Simic
  0 siblings, 1 reply; 20+ messages in thread
From: Marc Zyngier @ 2024-12-23  9:29 UTC (permalink / raw)
  To: Dragan Simic
  Cc: FUKAUMI Naoki, heiko, robh, krzk+dt, conor+dt, tglx, jonas,
	macromorgan, andyshrk, liujianfeng1994, dmt.yashin, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

On Mon, 23 Dec 2024 06:10:21 +0000,
Dragan Simic <dsimic@manjaro.org> wrote:
> 
> Hello Marc,
> 
> On 2024-12-23 00:16, Marc Zyngier wrote:
> > On Sun, 22 Dec 2024 18:25:02 +0000,
> > Dragan Simic <dsimic@manjaro.org> wrote:
> >> On 2024-12-22 10:04, Marc Zyngier wrote:
> >> > On Sun, 22 Dec 2024 03:03:53 +0000,
> >> > FUKAUMI Naoki <naoki@radxa.com> wrote:
> >> >>
> >> >> Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply
> >> >> Rockchip 3588001 erratum workaround to RK3582.
> >> >>
> >> >> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
> >> >> ---
> >> >>  drivers/irqchip/irq-gic-v3-its.c | 3 ++-
> >> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >> >>
> >> >> diff --git a/drivers/irqchip/irq-gic-v3-its.c
> >> >> b/drivers/irqchip/irq-gic-v3-its.c
> >> >> index 92244cfa0464..c59ce9332dc0 100644
> >> >> --- a/drivers/irqchip/irq-gic-v3-its.c
> >> >> +++ b/drivers/irqchip/irq-gic-v3-its.c
> >> >> @@ -4861,7 +4861,8 @@ static bool __maybe_unused
> >> >> its_enable_rk3588001(void *data)
> >> >>  {
> >> >>  	struct its_node *its = data;
> >> >>
> >> >> -	if (!of_machine_is_compatible("rockchip,rk3588") &&
> >> >> +	if (!of_machine_is_compatible("rockchip,rk3582") &&
> >> >> +	    !of_machine_is_compatible("rockchip,rk3588") &&
> >> >>  	    !of_machine_is_compatible("rockchip,rk3588s"))
> >> >>  		return false;
> >> >>
> >> >
> >> > Please use the relevant property for that purpose ("dma-noncoherent")
> >> > at the distributor and ITS levels. We're not adding extra compatibles
> >> > for this anymore, and you might as well fix the core dtsi to expose
> >> > such property.
> >> 
> >> Thanks for your response.
> >> 
> >> After a more detailed look into drivers/irqchip/irq-gic-v3-its.c,
> >> it seems that relying on the "dma-noncoherent" DT property may not
> >> be equivalent to adding another compatible check.
> > 
> > It is. My email makes it plain what needs doing.
> > 
> >> Here are a few
> >> quotations from irq-gic-v3-its.c, to illustrate this better:
> >> 
> >> 4746 static bool __maybe_unused its_enable_rk3588001(void *data)
> >> 4747 {
> >> 4748         struct its_node *its = data;
> >> 4749
> >> 4750         if (!of_machine_is_compatible("rockchip,rk3588") &&
> >> 4751             !of_machine_is_compatible("rockchip,rk3588s"))
> >> 4752                 return false;
> >> 4753
> >> 4754         its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
> >> 4755         gic_rdists->flags |= RDIST_FLAGS_FORCE_NON_SHAREABLE;
> >> 4756
> >> 4757         return true;
> >> 4758 }
> >> 4759
> >> 4760 static bool its_set_non_coherent(void *data)
> >> 4761 {
> >> 4762         struct its_node *its = data;
> >> 4763
> >> 4764         its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
> >> 4765         return true;
> >> 4766 }
> >> 
> >> 4814 #ifdef CONFIG_ROCKCHIP_ERRATUM_3588001
> >> 4815         {
> >> 4816                 .desc   = "ITS: Rockchip erratum RK3588001",
> >> 4817                 .iidr   = 0x0201743b,
> >> 4818                 .mask   = 0xffffffff,
> >> 4819                 .init   = its_enable_rk3588001,
> >> 4820         },
> >> 4821 #endif
> >> 4822         {
> >> 4823                 .desc   = "ITS: non-coherent attribute",
> >> 4824                 .property = "dma-noncoherent",
> >> 4825                 .init   = its_set_non_coherent,
> >> 4826         },
> > 
> > Nothing tickles me more than having my own work being thrown back at
> > me.
> 
> I'm sorry, that wasn't my intention.  I just wanted to make
> referencing to what I was talking about a bit easier.  Though,
> I now see that I was wrong, and I apologize for the noise.

No need to apologise. Just understand that the way you approached the
discussion was suboptimal. Next time, just ask how the proposed
solution works, rather than asserting that it doesn't.

Hopefully we can move on and you and Naoki can come up with a set of
patches that does the right thing.

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/3] arm64: dts: rockchip: Add Radxa E52C
  2024-12-22  3:03 ` [PATCH 3/3] arm64: dts: " FUKAUMI Naoki
  2024-12-22  3:58   ` FUKAUMI Naoki
@ 2024-12-23  9:39   ` Marc Zyngier
  2024-12-23 10:16     ` FUKAUMI Naoki
  2024-12-23 10:17     ` Dragan Simic
  1 sibling, 2 replies; 20+ messages in thread
From: Marc Zyngier @ 2024-12-23  9:39 UTC (permalink / raw)
  To: FUKAUMI Naoki
  Cc: heiko, robh, krzk+dt, conor+dt, tglx, jonas, macromorgan,
	andyshrk, liujianfeng1994, dmt.yashin, dsimic, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

On Sun, 22 Dec 2024 03:03:55 +0000,
FUKAUMI Naoki <naoki@radxa.com> wrote:
> 
> Radxa E52C is a compact network computer[1] based on the Rockchip
> RK3582 SoC:
> 
> - Dual Cortex-A76 and quad Cortex-A55 CPU

So you have *two* big cores.

> - 5TOPS NPU
> - 2GB/4GB/8GB LPDDR4 RAM
> - 16GB/32GB/64GB on-board eMMC
> - microSD card slot
> - USB 3.0 Type-A HOST port
> - USB Type-C debug port
> - USB Type-C power port (5V only)
> - 2x 2.5GbE ports
> 
> [1] https://radxa.com/products/network-computer/e52c
> 
> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
> ---
>  arch/arm64/boot/dts/rockchip/Makefile         |   1 +
>  .../boot/dts/rockchip/rk3582-radxa-e52c.dts   | 729 ++++++++++++++++++
>  2 files changed, 730 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts

[...]

> +&cpu_b0 {
> +	cpu-supply = <&vdd_cpu_big0_s0>;
> +};
> +
> +&cpu_b1 {
> +	cpu-supply = <&vdd_cpu_big0_s0>;
> +};
> +
> +&cpu_b2 {
> +	cpu-supply = <&vdd_cpu_big1_s0>;
> +};
> +
> +&cpu_b3 {
> +	cpu-supply = <&vdd_cpu_big1_s0>;
> +};

And yet you configure 4. If your HW only has 2 A76s, surely something
should remove these cores for this platform rather than keep them
around.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
  2024-12-23  9:29           ` Marc Zyngier
@ 2024-12-23 10:11             ` Dragan Simic
  2024-12-27 15:47               ` Dragan Simic
  0 siblings, 1 reply; 20+ messages in thread
From: Dragan Simic @ 2024-12-23 10:11 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: FUKAUMI Naoki, heiko, robh, krzk+dt, conor+dt, tglx, jonas,
	macromorgan, andyshrk, liujianfeng1994, dmt.yashin, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

On 2024-12-23 10:29, Marc Zyngier wrote:
> On Mon, 23 Dec 2024 06:10:21 +0000,
> Dragan Simic <dsimic@manjaro.org> wrote:
>> On 2024-12-23 00:16, Marc Zyngier wrote:
>> > On Sun, 22 Dec 2024 18:25:02 +0000,
>> > Dragan Simic <dsimic@manjaro.org> wrote:
>> >> On 2024-12-22 10:04, Marc Zyngier wrote:
>> >> > On Sun, 22 Dec 2024 03:03:53 +0000,
>> >> > FUKAUMI Naoki <naoki@radxa.com> wrote:
>> >> >>
>> >> >> Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply
>> >> >> Rockchip 3588001 erratum workaround to RK3582.
>> >> >>
>> >> >> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
>> >> >> ---
>> >> >>  drivers/irqchip/irq-gic-v3-its.c | 3 ++-
>> >> >>  1 file changed, 2 insertions(+), 1 deletion(-)
>> >> >>
>> >> >> diff --git a/drivers/irqchip/irq-gic-v3-its.c
>> >> >> b/drivers/irqchip/irq-gic-v3-its.c
>> >> >> index 92244cfa0464..c59ce9332dc0 100644
>> >> >> --- a/drivers/irqchip/irq-gic-v3-its.c
>> >> >> +++ b/drivers/irqchip/irq-gic-v3-its.c
>> >> >> @@ -4861,7 +4861,8 @@ static bool __maybe_unused
>> >> >> its_enable_rk3588001(void *data)
>> >> >>  {
>> >> >>  	struct its_node *its = data;
>> >> >>
>> >> >> -	if (!of_machine_is_compatible("rockchip,rk3588") &&
>> >> >> +	if (!of_machine_is_compatible("rockchip,rk3582") &&
>> >> >> +	    !of_machine_is_compatible("rockchip,rk3588") &&
>> >> >>  	    !of_machine_is_compatible("rockchip,rk3588s"))
>> >> >>  		return false;
>> >> >>
>> >> >
>> >> > Please use the relevant property for that purpose ("dma-noncoherent")
>> >> > at the distributor and ITS levels. We're not adding extra compatibles
>> >> > for this anymore, and you might as well fix the core dtsi to expose
>> >> > such property.
>> >>
>> >> Thanks for your response.
>> >>
>> >> After a more detailed look into drivers/irqchip/irq-gic-v3-its.c,
>> >> it seems that relying on the "dma-noncoherent" DT property may not
>> >> be equivalent to adding another compatible check.
>> >
>> > It is. My email makes it plain what needs doing.
>> >
>> >> Here are a few
>> >> quotations from irq-gic-v3-its.c, to illustrate this better:
>> >>
>> >> 4746 static bool __maybe_unused its_enable_rk3588001(void *data)
>> >> 4747 {
>> >> 4748         struct its_node *its = data;
>> >> 4749
>> >> 4750         if (!of_machine_is_compatible("rockchip,rk3588") &&
>> >> 4751             !of_machine_is_compatible("rockchip,rk3588s"))
>> >> 4752                 return false;
>> >> 4753
>> >> 4754         its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
>> >> 4755         gic_rdists->flags |= RDIST_FLAGS_FORCE_NON_SHAREABLE;
>> >> 4756
>> >> 4757         return true;
>> >> 4758 }
>> >> 4759
>> >> 4760 static bool its_set_non_coherent(void *data)
>> >> 4761 {
>> >> 4762         struct its_node *its = data;
>> >> 4763
>> >> 4764         its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
>> >> 4765         return true;
>> >> 4766 }
>> >>
>> >> 4814 #ifdef CONFIG_ROCKCHIP_ERRATUM_3588001
>> >> 4815         {
>> >> 4816                 .desc   = "ITS: Rockchip erratum RK3588001",
>> >> 4817                 .iidr   = 0x0201743b,
>> >> 4818                 .mask   = 0xffffffff,
>> >> 4819                 .init   = its_enable_rk3588001,
>> >> 4820         },
>> >> 4821 #endif
>> >> 4822         {
>> >> 4823                 .desc   = "ITS: non-coherent attribute",
>> >> 4824                 .property = "dma-noncoherent",
>> >> 4825                 .init   = its_set_non_coherent,
>> >> 4826         },
>> >
>> > Nothing tickles me more than having my own work being thrown back at
>> > me.
>> 
>> I'm sorry, that wasn't my intention.  I just wanted to make
>> referencing to what I was talking about a bit easier.  Though,
>> I now see that I was wrong, and I apologize for the noise.
> 
> No need to apologise. Just understand that the way you approached the
> discussion was suboptimal. Next time, just ask how the proposed
> solution works, rather than asserting that it doesn't.

Thanks.  Indeed, the way I approached it was waaay suboptimal.
I just wanted to clarify that it was an honest mistake resulting
from not looking at the code carefully enough, nothing else.

> Hopefully we can move on and you and Naoki can come up with a set of
> patches that does the right thing.

Of course.  I've already prepared a small patch series that,
hopefully, does the right thing when it comes to the Rockchip
3588001 errata.  I'll submit it soon, after I check the patches
a bit further.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/3] arm64: dts: rockchip: Add Radxa E52C
  2024-12-23  9:39   ` Marc Zyngier
@ 2024-12-23 10:16     ` FUKAUMI Naoki
  2024-12-27 10:27       ` Marc Zyngier
  2024-12-23 10:17     ` Dragan Simic
  1 sibling, 1 reply; 20+ messages in thread
From: FUKAUMI Naoki @ 2024-12-23 10:16 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: heiko, robh, krzk+dt, conor+dt, tglx, jonas, macromorgan,
	andyshrk, liujianfeng1994, dmt.yashin, dsimic, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

Hi Marc,

On 12/23/24 18:39, Marc Zyngier wrote:
> On Sun, 22 Dec 2024 03:03:55 +0000,
> FUKAUMI Naoki <naoki@radxa.com> wrote:
>>
>> Radxa E52C is a compact network computer[1] based on the Rockchip
>> RK3582 SoC:
>>
>> - Dual Cortex-A76 and quad Cortex-A55 CPU
> 
> So you have *two* big cores.
> 
>> - 5TOPS NPU
>> - 2GB/4GB/8GB LPDDR4 RAM
>> - 16GB/32GB/64GB on-board eMMC
>> - microSD card slot
>> - USB 3.0 Type-A HOST port
>> - USB Type-C debug port
>> - USB Type-C power port (5V only)
>> - 2x 2.5GbE ports
>>
>> [1] https://radxa.com/products/network-computer/e52c
>>
>> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
>> ---
>>   arch/arm64/boot/dts/rockchip/Makefile         |   1 +
>>   .../boot/dts/rockchip/rk3582-radxa-e52c.dts   | 729 ++++++++++++++++++
>>   2 files changed, 730 insertions(+)
>>   create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
> 
> [...]
> 
>> +&cpu_b0 {
>> +	cpu-supply = <&vdd_cpu_big0_s0>;
>> +};
>> +
>> +&cpu_b1 {
>> +	cpu-supply = <&vdd_cpu_big0_s0>;
>> +};
>> +
>> +&cpu_b2 {
>> +	cpu-supply = <&vdd_cpu_big1_s0>;
>> +};
>> +
>> +&cpu_b3 {
>> +	cpu-supply = <&vdd_cpu_big1_s0>;
>> +};
> 
> And yet you configure 4. If your HW only has 2 A76s, surely something
> should remove these cores for this platform rather than keep them
> around.

One of the four cores may be defective. This information is stored in 
the OTP, so we need to run our software to detect which core is 
defective. Then we disable the cluster that contains the defective core.

please refer
  https://patchwork.ozlabs.org/project/uboot/patch/20241210222341.3537543-2-jonas@kwiboo.se/

Best regards,

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

> Thanks,
> 
> 	M.
> 


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/3] arm64: dts: rockchip: Add Radxa E52C
  2024-12-23  9:39   ` Marc Zyngier
  2024-12-23 10:16     ` FUKAUMI Naoki
@ 2024-12-23 10:17     ` Dragan Simic
  1 sibling, 0 replies; 20+ messages in thread
From: Dragan Simic @ 2024-12-23 10:17 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: FUKAUMI Naoki, heiko, robh, krzk+dt, conor+dt, tglx, jonas,
	macromorgan, andyshrk, liujianfeng1994, dmt.yashin, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

Hello Marc,

On 2024-12-23 10:39, Marc Zyngier wrote:
> On Sun, 22 Dec 2024 03:03:55 +0000,
> FUKAUMI Naoki <naoki@radxa.com> wrote:
>> 
>> Radxa E52C is a compact network computer[1] based on the Rockchip
>> RK3582 SoC:
>> 
>> - Dual Cortex-A76 and quad Cortex-A55 CPU
> 
> So you have *two* big cores.
> 
>> - 5TOPS NPU
>> - 2GB/4GB/8GB LPDDR4 RAM
>> - 16GB/32GB/64GB on-board eMMC
>> - microSD card slot
>> - USB 3.0 Type-A HOST port
>> - USB Type-C debug port
>> - USB Type-C power port (5V only)
>> - 2x 2.5GbE ports
>> 
>> [1] https://radxa.com/products/network-computer/e52c
>> 
>> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
>> ---
>>  arch/arm64/boot/dts/rockchip/Makefile         |   1 +
>>  .../boot/dts/rockchip/rk3582-radxa-e52c.dts   | 729 
>> ++++++++++++++++++
>>  2 files changed, 730 insertions(+)
>>  create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
> 
> [...]
> 
>> +&cpu_b0 {
>> +	cpu-supply = <&vdd_cpu_big0_s0>;
>> +};
>> +
>> +&cpu_b1 {
>> +	cpu-supply = <&vdd_cpu_big0_s0>;
>> +};
>> +
>> +&cpu_b2 {
>> +	cpu-supply = <&vdd_cpu_big1_s0>;
>> +};
>> +
>> +&cpu_b3 {
>> +	cpu-supply = <&vdd_cpu_big1_s0>;
>> +};
> 
> And yet you configure 4. If your HW only has 2 A76s, surely something
> should remove these cores for this platform rather than keep them
> around.

Indeed, U-Boot will do that, based on the efuses that contain the
data required to determine which CPU cores (and/or clusters) are
defective and need to be marked as disabled.

Maybe we should add a comment block above the "cpu_b0" node, to
describe that a bit better.  Perhaps something like this:

   /*
    * In the Rockchip RK3582 SoC, some CPU cores end up disabled
    * and unused because they're marked in the efuses as defective.
    * The disabling in the DT is performed by the boot loader.
    */

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/3] rockchip: Add support for RK3582
  2024-12-22  3:03 [PATCH 0/3] rockchip: Add support for RK3582 FUKAUMI Naoki
                   ` (2 preceding siblings ...)
  2024-12-22  3:03 ` [PATCH 3/3] arm64: dts: " FUKAUMI Naoki
@ 2024-12-23 12:52 ` Rob Herring (Arm)
  3 siblings, 0 replies; 20+ messages in thread
From: Rob Herring (Arm) @ 2024-12-23 12:52 UTC (permalink / raw)
  To: FUKAUMI Naoki
  Cc: tglx, liujianfeng1994, heiko, marcin.juszkiewicz, krzk+dt, tim,
	devicetree, linux-arm-kernel, macromorgan, conor+dt, jonas,
	sebastian.reichel, andyshrk, dmt.yashin, jbx6244, maz, alchark,
	dsimic, linux-rockchip, michael.riesch


On Sun, 22 Dec 2024 03:03:52 +0000, FUKAUMI Naoki wrote:
> Rockchip RK3582 is a scaled down version of Rockchip RK3588(S).
> 
> - Dual Cortex-A76 and quad Cortex-A55 CPU
> - No GPU
> - 5TOPS NPU
> - H.264/H.265 video encoder up to 4K@60fps
> 
> This patch series adds RK3582 support to the GIC and the Radxa E52C
> compact network computer.
> 
> FUKAUMI Naoki (3):
>   irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
>   dt-bindings: arm: rockchip: Add Radxa E52C
>   arm64: dts: rockchip: Add Radxa E52C
> 
>  .../devicetree/bindings/arm/rockchip.yaml     |   5 +
>  arch/arm64/boot/dts/rockchip/Makefile         |   1 +
>  .../boot/dts/rockchip/rk3582-radxa-e52c.dts   | 729 ++++++++++++++++++
>  drivers/irqchip/irq-gic-v3-its.c              |   3 +-
>  4 files changed, 737 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
> 
> --
> 2.43.0
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y rockchip/rk3582-radxa-e52c.dtb' for 20241222030355.2246-1-naoki@radxa.com:

arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dtb: adc-keys: 'key-vendor' does not match any of the regexes: '^button-', 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/input/adc-keys.yaml#
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dtb: pwm-leds: led-1:linux,default-trigger: 'oneOf' conditional failed, one must be fixed:
	'r8169-4-4100:00:link' is not one of ['backlight', 'default-on', 'heartbeat', 'disk-activity', 'disk-read', 'disk-write', 'timer', 'pattern', 'audio-micmute', 'audio-mute', 'bluetooth-power', 'flash', 'kbd-capslock', 'mtd', 'nand-disk', 'netdev', 'none', 'rc-feedback', 'torch', 'usb-gadget', 'usb-host', 'usbport']
	'r8169-4-4100:00:link' does not match '^cpu[0-9]*$'
	'r8169-4-4100:00:link' does not match '^hci[0-9]+-power$'
	'r8169-4-4100:00:link' does not match '^mmc[0-9]+$'
	'r8169-4-4100:00:link' does not match '^phy[0-9]+tx$'
	from schema $id: http://devicetree.org/schemas/leds/leds-pwm.yaml#
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dtb: pwm-leds: led-1: Unevaluated properties are not allowed ('linux,default-trigger' was unexpected)
	from schema $id: http://devicetree.org/schemas/leds/leds-pwm.yaml#
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dtb: pwm-leds: led-2:linux,default-trigger: 'oneOf' conditional failed, one must be fixed:
	'r8169-3-3100:00:link' is not one of ['backlight', 'default-on', 'heartbeat', 'disk-activity', 'disk-read', 'disk-write', 'timer', 'pattern', 'audio-micmute', 'audio-mute', 'bluetooth-power', 'flash', 'kbd-capslock', 'mtd', 'nand-disk', 'netdev', 'none', 'rc-feedback', 'torch', 'usb-gadget', 'usb-host', 'usbport']
	'r8169-3-3100:00:link' does not match '^cpu[0-9]*$'
	'r8169-3-3100:00:link' does not match '^hci[0-9]+-power$'
	'r8169-3-3100:00:link' does not match '^mmc[0-9]+$'
	'r8169-3-3100:00:link' does not match '^phy[0-9]+tx$'
	from schema $id: http://devicetree.org/schemas/leds/leds-pwm.yaml#
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dtb: pwm-leds: led-2: Unevaluated properties are not allowed ('linux,default-trigger' was unexpected)
	from schema $id: http://devicetree.org/schemas/leds/leds-pwm.yaml#






^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/3] arm64: dts: rockchip: Add Radxa E52C
  2024-12-23 10:16     ` FUKAUMI Naoki
@ 2024-12-27 10:27       ` Marc Zyngier
  0 siblings, 0 replies; 20+ messages in thread
From: Marc Zyngier @ 2024-12-27 10:27 UTC (permalink / raw)
  To: FUKAUMI Naoki
  Cc: heiko, robh, krzk+dt, conor+dt, tglx, jonas, macromorgan,
	andyshrk, liujianfeng1994, dmt.yashin, dsimic, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

On Mon, 23 Dec 2024 10:16:04 +0000,
FUKAUMI Naoki <naoki@radxa.com> wrote:
> 
> Hi Marc,
> 
> On 12/23/24 18:39, Marc Zyngier wrote:
> > On Sun, 22 Dec 2024 03:03:55 +0000,
> > FUKAUMI Naoki <naoki@radxa.com> wrote:
> >> 
> >> Radxa E52C is a compact network computer[1] based on the Rockchip
> >> RK3582 SoC:
> >> 
> >> - Dual Cortex-A76 and quad Cortex-A55 CPU
> > 
> > So you have *two* big cores.
> > 
> >> - 5TOPS NPU
> >> - 2GB/4GB/8GB LPDDR4 RAM
> >> - 16GB/32GB/64GB on-board eMMC
> >> - microSD card slot
> >> - USB 3.0 Type-A HOST port
> >> - USB Type-C debug port
> >> - USB Type-C power port (5V only)
> >> - 2x 2.5GbE ports
> >> 
> >> [1] https://radxa.com/products/network-computer/e52c
> >> 
> >> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
> >> ---
> >>   arch/arm64/boot/dts/rockchip/Makefile         |   1 +
> >>   .../boot/dts/rockchip/rk3582-radxa-e52c.dts   | 729 ++++++++++++++++++
> >>   2 files changed, 730 insertions(+)
> >>   create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
> > 
> > [...]
> > 
> >> +&cpu_b0 {
> >> +	cpu-supply = <&vdd_cpu_big0_s0>;
> >> +};
> >> +
> >> +&cpu_b1 {
> >> +	cpu-supply = <&vdd_cpu_big0_s0>;
> >> +};
> >> +
> >> +&cpu_b2 {
> >> +	cpu-supply = <&vdd_cpu_big1_s0>;
> >> +};
> >> +
> >> +&cpu_b3 {
> >> +	cpu-supply = <&vdd_cpu_big1_s0>;
> >> +};
> > 
> > And yet you configure 4. If your HW only has 2 A76s, surely something
> > should remove these cores for this platform rather than keep them
> > around.
> 
> One of the four cores may be defective. This information is stored in
> the OTP, so we need to run our software to detect which core is
> defective. Then we disable the cluster that contains the defective
> core.

Is it one? Is it two? If anything, this sort of binning information
should be clearly explained in the cover letter, and a comment placed
in the DTS file to explain that the DT needs to be further processed
by the bootloader to be valid.

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
  2024-12-23 10:11             ` Dragan Simic
@ 2024-12-27 15:47               ` Dragan Simic
  0 siblings, 0 replies; 20+ messages in thread
From: Dragan Simic @ 2024-12-27 15:47 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: FUKAUMI Naoki, heiko, robh, krzk+dt, conor+dt, tglx, jonas,
	macromorgan, andyshrk, liujianfeng1994, dmt.yashin, tim,
	marcin.juszkiewicz, michael.riesch, alchark, sebastian.reichel,
	jbx6244, devicetree, linux-arm-kernel, linux-rockchip

On 2024-12-23 11:11, Dragan Simic wrote:
> On 2024-12-23 10:29, Marc Zyngier wrote:
>> On Mon, 23 Dec 2024 06:10:21 +0000,
>> Dragan Simic <dsimic@manjaro.org> wrote:
>>> On 2024-12-23 00:16, Marc Zyngier wrote:
>>> > On Sun, 22 Dec 2024 18:25:02 +0000,
>>> > Dragan Simic <dsimic@manjaro.org> wrote:
>>> >> On 2024-12-22 10:04, Marc Zyngier wrote:
>>> >> > On Sun, 22 Dec 2024 03:03:53 +0000,
>>> >> > FUKAUMI Naoki <naoki@radxa.com> wrote:
>>> >> >>
>>> >> >> Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply
>>> >> >> Rockchip 3588001 erratum workaround to RK3582.
>>> >> >>
>>> >> >> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
>>> >> >> ---
>>> >> >>  drivers/irqchip/irq-gic-v3-its.c | 3 ++-
>>> >> >>  1 file changed, 2 insertions(+), 1 deletion(-)
>>> >> >>
>>> >> >> diff --git a/drivers/irqchip/irq-gic-v3-its.c
>>> >> >> b/drivers/irqchip/irq-gic-v3-its.c
>>> >> >> index 92244cfa0464..c59ce9332dc0 100644
>>> >> >> --- a/drivers/irqchip/irq-gic-v3-its.c
>>> >> >> +++ b/drivers/irqchip/irq-gic-v3-its.c
>>> >> >> @@ -4861,7 +4861,8 @@ static bool __maybe_unused
>>> >> >> its_enable_rk3588001(void *data)
>>> >> >>  {
>>> >> >>  	struct its_node *its = data;
>>> >> >>
>>> >> >> -	if (!of_machine_is_compatible("rockchip,rk3588") &&
>>> >> >> +	if (!of_machine_is_compatible("rockchip,rk3582") &&
>>> >> >> +	    !of_machine_is_compatible("rockchip,rk3588") &&
>>> >> >>  	    !of_machine_is_compatible("rockchip,rk3588s"))
>>> >> >>  		return false;
>>> >> >>
>>> >> >
>>> >> > Please use the relevant property for that purpose ("dma-noncoherent")
>>> >> > at the distributor and ITS levels. We're not adding extra compatibles
>>> >> > for this anymore, and you might as well fix the core dtsi to expose
>>> >> > such property.
>>> >>
>>> >> Thanks for your response.
>>> >>
>>> >> After a more detailed look into drivers/irqchip/irq-gic-v3-its.c,
>>> >> it seems that relying on the "dma-noncoherent" DT property may not
>>> >> be equivalent to adding another compatible check.
>>> >
>>> > It is. My email makes it plain what needs doing.
>>> >
>>> >> Here are a few
>>> >> quotations from irq-gic-v3-its.c, to illustrate this better:
>>> >>
>>> >> 4746 static bool __maybe_unused its_enable_rk3588001(void *data)
>>> >> 4747 {
>>> >> 4748         struct its_node *its = data;
>>> >> 4749
>>> >> 4750         if (!of_machine_is_compatible("rockchip,rk3588") &&
>>> >> 4751             !of_machine_is_compatible("rockchip,rk3588s"))
>>> >> 4752                 return false;
>>> >> 4753
>>> >> 4754         its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
>>> >> 4755         gic_rdists->flags |= RDIST_FLAGS_FORCE_NON_SHAREABLE;
>>> >> 4756
>>> >> 4757         return true;
>>> >> 4758 }
>>> >> 4759
>>> >> 4760 static bool its_set_non_coherent(void *data)
>>> >> 4761 {
>>> >> 4762         struct its_node *its = data;
>>> >> 4763
>>> >> 4764         its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
>>> >> 4765         return true;
>>> >> 4766 }
>>> >>
>>> >> 4814 #ifdef CONFIG_ROCKCHIP_ERRATUM_3588001
>>> >> 4815         {
>>> >> 4816                 .desc   = "ITS: Rockchip erratum RK3588001",
>>> >> 4817                 .iidr   = 0x0201743b,
>>> >> 4818                 .mask   = 0xffffffff,
>>> >> 4819                 .init   = its_enable_rk3588001,
>>> >> 4820         },
>>> >> 4821 #endif
>>> >> 4822         {
>>> >> 4823                 .desc   = "ITS: non-coherent attribute",
>>> >> 4824                 .property = "dma-noncoherent",
>>> >> 4825                 .init   = its_set_non_coherent,
>>> >> 4826         },
>>> >
>>> > Nothing tickles me more than having my own work being thrown back at
>>> > me.
>>> 
>>> I'm sorry, that wasn't my intention.  I just wanted to make
>>> referencing to what I was talking about a bit easier.  Though,
>>> I now see that I was wrong, and I apologize for the noise.
>> 
>> No need to apologise. Just understand that the way you approached the
>> discussion was suboptimal. Next time, just ask how the proposed
>> solution works, rather than asserting that it doesn't.
> 
> Thanks.  Indeed, the way I approached it was waaay suboptimal.
> I just wanted to clarify that it was an honest mistake resulting
> from not looking at the code carefully enough, nothing else.
> 
>> Hopefully we can move on and you and Naoki can come up with a set of
>> patches that does the right thing.
> 
> Of course.  I've already prepared a small patch series that,
> hopefully, does the right thing when it comes to the Rockchip
> 3588001 errata.  I'll submit it soon, after I check the patches
> a bit further.

For future reference, here's the link to the above-mentioned
small patch series on the linux-rockchip mailing list:

https://lore.kernel.org/linux-rockchip/cover.1735313870.git.dsimic@manjaro.org/T/#u

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-12-27 15:47 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-22  3:03 [PATCH 0/3] rockchip: Add support for RK3582 FUKAUMI Naoki
2024-12-22  3:03 ` [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround " FUKAUMI Naoki
2024-12-22  9:04   ` Marc Zyngier
2024-12-22 12:10     ` FUKAUMI Naoki
2024-12-22 18:25     ` Dragan Simic
2024-12-22 23:16       ` Marc Zyngier
2024-12-23  6:10         ` Dragan Simic
2024-12-23  9:29           ` Marc Zyngier
2024-12-23 10:11             ` Dragan Simic
2024-12-27 15:47               ` Dragan Simic
2024-12-22  3:03 ` [PATCH 2/3] dt-bindings: arm: rockchip: Add Radxa E52C FUKAUMI Naoki
2024-12-22 13:11   ` Conor Dooley
2024-12-23  2:13     ` FUKAUMI Naoki
2024-12-22  3:03 ` [PATCH 3/3] arm64: dts: " FUKAUMI Naoki
2024-12-22  3:58   ` FUKAUMI Naoki
2024-12-23  9:39   ` Marc Zyngier
2024-12-23 10:16     ` FUKAUMI Naoki
2024-12-27 10:27       ` Marc Zyngier
2024-12-23 10:17     ` Dragan Simic
2024-12-23 12:52 ` [PATCH 0/3] rockchip: Add support for RK3582 Rob Herring (Arm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).