Re: [PATCH 2/3] thermal: mediatek: Add LVTS drivers for SoC theraml zones

2020-12-06 Thread Hsin-Yi Wang
> > Add a LVTS (Low voltage thermal sensor) driver to report junction > temperatures in Mediatek SoC and register the maximum temperature > of sensors and each sensor as a thermal zone. > > Signed-off-by: Yu-Chia Chang > Signed-off-by: Michael Kao > --- > drivers/thermal/mediatek/Kconfig

[PATCH] drm/mediatek: mtk_dpi: Create connector for bridges

2020-12-03 Thread Hsin-Yi Wang
ast bridge in the chain creating the connector and handling all connector operations internally. Signed-off-by: Hsin-Yi Wang --- drivers/gpu/drm/mediatek/mtk_dpi.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/dr

Re: [v5 2/3] arm64: dts: mt8183: Configure CPU cooling

2020-11-24 Thread Hsin-Yi Wang
On Tue, Oct 13, 2020 at 6:24 PM Michael Kao wrote: > > From: Matthias Kaehlcke > > Add two passive trip points at 68°C and 80°C for the CPU temperature. > > Signed-off-by: Matthias Kaehlcke > Signed-off-by: Michael Kao Tested-by: Hsin-Yi Wang > --- > arch/arm

Re: [v5 1/3] arm64: dts: mt8183: add thermal zone node

2020-11-24 Thread Hsin-Yi Wang
On Tue, Oct 13, 2020 at 6:24 PM Michael Kao wrote: > > From: "Michael.Kao" > > Add thermal zone node to Mediatek MT8183 dts file. > > Evaluate the thermal zone every 500ms while not cooling > and every 100ms when passive cooling is performed. > > Signed-off-by: Matthias Kaehlcke >

[PATCH] arm64: dts: mt8183: Add pwm and backlight node

2020-11-23 Thread Hsin-Yi Wang
Add pwm to mt8183 and backlight to mt8183-kukui. Signed-off-by: Hsin-Yi Wang --- .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 28 +++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 10 +++ 2 files changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek

[PATCH v2 2/2] drm/bridge: anx7625: disable regulators when power off

2020-11-22 Thread Hsin-Yi Wang
When suspending the driver, anx7625_power_standby() will be called to turn off reset-gpios and enable-gpios. However, power supplies are not disabled. To save power, the driver can get the power supply regulators and turn off them in anx7625_power_standby(). Signed-off-by: Hsin-Yi Wang

[PATCH v2 1/2] dt-bindings: drm/bridge: anx7625: Add power supplies

2020-11-22 Thread Hsin-Yi Wang
anx7625 requires 3 power supply regulators. Signed-off-by: Hsin-Yi Wang --- Change: v2: remove maxItems for supplies --- .../bindings/display/bridge/analogix,anx7625.yaml | 15 +++ 1 file changed, 15 insertions(+) diff --git a/Documentation/devicetree/bindings/display/bridge

Re: [RESEND v7, PATCH 4/7] mtk-mmsys: add mt8183 mmsys support

2020-11-16 Thread Hsin-Yi Wang
On Sat, Aug 8, 2020 at 2:53 AM Yongqiang Niu wrote: > > add mt8183 mmsys support > > Signed-off-by: Yongqiang Niu > --- > drivers/soc/mediatek/mmsys/Makefile | 1 + > drivers/soc/mediatek/mmsys/mt8183-mmsys.c | 154 > ++ > drivers/soc/mediatek/mtk-mmsys.c

[PATCH 1/2] dt-bindings: drm/bridge: anx7625: Add power supplies

2020-11-12 Thread Hsin-Yi Wang
anx7625 requires 3 power supply regulators. Signed-off-by: Hsin-Yi Wang --- .../display/bridge/analogix,anx7625.yaml | 18 ++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml b/Documentation/devicetree

[PATCH 2/2] drm/bridge: anx7625: disable regulators when power off

2020-11-12 Thread Hsin-Yi Wang
When suspending the driver, anx7625_power_standby() will be called to turn off reset-gpios and enable-gpios. However, power supplies are not disabled. To save power, the driver can get the power supply regulators and turn off them in anx7625_power_standby(). Signed-off-by: Hsin-Yi Wang

Re: [PATCH 11/12] soc: mediatek: pm-domains: Add support for mt8183

2020-09-25 Thread Hsin-Yi Wang
On Wed, Sep 16, 2020 at 8:19 PM Matthias Brugger wrote: > > > > On 16/09/2020 11:46, Matthias Brugger wrote: > > > > > > On 10/09/2020 19:28, Enric Balletbo i Serra wrote: > >> From: Matthias Brugger > >> > >> Add the needed board data to support mt8183 SoC. > >> > >> Signed-off-by: Matthias

Re: [PATCH] arm64: dts: mt8173: elm: Fix nor_flash node property

