* [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0
@ 2025-03-23 12:37 ` J. Neuschäfer via B4 Relay
0 siblings, 0 replies; 32+ messages in thread
From: J. Neuschäfer via B4 Relay @ 2025-03-23 12:37 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Martin Blumenstingl, Jerome Brunet, Kevin Hilman
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-amlogic,
J. Neuschäfer
From: "J. Neuschäfer" <j.ne@posteo.net>
Fernsehfee[1] ("TV fairy") 3.0 is a set-top box with HDMI input and
output ports. It originally ran Android 4.4 and a Linux 3.10 kernel.
The following features are tested and known to work:
- Ethernet
- Power LED (switching between green and red)
- Power button
- eMMC
- SD Card
- USB
- Wifi
The following features are untested or not working:
- HDMI input and output
- Infrared remote control input and output
[1]: https://fernsehfee.de/ (German), https://telefairy.com/ (English)
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
---
arch/arm/boot/dts/amlogic/Makefile | 1 +
arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts | 219 +++++++++++++++++++++++
arch/arm/boot/dts/amlogic/meson8.dtsi | 18 ++
3 files changed, 238 insertions(+)
diff --git a/arch/arm/boot/dts/amlogic/Makefile b/arch/arm/boot/dts/amlogic/Makefile
index 504c533b1173298ec7f45099888d88b2fb74b978..3c8a1e88b386cd7fb9b5f41f47d7ff78fe7eeacc 100644
--- a/arch/arm/boot/dts/amlogic/Makefile
+++ b/arch/arm/boot/dts/amlogic/Makefile
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_MACH_MESON8) += \
meson8-minix-neo-x8.dtb \
+ meson8-fernsehfee3.dtb \
meson8b-ec100.dtb \
meson8b-mxq.dtb \
meson8b-odroidc1.dtb \
diff --git a/arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts b/arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts
new file mode 100644
index 0000000000000000000000000000000000000000..47507316ac4a56f2bcf84ad0446a06ea9fe890cd
--- /dev/null
+++ b/arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts
@@ -0,0 +1,219 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+// Copyright (C) 2025 J. Neuschäfer <j.ne@posteo.net>
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/leds/common.h>
+
+#include "meson8.dtsi"
+
+/ {
+ model = "Fernsehfee 3.0";
+ compatible = "tcu,fernsehfee3", "amlogic,meson8";
+
+ aliases {
+ serial0 = &uart_AO;
+ gpiochip0 = &gpio;
+ gpiochip1 = &gpio_ao;
+ i2c0 = &i2c_AO;
+ i2c1 = &i2c_B;
+ mmc0 = &sdhc;
+ mmc1 = &sdio;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x40000000>; /* 1 GiB */
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ power-button {
+ label = "Power button";
+ linux,code = <KEY_POWER>;
+ gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ /*
+ * The power LED can be turned red, otherwise it is green.
+ */
+ gpios = <&gpio_ao GPIO_TEST_N GPIO_ACTIVE_LOW>;
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
+ };
+ };
+
+ vcc_5v: regulator-5v {
+ /* 5V rail, always on as long as the system is running */
+ compatible = "regulator-fixed";
+ regulator-name = "5V";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ vcc_3v3: regulator-3v3 {
+ /* Chipown AP2420 step-down converter */
+ compatible = "regulator-fixed";
+ regulator-name = "3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_5v>;
+ };
+
+ vcc_1v8: regulator-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vcc_3v3>;
+ };
+
+ wifi_3v3: regulator-wifi {
+ compatible = "regulator-fixed";
+ regulator-name = "3.3V-WIFI";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_3v3>;
+ gpio = <&gpio GPIOX_11 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+ðmac {
+ status = "okay";
+ pinctrl-0 = <ð_pins>;
+ pinctrl-names = "default";
+ phy-handle = <ð_phy0>;
+ phy-mode = "rmii";
+
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eth_phy0: ethernet-phy@0 {
+ /* IC Plus IP101A (0x02430c54) */
+ reg = <0>;
+
+ reset-assert-us = <10000>;
+ reset-deassert-us = <10000>;
+ reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&i2c_AO {
+ status = "okay";
+ pinctrl-0 = <&i2c_ao_pins>;
+ pinctrl-names = "default";
+
+ pmic@32 {
+ compatible = "ricoh,rn5t618";
+ reg = <0x32>;
+ system-power-controller;
+ };
+
+ eeprom@50 {
+ /* Fairchild FM24C08A */
+ compatible = "atmel,24c08";
+ reg = <0x50>;
+ pagesize = <16>;
+ wp-gpios = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
+ num-addresses = <4>;
+ };
+};
+
+&i2c_B {
+ status = "okay";
+ pinctrl-0 = <&i2c_b_pins>;
+ pinctrl-names = "default";
+
+ /* TODO: SiI9293 HDMI receiver @ 0x39 */
+};
+
+&sdhc {
+ status = "okay";
+ pinctrl-0 = <&sdxc_c_pins>;
+ pinctrl-names = "default";
+
+ /* eMMC */
+ bus-width = <8>;
+ max-frequency = <100000000>;
+
+ disable-wp;
+ cap-mmc-highspeed;
+ mmc-hs200-1_8v;
+ no-sdio;
+
+ vmmc-supply = <&vcc_3v3>;
+ vqmmc-supply = <&vcc_1v8>;
+};
+
+&sdio {
+ status = "okay";
+ pinctrl-0 = <&sd_b_pins>;
+
+ /* SD card */
+ sd_card_slot: slot@1 {
+ compatible = "mmc-slot";
+ reg = <1>;
+ status = "okay";
+
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ disable-wp;
+
+ cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
+
+ vmmc-supply = <&vcc_3v3>;
+ };
+};
+
+&uart_AO {
+ status = "okay";
+ pinctrl-0 = <&uart_ao_a_pins>;
+ pinctrl-names = "default";
+};
+
+&usb0 {
+ status = "okay";
+};
+
+&usb0_phy {
+ status = "okay";
+};
+
+&usb1 {
+ status = "okay";
+ dr_mode = "host";
+ /*
+ * This bus features a Realtek RTL8188 2.4GHz WiFi module, with a
+ * 3.3V supply voltage that must be enabled before use.
+ */
+ vbus-supply = <&wifi_3v3>;
+};
+
+&usb1_phy {
+ status = "okay";
+};
+
+&ir_receiver {
+ status = "okay";
+ pinctrl-0 = <&ir_recv_pins>;
+ pinctrl-names = "default";
+};
diff --git a/arch/arm/boot/dts/amlogic/meson8.dtsi b/arch/arm/boot/dts/amlogic/meson8.dtsi
index 9ff142d9fe3f4576fdd3230a966c8a6250870de7..300eccbfc0071ce10290be1c496132ac6b6a4dbc 100644
--- a/arch/arm/boot/dts/amlogic/meson8.dtsi
+++ b/arch/arm/boot/dts/amlogic/meson8.dtsi
@@ -477,6 +477,14 @@ gpio: bank@80 {
gpio-ranges = <&pinctrl_cbus 0 0 120>;
};
+ i2c_b_pins: i2c-b {
+ mux {
+ groups = "i2c_sda_b", "i2c_sck_b";
+ function = "i2c_b";
+ bias-disable;
+ };
+ };
+
sd_a_pins: sd-a {
mux {
groups = "sd_d0_a", "sd_d1_a", "sd_d2_a",
@@ -522,6 +530,16 @@ mux {
};
};
+ sdxc_c_pins: sdxc-c {
+ mux {
+ groups = "sdxc_d0_c", "sdxc_d13_c",
+ "sdxc_clk_c", "sdxc_cmd_c",
+ "sdxc_d47_c";
+ function = "sdxc_c";
+ bias_pull_up;
+ };
+ };
+
spdif_out_pins: spdif-out {
mux {
groups = "spdif_out";
--
2.48.0.rc1.219.gb6b6757d772
^ permalink raw reply related [flat|nested] 32+ messages in thread* [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0
@ 2025-03-23 12:37 ` J. Neuschäfer via B4 Relay
0 siblings, 0 replies; 32+ messages in thread
From: J. Neuschäfer via B4 Relay @ 2025-03-23 12:37 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Martin Blumenstingl, Jerome Brunet, Kevin Hilman
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-amlogic,
J. Neuschäfer
From: "J. Neuschäfer" <j.ne@posteo.net>
Fernsehfee[1] ("TV fairy") 3.0 is a set-top box with HDMI input and
output ports. It originally ran Android 4.4 and a Linux 3.10 kernel.
The following features are tested and known to work:
- Ethernet
- Power LED (switching between green and red)
- Power button
- eMMC
- SD Card
- USB
- Wifi
The following features are untested or not working:
- HDMI input and output
- Infrared remote control input and output
[1]: https://fernsehfee.de/ (German), https://telefairy.com/ (English)
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
---
arch/arm/boot/dts/amlogic/Makefile | 1 +
arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts | 219 +++++++++++++++++++++++
arch/arm/boot/dts/amlogic/meson8.dtsi | 18 ++
3 files changed, 238 insertions(+)
diff --git a/arch/arm/boot/dts/amlogic/Makefile b/arch/arm/boot/dts/amlogic/Makefile
index 504c533b1173298ec7f45099888d88b2fb74b978..3c8a1e88b386cd7fb9b5f41f47d7ff78fe7eeacc 100644
--- a/arch/arm/boot/dts/amlogic/Makefile
+++ b/arch/arm/boot/dts/amlogic/Makefile
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_MACH_MESON8) += \
meson8-minix-neo-x8.dtb \
+ meson8-fernsehfee3.dtb \
meson8b-ec100.dtb \
meson8b-mxq.dtb \
meson8b-odroidc1.dtb \
diff --git a/arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts b/arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts
new file mode 100644
index 0000000000000000000000000000000000000000..47507316ac4a56f2bcf84ad0446a06ea9fe890cd
--- /dev/null
+++ b/arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts
@@ -0,0 +1,219 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+// Copyright (C) 2025 J. Neuschäfer <j.ne@posteo.net>
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/leds/common.h>
+
+#include "meson8.dtsi"
+
+/ {
+ model = "Fernsehfee 3.0";
+ compatible = "tcu,fernsehfee3", "amlogic,meson8";
+
+ aliases {
+ serial0 = &uart_AO;
+ gpiochip0 = &gpio;
+ gpiochip1 = &gpio_ao;
+ i2c0 = &i2c_AO;
+ i2c1 = &i2c_B;
+ mmc0 = &sdhc;
+ mmc1 = &sdio;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x40000000>; /* 1 GiB */
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ power-button {
+ label = "Power button";
+ linux,code = <KEY_POWER>;
+ gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ /*
+ * The power LED can be turned red, otherwise it is green.
+ */
+ gpios = <&gpio_ao GPIO_TEST_N GPIO_ACTIVE_LOW>;
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
+ };
+ };
+
+ vcc_5v: regulator-5v {
+ /* 5V rail, always on as long as the system is running */
+ compatible = "regulator-fixed";
+ regulator-name = "5V";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ vcc_3v3: regulator-3v3 {
+ /* Chipown AP2420 step-down converter */
+ compatible = "regulator-fixed";
+ regulator-name = "3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_5v>;
+ };
+
+ vcc_1v8: regulator-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vcc_3v3>;
+ };
+
+ wifi_3v3: regulator-wifi {
+ compatible = "regulator-fixed";
+ regulator-name = "3.3V-WIFI";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_3v3>;
+ gpio = <&gpio GPIOX_11 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+ðmac {
+ status = "okay";
+ pinctrl-0 = <ð_pins>;
+ pinctrl-names = "default";
+ phy-handle = <ð_phy0>;
+ phy-mode = "rmii";
+
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eth_phy0: ethernet-phy@0 {
+ /* IC Plus IP101A (0x02430c54) */
+ reg = <0>;
+
+ reset-assert-us = <10000>;
+ reset-deassert-us = <10000>;
+ reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&i2c_AO {
+ status = "okay";
+ pinctrl-0 = <&i2c_ao_pins>;
+ pinctrl-names = "default";
+
+ pmic@32 {
+ compatible = "ricoh,rn5t618";
+ reg = <0x32>;
+ system-power-controller;
+ };
+
+ eeprom@50 {
+ /* Fairchild FM24C08A */
+ compatible = "atmel,24c08";
+ reg = <0x50>;
+ pagesize = <16>;
+ wp-gpios = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
+ num-addresses = <4>;
+ };
+};
+
+&i2c_B {
+ status = "okay";
+ pinctrl-0 = <&i2c_b_pins>;
+ pinctrl-names = "default";
+
+ /* TODO: SiI9293 HDMI receiver @ 0x39 */
+};
+
+&sdhc {
+ status = "okay";
+ pinctrl-0 = <&sdxc_c_pins>;
+ pinctrl-names = "default";
+
+ /* eMMC */
+ bus-width = <8>;
+ max-frequency = <100000000>;
+
+ disable-wp;
+ cap-mmc-highspeed;
+ mmc-hs200-1_8v;
+ no-sdio;
+
+ vmmc-supply = <&vcc_3v3>;
+ vqmmc-supply = <&vcc_1v8>;
+};
+
+&sdio {
+ status = "okay";
+ pinctrl-0 = <&sd_b_pins>;
+
+ /* SD card */
+ sd_card_slot: slot@1 {
+ compatible = "mmc-slot";
+ reg = <1>;
+ status = "okay";
+
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ disable-wp;
+
+ cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
+
+ vmmc-supply = <&vcc_3v3>;
+ };
+};
+
+&uart_AO {
+ status = "okay";
+ pinctrl-0 = <&uart_ao_a_pins>;
+ pinctrl-names = "default";
+};
+
+&usb0 {
+ status = "okay";
+};
+
+&usb0_phy {
+ status = "okay";
+};
+
+&usb1 {
+ status = "okay";
+ dr_mode = "host";
+ /*
+ * This bus features a Realtek RTL8188 2.4GHz WiFi module, with a
+ * 3.3V supply voltage that must be enabled before use.
+ */
+ vbus-supply = <&wifi_3v3>;
+};
+
+&usb1_phy {
+ status = "okay";
+};
+
+&ir_receiver {
+ status = "okay";
+ pinctrl-0 = <&ir_recv_pins>;
+ pinctrl-names = "default";
+};
diff --git a/arch/arm/boot/dts/amlogic/meson8.dtsi b/arch/arm/boot/dts/amlogic/meson8.dtsi
index 9ff142d9fe3f4576fdd3230a966c8a6250870de7..300eccbfc0071ce10290be1c496132ac6b6a4dbc 100644
--- a/arch/arm/boot/dts/amlogic/meson8.dtsi
+++ b/arch/arm/boot/dts/amlogic/meson8.dtsi
@@ -477,6 +477,14 @@ gpio: bank@80 {
gpio-ranges = <&pinctrl_cbus 0 0 120>;
};
+ i2c_b_pins: i2c-b {
+ mux {
+ groups = "i2c_sda_b", "i2c_sck_b";
+ function = "i2c_b";
+ bias-disable;
+ };
+ };
+
sd_a_pins: sd-a {
mux {
groups = "sd_d0_a", "sd_d1_a", "sd_d2_a",
@@ -522,6 +530,16 @@ mux {
};
};
+ sdxc_c_pins: sdxc-c {
+ mux {
+ groups = "sdxc_d0_c", "sdxc_d13_c",
+ "sdxc_clk_c", "sdxc_cmd_c",
+ "sdxc_d47_c";
+ function = "sdxc_c";
+ bias_pull_up;
+ };
+ };
+
spdif_out_pins: spdif-out {
mux {
groups = "spdif_out";
--
2.48.0.rc1.219.gb6b6757d772
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 32+ messages in thread* HDMI output (Re: [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0)
2025-03-23 12:37 ` J. Neuschäfer via B4 Relay
@ 2025-03-23 17:31 ` J. Neuschäfer
-1 siblings, 0 replies; 32+ messages in thread
From: J. Neuschäfer @ 2025-03-23 17:31 UTC (permalink / raw)
To: j.ne
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Martin Blumenstingl, Jerome Brunet, Kevin Hilman, devicetree,
linux-kernel, linux-arm-kernel, linux-amlogic
On Sun, Mar 23, 2025 at 01:37:52PM +0100, J. Neuschäfer via B4 Relay wrote:
> From: "J. Neuschäfer" <j.ne@posteo.net>
>
> Fernsehfee[1] ("TV fairy") 3.0 is a set-top box with HDMI input and
> output ports. It originally ran Android 4.4 and a Linux 3.10 kernel.
>
> The following features are tested and known to work:
>
> - Ethernet
> - Power LED (switching between green and red)
> - Power button
> - eMMC
> - SD Card
> - USB
> - Wifi
>
> The following features are untested or not working:
>
> - HDMI input and output
> - Infrared remote control input and output
FWIW, with Martin Blumenstingl's meson-mx-integration-6.13-20250112
branch, HDMI output works (albeit not at all resolutions).
Best regards,
J. Neuschäfer
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 32+ messages in thread* HDMI output (Re: [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0)
@ 2025-03-23 17:31 ` J. Neuschäfer
0 siblings, 0 replies; 32+ messages in thread
From: J. Neuschäfer @ 2025-03-23 17:31 UTC (permalink / raw)
To: j.ne
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Martin Blumenstingl, Jerome Brunet, Kevin Hilman, devicetree,
linux-kernel, linux-arm-kernel, linux-amlogic
On Sun, Mar 23, 2025 at 01:37:52PM +0100, J. Neuschäfer via B4 Relay wrote:
> From: "J. Neuschäfer" <j.ne@posteo.net>
>
> Fernsehfee[1] ("TV fairy") 3.0 is a set-top box with HDMI input and
> output ports. It originally ran Android 4.4 and a Linux 3.10 kernel.
>
> The following features are tested and known to work:
>
> - Ethernet
> - Power LED (switching between green and red)
> - Power button
> - eMMC
> - SD Card
> - USB
> - Wifi
>
> The following features are untested or not working:
>
> - HDMI input and output
> - Infrared remote control input and output
FWIW, with Martin Blumenstingl's meson-mx-integration-6.13-20250112
branch, HDMI output works (albeit not at all resolutions).
Best regards,
J. Neuschäfer
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0
2025-03-23 12:37 ` J. Neuschäfer via B4 Relay
@ 2025-03-24 6:59 ` Neil Armstrong
-1 siblings, 0 replies; 32+ messages in thread
From: Neil Armstrong @ 2025-03-24 6:59 UTC (permalink / raw)
To: j.ne, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Martin Blumenstingl, Jerome Brunet, Kevin Hilman
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-amlogic
On 23/03/2025 13:37, J. Neuschäfer via B4 Relay wrote:
> From: "J. Neuschäfer" <j.ne@posteo.net>
>
> Fernsehfee[1] ("TV fairy") 3.0 is a set-top box with HDMI input and
> output ports. It originally ran Android 4.4 and a Linux 3.10 kernel.
>
> The following features are tested and known to work:
>
> - Ethernet
> - Power LED (switching between green and red)
> - Power button
> - eMMC
> - SD Card
> - USB
> - Wifi
>
> The following features are untested or not working:
>
> - HDMI input and output
> - Infrared remote control input and output
>
> [1]: https://fernsehfee.de/ (German), https://telefairy.com/ (English)
>
> Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
> ---
> arch/arm/boot/dts/amlogic/Makefile | 1 +
> arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts | 219 +++++++++++++++++++++++
> arch/arm/boot/dts/amlogic/meson8.dtsi | 18 ++
> 3 files changed, 238 insertions(+)
>
> diff --git a/arch/arm/boot/dts/amlogic/Makefile b/arch/arm/boot/dts/amlogic/Makefile
> index 504c533b1173298ec7f45099888d88b2fb74b978..3c8a1e88b386cd7fb9b5f41f47d7ff78fe7eeacc 100644
> --- a/arch/arm/boot/dts/amlogic/Makefile
> +++ b/arch/arm/boot/dts/amlogic/Makefile
> @@ -1,6 +1,7 @@
> # SPDX-License-Identifier: GPL-2.0
> dtb-$(CONFIG_MACH_MESON8) += \
> meson8-minix-neo-x8.dtb \
> + meson8-fernsehfee3.dtb \
> meson8b-ec100.dtb \
> meson8b-mxq.dtb \
> meson8b-odroidc1.dtb \
> diff --git a/arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts b/arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts
> new file mode 100644
> index 0000000000000000000000000000000000000000..47507316ac4a56f2bcf84ad0446a06ea9fe890cd
> --- /dev/null
> +++ b/arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts
> @@ -0,0 +1,219 @@
> +// SPDX-License-Identifier: GPL-2.0-only OR MIT
> +// Copyright (C) 2025 J. Neuschäfer <j.ne@posteo.net>
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/linux-event-codes.h>
> +#include <dt-bindings/leds/common.h>
> +
> +#include "meson8.dtsi"
> +
> +/ {
> + model = "Fernsehfee 3.0";
> + compatible = "tcu,fernsehfee3", "amlogic,meson8";
> +
> + aliases {
> + serial0 = &uart_AO;
> + gpiochip0 = &gpio;
> + gpiochip1 = &gpio_ao;
> + i2c0 = &i2c_AO;
> + i2c1 = &i2c_B;
> + mmc0 = &sdhc;
> + mmc1 = &sdio;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + memory@0 {
> + device_type = "memory";
> + reg = <0x0 0x40000000>; /* 1 GiB */
> + };
> +
> + gpio-keys {
> + compatible = "gpio-keys-polled";
> + poll-interval = <100>;
> +
> + power-button {
> + label = "Power button";
> + linux,code = <KEY_POWER>;
> + gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
> + };
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> +
> + led-0 {
> + /*
> + * The power LED can be turned red, otherwise it is green.
> + */
> + gpios = <&gpio_ao GPIO_TEST_N GPIO_ACTIVE_LOW>;
> + function = LED_FUNCTION_POWER;
> + color = <LED_COLOR_ID_RED>;
> + };
> + };
> +
> + vcc_5v: regulator-5v {
> + /* 5V rail, always on as long as the system is running */
> + compatible = "regulator-fixed";
> + regulator-name = "5V";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + regulator-always-on;
> + };
> +
> + vcc_3v3: regulator-3v3 {
> + /* Chipown AP2420 step-down converter */
> + compatible = "regulator-fixed";
> + regulator-name = "3.3V";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + vin-supply = <&vcc_5v>;
> + };
> +
> + vcc_1v8: regulator-1v8 {
> + compatible = "regulator-fixed";
> + regulator-name = "1.8V";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + vin-supply = <&vcc_3v3>;
> + };
> +
> + wifi_3v3: regulator-wifi {
> + compatible = "regulator-fixed";
> + regulator-name = "3.3V-WIFI";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + vin-supply = <&vcc_3v3>;
> + gpio = <&gpio GPIOX_11 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +};
> +
> +ðmac {
> + status = "okay";
> + pinctrl-0 = <ð_pins>;
> + pinctrl-names = "default";
> + phy-handle = <ð_phy0>;
> + phy-mode = "rmii";
> +
> + mdio {
> + compatible = "snps,dwmac-mdio";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + eth_phy0: ethernet-phy@0 {
> + /* IC Plus IP101A (0x02430c54) */
> + reg = <0>;
> +
> + reset-assert-us = <10000>;
> + reset-deassert-us = <10000>;
> + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
> + };
> + };
> +};
> +
> +&i2c_AO {
> + status = "okay";
> + pinctrl-0 = <&i2c_ao_pins>;
> + pinctrl-names = "default";
> +
> + pmic@32 {
> + compatible = "ricoh,rn5t618";
> + reg = <0x32>;
> + system-power-controller;
> + };
> +
> + eeprom@50 {
> + /* Fairchild FM24C08A */
> + compatible = "atmel,24c08";
> + reg = <0x50>;
> + pagesize = <16>;
> + wp-gpios = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
> + num-addresses = <4>;
> + };
> +};
> +
> +&i2c_B {
> + status = "okay";
> + pinctrl-0 = <&i2c_b_pins>;
> + pinctrl-names = "default";
> +
> + /* TODO: SiI9293 HDMI receiver @ 0x39 */
> +};
> +
> +&sdhc {
> + status = "okay";
> + pinctrl-0 = <&sdxc_c_pins>;
> + pinctrl-names = "default";
> +
> + /* eMMC */
> + bus-width = <8>;
> + max-frequency = <100000000>;
> +
> + disable-wp;
> + cap-mmc-highspeed;
> + mmc-hs200-1_8v;
> + no-sdio;
> +
> + vmmc-supply = <&vcc_3v3>;
> + vqmmc-supply = <&vcc_1v8>;
> +};
> +
> +&sdio {
> + status = "okay";
> + pinctrl-0 = <&sd_b_pins>;
> +
> + /* SD card */
> + sd_card_slot: slot@1 {
Small NIT: no need to for a label here
> + compatible = "mmc-slot";
> + reg = <1>;
> + status = "okay";
> +
> + bus-width = <4>;
> + cap-mmc-highspeed;
> + cap-sd-highspeed;
> + disable-wp;
> +
> + cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
> +
> + vmmc-supply = <&vcc_3v3>;
> + };
> +};
> +
> +&uart_AO {
> + status = "okay";
> + pinctrl-0 = <&uart_ao_a_pins>;
> + pinctrl-names = "default";
> +};
> +
> +&usb0 {
> + status = "okay";
> +};
> +
> +&usb0_phy {
> + status = "okay";
> +};
> +
> +&usb1 {
> + status = "okay";
> + dr_mode = "host";
> + /*
> + * This bus features a Realtek RTL8188 2.4GHz WiFi module, with a
> + * 3.3V supply voltage that must be enabled before use.
> + */
> + vbus-supply = <&wifi_3v3>;
> +};
> +
> +&usb1_phy {
> + status = "okay";
> +};
> +
> +&ir_receiver {
> + status = "okay";
> + pinctrl-0 = <&ir_recv_pins>;
> + pinctrl-names = "default";
> +};
> diff --git a/arch/arm/boot/dts/amlogic/meson8.dtsi b/arch/arm/boot/dts/amlogic/meson8.dtsi
> index 9ff142d9fe3f4576fdd3230a966c8a6250870de7..300eccbfc0071ce10290be1c496132ac6b6a4dbc 100644
> --- a/arch/arm/boot/dts/amlogic/meson8.dtsi
> +++ b/arch/arm/boot/dts/amlogic/meson8.dtsi
> @@ -477,6 +477,14 @@ gpio: bank@80 {
> gpio-ranges = <&pinctrl_cbus 0 0 120>;
> };
>
> + i2c_b_pins: i2c-b {
> + mux {
> + groups = "i2c_sda_b", "i2c_sck_b";
> + function = "i2c_b";
> + bias-disable;
> + };
> + };
> +
> sd_a_pins: sd-a {
> mux {
> groups = "sd_d0_a", "sd_d1_a", "sd_d2_a",
> @@ -522,6 +530,16 @@ mux {
> };
> };
>
> + sdxc_c_pins: sdxc-c {
> + mux {
> + groups = "sdxc_d0_c", "sdxc_d13_c",
> + "sdxc_clk_c", "sdxc_cmd_c",
> + "sdxc_d47_c";
> + function = "sdxc_c";
> + bias_pull_up;
> + };
> + };
> +
> spdif_out_pins: spdif-out {
> mux {
> groups = "spdif_out";
>
Apart that:
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks !
Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0
@ 2025-03-24 6:59 ` Neil Armstrong
0 siblings, 0 replies; 32+ messages in thread
From: Neil Armstrong @ 2025-03-24 6:59 UTC (permalink / raw)
To: j.ne, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Martin Blumenstingl, Jerome Brunet, Kevin Hilman
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-amlogic
On 23/03/2025 13:37, J. Neuschäfer via B4 Relay wrote:
> From: "J. Neuschäfer" <j.ne@posteo.net>
>
> Fernsehfee[1] ("TV fairy") 3.0 is a set-top box with HDMI input and
> output ports. It originally ran Android 4.4 and a Linux 3.10 kernel.
>
> The following features are tested and known to work:
>
> - Ethernet
> - Power LED (switching between green and red)
> - Power button
> - eMMC
> - SD Card
> - USB
> - Wifi
>
> The following features are untested or not working:
>
> - HDMI input and output
> - Infrared remote control input and output
>
> [1]: https://fernsehfee.de/ (German), https://telefairy.com/ (English)
>
> Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
> ---
> arch/arm/boot/dts/amlogic/Makefile | 1 +
> arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts | 219 +++++++++++++++++++++++
> arch/arm/boot/dts/amlogic/meson8.dtsi | 18 ++
> 3 files changed, 238 insertions(+)
>
> diff --git a/arch/arm/boot/dts/amlogic/Makefile b/arch/arm/boot/dts/amlogic/Makefile
> index 504c533b1173298ec7f45099888d88b2fb74b978..3c8a1e88b386cd7fb9b5f41f47d7ff78fe7eeacc 100644
> --- a/arch/arm/boot/dts/amlogic/Makefile
> +++ b/arch/arm/boot/dts/amlogic/Makefile
> @@ -1,6 +1,7 @@
> # SPDX-License-Identifier: GPL-2.0
> dtb-$(CONFIG_MACH_MESON8) += \
> meson8-minix-neo-x8.dtb \
> + meson8-fernsehfee3.dtb \
> meson8b-ec100.dtb \
> meson8b-mxq.dtb \
> meson8b-odroidc1.dtb \
> diff --git a/arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts b/arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts
> new file mode 100644
> index 0000000000000000000000000000000000000000..47507316ac4a56f2bcf84ad0446a06ea9fe890cd
> --- /dev/null
> +++ b/arch/arm/boot/dts/amlogic/meson8-fernsehfee3.dts
> @@ -0,0 +1,219 @@
> +// SPDX-License-Identifier: GPL-2.0-only OR MIT
> +// Copyright (C) 2025 J. Neuschäfer <j.ne@posteo.net>
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/linux-event-codes.h>
> +#include <dt-bindings/leds/common.h>
> +
> +#include "meson8.dtsi"
> +
> +/ {
> + model = "Fernsehfee 3.0";
> + compatible = "tcu,fernsehfee3", "amlogic,meson8";
> +
> + aliases {
> + serial0 = &uart_AO;
> + gpiochip0 = &gpio;
> + gpiochip1 = &gpio_ao;
> + i2c0 = &i2c_AO;
> + i2c1 = &i2c_B;
> + mmc0 = &sdhc;
> + mmc1 = &sdio;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + memory@0 {
> + device_type = "memory";
> + reg = <0x0 0x40000000>; /* 1 GiB */
> + };
> +
> + gpio-keys {
> + compatible = "gpio-keys-polled";
> + poll-interval = <100>;
> +
> + power-button {
> + label = "Power button";
> + linux,code = <KEY_POWER>;
> + gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
> + };
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> +
> + led-0 {
> + /*
> + * The power LED can be turned red, otherwise it is green.
> + */
> + gpios = <&gpio_ao GPIO_TEST_N GPIO_ACTIVE_LOW>;
> + function = LED_FUNCTION_POWER;
> + color = <LED_COLOR_ID_RED>;
> + };
> + };
> +
> + vcc_5v: regulator-5v {
> + /* 5V rail, always on as long as the system is running */
> + compatible = "regulator-fixed";
> + regulator-name = "5V";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + regulator-always-on;
> + };
> +
> + vcc_3v3: regulator-3v3 {
> + /* Chipown AP2420 step-down converter */
> + compatible = "regulator-fixed";
> + regulator-name = "3.3V";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + vin-supply = <&vcc_5v>;
> + };
> +
> + vcc_1v8: regulator-1v8 {
> + compatible = "regulator-fixed";
> + regulator-name = "1.8V";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + vin-supply = <&vcc_3v3>;
> + };
> +
> + wifi_3v3: regulator-wifi {
> + compatible = "regulator-fixed";
> + regulator-name = "3.3V-WIFI";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + vin-supply = <&vcc_3v3>;
> + gpio = <&gpio GPIOX_11 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +};
> +
> +ðmac {
> + status = "okay";
> + pinctrl-0 = <ð_pins>;
> + pinctrl-names = "default";
> + phy-handle = <ð_phy0>;
> + phy-mode = "rmii";
> +
> + mdio {
> + compatible = "snps,dwmac-mdio";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + eth_phy0: ethernet-phy@0 {
> + /* IC Plus IP101A (0x02430c54) */
> + reg = <0>;
> +
> + reset-assert-us = <10000>;
> + reset-deassert-us = <10000>;
> + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
> + };
> + };
> +};
> +
> +&i2c_AO {
> + status = "okay";
> + pinctrl-0 = <&i2c_ao_pins>;
> + pinctrl-names = "default";
> +
> + pmic@32 {
> + compatible = "ricoh,rn5t618";
> + reg = <0x32>;
> + system-power-controller;
> + };
> +
> + eeprom@50 {
> + /* Fairchild FM24C08A */
> + compatible = "atmel,24c08";
> + reg = <0x50>;
> + pagesize = <16>;
> + wp-gpios = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
> + num-addresses = <4>;
> + };
> +};
> +
> +&i2c_B {
> + status = "okay";
> + pinctrl-0 = <&i2c_b_pins>;
> + pinctrl-names = "default";
> +
> + /* TODO: SiI9293 HDMI receiver @ 0x39 */
> +};
> +
> +&sdhc {
> + status = "okay";
> + pinctrl-0 = <&sdxc_c_pins>;
> + pinctrl-names = "default";
> +
> + /* eMMC */
> + bus-width = <8>;
> + max-frequency = <100000000>;
> +
> + disable-wp;
> + cap-mmc-highspeed;
> + mmc-hs200-1_8v;
> + no-sdio;
> +
> + vmmc-supply = <&vcc_3v3>;
> + vqmmc-supply = <&vcc_1v8>;
> +};
> +
> +&sdio {
> + status = "okay";
> + pinctrl-0 = <&sd_b_pins>;
> +
> + /* SD card */
> + sd_card_slot: slot@1 {
Small NIT: no need to for a label here
> + compatible = "mmc-slot";
> + reg = <1>;
> + status = "okay";
> +
> + bus-width = <4>;
> + cap-mmc-highspeed;
> + cap-sd-highspeed;
> + disable-wp;
> +
> + cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
> +
> + vmmc-supply = <&vcc_3v3>;
> + };
> +};
> +
> +&uart_AO {
> + status = "okay";
> + pinctrl-0 = <&uart_ao_a_pins>;
> + pinctrl-names = "default";
> +};
> +
> +&usb0 {
> + status = "okay";
> +};
> +
> +&usb0_phy {
> + status = "okay";
> +};
> +
> +&usb1 {
> + status = "okay";
> + dr_mode = "host";
> + /*
> + * This bus features a Realtek RTL8188 2.4GHz WiFi module, with a
> + * 3.3V supply voltage that must be enabled before use.
> + */
> + vbus-supply = <&wifi_3v3>;
> +};
> +
> +&usb1_phy {
> + status = "okay";
> +};
> +
> +&ir_receiver {
> + status = "okay";
> + pinctrl-0 = <&ir_recv_pins>;
> + pinctrl-names = "default";
> +};
> diff --git a/arch/arm/boot/dts/amlogic/meson8.dtsi b/arch/arm/boot/dts/amlogic/meson8.dtsi
> index 9ff142d9fe3f4576fdd3230a966c8a6250870de7..300eccbfc0071ce10290be1c496132ac6b6a4dbc 100644
> --- a/arch/arm/boot/dts/amlogic/meson8.dtsi
> +++ b/arch/arm/boot/dts/amlogic/meson8.dtsi
> @@ -477,6 +477,14 @@ gpio: bank@80 {
> gpio-ranges = <&pinctrl_cbus 0 0 120>;
> };
>
> + i2c_b_pins: i2c-b {
> + mux {
> + groups = "i2c_sda_b", "i2c_sck_b";
> + function = "i2c_b";
> + bias-disable;
> + };
> + };
> +
> sd_a_pins: sd-a {
> mux {
> groups = "sd_d0_a", "sd_d1_a", "sd_d2_a",
> @@ -522,6 +530,16 @@ mux {
> };
> };
>
> + sdxc_c_pins: sdxc-c {
> + mux {
> + groups = "sdxc_d0_c", "sdxc_d13_c",
> + "sdxc_clk_c", "sdxc_cmd_c",
> + "sdxc_d47_c";
> + function = "sdxc_c";
> + bias_pull_up;
> + };
> + };
> +
> spdif_out_pins: spdif-out {
> mux {
> groups = "spdif_out";
>
Apart that:
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks !
Neil
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0
2025-03-23 12:37 ` J. Neuschäfer via B4 Relay
@ 2025-03-30 21:10 ` Martin Blumenstingl
-1 siblings, 0 replies; 32+ messages in thread
From: Martin Blumenstingl @ 2025-03-30 21:10 UTC (permalink / raw)
To: j.ne
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Jerome Brunet, Kevin Hilman, devicetree, linux-kernel,
linux-arm-kernel, linux-amlogic
Thanks for your patch!
On Sun, Mar 23, 2025 at 1:38 PM J. Neuschäfer via B4 Relay
<devnull+j.ne.posteo.net@kernel.org> wrote:
[...]
> + eth_phy0: ethernet-phy@0 {
> + /* IC Plus IP101A (0x02430c54) */
> + reg = <0>;
Does reg = <1> also work on your board?
0 is the broadcast address. It's unfortunately something that we still
have incorrect in a lot of .dts files.
[...]
> +&i2c_AO {
> + status = "okay";
> + pinctrl-0 = <&i2c_ao_pins>;
> + pinctrl-names = "default";
> +
> + pmic@32 {
> + compatible = "ricoh,rn5t618";
> + reg = <0x32>;
> + system-power-controller;
Here I'm a bit surprised:
Aren't some of the outputs used to drive VCCK (CPU power rail) and
VDDEE (everything else power rail, which also powers the GPU)?
[...]
> +&usb1 {
> + status = "okay";
> + dr_mode = "host";
> + /*
> + * This bus features a Realtek RTL8188 2.4GHz WiFi module, with a
> + * 3.3V supply voltage that must be enabled before use.
> + */
> + vbus-supply = <&wifi_3v3>;
If you want to go for perfection then you can use
Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml as
reference.
It's also an "onboard" USB device which requires toggling a GPIO and regulators.
The driver side is super easy to manage as it's generic (meaning: it
parses any GPIO and regulator as long as the USB ID is registered):
drivers/usb/misc/onboard_usb_dev.c
That way you can just describe the RTL8188 on the USB bus and assign
it's vd33-supply without having to (ab)use vbus-supply of the USB
controller.
[...]
> + sdxc_c_pins: sdxc-c {
> + mux {
> + groups = "sdxc_d0_c", "sdxc_d13_c",
> + "sdxc_clk_c", "sdxc_cmd_c",
> + "sdxc_d47_c";
> + function = "sdxc_c";
> + bias_pull_up;
This has to be bias-pull-up (dashes instead of underscores).
Best regards,
Martin
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0
@ 2025-03-30 21:10 ` Martin Blumenstingl
0 siblings, 0 replies; 32+ messages in thread
From: Martin Blumenstingl @ 2025-03-30 21:10 UTC (permalink / raw)
To: j.ne
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Jerome Brunet, Kevin Hilman, devicetree, linux-kernel,
linux-arm-kernel, linux-amlogic
Thanks for your patch!
On Sun, Mar 23, 2025 at 1:38 PM J. Neuschäfer via B4 Relay
<devnull+j.ne.posteo.net@kernel.org> wrote:
[...]
> + eth_phy0: ethernet-phy@0 {
> + /* IC Plus IP101A (0x02430c54) */
> + reg = <0>;
Does reg = <1> also work on your board?
0 is the broadcast address. It's unfortunately something that we still
have incorrect in a lot of .dts files.
[...]
> +&i2c_AO {
> + status = "okay";
> + pinctrl-0 = <&i2c_ao_pins>;
> + pinctrl-names = "default";
> +
> + pmic@32 {
> + compatible = "ricoh,rn5t618";
> + reg = <0x32>;
> + system-power-controller;
Here I'm a bit surprised:
Aren't some of the outputs used to drive VCCK (CPU power rail) and
VDDEE (everything else power rail, which also powers the GPU)?
[...]
> +&usb1 {
> + status = "okay";
> + dr_mode = "host";
> + /*
> + * This bus features a Realtek RTL8188 2.4GHz WiFi module, with a
> + * 3.3V supply voltage that must be enabled before use.
> + */
> + vbus-supply = <&wifi_3v3>;
If you want to go for perfection then you can use
Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml as
reference.
It's also an "onboard" USB device which requires toggling a GPIO and regulators.
The driver side is super easy to manage as it's generic (meaning: it
parses any GPIO and regulator as long as the USB ID is registered):
drivers/usb/misc/onboard_usb_dev.c
That way you can just describe the RTL8188 on the USB bus and assign
it's vd33-supply without having to (ab)use vbus-supply of the USB
controller.
[...]
> + sdxc_c_pins: sdxc-c {
> + mux {
> + groups = "sdxc_d0_c", "sdxc_d13_c",
> + "sdxc_clk_c", "sdxc_cmd_c",
> + "sdxc_d47_c";
> + function = "sdxc_c";
> + bias_pull_up;
This has to be bias-pull-up (dashes instead of underscores).
Best regards,
Martin
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0
2025-03-30 21:10 ` Martin Blumenstingl
@ 2025-04-01 13:00 ` J. Neuschäfer
-1 siblings, 0 replies; 32+ messages in thread
From: J. Neuschäfer @ 2025-04-01 13:00 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: j.ne, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Neil Armstrong, Jerome Brunet, Kevin Hilman, devicetree,
linux-kernel, linux-arm-kernel, linux-amlogic
On Sun, Mar 30, 2025 at 11:10:28PM +0200, Martin Blumenstingl wrote:
> Thanks for your patch!
>
> On Sun, Mar 23, 2025 at 1:38 PM J. Neuschäfer via B4 Relay
> <devnull+j.ne.posteo.net@kernel.org> wrote:
> [...]
> > + eth_phy0: ethernet-phy@0 {
> > + /* IC Plus IP101A (0x02430c54) */
> > + reg = <0>;
> Does reg = <1> also work on your board?
> 0 is the broadcast address. It's unfortunately something that we still
> have incorrect in a lot of .dts files.
Unfortunately not. I tried addresses 1 to 31 without success, which
seems strange; my guess was that the PHY should respond to one of them.
I get this error:
# ip l set eth0 up
[ 6.806847] meson6-dwmac c9410000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 6.810609] meson6-dwmac c9410000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19)
>
> [...]
> > +&i2c_AO {
> > + status = "okay";
> > + pinctrl-0 = <&i2c_ao_pins>;
> > + pinctrl-names = "default";
> > +
> > + pmic@32 {
> > + compatible = "ricoh,rn5t618";
> > + reg = <0x32>;
> > + system-power-controller;
> Here I'm a bit surprised:
> Aren't some of the outputs used to drive VCCK (CPU power rail) and
> VDDEE (everything else power rail, which also powers the GPU)?
Unfortunately I don't have schematics and I wasn't able to trace the
connections on the board because they're so tiny. So it's quite possible that
you're right, but I can't be sure.
Are there voltage sensors in the Meson8 SoC that I could use to establishs the
relation between PMIC outputs and SoC supplies?
>
> [...]
> > +&usb1 {
> > + status = "okay";
> > + dr_mode = "host";
> > + /*
> > + * This bus features a Realtek RTL8188 2.4GHz WiFi module, with a
> > + * 3.3V supply voltage that must be enabled before use.
> > + */
> > + vbus-supply = <&wifi_3v3>;
> If you want to go for perfection then you can use
> Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml as
> reference.
> It's also an "onboard" USB device which requires toggling a GPIO and regulators.
> The driver side is super easy to manage as it's generic (meaning: it
> parses any GPIO and regulator as long as the USB ID is registered):
> drivers/usb/misc/onboard_usb_dev.c
I considered using onboard_usb_dev, but then came to the conclusion that
I don't need it because I don't need reset sequencing, only power.
> That way you can just describe the RTL8188 on the USB bus and assign
> it's vd33-supply without having to (ab)use vbus-supply of the USB
> controller.
This does sound reasonable. I'll reconsider the onboard_usb_dev
approach.
>
> [...]
> > + sdxc_c_pins: sdxc-c {
> > + mux {
> > + groups = "sdxc_d0_c", "sdxc_d13_c",
> > + "sdxc_clk_c", "sdxc_cmd_c",
> > + "sdxc_d47_c";
> > + function = "sdxc_c";
> > + bias_pull_up;
> This has to be bias-pull-up (dashes instead of underscores).
Oh, good catch, I'll fix it.
Thanks for your review,
J. Neuschäfer
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0
@ 2025-04-01 13:00 ` J. Neuschäfer
0 siblings, 0 replies; 32+ messages in thread
From: J. Neuschäfer @ 2025-04-01 13:00 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: j.ne, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Neil Armstrong, Jerome Brunet, Kevin Hilman, devicetree,
linux-kernel, linux-arm-kernel, linux-amlogic
On Sun, Mar 30, 2025 at 11:10:28PM +0200, Martin Blumenstingl wrote:
> Thanks for your patch!
>
> On Sun, Mar 23, 2025 at 1:38 PM J. Neuschäfer via B4 Relay
> <devnull+j.ne.posteo.net@kernel.org> wrote:
> [...]
> > + eth_phy0: ethernet-phy@0 {
> > + /* IC Plus IP101A (0x02430c54) */
> > + reg = <0>;
> Does reg = <1> also work on your board?
> 0 is the broadcast address. It's unfortunately something that we still
> have incorrect in a lot of .dts files.
Unfortunately not. I tried addresses 1 to 31 without success, which
seems strange; my guess was that the PHY should respond to one of them.
I get this error:
# ip l set eth0 up
[ 6.806847] meson6-dwmac c9410000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 6.810609] meson6-dwmac c9410000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19)
>
> [...]
> > +&i2c_AO {
> > + status = "okay";
> > + pinctrl-0 = <&i2c_ao_pins>;
> > + pinctrl-names = "default";
> > +
> > + pmic@32 {
> > + compatible = "ricoh,rn5t618";
> > + reg = <0x32>;
> > + system-power-controller;
> Here I'm a bit surprised:
> Aren't some of the outputs used to drive VCCK (CPU power rail) and
> VDDEE (everything else power rail, which also powers the GPU)?
Unfortunately I don't have schematics and I wasn't able to trace the
connections on the board because they're so tiny. So it's quite possible that
you're right, but I can't be sure.
Are there voltage sensors in the Meson8 SoC that I could use to establishs the
relation between PMIC outputs and SoC supplies?
>
> [...]
> > +&usb1 {
> > + status = "okay";
> > + dr_mode = "host";
> > + /*
> > + * This bus features a Realtek RTL8188 2.4GHz WiFi module, with a
> > + * 3.3V supply voltage that must be enabled before use.
> > + */
> > + vbus-supply = <&wifi_3v3>;
> If you want to go for perfection then you can use
> Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml as
> reference.
> It's also an "onboard" USB device which requires toggling a GPIO and regulators.
> The driver side is super easy to manage as it's generic (meaning: it
> parses any GPIO and regulator as long as the USB ID is registered):
> drivers/usb/misc/onboard_usb_dev.c
I considered using onboard_usb_dev, but then came to the conclusion that
I don't need it because I don't need reset sequencing, only power.
> That way you can just describe the RTL8188 on the USB bus and assign
> it's vd33-supply without having to (ab)use vbus-supply of the USB
> controller.
This does sound reasonable. I'll reconsider the onboard_usb_dev
approach.
>
> [...]
> > + sdxc_c_pins: sdxc-c {
> > + mux {
> > + groups = "sdxc_d0_c", "sdxc_d13_c",
> > + "sdxc_clk_c", "sdxc_cmd_c",
> > + "sdxc_d47_c";
> > + function = "sdxc_c";
> > + bias_pull_up;
> This has to be bias-pull-up (dashes instead of underscores).
Oh, good catch, I'll fix it.
Thanks for your review,
J. Neuschäfer
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0
2025-04-01 13:00 ` J. Neuschäfer
@ 2025-04-06 20:36 ` Martin Blumenstingl
-1 siblings, 0 replies; 32+ messages in thread
From: Martin Blumenstingl @ 2025-04-06 20:36 UTC (permalink / raw)
To: J. Neuschäfer
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Jerome Brunet, Kevin Hilman, devicetree, linux-kernel,
linux-arm-kernel, linux-amlogic
On Tue, Apr 1, 2025 at 3:00 PM J. Neuschäfer <j.ne@posteo.net> wrote:
>
> On Sun, Mar 30, 2025 at 11:10:28PM +0200, Martin Blumenstingl wrote:
> > Thanks for your patch!
> >
> > On Sun, Mar 23, 2025 at 1:38 PM J. Neuschäfer via B4 Relay
> > <devnull+j.ne.posteo.net@kernel.org> wrote:
> > [...]
> > > + eth_phy0: ethernet-phy@0 {
> > > + /* IC Plus IP101A (0x02430c54) */
> > > + reg = <0>;
> > Does reg = <1> also work on your board?
> > 0 is the broadcast address. It's unfortunately something that we still
> > have incorrect in a lot of .dts files.
>
> Unfortunately not. I tried addresses 1 to 31 without success, which
> seems strange; my guess was that the PHY should respond to one of them.
> I get this error:
>
> # ip l set eth0 up
> [ 6.806847] meson6-dwmac c9410000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
> [ 6.810609] meson6-dwmac c9410000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19)
Thanks for testing. Let's keep it at zero then.
> >
> > [...]
> > > +&i2c_AO {
> > > + status = "okay";
> > > + pinctrl-0 = <&i2c_ao_pins>;
> > > + pinctrl-names = "default";
> > > +
> > > + pmic@32 {
> > > + compatible = "ricoh,rn5t618";
> > > + reg = <0x32>;
> > > + system-power-controller;
> > Here I'm a bit surprised:
> > Aren't some of the outputs used to drive VCCK (CPU power rail) and
> > VDDEE (everything else power rail, which also powers the GPU)?
>
> Unfortunately I don't have schematics and I wasn't able to trace the
> connections on the board because they're so tiny. So it's quite possible that
> you're right, but I can't be sure.
>
> Are there voltage sensors in the Meson8 SoC that I could use to establishs the
> relation between PMIC outputs and SoC supplies?
There aren't any sensors (that I'm aware of). But you can check
/sys/kernel/debug/regulator/regulator_summary and compare the values
with the ones from arch/arm/boot/dts/amlogic/meson8m2-mxiii-plus.dts
Also the vendor u-boot and kernel logs may provide some information.
> >
> > [...]
> > > +&usb1 {
> > > + status = "okay";
> > > + dr_mode = "host";
> > > + /*
> > > + * This bus features a Realtek RTL8188 2.4GHz WiFi module, with a
> > > + * 3.3V supply voltage that must be enabled before use.
> > > + */
> > > + vbus-supply = <&wifi_3v3>;
> > If you want to go for perfection then you can use
> > Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml as
> > reference.
> > It's also an "onboard" USB device which requires toggling a GPIO and regulators.
> > The driver side is super easy to manage as it's generic (meaning: it
> > parses any GPIO and regulator as long as the USB ID is registered):
> > drivers/usb/misc/onboard_usb_dev.c
>
> I considered using onboard_usb_dev, but then came to the conclusion that
> I don't need it because I don't need reset sequencing, only power.
>
> > That way you can just describe the RTL8188 on the USB bus and assign
> > it's vd33-supply without having to (ab)use vbus-supply of the USB
> > controller.
>
> This does sound reasonable. I'll reconsider the onboard_usb_dev
> approach.
Thank you for the onboard usb device patches (for those who are curious: [0])!
[0] https://lore.kernel.org/lkml/20250403-rtl-onboard-v1-0-10ca9a6a4ee0@posteo.net/
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0
@ 2025-04-06 20:36 ` Martin Blumenstingl
0 siblings, 0 replies; 32+ messages in thread
From: Martin Blumenstingl @ 2025-04-06 20:36 UTC (permalink / raw)
To: J. Neuschäfer
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Jerome Brunet, Kevin Hilman, devicetree, linux-kernel,
linux-arm-kernel, linux-amlogic
On Tue, Apr 1, 2025 at 3:00 PM J. Neuschäfer <j.ne@posteo.net> wrote:
>
> On Sun, Mar 30, 2025 at 11:10:28PM +0200, Martin Blumenstingl wrote:
> > Thanks for your patch!
> >
> > On Sun, Mar 23, 2025 at 1:38 PM J. Neuschäfer via B4 Relay
> > <devnull+j.ne.posteo.net@kernel.org> wrote:
> > [...]
> > > + eth_phy0: ethernet-phy@0 {
> > > + /* IC Plus IP101A (0x02430c54) */
> > > + reg = <0>;
> > Does reg = <1> also work on your board?
> > 0 is the broadcast address. It's unfortunately something that we still
> > have incorrect in a lot of .dts files.
>
> Unfortunately not. I tried addresses 1 to 31 without success, which
> seems strange; my guess was that the PHY should respond to one of them.
> I get this error:
>
> # ip l set eth0 up
> [ 6.806847] meson6-dwmac c9410000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
> [ 6.810609] meson6-dwmac c9410000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19)
Thanks for testing. Let's keep it at zero then.
> >
> > [...]
> > > +&i2c_AO {
> > > + status = "okay";
> > > + pinctrl-0 = <&i2c_ao_pins>;
> > > + pinctrl-names = "default";
> > > +
> > > + pmic@32 {
> > > + compatible = "ricoh,rn5t618";
> > > + reg = <0x32>;
> > > + system-power-controller;
> > Here I'm a bit surprised:
> > Aren't some of the outputs used to drive VCCK (CPU power rail) and
> > VDDEE (everything else power rail, which also powers the GPU)?
>
> Unfortunately I don't have schematics and I wasn't able to trace the
> connections on the board because they're so tiny. So it's quite possible that
> you're right, but I can't be sure.
>
> Are there voltage sensors in the Meson8 SoC that I could use to establishs the
> relation between PMIC outputs and SoC supplies?
There aren't any sensors (that I'm aware of). But you can check
/sys/kernel/debug/regulator/regulator_summary and compare the values
with the ones from arch/arm/boot/dts/amlogic/meson8m2-mxiii-plus.dts
Also the vendor u-boot and kernel logs may provide some information.
> >
> > [...]
> > > +&usb1 {
> > > + status = "okay";
> > > + dr_mode = "host";
> > > + /*
> > > + * This bus features a Realtek RTL8188 2.4GHz WiFi module, with a
> > > + * 3.3V supply voltage that must be enabled before use.
> > > + */
> > > + vbus-supply = <&wifi_3v3>;
> > If you want to go for perfection then you can use
> > Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml as
> > reference.
> > It's also an "onboard" USB device which requires toggling a GPIO and regulators.
> > The driver side is super easy to manage as it's generic (meaning: it
> > parses any GPIO and regulator as long as the USB ID is registered):
> > drivers/usb/misc/onboard_usb_dev.c
>
> I considered using onboard_usb_dev, but then came to the conclusion that
> I don't need it because I don't need reset sequencing, only power.
>
> > That way you can just describe the RTL8188 on the USB bus and assign
> > it's vd33-supply without having to (ab)use vbus-supply of the USB
> > controller.
>
> This does sound reasonable. I'll reconsider the onboard_usb_dev
> approach.
Thank you for the onboard usb device patches (for those who are curious: [0])!
[0] https://lore.kernel.org/lkml/20250403-rtl-onboard-v1-0-10ca9a6a4ee0@posteo.net/
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0
2025-04-06 20:36 ` Martin Blumenstingl
@ 2025-04-07 23:09 ` J. Neuschäfer
-1 siblings, 0 replies; 32+ messages in thread
From: J. Neuschäfer @ 2025-04-07 23:09 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: J. Neuschäfer, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Neil Armstrong, Jerome Brunet, Kevin Hilman,
devicetree, linux-kernel, linux-arm-kernel, linux-amlogic
On Sun, Apr 06, 2025 at 10:36:18PM +0200, Martin Blumenstingl wrote:
> On Tue, Apr 1, 2025 at 3:00 PM J. Neuschäfer <j.ne@posteo.net> wrote:
> >
> > On Sun, Mar 30, 2025 at 11:10:28PM +0200, Martin Blumenstingl wrote:
> > > Thanks for your patch!
> > >
> > > On Sun, Mar 23, 2025 at 1:38 PM J. Neuschäfer via B4 Relay
> > > <devnull+j.ne.posteo.net@kernel.org> wrote:
> > > [...]
> > > > + eth_phy0: ethernet-phy@0 {
> > > > + /* IC Plus IP101A (0x02430c54) */
> > > > + reg = <0>;
> > > Does reg = <1> also work on your board?
> > > 0 is the broadcast address. It's unfortunately something that we still
> > > have incorrect in a lot of .dts files.
> >
> > Unfortunately not. I tried addresses 1 to 31 without success, which
> > seems strange; my guess was that the PHY should respond to one of them.
> > I get this error:
> >
> > # ip l set eth0 up
> > [ 6.806847] meson6-dwmac c9410000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
> > [ 6.810609] meson6-dwmac c9410000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19)
> Thanks for testing. Let's keep it at zero then.
>
> > >
> > > [...]
> > > > +&i2c_AO {
> > > > + status = "okay";
> > > > + pinctrl-0 = <&i2c_ao_pins>;
> > > > + pinctrl-names = "default";
> > > > +
> > > > + pmic@32 {
> > > > + compatible = "ricoh,rn5t618";
> > > > + reg = <0x32>;
> > > > + system-power-controller;
> > > Here I'm a bit surprised:
> > > Aren't some of the outputs used to drive VCCK (CPU power rail) and
> > > VDDEE (everything else power rail, which also powers the GPU)?
> >
> > Unfortunately I don't have schematics and I wasn't able to trace the
> > connections on the board because they're so tiny. So it's quite possible that
> > you're right, but I can't be sure.
> >
> > Are there voltage sensors in the Meson8 SoC that I could use to establishs the
> > relation between PMIC outputs and SoC supplies?
>
> There aren't any sensors (that I'm aware of). But you can check
> /sys/kernel/debug/regulator/regulator_summary and compare the values
> with the ones from arch/arm/boot/dts/amlogic/meson8m2-mxiii-plus.dts
> Also the vendor u-boot and kernel logs may provide some information.
The values in /sys/kernel/debug/regulator/regulator_summary do indeed
match the values in meson8m2-mxiii-plus.dts:
DCDC1 0 0 0 unknown 1100mV 0mA 0mV 0mV
DCDC2 0 0 0 unknown 1150mV 0mA 0mV 0mV
DCDC3 0 0 0 unknown 1500mV 0mA 0mV 0mV
LDO1 0 0 0 unknown 2900mV 0mA 0mV 0mV
LDO2 0 0 0 unknown 1800mV 0mA 0mV 0mV
LDO3 0 0 0 unknown 1800mV 0mA 0mV 0mV
LDO4 0 0 0 unknown 2850mV 0mA 0mV 0mV
LDO5 0 0 0 unknown 1800mV 0mA 0mV 0mV
LDORTC1 0 0 0 unknown 2700mV 0mA 0mV 0mV
LDORTC2 0 0 0 unknown 900mV 0mA 0mV 0mV
After I copy the regulator table from meson8m2-mxiii-plus.dts, I can indeed
observe the effect of regulators being on/off. I will use that to further
investigate how the regulators are used.
The vendor u-boot/kernel aren't very useful, unfortunately.
The downstream devicetree includes these settings:
rn5t618 {
status = "okay";
ddr_voltage = <1500000>; // 1.5V
vddao_voltage = <1200000>; // 1.2V
[...]
};
The corresponding driver seems to associate ddr_voltage with DCDC2 and
vddio_voltage with DCDC3, although this part of the code[1] is "#if 0"'d.
[1] https://github.com/endlessm/linux-meson/blob/master/drivers/amlogic/power/ricoh/ricoh_pmu.c#L127
Best regards,
J. Neuschäfer
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH 3/3] ARM: dts: amlogic: Add TCU Fernsehfee 3.0
@ 2025-04-07 23:09 ` J. Neuschäfer
0 siblings, 0 replies; 32+ messages in thread
From: J. Neuschäfer @ 2025-04-07 23:09 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: J. Neuschäfer, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Neil Armstrong, Jerome Brunet, Kevin Hilman,
devicetree, linux-kernel, linux-arm-kernel, linux-amlogic
On Sun, Apr 06, 2025 at 10:36:18PM +0200, Martin Blumenstingl wrote:
> On Tue, Apr 1, 2025 at 3:00 PM J. Neuschäfer <j.ne@posteo.net> wrote:
> >
> > On Sun, Mar 30, 2025 at 11:10:28PM +0200, Martin Blumenstingl wrote:
> > > Thanks for your patch!
> > >
> > > On Sun, Mar 23, 2025 at 1:38 PM J. Neuschäfer via B4 Relay
> > > <devnull+j.ne.posteo.net@kernel.org> wrote:
> > > [...]
> > > > + eth_phy0: ethernet-phy@0 {
> > > > + /* IC Plus IP101A (0x02430c54) */
> > > > + reg = <0>;
> > > Does reg = <1> also work on your board?
> > > 0 is the broadcast address. It's unfortunately something that we still
> > > have incorrect in a lot of .dts files.
> >
> > Unfortunately not. I tried addresses 1 to 31 without success, which
> > seems strange; my guess was that the PHY should respond to one of them.
> > I get this error:
> >
> > # ip l set eth0 up
> > [ 6.806847] meson6-dwmac c9410000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
> > [ 6.810609] meson6-dwmac c9410000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19)
> Thanks for testing. Let's keep it at zero then.
>
> > >
> > > [...]
> > > > +&i2c_AO {
> > > > + status = "okay";
> > > > + pinctrl-0 = <&i2c_ao_pins>;
> > > > + pinctrl-names = "default";
> > > > +
> > > > + pmic@32 {
> > > > + compatible = "ricoh,rn5t618";
> > > > + reg = <0x32>;
> > > > + system-power-controller;
> > > Here I'm a bit surprised:
> > > Aren't some of the outputs used to drive VCCK (CPU power rail) and
> > > VDDEE (everything else power rail, which also powers the GPU)?
> >
> > Unfortunately I don't have schematics and I wasn't able to trace the
> > connections on the board because they're so tiny. So it's quite possible that
> > you're right, but I can't be sure.
> >
> > Are there voltage sensors in the Meson8 SoC that I could use to establishs the
> > relation between PMIC outputs and SoC supplies?
>
> There aren't any sensors (that I'm aware of). But you can check
> /sys/kernel/debug/regulator/regulator_summary and compare the values
> with the ones from arch/arm/boot/dts/amlogic/meson8m2-mxiii-plus.dts
> Also the vendor u-boot and kernel logs may provide some information.
The values in /sys/kernel/debug/regulator/regulator_summary do indeed
match the values in meson8m2-mxiii-plus.dts:
DCDC1 0 0 0 unknown 1100mV 0mA 0mV 0mV
DCDC2 0 0 0 unknown 1150mV 0mA 0mV 0mV
DCDC3 0 0 0 unknown 1500mV 0mA 0mV 0mV
LDO1 0 0 0 unknown 2900mV 0mA 0mV 0mV
LDO2 0 0 0 unknown 1800mV 0mA 0mV 0mV
LDO3 0 0 0 unknown 1800mV 0mA 0mV 0mV
LDO4 0 0 0 unknown 2850mV 0mA 0mV 0mV
LDO5 0 0 0 unknown 1800mV 0mA 0mV 0mV
LDORTC1 0 0 0 unknown 2700mV 0mA 0mV 0mV
LDORTC2 0 0 0 unknown 900mV 0mA 0mV 0mV
After I copy the regulator table from meson8m2-mxiii-plus.dts, I can indeed
observe the effect of regulators being on/off. I will use that to further
investigate how the regulators are used.
The vendor u-boot/kernel aren't very useful, unfortunately.
The downstream devicetree includes these settings:
rn5t618 {
status = "okay";
ddr_voltage = <1500000>; // 1.5V
vddao_voltage = <1200000>; // 1.2V
[...]
};
The corresponding driver seems to associate ddr_voltage with DCDC2 and
vddio_voltage with DCDC3, although this part of the code[1] is "#if 0"'d.
[1] https://github.com/endlessm/linux-meson/blob/master/drivers/amlogic/power/ricoh/ricoh_pmu.c#L127
Best regards,
J. Neuschäfer
^ permalink raw reply [flat|nested] 32+ messages in thread