Commit Graph

9219 Commits

Author SHA1 Message Date
Krzysztof Kozlowski
16ce487b86 regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled
commit b16bef60a9 upstream.

The driver and its bindings, before commit 04f9f068a6 ("regulator:
s5m8767: Modify parsing method of the voltage table of buck2/3/4") were
requiring to provide at least one safe/default voltage for DVS registers
if DVS GPIO is not being enabled.

IOW, if s5m8767,pmic-buck2-uses-gpio-dvs is missing, the
s5m8767,pmic-buck2-dvs-voltage should still be present and contain one
voltage.

This requirement was coming from driver behavior matching this condition
(none of DVS GPIO is enabled): it was always initializing the DVS
selector pins to 0 and keeping the DVS enable setting at reset value
(enabled).  Therefore if none of DVS GPIO is enabled in devicetree,
driver was configuring the first DVS voltage for buck[234].

Mentioned commit 04f9f068a6 ("regulator: s5m8767: Modify parsing
method of the voltage table of buck2/3/4") broke it because DVS voltage
won't be parsed from devicetree if DVS GPIO is not enabled.  After the
change, driver will configure bucks to use the register reset value as
voltage which might have unpleasant effects.

Fix this by relaxing the bindings constrain: if DVS GPIO is not enabled
in devicetree (therefore DVS voltage is also not parsed), explicitly
disable it.

Cc: <stable@vger.kernel.org>
Fixes: 04f9f068a6 ("regulator: s5m8767: Modify parsing method of the voltage table of buck2/3/4")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Rob Herring <robh@kernel.org>
Message-Id: <20211008113723.134648-2-krzysztof.kozlowski@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-16 12:13:12 +09:00
Miquel Raynal
80f183bad3 dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
[ Upstream commit 778cb8e39f ]

"PAGESIZE / 512" is the number of ECC chunks.
"ECC_BYTES" is the number of bytes needed to store a single ECC code.
"2" is the space reserved by the bad block marker.

"2 + (PAGESIZE / 512) * ECC_BYTES" should of course be lower or equal
than the total number of OOB bytes, otherwise it won't fit.

Fix the equation by substituting s/>=/<=/.

Suggested-by: Ryan J. Barnett <ryan.barnett@collins.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/linux-mtd/20210610143945.3504781-1-miquel.raynal@bootlin.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-16 11:46:56 +09:00
Krzysztof Kozlowski
e1fba672a5 dt-bindings: net: correct interrupt flags in examples
[ Upstream commit 4d521943f7 ]

GPIO_ACTIVE_x flags are not correct in the context of interrupt flags.
These are simple defines so they could be used in DTS but they will not
have the same meaning:
1. GPIO_ACTIVE_HIGH = 0 = IRQ_TYPE_NONE
2. GPIO_ACTIVE_LOW  = 1 = IRQ_TYPE_EDGE_RISING

Correct the interrupt flags, assuming the author of the code wanted same
logical behavior behind the name "ACTIVE_xxx", this is:
  ACTIVE_LOW  => IRQ_TYPE_LEVEL_LOW
  ACTIVE_HIGH => IRQ_TYPE_LEVEL_HIGH

Fixes: a1a8b4594f ("NFC: pn544: i2c: Add DTS Documentation")
Fixes: 6be88670fc ("NFC: nxp-nci_i2c: Add I2C support to NXP NCI driver")
Fixes: e3b3292215 ("dt-bindings: can: tcan4x5x: Update binding to use interrupt property")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> # for tcan4x5x.txt
Link: https://lore.kernel.org/r/20201026153620.89268-1-krzk@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-16 09:50:54 +09:00
Krzysztof Kozlowski
3d54e9cf67 dt-bindings: sound: wm8994: Correct required supplies based on actual implementaion
[ Upstream commit 8c149b7d75 ]

The required supplies in bindings were actually not matching
implementation making the bindings incorrect and misleading.  The Linux
kernel driver requires all supplies to be present.  Also for wlf,wm8994
uses just DBVDD-supply instead of DBVDDn-supply (n: <1,3>).

Reported-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200501133534.6706-1-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-16 09:16:13 +09:00
Jitao Shi
3392a40510 dt-bindings: display: mediatek: control dpi pins mode to avoid leakage
[ Upstream commit b0ff9b5907 ]

Add property "pinctrl-names" to swap pin mode between gpio and dpi mode.
Set the dpi pins to gpio mode and output-low to avoid leakage current
when dpi disabled.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-15 17:33:29 +09:00
Madalin Bucur
396909ea4a dt-bindings: net: FMan erratum A050385
[ Upstream commit 26d5bb9e4c ]

FMAN DMA read or writes under heavy traffic load may cause FMAN
internal resource leak; thus stopping further packet processing.

The FMAN internal queue can overflow when FMAN splits single
read or write transactions into multiple smaller transactions
such that more than 17 AXI transactions are in flight from FMAN
to interconnect. When the FMAN internal queue overflows, it can
stall further packet processing. The issue can occur with any one
of the following three conditions:

  1. FMAN AXI transaction crosses 4K address boundary (Errata
     A010022)
  2. FMAN DMA address for an AXI transaction is not 16 byte
     aligned, i.e. the last 4 bits of an address are non-zero
  3. Scatter Gather (SG) frames have more than one SG buffer in
     the SG list and any one of the buffers, except the last
     buffer in the SG list has data size that is not a multiple
     of 16 bytes, i.e., other than 16, 32, 48, 64, etc.

With any one of the above three conditions present, there is
likelihood of stalled FMAN packet processing, especially under
stress with multiple ports injecting line-rate traffic.

To avoid situations that stall FMAN packet processing, all of the
above three conditions must be avoided; therefore, configure the
system with the following rules:

  1. Frame buffers must not span a 4KB address boundary, unless
     the frame start address is 256 byte aligned
  2. All FMAN DMA start addresses (for example, BMAN buffer
     address, FD[address] + FD[offset]) are 16B aligned
  3. SG table and buffer addresses are 16B aligned and the size
     of SG buffers are multiple of 16 bytes, except for the last
     SG buffer that can be of any size.

Additional workaround notes:
- Address alignment of 64 bytes is recommended for maximally
efficient system bus transactions (although 16 byte alignment is
sufficient to avoid the stall condition)
- To support frame sizes that are larger than 4K bytes, there are
two options:
  1. Large single buffer frames that span a 4KB page boundary can
     be converted into SG frames to avoid transaction splits at
     the 4KB boundary,
  2. Align the large single buffer to 256B address boundaries,
     ensure that the frame address plus offset is 256B aligned.
- If software generated SG frames have buffers that are unaligned
and with random non-multiple of 16 byte lengths, before
transmitting such frames via FMAN, frames will need to be copied
into a new single buffer or multiple buffer SG frame that is
compliant with the three rules listed above.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-15 17:11:35 +09:00
Baruch Siach
6f24d161e7 rtc: dt-binding: abx80x: fix resistance scale
[ Upstream commit 73852e5682 ]

The abracon,tc-resistor property value is in kOhm.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-15 16:09:21 +09:00
allen yan
0fa0c20532 arm64: dts: marvell: Fix A37xx UART0 register size
commit c737abc193 upstream.

Armada-37xx UART0 registers are 0x200 bytes wide. Right next to them are
the UART1 registers that should not be declared in this node.

Update the example in DT bindings document accordingly.

Signed-off-by: allen yan <yanwei@marvell.com>
Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-15 14:08:38 +09:00
Sean Nyekjaer
51301e3f50 dt-bindings: can: mcp251x: add mcp25625 support
[ Upstream commit 0df82dcd55 ]

Fully compatible with mcp2515, the mcp25625 have integrated transceiver.

This patch add the mcp25625 to the device tree bindings documentation.

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-15 13:58:00 +09:00
Adrian Bunk
f8ed3364de dt-bindings: eeprom: at24: add "atmel,24c2048" compatible string
commit 6c0c5dc33f upstream.

Add new compatible to the device tree bindings.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-15 11:33:28 +09:00
Nicolas Ferre
5bb6cdffdc ARM: dts: at91: add new compatibility string for macb on sama5d3
[ Upstream commit 321cc359d8 ]

We need this new compatibility string as we experienced different behavior
for this 10/100Mbits/s macb interface on this particular SoC.
Backward compatibility is preserved as we keep the alternative strings.

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-15 09:01:29 +09:00
Michal Vokáč
b858f586ae net: dsa: qca8k: Add QCA8334 binding documentation
commit 218bbea11a upstream.

Add support for the four-port variant of the Qualcomm QCA833x switch.

The CPU port default link settings can be reconfigured using
a fixed-link sub-node.

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-12 16:44:36 +09:00
Yixun Lan
7c2c71f77f dt-bindings: net: meson-dwmac: new compatible name for AXG SoC
[ Upstream commit 7e5d05e18b ]

We need to introduce a new compatible name for the Meson-AXG SoC
in order to support the RMII 100M ethernet PHY, since the PRG_ETH0
register of the dwmac glue layer is changed from previous old SoC.

Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-12 16:43:33 +09:00
Martin Blumenstingl
20fc4f5a4c dt-bindings: pinctrl: meson: add support for the Meson8m2 SoC
[ Upstream commit 03d9fbc397 ]

The Meson8m2 SoC is a variant of Meson8 with some updates from Meson8b
(such as the Gigabit capable DesignWare MAC).
It is mostly pin compatible with Meson8, only 10 (existing) CBUS pins
get an additional function (four of these are Ethernet RXD2, RXD3, TXD2
and TXD3 which are required when the board uses an RGMII PHY).
The AOBUS pins seem to be identical on Meson8 and Meson8m2.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-12 16:43:31 +09:00
Marcin Niestroj
9875ffd457 Input: goodix - support gt1151 touchpanel
Support was added based on Goodix GitHub repo [1]. There are two major
differences between gt1151 and currently supported devices (gt9x):
 * CONFIG_DATA register has 0x8050 address instead of 0x8047,
 * config data checksum has 16-bit width instead of 8-bit.

Also update goodix_i2c_test() function, so it reads ID register (which
has the same address for all devices) instead of CONFIG_DATA (because
its address is known only after reading ID of the device).

[1] https://github.com/goodix/gt1x_driver_generic

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Change-Id: I12f2f9e745c2f14ff45b3f967fbf91e629230989
2022-10-27 15:08:32 +09:00
zhiqiang liang
7b1af7284f power: add the power domain control API [1/1]
PD#SWPL-17563

Problem:
add power domain control API for TM2 and SM1

Solution:
add power domain control API for TM2 and SM1

Verify:
T962E2

Change-Id: I2587b2b554281ee7c81d77e8978a2640e5f73be5
Signed-off-by: zhiqiang liang <zhiqiang.liang@amlogic.com>
Signed-off-by: chunlong.cao <chunlong.cao@amlogic.com>
2020-12-17 17:23:20 +09:00
Luan Yuan
695cede0cc Amlogic: sync the code from mainline. [1/1]
PD#SWPL-17246

Problem:
sync the code from mainline.

Solution:
sync the code from mainline.

7c03859983c2 OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-12232) Risk:[] [1/1]
ba89a3d9c791 OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2019-8912) Risk:[] [1/1]
c434d0530610 Android Security Bulletin - November 2019-11 - Kernel components binder driver - CVE-2019-2214 [1/1]
ff8d9012fbd4 Android Security Bulletin - November 2019-11 - Kernel components ext4 filesystem - CVE-2019-11833 [1/1]
3c52e964495e cec: store msg after bootup from st [1/2]
94198a56ee10 lcd: support tcon vac and demura data [2/2]
1add1a008a03 vout: spi: porting lcd driver and SPI to Linux [1/1]
3e8d7b0e5f97 hdmirx: add hpd recovery logic when input clk is unstable [1/1]
f92e7ba21c62 ppmgr: Add 10bit, dolby and HDR video rotation. [1/1]
dab2cc37cd95 dvb: fix dmx2 interrupt bug [1/1]
9d31efae4a55 dv: add dv target output mode [1/1]
e86eb9d1b5c5 hdmirx: add rx phy tdr enable control [1/1]
8ea66f645bf6 dts: enable spi for gva [1/1]
baf6e74528ef drm: add drm support for tm2 [1/1]

Verify:
verify by newton

Change-Id: I9415060a4b39895b5d624117271a72fc6a1fd187
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
2020-02-04 13:48:58 +09:00
Kevin Kim
4863522d51 pwm: gpio: Add a generic gpio based PWM driver
From: Olliver Schinagl <oliver@schinagl.nl>

This patch adds a bit-banging gpio PWM driver. It makes use of hrtimers,
to allow nano-second resolution, though it obviously strongly depends on
the switching speed of the gpio pins, hrtimer and system load.

Each pwm node can have 1 or more "pwm-gpio" entries, which will be
treated as pwm's as part of a pwm chip.

Change-Id: Idd42bf6d79f8ce52275a15965b02af470f28da7c
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2020-01-07 10:59:23 +09:00
charles.park
25ec3b0803 ODROID-N2: ODROID 3.5" I2C Touch sx8650 Document added.
Change-Id: Ia83e31210e7c02437e4a3dc585cbfd8eadf9b464
2019-12-12 09:25:00 +09:00
Luan Yuan
07c2a0269f common: support tp CST226 for yeke [1/1]
PD#SWPL-8013

Problem:
support touchpanel CST226 for yeke.

Solution:
support touchpanel CST226 for yeke.

Verify:
verify by u202.

Change-Id: Id74df3e25761118db4c10706128df29eb6eb2894
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>

