All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
To: quentin.schulz@theobroma-systems.com, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	heiko@sntech.de
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
Subject: [PATCH 2/3] arm64: dts: rockchip: expose BIOS Disable feedback pin on rk3399-puma
Date: Thu, 14 Dec 2023 13:28:00 +0100	[thread overview]
Message-ID: <20231214122801.3144180-2-vahe.grigoryan@theobroma-systems.com> (raw)
In-Reply-To: <20231214122801.3144180-1-vahe.grigoryan@theobroma-systems.com>

The Puma SoM allows to select in hardware directly which storage
medium to try for loading the bootloader, either SPI-NOR followed
by eMMC followed by SD card, or SD card only.

This signal is exposed on the Q7 connector and allows carrierboards
to control it however they want.

This feedback pin allows to know in which state the SoM currently
is and provided the current state isn't modified until next reboot,
know from which storage medium the bootloader could be loaded from
next time.

Signed-off-by: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
---
 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
index 20e3f41efe97..ea9d6ab73df5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
@@ -119,6 +119,20 @@ &emmc_phy {
 	drive-impedance-ohm = <33>;
 };
 
+&gpio0 {
+	/*
+	 * The BIOS_DISABLE hog is a feedback pin for the actual status of the
+	 * signal. This usually represents the state of a switch on the baseboard.
+	 * The pin has a 10k pull-up resistor connected, so no pull-up setting is needed.
+	 */
+	bios-disable-hog {
+		gpios = <RK_PB0 GPIO_ACTIVE_HIGH>;
+		gpio-hog;
+		input;
+		line-name = "bios_disable";
+	};
+};
+
 &gmac {
 	assigned-clocks = <&cru SCLK_RMII_SRC>;
 	assigned-clock-parents = <&clkin_gmac>;
-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
To: quentin.schulz@theobroma-systems.com, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	heiko@sntech.de
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
Subject: [PATCH 2/3] arm64: dts: rockchip: expose BIOS Disable feedback pin on rk3399-puma
Date: Thu, 14 Dec 2023 13:28:00 +0100	[thread overview]
Message-ID: <20231214122801.3144180-2-vahe.grigoryan@theobroma-systems.com> (raw)
In-Reply-To: <20231214122801.3144180-1-vahe.grigoryan@theobroma-systems.com>

The Puma SoM allows to select in hardware directly which storage
medium to try for loading the bootloader, either SPI-NOR followed
by eMMC followed by SD card, or SD card only.

This signal is exposed on the Q7 connector and allows carrierboards
to control it however they want.

This feedback pin allows to know in which state the SoM currently
is and provided the current state isn't modified until next reboot,
know from which storage medium the bootloader could be loaded from
next time.

Signed-off-by: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
---
 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
index 20e3f41efe97..ea9d6ab73df5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
@@ -119,6 +119,20 @@ &emmc_phy {
 	drive-impedance-ohm = <33>;
 };
 
+&gpio0 {
+	/*
+	 * The BIOS_DISABLE hog is a feedback pin for the actual status of the
+	 * signal. This usually represents the state of a switch on the baseboard.
+	 * The pin has a 10k pull-up resistor connected, so no pull-up setting is needed.
+	 */
+	bios-disable-hog {
+		gpios = <RK_PB0 GPIO_ACTIVE_HIGH>;
+		gpio-hog;
+		input;
+		line-name = "bios_disable";
+	};
+};
+
 &gmac {
 	assigned-clocks = <&cru SCLK_RMII_SRC>;
 	assigned-clock-parents = <&clkin_gmac>;
-- 
2.34.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
To: quentin.schulz@theobroma-systems.com, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	heiko@sntech.de
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
Subject: [PATCH 2/3] arm64: dts: rockchip: expose BIOS Disable feedback pin on rk3399-puma
Date: Thu, 14 Dec 2023 13:28:00 +0100	[thread overview]
Message-ID: <20231214122801.3144180-2-vahe.grigoryan@theobroma-systems.com> (raw)
In-Reply-To: <20231214122801.3144180-1-vahe.grigoryan@theobroma-systems.com>

The Puma SoM allows to select in hardware directly which storage
medium to try for loading the bootloader, either SPI-NOR followed
by eMMC followed by SD card, or SD card only.

This signal is exposed on the Q7 connector and allows carrierboards
to control it however they want.

This feedback pin allows to know in which state the SoM currently
is and provided the current state isn't modified until next reboot,
know from which storage medium the bootloader could be loaded from
next time.

Signed-off-by: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
---
 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
index 20e3f41efe97..ea9d6ab73df5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
@@ -119,6 +119,20 @@ &emmc_phy {
 	drive-impedance-ohm = <33>;
 };
 
+&gpio0 {
+	/*
+	 * The BIOS_DISABLE hog is a feedback pin for the actual status of the
+	 * signal. This usually represents the state of a switch on the baseboard.
+	 * The pin has a 10k pull-up resistor connected, so no pull-up setting is needed.
+	 */
+	bios-disable-hog {
+		gpios = <RK_PB0 GPIO_ACTIVE_HIGH>;
+		gpio-hog;
+		input;
+		line-name = "bios_disable";
+	};
+};
+
 &gmac {
 	assigned-clocks = <&cru SCLK_RMII_SRC>;
 	assigned-clock-parents = <&clkin_gmac>;
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-12-14 12:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 12:27 [PATCH 1/3] arm64: dts: rockchip: fix misleading comment in rk3399-puma-haikou.dts Vahe Grigoryan
2023-12-14 12:27 ` Vahe Grigoryan
2023-12-14 12:27 ` Vahe Grigoryan
2023-12-14 12:28 ` Vahe Grigoryan [this message]
2023-12-14 12:28   ` [PATCH 2/3] arm64: dts: rockchip: expose BIOS Disable feedback pin on rk3399-puma Vahe Grigoryan
2023-12-14 12:28   ` Vahe Grigoryan
2023-12-14 12:28 ` [PATCH 3/3] arm64: dts: rockchip: make Haikou buttons compatible with "gpio-keys" Vahe Grigoryan
2023-12-14 12:28   ` Vahe Grigoryan
2023-12-14 12:28   ` Vahe Grigoryan
2023-12-15 21:10 ` [PATCH 1/3] arm64: dts: rockchip: fix misleading comment in rk3399-puma-haikou.dts Heiko Stuebner
2023-12-15 21:10   ` Heiko Stuebner
2023-12-15 21:10   ` Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231214122801.3144180-2-vahe.grigoryan@theobroma-systems.com \
    --to=vahe.grigoryan@theobroma-systems.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.