1
0
Fork 0
Commit Graph

47 Commits (3cfa958b08a4f81645903a364825b2b18f41c117)

Author SHA1 Message Date
Martin Blumenstingl f6eb973db2 ARM: dts: meson: add support for the RTC
The 32-bit Meson SoCs have an RTC block in the AO (always on) area. The
RTC requires an external 32.768 kHz oscillator to work properly. Whether
or not this crystal exists depends on the board, so it has to be added
for each board.dts (instead of adding it somewhere in a generic .dtsi).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-04-16 11:57:48 -07:00
Martin Blumenstingl b6eac0d06b ARM: dts: meson8: add the internal clock measurer
The Amlogic Meson8 SoC has an internal clock measurer IP which allows
measuring frequencies of various clock paths.
Enable it on meson8.dtsi so we can use it.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-03-18 09:06:55 -07:00
Martin Blumenstingl f4c6e8e223 ARM: dts: meson8: add the temperature calibration data for the SAR ADC
The SAR ADC can measure the chip temperature of the SoC. This only
works if the chip is calibrated and if the calibration data is written
to the correct registers. The calibration data is stored in the upper
two bytes of eFuse offset 0x1f4.

This adds the eFuse cell for the temperature calibration data and
passes it to the SAR ADC. We also need to pass the HHI sysctrl node to
the SAR ADC because the 4th TSC (temperature sensor calibration
coefficient) bit is stored in the HHI region (unlike bits [3:0] which
are stored directly inside the SAR ADC's register area).

On boards that have the SAR ADC enabled channel 8 can be used to
measure the chip temperature.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-02-11 12:52:26 -08:00
Martin Blumenstingl b6db3936f2 ARM: dts: meson: switch the clock controller to the HHI register area
The clock controller on Meson8/Meson8m2 and Meson8b is part of a
register region called "HHI". This register area contains more
functionality than just a clock controller:
- the clock controller
- some reset controller bits
- temperature sensor calibration data (on Meson8b and Meson8m2 only)
- HDMI controller

Allow access to this HHI register area as "system controller". Also
migrate the Meson8 and Meson8b clock controllers to this new node.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-02-11 12:52:25 -08:00
Martin Blumenstingl 7d3f6b536e ARM: dts: meson8: add the Mali-450 MP6 GPU
Add the Mali-450 GPU and it's OPP table for the Meson8 and Meson8m2 (the
latter inherits meson8.dtsi).
These SoCs have a Mali-450 GPU with six pixel processors. The OPP table
is taken from the 3.10 vendor kernel which uses the following table:
  FCLK_DEV7 | 1,     /* 182.1 Mhz */
  FCLK_DEV4 | 1,     /* 318.7 Mhz */
  FCLK_DEV3 | 1,     /* 425 Mhz */
  FCLK_DEV5 | 0,     /* 510 Mhz */
  FCLK_DEV4 | 0,     /* 637.5 Mhz */
This describes the mux (FCLK_DEVx) and a 0-based divider in the clock
controller. "FCLK" is "fixed_pll" which is running at 2550MHz.
The "turbo" setting is described by "turbo_clock = 4" where 4 is the
index of the table above.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-01-10 16:34:18 -08:00
Martin Blumenstingl 7e22d72834 ARM: dts: meson8: add the APB bus
Various peripherals (Mali GPU, NAND controller, VPU, etc.) are located
in the APB bus. Describe this bus so we can add devices to it.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-01-10 16:29:00 -08:00
Martin Blumenstingl 622b9827b2 ARM: dts: meson: meson8: add the CPU OPP table
The values are taken from Amlogic's 3.10 kernel sources. Their sources
have a "meson8m2_n200_2G.dtd" which defines a different voltage table:
- 0.86V for 96MHz
- (values in between omitted)
- 1.14V for 1.992GHz