dts: add touch screen dts config for CST226 [1/1]

PD#SWPL-8013

Problem:
separate dts config from driver

Solution:
separate dts config from driver

Verify:
verify by u202

Change-Id: I4de45ec213b86d12cdd9296f80de62f4f2dc6713
Signed-off-by: GongWei Chen <gongwei.chen@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
2019-05-13 10:51:54 +08:00
Qianggui Song
18ab8fffb3 irqchip: sm1 support double-edge gpio irq trigger [1/1]
PD#SWPL-5395

Problem:
sm1 support double-edge trigger, current code do not support.

Solution:
add relatvie bitmask to support this function.

Verify:
ptm & sm1_skt

Change-Id: I48ebc9b38db868f946c49b6fd5f98d427b2669df
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
2019-04-03 15:28:26 +08:00
Shunzhou Jiang
7308fec275 clk: sm1: add clk driver [1/1]
PD#SWPL-5407

Problem:
sm1 not have clk driver

Solution:
add clk driver

Verify:
PxP

Change-Id: Id48257d88ef200fd4adb309bf2e4ada1be407753
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
2019-04-03 15:27:05 +08:00
Jianxiong Pan
716e51c127 dts: g12b: copy g12b dts [1/1]
PD#SWPL-5020

Problem:
copy g12b dts.

