All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
To: "Heiko Stübner" <heiko@sntech.de>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>
Cc: michael.opdenacker@rootcommit.com, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] arm64: dts: rockchip: add Tinkerboard 3 and 3S device tree
Date: Fri, 14 Nov 2025 14:31:17 +0000 (UTC)	[thread overview]
Message-ID: <8ad09a33-6464-4429-a58f-2769b78ada93@rootcommit.com> (raw)
In-Reply-To: <3310785.5fSG56mABF@diego>

Hi Heiko

Thanks a lot for the review!

On 11/13/25 23:35, Heiko Stübner wrote:
> Hi Michael,
>
> Am Dienstag, 11. November 2025, 18:20:23 Mitteleuropäische Normalzeit schrieb michael.opdenacker@rootcommit.com:
>> From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>>
>> Add initial device tree support for Asus Tinkerboard 3 [1] and 3S [2],
>> which are SBCs based on the Rockchip 3566 SoC.
>>
>> The "3S" version ("S" for "storage") just adds a 16 GB eMMC
>> and a "mask ROM" DIP switch (to mask the eMMC and enter "Mask ROM"
>> mode for recovery) to the "3" version.
>>
>> This adds support for:
>> - Debug UART (/dev/ttyS2)
>> - SD card (/dev/mmcblk1)
>> - eMMC (/dev/mmcblk0, only on Tinkerboard 3S)
>> - I2C:
>>    - i2c0 (internal bus with a PMIC and regulators)
>>    - i2c2 (internal bus with an at24 eeprom and an RTC device)
>> - USB 2.0 ports
>> - 2 GPIO LEDS
>>
>> Link: https://tinker-board.asus.com/series/tinker-board-3.html [1]
>> Link: https://tinker-board.asus.com/series/tinker-board-3s.html [2]
>> Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>> ---
> please follow the DTS coding style
> https://docs.kernel.org/devicetree/bindings/dts-coding-style.html
Great, I was looking for such a document :)
>
>
>> +/ {
>> +	aliases {
>> +		serial2 = &uart2;
>> +		mmc1 = &sdmmc0;
>> +		i2c0 = &i2c0;
>> +		i2c2 = &i2c2;
> alphabetical property order
Fixed.
>
>
>> +	};
>> +
>> +	chosen {
>> +		stdout-path = "serial2:1500000n8";
>> +	};
>> +
>> +	vcc3v3_sys: regulator-3v3-vcc-sys {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "vcc3v3_sys";
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +		regulator-min-microvolt = <3300000>;
>> +		regulator-max-microvolt = <3300000>;
>> +		vin-supply = <&vcc5v0_sys>;
>> +	};
>> +
>> +	vcc5v0_sys: regulator-5v0-vcc-sys {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "vcc5v0_sys";
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +		regulator-min-microvolt = <5000000>;
>> +		regulator-max-microvolt = <5000000>;
>> +	};
>> +
>> +	vcc5v0_usb_host: regulator-5v0-vcc-usb-host {
>> +		compatible = "regulator-fixed";
>> +		enable-active-high;
>> +		gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&usb_host_pwren_h>;
>> +		regulator-name = "vcc5v0_usb_host";
>> +		regulator-min-microvolt = <5000000>;
>> +		regulator-max-microvolt = <5000000>;
>> +		vin-supply = <&vcc5v0_sys>;
>> +	};
>> +
>> +	gpio_leds: gpio-leds {
> gpio-foo before regulator-bar
Done
>
>> +		compatible = "gpio-leds";
>> +
>> +		act-led {
>> +			gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger="mmc1";
>> +};
> missing indentation
Oops, fixed.
>
>> +
>> +		rsv-led {
>> +			gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger="none";
>> +		};
>> +	};
>> +};
>>
>>
>>> Heiko
>>>
>>>
>> +
>> +&uart2 {
> alphabetical ordering of phandles please (uart2 definitly somewhere after i2c0)
Indeed. Done.
>
>> +	status = "okay";
>> +};
>> +
>> +&i2c0 {
>> +	status = "okay";
>> +
>> +	rk809: pmic@20 {
>> +		compatible = "rockchip,rk809";
>> +		reg = <0x20>;
>> +		assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
>> +		assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
>> +		#clock-cells = <1>;
>> +		clocks = <&cru I2S1_MCLKOUT_TX>;
>> +		clock-names = "mclk";
>> +		clock-output-names = "rk809-clkout1", "rk809-clkout2";
>> +		interrupt-parent = <&gpio0>;
>> +		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>;
>> +		#sound-dai-cells = <0>;
>> +		system-power-controller;
>> +		wakeup-source;
>> +
>> +		vcc1-supply = <&vcc3v3_sys>;
>> +		vcc2-supply = <&vcc3v3_sys>;
>> +		vcc3-supply = <&vcc3v3_sys>;
>> +		vcc4-supply = <&vcc3v3_sys>;
>> +		vcc5-supply = <&vcc3v3_sys>;
>> +		vcc6-supply = <&vcc3v3_sys>;
>> +		vcc7-supply = <&vcc3v3_sys>;
>> +		vcc8-supply = <&vcc3v3_sys>;
>> +		vcc9-supply = <&vcc3v3_sys>;
>> +
>> +		regulators {
>> +			vcc_1v8: DCDC_REG5 {
>> +				regulator-name = "vcc_1v8";
>> +				regulator-always-on;
>> +				regulator-boot-on;
>> +				regulator-min-microvolt = <1800000>;
>> +				regulator-max-microvolt = <1800000>;
>> +
>> +				regulator-state-mem {
>> +					regulator-off-in-suspend;
>> +				};
>> +			};
>> +
>> +			vcc3v3_sd: SWITCH_REG2 {
>> +				regulator-name = "vcc3v3_sd";
>> +				regulator-always-on;
>> +				regulator-boot-on;
>> +
>> +				regulator-state-mem {
>> +					regulator-off-in-suspend;
>> +				};
>> +			};
>> +
>> +			vccio_sd: LDO_REG5 {
>> +				regulator-name = "vccio_sd";
>> +				regulator-always-on;
>> +				regulator-boot-on;
>> +				regulator-min-microvolt = <1800000>;
>> +				regulator-max-microvolt = <3300000>;
>> +
>> +				regulator-state-mem {
>> +					regulator-off-in-suspend;
>> +				};
>> +			};
>> +
>> +			vcc_3v3: SWITCH_REG1 {
>> +				regulator-name = "vcc_3v3";
>> +				regulator-always-on;
>> +				regulator-boot-on;
>> +
>> +				regulator-state-mem {
>> +					regulator-off-in-suspend;
>> +				};
>> +			};
>> +		};
>> +	};
>> +
>> +	vdd_cpu: regulator@40 {
> you probably need &cpu0 phandles to set this regulator-supply?


Oh, you're the maintainer on this one :)
Good catch. I was imitating the Orange Pi 3B DT, and since the board 
seemed to boot fine, I didn't pay attention to the fact that vdd_cpu was 
needed elsewhere.
Fixed.

>
>> +		compatible = "silergy,syr827";
>> +		reg = <0x40>;
>> +		fcs,suspend-voltage-selector = <1>;
>> +		regulator-name = "vdd_cpu";
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +		regulator-min-microvolt = <830000>;
>> +		regulator-max-microvolt = <1200000>;
>> +		regulator-ramp-delay = <2300>;
>> +		vin-supply = <&vcc3v3_sys>;
>> +
>> +		regulator-state-mem {
>> +			regulator-off-in-suspend;
>> +		};
>> +	};
>> +};
>> +
>> +&i2c2 {
>> +	status = "okay";
>> +
>> +	m24c08@50 {
> I guess eeprom@50 ?

Indeed. Fixed too.
Thanks again,
Michael.

-- 
Michael Opdenacker
Root Commit
Embedded Linux Training and Consulting
https://rootcommit.com



WARNING: multiple messages have this Message-ID (diff)
From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
To: "Heiko Stübner" <heiko@sntech.de>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>
Cc: michael.opdenacker@rootcommit.com, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] arm64: dts: rockchip: add Tinkerboard 3 and 3S device tree
Date: Fri, 14 Nov 2025 14:31:17 +0000 (UTC)	[thread overview]
Message-ID: <8ad09a33-6464-4429-a58f-2769b78ada93@rootcommit.com> (raw)
In-Reply-To: <3310785.5fSG56mABF@diego>

Hi Heiko

Thanks a lot for the review!

On 11/13/25 23:35, Heiko Stübner wrote:
> Hi Michael,
>
> Am Dienstag, 11. November 2025, 18:20:23 Mitteleuropäische Normalzeit schrieb michael.opdenacker@rootcommit.com:
>> From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>>
>> Add initial device tree support for Asus Tinkerboard 3 [1] and 3S [2],
>> which are SBCs based on the Rockchip 3566 SoC.
>>
>> The "3S" version ("S" for "storage") just adds a 16 GB eMMC
>> and a "mask ROM" DIP switch (to mask the eMMC and enter "Mask ROM"
>> mode for recovery) to the "3" version.
>>
>> This adds support for:
>> - Debug UART (/dev/ttyS2)
>> - SD card (/dev/mmcblk1)
>> - eMMC (/dev/mmcblk0, only on Tinkerboard 3S)
>> - I2C:
>>    - i2c0 (internal bus with a PMIC and regulators)
>>    - i2c2 (internal bus with an at24 eeprom and an RTC device)
>> - USB 2.0 ports
>> - 2 GPIO LEDS
>>
>> Link: https://tinker-board.asus.com/series/tinker-board-3.html [1]
>> Link: https://tinker-board.asus.com/series/tinker-board-3s.html [2]
>> Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
>> ---
> please follow the DTS coding style
> https://docs.kernel.org/devicetree/bindings/dts-coding-style.html
Great, I was looking for such a document :)
>
>
>> +/ {
>> +	aliases {
>> +		serial2 = &uart2;
>> +		mmc1 = &sdmmc0;
>> +		i2c0 = &i2c0;
>> +		i2c2 = &i2c2;
> alphabetical property order
Fixed.
>
>
>> +	};
>> +
>> +	chosen {
>> +		stdout-path = "serial2:1500000n8";
>> +	};
>> +
>> +	vcc3v3_sys: regulator-3v3-vcc-sys {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "vcc3v3_sys";
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +		regulator-min-microvolt = <3300000>;
>> +		regulator-max-microvolt = <3300000>;
>> +		vin-supply = <&vcc5v0_sys>;
>> +	};
>> +
>> +	vcc5v0_sys: regulator-5v0-vcc-sys {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "vcc5v0_sys";
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +		regulator-min-microvolt = <5000000>;
>> +		regulator-max-microvolt = <5000000>;
>> +	};
>> +
>> +	vcc5v0_usb_host: regulator-5v0-vcc-usb-host {
>> +		compatible = "regulator-fixed";
>> +		enable-active-high;
>> +		gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&usb_host_pwren_h>;
>> +		regulator-name = "vcc5v0_usb_host";
>> +		regulator-min-microvolt = <5000000>;
>> +		regulator-max-microvolt = <5000000>;
>> +		vin-supply = <&vcc5v0_sys>;
>> +	};
>> +
>> +	gpio_leds: gpio-leds {
> gpio-foo before regulator-bar
Done
>
>> +		compatible = "gpio-leds";
>> +
>> +		act-led {
>> +			gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger="mmc1";
>> +};
> missing indentation
Oops, fixed.
>
>> +
>> +		rsv-led {
>> +			gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger="none";
>> +		};
>> +	};
>> +};
>>
>>
>>> Heiko
>>>
>>>
>> +
>> +&uart2 {
> alphabetical ordering of phandles please (uart2 definitly somewhere after i2c0)
Indeed. Done.
>
>> +	status = "okay";
>> +};
>> +
>> +&i2c0 {
>> +	status = "okay";
>> +
>> +	rk809: pmic@20 {
>> +		compatible = "rockchip,rk809";
>> +		reg = <0x20>;
>> +		assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
>> +		assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
>> +		#clock-cells = <1>;
>> +		clocks = <&cru I2S1_MCLKOUT_TX>;
>> +		clock-names = "mclk";
>> +		clock-output-names = "rk809-clkout1", "rk809-clkout2";
>> +		interrupt-parent = <&gpio0>;
>> +		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>;
>> +		#sound-dai-cells = <0>;
>> +		system-power-controller;
>> +		wakeup-source;
>> +
>> +		vcc1-supply = <&vcc3v3_sys>;
>> +		vcc2-supply = <&vcc3v3_sys>;
>> +		vcc3-supply = <&vcc3v3_sys>;
>> +		vcc4-supply = <&vcc3v3_sys>;
>> +		vcc5-supply = <&vcc3v3_sys>;
>> +		vcc6-supply = <&vcc3v3_sys>;
>> +		vcc7-supply = <&vcc3v3_sys>;
>> +		vcc8-supply = <&vcc3v3_sys>;
>> +		vcc9-supply = <&vcc3v3_sys>;
>> +
>> +		regulators {
>> +			vcc_1v8: DCDC_REG5 {
>> +				regulator-name = "vcc_1v8";
>> +				regulator-always-on;
>> +				regulator-boot-on;
>> +				regulator-min-microvolt = <1800000>;
>> +				regulator-max-microvolt = <1800000>;
>> +
>> +				regulator-state-mem {
>> +					regulator-off-in-suspend;
>> +				};
>> +			};
>> +
>> +			vcc3v3_sd: SWITCH_REG2 {
>> +				regulator-name = "vcc3v3_sd";
>> +				regulator-always-on;
>> +				regulator-boot-on;
>> +
>> +				regulator-state-mem {
>> +					regulator-off-in-suspend;
>> +				};
>> +			};
>> +
>> +			vccio_sd: LDO_REG5 {
>> +				regulator-name = "vccio_sd";
>> +				regulator-always-on;
>> +				regulator-boot-on;
>> +				regulator-min-microvolt = <1800000>;
>> +				regulator-max-microvolt = <3300000>;
>> +
>> +				regulator-state-mem {
>> +					regulator-off-in-suspend;
>> +				};
>> +			};
>> +
>> +			vcc_3v3: SWITCH_REG1 {
>> +				regulator-name = "vcc_3v3";
>> +				regulator-always-on;
>> +				regulator-boot-on;
>> +
>> +				regulator-state-mem {
>> +					regulator-off-in-suspend;
>> +				};
>> +			};
>> +		};
>> +	};
>> +
>> +	vdd_cpu: regulator@40 {
> you probably need &cpu0 phandles to set this regulator-supply?


Oh, you're the maintainer on this one :)
Good catch. I was imitating the Orange Pi 3B DT, and since the board 
seemed to boot fine, I didn't pay attention to the fact that vdd_cpu was 
needed elsewhere.
Fixed.

>
>> +		compatible = "silergy,syr827";
>> +		reg = <0x40>;
>> +		fcs,suspend-voltage-selector = <1>;
>> +		regulator-name = "vdd_cpu";
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +		regulator-min-microvolt = <830000>;
>> +		regulator-max-microvolt = <1200000>;
>> +		regulator-ramp-delay = <2300>;
>> +		vin-supply = <&vcc3v3_sys>;
>> +
>> +		regulator-state-mem {
>> +			regulator-off-in-suspend;
>> +		};
>> +	};
>> +};
>> +
>> +&i2c2 {
>> +	status = "okay";
>> +
>> +	m24c08@50 {
> I guess eeprom@50 ?

Indeed. Fixed too.
Thanks again,
Michael.

-- 
Michael Opdenacker
Root Commit
Embedded Linux Training and Consulting
https://rootcommit.com


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

  reply	other threads:[~2025-11-14 14:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251111172003.2324525-1-michael.opdenacker@rootcommit.com>
2025-11-11 17:20 ` [PATCH 1/2] dt-bindings: arm: rockchip: Asus Tinkerboard 3 and 3S michael.opdenacker
2025-11-11 17:20   ` michael.opdenacker
2025-11-13  8:35   ` Krzysztof Kozlowski
2025-11-13  8:35     ` Krzysztof Kozlowski
2025-11-14  2:00   ` Dragan Simic
2025-11-14  2:00     ` Dragan Simic
2025-11-11 17:20 ` [PATCH 2/2] arm64: dts: rockchip: add Tinkerboard 3 and 3S device tree michael.opdenacker
2025-11-11 17:20   ` michael.opdenacker
2025-11-13 22:35   ` Heiko Stübner
2025-11-13 22:35     ` Heiko Stübner
2025-11-14 14:31     ` Michael Opdenacker [this message]
2025-11-14 14:31       ` Michael Opdenacker
2025-11-14  2:26   ` Dragan Simic
2025-11-14  2:26     ` Dragan Simic
2025-11-14 13:54     ` Michael Opdenacker
2025-11-14 13:54       ` Michael Opdenacker
2025-11-14 14:30       ` Dragan Simic
2025-11-14 14:30         ` Dragan Simic

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=8ad09a33-6464-4429-a58f-2769b78ada93@rootcommit.com \
    --to=michael.opdenacker@rootcommit.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh@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.