The reason for this is simply the hardware design because the voltage
regulator on this board is has a minimum output of 0.86V and a maximum
output of 1.14V. The recommended settings are added with this patch
instead of using the values that are only valid for one board.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-12-04 16:48:14 -08:00
Martin Blumenstingl 2710e8d213 ARM: dts: meson8: add the Cortex-A9 global timer
The Meson8 and Meson8m2 SoCs are using four Cortex-A9 cores. These come
with an ARM global timer.
This adds the Cortex-A9 global timer but keeps it disabled for now. The
timer is clocked by the "PERIPH" clock whose rate can change during
runtime (when changing the frequency of the CPU clock). Unfortunately
the arm_global_timer driver does not handle changes to the clock rate
yet.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-12-04 16:48:13 -08:00
Martin Blumenstingl 1124d790b4 ARM: dts: meson8: add the ARM TWD timer
The Meson8 and Meson8m2 SoC are using four ARM Cortex-A9 cores which
come with a "TWD" (Timer-Watchdog) based timer. This adds support for
the ARM TWD Timer on these two SoCs.

Suggested-by: Carlo Caione <carlo@endlessm.com>
[ rebased patch from Carlo, use IRQ_TYPE_EDGE_RISING instead of
  IRQ_TYPE_LEVEL_LOW to prevent "GIC: PPI13 is secure or misconfigured"
  message during boot, use pre-processor macros to specify the IRQ,
  added the correct clock, dropped TWD watchdog node since there's no
  driver for it anymore ]
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-12-04 16:48:13 -08:00
Martin Blumenstingl e8c276d953 ARM: dts: meson: group the Cortex-A5 / Cortex-A9 peripherals
The public Meson8b (S805) datasheet describes a memory region called "A9
Periph base" which starts at 0xC4300000 and ends at 0xC430FFFF. Add a
simple-bus node and move all peripherals that are part of this memory
region.
This makes the .dts a bit easier to read. No functional changes.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-12-04 16:48:12 -08:00
Martin Blumenstingl 7b141abe4a ARM: dts: meson: add the clock inputs for the Meson timer
The Meson Timer IP block has two clock inputs:
- clk81 for using the system clock as timebase
- xtal for a timebase with 1us, 10us, 100us and 1ms resolution

The clocksource driver does not use these yet, but it's still a good
idea to add them as this describes how the hardware actually works
internally.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-28 16:49:03 -08:00
Jerome Brunet 7e26335b1a ARM: dts: meson: consistently disable pin bias
On Amlogic chipsets, the bias set through pinconf applies to the pad
itself, not only the GPIO function. This means that even when we change
the function of the pad from GPIO to anything else, the bias previously
set still applies.

As we have seen with the eMMC, depending on the bias type and the function,
it may trigger problems.

The underlying issue is that we inherit whatever was left by previous user
of the pad (pinconf, u-boot or the ROM code). As a consequence, the actual
setup we will get is undefined.

There is nothing mentioned in the documentation about pad bias and pinmux
function, however leaving it undefined is not an option.

This change consistently disable the pad bias for every pinmux functions.
It seems to work well, we can only assume that the necessary bias (if any)
is already provided by the pin function itself.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Martin Blumenstingl<martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-28 16:41:11 -08:00
Martin Blumenstingl f7f9da89bc ARM: dts: meson8: fix the clock controller register size
The clock controller registers are not 0x460 wide because the reset
controller starts at CBUS 0x4404. This currently overlaps with the
clock controller (which is at CBUS 0x4000).

There is no public documentation available on the actual size of the
clock controller's register area (also called "HHI"). However, in
Amlogic's GPL kernel sources the last "HHI" register is
HHI_HDMI_PHY_CNTL2 at CBUS + 0x43a8. 0x400 was chosen because that size
doesn't seem unlikely.