Solution:
copy.

Verify:
local.

Change-Id: Ibd6423bd0cc99e98bf1d6359068f9f0719ad177f
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>

Conflicts:
	arch/arm64/boot/dts/amlogic/g12b_a311x_w411_buildroot.dts
2019-03-13 20:22:25 +08:00
riqun.ou
588bc87d36 sound: add resample node for axg_s420_v03gva.dts [1/1]
PD#SWPL-365

Problem:
System can't use resample function on GVA project.

Solution:
Add resample node in axg_s420_v03gva.dts

Verify:
Passed on s420

Change-Id: Ie48c579e9e9f6e1d61147f5410c95e5bca55b0a7
Signed-off-by: riqun.ou <riqun.ou@amlogic.com>

audio: codecs: fix TL1 reference board volume too small [2/2]

PD#SWPL-2652

Problem:
    X301/T309 AMP volume configured to small

Solution:
    change the default external AMP codec mixer name to a match
    the ini parsing function in audio hal.
    TODO: need dynamically check the different codec mixer name
    in ini file.

Verify:
    verify by x301

Change-Id: Iba835d37ea02bec3095556d54fbf327bd6390904
Signed-off-by: Jian Xu <jian.xu@amlogic.com>

audio: codec: the DAC gain set of acodec not work [1/1]

