[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <938f85b0-4c9b-463a-960a-f5f4e4092480@gocontroll.com>
Date: Tue, 28 Oct 2025 14:10:04 +0100
From: Maud Spierings <maudspierings@...ontroll.com>
To: Matti Vaittinen <mazziesaccount@...il.com>, Rob Herring
<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
LW@...O-electronics.de
Subject: Re: [PATCH v2 3/5] arm64: dts: freescale: add Ka-Ro Electronics
tx8m-1610 COM
On 10/28/25 13:42, Maud Spierings wrote:
> On 10/28/25 13:15, Matti Vaittinen wrote:
>> Hi Maud,
>>
>> Thanks for the upstreaming work! :)
>>
>> On 22/10/2025 10:22, Maud Spierings via B4 Relay wrote:
>>> From: Maud Spierings <maudspierings@...ontroll.com>
>>>
>>> The Ka-Ro Electronics tx8m-1610 is a COM based on the imx8mm SOC. It has
>>> 1 GB of ram and 4 GB of eMMC storage on board.
>>>
>>> Add it to enable boards based on this module
>>>
>>> Signed-off-by: Maud Spierings <maudspierings@...ontroll.com>
>>> ---
>>> .../arm64/boot/dts/freescale/imx8mm-tx8m-1610.dtsi | 439 ++++++++++
>>> + ++++++++++
>>> 1 file changed, 439 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-tx8m-1610.dtsi b/
>>> arch/arm64/boot/dts/freescale/imx8mm-tx8m-1610.dtsi
>>> new file mode 100644
>>> index 0000000000000..46d3ad80942cc
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/freescale/imx8mm-tx8m-1610.dtsi
>>> @@ -0,0 +1,439 @@
>>> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
>>> +/*
>>> + * Copyright (C) 2021 Lothar Waßmann <LW@...O-electronics.de>
>>> + * 2025 Maud Spierings <maudspierings@...ontroll.com>
>>> + */
>>> +
>>> +#include "imx8mm.dtsi"
>>> +
>>
>> // snip
>>
>>> + pmic: pmic@4b {
>>> + compatible = "rohm,bd71847";
>>> + reg = <0x4b>;
>>> + interrupt-parent = <&gpio1>;
>>> + interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
>>> + pinctrl-0 = <&pinctrl_pmic>;
>>> + pinctrl-names = "default";
>>> + rohm,reset-snvs-powered;
>>> +
>>> + regulators {
>>> + reg_vdd_soc: BUCK1 {
>>> + regulator-always-on;
>>> + regulator-boot-on;
>>> + regulator-max-microvolt = <900000>;
>>> + regulator-min-microvolt = <780000>;
>>> + regulator-name = "buck1";
>>> + regulator-ramp-delay = <1250>;
>>> + };
>>> +
>>> + reg_vdd_arm: BUCK2 {
>>> + regulator-always-on;
>>> + regulator-boot-on;
>>> + regulator-max-microvolt = <950000>;
>>> + regulator-min-microvolt = <805000>;
>>> + regulator-name = "buck2";
>>> + regulator-ramp-delay = <1250>;
>>> + rohm,dvs-run-voltage = <950000>;
>>> + rohm,dvs-idle-voltage = <810000>;
>>> + };
>>> +
>>> + reg_vdd_dram: BUCK3 {
>>> + regulator-always-on;
>>> + regulator-boot-on;
>>> + regulator-max-microvolt = <900000>;
>>> + regulator-min-microvolt = <805000>;
>>> + regulator-name = "buck3";
>>> + };
>>> +
>>> + reg_vdd_3v3: BUCK4 {
>>> + regulator-always-on;
>>> + regulator-boot-on;
>>> + regulator-max-microvolt = <3300000>;
>>> + regulator-min-microvolt = <3300000>;
>>> + regulator-name = "buck4";
>>> + };
>>> +
>>> + reg_vdd_1v8: BUCK5 {
>>> + regulator-always-on;
>>> + regulator-boot-on;
>>> + regulator-max-microvolt = <1950000>;
>>> + regulator-min-microvolt = <1700000>;
>>> + regulator-name = "buck5";
>>> + };
>>> +
>>> + BUCK6 {
>>> + regulator-always-on;
>>> + regulator-boot-on;
>>> + /*
>>> + * The default output voltage is 1.1V, bumped
>>> + * to 1.35V in HW by a 499R/2.2K voltage divider in the
>>> + * feedback path.
>>> + */
>>
>> Could/Should this be described using the:
>> 'rohm,feedback-pull-up-r1-ohms' and
>> 'rohm,feedback-pull-up-r2-ohms'? If I understand the comment
>> correctly, that might allow the driver to be able to use correctly
>> scaled voltages.
>>
>> https://elixir.bootlin.com/linux/v6.18-rc1/source/Documentation/
>> devicetree/bindings/regulator/rohm,bd71837-regulator.yaml#L108
>>
>
> Ah I didn't know those existed, should've checked the bindings in more
> detail, thanks for the hint!
>
> I will have to investigate this carefully, since I don't have access to
> the actual design of the COM, so I don't know exactly what is there.
>
So I am not yet entirely sure if this works out, I used the calculation
in the driver:
/*
* Setups where regulator (especially the buck8) output voltage is scaled
* by adding external connection where some other regulator output is
connected
* to feedback-pin (over suitable resistors) is getting popular amongst
users
* of BD71837. (This allows for example scaling down the buck8 voltages
to suit
* lover GPU voltages for projects where buck8 is (ab)used to supply power
* for GPU. Additionally some setups do allow DVS for buck8 but as this do
* produce voltage spikes the HW must be evaluated to be able to
survive this
* - hence I keep the DVS disabled for non DVS bucks by default. I
don't want
* to help you burn your proto board)
*
* So we allow describing this external connection from DT and scale the
* voltages accordingly. This is what the connection should look like:
*
* |------------|
* | buck 8 |-------+----->Vout
* | | |
* |------------| |
* | FB pin |
* | |
* +-------+--R2---+
* |
* R1
* |
* V FB-pull-up
*
* Here the buck output is sifted according to formula:
*
* Vout_o = Vo - (Vpu - Vo)*R2/R1
* Linear_step = step_orig*(R1+R2)/R1
*
* where:
* Vout_o is adjusted voltage output at vsel reg value 0
* Vo is original voltage output at vsel reg value 0
* Vpu is the pull-up voltage V FB-pull-up in the picture
* R1 and R2 are resistor values.
*
* As a real world example for buck8 and a specific GPU:
* VLDO = 1.6V (used as FB-pull-up)
* R1 = 1000ohms
* R2 = 150ohms
* VSEL 0x0 => 0.8V – (VLDO – 0.8) * R2 / R1 = 0.68V
* Linear Step = 10mV * (R1 + R2) / R1 = 11.5mV
*/
Because I do not know the pull up voltage, and I am not sure if it is a
pull up.
So:
Vout_o = 1.35V
Vo = 1.1V
Vpu = unknown
R2 = 499 Ohm
R1 = 2200 Ohm
Gives:
Vpu = ~0V
And:
Vout_o = 1.35V
Vo = 1.1V
Vpu = unknown
R2 = 2200 Ohm
R1 = 499 Ohm
Gives:
Vpu = ~1.04V
I am not quite sure which resistor is R1 and which is R2 but having
there be a pull down to 0V seems the most logical answer?
I am adding Lothar from Ka-Ro to the CC maybe he can shed some light on
this setup.
Kind regards,
Maud
Powered by blists - more mailing lists