Fixes: 2c323c43a3 ("ARM: dts: meson8: add and use the real clock controller")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-09-04 14:04:59 -07:00
Martin Blumenstingl e981e459af ARM: dts: meson8: add the uart_A pins
This adds the pins for uart_A, which is used to connect to the Bluetooth
module on some devices.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-05-10 17:03:28 -07:00
Martin Blumenstingl 17b66027e6 ARM: dts: meson8: add the cortex-a9-pmu compatible PMU
Enable the performance monitor unit on Meson8.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-04-27 12:07:55 -07:00
Martin Blumenstingl e1fa57dfd7 ARM: dts: meson8: add the USB reset line
Now that we support the reset controller on Meson8 we can add the reset
line to the USB PHYs (just like on Meson8b).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-02-12 14:13:36 -08:00
Martin Blumenstingl e3087187e5 ARM: dts: meson8: add the reset controller
Meson8 uses the same reset controller as Meson8b. Add the node along
with the #include for the reset lines to meson8.dtsi so we can use it
from there as well.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-02-12 14:13:36 -08:00
Martin Blumenstingl 59e45c691a ARM: dts: meson8: enable the GPIO interrupt controller
This enables the GPIO interrupt controller for the Meson8 SoCs.
Interrupt support on the GPIOs can be used by the MMC framework to
detect when an SD card is inserted/removed or by the input framework to
detect button presses.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-12-11 15:58:46 -08:00
Martin Blumenstingl 6ca7750205 ARM: dts: meson8: use stable UART bindings with correct gate clock
Switch to the stable UART bindings and add the correct gate clocks
to the non-AO UART nodes.
This fixes the non-AO UARTs if the bootloader didn't un-gate the clocks.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-12-06 17:04:03 -08:00
Xingyu Chen b9b9db0201 ARM: dts: meson: drop "sana" clock from SAR ADC
The SAR ADC modules doesn't require The "sana" clock.

Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-12-06 17:03:47 -08:00
Martin Blumenstingl 6844e968b5 ARM: dts: meson8: add more L2 cache settings
Amlogic's vendor kernel prints these PL310 L2 cache controller settings
during boot:
  8 ways, 4096 sets, CACHE_ID 0x4100a0c9,  Cache size: 1048576 B
  AUX_CTRL 0x7ec80001, PERFETCH_CTRL 0x71000007, POWER_CTRL  0x00000000
  TAG_LATENCY 0x00000111, DATA_LATENCY 0x00000222

Add the "prefetch-data", "prefetch-instr" and "arm,shared-override"
properties to get the same L2 cache controller configuration as the
vendor kernel.
Two differences still remain:
- L310_AUX_CTRL_NS_INT_CTRL is currently not supported by the cache-l2x0
driver
- bit 23 is set by the vendor kernel, but this is defined in cache-l2x0.h

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-12-06 17:03:46 -08:00
Arnd Bergmann a5494aed0d Amlogic 64-bit platforms: DT updates for v4.15
- new SoC support: A113D
 - new boards: Tronsmart Vega S96, Khadas vim2
 - reserved memory fixups
 - gpio-names cleanups
 - MMC cleanups, enable high-speed modes
 - misc cleanups
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAlnsbzwACgkQWTcYmtP7
 xmWwSw/+LBr7iNv9ugxgfShcd8ugecjJm7eBMD9zKMJaHw+1AUxhexZsCyUQVjDy
 UjAeTTMsugTzIEvQoSI97h82K3uE7/3zqU+UaWziWILegb8b9VnYVzjHUoodNE9Z
 /9gbIb7P55rlJ1BN0zzXcsvEjvC7TrfklgXBfIBK0Ob2zqDHGpiWOFnrQiuZNweA
 tgSemkT4ELZYAksXszFhU1o87QW5IRqXwNX5ech7p3UpUTdDnY1MPNbLRRh9tVWi
 G7EtLJfbSPEHczBBtfcxQkagpk2TjVStMpYgrAaa3eMG5Ervdh3QrdGp8B7bObPY
 rZgYAU1x7q3PBWm07IpnlnprMC3RHP7wdirXVKMNW1DbYqRBoyGeTc9pF+DgiMNP
 wcxsbQgotSZbeke6ODPaP2xEtIqWCgTee/4P6zjOYfsXxphtVkdfLGvICwpximUj
 CqbXZSsn+pg4g1IsGU3EcVLbFzq2A+uv5hkV18b9ouDIN0mm7+/mpyaLeQ8wrl2U
 5f+dCbrU4ypYosnOQIZKla8kHwutWmur6a9+VBPSEVWMXzdUUmBUicxgUYi5DMLZ
 SLXBklAZ74YqnFNZvrNaLvaD2GR5COU8NpW9S3PBxsUqXa57jMUAAOzbeLLvRB87
 57S3pR7f+thG93pe8JFfP/ciVcnAGn9oQkV5LU8k6lTd7gaxtEw=
 =bJwM
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt

Pull "Amlogic 64-bit platforms: DT updates for v4.15" from Kevin Hilman:

- new SoC support: A113D
- new boards: Tronsmart Vega S96, Khadas vim2
- reserved memory fixups
- gpio-names cleanups
- MMC cleanups, enable high-speed modes
- misc cleanups

* tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  arm64: dts: meson-axg: add initial A113D SoC DT support
  dt-bindings: arm: amlogic: Add Meson AXG binding
  ARM64: dts: meson-gx: remove unnecessary uart compatible
  ARM64: dts: meson-gx: remove unnecessary clocks properties
  ARM64: dts: meson-gxl: Add alternate ARM Trusted Firmware reserved memory zone
  ARM64: dts: meson-gxm: enable HS400 on the vim2
  ARM64: dts: meson-gxbb-nexbox-a95x: Enable USB Nodes
  dt-bindings: arm: amlogic: Add Tronsmart Vega S96 binding
  ARM64: dts: meson-gxm: Add Vega S96 board
  ARM64: dts: meson-gxm: Add support for Khadas VIM2
  ARM64: dts: meson-gxl: Take eMMC data strobe out of eMMC pins
  ARM64: dts: meson-gxl: adjust libretech-cc gpio-line-names
  ARM64: dts: meson-gxl: adjust kvim gpio-line-names
  ARM64: dts: meson-gxbb: adjust odroid-c2 gpio-line-names
  ARM64: dts: meson-gxbb: adjust nanopi-k2 gpio-line-names
  ARM64: dts: meson-gx: adjust gpio-ranges for TEST_N
  ARM64: dts: meson-gx: remove gpio offset
  ARM: dts: meson8: remove gpio offset
  ARM64: dts: meson-gxl-libretech-cc: enable internal phy leds
  ARM64: dts: meson-gxl-libretech-cc: enable saradc
2017-10-30 14:37:17 +01:00
Martin Blumenstingl 2cb51a8ddd ARM: dts: meson: add the efuse node
Meson6, Meson8 and Meson8b use a similar IP block which has access to
512 bytes of efuse data.
During SoC manufacturing some calibration settings for the CVBS
connector and the internal temperature sensor are written to this efuse.
On some boards it additionally stores for example the MAC addresses.

The efuse is enabled on Meson8 and Meson8b but kept disabled on Meson6
since we do not have a clock driver there (which is required to read
data from the efuse).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-10-29 09:00:38 -07:00
Martin Blumenstingl 4a5a27116b ARM: dts: meson8: add support for booting the secondary CPU cores
Booting the secondary CPU cores involves the following nodes/devices:
- SCU (Snoop-Control-Unit, for which we already have a DT node)
- a reset line for each CPU core, provided by the reset-controller
  which is built into the clock-controller
- the PMU (power management unit) which controls the power of the CPU
  cores
- a range in the SRAM specifically reserved for booting secondary CPU
  cores
- the "enable-method" which activates booting the secondary CPU cores

This adds all required nodes and properties to boot the secondary CPU
cores.

Suggested-by: Carlo Caione <carlo@caione.org>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-10-29 08:30:07 -07:00
Martin Blumenstingl 88b1b18ffe ARM: dts: meson: add the SDIO MMC controller
Meson6, Meson8 and Meson8b are using the same MMC controller IP. This
adds the MMC controller node to meson.dtsi so it can be used by all
SoCs.

The controller itself is a bit special, because it has multiple slots.
Each slot is accessed through a sub-node of the controller. However,
currently the driver for this hardware only supports one slot.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-10-11 17:18:25 -07:00
Jerome Brunet 677c432c94 ARM: dts: meson8: remove gpio offset
Remove pin offset on the AO controller. meson pinctrl no longer has
this quirk

Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-10-11 17:12:02 -07:00
Martin Blumenstingl bd835d53f5 ARM: dts: meson: add SoC information nodes
The SoC type and version information is encoded in different register
blocks.
The SoC type information is part of the "assist" registers.
The misc version information is part of the "bootrom" registers.
On Meson8, Meson8b and Meson8m2 there is additionally information about
the minor version. This information is stored in the "analog top"
registers.

Add the nodes for these register blocks so we can decode the SoC type
and version information.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-10-06 15:37:01 -07:00
Martin Blumenstingl 45631ea8b5 ARM: dts: meson: mark the clock controller also as reset controller
The clock controller provides a few reset lines as well. Add the
corresponding CPU cores.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-08-01 12:33:47 -07:00
Martin Blumenstingl 43d91c587f ARM: dts: meson8: add the PWM controller nodes
pwm_ab and pwm_cd are already inherited from meson.dtsi, we only need to
define the correct "compatible" string so the pwm-meson driver can
choose the parent clocks correctly.
pwm_ef is added to meson8.dtsi directly (similar to how it's done in
meson8b.dtsi) as this controller only exists on Meson8 and Meson8b.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-07-28 09:42:11 -07:00
Martin Blumenstingl f28d4bdb74 ARM: dts: meson: use the real ethernet clock on Meson8 and Meson8b
Until now clk81 was used as gate clock for the ethernet controller on
Meson8 whereas Meson8b did not configure a gate clock at all. Use
CLKID_ETH for both SoCs, which is the real gate clock for the ethernet
controller.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-06-16 12:07:11 -07:00
Martin Blumenstingl d8dd3d29d0 ARM: dts: meson8b: add the SCU device node
Amlogic's Meson8b SoC has a Snoop Control Unit (SCU), just like many
other Cortex-A5 SoCs. Add the corresponding devicetree node so it can be
used during SMP boot.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-06-16 12:07:11 -07:00
Martin Blumenstingl e29b1cf874 ARM: dts: meson: add USB support on Meson8 and Meson8b
This adds the DWC2 USB controller nodes and the corresponding USB2 PHY
nodes to meson.dtsi (as the same - or at least a very similar) IP block
is used on all SoCs (at the same physical address).
Additionally meson8.dtsi and meson8b.dtsi add the required clocks to the
DWC2 and USB2 PHY nodes, otherwise the DWC2 controller cannot be
initialized by the dwc2 driver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-06-16 12:07:11 -07:00
Martin Blumenstingl a35910d399 ARM: dts: meson: add the hardware random number generator
All supported Meson SoCs have a random number generator in CBUS.
Newer SoCs (GXBB, GXL and GXM) provide only one 32-bit random number
register, whereas the older SoCs (Meson6, Meson8 and Meson8b) have two
32-bit random number registers. The existing meson-rng driver only
supports the lower 32-bit - but it still works fine on the older SoCs
apart from this small limitation.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-06-16 12:07:11 -07:00
Martin Blumenstingl 8a7f0c52e8 ARM: dts: meson8: add reserved memory zones
There seem to be two memory regions that need to be reserved, otherwise
the system just hangs when running:
$ stress --vm-bytes $(awk '/MemFree/{printf "%d\n", $2 * 0.9;}' < /proc/meminfo)k \
  --vm-keep -m 1

The first memory region is really crucial and without it the system
hangs. I could not find any references to this in Amlogic's GPL kernel
sources.
The second region is used by the "suspend firmware". The u-boot sources
(/arch/arm/cpu/aml_meson/m8/firmwareld.c) state that the suspend
firmware is located at "64M + 15M" which matches CONFIG_MESON_SUSPEND in
the Amlogic GPL kernel sources. The "suspend firmware" is responsible
for waking up the system from suspend state.

This also fixes reading the full SD card as without this the system
would simply hang (probably related to the first memory region, if some
buffer is allocated there).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-06-16 12:07:10 -07:00
Martin Blumenstingl a39a3b9f4f ARM: dts: meson: add the SAR ADC
This adds the SAR ADC to meson.dtsi and configures the clocks on Meson8
and Meson8b to allow boards to use it. Some boards use it to connect a
button to it.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-06-16 12:07:10 -07:00
Martin Blumenstingl d42ce5a98d ARM: dts: meson8: add the pins for the SDIO controller
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-06-16 12:07:10 -07:00
Martin Blumenstingl 192ec775f5 ARM: dts: meson8: add the PWM_E and PWM_F pins
This adds the definition of the PWM_E (CBUS) and PWM_F (AOBUS) to
meson8.dtsi, allowing devices to use them. PWM_E can be used on some
devices to generate the 32.768kHz clock for the SDIO wifi module, while
PWM_F can be used to control the power LED.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-06-16 12:07:10 -07:00
Martin Blumenstingl 7a16f06b90 ARM: dts: meson: use C preprocessor friendly include syntax
This replaces the "/include/" syntax with the "#include" syntax in all
Amlogic Meson .dts and .dtsi files. That is required to use preprocessor
defines (like GIC_SPI and IRQ_TYPE_EDGE_RISING) in meson.dtsi (all files
which directly or indirectly include meson.dtsi need to use the
"#include" syntax, otherwise the .dts files cannot be compiled).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-06-16 12:07:09 -07:00
Martin Blumenstingl 79eb80b70c ARM: dts: meson8: fix the IR receiver pins
The IR receiver pins are currently defined in the CBUS pin-controller.
However the pins are in the AO region, which is controlled by the AOBUS
pin-controller. Move the pins to pinctrl_aobus so they can actually be
used.

Fixes: b60e1157d8 ("ARM: dts: amlogic: Split pinctrl device for Meson8 / Meson8b")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-06-16 12:06:53 -07:00
Martin Blumenstingl 2c323c43a3 ARM: dts: meson8: add and use the real clock controller
This removes the dummy clk81 gate and replaces it with the actual clock
controller's CLKID_CLK81. This will also allow us to pass the real clock
IDs to all devices where the clock is controlled by clkc in the future.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-06-09 11:21:21 -07:00
Carlo Caione bbe5b23dfd ARM: dts: meson: Extend L2 cache controller node for Meson8 and Meson8b
This patch extends the L2 cache controller node for the Amlogic Meson8
and Meson8b SoCs with some missing parameters. These are taken from the
Amlogic GPL kernel source.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
[apply the change to Meson8 and Meson8b and updated description]
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-05-26 11:23:08 -07:00
Martin Blumenstingl 200a575b68 ARM: dts: meson: organize devices in their corresponding busses
The Amlogic Meson SoCs have most of the internal peripherals organized
in busses. Use them to make the dts easier to read and to avoid
duplicated register (bus) offset definitions.

The bus information is taken from the vendor kernel:
	#define IO_CBUS_PHY_BASE        0xc1100000  ///2M
	#define IO_AOBUS_PHY_BASE       0xc8100000  ///1M

There are more internal busses (such as the abp bus which seems to
contain audio, HDMI and Mali registers), but since we don't have
drivers for them yet these are not added (yet).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
[khilman: minor whitespace fix]
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-05-26 11:23:08 -07:00
Neil Armstrong 90f349ade2 ARM: dts: meson8: Add gpio-ranges properties
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-28 07:56:06 -07:00
Carlo Caione b60e1157d8 ARM: dts: amlogic: Split pinctrl device for Meson8 / Meson8b
Signed-off-by: Carlo Caione <carlo@endlessm.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Tested-by: Kevin Hilman <khilman@baylibre.com>
2016-03-30 19:51:57 +02:00
Beniamino Galvani d9fea88c4f ARM: dts: meson8: add pinctrl node
Add pinctrl node to the DTSI file for meson8 and sub-nodes for some
standard mux configurations.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Carlo Caione <carlo@endlessm.com>
2015-03-02 11:00:59 +01:00
Beniamino Galvani 550ab390d7 ARM: meson: DTS: enable L2 cache
This enables the L2 cache controller available in Amlogic SoCs.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Carlo Caione <carlo@caione.org>
2014-11-18 16:36:14 +01:00
Beniamino Galvani aeff05a39a ARM: dts: add dtsi for Amlogic Meson8 SoCs
This adds a dtsi for Amlogic Meson8 SoCs. It differs from the Meson6
dtsi for the number of Cortex-A9 cores (4 vs 2) and for the frequency
of clk81.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Carlo Caione <carlo@caione.org>
2014-11-18 16:36:06 +01:00