linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	 Jerome Brunet <jbrunet@baylibre.com>
Cc: khilman@baylibre.com, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org
Subject: Re: [PATCH 5/9] arm64: dts: meson: g12a: add reset controller
Date: Sat, 16 Mar 2019 15:31:58 +0100	[thread overview]
Message-ID: <5C8D08DE.7070203@baylibre.com> (raw)
In-Reply-To: <CAFBinCBt290Qabw98SpiON3xG0ihMEDNzwDDTrBo6QYbA5QjMQ@mail.gmail.com>



Le 15/03/2019 22:31, Martin Blumenstingl a écrit :
> Hi Neil and Jerome,
> 
> On Thu, Mar 7, 2019 at 4:14 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>>
>> From: Jerome Brunet <jbrunet@baylibre.com>
>>
>> Add the reset controller device of g12a SoC family
>>
>> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>>  arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
>> index f8f055c49f9a..2a700bb45d04 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
>> @@ -245,6 +245,13 @@
>>                         #size-cells = <2>;
>>                         ranges = <0x0 0x0 0x0 0xffd00000 0x0 0x100000>;
>>
>> +                       reset: reset-controller@1004 {
>> +                               compatible = "amlogic,meson-g12a-reset",
>> +                                            "amlogic,meson-axg-reset";
>> +                               reg = <0x0 0x1004 0x0 0x9c>;
>> +                               #reset-cells = <1>;
>> +                       };
> I tried to compare this with what is publicly available in
> buildroot_openlinux_kernel_4.9_fbdev_20180706 - unfortunately this is
> harder than I thought:
> the buildroot kernel doesn't define the reset controller in mesong12a.dtsi
> 
> so I tried to follow the code in the HDMITX driver instead:
> kernel/aml-4.9/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hw_txlx.c
> uses P_RESET0_REGISTER and P_RESET2_REGISTER
> these are defined in
> kernel/aml-4.9/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/txlx_reg.h
> using:
>> #define RESET_CBUS_REG_IDX 5
>> #define BASE_REG_OFFSET 24
>> #define RESET_CBUS_REG_ADDR(reg) \
>>    ((RESET_CBUS_REG_IDX << BASE_REG_OFFSET) + (reg << 2))
>>
>> #define RESET0_REGISTER 0x01
>> #define P_RESET0_REGISTER RESET_CBUS_REG_ADDR(RESET0_REGISTER)
> 
> when I do the maths:
> (5 << 24) + (0x01 << 2) = 0x5000004
> 
> The GX SoCs have the reset controller at cbus + 0x4404
> however, the offset may have changed in G12A because the SAR ADC
> offset also changed (just one example).
> 
> Do you have any hint how to verify the CBUS offset (0x1004) of the
> reset controller?

You can find base the address found in the G12A DT for the usb2 phy :
https://github.com/hardkernel/linux/blob/odroidn2-4.9.y/arch/arm64/boot/dts/amlogic/mesong12a.dtsi#L379

Neil

> 
> 
> Regards
> Martin
> 

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

  reply	other threads:[~2019-03-16 14:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 15:13 [PATCH 0/9] arm64: dts: g12a: Add peripherals Neil Armstrong
2019-03-07 15:13 ` [PATCH 1/9] arm64: dts: meson: g12a: Add AO Clock + Reset Controller support Neil Armstrong
2019-03-15 21:07   ` Martin Blumenstingl
2019-03-16 14:26     ` Neil Armstrong
2019-03-07 15:13 ` [PATCH 2/9] arm64: dts: meson: g12a: Add AO Secure node Neil Armstrong
2019-03-15 21:09   ` Martin Blumenstingl
2019-03-07 15:13 ` [PATCH 3/9] arm64: dts: meson: g12a: add pinctrl support controllers Neil Armstrong
2019-03-07 15:13 ` [PATCH 4/9] arm64: dts: meson: g12a: add uart_ao_a pinctrl Neil Armstrong
2019-03-11  9:13   ` Neil Armstrong
2019-03-12 21:15     ` Kevin Hilman
2019-03-13  9:52       ` Neil Armstrong
2019-03-07 15:13 ` [PATCH 5/9] arm64: dts: meson: g12a: add reset controller Neil Armstrong
2019-03-15 21:31   ` Martin Blumenstingl
2019-03-16 14:31     ` Neil Armstrong [this message]
2019-03-16 22:09       ` Martin Blumenstingl
2019-03-07 15:13 ` [PATCH 6/9] arm64: dts: meson: g12a: Add UART A, B & C nodes and pins Neil Armstrong
2019-03-12 21:02   ` Kevin Hilman
2019-03-15 21:24   ` Martin Blumenstingl
2019-03-16 14:35     ` Neil Armstrong
2019-03-16 22:14       ` Martin Blumenstingl
2019-03-17 10:42         ` Neil Armstrong
2019-03-07 15:13 ` [PATCH 7/9] arm64: dts: meson: g12a: Add SAR ADC node Neil Armstrong
2019-03-15 21:16   ` Martin Blumenstingl
2019-03-07 15:13 ` [PATCH 8/9] arm64: dts: meson: g12a: Add G12A USB nodes Neil Armstrong
2019-03-15 21:40   ` Martin Blumenstingl
2019-03-16 14:37     ` Neil Armstrong
2019-03-07 15:13 ` [PATCH 9/9] arm64: dts: meson: g12a: Add mali-g31 gpu node Neil Armstrong

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=5C8D08DE.7070203@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.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;
as well as URLs for NNTP newsgroup(s).