From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751841AbdISLzp (ORCPT ); Tue, 19 Sep 2017 07:55:45 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:34893 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751575AbdISLzj (ORCPT ); Tue, 19 Sep 2017 07:55:39 -0400 Date: Tue, 19 Sep 2017 13:55:02 +0200 From: Maxime Ripard To: Icenowy Zheng Cc: Srinivas Kandagatla , Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [linux-sunxi] Re: [PATCH] nvmem: sunxi-sid: add support for A64/H5's SID controller Message-ID: <20170919115502.exfbpdwb3c3eenee@flea.lan> References: <20170918154204.54427-1-icenowy@aosc.io> <20170919082019.6bopwauso4mbslqo@flea.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ylaxkcevlnqxzcge" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170714 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ylaxkcevlnqxzcge Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 19, 2017 at 04:23:14PM +0800, Icenowy Zheng wrote: >=20 >=20 > =E4=BA=8E 2017=E5=B9=B49=E6=9C=8819=E6=97=A5 GMT+08:00 =E4=B8=8B=E5=8D=88= 4:20:19, Maxime Ripard =E5=86=99=E5=88= =B0: > >On Mon, Sep 18, 2017 at 11:42:04PM +0800, Icenowy Zheng wrote: > >> Allwinner A64/H5 SoCs come with a SID controller like the one in H3, > >but > >> without the silicon bug that makes the initial value at 0x200 wrong, > >so > >> the value at 0x200 can be directly read. > >>=20 > >> Add support for this kind of SID controller. > >>=20 > >> Signed-off-by: Icenowy Zheng > >> --- > >> Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 1 > >+ > >> drivers/nvmem/sunxi_sid.c | 6 > >++++++ > >> 2 files changed, 7 insertions(+) > >>=20 > >> diff --git > >a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt > >b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt > >> index ef06d061913c..6ea0836939ee 100644 > >> --- a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt > >> +++ b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt > >> @@ -5,6 +5,7 @@ Required properties: > >> "allwinner,sun4i-a10-sid" > >> "allwinner,sun7i-a20-sid" > >> "allwinner,sun8i-h3-sid" > >> + "allwinner,sun50i-a64-sid" > >> =20 > >> - reg: Should contain registers location and length > >> =20 > >> diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c > >> index 0d6648be93b8..3c9fd4fb9207 100644 > >> --- a/drivers/nvmem/sunxi_sid.c > >> +++ b/drivers/nvmem/sunxi_sid.c > >> @@ -199,10 +199,16 @@ static const struct sunxi_sid_cfg sun8i_h3_cfg > >=3D { > >> .need_register_readout =3D true, > >> }; > >> =20 > >> +static const struct sunxi_sid_cfg sun50i_a64_cfg =3D { > >> + .value_offset =3D 0x200, > >> + .size =3D 0x100, > >> +}; > >> + > > > >How did you get those values? >=20 > In the BSP U-Boot headers. This should be mentionned in your commit log then. > >Also, it's reported that the SID can only be accessed in secure > >mode, did you test it? >=20 > Yes, however the secure is broken again, and this only > happen if Secure Boot bit is burned. Is broken again, meaning? As far as I know, the only breakage we've had is on the A80 / A83T, but we don't have anything like it on the A64, do we? > If it's really burned, we will have no clean way to access SID. Well, in such a case we shouldn't access it either, so.. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --ylaxkcevlnqxzcge Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJZwQWWAAoJEBx+YmzsjxAgWzQQAKSisWxjk0SCzNDufbBQfGbw YhxV0RHRr/3Y9G99njrmRmTvjqUAywADwlu2bQ8ay7UJ3ZqCCsQ7WKphJpP30B7F qNmobvIJBnuApL5BqMAhT0Drh8NMmvQoNyJZJw8jtliePkfHOpXED8dSktywQepq MM1sPrACT9FVSXWK/yyO0/6rAGg2j2FuA5Hk+fZVSvvVCR26mK9CvhrbFL50lj60 Z9wDbIg/lnkYc07TwZHPBjHwftg42usx9tu6eEzpLYbz9hhXLk8xiNMY0eJVSGkQ FnWZBcFlmuV2ptdlW6+NTTt9pp8vY894Civ+8flh1nD16GcIVQJshiQhAbnpIl9J gFvbQTxpjEcQd6DN0/8iy40695a9AvwbmFhPPcNS36kjtGckZDN4VIB7qtuszK4C Hhdb2O+MWaQpPCIFvQlOBtbypGKI4rbg5YjHGZ442j2F58DYnT2WQ6gedEYWczvv Zx0iFu2vz2/9NPTvx7nIfGKivOvxrAjw3V3G3Si17MJjJGzivaoWCmxDJMcYKElh W6HXBT69YfbWxS0We2g7aVaelUrLjPTO40jT+BLZHBTZjwnoU61yn7I0FcVcSASu PPSC8/JjcvGB2U9F2anKbrzCReNTY46z7SyjO20EX00BvjCEDogIu+DnOFzPvajh lhf+HgryRn8NAhjo+LTx =TBxC -----END PGP SIGNATURE----- --ylaxkcevlnqxzcge--