PD#SWPL-3134

Problem:
the DAC gain set is not work

Solution:
update and aml_codec_tl1_acodec.c, change the method of
getting codec pointer from kcontrol pointer.

Verify:
verify by T962x2_X301 board

Change-Id: I02f02b73fab3b8391ef4866a71ffaf0d48bbbbbf
Signed-off-by: Shuyu Li <shuyu.li@amlogic.com>

audio: add tas5805 [1/1]

PD#SWPL-3081

Problem:
compatiable tas5805 module

Solution:
add tas5805 drivers

Verify:
T962X2

Change-Id: I3608e47fe768af0f924751a8bcc103389d0811de
Signed-off-by: Yonghao Jiao <yonghao.jiao@amlogic.com>

audio: auge: add HDMIRX SPDIF in support [1/2]

PD#SWPL-2956

Problem:
HDMI in DTS/Dolby input has noise when treated to LPCM

Solution:
By default,we are using PAO mode for HDMIRX,but we have not
enabled the PaPb search for 61937 raw data input, after add
that, we can detect the raw data, but it can not by clear when
switch from NONE-LPCM to NONE-LPCM, need add IRQ function to
clear that by sw.we enabled spdif in from HDMIRX, which is  the same
design as txl/txlx.we can get the Pc information now.
also we add a new interface to set spdif in source when hdmirx input.

Verify:
x301

Change-Id: I3c4e8b387308ef862a069c29d15b8b5a9e865564
Signed-off-by: Jian Xu <jian.xu@amlogic.com>

udio: auge: tl1 acodec mapping to data 1 [1/2]

PD#SWPL-3277

Problem:
tl1 internal codec volume can by adjusted

Solution:
configure the acodec data layout mapping
to a fixed volume

Verify:
x301

Change-Id: I14d3762b39a0a5291722ef5489026f10fc960120
Signed-off-by: Jian Xu <jian.xu@amlogic.com>

Conflicts:
	arch/arm/boot/dts/amlogic/tl1_t962x2_t309.dts

audio: Fix TDM not wokring on HDMI I2S in [1/1]

PD#SWPL-2887

Problem:
  When TDM is used for HDMI I2S in, the solt set is wrong.

Solution:
  Fix the lane max value from 3 to 4

Verify:
  A113

Change-Id: I33f5ca21bf1e2407d83fa5d0f22e21f7b1f5e749
Signed-off-by: yujie.wu <yujie.wu@amlogic.com>

audio: codec: fix to resume ad82584's volume after suspend [1/1]

PD#SWPL-3456

Problem:
1) After suspend, volume is not resume
2) ARC connected, still sound out from spk

Solution:
1) save channel volume when suspend, then resume the volume
2) add mute mixer control for ad82584

Verify:
x301

Change-Id: Ic6e7502e3f9689cc2d1053295f26aaf4d5be2603
Signed-off-by: Xing Wang <xing.wang@amlogic.com>

audio: auge: add vad driver [1/1]

PD#SWPL-2404

Problem:
VAD for wake up

Solution:
Add vad driver to fetch VAD buffer and ALSA buffer, in userspace, they
will be combined for wakeup engine

Verify:
x301

Change-Id: I3b4de5fdfe173ce18e58a187a3adeda601e226b3
Signed-off-by: Xing Wang <xing.wang@amlogic.com>

audio: fix pop snd after bootup [2/2]

PD#SWPL-3178

Problem:
output big pop noise after system boot up.

Solution:
Add zero and then unmute the stream.
NOTICE: user should unmute the AD82584F after boot.

Verify:
local verified.

Change-Id: I21555318f9347c5340a28f7e5cf0e3e2cde849a0
Signed-off-by: Shuai Li <shuai.li@amlogic.com>

audio: fix no audio after resume of ad82584f [1/1]

PD#SWPL-4090

Problem:
No audio after suspend and resume.
Suspend won't save the mute value,
and after resume, it could not be restored.

