From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Lars Pedersen <lapeddk@gmail.com>
Cc: barebox@lists.infradead.org, Bruno Thomsen <bruno.thomsen@gmail.com>
Subject: Re: [PATCH] ARM: i.MX: Kamstrup mx7 concentrator board support
Date: Mon, 12 Apr 2021 16:20:07 +0200 [thread overview]
Message-ID: <78e88d30-a322-244b-aa3d-c55e79b77f98@pengutronix.de> (raw)
In-Reply-To: <CAKd8=Gt1piJ14=V8u7wtwL3aS0yMetvyZ0kyrJQLP=Vq4_LfDg@mail.gmail.com>
Hello,
On 12.04.21 16:17, Lars Pedersen wrote:
>> For the simple case of toggling a reset, likely only difference now is that you
>> can verify your driver availability with drvinfo. I'd prefer new code uses board
>> from the get-go though if board code is really needed.
>>
>
> I got it working but we have decided to update the hardware to reset
> the TPM after your colleague mentioned how it should be done correctly
> :)
>
> Just to be clear. I can now remove board.c as you first mentioned
> since I don't need any special stuff.
Great!
> Also I need to update imx_v7_defconfig with this board with default value yes.
This is optional. I'd recommend you do it, so you benefit from build-time coverage for
your board-specific code.
Cheers,
Ahmad
>
>> Cheers,
>> Ahmad
>>
>>>
>>>>
>>>>>>> +}
>>>>>>> +
>>>>>>> +static void __noreturn kamstrup_mx7_board_restart_gpio(struct restart_handler *rst)
>>>>>>> +{
>>>>>>> + imx7_setup_pad(MX7D_PAD_ENET1_TX_CLK__GPIO7_IO12);
>>>>>>> +
>>>>>>> + gpio_direction_output(BOARD_RESTART_GPIO, 0);
>>>>>>> + mdelay(1);
>>>>>>> + gpio_set_value(BOARD_RESTART_GPIO, 0);
>>>>>>
>>>>>> I just sent out a patch[1] with a driver implementing the "gpio-restart" device
>>>>>> tree binding. Could you test that one and use it here instead?
>>>>>>
>>>>>
>>>>> I have applied the patches on a master branch (Last patch failed to
>>>>> apply but was only watchdog) and the gpio-restart works perfectly.
>>>>
>>>> Thanks for testing! You can add your Tested-By on the patch in question
>>>> if you like.
>>>>
>>>>>
>>>>>>> +
>>>>>>> + hang();
>>>>>>> +}
>>>>>>> +
>>>>>>> +static int kamstrup_mx7_concentrator_coredevices_init(void)
>>>>>>> +{
>>>>>>> + kamstrup_mx7_tpm_reset();
>>>>>>> + restart_handler_register_fn("board", kamstrup_mx7_board_restart_gpio);
>>>>>>> + barebox_set_model("Kamstrup OMNIA Concentrator");
>>>>>>
>>>>>> The default model name is "Kamstrup OMNIA Flex Concentrator".
>>>>>> If that's too long, you could override /model in the barebox device tree.
>>>>>> With the changes suggested above, you could drop board.c then altogether.
>>>>>>
>>>>>
>>>>> I'll move this into the device tree or delete it entirely.
>>>>
>>>> Great. :-)
>>>>
>>>>
>>>> Cheers,
>>>> Ahmad
>>>>
>>>> --
>>>> Pengutronix e.K. | |
>>>> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
>>>> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
>>>> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>>>
>>
>> --
>> Pengutronix e.K. | |
>> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
>> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
>> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-04-12 14:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 13:20 Lars Pedersen
2021-04-10 10:43 ` Ahmad Fatoum
2021-04-12 10:45 ` Lars Pedersen
2021-04-12 11:24 ` Ahmad Fatoum
2021-04-12 12:09 ` Lars Pedersen
2021-04-12 12:43 ` Ahmad Fatoum
2021-04-12 14:17 ` Lars Pedersen
2021-04-12 14:20 ` Ahmad Fatoum [this message]
2021-04-12 12:22 ` Rouven Czerwinski
2021-04-12 12:39 ` Lars Pedersen
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=78e88d30-a322-244b-aa3d-c55e79b77f98@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=bruno.thomsen@gmail.com \
--cc=lapeddk@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox