1
0
Fork 0
Commit Graph

873455 Commits (alistair/sunxi64-5.4-dsi)

Author SHA1 Message Date
Dirk Mueller f5c9e5400c scripts/dtc: Remove redundant YYLOC global declaration
gcc 10 will default to -fno-common, which causes this error at link
time:

  (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here

This is because both dtc-lexer as well as dtc-parser define the same
global symbol yyloc. Before with -fcommon those were merged into one
defintion. The proper solution would be to to mark this as "extern",
however that leads to:

  dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
   26 | extern YYLTYPE yylloc;
      |                ^~~~~~
In file included from dtc-lexer.l:24:
dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
  127 | extern YYLTYPE yylloc;
      |                ^~~~~~
cc1: all warnings being treated as errors

which means the declaration is completely redundant and can just be
dropped.

Signed-off-by: Dirk Mueller <dmueller@suse.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[robh: cherry-pick from upstream]
Cc: stable@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
2020-10-02 19:20:27 -07:00
Alistair Francis 658171708c Fix for the Lima GPU display
Revert some files back to a working state.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
2019-12-05 21:23:13 -08:00
Alistair Francis 6a58556571 arm64: dts: allwinner: a64-sopine-baseboard: Add touchscreen
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2019-12-03 19:31:46 -08:00
Alistair Francis 0a282d0685 arm64: dts: allwinner: a64-pine64-sopine: Enable FeiyangFY07024DI26A30-D DSI panel
Feiyang FY07024DI26A30-D MIPI_DSI panel is desiged to attach with
DSI connector on pine64 boards, enable the same for pine64 sopine.

DSI panel connected via board DSI port with,
- DC1SW as AVDD supply
- DLDO2 as DVDD supply
- DLDO1 as VCC-DSI supply
- PD24 gpio for reset pin
- PH10 gpio for backlight enable pin

Signed-off-by: Alistair Francis <alistair@alistair23.me>
2019-12-03 19:31:46 -08:00
Jagan Teki d1cccf50a0 arm64: dts: allwinner: a64: Add MIPI DSI pipeline
Add MIPI DSI pipeline for Allwinner A64.

- dsi node, with A64 compatible since it doesn't support
  DSI_SCLK gating unlike A33
- dphy node, with A64 compatible with A33 fallback since
  DPHY on A64 and A33 is similar
- finally, attach the dsi_in to tcon0 for complete MIPI DSI

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Merlijn Wajer <merlijn@wizzup.org>
2019-12-03 19:31:46 -08:00
Alistair Francis d1a9f5a8fe arm64: dts: sun50i: sopine-baseboard: Expose serial1, serial2 and serial3
Follow what the sun50i-a64-pine64.dts does and expose all 5 serial
connections.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
2019-12-03 19:31:46 -08:00
Jagan Teki 8f177e185c arm64: dts: allwinner: a64: Add MIPI DSI pipeline
Add MIPI DSI pipeline for Allwinner A64.

- dsi node, with A64 compatible since it doesn't support
  DSI_SCLK gating unlike A33
- dphy node, with A64 compatible with A33 fallback since
  DPHY on A64 and A33 is similar
- finally, attach the dsi_in to tcon0 for complete MIPI DSI

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Merlijn Wajer <merlijn@wizzup.org>
Message-Id: <20191025175625.8011-7-jagan@amarulasolutions.com>
2019-12-03 19:31:46 -08:00
Jagan Teki 6291864d8a drm/sun4i: dsi: Add Allwinner A64 MIPI DSI support
The MIPI DSI controller in Allwinner A64 is similar to A33.

But unlike A33, A64 doesn't have DSI_SCLK gating so add compatible
for Allwinner A64 with uninitialized has_mod_clk driver.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Merlijn Wajer <merlijn@wizzup.org>
Message-Id: <20191025175625.8011-6-jagan@amarulasolutions.com>
2019-12-03 19:31:46 -08:00
Jagan Teki aaaca412a1 drm/sun4i: dsi: Handle bus clock explicitly
Usage of clocks are varies between different Allwinner
DSI controllers. Clocking in A33 would need bus and
mod clocks where as A64 would need only bus clock.

To support this kind of clocking structure variants
in the same dsi driver, explicit handling of common
clock would require since the A64 doesn't need to
mention the clock-names explicitly in dts since it
support only one bus clock.

Also pass clk_id NULL instead "bus" to regmap clock
init function since the single clock variants no need
to mention clock-names explicitly.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Message-Id: <20191025175625.8011-5-jagan@amarulasolutions.com>
2019-12-03 19:31:45 -08:00
Jagan Teki 60ac65c8a7 drm/sun4i: dsi: Add has_mod_clk quirk
As per the user manual, look like mod clock is not mandatory
for all Allwinner MIPI DSI controllers, it is connected to
CLK_DSI_SCLK for A31 and not available in A64.

So add has_mod_clk quirk and process the mod clk accordingly.

Tested-by: Merlijn Wajer <merlijn@wizzup.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Message-Id: <20191025175625.8011-4-jagan@amarulasolutions.com>
2019-12-03 19:31:45 -08:00
Jagan Teki 1d18046b36 dt-bindings: sun6i-dsi: Add A64 DPHY compatible (w/ A31 fallback)
The MIPI DSI PHY controller on Allwinner A64 is similar
on the one on A31.

Add A64 compatible and append A31 compatible as fallback.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Message-Id: <20191025175625.8011-3-jagan@amarulasolutions.com>
2019-12-03 19:31:45 -08:00
Jagan Teki 14360e6352 dt-bindings: sun6i-dsi: Document A64 MIPI-DSI controller
The MIPI DSI controller in Allwinner A64 is similar to A33.

But unlike A33, A64 doesn't have DSI_SCLK gating so it is valid
to have separate compatible for A64 on the same driver.

DSI_SCLK uses mod clock-names on dt-bindings, so the same
is not required for A64.

On that note
- A64 require minimum of 1 clock like the bus clock
- A33 require minimum of 2 clocks like both bus, mod clocks

So, update dt-bindings so-that it can document both A33,
A64 bindings requirements.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Message-Id: <20191025175625.8011-2-jagan@amarulasolutions.com>
2019-12-03 19:31:45 -08:00
Alistair Francis 486256621d drivers/gpu/drm: Update based on drm-misc-next-fixes-2019-11-20
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2019-12-03 19:31:30 -08:00
Ondrej Jirman 7a2e593767 drm: sun4i: Mark one of the UI planes as a cursor one
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-12-02 17:54:04 -08:00
Ondrej Jirman e3e0478fa4 drm: sun8i-ui/vi: Fix layer zpos change/atomic modesetting
This also speeds up mouse selection in a major way. No more stuttering.
Also various blinking artifacts are gone.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-12-02 17:54:04 -08:00
Vasily Khoruzhick eff271abe4 drm/sun4i: Implement gamma correction
Add support for gamma corretion to sun4i TCON driver. Its LUT has 256
entries and can be updated only when gamma correction is disabled.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:04 -08:00
Icenowy Zheng 0ea70dad01 arm64: allwinner: a64: enable LCD-related hardware for Pinebook
Pinebook has an ANX6345 bridge connected to the RGB666 LCD output and
eDP panel input. The bridge is controlled via I2C that's connected to
R_I2C bus.

There're pinebooks with 3 different panels in the wild, all 3 with
different timings. Add all the compatibles to panel node and hope that
we can get correct timings from EDID. If reading EDID fails it's up to
firmware to fixup compatible string.

Enable all this hardware in device tree.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:04 -08:00
Vasily Khoruzhick 8b413d3507 drm/panel: simple: Add NewEast Optoelectronics CO., LTD WJFH116008A panel support
This commit adds support for the NewEast Optoelectronics CO., LTD
WJFH116008A 11.6" 1920x1080 TFT LCD panel.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:04 -08:00
Vasily Khoruzhick 53330433fe dt-bindings: Add Guangdong Neweast Optoelectronics CO. LTD vendor prefix
Add vendor prefix for Guangdong Neweast Optoelectronics CO. LTD

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:04 -08:00
Vasily Khoruzhick ed4570dcd0 drm/panel: simple: Add BOE HB140WX1-501 panel support
This commit adds support for the BOE HB140WX1-501 14" WXGA TFT LCD
panel.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:04 -08:00
Icenowy Zheng 6c1f50aba7 dt-bindings: Add ANX6345 DP/eDP transmitter binding
The ANX6345 is an ultra-low power DisplayPort/eDP transmitter designed
for portable devices.

Add a binding document for it.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:04 -08:00
Icenowy Zheng 8f334b5c62 drm/bridge: split some definitions of ANX78xx to dedicated headers
Some definitions currently in analogix-anx78xx.h are not restricted to
the ANX78xx series, but also applicable to other DisplayPort
transmitters by Analogix.

Split out them to dedicated headers, and make analogix-anx78xx.h include
them.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:04 -08:00
Vasily Khoruzhick 5b5a4f009e Enable HDMI output on Pinebook
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:04 -08:00
Vasily Khoruzhick f3f00e0839 arm64: allwinner: a64: enable Bluetooth On SoPine baseboard
SoPine has optional RTL8723BS WiFi + BT module, BT is connected to UART1
and uses PL4 as BT reset, PL5 as device wake GPIO, PL6 as host wake GPIO
the I2C controlling signals are connected to R_I2C bus.

Enable it in the device tree.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:04 -08:00
Vasily Khoruzhick 2b6254a3c4 arm64: allwinner: a64: enable Bluetooth On Pine64
Pine64 has optional RTL8723BS WiFi + BT module, BT is connected to UART1
and uses PL4 as BT reset, PL5 as device wake GPIO, PL6 as host wake GPIO
the I2C controlling signals are connected to R_I2C bus.

Enable it in the device tree.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:04 -08:00
Vasily Khoruzhick de4412b7d8 arm64: allwinner: a64: enable Bluetooth On Pinebook
Pinebook has an RTL8723CS WiFi + BT chip, BT is connected to UART1
and uses PL4 as BT reset, PL5 as device wake GPIO, PL6 as host wake GPIO
the I2C controlling signals are connected to R_I2C bus.

Enable it in the device tree.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:04 -08:00
Vasily Khoruzhick 1b80e61701 Bluetooth: hci_h5: Add support for binding RTL8723BS with device tree
RTL8723BS is often used in ARM boards, so add ability to bind it
using device tree.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:03 -08:00
Vasily Khoruzhick c26efe18b3 dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth
Add binding document for bluetooth part of RTL8723BS/RTL8723CS

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:03 -08:00
Vasily Khoruzhick 0b52a42ade Bluetooth: hci_h5: Add support for reset GPIO
Some boards (e.g. Pine64 and Pinebook) wire a GPIO to reset pin of
RTL8723BS

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:03 -08:00
Vasily Khoruzhick 53f0ec4321 Bluetooth: Add new quirk for broken local ext features max_page
Some adapters (e.g. RTL8723CS) advertise that they have more than
2 pages for local ext features, but they don't support any features
declared in these pages. RTL8723CS reports max_page = 2 and declares
support for sync train and secure connection, but it responds with
either garbage or with error in status on corresponding commands.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:03 -08:00
Vasily Khoruzhick f7931173cc rtl8723bs: disable error message about failure to alloc recvbuf 2019-12-02 17:54:03 -08:00
Vasily Khoruzhick 73f34b668e sopine: baseboard: enable HS200 for eMMC
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:03 -08:00
Vasily Khoruzhick ea1a5da0eb Add sopine HDMI sound and WiFi support
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:03 -08:00
Icenowy Zheng 025a7c4d4f arm64: allwinner: a64: disable the RTL8211E internal RX delay on Pine64+
Some Pine64+ boards have a broken RTL8211E PHY, which cannot work
reliably in 1000Base-T mode with default configuration.

A solution is passed to Pine64, which is said to be disabling the
internal RX delay of the PHY.

Enable the hack by set the PHY mode to RGMII-TXID.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
2019-12-02 17:54:03 -08:00
Icenowy Zheng 5cb5d7e24d net: stmmac: dwmac-sun8i: support RGMII modes with PHY internal delay
Some boards uses a PHY with internal delay with an Allwinner SoC.

Support these PHY modes in the driver.

As the driver has no configuration registers for these modes, just treat
them as ordinary RGMII.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
2019-12-02 17:54:03 -08:00
Icenowy Zheng ab892463e0 arm64: allwinner: a64: enable Wi-Fi for Pine64
The Wi-Fi modules of Pine64 is powered via DLDO4 and ELDO1 (the latter
one provides I/O voltage).

Add device node for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
2019-12-02 17:54:03 -08:00
Vasily Khoruzhick 00f3de2bc5 arm64: dts: allwinner: a64: enable DVFS
Add CPU regulator, CPU clock and operation points to enable DVFS on A64

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:03 -08:00
Vasily Khoruzhick 3815a3762a clk: sunxi-ng: a64: export CLK_CPUX clock for DVFS
Export CLK_CPUX so we can reference it in CPU node.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:03 -08:00
Icenowy Zheng 76c5fa72e1 clk: sunxi-ng: add mux and pll notifiers for A64 CPU clock
The A64 PLL_CPU clock has the same instability if some factor changed
without the PLL gated like other SoCs with sun6i-style CCU, e.g. A33,
H3.

Add the mux and pll notifiers for A64 CPU clock to workaround the
problem.

Fixes: c6a0637460 ("clk: sunxi-ng: Add A64 clocks")
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
2019-12-02 17:54:03 -08:00
Vasily Khoruzhick a7c7cb66bb arm64: dts: allwinner: a64: Add thermal zones and enable thermal sensors
A64 has 3 thermal sensors: 1 for CPU, 2 for GPU. Add thermal sensor node
and define thermal zones.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:02 -08:00
Vasily Khoruzhick 0e2ca512ca arm64: dts: allwinner: A64: Add thermal calibration cell to SID
A64 stores thermal sensor calibration data in EFUSE at offset 0x34,
each value is 2 bytes

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:02 -08:00
Vasily Khoruzhick 887de4d17a thermal: sun8i: add thermal driver for A64
Thermal sensor controller in A64 is similar to H3, but it has 3 sensors.
Extend H3 functions to add support for multiple sensors.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-12-02 17:54:02 -08:00
Yangtao Li 7aa47b18f0 thermal: sun8i: add thermal driver for h3
This patch adds the support for allwinner h3 thermal sensor.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
2019-12-02 17:54:02 -08:00
Yangtao Li 0a68ca7c3c dt-bindings: thermal: add binding document for h3 thermal controller
This patch adds binding document for allwinner h3 thermal controller.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
2019-12-02 17:54:02 -08:00
Yangtao Li 6f520a8b55 thermal: sun8i: rework for ths calibrate func
Here, we do something to prepare for the subsequent
support of multiple platforms.

1) rename sun50i_ths_calibrate to sun8i_ths_calibrate, because
   this function should be suitable for all platforms now.