2020-09-15 Thread Hsin-Yi Wang
On Fri, Jul 31, 2020 at 7:21 PM Enric Balletbo i Serra wrote: > > Hi Hsin-Yi, > > Thank you for your patch. > > On 27/7/20 9:41, Hsin-Yi Wang wrote: > > bus-width and non-removable is not used by the driver. > > max-frequency should be spi-max-frequency for flash nod

[PATCH v2 1/2] tty: serial: print earlycon info after match->setup

2020-09-14 Thread Hsin-Yi Wang
8250 devices may modify iotype in their own earlycon setup. For example: 8250_mtk and 8250_uniphier force iotype to be MMIO32. Print earlycon info after match->setup to reflect actual earlycon info. Signed-off-by: Hsin-Yi Wang --- Change: v1->v2: rename function --- drivers/tty/

[PATCH v2 2/2] tty: serial: 8250_mtk: set regshift for mmio32

2020-09-14 Thread Hsin-Yi Wang
To use mmio32, we also need to set regshift. Signed-off-by: Hsin-Yi Wang --- Change: v1->v2: none --- drivers/tty/serial/8250/8250_mtk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index 7b0dec14c8

Re: [PATCH 1/2] tty: serial: print earlycon info after match->setup

2020-09-14 Thread Hsin-Yi Wang
On Tue, Sep 15, 2020 at 12:06 AM Andy Shevchenko wrote: > > On Fri, Sep 11, 2020 at 05:39:26PM +0800, Hsin-Yi Wang wrote: > > 8250 devices may modify iotype in their own earlycon setup. For example: > > 8250_mtk and 8250_uniphier force iotype to be MMIO32. Print earlycon in

Re: [PATCH v2 1/2] arm64: dts: mt8173: Set uart to mmio32 iotype

2020-09-11 Thread Hsin-Yi Wang
On Thu, Sep 10, 2020 at 9:40 PM Hsin-Yi Wang wrote: > > On Thu, Sep 10, 2020 at 6:25 PM Matthias Brugger > wrote: > > > > Hi, > > > > On 10/09/2020 10:43, Hsin-Yi Wang wrote: > > > Set uart iotype to mmio32 to make earlycon work with stdout-pat

[PATCH 1/2] tty: serial: print earlycon info after match->setup

2020-09-11 Thread Hsin-Yi Wang
8250 devices may modify iotype in their own earlycon setup. For example: 8250_mtk and 8250_uniphier force iotype to be MMIO32. Print earlycon info after match->setup to reflect actual earlycon info. Signed-off-by: Hsin-Yi Wang --- drivers/tty/serial/earlycon.c | 9 - 1 file changed

[PATCH 2/2] tty: serial: 8250_mtk: set regshift for mmio32

2020-09-11 Thread Hsin-Yi Wang
To use mmio32, we also need to set regshift. Signed-off-by: Hsin-Yi Wang --- drivers/tty/serial/8250/8250_mtk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index 7b0dec14c8b80..41f4120abdf29 100644 --- a/drivers

Re: [PATCH v2 1/2] arm64: dts: mt8173: Set uart to mmio32 iotype

2020-09-10 Thread Hsin-Yi Wang
On Thu, Sep 10, 2020 at 6:25 PM Matthias Brugger wrote: > > Hi, > > On 10/09/2020 10:43, Hsin-Yi Wang wrote: > > Set uart iotype to mmio32 to make earlycon work with stdout-path. > > > > Signed-off-by: Hsin-Yi Wang > > --- > > arch/arm64/boot/dts/medi

Re: [PATCH 1/2] arm64: dts: mt8173: elm: Set uart0 to mmio32 iotype

2020-09-10 Thread Hsin-Yi Wang
On Thu, Sep 10, 2020 at 4:16 PM Enric Balletbo i Serra wrote: > > Hi Hsin-Yi, > > On 10/9/20 9:57, Hsin-Yi Wang wrote: > > On Thu, Sep 10, 2020 at 3:20 PM Enric Balletbo i Serra > > wrote: > >> > >> Hi Hsin-Yi, > >> > >> On 10/9/2

[PATCH v2 2/2] arm64: dts: mt8183: Set uart to mmio32 iotype

2020-09-10 Thread Hsin-Yi Wang
Set uart iotype to mmio32 to make earlycon work with stdout-path. Signed-off-by: Hsin-Yi Wang --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index

[PATCH v2 1/2] arm64: dts: mt8173: Set uart to mmio32 iotype

2020-09-10 Thread Hsin-Yi Wang
Set uart iotype to mmio32 to make earlycon work with stdout-path. Signed-off-by: Hsin-Yi Wang --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi index

Re: [PATCH 1/2] arm64: dts: mt8173: elm: Set uart0 to mmio32 iotype

2020-09-10 Thread Hsin-Yi Wang
On Thu, Sep 10, 2020 at 3:20 PM Enric Balletbo i Serra wrote: > > Hi Hsin-Yi, > > On 10/9/20 7:46, Hsin-Yi Wang wrote: > > Set uart0 iotype to mmio32 to make earlycon work with stdout-path. > > > > Signed-off-by: Hsin-Yi Wang > > --- > > arch/a

