Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick commits from 5.4-1.0.0-imx onto 5.4-2.1.x-imx #106

Merged
merged 12 commits into from
Aug 18, 2020

Conversation

zandrey
Copy link

@zandrey zandrey commented Aug 18, 2020

Kernel recipe in meta-freescale tracks several commit, which are cherry-picked from community kernel.

They do reside now on the 5.4-1.0.0-imx and should be ported onto 5.4-2.1.x-imx in order to keep both kernel release branches in sync.

This PR introduces following commits ported onto 5.4-2.1.x-imx:
7461212 ARM: dts: imx6ul-kontron-n6x1x-s: Remove an obsolete comment and fix indentation
47c63bc ARM: dts: imx6ul-kontron-n6x1x-s: Add vbus-supply and overcurrent polarity to usb nodes
31d8444 ARM: dts: imx6ul-kontron-n6x1x: Add 'chosen' node with 'stdout-path'
d2029cf ARM: dts: Add support for two more Kontron evalkit boards 'N6311 S' and 'N6411 S'
2e1ebcc ARM: dts: imx6ul-kontron-n6310-s: Move common nodes to a separate file
4c9f889 ARM: dts: Add support for two more Kontron SoMs N6311 and N6411
b7ba857 ARM: dts: imx6ul-kontron-n6310: Move common SoM nodes to a separate file
e49e0df ARM: imx: Fix boot crash if ocotp is not found
9ae81f2 ARM: imx: Correct ocotp id for serial number support of i.MX6ULL/ULZ SoCs
0c5b7c4 soc: imx-scu: Using existing serial_number instead of UID
3bf9a6c soc: imx8: Using existing serial_number instead of UID
2e6d8c9 ARM: imx: Add serial number support for i.MX6/7 SoCs

Anson-Huang and others added 12 commits August 18, 2020 21:20
i.MX6/7 SoCs have a 64-bit SoC unique ID stored in OCOTP,
it can be used as SoC serial number, add this support for
i.MX6Q/6DL/6SL/6SX/6SLL/6UL/6ULL/6ULZ/7D, see below example
on i.MX6Q:

root@imx6qpdlsolox:~# cat /sys/devices/soc0/serial_number
240F31D4E1FDFCA7

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit 8267ff8)
(cherry picked from commit 134cbb8)
The soc_device_attribute structure already contains a serial_number
attribute to show SoC's unique ID, just use it to show SoC's unique
ID instead of creating a new file called soc_uid.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit a0708f5)
(cherry picked from commit 0ee8e00)
The soc_device_attribute structure already contains a serial_number
attribute to show SoC's unique ID, just use it to show SoC's unique
ID instead of creating a new file called soc_uid.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit 7ae399b)
(cherry picked from commit 564409a)
…SoCs

After the commit 8267ff8 ("ARM: imx: Add serial number support for i.MX6/7 SoCs")
the kernel doesn't start on i.MX6ULL/ULZ SoC.
Tested on next-20191205.

For i.MX6ULL/ULZ the variable "ocotp_compat" is set to "fsl,imx6ul-ocotp", but with commit
ffbc34b ("nvmem: imx-ocotp: Implement i.MX6ULL/ULZ support") and commit
f243bc8 ("ARM: dts: imx6ull: Fix i.MX6ULL/ULZ ocotp compatible") the value
"fsl,imx6ull-ocotp" is already defined and set in device tree...

By setting "ocotp_compat" to "fsl,imx6ull-ocotp" the kernel does boot.

Fixes: 8267ff8 ("ARM: imx: Add serial number support for i.MX6/7 SoCs")
Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit 125ad46)
(cherry picked from commit 8aad503)
The imx_soc_device_init functions tries to fetch the ocotp regmap in
order to soc serial number. If regmap fetch fails then a message is
printed but regmap_read is called anyway and the system crashes.

Failing to lookup ocotp regmap shouldn't be a fatal boot error so check
that the pointer is valid.

Only side-effect of ocotp lookup failure now is that serial number will
be reported as all-zeros which is acceptable.

Cc: stable@vger.kernel.org
Fixes: 8267ff8 ("ARM: imx: Add serial number support for i.MX6/7 SoCs")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Tested-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit 7947e32)
(cherry picked from commit 40a6a98)
The Kontron N6311 and N6411 SoMs are very similar to N6310. In
preparation to add support for them, we move the common nodes to a
separate file imx6ul-kontron-n6x1x-som-common.dtsi.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit b419b89)
(cherry picked from commit 3bee262)
The N6311 and the N6411 SoM are similar to the Kontron N6310 SoM.
They are pin-compatible, but feature a larger RAM and NAND flash
(512MiB instead of 256MiB). Further, the N6411 has an i.MX6ULL SoC,
instead of an i.MX6UL.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit 6dd2ed7)
(cherry picked from commit 8b39f5e)
The baseboard for the Kontron N6310 SoM is also used for other SoMs
such as N6311 and N6411. In order to share the code, we move the
definitions of the baseboard to a separate dtsi file.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit 3b5212c)
(cherry picked from commit e778467)
…nd 'N6411 S'

The 'N6311 S' and the 'N6411 S' are similar to the Kontron 'N6310 S'
evaluation kit boards. Instead of the N6310 SoM, they feature a N6311
or N6411 SoM.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit 2e426b2)
(cherry picked from commit d4b105f)
The Kontron N6x1x SoMs all use uart4 as a debug serial interface.
Therefore we set it in the 'chosen' node.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit 36f42bb)
(cherry picked from commit 67e4495)
…arity to usb nodes

To silence the warnings shown by the driver at boot time, we add a
fixed regulator for the 5V supply of usbotg2 and specify the polarity
of the overcurrent signal for usbotg1.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit 4358486)
(cherry picked from commit f037910)
…indentation

The ECSPI1 is not used for a FRAM chip, so remove the comment.
While at it, also change some whitespaces to tabs to comply with the
indentation style of the rest of the file.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit cc55c85)
(cherry picked from commit 285869e)
@otavio otavio merged commit 397a487 into Freescale:5.4-2.1.x-imx Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants