Re: [PATCH 8/8] ARM: dts: rockchip: Add Relfor Saib board

Krzysztof Kozlowski
2024-08-24T07:59:51Z

On Fri, Aug 23, 2024 at 09:05:28PM +0530, Karthikeyan Krishnasamy wrote:
> Saib is an consumer electronics board from Relfor
> consists of 1GB RAM, 4GB eMMC.
> Other peripherals:
> - Bluetooth 4.2
> - WiFi 5G/2.5G
> - IR transmitter/receiver
> - RTC rv3028
> - User leds
> - Switch
>
> Add support for it.
>
> Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
> ---
> arch/arm/boot/dts/rockchip/Makefile | 1 +
> .../boot/dts/rockchip/rv1109-relfor-saib.dts | 439 ++++++++++++++++++
> 2 files changed, 440 insertions(+)
> create mode 100644 arch/arm/boot/dts/rockchip/rv1109-relfor-saib.dts
>
> diff --git a/arch/arm/boot/dts/rockchip/Makefile b/arch/arm/boot/dts/rockchip/Makefile
> index ab4cd9aab722..716f5540e438 100644
> --- a/arch/arm/boot/dts/rockchip/Makefile
> +++ b/arch/arm/boot/dts/rockchip/Makefile
> @@ -2,6 +2,7 @@
> dtb-$(CONFIG_ARCH_ROCKCHIP) += \
> rv1108-elgin-r1.dtb \
> rv1108-evb.dtb \
> + rv1109-relfor-saib.dtb \
> rv1109-sonoff-ihost.dtb \
> rv1126-edgeble-neu2-io.dtb \
> rv1126-sonoff-ihost.dtb \
> diff --git a/arch/arm/boot/dts/rockchip/rv1109-relfor-saib.dts b/arch/arm/boot/dts/rockchip/rv1109-relfor-saib.dts
> new file mode 100644
> index 000000000000..7d7292bad779
> --- /dev/null
> +++ b/arch/arm/boot/dts/rockchip/rv1109-relfor-saib.dts
> @@ -0,0 +1,439 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2024 Relfor Labs Pvt. Ltd.
> + */
> +
> +
> +/dts-v1/;
> +#include "rv1109.dtsi"
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/input/input.h>
> +
> +/ {
> + model = "Rockchip RV1109 Relfor Saib Board";
> + compatible = "relfor,saib", "rockchip,rv1109";
> +
> + vcc5v0_sys: vcc5v0-sys {
> + compatible = "regulator-fixed";
> + regulator-name = "vcc5v0_sys";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + };
> +
> + /* Power sequence 1 */
> + vcc_0v8: vcc-0v8 {
> + compatible = "regulator-fixed";
> + regulator-name = "vcc_0v8";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <800000>;
> + startup-delay-us = <150>;
> + regulator-max-microvolt = <800000>;
> + vin-supply = <&vcc5v0_sys>;
> + };
> +
> + /* Power sequence 2 */
> + vdd_npu_vepu: vdd-npu-vepu {
> + compatible = "pwm-regulator";
> + pwms = <&pwm1 0 5000 1>;
> + regulator-name = "vdd_npu_vepu";
> + regulator-min-microvolt = <650000>;
> + regulator-max-microvolt = <950000>;
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-settling-time-up-us = <18000>;
> + pwm-supply = <&vcc3v3_sys>;
> + vin-supply = <&vcc5v0_sys>;
> + status = "okay";

Where is it being disabled?

> + };
> +
> + vdd_arm: vdd-arm {
> + compatible = "pwm-regulator";
> + pwms = <&pwm0 0 5000 1>;
> + regulator-name = "vdd_arm";
> + regulator-min-microvolt = <720000>;
> + regulator-max-microvolt = <1000000>;
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-settling-time-up-us = <18000>;
> + pwm-supply = <&vcc3v3_sys>;
> + vin-supply = <&vcc5v0_sys>;
> + status = "okay";

? same question

> + };
> +
> + /* Power sequence 3 */
> + vcc_1v8: vcc-1v8 {
> + compatible = "regulator-fixed";
> + regulator-name = "vcc_1v8";
> + regulator-always-on;
> + regulator-boot-on;
> + startup-delay-us = <51000>;
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + vin-supply = <&vcc5v0_sys>;
> + };
> +
> + /* Power sequence 4 */
> + vcc_1v2_ddr: vcc-1v2-ddr {
> + compatible = "regulator-fixed";
> + regulator-name = "vcc_1v2_ddr";
> + regulator-always-on;
> + regulator-boot-on;
> + startup-delay-us = <75000>;
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <1200000>;
> + vin-supply = <&vcc5v0_sys>;
> + };
> +
> + /* Power sequence 5 */
> + vcc3v3_sys: vcc3v3-sys {
> + status = "okay";

Huh? Drop

> + compatible = "regulator-fixed";
> + regulator-name = "vcc3v3_sys";
> + regulator-always-on;
> + regulator-boot-on;
> + startup-delay-us = <75000>;
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + vin-supply = <&vcc5v0_sys>;
> + };
> +
> + /* LDO 2.5V */
> + vcc_2v5_ddr: vcc-2v5-ddr {
> + compatible = "regulator-fixed";
> + regulator-name = "vcc_2v5_ddr";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <2500000>;
> + regulator-max-microvolt = <2500000>;
> + vin-supply = <&vcc3v3_sys>;
> + };
> +
> + /* Power IR transmitter */
> + vcc1v8_ir: vcc1v8-ir {
> + status = "okay";

Drop

> + compatible = "regulator-fixed";
> + regulator-name = "vcc1v8_ir";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + vin-supply = <&vcc5v0_sys>;
> + };
> +
> + sdio_pwrseq: pwrseq-sdio {
> + compatible = "mmc-pwrseq-simple";
> + clocks = <&rtc0>;
> + clock-names = "ext_clock";
> + pinctrl-names = "default";
> + pinctrl-0 = <&wifi_enable_h>;
> + reset-gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
> + };
> +
> + ir_receiver: ir-receiver {
> + compatible = "gpio-ir-receiver";
> + gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&ir_rx>;
> + status = "okay";

Where is it disabled?

> + };
> +
> + ir_transmitter: ir-transmitter {
> + compatible = "pwm-ir-tx";
> + pwms = <&pwm11 0 10000000 1>;
> + status = "okay";

Do you see the pattern here? Some NEW nodes have status=okay, some not.
It does not make much sense, right?

> + };
> +
> + gpio-keys {
> + compatible = "gpio-keys";
> +
> + button {
> + gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_HIGH>;
> + status = "okay";

Drop... this applies everywhere.

> + linux,code = <KEY_DATA>;
> + label = "GPIO User Switch";
> + linux,input-type = <1>;
> + };

Best regards,
Krzysztof