[PATCH 2/2] arm64: dts: mt8183: kukui: Set uart0 to mmio32 iotype

2020-09-09 Thread Hsin-Yi Wang
Set uart0 iotype to mmio32 to make earlycon work with stdout-path. Signed-off-by: Hsin-Yi Wang --- arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183

[PATCH 1/2] arm64: dts: mt8173: elm: Set uart0 to mmio32 iotype

2020-09-09 Thread Hsin-Yi Wang
Set uart0 iotype to mmio32 to make earlycon work with stdout-path. Signed-off-by: Hsin-Yi Wang --- arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi

[PATCH] media: mtk-vcodec: remove allocated dma_parms

2020-09-02 Thread Hsin-Yi Wang
n Murphy Signed-off-by: Hsin-Yi Wang --- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c | 9 + drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 9 + 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_dr

Re: [PATCH] media: mtk-vcodec: set dma max segment size

2020-09-02 Thread Hsin-Yi Wang
On Wed, Sep 2, 2020 at 10:25 PM Robin Murphy wrote: > > On 2020-08-21 05:14, Hsin-Yi Wang wrote: > > Set dma max segment size for encoder and decoder driver. > > > > Fix following warning with CONFIG_DMA_API_DEBUG_SG=y > > > > [ 75.147825] [ cut

[PATCH] media: mtk-vcodec: set dma max segment size

2020-08-20 Thread Hsin-Yi Wang
+0x380/0x115c [ 75.148356] softirqs last enabled at (0): [] copy_process+0x398/0x115c [ 75.148364] softirqs last disabled at (0): [<>] (null) [ 75.148372] ---[ end trace 588bf529451e3531 ]--- Reported-by: Anand K Mistry Signed-off-by: Hsin-Yi Wang --- d

[PATCH] regulator: da9211: add cache_type

2020-08-12 Thread Hsin-Yi Wang
Add regmap_cache to reduce wakeups events of interrupt if regulator is accessed frequently. This results in saving more power. Suggested-by: Daniel Kurtz Signed-off-by: Hsin-Yi Wang --- drivers/regulator/da9211-regulator.c | 14 ++ 1 file changed, 14 insertions(+) diff --git

[PATCH] arm64: dts: mt8173: elm: Fix nor_flash node property

2020-07-27 Thread Hsin-Yi Wang
bus-width and non-removable is not used by the driver. max-frequency should be spi-max-frequency for flash node. Fixes: 689b937bedde ("arm64: dts: mediatek: add mt8173 elm and hana board") Reported-by: Nicolas Boichat Signed-off-by: Hsin-Yi Wang --- arch/arm64/boot/dts/mediatek/mt817

Re: [PATCH] arm64: dts: mt8173: Re-measure capacity-dmips-mhz

2020-07-08 Thread Hsin-Yi Wang
On Thu, Jul 9, 2020 at 1:01 AM Matthias Brugger wrote: > > > > On 06/07/2020 10:37, Hsin-Yi Wang wrote: > > Re measure capacity-dmips-mhz on elm and hana: > > > > cpu 1: 9502 DMIPS @ 1703 Mhz > > cpu 3: 16250 DMIPS @ 2106 Mhz > > > > ==> 740

[PATCH] arm64: dts: mt8173: Re-measure capacity-dmips-mhz

2020-07-06 Thread Hsin-Yi Wang
Re measure capacity-dmips-mhz on elm and hana: cpu 1: 9502 DMIPS @ 1703 Mhz cpu 3: 16250 DMIPS @ 2106 Mhz ==> 740 : 1024 Signed-off-by: Hsin-Yi Wang --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/

Re: [PATCH v2 7/7] arm64: dts: mt8183: Add krane-sku176 board

2020-07-01 Thread Hsin-Yi Wang
. The same happens with the baseboard codenamed kukui where > different variants, apart from kukui variant can take advantage of the > shared resources. > > Signed-off-by: Ben Ho > [originally created by Ben Ho but adapted and ported to mainline] > Signed-off-by: Enric Balletbo i Serra Tested

Re: [PATCH v2 6/7] arm64: dts: mt8183: Add USB3.0 support

2020-07-01 Thread Hsin-Yi Wang
On Thu, Jun 25, 2020 at 6:18 PM Enric Balletbo i Serra wrote: > > Add the USB3.0 phyter and controller for the MediaTek's MT8183 SoC. > > Signed-off-by: Enric Balletbo i Serra Tested-by: Hsin-Yi Wang > --- > > Changes in v2: > - Move adding #phy-cells to this patch. (Mat

Re: [PATCH v2 3/7] arm64: dts: mt8183: Add MediaTek's peripheral configuration controller

2020-07-01 Thread Hsin-Yi Wang
On Thu, Jun 25, 2020 at 6:18 PM Enric Balletbo i Serra wrote: > > The MediaTek's peripheral configuration controller is present on the > MT8183 SoC. Add the node for that controller. > > Signed-off-by: Enric Balletbo i Serra Tested-by: Hsin-Yi Wang > --- > > Changes in

Re: [PATCH v2 5/7] arm64: dts: mt8183-evb: Fix unit name warnings

2020-07-01 Thread Hsin-Yi Wang
t name, but no reg or ranges property > Warning (unit_address_vs_reg): /soc/pinctrl@10005000/mmc1@0: node has a > unit name, but no reg or ranges property > > Signed-off-by: Enric Balletbo i Serra Tested-by: Hsin-Yi Wang > --- > > Changes in v2: None > > arch/arm64/b

Re: [PATCH v2 4/7] arm64: dts: mt8183: Fix unit name warnings

2020-07-01 Thread Hsin-Yi Wang
t name, but no reg or ranges property > Warning (unit_address_vs_reg): /cpus/idle-states/cluster-sleep@1: node has > a unit name, but no reg or ranges property > > Signed-off-by: Enric Balletbo i Serra Tested-by: Hsin-Yi Wang > --- > > Changes in v2: > - Replace cl

Re: [PATCH v2 2/7] arm64: dts: mt6358: Add the compatible for the regulators

2020-07-01 Thread Hsin-Yi Wang
On Thu, Jun 25, 2020 at 6:18 PM Enric Balletbo i Serra wrote: > > The regulators are expected to be instantiated with matching the > device-tree compatible, so add the proper compatible name under the > regulators node. > > Signed-off-by: Enric Balletbo i Serra Teste

[PATCH v4] drm/mediatek: check plane visibility in atomic_update

2020-06-22 Thread Hsin-Yi Wang
Disable the plane if it's not visible. Otherwise mtk_ovl_layer_config() would proceed with invalid plane and we may see vblank timeout. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsin-Yi Wang Reviewed-by: Chun-Kuang Hu Reviewed-by: T

Re: [PATCH v2] drm/mediatek: check plane visibility in atomic_update

2020-06-22 Thread Hsin-Yi Wang
On Mon, Jun 22, 2020 at 11:20 PM Tomasz Figa wrote: > > Hi Hsin-Yi, > > On Mon, Jun 22, 2020 at 11:01:09PM +0800, Hsin-Yi Wang wrote: > > Disable the plane if it's not visible. Otherwise mtk_ovl_layer_config() > > would proceed with invalid plane and we may see vblan

[PATCH v3] drm/mediatek: check plane visibility in atomic_update

2020-06-22 Thread Hsin-Yi Wang
Disable the plane if it's not visible. Otherwise mtk_ovl_layer_config() would proceed with invalid plane and we may see vblank timeout. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsin-Yi Wang Reviewed-by: Chun-Kuang Hu

[PATCH v2] drm/mediatek: check plane visibility in atomic_update

2020-06-22 Thread Hsin-Yi Wang
Disable the plane if it's not visible. Otherwise mtk_ovl_layer_config() would proceed with invalid plane and we may see vblank timeout. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsin-Yi Wang Reviewed-by: Chun-Kuang Hu --- v2: Add

[PATCH] drm/mediatek: check plane visibility in atomic_update

2020-06-21 Thread Hsin-Yi Wang
Disable the plane if it's not visible. Otherwise mtk_ovl_layer_config() would proceed with invalid plane and we may see vblank timeout. Signed-off-by: Hsin-Yi Wang --- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff

Re: [PATCH v11 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver

2020-05-31 Thread Hsin-Yi Wang
On Fri, May 15, 2020 at 2:53 PM Xin Ji wrote: > + > +static int anx7625_bridge_attach(struct drm_bridge *bridge) Latest drm_bridge api: int (*attach)(struct drm_bridge *bridge, enum drm_bridge_attach_flags flags);

Re: [PATCH v2 1/4] soc: mediatek: Enable mmsys driver by default if Mediatek arch is selected

2020-05-12 Thread Hsin-Yi Wang
s > not real as it can build without the clock driver. Instead of depends on > a specific model, make the driver depends on the generic ARCH_MEDIATEK and > enable by default so other Mediatek devices can start using it without > flood the Kconfig. > > Signed-off-by: Enric Ballet

[PATCH] arm64: dts: mt8173: fix vcodec-enc clock

2020-05-04 Thread Hsin-Yi Wang
venc_sel 49400 ... vcodecpll_370p5 37050 venclt_sel 37050 Fixes: fbbad0287cec ("arm64: dts: Using standard CCF interface to set vcodec clk") Signed-off-by: Hsin-Yi Wang --- arch/arm64/boot/dt

Re: [PATCH] random: inform about bootloader-provided randomness

2019-10-15 Thread Hsin-Yi Wang
dowski > > Cc: Ard Biesheuvel > > Cc: Hsin-Yi Wang > > Cc: Stephen Boyd > > Cc: Rob Herring > > Cc: Theodore Ts'o > > Cc: Will Deacon > > > > diff --git a/drivers/char/random.c b/drivers/char/random.c > > index de434feb873a..673375e05c0d 1

[PATCH RFC v2] reboot: hotplug cpus in migrate_to_reboot_cpu()

2019-10-09 Thread Hsin-Yi Wang
can do cpu hotplug in migrate_to_reboot_cpu() to avoid this issue. Signed-off-by: Hsin-Yi Wang --- change log: v1 --> v2: Call hotplug function in #ifdef CONFIG instead of IS_ENABLED. (Reported-by: kbuild test robot ) kernel warnings at reboot: [1] https://lore.kernel.org/lkml/20190820100843.3

Re: [PATCH] thermal-generic-adc: Silent error message for EPROBE_DEFER

2019-10-07 Thread Hsin-Yi Wang
On Tue, Sep 10, 2019 at 12:59 AM Hsin-Yi Wang wrote: > > If devm_iio_channel_get() or devm_thermal_zone_of_sensor_register() > fail with EPROBE_DEFER, we shouldn't print an error message, as the > device will be probed again later. > > Signed-off-by: Hsin-Yi Wang > --- Pi

Re: [PATCH RFC] reboot: hotplug cpus in migrate_to_reboot_cpu()

2019-10-02 Thread Hsin-Yi Wang
On Wed, Oct 2, 2019 at 7:41 PM Hsin-Yi Wang wrote: > > Currently system reboots use arch specific codes (eg. smp_send_stop) to > offline non reboot cpus. Some arch like arm64, arm, and x86... set offline > masks to cpu without really offlining them. Thus it causes some race > condi

[PATCH RFC] reboot: hotplug cpus in migrate_to_reboot_cpu()

2019-10-02 Thread Hsin-Yi Wang
cpu hotplug in migrate_to_reboot_cpu() to avoid this issue. Signed-off-by: Hsin-Yi Wang --- kernel warnings at reboot: [1] https://lore.kernel.org/lkml/20190820100843.3028-1-hsi...@chromium.org/ [2] https://lore.kernel.org/lkml/20190727164450.ga11...@roeck-us.net/ --- kernel/cpu.c| 35

Re: [PATCH v2] i2c: i2c-mt65xx: fix NULL ptr dereference

2019-09-30 Thread Hsin-Yi Wang
On Mon, Sep 30, 2019 at 2:20 PM Cengiz Can wrote: > > On 2019-09-30 18:28, Fabien Parent wrote: > > Fixes: abf4923e97c3 ("i2c: mediatek: disable zero-length transfers for > > mt8183") > > Signed-off-by: Fabien Parent > > Reviewed-by: Cengiz Can Reviewed-by: Hsin-Yi Wang Thanks!

[PATCH] thermal-generic-adc: Silent error message for EPROBE_DEFER

2019-09-10 Thread Hsin-Yi Wang
If devm_iio_channel_get() or devm_thermal_zone_of_sensor_register() fail with EPROBE_DEFER, we shouldn't print an error message, as the device will be probed again later. Signed-off-by: Hsin-Yi Wang --- drivers/thermal/thermal-generic-adc.c | 9 ++--- 1 file changed, 6 insertions(+), 3

Re: [PATCH v2 7/8] thermal: mediatek: add another get_temp ops for thermal sensors

2019-09-09 Thread Hsin-Yi Wang
On Fri, May 10, 2019 at 9:27 PM michael.kao wrote: > > From: Michael Kao > > Provide thermal zone to read thermal sensor > in the SoC. We can read all the thermal sensors > value in the SoC by the node /sys/class/thermal/ > > Signed-off-by: Michael Kao > --- > drivers/thermal/mtk_thermal.c |

Re: [PATCH v9 2/3] fdt: add support for rng-seed

2019-08-29 Thread Hsin-Yi Wang
On Thu, Aug 29, 2019 at 1:36 AM Kees Cook wrote: > > Can this please be a boot param (with the default controlled by the > CONFIG)? See how CONFIG_RANDOM_TRUST_CPU is wired up... > > -Kees > Currently rng-seed read and added in setup_arch() --> setup_machine_fdt().. ->

Re: [PATCH v2] i2c: mediatek: disable zero-length transfers for mt8183

2019-08-23 Thread Hsin-Yi Wang
On Fri, Aug 23, 2019 at 4:09 PM Qii Wang wrote: > > > > static u32 mtk_i2c_functionality(struct i2c_adapter *adap) > > { > > - return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; > > + if (adap->quirks->flags & I2C_AQ_NO_ZERO_LEN) > > + return I2C_FUNC_I2C | > > +

[PATCH v10 3/3] arm64: kexec_file: add rng-seed support

2019-08-23 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be wiped after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd --- No change since v7 --- arch/ar

[PATCH v10 2/3] fdt: add support for rng-seed

2019-08-23 Thread Hsin-Yi Wang
to add_device_randomness(). Decision is controlled by kernel config RANDOM_TRUST_BOOTLOADER. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring --- Change from v9: * reword kconfig * use IS_ENABLED for config --- drivers/char/Kconfig | 9 + drivers/char/random.c | 14

[PATCH v10 1/3] arm64: map FDT as RW for early_init_dt_scan()

2019-08-23 Thread Hsin-Yi Wang
Currently in arm64, FDT is mapped to RO before it's passed to early_init_dt_scan(). However, there might be some codes (eg. commit "fdt: add support for rng-seed") that need to modify FDT during init. Map FDT to RO after early fixups are done. Signed-off-by: Hsin-Yi Wang Reviewed-b

[PATCH v10 0/3] add support for rng-seed

2019-08-23 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. This can be used for adding sufficient initial entropy for stack canary. Especially architectures that lack per-stack canary. Hsin-Yi Wang (3): arm64

[PATCH v2] i2c: mediatek: disable zero-length transfers for mt8183

2019-08-22 Thread Hsin-Yi Wang
-by: Alexandru M Stan Signed-off-by: Hsin-Yi Wang --- Change from v1: * restore the order of algo and quirks --- drivers/i2c/busses/i2c-mt65xx.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c index

Re: [PATCH RESEND] i2c: mediatek: disable zero-length transfers for mt8183

2019-08-22 Thread Hsin-Yi Wang
On Thu, Aug 22, 2019 at 5:24 PM Yingjoe Chen wrote: > > Why do you need to change this part? > > Joe.C > You're right. We don't need to change this. I'll revert this back.

[PATCH v9 3/3] arm64: kexec_file: add rng-seed support

2019-08-22 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be wiped after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd --- No change since v7. --- arch/ar

[PATCH v9 2/3] fdt: add support for rng-seed

2019-08-22 Thread Hsin-Yi Wang
to add_device_randomness(). Decision is controlled by kernel config RANDOM_TRUST_BOOTLOADER. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring --- Change from v8: * Add a new interface add_bootloader_randomness * Add a new kernel config --- drivers/char/Kconfig | 10 ++ drivers

[PATCH v9 1/3] arm64: map FDT as RW for early_init_dt_scan()

2019-08-22 Thread Hsin-Yi Wang
Currently in arm64, FDT is mapped to RO before it's passed to early_init_dt_scan(). However, there might be some codes (eg. commit "fdt: add support for rng-seed") that need to modify FDT during init. Map FDT to RO after early fixups are done. Signed-off-by: Hsin-Yi Wang Reviewed-b

[PATCH v9 0/3] add support for rng-seed

2019-08-22 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. This can be used for adding sufficient initial entropy for stack canary. Especially architectures that lack per-stack canary. Hsin-Yi Wang (3): arm64

[PATCH RESEND] i2c: mediatek: disable zero-length transfers for mt8183

2019-08-21 Thread Hsin-Yi Wang
-by: Alexandru M Stan Signed-off-by: Hsin-Yi Wang --- Previous patch and discussion: http://patchwork.ozlabs.org/patch/1042684/ --- drivers/i2c/busses/i2c-mt65xx.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c

Re: [PATCH v8 2/3] fdt: add support for rng-seed

2019-08-20 Thread Hsin-Yi Wang
Then we'd still use add_device_randomness() in case that bootloader provides weak entropy. On Tue, Aug 20, 2019 at 7:14 PM Ard Biesheuvel wrote: > > On Tue, 20 Aug 2019 at 10:43, Hsin-Yi Wang wrote: > > > > Hi Ted, > > > > Thanks for raising this question.

[PATCH RFC] smp: Add cpu unstopped mask for smp_send_stop/stop_other_cpus

2019-08-20 Thread Hsin-Yi Wang
eck. Catch the case where we try to broadcast to * offline cpus. */ if (WARN_ON_ONCE(!cpumask_subset(tmpmask, cpu_online_mask))) cpumask_and(tmpmask, tmpmask, cpu_online_mask); Signed-off-by: Hsin-Yi Wang --- Note - The warning comes from arm64 device - Previous related patches - ht

Re: [PATCH v8 2/3] fdt: add support for rng-seed

2019-08-20 Thread Hsin-Yi Wang
Hi Ted, Thanks for raising this question. For UEFI based system, they have a config table that carries rng seed and can be passed to device randomness. However, they also use add_device_randomness (not sure if it's the same reason that they can't guarantee _all_ bootloader can be trusted) This

[PATCH v8 3/3] arm64: kexec_file: add rng-seed support

2019-08-19 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be wiped after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd --- No change after v7. --- arch/ar

[PATCH v8 1/3] arm64: map FDT as RW for early_init_dt_scan()

2019-08-19 Thread Hsin-Yi Wang
Currently in arm64, FDT is mapped to RO before it's passed to early_init_dt_scan(). However, there might be some codes (eg. commit "fdt: add support for rng-seed") that need to modify FDT during init. Map FDT to RO after early fixups are done. Signed-off-by: Hsin-Yi Wang Reviewed-b

[PATCH v8 2/3] fdt: add support for rng-seed

2019-08-19 Thread Hsin-Yi Wang
(), since early_init_dt_scan_chosen() would modify fdt to erase rng-seed. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring --- Change from v7: obtain of_fdt_crc32 after early_init_dt_scan_nodes(). --- drivers/of/fdt.c | 14 -- 1 file changed, 12

[PATCH v8 0/3] add support for rng-seed

2019-08-19 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. This can be used for adding sufficient initial entropy for stack canary. Especially architectures that lack per-stack canary. Hsin-Yi Wang (3): arm64

[PATCH RESEND v7 3/3] arm64: kexec_file: add rng-seed support

2019-08-08 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be wiped after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd --- arch/arm64/kernel/machine_kexec_f

[PATCH RESEND v7 2/3] fdt: add support for rng-seed

2019-08-08 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. Bootloader should provide this entropy and the value is read from /chosen/rng-seed in DT. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd Reviewed

[PATCH RESEND v7 1/3] arm64: map FDT as RW for early_init_dt_scan()

2019-08-08 Thread Hsin-Yi Wang
Currently in arm64, FDT is mapped to RO before it's passed to early_init_dt_scan(). However, there might be some codes (eg. commit "fdt: add support for rng-seed") that need to modify FDT during init. Map FDT to RO after early fixups are done. Signed-off-by: Hsin-Yi Wang Reviewed-b

[PATCH RESEND v7 0/3] add support for rng-seed

2019-08-08 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. This can be used for adding sufficient initial entropy for stack canary. Especially architectures that lack per-stack canary. Hsin-Yi Wang (3): arm64

Re: [PATCH v7 0/3] add support for rng-seed

2019-08-05 Thread Hsin-Yi Wang
Ping on the thread. Should the series be proceeded? Thanks

Re: [PATCH v3 3/5] OPP: Improve require-opps linking

2019-07-30 Thread Hsin-Yi Wang
On Wed, Jul 17, 2019 at 10:23 PM Saravana Kannan wrote: > -free_required_tables: > - _opp_table_free_required_tables(opp_table); > -put_np: > - of_node_put(np); > + for (i = 0; i < src->required_opp_count; i++) { > + if (src->required_opp_tables[i]) > +

[PATCH] i2c: mediatek: disable zero-length transfers for mt8183

2019-07-26 Thread Hsin-Yi Wang
-by: Alexandru M Stan Signed-off-by: Hsin-Yi Wang --- Previous patch and discussion: http://patchwork.ozlabs.org/patch/1042684/ --- drivers/i2c/busses/i2c-mt65xx.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c

Re: [PATCH RFC v2 0/2] Use cpu based scaling passive governor for MT8183 CCI

2019-07-18 Thread Hsin-Yi Wang
On Wed, Jul 17, 2019 at 2:12 PM Hsin-Yi Wang wrote: > 2. cpu based scaling support to passive_governor from Sibi Sankar > https://lore.kernel.org/patchwork/patch/1101049/ This series is tested with previous version: https://patchwork.kernel.org/patch/10875195/

[PATCH RFC v2 2/2] cpufreq: mediatek: Support vproc shared by multiple component

2019-07-17 Thread Hsin-Yi Wang
Signed-off-by: Hsin-Yi Wang --- drivers/cpufreq/mediatek-cpufreq.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c index 7282834e8fe2..f5e737b862f0 100644 --- a/drivers/cpufreq/mediatek-cpu

[PATCH RFC v2 0/2] Use cpu based scaling passive governor for MT8183 CCI

2019-07-17 Thread Hsin-Yi Wang
passive governor for mt8183-cci to improve performance and deal with shared regulator voltage setting issue. Hsin-Yi Wang (2): devfreq: mt8183-cci: using cpu based scaling passive_governor cpufreq: mediatek: Support vproc shared by multiple component drivers/cpufreq/mediatek-cpufreq.c | 16

[PATCH RFC v2 1/2] devfreq: mt8183-cci: using cpu based scaling passive_governor

2019-07-17 Thread Hsin-Yi Wang
-by: Hsin-Yi Wang --- drivers/devfreq/mt8183-cci-devfreq.c | 239 +++ 1 file changed, 56 insertions(+), 183 deletions(-) diff --git a/drivers/devfreq/mt8183-cci-devfreq.c b/drivers/devfreq/mt8183-cci-devfreq.c index 250c963789f3..4e8e5948ed41 100644 --- a/drivers/devfreq

Re: [PATCH RFC 2/9] OPP: Export a number of helpers to prevent code duplication

2019-07-07 Thread Hsin-Yi Wang
On Thu, Mar 28, 2019 at 3:28 PM Sibi Sankar wrote: > + > +/* The caller must call dev_pm_opp_put() after the OPP is used */ > +struct dev_pm_opp *dev_pm_opp_find_opp_of_np(struct opp_table *opp_table, > +struct device_node *opp_np) > +{ > +

[PATCH v7 3/3] arm64: kexec_file: add rng-seed support

2019-07-02 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be wiped after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd --- change log v6->v7: * Use stack for rng_

[PATCH v7 2/3] fdt: add support for rng-seed

2019-07-02 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. Bootloader should provide this entropy and the value is read from /chosen/rng-seed in DT. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd Reviewed

[PATCH v7 0/3] add support for rng-seed

2019-07-02 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. This can be used for adding sufficient initial entropy for stack canary. Especially architectures that lack per-stack canary. Hsin-Yi Wang (3): arm64

[PATCH v7 1/3] arm64: map FDT as RW for early_init_dt_scan()

2019-07-02 Thread Hsin-Yi Wang
Currently in arm64, FDT is mapped to RO before it's passed to early_init_dt_scan(). However, there might be some codes (eg. commit "fdt: add support for rng-seed") that need to modify FDT during init. Map FDT to RO after early fixups are done. Signed-off-by: Hsin-Yi Wang Reviewed-b

Re: [PATCH v6 3/3] arm64: kexec_file: add rng-seed support

2019-06-30 Thread Hsin-Yi Wang
On Fri, Jun 28, 2019 at 7:47 PM Hsin-Yi Wang wrote: > > > > If the RNG wasn't initialised, we'd carry on with a warning. Why do we > > follow a different policy here? > > (Sorry, please ignore previous comment) I think this part should be same as kaslr, since they are

Re: [PATCH v6 3/3] arm64: kexec_file: add rng-seed support

2019-06-28 Thread Hsin-Yi Wang
On Fri, Jun 28, 2019 at 5:42 PM Mark Rutland wrote: > > On Wed, Jun 12, 2019 at 12:33:02PM +0800, Hsin-Yi Wang wrote: > > Adding "rng-seed" to dtb. It's fine to add this property if original > > fdt doesn't contain it. Since original seed will be wiped after > &g

Re: [PATCH v6 2/3] fdt: add support for rng-seed

2019-06-28 Thread Hsin-Yi Wang
On Fri, Jun 28, 2019 at 5:35 PM Mark Rutland wrote: > > On Wed, Jun 12, 2019 at 12:33:00PM +0800, Hsin-Yi Wang wrote: > > Introducing a chosen node, rng-seed, which is an entropy that can be > > passed to kernel called very early to increase initial device > > rando

Re: [PATCH RFC 1/2] PM / devfreq: Generic CPU frequency to device frequency mapping governor

2019-06-20 Thread Hsin-Yi Wang
Thanks! On Thu, Jun 20, 2019 at 5:41 PM Sibi Sankar wrote: > > Hey Hsin-Yi, Chanwoo > > On 2019-06-20 15:02, Hsin-Yi Wang wrote: > > Hi Chanwoo Choi, Saravana Kannan and Sibi Sankar, > > > > I've also tested Sibi Sankar's patch[1] locally with mt8183-cci, and &

Re: [PATCH RFC 1/2] PM / devfreq: Generic CPU frequency to device frequency mapping governor

2019-06-20 Thread Hsin-Yi Wang
On Thu, Jun 20, 2019 at 2:56 PM Chanwoo Choi wrote: > > + Sibi Sankar > > Hi, Hsin-Yi Wang, Saravana Kannan and Sibi Sankar > > I summarized the history of the related patch about this title. > > Firstly, > As I knew, Saravana sent the patch[1] which contains > 'gov

[PATCH RFC 1/2] PM / devfreq: Generic CPU frequency to device frequency mapping governor

2019-06-17 Thread Hsin-Yi Wang
frequency. If the CPUs are running at their min frequency, the device runs at its min frequency. And interpolated for frequencies in between. Signed-off-by: Saravana Kannan Signed-off-by: Hsin-Yi Wang --- .../bindings/devfreq/devfreq-cpufreq-map.txt | 53 ++ drivers/devfreq/Kconfig

[PATCH RFC 2/2] devfreq: mt8183-cci: using cpufreq-map governor in cci dvfs driver

2019-06-17 Thread Hsin-Yi Wang
From: Hsin-Yi Wang This is based on mediatek's devfreq patches[1]. In MT8183 SoC, CCI and little core cluster share same regulator. In original implementation, CCI frequency depends on regulator voltage, which results in bad memory access performance if tasks are loaded on other cpus other than

[PATCH RFC 0/2] Use cpufreq-map governor for MT8183 CCI

2019-06-17 Thread Hsin-Yi Wang
From: Hsin-Yi Wang This series uses cpufreq-map governor for mt8183-cci to improve performance. Hsin-Yi Wang (1): devfreq: mt8183-cci: using cpufreq-map governor in cci dvfs driver Saravana Kannan (1): PM / devfreq: Generic CPU frequency to device frequency mapping governor

[PATCH v6 3/3] arm64: kexec_file: add rng-seed support

2019-06-11 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be wiped after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd --- change log v5->v6: * no change --- arch

[PATCH v6 2/3] fdt: add support for rng-seed

2019-06-11 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. Bootloader should provide this entropy and the value is read from /chosen/rng-seed in DT. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd

<    1   2   3   4   >