Solution:
Add a mute val to save when suspend,
and after resume, restore the mute value.

Verify:
Verified by QA.

Change-Id: Ie24bb11f5c565048391846a66b5d12bab1d55666
Signed-off-by: Shuai Li <shuai.li@amlogic.com>

audio: auge: fix sharebuffer channel map [1/1]

PD#SWPL-2645

Problem:
play ddp source, then play pcm source, no sound

Solution:
1. fix same source control and channel map issue
2. i2s 8ch, spdif 2ch, channels are not mapped, make spdif 8 channel mask
3. when same source used, keep mpll use same mpll

Verify:
x301

Change-Id: I2fe4bbcbcbfff0a1c1a6cebf61d1da5aba9b7a9d
Signed-off-by: Xing Wang <xing.wang@amlogic.com>

Conflicts:
	arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts
	arch/arm64/boot/dts/amlogic/tl1_t962x2_x301.dts

audio: add stream mute and continuous clk [1/1]

PD#SWPL-2952

Problem:
Pop noise could be heard
when switching between sources.

Solution:
1. Add stream digital mute functions.
2. continuous clock to eliminate
  the clk reset issue.

Verify:
Local verified.

Change-Id: I372f4c03aaf875d75aa903c9c2dfda00619af000
Signed-off-by: Shuai Li <shuai.li@amlogic.com>

dts: tl1: enable resample for tl1 [1/2]

PD#SWPL-3365

Problem:
not resample for audio in, so output in wrong sample rate

Solution:
1. enable resample in dts
2. fix to check whether resample is needed

Verify:
x301

Change-Id: I99238cc21a00ab53df6a1f8ab1703bc9ab48cbaa
Signed-off-by: Xing Wang <xing.wang@amlogic.com>

Conflicts:
	arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts
	arch/arm64/boot/dts/amlogic/tl1_t962x2_x301.dts
2019-01-22 22:22:35 +08:00
Xindong Xu
1b61147efa dts: dtsi: add dtsi for ab update [1/6]
PD#SWPL-1513

Problem:
ab update can not work on P

Solution:
add dtsi for ab update for P

Verify:
test pass in ampere

Change-Id: I6ff219170a16c0081fba7297110e8dfaadcff401
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
2018-11-20 00:35:43 -08:00
Jian Hu
450bf2094a clock-measure: tl1: add clock measurement support
PD#172587: clock-measure: tl1: add clock measurement support

Change-Id: I14ab8859b205154bb89139e215fef5898efac681
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-09-29 06:05:18 -07:00
Bo Yang
91b9f08333 watchdog: meson: add watchdog support for tl1
PD#172587: watchdog: meson: add watchdog support for tl1

TL1's watchdog is same with G12A.

Change-Id: Iaa8c502e6a8889a33ed2875e7a16cca07873738a
Signed-off-by: Bo Yang <bo.yang@amlogic.com>
2018-09-29 06:04:42 -07:00
Jian Hu
b8a2f778b1 clock: tl1: initial add tl1 clock driver
PD#172587: clock: tl1: initial add tl1 clock driver

Initial add tl1 clock driver refered to txlx clock driver.

Change-Id: I2f25c465ae7f3f4e65e842a9d0c35f0e0e75662f
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-09-29 06:03:18 -07:00
bichao.zheng
1920f10340 pwm: meson: add support for tl1
PD#172587: pwm: meson: add support for tl1

Add support for tl1.

Change-Id: I5db1be16765a8e2f2a07815e6d7d139eec4dcf16
Signed-off-by: bichao.zheng <bichao.zheng@amlogic.com>
2018-09-29 05:53:02 -07:00
Xingyu Chen
e5378c8b68 irqchip: meson: add gpio IRQ support for tl1
PD#172587: irqchip: add gpio IRQ support for tl1

Change-Id: I35480088e85c0bb26d04158ced42c3d85153f806
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2018-09-29 05:48:24 -07:00
Xingyu Chen
6da2e5835a pinctrl: meson: add pinctrl & gpio driver for tl1
PD#172587: pinctrl: add pinctrl & gpio driver for tl1