2) introduce calibrate callback to mask calibration method
   differences.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
2019-12-02 17:54:02 -08:00
Yangtao Li 0d3c9dfd38 thermal: sun8i: support ahb clocks
H3 has extra clock, so introduce something in ths_thermal_chip/ths_device
and adds the process of the clock.

This is pre-work for supprt it.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
2019-12-02 17:54:02 -08:00
Yangtao Li e6e783279d thermal: sun8i: rework for ths irq handler func
Here, we do something to prepare for the subsequent
support of multiple platforms.

1) rename sun50i_h6_irq_thread to sun8i_irq_thread, because
   this function should be suitable for all platforms.

2) introduce irq_ack callback to mask interrupt register
   differences.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
2019-12-02 17:54:02 -08:00
Yangtao Li 1f5a8f6160 thermal: sun8i: get ths init func from device compatible
There are some differences in register initialization for
different socs. So we get different initialization functions
from device compatible.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
2019-12-02 17:54:02 -08:00
Yangtao Li 9008acf6a2 thermal: sun8i: rework for sun8i_ths_get_temp()
For different socs, the way they get and calculate the
temperature is roughly the same. So get the difference
from device compatible.

Difference point:
  1) temperature calculation formula parameters
  2) ths data register start address

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
2019-12-02 17:54:02 -08:00
Yangtao Li 059fcf0cba thermal: sun8i: get ths sensor number from device compatible
For different socs, the number of ths sensors is different.
So we need to do some work in order to support more soc.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
2019-12-02 17:54:02 -08:00