Change-Id: Ibd04477b8e6d586f4263cda9760b06c3e8e6ac72
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2018-09-29 05:47:45 -07:00
jinrong.liao
39035cef86 DTS: fix the dts configuration error of leds
PD#172284: this commit changes mainly for GVA

1) fix the dts configuration error of leds
2) enable "is31fl3236a" driver

Change-Id: Ic2135991b39dcca78b0b09158af0cf9b3f5fb87d
Signed-off-by: jinrong.liao <jinrong.liao@amlogic.com>
2018-08-30 20:26:28 -07:00
jinrong.liao
1d1b1ef084 input: add pca9557 keypad driver for new mic board D607
PD#172286: this commit changes mainly for GVA

1) keypad: add pca9557 keypad driver for new mic board D607.

Change-Id: I0d9ec9626362b3d87d6c55e5c967bfa4486b1472
Signed-off-by: jinrong.liao <jinrong.liao@amlogic.com>
2018-08-31 09:44:06 +08:00
jinrong.liao
a4625c4ac3 input: add touch sensor driver.
PD#172287: this commit changes mainly for GVA

1) add sensor cy8c4014 driver.

Change-Id: Ic1ed6cf2a42e2286e4860946d89091a3dd524ef8
Signed-off-by: jinrong.liao <jinrong.liao@amlogic.com>
2018-08-30 20:40:01 +08:00
Victor Wan
cc7b1eac54 Merge branch 'android-4.9' into amlogic-4.9-dev
Signed-off-by: Victor Wan <victor.wan@amlogic.com>

 Conflicts:
	drivers/md/dm-bufio.c
	drivers/media/dvb-core/dvb_frontend.c
	drivers/usb/dwc3/core.c
	drivers/usb/gadget/function/f_fs.c
2018-08-07 14:43:24 +08:00
Yi Zeng
8e6dad10fb mtd: spifc: add spifc support for txl
PD#171041: mtd: spifc: add spifc support for txl

Change-Id: I487161c6e85e3b232ed0c3891784b5a37f6d878c
Signed-off-by: Yi Zeng <yi.zeng@amlogic.com>
2018-08-06 22:47:48 -07:00
Renjun Xu
305e6776cd audio: fix adc3101 8ch PCM format support
PD#171085: fix adc3101 8ch PCM format support

For S400 & S420 board, please modify dts to enable adc3101 8ch PCM
please read following file:
Documentation/devicetree/bindings/amlogic/axg-adc3010-pcm.txt

Change-Id: I945441f80d269b167148ccf3d6c33093a20a4f2f
Signed-off-by: Renjun Xu <renjun.xu@amlogic.com>
2018-08-03 04:20:53 -07:00
Xindong Xu
e37c6e9891 arm64: dts: add atom & Beast project [1/1]
PD#170502: add atom & Beast project

Change-Id: I50da79dbb660372528c5abcdf5da4bb13773bf6c
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
2018-08-02 01:55:32 -07:00
Sunny Luo
09f3fbb011 dts: spicc: change txl dts to use upstream driver
PD#164751: dts: spicc: change txl dts to use upstream driver

Change-Id: Ibf51059122d31316bb644d6431466e36afe44cb6
Signed-off-by: Sunny Luo <sunny.luo@amlogic.com>
2018-07-23 01:51:15 -07:00
Jian Hu
091a289acc reboot: meson: standardize the compatible property
PD#168480: reboot: meson: standardize the compatible property

Use 'amlogic,reboot' instead of 'aml,reboot'.
'aml,reboot' will be removed later.

Change-Id: I7d16795c98aa293fe204121ccd7da41c7d078f77
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
Signed-off-by: Bo Yang <bo.yang@amlogic.com>
2018-07-18 02:50:23 -07:00
Bo Yang
c6f2253cee watchdog: meson: add watchdog support for txl
PD#168480: add watchdog support for txl

Change-Id: I53ac23d1fedec155871ecec3229dedeb13ca7076
Signed-off-by: Bo Yang <bo.yang@amlogic.com>
2018-07-18 02:49:35 -07:00
Xingyu Chen
b02a434b18 iio: adc: meson: add sar adc support for txl
PD#168480: iio: adc: meson: add sar adc support for txl

Change-Id: I9febffdb4fef582f5a91138491ae87d11ca240ee
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
Signed-off-by: Bo Yang <bo.yang@amlogic.com>
2018-07-18 02:47:36 -07:00
Xingyu Chen
1d4900ea6c irqchip: meson: add gpio IRQ support for txl
PD#168480: irqchip: meson: add gpio IRQ support for txl

Change-Id: I03b32a3ffe4a7e9b63631ac5e593bcbf346b8765
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
Signed-off-by: Bo Yang <bo.yang@amlogic.com>
2018-07-18 02:44:54 -07:00
Jian Hu
d049ab634b i2c: meson: add support for txl
PD#168480: i2c: meson: add support for txl

Change-Id: I0c4fe9d2e6caec0cfa812af28476774db69a4e89
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
Signed-off-by: Bo Yang <bo.yang@amlogic.com>
2018-07-18 02:44:34 -07:00
Xingyu Chen
821c9713cb pinctrl: txl: add pinctrl & gpio support for txl
PD#168480: pinctrl: txl: add pinctrl & gpio support for txl

Change-Id: I2496cdebfc283e90825f5dd7d20b0e16f57158d2
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
Signed-off-by: Bo Yang <bo.yang@amlogic.com>
2018-07-18 02:43:51 -07:00
Jian Hu
a53f89545d clk: txl: initial add clock driver
PD#168480: clk: txl: initial add clock driver

remove CLK_SET_RATE_PARENT flag for spicc.
If add CLK_SET_RATE_PARENT, it will change clk81 rate when set
spicc clock rate.

Change-Id: I80fec2c6d10611994ff40b06307e39b51ddb5a1a
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
Signed-off-by: Bo Yang <bo.yang@amlogic.com>
2018-07-18 02:32:38 -07:00
Sunny Luo
34616dd660 spicc: add dma and enhance features of axg/txhd/g12a/g12b.
PD#164751: spicc: add dma and enhance features of axg/txhd/g12a/g12b.

1. fix TESTREG bits defination error;
2. fix cs-gpio error in slave setup;
3. reset fifo to avoid successive fifo error before tansfer;
4. add enhance feature of cs-preload delay control;
5. add auto io delay control;
6. add enhance feature of tt/ti delay control;
7. fix clk error which occurred certainly when sencond spicc added;
8. surpport both auto core clk and  fixed core clk rate setting:
   set dts "fixed_core_rate = <200000000(example)>" to use fixed
   core rate. otherwise, to use auto core clk.
9. support loop-back mode;
10. support DMA transfer;
11. must delete 1000M from parent clk.
12. It will be wrong when enhance divider=2. we have to add a flag
   CLK_DIVIDER_PROHIBIT_ZERO to shield against it.

Change-Id: I820a52e6d31d3fe2e3615a0f4c5a07c17d11914d
Signed-off-by: Sunny Luo <sunny.luo@amlogic.com>
2018-07-12 23:40:37 -07:00
pengcheng chen
fce54c8573 osd_drm: osd drm for g12b bring up
PD#165090: osd drm for g12b bring up

Change-Id: Id69a152b22ba3e408d20fa494b9475c9ad3797de
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
2018-06-29 00:06:09 -07:00
bichao.zheng
9bca4ec549 pwm: pwm driver compatible with g12b
PD#165090: pwm: pwm driver compatible with g12b

pwm driver compatible with g12b,enable pwm controller pwm_AO_cd
pwm_ab pwm_ef for dvfs and wifi.

Change-Id: If65c4b5239ee0a4f4409aa85d9481645b44521e9
Signed-off-by: bichao.zheng <bichao.zheng@amlogic.com>
2018-06-28 23:53:46 -07:00
Jian Hu
5cdd52e2f0 i2c: add support for g12b
PD#165090: i2c: add support for g12b

Change-Id: I2240e361dff3e3d56898ffb4f43c1ad4cadd3912
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-06-28 23:48:50 -07:00